@vkzstudio/muza-ui 1.0.40 → 1.0.42
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/components/Accordion/Accordion.js +26 -26
- package/dist/components/DatePicker/DatePicker.d.ts +12 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +68 -67
- package/dist/components/Flex/Flex.d.ts +17 -17
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +96 -84
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +1 -0
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +80 -70
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-colors.css +27 -3
- package/dist/styles/token-sizes.css +286 -62
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +2 -1
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +2 -1
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +2 -1
- package/dist/translations/types.d.ts +2 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +135 -17
- package/package.json +1 -1
|
@@ -30,21 +30,21 @@ const v = g("relative w-full transition-colors", {
|
|
|
30
30
|
variant: {
|
|
31
31
|
default: "pt-md",
|
|
32
32
|
branded: "pt-2xl text-text-brand-def",
|
|
33
|
-
settings: "p-comp-accordion-settings-p"
|
|
33
|
+
settings: "p-comp-accordion-settings-p pt-comp-accordion-settings-p-top"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
defaultVariants: { variant: "default" }
|
|
37
37
|
}), y = d.createContext({
|
|
38
38
|
variant: "default"
|
|
39
|
-
}),
|
|
39
|
+
}), m = () => d.useContext(y), l = d.createContext({
|
|
40
40
|
isStatic: !1
|
|
41
41
|
}), k = () => d.useContext(l), j = ({
|
|
42
42
|
className: e,
|
|
43
|
-
variant:
|
|
43
|
+
variant: o,
|
|
44
44
|
...a
|
|
45
45
|
}) => {
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */ t(y.Provider, { value: { variant:
|
|
46
|
+
const r = o ?? (a.type === "single" ? "branded" : "default");
|
|
47
|
+
return /* @__PURE__ */ t(y.Provider, { value: { variant: r }, children: /* @__PURE__ */ t(
|
|
48
48
|
c.Root,
|
|
49
49
|
{
|
|
50
50
|
"data-slot": "accordion",
|
|
@@ -54,22 +54,22 @@ const v = g("relative w-full transition-colors", {
|
|
|
54
54
|
) });
|
|
55
55
|
}, R = ({
|
|
56
56
|
className: e,
|
|
57
|
-
children:
|
|
57
|
+
children: o,
|
|
58
58
|
clickableContent: a = !0,
|
|
59
|
-
static:
|
|
59
|
+
static: r,
|
|
60
60
|
value: i,
|
|
61
61
|
disabled: A,
|
|
62
|
-
...
|
|
62
|
+
...u
|
|
63
63
|
}) => {
|
|
64
|
-
const { variant: f } =
|
|
65
|
-
return
|
|
64
|
+
const { variant: f } = m(), p = d.useRef(null);
|
|
65
|
+
return r ? /* @__PURE__ */ t(l.Provider, { value: { isStatic: !0 }, children: /* @__PURE__ */ t(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
"data-slot": "accordion-item",
|
|
69
69
|
"data-state": "open",
|
|
70
70
|
className: n(v({ variant: f }), e),
|
|
71
|
-
...
|
|
72
|
-
children:
|
|
71
|
+
...u,
|
|
72
|
+
children: o
|
|
73
73
|
}
|
|
74
74
|
) }) : /* @__PURE__ */ t(l.Provider, { value: { isStatic: !1 }, children: /* @__PURE__ */ t(
|
|
75
75
|
c.Item,
|
|
@@ -90,48 +90,48 @@ const v = g("relative w-full transition-colors", {
|
|
|
90
90
|
);
|
|
91
91
|
s && !s.contains(C.target) && s.click();
|
|
92
92
|
} : void 0,
|
|
93
|
-
...
|
|
94
|
-
children:
|
|
93
|
+
...u,
|
|
94
|
+
children: o
|
|
95
95
|
}
|
|
96
96
|
) });
|
|
97
97
|
}, z = ({
|
|
98
98
|
className: e,
|
|
99
|
-
children:
|
|
99
|
+
children: o,
|
|
100
100
|
...a
|
|
101
101
|
}) => {
|
|
102
|
-
const { variant:
|
|
102
|
+
const { variant: r } = m(), { isStatic: i } = k();
|
|
103
103
|
return i ? /* @__PURE__ */ t("div", { className: "flex", ...a, children: /* @__PURE__ */ t(
|
|
104
104
|
"div",
|
|
105
105
|
{
|
|
106
106
|
className: n(
|
|
107
|
-
x({ variant:
|
|
107
|
+
x({ variant: r }),
|
|
108
108
|
"cursor-default",
|
|
109
109
|
e
|
|
110
110
|
),
|
|
111
|
-
children:
|
|
111
|
+
children: o
|
|
112
112
|
}
|
|
113
113
|
) }) : /* @__PURE__ */ t(c.Header, { className: "flex", ...a, children: /* @__PURE__ */ w(
|
|
114
114
|
c.Trigger,
|
|
115
115
|
{
|
|
116
116
|
"data-slot": "accordion-trigger",
|
|
117
|
-
className: n(x({ variant:
|
|
117
|
+
className: n(x({ variant: r }), e),
|
|
118
118
|
children: [
|
|
119
|
-
|
|
119
|
+
o,
|
|
120
120
|
/* @__PURE__ */ t(N, { className: "size-comp-accordion-ico-size-md shrink-0 text-comp-select-icon-brand-def transition-transform duration-300 group-data-[disabled]:text-icon-dark-tertiary" })
|
|
121
121
|
]
|
|
122
122
|
}
|
|
123
123
|
) });
|
|
124
124
|
}, H = ({
|
|
125
125
|
className: e,
|
|
126
|
-
children:
|
|
126
|
+
children: o,
|
|
127
127
|
...a
|
|
128
128
|
}) => {
|
|
129
|
-
const { variant:
|
|
129
|
+
const { variant: r } = m(), { isStatic: i } = k();
|
|
130
130
|
return i ? /* @__PURE__ */ t("div", { "data-slot": "accordion-content", ...a, children: /* @__PURE__ */ t(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
|
-
className: n(h({ variant:
|
|
134
|
-
children:
|
|
133
|
+
className: n(h({ variant: r }), e),
|
|
134
|
+
children: o
|
|
135
135
|
}
|
|
136
136
|
) }) : /* @__PURE__ */ t(
|
|
137
137
|
c.Content,
|
|
@@ -142,8 +142,8 @@ const v = g("relative w-full transition-colors", {
|
|
|
142
142
|
children: /* @__PURE__ */ t(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
145
|
-
className: n(h({ variant:
|
|
146
|
-
children:
|
|
145
|
+
className: n(h({ variant: r }), e),
|
|
146
|
+
children: o
|
|
147
147
|
}
|
|
148
148
|
)
|
|
149
149
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DateRange } from 'react-day-picker';
|
|
3
3
|
import { CalendarBaseProps } from '../Calendar';
|
|
4
|
+
import { PopoverContentProps } from '../Popover/Popover';
|
|
4
5
|
import { Presets } from './utils/getDateRange';
|
|
5
6
|
/**
|
|
6
7
|
* Props for the DatePicker component.
|
|
@@ -64,6 +65,17 @@ export type DatePickerProps = {
|
|
|
64
65
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
65
66
|
/** Prevents the popover from overflowing viewport boundaries. @default true */
|
|
66
67
|
avoidCollisions?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Additional props forwarded to the underlying {@link PopoverContent}.
|
|
70
|
+
* Use for fine-tuning positioning (`sideOffset`, `alignOffset`, `sticky`,
|
|
71
|
+
* `hideWhenDetached`) or intercepting Radix events (`onOpenAutoFocus`,
|
|
72
|
+
* `onCloseAutoFocus`, `onEscapeKeyDown`, `onPointerDownOutside`, etc.).
|
|
73
|
+
*
|
|
74
|
+
* Props already exposed on DatePicker (`align` via `alignCalendar`, `side`,
|
|
75
|
+
* `avoidCollisions`, `className` via `classNames.popoverContent`) are
|
|
76
|
+
* intentionally excluded.
|
|
77
|
+
*/
|
|
78
|
+
popoverContentProps?: Omit<PopoverContentProps, 'align' | 'side' | 'avoidCollisions' | 'className'>;
|
|
67
79
|
/** Replaces the default Input trigger with a custom rendered element. */
|
|
68
80
|
renderCustomTrigger?: () => ReactNode;
|
|
69
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAIjD,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA2C,MAAM,OAAO,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAIjD,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,sBAAsB,CAAA;AAGjE;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,qFAAqF;IACrF,aAAa,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAA;IAC1C;;;;;;;;;;;;;OAaG;IACH,cAAc,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;KAAE,EAAE,CAAA;IACnE,2FAA2F;IAC3F,IAAI,CAAC,EAAE,OAAO,CAAA;I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xB,GAAG,IAAI,CACN,iBAAiB,EACf,gBAAgB,GAChB,WAAW,GACX,SAAS,GACT,YAAY,GACZ,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,GACf,oBAAoB,GACpB,UAAU,CACb,GACC,CAAC,oBAAoB,GAAG,qBAAqB,CAAC,CAAA;AAEhD,2CAA2C;AAC3C,MAAM,MAAM,oBAAoB,GAAG;IACjC,6DAA6D;IAC7D,IAAI,EAAE,OAAO,CAAA;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC7B,iDAAiD;IACjD,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IACpC,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAA;IAChD,iEAAiE;IACjE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAAA;CAC5C,CAAA;AAED,4CAA4C;AAC5C,MAAM,MAAM,qBAAqB,GAAG;IAClC,qCAAqC;IACrC,IAAI,EAAE,QAAQ,CAAA;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACxB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC/B,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAA;IAC3C,2DAA2D;IAC3D,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,UAAU,8GA6PtB,CAAA"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useIsDesktop as
|
|
4
|
-
import { useIsMobile as
|
|
5
|
-
import { Popover as pt, PopoverTrigger as
|
|
6
|
-
import { getDateRange as
|
|
7
|
-
import { resolveOneDayRange as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { formatDate as
|
|
10
|
-
import { formatDateRange as
|
|
11
|
-
import { Calendar as
|
|
1
|
+
import { jsx as n, jsxs as ot } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as et, useState as k, useRef as Y, useEffect as it } from "react";
|
|
3
|
+
import { useIsDesktop as ft } from "../../hooks/use-is-desktop.js";
|
|
4
|
+
import { useIsMobile as ct } from "../../hooks/use-is-mobile.js";
|
|
5
|
+
import { Popover as pt, PopoverTrigger as nt, PopoverContent as dt } from "../Popover/Popover.js";
|
|
6
|
+
import { getDateRange as ut } from "./utils/getDateRange.js";
|
|
7
|
+
import { resolveOneDayRange as bt } from "./utils/resolveOneDayRange.js";
|
|
8
|
+
import { Input as st } from "../Input/Input.js";
|
|
9
|
+
import { formatDate as xt } from "../Calendar/utils/formatDate.js";
|
|
10
|
+
import { formatDateRange as lt } from "../Calendar/utils/formatDateRange.js";
|
|
11
|
+
import { Calendar as A } from "../Calendar/Calendar.js";
|
|
12
12
|
import { cn as l } from "../../utils/cn.js";
|
|
13
|
-
import { typographyVariants as
|
|
14
|
-
import { CalendarBold as
|
|
15
|
-
const vt =
|
|
13
|
+
import { typographyVariants as yt } from "../Typography/Typography.js";
|
|
14
|
+
import { CalendarBold as mt } from "@solar-icons/react-perf";
|
|
15
|
+
const vt = et(
|
|
16
16
|
({
|
|
17
17
|
alignCalendar: G,
|
|
18
18
|
mode: y,
|
|
19
|
-
allowedPresets:
|
|
19
|
+
allowedPresets: m,
|
|
20
20
|
dateFormatter: H,
|
|
21
21
|
value: e,
|
|
22
22
|
defaultValue: b,
|
|
@@ -31,39 +31,40 @@ const vt = ot(
|
|
|
31
31
|
placeholder: Q,
|
|
32
32
|
avoidCollisions: T = !0,
|
|
33
33
|
side: U = "bottom",
|
|
34
|
+
popoverContentProps: W,
|
|
34
35
|
renderCustomTrigger: S,
|
|
35
36
|
immediateCommit: f,
|
|
36
37
|
allowOneDayRange: B,
|
|
37
38
|
shouldResetToDefaultValue: I,
|
|
38
39
|
required: x,
|
|
39
|
-
disableRequiredAsterisk:
|
|
40
|
-
numberOfMonths:
|
|
41
|
-
hideNavigation:
|
|
42
|
-
hideCaption:
|
|
43
|
-
hideWeekdays:
|
|
44
|
-
showOutsideDays:
|
|
45
|
-
hideBottomText:
|
|
46
|
-
hideResetButton:
|
|
47
|
-
hideBottomBar:
|
|
48
|
-
...
|
|
49
|
-
},
|
|
50
|
-
const
|
|
40
|
+
disableRequiredAsterisk: X,
|
|
41
|
+
numberOfMonths: Z,
|
|
42
|
+
hideNavigation: _,
|
|
43
|
+
hideCaption: $,
|
|
44
|
+
hideWeekdays: V,
|
|
45
|
+
showOutsideDays: q,
|
|
46
|
+
hideBottomText: w,
|
|
47
|
+
hideResetButton: O,
|
|
48
|
+
hideBottomBar: g,
|
|
49
|
+
...a
|
|
50
|
+
}, N) => {
|
|
51
|
+
const h = ft(), C = ct(), [tt, M] = k(!1), P = typeof s == "boolean" ? s : tt, [j, c] = k(
|
|
51
52
|
e ?? b
|
|
52
|
-
), [i, u] = k(e ?? b),
|
|
53
|
+
), [i, u] = k(e ?? b), z = Y(!1), v = Y(
|
|
53
54
|
e ?? b
|
|
54
55
|
);
|
|
55
|
-
|
|
56
|
-
if (!
|
|
57
|
-
|
|
56
|
+
it(() => {
|
|
57
|
+
if (!z.current) {
|
|
58
|
+
z.current = !0;
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
+
c(e), u(e), P || (v.current = e);
|
|
61
62
|
}, [e]);
|
|
62
|
-
const
|
|
63
|
+
const rt = m == null ? void 0 : m.map((t) => /* @__PURE__ */ n(
|
|
63
64
|
"button",
|
|
64
65
|
{
|
|
65
66
|
className: l(
|
|
66
|
-
|
|
67
|
+
yt({
|
|
67
68
|
variant: "cta",
|
|
68
69
|
weight: "medium",
|
|
69
70
|
size: "sm",
|
|
@@ -76,41 +77,41 @@ const vt = ot(
|
|
|
76
77
|
o == null ? void 0 : o.leftPanelButton
|
|
77
78
|
),
|
|
78
79
|
onClick: () => {
|
|
79
|
-
const
|
|
80
|
-
u(
|
|
80
|
+
const p = ut(t.type);
|
|
81
|
+
u(p), f && (c(p), r == null || r(p));
|
|
81
82
|
},
|
|
82
83
|
children: t.name
|
|
83
84
|
},
|
|
84
85
|
t.type
|
|
85
|
-
)), D = H ?? (y === "single" ?
|
|
86
|
-
...
|
|
87
|
-
numberOfMonths:
|
|
88
|
-
hideNavigation:
|
|
89
|
-
hideCaption:
|
|
90
|
-
hideWeekdays:
|
|
91
|
-
showOutsideDays:
|
|
92
|
-
hideBottomText:
|
|
93
|
-
hideResetButton:
|
|
94
|
-
hideBottomBar: f ?
|
|
86
|
+
)), D = H ?? (y === "single" ? xt : lt), F = f ? e !== void 0 ? e : i : j, E = {
|
|
87
|
+
...a,
|
|
88
|
+
numberOfMonths: Z ?? (h ? 2 : 1),
|
|
89
|
+
hideNavigation: _,
|
|
90
|
+
hideCaption: $,
|
|
91
|
+
hideWeekdays: V,
|
|
92
|
+
showOutsideDays: q,
|
|
93
|
+
hideBottomText: w,
|
|
94
|
+
hideResetButton: O,
|
|
95
|
+
hideBottomBar: f ? g : void 0,
|
|
95
96
|
required: x,
|
|
96
97
|
onReset: () => {
|
|
97
|
-
const t = I ? b : f ?
|
|
98
|
-
u(t), f && (
|
|
98
|
+
const t = I ? b : f ? v.current : j;
|
|
99
|
+
u(t), f && (c(t), r == null || r(t));
|
|
99
100
|
},
|
|
100
101
|
onConfirm: () => {
|
|
101
|
-
f ?
|
|
102
|
+
f ? c(i) : (i !== void 0 || I || x === !1) && (c(i), r == null || r(i)), s === void 0 && M(!1), d == null || d(!1);
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ ot(
|
|
105
106
|
pt,
|
|
106
107
|
{
|
|
107
108
|
open: P,
|
|
108
109
|
onOpenChange: (t) => {
|
|
109
|
-
t && (
|
|
110
|
+
t && (v.current = e ?? i), s === void 0 && M(t), d == null || d(t);
|
|
110
111
|
},
|
|
111
112
|
children: [
|
|
112
113
|
/* @__PURE__ */ n(
|
|
113
|
-
|
|
114
|
+
nt,
|
|
114
115
|
{
|
|
115
116
|
className: l(
|
|
116
117
|
"group cursor-pointer rounded-full text-left outline-0",
|
|
@@ -118,10 +119,10 @@ const vt = ot(
|
|
|
118
119
|
),
|
|
119
120
|
disabled: R,
|
|
120
121
|
children: S ? S() : /* @__PURE__ */ n(
|
|
121
|
-
|
|
122
|
+
st,
|
|
122
123
|
{
|
|
123
|
-
ref:
|
|
124
|
-
value:
|
|
124
|
+
ref: N,
|
|
125
|
+
value: F ? D(F) : "",
|
|
125
126
|
placeholder: Q,
|
|
126
127
|
error: J,
|
|
127
128
|
disabled: R,
|
|
@@ -129,52 +130,52 @@ const vt = ot(
|
|
|
129
130
|
hint: K,
|
|
130
131
|
tabIndex: -1,
|
|
131
132
|
required: x,
|
|
132
|
-
disableRequiredAsterisk:
|
|
133
|
+
disableRequiredAsterisk: X,
|
|
133
134
|
className: l(
|
|
134
135
|
"pointer-events-none",
|
|
135
136
|
o == null ? void 0 : o.input,
|
|
136
137
|
"group-hover:border-comp-input-stroke-hover group-focus-visible:border-comp-input-stroke-focused"
|
|
137
138
|
),
|
|
138
|
-
suffix: /* @__PURE__ */ n(
|
|
139
|
+
suffix: /* @__PURE__ */ n(mt, { className: "size-icon-medium text-icon-dark-secondary-def" })
|
|
139
140
|
}
|
|
140
141
|
)
|
|
141
142
|
}
|
|
142
143
|
),
|
|
143
144
|
/* @__PURE__ */ n(
|
|
144
|
-
|
|
145
|
+
dt,
|
|
145
146
|
{
|
|
147
|
+
...W,
|
|
146
148
|
className: l("flex w-auto p-0", o == null ? void 0 : o.popoverContent),
|
|
147
149
|
align: G,
|
|
148
150
|
side: U,
|
|
149
151
|
avoidCollisions: T,
|
|
150
|
-
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
151
152
|
children: y === "single" ? /* @__PURE__ */ n(
|
|
152
|
-
|
|
153
|
+
A,
|
|
153
154
|
{
|
|
154
|
-
...
|
|
155
|
+
...E,
|
|
155
156
|
mode: "single",
|
|
156
157
|
selected: i,
|
|
157
158
|
onSelect: f ? (t) => {
|
|
158
|
-
u(t),
|
|
159
|
+
u(t), c(t), r == null || r(t);
|
|
159
160
|
} : u,
|
|
160
161
|
dateFormatter: D
|
|
161
162
|
}
|
|
162
163
|
) : /* @__PURE__ */ n(
|
|
163
|
-
|
|
164
|
+
A,
|
|
164
165
|
{
|
|
165
|
-
...
|
|
166
|
+
...E,
|
|
166
167
|
mode: "range",
|
|
167
168
|
min: B ? 1 : void 0,
|
|
168
169
|
selected: i,
|
|
169
170
|
onSelect: (t) => {
|
|
170
|
-
const
|
|
171
|
+
const p = B ? bt(
|
|
171
172
|
i,
|
|
172
173
|
t,
|
|
173
174
|
x
|
|
174
175
|
) : t;
|
|
175
|
-
u(
|
|
176
|
+
u(p), f && (c(p), r == null || r(p));
|
|
176
177
|
},
|
|
177
|
-
leftPanelChildren: y === "range" && !
|
|
178
|
+
leftPanelChildren: y === "range" && !C && rt,
|
|
178
179
|
dateRangeFormatter: D
|
|
179
180
|
}
|
|
180
181
|
)
|
|
@@ -2,23 +2,23 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { SpacingProps } from '../../utils/spacing';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const flexVariants: (props?: ({
|
|
5
|
-
gap?: "none" | "
|
|
6
|
-
gapX?: "none" | "
|
|
7
|
-
gapY?: "none" | "
|
|
8
|
-
p?: "none" | "
|
|
9
|
-
px?: "none" | "
|
|
10
|
-
py?: "none" | "
|
|
11
|
-
pt?: "none" | "
|
|
12
|
-
pr?: "none" | "
|
|
13
|
-
pb?: "none" | "
|
|
14
|
-
pl?: "none" | "
|
|
15
|
-
m?: "none" | "
|
|
16
|
-
mx?: "none" | "
|
|
17
|
-
my?: "none" | "
|
|
18
|
-
mt?: "none" | "
|
|
19
|
-
mr?: "none" | "
|
|
20
|
-
mb?: "none" | "
|
|
21
|
-
ml?: "none" | "
|
|
5
|
+
gap?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
6
|
+
gapX?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
7
|
+
gapY?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
8
|
+
p?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
9
|
+
px?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
10
|
+
py?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
11
|
+
pt?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
12
|
+
pr?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
13
|
+
pb?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
14
|
+
pl?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
15
|
+
m?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
16
|
+
mx?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
17
|
+
my?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
18
|
+
mt?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
19
|
+
mr?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
20
|
+
mb?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
21
|
+
ml?: "none" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3xs" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | null | undefined;
|
|
22
22
|
direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
|
|
23
23
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
24
24
|
justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | "stretch" | null | undefined;
|
|
@@ -19,6 +19,8 @@ export interface IMultiSelectProps {
|
|
|
19
19
|
prefix?: ReactNode;
|
|
20
20
|
/** Placeholder text shown when no options are selected. @default translations.select.placeholder */
|
|
21
21
|
placeholder?: string;
|
|
22
|
+
/** Text shown inside the dropdown when `options` is empty. @default translations.select.noOptions */
|
|
23
|
+
emptyMessage?: string;
|
|
22
24
|
/** Controls height and padding. @default 'base' */
|
|
23
25
|
size?: 'xs' | 'sm' | 'base' | 'lg';
|
|
24
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAgBd;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAClC;;;;;;;;;OASG;IACH,OAAO,EAAE,KAAK,CAAC;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