ics-ui-kit 0.1.0-alpha.52 → 0.1.0-alpha.55

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.
@@ -5,7 +5,7 @@ import { T as F } from "./index-BVqs-uqP.js";
5
5
  import { d as T, e as N, b as v, a as y } from "./FormHeader-BA2dJOPS.js";
6
6
  import { B as h } from "./Button--ooZ8ALo.js";
7
7
  import { a as b } from "./CheckboxField-C2G3OAEz.js";
8
- import { u as k } from "./useBreakpoints-wEcfJPHd.js";
8
+ import { e as k } from "./useBreakpoints-D8wKOvil.js";
9
9
  const H = F({
10
10
  slots: {
11
11
  header: "flex items-start gap-4",
@@ -85,4 +85,4 @@ export {
85
85
  z as F,
86
86
  R as a
87
87
  };
88
- //# sourceMappingURL=FormFooterTemplate-CAZGzVYy.js.map
88
+ //# sourceMappingURL=FormFooterTemplate-I-NxFuYd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormFooterTemplate-CAZGzVYy.js","sources":["../src/components/form/templates/header-template/FormHeaderTemplate.tsx","../src/components/form/templates/footer-template/FormFooterTemplate.tsx"],"sourcesContent":["import { FeatureIcon } from \"@/components/icon/feature-icon/FeatureIcon\";\nimport { LucideIcon } from \"lucide-react\";\nimport React, { HTMLAttributes, PropsWithChildren } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FormDescription, FormHeader, FormTitle } from \"../../components/form-header/FormHeader\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport interface FormHeaderTemplateVariants {\n\talignment?: \"compact\" | \"left\" | \"center\";\n}\n\nconst formHeaderTemplateStyles = tv({\n\tslots: {\n\t\theader: \"flex items-start gap-4\",\n\t\tcontentWrapper: \"flex flex-col gap-px lg:gap-1.5\",\n\t\ticon: \"flex-shrink-0\"\n\t},\n\tvariants: {\n\t\talignment: {\n\t\t\tcompact: {\n\t\t\t\theader: \"flex-row pr-9\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\theader: \"flex-col gap-2 lg:gap-4\",\n\t\t\t\tcontentWrapper: \"gap-0.5 lg:gap-1\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\theader: \"flex-col items-center gap-2 text-center lg:gap-4\",\n\t\t\t\tcontentWrapper: \"gap-0.5 lg:gap-1\"\n\t\t\t}\n\t\t}\n\t} satisfies VariantsConfig<FormHeaderTemplateVariants>,\n\tdefaultVariants: {\n\t\talignment: \"compact\"\n\t}\n});\n\nexport type BaseHeaderTemplateProps = Omit<HTMLAttributes<HTMLDivElement>, \"title\"> &\n\tFormHeaderTemplateVariants & {\n\t\t/** Заголовок формы */\n\t\ttitle: React.ReactNode;\n\t\t/** Описание формы */\n\t\tdescription?: React.ReactNode;\n\t\t/** Иконка заголовка */\n\t\ticon?: LucideIcon;\n\t\t/** Кастомная иконка заголовка */\n\t\tcustomIcon?: React.ReactNode;\n\t};\n\nexport const BaseHeaderTemplate = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseHeaderTemplateProps>>(\n\t({ className, icon: Icon, title, alignment, description, customIcon, ...props }, ref) => {\n\t\tconst { header, contentWrapper, icon } = formHeaderTemplateStyles({ alignment });\n\n\t\treturn (\n\t\t\t<FormHeader ref={ref} className={header({ class: className })} {...props}>\n\t\t\t\t{Icon && <FeatureIcon size=\"xl\" type=\"primary\" icon={Icon} className={icon()} />}\n\t\t\t\t{customIcon && customIcon}\n\t\t\t\t<div className={contentWrapper()}>\n\t\t\t\t\t{title}\n\t\t\t\t\t{description}\n\t\t\t\t</div>\n\t\t\t</FormHeader>\n\t\t);\n\t}\n);\n\n/**\n * Темплейт заголовка формы. Содержит иконку, заголовок и описание.\n * Имеет различные варианты расположения элементов\n */\nexport const FormHeaderTemplate = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseHeaderTemplateProps>>(\n\t({ title, description, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BaseHeaderTemplate\n\t\t\t\ttitle={<FormTitle>{title}</FormTitle>}\n\t\t\t\tdescription={<FormDescription>{description}</FormDescription>}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n);\n\nFormHeaderTemplate.displayName = \"FormHeaderTemplate\";\n","import { Button, ButtonProps } from \"@/components/button/button/Button\";\nimport { CheckboxField, CheckboxFieldProps } from \"@/components/checkbox/checkbox-field/CheckboxField\";\nimport { useIsMobile } from \"@/hooks/useBreakpoints\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FormFooter } from \"../../components/form-footer/FormFooter\";\n\nconst formFooterTemplateStyles = tv({\n\tslots: {\n\t\tcontainer: \"flex w-full flex-col gap-3 lg:flex-row\",\n\t\tstartBlock: \"flex items-center py-1 lg:py-2.5\",\n\t\tendBlock: \"ml-auto flex w-full flex-col gap-3 lg:w-auto lg:flex-row\"\n\t}\n});\n\nexport interface FormFooterTemplateProps {\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/** Текст для чекбокса */\n\tcheckboxLabel?: string;\n\t/** Пропсы для чекбокса */\n\tcheckboxProps?: CheckboxFieldProps;\n\t/** Основная кнопка */\n\tprimaryButton?: React.ReactNode;\n\t/** Пропсы для основной кнопки */\n\tprimaryButtonProps?: ButtonProps;\n\t/** Вторичная кнопка */\n\tsecondaryButton?: React.ReactNode;\n\t/** Пропсы для вторичной кнопки */\n\tsecondaryButtonProps?: ButtonProps;\n}\n\n/**\n * Темплейт футера формы. Содержит чекбокс и 2 кнопки, которыми можно управлять.\n * Адаптивен к размерам устройств\n */\nexport const FormFooterTemplate = React.forwardRef<HTMLDivElement, FormFooterTemplateProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tprimaryButton,\n\t\t\tsecondaryButton,\n\t\t\tcheckboxLabel,\n\t\t\tcheckboxProps,\n\t\t\tprimaryButtonProps,\n\t\t\tsecondaryButtonProps\n\t\t},\n\t\tref\n\t) => {\n\t\tconst isMobile = useIsMobile();\n\t\tconst { container, startBlock, endBlock } = formFooterTemplateStyles();\n\n\t\tif (isMobile) {\n\t\t\tprimaryButtonProps = { ...primaryButtonProps, size: \"xl\" };\n\t\t\tsecondaryButtonProps = { ...secondaryButtonProps, size: \"xl\" };\n\t\t}\n\t\tconst primaryButtonElement = primaryButton && (\n\t\t\t<Button key=\"primary-button\" variant=\"primary\" {...primaryButtonProps}>\n\t\t\t\t{primaryButton}\n\t\t\t</Button>\n\t\t);\n\n\t\tconst secondaryButtonElement = secondaryButton && (\n\t\t\t<Button key=\"secondary-button\" variant=\"outline\" {...secondaryButtonProps}>\n\t\t\t\t{secondaryButton}\n\t\t\t</Button>\n\t\t);\n\n\t\treturn (\n\t\t\t<FormFooter className={className} ref={ref}>\n\t\t\t\t<div className={container()}>\n\t\t\t\t\t{checkboxLabel && (\n\t\t\t\t\t\t<div className={startBlock()}>\n\t\t\t\t\t\t\t<CheckboxField label={checkboxLabel} {...checkboxProps} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className={endBlock()}>\n\t\t\t\t\t\t{isMobile\n\t\t\t\t\t\t\t? [primaryButtonElement, secondaryButtonElement]\n\t\t\t\t\t\t\t: [secondaryButtonElement, primaryButtonElement]}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</FormFooter>\n\t\t);\n\t}\n);\n\nFormFooterTemplate.displayName = \"FormFooterTemplate\";\n"],"names":["formHeaderTemplateStyles","tv","BaseHeaderTemplate","React","className","Icon","title","alignment","description","customIcon","props","ref","header","contentWrapper","icon","jsxs","FormHeader","jsx","FeatureIcon","FormHeaderTemplate","FormTitle","FormDescription","formFooterTemplateStyles","FormFooterTemplate","primaryButton","secondaryButton","checkboxLabel","checkboxProps","primaryButtonProps","secondaryButtonProps","isMobile","useIsMobile","container","startBlock","endBlock","primaryButtonElement","Button","secondaryButtonElement","FormFooter","CheckboxField"],"mappings":";;;;;;;;AAWA,MAAMA,IAA2BC,EAAG;AAAA,EACnC,OAAO;AAAA,IACN,QAAQ;AAAA,IACR,gBAAgB;AAAA,IACh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AA,EAAA;AAGH;AAEAZ,EAAmB,cAAc;"}
1
+ {"version":3,"file":"FormFooterTemplate-I-NxFuYd.js","sources":["../src/components/form/templates/header-template/FormHeaderTemplate.tsx","../src/components/form/templates/footer-template/FormFooterTemplate.tsx"],"sourcesContent":["import { FeatureIcon } from \"@/components/icon/feature-icon/FeatureIcon\";\nimport { LucideIcon } from \"lucide-react\";\nimport React, { HTMLAttributes, PropsWithChildren } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FormDescription, FormHeader, FormTitle } from \"../../components/form-header/FormHeader\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport interface FormHeaderTemplateVariants {\n\talignment?: \"compact\" | \"left\" | \"center\";\n}\n\nconst formHeaderTemplateStyles = tv({\n\tslots: {\n\t\theader: \"flex items-start gap-4\",\n\t\tcontentWrapper: \"flex flex-col gap-px lg:gap-1.5\",\n\t\ticon: \"flex-shrink-0\"\n\t},\n\tvariants: {\n\t\talignment: {\n\t\t\tcompact: {\n\t\t\t\theader: \"flex-row pr-9\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\theader: \"flex-col gap-2 lg:gap-4\",\n\t\t\t\tcontentWrapper: \"gap-0.5 lg:gap-1\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\theader: \"flex-col items-center gap-2 text-center lg:gap-4\",\n\t\t\t\tcontentWrapper: \"gap-0.5 lg:gap-1\"\n\t\t\t}\n\t\t}\n\t} satisfies VariantsConfig<FormHeaderTemplateVariants>,\n\tdefaultVariants: {\n\t\talignment: \"compact\"\n\t}\n});\n\nexport type BaseHeaderTemplateProps = Omit<HTMLAttributes<HTMLDivElement>, \"title\"> &\n\tFormHeaderTemplateVariants & {\n\t\t/** Заголовок формы */\n\t\ttitle: React.ReactNode;\n\t\t/** Описание формы */\n\t\tdescription?: React.ReactNode;\n\t\t/** Иконка заголовка */\n\t\ticon?: LucideIcon;\n\t\t/** Кастомная иконка заголовка */\n\t\tcustomIcon?: React.ReactNode;\n\t};\n\nexport const BaseHeaderTemplate = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseHeaderTemplateProps>>(\n\t({ className, icon: Icon, title, alignment, description, customIcon, ...props }, ref) => {\n\t\tconst { header, contentWrapper, icon } = formHeaderTemplateStyles({ alignment });\n\n\t\treturn (\n\t\t\t<FormHeader ref={ref} className={header({ class: className })} {...props}>\n\t\t\t\t{Icon && <FeatureIcon size=\"xl\" type=\"primary\" icon={Icon} className={icon()} />}\n\t\t\t\t{customIcon && customIcon}\n\t\t\t\t<div className={contentWrapper()}>\n\t\t\t\t\t{title}\n\t\t\t\t\t{description}\n\t\t\t\t</div>\n\t\t\t</FormHeader>\n\t\t);\n\t}\n);\n\n/**\n * Темплейт заголовка формы. Содержит иконку, заголовок и описание.\n * Имеет различные варианты расположения элементов\n */\nexport const FormHeaderTemplate = React.forwardRef<HTMLDivElement, PropsWithChildren<BaseHeaderTemplateProps>>(\n\t({ title, description, ...props }, ref) => {\n\t\treturn (\n\t\t\t<BaseHeaderTemplate\n\t\t\t\ttitle={<FormTitle>{title}</FormTitle>}\n\t\t\t\tdescription={<FormDescription>{description}</FormDescription>}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n);\n\nFormHeaderTemplate.displayName = \"FormHeaderTemplate\";\n","import { Button, ButtonProps } from \"@/components/button/button/Button\";\nimport { CheckboxField, CheckboxFieldProps } from \"@/components/checkbox/checkbox-field/CheckboxField\";\nimport { useIsMobile } from \"@/hooks/useBreakpoints\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { FormFooter } from \"../../components/form-footer/FormFooter\";\n\nconst formFooterTemplateStyles = tv({\n\tslots: {\n\t\tcontainer: \"flex w-full flex-col gap-3 lg:flex-row\",\n\t\tstartBlock: \"flex items-center py-1 lg:py-2.5\",\n\t\tendBlock: \"ml-auto flex w-full flex-col gap-3 lg:w-auto lg:flex-row\"\n\t}\n});\n\nexport interface FormFooterTemplateProps {\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/** Текст для чекбокса */\n\tcheckboxLabel?: string;\n\t/** Пропсы для чекбокса */\n\tcheckboxProps?: CheckboxFieldProps;\n\t/** Основная кнопка */\n\tprimaryButton?: React.ReactNode;\n\t/** Пропсы для основной кнопки */\n\tprimaryButtonProps?: ButtonProps;\n\t/** Вторичная кнопка */\n\tsecondaryButton?: React.ReactNode;\n\t/** Пропсы для вторичной кнопки */\n\tsecondaryButtonProps?: ButtonProps;\n}\n\n/**\n * Темплейт футера формы. Содержит чекбокс и 2 кнопки, которыми можно управлять.\n * Адаптивен к размерам устройств\n */\nexport const FormFooterTemplate = React.forwardRef<HTMLDivElement, FormFooterTemplateProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tprimaryButton,\n\t\t\tsecondaryButton,\n\t\t\tcheckboxLabel,\n\t\t\tcheckboxProps,\n\t\t\tprimaryButtonProps,\n\t\t\tsecondaryButtonProps\n\t\t},\n\t\tref\n\t) => {\n\t\tconst isMobile = useIsMobile();\n\t\tconst { container, startBlock, endBlock } = formFooterTemplateStyles();\n\n\t\tif (isMobile) {\n\t\t\tprimaryButtonProps = { ...primaryButtonProps, size: \"xl\" };\n\t\t\tsecondaryButtonProps = { ...secondaryButtonProps, size: \"xl\" };\n\t\t}\n\t\tconst primaryButtonElement = primaryButton && (\n\t\t\t<Button key=\"primary-button\" variant=\"primary\" {...primaryButtonProps}>\n\t\t\t\t{primaryButton}\n\t\t\t</Button>\n\t\t);\n\n\t\tconst secondaryButtonElement = secondaryButton && (\n\t\t\t<Button key=\"secondary-button\" variant=\"outline\" {...secondaryButtonProps}>\n\t\t\t\t{secondaryButton}\n\t\t\t</Button>\n\t\t);\n\n\t\treturn (\n\t\t\t<FormFooter className={className} ref={ref}>\n\t\t\t\t<div className={container()}>\n\t\t\t\t\t{checkboxLabel && (\n\t\t\t\t\t\t<div className={startBlock()}>\n\t\t\t\t\t\t\t<CheckboxField label={checkboxLabel} {...checkboxProps} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className={endBlock()}>\n\t\t\t\t\t\t{isMobile\n\t\t\t\t\t\t\t? [primaryButtonElement, secondaryButtonElement]\n\t\t\t\t\t\t\t: [secondaryButtonElement, primaryButtonElement]}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</FormFooter>\n\t\t);\n\t}\n);\n\nFormFooterTemplate.displayName = \"FormFooterTemplate\";\n"],"names":["formHeaderTemplateStyles","tv","BaseHeaderTemplate","React","className","Icon","title","alignment","description","customIcon","props","ref","header","contentWrapper","icon","jsxs","FormHeader","jsx","FeatureIcon","FormHeaderTemplate","FormTitle","FormDescription","formFooterTemplateStyles","FormFooterTemplate","primaryButton","secondaryButton","checkboxLabel","checkboxProps","primaryButtonProps","secondaryButtonProps","isMobile","useIsMobile","container","startBlock","endBlock","primaryButtonElement","Button","secondaryButtonElement","FormFooter","CheckboxField"],"mappings":";;;;;;;;AAWA,MAAMA,IAA2BC,EAAG;AAAA,EACnC,OAAO;AAAA,IACN,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,MAAM;AAAA,EACP;AAAA,EACA,UAAU;AAAA,IACT,WAAW;AAAA,MACV,SAAS;AAAA,QACR,QAAQ;AAAA,MACT;AAAA,MACA,MAAM;AAAA,QACL,QAAQ;AAAA,QACR,gBAAgB;AAAA,MACjB;AAAA,MACA,QAAQ;AAAA,QACP,QAAQ;AAAA,QACR,gBAAgB;AAAA,MAAA;AAAA,IACjB;AAAA,EAEF;AAAA,EACA,iBAAiB;AAAA,IAChB,WAAW;AAAA,EAAA;AAEb,CAAC,GAcYC,IAAqBC,EAAM;AAAA,EACvC,CAAC,EAAE,WAAAC,GAAW,MAAMC,GAAM,OAAAC,GAAO,WAAAC,GAAW,aAAAC,GAAa,YAAAC,GAAY,GAAGC,EAAM,GAAGC,MAAQ;AAClF,UAAA,EAAE,QAAAC,GAAQ,gBAAAC,GAAgB,MAAAC,MAASd,EAAyB,EA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AK,GACzDC,IAAuB,EAAE,GAAGA,GAAsB,MAAM,KAAK;AAExD,UAAAM,IAAuBX,KAC3B,gBAAAP,EAAAmB,GAAA,EAA4B,SAAQ,WAAW,GAAGR,GACjD,UAAAJ,EAAA,GADU,gBAEZ,GAGKa,IAAyBZ,KAC7B,gBAAAR,EAAAmB,GAAA,EAA8B,SAAQ,WAAW,GAAGP,GACnD,UAAAJ,EAAA,GADU,kBAEZ;AAIA,WAAA,gBAAAR,EAACqB,KAAW,WAAAlC,GAAsB,KAAAO,GACjC,4BAAC,OAAI,EAAA,WAAWqB,KACd,UAAA;AAAA,MACAN,KAAA,gBAAAT,EAAC,OAAI,EAAA,WAAWgB,EAAW,GAC1B,UAAC,gBAAAhB,EAAAsB,GAAA,EAAc,OAAOb,GAAgB,GAAGC,EAAA,CAAe,EACzD,CAAA;AAAA,MAEA,gBAAAV,EAAA,OAAA,EAAI,WAAWiB,EACd,GAAA,UAAAJ,IACE,CAACK,GAAsBE,CAAsB,IAC7C,CAACA,GAAwBF,CAAoB,EACjD,CAAA;AAAA,IAAA,EAAA,CACD,EACD,CAAA;AAAA,EAAA;AAGH;AAEAZ,EAAmB,cAAc;"}
@@ -0,0 +1,56 @@
1
+ import { useState as p, useCallback as g, useMemo as h } from "react";
2
+ import { jsxs as m, jsx as c, Fragment as b } from "react/jsx-runtime";
3
+ import { d as C, a as S, c as T, b as v } from "./Tag-CofZF1d0.js";
4
+ import { e as y } from "./useBreakpoints-D8wKOvil.js";
5
+ import { T as w } from "./index-BVqs-uqP.js";
6
+ function D({ value: t, defaultValue: r, onChange: l }) {
7
+ const [n, i] = p(r), e = t !== void 0, s = e ? t : n, u = g(
8
+ (o) => {
9
+ const a = typeof o == "function" ? o(s) : o;
10
+ e || i(a), l?.(a);
11
+ },
12
+ [s, e, l]
13
+ );
14
+ return [s, u];
15
+ }
16
+ const k = w({
17
+ base: "rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary",
18
+ variants: {
19
+ selected: {
20
+ true: "group-focus-within/search-select-trigger:shadow-focus"
21
+ }
22
+ }
23
+ }), N = (t) => {
24
+ const {
25
+ children: r,
26
+ onLabelClick: l,
27
+ onClose: n,
28
+ onKeyDown: i,
29
+ readonly: e = !1,
30
+ isFocused: s = !1,
31
+ tabIndex: u
32
+ } = t, o = !!n, a = y(), d = h(() => a ? "lg" : "md", [a]), f = k({ selected: s });
33
+ return /* @__PURE__ */ m(C, { size: d, className: f, tabIndex: u, onKeyDown: i, children: [
34
+ /* @__PURE__ */ c(
35
+ S,
36
+ {
37
+ className: "!shadow-none",
38
+ position: o && !e ? "left" : void 0,
39
+ size: d,
40
+ onClick: l,
41
+ asChild: !0,
42
+ children: /* @__PURE__ */ c("span", { children: r })
43
+ }
44
+ ),
45
+ !e && /* @__PURE__ */ m(b, { children: [
46
+ /* @__PURE__ */ c(T, {}),
47
+ /* @__PURE__ */ c(v, { className: "!shadow-none", size: d, onClick: n, tag: "span" })
48
+ ] })
49
+ ] });
50
+ };
51
+ N.displayName = "SearchSelectTag";
52
+ export {
53
+ N as S,
54
+ D as u
55
+ };
56
+ //# sourceMappingURL=SearchSelectTag-DLLzQvUa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchSelectTag-DSedIRSV.js","sources":["../src/hooks/useControllableState.ts","../src/components/search-select/components/SearchSelectTag.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\ntype UseControllableStateParams<T> = {\n\t/** Controlled значение */\n\tvalue?: T;\n\t/** Значение по умолчанию для uncontrolled режима */\n\tdefaultValue?: T;\n\t/** Callback при изменении значения */\n\tonChange?: (value: T) => void;\n};\n\n/**\n * Универсальный хук для управления controlled/uncontrolled состоянием.\n */\nexport function useControllableState<T>({ value, defaultValue, onChange }: UseControllableStateParams<T>) {\n\tconst [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);\n\n\tconst isControlled = value !== undefined;\n\tconst actualValue = isControlled ? value : uncontrolledValue;\n\n\tconst setValue = useCallback(\n\t\t(nextValue: T | ((prevValue: T) => T)) => {\n\t\t\tconst resolvedValue =\n\t\t\t\ttypeof nextValue === \"function\" ? (nextValue as (prevValue: T) => T)(actualValue as T) : nextValue;\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetUncontrolledValue(resolvedValue);\n\t\t\t}\n\n\t\t\tonChange?.(resolvedValue);\n\t\t},\n\t\t[actualValue, isControlled, onChange]\n\t);\n\n\treturn [actualValue, setValue] as const;\n}\n","import { TagButton, TagClose, TagDivider, TagWrapper } from \"@/components/tag/Tag\";\nimport { useIsMobile } from \"@/hooks/useBreakpoints\";\nimport { PropsWithChildren, useMemo } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst searchSelectTagStyles = tv({\n\tbase: \"rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary\",\n\tvariants: {\n\t\tselected: {\n\t\t\ttrue: \"group-focus-within/search-select-trigger:shadow-focus\"\n\t\t}\n\t}\n});\n\nexport interface SearchSelectTagProps {\n\tonLabelClick: (e: React.MouseEvent<HTMLElement>) => void;\n\tonClose: (e: React.MouseEvent<HTMLElement>) => void;\n\tonKeyDown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\n\treadonly?: boolean;\n\tisFocused?: boolean;\n\ttabIndex?: number;\n}\n\nexport const SearchSelectTag = (props: PropsWithChildren<SearchSelectTagProps>) => {\n\tconst {\n\t\tchildren,\n\t\tonLabelClick,\n\t\tonClose,\n\t\tonKeyDown,\n\t\treadonly = false,\n\t\tisFocused: selected = false,\n\t\ttabIndex\n\t} = props;\n\tconst hasClose = Boolean(onClose);\n\tconst isMobile = useIsMobile();\n\tconst size = useMemo(() => (isMobile ? \"lg\" : \"md\"), [isMobile]);\n\tconst styles = searchSelectTagStyles({ selected });\n\n\treturn (\n\t\t<TagWrapper size={size} className={styles} tabIndex={tabIndex} onKeyDown={onKeyDown}>\n\t\t\t<TagButton position={hasClose && !readonly ? \"left\" : undefined} size={size} onClick={onLabelClick} asChild>\n\t\t\t\t<span>{children}</span>\n\t\t\t</TagButton>\n\n\t\t\t{!readonly && (\n\t\t\t\t<>\n\t\t\t\t\t<TagDivider />\n\t\t\t\t\t<TagClose size={size} onClick={onClose} tag=\"span\" />\n\t\t\t\t</>\n\t\t\t)}\n\t\t</TagWrapper>\n\t);\n};\n\nSearchSelectTag.displayName = \"SearchSelectTag\";\n"],"names":["useControllableState","value","defaultValue","onChange","uncontrolledValue","setUncontrolledValue","useState","isControlled","actualValue","setValue","useCallback","nextValue","resolvedValue","searchSelectTagStyles","tv","SearchSelectTag","props","children","onLabelClick","onClose","onKeyDown","readonly","selected","tabIndex","hasClose","isMobile","useIsMobile","size","useMemo","styles","TagWrapper","jsx","TagButton","jsxs","Fragment","TagDivider","TagClose"],"mappings":";;;;;AAcO,SAASA,EAAwB,EAAE,OAAAC,GAAO,cAAAC,GAAc,UAAAC,KAA2C;AACzG,QAAM,CAACC,GAAmBC,CAAoB,IAAIC,EAASJ,CAAY,GAEjEK,IAAeN,MAAU,QACzBO,IAAcD,IAAeN,IAAQG,GAErCK,IAAWC;AAAA,IAChB,CAACC,MAAyC;AACzC,YAAMC,IACL,OAAOD,KAAc,aAAcA,EAAkCH,CAAgB,IAAIG;AAE1F,MAAKJ,KACJF,EAAqBO,CAAa,GAGnCT,IAAWS,CAAa;AAAA,IACzB;AAAA,IACA,CAACJ,GAAaD,GAAcJ,CAAQ;AAAA,EACrC;AAEO,SAAA,CAACK,GAAaC,CAAQ;AAC9B;AC9BA,MAAMI,IAAwBC,EAAG;AAAA,EAChC,MAAM;AAAA,EACN,UAAU;AAAA,IACT,UAAU;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACP;AAEF,CAAC,GAWYC,IAAkB,CAACC,MAAmD;AAC5E,QAAA;AAAA,IACL,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,WAAWC,IAAW;AAAA,IACtB,UAAAC;AAAA,EAAA,IACGP,GACEQ,IAAW,EAAQL,GACnBM,IAAWC,EAAY,GACvBC,IAAOC,EAAQ,MAAOH,IAAW,OAAO,MAAO,CAACA,CAAQ,CAAC,GACzDI,IAAShB,EAAsB,EAAE,UAAAS,GAAU;AAEjD,2BACEQ,GAAW,EAAA,MAAAH,GAAY,WAAWE,GAAQ,UAAAN,GAAoB,WAAAH,GAC9D,UAAA;AAAA,IAAA,gBAAAW,EAACC,GAAU,EAAA,UAAUR,KAAY,CAACH,IAAW,SAAS,QAAW,MAAAM,GAAY,SAAST,GAAc,SAAO,IAC1G,UAAC,gBAAAa,EAAA,QAAA,EAAM,UAAAd,EAAS,CAAA,GACjB;AAAA,IAEC,CAACI,KAEA,gBAAAY,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAW,EAAA;AAAA,wBACXC,GAAS,EAAA,MAAAT,GAAY,SAASR,GAAS,KAAI,OAAO,CAAA;AAAA,IAAA,EACpD,CAAA;AAAA,EAAA,GAEF;AAEF;AAEAJ,EAAgB,cAAc;"}
1
+ {"version":3,"file":"SearchSelectTag-DLLzQvUa.js","sources":["../src/hooks/useControllableState.ts","../src/components/search-select/components/SearchSelectTag.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\ntype UseControllableStateParams<T> = {\n\t/** Controlled значение */\n\tvalue?: T;\n\t/** Значение по умолчанию для uncontrolled режима */\n\tdefaultValue?: T;\n\t/** Callback при изменении значения */\n\tonChange?: (value: T) => void;\n};\n\n/**\n * Универсальный хук для управления controlled/uncontrolled состоянием.\n */\nexport function useControllableState<T>({ value, defaultValue, onChange }: UseControllableStateParams<T>) {\n\tconst [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);\n\n\tconst isControlled = value !== undefined;\n\tconst actualValue = isControlled ? value : uncontrolledValue;\n\n\tconst setValue = useCallback(\n\t\t(nextValue: T | ((prevValue: T) => T)) => {\n\t\t\tconst resolvedValue =\n\t\t\t\ttypeof nextValue === \"function\" ? (nextValue as (prevValue: T) => T)(actualValue as T) : nextValue;\n\n\t\t\tif (!isControlled) {\n\t\t\t\tsetUncontrolledValue(resolvedValue);\n\t\t\t}\n\n\t\t\tonChange?.(resolvedValue);\n\t\t},\n\t\t[actualValue, isControlled, onChange]\n\t);\n\n\treturn [actualValue, setValue] as const;\n}\n","import { TagButton, TagClose, TagDivider, TagWrapper } from \"@/components/tag/Tag\";\nimport { useIsMobile } from \"@/hooks/useBreakpoints\";\nimport { PropsWithChildren, useMemo } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst searchSelectTagStyles = tv({\n\tbase: \"rounded-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary\",\n\tvariants: {\n\t\tselected: {\n\t\t\ttrue: \"group-focus-within/search-select-trigger:shadow-focus\"\n\t\t}\n\t}\n});\n\nexport interface SearchSelectTagProps {\n\tonLabelClick: (e: React.MouseEvent<HTMLElement>) => void;\n\tonClose: (e: React.MouseEvent<HTMLElement>) => void;\n\tonKeyDown?: (e: React.KeyboardEvent<HTMLDivElement>) => void;\n\treadonly?: boolean;\n\tisFocused?: boolean;\n\ttabIndex?: number;\n}\n\nexport const SearchSelectTag = (props: PropsWithChildren<SearchSelectTagProps>) => {\n\tconst {\n\t\tchildren,\n\t\tonLabelClick,\n\t\tonClose,\n\t\tonKeyDown,\n\t\treadonly = false,\n\t\tisFocused: selected = false,\n\t\ttabIndex\n\t} = props;\n\tconst hasClose = Boolean(onClose);\n\tconst isMobile = useIsMobile();\n\tconst size = useMemo(() => (isMobile ? \"lg\" : \"md\"), [isMobile]);\n\tconst styles = searchSelectTagStyles({ selected });\n\n\treturn (\n\t\t<TagWrapper size={size} className={styles} tabIndex={tabIndex} onKeyDown={onKeyDown}>\n\t\t\t<TagButton\n\t\t\t\tclassName=\"!shadow-none\"\n\t\t\t\tposition={hasClose && !readonly ? \"left\" : undefined}\n\t\t\t\tsize={size}\n\t\t\t\tonClick={onLabelClick}\n\t\t\t\tasChild\n\t\t\t>\n\t\t\t\t<span>{children}</span>\n\t\t\t</TagButton>\n\n\t\t\t{!readonly && (\n\t\t\t\t<>\n\t\t\t\t\t<TagDivider />\n\t\t\t\t\t<TagClose className=\"!shadow-none\" size={size} onClick={onClose} tag=\"span\" />\n\t\t\t\t</>\n\t\t\t)}\n\t\t</TagWrapper>\n\t);\n};\n\nSearchSelectTag.displayName = \"SearchSelectTag\";\n"],"names":["useControllableState","value","defaultValue","onChange","uncontrolledValue","setUncontrolledValue","useState","isControlled","actualValue","setValue","useCallback","nextValue","resolvedValue","searchSelectTagStyles","tv","SearchSelectTag","props","children","onLabelClick","onClose","onKeyDown","readonly","selected","tabIndex","hasClose","isMobile","useIsMobile","size","useMemo","styles","TagWrapper","jsx","TagButton","jsxs","Fragment","TagDivider","TagClose"],"mappings":";;;;;AAcO,SAASA,EAAwB,EAAE,OAAAC,GAAO,cAAAC,GAAc,UAAAC,KAA2C;AACzG,QAAM,CAACC,GAAmBC,CAAoB,IAAIC,EAASJ,CAAY,GAEjEK,IAAeN,MAAU,QACzBO,IAAcD,IAAeN,IAAQG,GAErCK,IAAWC;AAAA,IAChB,CAACC,MAAyC;AACzC,YAAMC,IACL,OAAOD,KAAc,aAAcA,EAAkCH,CAAgB,IAAIG;AAE1F,MAAKJ,KACJF,EAAqBO,CAAa,GAGnCT,IAAWS,CAAa;AAAA,IACzB;AAAA,IACA,CAACJ,GAAaD,GAAcJ,CAAQ;AAAA,EACrC;AAEO,SAAA,CAACK,GAAaC,CAAQ;AAC9B;AC9BA,MAAMI,IAAwBC,EAAG;AAAA,EAChC,MAAM;AAAA,EACN,UAAU;AAAA,IACT,UAAU;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACP;AAEF,CAAC,GAWYC,IAAkB,CAACC,MAAmD;AAC5E,QAAA;AAAA,IACL,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,WAAWC,IAAW;AAAA,IACtB,UAAAC;AAAA,EAAA,IACGP,GACEQ,IAAW,EAAQL,GACnBM,IAAWC,EAAY,GACvBC,IAAOC,EAAQ,MAAOH,IAAW,OAAO,MAAO,CAACA,CAAQ,CAAC,GACzDI,IAAShB,EAAsB,EAAE,UAAAS,GAAU;AAEjD,2BACEQ,GAAW,EAAA,MAAAH,GAAY,WAAWE,GAAQ,UAAAN,GAAoB,WAAAH,GAC9D,UAAA;AAAA,IAAA,gBAAAW;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,WAAU;AAAA,QACV,UAAUR,KAAY,CAACH,IAAW,SAAS;AAAA,QAC3C,MAAAM;AAAA,QACA,SAAST;AAAA,QACT,SAAO;AAAA,QAEP,UAAA,gBAAAa,EAAC,UAAM,UAAAd,EAAS,CAAA;AAAA,MAAA;AAAA,IACjB;AAAA,IAEC,CAACI,KAEA,gBAAAY,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAW,EAAA;AAAA,MACZ,gBAAAJ,EAACK,KAAS,WAAU,gBAAe,MAAAT,GAAY,SAASR,GAAS,KAAI,OAAO,CAAA;AAAA,IAAA,EAC7E,CAAA;AAAA,EAAA,GAEF;AAEF;AAEAJ,EAAgB,cAAc;"}
@@ -3,7 +3,7 @@ import { S as c } from "../index-5Bhkapwi.js";
3
3
  import d, { useCallback as g } from "react";
4
4
  import { T as l } from "../index-BVqs-uqP.js";
5
5
  import { I as h } from "../IconButton-moydR8IU.js";
6
- import { u as C } from "../useBreakpoints-wEcfJPHd.js";
6
+ import { e as C } from "../useBreakpoints-D8wKOvil.js";
7
7
  import { c as v } from "../createLucideIcon-DwBrHnj9.js";
8
8
  /**
9
9
  * @license lucide-react v0.460.0 - ISC
@@ -2,7 +2,7 @@ import { D as s, a as i } from "../Dialog-CZdFN7TO.js";
2
2
  import { b as y, c as B, d as C, e as h, f as x, g as j, h as u, i as v, j as O, M as P, k as R, l as _, m as b, n as k, o as q, p as w, q as N, r as z, s as A, t as E } from "../Dialog-CZdFN7TO.js";
3
3
  import { jsx as a } from "react/jsx-runtime";
4
4
  import d from "react";
5
- import { F as g, B as m } from "../FormFooterTemplate-CAZGzVYy.js";
5
+ import { F as g, B as m } from "../FormFooterTemplate-I-NxFuYd.js";
6
6
  const o = d.forwardRef(
7
7
  ({ title: e, description: l, ...r }, t) => /* @__PURE__ */ a(
8
8
  m,
@@ -1,23 +1,23 @@
1
- import { jsx as a, jsxs as h } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as p, Fragment as J } from "react/jsx-runtime";
2
2
  import { I as H } from "../IconButton-moydR8IU.js";
3
3
  import { f as j, u as S } from "../useFileUpload-iDag0iqM.js";
4
4
  import U, { useMemo as T, useCallback as M } from "react";
5
5
  import { T as b } from "../index-BVqs-uqP.js";
6
6
  import { F as V } from "../FeatureIcon-yM7FhAXa.js";
7
7
  import { c as F } from "../createLucideIcon-DwBrHnj9.js";
8
- import { I as J } from "../image-BqL5JP90.js";
8
+ import { I as K } from "../image-BqL5JP90.js";
9
9
  import { X as q } from "../x-tDTt7hTQ.js";
10
- import { A as K, b as P, a as Q } from "../AlertIcon-DQs4wtDT.js";
11
- import { C as Y } from "../circle-alert-CVIokIC7.js";
12
- import { B as ee } from "../Button--ooZ8ALo.js";
13
- import { I as ae } from "../Icon-DH3ev9GK.js";
10
+ import { A as P, b as Q, a as Y } from "../AlertIcon-DQs4wtDT.js";
11
+ import { C as ee } from "../circle-alert-CVIokIC7.js";
12
+ import { B as ae } from "../Button--ooZ8ALo.js";
13
+ import { I as te } from "../Icon-DH3ev9GK.js";
14
14
  /**
15
15
  * @license lucide-react v0.460.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
19
  */
20
- const te = F("FileArchive", [
20
+ const re = F("FileArchive", [
21
21
  ["path", { d: "M10 12v-1", key: "v7bkov" }],
22
22
  ["path", { d: "M10 18v-2", key: "1cjy8d" }],
23
23
  ["path", { d: "M10 7V6", key: "dljcrl" }],
@@ -34,7 +34,7 @@ const te = F("FileArchive", [
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
36
  */
37
- const re = F("FileSpreadsheet", [
37
+ const oe = F("FileSpreadsheet", [
38
38
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
39
39
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
40
40
  ["path", { d: "M8 13h2", key: "yr2amv" }],
@@ -48,7 +48,7 @@ const re = F("FileSpreadsheet", [
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const oe = F("FileText", [
51
+ const se = F("FileText", [
52
52
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
53
53
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
54
54
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
@@ -61,7 +61,7 @@ const oe = F("FileText", [
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
63
  */
64
- const se = F("File", [
64
+ const le = F("File", [
65
65
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
66
66
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
67
67
  ]);
@@ -71,7 +71,7 @@ const se = F("File", [
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
73
  */
74
- const le = F("Headphones", [
74
+ const ie = F("Headphones", [
75
75
  [
76
76
  "path",
77
77
  {
@@ -97,7 +97,7 @@ const B = F("Upload", [
97
97
  * This source code is licensed under the ISC license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
99
  */
100
- const ie = F("Video", [
100
+ const ne = F("Video", [
101
101
  [
102
102
  "path",
103
103
  {
@@ -108,13 +108,13 @@ const ie = F("Video", [
108
108
  ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
109
109
  ]), Z = (r) => {
110
110
  const e = r.type, t = r.name;
111
- return e.includes("pdf") || t.endsWith(".pdf") || e.includes("word") || t.endsWith(".doc") || t.endsWith(".docx") ? oe : e.includes("zip") || e.includes("archive") || t.endsWith(".zip") || t.endsWith(".rar") ? te : e.includes("excel") || t.endsWith(".xls") || t.endsWith(".xlsx") ? re : e.includes("video/") ? ie : e.includes("audio/") ? le : e.startsWith("image/") ? J : se;
112
- }, ne = b({
111
+ return e.includes("pdf") || t.endsWith(".pdf") || e.includes("word") || t.endsWith(".doc") || t.endsWith(".docx") ? se : e.includes("zip") || e.includes("archive") || t.endsWith(".zip") || t.endsWith(".rar") ? re : e.includes("excel") || t.endsWith(".xls") || t.endsWith(".xlsx") ? oe : e.includes("video/") ? ne : e.includes("audio/") ? ie : e.startsWith("image/") ? K : le;
112
+ }, de = b({
113
113
  base: "size-10 rounded-md p-2.5 text-muted !shadow-none"
114
- }), de = ({ file: r }) => {
114
+ }), ce = ({ file: r }) => {
115
115
  const e = Z(r);
116
- return /* @__PURE__ */ a(V, { icon: e, type: "primary", size: "2xl", className: ne() });
117
- }, ce = b({
116
+ return /* @__PURE__ */ a(V, { icon: e, type: "primary", size: "2xl", className: de() });
117
+ }, pe = b({
118
118
  slots: {
119
119
  wrapper: "box-border flex h-16 justify-between gap-2 rounded-xl border border-secondary-border bg-background p-3 pe-3",
120
120
  icon: "-me-3 -mt-3 size-9 text-muted hover:bg-transparent",
@@ -125,11 +125,11 @@ const ie = F("Video", [
125
125
  }
126
126
  }), L = U.forwardRef(
127
127
  ({ onClear: r, file: e, className: t, ...l }, i) => {
128
- const o = ce();
129
- return /* @__PURE__ */ h("div", { className: o.wrapper({ className: t }), ref: i, ...l, children: [
130
- /* @__PURE__ */ h("div", { className: o.infoWrapper(), children: [
131
- /* @__PURE__ */ a(de, { file: e }),
132
- /* @__PURE__ */ h("div", { className: o.textWrapper(), children: [
128
+ const o = pe();
129
+ return /* @__PURE__ */ p("div", { className: o.wrapper({ className: t }), ref: i, ...l, children: [
130
+ /* @__PURE__ */ p("div", { className: o.infoWrapper(), children: [
131
+ /* @__PURE__ */ a(ce, { file: e }),
132
+ /* @__PURE__ */ p("div", { className: o.textWrapper(), children: [
133
133
  /* @__PURE__ */ a("p", { className: o.title(), children: e.name }),
134
134
  /* @__PURE__ */ a("p", { className: o.description(), children: j(e.size) })
135
135
  ] })
@@ -152,13 +152,13 @@ L.displayName = "FileUploadItem";
152
152
  const D = U.forwardRef(({ error: r, ...e }, t) => {
153
153
  const l = Array.isArray(r) ? r.join(`
154
154
  `) : r;
155
- return /* @__PURE__ */ h(K, { status: "error", focus: "medium", ...e, ref: t, children: [
156
- /* @__PURE__ */ a(P, { icon: Y }),
157
- /* @__PURE__ */ a(Q, { className: "whitespace-pre-line", children: l })
155
+ return /* @__PURE__ */ p(P, { status: "error", focus: "medium", ...e, ref: t, children: [
156
+ /* @__PURE__ */ a(Q, { icon: ee }),
157
+ /* @__PURE__ */ a(Y, { className: "whitespace-pre-line", children: l })
158
158
  ] });
159
159
  });
160
160
  D.displayName = "FileUploadError";
161
- const pe = b({
161
+ const me = b({
162
162
  base: "shrink-0"
163
163
  }), W = ({ icon: r, className: e, ...t }) => /* @__PURE__ */ a(
164
164
  V,
@@ -166,12 +166,12 @@ const pe = b({
166
166
  type: "primary",
167
167
  size: "2xl",
168
168
  icon: r,
169
- className: pe({ className: e }),
169
+ className: me({ className: e }),
170
170
  ...t
171
171
  }
172
172
  );
173
173
  W.displayName = "FileUploadDropAreaIcon";
174
- const me = b({
174
+ const he = b({
175
175
  slots: {
176
176
  wrapper: [
177
177
  "has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50",
@@ -199,8 +199,8 @@ Infinity size`,
199
199
  children: o,
200
200
  ...s
201
201
  }, c) => {
202
- const y = me();
203
- return /* @__PURE__ */ h("div", { role: "button", className: y.wrapper({ className: r }), ref: c, ...s, children: [
202
+ const y = he();
203
+ return /* @__PURE__ */ p("div", { role: "button", className: y.wrapper({ className: r }), ref: c, ...s, children: [
204
204
  /* @__PURE__ */ a(W, { icon: l || B, className: y.icon() }),
205
205
  /* @__PURE__ */ a("p", { className: y.title(), children: e }),
206
206
  t && /* @__PURE__ */ a("p", { className: y.description(), children: t }),
@@ -210,7 +210,7 @@ Infinity size`,
210
210
  }
211
211
  );
212
212
  E.displayName = "FileUploadDropArea";
213
- const he = b({
213
+ const fe = b({
214
214
  slots: {
215
215
  wrapper: [
216
216
  "has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50",
@@ -221,21 +221,26 @@ const he = b({
221
221
  ],
222
222
  icon: "mr-3 size-8 rounded-sm p-2",
223
223
  title: "text-sm font-medium text-primary-accent",
224
- description: "ml-1.5 flex flex-wrap justify-center gap-1.5 text-xs text-primary-fg"
224
+ description: "ml-1.5 flex flex-wrap justify-center gap-1.5 text-xs text-muted"
225
225
  }
226
226
  }), O = U.forwardRef(
227
227
  ({ className: r, title: e = "Upload files", description: t = "Drag & drop or click to browse", icon: l, children: i, ...o }, s) => {
228
- const c = he();
229
- return /* @__PURE__ */ h("div", { role: "button", className: c.wrapper({ className: r }), ref: s, ...o, children: [
228
+ const c = fe();
229
+ return /* @__PURE__ */ p("div", { role: "button", className: c.wrapper({ className: r }), ref: s, ...o, children: [
230
230
  /* @__PURE__ */ a(W, { icon: l || B, className: c.icon() }),
231
- /* @__PURE__ */ a("p", { className: c.title(), children: e }),
232
- t && /* @__PURE__ */ a("p", { className: c.description(), children: t }),
233
- i
231
+ /* @__PURE__ */ p("div", { className: "flex items-baseline", children: [
232
+ /* @__PURE__ */ a("p", { className: c.title(), children: e }),
233
+ t && /* @__PURE__ */ p(J, { children: [
234
+ /* @__PURE__ */ a("span", { className: "ml-1.5 text-muted", children: "∙" }),
235
+ /* @__PURE__ */ a("p", { className: c.description(), children: t })
236
+ ] }),
237
+ i
238
+ ] })
234
239
  ] });
235
240
  }
236
241
  );
237
242
  O.displayName = "FileUploadInlineDropArea";
238
- const _ = ({ children: r = "Remove all files", ...e }) => /* @__PURE__ */ a(ee, { size: "sm", variant: "outline", type: "button", ...e, children: r });
243
+ const _ = ({ children: r = "Remove all files", ...e }) => /* @__PURE__ */ a(ae, { size: "sm", variant: "outline", type: "button", ...e, children: r });
239
244
  _.displayName = "FileUploadClearButton";
240
245
  const X = ({
241
246
  isDragging: r,
@@ -283,7 +288,7 @@ const $ = ({
283
288
  }
284
289
  );
285
290
  $.displayName = "FileUploadCompactInputZone";
286
- const fe = b({
291
+ const ue = b({
287
292
  slots: {
288
293
  wrapper: "box-border flex h-10 items-center gap-2 rounded-lg border border-secondary-border bg-background p-2.5 pr-10",
289
294
  icon: "text-muted",
@@ -295,11 +300,11 @@ const fe = b({
295
300
  }
296
301
  }), G = U.forwardRef(
297
302
  ({ onClear: r, file: e, className: t, renderIcon: l, ...i }, o) => {
298
- const s = fe(), c = Z(e);
299
- return /* @__PURE__ */ h("div", { className: "relative", children: [
300
- /* @__PURE__ */ h("div", { className: s.wrapper({ className: t }), ref: o, ...i, children: [
301
- l ?? /* @__PURE__ */ a("div", { className: "size-5", children: /* @__PURE__ */ a(ae, { icon: c, size: "lg", className: s.icon() }) }),
302
- /* @__PURE__ */ a("div", { className: s.infoWrapper(), children: /* @__PURE__ */ h("div", { className: s.textWrapper(), children: [
303
+ const s = ue(), c = Z(e);
304
+ return /* @__PURE__ */ p("div", { className: "relative", children: [
305
+ /* @__PURE__ */ p("div", { className: s.wrapper({ className: t }), ref: o, ...i, children: [
306
+ l ?? /* @__PURE__ */ a("div", { className: "size-5", children: /* @__PURE__ */ a(te, { icon: c, size: "lg", className: s.icon() }) }),
307
+ /* @__PURE__ */ a("div", { className: s.infoWrapper(), children: /* @__PURE__ */ p("div", { className: s.textWrapper(), children: [
303
308
  /* @__PURE__ */ a("p", { className: s.title(), children: e.name }),
304
309
  /* @__PURE__ */ a("p", { className: s.description(), children: j(e.size) })
305
310
  ] }) })
@@ -319,9 +324,9 @@ const fe = b({
319
324
  }
320
325
  );
321
326
  G.displayName = "FileUploadItemCompact";
322
- const ue = b({
327
+ const ye = b({
323
328
  base: "flex flex-col gap-3"
324
- }), ye = (r) => {
329
+ }), be = (r) => {
325
330
  const {
326
331
  files: e,
327
332
  onRemove: t,
@@ -343,23 +348,23 @@ const ue = b({
343
348
  multiple: N,
344
349
  errorMessages: z,
345
350
  onFilesChange: (d) => {
346
- const u = d.map((m) => m.file);
351
+ const u = d.map((h) => h.file);
347
352
  s?.(u);
348
353
  },
349
354
  onFilesAdded: (d) => {
350
- const u = d.map((m) => m.file);
355
+ const u = d.map((h) => h.file);
351
356
  l?.(u);
352
357
  }
353
- }), n = T(() => e || g.map((d) => d.file), [e, g]), p = M(() => {
358
+ }), n = T(() => e || g.map((d) => d.file), [e, g]), m = M(() => {
354
359
  v.clearFiles(), i?.();
355
360
  }, [v, i]), f = M(
356
361
  (d, u) => {
357
- const m = g.find((R) => R.file.name === d.name && R.file.size === d.size)?.id;
358
- m && v.removeFile(m), t?.(d, u);
362
+ const h = g.find((R) => R.file.name === d.name && R.file.size === d.size)?.id;
363
+ h && v.removeFile(h), t?.(d, u);
359
364
  },
360
365
  [g, v, t]
361
366
  );
362
- return /* @__PURE__ */ h("div", { className: ue({ className: c }), children: [
367
+ return /* @__PURE__ */ p("div", { className: ye({ className: c }), children: [
363
368
  /* @__PURE__ */ a(
364
369
  X,
365
370
  {
@@ -371,16 +376,16 @@ const ue = b({
371
376
  }
372
377
  ),
373
378
  x.length > 0 && /* @__PURE__ */ a(D, { error: x }),
374
- n.length > 0 && /* @__PURE__ */ h("div", { className: "space-y-2", children: [
379
+ n.length > 0 && /* @__PURE__ */ p("div", { className: "space-y-2", children: [
375
380
  n.map((d, u) => /* @__PURE__ */ a(L, { file: d, onClear: () => f(d, u) }, u)),
376
- n.length > 1 && /* @__PURE__ */ a(_, { onClick: p, children: C })
381
+ n.length > 1 && /* @__PURE__ */ a(_, { onClick: m, children: C })
377
382
  ] })
378
383
  ] });
379
384
  };
380
- ye.displayName = "FileUpload";
381
- const be = b({
385
+ be.displayName = "FileUpload";
386
+ const ge = b({
382
387
  base: "box-border flex flex-col gap-2"
383
- }), ge = (r) => {
388
+ }), xe = (r) => {
384
389
  const {
385
390
  files: e,
386
391
  onRemove: t,
@@ -400,48 +405,48 @@ const be = b({
400
405
  multiple: I,
401
406
  errorMessages: w,
402
407
  onFilesChange: (n) => {
403
- const p = n.map((f) => f.file);
404
- o?.(p);
408
+ const m = n.map((f) => f.file);
409
+ o?.(m);
405
410
  },
406
411
  onFilesAdded: (n) => {
407
- const p = n.map((f) => f.file);
408
- l?.(p);
412
+ const m = n.map((f) => f.file);
413
+ l?.(m);
409
414
  }
410
415
  }), x = T(() => e || N.map((n) => n.file), [e, N]), v = M(
411
- (n, p) => {
416
+ (n, m) => {
412
417
  const f = N.find((d) => d.file.name === n.name && d.file.size === n.size)?.id;
413
- f && k.removeFile(f), t?.(n, p);
418
+ f && k.removeFile(f), t?.(n, m);
414
419
  },
415
420
  [N, k, t]
416
421
  );
417
- return /* @__PURE__ */ h("div", { className: be({ className: s }), children: [
422
+ return /* @__PURE__ */ p("div", { className: ge({ className: s }), children: [
418
423
  /* @__PURE__ */ a($, { ...k, isDragging: A, title: c, description: y }),
419
424
  g.length > 0 && /* @__PURE__ */ a(D, { error: g }),
420
- x.length > 0 && /* @__PURE__ */ a("div", { children: x.map((n, p) => {
421
- const f = p === 0, d = x.length === 1, u = p === x.length - 1;
422
- let m = "";
423
- return d ? m = "" : f ? m = "border-b-0 rounded-b-none" : u ? m = "rounded-t-none" : m = "border-b-0 rounded-none", /* @__PURE__ */ a(
425
+ x.length > 0 && /* @__PURE__ */ a("div", { children: x.map((n, m) => {
426
+ const f = m === 0, d = x.length === 1, u = m === x.length - 1;
427
+ let h = "";
428
+ return d ? h = "" : f ? h = "border-b-0 rounded-b-none" : u ? h = "rounded-t-none" : h = "border-b-0 rounded-none", /* @__PURE__ */ a(
424
429
  G,
425
430
  {
426
431
  file: n,
427
- onClear: () => v(n, p),
428
- className: m,
432
+ onClear: () => v(n, m),
433
+ className: h,
429
434
  renderIcon: C?.(n)
430
435
  },
431
- p
436
+ m
432
437
  );
433
438
  }) })
434
439
  ] });
435
440
  };
436
- ge.displayName = "FileUploadCompact";
441
+ xe.displayName = "FileUploadCompact";
437
442
  export {
438
- ye as FileUpload,
443
+ be as FileUpload,
439
444
  _ as FileUploadClearButton,
440
- ge as FileUploadCompact,
445
+ xe as FileUploadCompact,
441
446
  $ as FileUploadCompactInputZone,
442
447
  E as FileUploadDropArea,
443
448
  D as FileUploadError,
444
- de as FileUploadIcon,
449
+ ce as FileUploadIcon,
445
450
  O as FileUploadInlineDropArea,
446
451
  X as FileUploadInputZone,
447
452
  L as FileUploadItem,