@zelelo/iskra-ui 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -28,14 +28,17 @@ __export(index_exports, {
28
28
  Badge: () => Badge,
29
29
  Button: () => Button,
30
30
  Checkbox: () => Checkbox,
31
+ Divider: () => Divider,
31
32
  Input: () => Input,
32
33
  Modal: () => Modal,
34
+ ProgressBar: () => ProgressBar,
33
35
  Radio: () => Radio,
34
36
  RadioGroup: () => RadioGroup,
35
37
  Skeleton: () => Skeleton,
36
38
  Spinner: () => Spinner,
37
39
  Switch: () => Switch,
38
40
  Tabs: () => Tabs,
41
+ Textarea: () => Textarea,
39
42
  Toast: () => Toast,
40
43
  ToastProvider: () => ToastProvider,
41
44
  Tooltip: () => Tooltip,
@@ -434,29 +437,123 @@ var Checkbox = (0, import_react8.forwardRef)(
434
437
  );
435
438
  Checkbox.displayName = "Checkbox";
436
439
 
437
- // src/components/Input/Input.tsx
440
+ // src/components/Divider/Divider.tsx
438
441
  var import_react9 = require("react");
439
442
 
443
+ // src/components/Divider/Divider.module.css
444
+ var Divider_default = {
445
+ divider: "Divider_divider",
446
+ horizontal: "Divider_horizontal",
447
+ vertical: "Divider_vertical",
448
+ withLabel: "Divider_withLabel",
449
+ label: "Divider_label",
450
+ start: "Divider_start",
451
+ end: "Divider_end"
452
+ };
453
+
454
+ // src/components/Divider/Divider.tsx
455
+ var import_jsx_runtime11 = require("react/jsx-runtime");
456
+ var Divider = ({
457
+ orientation = "horizontal",
458
+ decorative = false,
459
+ thickness,
460
+ labelPosition = "center",
461
+ className,
462
+ style,
463
+ children,
464
+ ...props
465
+ }) => {
466
+ const hasLabel = Boolean(children) && orientation === "horizontal";
467
+ const classes = cx(
468
+ Divider_default.divider,
469
+ Divider_default[orientation],
470
+ hasLabel && Divider_default.withLabel,
471
+ hasLabel && Divider_default[labelPosition],
472
+ className
473
+ );
474
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
475
+ "div",
476
+ {
477
+ className: classes,
478
+ style: { ...style, "--divider-thickness": toCss(thickness) },
479
+ role: hasLabel ? void 0 : decorative ? "none" : "separator",
480
+ "aria-orientation": !decorative && orientation === "vertical" ? "vertical" : void 0,
481
+ ...props,
482
+ children: hasLabel && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: Divider_default.label, children })
483
+ }
484
+ );
485
+ };
486
+ Divider.displayName = "Divider";
487
+
488
+ // src/components/Input/Input.tsx
489
+ var import_react11 = require("react");
490
+
491
+ // src/components/FormField/FormField.tsx
492
+ var import_react10 = require("react");
493
+
494
+ // src/components/FormField/FormField.module.css
495
+ var FormField_default = {
496
+ sm: "FormField_sm",
497
+ md: "FormField_md",
498
+ lg: "FormField_lg",
499
+ root: "FormField_root",
500
+ label: "FormField_label",
501
+ required: "FormField_required",
502
+ box: "FormField_box",
503
+ disabled: "FormField_disabled",
504
+ invalid: "FormField_invalid",
505
+ message: "FormField_message",
506
+ error: "FormField_error"
507
+ };
508
+
509
+ // src/components/FormField/FormField.tsx
510
+ var import_jsx_runtime12 = require("react/jsx-runtime");
511
+ var FormField = ({
512
+ id,
513
+ label,
514
+ hint,
515
+ error,
516
+ required,
517
+ disabled,
518
+ size = "md",
519
+ className,
520
+ "aria-describedby": ariaDescribedBy,
521
+ children
522
+ }) => {
523
+ const autoId = (0, import_react10.useId)();
524
+ const controlId = id ?? autoId;
525
+ const hasError = Boolean(error);
526
+ const message = hasError ? error : hint;
527
+ const messageId = message ? `${controlId}-message` : void 0;
528
+ const describedBy = [ariaDescribedBy, messageId].filter(Boolean).join(" ") || void 0;
529
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: cx(FormField_default.root, FormField_default[size], className), children: [
530
+ label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { htmlFor: controlId, className: FormField_default.label, children: [
531
+ label,
532
+ required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: FormField_default.required, "aria-hidden": "true", children: " *" })
533
+ ] }),
534
+ children({
535
+ controlProps: {
536
+ id: controlId,
537
+ "aria-describedby": describedBy,
538
+ "aria-invalid": hasError || void 0
539
+ },
540
+ boxClassName: cx(FormField_default.box, hasError && FormField_default.invalid, disabled && FormField_default.disabled)
541
+ }),
542
+ message && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { id: messageId, className: cx(FormField_default.message, hasError && FormField_default.error), children: message })
543
+ ] });
544
+ };
545
+ FormField.displayName = "FormField";
546
+
440
547
  // src/components/Input/Input.module.css
