le-kit 0.6.4 → 0.7.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 (2) hide show
  1. package/LLM_CONTEXT.md +242 -2
  2. package/package.json +6 -2
package/LLM_CONTEXT.md CHANGED
@@ -10,6 +10,7 @@ This file is auto-generated and contains documentation for all Le-Kit web compon
10
10
  - [le-box](#le-box)
11
11
  - [le-breadcrumbs](#le-breadcrumbs)
12
12
  - [le-button](#le-button)
13
+ - [le-button-group](#le-button-group)
13
14
  - [le-card](#le-card)
14
15
  - [le-checkbox](#le-checkbox)
15
16
  - [le-code-input](#le-code-input)
@@ -22,11 +23,14 @@ This file is auto-generated and contains documentation for all Le-Kit web compon
22
23
  - [le-header-placeholder](#le-header-placeholder)
23
24
  - [le-icon](#le-icon)
24
25
  - [le-item](#le-item)
26
+ - [le-kit](#le-kit)
25
27
  - [le-multiselect](#le-multiselect)
26
28
  - [le-navigation](#le-navigation)
27
29
  - [le-number-input](#le-number-input)
30
+ - [le-overflow-menu](#le-overflow-menu)
28
31
  - [le-popover](#le-popover)
29
32
  - [le-popup](#le-popup)
33
+ - [le-preview-frame](#le-preview-frame)
30
34
  - [le-round-progress](#le-round-progress)
31
35
  - [le-scroll-progress](#le-scroll-progress)
32
36
  - [le-segmented-control](#le-segmented-control)
@@ -42,7 +46,11 @@ This file is auto-generated and contains documentation for all Le-Kit web compon
42
46
  - [le-tabs](#le-tabs)
43
47
  - [le-tag](#le-tag)
44
48
  - [le-text](#le-text)
49
+ - [le-toolbar](#le-toolbar)
50
+ - [le-toolbar-spacer](#le-toolbar-spacer)
51
+ - [le-tooltip](#le-tooltip)
45
52
  - [le-turntable](#le-turntable)
53
+ - [le-visibility](#le-visibility)
46
54
 
47
55
  ---
48
56
 
@@ -241,17 +249,23 @@ A flexible button component with multiple variants and states.
241
249
  |------|------|---------|-------------|
242
250
  | `el` | `HTMLElement` | | |
243
251
  | `mode` | `'default' \| 'admin' \| undefined` | | Mode of the popover should be 'default' for internal use |
244
- | `variant` | `'solid' \| 'outlined' \| 'clear' \| 'system'` | `'solid'` | Button variant style |
252
+ | `variant` | `'solid' \| 'outlined' \| 'clear' \| 'system'` | `'outlined'` | Button variant style |
245
253
  | `color` | `\| 'primary'
246
254
  \| 'secondary'
247
255
  \| 'success'
248
256
  \| 'warning'
249
257
  \| 'danger'
250
258
  \| 'info'
251
- \| 'transparent'` | `'primary'` | Button color theme (uses theme semantic colors) |
259
+ \| 'transparent' \| undefined` | | Button color theme (uses theme semantic colors) |
252
260
  | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size |
253
261
  | `selected` | `boolean` | `false` | Whether the button is in a selected/active state |
262
+ | `label` | `string \| undefined` | | Optional label for the button, used for accessibility and tooltips when the button is icon-only. |
263
+ | `tooltip` | `string \| undefined` | | Tooltip text to show on hover |
264
+ | `tooltipPosition` | `TooltipPlacement` | `'top'` | Tooltip position around the button |
254
265
  | `fullWidth` | `boolean` | `false` | Whether the button takes full width of its container |
266
+ | `visibility` | `'visible' \| 'collapsing' \| 'collapsed' \| 'expanding'` | `'visible'` | Visibility state used by responsive containers to animate show/hide transitions. |
267
+ | `groupShape` | `'start' \| 'middle' \| 'end' \| 'single'` | `'single'` | Shape of the button when rendered inside grouped containers. |
268
+ | `motionPreset` | `'none' \| 'soft' \| 'fluid' \| 'spring' \| undefined` | | Optional per-instance motion preset override. |
255
269
  | `iconOnly` | `string \| Node \| undefined` | | Icon only button image or emoji if this prop is set, the button will render only the icon slot |
256
270
  | `iconStart` | `string \| Node \| undefined` | | Start icon image or emoji |
257
271
  | `iconEnd` | `string \| Node \| undefined` | | End icon image or emoji |
@@ -286,6 +300,37 @@ A flexible button component with multiple variants and states.
286
300
 
287
301
  ---
288
302
 
303
+ ## <le-button-group>
304
+
305
+ Groups multiple `le-button` elements and optionally collapses low-priority actions
306
+ into an overflow "more" menu.
307
+
308
+ ### Properties
309
+
310
+ | Name | Type | Default | Description |
311
+ |------|------|---------|-------------|
312
+ | `el` | `HTMLElement` | | |
313
+ | `label` | `string \| undefined` | | Optional label used when the whole group is represented as a parent item inside another component's overflow menu. |
314
+ | `collapse` | `boolean \| number \| string \| undefined` | | Collapse mode. - `true`: show only the top-priority button - positive number: show top N buttons - `0`: show only the more button - negative number: hide abs(N) lowest-priority buttons Non-integers are rounded with `Math.round`. |
315
+ | `overflowIcons` | `boolean` | `false` | When true, icons from collapsed buttons are shown in the overflow navigation list. |
316
+ | `disabled` | `boolean` | `false` | Disabled attribute, when the button group is disabled, all buttons inside will be disabled and the overflow menu will not be accessible. |
317
+ | `visibility` | `'visible' \| 'collapsing' \| 'collapsed' \| 'expanding'` | `'visible'` | Visibility state used by responsive containers such as le-toolbar. |
318
+
319
+ ### Events
320
+
321
+ | Event | Type | Description |
322
+ |-------|------|-------------|
323
+ | `leOverflowSelect` | `EventEmitter<{ id: string }>` | |
324
+
325
+ ### Slots
326
+
327
+ | Name | Description |
328
+ |------|-------------|
329
+ | Default | Group button elements (`le-button` children) |
330
+ | `"more"` | Custom icon/content for the overflow trigger button |
331
+
332
+ ---
333
+
289
334
  ## <le-card>
290
335
 
291
336
  A flexible card component with header, content, and footer slots.
@@ -699,6 +744,27 @@ The header component updates that variable when it renders.
699
744
 
700
745
  ---
701
746
 
747
+ ## <le-kit>
748
+
749
+ Optional app-level context orchestrator for theme, appearance, and active state.
750
+
751
+ Components continue to work without this wrapper; `le-kit` is opt-in.
752
+
753
+ ### Properties
754
+
755
+ | Name | Type | Default | Description |
756
+ |------|------|---------|-------------|
757
+ | `el` | `HTMLElement` | | |
758
+ | `theme` | `string` | `'default'` | Current theme scope value. |
759
+ | `appearance` | `string` | `'default'` | Current appearance scope value. |
760
+ | `activeContext` | `LeActiveContext` | `'active'` | Current active context scope value. |
761
+ | `watchWindow` | `boolean` | `true` | Whether this instance reacts to window focus/blur. |
762
+ | `watchModals` | `boolean` | `true` | Whether this instance reacts to descendant modal popup open/close events. |
763
+ | `storageKey` | `string` | `'le-kit'` | Local storage namespace for persisted values. |
764
+ | `persist` | `string` | `'theme appearance'` | Persistence keys as a space-separated list: `all`, `none`, `theme`, `appearance`. |
765
+
766
+ ---
767
+
702
768
  ## <le-multiselect>
703
769
 
704
770
  A multiselect component for selecting multiple options.
@@ -758,6 +824,8 @@ Navigation component with vertical (tree) and horizontal (menu) layouts.
758
824
  | `searchPlaceholder` | `string` | `'Search...'` | Placeholder text for the search input. |
759
825
  | `emptyText` | `string` | `'No results found'` | Text shown when no items match the filter. |
760
826
  | `submenuSearchable` | `boolean` | `false` | Whether submenu popovers should include a filter input. |
827
+ | `activationMode` | `LeNavigationActivationMode` | `'manual'` | Whether keyboard focus only highlights, or also activates immediately. |
828
+ | `togglePosition` | `'start' \| 'end'` | `'start'` | Position of the toggle arrow for items with children: 'start' | 'end' |
761
829
 
762
830
  ### Events
763
831
 
@@ -837,6 +905,32 @@ A number input component with validation, keyboard controls, and custom spinners
837
905
 
838
906
  ---
839
907
 
908
+ ## <le-overflow-menu>
909
+
910
+ ### Properties
911
+
912
+ | Name | Type | Default | Description |
913
+ |------|------|---------|-------------|
914
+ | `open` | `boolean` | `false` | Whether the menu popover is open. |
915
+ | `disabled` | `boolean` | `false` | Disables trigger interactions. |
916
+ | `position` | `'top' \| 'right' \| 'bottom' \| 'left'` | `'bottom'` | Popover position. |
917
+ | `align` | `'start' \| 'center' \| 'end'` | `'end'` | Popover alignment relative to trigger. |
918
+ | `offset` | `number` | `8` | Popover offset in px. |
919
+ | `minWidth` | `string` | `'160px'` | Minimum popover width. |
920
+ | `icon` | `string` | `'ellipsis-horizontal'` | Fallback icon name for trigger. |
921
+ | `triggerAriaLabel` | `string` | `'Open menu'` | Aria label for fallback trigger button. |
922
+ | `triggerPart` | `string` | `'trigger-button'` | Part name for fallback trigger button. |
923
+ | `items` | `LeOverflowMenuItem[] \| string` | `[]` | List of menu items represented as options. |
924
+
925
+ ### Events
926
+
927
+ | Event | Type | Description |
928
+ |-------|------|-------------|
929
+ | `leOverflowMenuItemSelect` | `EventEmitter<LeOverflowMenuItemSelectDetail>` | |
930
+ | `leOverflowMenuClose` | `EventEmitter<void>` | |
931
+
932
+ ---
933
+
840
934
  ## <le-popover>
841
935
 
842
936
  A popover component for displaying floating content.
@@ -925,6 +1019,47 @@ via leAlert(), leConfirm(), lePrompt().
925
1019
 
926
1020
  ---
927
1021
 
1022
+ ## <le-preview-frame>
1023
+
1024
+ A resizable preview frame for showcasing responsive component behavior.
1025
+
1026
+ Wraps any content in a resizable viewport, complete with drag handle,
1027
+ width indicator, and preset device-size buttons. Designed for use in
1028
+ component demos and documentation.
1029
+
1030
+ ### Properties
1031
+
1032
+ | Name | Type | Default | Description |
1033
+ |------|------|---------|-------------|
1034
+ | `el` | `HTMLElement` | | |
1035
+ | `frameWidth` | `number \| undefined` | | Initial inner width of the preview viewport in pixels. Set to 0 or 'auto' to fill the available container width. |
1036
+ | `minWidth` | `number` | `240` | Minimum resizable width in pixels. |
1037
+ | `maxWidth` | `number` | `0` | Maximum resizable width in pixels. 0 = unconstrained. |
1038
+ | `showControls` | `boolean` | `true` | Whether to show the controls bar (breakpoint buttons + width badge). |
1039
+ | `resizable` | `boolean` | `true` | Whether to show drag resize handles. |
1040
+ | `handles` | `LePreviewFrameHandleSide[] \| string` | `'right'` | Which handles are rendered. Accepts "right", "left", "bottom", "left,right", etc. or a JSON string/array. |
1041
+ | `origin` | `LePreviewFrameResizeOrigin` | `'auto'` | Horizontal resize origin strategy. - auto: detects centered layouts and switches to center math - edge: keeps opposite edge fixed (default left-aligned behavior) - center: grows/shrinks from center |
1042
+ | `padding` | `number` | `0` | Extra layout padding to subtract from available container space. Useful when visual page padding is not detectable from the immediate parent. |
1043
+ | `breakpoints` | `LePreviewFrameBreakpoint[] \| string` | `DEFAULT_BREAKPOINTS` | Preset breakpoints shown as buttons. Can be a JSON string or a LePreviewFrameBreakpoint[]. |
1044
+ | `widthUnit` | `string` | `'px'` | Label for the width badge. Set empty to hide the unit suffix. |
1045
+ | `minHeight` | `number` | `64` | Minimum height of the viewport in pixels. |
1046
+ | `maxHeight` | `number` | `0` | Maximum resizable viewport height in pixels. 0 = unconstrained. |
1047
+
1048
+ ### Events
1049
+
1050
+ | Event | Type | Description |
1051
+ |-------|------|-------------|
1052
+ | `lePreviewFrameResize` | `EventEmitter<LePreviewFrameResizeDetail> \| undefined` | Emitted whenever the frame width changes (drag or preset button). |
1053
+
1054
+ ### Slots
1055
+
1056
+ | Name | Description |
1057
+ |------|-------------|
1058
+ | Default | The content to preview |
1059
+ | `"controls"` | Extra content inserted after the preset buttons |
1060
+
1061
+ ---
1062
+
928
1063
  ## <le-round-progress>
929
1064
 
930
1065
  ### Properties
@@ -1498,6 +1633,89 @@ toolbar for bold, italic, links, and paragraph type selection.
1498
1633
 
1499
1634
  ---
1500
1635
 
1636
+ ## <le-toolbar>
1637
+
1638
+ A priority-aware, overflow-safe toolbar component.
1639
+
1640
+ Items are slotted light-DOM children. Each item may carry a
1641
+ `priority` attribute (lower = more important). When there
1642
+ isn't enough space, lower-priority items move to an overflow menu.
1643
+
1644
+ Collapsible `le-button-group` children are asked to reduce their own
1645
+ footprint first before their contents are overflowed entirely.
1646
+
1647
+ ### Properties
1648
+
1649
+ | Name | Type | Default | Description |
1650
+ |------|------|---------|-------------|
1651
+ | `el` | `HTMLElement` | | |
1652
+ | `items` | `unknown \| undefined` | | Optional declarative items input. The current implementation is slot-driven, but when this prop changes we still invalidate the slotted-items cache and recompute layout. |
1653
+ | `alignItems` | `'start' \| 'center' \| 'end' \| 'stretch'` | `'start'` | Alignment of items along the main axis. |
1654
+ | `itemGap` | `string` | `'var(--le-toolbar-gap, var(--le-spacing-1, 4px))'` | Spacing between top-level toolbar items. Accepts any valid CSS length (e.g. `8px`, `0.5rem`, `var(--le-spacing-2)`). |
1655
+ | `overflowIcon` | `string` | `'ellipsis-horizontal'` | Icon for the overflow trigger button when no custom slot content is provided. |
1656
+ | `overflowLabel` | `string` | `'More'` | Accessible label for the overflow trigger button. |
1657
+ | `disablePopover` | `boolean` | `false` | Disable the built-in overflow popover. The toolbar will still compute overflow state and emit events, but won't render its own menu. Useful for custom overflow handling. |
1658
+ | `debugVirtualToolbar` | `boolean` | `false` | Temporary debug mode: render the virtual toolbar visibly above the live toolbar so collapse measurements can be inspected. |
1659
+ | `debugPauseBeforeMeasure` | `boolean` | `false` | Temporary debug mode: stop before measuring virtual widths so the virtual DOM can be inspected before collapse simulation mutates it. |
1660
+
1661
+ ### Events
1662
+
1663
+ | Event | Type | Description |
1664
+ |-------|------|-------------|
1665
+ | `leToolbarOverflowChange` | `EventEmitter<LeToolbarOverflowChangeDetail> \| undefined` | Emitted when the overflow state changes. |
1666
+
1667
+ ### Slots
1668
+
1669
+ | Name | Description |
1670
+ |------|-------------|
1671
+ | Default | Toolbar items |
1672
+ | `"more"` | Custom content for the overflow trigger button |
1673
+
1674
+ ---
1675
+
1676
+ ## <le-toolbar-spacer>
1677
+
1678
+ Flexible spacer for le-toolbar layouts.
1679
+
1680
+ Default behavior (no width): occupies available free space and shrinks naturally.
1681
+ With numeric `width`: behaves as a fixed-width spacer that can be collapsed by le-toolbar.
1682
+
1683
+ ### Properties
1684
+
1685
+ | Name | Type | Default | Description |
1686
+ |------|------|---------|-------------|
1687
+ | `width` | `number \| string \| undefined` | | Optional fixed width. Numeric values (e.g. `24`) are treated as px. String values may be any valid CSS width (e.g. `2rem`, `var(--le-spacing-2)`). |
1688
+
1689
+ ---
1690
+
1691
+ ## <le-tooltip>
1692
+
1693
+ ### Properties
1694
+
1695
+ | Name | Type | Default | Description |
1696
+ |------|------|---------|-------------|
1697
+ | `el` | `HTMLElement` | | |
1698
+ | `mode` | `LeKitMode` | `'default'` | The mode of Le Kit. |
1699
+ | `open` | `boolean` | `false` | Controls whether the tooltip is open. |
1700
+ | `text` | `string` | `''` | Tooltip text shown when no custom content slot is provided. |
1701
+ | `placement` | `TooltipPlacement` | `'auto'` | Preferred tooltip placement relative to trigger. |
1702
+ | `align` | `TooltipAlign` | `'center'` | Alignment along the cross axis for the chosen placement. |
1703
+ | `variant` | `TooltipVariant` | `'default'` | Visual variant of tooltip. |
1704
+ | `disabled` | `boolean` | `false` | Disable tooltip interactions and visibility. |
1705
+ | `showDelay` | `number` | `500` | Delay in milliseconds before showing the tooltip. |
1706
+ | `hideDelay` | `number` | `160` | Delay in milliseconds before hiding the tooltip after leaving trigger/content. |
1707
+ | `offset` | `number` | `8` | Distance in pixels between trigger and tooltip. |
1708
+ | `maxWidth` | `string` | `'280px'` | Max width of the tooltip box. |
1709
+
1710
+ ### Events
1711
+
1712
+ | Event | Type | Description |
1713
+ |-------|------|-------------|
1714
+ | `leTooltipOpen` | `EventEmitter<void> \| undefined` | Emitted when the tooltip opens. |
1715
+ | `leTooltipClose` | `EventEmitter<void> \| undefined` | Emitted when the tooltip closes. |
1716
+
1717
+ ---
1718
+
1501
1719
  ## <le-turntable>
1502
1720
 
1503
1721
  ### Properties
@@ -1517,3 +1735,25 @@ toolbar for bold, italic, links, and paragraph type selection.
1517
1735
 
1518
1736
  ---
1519
1737
 
1738
+ ## <le-visibility>
1739
+
1740
+ Internal visibility transition controller.
1741
+
1742
+ This component controls transition phase + measured size variables.
1743
+
1744
+ Preferred usage wraps the target content:
1745
+ <le-visibility state="collapsed"><div>...</div></le-visibility>
1746
+
1747
+ For backward compatibility, when no children are provided it
1748
+ falls back to controlling the parent host element.
1749
+
1750
+ ### Properties
1751
+
1752
+ | Name | Type | Default | Description |
1753
+ |------|------|---------|-------------|
1754
+ | `el` | `HTMLElement` | | |
1755
+ | `state` | `LeVisibilityState` | `'visible'` | Desired visibility state. |
1756
+ | `mode` | `LeVisibilityMode` | `'width'` | Which dimensions to measure and expose as CSS vars. |
1757
+
1758
+ ---
1759
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "le-kit",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "description": "Themable web components library with CMS admin mode support",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -51,12 +51,16 @@
51
51
  "analyze": "cem analyze --stencil && npm run generate:llm",
52
52
  "generate:llm": "node scripts/generate-llm-context.mjs"
53
53
  },
54
+ "dependencies": {
55
+ "@nanostores/persistent": "^0.10.2",
56
+ "nanostores": "^0.11.4"
57
+ },
54
58
  "devDependencies": {
55
59
  "@custom-elements-manifest/analyzer": "^0.11.0",
56
60
  "@stencil/core": "^4.27.1",
57
61
  "@stencil/react-output-target": "^1.2.0",
58
62
  "@types/jest": "^29.5.14",
59
- "@types/node": "^22.13.5",
63
+ "@types/node": "^22.19.17",
60
64
  "jest": "^29.7.0",
61
65
  "jest-cli": "^29.7.0",
62
66
  "puppeteer": "^24.3.0"