@donkit-ai/design-system 0.4.3 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -110,33 +110,16 @@ function MyComponent() {
110
110
  ```javascript
111
111
  import { iconSizes } from '@donkit-ai/design-system';
112
112
 
113
- // iconSizes = { xs: 16, s: 20, m: 24, l: 28, xl: 48 }
113
+ // iconSizes = { 1: 16, 2: 20, 3: 24, 4: 28, 5: 48 }
114
114
  ```
115
115
 
116
116
  **Соответствие размеров компонентам:**
117
117
 
118
- - **16px (xs)** - очень мелкие элементы
119
- - Extra Small кнопки (`size="xs"`)
120
- - Extra Small табы (`size="xs"`)
121
-
122
- - **20px (s)** - компактные элементы
123
- - Small кнопки (`size="s"`)
124
- - Small табы (`size="s"`)
125
- - Modal (иконка закрытия)
126
- - Accordion, CodeAccordion
127
-
128
- - **24px (m)** - стандартные элементы
129
- - Medium кнопки (`size="m"`, по умолчанию)
130
- - Medium табы (`size="m"`)
131
- - Input (иконки в полях ввода)
132
- - Alert (иконки статусов)
133
- - Select (иконка выпадающего списка)
134
-
135
- - **28px (l)** - крупные элементы
136
- - Large кнопки (`size="l"`)
137
- - Large табы (`size="l"`)
138
-
139
- - **48px (xl)** - очень крупные элементы
118
+ - **16px (`iconSizes[1]`)** XS-кнопки, XS-табы
119
+ - **20px (`iconSizes[2]`)** — S-кнопки, S-табы, Modal, Accordion
120
+ - **24px (`iconSizes[3]`)** — M-кнопки (default), Input, Alert, Select
121
+ - **28px (`iconSizes[4]`)** — L-кнопки, L-табы
122
+ - **48px (`iconSizes[5]`)** крупные декоративные иконки
140
123
 
141
124
  **Всегда используется `strokeWidth={1.5}`** для единообразия дизайна.
142
125
 
@@ -147,33 +130,23 @@ import { Mail, Search, Eye, EyeOff, AlertCircle, Check, X } from 'lucide-react';
147
130
  import { iconSizes } from '@donkit-ai/design-system';
148
131
 
149
132
  // Small button / Tabs / Modal
150
- <Button size="s" icon={<Mail size={iconSizes.s} strokeWidth={1.5} />}>
133
+ <Button size="s" icon={<Mail size={iconSizes[2]} strokeWidth={1.5} />}>
151
134
  Send
152
135
  </Button>
153
- <Tab icon={<AlertCircle size={iconSizes.s} strokeWidth={1.5} />}>
154
- Alerts
155
- </Tab>
156
136
 
157
- // Medium button / Input / Alert
158
- <Button size="m" icon={<Search size={iconSizes.m} strokeWidth={1.5} />}>
137
+ // Medium button / Input / Alert (default)
138
+ <Button size="m" icon={<Search size={iconSizes[3]} strokeWidth={1.5} />}>
159
139
  Search
160
140
  </Button>
161
- <Input
162
- icon={<Search size={iconSizes.m} strokeWidth={1.5} />}
163
- placeholder="Search..."
164
- />
165
- <Alert
166
- type="success"
167
- icon={<Check size={iconSizes.m} strokeWidth={1.5} />}
168
- />
141
+ <Input icon={<Search size={iconSizes[3]} strokeWidth={1.5} />} placeholder="Search..." />
169
142
 
170
143
  // Large button
171
- <Button size="l" icon={<Mail size={iconSizes.l} strokeWidth={1.5} />}>
144
+ <Button size="l" icon={<Mail size={iconSizes[4]} strokeWidth={1.5} />}>
172
145
  Send Email
173
146
  </Button>
174
147
 
175
- // Extra Large icons
176
- <Mail size={iconSizes.xl} strokeWidth={1.5} />
148
+ // Крупные декоративные
149
+ <Mail size={iconSizes[5]} strokeWidth={1.5} />
177
150
  ```
178
151
 
179
152
  ### 3. Переключение темы
@@ -190,115 +163,124 @@ document.documentElement.setAttribute('data-theme', 'light');
190
163
 
191
164
  ### Цвета
192
165
 
193
- #### Базовые примитивы
194
- - `--color-white`: #FFFAFA
195
- - `--color-white-95/92/65/50/40/20/15/13/06`: rgba с прозрачностью 95%, 92%, 65%, 50%, 40%, 20%, 15%, 13%, 6%
166
+ #### Примитивы (не использовать напрямую)
167
+ - `--color-white`: #F8F9FA
196
168
  - `--color-black`: #0E0F11
197
- - `--color-black-95/65/60/50/40/20/10/08/04`: rgba с прозрачностью 95%, 65%, 60%, 50%, 40%, 20%, 10%, 8%, 4%
198
169
  - `--color-red`: #EA6464
199
- - `--color-red-90`: rgba с прозрачностью 90%
200
-
201
- #### Status/Alert Colors
202
- - `--color-error`: #FF1200 - Error/destructive actions
203
- - `--color-neutral`: #FFBB00 - Warning/neutral states
204
- - `--color-success`: #00C86E - Success/positive states
205
-
206
- #### Семантические (меняются в зависимости от темы)
207
- - `--color-bg` - фон
208
- - `--color-border` - границы
209
- - `--color-border-hover` - границы при hover (Dark: white-40, Light: black-40)
210
- - `--color-border-selected` - границы выбранного элемента (Dark: white-50, Light: black-50)
211
- - `--color-txt-icon-1` - основной текст/иконки (Dark: white-92, Light: black-95)
212
- - `--color-txt-icon-2` - вторичный текст/иконки (65%)
213
- - `--color-accent` - акцентный цвет
214
- - `--color-accent-hover` - акцент при hover
215
- - `--color-item-bg` - фон элементов (subtle) (Dark: white-06, Light: black-04)
216
- - `--color-item-bg-selected` - выделенный элемент (Dark: white-06, Light: black-04)
217
- - `--color-item-bg-hover` - hover состояние (Dark: white-13, Light: black-08)
218
- - `--color-code-bg` - фон элементов кода (Dark: white-15, Light: black-10)
219
-
220
- ### Отступы (adaptive)
221
-
222
- Используются для padding, margin, gap, а также для border-radius скругления углов.
223
-
224
- - `--space-xs`: 8px
225
- - `--space-s`: 12px 16px 16px (mobile → tablet → desktop)
226
- - `--space-m`: 16px 20px 24px
227
- - `--space-l`: 24px → 28px → 32px
228
- - `--space-xl`: 32px → 40px → 48px
229
-
230
- ### Типографика (adaptive)
231
-
232
- **Основной шрифт:**
233
- - Font Family: **Inter** (fallback: system-ui, Avenir, Helvetica, Arial, sans-serif)
234
- - Font Weight: **300** (Light) - для всех заголовков и текста
235
- - Line Height: 1.2-1.3 (заголовки), 1.5 (текст)
236
-
237
- **Monospace шрифт (для Code):**
238
- - Font Family: **Fira Mono** (fallback: SF Mono, Monaco, Cascadia Code, Roboto Mono, monospace)
239
-
240
- **Размеры шрифтов (mobile → tablet → desktop):**
241
- - `--font-size-h1`: 32px → 40px → 40px
242
- - `--font-size-h2`: 28px → 36px → 36px
243
- - `--font-size-h3`: 24px → 28px → 28px
244
- - `--font-size-h4`: 20px → 24px → 24px
245
- - `--font-size-p1`: 16px → 18px → 18px
246
- - `--font-size-p2`: 14px → 16px → 16px
247
- - `--font-size-p3`: 12px 14px → 14px
248
-
249
- **Letter Spacing (трекинг для мелких кеглей):**
250
- - Меньше 20px → +2% (0.02em)
251
- - Меньше 16px → +4% (0.04em)
252
- - Меньше 14px → +6% (0.06em)
253
-
254
- Адаптивные значения трекинга:
255
- - `--letter-spacing-h4`: 0 → 0 → 0 (20px / 24px / 24px - без трекинга)
256
- - `--letter-spacing-p1`: 0.02em → 0.02em → 0.02em (16px / 18px / 18px)
257
- - `--letter-spacing-p2`: 0.04em → 0.02em → 0.02em (14px / 16px / 16px)
258
- - `--letter-spacing-p3`: 0.06em → 0.04em → 0.04em (12px / 14px / 14px)
170
+
171
+ #### Поверхности — solid (меняются в зависимости от темы)
172
+ - `--color-surface-0` — page background
173
+ - `--color-surface-1` card, panel, sidebar
174
+ - `--color-surface-2` input, nested element
175
+ - `--color-surface-3` dropdown, tooltip, popover
176
+
177
+ #### Foreground
178
+ - `--color-fg-primary` основной текст и иконки
179
+ - `--color-fg-secondary` вторичный текст
180
+ - `--color-fg-disabled` disabled состояние
181
+
182
+ #### Interactive States
183
+ Прозрачные наложения. В компонентах реализованы через `::before` псевдоэлемент с `z-index: -1` + `isolation: isolate` на родителе — оверлей рисуется поверх базового фона, но под контентом (текст, иконки).
184
+ - `--color-state-hover` hover (dark: white/7%, light: black/5%)
185
+ - `--color-state-active` pressed/active (dark: white/12%, light: black/10%)
186
+ - `--color-state-selected` selected/checked (dark: white/10%, light: black/8%)
187
+
188
+ #### Borders
189
+ - `--color-border-default` стандартная граница
190
+ - `--color-border-strong` — hover/выделенная
191
+ - `--color-border-focus` — focus ring
192
+
193
+ #### Accent
194
+ - `--color-accent-default` — акцентный цвет (#EA6464)
195
+ - `--color-accent-hover` — акцент при hover
196
+ - `--color-accent-fg` текст/иконки на акцентном фоне
197
+ - `--color-accent-bg` subtle акцентный фон (бейджи)
198
+
199
+ #### Status/Alert
200
+ - `--color-status-info/success/warning/error` — адаптивные цвета для статусов
201
+ - `--color-status-*-bg` — фон для статусных бейджей и алертов
202
+
203
+ ### Elevation / Shadows
204
+
205
+ - `--shadow-1` dropdown, select, popover
206
+ - `--shadow-2` modal, drawer
207
+ - `--shadow-3` — toast, критические оверлеи
208
+
209
+ ### Z-index Scale
210
+
211
+ - `--z-dropdown`: 100
212
+ - `--z-sticky`: 200
213
+ - `--z-drawer`: 300
214
+ - `--z-modal`: 400
215
+ - `--z-toast`: 500
216
+ - `--z-tooltip`: 600
217
+
218
+ ### Отступы 4px grid
219
+
220
+ - `--space-1`: 4px
221
+ - `--space-2`: 8px
222
+ - `--space-3`: 12px
223
+ - `--space-4`: 16px
224
+ - `--space-5`: 20px
225
+ - `--space-6`: 24px
226
+ - `--space-8`: 32px
227
+ - `--space-10`: 40px
228
+ - `--space-12`: 48px
229
+ - `--space-16`: 64px
230
+
231
+ ### Border Radius
232
+
233
+ - `--radius-1`: 2px
234
+ - `--radius-2`: 4px
235
+ - `--radius-3`: 6px — кнопки, inputs
236
+ - `--radius-4`: 8px — карточки, модалки
237
+ - `--radius-6`: 12px — drawer, панели
238
+ - `--radius-8`: 16px — крупные контейнеры
239
+ - `--radius-full`: 9999px — pill, аватары
240
+
241
+ ### Component Heights
242
+
243
+ - `--height-1`: 24px (XS)
244
+ - `--height-2`: 32px (S)
245
+ - `--height-3`: 44px (M, touch target)
246
+ - `--height-4`: 56px (L)
247
+
248
+ ### Типографика (adaptive mobile → tablet+)
249
+
250
+ **Font weights:**
251
+ - `--font-weight-regular`: 400
252
+ - `--font-weight-medium`: 500
253
+ - `--font-weight-semibold`: 600
254
+
255
+ **Размеры:**
256
+ - `--text-4xl`: 32px → 40px (H1)
257
+ - `--text-3xl`: 28px → 36px (H2)
258
+ - `--text-2xl`: 24px → 28px (H3)
259
+ - `--text-xl`: 20px → 24px (H4)
260
+ - `--text-lg`: 16px → 18px (P1, основной текст)
261
+ - `--text-md`: 14px → 16px (P2)
262
+ - `--text-sm`: 12px → 14px (P3, метки)
263
+
264
+ **Letter Spacing:**
265
+ - `--tracking-4xl/3xl/2xl/xl`: 0 (крупные кегли — без трекинга)
266
+ - `--tracking-lg`: 0.02em
267
+ - `--tracking-md`: 0.04em → 0.02em
268
+ - `--tracking-sm`: 0.06em → 0.04em
259
269
 
260
270
  ### Переходы
261
271
 
262
272
  - `--transition-fast`: 0.15s ease
263
- - `--transition-normal`: 0.2s ease
264
- - `--transition-slow`: 0.3s ease
273
+ - `--transition-normal`: 0.20s ease
274
+ - `--transition-slow`: 0.30s ease
265
275
 
266
276
  ## Disabled States (состояния недоступности)
267
277
 
268
- Базовые правила для disabled состояний интерактивных компонентов:
269
-
270
- ### Стили
271
-
272
- ```css
273
- /* Для кнопок */
274
- .button:disabled {
275
- opacity: 0.5;
276
- cursor: not-allowed;
277
- }
278
-
279
- /* Для полей ввода - применяется ко всему wrapper */
280
- .input-wrapper--disabled,
281
- .select-wrapper--disabled {
282
- opacity: 0.5;
283
- cursor: not-allowed;
284
- }
285
-
286
- /* Отключение hover эффектов */
287
- .component:hover:not(:disabled) {
288
- /* hover стили */
289
- }
290
- ```
291
-
292
278
  ### Правила
293
279
 
294
- - **Прозрачность**: `opacity: 0.5` (50%) - единственный визуальный эффект для всех disabled элементов
295
- - **Курсор**: `cursor: not-allowed` - указывает на недоступность
296
- - **Область применения**:
297
- - Для **Button** - применяется к самой кнопке
298
- - Для **Input/Select** - применяется ко всему полю целиком (wrapper), включая label, input/select, hint/error
280
+ - **Button disabled** нейтральный стиль вместо opacity на акцентном цвете: прозрачный фон, `--color-fg-disabled`, стандартная рамка
281
+ - **Input/Select/Textarea disabled** применяется к wrapper целиком (label + поле + hint/error)
282
+ - **Курсор**: `cursor: not-allowed`
299
283
  - **Hover эффекты**: отключаются через `:hover:not(:disabled)`
300
- - **Цвет текста**: не меняется (сохраняет семантический цвет в зависимости от состояния поля)
301
- - **Применимо к**: Button, Input, Select и другие интерактивные компоненты
302
284
 
303
285
  ### Примеры
304
286
 
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),T=require("lucide-react"),S={xs:16,s:20,m:24,l:28,xl:48};var z={exports:{}},B={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),E=require("lucide-react"),ie=require("react-dom"),S={1:16,2:20,3:24,4:28,5:48};var z={exports:{}},L={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Z;function ae(){if(Z)return B;Z=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(l,n,a){var i=null;if(a!==void 0&&(i=""+a),n.key!==void 0&&(i=""+n.key),"key"in n){a={};for(var c in n)c!=="key"&&(a[c]=n[c])}else a=n;return n=a.ref,{$$typeof:o,type:l,key:i,ref:n!==void 0?n:null,props:a}}return B.Fragment=s,B.jsx=r,B.jsxs=r,B}var F={};/**
9
+ */var ee;function de(){if(ee)return L;ee=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(o,n,c){var i=null;if(c!==void 0&&(i=""+c),n.key!==void 0&&(i=""+n.key),"key"in n){c={};for(var l in n)l!=="key"&&(c[l]=n[l])}else c=n;return n=c.ref,{$$typeof:r,type:o,key:i,ref:n!==void 0?n:null,props:c}}return L.Fragment=t,L.jsx=s,L.jsxs=s,L}var W={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,9 +14,9 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Q;function oe(){return Q||(Q=1,process.env.NODE_ENV!=="production"&&function(){function o(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===se?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case j:return"Fragment";case k:return"Profiler";case N:return"StrictMode";case g:return"Suspense";case O:return"SuspenseList";case D:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case R:return"Portal";case y:return t.displayName||"Context";case $:return(t._context.displayName||"Context")+".Consumer";case I:var f=t.render;return t=t.displayName,t||(t=f.displayName||f.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case P:return f=t.displayName||null,f!==null?f:o(t.type)||"Memo";case A:f=t._payload,t=t._init;try{return o(t(f))}catch{}}return null}function s(t){return""+t}function r(t){try{s(t);var f=!1}catch{f=!0}if(f){f=console;var v=f.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return v.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),s(t)}}function l(t){if(t===j)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===A)return"<...>";try{var f=o(t);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function n(){var t=L.A;return t===null?null:t.getOwner()}function a(){return Error("react-stack-top-frame")}function i(t){if(q.call(t,"key")){var f=Object.getOwnPropertyDescriptor(t,"key").get;if(f&&f.isReactWarning)return!1}return t.key!==void 0}function c(t,f){function v(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",f))}v.isReactWarning=!0,Object.defineProperty(t,"key",{get:v,configurable:!0})}function m(){var t=o(this.type);return C[t]||(C[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function p(t,f,v,E,W,H){var w=v.ref;return t={$$typeof:_,type:t,key:f,props:v,_owner:E},(w!==void 0?w:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:m}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function d(t,f,v,E,W,H){var w=f.children;if(w!==void 0)if(E)if(re(w)){for(E=0;E<w.length;E++)u(w[E]);Object.freeze&&Object.freeze(w)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(w);if(q.call(f,"key")){w=o(t);var M=Object.keys(f).filter(function(ne){return ne!=="key"});E=0<M.length?"{key: someKey, "+M.join(": ..., ")+": ...}":"{key: someKey}",K[w+E]||(M=0<M.length?"{"+M.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var te;function ue(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){function r(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===oe?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case _:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case $:return"Suspense";case A:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(typeof a.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),a.$$typeof){case p:return"Portal";case R:return a.displayName||"Context";case g:return(a._context.displayName||"Context")+".Consumer";case P:var b=a.render;return a=a.displayName,a||(a=b.displayName||b.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case O:return b=a.displayName||null,b!==null?b:r(a.type)||"Memo";case I:b=a._payload,a=a._init;try{return r(a(b))}catch{}}return null}function t(a){return""+a}function s(a){try{t(a);var b=!1}catch{b=!0}if(b){b=console;var w=b.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&a[Symbol.toStringTag]||a.constructor.name||"Object";return w.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(a)}}function o(a){if(a===_)return"<>";if(typeof a=="object"&&a!==null&&a.$$typeof===I)return"<...>";try{var b=r(a);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function n(){var a=Y.A;return a===null?null:a.getOwner()}function c(){return Error("react-stack-top-frame")}function i(a){if(X.call(a,"key")){var b=Object.getOwnPropertyDescriptor(a,"key").get;if(b&&b.isReactWarning)return!1}return a.key!==void 0}function l(a,b){function w(){G||(G=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}w.isReactWarning=!0,Object.defineProperty(a,"key",{get:w,configurable:!0})}function m(){var a=r(this.type);return J[a]||(J[a]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),a=this.props.ref,a!==void 0?a:null}function f(a,b,w,k,F,V){var T=w.ref;return a={$$typeof:N,type:a,key:b,props:w,_owner:k},(T!==void 0?T:null)!==null?Object.defineProperty(a,"ref",{enumerable:!1,get:m}):Object.defineProperty(a,"ref",{enumerable:!1,value:null}),a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(a,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(a,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.defineProperty(a,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a}function d(a,b,w,k,F,V){var T=b.children;if(T!==void 0)if(k)if(ce(T)){for(k=0;k<T.length;k++)u(T[k]);Object.freeze&&Object.freeze(T)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(T);if(X.call(b,"key")){T=r(a);var D=Object.keys(b).filter(function(le){return le!=="key"});k=0<D.length?"{key: someKey, "+D.join(": ..., ")+": ...}":"{key: someKey}",Q[T+k]||(D=0<D.length?"{"+D.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,E,w,M,w),K[w+E]=!0)}if(w=null,v!==void 0&&(r(v),w=""+v),i(f)&&(r(f.key),w=""+f.key),"key"in f){v={};for(var V in f)V!=="key"&&(v[V]=f[V])}else v=f;return w&&c(v,typeof t=="function"?t.displayName||t.name||"Unknown":t),p(t,w,v,n(),W,H)}function u(t){b(t)?t._store&&(t._store.validated=1):typeof t=="object"&&t!==null&&t.$$typeof===A&&(t._payload.status==="fulfilled"?b(t._payload.value)&&t._payload.value._store&&(t._payload.value._store.validated=1):t._store&&(t._store.validated=1))}function b(t){return typeof t=="object"&&t!==null&&t.$$typeof===_}var h=x,_=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),y=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),se=Symbol.for("react.client.reference"),L=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,re=Array.isArray,Y=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(t){return t()}};var X,C={},G=h.react_stack_bottom_frame.bind(h,a)(),J=Y(l(a)),K={};F.Fragment=j,F.jsx=function(t,f,v){var E=1e4>L.recentlyCreatedOwnerStacks++;return d(t,f,v,!1,E?Error("react-stack-top-frame"):G,E?Y(l(t)):J)},F.jsxs=function(t,f,v){var E=1e4>L.recentlyCreatedOwnerStacks++;return d(t,f,v,!0,E?Error("react-stack-top-frame"):G,E?Y(l(t)):J)}}()),F}process.env.NODE_ENV==="production"?z.exports=ae():z.exports=oe();var e=z.exports;function ee({children:o,variant:s="primary",size:r="m",fullWidth:l=!1,icon:n,disabled:a=!1,onClick:i,type:c="button",href:m,"aria-label":p,...d}){const u=n&&!o,b=["ds-button",`ds-button--${s}`,`ds-button--${r}`,l&&"ds-button--full",u&&"ds-button--icon-only"].filter(Boolean).join(" "),h=e.jsxs(e.Fragment,{children:[n&&!u&&e.jsx("span",{className:"ds-button__icon","aria-hidden":"true",children:n}),o,u&&e.jsx("span",{className:"ds-button__icon","aria-hidden":"true",children:n})]});if(m){const _=R=>{if(a){R.preventDefault();return}R.metaKey||R.ctrlKey||R.button===1||(R.preventDefault(),i==null||i(R))};return e.jsx("a",{className:b,href:a?void 0:m,onClick:_,"aria-label":p,"aria-disabled":a?"true":void 0,...d,children:h})}return e.jsx("button",{type:c,className:b,disabled:a,onClick:i,"aria-label":p,...d,children:h})}function ce({label:o,error:s,hint:r,fullWidth:l=!0,icon:n,iconRight:a,onIconRightClick:i,size:c="m",disabled:m,id:p,...d}){const u=p||`input-${x.useId()}`,b=r?`${u}-hint`:void 0,h=s?`${u}-error`:void 0,_=h||b;return e.jsxs("div",{className:`ds-input-wrapper ${l?"ds-input-wrapper--full":""} ${m?"ds-input-wrapper--disabled":""}`,children:[o&&e.jsx("label",{className:"ds-input-label",htmlFor:u,children:o}),e.jsxs("div",{className:"ds-input-container",children:[n&&e.jsx("span",{className:`ds-input-icon ds-input-icon--${c}`,"aria-hidden":"true",children:n}),e.jsx("input",{id:u,className:`ds-input ds-input--${c} ${n?"ds-input--with-icon":""} ${a?"ds-input--with-icon-right":""} ${s?"ds-input--error":""}`,disabled:m,"aria-invalid":s?"true":"false","aria-describedby":_,...d}),a&&e.jsx("button",{type:"button",className:`ds-input-icon-right ds-input-icon-right--${c}`,onClick:i,tabIndex:-1,"aria-label":"Toggle visibility",children:a})]}),r&&!s&&e.jsx("span",{id:b,className:"ds-input-hint",children:r}),s&&e.jsx("span",{id:h,className:"ds-input-error",role:"alert",children:s})]})}function le({label:o,error:s,hint:r,fullWidth:l=!0,size:n="m",disabled:a,id:i,resize:c=!0,rows:m=3,...p}){const d=i||`textarea-${x.useId()}`,u=r?`${d}-hint`:void 0,b=s?`${d}-error`:void 0,h=b||u;return e.jsxs("div",{className:`ds-textarea-wrapper ${l?"ds-textarea-wrapper--full":""} ${a?"ds-textarea-wrapper--disabled":""}`,children:[o&&e.jsx("label",{className:"ds-textarea-label",htmlFor:d,children:o}),e.jsx("textarea",{id:d,className:`ds-textarea ds-textarea--${n} ${s?"ds-textarea--error":""} ${c?"":"ds-textarea--no-resize"}`,disabled:a,"aria-invalid":s?"true":"false","aria-describedby":h,rows:m,...p}),r&&!s&&e.jsx("span",{id:u,className:"ds-textarea-hint",children:r}),s&&e.jsx("span",{id:b,className:"ds-textarea-error",role:"alert",children:s})]})}function ie({label:o,value:s,onChange:r,options:l=[],placeholder:n="Select option",error:a,fullWidth:i=!0,size:c="m",disabled:m=!1,id:p,...d}){const[u,b]=x.useState(!1),[h,_]=x.useState("down"),R=x.useRef(null),j=x.useRef(null),N=p||`select-${x.useId()}`,k=`${N}-label`,$=a?`${N}-error`:void 0;x.useEffect(()=>{const g=O=>{R.current&&!R.current.contains(O.target)&&b(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),x.useEffect(()=>{if(u&&R.current){const g=R.current.getBoundingClientRect(),P=window.innerHeight-g.bottom,A=g.top;P<300&&A>P?_("up"):_("down")}},[u]);const y=l.find(g=>g.value===s),I=c==="xs"?S.xs:c==="small"?S.s:S.m;return e.jsxs("div",{className:`ds-select-wrapper ${i?"ds-select-wrapper--full":""} ${m?"ds-select-wrapper--disabled":""}`,children:[o&&e.jsx("label",{id:k,className:"ds-select-label",children:o}),e.jsxs("div",{className:"ds-select-container",ref:R,children:[e.jsxs("button",{type:"button",id:N,role:"combobox","aria-haspopup":"listbox","aria-expanded":u,"aria-labelledby":o?k:void 0,"aria-invalid":a?"true":"false","aria-describedby":$,className:`ds-select-trigger ds-select-trigger--${c} ${a?"ds-select-trigger--error":""}`,onClick:()=>!m&&b(!u),disabled:m,...d,children:[e.jsx("span",{className:y?"":"ds-select-placeholder",children:(y==null?void 0:y.label)||n}),e.jsx(T.ChevronDown,{size:I,strokeWidth:1.5,className:`ds-select-icon ${u&&h==="down"?"ds-select-icon--open":""} ${u&&h==="up"?"ds-select-icon--up":""}`,"aria-hidden":"true"})]}),u&&e.jsx("div",{ref:j,role:"listbox","aria-labelledby":o?k:void 0,className:`ds-select-dropdown ds-select-dropdown--${c} ds-select-dropdown--${h}`,children:l.map(g=>e.jsx("button",{type:"button",role:"option","aria-selected":s===g.value,className:`ds-select-option ds-select-option--${c} ${s===g.value?"ds-select-option--selected":""}`,onClick:()=>{r==null||r(g.value),b(!1)},children:g.label},g.value))})]}),a&&e.jsx("span",{id:$,className:"ds-select-error",role:"alert",children:a})]})}function de({label:o,value:s=0,onChange:r,min:l=0,max:n=100,step:a=1,size:i="m",disabled:c=!1,hint:m,error:p,...d}){const u=()=>{if(c)return;const N=Math.min(Number(s)+a,n);r==null||r(N)},b=()=>{if(c)return;const N=Math.max(Number(s)-a,l);r==null||r(N)},h=N=>{if(c)return;const k=N.target.value;if(k===""){r==null||r(l);return}const $=Number(k);if(!isNaN($)){const y=Math.min(Math.max($,l),n);r==null||r(y)}},_=["ds-stepper-wrapper",c&&"ds-stepper-wrapper--disabled",p&&"ds-stepper-wrapper--error"].filter(Boolean).join(" "),R=["ds-stepper",`ds-stepper--${i}`,c&&"ds-stepper--disabled"].filter(Boolean).join(" "),j=i==="xs"?S.xs:i==="small"?S.s:S.m;return e.jsxs("div",{className:_,children:[o&&e.jsx("label",{className:"ds-stepper-label",children:o}),e.jsxs("div",{className:R,children:[e.jsx("button",{type:"button",className:"ds-stepper-button ds-stepper-button--minus",onClick:b,disabled:c||s<=l,"aria-label":"Decrease",children:e.jsx(T.Minus,{size:j,strokeWidth:1.5})}),e.jsx("input",{type:"number",className:"ds-stepper-input",value:s,onChange:h,min:l,max:n,step:a,disabled:c,...d}),e.jsx("button",{type:"button",className:"ds-stepper-button ds-stepper-button--plus",onClick:u,disabled:c||s>=n,"aria-label":"Increase",children:e.jsx(T.Plus,{size:j,strokeWidth:1.5})})]}),m&&!p&&e.jsx("div",{className:"ds-stepper-hint",children:m}),p&&e.jsx("div",{className:"ds-stepper-error",children:p})]})}function ue({children:o,padding:s="m",variant:r="info",hover:l=!1,onClick:n,href:a,disabled:i=!1,...c}){const p=(l?"interactive":r)==="interactive"||n||a,d=["ds-card",`ds-card--${s}`,p&&"ds-card--interactive"].filter(Boolean).join(" ");if(a){const h=_=>{if(i){_.preventDefault();return}_.metaKey||_.ctrlKey||_.button===1||(_.preventDefault(),n==null||n(_))};return e.jsx("a",{className:d,href:i?void 0:a,onClick:h,"aria-disabled":i?"true":void 0,...c,children:o})}const u=p&&n?"button":"div",b=p&&n?{type:"button",onClick:n,disabled:i}:{};return e.jsx(u,{className:d,role:p&&!n?"article":void 0,...b,...c,children:o})}function fe({children:o,...s}){return e.jsx("h1",{className:"ds-h1",...s,children:o})}function pe({children:o,...s}){return e.jsx("h2",{className:"ds-h2",...s,children:o})}function me({children:o,...s}){return e.jsx("h3",{className:"ds-h3",...s,children:o})}function xe({children:o,...s}){return e.jsx("h4",{className:"ds-h4",...s,children:o})}function be({children:o,secondary:s=!1,...r}){return e.jsx("p",{className:`ds-p1 ${s?"ds-p1--secondary":""}`,...r,children:o})}function he({children:o,secondary:s=!1,...r}){return e.jsx("p",{className:`ds-p2 ${s?"ds-p2--secondary":""}`,...r,children:o})}function je({children:o,secondary:s=!1,...r}){return e.jsx("p",{className:`ds-p3 ${s?"ds-p3--secondary":""}`,...r,children:o})}function ve({children:o,variant:s="default",size:r="m",role:l,...n}){const a=["ds-badge",`ds-badge--${s}`,`ds-badge--${r}`].filter(Boolean).join(" "),i=l||(["info","success","warning","error"].includes(s)?"status":void 0);return e.jsx("span",{className:a,role:i,...n,children:o})}const _e={info:T.Info,success:T.CheckCircle,warning:T.AlertTriangle,error:T.XCircle};function Ne({children:o,variant:s="info",title:r,onClose:l,role:n,...a}){const i=_e[s],c=n||(s==="error"?"alert":"status");return e.jsxs("div",{className:`ds-alert ds-alert--${s} ${r?"":"ds-alert--no-title"}`,role:c,...a,children:[i&&e.jsx("div",{className:"ds-alert__icon",children:e.jsx(i,{size:S.m,strokeWidth:1.5})}),e.jsxs("div",{className:"ds-alert__content",children:[r&&e.jsx("div",{className:"ds-alert__title",children:r}),o&&e.jsx("div",{className:"ds-alert__message",children:o})]}),l&&e.jsx("button",{type:"button",className:"ds-alert__close",onClick:l,"aria-label":"Close alert",children:e.jsx(T.X,{size:S.m,strokeWidth:1.5})})]})}function Ee({children:o,title:s,onClose:r,size:l="m",...n}){const a=x.useRef(null),i=x.useId();x.useEffect(()=>{const d=b=>{b.key==="Escape"&&(r==null||r())},u=b=>{a.current&&!a.current.contains(b.target)&&(r==null||r())};return document.addEventListener("keydown",d),document.addEventListener("mousedown",u),()=>{document.removeEventListener("keydown",d),document.removeEventListener("mousedown",u)}},[r]);const c=x.Children.toArray(o),m=c.find(d=>(d==null?void 0:d.type)===U),p=c.filter(d=>(d==null?void 0:d.type)!==U);return e.jsx("div",{className:"ds-modal-overlay",...n,children:e.jsxs("div",{className:`ds-modal ds-modal--${l}`,ref:a,role:"dialog","aria-modal":"true","aria-labelledby":s?i:void 0,children:[(s||r)&&e.jsxs("div",{className:"ds-modal__header",children:[s&&e.jsx("h3",{id:i,className:"ds-modal__title",children:s}),r&&e.jsx(ee,{variant:"ghost",size:"small",icon:e.jsx(T.X,{size:S.s,strokeWidth:1.5}),onClick:r,"aria-label":"Close modal"})]}),e.jsx("div",{className:"ds-modal__body",children:p}),m]})})}function U({children:o}){return e.jsx("div",{className:"ds-modal__footer",children:o})}function te({children:o,title:s="Code",defaultExpanded:r=!1,padding:l="s",...n}){const[a,i]=x.useState(r),c=["ds-code-accordion",`ds-code-accordion--${l}`].filter(Boolean).join(" ");return e.jsxs("div",{className:c,children:[e.jsxs("button",{type:"button",className:"ds-code-accordion__header",onClick:()=>i(!a),"aria-expanded":a,children:[e.jsx("span",{className:"ds-code-accordion__title",children:s}),e.jsx(T.ChevronDown,{size:S.s,strokeWidth:1.5,className:`ds-code-accordion__icon ${a?"ds-code-accordion__icon--expanded":""}`})]}),a&&e.jsx("pre",{className:"ds-code-accordion__content",...n,children:e.jsx("code",{children:o})})]})}function we({children:o,block:s=!1,collapsible:r=!1,title:l="Code",defaultExpanded:n=!1,...a}){return s?r?e.jsx(te,{title:l,defaultExpanded:n,...a,children:o}):e.jsx("pre",{className:"ds-code-block",...a,children:e.jsx("code",{children:o})}):e.jsx("code",{className:"ds-code-inline",...a,children:o})}function Re({href:o,children:s,onClick:r,target:l,rel:n,...a}){const c=l==="_blank"?n?`${n} noopener noreferrer`:"noopener noreferrer":n;return e.jsx("a",{href:o,className:"ds-link",onClick:r,target:l,rel:c,...a,children:s})}function ge({children:o,size:s="m",variant:r="ghost",...l}){return e.jsx("div",{className:"ds-tabs",role:"tablist",...l,children:x.Children.map(o,n=>x.isValidElement(n)?x.cloneElement(n,{size:s,variant:r}):n)})}function ye({children:o,selected:s=!1,onClick:r,size:l="m",variant:n="ghost",disabled:a=!1,icon:i,href:c,...m}){const p=i&&!o,d=["ds-tab",`ds-tab--${l}`,`ds-tab--${n}`,s&&"ds-tab--selected",p&&"ds-tab--icon-only"].filter(Boolean).join(" "),u=e.jsxs(e.Fragment,{children:[i&&e.jsx("span",{className:"ds-tab-icon",children:i}),o]});if(c){const b=h=>{if(a){h.preventDefault();return}h.metaKey||h.ctrlKey||h.button===1||(h.preventDefault(),r==null||r(h))};return e.jsx("a",{role:"tab","aria-current":s?"page":void 0,"aria-disabled":a?"true":void 0,className:d,href:a?void 0:c,onClick:b,...m,children:u})}return e.jsx("button",{role:"tab","aria-selected":s,className:d,onClick:r,disabled:a,...m,children:u})}function ke({children:o,title:s,defaultExpanded:r=!1,padding:l="m",...n}){const[a,i]=x.useState(r),c=["ds-accordion",`ds-accordion--${l}`].filter(Boolean).join(" ");return e.jsxs("div",{className:c,...n,children:[e.jsxs("button",{type:"button",className:"ds-accordion__header",onClick:()=>i(!a),"aria-expanded":a,children:[e.jsx("span",{className:"ds-accordion__title",children:s}),e.jsx(T.ChevronDown,{size:S.s,strokeWidth:1.5,className:`ds-accordion__icon ${a?"ds-accordion__icon--expanded":""}`})]}),a&&e.jsx("div",{className:"ds-accordion__content",children:o})]})}function $e({children:o,content:s,position:r,...l}){const[n,a]=x.useState(!1),[i,c]=x.useState(r||"top"),[m,p]=x.useState({x:0,arrowOffset:0}),d=x.useRef(null),u=x.useRef(null),b=x.useRef(!1);x.useEffect(()=>{n&&!r&&d.current&&u.current?requestAnimationFrame(()=>{if(!d.current||!u.current)return;const j=d.current.getBoundingClientRect(),N=u.current.getBoundingClientRect(),k=window.innerHeight,$=window.innerWidth,y=j.top,I=k-j.bottom,g=j.left,O=$-j.right,P=N.height,A=N.width;if(y>=P+8)c("top");else if(I>=P+8)c("bottom");else if(O>=A+8)c("right");else if(g>=A+8)c("left");else{const D=Math.max(y,I,g,O);c(D===y?"top":D===I?"bottom":D===O?"right":"left")}}):r&&c(r)},[n,r]),x.useEffect(()=>{n&&u.current&&d.current?requestAnimationFrame(()=>{if(!u.current||!d.current)return;const j=u.current.getBoundingClientRect(),N=window.innerWidth,k=8;let $=0,y=0;(i==="top"||i==="bottom")&&(j.right>N-k?($=N-k-j.right,y=-$):j.left<k&&($=k-j.left,y=-$)),p({x:$,arrowOffset:y})}):p({x:0,arrowOffset:0})},[n,i]),x.useEffect(()=>{if(!n)return;const j=N=>{d.current&&!d.current.contains(N.target)&&a(!1)};return document.addEventListener("touchstart",j),()=>{document.removeEventListener("touchstart",j)}},[n]);const h=()=>{b.current=!0,a(j=>!j)},_=()=>{b.current||a(!0)},R=()=>{b.current||a(!1)};return s?e.jsxs("div",{ref:d,className:"ds-tooltip-wrapper",onMouseEnter:_,onMouseLeave:R,onTouchStart:h,...l,children:[o,n&&e.jsx("div",{ref:u,className:`ds-tooltip ds-tooltip--${i}`,role:"tooltip",style:{"--tooltip-offset-x":`${m.x}px`,"--arrow-offset":`${m.arrowOffset}px`},children:s})]}):o}function Te({checked:o=!1,onChange:s,size:r="m",disabled:l=!1,label:n,id:a,...i}){const c=a||`toggle-${x.useId()}`,m=["ds-toggle",`ds-toggle--${r}`,l&&"ds-toggle--disabled"].filter(Boolean).join(" ");return e.jsxs("label",{className:m,htmlFor:c,children:[e.jsx("input",{type:"checkbox",id:c,className:"ds-toggle__input",checked:o,onChange:p=>s==null?void 0:s(p.target.checked),disabled:l,...i}),e.jsx("span",{className:"ds-toggle__track",children:e.jsx("span",{className:"ds-toggle__thumb"})}),n&&e.jsx("span",{className:"ds-toggle__label",children:n})]})}function Se({checked:o=!1,onChange:s,size:r="m",disabled:l=!1,label:n,id:a,...i}){const c=a||`checkbox-${x.useId()}`,m=["ds-checkbox",`ds-checkbox--${r}`,l&&"ds-checkbox--disabled"].filter(Boolean).join(" "),p=r==="xs"?10:r==="small"?14:r==="large"?20:16;return e.jsxs("label",{className:m,htmlFor:c,children:[e.jsx("input",{type:"checkbox",id:c,className:"ds-checkbox__input",checked:o,onChange:d=>s==null?void 0:s(d.target.checked),disabled:l,...i}),e.jsx("span",{className:"ds-checkbox__box",children:o&&e.jsx(T.Check,{size:p,strokeWidth:2.5,className:"ds-checkbox__icon"})}),n&&e.jsx("span",{className:"ds-checkbox__label",children:n})]})}function Oe({checked:o=!1,onChange:s,size:r="m",disabled:l=!1,label:n,name:a,value:i,id:c,...m}){const p=c||`radio-${x.useId()}`,d=["ds-radio",`ds-radio--${r}`,l&&"ds-radio--disabled"].filter(Boolean).join(" ");return e.jsxs("label",{className:d,htmlFor:p,children:[e.jsx("input",{type:"radio",id:p,className:"ds-radio__input",checked:o,onChange:u=>s==null?void 0:s(u.target.checked),disabled:l,name:a,value:i,...m}),e.jsx("span",{className:"ds-radio__circle",children:e.jsx("span",{className:"ds-radio__dot"})}),n&&e.jsx("span",{className:"ds-radio__label",children:n})]})}exports.Accordion=ke;exports.Alert=Ne;exports.Badge=ve;exports.Button=ee;exports.Card=ue;exports.Checkbox=Se;exports.Code=we;exports.CodeAccordion=te;exports.H1=fe;exports.H2=pe;exports.H3=me;exports.H4=xe;exports.Input=ce;exports.Link=Re;exports.Modal=Ee;exports.ModalFooter=U;exports.P1=be;exports.P2=he;exports.P3=je;exports.Radio=Oe;exports.Select=ie;exports.Stepper=de;exports.Tab=ye;exports.Tabs=ge;exports.Textarea=le;exports.Toggle=Te;exports.Tooltip=$e;exports.iconSizes=S;
22
+ <%s key={someKey} {...props} />`,k,T,D,T),Q[T+k]=!0)}if(T=null,w!==void 0&&(s(w),T=""+w),i(b)&&(s(b.key),T=""+b.key),"key"in b){w={};for(var C in b)C!=="key"&&(w[C]=b[C])}else w=b;return T&&l(w,typeof a=="function"?a.displayName||a.name||"Unknown":a),f(a,T,w,n(),F,V)}function u(a){j(a)?a._store&&(a._store.validated=1):typeof a=="object"&&a!==null&&a.$$typeof===I&&(a._payload.status==="fulfilled"?j(a._payload.value)&&a._payload.value._store&&(a._payload.value._store.validated=1):a._store&&(a._store.validated=1))}function j(a){return typeof a=="object"&&a!==null&&a.$$typeof===N}var h=x,N=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),R=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),Y=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,ce=Array.isArray,H=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(a){return a()}};var G,J={},K=h.react_stack_bottom_frame.bind(h,c)(),Z=H(o(c)),Q={};W.Fragment=_,W.jsx=function(a,b,w){var k=1e4>Y.recentlyCreatedOwnerStacks++;return d(a,b,w,!1,k?Error("react-stack-top-frame"):K,k?H(o(a)):Z)},W.jsxs=function(a,b,w){var k=1e4>Y.recentlyCreatedOwnerStacks++;return d(a,b,w,!0,k?Error("react-stack-top-frame"):K,k?H(o(a)):Z)}}()),W}process.env.NODE_ENV==="production"?z.exports=de():z.exports=ue();var e=z.exports;function re({children:r,variant:t="primary",size:s="m",fullWidth:o=!1,icon:n,disabled:c=!1,onClick:i,type:l="button",href:m,"aria-label":f,...d}){const u=n&&!r,j=["ds-button",`ds-button--${t}`,`ds-button--${s}`,o&&"ds-button--full",u&&"ds-button--icon-only"].filter(Boolean).join(" "),h=e.jsxs(e.Fragment,{children:[n&&!u&&e.jsx("span",{className:"ds-button__icon","aria-hidden":"true",children:n}),r,u&&e.jsx("span",{className:"ds-button__icon","aria-hidden":"true",children:n})]});if(m){const N=p=>{if(c){p.preventDefault();return}p.metaKey||p.ctrlKey||p.button===1||(p.preventDefault(),i==null||i(p))};return e.jsx("a",{className:j,href:c?void 0:m,onClick:N,"aria-label":f,"aria-disabled":c?"true":void 0,...d,children:h})}return e.jsx("button",{type:l,className:j,disabled:c,onClick:i,"aria-label":f,...d,children:h})}function fe({label:r,error:t,hint:s,fullWidth:o=!0,icon:n,iconRight:c,onIconRightClick:i,size:l="m",disabled:m,id:f,...d}){const u=f||`input-${x.useId()}`,j=s?`${u}-hint`:void 0,h=t?`${u}-error`:void 0,N=h||j;return e.jsxs("div",{className:`ds-input-wrapper ${o?"ds-input-wrapper--full":""} ${m?"ds-input-wrapper--disabled":""}`,children:[r&&e.jsx("label",{className:"ds-input-label",htmlFor:u,children:r}),e.jsxs("div",{className:"ds-input-container",children:[n&&e.jsx("span",{className:`ds-input-icon ds-input-icon--${l}`,"aria-hidden":"true",children:n}),e.jsx("input",{id:u,className:`ds-input ds-input--${l} ${n?"ds-input--with-icon":""} ${c?"ds-input--with-icon-right":""} ${t?"ds-input--error":""}`,disabled:m,"aria-invalid":t?"true":"false","aria-describedby":N,...d}),c&&e.jsx("button",{type:"button",className:`ds-input-icon-right ds-input-icon-right--${l}`,onClick:i,tabIndex:-1,"aria-label":"Toggle visibility",children:c})]}),s&&!t&&e.jsx("span",{id:j,className:"ds-input-hint",children:s}),t&&e.jsx("span",{id:h,className:"ds-input-error",role:"alert",children:t})]})}function pe({label:r,error:t,hint:s,fullWidth:o=!0,size:n="m",disabled:c,id:i,resize:l=!0,rows:m=3,...f}){const d=i||`textarea-${x.useId()}`,u=s?`${d}-hint`:void 0,j=t?`${d}-error`:void 0,h=j||u;return e.jsxs("div",{className:`ds-textarea-wrapper ${o?"ds-textarea-wrapper--full":""} ${c?"ds-textarea-wrapper--disabled":""}`,children:[r&&e.jsx("label",{className:"ds-textarea-label",htmlFor:d,children:r}),e.jsx("textarea",{id:d,className:`ds-textarea ds-textarea--${n} ${t?"ds-textarea--error":""} ${l?"":"ds-textarea--no-resize"}`,disabled:c,"aria-invalid":t?"true":"false","aria-describedby":h,rows:m,...f}),s&&!t&&e.jsx("span",{id:u,className:"ds-textarea-hint",children:s}),t&&e.jsx("span",{id:j,className:"ds-textarea-error",role:"alert",children:t})]})}function me({label:r,value:t,onChange:s,options:o=[],placeholder:n="Select option",error:c,fullWidth:i=!0,size:l="m",disabled:m=!1,id:f,...d}){const[u,j]=x.useState(!1),[h,N]=x.useState("down"),p=x.useRef(null),_=x.useRef(null),v=f||`select-${x.useId()}`,y=`${v}-label`,g=c?`${v}-error`:void 0;x.useEffect(()=>{const $=A=>{p.current&&!p.current.contains(A.target)&&j(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]),x.useEffect(()=>{if(u&&p.current){const $=p.current.getBoundingClientRect(),O=window.innerHeight-$.bottom,I=$.top;O<300&&I>O?N("up"):N("down")}},[u]);const R=o.find($=>$.value===t),P=l==="xs"?S[1]:l==="small"?S[2]:S[3];return e.jsxs("div",{className:`ds-select-wrapper ${i?"ds-select-wrapper--full":""} ${m?"ds-select-wrapper--disabled":""}`,children:[r&&e.jsx("label",{id:y,className:"ds-select-label",children:r}),e.jsxs("div",{className:"ds-select-container",ref:p,children:[e.jsxs("button",{type:"button",id:v,role:"combobox","aria-haspopup":"listbox","aria-expanded":u,"aria-labelledby":r?y:void 0,"aria-invalid":c?"true":"false","aria-describedby":g,className:`ds-select-trigger ds-select-trigger--${l} ${c?"ds-select-trigger--error":""}`,onClick:()=>!m&&j(!u),disabled:m,...d,children:[e.jsx("span",{className:R?"":"ds-select-placeholder",children:(R==null?void 0:R.label)||n}),e.jsx(E.ChevronDown,{size:P,strokeWidth:1.5,className:`ds-select-icon ${u&&h==="down"?"ds-select-icon--open":""} ${u&&h==="up"?"ds-select-icon--up":""}`,"aria-hidden":"true"})]}),u&&e.jsx("div",{ref:_,role:"listbox","aria-labelledby":r?y:void 0,className:`ds-select-dropdown ds-select-dropdown--${l} ds-select-dropdown--${h}`,children:o.map($=>e.jsx("button",{type:"button",role:"option","aria-selected":t===$.value,className:`ds-select-option ds-select-option--${l} ${t===$.value?"ds-select-option--selected":""}`,onClick:()=>{s==null||s($.value),j(!1)},children:$.label},$.value))})]}),c&&e.jsx("span",{id:g,className:"ds-select-error",role:"alert",children:c})]})}function xe({label:r,value:t=0,onChange:s,min:o=0,max:n=100,step:c=1,size:i="m",disabled:l=!1,hint:m,error:f,...d}){const u=()=>{if(l)return;const v=Math.min(Number(t)+c,n);s==null||s(v)},j=()=>{if(l)return;const v=Math.max(Number(t)-c,o);s==null||s(v)},h=v=>{if(l)return;const y=v.target.value;if(y===""){s==null||s(o);return}const g=Number(y);if(!isNaN(g)){const R=Math.min(Math.max(g,o),n);s==null||s(R)}},N=["ds-stepper-wrapper",l&&"ds-stepper-wrapper--disabled",f&&"ds-stepper-wrapper--error"].filter(Boolean).join(" "),p=["ds-stepper",`ds-stepper--${i}`,l&&"ds-stepper--disabled"].filter(Boolean).join(" "),_=i==="xs"?S[1]:i==="small"?S[2]:S[3];return e.jsxs("div",{className:N,children:[r&&e.jsx("label",{className:"ds-stepper-label",children:r}),e.jsxs("div",{className:p,children:[e.jsx("button",{type:"button",className:"ds-stepper-button ds-stepper-button--minus",onClick:j,disabled:l||t<=o,"aria-label":"Decrease",children:e.jsx(E.Minus,{size:_,strokeWidth:1.5})}),e.jsx("input",{type:"number",className:"ds-stepper-input",value:t,onChange:h,min:o,max:n,step:c,disabled:l,...d}),e.jsx("button",{type:"button",className:"ds-stepper-button ds-stepper-button--plus",onClick:u,disabled:l||t>=n,"aria-label":"Increase",children:e.jsx(E.Plus,{size:_,strokeWidth:1.5})})]}),m&&!f&&e.jsx("div",{className:"ds-stepper-hint",children:m}),f&&e.jsx("div",{className:"ds-stepper-error",children:f})]})}function be({children:r,padding:t="m",variant:s="info",hover:o=!1,onClick:n,href:c,disabled:i=!1,...l}){const f=(o?"interactive":s)==="interactive"||n||c,d=["ds-card",`ds-card--${t}`,f&&"ds-card--interactive"].filter(Boolean).join(" ");if(c){const h=N=>{if(i){N.preventDefault();return}N.metaKey||N.ctrlKey||N.button===1||(N.preventDefault(),n==null||n(N))};return e.jsx("a",{className:d,href:i?void 0:c,onClick:h,"aria-disabled":i?"true":void 0,...l,children:r})}const u=f&&n?"button":"div",j=f&&n?{type:"button",onClick:n,disabled:i}:{};return e.jsx(u,{className:d,role:f&&!n?"article":void 0,...j,...l,children:r})}function he({children:r,...t}){return e.jsx("h1",{className:"ds-h1",...t,children:r})}function je({children:r,...t}){return e.jsx("h2",{className:"ds-h2",...t,children:r})}function _e({children:r,...t}){return e.jsx("h3",{className:"ds-h3",...t,children:r})}function ve({children:r,...t}){return e.jsx("h4",{className:"ds-h4",...t,children:r})}function Ne({children:r,secondary:t=!1,...s}){return e.jsx("p",{className:`ds-p1 ${t?"ds-p1--secondary":""}`,...s,children:r})}function we({children:r,secondary:t=!1,...s}){return e.jsx("p",{className:`ds-p2 ${t?"ds-p2--secondary":""}`,...s,children:r})}function ye({children:r,secondary:t=!1,...s}){return e.jsx("p",{className:`ds-p3 ${t?"ds-p3--secondary":""}`,...s,children:r})}function Ee({children:r,variant:t="default",size:s="m",role:o,...n}){const c=["ds-badge",`ds-badge--${t}`,`ds-badge--${s}`].filter(Boolean).join(" "),i=o||(["info","success","warning","error"].includes(t)?"status":void 0);return e.jsx("span",{className:c,role:i,...n,children:r})}const Re={info:E.Info,success:E.CheckCircle,warning:E.AlertTriangle,error:E.XCircle};function ke({children:r,variant:t="info",title:s,onClose:o,role:n,...c}){const i=Re[t],l=n||(t==="error"?"alert":"status");return e.jsxs("div",{className:`ds-alert ds-alert--${t} ${s?"":"ds-alert--no-title"}`,role:l,...c,children:[i&&e.jsx("div",{className:"ds-alert__icon",children:e.jsx(i,{size:S[3],strokeWidth:1.5})}),e.jsxs("div",{className:"ds-alert__content",children:[s&&e.jsx("div",{className:"ds-alert__title",children:s}),r&&e.jsx("div",{className:"ds-alert__message",children:r})]}),o&&e.jsx("button",{type:"button",className:"ds-alert__close",onClick:o,"aria-label":"Close alert",children:e.jsx(E.X,{size:S[3],strokeWidth:1.5})})]})}function Te({children:r,title:t,onClose:s,size:o="m",...n}){const c=x.useRef(null),i=x.useId();x.useEffect(()=>{const d=j=>{j.key==="Escape"&&(s==null||s())},u=j=>{c.current&&!c.current.contains(j.target)&&(s==null||s())};return document.addEventListener("keydown",d),document.addEventListener("mousedown",u),()=>{document.removeEventListener("keydown",d),document.removeEventListener("mousedown",u)}},[s]);const l=x.Children.toArray(r),m=l.find(d=>(d==null?void 0:d.type)===U),f=l.filter(d=>(d==null?void 0:d.type)!==U);return e.jsx("div",{className:"ds-modal-overlay",...n,children:e.jsxs("div",{className:`ds-modal ds-modal--${o}`,ref:c,role:"dialog","aria-modal":"true","aria-labelledby":t?i:void 0,children:[(t||s)&&e.jsxs("div",{className:"ds-modal__header",children:[t&&e.jsx("h3",{id:i,className:"ds-modal__title",children:t}),s&&e.jsx(re,{variant:"ghost",size:"small",icon:e.jsx(E.X,{size:S[2],strokeWidth:1.5}),onClick:s,"aria-label":"Close modal"})]}),e.jsx("div",{className:"ds-modal__body",children:f}),m]})})}function U({children:r}){return e.jsx("div",{className:"ds-modal__footer",children:r})}function ne({children:r,title:t="Code",defaultExpanded:s=!1,expanded:o,onToggle:n,padding:c="s",className:i="",...l}){const[m,f]=x.useState(s),d=o!==void 0,u=d?o:m,j=()=>{d?n==null||n(!o):f(N=>!N)},h=["ds-code-accordion",`ds-code-accordion--${c}`,i].filter(Boolean).join(" ");return e.jsxs("div",{className:h,...l,children:[e.jsxs("button",{type:"button",className:"ds-code-accordion__header",onClick:j,"aria-expanded":u,children:[e.jsx("span",{className:"ds-code-accordion__title",children:t}),e.jsx(E.ChevronDown,{size:S[2],strokeWidth:1.5,className:`ds-code-accordion__icon ${u?"ds-code-accordion__icon--expanded":""}`})]}),u&&e.jsx("pre",{className:"ds-code-accordion__content",children:e.jsx("code",{children:r})})]})}function $e({children:r,block:t=!1,collapsible:s=!1,title:o="Code",defaultExpanded:n=!1,...c}){return t?s?e.jsx(ne,{title:o,defaultExpanded:n,...c,children:r}):e.jsx("pre",{className:"ds-code-block",...c,children:e.jsx("code",{children:r})}):e.jsx("code",{className:"ds-code-inline",...c,children:r})}function ge({href:r,children:t,onClick:s,target:o,rel:n,...c}){const l=o==="_blank"?n?`${n} noopener noreferrer`:"noopener noreferrer":n;return e.jsx("a",{href:r,className:"ds-link",onClick:s,target:o,rel:l,...c,children:t})}function Se({children:r,size:t="m",variant:s="ghost",...o}){return e.jsx("div",{className:"ds-tabs",role:"tablist",...o,children:x.Children.map(r,n=>x.isValidElement(n)?x.cloneElement(n,{size:t,variant:s}):n)})}function Ae({children:r,selected:t=!1,onClick:s,size:o="m",variant:n="ghost",disabled:c=!1,icon:i,href:l,...m}){const f=i&&!r,d=["ds-tab",`ds-tab--${o}`,`ds-tab--${n}`,t&&"ds-tab--selected",f&&"ds-tab--icon-only"].filter(Boolean).join(" "),u=e.jsxs(e.Fragment,{children:[i&&e.jsx("span",{className:"ds-tab-icon",children:i}),r]});if(l){const j=h=>{if(c){h.preventDefault();return}h.metaKey||h.ctrlKey||h.button===1||(h.preventDefault(),s==null||s(h))};return e.jsx("a",{role:"tab","aria-current":t?"page":void 0,"aria-disabled":c?"true":void 0,className:d,href:c?void 0:l,onClick:j,...m,children:u})}return e.jsx("button",{role:"tab","aria-selected":t,className:d,onClick:s,disabled:c,...m,children:u})}function Ie({children:r,title:t,defaultExpanded:s=!1,expanded:o,onToggle:n,padding:c="m",...i}){const[l,m]=x.useState(s),f=o!==void 0,d=f?o:l,u=()=>{f?n==null||n(!o):m(h=>!h)},j=["ds-accordion",`ds-accordion--${c}`].filter(Boolean).join(" ");return e.jsxs("div",{className:j,...i,children:[e.jsxs("button",{type:"button",className:"ds-accordion__header",onClick:u,"aria-expanded":d,children:[e.jsx("span",{className:"ds-accordion__title",children:t}),e.jsx(E.ChevronDown,{size:S[2],strokeWidth:1.5,className:`ds-accordion__icon ${d?"ds-accordion__icon--expanded":""}`})]}),d&&e.jsx("div",{className:"ds-accordion__content",children:r})]})}function Pe({children:r,content:t,position:s,...o}){const[n,c]=x.useState(!1),[i,l]=x.useState(s||"top"),[m,f]=x.useState({x:0,arrowOffset:0}),d=x.useRef(null),u=x.useRef(null),j=x.useRef(!1);x.useEffect(()=>{n&&!s&&d.current&&u.current?requestAnimationFrame(()=>{if(!d.current||!u.current)return;const _=d.current.getBoundingClientRect(),v=u.current.getBoundingClientRect(),y=window.innerHeight,g=window.innerWidth,R=_.top,P=y-_.bottom,$=_.left,A=g-_.right,O=v.height,I=v.width;if(R>=O+8)l("top");else if(P>=O+8)l("bottom");else if(A>=I+8)l("right");else if($>=I+8)l("left");else{const B=Math.max(R,P,$,A);l(B===R?"top":B===P?"bottom":B===A?"right":"left")}}):s&&l(s)},[n,s]),x.useEffect(()=>{n&&u.current&&d.current?requestAnimationFrame(()=>{if(!u.current||!d.current)return;const _=u.current.getBoundingClientRect(),v=window.innerWidth,y=8;let g=0,R=0;(i==="top"||i==="bottom")&&(_.right>v-y?(g=v-y-_.right,R=-g):_.left<y&&(g=y-_.left,R=-g)),f({x:g,arrowOffset:R})}):f({x:0,arrowOffset:0})},[n,i]),x.useEffect(()=>{if(!n)return;const _=v=>{d.current&&!d.current.contains(v.target)&&c(!1)};return document.addEventListener("touchstart",_),()=>{document.removeEventListener("touchstart",_)}},[n]);const h=()=>{j.current=!0,c(_=>!_)},N=()=>{j.current||c(!0)},p=()=>{j.current||c(!1)};return t?e.jsxs("div",{ref:d,className:"ds-tooltip-wrapper",onMouseEnter:N,onMouseLeave:p,onTouchStart:h,...o,children:[r,n&&e.jsx("div",{ref:u,className:`ds-tooltip ds-tooltip--${i}`,role:"tooltip",style:{"--tooltip-offset-x":`${m.x}px`,"--arrow-offset":`${m.arrowOffset}px`},children:t})]}):r}function Oe({checked:r=!1,onChange:t,size:s="m",disabled:o=!1,label:n,id:c,...i}){const l=c||`toggle-${x.useId()}`,m=["ds-toggle",`ds-toggle--${s}`,o&&"ds-toggle--disabled"].filter(Boolean).join(" ");return e.jsxs("label",{className:m,htmlFor:l,children:[e.jsx("input",{type:"checkbox",id:l,className:"ds-toggle__input",checked:r,onChange:f=>t==null?void 0:t(f.target.checked),disabled:o,...i}),e.jsx("span",{className:"ds-toggle__track",children:e.jsx("span",{className:"ds-toggle__thumb"})}),n&&e.jsx("span",{className:"ds-toggle__label",children:n})]})}function Be({checked:r=!1,onChange:t,size:s="m",disabled:o=!1,label:n,id:c,...i}){const l=c||`checkbox-${x.useId()}`,m=["ds-checkbox",`ds-checkbox--${s}`,o&&"ds-checkbox--disabled"].filter(Boolean).join(" "),f=s==="xs"?10:s==="small"?14:s==="large"?20:16;return e.jsxs("label",{className:m,htmlFor:l,children:[e.jsx("input",{type:"checkbox",id:l,className:"ds-checkbox__input",checked:r,onChange:d=>t==null?void 0:t(d.target.checked),disabled:o,...i}),e.jsx("span",{className:"ds-checkbox__box",children:r&&e.jsx(E.Check,{size:f,strokeWidth:2.5,className:"ds-checkbox__icon"})}),n&&e.jsx("span",{className:"ds-checkbox__label",children:n})]})}function De({checked:r=!1,onChange:t,size:s="m",disabled:o=!1,label:n,name:c,value:i,id:l,...m}){const f=l||`radio-${x.useId()}`,d=["ds-radio",`ds-radio--${s}`,o&&"ds-radio--disabled"].filter(Boolean).join(" ");return e.jsxs("label",{className:d,htmlFor:f,children:[e.jsx("input",{type:"radio",id:f,className:"ds-radio__input",checked:r,onChange:u=>t==null?void 0:t(u.target.checked),disabled:o,name:c,value:i,...m}),e.jsx("span",{className:"ds-radio__circle",children:e.jsx("span",{className:"ds-radio__dot"})}),n&&e.jsx("span",{className:"ds-radio__label",children:n})]})}function Me({size:r="m",color:t="default",className:s="",...o}){return e.jsx("span",{className:["ds-spinner",`ds-spinner--${r}`,`ds-spinner--${t}`,s].filter(Boolean).join(" "),role:"status","aria-label":"Loading",...o})}function Le({width:r,height:t,shape:s="rect",className:o="",style:n={},...c}){return e.jsx("span",{className:["ds-skeleton",`ds-skeleton--${s}`,o].filter(Boolean).join(" "),style:{width:r,height:t,...n},"aria-hidden":"true",...c})}function We(r){let t=2166136261;for(let s=0;s<r.length;s++)t^=r.charCodeAt(s),t=Math.imul(t,16777619)>>>0;return t%360}function Fe({seed:r,icon:t,size:s=32,className:o="",style:n={},...c}){const i=We(r??"");return e.jsx("div",{className:["ds-avatar",o].filter(Boolean).join(" "),style:{width:s,height:s,"--ds-avatar-h":i,...n},"aria-hidden":"true",...c,children:t})}function Ye({children:r,size:t="compact",stickyTop:s,maxHeight:o,className:n="",style:c={},...i}){const l={...o?{maxHeight:o}:{},...s!==void 0?{"--ds-table-sticky-top":typeof s=="number"?`${s}px`:s}:{},...c};return e.jsx("div",{className:["ds-table-wrap",o?"ds-table-wrap--scroll":""].filter(Boolean).join(" "),style:l,children:e.jsx("table",{className:["ds-table",`ds-table--${t}`,n].filter(Boolean).join(" "),...i,children:r})})}function He({children:r,...t}){return e.jsx("thead",{...t,children:r})}function Ve({children:r,...t}){return e.jsx("tbody",{...t,children:r})}function Ce({children:r,interactive:t,selected:s,className:o="",onClick:n,...c}){return e.jsx("tr",{className:["ds-table-row",t||n?"ds-table-row--interactive":"",s?"ds-table-row--selected":"",o].filter(Boolean).join(" "),onClick:n,...c,children:r})}function ze({children:r,align:t="left",sortDir:s,onSort:o,width:n,className:c="",style:i={},...l}){const m=!!o||s!==void 0,f=s==="asc"?E.ChevronUp:s==="desc"?E.ChevronDown:E.ChevronsUpDown;return e.jsx("th",{className:["ds-th",m?"ds-th--sortable":"",s?"ds-th--sorted":"",t!=="left"?`ds-table-cell--${t}`:"",c].filter(Boolean).join(" "),onClick:o,style:{width:n,...i},...l,children:m?e.jsxs("span",{className:"ds-th__inner",children:[r,e.jsx("span",{className:"ds-th__sort-icon",children:e.jsx(f,{size:11,strokeWidth:2.5})})]}):r})}function Ue({children:r,align:t="left",secondary:s,muted:o,truncate:n,nowrap:c,className:i="",...l}){return e.jsx("td",{className:["ds-td",t!=="left"?`ds-table-cell--${t}`:"",s?"ds-table-cell--secondary":"",o?"ds-table-cell--muted":"",n?"ds-table-cell--truncate":"",c?"ds-table-cell--nowrap":"",i].filter(Boolean).join(" "),...l,children:r})}function qe({icon:r,title:t,description:s,action:o,size:n="m",className:c="",...i}){return e.jsxs("div",{className:["ds-empty-state",`ds-empty-state--${n}`,c].filter(Boolean).join(" "),...i,children:[r&&e.jsx("div",{className:"ds-empty-state__icon",children:r}),e.jsx("div",{className:"ds-empty-state__title",children:t}),s&&e.jsx("div",{className:"ds-empty-state__description",children:s}),o&&e.jsx("div",{className:"ds-empty-state__action",children:o})]})}function Xe({trigger:r,items:t=[],open:s,onOpenChange:o,align:n="left",className:c="",style:i,...l}){const[m,f]=x.useState(!1),d=s!==void 0,u=d?s:m,j=x.useRef(null),h=()=>{d?o==null||o(!1):f(!1)},N=()=>{const p=!u;d?o==null||o(p):f(p)};return x.useEffect(()=>{if(!u)return;const p=v=>{var y;(y=j.current)!=null&&y.contains(v.target)||h()},_=v=>{v.key==="Escape"&&h()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",_),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",_)}},[u]),e.jsxs("div",{ref:j,className:["ds-dropdown",c].filter(Boolean).join(" "),style:{position:"relative",...i},...l,children:[e.jsx("div",{className:"ds-dropdown__trigger",onClick:N,children:r}),u&&e.jsx("div",{className:["ds-dropdown__menu",`ds-dropdown__menu--${n}`].join(" "),children:t.map((p,_)=>{if(p.separator)return e.jsx("div",{className:"ds-dropdown__separator"},_);if(p.type==="section")return e.jsxs("div",{className:"ds-dropdown__section",children:[p.label&&e.jsx("div",{className:"ds-dropdown__section-label",children:p.label}),e.jsx("div",{className:"ds-dropdown__section-content",children:p.content})]},_);const v=!!p.href,y=v?"a":"button",g=v?{href:p.disabled?void 0:p.href,"aria-disabled":p.disabled?"true":void 0}:{type:"button",disabled:p.disabled};return e.jsxs(y,{className:["ds-dropdown__item",p.danger&&"ds-dropdown__item--danger"].filter(Boolean).join(" "),...g,onClick:()=>{var R;(R=p.onClick)==null||R.call(p),h()},children:[p.icon&&e.jsx("span",{className:"ds-dropdown__item-icon",children:p.icon}),e.jsx("span",{className:"ds-dropdown__item-label",children:p.label}),p.shortcut&&e.jsx("span",{className:"ds-dropdown__item-shortcut",children:p.shortcut})]},_)})})]})}const se={default:E.Info,success:E.CheckCircle,warning:E.AlertTriangle,error:E.XCircle};let M=[];const q=new Set;function ae(){q.forEach(r=>r([...M]))}function Ge(r){M=[...M,r],ae()}function Je(r){M=M.filter(t=>t.id!==r),ae()}function Ke(){const r=(t,s={})=>{Ge({id:`${Date.now()}-${Math.random()}`,message:t,type:"default",duration:4e3,...s})};return r.success=(t,s)=>r(t,{...s,type:"success"}),r.error=(t,s)=>r(t,{...s,type:"error"}),r.warning=(t,s)=>r(t,{...s,type:"warning"}),{toast:r}}function Ze({data:r,onDismiss:t}){const[s,o]=x.useState(!1),n=x.useRef(null);x.useEffect(()=>(requestAnimationFrame(()=>o(!0)),r.duration>0&&(n.current=setTimeout(()=>c(),r.duration)),()=>clearTimeout(n.current)),[]);function c(){o(!1),setTimeout(()=>t(r.id),250)}const i=se[r.type]??se.default;return e.jsxs("div",{className:["ds-toast",`ds-toast--${r.type}`,s&&"ds-toast--visible"].filter(Boolean).join(" "),role:r.type==="error"?"alert":"status","aria-live":"polite",children:[e.jsx("div",{className:"ds-toast__icon",children:e.jsx(i,{size:S[3],strokeWidth:1.5})}),e.jsx("span",{className:"ds-toast__message",children:r.message}),e.jsx("button",{className:"ds-toast__close",onClick:c,"aria-label":"Закрыть",children:e.jsx(E.X,{size:S[3],strokeWidth:1.5})})]})}function Qe({position:r="bottom-right"}){const[t,s]=x.useState(()=>[...M]);return x.useEffect(()=>(q.add(s),()=>q.delete(s)),[]),!t.length||typeof document>"u"?null:ie.createPortal(e.jsx("div",{className:["ds-toast-container",`ds-toast-container--${r}`].join(" "),children:t.map(o=>e.jsx(Ze,{data:o,onDismiss:Je},o.id))}),document.body)}exports.Accordion=Ie;exports.Alert=ke;exports.Avatar=Fe;exports.Badge=Ee;exports.Button=re;exports.Card=be;exports.Checkbox=Be;exports.Code=$e;exports.CodeAccordion=ne;exports.Dropdown=Xe;exports.EmptyState=qe;exports.H1=he;exports.H2=je;exports.H3=_e;exports.H4=ve;exports.Input=fe;exports.Link=ge;exports.Modal=Te;exports.ModalFooter=U;exports.P1=Ne;exports.P2=we;exports.P3=ye;exports.Radio=De;exports.Select=me;exports.Skeleton=Le;exports.Spinner=Me;exports.Stepper=xe;exports.Tab=Ae;exports.Table=Ye;exports.TableBody=Ve;exports.TableHead=He;exports.TableRow=Ce;exports.Tabs=Se;exports.Td=Ue;exports.Textarea=pe;exports.Th=ze;exports.ToastContainer=Qe;exports.Toggle=Oe;exports.Tooltip=Pe;exports.iconSizes=S;exports.useToast=Ke;