@devschile/chucao 2.2.0 → 2.3.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 (72) hide show
  1. package/dist/chucao/chucao.esm.js +1 -1
  2. package/dist/chucao/p-3db38c49.entry.js +2 -0
  3. package/dist/chucao/p-3db38c49.entry.js.map +1 -0
  4. package/dist/chucao/{p-b8bd0310.entry.js → p-60c2fd71.entry.js} +2 -2
  5. package/dist/chucao/{p-5ae89a19.entry.js → p-6a4bc80c.entry.js} +2 -2
  6. package/dist/chucao/{p-b678a7e2.entry.js → p-6c617158.entry.js} +2 -2
  7. package/dist/chucao/{p-079c2017.entry.js → p-aeea9cbe.entry.js} +2 -2
  8. package/dist/chucao/{p-9c072600.entry.js → p-c4806e96.entry.js} +2 -2
  9. package/dist/chucao/{p-077dc2a6.entry.js → p-f78f0163.entry.js} +2 -2
  10. package/dist/cjs/ch-alert_8.cjs.entry.js +4 -4
  11. package/dist/cjs/ch-checkbox.cjs.entry.js +1 -1
  12. package/dist/cjs/ch-modal.cjs.entry.js +9 -2
  13. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ch-radio.cjs.entry.js +1 -1
  15. package/dist/cjs/ch-segmented-control.cjs.entry.js +1 -1
  16. package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
  17. package/dist/cjs/ch-tooltip.cjs.entry.js +1 -1
  18. package/dist/cjs/chucao.cjs.js +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +1 -1
  21. package/dist/collection/components/ch-card/ch-card.js +1 -1
  22. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  23. package/dist/collection/components/ch-input/ch-input.js +1 -1
  24. package/dist/collection/components/ch-modal/ch-modal.css +12 -1
  25. package/dist/collection/components/ch-modal/ch-modal.js +34 -1
  26. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -1
  27. package/dist/collection/components/ch-radio/ch-radio.js +1 -1
  28. package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +1 -1
  29. package/dist/collection/components/ch-select/ch-select.js +1 -1
  30. package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
  31. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  32. package/dist/collection/components/ch-tooltip/ch-tooltip.js +1 -1
  33. package/dist/components/ch-button.js +1 -1
  34. package/dist/components/ch-card.js +1 -1
  35. package/dist/components/ch-card.js.map +1 -1
  36. package/dist/components/ch-checkbox.js +1 -1
  37. package/dist/components/ch-input.js +1 -1
  38. package/dist/components/ch-modal.js +1 -1
  39. package/dist/components/ch-modal.js.map +1 -1
  40. package/dist/components/ch-radio.js +1 -1
  41. package/dist/components/ch-segmented-control.js +1 -1
  42. package/dist/components/ch-select.js +1 -1
  43. package/dist/components/ch-spinner.js +1 -1
  44. package/dist/components/ch-tabs.js +1 -1
  45. package/dist/components/ch-tooltip.js +1 -1
  46. package/dist/components/{p-C4eGmLcE.js → p-C1995t1C.js} +2 -2
  47. package/dist/esm/ch-alert_8.entry.js +4 -4
  48. package/dist/esm/ch-checkbox.entry.js +1 -1
  49. package/dist/esm/ch-modal.entry.js +9 -2
  50. package/dist/esm/ch-modal.entry.js.map +1 -1
  51. package/dist/esm/ch-radio.entry.js +1 -1
  52. package/dist/esm/ch-segmented-control.entry.js +1 -1
  53. package/dist/esm/ch-tabs.entry.js +1 -1
  54. package/dist/esm/ch-tooltip.entry.js +1 -1
  55. package/dist/esm/chucao.js +1 -1
  56. package/dist/esm/loader.js +1 -1
  57. package/dist/types/components/ch-modal/ch-modal.d.ts +8 -0
  58. package/dist/types/components.d.ts +13 -0
  59. package/dist-vue/index.js +1 -0
  60. package/dist-vue/index.ts +1 -0
  61. package/hydrate/index.js +20 -12
  62. package/hydrate/index.mjs +20 -12
  63. package/package.json +1 -1
  64. package/dist/chucao/p-70285203.entry.js +0 -2
  65. package/dist/chucao/p-70285203.entry.js.map +0 -1
  66. /package/dist/chucao/{p-b8bd0310.entry.js.map → p-60c2fd71.entry.js.map} +0 -0
  67. /package/dist/chucao/{p-5ae89a19.entry.js.map → p-6a4bc80c.entry.js.map} +0 -0
  68. /package/dist/chucao/{p-b678a7e2.entry.js.map → p-6c617158.entry.js.map} +0 -0
  69. /package/dist/chucao/{p-079c2017.entry.js.map → p-aeea9cbe.entry.js.map} +0 -0
  70. /package/dist/chucao/{p-9c072600.entry.js.map → p-c4806e96.entry.js.map} +0 -0
  71. /package/dist/chucao/{p-077dc2a6.entry.js.map → p-f78f0163.entry.js.map} +0 -0
  72. /package/dist/components/{p-C4eGmLcE.js.map → p-C1995t1C.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{C as o,d as s}from"./p-C4eGmLcE.js";const t=o;const c=s;export{t as ChSpinner,c as defineCustomElement};
1
+ import{C as o,d as s}from"./p-C1995t1C.js";const t=o;const p=s;export{t as ChSpinner,p as defineCustomElement};
2
2
  //# sourceMappingURL=ch-spinner.js.map
@@ -1,2 +1,2 @@
1
- import{p as t,H as a,c as e,h as r,d as i,t as s}from"./p-BhAZrOxf.js";const o=()=>`:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;const n=0;const l=-1;const c=1;const d=-1;let b=0;const h=t(class t extends a{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chChange=e(this,"chChange")}baseId=`ch-tabs-${++b}`;tablistEl;tabs=[];value;label;chChange;tabId(t){return`${this.baseId}-${t}`}panelId(t){return`${this.baseId}-${t}-panel`}get activeValue(){if(this.value&&this.tabs.some((t=>!t.disabled&&t.value===this.value))){return this.value}return this.tabs.find((t=>!t.disabled))?.value}select=t=>{this.value=t;this.chChange.emit(this.value)};focusTab(t){this.tablistEl?.querySelectorAll('[role="tab"]').forEach((a=>{if(a.dataset.value===t){a.focus()}}))}handleKeyDown=t=>{const a=this.tabs.filter((t=>!t.disabled));if(!a.length){return}const e=this.targetFor(t.key,a);if(!e){return}t.preventDefault();this.select(e);this.focusTab(e)};targetFor(t,a){const e=a.findIndex((t=>t.value===this.activeValue));if(t==="ArrowRight"){return a[(e+c)%a.length]?.value}if(t==="ArrowLeft"){return a[(e+d+a.length)%a.length]?.value}if(t==="Home"){return a[n]?.value}if(t==="End"){return a[a.length+l]?.value}return undefined}render(){const t=this.activeValue;return r(i,{key:"8b0757158cca856bd984e99b86b9f1c3a79e1dfb"},r("div",{key:"e1ecf05df41e26787ed3702c113a393edcc6dea4",class:"tablist",role:"tablist","aria-label":this.label,onKeyDown:this.handleKeyDown,ref:t=>this.tablistEl=t},this.tabs.map((a=>{const e=a.value===t;return r("button",{key:a.value,type:"button",class:{tab:true,"tab--active":e,"tab--disabled":Boolean(a.disabled)},role:"tab",id:this.tabId(a.value),"data-value":a.value,"aria-selected":e?"true":"false","aria-controls":this.panelId(a.value),tabIndex:e?n:l,disabled:a.disabled,onClick:()=>this.select(a.value)},a.label)}))),this.tabs.map((a=>r("div",{key:`${a.value}-panel`,class:"tabpanel",id:this.panelId(a.value),role:"tabpanel","aria-labelledby":this.tabId(a.value),tabIndex:n,hidden:a.value!==t},r("slot",{name:`panel-${a.value}`})))))}static get style(){return o()}},[769,"ch-tabs",{tabs:[16],value:[1025],label:[1]}]);function u(){if(typeof customElements==="undefined"){return}const t=["ch-tabs"];t.forEach((t=>{switch(t){case"ch-tabs":if(!customElements.get(s(t))){customElements.define(s(t),h)}break}}))}u();const f=h;const p=u;export{f as ChTabs,p as defineCustomElement};
1
+ import{p as t,H as a,c as e,h as r,d as i,t as s}from"./p-BhAZrOxf.js";const o=()=>`:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;const n=0;const l=-1;const c=1;const b=-1;let d=0;const h=t(class t extends a{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow();this.chChange=e(this,"chChange")}baseId=`ch-tabs-${++d}`;tablistEl;tabs=[];value;label;chChange;tabId(t){return`${this.baseId}-${t}`}panelId(t){return`${this.baseId}-${t}-panel`}get activeValue(){if(this.value&&this.tabs.some((t=>!t.disabled&&t.value===this.value))){return this.value}return this.tabs.find((t=>!t.disabled))?.value}select=t=>{this.value=t;this.chChange.emit(this.value)};focusTab(t){this.tablistEl?.querySelectorAll('[role="tab"]').forEach((a=>{if(a.dataset.value===t){a.focus()}}))}handleKeyDown=t=>{const a=this.tabs.filter((t=>!t.disabled));if(!a.length){return}const e=this.targetFor(t.key,a);if(!e){return}t.preventDefault();this.select(e);this.focusTab(e)};targetFor(t,a){const e=a.findIndex((t=>t.value===this.activeValue));if(t==="ArrowRight"){return a[(e+c)%a.length]?.value}if(t==="ArrowLeft"){return a[(e+b+a.length)%a.length]?.value}if(t==="Home"){return a[n]?.value}if(t==="End"){return a[a.length+l]?.value}return undefined}render(){const t=this.activeValue;return r(i,{key:"831a0c2d53d4caa19be95a3c2cbbfefb84f65599"},r("div",{key:"791bb980cb6d7bb137390737bba4796b9f86c963",class:"tablist",role:"tablist","aria-label":this.label,onKeyDown:this.handleKeyDown,ref:t=>this.tablistEl=t},this.tabs.map((a=>{const e=a.value===t;return r("button",{key:a.value,type:"button",class:{tab:true,"tab--active":e,"tab--disabled":Boolean(a.disabled)},role:"tab",id:this.tabId(a.value),"data-value":a.value,"aria-selected":e?"true":"false","aria-controls":this.panelId(a.value),tabIndex:e?n:l,disabled:a.disabled,onClick:()=>this.select(a.value)},a.label)}))),this.tabs.map((a=>r("div",{key:`${a.value}-panel`,class:"tabpanel",id:this.panelId(a.value),role:"tabpanel","aria-labelledby":this.tabId(a.value),tabIndex:n,hidden:a.value!==t},r("slot",{name:`panel-${a.value}`})))))}static get style(){return o()}},[769,"ch-tabs",{tabs:[16],value:[1025],label:[1]}]);function u(){if(typeof customElements==="undefined"){return}const t=["ch-tabs"];t.forEach((t=>{switch(t){case"ch-tabs":if(!customElements.get(s(t))){customElements.define(s(t),h)}break}}))}u();const f=h;const p=u;export{f as ChTabs,p as defineCustomElement};
2
2
  //# sourceMappingURL=ch-tabs.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,h as a,d as s,t as o}from"./p-BhAZrOxf.js";const i=()=>`:host{display:inline-block}.anchor{position:relative;display:inline-flex}.bubble{position:absolute;z-index:var(--z-index-dropdown);width:max-content;max-width:16rem;padding:var(--spacing-md) var(--spacing-2xl);border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-sm);line-height:1.4;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--easing-default), visibility var(--duration-fast) var(--easing-default)}.bubble--visible{opacity:1;visibility:visible}.bubble::before{content:'';position:absolute}.bubble--top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--spacing-md)}.bubble--top::before{top:100%;left:0;right:0;height:var(--spacing-md)}.bubble--bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:var(--spacing-md)}.bubble--bottom::before{bottom:100%;left:0;right:0;height:var(--spacing-md)}.bubble--left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--spacing-md)}.bubble--left::before{left:100%;top:0;bottom:0;width:var(--spacing-md)}.bubble--right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--spacing-md)}.bubble--right::before{right:100%;top:0;bottom:0;width:var(--spacing-md)}@media (prefers-reduced-motion: reduce){.bubble{transition:none}}`;let r=0;const n=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}get el(){return this}fallbackId=`ch-tooltip-${++r}`;placement="top";hovered=false;focused=false;dismissed=false;get visible(){return(this.hovered||this.focused)&&!this.dismissed}componentDidLoad(){this.associate()}handleMouseEnter(){this.hovered=true;this.dismissed=false}handleMouseLeave(){this.hovered=false}handleFocusIn(){this.focused=true;this.dismissed=false}handleFocusOut(){this.focused=false}handleKeyDown(e){if(e.key==="Escape"&&this.visible){this.dismissed=true}}slotted(e){return Array.from(this.el.children).find((t=>t.getAttribute("slot")===e))}associate=()=>{const e=this.slotted("trigger");const t=this.slotted("content");if(!e||!t){return}if(!t.id){t.id=this.fallbackId}t.setAttribute("role","tooltip");e.setAttribute("aria-describedby",t.id)};render(){return a(s,{key:"89e1b0de9e5d2a33edba2cc0b479788694c5a202"},a("span",{key:"c7a31597ba6fd6a7c68cdd74cf8170d14b9e85ba",class:"anchor"},a("slot",{key:"eac54ebeffa8ccbfdd0c4e42e26cd4c40e81d649",name:"trigger",onSlotchange:this.associate}),a("span",{key:"326581a3f64a2165a9031818782a50de7fe05fa7",class:{bubble:true,[`bubble--${this.placement}`]:true,"bubble--visible":this.visible}},a("slot",{key:"739d4b50a611cc4db8fdc802f2f39deb68f974eb",name:"content",onSlotchange:this.associate}))))}static get style(){return i()}},[769,"ch-tooltip",{placement:[1],hovered:[32],focused:[32],dismissed:[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]);function l(){if(typeof customElements==="undefined"){return}const e=["ch-tooltip"];e.forEach((e=>{switch(e){case"ch-tooltip":if(!customElements.get(o(e))){customElements.define(o(e),n)}break}}))}l();const b=n;const d=l;export{b as ChTooltip,d as defineCustomElement};
