@jxsuite/ui 0.0.0 → 0.1.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.
Files changed (105) hide show
  1. package/components/jx-accordion-item.json +281 -0
  2. package/components/jx-accordion.json +33 -0
  3. package/components/jx-action-button.json +261 -33
  4. package/components/jx-action-group.json +123 -0
  5. package/components/jx-button.json +133 -25
  6. package/components/jx-checkbox.json +215 -0
  7. package/components/jx-color-area.json +263 -0
  8. package/components/jx-color-field.json +565 -0
  9. package/components/jx-color-slider.json +216 -0
  10. package/components/jx-combobox.json +544 -0
  11. package/components/jx-dialog.json +416 -0
  12. package/components/jx-divider.json +52 -0
  13. package/components/jx-dot.json +38 -0
  14. package/components/jx-field.json +162 -0
  15. package/components/jx-kbd.json +24 -0
  16. package/components/jx-listbox.json +76 -0
  17. package/components/jx-menu-item.json +5 -12
  18. package/components/jx-menu.json +45 -6
  19. package/components/jx-number-field.json +441 -0
  20. package/components/jx-option.json +350 -0
  21. package/components/jx-popover.json +227 -0
  22. package/components/jx-select.json +637 -0
  23. package/components/jx-spinner.json +129 -0
  24. package/components/jx-split.json +221 -0
  25. package/components/jx-swatch-group.json +107 -0
  26. package/components/jx-swatch.json +262 -0
  27. package/components/jx-switch.json +253 -0
  28. package/components/jx-tab-panel.json +58 -0
  29. package/components/jx-tab.json +296 -0
  30. package/components/jx-tabs.json +124 -0
  31. package/components/jx-textfield.json +639 -0
  32. package/components/jx-toast-host.json +121 -0
  33. package/components/jx-toast.json +255 -0
  34. package/components/jx-toolbar.json +81 -0
  35. package/components/jx-tooltip.json +207 -0
  36. package/components/jx-tree-item.json +325 -0
  37. package/components/jx-tree.json +202 -0
  38. package/icons/list.json +4 -0
  39. package/icons/manifest.json +12 -0
  40. package/package.json +27 -5
  41. package/project.json +164 -153
  42. package/src/behaviors/action-group.ts +255 -0
  43. package/src/behaviors/color-area.ts +303 -0
  44. package/src/behaviors/color-field.ts +465 -0
  45. package/src/behaviors/color-slider.ts +154 -0
  46. package/src/behaviors/combobox.ts +474 -0
  47. package/src/behaviors/dialog.ts +137 -0
  48. package/src/behaviors/listbox.ts +118 -0
  49. package/src/behaviors/menu.ts +80 -48
  50. package/src/behaviors/number-field.ts +161 -0
  51. package/src/behaviors/popover.ts +399 -0
  52. package/src/behaviors/select.ts +154 -0
  53. package/src/behaviors/split.ts +478 -0
  54. package/src/behaviors/swatch-group.ts +297 -0
  55. package/src/behaviors/tabs.ts +319 -0
  56. package/src/behaviors/textfield.ts +164 -0
  57. package/src/behaviors/toast-host.ts +241 -0
  58. package/src/behaviors/toast.ts +261 -0
  59. package/src/behaviors/toolbar.ts +413 -0
  60. package/src/behaviors/tooltip.ts +715 -0
  61. package/src/behaviors/tree.ts +830 -0
  62. package/src/color.ts +433 -0
  63. package/src/documents.ts +91 -1
  64. package/src/index.ts +41 -1
  65. package/src/loaders.ts +47 -0
  66. package/src/testing/anchor-support.ts +28 -0
  67. package/src/testing/popover-shim.ts +39 -6
  68. package/src/theme.ts +30 -6
  69. package/stylebook/jx-accordion-item.json +195 -0
  70. package/stylebook/jx-accordion.json +220 -0
  71. package/stylebook/jx-action-button.json +191 -23
  72. package/stylebook/jx-action-group.json +335 -0
  73. package/stylebook/jx-button.json +129 -26
  74. package/stylebook/jx-checkbox.json +245 -0
  75. package/stylebook/jx-color-area.json +272 -0
  76. package/stylebook/jx-color-field.json +261 -0
  77. package/stylebook/jx-color-slider.json +220 -0
  78. package/stylebook/jx-combobox.json +332 -0
  79. package/stylebook/jx-dialog.json +186 -0
  80. package/stylebook/jx-divider.json +125 -0
  81. package/stylebook/jx-dot.json +92 -0
  82. package/stylebook/jx-field.json +313 -0
  83. package/stylebook/jx-icon.json +4 -0
  84. package/stylebook/jx-kbd.json +90 -0
  85. package/stylebook/jx-listbox.json +337 -0
  86. package/stylebook/jx-menu.json +0 -1
  87. package/stylebook/jx-number-field.json +203 -0
  88. package/stylebook/jx-option.json +285 -0
  89. package/stylebook/jx-popover.json +123 -0
  90. package/stylebook/jx-select.json +407 -0
  91. package/stylebook/jx-spinner.json +111 -0
  92. package/stylebook/jx-split.json +170 -0
  93. package/stylebook/jx-swatch-group.json +175 -0
  94. package/stylebook/jx-swatch.json +249 -0
  95. package/stylebook/jx-switch.json +240 -0
  96. package/stylebook/jx-tab-panel.json +147 -0
  97. package/stylebook/jx-tab.json +201 -0
  98. package/stylebook/jx-tabs.json +278 -0
  99. package/stylebook/jx-textfield.json +309 -0
  100. package/stylebook/jx-toast-host.json +157 -0
  101. package/stylebook/jx-toast.json +266 -0
  102. package/stylebook/jx-toolbar.json +435 -0
  103. package/stylebook/jx-tooltip.json +162 -0
  104. package/stylebook/jx-tree-item.json +258 -0
  105. package/stylebook/jx-tree.json +429 -0
