jsl-ui 10.4.4 → 10.4.5

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 (94) hide show
  1. package/docs/AutoSuggestComponent.md +17 -17
  2. package/docs/ButtonComponent.md +22 -22
  3. package/docs/CheckBoxComponent.md +12 -12
  4. package/docs/DataBinding.md +19 -19
  5. package/docs/DateComponent.md +12 -12
  6. package/docs/DateRangeComponent.md +13 -13
  7. package/docs/DateTimeComponent.md +14 -14
  8. package/docs/DialogComponent.md +15 -15
  9. package/docs/DropdownMenuComponent.md +22 -22
  10. package/docs/ExpanderComponent.md +13 -13
  11. package/docs/FormComponent.md +15 -15
  12. package/docs/FormFieldComponent.md +15 -15
  13. package/docs/GridComponent.md +39 -39
  14. package/docs/InputComponent.md +15 -15
  15. package/docs/IntervalComponent.md +13 -13
  16. package/docs/LoadingComponent.md +12 -12
  17. package/docs/NavigationComponent.md +17 -17
  18. package/docs/Notification.md +14 -14
  19. package/docs/NotificationComponent.md +13 -13
  20. package/docs/NumberComponent.md +12 -12
  21. package/docs/OverlayComponent.md +13 -13
  22. package/docs/ProgressComponent.md +12 -12
  23. package/docs/README.md +27 -27
  24. package/docs/RibbonMenuComponent.md +14 -14
  25. package/docs/SelectComponent.md +36 -36
  26. package/docs/SliderComponent.md +20 -20
  27. package/docs/SplitterComponent.md +14 -14
  28. package/docs/StackPanelComponent.md +13 -13
  29. package/docs/TabsComponent.md +16 -16
  30. package/docs/TimeComponent.md +13 -13
  31. package/docs/TreeViewComponent.md +16 -16
  32. package/examples/showcase/checks-and-expanders.ts +148 -148
  33. package/examples/showcase/cultures.ts +39 -39
  34. package/examples/showcase/data-binding.ts +138 -138
  35. package/examples/showcase/dates.ts +168 -168
  36. package/examples/showcase/dialogs.ts +184 -184
  37. package/examples/showcase/dropdown-menus.ts +99 -99
  38. package/examples/showcase/feedback-and-navigation.ts +173 -173
  39. package/examples/showcase/fields.ts +166 -166
  40. package/examples/showcase/fonts/OFL-BricolageGrotesque.txt +93 -93
  41. package/examples/showcase/fonts/OFL-Figtree.txt +93 -93
  42. package/examples/showcase/fonts/OFL-Jost.txt +93 -93
  43. package/examples/showcase/generate-sources.cjs +104 -104
  44. package/examples/showcase/grids.ts +484 -484
  45. package/examples/showcase/index.html +71 -71
  46. package/examples/showcase/layout-and-navigation.ts +46 -46
  47. package/examples/showcase/nivona.css +98 -98
  48. package/examples/showcase/package.json +10 -10
  49. package/examples/showcase/selects.ts +184 -184
  50. package/examples/showcase/showcase-sources.ts +94 -94
  51. package/examples/showcase/showcase.css +281 -281
  52. package/examples/showcase/showcase.ts +244 -244
  53. package/examples/showcase/tabs.ts +161 -161
  54. package/examples/showcase/themes.css +83 -83
  55. package/examples/showcase/themes.ts +56 -56
  56. package/examples/showcase/wirtshans.css +65 -65
  57. package/lib/components/checkbox/CheckBoxStyle.scss +73 -73
  58. package/lib/components/date-range/DateRangeStyle.scss +35 -35
  59. package/lib/components/date-time/DateTimeStyle.scss +9 -9
  60. package/lib/components/dialog/DialogComponent.d.ts +9 -2
  61. package/lib/components/dialog/DialogComponent.js +17 -51
  62. package/lib/components/dropdown-menu/DropdownMenuStyle.scss +48 -48
  63. package/lib/components/expander/ExpanderStyle.scss +61 -61
  64. package/lib/components/form-field/FormFieldStyle.scss +36 -36
  65. package/lib/components/host/RenderHost.d.ts +25 -0
  66. package/lib/components/host/RenderHost.js +63 -0
  67. package/lib/components/loading/LoadingStyle.css +18 -18
  68. package/lib/components/navigation/NavigationStyle.scss +61 -61
  69. package/lib/components/notification/Notification.scss +102 -102
  70. package/lib/components/overlay/OverlayComponent.d.ts +9 -1
  71. package/lib/components/overlay/OverlayComponent.js +22 -13
  72. package/lib/components/overlay/overlay.css +15 -15
  73. package/lib/components/progress/ProgressStyle.scss +4 -4
  74. package/lib/components/ribbon-menu/RibbonMenuStyle.scss +5 -5
  75. package/lib/components/select/SelectStyle.scss +207 -207
  76. package/lib/components/slider/SliderStyle.scss +21 -21
  77. package/lib/components/slider/nouislider.css +15 -15
  78. package/lib/components/stack-panel/SplitterStyle.scss +8 -8
  79. package/lib/components/stack-panel/StackPanelStyle.scss +10 -10
  80. package/lib/components/tabs/TabsStyle.scss +139 -139
  81. package/lib/components/time/TimeComponent.scss +3 -3
  82. package/lib/components/tree-view/TreeViewStyle.scss +14 -14
  83. package/lib/grid/plugins/slick.headermenu.css +98 -98
  84. package/lib/grid.css +841 -3514
  85. package/lib/index.css.map +1 -1
  86. package/lib/index.js.map +1 -1
  87. package/lib/ui/auto.suggest.css +30 -30
  88. package/lib/ui/button.css +147 -147
  89. package/lib/ui/date-input.css +10 -10
  90. package/lib/ui/date.picker/css/tiny-date-picker.css +124 -124
  91. package/lib/ui/dialog.css +144 -144
  92. package/lib/ui/input.css +35 -35
  93. package/lib/ui/theme.css +28 -28
  94. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- # Notification
