@helixui/library 2.1.2-next.50 → 2.1.2-next.51

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 (62) hide show
  1. package/custom-elements.json +231 -236
  2. package/dist/components/hx-counter/hx-counter.d.ts +20 -0
  3. package/dist/components/hx-counter/hx-counter.d.ts.map +1 -1
  4. package/dist/components/hx-counter/index.js +1 -1
  5. package/dist/components/hx-file-upload/hx-file-upload.d.ts +3 -1
  6. package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
  7. package/dist/components/hx-file-upload/hx-file-upload.styles.d.ts.map +1 -1
  8. package/dist/components/hx-file-upload/index.js +1 -1
  9. package/dist/components/hx-form/hx-form.d.ts.map +1 -1
  10. package/dist/components/hx-form/index.js +1 -1
  11. package/dist/components/hx-list/hx-list-item.styles.d.ts.map +1 -1
  12. package/dist/components/hx-list/index.js +1 -1
  13. package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
  14. package/dist/components/hx-meter/index.js +1 -1
  15. package/dist/components/hx-phi-field/hx-phi-field.d.ts +2 -1
  16. package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
  17. package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts.map +1 -1
  18. package/dist/components/hx-phi-field/index.js +1 -1
  19. package/dist/components/hx-popover/index.js +1 -1
  20. package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
  21. package/dist/components/hx-popup/index.js +1 -1
  22. package/dist/components/hx-stat/hx-stat.d.ts +3 -0
  23. package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
  24. package/dist/components/hx-stat/hx-stat.styles.d.ts.map +1 -1
  25. package/dist/components/hx-stat/index.js +1 -1
  26. package/dist/css/helix-all.css +116 -6
  27. package/dist/css/helix-feedback.css +54 -6
  28. package/dist/css/helix-forms.css +48 -0
  29. package/dist/css/hx-file-upload.css +48 -0
  30. package/dist/css/hx-meter.css +7 -6
  31. package/dist/css/hx-phi-field.css +14 -0
  32. package/dist/css/hx-stat.css +47 -0
  33. package/dist/css/index.css +1 -1
  34. package/dist/css/manifest.json +5 -1
  35. package/dist/index.js +9 -9
  36. package/dist/shared/hx-card-BgXZXDuc.js.map +1 -1
  37. package/dist/shared/{hx-counter-CP42cSVK.js → hx-counter-B5NgKlw4.js} +77 -42
  38. package/dist/shared/hx-counter-B5NgKlw4.js.map +1 -0
  39. package/dist/shared/{hx-file-upload-Dwtu3WcB.js → hx-file-upload-Di_vpQaG.js} +156 -93
  40. package/dist/shared/hx-file-upload-Di_vpQaG.js.map +1 -0
  41. package/dist/shared/{hx-form-fJE-FJQV.js → hx-form-BM6PHsw3.js} +2 -8
  42. package/dist/shared/{hx-form-fJE-FJQV.js.map → hx-form-BM6PHsw3.js.map} +1 -1
  43. package/dist/shared/{hx-list-CoTDMp19.js → hx-list-CnDK30Yk.js} +69 -37
  44. package/dist/shared/hx-list-CnDK30Yk.js.map +1 -0
  45. package/dist/shared/{hx-meter-BvSJoqDp.js → hx-meter-BcVC9yrt.js} +13 -12
  46. package/dist/shared/hx-meter-BcVC9yrt.js.map +1 -0
  47. package/dist/shared/{hx-phi-field-BiJH3V-k.js → hx-phi-field-Df06K0J3.js} +21 -4
  48. package/dist/shared/hx-phi-field-Df06K0J3.js.map +1 -0
  49. package/dist/shared/{hx-popover-D63RXn5H.js → hx-popover-CydNuVkT.js} +15 -15
  50. package/dist/shared/{hx-popover-D63RXn5H.js.map → hx-popover-CydNuVkT.js.map} +1 -1
  51. package/dist/shared/{hx-popup-BQWMhvMO.js → hx-popup-DbzezTOd.js} +18 -18
  52. package/dist/shared/hx-popup-DbzezTOd.js.map +1 -0
  53. package/dist/shared/{hx-stat-DKD2E7An.js → hx-stat-DKlyBL_K.js} +97 -42
  54. package/dist/shared/hx-stat-DKlyBL_K.js.map +1 -0
  55. package/package.json +2 -2
  56. package/dist/shared/hx-counter-CP42cSVK.js.map +0 -1
  57. package/dist/shared/hx-file-upload-Dwtu3WcB.js.map +0 -1
  58. package/dist/shared/hx-list-CoTDMp19.js.map +0 -1
  59. package/dist/shared/hx-meter-BvSJoqDp.js.map +0 -1
  60. package/dist/shared/hx-phi-field-BiJH3V-k.js.map +0 -1
  61. package/dist/shared/hx-popup-BQWMhvMO.js.map +0 -1
  62. package/dist/shared/hx-stat-DKD2E7An.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hx-card-BgXZXDuc.js","sources":["../../src/components/hx-card/hx-card.styles.ts","../../src/components/hx-card/hx-card.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCardStyles = css`\n :host {\n display: block;\n color: var(--hx-card-color, inherit);\n background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));\n }\n\n .card {\n display: flex;\n flex-direction: column;\n gap: var(--hx-card-gap, var(--hx-space-4, 1rem));\n background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));\n color: var(--hx-card-color, var(--hx-color-neutral-800, #212529));\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-card-border-color, var(--hx-color-neutral-200, #dee2e6));\n border-radius: var(--hx-card-border-radius, var(--hx-border-radius-lg, 0.5rem));\n overflow: hidden;\n font-family: var(--hx-font-family-sans, sans-serif);\n transition:\n box-shadow var(--hx-transition-normal, 250ms ease),\n transform var(--hx-transition-normal, 250ms ease);\n }\n\n /* ─── Elevation Variants ─── */\n\n .card--flat {\n box-shadow: none;\n }\n\n .card--raised {\n box-shadow: var(--hx-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));\n }\n\n .card--floating {\n box-shadow: var(--hx-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));\n }\n\n /* ─── Style Variants ─── */\n\n .card--default {\n /* Default styling — uses base styles */\n }\n\n .card--featured {\n border-color: var(--hx-color-primary-500, #2563eb);\n border-width: var(--hx-border-width-medium, 2px);\n }\n\n .card--compact .card__body {\n padding: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__heading {\n padding-top: var(--hx-space-3, 0.75rem);\n padding-inline-end: var(--hx-space-3, 0.75rem);\n padding-inline-start: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__footer {\n padding-inline-end: var(--hx-space-3, 0.75rem);\n padding-bottom: var(--hx-space-3, 0.75rem);\n padding-inline-start: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__actions {\n padding-inline-end: var(--hx-space-3, 0.75rem);\n padding-bottom: var(--hx-space-3, 0.75rem);\n padding-inline-start: var(--hx-space-3, 0.75rem);\n }\n\n /* ─── Interactive ─── */\n\n .card--interactive {\n cursor: pointer;\n }\n\n .card--interactive:hover {\n box-shadow: var(--hx-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));\n transform: translateY(var(--hx-lift-md, -2px));\n }\n\n .card--interactive:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-card-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .card--interactive:active {\n transform: translateY(0);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .card {\n transition: none;\n }\n\n .card--interactive:hover {\n transform: none;\n }\n\n .card--interactive:active {\n transform: none;\n }\n }\n\n /* ─── Hidden empty slot wrappers ─── */\n\n [hidden] {\n display: none !important;\n }\n\n /* ─── Sections ─── */\n\n .card__image {\n overflow: hidden;\n line-height: 0;\n }\n\n .card__image ::slotted(img) {\n width: 100%;\n aspect-ratio: var(--hx-card-image-aspect-ratio, 16 / 9);\n display: block;\n object-fit: cover;\n }\n\n .card__heading {\n padding-top: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-inline-end: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: 0;\n padding-inline-start: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n font-size: var(--hx-font-size-xl, 1.25rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n line-height: var(--hx-line-height-tight, 1.25);\n }\n\n .card__body {\n padding: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n flex: 1;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: var(--hx-line-height-normal, 1.5);\n color: var(--hx-card-color, var(--hx-color-neutral-600, #495057));\n }\n\n .card__footer {\n padding-top: 0;\n padding-inline-end: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-inline-start: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n }\n\n .card__actions {\n display: flex;\n gap: var(--hx-space-2, 0.5rem);\n padding-top: var(--hx-space-4, 1rem);\n padding-inline-end: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-inline-start: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n border-top: var(--hx-border-width-thin, 1px) solid\n var(--hx-card-border-color, var(--hx-color-neutral-200, #dee2e6));\n margin-top: auto;\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { helixCardStyles } from './hx-card.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A flexible card component for displaying grouped content.\n *\n * @summary Content container with image, heading, body, footer, and action slots.\n *\n * @tag hx-card\n *\n * @slot image - Optional image or media content at the top of the card.\n * @slot heading - The card heading/title content. Use a semantic heading element (h2, h3, etc.) for proper accessibility.\n * @slot - Default slot for the card body content.\n * @slot footer - Optional footer content below the body.\n * @slot actions - Optional action buttons, rendered with a top border separator. Do NOT use together with hx-href (interactive card + focusable actions is an ARIA anti-pattern).\n *\n * @fires {CustomEvent<{href: string, originalEvent: MouseEvent | KeyboardEvent}>} hx-click - Dispatched when an interactive card (with hx-href) is clicked.\n *\n * @csspart card - The outer card container element.\n * @csspart image - The image slot container.\n * @csspart heading - The heading slot container.\n * @csspart body - The body slot container.\n * @csspart footer - The footer slot container.\n * @csspart actions - The actions slot container.\n *\n * @cssprop [--hx-card-bg=var(--hx-color-neutral-0)] - Card background color.\n * @cssprop [--hx-card-color=var(--hx-color-neutral-800)] - Card text color.\n * @cssprop [--hx-card-border-color=var(--hx-color-neutral-200)] - Card border color.\n * @cssprop [--hx-card-border-radius=var(--hx-border-radius-lg)] - Card border radius.\n * @cssprop [--hx-card-padding=var(--hx-space-6)] - Internal padding for card sections.\n * @cssprop [--hx-card-gap=var(--hx-space-4)] - Gap between card sections.\n * @cssprop [--hx-card-image-aspect-ratio=16/9] - Aspect ratio for the image slot.\n */\n@customElement('hx-card')\nexport class HelixCard extends LitElement {\n /** @internal */\n static override shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n static override styles = [helixCardStyles];\n\n /**\n * Visual style variant of the card.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'featured' | 'compact' = 'default';\n\n /**\n * Elevation (shadow depth) of the card.\n * @attr elevation\n */\n @property({ type: String, reflect: true })\n elevation: 'flat' | 'raised' | 'floating' = 'flat';\n\n /**\n * Optional URL. When set, the card becomes interactive (clickable)\n * and navigates to this URL on click.\n * Uses the hx-href attribute to avoid conflicting with the native HTML href attribute.\n * @attr hx-href\n */\n @property({ type: String, attribute: 'hx-href' })\n href: string | undefined = undefined;\n\n /**\n * Accessible label for interactive cards. Use this to provide a meaningful\n * description of the card's purpose rather than exposing the raw URL.\n * Only applies when hx-href is set.\n * @attr hx-label\n */\n @property({ type: String, attribute: 'hx-label' })\n label: string | undefined = undefined;\n\n // ─── Slot Detection ───\n\n /**\n * Tracks whether any content is assigned to the image slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasImage = false;\n\n /**\n * Tracks whether any content is assigned to the heading slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasHeading = false;\n\n /**\n * Tracks whether any content is assigned to the footer slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasFooter = false;\n\n /**\n * Tracks whether any content is assigned to the actions slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasActions = false;\n\n /** @internal */\n private _onImageSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasImage = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onHeadingSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasHeading = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onFooterSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasFooter = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onActionsSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasActions = slot.assignedNodes({ flatten: true }).length > 0;\n if (this._hasActions && this.href) {\n devWarn(\n 'hx-card',\n 'Using hx-href (interactive card) together with the actions slot is an ARIA anti-pattern: ' +\n 'interactive controls cannot be nested inside role=\"link\". ' +\n 'Use either hx-href or the actions slot, not both.',\n );\n }\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n // WCAG 4.1.2: interactive cards (with hx-href) must have an accessible name\n if (\n (changedProperties.has('href') || changedProperties.has('label')) &&\n this.href &&\n !this.label\n ) {\n devWarn(\n 'hx-card',\n \"Interactive card (hx-href is set) is missing an accessible name. Set `hx-aria-label` to describe the card's destination or purpose (WCAG 4.1.2).\",\n );\n }\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _dispatchCardClick(originalEvent: MouseEvent | KeyboardEvent): void {\n if (!this.href) return;\n\n /**\n * Dispatched when an interactive card is clicked.\n * Includes the target href in the detail.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ href: string; originalEvent: MouseEvent | KeyboardEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { href: this.href, originalEvent },\n }),\n );\n }\n\n /** @internal */\n private _handleClick(e: MouseEvent): void {\n this._dispatchCardClick(e);\n }\n\n /** @internal */\n private _handleKeyDown(e: KeyboardEvent): void {\n if (!this.href) return;\n\n // WCAG 2.1.1 / ARIA APG: role=\"link\" activates on Enter only.\n // Space is reserved for scrolling and must not activate links.\n if (e.key === 'Enter') {\n e.preventDefault();\n this._dispatchCardClick(e);\n }\n }\n\n // ─── Render ───\n\n override render() {\n const isInteractive = !!this.href;\n\n const classes = {\n card: true,\n [`card--${this.variant}`]: true,\n [`card--${this.elevation}`]: true,\n 'card--interactive': isInteractive,\n };\n\n return html`\n <div\n part=\"card\"\n class=${classMap(classes)}\n role=${isInteractive ? 'link' : nothing}\n tabindex=${isInteractive ? '0' : nothing}\n aria-label=${isInteractive && this.label ? this.label : nothing}\n @click=${this._handleClick}\n @keydown=${this._handleKeyDown}\n >\n <div class=\"card__image\" part=\"image\" ?hidden=${!this._hasImage}>\n <slot name=\"image\" @slotchange=${this._onImageSlotChange}></slot>\n </div>\n\n <div class=\"card__heading\" part=\"heading\" ?hidden=${!this._hasHeading}>\n <slot name=\"heading\" @slotchange=${this._onHeadingSlotChange}></slot>\n </div>\n\n <div class=\"card__body\" part=\"body\">\n <slot></slot>\n </div>\n\n <div class=\"card__footer\" part=\"footer\" ?hidden=${!this._hasFooter}>\n <slot name=\"footer\" @slotchange=${this._onFooterSlotChange}></slot>\n </div>\n\n <div class=\"card__actions\" part=\"actions\" ?hidden=${!this._hasActions}>\n <slot name=\"actions\" @slotchange=${this._onActionsSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-card': HelixCard;\n }\n}\n"],"names":["helixCardStyles","css","HelixCard","LitElement","e","slot","changedProperties","originalEvent","isInteractive","classes","html","classMap","nothing","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AhBE,EAAA;AAAM,GArDIb,EAqDM,WAAA,eAAA,CAAA;AAMAW,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA3DIb,EA2DM,WAAA,cAAA,CAAA;AAMAW,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAjEIb,EAiEM,WAAA,eAAA,CAAA;AAjENA,IAANW,EAAA;AAAA,EADNG,EAAc,SAAS;AAAA,GACXd,CAAA;"}
