@yr3/ui 1.0.2 → 1.0.4

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.
@@ -1,3 +1,103 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Avatar: () => Avatar,
34
+ Backdrop: () => Backdrop,
35
+ BackdropContext: () => BackdropContext,
36
+ BackdropProvider: () => BackdropProvider,
37
+ Box: () => Box,
38
+ Button: () => Button,
39
+ Calendar: () => Calendar,
40
+ Checkbox: () => Checkbox,
41
+ Chip: () => Chip,
42
+ Collapse: () => Collapse,
43
+ Container: () => Container,
44
+ Control: () => Control,
45
+ ControlContext: () => ControlContext,
46
+ Divider: () => Divider,
47
+ Drawer: () => Drawer,
48
+ Fade: () => Fade,
49
+ Flex: () => Flex,
50
+ Grid: () => Grid,
51
+ Group: () => Group,
52
+ IconClose: () => IconClose,
53
+ IconDown: () => IconDown,
54
+ IconSearch: () => IconSearch,
55
+ Image: () => Image,
56
+ ImageDropzone: () => ImageDropzone,
57
+ Input: () => Input,
58
+ InputArea: () => InputArea,
59
+ Label: () => Label,
60
+ Modal: () => Modal,
61
+ ModalContainer: () => ModalContainer,
62
+ Notistack: () => Notistack,
63
+ NotistackProvider: () => NotistackProvider,
64
+ Pending: () => Pending,
65
+ Phone: () => Phone,
66
+ Radio: () => Radio,
67
+ Select: () => Select,
68
+ Slide: () => Slide,
69
+ Switch: () => Switch,
70
+ Text: () => Text,
71
+ ThemeContext: () => ThemeContext,
72
+ ThemeProvider: () => ThemeProvider,
73
+ adjustColor: () => adjustColor,
74
+ applyTheme: () => applyTheme,
75
+ baseTokens: () => baseTokens,
76
+ bem: () => bem,
77
+ bemMerge: () => bemMerge,
78
+ breakpoints: () => breakpoints,
79
+ composeStyles: () => composeStyles,
80
+ createPaletteColor: () => createPaletteColor,
81
+ createTheme: () => createTheme,
82
+ createVariants: () => createVariants,
83
+ cx: () => cx,
84
+ getContrast: () => getContrast,
85
+ getMonthCalendar: () => getMonthCalendar,
86
+ initTheme: () => initTheme,
87
+ isEmpty: () => isEmpty,
88
+ text: () => text,
89
+ times: () => times,
90
+ uiStyle: () => uiStyle,
91
+ useBackdrop: () => useBackdrop,
92
+ useBreakpointValue: () => useBreakpointValue,
93
+ useClickAway: () => useClickAway,
94
+ useControl: () => useControl,
95
+ useMediaQuery: () => useMediaQuery,
96
+ useNotistack: () => useNotistack,
97
+ useTheme: () => useTheme
98
+ });
99
+ module.exports = __toCommonJS(index_exports);
100
+
1
101
  // src/utils/bem.ts