1
+ import{p as e,H as t,h as s,d as o,t as i}from"./p-BhAZrOxf.js";const a=()=>`:host{display:inline-block}.anchor{position:relative;display:inline-flex}.bubble{position:absolute;z-index:var(--z-index-dropdown);width:max-content;max-width:16rem;padding:var(--spacing-md) var(--spacing-2xl);border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-sm);line-height:1.4;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--easing-default), visibility var(--duration-fast) var(--easing-default)}.bubble--visible{opacity:1;visibility:visible}.bubble::before{content:'';position:absolute}.bubble--top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--spacing-md)}.bubble--top::before{top:100%;left:0;right:0;height:var(--spacing-md)}.bubble--bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:var(--spacing-md)}.bubble--bottom::before{bottom:100%;left:0;right:0;height:var(--spacing-md)}.bubble--left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--spacing-md)}.bubble--left::before{left:100%;top:0;bottom:0;width:var(--spacing-md)}.bubble--right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--spacing-md)}.bubble--right::before{right:100%;top:0;bottom:0;width:var(--spacing-md)}@media (prefers-reduced-motion: reduce){.bubble{transition:none}}`;let r=0;const n=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}get el(){return this}fallbackId=`ch-tooltip-${++r}`;placement="top";hovered=false;focused=false;dismissed=false;get visible(){return(this.hovered||this.focused)&&!this.dismissed}componentDidLoad(){this.associate()}handleMouseEnter(){this.hovered=true;this.dismissed=false}handleMouseLeave(){this.hovered=false}handleFocusIn(){this.focused=true;this.dismissed=false}handleFocusOut(){this.focused=false}handleKeyDown(e){if(e.key==="Escape"&&this.visible){this.dismissed=true}}slotted(e){return Array.from(this.el.children).find((t=>t.getAttribute("slot")===e))}associate=()=>{const e=this.slotted("trigger");const t=this.slotted("content");if(!e||!t){return}if(!t.id){t.id=this.fallbackId}t.setAttribute("role","tooltip");e.setAttribute("aria-describedby",t.id)};render(){return s(o,{key:"77c1788847db3e52409bf13d1d21bf7828310ef5"},s("span",{key:"8fcb630946914891dbc1812e506a4160c101c426",class:"anchor"},s("slot",{key:"798c3d880b53191653f02fab57ce400fcf679f55",name:"trigger",onSlotchange:this.associate}),s("span",{key:"3c10d8e0872da7c0f2920283f812e652ae3f2b71",class:{bubble:true,[`bubble--${this.placement}`]:true,"bubble--visible":this.visible}},s("slot",{key:"3a9bc13d5871144d75153d248ee05a28dda6679e",name:"content",onSlotchange:this.associate}))))}static get style(){return a()}},[769,"ch-tooltip",{placement:[1],hovered:[32],focused:[32],dismissed:[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]);function l(){if(typeof customElements==="undefined"){return}const e=["ch-tooltip"];e.forEach((e=>{switch(e){case"ch-tooltip":if(!customElements.get(i(e))){customElements.define(i(e),n)}break}}))}l();const b=n;const d=l;export{b as ChTooltip,d as defineCustomElement};
2
2
  //# sourceMappingURL=ch-tooltip.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as n,h as r,d as s,t as i}from"./p-BhAZrOxf.js";const t=()=>`:host{display:inline-block;vertical-align:middle}.spinner{display:block;box-sizing:border-box;width:1em;height:1em;border:0.125em solid currentColor;border-top-color:transparent;border-radius:50%;animation:ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite}.spinner--sm{font-size:var(--typography-size-sm)}.spinner--md{font-size:var(--typography-size-lg)}.spinner--lg{font-size:var(--typography-size-xl)}@keyframes ch-spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:calc(var(--duration-spin) * 4)}}`;const a=e(class e extends n{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}size="md";label;render(){const e=Boolean(this.label);return r(s,{key:"cdb44d362b4f366703c13816d7c72967e03709b1"},r("span",{key:"5368a6f9cef9ff6eafc4ac0323e2cc01da6e627f",class:{spinner:true,[`spinner--${this.size}`]:true},role:e?"status":undefined,"aria-label":e?this.label:undefined,"aria-hidden":e?undefined:"true"}))}static get style(){return t()}},[513,"ch-spinner",{size:[1],label:[1]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ch-spinner"];e.forEach((e=>{switch(e){case"ch-spinner":if(!customElements.get(i(e))){customElements.define(i(e),a)}break}}))}o();export{a as C,o as d};
2
- //# sourceMappingURL=p-C4eGmLcE.js.map
1
+ import{p as e,H as n,h as r,d as s,t as i}from"./p-BhAZrOxf.js";const t=()=>`:host{display:inline-block;vertical-align:middle}.spinner{display:block;box-sizing:border-box;width:1em;height:1em;border:0.125em solid currentColor;border-top-color:transparent;border-radius:50%;animation:ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite}.spinner--sm{font-size:var(--typography-size-sm)}.spinner--md{font-size:var(--typography-size-lg)}.spinner--lg{font-size:var(--typography-size-xl)}@keyframes ch-spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:calc(var(--duration-spin) * 4)}}`;const a=e(class e extends n{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}size="md";label;render(){const e=Boolean(this.label);return r(s,{key:"027b184e902f41230aa10e15a3a28f2795758c57"},r("span",{key:"8fa60714afc8767a01f2b8b3313eb003576592b6",class:{spinner:true,[`spinner--${this.size}`]:true},role:e?"status":undefined,"aria-label":e?this.label:undefined,"aria-hidden":e?undefined:"true"}))}static get style(){return t()}},[513,"ch-spinner",{size:[1],label:[1]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ch-spinner"];e.forEach((e=>{switch(e){case"ch-spinner":if(!customElements.get(i(e))){customElements.define(i(e),a)}break}}))}o();export{a as C,o as d};
2
+ //# sourceMappingURL=p-C1995t1C.js.map
@@ -136,7 +136,7 @@ const ChCard = class {
136
136
  registerInstance(this, hostRef);
137
137
  }
138
138
  render() {
139
- return (h(Host, { key: '7e2833cdc6f37c6b8577c17677840913fb7cd9e1' }, h("div", { key: '223c291e98af73ee2c299b8649773cfcf54388d7', class: "card" }, h("slot", { key: 'e948386bcd492c31e264d50cf27d26e98dd771eb' }))));
139
+ return (h(Host, { key: '6d8b2d96c45fe2b0d5f23562d3c1b394adc8f9ea' }, h("div", { key: '79b824b6924adbc407334adcd82128f8b1ec8a0a', class: "card" }, h("slot", { key: '89b6bea5dee03bc65faf4aadb1725df393d55f51' }))));
140
140
  }
141
141
  };
142
142
  ChCard.style = chCardCss();
@@ -265,7 +265,7 @@ const ChInput = class {
265
265
  return undefined;
266
266
  }
267
267
  render() {
268
- return (h(Host, { key: '8f06015ae952c02467d45bb97d306eb7525a7429' }, this.label && (h("label", { key: '300cf07bfc4e79eb5904140e105d33fa96f09efe', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '85ab8a0f5a35f421c9af6137bc691e6fb543e940', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '4a64db0bc1f03dd756dd55ecf6ff8b95de00dfe1', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'c1c8a0c8f719f53941180ae05b17710a5f7c212b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
268
+ return (h(Host, { key: 'cf143097fd39199c6c8a81484a4e8621e7c4d9cb' }, this.label && (h("label", { key: '40643f72949b11fc7dcdd4a43794a37103708992', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'ab3a0b8cc51e9c863001ddb089516bbf0874e889', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'ad7eb7b40aaab69b6bc929c632ce4736fe3c39a5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '6f7738076128a8242d1dcc97ac99ee1275fc7e14', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
269
269
  }
270
270
  static get formAssociated() { return true; }
271
271
  static get watchers() { return {
@@ -400,7 +400,7 @@ const ChSelect = class {
400
400
  return undefined;
401
401
  }
402
402
  render() {
403
- return (h(Host, { key: 'bf1cb02b17b6c31297e1b77e9cad6488c9fafd1c' }, this.label && (h("label", { key: '837158a8827a3f9af3a58a14c104f15919058ae0', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: '4622f105d8852a2658b917f1329c3c71c791547a', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '1d3ea13f0f9f8f0c7b3b5d0c3a5a36cb465937b2', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'd73ff8034dfe5546f7f77417d73e91a0fc763321', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'fa487e405f01ae8473d442b1b94ea1cc9eb07d31', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
403
+ return (h(Host, { key: '3490540c681d453acea3a53fe09f52d1e51c61b3' }, this.label && (h("label", { key: '33d478bb47da9fca08c57021decdf6c9eac00142', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: 'b109bcf23a516df3190a6648d02163b84c0418ad', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '76e447051d2cf751211884a926df71a0eed141a7', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '8756bc6783bdb9d18d306516a89c805e6fc5b647', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'f52f95a4d067f29ae7ac22337622411a762385a0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
404
404
  }
405
405
  static get formAssociated() { return true; }
406
406
  static get watchers() { return {
@@ -441,7 +441,7 @@ const ChSpinner = class {
441
441
  label;
442
442
  render() {
443
443
  const labelled = Boolean(this.label);
444
- return (h(Host, { key: 'cdb44d362b4f366703c13816d7c72967e03709b1' }, h("span", { key: '5368a6f9cef9ff6eafc4ac0323e2cc01da6e627f', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
444
+ return (h(Host, { key: '027b184e902f41230aa10e15a3a28f2795758c57' }, h("span", { key: '8fa60714afc8767a01f2b8b3313eb003576592b6', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
445
445
  }
446
446
  };
447
447
  ChSpinner.style = chSpinnerCss();
@@ -111,7 +111,7 @@ const ChCheckbox = class {
111
111
  return undefined;
112
112
  }
113
113
  render() {
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))));
114
+ return (h(Host, { key: '664ce0b9de17ed5beb378ed2ebaf2b554002a0c0' }, h("label", { key: 'a9115153696ea97d404e901e463b9c2aa3fbc9c6', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, h("input", { key: '2b8254463d3af0c36a46fda4fbe0eabbc8875e74', 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: '764e0e2d588f25850efa559487f62ed72f3422ef', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '5ec4c53625bfb0a56451e8a6eab285d5268ac246', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '36dabfce3ea276a4cc77b5f1e8b799403abcfccc', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
115
115
  }
116
116
  static get formAssociated() { return true; }
117
117
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-DWC12BJ-.js';
2
2
  import { l as lockScroll, u as unlockScroll } from './scroll-lock-d8DfpzMR.js';
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
+ const chModalCss = () => `.modal{box-sizing:border-box;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--sm{max-width:min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)))}.modal--md{max-width:min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)))}.modal--lg{max-width:min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)))}.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}}`;
5
5
 
6
6
  const ChModal = class {
7
7
  constructor(hostRef) {
@@ -27,6 +27,13 @@ const ChModal = class {
27
27
  * label it would have no accessible name.
28
28
  */
29
29
  closeLabel;
30
+ /**
31
+ * The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or
32
+ * `lg` (48rem). The `--ch-modal-width` custom property overrides it for a
33
+ * width none of the three cover. Either way the dialog never exceeds the
34
+ * viewport.
35
+ */
36
+ size = 'md';
30
37
  /**
31
38
  * Emitted after the dialog opens.
32
39
  */
@@ -130,7 +137,7 @@ const ChModal = class {
130
137
  this.chClose.emit();
131
138
  };
132
139
  render() {
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' })))));
140
+ return (h(Host, { key: 'd4dfbaad43391e3f34eb890b0d04a6ee38fa82e5' }, h("dialog", { key: '3a3142c9baee06b381c7aaa920718f92bb8f1176', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '34855134cc5cb2701a9b8b60ee46087d4f00fd13', class: "modal-head" }, h("slot", { key: '7fa6a49a0f6b914fc8b825009bb46f5cd799f33b', name: "heading" }), this.closeLabel && (h("button", { key: '55f15f81f94c7a08f54e9d6f9a722452b32f01af', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: '545af17e1065c558a1cc5274a444f610a77a3044', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'a78ea4c9f66c03d641c9ef1aa14058b6371160fb', class: "modal-body" }, h("slot", { key: 'ffc1accb70cfc2e8ee6f11088a3a1da09a8b3430' })))));
134
141
  }
135
142
  static get watchers() { return {
136
143
  "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\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":"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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-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--sm {\n max-width: min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)));\n}\n\n.modal--md {\n max-width: min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)));\n}\n\n.modal--lg {\n max-width: min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)));\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\nexport type ChModalSize = 'sm' | 'md' | 'lg';\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 * The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or\n * `lg` (48rem). The `--ch-modal-width` custom property overrides it for a\n * width none of the three cover. Either way the dialog never exceeds the\n * viewport.\n */\n @Prop() size: ChModalSize = 'md';\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: true, [`modal--${this.size}`]: true }} 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":"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"}
@@ -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: '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))));
117
+ return (h(Host, { key: '67d5306b86b9c5f6a085748cf18bcd8421afb7df' }, this.label && (h("span", { key: '65ff0ced1f1954899765b1df3e77a0a10830b952', class: "group-label", id: this.labelId }, this.label)), h("div", { key: '65d1a571a6a88ded21b3adc25dff9bd9cfbc5634', 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: '328c40801e34c823de319f5de92be8eb19360bcb', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '3606463c798a7bd3ff0545e7691107cf506a2df1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
118
118
  }
119
119
  static get formAssociated() { return true; }
120
120
  static get watchers() { return {
@@ -90,7 +90,7 @@ const ChSegmentedControl = class {
90
90
  }
91
91
  render() {
92
92
  const groupName = this.name || `${this.groupId}-group`;
93
- return (h(Host, { key: 'fd588544d9cdebaaeb1961f4ecb5c5630e8e4699' }, this.label && (h("span", { key: '58ade8d7858d6e12d71778bc07337ab485be383d', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'b872fc7e4a2dc678dbc1c9cf7c30d66ce24ebcac', class: { segmented: true, [`segmented--${this.size}`]: true }, 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", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), h("span", { class: "label-text" }, option.label)))))));
93
+ return (h(Host, { key: 'd1b6810caed6826dc4020962c0e9dd0a037013e9' }, this.label && (h("span", { key: '11bc2a5a41b38f10c7d5a6687609c3f3688db533', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'ca18b975c4a0b7d42fea8ca6d483d58d15112f58', class: { segmented: true, [`segmented--${this.size}`]: true }, 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", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), h("span", { class: "label-text" }, option.label)))))));
94
94
  }
95
95
  static get formAssociated() { return true; }
96
96
  static get watchers() { return {
@@ -84,7 +84,7 @@ const ChTabs = class {
84
84
  }
85
85
  render() {
86
86
  const active = this.activeValue;
87
- return (h(Host, { key: '8b0757158cca856bd984e99b86b9f1c3a79e1dfb' }, h("div", { key: 'e1ecf05df41e26787ed3702c113a393edcc6dea4', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
87
+ return (h(Host, { key: '831a0c2d53d4caa19be95a3c2cbbfefb84f65599' }, h("div", { key: '791bb980cb6d7bb137390737bba4796b9f86c963', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
88
88
  const selected = tab.value === active;
89
89
  return (h("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
90
90
  })), this.tabs.map(tab => (h("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, h("slot", { name: `panel-${tab.value}` }))))));
@@ -69,7 +69,7 @@ const ChTooltip = class {
69
69
  trigger.setAttribute('aria-describedby', content.id);
70
70
  };
71
71
  render() {
72
- return (h(Host, { key: '89e1b0de9e5d2a33edba2cc0b479788694c5a202' }, h("span", { key: 'c7a31597ba6fd6a7c68cdd74cf8170d14b9e85ba', class: "anchor" }, h("slot", { key: 'eac54ebeffa8ccbfdd0c4e42e26cd4c40e81d649', name: "trigger", onSlotchange: this.associate }), h("span", { key: '326581a3f64a2165a9031818782a50de7fe05fa7', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, h("slot", { key: '739d4b50a611cc4db8fdc802f2f39deb68f974eb', name: "content", onSlotchange: this.associate })))));
72
+ return (h(Host, { key: '77c1788847db3e52409bf13d1d21bf7828310ef5' }, h("span", { key: '8fcb630946914891dbc1812e506a4160c101c426', class: "anchor" }, h("slot", { key: '798c3d880b53191653f02fab57ce400fcf679f55', name: "trigger", onSlotchange: this.associate }), h("span", { key: '3c10d8e0872da7c0f2920283f812e652ae3f2b71', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, h("slot", { key: '3a9bc13d5871144d75153d248ee05a28dda6679e', name: "content", onSlotchange: this.associate })))));
73
73
  }
74
74
  };
75
75
  ChTooltip.style = chTooltipCss();
@@ -16,7 +16,7 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[577,"ch-checkbox",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-drawer",[[769,"ch-drawer",{"open":[1028],"side":[1],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-emoji",[[513,"ch-emoji",{"name":[1],"alt":[1],"size":[1],"extIndex":[32],"loaded":[32]},null,{"name":[{"handleNameChange":0}]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[577,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-segmented-control",[[577,"ch-segmented-control",{"label":[1],"options":[16],"value":[1025],"size":[1],"name":[513],"disabled":[516],"required":[516],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[577,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]],["ch-alert_8",[[769,"ch-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"href":[1],"target":[1],"label":[1]}],[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[257,"ch-card"],[577,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-switch",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[513,"ch-spinner",{"size":[1],"label":[1]}]]]], options);
19
+ return bootstrapLazy([["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[577,"ch-checkbox",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-drawer",[[769,"ch-drawer",{"open":[1028],"side":[1],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-emoji",[[513,"ch-emoji",{"name":[1],"alt":[1],"size":[1],"extIndex":[32],"loaded":[32]},null,{"name":[{"handleNameChange":0}]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"],"size":[1]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[577,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-segmented-control",[[577,"ch-segmented-control",{"label":[1],"options":[16],"value":[1025],"size":[1],"name":[513],"disabled":[516],"required":[516],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[577,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]],["ch-alert_8",[[769,"ch-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"href":[1],"target":[1],"label":[1]}],[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[257,"ch-card"],[577,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-switch",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[513,"ch-spinner",{"size":[1],"label":[1]}]]]], options);
20
20
  });
21
21
  //# sourceMappingURL=chucao.js.map
22
22
 
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-DWC12BJ-.js';
4
4
  const defineCustomElements = async (win, options) => {
5
5
  if (typeof window === 'undefined') return undefined;
6
6
  await globalScripts();
7
- return bootstrapLazy([["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[577,"ch-checkbox",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-drawer",[[769,"ch-drawer",{"open":[1028],"side":[1],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-emoji",[[513,"ch-emoji",{"name":[1],"alt":[1],"size":[1],"extIndex":[32],"loaded":[32]},null,{"name":[{"handleNameChange":0}]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[577,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-segmented-control",[[577,"ch-segmented-control",{"label":[1],"options":[16],"value":[1025],"size":[1],"name":[513],"disabled":[516],"required":[516],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[577,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]],["ch-alert_8",[[769,"ch-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"href":[1],"target":[1],"label":[1]}],[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[257,"ch-card"],[577,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-switch",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[513,"ch-spinner",{"size":[1],"label":[1]}]]]], options);
7
+ return bootstrapLazy([["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[577,"ch-checkbox",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-drawer",[[769,"ch-drawer",{"open":[1028],"side":[1],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-emoji",[[513,"ch-emoji",{"name":[1],"alt":[1],"size":[1],"extIndex":[32],"loaded":[32]},null,{"name":[{"handleNameChange":0}]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"],"size":[1]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio",[[577,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-segmented-control",[[577,"ch-segmented-control",{"label":[1],"options":[16],"value":[1025],"size":[1],"name":[513],"disabled":[516],"required":[516],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[577,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}]]],["ch-tooltip",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]],["ch-alert_8",[[769,"ch-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"href":[1],"target":[1],"label":[1]}],[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[257,"ch-card"],[577,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[513],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"value":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[577,"ch-switch",{"label":[1],"name":[513],"value":[1],"checked":[1028],"disabled":[516],"required":[516],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4],"formDisabled":[32]},null,{"checked":[{"syncForm":0}],"required":[{"syncForm":0}],"invalid":[{"syncForm":0}],"errorMessage":[{"syncForm":0}]}],[513,"ch-spinner",{"size":[1],"label":[1]}]]]], options);
8
8
  };
9
9
 
10
10
  export { defineCustomElements };
@@ -1,4 +1,5 @@
1
1
  import { type EventEmitter } from '../../stencil-public-runtime';
2
+ export type ChModalSize = 'sm' | 'md' | 'lg';
2
3
  /**
3
4
  * Modal dialog, built on the native `<dialog>` element and opened with
4
5
  * `showModal()`.
@@ -36,6 +37,13 @@ export declare class ChModal {
36
37
  * label it would have no accessible name.
37
38
  */
38
39
  closeLabel?: string;
40
+ /**
41
+ * The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or
42
+ * `lg` (48rem). The `--ch-modal-width` custom property overrides it for a
43
+ * width none of the three cover. Either way the dialog never exceeds the
44
+ * viewport.
45
+ */
46
+ size: ChModalSize;
39
47
  /**
40
48
  * Emitted after the dialog opens.
41
49
  */
@@ -13,6 +13,7 @@ import { ChDividerOrientation } from "./components/ch-divider/ch-divider";
13
13
  import { ChDrawerSide } from "./components/ch-drawer/ch-drawer";
14
14
  import { ChEmojiSize } from "./components/ch-emoji/ch-emoji";
15
15
  import { ChLinkVariant } from "./components/ch-link/ch-link";
16
+ import { ChModalSize } from "./components/ch-modal/ch-modal";
16
17
  import { ChRadioOption } from "./components/ch-radio/ch-radio";
17
18
  import { ChSegmentedControlOption, ChSegmentedControlSize } from "./components/ch-segmented-control/ch-segmented-control";
18
19
  import { ChSelectOption } from "./components/ch-select/ch-select";
@@ -27,6 +28,7 @@ export { ChDividerOrientation } from "./components/ch-divider/ch-divider";
27
28
  export { ChDrawerSide } from "./components/ch-drawer/ch-drawer";
28
29
  export { ChEmojiSize } from "./components/ch-emoji/ch-emoji";
29
30
  export { ChLinkVariant } from "./components/ch-link/ch-link";
31
+ export { ChModalSize } from "./components/ch-modal/ch-modal";
30
32
  export { ChRadioOption } from "./components/ch-radio/ch-radio";
31
33
  export { ChSegmentedControlOption, ChSegmentedControlSize } from "./components/ch-segmented-control/ch-segmented-control";
32
34
  export { ChSelectOption } from "./components/ch-select/ch-select";
@@ -306,6 +308,11 @@ export namespace Components {
306
308
  * @default false
307
309
  */
308
310
  "open": boolean;
311
+ /**
312
+ * The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or `lg` (48rem). The `--ch-modal-width` custom property overrides it for a width none of the three cover. Either way the dialog never exceeds the viewport.
313
+ * @default 'md'
314
+ */
315
+ "size": ChModalSize;
309
316
  }
310
317
  interface ChRadio {
311
318
  /**
@@ -1347,6 +1354,11 @@ declare namespace LocalJSX {
1347
1354
  * @default false
1348
1355
  */
1349
1356
  "open"?: boolean;
1357
+ /**
1358
+ * The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or `lg` (48rem). The `--ch-modal-width` custom property overrides it for a width none of the three cover. Either way the dialog never exceeds the viewport.
1359
+ * @default 'md'
1360
+ */
1361
+ "size"?: ChModalSize;
1350
1362
  }
1351
1363
  interface ChRadio {
1352
1364
  /**
@@ -1742,6 +1754,7 @@ declare namespace LocalJSX {
1742
1754
  "open": boolean;
1743
1755
  "label": string;
1744
1756
  "closeLabel": string;
1757
+ "size": ChModalSize;
1745
1758
  }
1746
1759
  interface ChRadioAttributes {
1747
1760
  "label": string;
package/dist-vue/index.js CHANGED
@@ -115,6 +115,7 @@ export const ChModal = /*@__PURE__*/ defineContainer('ch-modal', defineChModal,
115
115
  'open',
116
116
  'label',
117
117
  'closeLabel',
118
+ 'size',
118
119
  'chOpen',
119
120
  'chClose'
120
121
  ], [
package/dist-vue/index.ts CHANGED
@@ -143,6 +143,7 @@ export const ChModal: StencilVueComponent<JSX.ChModal> = /*@__PURE__*/ defineCon
143
143
  'open',
144
144
  'label',
145
145
  'closeLabel',
146
+ 'size',
146
147
  'chOpen',
147
148
  'chClose'
148
149
  ], [
package/hydrate/index.js CHANGED
@@ -5561,7 +5561,7 @@ class ChCard {
5561
5561
  registerInstance(this, hostRef);
5562
5562
  }
5563
5563
  render() {
5564
- return (hAsync(Host, { key: '7e2833cdc6f37c6b8577c17677840913fb7cd9e1' }, hAsync("div", { key: '223c291e98af73ee2c299b8649773cfcf54388d7', class: "card" }, hAsync("slot", { key: 'e948386bcd492c31e264d50cf27d26e98dd771eb' }))));
5564
+ return (hAsync(Host, { key: '6d8b2d96c45fe2b0d5f23562d3c1b394adc8f9ea' }, hAsync("div", { key: '79b824b6924adbc407334adcd82128f8b1ec8a0a', class: "card" }, hAsync("slot", { key: '89b6bea5dee03bc65faf4aadb1725df393d55f51' }))));
5565
5565
  }
5566
5566
  static get style() { return chCardCss(); }
5567
5567
  static get cmpMeta() { return {
@@ -5685,7 +5685,7 @@ class ChCheckbox {
5685
5685
  return undefined;
5686
5686
  }
5687
5687
  render() {
5688
- return (hAsync(Host, { key: '4011f5a338d2b006a0bfa8217d1ee9b01b987d7d' }, hAsync("label", { key: '8c6c8d6c530d366b26f0cb602dc1e987ed8324d5', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("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 && hAsync("span", { key: '447812e11253c951cb6a5003adda13357fc6dec3', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '5369375f8dd0c2fa787207f8fcef4feeb78ddda6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'e90274e1df8d205053effe57ceb56f8e8b4deca2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5688
+ return (hAsync(Host, { key: '664ce0b9de17ed5beb378ed2ebaf2b554002a0c0' }, hAsync("label", { key: 'a9115153696ea97d404e901e463b9c2aa3fbc9c6', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: '2b8254463d3af0c36a46fda4fbe0eabbc8875e74', 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 && hAsync("span", { key: '764e0e2d588f25850efa559487f62ed72f3422ef', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '5ec4c53625bfb0a56451e8a6eab285d5268ac246', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '36dabfce3ea276a4cc77b5f1e8b799403abcfccc', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
5689
5689
  }
5690
5690
  static get formAssociated() { return true; }
5691
5691
  static get watchers() { return {
@@ -6203,7 +6203,7 @@ class ChInput {
6203
6203
  return undefined;
6204
6204
  }
6205
6205
  render() {
6206
- return (hAsync(Host, { key: '8f06015ae952c02467d45bb97d306eb7525a7429' }, this.label && (hAsync("label", { key: '300cf07bfc4e79eb5904140e105d33fa96f09efe', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: '85ab8a0f5a35f421c9af6137bc691e6fb543e940', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '4a64db0bc1f03dd756dd55ecf6ff8b95de00dfe1', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'c1c8a0c8f719f53941180ae05b17710a5f7c212b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6206
+ return (hAsync(Host, { key: 'cf143097fd39199c6c8a81484a4e8621e7c4d9cb' }, this.label && (hAsync("label", { key: '40643f72949b11fc7dcdd4a43794a37103708992', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'ab3a0b8cc51e9c863001ddb089516bbf0874e889', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'ad7eb7b40aaab69b6bc929c632ce4736fe3c39a5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '6f7738076128a8242d1dcc97ac99ee1275fc7e14', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6207
6207
  }
6208
6208
  static get formAssociated() { return true; }
6209
6209
  static get watchers() { return {
@@ -6297,7 +6297,7 @@ class ChLink {
6297
6297
  }; }
6298
6298
  }
6299
6299
 
6300
- 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}}`;
6300
+ const chModalCss = () => `.modal{box-sizing:border-box;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--sm{max-width:min(var(--ch-modal-width, 24rem), calc(100vw - var(--spacing-6xl)))}.modal--md{max-width:min(var(--ch-modal-width, 32rem), calc(100vw - var(--spacing-6xl)))}.modal--lg{max-width:min(var(--ch-modal-width, 48rem), calc(100vw - var(--spacing-6xl)))}.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}}`;
6301
6301
 
6302
6302
  /**
6303
6303
  * Modal dialog, built on the native `<dialog>` element and opened with
@@ -6341,6 +6341,13 @@ class ChModal {
6341
6341
  * label it would have no accessible name.
6342
6342
  */
6343
6343
  closeLabel;
6344
+ /**
6345
+ * The maximum width of the dialog. One of `sm` (24rem), `md` (32rem), or
6346
+ * `lg` (48rem). The `--ch-modal-width` custom property overrides it for a
6347
+ * width none of the three cover. Either way the dialog never exceeds the
6348
+ * viewport.
6349
+ */
6350
+ size = 'md';
6344
6351
  /**
6345
6352
  * Emitted after the dialog opens.
6346
6353
  */
@@ -6444,7 +6451,7 @@ class ChModal {
6444
6451
  this.chClose.emit();
6445
6452
  };
6446
6453
  render() {
6447
- return (hAsync(Host, { key: '2a8271f9606bc98d0b054016a60afbcb36dfaa48' }, hAsync("dialog", { key: '8c866544fd071b98a0b2e58df1690705347a183c', class: "modal", "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: 'fceb7d0e17ecfe639f518c26ea75abf96bf3469e', class: "modal-head" }, hAsync("slot", { key: '89359d0e82b4c5694b8ad76bd7c67b2a1a80f11a', name: "heading" }), this.closeLabel && (hAsync("button", { key: 'edcf61410f993d367613a4bd485c63336ee82619', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '80ce411b41882508b805aeb1ad0caee07fbbeaaa', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'd0f72191474917a8e4c68c4996a40340c4494651', class: "modal-body" }, hAsync("slot", { key: '46c1d56f416a742176b4be753aa7a8af14bb579d' })))));
6454
+ return (hAsync(Host, { key: 'd4dfbaad43391e3f34eb890b0d04a6ee38fa82e5' }, hAsync("dialog", { key: '3a3142c9baee06b381c7aaa920718f92bb8f1176', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '34855134cc5cb2701a9b8b60ee46087d4f00fd13', class: "modal-head" }, hAsync("slot", { key: '7fa6a49a0f6b914fc8b825009bb46f5cd799f33b', name: "heading" }), this.closeLabel && (hAsync("button", { key: '55f15f81f94c7a08f54e9d6f9a722452b32f01af', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '545af17e1065c558a1cc5274a444f610a77a3044', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'a78ea4c9f66c03d641c9ef1aa14058b6371160fb', class: "modal-body" }, hAsync("slot", { key: 'ffc1accb70cfc2e8ee6f11088a3a1da09a8b3430' })))));
6448
6455
  }
6449
6456
  static get watchers() { return {
6450
6457
  "open": [{
@@ -6458,7 +6465,8 @@ class ChModal {
6458
6465
  "$members$": {
6459
6466
  "open": [1028],
6460
6467
  "label": [1],
6461
- "closeLabel": [1, "close-label"]
6468
+ "closeLabel": [1, "close-label"],
6469
+ "size": [1]
6462
6470
  },
6463
6471
  "$listeners$": undefined,
6464
6472
  "$lazyBundleId$": "-",
@@ -6580,7 +6588,7 @@ class ChRadio {
6580
6588
  }
6581
6589
  render() {
6582
6590
  const groupName = this.name || `${this.groupId}-group`;
6583
- return (hAsync(Host, { key: '3cd55c205d303df45671dc76756b1fcc78baf760' }, this.label && (hAsync("span", { key: '0e9ab53baa202dff829a46e8674d7f994f9f14b9', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '584e1e36954f7daad8b71c9b690f7fe42f53bb09', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("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 }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '9030ddc9030ea728d56fa2f5520f9df26df75f0d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'e2ba85ff960ae61f4b882190e19558f6189c569b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6591
+ return (hAsync(Host, { key: '67d5306b86b9c5f6a085748cf18bcd8421afb7df' }, this.label && (hAsync("span", { key: '65ff0ced1f1954899765b1df3e77a0a10830b952', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '65d1a571a6a88ded21b3adc25dff9bd9cfbc5634', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("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 }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '328c40801e34c823de319f5de92be8eb19360bcb', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '3606463c798a7bd3ff0545e7691107cf506a2df1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6584
6592
  }
6585
6593
  static get formAssociated() { return true; }
6586
6594
  static get watchers() { return {
@@ -6724,7 +6732,7 @@ class ChSegmentedControl {
6724
6732
  }
6725
6733
  render() {
6726
6734
  const groupName = this.name || `${this.groupId}-group`;
6727
- return (hAsync(Host, { key: 'fd588544d9cdebaaeb1961f4ecb5c5630e8e4699' }, this.label && (hAsync("span", { key: '58ade8d7858d6e12d71778bc07337ab485be383d', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'b872fc7e4a2dc678dbc1c9cf7c30d66ce24ebcac', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), hAsync("span", { class: "label-text" }, option.label)))))));
6735
+ return (hAsync(Host, { key: 'd1b6810caed6826dc4020962c0e9dd0a037013e9' }, this.label && (hAsync("span", { key: '11bc2a5a41b38f10c7d5a6687609c3f3688db533', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'ca18b975c4a0b7d42fea8ca6d483d58d15112f58', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), hAsync("span", { class: "label-text" }, option.label)))))));
6728
6736
  }
6729
6737
  static get formAssociated() { return true; }
6730
6738
  static get watchers() { return {
@@ -6870,7 +6878,7 @@ class ChSelect {
6870
6878
  return undefined;
6871
6879
  }
6872
6880
  render() {
6873
- return (hAsync(Host, { key: 'bf1cb02b17b6c31297e1b77e9cad6488c9fafd1c' }, this.label && (hAsync("label", { key: '837158a8827a3f9af3a58a14c104f15919058ae0', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: '4622f105d8852a2658b917f1329c3c71c791547a', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: '1d3ea13f0f9f8f0c7b3b5d0c3a5a36cb465937b2', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'd73ff8034dfe5546f7f77417d73e91a0fc763321', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'fa487e405f01ae8473d442b1b94ea1cc9eb07d31', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6881
+ return (hAsync(Host, { key: '3490540c681d453acea3a53fe09f52d1e51c61b3' }, this.label && (hAsync("label", { key: '33d478bb47da9fca08c57021decdf6c9eac00142', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'b109bcf23a516df3190a6648d02163b84c0418ad', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: '76e447051d2cf751211884a926df71a0eed141a7', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '8756bc6783bdb9d18d306516a89c805e6fc5b647', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'f52f95a4d067f29ae7ac22337622411a762385a0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
6874
6882
  }
6875
6883
  static get formAssociated() { return true; }
6876
6884
  static get watchers() { return {
@@ -6939,7 +6947,7 @@ class ChSpinner {
6939
6947
  label;
6940
6948
  render() {
6941
6949
  const labelled = Boolean(this.label);
6942
- return (hAsync(Host, { key: 'cdb44d362b4f366703c13816d7c72967e03709b1' }, hAsync("span", { key: '5368a6f9cef9ff6eafc4ac0323e2cc01da6e627f', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
6950
+ return (hAsync(Host, { key: '027b184e902f41230aa10e15a3a28f2795758c57' }, hAsync("span", { key: '8fa60714afc8767a01f2b8b3313eb003576592b6', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
6943
6951
  }
6944
6952
  static get style() { return chSpinnerCss(); }
6945
6953
  static get cmpMeta() { return {
@@ -7189,7 +7197,7 @@ class ChTabs {
7189
7197
  }
7190
7198
  render() {
7191
7199
  const active = this.activeValue;
7192
- return (hAsync(Host, { key: '8b0757158cca856bd984e99b86b9f1c3a79e1dfb' }, hAsync("div", { key: 'e1ecf05df41e26787ed3702c113a393edcc6dea4', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
7200
+ return (hAsync(Host, { key: '831a0c2d53d4caa19be95a3c2cbbfefb84f65599' }, hAsync("div", { key: '791bb980cb6d7bb137390737bba4796b9f86c963', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
7193
7201
  const selected = tab.value === active;
7194
7202
  return (hAsync("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
7195
7203
  })), this.tabs.map(tab => (hAsync("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, hAsync("slot", { name: `panel-${tab.value}` }))))));
@@ -7459,7 +7467,7 @@ class ChTooltip {
7459
7467
  trigger.setAttribute('aria-describedby', content.id);
7460
7468
  };
7461
7469
  render() {
7462
- return (hAsync(Host, { key: '89e1b0de9e5d2a33edba2cc0b479788694c5a202' }, hAsync("span", { key: 'c7a31597ba6fd6a7c68cdd74cf8170d14b9e85ba', class: "anchor" }, hAsync("slot", { key: 'eac54ebeffa8ccbfdd0c4e42e26cd4c40e81d649', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: '326581a3f64a2165a9031818782a50de7fe05fa7', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, hAsync("slot", { key: '739d4b50a611cc4db8fdc802f2f39deb68f974eb', name: "content", onSlotchange: this.associate })))));
7470
+ return (hAsync(Host, { key: '77c1788847db3e52409bf13d1d21bf7828310ef5' }, hAsync("span", { key: '8fcb630946914891dbc1812e506a4160c101c426', class: "anchor" }, hAsync("slot", { key: '798c3d880b53191653f02fab57ce400fcf679f55', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: '3c10d8e0872da7c0f2920283f812e652ae3f2b71', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, hAsync("slot", { key: '3a9bc13d5871144d75153d248ee05a28dda6679e', name: "content", onSlotchange: this.associate })))));
7463
7471
  }
7464
7472
  static get style() { return chTooltipCss(); }
7465
7473
  static get cmpMeta() { return {