File tree Expand file tree Collapse file tree 5 files changed +21
-9
lines changed Expand file tree Collapse file tree 5 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 39
39
(if (pos? (.-deltaY e))
40
40
(rf/dispatch [:element/update-attr k - 1 ])
41
41
(rf/dispatch [:element/update-attr k + 1 ])))}]
42
- [:div.flex {:style {:width " 54px " }}
42
+ [:div.flex {:style {:width " 55px " }}
43
43
[:button.button.ml-px.bg-primary.text-muted.h-full
44
44
{:style {:width " 26px" }
45
45
:on-pointer-down #(rf/dispatch [:element/update-attr k - 1 ])}
Original file line number Diff line number Diff line change 8
8
:dialog/cmdk
9
9
(fn [db [_]]
10
10
(assoc db :dialog {:content [cmdk/root]
11
- :attrs {:class " dialog-content dialog-cmdk-content" }})))
11
+ :attrs {:onOpenAutoFocus #()
12
+ :class " dialog-content dialog-cmdk-content" }})))
12
13
13
14
(rf/reg-event-db
14
15
:dialog/about
Original file line number Diff line number Diff line change 22
22
[:div [:strong " Version: " ] config/version]
23
23
[:div [:strong " Browser: " ] platform/user-agent]]]
24
24
[:button.button.px-2.bg-primary.rounded.w-full
25
- {:on-click #(rf/dispatch [:dialog/close ])}
25
+ {:auto-focus true
26
+ :on-click #(rf/dispatch [:dialog/close ])}
26
27
" OK" ]
27
28
[close-button]])
28
29
36
37
{:on-click #(rf/dispatch [:dialog/close ])}
37
38
" No" ]
38
39
[:button.button.px-2.bg-primary.rounded
39
- {:on-click #(do (rf/dispatch [:dialog/close ])
40
+ {:auto-focus true
41
+ :on-click #(do (rf/dispatch [:dialog/close ])
40
42
(rf/dispatch action))}
41
43
" Yes" ]]
42
44
[close-button]])
59
61
{:on-click #(rf/dispatch [:dialog/close ])}
60
62
" Cancel" ]
61
63
[:button.button.px-2.bg-primary.rounded.flex-1
62
- {:on-click #(do (rf/dispatch [:dialog/close ])
64
+ {:auto-focus true
65
+ :on-click #(do (rf/dispatch [:dialog/close ])
63
66
(rf/dispatch [:document/save-and-close ]))}
64
67
" Save" ]]
65
68
[close-button]]))
73
76
[:> Dialog/Portal
74
77
[:> Dialog/Overlay {:class " dialog-overlay" }]
75
78
[:> Dialog/Content
76
- (merge {:class " dialog-content" }
79
+ (merge {:class " dialog-content"
80
+ :onOpenAutoFocus #(.preventDefault %)}
77
81
(:attrs dialog))
78
82
(:content dialog)]]]))
Original file line number Diff line number Diff line change 66
66
.border-accent {
67
67
border-color : var (--accent );
68
68
}
69
+
70
+ .outline-shadow {
71
+ box-shadow : inset 0 0 1px 1px var (--accent )
72
+ }
69
73
}
70
74
71
75
@layer components {
95
99
}
96
100
97
101
.button {
98
- @apply inline-block relative cursor-pointer text-center;
102
+ @apply inline-block relative cursor-pointer text-center outline-none ;
99
103
background-color : transparent;
100
104
color : var (--font-color );
101
105
fill : var (--font-color );
102
106
font-family : var (--font-color );
103
107
font-size : 1em ;
104
- outline : none;
105
108
height : 33px ;
106
109
line-height : 33px ;
107
110
-webkit-app-region : no-drag;
113
116
color : var (--font-color-hovered );
114
117
}
115
118
119
+ & : focus : not (: hover ) {
120
+ @apply outline-shadow;
121
+ }
122
+
116
123
& .selected {
117
124
@apply bg-accent !important ;
118
125
color : var (--accent-inverted );
Original file line number Diff line number Diff line change 19
19
[:span
20
20
[comp/radio-icon-button
21
21
{:active? selected?
22
- :class (when primary? " border border-accent " )
22
+ :class (when primary? " outline-shadow " )
23
23
:icon (:icon (tools/properties type))
24
24
:action #(rf/dispatch [:set-tool type])}]]]
25
25
[:> Tooltip/Portal
You can’t perform that action at this time.
0 commit comments