@konstructio/ui 0.1.2-alpha.66 → 0.1.2-alpha.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/AdditionalOptions-C2FDVZhu.js +45 -0
  2. package/dist/{DayPicker-PUEUVAST.js → DayPicker-CaeUXRCF.js} +475 -470
  3. package/dist/{Modal--z642-Wv.js → Modal-mwLmWbnA.js} +23 -20
  4. package/dist/assets/icons/components/CloudLockOutline.d.ts +3 -0
  5. package/dist/assets/icons/components/CloudLockOutline.js +28 -0
  6. package/dist/assets/icons/components/index.d.ts +1 -0
  7. package/dist/assets/icons/components/index.js +106 -104
  8. package/dist/assets/icons/index.js +106 -104
  9. package/dist/components/ButtonGroup/ButtonGroup.js +65 -61
  10. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +6 -0
  11. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +32 -30
  12. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +3 -1
  13. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +4 -1
  14. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +37 -17
  15. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  16. package/dist/components/Datepicker/DatePicker.js +1 -1
  17. package/dist/components/Modal/Modal.js +1 -1
  18. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -2
  19. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +2 -2
  20. package/dist/components/Modal/components/index.js +1 -1
  21. package/dist/components/Select/Select.d.ts +1 -0
  22. package/dist/components/Select/Select.js +54 -40
  23. package/dist/components/Select/Select.types.d.ts +18 -2
  24. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.d.ts +3 -0
  25. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +11 -0
  26. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +4 -0
  27. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.d.ts +1 -0
  28. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +26 -0
  29. package/dist/components/Select/components/List/List.js +131 -132
  30. package/dist/components/Select/components/List/List.types.d.ts +1 -0
  31. package/dist/components/Select/components/List/List.variants.d.ts +1 -0
  32. package/dist/components/Select/components/List/List.variants.js +17 -2
  33. package/dist/components/Select/components/Wrapper.d.ts +3 -1
  34. package/dist/components/Select/components/Wrapper.js +65 -63
  35. package/dist/components/Select/components/index.d.ts +1 -0
  36. package/dist/components/Select/components/index.js +8 -6
  37. package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +5 -0
  38. package/dist/components/VirtualizedTable/VirtualizedTable.js +86 -80
  39. package/dist/components/VirtualizedTable/components/Body/Body.js +51 -49
  40. package/dist/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
  41. package/dist/components/VirtualizedTable/contexts/table.provider.js +69 -67
  42. package/dist/components/VirtualizedTable/events/index.d.ts +3 -3
  43. package/dist/components/VirtualizedTable/events/index.js +22 -16
  44. package/dist/components/index.js +1 -1
  45. package/dist/icons.d.ts +1 -1
  46. package/dist/icons.js +106 -104
  47. package/dist/index.js +1 -1
  48. package/dist/package.json +21 -21
  49. package/dist/styles.css +1 -1
  50. package/package.json +21 -21
@@ -1,83 +1,85 @@
1
1
  import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { useMemo as W } from "react";
2
+ import { useMemo as q } from "react";
3
3
  import { cn as n } from "../../utils/index.js";
