ics-ui-kit 0.1.0-alpha.36 → 0.1.0-alpha.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{CheckboxField-CqWkYQ-Z.js → CheckboxField-BlIlieRl.js} +5 -4
  2. package/dist/CheckboxField-BlIlieRl.js.map +1 -0
  3. package/dist/{Field-CBc3Z3Lg.js → Field-CzOWEoqg.js} +2 -2
  4. package/dist/{Field-CBc3Z3Lg.js.map → Field-CzOWEoqg.js.map} +1 -1
  5. package/dist/{FieldLabel-CMipw7fJ.js → FieldLabel-BC7sPLmF.js} +3 -3
  6. package/dist/{FieldLabel-CMipw7fJ.js.map → FieldLabel-BC7sPLmF.js.map} +1 -1
  7. package/dist/{FormHeaderTemplate-NfdHG33w.js → FormHeaderTemplate-DZdIU--D.js} +2 -2
  8. package/dist/{FormHeaderTemplate-NfdHG33w.js.map → FormHeaderTemplate-DZdIU--D.js.map} +1 -1
  9. package/dist/{FormStack-DUZ-g6g2.js → FormStack-0Qvkszog.js} +3 -3
  10. package/dist/{FormStack-DUZ-g6g2.js.map → FormStack-0Qvkszog.js.map} +1 -1
  11. package/dist/IconTooltip-CXt3w1Dy.js +11 -0
  12. package/dist/IconTooltip-CXt3w1Dy.js.map +1 -0
  13. package/dist/{Popover-YwPKBpCX.js → Popover-Upajp2nF.js} +2 -2
  14. package/dist/{Popover-YwPKBpCX.js.map → Popover-Upajp2nF.js.map} +1 -1
  15. package/dist/{Select-DTHY73Qf.js → Select-DAc-Bz2N.js} +2 -2
  16. package/dist/{Select-DTHY73Qf.js.map → Select-DAc-Bz2N.js.map} +1 -1
  17. package/dist/{Tooltip-Bc6tybKO.js → Tooltip-B9IDsNwu.js} +2 -2
  18. package/dist/{Tooltip-Bc6tybKO.js.map → Tooltip-B9IDsNwu.js.map} +1 -1
  19. package/dist/blocks/auth/otp-form.js +1 -1
  20. package/dist/components/checkbox/Checkbox.d.ts +33 -0
  21. package/dist/components/checkbox/index.d.ts +1 -1
  22. package/dist/components/checkbox.js +4 -3
  23. package/dist/components/drawer.js +1 -1
  24. package/dist/components/dropdown.js +1 -1
  25. package/dist/components/field.js +1 -1
  26. package/dist/components/form.js +3 -3
  27. package/dist/components/icon-tooltip/IconTooltip.d.ts +3 -2
  28. package/dist/components/icon-tooltip.js +1 -1
  29. package/dist/components/label.js +1 -1
  30. package/dist/components/modal.js +1 -1
  31. package/dist/components/overflow-tooltip.js +1 -1
  32. package/dist/components/popover.js +1 -1
  33. package/dist/components/radio-group/RadioGroup.d.ts +4 -0
  34. package/dist/components/radio-group/RadioGroup.stories.d.ts +11 -0
  35. package/dist/components/radio-group/components/RadioGroupItem.d.ts +43 -0
  36. package/dist/components/radio-group/index.d.ts +2 -0
  37. package/dist/components/radio-group.d.ts +2 -0
  38. package/dist/components/radio-group.js +271 -0
  39. package/dist/components/radio-group.js.map +1 -0
  40. package/dist/components/resizable/Resizable.d.ts +23 -0
  41. package/dist/components/resizable/Resizable.stories.d.ts +8 -0
  42. package/dist/components/resizable/index.d.ts +1 -0
  43. package/dist/components/resizable.d.ts +2 -0
  44. package/dist/components/resizable.js +1552 -0
  45. package/dist/components/resizable.js.map +1 -0
  46. package/dist/components/scheduler.js +1 -1
  47. package/dist/components/search-select.js +2 -2
  48. package/dist/components/select.js +1 -1
  49. package/dist/components/sidebar.js +1 -1
  50. package/dist/components/slider/Slider.d.ts +4 -0
  51. package/dist/components/slider/Slider.stories.d.ts +10 -0
  52. package/dist/components/slider/components/SliderRange.d.ts +4 -0
  53. package/dist/components/slider/components/SliderThumb.d.ts +4 -0
  54. package/dist/components/slider/components/SliderTrack.d.ts +4 -0
  55. package/dist/components/slider/index.d.ts +4 -0
  56. package/dist/components/slider.d.ts +2 -0
  57. package/dist/components/slider.js +457 -0
  58. package/dist/components/slider.js.map +1 -0
  59. package/dist/components/switch.js +2 -2
  60. package/dist/components/tag-input.js +1 -1
  61. package/dist/components/tooltip.js +1 -1
  62. package/dist/index-BGQepRFJ.js +28 -0
  63. package/dist/index-BGQepRFJ.js.map +1 -0
  64. package/dist/{index-CYdkaWkn.js → index-C3surxzg.js} +380 -402
  65. package/dist/index-C3surxzg.js.map +1 -0
  66. package/dist/styles-scoped.css +110 -0
  67. package/dist/styles.css +86 -0
  68. package/package.json +6 -3
  69. package/dist/CheckboxField-CqWkYQ-Z.js.map +0 -1
  70. package/dist/IconTooltip-Dl8bBiR8.js +0 -11
  71. package/dist/IconTooltip-Dl8bBiR8.js.map +0 -1
  72. package/dist/index-CYdkaWkn.js.map +0 -1
@@ -5,13 +5,13 @@ import { u as F } from "./index-5Bhkapwi.js";
5
5
  import { c as W } from "./index-DFZozV_h.js";
6
6
  import { u as X, c as S } from "./index-C0UREtMP.js";
7
7
  import { u as $ } from "./index-BZPx6jYI.js";
8
- import { u as V } from "./index-CYdkaWkn.js";
8
+ import { u as V } from "./index-BGQepRFJ.js";
9
9
  import { P as J } from "./index-BGfrl8IX.js";
10
10
  import { P as _ } from "./index-CpDnqHCm.js";
11
11
  import { T as B } from "./index-BVqs-uqP.js";
12
12
  import { M as Q } from "./minus-BltQa7Q2.js";
13
13
  import { C as Y } from "./check-CeyaOoZv.js";
14
- import { F as Z } from "./FieldLabel-CMipw7fJ.js";
14
+ import { F as Z } from "./FieldLabel-BC7sPLmF.js";
15
15
  import { D as ee } from "./Description-B5wn0Rpy.js";
16
16
  var g = "Checkbox", [te, ge] = W(g), [re, I] = te(g);