2
102
  var bem = (block) => {
3
103
  return (element, modifiers) => {
@@ -28,11 +128,11 @@ var bemMerge = (...args) => {
28
128
  };
29
129
 
30
130
  // src/utils/calendar.ts
31
- import dayjs from "dayjs";
131
+ var import_dayjs = __toESM(require("dayjs"), 1);
32
132
  function getMonthCalendar(year, month, startIndex, selected, props) {
33
- const today = dayjs().startOf("day");
34
- const startOfMonth = dayjs().year(year).month(month).startOf("month");
35
- const endOfMonth = dayjs().year(year).month(month).endOf("month");
133
+ const today = (0, import_dayjs.default)().startOf("day");
134
+ const startOfMonth = (0, import_dayjs.default)().year(year).month(month).startOf("month");
135
+ const endOfMonth = (0, import_dayjs.default)().year(year).month(month).endOf("month");
36
136
  let dayCurrent = {};
37
137
  let startDay = startOfMonth.day();
38
138
  startDay = startDay === 0 ? 6 : startDay - 1;
@@ -414,7 +514,7 @@ function initTheme() {
414
514
  }
415
515
 
416
516
  // src/components/Avatar/Avatar.tsx
417
- import * as React from "react";
517
+ var React = __toESM(require("react"), 1);
418
518
 
419
519
  // src/components/Avatar/avatar.variants.ts
420
520
  var avatarVariants = createVariants({
@@ -457,7 +557,7 @@ var avatarVariants = createVariants({
457
557
  var avatar_variants_default = avatarVariants;
458
558
 
459
559
  // src/components/Avatar/Avatar.tsx
460
- import { jsx } from "react/jsx-runtime";
560
+ var import_jsx_runtime = require("react/jsx-runtime");
461
561
  var Avatar = ({
462
562
  src,
463
563
  alt,
@@ -476,30 +576,30 @@ var Avatar = ({
476
576
  const [error, setError] = React.useState(false);
477
577
  const showFallback = !src || error;
478
578
  const className = avatar_variants_default({ size, variant, color, bordered, shadow, floating });
479
- return /* @__PURE__ */ jsx("div", { className, style: uiStyle(ui), "data-testid": "yr3Avatar", role, onClick, children: !showFallback ? /* @__PURE__ */ jsx(
579
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className, style: uiStyle(ui), "data-testid": "yr3Avatar", role, onClick, children: !showFallback ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
480
580
  "img",
481
581
  {
482
582
  src,
483
583
  alt,
484
584
  onError: () => setError(true)
485
585
  }
486
- ) : /* @__PURE__ */ jsx("span", { className: "yr3Avatar--fallback", "data-testid": "yr3Avatar-fallback", children: children || label }) });
586
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "yr3Avatar--fallback", "data-testid": "yr3Avatar-fallback", children: children || label }) });
487
587
  };
488
588
 
489
589
  // src/components/Backdrop/Backdrop.tsx
490
- import { createPortal } from "react-dom";
590
+ var import_react_dom = require("react-dom");
491
591
 
492
592
  // src/theme/backdropContext.tsx
493
- import * as React2 from "react";
494
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
593
+ var React2 = __toESM(require("react"), 1);
594
+ var import_jsx_runtime2 = require("react/jsx-runtime");
495
595
  var BackdropContext = React2.createContext(null);
496
596
  var BackdropProvider = ({ children }) => {
497
597
  const [open, setOpen] = React2.useState(false);
498
598
  const show = () => setOpen(true);
499
599
  const hide = () => setOpen(false);
500
- return /* @__PURE__ */ jsxs(BackdropContext.Provider, { value: { open, show, hide }, children: [
600
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(BackdropContext.Provider, { value: { open, show, hide }, children: [
501
601
  children,
502
- /* @__PURE__ */ jsx2(Backdrop, {})
602
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Backdrop, {})
503
603
  ] });
504
604
  };
505
605
  var useBackdrop = () => {
@@ -509,11 +609,11 @@ var useBackdrop = () => {
509
609
  };
510
610
 
511
611
  // src/components/Backdrop/Backdrop.tsx
512
- import { jsx as jsx3 } from "react/jsx-runtime";
612
+ var import_jsx_runtime3 = require("react/jsx-runtime");
513
613
  var Backdrop = () => {
514
614
  const { open } = useBackdrop();
515
- return createPortal(
516
- /* @__PURE__ */ jsx3("div", { className: `yr3Backdrop ${open ? "yr3Backdrop--open" : ""}`, "data-testid": "yr3Backdrop" }),
615
+ return (0, import_react_dom.createPortal)(
616
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `yr3Backdrop ${open ? "yr3Backdrop--open" : ""}`, "data-testid": "yr3Backdrop" }),
517
617
  document.body
518
618
  );
519
619
  };
@@ -540,7 +640,7 @@ var boxVariants = createVariants({
540
640
  });
541
641
 
542
642
  // src/components/Box/Box.tsx
543
- import { jsx as jsx4 } from "react/jsx-runtime";
643
+ var import_jsx_runtime4 = require("react/jsx-runtime");
544
644
  var Box = ({
545
645
  content = "start",
546
646
  children,
@@ -552,7 +652,7 @@ var Box = ({
552
652
  ...props
553
653
  }) => {
554
654
  const classes = boxVariants({ content, drawer, position });
555
- return /* @__PURE__ */ jsx4(
655
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
556
656
  Component,
557
657
  {
558
658
  className: classes,
@@ -565,7 +665,7 @@ var Box = ({
565
665
  };
566
666
 
567
667
  // src/components/Text/Text.tsx
568
- import { jsx as jsx5 } from "react/jsx-runtime";
668
+ var import_jsx_runtime5 = require("react/jsx-runtime");
569
669
  var Text = ({
570
670
  children,
571
671
  variant = "inherit",
@@ -578,7 +678,7 @@ var Text = ({
578
678
  onClick
579
679
  }) => {
580
680
  const styleUI = uiStyle({ ...ui, marginTop: gutters[0] || 0, marginBottom: gutters[1] || 0 });
581
- return /* @__PURE__ */ jsx5(
681
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
582
682
  Component,
583
683
  {
584
684
  className: `
@@ -629,10 +729,10 @@ var buttonVariant = createVariants({
629
729
  });
630
730
 
631
731
  // src/components/Button/Button.tsx
632
- import { jsx as jsx6 } from "react/jsx-runtime";
732
+ var import_jsx_runtime6 = require("react/jsx-runtime");
633
733
  var Button = ({ children, color = "text", variant = "text", animated, disabled, gradientBorder = false, size = "auto", ui, style, propsComponent, ...props }) => {
634
734
  const buttonClassname = buttonVariant({ variant, color, animated, disabled, gradientBorder, size });
635
- return /* @__PURE__ */ jsx6(
735
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
636
736
  "button",
637
737
  {
638
738
  className: buttonClassname,
@@ -640,143 +740,99 @@ var Button = ({ children, color = "text", variant = "text", animated, disabled,
640
740
  "data-testid": "yr3Button",
641
741
  ...props,
642
742
  style: composeStyles(ui, style),
643
- children: /* @__PURE__ */ jsx6(Text, { variant: propsComponent?.text?.variant || "button", children })
743
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { variant: propsComponent?.text?.variant || "button", children })
644
744
  }
645
745
  );
646
746
  };
647
747
 
648
748
  // src/components/Calendar/Calendar.tsx
649
- import * as React3 from "react";
650
- import dayjs2 from "dayjs";
749
+ var React3 = __toESM(require("react"), 1);
750
+ var import_dayjs2 = __toESM(require("dayjs"), 1);
751
+ var import_weekday = __toESM(require("dayjs/plugin/weekday"), 1);
651
752
 
652
- // src/components/Flex/flex.variants.ts
653
- var flexVariants = createVariants({
654
- base: "yr3Flex",
753
+ // src/components/Calendar/calendar.variants.ts
754
+ var calendarVariants = createVariants({
755
+ base: "yr3Calendar",
655
756
  variants: {
656
757
  variant: {
657
- row: "yr3Flex--row",
658
- column: "yr3Flex--column",
659
- wrap: "yr3Flex--wrap"
758
+ default: "yr3Calendar--default",
759
+ compact: "yr3Calendar--compact"
660
760
  },
661
- container: {
662
- true: "yr3Flex--container"
761
+ size: {
762
+ sm: "yr3Calendar--size-sm",
763
+ md: "yr3Calendar--size-md",
764
+ lg: "yr3Calendar--size-lg"
765
+ }
766
+ }
767
+ });
768
+ var calendarDayVariants = createVariants({
769
+ base: "yr3Calendar-day",
770
+ variants: {
771
+ isFuture: {
772
+ true: "yr3Calendar-day--future"
663
773
  },
664
- center: {
665
- true: "yr3Flex--center"
774
+ isPast: {
775
+ true: "yr3Calendar-day--past"
666
776
  },
667
- between: {
668
- true: "yr3Flex--between"
777
+ isToday: {
778
+ true: "yr3Calendar-day--today"
779
+ },
780
+ isSelected: {
781
+ true: "yr3Calendar-day--selected"
669
782
  },
670
783
  bordered: {
671
- true: "yr3Flex--bordered"
784
+ true: "yr3Calendar-day--bordered"
785
+ },
786
+ color: {
787
+ primary: "yr3Calendar-day--color-primary",
788
+ secondary: "yr3Calendar-day--color-secondary",
789
+ success: "yr3Calendar-day--color-success",
790
+ text: "yr3Calendar-day--color-text",
791
+ disabled: "yr3Calendar-day--color-disabled",
792
+ info: "yr3Calendar-day--color-info",
793
+ warning: "yr3Calendar-day--color-warning",
794
+ error: "yr3Calendar-day--color-error"
672
795
  }
673
796
  }
674
797
  });
675
- var flex_variants_default = flexVariants;
676
-
677
- // src/components/Flex/Flex.tsx
678
- import { jsx as jsx7 } from "react/jsx-runtime";
679
- var Flex = ({
680
- container = false,
681
- spacing: spacing2 = 1,
682
- children,
683
- ui,
684
- gap,
685
- variant = "column",
686
- center = false,
687
- between = false,
688
- style,
689
- bordered = false,
690
- ...props
691
- }) => {
692
- const classes = flex_variants_default({ variant, container, center, between, bordered, spacing: spacing2 });
693
- return /* @__PURE__ */ jsx7(
694
- "div",
695
- {
696
- className: classes,
697
- style: composeStyles(ui, style),
698
- ...props,
699
- "data-testid": "yr3Flex",
700
- children
701
- }
702
- );
703
- };
704
-
705
- // src/components/Grid/Grid.tsx
706
- import { jsx as jsx8 } from "react/jsx-runtime";
707
- var Grid = ({
708
- container = false,
709
- spacing: spacing2 = 0,
710
- children,
711
- columns = 12,
712
- span = 1,
713
- ui,
714
- style,
715
- item = false,
716
- size = 0,
717
- center = false,
718
- ...props
719
- }) => {
720
- if (item) {
721
- columns = 0;
722
- }
723
- if (container) {
724
- columns = 0;
725
- ui = {
726
- ...ui,
727
- gridTemplateColumns: `repeat(${columns}, 1fr)`
728
- };
729
- }
730
- if (center) {
731
- ui = {
732
- ...ui,
733
- justifyContent: "center",
734
- alignItems: "center"
735
- };
736
- }
737
- const classes = bem("yr3Grid");
738
- const className = classes(void 0, { container, [`spacing-${spacing2}`]: center, span: item && `Col-${size}` });
739
- return /* @__PURE__ */ jsx8(
740
- "div",
741
- {
742
- className,
743
- style: composeStyles(ui, style),
744
- "data-testid": "yr3Grid",
745
- ...props,
746
- children
747
- }
748
- );
749
- };
750
798
 
751
799
  // src/components/Calendar/Calendar.tsx
752
- import weekday from "dayjs/plugin/weekday";
753
- import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
754
- dayjs2.extend(weekday);
800
+ var import_jsx_runtime7 = require("react/jsx-runtime");
801
+ import_dayjs2.default.extend(import_weekday.default);
755
802
  var initalPropsComponent = {
756
- action: {
757
- displayButtons: true,
758
- displayCalendar: true,
759
- day: {
760
- background: "transparent",
761
- borderColor: "transparent",
762
- ui: {}
763
- },
764
- buttonNext: {
765
- disabled: false,
766
- label: "next"
767
- },
768
- buttonBack: {
769
- disabled: false,
770
- label: "back"
771
- }
803
+ displayButtons: true,
804
+ displayCalendar: true,
805
+ header: {
806
+ color: "primary",
807
+ ui: {},
808
+ style: {}
809
+ },
810
+ month: {
811
+ color: "primary",
812
+ ui: {},
813
+ style: {}
814
+ },
815
+ day: {
816
+ color: "primary",
817
+ bordered: true,
818
+ ui: {},
819
+ style: {}
820
+ },
821
+ buttonNext: {
822
+ disabled: false,
823
+ label: "next"
824
+ },
825
+ buttonBack: {
826
+ disabled: false,
827
+ label: "back"
772
828
  }
773
829
  };
774
830
  var Calendar = ({ onSelect, propsComponent = initalPropsComponent, mapCalendar, onMonthChange }) => {
775
- const month = dayjs2().month();
831
+ const month = (0, import_dayjs2.default)().month();
776
832
  const [currentMonth, setCurrentMonth] = React3.useState(month);
777
833
  const [selected, setSelected] = React3.useState(null);
778
834
  const program = React3.useMemo(() => {
779
- return getMonthCalendar(dayjs2().year(), currentMonth, 0, selected, mapCalendar);
835
+ return getMonthCalendar((0, import_dayjs2.default)().year(), currentMonth, 0, selected, mapCalendar);
780
836
  }, [selected, currentMonth, mapCalendar]);
781
837
  React3.useEffect(() => {
782
838
  if (selected) {
@@ -790,37 +846,36 @@ var Calendar = ({ onSelect, propsComponent = initalPropsComponent, mapCalendar,
790
846
  onMonthChange && onMonthChange(currentMonth);
791
847
  }
792
848
  }, [currentMonth]);
793
- return /* @__PURE__ */ jsxs2(Flex, { container: true, center: true, variant: "column", gap: 2, "data-testid": "yr3Calendar", children: [
794
- propsComponent.action?.displayButtons && /* @__PURE__ */ jsxs2(Flex, { variant: "row", container: true, ui: { justifyContent: "space-between", marginBottom: 16, width: "80dvw" }, children: [
795
- /* @__PURE__ */ jsx9(Button, { disabled: propsComponent.action?.buttonBack?.disabled || false, color: "primary", onClick: () => setCurrentMonth(currentMonth - 1), children: propsComponent.action?.buttonBack?.label }),
796
- /* @__PURE__ */ jsx9(Text, { variant: "h6", ui: { textTransform: "uppercase" }, children: program?.monthLabel }),
797
- /* @__PURE__ */ jsx9(Button, { disabled: propsComponent.action?.buttonNext?.disabled, color: "primary", onClick: () => setCurrentMonth(currentMonth + 1), children: propsComponent.action?.buttonNext?.label })
849
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "yr3Calendar", "data-testid": "yr3Calendar", children: [
850
+ propsComponent?.displayButtons && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "yr3Calendar--header", "data-testid": "yr3CalendarHeader", style: composeStyles(propsComponent?.header?.ui, propsComponent?.header?.style), children: [
851
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { disabled: propsComponent?.buttonBack?.disabled || false, color: propsComponent.header?.color || "primary", onClick: () => setCurrentMonth(currentMonth - 1), ui: { justifyContent: "flex-start" }, children: propsComponent?.buttonBack?.label }),
852
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Text, { variant: "h6", color: propsComponent.header?.color || "primary", ui: { textTransform: "uppercase", textAlign: "center" }, children: program?.monthLabel }),
853
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { disabled: propsComponent?.buttonNext?.disabled, color: propsComponent?.header?.color || "primary", onClick: () => setCurrentMonth(currentMonth + 1), ui: { justifyContent: "flex-end" }, children: propsComponent?.buttonNext?.label })
798
854
  ] }),
799
- propsComponent.action?.displayCalendar && /* @__PURE__ */ jsxs2(Grid, { container: true, columns: 7, ui: { alignItems: "flex-start", justifyContent: "flex-start", width: "80dvw" }, spacing: 0, children: [
800
- program?.daysContainer.map((i) => /* @__PURE__ */ jsx9(Flex, { variant: "wrap", center: true, ui: { width: 40, marginBottom: 5 }, children: /* @__PURE__ */ jsx9(Text, { variant: "caption", color: "primary", ui: { opacity: 0.7, textTransform: "uppercase" }, children: dayjs2().day(i + 1).format("dd") }) }, i)),
801
- times(program.calendar.length, (i) => /* @__PURE__ */ jsx9(React3.Fragment, { children: times(program.calendar[i].length, (j) => /* @__PURE__ */ jsx9(
802
- Flex,
855
+ propsComponent?.displayCalendar && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "yr3Calendar--container", children: [
856
+ program?.daysContainer.map((i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "yr3Calendar--month", style: composeStyles(propsComponent?.month?.ui, propsComponent?.month?.style), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
857
+ Text,
803
858
  {
804
- center: true,
805
- ui: {
806
- width: 40,
807
- height: 20,
808
- marginBottom: 5,
809
- borderRadius: 4,
810
- opacity: program.calendar[i][j]?.isPast ? 0.6 : 1,
811
- border: "1px solid transparent",
812
- background: propsComponent.action?.day?.background || "transparent",
813
- borderColor: propsComponent.action?.day?.borderColor || "transparent",
814
- ...propsComponent.action?.day?.ui
815
- // background: program.calendar[i][j]?.isToday ? theme?.colors?.disabled as never:
816
- // program.calendar[i][j]?.data ? theme?.colors?.secondary?.dark :
817
- // 'transparent',
818
- // borderColor: !program.calendar[i][j] ? 'transparent' :
819
- // !selected && program.calendar[i][j]?.isToday ? theme?.colors?.primary?.main :
820
- // program.calendar[i][j]?.selected ? theme?.colors.secondary?.main :
821
- // !!program.calendar[i][j]?.isFuture ? theme?.colors.primary?.light :
822
- // theme?.colors.disabled,
823
- },
859
+ variant: "caption",
860
+ color: propsComponent?.month?.color || "primary",
861
+ ui: { ...propsComponent?.month?.ui, opacity: 0.7, textTransform: "uppercase" },
862
+ children: (0, import_dayjs2.default)().day(i + 1).format("dd")
863
+ }
864
+ ) }, `month_day_${i}`)),
865
+ times(program.calendar.length, (i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(React3.Fragment, { children: times(program.calendar[i].length, (j) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
866
+ "div",
867
+ {
868
+ className: calendarDayVariants({
869
+ isToday: program.calendar[i][j]?.isToday,
870
+ isSelected: program.calendar[i][j]?.selected,
871
+ isPast: program.calendar[i][j]?.isPast,
872
+ isFuture: program.calendar[i][j]?.isFuture,
873
+ isCurrentMonth: program.calendar[i][j]?.isCurrentMonth,
874
+ ui: propsComponent?.day?.ui,
875
+ bordered: !!program.calendar[i][j] && propsComponent?.day?.bordered,
876
+ color: propsComponent?.day?.color || "primary"
877
+ }),
878
+ style: composeStyles(propsComponent?.day?.ui, propsComponent?.day?.style),
824
879
  "data-testid": "yr3CalendarDay",
825
880
  onClick: () => {
826
881
  if (selected === program.calendar[i][j]) {
@@ -829,7 +884,7 @@ var Calendar = ({ onSelect, propsComponent = initalPropsComponent, mapCalendar,
829
884
  setSelected(program.calendar[i][j]);
830
885
  }
831
886
  },
832
- children: /* @__PURE__ */ jsx9(
887
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
833
888
  Text,
834
889
  {
835
890
  variant: "body2",
@@ -838,15 +893,15 @@ var Calendar = ({ onSelect, propsComponent = initalPropsComponent, mapCalendar,
838
893
  }
839
894
  )
840
895
  },
841
- j
896
+ `day-${i}-${j}`
842
897
  )) }, i))
843
898
  ] })
844
899
  ] });
845
900
  };
846
901
 
847
902
  // src/components/Checkbox/Checkbox.tsx
848
- import * as React4 from "react";
849
- import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
903
+ var React4 = __toESM(require("react"), 1);
904
+ var import_jsx_runtime8 = require("react/jsx-runtime");
850
905
  var Checkbox = ({
851
906
  checked,
852
907
  defaultChecked,
@@ -868,8 +923,8 @@ var Checkbox = ({
868
923
  const classes = bemClasse(void 0, { color: `color-${color}`, disabled, variant: `variant-${variant}` });
869
924
  const boxClasses = bem("yr3Checkbox-box");
870
925
  const classesBox = boxClasses(void 0, { checked: !!value });
871
- return /* @__PURE__ */ jsxs3("label", { className: classes, style: uiStyle(propsComponent?.checkbox?.ui), "data-testid": "yr3Checkbox", children: [
872
- /* @__PURE__ */ jsx10(
926
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: classes, style: uiStyle(propsComponent?.checkbox?.ui), "data-testid": "yr3Checkbox", children: [
927
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
873
928
  "input",
874
929
  {
875
930
  type: "checkbox",
@@ -879,8 +934,8 @@ var Checkbox = ({
879
934
  "data-testid": "yr3Checkbox-input"
880
935
  }
881
936
  ),
882
- /* @__PURE__ */ jsx10("span", { className: classesBox, "data-testid": "yr3Checkbox-box" }),
883
- label && /* @__PURE__ */ jsx10(Text, { variant: "caption", color: !value ? propsComponent?.content?.color : color, ...propsComponent?.content, children: label })
937
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: classesBox, "data-testid": "yr3Checkbox-box" }),
938
+ label && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { variant: "caption", color: !value ? propsComponent?.content?.color : color, ...propsComponent?.content, children: label })
884
939
  ] });
885
940
  };
886
941
 
@@ -914,9 +969,9 @@ var chipVariants = createVariants({
914
969
  var chip_variants_default = chipVariants;
915
970
 
916
971
  // src/Icons/IconClose.tsx
917
- import { jsx as jsx11 } from "react/jsx-runtime";
972
+ var import_jsx_runtime9 = require("react/jsx-runtime");
918
973
  var IconClose = (props) => {
919
- return /* @__PURE__ */ jsx11("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx11(
974
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
920
975
  "path",
921
976
  {
922
977
  d: "M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16",
@@ -929,10 +984,10 @@ var IconClose = (props) => {
929
984
  };
930
985
 
931
986
  // src/components/Chip/Chip.tsx
932
- import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
987
+ var import_jsx_runtime10 = require("react/jsx-runtime");
933
988
  var Chip = ({ label, variant, color, icon, onDelete, rounded, size = "medium", ui, style, ...props }) => {
934
989
  const className = chip_variants_default({ variant, colors: color, rounded, size });
935
- return /* @__PURE__ */ jsxs4(
990
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
936
991
  "div",
937
992
  {
938
993
  className,
@@ -944,16 +999,16 @@ var Chip = ({ label, variant, color, icon, onDelete, rounded, size = "medium", u
944
999
  },
945
1000
  children: [
946
1001
  icon,
947
- /* @__PURE__ */ jsx12("span", { className: "yr3Chip__label", children: label }),
948
- onDelete && /* @__PURE__ */ jsx12("span", { className: "yr3Chip__delete", onClick: onDelete, role: "button", "aria-label": "delete", children: /* @__PURE__ */ jsx12(IconClose, { width: 20, height: 20, stroke: color }) })
1002
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "yr3Chip__label", children: label }),
1003
+ onDelete && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "yr3Chip__delete", onClick: onDelete, role: "button", "aria-label": "delete", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(IconClose, { width: 20, height: 20, stroke: color }) })
949
1004
  ]
950
1005
  }
951
1006
  );
952
1007
  };
953
1008
 
954
1009
  // src/components/Collapse/Collapse.tsx
955
- import * as React5 from "react";
956
- import { jsx as jsx13 } from "react/jsx-runtime";
1010
+ var React5 = __toESM(require("react"), 1);
1011
+ var import_jsx_runtime11 = require("react/jsx-runtime");
957
1012
  var Collapse = ({ children, open, anchor }) => {
958
1013
  const ref = React5.useRef(null);
959
1014
  const [height, setHeight] = React5.useState(0);
@@ -966,11 +1021,11 @@ var Collapse = ({ children, open, anchor }) => {
966
1021
  }
967
1022
  }
968
1023
  }, [open, children]);
969
- return /* @__PURE__ */ jsx13("div", { className: `yr3Collapse yr3Collapse--${anchor}`, style: { height }, "data-testid": "yr3Collapse", children: /* @__PURE__ */ jsx13("div", { ref, className: "yr3Collapse__inner", children }) });
1024
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: `yr3Collapse yr3Collapse--${anchor}`, style: { height }, "data-testid": "yr3Collapse", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref, className: "yr3Collapse__inner", children }) });
970
1025
  };
971
1026
 
972
1027
  // src/components/Container/Container.tsx
973
- import { jsx as jsx14 } from "react/jsx-runtime";
1028
+ var import_jsx_runtime12 = require("react/jsx-runtime");
974
1029
  var Container = ({
975
1030
  children,
976
1031
  maxWidth = "sm",
@@ -980,7 +1035,7 @@ var Container = ({
980
1035
  }) => {
981
1036
  const containerClassName = bem("yr3Container");
982
1037
  const classes = containerClassName(void 0, { maxWidth, static: fixed });
983
- return /* @__PURE__ */ jsx14(
1038
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
984
1039
  "div",
985
1040
  {
986
1041
  className: classes,
@@ -992,12 +1047,12 @@ var Container = ({
992
1047
  };
993
1048
 
994
1049
  // src/theme/controlContext.tsx
995
- import * as React6 from "react";
1050
+ var React6 = __toESM(require("react"), 1);
996
1051
  var ControlContext = React6.createContext(null);
997
1052
  var useControl = () => React6.useContext(ControlContext);
998
1053
 
999
1054
  // src/components/Control/Control.tsx
1000
- import * as React7 from "react";
1055
+ var React7 = __toESM(require("react"), 1);
1001
1056
 
1002
1057
  // src/components/Control/control.variants.ts
1003
1058
  var controlVariants = createVariants({
@@ -1039,7 +1094,7 @@ var controlVariants = createVariants({
1039
1094
  });
1040
1095
 
1041
1096
  // src/components/Control/Control.tsx
1042
- import { jsx as jsx15 } from "react/jsx-runtime";
1097
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1043
1098
  var Control = ({
1044
1099
  children,
1045
1100
  error = false,
@@ -1058,7 +1113,7 @@ var Control = ({
1058
1113
  disabled
1059
1114
  };
1060
1115
  const classes = controlVariants({ variant, color, label });
1061
- return /* @__PURE__ */ jsx15(ControlContext.Provider, { value, children: /* @__PURE__ */ jsx15(
1116
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ControlContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1062
1117
  "div",
1063
1118
  {
1064
1119
  className: classes,
@@ -1100,7 +1155,7 @@ var dividerVariants = createVariants({
1100
1155
  var dividerVariants_default = dividerVariants;
1101
1156
 
1102
1157
  // src/components/Divider/Divider.tsx
1103
- import { jsx as jsx16 } from "react/jsx-runtime";
1158
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1104
1159
  var Divider = ({
1105
1160
  orientation = "horizontal",
1106
1161
  text: text2,
@@ -1110,14 +1165,14 @@ var Divider = ({
1110
1165
  color = "primary"
1111
1166
  }) => {
1112
1167
  const classname = dividerVariants_default({ orientation, align, withText: !!text2, color });
1113
- return /* @__PURE__ */ jsx16("div", { className: classname, style: composeStyles(ui, style), "data-testid": "yr3Divider", children: text2 && /* @__PURE__ */ jsx16("span", { className: "yr3Divider--text", "data-testid": "yr3Divider-text", children: text2 }) });
1168
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: classname, style: composeStyles(ui, style), "data-testid": "yr3Divider", children: text2 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "yr3Divider--text", "data-testid": "yr3Divider-text", children: text2 }) });
1114
1169
  };
1115
1170
 
1116
1171
  // src/components/Drawer/Drawer.tsx
1117
- import * as React8 from "react";
1172
+ var React8 = __toESM(require("react"), 1);
1118
1173
 
1119
1174
  // src/components/Drawer/DrawerContainer.tsx
1120
- import { jsx as jsx17 } from "react/jsx-runtime";
1175
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1121
1176
  var DrawerContainer = ({ children, ui, style, props, onClose }) => {
1122
1177
  const { hide } = useBackdrop();
1123
1178
  const handleClose = () => {
@@ -1127,14 +1182,14 @@ var DrawerContainer = ({ children, ui, style, props, onClose }) => {
1127
1182
  }
1128
1183
  return;
1129
1184
  };
1130
- return /* @__PURE__ */ jsx17("div", { className: "yr3Drawer--container", style: composeStyles(ui, style), onClick: handleClose, "data-testid": "yr3Drawer-container", children });
1185
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "yr3Drawer--container", style: composeStyles(ui, style), onClick: handleClose, "data-testid": "yr3Drawer-container", children });
1131
1186
  };
1132
1187
  var DrawerContainer_default = DrawerContainer;
1133
1188
 
1134
1189
  // src/hooks/useClickAway.ts
1135
- import { useEffect as useEffect3 } from "react";
1190
+ var import_react = require("react");
1136
1191
  var useClickAway = (ref, callback) => {
1137
- useEffect3(() => {
1192
+ (0, import_react.useEffect)(() => {
1138
1193
  const handleClick = (e) => {
1139
1194
  if (!ref.current || ref.current.contains(e.target)) return;
1140
1195
  callback();
@@ -1147,7 +1202,7 @@ var useClickAway = (ref, callback) => {
1147
1202
  };
1148
1203
 
1149
1204
  // src/components/Drawer/Drawer.tsx
1150
- import { jsx as jsx18 } from "react/jsx-runtime";
1205
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1151
1206
  var Drawer = ({ open, anchor = null, onClose, children, propsComponent }) => {
1152
1207
  const { show, hide } = useBackdrop();
1153
1208
  const ref = React8.useRef(null);
@@ -1170,7 +1225,7 @@ var Drawer = ({ open, anchor = null, onClose, children, propsComponent }) => {
1170
1225
  onClose();
1171
1226
  }
1172
1227
  }, [propsComponent?.onClose]);
1173
- return /* @__PURE__ */ jsx18(
1228
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1174
1229
  "div",
1175
1230
  {
1176
1231
  className: `yr3Drawer ${anchor && `yr3Drawer--${anchor}`} ${open && "yr3Drawer--open"}`,
@@ -1178,13 +1233,13 @@ var Drawer = ({ open, anchor = null, onClose, children, propsComponent }) => {
1178
1233
  onClick: (e) => e.stopPropagation(),
1179
1234
  ref,
1180
1235
  "data-testid": "yr3Drawer",
1181
- children: /* @__PURE__ */ jsx18(
1236
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1182
1237
  DrawerContainer_default,
1183
1238
  {
1184
1239
  children,
1185
1240
  ...propsComponent?.container,
1186
1241
  props: propsComponent?.closing,
1187
- onClose: () => propsComponent?.closing === "container" ? onClose() : console.log("closing null")
1242
+ onClose: () => propsComponent?.closing === "container" ? onClose() : {}
1188
1243
  }
1189
1244
  )
1190
1245
  },
@@ -1193,8 +1248,8 @@ var Drawer = ({ open, anchor = null, onClose, children, propsComponent }) => {
1193
1248
  };
1194
1249
 
1195
1250
  // src/components/Fade/Fade.tsx
1196
- import * as React9 from "react";
1197
- import { jsx as jsx19 } from "react/jsx-runtime";
1251
+ var React9 = __toESM(require("react"), 1);
1252
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1198
1253
  var Fade = ({
1199
1254
  in: inProp,
1200
1255
  children,
@@ -1211,7 +1266,7 @@ var Fade = ({
1211
1266
  }
1212
1267
  return () => clearTimeout(timeoutId);
1213
1268
  }, [inProp, duration, onTransitionEnd]);
1214
- return /* @__PURE__ */ jsx19(
1269
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1215
1270
  "div",
1216
1271
  {
1217
1272
  className: `yr3Fade ${inProp ? "yr3Fade--in" : ""}`,
@@ -1222,8 +1277,107 @@ var Fade = ({
1222
1277
  );
1223
1278
  };
1224
1279
 
1280
+ // src/components/Flex/flex.variants.ts
1281
+ var flexVariants = createVariants({
1282
+ base: "yr3Flex",
1283
+ variants: {
1284
+ variant: {
1285
+ row: "yr3Flex--row",
1286
+ column: "yr3Flex--column",
1287
+ wrap: "yr3Flex--wrap"
1288
+ },
1289
+ container: {
1290
+ true: "yr3Flex--container"
1291
+ },
1292
+ center: {
1293
+ true: "yr3Flex--center"
1294
+ },
1295
+ between: {
1296
+ true: "yr3Flex--between"
1297
+ },
1298
+ bordered: {
1299
+ true: "yr3Flex--bordered"
1300
+ }
1301
+ }
1302
+ });
1303
+ var flex_variants_default = flexVariants;
1304
+
1305
+ // src/components/Flex/Flex.tsx
1306
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1307
+ var Flex = ({
1308
+ container = false,
1309
+ spacing: spacing2 = 1,
1310
+ children,
1311
+ ui,
1312
+ gap,
1313
+ variant = "column",
1314
+ center = false,
1315
+ between = false,
1316
+ style,
1317
+ bordered = false,
1318
+ ...props
1319
+ }) => {
1320
+ const classes = flex_variants_default({ variant, container, center, between, bordered, spacing: spacing2 });
1321
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1322
+ "div",
1323
+ {
1324
+ className: classes,
1325
+ style: composeStyles(ui, style),
1326
+ ...props,
1327
+ "data-testid": "yr3Flex",
1328
+ children
1329
+ }
1330
+ );
1331
+ };
1332
+
1333
+ // src/components/Grid/Grid.tsx
1334
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1335
+ var Grid = ({
1336
+ container = false,
1337
+ spacing: spacing2 = 0,
1338
+ children,
1339
+ columns = 12,
1340
+ span = 1,
1341
+ ui,
1342
+ style,
1343
+ item = false,
1344
+ size = 0,
1345
+ center = false,
1346
+ ...props
1347
+ }) => {
1348
+ if (item) {
1349
+ columns = 0;
1350
+ }
1351
+ if (container) {
1352
+ columns = 0;
1353
+ ui = {
1354
+ ...ui,
1355
+ gridTemplateColumns: `repeat(${columns}, 1fr)`
1356
+ };
1357
+ }
1358
+ if (center) {
1359
+ ui = {
1360
+ ...ui,
1361
+ justifyContent: "center",
1362
+ alignItems: "center"
1363
+ };
1364
+ }
1365
+ const classes = bem("yr3Grid");
1366
+ const className = classes(void 0, { container, [`spacing-${spacing2}`]: center, span: item && `Col-${size}` });
1367
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1368
+ "div",
1369
+ {
1370
+ className,
1371
+ style: composeStyles(ui, style),
1372
+ "data-testid": "yr3Grid",
1373
+ ...props,
1374
+ children
1375
+ }
1376
+ );
1377
+ };
1378
+
1225
1379
  // src/components/Group/Group.tsx
1226
- import * as React10 from "react";
1380
+ var React10 = __toESM(require("react"), 1);
1227
1381
 
1228
1382
  // src/components/Group/group.variants.ts
1229
1383
  var groupVariants = createVariants({
@@ -1249,7 +1403,7 @@ var groupVariants = createVariants({
1249
1403
  });
1250
1404
 
1251
1405
  // src/components/Group/Group.tsx
1252
- import { jsx as jsx20 } from "react/jsx-runtime";
1406
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1253
1407
  var initialComponents = {
1254
1408
  group: {
1255
1409
  ui: {},
@@ -1276,13 +1430,13 @@ var Group = ({
1276
1430
  }
1277
1431
  }, [value, isControlled]);
1278
1432
  const classItems = bem("yr3Group--item");
1279
- return /* @__PURE__ */ jsx20(
1433
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1280
1434
  "div",
1281
1435
  {
1282
1436
  className: groupVariants({ variant, color }),
1283
1437
  "data-testid": "yr3Group",
1284
1438
  style: composeStyles(propsComponent.group?.ui, propsComponent.group?.style),
1285
- children: options.map((opt) => /* @__PURE__ */ jsx20(
1439
+ children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1286
1440
  "div",
1287
1441
  {
1288
1442
  "data-testid": "yr3Group-item",
@@ -1298,14 +1452,14 @@ var Group = ({
1298
1452
  };
1299
1453
 
1300
1454
  // src/components/Image/Image.tsx
1301
- import { jsx as jsx21 } from "react/jsx-runtime";
1455
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1302
1456
  var Image = ({
1303
1457
  src,
1304
1458
  alt = "",
1305
1459
  ui,
1306
1460
  style
1307
1461
  }) => {
1308
- return /* @__PURE__ */ jsx21(
1462
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1309
1463
  "img",
1310
1464
  {
1311
1465
  src,
@@ -1317,16 +1471,72 @@ var Image = ({
1317
1471
  );
1318
1472
  };
1319
1473
 
1474
+ // src/components/ImageDropzone/ImageDropzone.tsx
1475
+ var React11 = __toESM(require("react"), 1);
1476
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1477
+ var ImageDropzone = ({ onChange, multiple, ui, style, propsComponent, bordered, component, defaultImage, variant = "outlined" }) => {
1478
+ const [dragging, setDragging] = React11.useState(false);
1479
+ const [files, setFiles] = React11.useState([]);
1480
+ const inputRef = React11.useRef(null);
1481
+ const handleFiles = (fileList) => {
1482
+ if (!fileList) return;
1483
+ const newFiles = Array.from(fileList);
1484
+ setFiles((prev) => {
1485
+ const updated = multiple ? [...prev, ...newFiles] : newFiles;
1486
+ onChange?.(updated);
1487
+ return updated;
1488
+ });
1489
+ };
1490
+ const classes = bem("yr3Dropzone");
1491
+ const classComponent = classes(void 0, { "dragging": !!dragging, "bordered": !!bordered, variant });
1492
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Box, { as: "div", position: "relative", content: "center", ...propsComponent?.box, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1493
+ "div",
1494
+ {
1495
+ className: classComponent,
1496
+ onDragOver: (e) => {
1497
+ e.preventDefault();
1498
+ setDragging(true);
1499
+ },
1500
+ onDragLeave: () => setDragging(false),
1501
+ onDrop: (e) => {
1502
+ e.preventDefault();
1503
+ setDragging(false);
1504
+ handleFiles(e.dataTransfer.files);
1505
+ },
1506
+ onClick: () => inputRef.current?.click(),
1507
+ style: composeStyles(ui, style),
1508
+ children: [
1509
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1510
+ "input",
1511
+ {
1512
+ ref: inputRef,
1513
+ type: "file",
1514
+ hidden: true,
1515
+ multiple,
1516
+ accept: "image/*",
1517
+ onChange: (e) => handleFiles(e.target.files)
1518
+ }
1519
+ ),
1520
+ isEmpty(files) && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--content", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text, { variant: "helper", color: "disabled", ...propsComponent?.text, children: propsComponent?.text?.primary || "Drag and drop an image here, or click to select one" }) }),
1521
+ multiple && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--previews", children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: URL.createObjectURL(file) }, i)) }),
1522
+ !multiple && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--preview", children: files.map((file, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: URL.createObjectURL(file) }, i)) }),
1523
+ !!defaultImage && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "yr3Dropzone--preview", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: defaultImage }) }),
1524
+ component
1525
+ ]
1526
+ }
1527
+ ) });
1528
+ };
1529
+
1320
1530
  // src/components/Input/Input.tsx
1321
- import * as React11 from "react";
1531
+ var React12 = __toESM(require("react"), 1);
1322
1532
 
1323
1533
  // src/components/Label/Label.tsx
1324
- import { jsx as jsx22 } from "react/jsx-runtime";
1534
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1325
1535
  var Label = ({ text: text2, children, className, color = "primary", ui, style }) => {
1326
1536
  const classes = bem("yr3Label");
1327
1537
  const classComponent = classes(void 0, { color: `color-${color}` });
1328
1538
  const classnames = bemMerge(classComponent, className);
1329
- return /* @__PURE__ */ jsx22(
1539
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1330
1540
  "span",
1331
1541
  {
1332
1542
  className: classnames,
@@ -1378,7 +1588,7 @@ var inputVariants = createVariants({
1378
1588
  });
1379
1589
 
1380
1590
  // src/components/Input/Input.tsx
1381
- import { jsx as jsx23, jsxs as jsxs5 } from "react/jsx-runtime";
1591
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1382
1592
  var initiaPropsComponent = {
1383
1593
  label: {
1384
1594
  display: true,
@@ -1386,7 +1596,7 @@ var initiaPropsComponent = {
1386
1596
  style: {}
1387
1597
  }
1388
1598
  };
1389
- var Input = React11.forwardRef(
1599
+ var Input = React12.forwardRef(
1390
1600
  ({
1391
1601
  label,
1392
1602
  value,
@@ -1401,9 +1611,9 @@ var Input = React11.forwardRef(
1401
1611
  color = "primary",
1402
1612
  ...props
1403
1613
  }, ref) => {
1404
- const [focused, setFocused] = React11.useState(false);
1405
- const [internalValue, setInternalValue] = React11.useState(defaultValue);
1406
- const [internalError, setInternalError] = React11.useState(null);
1614
+ const [focused, setFocused] = React12.useState(false);
1615
+ const [internalValue, setInternalValue] = React12.useState(defaultValue);
1616
+ const [internalError, setInternalError] = React12.useState(null);
1407
1617
  const isControlled = value !== void 0;
1408
1618
  const currentValue = isControlled ? value : internalValue;
1409
1619
  const isActive = focused || !!currentValue;
@@ -1433,8 +1643,8 @@ var Input = React11.forwardRef(
1433
1643
  onChange?.(e, newValue);
1434
1644
  };
1435
1645
  const classes = inputVariants({ color, label: propsComponent?.label?.display });
1436
- return /* @__PURE__ */ jsxs5(Control, { variant, color, label: propsComponent?.label?.display, children: [
1437
- propsComponent?.label?.display && /* @__PURE__ */ jsx23(
1646
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Control, { variant, color, label: propsComponent?.label?.display, children: [
1647
+ propsComponent?.label?.display && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1438
1648
  Label,
1439
1649
  {
1440
1650
  text: label || "",
@@ -1443,7 +1653,7 @@ var Input = React11.forwardRef(
1443
1653
  ...propsComponent.label
1444
1654
  }
1445
1655
  ),
1446
- /* @__PURE__ */ jsx23(
1656
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1447
1657
  "input",
1448
1658
  {
1449
1659
  ref,
@@ -1459,36 +1669,36 @@ var Input = React11.forwardRef(
1459
1669
  "data-testid": "yr3Input"
1460
1670
  }
1461
1671
  ),
1462
- /* @__PURE__ */ jsx23(Text, { variant: "helper", "data-testid": "yr3Input-helper", children: error || internalError || "" })
1672
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { variant: "helper", "data-testid": "yr3Input-helper", children: error || internalError || "" })
1463
1673
  ] });
1464
1674
  }
1465
1675
  );
1466
1676
 
1467
1677
  // src/components/Input/InputPhone.tsx
1468
- import * as React14 from "react";
1678
+ var React15 = __toESM(require("react"), 1);
1469
1679
 
1470
1680
  // src/components/Select/Selector.tsx
1471
- import * as React12 from "react";
1681
+ var React13 = __toESM(require("react"), 1);
1472
1682
 
1473
1683
  // src/Icons/IconDown.tsx
1474
- import { jsx as jsx24 } from "react/jsx-runtime";
1684
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1475
1685
  var IconDown = (props) => {
1476
- return /* @__PURE__ */ jsx24("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "yr3Icons", children: /* @__PURE__ */ jsx24("path", { d: "M7 10L12 15L17 10", stroke: props.stroke || "#fff", strokeWidth: props.strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1686
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "yr3Icons", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { d: "M7 10L12 15L17 10", stroke: props.stroke || "#fff", strokeWidth: props.strokeWidth || "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1477
1687
  };
1478
1688
 
1479
1689
  // src/components/Select/Selector.tsx
1480
- import { jsx as jsx25, jsxs as jsxs6 } from "react/jsx-runtime";
1690
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1481
1691
  var Selector = ({ ui, style, options, name, value, defaultValue, onChange, iconColor, icon }) => {
1482
- const [open, setOpen] = React12.useState(false);
1483
- const [valueState, setValueState] = React12.useState(value || defaultValue || null);
1484
- const ref = React12.useRef(null);
1692
+ const [open, setOpen] = React13.useState(false);
1693
+ const [valueState, setValueState] = React13.useState(value || defaultValue || null);
1694
+ const ref = React13.useRef(null);
1485
1695
  useClickAway(ref, () => setOpen(false));
1486
- return /* @__PURE__ */ jsxs6("div", { className: "yr3Selector-wrapper", ref, children: [
1487
- /* @__PURE__ */ jsx25("div", { className: `yr3Selector ${open ? "yr3Selector--open" : ""}`, style: composeStyles(ui, style), children: /* @__PURE__ */ jsxs6("div", { className: "yr3Selector--control", children: [
1488
- /* @__PURE__ */ jsx25("div", { className: "yr3Selector--icon", onClick: () => setOpen((prev) => !prev), children: icon ? icon : /* @__PURE__ */ jsx25(IconDown, { stroke: `var(--color-${iconColor || "disabled"})`, width: 24, height: 24 }) }),
1696
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "yr3Selector-wrapper", ref, children: [
1697
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: `yr3Selector ${open ? "yr3Selector--open" : ""}`, style: composeStyles(ui, style), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "yr3Selector--control", children: [
1698
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "yr3Selector--icon", onClick: () => setOpen((prev) => !prev), children: icon ? icon : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconDown, { stroke: `var(--color-${iconColor || "disabled"})`, width: 24, height: 24 }) }),
1489
1699
  valueState
1490
1700
  ] }) }),
1491
- open && /* @__PURE__ */ jsx25("div", { className: "yr3Select--menu", children: options.map((opt) => /* @__PURE__ */ jsx25(
1701
+ open && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "yr3Select--menu", children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1492
1702
  "div",
1493
1703
  {
1494
1704
  className: "yr3Select--option",
@@ -1518,19 +1728,19 @@ var Selector = ({ ui, style, options, name, value, defaultValue, onChange, iconC
1518
1728
  var Selector_default = Selector;
1519
1729
 
1520
1730
  // src/theme/ThemeProvider.tsx
1521
- import * as React13 from "react";
1522
- import { jsx as jsx26 } from "react/jsx-runtime";
1523
- var ThemeContext = React13.createContext(null);
1731
+ var React14 = __toESM(require("react"), 1);
1732
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1733
+ var ThemeContext = React14.createContext(null);
1524
1734
  var ThemeProvider = ({ theme, children }) => {
1525
- React13.useEffect(() => {
1735
+ React14.useEffect(() => {
1526
1736
  applyTheme(theme);
1527
1737
  }, [theme]);
1528
- return /* @__PURE__ */ jsx26(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ jsx26(BackdropProvider, { children }) });
1738
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(BackdropProvider, { children }) });
1529
1739
  };
1530
- var useTheme = () => React13.useContext(ThemeContext);
1740
+ var useTheme = () => React14.useContext(ThemeContext);
1531
1741
 
1532
1742
  // src/components/Input/InputPhone.tsx
1533
- import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
1743
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1534
1744
  var Phone = ({
1535
1745
  name,
1536
1746
  value,
@@ -1540,8 +1750,8 @@ var Phone = ({
1540
1750
  countries = [],
1541
1751
  propsComponent
1542
1752
  }) => {
1543
- const [prefixValue, setPrefixValue] = React14.useState(prefix);
1544
- const [number, setNumber] = React14.useState(Number(value) || null);
1753
+ const [prefixValue, setPrefixValue] = React15.useState(prefix);
1754
+ const [number, setNumber] = React15.useState(Number(value) || null);
1545
1755
  const theme = useTheme();
1546
1756
  const handleChange = (newPrefix, newNumber) => {
1547
1757
  const full = `${newPrefix}${newNumber.toString()}`;
@@ -1553,10 +1763,10 @@ var Phone = ({
1553
1763
  };
1554
1764
  onChange?.(event, full);
1555
1765
  };
1556
- return /* @__PURE__ */ jsxs7(Control, { variant: "outlined", children: [
1557
- /* @__PURE__ */ jsx27(Label, { text: label, className: "yr3Input--active" }),
1558
- /* @__PURE__ */ jsx27("div", { className: "yr3PhoneInput", "data-testid": "yr3Phone", children: /* @__PURE__ */ jsxs7(Flex, { variant: "row", container: true, center: true, children: [
1559
- /* @__PURE__ */ jsx27(
1766
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Control, { variant: "outlined", children: [
1767
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Label, { text: label, className: "yr3Input--active" }),
1768
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "yr3PhoneInput", "data-testid": "yr3Phone", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Flex, { variant: "row", container: true, center: true, children: [
1769
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1560
1770
  Selector_default,
1561
1771
  {
1562
1772
  options: countries.map((c) => ({
@@ -1576,8 +1786,8 @@ var Phone = ({
1576
1786
  style: propsComponent?.selector?.style
1577
1787
  }
1578
1788
  ),
1579
- /* @__PURE__ */ jsx27(Divider, { orientation: "vertical", ...propsComponent?.divider }),
1580
- /* @__PURE__ */ jsx27(
1789
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Divider, { orientation: "vertical", ...propsComponent?.divider }),
1790
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1581
1791
  Input,
1582
1792
  {
1583
1793
  type: "phone",
@@ -1594,27 +1804,127 @@ var Phone = ({
1594
1804
  ] });
1595
1805
  };
1596
1806
 
1597
- // src/components/Input/InputPlaces.tsx
1598
- import * as React15 from "react";
1599
- import { useAutocompletePlaces } from "@yr3/autocomplete-places";
1600
- import { jsx as jsx28, jsxs as jsxs8 } from "react/jsx-runtime";
1807
+ // src/components/InputArea/InputArea.tsx
1808
+ var React16 = __toESM(require("react"), 1);
1809
+
1810
+ // src/components/InputArea/inputAreaVariants.ts
1811
+ var inputAreaVariants = createVariants({
1812
+ base: "yr3InputArea",
1813
+ variants: {
1814
+ variant: {
1815
+ filled: "yr3InputArea--filled",
1816
+ outlined: "yr3InputArea--outlined",
1817
+ base: "yr3InputArea--base",
1818
+ lined: "yr3InputArea--lined"
1819
+ },
1820
+ color: {
1821
+ primary: "yr3InputArea--color-primary",
1822
+ secondary: "yr3InputArea--color-secondary",
1823
+ success: "yr3InputArea--color-success",
1824
+ text: "yr3InputArea--color-text",
1825
+ disabled: "yr3InputArea--color-disabled"
1826
+ },
1827
+ size: {
1828
+ auto: "yr3InputArea--size-auto",
1829
+ full: "yr3InputArea--size-full"
1830
+ },
1831
+ rounded: {
1832
+ true: "yr3InputArea--rounded"
1833
+ },
1834
+ disabled: {
1835
+ true: "yr3InputArea--disabled"
1836
+ },
1837
+ animated: {
1838
+ true: "yr3InputArea--animated"
1839
+ }
1840
+ }
1841
+ });
1842
+
1843
+ // src/components/InputArea/InputArea.tsx
1844
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1845
+ var initiaPropsComponent2 = {
1846
+ label: {
1847
+ display: true,
1848
+ ui: {},
1849
+ style: {}
1850
+ },
1851
+ helperText: ""
1852
+ };
1853
+ var InputArea = ({
1854
+ value,
1855
+ defaultValue = "",
1856
+ onChange,
1857
+ rows = 1,
1858
+ ui,
1859
+ style,
1860
+ label,
1861
+ validate,
1862
+ color = "primary",
1863
+ maxLength = 0,
1864
+ resize = "vertical",
1865
+ variant = "outlined",
1866
+ rounded = false,
1867
+ propsComponent = initiaPropsComponent2
1868
+ }) => {
1869
+ const ref = React16.useRef(null);
1870
+ const [internalValue, setInternalValue] = React16.useState(defaultValue);
1871
+ const isControlled = value !== void 0;
1872
+ const currentValue = isControlled ? value : internalValue;
1873
+ const handleChange = (e) => {
1874
+ const newValue = e.target.value;
1875
+ if (!isControlled) {
1876
+ setInternalValue(newValue);
1877
+ }
1878
+ onChange?.(e, newValue);
1879
+ };
1880
+ const el = ref.current;
1881
+ if (el) {
1882
+ el.style.height = "auto";
1883
+ el.style.height = el.scrollHeight + "px";
1884
+ el.style.resize = resize;
1885
+ }
1886
+ const classes = inputAreaVariants({ variant, color, rounded });
1887
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { position: "relative" }, children: [
1888
+ propsComponent?.label?.display && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1889
+ Label,
1890
+ {
1891
+ text: label || "",
1892
+ className: "yr3Input--active",
1893
+ ...propsComponent.label
1894
+ }
1895
+ ),
1896
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1897
+ "textarea",
1898
+ {
1899
+ className: classes,
1900
+ ref,
1901
+ value: currentValue,
1902
+ rows,
1903
+ onChange: handleChange,
1904
+ style: composeStyles(ui, style),
1905
+ "data-testid": "yr3InputArea"
1906
+ }
1907
+ ),
1908
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { variant: "helper", color: currentValue.length > maxLength ? "error" : "disabled", ui: { textAlign: "right" }, "data-testid": "yr3InputAreaError", children: validate && maxLength ? `${currentValue.length}/${maxLength}` || propsComponent.helperText : "" })
1909
+ ] });
1910
+ };
1601
1911
 
1602
1912
  // src/components/Modal/Modal.tsx
1603
- import * as React16 from "react";
1913
+ var React17 = __toESM(require("react"), 1);
1604
1914
 
1605
1915
  // src/components/Modal/ModalContainer.tsx
1606
- import { jsx as jsx29 } from "react/jsx-runtime";
1916
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1607
1917
  var ModalContainer = ({ children, size = "sm", ui, style }) => {
1608
1918
  const classes = bem("yr3Modal-container");
1609
1919
  const classComponent = classes(void 0, { [`${size}`]: !!size });
1610
- return /* @__PURE__ */ jsx29("div", { className: classComponent, style: composeStyles(ui, style), "data-testid": "yr3Modal-container", children });
1920
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: classComponent, style: composeStyles(ui, style), "data-testid": "yr3Modal-container", children });
1611
1921
  };
1612
1922
 
1613
1923
  // src/components/Modal/Modal.tsx
1614
- import { jsx as jsx30, jsxs as jsxs9 } from "react/jsx-runtime";
1924
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1615
1925
  var Modal = ({ open, onClose, children, propsComponent }) => {
1616
1926
  const { show, hide } = useBackdrop();
1617
- React16.useEffect(() => {
1927
+ React17.useEffect(() => {
1618
1928
  if (open) {
1619
1929
  show();
1620
1930
  } else {
@@ -1623,9 +1933,9 @@ var Modal = ({ open, onClose, children, propsComponent }) => {
1623
1933
  }, [open, show]);
1624
1934
  const classes = bem("yr3Modal");
1625
1935
  const classComponent = classes(void 0, { "open": !!open });
1626
- return /* @__PURE__ */ jsx30("div", { className: classComponent, onClick: (e) => e.stopPropagation(), "data-testid": "yr3Modal", children: /* @__PURE__ */ jsx30(ModalContainer, { ...propsComponent?.container, children: /* @__PURE__ */ jsxs9(Flex, { variant: "column", container: true, center: true, gap: 1, children: [
1936
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: classComponent, onClick: (e) => e.stopPropagation(), "data-testid": "yr3Modal", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ModalContainer, { ...propsComponent?.container, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Flex, { variant: "column", container: true, center: true, gap: 1, children: [
1627
1937
  children,
1628
- propsComponent?.close ? propsComponent.close : /* @__PURE__ */ jsx30(Button, { variant: "filled", color: "secondary", onClick: onClose, "data-testid": "yr3Modal-close", children: "Close" })
1938
+ propsComponent?.close ? propsComponent.close : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { variant: "filled", color: "secondary", onClick: onClose, "data-testid": "yr3Modal-close", children: "Close" })
1629
1939
  ] }) }) });
1630
1940
  };
1631
1941
 
@@ -1665,15 +1975,15 @@ var notistackVariants = createVariants({
1665
1975
  });
1666
1976
 
1667
1977
  // src/components/Notistack/Notistack.tsx
1668
- import { jsx as jsx31, jsxs as jsxs10 } from "react/jsx-runtime";
1978
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1669
1979
  var Notistack = ({ message, duration = 3e3, variant = "info", color, propsComponent, anchor, exiting = false }) => {
1670
1980
  const classes = notistackVariants({ type: variant, color, exiting, direction: `${anchor?.vertical || "bottom"}-${anchor?.horizontal || "right"}` });
1671
1981
  const containerStyle = composeStyles(propsComponent?.container?.ui, propsComponent?.container?.style);
1672
1982
  const notistackStyle = composeStyles(propsComponent?.notistack?.ui, propsComponent?.notistack?.style);
1673
1983
  const progressStyle = composeStyles(propsComponent?.progress?.ui, propsComponent?.progress?.style);
1674
- return /* @__PURE__ */ jsxs10("div", { className: classes, "data-testid": "yr3Notistack", style: notistackStyle, children: [
1675
- /* @__PURE__ */ jsx31("span", { style: containerStyle, children: message }),
1676
- /* @__PURE__ */ jsx31(
1984
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: classes, "data-testid": "yr3Notistack", style: notistackStyle, children: [
1985
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { style: containerStyle, children: message }),
1986
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1677
1987
  "div",
1678
1988
  {
1679
1989
  className: "yr3Notistack--progress",
@@ -1707,7 +2017,7 @@ var pendingVariants = createVariants({
1707
2017
  });
1708
2018
 
1709
2019
  // src/components/Pending/Pending.tsx
1710
- import { jsx as jsx32 } from "react/jsx-runtime";
2020
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1711
2021
  var Pending = ({
1712
2022
  variant,
1713
2023
  width,
@@ -1720,7 +2030,7 @@ var Pending = ({
1720
2030
  const widthStyle = variant === "circle" ? size : width;
1721
2031
  const heightStyle = variant === "circle" ? size : height;
1722
2032
  const uiStylePending = uiStyle({ width: widthStyle, height: heightStyle, ...ui });
1723
- return /* @__PURE__ */ jsx32(
2033
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1724
2034
  "div",
1725
2035
  {
1726
2036
  className: pendingVariants({ variant, color }),
@@ -1749,7 +2059,7 @@ var radioVariant = createVariants({
1749
2059
  });
1750
2060
 
1751
2061
  // src/components/Radio/Radio.tsx
1752
- import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
2062
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1753
2063
  var Radio = ({
1754
2064
  checked,
1755
2065
  value,
@@ -1765,8 +2075,8 @@ var Radio = ({
1765
2075
  const bemClass = bem("yr3Radio");
1766
2076
  const classes = bemClass(void 0, { [color]: `color-${color}` });
1767
2077
  const variantClass = radioVariant({ variant });
1768
- return /* @__PURE__ */ jsxs11("label", { className: classes, "data-testid": "yr3Radio", style: composeStyles(propsComponent?.radio?.ui, propsComponent?.radio?.style), children: [
1769
- /* @__PURE__ */ jsx33(
2078
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: classes, "data-testid": "yr3Radio", style: composeStyles(propsComponent?.radio?.ui, propsComponent?.radio?.style), children: [
2079
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1770
2080
  "input",
1771
2081
  {
1772
2082
  type: "radio",
@@ -1778,8 +2088,8 @@ var Radio = ({
1778
2088
  }
1779
2089
  ),
1780
2090
  iconChecked && checked ? iconChecked : !checked && iconUnchecked ? iconUnchecked : null,
1781
- !iconChecked && !iconUnchecked && /* @__PURE__ */ jsx33("span", { className: variantClass, "data-testid": "yr3Radio-dot" }),
1782
- typeof label === "string" && /* @__PURE__ */ jsx33(
2091
+ !iconChecked && !iconUnchecked && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: variantClass, "data-testid": "yr3Radio-dot" }),
2092
+ typeof label === "string" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1783
2093
  "span",
1784
2094
  {
1785
2095
  className: "yr3Radio--label",
@@ -1792,15 +2102,15 @@ var Radio = ({
1792
2102
  };
1793
2103
 
1794
2104
  // src/components/Select/Select.tsx
1795
- import * as React17 from "react";
1796
- import { jsx as jsx34, jsxs as jsxs12 } from "react/jsx-runtime";
2105
+ var React18 = __toESM(require("react"), 1);
2106
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1797
2107
  var Select = ({ label, options, name, value, defaultValue, onChange, propsComponent }) => {
1798
- const [open, setOpen] = React17.useState(false);
1799
- const [valueState, setValueState] = React17.useState(value || defaultValue || null);
1800
- const ref = React17.useRef(null);
2108
+ const [open, setOpen] = React18.useState(false);
2109
+ const [valueState, setValueState] = React18.useState(value || defaultValue || null);
2110
+ const ref = React18.useRef(null);
1801
2111
  useClickAway(ref, () => setOpen(false));
1802
- return /* @__PURE__ */ jsxs12(Control, { ...propsComponent?.control, children: [
1803
- /* @__PURE__ */ jsx34(
2112
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Control, { ...propsComponent?.control, children: [
2113
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1804
2114
  Label,
1805
2115
  {
1806
2116
  ...propsComponent?.label,
@@ -1808,10 +2118,10 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
1808
2118
  className: open || valueState ? "yr3Input--active" : ""
1809
2119
  }
1810
2120
  ),
1811
- /* @__PURE__ */ jsxs12("div", { className: "yr3Select-wrapper", ref, children: [
1812
- /* @__PURE__ */ jsxs12("div", { className: `yr3Select ${open ? "yr3Select--open" : ""}`, "data-testid": "yr3Select-wrapper", style: composeStyles(propsComponent?.wrapper?.ui, propsComponent?.wrapper?.style), children: [
1813
- /* @__PURE__ */ jsx34("div", { className: "yr3Select--control", children: valueState }),
1814
- /* @__PURE__ */ jsx34("div", { className: "yr3Select--icon", onClick: () => setOpen((prev) => !prev), "data-testid": "yr3Select-icon", children: propsComponent?.icon?.component ? propsComponent.icon.component : /* @__PURE__ */ jsx34(
2121
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "yr3Select-wrapper", ref, children: [
2122
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: `yr3Select ${open ? "yr3Select--open" : ""}`, "data-testid": "yr3Select-wrapper", style: composeStyles(propsComponent?.wrapper?.ui, propsComponent?.wrapper?.style), children: [
2123
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "yr3Select--control", children: valueState }),
2124
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "yr3Select--icon", onClick: () => setOpen((prev) => !prev), "data-testid": "yr3Select-icon", children: propsComponent?.icon?.component ? propsComponent.icon.component : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1815
2125
  IconDown,
1816
2126
  {
1817
2127
  width: propsComponent?.icon?.style?.width || 26,
@@ -1821,13 +2131,13 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
1821
2131
  }
1822
2132
  ) })
1823
2133
  ] }),
1824
- open && /* @__PURE__ */ jsx34(
2134
+ open && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1825
2135
  "div",
1826
2136
  {
1827
2137
  className: "yr3Select--menu",
1828
2138
  style: composeStyles(propsComponent?.menu?.ui, propsComponent?.menu?.style),
1829
2139
  "data-testid": "yr3Select-menu",
1830
- children: options.map((opt) => /* @__PURE__ */ jsx34(
2140
+ children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1831
2141
  "div",
1832
2142
  {
1833
2143
  className: "yr3Select--option",
@@ -1859,8 +2169,8 @@ var Select = ({ label, options, name, value, defaultValue, onChange, propsCompon
1859
2169
  };
1860
2170
 
1861
2171
  // src/components/Slide/Slide.tsx
1862
- import * as React18 from "react";
1863
- import { jsx as jsx35 } from "react/jsx-runtime";
2172
+ var React19 = __toESM(require("react"), 1);
2173
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1864
2174
  var Slide = ({
1865
2175
  in: inProp,
1866
2176
  children,
@@ -1874,7 +2184,7 @@ var Slide = ({
1874
2184
  [direction]: true,
1875
2185
  "in": !!inProp
1876
2186
  });
1877
- React18.useEffect(() => {
2187
+ React19.useEffect(() => {
1878
2188
  let timeoutId;
1879
2189
  if (inProp) {
1880
2190
  timeoutId = setTimeout(() => {
@@ -1884,19 +2194,19 @@ var Slide = ({
1884
2194
  return () => clearTimeout(timeoutId);
1885
2195
  }, [inProp, duration, onTransitionEnd]);
1886
2196
  const uiStyleContent = uiStyle({ ...propsComponent?.slide?.ui, transitionDuration: `${duration}ms` });
1887
- return /* @__PURE__ */ jsx35(
2197
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1888
2198
  "div",
1889
2199
  {
1890
2200
  className: "yr3Slide",
1891
2201
  style: uiStyle({ position: "relative", zIndex: 4, overflow: "hidden" }),
1892
2202
  "data-testid": "yr3Slide",
1893
- children: /* @__PURE__ */ jsx35(
2203
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1894
2204
  "div",
1895
2205
  {
1896
2206
  className: classNameContent,
1897
2207
  style: composeStyles(uiStyleContent, propsComponent?.slide?.style || {}),
1898
2208
  "data-testid": "yr3Slide-content",
1899
- children: /* @__PURE__ */ jsx35(Box, { ...propsComponent?.box, "data-testid": "yr3Slide-box", children })
2209
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Box, { ...propsComponent?.box, "data-testid": "yr3Slide-box", children })
1900
2210
  }
1901
2211
  )
1902
2212
  }
@@ -1904,7 +2214,7 @@ var Slide = ({
1904
2214
  };
1905
2215
 
1906
2216
  // src/components/Switch/Switch.tsx
1907
- import * as React19 from "react";
2217
+ var React20 = __toESM(require("react"), 1);
1908
2218
 
1909
2219
  // src/components/Switch/switch.variants.ts
1910
2220
  var switchVariants = createVariants({
@@ -1933,7 +2243,7 @@ var switchVariants = createVariants({
1933
2243
  });
1934
2244
 
1935
2245
  // src/components/Switch/Switch.tsx
1936
- import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
2246
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1937
2247
  var Switch = ({
1938
2248
  checked,
1939
2249
  defaultChecked,
@@ -1943,7 +2253,7 @@ var Switch = ({
1943
2253
  size = "sm",
1944
2254
  label
1945
2255
  }) => {
1946
- const [internal, setInternal] = React19.useState(defaultChecked || false);
2256
+ const [internal, setInternal] = React20.useState(defaultChecked || false);
1947
2257
  const classname = switchVariants({ colors: color, size, disabled: !!disabled, checked: checked ?? internal });
1948
2258
  const isControlled = checked !== void 0;
1949
2259
  const value = isControlled ? checked : internal;
@@ -1951,13 +2261,13 @@ var Switch = ({
1951
2261
  if (!isControlled) setInternal(e.target.checked);
1952
2262
  onChange?.(e, e.target.checked);
1953
2263
  };
1954
- return /* @__PURE__ */ jsxs13(
2264
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
1955
2265
  "label",
1956
2266
  {
1957
2267
  className: classname,
1958
2268
  "data-testid": "yr3Switch",
1959
2269
  children: [
1960
- /* @__PURE__ */ jsx36(
2270
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1961
2271
  "input",
1962
2272
  {
1963
2273
  type: "checkbox",
@@ -1966,17 +2276,17 @@ var Switch = ({
1966
2276
  disabled
1967
2277
  }
1968
2278
  ),
1969
- /* @__PURE__ */ jsx36("span", { className: "yr3Switch--track", children: /* @__PURE__ */ jsx36("span", { className: "yr3Switch--thumb" }) }),
1970
- /* @__PURE__ */ jsx36("span", { className: "yr3Switch--label", "data-testid": "yr3Switch-label", children: label })
2279
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "yr3Switch--track", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "yr3Switch--thumb" }) }),
2280
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "yr3Switch--label", "data-testid": "yr3Switch-label", children: label })
1971
2281
  ]
1972
2282
  }
1973
2283
  );
1974
2284
  };
1975
2285
 
1976
2286
  // src/Icons/IconSearch.tsx
1977
- import { jsx as jsx37 } from "react/jsx-runtime";
2287
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1978
2288
  var IconSearch = (props) => {
1979
- return /* @__PURE__ */ jsx37("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx37(
2289
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { width: props.width || "64px", height: props.height || "64px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1980
2290
  "path",
1981
2291
  {
1982
2292
  d: "M15.7955 15.8111L21 21M18 10.5C18 14.6421 14.6421 18 10.5 18C6.35786 18 3 14.6421 3 10.5C3 6.35786 6.35786 3 10.5 3C14.6421 3 18 6.35786 18 10.5Z",
@@ -2007,11 +2317,11 @@ var baseTokens = {
2007
2317
  };
2008
2318
 
2009
2319
  // src/theme/notistackContext.tsx
2010
- import * as React20 from "react";
2011
- import { jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
2012
- var NotistackContext = React20.createContext(null);
2320
+ var React21 = __toESM(require("react"), 1);
2321
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2322
+ var NotistackContext = React21.createContext(null);
2013
2323
  var NotistackProvider = ({ children }) => {
2014
- const [snacks, setSnacks] = React20.useState([]);
2324
+ const [snacks, setSnacks] = React21.useState([]);
2015
2325
  const enqueueNotistack = (snack) => {
2016
2326
  const id = Date.now();
2017
2327
  setSnacks((prev) => [...prev, { ...snack, id, exiting: false }]);
@@ -2026,23 +2336,23 @@ var NotistackProvider = ({ children }) => {
2026
2336
  setSnacks((prev) => prev.filter((s) => s.id !== id));
2027
2337
  }, duration + exitDuration);
2028
2338
  };
2029
- return /* @__PURE__ */ jsxs14(NotistackContext.Provider, { value: { enqueueNotistack }, children: [
2339
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(NotistackContext.Provider, { value: { enqueueNotistack }, children: [
2030
2340
  children,
2031
- /* @__PURE__ */ jsx38("div", { className: "yr3NotistackContainer", children: snacks.map((snack) => /* @__PURE__ */ jsx38(Notistack, { ...snack }, snack.id)) })
2341
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "yr3NotistackContainer", children: snacks.map((snack) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Notistack, { ...snack }, snack.id)) })
2032
2342
  ] });
2033
2343
  };
2034
- var useNotistack = () => React20.useContext(NotistackContext);
2344
+ var useNotistack = () => React21.useContext(NotistackContext);
2035
2345
 
2036
2346
  // src/theme/useMediaQuery.tsx
2037
- import * as React21 from "react";
2347
+ var React22 = __toESM(require("react"), 1);
2038
2348
  function useMediaQuery(query) {
2039
2349
  const theme = useTheme();
2040
2350
  const computedQuery = typeof query === "function" ? query(theme) : query;
2041
- const [matches, setMatches] = React21.useState(() => {
2351
+ const [matches, setMatches] = React22.useState(() => {
2042
2352
  if (typeof window === "undefined") return false;
2043
2353
  return window.matchMedia(computedQuery).matches;
2044
2354
  });
2045
- React21.useEffect(() => {
2355
+ React22.useEffect(() => {
2046
2356
  if (typeof window === "undefined") return;
2047
2357
  const media = window.matchMedia(computedQuery);
2048
2358
  const listener = () => setMatches(media.matches);
@@ -2067,7 +2377,8 @@ function useBreakpointValue(values) {
2067
2377
 
2068
2378
  // src/index.ts
2069
2379
  initTheme();
2070
- export {
2380
+ // Annotate the CommonJS export names for ESM import in node:
2381
+ 0 && (module.exports = {
2071
2382
  Avatar,
2072
2383
  Backdrop,
2073
2384
  BackdropContext,
@@ -2091,7 +2402,9 @@ export {
2091
2402
  IconDown,
2092
2403
  IconSearch,
2093
2404
  Image,
2405
+ ImageDropzone,
2094
2406
  Input,
2407
+ InputArea,
2095
2408
  Label,
2096
2409
  Modal,
2097
2410
  ModalContainer,
@@ -2131,4 +2444,4 @@ export {
2131
2444
  useMediaQuery,
2132
2445
  useNotistack,
2133
2446
  useTheme
2134
- };
2447
+ });