@helixui/library 0.3.1 → 0.3.2
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.
- package/custom-elements.json +2330 -1860
- package/dist/components/hx-action-bar/hx-action-bar.d.ts +3 -1
- package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
- package/dist/components/hx-action-bar/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.d.ts +8 -0
- package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
- package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
- package/dist/components/hx-badge/index.d.ts +1 -0
- package/dist/components/hx-badge/index.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +0 -25
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/index.js +1 -1
- package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
- package/dist/components/hx-button/index.js +1 -1
- package/dist/components/hx-button-group/hx-button-group.d.ts +3 -1
- package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
- package/dist/components/hx-button-group/index.js +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +3 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/index.js +1 -1
- package/dist/components/hx-container/hx-container.d.ts +12 -0
- package/dist/components/hx-container/hx-container.d.ts.map +1 -1
- package/dist/components/hx-container/hx-container.styles.d.ts.map +1 -1
- package/dist/components/hx-container/index.d.ts +1 -0
- package/dist/components/hx-container/index.d.ts.map +1 -1
- package/dist/components/hx-container/index.js +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts +7 -0
- package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.d.ts +87 -0
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -0
- package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts +2 -0
- package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts.map +1 -0
- package/dist/components/hx-icon-button/index.d.ts +2 -0
- package/dist/components/hx-icon-button/index.d.ts.map +1 -0
- package/dist/components/hx-icon-button/index.js +5 -0
- package/dist/components/hx-icon-button/index.js.map +1 -0
- package/dist/components/hx-image/index.js +1 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts +2 -2
- package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
- package/dist/components/hx-pagination/hx-pagination.d.ts +2 -0
- package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/index.d.ts +1 -0
- package/dist/components/hx-pagination/index.d.ts.map +1 -1
- package/dist/components/hx-prose/index.js +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts +31 -10
- package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.styles.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.d.ts +6 -4
- package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts +12 -6
- package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
- package/dist/components/hx-spinner/index.d.ts +1 -0
- package/dist/components/hx-spinner/index.d.ts.map +1 -1
- package/dist/components/hx-stack/hx-stack.d.ts +20 -0
- package/dist/components/hx-stack/hx-stack.d.ts.map +1 -1
- package/dist/components/hx-stack/index.js +1 -1
- package/dist/components/hx-steps/hx-step.d.ts +8 -0
- package/dist/components/hx-steps/hx-step.d.ts.map +1 -1
- package/dist/components/hx-structured-list/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +2 -2
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-tag/index.d.ts +3 -0
- package/dist/components/hx-tag/index.d.ts.map +1 -1
- package/dist/components/hx-text/hx-text.d.ts +0 -2
- package/dist/components/hx-text/hx-text.d.ts.map +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts +7 -0
- package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts +4 -0
- package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
- package/dist/components/hx-theme/index.d.ts +3 -1
- package/dist/components/hx-theme/index.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +2 -2
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.d.ts +29 -10
- package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.styles.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.d.ts +22 -2
- package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.styles.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.d.ts +6 -1
- package/dist/components/hx-tree-view/index.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +107 -105
- package/dist/index.js.map +1 -1
- package/dist/shared/{hx-action-bar-D43v5rA2.js → hx-action-bar-B4i9tBCP.js} +71 -61
- package/dist/shared/hx-action-bar-B4i9tBCP.js.map +1 -0
- package/dist/shared/{hx-badge-DYB1Pnym.js → hx-badge-CjT0d8NK.js} +9 -2
- package/dist/shared/hx-badge-CjT0d8NK.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-TKRcrMYc.js → hx-breadcrumb-item-DtSxRZ_W.js} +25 -18
- package/dist/shared/hx-breadcrumb-item-DtSxRZ_W.js.map +1 -0
- package/dist/shared/{hx-button-SAbf4_jC.js → hx-button-CtiJsmOg.js} +31 -29
- package/dist/shared/hx-button-CtiJsmOg.js.map +1 -0
- package/dist/shared/{hx-button-group-DET_Pkxt.js → hx-button-group-BMV5qFs4.js} +19 -13
- package/dist/shared/{hx-button-group-DET_Pkxt.js.map → hx-button-group-BMV5qFs4.js.map} +1 -1
- package/dist/shared/{hx-checkbox-group-CIIijwmc.js → hx-checkbox-group-DTS9iT4b.js} +26 -20
- package/dist/shared/hx-checkbox-group-DTS9iT4b.js.map +1 -0
- package/dist/shared/{hx-container-BXZBaOGG.js → hx-container-DLUKnTi9.js} +9 -8
- package/dist/shared/hx-container-DLUKnTi9.js.map +1 -0
- package/dist/shared/hx-copy-button-BXL1xkxb.js.map +1 -1
- package/dist/shared/{hx-drawer-CenIAGuR.js → hx-drawer-bTF0nbrg.js} +2 -2
- package/dist/shared/hx-drawer-bTF0nbrg.js.map +1 -0
- package/dist/shared/hx-icon-button-C_fsUJW4.js +257 -0
- package/dist/shared/hx-icon-button-C_fsUJW4.js.map +1 -0
- package/dist/shared/{hx-image-CzkOEeO4.js → hx-image-xyb_tHCR.js} +2 -2
- package/dist/shared/hx-image-xyb_tHCR.js.map +1 -0
- package/dist/shared/hx-number-input-CS6_w1lT.js.map +1 -1
- package/dist/shared/hx-pagination-DNFgXQm3.js.map +1 -1
- package/dist/shared/{hx-prose-BUkZ8rB3.js → hx-prose-DZh2KrMb.js} +10 -7
- package/dist/shared/{hx-prose-BUkZ8rB3.js.map → hx-prose-DZh2KrMb.js.map} +1 -1
- package/dist/shared/{hx-radio-reSaVmIB.js → hx-radio-CGtFKls2.js} +42 -14
- package/dist/shared/hx-radio-CGtFKls2.js.map +1 -0
- package/dist/shared/{hx-slider-CzHOl3Ur.js → hx-slider-Duzmuid9.js} +12 -8
- package/dist/shared/hx-slider-Duzmuid9.js.map +1 -0
- package/dist/shared/hx-spinner-BOApJ-g9.js.map +1 -1
- package/dist/shared/{hx-stack-C3xUwi6-.js → hx-stack-CfoW7jU7.js} +21 -1
- package/dist/shared/{hx-stack-C3xUwi6-.js.map → hx-stack-CfoW7jU7.js.map} +1 -1
- package/dist/shared/hx-step-nMT0fHEn.js.map +1 -1
- package/dist/shared/{hx-structured-list-DKborM60.js → hx-structured-list-CMja1VXz.js} +5 -5
- package/dist/shared/{hx-structured-list-DKborM60.js.map → hx-structured-list-CMja1VXz.js.map} +1 -1
- package/dist/shared/hx-switch-BPvIcDpM.js.map +1 -1
- package/dist/shared/hx-text-NjKoQATI.js.map +1 -1
- package/dist/shared/{hx-textarea-BLcReynr.js → hx-textarea-B_nmxzhC.js} +12 -8
- package/dist/shared/hx-textarea-B_nmxzhC.js.map +1 -0
- package/dist/shared/hx-theme-6GDoUG8j.js.map +1 -1
- package/dist/shared/{hx-toggle-button---Z4zvmn.js → hx-toggle-button--xCXWRJW.js} +3 -3
- package/dist/shared/{hx-toggle-button---Z4zvmn.js.map → hx-toggle-button--xCXWRJW.js.map} +1 -1
- package/dist/shared/{hx-tree-item-CIo3ek2M.js → hx-tree-item-Cesh_du5.js} +170 -148
- package/dist/shared/hx-tree-item-Cesh_du5.js.map +1 -0
- package/package.json +7 -1
- package/dist/shared/hx-action-bar-D43v5rA2.js.map +0 -1
- package/dist/shared/hx-badge-DYB1Pnym.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-TKRcrMYc.js.map +0 -1
- package/dist/shared/hx-button-SAbf4_jC.js.map +0 -1
- package/dist/shared/hx-checkbox-group-CIIijwmc.js.map +0 -1
- package/dist/shared/hx-container-BXZBaOGG.js.map +0 -1
- package/dist/shared/hx-drawer-CenIAGuR.js.map +0 -1
- package/dist/shared/hx-image-CzkOEeO4.js.map +0 -1
- package/dist/shared/hx-radio-reSaVmIB.js.map +0 -1
- package/dist/shared/hx-slider-CzHOl3Ur.js.map +0 -1
- package/dist/shared/hx-textarea-BLcReynr.js.map +0 -1
- package/dist/shared/hx-tree-item-CIo3ek2M.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-number-input-CS6_w1lT.js","sources":["../../src/components/hx-number-input/hx-number-input.styles.ts","../../src/components/hx-number-input/hx-number-input.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixNumberInputStyles = css`\n :host {\n display: block;\n }\n\n :host([disabled]) {\n opacity: var(--hx-opacity-disabled);\n pointer-events: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1);\n font-family: var(--hx-number-input-font-family, var(--hx-font-family-sans));\n }\n\n /* ─── Label ─── */\n\n .field__label-wrapper {\n display: contents;\n }\n\n .field__label {\n display: flex;\n align-items: baseline;\n gap: var(--hx-space-1);\n font-size: var(--hx-font-size-sm);\n font-weight: var(--hx-font-weight-medium);\n color: var(--hx-number-input-label-color, var(--hx-color-neutral-700));\n line-height: var(--hx-line-height-normal);\n }\n\n .field__required-marker {\n color: var(--hx-number-input-error-color, var(--hx-color-error-text, #b91c1c));\n font-weight: var(--hx-font-weight-bold);\n }\n\n /* ─── Input Wrapper ─── */\n\n .field__input-wrapper {\n display: flex;\n align-items: stretch;\n border: var(--hx-border-width-thin) solid\n var(--hx-number-input-border-color, var(--hx-color-neutral-300));\n border-radius: var(--hx-number-input-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-number-input-bg, var(--hx-color-neutral-0));\n transition:\n border-color var(--hx-transition-fast),\n box-shadow var(--hx-transition-fast);\n overflow: hidden;\n }\n\n .field__input-wrapper:focus-within {\n border-color: var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color));\n /* Fallback for Safari < 16.2 (no color-mix support) */\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color));\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n color-mix(\n in srgb,\n var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color))\n calc(var(--hx-focus-ring-opacity) * 100%),\n transparent\n );\n }\n\n /* ─── Error State ─── */\n\n .field--error .field__input-wrapper {\n border-color: var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626));\n }\n\n .field--error .field__input-wrapper:focus-within {\n border-color: var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626));\n /* Fallback for Safari < 16.2 (no color-mix support) */\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626));\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n color-mix(\n in srgb,\n var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626))\n calc(var(--hx-focus-ring-opacity) * 100%),\n transparent\n );\n }\n\n /* ─── Slots (Prefix / Suffix) ─── */\n\n .field__prefix,\n .field__suffix {\n display: flex;\n align-items: center;\n padding: 0 var(--hx-space-3);\n color: var(--hx-color-neutral-500);\n flex-shrink: 0;\n }\n\n /* ─── Native Input ─── */\n\n .field__input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n font-family: inherit;\n color: var(--hx-number-input-color, var(--hx-color-neutral-800));\n line-height: var(--hx-line-height-normal);\n width: 100%;\n /* Size: md (default) */\n padding: var(--hx-space-2) var(--hx-space-3);\n font-size: var(--hx-font-size-md);\n min-height: var(--hx-size-10);\n }\n\n .field__input::placeholder {\n color: var(--hx-color-neutral-400);\n }\n\n .field__input:disabled {\n cursor: not-allowed;\n }\n\n /* ─── Hide native browser spinners ─── */\n\n .field__input[type='number']::-webkit-inner-spin-button,\n .field__input[type='number']::-webkit-outer-spin-button {\n display: none;\n }\n\n .field__input[type='number'] {\n appearance: textfield;\n }\n\n /* ─── Size Variants ─── */\n\n .field--sm .field__input {\n padding: var(--hx-space-1) var(--hx-space-2);\n font-size: var(--hx-font-size-sm);\n min-height: var(--hx-size-8);\n }\n\n .field--lg .field__input {\n padding: var(--hx-space-3) var(--hx-space-4);\n font-size: var(--hx-font-size-lg);\n min-height: var(--hx-size-12);\n }\n\n /* ─── Stepper ─── */\n\n .field__stepper {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n border-left: var(--hx-border-width-thin) solid\n var(--hx-number-input-border-color, var(--hx-color-neutral-300));\n }\n\n .field__stepper-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n cursor: pointer;\n color: var(--hx-color-neutral-600);\n padding: 0;\n flex: 1;\n min-width: var(--hx-size-8);\n line-height: 1;\n transition: background-color var(--hx-transition-fast);\n user-select: none;\n -webkit-user-select: none;\n }\n\n .field__stepper-btn:not(:last-child) {\n border-bottom: var(--hx-border-width-thin) solid\n var(--hx-number-input-border-color, var(--hx-color-neutral-300));\n }\n\n .field__stepper-btn:hover:not(:disabled) {\n background-color: var(--hx-color-neutral-50);\n color: var(--hx-color-neutral-800);\n }\n\n /* Suppress focus ring for mouse/touch focus; keep for keyboard and programmatic focus */\n .field__stepper-btn:focus:not(:focus-visible) {\n outline: none;\n }\n\n .field__stepper-btn:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: -2px;\n }\n\n .field__stepper-btn:disabled {\n opacity: var(--hx-opacity-disabled);\n cursor: not-allowed;\n }\n\n .field__stepper-btn svg {\n pointer-events: none;\n width: 0.75rem;\n height: 0.75rem;\n }\n\n /* Size sm adjustments for stepper */\n .field--sm .field__stepper-btn {\n min-width: var(--hx-size-6);\n }\n\n /* Size lg adjustments for stepper */\n .field--lg .field__stepper-btn {\n min-width: var(--hx-size-10);\n }\n\n /* ─── Help Text & Error Messages ─── */\n\n .field__help-text {\n font-size: var(--hx-font-size-xs);\n color: var(--hx-color-neutral-500);\n line-height: var(--hx-line-height-normal);\n }\n\n .field__error {\n font-size: var(--hx-font-size-xs);\n color: var(--hx-number-input-error-color, var(--hx-color-error-text, #b91c1c));\n line-height: var(--hx-line-height-normal);\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .field__input-wrapper {\n transition: none;\n }\n\n .field__stepper-btn {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixNumberInputStyles } from './hx-number-input.styles.js';\n\n// Module-level counter for stable, SSR-safe IDs (avoids Math.random() hydration mismatch)\nlet _hxNumberInputIdCounter = 0;\n\n/**\n * A numeric input component with stepper controls, label, validation, and\n * full form association. Designed for healthcare data-entry contexts where\n * precise numeric values (dosage, age, measurements) must be captured safely.\n *\n * @summary Form-associated numeric input with stepper buttons, bounds checking,\n * label, error, and help text.\n *\n * @tag hx-number-input\n *\n * @slot label - Custom label content (overrides the label property). Use for Drupal Form API rendered labels.\n * @slot help-text - Custom help text content (overrides the helpText property).\n * @slot error - Custom error content (overrides the error property). Use for Drupal Form API rendered errors.\n * @slot prefix - Content rendered before the input (e.g., a unit icon).\n * @slot suffix - Content rendered after the input and before the stepper buttons (e.g., a unit label).\n *\n * @fires {CustomEvent<{value: number | null}>} hx-input - Dispatched on every keystroke as the user types.\n * @fires {CustomEvent<{value: number | null}>} hx-change - Dispatched when the input loses focus after its value changed.\n *\n * @csspart field - The outer field container.\n * @csspart label - The label element.\n * @csspart input-wrapper - The wrapper around prefix, input, suffix, and stepper.\n * @csspart input - The native input element.\n * @csspart help-text - The help text container.\n * @csspart error-message - The error message container.\n * @csspart stepper - The stepper button group container.\n * @csspart increment - The increment (+) button.\n * @csspart decrement - The decrement (-) button.\n *\n * @cssprop [--hx-number-input-bg=var(--hx-color-neutral-0)] - Input background color.\n * @cssprop [--hx-number-input-color=var(--hx-color-neutral-800)] - Input text color.\n * @cssprop [--hx-number-input-border-color=var(--hx-color-neutral-300)] - Input border color.\n * @cssprop [--hx-number-input-border-radius=var(--hx-border-radius-md)] - Input border radius.\n * @cssprop [--hx-number-input-error-color=var(--hx-color-error-500)] - Error state color.\n * @cssprop [--hx-number-input-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n * @cssprop [--hx-number-input-label-color=var(--hx-color-neutral-700)] - Label text color.\n * @cssprop [--hx-number-input-font-family=var(--hx-font-family-sans)] - Font family.\n */\n@customElement('hx-number-input')\nexport class HelixNumberInput extends LitElement {\n static override styles = [tokenStyles, helixNumberInputStyles];\n\n // ─── Form Association ───\n\n static formAssociated = true;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n // ─── Properties ───\n\n /**\n * The name of the input, used for form submission.\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * The current numeric value of the input. Null when the field is empty.\n * @attr value\n */\n @property({\n type: Number,\n converter: {\n fromAttribute: (attr: string | null): number | null => {\n if (attr === null || attr === '') return null;\n const n = Number(attr);\n return isNaN(n) ? null : n;\n },\n toAttribute: (val: number | null): string | null => (val === null ? null : String(val)),\n },\n })\n value: number | null = null;\n\n /**\n * Whether the input is required for form submission.\n * @attr required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Whether the input is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the input is read-only.\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true })\n readonly = false;\n\n /**\n * Minimum allowed value. When reached, the decrement button is disabled.\n * @attr min\n */\n @property({ type: Number })\n min: number | undefined = undefined;\n\n /**\n * Maximum allowed value. When reached, the increment button is disabled.\n * @attr max\n */\n @property({ type: Number })\n max: number | undefined = undefined;\n\n /**\n * The amount to increment or decrement on each step action.\n * @attr step\n */\n @property({ type: Number })\n step = 1;\n\n /**\n * The visible label text for the input.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Error message to display. When set, the input enters an error state.\n * @attr error\n */\n @property({ type: String })\n error = '';\n\n /**\n * Help text displayed below the input for guidance.\n * @attr help-text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText = '';\n\n /**\n * Size variant controlling input padding and font size.\n * @attr hx-size\n */\n @property({ type: String, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * When set, hides the +/- stepper buttons.\n * @attr no-stepper\n */\n @property({ type: Boolean, attribute: 'no-stepper' })\n noStepper = false;\n\n // ─── Internal References ───\n\n @query('.field__input')\n private _input!: HTMLInputElement;\n\n // ─── Internal State ───\n\n @state() private _hasLabelSlot = false;\n @state() private _hasErrorSlot = false;\n @state() private _hasHelpSlot = false;\n\n /** The value captured at first render, used by formResetCallback. */\n private _defaultValue: number | null = null;\n\n /** Timer ID for the long-press initial delay. */\n private _longPressTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** Interval ID for the long-press rapid-repeat phase. */\n private _repeatInterval: ReturnType<typeof setInterval> | null = null;\n\n // ─── Stable IDs ───\n\n private readonly _inputId = `hx-number-input-${++_hxNumberInputIdCounter}`;\n private readonly _helpTextId = `${this._inputId}-help`;\n private readonly _errorId = `${this._inputId}-error`;\n\n // ─── Slot Tracking ───\n\n private _handleLabelSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasLabelSlot = slot.assignedElements().length > 0;\n if (this._hasLabelSlot) {\n const slottedLabel = slot.assignedElements()[0];\n if (slottedLabel && !slottedLabel.id) {\n slottedLabel.id = `${this._inputId}-slotted-label`;\n }\n }\n }\n\n private _handleErrorSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const assigned = slot.assignedElements();\n this._hasErrorSlot = assigned.length > 0;\n if (this._hasErrorSlot && assigned[0]) {\n if (!assigned[0].id) assigned[0].id = this._errorId;\n }\n }\n\n private _handleHelpSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasHelpSlot = slot.assignedElements().length > 0;\n }\n\n // ─── Lifecycle ───\n\n override firstUpdated(): void {\n this._defaultValue = this.value;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._clearLongPress();\n }\n\n override updated(changedProperties: Map<string, unknown>): void {\n super.updated(changedProperties);\n if (\n changedProperties.has('value') ||\n changedProperties.has('required') ||\n changedProperties.has('min') ||\n changedProperties.has('max') ||\n changedProperties.has('step')\n ) {\n this._syncFormValue();\n this._updateValidity();\n }\n }\n\n // ─── Form Integration ───\n\n /** Returns the associated form element, if any. */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /** Returns the validation message. */\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n /** Returns the ValidityState object. */\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n /** Checks whether the input satisfies its constraints. */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /** Reports validity and shows the browser's constraint validation UI. */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n private _syncFormValue(): void {\n this._internals.setFormValue(this.value !== null ? String(this.value) : null);\n }\n\n private _updateValidity(): void {\n if (this.required && this.value === null) {\n this._internals.setValidity(\n { valueMissing: true },\n this.error || 'This field is required.',\n this._input ?? undefined,\n );\n return;\n }\n\n if (this.value !== null && this.min !== undefined && this.value < this.min) {\n this._internals.setValidity(\n { rangeUnderflow: true },\n `Value must be at least ${this.min}.`,\n this._input ?? undefined,\n );\n return;\n }\n\n if (this.value !== null && this.max !== undefined && this.value > this.max) {\n this._internals.setValidity(\n { rangeOverflow: true },\n `Value must be at most ${this.max}.`,\n this._input ?? undefined,\n );\n return;\n }\n\n if (this.value !== null && this.step && this.step !== 0) {\n const step = this._finite(this.step) ?? 1;\n const base = this._finite(this.min) ?? 0;\n const remainder = Math.abs((this.value - base) % step);\n const epsilon = 1e-9;\n if (remainder > epsilon && Math.abs(remainder - step) > epsilon) {\n this._internals.setValidity(\n { stepMismatch: true },\n `Value must be a multiple of ${step}.`,\n this._input ?? undefined,\n );\n return;\n }\n }\n\n this._internals.setValidity({});\n }\n\n /** Called by the form when it resets. */\n formResetCallback(): void {\n this.value = this._defaultValue;\n this._internals.setFormValue(this.value !== null ? String(this.value) : null);\n }\n\n /** Called when the form restores state (e.g., back/forward navigation). */\n formStateRestoreCallback(state: string): void {\n const parsed = Number(state);\n this.value = isNaN(parsed) ? null : parsed;\n }\n\n // ─── Value Parsing ───\n\n private _finite(value: number | undefined): number | undefined {\n return Number.isFinite(value) ? value : undefined;\n }\n\n private _parseInput(raw: string): number | null {\n if (raw === '' || raw === null) return null;\n const parsed = parseFloat(raw);\n return isNaN(parsed) ? null : parsed;\n }\n\n private _clamp(v: number): number {\n let result = v;\n const min = this._finite(this.min);\n const max = this._finite(this.max);\n if (min !== undefined) result = Math.max(min, result);\n if (max !== undefined) result = Math.min(max, result);\n return result;\n }\n\n // ─── Stepper Helpers ───\n\n private get _atMin(): boolean {\n return this.value !== null && this.min !== undefined && this.value <= this.min;\n }\n\n private get _atMax(): boolean {\n return this.value !== null && this.max !== undefined && this.value >= this.max;\n }\n\n private _applyStep(delta: number): void {\n if (this.disabled || this.readonly) return;\n\n const current = this.value ?? 0;\n const step = this._finite(this.step) ?? 1;\n const next = this._clamp(parseFloat((current + delta * step).toFixed(10)));\n\n if (next === this.value) return;\n this.value = next;\n\n this.dispatchEvent(\n new CustomEvent<{ value: number | null }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n // ─── Long-press ───\n\n private _clearLongPress(): void {\n if (this._longPressTimer !== null) {\n clearTimeout(this._longPressTimer);\n this._longPressTimer = null;\n }\n if (this._repeatInterval !== null) {\n clearInterval(this._repeatInterval);\n this._repeatInterval = null;\n }\n }\n\n private _startLongPress(delta: number): void {\n this._applyStep(delta);\n this._longPressTimer = setTimeout(() => {\n this._repeatInterval = setInterval(() => {\n this._applyStep(delta);\n }, 100);\n }, 400);\n }\n\n private _handleStepperPointerDown(e: PointerEvent, delta: number): void {\n if (this.disabled || this.readonly) return;\n e.preventDefault();\n this._startLongPress(delta);\n }\n\n private _handleStepperPointerUp(): void {\n this._clearLongPress();\n }\n\n // ─── Keyboard ───\n\n private _handleKeyDown(e: KeyboardEvent): void {\n if (this.disabled || this.readonly) return;\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n this._applyStep(1);\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this._applyStep(-1);\n }\n }\n\n // ─── Input Events ───\n\n private _handleInput(e: Event): void {\n const target = e.target as HTMLInputElement;\n this.value = this._parseInput(target.value);\n this._syncFormValue();\n\n this.dispatchEvent(\n new CustomEvent<{ value: number | null }>('hx-input', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n private _handleChange(e: Event): void {\n const target = e.target as HTMLInputElement;\n const parsed = this._parseInput(target.value);\n this.value = parsed !== null ? this._clamp(parsed) : null;\n this._syncFormValue();\n this._updateValidity();\n\n this.dispatchEvent(\n new CustomEvent<{ value: number | null }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n // ─── Public Methods ───\n\n /** Moves focus to the input element. */\n override focus(options?: FocusOptions): void {\n this._input?.focus(options);\n }\n\n /** Selects all text in the input. */\n select(): void {\n this._input?.select();\n }\n\n // ─── Render Helpers ───\n\n private _renderIncrementIcon() {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 12 12\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M6 1v10M1 6h10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>`;\n }\n\n private _renderDecrementIcon() {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 12 12\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M1 6h10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>`;\n }\n\n // ─── Render ───\n\n override render() {\n const hasError = !!this.error || this._hasErrorSlot;\n\n const fieldClasses = {\n field: true,\n 'field--error': hasError,\n 'field--disabled': this.disabled,\n 'field--required': this.required,\n 'field--sm': this.size === 'sm',\n 'field--md': this.size === 'md',\n 'field--lg': this.size === 'lg',\n };\n\n const describedBy =\n [\n hasError ? this._errorId : null,\n !hasError && (this.helpText || this._hasHelpSlot) ? this._helpTextId : null,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n\n const displayValue = this.value !== null ? String(this.value) : '';\n\n return html`\n <div part=\"field\" class=${classMap(fieldClasses)}>\n <div class=\"field__label-wrapper\">\n <slot name=\"label\" @slotchange=${this._handleLabelSlotChange}>\n ${this.label\n ? html`\n <label part=\"label\" class=\"field__label\" for=${this._inputId}>\n ${this.label}\n ${this.required\n ? html`<span class=\"field__required-marker\" aria-hidden=\"true\">*</span>`\n : nothing}\n </label>\n `\n : nothing}\n </slot>\n </div>\n\n <div part=\"input-wrapper\" class=\"field__input-wrapper\">\n <span class=\"field__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n part=\"input\"\n class=\"field__input\"\n id=${this._inputId}\n type=\"number\"\n .value=${live(displayValue)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${this.step}\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n name=${ifDefined(this.name || undefined)}\n aria-labelledby=${ifDefined(\n this._hasLabelSlot ? `${this._inputId}-slotted-label` : undefined,\n )}\n aria-invalid=${hasError ? 'true' : nothing}\n aria-describedby=${ifDefined(describedBy)}\n aria-valuenow=${ifDefined(this.value !== null ? this.value : undefined)}\n aria-valuemin=${ifDefined(this.min)}\n aria-valuemax=${ifDefined(this.max)}\n @input=${this._handleInput}\n @change=${this._handleChange}\n @keydown=${this._handleKeyDown}\n />\n\n <span class=\"field__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n\n ${this.noStepper\n ? nothing\n : html`\n <div part=\"stepper\" class=\"field__stepper\">\n <button\n part=\"increment\"\n class=\"field__stepper-btn\"\n type=\"button\"\n aria-label=\"Increment\"\n ?disabled=${this.disabled || this.readonly || this._atMax}\n tabindex=\"-1\"\n @pointerdown=${(e: PointerEvent) => this._handleStepperPointerDown(e, 1)}\n @pointerup=${this._handleStepperPointerUp}\n @pointerleave=${this._handleStepperPointerUp}\n @pointercancel=${this._handleStepperPointerUp}\n >\n ${this._renderIncrementIcon()}\n </button>\n <button\n part=\"decrement\"\n class=\"field__stepper-btn\"\n type=\"button\"\n aria-label=\"Decrement\"\n ?disabled=${this.disabled || this.readonly || this._atMin}\n tabindex=\"-1\"\n @pointerdown=${(e: PointerEvent) => this._handleStepperPointerDown(e, -1)}\n @pointerup=${this._handleStepperPointerUp}\n @pointerleave=${this._handleStepperPointerUp}\n @pointercancel=${this._handleStepperPointerUp}\n >\n ${this._renderDecrementIcon()}\n </button>\n </div>\n `}\n </div>\n\n <slot name=\"error\" @slotchange=${this._handleErrorSlotChange}>\n ${this.error\n ? html`\n <div part=\"error-message\" class=\"field__error\" id=${this._errorId} role=\"alert\">\n ${this.error}\n </div>\n `\n : nothing}\n </slot>\n\n <div\n part=\"help-text\"\n class=\"field__help-text\"\n id=${this._helpTextId}\n ?hidden=${hasError || (!this.helpText && !this._hasHelpSlot)}\n >\n <slot name=\"help-text\" @slotchange=${this._handleHelpSlotChange}>${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-number-input': HelixNumberInput;\n }\n}\n"],"names":["helixNumberInputStyles","css","_hxNumberInputIdCounter","HelixNumberInput","LitElement","slot","slottedLabel","assigned","changedProperties","step","base","remainder","epsilon","state","parsed","value","raw","v","result","min","max","delta","current","next","target","options","_a","html","hasError","fieldClasses","describedBy","displayValue","classMap","nothing","live","ifDefined","e","tokenStyles","__decorateClass","property","attr","n","val","query","customElement"],"mappings":";;;;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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","../../src/components/hx-number-input/hx-number-input.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixNumberInputStyles = css`\n :host {\n display: block;\n }\n\n :host([disabled]) {\n opacity: var(--hx-opacity-disabled);\n pointer-events: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1);\n font-family: var(--hx-number-input-font-family, var(--hx-font-family-sans));\n }\n\n /* ─── Label ─── */\n\n .field__label-wrapper {\n display: contents;\n }\n\n .field__label {\n display: flex;\n align-items: baseline;\n gap: var(--hx-space-1);\n font-size: var(--hx-font-size-sm);\n font-weight: var(--hx-font-weight-medium);\n color: var(--hx-number-input-label-color, var(--hx-color-neutral-700));\n line-height: var(--hx-line-height-normal);\n }\n\n .field__required-marker {\n color: var(--hx-number-input-error-color, var(--hx-color-error-text, #b91c1c));\n font-weight: var(--hx-font-weight-bold);\n }\n\n /* ─── Input Wrapper ─── */\n\n .field__input-wrapper {\n display: flex;\n align-items: stretch;\n border: var(--hx-border-width-thin) solid\n var(--hx-number-input-border-color, var(--hx-color-neutral-300));\n border-radius: var(--hx-number-input-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-number-input-bg, var(--hx-color-neutral-0));\n transition:\n border-color var(--hx-transition-fast),\n box-shadow var(--hx-transition-fast);\n overflow: hidden;\n }\n\n .field__input-wrapper:focus-within {\n border-color: var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color));\n /* Fallback for Safari < 16.2 (no color-mix support) */\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color));\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n color-mix(\n in srgb,\n var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color))\n calc(var(--hx-focus-ring-opacity) * 100%),\n transparent\n );\n }\n\n /* ─── Error State ─── */\n\n .field--error .field__input-wrapper {\n border-color: var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626));\n }\n\n .field--error .field__input-wrapper:focus-within {\n border-color: var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626));\n /* Fallback for Safari < 16.2 (no color-mix support) */\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626));\n box-shadow: 0 0 0 var(--hx-focus-ring-width)\n color-mix(\n in srgb,\n var(--hx-number-input-error-color, var(--hx-color-error-500, #dc2626))\n calc(var(--hx-focus-ring-opacity) * 100%),\n transparent\n );\n }\n\n /* ─── Slots (Prefix / Suffix) ─── */\n\n .field__prefix,\n .field__suffix {\n display: flex;\n align-items: center;\n padding: 0 var(--hx-space-3);\n color: var(--hx-color-neutral-500);\n flex-shrink: 0;\n }\n\n /* ─── Native Input ─── */\n\n .field__input {\n flex: 1;\n border: none;\n outline: none;\n background: transparent;\n font-family: inherit;\n color: var(--hx-number-input-color, var(--hx-color-neutral-800));\n line-height: var(--hx-line-height-normal);\n width: 100%;\n /* Size: md (default) */\n padding: var(--hx-space-2) var(--hx-space-3);\n font-size: var(--hx-font-size-md);\n min-height: var(--hx-size-10);\n }\n\n .field__input::placeholder {\n color: var(--hx-color-neutral-400);\n }\n\n .field__input:disabled {\n cursor: not-allowed;\n }\n\n /* ─── Hide native browser spinners ─── */\n\n .field__input[type='number']::-webkit-inner-spin-button,\n .field__input[type='number']::-webkit-outer-spin-button {\n display: none;\n }\n\n .field__input[type='number'] {\n appearance: textfield;\n }\n\n /* ─── Size Variants ─── */\n\n .field--sm .field__input {\n padding: var(--hx-space-1) var(--hx-space-2);\n font-size: var(--hx-font-size-sm);\n min-height: var(--hx-size-8);\n }\n\n .field--lg .field__input {\n padding: var(--hx-space-3) var(--hx-space-4);\n font-size: var(--hx-font-size-lg);\n min-height: var(--hx-size-12);\n }\n\n /* ─── Stepper ─── */\n\n .field__stepper {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n border-left: var(--hx-border-width-thin) solid\n var(--hx-number-input-border-color, var(--hx-color-neutral-300));\n }\n\n .field__stepper-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n cursor: pointer;\n color: var(--hx-color-neutral-600);\n padding: 0;\n flex: 1;\n min-width: var(--hx-size-8);\n line-height: 1;\n transition: background-color var(--hx-transition-fast);\n user-select: none;\n -webkit-user-select: none;\n }\n\n .field__stepper-btn:not(:last-child) {\n border-bottom: var(--hx-border-width-thin) solid\n var(--hx-number-input-border-color, var(--hx-color-neutral-300));\n }\n\n .field__stepper-btn:hover:not(:disabled) {\n background-color: var(--hx-color-neutral-50);\n color: var(--hx-color-neutral-800);\n }\n\n /* Suppress focus ring for mouse/touch focus; keep for keyboard and programmatic focus */\n .field__stepper-btn:focus:not(:focus-visible) {\n outline: none;\n }\n\n .field__stepper-btn:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-number-input-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: -2px;\n }\n\n .field__stepper-btn:disabled {\n opacity: var(--hx-opacity-disabled);\n cursor: not-allowed;\n }\n\n .field__stepper-btn svg {\n pointer-events: none;\n width: 0.75rem;\n height: 0.75rem;\n }\n\n /* Size sm adjustments for stepper */\n .field--sm .field__stepper-btn {\n min-width: var(--hx-size-6);\n }\n\n /* Size lg adjustments for stepper */\n .field--lg .field__stepper-btn {\n min-width: var(--hx-size-10);\n }\n\n /* ─── Help Text & Error Messages ─── */\n\n .field__help-text {\n font-size: var(--hx-font-size-xs);\n color: var(--hx-color-neutral-500);\n line-height: var(--hx-line-height-normal);\n }\n\n .field__error {\n font-size: var(--hx-font-size-xs);\n color: var(--hx-number-input-error-color, var(--hx-color-error-text, #b91c1c));\n line-height: var(--hx-line-height-normal);\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .field__input-wrapper {\n transition: none;\n }\n\n .field__stepper-btn {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixNumberInputStyles } from './hx-number-input.styles.js';\n\n// Module-level counter for stable, SSR-safe IDs (avoids Math.random() hydration mismatch)\nlet _hxNumberInputIdCounter = 0;\n\n/**\n * A numeric input component with stepper controls, label, validation, and\n * full form association. Designed for healthcare data-entry contexts where\n * precise numeric values (dosage, age, measurements) must be captured safely.\n *\n * @summary Form-associated numeric input with stepper buttons, bounds checking,\n * label, error, and help text.\n *\n * @tag hx-number-input\n *\n * @slot label - Custom label content (overrides the label property). Use for Drupal Form API rendered labels.\n * @slot help-text - Custom help text content (overrides the helpText property).\n * @slot error - Custom error content (overrides the error property). Use for Drupal Form API rendered errors.\n * @slot prefix - Content rendered before the input (e.g., a unit icon).\n * @slot suffix - Content rendered after the input and before the stepper buttons (e.g., a unit label).\n *\n * @fires {CustomEvent<{value: number | null}>} hx-input - Dispatched on every keystroke as the user types.\n * @fires {CustomEvent<{value: number | null}>} hx-change - Dispatched when the input loses focus after its value changed.\n *\n * @csspart field - The outer field container.\n * @csspart label - The label element.\n * @csspart input-wrapper - The wrapper around prefix, input, suffix, and stepper.\n * @csspart input - The native input element.\n * @csspart help-text - The help text container.\n * @csspart error-message - The error message container.\n * @csspart stepper - The stepper button group container.\n * @csspart increment - The increment (+) button.\n * @csspart decrement - The decrement (-) button.\n *\n * @cssprop [--hx-number-input-bg=var(--hx-color-neutral-0)] - Input background color.\n * @cssprop [--hx-number-input-color=var(--hx-color-neutral-800)] - Input text color.\n * @cssprop [--hx-number-input-border-color=var(--hx-color-neutral-300)] - Input border color.\n * @cssprop [--hx-number-input-border-radius=var(--hx-border-radius-md)] - Input border radius.\n * @cssprop [--hx-number-input-error-color=var(--hx-color-error-500)] - Error state color.\n * @cssprop [--hx-number-input-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n * @cssprop [--hx-number-input-label-color=var(--hx-color-neutral-700)] - Label text color.\n * @cssprop [--hx-number-input-font-family=var(--hx-font-family-sans)] - Font family.\n */\n@customElement('hx-number-input')\nexport class HelixNumberInput extends LitElement {\n static override styles = [tokenStyles, helixNumberInputStyles];\n\n // ─── Form Association ───\n\n static formAssociated = true;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n // ─── Properties ───\n\n /**\n * The name of the input, used for form submission.\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * The current numeric value of the input. Null when the field is empty.\n * @attr value\n */\n @property({\n type: Number,\n converter: {\n fromAttribute: (attr: string | null): number | null => {\n if (attr === null || attr === '') return null;\n const n = Number(attr);\n return isNaN(n) ? null : n;\n },\n toAttribute: (val: number | null): string | null => (val === null ? null : String(val)),\n },\n })\n value: number | null = null;\n\n /**\n * Whether the input is required for form submission.\n * @attr required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Whether the input is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the input is read-only.\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true })\n readonly = false;\n\n /**\n * Minimum allowed value. When reached, the decrement button is disabled.\n * @attr min\n */\n @property({ type: Number })\n min: number | undefined = undefined;\n\n /**\n * Maximum allowed value. When reached, the increment button is disabled.\n * @attr max\n */\n @property({ type: Number })\n max: number | undefined = undefined;\n\n /**\n * The amount to increment or decrement on each step action.\n * @attr step\n */\n @property({ type: Number })\n step = 1;\n\n /**\n * The visible label text for the input.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Error message to display. When set, the input enters an error state.\n * @attr error\n */\n @property({ type: String })\n error = '';\n\n /**\n * Help text displayed below the input for guidance.\n * @attr help-text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText = '';\n\n /**\n * Size variant controlling input padding and font size.\n * @attr hx-size\n */\n @property({ type: String, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * When set, hides the +/- stepper buttons.\n * @attr no-stepper\n */\n @property({ type: Boolean, attribute: 'no-stepper' })\n noStepper = false;\n\n // ─── Internal References ───\n\n @query('.field__input')\n declare private _input: HTMLInputElement | null;\n\n // ─── Internal State ───\n\n @state() private _hasLabelSlot = false;\n @state() private _hasErrorSlot = false;\n @state() private _hasHelpSlot = false;\n\n /** The value captured at first render, used by formResetCallback. */\n private _defaultValue: number | null = null;\n\n /** Timer ID for the long-press initial delay. */\n private _longPressTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** Interval ID for the long-press rapid-repeat phase. */\n private _repeatInterval: ReturnType<typeof setInterval> | null = null;\n\n // ─── Stable IDs ───\n\n private readonly _inputId = `hx-number-input-${++_hxNumberInputIdCounter}`;\n private readonly _helpTextId = `${this._inputId}-help`;\n private readonly _errorId = `${this._inputId}-error`;\n\n // ─── Slot Tracking ───\n\n private _handleLabelSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasLabelSlot = slot.assignedElements().length > 0;\n if (this._hasLabelSlot) {\n const slottedLabel = slot.assignedElements()[0];\n if (slottedLabel && !slottedLabel.id) {\n slottedLabel.id = `${this._inputId}-slotted-label`;\n }\n }\n }\n\n private _handleErrorSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const assigned = slot.assignedElements();\n this._hasErrorSlot = assigned.length > 0;\n if (this._hasErrorSlot && assigned[0]) {\n if (!assigned[0].id) assigned[0].id = this._errorId;\n }\n }\n\n private _handleHelpSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasHelpSlot = slot.assignedElements().length > 0;\n }\n\n // ─── Lifecycle ───\n\n override firstUpdated(): void {\n this._defaultValue = this.value;\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._clearLongPress();\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (\n changedProperties.has('value') ||\n changedProperties.has('required') ||\n changedProperties.has('min') ||\n changedProperties.has('max') ||\n changedProperties.has('step')\n ) {\n this._syncFormValue();\n this._updateValidity();\n }\n }\n\n // ─── Form Integration ───\n\n /** Returns the associated form element, if any. */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /** Returns the validation message. */\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n /** Returns the ValidityState object. */\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n /** Checks whether the input satisfies its constraints. */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /** Reports validity and shows the browser's constraint validation UI. */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n private _syncFormValue(): void {\n this._internals.setFormValue(this.value !== null ? String(this.value) : null);\n }\n\n private _updateValidity(): void {\n if (this.required && this.value === null) {\n this._internals.setValidity(\n { valueMissing: true },\n this.error || 'This field is required.',\n this._input ?? undefined,\n );\n return;\n }\n\n if (this.value !== null && this.min !== undefined && this.value < this.min) {\n this._internals.setValidity(\n { rangeUnderflow: true },\n `Value must be at least ${this.min}.`,\n this._input ?? undefined,\n );\n return;\n }\n\n if (this.value !== null && this.max !== undefined && this.value > this.max) {\n this._internals.setValidity(\n { rangeOverflow: true },\n `Value must be at most ${this.max}.`,\n this._input ?? undefined,\n );\n return;\n }\n\n if (this.value !== null && this.step && this.step !== 0) {\n const step = this._finite(this.step) ?? 1;\n const base = this._finite(this.min) ?? 0;\n const remainder = Math.abs((this.value - base) % step);\n const epsilon = 1e-9;\n if (remainder > epsilon && Math.abs(remainder - step) > epsilon) {\n this._internals.setValidity(\n { stepMismatch: true },\n `Value must be a multiple of ${step}.`,\n this._input ?? undefined,\n );\n return;\n }\n }\n\n this._internals.setValidity({});\n }\n\n /** Called by the form when it resets. */\n formResetCallback(): void {\n this.value = this._defaultValue;\n this._internals.setFormValue(this.value !== null ? String(this.value) : null);\n }\n\n /** Called when the form restores state (e.g., back/forward navigation). */\n formStateRestoreCallback(state: string): void {\n const parsed = Number(state);\n this.value = isNaN(parsed) ? null : parsed;\n }\n\n // ─── Value Parsing ───\n\n private _finite(value: number | undefined): number | undefined {\n return Number.isFinite(value) ? value : undefined;\n }\n\n private _parseInput(raw: string): number | null {\n if (raw === '' || raw === null) return null;\n const parsed = parseFloat(raw);\n return isNaN(parsed) ? null : parsed;\n }\n\n private _clamp(v: number): number {\n let result = v;\n const min = this._finite(this.min);\n const max = this._finite(this.max);\n if (min !== undefined) result = Math.max(min, result);\n if (max !== undefined) result = Math.min(max, result);\n return result;\n }\n\n // ─── Stepper Helpers ───\n\n private get _atMin(): boolean {\n return this.value !== null && this.min !== undefined && this.value <= this.min;\n }\n\n private get _atMax(): boolean {\n return this.value !== null && this.max !== undefined && this.value >= this.max;\n }\n\n private _applyStep(delta: number): void {\n if (this.disabled || this.readonly) return;\n\n const current = this.value ?? 0;\n const step = this._finite(this.step) ?? 1;\n const next = this._clamp(parseFloat((current + delta * step).toFixed(10)));\n\n if (next === this.value) return;\n this.value = next;\n\n this.dispatchEvent(\n new CustomEvent<{ value: number | null }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n // ─── Long-press ───\n\n private _clearLongPress(): void {\n if (this._longPressTimer !== null) {\n clearTimeout(this._longPressTimer);\n this._longPressTimer = null;\n }\n if (this._repeatInterval !== null) {\n clearInterval(this._repeatInterval);\n this._repeatInterval = null;\n }\n }\n\n private _startLongPress(delta: number): void {\n this._applyStep(delta);\n this._longPressTimer = setTimeout(() => {\n this._repeatInterval = setInterval(() => {\n this._applyStep(delta);\n }, 100);\n }, 400);\n }\n\n private _handleStepperPointerDown(e: PointerEvent, delta: number): void {\n if (this.disabled || this.readonly) return;\n e.preventDefault();\n this._startLongPress(delta);\n }\n\n private _handleStepperPointerUp(): void {\n this._clearLongPress();\n }\n\n // ─── Keyboard ───\n\n private _handleKeyDown(e: KeyboardEvent): void {\n if (this.disabled || this.readonly) return;\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n this._applyStep(1);\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this._applyStep(-1);\n }\n }\n\n // ─── Input Events ───\n\n private _handleInput(e: Event): void {\n const target = e.target as HTMLInputElement;\n this.value = this._parseInput(target.value);\n this._syncFormValue();\n\n this.dispatchEvent(\n new CustomEvent<{ value: number | null }>('hx-input', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n private _handleChange(e: Event): void {\n const target = e.target as HTMLInputElement;\n const parsed = this._parseInput(target.value);\n this.value = parsed !== null ? this._clamp(parsed) : null;\n this._syncFormValue();\n this._updateValidity();\n\n this.dispatchEvent(\n new CustomEvent<{ value: number | null }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n // ─── Public Methods ───\n\n /** Moves focus to the input element. */\n override focus(options?: FocusOptions): void {\n this._input?.focus(options);\n }\n\n /** Selects all text in the input. */\n select(): void {\n this._input?.select();\n }\n\n // ─── Render Helpers ───\n\n private _renderIncrementIcon() {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 12 12\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M6 1v10M1 6h10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>`;\n }\n\n private _renderDecrementIcon() {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 12 12\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"M1 6h10\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>`;\n }\n\n // ─── Render ───\n\n override render() {\n const hasError = !!this.error || this._hasErrorSlot;\n\n const fieldClasses = {\n field: true,\n 'field--error': hasError,\n 'field--disabled': this.disabled,\n 'field--required': this.required,\n 'field--sm': this.size === 'sm',\n 'field--md': this.size === 'md',\n 'field--lg': this.size === 'lg',\n };\n\n const describedBy =\n [\n hasError ? this._errorId : null,\n !hasError && (this.helpText || this._hasHelpSlot) ? this._helpTextId : null,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n\n const displayValue = this.value !== null ? String(this.value) : '';\n\n return html`\n <div part=\"field\" class=${classMap(fieldClasses)}>\n <div class=\"field__label-wrapper\">\n <slot name=\"label\" @slotchange=${this._handleLabelSlotChange}>\n ${this.label\n ? html`\n <label part=\"label\" class=\"field__label\" for=${this._inputId}>\n ${this.label}\n ${this.required\n ? html`<span class=\"field__required-marker\" aria-hidden=\"true\">*</span>`\n : nothing}\n </label>\n `\n : nothing}\n </slot>\n </div>\n\n <div part=\"input-wrapper\" class=\"field__input-wrapper\">\n <span class=\"field__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n\n <input\n part=\"input\"\n class=\"field__input\"\n id=${this._inputId}\n type=\"number\"\n .value=${live(displayValue)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${this.step}\n ?required=${this.required}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n name=${ifDefined(this.name || undefined)}\n aria-labelledby=${ifDefined(\n this._hasLabelSlot ? `${this._inputId}-slotted-label` : undefined,\n )}\n aria-invalid=${hasError ? 'true' : nothing}\n aria-describedby=${ifDefined(describedBy)}\n aria-valuenow=${ifDefined(this.value !== null ? this.value : undefined)}\n aria-valuemin=${ifDefined(this.min)}\n aria-valuemax=${ifDefined(this.max)}\n @input=${this._handleInput}\n @change=${this._handleChange}\n @keydown=${this._handleKeyDown}\n />\n\n <span class=\"field__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n\n ${this.noStepper\n ? nothing\n : html`\n <div part=\"stepper\" class=\"field__stepper\">\n <button\n part=\"increment\"\n class=\"field__stepper-btn\"\n type=\"button\"\n aria-label=\"Increment\"\n ?disabled=${this.disabled || this.readonly || this._atMax}\n tabindex=\"-1\"\n @pointerdown=${(e: PointerEvent) => this._handleStepperPointerDown(e, 1)}\n @pointerup=${this._handleStepperPointerUp}\n @pointerleave=${this._handleStepperPointerUp}\n @pointercancel=${this._handleStepperPointerUp}\n >\n ${this._renderIncrementIcon()}\n </button>\n <button\n part=\"decrement\"\n class=\"field__stepper-btn\"\n type=\"button\"\n aria-label=\"Decrement\"\n ?disabled=${this.disabled || this.readonly || this._atMin}\n tabindex=\"-1\"\n @pointerdown=${(e: PointerEvent) => this._handleStepperPointerDown(e, -1)}\n @pointerup=${this._handleStepperPointerUp}\n @pointerleave=${this._handleStepperPointerUp}\n @pointercancel=${this._handleStepperPointerUp}\n >\n ${this._renderDecrementIcon()}\n </button>\n </div>\n `}\n </div>\n\n <slot name=\"error\" @slotchange=${this._handleErrorSlotChange}>\n ${this.error\n ? html`\n <div part=\"error-message\" class=\"field__error\" id=${this._errorId} role=\"alert\">\n ${this.error}\n </div>\n `\n : nothing}\n </slot>\n\n <div\n part=\"help-text\"\n class=\"field__help-text\"\n id=${this._helpTextId}\n ?hidden=${hasError || (!this.helpText && !this._hasHelpSlot)}\n >\n <slot name=\"help-text\" @slotchange=${this._handleHelpSlotChange}>${this.helpText}</slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-number-input': HelixNumberInput;\n }\n}\n"],"names":["helixNumberInputStyles","css","_hxNumberInputIdCounter","HelixNumberInput","LitElement","slot","slottedLabel","assigned","changedProperties","step","base","remainder","epsilon","state","parsed","value","raw","v","result","min","max","delta","current","next","target","options","_a","html","hasError","fieldClasses","describedBy","displayValue","classMap","nothing","live","ifDefined","e","tokenStyles","__decorateClass","property","attr","n","val","query","customElement"],"mappings":";;;;;;AAEO,MAAMA,IAAyBC;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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Q;AAAA,GA/EfpC,EAgFX,WAAA,QAAA,CAAA;AAOAmC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAtFfpC,EAuFX,WAAA,SAAA,CAAA;AAOAmC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7FfpC,EA8FX,WAAA,SAAA,CAAA;AAOAmC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,GApGvCpC,EAqGX,WAAA,YAAA,CAAA;AAOAmC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,WAAW;AAAA,GA3GrCpC,EA4GX,WAAA,QAAA,CAAA;AAOAmC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,WAAW,cAAc;AAAA,GAlHzCpC,EAmHX,WAAA,aAAA,CAAA;AAKgBmC,EAAA;AAAA,EADfK,EAAM,eAAe;AAAA,GAvHXxC,EAwHK,WAAA,UAAA,CAAA;AAICmC,EAAA;AAAA,EAAhBzB,EAAA;AAAM,GA5HIV,EA4HM,WAAA,iBAAA,CAAA;AACAmC,EAAA;AAAA,EAAhBzB,EAAA;AAAM,GA7HIV,EA6HM,WAAA,iBAAA,CAAA;AACAmC,EAAA;AAAA,EAAhBzB,EAAA;AAAM,GA9HIV,EA8HM,WAAA,gBAAA,CAAA;AA9HNA,IAANmC,EAAA;AAAA,EADNM,EAAc,iBAAiB;AAAA,GACnBzC,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-pagination-DNFgXQm3.js","sources":["../../src/components/hx-pagination/hx-pagination.styles.ts","../../src/components/hx-pagination/hx-pagination.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixPaginationStyles = css`\n :host {\n display: block;\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n .pagination-root {\n display: flex;\n align-items: center;\n gap: var(--hx-spacing-4, 1rem);\n flex-wrap: wrap;\n }\n\n nav {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .list {\n display: flex;\n align-items: center;\n gap: var(--hx-pagination-gap, var(--hx-spacing-1, 0.25rem));\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .item {\n display: flex;\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: var(--hx-pagination-button-size, 2.25rem);\n height: var(--hx-pagination-button-size, 2.25rem);\n padding: 0 var(--hx-spacing-2, 0.5rem);\n border: 1px solid var(--hx-pagination-border-color, var(--hx-color-border, #d1d5db));\n border-radius: var(--hx-pagination-border-radius, var(--hx-border-radius-md, 0.375rem));\n background: var(--hx-pagination-bg, var(--hx-color-surface, #ffffff));\n color: var(--hx-pagination-color, var(--hx-color-text-primary, #111827));\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-family: inherit;\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms) ease,\n border-color var(--hx-transition-fast, 150ms) ease,\n color var(--hx-transition-fast, 150ms) ease;\n text-decoration: none;\n white-space: nowrap;\n }\n\n .button:hover:not(:disabled) {\n background: var(--hx-pagination-hover-bg, var(--hx-color-surface-hover, #f3f4f6));\n border-color: var(--hx-pagination-hover-border-color, var(--hx-color-primary, #2563eb));\n }\n\n .button:focus-visible {\n outline: 2px solid var(--hx-color-focus, var(--hx-color-primary, #2563eb));\n outline-offset: 2px;\n }\n\n .button[aria-current='page'] {\n background: var(--hx-pagination-active-bg, var(--hx-color-primary, #2563eb));\n border-color: var(\n --hx-pagination-active-border-color,\n var(--hx-pagination-active-bg, var(--hx-color-primary, #2563eb))\n );\n color: var(--hx-pagination-active-color, var(--hx-color-surface, #ffffff));\n font-weight: var(--hx-font-weight-semibold, 600);\n cursor: default;\n pointer-events: none;\n }\n\n .button:disabled {\n opacity: 0.4;\n pointer-events: none;\n }\n\n .ellipsis {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: var(--hx-pagination-button-size, 2.25rem);\n height: var(--hx-pagination-button-size, 2.25rem);\n color: var(--hx-pagination-ellipsis-color, var(--hx-color-text-secondary, #6b7280));\n font-size: var(--hx-font-size-sm, 0.875rem);\n user-select: none;\n }\n\n .button[aria-disabled='true'] {\n cursor: default;\n pointer-events: none;\n }\n\n /* Page size selector */\n .page-size-wrapper {\n display: flex;\n align-items: center;\n }\n\n .page-size-label {\n display: flex;\n align-items: center;\n gap: var(--hx-spacing-2, 0.5rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n color: var(--hx-color-text-secondary, #6b7280);\n white-space: nowrap;\n }\n\n .page-size-select {\n height: var(--hx-pagination-button-size, 2.25rem);\n padding: 0 var(--hx-spacing-2, 0.5rem);\n border: 1px solid var(--hx-pagination-border-color, var(--hx-color-border, #d1d5db));\n border-radius: var(--hx-pagination-border-radius, var(--hx-border-radius-md, 0.375rem));\n background: var(--hx-pagination-bg, var(--hx-color-surface, #ffffff));\n color: var(--hx-pagination-color, var(--hx-color-text-primary, #111827));\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-family: inherit;\n cursor: pointer;\n }\n\n .page-size-select:focus-visible {\n outline: 2px solid var(--hx-color-focus, var(--hx-color-primary, #2563eb));\n outline-offset: 2px;\n }\n\n /* Visually hidden — used for aria-live status messages */\n .visually-hidden {\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 @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n }\n\n /* Windows High Contrast / forced-colors support */\n @media (forced-colors: active) {\n .button {\n border: 1px solid ButtonText;\n color: ButtonText;\n background: ButtonFace;\n forced-color-adjust: none;\n }\n\n .button:hover:not(:disabled) {\n border-color: Highlight;\n color: Highlight;\n }\n\n .button:focus-visible {\n outline-color: Highlight;\n }\n\n .button[aria-current='page'] {\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n\n .button:disabled {\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n .button[aria-disabled='true'] {\n color: GrayText;\n }\n\n .page-size-select {\n border-color: ButtonText;\n color: ButtonText;\n background: ButtonFace;\n forced-color-adjust: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixPaginationStyles } from './hx-pagination.styles.js';\n\n/**\n * A pagination component for navigating content listings.\n *\n * @summary Page navigation with page numbers, prev/next, and ellipsis.\n *\n * @tag hx-pagination\n *\n * @csspart nav - The wrapping `<nav>` element.\n * @csspart list - The `<ul>` containing pagination items.\n * @csspart item - Each `<li>` item.\n * @csspart button - Each page button or prev/next control.\n * @csspart ellipsis - The ellipsis (`…`) span between page groups.\n * @csspart page-size-wrapper - The wrapper `<div>` around the page-size selector.\n * @csspart page-size-label - The `<label>` element for the page-size selector.\n * @csspart page-size-select - The `<select>` element for page-size.\n *\n * @cssprop [--hx-pagination-gap=0.25rem] - Gap between pagination buttons. Inherits from --hx-spacing-1.\n * @cssprop [--hx-pagination-button-size=2.25rem] - Minimum width and height of each button.\n * @cssprop [--hx-pagination-border-color] - Border color of buttons. Inherits from --hx-color-border (final fallback: #d1d5db).\n * @cssprop [--hx-pagination-border-radius] - Border radius of buttons. Inherits from --hx-border-radius-md (final fallback: 0.375rem).\n * @cssprop [--hx-pagination-bg] - Background color of buttons. Inherits from --hx-color-surface (final fallback: #ffffff).\n * @cssprop [--hx-pagination-color] - Text color of buttons. Inherits from --hx-color-text-primary (final fallback: #111827).\n * @cssprop [--hx-pagination-hover-bg] - Background color of buttons on hover. Inherits from --hx-color-surface-hover (final fallback: #f3f4f6).\n * @cssprop [--hx-pagination-hover-border-color] - Border color of buttons on hover. Inherits from --hx-color-primary (final fallback: #2563eb).\n * @cssprop [--hx-pagination-active-bg] - Background color of the active/current page button. Inherits from --hx-color-primary (final fallback: #2563eb).\n * @cssprop [--hx-pagination-active-color] - Text color of the active/current page button. Inherits from --hx-color-surface (final fallback: #ffffff).\n * @cssprop [--hx-pagination-active-border-color] - Border color of the active/current page button. Defaults to --hx-pagination-active-bg.\n * @cssprop [--hx-pagination-ellipsis-color] - Color of ellipsis characters. Inherits from --hx-color-text-secondary (final fallback: #6b7280).\n * @cssprop [--hx-transition-fast=150ms] - Duration used for hover/focus transitions.\n *\n * @fires {CustomEvent<{ page: number }>} hx-page-change - Fired when the user navigates to a new page.\n * @fires {CustomEvent<{ pageSize: number }>} hx-page-size-change - Fired when the user selects a new page size.\n *\n * @example\n * ```html\n * <hx-pagination total-pages=\"10\" current-page=\"1\"></hx-pagination>\n * ```\n *\n * @example Drupal / Twig integration\n * ```twig\n * {#\n * Drupal's pager uses 0-based page index in the URL (?page=N).\n * This component is 1-based, so add 1 to the Drupal page value.\n * Listen to hx-page-change and update the URL query param:\n * element.addEventListener('hx-page-change', (e) => {\n * const params = new URLSearchParams(location.search);\n * params.set('page', e.detail.page - 1); // convert back to 0-based\n * history.pushState({}, '', '?' + params.toString());\n * });\n * #}\n * <hx-pagination\n * total-pages=\"{{ total_pages }}\"\n * current-page=\"{{ pager.current_page + 1 }}\"\n * label=\"{{ 'Pagination'|t }}\"\n * {{ show_first_last ? 'show-first-last' : '' }}\n * ></hx-pagination>\n * ```\n */\n@customElement('hx-pagination')\nexport class HelixPagination extends LitElement {\n static override styles = [tokenStyles, helixPaginationStyles];\n\n /**\n * Total number of pages.\n * @attr total-pages\n */\n @property({ type: Number, attribute: 'total-pages', reflect: true })\n totalPages = 1;\n\n /**\n * The currently active page (1-based).\n * @attr current-page\n */\n @property({ type: Number, attribute: 'current-page' })\n currentPage = 1;\n\n /**\n * Number of page buttons shown on each side of the current page.\n * @attr sibling-count\n */\n @property({ type: Number, attribute: 'sibling-count', reflect: true })\n siblingCount = 1;\n\n /**\n * Number of pages always shown at the start and end of the list.\n * @attr boundary-count\n */\n @property({ type: Number, attribute: 'boundary-count', reflect: true })\n boundaryCount = 1;\n\n /**\n * Whether to show First and Last page buttons.\n * @attr show-first-last\n */\n @property({ type: Boolean, attribute: 'show-first-last', reflect: true })\n showFirstLast = false;\n\n /**\n * Accessible label for the `<nav>` element.\n * @attr label\n */\n @property({ type: String, reflect: true })\n label = 'Pagination';\n\n /**\n * The number of items displayed per page. When set, a page-size selector\n * `<select>` is rendered. Set `show-page-size` to display the selector.\n * @attr page-size\n */\n @property({ type: Number, attribute: 'page-size', reflect: true })\n pageSize = 25;\n\n /**\n * Whether to show the page-size selector UI.\n * @attr show-page-size\n */\n @property({ type: Boolean, attribute: 'show-page-size', reflect: true })\n showPageSize = false;\n\n /** Tracks the roving tabindex target. Null means default to currentPage. */\n @state() private _rovingKey: number | string | null = null;\n\n /** Text for the aria-live region, updated on navigation. */\n @state() private _liveMessage = '';\n\n /** Memoization cache for _buildPageRange. */\n private _pageRangeCache: { key: string; result: Array<number | 'ellipsis'> } | null = null;\n\n // ─── Helpers ───\n\n private _buildPageRange(): Array<number | 'ellipsis'> {\n const key = `${this.totalPages}-${this.currentPage}-${this.siblingCount}-${this.boundaryCount}`;\n if (this._pageRangeCache?.key === key) return this._pageRangeCache.result;\n\n const total = Math.max(1, this.totalPages);\n const current = Math.min(Math.max(1, this.currentPage), total);\n const boundary = Math.max(0, this.boundaryCount);\n const sibling = Math.max(0, this.siblingCount);\n\n const startPages = this._range(1, Math.min(boundary, total));\n const endPages = this._range(Math.max(total - boundary + 1, boundary + 1), total);\n\n const siblingStart = Math.max(\n Math.min(current - sibling, total - boundary - sibling * 2 - 1),\n boundary + 2,\n );\n const siblingEnd = Math.min(\n Math.max(current + sibling, boundary + sibling * 2 + 2),\n endPages.length > 0 ? endPages[0]! - 2 : total - 1,\n );\n\n const items: Array<number | 'ellipsis'> = [];\n\n for (const p of startPages) items.push(p);\n\n if (siblingStart > boundary + 2) {\n items.push('ellipsis');\n } else if (boundary + 1 < siblingStart) {\n items.push(boundary + 1);\n }\n\n for (const p of this._range(siblingStart, siblingEnd)) items.push(p);\n\n if (siblingEnd < total - boundary - 1) {\n items.push('ellipsis');\n } else if (siblingEnd < total - boundary) {\n items.push(total - boundary);\n }\n\n for (const p of endPages) items.push(p);\n\n this._pageRangeCache = { key, result: items };\n return items;\n }\n\n private _range(start: number, end: number): number[] {\n const result: number[] = [];\n for (let i = start; i <= end; i++) result.push(i);\n return result;\n }\n\n private _navigate(page: number): void {\n const clamped = Math.min(Math.max(1, page), this.totalPages);\n if (clamped === this.currentPage) return;\n\n this.currentPage = clamped;\n this._rovingKey = null; // reset so focus follows the new current page\n this._liveMessage = `Page ${clamped} of ${this.totalPages}`;\n this.dispatchEvent(\n new CustomEvent<{ page: number }>('hx-page-change', {\n detail: { page: clamped },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handlePageSizeChange(e: Event): void {\n const select = e.target as HTMLSelectElement;\n const newSize = Number(select.value);\n if (newSize === this.pageSize) return;\n\n this.pageSize = newSize;\n this.dispatchEvent(\n new CustomEvent<{ pageSize: number }>('hx-page-size-change', {\n detail: { pageSize: newSize },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private get _effectiveRovingKey(): number | string {\n return this._rovingKey ?? this.currentPage;\n }\n\n private _handleFocusin(e: FocusEvent): void {\n const btn = e.target as HTMLElement;\n if (btn.tagName !== 'BUTTON') return;\n const key = btn.dataset['rovingKey'];\n if (key === undefined) return;\n this._rovingKey = isNaN(Number(key)) ? key : Number(key);\n }\n\n private _handleKeydown(e: KeyboardEvent): void {\n if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return;\n e.preventDefault();\n\n const list = this.shadowRoot?.querySelector('.list');\n if (!list) return;\n\n // Collect all non-disabled buttons (disabled prev/next excluded; aria-disabled current page included)\n const buttons = Array.from(list.querySelectorAll<HTMLButtonElement>('button:not([disabled])'));\n const focused = this.shadowRoot?.activeElement as HTMLButtonElement | null;\n const currentIdx = focused ? buttons.indexOf(focused) : 0;\n\n const nextIdx =\n e.key === 'ArrowLeft'\n ? Math.max(0, currentIdx - 1)\n : Math.min(buttons.length - 1, currentIdx + 1);\n\n if (nextIdx !== currentIdx) {\n const nextBtn = buttons[nextIdx];\n if (!nextBtn) return;\n const key = nextBtn.dataset['rovingKey'];\n if (key !== undefined) {\n this._rovingKey = isNaN(Number(key)) ? key : Number(key);\n }\n nextBtn.focus();\n }\n }\n\n // ─── Render ───\n\n override render() {\n const pages = this._buildPageRange();\n const isFirst = this.currentPage <= 1;\n const isLast = this.currentPage >= this.totalPages;\n const rovingKey = this._effectiveRovingKey;\n\n return html`\n <div class=\"pagination-root\">\n ${this.showPageSize\n ? html`\n <div part=\"page-size-wrapper\" class=\"page-size-wrapper\">\n <label part=\"page-size-label\" class=\"page-size-label\">\n Rows per page:\n <select\n part=\"page-size-select\"\n class=\"page-size-select\"\n @change=${this._handlePageSizeChange}\n >\n ${[10, 25, 50, 100].map(\n (n) =>\n html`<option value=${n} ?selected=${n === this.pageSize}>${n}</option>`,\n )}\n </select>\n </label>\n </div>\n `\n : nothing}\n\n <nav part=\"nav\" aria-label=${this.label}>\n <span class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\"\n >${this._liveMessage}</span\n >\n <ul\n part=\"list\"\n class=\"list\"\n role=\"list\"\n @keydown=${this._handleKeydown}\n @focusin=${this._handleFocusin}\n >\n ${this.showFirstLast\n ? html`\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isFirst}\n tabindex=${rovingKey === 'first' ? 0 : -1}\n data-roving-key=\"first\"\n aria-label=\"First page\"\n @click=${() => this._navigate(1)}\n >\n «\n </button>\n </li>\n `\n : nothing}\n\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isFirst}\n tabindex=${rovingKey === 'prev' ? 0 : -1}\n data-roving-key=\"prev\"\n aria-label=\"Previous page\"\n @click=${() => this._navigate(this.currentPage - 1)}\n >\n ‹\n </button>\n </li>\n\n ${repeat(\n pages,\n (page, i) => (page === 'ellipsis' ? `ellipsis-${i}` : `page-${page}`),\n (page) => {\n if (page === 'ellipsis') {\n return html`\n <li part=\"item\" class=\"item\">\n <span part=\"ellipsis\" class=\"ellipsis\" aria-hidden=\"true\">…</span>\n </li>\n `;\n }\n const isCurrent = page === this.currentPage;\n return html`\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=${classMap({ button: true })}\n aria-disabled=${isCurrent ? 'true' : nothing}\n tabindex=${rovingKey === page ? 0 : -1}\n data-roving-key=${page}\n aria-current=${isCurrent ? 'page' : nothing}\n aria-label=${`Page ${page}`}\n @click=${() => this._navigate(page)}\n >\n ${page}\n </button>\n </li>\n `;\n },\n )}\n\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isLast}\n tabindex=${rovingKey === 'next' ? 0 : -1}\n data-roving-key=\"next\"\n aria-label=\"Next page\"\n @click=${() => this._navigate(this.currentPage + 1)}\n >\n ›\n </button>\n </li>\n\n ${this.showFirstLast\n ? html`\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isLast}\n tabindex=${rovingKey === 'last' ? 0 : -1}\n data-roving-key=\"last\"\n aria-label=\"Last page\"\n @click=${() => this._navigate(this.totalPages)}\n >\n »\n </button>\n </li>\n `\n : nothing}\n </ul>\n </nav>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-pagination': HelixPagination;\n }\n}\n"],"names":["helixPaginationStyles","css","HelixPagination","LitElement","key","_a","total","current","boundary","sibling","startPages","endPages","siblingStart","siblingEnd","items","p","start","end","result","i","page","clamped","e","select","newSize","btn","list","buttons","focused","_b","currentIdx","nextIdx","nextBtn","pages","isFirst","isLast","rovingKey","html","n","nothing","repeat","isCurrent","classMap","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AAM,QAAQ,WAAW,aAAa,SAAS,IAAM;AAAA,GAlDtD3C,EAmDX,WAAA,YAAA,CAAA;AAOA0C,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,WAAW,kBAAkB,SAAS,IAAM;AAAA,GAzD5D3C,EA0DX,WAAA,gBAAA,CAAA;AAGiB0C,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA7DI5C,EA6DM,WAAA,cAAA,CAAA;AAGA0C,EAAA;AAAA,EAAhBE,EAAA;AAAM,GAhEI5C,EAgEM,WAAA,gBAAA,CAAA;AAhENA,IAAN0C,EAAA;AAAA,EADNG,EAAc,eAAe;AAAA,GACjB7C,CAAA;"}
|
|
1
|
+
{"version":3,"file":"hx-pagination-DNFgXQm3.js","sources":["../../src/components/hx-pagination/hx-pagination.styles.ts","../../src/components/hx-pagination/hx-pagination.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixPaginationStyles = css`\n :host {\n display: block;\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n .pagination-root {\n display: flex;\n align-items: center;\n gap: var(--hx-spacing-4, 1rem);\n flex-wrap: wrap;\n }\n\n nav {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .list {\n display: flex;\n align-items: center;\n gap: var(--hx-pagination-gap, var(--hx-spacing-1, 0.25rem));\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .item {\n display: flex;\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: var(--hx-pagination-button-size, 2.25rem);\n height: var(--hx-pagination-button-size, 2.25rem);\n padding: 0 var(--hx-spacing-2, 0.5rem);\n border: 1px solid var(--hx-pagination-border-color, var(--hx-color-border, #d1d5db));\n border-radius: var(--hx-pagination-border-radius, var(--hx-border-radius-md, 0.375rem));\n background: var(--hx-pagination-bg, var(--hx-color-surface, #ffffff));\n color: var(--hx-pagination-color, var(--hx-color-text-primary, #111827));\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-family: inherit;\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms) ease,\n border-color var(--hx-transition-fast, 150ms) ease,\n color var(--hx-transition-fast, 150ms) ease;\n text-decoration: none;\n white-space: nowrap;\n }\n\n .button:hover:not(:disabled) {\n background: var(--hx-pagination-hover-bg, var(--hx-color-surface-hover, #f3f4f6));\n border-color: var(--hx-pagination-hover-border-color, var(--hx-color-primary, #2563eb));\n }\n\n .button:focus-visible {\n outline: 2px solid var(--hx-color-focus, var(--hx-color-primary, #2563eb));\n outline-offset: 2px;\n }\n\n .button[aria-current='page'] {\n background: var(--hx-pagination-active-bg, var(--hx-color-primary, #2563eb));\n border-color: var(\n --hx-pagination-active-border-color,\n var(--hx-pagination-active-bg, var(--hx-color-primary, #2563eb))\n );\n color: var(--hx-pagination-active-color, var(--hx-color-surface, #ffffff));\n font-weight: var(--hx-font-weight-semibold, 600);\n cursor: default;\n pointer-events: none;\n }\n\n .button:disabled {\n opacity: 0.4;\n pointer-events: none;\n }\n\n .ellipsis {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: var(--hx-pagination-button-size, 2.25rem);\n height: var(--hx-pagination-button-size, 2.25rem);\n color: var(--hx-pagination-ellipsis-color, var(--hx-color-text-secondary, #6b7280));\n font-size: var(--hx-font-size-sm, 0.875rem);\n user-select: none;\n }\n\n .button[aria-disabled='true'] {\n cursor: default;\n pointer-events: none;\n }\n\n /* Page size selector */\n .page-size-wrapper {\n display: flex;\n align-items: center;\n }\n\n .page-size-label {\n display: flex;\n align-items: center;\n gap: var(--hx-spacing-2, 0.5rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n color: var(--hx-color-text-secondary, #6b7280);\n white-space: nowrap;\n }\n\n .page-size-select {\n height: var(--hx-pagination-button-size, 2.25rem);\n padding: 0 var(--hx-spacing-2, 0.5rem);\n border: 1px solid var(--hx-pagination-border-color, var(--hx-color-border, #d1d5db));\n border-radius: var(--hx-pagination-border-radius, var(--hx-border-radius-md, 0.375rem));\n background: var(--hx-pagination-bg, var(--hx-color-surface, #ffffff));\n color: var(--hx-pagination-color, var(--hx-color-text-primary, #111827));\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-family: inherit;\n cursor: pointer;\n }\n\n .page-size-select:focus-visible {\n outline: 2px solid var(--hx-color-focus, var(--hx-color-primary, #2563eb));\n outline-offset: 2px;\n }\n\n /* Visually hidden — used for aria-live status messages */\n .visually-hidden {\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 @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n }\n\n /* Windows High Contrast / forced-colors support */\n @media (forced-colors: active) {\n .button {\n border: 1px solid ButtonText;\n color: ButtonText;\n background: ButtonFace;\n forced-color-adjust: none;\n }\n\n .button:hover:not(:disabled) {\n border-color: Highlight;\n color: Highlight;\n }\n\n .button:focus-visible {\n outline-color: Highlight;\n }\n\n .button[aria-current='page'] {\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n\n .button:disabled {\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n .button[aria-disabled='true'] {\n color: GrayText;\n }\n\n .page-size-select {\n border-color: ButtonText;\n color: ButtonText;\n background: ButtonFace;\n forced-color-adjust: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { repeat } from 'lit/directives/repeat.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixPaginationStyles } from './hx-pagination.styles.js';\n\n/**\n * A pagination component for navigating content listings.\n *\n * @summary Page navigation with page numbers, prev/next, and ellipsis.\n *\n * @tag hx-pagination\n *\n * @csspart nav - The wrapping `<nav>` element.\n * @csspart list - The `<ul>` containing pagination items.\n * @csspart item - Each `<li>` item.\n * @csspart button - Each page button or prev/next control.\n * @csspart ellipsis - The ellipsis (`…`) span between page groups.\n * @csspart page-size-wrapper - The wrapper `<div>` around the page-size selector.\n * @csspart page-size-label - The `<label>` element for the page-size selector.\n * @csspart page-size-select - The `<select>` element for page-size.\n *\n * @cssprop [--hx-pagination-gap=0.25rem] - Gap between pagination buttons. Inherits from --hx-spacing-1.\n * @cssprop [--hx-pagination-button-size=2.25rem] - Minimum width and height of each button.\n * @cssprop [--hx-pagination-border-color] - Border color of buttons. Inherits from --hx-color-border (final fallback: #d1d5db).\n * @cssprop [--hx-pagination-border-radius] - Border radius of buttons. Inherits from --hx-border-radius-md (final fallback: 0.375rem).\n * @cssprop [--hx-pagination-bg] - Background color of buttons. Inherits from --hx-color-surface (final fallback: #ffffff).\n * @cssprop [--hx-pagination-color] - Text color of buttons. Inherits from --hx-color-text-primary (final fallback: #111827).\n * @cssprop [--hx-pagination-hover-bg] - Background color of buttons on hover. Inherits from --hx-color-surface-hover (final fallback: #f3f4f6).\n * @cssprop [--hx-pagination-hover-border-color] - Border color of buttons on hover. Inherits from --hx-color-primary (final fallback: #2563eb).\n * @cssprop [--hx-pagination-active-bg] - Background color of the active/current page button. Inherits from --hx-color-primary (final fallback: #2563eb).\n * @cssprop [--hx-pagination-active-color] - Text color of the active/current page button. Inherits from --hx-color-surface (final fallback: #ffffff).\n * @cssprop [--hx-pagination-active-border-color] - Border color of the active/current page button. Defaults to --hx-pagination-active-bg.\n * @cssprop [--hx-pagination-ellipsis-color] - Color of ellipsis characters. Inherits from --hx-color-text-secondary (final fallback: #6b7280).\n * @cssprop [--hx-transition-fast=150ms] - Duration used for hover/focus transitions.\n *\n * @fires {CustomEvent<{ page: number }>} hx-page-change - Fired when the user navigates to a new page.\n * @fires {CustomEvent<{ pageSize: number }>} hx-page-size-change - Fired when the user selects a new page size.\n *\n * @example\n * ```html\n * <hx-pagination total-pages=\"10\" current-page=\"1\"></hx-pagination>\n * ```\n *\n * @example Drupal / Twig integration\n * ```twig\n * {#\n * Drupal's pager uses 0-based page index in the URL (?page=N).\n * This component is 1-based, so add 1 to the Drupal page value.\n * Listen to hx-page-change and update the URL query param:\n * element.addEventListener('hx-page-change', (e) => {\n * const params = new URLSearchParams(location.search);\n * params.set('page', e.detail.page - 1); // convert back to 0-based\n * history.pushState({}, '', '?' + params.toString());\n * });\n * #}\n * <hx-pagination\n * total-pages=\"{{ total_pages }}\"\n * current-page=\"{{ pager.current_page + 1 }}\"\n * label=\"{{ 'Pagination'|t }}\"\n * {{ show_first_last ? 'show-first-last' : '' }}\n * ></hx-pagination>\n * ```\n */\n@customElement('hx-pagination')\nexport class HelixPagination extends LitElement {\n static override styles = [tokenStyles, helixPaginationStyles];\n\n /**\n * Total number of pages.\n * @attr total-pages\n */\n @property({ type: Number, attribute: 'total-pages', reflect: true })\n totalPages = 1;\n\n /**\n * The currently active page (1-based).\n * @attr current-page\n */\n @property({ type: Number, attribute: 'current-page' })\n currentPage = 1;\n\n /**\n * Number of page buttons shown on each side of the current page.\n * @attr sibling-count\n */\n @property({ type: Number, attribute: 'sibling-count', reflect: true })\n siblingCount = 1;\n\n /**\n * Number of pages always shown at the start and end of the list.\n * @attr boundary-count\n */\n @property({ type: Number, attribute: 'boundary-count', reflect: true })\n boundaryCount = 1;\n\n /**\n * Whether to show First and Last page buttons.\n * @attr show-first-last\n */\n @property({ type: Boolean, attribute: 'show-first-last', reflect: true })\n showFirstLast = false;\n\n /**\n * Accessible label for the `<nav>` element.\n * @attr label\n */\n @property({ type: String, reflect: true })\n label = 'Pagination';\n\n /**\n * The number of items displayed per page. When set, a page-size selector\n * `<select>` is rendered. Set `show-page-size` to display the selector.\n * @attr page-size\n */\n @property({ type: Number, attribute: 'page-size', reflect: true })\n pageSize = 25;\n\n /**\n * Whether to show the page-size selector UI.\n * @attr show-page-size\n */\n @property({ type: Boolean, attribute: 'show-page-size', reflect: true })\n showPageSize = false;\n\n /** Tracks the roving tabindex target. Null means default to currentPage. */\n @state() private _rovingKey: number | string | null = null;\n\n /** Text for the aria-live region, updated on navigation. */\n @state() private _liveMessage = '';\n\n /** Memoization cache for _buildPageRange. */\n private _pageRangeCache: { key: string; result: Array<number | 'ellipsis'> } | null = null;\n\n // ─── Helpers ───\n\n private _buildPageRange(): Array<number | 'ellipsis'> {\n const key = `${this.totalPages}-${this.currentPage}-${this.siblingCount}-${this.boundaryCount}`;\n if (this._pageRangeCache?.key === key) return this._pageRangeCache.result;\n\n const total = Math.max(1, this.totalPages);\n const current = Math.min(Math.max(1, this.currentPage), total);\n const boundary = Math.max(0, this.boundaryCount);\n const sibling = Math.max(0, this.siblingCount);\n\n const startPages = this._range(1, Math.min(boundary, total));\n const endPages = this._range(Math.max(total - boundary + 1, boundary + 1), total);\n\n const siblingStart = Math.max(\n Math.min(current - sibling, total - boundary - sibling * 2 - 1),\n boundary + 2,\n );\n const siblingEnd = Math.min(\n Math.max(current + sibling, boundary + sibling * 2 + 2),\n endPages.length > 0 ? endPages[0]! - 2 : total - 1,\n );\n\n const items: Array<number | 'ellipsis'> = [];\n\n for (const p of startPages) items.push(p);\n\n if (siblingStart > boundary + 2) {\n items.push('ellipsis');\n } else if (boundary + 1 < siblingStart) {\n items.push(boundary + 1);\n }\n\n for (const p of this._range(siblingStart, siblingEnd)) items.push(p);\n\n if (siblingEnd < total - boundary - 1) {\n items.push('ellipsis');\n } else if (siblingEnd < total - boundary) {\n items.push(total - boundary);\n }\n\n for (const p of endPages) items.push(p);\n\n this._pageRangeCache = { key, result: items };\n return items;\n }\n\n private _range(start: number, end: number): number[] {\n const result: number[] = [];\n for (let i = start; i <= end; i++) result.push(i);\n return result;\n }\n\n private _navigate(page: number): void {\n const clamped = Math.min(Math.max(1, page), this.totalPages);\n if (clamped === this.currentPage) return;\n\n this.currentPage = clamped;\n this._rovingKey = null; // reset so focus follows the new current page\n this._liveMessage = `Page ${clamped} of ${this.totalPages}`;\n this.dispatchEvent(\n new CustomEvent<{ page: number }>('hx-page-change', {\n detail: { page: clamped },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private _handlePageSizeChange(e: Event): void {\n const select = e.target as HTMLSelectElement;\n const newSize = Number(select.value);\n if (newSize === this.pageSize) return;\n\n this.pageSize = newSize;\n this.dispatchEvent(\n new CustomEvent<{ pageSize: number }>('hx-page-size-change', {\n detail: { pageSize: newSize },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private get _effectiveRovingKey(): number | string {\n return this._rovingKey ?? this.currentPage;\n }\n\n private _handleFocusin(e: FocusEvent): void {\n const btn = e.target as HTMLElement;\n if (btn.tagName !== 'BUTTON') return;\n const key = btn.dataset['rovingKey'];\n if (key === undefined) return;\n this._rovingKey = isNaN(Number(key)) ? key : Number(key);\n }\n\n private _handleKeydown(e: KeyboardEvent): void {\n if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return;\n e.preventDefault();\n\n const list = this.shadowRoot?.querySelector('.list');\n if (!list) return;\n\n // Collect all non-disabled buttons (disabled prev/next excluded; aria-disabled current page included)\n const buttons = Array.from(list.querySelectorAll<HTMLButtonElement>('button:not([disabled])'));\n const focused = this.shadowRoot?.activeElement as HTMLButtonElement | null;\n const currentIdx = focused ? buttons.indexOf(focused) : 0;\n\n const nextIdx =\n e.key === 'ArrowLeft'\n ? Math.max(0, currentIdx - 1)\n : Math.min(buttons.length - 1, currentIdx + 1);\n\n if (nextIdx !== currentIdx) {\n const nextBtn = buttons[nextIdx];\n if (!nextBtn) return;\n const key = nextBtn.dataset['rovingKey'];\n if (key !== undefined) {\n this._rovingKey = isNaN(Number(key)) ? key : Number(key);\n }\n nextBtn.focus();\n }\n }\n\n // ─── Render ───\n\n override render() {\n const pages = this._buildPageRange();\n const isFirst = this.currentPage <= 1;\n const isLast = this.currentPage >= this.totalPages;\n const rovingKey = this._effectiveRovingKey;\n\n return html`\n <div class=\"pagination-root\">\n ${this.showPageSize\n ? html`\n <div part=\"page-size-wrapper\" class=\"page-size-wrapper\">\n <label part=\"page-size-label\" class=\"page-size-label\">\n Rows per page:\n <select\n part=\"page-size-select\"\n class=\"page-size-select\"\n @change=${this._handlePageSizeChange}\n >\n ${[10, 25, 50, 100].map(\n (n) =>\n html`<option value=${n} ?selected=${n === this.pageSize}>${n}</option>`,\n )}\n </select>\n </label>\n </div>\n `\n : nothing}\n\n <nav part=\"nav\" aria-label=${this.label}>\n <span class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\"\n >${this._liveMessage}</span\n >\n <ul\n part=\"list\"\n class=\"list\"\n role=\"list\"\n @keydown=${this._handleKeydown}\n @focusin=${this._handleFocusin}\n >\n ${this.showFirstLast\n ? html`\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isFirst}\n tabindex=${rovingKey === 'first' ? 0 : -1}\n data-roving-key=\"first\"\n aria-label=\"First page\"\n @click=${() => this._navigate(1)}\n >\n «\n </button>\n </li>\n `\n : nothing}\n\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isFirst}\n tabindex=${rovingKey === 'prev' ? 0 : -1}\n data-roving-key=\"prev\"\n aria-label=\"Previous page\"\n @click=${() => this._navigate(this.currentPage - 1)}\n >\n ‹\n </button>\n </li>\n\n ${repeat(\n pages,\n (page, i) => (page === 'ellipsis' ? `ellipsis-${i}` : `page-${page}`),\n (page) => {\n if (page === 'ellipsis') {\n return html`\n <li part=\"item\" class=\"item\">\n <span part=\"ellipsis\" class=\"ellipsis\" aria-hidden=\"true\">…</span>\n </li>\n `;\n }\n const isCurrent = page === this.currentPage;\n return html`\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=${classMap({ button: true })}\n aria-disabled=${isCurrent ? 'true' : nothing}\n tabindex=${rovingKey === page ? 0 : -1}\n data-roving-key=${page}\n aria-current=${isCurrent ? 'page' : nothing}\n aria-label=${`Page ${page}`}\n @click=${() => this._navigate(page)}\n >\n ${page}\n </button>\n </li>\n `;\n },\n )}\n\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isLast}\n tabindex=${rovingKey === 'next' ? 0 : -1}\n data-roving-key=\"next\"\n aria-label=\"Next page\"\n @click=${() => this._navigate(this.currentPage + 1)}\n >\n ›\n </button>\n </li>\n\n ${this.showFirstLast\n ? html`\n <li part=\"item\" class=\"item\">\n <button\n part=\"button\"\n class=\"button\"\n ?disabled=${isLast}\n tabindex=${rovingKey === 'last' ? 0 : -1}\n data-roving-key=\"last\"\n aria-label=\"Last page\"\n @click=${() => this._navigate(this.totalPages)}\n >\n »\n </button>\n </li>\n `\n : nothing}\n </ul>\n </nav>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-pagination': HelixPagination;\n }\n}\n\n/** Canonical type alias for HelixPagination. Use this when typing hx-pagination element references. */\nexport type HxPagination = HelixPagination;\n"],"names":["helixPaginationStyles","css","HelixPagination","LitElement","key","_a","total","current","boundary","sibling","startPages","endPages","siblingStart","siblingEnd","items","p","start","end","result","i","page","clamped","e","select","newSize","btn","list","buttons","focused","_b","currentIdx","nextIdx","nextBtn","pages","isFirst","isLast","rovingKey","html","n","nothing","repeat","isCurrent","classMap","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAwBC;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;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;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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750
|
display: block;
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
-
/*
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
753
|
+
/* Clear floats after aligned elements so block-level content (headings,
|
|
754
|
+
paragraphs) starts below floated images rather than wrapping beside them.
|
|
755
|
+
Consumers who want wrap-around behavior can override with clear: none. */
|
|
756
|
+
hx-prose .align-left + *,
|
|
757
|
+
hx-prose .align-right + * {
|
|
758
|
+
clear: both;
|
|
759
|
+
}
|
|
757
760
|
|
|
758
761
|
/* CKEditor Caption */
|
|
759
762
|
hx-prose .caption {
|
|
@@ -822,8 +825,8 @@ hx-prose .clearfix::after {
|
|
|
822
825
|
}
|
|
823
826
|
`, v = m;
|
|
824
827
|
var g = Object.defineProperty, f = Object.getOwnPropertyDescriptor, h = (r, n, t, o) => {
|
|
825
|
-
for (var e = o > 1 ? void 0 : o ? f(n, t) : n,
|
|
826
|
-
(
|
|
828
|
+
for (var e = o > 1 ? void 0 : o ? f(n, t) : n, s = r.length - 1, i; s >= 0; s--)
|
|
829
|
+
(i = r[s]) && (e = (o ? i(n, t, e) : i(e)) || e);
|
|
827
830
|
return o && e && g(n, t, e), e;
|
|
828
831
|
};
|
|
829
832
|
let a = class extends x {
|
|
@@ -870,4 +873,4 @@ a = h([
|
|
|
870
873
|
export {
|
|
871
874
|
a as H
|
|
872
875
|
};
|
|
873
|
-
//# sourceMappingURL=hx-prose-
|
|
876
|
+
//# sourceMappingURL=hx-prose-DZh2KrMb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-prose-BUkZ8rB3.js","sources":["../../src/styles/prose/prose.scoped.css?raw","../../src/components/hx-prose/hx-prose.styles.ts","../../src/components/hx-prose/hx-prose.ts"],"sourcesContent":["export default \"/* ==========================================================================\\n Prose — Scoped Barrel File\\n All prose styles with selectors scoped to the `hx-prose` wrapper.\\n Prevents styles from leaking outside the <hx-prose> component.\\n\\n Usage:\\n @import '@wc-2026/library/styles/prose/prose.scoped.css';\\n\\n <hx-prose>\\n <h1>My heading</h1>\\n <p>My content from CKEditor...</p>\\n </hx-prose>\\n\\n Override prose custom properties on the hx-prose element or any ancestor:\\n hx-prose {\\n --hx-prose-max-width: 720px;\\n --hx-prose-font-size: var(--hx-font-size-md, 1rem);\\n --hx-prose-line-height: var(--hx-line-height-relaxed, 1.75);\\n --hx-prose-color: var(--hx-color-neutral-700, #343a40);\\n --hx-prose-heading-color: var(--hx-color-neutral-900, #111827);\\n --hx-prose-link-color: var(--hx-color-primary-500, #2563EB);\\n }\\n ========================================================================== */\\n\\n/* ==========================================================================\\n Container Base\\n Sets display:block declaratively to prevent FOUC before JS lifecycle fires.\\n Establishes font-family baseline so prose is not affected by ancestor fonts.\\n ========================================================================== */\\n\\nhx-prose {\\n display: block;\\n font-family: var(--hx-font-family-sans, sans-serif);\\n}\\n\\n/* ==========================================================================\\n Headings\\n ========================================================================== */\\n\\nhx-prose h1,\\nhx-prose h2,\\nhx-prose h3,\\nhx-prose h4,\\nhx-prose h5,\\nhx-prose h6 {\\n font-family: var(\\n --hx-prose-heading-font-family,\\n var(--hx-heading-font-family, var(--hx-font-family-sans, sans-serif))\\n );\\n font-weight: var(\\n --hx-prose-heading-font-weight,\\n var(--hx-heading-font-weight, var(--hx-font-weight-bold, 700))\\n );\\n line-height: var(\\n --hx-prose-heading-line-height,\\n var(--hx-heading-line-height, var(--hx-line-height-tight, 1.25))\\n );\\n letter-spacing: var(\\n --hx-prose-heading-letter-spacing,\\n var(--hx-heading-letter-spacing, var(--hx-letter-spacing-tight, -0.025em))\\n );\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n margin-top: 0;\\n scroll-margin-top: var(--hx-space-8, 2rem);\\n}\\n\\nhx-prose h1 {\\n font-size: var(--hx-prose-h1-font-size, var(--hx-font-size-4xl, 2.25rem));\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose h2 {\\n font-size: var(--hx-prose-h2-font-size, var(--hx-font-size-3xl, 1.875rem));\\n margin-bottom: var(--hx-space-5, 1.25rem);\\n padding-bottom: var(--hx-space-3, 0.75rem);\\n border-bottom: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-subtle, var(--hx-color-neutral-100, #e9ecef));\\n}\\n\\nhx-prose h3 {\\n font-size: var(--hx-prose-h3-font-size, var(--hx-font-size-2xl, 1.5rem));\\n margin-bottom: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose h4 {\\n font-size: var(--hx-prose-h4-font-size, var(--hx-font-size-xl, 1.25rem));\\n margin-bottom: var(--hx-space-3, 0.75rem);\\n}\\n\\nhx-prose h5 {\\n font-size: var(--hx-prose-h5-font-size, var(--hx-font-size-lg, 1.125rem));\\n margin-bottom: var(--hx-space-3, 0.75rem);\\n}\\n\\nhx-prose h6 {\\n font-size: var(--hx-prose-h6-font-size, var(--hx-font-size-md, 1rem));\\n font-weight: var(--hx-font-weight-semibold, 600);\\n text-transform: uppercase;\\n letter-spacing: var(--hx-letter-spacing-wide, 0.025em);\\n margin-bottom: var(--hx-space-3, 0.75rem);\\n color: var(--hx-color-text-secondary, var(--hx-color-neutral-600, #495057));\\n}\\n\\n/* Adjacent heading spacing */\\nhx-prose h1 + h2,\\nhx-prose h2 + h3,\\nhx-prose h3 + h4,\\nhx-prose h4 + h5,\\nhx-prose h5 + h6 {\\n margin-top: var(--hx-space-2, 0.5rem);\\n}\\n\\n/* Spacing above headings when preceded by content */\\nhx-prose * + h1 {\\n margin-top: var(--hx-space-12, 3rem);\\n}\\n\\nhx-prose * + h2 {\\n margin-top: var(--hx-space-10, 2.5rem);\\n}\\n\\nhx-prose * + h3 {\\n margin-top: var(--hx-space-8, 2rem);\\n}\\n\\nhx-prose * + h4,\\nhx-prose * + h5,\\nhx-prose * + h6 {\\n margin-top: var(--hx-space-6, 1.5rem);\\n}\\n\\n/* ==========================================================================\\n Body Text\\n ========================================================================== */\\n\\nhx-prose p {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-4, 1rem);\\n font-size: var(--hx-prose-font-size, var(--hx-font-size-md, 1rem));\\n line-height: var(--hx-prose-line-height, var(--hx-line-height-relaxed, 1.75));\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n}\\n\\n/* Lead paragraph — opt-in via .lead class only.\\n Removed p:first-child because CKEditor/Drupal output always starts with a <p>\\n and promoting every first paragraph to lead styling is semantically incorrect\\n for healthcare content (medication instructions, care plans, clinical protocols). */\\nhx-prose p.lead {\\n font-size: var(--hx-prose-lead-font-size, var(--hx-font-size-lg, 1.125rem));\\n color: var(--hx-prose-lead-color, var(--hx-color-neutral-600, #495057));\\n}\\n\\n/* Blockquote */\\nhx-prose blockquote {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n margin-left: 0;\\n margin-right: 0;\\n padding: var(--hx-space-4, 1rem) var(--hx-space-6, 1.5rem);\\n border-left: var(--hx-border-width-thick, 3px) solid var(--hx-color-primary-500, #2563eb);\\n background-color: var(--hx-color-surface-raised, var(--hx-color-neutral-50, #f8f9fa));\\n border-radius: 0 var(--hx-border-radius-sm, 0.25rem) var(--hx-border-radius-sm, 0.25rem) 0;\\n font-style: italic;\\n color: var(--hx-color-text-secondary, var(--hx-color-neutral-600, #495057));\\n}\\n\\nhx-prose blockquote p {\\n color: inherit;\\n}\\n\\nhx-prose blockquote p:last-child {\\n margin-bottom: 0;\\n}\\n\\nhx-prose blockquote cite {\\n display: block;\\n margin-top: var(--hx-space-2, 0.5rem);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n font-style: normal;\\n font-weight: var(--hx-font-weight-medium, 500);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\nhx-prose blockquote cite::before {\\n content: '\\\\2014\\\\00A0';\\n}\\n\\n/* Horizontal Rule */\\nhx-prose hr {\\n border: 0;\\n border-top: var(--hx-divider-width, var(--hx-border-width-thin, 1px)) solid\\n var(--hx-divider-color, var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6)));\\n margin-top: var(--hx-space-8, 2rem);\\n margin-bottom: var(--hx-space-8, 2rem);\\n}\\n\\n/* Inline Text Elements */\\nhx-prose strong,\\nhx-prose b {\\n font-weight: var(--hx-font-weight-semibold, 600);\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n}\\n\\nhx-prose em,\\nhx-prose i {\\n font-style: italic;\\n}\\n\\nhx-prose small {\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\nhx-prose mark {\\n background-color: var(--hx-color-warning-100, #fff3cd);\\n color: var(--hx-color-neutral-900, #0d1117);\\n padding: var(--hx-space-0, 0) var(--hx-space-1, 0.25rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\nhx-prose del,\\nhx-prose s {\\n text-decoration: line-through;\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\nhx-prose ins {\\n text-decoration: underline;\\n text-decoration-color: var(--hx-color-success-300, #75b798);\\n}\\n\\nhx-prose abbr[title] {\\n text-decoration: underline dotted;\\n text-decoration-color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n cursor: help;\\n text-underline-offset: 0.15em;\\n}\\n\\nhx-prose sub,\\nhx-prose sup {\\n font-size: var(--hx-font-size-xs, 0.75rem);\\n line-height: 0;\\n position: relative;\\n vertical-align: baseline;\\n}\\n\\nhx-prose sup {\\n top: -0.5em;\\n}\\n\\nhx-prose sub {\\n bottom: -0.25em;\\n}\\n\\n/* Links */\\nhx-prose a {\\n color: var(\\n --hx-prose-link-color,\\n var(--hx-color-text-link, var(--hx-color-primary-600, #006868))\\n );\\n text-decoration: underline;\\n text-decoration-color: var(--hx-color-primary-200, #80c2c2);\\n text-underline-offset: 0.15em;\\n transition:\\n color var(--hx-transition-fast, 150ms ease),\\n text-decoration-color var(--hx-transition-fast, 150ms ease);\\n}\\n\\nhx-prose a:hover {\\n color: var(--hx-color-text-link-hover, var(--hx-color-primary-700, #005252));\\n text-decoration-color: currentColor;\\n}\\n\\nhx-prose a:visited {\\n color: var(--hx-color-text-link-visited, var(--hx-color-secondary-600, #4f46e5));\\n}\\n\\nhx-prose a:active {\\n color: var(--hx-color-text-link-active, var(--hx-color-primary-800, #003c3c));\\n}\\n\\nhx-prose a:focus-visible {\\n outline: var(--hx-focus-ring-width, 2px) solid\\n var(--hx-focus-ring-color, var(--hx-color-primary-500, #2563eb));\\n outline-offset: var(--hx-focus-ring-offset, 2px);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* ==========================================================================\\n Lists\\n ========================================================================== */\\n\\nhx-prose ul,\\nhx-prose ol {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-4, 1rem);\\n padding-left: var(--hx-space-6, 1.5rem);\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n}\\n\\nhx-prose ul {\\n list-style-type: disc;\\n}\\n\\nhx-prose ol {\\n list-style-type: decimal;\\n}\\n\\nhx-prose li {\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n font-size: var(--hx-prose-font-size, var(--hx-font-size-md, 1rem));\\n line-height: var(--hx-prose-line-height, var(--hx-line-height-relaxed, 1.75));\\n}\\n\\nhx-prose li:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* Paragraph inside a list item */\\nhx-prose li > p {\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose li > p:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* Nested Lists */\\nhx-prose ul ul,\\nhx-prose ol ul {\\n list-style-type: circle;\\n margin-top: var(--hx-space-2, 0.5rem);\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose ul ul ul,\\nhx-prose ol ul ul,\\nhx-prose ul ol ul,\\nhx-prose ol ol ul {\\n list-style-type: square;\\n}\\n\\nhx-prose ol ol,\\nhx-prose ul ol {\\n list-style-type: lower-alpha;\\n margin-top: var(--hx-space-2, 0.5rem);\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose ol ol ol,\\nhx-prose ul ol ol,\\nhx-prose ol ul ol,\\nhx-prose ul ul ol {\\n list-style-type: lower-roman;\\n}\\n\\n/* List Marker Color */\\nhx-prose ul ::marker,\\nhx-prose ol ::marker {\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\n/* Definition Lists */\\nhx-prose dl {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose dt {\\n font-weight: var(--hx-font-weight-semibold, 600);\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n margin-bottom: var(--hx-space-1, 0.25rem);\\n}\\n\\nhx-prose dt + dt {\\n margin-top: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose dd {\\n margin-left: var(--hx-space-6, 1.5rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n}\\n\\nhx-prose dd:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* ==========================================================================\\n Tables\\n ========================================================================== */\\n\\nhx-prose table {\\n width: 100%;\\n border-collapse: collapse;\\n border-spacing: 0;\\n margin-top: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n font-size: var(--hx-prose-font-size, var(--hx-font-size-md, 1rem));\\n line-height: var(--hx-line-height-normal, 1.5);\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n overflow-x: auto;\\n display: block;\\n}\\n\\n@media (min-width: 640px) {\\n hx-prose table {\\n display: table;\\n }\\n}\\n\\nhx-prose caption {\\n padding-top: var(--hx-space-3, 0.75rem);\\n padding-bottom: var(--hx-space-3, 0.75rem);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n font-weight: var(--hx-font-weight-medium, 500);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n text-align: left;\\n /* caption-side:top matches DOM order — WAI-ARIA authoring practices recommend\\n caption at top for data tables so screen reader announcement aligns with\\n visual placement. caption-side:bottom creates AT/visual mismatch (WCAG H39). */\\n caption-side: top;\\n}\\n\\nhx-prose thead {\\n border-bottom: var(--hx-border-width-medium, 2px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n}\\n\\nhx-prose tfoot {\\n border-top: var(--hx-border-width-medium, 2px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n}\\n\\nhx-prose th {\\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem);\\n font-weight: var(--hx-font-weight-semibold, 600);\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n text-align: left;\\n /* Removed white-space:nowrap — long clinical header text (e.g. \\\"Prescribing Physician\\\")\\n causes horizontal overflow on mobile viewports and forces table width to be\\n determined by longest header rather than content. */\\n background-color: var(--hx-color-surface-raised, var(--hx-color-neutral-50, #f8f9fa));\\n}\\n\\nhx-prose td {\\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem);\\n border-bottom: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n vertical-align: top;\\n}\\n\\n/* Zebra Striping */\\nhx-prose tbody tr:nth-child(even) {\\n background-color: var(--hx-color-surface-raised, var(--hx-color-neutral-50, #f8f9fa));\\n}\\n\\n/* Row Hover */\\nhx-prose tbody tr:hover {\\n background-color: var(--hx-color-primary-50, #e6f3f3);\\n}\\n\\n/* Alignment Helpers — Drupal CKEditor compatibility shims.\\n The HTML `align` attribute is deprecated in HTML5 but CKEditor may still\\n emit it. These selectors normalize deprecated presentational markup.\\n Note: [align='left'] is intentionally omitted since left-align is the default. */\\nhx-prose th[align='center'],\\nhx-prose td[align='center'] {\\n text-align: center;\\n}\\n\\nhx-prose th[align='right'],\\nhx-prose td[align='right'] {\\n text-align: right;\\n}\\n\\n/* ==========================================================================\\n Code\\n ========================================================================== */\\n\\n/* Inline Code */\\nhx-prose code {\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875em);\\n font-weight: var(--hx-font-weight-normal, 400);\\n background-color: var(--hx-color-surface-sunken, var(--hx-color-neutral-100, #e9ecef));\\n color: var(--hx-color-error-600, #b02a37);\\n padding: var(--hx-prose-code-padding-v, 0.125em) var(--hx-space-1, 0.25rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n word-break: break-word;\\n}\\n\\n/* Code Blocks */\\nhx-prose pre {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n padding: var(--hx-space-4, 1rem) var(--hx-space-5, 1.25rem);\\n overflow-x: auto;\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n line-height: var(--hx-line-height-relaxed, 1.75);\\n color: var(--hx-color-neutral-800, #212529);\\n background-color: var(--hx-color-surface-sunken, var(--hx-color-neutral-100, #e9ecef));\\n border: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n border-radius: var(--hx-border-radius-md, 0.375rem);\\n -webkit-overflow-scrolling: touch;\\n tab-size: 2;\\n}\\n\\n/* Reset inline code styles inside pre */\\nhx-prose pre code {\\n background-color: transparent;\\n color: inherit;\\n padding: 0;\\n border-radius: 0;\\n font-size: inherit;\\n font-weight: inherit;\\n word-break: normal;\\n}\\n\\n/* Keyboard Input */\\nhx-prose kbd {\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875em);\\n padding: var(--hx-prose-code-padding-v, 0.125em) var(--hx-space-2, 0.5rem);\\n background-color: var(--hx-color-neutral-800, #212529);\\n color: var(--hx-color-neutral-0, #ffffff);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n box-shadow: var(--hx-shadow-inset-sm, inset 0 -1px 0 rgba(0, 0, 0, 0.25));\\n}\\n\\n/* Sample Output */\\nhx-prose samp {\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875em);\\n}\\n\\n/* Variable */\\nhx-prose var {\\n font-style: italic;\\n color: var(--hx-color-secondary-600, #4f46e5);\\n}\\n\\n/* ==========================================================================\\n Media\\n ========================================================================== */\\n\\n/* Images */\\nhx-prose img {\\n max-width: 100%;\\n height: auto;\\n display: block;\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* Figure */\\nhx-prose figure {\\n margin: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose figure img {\\n margin-bottom: 0;\\n}\\n\\nhx-prose figure > a {\\n display: block;\\n}\\n\\nhx-prose figure > a img {\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\nhx-prose figcaption {\\n margin-top: var(--hx-space-2, 0.5rem);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n line-height: var(--hx-line-height-normal, 1.5);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n font-style: italic;\\n}\\n\\n/* Video */\\nhx-prose video {\\n max-width: 100%;\\n height: auto;\\n display: block;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* Iframes */\\nhx-prose iframe {\\n max-width: 100%;\\n border: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* Responsive Embed Wrapper */\\nhx-prose .embed-responsive,\\nhx-prose .video-embed,\\nhx-prose .media-oembed {\\n position: relative;\\n width: 100%;\\n padding-bottom: 56.25%;\\n height: 0;\\n overflow: hidden;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\nhx-prose .embed-responsive iframe,\\nhx-prose .embed-responsive video,\\nhx-prose .video-embed iframe,\\nhx-prose .video-embed video,\\nhx-prose .media-oembed iframe,\\nhx-prose .media-oembed video {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n margin-bottom: 0;\\n border-radius: 0;\\n}\\n\\n/* Audio */\\nhx-prose audio {\\n width: 100%;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\n/* Object / Embed */\\nhx-prose object,\\nhx-prose embed {\\n max-width: 100%;\\n}\\n\\n/* ==========================================================================\\n Drupal\\n ========================================================================== */\\n\\n/* Drupal Field Wrappers */\\nhx-prose .field {\\n margin-bottom: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose .field:last-child {\\n margin-bottom: 0;\\n}\\n\\nhx-prose .field__label {\\n font-weight: var(--hx-font-weight-semibold, 600);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n color: var(--hx-color-text-secondary, var(--hx-color-neutral-600, #495057));\\n margin-bottom: var(--hx-space-1, 0.25rem);\\n text-transform: uppercase;\\n letter-spacing: var(--hx-letter-spacing-wide, 0.025em);\\n}\\n\\nhx-prose .field__item {\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose .field__item:last-child {\\n margin-bottom: 0;\\n}\\n\\nhx-prose .field__items {\\n list-style: none;\\n padding-left: 0;\\n margin: 0;\\n}\\n\\n/* Text Formatted (CKEditor wrapper) */\\nhx-prose .text-formatted > *:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* Drupal Media Embeds */\\nhx-prose .media-embed,\\nhx-prose .embedded-entity,\\nhx-prose .media--type-image,\\nhx-prose .media--type-remote-video {\\n margin-top: var(--hx-space-4, 1rem);\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose .media-embed img,\\nhx-prose .embedded-entity img {\\n max-width: 100%;\\n height: auto;\\n display: block;\\n}\\n\\n/* CKEditor Alignment Classes */\\nhx-prose .align-left {\\n float: left;\\n margin-right: var(--hx-space-6, 1.5rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n max-width: 50%;\\n}\\n\\nhx-prose .align-right {\\n float: right;\\n margin-left: var(--hx-space-6, 1.5rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n max-width: 50%;\\n}\\n\\nhx-prose .align-center {\\n display: block;\\n margin-left: auto;\\n margin-right: auto;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n text-align: center;\\n}\\n\\n/* Reset float on alignment images */\\nhx-prose .align-left img,\\nhx-prose .align-right img {\\n display: block;\\n}\\n\\n/* Float siblings — allow content to wrap around aligned images (intentional).\\n Removed explicit clear:none; the default is already no-clear and setting it\\n explicitly prevented consumers from overriding it when clearfix is needed.\\n Use the .clearfix utility class on the parent container when floats must be cleared. */\\n\\n/* CKEditor Caption */\\nhx-prose .caption {\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose .caption figcaption,\\nhx-prose .caption .caption-text {\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n font-style: italic;\\n margin-top: var(--hx-space-2, 0.5rem);\\n}\\n\\n/* Drupal Table Classes */\\nhx-prose .table-responsive {\\n overflow-x: auto;\\n -webkit-overflow-scrolling: touch;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose .table-responsive table {\\n margin-bottom: 0;\\n}\\n\\n/* Drupal Messages / Callouts */\\nhx-prose .messages,\\nhx-prose .callout {\\n padding: var(--hx-space-4, 1rem) var(--hx-space-5, 1.25rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n border: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n border-radius: var(--hx-border-radius-md, 0.375rem);\\n border-left-width: var(--hx-border-width-thick, 3px);\\n}\\n\\nhx-prose .messages--status {\\n border-left-color: var(--hx-color-success-500, #198754);\\n background-color: var(--hx-color-success-50, #f0fdf4);\\n}\\n\\nhx-prose .messages--warning {\\n border-left-color: var(--hx-color-warning-500, #ffc107);\\n background-color: var(--hx-color-warning-50, #fffbeb);\\n}\\n\\nhx-prose .messages--error {\\n border-left-color: var(--hx-color-error-500, #dc3545);\\n background-color: var(--hx-color-error-50, #fef2f2);\\n}\\n\\n/* CKEditor Content Separator */\\nhx-prose .page-break {\\n border: 0;\\n border-top: var(--hx-border-width-thin, 1px) dashed\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n margin-top: var(--hx-space-8, 2rem);\\n margin-bottom: var(--hx-space-8, 2rem);\\n}\\n\\n/* Clear Floats */\\nhx-prose .clearfix::after {\\n content: '';\\n display: table;\\n clear: both;\\n}\\n\"","import proseScopedCss from '../../styles/prose/prose.scoped.css?raw';\n\nexport const helixProseScopedCss = proseScopedCss;\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { AdoptedStylesheetsController } from '../../controllers/adopted-stylesheets.js';\nimport { helixProseScopedCss } from './hx-prose.styles.js';\n\n/**\n * A Light DOM prose container that applies typographic styles to rich text\n * content such as CKEditor output, Markdown-rendered HTML, or any structured\n * body copy.\n *\n * Renders in the Light DOM (no Shadow DOM) so that global and scoped styles\n * can target child elements directly. Uses the AdoptedStylesheetsController\n * to inject scoped prose CSS into the document without duplication.\n *\n * @summary Light DOM typography wrapper for rich text and CMS content.\n *\n * @tag hx-prose\n *\n * @slot - Default slot for rich text content (headings, paragraphs, lists, tables, etc.).\n *\n * @cssprop [--hx-prose-max-width=720px] - Maximum content width.\n * @cssprop [--hx-prose-font-size=var(--hx-font-size-base)] - Base font size.\n * @cssprop [--hx-prose-line-height=var(--hx-line-height-relaxed)] - Base line height.\n * @cssprop [--hx-prose-color=var(--hx-color-text)] - Body text color.\n * @cssprop [--hx-prose-heading-color=var(--hx-color-text-strong)] - Heading color.\n * @cssprop [--hx-prose-link-color=var(--hx-color-primary)] - Link color.\n */\n@customElement('hx-prose')\nexport class HelixProse extends LitElement {\n // ─── Light DOM ───\n\n override createRenderRoot(): this {\n return this;\n }\n\n // ─── Adopted Stylesheets ───\n\n private adoptedStyles = new AdoptedStylesheetsController(this, helixProseScopedCss, document);\n\n // ─── Properties ───\n\n /**\n * Typography scale for the prose content.\n * @attr size\n */\n @property({ type: String, reflect: true })\n size: 'sm' | 'base' | 'lg' = 'base';\n\n /**\n * Maximum content width. When set, overrides the --hx-prose-max-width token.\n * Accepts any valid CSS width value (e.g., '640px', '80ch', '100%').\n * @attr max-width\n */\n @property({ type: String, reflect: true, attribute: 'max-width' })\n maxWidth = '';\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.style.display = 'block';\n this._applyMaxWidth();\n this._applySize();\n }\n\n override updated(changedProperties: Map<string, unknown>): void {\n if (changedProperties.has('maxWidth')) {\n this._applyMaxWidth();\n }\n if (changedProperties.has('size')) {\n this._applySize();\n }\n }\n\n // ─── Private ───\n\n private _applyMaxWidth(): void {\n if (this.maxWidth) {\n this.style.maxWidth = this.maxWidth;\n } else {\n this.style.maxWidth = '';\n }\n }\n\n private _applySize(): void {\n const sizeMap: Record<string, string> = {\n sm: 'var(--hx-font-size-sm, 0.875rem)',\n base: '',\n lg: 'var(--hx-font-size-lg, 1.125rem)',\n };\n\n const fontSize = sizeMap[this.size];\n if (fontSize) {\n this.style.setProperty('--hx-prose-font-size', fontSize);\n } else {\n this.style.removeProperty('--hx-prose-font-size');\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-prose': HelixProse;\n }\n}\n"],"names":["proseScopedCss","helixProseScopedCss","HelixProse","LitElement","A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,UAAU;AAAA,GACZR,CAAA;"}
|
|
1
|
+
{"version":3,"file":"hx-prose-DZh2KrMb.js","sources":["../../src/styles/prose/prose.scoped.css?raw","../../src/components/hx-prose/hx-prose.styles.ts","../../src/components/hx-prose/hx-prose.ts"],"sourcesContent":["export default \"/* ==========================================================================\\n Prose — Scoped Barrel File\\n All prose styles with selectors scoped to the `hx-prose` wrapper.\\n Prevents styles from leaking outside the <hx-prose> component.\\n\\n Usage:\\n @import '@wc-2026/library/styles/prose/prose.scoped.css';\\n\\n <hx-prose>\\n <h1>My heading</h1>\\n <p>My content from CKEditor...</p>\\n </hx-prose>\\n\\n Override prose custom properties on the hx-prose element or any ancestor:\\n hx-prose {\\n --hx-prose-max-width: 720px;\\n --hx-prose-font-size: var(--hx-font-size-md, 1rem);\\n --hx-prose-line-height: var(--hx-line-height-relaxed, 1.75);\\n --hx-prose-color: var(--hx-color-neutral-700, #343a40);\\n --hx-prose-heading-color: var(--hx-color-neutral-900, #111827);\\n --hx-prose-link-color: var(--hx-color-primary-500, #2563EB);\\n }\\n ========================================================================== */\\n\\n/* ==========================================================================\\n Container Base\\n Sets display:block declaratively to prevent FOUC before JS lifecycle fires.\\n Establishes font-family baseline so prose is not affected by ancestor fonts.\\n ========================================================================== */\\n\\nhx-prose {\\n display: block;\\n font-family: var(--hx-font-family-sans, sans-serif);\\n}\\n\\n/* ==========================================================================\\n Headings\\n ========================================================================== */\\n\\nhx-prose h1,\\nhx-prose h2,\\nhx-prose h3,\\nhx-prose h4,\\nhx-prose h5,\\nhx-prose h6 {\\n font-family: var(\\n --hx-prose-heading-font-family,\\n var(--hx-heading-font-family, var(--hx-font-family-sans, sans-serif))\\n );\\n font-weight: var(\\n --hx-prose-heading-font-weight,\\n var(--hx-heading-font-weight, var(--hx-font-weight-bold, 700))\\n );\\n line-height: var(\\n --hx-prose-heading-line-height,\\n var(--hx-heading-line-height, var(--hx-line-height-tight, 1.25))\\n );\\n letter-spacing: var(\\n --hx-prose-heading-letter-spacing,\\n var(--hx-heading-letter-spacing, var(--hx-letter-spacing-tight, -0.025em))\\n );\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n margin-top: 0;\\n scroll-margin-top: var(--hx-space-8, 2rem);\\n}\\n\\nhx-prose h1 {\\n font-size: var(--hx-prose-h1-font-size, var(--hx-font-size-4xl, 2.25rem));\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose h2 {\\n font-size: var(--hx-prose-h2-font-size, var(--hx-font-size-3xl, 1.875rem));\\n margin-bottom: var(--hx-space-5, 1.25rem);\\n padding-bottom: var(--hx-space-3, 0.75rem);\\n border-bottom: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-subtle, var(--hx-color-neutral-100, #e9ecef));\\n}\\n\\nhx-prose h3 {\\n font-size: var(--hx-prose-h3-font-size, var(--hx-font-size-2xl, 1.5rem));\\n margin-bottom: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose h4 {\\n font-size: var(--hx-prose-h4-font-size, var(--hx-font-size-xl, 1.25rem));\\n margin-bottom: var(--hx-space-3, 0.75rem);\\n}\\n\\nhx-prose h5 {\\n font-size: var(--hx-prose-h5-font-size, var(--hx-font-size-lg, 1.125rem));\\n margin-bottom: var(--hx-space-3, 0.75rem);\\n}\\n\\nhx-prose h6 {\\n font-size: var(--hx-prose-h6-font-size, var(--hx-font-size-md, 1rem));\\n font-weight: var(--hx-font-weight-semibold, 600);\\n text-transform: uppercase;\\n letter-spacing: var(--hx-letter-spacing-wide, 0.025em);\\n margin-bottom: var(--hx-space-3, 0.75rem);\\n color: var(--hx-color-text-secondary, var(--hx-color-neutral-600, #495057));\\n}\\n\\n/* Adjacent heading spacing */\\nhx-prose h1 + h2,\\nhx-prose h2 + h3,\\nhx-prose h3 + h4,\\nhx-prose h4 + h5,\\nhx-prose h5 + h6 {\\n margin-top: var(--hx-space-2, 0.5rem);\\n}\\n\\n/* Spacing above headings when preceded by content */\\nhx-prose * + h1 {\\n margin-top: var(--hx-space-12, 3rem);\\n}\\n\\nhx-prose * + h2 {\\n margin-top: var(--hx-space-10, 2.5rem);\\n}\\n\\nhx-prose * + h3 {\\n margin-top: var(--hx-space-8, 2rem);\\n}\\n\\nhx-prose * + h4,\\nhx-prose * + h5,\\nhx-prose * + h6 {\\n margin-top: var(--hx-space-6, 1.5rem);\\n}\\n\\n/* ==========================================================================\\n Body Text\\n ========================================================================== */\\n\\nhx-prose p {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-4, 1rem);\\n font-size: var(--hx-prose-font-size, var(--hx-font-size-md, 1rem));\\n line-height: var(--hx-prose-line-height, var(--hx-line-height-relaxed, 1.75));\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n}\\n\\n/* Lead paragraph — opt-in via .lead class only.\\n Removed p:first-child because CKEditor/Drupal output always starts with a <p>\\n and promoting every first paragraph to lead styling is semantically incorrect\\n for healthcare content (medication instructions, care plans, clinical protocols). */\\nhx-prose p.lead {\\n font-size: var(--hx-prose-lead-font-size, var(--hx-font-size-lg, 1.125rem));\\n color: var(--hx-prose-lead-color, var(--hx-color-neutral-600, #495057));\\n}\\n\\n/* Blockquote */\\nhx-prose blockquote {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n margin-left: 0;\\n margin-right: 0;\\n padding: var(--hx-space-4, 1rem) var(--hx-space-6, 1.5rem);\\n border-left: var(--hx-border-width-thick, 3px) solid var(--hx-color-primary-500, #2563eb);\\n background-color: var(--hx-color-surface-raised, var(--hx-color-neutral-50, #f8f9fa));\\n border-radius: 0 var(--hx-border-radius-sm, 0.25rem) var(--hx-border-radius-sm, 0.25rem) 0;\\n font-style: italic;\\n color: var(--hx-color-text-secondary, var(--hx-color-neutral-600, #495057));\\n}\\n\\nhx-prose blockquote p {\\n color: inherit;\\n}\\n\\nhx-prose blockquote p:last-child {\\n margin-bottom: 0;\\n}\\n\\nhx-prose blockquote cite {\\n display: block;\\n margin-top: var(--hx-space-2, 0.5rem);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n font-style: normal;\\n font-weight: var(--hx-font-weight-medium, 500);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\nhx-prose blockquote cite::before {\\n content: '\\\\2014\\\\00A0';\\n}\\n\\n/* Horizontal Rule */\\nhx-prose hr {\\n border: 0;\\n border-top: var(--hx-divider-width, var(--hx-border-width-thin, 1px)) solid\\n var(--hx-divider-color, var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6)));\\n margin-top: var(--hx-space-8, 2rem);\\n margin-bottom: var(--hx-space-8, 2rem);\\n}\\n\\n/* Inline Text Elements */\\nhx-prose strong,\\nhx-prose b {\\n font-weight: var(--hx-font-weight-semibold, 600);\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n}\\n\\nhx-prose em,\\nhx-prose i {\\n font-style: italic;\\n}\\n\\nhx-prose small {\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\nhx-prose mark {\\n background-color: var(--hx-color-warning-100, #fff3cd);\\n color: var(--hx-color-neutral-900, #0d1117);\\n padding: var(--hx-space-0, 0) var(--hx-space-1, 0.25rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\nhx-prose del,\\nhx-prose s {\\n text-decoration: line-through;\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\nhx-prose ins {\\n text-decoration: underline;\\n text-decoration-color: var(--hx-color-success-300, #75b798);\\n}\\n\\nhx-prose abbr[title] {\\n text-decoration: underline dotted;\\n text-decoration-color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n cursor: help;\\n text-underline-offset: 0.15em;\\n}\\n\\nhx-prose sub,\\nhx-prose sup {\\n font-size: var(--hx-font-size-xs, 0.75rem);\\n line-height: 0;\\n position: relative;\\n vertical-align: baseline;\\n}\\n\\nhx-prose sup {\\n top: -0.5em;\\n}\\n\\nhx-prose sub {\\n bottom: -0.25em;\\n}\\n\\n/* Links */\\nhx-prose a {\\n color: var(\\n --hx-prose-link-color,\\n var(--hx-color-text-link, var(--hx-color-primary-600, #006868))\\n );\\n text-decoration: underline;\\n text-decoration-color: var(--hx-color-primary-200, #80c2c2);\\n text-underline-offset: 0.15em;\\n transition:\\n color var(--hx-transition-fast, 150ms ease),\\n text-decoration-color var(--hx-transition-fast, 150ms ease);\\n}\\n\\nhx-prose a:hover {\\n color: var(--hx-color-text-link-hover, var(--hx-color-primary-700, #005252));\\n text-decoration-color: currentColor;\\n}\\n\\nhx-prose a:visited {\\n color: var(--hx-color-text-link-visited, var(--hx-color-secondary-600, #4f46e5));\\n}\\n\\nhx-prose a:active {\\n color: var(--hx-color-text-link-active, var(--hx-color-primary-800, #003c3c));\\n}\\n\\nhx-prose a:focus-visible {\\n outline: var(--hx-focus-ring-width, 2px) solid\\n var(--hx-focus-ring-color, var(--hx-color-primary-500, #2563eb));\\n outline-offset: var(--hx-focus-ring-offset, 2px);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* ==========================================================================\\n Lists\\n ========================================================================== */\\n\\nhx-prose ul,\\nhx-prose ol {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-4, 1rem);\\n padding-left: var(--hx-space-6, 1.5rem);\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n}\\n\\nhx-prose ul {\\n list-style-type: disc;\\n}\\n\\nhx-prose ol {\\n list-style-type: decimal;\\n}\\n\\nhx-prose li {\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n font-size: var(--hx-prose-font-size, var(--hx-font-size-md, 1rem));\\n line-height: var(--hx-prose-line-height, var(--hx-line-height-relaxed, 1.75));\\n}\\n\\nhx-prose li:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* Paragraph inside a list item */\\nhx-prose li > p {\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose li > p:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* Nested Lists */\\nhx-prose ul ul,\\nhx-prose ol ul {\\n list-style-type: circle;\\n margin-top: var(--hx-space-2, 0.5rem);\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose ul ul ul,\\nhx-prose ol ul ul,\\nhx-prose ul ol ul,\\nhx-prose ol ol ul {\\n list-style-type: square;\\n}\\n\\nhx-prose ol ol,\\nhx-prose ul ol {\\n list-style-type: lower-alpha;\\n margin-top: var(--hx-space-2, 0.5rem);\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose ol ol ol,\\nhx-prose ul ol ol,\\nhx-prose ol ul ol,\\nhx-prose ul ul ol {\\n list-style-type: lower-roman;\\n}\\n\\n/* List Marker Color */\\nhx-prose ul ::marker,\\nhx-prose ol ::marker {\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n}\\n\\n/* Definition Lists */\\nhx-prose dl {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose dt {\\n font-weight: var(--hx-font-weight-semibold, 600);\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n margin-bottom: var(--hx-space-1, 0.25rem);\\n}\\n\\nhx-prose dt + dt {\\n margin-top: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose dd {\\n margin-left: var(--hx-space-6, 1.5rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n}\\n\\nhx-prose dd:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* ==========================================================================\\n Tables\\n ========================================================================== */\\n\\nhx-prose table {\\n width: 100%;\\n border-collapse: collapse;\\n border-spacing: 0;\\n margin-top: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n font-size: var(--hx-prose-font-size, var(--hx-font-size-md, 1rem));\\n line-height: var(--hx-line-height-normal, 1.5);\\n color: var(--hx-prose-color, var(--hx-color-neutral-700, #343a40));\\n overflow-x: auto;\\n display: block;\\n}\\n\\n@media (min-width: 640px) {\\n hx-prose table {\\n display: table;\\n }\\n}\\n\\nhx-prose caption {\\n padding-top: var(--hx-space-3, 0.75rem);\\n padding-bottom: var(--hx-space-3, 0.75rem);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n font-weight: var(--hx-font-weight-medium, 500);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n text-align: left;\\n /* caption-side:top matches DOM order — WAI-ARIA authoring practices recommend\\n caption at top for data tables so screen reader announcement aligns with\\n visual placement. caption-side:bottom creates AT/visual mismatch (WCAG H39). */\\n caption-side: top;\\n}\\n\\nhx-prose thead {\\n border-bottom: var(--hx-border-width-medium, 2px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n}\\n\\nhx-prose tfoot {\\n border-top: var(--hx-border-width-medium, 2px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n}\\n\\nhx-prose th {\\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem);\\n font-weight: var(--hx-font-weight-semibold, 600);\\n color: var(--hx-prose-heading-color, var(--hx-color-neutral-900, #111827));\\n text-align: left;\\n /* Removed white-space:nowrap — long clinical header text (e.g. \\\"Prescribing Physician\\\")\\n causes horizontal overflow on mobile viewports and forces table width to be\\n determined by longest header rather than content. */\\n background-color: var(--hx-color-surface-raised, var(--hx-color-neutral-50, #f8f9fa));\\n}\\n\\nhx-prose td {\\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem);\\n border-bottom: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n vertical-align: top;\\n}\\n\\n/* Zebra Striping */\\nhx-prose tbody tr:nth-child(even) {\\n background-color: var(--hx-color-surface-raised, var(--hx-color-neutral-50, #f8f9fa));\\n}\\n\\n/* Row Hover */\\nhx-prose tbody tr:hover {\\n background-color: var(--hx-color-primary-50, #e6f3f3);\\n}\\n\\n/* Alignment Helpers — Drupal CKEditor compatibility shims.\\n The HTML `align` attribute is deprecated in HTML5 but CKEditor may still\\n emit it. These selectors normalize deprecated presentational markup.\\n Note: [align='left'] is intentionally omitted since left-align is the default. */\\nhx-prose th[align='center'],\\nhx-prose td[align='center'] {\\n text-align: center;\\n}\\n\\nhx-prose th[align='right'],\\nhx-prose td[align='right'] {\\n text-align: right;\\n}\\n\\n/* ==========================================================================\\n Code\\n ========================================================================== */\\n\\n/* Inline Code */\\nhx-prose code {\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875em);\\n font-weight: var(--hx-font-weight-normal, 400);\\n background-color: var(--hx-color-surface-sunken, var(--hx-color-neutral-100, #e9ecef));\\n color: var(--hx-color-error-600, #b02a37);\\n padding: var(--hx-prose-code-padding-v, 0.125em) var(--hx-space-1, 0.25rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n word-break: break-word;\\n}\\n\\n/* Code Blocks */\\nhx-prose pre {\\n margin-top: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n padding: var(--hx-space-4, 1rem) var(--hx-space-5, 1.25rem);\\n overflow-x: auto;\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n line-height: var(--hx-line-height-relaxed, 1.75);\\n color: var(--hx-color-neutral-800, #212529);\\n background-color: var(--hx-color-surface-sunken, var(--hx-color-neutral-100, #e9ecef));\\n border: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n border-radius: var(--hx-border-radius-md, 0.375rem);\\n -webkit-overflow-scrolling: touch;\\n tab-size: 2;\\n}\\n\\n/* Reset inline code styles inside pre */\\nhx-prose pre code {\\n background-color: transparent;\\n color: inherit;\\n padding: 0;\\n border-radius: 0;\\n font-size: inherit;\\n font-weight: inherit;\\n word-break: normal;\\n}\\n\\n/* Keyboard Input */\\nhx-prose kbd {\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875em);\\n padding: var(--hx-prose-code-padding-v, 0.125em) var(--hx-space-2, 0.5rem);\\n background-color: var(--hx-color-neutral-800, #212529);\\n color: var(--hx-color-neutral-0, #ffffff);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n box-shadow: var(--hx-shadow-inset-sm, inset 0 -1px 0 rgba(0, 0, 0, 0.25));\\n}\\n\\n/* Sample Output */\\nhx-prose samp {\\n font-family: var(\\n --hx-font-family-mono,\\n 'JetBrains Mono',\\n ui-monospace,\\n 'Cascadia Code',\\n monospace\\n );\\n font-size: var(--hx-font-size-sm, 0.875em);\\n}\\n\\n/* Variable */\\nhx-prose var {\\n font-style: italic;\\n color: var(--hx-color-secondary-600, #4f46e5);\\n}\\n\\n/* ==========================================================================\\n Media\\n ========================================================================== */\\n\\n/* Images */\\nhx-prose img {\\n max-width: 100%;\\n height: auto;\\n display: block;\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* Figure */\\nhx-prose figure {\\n margin: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose figure img {\\n margin-bottom: 0;\\n}\\n\\nhx-prose figure > a {\\n display: block;\\n}\\n\\nhx-prose figure > a img {\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\nhx-prose figcaption {\\n margin-top: var(--hx-space-2, 0.5rem);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n line-height: var(--hx-line-height-normal, 1.5);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n font-style: italic;\\n}\\n\\n/* Video */\\nhx-prose video {\\n max-width: 100%;\\n height: auto;\\n display: block;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* Iframes */\\nhx-prose iframe {\\n max-width: 100%;\\n border: 0;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\n/* Responsive Embed Wrapper */\\nhx-prose .embed-responsive,\\nhx-prose .video-embed,\\nhx-prose .media-oembed {\\n position: relative;\\n width: 100%;\\n padding-bottom: 56.25%;\\n height: 0;\\n overflow: hidden;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n border-radius: var(--hx-border-radius-sm, 0.25rem);\\n}\\n\\nhx-prose .embed-responsive iframe,\\nhx-prose .embed-responsive video,\\nhx-prose .video-embed iframe,\\nhx-prose .video-embed video,\\nhx-prose .media-oembed iframe,\\nhx-prose .media-oembed video {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n margin-bottom: 0;\\n border-radius: 0;\\n}\\n\\n/* Audio */\\nhx-prose audio {\\n width: 100%;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\n/* Object / Embed */\\nhx-prose object,\\nhx-prose embed {\\n max-width: 100%;\\n}\\n\\n/* ==========================================================================\\n Drupal\\n ========================================================================== */\\n\\n/* Drupal Field Wrappers */\\nhx-prose .field {\\n margin-bottom: var(--hx-space-4, 1rem);\\n}\\n\\nhx-prose .field:last-child {\\n margin-bottom: 0;\\n}\\n\\nhx-prose .field__label {\\n font-weight: var(--hx-font-weight-semibold, 600);\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n color: var(--hx-color-text-secondary, var(--hx-color-neutral-600, #495057));\\n margin-bottom: var(--hx-space-1, 0.25rem);\\n text-transform: uppercase;\\n letter-spacing: var(--hx-letter-spacing-wide, 0.025em);\\n}\\n\\nhx-prose .field__item {\\n margin-bottom: var(--hx-space-2, 0.5rem);\\n}\\n\\nhx-prose .field__item:last-child {\\n margin-bottom: 0;\\n}\\n\\nhx-prose .field__items {\\n list-style: none;\\n padding-left: 0;\\n margin: 0;\\n}\\n\\n/* Text Formatted (CKEditor wrapper) */\\nhx-prose .text-formatted > *:last-child {\\n margin-bottom: 0;\\n}\\n\\n/* Drupal Media Embeds */\\nhx-prose .media-embed,\\nhx-prose .embedded-entity,\\nhx-prose .media--type-image,\\nhx-prose .media--type-remote-video {\\n margin-top: var(--hx-space-4, 1rem);\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose .media-embed img,\\nhx-prose .embedded-entity img {\\n max-width: 100%;\\n height: auto;\\n display: block;\\n}\\n\\n/* CKEditor Alignment Classes */\\nhx-prose .align-left {\\n float: left;\\n margin-right: var(--hx-space-6, 1.5rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n max-width: 50%;\\n}\\n\\nhx-prose .align-right {\\n float: right;\\n margin-left: var(--hx-space-6, 1.5rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n max-width: 50%;\\n}\\n\\nhx-prose .align-center {\\n display: block;\\n margin-left: auto;\\n margin-right: auto;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n text-align: center;\\n}\\n\\n/* Reset float on alignment images */\\nhx-prose .align-left img,\\nhx-prose .align-right img {\\n display: block;\\n}\\n\\n/* Clear floats after aligned elements so block-level content (headings,\\n paragraphs) starts below floated images rather than wrapping beside them.\\n Consumers who want wrap-around behavior can override with clear: none. */\\nhx-prose .align-left + *,\\nhx-prose .align-right + * {\\n clear: both;\\n}\\n\\n/* CKEditor Caption */\\nhx-prose .caption {\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose .caption figcaption,\\nhx-prose .caption .caption-text {\\n font-size: var(--hx-font-size-sm, 0.875rem);\\n color: var(--hx-color-text-muted, var(--hx-color-neutral-500, #6c757d));\\n font-style: italic;\\n margin-top: var(--hx-space-2, 0.5rem);\\n}\\n\\n/* Drupal Table Classes */\\nhx-prose .table-responsive {\\n overflow-x: auto;\\n -webkit-overflow-scrolling: touch;\\n margin-bottom: var(--hx-space-6, 1.5rem);\\n}\\n\\nhx-prose .table-responsive table {\\n margin-bottom: 0;\\n}\\n\\n/* Drupal Messages / Callouts */\\nhx-prose .messages,\\nhx-prose .callout {\\n padding: var(--hx-space-4, 1rem) var(--hx-space-5, 1.25rem);\\n margin-bottom: var(--hx-space-4, 1rem);\\n border: var(--hx-border-width-thin, 1px) solid\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n border-radius: var(--hx-border-radius-md, 0.375rem);\\n border-left-width: var(--hx-border-width-thick, 3px);\\n}\\n\\nhx-prose .messages--status {\\n border-left-color: var(--hx-color-success-500, #198754);\\n background-color: var(--hx-color-success-50, #f0fdf4);\\n}\\n\\nhx-prose .messages--warning {\\n border-left-color: var(--hx-color-warning-500, #ffc107);\\n background-color: var(--hx-color-warning-50, #fffbeb);\\n}\\n\\nhx-prose .messages--error {\\n border-left-color: var(--hx-color-error-500, #dc3545);\\n background-color: var(--hx-color-error-50, #fef2f2);\\n}\\n\\n/* CKEditor Content Separator */\\nhx-prose .page-break {\\n border: 0;\\n border-top: var(--hx-border-width-thin, 1px) dashed\\n var(--hx-color-border-default, var(--hx-color-neutral-200, #dee2e6));\\n margin-top: var(--hx-space-8, 2rem);\\n margin-bottom: var(--hx-space-8, 2rem);\\n}\\n\\n/* Clear Floats */\\nhx-prose .clearfix::after {\\n content: '';\\n display: table;\\n clear: both;\\n}\\n\"","import proseScopedCss from '../../styles/prose/prose.scoped.css?raw';\n\nexport const helixProseScopedCss = proseScopedCss;\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { AdoptedStylesheetsController } from '../../controllers/adopted-stylesheets.js';\nimport { helixProseScopedCss } from './hx-prose.styles.js';\n\n/**\n * A Light DOM prose container that applies typographic styles to rich text\n * content such as CKEditor output, Markdown-rendered HTML, or any structured\n * body copy.\n *\n * Renders in the Light DOM (no Shadow DOM) so that global and scoped styles\n * can target child elements directly. Uses the AdoptedStylesheetsController\n * to inject scoped prose CSS into the document without duplication.\n *\n * @summary Light DOM typography wrapper for rich text and CMS content.\n *\n * @tag hx-prose\n *\n * @slot - Default slot for rich text content (headings, paragraphs, lists, tables, etc.).\n *\n * @cssprop [--hx-prose-max-width=720px] - Maximum content width.\n * @cssprop [--hx-prose-font-size=var(--hx-font-size-base)] - Base font size.\n * @cssprop [--hx-prose-line-height=var(--hx-line-height-relaxed)] - Base line height.\n * @cssprop [--hx-prose-color=var(--hx-color-text)] - Body text color.\n * @cssprop [--hx-prose-heading-color=var(--hx-color-text-strong)] - Heading color.\n * @cssprop [--hx-prose-link-color=var(--hx-color-primary)] - Link color.\n */\n@customElement('hx-prose')\nexport class HelixProse extends LitElement {\n // ─── Light DOM ───\n\n override createRenderRoot(): this {\n return this;\n }\n\n // ─── Adopted Stylesheets ───\n\n private adoptedStyles = new AdoptedStylesheetsController(this, helixProseScopedCss, document);\n\n // ─── Properties ───\n\n /**\n * Typography scale for the prose content.\n * @attr size\n */\n @property({ type: String, reflect: true })\n size: 'sm' | 'base' | 'lg' = 'base';\n\n /**\n * Maximum content width. When set, overrides the --hx-prose-max-width token.\n * Accepts any valid CSS width value (e.g., '640px', '80ch', '100%').\n * @attr max-width\n */\n @property({ type: String, reflect: true, attribute: 'max-width' })\n maxWidth = '';\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.style.display = 'block';\n this._applyMaxWidth();\n this._applySize();\n }\n\n override updated(changedProperties: Map<string, unknown>): void {\n if (changedProperties.has('maxWidth')) {\n this._applyMaxWidth();\n }\n if (changedProperties.has('size')) {\n this._applySize();\n }\n }\n\n // ─── Private ───\n\n private _applyMaxWidth(): void {\n if (this.maxWidth) {\n this.style.maxWidth = this.maxWidth;\n } else {\n this.style.maxWidth = '';\n }\n }\n\n private _applySize(): void {\n const sizeMap: Record<string, string> = {\n sm: 'var(--hx-font-size-sm, 0.875rem)',\n base: '',\n lg: 'var(--hx-font-size-lg, 1.125rem)',\n };\n\n const fontSize = sizeMap[this.size];\n if (fontSize) {\n this.style.setProperty('--hx-prose-font-size', fontSize);\n } else {\n this.style.removeProperty('--hx-prose-font-size');\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-prose': HelixProse;\n }\n}\n"],"names":["proseScopedCss","helixProseScopedCss","HelixProse","LitElement","AdoptedStylesheetsController","changedProperties","fontSize","html","__decorateClass","property","customElement"],"mappings":";;;AAAA,MAAAA,IAAe;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;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;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;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;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;A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