1
+ {"version":3,"file":"hx-card-BgXZXDuc.js","sources":["../../src/components/hx-card/hx-card.styles.ts","../../src/components/hx-card/hx-card.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCardStyles = css`\n :host {\n display: block;\n color: var(--hx-card-color, inherit);\n background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));\n }\n\n .card {\n display: flex;\n flex-direction: column;\n gap: var(--hx-card-gap, var(--hx-space-4, 1rem));\n background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));\n color: var(--hx-card-color, var(--hx-color-neutral-800, #212529));\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-card-border-color, var(--hx-color-neutral-200, #dee2e6));\n border-radius: var(--hx-card-border-radius, var(--hx-border-radius-lg, 0.5rem));\n overflow: hidden;\n font-family: var(--hx-font-family-sans, sans-serif);\n transition:\n box-shadow var(--hx-transition-normal, 250ms ease),\n transform var(--hx-transition-normal, 250ms ease);\n }\n\n /* ─── Elevation Variants ─── */\n\n .card--flat {\n box-shadow: none;\n }\n\n .card--raised {\n box-shadow: var(--hx-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));\n }\n\n .card--floating {\n box-shadow: var(--hx-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));\n }\n\n /* ─── Style Variants ─── */\n\n .card--default {\n /* Default styling — uses base styles */\n }\n\n .card--featured {\n border-color: var(--hx-color-primary-500, #2563eb);\n border-width: var(--hx-border-width-medium, 2px);\n }\n\n .card--compact .card__body {\n padding: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__heading {\n padding-top: var(--hx-space-3, 0.75rem);\n padding-inline-end: var(--hx-space-3, 0.75rem);\n padding-inline-start: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__footer {\n padding-inline-end: var(--hx-space-3, 0.75rem);\n padding-bottom: var(--hx-space-3, 0.75rem);\n padding-inline-start: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__actions {\n padding-inline-end: var(--hx-space-3, 0.75rem);\n padding-bottom: var(--hx-space-3, 0.75rem);\n padding-inline-start: var(--hx-space-3, 0.75rem);\n }\n\n /* ─── Interactive ─── */\n\n .card--interactive {\n cursor: pointer;\n }\n\n .card--interactive:hover {\n box-shadow: var(--hx-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));\n transform: translateY(var(--hx-lift-md, -2px));\n }\n\n .card--interactive:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-card-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .card--interactive:active {\n transform: translateY(0);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .card {\n transition: none;\n }\n\n .card--interactive:hover {\n transform: none;\n }\n\n .card--interactive:active {\n transform: none;\n }\n }\n\n /* ─── Hidden empty slot wrappers ─── */\n\n [hidden] {\n display: none !important;\n }\n\n /* ─── Sections ─── */\n\n .card__image {\n overflow: hidden;\n line-height: 0;\n }\n\n .card__image ::slotted(img) {\n width: 100%;\n aspect-ratio: var(--hx-card-image-aspect-ratio, 16 / 9);\n display: block;\n object-fit: cover;\n }\n\n .card__heading {\n padding-top: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-inline-end: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: 0;\n padding-inline-start: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n font-size: var(--hx-font-size-xl, 1.25rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n line-height: var(--hx-line-height-tight, 1.25);\n }\n\n .card__body {\n padding: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n flex: 1;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: var(--hx-line-height-normal, 1.5);\n color: var(--hx-card-color, var(--hx-color-neutral-600, #495057));\n }\n\n .card__footer {\n padding-top: 0;\n padding-inline-end: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-inline-start: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n }\n\n .card__actions {\n display: flex;\n gap: var(--hx-space-2, 0.5rem);\n padding-top: var(--hx-space-4, 1rem);\n padding-inline-end: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-inline-start: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n border-top: var(--hx-border-width-thin, 1px) solid\n var(--hx-card-border-color, var(--hx-color-neutral-200, #dee2e6));\n margin-top: auto;\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { helixCardStyles } from './hx-card.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A flexible card component for displaying grouped content.\n *\n * @summary Content container with image, heading, body, footer, and action slots.\n *\n * @tag hx-card\n *\n * @slot image - Optional image or media content at the top of the card.\n * @slot heading - The card heading/title content. Use a semantic heading element (h2, h3, etc.) for proper accessibility.\n * @slot - Default slot for the card body content.\n * @slot footer - Optional footer content below the body.\n * @slot actions - Optional action buttons, rendered with a top border separator. Do NOT use together with hx-href (interactive card + focusable actions is an ARIA anti-pattern).\n *\n * @fires {CustomEvent<{href: string, originalEvent: MouseEvent | KeyboardEvent}>} hx-click - Dispatched when an interactive card (with hx-href) is clicked.\n *\n * @csspart card - The outer card container element.\n * @csspart image - The image slot container.\n * @csspart heading - The heading slot container.\n * @csspart body - The body slot container.\n * @csspart footer - The footer slot container.\n * @csspart actions - The actions slot container.\n *\n * @cssprop [--hx-card-bg=var(--hx-color-neutral-0)] - Card background color.\n * @cssprop [--hx-card-color=var(--hx-color-neutral-800)] - Card text color.\n * @cssprop [--hx-card-border-color=var(--hx-color-neutral-200)] - Card border color.\n * @cssprop [--hx-card-border-radius=var(--hx-border-radius-lg)] - Card border radius.\n * @cssprop [--hx-card-padding=var(--hx-space-6)] - Internal padding for card sections.\n * @cssprop [--hx-card-gap=var(--hx-space-4)] - Gap between card sections.\n * @cssprop [--hx-card-image-aspect-ratio=16/9] - Aspect ratio for the image slot.\n */\n@customElement('hx-card')\nexport class HelixCard extends LitElement {\n /** @internal */\n static override shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n static override styles = [helixCardStyles];\n\n /**\n * Visual style variant of the card.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'featured' | 'compact' = 'default';\n\n /**\n * Elevation (shadow depth) of the card.\n * @attr elevation\n */\n @property({ type: String, reflect: true })\n elevation: 'flat' | 'raised' | 'floating' = 'flat';\n\n /**\n * Optional URL. When set, the card becomes interactive (clickable)\n * and navigates to this URL on click.\n * Uses the hx-href attribute to avoid conflicting with the native HTML href attribute.\n * @attr hx-href\n */\n @property({ type: String, attribute: 'hx-href' })\n href: string | undefined = undefined;\n\n /**\n * Accessible label for interactive cards. Use this to provide a meaningful\n * description of the card's purpose rather than exposing the raw URL.\n * Only applies when hx-href is set.\n * @attr hx-label\n */\n @property({ type: String, attribute: 'hx-label' })\n label: string | undefined = undefined;\n\n // ─── Slot Detection ───\n\n /**\n * Tracks whether any content is assigned to the image slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasImage = false;\n\n /**\n * Tracks whether any content is assigned to the heading slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasHeading = false;\n\n /**\n * Tracks whether any content is assigned to the footer slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasFooter = false;\n\n /**\n * Tracks whether any content is assigned to the actions slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasActions = false;\n\n /** @internal */\n private _onImageSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasImage = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onHeadingSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasHeading = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onFooterSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasFooter = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onActionsSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasActions = slot.assignedNodes({ flatten: true }).length > 0;\n if (this._hasActions && this.href) {\n devWarn(\n 'hx-card',\n 'Using hx-href (interactive card) together with the actions slot is an ARIA anti-pattern: ' +\n 'interactive controls cannot be nested inside role=\"link\". ' +\n 'Use either hx-href or the actions slot, not both.',\n );\n }\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n // WCAG 4.1.2: interactive cards (with hx-href) must have an accessible name\n if (\n (changedProperties.has('href') || changedProperties.has('label')) &&\n this.href &&\n !this.label\n ) {\n devWarn(\n 'hx-card',\n \"Interactive card (hx-href is set) is missing an accessible name. Set `hx-label` to describe the card's destination or purpose (WCAG 4.1.2).\",\n );\n }\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _dispatchCardClick(originalEvent: MouseEvent | KeyboardEvent): void {\n if (!this.href) return;\n\n /**\n * Dispatched when an interactive card is clicked.\n * Includes the target href in the detail.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ href: string; originalEvent: MouseEvent | KeyboardEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { href: this.href, originalEvent },\n }),\n );\n }\n\n /** @internal */\n private _handleClick(e: MouseEvent): void {\n this._dispatchCardClick(e);\n }\n\n /** @internal */\n private _handleKeyDown(e: KeyboardEvent): void {\n if (!this.href) return;\n\n // WCAG 2.1.1 / ARIA APG: role=\"link\" activates on Enter only.\n // Space is reserved for scrolling and must not activate links.\n if (e.key === 'Enter') {\n e.preventDefault();\n this._dispatchCardClick(e);\n }\n }\n\n // ─── Render ───\n\n override render() {\n const isInteractive = !!this.href;\n\n const classes = {\n card: true,\n [`card--${this.variant}`]: true,\n [`card--${this.elevation}`]: true,\n 'card--interactive': isInteractive,\n };\n\n return html`\n <div\n part=\"card\"\n class=${classMap(classes)}\n role=${isInteractive ? 'link' : nothing}\n tabindex=${isInteractive ? '0' : nothing}\n aria-label=${isInteractive && this.label ? this.label : nothing}\n @click=${this._handleClick}\n @keydown=${this._handleKeyDown}\n >\n <div class=\"card__image\" part=\"image\" ?hidden=${!this._hasImage}>\n <slot name=\"image\" @slotchange=${this._onImageSlotChange}></slot>\n </div>\n\n <div class=\"card__heading\" part=\"heading\" ?hidden=${!this._hasHeading}>\n <slot name=\"heading\" @slotchange=${this._onHeadingSlotChange}></slot>\n </div>\n\n <div class=\"card__body\" part=\"body\">\n <slot></slot>\n </div>\n\n <div class=\"card__footer\" part=\"footer\" ?hidden=${!this._hasFooter}>\n <slot name=\"footer\" @slotchange=${this._onFooterSlotChange}></slot>\n </div>\n\n <div class=\"card__actions\" part=\"actions\" ?hidden=${!this._hasActions}>\n <slot name=\"actions\" @slotchange=${this._onActionsSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-card': HelixCard;\n }\n}\n"],"names":["helixCardStyles","css","HelixCard","LitElement","e","slot","changedProperties","originalEvent","isInteractive","classes","html","classMap","nothing","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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CAAA;AAMAW,EAAA;AAAA,EAAhBE,EAAA;AAAM,GArDIb,EAqDM,WAAA,eAAA,CAAA;AAMAW,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA3DIb,EA2DM,WAAA,cAAA,CAAA;AAMAW,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAjEIb,EAiEM,WAAA,eAAA,CAAA;AAjENA,IAANW,EAAA;AAAA,EADNG,EAAc,SAAS;AAAA,GACXd,CAAA;"}
@@ -1,8 +1,9 @@
1
- import { css as d, LitElement as p, nothing as h, html as m } from "lit";
1
+ import { css as m, LitElement as p, nothing as h, html as f } from "lit";
2
2
  import "./document-token-adoption-DuYNKd4k.js";
3
- import { property as s, state as c, customElement as f } from "lit/decorators.js";
4
- import { classMap as _ } from "lit/directives/class-map.js";
5
- const y = d`
3
+ import { property as s, state as c, customElement as _ } from "lit/decorators.js";
4
+ import { classMap as v } from "lit/directives/class-map.js";
5
+ import { d } from "./dev-warn-YlwPHjtX.js";
6
+ const g = m`
6
7
  :host {
7
8
  display: inline-block;
8
9
  }
@@ -54,43 +55,60 @@ const y = d`
54
55
  }
55
56
  }
56
57
  `;
57
- var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (e, i, o, r) => {
58
- for (var a = r > 1 ? void 0 : r ? g(i, o) : i, l = e.length - 1, u; l >= 0; l--)
59
- (u = e[l]) && (a = (r ? u(i, o, a) : u(a)) || a);
60
- return r && a && v(i, o, a), a;
58
+ var y = Object.defineProperty, x = Object.getOwnPropertyDescriptor, n = (e, t, r, o) => {
59
+ for (var a = o > 1 ? void 0 : o ? x(t, r) : t, l = e.length - 1, u; l >= 0; l--)
60
+ (u = e[l]) && (a = (o ? u(t, r, a) : u(a)) || a);
61
+ return o && a && y(t, r, a), a;
61
62
  };
62
- let t = class extends p {
63
+ let i = class extends p {
63
64
  constructor() {
64
- super(...arguments), this.value = 0, this.duration = 1e3, this.easing = "ease-out", this.format = "integer", this.prefix = "", this.suffix = "", this.size = "md", this.label = "", this._displayValue = 0, this._announcedValue = "", this._animationId = null, this._startTime = null, this._startValue = 0, this._prefersReducedMotion = !1, this._motionMql = null, this._handleMotionChange = (e) => {
65
- this._prefersReducedMotion = e.matches, this._prefersReducedMotion && (this._cancelAnimation(), this._displayValue = this.value);
65
+ super(...arguments), this.value = 0, this.duration = 1e3, this.easing = "ease-out", this.format = "integer", this.prefix = "", this.suffix = "", this.size = "md", this.label = "", this._displayValue = 0, this._announcedValue = "", this._animationId = null, this._startTime = null, this._startValue = 0, this._prefersReducedMotion = !1, this._motionMql = null, this._resolvedEasing = "ease-out", this._handleMotionChange = (e) => {
66
+ this._prefersReducedMotion = e.matches, this._prefersReducedMotion && (this._cancelAnimation(), this._displayValue = this.value, this._announcedValue = this._buildAnnouncement(), this.requestUpdate());
66
67
  };
67
68
  }
68
69
  // ─── Lifecycle ───
69
70
  connectedCallback() {
70
71
  super.connectedCallback();
71
72
  const e = this.getAttribute("size");
72
- if (e !== null && !this.hasAttribute("hx-size") && (this.size = e), typeof window > "u") {
73
+ if (e !== null && !this.hasAttribute("hx-size") && (this.size = e), (this.label || "").trim(), typeof window > "u") {
73
74
  this._displayValue = this.value;
74
75
  return;
75
76
  }
76
- const i = window.matchMedia("(prefers-reduced-motion: reduce)");
77
- this._motionMql = i, this._prefersReducedMotion = i.matches, i.addEventListener("change", this._handleMotionChange), this._prefersReducedMotion ? (this._displayValue = this.value, this._announcedValue = this._formatValue()) : this._startAnimation();
77
+ const t = window.matchMedia("(prefers-reduced-motion: reduce)");
78
+ this._motionMql = t, this._prefersReducedMotion = t.matches, t.addEventListener("change", this._handleMotionChange), this._prefersReducedMotion ? (this._displayValue = this.value, this._announcedValue = this._buildAnnouncement()) : this._startAnimation();
78
79
  }
79
80
  disconnectedCallback() {
80
81
  var e;
81
82
  super.disconnectedCallback(), this._cancelAnimation(), (e = this._motionMql) == null || e.removeEventListener("change", this._handleMotionChange), this._motionMql = null;
82
83
  }
83
84
  updated(e) {
84
- super.updated(e), e.has("value") && e.get("value") !== void 0 && (this._prefersReducedMotion ? (this._displayValue = this.value, this._announcedValue = this._formatValue()) : (this._startValue = this._displayValue, this._startTime = null, this._startAnimation()));
85
+ super.updated(e), e.has("value") && e.get("value") !== void 0 && (this._prefersReducedMotion ? (this._displayValue = this.value, this._announcedValue = this._buildAnnouncement()) : (this._startValue = this._displayValue, this._startTime = null, this._startAnimation()));
85
86
  }
86
87
  // ─── Animation ───
87
88
  /** @internal */
88
89
  _cancelAnimation() {
89
90
  this._animationId !== null && (cancelAnimationFrame(this._animationId), this._animationId = null);
90
91
  }
92
+ /**
93
+ * Validates `this.easing` once per animation start and stores the result in
94
+ * `_resolvedEasing`. This prevents devWarn from firing on every rAF tick for
95
+ * an invalid easing value — the warning is emitted at most once per call.
96
+ * @internal
97
+ */
98
+ _normalizeEasing() {
99
+ [
100
+ "linear",
101
+ "ease-in",
102
+ "ease-out",
103
+ "ease-in-out"
104
+ ].includes(this.easing) ? this._resolvedEasing = this.easing : (d(
105
+ "hx-counter",
106
+ `Unrecognized easing value "${this.easing}". Falling back to "linear". Valid values: ease-in, ease-out, ease-in-out, linear.`
107
+ ), this._resolvedEasing = "linear");
108
+ }
91
109
  /** @internal */
92
110
  _applyEasing(e) {
93
- switch (this.easing) {
111
+ switch (this._resolvedEasing) {
94
112
  case "linear":
95
113
  return e;
96
114
  case "ease-in":
@@ -103,13 +121,15 @@ let t = class extends p {
103
121
  }
104
122
  /** @internal */
105
123
  _startAnimation() {
106
- this._cancelAnimation();
107
- const e = (i) => {
108
- this._startTime === null && (this._startTime = i);
109
- const o = i - this._startTime, r = Math.min(o / this.duration, 1), a = this._applyEasing(r);
110
- this._displayValue = this._startValue + (this.value - this._startValue) * a, r < 1 ? this._animationId = requestAnimationFrame(e) : (this._displayValue = this.value, this._animationId = null, this._announcedValue = this._formatValue());
124
+ this._cancelAnimation(), this._normalizeEasing();
125
+ let e;
126
+ this.duration <= 0 ? (d("hx-counter", `duration must be > 0 (received ${this.duration}). Clamping to 1ms.`), e = 1) : e = this.duration;
127
+ const t = (r) => {
128
+ this._startTime === null && (this._startTime = r);
129
+ const o = r - this._startTime, a = Math.min(o / e, 1), l = this._applyEasing(a);
130
+ this._displayValue = this._startValue + (this.value - this._startValue) * l, a < 1 ? this._animationId = requestAnimationFrame(t) : (this._displayValue = this.value, this._animationId = null, this._announcedValue = this._buildAnnouncement());
111
131
  };
112
- this._animationId = requestAnimationFrame(e);
132
+ this._animationId = requestAnimationFrame(t);
113
133
  }
114
134
  // ─── Formatting ───
115
135
  /** @internal */
@@ -117,17 +137,32 @@ let t = class extends p {
117
137
  const e = this.format === "integer" ? Math.round(this._displayValue) : parseFloat(this._displayValue.toFixed(2));
118
138
  return `${this.prefix}${e.toLocaleString()}${this.suffix}`;
119
139
  }
140
+ /**
141
+ * Builds the string announced to screen readers at animation end.
142
+ * Includes label context when present so users hear "Total patients: 1,284"
143
+ * rather than a bare number with no semantic context.
144
+ * @internal
145
+ */
146
+ _buildAnnouncement() {
147
+ const e = (this.label || "").trim();
148
+ if (!e)
149
+ return "";
150
+ const t = this._formatValue();
151
+ return `${e}: ${t}`;
152
+ }
120
153
  // ─── Render ───
121
154
  render() {
122
155
  const e = {
123
156
  counter: !0,
124
157
  [`counter--${this.size}`]: !0
125
- };
126
- return m`
158
+ }, t = (this.label || "").trim();
159
+ return f`
127
160
  <span
128
161
  part="counter"
129
- class=${_(e)}
130
- aria-label=${this.label ? `${this.label}: ${this._formatValue()}` : h}
162
+ role="status"
163
+ aria-live="off"
164
+ class=${v(e)}
165
+ aria-label=${t ? `${t}: ${this._formatValue()}` : h}
131
166
  >
132
167
  ${this._formatValue()}
133
168
  </span>
@@ -145,41 +180,41 @@ let t = class extends p {
145
180
  `;
146
181
  }
147
182
  };
148
- t.styles = [y];
183
+ i.styles = [g];
149
184
  n([
150
185
  s({ type: Number })
151
- ], t.prototype, "value", 2);
186
+ ], i.prototype, "value", 2);
152
187
  n([
153
188
  s({ type: Number })
154
- ], t.prototype, "duration", 2);
189
+ ], i.prototype, "duration", 2);
155
190
  n([
156
191
  s({ type: String })
157
- ], t.prototype, "easing", 2);
192
+ ], i.prototype, "easing", 2);
158
193
  n([
159
194
  s({ type: String })
160
- ], t.prototype, "format", 2);
195
+ ], i.prototype, "format", 2);
161
196
  n([
162
197
  s({ type: String })
163
- ], t.prototype, "prefix", 2);
198
+ ], i.prototype, "prefix", 2);
164
199
  n([
165
200
  s({ type: String })
166
- ], t.prototype, "suffix", 2);
201
+ ], i.prototype, "suffix", 2);
167
202
  n([
168
203
  s({ type: String, reflect: !0, attribute: "hx-size" })
169
- ], t.prototype, "size", 2);
204
+ ], i.prototype, "size", 2);
170
205
  n([
171
206
  s({ type: String })
172
- ], t.prototype, "label", 2);
207
+ ], i.prototype, "label", 2);
173
208
  n([
174
209
  c()
175
- ], t.prototype, "_displayValue", 2);
210
+ ], i.prototype, "_displayValue", 2);
176
211
  n([
177
212
  c()
178
- ], t.prototype, "_announcedValue", 2);
179
- t = n([
180
- f("hx-counter")
181
- ], t);
213
+ ], i.prototype, "_announcedValue", 2);
214
+ i = n([
215
+ _("hx-counter")
216
+ ], i);
182
217
  export {
183
- t as H
218
+ i as H
184
219
  };
185
- //# sourceMappingURL=hx-counter-CP42cSVK.js.map
220
+ //# sourceMappingURL=hx-counter-B5NgKlw4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hx-counter-B5NgKlw4.js","sources":["../../src/components/hx-counter/hx-counter.styles.ts","../../src/components/hx-counter/hx-counter.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCounterStyles = css`\n :host {\n display: inline-block;\n }\n\n .counter {\n display: inline-flex;\n align-items: baseline;\n font-family: var(--hx-counter-font-family, var(--hx-font-family-sans, sans-serif));\n font-weight: var(--hx-counter-font-weight, var(--hx-font-weight-bold, 700));\n color: var(--hx-counter-color, var(--hx-color-neutral-900, #111827));\n line-height: var(--hx-line-height-tight, 1.25);\n font-variant-numeric: tabular-nums;\n }\n\n /* ─── Size Variants ─── */\n\n .counter--sm {\n font-size: var(--hx-counter-font-size-sm, var(--hx-font-size-xl, 1.25rem));\n }\n\n .counter--md {\n font-size: var(--hx-counter-font-size-md, var(--hx-font-size-3xl, 1.875rem));\n }\n\n .counter--lg {\n font-size: var(--hx-counter-font-size-lg, var(--hx-font-size-5xl, 3rem));\n }\n\n /* ─── Screen-reader only (visually hidden live region) ─── */\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .counter {\n /* Animation is handled in JS — reduced-motion consumers\n will see the final value immediately via the component logic */\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { helixCounterStyles } from './hx-counter.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\nexport type CounterSize = 'sm' | 'md' | 'lg';\nexport type CounterEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out';\nexport type CounterFormat = 'integer' | 'decimal';\n\n/**\n * Animated number counter that counts from 0 (or the previous value) to the\n * target value using requestAnimationFrame. Respects prefers-reduced-motion.\n *\n * @summary Displays an animated numeric counter that transitions to a target value.\n *\n * @tag hx-counter\n *\n * @csspart counter - The outer counter element.\n *\n * @cssprop [--hx-counter-font-family=var(--hx-font-family-sans)] - Font family.\n * @cssprop [--hx-counter-font-weight=var(--hx-font-weight-bold)] - Font weight.\n * @cssprop [--hx-counter-color=var(--hx-color-neutral-900)] - Counter text color.\n * @cssprop [--hx-counter-font-size-sm=var(--hx-font-size-xl)] - Font size at sm.\n * @cssprop [--hx-counter-font-size-md=var(--hx-font-size-3xl)] - Font size at md.\n * @cssprop [--hx-counter-font-size-lg=var(--hx-font-size-5xl)] - Font size at lg.\n */\n@customElement('hx-counter')\nexport class HelixCounter extends LitElement {\n static override styles = [helixCounterStyles];\n\n /**\n * The target numeric value to count to.\n * @attr value\n */\n @property({ type: Number })\n value = 0;\n\n /**\n * Animation duration in milliseconds.\n * @attr duration\n */\n @property({ type: Number })\n duration = 1000;\n\n /**\n * Easing function applied to the animation progress.\n * @attr easing\n */\n @property({ type: String })\n easing: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' = 'ease-out';\n\n /**\n * Number format. 'integer' rounds to the nearest whole number;\n * 'decimal' shows two decimal places.\n * @attr format\n */\n @property({ type: String })\n format: 'integer' | 'decimal' = 'integer';\n\n /**\n * String prepended to the formatted value (e.g., '$').\n * @attr prefix\n */\n @property({ type: String })\n prefix = '';\n\n /**\n * String appended to the formatted value (e.g., '%').\n * @attr suffix\n */\n @property({ type: String })\n suffix = '';\n\n /**\n * Size variant controlling font size.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Accessible label describing the counter's context (e.g. \"Total patients\", \"Active alerts\").\n * WCAG 4.1.2: a numeric value alone is meaningless without context for screen readers.\n * When provided, the value is applied as aria-label on the counter element.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n // ─── Internal State ───\n\n /** @internal */\n @state() private _displayValue = 0;\n\n /**\n * The final value announced to screen readers once animation completes.\n * Updated only at animation end so AT users hear the result, not every frame.\n * @internal\n */\n @state() private _announcedValue = '';\n\n /** @internal */\n private _animationId: number | null = null;\n /** @internal */\n private _startTime: number | null = null;\n /** @internal */\n private _startValue = 0;\n /** @internal */\n private _prefersReducedMotion = false;\n /** @internal */\n private _motionMql: MediaQueryList | null = null;\n /**\n * Normalized easing value after validation. Set once per animation start\n * to avoid repeated devWarn calls on every requestAnimationFrame tick.\n * @internal\n */\n private _resolvedEasing: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' = 'ease-out';\n /** @internal */\n private readonly _handleMotionChange = (e: MediaQueryListEvent): void => {\n this._prefersReducedMotion = e.matches;\n if (this._prefersReducedMotion) {\n this._cancelAnimation();\n this._displayValue = this.value;\n this._announcedValue = this._buildAnnouncement();\n this.requestUpdate();\n }\n };\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Backward compat: accept legacy `size` attribute. When present and `hx-size`\n // is not set, map the value and emit a deprecation warning.\n const legacySize = this.getAttribute('size');\n if (legacySize !== null && !this.hasAttribute('hx-size')) {\n devWarn('hx-counter', 'The \"size\" attribute is deprecated. Use \"hx-size\" instead.');\n this.size = legacySize as CounterSize;\n }\n\n // WCAG 4.1.2: a numeric value without context is meaningless to screen readers.\n // Normalize: whitespace-only labels are treated as empty.\n if (!(this.label || '').trim()) {\n devWarn(\n 'hx-counter',\n 'hx-counter requires a label for screen reader accessibility (WCAG 4.1.2). Provide the `label` attribute.',\n );\n }\n\n // Guard for SSR — window.matchMedia and requestAnimationFrame are unavailable server-side\n if (typeof window === 'undefined') {\n this._displayValue = this.value;\n return;\n }\n\n const mq = window.matchMedia('(prefers-reduced-motion: reduce)');\n this._motionMql = mq;\n this._prefersReducedMotion = mq.matches;\n mq.addEventListener('change', this._handleMotionChange);\n\n if (this._prefersReducedMotion) {\n this._displayValue = this.value;\n this._announcedValue = this._buildAnnouncement();\n } else {\n this._startAnimation();\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._cancelAnimation();\n this._motionMql?.removeEventListener('change', this._handleMotionChange);\n this._motionMql = null;\n }\n\n override updated(changedProps: PropertyValues<this>): void {\n super.updated(changedProps);\n if (changedProps.has('value') && changedProps.get('value') !== undefined) {\n if (this._prefersReducedMotion) {\n this._displayValue = this.value;\n this._announcedValue = this._buildAnnouncement();\n } else {\n this._startValue = this._displayValue;\n this._startTime = null;\n this._startAnimation();\n }\n }\n }\n\n // ─── Animation ───\n\n /** @internal */\n private _cancelAnimation(): void {\n if (this._animationId !== null) {\n cancelAnimationFrame(this._animationId);\n this._animationId = null;\n }\n }\n\n /**\n * Validates `this.easing` once per animation start and stores the result in\n * `_resolvedEasing`. This prevents devWarn from firing on every rAF tick for\n * an invalid easing value — the warning is emitted at most once per call.\n * @internal\n */\n private _normalizeEasing(): void {\n const validEasings: Array<'linear' | 'ease-in' | 'ease-out' | 'ease-in-out'> = [\n 'linear',\n 'ease-in',\n 'ease-out',\n 'ease-in-out',\n ];\n if (validEasings.includes(this.easing)) {\n this._resolvedEasing = this.easing;\n } else {\n devWarn(\n 'hx-counter',\n `Unrecognized easing value \"${this.easing as string}\". Falling back to \"linear\". Valid values: ease-in, ease-out, ease-in-out, linear.`,\n );\n this._resolvedEasing = 'linear';\n }\n }\n\n /** @internal */\n private _applyEasing(t: number): number {\n switch (this._resolvedEasing) {\n case 'linear':\n return t;\n case 'ease-in':\n return t * t;\n case 'ease-out':\n return t * (2 - t);\n case 'ease-in-out':\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n }\n }\n\n /** @internal */\n private _startAnimation(): void {\n this._cancelAnimation();\n this._normalizeEasing();\n\n let effectiveDuration: number;\n if (this.duration <= 0) {\n devWarn('hx-counter', `duration must be > 0 (received ${this.duration}). Clamping to 1ms.`);\n effectiveDuration = 1;\n } else {\n effectiveDuration = this.duration;\n }\n\n const step = (timestamp: number): void => {\n if (this._startTime === null) {\n this._startTime = timestamp;\n }\n\n const elapsed = timestamp - this._startTime;\n const rawProgress = Math.min(elapsed / effectiveDuration, 1);\n const easedProgress = this._applyEasing(rawProgress);\n\n this._displayValue = this._startValue + (this.value - this._startValue) * easedProgress;\n\n if (rawProgress < 1) {\n this._animationId = requestAnimationFrame(step);\n } else {\n this._displayValue = this.value;\n this._animationId = null;\n // WCAG 4.1.2: announce the final value only once, at animation end.\n // _announcedValue feeds the off-screen live region so screen readers\n // hear a single announcement rather than one per animation frame.\n this._announcedValue = this._buildAnnouncement();\n }\n };\n\n this._animationId = requestAnimationFrame(step);\n }\n\n // ─── Formatting ───\n\n /** @internal */\n private _formatValue(): string {\n const num =\n this.format === 'integer'\n ? Math.round(this._displayValue)\n : parseFloat(this._displayValue.toFixed(2));\n\n return `${this.prefix}${num.toLocaleString()}${this.suffix}`;\n }\n\n /**\n * Builds the string announced to screen readers at animation end.\n * Includes label context when present so users hear \"Total patients: 1,284\"\n * rather than a bare number with no semantic context.\n * @internal\n */\n private _buildAnnouncement(): string {\n const normalizedLabel = (this.label || '').trim();\n if (!normalizedLabel) {\n // No label means the number lacks context — return empty to prevent\n // announcing a context-free number to screen readers.\n return '';\n }\n const formatted = this._formatValue();\n return `${normalizedLabel}: ${formatted}`;\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n counter: true,\n [`counter--${this.size}`]: true,\n };\n\n const trimmedLabel = (this.label || '').trim();\n\n return html`\n <span\n part=\"counter\"\n role=\"status\"\n aria-live=\"off\"\n class=${classMap(classes)}\n aria-label=${trimmedLabel ? `${trimmedLabel}: ${this._formatValue()}` : nothing}\n >\n ${this._formatValue()}\n </span>\n <!--\n WCAG 4.1.2: off-screen live region updated only at animation end.\n Prevents screen readers from announcing every intermediate frame value.\n -->\n <span\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n aria-hidden=${this._announcedValue ? nothing : 'true'}\n >${this._announcedValue}</span\n >\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-counter': HelixCounter;\n }\n}\n"],"names":["helixCounterStyles","css","HelixCounter","LitElement","legacySize","mq","_a","changedProps","devWarn","t","effectiveDuration","step","timestamp","elapsed","rawProgress","easedProgress","num","normalizedLabel","formatted","classes","trimmedLabel","html","classMap","nothing","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAqBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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