@jxsuite/ui 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/jx-accordion-item.json +281 -0
- package/components/jx-accordion.json +33 -0
- package/components/jx-action-button.json +268 -34
- package/components/jx-action-group.json +131 -0
- package/components/jx-button.json +141 -26
- package/components/jx-checkbox.json +222 -0
- package/components/jx-color-area.json +263 -0
- package/components/jx-color-field.json +565 -0
- package/components/jx-color-slider.json +216 -0
- package/components/jx-combobox.json +551 -0
- package/components/jx-dialog.json +416 -0
- package/components/jx-divider.json +52 -0
- package/components/jx-dot.json +38 -0
- package/components/jx-field.json +162 -0
- package/components/jx-kbd.json +24 -0
- package/components/jx-listbox.json +76 -0
- package/components/jx-menu-item.json +6 -13
- package/components/jx-menu.json +45 -6
- package/components/jx-number-field.json +441 -0
- package/components/jx-option.json +350 -0
- package/components/jx-popover.json +227 -0
- package/components/jx-select.json +637 -0
- package/components/jx-spinner.json +129 -0
- package/components/jx-split.json +221 -0
- package/components/jx-swatch-group.json +107 -0
- package/components/jx-swatch.json +262 -0
- package/components/jx-switch.json +331 -0
- package/components/jx-tab-panel.json +58 -0
- package/components/jx-tab.json +296 -0
- package/components/jx-tabs.json +124 -0
- package/components/jx-textfield.json +645 -0
- package/components/jx-toast-host.json +121 -0
- package/components/jx-toast.json +255 -0
- package/components/jx-toolbar.json +81 -0
- package/components/jx-tooltip.json +207 -0
- package/components/jx-tree-item.json +325 -0
- package/components/jx-tree.json +202 -0
- package/icons/list.json +4 -0
- package/icons/manifest.json +12 -0
- package/package.json +27 -5
- package/project.json +164 -153
- package/src/behaviors/action-group.ts +255 -0
- package/src/behaviors/color-area.ts +303 -0
- package/src/behaviors/color-field.ts +465 -0
- package/src/behaviors/color-slider.ts +154 -0
- package/src/behaviors/combobox.ts +474 -0
- package/src/behaviors/dialog.ts +137 -0
- package/src/behaviors/listbox.ts +118 -0
- package/src/behaviors/menu.ts +80 -48
- package/src/behaviors/number-field.ts +161 -0
- package/src/behaviors/popover.ts +399 -0
- package/src/behaviors/select.ts +154 -0
- package/src/behaviors/split.ts +478 -0
- package/src/behaviors/swatch-group.ts +297 -0
- package/src/behaviors/tabs.ts +319 -0
- package/src/behaviors/textfield.ts +164 -0
- package/src/behaviors/toast-host.ts +241 -0
- package/src/behaviors/toast.ts +261 -0
- package/src/behaviors/toolbar.ts +413 -0
- package/src/behaviors/tooltip.ts +719 -0
- package/src/behaviors/tree.ts +830 -0
- package/src/color.ts +433 -0
- package/src/documents.ts +91 -1
- package/src/index.ts +41 -1
- package/src/loaders.ts +47 -0
- package/src/testing/anchor-support.ts +28 -0
- package/src/testing/popover-shim.ts +39 -6
- package/src/theme.ts +30 -6
- package/stylebook/jx-accordion-item.json +195 -0
- package/stylebook/jx-accordion.json +220 -0
- package/stylebook/jx-action-button.json +191 -23
- package/stylebook/jx-action-group.json +335 -0
- package/stylebook/jx-button.json +129 -26
- package/stylebook/jx-checkbox.json +245 -0
- package/stylebook/jx-color-area.json +272 -0
- package/stylebook/jx-color-field.json +261 -0
- package/stylebook/jx-color-slider.json +220 -0
- package/stylebook/jx-combobox.json +332 -0
- package/stylebook/jx-dialog.json +186 -0
- package/stylebook/jx-divider.json +125 -0
- package/stylebook/jx-dot.json +92 -0
- package/stylebook/jx-field.json +313 -0
- package/stylebook/jx-icon.json +4 -0
- package/stylebook/jx-kbd.json +90 -0
- package/stylebook/jx-listbox.json +337 -0
- package/stylebook/jx-menu.json +0 -1
- package/stylebook/jx-number-field.json +203 -0
- package/stylebook/jx-option.json +285 -0
- package/stylebook/jx-popover.json +123 -0
- package/stylebook/jx-select.json +407 -0
- package/stylebook/jx-spinner.json +111 -0
- package/stylebook/jx-split.json +170 -0
- package/stylebook/jx-swatch-group.json +175 -0
- package/stylebook/jx-swatch.json +249 -0
- package/stylebook/jx-switch.json +240 -0
- package/stylebook/jx-tab-panel.json +147 -0
- package/stylebook/jx-tab.json +201 -0
- package/stylebook/jx-tabs.json +278 -0
- package/stylebook/jx-textfield.json +309 -0
- package/stylebook/jx-toast-host.json +157 -0
- package/stylebook/jx-toast.json +266 -0
- package/stylebook/jx-toolbar.json +435 -0
- package/stylebook/jx-tooltip.json +162 -0
- package/stylebook/jx-tree-item.json +258 -0
- package/stylebook/jx-tree.json +429 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://jxsuite.com/schema/v1",
|
|
3
|
+
"$id": "JxNumberField",
|
|
4
|
+
"tagName": "jx-number-field",
|
|
5
|
+
"$elements": [
|
|
6
|
+
{
|
|
7
|
+
"$ref": "./jx-icon.json"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"observedAttributes": [
|
|
11
|
+
"value",
|
|
12
|
+
"min",
|
|
13
|
+
"max",
|
|
14
|
+
"step",
|
|
15
|
+
"placeholder",
|
|
16
|
+
"label",
|
|
17
|
+
"labelledby",
|
|
18
|
+
"describedby",
|
|
19
|
+
"disabled",
|
|
20
|
+
"stepper",
|
|
21
|
+
"step-up-label",
|
|
22
|
+
"step-down-label",
|
|
23
|
+
"name",
|
|
24
|
+
"size"
|
|
25
|
+
],
|
|
26
|
+
"state": {
|
|
27
|
+
"value": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "",
|
|
30
|
+
"attribute": "value",
|
|
31
|
+
"description": "The field's text, as a string rather than a number. An empty value means empty: a numeric entry would read a removed attribute as 0, so clearing a numeric key would write 0 into the document instead of deleting it. It is bound twice, as the control's value property AND as its value content attribute: the property is what tracks state once the reader has typed (typing sets the control's dirty value flag, after which the attribute no longer moves the live value), and the attribute keeps the control's DEFAULT value equal to its current one. The price of that mirror is that form.reset() is a no-op here, and it is deliberate: the element is not form-associated (specs/ui.md §3.2), so it never hears the reset, and an unmirrored default would move the control while leaving this state where it was — the element and its control disagreeing silently, which is worse than a reset that does nothing."
|
|
32
|
+
},
|
|
33
|
+
"min": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"default": "",
|
|
36
|
+
"attribute": "min",
|
|
37
|
+
"description": "The smallest value the control accepts, as a string. Empty removes the attribute rather than setting an empty one, and the step grid is measured from it."
|
|
38
|
+
},
|
|
39
|
+
"max": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"default": "",
|
|
42
|
+
"attribute": "max",
|
|
43
|
+
"description": "The largest value the control accepts, as a string. Empty removes the attribute."
|
|
44
|
+
},
|
|
45
|
+
"step": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"default": "",
|
|
48
|
+
"attribute": "step",
|
|
49
|
+
"description": "The stepping interval, as a string. Empty removes the attribute, leaving the platform's default of 1."
|
|
50
|
+
},
|
|
51
|
+
"placeholder": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"default": "",
|
|
54
|
+
"attribute": "placeholder",
|
|
55
|
+
"description": "Shown while the field is empty. Not a label."
|
|
56
|
+
},
|
|
57
|
+
"label": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"default": "",
|
|
60
|
+
"attribute": "label",
|
|
61
|
+
"description": "The accessible name, forwarded to the control as aria-label. Required unless a visible label points at the control."
|
|
62
|
+
},
|
|
63
|
+
"labelledby": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"default": "",
|
|
66
|
+
"attribute": "labelledby",
|
|
67
|
+
"description": "Forwarded to the inner control as aria-labelledby."
|
|
68
|
+
},
|
|
69
|
+
"describedby": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"default": "",
|
|
72
|
+
"attribute": "describedby",
|
|
73
|
+
"description": "Forwarded to the inner control as aria-describedby. The help sentence under a row is the row's, not the field's."
|
|
74
|
+
},
|
|
75
|
+
"disabled": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"default": false,
|
|
78
|
+
"attribute": "disabled",
|
|
79
|
+
"description": "Cannot be edited, stepped or focused."
|
|
80
|
+
},
|
|
81
|
+
"stepper": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": false,
|
|
84
|
+
"attribute": "stepper",
|
|
85
|
+
"description": "Draw the two stepping buttons. The Arrow keys step whether or not they are drawn; the buttons are for a pointer."
|
|
86
|
+
},
|
|
87
|
+
"stepUpLabel": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"default": "Increase",
|
|
90
|
+
"attribute": "step-up-label",
|
|
91
|
+
"description": "The step-up button's accessible name. It is a real name rather than aria-hidden: a button with no name is reported as unnamed whether or not it is hidden from assistive technology."
|
|
92
|
+
},
|
|
93
|
+
"stepDownLabel": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"default": "Decrease",
|
|
96
|
+
"attribute": "step-down-label",
|
|
97
|
+
"description": "The step-down button's accessible name."
|
|
98
|
+
},
|
|
99
|
+
"name": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"default": "",
|
|
102
|
+
"attribute": "name",
|
|
103
|
+
"description": "The form field name, forwarded to the control."
|
|
104
|
+
},
|
|
105
|
+
"size": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"default": "md",
|
|
108
|
+
"attribute": "size",
|
|
109
|
+
"description": "sm, md or lg. The control height is the kit's, so a row of controls lines up."
|
|
110
|
+
},
|
|
111
|
+
"badInput": {
|
|
112
|
+
"type": "boolean",
|
|
113
|
+
"default": false,
|
|
114
|
+
"description": "Mirrored from the control, never authored: the reader has typed something that is not a number, so the sanitized value reads empty while an edit is still in progress. A host that deletes a key on an empty value must not delete on this one, and it reads the case off the ELEMENT rather than off an event — this prop, or the data-bad-input attribute it mirrors, reached from a handler as event.target.closest('jx-number-field')."
|
|
115
|
+
},
|
|
116
|
+
"onInput": {
|
|
117
|
+
"$prototype": "Function",
|
|
118
|
+
"body": [
|
|
119
|
+
{
|
|
120
|
+
"operator": "=",
|
|
121
|
+
"target": {
|
|
122
|
+
"$ref": "#/state/value"
|
|
123
|
+
},
|
|
124
|
+
"value": {
|
|
125
|
+
"$ref": "event#/target/value"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"operator": "=",
|
|
130
|
+
"target": {
|
|
131
|
+
"$ref": "#/state/badInput"
|
|
132
|
+
},
|
|
133
|
+
"value": {
|
|
134
|
+
"$ref": "event#/target/validity/badInput"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"description": "Mirrors what the reader types, and whether the control could parse it. The platform's own input event is left alone and goes on bubbling from the control, so a host's event.target is the live input."
|
|
139
|
+
},
|
|
140
|
+
"onChange": {
|
|
141
|
+
"$prototype": "Function",
|
|
142
|
+
"$src": "jx-ui:/behaviors/number-field.ts",
|
|
143
|
+
"$export": "onNumberChange",
|
|
144
|
+
"description": "The reader committed an edit: reads the control back into state. The platform's own change event is neither stopped nor re-sent, so a host still reaches event.target.valueAsNumber (NaN when empty), .validity and .form on the live control; the sanitization case is read off the element as badInput, not off a detail."
|
|
145
|
+
},
|
|
146
|
+
"onKeydown": {
|
|
147
|
+
"$prototype": "Function",
|
|
148
|
+
"$src": "jx-ui:/behaviors/number-field.ts",
|
|
149
|
+
"$export": "onNumberKeydown",
|
|
150
|
+
"description": "Shift and an Arrow move ten steps, through the control's own stepping API.",
|
|
151
|
+
"emits": [
|
|
152
|
+
{
|
|
153
|
+
"name": "input",
|
|
154
|
+
"description": "The value moved. Dispatched from the element, because the platform fires nothing for a value the element wrote itself. No detail: event.target is the element, whose own value is the same string."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "change",
|
|
158
|
+
"description": "The value was committed. Dispatched from the element for the same reason, with no detail; the sanitization case is the element's own badInput."
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"onStepUp": {
|
|
163
|
+
"$prototype": "Function",
|
|
164
|
+
"$src": "jx-ui:/behaviors/number-field.ts",
|
|
165
|
+
"$export": "onStepUp",
|
|
166
|
+
"description": "The step-up button: one step up.",
|
|
167
|
+
"emits": [
|
|
168
|
+
{
|
|
169
|
+
"name": "input",
|
|
170
|
+
"description": "The value moved. Dispatched from the element, because the platform fires nothing for a value the element wrote itself. No detail: event.target is the element, whose own value is the same string."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "change",
|
|
174
|
+
"description": "The value was committed. Dispatched from the element for the same reason, with no detail; the sanitization case is the element's own badInput."
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"onStepDown": {
|
|
179
|
+
"$prototype": "Function",
|
|
180
|
+
"$src": "jx-ui:/behaviors/number-field.ts",
|
|
181
|
+
"$export": "onStepDown",
|
|
182
|
+
"description": "The step-down button: one step down.",
|
|
183
|
+
"emits": [
|
|
184
|
+
{
|
|
185
|
+
"name": "input",
|
|
186
|
+
"description": "The value moved. Dispatched from the element, because the platform fires nothing for a value the element wrote itself. No detail: event.target is the element, whose own value is the same string."
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "change",
|
|
190
|
+
"description": "The value was committed. Dispatched from the element for the same reason, with no detail; the sanitization case is the element's own badInput."
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"onStepperPointerDown": {
|
|
195
|
+
"$prototype": "Function",
|
|
196
|
+
"body": [
|
|
197
|
+
{
|
|
198
|
+
"preventDefault": true
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"description": "Keeps focus in the field while a stepping button is pressed. Without it the blur that follows the press fires a second change for the same edit."
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"attributes": {
|
|
205
|
+
"data-size": "${state.size}",
|
|
206
|
+
"data-disabled": "${state.disabled ? '' : null}",
|
|
207
|
+
"data-stepper": "${state.stepper ? '' : null}",
|
|
208
|
+
"data-bad-input": "${state.badInput ? '' : null}"
|
|
209
|
+
},
|
|
210
|
+
"style": {
|
|
211
|
+
"display": "inline-flex",
|
|
212
|
+
"verticalAlign": "middle",
|
|
213
|
+
"minWidth": "0",
|
|
214
|
+
"&[hidden]": {
|
|
215
|
+
"display": "none"
|
|
216
|
+
},
|
|
217
|
+
"& [part=\"field\"]": {
|
|
218
|
+
"display": "flex",
|
|
219
|
+
"alignItems": "stretch",
|
|
220
|
+
"minWidth": "0",
|
|
221
|
+
"width": "100%"
|
|
222
|
+
},
|
|
223
|
+
"& [part=\"input\"]": {
|
|
224
|
+
"appearance": "none",
|
|
225
|
+
"boxSizing": "border-box",
|
|
226
|
+
"flex": "1 1 auto",
|
|
227
|
+
"width": "100%",
|
|
228
|
+
"minWidth": "0",
|
|
229
|
+
"minHeight": "var(--jx-control-h)",
|
|
230
|
+
"margin": "0",
|
|
231
|
+
"padding": "0 var(--jx-space-3)",
|
|
232
|
+
"border": "1px solid var(--jx-border-strong)",
|
|
233
|
+
"borderRadius": "var(--jx-radius-sm)",
|
|
234
|
+
"background": "var(--jx-bg-input)",
|
|
235
|
+
"color": "var(--jx-fg)",
|
|
236
|
+
"font": "inherit",
|
|
237
|
+
"fontFamily": "var(--jx-font-sans)",
|
|
238
|
+
"fontSize": "var(--jx-text-md)",
|
|
239
|
+
"lineHeight": "var(--jx-leading-md)",
|
|
240
|
+
"fontVariantNumeric": "tabular-nums",
|
|
241
|
+
"outline": "none",
|
|
242
|
+
"transition": "border-color var(--jx-dur-1) var(--jx-ease-out)",
|
|
243
|
+
"::placeholder": {
|
|
244
|
+
"color": "var(--jx-fg-muted)"
|
|
245
|
+
},
|
|
246
|
+
"::-webkit-inner-spin-button": {
|
|
247
|
+
"appearance": "none",
|
|
248
|
+
"margin": "0"
|
|
249
|
+
},
|
|
250
|
+
"::-webkit-outer-spin-button": {
|
|
251
|
+
"appearance": "none",
|
|
252
|
+
"margin": "0"
|
|
253
|
+
},
|
|
254
|
+
":hover": {
|
|
255
|
+
"borderColor": "var(--jx-fg-muted)"
|
|
256
|
+
},
|
|
257
|
+
":focus-visible": {
|
|
258
|
+
"outline": "var(--jx-focus-ring)",
|
|
259
|
+
"outlineOffset": "-1px"
|
|
260
|
+
},
|
|
261
|
+
":disabled": {
|
|
262
|
+
"opacity": "0.5",
|
|
263
|
+
"cursor": "default"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"& [part=\"stepper-slot\"]": {
|
|
267
|
+
"display": "contents"
|
|
268
|
+
},
|
|
269
|
+
"& [part=\"stepper\"]": {
|
|
270
|
+
"display": "flex",
|
|
271
|
+
"flexDirection": "column",
|
|
272
|
+
"marginInlineStart": "var(--jx-space-1)"
|
|
273
|
+
},
|
|
274
|
+
"& [part=\"step-up\"], & [part=\"step-down\"]": {
|
|
275
|
+
"appearance": "none",
|
|
276
|
+
"display": "inline-flex",
|
|
277
|
+
"alignItems": "center",
|
|
278
|
+
"justifyContent": "center",
|
|
279
|
+
"flex": "1 1 0",
|
|
280
|
+
"width": "var(--jx-space-5)",
|
|
281
|
+
"padding": "0",
|
|
282
|
+
"margin": "0",
|
|
283
|
+
"border": "1px solid var(--jx-border-strong)",
|
|
284
|
+
"background": "var(--jx-bg-input)",
|
|
285
|
+
"color": "var(--jx-fg-dim)",
|
|
286
|
+
"cursor": "default",
|
|
287
|
+
"--jx-icon-size": "10px",
|
|
288
|
+
":hover": {
|
|
289
|
+
"background": "var(--jx-hover-bg)",
|
|
290
|
+
"color": "var(--jx-fg)"
|
|
291
|
+
},
|
|
292
|
+
":focus-visible": {
|
|
293
|
+
"outline": "var(--jx-focus-ring)",
|
|
294
|
+
"outlineOffset": "-1px"
|
|
295
|
+
},
|
|
296
|
+
":disabled": {
|
|
297
|
+
"opacity": "0.5"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"& [part=\"step-up\"]": {
|
|
301
|
+
"borderRadius": "var(--jx-radius-sm) var(--jx-radius-sm) 0 0",
|
|
302
|
+
"borderBottom": "0"
|
|
303
|
+
},
|
|
304
|
+
"& [part=\"step-down\"]": {
|
|
305
|
+
"borderRadius": "0 0 var(--jx-radius-sm) var(--jx-radius-sm)"
|
|
306
|
+
},
|
|
307
|
+
"&[data-size=\"sm\"] [part=\"input\"]": {
|
|
308
|
+
"minHeight": "calc(var(--jx-control-h) - 4px)",
|
|
309
|
+
"fontSize": "var(--jx-text-sm)",
|
|
310
|
+
"padding": "0 var(--jx-space-2)"
|
|
311
|
+
},
|
|
312
|
+
"&[data-size=\"lg\"] [part=\"input\"]": {
|
|
313
|
+
"minHeight": "calc(var(--jx-control-h) + 8px)",
|
|
314
|
+
"fontSize": "var(--jx-text-lg)"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"children": [
|
|
318
|
+
{
|
|
319
|
+
"tagName": "div",
|
|
320
|
+
"attributes": {
|
|
321
|
+
"part": "field",
|
|
322
|
+
"role": "none"
|
|
323
|
+
},
|
|
324
|
+
"children": [
|
|
325
|
+
{
|
|
326
|
+
"tagName": "input",
|
|
327
|
+
"attributes": {
|
|
328
|
+
"part": "input",
|
|
329
|
+
"type": "number",
|
|
330
|
+
"inputmode": "decimal",
|
|
331
|
+
"placeholder": "${state.placeholder || null}",
|
|
332
|
+
"aria-label": "${state.label || null}",
|
|
333
|
+
"aria-labelledby": "${state.labelledby || null}",
|
|
334
|
+
"aria-describedby": "${state.describedby || null}",
|
|
335
|
+
"name": "${state.name || null}",
|
|
336
|
+
"min": "${state.min || null}",
|
|
337
|
+
"max": "${state.max || null}",
|
|
338
|
+
"step": "${state.step || null}",
|
|
339
|
+
"disabled": {
|
|
340
|
+
"$ref": "#/state/disabled"
|
|
341
|
+
},
|
|
342
|
+
"value": "${state.value}"
|
|
343
|
+
},
|
|
344
|
+
"value": {
|
|
345
|
+
"$ref": "#/state/value"
|
|
346
|
+
},
|
|
347
|
+
"oninput": {
|
|
348
|
+
"$ref": "#/state/onInput"
|
|
349
|
+
},
|
|
350
|
+
"onchange": {
|
|
351
|
+
"$ref": "#/state/onChange"
|
|
352
|
+
},
|
|
353
|
+
"onkeydown": {
|
|
354
|
+
"$ref": "#/state/onKeydown"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"tagName": "div",
|
|
359
|
+
"attributes": {
|
|
360
|
+
"part": "stepper-slot",
|
|
361
|
+
"role": "none"
|
|
362
|
+
},
|
|
363
|
+
"$switch": {
|
|
364
|
+
"$ref": "#/state/stepper"
|
|
365
|
+
},
|
|
366
|
+
"cases": {
|
|
367
|
+
"true": {
|
|
368
|
+
"tagName": "div",
|
|
369
|
+
"attributes": {
|
|
370
|
+
"part": "stepper",
|
|
371
|
+
"role": "none"
|
|
372
|
+
},
|
|
373
|
+
"children": [
|
|
374
|
+
{
|
|
375
|
+
"tagName": "button",
|
|
376
|
+
"attributes": {
|
|
377
|
+
"part": "step-up",
|
|
378
|
+
"type": "button",
|
|
379
|
+
"tabindex": "-1",
|
|
380
|
+
"aria-label": "${state.stepUpLabel}",
|
|
381
|
+
"disabled": {
|
|
382
|
+
"$ref": "#/state/disabled"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"onclick": {
|
|
386
|
+
"$ref": "#/state/onStepUp"
|
|
387
|
+
},
|
|
388
|
+
"onpointerdown": {
|
|
389
|
+
"$ref": "#/state/onStepperPointerDown"
|
|
390
|
+
},
|
|
391
|
+
"children": [
|
|
392
|
+
{
|
|
393
|
+
"tagName": "jx-icon",
|
|
394
|
+
"$props": {
|
|
395
|
+
"name": "caret-up",
|
|
396
|
+
"weight": "bold"
|
|
397
|
+
},
|
|
398
|
+
"attributes": {
|
|
399
|
+
"part": "step-up-icon"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
]
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"tagName": "button",
|
|
406
|
+
"attributes": {
|
|
407
|
+
"part": "step-down",
|
|
408
|
+
"type": "button",
|
|
409
|
+
"tabindex": "-1",
|
|
410
|
+
"aria-label": "${state.stepDownLabel}",
|
|
411
|
+
"disabled": {
|
|
412
|
+
"$ref": "#/state/disabled"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"onclick": {
|
|
416
|
+
"$ref": "#/state/onStepDown"
|
|
417
|
+
},
|
|
418
|
+
"onpointerdown": {
|
|
419
|
+
"$ref": "#/state/onStepperPointerDown"
|
|
420
|
+
},
|
|
421
|
+
"children": [
|
|
422
|
+
{
|
|
423
|
+
"tagName": "jx-icon",
|
|
424
|
+
"$props": {
|
|
425
|
+
"name": "caret-down",
|
|
426
|
+
"weight": "bold"
|
|
427
|
+
},
|
|
428
|
+
"attributes": {
|
|
429
|
+
"part": "step-down-icon"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
}
|