441
548
  var Input_default = {
442
- sm: "Input_sm",
443
- md: "Input_md",
444
- lg: "Input_lg",
445
- root: "Input_root",
446
- label: "Input_label",
447
- required: "Input_required",
448
- field: "Input_field",
449
- disabled: "Input_disabled",
450
- invalid: "Input_invalid",
549
+ box: "Input_box",
451
550
  input: "Input_input",
452
- icon: "Input_icon",
453
- message: "Input_message",
454
- error: "Input_error"
551
+ icon: "Input_icon"
455
552
  };
456
553
 
457
554
  // src/components/Input/Input.tsx
458
- var import_jsx_runtime11 = require("react/jsx-runtime");
459
- var Input = (0, import_react9.forwardRef)(
555
+ var import_jsx_runtime13 = require("react/jsx-runtime");
556
+ var Input = (0, import_react11.forwardRef)(
460
557
  ({
461
558
  size = "md",
462
559
  label,
@@ -470,44 +567,40 @@ var Input = (0, import_react9.forwardRef)(
470
567
  disabled,
471
568
  "aria-describedby": ariaDescribedBy,
472
569
  ...props
473
- }, ref) => {
474
- const autoId = (0, import_react9.useId)();
475
- const inputId = id ?? autoId;
476
- const hasError = Boolean(error);
477
- const message = hasError ? error : hint;
478
- const messageId = message ? `${inputId}-message` : void 0;
479
- const describeBy = [ariaDescribedBy, messageId].filter(Boolean).join(" ") || void 0;
480
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cx(Input_default.root, Input_default[size], className), children: [
481
- label && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { htmlFor: inputId, className: Input_default.label, children: [
482
- label,
483
- " ",
484
- required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: Input_default.required, "aria-hidden": "true", children: " *" })
485
- ] }),
486
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cx(Input_default.field, hasError && Input_default.invalid, disabled && Input_default.disabled), children: [
487
- startIcon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: Input_default.icon, children: startIcon }),
488
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
570
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
571
+ FormField,
572
+ {
573
+ id,
574
+ size,
575
+ label,
576
+ hint,
577
+ error,
578
+ required,
579
+ disabled,
580
+ className,
581
+ "aria-describedby": ariaDescribedBy,
582
+ children: ({ controlProps, boxClassName }) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cx(boxClassName, Input_default.box), children: [
583
+ startIcon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: Input_default.icon, children: startIcon }),
584
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
489
585
  "input",
490
586
  {
491
587
  ref,
492
- id: inputId,
588
+ ...controlProps,
493
589
  required,
494
590
  disabled,
495
- "aria-invalid": hasError || void 0,
496
- "aria-describedby": describeBy,
497
591
  className: Input_default.input,
498
592
  ...props
499
593
  }
500
594
  ),
501
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: Input_default.icon, children: endIcon })
502
- ] }),
503
- message && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { id: messageId, className: cx(Input_default.message, hasError && Input_default.error), children: message })
504
- ] });
505
- }
595
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: Input_default.icon, children: endIcon })
596
+ ] })
597
+ }
598
+ )
506
599
  );
507
600
  Input.displayName = "Input";
508
601
 
509
602
  // src/components/Modal/Modal.tsx
510
- var import_react10 = require("react");
603
+ var import_react12 = require("react");
511
604
 
512
605
  // src/components/Modal/Modal.module.css
513
606
  var Modal_default = {
@@ -526,7 +619,7 @@ var Modal_default = {
526
619
  };
527
620
 
528
621
  // src/components/Modal/Modal.tsx
529
- var import_jsx_runtime12 = require("react/jsx-runtime");
622
+ var import_jsx_runtime14 = require("react/jsx-runtime");
530
623
  var Modal = ({
531
624
  open,
532
625
  onClose,
@@ -536,9 +629,9 @@ var Modal = ({
536
629
  width,
537
630
  children
538
631
  }) => {
539
- const ref = (0, import_react10.useRef)(null);
540
- const titleId = (0, import_react10.useId)();
541
- (0, import_react10.useEffect)(() => {
632
+ const ref = (0, import_react12.useRef)(null);
633
+ const titleId = (0, import_react12.useId)();
634
+ (0, import_react12.useEffect)(() => {
542
635
  if (open) {
543
636
  ref.current?.showModal();
544
637
  } else {
@@ -549,7 +642,7 @@ var Modal = ({
549
642
  return (
550
643
  // Escape у <dialog> уже закрывает модалку с клавиатуры
551
644
  // oxlint-disable-next-line jsx-a11y/click-events-have-key-events jsx-a11y/no-noninteractive-element-interactions
552
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
645
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
553
646
  "dialog",
554
647
  {
555
648
  ref,
@@ -558,13 +651,13 @@ var Modal = ({
558
651
  "aria-labelledby": title ? titleId : void 0,
559
652
  onClose,
560
653
  onClick: (e) => e.target === e.currentTarget && close(),
561
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: Modal_default.content, children: [
562
- title && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: Modal_default.header, children: [
563
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { id: titleId, className: Modal_default.title, children: title }),
564
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { type: "button", className: Modal_default.close, "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", onClick: close, children: "\xD7" })
654
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: Modal_default.content, children: [
655
+ title && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: Modal_default.header, children: [
656
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { id: titleId, className: Modal_default.title, children: title }),
657
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: Modal_default.close, "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", onClick: close, children: "\xD7" })
565
658
  ] }),
566
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: Modal_default.body, children }),
567
- footer && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: Modal_default.footer, children: footer })
659
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: Modal_default.body, children }),
660
+ footer && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("footer", { className: Modal_default.footer, children: footer })
568
661
  ] })
569
662
  }
570
663
  )