4
- import { buttonGroupPillVariants as k, buttonGroupVariants as q, buttonGroupWrapperVariants as z } from "./ButtonGroup.variants.js";
5
- import { useButtonGroup as A } from "./hooks/useButtonGroup.js";
6
- import { ButtonGroupLabel as E } from "./components/ButtonGroupLabel/ButtonGroupLabel.js";
7
- import { m as H } from "../../proxy-BIRlSMN_.js";
8
- import { ButtonGroupItem as J } from "./components/ButtonGroupItem/ButtonGroupItem.js";
9
- import { ButtonGroupMessage as Q } from "./components/ButtonGroupMessage/ButtonGroupMessage.js";
10
- const T = ({
4
+ import { buttonGroupPillVariants as z, buttonGroupVariants as A, buttonGroupWrapperVariants as E } from "./ButtonGroup.variants.js";
5
+ import { useButtonGroup as H } from "./hooks/useButtonGroup.js";
6
+ import { ButtonGroupLabel as J } from "./components/ButtonGroupLabel/ButtonGroupLabel.js";
7
+ import { m as Q } from "../../proxy-BIRlSMN_.js";
8
+ import { ButtonGroupItem as T } from "./components/ButtonGroupItem/ButtonGroupItem.js";
9
+ import { ButtonGroupMessage as U } from "./components/ButtonGroupMessage/ButtonGroupMessage.js";
10
+ const X = ({
11
11
  className: p,
12
12
  contentClassName: f,
13
13
  defaultValue: h,
14
- descriptionClassName: v,
14
+ descriptionAlign: v,
15
+ descriptionClassName: G,
15
16
  disabled: o,
16
17
  duration: l,
17
- error: G,
18
- errorClassName: b,
19
- helperText: N,
20
- helperTextClassName: y,
21
- isRequired: B,
22
- itemClassName: D,
23
- itemLabelClassName: g,
18
+ error: b,
19
+ errorClassName: N,
20
+ helperText: y,
21
+ helperTextClassName: B,
22
+ isRequired: D,
23
+ itemClassName: g,
24
+ itemLabelClassName: x,
24
25
  label: s,
25
- labelClassName: x,
26
- name: w,
26
+ labelAlign: w,
27
+ labelClassName: I,
28
+ name: K,
27
29
  options: t,
28
- pillClassName: I,
29
- requiredClassName: K,
30
- theme: S,
31
- value: V,
32
- wrapperClassName: $,
33
- onValueChange: j
30
+ pillClassName: S,
31
+ requiredClassName: V,
32
+ theme: $,
33
+ value: j,
34
+ wrapperClassName: F,
35
+ onValueChange: L
34
36
  }) => {
35
37
  const {
36
- animationDirection: F,
37
- groupRef: L,
38
+ animationDirection: M,
39
+ groupRef: C,
38
40
  id: m,
39
41
  selected: r,
40
- handleKeyDown: M,
41
- handleSelect: C
42
- } = A({
42
+ handleKeyDown: O,
43
+ handleSelect: P
44
+ } = H({
43
45
  defaultValue: h,
44
46
  disabled: o ?? void 0,
45
47
  options: t,
46
- value: V,
47
- onValueChange: j
48
- }), u = t.length, c = W(
48
+ value: j,
49
+ onValueChange: L
50
+ }), u = t.length, c = q(
49
51
  () => t.findIndex((e) => e.value === r),
50
52
  [t, r]
51
53
  );
52
54
  return /* @__PURE__ */ d(
53
55
  "div",
54
56
  {
55
- className: n(z(), $),
56
- "data-theme": S,
57
+ className: n(E(), F),
58
+ "data-theme": $,
57
59
  children: [
58
60
  s && /* @__PURE__ */ a(
59
- E,
61
+ J,
60
62
  {
61
- className: x,
63
+ className: I,
62
64
  htmlFor: m,
63
- isRequired: B,
65
+ isRequired: D,
64
66
  label: s,
65
- requiredClassName: K
67
+ requiredClassName: V
66
68
  }
67
69
  ),
68
70
  /* @__PURE__ */ d(
69
71
  "div",
70
72
  {
71
- ref: L,
73
+ ref: C,
72
74
  role: "radiogroup",
73
75
  "aria-labelledby": s ? m : void 0,
74
- className: n(q({ disabled: o }), p),
76
+ className: n(A({ disabled: o }), p),
75
77
  children: [
76
78
  c >= 0 && /* @__PURE__ */ a(
77
- H.div,
79
+ Q.div,
78
80
  {
79
81
  "aria-hidden": "true",
80
- className: n(k(), I),
82
+ className: n(z(), S),
81
83
  initial: !1,
82
84
  animate: {
83
85
  left: `calc(${c} * (100% / ${u}) + 8px)`,
@@ -91,26 +93,28 @@ const T = ({
91
93
  }
92
94
  ),
93
95
  t.map((e, i) => {
94
- const O = r === e.value, P = o || e.disabled, R = !!e.description;
96
+ const R = r === e.value, W = o || e.disabled, k = !!e.description;
95
97
  return /* @__PURE__ */ a(
96
- J,
98
+ T,
97
99
  {
98
- animationDirection: F,
99
- className: D,
100
+ animationDirection: M,
101
+ className: g,
100
102
  contentClassName: f,
101
- descriptionClassName: v,
103
+ descriptionAlign: v,
104
+ descriptionClassName: G,
102
105
  duration: l,
103
- hasDescription: R,
106
+ hasDescription: k,
104
107
  index: i,
105
- isDisabled: !!P,
108
+ isDisabled: !!W,
106
109
  isFirst: i === 0,
107
110
  isLast: i === t.length - 1,
108
- isSelected: O,
109
- labelClassName: g,
111
+ isSelected: R,
112
+ labelAlign: w,
113
+ labelClassName: x,
110
114
  option: e,
111
115
  value: e.value,
112
- onKeyDown: M,
113
- onSelect: C
116
+ onKeyDown: O,
117
+ onSelect: P
114
118
  },
115
119
  e.value
116
120
  );
@@ -118,21 +122,21 @@ const T = ({
118
122
  ]
119
123
  }
120
124
  ),
121
- /* @__PURE__ */ a("input", { type: "hidden", name: w, value: r ?? "" }),
125
+ /* @__PURE__ */ a("input", { type: "hidden", name: K, value: r ?? "" }),
122
126
  /* @__PURE__ */ a(
123
- Q,
127
+ U,
124
128
  {
125
- error: G,
126
- errorClassName: b,
127
- helperText: N,
128
- helperTextClassName: y
129
+ error: b,
130
+ errorClassName: N,
131
+ helperText: y,
132
+ helperTextClassName: B
129
133
  }
130
134
  )
131
135
  ]
132
136
  }
133
137
  );
134
138
  };
135
- T.displayName = "KonstructButtonGroup";
139
+ X.displayName = "KonstructButtonGroup";
136
140
  export {
137
- T as ButtonGroup
141
+ X as ButtonGroup
138
142
  };
@@ -2,6 +2,8 @@ import { ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { Theme } from '../../domain/theme';
4
4
  import { buttonGroupVariants } from './ButtonGroup.variants';
5
+ /** Horizontal text alignment for label and description */
6
+ export type TextAlign = 'left' | 'center' | 'right';
5
7
  /**
6
8
  * Configuration for a single button option in the ButtonGroup.
7
9
  */
@@ -53,6 +55,8 @@ export type Props = VariantProps<typeof buttonGroupVariants> & {
53
55
  contentClassName?: string;
54
56
  /** Initially selected value (uncontrolled mode) */
55
57
  defaultValue?: string;
58
+ /** Horizontal alignment of the description text (default: 'left') */
59
+ descriptionAlign?: TextAlign;
56
60
  /** CSS classes for description text */
57
61
  descriptionClassName?: string;
58
62
  /** Animation duration in seconds (default: 0.3) */
@@ -71,6 +75,8 @@ export type Props = VariantProps<typeof buttonGroupVariants> & {
71
75
  itemClassName?: string;
72
76
  /** CSS classes for the label text inside items */
73
77
  itemLabelClassName?: string;
78
+ /** Horizontal alignment of the label text (default: 'left') */
79
+ labelAlign?: TextAlign;
74
80
  /** Label displayed above the button group */
75
81
  label?: string | ReactNode;
76
82
  /** CSS classes for the label */
@@ -1,26 +1,28 @@
1
1
  import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
- import { memo as x } from "react";
2
+ import { memo as L } from "react";
3
3
  import { cn as t } from "../../../../utils/index.js";
4
- import { buttonGroupLabelVariants as o, buttonGroupDescriptionVariants as I, buttonGroupItemContentVariants as L, buttonGroupItemVariants as g } from "./ButtonGroupItem.variants.js";
5
- import { m as V } from "../../../../proxy-BIRlSMN_.js";
6
- const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" : r ? "inset(0 0 0 0)" : n === "right" ? "inset(0 0 0 100%)" : "inset(0 100% 0 0)", j = x(
4
+ import { buttonGroupLabelVariants as u, buttonGroupDescriptionVariants as V, buttonGroupItemContentVariants as g, buttonGroupItemVariants as w } from "./ButtonGroupItem.variants.js";
5
+ import { m as j } from "../../../../proxy-BIRlSMN_.js";
6
+ const k = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" : r ? "inset(0 0 0 0)" : n === "right" ? "inset(0 0 0 100%)" : "inset(0 100% 0 0)", B = L(
7
7
  ({
8
8
  animationDirection: r,
9
9
  className: n,
10
- contentClassName: u,
11
- descriptionClassName: d,
12
- duration: p = 0.3,
13
- hasDescription: h,
10
+ contentClassName: d,
11
+ descriptionAlign: p,
12
+ descriptionClassName: h,
13
+ duration: b = 0.3,
14
+ hasDescription: f,
14
15
  index: c,
15
16
  isDisabled: l,
16
- isFirst: b,
17
- isLast: f,
17
+ isFirst: y,
18
+ isLast: N,
18
19
  isSelected: i,
19
- labelClassName: m,
20
+ labelAlign: m,
21
+ labelClassName: o,
20
22
  option: e,
21
- value: y,
22
- onKeyDown: N,
23
- onSelect: v
23
+ value: v,
24
+ onKeyDown: G,
25
+ onSelect: x
24
26
  }) => /* @__PURE__ */ s(
25
27
  "button",
26
28
  {
@@ -30,10 +32,10 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
30
32
  "data-value": e.value,
31
33
  disabled: l,
32
34
  tabIndex: i || c === 0 ? 0 : -1,
33
- onClick: () => !l && v(y),
34
- onKeyDown: (G) => N(G, c),
35
+ onClick: () => !l && x(v),
36
+ onKeyDown: (I) => G(I, c),
35
37
  className: t(
36
- g({ disabled: l, isFirst: b, isLast: f }),
38
+ w({ disabled: l, isFirst: y, isLast: N }),
37
39
  "relative",
38
40
  n
39
41
  ),
@@ -41,9 +43,9 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
41
43
  "div",
42
44
  {
43
45
  className: t(
44
- L({ hasDescription: h }),
46
+ g({ hasDescription: f }),
45
47
  "relative",
46
- u
48
+ d
47
49
  ),
48
50
  children: [
49
51
  /* @__PURE__ */ a("span", { className: "relative w-full", children: [
@@ -51,8 +53,8 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
51
53
  "span",
52
54
  {
53
55
  className: t(
54
- o({ selected: !1 }),
55
- m
56
+ u({ selected: !1, labelAlign: m }),
57
+ o
56
58
  ),
57
59
  children: [
58
60
  /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
@@ -64,22 +66,22 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
64
66
  }
65
67
  ),
66
68
  /* @__PURE__ */ a(
67
- V.span,
69
+ j.span,
68
70
  {
69
71
  className: t(
70
- o({ selected: !0 }),
72
+ u({ selected: !0, labelAlign: m }),
71
73
  "absolute inset-0",
72
- m
74
+ o
73
75
  ),
74
76
  "aria-hidden": "true",
75
77
  initial: !1,
76
78
  animate: {
77
- clipPath: w(i, r)
79
+ clipPath: k(i, r)
78
80
  },
79
81
  transition: {
80
82
  type: "tween",
81
83
  ease: "linear",
82
- duration: p
84
+ duration: b
83
85
  },
84
86
  children: [
85
87
  /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
@@ -95,8 +97,8 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
95
97
  "span",
96
98
  {
97
99
  className: t(
98
- I(),
99
- d
100
+ V({ descriptionAlign: p }),
101
+ h
100
102
  ),
101
103
  children: e.description
102
104
  }
@@ -108,7 +110,7 @@ const w = (r, n) => n === "none" ? r ? "inset(0 0 0 0)" : "inset(0 100% 0 0)" :
108
110
  e.value
109
111
  )
110
112
  );
111
- j.displayName = "KonstructButtonGroupItem";
113
+ B.displayName = "KonstructButtonGroupItem";
112
114
  export {
113
- j as ButtonGroupItem
115
+ B as ButtonGroupItem
114
116
  };
@@ -1,12 +1,14 @@
1
1
  import { KeyboardEvent } from 'react';
2
- import { ButtonGroupOption } from '../../ButtonGroup.types';
2
+ import { ButtonGroupOption, TextAlign } from '../../ButtonGroup.types';
3
3
  import { AnimationDirection } from '../../hooks';
4
4
  export type Props = {
5
5
  animationDirection: AnimationDirection;
6
6
  className?: string;
7
7
  contentClassName?: string;
8
+ descriptionAlign?: TextAlign;
8
9
  descriptionClassName?: string;
9
10
  duration?: number;
11
+ labelAlign?: TextAlign;
10
12
  hasDescription: boolean;
11
13
  index: number;
12
14
  isDisabled: boolean;
@@ -17,8 +17,11 @@ export declare const buttonGroupItemContentVariants: (props?: ({
17
17
  */
18
18
  export declare const buttonGroupLabelVariants: (props?: ({
19
19
  selected?: boolean | null | undefined;
20
+ labelAlign?: "center" | "left" | "right" | null | undefined;
20
21
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
21
22
  /**
22
23
  * Description text variants inside button item
23
24
  */
24
- export declare const buttonGroupDescriptionVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
25
+ export declare const buttonGroupDescriptionVariants: (props?: ({
26
+ descriptionAlign?: "center" | "left" | "right" | null | undefined;
27
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,5 +1,5 @@
1
1
  import { c as t } from "../../../../index-D29mdTf5.js";
2
- const s = t(
2
+ const r = t(
3
3
  [
4
4
  "flex",
5
5
  "flex-1",
@@ -38,20 +38,20 @@ const s = t(
38
38
  isLast: !1
39
39
  }
40
40
  }
41
- ), r = t(
41
+ ), s = t(
42
42
  ["flex", "flex-col", "flex-1", "rounded-lg", "px-4", "py-2"],
43
43
  {
44
44
  variants: {
45
45
  hasDescription: {
46
- true: "items-start text-left justify-start",
47
- false: "items-center text-center justify-center"
46
+ true: "justify-start",
47
+ false: "justify-center"
48
48
  }
49
49
  },
50
50
  defaultVariants: {
51
51
  hasDescription: !1
52
52
  }
53
53
  }
54
- ), a = t(
54
+ ), n = t(
55
55
  [
56
56
  "text-sm",
57
57
  "font-medium",
@@ -70,22 +70,42 @@ const s = t(
70
70
  selected: {
71
71
  true: "text-aurora-500",
72
72
  false: "text-metal-50"
73
+ },
74
+ labelAlign: {
75
+ left: "justify-between",
76
+ center: "justify-center",
77
+ right: "justify-end"
78
+ }
79
+ },
80
+ defaultVariants: {
81
+ selected: !1,
82
+ labelAlign: "left"
83
+ }
84
+ }
85
+ ), a = t(
86
+ [
87
+ "text-sm",
88
+ "font-normal",
89
+ "leading-5",
90
+ "tracking-[0.15px]",
91
+ "text-metal-300"
92
+ ],
93
+ {
94
+ variants: {
95
+ descriptionAlign: {
96
+ left: "text-left",
97
+ center: "text-center",
98
+ right: "text-right"
73
99
  }
74
100
  },
75
101
  defaultVariants: {
76
- selected: !1
102
+ descriptionAlign: "left"
77
103
  }
78
104
  }
79
- ), n = t([
80
- "text-sm",
81
- "font-normal",
82
- "leading-5",
83
- "tracking-[0.15px]",
84
- "text-metal-300"
85
- ]);
105
+ );
86
106
  export {
87
- n as buttonGroupDescriptionVariants,
88
- r as buttonGroupItemContentVariants,
89
- s as buttonGroupItemVariants,
90
- a as buttonGroupLabelVariants
107
+ a as buttonGroupDescriptionVariants,
108
+ s as buttonGroupItemContentVariants,
109
+ r as buttonGroupItemVariants,
110
+ n as buttonGroupLabelVariants
91
111
  };
@@ -4,7 +4,7 @@ import { cn as d } from "../../../../../../utils/index.js";
4
4
  import { calendarMonthTitleVariants as f } from "../../CalendarPanel.variants.js";
5
5
  import { createDayPickerClassNames as h, SINGLE_MONTH_WIDTH as p } from "../../constants/index.js";
6
6
  import { getMonthName as M } from "../../../../utils/validation.js";
7
- import { D as y } from "../../../../../../DayPicker-PUEUVAST.js";
7
+ import { D as y } from "../../../../../../DayPicker-CaeUXRCF.js";
8
8
  const N = (e) => `${M(e.getMonth())} ${e.getFullYear()}`, g = ({
9
9
  month: e,
10
10
  range: a,
@@ -3,7 +3,7 @@ import { useState as h, useCallback as f } from "react";
3
3
  import { cn as t } from "../../utils/index.js";
4
4
  import { datePickerVariants as p } from "./DatePicker.variants.js";
5
5
  import '../../style.css';/* empty css */
6
- import { D as k } from "../../DayPicker-PUEUVAST.js";
6
+ import { D as k } from "../../DayPicker-CaeUXRCF.js";
7
7
  import { C as g } from "../../chevron-left-BHBf-gQY.js";
8
8
  import { C as w } from "../../chevron-right-DvXGOiS_.js";
9
9
  const y = ({
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "react-dom";
4
- import { M as d } from "../../Modal--z642-Wv.js";
4
+ import { M as d } from "../../Modal-mwLmWbnA.js";
5
5
  import "./components/Header/Header.js";
6
6
  import "./components/Body/Body.js";
7
7
  import "./components/Footer/Footer.js";
@@ -2,10 +2,11 @@ import "react/jsx-runtime";
2
2
  import "../../../../index-BKjcReYh.js";
3
3
  import "react";
4
4
  import "../../../../Combination-BtmnusWq.js";
5
- import { W as f } from "../../../../Modal--z642-Wv.js";
5
+ import { W as s } from "../../../../Modal-mwLmWbnA.js";
6
6
  import "../../../../utils/index.js";
7
7
  import "./Wrapper.variants.js";
8
+ import "../../../../proxy-BIRlSMN_.js";
8
9
  import "../../../../x-Eoa9FJjA.js";
9
10
  export {
10
- f as Wrapper
11
+ s as Wrapper
11
12
  };
@@ -8,8 +8,8 @@ const a = t([
8
8
  "flex",
9
9
  "flex-col",
10
10
  "justify-between",
11
- "min-h-[450px]",
12
- "min-w-[500px]",
11
+ "min-h-112.5",
12
+ "min-w-125",
13
13
  "relative",
14
14
  "rounded-md",
15
15
  "shadow-xs",
@@ -1,7 +1,7 @@
1
1
  import { Body as e } from "./Body/Body.js";
2
2
  import { Footer as t } from "./Footer/Footer.js";
3
3
  import { Header as m } from "./Header/Header.js";
4
- import { W as a } from "../../../Modal--z642-Wv.js";
4
+ import { W as a } from "../../../Modal-mwLmWbnA.js";
5
5
  export {
6
6
  e as Body,
7
7
  t as Footer,
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { SelectProps } from './Select.types';
3
+ export type { OptionGroup, AdditionalOptionGroup } from './Select.types';
3
4
  /**
4
5
  * A dropdown select component with search, icons, and infinite scroll support.
5
6
  * Also exported as `Dropdown` for convenience.
@@ -1,47 +1,61 @@
1
- import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
- import { forwardRef as v } from "react";
1
+ import { jsx as r, jsxs as v } from "react/jsx-runtime";
2
+ import { forwardRef as N, useMemo as O } from "react";
3
3
  import { cn as l } from "../../utils/index.js";
4
- import { SelectProvider as N } from "./contexts/select.provider.js";
5
- import { Wrapper as j } from "./components/Wrapper.js";
6
- const W = v(
4
+ import { i as g } from "../../AdditionalOptions-C2FDVZhu.js";
5
+ import { SelectProvider as j } from "./contexts/select.provider.js";
6
+ import { Wrapper as w } from "./components/Wrapper.js";
7
+ const W = N(
7
8
  ({
8
- error: t,
9
- errorClassName: r,
10
- helperText: s,
11
- helperTextClassName: a,
12
- highlightSearch: c,
13
- mainWrapperClassName: o,
14
- name: m,
15
- value: p,
16
- options: d,
9
+ error: e,
10
+ errorClassName: m,
11
+ helperText: a,
12
+ helperTextClassName: n,
13
+ highlightSearch: o,
14
+ mainWrapperClassName: p,
15
+ name: s,
16
+ value: c,
17
+ options: t,
17
18
  onChange: f,
18
19
  onBlur: i,
19
- ...n
20
- }, x) => /* @__PURE__ */ e(
21
- N,
22
- {
23
- highlightSearch: c,
24
- name: m,
25
- value: p,
26
- options: d,
27
- onBlur: i,
28
- onChange: f,
29
- children: /* @__PURE__ */ h("div", { className: l("relative w-full", o), children: [
30
- /* @__PURE__ */ e(
31
- j,
32
- {
33
- error: t,
34
- name: m,
35
- ref: x,
36
- onBlur: i,
37
- ...n
38
- }
39
- ),
40
- t ? /* @__PURE__ */ e("span", { className: l("text-xs text-red-700", r), children: t }) : null,
41
- !t && s ? /* @__PURE__ */ e("span", { className: l("text-xs text-metal-600", a), children: s }) : null
42
- ] })
43
- }
44
- )
20
+ ...d
21
+ }, x) => {
22
+ const u = O(() => t.length ? g(t.at(0)) ? t.flatMap((h) => h.options) : t : [], [t]);
23
+ return /* @__PURE__ */ r(
24
+ j,
25
+ {
26
+ highlightSearch: o,
27
+ name: s,
28
+ value: c,
29
+ options: u,
30
+ onBlur: i,
31
+ onChange: f,
32
+ children: /* @__PURE__ */ v("div", { className: l("relative w-full", p), children: [
33
+ /* @__PURE__ */ r(
34
+ w,
35
+ {
36
+ error: e,
37
+ name: s,
38
+ ref: x,
39
+ onBlur: i,
40
+ groupedOptions: t,
41
+ ...d
42
+ }
43
+ ),
44
+ e ? /* @__PURE__ */ r(
45
+ "span",
46
+ {
47
+ className: l(
48
+ "text-xs text-red-700 dark:text-red-400",
49
+ m
50
+ ),
51
+ children: e
52
+ }
53
+ ) : null,
54
+ !e && a ? /* @__PURE__ */ r("span", { className: l("text-xs text-metal-600", n), children: a }) : null
55
+ ] })
56
+ }
57
+ );
58
+ }
45
59
  );
46
60
  export {
47
61
  W as Select