17
17
  function ae(t) {
@@ -329,6 +329,7 @@ const ne = B({
329
329
  ce.displayName = "CheckboxField";
330
330
  export {
331
331
  O as C,
332
- ce as a
332
+ ce as a,
333
+ se as c
333
334
  };
334
- //# sourceMappingURL=CheckboxField-CqWkYQ-Z.js.map
335
+ //# sourceMappingURL=CheckboxField-BlIlieRl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxField-BlIlieRl.js","sources":["../node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@18.3.6_@types+react@18.3.20__@types+react@18._r3nd3zxrvqoyshwherrwad4qya/node_modules/@radix-ui/react-checkbox/dist/index.mjs","../src/components/checkbox/Checkbox.tsx","../src/components/checkbox/checkbox-field/CheckboxField.tsx"],"sourcesContent":["\"use client\";\n\n// src/checkbox.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar CHECKBOX_NAME = \"Checkbox\";\nvar [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\nvar [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);\nfunction CheckboxProvider(props) {\n const {\n __scopeCheckbox,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = \"on\",\n // @ts-expect-error\n internal_do_not_use_render\n } = props;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: CHECKBOX_NAME\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = control ? !!form || !!control.closest(\"form\") : (\n // We set this to true by default so that events bubble to forms without JS (SSR)\n true\n );\n const context = {\n checked,\n disabled,\n setChecked,\n control,\n setControl,\n name,\n form,\n value,\n hasConsumerStoppedPropagationRef,\n required,\n defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,\n isFormControl,\n bubbleInput,\n setBubbleInput\n };\n return /* @__PURE__ */ jsx(\n CheckboxProviderImpl,\n {\n scope: __scopeCheckbox,\n ...context,\n children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children\n }\n );\n}\nvar TRIGGER_NAME = \"CheckboxTrigger\";\nvar CheckboxTrigger = React.forwardRef(\n ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {\n const {\n control,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n isFormControl,\n bubbleInput\n } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const form = control?.form;\n if (form) {\n const reset = () => setChecked(initialCheckedStateRef.current);\n form.addEventListener(\"reset\", reset);\n return () => form.removeEventListener(\"reset\", reset);\n }\n }, [control, setChecked]);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"checkbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...checkboxProps,\n ref: composedRefs,\n onKeyDown: composeEventHandlers(onKeyDown, (event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onClick: composeEventHandlers(onClick, (event) => {\n setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n );\n }\n);\nCheckboxTrigger.displayName = TRIGGER_NAME;\nvar Checkbox = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeCheckbox,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...checkboxProps\n } = props;\n return /* @__PURE__ */ jsx(\n CheckboxProvider,\n {\n __scopeCheckbox,\n checked,\n defaultChecked,\n disabled,\n required,\n onCheckedChange,\n name,\n form,\n value,\n internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n CheckboxTrigger,\n {\n ...checkboxProps,\n ref: forwardedRef,\n __scopeCheckbox\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n CheckboxBubbleInput,\n {\n __scopeCheckbox\n }\n )\n ] })\n }\n );\n }\n);\nCheckbox.displayName = CHECKBOX_NAME;\nvar INDICATOR_NAME = \"CheckboxIndicator\";\nvar CheckboxIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeCheckbox, forceMount, ...indicatorProps } = props;\n const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(context.checked) || context.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef,\n style: { pointerEvents: \"none\", ...props.style }\n }\n )\n }\n );\n }\n);\nCheckboxIndicator.displayName = INDICATOR_NAME;\nvar BUBBLE_INPUT_NAME = \"CheckboxBubbleInput\";\nvar CheckboxBubbleInput = React.forwardRef(\n ({ __scopeCheckbox, ...props }, forwardedRef) => {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput\n } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n const bubbles = !hasConsumerStoppedPropagationRef.current;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n input.indeterminate = isIndeterminate(checked);\n setChecked.call(input, isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n }\n }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);\n const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: defaultChecked ?? defaultCheckedRef.current,\n required,\n disabled,\n name,\n value,\n form,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0,\n // We transform because the input is absolutely positioned but we have\n // rendered it **after** the button. This pulls it back to sit on top\n // of the button.\n transform: \"translateX(-100%)\"\n }\n }\n );\n }\n);\nCheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nexport {\n Checkbox,\n CheckboxIndicator,\n CheckboxIndicator as Indicator,\n Checkbox as Root,\n createCheckboxScope,\n CheckboxBubbleInput as unstable_BubbleInput,\n CheckboxBubbleInput as unstable_CheckboxBubbleInput,\n CheckboxProvider as unstable_CheckboxProvider,\n CheckboxTrigger as unstable_CheckboxTrigger,\n CheckboxProvider as unstable_Provider,\n CheckboxTrigger as unstable_Trigger\n};\n//# sourceMappingURL=index.mjs.map\n","import * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check, Minus } from \"lucide-react\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const checkboxStyles = tv({\n\tslots: {\n\t\troot: [\n\t\t\t\"peer h-4 w-4 shrink-0 rounded-sm border border-primary-border shadow-sm\",\n\t\t\t\"flex items-center justify-center\",\n\t\t\t\"hover:border-muted hover:shadow-base\",\n\t\t\t\"focus-visible:border-secondary-border focus-visible:shadow-focus focus-visible:outline-none\",\n\t\t\t\"disabled:cursor-not-allowed disabled:border-secondary-border disabled:bg-primary-bg disabled:shadow-sm\",\n\t\t\t\"data-[state=checked]:border-primary-accent data-[state=checked]:bg-primary-accent data-[state=checked]:text-primary-bg\",\n\t\t\t\"data-[state=checked]:hover:border-primary-accent-hover data-[state=checked]:hover:bg-primary-accent-hover data-[state=checked]:hover:shadow-base\",\n\t\t\t\"data-[state=checked]:focus-visible:shadow-focus\",\n\t\t\t\"data-[state=checked]:disabled:border-primary-accent data-[state=checked]:disabled:bg-primary-accent data-[state=checked]:disabled:opacity-50 data-[state=checked]:disabled:shadow-sm\",\n\t\t\t\"data-[state=indeterminate]:border-primary-accent data-[state=indeterminate]:bg-primary-accent data-[state=indeterminate]:text-primary-bg\",\n\t\t\t\"data-[state=indeterminate]:hover:border-primary-accent-hover data-[state=indeterminate]:hover:bg-primary-accent-hover data-[state=indeterminate]:hover:shadow-base\",\n\t\t\t\"data-[state=indeterminate]:focus-visible:shadow-focus\",\n\t\t\t\"data-[state=indeterminate]:disabled:border-primary-accent data-[state=indeterminate]:disabled:bg-primary-accent data-[state=indeterminate]:disabled:opacity-50 data-[state=indeterminate]:disabled:shadow-sm\"\n\t\t],\n\t\ticon: \"h-4 w-4\"\n\t}\n});\n\nexport type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n\t({ className, ...props }, ref) => {\n\t\tconst styles = checkboxStyles();\n\t\treturn (\n\t\t\t<CheckboxPrimitive.Root ref={ref} className={styles.root({ class: className })} {...props}>\n\t\t\t\t<CheckboxPrimitive.Indicator>\n\t\t\t\t\t{props.checked === \"indeterminate\" ? (\n\t\t\t\t\t\t<Minus className={styles.icon()} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Check className={styles.icon()} />\n\t\t\t\t\t)}\n\t\t\t\t</CheckboxPrimitive.Indicator>\n\t\t\t</CheckboxPrimitive.Root>\n\t\t);\n\t}\n);\n\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n","import * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Checkbox, CheckboxProps } from \"../Checkbox\";\nimport { tv } from \"tailwind-variants\";\nimport React, { useId } from \"react\";\nimport { FieldLabel } from \"@/components/label\";\nimport { Description } from \"@/components/description\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport interface CheckboxFieldVariants {\n\toutline?: boolean;\n\talignment?: \"left\" | \"right\";\n\tdisabled?: boolean;\n\terror?: boolean;\n\twithDescription?: boolean;\n}\n\nconst checkboxFieldStyles = tv({\n\tslots: {\n\t\tcontainer: \"flex cursor-pointer items-center space-x-3\",\n\t\ttextContainer: \"flex flex-col gap-1\",\n\t\tlabelWrapper: \"flex h-4 items-center\",\n\t\tlabel: \"cursor-pointer\",\n\t\tdescription: \"text-xs\"\n\t},\n\tvariants: {\n\t\toutline: {\n\t\t\ttrue: {\n\t\t\t\tcontainer: \"rounded-lg p-3 px-4 outline outline-1 outline-secondary-border\"\n\t\t\t}\n\t\t},\n\t\talignment: {\n\t\t\tleft: {},\n\t\t\tright: {\n\t\t\t\tcontainer: \"flex-row-reverse space-x-reverse\"\n\t\t\t}\n\t\t},\n\t\tdisabled: {\n\t\t\ttrue: {\n\t\t\t\tcontainer: \"cursor-default\",\n\t\t\t\ttextContainer: \"opacity-50\",\n\t\t\t\tlabel: \"cursor-default text-primary-fg\",\n\t\t\t\tdescription: \"text-muted\"\n\t\t\t}\n\t\t},\n\t\terror: {\n\t\t\ttrue: {\n\t\t\t\tlabel: \"text-status-error\"\n\t\t\t}\n\t\t},\n\t\twithDescription: {\n\t\t\ttrue: { container: \"items-start\" }\n\t\t}\n\t} satisfies VariantsConfig<CheckboxFieldVariants>,\n\tdefaultVariants: {\n\t\talignment: \"left\"\n\t}\n});\n\nexport type CheckboxFieldProps = CheckboxProps &\n\tOmit<CheckboxFieldVariants, \"withDescription\"> & {\n\t\tlabel?: string;\n\t\tdescription?: string;\n\t};\n\nconst CheckboxField = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxFieldProps>(\n\t({ className, id, label, alignment, disabled, error, outline, description, ...props }, ref) => {\n\t\tconst {\n\t\t\tcontainer,\n\t\t\ttextContainer,\n\t\t\tlabel: labelStyles,\n\t\t\tlabelWrapper,\n\t\t\tdescription: descriptionStyles\n\t\t} = checkboxFieldStyles({ alignment, disabled, error, outline, withDescription: !!description });\n\n\t\tconst generatedId = useId();\n\t\tconst checkboxId = id || `checkbox-${generatedId}`;\n\n\t\treturn (\n\t\t\t<label htmlFor={checkboxId} className={container({ class: className })}>\n\t\t\t\t<Checkbox disabled={disabled} id={checkboxId} {...props} ref={ref} />\n\t\t\t\t{(label || description) && (\n\t\t\t\t\t<div className={textContainer()}>\n\t\t\t\t\t\t{label && (\n\t\t\t\t\t\t\t<div className={labelWrapper()}>\n\t\t\t\t\t\t\t\t<FieldLabel htmlFor={checkboxId} className={labelStyles()}>\n\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t</FieldLabel>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{description && <Description className={descriptionStyles()}>{description}</Description>}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</label>\n\t\t);\n\t}\n);\n\nCheckboxField.displayName = \"CheckboxField\";\n\nexport { CheckboxField };\n"],"names":["CHECKBOX_NAME","createCheckboxContext","createCheckboxScope","createContextScope","CheckboxProviderImpl","useCheckboxContext","CheckboxProvider","props","__scopeCheckbox","checkedProp","children","defaultChecked","disabled","form","name","onCheckedChange","required","value","internal_do_not_use_render","checked","setChecked","useControllableState","control","setControl","React","bubbleInput","setBubbleInput","hasConsumerStoppedPropagationRef","isFormControl","context","isIndeterminate","jsx","isFunction","TRIGGER_NAME","CheckboxTrigger","onKeyDown","onClick","checkboxProps","forwardedRef","composedRefs","useComposedRefs","initialCheckedStateRef","reset","Primitive","getState","composeEventHandlers","event","prevChecked","Checkbox","jsxs","Fragment","CheckboxBubbleInput","INDICATOR_NAME","CheckboxIndicator","forceMount","indicatorProps","Presence","BUBBLE_INPUT_NAME","usePrevious","controlSize","useSize","input","inputProto","bubbles","defaultCheckedRef","checkboxStyles","tv","className","ref","styles","CheckboxPrimitive.Root","CheckboxPrimitive.Indicator","Minus","Check","checkboxFieldStyles","CheckboxField","id","label","alignment","error","outline","description","container","textContainer","labelStyles","labelWrapper","descriptionStyles","generatedId","useId","checkboxId","FieldLabel","Description"],"mappings":";;;;;;;;;;;;;;;AAaA,IAAIA,IAAgB,YAChB,CAACC,IAAuBC,EAAmB,IAAIC,EAAmBH,CAAa,GAC/E,CAACI,IAAsBC,CAAkB,IAAIJ,GAAsBD,CAAa;AACpF,SAASM,GAAiBC,GAAO;AAC/B,QAAM;AAAA,IACJ,iBAAAC;AAAA,IACA,SAASC;AAAA,IACT,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA;AAAA,IAER,4BAAAC;AAAA,EACJ,IAAMX,GACE,CAACY,GAASC,CAAU,IAAIC,EAAqB;AAAA,IACjD,MAAMZ;AAAA,IACN,aAAaE,KAAkB;AAAA,IAC/B,UAAUI;AAAA,IACV,QAAQf;AAAA,EACZ,CAAG,GACK,CAACsB,GAASC,CAAU,IAAIC,EAAM,SAAS,IAAI,GAC3C,CAACC,GAAaC,CAAc,IAAIF,EAAM,SAAS,IAAI,GACnDG,IAAmCH,EAAM,OAAO,EAAK,GACrDI,IAAgBN,IAAU,CAAC,CAACT,KAAQ,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AAA,OAAA,EAAI,WAAWsD,EACf,GAAA,UAAA,gBAAAtD,EAAC2D,GAAW,EAAA,SAASD,GAAY,WAAWL,EAAY,GACtD,YACF,CAAA,GACD;AAAA,QAEAH,KAAgB,gBAAAlD,EAAA4D,IAAA,EAAY,WAAWL,KAAsB,UAAYL,EAAA,CAAA;AAAA,MAAA,EAC3E,CAAA;AAAA,IAAA,GAEF;AAAA,EAAA;AAGH;AAEAN,GAAc,cAAc;","x_google_ignoreList":[0]}
@@ -2,7 +2,7 @@ import { jsxs as o, jsx as a } from "react/jsx-runtime";
2
2
  import * as y from "react";
3
3
  import { useId as v } from "react";
4
4
  import { T as W } from "./index-BVqs-uqP.js";
5
- import { F as N } from "./FieldLabel-CMipw7fJ.js";
5
+ import { F as N } from "./FieldLabel-BC7sPLmF.js";
6
6
  import { D as i } from "./Description-B5wn0Rpy.js";
7
7
  import { c as n } from "./utils-dsXlqdJg.js";
8
8
  import { c as b } from "./createLucideIcon-DwBrHnj9.js";
@@ -85,4 +85,4 @@ I.displayName = "Field";
85
85
  export {
86
86
  I as F
87
87
  };
88
- //# sourceMappingURL=Field-CBc3Z3Lg.js.map
88
+ //# sourceMappingURL=Field-CzOWEoqg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Field-CBc3Z3Lg.js","sources":["../node_modules/.pnpm/lucide-react@0.460.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/circle-help.js","../src/components/field/Field.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst CircleHelp = createLucideIcon(\"CircleHelp\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\", key: \"1u773s\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n]);\n\nexport { CircleHelp as default };\n//# sourceMappingURL=circle-help.js.map\n","import * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { CircleHelp } from \"lucide-react\";\nimport { FieldLabel } from \"@/components/label\";\nimport { Description } from \"@/components/description\";\nimport { cn } from \"@/lib/utils\";\nimport { useId } from \"react\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport type FieldLayout = \"horizontal\" | \"vertical\" | \"responsive\";\n\nexport interface FieldVariants {\n\t/** Вариант расположения элементов поля */\n\tlayout?: FieldLayout;\n\tshowGap?: boolean;\n}\n\nconst fieldStyles = tv({\n\tslots: {\n\t\twrapper: \"flex w-full space-y-0\",\n\t\tlabelWrapper: \"flex items-center gap-1\",\n\t\tcontrolWrapper: \"flex w-full min-w-0 flex-1 flex-col\",\n\t\tdescription: \"text-xs\",\n\t\terror: \"text-status-error\"\n\t},\n\tvariants: {\n\t\tlayout: {\n\t\t\thorizontal: {\n\t\t\t\twrapper: \"flex-row gap-4\",\n\t\t\t\tlabelWrapper: \"h-10 lg:h-9\"\n\t\t\t},\n\t\t\tvertical: {\n\t\t\t\twrapper: \"flex-col gap-2\",\n\t\t\t\tlabelWrapper: \"h-4\"\n\t\t\t},\n\t\t\tresponsive: {\n\t\t\t\twrapper: \"flex-col gap-2 lg:flex-row lg:gap-4\",\n\t\t\t\tlabelWrapper: \"h-4 lg:h-9\"\n\t\t\t}\n\t\t},\n\t\tshowGap: {\n\t\t\ttrue: { controlWrapper: \"gap-y-2\" }\n\t\t}\n\t} satisfies VariantsConfig<FieldVariants>,\n\tdefaultVariants: {\n\t\tlayout: \"horizontal\"\n\t}\n});\n\ntype DescriptionPlacement = \"text\" | \"icon\";\n\ntype ControlProps = {\n\t/** Режим только для чтения */\n\treadonly?: boolean;\n\t/** Идентификатор элемента. Используется для связи лейбла с элементом управления */\n\tid?: string;\n\t/** Текст сообщения об ошибке. При наличии делает поле невалидным */\n\terror?: string;\n};\n\nexport type FieldProps = Omit<FieldVariants, \"showGap\"> & {\n\t/** Заголовок поля */\n\ttitle: string;\n\t/** Описание поля */\n\tdescription?: string;\n\t/** Режим только для чтения */\n\treadonly?: boolean;\n\t/** Расположение описания */\n\tdescriptionPlacement?: DescriptionPlacement;\n\t/** Функция рендеринга контрола */\n\tcontrol: (props: ControlProps) => React.ReactNode;\n\t/** Обязательное поле */\n\trequired?: boolean;\n\t/** Текст ошибки */\n\terror?: string;\n\t/** Дополнительные классы для контейнера */\n\tclassName?: string;\n\t/** Дополнительные классы для лейбла */\n\tlabelClassName?: string;\n};\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n\t(\n\t\t{\n\t\t\ttitle,\n\t\t\tdescription,\n\t\t\tdescriptionPlacement = \"text\",\n\t\t\tcontrol,\n\t\t\trequired,\n\t\t\terror,\n\t\t\tclassName,\n\t\t\tlabelClassName,\n\t\t\tlayout,\n\t\t\treadonly\n\t\t},\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst showTextDescription = description && descriptionPlacement !== \"icon\";\n\t\tconst showIconDescription = description && descriptionPlacement === \"icon\";\n\n\t\tconst styles = fieldStyles({ layout, showGap: !!(showTextDescription || error) });\n\n\t\treturn (\n\t\t\t<div ref={ref} className={styles.wrapper({ className })}>\n\t\t\t\t<div className={styles.labelWrapper({ className: labelClassName })}>\n\t\t\t\t\t<FieldLabel\n\t\t\t\t\t\ttooltip={description}\n\t\t\t\t\t\ticon={showIconDescription ? CircleHelp : void 0}\n\t\t\t\t\t\trequired={!readonly && required}\n\t\t\t\t\t\thtmlFor={generatedId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</FieldLabel>\n\t\t\t\t</div>\n\n\t\t\t\t<div className={styles.controlWrapper()}>\n\t\t\t\t\t{control({ readonly, id: generatedId, error })}\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{showTextDescription && (\n\t\t\t\t\t\t\t<Description className={cn(styles.description())} children={description} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{error && <Description className={cn(styles.description(), styles.error())} children={error} />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nField.displayName = \"Field\";\n"],"names":["CircleHelp","createLucideIcon","fieldStyles","tv","Field","React","title","description","descriptionPlacement","control","required","error","className","labelClassName","layout","readonly","ref","generatedId","useId","showTextDescription","showIconDescription","styles","jsxs","jsx","FieldLabel","Description","cn"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAaC,EAAiB,cAAc;AAAA,EAChD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,wCAAwC,KAAK,SAAQ,CAAE;AAAA,EACrE,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAU,CAAA;AAC7C,CAAC,GCIKC,IAAcC,EAAG;AAAA,EACtB,OAAO;AAAA,IACN,SAAS;AAAA,IACT,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,OAAO;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACT,QAAQ;AAAA,MACP,YAAY;AAAA,QACX,SAAS;AAAA,QACT,cAAc;AAAA,MACf;AAAA,MACA,UAAU;AAAA,QACT,SAAS;AAAA,QACT,cAAc;AAAA,MACf;AAAA,MACA,YAAY;AAAA,QACX,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,IAEhB;AAAA,IACA,SAAS;AAAA,MACR,MAAM,EAAE,gBAAgB,UAAU;AAAA,IAAA;AAAA,EAEpC;AAAA,EACA,iBAAiB;AAAA,IAChB,QAAQ;AAAA,EAAA;AAEV,CAAC,GAkCYC,IAAQC,EAAM;AAAA,EAC1B,CACC;AAAA,IACC,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,sBAAAC,IAAuB;AAAA,IACvB,SAAAC;AAAA,IACA,UAAAC;AAAA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3.1/node_modules/lucide-react/dist/esm/icons/circle-help.js","../src/components/field/Field.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.460.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst CircleHelp = createLucideIcon(\"CircleHelp\", [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\", key: \"1u773s\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n]);\n\nexport { CircleHelp as default };\n//# sourceMappingURL=circle-help.js.map\n","import * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { CircleHelp } from \"lucide-react\";\nimport { FieldLabel } from \"@/components/label\";\nimport { Description } from \"@/components/description\";\nimport { cn } from \"@/lib/utils\";\nimport { useId } from \"react\";\nimport { VariantsConfig } from \"@/lib/utils/variants\";\n\nexport type FieldLayout = \"horizontal\" | \"vertical\" | \"responsive\";\n\nexport interface FieldVariants {\n\t/** Вариант расположения элементов поля */\n\tlayout?: FieldLayout;\n\tshowGap?: boolean;\n}\n\nconst fieldStyles = tv({\n\tslots: {\n\t\twrapper: \"flex w-full space-y-0\",\n\t\tlabelWrapper: \"flex items-center gap-1\",\n\t\tcontrolWrapper: \"flex w-full min-w-0 flex-1 flex-col\",\n\t\tdescription: \"text-xs\",\n\t\terror: \"text-status-error\"\n\t},\n\tvariants: {\n\t\tlayout: {\n\t\t\thorizontal: {\n\t\t\t\twrapper: \"flex-row gap-4\",\n\t\t\t\tlabelWrapper: \"h-10 lg:h-9\"\n\t\t\t},\n\t\t\tvertical: {\n\t\t\t\twrapper: \"flex-col gap-2\",\n\t\t\t\tlabelWrapper: \"h-4\"\n\t\t\t},\n\t\t\tresponsive: {\n\t\t\t\twrapper: \"flex-col gap-2 lg:flex-row lg:gap-4\",\n\t\t\t\tlabelWrapper: \"h-4 lg:h-9\"\n\t\t\t}\n\t\t},\n\t\tshowGap: {\n\t\t\ttrue: { controlWrapper: \"gap-y-2\" }\n\t\t}\n\t} satisfies VariantsConfig<FieldVariants>,\n\tdefaultVariants: {\n\t\tlayout: \"horizontal\"\n\t}\n});\n\ntype DescriptionPlacement = \"text\" | \"icon\";\n\ntype ControlProps = {\n\t/** Режим только для чтения */\n\treadonly?: boolean;\n\t/** Идентификатор элемента. Используется для связи лейбла с элементом управления */\n\tid?: string;\n\t/** Текст сообщения об ошибке. При наличии делает поле невалидным */\n\terror?: string;\n};\n\nexport type FieldProps = Omit<FieldVariants, \"showGap\"> & {\n\t/** Заголовок поля */\n\ttitle: string;\n\t/** Описание поля */\n\tdescription?: string;\n\t/** Режим только для чтения */\n\treadonly?: boolean;\n\t/** Расположение описания */\n\tdescriptionPlacement?: DescriptionPlacement;\n\t/** Функция рендеринга контрола */\n\tcontrol: (props: ControlProps) => React.ReactNode;\n\t/** Обязательное поле */\n\trequired?: boolean;\n\t/** Текст ошибки */\n\terror?: string;\n\t/** Дополнительные классы для контейнера */\n\tclassName?: string;\n\t/** Дополнительные классы для лейбла */\n\tlabelClassName?: string;\n};\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n\t(\n\t\t{\n\t\t\ttitle,\n\t\t\tdescription,\n\t\t\tdescriptionPlacement = \"text\",\n\t\t\tcontrol,\n\t\t\trequired,\n\t\t\terror,\n\t\t\tclassName,\n\t\t\tlabelClassName,\n\t\t\tlayout,\n\t\t\treadonly\n\t\t},\n\t\tref\n\t) => {\n\t\tconst generatedId = useId();\n\t\tconst showTextDescription = description && descriptionPlacement !== \"icon\";\n\t\tconst showIconDescription = description && descriptionPlacement === \"icon\";\n\n\t\tconst styles = fieldStyles({ layout, showGap: !!(showTextDescription || error) });\n\n\t\treturn (\n\t\t\t<div ref={ref} className={styles.wrapper({ className })}>\n\t\t\t\t<div className={styles.labelWrapper({ className: labelClassName })}>\n\t\t\t\t\t<FieldLabel\n\t\t\t\t\t\ttooltip={description}\n\t\t\t\t\t\ticon={showIconDescription ? CircleHelp : void 0}\n\t\t\t\t\t\trequired={!readonly && required}\n\t\t\t\t\t\thtmlFor={generatedId}\n\t\t\t\t\t>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</FieldLabel>\n\t\t\t\t</div>\n\n\t\t\t\t<div className={styles.controlWrapper()}>\n\t\t\t\t\t{control({ readonly, id: generatedId, error })}\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{showTextDescription && (\n\t\t\t\t\t\t\t<Description className={cn(styles.description())} children={description} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{error && <Description className={cn(styles.description(), styles.error())} children={error} />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nField.displayName = \"Field\";\n"],"names":["CircleHelp","createLucideIcon","fieldStyles","tv","Field","React","title","description","descriptionPlacement","control","required","error","className","labelClassName","layout","readonly","ref","generatedId","useId","showTextDescription","showIconDescription","styles","jsxs","jsx","FieldLabel","Description","cn"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAaC,EAAiB,cAAc;AAAA,EAChD,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,wCAAwC,KAAK,SAAQ,CAAE;AAAA,EACrE,CAAC,QAAQ,EAAE,GAAG,cAAc,KAAK,SAAU,CAAA;AAC7C,CAAC,GCIKC,IAAcC,EAAG;AAAA,EACtB,OAAO;AAAA,IACN,SAAS;AAAA,IACT,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,OAAO;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACT,QAAQ;AAAA,MACP,YAAY;AAAA,QACX,SAAS;AAAA,QACT,cAAc;AAAA,MACf;AAAA,MACA,UAAU;AAAA,QACT,SAA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AAI,EAACE,KAAY,WAAWC,EAAGL,EAAO,YAAa,CAAA,GAAG,UAAUd,EAAa,CAAA;AAAA,UAEzEI,KAAS,gBAAAY,EAACE,GAAY,EAAA,WAAWC,EAAGL,EAAO,YAAY,GAAGA,EAAO,MAAO,CAAA,GAAG,UAAUV,EAAO,CAAA;AAAA,QAAA,EAC9F,CAAA;AAAA,MAAA,EACD,CAAA;AAAA,IAAA,GACD;AAAA,EAAA;AAGH;AAEAP,EAAM,cAAc;","x_google_ignoreList":[0]}
@@ -4,7 +4,7 @@ import g from "react";
4
4
  import { P as L } from "./index-CpDnqHCm.js";
5
5
  import { T as o } from "./index-BVqs-uqP.js";
6
6
  import { I as h } from "./Icon-DH3ev9GK.js";
7
- import { I as y } from "./IconTooltip-Dl8bBiR8.js";
7
+ import { I as y } from "./IconTooltip-CXt3w1Dy.js";
8
8
  var M = "Label", d = n.forwardRef((a, t) => /* @__PURE__ */ r(
9
9
  L.label,
10
10
  {
@@ -59,7 +59,7 @@ const v = o({
59
59
  return /* @__PURE__ */ N(c, { ref: u, className: b({ className: a }), htmlFor: e, ...f, children: [
60
60
  /* @__PURE__ */ r("span", { className: x(), children: t }),
61
61
  p && /* @__PURE__ */ r(I, { className: w() }),
62
- s && (l ? /* @__PURE__ */ r(y, { content: l, iconSize: "sm", icon: s, className: i() }) : /* @__PURE__ */ r(h, { size: "sm", icon: s, className: i() }))
62
+ s && (l ? /* @__PURE__ */ r(y, { content: l, iconSize: "sm", icon: s, iconClassName: i() }) : /* @__PURE__ */ r(h, { size: "sm", icon: s, className: i() }))
63
63
  ] });
64
64
  }
65
65
  );
@@ -68,4 +68,4 @@ export {
68
68
  q as F,
69
69
  c as L
70
70
  };
71
- //# sourceMappingURL=FieldLabel-CMipw7fJ.js.map
71
+ //# sourceMappingURL=FieldLabel-BC7sPLmF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel-CMipw7fJ.js","sources":["../node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@18.3.6_@types+react@18.3.20__@types+react@18.3.2_lpwl52zkvlr7l444adoh36rhhe/node_modules/@radix-ui/react-label/dist/index.mjs","../src/components/label/Label.tsx","../src/components/label/field-label/components/RequiredIcon.tsx","../src/components/label/field-label/FieldLabel.tsx"],"sourcesContent":["\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst labelStyles = tv({\n\tbase: \"text-sm font-medium leading-none text-primary-fg peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n});\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root ref={ref} className={labelStyles({ className })} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import { tv } from \"tailwind-variants\";\n\nconst requiredIconStyles = tv({\n\tbase: \"stroke-status-error\"\n});\n\ninterface RequiredIconProps {\n\tclassName?: string;\n}\n\nexport function RequiredIcon({ className }: RequiredIconProps) {\n\treturn (\n\t\t<svg\n\t\t\tclassName={requiredIconStyles({ className })}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth=\"24\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M12.0001 3V21M20 7.5L4 16.5M4 7.5L20 16.5\"\n\t\t\t\tstrokeWidth=\"3\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","import React from \"react\";\nimport { Label } from \"../Label\";\nimport { tv } from \"tailwind-variants\";\nimport { Icon } from \"@/components/icon\";\nimport { LucideIcon } from \"lucide-react\";\nimport { IconTooltip } from \"@/components/icon-tooltip/IconTooltip\";\nimport { RequiredIcon } from \"./components/RequiredIcon\";\n\nconst fieldLabelVariants = tv({\n\tslots: {\n\t\tbase: \"flex h-4 min-w-0 items-center gap-x-0.5 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n\t\trequiredMark: \"h-2 w-2 self-start\",\n\t\ticon: \"ml-1 text-muted\",\n\t\tlabelWrapper: \"truncate\"\n\t}\n});\n\ninterface FieldLabelProps extends React.ComponentPropsWithoutRef<typeof Label> {\n\tclassName?: string;\n\trequired?: boolean;\n\ticon?: LucideIcon;\n\ttooltip?: string;\n}\n\nexport const FieldLabel = React.forwardRef<React.ElementRef<typeof Label>, FieldLabelProps>(\n\t({ className, children, htmlFor, icon, tooltip, required, ...props }, ref) => {\n\t\tconst { base, requiredMark, labelWrapper, icon: iconStyles } = fieldLabelVariants();\n\n\t\treturn (\n\t\t\t<Label ref={ref} className={base({ className })} htmlFor={htmlFor} {...props}>\n\t\t\t\t<span className={labelWrapper()}>{children}</span>\n\t\t\t\t{required && <RequiredIcon className={requiredMark()} />}\n\t\t\t\t{icon &&\n\t\t\t\t\t(tooltip ? (\n\t\t\t\t\t\t<IconTooltip content={tooltip} iconSize=\"sm\" icon={icon} className={iconStyles()} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Icon size=\"sm\" icon={icon} className={iconStyles()} />\n\t\t\t\t\t))}\n\t\t\t</Label>\n\t\t);\n\t}\n);\n\nFieldLabel.displayName = \"FieldLabel\";\n"],"names":["NAME","Label","React","props","forwardedRef","jsx","Primitive","event","Root","labelStyles","tv","className","ref","LabelPrimitive.Root","requiredIconStyles","RequiredIcon","fieldLabelVariants","FieldLabel","children","htmlFor","icon","tooltip","required","base","requiredMark","labelWrapper","iconStyles","jsxs","IconTooltip","Icon"],"mappings":";;;;;;;AAMA,IAAIA,IAAO,SACPC,IAAQC,EAAM,WAAW,CAACC,GAAOC,MACZ,gBAAAC;AAAA,EACrBC,EAAU;AAAA,EACV;AAAA,IACE,GAAGH;AAAA,IACH,KAAKC;AAAA,IACL,aAAa,CAACG,MAAU;AAEtB,MADeA,EAAM,OACV,QAAQ,iCAAiC,MACpDJ,EAAM,cAAcI,CAAK,GACrB,CAACA,EAAM,oBAAoBA,EAAM,SAAS,KAAGA,EAAM,eAAgB;AAAA,IAC/E;AAAA,EACA;AACG,CACF;AACDN,EAAM,cAAcD;AACpB,IAAIQ,IAAOP;ACnBX,MAAMQ,IAAcC,EAAG;AAAA,EACtB,MAAM;AACP,CAAC,GAEKT,IAAQC,EAAM,WAGlB,CAAC,EAAE,WAAAS,GAAW,GAAGR,EAAM,GAAGS,MAC3B,gBAAAP,EAACQ,GAAA,EAAoB,KAAAD,GAAU,WAAWH,EAAY,EAAE,WAAAE,GAAW,GAAI,GAAGR,GAAO,CACjF;AACDF,EAAM,cAAcY,EAAoB;ACZxC,MAAMC,IAAqBJ,EAAG;AAAA,EAC7B,MAAM;AACP,CAAC;AAMe,SAAAK,EAAa,EAAE,WAAAJ,KAAgC;AAE7D,SAAA,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWS,EAAmB,EAAE,WAAAH,GAAW;AAAA,MAC3C,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MAEL,UAAA,gBAAAN;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,GAAE;AAAA,UACF,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB;AAAA,EACD;AAEF;ACpBA,MAAMW,IAAqBN,EAAG;AAAA,EAC7B,OAAO;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,IACd,MAAM;AAAA,IACN,cAAc;AAAA,EAAA;AAEhB,CAAC,GASYO,IAAaf,EAAM;AAAA,EAC/B,CAAC,EAAE,WAAAS,GAAW,UAAAO,GAAU,SAAAC,GAAS,MAAAC,GAAM,SAAAC,GAAS,UAAAC,GAAU,GAAGnB,EAAM,GAAGS,MAAQ;AAC7E,UAAM,EAAE,MAAAW,GAAM,cAAAC,GAAc,cAAAC,GAAc,MAAMC,MAAeV,EAAmB;AAGjF,WAAA,gBAAAW,EAAC1B,GAAM,EAAA,KAAAW,GAAU,WAAWW,EAAK,EAAE,WAAAZ,EAAW,CAAA,GAAG,SAAAQ,GAAmB,GAAGhB,GACtE,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAK,EAAA,WAAWoB,EAAa,GAAI,UAAAP,EAAS,CAAA;AAAA,MAC1CI,KAAY,gBAAAjB,EAACU,GAAa,EAAA,WAAWS,EAAgB,EAAA,CAAA;AAAA,MACrDJ,MACCC,IACC,gBAAAhB,EAAAuB,GAAA,EAAY,SAASP,GAAS,UAAS,MAAK,MAAAD,GAAY,WAAWM,KAAc,sBAEjFG,GAAK,EAAA,MAAK,MAAK,MAAAT,GAAY,WAAWM,KAAc;AAAA,IAAA,GAExD;AAAA,EAAA;AAGH;AAEAT,EAAW,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"FieldLabel-BC7sPLmF.js","sources":["../node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@18.3.6_@types+react@18.3.20__@types+react@18.3.2_lpwl52zkvlr7l444adoh36rhhe/node_modules/@radix-ui/react-label/dist/index.mjs","../src/components/label/Label.tsx","../src/components/label/field-label/components/RequiredIcon.tsx","../src/components/label/field-label/FieldLabel.tsx"],"sourcesContent":["\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst labelStyles = tv({\n\tbase: \"text-sm font-medium leading-none text-primary-fg peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n});\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root ref={ref} className={labelStyles({ className })} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import { tv } from \"tailwind-variants\";\n\nconst requiredIconStyles = tv({\n\tbase: \"stroke-status-error\"\n});\n\ninterface RequiredIconProps {\n\tclassName?: string;\n}\n\nexport function RequiredIcon({ className }: RequiredIconProps) {\n\treturn (\n\t\t<svg\n\t\t\tclassName={requiredIconStyles({ className })}\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth=\"24\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M12.0001 3V21M20 7.5L4 16.5M4 7.5L20 16.5\"\n\t\t\t\tstrokeWidth=\"3\"\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","import React from \"react\";\nimport { Label } from \"../Label\";\nimport { tv } from \"tailwind-variants\";\nimport { Icon } from \"@/components/icon\";\nimport { LucideIcon } from \"lucide-react\";\nimport { IconTooltip } from \"@/components/icon-tooltip/IconTooltip\";\nimport { RequiredIcon } from \"./components/RequiredIcon\";\n\nconst fieldLabelVariants = tv({\n\tslots: {\n\t\tbase: \"flex h-4 min-w-0 items-center gap-x-0.5 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n\t\trequiredMark: \"h-2 w-2 self-start\",\n\t\ticon: \"ml-1 text-muted\",\n\t\tlabelWrapper: \"truncate\"\n\t}\n});\n\ninterface FieldLabelProps extends React.ComponentPropsWithoutRef<typeof Label> {\n\tclassName?: string;\n\trequired?: boolean;\n\ticon?: LucideIcon;\n\ttooltip?: string;\n}\n\nexport const FieldLabel = React.forwardRef<React.ElementRef<typeof Label>, FieldLabelProps>(\n\t({ className, children, htmlFor, icon, tooltip, required, ...props }, ref) => {\n\t\tconst { base, requiredMark, labelWrapper, icon: iconStyles } = fieldLabelVariants();\n\n\t\treturn (\n\t\t\t<Label ref={ref} className={base({ className })} htmlFor={htmlFor} {...props}>\n\t\t\t\t<span className={labelWrapper()}>{children}</span>\n\t\t\t\t{required && <RequiredIcon className={requiredMark()} />}\n\t\t\t\t{icon &&\n\t\t\t\t\t(tooltip ? (\n\t\t\t\t\t\t<IconTooltip content={tooltip} iconSize=\"sm\" icon={icon} iconClassName={iconStyles()} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Icon size=\"sm\" icon={icon} className={iconStyles()} />\n\t\t\t\t\t))}\n\t\t\t</Label>\n\t\t);\n\t}\n);\n\nFieldLabel.displayName = \"FieldLabel\";\n"],"names":["NAME","Label","React","props","forwardedRef","jsx","Primitive","event","Root","labelStyles","tv","className","ref","LabelPrimitive.Root","requiredIconStyles","RequiredIcon","fieldLabelVariants","FieldLabel","children","htmlFor","icon","tooltip","required","base","requiredMark","labelWrapper","iconStyles","jsxs","IconTooltip","Icon"],"mappings":";;;;;;;AAMA,IAAIA,IAAO,SACPC,IAAQC,EAAM,WAAW,CAACC,GAAOC,MACZ,gBAAAC;AAAA,EACrBC,EAAU;AAAA,EACV;AAAA,IACE,GAAGH;AAAA,IACH,KAAKC;AAAA,IACL,aAAa,CAACG,MAAU;AAEtB,MADeA,EAAM,OACV,QAAQ,iCAAiC,MACpDJ,EAAM,cAAcI,CAAK,GACrB,CAACA,EAAM,oBAAoBA,EAAM,SAAS,KAAGA,EAAM,eAAgB;AAAA,IAC/E;AAAA,EACA;AACG,CACF;AACDN,EAAM,cAAcD;AACpB,IAAIQ,IAAOP;ACnBX,MAAMQ,IAAcC,EAAG;AAAA,EACtB,MAAM;AACP,CAAC,GAEKT,IAAQC,EAAM,WAGlB,CAAC,EAAE,WAAAS,GAAW,GAAGR,EAAM,GAAGS,MAC3B,gBAAAP,EAACQ,GAAA,EAAoB,KAAAD,GAAU,WAAWH,EAAY,EAAE,WAAAE,GAAW,GAAI,GAAGR,GAAO,CACjF;AACDF,EAAM,cAAcY,EAAoB;ACZxC,MAAMC,IAAqBJ,EAAG;AAAA,EAC7B,MAAM;AACP,CAAC;AAMe,SAAAK,EAAa,EAAE,WAAAJ,KAAgC;AAE7D,SAAA,gBAAAN;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWS,EAAmB,EAAE,WAAAH,GAAW;AAAA,MAC3C,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MAEL,UAAA,gBAAAN;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,GAAE;AAAA,UACF,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IAChB;AAAA,EACD;AAEF;ACpBA,MAAMW,IAAqBN,EAAG;AAAA,EAC7B,OAAO;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,IACd,MAAM;AAAA,IACN,cAAc;AAAA,EAAA;AAEhB,CAAC,GASYO,IAAaf,EAAM;AAAA,EAC/B,CAAC,EAAE,WAAAS,GAAW,UAAAO,GAAU,SAAAC,GAAS,MAAAC,GAAM,SAAAC,GAAS,UAAAC,GAAU,GAAGnB,EAAM,GAAGS,MAAQ;AAC7E,UAAM,EAAE,MAAAW,GAAM,cAAAC,GAAc,cAAAC,GAAc,MAAMC,MAAeV,EAAmB;AAGjF,WAAA,gBAAAW,EAAC1B,GAAM,EAAA,KAAAW,GAAU,WAAWW,EAAK,EAAE,WAAAZ,EAAW,CAAA,GAAG,SAAAQ,GAAmB,GAAGhB,GACtE,UAAA;AAAA,MAAA,gBAAAE,EAAC,QAAK,EAAA,WAAWoB,EAAa,GAAI,UAAAP,EAAS,CAAA;AAAA,MAC1CI,KAAY,gBAAAjB,EAACU,GAAa,EAAA,WAAWS,EAAgB,EAAA,CAAA;AAAA,MACrDJ,MACCC,IACC,gBAAAhB,EAAAuB,GAAA,EAAY,SAASP,GAAS,UAAS,MAAK,MAAAD,GAAY,eAAeM,KAAc,sBAErFG,GAAK,EAAA,MAAK,MAAK,MAAAT,GAAY,WAAWM,KAAc;AAAA,IAAA,GAExD;AAAA,EAAA;AAGH;AAEAT,EAAW,cAAc;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
1
  import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
2
  import { B as F } from "./Button-Kf5vwkHh.js";
3
- import { a as w } from "./CheckboxField-CqWkYQ-Z.js";
3
+ import { a as w } from "./CheckboxField-BlIlieRl.js";
4
4
  import { u as T } from "./useBreakpoints-wEcfJPHd.js";
5
5
  import d from "react";
6
6
  import { T as h } from "./index-BVqs-uqP.js";
@@ -85,4 +85,4 @@ export {
85
85
  B as F,
86
86
  z as a
87
87
  };
88
- //# sourceMappingURL=FormHeaderTemplate-NfdHG33w.js.map
88
+ //# sourceMappingURL=FormHeaderTemplate-DZdIU--D.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormHeaderTemplate-NfdHG33w.js","sources":["../src/components/form/templates/footer-template/FormFooterTemplate.tsx","../src/components/form/templates/header-template/FormHeaderTemplate.tsx"],"sourcesContent":["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","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\",\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-3\",\n\t\t\t\tcontentWrapper: \"gap-0.5\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\theader: \"flex-col items-center gap-2 text-center lg:gap-3\",\n\t\t\t\tcontentWrapper: \"gap-0.5\"\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=\"lg\" 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"],"names":["formFooterTemplateStyles","tv","FormFooterTemplate","React","className","primaryButton","secondaryButton","checkboxLabel","checkboxProps","primaryButtonProps","secondaryButtonProps","ref","isMobile","useIsMobile","container","startBlock","endBlock","primaryButtonElement","jsx","Button","secondaryButtonElement","FormFooter","CheckboxField","formHeaderTemplateStyles","BaseHeaderTemplate","Icon","title","alignment","description","customIcon","props","header","contentWrapper","icon","jsxs","FormHeader","FeatureIcon","FormHeaderTemplate","FormTitle","FormDescription"],"mappings":";;;;;;;;AAOA,MAAMA,IAA2BC,EAAG;AAAA,EACnC,OAAO;AAAA,IACN,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,UAAU;AAAA,EAAA;AAEZ,CAAC,GAuBYC,IAAqBC,EAAM;AAAA,EACvC,CACC;AAAA,IACC,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,KAEDC,MACI;AACJ,UAAMC,IAAWC,EAAY,GACvB,EAAE,WAAAC,GAAW,YAAAC,GAAY,UAAAC,EAAA,IAAahB,EAAyB;AAErE,IAAIY,MACHH,IAAqB,EAAE,GAAGA,GAAoB,MAAM,KAAK,GACzDC,IAAuB,EAAE,GAAGA,GAAsB,MAAM,KAAK;AAExD,UAAAO,IAAuBZ,KAC3B,gBAAAa,EAAAC,GAAA,EAA4B,SAAQ,WAAW,GAAGV,GACjD,UAAAJ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AAW;AAG9E,WAAA,gBAAAO,EAACC,GAAW,EAAA,KAAAxB,GAAU,WAAWoB,EAAO,EAAE,OAAO3B,EAAW,CAAA,GAAI,GAAG0B,GACjE,UAAA;AAAA,MAAQL,KAAA,gBAAAP,EAACkB,GAAY,EAAA,MAAK,MAAK,MAAK,WAAU,MAAMX,GAAM,WAAWQ,EAAQ,EAAA,CAAA;AAAA,MAC7EJ,KAAcA;AAAA,MACd,gBAAAK,EAAA,OAAA,EAAI,WAAWF,EAAA,GACd,UAAA;AAAA,QAAAN;AAAA,QACAE;AAAA,MAAA,EACF,CAAA;AAAA,IAAA,GACD;AAAA,EAAA;AAGH,GAMaS,IAAqBlC,EAAM;AAAA,EACvC,CAAC,EAAE,OAAAuB,GAAO,aAAAE,GAAa,GAAGE,EAAA,GAASnB,MAEjC,gBAAAO;AAAA,IAACM;AAAA,IAAA;AAAA,MACA,OAAQ,gBAAAN,EAAAoB,GAAA,EAAW,UAAMZ,EAAA,CAAA;AAAA,MACzB,aAAc,gBAAAR,EAAAqB,GAAA,EAAiB,UAAYX,EAAA,CAAA;AAAA,MAC3C,KAAAjB;AAAA,MACC,GAAGmB;AAAA,IAAA;AAAA,EACL;AAGH;AAEAO,EAAmB,cAAc;"}
1
+ {"version":3,"file":"FormHeaderTemplate-DZdIU--D.js","sources":["../src/components/form/templates/footer-template/FormFooterTemplate.tsx","../src/components/form/templates/header-template/FormHeaderTemplate.tsx"],"sourcesContent":["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","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\",\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-3\",\n\t\t\t\tcontentWrapper: \"gap-0.5\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\theader: \"flex-col items-center gap-2 text-center lg:gap-3\",\n\t\t\t\tcontentWrapper: \"gap-0.5\"\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=\"lg\" 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"],"names":["formFooterTemplateStyles","tv","FormFooterTemplate","React","className","primaryButton","secondaryButton","checkboxLabel","checkboxProps","primaryButtonProps","secondaryButtonProps","ref","isMobile","useIsMobile","container","startBlock","endBlock","primaryButtonElement","jsx","Button","secondaryButtonElement","FormFooter","CheckboxField","formHeaderTemplateStyles","BaseHeaderTemplate","Icon","title","alignment","description","customIcon","props","header","contentWrapper","icon","jsxs","Form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B,GAAA,EAAW,UAAMZ,EAAA,CAAA;AAAA,MACzB,aAAc,gBAAAR,EAAAqB,GAAA,EAAiB,UAAYX,EAAA,CAAA;AAAA,MAC3C,KAAAjB;AAAA,MACC,GAAGmB;AAAA,IAAA;AAAA,EACL;AAGH;AAEAO,EAAmB,cAAc;"}
@@ -4,8 +4,8 @@ import * as n from "react";
4
4
  import $ from "react";
5
5
  import { S as F } from "./index-5Bhkapwi.js";
6
6
  import { T as d } from "./index-BVqs-uqP.js";
7
- import { F as M } from "./FieldLabel-CMipw7fJ.js";
8
- import { F as k } from "./Field-CBc3Z3Lg.js";
7
+ import { F as M } from "./FieldLabel-BC7sPLmF.js";
8
+ import { F as k } from "./Field-CzOWEoqg.js";
9
9
  const L = d({
10
10
  base: "rounded-md border border-secondary-border bg-secondary-bg"
11
11
  }), Q = ({
@@ -124,4 +124,4 @@ export {
124
124
  U as g,
125
125
  l as u
126
126
  };
127
- //# sourceMappingURL=FormStack-DUZ-g6g2.js.map
127
+ //# sourceMappingURL=FormStack-0Qvkszog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormStack-DUZ-g6g2.js","sources":["../src/components/form/Form.tsx","../src/components/form/components/form-field/FormField.tsx","../src/components/form/components/form-stack/FormStack.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n\tController,\n\tFormProvider,\n\tuseFormContext,\n\ttype ControllerProps,\n\ttype FieldPath,\n\ttype FieldValues\n} from \"react-hook-form\";\nimport { tv } from \"tailwind-variants\";\nimport { FieldLabel } from \"../label/field-label/FieldLabel\";\n\nconst formStyle = tv({\n\tbase: \"rounded-md border border-secondary-border bg-secondary-bg\"\n});\n\n/**\n * Основной контейнер формы\n */\nconst Form = <T extends FieldValues>({\n\tclassName,\n\tasChild,\n\t...props\n}: React.ComponentProps<typeof FormProvider<T>> & {\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/** Использовать ли дочерний элемент как корневой */\n\tasChild?: boolean;\n}) => {\n\tconst Comp = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Comp className={formStyle({ className })}>\n\t\t\t<FormProvider {...props} />\n\t\t</Comp>\n\t);\n};\n\ntype FormFieldContextValue<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n\tname: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\n/**\n * Поле формы с валидацией\n */\n\nconst FormField = <\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n\t...props\n}: ControllerProps<TFieldValues, TName>) => {\n\treturn (\n\t\t<FormFieldContext.Provider value={{ name: props.name }}>\n\t\t\t<Controller {...props} />\n\t\t</FormFieldContext.Provider>\n\t);\n};\n\nconst useFormField = () => {\n\tconst fieldContext = React.useContext(FormFieldContext);\n\tconst itemContext = React.useContext(FormItemContext);\n\tconst { getFieldState, formState } = useFormContext();\n\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\n\tif (!fieldContext) {\n\t\tthrow new Error(\"useFormField should be used within <FormField>\");\n\t}\n\n\tconst { id } = itemContext;\n\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState\n\t};\n};\n\ntype FormItemContextValue = {\n\tid: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst formItemStyle = tv({\n\tbase: \"space-y-2\"\n});\n\n/**\n * Контейнер для элементов формы\n */\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\t({ className, ...props }, ref) => {\n\t\tconst id = React.useId();\n\n\t\treturn (\n\t\t\t<FormItemContext.Provider value={{ id }}>\n\t\t\t\t<div ref={ref} className={formItemStyle({ className })} {...props} />\n\t\t\t</FormItemContext.Provider>\n\t\t);\n\t}\n);\nFormItem.displayName = \"FormItem\";\n\ninterface FormLabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {\n\t/** Обязательное ли поле */\n\trequired?: boolean;\n}\n\n/**\n * Лейбл для поля формы\n */\nconst FormLabel = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, FormLabelProps>(\n\t({ className, required, ...props }, ref) => {\n\t\tconst { formItemId } = useFormField();\n\n\t\treturn <FieldLabel required={required} ref={ref} className={className} htmlFor={formItemId} {...props} />;\n\t}\n);\nFormLabel.displayName = \"FormLabel\";\n\n/**\n * Контрол для поля формы\n */\nconst FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(\n\t({ ...props }, ref) => {\n\t\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n\t\treturn (\n\t\t\t<Slot\n\t\t\t\tref={ref}\n\t\t\t\tid={formItemId}\n\t\t\t\taria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n\t\t\t\taria-invalid={!!error}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n);\nFormControl.displayName = \"FormControl\";\n\nconst formMessageStyle = tv({\n\tbase: \"text-[0.8rem] font-medium text-destructive\"\n});\n\n/**\n * Сообщение об ошибке\n */\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\n\t({ className, children, ...props }, ref) => {\n\t\tconst { error, formMessageId } = useFormField();\n\t\tconst body = error ? String(error?.message ?? \"\") : children;\n\n\t\tif (!body) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<p ref={ref} id={formMessageId} className={formMessageStyle({ className })} {...props}>\n\t\t\t\t{body}\n\t\t\t</p>\n\t\t);\n\t}\n);\nFormMessage.displayName = \"FormMessage\";\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormMessage, FormField as FormFieldControl };\n","import * as React from \"react\";\nimport {\n\tuseFormContext,\n\ttype FieldPath,\n\ttype FieldValues,\n\ttype ControllerRenderProps,\n\ttype UseFormStateReturn,\n\ttype ControllerFieldState,\n\tPath\n} from \"react-hook-form\";\nimport { FormFieldControl, FormItem, FormControl } from \"../../Form\";\nimport { Field, FieldLayout } from \"@/components/field/Field\";\nimport { tv } from \"tailwind-variants\";\n\nconst formFieldStyles = tv({\n\tslots: {\n\t\tlabel: \"w-44\"\n\t}\n});\n\nexport type FormFieldControlRenderer<TFieldValues extends FieldValues = FieldValues> = (props: {\n\tfield: ControllerRenderProps<TFieldValues, Path<TFieldValues>>;\n\tfieldState: ControllerFieldState;\n\tformState: UseFormStateReturn<TFieldValues>;\n\treadonly?: boolean;\n}) => React.ReactNode;\n\nexport interface FormFieldProps<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> {\n\t/** Имя поля формы */\n\tname: TName;\n\t/** Заголовок поля (лейбл) */\n\ttitle: string;\n\t/** Описание поля */\n\tdescription?: string;\n\t/** Функция рендеринга контрола */\n\tcontrol: FormFieldControlRenderer<TFieldValues>;\n\t/** Является ли поле обязательным */\n\trequired?: boolean;\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/** Классы для лейбла */\n\tlabelClassName?: string;\n\t/** Поле только для чтения */\n\treadonly?: boolean;\n\t/** Вариант расположения элементов поля */\n\tlayout?: FieldLayout;\n}\n\n/**\n * Компонент FormField объединяет несколько компонентов формы в один блок\n * для упрощения создания консистентных форм.\n *\n * ### Варианты раскладки (layout):\n *\n * - **responsive** (по умолчанию): адаптивная раскладка с mobile-first подходом.\n * На мобильных устройствах - вертикальный лейаут, на десктопе (от lg breakpoint) - горизонтальный.\n *\n * - **horizontal**: принудительно горизонтальная раскладка на всех экранах.\n * Лейбл располагается слева от поля ввода.\n *\n * - **vertical**: принудительно вертикальная раскладка на всех экранах.\n * Лейбл располагается над полем ввода.\n *\n * Компонент обеспечивает согласованное расположение элементов формы,\n * включая лейбл, поле ввода, подсказку и сообщение об ошибке.\n *\n * @example\n * <FormField\n * name=\"username\"\n * title=\"Имя пользователя\"\n * description=\"Ваше публичное имя пользователя\"\n * required\n * control={({ field }) => (\n * <TextInput\n * placeholder=\"Введите имя пользователя\"\n * startIcon={<Icon icon={User} />}\n * {...field}\n * />\n * )}\n * />\n */\n\nexport function FormField<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n\tname,\n\ttitle,\n\tdescription,\n\tcontrol,\n\trequired,\n\tclassName,\n\tlabelClassName,\n\treadonly,\n\tlayout = \"responsive\"\n}: FormFieldProps<TFieldValues, TName>) {\n\tconst form = useFormContext<TFieldValues>();\n\tconst styles = formFieldStyles();\n\n\treturn (\n\t\t<FormFieldControl\n\t\t\tcontrol={form.control}\n\t\t\tname={name}\n\t\t\trender={({ field, fieldState, formState }) => {\n\t\t\t\treturn (\n\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t<Field\n\t\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\t\tdescription={description}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\terror={fieldState.error?.message}\n\t\t\t\t\t\t\tlabelClassName={styles.label({ className: labelClassName })}\n\t\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\t\treadonly={readonly}\n\t\t\t\t\t\t\tlayout={layout}\n\t\t\t\t\t\t\tcontrol={({ id, readonly }) => (\n\t\t\t\t\t\t\t\t<FormControl id={id}>{control({ field, fieldState, formState, readonly })}</FormControl>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FormItem>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst formStackStyles = tv({\n\tbase: \"space-y-5 lg:space-y-4\"\n});\n\n/** Оболочка для группы полей формы с внутренними отступами */\nexport const FormStack = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\t({ className, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div ref={ref} className={formStackStyles({ className })} {...props}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nFormStack.displayName = \"FormStack\";\n"],"names":["formStyle","tv","Form","className","asChild","props","jsx","Slot","FormProvider","FormFieldContext","React","FormField","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","formItemStyle","FormItem","ref","FormLabel","required","formItemId","FieldLabel","FormControl","error","formDescriptionId","formMessageId","formMessageStyle","FormMessage","children","body","formFieldStyles","name","title","description","control","labelClassName","readonly","layout","form","styles","FormFieldControl","field","Field","formStackStyles","FormStack"],"mappings":";;;;;;;;AAcA,MAAMA,IAAYC,EAAG;AAAA,EACpB,MAAM;AACP,CAAC,GAKKC,IAAO,CAAwB;AAAA,EACpC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACJ,MAQG,gBAAAC,EAFWF,IAAUG,IAAO,OAE5B,EAAK,WAAWP,EAAU,EAAE,WAAAG,EAAA,CAAW,GACvC,UAAC,gBAAAG,EAAAE,GAAA,EAAc,GAAGH,EAAA,CAAO,EAC1B,CAAA,GAWII,IAAmBC,EAAM,cAAqC,EAA2B,GAMzFC,IAAY,CAGhB;AAAA,EACD,GAAGN;AACJ,MAEG,gBAAAC,EAAAG,EAAiB,UAAjB,EAA0B,OAAO,EAAE,MAAMJ,EAAM,KAAA,GAC/C,UAAA,gBAAAC,EAACM,GAAY,EAAA,GAAGP,EAAO,CAAA,GACxB,GAIIQ,IAAe,MAAM;AACpB,QAAAC,IAAeJ,EAAM,WAAWD,CAAgB,GAChDM,IAAcL,EAAM,WAAWM,CAAe,GAC9C,EAAE,eAAAC,GAAe,WAAAC,EAAU,IAAIC,EAAe,GAE9CC,IAAaH,EA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AC2C;AAAA,QAAA;AAAA,UACA,OAAAV;AAAA,UACA,aAAAC;AAAA,UACA,UAAAd;AAAA,UACA,OAAON,EAAW,OAAO;AAAA,UACzB,gBAAgB0B,EAAO,MAAM,EAAE,WAAWJ,GAAgB;AAAA,UAC1D,WAAAvC;AAAA,UACA,UAAAwC;AAAA,UACA,QAAAC;AAAA,UACA,SAAS,CAAC,EAAE,IAAAvB,GAAI,UAAAsB,QACd,gBAAArC,EAAAuB,GAAA,EAAY,IAAAR,GAAS,UAAAoB,EAAQ,EAAE,OAAAO,GAAO,YAAA5B,GAAY,WAAAF,GAAW,UAAAyB,EAAAA,CAAU,EAAE,CAAA;AAAA,QAAA;AAAA,MAAA,GAG7E;AAAA,IAEF;AAAA,EACD;AAEF;AC5HA,MAAMO,IAAkBjD,EAAG;AAAA,EAC1B,MAAM;AACP,CAAC,GAGYkD,IAAYzC,EAAM;AAAA,EAC9B,CAAC,EAAE,WAAAP,GAAW,UAAAgC,GAAU,GAAG9B,EAAA,GAASmB,MAElC,gBAAAlB,EAAC,OAAI,EAAA,KAAAkB,GAAU,WAAW0B,EAAgB,EAAE,WAAA/C,GAAW,GAAI,GAAGE,GAC5D,UAAA8B,EACF,CAAA;AAGH;AAEAgB,EAAU,cAAc;"}
1
+ {"version":3,"file":"FormStack-0Qvkszog.js","sources":["../src/components/form/Form.tsx","../src/components/form/components/form-field/FormField.tsx","../src/components/form/components/form-stack/FormStack.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n\tController,\n\tFormProvider,\n\tuseFormContext,\n\ttype ControllerProps,\n\ttype FieldPath,\n\ttype FieldValues\n} from \"react-hook-form\";\nimport { tv } from \"tailwind-variants\";\nimport { FieldLabel } from \"../label/field-label/FieldLabel\";\n\nconst formStyle = tv({\n\tbase: \"rounded-md border border-secondary-border bg-secondary-bg\"\n});\n\n/**\n * Основной контейнер формы\n */\nconst Form = <T extends FieldValues>({\n\tclassName,\n\tasChild,\n\t...props\n}: React.ComponentProps<typeof FormProvider<T>> & {\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/** Использовать ли дочерний элемент как корневой */\n\tasChild?: boolean;\n}) => {\n\tconst Comp = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Comp className={formStyle({ className })}>\n\t\t\t<FormProvider {...props} />\n\t\t</Comp>\n\t);\n};\n\ntype FormFieldContextValue<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n\tname: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\n/**\n * Поле формы с валидацией\n */\n\nconst FormField = <\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n\t...props\n}: ControllerProps<TFieldValues, TName>) => {\n\treturn (\n\t\t<FormFieldContext.Provider value={{ name: props.name }}>\n\t\t\t<Controller {...props} />\n\t\t</FormFieldContext.Provider>\n\t);\n};\n\nconst useFormField = () => {\n\tconst fieldContext = React.useContext(FormFieldContext);\n\tconst itemContext = React.useContext(FormItemContext);\n\tconst { getFieldState, formState } = useFormContext();\n\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\n\tif (!fieldContext) {\n\t\tthrow new Error(\"useFormField should be used within <FormField>\");\n\t}\n\n\tconst { id } = itemContext;\n\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState\n\t};\n};\n\ntype FormItemContextValue = {\n\tid: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst formItemStyle = tv({\n\tbase: \"space-y-2\"\n});\n\n/**\n * Контейнер для элементов формы\n */\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\t({ className, ...props }, ref) => {\n\t\tconst id = React.useId();\n\n\t\treturn (\n\t\t\t<FormItemContext.Provider value={{ id }}>\n\t\t\t\t<div ref={ref} className={formItemStyle({ className })} {...props} />\n\t\t\t</FormItemContext.Provider>\n\t\t);\n\t}\n);\nFormItem.displayName = \"FormItem\";\n\ninterface FormLabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {\n\t/** Обязательное ли поле */\n\trequired?: boolean;\n}\n\n/**\n * Лейбл для поля формы\n */\nconst FormLabel = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, FormLabelProps>(\n\t({ className, required, ...props }, ref) => {\n\t\tconst { formItemId } = useFormField();\n\n\t\treturn <FieldLabel required={required} ref={ref} className={className} htmlFor={formItemId} {...props} />;\n\t}\n);\nFormLabel.displayName = \"FormLabel\";\n\n/**\n * Контрол для поля формы\n */\nconst FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(\n\t({ ...props }, ref) => {\n\t\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n\t\treturn (\n\t\t\t<Slot\n\t\t\t\tref={ref}\n\t\t\t\tid={formItemId}\n\t\t\t\taria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n\t\t\t\taria-invalid={!!error}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t}\n);\nFormControl.displayName = \"FormControl\";\n\nconst formMessageStyle = tv({\n\tbase: \"text-[0.8rem] font-medium text-destructive\"\n});\n\n/**\n * Сообщение об ошибке\n */\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\n\t({ className, children, ...props }, ref) => {\n\t\tconst { error, formMessageId } = useFormField();\n\t\tconst body = error ? String(error?.message ?? \"\") : children;\n\n\t\tif (!body) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<p ref={ref} id={formMessageId} className={formMessageStyle({ className })} {...props}>\n\t\t\t\t{body}\n\t\t\t</p>\n\t\t);\n\t}\n);\nFormMessage.displayName = \"FormMessage\";\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormMessage, FormField as FormFieldControl };\n","import * as React from \"react\";\nimport {\n\tuseFormContext,\n\ttype FieldPath,\n\ttype FieldValues,\n\ttype ControllerRenderProps,\n\ttype UseFormStateReturn,\n\ttype ControllerFieldState,\n\tPath\n} from \"react-hook-form\";\nimport { FormFieldControl, FormItem, FormControl } from \"../../Form\";\nimport { Field, FieldLayout } from \"@/components/field/Field\";\nimport { tv } from \"tailwind-variants\";\n\nconst formFieldStyles = tv({\n\tslots: {\n\t\tlabel: \"w-44\"\n\t}\n});\n\nexport type FormFieldControlRenderer<TFieldValues extends FieldValues = FieldValues> = (props: {\n\tfield: ControllerRenderProps<TFieldValues, Path<TFieldValues>>;\n\tfieldState: ControllerFieldState;\n\tformState: UseFormStateReturn<TFieldValues>;\n\treadonly?: boolean;\n}) => React.ReactNode;\n\nexport interface FormFieldProps<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> {\n\t/** Имя поля формы */\n\tname: TName;\n\t/** Заголовок поля (лейбл) */\n\ttitle: string;\n\t/** Описание поля */\n\tdescription?: string;\n\t/** Функция рендеринга контрола */\n\tcontrol: FormFieldControlRenderer<TFieldValues>;\n\t/** Является ли поле обязательным */\n\trequired?: boolean;\n\t/** Дополнительные классы */\n\tclassName?: string;\n\t/** Классы для лейбла */\n\tlabelClassName?: string;\n\t/** Поле только для чтения */\n\treadonly?: boolean;\n\t/** Вариант расположения элементов поля */\n\tlayout?: FieldLayout;\n}\n\n/**\n * Компонент FormField объединяет несколько компонентов формы в один блок\n * для упрощения создания консистентных форм.\n *\n * ### Варианты раскладки (layout):\n *\n * - **responsive** (по умолчанию): адаптивная раскладка с mobile-first подходом.\n * На мобильных устройствах - вертикальный лейаут, на десктопе (от lg breakpoint) - горизонтальный.\n *\n * - **horizontal**: принудительно горизонтальная раскладка на всех экранах.\n * Лейбл располагается слева от поля ввода.\n *\n * - **vertical**: принудительно вертикальная раскладка на всех экранах.\n * Лейбл располагается над полем ввода.\n *\n * Компонент обеспечивает согласованное расположение элементов формы,\n * включая лейбл, поле ввода, подсказку и сообщение об ошибке.\n *\n * @example\n * <FormField\n * name=\"username\"\n * title=\"Имя пользователя\"\n * description=\"Ваше публичное имя пользователя\"\n * required\n * control={({ field }) => (\n * <TextInput\n * placeholder=\"Введите имя пользователя\"\n * startIcon={<Icon icon={User} />}\n * {...field}\n * />\n * )}\n * />\n */\n\nexport function FormField<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n\tname,\n\ttitle,\n\tdescription,\n\tcontrol,\n\trequired,\n\tclassName,\n\tlabelClassName,\n\treadonly,\n\tlayout = \"responsive\"\n}: FormFieldProps<TFieldValues, TName>) {\n\tconst form = useFormContext<TFieldValues>();\n\tconst styles = formFieldStyles();\n\n\treturn (\n\t\t<FormFieldControl\n\t\t\tcontrol={form.control}\n\t\t\tname={name}\n\t\t\trender={({ field, fieldState, formState }) => {\n\t\t\t\treturn (\n\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t<Field\n\t\t\t\t\t\t\ttitle={title}\n\t\t\t\t\t\t\tdescription={description}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\terror={fieldState.error?.message}\n\t\t\t\t\t\t\tlabelClassName={styles.label({ className: labelClassName })}\n\t\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\t\treadonly={readonly}\n\t\t\t\t\t\t\tlayout={layout}\n\t\t\t\t\t\t\tcontrol={({ id, readonly }) => (\n\t\t\t\t\t\t\t\t<FormControl id={id}>{control({ field, fieldState, formState, readonly })}</FormControl>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FormItem>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n","import React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst formStackStyles = tv({\n\tbase: \"space-y-5 lg:space-y-4\"\n});\n\n/** Оболочка для группы полей формы с внутренними отступами */\nexport const FormStack = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n\t({ className, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div ref={ref} className={formStackStyles({ className })} {...props}>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nFormStack.displayName = \"FormStack\";\n"],"names":["formStyle","tv","Form","className","asChild","props","jsx","Slot","FormProvider","FormFieldContext","React","FormField","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","formItemStyle","FormItem","ref","FormLabel","required","formItemId","FieldLabel","FormControl","error","formDescriptionId","formMessageId","formMessageStyle","FormMessage","children","body","formFieldStyles","name","title","description","control","labelClassName","readonly","layout","form","styles","FormFieldControl","field","Field","formStackStyles","FormStack"],"mappings":";;;;;;;;AAcA,MAAMA,IAAYC,EAAG;AAAA,EACpB,MAAM;AACP,CAAC,GAKKC,IAAO,CAAwB;AAAA,EACpC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACJ,MAQG,gBAAAC,EAFWF,IAAUG,IAAO,OAE5B,EAAK,WAAWP,EAAU,EAAE,WAAAG,EAAA,CAAW,GACvC,UAAC,gBAAAG,EAAAE,GAAA,EAAc,GAAGH,EAAA,CAAO,EAC1B,CAAA,GAWII,IAAmBC,EAAM,cAAqC,EAA2B,GAMzFC,IAAY,CAGhB;AAAA,EACD,GAAGN;AACJ,MAEG,gBAAAC,EAAAG,EAAiB,UAAjB,EAA0B,OAAO,EAAE,MAAMJ,EAAM,KAAA,GAC/C,UAAA,gBAAAC,EAACM,GAAY,EAAA,GAAGP,EAAO,CAAA,GACxB,GAIIQ,IAAe,MAAM;AACpB,QAAAC,IAAeJ,EAAM,WAAW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AAP;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAU,GAAO,YAAA5B,GAAY,WAAAF,0BAE3BK,GACA,EAAA,UAAA,gBAAAjB;AAAA,QAAC2C;AAAA,QAAA;AAAA,UACA,OAAAV;AAAA,UACA,aAAAC;AAAA,UACA,UAAAd;AAAA,UACA,OAAON,EAAW,OAAO;AAAA,UACzB,gBAAgB0B,EAAO,MAAM,EAAE,WAAWJ,GAAgB;AAAA,UAC1D,WAAAvC;AAAA,UACA,UAAAwC;AAAA,UACA,QAAAC;AAAA,UACA,SAAS,CAAC,EAAE,IAAAvB,GAAI,UAAAsB,QACd,gBAAArC,EAAAuB,GAAA,EAAY,IAAAR,GAAS,UAAAoB,EAAQ,EAAE,OAAAO,GAAO,YAAA5B,GAAY,WAAAF,GAAW,UAAAyB,EAAAA,CAAU,EAAE,CAAA;AAAA,QAAA;AAAA,MAAA,GAG7E;AAAA,IAEF;AAAA,EACD;AAEF;AC5HA,MAAMO,IAAkBjD,EAAG;AAAA,EAC1B,MAAM;AACP,CAAC,GAGYkD,IAAYzC,EAAM;AAAA,EAC9B,CAAC,EAAE,WAAAP,GAAW,UAAAgC,GAAU,GAAG9B,EAAA,GAASmB,MAElC,gBAAAlB,EAAC,OAAI,EAAA,KAAAkB,GAAU,WAAW0B,EAAgB,EAAE,WAAA/C,GAAW,GAAI,GAAGE,GAC5D,UAAA8B,EACF,CAAA;AAGH;AAEAgB,EAAU,cAAc;"}
@@ -0,0 +1,11 @@
1
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
+ import { I as l } from "./Icon-DH3ev9GK.js";
3
+ import { a as c, T as n, b as m, c as p } from "./Tooltip-B9IDsNwu.js";
4
+ const I = ({ content: r, icon: s, iconClassName: i, iconSize: t = "sm", contentClassName: e }) => /* @__PURE__ */ o(c, { children: /* @__PURE__ */ a(n, { children: [
5
+ /* @__PURE__ */ o(m, { asChild: !0, children: /* @__PURE__ */ o(l, { size: t, className: i, icon: s }) }),
6
+ /* @__PURE__ */ o(p, { className: e, children: r })
7
+ ] }) });
8
+ export {
9
+ I
10
+ };
11
+ //# sourceMappingURL=IconTooltip-CXt3w1Dy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconTooltip-CXt3w1Dy.js","sources":["../src/components/icon-tooltip/IconTooltip.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Icon } from \"@/components/icon/Icon\";\nimport { LucideIcon } from \"lucide-react\";\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from \"../tooltip/Tooltip\";\n\nexport interface IconTooltipProps {\n\tcontent: React.ReactNode;\n\ticon: LucideIcon;\n\ticonSize?: \"sm\" | \"md\" | \"lg\";\n\ticonClassName?: string;\n\tcontentClassName?: string;\n}\n\nexport const IconTooltip = ({ content, icon, iconClassName, iconSize = \"sm\", contentClassName }: IconTooltipProps) => {\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t<Icon size={iconSize} className={iconClassName} icon={icon} />\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent className={contentClassName}>{content}</TooltipContent>\n\t\t\t</Tooltip>\n\t\t</TooltipProvider>\n\t);\n};\n"],"names":["IconTooltip","content","icon","iconClassName","iconSize","contentClassName","jsx","TooltipProvider","jsxs","Tooltip","TooltipTrigger","Icon","TooltipContent"],"mappings":";;;AAaa,MAAAA,IAAc,CAAC,EAAE,SAAAC,GAAS,MAAAC,GAAM,eAAAC,GAAe,UAAAC,IAAW,MAAM,kBAAAC,QAE3E,gBAAAC,EAACC,GACA,EAAA,UAAA,gBAAAC,EAACC,GACA,EAAA,UAAA;AAAA,EAAC,gBAAAH,EAAAI,GAAA,EAAe,SAAO,IACtB,UAAC,gBAAAJ,EAAAK,GAAA,EAAK,MAAMP,GAAU,WAAWD,GAAe,MAAAD,EAAA,CAAY,EAC7D,CAAA;AAAA,EACC,gBAAAI,EAAAM,GAAA,EAAe,WAAWP,GAAmB,UAAQJ,EAAA,CAAA;AAAA,EAAA,CACvD,EACD,CAAA;"}
@@ -6,7 +6,7 @@ import { c as G } from "./index-DFZozV_h.js";
6
6
  import { P as H, D as K } from "./index-Bwf2hSw6.js";
7
7
  import { h as W, R as j, u as U, F as V } from "./index-BdXokVmb.js";
8
8
  import { u as Z } from "./index-xqkGMOJ8.js";
9
- import { c as _, R as q, A as x, C as J, a as Q } from "./index-CYdkaWkn.js";
9
+ import { c as _, R as q, A as x, C as J, a as Q } from "./index-C3surxzg.js";
10
10
  import { P as w } from "./index-BGfrl8IX.js";
11
11
  import { P as b } from "./index-CpDnqHCm.js";
12
12
  import { T as X } from "./index-BVqs-uqP.js";
@@ -255,4 +255,4 @@ export {
255
255
  Io as c,
256
256
  Co as d
257
257
  };
258
- //# sourceMappingURL=Popover-YwPKBpCX.js.map
258
+ //# sourceMappingURL=Popover-Upajp2nF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover-YwPKBpCX.js","sources":["../node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@18.3.6_@types+react@18.3.20__@types+react@18._yzidqq64zv67maddrn5ycxmur4/node_modules/@radix-ui/react-popover/dist/index.mjs","../src/components/popover/Popover.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { tv } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\nimport { usePortalContainer } from \"../portal-container\";\nimport { TriggerButton } from \"../button\";\nimport { TriggerButtonProps } from \"../button/trigger-button/TriggerButton\";\n\nconst popoverStyles = tv({\n\tbase: \"z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\n});\n\ntype PopoverContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n\t/**\n\t * Контейнер для портала. Если не указан, используется хук usePortalContainer\n\t * для поиска PortalContainer\n\t */\n\tportalContainer?: HTMLElement;\n};\n\n/**\n * Корневой компонент Popover, который оборачивает всю функциональность всплывающего окна.\n * Построен на основе Radix UI Popover primitive.\n */\nconst Popover = PopoverPrimitive.Root;\n\n/**\n * Элемент-триггер, который открывает всплывающее окно при клике.\n */\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/**\n * Элемент-якорь, относительно которого позиционируется всплывающее окно.\n */\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\n/**\n * Компонент содержимого всплывающего окна.\n */\nconst PopoverContent = React.forwardRef<React.ElementRef<typeof PopoverPrimitive.Content>, PopoverContentProps>(\n\t({ className, align = \"center\", sideOffset = 4, portalContainer, ...props }, ref) => {\n\t\tconst container = usePortalContainer(portalContainer);\n\t\treturn (\n\t\t\t<PopoverPrimitive.Portal container={container}>\n\t\t\t\t<PopoverPrimitive.Content\n\t\t\t\t\t// Фикс скроллинга внутри Popover когда он находится в Dialog\n\t\t\t\t\t// RemoveScroll в Dialog блокирует прокрутку body, но может блокировать и вложенные элементы\n\t\t\t\t\t// stopPropagation предотвращает всплытие событий скроллинга к заблокированному body\n\t\t\t\t\t// https://github.com/radix-ui/primitives/issues/1159\n\t\t\t\t\tonWheel={(e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}}\n\t\t\t\t\tonTouchMove={(e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}}\n\t\t\t\t\tref={ref}\n\t\t\t\t\talign={align}\n\t\t\t\t\tsideOffset={sideOffset}\n\t\t\t\t\tclassName={cn(popoverStyles(), className)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</PopoverPrimitive.Portal>\n\t\t);\n\t}\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/**\n * Компонент-обертка для использования TriggerButton в качестве триггера поповера\n */\nconst PopoverTriggerButton = React.forwardRef<\n\tReact.ElementRef<typeof PopoverTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof PopoverTrigger> & Omit<TriggerButtonProps, \"dataState\">\n>(({ children, ...props }, ref) => {\n\treturn (\n\t\t<PopoverTrigger asChild ref={ref}>\n\t\t\t<TriggerButton {...props}>{children}</TriggerButton>\n\t\t</PopoverTrigger>\n\t);\n});\n\nPopoverTriggerButton.displayName = \"PopoverTriggerButton\";\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverTriggerButton };\n"],"names":["POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","jsx","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Anchor2","Trigger","Portal","Content2","popoverStyles","tv","PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Anchor","className","align","sideOffset","portalContainer","ref","usePortalContainer","PopoverPrimitive.Portal","PopoverPrimitive.Content","e","cn","PopoverTriggerButton","TriggerButton"],"mappings":";;;;;;;;;;;;;;;AAqBA,IAAIA,IAAe,WACf,CAACC,GAAsBC,EAAkB,IAAIC,EAAmBH,GAAc;AAAA,EAChFI;AACF,CAAC,GACGC,IAAiBD,EAAmB,GACpC,CAACE,IAAiBC,CAAiB,IAAIN,EAAqBD,CAAY,GACxEQ,IAAU,CAACC,MAAU;AACvB,QAAM;AAAA,IACJ,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMN,GACEO,IAAcX,EAAeK,CAAc,GAC3CO,IAAaC,EAAM,OAAO,IAAI,GAC9B,CAACC,GAAiBC,CAAkB,IAAIF,EAAM,SAAS,EAAK,GAC5D,CAACG,GAAMC,CAAO,IAAIC,EAAqB;AAAA,IAC3C,MAAMX;AAAA,IACN,aAAaC,KAAe;AAAA,IAC5B,UAAUC;AAAA,IACV,QAAQd;AAAA,EACZ,CAAG;AACD,SAAuB,gBAAAwB,EAAIC,GAAsB,EAAE,GAAGT,GAAa,UAA0B,gBAAAQ;AAAA,IAC3FlB;AAAA,IACA;AAAA,MACE,OAAOI;AAAA,MACP,WAAWgB,EAAO;AA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EAAM,WAGjC,CAAC,EAAE,UAAAP,GAAU,GAAGF,EAAM,GAAGmG,MAEzB,gBAAApF,EAACa,IAAe,EAAA,SAAO,IAAC,KAAAuE,GACvB,4BAACO,IAAe,EAAA,GAAG1G,GAAQ,UAAAE,EAAA,CAAS,EACrC,CAAA,CAED;AAEDuG,GAAqB,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Popover-Upajp2nF.js","sources":["../node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@18.3.6_@types+react@18.3.20__@types+react@18._yzidqq64zv67maddrn5ycxmur4/node_modules/@radix-ui/react-popover/dist/index.mjs","../src/components/popover/Popover.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { tv } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\nimport { usePortalContainer } from \"../portal-container\";\nimport { TriggerButton } from \"../button\";\nimport { TriggerButtonProps } from \"../button/trigger-button/TriggerButton\";\n\nconst popoverStyles = tv({\n\tbase: \"z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\"\n});\n\ntype PopoverContentProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n\t/**\n\t * Контейнер для портала. Если не указан, используется хук usePortalContainer\n\t * для поиска PortalContainer\n\t */\n\tportalContainer?: HTMLElement;\n};\n\n/**\n * Корневой компонент Popover, который оборачивает всю функциональность всплывающего окна.\n * Построен на основе Radix UI Popover primitive.\n */\nconst Popover = PopoverPrimitive.Root;\n\n/**\n * Элемент-триггер, который открывает всплывающее окно при клике.\n */\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/**\n * Элемент-якорь, относительно которого позиционируется всплывающее окно.\n */\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\n/**\n * Компонент содержимого всплывающего окна.\n */\nconst PopoverContent = React.forwardRef<React.ElementRef<typeof PopoverPrimitive.Content>, PopoverContentProps>(\n\t({ className, align = \"center\", sideOffset = 4, portalContainer, ...props }, ref) => {\n\t\tconst container = usePortalContainer(portalContainer);\n\t\treturn (\n\t\t\t<PopoverPrimitive.Portal container={container}>\n\t\t\t\t<PopoverPrimitive.Content\n\t\t\t\t\t// Фикс скроллинга внутри Popover когда он находится в Dialog\n\t\t\t\t\t// RemoveScroll в Dialog блокирует прокрутку body, но может блокировать и вложенные элементы\n\t\t\t\t\t// stopPropagation предотвращает всплытие событий скроллинга к заблокированному body\n\t\t\t\t\t// https://github.com/radix-ui/primitives/issues/1159\n\t\t\t\t\tonWheel={(e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}}\n\t\t\t\t\tonTouchMove={(e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}}\n\t\t\t\t\tref={ref}\n\t\t\t\t\talign={align}\n\t\t\t\t\tsideOffset={sideOffset}\n\t\t\t\t\tclassName={cn(popoverStyles(), className)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</PopoverPrimitive.Portal>\n\t\t);\n\t}\n);\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/**\n * Компонент-обертка для использования TriggerButton в качестве триггера поповера\n */\nconst PopoverTriggerButton = React.forwardRef<\n\tReact.ElementRef<typeof PopoverTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof PopoverTrigger> & Omit<TriggerButtonProps, \"dataState\">\n>(({ children, ...props }, ref) => {\n\treturn (\n\t\t<PopoverTrigger asChild ref={ref}>\n\t\t\t<TriggerButton {...props}>{children}</TriggerButton>\n\t\t</PopoverTrigger>\n\t);\n});\n\nPopoverTriggerButton.displayName = \"PopoverTriggerButton\";\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverTriggerButton };\n"],"names":["POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","jsx","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","forwardedRef","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Anchor2","Trigger","Portal","Content2","popoverStyles","tv","PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Anchor","className","align","sideOffset","portalContainer","ref","usePortalContainer","PopoverPrimitive.Portal","PopoverPrimitive.Content","e","cn","PopoverTriggerButton","TriggerButton"],"mappings":";;;;;;;;;;;;;;;AAqBA,IAAIA,IAAe,WACf,CAACC,GAAsBC,EAAkB,IAAIC,EAAmBH,GAAc;AAAA,EAChFI;AACF,CAAC,GACGC,IAAiBD,EAAmB,GACpC,CAACE,IAAiBC,CAAiB,IAAIN,EAAqBD,CAAY,GACxEQ,IAAU,CAACC,MAAU;AACvB,QAAM;AAAA,IACJ,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAMC;AAAA,IACN,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,EACZ,IAAMN,GACEO,IAAcX,EAAeK,CAAc,GAC3CO,IAAaC,EAAM,OAAO,IAAI,GAC9B,CAACC,GAAiBC,CAAkB,IAAIF,EAAM,SAAS,EAAK,GAC5D,CAACG,GAAMC,CAAO,IAAIC,EAAqB;AAAA,IAC3C,MAAMX;AAAA,IACN,aAAaC,KAAe;AAAA,IAC5B,UAAUC;AAAA,IACV,QAAQd;AAAA,EACZ,CAAG;AACD,SAAuB,gBAAAwB,EAAIC,GAAsB,EAAE,GAAGT,GAAa,UAA0B,gBAAAQ;AAAA,IAC3FlB;AAAA,IACA;AAAA,MACE,OAAOI;AAAA,MACP,WAAWgB,EAAO;AAAA,MAClB,YAAAT;AAAA,MACA,MAAAI;AAAA,MACA,cAAcC;AAAA,MACd,cAAcJ,EAAM,YAAY,MAAMI,EAAQ,CAACK,MAAa,CAACA,CAAQ,GAAG,CAACL,CAAO,CAAC;AAAA,MACjF,iBAAAH;AAAA,MACA,mBAAmBD,EAAM,YAAY,MAAME,EAAmB,EAAI,GAAG,EAAE;AAAA,MACvE,sBAAsBF,EAAM,YAAY,MAAME,EAAmB,EAAK,GAAG,EAAE;AAAA,MAC3E,OAAAL;AAAA,MACA,UAAAJ;AAA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S/C,EAAStB,GAAM;AACtB,SAAOA,IAAO,SAAS;AACzB;AACA,IAAIyE,KAAQtF,GACRuF,KAAUlE,GACVmE,KAAU3D,GACV4D,KAASjD,GACTkD,IAAW5C;ACnSf,MAAM6C,KAAgBC,EAAG;AAAA,EACxB,MAAM;AACP,CAAC,GAcK5F,KAAU6F,IAKVhE,KAAiBiE,IAKjBzE,KAAgB0E,IAKhBjD,KAAiBpC,EAAM;AAAA,EAC5B,CAAC,EAAE,WAAAsF,GAAW,OAAAC,IAAQ,UAAU,YAAAC,IAAa,GAAG,iBAAAC,GAAiB,GAAGlG,EAAM,GAAGmG,MAAQ;AAC9E,UAAA1D,IAAY2D,GAAmBF,CAAe;AACpD,WACE,gBAAAnF,EAAAsF,IAAA,EAAwB,WAAA5D,GACxB,UAAA,gBAAA1B;AAAA,MAACuF;AAAAA,MAAA;AAAA,QAKA,SAAS,CAACC,MAAM;AACf,UAAAA,EAAE,gBAAgB;AAAA,QACnB;AAAA,QACA,aAAa,CAACA,MAAM;AACnB,UAAAA,EAAE,gBAAgB;AAAA,QACnB;AAAA,QACA,KAAAJ;AAAA,QACA,OAAAH;AAAA,QACA,YAAAC;AAAA,QACA,WAAWO,EAAGd,GAAc,GAAGK,CAAS;AAAA,QACvC,GAAG/F;AAAA,MAAA;AAAA,IAAA,GAEN;AAAA,EAAA;AAGH;AACA6C,GAAe,cAAcyD,EAAyB;AAKhD,MAAAG,KAAuBhG,EAAM,WAGjC,CAAC,EAAE,UAAAP,GAAU,GAAGF,EAAM,GAAGmG,MAEzB,gBAAApF,EAACa,IAAe,EAAA,SAAO,IAAC,KAAAuE,GACvB,4BAACO,IAAe,EAAA,GAAG1G,GAAQ,UAAAE,EAAA,CAAS,EACrC,CAAA,CAED;AAEDuG,GAAqB,cAAc;","x_google_ignoreList":[0]}
@@ -9,7 +9,7 @@ import { c as bt } from "./index-DFZozV_h.js";
9
9
  import { P as Ct, D as It } from "./index-Bwf2hSw6.js";
10
10
  import { h as Tt, u as Nt, R as Pt, F as Rt } from "./index-BdXokVmb.js";
11
11
  import { u as Te } from "./index-xqkGMOJ8.js";
12
- import { c as De, R as Et, A as _t, C as Mt, a as At } from "./index-CYdkaWkn.js";
12
+ import { c as De, R as Et, A as _t, C as Mt, a as At } from "./index-C3surxzg.js";
13
13
  import { P as M } from "./index-CpDnqHCm.js";
14
14
  import { u as Dt } from "./index-0ioNhtNM.js";
15
15
  import { u as j } from "./index-CCKe-Mpx.js";
@@ -964,4 +964,4 @@ export {
964
964
  Eo as l,
965
965
  ho as s
966
966
  };
967
- //# sourceMappingURL=Select-DTHY73Qf.js.map
967
+ //# sourceMappingURL=Select-DAc-Bz2N.js.map