@@ -572,12 +665,62 @@ var Modal = ({
572
665
  };
573
666
  Modal.displayName = "Modal";
574
667
 
668
+ // src/components/ProgressBar/ProgressBar.module.css
669
+ var ProgressBar_default = {
670
+ progress: "ProgressBar_progress",
671
+ sm: "ProgressBar_sm",
672
+ md: "ProgressBar_md",
673
+ lg: "ProgressBar_lg",
674
+ success: "ProgressBar_success",
675
+ danger: "ProgressBar_danger",
676
+ fill: "ProgressBar_fill",
677
+ indeterminate: "ProgressBar_indeterminate"
678
+ };
679
+
680
+ // src/components/ProgressBar/ProgressBar.tsx
681
+ var import_jsx_runtime15 = require("react/jsx-runtime");
682
+ var ProgressBar = ({
683
+ value,
684
+ max = 100,
685
+ size = "md",
686
+ variant = "accent",
687
+ className,
688
+ style,
689
+ ...props
690
+ }) => {
691
+ const isIndenterminate = value === void 0;
692
+ const safeMax = max > 0 ? max : 100;
693
+ const clamped = isIndenterminate ? 0 : Math.min(Math.max(value, 0), safeMax);
694
+ const percent = clamped / safeMax * 100;
695
+ const classes = cx(
696
+ ProgressBar_default.progress,
697
+ ProgressBar_default[size],
698
+ ProgressBar_default[variant],
699
+ isIndenterminate && ProgressBar_default.indeterminate,
700
+ className
701
+ );
702
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
703
+ "div",
704
+ {
705
+ className: classes,
706
+ style: { ...style, "--progress-offset": `${percent - 100}%` },
707
+ role: "progressbar",
708
+ "aria-valuemin": 0,
709
+ "aria-valuemax": safeMax,
710
+ "aria-valuenow": isIndenterminate ? void 0 : clamped,
711
+ ...props,
712
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: ProgressBar_default.fill })
713
+ }
714
+ );
715
+ };
716
+ ProgressBar.displayName = "ProgressBar";
717
+
575
718
  // src/components/Radio/Radio.tsx
576
- var import_react12 = require("react");
719
+ var import_react14 = require("react");
577
720
 
578
721
  // src/components/RadioGroup/RadioGroupProvider/context.ts
579
- var import_react11 = require("react");
580
- var RadioGroupContext = (0, import_react11.createContext)(null);
722
+ var import_react13 = require("react");
723
+ var RadioGroupContext = (0, import_react13.createContext)(null);
581
724
 
582
725
  // src/components/Radio/Radio.module.css
583
726
  var Radio_default = {
@@ -594,8 +737,8 @@ var Radio_default = {
594
737
  };
595
738
 
596
739
  // src/components/Radio/Radio.tsx
597
- var import_jsx_runtime13 = require("react/jsx-runtime");
598
- var Radio = (0, import_react12.forwardRef)(
740
+ var import_jsx_runtime16 = require("react/jsx-runtime");
741
+ var Radio = (0, import_react14.forwardRef)(
599
742
  ({
600
743
  size = "md",
601
744
  label,
@@ -611,8 +754,8 @@ var Radio = (0, import_react12.forwardRef)(
611
754
  "aria-describedby": ariaDescribedBy,
612
755
  ...props
613
756
  }, ref) => {
614
- const group = (0, import_react12.useContext)(RadioGroupContext);
615
- const autoId = (0, import_react12.useId)();
757
+ const group = (0, import_react14.useContext)(RadioGroupContext);
758
+ const autoId = (0, import_react14.useId)();
616
759
  const radioId = id ?? autoId;
617
760
  const hasError = Boolean(error);
618
761
  const messageId = hasError ? `${radioId}-message` : void 0;
@@ -625,7 +768,7 @@ var Radio = (0, import_react12.forwardRef)(
625
768
  onChange?.(event);
626
769
  group?.onChange(event.target.value);
627
770
  };
628
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
771
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
629
772
  "div",
630
773
  {
631
774
  className: cx(
@@ -636,8 +779,8 @@ var Radio = (0, import_react12.forwardRef)(
636
779
  className
637
780
  ),
638
781
  children: [
639
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: Radio_default.label, children: [
640
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
782
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: Radio_default.label, children: [
783
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
641
784
  "input",
642
785
  {
643
786
  ref,
@@ -655,9 +798,9 @@ var Radio = (0, import_react12.forwardRef)(
655
798
  }
656
799
  ),
657
800
  label,
658
- required && !group && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: Radio_default.required, "aria-hidden": "true", children: " *" })
801
+ required && !group && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: Radio_default.required, "aria-hidden": "true", children: " *" })
659
802
  ] }),
660
- hasError && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { id: messageId, className: Radio_default.error, children: error })
803
+ hasError && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: messageId, className: Radio_default.error, children: error })
661
804
  ]