2
-
3
- ```ts
4
- import { Notification } from "jsl-ui";
5
-
6
- const id = Notification.show({
7
- title: "Saved", content: "Your changes have been saved.",
8
- variant: "success", timeOut: 4000
9
- });
10
- ```
11
-
12
- - `show()` owns the floating stack. Use `clearNotification(id)` for targeted dismissal or `clearAll()` for the whole stack.
13
- - `timeOut` is milliseconds; omitted or zero means persistent. Timed notifications show a countdown that pauses on hover/focus.
14
- - Clicking the body dismisses by default. Set `closeOnClick: false` when the content contains actions.
1
+ # Notification
2
+
3
+ ```ts
4
+ import { Notification } from "jsl-ui";
5
+
6
+ const id = Notification.show({
7
+ title: "Saved", content: "Your changes have been saved.",
8
+ variant: "success", timeOut: 4000
9
+ });
10
+ ```
11
+
12
+ - `show()` owns the floating stack. Use `clearNotification(id)` for targeted dismissal or `clearAll()` for the whole stack.
13
+ - `timeOut` is milliseconds; omitted or zero means persistent. Timed notifications show a countdown that pauses on hover/focus.
14
+ - Clicking the body dismisses by default. Set `closeOnClick: false` when the content contains actions.
@@ -1,13 +1,13 @@
1
- # NotificationComponent
2
-
3
- ```ts
4
- import { NotificationComponent } from "jsl-ui";
5
-
6
- const notice = new NotificationComponent({
7
- title: "Review needed", content: "Check the project settings.",
8
- variant: "warning", closeOnClick: false
9
- });
10
- ```
11
-
12
- - Mount this inline like other components. `dismiss()` hides it; the parent owns removal.
13
- - Automatic dismissal and countdowns require the host provided by [Notification.show()](Notification.md); `timeOut` alone does not start a timer on an inline component.
1
+ # NotificationComponent
2
+
3
+ ```ts
4
+ import { NotificationComponent } from "jsl-ui";
5
+
6
+ const notice = new NotificationComponent({
7
+ title: "Review needed", content: "Check the project settings.",
8
+ variant: "warning", closeOnClick: false
9
+ });
10
+ ```
11
+
12
+ - Mount this inline like other components. `dismiss()` hides it; the parent owns removal.
13
+ - Automatic dismissal and countdowns require the host provided by [Notification.show()](Notification.md); `timeOut` alone does not start a timer on an inline component.
@@ -1,12 +1,12 @@
1
- # NumberComponent
2
-
3
- ```ts
4
- import { NumberComponent } from "jsl-ui";
5
-
6
- const amount = new NumberComponent({
7
- value: 1250.5, format: "#,0.00", ariaLabel: "Amount"
8
- });
9
- ```
10
-
11
- - Format masks use invariant comma/dot syntax; displayed separators and parsing follow the culture helper.
12
- - `getValue()` returns formatted text; use `getValueAsNumber()` for calculations. `setValue()` takes a number and does not raise change callbacks.
1
+ # NumberComponent
2
+
3
+ ```ts
4
+ import { NumberComponent } from "jsl-ui";
5
+
6
+ const amount = new NumberComponent({
7
+ value: 1250.5, format: "#,0.00", ariaLabel: "Amount"
8
+ });
9
+ ```
10
+
11
+ - Format masks use invariant comma/dot syntax; displayed separators and parsing follow the culture helper.
12
+ - `getValue()` returns formatted text; use `getValueAsNumber()` for calculations. `setValue()` takes a number and does not raise change callbacks.
@@ -1,13 +1,13 @@
1
- # OverlayComponent
2
-
3
- ```ts
4
- import { OverlayComponent } from "jsl-ui";
5
-
6
- const panel = OverlayComponent.show({
7
- ariaLabel: "Settings", content: "Application settings", size: "26rem"
8
- });
9
- ```
10
-
11
- - `show()` owns mounting and cleanup; `panel.close()` closes it. The overlay is modal and defaults to a left-side panel.
12
- - It is built on the same fixed-position, z-index based technique as `DialogComponent` (not a native `<dialog>`/top layer), so dropdowns and date pickers appended to `document.body` render above it and stacking with dialogs works.
13
- - Escape and backdrop clicks close by default. Return `false` from `onClose` to veto closing.
1
+ # OverlayComponent
2
+
3
+ ```ts
4
+ import { OverlayComponent } from "jsl-ui";
5
+
6
+ const panel = OverlayComponent.show({
7
+ ariaLabel: "Settings", content: "Application settings", size: "26rem"
8
+ });
9
+ ```
10
+
11
+ - `show()` owns mounting and cleanup; `panel.close()` closes it. The overlay is modal and defaults to a left-side panel.
12
+ - It is built on the same fixed-position, z-index based technique as `DialogComponent` (not a native `<dialog>`/top layer), so dropdowns and date pickers appended to `document.body` render above it and stacking with dialogs works.
13
+ - Escape and backdrop clicks close by default. Return `false` from `onClose` to veto closing.
@@ -1,12 +1,12 @@
1
- # ProgressComponent
2
-
3
- ```ts
4
- import { ProgressComponent } from "jsl-ui";
5
-
6
- const upload = new ProgressComponent(45, {
7
- ariaLabel: "Upload progress", showPercent: true
8
- });
9
- ```
10
-
11
- - Progress uses `0..100`, not `0..1`.
12
- - `setProgress()` changes the value without refreshing. When updating outside renderer-managed events, refresh the owning `jsl-render` view yourself.
1
+ # ProgressComponent
2
+
3
+ ```ts
4
+ import { ProgressComponent } from "jsl-ui";
5
+
6
+ const upload = new ProgressComponent(45, {
7
+ ariaLabel: "Upload progress", showPercent: true
8
+ });
9
+ ```
10
+
11
+ - Progress uses `0..100`, not `0..1`.
12
+ - `setProgress()` changes the value without refreshing. When updating outside renderer-managed events, refresh the owning `jsl-render` view yourself.
package/docs/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # jsl-ui: agent guide
2
-
3
- - Import from the package root, e.g. `import { GridComponent, NumericFormatter } from "jsl-ui"`. Mount components with `jsl-render`; the static `show()` helpers mount themselves.
4
- - Use a browser bundler that handles CSS/SCSS imports. Components import their own styles.
5
- - Theme through `--jsl-color-*` variables on the application or a container; avoid overriding internal markup.
6
- - [Showcase sources](../examples/showcase/) are included as usage references.
7
- - Consult the shipped `lib/**/*.d.ts` files for options; these guides cover usage decisions rather than duplicate interfaces.
8
- - See [Data binding](DataBinding.md) for binding modes, initialization, converters and draft behavior.
9
-
10
- Guides for the public components exported by `jsl-ui`:
11
-
12
- - [ButtonComponent](ButtonComponent.md)
13
- - [InputComponent](InputComponent.md), [NumberComponent](NumberComponent.md), [AutoSuggestComponent](AutoSuggestComponent.md)
14
- - [CheckBoxComponent](CheckBoxComponent.md), [SelectComponent](SelectComponent.md)
15
- - [DateComponent](DateComponent.md), [TimeComponent](TimeComponent.md), [DateTimeComponent](DateTimeComponent.md), [DateRangeComponent](DateRangeComponent.md)
16
- - [FormFieldComponent](FormFieldComponent.md)
17
- - [FormComponent](FormComponent.md)
18
- - [TabsComponent](TabsComponent.md), [ExpanderComponent](ExpanderComponent.md)
19
- - [StackPanelComponent](StackPanelComponent.md), [SplitterComponent](SplitterComponent.md)
20
- - [TreeViewComponent](TreeViewComponent.md), [NavigationComponent](NavigationComponent.md), [RibbonMenuComponent](RibbonMenuComponent.md)
21
- - [DialogComponent](DialogComponent.md), [OverlayComponent](OverlayComponent.md)
22
- - [DropdownMenuComponent](DropdownMenuComponent.md)
23
- - [Notification](Notification.md), [NotificationComponent](NotificationComponent.md)
24
- - [ProgressComponent](ProgressComponent.md), [LoadingComponent](LoadingComponent.md)
25
- - [SliderComponent](SliderComponent.md)
26
- - [GridComponent](GridComponent.md)
27
- - [IntervalComponent](IntervalComponent.md)
1
+ # jsl-ui: agent guide
2
+
3
+ - Import from the package root, e.g. `import { GridComponent, NumericFormatter } from "jsl-ui"`. Mount components with `jsl-render`; the static `show()` helpers mount themselves.
4
+ - Use a browser bundler that handles CSS/SCSS imports. Components import their own styles.
5
+ - Theme through `--jsl-color-*` variables on the application or a container; avoid overriding internal markup.
6
+ - [Showcase sources](../examples/showcase/) are included as usage references.
7
+ - Consult the shipped `lib/**/*.d.ts` files for options; these guides cover usage decisions rather than duplicate interfaces.
8
+ - See [Data binding](DataBinding.md) for binding modes, initialization, converters and draft behavior.
9
+
10
+ Guides for the public components exported by `jsl-ui`:
11
+
12
+ - [ButtonComponent](ButtonComponent.md)
13
+ - [InputComponent](InputComponent.md), [NumberComponent](NumberComponent.md), [AutoSuggestComponent](AutoSuggestComponent.md)
14
+ - [CheckBoxComponent](CheckBoxComponent.md), [SelectComponent](SelectComponent.md)
15
+ - [DateComponent](DateComponent.md), [TimeComponent](TimeComponent.md), [DateTimeComponent](DateTimeComponent.md), [DateRangeComponent](DateRangeComponent.md)
16
+ - [FormFieldComponent](FormFieldComponent.md)
17
+ - [FormComponent](FormComponent.md)
18
+ - [TabsComponent](TabsComponent.md), [ExpanderComponent](ExpanderComponent.md)
19
+ - [StackPanelComponent](StackPanelComponent.md), [SplitterComponent](SplitterComponent.md)
20
+ - [TreeViewComponent](TreeViewComponent.md), [NavigationComponent](NavigationComponent.md), [RibbonMenuComponent](RibbonMenuComponent.md)
21
+ - [DialogComponent](DialogComponent.md), [OverlayComponent](OverlayComponent.md)
22
+ - [DropdownMenuComponent](DropdownMenuComponent.md)
23
+ - [Notification](Notification.md), [NotificationComponent](NotificationComponent.md)
24
+ - [ProgressComponent](ProgressComponent.md), [LoadingComponent](LoadingComponent.md)
25
+ - [SliderComponent](SliderComponent.md)
26
+ - [GridComponent](GridComponent.md)
27
+ - [IntervalComponent](IntervalComponent.md)
@@ -1,14 +1,14 @@
1
- # RibbonMenuComponent
2
-
3
- ```ts
4
- import { ButtonComponent, RibbonMenuComponent } from "jsl-ui";
5
-
6
- const ribbon = new RibbonMenuComponent([
7
- { title: "File", children: [
8
- new ButtonComponent({ content: "Open", type: "button" }),
9
- new ButtonComponent({ content: "Save", type: "button" })
10
- ] }
11
- ]);
12
- ```
13
-
14
- - The ribbon groups controls; commands, toggle state, and enabled state belong to those child controls. Use `type: "button"` for commands inside forms.
1
+ # RibbonMenuComponent
2
+
3
+ ```ts
4
+ import { ButtonComponent, RibbonMenuComponent } from "jsl-ui";
5
+
6
+ const ribbon = new RibbonMenuComponent([
7
+ { title: "File", children: [
8
+ new ButtonComponent({ content: "Open", type: "button" }),
9
+ new ButtonComponent({ content: "Save", type: "button" })
10
+ ] }
11
+ ]);
12
+ ```
13
+
14
+ - The ribbon groups controls; commands, toggle state, and enabled state belong to those child controls. Use `type: "button"` for commands inside forms.
@@ -1,36 +1,36 @@
1
- # SelectComponent
2
-
3
- ```ts
4
- import { SelectComponent } from "jsl-ui";
5
-
6
- const teams = new SelectComponent({
7
- ariaLabel: "Teams", multiple: true,
8
- data: [{ value: "design", text: "Design" }, { value: "engineering", text: "Engineering" }],
9
- value: ["design"]
10
- });
11
- ```
12
-
13
- - `value` / `getValue()` use keys from `keyColumn` (default `"value"`); `getSelected()` returns the matching data objects. Multiple selection uses arrays; single selection uses a scalar.
14
- - Omit `multiple` and use `value: "design"` for single selection with the same data.
15
- - `setValue()` takes keys and updates the binding without raising change callbacks. The component owns its dropdown; do not create `SelectDDAreaComponent` separately.
16
-
17
- ## Search on the server
18
-
19
- For option sets too large to load, let the server search. The dropdown's own search box stays the only search field.
20
-
21
- ```ts
22
- let generation = 0;
23
- const customers = new SelectComponent({
24
- ariaLabel: "Customer", data: [],
25
- onOpen: () => search(""), // optional: load the first batch lazily
26
- onSearch: term => search(term), // after 300 ms without typing; "" when the list reopens
27
- onLoadMore: () => loadMore() // list scrolled near its end
28
- });
29
- ```
30
-
31
- - With `onSearch`, typed text is not matched against `data` and `matchSearch` is ignored. `searchDelay` (default 300) debounces typing.
32
- - Answer with `setData(items, hasMore)` and `setLoading(false)`; call `setLoading(true)` when a request starts. `setData` replaces all options, so for `onLoadMore` pass the items so far plus the new batch. The scroll position is kept.
33
- - `onLoadMore` only fires while the last `setData` reported `hasMore` and the select is not loading, once per batch. Always finish with `setLoading(false)`, also after an error, or no further batch is requested.
34
- - The chosen item stays selected and shown even if later results do not list it; `getSelected()` and `setValue()` still find it. Preselect by passing it in `data` with `value`, or by calling `setData` before `setValue`.
35
- - Discard answers of outdated requests yourself, for example with a counter that grows with every search.
36
- - `loadingText` replaces the "Loading…" hint.
1
+ # SelectComponent
2
+
3
+ ```ts
4
+ import { SelectComponent } from "jsl-ui";
5
+
6
+ const teams = new SelectComponent({
7
+ ariaLabel: "Teams", multiple: true,
8
+ data: [{ value: "design", text: "Design" }, { value: "engineering", text: "Engineering" }],
9
+ value: ["design"]
10
+ });
11
+ ```
12
+
13
+ - `value` / `getValue()` use keys from `keyColumn` (default `"value"`); `getSelected()` returns the matching data objects. Multiple selection uses arrays; single selection uses a scalar.
14
+ - Omit `multiple` and use `value: "design"` for single selection with the same data.
15
+ - `setValue()` takes keys and updates the binding without raising change callbacks. The component owns its dropdown; do not create `SelectDDAreaComponent` separately.
16
+
17
+ ## Search on the server
18
+
19
+ For option sets too large to load, let the server search. The dropdown's own search box stays the only search field.
20
+
21
+ ```ts
22
+ let generation = 0;
23
+ const customers = new SelectComponent({
24
+ ariaLabel: "Customer", data: [],
25
+ onOpen: () => search(""), // optional: load the first batch lazily
26
+ onSearch: term => search(term), // after 300 ms without typing; "" when the list reopens
27
+ onLoadMore: () => loadMore() // list scrolled near its end
28
+ });
29
+ ```
30
+
31
+ - With `onSearch`, typed text is not matched against `data` and `matchSearch` is ignored. `searchDelay` (default 300) debounces typing.
32
+ - Answer with `setData(items, hasMore)` and `setLoading(false)`; call `setLoading(true)` when a request starts. `setData` replaces all options, so for `onLoadMore` pass the items so far plus the new batch. The scroll position is kept.
33
+ - `onLoadMore` only fires while the last `setData` reported `hasMore` and the select is not loading, once per batch. Always finish with `setLoading(false)`, also after an error, or no further batch is requested.
34
+ - The chosen item stays selected and shown even if later results do not list it; `getSelected()` and `setValue()` still find it. Preselect by passing it in `data` with `value`, or by calling `setData` before `setValue`.
35
+ - Discard answers of outdated requests yourself, for example with a counter that grows with every search.
36
+ - `loadingText` replaces the "Loading…" hint.
@@ -1,20 +1,20 @@
1
- # SliderComponent
2
-
3
- ```ts
4
- import { SliderComponent } from "jsl-ui";
5
-
6
- const priceRange = new SliderComponent({
7
- start: [25, 75], connect: true, step: 5,
8
- range: { min: 0, max: 100 },
9
- ariaLabel: ["Minimum price", "Maximum price"],
10
- tooltips: true,
11
- onChange: value => console.log(value)
12
- });
13
- ```
14
-
15
- - `start` accepts one number or an array of handle values. `range` uses noUiSlider's range syntax; other supported noUiSlider 14.6 options can be passed alongside it.
16
- - By default, slider values are formatted and parsed with `numeric.format()` and `numeric.parse()`, using the active culture. Supply noUiSlider's `format` option to override this behavior.
17
- - `getValue()` returns a number for one handle and a numeric array for multiple handles. `setValue(value)` updates silently; pass `true` as the second argument to fire noUiSlider's `set` event.
18
- - `onUpdate`, `onSlide`, `onChange`, `onSet`, `onStart`, and `onEnd` receive `(value, handleIndex, allValues)`. `onUpdate` also runs during initialization; programmatic `setValue` does not trigger `onChange`.
19
- - `ariaLabel` names a single handle. Supply an array to name every handle in a multi-handle slider. `enabled` can be changed with `setEnabled()`.
20
- - `getRef()` returns the underlying noUiSlider instance for advanced use. The component destroys the slider when it is removed. Override `--jsl-slider-track` and `--jsl-slider-connect` to customize its colors.
1
+ # SliderComponent
2
+
3
+ ```ts
4
+ import { SliderComponent } from "jsl-ui";
5
+
6
+ const priceRange = new SliderComponent({
7
+ start: [25, 75], connect: true, step: 5,
8
+ range: { min: 0, max: 100 },
9
+ ariaLabel: ["Minimum price", "Maximum price"],
10
+ tooltips: true,
11
+ onChange: value => console.log(value)
12
+ });
13
+ ```
14
+
15
+ - `start` accepts one number or an array of handle values. `range` uses noUiSlider's range syntax; other supported noUiSlider 14.6 options can be passed alongside it.
16
+ - By default, slider values are formatted and parsed with `numeric.format()` and `numeric.parse()`, using the active culture. Supply noUiSlider's `format` option to override this behavior.
17
+ - `getValue()` returns a number for one handle and a numeric array for multiple handles. `setValue(value)` updates silently; pass `true` as the second argument to fire noUiSlider's `set` event.
18
+ - `onUpdate`, `onSlide`, `onChange`, `onSet`, `onStart`, and `onEnd` receive `(value, handleIndex, allValues)`. `onUpdate` also runs during initialization; programmatic `setValue` does not trigger `onChange`.
19
+ - `ariaLabel` names a single handle. Supply an array to name every handle in a multi-handle slider. `enabled` can be changed with `setEnabled()`.
20
+ - `getRef()` returns the underlying noUiSlider instance for advanced use. The component destroys the slider when it is removed. Override `--jsl-slider-track` and `--jsl-slider-connect` to customize its colors.
@@ -1,14 +1,14 @@
1
- # SplitterComponent
2
-
3
- ```ts
4
- import { SplitterComponent, StackPanelComponent } from "jsl-ui";
5
-
6
- const layout = new StackPanelComponent([
7
- { tag: "div", content: "Sidebar" },
8
- new SplitterComponent({ minSizesInPX: [120, 180], ariaLabel: "Resize sidebar" }),
9
- { tag: "div", content: "Main content" }
10
- ], { sizes: ["40%", undefined, "*"], style: "height:20rem" });
11
- ```
12
-
13
- - Place directly between two panels in a `StackPanelComponent`; orientation comes from the stack. Leave its entry in `sizes` undefined.
14
- - Min/max arrays refer to the preceding and following panel. `onResizeDone` receives the preceding panel's size, including height for a vertical stack.
1
+ # SplitterComponent
2
+
3
+ ```ts
4
+ import { SplitterComponent, StackPanelComponent } from "jsl-ui";
5
+
6
+ const layout = new StackPanelComponent([
7
+ { tag: "div", content: "Sidebar" },
8
+ new SplitterComponent({ minSizesInPX: [120, 180], ariaLabel: "Resize sidebar" }),
9
+ { tag: "div", content: "Main content" }
10
+ ], { sizes: ["40%", undefined, "*"], style: "height:20rem" });
11
+ ```
12
+
13
+ - Place directly between two panels in a `StackPanelComponent`; orientation comes from the stack. Leave its entry in `sizes` undefined.
14
+ - Min/max arrays refer to the preceding and following panel. `onResizeDone` receives the preceding panel's size, including height for a vertical stack.
@@ -1,13 +1,13 @@
1
- # StackPanelComponent
2
-
3
- ```ts
4
- import { StackPanelComponent } from "jsl-ui";
5
-
6
- const layout = new StackPanelComponent([
7
- { tag: "div", content: "Sidebar" },
8
- { tag: "div", content: "Main content" }
9
- ], { sizes: ["12rem", "*"] });
10
- ```
11
-
12
- - Children get layout wrappers; `"*"` fills remaining space. Size indices match the children array, including any [SplitterComponent](SplitterComponent.md).
13
- - `responsive: true` stacks horizontal panels and hides splitters on narrow screens. Give vertical layouts a definite height when distributing available height.
1
+ # StackPanelComponent
2
+
3
+ ```ts
4
+ import { StackPanelComponent } from "jsl-ui";
5
+
6
+ const layout = new StackPanelComponent([
7
+ { tag: "div", content: "Sidebar" },
8
+ { tag: "div", content: "Main content" }
9
+ ], { sizes: ["12rem", "*"] });
10
+ ```
11
+
12
+ - Children get layout wrappers; `"*"` fills remaining space. Size indices match the children array, including any [SplitterComponent](SplitterComponent.md).
13
+ - `responsive: true` stacks horizontal panels and hides splitters on narrow screens. Give vertical layouts a definite height when distributing available height.
@@ -1,16 +1,16 @@
1
- # TabsComponent
2
-
3
- ```ts
4
- import { TabsComponent } from "jsl-ui";
5
-
6
- const tabs = new TabsComponent({
7
- preserveContent: true,
8
- tabs: [
9
- { header: "Overview", content: "Project overview" },
10
- { header: "Details", onCreate: () => "Project details" }
11
- ]
12
- });
13
- ```
14
-
15
- - `onCreate` lazily supplies content on first activation. `preserveContent: true` keeps visited panels mounted; by default inactive panels are removed.
16
- - `onSelect` and `onClosing` can return `false` to veto user actions. `SetSelectedTab(index)` changes selection without calling `onSelect`.
1
+ # TabsComponent
2
+
3
+ ```ts
4
+ import { TabsComponent } from "jsl-ui";
5
+
6
+ const tabs = new TabsComponent({
7
+ preserveContent: true,
8
+ tabs: [
9
+ { header: "Overview", content: "Project overview" },
10
+ { header: "Details", onCreate: () => "Project details" }
11
+ ]
12
+ });
13
+ ```
14
+
15
+ - `onCreate` lazily supplies content on first activation. `preserveContent: true` keeps visited panels mounted; by default inactive panels are removed.
16
+ - `onSelect` and `onClosing` can return `false` to veto user actions. `SetSelectedTab(index)` changes selection without calling `onSelect`.
@@ -1,13 +1,13 @@
1
- # TimeComponent
2
-
3
- ```ts
4
- import { TimeComponent } from "jsl-ui";
5
-
6
- const time = new TimeComponent({
7
- value: new Date(2026, 9, 23, 9, 30), ariaLabel: "Start time"
8
- });
9
- const start = time.getValueAsDate(new Date(2026, 9, 23));
10
- ```
11
-
12
- - `getValueAsDate(datePart)` combines the edited time with the supplied calendar date; invalid input returns `null`. `getValue()` returns text.
13
- - Use `inputMode: "HourMinuteSecond"` to include seconds. `setValue()` takes a `Date` without raising change callbacks.
1
+ # TimeComponent
2
+
3
+ ```ts
4
+ import { TimeComponent } from "jsl-ui";
5
+
6
+ const time = new TimeComponent({
7
+ value: new Date(2026, 9, 23, 9, 30), ariaLabel: "Start time"
8
+ });
9
+ const start = time.getValueAsDate(new Date(2026, 9, 23));
10
+ ```
11
+
12
+ - `getValueAsDate(datePart)` combines the edited time with the supplied calendar date; invalid input returns `null`. `getValue()` returns text.
13
+ - Use `inputMode: "HourMinuteSecond"` to include seconds. `setValue()` takes a `Date` without raising change callbacks.
@@ -1,16 +1,16 @@
1
- # TreeViewComponent
2
-
3
- ```ts
4
- import { TreeViewComponent } from "jsl-ui";
5
-
6
- const tree = new TreeViewComponent({
7
- ariaLabel: "Project files",
8
- data: { id: "project", content: "Project", children: [
9
- { id: "notes", content: "Notes" },
10
- { id: "assets", content: "Assets" }
11
- ] }
12
- });
13
- ```
14
-
15
- - `data` is one root node, not an array; node IDs must be unique within the tree.
16
- - Branch activation selects the node and changes its `collapsed` property in the supplied data. Keep that data stable to preserve expansion state.
1
+ # TreeViewComponent
2
+
3
+ ```ts
4
+ import { TreeViewComponent } from "jsl-ui";
5
+
6
+ const tree = new TreeViewComponent({
7
+ ariaLabel: "Project files",
8
+ data: { id: "project", content: "Project", children: [
9
+ { id: "notes", content: "Notes" },
10
+ { id: "assets", content: "Assets" }
11
+ ] }
12
+ });
13
+ ```
14
+
15
+ - `data` is one root node, not an array; node IDs must be unique within the tree.
16
+ - Branch activation selects the node and changes its `collapsed` property in the supplied data. Keep that data stable to preserve expansion state.