@f-ewald/components 1.38.0 → 1.40.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 (197) hide show
  1. package/README.md +48 -0
  2. package/custom-elements.json +1052 -131
  3. package/dist/address-autocomplete.js +2 -2
  4. package/dist/address-autocomplete.js.map +1 -1
  5. package/dist/app-shell.js +4 -4
  6. package/dist/app-shell.js.map +1 -1
  7. package/dist/app-sidebar.js +2 -2
  8. package/dist/app-sidebar.js.map +1 -1
  9. package/dist/audio-player.js +1 -1
  10. package/dist/audio-player.js.map +1 -1
  11. package/dist/autocomplete-input.js +2 -2
  12. package/dist/autocomplete-input.js.map +1 -1
  13. package/dist/breadcrumb-nav.d.ts +69 -0
  14. package/dist/breadcrumb-nav.d.ts.map +1 -0
  15. package/dist/breadcrumb-nav.js +235 -0
  16. package/dist/breadcrumb-nav.js.map +1 -0
  17. package/dist/button-group.js +2 -2
  18. package/dist/button-group.js.map +1 -1
  19. package/dist/calendar-day.js +3 -3
  20. package/dist/calendar-day.js.map +1 -1
  21. package/dist/calendar-month.d.ts.map +1 -1
  22. package/dist/calendar-month.js +4 -1
  23. package/dist/calendar-month.js.map +1 -1
  24. package/dist/calendar-week.js +4 -4
  25. package/dist/calendar-week.js.map +1 -1
  26. package/dist/chat-message.js +1 -1
  27. package/dist/chat-message.js.map +1 -1
  28. package/dist/comment-composer.js +1 -1
  29. package/dist/comment-composer.js.map +1 -1
  30. package/dist/confirm-dialog.d.ts.map +1 -1
  31. package/dist/confirm-dialog.js +5 -2
  32. package/dist/confirm-dialog.js.map +1 -1
  33. package/dist/content-divider.js +1 -1
  34. package/dist/content-divider.js.map +1 -1
  35. package/dist/cron-schedule.d.ts.map +1 -1
  36. package/dist/cron-schedule.js +6 -5
  37. package/dist/cron-schedule.js.map +1 -1
  38. package/dist/data-table.d.ts.map +1 -1
  39. package/dist/data-table.js +3 -2
  40. package/dist/data-table.js.map +1 -1
  41. package/dist/dropdown-button.d.ts.map +1 -1
  42. package/dist/dropdown-button.js +4 -2
  43. package/dist/dropdown-button.js.map +1 -1
  44. package/dist/editable-text.js +1 -1
  45. package/dist/editable-text.js.map +1 -1
  46. package/dist/empty-state.d.ts +42 -0
  47. package/dist/empty-state.d.ts.map +1 -0
  48. package/dist/empty-state.js +172 -0
  49. package/dist/empty-state.js.map +1 -0
  50. package/dist/form-field.js +1 -1
  51. package/dist/form-field.js.map +1 -1
  52. package/dist/form-select.js +3 -3
  53. package/dist/form-select.js.map +1 -1
  54. package/dist/frame-box.js +1 -1
  55. package/dist/frame-box.js.map +1 -1
  56. package/dist/fullscreen-button.js +1 -1
  57. package/dist/fullscreen-button.js.map +1 -1
  58. package/dist/icons.d.ts +2 -0
  59. package/dist/icons.d.ts.map +1 -1
  60. package/dist/icons.js +2 -0
  61. package/dist/icons.js.map +1 -1
  62. package/dist/index.d.ts +6 -1
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +6 -1
  65. package/dist/index.js.map +1 -1
  66. package/dist/kanban-card.js +1 -1
  67. package/dist/kanban-card.js.map +1 -1
  68. package/dist/kanban-column.js +3 -3
  69. package/dist/kanban-column.js.map +1 -1
  70. package/dist/kbd-hint.d.ts.map +1 -1
  71. package/dist/kbd-hint.js +2 -1
  72. package/dist/kbd-hint.js.map +1 -1
  73. package/dist/link-card.js +1 -1
  74. package/dist/link-card.js.map +1 -1
  75. package/dist/markdown-view.js +3 -3
  76. package/dist/markdown-view.js.map +1 -1
  77. package/dist/modal-dialog.js +1 -1
  78. package/dist/modal-dialog.js.map +1 -1
  79. package/dist/multi-select.js +5 -5
  80. package/dist/multi-select.js.map +1 -1
  81. package/dist/pagination-nav.d.ts.map +1 -1
  82. package/dist/pagination-nav.js +5 -1
  83. package/dist/pagination-nav.js.map +1 -1
  84. package/dist/photo-gallery.js +1 -1
  85. package/dist/photo-gallery.js.map +1 -1
  86. package/dist/popover-panel.d.ts.map +1 -1
  87. package/dist/popover-panel.js +4 -2
  88. package/dist/popover-panel.js.map +1 -1
  89. package/dist/progress-bar.d.ts.map +1 -1
  90. package/dist/progress-bar.js +1 -0
  91. package/dist/progress-bar.js.map +1 -1
  92. package/dist/radio-cards.js +1 -1
  93. package/dist/radio-cards.js.map +1 -1
  94. package/dist/radio-pills.js +1 -1
  95. package/dist/radio-pills.js.map +1 -1
  96. package/dist/reveal-button.js +1 -1
  97. package/dist/reveal-button.js.map +1 -1
  98. package/dist/scroll-to-bottom.js +1 -1
  99. package/dist/scroll-to-bottom.js.map +1 -1
  100. package/dist/scroll-to-top.js +1 -1
  101. package/dist/scroll-to-top.js.map +1 -1
  102. package/dist/skip-link.d.ts +30 -0
  103. package/dist/skip-link.d.ts.map +1 -0
  104. package/dist/skip-link.js +136 -0
  105. package/dist/skip-link.js.map +1 -0
  106. package/dist/slide-panel.js +1 -1
  107. package/dist/slide-panel.js.map +1 -1
  108. package/dist/spec-list.d.ts +49 -0
  109. package/dist/spec-list.d.ts.map +1 -0
  110. package/dist/spec-list.js +168 -0
  111. package/dist/spec-list.js.map +1 -0
  112. package/dist/stat-meter.d.ts.map +1 -1
  113. package/dist/stat-meter.js +1 -0
  114. package/dist/stat-meter.js.map +1 -1
  115. package/dist/tab-bar.js +1 -1
  116. package/dist/tab-bar.js.map +1 -1
  117. package/dist/text-area.js +1 -1
  118. package/dist/text-area.js.map +1 -1
  119. package/dist/tile-grid.js +1 -1
  120. package/dist/tile-grid.js.map +1 -1
  121. package/dist/tokens.css +42 -1
  122. package/dist/tokens.d.ts +50 -0
  123. package/dist/tokens.d.ts.map +1 -1
  124. package/dist/tokens.js +132 -0
  125. package/dist/tokens.js.map +1 -1
  126. package/dist/tree-view.js +2 -2
  127. package/dist/tree-view.js.map +1 -1
  128. package/dist/ui-admonition.js +1 -1
  129. package/dist/ui-admonition.js.map +1 -1
  130. package/dist/ui-button.js +1 -1
  131. package/dist/ui-button.js.map +1 -1
  132. package/dist/ui-checkbox.d.ts +10 -1
  133. package/dist/ui-checkbox.d.ts.map +1 -1
  134. package/dist/ui-checkbox.js +11 -2
  135. package/dist/ui-checkbox.js.map +1 -1
  136. package/dist/video-player.js +1 -1
  137. package/dist/video-player.js.map +1 -1
  138. package/dist/vote-control.d.ts +40 -0
  139. package/dist/vote-control.d.ts.map +1 -0
  140. package/dist/vote-control.js +311 -0
  141. package/dist/vote-control.js.map +1 -0
  142. package/docs/address-autocomplete.md +1 -0
  143. package/docs/app-shell.md +1 -0
  144. package/docs/app-sidebar.md +1 -0
  145. package/docs/audio-player.md +1 -0
  146. package/docs/autocomplete-input.md +1 -0
  147. package/docs/breadcrumb-nav.md +70 -0
  148. package/docs/button-group.md +1 -0
  149. package/docs/calendar-day.md +1 -0
  150. package/docs/calendar-month.md +1 -0
  151. package/docs/calendar-week.md +1 -0
  152. package/docs/chat-message.md +1 -0
  153. package/docs/comment-composer.md +1 -0
  154. package/docs/confirm-dialog.md +1 -0
  155. package/docs/content-divider.md +1 -0
  156. package/docs/cron-schedule.md +2 -0
  157. package/docs/data-table.md +2 -0
  158. package/docs/design-language.md +57 -5
  159. package/docs/dropdown-button.md +1 -0
  160. package/docs/editable-text.md +1 -0
  161. package/docs/empty-state.md +55 -0
  162. package/docs/form-field.md +1 -0
  163. package/docs/form-select.md +1 -0
  164. package/docs/frame-box.md +1 -0
  165. package/docs/fullscreen-button.md +1 -0
  166. package/docs/icons.md +1 -0
  167. package/docs/kanban-card.md +1 -0
  168. package/docs/kanban-column.md +1 -0
  169. package/docs/kbd-hint.md +1 -0
  170. package/docs/link-card.md +1 -0
  171. package/docs/markdown-view.md +1 -0
  172. package/docs/modal-dialog.md +1 -0
  173. package/docs/multi-select.md +1 -0
  174. package/docs/pagination-nav.md +2 -0
  175. package/docs/photo-gallery.md +1 -0
  176. package/docs/popover-panel.md +1 -0
  177. package/docs/progress-bar.md +1 -0
  178. package/docs/radio-cards.md +1 -0
  179. package/docs/radio-pills.md +1 -0
  180. package/docs/reveal-button.md +1 -0
  181. package/docs/scroll-to-bottom.md +1 -0
  182. package/docs/scroll-to-top.md +1 -0
  183. package/docs/skip-link.md +54 -0
  184. package/docs/slide-panel.md +1 -0
  185. package/docs/spec-list.md +71 -0
  186. package/docs/stat-meter.md +1 -0
  187. package/docs/tab-bar.md +1 -0
  188. package/docs/text-area.md +1 -0
  189. package/docs/tile-grid.md +1 -0
  190. package/docs/tree-view.md +1 -0
  191. package/docs/ui-admonition.md +1 -0
  192. package/docs/ui-button.md +1 -0
  193. package/docs/ui-checkbox.md +13 -2
  194. package/docs/video-player.md +1 -0
  195. package/docs/vote-control.md +73 -0
  196. package/llms.txt +210 -49
  197. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-to-top.js","sourceRoot":"","sources":["../src/scroll-to-top.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAkGL,0EAA0E;QAC1C,WAAM,GAAuB,IAAI,CAAC;QAClE,mEAAmE;QACvC,cAAS,GAAG,GAAG,CAAC;QAC5C,oDAAoD;QACxC,UAAK,GAAG,eAAe,CAAC;QAEnB,aAAQ,GAAG,KAAK,CAAC;QAElC,gBAAW,GAAgC,IAAI,CAAC;QAwChD,cAAS,GAAG,GAAS,EAAE;YACrB,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAA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;QAC/E,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,YAAY;QACV,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,SAAS,CAEP;IAEF,QAAQ;QACN,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;QACrC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,yBAAyB,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAClG,CAAC;QACF,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;qCACsB,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;UAChD,aAAa,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,KAAK;;KAErB,CAAC;IACJ,CAAC;CACF,CAAA;AApEiC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2CAAmC;AAEtC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAiB;AAEhC;IAAX,QAAQ,EAAE;0CAAyB;AAEnB;IAAhB,KAAK,EAAE;6CAA0B;AAzGvB,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAuKvB","sourcesContent":["import { LitElement, css, html, type PropertyValues } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconChevronUp } from \"./icons.js\";\nimport { distanceFromTop, scrollToEdge } from \"./utils/scroll.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * Overlay button that appears once the page (or a given `target` container)\n * has scrolled more than `threshold` pixels away from the top edge, and\n * scrolls back to the top on click.\n *\n * With no `target` (default), the button is `position: fixed` to the\n * viewport. When `target` is set, the button switches to `position:\n * absolute` and expects to be placed as a descendant of a `position:\n * relative` (or otherwise positioned) ancestor that establishes the visual\n * bounds to float within — typically `target` itself, given `overflow-y:\n * auto; position: relative`, so the button stays pinned to that container's\n * own visible corner as its content scrolls, rather than floating over the\n * whole page.\n *\n * The control is styled as a standard secondary button (ui-button's\n * `secondary` variant: 2rem tall, `--ui-radius-sm` corners, the\n * `--ui-button-secondary-*` background/border tokens, so a gradient theme\n * carries over) rather than a pill, layered over an opaque `--ui-surface`\n * base and an elevation shadow, since it floats above scrolled content.\n *\n * @element scroll-to-top\n * @fires scroll-to-top-triggered - The button was clicked, just before\n * scrolling; detail: `{ target }`.\n */\n@customElement(\"scroll-to-top\")\nexport class ScrollToTop extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n position: fixed;\n bottom: 0.75rem;\n right: 0.75rem;\n z-index: 40;\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity 150ms ease,\n visibility 0s linear 150ms;\n }\n :host([contained]) {\n position: absolute;\n }\n :host([visible]) {\n opacity: 1;\n visibility: visible;\n transition:\n opacity 150ms ease,\n visibility 0s linear 0s;\n }\n button {\n pointer-events: auto;\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n height: 2rem;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n color: var(--ui-text, #0f172a);\n /* ui-button's secondary variant, over an opaque --ui-surface base: a\n floating control can't let scrolled content show through the way a\n secondary button's transparent flat background does. */\n background:\n var(--ui-button-secondary-background, none),\n var(--ui-surface, #ffffff);\n border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow:\n var(--ui-button-highlight, 0 0 0 0 transparent),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n cursor: pointer;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n line-height: var(--ui-line-height-tight, 1.25);\n white-space: nowrap;\n }\n button:hover {\n background:\n var(--ui-button-secondary-background-hover, none),\n var(--ui-surface-muted, #f8fafc);\n border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));\n }\n button:active {\n background:\n var(--ui-button-secondary-background-active, var(--ui-button-secondary-background, none)),\n var(--ui-surface-muted, #f8fafc);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n button:focus-visible {\n outline: none;\n box-shadow:\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n :host([visible]) {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n button:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n `,\n ];\n\n /** Scrollable container to control; `null` (default) scrolls `window`. */\n @property({ attribute: false }) target: HTMLElement | null = null;\n /** Pixels scrolled away from the top before the button appears. */\n @property({ type: Number }) threshold = 200;\n /** Visible button text, and its accessible name. */\n @property() label = \"Scroll to top\";\n\n @state() private _visible = false;\n\n #listenedTo: HTMLElement | Window | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#subscribe();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#unsubscribe();\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (changed.has(\"target\")) {\n this.toggleAttribute(\"contained\", this.target !== null);\n // Resubscribing here (not in `updated()`) lets `#onScroll()`'s\n // `_visible` write fold into the update already in progress instead of\n // scheduling a new one. Guarded against the initial update, where\n // `target` is always in `changed` too, but `connectedCallback` already\n // subscribed to it.\n if (this.#listenedTo !== (this.target ?? window)) this.#subscribe();\n }\n }\n\n protected override updated(changed: PropertyValues): void {\n if (changed.has(\"_visible\")) this.toggleAttribute(\"visible\", this._visible);\n }\n\n #subscribe(): void {\n this.#unsubscribe();\n this.#listenedTo = this.target ?? window;\n this.#listenedTo.addEventListener(\"scroll\", this.#onScroll, { passive: true });\n this.#onScroll();\n }\n\n #unsubscribe(): void {\n this.#listenedTo?.removeEventListener(\"scroll\", this.#onScroll);\n this.#listenedTo = null;\n }\n\n #onScroll = (): void => {\n this._visible = distanceFromTop(this.target ?? window) > this.threshold;\n };\n\n #onClick(): void {\n const target = this.target ?? window;\n this.dispatchEvent(\n new CustomEvent(\"scroll-to-top-triggered\", { detail: { target }, bubbles: true, composed: true }),\n );\n scrollToEdge(target, \"top\");\n }\n\n override render() {\n return html`\n <button type=\"button\" @click=${() => this.#onClick()}>\n ${iconChevronUp(14)}\n <span>${this.label}</span>\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"scroll-to-top\": ScrollToTop;\n }\n}\n"]}