662
805
  }
663
806
  );
@@ -666,11 +809,11 @@ var Radio = (0, import_react12.forwardRef)(
666
809
  Radio.displayName = "Radio";
667
810
 
668
811
  // src/components/RadioGroup/RadioGroup.tsx
669
- var import_react14 = require("react");
812
+ var import_react16 = require("react");
670
813
 
671
814
  // src/components/RadioGroup/RadioGroupProvider/RadioGroupProvider.tsx
672
- var import_react13 = require("react");
673
- var import_jsx_runtime14 = require("react/jsx-runtime");
815
+ var import_react15 = require("react");
816
+ var import_jsx_runtime17 = require("react/jsx-runtime");
674
817
  var RadioGroupProvider = ({
675
818
  name,
676
819
  value: controlledValue,
@@ -680,10 +823,10 @@ var RadioGroupProvider = ({
680
823
  required,
681
824
  children
682
825
  }) => {
683
- const [uncontrolledValue, setUncontrolledValue] = (0, import_react13.useState)(defaultValue);
826
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react15.useState)(defaultValue);
684
827
  const isControlled = controlledValue !== void 0;
685
828
  const currentValue = isControlled ? controlledValue : uncontrolledValue;
686
- const autoId = (0, import_react13.useId)();
829
+ const autoId = (0, import_react15.useId)();
687
830
  const finalName = name ?? `radiogroup-${autoId}`;
688
831
  const handleChange = (newValue) => {
689
832
  if (!isControlled) {
@@ -691,7 +834,7 @@ var RadioGroupProvider = ({
691
834
  }
692
835
  onChange?.(newValue);
693
836
  };
694
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
837
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
695
838
  RadioGroupContext.Provider,
696
839
  {
697
840
  value: {
@@ -717,7 +860,7 @@ var RadioGroup_default = {
717
860
  };
718
861
 
719
862
  // src/components/RadioGroup/RadioGroup.tsx
720
- var import_jsx_runtime15 = require("react/jsx-runtime");
863
+ var import_jsx_runtime18 = require("react/jsx-runtime");
721
864
  var RadioGroup = ({
722
865
  value,
723
866
  defaultValue,
@@ -731,10 +874,10 @@ var RadioGroup = ({
731
874
  children,
732
875
  ...props
733
876
  }) => {
734
- const labelId = (0, import_react14.useId)();
735
- const messageId = (0, import_react14.useId)();
877
+ const labelId = (0, import_react16.useId)();
878
+ const messageId = (0, import_react16.useId)();
736
879
  const hasError = Boolean(error);
737
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
880
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
738
881
  RadioGroupProvider,
739
882
  {
740
883
  name,
@@ -743,7 +886,7 @@ var RadioGroup = ({
743
886
  onChange,
744
887
  disabled,
745
888
  required,
746
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
889
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
747
890
  "div",
748
891
  {
749
892
  className: cx(RadioGroup_default.root, disabled && RadioGroup_default.disabled, className),
@@ -754,12 +897,12 @@ var RadioGroup = ({
754
897
  "aria-required": required || void 0,
755
898
  ...props,
756
899
  children: [
757
- label && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { id: labelId, className: RadioGroup_default.groupLabel, children: [
900
+ label && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { id: labelId, className: RadioGroup_default.groupLabel, children: [
758
901
  label,
759
- required && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: RadioGroup_default.required, "aria-hidden": "true", children: " *" })
902
+ required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: RadioGroup_default.required, "aria-hidden": "true", children: " *" })
760
903
  ] }),
761
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: RadioGroup_default.options, children }),
762
- hasError && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: messageId, className: RadioGroup_default.error, children: error })
904
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: RadioGroup_default.options, children }),
905
+ hasError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { id: messageId, className: RadioGroup_default.error, children: error })
763
906
  ]
764
907
  }
765
908
  )
@@ -782,7 +925,7 @@ var Skeleton_default = {
782
925
  };
783
926
 
784
927
  // src/components/Skeleton/Skeleton.tsx
785
- var import_jsx_runtime16 = require("react/jsx-runtime");
928
+ var import_jsx_runtime19 = require("react/jsx-runtime");
786
929
  var Skeleton = ({
787
930
  variant = "text",
788
931
  width,
@@ -806,14 +949,14 @@ var Skeleton = ({
806
949
  borderRadius: toCss(radius)
807
950
  };
808
951
  if (variant === "text" && lines > 1) {
809
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
952
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
810
953
  "span",
811
954
  {
812
955
  className: cx(Skeleton_default.lines, className),
813
956
  style: { width: sizeStyle.width, ...style },
814
957
  "aria-hidden": "true",
815
958
  ...props,
816
- children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
959
+ children: Array.from({ length: lines }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
817
960
  "span",
818
961
  {
819
962
  className: baseClasses,
@@ -824,14 +967,14 @@ var Skeleton = ({
824
967
  }
825
968
  );
826
969
  }
827
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
970
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
828
971
  "span",
829
972
  {
830
973
  className: cx(baseClasses, children != null && Skeleton_default.withChildren, className),
831
974
  style: { ...sizeStyle, ...style },
832
975
  "aria-hidden": "true",
833
976
  ...props,
834
- children: children != null && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: Skeleton_default.hidden, children })
977
+ children: children != null && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: Skeleton_default.hidden, children })
835
978
  }
836
979
  );
837
980
  };
@@ -861,7 +1004,7 @@ var Spinner_default = {
861
1004
  };
862
1005
 
863
1006
  // src/components/Spinner/Spinner.tsx
864
- var import_jsx_runtime17 = require("react/jsx-runtime");
1007
+ var import_jsx_runtime20 = require("react/jsx-runtime");
865
1008
  var Spinner = ({
866
1009
  variant = "circle",
867
1010
  size = "md",
@@ -872,7 +1015,7 @@ var Spinner = ({
872
1015
  ...props
873
1016
  }) => {
874
1017
  const { items } = SPINNER_VARIANTS[variant];
875
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1018
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
876
1019
  "span",
877
1020
  {
878
1021
  role: "status",
@@ -880,14 +1023,14 @@ var Spinner = ({
880
1023
  className: cx(Spinner_default.spinner, Spinner_default[variant], Spinner_default[size], className),
881
1024
  style: { ...style, ...color && { color } },
882
1025
  ...props,
883
- children: Array.from({ length: items }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: Spinner_default.item, style: { "--i": i } }, i))
1026
+ children: Array.from({ length: items }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: Spinner_default.item, style: { "--i": i } }, i))
884
1027
  }
885
1028
  );
886
1029
  };
887
1030
  Spinner.displayName = "Spinner";
888
1031
 
889
1032
  // src/components/Switch/Switch.tsx
890
- var import_react15 = require("react");
1033
+ var import_react17 = require("react");
891
1034
 
892
1035
  // src/components/Switch/Switch.module.css
893
1036
  var Switch_default = {
@@ -902,10 +1045,10 @@ var Switch_default = {
902
1045
  };
903
1046
 
904
1047
  // src/components/Switch/Switch.tsx
905
- var import_jsx_runtime18 = require("react/jsx-runtime");
906
- var Switch = (0, import_react15.forwardRef)(
907
- ({ size = "md", label, className, disabled, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: cx(Switch_default.root, Switch_default[size], disabled && Switch_default.disabled, className), children: [
908
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1048
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1049
+ var Switch = (0, import_react17.forwardRef)(
1050
+ ({ size = "md", label, className, disabled, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: cx(Switch_default.root, Switch_default[size], disabled && Switch_default.disabled, className), children: [
1051
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
909
1052
  "input",
910
1053
  {
911
1054
  ref,
@@ -917,13 +1060,13 @@ var Switch = (0, import_react15.forwardRef)(
917
1060
  ...props
918
1061
  }
919
1062
  ),
920
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: Switch_default.thumb }) }),
921
- label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: Switch_default.label, children: label })
1063
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: Switch_default.thumb }) }),
1064
+ label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: Switch_default.label, children: label })
922
1065
  ] })
