@chiralkit/design-system 0.1.0-alpha.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 (146) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/chiralkit-ds/chiralkit-ds.css +1 -0
  4. package/dist/chiralkit-ds/chiralkit-ds.esm.js +1 -0
  5. package/dist/chiralkit-ds/index.esm.js +1 -0
  6. package/dist/chiralkit-ds/p-038fa008.entry.js +1 -0
  7. package/dist/chiralkit-ds/p-2fdc1012.entry.js +1 -0
  8. package/dist/chiralkit-ds/p-306ec33b.entry.js +1 -0
  9. package/dist/chiralkit-ds/p-3f704698.entry.js +1 -0
  10. package/dist/chiralkit-ds/p-41081d22.entry.js +1 -0
  11. package/dist/chiralkit-ds/p-7d7e5aac.entry.js +1 -0
  12. package/dist/chiralkit-ds/p-84b801f8.entry.js +1 -0
  13. package/dist/chiralkit-ds/p-a28c71b4.entry.js +1 -0
  14. package/dist/chiralkit-ds/p-be84312f.entry.js +1 -0
  15. package/dist/chiralkit-ds/p-c8015fe6.entry.js +1 -0
  16. package/dist/chiralkit-ds/p-d36a6bea.entry.js +1 -0
  17. package/dist/chiralkit-ds/p-e-glNjK6.js +2 -0
  18. package/dist/chiralkit-ds/p-f0f9ff61.entry.js +1 -0
  19. package/dist/cjs/chiralkit-ds.cjs.js +24 -0
  20. package/dist/cjs/ds-badge.cjs.entry.js +18 -0
  21. package/dist/cjs/ds-button.cjs.entry.js +26 -0
  22. package/dist/cjs/ds-card.cjs.entry.js +17 -0
  23. package/dist/cjs/ds-checkbox.cjs.entry.js +67 -0
  24. package/dist/cjs/ds-code-block.cjs.entry.js +39 -0
  25. package/dist/cjs/ds-dialog.cjs.entry.js +67 -0
  26. package/dist/cjs/ds-input.cjs.entry.js +50 -0
  27. package/dist/cjs/ds-loader.cjs.entry.js +26 -0
  28. package/dist/cjs/ds-select.cjs.entry.js +85 -0
  29. package/dist/cjs/ds-tabs.cjs.entry.js +138 -0
  30. package/dist/cjs/ds-textarea.cjs.entry.js +50 -0
  31. package/dist/cjs/ds-tooltip.cjs.entry.js +233 -0
  32. package/dist/cjs/index-mMvyq7U_.js +2018 -0
  33. package/dist/cjs/index.cjs.js +10 -0
  34. package/dist/cjs/loader.cjs.js +12 -0
  35. package/dist/collection/collection-manifest.json +24 -0
  36. package/dist/collection/components/ds-badge/ds-badge.css +36 -0
  37. package/dist/collection/components/ds-badge/ds-badge.js +93 -0
  38. package/dist/collection/components/ds-button/ds-button.css +66 -0
  39. package/dist/collection/components/ds-button/ds-button.js +197 -0
  40. package/dist/collection/components/ds-card/ds-card.css +12 -0
  41. package/dist/collection/components/ds-card/ds-card.js +68 -0
  42. package/dist/collection/components/ds-checkbox/ds-checkbox.css +22 -0
  43. package/dist/collection/components/ds-checkbox/ds-checkbox.js +339 -0
  44. package/dist/collection/components/ds-code-block/ds-code-block.css +65 -0
  45. package/dist/collection/components/ds-code-block/ds-code-block.js +162 -0
  46. package/dist/collection/components/ds-dialog/ds-dialog.css +30 -0
  47. package/dist/collection/components/ds-dialog/ds-dialog.js +313 -0
  48. package/dist/collection/components/ds-input/ds-input.css +38 -0
  49. package/dist/collection/components/ds-input/ds-input.js +353 -0
  50. package/dist/collection/components/ds-loader/ds-loader.css +94 -0
  51. package/dist/collection/components/ds-loader/ds-loader.js +149 -0
  52. package/dist/collection/components/ds-select/ds-select.css +69 -0
  53. package/dist/collection/components/ds-select/ds-select.js +235 -0
  54. package/dist/collection/components/ds-tabs/ds-tabs.css +59 -0
  55. package/dist/collection/components/ds-tabs/ds-tabs.js +248 -0
  56. package/dist/collection/components/ds-textarea/ds-textarea.css +41 -0
  57. package/dist/collection/components/ds-textarea/ds-textarea.js +342 -0
  58. package/dist/collection/components/ds-tooltip/ds-tooltip.css +31 -0
  59. package/dist/collection/components/ds-tooltip/ds-tooltip.js +318 -0
  60. package/dist/collection/components.js +2 -0
  61. package/dist/collection/index.js +1 -0
  62. package/dist/components/ds-badge.d.ts +11 -0
  63. package/dist/components/ds-badge.js +1 -0
  64. package/dist/components/ds-button.d.ts +11 -0
  65. package/dist/components/ds-button.js +1 -0
  66. package/dist/components/ds-card.d.ts +11 -0
  67. package/dist/components/ds-card.js +1 -0
  68. package/dist/components/ds-checkbox.d.ts +11 -0
  69. package/dist/components/ds-checkbox.js +1 -0
  70. package/dist/components/ds-code-block.d.ts +11 -0
  71. package/dist/components/ds-code-block.js +1 -0
  72. package/dist/components/ds-dialog.d.ts +11 -0
  73. package/dist/components/ds-dialog.js +1 -0
  74. package/dist/components/ds-input.d.ts +11 -0
  75. package/dist/components/ds-input.js +1 -0
  76. package/dist/components/ds-loader.d.ts +11 -0
  77. package/dist/components/ds-loader.js +1 -0
  78. package/dist/components/ds-select.d.ts +11 -0
  79. package/dist/components/ds-select.js +1 -0
  80. package/dist/components/ds-tabs.d.ts +11 -0
  81. package/dist/components/ds-tabs.js +1 -0
  82. package/dist/components/ds-textarea.d.ts +11 -0
  83. package/dist/components/ds-textarea.js +1 -0
  84. package/dist/components/ds-tooltip.d.ts +11 -0
  85. package/dist/components/ds-tooltip.js +1 -0
  86. package/dist/components/index.d.ts +35 -0
  87. package/dist/components/index.js +1 -0
  88. package/dist/components/p-DDUZow8F.js +1 -0
  89. package/dist/components/p-ZsYP0VBq.js +1 -0
  90. package/dist/components/p-k0ywxWpC.js +1 -0
  91. package/dist/esm/chiralkit-ds.js +20 -0
  92. package/dist/esm/ds-badge.entry.js +16 -0
  93. package/dist/esm/ds-button.entry.js +24 -0
  94. package/dist/esm/ds-card.entry.js +15 -0
  95. package/dist/esm/ds-checkbox.entry.js +65 -0
  96. package/dist/esm/ds-code-block.entry.js +37 -0
  97. package/dist/esm/ds-dialog.entry.js +65 -0
  98. package/dist/esm/ds-input.entry.js +48 -0
  99. package/dist/esm/ds-loader.entry.js +24 -0
  100. package/dist/esm/ds-select.entry.js +83 -0
  101. package/dist/esm/ds-tabs.entry.js +136 -0
  102. package/dist/esm/ds-textarea.entry.js +48 -0
  103. package/dist/esm/ds-tooltip.entry.js +231 -0
  104. package/dist/esm/index-e-glNjK6.js +2008 -0
  105. package/dist/esm/index.js +3 -0
  106. package/dist/esm/loader.js +10 -0
  107. package/dist/index.cjs.js +1 -0
  108. package/dist/index.js +1 -0
  109. package/dist/layouts/app-shell.css +84 -0
  110. package/dist/tests/a11y.js +55 -0
  111. package/dist/types/Users/alex/projects/MyGitHub/chiralkit/packages/design-system/.stencil/tests/a11y.d.ts +17 -0
  112. package/dist/types/components/ds-badge/ds-badge.d.ts +54 -0
  113. package/dist/types/components/ds-button/ds-button.d.ts +75 -0
  114. package/dist/types/components/ds-card/ds-card.d.ts +53 -0
  115. package/dist/types/components/ds-checkbox/ds-checkbox.d.ts +94 -0
  116. package/dist/types/components/ds-code-block/ds-code-block.d.ts +83 -0
  117. package/dist/types/components/ds-dialog/ds-dialog.d.ts +148 -0
  118. package/dist/types/components/ds-input/ds-input.d.ts +104 -0
  119. package/dist/types/components/ds-loader/ds-loader.d.ts +64 -0
  120. package/dist/types/components/ds-select/ds-select.d.ts +123 -0
  121. package/dist/types/components/ds-tabs/ds-tabs.d.ts +155 -0
  122. package/dist/types/components/ds-textarea/ds-textarea.d.ts +93 -0
  123. package/dist/types/components/ds-tooltip/ds-tooltip.d.ts +26 -0
  124. package/dist/types/components.d.ts +3068 -0
  125. package/dist/types/index.d.ts +1 -0
  126. package/dist/types/stencil-public-runtime.d.ts +1861 -0
  127. package/docs.json +2112 -0
  128. package/loader/cdn.js +1 -0
  129. package/loader/index.cjs.js +1 -0
  130. package/loader/index.d.ts +24 -0
  131. package/loader/index.es2017.js +1 -0
  132. package/loader/index.js +2 -0
  133. package/package.json +78 -0
  134. package/react/components/ds-badge.tsx +25 -0
  135. package/react/components/ds-button.tsx +25 -0
  136. package/react/components/ds-card.tsx +25 -0
  137. package/react/components/ds-checkbox.tsx +25 -0
  138. package/react/components/ds-code-block.tsx +25 -0
  139. package/react/components/ds-dialog.tsx +31 -0
  140. package/react/components/ds-input.tsx +25 -0
  141. package/react/components/ds-loader.tsx +25 -0
  142. package/react/components/ds-select.tsx +25 -0
  143. package/react/components/ds-tabs.tsx +25 -0
  144. package/react/components/ds-textarea.tsx +25 -0
  145. package/react/components/ds-tooltip.tsx +25 -0
  146. package/react/components.ts +162 -0
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsBadge extends Components.DsBadge, HTMLElement {}
4
+ export const DsBadge: {
5
+ prototype: DsBadge;
6
+ new (): DsBadge;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as a,H as o,h as d,c as s}from"./p-k0ywxWpC.js";const t=a(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}variant="neutral";render(){return d(s,{key:"45ef132e5fd2c8a1623768ea58431b0cd4f581b4"},d("span",{key:"a406af30e18ffee0751ad5f10499f9ff394ae086",class:"ds-badge ds-badge--"+this.variant},d("slot",{key:"59bf92a176deeddf23a2f96f194ae4ed02ea0506"})))}static get style(){return":host{display:inline-block}.ds-badge{display:inline-block;padding:3px 8px;border-radius:999px;font-family:var(--ds-font-family);font-size:11px;font-weight:500;letter-spacing:0.02em;line-height:1.4;white-space:nowrap;color:currentColor}.ds-badge--neutral{background-color:oklch(0.65 0.03 260 / 0.15)}.ds-badge--ui-component{background-color:oklch(0.733 0.178 307 / 0.15)}.ds-badge--recipe{background-color:oklch(0.75 0.13 190 / 0.15)}.ds-badge--agent{background-color:oklch(0.82 0.15 80 / 0.15)}.ds-badge--config{background-color:oklch(0.65 0.03 260 / 0.15)}"}},[769,"ds-badge",{variant:[1]}]);function n(){"undefined"!=typeof customElements&&["ds-badge"].forEach((a=>{"ds-badge"===a&&(customElements.get(e(a))||customElements.define(e(a),t))}))}n();const c=t,r=n;export{c as DsBadge,r as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsButton extends Components.DsButton, HTMLElement {}
4
+ export const DsButton: {
5
+ prototype: DsButton;
6
+ new (): DsButton;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{D as o,d as s}from"./p-DDUZow8F.js";const p=o,r=s;export{p as DsButton,r as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsCard extends Components.DsCard, HTMLElement {}
4
+ export const DsCard: {
5
+ prototype: DsCard;
6
+ new (): DsCard;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as r,p as s,H as e,h as c,c as o}from"./p-k0ywxWpC.js";const d=s(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow()}render(){return c(o,{key:"288726502b909d34c3498bbac671ae892b0f6e17"},c("div",{key:"2d9efecfdc78292d47d1c322e7d5f30820467ac4",class:"ds-card"},c("slot",{key:"76ee24c626aaef9528200fc4665a50c491f9f7a0"})))}static get style(){return":host{display:block}.ds-card{color:inherit;background-color:color-mix(in oklch, currentColor 4%, transparent);border:1px solid color-mix(in oklch, currentColor 15%, transparent);border-radius:var(--ds-radius-md);padding:var(--ds-spacing-lg);box-sizing:border-box}"}},[257,"ds-card"]);function t(){"undefined"!=typeof customElements&&["ds-card"].forEach((s=>{"ds-card"===s&&(customElements.get(r(s))||customElements.define(r(s),d))}))}t();const a=d,n=t;export{a as DsCard,n as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsCheckbox extends Components.DsCheckbox, HTMLElement {}
4
+ export const DsCheckbox: {
5
+ prototype: DsCheckbox;
6
+ new (): DsCheckbox;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as t,H as i,d as s,h as a,c as d}from"./p-k0ywxWpC.js";const c=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsChange=s(this,"dsChange")}inputEl;checked=!1;indeterminate=!1;name;value;disabled=!1;required=!1;invalid=!1;describedBy;label;dsChange;watchChecked(e){this.inputEl&&this.inputEl.checked!==e&&(this.inputEl.checked=e)}watchIndeterminate(e){this.inputEl&&this.inputEl.indeterminate!==e&&(this.inputEl.indeterminate=e)}componentDidLoad(){this.syncNativeState()}componentDidUpdate(){this.syncNativeState()}syncNativeState(){this.inputEl&&(this.inputEl.checked!==this.checked&&(this.inputEl.checked=this.checked),this.inputEl.indeterminate!==this.indeterminate&&(this.inputEl.indeterminate=this.indeterminate))}onChange=e=>{this.dsChange.emit(e.target.checked)};render(){return a(d,{key:"a935a67c0f4fa5d6cb36c2338d761318344573ef"},a("input",{key:"4664d7a5a2fbce7987bbaf25b50355ddfc1be97f",class:"ds-checkbox",type:"checkbox",name:this.name,value:this.value,disabled:this.disabled,"aria-label":this.label,"aria-required":this.required?"true":void 0,"aria-invalid":this.invalid?"true":void 0,"aria-describedby":this.describedBy,ref:e=>this.inputEl=e,onChange:this.onChange}))}static get watchers(){return{checked:[{watchChecked:0}],indeterminate:[{watchIndeterminate:0}]}}static get style(){return":host{display:inline-flex;vertical-align:middle}.ds-checkbox{cursor:pointer;margin:0}.ds-checkbox:disabled{cursor:not-allowed;opacity:0.5}"}},[513,"ds-checkbox",{checked:[4],indeterminate:[4],name:[1],value:[1],disabled:[4],required:[4],invalid:[4],describedBy:[1,"described-by"],label:[1]},void 0,{checked:[{watchChecked:0}],indeterminate:[{watchIndeterminate:0}]}]);function h(){"undefined"!=typeof customElements&&["ds-checkbox"].forEach((t=>{"ds-checkbox"===t&&(customElements.get(e(t))||customElements.define(e(t),c))}))}h();const n=c,r=h;export{n as DsCheckbox,r as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsCodeBlock extends Components.DsCodeBlock, HTMLElement {}
4
+ export const DsCodeBlock: {
5
+ prototype: DsCodeBlock;
6
+ new (): DsCodeBlock;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as o,p as e,H as r,h as c,c as t}from"./p-k0ywxWpC.js";const d=e(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow()}code;language="bash";copied=!1;timer;disconnectedCallback(){void 0!==this.timer&&window.clearTimeout(this.timer)}async onCopy(){try{await navigator.clipboard.writeText(this.code),this.copied=!0,void 0!==this.timer&&window.clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.copied=!1}),1400)}catch{}}render(){return c(t,{key:"27b2c85bb8cf97c4b176c175f818bd077cfaa3f3"},c("div",{key:"0f08c5d94ce947207d02692bfd733e9d90ca8b59",class:"ds-code-block"},c("div",{key:"66dcbf8c59d1ecb4c373b5c1daad583f7e7a05ad",class:"ds-code-block__header"},c("span",{key:"fddc6fc3943ffcfafc68bf56d84859cfd016dea9",class:"ds-code-block__lang"},this.language),c("button",{key:"277ef9eee0a8d9aa3ac54a75b11074315f26fa5e",type:"button",class:"ds-code-block__copy",onClick:()=>this.onCopy(),"aria-label":this.copied?"Copied":"Copy code"},this.copied?c("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},c("polyline",{points:"20 6 9 17 4 12"})):c("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},c("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),c("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})),c("span",{key:"81e87579225b696300fd2f2b8035553a55d3c7f0"},this.copied?"Copied":"Copy"))),c("pre",{key:"06dc49a58e9fd80b0d334a349ef1ad9f540d37d7"},c("code",{key:"ba689fa980819ee4c12e9d5382d80d21919c8100"},this.code))))}static get style(){return":host{display:block}.ds-code-block{border:1px solid var(--ds-code-block-border, currentColor);border-color:color-mix(in oklch, currentColor 15%, transparent);background:var(--ds-code-block-bg, color-mix(in oklch, currentColor 4%, transparent));border-radius:10px;overflow:hidden;font-family:var(--ds-font-family);font-size:13px}.ds-code-block__header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid color-mix(in oklch, currentColor 12%, transparent);color:color-mix(in oklch, currentColor 55%, transparent)}.ds-code-block__lang{font-size:11px;text-transform:uppercase;letter-spacing:0.06em}.ds-code-block__copy{background:transparent;border:1px solid color-mix(in oklch, currentColor 15%, transparent);color:color-mix(in oklch, currentColor 70%, transparent);padding:4px 8px;border-radius:6px;font:inherit;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:color 120ms ease, border-color 120ms ease}.ds-code-block__copy:hover{color:currentColor;border-color:color-mix(in oklch, currentColor 30%, transparent)}.ds-code-block__copy:focus-visible{outline:2px solid var(--ds-color-focus);outline-offset:2px}pre{margin:0;padding:16px;overflow-x:auto}code{font-family:inherit;color:currentColor;white-space:pre}"}},[513,"ds-code-block",{code:[1],language:[1],copied:[32]}]);function s(){"undefined"!=typeof customElements&&["ds-code-block"].forEach((e=>{"ds-code-block"===e&&(customElements.get(o(e))||customElements.define(o(e),d))}))}s();const n=d,i=s;export{n as DsCodeBlock,i as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsDialog extends Components.DsDialog, HTMLElement {}
4
+ export const DsDialog: {
5
+ prototype: DsDialog;
6
+ new (): DsDialog;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as s,H as t,d as o,h as i,c as a}from"./p-k0ywxWpC.js";const d=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsOpen=o(this,"dsOpen"),this.dsClose=o(this,"dsClose")}dialogEl;open=!1;label;labelledBy;describedBy;dsOpen;dsClose;watchOpen(e){this.syncOpen(e)}componentDidLoad(){this.dialogEl?.addEventListener("close",this.onNativeClose),this.open&&this.syncOpen(!0)}disconnectedCallback(){this.dialogEl?.removeEventListener("close",this.onNativeClose)}syncOpen(e){if(!this.dialogEl)return;const s=this.dialogEl.open;e&&!s?(this.dialogEl.showModal(),this.dsOpen.emit()):!e&&s&&this.dialogEl.close()}onNativeClose=()=>{this.dsClose.emit()};render(){return i(a,{key:"8b25b70865ea028c81405f77a4d016348507aae6"},i("dialog",{key:"0c82754fe4e4ecf68232a93616bbff3621866375",class:"ds-dialog","aria-label":this.label,"aria-labelledby":this.labelledBy,"aria-describedby":this.describedBy,ref:e=>this.dialogEl=e},i("slot",{key:"30131eed9eec7db67a407770b5caefe42c78b68a"})))}static get watchers(){return{open:[{watchOpen:0}]}}static get style(){return":host{display:contents}.ds-dialog{color:inherit;background-color:color-mix(in oklch, currentColor 4%, Canvas);border:1px solid color-mix(in oklch, currentColor 15%, transparent);border-radius:var(--ds-radius-md);padding:var(--ds-spacing-xl);box-sizing:border-box;max-width:min(90vw, 32rem);max-height:90vh;overflow:auto}.ds-dialog::backdrop{background-color:rgba(0, 0, 0, 0.5)}"}},[769,"ds-dialog",{open:[4],label:[1],labelledBy:[1,"labelled-by"],describedBy:[1,"described-by"]},void 0,{open:[{watchOpen:0}]}]);function r(){"undefined"!=typeof customElements&&["ds-dialog"].forEach((s=>{"ds-dialog"===s&&(customElements.get(e(s))||customElements.define(e(s),d))}))}r();const l=d,c=r;export{l as DsDialog,c as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsInput extends Components.DsInput, HTMLElement {}
4
+ export const DsInput: {
5
+ prototype: DsInput;
6
+ new (): DsInput;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as i,H as t,d as s,h as a,c as r}from"./p-k0ywxWpC.js";const d=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsInput=s(this,"dsInput")}inputEl;value;name;type="text";placeholder;disabled=!1;required=!1;invalid=!1;describedBy;label;size="md";dsInput;watchValue(e){this.inputEl&&this.inputEl.value!==(e??"")&&(this.inputEl.value=e??"")}componentDidLoad(){this.inputEl&&void 0!==this.value&&(this.inputEl.value=this.value)}onInput=e=>{this.dsInput.emit(e.target.value)};render(){return a(r,{key:"efce39c6ecfb8dda71577e7fb7b285ddc16287f5"},a("input",{key:"5f6ad573f20e6eca20f42aa96c8acdf386508d1c",class:"ds-input ds-input--"+this.size,type:this.type,name:this.name,placeholder:this.placeholder,disabled:this.disabled,"aria-label":this.label,"aria-required":this.required?"true":void 0,"aria-invalid":this.invalid?"true":void 0,"aria-describedby":this.describedBy,ref:e=>this.inputEl=e,onInput:this.onInput}))}static get watchers(){return{value:[{watchValue:0}]}}static get style(){return':host{display:inline-block}.ds-input{font-family:var(--ds-font-family);font-size:var(--ds-font-size-md);background-color:transparent;color:inherit;border:1px solid color-mix(in oklch, currentColor 22%, transparent);-webkit-appearance:none;appearance:none;box-sizing:border-box;width:100%}.ds-input::placeholder{color:color-mix(in oklch, currentColor 45%, transparent)}.ds-input:disabled{opacity:0.5;cursor:not-allowed}.ds-input[aria-invalid="true"]{border-color:color-mix(in oklch, currentColor 55%, transparent)}.ds-input--md{border-radius:var(--ds-radius-sm);padding:var(--ds-spacing-sm) var(--ds-spacing-lg)}.ds-input--lg{border-radius:var(--ds-radius-md);padding:var(--ds-spacing-md) var(--ds-spacing-xl)}'}},[513,"ds-input",{value:[1],name:[1],type:[1],placeholder:[1],disabled:[4],required:[4],invalid:[4],describedBy:[1,"described-by"],label:[1],size:[1]},void 0,{value:[{watchValue:0}]}]);function n(){"undefined"!=typeof customElements&&["ds-input"].forEach((i=>{"ds-input"===i&&(customElements.get(e(i))||customElements.define(e(i),d))}))}n();const o=d,l=n;export{o as DsInput,l as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsLoader extends Components.DsLoader, HTMLElement {}
4
+ export const DsLoader: {
5
+ prototype: DsLoader;
6
+ new (): DsLoader;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as r,H as o,h as d,c as a}from"./p-k0ywxWpC.js";const s=r(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}size="md";label="Loading";speed="normal";render(){return d(a,{key:"d7017e7e3c970e27bffa30c193abd937c5ec13cd",role:"status","aria-label":this.label},d("svg",{key:"9eb10695249bc4c833b6347d38226fdc37d4be7d",class:["ds-loader","ds-loader--"+this.size,"ds-loader--speed-"+this.speed].join(" "),viewBox:"-48 -48 96 96","aria-hidden":"true",focusable:"false"},d("g",{key:"711ee60648593d216687087c5b2145ec25120bc5",class:"ds-loader__half ds-loader__half--a"},d("path",{key:"9efdc31104b6037a57d7bdc802303938f7285666",d:t,fill:"none",stroke:"currentColor","stroke-width":"14","stroke-linecap":"round","stroke-linejoin":"round"})),d("g",{key:"fcbeefc154e0e9db5b0378f77dafa3f9c0162e92",class:"ds-loader__half ds-loader__half--b"},d("g",{key:"790b3ec1c4b262352cc383ab6b9f7d5cbb77474b",class:"ds-loader__mirror"},d("path",{key:"694713be37532568852b2de2530cc50c1ff3b8de",d:t,fill:"none",stroke:"currentColor","stroke-width":"14","stroke-linecap":"round","stroke-linejoin":"round"})))))}static get style(){return":host{display:inline-flex;color:currentColor;line-height:0}.ds-loader{display:block;width:40px;height:40px;color:inherit}.ds-loader--sm{width:16px;height:16px}.ds-loader--md{width:40px;height:40px}.ds-loader--lg{width:120px;height:120px}.ds-loader__half{transform-box:view-box;transform-origin:50% 50%;animation:ds-loader-swing 1.4s cubic-bezier(0.6, 0, 0.4, 1) infinite}.ds-loader__half--b{animation-name:ds-loader-swing-mirror}.ds-loader__mirror{transform-box:view-box;transform-origin:50% 50%;transform:scaleX(-1)}.ds-loader--speed-slow .ds-loader__half{animation-duration:2.2s}.ds-loader--speed-fast .ds-loader__half{animation-duration:0.9s}@keyframes ds-loader-swing{0%{transform:rotate(180deg)}50%{transform:rotate(0deg)}100%{transform:rotate(180deg)}}@keyframes ds-loader-swing-mirror{0%{transform:rotate(-180deg)}50%{transform:rotate(0deg)}100%{transform:rotate(-180deg)}}@media (prefers-reduced-motion: reduce){.ds-loader__half,.ds-loader__half--b{animation:ds-loader-pulse 2s ease-in-out infinite}@keyframes ds-loader-pulse{0%,100%{opacity:0.4;transform:rotate(0deg)}50%{opacity:1;transform:rotate(0deg)}}}"}},[513,"ds-loader",{size:[1],label:[1],speed:[1]}]),t="M14.09 -27.22 L13.04 -28.53 L11.94 -29.76 L10.78 -30.92 L9.57 -32.01 L8.30 -33.02 L7.00 -33.95 L5.65 -34.80 L4.27 -35.57 L2.85 -36.25 L1.40 -36.84 L-0.07 -37.35 L-1.56 -37.76 L-3.07 -38.08 L-4.59 -38.31 L-6.13 -38.45 L-7.66 -38.50 L-9.20 -38.45 L-10.73 -38.31 L-12.25 -38.08 L-13.76 -37.76 L-15.25 -37.35 L-16.73 -36.84 L-18.17 -36.25 L-19.59 -35.57 L-20.97 -34.80 L-22.32 -33.95 L-23.63 -33.02 L-24.89 -32.01 L-26.10 -30.92 L-27.26 -29.76 L-28.37 -28.53 L-29.41 -27.22 L-30.40 -25.86 L-31.32 -24.42 L-32.17 -22.93 L-32.95 -21.39 L-33.66 -19.79 L-34.30 -18.15 L-34.86 -16.46 L-35.34 -14.73 L-35.74 -12.97 L-36.06 -11.18 L-36.29 -9.35 L-36.44 -7.51 L-36.50 -5.65 L-36.48 -3.77 L-36.37 -1.89 L-36.18 0 L-35.90 1.89 L-35.53 3.77 L-35.07 5.65 L-34.53 7.51 L-33.90 9.35 L-33.18 11.18 L-32.39 12.97 L-31.51 14.73 L-30.55 16.46 L-29.51 18.15 L-28.40 19.79 L-27.21 21.39 L-25.95 22.93 L-24.61 24.42 L-23.22 25.86 L-21.75 27.22 L-20.23 28.53 L-18.64 29.76 L-17.00 30.92 L-15.31 32.01 L-13.57 33.02 L-11.79 33.95 L-9.96 34.80 L-8.10 35.57 L-6.20 36.25 L-4.28 36.84 L-2.33 37.35 L-0.35 37.76 L1.63 38.08 L3.64 38.31 L5.65 38.45 L7.66 38.50 L9.68 38.45 L11.69 38.31 L13.69 38.08 L15.68 37.76 L17.65 37.35 L19.60 36.84 L21.53 36.25 L23.42 35.57 L25.28 34.80 L27.11 33.95 L28.89 33.02 L30.63 32.01 L32.32 30.92 L33.96 29.76 L35.55 28.53 L37.07 27.22";function L(){"undefined"!=typeof customElements&&["ds-loader"].forEach((r=>{"ds-loader"===r&&(customElements.get(e(r))||customElements.define(e(r),s))}))}L();const l=s,i=L;export{l as DsLoader,i as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsSelect extends Components.DsSelect, HTMLElement {}
4
+ export const DsSelect: {
5
+ prototype: DsSelect;
6
+ new (): DsSelect;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{D as s,d as o}from"./p-ZsYP0VBq.js";const p=s,r=o;export{p as DsSelect,r as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsTabs extends Components.DsTabs, HTMLElement {}
4
+ export const DsTabs: {
5
+ prototype: DsTabs;
6
+ new (): DsTabs;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t,p as s,H as o,d as e,h as i,c as r}from"./p-k0ywxWpC.js";const n=s(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.dsChange=e(this,"dsChange")}tabRefs=new Map;pendingFocusId;items="[]";active;orientation="horizontal";label;dsChange;watchItems(){const t=this.parseItems();if(0!==t.length&&!t.some((t=>t.id===this.active&&!t.disabled))){const s=t.find((t=>!t.disabled));s&&(this.active=s.id,this.dsChange.emit(s.id))}}componentWillLoad(){const t=this.parseItems();if(!(0===t.length||this.active&&t.some((t=>t.id===this.active&&!t.disabled)))){const s=t.find((t=>!t.disabled));s&&(this.active=s.id,this.dsChange.emit(s.id))}}componentDidRender(){if(this.pendingFocusId){const t=this.tabRefs.get(this.pendingFocusId);t?.focus(),this.pendingFocusId=void 0}}parseItems(){if("string"==typeof this.items)try{return JSON.parse(this.items)}catch{return console.warn("[ds-tabs] failed to parse items prop:",this.items),[]}return this.items}enabledItems(){return this.parseItems().filter((t=>!t.disabled))}selectAndFocus(t){t!==this.active&&(this.active=t,this.pendingFocusId=t,this.dsChange.emit(t))}onClick=t=>{t!==this.active&&(this.active=t,this.dsChange.emit(t))};onKeyDown=(t,s)=>{const o=this.enabledItems();if(0===o.length)return;const e="horizontal"===this.orientation,i=e?"ArrowRight":"ArrowDown",r=e?"ArrowLeft":"ArrowUp",n=o.findIndex((t=>t.id===s));t.key===i?(t.preventDefault(),this.selectAndFocus(o[(n+1)%o.length].id)):t.key===r?(t.preventDefault(),this.selectAndFocus(o[(n-1+o.length)%o.length].id)):"Home"===t.key?(t.preventDefault(),this.selectAndFocus(o[0].id)):"End"===t.key&&(t.preventDefault(),this.selectAndFocus(o[o.length-1].id))};render(){const t=this.parseItems();return i(r,{key:"efc6a329ddbc14550f7e186480e41218f52b4865"},i("div",{key:"4d475ddcb89198d97440e1e807acbef5984f658e",class:"ds-tabs ds-tabs--"+this.orientation,role:"tablist","aria-label":this.label,"aria-orientation":"vertical"===this.orientation?"vertical":void 0},t.map((t=>{const s=t.id===this.active;return i("button",{key:t.id,type:"button",role:"tab",id:t.id,class:"ds-tab"+(s?" ds-tab--active":""),"aria-selected":s?"true":"false","aria-controls":t.controls??t.id,tabindex:s?0:-1,disabled:t.disabled,ref:s=>{s?this.tabRefs.set(t.id,s):this.tabRefs.delete(t.id)},onClick:()=>this.onClick(t.id),onKeyDown:s=>this.onKeyDown(s,t.id)},t.label)}))))}static get watchers(){return{items:[{watchItems:0}]}}static get style(){return"ds-tabs{display:block;color:inherit;font-family:var(--ds-font-family);font-size:var(--ds-font-size-md)}.ds-tabs{display:flex;gap:var(--ds-spacing-sm);border-bottom:1px solid color-mix(in oklch, currentColor 15%, transparent)}.ds-tabs--vertical{flex-direction:column;align-items:stretch;border-bottom:none;border-right:1px solid color-mix(in oklch, currentColor 15%, transparent)}.ds-tab{font:inherit;color:inherit;background-color:transparent;border:none;padding:var(--ds-spacing-sm) var(--ds-spacing-lg);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}.ds-tabs--vertical .ds-tab{text-align:left;border-bottom:none;border-right:2px solid transparent;margin-bottom:0;margin-right:-1px}.ds-tab--active{border-bottom-color:currentColor}.ds-tabs--vertical .ds-tab--active{border-bottom-color:transparent;border-right-color:currentColor}.ds-tab:disabled{opacity:0.5;cursor:not-allowed}"}},[512,"ds-tabs",{items:[1],active:[1025],orientation:[1],label:[1]},void 0,{items:[{watchItems:0}]}]);function a(){"undefined"!=typeof customElements&&["ds-tabs"].forEach((s=>{"ds-tabs"===s&&(customElements.get(t(s))||customElements.define(t(s),n))}))}a();const c=n,d=a;export{c as DsTabs,d as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsTextarea extends Components.DsTextarea, HTMLElement {}
4
+ export const DsTextarea: {
5
+ prototype: DsTextarea;
6
+ new (): DsTextarea;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t as e,p as a,H as t,d as r,h as s,c as i}from"./p-k0ywxWpC.js";const d=a(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.dsInput=r(this,"dsInput")}textareaEl;value;name;placeholder;disabled=!1;required=!1;invalid=!1;describedBy;label;rows=3;size="md";dsInput;watchValue(e){this.textareaEl&&this.textareaEl.value!==(e??"")&&(this.textareaEl.value=e??"")}componentDidLoad(){this.textareaEl&&void 0!==this.value&&(this.textareaEl.value=this.value)}onInput=e=>{this.dsInput.emit(e.target.value)};render(){return s(i,{key:"89e63314bca9f6f1b70f36c540a3ac48eed7311c"},s("textarea",{key:"59f9b8ee9a48a4e495da7fb56745102a1f0ee7c2",class:"ds-textarea ds-textarea--"+this.size,name:this.name,placeholder:this.placeholder,disabled:this.disabled,rows:this.rows,"aria-label":this.label,"aria-required":this.required?"true":void 0,"aria-invalid":this.invalid?"true":void 0,"aria-describedby":this.describedBy,ref:e=>this.textareaEl=e,onInput:this.onInput}))}static get watchers(){return{value:[{watchValue:0}]}}static get style(){return':host{display:inline-block;width:100%}.ds-textarea{font-family:var(--ds-font-family);font-size:var(--ds-font-size-md);background-color:transparent;color:inherit;border:1px solid color-mix(in oklch, currentColor 22%, transparent);-webkit-appearance:none;appearance:none;box-sizing:border-box;width:100%;resize:vertical}.ds-textarea::placeholder{color:color-mix(in oklch, currentColor 45%, transparent)}.ds-textarea:disabled{opacity:0.5;cursor:not-allowed;resize:none}.ds-textarea[aria-invalid="true"]{border-color:color-mix(in oklch, currentColor 55%, transparent)}.ds-textarea--md{border-radius:var(--ds-radius-sm);padding:var(--ds-spacing-sm) var(--ds-spacing-lg)}.ds-textarea--lg{border-radius:var(--ds-radius-md);padding:var(--ds-spacing-md) var(--ds-spacing-xl)}'}},[513,"ds-textarea",{value:[1],name:[1],placeholder:[1],disabled:[4],required:[4],invalid:[4],describedBy:[1,"described-by"],label:[1],rows:[2],size:[1]},void 0,{value:[{watchValue:0}]}]);function o(){"undefined"!=typeof customElements&&["ds-textarea"].forEach((a=>{"ds-textarea"===a&&(customElements.get(e(a))||customElements.define(e(a),d))}))}o();const n=d,l=o;export{n as DsTextarea,l as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsTooltip extends Components.DsTooltip, HTMLElement {}
4
+ export const DsTooltip: {
5
+ prototype: DsTooltip;
6
+ new (): DsTooltip;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t,p as s,H as i,h as o,c as e}from"./p-k0ywxWpC.js";let h=0;const n=s(class extends i{constructor(t){super(),!1!==t&&this.__registerHost()}get hostEl(){return this}label;openDelay=250;closeDelay=100;placement="bottom";tooltipId="ds-tooltip-"+ ++h;tooltipEl;openTimer;closeTimer;isOpen=!1;watchLabel(){this.tooltipEl&&(this.tooltipEl.textContent=this.label)}componentDidLoad(){this.wireTrigger(),this.hostEl.addEventListener("mouseenter",this.onMouseEnter),this.hostEl.addEventListener("mouseleave",this.onMouseLeave),this.hostEl.addEventListener("focusin",this.onFocusIn),this.hostEl.addEventListener("focusout",this.onFocusOut),this.hostEl.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){this.clearTimers(),this.hostEl.removeEventListener("mouseenter",this.onMouseEnter),this.hostEl.removeEventListener("mouseleave",this.onMouseLeave),this.hostEl.removeEventListener("focusin",this.onFocusIn),this.hostEl.removeEventListener("focusout",this.onFocusOut),this.hostEl.removeEventListener("keydown",this.onKeyDown)}wireTrigger(){const t=Array.from(this.hostEl.children).filter((t=>t!==this.tooltipEl))[0];t&&t.setAttribute("aria-describedby",this.tooltipId)}clearTimers(){void 0!==this.openTimer&&(window.clearTimeout(this.openTimer),this.openTimer=void 0),void 0!==this.closeTimer&&(window.clearTimeout(this.closeTimer),this.closeTimer=void 0)}show(t=0){void 0!==this.closeTimer&&(window.clearTimeout(this.closeTimer),this.closeTimer=void 0),this.isOpen||(0!==t?void 0===this.openTimer&&(this.openTimer=window.setTimeout((()=>{this.openTimer=void 0,this.applyOpen(!0)}),t)):this.applyOpen(!0))}hide(t=0){void 0!==this.openTimer&&(window.clearTimeout(this.openTimer),this.openTimer=void 0),this.isOpen&&(0!==t?void 0===this.closeTimer&&(this.closeTimer=window.setTimeout((()=>{this.closeTimer=void 0,this.applyOpen(!1)}),t)):this.applyOpen(!1))}applyOpen(t){this.isOpen=t,this.tooltipEl&&(t?(this.tooltipEl.removeAttribute("hidden"),this.tooltipEl.dataset.open="true"):(this.tooltipEl.setAttribute("hidden",""),this.tooltipEl.dataset.open="false"))}onMouseEnter=()=>this.show(this.openDelay);onMouseLeave=()=>this.hide(this.closeDelay);onFocusIn=()=>this.show(0);onFocusOut=()=>this.hide(0);onKeyDown=t=>{"Escape"===t.key&&this.isOpen&&this.hide(0)};render(){return o(e,{key:"e3822251c9edab36fdffa9178473823f3e9ae525"},o("slot",{key:"f7c490f42ae09a739d8d91d32c2394dbdef03aa5"}),o("span",{key:"8bda1876026129859665f82b1983065df602d092",class:"ds-tooltip ds-tooltip--"+this.placement,role:"tooltip",id:this.tooltipId,hidden:!0,"data-open":"false",ref:t=>this.tooltipEl=t},this.label))}static get watchers(){return{label:[{watchLabel:0}]}}static get style(){return"ds-tooltip{display:inline-block;position:relative;color:inherit}.ds-tooltip{position:absolute;left:50%;transform:translateX(-50%);z-index:1;max-width:240px;padding:var(--ds-spacing-xs) var(--ds-spacing-sm);font-family:var(--ds-font-family);font-size:var(--ds-font-size-md);line-height:1.3;color:inherit;background-color:Canvas;border:1px solid color-mix(in oklch, currentColor 25%, transparent);border-radius:var(--ds-radius-sm);pointer-events:none;white-space:normal}.ds-tooltip--bottom{top:calc(100% + var(--ds-spacing-xs))}.ds-tooltip--top{bottom:calc(100% + var(--ds-spacing-xs))}"}},[772,"ds-tooltip",{label:[1],openDelay:[2,"open-delay"],closeDelay:[2,"close-delay"],placement:[1]},void 0,{label:[{watchLabel:0}]}]);function a(){"undefined"!=typeof customElements&&["ds-tooltip"].forEach((s=>{"ds-tooltip"===s&&(customElements.get(t(s))||customElements.define(t(s),n))}))}a();const d=n,l=a;export{d as DsTooltip,l as defineCustomElement}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Get the base path to where the assets can be found. Use "setAssetPath(path)"
3
+ * if the path needs to be customized.
4
+ */
5
+ export declare const getAssetPath: (path: string) => string;
6
+
7
+ /**
8
+ * Used to manually set the base path where assets can be found.
9
+ * If the script is used as "module", it's recommended to use "import.meta.url",
10
+ * such as "setAssetPath(import.meta.url)". Other options include
11
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
12
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
13
+ * But do note that this configuration depends on how your script is bundled, or lack of
14
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
15
+ * will have to ensure the static assets are copied to its build directory.
16
+ */
17
+ export declare const setAssetPath: (path: string) => void;
18
+
19
+ /**
20
+ * Used to specify a nonce value that corresponds with an application's CSP.
21
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
22
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
23
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
24
+ * will result in the same behavior.
25
+ */
26
+ export declare const setNonce: (nonce: string) => void
27
+
28
+ export interface SetPlatformOptions {
29
+ raf?: (c: FrameRequestCallback) => number;
30
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
31
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
32
+ }
33
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
34
+
35
+ export * from '../types';
@@ -0,0 +1 @@
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-k0ywxWpC.js";export{D as DsButton}from"./p-DDUZow8F.js";export{D as DsSelect}from"./p-ZsYP0VBq.js";
@@ -0,0 +1 @@
1
+ import{t as o,p as s,H as t,h as r,c as n}from"./p-k0ywxWpC.js";const d=s(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow()}variant="primary";size="md";disabled=!1;type="button";href;render(){const o=`ds-button ds-button--${this.variant} ds-button--${this.size}`;return r(n,null,void 0!==this.href?r("a",{class:o,href:this.href},r("slot",null)):r("button",{class:o,type:this.type,disabled:this.disabled},r("slot",null)))}static get style(){return":host{display:inline-block}.ds-button{font-family:var(--ds-font-family);font-weight:500;border:none;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:var(--ds-spacing-sm);transition:background-color 0.15s ease-in-out}.ds-button:disabled{opacity:0.5;cursor:not-allowed}.ds-button:focus-visible{outline:2px solid var(--ds-color-focus);outline-offset:2px}.ds-button--md{font-size:var(--ds-font-size-md);padding:var(--ds-spacing-sm) var(--ds-spacing-lg);border-radius:var(--ds-radius-sm)}.ds-button--lg{font-size:var(--ds-font-size-md);padding:var(--ds-spacing-md) var(--ds-spacing-xl);border-radius:var(--ds-radius-md)}.ds-button--primary{background-color:var(--ds-color-primary);color:var(--ds-color-text-on-primary)}.ds-button--primary:hover:not(:disabled){background-color:var(--ds-color-primary-hover)}.ds-button--secondary{background-color:var(--ds-color-secondary);color:var(--ds-color-text-on-secondary)}.ds-button--secondary:hover:not(:disabled){background-color:var(--ds-color-secondary-hover)}.ds-button--ghost{background-color:transparent;color:inherit;border:1px solid currentColor;opacity:0.85}.ds-button--ghost:hover:not(:disabled){opacity:1}"}},[769,"ds-button",{variant:[1],size:[1],disabled:[4],type:[1],href:[1]}]);function a(){"undefined"!=typeof customElements&&["ds-button"].forEach((s=>{"ds-button"===s&&(customElements.get(o(s))||customElements.define(o(s),d))}))}a();export{d as D,a as d}
@@ -0,0 +1 @@
1
+ import{t as s,p as t,H as e,d as a,h as i,c as o}from"./p-k0ywxWpC.js";const n=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.dsChange=a(this,"dsChange")}selectEl;value;name;disabled=!1;size="md";label;options="[]";dsChange;watchValue(s){this.selectEl&&this.selectEl.value!==s&&(this.selectEl.value=s??"")}watchOptions(){}componentDidLoad(){this.syncValue()}componentDidUpdate(){this.syncValue()}syncValue(){this.selectEl&&void 0!==this.value&&(this.selectEl.value=this.value)}parseOptions(){if("string"==typeof this.options)try{return JSON.parse(this.options)}catch{return console.warn("[ds-select] failed to parse options prop:",this.options),[]}return this.options}onChange=s=>{this.dsChange.emit(s.target.value)};render(){return i(o,{key:"9c5755ca98a3a3a1340414de0109133ffb6617c4"},i("select",{key:"7ac471b32e083e754c398ed22baf8ba993997ee5",class:`ds-select ds-select--${this.size}`,name:this.name,disabled:this.disabled,"aria-label":this.label,ref:s=>this.selectEl=s,onChange:this.onChange},this.parseOptions().map((s=>i("option",{value:s.value},s.label)))))}static get watchers(){return{value:[{watchValue:0}],options:[{watchOptions:0}]}}static get style(){return":host{display:inline-block;position:relative}.ds-select{font-family:var(--ds-font-family);font-size:var(--ds-font-size-md);background-color:transparent;color:inherit;border:1px solid color-mix(in oklch, currentColor 22%, transparent);cursor:pointer;-webkit-appearance:none;appearance:none}:host::after{content:\"\";position:absolute;top:50%;right:var(--ds-spacing-sm);width:12px;height:12px;transform:translateY(-50%);background-color:currentColor;-webkit-mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M2.5 4.5L6 8L9.5 4.5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>\");mask-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M2.5 4.5L6 8L9.5 4.5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>\");-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;pointer-events:none}.ds-select:disabled{opacity:0.5;cursor:not-allowed}:host(:has(.ds-select:disabled))::after{opacity:0.5}.ds-select--md{border-radius:var(--ds-radius-sm);padding:var(--ds-spacing-sm) var(--ds-spacing-lg);padding-right:calc(var(--ds-spacing-lg) + var(--ds-spacing-lg))}.ds-select--lg{border-radius:var(--ds-radius-md);padding:var(--ds-spacing-md) var(--ds-spacing-xl);padding-right:calc(var(--ds-spacing-xl) + var(--ds-spacing-lg))}"}},[513,"ds-select",{value:[1],name:[1],disabled:[4],size:[1],label:[1],options:[1]},void 0,{value:[{watchValue:0}],options:[{watchOptions:0}]}]);function r(){"undefined"!=typeof customElements&&["ds-select"].forEach((t=>{"ds-select"===t&&(customElements.get(s(t))||customElements.define(s(t),n))}))}r();export{n as D,r as d}
@@ -0,0 +1 @@
1
+ const t=':root{--ds-color-primary:oklch(0.58 0.178 307);--ds-color-primary-hover:oklch(0.521 0.176 307);--ds-color-secondary:#edf2f7;--ds-color-secondary-hover:#e2e8f0;--ds-color-text-on-primary:#ffffff;--ds-color-text-on-secondary:#1a202c;--ds-color-focus:oklch(0.72 0.18 307);--ds-spacing-xs:4px;--ds-spacing-sm:8px;--ds-spacing-md:12px;--ds-spacing-lg:16px;--ds-spacing-xl:24px;--ds-radius-sm:4px;--ds-radius-md:10px;--ds-font-family:system-ui, -apple-system, "Segoe UI", sans-serif;--ds-font-size-md:14px}';function e(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var n,o=(t,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=t[o],s=e(Object.getPrototypeOf(t),o,!0)||Object.getOwnPropertyDescriptor(t,o);s&&Object.defineProperty(t,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?t[o]=n.l.get(o):void 0!==l&&(t[o]=l)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},s=(t,e)=>e in t,r=(t,e)=>(0,console.error)(t,e),i=new Map,c="undefined"!=typeof window?window:{},f=c.HTMLElement||class{},u={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),d=!!a&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),p=!1,h=[],m=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&u.i?$(b):u.raf(b))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},b=()=>{y(h),y(m),(p=h.length>0)&&u.raf(b)},$=t=>Promise.resolve(undefined).then(t),g=v(m,!0),w=t=>{const e=new URL(t,u.u);return e.origin!==c.location.origin?e.href:e.pathname},j=t=>u.u=t;function O(){var e;const o=this.attachShadow({mode:"open"});if(void 0===n&&(n=null!=(e=function(t){if(!a)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(t))?e:null),n)d?o.adoptedStyleSheets.push(n):o.adoptedStyleSheets=[...o.adoptedStyleSheets,n];else if(!a){const e=document.createElement("style");e.innerHTML=t,o.prepend(e)}}var S=t=>{const e=E(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&k(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!x(t,M(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&E(t,"childNodes").length&&S(t)}};function k(t,e,n){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||M(o)===n)&&(s.push(o),void 0!==n))return s;s=[...s,...k(o.childNodes,e,n)]}return s}var x=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)M(l)!==e||!n&&l["s-sr"]||o.push(l);return o},N=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,M=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function E(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var C,_,A=new WeakMap,L=t=>"sc-"+t.p,R=t=>"object"==(t=typeof t)||"function"===t,F=(t,e,...n)=>{let o=null,l=null,s=null,r=!1,i=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof t&&!R(o))&&(o=String(o)),r&&i?c[c.length-1].h+=o:c.push(r?T(null,o):o),i=r)};if(f(n),e){e.key&&(l=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=T(t,null);return u.m=e,c.length>0&&(u.v=c),u.$=l,u.j=s,u},T=(t,e)=>({i:0,O:t,h:null!=e?e:null,S:null,v:null,m:null,$:null,j:null}),U={},D=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},H=(t,e)=>null==t||R(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?String(t):t,P=(t,e)=>{const n=t;return{emit:t=>W(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},W=(t,e,n)=>{const o=u.ce(e,n);return t.dispatchEvent(o),o},z=(t,e,n,o,r,i)=>{if(n===o)return;let f=s(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,l=V(n);let s=V(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);else if("ref"===e)o&&dt(o,t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=l(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=R(o);if((f||l&&null!==o)&&!r)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?f=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!f||4&i||r)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}else if(e="-"===e[2]?e.slice(3):s(c,a)?a.slice(2):a[2]+e.slice(3),n||o){const l=e.endsWith(q);e=e.replace(I,""),n&&u.rel(t,e,n,l),o&&u.ael(t,e,o,l)}},B=/\s/,V=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(B):[]),q="Capture",I=new RegExp(q+"$"),Y=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.m||{},s=e.m||{};for(const t of Z(Object.keys(l)))t in s||z(o,t,l[t],void 0,n,e.i);for(const t of Z(Object.keys(s)))z(o,t,l[t],s[t],n,e.i)};function Z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,J=!1,K=!1,Q=!1,X=[],tt=[],et=(t,e,n)=>{var o;const l=e.v[n];let s,r,i,f=0;if(G||(K=!0,"slot"===l.O&&(l.i|=l.v?2:1)),null!=l.h)s=l.S=c.document.createTextNode(l.h);else if(1&l.i)s=l.S=c.document.createTextNode(""),Y(null,l,Q);else{if(Q||(Q="svg"===l.O),!c.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.S=c.document.createElementNS(Q?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!G&&2&l.i?"slot-fb":l.O),Q&&"foreignObject"===l.O&&(Q=!1),Y(null,l,Q),l.v){const e="template"===l.O?s.content:s;for(f=0;f<l.v.length;++f)r=et(t,l,f),r&&e.appendChild(r)}"svg"===l.O?Q=!1:"foreignObject"===s.tagName&&(Q=!0)}return s["s-hn"]=_,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=C,s["s-sn"]=l.j||"",s["s-rf"]=null==(o=l.m)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e})(l.childNodes)).forEach((t=>{o===M(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),i=t&&t.v&&t.v[n],i&&i.O===l.O&&t.S&&nt(t.S)),s},nt=t=>{u.i|=1;const e=t.closest(_.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(pt(e,t,null!=n?n:null),t["s-sh"]=void 0,K=!0)}u.i&=-2},ot=(t,e)=>{u.i|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===_&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==_&&o["s-ol"]&&(pt(it(o).parentNode,o,it(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,K=!0),e&&ot(o,e)}u.i&=-2},lt=(t,e,n,o,l,s)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(i.shadowRoot&&i.tagName===_&&(i=i.shadowRoot),"template"===n.O&&(i=i.content);l<=s;++l)o[l]&&(r=et(null,n,l),r&&(o[l].S=r,pt(i,r,it(e))))},st=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;at(e),t&&(J=!0,t["s-ol"]?t["s-ol"].remove():ot(t,!0),t.remove())}}},rt=(t,e,n=!1)=>t.O===e.O&&("slot"===t.O?t.j===e.j:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),it=t=>t&&t["s-ol"]||t,ct=(t,e,n=!1)=>{const o=e.S=t.S,l=t.v,s=e.v,r=e.O,i=e.h;let c;null==i?(Q="svg"===r||"foreignObject"!==r&&Q,"slot"!==r||G||t.j!==e.j&&(e.S["s-sn"]=e.j||"",nt(e.S.parentElement)),Y(t,e,Q),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,r,i=0,c=0,f=0,u=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const y="template"===n.O?t.content:t;for(;i<=a&&c<=h;)if(null==d)d=e[++i];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(rt(d,m,l))ct(d,m,l),d=e[++i],m=o[++c];else if(rt(p,v,l))ct(p,v,l),p=e[--a],v=o[--h];else if(rt(d,v,l))"slot"!==d.O&&"slot"!==v.O||ot(d.S.parentNode,!1),ct(d,v,l),pt(y,d.S,p.S.nextSibling),d=e[++i],v=o[--h];else if(rt(p,m,l))"slot"!==d.O&&"slot"!==v.O||ot(p.S.parentNode,!1),ct(p,m,l),pt(y,p.S,d.S),p=e[--a],m=o[++c];else{for(f=-1,u=i;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===m.$){f=u;break}f>=0?(r=e[f],r.O!==m.O?s=et(e&&e[c],n,f):(ct(r,m,l),e[f]=void 0,s=r.S),m=o[++c]):(s=et(e&&e[c],n,c),m=o[++c]),s&&pt(it(d.S).parentNode,s,it(d.S))}i>a?lt(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&st(e,i,a)})(o,l,e,s,n):null!==s?(null!==t.h&&(o.textContent=""),lt(o,null,e,s,0,s.length-1)):!n&&null!==l&&st(l,0,l.length-1),Q&&"svg"===r&&(Q=!1)):(c=o["s-cr"])?c.parentNode.textContent=i:t.h!==i&&(o.data=i)},ft=[],ut=t=>{let e,n,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const l=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(N(e,l)){let n=ft.find((t=>t.k===e));J=!0,e["s-sn"]=e["s-sn"]||l,n?(n.k["s-sh"]=t["s-hn"],n.N=t):(e["s-sh"]=t["s-hn"],ft.push({N:t,k:e})),e["s-sr"]&&ft.map((t=>{N(t.k,e["s-sn"])&&(n=ft.find((t=>t.k===e)),n&&!t.N&&(t.N=n.N))}))}else ft.some((t=>t.k===e))||ft.push({k:e})}1===t.nodeType&&ut(t)}},at=t=>{t.m&&t.m.ref&&X.push((()=>t.m.ref(null))),t.v&&t.v.map(at)},dt=(t,e)=>{tt.push((()=>t(e)))},pt=(t,e,n,o)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:l}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=M(t)||"";return{slotNode:k(E(e,"childNodes"),e.tagName,o)[0],slotName:o}}(e);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},ht=(t,e,n=!1)=>{var o,l,s,r,i;const f=t.$hostElement$,a=t.o,d=t.M||T(null,null);var p;const h=(p=e)&&p.O===U?e:F(null,null,e);if(_=f.tagName,n&&h.m)for(const t of Object.keys(h.m))f.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(h.m[t]=f[t]);if(h.O=null,h.i|=4,t.M=h,h.S=d.S=f.shadowRoot||f,G=!(!(1&a.i)||128&a.i),C=f["s-cr"],J=!1,ct(d,h,n),u.i|=1,K){ut(h.S);for(const t of ft){const e=t.k;if(!e["s-ol"]&&c.document){const t=c.document.createTextNode("");t["s-nr"]=e,pt(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of ft){const e=t.k,i=t.N;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(o=e.hidden)&&o),i){const t=i.parentNode;let o=i.nextSibling;if(o&&1===o.nodeType){let n=null==(l=e["s-ol"])?void 0:l.previousSibling;for(;n;){let l=null!=(s=n["s-nr"])?s:null;if(l&&l["s-sn"]===e["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===e||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}n=n.previousSibling}}if((!o&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==o)&&e!==o){if(pt(t,e,o,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=c.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,pt(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(r=e["s-ih"])&&r)}e&&"function"==typeof i["s-rf"]&&i["s-rf"](i)}else 1===e.nodeType&&(e.hidden=!0)}}if(J&&S(h.S),u.i&=-2,ft.length=0,!G&&!(1&a.i)&&f["s-cr"]){const t=h.S.__childNodes||h.S.childNodes;for(const e of t)if(e["s-hn"]!==_&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(i=e.hidden)&&i),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=c.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],pt(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}C=void 0,X.forEach((t=>t())),X.length=0,tt.forEach((t=>t())),tt.length=0},mt=(t,e)=>{if(e&&!t.C&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.C=()=>{e["s-p"].splice(n-1,1),o()})))}},vt=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);mt(t,t._);const n=()=>yt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},yt=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=St(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=bt(l,(()=>St(o,"componentWillRender",void 0,n))),bt(l,(()=>gt(t,o,e)))},bt=(t,e)=>$t(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),$t=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,gt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.i,l=((t,e)=>{var n,o,l;const s=L(e),r=i.get(s);if(!c.document)return s;if(t=11===t.nodeType?t:c.document,r)if("string"==typeof r){let l,i=A.get(t=t.head||t);if(i||A.set(t,i=new Set),!i.has(s)){l=c.document.createElement("style"),l.textContent=r;const f=null!=(n=u.A)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=c.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=f&&l.setAttribute("nonce",f),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),d?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=r+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=A.get(t);if(e||A.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(r.constructor===n.CSSStyleSheet)o=r;else{o=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)o.insertRule(r.cssRules[t].cssText,t)}d?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);wt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>jt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},wt=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,ht(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},jt=t=>{const e=t.$hostElement$,n=e,o=t._;St(n,"componentDidRender",void 0,e),64&t.i?St(n,"componentDidUpdate",void 0,e):(t.i|=64,kt(e),St(n,"componentDidLoad",void 0,e),t.L(e),o||Ot()),t.C&&(t.C(),t.C=void 0),512&t.i&&$((()=>vt(t,!1))),t.i&=-517},Ot=()=>{$((()=>W(c,"appload",{detail:{namespace:"chiralkit-ds"}})))},St=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t,o)}},kt=t=>t.classList.add("hydrated"),xt=(t,e,n,o)=>{const s=l(t);if(!s)return;const i=t,c=s.l.get(e),f=s.i,u=i;n=H(n,o.t[e][0]);const a=Number.isNaN(c)&&Number.isNaN(n);if(n!==c&&!a){if(s.l.set(e,n),o.R){const t=o.R[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&f||1&l)&&(u?u[o](n,c,e):s.F.push((()=>{s.T[o](n,c,e)})))}catch(t){r(t,i)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,c,e)&&!(16&f))return;16&f||vt(s,!1)}}},Nt=(t,n)=>{var o,s;const r=t.prototype;{t.watchers&&!n.R&&(n.R=D(t.watchers)),t.deserializers&&!n.U&&(n.U=t.deserializers),t.serializers&&!n.D&&(n.D=t.serializers);const i=Object.entries(null!=(o=n.t)?o:{});i.map((([t,[o]])=>{if(31&o||32&o){const{get:s,set:i}=e(r,t)||{};s&&(n.t[t][0]|=2048),i&&(n.t[t][0]|=4096),Object.defineProperty(r,t,{get(){return s?s.apply(this):(e=t,l(this).l.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(e){const s=l(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(e=s.l.get(t)),i.apply(this,[H(e,o)]),void xt(this,t,e=32&o?this[t]:s.$hostElement$[t],n);xt(this,t,e,n)}}})}}));{const e=new Map;r.attributeChangedCallback=function(t,o,s){u.jmp((()=>{var c;const f=e.get(t),u=l(this);if(this.hasOwnProperty(f),r.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&s!==o){const l=this,r=null==(c=n.R)?void 0:c[t];null==r||r.forEach((n=>{const[[r,i]]=Object.entries(n);null!=l[r]&&(128&e||1&i)&&l[r].call(l,s,o,t)}))}return}const a=i.find((([t])=>t===f)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[f];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(r,f);p||s==this[f]||h.get&&!h.set||(this[f]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.R)?s:{}),...i.filter((([t,e])=>31&e[0])).map((([t,n])=>{const o=n[1]||t;return e.set(o,t),o}))]))}}return t},Mt=(t,e)=>{const n={i:e[0],p:e[1]};try{n.t=e[2],n.R=D(t.R),n.U=t.U,n.D=t.D;const s=t.prototype.connectedCallback,f=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={i:0,$hostElement$:t,o:e,l:new Map,H:new Map};n.P=new Promise((t=>n.L=t)),t["s-p"]=[],t["s-rc"]=[];const l=n;t.__stencil__getHostRef=()=>l,512&e.i&&o(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=l(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.i)(null==e?void 0:e.T)||(null==e?void 0:e.P)&&e.P.then((()=>{}));else{e.i|=1,12&n.i&&(t=>{if(!c.document)return;const e=t["s-cr"]=c.document.createComment("");e["s-cn"]=!0,pt(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){mt(e,e._=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.i)&&(e.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const e=L(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);a&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.i)),o()}}const l=e._,s=()=>vt(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){r(n,t),e.C&&(e.C(),e.C=void 0),e.L&&e.L(t)}})(t,e,n)}o()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&u.i||l(t),A.has(t)&&A.delete(t),t.shadowRoot&&A.has(t.shadowRoot)&&A.delete(t.shadowRoot)})(this),f&&f.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else O.call(this,n)}}),Object.defineProperty(t,"is",{value:n.p,configurable:!0}),Nt(t,n)}catch(e){return r(e),t}},Et=t=>u.A=t,Ct=t=>Object.assign(u,t),_t=new WeakMap;function At(t,e){let n=_t.get(e);n||(n={i:0,o:{i:0,p:e.tagName},$hostElement$:e},_t.set(e,n)),ht(n,t)}function Lt(t){return t}export{f as H,Et as a,Ct as b,U as c,P as d,w as g,F as h,Mt as p,At as r,j as s,Lt as t}
@@ -0,0 +1,20 @@
1
+ import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-e-glNjK6.js';
2
+ export { s as setNonce } from './index-e-glNjK6.js';
3
+
4
+ /*
5
+ Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
6
+ */
7
+
8
+ var patchBrowser = () => {
9
+ const importMeta = import.meta.url;
10
+ const opts = {};
11
+ if (importMeta !== "") {
12
+ opts.resourcesUrl = new URL(".", importMeta).href;
13
+ }
14
+ return promiseResolve(opts);
15
+ };
16
+
17
+ patchBrowser().then(async (options) => {
18
+ await globalScripts();
19
+ return bootstrapLazy([["ds-badge",[[769,"ds-badge",{"variant":[1]}]]],["ds-button",[[769,"ds-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"href":[1]}]]],["ds-card",[[257,"ds-card"]]],["ds-checkbox",[[513,"ds-checkbox",{"checked":[4],"indeterminate":[4],"name":[1],"value":[1],"disabled":[4],"required":[4],"invalid":[4],"describedBy":[1,"described-by"],"label":[1]},null,{"checked":[{"watchChecked":0}],"indeterminate":[{"watchIndeterminate":0}]}]]],["ds-code-block",[[513,"ds-code-block",{"code":[1],"language":[1],"copied":[32]}]]],["ds-dialog",[[769,"ds-dialog",{"open":[4],"label":[1],"labelledBy":[1,"labelled-by"],"describedBy":[1,"described-by"]},null,{"open":[{"watchOpen":0}]}]]],["ds-input",[[513,"ds-input",{"value":[1],"name":[1],"type":[1],"placeholder":[1],"disabled":[4],"required":[4],"invalid":[4],"describedBy":[1,"described-by"],"label":[1],"size":[1]},null,{"value":[{"watchValue":0}]}]]],["ds-loader",[[513,"ds-loader",{"size":[1],"label":[1],"speed":[1]}]]],["ds-select",[[513,"ds-select",{"value":[1],"name":[1],"disabled":[4],"size":[1],"label":[1],"options":[1]},null,{"value":[{"watchValue":0}],"options":[{"watchOptions":0}]}]]],["ds-tabs",[[512,"ds-tabs",{"items":[1],"active":[1025],"orientation":[1],"label":[1]},null,{"items":[{"watchItems":0}]}]]],["ds-textarea",[[513,"ds-textarea",{"value":[1],"name":[1],"placeholder":[1],"disabled":[4],"required":[4],"invalid":[4],"describedBy":[1,"described-by"],"label":[1],"rows":[2],"size":[1]},null,{"value":[{"watchValue":0}]}]]],["ds-tooltip",[[772,"ds-tooltip",{"label":[1],"openDelay":[2,"open-delay"],"closeDelay":[2,"close-delay"],"placement":[1]},null,{"label":[{"watchLabel":0}]}]]]], options);
20
+ });
@@ -0,0 +1,16 @@
1
+ import { r as registerInstance, h, H as Host } from './index-e-glNjK6.js';
2
+
3
+ const dsBadgeCss = () => `:host{display:inline-block}.ds-badge{display:inline-block;padding:3px 8px;border-radius:999px;font-family:var(--ds-font-family);font-size:11px;font-weight:500;letter-spacing:0.02em;line-height:1.4;white-space:nowrap;color:currentColor}.ds-badge--neutral{background-color:oklch(0.65 0.03 260 / 0.15)}.ds-badge--ui-component{background-color:oklch(0.733 0.178 307 / 0.15)}.ds-badge--recipe{background-color:oklch(0.75 0.13 190 / 0.15)}.ds-badge--agent{background-color:oklch(0.82 0.15 80 / 0.15)}.ds-badge--config{background-color:oklch(0.65 0.03 260 / 0.15)}`;
4
+
5
+ const DsBadge = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ variant = "neutral";
10
+ render() {
11
+ return (h(Host, { key: '45ef132e5fd2c8a1623768ea58431b0cd4f581b4' }, h("span", { key: 'a406af30e18ffee0751ad5f10499f9ff394ae086', class: `ds-badge ds-badge--${this.variant}` }, h("slot", { key: '59bf92a176deeddf23a2f96f194ae4ed02ea0506' }))));
12
+ }
13
+ };
14
+ DsBadge.style = dsBadgeCss();
15
+
16
+ export { DsBadge as ds_badge };
@@ -0,0 +1,24 @@
1
+ import { r as registerInstance, h, H as Host } from './index-e-glNjK6.js';
2
+
3
+ const dsButtonCss = () => `:host{display:inline-block}.ds-button{font-family:var(--ds-font-family);font-weight:500;border:none;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:var(--ds-spacing-sm);transition:background-color 0.15s ease-in-out}.ds-button:disabled{opacity:0.5;cursor:not-allowed}.ds-button:focus-visible{outline:2px solid var(--ds-color-focus);outline-offset:2px}.ds-button--md{font-size:var(--ds-font-size-md);padding:var(--ds-spacing-sm) var(--ds-spacing-lg);border-radius:var(--ds-radius-sm)}.ds-button--lg{font-size:var(--ds-font-size-md);padding:var(--ds-spacing-md) var(--ds-spacing-xl);border-radius:var(--ds-radius-md)}.ds-button--primary{background-color:var(--ds-color-primary);color:var(--ds-color-text-on-primary)}.ds-button--primary:hover:not(:disabled){background-color:var(--ds-color-primary-hover)}.ds-button--secondary{background-color:var(--ds-color-secondary);color:var(--ds-color-text-on-secondary)}.ds-button--secondary:hover:not(:disabled){background-color:var(--ds-color-secondary-hover)}.ds-button--ghost{background-color:transparent;color:inherit;border:1px solid currentColor;opacity:0.85}.ds-button--ghost:hover:not(:disabled){opacity:1}`;
4
+
5
+ const DsButton = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ variant = "primary";
10
+ size = "md";
11
+ disabled = false;
12
+ type = "button";
13
+ href;
14
+ render() {
15
+ const cls = `ds-button ds-button--${this.variant} ds-button--${this.size}`;
16
+ if (this.href !== undefined) {
17
+ return (h(Host, null, h("a", { class: cls, href: this.href }, h("slot", null))));
18
+ }
19
+ return (h(Host, null, h("button", { class: cls, type: this.type, disabled: this.disabled }, h("slot", null))));
20
+ }
21
+ };
22
+ DsButton.style = dsButtonCss();
23
+
24
+ export { DsButton as ds_button };
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance, h, H as Host } from './index-e-glNjK6.js';
2
+
3
+ const dsCardCss = () => `:host{display:block}.ds-card{color:inherit;background-color:color-mix(in oklch, currentColor 4%, transparent);border:1px solid color-mix(in oklch, currentColor 15%, transparent);border-radius:var(--ds-radius-md);padding:var(--ds-spacing-lg);box-sizing:border-box}`;
4
+
5
+ const DsCard = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return (h(Host, { key: '288726502b909d34c3498bbac671ae892b0f6e17' }, h("div", { key: '2d9efecfdc78292d47d1c322e7d5f30820467ac4', class: "ds-card" }, h("slot", { key: '76ee24c626aaef9528200fc4665a50c491f9f7a0' }))));
11
+ }
12
+ };
13
+ DsCard.style = dsCardCss();
14
+
15
+ export { DsCard as ds_card };
@@ -0,0 +1,65 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-e-glNjK6.js';
2
+
3
+ const dsCheckboxCss = () => `:host{display:inline-flex;vertical-align:middle}.ds-checkbox{cursor:pointer;margin:0}.ds-checkbox:disabled{cursor:not-allowed;opacity:0.5}`;
4
+
5
+ const DsCheckbox = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.dsChange = createEvent(this, "dsChange");
9
+ }
10
+ inputEl;
11
+ checked = false;
12
+ indeterminate = false;
13
+ name;
14
+ value;
15
+ disabled = false;
16
+ required = false;
17
+ invalid = false;
18
+ describedBy;
19
+ label;
20
+ dsChange;
21
+ watchChecked(newValue) {
22
+ if (this.inputEl && this.inputEl.checked !== newValue) {
23
+ this.inputEl.checked = newValue;
24
+ }
25
+ }
26
+ watchIndeterminate(newValue) {
27
+ if (this.inputEl && this.inputEl.indeterminate !== newValue) {
28
+ this.inputEl.indeterminate = newValue;
29
+ }
30
+ }
31
+ componentDidLoad() {
32
+ this.syncNativeState();
33
+ }
34
+ componentDidUpdate() {
35
+ this.syncNativeState();
36
+ }
37
+ syncNativeState() {
38
+ if (!this.inputEl)
39
+ return;
40
+ if (this.inputEl.checked !== this.checked) {
41
+ this.inputEl.checked = this.checked;
42
+ }
43
+ if (this.inputEl.indeterminate !== this.indeterminate) {
44
+ this.inputEl.indeterminate = this.indeterminate;
45
+ }
46
+ }
47
+ onChange = (event) => {
48
+ const target = event.target;
49
+ this.dsChange.emit(target.checked);
50
+ };
51
+ render() {
52
+ return (h(Host, { key: 'a935a67c0f4fa5d6cb36c2338d761318344573ef' }, h("input", { key: '4664d7a5a2fbce7987bbaf25b50355ddfc1be97f', class: "ds-checkbox", type: "checkbox", name: this.name, value: this.value, disabled: this.disabled, "aria-label": this.label, "aria-required": this.required ? "true" : undefined, "aria-invalid": this.invalid ? "true" : undefined, "aria-describedby": this.describedBy, ref: (el) => (this.inputEl = el), onChange: this.onChange })));
53
+ }
54
+ static get watchers() { return {
55
+ "checked": [{
56
+ "watchChecked": 0
57
+ }],
58
+ "indeterminate": [{
59
+ "watchIndeterminate": 0
60
+ }]
61
+ }; }
62
+ };
63
+ DsCheckbox.style = dsCheckboxCss();
64
+
65
+ export { DsCheckbox as ds_checkbox };
@@ -0,0 +1,37 @@
1
+ import { r as registerInstance, h, H as Host } from './index-e-glNjK6.js';
2
+
3
+ const dsCodeBlockCss = () => `:host{display:block}.ds-code-block{border:1px solid var(--ds-code-block-border, currentColor);border-color:color-mix(in oklch, currentColor 15%, transparent);background:var(--ds-code-block-bg, color-mix(in oklch, currentColor 4%, transparent));border-radius:10px;overflow:hidden;font-family:var(--ds-font-family);font-size:13px}.ds-code-block__header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid color-mix(in oklch, currentColor 12%, transparent);color:color-mix(in oklch, currentColor 55%, transparent)}.ds-code-block__lang{font-size:11px;text-transform:uppercase;letter-spacing:0.06em}.ds-code-block__copy{background:transparent;border:1px solid color-mix(in oklch, currentColor 15%, transparent);color:color-mix(in oklch, currentColor 70%, transparent);padding:4px 8px;border-radius:6px;font:inherit;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:color 120ms ease, border-color 120ms ease}.ds-code-block__copy:hover{color:currentColor;border-color:color-mix(in oklch, currentColor 30%, transparent)}.ds-code-block__copy:focus-visible{outline:2px solid var(--ds-color-focus);outline-offset:2px}pre{margin:0;padding:16px;overflow-x:auto}code{font-family:inherit;color:currentColor;white-space:pre}`;
4
+
5
+ const DsCodeBlock = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ code;
10
+ language = "bash";
11
+ copied = false;
12
+ timer;
13
+ disconnectedCallback() {
14
+ if (this.timer !== undefined)
15
+ window.clearTimeout(this.timer);
16
+ }
17
+ async onCopy() {
18
+ try {
19
+ await navigator.clipboard.writeText(this.code);
20
+ this.copied = true;
21
+ if (this.timer !== undefined)
22
+ window.clearTimeout(this.timer);
23
+ this.timer = window.setTimeout(() => {
24
+ this.copied = false;
25
+ }, 1400);
26
+ }
27
+ catch {
28
+ // Clipboard permissions may be denied; leave state unchanged.
29
+ }
30
+ }
31
+ render() {
32
+ return (h(Host, { key: '27b2c85bb8cf97c4b176c175f818bd077cfaa3f3' }, h("div", { key: '0f08c5d94ce947207d02692bfd733e9d90ca8b59', class: "ds-code-block" }, h("div", { key: '66dcbf8c59d1ecb4c373b5c1daad583f7e7a05ad', class: "ds-code-block__header" }, h("span", { key: 'fddc6fc3943ffcfafc68bf56d84859cfd016dea9', class: "ds-code-block__lang" }, this.language), h("button", { key: '277ef9eee0a8d9aa3ac54a75b11074315f26fa5e', type: "button", class: "ds-code-block__copy", onClick: () => this.onCopy(), "aria-label": this.copied ? "Copied" : "Copy code" }, this.copied ? (h("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("polyline", { points: "20 6 9 17 4 12" }))) : (h("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), h("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }))), h("span", { key: '81e87579225b696300fd2f2b8035553a55d3c7f0' }, this.copied ? "Copied" : "Copy"))), h("pre", { key: '06dc49a58e9fd80b0d334a349ef1ad9f540d37d7' }, h("code", { key: 'ba689fa980819ee4c12e9d5382d80d21919c8100' }, this.code)))));
33
+ }
34
+ };
35
+ DsCodeBlock.style = dsCodeBlockCss();
36
+
37
+ export { DsCodeBlock as ds_code_block };