@ixfx/components 0.6.2 → 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 (152) hide show
  1. package/bundle/index.d.ts +1490 -615
  2. package/bundle/index.d.ts.map +1 -1
  3. package/bundle/index.js +20477 -15855
  4. package/bundle/index.js.map +1 -1
  5. package/bundle/style.css +1 -1
  6. package/dist/ac-text.js +3 -2
  7. package/dist/ac-text.js.map +1 -1
  8. package/dist/ac-token.js +3 -2
  9. package/dist/ac-token.js.map +1 -1
  10. package/dist/{button-Bn0BuLpO.js → button-Dat2yHAU.js} +4 -3
  11. package/dist/button-Dat2yHAU.js.map +1 -0
  12. package/dist/button.js +1 -1
  13. package/dist/checkbox.js +1 -1
  14. package/dist/{colour-picker-0stHB90J.js → colour-picker-BSDBL-QL.js} +4 -3
  15. package/dist/{colour-picker-0stHB90J.js.map → colour-picker-BSDBL-QL.js.map} +1 -1
  16. package/dist/colour-picker.js +1 -1
  17. package/dist/crumbs.js +4 -2
  18. package/dist/crumbs.js.map +1 -1
  19. package/dist/data-display.js +1 -1
  20. package/dist/data-grid.js +4 -2
  21. package/dist/data-grid.js.map +1 -1
  22. package/dist/{defaults-BCiDhZbF.js → defaults-BkWCPJFL.js} +3 -20
  23. package/dist/defaults-BkWCPJFL.js.map +1 -0
  24. package/dist/editable-label-rzXkjf1H.d.ts +75 -0
  25. package/dist/editable-label-rzXkjf1H.d.ts.map +1 -0
  26. package/dist/editable-label.d.ts +2 -75
  27. package/dist/editable-label.js +2 -1
  28. package/dist/editable-label.js.map +1 -1
  29. package/dist/{fallbacks-DEE1nCTt.js → fallbacks-DNI9xt0F.js} +2 -2
  30. package/dist/{fallbacks-DEE1nCTt.js.map → fallbacks-DNI9xt0F.js.map} +1 -1
  31. package/dist/{grouped-item-lister-_pMDwIo1.d.ts → grouped-item-lister-DnWB-eFT.d.ts} +2 -2
  32. package/dist/{grouped-item-lister-_pMDwIo1.d.ts.map → grouped-item-lister-DnWB-eFT.d.ts.map} +1 -1
  33. package/dist/grouped-item-lister.d.ts +1 -1
  34. package/dist/{icons-Bm2ByQ3s.js → icon-CvnPanhA.js} +3 -6
  35. package/dist/icon-CvnPanhA.js.map +1 -0
  36. package/dist/icons.js +8 -2
  37. package/dist/icons.js.map +1 -0
  38. package/dist/index-CG2vIgPv.d.ts +101 -0
  39. package/dist/index-CG2vIgPv.d.ts.map +1 -0
  40. package/dist/index.d.ts +655 -65
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +3682 -924
  43. package/dist/index.js.map +1 -1
  44. package/dist/interaction-D5XdKzbR.js +2 -0
  45. package/dist/labelled-radial-input.js +2 -1
  46. package/dist/labelled-radial-input.js.map +1 -1
  47. package/dist/labelled-slider-input-DzigjMwP.js +808 -0
  48. package/dist/labelled-slider-input-DzigjMwP.js.map +1 -0
  49. package/dist/labelled-slider-input.d.ts +2 -0
  50. package/dist/labelled-slider-input.js +2 -0
  51. package/dist/{types-DlVNJez_.d.ts → list-selection-types-DSuRNWpx.d.ts} +10 -2
  52. package/dist/list-selection-types-DSuRNWpx.d.ts.map +1 -0
  53. package/dist/menu-BjRvlgPy.js +825 -0
  54. package/dist/menu-BjRvlgPy.js.map +1 -0
  55. package/dist/menu-item-B-zYrTTi.js +797 -0
  56. package/dist/menu-item-B-zYrTTi.js.map +1 -0
  57. package/dist/menu.js +2 -1
  58. package/dist/miller.d.ts +1 -1
  59. package/dist/miller.js +3 -2
  60. package/dist/miller.js.map +1 -1
  61. package/dist/narrowed-text.js +4 -2
  62. package/dist/narrowed-text.js.map +1 -1
  63. package/dist/notifier.js +3 -2
  64. package/dist/notifier.js.map +1 -1
  65. package/dist/panel.d.ts +13 -13
  66. package/dist/panel.d.ts.map +1 -1
  67. package/dist/panel.js +37 -253
  68. package/dist/panel.js.map +1 -1
  69. package/dist/plots.js +1 -1
  70. package/dist/polar-pad.js +1 -1
  71. package/dist/{radial-input-Dk8Wydp5.js → radial-input-Dp5qz0ly.js} +2 -2
  72. package/dist/{radial-input-Dk8Wydp5.js.map → radial-input-Dp5qz0ly.js.map} +1 -1
  73. package/dist/radial-input.js +1 -1
  74. package/dist/range-input.js +1 -1
  75. package/dist/range.js +1 -1
  76. package/dist/registry-CkW7q09Q.js +21 -0
  77. package/dist/registry-CkW7q09Q.js.map +1 -0
  78. package/dist/select-horiz.js +3 -2
  79. package/dist/select-horiz.js.map +1 -1
  80. package/dist/{slider-input-XppH3vcy.d.ts → slider-input-BfRUW2ZB.d.ts} +16 -3
  81. package/dist/slider-input-BfRUW2ZB.d.ts.map +1 -0
  82. package/dist/{slider-input-CT4gcF-o.js → slider-input-De4eoT11.js} +382 -67
  83. package/dist/slider-input-De4eoT11.js.map +1 -0
  84. package/dist/slider-input.d.ts +1 -1
  85. package/dist/slider-input.js +1 -1
  86. package/dist/snackbar.js +1 -1
  87. package/dist/split-layout-BFSbUZQv.js +969 -0
  88. package/dist/split-layout-BFSbUZQv.js.map +1 -0
  89. package/dist/split-layout-JK3xWVX2.d.ts +179 -0
  90. package/dist/split-layout-JK3xWVX2.d.ts.map +1 -0
  91. package/dist/split-layout.d.ts +2 -60
  92. package/dist/split-layout.js +1 -617
  93. package/dist/style.css +1 -1
  94. package/dist/swipe.js +1 -1
  95. package/dist/{tab-list-D_1cYhB_.d.ts → tab-list-MPwq_1Jj.d.ts} +2 -1
  96. package/dist/tab-list-MPwq_1Jj.d.ts.map +1 -0
  97. package/dist/tabs.d.ts +1 -1
  98. package/dist/tabs.js +96 -14
  99. package/dist/tabs.js.map +1 -1
  100. package/dist/{tickled-controller-BtevrRLV.d.ts → tickled-controller-CRzdIEjJ.d.ts} +7 -1
  101. package/dist/tickled-controller-CRzdIEjJ.d.ts.map +1 -0
  102. package/dist/{tickled-controller-DkAU-0qL.js → tickled-controller-h9GmJ_bU.js} +8 -2
  103. package/dist/tickled-controller-h9GmJ_bU.js.map +1 -0
  104. package/dist/titlebar-DaCfpliv.d.ts +50 -0
  105. package/dist/titlebar-DaCfpliv.d.ts.map +1 -0
  106. package/dist/titlebar.d.ts +2 -0
  107. package/dist/titlebar.js +324 -0
  108. package/dist/titlebar.js.map +1 -0
  109. package/dist/{tree-BO6BXI2b.js → tree-Ch4W8qXQ.js} +4 -3
  110. package/dist/{tree-BO6BXI2b.js.map → tree-Ch4W8qXQ.js.map} +1 -1
  111. package/dist/tree.d.ts +1 -1
  112. package/dist/tree.js +1 -1
  113. package/dist/vertical-list-ClnqTkF3.js +814 -0
  114. package/dist/vertical-list-ClnqTkF3.js.map +1 -0
  115. package/dist/vertical-list.d.ts +8 -9
  116. package/dist/vertical-list.d.ts.map +1 -1
  117. package/dist/vertical-list.js +1 -736
  118. package/dist/{xy-axis-B6yMjckW.js → xy-axis-CxHC8z5E.js} +109 -3
  119. package/dist/xy-axis-CxHC8z5E.js.map +1 -0
  120. package/dist/xy-pad.js +1 -1
  121. package/docs-user/README.md +5 -0
  122. package/docs-user/detail-list.md +398 -0
  123. package/docs-user/dock.md +310 -0
  124. package/docs-user/index.json +27 -2
  125. package/docs-user/labelled-slider-input.md +198 -0
  126. package/docs-user/llms.txt +6 -1
  127. package/docs-user/panel.md +20 -1
  128. package/docs-user/slider-input.md +55 -15
  129. package/docs-user/split-layout.md +136 -170
  130. package/docs-user/tabs.md +34 -0
  131. package/docs-user/titlebar.md +102 -0
  132. package/docs-user/toolbar.md +95 -22
  133. package/docs-user/twosplit-layout.md +254 -0
  134. package/docs-user/user-catalog.md +8 -1
  135. package/llms.txt +6 -1
  136. package/package.json +1 -2
  137. package/dist/button-Bn0BuLpO.js.map +0 -1
  138. package/dist/defaults-BCiDhZbF.js.map +0 -1
  139. package/dist/editable-label.d.ts.map +0 -1
  140. package/dist/icons-Bm2ByQ3s.js.map +0 -1
  141. package/dist/menu-DIfU70AA.js +0 -1609
  142. package/dist/menu-DIfU70AA.js.map +0 -1
  143. package/dist/slider-input-CT4gcF-o.js.map +0 -1
  144. package/dist/slider-input-XppH3vcy.d.ts.map +0 -1
  145. package/dist/split-layout.d.ts.map +0 -1
  146. package/dist/split-layout.js.map +0 -1
  147. package/dist/tab-list-D_1cYhB_.d.ts.map +0 -1
  148. package/dist/tickled-controller-BtevrRLV.d.ts.map +0 -1
  149. package/dist/tickled-controller-DkAU-0qL.js.map +0 -1
  150. package/dist/types-DlVNJez_.d.ts.map +0 -1
  151. package/dist/vertical-list.js.map +0 -1
  152. package/dist/xy-axis-B6yMjckW.js.map +0 -1
