@medusajs/ui 4.0.5-snapshot-20250127145424 → 4.0.5-snapshot-20250203171629
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/cjs/blocks/data-table/components/data-table-action-cell.d.ts.map +1 -1
- package/dist/cjs/blocks/data-table/components/data-table-action-cell.js +1 -1
- package/dist/cjs/blocks/data-table/components/data-table-action-cell.js.map +1 -1
- package/dist/cjs/blocks/data-table/components/data-table-select-cell.d.ts.map +1 -1
- package/dist/cjs/blocks/data-table/components/data-table-select-cell.js.map +1 -1
- package/dist/cjs/components/avatar/avatar.d.ts +2 -2
- package/dist/cjs/components/avatar/avatar.d.ts.map +1 -1
- package/dist/cjs/components/avatar/avatar.js +4 -4
- package/dist/cjs/components/avatar/avatar.js.map +1 -1
- package/dist/cjs/components/badge/badge.d.ts.map +1 -1
- package/dist/cjs/components/badge/badge.js +2 -2
- package/dist/cjs/components/badge/badge.js.map +1 -1
- package/dist/cjs/components/button/button.d.ts.map +1 -1
- package/dist/cjs/components/button/button.js +2 -2
- package/dist/cjs/components/button/button.js.map +1 -1
- package/dist/cjs/components/checkbox/checkbox.d.ts +2 -2
- package/dist/cjs/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/cjs/components/checkbox/checkbox.js +3 -3
- package/dist/cjs/components/checkbox/checkbox.js.map +1 -1
- package/dist/cjs/components/checkbox/types.d.ts +2 -2
- package/dist/cjs/components/checkbox/types.d.ts.map +1 -1
- package/dist/cjs/components/checkbox/types.js.map +1 -1
- package/dist/cjs/components/command-bar/command-bar.d.ts.map +1 -1
- package/dist/cjs/components/command-bar/command-bar.js +6 -7
- package/dist/cjs/components/command-bar/command-bar.js.map +1 -1
- package/dist/cjs/components/copy/copy.js +2 -2
- package/dist/cjs/components/copy/copy.js.map +1 -1
- package/dist/cjs/components/drawer/drawer.d.ts +9 -9
- package/dist/cjs/components/drawer/drawer.d.ts.map +1 -1
- package/dist/cjs/components/drawer/drawer.js +10 -10
- package/dist/cjs/components/drawer/drawer.js.map +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu.d.ts +14 -14
- package/dist/cjs/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu/dropdown-menu.js +18 -18
- package/dist/cjs/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/cjs/components/focus-modal/focus-modal.d.ts +9 -9
- package/dist/cjs/components/focus-modal/focus-modal.d.ts.map +1 -1
- package/dist/cjs/components/focus-modal/focus-modal.js +10 -10
- package/dist/cjs/components/focus-modal/focus-modal.js.map +1 -1
- package/dist/cjs/components/hint/hint.js.map +1 -1
- package/dist/cjs/components/icon-badge/icon-badge.d.ts.map +1 -1
- package/dist/cjs/components/icon-badge/icon-badge.js +2 -2
- package/dist/cjs/components/icon-badge/icon-badge.js.map +1 -1
- package/dist/cjs/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/cjs/components/icon-button/icon-button.js +2 -2
- package/dist/cjs/components/icon-button/icon-button.js.map +1 -1
- package/dist/cjs/components/label/label.d.ts.map +1 -1
- package/dist/cjs/components/label/label.js +2 -2
- package/dist/cjs/components/label/label.js.map +1 -1
- package/dist/cjs/components/popover/popover.d.ts +6 -6
- package/dist/cjs/components/popover/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover/popover.js +7 -7
- package/dist/cjs/components/popover/popover.js.map +1 -1
- package/dist/cjs/components/progress-accordion/progress-accordion.d.ts +5 -5
- package/dist/cjs/components/progress-accordion/progress-accordion.d.ts.map +1 -1
- package/dist/cjs/components/progress-accordion/progress-accordion.js +6 -6
- package/dist/cjs/components/progress-accordion/progress-accordion.js.map +1 -1
- package/dist/cjs/components/progress-tabs/progress-tabs.d.ts +5 -5
- package/dist/cjs/components/progress-tabs/progress-tabs.d.ts.map +1 -1
- package/dist/cjs/components/progress-tabs/progress-tabs.js +5 -5
- package/dist/cjs/components/progress-tabs/progress-tabs.js.map +1 -1
- package/dist/cjs/components/prompt/prompt.d.ts +8 -8
- package/dist/cjs/components/prompt/prompt.d.ts.map +1 -1
- package/dist/cjs/components/prompt/prompt.js +10 -10
- package/dist/cjs/components/prompt/prompt.js.map +1 -1
- package/dist/cjs/components/radio-group/radio-group.d.ts +4 -4
- package/dist/cjs/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/cjs/components/radio-group/radio-group.js +6 -6
- package/dist/cjs/components/radio-group/radio-group.js.map +1 -1
- package/dist/cjs/components/select/select.d.ts +9 -9
- package/dist/cjs/components/select/select.d.ts.map +1 -1
- package/dist/cjs/components/select/select.js +14 -14
- package/dist/cjs/components/select/select.js.map +1 -1
- package/dist/cjs/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/cjs/components/skeleton/skeleton.js +1 -1
- package/dist/cjs/components/skeleton/skeleton.js.map +1 -1
- package/dist/cjs/components/switch/switch.d.ts +2 -2
- package/dist/cjs/components/switch/switch.d.ts.map +1 -1
- package/dist/cjs/components/switch/switch.js +3 -3
- package/dist/cjs/components/switch/switch.js.map +1 -1
- package/dist/cjs/components/tabs/tabs.d.ts +5 -5
- package/dist/cjs/components/tabs/tabs.d.ts.map +1 -1
- package/dist/cjs/components/tabs/tabs.js +5 -5
- package/dist/cjs/components/tabs/tabs.js.map +1 -1
- package/dist/cjs/components/text/text.d.ts.map +1 -1
- package/dist/cjs/components/text/text.js +2 -2
- package/dist/cjs/components/text/text.js.map +1 -1
- package/dist/cjs/components/textarea/textarea.js +1 -1
- package/dist/cjs/components/textarea/textarea.js.map +1 -1
- package/dist/cjs/components/toast/toast.d.ts.map +1 -1
- package/dist/cjs/components/toast/toast.js +1 -1
- package/dist/cjs/components/toast/toast.js.map +1 -1
- package/dist/cjs/components/tooltip/tooltip.d.ts +3 -3
- package/dist/cjs/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/cjs/components/tooltip/tooltip.js +6 -6
- package/dist/cjs/components/tooltip/tooltip.js.map +1 -1
- package/dist/esm/blocks/data-table/components/data-table-action-cell.d.ts.map +1 -1
- package/dist/esm/blocks/data-table/components/data-table-action-cell.js +1 -1
- package/dist/esm/blocks/data-table/components/data-table-action-cell.js.map +1 -1
- package/dist/esm/blocks/data-table/components/data-table-select-cell.d.ts.map +1 -1
- package/dist/esm/blocks/data-table/components/data-table-select-cell.js.map +1 -1
- package/dist/esm/components/avatar/avatar.d.ts +2 -2
- package/dist/esm/components/avatar/avatar.d.ts.map +1 -1
- package/dist/esm/components/avatar/avatar.js +4 -4
- package/dist/esm/components/avatar/avatar.js.map +1 -1
- package/dist/esm/components/badge/badge.d.ts.map +1 -1
- package/dist/esm/components/badge/badge.js +2 -2
- package/dist/esm/components/badge/badge.js.map +1 -1
- package/dist/esm/components/button/button.d.ts.map +1 -1
- package/dist/esm/components/button/button.js +2 -2
- package/dist/esm/components/button/button.js.map +1 -1
- package/dist/esm/components/checkbox/checkbox.d.ts +2 -2
- package/dist/esm/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/esm/components/checkbox/checkbox.js +3 -3
- package/dist/esm/components/checkbox/checkbox.js.map +1 -1
- package/dist/esm/components/checkbox/types.d.ts +2 -2
- package/dist/esm/components/checkbox/types.d.ts.map +1 -1
- package/dist/esm/components/checkbox/types.js.map +1 -1
- package/dist/esm/components/command-bar/command-bar.d.ts.map +1 -1
- package/dist/esm/components/command-bar/command-bar.js +1 -2
- package/dist/esm/components/command-bar/command-bar.js.map +1 -1
- package/dist/esm/components/copy/copy.js +2 -2
- package/dist/esm/components/copy/copy.js.map +1 -1
- package/dist/esm/components/drawer/drawer.d.ts +9 -9
- package/dist/esm/components/drawer/drawer.d.ts.map +1 -1
- package/dist/esm/components/drawer/drawer.js +10 -10
- package/dist/esm/components/drawer/drawer.js.map +1 -1
- package/dist/esm/components/dropdown-menu/dropdown-menu.d.ts +14 -14
- package/dist/esm/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu/dropdown-menu.js +18 -18
- package/dist/esm/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/esm/components/focus-modal/focus-modal.d.ts +9 -9
- package/dist/esm/components/focus-modal/focus-modal.d.ts.map +1 -1
- package/dist/esm/components/focus-modal/focus-modal.js +10 -10
- package/dist/esm/components/focus-modal/focus-modal.js.map +1 -1
- package/dist/esm/components/hint/hint.js.map +1 -1
- package/dist/esm/components/icon-badge/icon-badge.d.ts.map +1 -1
- package/dist/esm/components/icon-badge/icon-badge.js +2 -2
- package/dist/esm/components/icon-badge/icon-badge.js.map +1 -1
- package/dist/esm/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/esm/components/icon-button/icon-button.js +2 -2
- package/dist/esm/components/icon-button/icon-button.js.map +1 -1
- package/dist/esm/components/label/label.d.ts.map +1 -1
- package/dist/esm/components/label/label.js +2 -2
- package/dist/esm/components/label/label.js.map +1 -1
- package/dist/esm/components/popover/popover.d.ts +6 -6
- package/dist/esm/components/popover/popover.d.ts.map +1 -1
- package/dist/esm/components/popover/popover.js +7 -7
- package/dist/esm/components/popover/popover.js.map +1 -1
- package/dist/esm/components/progress-accordion/progress-accordion.d.ts +5 -5
- package/dist/esm/components/progress-accordion/progress-accordion.d.ts.map +1 -1
- package/dist/esm/components/progress-accordion/progress-accordion.js +6 -6
- package/dist/esm/components/progress-accordion/progress-accordion.js.map +1 -1
- package/dist/esm/components/progress-tabs/progress-tabs.d.ts +5 -5
- package/dist/esm/components/progress-tabs/progress-tabs.d.ts.map +1 -1
- package/dist/esm/components/progress-tabs/progress-tabs.js +5 -5
- package/dist/esm/components/progress-tabs/progress-tabs.js.map +1 -1
- package/dist/esm/components/prompt/prompt.d.ts +8 -8
- package/dist/esm/components/prompt/prompt.d.ts.map +1 -1
- package/dist/esm/components/prompt/prompt.js +10 -10
- package/dist/esm/components/prompt/prompt.js.map +1 -1
- package/dist/esm/components/radio-group/radio-group.d.ts +4 -4
- package/dist/esm/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/esm/components/radio-group/radio-group.js +6 -6
- package/dist/esm/components/radio-group/radio-group.js.map +1 -1
- package/dist/esm/components/select/select.d.ts +9 -9
- package/dist/esm/components/select/select.d.ts.map +1 -1
- package/dist/esm/components/select/select.js +14 -14
- package/dist/esm/components/select/select.js.map +1 -1
- package/dist/esm/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/esm/components/skeleton/skeleton.js +1 -1
- package/dist/esm/components/skeleton/skeleton.js.map +1 -1
- package/dist/esm/components/switch/switch.d.ts +2 -2
- package/dist/esm/components/switch/switch.d.ts.map +1 -1
- package/dist/esm/components/switch/switch.js +3 -3
- package/dist/esm/components/switch/switch.js.map +1 -1
- package/dist/esm/components/tabs/tabs.d.ts +5 -5
- package/dist/esm/components/tabs/tabs.d.ts.map +1 -1
- package/dist/esm/components/tabs/tabs.js +5 -5
- package/dist/esm/components/tabs/tabs.js.map +1 -1
- package/dist/esm/components/text/text.d.ts.map +1 -1
- package/dist/esm/components/text/text.js +2 -2
- package/dist/esm/components/text/text.js.map +1 -1
- package/dist/esm/components/textarea/textarea.js +1 -1
- package/dist/esm/components/textarea/textarea.js.map +1 -1
- package/dist/esm/components/toast/toast.d.ts.map +1 -1
- package/dist/esm/components/toast/toast.js +1 -1
- package/dist/esm/components/toast/toast.js.map +1 -1
- package/dist/esm/components/tooltip/tooltip.d.ts +3 -3
- package/dist/esm/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/esm/components/tooltip/tooltip.js +6 -6
- package/dist/esm/components/tooltip/tooltip.js.map +1 -1
- package/package.json +4 -18
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hint.js","sourceRoot":"","sources":["../../../../src/components/hint/hint.tsx"],"names":[],"mappings":";;;;AAAA,2CAAwD;AACxD,6BAAuC;AACvC,qDAA8B;AAE9B,
|
1
|
+
{"version":3,"file":"hint.js","sourceRoot":"","sources":["../../../../src/components/hint/hint.tsx"],"names":[],"mappings":";;;;AAAA,2CAAwD;AACxD,6BAAuC;AACvC,qDAA8B;AAE9B,qCAAiC;AAEjC,MAAM,YAAY,GAAG,IAAA,SAAG,EAAC;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,8DAA8D;SACtE;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,MAAM;KAChB;CACF,CAAC,CAAA;AAMF,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CACE,EACE,SAAS;AACT;;GAEG;AACH,OAAO,GAAG,MAAM,EAChB,QAAQ,EACR,GAAG,KAAK,EACE,EACZ,GAAG,EACH,EAAE;IACF,OAAO,CACL,8BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK;QAER,OAAO,KAAK,OAAO,IAAI,6BAAK,SAAS,EAAC,yCAAyC;YAAC,oBAAC,8BAAsB,OAAG,CAAM;QAChH,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CACF,CAAA;AAGQ,oBAAI;AAFb,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA","sourcesContent":["import { ExclamationCircleSolid } from \"@medusajs/icons\"\nimport { VariantProps, cva } from \"cva\"\nimport * as React from \"react\"\n\nimport { clx } from \"@/utils/clx\"\n\nconst hintVariants = cva({\n base: \"txt-small\",\n variants: {\n variant: {\n info: \"text-ui-fg-subtle\",\n error: \"text-ui-fg-error grid grid-cols-[20px_1fr] gap-1 items-start\",\n },\n },\n defaultVariants: {\n variant: \"info\",\n },\n})\n\ninterface HintProps\n extends VariantProps<typeof hintVariants>,\n React.ComponentPropsWithoutRef<\"span\"> {}\n\nconst Hint = React.forwardRef<HTMLSpanElement, HintProps>(\n (\n {\n className,\n /**\n * The hint's style.\n */\n variant = \"info\",\n children,\n ...props\n }: HintProps,\n ref\n ) => {\n return (\n <span\n ref={ref}\n className={clx(hintVariants({ variant }), className)}\n {...props}\n >\n {variant === \"error\" && <div className=\"size-5 flex items-center justify-center\"><ExclamationCircleSolid /></div>}\n {children}\n </span>\n )\n }\n)\nHint.displayName = \"Hint\"\n\nexport { Hint }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-badge.d.ts","sourceRoot":"","sources":["../../../../src/components/icon-badge/icon-badge.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"icon-badge.d.ts","sourceRoot":"","sources":["../../../../src/components/icon-badge/icon-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAGvD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAQrB,CAAA;AAEF,UAAU,cACR,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAC3D,YAAY,CAAC,OAAO,kBAAkB,CAAC,EACvC,YAAY,CAAC,OAAO,iBAAiB,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;GAEG;AACH,QAAA,MAAM,SAAS,wFAsCd,CAAA;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.IconBadge = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const react_slot_1 = require("@radix-ui/react-slot");
|
6
5
|
const cva_1 = require("cva");
|
6
|
+
const radix_ui_1 = require("radix-ui");
|
7
7
|
const React = tslib_1.__importStar(require("react"));
|
8
8
|
const badge_1 = require("../badge");
|
9
9
|
const clx_1 = require("../../utils/clx");
|
@@ -33,7 +33,7 @@ size = "base",
|
|
33
33
|
* passed child element instead.
|
34
34
|
*/
|
35
35
|
asChild = false, ...props }, ref) => {
|
36
|
-
const Component = asChild ?
|
36
|
+
const Component = asChild ? radix_ui_1.Slot.Root : "span";
|
37
37
|
return (React.createElement(Component, { ref: ref, className: (0, clx_1.clx)((0, badge_1.badgeColorVariants)({ color }), iconBadgeVariants({ size }), className), ...props }, children));
|
38
38
|
});
|
39
39
|
exports.IconBadge = IconBadge;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-badge.js","sourceRoot":"","sources":["../../../../src/components/icon-badge/icon-badge.tsx"],"names":[],"mappings":";;;;AAAA,
|
1
|
+
{"version":3,"file":"icon-badge.js","sourceRoot":"","sources":["../../../../src/components/icon-badge/icon-badge.tsx"],"names":[],"mappings":";;;;AAAA,6BAA4C;AAC5C,uCAA+B;AAC/B,qDAA8B;AAE9B,8CAAuD;AACvD,qCAAiC;AAEjC,MAAM,iBAAiB,GAAG,IAAA,SAAG,EAAC;IAC5B,IAAI,EAAE,oEAAoE;IAC1E,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,SAAS;SACjB;KACF;CACF,CAAC,CAAA;AASF;;GAEG;AACH,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,QAAQ,EACR,SAAS;AACT;;GAEG;AACH,KAAK,GAAG,MAAM;AACd;;GAEG;AACH,IAAI,GAAG,MAAM;AACb;;;GAGG;AACH,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EACO,EACjB,GAAG,EACH,EAAE;IACF,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,eAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAE9C,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EACZ,IAAA,0BAAkB,EAAC,EAAE,KAAK,EAAE,CAAC,EAC7B,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC,EAC3B,SAAS,CACV,KACG,KAAK,IAER,QAAQ,CACC,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAGQ,8BAAS;AAFlB,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA","sourcesContent":["import { cva, type VariantProps } from \"cva\"\nimport { Slot } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { badgeColorVariants } from \"@/components/badge\"\nimport { clx } from \"@/utils/clx\"\n\nconst iconBadgeVariants = cva({\n base: \"flex items-center justify-center overflow-hidden rounded-md border\",\n variants: {\n size: {\n base: \"h-6 w-6\",\n large: \"h-7 w-7\",\n },\n },\n})\n\ninterface IconBadgeProps\n extends Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\">,\n VariantProps<typeof badgeColorVariants>,\n VariantProps<typeof iconBadgeVariants> {\n asChild?: boolean\n}\n\n/**\n * This component is based on the `span` element and supports all of its props\n */\nconst IconBadge = React.forwardRef<HTMLSpanElement, IconBadgeProps>(\n (\n {\n children,\n className,\n /**\n * The badge's color.\n */\n color = \"grey\",\n /**\n * The badge's size.\n */\n size = \"base\",\n /**\n * Whether to remove the wrapper `span` element and use the\n * passed child element instead.\n */\n asChild = false,\n ...props\n }: IconBadgeProps,\n ref\n ) => {\n const Component = asChild ? Slot.Root : \"span\"\n\n return (\n <Component\n ref={ref}\n className={clx(\n badgeColorVariants({ color }),\n iconBadgeVariants({ size }),\n className\n )}\n {...props}\n >\n {children}\n </Component>\n )\n }\n)\nIconBadge.displayName = \"IconBadge\"\n\nexport { IconBadge }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAO,MAAM,KAAK,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAkCtB,CAAA;AAEF,UAAU,eACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAC9C,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,QAAA,MAAM,UAAU,2FAgEf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAA"}
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.iconButtonVariants = exports.IconButton = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const icons_1 = require("@medusajs/icons");
|
6
|
-
const react_slot_1 = require("@radix-ui/react-slot");
|
7
6
|
const cva_1 = require("cva");
|
7
|
+
const radix_ui_1 = require("radix-ui");
|
8
8
|
const React = tslib_1.__importStar(require("react"));
|
9
9
|
const clx_1 = require("../../utils/clx");
|
10
10
|
const iconButtonVariants = (0, cva_1.cva)({
|
@@ -50,7 +50,7 @@ asChild = false, className, children,
|
|
50
50
|
* Whether to show a loading spinner.
|
51
51
|
*/
|
52
52
|
isLoading = false, disabled, ...props }, ref) => {
|
53
|
-
const Component = asChild ?
|
53
|
+
const Component = asChild ? radix_ui_1.Slot.Root : "button";
|
54
54
|
/**
|
55
55
|
* In the case of a button where asChild is true, and isLoading is true, we ensure that
|
56
56
|
* only on element is passed as a child to the Slot component. This is because the Slot
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":";;;;AAAA,2CAAyC;AACzC,
|
1
|
+
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":";;;;AAAA,2CAAyC;AACzC,6BAAuC;AACvC,uCAA+B;AAC/B,qDAA8B;AAE9B,qCAAiC;AAEjC,MAAM,kBAAkB,GAAG,IAAA,SAAG,EAAC;IAC7B,IAAI,EAAE,IAAA,SAAG,EACP,qGAAqG,EACrG,0FAA0F,CAC3F;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,IAAA,SAAG,EACV,+DAA+D,EAC/D,kCAAkC,EAClC,qCAAqC,EACrC,4CAA4C,CAC7C;YACD,WAAW,EAAE,IAAA,SAAG,EACd,4CAA4C,EAC5C,sCAAsC,EACtC,yCAAyC,EACzC,wEAAwE,EACxE,gDAAgD,CACjD;SACF;QACD,IAAI,EAAE;YACJ,SAAS,EAAE,SAAS;YACpB,MAAM,EAAE,aAAa;YACrB,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,eAAe;YACrB,KAAK,EAAE,iBAAiB;YACxB,MAAM,EAAE,iBAAiB;SAC1B;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,MAAM;KACb;CACF,CAAC,CAAA;AA+EmB,gDAAkB;AAtEvC;;GAEG;AACH,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CACjC,CACE;AACE;;GAEG;AACH,OAAO,GAAG,SAAS;AACnB;;GAEG;AACH,IAAI,GAAG,MAAM;AACb;;;GAGG;AACH,OAAO,GAAG,KAAK,EACf,SAAS,EACT,QAAQ;AACR;;GAEG;AACH,SAAS,GAAG,KAAK,EACjB,QAAQ,EACR,GAAG,KAAK,EACQ,EAClB,GAAG,EACH,EAAE;IACF,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,eAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAA;IAEhD;;;;OAIG;IACH,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CACL,8BAAM,SAAS,EAAC,qBAAqB;gBACnC,6BACE,SAAS,EAAE,IAAA,SAAG,EACZ,gFAAgF,CACjF;oBAED,oBAAC,eAAO,IAAC,SAAS,EAAC,cAAc,GAAG,CAChC;gBACL,QAAQ,CACJ,CACR,CAAA;QACH,CAAC;QAED,OAAO,QAAQ,CAAA;IACjB,CAAC,CAAA;IAED,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,KACJ,KAAK,EACT,SAAS,EAAE,IAAA,SAAG,EAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EAChE,QAAQ,EAAE,QAAQ,IAAI,SAAS,IAE9B,WAAW,EAAE,CACJ,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAGQ,gCAAU;AAFnB,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA","sourcesContent":["import { Spinner } from \"@medusajs/icons\"\nimport { VariantProps, cva } from \"cva\"\nimport { Slot } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { clx } from \"@/utils/clx\"\n\nconst iconButtonVariants = cva({\n base: clx(\n \"transition-fg inline-flex w-fit items-center justify-center overflow-hidden rounded-md outline-none\",\n \"disabled:bg-ui-bg-disabled disabled:shadow-buttons-neutral disabled:text-ui-fg-disabled \"\n ),\n variants: {\n variant: {\n primary: clx(\n \"shadow-buttons-neutral text-ui-fg-subtle bg-ui-button-neutral\",\n \"hover:bg-ui-button-neutral-hover\",\n \"active:bg-ui-button-neutral-pressed\",\n \"focus-visible:shadow-buttons-neutral-focus\"\n ),\n transparent: clx(\n \"text-ui-fg-subtle bg-ui-button-transparent\",\n \"hover:bg-ui-button-transparent-hover\",\n \"active:bg-ui-button-transparent-pressed\",\n \"focus-visible:shadow-buttons-neutral-focus focus-visible:bg-ui-bg-base\",\n \"disabled:!bg-transparent disabled:!shadow-none\"\n ),\n },\n size: {\n \"2xsmall\": \"h-5 w-5\",\n xsmall: \"h-6 w-6 p-1\",\n small: \"h-7 w-7 p-1\",\n base: \"h-8 w-8 p-1.5\",\n large: \"h-10 w-10 p-2.5\",\n xlarge: \"h-12 w-12 p-3.5\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"base\",\n },\n})\n\ninterface IconButtonProps\n extends React.ComponentPropsWithoutRef<\"button\">,\n VariantProps<typeof iconButtonVariants> {\n asChild?: boolean\n isLoading?: boolean\n}\n\n/**\n * This component is based on the `button` element and supports all of its props\n */\nconst IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n /**\n * The button's style.\n */\n variant = \"primary\",\n /**\n * The button's size.\n */\n size = \"base\",\n /**\n * Whether to remove the wrapper `button` element and use the\n * passed child element instead.\n */\n asChild = false,\n className,\n children,\n /**\n * Whether to show a loading spinner.\n */\n isLoading = false,\n disabled,\n ...props\n }: IconButtonProps,\n ref\n ) => {\n const Component = asChild ? Slot.Root : \"button\"\n\n /**\n * In the case of a button where asChild is true, and isLoading is true, we ensure that\n * only on element is passed as a child to the Slot component. This is because the Slot\n * component only accepts a single child.\n */\n const renderInner = () => {\n if (isLoading) {\n return (\n <span className=\"pointer-events-none\">\n <div\n className={clx(\n \"bg-ui-bg-disabled absolute inset-0 flex items-center justify-center rounded-md\"\n )}\n >\n <Spinner className=\"animate-spin\" />\n </div>\n {children}\n </span>\n )\n }\n\n return children\n }\n\n return (\n <Component\n ref={ref}\n {...props}\n className={clx(iconButtonVariants({ variant, size }), className)}\n disabled={disabled || isLoading}\n >\n {renderInner()}\n </Component>\n )\n }\n)\nIconButton.displayName = \"IconButton\"\n\nexport { IconButton, iconButtonVariants }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAkBjB,CAAA;AAEF,UAAU,UACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAC7C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC;;GAEG;AACH,QAAA,MAAM,KAAK,qFAqBV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.Label = void 0;
|
5
5
|
const tslib_1 = require("tslib");
|
6
|
-
const Primitives = tslib_1.__importStar(require("@radix-ui/react-label"));
|
7
6
|
const cva_1 = require("cva");
|
7
|
+
const radix_ui_1 = require("radix-ui");
|
8
8
|
const React = tslib_1.__importStar(require("react"));
|
9
9
|
const clx_1 = require("../../utils/clx");
|
10
10
|
const labelVariants = (0, cva_1.cva)({
|
@@ -38,7 +38,7 @@ size = "base",
|
|
38
38
|
* The label's font weight.
|
39
39
|
*/
|
40
40
|
weight = "regular", ...props }, ref) => {
|
41
|
-
return (React.createElement(
|
41
|
+
return (React.createElement(radix_ui_1.Label.Root, { ref: ref, className: (0, clx_1.clx)(labelVariants({ size, weight }), className), ...props }));
|
42
42
|
});
|
43
43
|
exports.Label = Label;
|
44
44
|
Label.displayName = "Label";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,6BAA4C;AAC5C,uCAA8C;AAC9C,qDAA8B;AAE9B,qCAAiC;AAEjC,MAAM,aAAa,GAAG,IAAA,SAAG,EAAC;IACxB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,MAAM,EAAE,oBAAoB;YAC5B,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,mBAAmB;SAC3B;QACD,MAAM,EAAE;YACN,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,aAAa;SACpB;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAA;AAMF;;GAEG;AACH,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,CAAC,EACC,SAAS;AACT;;GAEG;AACH,IAAI,GAAG,MAAM;AACb;;GAEG;AACH,MAAM,GAAG,SAAS,EAClB,GAAG,KAAK,EACG,EAAE,GAAG,EAAE,EAAE;IACpB,OAAO,CACL,oBAAC,gBAAU,CAAC,IAAI,IACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EAAC,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,KACtD,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAGQ,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA","sourcesContent":["\"use client\"\n\nimport { cva, type VariantProps } from \"cva\"\nimport { Label as RadixLabel } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { clx } from \"@/utils/clx\"\n\nconst labelVariants = cva({\n base: \"font-sans\",\n variants: {\n size: {\n xsmall: \"txt-compact-xsmall\",\n small: \"txt-compact-small\",\n base: \"txt-compact-medium\",\n large: \"txt-compact-large\",\n },\n weight: {\n regular: \"font-normal\",\n plus: \"font-medium\",\n },\n },\n defaultVariants: {\n size: \"base\",\n weight: \"regular\",\n },\n})\n\ninterface LabelProps\n extends React.ComponentPropsWithoutRef<\"label\">,\n VariantProps<typeof labelVariants> {}\n\n/**\n * This component is based on the [Radix UI Label](https://www.radix-ui.com/primitives/docs/components/label) primitive.\n */\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ \n className, \n /**\n * The label's size.\n */\n size = \"base\", \n /**\n * The label's font weight.\n */\n weight = \"regular\", \n ...props\n }: LabelProps, ref) => {\n return (\n <RadixLabel.Root\n ref={ref}\n className={clx(labelVariants({ size, weight }), className)}\n {...props}\n />\n )\n }\n)\nLabel.displayName = \"Label\"\n\nexport { Label }\n"]}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import
|
1
|
+
import { Popover as RadixPopover } from "radix-ui";
|
2
2
|
import * as React from "react";
|
3
|
-
interface ContentProps extends React.ComponentPropsWithoutRef<typeof
|
3
|
+
interface ContentProps extends React.ComponentPropsWithoutRef<typeof RadixPopover.Content> {
|
4
4
|
}
|
5
5
|
declare const Popover: {
|
6
|
-
(props: React.ComponentPropsWithoutRef<typeof
|
6
|
+
(props: React.ComponentPropsWithoutRef<typeof RadixPopover.Root>): React.JSX.Element;
|
7
7
|
displayName: string;
|
8
8
|
} & {
|
9
|
-
Trigger: React.ForwardRefExoticComponent<Omit<
|
10
|
-
Anchor: React.ForwardRefExoticComponent<Omit<
|
11
|
-
Close: React.ForwardRefExoticComponent<Omit<
|
9
|
+
Trigger: React.ForwardRefExoticComponent<Omit<RadixPopover.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
10
|
+
Anchor: React.ForwardRefExoticComponent<Omit<RadixPopover.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
11
|
+
Close: React.ForwardRefExoticComponent<Omit<RadixPopover.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
12
12
|
Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<HTMLDivElement>>;
|
13
13
|
Seperator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
14
14
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsC9B,UAAU,YACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,YAAY,CAAC,OAAO,CAAC;CAAG;AAiExE,QAAA,MAAM,OAAO;YAhGJ,MAAM,wBAAwB,CAAC,OAAO,aAAa,IAAI,CAAC;;;;;;;;CAsG/D,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
@@ -2,26 +2,26 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Popover = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
-
const
|
5
|
+
const radix_ui_1 = require("radix-ui");
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
7
7
|
const clx_1 = require("../../utils/clx");
|
8
8
|
/**
|
9
9
|
* This component is based on the [Radix UI Popover](https://www.radix-ui.com/primitives/docs/components/popover) primitves.
|
10
10
|
*/
|
11
11
|
const Root = (props) => {
|
12
|
-
return React.createElement(
|
12
|
+
return React.createElement(radix_ui_1.Popover.Root, { ...props });
|
13
13
|
};
|
14
14
|
Root.displayName = "Popover";
|
15
15
|
const Trigger = React.forwardRef((props, ref) => {
|
16
|
-
return React.createElement(
|
16
|
+
return React.createElement(radix_ui_1.Popover.Trigger, { ref: ref, ...props });
|
17
17
|
});
|
18
18
|
Trigger.displayName = "Popover.Trigger";
|
19
19
|
const Anchor = React.forwardRef((props, ref) => {
|
20
|
-
return React.createElement(
|
20
|
+
return React.createElement(radix_ui_1.Popover.Anchor, { ref: ref, ...props });
|
21
21
|
});
|
22
22
|
Anchor.displayName = "Popover.Anchor";
|
23
23
|
const Close = React.forwardRef((props, ref) => {
|
24
|
-
return React.createElement(
|
24
|
+
return React.createElement(radix_ui_1.Popover.Close, { ref: ref, ...props });
|
25
25
|
});
|
26
26
|
Close.displayName = "Popover.Close";
|
27
27
|
/**
|
@@ -41,8 +41,8 @@ side = "bottom",
|
|
41
41
|
* The preferred alignment against the anchor. May change when collisions occur.
|
42
42
|
*/
|
43
43
|
align = "start", collisionPadding, ...props }, ref) => {
|
44
|
-
return (React.createElement(
|
45
|
-
React.createElement(
|
44
|
+
return (React.createElement(radix_ui_1.Popover.Portal, null,
|
45
|
+
React.createElement(radix_ui_1.Popover.Content, { ref: ref, sideOffset: sideOffset, side: side, align: align, collisionPadding: collisionPadding, className: (0, clx_1.clx)("bg-ui-bg-base text-ui-fg-base shadow-elevation-flyout max-h-[var(--radix-popper-available-height)] min-w-[220px] overflow-hidden rounded-lg p-1", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props })));
|
46
46
|
});
|
47
47
|
Content.displayName = "Popover.Content";
|
48
48
|
const Seperator = React.forwardRef(({ className, ...props }, ref) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../src/components/popover/popover.tsx"],"names":[],"mappings":";;;;AAAA,
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../src/components/popover/popover.tsx"],"names":[],"mappings":";;;;AAAA,uCAAkD;AAClD,qDAA8B;AAE9B,qCAAiC;AAEjC;;GAEG;AACH,MAAM,IAAI,GAAG,CACX,KAA+D,EAC/D,EAAE;IACF,OAAO,oBAAC,kBAAY,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AACzC,CAAC,CAAA;AACD,IAAI,CAAC,WAAW,GAAG,SAAS,CAAA;AAE5B,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAG9B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,OAAO,oBAAC,kBAAY,CAAC,OAAO,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAA;AACtD,CAAC,CAAC,CAAA;AACF,OAAO,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAEvC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,OAAO,oBAAC,kBAAY,CAAC,MAAM,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAA;AACrD,CAAC,CAAC,CAAA;AACF,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAErC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACf,OAAO,oBAAC,kBAAY,CAAC,KAAK,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAA;AACpD,CAAC,CAAC,CAAA;AACF,KAAK,CAAC,WAAW,GAAG,eAAe,CAAA;AAKnC;;GAEG;AACH,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAI9B,CACE,EACE,SAAS;AACT;;GAEG;AACH,UAAU,GAAG,CAAC;AACd;;;GAGG;AACH,IAAI,GAAG,QAAQ;AACf;;GAEG;AACH,KAAK,GAAG,OAAO,EACf,gBAAgB,EAChB,GAAG,KAAK,EACK,EACf,GAAG,EACH,EAAE;IACF,OAAO,CACL,oBAAC,kBAAY,CAAC,MAAM;QAClB,oBAAC,kBAAY,CAAC,OAAO,IACnB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,IAAA,SAAG,EACZ,iJAAiJ,EACjJ,kVAAkV,EAClV,SAAS,CACV,KACG,KAAK,GACT,CACkB,CACvB,CAAA;AACH,CAAC,CACF,CAAA;AACD,OAAO,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAEvC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAGhC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,OAAO,CACL,6BACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EAAC,mCAAmC,EAAE,SAAS,CAAC,KAC1D,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,SAAS,CAAC,WAAW,GAAG,mBAAmB,CAAA;AAE3C,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;IAClC,OAAO;IACP,MAAM;IACN,KAAK;IACL,OAAO;IACP,SAAS;CACV,CAAC,CAAA;AAEO,0BAAO","sourcesContent":["import { Popover as RadixPopover } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { clx } from \"@/utils/clx\"\n\n/**\n * This component is based on the [Radix UI Popover](https://www.radix-ui.com/primitives/docs/components/popover) primitves.\n */\nconst Root = (\n props: React.ComponentPropsWithoutRef<typeof RadixPopover.Root>\n) => {\n return <RadixPopover.Root {...props} />\n}\nRoot.displayName = \"Popover\"\n\nconst Trigger = React.forwardRef<\n React.ElementRef<typeof RadixPopover.Trigger>,\n React.ComponentPropsWithoutRef<typeof RadixPopover.Trigger>\n>((props, ref) => {\n return <RadixPopover.Trigger ref={ref} {...props} />\n})\nTrigger.displayName = \"Popover.Trigger\"\n\nconst Anchor = React.forwardRef<\n React.ElementRef<typeof RadixPopover.Anchor>,\n React.ComponentPropsWithoutRef<typeof RadixPopover.Anchor>\n>((props, ref) => {\n return <RadixPopover.Anchor ref={ref} {...props} />\n})\nAnchor.displayName = \"Popover.Anchor\"\n\nconst Close = React.forwardRef<\n React.ElementRef<typeof RadixPopover.Close>,\n React.ComponentPropsWithoutRef<typeof RadixPopover.Close>\n>((props, ref) => {\n return <RadixPopover.Close ref={ref} {...props} />\n})\nClose.displayName = \"Popover.Close\"\n\ninterface ContentProps\n extends React.ComponentPropsWithoutRef<typeof RadixPopover.Content> {}\n\n/**\n * @excludeExternal\n */\nconst Content = React.forwardRef<\n React.ElementRef<typeof RadixPopover.Content>,\n ContentProps\n>(\n (\n {\n className,\n /**\n * The distance in pixels from the anchor.\n */\n sideOffset = 8,\n /**\n * The preferred side of the anchor to render against when open.\n * Will be reversed when collisions occur and `avoidCollisions` is enabled.\n */\n side = \"bottom\",\n /**\n * The preferred alignment against the anchor. May change when collisions occur.\n */\n align = \"start\",\n collisionPadding,\n ...props\n }: ContentProps,\n ref\n ) => {\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n ref={ref}\n sideOffset={sideOffset}\n side={side}\n align={align}\n collisionPadding={collisionPadding}\n className={clx(\n \"bg-ui-bg-base text-ui-fg-base shadow-elevation-flyout max-h-[var(--radix-popper-available-height)] min-w-[220px] overflow-hidden rounded-lg p-1\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </RadixPopover.Portal>\n )\n }\n)\nContent.displayName = \"Popover.Content\"\n\nconst Seperator = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={clx(\"bg-ui-border-base -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n})\nSeperator.displayName = \"Popover.Seperator\"\n\nconst Popover = Object.assign(Root, {\n Trigger,\n Anchor,\n Close,\n Content,\n Seperator,\n})\n\nexport { Popover }\n"]}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import
|
1
|
+
import { Accordion as RadixAccordion } from "radix-ui";
|
2
2
|
import * as React from "react";
|
3
3
|
import { ProgressStatus } from "../../types";
|
4
|
-
interface HeaderProps extends React.ComponentPropsWithoutRef<typeof
|
4
|
+
interface HeaderProps extends React.ComponentPropsWithoutRef<typeof RadixAccordion.Header> {
|
5
5
|
status?: ProgressStatus;
|
6
6
|
}
|
7
7
|
declare const ProgressAccordion: {
|
8
|
-
(props: React.ComponentPropsWithoutRef<typeof
|
8
|
+
(props: React.ComponentPropsWithoutRef<typeof RadixAccordion.Root>): React.JSX.Element;
|
9
9
|
displayName: string;
|
10
10
|
} & {
|
11
|
-
Item: React.ForwardRefExoticComponent<Omit<
|
11
|
+
Item: React.ForwardRefExoticComponent<Omit<RadixAccordion.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
12
12
|
Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
13
|
-
Content: React.ForwardRefExoticComponent<Omit<
|
13
|
+
Content: React.ForwardRefExoticComponent<Omit<RadixAccordion.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
14
14
|
};
|
15
15
|
export { ProgressAccordion };
|
16
16
|
//# sourceMappingURL=progress-accordion.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-accordion/progress-accordion.tsx"],"names":[],"mappings":"AAQA,OAAO,
|
1
|
+
{"version":3,"file":"progress-accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-accordion/progress-accordion.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AA6BxC,UAAU,WACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC;IACpE,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AA6FD,QAAA,MAAM,iBAAiB;YAtHF,MAAM,wBAAwB,CAAC,OAAO,eAAe,IAAI,CAAC;;;;;;CA0H7E,CAAA;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ProgressAccordion = void 0;
|
5
5
|
const tslib_1 = require("tslib");
|
6
6
|
const icons_1 = require("@medusajs/icons");
|
7
|
-
const
|
7
|
+
const radix_ui_1 = require("radix-ui");
|
8
8
|
const React = tslib_1.__importStar(require("react"));
|
9
9
|
const clx_1 = require("../../utils/clx");
|
10
10
|
const icon_button_1 = require("../icon-button");
|
@@ -12,11 +12,11 @@ const icon_button_1 = require("../icon-button");
|
|
12
12
|
* This component is based on the [Radix UI Accordion](https://radix-ui.com/primitives/docs/components/accordion) primitves.
|
13
13
|
*/
|
14
14
|
const Root = (props) => {
|
15
|
-
return React.createElement(
|
15
|
+
return React.createElement(radix_ui_1.Accordion.Root, { ...props });
|
16
16
|
};
|
17
17
|
Root.displayName = "ProgressAccordion";
|
18
18
|
const Item = React.forwardRef(({ className, ...props }, ref) => {
|
19
|
-
return (React.createElement(
|
19
|
+
return (React.createElement(radix_ui_1.Accordion.Item, { ref: ref, className: (0, clx_1.clx)("border-ui-border-base border-b last-of-type:border-b-0", className), ...props }));
|
20
20
|
});
|
21
21
|
Item.displayName = "ProgressAccordion.Item";
|
22
22
|
const ProgressIndicator = ({
|
@@ -45,16 +45,16 @@ const Header = React.forwardRef(({ className,
|
|
45
45
|
* The current status.
|
46
46
|
*/
|
47
47
|
status = "not-started", children, ...props }, ref) => {
|
48
|
-
return (React.createElement(
|
48
|
+
return (React.createElement(radix_ui_1.Accordion.Header, { ref: ref, className: (0, clx_1.clx)("h3-core text-ui-fg-base group flex w-full flex-1 items-center gap-4 px-6", className), ...props },
|
49
49
|
React.createElement(ProgressIndicator, { status: status }),
|
50
50
|
children,
|
51
|
-
React.createElement(
|
51
|
+
React.createElement(radix_ui_1.Accordion.Trigger, { asChild: true, className: "ml-auto" },
|
52
52
|
React.createElement(icon_button_1.IconButton, { variant: "transparent" },
|
53
53
|
React.createElement(icons_1.Plus, { className: "transform transition-transform group-data-[state=open]:rotate-45" })))));
|
54
54
|
});
|
55
55
|
Header.displayName = "ProgressAccordion.Header";
|
56
56
|
const Content = React.forwardRef(({ className, ...props }, ref) => {
|
57
|
-
return (React.createElement(
|
57
|
+
return (React.createElement(radix_ui_1.Accordion.Content, { ref: ref, className: (0, clx_1.clx)("overflow-hidden", "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down pl-[88px] pr-6", className), ...props }));
|
58
58
|
});
|
59
59
|
Content.displayName = "ProgressAccordion.Content";
|
60
60
|
const ProgressAccordion = Object.assign(Root, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-accordion.js","sourceRoot":"","sources":["../../../../src/components/progress-accordion/progress-accordion.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,2CAKwB;AACxB,
|
1
|
+
{"version":3,"file":"progress-accordion.js","sourceRoot":"","sources":["../../../../src/components/progress-accordion/progress-accordion.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,2CAKwB;AACxB,uCAAsD;AACtD,qDAA8B;AAG9B,qCAAiC;AACjC,gDAA2C;AAE3C;;GAEG;AACH,MAAM,IAAI,GAAG,CAAC,KAAiE,EAAE,EAAE;IACjF,OAAO,oBAAC,oBAAc,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AAC3C,CAAC,CAAA;AACD,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAA;AAEtC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAG3B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,OAAO,CACL,oBAAC,oBAAc,CAAC,IAAI,IAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EACZ,wDAAwD,EACxD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,IAAI,CAAC,WAAW,GAAG,wBAAwB,CAAA;AAW3C,MAAM,iBAAiB,GAAG,CAAC;AACzB;;GAEG;AACH,MAAM,EACN,GAAG,KAAK,EACa,EAAE,EAAE;IACzB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC9B,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,aAAa;gBAChB,OAAO,wBAAgB,CAAA;YACzB,KAAK,aAAa;gBAChB,OAAO,uBAAe,CAAA;YACxB,KAAK,WAAW;gBACd,OAAO,wBAAgB,CAAA;YACzB;gBACE,OAAO,wBAAgB,CAAA;QAC3B,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,CACL,8BACE,SAAS,EAAC,4GAA4G,KAClH,KAAK;QAET,oBAAC,IAAI,OAAG,CACH,CACR,CAAA;AACH,CAAC,CAAA;AACD,iBAAiB,CAAC,WAAW,GAAG,qCAAqC,CAAA;AAErE,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAI7B,CACE,EACE,SAAS;AACT;;GAEG;AACH,MAAM,GAAG,aAAa,EACtB,QAAQ,EACR,GAAG,KAAK,EACI,EACd,GAAG,EACH,EAAE;IACF,OAAO,CACL,oBAAC,oBAAc,CAAC,MAAM,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EACZ,0EAA0E,EAC1E,SAAS,CACV,KACG,KAAK;QAET,oBAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,GAAI;QACpC,QAAQ;QACT,oBAAC,oBAAc,CAAC,OAAO,IAAC,OAAO,QAAC,SAAS,EAAC,SAAS;YACjD,oBAAC,wBAAU,IAAC,OAAO,EAAC,aAAa;gBAC/B,oBAAC,YAAI,IAAC,SAAS,EAAC,kEAAkE,GAAG,CAC1E,CACU,CACH,CACzB,CAAA;AACH,CAAC,CACF,CAAA;AACD,MAAM,CAAC,WAAW,GAAG,0BAA0B,CAAA;AAE/C,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAG9B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,OAAO,CACL,oBAAC,oBAAc,CAAC,OAAO,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EACZ,iBAAiB,EACjB,kGAAkG,EAClG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,OAAO,CAAC,WAAW,GAAG,2BAA2B,CAAA;AAEjD,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;IAC5C,IAAI;IACJ,MAAM;IACN,OAAO;CACR,CAAC,CAAA;AAEO,8CAAiB","sourcesContent":["\"use client\"\n\nimport {\n CheckCircleSolid,\n CircleDottedLine,\n CircleHalfSolid,\n Plus,\n} from \"@medusajs/icons\"\nimport { Accordion as RadixAccordion } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { ProgressStatus } from \"@/types\"\nimport { clx } from \"@/utils/clx\"\nimport { IconButton } from \"../icon-button\"\n\n/**\n * This component is based on the [Radix UI Accordion](https://radix-ui.com/primitives/docs/components/accordion) primitves.\n */\nconst Root = (props: React.ComponentPropsWithoutRef<typeof RadixAccordion.Root>) => {\n return <RadixAccordion.Root {...props} />\n}\nRoot.displayName = \"ProgressAccordion\"\n\nconst Item = React.forwardRef<\n React.ElementRef<typeof RadixAccordion.Item>,\n React.ComponentPropsWithoutRef<typeof RadixAccordion.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadixAccordion.Item\n ref={ref}\n className={clx(\n \"border-ui-border-base border-b last-of-type:border-b-0\",\n className\n )}\n {...props}\n />\n )\n})\nItem.displayName = \"ProgressAccordion.Item\"\n\ninterface HeaderProps\n extends React.ComponentPropsWithoutRef<typeof RadixAccordion.Header> {\n status?: ProgressStatus\n}\n\ninterface StatusIndicatorProps extends React.ComponentPropsWithoutRef<\"span\"> {\n status: ProgressStatus\n}\n\nconst ProgressIndicator = ({\n /**\n * The current status.\n */\n status,\n ...props\n}: StatusIndicatorProps) => {\n const Icon = React.useMemo(() => {\n switch (status) {\n case \"not-started\":\n return CircleDottedLine\n case \"in-progress\":\n return CircleHalfSolid\n case \"completed\":\n return CheckCircleSolid\n default:\n return CircleDottedLine\n }\n }, [status])\n\n return (\n <span\n className=\"text-ui-fg-muted group-data-[state=open]:text-ui-fg-interactive flex h-12 w-12 items-center justify-center\"\n {...props}\n >\n <Icon />\n </span>\n )\n}\nProgressIndicator.displayName = \"ProgressAccordion.ProgressIndicator\"\n\nconst Header = React.forwardRef<\n React.ElementRef<typeof RadixAccordion.Header>,\n HeaderProps\n>(\n (\n {\n className,\n /**\n * The current status.\n */\n status = \"not-started\",\n children,\n ...props\n }: HeaderProps,\n ref\n ) => {\n return (\n <RadixAccordion.Header\n ref={ref}\n className={clx(\n \"h3-core text-ui-fg-base group flex w-full flex-1 items-center gap-4 px-6\",\n className\n )}\n {...props}\n >\n <ProgressIndicator status={status} />\n {children}\n <RadixAccordion.Trigger asChild className=\"ml-auto\">\n <IconButton variant=\"transparent\">\n <Plus className=\"transform transition-transform group-data-[state=open]:rotate-45\" />\n </IconButton>\n </RadixAccordion.Trigger>\n </RadixAccordion.Header>\n )\n }\n)\nHeader.displayName = \"ProgressAccordion.Header\"\n\nconst Content = React.forwardRef<\n React.ElementRef<typeof RadixAccordion.Content>,\n React.ComponentPropsWithoutRef<typeof RadixAccordion.Content>\n>(({ className, ...props }, ref) => {\n return (\n <RadixAccordion.Content\n ref={ref}\n className={clx(\n \"overflow-hidden\",\n \"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down pl-[88px] pr-6\",\n className\n )}\n {...props}\n />\n )\n})\nContent.displayName = \"ProgressAccordion.Content\"\n\nconst ProgressAccordion = Object.assign(Root, {\n Item,\n Header,\n Content,\n})\n\nexport { ProgressAccordion }\n"]}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import
|
1
|
+
import { Tabs as RadixTabs } from "radix-ui";
|
2
2
|
import * as React from "react";
|
3
3
|
import { ProgressStatus } from "../../types";
|
4
|
-
interface ProgressTabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof
|
4
|
+
interface ProgressTabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixTabs.Trigger>, "asChild"> {
|
5
5
|
status?: ProgressStatus;
|
6
6
|
}
|
7
7
|
declare const ProgressTabs: {
|
8
|
-
(props:
|
8
|
+
(props: RadixTabs.TabsProps): React.JSX.Element;
|
9
9
|
displayName: string;
|
10
10
|
} & {
|
11
11
|
Trigger: React.ForwardRefExoticComponent<ProgressTabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
12
|
-
List: React.ForwardRefExoticComponent<Omit<
|
13
|
-
Content: React.ForwardRefExoticComponent<Omit<
|
12
|
+
List: React.ForwardRefExoticComponent<Omit<RadixTabs.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
13
|
+
Content: React.ForwardRefExoticComponent<Omit<RadixTabs.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
14
14
|
};
|
15
15
|
export { ProgressTabs };
|
16
16
|
//# sourceMappingURL=progress-tabs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-tabs/progress-tabs.tsx"],"names":[],"mappings":"AAOA,OAAO,
|
1
|
+
{"version":3,"file":"progress-tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/progress-tabs/progress-tabs.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAiDxC,UAAU,wBACR,SAAQ,IAAI,CACV,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,OAAO,CAAC,EACxD,SAAS,CACV;IACD,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AA6DD,QAAA,MAAM,YAAY;YA5Ge,UAAU,SAAS;;;;;;CAgHlD,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ProgressTabs = void 0;
|
5
5
|
const tslib_1 = require("tslib");
|
6
6
|
const icons_1 = require("@medusajs/icons");
|
7
|
-
const
|
7
|
+
const radix_ui_1 = require("radix-ui");
|
8
8
|
const React = tslib_1.__importStar(require("react"));
|
9
9
|
const clx_1 = require("../../utils/clx");
|
10
10
|
/**
|
@@ -13,7 +13,7 @@ const clx_1 = require("../../utils/clx");
|
|
13
13
|
* @excludeExternal
|
14
14
|
*/
|
15
15
|
const ProgressTabsRoot = (props) => {
|
16
|
-
return React.createElement(
|
16
|
+
return React.createElement(radix_ui_1.Tabs.Root, { ...props });
|
17
17
|
};
|
18
18
|
ProgressTabsRoot.displayName = "ProgressTabs";
|
19
19
|
const ProgressIndicator = ({ status, className, ...props }) => {
|
@@ -33,14 +33,14 @@ const ProgressIndicator = ({ status, className, ...props }) => {
|
|
33
33
|
React.createElement(Icon, null)));
|
34
34
|
};
|
35
35
|
ProgressIndicator.displayName = "ProgressTabs.ProgressIndicator";
|
36
|
-
const ProgressTabsTrigger = React.forwardRef(({ className, children, status = "not-started", ...props }, ref) => (React.createElement(
|
36
|
+
const ProgressTabsTrigger = React.forwardRef(({ className, children, status = "not-started", ...props }, ref) => (React.createElement(radix_ui_1.Tabs.Trigger, { ref: ref, className: (0, clx_1.clx)("txt-compact-small-plus transition-fg text-ui-fg-muted bg-ui-bg-subtle border-r-ui-border-base inline-flex h-[52px] w-full max-w-[200px] flex-1 items-center gap-x-2 border-r px-4 text-left outline-none", "group/trigger overflow-hidden text-ellipsis whitespace-nowrap", "disabled:bg-ui-bg-disabled disabled:text-ui-fg-muted", "hover:bg-ui-bg-subtle-hover", "focus-visible:bg-ui-bg-base focus:z-[1]", "data-[state=active]:text-ui-fg-base data-[state=active]:bg-ui-bg-base", className), ...props },
|
37
37
|
React.createElement(ProgressIndicator, { status: status }),
|
38
38
|
children)));
|
39
39
|
ProgressTabsTrigger.displayName = "ProgressTabs.Trigger";
|
40
|
-
const ProgressTabsList = React.forwardRef(({ className, ...props }, ref) => (React.createElement(
|
40
|
+
const ProgressTabsList = React.forwardRef(({ className, ...props }, ref) => (React.createElement(radix_ui_1.Tabs.List, { ref: ref, className: (0, clx_1.clx)("flex items-center", className), ...props })));
|
41
41
|
ProgressTabsList.displayName = "ProgressTabs.List";
|
42
42
|
const ProgressTabsContent = React.forwardRef(({ className, ...props }, ref) => {
|
43
|
-
return (React.createElement(
|
43
|
+
return (React.createElement(radix_ui_1.Tabs.Content, { ref: ref, className: (0, clx_1.clx)("outline-none", className), ...props }));
|
44
44
|
});
|
45
45
|
ProgressTabsContent.displayName = "ProgressTabs.Content";
|
46
46
|
const ProgressTabs = Object.assign(ProgressTabsRoot, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-tabs.js","sourceRoot":"","sources":["../../../../src/components/progress-tabs/progress-tabs.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,2CAIwB;AACxB,
|
1
|
+
{"version":3,"file":"progress-tabs.js","sourceRoot":"","sources":["../../../../src/components/progress-tabs/progress-tabs.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;AAEZ,2CAIwB;AACxB,uCAA4C;AAC5C,qDAA8B;AAG9B,qCAAiC;AAEjC;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAA0B,EAAE,EAAE;IACtD,OAAO,oBAAC,eAAS,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AACtC,CAAC,CAAA;AACD,gBAAgB,CAAC,WAAW,GAAG,cAAc,CAAA;AAU7C,MAAM,iBAAiB,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAkB,EAAE,EAAE;IAC5E,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC9B,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,aAAa;gBAChB,OAAO,wBAAgB,CAAA;YACzB,KAAK,aAAa;gBAChB,OAAO,uBAAe,CAAA;YACxB,KAAK,WAAW;gBACd,OAAO,wBAAgB,CAAA;YACzB;gBACE,OAAO,wBAAgB,CAAA;QAC3B,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,CACL,8BACE,SAAS,EAAE,IAAA,SAAG,EACZ,2EAA2E,EAC3E,SAAS,CACV,KACG,KAAK;QAET,oBAAC,IAAI,OAAG,CACH,CACR,CAAA;AACH,CAAC,CAAA;AACD,iBAAiB,CAAC,WAAW,GAAG,gCAAgC,CAAA;AAUhE,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAI1C,CACE,EACE,SAAS,EACT,QAAQ,EACR,MAAM,GAAG,aAAa,EACtB,GAAG,KAAK,EACiB,EAC3B,GAAG,EACH,EAAE,CAAC,CACH,oBAAC,eAAS,CAAC,OAAO,IAChB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EACZ,0MAA0M,EAC1M,+DAA+D,EAC/D,sDAAsD,EACtD,6BAA6B,EAC7B,yCAAyC,EACzC,uEAAuE,EACvE,SAAS,CACV,KACG,KAAK;IAET,oBAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,GAAI;IACpC,QAAQ,CACS,CACrB,CACF,CAAA;AACD,mBAAmB,CAAC,WAAW,GAAG,sBAAsB,CAAA;AAExD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,oBAAC,eAAS,CAAC,IAAI,IACb,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EAAC,mBAAmB,EAAE,SAAS,CAAC,KAC1C,KAAK,GACT,CACH,CAAC,CAAA;AACF,gBAAgB,CAAC,WAAW,GAAG,mBAAmB,CAAA;AAElD,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAG1C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,OAAO,CACL,oBAAC,eAAS,CAAC,OAAO,IAChB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,SAAG,EAAC,cAAc,EAAE,SAAS,CAAC,KACrC,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAC,CAAA;AACF,mBAAmB,CAAC,WAAW,GAAG,sBAAsB,CAAA;AAExD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IACnD,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,mBAAmB;CAC7B,CAAC,CAAA;AAEO,oCAAY","sourcesContent":["\"use client\"\n\nimport {\n CheckCircleSolid,\n CircleDottedLine,\n CircleHalfSolid,\n} from \"@medusajs/icons\"\nimport { Tabs as RadixTabs } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { ProgressStatus } from \"@/types\"\nimport { clx } from \"@/utils/clx\"\n\n/**\n * This component is based on the [Radix UI Tabs](https://radix-ui.com/primitives/docs/components/tabs) primitves.\n *\n * @excludeExternal\n */\nconst ProgressTabsRoot = (props: RadixTabs.TabsProps) => {\n return <RadixTabs.Root {...props} />\n}\nProgressTabsRoot.displayName = \"ProgressTabs\"\n\ninterface IndicatorProps\n extends Omit<React.ComponentPropsWithoutRef<\"span\">, \"children\"> {\n /**\n * The current status.\n */\n status?: ProgressStatus\n}\n\nconst ProgressIndicator = ({ status, className, ...props }: IndicatorProps) => {\n const Icon = React.useMemo(() => {\n switch (status) {\n case \"not-started\":\n return CircleDottedLine\n case \"in-progress\":\n return CircleHalfSolid\n case \"completed\":\n return CheckCircleSolid\n default:\n return CircleDottedLine\n }\n }, [status])\n\n return (\n <span\n className={clx(\n \"text-ui-fg-muted group-data-[state=active]/trigger:text-ui-fg-interactive\",\n className\n )}\n {...props}\n >\n <Icon />\n </span>\n )\n}\nProgressIndicator.displayName = \"ProgressTabs.ProgressIndicator\"\n\ninterface ProgressTabsTriggerProps\n extends Omit<\n React.ComponentPropsWithoutRef<typeof RadixTabs.Trigger>,\n \"asChild\"\n > {\n status?: ProgressStatus\n}\n\nconst ProgressTabsTrigger = React.forwardRef<\n React.ElementRef<typeof RadixTabs.Trigger>,\n ProgressTabsTriggerProps\n>(\n (\n {\n className,\n children,\n status = \"not-started\",\n ...props\n }: ProgressTabsTriggerProps,\n ref\n ) => (\n <RadixTabs.Trigger\n ref={ref}\n className={clx(\n \"txt-compact-small-plus transition-fg text-ui-fg-muted bg-ui-bg-subtle border-r-ui-border-base inline-flex h-[52px] w-full max-w-[200px] flex-1 items-center gap-x-2 border-r px-4 text-left outline-none\",\n \"group/trigger overflow-hidden text-ellipsis whitespace-nowrap\",\n \"disabled:bg-ui-bg-disabled disabled:text-ui-fg-muted\",\n \"hover:bg-ui-bg-subtle-hover\",\n \"focus-visible:bg-ui-bg-base focus:z-[1]\",\n \"data-[state=active]:text-ui-fg-base data-[state=active]:bg-ui-bg-base\",\n className\n )}\n {...props}\n >\n <ProgressIndicator status={status} />\n {children}\n </RadixTabs.Trigger>\n )\n)\nProgressTabsTrigger.displayName = \"ProgressTabs.Trigger\"\n\nconst ProgressTabsList = React.forwardRef<\n React.ElementRef<typeof RadixTabs.List>,\n React.ComponentPropsWithoutRef<typeof RadixTabs.List>\n>(({ className, ...props }, ref) => (\n <RadixTabs.List\n ref={ref}\n className={clx(\"flex items-center\", className)}\n {...props}\n />\n))\nProgressTabsList.displayName = \"ProgressTabs.List\"\n\nconst ProgressTabsContent = React.forwardRef<\n React.ElementRef<typeof RadixTabs.Content>,\n React.ComponentPropsWithoutRef<typeof RadixTabs.Content>\n>(({ className, ...props }, ref) => {\n return (\n <RadixTabs.Content\n ref={ref}\n className={clx(\"outline-none\", className)}\n {...props}\n />\n )\n})\nProgressTabsContent.displayName = \"ProgressTabs.Content\"\n\nconst ProgressTabs = Object.assign(ProgressTabsRoot, {\n Trigger: ProgressTabsTrigger,\n List: ProgressTabsList,\n Content: ProgressTabsContent,\n})\n\nexport { ProgressTabs }\n"]}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import
|
1
|
+
import { AlertDialog as RadixAlertDialog } from "radix-ui";
|
2
2
|
import * as React from "react";
|
3
3
|
type PromptVariant = "danger" | "confirmation";
|
4
4
|
declare const Prompt: {
|
5
|
-
({ variant, ...props }: React.ComponentPropsWithoutRef<typeof
|
5
|
+
({ variant, ...props }: React.ComponentPropsWithoutRef<typeof RadixAlertDialog.Root> & {
|
6
6
|
variant?: PromptVariant;
|
7
7
|
}): React.JSX.Element;
|
8
8
|
displayName: string;
|
9
9
|
} & {
|
10
|
-
Trigger: React.ForwardRefExoticComponent<
|
11
|
-
Content: React.ForwardRefExoticComponent<Omit<
|
12
|
-
Title: React.ForwardRefExoticComponent<Omit<Omit<
|
13
|
-
Description: React.ForwardRefExoticComponent<Omit<
|
14
|
-
Action: React.ForwardRefExoticComponent<Omit<Omit<
|
15
|
-
Cancel: React.ForwardRefExoticComponent<Omit<Omit<
|
10
|
+
Trigger: React.ForwardRefExoticComponent<RadixAlertDialog.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
11
|
+
Content: React.ForwardRefExoticComponent<Omit<RadixAlertDialog.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
12
|
+
Title: React.ForwardRefExoticComponent<Omit<Omit<RadixAlertDialog.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref">, "asChild"> & React.RefAttributes<HTMLHeadingElement>>;
|
13
|
+
Description: React.ForwardRefExoticComponent<Omit<RadixAlertDialog.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
14
|
+
Action: React.ForwardRefExoticComponent<Omit<Omit<RadixAlertDialog.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref">, "asChild"> & React.RefAttributes<HTMLButtonElement>>;
|
15
|
+
Cancel: React.ForwardRefExoticComponent<Omit<Omit<RadixAlertDialog.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref">, "asChild"> & React.RefAttributes<HTMLButtonElement>>;
|
16
16
|
Header: {
|
17
17
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
18
18
|
displayName: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../../src/components/prompt/prompt.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../../src/components/prompt/prompt.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,aAAa,GAAG,QAAQ,GAAG,cAAc,CAAA;AA2L9C,QAAA,MAAM,MAAM;4BAxJT,MAAM,wBAAwB,CAAC,OAAO,iBAAiB,IAAI,CAAC,GAAG;QAChE,OAAO,CAAC,EAAE,aAAa,CAAA;KACxB;;;;;;;;;;kCA4HE,MAAM,cAAc,CAAC,cAAc,CAAC;;;;kCAgBpC,MAAM,cAAc,CAAC,cAAc,CAAC;;;CAmBrC,CAAA;AAEF,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.Prompt = void 0;
|
5
5
|
const tslib_1 = require("tslib");
|
6
|
-
const
|
6
|
+
const radix_ui_1 = require("radix-ui");
|
7
7
|
const React = tslib_1.__importStar(require("react"));
|
8
8
|
const button_1 = require("../button");
|
9
9
|
const heading_1 = require("../heading");
|
@@ -30,42 +30,42 @@ const Root = ({
|
|
30
30
|
*/
|
31
31
|
variant = "danger", ...props }) => {
|
32
32
|
return (React.createElement(PromptProvider, { variant: variant },
|
33
|
-
React.createElement(
|
33
|
+
React.createElement(radix_ui_1.AlertDialog.Root, { ...props })));
|
34
34
|
};
|
35
35
|
Root.displayName = "Prompt";
|
36
|
-
const Trigger =
|
36
|
+
const Trigger = radix_ui_1.AlertDialog.Trigger;
|
37
37
|
Trigger.displayName = "Prompt.Trigger";
|
38
38
|
const Portal = (props) => {
|
39
|
-
return React.createElement(
|
39
|
+
return React.createElement(radix_ui_1.AlertDialog.AlertDialogPortal, { ...props });
|
40
40
|
};
|
41
41
|
Portal.displayName = "Prompt.Portal";
|
42
42
|
const Overlay = React.forwardRef(({ className, ...props }, ref) => {
|
43
|
-
return (React.createElement(
|
43
|
+
return (React.createElement(radix_ui_1.AlertDialog.Overlay, { ref: ref, className: (0, clx_1.clx)("bg-ui-bg-overlay fixed inset-0", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props }));
|
44
44
|
});
|
45
45
|
Overlay.displayName = "Prompt.Overlay";
|
46
46
|
const Title = React.forwardRef(({ className, children, ...props }, ref) => {
|
47
|
-
return (React.createElement(
|
47
|
+
return (React.createElement(radix_ui_1.AlertDialog.Title, { ref: ref, className: (0, clx_1.clx)(className), ...props, asChild: true },
|
48
48
|
React.createElement(heading_1.Heading, { level: "h2", className: "text-ui-fg-base" }, children)));
|
49
49
|
});
|
50
50
|
Title.displayName = "Prompt.Title";
|
51
51
|
const Content = React.forwardRef(({ className, ...props }, ref) => {
|
52
52
|
return (React.createElement(Portal, null,
|
53
53
|
React.createElement(Overlay, null),
|
54
|
-
React.createElement(
|
54
|
+
React.createElement(radix_ui_1.AlertDialog.Content, { ref: ref, className: (0, clx_1.clx)("bg-ui-bg-base shadow-elevation-flyout fixed left-[50%] top-[50%] flex w-full max-w-[400px] translate-x-[-50%] translate-y-[-50%] flex-col rounded-lg border focus-visible:outline-none", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] duration-200", className), ...props })));
|
55
55
|
});
|
56
56
|
Content.displayName = "Prompt.Content";
|
57
57
|
const Description = React.forwardRef(({ className, ...props }, ref) => {
|
58
|
-
return (React.createElement(
|
58
|
+
return (React.createElement(radix_ui_1.AlertDialog.Description, { ref: ref, className: (0, clx_1.clx)("text-ui-fg-subtle txt-compact-medium", className), ...props }));
|
59
59
|
});
|
60
60
|
Description.displayName = "Prompt.Description";
|
61
61
|
const Action = React.forwardRef(({ className, children, type, ...props }, ref) => {
|
62
62
|
const { variant } = usePromptContext();
|
63
|
-
return (React.createElement(
|
63
|
+
return (React.createElement(radix_ui_1.AlertDialog.Action, { ref: ref, className: className, ...props, asChild: true },
|
64
64
|
React.createElement(button_1.Button, { size: "small", type: type, variant: variant === "danger" ? "danger" : "primary" }, children)));
|
65
65
|
});
|
66
66
|
Action.displayName = "Prompt.Action";
|
67
67
|
const Cancel = React.forwardRef(({ className, children, ...props }, ref) => {
|
68
|
-
return (React.createElement(
|
68
|
+
return (React.createElement(radix_ui_1.AlertDialog.Cancel, { ref: ref, className: (0, clx_1.clx)(className), ...props, asChild: true },
|
69
69
|
React.createElement(button_1.Button, { size: "small", variant: "secondary" }, children)));
|
70
70
|
});
|
71
71
|
Cancel.displayName = "Prompt.Cancel";
|