@devschile/chucao 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/chucao/chucao.esm.js +1 -1
  2. package/dist/chucao/{p-d5a9e340.entry.js → p-077dc2a6.entry.js} +2 -2
  3. package/dist/chucao/{p-4bc8e098.entry.js → p-079c2017.entry.js} +2 -2
  4. package/dist/chucao/p-37e7f9cc.entry.js +2 -0
  5. package/dist/chucao/p-37e7f9cc.entry.js.map +1 -0
  6. package/dist/chucao/{p-121fbfc8.entry.js → p-5ae89a19.entry.js} +2 -2
  7. package/dist/chucao/p-70285203.entry.js +2 -0
  8. package/dist/chucao/p-70285203.entry.js.map +1 -0
  9. package/dist/chucao/{p-5fe8bfff.entry.js → p-9c072600.entry.js} +2 -2
  10. package/dist/chucao/p-b678a7e2.entry.js +2 -0
  11. package/dist/chucao/p-b678a7e2.entry.js.map +1 -0
  12. package/dist/chucao/p-b8bd0310.entry.js +2 -0
  13. package/dist/chucao/p-b8bd0310.entry.js.map +1 -0
  14. package/dist/chucao/p-bb2445d1.entry.js +2 -0
  15. package/dist/chucao/{p-9bb81a65.entry.js → p-c986036f.entry.js} +2 -2
  16. package/dist/chucao/p-d8DfpzMR.js +2 -0
  17. package/dist/chucao/p-d8DfpzMR.js.map +1 -0
  18. package/dist/chucao/{p-1b1e56cd.entry.js → p-e3265e38.entry.js} +2 -2
  19. package/dist/cjs/ch-alert_8.cjs.entry.js +54 -11
  20. package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ch-checkbox.cjs.entry.js +1 -1
  22. package/dist/cjs/ch-divider.cjs.entry.js +1 -1
  23. package/dist/cjs/ch-drawer.cjs.entry.js +153 -0
  24. package/dist/cjs/ch-drawer.cjs.entry.js.map +1 -0
  25. package/dist/cjs/ch-emoji.cjs.entry.js +1 -1
  26. package/dist/cjs/ch-modal.cjs.entry.js +4 -23
  27. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ch-radio.cjs.entry.js +1 -1
  29. package/dist/cjs/ch-segmented-control.cjs.entry.js +112 -0
  30. package/dist/cjs/ch-segmented-control.cjs.entry.js.map +1 -0
  31. package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
  32. package/dist/cjs/ch-textarea.cjs.entry.js +1 -1
  33. package/dist/cjs/ch-tooltip.cjs.entry.js +1 -1
  34. package/dist/cjs/chucao.cjs.js +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/cjs/scroll-lock-DIRqLP4K.js +49 -0
  37. package/dist/cjs/scroll-lock-DIRqLP4K.js.map +1 -0
  38. package/dist/collection/collection-manifest.json +2 -0
  39. package/dist/collection/components/ch-button/ch-button.css +56 -18
  40. package/dist/collection/components/ch-button/ch-button.js +135 -8
  41. package/dist/collection/components/ch-button/ch-button.js.map +1 -1
  42. package/dist/collection/components/ch-card/ch-card.js +1 -1
  43. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  44. package/dist/collection/components/ch-divider/ch-divider.js +1 -1
  45. package/dist/collection/components/ch-drawer/ch-drawer.css +152 -0
  46. package/dist/collection/components/ch-drawer/ch-drawer.js +285 -0
  47. package/dist/collection/components/ch-drawer/ch-drawer.js.map +1 -0
  48. package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
  49. package/dist/collection/components/ch-input/ch-input.js +1 -1
  50. package/dist/collection/components/ch-modal/ch-modal.js +4 -23
  51. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -1
  52. package/dist/collection/components/ch-radio/ch-radio.js +1 -1
  53. package/dist/collection/components/ch-segmented-control/ch-segmented-control.css +88 -0
  54. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +295 -0
  55. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js.map +1 -0
  56. package/dist/collection/components/ch-select/ch-select.js +1 -1
  57. package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
  58. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  59. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  60. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  61. package/dist/collection/components/ch-tooltip/ch-tooltip.js +1 -1
  62. package/dist/collection/utils/scroll-lock.js +42 -0
  63. package/dist/collection/utils/scroll-lock.js.map +1 -0
  64. package/dist/components/ch-button.js +1 -1
  65. package/dist/components/ch-button.js.map +1 -1
  66. package/dist/components/ch-card.js +1 -1
  67. package/dist/components/ch-checkbox.js +1 -1
  68. package/dist/components/ch-divider.js +1 -1
  69. package/dist/components/ch-drawer.d.ts +11 -0
  70. package/dist/components/ch-drawer.js +2 -0
  71. package/dist/components/ch-drawer.js.map +1 -0
  72. package/dist/components/ch-emoji.js +1 -1
  73. package/dist/components/ch-input.js +1 -1
  74. package/dist/components/ch-modal.js +1 -1
  75. package/dist/components/ch-modal.js.map +1 -1
  76. package/dist/components/ch-radio.js +1 -1
  77. package/dist/components/ch-segmented-control.d.ts +11 -0
  78. package/dist/components/ch-segmented-control.js +2 -0
  79. package/dist/components/ch-segmented-control.js.map +1 -0
  80. package/dist/components/ch-select.js +1 -1
  81. package/dist/components/ch-spinner.js +1 -1
  82. package/dist/components/ch-spinner.js.map +1 -1
  83. package/dist/components/ch-switch.js +1 -1
  84. package/dist/components/ch-tabs.js +1 -1
  85. package/dist/components/ch-textarea.js +1 -1
  86. package/dist/components/ch-tooltip.js +1 -1
  87. package/dist/components/p-C4eGmLcE.js +2 -0
  88. package/dist/components/p-C4eGmLcE.js.map +1 -0
  89. package/dist/components/p-d8DfpzMR.js +2 -0
  90. package/dist/components/p-d8DfpzMR.js.map +1 -0
  91. package/dist/esm/ch-alert_8.entry.js +54 -11
  92. package/dist/esm/ch-alert_8.entry.js.map +1 -1
  93. package/dist/esm/ch-checkbox.entry.js +1 -1
  94. package/dist/esm/ch-divider.entry.js +1 -1
  95. package/dist/esm/ch-drawer.entry.js +151 -0
  96. package/dist/esm/ch-drawer.entry.js.map +1 -0
  97. package/dist/esm/ch-emoji.entry.js +1 -1
  98. package/dist/esm/ch-modal.entry.js +4 -23
  99. package/dist/esm/ch-modal.entry.js.map +1 -1
  100. package/dist/esm/ch-radio.entry.js +1 -1
  101. package/dist/esm/ch-segmented-control.entry.js +110 -0
  102. package/dist/esm/ch-segmented-control.entry.js.map +1 -0
  103. package/dist/esm/ch-tabs.entry.js +1 -1
  104. package/dist/esm/ch-textarea.entry.js +1 -1
  105. package/dist/esm/ch-tooltip.entry.js +1 -1
  106. package/dist/esm/chucao.js +1 -1
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/esm/scroll-lock-d8DfpzMR.js +46 -0
  109. package/dist/esm/scroll-lock-d8DfpzMR.js.map +1 -0
  110. package/dist/types/components/ch-button/ch-button.d.ts +29 -5
  111. package/dist/types/components/ch-drawer/ch-drawer.d.ts +68 -0
  112. package/dist/types/components/ch-segmented-control/ch-segmented-control.d.ts +72 -0
  113. package/dist/types/components.d.ts +333 -6
  114. package/dist/types/utils/scroll-lock.d.ts +17 -0
  115. package/dist-react/components.d.ts +12 -1
  116. package/dist-react/components.js +21 -0
  117. package/dist-react/components.ts +31 -1
  118. package/dist-vue/index.d.ts +2 -0
  119. package/dist-vue/index.js +29 -0
  120. package/dist-vue/index.ts +33 -0
  121. package/hydrate/index.js +418 -41
  122. package/hydrate/index.mjs +418 -41
  123. package/package.json +4 -3
  124. package/dist/chucao/p-11083711.entry.js +0 -2
  125. package/dist/chucao/p-11083711.entry.js.map +0 -1
  126. package/dist/chucao/p-2ab4a6a8.entry.js +0 -2
  127. package/dist/chucao/p-a955eebf.entry.js +0 -2
  128. package/dist/chucao/p-a955eebf.entry.js.map +0 -1
  129. /package/dist/chucao/{p-d5a9e340.entry.js.map → p-077dc2a6.entry.js.map} +0 -0
  130. /package/dist/chucao/{p-4bc8e098.entry.js.map → p-079c2017.entry.js.map} +0 -0
  131. /package/dist/chucao/{p-121fbfc8.entry.js.map → p-5ae89a19.entry.js.map} +0 -0
  132. /package/dist/chucao/{p-5fe8bfff.entry.js.map → p-9c072600.entry.js.map} +0 -0
  133. /package/dist/chucao/{p-2ab4a6a8.entry.js.map → p-bb2445d1.entry.js.map} +0 -0
  134. /package/dist/chucao/{p-9bb81a65.entry.js.map → p-c986036f.entry.js.map} +0 -0
  135. /package/dist/chucao/{p-1b1e56cd.entry.js.map → p-e3265e38.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"ch-alert_8.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,MAAM,CAAC,m2CAAm2C,CAAC;;MCkBj3C,OAAO,GAAA,MAAA;;;;;AAClB;;;;AAIG;IACK,OAAO,GAAmB,SAAS;AAE3C;;;;AAIG;AACK,IAAA,YAAY;AAEpB;;;;;AAKG;AACM,IAAA,SAAS;IAEV,aAAa,GAAG,MAAK;AAC3B,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;AACvB,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,OAAO,GAAG,QAAQ;AAE5D,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAIH,CAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA,OAAA,EAAU,IAAI,CAAC,OAAO,CAAA,CAAE,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAA,EAClF,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACL,IAAI,CAAC,YAAY,KAChB,+DAAQ,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,QAAQ,EAAA,YAAA,EAAa,IAAI,CAAC,Y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-alert/ch-alert.css?tag=ch-alert&encapsulation=shadow","src/components/ch-alert/ch-alert.tsx","src/components/ch-badge/ch-badge.css?tag=ch-badge&encapsulation=shadow","src/components/ch-badge/ch-badge.tsx","src/components/ch-button/ch-button.css?tag=ch-button&encapsulation=shadow","src/components/ch-button/ch-button.tsx","src/components/ch-card/ch-card.css?tag=ch-card&encapsulation=shadow","src/components/ch-card/ch-card.tsx","src/components/ch-input/ch-input.css?tag=ch-input&encapsulation=shadow","src/components/ch-input/ch-input.tsx","src/components/ch-select/ch-select.css?tag=ch-select&encapsulation=shadow","src/components/ch-select/ch-select.tsx","src/components/ch-spinner/ch-spinner.css?tag=ch-spinner&encapsulation=shadow","src/components/ch-spinner/ch-spinner.tsx","src/components/ch-switch/ch-switch.css?tag=ch-switch&encapsulation=shadow","src/components/ch-switch/ch-switch.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.alert {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-2xl);\n padding: var(--spacing-2xl) var(--spacing-3xl);\n border: var(--border-width) solid transparent;\n border-radius: var(--radius);\n font-size: var(--typography-size-sm);\n line-height: 1.5;\n}\n\n.alert-content {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.alert--default {\n color: var(--text);\n background: var(--surface);\n border-color: var(--border);\n}\n\n.alert--positive {\n color: var(--color-status-positive);\n background: var(--color-status-positive-background);\n border-color: var(--color-status-positive);\n}\n\n.alert--warning {\n color: var(--color-status-warning);\n background: var(--color-status-warning-background);\n border-color: var(--color-status-warning);\n}\n\n.alert-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: inherit;\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.alert-dismiss:hover {\n background: var(--surface-hover);\n}\n\n.alert-dismiss:focus-visible {\n outline: var(--focus-outline-width) solid currentColor;\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .alert-dismiss {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .alert-dismiss {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChAlertVariant = 'default' | 'positive' | 'warning';\n\n/**\n * Block-level status message.\n *\n * `warning` carries `role=\"alert\"` and is announced assertively; `default` and\n * `positive` use `role=\"status\"`, since a confirmation is not urgent enough to\n * interrupt. Both announce reliably when the alert is added to the page in\n * response to something — an alert already present at load may not be read out,\n * which is how live regions work rather than something this component controls.\n */\n@Component({\n tag: 'ch-alert',\n styleUrl: 'ch-alert.css',\n shadow: true,\n})\nexport class ChAlert {\n /**\n * The kind of message. `default` is neutral, `positive` confirms, and\n * `warning` covers both warnings and errors — the token scale has a single\n * status colour for the two of them.\n */\n @Prop() variant: ChAlertVariant = 'default';\n\n /**\n * Accessible label for the dismiss button, set as `aria-label`. Setting it\n * is what adds the button: the button's only content is a decorative glyph,\n * so without a label it would have no accessible name at all.\n */\n @Prop() dismissLabel?: string;\n\n /**\n * Emitted when the dismiss button is clicked. The alert stays in the DOM —\n * whether to remove it is the consumer's decision. If you do remove it, move\n * focus somewhere sensible first: removing the focused button drops focus to\n * `<body>`.\n */\n @Event() chDismiss: EventEmitter<void>;\n\n private handleDismiss = () => {\n this.chDismiss.emit();\n };\n\n render() {\n const role = this.variant === 'warning' ? 'alert' : 'status';\n\n return (\n <Host>\n {/* Keyed on the role so a variant change replaces the node instead of\n mutating its role in place, which assistive technology does not\n reliably re-announce. */}\n <div key={role} class={{ alert: true, [`alert--${this.variant}`]: true }} role={role}>\n <div class=\"alert-content\">\n <slot></slot>\n </div>\n {this.dismissLabel && (\n <button class=\"alert-dismiss\" type=\"button\" aria-label={this.dismissLabel} onClick={this.handleDismiss}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.badge {\n display: inline-block;\n padding: var(--spacing-2xs) var(--spacing-lg);\n border-radius: var(--radius-pill);\n font-size: var(--typography-size-xs);\n font-weight: var(--typography-weight-semibold);\n text-transform: uppercase;\n letter-spacing: var(--typography-tracking-badge);\n}\n\n.badge--default {\n background: var(--color-surface-hover);\n color: var(--accent);\n}\n\n.badge--positive {\n background: var(--color-status-positive-background);\n color: var(--color-status-positive);\n}\n.badge--warning {\n background: var(--color-status-warning-background);\n color: var(--color-status-warning);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChBadgeVariant = 'default' | 'positive' | 'warning';\n\n@Component({\n tag: 'ch-badge',\n styleUrl: 'ch-badge.css',\n shadow: true,\n})\nexport class ChBadge {\n /**\n * The visual style of the badge. Either `default`, `positive`, or `warning`.\n */\n @Prop() variant: ChBadgeVariant = 'default';\n\n render() {\n return (\n <Host>\n <span class={{ badge: true, [`badge--${this.variant}`]: true }}>\n <slot></slot>\n </span>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.btn {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-sm);\n border: none;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n}\n\n.btn:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.btn:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n.btn--primary {\n background-color: var(--accent);\n color: var(--color-accent-text);\n font-weight: var(--typography-weight-bold);\n padding: var(--spacing-xs) var(--spacing-xl);\n border-radius: var(--radius-pill);\n transition:\n background-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default);\n}\n\n.btn--primary:hover {\n background-color: var(--accent-hover);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n\n.btn--secondary {\n background-color: transparent;\n color: var(--text);\n font-weight: var(--typography-weight-bold);\n padding: var(--spacing-xs) var(--spacing-xl);\n border-radius: var(--radius-pill);\n border: var(--border-width) solid var(--border);\n transition:\n border-color var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default);\n}\n\n.btn--secondary:hover {\n border-color: var(--border-hover);\n background-color: var(--surface-hover);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChButtonVariant = 'primary' | 'secondary';\n\n@Component({\n tag: 'ch-button',\n styleUrl: 'ch-button.css',\n shadow: true,\n})\nexport class ChButton {\n /**\n * The visual style of the button. Either `primary` or `secondary`.\n */\n @Prop() variant: ChButtonVariant = 'primary';\n\n /**\n * Whether the button is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Accessible label set as `aria-label` on the native `<button>`. Use it\n * when the button's content doesn't convey its purpose on its own (e.g.\n * an icon-only button).\n */\n @Prop() label?: string;\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() chClick: EventEmitter<MouseEvent>;\n\n private handleClick = (ev: MouseEvent) => {\n this.chClick.emit(ev);\n };\n\n render() {\n return (\n <Host>\n <button class={{ btn: true, [`btn--${this.variant}`]: true }} type=\"button\" disabled={this.disabled} aria-label={this.label} onClick={this.handleClick}>\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n}\n\n::slotted(p) {\n color: var(--text-muted);\n}\n\n.card {\n color: var(--text);\n background: var(--surface);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n padding: var(--spacing-4xl) var(--spacing-5xl);\n backdrop-filter: blur(var(--effect-blur));\n position: relative;\n overflow: hidden;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.card::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: var(--border-accent-bar);\n background: var(--accent);\n opacity: 0;\n transition: opacity var(--duration-normal) var(--easing-default);\n}\n\n.card:hover {\n border-color: var(--border-hover);\n transform: translateX(var(--spacing-shift));\n box-shadow: var(--shadow-card-hover);\n}\n\n.card:hover::before {\n opacity: 1;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'ch-card',\n styleUrl: 'ch-card.css',\n shadow: true,\n})\nexport class ChCard {\n render() {\n return (\n <Host>\n <div class=\"card\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--text);\n}\n\n.input {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border-radius: var(--radius);\n border: var(--border-width) solid var(--border);\n background: var(--surface);\n color: var(--text);\n backdrop-filter: blur(var(--effect-blur));\n font-family: inherit;\n font-size: inherit;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.input::placeholder {\n color: var(--text-muted);\n}\n\n.input:focus {\n border-color: var(--accent);\n box-shadow: var(--shadow-focus-ring);\n outline: none;\n}\n\n.input--invalid {\n border-color: var(--color-status-warning);\n}\n\n.input--invalid:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n:host([data-touched]:invalid) .input,\n:host(:user-invalid) .input {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .input:focus,\n:host(:user-invalid) .input:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n.input:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'ch-input',\n styleUrl: 'ch-input.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChInput {\n private readonly inputId = `ch-input-${++inputIds}`;\n private readonly hintId = `${this.inputId}-hint`;\n private readonly errorId = `${this.inputId}-error`;\n private initialValue = '';\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /**\n * Visible label rendered above the input and associated with it via\n * `for`/`id`, so assistive technology announces the input's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The type of the input, mirroring the native `<input type>` attribute.\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value = '';\n\n /**\n * Placeholder text shown when the input is empty.\n */\n @Prop() placeholder?: string;\n\n /**\n * The name of the input, submitted with form data.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Whether the input is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether the input is required.\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * Helper text rendered below the input, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the input is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the input when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the input is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted on every keystroke, with the current input value.\n */\n @Event() chInput: EventEmitter<string>;\n\n /**\n * Emitted when the input value is committed (on native `change`).\n */\n @Event() chChange: EventEmitter<string>;\n\n private handleInput = (ev: InputEvent) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.chInput.emit(this.value);\n };\n\n private handleChange = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.chChange.emit(this.value);\n };\n\n @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.value);\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && this.value === '') {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialValue = this.value;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.value = this.initialValue;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n </label>\n )}\n <input\n id={this.label ? this.inputId : undefined}\n class={{ 'input': true, 'input--invalid': this.invalid }}\n type={this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n value={this.value}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onInput={this.handleInput}\n onChange={this.handleChange}\n />\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--text);\n}\n\n.select {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border-radius: var(--radius);\n border: var(--border-width) solid var(--border);\n background: var(--surface);\n color: var(--text);\n backdrop-filter: blur(var(--effect-blur));\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.select:focus {\n border-color: var(--accent);\n box-shadow: var(--shadow-focus-ring);\n outline: none;\n}\n\n.select--invalid {\n border-color: var(--color-status-warning);\n}\n\n.select--invalid:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n:host([data-touched]:invalid) .select,\n:host(:user-invalid) .select {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .select:focus,\n:host(:user-invalid) .select:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n.select:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.select option {\n background: var(--bg);\n color: var(--text);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nexport interface ChSelectOption {\n label: string;\n value: string;\n disabled?: boolean;\n}\n\nlet selectIds = 0;\n\n@Component({\n tag: 'ch-select',\n styleUrl: 'ch-select.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChSelect {\n private readonly selectId = `ch-select-${++selectIds}`;\n private readonly hintId = `${this.selectId}-hint`;\n private readonly errorId = `${this.selectId}-error`;\n private initialValue: string | undefined;\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /**\n * Visible label rendered above the select and associated with it via\n * `for`/`id`, so assistive technology announces the select's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The list of options rendered inside the select.\n */\n @Prop() options: ChSelectOption[] = [];\n\n /**\n * The value of the selected option.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Placeholder shown as a disabled, hidden first option when no value is selected.\n */\n @Prop() placeholder?: string;\n\n /**\n * The name of the select, submitted with form data.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Whether the select is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether a value is required.\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * Helper text rendered below the select, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the select is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the select when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the select is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted when the selected option changes, with the new value.\n */\n @Event() chChange: EventEmitter<string>;\n\n private handleChange = (ev: Event) => {\n this.value = (ev.target as HTMLSelectElement).value;\n this.chChange.emit(this.value);\n };\n\n @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.value ?? '');\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && !this.value) {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialValue = this.value;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.value = this.initialValue;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.selectId}>\n {this.label}\n </label>\n )}\n <select\n id={this.label ? this.selectId : undefined}\n class={{ 'select': true, 'select--invalid': this.invalid }}\n name={this.name}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onChange={this.handleChange}\n >\n {this.placeholder && (\n <option value=\"\" disabled hidden selected={!this.value}>\n {this.placeholder}\n </option>\n )}\n {this.options.map(option => (\n <option value={option.value} disabled={option.disabled} selected={option.value === this.value}>\n {option.label}\n </option>\n ))}\n </select>\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n vertical-align: middle;\n}\n\n.spinner {\n display: block;\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n border: 0.125em solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n animation: ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite;\n}\n\n.spinner--sm {\n font-size: var(--typography-size-sm);\n}\n\n.spinner--md {\n font-size: var(--typography-size-lg);\n}\n\n.spinner--lg {\n font-size: var(--typography-size-xl);\n}\n\n@keyframes ch-spinner-rotate {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinner {\n animation-duration: calc(var(--duration-spin) * 4);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChSpinnerSize = 'sm' | 'md' | 'lg';\n\n/**\n * Loading indicator.\n *\n * The spinner is drawn in `currentColor`, so it takes the surrounding text\n * colour and stays legible on any surface — inside a primary `ch-button` it\n * picks up the button's own text colour instead of the accent, which would be\n * invisible there. Set `color` on or above the element to change it.\n */\n@Component({\n tag: 'ch-spinner',\n styleUrl: 'ch-spinner.css',\n shadow: true,\n})\nexport class ChSpinner {\n /**\n * The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a\n * font-size and the spinner is drawn in `em`, so it also scales with an\n * inherited font-size.\n */\n @Prop() size: ChSpinnerSize = 'md';\n\n /**\n * Accessible label announced while the spinner is visible, e.g. `Cargando\n * resultados`. When omitted the spinner is treated as decorative and hidden\n * from assistive technology — the right behaviour next to visible loading\n * text, which would otherwise be announced twice.\n */\n @Prop() label?: string;\n\n render() {\n const labelled = Boolean(this.label);\n\n return (\n <Host>\n <span\n class={{ spinner: true, [`spinner--${this.size}`]: true }}\n role={labelled ? 'status' : undefined}\n aria-label={labelled ? this.label : undefined}\n aria-hidden={labelled ? undefined : 'true'}\n ></span>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.control {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-lg);\n cursor: pointer;\n}\n\n.control--disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.input:focus-visible ~ .track {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n.track {\n position: relative;\n box-sizing: border-box;\n width: var(--spacing-6xl);\n height: var(--spacing-5xl);\n flex-shrink: 0;\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-pill);\n background: var(--surface);\n transition:\n border-color var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default);\n}\n\n.thumb {\n position: absolute;\n top: 50%;\n left: var(--spacing-2xs);\n width: var(--spacing-2xl);\n height: var(--spacing-2xl);\n border-radius: 50%;\n background: var(--text-muted);\n transform: translateY(-50%);\n transition:\n left var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default);\n}\n\n.input:checked ~ .track {\n border-color: var(--accent);\n background: var(--accent);\n}\n\n.input:checked ~ .track .thumb {\n left: calc(100% - var(--spacing-2xl) - var(--spacing-2xs));\n background: var(--color-accent-text);\n}\n\n.input--invalid ~ .track {\n border-color: var(--color-status-warning);\n}\n\n.input--invalid:focus-visible ~ .track {\n outline-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .track,\n:host(:user-invalid) .track {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .input:focus-visible ~ .track,\n:host(:user-invalid) .input:focus-visible ~ .track {\n outline-color: var(--color-status-warning);\n}\n\n.label-text {\n color: var(--text);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nlet switchIds = 0;\n\n@Component({\n tag: 'ch-switch',\n styleUrl: 'ch-switch.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChSwitch {\n private readonly switchId = `ch-switch-${++switchIds}`;\n private readonly hintId = `${this.switchId}-hint`;\n private readonly errorId = `${this.switchId}-error`;\n private initialChecked = false;\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /**\n * Visible label rendered next to the switch, associated with it via\n * `for`/`id`, so assistive technology announces the switch's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The name of the switch, submitted with form data.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The value of the switch, submitted with form data.\n */\n @Prop() value = 'on';\n\n /**\n * Whether the switch is on.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Whether the switch is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether the switch is required.\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * Helper text rendered below the switch, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the switch is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the switch when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the switch is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted when the switch is toggled, with the new on/off state.\n */\n @Event() chChange: EventEmitter<boolean>;\n\n private handleChange = (ev: Event) => {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.chChange.emit(this.checked);\n };\n\n @Watch('checked')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.checked ? this.value : null);\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && !this.checked) {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialChecked = this.checked;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.checked = this.initialChecked;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n <label class={{ 'control': true, 'control--disabled': this.disabled || this.formDisabled }} htmlFor={this.switchId}>\n <input\n id={this.switchId}\n class={{ 'input': true, 'input--invalid': this.invalid }}\n type=\"checkbox\"\n role=\"switch\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onChange={this.handleChange}\n />\n <span class=\"track\">\n <span class=\"thumb\"></span>\n </span>\n {this.label && <span class=\"label-text\">{this.label}</span>}\n </label>\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ch-alert_8.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,MAAM,CAAC,m2CAAm2C,CAAC;;MCkBj3C,OAAO,GAAA,MAAA;;;;;AAClB;;;;AAIG;IACK,OAAO,GAAmB,SAAS;AAE3C;;;;AAIG;AACK,IAAA,YAAY;AAEpB;;;;;AAKG;AACM,IAAA,SAAS;IAEV,aAAa,GAAG,MAAK;AAC3B,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;AACvB,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,OAAO,GAAG,QAAQ;AAE5D,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAIH,CAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA,OAAA,EAAU,IAAI,CAAC,OAAO,CAAA,CAAE,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAA,EAClF,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACL,IAAI,C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AY,CAAC,KAChD,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,MAAM,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAA,EAC5B,IAAI,CAAC,IAAI,CACR,CACL,EACA,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,KAChC,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,OAAO,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAC,OAAO,EAAA,EAC5C,IAAI,CAAC,YAAY,CAChB,CACL,CACI;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ch-alert/ch-alert.css?tag=ch-alert&encapsulation=shadow","src/components/ch-alert/ch-alert.tsx","src/components/ch-badge/ch-badge.css?tag=ch-badge&encapsulation=shadow","src/components/ch-badge/ch-badge.tsx","src/components/ch-button/ch-button.css?tag=ch-button&encapsulation=shadow","src/components/ch-button/ch-button.tsx","src/components/ch-card/ch-card.css?tag=ch-card&encapsulation=shadow","src/components/ch-card/ch-card.tsx","src/components/ch-input/ch-input.css?tag=ch-input&encapsulation=shadow","src/components/ch-input/ch-input.tsx","src/components/ch-select/ch-select.css?tag=ch-select&encapsulation=shadow","src/components/ch-select/ch-select.tsx","src/components/ch-spinner/ch-spinner.css?tag=ch-spinner&encapsulation=shadow","src/components/ch-spinner/ch-spinner.tsx","src/components/ch-switch/ch-switch.css?tag=ch-switch&encapsulation=shadow","src/components/ch-switch/ch-switch.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.alert {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-2xl);\n padding: var(--spacing-2xl) var(--spacing-3xl);\n border: var(--border-width) solid transparent;\n border-radius: var(--radius);\n font-size: var(--typography-size-sm);\n line-height: 1.5;\n}\n\n.alert-content {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.alert--default {\n color: var(--text);\n background: var(--surface);\n border-color: var(--border);\n}\n\n.alert--positive {\n color: var(--color-status-positive);\n background: var(--color-status-positive-background);\n border-color: var(--color-status-positive);\n}\n\n.alert--warning {\n color: var(--color-status-warning);\n background: var(--color-status-warning-background);\n border-color: var(--color-status-warning);\n}\n\n.alert-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: inherit;\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.alert-dismiss:hover {\n background: var(--surface-hover);\n}\n\n.alert-dismiss:focus-visible {\n outline: var(--focus-outline-width) solid currentColor;\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .alert-dismiss {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .alert-dismiss {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChAlertVariant = 'default' | 'positive' | 'warning';\n\n/**\n * Block-level status message.\n *\n * `warning` carries `role=\"alert\"` and is announced assertively; `default` and\n * `positive` use `role=\"status\"`, since a confirmation is not urgent enough to\n * interrupt. Both announce reliably when the alert is added to the page in\n * response to something — an alert already present at load may not be read out,\n * which is how live regions work rather than something this component controls.\n */\n@Component({\n tag: 'ch-alert',\n styleUrl: 'ch-alert.css',\n shadow: true,\n})\nexport class ChAlert {\n /**\n * The kind of message. `default` is neutral, `positive` confirms, and\n * `warning` covers both warnings and errors — the token scale has a single\n * status colour for the two of them.\n */\n @Prop() variant: ChAlertVariant = 'default';\n\n /**\n * Accessible label for the dismiss button, set as `aria-label`. Setting it\n * is what adds the button: the button's only content is a decorative glyph,\n * so without a label it would have no accessible name at all.\n */\n @Prop() dismissLabel?: string;\n\n /**\n * Emitted when the dismiss button is clicked. The alert stays in the DOM —\n * whether to remove it is the consumer's decision. If you do remove it, move\n * focus somewhere sensible first: removing the focused button drops focus to\n * `<body>`.\n */\n @Event() chDismiss: EventEmitter<void>;\n\n private handleDismiss = () => {\n this.chDismiss.emit();\n };\n\n render() {\n const role = this.variant === 'warning' ? 'alert' : 'status';\n\n return (\n <Host>\n {/* Keyed on the role so a variant change replaces the node instead of\n mutating its role in place, which assistive technology does not\n reliably re-announce. */}\n <div key={role} class={{ alert: true, [`alert--${this.variant}`]: true }} role={role}>\n <div class=\"alert-content\">\n <slot></slot>\n </div>\n {this.dismissLabel && (\n <button class=\"alert-dismiss\" type=\"button\" aria-label={this.dismissLabel} onClick={this.handleDismiss}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.badge {\n display: inline-block;\n padding: var(--spacing-2xs) var(--spacing-lg);\n border-radius: var(--radius-pill);\n font-size: var(--typography-size-xs);\n font-weight: var(--typography-weight-semibold);\n text-transform: uppercase;\n letter-spacing: var(--typography-tracking-badge);\n}\n\n.badge--default {\n background: var(--color-surface-hover);\n color: var(--accent);\n}\n\n.badge--positive {\n background: var(--color-status-positive-background);\n color: var(--color-status-positive);\n}\n.badge--warning {\n background: var(--color-status-warning-background);\n color: var(--color-status-warning);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChBadgeVariant = 'default' | 'positive' | 'warning';\n\n@Component({\n tag: 'ch-badge',\n styleUrl: 'ch-badge.css',\n shadow: true,\n})\nexport class ChBadge {\n /**\n * The visual style of the badge. Either `default`, `positive`, or `warning`.\n */\n @Prop() variant: ChBadgeVariant = 'default';\n\n render() {\n return (\n <Host>\n <span class={{ badge: true, [`badge--${this.variant}`]: true }}>\n <slot></slot>\n </span>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-sm);\n box-sizing: border-box;\n border: var(--border-width) solid transparent;\n border-radius: var(--radius-pill);\n cursor: pointer;\n font-family: inherit;\n font-weight: var(--typography-weight-bold);\n text-decoration: none;\n line-height: 1.2;\n transition:\n background-color var(--duration-normal) var(--easing-default),\n border-color var(--duration-normal) var(--easing-default),\n color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default);\n}\n\n.btn--sm {\n padding: var(--spacing-2xs) var(--spacing-lg);\n font-size: var(--typography-size-sm);\n}\n\n.btn--md {\n padding: var(--spacing-xs) var(--spacing-xl);\n font-size: inherit;\n}\n\n.btn--lg {\n padding: var(--spacing-sm) var(--spacing-2xl);\n font-size: var(--typography-size-lg);\n}\n\n.btn:disabled,\n.btn--disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.btn--loading:disabled,\n.btn--loading.btn--disabled {\n opacity: 1;\n cursor: progress;\n}\n\n.btn:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n.btn--primary {\n background-color: var(--accent);\n color: var(--color-accent-text);\n}\n\n.btn--primary:hover:not(:disabled) {\n background-color: var(--accent-hover);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n\n.btn--secondary {\n background-color: transparent;\n color: var(--text);\n border-color: var(--border);\n}\n\n.btn--secondary:hover:not(:disabled) {\n border-color: var(--border-hover);\n background-color: var(--surface-hover);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n\n.btn--ghost {\n background-color: transparent;\n color: var(--text);\n}\n\n.btn--ghost:hover:not(:disabled) {\n background-color: var(--surface-hover);\n}\n\n.btn--danger {\n background-color: var(--color-status-warning);\n color: var(--bg);\n}\n\n.btn--danger:hover:not(:disabled) {\n filter: brightness(0.92);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type ChButtonSize = 'sm' | 'md' | 'lg';\n\n@Component({\n tag: 'ch-button',\n styleUrl: 'ch-button.css',\n shadow: true,\n})\nexport class ChButton {\n /**\n * The visual style of the button. One of `primary`, `secondary`, `ghost`,\n * or `danger`.\n */\n @Prop() variant: ChButtonVariant = 'primary';\n\n /**\n * The size of the button. One of `sm`, `md`, or `lg`.\n */\n @Prop() size: ChButtonSize = 'md';\n\n /**\n * Whether the button is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Whether the button is loading. Shows a spinner, disables interaction, and\n * announces the busy state with `aria-busy`.\n */\n @Prop() loading = false;\n\n /**\n * When set, the button renders as an `<a>` pointing to this URL while\n * keeping the button styling.\n */\n @Prop() href?: string;\n\n /**\n * The browsing context the link opens in (e.g. `_blank`). Only used when\n * `href` is set. For `_blank`, a `noopener noreferrer` `rel` is added\n * automatically.\n */\n @Prop() target?: string;\n\n /**\n * Accessible label set as `aria-label` on the native element. Use it when\n * the button's content doesn't convey its purpose on its own (e.g. an\n * icon-only button).\n */\n @Prop() label?: string;\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() chClick: EventEmitter<MouseEvent>;\n\n private handleClick = (ev: MouseEvent) => {\n if (this.disabled || this.loading) {\n ev.preventDefault();\n return;\n }\n this.chClick.emit(ev);\n };\n\n private get spinnerSize() {\n return this.size === 'lg' ? 'md' : 'sm';\n }\n\n private renderContent() {\n return [this.loading ? <ch-spinner size={this.spinnerSize}></ch-spinner> : <slot name=\"start\"></slot>, <slot></slot>, <slot name=\"end\"></slot>];\n }\n\n render() {\n const classes = {\n 'btn': true,\n [`btn--${this.variant}`]: true,\n [`btn--${this.size}`]: true,\n 'btn--loading': this.loading,\n };\n\n if (this.href && !this.disabled && !this.loading) {\n return (\n <Host>\n <a\n class={classes}\n href={this.href}\n target={this.target}\n rel={this.target === '_blank' ? 'noopener noreferrer' : undefined}\n aria-label={this.label}\n onClick={this.handleClick}\n >\n {this.renderContent()}\n </a>\n </Host>\n );\n }\n\n if (this.href) {\n return (\n <Host>\n <span class={{ ...classes, 'btn--disabled': true }} aria-label={this.label} aria-disabled=\"true\" aria-busy={this.loading ? 'true' : undefined}>\n {this.renderContent()}\n </span>\n </Host>\n );\n }\n\n return (\n <Host>\n <button\n class={classes}\n type=\"button\"\n disabled={this.disabled || this.loading}\n aria-label={this.label}\n aria-busy={this.loading ? 'true' : undefined}\n onClick={this.handleClick}\n >\n {this.renderContent()}\n </button>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n}\n\n::slotted(p) {\n color: var(--text-muted);\n}\n\n.card {\n color: var(--text);\n background: var(--surface);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n padding: var(--spacing-4xl) var(--spacing-5xl);\n backdrop-filter: blur(var(--effect-blur));\n position: relative;\n overflow: hidden;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.card::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: var(--border-accent-bar);\n background: var(--accent);\n opacity: 0;\n transition: opacity var(--duration-normal) var(--easing-default);\n}\n\n.card:hover {\n border-color: var(--border-hover);\n transform: translateX(var(--spacing-shift));\n box-shadow: var(--shadow-card-hover);\n}\n\n.card:hover::before {\n opacity: 1;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'ch-card',\n styleUrl: 'ch-card.css',\n shadow: true,\n})\nexport class ChCard {\n render() {\n return (\n <Host>\n <div class=\"card\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--text);\n}\n\n.input {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border-radius: var(--radius);\n border: var(--border-width) solid var(--border);\n background: var(--surface);\n color: var(--text);\n backdrop-filter: blur(var(--effect-blur));\n font-family: inherit;\n font-size: inherit;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.input::placeholder {\n color: var(--text-muted);\n}\n\n.input:focus {\n border-color: var(--accent);\n box-shadow: var(--shadow-focus-ring);\n outline: none;\n}\n\n.input--invalid {\n border-color: var(--color-status-warning);\n}\n\n.input--invalid:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n:host([data-touched]:invalid) .input,\n:host(:user-invalid) .input {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .input:focus,\n:host(:user-invalid) .input:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n.input:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'ch-input',\n styleUrl: 'ch-input.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChInput {\n private readonly inputId = `ch-input-${++inputIds}`;\n private readonly hintId = `${this.inputId}-hint`;\n private readonly errorId = `${this.inputId}-error`;\n private initialValue = '';\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /**\n * Visible label rendered above the input and associated with it via\n * `for`/`id`, so assistive technology announces the input's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The type of the input, mirroring the native `<input type>` attribute.\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value = '';\n\n /**\n * Placeholder text shown when the input is empty.\n */\n @Prop() placeholder?: string;\n\n /**\n * The name of the input, submitted with form data.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Whether the input is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether the input is required.\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * Helper text rendered below the input, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the input is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the input when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the input is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted on every keystroke, with the current input value.\n */\n @Event() chInput: EventEmitter<string>;\n\n /**\n * Emitted when the input value is committed (on native `change`).\n */\n @Event() chChange: EventEmitter<string>;\n\n private handleInput = (ev: InputEvent) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.chInput.emit(this.value);\n };\n\n private handleChange = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.chChange.emit(this.value);\n };\n\n @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.value);\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && this.value === '') {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialValue = this.value;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.value = this.initialValue;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n </label>\n )}\n <input\n id={this.label ? this.inputId : undefined}\n class={{ 'input': true, 'input--invalid': this.invalid }}\n type={this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n value={this.value}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onInput={this.handleInput}\n onChange={this.handleChange}\n />\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--text);\n}\n\n.select {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border-radius: var(--radius);\n border: var(--border-width) solid var(--border);\n background: var(--surface);\n color: var(--text);\n backdrop-filter: blur(var(--effect-blur));\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.select:focus {\n border-color: var(--accent);\n box-shadow: var(--shadow-focus-ring);\n outline: none;\n}\n\n.select--invalid {\n border-color: var(--color-status-warning);\n}\n\n.select--invalid:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n:host([data-touched]:invalid) .select,\n:host(:user-invalid) .select {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .select:focus,\n:host(:user-invalid) .select:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n.select:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.select option {\n background: var(--bg);\n color: var(--text);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nexport interface ChSelectOption {\n label: string;\n value: string;\n disabled?: boolean;\n}\n\nlet selectIds = 0;\n\n@Component({\n tag: 'ch-select',\n styleUrl: 'ch-select.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChSelect {\n private readonly selectId = `ch-select-${++selectIds}`;\n private readonly hintId = `${this.selectId}-hint`;\n private readonly errorId = `${this.selectId}-error`;\n private initialValue: string | undefined;\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /**\n * Visible label rendered above the select and associated with it via\n * `for`/`id`, so assistive technology announces the select's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The list of options rendered inside the select.\n */\n @Prop() options: ChSelectOption[] = [];\n\n /**\n * The value of the selected option.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Placeholder shown as a disabled, hidden first option when no value is selected.\n */\n @Prop() placeholder?: string;\n\n /**\n * The name of the select, submitted with form data.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * Whether the select is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether a value is required.\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * Helper text rendered below the select, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the select is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the select when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the select is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted when the selected option changes, with the new value.\n */\n @Event() chChange: EventEmitter<string>;\n\n private handleChange = (ev: Event) => {\n this.value = (ev.target as HTMLSelectElement).value;\n this.chChange.emit(this.value);\n };\n\n @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.value ?? '');\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && !this.value) {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialValue = this.value;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.value = this.initialValue;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.selectId}>\n {this.label}\n </label>\n )}\n <select\n id={this.label ? this.selectId : undefined}\n class={{ 'select': true, 'select--invalid': this.invalid }}\n name={this.name}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onChange={this.handleChange}\n >\n {this.placeholder && (\n <option value=\"\" disabled hidden selected={!this.value}>\n {this.placeholder}\n </option>\n )}\n {this.options.map(option => (\n <option value={option.value} disabled={option.disabled} selected={option.value === this.value}>\n {option.label}\n </option>\n ))}\n </select>\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n vertical-align: middle;\n}\n\n.spinner {\n display: block;\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n border: 0.125em solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n animation: ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite;\n}\n\n.spinner--sm {\n font-size: var(--typography-size-sm);\n}\n\n.spinner--md {\n font-size: var(--typography-size-lg);\n}\n\n.spinner--lg {\n font-size: var(--typography-size-xl);\n}\n\n@keyframes ch-spinner-rotate {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinner {\n animation-duration: calc(var(--duration-spin) * 4);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChSpinnerSize = 'sm' | 'md' | 'lg';\n\n/**\n * Loading indicator.\n *\n * The spinner is drawn in `currentColor`, so it takes the surrounding text\n * colour and stays legible on any surface — inside a primary `ch-button` it\n * picks up the button's own text colour instead of the accent, which would be\n * invisible there. Set `color` on or above the element to change it.\n */\n@Component({\n tag: 'ch-spinner',\n styleUrl: 'ch-spinner.css',\n shadow: true,\n})\nexport class ChSpinner {\n /**\n * The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a\n * font-size and the spinner is drawn in `em`, so it also scales with an\n * inherited font-size.\n */\n @Prop() size: ChSpinnerSize = 'md';\n\n /**\n * Accessible label announced while the spinner is visible, e.g. `Cargando\n * resultados`. When omitted the spinner is treated as decorative and hidden\n * from assistive technology — the right behaviour next to visible loading\n * text, which would otherwise be announced twice.\n */\n @Prop() label?: string;\n\n render() {\n const labelled = Boolean(this.label);\n\n return (\n <Host>\n <span\n class={{ spinner: true, [`spinner--${this.size}`]: true }}\n role={labelled ? 'status' : undefined}\n aria-label={labelled ? this.label : undefined}\n aria-hidden={labelled ? undefined : 'true'}\n ></span>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.control {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-lg);\n cursor: pointer;\n}\n\n.control--disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.input:focus-visible ~ .track {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n.track {\n position: relative;\n box-sizing: border-box;\n width: var(--spacing-6xl);\n height: var(--spacing-5xl);\n flex-shrink: 0;\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-pill);\n background: var(--surface);\n transition:\n border-color var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default);\n}\n\n.thumb {\n position: absolute;\n top: 50%;\n left: var(--spacing-2xs);\n width: var(--spacing-2xl);\n height: var(--spacing-2xl);\n border-radius: 50%;\n background: var(--text-muted);\n transform: translateY(-50%);\n transition:\n left var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default);\n}\n\n.input:checked ~ .track {\n border-color: var(--accent);\n background: var(--accent);\n}\n\n.input:checked ~ .track .thumb {\n left: calc(100% - var(--spacing-2xl) - var(--spacing-2xs));\n background: var(--color-accent-text);\n}\n\n.input--invalid ~ .track {\n border-color: var(--color-status-warning);\n}\n\n.input--invalid:focus-visible ~ .track {\n outline-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .track,\n:host(:user-invalid) .track {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .input:focus-visible ~ .track,\n:host(:user-invalid) .input:focus-visible ~ .track {\n outline-color: var(--color-status-warning);\n}\n\n.label-text {\n color: var(--text);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nlet switchIds = 0;\n\n@Component({\n tag: 'ch-switch',\n styleUrl: 'ch-switch.css',\n shadow: true,\n formAssociated: true,\n})\nexport class ChSwitch {\n private readonly switchId = `ch-switch-${++switchIds}`;\n private readonly hintId = `${this.switchId}-hint`;\n private readonly errorId = `${this.switchId}-error`;\n private initialChecked = false;\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\n\n /**\n * Visible label rendered next to the switch, associated with it via\n * `for`/`id`, so assistive technology announces the switch's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The name of the switch, submitted with form data.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The value of the switch, submitted with form data.\n */\n @Prop() value = 'on';\n\n /**\n * Whether the switch is on.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Whether the switch is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether the switch is required.\n */\n @Prop({ reflect: true }) required = false;\n\n /**\n * Helper text rendered below the switch, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the switch is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the switch when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the switch is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted when the switch is toggled, with the new on/off state.\n */\n @Event() chChange: EventEmitter<boolean>;\n\n private handleChange = (ev: Event) => {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.chChange.emit(this.checked);\n };\n\n @Watch('checked')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.checked ? this.value : null);\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && !this.checked) {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialChecked = this.checked;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.checked = this.initialChecked;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\n }\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n <label class={{ 'control': true, 'control--disabled': this.disabled || this.formDisabled }} htmlFor={this.switchId}>\n <input\n id={this.switchId}\n class={{ 'input': true, 'input--invalid': this.invalid }}\n type=\"checkbox\"\n role=\"switch\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled || this.formDisabled}\n required={this.required}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onChange={this.handleChange}\n />\n <span class=\"track\">\n <span class=\"thumb\"></span>\n </span>\n {this.label && <span class=\"label-text\">{this.label}</span>}\n </label>\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -111,7 +111,7 @@ const ChCheckbox = class {
111
111
  return undefined;
112
112
  }