923
1066
  );
924
1067
 
925
1068
  // src/components/Tabs/Tabs.tsx
926
- var import_react16 = require("react");
1069
+ var import_react18 = require("react");
927
1070
 
928
1071
  // src/components/Tabs/Tabs.module.css
929
1072
  var Tabs_default = {
@@ -934,14 +1077,14 @@ var Tabs_default = {
934
1077
  };
935
1078
 
936
1079
  // src/components/Tabs/Tabs.tsx
937
- var import_jsx_runtime19 = require("react/jsx-runtime");
1080
+ var import_jsx_runtime22 = require("react/jsx-runtime");
938
1081
  var Tabs = ({ items, defaultValue, onChange, className }) => {
939
- const [active, setActive] = (0, import_react16.useState)(() => {
1082
+ const [active, setActive] = (0, import_react18.useState)(() => {
940
1083
  const isSelectable = items.some((item) => item.value === defaultValue && !item.disabled);
941
1084
  return isSelectable ? defaultValue : items.find((item) => !item.disabled)?.value;
942
1085
  });
943
- const id = (0, import_react16.useId)();
944
- const tabRefs = (0, import_react16.useRef)([]);
1086
+ const id = (0, import_react18.useId)();
1087
+ const tabRefs = (0, import_react18.useRef)([]);
945
1088
  const activeIndex = items.findIndex((item) => item.value === active);
946
1089
  const select = (value) => {
947
1090
  if (value === active) return;
@@ -972,10 +1115,10 @@ var Tabs = ({ items, defaultValue, onChange, className }) => {
972
1115
  tabRefs.current[next]?.focus();
973
1116
  select(items[next].value);
974
1117
  };
975
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: cx(Tabs_default.tabs, className), children: [
976
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { role: "tablist", className: Tabs_default.list, children: items.map((item, index) => {
1118
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx(Tabs_default.tabs, className), children: [
1119
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { role: "tablist", className: Tabs_default.list, children: items.map((item, index) => {
977
1120
  const selected = index === activeIndex;
978
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1121
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
979
1122
  "button",
980
1123
  {
981
1124
  ref: (el) => {
@@ -996,7 +1139,7 @@ var Tabs = ({ items, defaultValue, onChange, className }) => {
996
1139
  item.value
997
1140
  );
998
1141
  }) }),
999
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1142
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1000
1143
  "div",
1001
1144
  {
1002
1145
  role: "tabpanel",
@@ -1011,8 +1154,62 @@ var Tabs = ({ items, defaultValue, onChange, className }) => {
1011
1154
  };
1012
1155
  Tabs.displayName = "Tabs";
1013
1156
 
1157
+ // src/components/Textarea/Textarea.tsx
1158
+ var import_react19 = require("react");
1159
+
1160
+ // src/components/Textarea/Textarea.module.css
1161
+ var Textarea_default = {
1162
+ textarea: "Textarea_textarea",
1163
+ resizeNone: "Textarea_resizeNone"
1164
+ };
1165
+
1166
+ // src/components/Textarea/Textarea.tsx
1167
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1168
+ var Textarea = (0, import_react19.forwardRef)(
1169
+ ({
1170
+ size = "md",
1171
+ label,
1172
+ hint,
1173
+ error,
1174
+ resize = "vertical",
1175
+ rows = 3,
1176
+ className,
1177
+ id,
1178
+ required,
1179
+ disabled,
1180
+ "aria-describedby": ariaDescribedBy,
1181
+ ...props
1182
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1183
+ FormField,
1184
+ {
1185
+ id,
1186
+ size,
1187
+ label,
1188
+ hint,
1189
+ error,
1190
+ required,
1191
+ disabled,
1192
+ className,
1193
+ "aria-describedby": ariaDescribedBy,
1194
+ children: ({ controlProps, boxClassName }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1195
+ "textarea",
1196
+ {
1197
+ ref,
1198
+ ...controlProps,
1199
+ rows,
1200
+ required,
1201
+ disabled,
1202
+ className: cx(boxClassName, Textarea_default.textarea, resize === "none" && Textarea_default.resizeNone),
1203
+ ...props
1204
+ }
1205
+ )
1206
+ }
1207
+ )
1208
+ );
1209
+ Textarea.displayName = "Textarea";
1210
+
1014
1211
  // src/components/Toast/Toast.tsx
1015
- var import_react17 = require("react");
1212
+ var import_react20 = require("react");
1016
1213
 
1017
1214
  // src/components/Toast/Toast.module.css
1018
1215
  var Toast_default = {
@@ -1029,7 +1226,7 @@ var Toast_default = {
1029
1226
  };
1030
1227
 
1031
1228
  // src/components/Toast/Toast.tsx
1032
- var import_jsx_runtime20 = require("react/jsx-runtime");
1229
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1033
1230
  var Toast = ({
1034
1231
  variant = "info",
1035
1232
  title,
@@ -1042,25 +1239,25 @@ var Toast = ({
1042
1239
  onMouseLeave,
1043
1240
  ...props
1044
1241
  }) => {
1045
- const [visible, setVisible] = (0, import_react17.useState)(true);
1046
- const timerRef = (0, import_react17.useRef)();
1047
- const remainingRef = (0, import_react17.useRef)(duration);
1048
- const startedAtRef = (0, import_react17.useRef)(0);
1049
- const onCloseRef = (0, import_react17.useRef)(onClose);
1050
- (0, import_react17.useEffect)(() => {
1242
+ const [visible, setVisible] = (0, import_react20.useState)(true);
1243
+ const timerRef = (0, import_react20.useRef)();
1244
+ const remainingRef = (0, import_react20.useRef)(duration);
1245
+ const startedAtRef = (0, import_react20.useRef)(0);
1246
+ const onCloseRef = (0, import_react20.useRef)(onClose);
1247
+ (0, import_react20.useEffect)(() => {
1051
1248
  onCloseRef.current = onClose;
1052
1249
  }, [onClose]);
1053
- const handleClose = (0, import_react17.useCallback)(() => {
1250
+ const handleClose = (0, import_react20.useCallback)(() => {
1054
1251
  setVisible(false);
1055
1252
  onCloseRef.current?.();
1056
1253
  }, []);
1057
- const clearTimer = (0, import_react17.useCallback)(() => {
1254
+ const clearTimer = (0, import_react20.useCallback)(() => {
1058
1255
  if (timerRef.current) {
1059
1256
  clearTimeout(timerRef.current);
1060
1257
  timerRef.current = void 0;
1061
1258
  }
1062
1259
  }, []);
1063
- const startTimer = (0, import_react17.useCallback)(
1260
+ const startTimer = (0, import_react20.useCallback)(
1064
1261
  (ms) => {
1065
1262
  if (ms <= 0) return;
1066
1263
  startedAtRef.current = Date.now();
@@ -1068,7 +1265,7 @@ var Toast = ({
1068
1265
  },
1069
1266
  [handleClose]
1070
1267
  );
1071
- (0, import_react17.useEffect)(() => {
1268
+ (0, import_react20.useEffect)(() => {
1072
1269
  startTimer(remainingRef.current);
1073
1270
  return clearTimer;
1074
1271
  }, [startTimer, clearTimer]);
@@ -1085,7 +1282,7 @@ var Toast = ({
1085
1282
  return null;
1086
1283
  }
1087
1284
  const classes = cx(Toast_default.toast, Toast_default[variant], className);
1088
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1285
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1089
1286
  "div",
1090
1287
  {
1091
1288
  className: classes,
@@ -1093,11 +1290,11 @@ var Toast = ({
1093
1290
  onMouseLeave: handleMouseLeave,
1094
1291
  ...props,
1095
1292
  children: [
1096
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: Toast_default.content, role: "status", "aria-live": "polite", children: [
1097
- title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: Toast_default.title, children: title }),
1098
- children && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: Toast_default.description, children })
1293
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: Toast_default.content, role: "status", "aria-live": "polite", children: [
1294
+ title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: Toast_default.title, children: title }),
1295
+ children && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: Toast_default.description, children })
1099
1296
  ] }),
1100
- closable && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1297
+ closable && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1101
1298
  "button",
1102
1299
  {
1103
1300
  type: "button",
@@ -1114,7 +1311,7 @@ var Toast = ({
1114
1311
  Toast.displayName = "Toast";
1115
1312
 
1116
1313
  // src/components/Toast/ToastProvider/ToastProvider.tsx
1117
- var import_react18 = require("react");
1314
+ var import_react21 = require("react");
1118
1315
  var import_react_dom = require("react-dom");
1119
1316
 
1120
1317
  // src/components/Toast/ToastProvider/ToastContainer.module.css
@@ -1129,39 +1326,39 @@ var ToastContainer_default = {
1129
1326
  };
1130
1327
 
1131
1328
  // src/components/Toast/ToastProvider/ToastProvider.tsx
1132
- var import_jsx_runtime21 = require("react/jsx-runtime");
1329
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1133
1330
  var idCounter = 0;
1134
1331
  var nextId = () => `toast-${Date.now()}-${idCounter++}`;
1135
- var ToastContext = (0, import_react18.createContext)(null);
1332
+ var ToastContext = (0, import_react21.createContext)(null);
1136
1333
  var ToastProvider = ({
1137
1334
  children,
1138
1335
  position = "top-right"
1139
1336
  }) => {
1140
- const [toasts, setToasts] = (0, import_react18.useState)([]);
1141
- const close = (0, import_react18.useCallback)((id) => {
1337
+ const [toasts, setToasts] = (0, import_react21.useState)([]);
1338
+ const close = (0, import_react21.useCallback)((id) => {
1142
1339
  setToasts((prev) => prev.filter((toast) => toast.id !== id));
1143
1340
  }, []);
1144
- const show = (0, import_react18.useCallback)((options) => {
1341
+ const show = (0, import_react21.useCallback)((options) => {
1145
1342
  const id = nextId();
1146
1343
  setToasts((prev) => [...prev, { id, ...options }]);
1147
1344
  return id;
1148
1345
  }, []);
1149
- const value = (0, import_react18.useMemo)(() => {
1346
+ const value = (0, import_react21.useMemo)(() => {
1150
1347
  return { show, close };
1151
1348
  }, [show, close]);
1152
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ToastContext.Provider, { value, children: [
1349
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(ToastContext.Provider, { value, children: [
1153
1350
  children,
1154
1351
  typeof document !== "undefined" && (0, import_react_dom.createPortal)(
1155
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cx(ToastContainer_default.container, ToastContainer_default[position]), children: toasts.map(({ id, description, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Toast, { ...rest, onClose: () => close(id), children: description }, id)) }),
1352
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cx(ToastContainer_default.container, ToastContainer_default[position]), children: toasts.map(({ id, description, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Toast, { ...rest, onClose: () => close(id), children: description }, id)) }),
1156
1353
  document.body
1157
1354
  )
1158
1355
  ] });
1159
1356
  };
1160
1357
 
1161
1358
  // src/components/Toast/ToastProvider/hook/useToast.ts
1162
- var import_react19 = require("react");
1359
+ var import_react22 = require("react");
1163
1360
  var useToast = () => {
1164
- const ctx = (0, import_react19.useContext)(ToastContext);
1361
+ const ctx = (0, import_react22.useContext)(ToastContext);
1165
1362
  if (!ctx) {
1166
1363
  throw new Error("useToast \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D \u0432\u043D\u0435 ToastProvider");
1167
1364
  }
@@ -1177,8 +1374,8 @@ var useToast = () => {
1177
1374
  };
1178
1375
 
1179
1376
  // src/components/Tooltip/Tooltip.tsx
1180
- var import_react20 = require("react");
1181
- var import_react21 = require("@floating-ui/react");
1377
+ var import_react23 = require("react");
1378
+ var import_react24 = require("@floating-ui/react");
1182
1379
 
1183
1380
  // src/components/Tooltip/Tooltip.module.css
1184
1381
  var Tooltip_default = {
@@ -1188,7 +1385,7 @@ var Tooltip_default = {
1188
1385
  };
1189
1386
 
1190
1387
  // src/components/Tooltip/Tooltip.tsx
1191
- var import_jsx_runtime22 = require("react/jsx-runtime");
1388
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1192
1389
  var Tooltip = ({
1193
1390
  content,
1194
1391
  children,
@@ -1197,35 +1394,35 @@ var Tooltip = ({
1197
1394
  className,
1198
1395
  ...props
1199
1396
  }) => {
1200
- const [open, setOpen] = (0, import_react20.useState)(false);
1397
+ const [open, setOpen] = (0, import_react23.useState)(false);
1201
1398
  const {
1202
1399
  refs,
1203
1400
  floatingStyles,
1204
1401
  context,
1205
1402
  placement: finalPlacement
1206
- } = (0, import_react21.useFloating)({
1403
+ } = (0, import_react24.useFloating)({
1207
1404
  open,
1208
1405
  onOpenChange: setOpen,
1209
1406
  placement,
1210
- whileElementsMounted: import_react21.autoUpdate,
1211
- middleware: [(0, import_react21.offset)(8), (0, import_react21.flip)(), (0, import_react21.shift)({ padding: 8 })]
1407
+ whileElementsMounted: import_react24.autoUpdate,
1408
+ middleware: [(0, import_react24.offset)(8), (0, import_react24.flip)(), (0, import_react24.shift)({ padding: 8 })]
1212
1409
  });
1213
- const hover = (0, import_react21.useHover)(context, { delay: { open: delay, close: 0 } });
1214
- const focus = (0, import_react21.useFocus)(context);
1215
- const role = (0, import_react21.useRole)(context, { role: "tooltip" });
1216
- const { getReferenceProps, getFloatingProps } = (0, import_react21.useInteractions)([hover, focus, role]);
1217
- const childRef = (0, import_react20.isValidElement)(children) ? children.props?.ref ?? children.ref : null;
1218
- const mergedRef = (0, import_react21.useMergeRefs)([refs.setReference, childRef]);
1219
- const child = (0, import_react20.isValidElement)(children) ? (0, import_react20.cloneElement)(
1410
+ const hover = (0, import_react24.useHover)(context, { delay: { open: delay, close: 0 } });
1411
+ const focus = (0, import_react24.useFocus)(context);
1412
+ const role = (0, import_react24.useRole)(context, { role: "tooltip" });
1413
+ const { getReferenceProps, getFloatingProps } = (0, import_react24.useInteractions)([hover, focus, role]);
1414
+ const childRef = (0, import_react23.isValidElement)(children) ? children.props?.ref ?? children.ref : null;
1415
+ const mergedRef = (0, import_react24.useMergeRefs)([refs.setReference, childRef]);
1416
+ const child = (0, import_react23.isValidElement)(children) ? (0, import_react23.cloneElement)(
1220
1417
  children,
1221
1418
  getReferenceProps({
1222
1419
  ...children.props,
1223
1420
  ref: mergedRef
1224
1421
  })
1225
- ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { ref: refs.setReference, ...getReferenceProps(), children });
1226
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
1422
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { ref: refs.setReference, ...getReferenceProps(), children });
1423
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
1227
1424
  child,
1228
- open && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1425
+ open && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1229
1426
  "div",
1230
1427
  {
1231
1428
  ref: refs.setFloating,
@@ -1235,7 +1432,7 @@ var Tooltip = ({
1235
1432
  ...getFloatingProps(props),
1236
1433
  children: [
1237
1434
  content,
1238
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: Tooltip_default.arrow })
1435
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: Tooltip_default.arrow })
1239
1436
  ]
1240
1437
  }
1241
1438
  )
@@ -1251,14 +1448,17 @@ var Tooltip = ({
1251
1448
  Badge,
1252
1449
  Button,
1253
1450
  Checkbox,
1451
+ Divider,
1254
1452
  Input,
1255
1453
  Modal,
1454
+ ProgressBar,
1256
1455
  Radio,
1257
1456
  RadioGroup,
1258
1457
  Skeleton,
1259
1458
  Spinner,
1260
1459
  Switch,
1261
1460
  Tabs,
1461
+ Textarea,
1262
1462
  Toast,
1263
1463
  ToastProvider,
1264
1464
  Tooltip,