@@ -1,75 +1,2 @@
1
- import { CSSResult, LitElement, PropertyValues } from "lit";
2
- //#region src/editable-label/editable-label.d.ts
3
- type EditableMode = `label` | `editor`;
4
- type EntryMode = `free` | `text` | `number` | `percent`;
5
- type DisplayTextLogic = `hidden` | `show` | `override` | `transient`;
6
- type EditableLabelChangeDetail = {
7
- readonly value: string;
8
- };
9
- type EditableLabelChangeEvent = CustomEvent<EditableLabelChangeDetail>;
10
- declare class EditableLabel extends LitElement {
11
- mode: EditableMode;
12
- entryMode: EntryMode;
13
- value: string;
14
- disabled: boolean;
15
- placeholder: string;
16
- /** Override displayed text. Bypasses formatter and value. When editing, shows raw value. */
17
- displayText?: string;
18
- /**
19
- * Controls when displayText is shown:
20
- * - 'hidden' (default): never use displayText
21
- * - 'show': show displayText instead of formatted value, but hide while editing; revert after disappearDelay
22
- * - 'override': always show displayText, even when editing
23
- * - 'transient': show displayText by default, switch to formatted value after appearDelay on hover/interaction; revert after disappearDelay
24
- */
25
- displayTextLogic: DisplayTextLogic;
26
- /** Delay before showing value in transient mode (ms). Default: 50 */
27
- appearDelay: number;
28
- /** Delay before reverting to displayText after editing ends (ms). Default: 1000 */
29
- disappearDelay: number;
30
- /** Override commit validation. Return true to accept, false to reject (reverts). */
31
- validator?: (value: string) => boolean;
32
- /** Transform the committed value for display. Does not affect the stored value. */
33
- formatter?: (value: string) => string;
34
- protected _editing: boolean;
35
- protected get _contentEl(): HTMLElement | undefined;
36
- /** Snapshot of value taken when editing begins; restored on cancel. */
37
- protected _prevValue: string;
38
- connectedCallback(): void;
39
- disconnectedCallback(): void;
40
- protected _hovering: boolean;
41
- protected _transientShowingValue: boolean;
42
- protected _transientTimer: number | undefined;
43
- protected _showModeWaitingToHide: boolean;
44
- protected _clearTransientTimer(): void;
45
- private _onMouseEnter;
46
- private _onMouseLeave;
47
- protected _startTransientRevertTimer(): void;
48
- protected _requestDisplayUpdate(): void;
49
- /** Called by subclasses when user interacts (drag, keyboard, etc) to temporarily show value in transient mode */
50
- protected _onUserInteraction(): void;
51
- protected _handleClick: () => void;
52
- protected _handleFocus: () => void;
53
- protected _handleBlur: () => void;
54
- protected _handleKeydown: (e: KeyboardEvent) => void;
55
- protected _handleBeforeInput: (e: InputEvent) => void;
56
- protected _handleInput: () => void;
57
- protected _beginEdit(): void;
58
- protected _tryCommit(): void;
59
- protected _cancelEdit(): void;
60
- protected _getDisplayText(): string;
61
- protected _shouldUseDisplayText(): boolean;
62
- protected _isAllowedInput(char: string): boolean;
63
- private _defaultValidator;
64
- render(): import("lit").TemplateResult<1>;
65
- updated(changed: PropertyValues): void;
66
- static styles: CSSResult[];
67
- }
68
- declare global {
69
- interface HTMLElementTagNameMap {
70
- 'ixfx-editable-label': EditableLabel;
71
- }
72
- }
73
- //#endregion
74
- export { DisplayTextLogic, EditableLabel, EditableLabelChangeDetail, EditableLabelChangeEvent, EditableMode, EntryMode };
75
- //# sourceMappingURL=editable-label.d.ts.map
1
+ import { a as EditableMode, i as EditableLabelChangeEvent, n as EditableLabel, o as EntryMode, r as EditableLabelChangeDetail, t as DisplayTextLogic } from "./editable-label-rzXkjf1H.js";
2
+ export { DisplayTextLogic, EditableLabel, EditableLabelChangeDetail, EditableLabelChangeEvent, EditableMode, EntryMode };
@@ -1,4 +1,4 @@
1
- import { t as themeFallbacks } from "./fallbacks-DEE1nCTt.js";
1
+ import { t as themeFallbacks } from "./fallbacks-DNI9xt0F.js";
2
2
  import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
3
3
  import { LitElement, css, html, nothing } from "lit";
4
4
  import { property, state } from "lit/decorators.js";
@@ -201,6 +201,7 @@ let EditableLabel = class EditableLabel extends LitElement {
201
201
  _selectAll(el);
202
202
  }
203
203
  }
204
+ if (changed.has(`displayTextLogic`) || changed.has(`displayText`) || changed.has(`formatter`) || changed.has(`value`)) this._requestDisplayUpdate();
204
205
  }
