File tree 15 files changed +40
-21
lines changed
15 files changed +40
-21
lines changed Original file line number Diff line number Diff line change 12
12
[v/form-input k v attrs]
13
13
[:> Popover/Root {:modal true }
14
14
[:> Popover/Trigger
15
- {:class " form-control-button" }
15
+ {:title " Pick angle"
16
+ :class " form-control-button" }
16
17
[ui/icon " degrees" ]]
17
18
[:> Popover/Portal
18
19
[:> Popover/Content
Original file line number Diff line number Diff line change 21
21
{:as-child true
22
22
:disabled disabled}
23
23
[:button.button.color-drip.inline-block
24
- {:style {:border " 5px solid var(--bg-primary)"
24
+ {:title " Pick color"
25
+ :style {:border " 5px solid var(--bg-primary)"
25
26
:background v}}]]
26
27
[:> Popover/Portal
27
28
[:> Popover/Content
Original file line number Diff line number Diff line change 139
139
(when v
140
140
[:> Popover/Root {:modal true }
141
141
[:> Popover/Trigger
142
- {:class " form-control-button" }
142
+ {:title " Edit path"
143
+ :class " form-control-button" }
143
144
[ui/icon " pencil" ]]
144
145
[:> Popover/Portal
145
146
[:> Popover/Content {:sideOffset 5
Original file line number Diff line number Diff line change 50
50
(when (and state (empty? suggestions))
51
51
(rf/dispatch [::app.e/query-local-fonts ])))}
52
52
[:> Popover/Trigger
53
- {:class " form-control-button"
53
+ {:title " Select font"
54
+ :class " form-control-button"
54
55
:disabled (:disabled attrs)}
55
56
[ui/icon " magnifier" ]]
56
57
[:> Popover/Portal
Original file line number Diff line number Diff line change 41
41
[:div.flex.gap-px
42
42
[:button.form-control-button
43
43
{:disabled disabled
44
+ :title " Decrease"
44
45
:on-pointer-down #(rf/dispatch [::element.e/update-attr k - 1 ])}
45
46
[ui/icon " minus" ]]
46
47
[:button.form-control-button
47
48
{:disabled disabled
49
+ :title " Increase"
48
50
:on-click #(rf/dispatch [::element.e/update-attr k + 1 ])}
49
51
[ui/icon " plus" ]]]])
50
52
Original file line number Diff line number Diff line change 41
41
[points]
42
42
[:> Popover/Root {:modal true }
43
43
[:> Popover/Trigger
44
- {:class " form-control-button" }
44
+ {:title " Edit points"
45
+ :class " form-control-button" }
45
46
[ui/icon " pencil" ]]
46
47
[:> Popover/Portal
47
48
[:> Popover/Content
Original file line number Diff line number Diff line change 130
130
:disabled disabled}
131
131
[:> Select/Trigger
132
132
{:class " form-control-button"
133
- :aria-label (name k)}
133
+ :aria-label (str " Select " ( name k) )}
134
134
[:> Select/Value " " ]
135
135
[:> Select/Icon
136
136
[ui/icon " chevron-down" ]]]
Original file line number Diff line number Diff line change 142
142
[:> DropdownMenu/Trigger
143
143
{:as-child true }
144
144
[:button.button.flex.items-center.justify-center.aria-expanded:overlay.px-2.font-mono.rounded
145
+ {:aria-label " More document actions" }
145
146
[ui/icon " ellipsis-h" ]]]
146
147
[:> DropdownMenu/Portal
147
148
[:> DropdownMenu/Content
Original file line number Diff line number Diff line change 16
16
(let [options @(rf/subscribe [::snap.s/options ])]
17
17
[:> DropdownMenu/Root
18
18
[:> DropdownMenu/Trigger
19
- {:aria-label " Snap"
20
- :as-child true }
19
+ {:as-child true }
21
20
[:div.h-full.flex.items-center
22
- {:class " hover:pb-1" }
21
+ {:role " button"
22
+ :title " Snap options"
23
+ :class " hover:pb-1" }
23
24
[ui/icon " chevron-up" ]]]
24
25
[:> DropdownMenu/Portal
25
26
[:> DropdownMenu/Content
Original file line number Diff line number Diff line change 9
9
--text-2xs--line-height : 14px ;
10
10
--transition-property-fill : fill;
11
11
12
- --color-accent : # e93976 ;
12
+ --color-accent : # d12b65 ;
13
13
--color-accent-inverted : # fff ;
14
14
}
15
15
Original file line number Diff line number Diff line change 54
54
[]
55
55
[:> DropdownMenu/Root
56
56
[:> DropdownMenu/Trigger
57
- {:class " button flex items-center justify-center overlay px-2 font-mono rounded-sm"
57
+ {:title " Select zoom level"
58
+ :class " button flex items-center justify-center overlay px-2 font-mono rounded-sm"
58
59
:side " top" }
59
60
[:div.flex.items-center
60
61
[ui/icon " chevron-up" ]]]
162
163
:on-change #(rf/dispatch [::document.e/preview-attr :fill (get-hex %)])}
163
164
164
165
[:button.button.color-rect
165
- {:style {:background fill}}]]
166
+ {:title " Pick fill color"
167
+ :style {:background fill}}]]
166
168
167
169
[:button.icon-button
168
170
{:title (t [:color/swap " Swap fill with stroke" ])
176
178
:on-change #(rf/dispatch [::document.e/preview-attr :stroke (get-hex %)])
177
179
:align-offset -54 }
178
180
[:button.button.color-rect.relative
179
- {:style {:background stroke}}
181
+ {:title " Pick stroke color"
182
+ :style {:background stroke}}
180
183
[:div.color-rect.bg-primary.absolute
181
184
{:style {:width " 13px"
182
185
:height " 13px"
Original file line number Diff line number Diff line change 14
14
primary-tool @(rf/subscribe [::tool.s/primary ])
15
15
active (= active-tool tool)
16
16
primary (= primary-tool tool)
17
- properties (tool.hierarchy/properties tool)]
17
+ properties (tool.hierarchy/properties tool)
18
+ label (or (:label properties) (str/capitalize (name tool)))]
18
19
(when (:icon properties)
19
20
[:> Tooltip/Root
20
21
[:> Tooltip/Trigger {:as-child true }
21
22
[:span
22
23
[ui/radio-icon-button (:icon properties) active
23
24
{:class (when primary " outline-shadow" )
25
+ :aria-label (str " activate " label)
24
26
:on-click #(rf/dispatch [::tool.e/activate tool])}]]]
25
27
[:> Tooltip/Portal
26
28
[:> Tooltip/Content
27
29
{:class " tooltip-content"
28
30
:sideOffset 5
29
31
:side " top" }
30
32
[:div.flex.gap-2.items-center
31
- (or (:label properties) (str/capitalize (name tool)))]]]])))
33
+ (or (:label properties)
34
+ (str/capitalize (name tool)))]]]])))
32
35
33
36
(defn group
34
37
[items]
Original file line number Diff line number Diff line change 13
13
{:as-child true }
14
14
[:span.shadow-4
15
15
[ui/icon-button icon {:disabled disabled
16
+ :aria-label title
16
17
:on-click #(rf/dispatch action)}]]]
17
18
[:> Tooltip/Portal
18
19
[:> Tooltip/Content
Original file line number Diff line number Diff line change 131
131
(when hovered " hovered" )]
132
132
:tab-index 0
133
133
:data-id (str id)
134
- :role " menuitem"
135
134
:on-double-click #(rf/dispatch [::frame.e/pan-to-element id])
136
135
:on-pointer-enter #(rf/dispatch [::document.e/set-hovered-id id])
137
136
:ref (fn [this]
170
169
hovered-ids @(rf/subscribe [::document.s/hovered-ids ])
171
170
collapsed-ids @(rf/subscribe [::document.s/collapsed-ids ])
172
171
collapsed (contains? collapsed-ids id)]
173
- [:li {:class (when selected " overlay" )}
172
+ [:li {:class (when selected " overlay" )
173
+ :role " menuitem" }
174
174
[list-item-button el {:depth depth
175
175
:collapsed collapsed
176
176
:hovered (contains? hovered-ids id)}]
177
177
(when (and has-children (not collapsed))
178
- [:ul (for [el (mapv (fn [k] (get elements k)) (reverse children))]
179
- ^{:key (:id el)} [item el (inc depth) elements])])]))
178
+ [:ul {:role " menu" }
179
+ (for [el (mapv (fn [k] (get elements k)) (reverse children))]
180
+ ^{:key (:id el)} [item el (inc depth) elements])])]))
180
181
181
182
(defn inner-sidebar-render
182
183
[root-children elements]
183
184
[:div.tree-sidebar
184
185
{:on-pointer-up #(rf/dispatch [::element.e/deselect-all ])}
185
186
[ui/scroll-area
186
- [:ul {:on-pointer-leave #(rf/dispatch [::document.e/clear-hovered ])
187
+ [:ul {:role " menu"
188
+ :on-pointer-leave #(rf/dispatch [::document.e/clear-hovered ])
187
189
:style {:width " 227px" }}
188
190
(for [el (reverse root-children)]
189
191
^{:key (:id el)} [item el 1 elements])]]])
Original file line number Diff line number Diff line change 62
62
props)
63
63
[:> Slider/Track {:class " relative h-1 bg-secondary flex-1" }
64
64
[:> Slider/Range {:class " absolute h-full overlay" }]]
65
- [:> Slider/Thumb {:class " slider-thumb" }]])
65
+ [:> Slider/Thumb {:class " slider-thumb"
66
+ :aria-label " Resize panel thumb" }]])
66
67
67
68
(defn format-shortcut
68
69
[[shortcut]]
You can’t perform that action at this time.
0 commit comments