@vkzstudio/muza-ui 1.0.28 → 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.
@@ -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,OAAO,EAEb,MAAM,kBAAkB,CAAA;AAazB;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,CAAA;AAE5C;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,+CAA+C;IAC/C,cAAc,EAAE,CAAC,GAAG,CAAC,CAAA;IACrB,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACnC,wDAAwD;IACxD,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC/B,gDAAgD;IAChD,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,8DAA8D;IAC9D,iBAAiB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAA;IACzC,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAA;IAC3C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAA;IACtC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,CAAA;IACjD,0HAA0H;IAC1H,iBAAiB,CAAC,EAAE,MA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,EAAE,IAAI,CAAA;IACjB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,IAAI,CAAA;IACf,wFAAwF;IACxF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,qGAAqG;IACrG,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,2CAA2C;AAC3C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oCAAoC;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,qCAAqC;IACrC,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,CAAA;CAClD,CAAA;AAED,4CAA4C;AAC5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,qCAAqC;IACrC,IAAI,EAAE,QAAQ,CAAA;IACd,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IAC3B,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,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 R from "react";
3
- import { formatDate as I } from "./utils/formatDate.js";
4
- import { formatDateRange as J } from "./utils/formatDateRange.js";
5
- import { useMuzaTranslationContext as K } from "../../translations/TranslationContext.js";
6
- import { Button as W } from "../Button/Button.js";
7
- import { getDefaultClassNames as E } from "../../node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js";
8
- import { DayPicker as P } from "../../node_modules/react-day-picker/dist/esm/DayPicker.js";
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 Q, AltArrowRightOutline as U, AltArrowDownOutline as X } from "@solar-icons/react-perf";
12
- const se = ({
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: g,
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: b,
24
+ renderConfirmButton: g,
25
25
  bottomTextDefault: a,
26
- dateFormatter: o = I,
27
- dateRangeFormatter: s = J,
26
+ dateFormatter: o = J,
27
+ dateRangeFormatter: s = K,
28
28
  disabledDates: h,
29
29
  weekStartsOn: _ = 1,
30
- excludeDisabled: F,
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
- startMonth: A,
38
+ hideBottomBar: A,
39
+ startMonth: L,
39
40
  endMonth: B,
40
- min: G,
41
- required: L = !0
41
+ min: V,
42
+ required: S = !0
42
43
  }) => {
43
- const { translations: w, dateFnsLocale: S } = K(), V = u ?? w.calendar.resetButton, q = y ?? w.calendar.confirmButton, H = a ?? w.calendar.bottomTextDefault;
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("div", { className: "mt-2xl flex flex-col justify-between", children: [
47
- i === "range" ? /* @__PURE__ */ r(
48
- Y,
49
- {
50
- numberOfMonths: n,
51
- defaultMonth: f,
52
- mode: "range",
53
- selected: d,
54
- onSelect: g,
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
- "flex-col items-start border-t border-stroke-base-primary pt-lg": n === 1
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
- "max-lg:flex-col max-lg:items-start max-lg:border-t max-lg:border-stroke-base-primary max-lg:pt-lg": n !== 1
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
- children: [
103
- !C && /* @__PURE__ */ r(
104
- x,
105
- {
106
- component: "span",
107
- variant: "body",
108
- weight: "medium",
109
- size: "base",
110
- children: i === "range" && (d != null && d.from) ? s(d) : i === "single" && d ? o(d) : H
111
- }
112
- ),
113
- /* @__PURE__ */ p(
114
- "div",
115
- {
116
- className: e("flex gap-2xl", {
117
- "w-full justify-between gap-0": n === 1,
118
- "pt-lg": n === 1 && !C,
119
- "max-lg:w-full max-lg:justify-between max-lg:gap-0 max-lg:pt-lg": n !== 1,
120
- "justify-end": T
121
- }),
122
- children: [
123
- !T && (t ? t() : /* @__PURE__ */ r(W, { variant: "link", onClick: l, children: V })),
124
- b ? b() : /* @__PURE__ */ r(W, { variant: "primary", size: "sm", onClick: c, children: q })
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
- }, Y = ({
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: g,
148
+ components: b,
140
149
  locale: l,
141
150
  hideCaption: c,
142
151
  hideWeekdays: u,
143
152
  ...y
144
153
  }) => {
145
- const t = E(), b = (l == null ? void 0 : l.code) ?? "default";
154
+ const t = F(), g = (l == null ? void 0 : l.code) ?? "default";
146
155
  return /* @__PURE__ */ r(
147
- P,
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(b, { month: "short" }),
160
- formatWeekdayName: (a) => a.toLocaleString(b, { weekday: "short" }),
161
- formatCaption: (a) => a.toLocaleString(b, { month: "long", year: "numeric" }),
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
- Q,
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
- U,
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
- X,
334
+ Z,
326
335
  {
327
336
  className: e("size-comp-calendar-ico-size", a),
328
337
  ...s
329
338
  }
330
339
  ),
331
- DayButton: Z,
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
- ...g,
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
- }, Z = ({
375
+ }, $ = ({
367
376
  className: m,
368
377
  day: f,
369
378
  modifiers: n,
370
379
  children: i,
371
380
  disabled: d,
372
- ...g
381
+ ...b
373
382
  }) => {
374
- const l = E(), c = R.useRef(null);
375
- return R.useEffect(() => {
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
- ...g,
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
- se as Calendar,
422
- Y as CalendarBase,
423
- Z as CalendarDayButton
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,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AqB,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,8GA4PtB,CAAA"}
@@ -1,22 +1,22 @@
1
- import { jsx as n, jsxs as tt } from "react/jsx-runtime";
2
- import { forwardRef as rt, useState as k, useRef as E, useEffect as ot } from "react";
3
- import { useIsDesktop as et } from "../../hooks/use-is-desktop.js";
4
- import { useIsMobile as it } from "../../hooks/use-is-mobile.js";
5
- import { Popover as ft, PopoverTrigger as pt, PopoverContent as ct } from "../Popover/Popover.js";
6
- import { getDateRange as nt } from "./utils/getDateRange.js";
7
- import { resolveOneDayRange as dt } from "./utils/resolveOneDayRange.js";
8
- import { Input as ut } from "../Input/Input.js";
9
- import { formatDate as bt } from "../Calendar/utils/formatDate.js";
10
- import { formatDateRange as st } from "../Calendar/utils/formatDateRange.js";
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 xt } from "../Typography/Typography.js";
14
- import { CalendarBold as lt } from "@solar-icons/react-perf";
15
- const mt = rt(
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: m,
19
- allowedPresets: y,
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: I,
37
- shouldResetToDefaultValue: M,
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
- ...O
48
- }, g) => {
49
- const a = et(), N = it(), [h, P] = k(!1), F = typeof s == "boolean" ? s : h, [j, p] = k(
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), z = E(!1), v = E(
52
+ ), [i, u] = k(e ?? b), j = E(!1), m = E(
52
53
  e ?? b
53
54
  );
54
- ot(() => {
55
- if (!z.current) {
56
- z.current = !0;
55
+ et(() => {
56
+ if (!j.current) {
57
+ j.current = !0;
57
58
  return;
58
59
  }
59
- p(e), u(e), F || (v.current = e);
60
+ p(e), u(e), P || (m.current = e);
60
61
  }, [e]);
61
- const C = y == null ? void 0 : y.map((t) => /* @__PURE__ */ n(
62
+ const tt = v == null ? void 0 : v.map((t) => /* @__PURE__ */ n(
62
63
  "button",
63
64
  {
64
65
  className: l(
65
- xt({
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 = nt(t.type);
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 ?? (m === "single" ? bt : st), B = f ? e !== void 0 ? e : i : j, A = {
85
- ...O,
86
- numberOfMonths: X ?? (a ? 2 : 1),
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 = M ? b : f ? v.current : j;
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 || M || x === !1) && (p(i), r == null || r(i)), s === void 0 && P(!1), d == null || d(!1);
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__ */ tt(
103
- ft,
104
+ return /* @__PURE__ */ rt(
105
+ pt,
104
106
  {
105
- open: F,
107
+ open: P,
106
108
  onOpenChange: (t) => {
107
- t && (v.current = e ?? i), s === void 0 && P(t), d == null || d(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
- pt,
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
- ut,
121
+ bt,
120
122
  {
121
- ref: g,
122
- value: B ? D(B) : "",
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(lt, { className: "size-icon-medium text-icon-dark-secondary-def" })
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
- ct,
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: m === "single" ? /* @__PURE__ */ n(
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: I ? 1 : void 0,
167
+ min: B ? 1 : void 0,
166
168
  selected: i,
167
169
  onSelect: (t) => {
168
- const c = I ? dt(
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: m === "range" && !N && C,
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
- mt.displayName = "DatePicker";
188
+ vt.displayName = "DatePicker";
187
189
  export {
188
- mt as DatePicker
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,CA2LjC,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,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AO,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":"AA4CA,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;AA2DzD,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,4CA6L5C,CAAA"}
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"}
@@ -1,21 +1,21 @@
1
- import { jsxs as p, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
2
  import * as f from "react";
3
- import { cva as z } from "class-variance-authority";
4
- import { useMuzaTranslations as L } from "../../translations/TranslationContext.js";
3
+ import { cva as C } from "class-variance-authority";
4
+ import { useMuzaTranslations as O } from "../../translations/TranslationContext.js";
5
5
  import { cn as l } from "../../utils/cn.js";
6
- import { GalleryOutline as B, CloseCircleBold as C, DownloadMinimalisticBold as R, TrashBinTrashBold as j } from "@solar-icons/react-perf";
7
- import { Typography as b } from "../Typography/Typography.js";
8
- const E = (e, a, t) => {
9
- let r = null, o = null;
6
+ import { GalleryOutline as T, FileTextBold as B, CloseCircleBold as M, DownloadMinimalisticBold as I, TrashBinTrashBold as R } from "@solar-icons/react-perf";
7
+ import { Typography as x } from "../Typography/Typography.js";
8
+ const j = (e, a, i) => {
9
+ let n = null, o = null;
10
10
  try {
11
- r = URL.createObjectURL(e), o = document.createElement("a"), o.href = r, o.download = e.name, o.style.display = "none", document.body.appendChild(o), o.click();
11
+ n = URL.createObjectURL(e), o = document.createElement("a"), o.href = n, o.download = e.name, o.style.display = "none", document.body.appendChild(o), o.click();
12
12
  } catch (d) {
13
- const s = d instanceof Error ? d.message : t ?? "Download failed";
14
- console.error("Download failed:", d), a == null || a(s, e);
13
+ const c = d instanceof Error ? d.message : i ?? "Download failed";
14
+ console.error("Download failed:", d), a == null || a(c, e);
15
15
  } finally {
16
- o && document.body.contains(o) && document.body.removeChild(o), r && URL.revokeObjectURL(r);
16
+ o && document.body.contains(o) && document.body.removeChild(o), n && URL.revokeObjectURL(n);
17
17
  }
18
- }, O = z(
18
+ }, D = C(
19
19
  [
20
20
  "flex flex-1 items-center gap-sm rounded-full border transition-colors",
21
21
  "relative pr-comp-input-p-hor pl-comp-input-p-hor",
@@ -66,37 +66,50 @@ const E = (e, a, t) => {
66
66
  "bg-none cursor-pointer disabled:cursor-not-allowed",
67
67
  "text-comp-file-upload-icon-def-secondary",
68
68
  "disabled:text-comp-file-upload-icon-def-disabled"
69
- ]), I = /\.(jpe?g|png|gif|webp|svg|bmp|ico|avif|tiff?)$/i, G = (e) => {
69
+ ]), S = /\.(jpe?g|png|gif|webp|svg|bmp|ico|avif|tiff?)$/i, k = /\.(pdf|docx?|txt|rtf|odt|xlsx?|csv|pptx?|md|tex)$/i, U = [
70
+ "application/pdf",
71
+ "application/msword",
72
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
73
+ "text/plain",
74
+ "text/csv",
75
+ "text/markdown",
76
+ "application/rtf",
77
+ "application/vnd.oasis.opendocument.text",
78
+ "application/vnd.ms-excel",
79
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
80
+ "application/vnd.ms-powerpoint",
81
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation"
82
+ ], W = (e) => {
70
83
  const {
71
84
  uploaded: a,
72
- progress: t,
73
- size: r,
85
+ progress: i,
86
+ size: n,
74
87
  disabled: o,
75
88
  readOnly: d = !1,
76
- note: s,
77
- error: c,
78
- onDelete: x,
79
- onError: k
80
- } = e, m = L(), [g, y] = f.useState(!1), v = e.source === "file" ? e.file.name : e.name, w = e.source === "url" ? (e.type ?? "").startsWith("image/") || I.test(e.name) : e.file.type.startsWith("image/"), n = e.source === "file" ? e.file : e.url, U = f.useMemo(() => o ? "disabled" : c ? "error" : typeof t == "number" && t > 0 ? "loading" : "default", [o, c, t]), u = f.useMemo(() => {
81
- if (w)
82
- return typeof n == "string" ? n : URL.createObjectURL(n);
83
- }, [w, n]);
84
- return f.useEffect(() => y(!1), [n]), /* @__PURE__ */ p("li", { className: "flex flex-col gap-sm", children: [
85
- /* @__PURE__ */ p(
89
+ note: c,
90
+ error: s,
91
+ onDelete: g,
92
+ onError: z
93
+ } = e, m = O(), [v, y] = f.useState(!1), w = e.source === "file" ? e.file.name : e.name, p = e.source === "url" ? (e.type ?? "").startsWith("image/") || S.test(e.name) : e.file.type.startsWith("image/"), E = e.source === "url" ? U.includes(e.type ?? "") || k.test(e.name) : U.includes(e.file.type) || k.test(e.file.name), r = e.source === "file" ? e.file : e.url, L = f.useMemo(() => o ? "disabled" : s ? "error" : typeof i == "number" && i > 0 ? "loading" : "default", [o, s, i]), u = f.useMemo(() => {
94
+ if (p)
95
+ return typeof r == "string" ? r : URL.createObjectURL(r);
96
+ }, [p, r]);
97
+ return f.useEffect(() => y(!1), [r]), /* @__PURE__ */ b("li", { className: "flex flex-col gap-sm", children: [
98
+ /* @__PURE__ */ b(
86
99
  "div",
87
100
  {
88
101
  className: l(
89
- O({
90
- variant: U,
91
- size: r
102
+ D({
103
+ variant: L,
104
+ size: n
92
105
  })
93
106
  ),
94
107
  children: [
95
- u && !g && /* @__PURE__ */ i(
108
+ u && !v && /* @__PURE__ */ t(
96
109
  "img",
97
110
  {
98
111
  src: u,
99
- alt: v,
112
+ alt: w,
100
113
  width: 24,
101
114
  height: 24,
102
115
  onError: () => y(!0),
@@ -105,32 +118,43 @@ const E = (e, a, t) => {
105
118
  })
106
119
  }
107
120
  ),
108
- u && g && /* @__PURE__ */ i(
121
+ u && v && /* @__PURE__ */ t(
122
+ T,
123
+ {
124
+ className: l(
125
+ "size-icon-medium shrink-0 text-comp-file-upload-icon-def-secondary",
126
+ {
127
+ "opacity-50": o
128
+ }
129
+ )
130
+ }
131
+ ),
132
+ !p && E && /* @__PURE__ */ t(
109
133
  B,
110
134
  {
111
135
  className: l(
112
- "text-icon-dark-secondary size-icon-medium shrink-0",
136
+ "size-icon-medium shrink-0 text-comp-file-upload-icon-def-secondary",
113
137
  {
114
138
  "opacity-50": o
115
139
  }
116
140
  )
117
141
  }
118
142
  ),
119
- /* @__PURE__ */ i(
120
- b,
143
+ /* @__PURE__ */ t(
144
+ x,
121
145
  {
122
146
  className: "flex-grow truncate",
123
147
  component: "span",
124
148
  size: "sm",
125
149
  fixY: !0,
126
- children: v
150
+ children: w
127
151
  }
128
152
  ),
129
- !a && /* @__PURE__ */ i(
153
+ !a && /* @__PURE__ */ t(
130
154
  "button",
131
155
  {
132
156
  disabled: o,
133
- onClick: x,
157
+ onClick: g,
134
158
  "aria-label": m.fileUpload.deleteButtonAriaLabel,
135
159
  className: l(
136
160
  h,
@@ -139,11 +163,11 @@ const E = (e, a, t) => {
139
163
  "focus-visible:text-comp-file-upload-icon-def-focused",
140
164
  "disabled:text-comp-file-upload-icon-def-disabled"
141
165
  ),
142
- children: /* @__PURE__ */ i(C, { className: "size-icon-medium" })
166
+ children: /* @__PURE__ */ t(M, { className: "size-icon-medium" })
143
167
  }
144
168
  ),
145
- a && /* @__PURE__ */ p("div", { className: "flex gap-xl", children: [
146
- /* @__PURE__ */ i(
169
+ a && /* @__PURE__ */ b("div", { className: "flex gap-xl", children: [
170
+ /* @__PURE__ */ t(
147
171
  "button",
148
172
  {
149
173
  disabled: o,
@@ -160,9 +184,9 @@ const E = (e, a, t) => {
160
184
  );
161
185
  } catch {
162
186
  }
163
- })() : E(
187
+ })() : j(
164
188
  e.file,
165
- k,
189
+ z,
166
190
  m.fileUpload.downloadError
167
191
  ),
168
192
  "aria-label": m.fileUpload.downloadButtonAriaLabel,
@@ -173,14 +197,14 @@ const E = (e, a, t) => {
173
197
  "focus-visible:text-comp-file-upload-icon-brand-focused",
174
198
  "disabled:text-comp-file-upload-icon-brand-disabled"
175
199
  ),
176
- children: /* @__PURE__ */ i(R, { className: "size-icon-medium" })
200
+ children: /* @__PURE__ */ t(I, { className: "size-icon-medium" })
177
201
  }
178
202
  ),
179
- !d && /* @__PURE__ */ i(
203
+ !d && /* @__PURE__ */ t(
180
204
  "button",
181
205
  {
182
206
  disabled: o,
183
- onClick: x,
207
+ onClick: g,
184
208
  "aria-label": m.fileUpload.deleteButtonAriaLabel,
185
209
  className: l(
186
210
  h,
@@ -189,44 +213,44 @@ const E = (e, a, t) => {
189
213
  "focus-visible:text-comp-file-upload-icon-error-focused",
190
214
  "disabled:text-comp-file-upload-icon-error-disabled"
191
215
  ),
192
- children: /* @__PURE__ */ i(j, { className: "size-icon-medium" })
216
+ children: /* @__PURE__ */ t(R, { className: "size-icon-medium" })
193
217
  }
194
218
  )
195
219
  ] }),
196
- typeof t == "number" && t !== 0 && /* @__PURE__ */ i(
220
+ typeof i == "number" && i !== 0 && /* @__PURE__ */ t(
197
221
  "div",
198
222
  {
199
- style: { width: `${t}%` },
223
+ style: { width: `${i}%` },
200
224
  className: "absolute bottom-0 left-0 min-h-[3px] bg-comp-file-upload-icon-brand-def transition-[width] duration-300 ease-out"
201
225
  }
202
226
  )
203
227
  ]
204
228
  }
205
229
  ),
206
- s && /* @__PURE__ */ i(
207
- b,
230
+ c && /* @__PURE__ */ t(
231
+ x,
208
232
  {
209
233
  size: "sm",
210
234
  component: "span",
211
235
  variant: "body",
212
236
  weight: "regular",
213
237
  className: "text-comp-input-text-secondary",
214
- children: s
238
+ children: c
215
239
  }
216
240
  ),
217
- c && /* @__PURE__ */ i(
218
- b,
241
+ s && /* @__PURE__ */ t(
242
+ x,
219
243
  {
220
244
  size: "sm",
221
245
  component: "span",
222
246
  variant: "body",
223
247
  weight: "regular",
224
248
  className: "text-comp-input-text-error",
225
- children: c
249
+ children: s
226
250
  }
227
251
  )
228
252
  ] });
229
253
  };
230
254
  export {
231
- G as FileItem
255
+ W as FileItem
232
256
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkzstudio/muza-ui",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "React component library built with Vite, shadcn/ui, and Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",