@@ -0,0 +1,407 @@
1
+ {
2
+ "$schema": "https://jxsuite.com/schema/v1",
3
+ "$id": "StylebookSelect",
4
+ "tagName": "main",
5
+ "$elements": [
6
+ {
7
+ "$ref": "../components/jx-field.json"
8
+ },
9
+ {
10
+ "$ref": "../components/jx-select.json"
11
+ }
12
+ ],
13
+ "state": {
14
+ "face": "\"Courier New\", monospace",
15
+ "swatch": "danger",
16
+ "faces": [
17
+ {
18
+ "id": "project",
19
+ "label": "This project",
20
+ "rows": [
21
+ {
22
+ "face": "Georgia, serif",
23
+ "label": "Georgia",
24
+ "value": "Georgia, serif"
25
+ },
26
+ {
27
+ "face": "\"Courier New\", monospace",
28
+ "label": "Courier New",
29
+ "value": "\"Courier New\", monospace"
30
+ },
31
+ {
32
+ "face": "\"Times New Roman\", serif",
33
+ "label": "Times New Roman",
34
+ "value": "\"Times New Roman\", serif"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "id": "generic",
40
+ "label": "Generic",
41
+ "rows": [
42
+ {
43
+ "description": "system",
44
+ "face": "system-ui",
45
+ "label": "system-ui",
46
+ "value": "system-ui"
47
+ },
48
+ {
49
+ "face": "serif",
50
+ "label": "serif",
51
+ "value": "serif"
52
+ },
53
+ {
54
+ "face": "monospace",
55
+ "label": "monospace",
56
+ "value": "monospace"
57
+ },
58
+ {
59
+ "disabled": true,
60
+ "face": "fantasy",
61
+ "label": "fantasy",
62
+ "value": "fantasy"
63
+ }
64
+ ]
65
+ }
66
+ ],
67
+ "swatches": [
68
+ {
69
+ "label": "Danger",
70
+ "swatch": "var(--jx-danger)",
71
+ "value": "danger"
72
+ },
73
+ {
74
+ "label": "Success",
75
+ "swatch": "var(--jx-success)",
76
+ "value": "success"
77
+ },
78
+ {
79
+ "label": "Warning",
80
+ "swatch": "var(--jx-warning)",
81
+ "value": "warning"
82
+ },
83
+ {
84
+ "label": "Accent",
85
+ "swatch": "var(--jx-accent)",
86
+ "value": "accent"
87
+ }
88
+ ],
89
+ "lines": [
90
+ {
91
+ "label": "Solid",
92
+ "line": "solid",
93
+ "value": "solid"
94
+ },
95
+ {
96
+ "label": "Dashed",
97
+ "line": "dashed",
98
+ "value": "dashed"
99
+ },
100
+ {
101
+ "label": "Dotted",
102
+ "line": "dotted",
103
+ "value": "dotted"
104
+ },
105
+ {
106
+ "label": "Double",
107
+ "line": "double",
108
+ "value": "double"
109
+ }
110
+ ],
111
+ "note": {
112
+ "$prototype": "Function",
113
+ "body": [
114
+ {
115
+ "operator": "=",
116
+ "target": {
117
+ "$ref": "#/state/face"
118
+ },
119
+ "value": {
120
+ "$ref": "event#/target/value"
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ },
126
+ "style": {
127
+ "fontFamily": "var(--jx-font-sans)",
128
+ "fontSize": "var(--jx-text-md)",
129
+ "color": "var(--jx-fg)",
130
+ "background": "var(--jx-bg)",
131
+ "padding": "var(--jx-space-6)",
132
+ "minHeight": "100vh",
133
+ "& > h1": {
134
+ "fontSize": "var(--jx-text-lg)",
135
+ "fontWeight": "600",
136
+ "margin": "0 0 var(--jx-space-5)"
137
+ },
138
+ "& > h2": {
139
+ "fontSize": "var(--jx-text-md)",
140
+ "fontWeight": "600",
141
+ "margin": "var(--jx-space-6) 0 var(--jx-space-3)"
142
+ },
143
+ "& > p": {
144
+ "color": "var(--jx-fg-dim)",
145
+ "margin": "0 0 var(--jx-space-5)"
146
+ },
147
+ "& [role=\"group\"]": {
148
+ "display": "flex",
149
+ "alignItems": "flex-start",
150
+ "flexWrap": "wrap",
151
+ "gap": "var(--jx-space-3)",
152
+ "margin": "0 0 var(--jx-space-4)"
153
+ },
154
+ "& [role=\"group\"] > span": {
155
+ "width": "160px",
156
+ "color": "var(--jx-fg-muted)",
157
+ "fontSize": "var(--jx-text-sm)"
158
+ }
159
+ },
160
+ "children": [
161
+ {
162
+ "tagName": "h1",
163
+ "textContent": "jx-select"
164
+ },
165
+ {
166
+ "tagName": "p",
167
+ "textContent": "A native select with appearance: base-select. The platform brings typeahead, the arrow keys, disabled-row skipping, form participation and the top-layer picker; the document brings the rows, their faces, their swatches and the heading that delimits one group from the next."
168
+ },
169
+ {
170
+ "tagName": "h2",
171
+ "textContent": "A font picker, grouped"
172
+ },
173
+ {
174
+ "tagName": "p",
175
+ "textContent": "Each row draws in its own face, in the picker and in the closed trigger. The legend inside each optgroup is what draws the heading; the optgroup's own label is what names the group to a reader."
176
+ },
177
+ {
178
+ "tagName": "div",
179
+ "attributes": {
180
+ "role": "group",
181
+ "aria-label": "Bound value"
182
+ },
183
+ "children": [
184
+ {
185
+ "tagName": "jx-select",
186
+ "$props": {
187
+ "label": "Font",
188
+ "groups": {
189
+ "$ref": "#/state/faces"
190
+ },
191
+ "value": {
192
+ "$ref": "#/state/face"
193
+ }
194
+ },
195
+ "onchange": {
196
+ "$ref": "#/state/note"
197
+ }
198
+ },
199
+ {
200
+ "tagName": "span",
201
+ "textContent": "${state.face}"
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "tagName": "h2",
207
+ "textContent": "Swatches, rules, and a row that is only a value"
208
+ },
209
+ {
210
+ "tagName": "div",
211
+ "attributes": {
212
+ "role": "group",
213
+ "aria-label": "Drawing channels"
214
+ },
215
+ "children": [
216
+ {
217
+ "tagName": "jx-select",
218
+ "$props": {
219
+ "label": "Colour",
220
+ "options": {
221
+ "$ref": "#/state/swatches"
222
+ },
223
+ "value": {
224
+ "$ref": "#/state/swatch"
225
+ }
226
+ }
227
+ },
228
+ {
229
+ "tagName": "jx-select",
230
+ "$props": {
231
+ "label": "Border style",
232
+ "options": {
233
+ "$ref": "#/state/lines"
234
+ },
235
+ "value": "dashed"
236
+ }
237
+ },
238
+ {
239
+ "tagName": "jx-select",
240
+ "$props": {
241
+ "label": "Unlisted value",
242
+ "options": {
243
+ "$ref": "#/state/lines"
244
+ },
245
+ "value": "groove",
246
+ "help": "groove is in no row, so the element stands one in rather than falling silently to the first."
247
+ }
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "tagName": "h2",
253
+ "textContent": "Static rows, from the call site"
254
+ },
255
+ {
256
+ "tagName": "p",
257
+ "textContent": "The default slot takes native option and optgroup elements. Slotted rows are distributed once, at mount, which is why the data path above exists. The first row's value is the empty string: a real, arrow-reachable choice that means inherit, not a placeholder."
258
+ },
259
+ {
260
+ "tagName": "div",
261
+ "attributes": {
262
+ "role": "group",
263
+ "aria-label": "Slotted"
264
+ },
265
+ "children": [
266
+ {
267
+ "tagName": "jx-select",
268
+ "$props": {
269
+ "label": "Alignment"
270
+ },
271
+ "children": [
272
+ {
273
+ "tagName": "option",
274
+ "attributes": {
275
+ "value": ""
276
+ },
277
+ "textContent": "Inherit"
278
+ },
279
+ {
280
+ "tagName": "option",
281
+ "attributes": {
282
+ "value": "start"
283
+ },
284
+ "textContent": "Start"
285
+ },
286
+ {
287
+ "tagName": "option",
288
+ "attributes": {
289
+ "value": "center"
290
+ },
291
+ "textContent": "Center"
292
+ },
293
+ {
294
+ "tagName": "option",
295
+ "attributes": {
296
+ "value": "end"
297
+ },
298
+ "textContent": "End"
299
+ }
300
+ ]
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "tagName": "h2",
306
+ "textContent": "Sizes and states"
307
+ },
308
+ {
309
+ "tagName": "div",
310
+ "attributes": {
311
+ "role": "group",
312
+ "aria-label": "Sizes"
313
+ },
314
+ "children": [
315
+ {
316
+ "tagName": "jx-select",
317
+ "$props": {
318
+ "label": "Small",
319
+ "size": "sm",
320
+ "options": {
321
+ "$ref": "#/state/lines"
322
+ },
323
+ "value": "solid"
324
+ }
325
+ },
326
+ {
327
+ "tagName": "jx-select",
328
+ "$props": {
329
+ "label": "Medium",
330
+ "options": {
331
+ "$ref": "#/state/lines"
332
+ },
333
+ "value": "solid"
334
+ }
335
+ },
336
+ {
337
+ "tagName": "jx-select",
338
+ "$props": {
339
+ "label": "Large",
340
+ "size": "lg",
341
+ "options": {
342
+ "$ref": "#/state/lines"
343
+ },
344
+ "value": "solid"
345
+ }
346
+ }
347
+ ]
348
+ },
349
+ {
350
+ "tagName": "div",
351
+ "attributes": {
352
+ "role": "group",
353
+ "aria-label": "States"
354
+ },
355
+ "children": [
356
+ {
357
+ "tagName": "jx-select",
358
+ "$props": {
359
+ "label": "Refused",
360
+ "invalid": true,
361
+ "error": "Pick a font this project ships.",
362
+ "options": {
363
+ "$ref": "#/state/lines"
364
+ },
365
+ "value": "dotted"
366
+ }
367
+ },
368
+ {
369
+ "tagName": "jx-select",
370
+ "$props": {
371
+ "label": "Disabled",
372
+ "disabled": true,
373
+ "options": {
374
+ "$ref": "#/state/lines"
375
+ },
376
+ "value": "solid"
377
+ }
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ "tagName": "h2",
383
+ "textContent": "In a field row"
384
+ },
385
+ {
386
+ "tagName": "jx-field",
387
+ "$props": {
388
+ "label": "Heading font",
389
+ "description": "Used for every heading in this layout."
390
+ },
391
+ "attributes": {
392
+ "data-prop": "headingFont"
393
+ },
394
+ "children": [
395
+ {
396
+ "tagName": "jx-select",
397
+ "$props": {
398
+ "groups": {
399
+ "$ref": "#/state/faces"
400
+ },
401
+ "value": "system-ui"
402
+ }
403
+ }
404
+ ]
405
+ }
406
+ ]
407
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://jxsuite.com/schema/v1",
3
+ "$id": "StylebookSpinner",
4
+ "tagName": "main",
5
+ "$elements": [
6
+ { "$ref": "../components/jx-icon.json" },
7
+ { "$ref": "../components/jx-spinner.json" },
8
+ { "$ref": "../components/jx-button.json" },
9
+ { "$ref": "../components/jx-action-button.json" }
10
+ ],
11
+ "state": {
12
+ "steps": ["0", "25", "60", "100"]
13
+ },
14
+ "style": {
15
+ "fontFamily": "var(--jx-font-sans)",
16
+ "fontSize": "var(--jx-text-md)",
17
+ "color": "var(--jx-fg)",
18
+ "background": "var(--jx-bg)",
19
+ "padding": "var(--jx-space-6)",
20
+ "minHeight": "100vh",
21
+ "& > h1": {
22
+ "fontSize": "var(--jx-text-lg)",
23
+ "fontWeight": "600",
24
+ "margin": "0 0 var(--jx-space-5)"
25
+ },
26
+ "& > p": { "color": "var(--jx-fg-dim)", "margin": "0 0 var(--jx-space-5)" },
27
+ "& [role=\"group\"]": {
28
+ "display": "flex",
29
+ "alignItems": "center",
30
+ "gap": "var(--jx-space-3)",
31
+ "margin": "0 0 var(--jx-space-4)"
32
+ },
33
+ "& [role=\"group\"] > span": {
34
+ "width": "120px",
35
+ "color": "var(--jx-fg-muted)",
36
+ "fontSize": "var(--jx-text-sm)"
37
+ }
38
+ },
39
+ "children": [
40
+ { "tagName": "h1", "textContent": "jx-spinner" },
41
+ {
42
+ "tagName": "p",
43
+ "textContent": "A busy ring. Empty value is indeterminate and spins; a value fills the ring instead. Reduced motion slows the rotation rather than stopping it, because a frozen spinner reads as a hang. It paints in the text colour around it, so it stays visible on a filled button; --jx-spin-color and --jx-spin-track-color are the override."
44
+ },
45
+ {
46
+ "tagName": "div",
47
+ "attributes": { "role": "group", "aria-label": "Indeterminate sizes" },
48
+ "children": [
49
+ { "tagName": "span", "textContent": "indeterminate" },
50
+ { "tagName": "jx-spinner", "$props": { "size": "sm", "label": "Loading" } },
51
+ { "tagName": "jx-spinner", "$props": { "label": "Loading" } },
52
+ { "tagName": "jx-spinner", "$props": { "size": "lg", "label": "Loading" } }
53
+ ]
54
+ },
55
+ {
56
+ "tagName": "div",
57
+ "attributes": { "role": "group", "aria-label": "Determinate values" },
58
+ "children": [
59
+ { "tagName": "span", "textContent": "determinate" },
60
+ {
61
+ "$prototype": "Array",
62
+ "items": { "$ref": "#/state/steps" },
63
+ "key": { "$ref": "$map/item" },
64
+ "map": {
65
+ "tagName": "jx-spinner",
66
+ "$props": {
67
+ "value": { "$ref": "$map/item" },
68
+ "label": "Importing"
69
+ }
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "tagName": "div",
76
+ "attributes": { "role": "group", "aria-label": "Overridden colours" },
77
+ "children": [
78
+ { "tagName": "span", "textContent": "recoloured" },
79
+ {
80
+ "tagName": "jx-spinner",
81
+ "style": { "--jx-spin-color": "var(--jx-accent)" },
82
+ "$props": { "label": "Loading" }
83
+ },
84
+ {
85
+ "tagName": "jx-spinner",
86
+ "style": {
87
+ "--jx-spin-color": "var(--jx-danger)",
88
+ "--jx-spin-track-color": "var(--jx-border-strong)"
89
+ },
90
+ "$props": { "value": "70", "label": "Importing" }
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "tagName": "div",
96
+ "attributes": { "role": "group", "aria-label": "Buttons that are working" },
97
+ "children": [
98
+ { "tagName": "span", "textContent": "in a button" },
99
+ {
100
+ "tagName": "jx-button",
101
+ "$props": { "loading": true, "variant": "accent" },
102
+ "children": [{ "tagName": "span", "textContent": "Saving" }]
103
+ },
104
+ {
105
+ "tagName": "jx-action-button",
106
+ "$props": { "icon": "arrows-clockwise", "label": "Refresh", "loading": true }
107
+ }
108
+ ]
109
+ }
110
+ ]
111
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://jxsuite.com/schema/v1",
3
+ "$id": "StylebookSplit",
4
+ "tagName": "main",
5
+ "$elements": [{ "$ref": "../components/jx-split.json" }],
6
+ "state": {
7
+ "columns": 0.5,
8
+ "rows": 0.6,
9
+ "onColumns": {
10
+ "$prototype": "Function",
11
+ "body": [
12
+ {
13
+ "operator": "=",
14
+ "target": { "$ref": "#/state/columns" },
15
+ "value": { "$ref": "event#/target/value" }
16
+ }
17
+ ]
18
+ },
19
+ "onRows": {
20
+ "$prototype": "Function",
21
+ "body": [
22
+ {
23
+ "operator": "=",
24
+ "target": { "$ref": "#/state/rows" },
25
+ "value": { "$ref": "event#/target/value" }
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "style": {
31
+ "fontFamily": "var(--jx-font-sans)",
32
+ "fontSize": "var(--jx-text-md)",
33
+ "color": "var(--jx-fg)",
34
+ "background": "var(--jx-bg)",
35
+ "padding": "var(--jx-space-6)",
36
+ "minHeight": "100vh",
37
+ "& > h1": {
38
+ "fontSize": "var(--jx-text-lg)",
39
+ "fontWeight": "600",
40
+ "margin": "0 0 var(--jx-space-5)"
41
+ },
42
+ "& > h2": {
43
+ "fontSize": "var(--jx-text-md)",
44
+ "fontWeight": "600",
45
+ "margin": "var(--jx-space-6) 0 var(--jx-space-3)"
46
+ },
47
+ "& > p": { "color": "var(--jx-fg-dim)", "margin": "0 0 var(--jx-space-5)" },
48
+ "& [data-columns]": {
49
+ "display": "grid",
50
+ "gridTemplateColumns": "minmax(0, ${state.columns}fr) auto minmax(0, ${1 - state.columns}fr)",
51
+ "height": "180px",
52
+ "width": "min(640px, 100%)",
53
+ "border": "1px solid var(--jx-border)",
54
+ "borderRadius": "var(--jx-radius-sm)",
55
+ "overflow": "hidden",
56
+ "background": "var(--jx-bg-panel)"
57
+ },
58
+ "& [data-rows]": {
59
+ "display": "grid",
60
+ "gridTemplateRows": "minmax(0, ${state.rows}fr) auto minmax(0, ${1 - state.rows}fr)",
61
+ "height": "240px",
62
+ "width": "min(320px, 100%)",
63
+ "border": "1px solid var(--jx-border)",
64
+ "borderRadius": "var(--jx-radius-sm)",
65
+ "overflow": "hidden",
66
+ "background": "var(--jx-bg-panel)"
67
+ },
68
+ "& [data-fixed]": {
69
+ "display": "grid",
70
+ "gridTemplateColumns": "minmax(0, 1fr) auto minmax(0, 1fr)",
71
+ "height": "120px",
72
+ "width": "min(640px, 100%)",
73
+ "border": "1px solid var(--jx-border)",
74
+ "borderRadius": "var(--jx-radius-sm)",
75
+ "overflow": "hidden",
76
+ "background": "var(--jx-bg-panel)"
77
+ },
78
+ "& [data-side]": {
79
+ "display": "flex",
80
+ "alignItems": "center",
81
+ "justifyContent": "center",
82
+ "minWidth": "0",
83
+ "minHeight": "0",
84
+ "color": "var(--jx-fg-dim)"
85
+ }
86
+ },
87
+ "children": [
88
+ { "tagName": "h1", "textContent": "jx-split" },
89
+ {
90
+ "tagName": "p",
91
+ "textContent": "A window splitter: role=separator, a real tab stop, and a value that is the leading side's share of the box it divides. It measures that box itself at the start of every gesture, so the gap floor below is honoured in pixels while the value it stores stays a fraction — the same layout survives a window resize with no listener anywhere."
92
+ },
93
+ {
94
+ "tagName": "h2",
95
+ "textContent": "Vertical — the upright line between two side-by-side panes"
96
+ },
97
+ {
98
+ "tagName": "p",
99
+ "textContent": "Drag it, or put the caret on it and press Left and Right. Shift takes the larger step, Home and End go to the ends of its legal range, and Enter collapses the split and restores it. gap=120 keeps 120px on each side however the box is resized."
100
+ },
101
+ {
102
+ "tagName": "div",
103
+ "attributes": { "data-columns": "", "role": "none" },
104
+ "children": [
105
+ { "tagName": "div", "attributes": { "data-side": "" }, "textContent": "Navigator" },
106
+ {
107
+ "tagName": "jx-split",
108
+ "$props": {
109
+ "label": "Navigator and editor",
110
+ "value": { "$ref": "#/state/columns" },
111
+ "min": 0.2,
112
+ "max": 0.8,
113
+ "gap": 120,
114
+ "collapse": 0.5
115
+ },
116
+ "oninput": { "$ref": "#/state/onColumns" }
117
+ },
118
+ { "tagName": "div", "attributes": { "data-side": "" }, "textContent": "Editor" }
119
+ ]
120
+ },
121
+ {
122
+ "tagName": "h2",
123
+ "textContent": "Horizontal — the flat line between a stage and a dock"
124
+ },
125
+ {
126
+ "tagName": "p",
127
+ "textContent": "orientation names the SEPARATOR rather than the axis it moves on, which is ARIA's meaning: a horizontal splitter is the flat line between two stacked boxes, dragged up and down with Up and Down."
128
+ },
129
+ {
130
+ "tagName": "div",
131
+ "attributes": { "data-rows": "", "role": "none" },
132
+ "children": [
133
+ { "tagName": "div", "attributes": { "data-side": "" }, "textContent": "Stage" },
134
+ {
135
+ "tagName": "jx-split",
136
+ "$props": {
137
+ "label": "Stage and console",
138
+ "orientation": "horizontal",
139
+ "value": { "$ref": "#/state/rows" },
140
+ "min": 0.15,
141
+ "max": 0.85,
142
+ "gap": 48
143
+ },
144
+ "oninput": { "$ref": "#/state/onRows" }
145
+ },
146
+ { "tagName": "div", "attributes": { "data-side": "" }, "textContent": "Console" }
147
+ ]
148
+ },
149
+ {
150
+ "tagName": "h2",
151
+ "textContent": "Disabled"
152
+ },
153
+ {
154
+ "tagName": "p",
155
+ "textContent": "A disabled splitter keeps its box and its announcement and drops out of the tab order: a layout a reader cannot explain is worse than one they cannot change."
156
+ },
157
+ {
158
+ "tagName": "div",
159
+ "attributes": { "data-fixed": "", "role": "none" },
160
+ "children": [
161
+ { "tagName": "div", "attributes": { "data-side": "" }, "textContent": "Fixed" },
162
+ {
163
+ "tagName": "jx-split",
164
+ "$props": { "label": "Fixed split", "disabled": true }
165
+ },
166
+ { "tagName": "div", "attributes": { "data-side": "" }, "textContent": "Fixed" }
167
+ ]
168
+ }
169
+ ]
170
+ }