@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.
- package/dist/AdditionalOptions-C2FDVZhu.js +45 -0
- package/dist/{DayPicker-PUEUVAST.js → DayPicker-CaeUXRCF.js} +475 -470
- package/dist/{Modal--z642-Wv.js → Modal-mwLmWbnA.js} +23 -20
- package/dist/assets/icons/components/CloudLockOutline.d.ts +3 -0
- package/dist/assets/icons/components/CloudLockOutline.js +28 -0
- package/dist/assets/icons/components/index.d.ts +1 -0
- package/dist/assets/icons/components/index.js +106 -104
- package/dist/assets/icons/index.js +106 -104
- package/dist/components/ButtonGroup/ButtonGroup.js +65 -61
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +6 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +32 -30
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +3 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +4 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +37 -17
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/Select/Select.js +54 -40
- package/dist/components/Select/Select.types.d.ts +18 -2
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.d.ts +3 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +11 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +4 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.d.ts +1 -0
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +26 -0
- package/dist/components/Select/components/List/List.js +131 -132
- package/dist/components/Select/components/List/List.types.d.ts +1 -0
- package/dist/components/Select/components/List/List.variants.d.ts +1 -0
- package/dist/components/Select/components/List/List.variants.js +17 -2
- package/dist/components/Select/components/Wrapper.d.ts +3 -1
- package/dist/components/Select/components/Wrapper.js +65 -63
- package/dist/components/Select/components/index.d.ts +1 -0
- package/dist/components/Select/components/index.js +8 -6
- package/dist/components/VirtualizedTable/VirtualizedTable.d.ts +5 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.js +86 -80
- package/dist/components/VirtualizedTable/components/Body/Body.js +51 -49
- package/dist/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +69 -67
- package/dist/components/VirtualizedTable/events/index.d.ts +3 -3
- package/dist/components/VirtualizedTable/events/index.js +22 -16
- package/dist/components/index.js +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +106 -104
- package/dist/index.js +1 -1
- package/dist/package.json +21 -21
- package/dist/styles.css +1 -1
- 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
|
|
2
|
+
import { useMemo as q } from "react";
|
|
3
3
|
import { cn as n } from "../../utils/index.js";
|
|
4
|
-
import { buttonGroupPillVariants as
|
|
5
|
-
import { useButtonGroup as
|
|
6
|
-
import { ButtonGroupLabel as
|
|
7
|
-
import { m as
|
|
8
|
-
import { ButtonGroupItem as
|
|
9
|
-
import { ButtonGroupMessage as
|
|
10
|
-
const
|
|
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
|
-
|
|
14
|
+
descriptionAlign: v,
|
|
15
|
+
descriptionClassName: G,
|
|
15
16
|
disabled: o,
|
|
16
17
|
duration: l,
|
|
17
|
-
error:
|
|
18
|
-
errorClassName:
|
|
19
|
-
helperText:
|
|
20
|
-
helperTextClassName:
|
|
21
|
-
isRequired:
|
|
22
|
-
itemClassName:
|
|
23
|
-
itemLabelClassName:
|
|
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
|
-
|
|
26
|
-
|
|
26
|
+
labelAlign: w,
|
|
27
|
+
labelClassName: I,
|
|
28
|
+
name: K,
|
|
27
29
|
options: t,
|
|
28
|
-
pillClassName:
|
|
29
|
-
requiredClassName:
|
|
30
|
-
theme:
|
|
31
|
-
value:
|
|
32
|
-
wrapperClassName:
|
|
33
|
-
onValueChange:
|
|
30
|
+
pillClassName: S,
|
|
31
|
+
requiredClassName: V,
|
|
32
|
+
theme: $,
|
|
33
|
+
value: j,
|
|
34
|
+
wrapperClassName: F,
|
|
35
|
+
onValueChange: L
|
|
34
36
|
}) => {
|
|
35
37
|
const {
|
|
36
|
-
animationDirection:
|
|
37
|
-
groupRef:
|
|
38
|
+
animationDirection: M,
|
|
39
|
+
groupRef: C,
|
|
38
40
|
id: m,
|
|
39
41
|
selected: r,
|
|
40
|
-
handleKeyDown:
|
|
41
|
-
handleSelect:
|
|
42
|
-
} =
|
|
42
|
+
handleKeyDown: O,
|
|
43
|
+
handleSelect: P
|
|
44
|
+
} = H({
|
|
43
45
|
defaultValue: h,
|
|
44
46
|
disabled: o ?? void 0,
|
|
45
47
|
options: t,
|
|
46
|
-
value:
|
|
47
|
-
onValueChange:
|
|
48
|
-
}), u = t.length, c =
|
|
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(
|
|
56
|
-
"data-theme":
|
|
57
|
+
className: n(E(), F),
|
|
58
|
+
"data-theme": $,
|
|
57
59
|
children: [
|
|
58
60
|
s && /* @__PURE__ */ a(
|
|
59
|
-
|
|
61
|
+
J,
|
|
60
62
|
{
|
|
61
|
-
className:
|
|
63
|
+
className: I,
|
|
62
64
|
htmlFor: m,
|
|
63
|
-
isRequired:
|
|
65
|
+
isRequired: D,
|
|
64
66
|
label: s,
|
|
65
|
-
requiredClassName:
|
|
67
|
+
requiredClassName: V
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
/* @__PURE__ */ d(
|
|
69
71
|
"div",
|
|
70
72
|
{
|
|
71
|
-
ref:
|
|
73
|
+
ref: C,
|
|
72
74
|
role: "radiogroup",
|
|
73
75
|
"aria-labelledby": s ? m : void 0,
|
|
74
|
-
className: n(
|
|
76
|
+
className: n(A({ disabled: o }), p),
|
|
75
77
|
children: [
|
|
76
78
|
c >= 0 && /* @__PURE__ */ a(
|
|
77
|
-
|
|
79
|
+
Q.div,
|
|
78
80
|
{
|
|
79
81
|
"aria-hidden": "true",
|
|
80
|
-
className: n(
|
|
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
|
|
96
|
+
const R = r === e.value, W = o || e.disabled, k = !!e.description;
|
|
95
97
|
return /* @__PURE__ */ a(
|
|
96
|
-
|
|
98
|
+
T,
|
|
97
99
|
{
|
|
98
|
-
animationDirection:
|
|
99
|
-
className:
|
|
100
|
+
animationDirection: M,
|
|
101
|
+
className: g,
|
|
100
102
|
contentClassName: f,
|
|
101
|
-
|
|
103
|
+
descriptionAlign: v,
|
|
104
|
+
descriptionClassName: G,
|
|
102
105
|
duration: l,
|
|
103
|
-
hasDescription:
|
|
106
|
+
hasDescription: k,
|
|
104
107
|
index: i,
|
|
105
|
-
isDisabled: !!
|
|
108
|
+
isDisabled: !!W,
|
|
106
109
|
isFirst: i === 0,
|
|
107
110
|
isLast: i === t.length - 1,
|
|
108
|
-
isSelected:
|
|
109
|
-
|
|
111
|
+
isSelected: R,
|
|
112
|
+
labelAlign: w,
|
|
113
|
+
labelClassName: x,
|
|
110
114
|
option: e,
|
|
111
115
|
value: e.value,
|
|
112
|
-
onKeyDown:
|
|
113
|
-
onSelect:
|
|
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:
|
|
125
|
+
/* @__PURE__ */ a("input", { type: "hidden", name: K, value: r ?? "" }),
|
|
122
126
|
/* @__PURE__ */ a(
|
|
123
|
-
|
|
127
|
+
U,
|
|
124
128
|
{
|
|
125
|
-
error:
|
|
126
|
-
errorClassName:
|
|
127
|
-
helperText:
|
|
128
|
-
helperTextClassName:
|
|
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
|
-
|
|
139
|
+
X.displayName = "KonstructButtonGroup";
|
|
136
140
|
export {
|
|
137
|
-
|
|
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
|
|
2
|
+
import { memo as L } from "react";
|
|
3
3
|
import { cn as t } from "../../../../utils/index.js";
|
|
4
|
-
import { buttonGroupLabelVariants as
|
|
5
|
-
import { m as
|
|
6
|
-
const
|
|
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:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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:
|
|
17
|
-
isLast:
|
|
17
|
+
isFirst: y,
|
|
18
|
+
isLast: N,
|
|
18
19
|
isSelected: i,
|
|
19
|
-
|
|
20
|
+
labelAlign: m,
|
|
21
|
+
labelClassName: o,
|
|
20
22
|
option: e,
|
|
21
|
-
value:
|
|
22
|
-
onKeyDown:
|
|
23
|
-
onSelect:
|
|
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
|
|
34
|
-
onKeyDown: (
|
|
35
|
+
onClick: () => !l && x(v),
|
|
36
|
+
onKeyDown: (I) => G(I, c),
|
|
35
37
|
className: t(
|
|
36
|
-
|
|
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
|
-
|
|
46
|
+
g({ hasDescription: f }),
|
|
45
47
|
"relative",
|
|
46
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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
|
-
|
|
69
|
+
j.span,
|
|
68
70
|
{
|
|
69
71
|
className: t(
|
|
70
|
-
|
|
72
|
+
u({ selected: !0, labelAlign: m }),
|
|
71
73
|
"absolute inset-0",
|
|
72
|
-
|
|
74
|
+
o
|
|
73
75
|
),
|
|
74
76
|
"aria-hidden": "true",
|
|
75
77
|
initial: !1,
|
|
76
78
|
animate: {
|
|
77
|
-
clipPath:
|
|
79
|
+
clipPath: k(i, r)
|
|
78
80
|
},
|
|
79
81
|
transition: {
|
|
80
82
|
type: "tween",
|
|
81
83
|
ease: "linear",
|
|
82
|
-
duration:
|
|
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
|
-
|
|
99
|
-
|
|
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
|
-
|
|
113
|
+
B.displayName = "KonstructButtonGroupItem";
|
|
112
114
|
export {
|
|
113
|
-
|
|
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;
|
package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts
CHANGED
|
@@ -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?:
|
|
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
|
|
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
|
-
),
|
|
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: "
|
|
47
|
-
false: "
|
|
46
|
+
true: "justify-start",
|
|
47
|
+
false: "justify-center"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
defaultVariants: {
|
|
51
51
|
hasDescription: !1
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
),
|
|
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
|
-
|
|
102
|
+
descriptionAlign: "left"
|
|
77
103
|
}
|
|
78
104
|
}
|
|
79
|
-
)
|
|
80
|
-
"text-sm",
|
|
81
|
-
"font-normal",
|
|
82
|
-
"leading-5",
|
|
83
|
-
"tracking-[0.15px]",
|
|
84
|
-
"text-metal-300"
|
|
85
|
-
]);
|
|
105
|
+
);
|
|
86
106
|
export {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
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
|
-
|
|
11
|
+
s as Wrapper
|
|
11
12
|
};
|
|
@@ -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
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
|
|
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:
|
|
9
|
-
errorClassName:
|
|
10
|
-
helperText:
|
|
11
|
-
helperTextClassName:
|
|
12
|
-
highlightSearch:
|
|
13
|
-
mainWrapperClassName:
|
|
14
|
-
name:
|
|
15
|
-
value:
|
|
16
|
-
options:
|
|
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
|
-
...
|
|
20
|
-
}, x) =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|