@vkzstudio/muza-ui 1.0.6 → 1.0.7
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/Button/buttonVariants.d.ts +1 -1
- package/dist/components/Calendar/Calendar.d.ts +2 -2
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +158 -150
- package/dist/components/DataTable/DataTable.d.ts +17 -0
- package/dist/components/DataTable/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.js +73 -0
- package/dist/components/DataTable/DataTable.stories.d.ts +10 -0
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +28 -26
- package/dist/components/ExpandableTable/Table.d.ts +1 -1
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +81 -77
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +98 -94
- package/dist/components/Flex/Flex.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +51 -50
- package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts +19 -0
- package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts.map +1 -0
- package/dist/components/MuzaUIProvider/MuzaUIProvider.js +19 -0
- package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts +10 -0
- package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts.map +1 -0
- package/dist/components/MuzaUIProvider/index.d.ts +2 -0
- package/dist/components/MuzaUIProvider/index.d.ts.map +1 -0
- package/dist/components/Searchbar/Searchbar.d.ts +1 -1
- package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.js +50 -49
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +43 -42
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +43 -42
- package/dist/components/SwipeButton/SwipeButton.d.ts +1 -1
- package/dist/components/SwipeButton/SwipeButton.d.ts.map +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +85 -84
- package/dist/components/SwipeButton/SwipeButton.stories.d.ts +1 -1
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +204 -189
- package/dist/muza-ui.css +1 -1
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/constants.js +4 -0
- package/dist/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/date-fns/isSameWeek.js +14 -0
- package/dist/node_modules/date-fns/locale/cs/_lib/formatDistance.js +275 -0
- package/dist/node_modules/date-fns/locale/cs/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/cs/_lib/formatRelative.js +25 -0
- package/dist/node_modules/date-fns/locale/cs/_lib/localize.js +167 -0
- package/dist/node_modules/date-fns/locale/cs/_lib/match.js +109 -0
- package/dist/node_modules/date-fns/locale/cs.js +21 -0
- package/dist/node_modules/date-fns/locale/sk/_lib/formatDistance.js +158 -0
- package/dist/node_modules/date-fns/locale/sk/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/sk/_lib/formatRelative.js +60 -0
- package/dist/node_modules/date-fns/locale/sk/_lib/localize.js +175 -0
- package/dist/node_modules/date-fns/locale/sk/_lib/match.js +111 -0
- package/dist/node_modules/date-fns/locale/sk.js +21 -0
- package/dist/node_modules/date-fns/startOfWeek.js +11 -0
- package/dist/node_modules/date-fns/toDate.js +8 -0
- package/dist/translations/TranslationContext.d.ts +61 -0
- package/dist/translations/TranslationContext.d.ts.map +1 -0
- package/dist/translations/TranslationContext.js +74 -0
- package/dist/translations/index.d.ts +6 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/locales/cs.d.ts +3 -0
- package/dist/translations/locales/cs.d.ts.map +1 -0
- package/dist/translations/locales/cs.js +52 -0
- package/dist/translations/locales/en.d.ts +3 -0
- package/dist/translations/locales/en.d.ts.map +1 -0
- package/dist/translations/locales/en.js +52 -0
- package/dist/translations/locales/sk.d.ts +3 -0
- package/dist/translations/locales/sk.d.ts.map +1 -0
- package/dist/translations/locales/sk.js +52 -0
- package/dist/translations/types.d.ts +118 -0
- package/dist/translations/types.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -13,6 +13,6 @@ export interface StepperProps {
|
|
|
13
13
|
className?: string;
|
|
14
14
|
onLimitReached?: (limit: 'min' | 'max') => void;
|
|
15
15
|
}
|
|
16
|
-
declare const Stepper: ({ value, defaultValue, onChange, min, max, step, disabled, formatValue, incrementAriaLabel, decrementAriaLabel, className, onLimitReached, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const Stepper: ({ value, defaultValue, onChange, min, max, step, disabled, formatValue, incrementAriaLabel: incrementAriaLabelProp, decrementAriaLabel: decrementAriaLabelProp, className, onLimitReached, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
export { Stepper };
|
|
18
18
|
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAE3B,KAAK,EAAE,MAAM,CAAA;IAEb,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAElC,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAEvC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,KAAK,IAAI,CAAA;CAChD;AAED,QAAA,MAAM,OAAO,GAAI,8LAad,YAAY,4CAmFd,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { StepperButton as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as I, useEffect as M } from "react";
|
|
3
|
+
import { StepperButton as b } from "./StepperButton.js";
|
|
4
|
+
import { useMuzaTranslations as T } from "../../translations/TranslationContext.js";
|
|
5
|
+
import { Typography as D } from "../Typography/Typography.js";
|
|
6
|
+
import { cn as x } from "../../utils/cn.js";
|
|
7
|
+
import { MinusCircleBold as E, AddCircleBold as Y } from "@solar-icons/react-perf";
|
|
8
|
+
const P = ({
|
|
9
|
+
value: f,
|
|
9
10
|
defaultValue: p,
|
|
10
11
|
onChange: r,
|
|
11
|
-
min:
|
|
12
|
+
min: i,
|
|
12
13
|
max: o,
|
|
13
|
-
step:
|
|
14
|
+
step: z,
|
|
14
15
|
disabled: m,
|
|
15
|
-
formatValue:
|
|
16
|
-
incrementAriaLabel:
|
|
17
|
-
decrementAriaLabel:
|
|
18
|
-
className:
|
|
19
|
-
onLimitReached:
|
|
16
|
+
formatValue: d,
|
|
17
|
+
incrementAriaLabel: v,
|
|
18
|
+
decrementAriaLabel: A,
|
|
19
|
+
className: N,
|
|
20
|
+
onLimitReached: s
|
|
20
21
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
!
|
|
24
|
-
}, [p,
|
|
22
|
+
const n = T(), y = v ?? n.stepper.incrementAriaLabel, k = A ?? n.stepper.decrementAriaLabel, c = f !== void 0, [S, a] = I(p ?? 0), e = c ? f : S, u = z ?? 1;
|
|
23
|
+
M(() => {
|
|
24
|
+
!c && p !== void 0 && a(p);
|
|
25
|
+
}, [p, c]);
|
|
25
26
|
const B = () => {
|
|
26
27
|
if (m) return;
|
|
27
|
-
const t =
|
|
28
|
-
if (
|
|
29
|
-
|
|
28
|
+
const t = e - u;
|
|
29
|
+
if (i !== void 0 && t < i) {
|
|
30
|
+
s == null || s("min");
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
},
|
|
33
|
+
c || a(t), r == null || r(t);
|
|
34
|
+
}, j = () => {
|
|
34
35
|
if (m) return;
|
|
35
|
-
const t =
|
|
36
|
+
const t = e + u;
|
|
36
37
|
if (o !== void 0 && t > o) {
|
|
37
|
-
|
|
38
|
+
s == null || s("max");
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
c || a(t), r == null || r(t);
|
|
41
42
|
};
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ w("div", { className: x("flex items-center gap-sm", N), children: [
|
|
43
44
|
/* @__PURE__ */ l(
|
|
44
|
-
|
|
45
|
+
b,
|
|
45
46
|
{
|
|
46
|
-
ariaLabel:
|
|
47
|
+
ariaLabel: k,
|
|
47
48
|
onClick: B,
|
|
48
|
-
disabled: m ||
|
|
49
|
+
disabled: m || i !== void 0 && e <= i,
|
|
49
50
|
className: "size-comp-stepper-btn-size",
|
|
50
|
-
children: /* @__PURE__ */ l(
|
|
51
|
+
children: /* @__PURE__ */ l(E, { className: "size-full transition-colors" })
|
|
51
52
|
}
|
|
52
53
|
),
|
|
53
54
|
/* @__PURE__ */ l(
|
|
54
|
-
|
|
55
|
+
D,
|
|
55
56
|
{
|
|
56
57
|
variant: "body",
|
|
57
58
|
size: "base",
|
|
58
59
|
weight: "medium",
|
|
59
60
|
component: "span",
|
|
60
|
-
className:
|
|
61
|
+
className: x(
|
|
61
62
|
"min-w-[1.75rem] text-center text-text-dark-primary-def",
|
|
62
63
|
{
|
|
63
|
-
"text-text-dark-secondary":
|
|
64
|
+
"text-text-dark-secondary": e === i
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
fixY: !0,
|
|
67
|
-
children:
|
|
68
|
+
children: d ? d(e) : e
|
|
68
69
|
}
|
|
69
70
|
),
|
|
70
71
|
/* @__PURE__ */ l(
|
|
71
|
-
|
|
72
|
+
b,
|
|
72
73
|
{
|
|
73
|
-
ariaLabel:
|
|
74
|
-
onClick:
|
|
75
|
-
disabled: m || o !== void 0 &&
|
|
74
|
+
ariaLabel: y,
|
|
75
|
+
onClick: j,
|
|
76
|
+
disabled: m || o !== void 0 && e >= o,
|
|
76
77
|
className: "size-comp-stepper-btn-size",
|
|
77
|
-
children: /* @__PURE__ */ l(
|
|
78
|
+
children: /* @__PURE__ */ l(Y, { className: "size-full transition-colors" })
|
|
78
79
|
}
|
|
79
80
|
)
|
|
80
81
|
] });
|
|
81
82
|
};
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
+
P as Stepper
|
|
84
85
|
};
|
|
@@ -12,6 +12,6 @@ export interface SwipeButtonProps extends React.ButtonHTMLAttributes<HTMLButtonE
|
|
|
12
12
|
onResetComplete?: () => void;
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
declare const SwipeButton: ({ text, successText, loadingText, variant, size, fullWidth, loading, success, disabled, danger, onSwipeComplete, reset, onResetComplete, className, }: SwipeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const SwipeButton: ({ text, successText: successTextProp, loadingText: loadingTextProp, variant, size, fullWidth, loading, success, disabled, danger, onSwipeComplete, reset, onResetComplete, className, }: SwipeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export { SwipeButton };
|
|
17
17
|
//# sourceMappingURL=SwipeButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwipeButton.d.ts","sourceRoot":"","sources":["../../../src/components/SwipeButton/SwipeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"SwipeButton.d.ts","sourceRoot":"","sources":["../../../src/components/SwipeButton/SwipeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAgB5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,WAAW,GAAI,yLAelB,gBAAgB,4CAsOlB,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,131 +1,132 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as D, useState as
|
|
3
|
-
import { SwipeLoadingIcon as
|
|
4
|
-
import { swipeButtonProgressVariants as
|
|
5
|
-
import { swipeButtonSliderVariants as
|
|
6
|
-
import { swipeButtonVariants as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as D, useState as B, useEffect as N } from "react";
|
|
3
|
+
import { SwipeLoadingIcon as U } from "./SwipeLoadingIcon.js";
|
|
4
|
+
import { swipeButtonProgressVariants as _ } from "./swipeButtonProgressVariants.js";
|
|
5
|
+
import { swipeButtonSliderVariants as q } from "./swipeButtonSliderVariants.js";
|
|
6
|
+
import { swipeButtonVariants as G } from "./swipeButtonVariants.js";
|
|
7
|
+
import { useMuzaTranslations as H } from "../../translations/TranslationContext.js";
|
|
8
|
+
import { useDragControls as J } from "../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js";
|
|
9
|
+
import { useMotionValue as Q } from "../../node_modules/framer-motion/dist/es/value/use-motion-value.js";
|
|
10
|
+
import { useTransform as T } from "../../node_modules/framer-motion/dist/es/value/use-transform.js";
|
|
11
|
+
import { useMotionValueEvent as X } from "../../node_modules/framer-motion/dist/es/utils/use-motion-value-event.js";
|
|
12
|
+
import { animate as u } from "../../node_modules/framer-motion/dist/es/animation/animate/index.js";
|
|
12
13
|
import { motion as E } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
13
|
-
import { Typography as
|
|
14
|
-
import { DoubleArrowRight as
|
|
15
|
-
import { cn as
|
|
16
|
-
import { UnreadOutline as
|
|
17
|
-
const
|
|
18
|
-
text:
|
|
19
|
-
successText:
|
|
20
|
-
loadingText:
|
|
14
|
+
import { Typography as V } from "../Typography/Typography.js";
|
|
15
|
+
import { DoubleArrowRight as Z } from "../Icons/CustomIcons.js";
|
|
16
|
+
import { cn as y } from "../../utils/cn.js";
|
|
17
|
+
import { UnreadOutline as ee } from "@solar-icons/react-perf";
|
|
18
|
+
const ve = ({
|
|
19
|
+
text: z,
|
|
20
|
+
successText: L,
|
|
21
|
+
loadingText: M,
|
|
21
22
|
variant: w = "primary",
|
|
22
|
-
size:
|
|
23
|
-
fullWidth:
|
|
23
|
+
size: o = "md",
|
|
24
|
+
fullWidth: A = !1,
|
|
24
25
|
loading: t = !1,
|
|
25
|
-
success:
|
|
26
|
+
success: n = !1,
|
|
26
27
|
disabled: i = !1,
|
|
27
28
|
danger: h = !1,
|
|
28
|
-
onSwipeComplete:
|
|
29
|
+
onSwipeComplete: f,
|
|
29
30
|
reset: p,
|
|
30
|
-
onResetComplete:
|
|
31
|
-
className:
|
|
31
|
+
onResetComplete: I,
|
|
32
|
+
className: C
|
|
32
33
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
34
|
+
const v = H(), O = L ?? v.swipeButton.successText, R = M ?? v.swipeButton.loadingText, j = v.swipeButton.processingAriaLabel, K = D(null), m = D(null), d = D(null), [a, W] = B(0), [x, l] = B(!1), g = J(), r = Q(0), Y = T(r, [0, a], [0, 1]), k = T(r, [0, a * 0.5], [1, 0]), P = T(
|
|
35
|
+
Y,
|
|
35
36
|
(e) => `calc(${e}*(100% - var(--slider-size) - 2px) + var(--slider-size))`
|
|
36
|
-
),
|
|
37
|
+
), c = !t && !n && !p || i;
|
|
37
38
|
N(() => {
|
|
38
39
|
const e = () => {
|
|
39
|
-
d.current &&
|
|
40
|
-
|
|
40
|
+
d.current && m.current && W(
|
|
41
|
+
m.current.offsetWidth - d.current.offsetWidth
|
|
41
42
|
);
|
|
42
43
|
};
|
|
43
44
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
44
|
-
}, [d,
|
|
45
|
-
if (
|
|
46
|
-
e /
|
|
45
|
+
}, [d, m, o]), X(r, "change", (e) => {
|
|
46
|
+
if (c)
|
|
47
|
+
e / a >= 0.9 && !p ? l(!0) : l(!1);
|
|
47
48
|
else return;
|
|
48
49
|
}), N(() => {
|
|
49
|
-
|
|
50
|
+
x && (u(r, a, {
|
|
50
51
|
type: "tween",
|
|
51
52
|
duration: 0.15,
|
|
52
53
|
ease: "easeOut"
|
|
53
|
-
}),
|
|
54
|
-
}, [
|
|
55
|
-
p ? (
|
|
54
|
+
}), g.cancel(), f == null || f());
|
|
55
|
+
}, [g, x, a, f, r]), N(() => {
|
|
56
|
+
p ? (l(!1), u(r, 0, {
|
|
56
57
|
type: "tween",
|
|
57
58
|
duration: 0.25,
|
|
58
59
|
ease: "easeOut",
|
|
59
|
-
onComplete:
|
|
60
|
-
})) : (
|
|
60
|
+
onComplete: I
|
|
61
|
+
})) : (n || t) && u(r, a, {
|
|
61
62
|
type: "tween",
|
|
62
63
|
duration: 0.15,
|
|
63
64
|
ease: "easeOut"
|
|
64
65
|
});
|
|
65
|
-
}, [p, t,
|
|
66
|
-
const
|
|
67
|
-
!
|
|
66
|
+
}, [p, t, a, n, I, r]);
|
|
67
|
+
const $ = () => {
|
|
68
|
+
!c || x || u(r, 0, { type: "tween", duration: 0.25, ease: "easeOut" });
|
|
68
69
|
};
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
+
return /* @__PURE__ */ b(
|
|
70
71
|
"button",
|
|
71
72
|
{
|
|
72
|
-
ref:
|
|
73
|
+
ref: K,
|
|
73
74
|
tabIndex: i ? -1 : 0,
|
|
74
75
|
role: "button",
|
|
75
|
-
"aria-label":
|
|
76
|
+
"aria-label": n ? O : t ? j : z,
|
|
76
77
|
"aria-disabled": !!i,
|
|
77
78
|
"aria-busy": !!t,
|
|
78
79
|
onKeyDown: (e) => {
|
|
79
|
-
|
|
80
|
+
c && (e.key === "Enter" || e.key === " ") && (x ? u(r, 0, {
|
|
80
81
|
type: "tween",
|
|
81
82
|
duration: 0.25,
|
|
82
83
|
ease: "easeOut",
|
|
83
|
-
onComplete: () =>
|
|
84
|
-
}) :
|
|
84
|
+
onComplete: () => l(!1)
|
|
85
|
+
}) : l(!0));
|
|
85
86
|
},
|
|
86
87
|
"data-danger": h,
|
|
87
88
|
disabled: i,
|
|
88
|
-
className:
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
className: y(
|
|
90
|
+
G({ variant: w, size: o, loading: t, fullWidth: A, disabled: i }),
|
|
91
|
+
C
|
|
91
92
|
),
|
|
92
93
|
style: {
|
|
93
|
-
"--slider-size": `calc(var(--spacing-comp-button-h-${
|
|
94
|
+
"--slider-size": `calc(var(--spacing-comp-button-h-${o === "md" ? "def" : o}) - 2px - 2*var(--spacing-comp-button-p-xxs))`
|
|
94
95
|
},
|
|
95
96
|
children: [
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ s(
|
|
97
98
|
E.div,
|
|
98
99
|
{
|
|
99
|
-
style: { opacity:
|
|
100
|
+
style: { opacity: n || t ? 1 : k },
|
|
100
101
|
className: "pointer-events-none flex items-center justify-center",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
|
|
102
|
+
children: /* @__PURE__ */ s(
|
|
103
|
+
V,
|
|
103
104
|
{
|
|
104
105
|
component: "span",
|
|
105
106
|
variant: "cta",
|
|
106
|
-
size:
|
|
107
|
+
size: o === "sm" ? "sm" : "base",
|
|
107
108
|
weight: "medium",
|
|
108
109
|
className: "relative fix-y-text",
|
|
109
110
|
fixY: !0,
|
|
110
|
-
children:
|
|
111
|
+
children: z
|
|
111
112
|
}
|
|
112
113
|
)
|
|
113
114
|
}
|
|
114
115
|
),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ b(
|
|
116
117
|
"div",
|
|
117
118
|
{
|
|
118
|
-
ref:
|
|
119
|
+
ref: m,
|
|
119
120
|
className: "absolute inset-comp-button-p-xxs",
|
|
120
121
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ s(
|
|
122
123
|
E.div,
|
|
123
124
|
{
|
|
124
|
-
className:
|
|
125
|
+
className: y(
|
|
125
126
|
"absolute rounded-full",
|
|
126
|
-
|
|
127
|
+
_({
|
|
127
128
|
variant: w,
|
|
128
|
-
interactive:
|
|
129
|
+
interactive: c,
|
|
129
130
|
danger: h,
|
|
130
131
|
disabled: i
|
|
131
132
|
})
|
|
@@ -133,24 +134,24 @@ const pe = ({
|
|
|
133
134
|
style: { width: P }
|
|
134
135
|
}
|
|
135
136
|
),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ b(
|
|
137
138
|
E.div,
|
|
138
139
|
{
|
|
139
140
|
ref: d,
|
|
140
|
-
className:
|
|
141
|
-
|
|
141
|
+
className: y(
|
|
142
|
+
q({
|
|
142
143
|
variant: w,
|
|
143
|
-
interactive:
|
|
144
|
+
interactive: c,
|
|
144
145
|
danger: h
|
|
145
146
|
})
|
|
146
147
|
),
|
|
147
148
|
style: { x: r, touchAction: "none" },
|
|
148
|
-
dragControls:
|
|
149
|
-
drag:
|
|
150
|
-
dragConstraints:
|
|
149
|
+
dragControls: g,
|
|
150
|
+
drag: c ? "x" : !1,
|
|
151
|
+
dragConstraints: m,
|
|
151
152
|
dragElastic: 0,
|
|
152
153
|
dragTransition: { power: 0, timeConstant: 0 },
|
|
153
|
-
onDragEnd:
|
|
154
|
+
onDragEnd: $,
|
|
154
155
|
animate: { rotate: t ? 360 : 0 },
|
|
155
156
|
transition: {
|
|
156
157
|
scale: { type: "tween", duration: 0.2 },
|
|
@@ -161,9 +162,9 @@ const pe = ({
|
|
|
161
162
|
} : { duration: 0.2 }
|
|
162
163
|
},
|
|
163
164
|
children: [
|
|
164
|
-
|
|
165
|
-
t && !
|
|
166
|
-
!t && !
|
|
165
|
+
n && /* @__PURE__ */ s(ee, { className: "size-icon-small" }),
|
|
166
|
+
t && !n && /* @__PURE__ */ s(U, { className: "size-icon-small" }),
|
|
167
|
+
!t && !n && /* @__PURE__ */ s(Z, { className: "size-icon-small" })
|
|
167
168
|
]
|
|
168
169
|
}
|
|
169
170
|
)
|
|
@@ -171,29 +172,29 @@ const pe = ({
|
|
|
171
172
|
}
|
|
172
173
|
),
|
|
173
174
|
[
|
|
174
|
-
{ textContent:
|
|
175
|
-
{ textContent: O, condition:
|
|
175
|
+
{ textContent: R, condition: t },
|
|
176
|
+
{ textContent: O, condition: n }
|
|
176
177
|
].map(
|
|
177
|
-
({ textContent: e, condition:
|
|
178
|
-
|
|
178
|
+
({ textContent: e, condition: F }, S) => e && /* @__PURE__ */ s(
|
|
179
|
+
V,
|
|
179
180
|
{
|
|
180
181
|
component: "span",
|
|
181
182
|
variant: "cta",
|
|
182
|
-
size:
|
|
183
|
+
size: o === "sm" ? "sm" : "base",
|
|
183
184
|
weight: "medium",
|
|
184
185
|
fixY: !0,
|
|
185
|
-
className:
|
|
186
|
+
className: y(
|
|
186
187
|
"pointer-events-none absolute z-10 w-max",
|
|
187
188
|
"top-[50%] left-[calc(50%-var(--slider-size)/2))]",
|
|
188
189
|
"translate-x-[-50%] translate-y-[-50%]",
|
|
189
190
|
"transition-500 opacity-0 transition-opacity",
|
|
190
191
|
{
|
|
191
|
-
"opacity-100":
|
|
192
|
+
"opacity-100": F
|
|
192
193
|
}
|
|
193
194
|
),
|
|
194
195
|
children: e
|
|
195
196
|
},
|
|
196
|
-
|
|
197
|
+
S
|
|
197
198
|
)
|
|
198
199
|
)
|
|
199
200
|
]
|
|
@@ -201,5 +202,5 @@ const pe = ({
|
|
|
201
202
|
);
|
|
202
203
|
};
|
|
203
204
|
export {
|
|
204
|
-
|
|
205
|
+
ve as SwipeButton
|
|
205
206
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { SwipeButtonProps } from './SwipeButton';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ text, successText, loadingText, variant, size, fullWidth, loading, success, disabled, danger, onSwipeComplete, reset, onResetComplete, className, }: SwipeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ text, successText: successTextProp, loadingText: loadingTextProp, variant, size, fullWidth, loading, success, disabled, danger, onSwipeComplete, reset, onResetComplete, className, }: SwipeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
docs: {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
export declare const typographyVariants: (props?: ({
|
|
4
4
|
size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "caption" | "base" | "input" | null | undefined;
|
|
5
5
|
weight?: "bold" | "light" | "regular" | "medium" | null | undefined;
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "title" | "body" | "paragraph" | "cta" | null | undefined;
|
|
7
7
|
uppercase?: boolean | null | undefined;
|
|
8
8
|
fixY?: boolean | null | undefined;
|
|
9
9
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from '../translations';
|
|
1
2
|
export * from './Accordion';
|
|
2
3
|
export * from './Alert';
|
|
3
4
|
export * from './Avatar';
|
|
@@ -19,6 +20,7 @@ export * from './LanguageSwitcher';
|
|
|
19
20
|
export * from './Loader';
|
|
20
21
|
export * from './LoginScreen';
|
|
21
22
|
export * from './MultiSelect';
|
|
23
|
+
export * from './MuzaUIProvider';
|
|
22
24
|
export * from './PasswordInput';
|
|
23
25
|
export * from './PinIndicator';
|
|
24
26
|
export * from './Popover';
|
|
@@ -39,6 +41,7 @@ export * from './Toggle';
|
|
|
39
41
|
export * from './ToggleGroup';
|
|
40
42
|
export * from './Tooltip';
|
|
41
43
|
export * from './Typography';
|
|
44
|
+
export * from './DataTable';
|
|
42
45
|
export * from './ExpandableTable';
|
|
43
46
|
export * from './Skeleton';
|
|
44
47
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAA;AAG/B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA"}
|