205
206
  static {
206
207
  this.styles = [themeFallbacks, css`
@@ -1 +1 @@
1
- {"version":3,"file":"editable-label.js","names":["customElement"],"sources":["../src/editable-label/editable-label.ts"],"sourcesContent":["/**\n * <ixfx-editable-label> — inline editable text label.\n *\n * Two display modes:\n * label (default) — renders as plain text until clicked, then becomes an editable box.\n * editor — always renders as an editable box; becomes active on focus/click.\n *\n * Entry modes (filter characters as typed):\n * free (default) — no restrictions\n * text — alphabetical characters and spaces only\n * number — digits, decimal point, minus sign\n * percent — digits, decimal point, percent sign\n *\n * Properties (not attributes):\n * validator (value: string) => boolean — override commit validation; default uses entry-mode rules\n * formatter (value: string) => string — transform committed value for display\n *\n * Events:\n * input — CustomEvent<{ value: string }>, bubbles + composed; fired as value changes during editing\n * change — CustomEvent<{ value: string }>, bubbles + composed; fired when value is committed\n *\n * CSS variables:\n * --label-font-size defaults to var(--text-m, 12px)\n * --label-font-family defaults to var(--font-family, system-ui, sans-serif)\n * --label-color defaults to var(--surface-2-text)\n * --label-muted-color placeholder colour, defaults to var(--surface-muted-text)\n * --label-padding defaults to var(--space-xs, 3px) var(--space-s, 4px)\n * --label-radius defaults to var(--radius-s, 3px)\n * --label-align text alignment: left | center (default) | right\n */\nimport type { CSSResult, PropertyValues } from 'lit';\nimport { css, html, LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { themeFallbacks } from '../styles/fallbacks.js';\nimport { safeCustomElement as customElement } from '../util/custom-elements.js';\n\nexport type EditableMode = `label` | `editor`;\nexport type EntryMode = `free` | `text` | `number` | `percent`;\nexport type DisplayTextLogic = `hidden` | `show` | `override` | `transient`;\n\nexport type EditableLabelChangeDetail = {\n readonly value: string;\n};\nexport type EditableLabelChangeEvent = CustomEvent<EditableLabelChangeDetail>;\n\n@customElement(`ixfx-editable-label`)\nexport class EditableLabel extends LitElement {\n @property({ reflect: true }) mode: EditableMode = `label`;\n @property({ attribute: `entry-mode`, reflect: true }) entryMode: EntryMode = `free`;\n @property({ reflect: true }) value = ``;\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property() placeholder = ``;\n\n /** Override displayed text. Bypasses formatter and value. When editing, shows raw value. */\n @property({ attribute: `display-text` }) displayText?: string;\n\n /**\n * Controls when displayText is shown:\n * - 'hidden' (default): never use displayText\n * - 'show': show displayText instead of formatted value, but hide while editing; revert after disappearDelay\n * - 'override': always show displayText, even when editing\n * - 'transient': show displayText by default, switch to formatted value after appearDelay on hover/interaction; revert after disappearDelay\n */\n @property({ attribute: `display-text-logic` }) displayTextLogic: DisplayTextLogic = `hidden`;\n\n /** Delay before showing value in transient mode (ms). Default: 50 */\n @property({ type: Number, attribute: `appear-delay` }) appearDelay = 50;\n\n /** Delay before reverting to displayText after editing ends (ms). Default: 1000 */\n @property({ type: Number, attribute: `disappear-delay` }) disappearDelay = 1000;\n\n /** Override commit validation. Return true to accept, false to reject (reverts). */\n @property({ attribute: false }) validator?: (value: string) => boolean;\n\n /** Transform the committed value for display. Does not affect the stored value. */\n @property({ attribute: false }) formatter?: (value: string) => string;\n\n @state() protected _editing = false;\n\n protected get _contentEl(): HTMLElement | undefined {\n return this.renderRoot?.querySelector<HTMLElement>(`.content`) ?? undefined;\n }\n\n /** Snapshot of value taken when editing begins; restored on cancel. */\n protected _prevValue = ``;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(`mouseenter`, this._onMouseEnter);\n this.addEventListener(`mouseleave`, this._onMouseLeave);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener(`mouseenter`, this._onMouseEnter);\n this.removeEventListener(`mouseleave`, this._onMouseLeave);\n this._clearTransientTimer();\n }\n\n // ── Transient display state ─────────────────────────────────────────────────\n protected _hovering = false;\n protected _transientShowingValue = false;\n protected _transientTimer: number | undefined = undefined;\n protected _showModeWaitingToHide = false;\n\n protected _clearTransientTimer(): void {\n if (this._transientTimer !== undefined) {\n clearTimeout(this._transientTimer);\n this._transientTimer = undefined;\n }\n }\n\n private _onMouseEnter = (): void => {\n if (this.displayTextLogic !== `transient`)\n return;\n this._hovering = true;\n this._clearTransientTimer();\n this._transientTimer = window.setTimeout(() => {\n this._transientShowingValue = true;\n this._requestDisplayUpdate();\n }, this.appearDelay);\n };\n\n private _onMouseLeave = (): void => {\n if (this.displayTextLogic !== `transient`)\n return;\n this._hovering = false;\n this._startTransientRevertTimer();\n };\n\n protected _startTransientRevertTimer(): void {\n this._clearTransientTimer();\n this._transientTimer = window.setTimeout(() => {\n if (!this._hovering && this.displayTextLogic === `transient`) {\n this._transientShowingValue = false;\n this._requestDisplayUpdate();\n }\n }, this.disappearDelay);\n }\n\n protected _requestDisplayUpdate(): void {\n if (!this._editing) {\n const el = this._contentEl;\n if (el) {\n el.textContent = this._getDisplayText();\n }\n }\n }\n\n /** Called by subclasses when user interacts (drag, keyboard, etc) to temporarily show value in transient mode */\n protected _onUserInteraction(): void {\n if (this.displayTextLogic !== `transient`)\n return;\n this._clearTransientTimer();\n this._transientTimer = window.setTimeout(() => {\n this._transientShowingValue = true;\n this._startTransientRevertTimer();\n this._requestDisplayUpdate();\n }, this.appearDelay);\n };\n\n protected _handleClick = (): void => {\n if (this.mode === `label` && !this.disabled && !this._editing) {\n this._beginEdit();\n }\n };\n\n protected _handleFocus = (): void => {\n if (this.mode === `editor` && !this.disabled && !this._editing) {\n this._beginEdit();\n }\n };\n\n protected _handleBlur = (): void => {\n if (this._editing)\n this._tryCommit();\n };\n\n protected _handleKeydown = (e: KeyboardEvent): void => {\n if (!this._editing)\n return;\n if (e.key === `Enter`) {\n e.preventDefault();\n this._tryCommit();\n if (this.mode === `editor`)\n this._contentEl?.blur();\n } else if (e.key === `Escape`) {\n e.preventDefault();\n this._cancelEdit();\n if (this.mode === `editor`)\n this._contentEl?.blur();\n }\n };\n\n protected _handleBeforeInput = (e: InputEvent): void => {\n if (e.inputType !== `insertText` || !e.data)\n return;\n if (!this._isAllowedInput(e.data)) {\n e.preventDefault();\n }\n };\n\n protected _handleInput = (): void => {\n if (!this._editing)\n return;\n\n const raw = this._contentEl?.textContent?.trim() ?? ``;\n\n this.dispatchEvent(new CustomEvent<EditableLabelChangeDetail>(`input`, {\n detail: { value: raw },\n bubbles: true,\n composed: true,\n }));\n };\n\n // ── Core logic ───────────────────────────────────────────────────────────\n\n protected _beginEdit(): void {\n this._prevValue = this.value;\n this._editing = true;\n this.removeAttribute(`invalid`);\n }\n\n protected _tryCommit(): void {\n let raw = this._contentEl?.textContent?.trim() ?? ``;\n if (this.entryMode === `percent`)\n raw = raw.replaceAll(`%`, ``).trim();\n const validate = this.validator ?? this._defaultValidator.bind(this);\n if (validate(raw)) {\n this.removeAttribute(`invalid`);\n const prev = this.value;\n this.value = raw;\n this._editing = false;\n if (raw !== prev) {\n this.dispatchEvent(new CustomEvent<EditableLabelChangeDetail>(`change`, {\n detail: { value: raw },\n bubbles: true,\n composed: true,\n }));\n }\n } else {\n this._cancelEdit();\n }\n }\n\n protected _cancelEdit(): void {\n this.value = this._prevValue;\n this._editing = false;\n this.removeAttribute(`invalid`);\n }\n\n protected _getDisplayText(): string {\n const useDisplayText = this._shouldUseDisplayText();\n if (useDisplayText && this.displayText !== undefined && this.displayText !== ``) {\n return this.displayText;\n }\n if (!this.value)\n return ``;\n if (this.formatter)\n return this.formatter(this.value);\n if (this.entryMode === `percent`)\n return `${this.value}%`;\n return this.value;\n }\n\n protected _shouldUseDisplayText(): boolean {\n if (this.displayTextLogic === `hidden`)\n return false;\n if (this.displayTextLogic === `override`)\n return true;\n if (this.displayTextLogic === `show`) {\n if (this._editing)\n return false;\n return this._showModeWaitingToHide;\n }\n if (this.displayTextLogic === `transient`) {\n if (this._editing)\n return false;\n if (this._transientShowingValue)\n return false;\n return true;\n }\n return false;\n }\n\n protected _isAllowedInput(char: string): boolean {\n switch (this.entryMode) {\n case `text`: return /^[a-z\\s]$/i.test(char);\n case `number`: return /^[\\d.\\-]$/.test(char);\n case `percent`: return /^[\\d.%]$/.test(char);\n default: return true;\n }\n }\n\n private _defaultValidator(value: string): boolean {\n switch (this.entryMode) {\n case `text`: return /^[a-z\\s]*$/i.test(value);\n case `number`: return value === `` || /^-?\\d*(?:\\.\\d*)?$/.test(value);\n case `percent`: return value === `` || /^\\d*(?:\\.\\d*)?$/.test(value);\n default: return true;\n } // asdf\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n override render() {\n const isEditor = this.mode === `editor`;\n return html`<div\n class=\"content\"\n contenteditable=${this._editing ? `plaintext-only` : `false`}\n data-placeholder=${this.placeholder}\n tabindex=${isEditor && !this._editing ? `0` : nothing}\n @click=${this._handleClick}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n @keydown=${this._handleKeydown}\n @beforeinput=${this._handleBeforeInput}\n @input=${this._handleInput}\n >${this._editing ? nothing : this._getDisplayText()}</div>`;\n }\n\n override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (changed.has(`_editing`) && this._editing) {\n const el = this._contentEl;\n if (el) {\n el.textContent = this.value;\n el.focus();\n _selectAll(el);\n }\n }\n }\n\n // ── Styles ───────────────────────────────────────────────────────────────\n\n static override styles: CSSResult[] = [themeFallbacks, css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n --_font-size: var(--label-font-size, var(--text-m, 12px));\n --_font-family: var(--label-font-family, var(--font-family, system-ui, sans-serif));\n --_color: var(--label-color, var(--surface-2-text));\n --_muted: var(--label-muted-color, var(--surface-muted-text, oklch(55% 0.02 240)));\n --_padding: var(--label-padding, var(--space-xs, 3px) var(--space-s, 4px));\n --_radius: var(--label-radius, var(--radius-s, 3px));\n --_align: var(--label-align, center);\n --_min-width: var(--label-min-width, 1ch);\n }\n\n .content {\n box-sizing: border-box;\n width: 100%;\n text-align: var(--_align);\n outline: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: var(--_min-width);\n font-family: var(--_font-family);\n font-size: var(--_font-size);\n color: var(--_color);\n padding: var(--_padding);\n border: 1px solid transparent;\n border-radius: var(--_radius);\n cursor: pointer;\n transition:\n background var(--transition, 0.15s ease-out),\n border-color var(--transition, 0.15s ease-out);\n }\n\n /* Remove overflow clipping while editing so the cursor is never hidden */\n .content[contenteditable=\"plaintext-only\"] {\n overflow: visible;\n text-overflow: clip;\n }\n\n /* ── Label mode ── */\n :host([mode=\"label\"]) .content {\n background: transparent;\n }\n\n :host([mode=\"label\"]) .content[contenteditable=\"plaintext-only\"] {\n background: var(--surface-4, oklch(22% 0.02 240));\n border: var(--border, 1px solid oklch(25% 0.02 240));\n cursor: text;\n }\n\n /* ── Editor mode — always shows box ── */\n :host([mode=\"editor\"]) .content {\n background: var(--surface-4, oklch(22% 0.02 240));\n border: var(--border, 1px solid oklch(25% 0.02 240));\n }\n\n :host([mode=\"editor\"]) .content[contenteditable=\"plaintext-only\"] {\n border-color: var(--accent, oklch(60% 0.15 140));\n cursor: text;\n }\n\n /* ── Placeholder ── */\n .content:empty::before {\n content: attr(data-placeholder);\n color: var(--_muted);\n pointer-events: none;\n }\n\n /* ── Invalid ── */\n :host([invalid]) .content {\n border-color: var(--error, oklch(60% 0.15 20));\n }\n\n /* ── Disabled ── */\n :host([disabled]) .content {\n opacity: var(--disabled-opacity, 0.5);\n cursor: not-allowed;\n pointer-events: none;\n }\n `];\n}\n\nfunction _selectAll(el: HTMLElement): void {\n const range = document.createRange();\n range.selectNodeContents(el);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ixfx-editable-label': EditableLabel;\n }\n}\n"],"mappings":";;;;;AA8CO,IAAM,gBAAN,MAAM,sBAAsB,WAAW;;;EACM,KAAA,OAAA;EAC2B,KAAA,Y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"sources":["../src/editable-label/editable-label.ts"],"sourcesContent":["/**\n * <ixfx-editable-label> — inline editable text label.\n *\n * Two display modes:\n * label (default) — renders as plain text until clicked, then becomes an editable box.\n * editor — always renders as an editable box; becomes active on focus/click.\n *\n * Entry modes (filter characters as typed):\n * free (default) — no restrictions\n * text — alphabetical characters and spaces only\n * number — digits, decimal point, minus sign\n * percent — digits, decimal point, percent sign\n *\n * Properties (not attributes):\n * validator (value: string) => boolean — override commit validation; default uses entry-mode rules\n * formatter (value: string) => string — transform committed value for display\n *\n * Events:\n * input — CustomEvent<{ value: string }>, bubbles + composed; fired as value changes during editing\n * change — CustomEvent<{ value: string }>, bubbles + composed; fired when value is committed\n *\n * CSS variables:\n * --label-font-size defaults to var(--text-m, 12px)\n * --label-font-family defaults to var(--font-family, system-ui, sans-serif)\n * --label-color defaults to var(--surface-2-text)\n * --label-muted-color placeholder colour, defaults to var(--surface-muted-text)\n * --label-padding defaults to var(--space-xs, 3px) var(--space-s, 4px)\n * --label-radius defaults to var(--radius-s, 3px)\n * --label-align text alignment: left | center (default) | right\n */\nimport type { CSSResult, PropertyValues } from 'lit';\nimport { css, html, LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { themeFallbacks } from '../styles/fallbacks.js';\nimport { safeCustomElement as customElement } from '../util/custom-elements.js';\n\nexport type EditableMode = `label` | `editor`;\nexport type EntryMode = `free` | `text` | `number` | `percent`;\nexport type DisplayTextLogic = `hidden` | `show` | `override` | `transient`;\n\nexport type EditableLabelChangeDetail = {\n readonly value: string;\n};\nexport type EditableLabelChangeEvent = CustomEvent<EditableLabelChangeDetail>;\n\n@customElement(`ixfx-editable-label`)\nexport class EditableLabel extends LitElement {\n @property({ reflect: true }) mode: EditableMode = `label`;\n @property({ attribute: `entry-mode`, reflect: true }) entryMode: EntryMode = `free`;\n @property({ reflect: true }) value = ``;\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property() placeholder = ``;\n\n /** Override displayed text. Bypasses formatter and value. When editing, shows raw value. */\n @property({ attribute: `display-text` }) displayText?: string;\n\n /**\n * Controls when displayText is shown:\n * - 'hidden' (default): never use displayText\n * - 'show': show displayText instead of formatted value, but hide while editing; revert after disappearDelay\n * - 'override': always show displayText, even when editing\n * - 'transient': show displayText by default, switch to formatted value after appearDelay on hover/interaction; revert after disappearDelay\n */\n @property({ attribute: `display-text-logic` }) displayTextLogic: DisplayTextLogic = `hidden`;\n\n /** Delay before showing value in transient mode (ms). Default: 50 */\n @property({ type: Number, attribute: `appear-delay` }) appearDelay = 50;\n\n /** Delay before reverting to displayText after editing ends (ms). Default: 1000 */\n @property({ type: Number, attribute: `disappear-delay` }) disappearDelay = 1000;\n\n /** Override commit validation. Return true to accept, false to reject (reverts). */\n @property({ attribute: false }) validator?: (value: string) => boolean;\n\n /** Transform the committed value for display. Does not affect the stored value. */\n @property({ attribute: false }) formatter?: (value: string) => string;\n\n @state() protected _editing = false;\n\n protected get _contentEl(): HTMLElement | undefined {\n return this.renderRoot?.querySelector<HTMLElement>(`.content`) ?? undefined;\n }\n\n /** Snapshot of value taken when editing begins; restored on cancel. */\n protected _prevValue = ``;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(`mouseenter`, this._onMouseEnter);\n this.addEventListener(`mouseleave`, this._onMouseLeave);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener(`mouseenter`, this._onMouseEnter);\n this.removeEventListener(`mouseleave`, this._onMouseLeave);\n this._clearTransientTimer();\n }\n\n // ── Transient display state ─────────────────────────────────────────────────\n protected _hovering = false;\n protected _transientShowingValue = false;\n protected _transientTimer: number | undefined = undefined;\n protected _showModeWaitingToHide = false;\n\n protected _clearTransientTimer(): void {\n if (this._transientTimer !== undefined) {\n clearTimeout(this._transientTimer);\n this._transientTimer = undefined;\n }\n }\n\n private _onMouseEnter = (): void => {\n if (this.displayTextLogic !== `transient`)\n return;\n this._hovering = true;\n this._clearTransientTimer();\n this._transientTimer = window.setTimeout(() => {\n this._transientShowingValue = true;\n this._requestDisplayUpdate();\n }, this.appearDelay);\n };\n\n private _onMouseLeave = (): void => {\n if (this.displayTextLogic !== `transient`)\n return;\n this._hovering = false;\n this._startTransientRevertTimer();\n };\n\n protected _startTransientRevertTimer(): void {\n this._clearTransientTimer();\n this._transientTimer = window.setTimeout(() => {\n if (!this._hovering && this.displayTextLogic === `transient`) {\n this._transientShowingValue = false;\n this._requestDisplayUpdate();\n }\n }, this.disappearDelay);\n }\n\n protected _requestDisplayUpdate(): void {\n if (!this._editing) {\n const el = this._contentEl;\n if (el) {\n el.textContent = this._getDisplayText();\n }\n }\n }\n\n /** Called by subclasses when user interacts (drag, keyboard, etc) to temporarily show value in transient mode */\n protected _onUserInteraction(): void {\n if (this.displayTextLogic !== `transient`)\n return;\n this._clearTransientTimer();\n this._transientTimer = window.setTimeout(() => {\n this._transientShowingValue = true;\n this._startTransientRevertTimer();\n this._requestDisplayUpdate();\n }, this.appearDelay);\n };\n\n protected _handleClick = (): void => {\n if (this.mode === `label` && !this.disabled && !this._editing) {\n this._beginEdit();\n }\n };\n\n protected _handleFocus = (): void => {\n if (this.mode === `editor` && !this.disabled && !this._editing) {\n this._beginEdit();\n }\n };\n\n protected _handleBlur = (): void => {\n if (this._editing)\n this._tryCommit();\n };\n\n protected _handleKeydown = (e: KeyboardEvent): void => {\n if (!this._editing)\n return;\n if (e.key === `Enter`) {\n e.preventDefault();\n this._tryCommit();\n if (this.mode === `editor`)\n this._contentEl?.blur();\n } else if (e.key === `Escape`) {\n e.preventDefault();\n this._cancelEdit();\n if (this.mode === `editor`)\n this._contentEl?.blur();\n }\n };\n\n protected _handleBeforeInput = (e: InputEvent): void => {\n if (e.inputType !== `insertText` || !e.data)\n return;\n if (!this._isAllowedInput(e.data)) {\n e.preventDefault();\n }\n };\n\n protected _handleInput = (): void => {\n if (!this._editing)\n return;\n\n const raw = this._contentEl?.textContent?.trim() ?? ``;\n\n this.dispatchEvent(new CustomEvent<EditableLabelChangeDetail>(`input`, {\n detail: { value: raw },\n bubbles: true,\n composed: true,\n }));\n };\n\n // ── Core logic ───────────────────────────────────────────────────────────\n\n protected _beginEdit(): void {\n this._prevValue = this.value;\n this._editing = true;\n this.removeAttribute(`invalid`);\n }\n\n protected _tryCommit(): void {\n let raw = this._contentEl?.textContent?.trim() ?? ``;\n if (this.entryMode === `percent`)\n raw = raw.replaceAll(`%`, ``).trim();\n const validate = this.validator ?? this._defaultValidator.bind(this);\n if (validate(raw)) {\n this.removeAttribute(`invalid`);\n const prev = this.value;\n this.value = raw;\n this._editing = false;\n if (raw !== prev) {\n this.dispatchEvent(new CustomEvent<EditableLabelChangeDetail>(`change`, {\n detail: { value: raw },\n bubbles: true,\n composed: true,\n }));\n }\n } else {\n this._cancelEdit();\n }\n }\n\n protected _cancelEdit(): void {\n this.value = this._prevValue;\n this._editing = false;\n this.removeAttribute(`invalid`);\n }\n\n protected _getDisplayText(): string {\n const useDisplayText = this._shouldUseDisplayText();\n if (useDisplayText && this.displayText !== undefined && this.displayText !== ``) {\n return this.displayText;\n }\n if (!this.value)\n return ``;\n if (this.formatter)\n return this.formatter(this.value);\n if (this.entryMode === `percent`)\n return `${this.value}%`;\n return this.value;\n }\n\n protected _shouldUseDisplayText(): boolean {\n if (this.displayTextLogic === `hidden`)\n return false;\n if (this.displayTextLogic === `override`)\n return true;\n if (this.displayTextLogic === `show`) {\n if (this._editing)\n return false;\n return this._showModeWaitingToHide;\n }\n if (this.displayTextLogic === `transient`) {\n if (this._editing)\n return false;\n if (this._transientShowingValue)\n return false;\n return true;\n }\n return false;\n }\n\n protected _isAllowedInput(char: string): boolean {\n switch (this.entryMode) {\n case `text`: return /^[a-z\\s]$/i.test(char);\n case `number`: return /^[\\d.\\-]$/.test(char);\n case `percent`: return /^[\\d.%]$/.test(char);\n default: return true;\n }\n }\n\n private _defaultValidator(value: string): boolean {\n switch (this.entryMode) {\n case `text`: return /^[a-z\\s]*$/i.test(value);\n case `number`: return value === `` || /^-?\\d*(?:\\.\\d*)?$/.test(value);\n case `percent`: return value === `` || /^\\d*(?:\\.\\d*)?$/.test(value);\n default: return true;\n } // asdf\n }\n\n // ── Render ───────────────────────────────────────────────────────────────\n\n override render() {\n const isEditor = this.mode === `editor`;\n return html`<div\n class=\"content\"\n contenteditable=${this._editing ? `plaintext-only` : `false`}\n data-placeholder=${this.placeholder}\n tabindex=${isEditor && !this._editing ? `0` : nothing}\n @click=${this._handleClick}\n @focus=${this._handleFocus}\n @blur=${this._handleBlur}\n @keydown=${this._handleKeydown}\n @beforeinput=${this._handleBeforeInput}\n @input=${this._handleInput}\n >${this._editing ? nothing : this._getDisplayText()}</div>`;\n }\n\n override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (changed.has(`_editing`) && this._editing) {\n const el = this._contentEl;\n if (el) {\n el.textContent = this.value;\n el.focus();\n _selectAll(el);\n }\n }\n // The text content is managed imperatively (see _requestDisplayUpdate), so\n // a re-render alone does not refresh it. Refresh when display-affecting\n // properties change — e.g. a labelled wrapper toggling displayTextLogic\n // while its slider is dragged. _requestDisplayUpdate() no-ops while editing.\n if (\n changed.has(`displayTextLogic`)\n || changed.has(`displayText`)\n || changed.has(`formatter`)\n || changed.has(`value`)\n ) {\n this._requestDisplayUpdate();\n }\n }\n\n // ── Styles ───────────────────────────────────────────────────────────────\n\n static override styles: CSSResult[] = [themeFallbacks, css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n --_font-size: var(--label-font-size, var(--text-m, 12px));\n --_font-family: var(--label-font-family, var(--font-family, system-ui, sans-serif));\n --_color: var(--label-color, var(--surface-2-text));\n --_muted: var(--label-muted-color, var(--surface-muted-text, oklch(55% 0.02 240)));\n --_padding: var(--label-padding, var(--space-xs, 3px) var(--space-s, 4px));\n --_radius: var(--label-radius, var(--radius-s, 3px));\n --_align: var(--label-align, center);\n --_min-width: var(--label-min-width, 1ch);\n }\n\n .content {\n box-sizing: border-box;\n width: 100%;\n text-align: var(--_align);\n outline: none;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: var(--_min-width);\n font-family: var(--_font-family);\n font-size: var(--_font-size);\n color: var(--_color);\n padding: var(--_padding);\n border: 1px solid transparent;\n border-radius: var(--_radius);\n cursor: pointer;\n transition:\n background var(--transition, 0.15s ease-out),\n border-color var(--transition, 0.15s ease-out);\n }\n\n /* Remove overflow clipping while editing so the cursor is never hidden */\n .content[contenteditable=\"plaintext-only\"] {\n overflow: visible;\n text-overflow: clip;\n }\n\n /* ── Label mode ── */\n :host([mode=\"label\"]) .content {\n background: transparent;\n }\n\n :host([mode=\"label\"]) .content[contenteditable=\"plaintext-only\"] {\n background: var(--surface-4, oklch(22% 0.02 240));\n border: var(--border, 1px solid oklch(25% 0.02 240));\n cursor: text;\n }\n\n /* ── Editor mode — always shows box ── */\n :host([mode=\"editor\"]) .content {\n background: var(--surface-4, oklch(22% 0.02 240));\n border: var(--border, 1px solid oklch(25% 0.02 240));\n }\n\n :host([mode=\"editor\"]) .content[contenteditable=\"plaintext-only\"] {\n border-color: var(--accent, oklch(60% 0.15 140));\n cursor: text;\n }\n\n /* ── Placeholder ── */\n .content:empty::before {\n content: attr(data-placeholder);\n color: var(--_muted);\n pointer-events: none;\n }\n\n /* ── Invalid ── */\n :host([invalid]) .content {\n border-color: var(--error, oklch(60% 0.15 20));\n }\n\n /* ── Disabled ── */\n :host([disabled]) .content {\n opacity: var(--disabled-opacity, 0.5);\n cursor: not-allowed;\n pointer-events: none;\n }\n `];\n}\n\nfunction _selectAll(el: HTMLElement): void {\n const range = document.createRange();\n range.selectNodeContents(el);\n const sel = window.getSelection();\n sel?.removeAllRanges();\n sel?.addRange(range);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ixfx-editable-label': EditableLabel;\n }\n}\n"],"mappings":";;;;;AA8CO,IAAM,gBAAN,MAAM,sBAAsB,WAAW;;;EACM,KAAA,OAAA;EAC2B,KAAA,YAAA;EACxC,KAAA,QAAA;EACkB,KAAA,WAAA;EAC7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;CAChC,KAAK,gBAAgB;CACrB,KAAK,SAAS,KAAK;AACrB"}
@@ -245,7 +245,7 @@ const _themeFallbacksCss = css`
245
245
  @property --text-xs {
246
246
  syntax: '<length>';
247
247
  inherits: true;
248
- initial-value: 10px;
248
+ initial-value: 9px;
249
249
  }
250
250
  @property --text-s {
251
251
  syntax: '<length>';
@@ -403,4 +403,4 @@ const themeFallbacks = css``;
403
403
  //#endregion
404
404
  export { themeFallbacks as t };
405
405
 
406
- //# sourceMappingURL=fallbacks-DEE1nCTt.js.map
406
+ //# sourceMappingURL=fallbacks-DNI9xt0F.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fallbacks-DEE1nCTt.js","names":[],"sources":["../src/styles/fallbacks.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * Default fallback values for theme CSS variables.\n *\n * Uses `@property` to register each variable with an initial value that acts\n * as a fallback. This means:\n * - If the theme CSS (`src/style.css`) is loaded, its `:root` values cascade\n * in and override these defaults.\n * - If no theme CSS is loaded, these initial values ensure components still\n * have visible backgrounds, text colours, etc.\n *\n * `@property` registration is document-global — it is not scoped per shadow\n * root — so this is registered exactly once (via `_registerThemeFallbacksOnce`\n * below) rather than adopted into every component's shadow-root stylesheet.\n * Registering the same `@property` rule repeatedly across many shadow roots\n * causes Chrome to log \"Ignored @property rule\" for every repeat.\n */\nconst _themeFallbacksCss = css`\n @property --surface-0 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(5% 0.02 240);\n }\n @property --surface-1 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(8% 0.02 240);\n }\n @property --surface-2 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(12% 0.02 240);\n }\n @property --surface-2-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-3 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(15% 0.02 240);\n }\n @property --surface-3-text {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(75% 0.02 240);\n }\n @property --surface-4 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(22% 0.02 240);\n }\n @property --surface-4-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-5 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(19% 0.02 240);\n }\n @property --surface-5-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-6 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(35% 0.02 240);\n }\n @property --surface-6-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-muted-text {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(55% 0.02 240);\n }\n @property --content {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(10% 0.01 240);\n }\n @property --content-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --accent {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(60% 0.15 140);\n }\n @property --accent-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --error {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(60% 0.15 20);\n }\n @property --error-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --border {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(25% 0.02 240);\n }\n @property --border-subtle {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(18% 0.02 240);\n }\n @property --disabled-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.5;\n }\n @property --transition {\n syntax: '<time>';\n inherits: true;\n initial-value: 0.15s;\n }\n @property --prominence-idle-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.6;\n }\n @property --prominence-idle-saturate {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.4;\n }\n @property --prominence-tickled-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.85;\n }\n @property --prominence-tickled-saturate {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.8;\n }\n @property --prominence-disabled-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.3;\n }\n @property --prominence-disabled-saturate {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.1;\n }\n @property --crumb-item-bg {\n syntax: '<color>';\n inherits: true;\n initial-value: transparent;\n }\n @property --crumb-item-bg-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: var(--surface-5);\n }\n @property --crumb-item-text-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: inherit;\n }\n @property --crumb-item-border {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid transparent;\n }\n @property --crumb-item-border-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: var(--accent);\n }\n @property --crumb-item-padding {\n syntax: '*';\n inherits: true;\n initial-value: var(--space-xs);\n }\n @property --crumb-item-border-radius {\n syntax: '<length>';\n inherits: true;\n initial-value: var(--radius-m);\n }\n @property --crumb-item-gap {\n syntax: '<length>';\n inherits: true;\n initial-value: var(--space-xs);\n }\n @property --crumb-separator {\n syntax: '<color>';\n inherits: true;\n initial-value: var(--surface-muted-text);\n }\n @property --crumb-truncate-min-width {\n syntax: '<length>';\n inherits: true;\n initial-value: 5ch;\n }\n @property --space-xs {\n syntax: '<length>';\n inherits: true;\n initial-value: 3px;\n }\n @property --space-s {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n @property --space-m {\n syntax: '<length>';\n inherits: true;\n initial-value: 8px;\n }\n @property --space-l {\n syntax: '<length>';\n inherits: true;\n initial-value: 12px;\n }\n @property --space-xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 16px;\n }\n @property --space-2xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 20px;\n }\n @property --text-xs {\n syntax: '<length>';\n inherits: true;\n initial-value: 10px;\n }\n @property --text-s {\n syntax: '<length>';\n inherits: true;\n initial-value: 11px;\n }\n @property --text-m {\n syntax: '<length>';\n inherits: true;\n initial-value: 12px;\n }\n @property --text-l {\n syntax: '<length>';\n inherits: true;\n initial-value: 13px;\n }\n @property --text-xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 16px;\n }\n @property --text-2xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 20px;\n }\n @property --font-weight-bold {\n syntax: '<number>';\n inherits: true;\n initial-value: 600;\n }\n @property --radius-s {\n syntax: '<length>';\n inherits: true;\n initial-value: 3px;\n }\n @property --radius-m {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n @property --radius-l {\n syntax: '<length>';\n inherits: true;\n initial-value: 6px;\n }\n @property --radius-xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 8px;\n }\n @property --shadow-m {\n syntax: '*';\n inherits: true;\n initial-value: 0 4px 12px rgba(0, 0, 0, 0.3);\n }\n @property --shadow-l {\n syntax: '*';\n inherits: true;\n initial-value: 0 4px 24px rgba(0, 0, 0, 0.5);\n }\n @property --item-bg {\n syntax: '<color>';\n inherits: true;\n initial-value: transparent;\n }\n @property --item-bg-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(19% 0.02 240);\n }\n @property --item-bg-selected {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(60% 0.15 140);\n }\n @property --item-bg-selected-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: color-mix(in oklch, oklch(60% 0.15 140) 80%, oklch(0% 0 0));\n }\n @property --item-text-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --item-text-selected {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --item-border {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(19% 0.02 240);\n }\n @property --item-border-tickled {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid color-mix(in oklch, oklch(60% 0.15 140) 40%, transparent);\n }\n @property --item-border-selected {\n syntax: '*';\n inherits: true;\n initial-value: 1px dashed oklch(60% 0.15 140);\n }\n @property --item-border-active {\n syntax: '*';\n inherits: true;\n initial-value: 2px solid oklch(60% 0.15 140);\n }\n @property --item-border-dragged {\n syntax: '*';\n inherits: true;\n initial-value: 2px dotted color-mix(in oklch, oklch(60% 0.15 140) 80%, transparent);\n }\n @property --item-border-disabled {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(22% 0.02 240);\n }\n @property --item-padding {\n syntax: '*';\n inherits: true;\n initial-value: 4px 8px;\n }\n @property --item-border-radius {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n @property --item-icon-spacing {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n`;\n\nlet _themeFallbacksRegistered = false;\n\nfunction _registerThemeFallbacksOnce(): void {\n if (_themeFallbacksRegistered || typeof document === `undefined`)\n return;\n _themeFallbacksRegistered = true;\n const styleEl = document.createElement(`style`);\n styleEl.textContent = _themeFallbacksCss.cssText;\n document.head.append(styleEl);\n}\n\n_registerThemeFallbacksOnce();\n\n/**\n * Spread this into any component whose styles reference theme variables.\n * It is an empty stylesheet — the actual `@property` rules are registered\n * once at the document level as a side effect of importing this module — so\n * this exists only to keep the familiar `static styles = [themeFallbacks, ...]`\n * pattern working across all consuming components.\n */\nexport const themeFallbacks = css``;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgX9B,IAAI,4BAA4B;AAEhC,SAAS,8BAAoC;CAC3C,IAAI,6BAA6B,OAAO,aAAa,aACnD;CACF,4BAA4B;CAC5B,MAAM,UAAU,SAAS,cAAc,OAAO;CAC9C,QAAQ,cAAc,mBAAmB;CACzC,SAAS,KAAK,OAAO,OAAO;AAC9B;AAEA,4BAA4B;;;;;;;;AAS5B,MAAa,iBAAiB,GAAG"}
1
+ {"version":3,"file":"fallbacks-DNI9xt0F.js","names":[],"sources":["../src/styles/fallbacks.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * Default fallback values for theme CSS variables.\n *\n * Uses `@property` to register each variable with an initial value that acts\n * as a fallback. This means:\n * - If the theme CSS (`src/style.css`) is loaded, its `:root` values cascade\n * in and override these defaults.\n * - If no theme CSS is loaded, these initial values ensure components still\n * have visible backgrounds, text colours, etc.\n *\n * `@property` registration is document-global — it is not scoped per shadow\n * root — so this is registered exactly once (via `_registerThemeFallbacksOnce`\n * below) rather than adopted into every component's shadow-root stylesheet.\n * Registering the same `@property` rule repeatedly across many shadow roots\n * causes Chrome to log \"Ignored @property rule\" for every repeat.\n */\nconst _themeFallbacksCss = css`\n @property --surface-0 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(5% 0.02 240);\n }\n @property --surface-1 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(8% 0.02 240);\n }\n @property --surface-2 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(12% 0.02 240);\n }\n @property --surface-2-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-3 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(15% 0.02 240);\n }\n @property --surface-3-text {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(75% 0.02 240);\n }\n @property --surface-4 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(22% 0.02 240);\n }\n @property --surface-4-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-5 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(19% 0.02 240);\n }\n @property --surface-5-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-6 {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(35% 0.02 240);\n }\n @property --surface-6-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --surface-muted-text {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(55% 0.02 240);\n }\n @property --content {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(10% 0.01 240);\n }\n @property --content-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --accent {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(60% 0.15 140);\n }\n @property --accent-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --error {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(60% 0.15 20);\n }\n @property --error-text {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --border {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(25% 0.02 240);\n }\n @property --border-subtle {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(18% 0.02 240);\n }\n @property --disabled-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.5;\n }\n @property --transition {\n syntax: '<time>';\n inherits: true;\n initial-value: 0.15s;\n }\n @property --prominence-idle-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.6;\n }\n @property --prominence-idle-saturate {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.4;\n }\n @property --prominence-tickled-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.85;\n }\n @property --prominence-tickled-saturate {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.8;\n }\n @property --prominence-disabled-opacity {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.3;\n }\n @property --prominence-disabled-saturate {\n syntax: '<number>';\n inherits: true;\n initial-value: 0.1;\n }\n @property --crumb-item-bg {\n syntax: '<color>';\n inherits: true;\n initial-value: transparent;\n }\n @property --crumb-item-bg-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: var(--surface-5);\n }\n @property --crumb-item-text-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: inherit;\n }\n @property --crumb-item-border {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid transparent;\n }\n @property --crumb-item-border-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: var(--accent);\n }\n @property --crumb-item-padding {\n syntax: '*';\n inherits: true;\n initial-value: var(--space-xs);\n }\n @property --crumb-item-border-radius {\n syntax: '<length>';\n inherits: true;\n initial-value: var(--radius-m);\n }\n @property --crumb-item-gap {\n syntax: '<length>';\n inherits: true;\n initial-value: var(--space-xs);\n }\n @property --crumb-separator {\n syntax: '<color>';\n inherits: true;\n initial-value: var(--surface-muted-text);\n }\n @property --crumb-truncate-min-width {\n syntax: '<length>';\n inherits: true;\n initial-value: 5ch;\n }\n @property --space-xs {\n syntax: '<length>';\n inherits: true;\n initial-value: 3px;\n }\n @property --space-s {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n @property --space-m {\n syntax: '<length>';\n inherits: true;\n initial-value: 8px;\n }\n @property --space-l {\n syntax: '<length>';\n inherits: true;\n initial-value: 12px;\n }\n @property --space-xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 16px;\n }\n @property --space-2xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 20px;\n }\n @property --text-xs {\n syntax: '<length>';\n inherits: true;\n initial-value: 9px;\n }\n @property --text-s {\n syntax: '<length>';\n inherits: true;\n initial-value: 11px;\n }\n @property --text-m {\n syntax: '<length>';\n inherits: true;\n initial-value: 12px;\n }\n @property --text-l {\n syntax: '<length>';\n inherits: true;\n initial-value: 13px;\n }\n @property --text-xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 16px;\n }\n @property --text-2xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 20px;\n }\n @property --font-weight-bold {\n syntax: '<number>';\n inherits: true;\n initial-value: 600;\n }\n @property --radius-s {\n syntax: '<length>';\n inherits: true;\n initial-value: 3px;\n }\n @property --radius-m {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n @property --radius-l {\n syntax: '<length>';\n inherits: true;\n initial-value: 6px;\n }\n @property --radius-xl {\n syntax: '<length>';\n inherits: true;\n initial-value: 8px;\n }\n @property --shadow-m {\n syntax: '*';\n inherits: true;\n initial-value: 0 4px 12px rgba(0, 0, 0, 0.3);\n }\n @property --shadow-l {\n syntax: '*';\n inherits: true;\n initial-value: 0 4px 24px rgba(0, 0, 0, 0.5);\n }\n @property --item-bg {\n syntax: '<color>';\n inherits: true;\n initial-value: transparent;\n }\n @property --item-bg-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(19% 0.02 240);\n }\n @property --item-bg-selected {\n syntax: '<color>';\n inherits: true;\n initial-value: oklch(60% 0.15 140);\n }\n @property --item-bg-selected-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: color-mix(in oklch, oklch(60% 0.15 140) 80%, oklch(0% 0 0));\n }\n @property --item-text-tickled {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --item-text-selected {\n syntax: '<color>';\n inherits: true;\n initial-value: #fff;\n }\n @property --item-border {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(19% 0.02 240);\n }\n @property --item-border-tickled {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid color-mix(in oklch, oklch(60% 0.15 140) 40%, transparent);\n }\n @property --item-border-selected {\n syntax: '*';\n inherits: true;\n initial-value: 1px dashed oklch(60% 0.15 140);\n }\n @property --item-border-active {\n syntax: '*';\n inherits: true;\n initial-value: 2px solid oklch(60% 0.15 140);\n }\n @property --item-border-dragged {\n syntax: '*';\n inherits: true;\n initial-value: 2px dotted color-mix(in oklch, oklch(60% 0.15 140) 80%, transparent);\n }\n @property --item-border-disabled {\n syntax: '*';\n inherits: true;\n initial-value: 1px solid oklch(22% 0.02 240);\n }\n @property --item-padding {\n syntax: '*';\n inherits: true;\n initial-value: 4px 8px;\n }\n @property --item-border-radius {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n @property --item-icon-spacing {\n syntax: '<length>';\n inherits: true;\n initial-value: 4px;\n }\n`;\n\nlet _themeFallbacksRegistered = false;\n\nfunction _registerThemeFallbacksOnce(): void {\n if (_themeFallbacksRegistered || typeof document === `undefined`)\n return;\n _themeFallbacksRegistered = true;\n const styleEl = document.createElement(`style`);\n styleEl.textContent = _themeFallbacksCss.cssText;\n document.head.append(styleEl);\n}\n\n_registerThemeFallbacksOnce();\n\n/**\n * Spread this into any component whose styles reference theme variables.\n * It is an empty stylesheet — the actual `@property` rules are registered\n * once at the document level as a side effect of importing this module — so\n * this exists only to keep the familiar `static styles = [themeFallbacks, ...]`\n * pattern working across all consuming components.\n */\nexport const themeFallbacks = css``;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgX9B,IAAI,4BAA4B;AAEhC,SAAS,8BAAoC;CAC3C,IAAI,6BAA6B,OAAO,aAAa,aACnD;CACF,4BAA4B;CAC5B,MAAM,UAAU,SAAS,cAAc,OAAO;CAC9C,QAAQ,cAAc,mBAAmB;CACzC,SAAS,KAAK,OAAO,OAAO;AAC9B;AAEA,4BAA4B;;;;;;;;AAS5B,MAAa,iBAAiB,GAAG"}
@@ -1,5 +1,5 @@
1
1
  import { r as IDataProvider } from "./data-provider-BAn_-oR1.js";
2
- import { l as ListSelectionMode } from "./types-DlVNJez_.js";
2
+ import { l as ListSelectionMode } from "./list-selection-types-DSuRNWpx.js";
3
3
  import "./panel.js";
4
4
  import { LitElement, PropertyValues, nothing } from "lit";
5
5
  import { CommandId } from "@clinth/ui-commands";
@@ -118,4 +118,4 @@ interface GroupedItemListerElement<T> {
118
118
  }
119
119
  //#endregion
120
120
  export { IGroupedSubComponent as a, SubComponentActivateEvent as c, SubComponentItemClickEvent as d, SubComponentSelectDetail as f, SubComponentTickleEvent as h, GroupedSelectEvent as i, SubComponentFactory as l, SubComponentTickleDetail as m, GroupedItemListerElementEventMap as n, IGroupedSubComponentEventMap as o, SubComponentSelectEvent as p, GroupedSelectDetail as r, SubComponentActivateDetail as s, GroupedItemListerElement as t, SubComponentItemClickDetail as u };
121
- //# sourceMappingURL=grouped-item-lister-_pMDwIo1.d.ts.map
121
+ //# sourceMappingURL=grouped-item-lister-DnWB-eFT.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grouped-item-lister-_pMDwIo1.d.ts","names":[],"sources":["../src/grouped-item-lister/types.ts","../src/grouped-item-lister/grouped-item-lister.ts"],"mappings":";;;;;;;;;;KAWY,yBAAyB;WAC1B,UAAU,YAAY;WACtB,UAAU,YAAY;;;;;;KAOrB,2BAA2B;WAC5B,MAAM;;;;;;KAOL,4BAA4B;WAC7B,MAAM;;;;;;KAOL,yBAAyB;WAC1B,MAAM;;KAGL,wBAAwB,KAAK,YAAY,yBAAyB;KAClE,0BAA0B,KAAK,YAAY,2BAA2B;KACtE,2BAA2B,KAAK,YAAY,4BAA4B;KACxE,wBAAwB,KAAK,YAAY,yBAAyB;UAE7D,6BAA6B;EAC5C,UAAU,wBAAwB;EAClC,YAAY,0BAA0B;EACtC,cAAc,2BAA2B;EACzC,UAAU,wBAAwB;;;;;;;;UAanB,qBAAqB,WAAW;;EAE/C,WAAW,gBAAgB;;EAG3B;;WAGS,eAAe,YAAY;;EAGpC,eAAe;;;;;EAMf,WAAW,WAAW,WAAW,OAAO;EAExC,oBAAoB,gBAAgB,6BAA6B,IAC/D,MAAM,GACN,WAAW,OAAO,6BAA6B,GAAG,aAClD,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB;;;;;;KAQZ,oBAAoB,MAAM,iCAAiC,cAAc,qBAAqB;;;;;;KAW9F,oBAAoB;WACrB,UAAU,YAAY;WACtB;;KAGC,mBAAmB,KAAK,YAAY,oBAAoB;UAEnD,iCAAiC;EAChD,kBAAkB,mBAAmB;;;;cC9E1B,yBAAyB,qBAAqB;;EACb;EAG5C;MAgBI,aAAa,MAAM;MAInB,QAAQ,SAAS,MAAM;MAKvB,WAAW,oBAAoB;MAI/B,QAAQ,OAAO,oBAAoB;MAQnC,YAAY,oBAAoB;MAIhC,SAAS,OAAO,oBAAoB;;MAWpC,iBAAiB,YAAY;;;;;EAcjC,SAAS,WAAW,WAAW,OAAO;YAUnB;EAIV;EAKA;YAKU,QAAQ,SAAS;YAQjB,iBAAM,wBAAA;;QAmJnB;YACI;IACR,4BAA4B;;;UAIf,yBAAyB;EACxC,oBAAoB,gBAAgB,iCAAiC,IACnE,MAAM,GACN,WAAW,MAAM,yBAAyB,IAAI,OAAO,iCAAiC,GAAG,aACzF,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
1
+ {"version":3,"file":"grouped-item-lister-DnWB-eFT.d.ts","names":[],"sources":["../src/grouped-item-lister/types.ts","../src/grouped-item-lister/grouped-item-lister.ts"],"mappings":";;;;;;;;;;KAWY,yBAAyB;WAC1B,UAAU,YAAY;WACtB,UAAU,YAAY;;;;;;KAOrB,2BAA2B;WAC5B,MAAM;;;;;;KAOL,4BAA4B;WAC7B,MAAM;;;;;;KAOL,yBAAyB;WAC1B,MAAM;;KAGL,wBAAwB,KAAK,YAAY,yBAAyB;KAClE,0BAA0B,KAAK,YAAY,2BAA2B;KACtE,2BAA2B,KAAK,YAAY,4BAA4B;KACxE,wBAAwB,KAAK,YAAY,yBAAyB;UAE7D,6BAA6B;EAC5C,UAAU,wBAAwB;EAClC,YAAY,0BAA0B;EACtC,cAAc,2BAA2B;EACzC,UAAU,wBAAwB;;;;;;;;UAanB,qBAAqB,WAAW;;EAE/C,WAAW,gBAAgB;;EAG3B;;WAGS,eAAe,YAAY;;EAGpC,eAAe;;;;;EAMf,WAAW,WAAW,WAAW,OAAO;EAExC,oBAAoB,gBAAgB,6BAA6B,IAC/D,MAAM,GACN,WAAW,OAAO,6BAA6B,GAAG,aAClD,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB;;;;;;KAQZ,oBAAoB,MAAM,iCAAiC,cAAc,qBAAqB;;;;;;KAW9F,oBAAoB;WACrB,UAAU,YAAY;WACtB;;KAGC,mBAAmB,KAAK,YAAY,oBAAoB;UAEnD,iCAAiC;EAChD,kBAAkB,mBAAmB;;;;cC9E1B,yBAAyB,qBAAqB;;EACb;EAG5C;MAgBI,aAAa,MAAM;MAInB,QAAQ,SAAS,MAAM;MAKvB,WAAW,oBAAoB;MAI/B,QAAQ,OAAO,oBAAoB;MAQnC,YAAY,oBAAoB;MAIhC,SAAS,OAAO,oBAAoB;;MAWpC,iBAAiB,YAAY;;;;;EAcjC,SAAS,WAAW,WAAW,OAAO;YAUnB;EAIV;EAKA;YAKU,QAAQ,SAAS;YAQjB,iBAAM,wBAAA;;QAmJnB;YACI;IACR,4BAA4B;;;UAIf,yBAAyB;EACxC,oBAAoB,gBAAgB,iCAAiC,IACnE,MAAM,GACN,WAAW,MAAM,yBAAyB,IAAI,OAAO,iCAAiC,GAAG,aACzF,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
@@ -1,2 +1,2 @@
1
- import { a as IGroupedSubComponent, c as SubComponentActivateEvent, d as SubComponentItemClickEvent, f as SubComponentSelectDetail, h as SubComponentTickleEvent, i as GroupedSelectEvent, l as SubComponentFactory, m as SubComponentTickleDetail, n as GroupedItemListerElementEventMap, o as IGroupedSubComponentEventMap, p as SubComponentSelectEvent, r as GroupedSelectDetail, s as SubComponentActivateDetail, t as GroupedItemListerElement, u as SubComponentItemClickDetail } from "./grouped-item-lister-_pMDwIo1.js";
1
+ import { a as IGroupedSubComponent, c as SubComponentActivateEvent, d as SubComponentItemClickEvent, f as SubComponentSelectDetail, h as SubComponentTickleEvent, i as GroupedSelectEvent, l as SubComponentFactory, m as SubComponentTickleDetail, n as GroupedItemListerElementEventMap, o as IGroupedSubComponentEventMap, p as SubComponentSelectEvent, r as GroupedSelectDetail, s as SubComponentActivateDetail, t as GroupedItemListerElement, u as SubComponentItemClickDetail } from "./grouped-item-lister-DnWB-eFT.js";
2
2
  export { GroupedItemListerElement, type GroupedItemListerElementEventMap, type GroupedSelectDetail, type GroupedSelectEvent, type IGroupedSubComponent, type IGroupedSubComponentEventMap, type SubComponentActivateDetail, type SubComponentActivateEvent, type SubComponentFactory, type SubComponentItemClickDetail, type SubComponentItemClickEvent, type SubComponentSelectDetail, type SubComponentSelectEvent, type SubComponentTickleDetail, type SubComponentTickleEvent };
@@ -1,6 +1,6 @@
1
- import { t as themeFallbacks } from "./fallbacks-DEE1nCTt.js";
1
+ import { t as themeFallbacks } from "./fallbacks-DNI9xt0F.js";
2
2
  import { n as safeCustomElement, t as __decorate } from "./decorate-VRK8rslU.js";
3
- import { a as registerDefaults, c as iconBus, o as getIcon } from "./defaults-BCiDhZbF.js";
3
+ import { r as iconBus, t as getIcon } from "./registry-CkW7q09Q.js";
4
4
  import { LitElement, css, html, nothing } from "lit";
5
5
  import { property } from "lit/decorators.js";
6
6
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
@@ -97,9 +97,6 @@ __decorate([property({
97
97
  })], IxfxIconElement.prototype, "rotate", void 0);
98
98
  IxfxIconElement = __decorate([safeCustomElement(`ixfx-icon`)], IxfxIconElement);
99
99
  //#endregion
100
- //#region src/icons/index.ts
101
- registerDefaults();
102
- //#endregion
103
100
  export { IxfxIconElement as t };
104
101
 
105
- //# sourceMappingURL=icons-Bm2ByQ3s.js.map
102
+ //# sourceMappingURL=icon-CvnPanhA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-CvnPanhA.js","names":["#onIconChange","customElement"],"sources":["../src/icons/icon.ts"],"sourcesContent":["import type { IconChangedEvent } from './registry.js';\nimport { css, html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { themeFallbacks } from '../styles/fallbacks.js';\nimport { safeCustomElement as customElement } from '../util/custom-elements.js';\nimport { getIcon, iconBus } from './registry.js';\n\n/**\n * Renders an icon from the icon registry by name.\n *\n * @example\n * ```html\n * <ixfx-icon name=\"chevron-down\"></ixfx-icon>\n * <ixfx-icon name=\"close\" size=\"32\" label=\"Close dialog\"></ixfx-icon>\n * ```\n *\n * Use `registerIcon(name, svgString)` to add or override icons.\n */\n@customElement(`ixfx-icon`)\nexport class IxfxIconElement extends LitElement {\n @property() name = ``;\n @property({ type: Number }) size: number | undefined;\n @property() label = ``;\n @property({ type: Boolean, attribute: `prominence` }) prominence = false;\n @property({ type: String, attribute: `rotate`, reflect: true }) rotate = ``;\n\n #onIconChange = (e: Event): void => {\n if ((e as IconChangedEvent).detail.name === this.name) {\n this.requestUpdate();\n }\n };\n\n override connectedCallback(): void {\n super.connectedCallback();\n iconBus.addEventListener(`ixfx-icon-change`, this.#onIconChange);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n iconBus.removeEventListener(`ixfx-icon-change`, this.#onIconChange);\n }\n\n protected override render() {\n const svg = getIcon(this.name);\n if (!svg)\n return nothing;\n\n const hasLabel = this.label.length > 0;\n\n return html`\n <span\n class=\"icon-wrapper\"\n aria-hidden=${hasLabel ? nothing : `true`}\n aria-label=${hasLabel ? this.label : nothing}\n >${unsafeHTML(svg)}</span>\n `;\n }\n\n protected override updated(changed: Map<string, unknown>): void {\n super.updated(changed);\n if (changed.has(`rotate`)) {\n if (this.rotate?.length > 0) {\n this.style.setProperty(`--rotate`, this.rotate);\n } else {\n this.style.removeProperty(`--rotate`);\n }\n }\n }\n\n static override styles = [themeFallbacks, css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n opacity: var(--opacity, 1);\n }\n\n :host([prominence]) {\n opacity: var(--prominence-idle-opacity, 1);\n }\n\n :host([prominence]:hover) {\n opacity: var(--prominence-tickled-opacity, 1);\n }\n\n :host([prominence][disabled]) {\n opacity: var(--prominence-disabled-opacity, 0.5);\n }\n\n .icon-wrapper {\n display: contents;\n }\n\n :host svg {\n width: 100%;\n height: 100%;\n transition: transform var(--transition, 0.15s ease-out);\n }\n\n :host([rotate]) svg {\n transform: rotate(var(--rotate));\n }\n `];\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'ixfx-icon': IxfxIconElement;\n }\n}\n"],"mappings":";;;;;;;AAoBO,IAAM,kBAAN,MAAM,wBAAwB,WAAW;;;EAC3B,KAAA,OAAA;EAEC,KAAA,QAAA;EAC+C,KAAA,aAAA;EACM,KAAA,SAAA;EAExD,KAAA,iBAAA,MAAmB;GAClC,IAAK,EAAuB,OAAO,SAAS,KAAK,MAC/C,KAAK,cAAc;EAEvB;;CAJA;CAMA,oBAAmC;EACjC,MAAM,kBAAkB;EACxB,QAAQ,iBAAiB,oBAAoB,KAAKA,aAAa;CACjE;CAEA,uBAAsC;EACpC,MAAM,qBAAqB;EAC3B,QAAQ,oBAAoB,oBAAoB,KAAKA,aAAa;CACpE;CAEA,SAA4B;EAC1B,MAAM,MAAM,QAAQ,KAAK,IAAI;EAC7B,IAAI,CAAC,KACH,OAAO;EAET,MAAM,WAAW,KAAK,MAAM,SAAS;EAErC,OAAO,IAAI;;;sBAGO,WAAW,UAAU,OAAO;qBAC7B,WAAW,KAAK,QAAQ,QAAQ;SAC5C,WAAW,GAAG,EAAE;;CAEvB;CAEA,QAA2B,SAAqC;EAC9D,MAAM,QAAQ,OAAO;EACrB,IAAI,QAAQ,IAAI,QAAQ,GAAG;GACzB,IAAI,KAAK,QAAQ,SAAS,GACxB,KAAK,MAAM,YAAY,YAAY,KAAK,MAAM;QAE9C,KAAK,MAAM,eAAe,UAAU;EAExC;CACF;;EAEyB,KAAA,SAAA,CAAC,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmC5C;;AACH;AArFG,WAAA,CAAA,SAAS,CAAA,GAAA,gBAAA,WAAA,QAAA,KAAA,CAAA;AACT,WAAA,CAAA,SAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,gBAAA,WAAA,QAAA,KAAA,CAAA;AACzB,WAAA,CAAA,SAAS,CAAA,GAAA,gBAAA,WAAA,SAAA,KAAA,CAAA;AACT,WAAA,CAAA,SAAS;CAAE,MAAM;CAAS,WAAW;AAAa,CAAC,CAAA,GAAA,gBAAA,WAAA,cAAA,KAAA,CAAA;AACnD,WAAA,CAAA,SAAS;CAAE,MAAM;CAAQ,WAAW;CAAU,SAAS;AAAK,CAAC,CAAA,GAAA,gBAAA,WAAA,UAAA,KAAA,CAAA;AAN/DC,kBAAAA,WAAAA,CAAAA,kBAAc,WAAW,CAAA,GAAA,eAAA"}
package/dist/icons.js CHANGED
@@ -1,3 +1,9 @@
1
- import { c as iconBus, i as ICON_CLOSE, l as registerIcon, n as ICON_CHECK, o as getIcon, r as ICON_CHEVRON_DOWN, s as hasIcon, t as ICON_CARET_RIGHT, u as svgToDataUri } from "./defaults-BCiDhZbF.js";
2
- import { t as IxfxIconElement } from "./icons-Bm2ByQ3s.js";
1
+ import { a as svgToDataUri, i as registerIcon, n as hasIcon, r as iconBus, t as getIcon } from "./registry-CkW7q09Q.js";
2
+ import { t as IxfxIconElement } from "./icon-CvnPanhA.js";
3
+ import { a as registerDefaults, i as ICON_CLOSE, n as ICON_CHECK, r as ICON_CHEVRON_DOWN, t as ICON_CARET_RIGHT } from "./defaults-BkWCPJFL.js";
4
+ //#region src/icons/index.ts
5
+ registerDefaults();
6
+ //#endregion
3
7
  export { ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE, IxfxIconElement, getIcon, hasIcon, iconBus, registerIcon, svgToDataUri };
8
+
9
+ //# sourceMappingURL=icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.js","names":[],"sources":["../src/icons/index.ts"],"sourcesContent":["import { registerDefaults } from './defaults.js';\n\nexport { ICON_CARET_RIGHT, ICON_CHECK, ICON_CHEVRON_DOWN, ICON_CLOSE } from './defaults.js';\nexport { IxfxIconElement } from './icon.js';\nexport { getIcon, hasIcon, iconBus, registerIcon, svgToDataUri } from './registry.js';\nexport type { IconChangedDetail, IconChangedEvent } from './registry.js';\n\nregisterDefaults();\n"],"mappings":";;;;AAOA,iBAAiB"}
@@ -0,0 +1,101 @@
1
+ import { t as LabelledInputBase } from "./labelled-input-base-DiTme1JO.js";
2
+ import { n as EditableLabel } from "./editable-label-rzXkjf1H.js";
3
+ import { n as WheelNudgeConsumerType, t as WheelDirection } from "./wheel-nudge-DGrNzWuE.js";
4
+ import { f as SliderMarkerStyle, m as SliderSingleStyle } from "./slider-input-BfRUW2ZB.js";
5
+ import { CSSResult, CSSResultGroup } from "lit";
6
+ //#region src/editable-label/editable-number.d.ts
7
+ declare const EditableNumber_base: (new (...args: any[]) => WheelNudgeConsumerType<EditableLabel>) & typeof EditableLabel;
8
+ declare class EditableNumber extends EditableNumber_base {
9
+ #private;
10
+ min?: number;
11
+ max?: number;
12
+ step?: number;
13
+ /** Quantised stops for keyboard nudging. Overrides `step` when > 1. */
14
+ stops?: number;
15
+ dragSensitivity: number;
16
+ fillStyle?: `linear` | `circular`;
17
+ linearStyle?: `range` | `bipolar` | `unipolar`;
18
+ circularStyle?: `grow` | `offset` | `dot`;
19
+ noDrag: boolean;
20
+ precision: number;
21
+ constructor();
22
+ render(): import("lit").TemplateResult<1>;
23
+ private _stopNativeInput;
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ private _handleMouseEnter;
27
+ private _handleMouseLeave;
28
+ /** Click just focuses; edit mode is entered by pressing a key while focused. */
29
+ protected _handleClick: () => void;
30
+ /** Suppress auto-edit-on-focus from editor mode; keydown handles it instead. */
31
+ protected _handleFocus: () => void;
32
+ /** Override to use .number instead of .content for text display */
33
+ protected get _contentEl(): HTMLElement | undefined;
34
+ firstUpdated(changedProperties: Map<string, unknown>): void;
35
+ protected _onUserInteraction(): void;
36
+ private _onValueChange;
37
+ updated(changedProperties: Map<string, unknown>): void;
38
+ private _updateValueCss;
39
+ protected _getDisplayText(): string;
40
+ protected _tryCommit(): void;
41
+ protected _handleBeforeInput: (e: InputEvent) => void;
42
+ protected _handleKeydown: (e: KeyboardEvent) => void;
43
+ private _onKeyDown;
44
+ private _handleArrowKey;
45
+ /**
46
+ * Apply a signed delta to the current value, clamp/snap/format, and fire
47
+ * `input`/`change`. Shared between arrow-key handler and the wheel handler.
48
+ */
49
+ private _applyDelta;
50
+ _shouldHandleWheel(): boolean;
51
+ _applyWheelDelta(direction: WheelDirection, event: WheelEvent): void;
52
+ private _onPointerDown;
53
+ private _onPointerMove;
54
+ private _onPointerUp;
55
+ private _interceptClick;
56
+ private _parseValue;
57
+ /**
58
+ * Formats the stored value for display, inferring decimal places from the value
59
+ * string itself. This preserves typed precision (e.g. "0.1234" stays "0.1234")
60
+ * and also respects trailing zeros written by drag storage (e.g. "5.0" stays "5.0").
61
+ */
62
+ private _formatDisplay;
63
+ private _clamp;
64
+ private _snap;
65
+ private _inferDecimals;
66
+ private _formatNumber;
67
+ /** Returns a 0..1 fraction for the given value within [min, max]. */
68
+ private _normalizedValue;
69
+ static styles: CSSResult[];
70
+ }
71
+ declare global {
72
+ interface HTMLElementTagNameMap {
73
+ 'ixfx-editable-number': EditableNumber;
74
+ }
75
+ }
76
+ //#endregion
77
+ //#region src/labelled-slider-input/labelled-slider-input.d.ts
78
+ declare class LabelledSliderInput extends LabelledInputBase {
79
+ readonly inputSelector = "ixfx-slider-input";
80
+ orientation: `horizontal` | `vertical`;
81
+ singleStyle: SliderSingleStyle;
82
+ markerStyle: SliderMarkerStyle;
83
+ stops: number | undefined;
84
+ disabled: boolean;
85
+ swipeable: boolean;
86
+ /** Pass-through: enables wheel-on-hover for the inner slider and editable-number. */
87
+ lighttouch: boolean;
88
+ switchHeight: number;
89
+ protected _renderEditableNumber(): import("lit").TemplateResult<1>;
90
+ protected _syncValue(v: number): void;
91
+ render(): import("lit").TemplateResult<1>;
92
+ static styles: CSSResultGroup;
93
+ }
94
+ declare global {
95
+ interface HTMLElementTagNameMap {
96
+ 'ixfx-labelled-slider-input': LabelledSliderInput;
97
+ }
98
+ }
99
+ //#endregion
100
+ export { EditableNumber as n, LabelledSliderInput as t };
101
+ //# sourceMappingURL=index-CG2vIgPv.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CG2vIgPv.d.ts","names":[],"sources":["../src/editable-label/editable-number.ts","../src/labelled-slider-input/labelled-slider-input.ts"],"mappings":";;;;;;;cAoDa,uBAAuB;;EACN;EACA;EACA;;EAEA;EAC+B;EACpB;EACE;EACE;EACQ;EACvB;;EAqBnB,wBAAM;UAoBP;EAMC;EAWA;UAWD;UAWA;;YAkBE;;YAOS;;gBAGL,cAAc;EAKnB,aAAa,mBAAmB;YAU/B;UA0BF;EAaC,QAAQ,mBAAmB;UAW5B;YAyCW;YAuBA;YAaA,qBAAsB,GAAG;YA6BzB,iBAAkB,GAAG;UA8BhC;UAiBA;;;;;UA4CA;EAmCC;EAMA,iBAAiB,WAAW,gBAAgB,OAAO;UAQpD;UAkBA;UA2CA;UA0BA;UASA;;;;;;UASA;UAYA;UAQA;UAYA;UAYA;;UAKA;SAUQ,QAAQ;;QAoKlB;YACI;IACR,wBAAwB;;;;;cCjuBf,4BAA4B;WAC9B;EAEmB;EAC2B,aAAa;EACb,aAAa;EACxC;EACgB;EACA;;EAEf;EAE2B;YAErC,uCAAqB;YA2BrB,WAAW;EAUrB,wBAAM;SA0BR,QAAQ;;QAyGT;YACI;IACR,8BAA8B"}