@vkzstudio/muza-ui 1.0.44 → 1.0.46
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.stories.d.ts.map +1 -1
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +63 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.js +67 -0
- package/dist/components/Card/Card.stories.d.ts +13 -0
- package/dist/components/Card/Card.stories.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.d.ts +140 -0
- package/dist/components/Carousel/Carousel.d.ts.map +1 -0
- package/dist/components/Carousel/Carousel.js +241 -0
- package/dist/components/Carousel/Carousel.stories.d.ts +13 -0
- package/dist/components/Carousel/Carousel.stories.d.ts.map +1 -0
- package/dist/components/Carousel/index.d.ts +2 -0
- package/dist/components/Carousel/index.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts +14 -5
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +39 -39
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +38 -7
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +165 -163
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +3 -17
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/EdgeButton/EdgeButton.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +30 -11
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.js +100 -111
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +3 -1
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts +6 -0
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +38 -41
- package/dist/components/FileUpload/FileUpload.d.ts +32 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +87 -83
- package/dist/components/FileUpload/FileUpload.stories.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +373 -2
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +61 -63
- package/dist/components/Flex/Flex.stories.d.ts.map +1 -1
- package/dist/components/Icons/CustomBadges.d.ts +14 -0
- package/dist/components/Icons/CustomBadges.d.ts.map +1 -0
- package/dist/components/Icons/CustomBadges.js +334 -0
- package/dist/components/Icons/CustomIcons.d.ts +24 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +88 -42
- package/dist/components/Icons/CustomLogos.d.ts +29 -0
- package/dist/components/Icons/CustomLogos.d.ts.map +1 -0
- package/dist/components/Icons/CustomLogos.js +593 -0
- package/dist/components/Icons/Icons.stories.d.ts.map +1 -1
- package/dist/components/Icons/LogosAndBadges.stories.d.ts +7 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +24 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +71 -52
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts +2 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +18 -17
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
- package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination.stories.d.ts.map +1 -1
- package/dist/components/Progress/Progress.d.ts +49 -0
- package/dist/components/Progress/Progress.d.ts.map +1 -0
- package/dist/components/Progress/Progress.js +64 -0
- package/dist/components/Progress/Progress.stories.d.ts +13 -0
- package/dist/components/Progress/Progress.stories.d.ts.map +1 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/index.d.ts.map +1 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +266 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts +39 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +134 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts +14 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts +2 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +20 -7
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +123 -92
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/utils.d.ts +1 -0
- package/dist/components/Select/utils.d.ts.map +1 -1
- package/dist/components/Select/utils.js +5 -2
- package/dist/components/Sheet/Sheet.d.ts +89 -0
- package/dist/components/Sheet/Sheet.d.ts.map +1 -0
- package/dist/components/Sheet/Sheet.js +189 -0
- package/dist/components/Sheet/Sheet.stories.d.ts +20 -0
- package/dist/components/Sheet/Sheet.stories.d.ts.map +1 -0
- package/dist/components/Sheet/index.d.ts +2 -0
- package/dist/components/Sheet/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.d.ts +65 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -0
- package/dist/components/Slider/Slider.js +134 -0
- package/dist/components/Slider/Slider.stories.d.ts +12 -0
- package/dist/components/Slider/Slider.stories.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts +69 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.js +64 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts +8 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/index.d.ts +2 -0
- package/dist/components/ToggleCheckButton/index.d.ts.map +1 -0
- package/dist/components/Typography/Typography.stories.d.ts.map +1 -1
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts +19 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts +8 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/globals.css +1 -0
- package/dist/hooks/use-is-breakpoint.d.ts +11 -0
- package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.js +24 -13
- package/dist/index.js +316 -262
- package/dist/muza-ui.css +1 -1
- package/dist/styles/primitives.css +5 -1
- package/dist/styles/token-colors.css +221 -12
- package/dist/styles/token-sizes.css +636 -267
- package/dist/styles/typography.css +36 -7
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +17 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +17 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +19 -2
- package/dist/translations/types.d.ts +42 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +24 -7
- package/package.json +6 -3
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
1
2
|
/**
|
|
2
3
|
* Represents a single language option in the LanguageSwitcher dropdown.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const english: LanguageOption = {
|
|
8
|
+
* name: 'English',
|
|
9
|
+
* value: 'en',
|
|
10
|
+
* icon: <FlagEn />,
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
3
13
|
*/
|
|
4
14
|
export interface LanguageOption {
|
|
5
15
|
/** Display label for the language (e.g. "English", "Čeština"). */
|
|
@@ -24,7 +34,20 @@ export interface LanguageSwitcherProps {
|
|
|
24
34
|
defaultValue?: string;
|
|
25
35
|
/** Controlled selected language value. Use with onValueChange for controlled behavior. */
|
|
26
36
|
value?: string;
|
|
37
|
+
/**
|
|
38
|
+
* When true, renders a compact icon-only flag button instead of the full text trigger.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
isIconButton?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Props forwarded to the underlying Button when `isIconButton` is true.
|
|
44
|
+
* The `icon` prop is reserved for the active language flag and cannot be overridden.
|
|
45
|
+
* @see ButtonProps
|
|
46
|
+
*/
|
|
47
|
+
buttonProps?: Omit<ButtonProps, 'icon'>;
|
|
48
|
+
/** Prevents interaction and applies disabled styling. @default false */
|
|
49
|
+
disabled?: boolean;
|
|
27
50
|
}
|
|
28
|
-
declare const LanguageSwitcher: ({ languages, onValueChange, defaultValue, value, }: LanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare const LanguageSwitcher: ({ languages, onValueChange, defaultValue, value, isIconButton, buttonProps, disabled, }: LanguageSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
52
|
export { LanguageSwitcher };
|
|
30
53
|
//# sourceMappingURL=LanguageSwitcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAWpD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACvC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,gBAAgB,GAAI,yFAQvB,qBAAqB,4CAuEvB,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,64 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DropdownMenu as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as v } from "react";
|
|
3
|
+
import { DropdownMenu as w, DropdownMenuTrigger as x, DropdownMenuContent as b, DropdownMenuRadioGroup as D, DropdownMenuRadioItem as y } from "../DropdownMenu/DropdownMenu.js";
|
|
4
|
+
import { Button as z } from "../Button/Button.js";
|
|
5
|
+
import { Typography as M } from "../Typography/Typography.js";
|
|
6
|
+
import { AltArrowDownOutline as N } from "@solar-icons/react-perf";
|
|
7
|
+
import { cn as A } from "../../utils/cn.js";
|
|
8
|
+
const G = ({
|
|
8
9
|
languages: i,
|
|
9
|
-
onValueChange:
|
|
10
|
-
defaultValue:
|
|
11
|
-
value:
|
|
10
|
+
onValueChange: s,
|
|
11
|
+
defaultValue: u,
|
|
12
|
+
value: n,
|
|
13
|
+
isIconButton: f,
|
|
14
|
+
buttonProps: g,
|
|
15
|
+
disabled: a
|
|
12
16
|
}) => {
|
|
13
|
-
var
|
|
14
|
-
const [
|
|
15
|
-
|
|
17
|
+
var p;
|
|
18
|
+
const [c, m] = h(
|
|
19
|
+
u || ((p = i[0]) == null ? void 0 : p.value) || ""
|
|
16
20
|
);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
v(() => {
|
|
22
|
+
n && m(n);
|
|
23
|
+
}, [n]);
|
|
24
|
+
const e = i.find(({ value: o }) => o === c);
|
|
25
|
+
return /* @__PURE__ */ r(w, { children: [
|
|
26
|
+
/* @__PURE__ */ t(x, { asChild: !0, children: f ? /* @__PURE__ */ t(
|
|
27
|
+
z,
|
|
28
|
+
{
|
|
29
|
+
variant: "tertiary",
|
|
30
|
+
size: "sm",
|
|
31
|
+
disabled: a,
|
|
32
|
+
...g,
|
|
33
|
+
icon: e == null ? void 0 : e.icon
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ r(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
disabled: a,
|
|
39
|
+
className: "group flex cursor-pointer items-center gap-sm hover:text-comp-language-switcher-hover focus-visible:text-comp-language-switcher-focused focus-visible:focus-default disabled:pointer-events-none disabled:text-comp-language-switcher-disabled",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ t(
|
|
42
|
+
M,
|
|
43
|
+
{
|
|
44
|
+
component: "span",
|
|
45
|
+
size: "sm",
|
|
46
|
+
weight: "medium",
|
|
47
|
+
variant: "body",
|
|
48
|
+
fixY: !0,
|
|
49
|
+
children: e ? /* @__PURE__ */ r("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small group-disabled:[&>svg]:opacity-50", children: [
|
|
50
|
+
e.icon && e.icon,
|
|
51
|
+
e.name
|
|
52
|
+
] }) : null
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ t(
|
|
56
|
+
N,
|
|
57
|
+
{
|
|
58
|
+
className: A(
|
|
59
|
+
"size-[12px] transition-transform duration-300 group-hover:text-comp-language-switcher-hover group-data-[state=open]:rotate-180"
|
|
60
|
+
)
|
|
61
|
+
}
|
|
43
62
|
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
) }),
|
|
66
|
+
/* @__PURE__ */ t(b, { className: "w-50", side: "bottom", align: "end", children: /* @__PURE__ */ t(
|
|
67
|
+
D,
|
|
49
68
|
{
|
|
50
|
-
value:
|
|
51
|
-
onValueChange: (
|
|
52
|
-
|
|
69
|
+
value: c,
|
|
70
|
+
onValueChange: (o) => {
|
|
71
|
+
m(o), s == null || s(o);
|
|
53
72
|
},
|
|
54
|
-
children: i.map(({ name:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
] }) },
|
|
73
|
+
children: i.map(({ name: o, value: l, icon: d }) => /* @__PURE__ */ t(y, { value: l, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small", children: [
|
|
74
|
+
d && d,
|
|
75
|
+
o
|
|
76
|
+
] }) }, l))
|
|
58
77
|
}
|
|
59
78
|
) })
|
|
60
79
|
] });
|
|
61
80
|
};
|
|
62
81
|
export {
|
|
63
|
-
|
|
82
|
+
G as LanguageSwitcher
|
|
64
83
|
};
|
|
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof LanguageSwitcher>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof LanguageSwitcher>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const IconButton: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
7
9
|
export declare const Controlled: Story;
|
|
8
10
|
//# sourceMappingURL=LanguageSwitcher.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAwCvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE9C,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KA8BxB,CAAA"}
|
|
@@ -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;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,KAAK,EAAE,SAAS,CAAA;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kHAAkH;IAClH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAClC;;;;;;;;;;OAUG;IACH,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yGAAyG;IACzG,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACpC,kHAAkH;IAClH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wHAAwH;IACxH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW,
|
|
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;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IACjC,2FAA2F;IAC3F,KAAK,EAAE,MAAM,CAAA;IACb,qFAAqF;IACrF,KAAK,EAAE,SAAS,CAAA;IAChB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kHAAkH;IAClH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+EAA+E;IAC/E,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,4FAA4F;IAC5F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wGAAwG;IACxG,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAClC;;;;;;;;;;OAUG;IACH,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yGAAyG;IACzG,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACpC,kHAAkH;IAClH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wHAAwH;IACxH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW,6FAqOvB,CAAA"}
|
|
@@ -15,12 +15,12 @@ const ne = L(
|
|
|
15
15
|
label: x,
|
|
16
16
|
hint: b,
|
|
17
17
|
error: w,
|
|
18
|
-
options:
|
|
18
|
+
options: a,
|
|
19
19
|
onChange: s,
|
|
20
20
|
value: r,
|
|
21
|
-
disabled:
|
|
21
|
+
disabled: o,
|
|
22
22
|
prefix: d,
|
|
23
|
-
maxNumberOfVisibleTags:
|
|
23
|
+
maxNumberOfVisibleTags: c = 2,
|
|
24
24
|
size: O,
|
|
25
25
|
placeholder: S,
|
|
26
26
|
emptyMessage: W,
|
|
@@ -29,9 +29,9 @@ const ne = L(
|
|
|
29
29
|
labelExtra: A,
|
|
30
30
|
infoTooltip: C,
|
|
31
31
|
collisionPadding: F
|
|
32
|
-
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(
|
|
32
|
+
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(a.map((e) => [e.value, e.label])), [a]), V = k(() => {
|
|
33
33
|
const e = r && r.map((n) => M.get(n));
|
|
34
|
-
return e != null && e.length ? e.length <=
|
|
34
|
+
return e != null && e.length ? e.length <= c ? /* @__PURE__ */ t(
|
|
35
35
|
z,
|
|
36
36
|
{
|
|
37
37
|
gap: "xs",
|
|
@@ -39,7 +39,7 @@ const ne = L(
|
|
|
39
39
|
align: "start",
|
|
40
40
|
flex: 1,
|
|
41
41
|
className: "min-w-0",
|
|
42
|
-
children: e.map((n,
|
|
42
|
+
children: e.map((n, i) => /* @__PURE__ */ t(f, { variant: "info", className: "min-w-[50px] shrink-1", children: n }, i))
|
|
43
43
|
}
|
|
44
44
|
) : /* @__PURE__ */ t(
|
|
45
45
|
z,
|
|
@@ -50,17 +50,17 @@ const ne = L(
|
|
|
50
50
|
flex: 1,
|
|
51
51
|
className: "min-w-0",
|
|
52
52
|
children: [
|
|
53
|
-
...e.slice(0,
|
|
53
|
+
...e.slice(0, c).map((n, i) => /* @__PURE__ */ t(
|
|
54
54
|
f,
|
|
55
55
|
{
|
|
56
56
|
variant: "info",
|
|
57
57
|
className: "min-w-[50px] shrink-1 overflow-hidden",
|
|
58
58
|
children: /* @__PURE__ */ t("span", { className: "truncate", children: n })
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
i
|
|
61
61
|
)),
|
|
62
62
|
/* @__PURE__ */ p(f, { variant: "info", children: [
|
|
63
|
-
e.length -
|
|
63
|
+
e.length - c,
|
|
64
64
|
"+"
|
|
65
65
|
] }, "more")
|
|
66
66
|
]
|
|
@@ -75,7 +75,7 @@ const ne = L(
|
|
|
75
75
|
children: y
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
}, [r, y,
|
|
78
|
+
}, [r, y, c, M]), [R, $] = u.useState(!1), [T, _] = u.useState(0), m = u.useRef(!1), B = G(null), l = (typeof h == "function" ? null : h) ?? B;
|
|
79
79
|
return H(() => {
|
|
80
80
|
const e = () => {
|
|
81
81
|
l.current && _(l.current.offsetWidth);
|
|
@@ -104,14 +104,14 @@ const ne = L(
|
|
|
104
104
|
$(e);
|
|
105
105
|
},
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ t(Y, { disabled:
|
|
107
|
+
/* @__PURE__ */ t(Y, { disabled: o, asChild: !0, children: /* @__PURE__ */ t(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
ref: l,
|
|
111
111
|
type: "button",
|
|
112
112
|
role: "input",
|
|
113
113
|
tabIndex: 0,
|
|
114
|
-
disabled:
|
|
114
|
+
disabled: o,
|
|
115
115
|
"aria-required": v,
|
|
116
116
|
className: J({
|
|
117
117
|
size: O,
|
|
@@ -123,7 +123,7 @@ const ne = L(
|
|
|
123
123
|
d && /* @__PURE__ */ t(
|
|
124
124
|
"span",
|
|
125
125
|
{
|
|
126
|
-
className:
|
|
126
|
+
className: o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
|
|
127
127
|
children: d
|
|
128
128
|
}
|
|
129
129
|
),
|
|
@@ -133,7 +133,8 @@ const ne = L(
|
|
|
133
133
|
{
|
|
134
134
|
className: re(
|
|
135
135
|
"shrink-0 transition-transform duration-200",
|
|
136
|
-
R ? "rotate-0" : "rotate-180"
|
|
136
|
+
R ? "rotate-0" : "rotate-180",
|
|
137
|
+
o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def"
|
|
137
138
|
)
|
|
138
139
|
}
|
|
139
140
|
)
|
|
@@ -151,7 +152,7 @@ const ne = L(
|
|
|
151
152
|
m.current || e.preventDefault(), m.current = !1;
|
|
152
153
|
},
|
|
153
154
|
collisionPadding: F,
|
|
154
|
-
children:
|
|
155
|
+
children: a.length === 0 ? /* @__PURE__ */ t("div", { className: "px-lg py-md", role: "presentation", children: /* @__PURE__ */ t(
|
|
155
156
|
I,
|
|
156
157
|
{
|
|
157
158
|
component: "span",
|
|
@@ -160,7 +161,7 @@ const ne = L(
|
|
|
160
161
|
className: "text-comp-select-text-secondary",
|
|
161
162
|
children: q
|
|
162
163
|
}
|
|
163
|
-
) }) :
|
|
164
|
+
) }) : a.map((e) => /* @__PURE__ */ t(
|
|
164
165
|
ee,
|
|
165
166
|
{
|
|
166
167
|
checked: r == null ? void 0 : r.includes(e.value),
|
|
@@ -168,7 +169,7 @@ const ne = L(
|
|
|
168
169
|
icon: e.icon,
|
|
169
170
|
onCheckedChange: (n) => {
|
|
170
171
|
n ? s == null || s([...r || [], e.value]) : s == null || s(
|
|
171
|
-
(r || []).filter((
|
|
172
|
+
(r || []).filter((i) => i !== e.value)
|
|
172
173
|
), m.current = !0;
|
|
173
174
|
},
|
|
174
175
|
children: e.label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.stories.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAQ3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAqB3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CA4HlC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"MultiSelect.stories.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSelect/MultiSelect.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAQ3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAqB3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CA4HlC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAuBlC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAmB9B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAkBvB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KA4DtB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAqB5B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KA2C5B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAoDhC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAkCjC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAqBvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuzaUIProvider.stories.d.ts","sourceRoot":"","sources":["../../../src/components/MuzaUIProvider/MuzaUIProvider.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAQ3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAkKrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,OAAO,EAAE,KAoCrB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAwBjC,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KA+CtC,CAAA;
|
|
1
|
+
{"version":3,"file":"MuzaUIProvider.stories.d.ts","sourceRoot":"","sources":["../../../src/components/MuzaUIProvider/MuzaUIProvider.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAQ3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAkKrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5C,eAAO,MAAM,OAAO,EAAE,KAoCrB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAsBhC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAwBjC,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,KA+CtC,CAAA;AAuID,eAAO,MAAM,iBAAiB,EAAE,KAmC/B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAwD7B,CAAA"}
|
|
@@ -2,9 +2,9 @@ import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import * as X from "react";
|
|
3
3
|
import { useState as S, useCallback as b, useEffect as Y } from "react";
|
|
4
4
|
import { useMuzaTranslations as C } from "../../translations/TranslationContext.js";
|
|
5
|
-
import { ButtonArrow as z } from "../ButtonArrow/ButtonArrow.js";
|
|
6
5
|
import { Select as aa } from "../Select/Select.js";
|
|
7
6
|
import { Flex as p } from "../Flex/Flex.js";
|
|
7
|
+
import { ButtonArrow as z } from "../ButtonArrow/ButtonArrow.js";
|
|
8
8
|
import { Input as ea } from "../Input/Input.js";
|
|
9
9
|
import { Typography as v } from "../Typography/Typography.js";
|
|
10
10
|
const ta = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAiFjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAgB5B,CAAA;
|
|
1
|
+
{"version":3,"file":"Pagination.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAiFjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAgB7B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAgB5B,CAAA;AAsBD,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
4
|
+
/**
|
|
5
|
+
* CVA variants for the Progress root track.
|
|
6
|
+
* Exposes the `size` variant (`sm` | `md` | `lg`) that controls bar height.
|
|
7
|
+
*/
|
|
8
|
+
export declare const progressVariants: (props?: ({
|
|
9
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Props for the Progress component.
|
|
13
|
+
* Renders a horizontal progress bar built on
|
|
14
|
+
* [Radix Progress](https://www.radix-ui.com/primitives/docs/components/progress).
|
|
15
|
+
*/
|
|
16
|
+
export interface ProgressProps extends ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>, VariantProps<typeof progressVariants> {
|
|
17
|
+
/**
|
|
18
|
+
* Current progress value. Numbers are clamped to the `[0, max]` range.
|
|
19
|
+
* Pass `null` (or omit) for the indeterminate state — the indicator
|
|
20
|
+
* collapses to zero width and Radix exposes `data-state="indeterminate"`
|
|
21
|
+
* for custom styling.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <Progress value={42} /> // 42% complete
|
|
25
|
+
* <Progress value={null} /> // indeterminate
|
|
26
|
+
* <Progress value={120} max={200} /> // 60% complete with custom max
|
|
27
|
+
*/
|
|
28
|
+
value?: number | null;
|
|
29
|
+
/** Maximum value the bar can reach. @default 100 */
|
|
30
|
+
max?: number;
|
|
31
|
+
/** Controls bar height. @default 'md' */
|
|
32
|
+
size?: 'sm' | 'md' | 'lg';
|
|
33
|
+
/**
|
|
34
|
+
* Sets the accessible label announced by screen readers.
|
|
35
|
+
* Falls back to `translations.progress.ariaLabel` (English: `"Progress"`).
|
|
36
|
+
*/
|
|
37
|
+
ariaLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Applies non-interactive disabled styling. Sets `data-disabled` and
|
|
40
|
+
* `aria-disabled` on the root so track + indicator pick up the
|
|
41
|
+
* `data-[disabled]:` Tailwind variants.
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
}
|
|
47
|
+
declare const Progress: import('react').ForwardRefExoticComponent<ProgressProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export { Progress };
|
|
49
|
+
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAG9B,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAIjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;8EAgB5B,CAAA;AAQD;;;;GAIG;AACH,MAAM,WAAW,aACf,SAAQ,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,EAC7D,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,oDAAoD;IACpD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,QAAQ,0GAwCb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
|
+
import * as t from "@radix-ui/react-progress";
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
|
+
import { useMuzaTranslations as h } from "../../translations/TranslationContext.js";
|
|
6
|
+
import { cn as i } from "../../utils/cn.js";
|
|
7
|
+
const v = u(
|
|
8
|
+
[
|
|
9
|
+
"group relative w-full overflow-hidden rounded-comp-progress-radius",
|
|
10
|
+
"bg-comp-progress-bg-track-def",
|
|
11
|
+
"data-[disabled]:bg-comp-progress-bg-track-disabled"
|
|
12
|
+
],
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
size: {
|
|
16
|
+
sm: "h-comp-progress-h-sm",
|
|
17
|
+
md: "h-comp-progress-h-md",
|
|
18
|
+
lg: "h-comp-progress-h-lg"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: { size: "md" }
|
|
22
|
+
}
|
|
23
|
+
), w = i(
|
|
24
|
+
"h-full w-full flex-1 rounded-comp-progress-radius transition-transform duration-500 ease-out",
|
|
25
|
+
"bg-comp-progress-bg-fill-def",
|
|
26
|
+
"group-data-[disabled]:bg-comp-progress-bg-fill-disabled"
|
|
27
|
+
), P = b(
|
|
28
|
+
({
|
|
29
|
+
className: l,
|
|
30
|
+
value: r,
|
|
31
|
+
max: s = 100,
|
|
32
|
+
size: d = "md",
|
|
33
|
+
ariaLabel: m,
|
|
34
|
+
disabled: o = !1,
|
|
35
|
+
...p
|
|
36
|
+
}, n) => {
|
|
37
|
+
const c = h(), g = m ?? c.progress.ariaLabel, a = typeof r == "number" ? Math.min(Math.max(r, 0), s) : null, f = a == null ? 0 : a / s * 100;
|
|
38
|
+
return /* @__PURE__ */ e(
|
|
39
|
+
t.Root,
|
|
40
|
+
{
|
|
41
|
+
ref: n,
|
|
42
|
+
value: r ?? void 0,
|
|
43
|
+
max: s,
|
|
44
|
+
"aria-label": g,
|
|
45
|
+
"aria-disabled": o || void 0,
|
|
46
|
+
"data-disabled": o ? "" : void 0,
|
|
47
|
+
className: i(v({ size: d }), l),
|
|
48
|
+
...p,
|
|
49
|
+
children: /* @__PURE__ */ e(
|
|
50
|
+
t.Indicator,
|
|
51
|
+
{
|
|
52
|
+
className: w,
|
|
53
|
+
style: { transform: `translateX(-${100 - f}%)` }
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
P.displayName = "Progress";
|
|
61
|
+
export {
|
|
62
|
+
P as Progress,
|
|
63
|
+
v as progressVariants
|
|
64
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Progress } from './Progress';
|
|
3
|
+
declare const meta: Meta<typeof Progress>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Progress>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AllSizes: Story;
|
|
8
|
+
export declare const AllStates: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
10
|
+
export declare const Animated: Story;
|
|
11
|
+
export declare const SizeSmall: Story;
|
|
12
|
+
export declare const SizeLarge: Story;
|
|
13
|
+
//# sourceMappingURL=Progress.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Progress.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/Progress.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAErC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAoC/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAMtC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAoBvB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAwBtB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Progress/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reorderable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Reorderable/Reorderable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAY3D,OAAO,EACL,gBAAgB,EAIjB,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Reorderable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Reorderable/Reorderable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAY3D,OAAO,EACL,gBAAgB,EAIjB,MAAM,eAAe,CAAA;AAyFtB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAsFvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAU9C,eAAO,MAAM,OAAO,EAAE,KAiCrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAsCxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAuCtB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAmC5B,CAAA;AASD,eAAO,MAAM,SAAS,EAAE,KA2FvB,CAAA;AAgBD,eAAO,MAAM,cAAc,EAAE,KAsC5B,CAAA;AAmBD,eAAO,MAAM,aAAa,EAAE,KAgD3B,CAAA;AAGD,eAAO,MAAM,aAAa,EAAE,KA+E3B,CAAA;AA4BD,eAAO,MAAM,UAAU,EAAE,KAkDxB,CAAA;AA+GD,eAAO,MAAM,QAAQ,EAAE,KAsFtB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAsC3B,CAAA"}
|