@vkzstudio/muza-ui 1.0.27 → 1.0.29
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/Calendar/Calendar.d.ts +3 -1
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +129 -120
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +51 -49
- package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +79 -55
- package/dist/components/Reorderable/Reorderable.d.ts +43 -5
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -1
- package/dist/components/Reorderable/Reorderable.js +203 -161
- package/dist/components/Reorderable/Reorderable.stories.d.ts +1 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +22 -2
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +52 -42
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -1
- package/dist/muza-ui.css +1 -1
- package/package.json +1 -1
|
@@ -63,6 +63,8 @@ export type CalendarBaseProps = {
|
|
|
63
63
|
hideBottomText?: boolean;
|
|
64
64
|
/** Hides the reset button in the bottom bar. @default false */
|
|
65
65
|
hideResetButton?: boolean;
|
|
66
|
+
/** Hides the entire bottom bar (text, reset button, and confirm button). Should only be used in combination with `immediateCommit` in DatePicker. @default false */
|
|
67
|
+
hideBottomBar?: boolean;
|
|
66
68
|
/** Earliest month for navigation. Navigation arrows are disabled before this month. */
|
|
67
69
|
startMonth?: Date;
|
|
68
70
|
/** Latest month for navigation. Navigation arrows are disabled after this month. */
|
|
@@ -90,7 +92,7 @@ export type CalendarSingleProps = {
|
|
|
90
92
|
/** Fires when a single date is selected, or `undefined` when deselected (requires `required={false}`). */
|
|
91
93
|
onSelect?: (date: Date | undefined) => void;
|
|
92
94
|
};
|
|
93
|
-
declare const Calendar: ({ leftPanelChildren, defaultMonth, numberOfMonths, mode, selected, onSelect, onReset, onConfirm, resetButtonText: resetButtonTextProp, confirmButtonText: confirmButtonTextProp, renderResetButton, renderConfirmButton, bottomTextDefault: bottomTextDefaultProp, dateFormatter, dateRangeFormatter, disabledDates, weekStartsOn, excludeDisabled, hideNavigation, hideCaption, formatters, hideWeekdays, showOutsideDays, hideBottomText, hideResetButton, startMonth, endMonth, min, required, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
declare const Calendar: ({ leftPanelChildren, defaultMonth, numberOfMonths, mode, selected, onSelect, onReset, onConfirm, resetButtonText: resetButtonTextProp, confirmButtonText: confirmButtonTextProp, renderResetButton, renderConfirmButton, bottomTextDefault: bottomTextDefaultProp, dateFormatter, dateRangeFormatter, disabledDates, weekStartsOn, excludeDisabled, hideNavigation, hideCaption, formatters, hideWeekdays, showOutsideDays, hideBottomText, hideResetButton, hideBottomBar, startMonth, endMonth, min, required, }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
94
96
|
declare const CalendarBase: ({ className, classNames, showOutsideDays, captionLayout, formatters, components, locale, hideCaption, hideWeekdays, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
95
97
|
hideCaption?: boolean;
|
|
96
98
|
hideWeekdays?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,KAAK,SAAS,EACd,SAAS,EACT,SAAS,EACT,KAAK,OAA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GAAG,SAAS,KAAK,IAAI,CAAA;CAC5C,CAAA;AAED,QAAA,MAAM,QAAQ,GAAI,ofA+Bf,aAAa,4CA4Hf,CAAA;AAED,QAAA,MAAM,YAAY,GAAI,gIAWnB,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,4CA0QA,CAAA;AAED,QAAA,MAAM,iBAAiB,GAAI,6DAOxB,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,4CAqDxC,CAAA;AAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { formatDate as
|
|
4
|
-
import { formatDateRange as
|
|
5
|
-
import { useMuzaTranslationContext as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { getDefaultClassNames as
|
|
8
|
-
import { DayPicker as
|
|
2
|
+
import * as W from "react";
|
|
3
|
+
import { formatDate as J } from "./utils/formatDate.js";
|
|
4
|
+
import { formatDateRange as K } from "./utils/formatDateRange.js";
|
|
5
|
+
import { useMuzaTranslationContext as P } from "../../translations/TranslationContext.js";
|
|
6
|
+
import { Button as Y } from "../Button/Button.js";
|
|
7
|
+
import { getDefaultClassNames as F } from "../../node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js";
|
|
8
|
+
import { DayPicker as Q } from "../../node_modules/react-day-picker/dist/esm/DayPicker.js";
|
|
9
9
|
import { cn as e } from "../../utils/cn.js";
|
|
10
10
|
import { Typography as x, typographyVariants as v } from "../Typography/Typography.js";
|
|
11
|
-
import { AltArrowLeftOutline as
|
|
12
|
-
const
|
|
11
|
+
import { AltArrowLeftOutline as U, AltArrowRightOutline as X, AltArrowDownOutline as Z } from "@solar-icons/react-perf";
|
|
12
|
+
const le = ({
|
|
13
13
|
leftPanelChildren: m,
|
|
14
14
|
defaultMonth: f,
|
|
15
15
|
numberOfMonths: n,
|
|
16
16
|
mode: i,
|
|
17
17
|
selected: d,
|
|
18
|
-
onSelect:
|
|
18
|
+
onSelect: b,
|
|
19
19
|
onReset: l,
|
|
20
20
|
onConfirm: c,
|
|
21
21
|
resetButtonText: u,
|
|
22
22
|
confirmButtonText: y,
|
|
23
23
|
renderResetButton: t,
|
|
24
|
-
renderConfirmButton:
|
|
24
|
+
renderConfirmButton: g,
|
|
25
25
|
bottomTextDefault: a,
|
|
26
|
-
dateFormatter: o =
|
|
27
|
-
dateRangeFormatter: s =
|
|
26
|
+
dateFormatter: o = J,
|
|
27
|
+
dateRangeFormatter: s = K,
|
|
28
28
|
disabledDates: h,
|
|
29
29
|
weekStartsOn: _ = 1,
|
|
30
|
-
excludeDisabled:
|
|
30
|
+
excludeDisabled: G,
|
|
31
31
|
hideNavigation: k,
|
|
32
32
|
hideCaption: N,
|
|
33
33
|
formatters: z,
|
|
@@ -35,116 +35,125 @@ const se = ({
|
|
|
35
35
|
showOutsideDays: D,
|
|
36
36
|
hideBottomText: C,
|
|
37
37
|
hideResetButton: T,
|
|
38
|
-
|
|
38
|
+
hideBottomBar: A,
|
|
39
|
+
startMonth: L,
|
|
39
40
|
endMonth: B,
|
|
40
|
-
min:
|
|
41
|
-
required:
|
|
41
|
+
min: V,
|
|
42
|
+
required: S = !0
|
|
42
43
|
}) => {
|
|
43
|
-
const { translations: w, dateFnsLocale:
|
|
44
|
+
const { translations: w, dateFnsLocale: R } = P(), q = u ?? w.calendar.resetButton, H = y ?? w.calendar.confirmButton, I = a ?? w.calendar.bottomTextDefault;
|
|
44
45
|
return /* @__PURE__ */ p("div", { className: "flex", children: [
|
|
45
46
|
m && /* @__PURE__ */ r("div", { className: "flex flex-col border-r border-stroke-base-primary py-sm", children: m }),
|
|
46
|
-
/* @__PURE__ */ p(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
required: L,
|
|
56
|
-
weekStartsOn: _,
|
|
57
|
-
disabled: h,
|
|
58
|
-
excludeDisabled: F,
|
|
59
|
-
locale: S,
|
|
60
|
-
hideNavigation: k,
|
|
61
|
-
hideCaption: N,
|
|
62
|
-
hideWeekdays: j,
|
|
63
|
-
showOutsideDays: D,
|
|
64
|
-
formatters: z,
|
|
65
|
-
startMonth: A,
|
|
66
|
-
endMonth: B,
|
|
67
|
-
min: G
|
|
68
|
-
}
|
|
69
|
-
) : /* @__PURE__ */ r(
|
|
70
|
-
Y,
|
|
71
|
-
{
|
|
72
|
-
numberOfMonths: n,
|
|
73
|
-
defaultMonth: f,
|
|
74
|
-
mode: "single",
|
|
75
|
-
selected: d,
|
|
76
|
-
onSelect: g,
|
|
77
|
-
required: L,
|
|
78
|
-
weekStartsOn: _,
|
|
79
|
-
disabled: h,
|
|
80
|
-
locale: S,
|
|
81
|
-
hideNavigation: k,
|
|
82
|
-
hideCaption: N,
|
|
83
|
-
hideWeekdays: j,
|
|
84
|
-
showOutsideDays: D,
|
|
85
|
-
startMonth: A,
|
|
86
|
-
endMonth: B,
|
|
87
|
-
formatters: z
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ p(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
className: e(
|
|
94
|
-
"mx-xl mt-lg mb-4 flex items-center justify-between",
|
|
47
|
+
/* @__PURE__ */ p(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: e("mt-2xl flex flex-col justify-between", {
|
|
51
|
+
"mb-4": A
|
|
52
|
+
}),
|
|
53
|
+
children: [
|
|
54
|
+
i === "range" ? /* @__PURE__ */ r(
|
|
55
|
+
E,
|
|
95
56
|
{
|
|
96
|
-
|
|
97
|
-
|
|
57
|
+
numberOfMonths: n,
|
|
58
|
+
defaultMonth: f,
|
|
59
|
+
mode: "range",
|
|
60
|
+
selected: d,
|
|
61
|
+
onSelect: b,
|
|
62
|
+
required: S,
|
|
63
|
+
weekStartsOn: _,
|
|
64
|
+
disabled: h,
|
|
65
|
+
excludeDisabled: G,
|
|
66
|
+
locale: R,
|
|
67
|
+
hideNavigation: k,
|
|
68
|
+
hideCaption: N,
|
|
69
|
+
hideWeekdays: j,
|
|
70
|
+
showOutsideDays: D,
|
|
71
|
+
formatters: z,
|
|
72
|
+
startMonth: L,
|
|
73
|
+
endMonth: B,
|
|
74
|
+
min: V
|
|
75
|
+
}
|
|
76
|
+
) : /* @__PURE__ */ r(
|
|
77
|
+
E,
|
|
98
78
|
{
|
|
99
|
-
|
|
79
|
+
numberOfMonths: n,
|
|
80
|
+
defaultMonth: f,
|
|
81
|
+
mode: "single",
|
|
82
|
+
selected: d,
|
|
83
|
+
onSelect: b,
|
|
84
|
+
required: S,
|
|
85
|
+
weekStartsOn: _,
|
|
86
|
+
disabled: h,
|
|
87
|
+
locale: R,
|
|
88
|
+
hideNavigation: k,
|
|
89
|
+
hideCaption: N,
|
|
90
|
+
hideWeekdays: j,
|
|
91
|
+
showOutsideDays: D,
|
|
92
|
+
startMonth: L,
|
|
93
|
+
endMonth: B,
|
|
94
|
+
formatters: z
|
|
100
95
|
}
|
|
101
96
|
),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
97
|
+
!A && /* @__PURE__ */ p(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: e(
|
|
101
|
+
"mx-xl mt-lg mb-4 flex items-center justify-between",
|
|
102
|
+
{
|
|
103
|
+
"flex-col items-start border-t border-stroke-base-primary pt-lg": n === 1
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"max-lg:flex-col max-lg:items-start max-lg:border-t max-lg:border-stroke-base-primary max-lg:pt-lg": n !== 1
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
children: [
|
|
110
|
+
!C && /* @__PURE__ */ r(
|
|
111
|
+
x,
|
|
112
|
+
{
|
|
113
|
+
component: "span",
|
|
114
|
+
variant: "body",
|
|
115
|
+
weight: "medium",
|
|
116
|
+
size: "base",
|
|
117
|
+
children: i === "range" && (d != null && d.from) ? s(d) : i === "single" && d ? o(d) : I
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ p(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
className: e("flex gap-2xl", {
|
|
124
|
+
"w-full justify-between gap-0": n === 1,
|
|
125
|
+
"pt-lg": n === 1 && !C,
|
|
126
|
+
"max-lg:w-full max-lg:justify-between max-lg:gap-0 max-lg:pt-lg": n !== 1,
|
|
127
|
+
"justify-end": T
|
|
128
|
+
}),
|
|
129
|
+
children: [
|
|
130
|
+
!T && (t ? t() : /* @__PURE__ */ r(Y, { variant: "link", onClick: l, children: q })),
|
|
131
|
+
g ? g() : /* @__PURE__ */ r(Y, { variant: "primary", size: "sm", onClick: c, children: H })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
)
|
|
132
141
|
] });
|
|
133
|
-
},
|
|
142
|
+
}, E = ({
|
|
134
143
|
className: m,
|
|
135
144
|
classNames: f,
|
|
136
145
|
showOutsideDays: n = !0,
|
|
137
146
|
captionLayout: i = "label",
|
|
138
147
|
formatters: d,
|
|
139
|
-
components:
|
|
148
|
+
components: b,
|
|
140
149
|
locale: l,
|
|
141
150
|
hideCaption: c,
|
|
142
151
|
hideWeekdays: u,
|
|
143
152
|
...y
|
|
144
153
|
}) => {
|
|
145
|
-
const t =
|
|
154
|
+
const t = F(), g = (l == null ? void 0 : l.code) ?? "default";
|
|
146
155
|
return /* @__PURE__ */ r(
|
|
147
|
-
|
|
156
|
+
Q,
|
|
148
157
|
{
|
|
149
158
|
showOutsideDays: n,
|
|
150
159
|
locale: l,
|
|
@@ -156,9 +165,9 @@ const se = ({
|
|
|
156
165
|
),
|
|
157
166
|
captionLayout: i,
|
|
158
167
|
formatters: {
|
|
159
|
-
formatMonthDropdown: (a) => a.toLocaleString(
|
|
160
|
-
formatWeekdayName: (a) => a.toLocaleString(
|
|
161
|
-
formatCaption: (a) => a.toLocaleString(
|
|
168
|
+
formatMonthDropdown: (a) => a.toLocaleString(g, { month: "short" }),
|
|
169
|
+
formatWeekdayName: (a) => a.toLocaleString(g, { weekday: "short" }),
|
|
170
|
+
formatCaption: (a) => a.toLocaleString(g, { month: "long", year: "numeric" }),
|
|
162
171
|
...d
|
|
163
172
|
},
|
|
164
173
|
classNames: {
|
|
@@ -293,7 +302,7 @@ const se = ({
|
|
|
293
302
|
weight: "medium",
|
|
294
303
|
size: "md",
|
|
295
304
|
children: /* @__PURE__ */ r(
|
|
296
|
-
|
|
305
|
+
U,
|
|
297
306
|
{
|
|
298
307
|
className: e(
|
|
299
308
|
"inline size-comp-calendar-ico-size text-comp-select-icon-brand-def",
|
|
@@ -311,7 +320,7 @@ const se = ({
|
|
|
311
320
|
weight: "medium",
|
|
312
321
|
size: "md",
|
|
313
322
|
children: /* @__PURE__ */ r(
|
|
314
|
-
|
|
323
|
+
X,
|
|
315
324
|
{
|
|
316
325
|
className: e(
|
|
317
326
|
"inline size-comp-calendar-ico-size text-comp-select-icon-brand-def",
|
|
@@ -322,15 +331,15 @@ const se = ({
|
|
|
322
331
|
)
|
|
323
332
|
}
|
|
324
333
|
) : /* @__PURE__ */ r(
|
|
325
|
-
|
|
334
|
+
Z,
|
|
326
335
|
{
|
|
327
336
|
className: e("size-comp-calendar-ico-size", a),
|
|
328
337
|
...s
|
|
329
338
|
}
|
|
330
339
|
),
|
|
331
|
-
DayButton:
|
|
340
|
+
DayButton: $,
|
|
332
341
|
WeekNumber: ({ children: a, ...o }) => /* @__PURE__ */ r("td", { ...o, children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center text-center", children: a }) }),
|
|
333
|
-
...
|
|
342
|
+
...b,
|
|
334
343
|
// When weekdays are hidden, replace the table-based layout (table > tbody > tr > td)
|
|
335
344
|
// with a CSS Grid to create a continuous day flow. Without this, months starting
|
|
336
345
|
// mid-week have invisible gap cells from outside days. The grid approach:
|
|
@@ -363,16 +372,16 @@ const se = ({
|
|
|
363
372
|
...y
|
|
364
373
|
}
|
|
365
374
|
);
|
|
366
|
-
},
|
|
375
|
+
}, $ = ({
|
|
367
376
|
className: m,
|
|
368
377
|
day: f,
|
|
369
378
|
modifiers: n,
|
|
370
379
|
children: i,
|
|
371
380
|
disabled: d,
|
|
372
|
-
...
|
|
381
|
+
...b
|
|
373
382
|
}) => {
|
|
374
|
-
const l =
|
|
375
|
-
return
|
|
383
|
+
const l = F(), c = W.useRef(null);
|
|
384
|
+
return W.useEffect(() => {
|
|
376
385
|
var u;
|
|
377
386
|
n.focused && ((u = c.current) == null || u.focus());
|
|
378
387
|
}, [n.focused]), /* @__PURE__ */ r(
|
|
@@ -401,7 +410,7 @@ const se = ({
|
|
|
401
410
|
l.day,
|
|
402
411
|
m
|
|
403
412
|
),
|
|
404
|
-
...
|
|
413
|
+
...b,
|
|
405
414
|
children: /* @__PURE__ */ r(
|
|
406
415
|
x,
|
|
407
416
|
{
|
|
@@ -418,7 +427,7 @@ const se = ({
|
|
|
418
427
|
);
|
|
419
428
|
};
|
|
420
429
|
export {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
430
|
+
le as Calendar,
|
|
431
|
+
E as CalendarBase,
|
|
432
|
+
$ as CalendarDayButton
|
|
424
433
|
};
|
|
@@ -81,6 +81,8 @@ export type DatePickerProps = {
|
|
|
81
81
|
disableRequiredAsterisk?: boolean;
|
|
82
82
|
/** Number of months to display side by side. @default 2 on desktop, 1 on mobile */
|
|
83
83
|
numberOfMonths?: 1 | 2;
|
|
84
|
+
/** Hides the entire bottom bar (text, reset button, and confirm button). Only effective when `immediateCommit` is true. @default false */
|
|
85
|
+
hideBottomBar?: boolean;
|
|
84
86
|
} & Omit<CalendarBaseProps, 'numberOfMonths' | 'onConfirm' | 'onReset' | 'isExpanded' | 'leftPanelChildren' | 'bottomTextDefault' | 'dateFormatter' | 'dateRangeFormatter' | 'required'> & (DatePickerRangeProps | DatePickerSingleProps);
|
|
85
87
|
/** Props for date range selection mode. */
|
|
86
88
|
export type DatePickerRangeProps = {
|
|
@@ -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;AAKpB,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,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,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,8GA4PtB,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
|
|
6
|
-
import { getDateRange as
|
|
7
|
-
import { resolveOneDayRange as
|
|
8
|
-
import { Input as
|
|
9
|
-
import { formatDate as
|
|
10
|
-
import { formatDateRange as
|
|
1
|
+
import { jsx as n, jsxs as rt } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ot, useState as k, useRef as E, useEffect as et } from "react";
|
|
3
|
+
import { useIsDesktop as it } from "../../hooks/use-is-desktop.js";
|
|
4
|
+
import { useIsMobile as ft } from "../../hooks/use-is-mobile.js";
|
|
5
|
+
import { Popover as pt, PopoverTrigger as ct, PopoverContent as nt } from "../Popover/Popover.js";
|
|
6
|
+
import { getDateRange as dt } from "./utils/getDateRange.js";
|
|
7
|
+
import { resolveOneDayRange as ut } from "./utils/resolveOneDayRange.js";
|
|
8
|
+
import { Input as bt } from "../Input/Input.js";
|
|
9
|
+
import { formatDate as st } from "../Calendar/utils/formatDate.js";
|
|
10
|
+
import { formatDateRange as xt } from "../Calendar/utils/formatDateRange.js";
|
|
11
11
|
import { Calendar as Y } from "../Calendar/Calendar.js";
|
|
12
12
|
import { cn as l } from "../../utils/cn.js";
|
|
13
|
-
import { typographyVariants as
|
|
14
|
-
import { CalendarBold as
|
|
15
|
-
const
|
|
13
|
+
import { typographyVariants as lt } from "../Typography/Typography.js";
|
|
14
|
+
import { CalendarBold as yt } from "@solar-icons/react-perf";
|
|
15
|
+
const vt = ot(
|
|
16
16
|
({
|
|
17
17
|
alignCalendar: G,
|
|
18
|
-
mode:
|
|
19
|
-
allowedPresets:
|
|
18
|
+
mode: y,
|
|
19
|
+
allowedPresets: v,
|
|
20
20
|
dateFormatter: H,
|
|
21
21
|
value: e,
|
|
22
22
|
defaultValue: b,
|
|
@@ -33,8 +33,8 @@ const mt = rt(
|
|
|
33
33
|
side: U = "bottom",
|
|
34
34
|
renderCustomTrigger: S,
|
|
35
35
|
immediateCommit: f,
|
|
36
|
-
allowOneDayRange:
|
|
37
|
-
shouldResetToDefaultValue:
|
|
36
|
+
allowOneDayRange: B,
|
|
37
|
+
shouldResetToDefaultValue: I,
|
|
38
38
|
required: x,
|
|
39
39
|
disableRequiredAsterisk: W,
|
|
40
40
|
numberOfMonths: X,
|
|
@@ -44,25 +44,26 @@ const mt = rt(
|
|
|
44
44
|
showOutsideDays: V,
|
|
45
45
|
hideBottomText: q,
|
|
46
46
|
hideResetButton: w,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
hideBottomBar: O,
|
|
48
|
+
...g
|
|
49
|
+
}, a) => {
|
|
50
|
+
const N = it(), h = ft(), [C, M] = k(!1), P = typeof s == "boolean" ? s : C, [F, p] = k(
|
|
50
51
|
e ?? b
|
|
51
|
-
), [i, u] = k(e ?? b),
|
|
52
|
+
), [i, u] = k(e ?? b), j = E(!1), m = E(
|
|
52
53
|
e ?? b
|
|
53
54
|
);
|
|
54
|
-
|
|
55
|
-
if (!
|
|
56
|
-
|
|
55
|
+
et(() => {
|
|
56
|
+
if (!j.current) {
|
|
57
|
+
j.current = !0;
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
|
-
p(e), u(e),
|
|
60
|
+
p(e), u(e), P || (m.current = e);
|
|
60
61
|
}, [e]);
|
|
61
|
-
const
|
|
62
|
+
const tt = v == null ? void 0 : v.map((t) => /* @__PURE__ */ n(
|
|
62
63
|
"button",
|
|
63
64
|
{
|
|
64
65
|
className: l(
|
|
65
|
-
|
|
66
|
+
lt({
|
|
66
67
|
variant: "cta",
|
|
67
68
|
weight: "medium",
|
|
68
69
|
size: "sm",
|
|
@@ -75,40 +76,41 @@ const mt = rt(
|
|
|
75
76
|
o == null ? void 0 : o.leftPanelButton
|
|
76
77
|
),
|
|
77
78
|
onClick: () => {
|
|
78
|
-
const c =
|
|
79
|
+
const c = dt(t.type);
|
|
79
80
|
u(c), f && (p(c), r == null || r(c));
|
|
80
81
|
},
|
|
81
82
|
children: t.name
|
|
82
83
|
},
|
|
83
84
|
t.type
|
|
84
|
-
)), D = H ?? (
|
|
85
|
-
...
|
|
86
|
-
numberOfMonths: X ?? (
|
|
85
|
+
)), D = H ?? (y === "single" ? st : xt), z = f ? e !== void 0 ? e : i : F, A = {
|
|
86
|
+
...g,
|
|
87
|
+
numberOfMonths: X ?? (N ? 2 : 1),
|
|
87
88
|
hideNavigation: Z,
|
|
88
89
|
hideCaption: _,
|
|
89
90
|
hideWeekdays: $,
|
|
90
91
|
showOutsideDays: V,
|
|
91
92
|
hideBottomText: q,
|
|
92
93
|
hideResetButton: w,
|
|
94
|
+
hideBottomBar: f ? O : void 0,
|
|
93
95
|
required: x,
|
|
94
96
|
onReset: () => {
|
|
95
|
-
const t =
|
|
97
|
+
const t = I ? b : f ? m.current : F;
|
|
96
98
|
u(t), f && (p(t), r == null || r(t));
|
|
97
99
|
},
|
|
98
100
|
onConfirm: () => {
|
|
99
|
-
f ? p(i) : (i !== void 0 ||
|
|
101
|
+
f ? p(i) : (i !== void 0 || I || x === !1) && (p(i), r == null || r(i)), s === void 0 && M(!1), d == null || d(!1);
|
|
100
102
|
}
|
|
101
103
|
};
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
|
|
104
|
+
return /* @__PURE__ */ rt(
|
|
105
|
+
pt,
|
|
104
106
|
{
|
|
105
|
-
open:
|
|
107
|
+
open: P,
|
|
106
108
|
onOpenChange: (t) => {
|
|
107
|
-
t && (
|
|
109
|
+
t && (m.current = e ?? i), s === void 0 && M(t), d == null || d(t);
|
|
108
110
|
},
|
|
109
111
|
children: [
|
|
110
112
|
/* @__PURE__ */ n(
|
|
111
|
-
|
|
113
|
+
ct,
|
|
112
114
|
{
|
|
113
115
|
className: l(
|
|
114
116
|
"group cursor-pointer rounded-full text-left outline-0",
|
|
@@ -116,10 +118,10 @@ const mt = rt(
|
|
|
116
118
|
),
|
|
117
119
|
disabled: R,
|
|
118
120
|
children: S ? S() : /* @__PURE__ */ n(
|
|
119
|
-
|
|
121
|
+
bt,
|
|
120
122
|
{
|
|
121
|
-
ref:
|
|
122
|
-
value:
|
|
123
|
+
ref: a,
|
|
124
|
+
value: z ? D(z) : "",
|
|
123
125
|
placeholder: Q,
|
|
124
126
|
error: J,
|
|
125
127
|
disabled: R,
|
|
@@ -133,20 +135,20 @@ const mt = rt(
|
|
|
133
135
|
o == null ? void 0 : o.input,
|
|
134
136
|
"group-hover:border-comp-input-stroke-hover group-focus-visible:border-comp-input-stroke-focused"
|
|
135
137
|
),
|
|
136
|
-
suffix: /* @__PURE__ */ n(
|
|
138
|
+
suffix: /* @__PURE__ */ n(yt, { className: "size-icon-medium text-icon-dark-secondary-def" })
|
|
137
139
|
}
|
|
138
140
|
)
|
|
139
141
|
}
|
|
140
142
|
),
|
|
141
143
|
/* @__PURE__ */ n(
|
|
142
|
-
|
|
144
|
+
nt,
|
|
143
145
|
{
|
|
144
146
|
className: l("flex w-auto p-0", o == null ? void 0 : o.popoverContent),
|
|
145
147
|
align: G,
|
|
146
148
|
side: U,
|
|
147
149
|
avoidCollisions: T,
|
|
148
150
|
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
149
|
-
children:
|
|
151
|
+
children: y === "single" ? /* @__PURE__ */ n(
|
|
150
152
|
Y,
|
|
151
153
|
{
|
|
152
154
|
...A,
|
|
@@ -162,17 +164,17 @@ const mt = rt(
|
|
|
162
164
|
{
|
|
163
165
|
...A,
|
|
164
166
|
mode: "range",
|
|
165
|
-
min:
|
|
167
|
+
min: B ? 1 : void 0,
|
|
166
168
|
selected: i,
|
|
167
169
|
onSelect: (t) => {
|
|
168
|
-
const c =
|
|
170
|
+
const c = B ? ut(
|
|
169
171
|
i,
|
|
170
172
|
t,
|
|
171
173
|
x
|
|
172
174
|
) : t;
|
|
173
175
|
u(c), f && (p(c), r == null || r(c));
|
|
174
176
|
},
|
|
175
|
-
leftPanelChildren:
|
|
177
|
+
leftPanelChildren: y === "range" && !h && tt,
|
|
176
178
|
dateRangeFormatter: D
|
|
177
179
|
}
|
|
178
180
|
)
|
|
@@ -183,7 +185,7 @@ const mt = rt(
|
|
|
183
185
|
);
|
|
184
186
|
}
|
|
185
187
|
);
|
|
186
|
-
|
|
188
|
+
vt.displayName = "DatePicker";
|
|
187
189
|
export {
|
|
188
|
-
|
|
190
|
+
vt as DatePicker
|
|
189
191
|
};
|
|
@@ -17,6 +17,7 @@ export declare const ResetButtonResetsToStoryDate: Story;
|
|
|
17
17
|
export declare const Required: Story;
|
|
18
18
|
export declare const SingleMonth: Story;
|
|
19
19
|
export declare const ImmediateCommitRange: Story;
|
|
20
|
+
export declare const ImmediateCommitHiddenBottomBar: Story;
|
|
20
21
|
export declare const AllowOneDayRange: Story;
|
|
21
22
|
export declare const NotRequired: Story;
|
|
22
23
|
export declare const MonthlyView: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAKzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"DatePicker.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DatePicker/DatePicker.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAKzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAiMjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,iBAAiB,EAAE,KAoC/B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAsB9B,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,KAuBxC,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA0B7B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAwBtB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,KAyBxC,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,KAmCzC,CAAA;AAED,eAAO,MAAM,qCAAqC,EAAE,KA8CnD,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAyB1C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAyB1C,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KA0BtB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAwBzB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAkClC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,KAiC5C,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAkC9B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAoCzB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAqCzB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA6CxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["../../../src/components/FileUpload/FileItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["../../../src/components/FileUpload/FileItem.tsx"],"names":[],"mappings":"AA6CA,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;CAC/C;AAED,UAAU,iBAAkB,SAAQ,iBAAiB;IACnD,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,IAAI,CAAA;CACX;AAED,UAAU,gBAAiB,SAAQ,iBAAiB;IAClD,MAAM,EAAE,KAAK,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,KAAK,aAAa,GAAG,iBAAiB,GAAG,gBAAgB,CAAA;AA0EzD,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CA8M5C,CAAA"}
|