1
+ {"version":3,"file":"scroll-to-top.js","sourceRoot":"","sources":["../src/scroll-to-top.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEI,IAAM,WAAW,GAAj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AX,QAAQ,EAAE;0CAAyB;AAEnB;IAAhB,KAAK,EAAE;6CAA0B;AAzGvB,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAuKvB","sourcesContent":["import { LitElement, css, html, type PropertyValues } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconChevronUp } from \"./icons.js\";\nimport { distanceFromTop, scrollToEdge } from \"./utils/scroll.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * Overlay button that appears once the page (or a given `target` container)\n * has scrolled more than `threshold` pixels away from the top edge, and\n * scrolls back to the top on click.\n *\n * With no `target` (default), the button is `position: fixed` to the\n * viewport. When `target` is set, the button switches to `position:\n * absolute` and expects to be placed as a descendant of a `position:\n * relative` (or otherwise positioned) ancestor that establishes the visual\n * bounds to float within — typically `target` itself, given `overflow-y:\n * auto; position: relative`, so the button stays pinned to that container's\n * own visible corner as its content scrolls, rather than floating over the\n * whole page.\n *\n * The control is styled as a standard secondary button (ui-button's\n * `secondary` variant: 2rem tall, `--ui-radius-sm` corners, the\n * `--ui-button-secondary-*` background/border tokens, so a gradient theme\n * carries over) rather than a pill, layered over an opaque `--ui-surface`\n * base and an elevation shadow, since it floats above scrolled content.\n *\n * @element scroll-to-top\n * @fires scroll-to-top-triggered - The button was clicked, just before\n * scrolling; detail: `{ target }`.\n */\n@customElement(\"scroll-to-top\")\nexport class ScrollToTop extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n position: fixed;\n bottom: 0.75rem;\n right: 0.75rem;\n z-index: 40;\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity 150ms ease,\n visibility 0s linear 150ms;\n }\n :host([contained]) {\n position: absolute;\n }\n :host([visible]) {\n opacity: 1;\n visibility: visible;\n transition:\n opacity 150ms ease,\n visibility 0s linear 0s;\n }\n button {\n pointer-events: auto;\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n height: 2rem;\n box-sizing: border-box;\n padding: 0.5rem 1rem;\n color: var(--ui-text, #0f172a);\n /* ui-button's secondary variant, over an opaque --ui-surface base: a\n floating control can't let scrolled content show through the way a\n secondary button's transparent flat background does. */\n background:\n var(--ui-button-secondary-background, none),\n var(--ui-surface, #ffffff);\n border: var(--ui-border-width, 1px) solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow:\n var(--ui-button-highlight, 0 0 0 0 transparent),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n cursor: pointer;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n line-height: var(--ui-line-height-tight, 1.25);\n white-space: nowrap;\n }\n button:hover {\n background:\n var(--ui-button-secondary-background-hover, none),\n var(--ui-surface-muted, #f8fafc);\n border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));\n }\n button:active {\n background:\n var(--ui-button-secondary-background-active, var(--ui-button-secondary-background, none)),\n var(--ui-surface-muted, #f8fafc);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n button:focus-visible {\n outline: none;\n box-shadow:\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n @media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n :host([visible]) {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n button:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n `,\n ];\n\n /** Scrollable container to control; `null` (default) scrolls `window`. */\n @property({ attribute: false }) target: HTMLElement | null = null;\n /** Pixels scrolled away from the top before the button appears. */\n @property({ type: Number }) threshold = 200;\n /** Visible button text, and its accessible name. */\n @property() label = \"Scroll to top\";\n\n @state() private _visible = false;\n\n #listenedTo: HTMLElement | Window | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.#subscribe();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#unsubscribe();\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n if (changed.has(\"target\")) {\n this.toggleAttribute(\"contained\", this.target !== null);\n // Resubscribing here (not in `updated()`) lets `#onScroll()`'s\n // `_visible` write fold into the update already in progress instead of\n // scheduling a new one. Guarded against the initial update, where\n // `target` is always in `changed` too, but `connectedCallback` already\n // subscribed to it.\n if (this.#listenedTo !== (this.target ?? window)) this.#subscribe();\n }\n }\n\n protected override updated(changed: PropertyValues): void {\n if (changed.has(\"_visible\")) this.toggleAttribute(\"visible\", this._visible);\n }\n\n #subscribe(): void {\n this.#unsubscribe();\n this.#listenedTo = this.target ?? window;\n this.#listenedTo.addEventListener(\"scroll\", this.#onScroll, { passive: true });\n this.#onScroll();\n }\n\n #unsubscribe(): void {\n this.#listenedTo?.removeEventListener(\"scroll\", this.#onScroll);\n this.#listenedTo = null;\n }\n\n #onScroll = (): void => {\n this._visible = distanceFromTop(this.target ?? window) > this.threshold;\n };\n\n #onClick(): void {\n const target = this.target ?? window;\n this.dispatchEvent(\n new CustomEvent(\"scroll-to-top-triggered\", { detail: { target }, bubbles: true, composed: true }),\n );\n scrollToEdge(target, \"top\");\n }\n\n override render() {\n return html`\n <button type=\"button\" @click=${() => this.#onClick()}>\n ${iconChevronUp(14)}\n <span>${this.label}</span>\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"scroll-to-top\": ScrollToTop;\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * "Skip to main content" bypass link — the package's first pure
4
+ * accessibility-utility component. It renders a real `<a>` that stays
5
+ * visually hidden (but in the focus order) until it receives keyboard focus,
6
+ * then pins itself to the top-left of the viewport as a solid, high-contrast
7
+ * block so a keyboard or screen-reader user can jump straight past repeated
8
+ * page chrome to the main content. It needs no JavaScript beyond the element
9
+ * upgrade — the anchor's native in-page navigation does the rest.
10
+ *
11
+ * Place it as the very first focusable element on the page, before the app
12
+ * chrome, and point `href` at the `id` of the main content region.
13
+ *
14
+ * @element skip-link
15
+ * @slot - Optional custom link wording, overriding `label`.
16
+ */
17
+ export declare class SkipLink extends LitElement {
18
+ static styles: import("lit").CSSResult[];
19
+ /** The in-page target the link jumps to (the `id` of the main content region). */
20
+ href: string;
21
+ /** Fallback link wording used when nothing is slotted. */
22
+ label: string;
23
+ render(): import("lit-html").TemplateResult<1>;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ "skip-link": SkipLink;
28
+ }
29
+ }
30
+ //# sourceMappingURL=skip-link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link.d.ts","sourceRoot":"","sources":["../src/skip-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C;;;;;;;;;;;;;;GAcG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,OAAgB,MAAM,4BAwFpB;IAEF,kFAAkF;IACtE,IAAI,SAAW;IAE3B,0DAA0D;IAC9C,KAAK,SAA0B;IAElC,MAAM,yCAEd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,136 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, css, html } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ import { tokens } from "./tokens.js";
10
+ /**
11
+ * "Skip to main content" bypass link — the package's first pure
12
+ * accessibility-utility component. It renders a real `<a>` that stays
13
+ * visually hidden (but in the focus order) until it receives keyboard focus,
14
+ * then pins itself to the top-left of the viewport as a solid, high-contrast
15
+ * block so a keyboard or screen-reader user can jump straight past repeated
16
+ * page chrome to the main content. It needs no JavaScript beyond the element
17
+ * upgrade — the anchor's native in-page navigation does the rest.
18
+ *
19
+ * Place it as the very first focusable element on the page, before the app
20
+ * chrome, and point `href` at the `id` of the main content region.
21
+ *
22
+ * @element skip-link
23
+ * @slot - Optional custom link wording, overriding `label`.
24
+ */
25
+ let SkipLink = class SkipLink extends LitElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ /** The in-page target the link jumps to (the `id` of the main content region). */
29
+ this.href = "#main";
30
+ /** Fallback link wording used when nothing is slotted. */
31
+ this.label = "Skip to main content";
32
+ }
33
+ static { this.styles = [
34
+ tokens,
35
+ css `
36
+ :host {
37
+ display: contents;
38
+ }
39
+ /* Hidden at rest with the shared .sr-only clip technique — never
40
+ display:none / visibility:hidden, which would pull the link out of
41
+ the focus order and defeat the entire purpose. Clipped, it stays
42
+ focusable, so Tab reaches it and reveals it. */
43
+ .link {
44
+ position: absolute;
45
+ width: 1px;
46
+ height: 1px;
47
+ margin: -1px;
48
+ padding: 0;
49
+ overflow: hidden;
50
+ clip: rect(0 0 0 0);
51
+ clip-path: inset(50%);
52
+ white-space: nowrap;
53
+ border: 0;
54
+ top: 0.25rem;
55
+ left: 0.25rem;
56
+ /* Above app-shell's own chrome (.sidebar/.detail/.scrim at 40/40/39)
57
+ so it paints over the top bar when revealed — but a deliberate
58
+ literal below the shared layer stack's base of 100, and it does NOT
59
+ call activateLayer/deactivateLayer. A skip link must never float
60
+ above an open modal-dialog/confirm-dialog/popover-panel/slide-panel
61
+ (all >= 100): that would be a focus escape hatch out of a modal's
62
+ trap, a real bug. 50 sits cleanly in the gap between the shell
63
+ chrome and any real overlay. */
64
+ z-index: 50;
65
+ box-sizing: border-box;
66
+ background: var(--ui-text, #0f172a);
67
+ color: var(--ui-on-accent, #ffffff);
68
+ border-radius: var(--ui-radius-sm, 0.25rem);
69
+ font-family: var(
70
+ --ui-font,
71
+ ui-sans-serif,
72
+ system-ui,
73
+ sans-serif,
74
+ "Apple Color Emoji",
75
+ "Segoe UI Emoji",
76
+ "Segoe UI Symbol",
77
+ "Noto Color Emoji"
78
+ );
79
+ font-size: var(--ui-font-size-sm, 0.75rem);
80
+ font-weight: var(--ui-font-weight-medium, 500);
81
+ line-height: var(--ui-line-height-tight, 1.25);
82
+ text-decoration: none;
83
+ box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
84
+ }
85
+ /* Both :focus and :focus-visible: the link is only ever reached by
86
+ keyboard, so revealing it on plain focus is correct here. The visible
87
+ padding lives here rather than on .link, because box-sizing:
88
+ border-box would otherwise floor the clipped 1x1 box at the size of
89
+ its own padding box, leaving an invisible 32px hit target parked over
90
+ the page content. */
91
+ .link:focus,
92
+ .link:focus-visible {
93
+ width: auto;
94
+ height: auto;
95
+ margin: 0;
96
+ overflow: visible;
97
+ clip: auto;
98
+ clip-path: none;
99
+ padding-top: 0.5rem;
100
+ padding-right: 1rem;
101
+ padding-bottom: 0.5rem;
102
+ padding-left: 1rem;
103
+ }
104
+ .link:focus-visible {
105
+ outline: none;
106
+ box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));
107
+ }
108
+ @media (forced-colors: active) {
109
+ .link {
110
+ background: Canvas;
111
+ color: CanvasText;
112
+ border: 1px solid CanvasText;
113
+ }
114
+ .link:focus-visible {
115
+ outline: 2px solid CanvasText;
116
+ outline-offset: 2px;
117
+ box-shadow: none;
118
+ }
119
+ }
120
+ `,
121
+ ]; }
122
+ render() {
123
+ return html `<a class="link" href=${this.href}><slot>${this.label}</slot></a>`;
124
+ }
125
+ };
126
+ __decorate([
127
+ property()
128
+ ], SkipLink.prototype, "href", void 0);
129
+ __decorate([
130
+ property()
131
+ ], SkipLink.prototype, "label", void 0);
132
+ SkipLink = __decorate([
133
+ customElement("skip-link")
134
+ ], SkipLink);
135
+ export { SkipLink };
136
+ //# sourceMappingURL=skip-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skip-link.js","sourceRoot":"","sources":["../src/skip-link.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;;;;;;GAcG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QA2FL,kFAAkF;QACtE,SAAI,GAAG,OAAO,CAAC;QAE3B,0DAA0D;QAC9C,UAAK,GAAG,sBAAsB,CAAC;IAK7C,CAAC;aAnGiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqFF;KACF,AAxFqB,CAwFpB;IAQO,MAAM;QACb,OAAO,IAAI,CAAA,wBAAwB,IAAI,CAAC,IAAI,UAAU,IAAI,CAAC,KAAK,aAAa,CAAC;IAChF,CAAC;CACF,CAAA;AARa;IAAX,QAAQ,EAAE;sCAAgB;AAGf;IAAX,QAAQ,EAAE;uCAAgC;AA/FhC,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAoGpB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * \"Skip to main content\" bypass link — the package's first pure\n * accessibility-utility component. It renders a real `<a>` that stays\n * visually hidden (but in the focus order) until it receives keyboard focus,\n * then pins itself to the top-left of the viewport as a solid, high-contrast\n * block so a keyboard or screen-reader user can jump straight past repeated\n * page chrome to the main content. It needs no JavaScript beyond the element\n * upgrade — the anchor's native in-page navigation does the rest.\n *\n * Place it as the very first focusable element on the page, before the app\n * chrome, and point `href` at the `id` of the main content region.\n *\n * @element skip-link\n * @slot - Optional custom link wording, overriding `label`.\n */\n@customElement(\"skip-link\")\nexport class SkipLink extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: contents;\n }\n /* Hidden at rest with the shared .sr-only clip technique — never\n display:none / visibility:hidden, which would pull the link out of\n the focus order and defeat the entire purpose. Clipped, it stays\n focusable, so Tab reaches it and reveals it. */\n .link {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n top: 0.25rem;\n left: 0.25rem;\n /* Above app-shell's own chrome (.sidebar/.detail/.scrim at 40/40/39)\n so it paints over the top bar when revealed — but a deliberate\n literal below the shared layer stack's base of 100, and it does NOT\n call activateLayer/deactivateLayer. A skip link must never float\n above an open modal-dialog/confirm-dialog/popover-panel/slide-panel\n (all >= 100): that would be a focus escape hatch out of a modal's\n trap, a real bug. 50 sits cleanly in the gap between the shell\n chrome and any real overlay. */\n z-index: 50;\n box-sizing: border-box;\n background: var(--ui-text, #0f172a);\n color: var(--ui-on-accent, #ffffff);\n border-radius: var(--ui-radius-sm, 0.25rem);\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n line-height: var(--ui-line-height-tight, 1.25);\n text-decoration: none;\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n /* Both :focus and :focus-visible: the link is only ever reached by\n keyboard, so revealing it on plain focus is correct here. The visible\n padding lives here rather than on .link, because box-sizing:\n border-box would otherwise floor the clipped 1x1 box at the size of\n its own padding box, leaving an invisible 32px hit target parked over\n the page content. */\n .link:focus,\n .link:focus-visible {\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n clip-path: none;\n padding-top: 0.5rem;\n padding-right: 1rem;\n padding-bottom: 0.5rem;\n padding-left: 1rem;\n }\n .link:focus-visible {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n @media (forced-colors: active) {\n .link {\n background: Canvas;\n color: CanvasText;\n border: 1px solid CanvasText;\n }\n .link:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n `,\n ];\n\n /** The in-page target the link jumps to (the `id` of the main content region). */\n @property() href = \"#main\";\n\n /** Fallback link wording used when nothing is slotted. */\n @property() label = \"Skip to main content\";\n\n override render() {\n return html`<a class=\"link\" href=${this.href}><slot>${this.label}</slot></a>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"skip-link\": SkipLink;\n }\n}\n"]}
@@ -63,7 +63,7 @@ let SlidePanel = class SlidePanel extends LitElement {
63
63
  align-items: center;
64
64
  justify-content: space-between;
65
65
  padding: 0.75rem;
66
- border-bottom: 1px solid var(--ui-border, #e2e8f0);
66
+ border-bottom: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
67
67
  flex: 0 0 auto;
68
68
  }
69
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a,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;sBAC3C,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;iBACvB,CAAC,IAAI,CAAC,IAAI;;;;;iCAKM,IAAI,CAAC,OAAO,IAAI,OAAO;;sEAEc,IAAI,CAAC,MAAM;uCAC1C,KAAK,CAAC,EAAE,CAAC;;;;;KAK3C,CAAC;IACJ,CAAC;CACF,CAAA;AA5L8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAc;AAE9B;IAAX,QAAQ,EAAE;2CAAc;AAJd,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA8LtB","sourcesContent":["import { LitElement, css, html, nothing, type PropertyValues } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { iconX } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\nimport { activateLayer, claimEscape, deactivateLayer } from \"./utils/layer-stack.js\";\n\n/**\n * Generic sliding panel shell. Handles positioning, open/close animation,\n * header chrome, and a close button. Body content is provided via the\n * default slot; the consumer controls its own padding and overflow.\n *\n * Desktop: fixed right-side panel that slides from the right.\n * Mobile (≤48rem): bottom-sheet drawer (60vh) — reserved for future use.\n *\n * @element slide-panel\n * @fires panel-close - User clicked the close (✕) button.\n */\n@customElement(\"slide-panel\")\nexport class SlidePanel extends LitElement {\n /** Whether the panel is currently visible. */\n @property({ type: Boolean }) open = false;\n /** Title text shown in the panel header (overridable via slot=\"title\"). */\n @property() heading = \"\";\n\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n }\n .panel {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 20rem;\n z-index: var(--component-layer-z, 20);\n background: var(--ui-surface, #ffffff);\n box-shadow: var(--ui-shadow-lg, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1));\n transform: translateX(110%);\n transition: transform 250ms ease;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .panel.open {\n transform: translateX(0);\n }\n .panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem;\n border-bottom: 1px solid var(--ui-border, #e2e8f0);\n flex: 0 0 auto;\n }\n .panel-title {\n font-weight: var(--ui-font-weight-semibold, 600);\n font-size: var(--ui-font-size-lg, 1rem);\n line-height: var(--ui-line-height-tight, 1.25);\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n color: var(--ui-text, #0f172a);\n flex: 1 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding-right: 0.5rem;\n }\n .close-btn {\n background: none;\n border: none;\n cursor: pointer;\n width: 2rem;\n height: 2rem;\n padding: 0;\n color: var(--ui-text-muted, #64748b);\n border-radius: var(--ui-radius-sm, 0.25rem);\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .close-btn:hover {\n background: var(--ui-surface-muted, #f8fafc);\n }\n .close-btn:focus-visible {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .handle {\n display: none;\n }\n @media (prefers-reduced-motion: reduce) {\n .panel {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n .close-btn:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n @media (max-width: 48rem) {\n .panel {\n top: auto;\n right: 0;\n bottom: 0;\n left: 0;\n width: auto;\n height: 60vh;\n border-radius: var(--ui-radius, 0.5rem) var(--ui-radius, 0.5rem) 0 0;\n box-shadow: var(\n --ui-shadow-lg,\n 0 20px 25px -5px rgb(0 0 0 / 0.1),\n 0 8px 10px -6px rgb(0 0 0 / 0.1)\n );\n transform: translateY(110%);\n }\n .panel.open {\n transform: translateY(0);\n }\n .handle {\n display: block;\n width: 2.25rem;\n height: 0.25rem;\n background: var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-pill, 9999px);\n margin: 0.5rem auto 0;\n flex: 0 0 auto;\n }\n .panel-header {\n padding: 0.25rem 0.5rem 0.5rem;\n }\n }\n `,\n ];\n\n private _previousFocus: HTMLElement | null = null;\n\n private _close() {\n this.dispatchEvent(new CustomEvent(\"panel-close\", { bubbles: true, composed: true }));\n }\n\n private _onWindowKeydown = (event: KeyboardEvent): void => {\n if (!this.open || !claimEscape(this, event)) return;\n this._close();\n };\n\n protected override updated(changed: PropertyValues): void {\n if (!changed.has(\"open\")) return;\n if (this.open) {\n activateLayer(this);\n this._previousFocus = document.activeElement as HTMLElement | null;\n window.addEventListener(\"keydown\", this._onWindowKeydown);\n this.shadowRoot?.querySelector<HTMLElement>(\".close-btn\")?.focus();\n return;\n }\n deactivateLayer(this);\n window.removeEventListener(\"keydown\", this._onWindowKeydown);\n if (this._previousFocus?.isConnected) this._previousFocus.focus();\n this._previousFocus = null;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener(\"keydown\", this._onWindowKeydown);\n deactivateLayer(this);\n if (this._previousFocus?.isConnected) this._previousFocus.focus();\n this._previousFocus = null;\n this.open = false;\n }\n\n override render() {\n const explicitLabel = this.getAttribute(\"aria-label\");\n return html`\n <div\n class=\"panel ${this.open ? \"open\" : \"\"}\"\n role=\"dialog\"\n aria-modal=\"false\"\n aria-label=${explicitLabel ?? nothing}\n aria-labelledby=${explicitLabel ? nothing : \"panel-title\"}\n aria-hidden=${String(!this.open)}\n ?inert=${!this.open}\n >\n <div class=\"handle\" aria-hidden=\"true\"></div>\n <div class=\"panel-header\">\n <span id=\"panel-title\" class=\"panel-title\">\n <slot name=\"title\">${this.heading || \"Panel\"}</slot>\n </span>\n <button class=\"close-btn\" aria-label=\"Close panel\" @click=${this._close}>\n <span aria-hidden=\"true\">${iconX(18)}</span>\n </button>\n </div>\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"slide-panel\": SlidePanel;\n }\n}\n"]}
1
+ {"version":3,"file":"slide-panel.js","sourceRoot":"","sources":["../src/slide-panel.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAErF;;;;;;;;;;GAUG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QACL,8CAA8C;QACjB,SAAI,GAAG,KAAK,CAAC;QAC1C,2EAA2E;QAC/D,YAAO,GAAG,EAAE,CAAC;QA8HjB,mBAAc,GAAuB,IAAI,CAAC;QAM1C,qBAAgB,GAAG,CAAC,KAAoB,EAAQ,EAAE;YACxD,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;gBAAE,OAAO;YACpD,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC,CAAC;IAmDJ,CAAC;aAxLiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuHF;KACF,AA1HqB,CA0HpB;IAIM,MAAM;QACZ,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EA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C,CAAC,EAAE;;;qBAGzB,aAAa,IAAI,OAAO;0BACnB,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa;sBAC3C,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;iBACvB,CAAC,IAAI,CAAC,IAAI;;;;;iCAKM,IAAI,CAAC,OAAO,IAAI,OAAO;;sEAEc,IAAI,CAAC,MAAM;uCAC1C,KAAK,CAAC,EAAE,CAAC;;;;;KAK3C,CAAC;IACJ,CAAC;CACF,CAAA;AA5L8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAc;AAE9B;IAAX,QAAQ,EAAE;2CAAc;AAJd,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA8LtB","sourcesContent":["import { LitElement, css, html, nothing, type PropertyValues } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { iconX } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\nimport { activateLayer, claimEscape, deactivateLayer } from \"./utils/layer-stack.js\";\n\n/**\n * Generic sliding panel shell. Handles positioning, open/close animation,\n * header chrome, and a close button. Body content is provided via the\n * default slot; the consumer controls its own padding and overflow.\n *\n * Desktop: fixed right-side panel that slides from the right.\n * Mobile (≤48rem): bottom-sheet drawer (60vh) — reserved for future use.\n *\n * @element slide-panel\n * @fires panel-close - User clicked the close (✕) button.\n */\n@customElement(\"slide-panel\")\nexport class SlidePanel extends LitElement {\n /** Whether the panel is currently visible. */\n @property({ type: Boolean }) open = false;\n /** Title text shown in the panel header (overridable via slot=\"title\"). */\n @property() heading = \"\";\n\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n }\n .panel {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n width: 20rem;\n z-index: var(--component-layer-z, 20);\n background: var(--ui-surface, #ffffff);\n box-shadow: var(--ui-shadow-lg, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1));\n transform: translateX(110%);\n transition: transform 250ms ease;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .panel.open {\n transform: translateX(0);\n }\n .panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem;\n border-bottom: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n flex: 0 0 auto;\n }\n .panel-title {\n font-weight: var(--ui-font-weight-semibold, 600);\n font-size: var(--ui-font-size-lg, 1rem);\n line-height: var(--ui-line-height-tight, 1.25);\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n color: var(--ui-text, #0f172a);\n flex: 1 1 auto;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding-right: 0.5rem;\n }\n .close-btn {\n background: none;\n border: none;\n cursor: pointer;\n width: 2rem;\n height: 2rem;\n padding: 0;\n color: var(--ui-text-muted, #64748b);\n border-radius: var(--ui-radius-sm, 0.25rem);\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .close-btn:hover {\n background: var(--ui-surface-muted, #f8fafc);\n }\n .close-btn:focus-visible {\n outline: none;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .handle {\n display: none;\n }\n @media (prefers-reduced-motion: reduce) {\n .panel {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n .close-btn:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n @media (max-width: 48rem) {\n .panel {\n top: auto;\n right: 0;\n bottom: 0;\n left: 0;\n width: auto;\n height: 60vh;\n border-radius: var(--ui-radius, 0.5rem) var(--ui-radius, 0.5rem) 0 0;\n box-shadow: var(\n --ui-shadow-lg,\n 0 20px 25px -5px rgb(0 0 0 / 0.1),\n 0 8px 10px -6px rgb(0 0 0 / 0.1)\n );\n transform: translateY(110%);\n }\n .panel.open {\n transform: translateY(0);\n }\n .handle {\n display: block;\n width: 2.25rem;\n height: 0.25rem;\n background: var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-pill, 9999px);\n margin: 0.5rem auto 0;\n flex: 0 0 auto;\n }\n .panel-header {\n padding: 0.25rem 0.5rem 0.5rem;\n }\n }\n `,\n ];\n\n private _previousFocus: HTMLElement | null = null;\n\n private _close() {\n this.dispatchEvent(new CustomEvent(\"panel-close\", { bubbles: true, composed: true }));\n }\n\n private _onWindowKeydown = (event: KeyboardEvent): void => {\n if (!this.open || !claimEscape(this, event)) return;\n this._close();\n };\n\n protected override updated(changed: PropertyValues): void {\n if (!changed.has(\"open\")) return;\n if (this.open) {\n activateLayer(this);\n this._previousFocus = document.activeElement as HTMLElement | null;\n window.addEventListener(\"keydown\", this._onWindowKeydown);\n this.shadowRoot?.querySelector<HTMLElement>(\".close-btn\")?.focus();\n return;\n }\n deactivateLayer(this);\n window.removeEventListener(\"keydown\", this._onWindowKeydown);\n if (this._previousFocus?.isConnected) this._previousFocus.focus();\n this._previousFocus = null;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener(\"keydown\", this._onWindowKeydown);\n deactivateLayer(this);\n if (this._previousFocus?.isConnected) this._previousFocus.focus();\n this._previousFocus = null;\n this.open = false;\n }\n\n override render() {\n const explicitLabel = this.getAttribute(\"aria-label\");\n return html`\n <div\n class=\"panel ${this.open ? \"open\" : \"\"}\"\n role=\"dialog\"\n aria-modal=\"false\"\n aria-label=${explicitLabel ?? nothing}\n aria-labelledby=${explicitLabel ? nothing : \"panel-title\"}\n aria-hidden=${String(!this.open)}\n ?inert=${!this.open}\n >\n <div class=\"handle\" aria-hidden=\"true\"></div>\n <div class=\"panel-header\">\n <span id=\"panel-title\" class=\"panel-title\">\n <slot name=\"title\">${this.heading || \"Panel\"}</slot>\n </span>\n <button class=\"close-btn\" aria-label=\"Close panel\" @click=${this._close}>\n <span aria-hidden=\"true\">${iconX(18)}</span>\n </button>\n </div>\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"slide-panel\": SlidePanel;\n }\n}\n"]}
@@ -0,0 +1,49 @@
1
+ import { LitElement } from "lit";
2
+ /** One key/value row of a {@link SpecList} in the data-driven `items` path. */
3
+ export interface SpecListItem {
4
+ /** The attribute name, shown as the muted, wide-tracked key. */
5
+ label: string;
6
+ /** The attribute value, shown against the key. */
7
+ value: string;
8
+ }
9
+ /**
10
+ * A key/value specification sheet — the "spec sheet" block on a product page:
11
+ * an uppercase, muted, wide-tracked key column against a value column,
12
+ * separated by hairline rules. It describes ONE record's attributes, which is
13
+ * what sets it apart from `data-table` (many records, many columns, sorting);
14
+ * `spec-list` is not tabular and renders a real `<dl>`/`<dt>`/`<dd>` structure.
15
+ *
16
+ * Feed it the `items` array for the plain data path, or slot your own
17
+ * `<div><dt>…</dt><dd>…</dd></div>` groups when a value needs a link, a
18
+ * `status-pill`, or other markup. Slotted content takes precedence over
19
+ * `items`; with neither, nothing is rendered.
20
+ *
21
+ * @element spec-list
22
+ * @slot - Optional `<div><dt>…</dt><dd>…</dd></div>` groups for values that
23
+ * need custom markup; when present, they replace the `items` path.
24
+ */
25
+ export declare class SpecList extends LitElement {
26
+ /** The key/value rows for the data-driven path. Ignored when the default slot has content. */
27
+ items: SpecListItem[];
28
+ /**
29
+ * `auto` is the two-column grid that collapses to stacked below `48rem`;
30
+ * `stacked` forces the stacked form at every width.
31
+ */
32
+ layout: "auto" | "stacked";
33
+ /** Whether to draw a hairline rule between rows; `false` for a dense inline listing. */
34
+ dividers: boolean;
35
+ /** Optional accessible caption rendered above the list; no element or reserved space when empty. */
36
+ caption: string;
37
+ /** Whether the default slot currently has assigned content. */
38
+ private _hasSlotted;
39
+ static styles: import("lit").CSSResult[];
40
+ /** Tracks whether the default slot has content so slotted markup can take precedence over `items`. */
41
+ private _onSlotChange;
42
+ render(): import("lit-html").TemplateResult<1>;
43
+ }
44
+ declare global {
45
+ interface HTMLElementTagNameMap {
46
+ "spec-list": SpecList;
47
+ }
48
+ }
49
+ //# sourceMappingURL=spec-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-list.d.ts","sourceRoot":"","sources":["../src/spec-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAIrD,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBACa,QAAS,SAAQ,UAAU;IACtC,8FAA8F;IACnE,KAAK,EAAE,YAAY,EAAE,CAAM;IAEtD;;;OAGG;IAC0B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAU;IAEjE,wFAAwF;IAC5C,QAAQ,UAAQ;IAE5D,oGAAoG;IACxF,OAAO,SAAM;IAEzB,+DAA+D;IACtD,OAAO,CAAC,WAAW,CAAS;IAErC,OAAgB,MAAM,4BA4EpB;IAEF,sGAAsG;IACtG,OAAO,CAAC,aAAa;IAOZ,MAAM,yCAsBd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,168 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, css, html, nothing } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
+ import { tokens } from "./tokens.js";
10
+ /**
11
+ * A key/value specification sheet — the "spec sheet" block on a product page:
12
+ * an uppercase, muted, wide-tracked key column against a value column,
13
+ * separated by hairline rules. It describes ONE record's attributes, which is
14
+ * what sets it apart from `data-table` (many records, many columns, sorting);
15
+ * `spec-list` is not tabular and renders a real `<dl>`/`<dt>`/`<dd>` structure.
16
+ *
17
+ * Feed it the `items` array for the plain data path, or slot your own
18
+ * `<div><dt>…</dt><dd>…</dd></div>` groups when a value needs a link, a
19
+ * `status-pill`, or other markup. Slotted content takes precedence over
20
+ * `items`; with neither, nothing is rendered.
21
+ *
22
+ * @element spec-list
23
+ * @slot - Optional `<div><dt>…</dt><dd>…</dd></div>` groups for values that
24
+ * need custom markup; when present, they replace the `items` path.
25
+ */
26
+ let SpecList = class SpecList extends LitElement {
27
+ constructor() {
28
+ super(...arguments);
29
+ /** The key/value rows for the data-driven path. Ignored when the default slot has content. */
30
+ this.items = [];
31
+ /**
32
+ * `auto` is the two-column grid that collapses to stacked below `48rem`;
33
+ * `stacked` forces the stacked form at every width.
34
+ */
35
+ this.layout = "auto";
36
+ /** Whether to draw a hairline rule between rows; `false` for a dense inline listing. */
37
+ this.dividers = true;
38
+ /** Optional accessible caption rendered above the list; no element or reserved space when empty. */
39
+ this.caption = "";
40
+ /** Whether the default slot currently has assigned content. */
41
+ this._hasSlotted = false;
42
+ }
43
+ static { this.styles = [
44
+ tokens,
45
+ css `
46
+ :host {
47
+ display: block;
48
+ font-family: var(
49
+ --ui-font,
50
+ ui-sans-serif,
51
+ system-ui,
52
+ sans-serif,
53
+ "Apple Color Emoji",
54
+ "Segoe UI Emoji",
55
+ "Segoe UI Symbol",
56
+ "Noto Color Emoji"
57
+ );
58
+ }
59
+ .caption {
60
+ margin: 0 0 0.5rem;
61
+ font-size: var(--ui-font-size-sm, 0.75rem);
62
+ font-weight: var(--ui-font-weight-medium, 500);
63
+ letter-spacing: var(--ui-tracking-wide, 0.04em);
64
+ text-transform: var(--ui-label-transform, none);
65
+ color: var(--ui-text-muted, #64748b);
66
+ }
67
+ .list {
68
+ margin: 0;
69
+ }
70
+ .list.empty {
71
+ display: none;
72
+ }
73
+ /* Both the data-driven rows and the slotted div groups are laid out as
74
+ the same two-column grid so the two paths line up identically. */
75
+ .row,
76
+ ::slotted(*) {
77
+ display: grid;
78
+ grid-template-columns: 11rem minmax(0, 1fr);
79
+ column-gap: 0.75rem;
80
+ padding: 0.5rem 0;
81
+ }
82
+ :host([dividers]) .row,
83
+ :host([dividers]) ::slotted(*) {
84
+ border-bottom: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
85
+ }
86
+ :host([dividers]) .row:last-of-type,
87
+ :host([dividers]) ::slotted(*:last-of-type) {
88
+ border-bottom: none;
89
+ }
90
+ .row dt {
91
+ font-size: var(--ui-font-size-sm, 0.75rem);
92
+ font-weight: var(--ui-font-weight-medium, 500);
93
+ letter-spacing: var(--ui-tracking-wide, 0.04em);
94
+ text-transform: var(--ui-label-transform, none);
95
+ line-height: var(--ui-line-height-normal, 1.5);
96
+ color: var(--ui-text-muted, #64748b);
97
+ }
98
+ .row dd {
99
+ margin: 0;
100
+ min-width: 0;
101
+ font-size: var(--ui-font-size, 0.875rem);
102
+ line-height: var(--ui-line-height-normal, 1.5);
103
+ color: var(--ui-text, #0f172a);
104
+ word-break: break-word;
105
+ }
106
+ :host([layout="stacked"]) .row,
107
+ :host([layout="stacked"]) ::slotted(*) {
108
+ grid-template-columns: minmax(0, 1fr);
109
+ row-gap: 0.25rem;
110
+ }
111
+ @media (max-width: 48rem) {
112
+ :host([layout="auto"]) .row,
113
+ :host([layout="auto"]) ::slotted(*) {
114
+ grid-template-columns: minmax(0, 1fr);
115
+ row-gap: 0.25rem;
116
+ }
117
+ }
118
+ `,
119
+ ]; }
120
+ /** Tracks whether the default slot has content so slotted markup can take precedence over `items`. */
121
+ _onSlotChange(event) {
122
+ const slot = event.target;
123
+ this._hasSlotted = slot.assignedNodes({ flatten: true }).some((node) => {
124
+ return node.nodeType === Node.ELEMENT_NODE || (node.textContent ?? "").trim().length > 0;
125
+ });
126
+ }
127
+ render() {
128
+ const showItems = !this._hasSlotted && this.items.length > 0;
129
+ const empty = !this._hasSlotted && this.items.length === 0;
130
+ return html `
131
+ ${this.caption ? html `<div class="caption" id="caption">${this.caption}</div>` : nothing}
132
+ <dl
133
+ class="list ${empty ? "empty" : ""}"
134
+ aria-labelledby=${this.caption ? "caption" : nothing}
135
+ >
136
+ ${showItems
137
+ ? this.items.map((item) => html `
138
+ <div class="row">
139
+ <dt>${item.label}</dt>
140
+ <dd>${item.value}</dd>
141
+ </div>
142
+ `)
143
+ : nothing}
144
+ <slot @slotchange=${this._onSlotChange}></slot>
145
+ </dl>
146
+ `;
147
+ }
148
+ };
149
+ __decorate([
150
+ property({ type: Array })
151
+ ], SpecList.prototype, "items", void 0);
152
+ __decorate([
153
+ property({ reflect: true })
154
+ ], SpecList.prototype, "layout", void 0);
155
+ __decorate([
156
+ property({ type: Boolean, reflect: true })
157
+ ], SpecList.prototype, "dividers", void 0);
158
+ __decorate([
159
+ property()
160
+ ], SpecList.prototype, "caption", void 0);
161
+ __decorate([
162
+ state()
163
+ ], SpecList.prototype, "_hasSlotted", void 0);
164
+ SpecList = __decorate([
165
+ customElement("spec-list")
166
+ ], SpecList);
167
+ export { SpecList };
168
+ //# sourceMappingURL=spec-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-list.js","sourceRoot":"","sources":["../src/spec-list.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC;;;;;;;;;;;;;;;GAeG;AA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O;;sBAExE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;0BAChB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;;UAElD,SAAS;YACT,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CACZ,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;;wBAEJ,IAAI,CAAC,KAAK;wBACV,IAAI,CAAC,KAAK;;eAEnB,CACF;YACH,CAAC,CAAC,OAAO;4BACS,IAAI,CAAC,aAAa;;KAEzC,CAAC;IACJ,CAAC;CACF,CAAA;AA9H4B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;uCAA4B;AAMzB;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAqC;AAGrB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAiB;AAGhD;IAAX,QAAQ,EAAE;yCAAc;AAGR;IAAhB,KAAK,EAAE;6CAA6B;AAjB1B,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAgIpB","sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/** One key/value row of a {@link SpecList} in the data-driven `items` path. */\nexport interface SpecListItem {\n /** The attribute name, shown as the muted, wide-tracked key. */\n label: string;\n /** The attribute value, shown against the key. */\n value: string;\n}\n\n/**\n * A key/value specification sheet — the \"spec sheet\" block on a product page:\n * an uppercase, muted, wide-tracked key column against a value column,\n * separated by hairline rules. It describes ONE record's attributes, which is\n * what sets it apart from `data-table` (many records, many columns, sorting);\n * `spec-list` is not tabular and renders a real `<dl>`/`<dt>`/`<dd>` structure.\n *\n * Feed it the `items` array for the plain data path, or slot your own\n * `<div><dt>…</dt><dd>…</dd></div>` groups when a value needs a link, a\n * `status-pill`, or other markup. Slotted content takes precedence over\n * `items`; with neither, nothing is rendered.\n *\n * @element spec-list\n * @slot - Optional `<div><dt>…</dt><dd>…</dd></div>` groups for values that\n * need custom markup; when present, they replace the `items` path.\n */\n@customElement(\"spec-list\")\nexport class SpecList extends LitElement {\n /** The key/value rows for the data-driven path. Ignored when the default slot has content. */\n @property({ type: Array }) items: SpecListItem[] = [];\n\n /**\n * `auto` is the two-column grid that collapses to stacked below `48rem`;\n * `stacked` forces the stacked form at every width.\n */\n @property({ reflect: true }) layout: \"auto\" | \"stacked\" = \"auto\";\n\n /** Whether to draw a hairline rule between rows; `false` for a dense inline listing. */\n @property({ type: Boolean, reflect: true }) dividers = true;\n\n /** Optional accessible caption rendered above the list; no element or reserved space when empty. */\n @property() caption = \"\";\n\n /** Whether the default slot currently has assigned content. */\n @state() private _hasSlotted = false;\n\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n }\n .caption {\n margin: 0 0 0.5rem;\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n text-transform: var(--ui-label-transform, none);\n color: var(--ui-text-muted, #64748b);\n }\n .list {\n margin: 0;\n }\n .list.empty {\n display: none;\n }\n /* Both the data-driven rows and the slotted div groups are laid out as\n the same two-column grid so the two paths line up identically. */\n .row,\n ::slotted(*) {\n display: grid;\n grid-template-columns: 11rem minmax(0, 1fr);\n column-gap: 0.75rem;\n padding: 0.5rem 0;\n }\n :host([dividers]) .row,\n :host([dividers]) ::slotted(*) {\n border-bottom: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n }\n :host([dividers]) .row:last-of-type,\n :host([dividers]) ::slotted(*:last-of-type) {\n border-bottom: none;\n }\n .row dt {\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n text-transform: var(--ui-label-transform, none);\n line-height: var(--ui-line-height-normal, 1.5);\n color: var(--ui-text-muted, #64748b);\n }\n .row dd {\n margin: 0;\n min-width: 0;\n font-size: var(--ui-font-size, 0.875rem);\n line-height: var(--ui-line-height-normal, 1.5);\n color: var(--ui-text, #0f172a);\n word-break: break-word;\n }\n :host([layout=\"stacked\"]) .row,\n :host([layout=\"stacked\"]) ::slotted(*) {\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0.25rem;\n }\n @media (max-width: 48rem) {\n :host([layout=\"auto\"]) .row,\n :host([layout=\"auto\"]) ::slotted(*) {\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0.25rem;\n }\n }\n `,\n ];\n\n /** Tracks whether the default slot has content so slotted markup can take precedence over `items`. */\n private _onSlotChange(event: Event): void {\n const slot = event.target as HTMLSlotElement;\n this._hasSlotted = slot.assignedNodes({ flatten: true }).some((node) => {\n return node.nodeType === Node.ELEMENT_NODE || (node.textContent ?? \"\").trim().length > 0;\n });\n }\n\n override render() {\n const showItems = !this._hasSlotted && this.items.length > 0;\n const empty = !this._hasSlotted && this.items.length === 0;\n return html`\n ${this.caption ? html`<div class=\"caption\" id=\"caption\">${this.caption}</div>` : nothing}\n <dl\n class=\"list ${empty ? \"empty\" : \"\"}\"\n aria-labelledby=${this.caption ? \"caption\" : nothing}\n >\n ${showItems\n ? this.items.map(\n (item) => html`\n <div class=\"row\">\n <dt>${item.label}</dt>\n <dd>${item.value}</dd>\n </div>\n `,\n )\n : nothing}\n <slot @slotchange=${this._onSlotChange}></slot>\n </dl>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"spec-list\": SpecList;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"stat-meter.d.ts","sourceRoot":"","sources":["../src/stat-meter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C;;;;;;;GAOG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC,OAAgB,MAAM,4BA6DpB;IAEF,6DAA6D;IACjD,KAAK,SAAM;IAEvB,qFAAqF;IACzD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE1D,mEAAmE;IACvD,KAAK,SAAM;IAEvB,kGAAkG;IAC1D,UAAU,SAAM;IAE/C,MAAM,yCAYd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"stat-meter.d.ts","sourceRoot":"","sources":["../src/stat-meter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C;;;;;;;GAOG;AACH,qBACa,SAAU,SAAQ,UAAU;IACvC,OAAgB,MAAM,4BA8DpB;IAEF,6DAA6D;IACjD,KAAK,SAAM;IAEvB,qFAAqF;IACzD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE1D,mEAAmE;IACvD,KAAK,SAAM;IAEvB,kGAAkG;IAC1D,UAAU,SAAM;IAE/C,MAAM,yCAYd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -50,6 +50,7 @@ let StatMeter = class StatMeter extends LitElement {
50
50
  font-size: var(--ui-font-size-sm, 0.75rem);
51
51
  font-weight: var(--ui-font-weight-semibold, 600);
52
52
  letter-spacing: var(--ui-tracking-wide, 0.04em);
53
+ text-transform: var(--ui-label-transform, none);
53
54
  color: var(--ui-text-muted, #64748b);
54
55
  }
55
56
 
@@ -1 +1 @@
1
- {"version":3,"file":"stat-meter.js","sourceRoot":"","sources":["../src/stat-meter.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO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AAC,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG;mCACzF,SAAS;;4BAEhB,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG;KACrD,CAAC;IACJ,CAAC;CACF,CAAA;AAxBa;IAAX,QAAQ,EAAE;wCAAY;AAGK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA+B;AAG9C;IAAX,QAAQ,EAAE;wCAAY;AAGiB;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;6CAAiB;AA1E7C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAyFrB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * A compact labeled meter for a single percentage reading — e.g. CPU or\n * memory usage in a dashboard header. `percent` may be `null` when no\n * reading is available yet (e.g. the first tick of a polling metric); the\n * bar then renders empty and the value shows an em dash instead of \"0%\".\n *\n * @element stat-meter\n */\n@customElement(\"stat-meter\")\nexport class StatMeter extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n }\n\n .label {\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-semibold, 600);\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n color: var(--ui-text-muted, #64748b);\n }\n\n .track {\n display: block;\n width: 4rem;\n height: 0.375rem;\n border-radius: var(--ui-radius-pill, 9999px);\n background: var(--track-color, var(--ui-surface-muted, #f8fafc));\n overflow: hidden;\n }\n\n .fill {\n display: block;\n height: 100%;\n /* Keep the top highlight while softening the dark edge for compact meters. */\n background: linear-gradient(\n to bottom,\n color-mix(in srgb, var(--fill-color, var(--ui-success, #16a34a)) 70%, #ffffff) 0%,\n color-mix(in srgb, var(--fill-color, var(--ui-success, #16a34a)) 80%, #000000) 100%\n );\n transition: width 200ms ease;\n }\n\n .value {\n min-width: 2rem;\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n color: var(--ui-text, #0f172a);\n font-variant-numeric: tabular-nums;\n text-align: right;\n }\n @media (prefers-reduced-motion: reduce) {\n .fill {\n transition: none;\n }\n }\n `,\n ];\n\n /** Short label shown before the bar, e.g. \"CPU\" or \"MEM\". */\n @property() label = \"\";\n\n /** Percentage 0-100. `null` renders an empty bar and a \"—\" value instead of \"0%\". */\n @property({ type: Number }) percent: number | null = null;\n\n /** Fill color override; falls back to the `--ui-success` token. */\n @property() color = \"\";\n\n /** Track (inactive portion) background override; falls back to the `--ui-surface-muted` token. */\n @property({ attribute: \"track-color\" }) trackColor = \"\";\n\n override render() {\n const pct = this.percent;\n const clamped = pct === null ? 0 : Math.min(100, Math.max(0, pct));\n const fillStyle = this.color ? `width: ${clamped}%; --fill-color: ${this.color}` : `width: ${clamped}%`;\n const trackStyle = this.trackColor ? `--track-color: ${this.trackColor}` : \"\";\n return html`\n <span class=\"label\">${this.label}</span>\n <span class=\"track\" role=\"img\" style=${trackStyle} aria-label=\"${this.label} ${pct === null ? \"no reading\" : `${pct}%`}\">\n <span class=\"fill\" style=${fillStyle}></span>\n </span>\n <span class=\"value\">${pct === null ? \"—\" : `${pct}%`}</span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"stat-meter\": StatMeter;\n }\n}\n"]}
1
+ {"version":3,"file":"stat-meter.js","sourceRoot":"","sources":["../src/stat-meter.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa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AI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG;KACrD,CAAC;IACJ,CAAC;CACF,CAAA;AAxBa;IAAX,QAAQ,EAAE;wCAAY;AAGK;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA+B;AAG9C;IAAX,QAAQ,EAAE;wCAAY;AAGiB;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;6CAAiB;AA3E7C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0FrB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * A compact labeled meter for a single percentage reading — e.g. CPU or\n * memory usage in a dashboard header. `percent` may be `null` when no\n * reading is available yet (e.g. the first tick of a polling metric); the\n * bar then renders empty and the value shows an em dash instead of \"0%\".\n *\n * @element stat-meter\n */\n@customElement(\"stat-meter\")\nexport class StatMeter extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n }\n\n .label {\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-semibold, 600);\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n text-transform: var(--ui-label-transform, none);\n color: var(--ui-text-muted, #64748b);\n }\n\n .track {\n display: block;\n width: 4rem;\n height: 0.375rem;\n border-radius: var(--ui-radius-pill, 9999px);\n background: var(--track-color, var(--ui-surface-muted, #f8fafc));\n overflow: hidden;\n }\n\n .fill {\n display: block;\n height: 100%;\n /* Keep the top highlight while softening the dark edge for compact meters. */\n background: linear-gradient(\n to bottom,\n color-mix(in srgb, var(--fill-color, var(--ui-success, #16a34a)) 70%, #ffffff) 0%,\n color-mix(in srgb, var(--fill-color, var(--ui-success, #16a34a)) 80%, #000000) 100%\n );\n transition: width 200ms ease;\n }\n\n .value {\n min-width: 2rem;\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n color: var(--ui-text, #0f172a);\n font-variant-numeric: tabular-nums;\n text-align: right;\n }\n @media (prefers-reduced-motion: reduce) {\n .fill {\n transition: none;\n }\n }\n `,\n ];\n\n /** Short label shown before the bar, e.g. \"CPU\" or \"MEM\". */\n @property() label = \"\";\n\n /** Percentage 0-100. `null` renders an empty bar and a \"—\" value instead of \"0%\". */\n @property({ type: Number }) percent: number | null = null;\n\n /** Fill color override; falls back to the `--ui-success` token. */\n @property() color = \"\";\n\n /** Track (inactive portion) background override; falls back to the `--ui-surface-muted` token. */\n @property({ attribute: \"track-color\" }) trackColor = \"\";\n\n override render() {\n const pct = this.percent;\n const clamped = pct === null ? 0 : Math.min(100, Math.max(0, pct));\n const fillStyle = this.color ? `width: ${clamped}%; --fill-color: ${this.color}` : `width: ${clamped}%`;\n const trackStyle = this.trackColor ? `--track-color: ${this.trackColor}` : \"\";\n return html`\n <span class=\"label\">${this.label}</span>\n <span class=\"track\" role=\"img\" style=${trackStyle} aria-label=\"${this.label} ${pct === null ? \"no reading\" : `${pct}%`}\">\n <span class=\"fill\" style=${fillStyle}></span>\n </span>\n <span class=\"value\">${pct === null ? \"—\" : `${pct}%`}</span>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"stat-meter\": StatMeter;\n }\n}\n"]}
package/dist/tab-bar.js CHANGED
@@ -41,7 +41,7 @@ let TabBar = class TabBar extends LitElement {
41
41
  .tablist {
42
42
  display: flex;
43
43
  gap: 1rem;
44
- border-bottom: 1px solid var(--ui-border, #e2e8f0);
44
+ border-bottom: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
45
45
  }
46
46
  .tab {
47
47
  appearance: none;