113
113
  render() {
114
- return (h(Host, { key: 'ad83b999d4dbafbd7b6f2369bae8fbce8e068cad' }, h("label", { key: 'e5927ad9d76db7cd9418debe8e635767b597e27a', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '93c49822bf5a470d67a7077354adcd9144643843', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: 'da90747e3339879a744569c98befed94507bebdd', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '3c10c9e29a943bc12983d4ef6b9fa00d95293c80', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '76e4a8debadd36dae475bd2439410c0f2a82cb62', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
114
+ return (h(Host, { key: '4011f5a338d2b006a0bfa8217d1ee9b01b987d7d' }, h("label", { key: '8c6c8d6c530d366b26f0cb602dc1e987ed8324d5', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: 'c1f58eeba34ae5d5371e863f349433852fc3c882', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '447812e11253c951cb6a5003adda13357fc6dec3', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '5369375f8dd0c2fa787207f8fcef4feeb78ddda6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'e90274e1df8d205053effe57ceb56f8e8b4deca2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
115
115
  }
116
116
  static get formAssociated() { return true; }
117
117
  static get watchers() { return {
@@ -11,7 +11,7 @@ const ChDivider = class {
11
11
  */
12
12
  orientation = 'horizontal';
13
13
  render() {
14
- return (h(Host, { key: '888debaaee690d5bbc5e276773f16ac7ead0129a', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: 'ae175f047605cfbe2b24d50e0dab56ac362c49a1', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
14
+ return (h(Host, { key: '26aa4586507d821e539adcf1e057467654c19491', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: '599b22093ffe91c87899d84ad8c63ab6279107cb', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
15
15
  }
16
16
  };
17
17
  ChDivider.style = chDividerCss();
@@ -0,0 +1,151 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-DWC12BJ-.js';
2
+ import { l as lockScroll, u as unlockScroll } from './scroll-lock-d8DfpzMR.js';
3
+
4
+ const chDrawerCss = () => `.drawer{position:fixed;inset:0;margin:0;box-sizing:border-box;flex-direction:column;gap:var(--spacing-2xl);width:min(24rem, 100vw);height:100vh;height:100dvh;max-width:100vw;max-height:100dvh;padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:0;background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md);overflow:hidden}.drawer[open]{display:flex}.drawer--start{inset:0 auto 0 0;border-inline-start:none;animation:drawer-in-start var(--duration-normal) var(--easing-default)}.drawer--end{inset:0 0 0 auto;border-inline-end:none;animation:drawer-in-end var(--duration-normal) var(--easing-default)}.drawer--top{inset:0 0 auto 0;width:100vw;height:auto;max-height:80dvh;border-block-start:none;animation:drawer-in-top var(--duration-normal) var(--easing-default)}.drawer--bottom{inset:auto 0 0 0;width:100vw;height:auto;max-height:80dvh;border-block-end:none;animation:drawer-in-bottom var(--duration-normal) var(--easing-default)}.drawer::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);flex:none}.drawer-body{flex:1;min-height:0;overflow-y:auto}::slotted([slot='footer']){display:flex;align-items:center;justify-content:flex-end;gap:var(--spacing-md);flex:none;padding-top:var(--spacing-2xl);border-top:var(--border-width) solid var(--border)}.drawer-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.drawer-close:hover{background:var(--surface-hover);color:var(--text)}.drawer-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@keyframes drawer-in-start{from{transform:translateX(-100%)}}@keyframes drawer-in-end{from{transform:translateX(100%)}}@keyframes drawer-in-top{from{transform:translateY(-100%)}}@keyframes drawer-in-bottom{from{transform:translateY(100%)}}@media (pointer: coarse){.drawer-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.drawer{animation:none}.drawer-close{transition:none}}`;
5
+
6
+ const ChDrawer = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.chOpen = createEvent(this, "chOpen");
10
+ this.chClose = createEvent(this, "chClose");
11
+ }
12
+ /**
13
+ * Whether the drawer is open. Kept in sync when the user closes it with
14
+ * `Escape`, the close button or a click outside.
15
+ */
16
+ open = false;
17
+ /**
18
+ * The edge the panel slides in from. `start`/`end` follow the writing
19
+ * direction, so `start` is the left edge in LTR and the right edge in RTL.
20
+ */
21
+ side = 'end';
22
+ /**
23
+ * Accessible name for the drawer, set as `aria-label`. A slotted heading
24
+ * cannot be referenced with `aria-labelledby` across the shadow boundary, so
25
+ * the name comes through this prop — and a modal dialog needs one, so pass
26
+ * the same text as the heading.
27
+ */
28
+ label;
29
+ /**
30
+ * Accessible label for the close button, set as `aria-label`. Setting it is
31
+ * what adds the button: its only content is a decorative glyph, so without a
32
+ * label it would have no accessible name.
33
+ */
34
+ closeLabel;
35
+ /**
36
+ * Emitted after the drawer opens.
37
+ */
38
+ chOpen;
39
+ /**
40
+ * Emitted after the drawer closes, however it was closed.
41
+ */
42
+ chClose;
43
+ dialog;
44
+ scrollLocked = false;
45
+ pointerDownedOutside = false;
46
+ componentDidLoad() {
47
+ // Wired here rather than in JSX because Stencil derives a listener's event
48
+ // name from whether `on<name>` exists on `window`, which differs between
49
+ // the browser and the test environment for pointer events.
50
+ this.dialog?.addEventListener('close', this.handleNativeClose);
51
+ this.dialog?.addEventListener('pointerdown', this.handlePointerDown);
52
+ this.dialog?.addEventListener('click', this.handleClick);
53
+ if (this.open) {
54
+ this.showDialog();
55
+ }
56
+ }
57
+ disconnectedCallback() {
58
+ this.dialog?.removeEventListener('close', this.handleNativeClose);
59
+ this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);
60
+ this.dialog?.removeEventListener('click', this.handleClick);
61
+ this.unlockScroll();
62
+ }
63
+ handleOpenChange(open) {
64
+ if (open) {
65
+ this.showDialog();
66
+ }
67
+ else {
68
+ this.closeDialog();
69
+ }
70
+ }
71
+ showDialog() {
72
+ if (typeof this.dialog?.showModal !== 'function') {
73
+ return;
74
+ }
75
+ this.lockScroll();
76
+ this.dialog.showModal();
77
+ this.chOpen.emit();
78
+ }
79
+ closeDialog() {
80
+ if (typeof this.dialog?.close === 'function' && this.dialog.open) {
81
+ this.dialog.close();
82
+ }
83
+ }
84
+ lockScroll() {
85
+ if (this.scrollLocked) {
86
+ return;
87
+ }
88
+ this.scrollLocked = true;
89
+ lockScroll();
90
+ }
91
+ unlockScroll() {
92
+ if (!this.scrollLocked) {
93
+ return;
94
+ }
95
+ this.scrollLocked = false;
96
+ unlockScroll();
97
+ }
98
+ /**
99
+ * True for a pointer event on the backdrop: the `<dialog>` is the event
100
+ * target for its own box only, and the coordinates fall outside that box.
101
+ */
102
+ isOnBackdrop(event) {
103
+ if (!this.dialog || event.target !== this.dialog) {
104
+ return false;
105
+ }
106
+ const box = this.dialog.getBoundingClientRect();
107
+ return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;
108
+ }
109
+ handlePointerDown = (event) => {
110
+ this.pointerDownedOutside = this.isOnBackdrop(event);
111
+ };
112
+ handleClick = (event) => {
113
+ // Requiring the press to have started on the backdrop too keeps a
114
+ // selection dragged out of the drawer, and a keyboard-synthesised click
115
+ // (which reports coordinates of 0), from closing it.
116
+ const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event);
117
+ this.pointerDownedOutside = false;
118
+ if (dismiss) {
119
+ this.closeDialog();
120
+ }
121
+ };
122
+ handleNativeClose = () => {
123
+ this.unlockScroll();
124
+ if (this.open) {
125
+ this.open = false;
126
+ }
127
+ this.chClose.emit();
128
+ };
129
+ handleCloseClick = () => {
130
+ if (typeof this.dialog?.close === 'function' && this.dialog.open) {
131
+ this.dialog.close();
132
+ return;
133
+ }
134
+ this.open = false;
135
+ this.chClose.emit();
136
+ };
137
+ render() {
138
+ return (h(Host, { key: '8ee0dd329f7304e3f4804c26c75514372d49b4b8' }, h("dialog", { key: '7f99c8edf6f820b595d4360ccc90123da37f9314', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '65c2a386b36305ece253fe644db2a198bc245d12', class: "drawer-head" }, h("slot", { key: '6c259b14a1fea3a38014c832d917554e3d431e18', name: "header" }), this.closeLabel && (h("button", { key: '4d259fbd9850ea4f379f07be50f863e896e67312', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'f1623602e84587020e77ec84c4b997c726414193', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'b239b7da3c9b00a6e80d33290d810297301206de', class: "drawer-body" }, h("slot", { key: 'c3739f84975fc5f4717986214217c23eacb4432f' })), h("slot", { key: '469be1ccedaf474fe40a9c2d264b6c128715cfc7', name: "footer" }))));
139
+ }
140
+ static get watchers() { return {
141
+ "open": [{
142
+ "handleOpenChange": 0
143
+ }]
144
+ }; }
145
+ };
146
+ ChDrawer.style = chDrawerCss();
147
+
148
+ export { ChDrawer as ch_drawer };
149
+ //# sourceMappingURL=ch-drawer.entry.js.map
150
+
151
+ //# sourceMappingURL=ch-drawer.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ch-drawer.entry.js","sources":["src/components/ch-drawer/ch-drawer.css?tag=ch-drawer&encapsulation=shadow","src/components/ch-drawer/ch-drawer.tsx"],"sourcesContent":[".drawer {\n position: fixed;\n inset: 0;\n margin: 0;\n box-sizing: border-box;\n flex-direction: column;\n gap: var(--spacing-2xl);\n width: min(24rem, 100vw);\n height: 100vh;\n height: 100dvh;\n max-width: 100vw;\n max-height: 100dvh;\n padding: var(--spacing-5xl);\n border: var(--border-width) solid var(--border);\n border-radius: 0;\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-md);\n overflow: hidden;\n}\n\n.drawer[open] {\n display: flex;\n}\n\n.drawer--start {\n inset: 0 auto 0 0;\n border-inline-start: none;\n animation: drawer-in-start var(--duration-normal) var(--easing-default);\n}\n\n.drawer--end {\n inset: 0 0 0 auto;\n border-inline-end: none;\n animation: drawer-in-end var(--duration-normal) var(--easing-default);\n}\n\n.drawer--top {\n inset: 0 0 auto 0;\n width: 100vw;\n height: auto;\n max-height: 80dvh;\n border-block-start: none;\n animation: drawer-in-top var(--duration-normal) var(--easing-default);\n}\n\n.drawer--bottom {\n inset: auto 0 0 0;\n width: 100vw;\n height: auto;\n max-height: 80dvh;\n border-block-end: none;\n animation: drawer-in-bottom var(--duration-normal) var(--easing-default);\n}\n\n.drawer::backdrop {\n background: var(--color-scrim-default);\n backdrop-filter: blur(var(--effect-blur));\n}\n\n.drawer-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--spacing-2xl);\n flex: none;\n}\n\n.drawer-body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n}\n\n::slotted([slot='footer']) {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: var(--spacing-md);\n flex: none;\n padding-top: var(--spacing-2xl);\n border-top: var(--border-width) solid var(--border);\n}\n\n.drawer-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: var(--text-muted);\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.drawer-close:hover {\n background: var(--surface-hover);\n color: var(--text);\n}\n\n.drawer-close:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n@keyframes drawer-in-start {\n from {\n transform: translateX(-100%);\n }\n}\n\n@keyframes drawer-in-end {\n from {\n transform: translateX(100%);\n }\n}\n\n@keyframes drawer-in-top {\n from {\n transform: translateY(-100%);\n }\n}\n\n@keyframes drawer-in-bottom {\n from {\n transform: translateY(100%);\n }\n}\n\n@media (pointer: coarse) {\n .drawer-close {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .drawer {\n animation: none;\n }\n\n .drawer-close {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\n\nimport { lockScroll as lockPageScroll, unlockScroll as unlockPageScroll } from '../../utils/scroll-lock';\n\nexport type ChDrawerSide = 'start' | 'end' | 'top' | 'bottom';\n\n/**\n * Sliding side panel for navigation, editing forms and quick detail views.\n *\n * Built on the native `<dialog>` element and opened with `showModal()`, exactly\n * like `ch-modal`, so the browser owns focus management, the inert background,\n * `Escape`, the top layer, `::backdrop`, and the implicit `dialog` role with\n * `aria-modal=\"true\"`. The only differences are placement — anchored to one\n * edge instead of centred — and the longer content it is meant for, which is\n * why it exposes `header` and `footer` slots around a scrollable body.\n *\n * Scroll locking is shared with `ch-modal` through `utils/scroll-lock`, so a\n * drawer and a modal opened together cannot unlock the page early.\n */\n@Component({\n tag: 'ch-drawer',\n styleUrl: 'ch-drawer.css',\n shadow: true,\n})\nexport class ChDrawer {\n /**\n * Whether the drawer is open. Kept in sync when the user closes it with\n * `Escape`, the close button or a click outside.\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * The edge the panel slides in from. `start`/`end` follow the writing\n * direction, so `start` is the left edge in LTR and the right edge in RTL.\n */\n @Prop() side: ChDrawerSide = 'end';\n\n /**\n * Accessible name for the drawer, set as `aria-label`. A slotted heading\n * cannot be referenced with `aria-labelledby` across the shadow boundary, so\n * the name comes through this prop — and a modal dialog needs one, so pass\n * the same text as the heading.\n */\n @Prop() label?: string;\n\n /**\n * Accessible label for the close button, set as `aria-label`. Setting it is\n * what adds the button: its only content is a decorative glyph, so without a\n * label it would have no accessible name.\n */\n @Prop() closeLabel?: string;\n\n /**\n * Emitted after the drawer opens.\n */\n @Event() chOpen: EventEmitter<void>;\n\n /**\n * Emitted after the drawer closes, however it was closed.\n */\n @Event() chClose: EventEmitter<void>;\n\n private dialog?: HTMLDialogElement;\n private scrollLocked = false;\n private pointerDownedOutside = false;\n\n componentDidLoad() {\n // Wired here rather than in JSX because Stencil derives a listener's event\n // name from whether `on<name>` exists on `window`, which differs between\n // the browser and the test environment for pointer events.\n this.dialog?.addEventListener('close', this.handleNativeClose);\n this.dialog?.addEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.addEventListener('click', this.handleClick);\n if (this.open) {\n this.showDialog();\n }\n }\n\n disconnectedCallback() {\n this.dialog?.removeEventListener('close', this.handleNativeClose);\n this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.removeEventListener('click', this.handleClick);\n this.unlockScroll();\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (open) {\n this.showDialog();\n } else {\n this.closeDialog();\n }\n }\n\n private showDialog() {\n if (typeof this.dialog?.showModal !== 'function') {\n return;\n }\n this.lockScroll();\n this.dialog.showModal();\n this.chOpen.emit();\n }\n\n private closeDialog() {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n }\n }\n\n private lockScroll() {\n if (this.scrollLocked) {\n return;\n }\n this.scrollLocked = true;\n lockPageScroll();\n }\n\n private unlockScroll() {\n if (!this.scrollLocked) {\n return;\n }\n this.scrollLocked = false;\n unlockPageScroll();\n }\n\n /**\n * True for a pointer event on the backdrop: the `<dialog>` is the event\n * target for its own box only, and the coordinates fall outside that box.\n */\n private isOnBackdrop(event: MouseEvent) {\n if (!this.dialog || event.target !== this.dialog) {\n return false;\n }\n const box = this.dialog.getBoundingClientRect();\n return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;\n }\n\n private handlePointerDown = (event: Event) => {\n this.pointerDownedOutside = this.isOnBackdrop(event as MouseEvent);\n };\n\n private handleClick = (event: Event) => {\n // Requiring the press to have started on the backdrop too keeps a\n // selection dragged out of the drawer, and a keyboard-synthesised click\n // (which reports coordinates of 0), from closing it.\n const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event as MouseEvent);\n this.pointerDownedOutside = false;\n if (dismiss) {\n this.closeDialog();\n }\n };\n\n private handleNativeClose = () => {\n this.unlockScroll();\n if (this.open) {\n this.open = false;\n }\n this.chClose.emit();\n };\n\n private handleCloseClick = () => {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n return;\n }\n this.open = false;\n this.chClose.emit();\n };\n\n render() {\n return (\n <Host>\n <dialog class={{ drawer: true, [`drawer--${this.side}`]: true }} aria-label={this.label} ref={el => (this.dialog = el as HTMLDialogElement)}>\n <div class=\"drawer-head\">\n <slot name=\"header\"></slot>\n {this.closeLabel && (\n <button class=\"drawer-close\" type=\"button\" aria-label={this.closeLabel} onClick={this.handleCloseClick}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n <div class=\"drawer-body\">\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n </dialog>\n </Host>\n );\n }\n}\n"],"names":["lockPageScroll","unlockPageScroll"],"mappings":";;;AAAA,MAAM,WAAW,GAAG,MAAM,CAAC,g6E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,EAAC,IAAI,EAAC,QAAQ,EAAA,YAAA,EAAa,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAA,EACpG,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAkB,MAAM,EAAA,EAAA,QAAA,CAAS,CAC1B,CACV,CACG,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,aAAa,EAAA,EACtB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACN,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,GAAQ,CACpB,CACJ;;;;;;;;;;;;"}
@@ -82,7 +82,7 @@ const ChEmoji = class {
82
82
  this.loaded = true;
83
83
  };
84
84
  render() {
85
- return (h(Host, { key: 'bfc646f047dae03aa8079825012305d7beb1fa6d' }, h("img", { key: 'c397cc1f928c6871df10adc1f43874738e1cbf33', class: {
85
+ return (h(Host, { key: '494b67e2300a9e1e9bb013aeefa6154cd26984ee' }, h("img", { key: 'f05cacf5cdfdf09ba21a5841a6571741aa86e8b5', class: {
86
86
  'emoji': true,
87
87
  [`emoji--${this.size}`]: true,
88
88
  'emoji--hidden': !this.loaded,
@@ -1,10 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-DWC12BJ-.js';
2
+ import { l as lockScroll, u as unlockScroll } from './scroll-lock-d8DfpzMR.js';
2
3
 
3
4
  const chModalCss = () => `.modal{box-sizing:border-box;max-width:min(32rem, calc(100vw - var(--spacing-6xl)));max-height:calc(100vh - var(--spacing-6xl));padding:var(--spacing-5xl);border:var(--border-width) solid var(--border);border-radius:var(--radius);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-md)}.modal::backdrop{background:var(--color-scrim-default);backdrop-filter:blur(var(--effect-blur))}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);margin-bottom:var(--spacing-2xl)}.modal-body{overflow-y:auto}.modal-close{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:var(--text-muted);cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.modal-close:hover{background:var(--surface-hover);color:var(--text)}.modal-close:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.modal-close{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.modal-close{transition:none}}`;
4
5
 
5
- let openModals = 0;
6
- let previousOverflow = '';
7
- let previousPaddingRight = '';
8
6
  const ChModal = class {
9
7
  constructor(hostRef) {
10
8
  registerInstance(this, hostRef);
@@ -83,31 +81,14 @@ const ChModal = class {
83
81
  return;
84
82
  }
85
83
  this.scrollLocked = true;
86
- openModals += 1;
87
- if (openModals > 1) {
88
- return;
89
- }
90
- const root = document.documentElement;
91
- const scrollbar = window.innerWidth - root.clientWidth;
92
- previousOverflow = root.style.overflow;
93
- previousPaddingRight = root.style.paddingRight;
94
- root.style.overflow = 'hidden';
95
- if (scrollbar > 0) {
96
- root.style.paddingRight = `${scrollbar}px`;
97
- }
84
+ lockScroll();
98
85
  }
99
86
  unlockScroll() {
100
87
  if (!this.scrollLocked) {
101
88
  return;
102
89
  }
103
90
  this.scrollLocked = false;
104
- openModals -= 1;
105
- if (openModals > 0) {
106
- return;
107
- }
108
- const root = document.documentElement;
109
- root.style.overflow = previousOverflow;
110
- root.style.paddingRight = previousPaddingRight;
91
+ unlockScroll();
111
92
  }
112
93
  /**
113
94
  * True for a pointer event on the backdrop: the `<dialog>` is the event
@@ -149,7 +130,7 @@ const ChModal = class {
149
130
  this.chClose.emit();
150
131
  };
151
132
  render() {
152
- return (h(Host, { key: '8f5f8c340291feb4385076bfdefc02a849e08efe' }, h("dialog", { key: 'e435367c1e3dc5c7e8102f6ac76792394f5097fa', class: "modal", "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '05a0d306dc7e3f917c47de28ed6359280c0472b8', class: "modal-head" }, h("slot", { key: '79e25ed41f98a5ceee2dca9afc200d8980d9f284', name: "heading" }), this.closeLabel && (h("button", { key: '0620b914cb51cae7ab74f2ccccb25e9fc324811f', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'e2a1e0ec6c1d1cbdb2de684bfe4c7e0ed07ceaee', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'af254d18e1538ea5dac06c421ba03d897ddf057d', class: "modal-body" }, h("slot", { key: '645876d63f275108a2a9d27f563bb6918dcb9deb' })))));
133
+ return (h(Host, { key: '2a8271f9606bc98d0b054016a60afbcb36dfaa48' }, h("dialog", { key: '8c866544fd071b98a0b2e58df1690705347a183c', class: "modal", "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: 'fceb7d0e17ecfe639f518c26ea75abf96bf3469e', class: "modal-head" }, h("slot", { key: '89359d0e82b4c5694b8ad76bd7c67b2a1a80f11a', name: "heading" }), this.closeLabel && (h("button", { key: 'edcf61410f993d367613a4bd485c63336ee82619', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: '80ce411b41882508b805aeb1ad0caee07fbbeaaa', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'd0f72191474917a8e4c68c4996a40340c4494651', class: "modal-body" }, h("slot", { key: '46c1d56f416a742176b4be753aa7a8af14bb579d' })))));
153
134
  }
154
135
  static get watchers() { return {
155
136
  "open": [{
@@ -1 +1 @@
1
- {"version":3,"file":"ch-modal.entry.js","sources":["src/components/ch-modal/ch-modal.css?tag=ch-modal&encapsulation=shadow","src/components/ch-modal/ch-modal.tsx"],"sourcesContent":[".modal {\n box-sizing: border-box;\n max-width: min(32rem, calc(100vw - var(--spacing-6xl)));\n max-height: calc(100vh - var(--spacing-6xl));\n padding: var(--spacing-5xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-md);\n}\n\n.modal::backdrop {\n background: var(--color-scrim-default);\n backdrop-filter: blur(var(--effect-blur));\n}\n\n.modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--spacing-2xl);\n margin-bottom: var(--spacing-2xl);\n}\n\n.modal-body {\n overflow-y: auto;\n}\n\n.modal-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: var(--text-muted);\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.modal-close:hover {\n background: var(--surface-hover);\n color: var(--text);\n}\n\n.modal-close:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .modal-close {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .modal-close {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\n\nlet openModals = 0;\nlet previousOverflow = '';\nlet previousPaddingRight = '';\n\n/**\n * Modal dialog, built on the native `<dialog>` element and opened with\n * `showModal()`.\n *\n * The browser therefore supplies the parts that are easy to get wrong: moving\n * focus into the dialog and returning it afterwards, marking the rest of the\n * document inert, `Escape` to close, the top layer, `::backdrop`, and the\n * implicit `dialog` role with `aria-modal=\"true\"`. Notably it does not trap\n * focus, which is deliberate — the W3C APA group concluded a modal should let\n * keyboard users reach browser UI, so a hand-rolled trap would be less\n * correct, not more.\n *\n * What the platform does not cover, and this component adds: locking the page\n * behind the dialog so it cannot scroll, and closing when the backdrop is\n * clicked. The latter is `closedby=\"any\"` in the platform, which Safari does\n * not support yet, so it is implemented here for every browser alike rather\n * than only for some.\n */\n@Component({\n tag: 'ch-modal',\n styleUrl: 'ch-modal.css',\n shadow: true,\n})\nexport class ChModal {\n /**\n * Whether the dialog is open. Kept in sync when the user closes it with\n * `Escape`, the close button or a click outside.\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * Accessible name for the dialog, set as `aria-label`. A slotted heading\n * cannot be referenced with `aria-labelledby` across the shadow boundary, so\n * the name comes through this prop — and a modal dialog needs one, so pass\n * the same text as the heading.\n */\n @Prop() label?: string;\n\n /**\n * Accessible label for the close button, set as `aria-label`. Setting it is\n * what adds the button: its only content is a decorative glyph, so without a\n * label it would have no accessible name.\n */\n @Prop() closeLabel?: string;\n\n /**\n * Emitted after the dialog opens.\n */\n @Event() chOpen: EventEmitter<void>;\n\n /**\n * Emitted after the dialog closes, however it was closed.\n */\n @Event() chClose: EventEmitter<void>;\n\n private dialog?: HTMLDialogElement;\n private scrollLocked = false;\n private pointerDownedOutside = false;\n\n componentDidLoad() {\n // Wired here rather than in JSX because Stencil derives a listener's event\n // name from whether `on<name>` exists on `window`, which differs between\n // the browser and the test environment for pointer events.\n this.dialog?.addEventListener('close', this.handleNativeClose);\n this.dialog?.addEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.addEventListener('click', this.handleClick);\n if (this.open) {\n this.showDialog();\n }\n }\n\n disconnectedCallback() {\n this.dialog?.removeEventListener('close', this.handleNativeClose);\n this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.removeEventListener('click', this.handleClick);\n this.unlockScroll();\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (open) {\n this.showDialog();\n } else {\n this.closeDialog();\n }\n }\n\n private showDialog() {\n if (typeof this.dialog?.showModal !== 'function') {\n return;\n }\n this.lockScroll();\n this.dialog.showModal();\n this.chOpen.emit();\n }\n\n private closeDialog() {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n }\n }\n\n private lockScroll() {\n if (this.scrollLocked) {\n return;\n }\n this.scrollLocked = true;\n openModals += 1;\n if (openModals > 1) {\n return;\n }\n const root = document.documentElement;\n const scrollbar = window.innerWidth - root.clientWidth;\n previousOverflow = root.style.overflow;\n previousPaddingRight = root.style.paddingRight;\n root.style.overflow = 'hidden';\n if (scrollbar > 0) {\n root.style.paddingRight = `${scrollbar}px`;\n }\n }\n\n private unlockScroll() {\n if (!this.scrollLocked) {\n return;\n }\n this.scrollLocked = false;\n openModals -= 1;\n if (openModals > 0) {\n return;\n }\n const root = document.documentElement;\n root.style.overflow = previousOverflow;\n root.style.paddingRight = previousPaddingRight;\n }\n\n /**\n * True for a pointer event on the backdrop: the `<dialog>` is the event\n * target for its own box only, and the coordinates fall outside that box.\n */\n private isOnBackdrop(event: MouseEvent) {\n if (!this.dialog || event.target !== this.dialog) {\n return false;\n }\n const box = this.dialog.getBoundingClientRect();\n return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;\n }\n\n private handlePointerDown = (event: Event) => {\n this.pointerDownedOutside = this.isOnBackdrop(event as MouseEvent);\n };\n\n private handleClick = (event: Event) => {\n // Requiring the press to have started on the backdrop too keeps a\n // selection dragged out of the dialog, and a keyboard-synthesised click\n // (which reports coordinates of 0), from closing it.\n const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event as MouseEvent);\n this.pointerDownedOutside = false;\n if (dismiss) {\n this.closeDialog();\n }\n };\n\n private handleNativeClose = () => {\n this.unlockScroll();\n if (this.open) {\n this.open = false;\n }\n this.chClose.emit();\n };\n\n private handleCloseClick = () => {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n return;\n }\n this.open = false;\n this.chClose.emit();\n };\n\n render() {\n return (\n <Host>\n <dialog class=\"modal\" aria-label={this.label} ref={el => (this.dialog = el as HTMLDialogElement)}>\n <div class=\"modal-head\">\n <slot name=\"heading\"></slot>\n {this.closeLabel && (\n <button class=\"modal-close\" type=\"button\" aria-label={this.closeLabel} onClick={this.handleCloseClick}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n <div class=\"modal-body\">\n <slot></slot>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,UAAU,GAAG,MAAM,CAAC,0yCAA0yC,CAAC;;ACEr0C,IAAI,UAAU,GAAG,CAAC;AAClB,IAAI,gBAAgB,GAAG,EAAE;AACzB,IAAI,oBAAoB,GAAG,EAAE;MAyBhB,OAAO,GAAA,MAAA;;;;;;AAClB;;;AAGG;IACsB,IAAI,GAAG,KAAK;AAErC;;;;;AAKG;AACK,IAAA,KAAK;AAEb;;;;AAIG;AACK,IAAA,UAAU;AAElB;;AAEG;AACM,IAAA,MAAM;AAEf;;AAEG;AACM,IAAA,OAAO;AAER,IAAA,MAAM;IACN,YAAY,GAAG,KAAK;IACpB,oBAAoB,GAAG,KAAK;IAEpC,gBAAgB,GAAA;;;;QAId,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC;QAC9D,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACpE,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC;AACxD,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,UAAU,EAAE;;;IAIrB,oBAAoB,GAAA;QAClB,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACjE,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC;QAC3D,IAAI,CAAC,YA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;;;;;;;;;;;"}
1
+ {"version":3,"file":"ch-modal.entry.js","sources":["src/components/ch-modal/ch-modal.css?tag=ch-modal&encapsulation=shadow","src/components/ch-modal/ch-modal.tsx"],"sourcesContent":[".modal {\n box-sizing: border-box;\n max-width: min(32rem, calc(100vw - var(--spacing-6xl)));\n max-height: calc(100vh - var(--spacing-6xl));\n padding: var(--spacing-5xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-md);\n}\n\n.modal::backdrop {\n background: var(--color-scrim-default);\n backdrop-filter: blur(var(--effect-blur));\n}\n\n.modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: var(--spacing-2xl);\n margin-bottom: var(--spacing-2xl);\n}\n\n.modal-body {\n overflow-y: auto;\n}\n\n.modal-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: var(--text-muted);\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.modal-close:hover {\n background: var(--surface-hover);\n color: var(--text);\n}\n\n.modal-close:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .modal-close {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .modal-close {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\n\nimport { lockScroll as lockPageScroll, unlockScroll as unlockPageScroll } from '../../utils/scroll-lock';\n\n/**\n * Modal dialog, built on the native `<dialog>` element and opened with\n * `showModal()`.\n *\n * The browser therefore supplies the parts that are easy to get wrong: moving\n * focus into the dialog and returning it afterwards, marking the rest of the\n * document inert, `Escape` to close, the top layer, `::backdrop`, and the\n * implicit `dialog` role with `aria-modal=\"true\"`. Notably it does not trap\n * focus, which is deliberate — the W3C APA group concluded a modal should let\n * keyboard users reach browser UI, so a hand-rolled trap would be less\n * correct, not more.\n *\n * What the platform does not cover, and this component adds: locking the page\n * behind the dialog so it cannot scroll, and closing when the backdrop is\n * clicked. The latter is `closedby=\"any\"` in the platform, which Safari does\n * not support yet, so it is implemented here for every browser alike rather\n * than only for some.\n */\n@Component({\n tag: 'ch-modal',\n styleUrl: 'ch-modal.css',\n shadow: true,\n})\nexport class ChModal {\n /**\n * Whether the dialog is open. Kept in sync when the user closes it with\n * `Escape`, the close button or a click outside.\n */\n @Prop({ mutable: true }) open = false;\n\n /**\n * Accessible name for the dialog, set as `aria-label`. A slotted heading\n * cannot be referenced with `aria-labelledby` across the shadow boundary, so\n * the name comes through this prop — and a modal dialog needs one, so pass\n * the same text as the heading.\n */\n @Prop() label?: string;\n\n /**\n * Accessible label for the close button, set as `aria-label`. Setting it is\n * what adds the button: its only content is a decorative glyph, so without a\n * label it would have no accessible name.\n */\n @Prop() closeLabel?: string;\n\n /**\n * Emitted after the dialog opens.\n */\n @Event() chOpen: EventEmitter<void>;\n\n /**\n * Emitted after the dialog closes, however it was closed.\n */\n @Event() chClose: EventEmitter<void>;\n\n private dialog?: HTMLDialogElement;\n private scrollLocked = false;\n private pointerDownedOutside = false;\n\n componentDidLoad() {\n // Wired here rather than in JSX because Stencil derives a listener's event\n // name from whether `on<name>` exists on `window`, which differs between\n // the browser and the test environment for pointer events.\n this.dialog?.addEventListener('close', this.handleNativeClose);\n this.dialog?.addEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.addEventListener('click', this.handleClick);\n if (this.open) {\n this.showDialog();\n }\n }\n\n disconnectedCallback() {\n this.dialog?.removeEventListener('close', this.handleNativeClose);\n this.dialog?.removeEventListener('pointerdown', this.handlePointerDown);\n this.dialog?.removeEventListener('click', this.handleClick);\n this.unlockScroll();\n }\n\n @Watch('open')\n handleOpenChange(open: boolean) {\n if (open) {\n this.showDialog();\n } else {\n this.closeDialog();\n }\n }\n\n private showDialog() {\n if (typeof this.dialog?.showModal !== 'function') {\n return;\n }\n this.lockScroll();\n this.dialog.showModal();\n this.chOpen.emit();\n }\n\n private closeDialog() {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n }\n }\n\n private lockScroll() {\n if (this.scrollLocked) {\n return;\n }\n this.scrollLocked = true;\n lockPageScroll();\n }\n\n private unlockScroll() {\n if (!this.scrollLocked) {\n return;\n }\n this.scrollLocked = false;\n unlockPageScroll();\n }\n\n /**\n * True for a pointer event on the backdrop: the `<dialog>` is the event\n * target for its own box only, and the coordinates fall outside that box.\n */\n private isOnBackdrop(event: MouseEvent) {\n if (!this.dialog || event.target !== this.dialog) {\n return false;\n }\n const box = this.dialog.getBoundingClientRect();\n return event.clientX < box.left || event.clientX > box.right || event.clientY < box.top || event.clientY > box.bottom;\n }\n\n private handlePointerDown = (event: Event) => {\n this.pointerDownedOutside = this.isOnBackdrop(event as MouseEvent);\n };\n\n private handleClick = (event: Event) => {\n // Requiring the press to have started on the backdrop too keeps a\n // selection dragged out of the dialog, and a keyboard-synthesised click\n // (which reports coordinates of 0), from closing it.\n const dismiss = this.pointerDownedOutside && this.isOnBackdrop(event as MouseEvent);\n this.pointerDownedOutside = false;\n if (dismiss) {\n this.closeDialog();\n }\n };\n\n private handleNativeClose = () => {\n this.unlockScroll();\n if (this.open) {\n this.open = false;\n }\n this.chClose.emit();\n };\n\n private handleCloseClick = () => {\n if (typeof this.dialog?.close === 'function' && this.dialog.open) {\n this.dialog.close();\n return;\n }\n this.open = false;\n this.chClose.emit();\n };\n\n render() {\n return (\n <Host>\n <dialog class=\"modal\" aria-label={this.label} ref={el => (this.dialog = el as HTMLDialogElement)}>\n <div class=\"modal-head\">\n <slot name=\"heading\"></slot>\n {this.closeLabel && (\n <button class=\"modal-close\" type=\"button\" aria-label={this.closeLabel} onClick={this.handleCloseClick}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n <div class=\"modal-body\">\n <slot></slot>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"],"names":["lockPageScroll","unlockPageScroll"],"mappings":";;;AAAA,MAAM,UAAU,GAAG,MAAM,CAAC,0yCAA0yC,CAAC;;MC2BxzC,OAAO,GAAA,MAAA;;;;;;AAClB;;;AAGG;IACsB,IAAI,GAAG,KAAK;AAErC;;;;;AAKG;AACK,IAAA,KAAK;AAEb;;;;AAIG;AACK,IAAA,UAAU;AAElB;;AAEG;AACM,IAAA,MAAM;AAEf;;AAEG;AACM,IAAA,OAAO;AAER,IAAA,MAAM;IACN,YAAY,GAAG,KAAK;IACpB,oBAAoB,GAAG,KAAK;IAEpC,gBAAgB,GAAA;;;;QAId,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC;QAC9D,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACpE,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC;AACxD,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,UAAU,EAAE;;;IAIrB,oBAAoB,GAAA;QAClB,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACjE,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC;QAC3D,IAAI,CAAC,YAAY,EAAE;;AAIrB,IAAA,gBAAgB,CAAC,IAAa,EAAA;QAC5B,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,UAAU,EAAE;;aACZ;YACL,IAAI,CAAC,WAAW,EAAE;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AAC,UAAU,KACd,+DAAQ,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAA,YAAA,EAAa,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAA,EACnG,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAkB,MAAM,EAAA,EAAA,QAAA,CAAS,CAC1B,CACV,CACG,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,YAAY,EAAA,EACrB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,CACC,CACJ;;;;;;;;;;;;"}
@@ -114,7 +114,7 @@ const ChRadio = class {
114
114
  }
115
115
  render() {
116
116
  const groupName = this.name || `${this.groupId}-group`;
117
- return (h(Host, { key: '2d0f02cbeae89b8c60664825f3885bbeeafd896a' }, this.label && (h("span", { key: 'c32fd25be5eaf0d05c2d8d6aae01dda281f4b952', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'bd05a360ad1fd794c95d8066dbb93300152a88dc', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { class: "mark" }), h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '8c451f8d166c6002a4f30bfb72acd6b863ec38c2', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '8ac12f60e463c908dff76d64d7ae0e216ed51489', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
117
+ return (h(Host, { key: '3cd55c205d303df45671dc76756b1fcc78baf760' }, this.label && (h("span", { key: '0e9ab53baa202dff829a46e8674d7f994f9f14b9', class: "group-label", id: this.labelId }, this.label)), h("div", { key: '584e1e36954f7daad8b71c9b690f7fe42f53bb09', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { class: "mark" }), h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '9030ddc9030ea728d56fa2f5520f9df26df75f0d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'e2ba85ff960ae61f4b882190e19558f6189c569b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
118
118
  }
119
119
  static get formAssociated() { return true; }
120
120
  static get watchers() { return {