@medusajs/ui 4.0.5-preview-20250211104335 → 4.0.5-snapshot-20250127145424
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/blocks/data-table/components/data-table-table.js +4 -4
- package/dist/cjs/blocks/data-table/components/data-table-table.js.map +1 -1
- package/dist/cjs/blocks/data-table/index.d.ts +1 -1
- package/dist/cjs/blocks/data-table/index.d.ts.map +1 -1
- package/dist/cjs/blocks/data-table/index.js.map +1 -1
- package/dist/cjs/blocks/data-table/types.d.ts +1 -2
- package/dist/cjs/blocks/data-table/types.d.ts.map +1 -1
- package/dist/cjs/blocks/data-table/types.js.map +1 -1
- package/dist/cjs/blocks/data-table/use-data-table.d.ts +1 -2
- package/dist/cjs/blocks/data-table/use-data-table.d.ts.map +1 -1
- package/dist/cjs/blocks/data-table/use-data-table.js +1 -2
- package/dist/cjs/blocks/data-table/use-data-table.js.map +1 -1
- package/dist/cjs/components/alert/alert.d.ts.map +1 -1
- package/dist/cjs/components/alert/alert.js +0 -1
- package/dist/cjs/components/alert/alert.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/calender/calendar.d.ts.map +1 -1
- package/dist/cjs/components/calender/calendar.js +0 -1
- package/dist/cjs/components/calender/calendar.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 +7 -10
- 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/cjs/index.d.ts +0 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -3
- package/dist/cjs/index.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/blocks/data-table/components/data-table-table.js +4 -4
- package/dist/esm/blocks/data-table/components/data-table-table.js.map +1 -1
- package/dist/esm/blocks/data-table/index.d.ts +1 -1
- package/dist/esm/blocks/data-table/index.d.ts.map +1 -1
- package/dist/esm/blocks/data-table/index.js.map +1 -1
- package/dist/esm/blocks/data-table/types.d.ts +1 -2
- package/dist/esm/blocks/data-table/types.d.ts.map +1 -1
- package/dist/esm/blocks/data-table/types.js.map +1 -1
- package/dist/esm/blocks/data-table/use-data-table.d.ts +1 -2
- package/dist/esm/blocks/data-table/use-data-table.d.ts.map +1 -1
- package/dist/esm/blocks/data-table/use-data-table.js +1 -2
- package/dist/esm/blocks/data-table/use-data-table.js.map +1 -1
- package/dist/esm/components/alert/alert.d.ts.map +1 -1
- package/dist/esm/components/alert/alert.js +0 -1
- package/dist/esm/components/alert/alert.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/calender/calendar.d.ts.map +1 -1
- package/dist/esm/components/calender/calendar.js +0 -1
- package/dist/esm/components/calender/calendar.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 +2 -5
- 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/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +20 -6
- package/dist/cjs/components/divider/divider.d.ts +0 -8
- package/dist/cjs/components/divider/divider.d.ts.map +0 -1
- package/dist/cjs/components/divider/divider.js +0 -17
- package/dist/cjs/components/divider/divider.js.map +0 -1
- package/dist/cjs/components/divider/index.d.ts +0 -2
- package/dist/cjs/components/divider/index.d.ts.map +0 -1
- package/dist/cjs/components/divider/index.js +0 -5
- package/dist/cjs/components/divider/index.js.map +0 -1
- package/dist/cjs/utils/is-input-element.d.ts +0 -3
- package/dist/cjs/utils/is-input-element.d.ts.map +0 -1
- package/dist/cjs/utils/is-input-element.js +0 -12
- package/dist/cjs/utils/is-input-element.js.map +0 -1
- package/dist/esm/components/divider/divider.d.ts +0 -8
- package/dist/esm/components/divider/divider.d.ts.map +0 -1
- package/dist/esm/components/divider/divider.js +0 -12
- package/dist/esm/components/divider/divider.js.map +0 -1
- package/dist/esm/components/divider/index.d.ts +0 -2
- package/dist/esm/components/divider/index.d.ts.map +0 -1
- package/dist/esm/components/divider/index.js +0 -2
- package/dist/esm/components/divider/index.js.map +0 -1
- package/dist/esm/utils/is-input-element.d.ts +0 -3
- package/dist/esm/utils/is-input-element.d.ts.map +0 -1
- package/dist/esm/utils/is-input-element.js +0 -9
- package/dist/esm/utils/is-input-element.js.map +0 -1
@@ -1,17 +1,17 @@
|
|
1
|
-
import
|
1
|
+
import * as FocusModalPrimitives from "@radix-ui/react-dialog";
|
2
2
|
import * as React from "react";
|
3
3
|
/**
|
4
4
|
* @prop defaultOpen - Whether the modal is opened by default.
|
5
5
|
* @prop open - Whether the modal is opened.
|
6
6
|
* @prop onOpenChange - A function to handle when the modal is opened or closed.
|
7
7
|
*/
|
8
|
-
interface FocusModalRootProps extends React.ComponentPropsWithoutRef<typeof
|
8
|
+
interface FocusModalRootProps extends React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Root> {
|
9
9
|
}
|
10
|
-
interface FocusModalTriggerProps extends React.ComponentPropsWithoutRef<typeof
|
10
|
+
interface FocusModalTriggerProps extends React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Trigger> {
|
11
11
|
}
|
12
|
-
interface FocusModalPortalProps extends
|
12
|
+
interface FocusModalPortalProps extends FocusModalPrimitives.DialogPortalProps {
|
13
13
|
}
|
14
|
-
interface FocusModalTitleProps extends React.ComponentPropsWithoutRef<typeof
|
14
|
+
interface FocusModalTitleProps extends React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Title> {
|
15
15
|
}
|
16
16
|
declare const FocusModal: {
|
17
17
|
(props: FocusModalRootProps): React.JSX.Element;
|
@@ -19,14 +19,14 @@ declare const FocusModal: {
|
|
19
19
|
} & {
|
20
20
|
Trigger: React.ForwardRefExoticComponent<FocusModalTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
21
21
|
Title: React.ForwardRefExoticComponent<FocusModalTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
22
|
-
Description: React.ForwardRefExoticComponent<
|
23
|
-
Content: React.ForwardRefExoticComponent<Omit<
|
24
|
-
overlayProps?: Omit<Omit<
|
22
|
+
Description: React.ForwardRefExoticComponent<FocusModalPrimitives.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
23
|
+
Content: React.ForwardRefExoticComponent<Omit<FocusModalPrimitives.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
24
|
+
overlayProps?: Omit<Omit<FocusModalPrimitives.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> | undefined;
|
25
25
|
portalProps?: FocusModalPortalProps | undefined;
|
26
26
|
} & React.RefAttributes<HTMLDivElement>>;
|
27
27
|
Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
28
28
|
Body: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
29
|
-
Close: React.ForwardRefExoticComponent<
|
29
|
+
Close: React.ForwardRefExoticComponent<FocusModalPrimitives.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
30
30
|
Footer: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
31
31
|
};
|
32
32
|
export { FocusModal };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focus-modal.d.ts","sourceRoot":"","sources":["../../../../src/components/focus-modal/focus-modal.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
1
|
+
{"version":3,"file":"focus-modal.d.ts","sourceRoot":"","sources":["../../../../src/components/focus-modal/focus-modal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B;;;;GAIG;AACH,UAAU,mBACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC;CAAG;AAU7E,UAAU,sBAAuB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC;CAAG;AAqB/G,UAAU,qBAAsB,SAAQ,oBAAoB,CAAC,iBAAiB;CAAG;AAqHjF,UAAU,oBAAqB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC;CAAG;AAmC3G,QAAA,MAAM,UAAU;YAlLe,mBAAmB;;;;;;;;;;;;;;CA2LhD,CAAA;AAEF,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use client";
|
2
2
|
import { XMark } from "@medusajs/icons";
|
3
|
-
import
|
3
|
+
import * as FocusModalPrimitives from "@radix-ui/react-dialog";
|
4
4
|
import * as React from "react";
|
5
5
|
import { IconButton } from "../icon-button";
|
6
6
|
import { Kbd } from "../kbd";
|
@@ -9,7 +9,7 @@ import { clx } from "../../utils/clx";
|
|
9
9
|
* This component is based on the [Radix UI Dialog](https://www.radix-ui.com/primitives/docs/components/dialog) primitives.
|
10
10
|
*/
|
11
11
|
const FocusModalRoot = (props) => {
|
12
|
-
return React.createElement(
|
12
|
+
return React.createElement(FocusModalPrimitives.Root, { ...props });
|
13
13
|
};
|
14
14
|
FocusModalRoot.displayName = "FocusModal";
|
15
15
|
/**
|
@@ -17,21 +17,21 @@ FocusModalRoot.displayName = "FocusModal";
|
|
17
17
|
* It accepts props from the [Radix UI Dialog Trigger](https://www.radix-ui.com/primitives/docs/components/dialog#trigger) component.
|
18
18
|
*/
|
19
19
|
const FocusModalTrigger = React.forwardRef((props, ref) => {
|
20
|
-
return React.createElement(
|
20
|
+
return React.createElement(FocusModalPrimitives.Trigger, { ref: ref, ...props });
|
21
21
|
});
|
22
22
|
FocusModalTrigger.displayName = "FocusModal.Trigger";
|
23
23
|
/**
|
24
24
|
* This component is used to create the close button for the modal.
|
25
25
|
* It accepts props from the [Radix UI Dialog Close](https://www.radix-ui.com/primitives/docs/components/dialog#close) component.
|
26
26
|
*/
|
27
|
-
const FocusModalClose =
|
27
|
+
const FocusModalClose = FocusModalPrimitives.Close;
|
28
28
|
FocusModalClose.displayName = "FocusModal.Close";
|
29
29
|
/**
|
30
30
|
* The `FocusModal.Content` component uses this component to wrap the modal content.
|
31
31
|
* It accepts props from the [Radix UI Dialog Portal](https://www.radix-ui.com/primitives/docs/components/dialog#portal) component.
|
32
32
|
*/
|
33
33
|
const FocusModalPortal = (props) => {
|
34
|
-
return (React.createElement(
|
34
|
+
return (React.createElement(FocusModalPrimitives.DialogPortal, { ...props }));
|
35
35
|
};
|
36
36
|
FocusModalPortal.displayName = "FocusModal.Portal";
|
37
37
|
/**
|
@@ -39,7 +39,7 @@ FocusModalPortal.displayName = "FocusModal.Portal";
|
|
39
39
|
* It accepts props from the [Radix UI Dialog Overlay](https://www.radix-ui.com/primitives/docs/components/dialog#overlay) component.
|
40
40
|
*/
|
41
41
|
const FocusModalOverlay = React.forwardRef(({ className, ...props }, ref) => {
|
42
|
-
return (React.createElement(
|
42
|
+
return (React.createElement(FocusModalPrimitives.Overlay, { ref: ref, className: 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 }));
|
43
43
|
});
|
44
44
|
FocusModalOverlay.displayName = "FocusModal.Overlay";
|
45
45
|
/**
|
@@ -49,7 +49,7 @@ FocusModalOverlay.displayName = "FocusModal.Overlay";
|
|
49
49
|
const FocusModalContent = React.forwardRef(({ className, overlayProps, portalProps, ...props }, ref) => {
|
50
50
|
return (React.createElement(FocusModalPortal, { ...portalProps },
|
51
51
|
React.createElement(FocusModalOverlay, { ...overlayProps }),
|
52
|
-
React.createElement(
|
52
|
+
React.createElement(FocusModalPrimitives.Content, { ref: ref, className: clx("bg-ui-bg-base shadow-elevation-modal fixed inset-2 flex flex-col overflow-hidden rounded-lg border 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=open]:slide-in-from-bottom-0 data-[state=closed]:slide-in-from-bottom-2 duration-200", className), ...props })));
|
53
53
|
});
|
54
54
|
FocusModalContent.displayName = "FocusModal.Content";
|
55
55
|
/**
|
@@ -59,7 +59,7 @@ FocusModalContent.displayName = "FocusModal.Content";
|
|
59
59
|
const FocusModalHeader = React.forwardRef(({ children, className, ...props }, ref) => {
|
60
60
|
return (React.createElement("div", { ref: ref, className: clx("border-ui-border-base flex items-center justify-between gap-x-4 border-b px-4 py-2", className), ...props },
|
61
61
|
React.createElement("div", { className: "flex items-center gap-x-2" },
|
62
|
-
React.createElement(
|
62
|
+
React.createElement(FocusModalPrimitives.Close, { asChild: true },
|
63
63
|
React.createElement(IconButton, { size: "small", type: "button", variant: "transparent" },
|
64
64
|
React.createElement(XMark, null))),
|
65
65
|
React.createElement(Kbd, null, "esc")),
|
@@ -79,14 +79,14 @@ FocusModalFooter.displayName = "FocusModal.Footer";
|
|
79
79
|
* It accepts props from the [Radix UI Dialog Title](https://www.radix-ui.com/primitives/docs/components/dialog#title) component.
|
80
80
|
*/
|
81
81
|
const FocusModalTitle = React.forwardRef(({ className, ...props }, ref) => {
|
82
|
-
return (React.createElement(
|
82
|
+
return (React.createElement(FocusModalPrimitives.Title, { ref: ref, ...props }));
|
83
83
|
});
|
84
84
|
FocusModalTitle.displayName = "FocusModal.Title";
|
85
85
|
/**
|
86
86
|
* This component adds accessible description to the modal.
|
87
87
|
* It accepts props from the [Radix UI Dialog Description](https://www.radix-ui.com/primitives/docs/components/dialog#description) component.
|
88
88
|
*/
|
89
|
-
const FocusModalDescription =
|
89
|
+
const FocusModalDescription = FocusModalPrimitives.Description;
|
90
90
|
FocusModalDescription.displayName = "FocusModal.Description";
|
91
91
|
/**
|
92
92
|
* This component is used to wrap the body content of the modal.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"focus-modal.js","sourceRoot":"","sources":["../../../../src/components/focus-modal/focus-modal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAUjC;;GAEG;AACH,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;IACpD,OAAO,oBAAC,WAAW,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AACxC,CAAC,CAAA;AACD,cAAc,CAAC,WAAW,GAAG,YAAY,CAAA;AAIzC;;;GAGG;AACH,MAAM,iBA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AAC,KAAK,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAC3C,CAAA;AACH,CAAC,CAAC,CAAA;AACF,eAAe,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEhD;;;GAGG;AACH,MAAM,qBAAqB,GAAG,WAAW,CAAC,WAAW,CAAA;AACrD,qBAAqB,CAAC,WAAW,GAAG,wBAAwB,CAAA;AAE5D;;;GAGG;AACH,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACjC,OAAO,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAA;AAC1E,CAAC,CAAC,CAAA;AACF,cAAc,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE9C,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE;IAC/C,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,qBAAqB;IAClC,OAAO,EAAE,iBAAiB;IAC1B,MAAM,EAAE,gBAAgB;IACxB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAA;AAEF,OAAO,EAAE,UAAU,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport { XMark } from \"@medusajs/icons\"\nimport { Dialog as RadixDialog } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { IconButton } from \"@/components/icon-button\"\nimport { Kbd } from \"@/components/kbd\"\nimport { clx } from \"@/utils/clx\"\n\n/**\n * @prop defaultOpen - Whether the modal is opened by default.\n * @prop open - Whether the modal is opened.\n * @prop onOpenChange - A function to handle when the modal is opened or closed.\n */\ninterface FocusModalRootProps\n extends React.ComponentPropsWithoutRef<typeof RadixDialog.Root> {}\n\n/**\n * This component is based on the [Radix UI Dialog](https://www.radix-ui.com/primitives/docs/components/dialog) primitives.\n */\nconst FocusModalRoot = (props: FocusModalRootProps) => {\n return <RadixDialog.Root {...props} />\n}\nFocusModalRoot.displayName = \"FocusModal\"\n\ninterface FocusModalTriggerProps extends React.ComponentPropsWithoutRef<typeof RadixDialog.Trigger> {}\n\n/**\n * This component is used to create the trigger button that opens the modal.\n * It accepts props from the [Radix UI Dialog Trigger](https://www.radix-ui.com/primitives/docs/components/dialog#trigger) component.\n */\nconst FocusModalTrigger = React.forwardRef<\n React.ElementRef<typeof RadixDialog.Trigger>,\n FocusModalTriggerProps\n>((props: FocusModalTriggerProps, ref) => {\n return <RadixDialog.Trigger ref={ref} {...props} />\n})\nFocusModalTrigger.displayName = \"FocusModal.Trigger\"\n\n/**\n * This component is used to create the close button for the modal.\n * It accepts props from the [Radix UI Dialog Close](https://www.radix-ui.com/primitives/docs/components/dialog#close) component.\n */\nconst FocusModalClose = RadixDialog.Close\nFocusModalClose.displayName = \"FocusModal.Close\"\n\ninterface FocusModalPortalProps extends RadixDialog.DialogPortalProps {}\n\n/**\n * The `FocusModal.Content` component uses this component to wrap the modal content.\n * It accepts props from the [Radix UI Dialog Portal](https://www.radix-ui.com/primitives/docs/components/dialog#portal) component.\n */\nconst FocusModalPortal = (props: FocusModalPortalProps) => {\n return (\n <RadixDialog.DialogPortal {...props} />\n )\n}\nFocusModalPortal.displayName = \"FocusModal.Portal\"\n\n/**\n * This component is used to create the overlay for the modal.\n * It accepts props from the [Radix UI Dialog Overlay](https://www.radix-ui.com/primitives/docs/components/dialog#overlay) component.\n */\nconst FocusModalOverlay = React.forwardRef<\n React.ElementRef<typeof RadixDialog.Overlay>,\n React.ComponentPropsWithoutRef<typeof RadixDialog.Overlay>\n>(({ className, ...props }, ref) => {\n return (\n <RadixDialog.Overlay\n ref={ref}\n className={clx(\n \"bg-ui-bg-overlay fixed inset-0\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n )\n})\nFocusModalOverlay.displayName = \"FocusModal.Overlay\"\n\n/**\n * This component wraps the content of the modal.\n * It accepts props from the [Radix UI Dialog Content](https://www.radix-ui.com/primitives/docs/components/dialog#content) component.\n */\nconst FocusModalContent = React.forwardRef<\n React.ElementRef<typeof RadixDialog.Content>,\n React.ComponentPropsWithoutRef<typeof RadixDialog.Content> & {\n overlayProps?: React.ComponentPropsWithoutRef<typeof FocusModalOverlay>\n portalProps?: React.ComponentPropsWithoutRef<typeof FocusModalPortal>\n }\n>(({ className, overlayProps, portalProps, ...props }, ref) => {\n return (\n <FocusModalPortal {...portalProps}>\n <FocusModalOverlay {...overlayProps} />\n <RadixDialog.Content\n ref={ref}\n className={clx(\n \"bg-ui-bg-base shadow-elevation-modal fixed inset-2 flex flex-col overflow-hidden rounded-lg border outline-none\",\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=open]:slide-in-from-bottom-0 data-[state=closed]:slide-in-from-bottom-2 duration-200\",\n className\n )}\n {...props}\n />\n </FocusModalPortal>\n )\n})\nFocusModalContent.displayName = \"FocusModal.Content\"\n\n/**\n * This component is used to wrap the header content of the modal.\n * This component is based on the `div` element and supports all of its props\n */\nconst FocusModalHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={clx(\n \"border-ui-border-base flex items-center justify-between gap-x-4 border-b px-4 py-2\",\n className\n )}\n {...props}\n >\n <div className=\"flex items-center gap-x-2\">\n <RadixDialog.Close asChild>\n <IconButton size=\"small\" type=\"button\" variant=\"transparent\">\n <XMark />\n </IconButton>\n </RadixDialog.Close>\n <Kbd>esc</Kbd>\n </div>\n {children}\n </div>\n )\n})\nFocusModalHeader.displayName = \"FocusModal.Header\"\n\n/**\n * This component is used to wrap the footer content of the modal.\n * This component is based on the `div` element and supports all of its props\n */\nconst FocusModalFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={clx(\n \"border-ui-border-base flex items-center justify-end gap-x-2 border-t p-4\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n})\nFocusModalFooter.displayName = \"FocusModal.Footer\"\n\ninterface FocusModalTitleProps extends React.ComponentPropsWithoutRef<typeof RadixDialog.Title> {}\n\n/**\n * This component adds an accessible title to the modal.\n * It accepts props from the [Radix UI Dialog Title](https://www.radix-ui.com/primitives/docs/components/dialog#title) component.\n */\nconst FocusModalTitle = React.forwardRef<\n HTMLHeadingElement,\n FocusModalTitleProps\n>(({ className, ...props }: FocusModalTitleProps, ref) => {\n return (\n <RadixDialog.Title ref={ref} {...props} />\n )\n})\nFocusModalTitle.displayName = \"FocusModal.Title\"\n\n/**\n * This component adds accessible description to the modal.\n * It accepts props from the [Radix UI Dialog Description](https://www.radix-ui.com/primitives/docs/components/dialog#description) component.\n */\nconst FocusModalDescription = RadixDialog.Description\nFocusModalDescription.displayName = \"FocusModal.Description\"\n\n/**\n * This component is used to wrap the body content of the modal.\n * This component is based on the `div` element and supports all of its props\n */\nconst FocusModalBody = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => {\n return <div ref={ref} className={clx(\"flex-1\", className)} {...props} />\n})\nFocusModalBody.displayName = \"FocusModal.Body\"\n\nconst FocusModal = Object.assign(FocusModalRoot, {\n Trigger: FocusModalTrigger,\n Title: FocusModalTitle,\n Description: FocusModalDescription,\n Content: FocusModalContent,\n Header: FocusModalHeader,\n Body: FocusModalBody,\n Close: FocusModalClose,\n Footer: FocusModalFooter,\n})\n\nexport { FocusModal }\n"]}
|
1
|
+
{"version":3,"file":"focus-modal.js","sourceRoot":"","sources":["../../../../src/components/focus-modal/focus-modal.tsx"],"names":[],"mappings":"AAAA,YAAY,C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AqB;IAClC,OAAO,EAAE,iBAAiB;IAC1B,MAAM,EAAE,gBAAgB;IACxB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAA;AAEF,OAAO,EAAE,UAAU,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport { XMark } from \"@medusajs/icons\"\nimport * as FocusModalPrimitives from \"@radix-ui/react-dialog\"\nimport * as React from \"react\"\n\nimport { IconButton } from \"@/components/icon-button\"\nimport { Kbd } from \"@/components/kbd\"\nimport { clx } from \"@/utils/clx\"\n\n/**\n * @prop defaultOpen - Whether the modal is opened by default.\n * @prop open - Whether the modal is opened.\n * @prop onOpenChange - A function to handle when the modal is opened or closed.\n */\ninterface FocusModalRootProps\n extends React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Root> {}\n\n/**\n * This component is based on the [Radix UI Dialog](https://www.radix-ui.com/primitives/docs/components/dialog) primitives.\n */\nconst FocusModalRoot = (props: FocusModalRootProps) => {\n return <FocusModalPrimitives.Root {...props} />\n}\nFocusModalRoot.displayName = \"FocusModal\"\n\ninterface FocusModalTriggerProps extends React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Trigger> {}\n\n/**\n * This component is used to create the trigger button that opens the modal.\n * It accepts props from the [Radix UI Dialog Trigger](https://www.radix-ui.com/primitives/docs/components/dialog#trigger) component.\n */\nconst FocusModalTrigger = React.forwardRef<\n React.ElementRef<typeof FocusModalPrimitives.Trigger>,\n FocusModalTriggerProps\n>((props: FocusModalTriggerProps, ref) => {\n return <FocusModalPrimitives.Trigger ref={ref} {...props} />\n})\nFocusModalTrigger.displayName = \"FocusModal.Trigger\"\n\n/**\n * This component is used to create the close button for the modal.\n * It accepts props from the [Radix UI Dialog Close](https://www.radix-ui.com/primitives/docs/components/dialog#close) component.\n */\nconst FocusModalClose = FocusModalPrimitives.Close\nFocusModalClose.displayName = \"FocusModal.Close\"\n\ninterface FocusModalPortalProps extends FocusModalPrimitives.DialogPortalProps {}\n\n/**\n * The `FocusModal.Content` component uses this component to wrap the modal content.\n * It accepts props from the [Radix UI Dialog Portal](https://www.radix-ui.com/primitives/docs/components/dialog#portal) component.\n */\nconst FocusModalPortal = (props: FocusModalPortalProps) => {\n return (\n <FocusModalPrimitives.DialogPortal {...props} />\n )\n}\nFocusModalPortal.displayName = \"FocusModal.Portal\"\n\n/**\n * This component is used to create the overlay for the modal.\n * It accepts props from the [Radix UI Dialog Overlay](https://www.radix-ui.com/primitives/docs/components/dialog#overlay) component.\n */\nconst FocusModalOverlay = React.forwardRef<\n React.ElementRef<typeof FocusModalPrimitives.Overlay>,\n React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Overlay>\n>(({ className, ...props }, ref) => {\n return (\n <FocusModalPrimitives.Overlay\n ref={ref}\n className={clx(\n \"bg-ui-bg-overlay fixed inset-0\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n )\n})\nFocusModalOverlay.displayName = \"FocusModal.Overlay\"\n\n/**\n * This component wraps the content of the modal.\n * It accepts props from the [Radix UI Dialog Content](https://www.radix-ui.com/primitives/docs/components/dialog#content) component.\n */\nconst FocusModalContent = React.forwardRef<\n React.ElementRef<typeof FocusModalPrimitives.Content>,\n React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Content> & {\n overlayProps?: React.ComponentPropsWithoutRef<typeof FocusModalOverlay>\n portalProps?: React.ComponentPropsWithoutRef<typeof FocusModalPortal>\n }\n>(({ className, overlayProps, portalProps, ...props }, ref) => {\n return (\n <FocusModalPortal {...portalProps}>\n <FocusModalOverlay {...overlayProps} />\n <FocusModalPrimitives.Content\n ref={ref}\n className={clx(\n \"bg-ui-bg-base shadow-elevation-modal fixed inset-2 flex flex-col overflow-hidden rounded-lg border outline-none\",\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=open]:slide-in-from-bottom-0 data-[state=closed]:slide-in-from-bottom-2 duration-200\",\n className\n )}\n {...props}\n />\n </FocusModalPortal>\n )\n})\nFocusModalContent.displayName = \"FocusModal.Content\"\n\n/**\n * This component is used to wrap the header content of the modal.\n * This component is based on the `div` element and supports all of its props\n */\nconst FocusModalHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={clx(\n \"border-ui-border-base flex items-center justify-between gap-x-4 border-b px-4 py-2\",\n className\n )}\n {...props}\n >\n <div className=\"flex items-center gap-x-2\">\n <FocusModalPrimitives.Close asChild>\n <IconButton size=\"small\" type=\"button\" variant=\"transparent\">\n <XMark />\n </IconButton>\n </FocusModalPrimitives.Close>\n <Kbd>esc</Kbd>\n </div>\n {children}\n </div>\n )\n})\nFocusModalHeader.displayName = \"FocusModal.Header\"\n\n/**\n * This component is used to wrap the footer content of the modal.\n * This component is based on the `div` element and supports all of its props\n */\nconst FocusModalFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ children, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={clx(\n \"border-ui-border-base flex items-center justify-end gap-x-2 border-t p-4\",\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n})\nFocusModalFooter.displayName = \"FocusModal.Footer\"\n\ninterface FocusModalTitleProps extends React.ComponentPropsWithoutRef<typeof FocusModalPrimitives.Title> {}\n\n/**\n * This component adds an accessible title to the modal.\n * It accepts props from the [Radix UI Dialog Title](https://www.radix-ui.com/primitives/docs/components/dialog#title) component.\n */\nconst FocusModalTitle = React.forwardRef<\n HTMLHeadingElement,\n FocusModalTitleProps\n>(({ className, ...props }: FocusModalTitleProps, ref) => {\n return (\n <FocusModalPrimitives.Title ref={ref} {...props} />\n )\n})\nFocusModalTitle.displayName = \"FocusModal.Title\"\n\n/**\n * This component adds accessible description to the modal.\n * It accepts props from the [Radix UI Dialog Description](https://www.radix-ui.com/primitives/docs/components/dialog#description) component.\n */\nconst FocusModalDescription = FocusModalPrimitives.Description\nFocusModalDescription.displayName = \"FocusModal.Description\"\n\n/**\n * This component is used to wrap the body content of the modal.\n * This component is based on the `div` element and supports all of its props\n */\nconst FocusModalBody = React.forwardRef<\n HTMLDivElement,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => {\n return <div ref={ref} className={clx(\"flex-1\", className)} {...props} />\n})\nFocusModalBody.displayName = \"FocusModal.Body\"\n\nconst FocusModal = Object.assign(FocusModalRoot, {\n Trigger: FocusModalTrigger,\n Title: FocusModalTitle,\n Description: FocusModalDescription,\n Content: FocusModalContent,\n Header: FocusModalHeader,\n Body: FocusModalBody,\n Close: FocusModalClose,\n Footer: FocusModalFooter,\n})\n\nexport { FocusModal }\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hint.js","sourceRoot":"","sources":["../../../../src/components/hint/hint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAgB,GAAG,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"hint.js","sourceRoot":"","sources":["../../../../src/components/hint/hint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAgB,GAAG,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAErC,MAAM,YAAY,GAAG,GAAG,CAAC;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,GAAG,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK;QAER,OAAO,KAAK,OAAO,IAAI,6BAAK,SAAS,EAAC,yCAAyC;YAAC,oBAAC,sBAAsB,OAAG,CAAM;QAChH,QAAQ,CACJ,CACR,CAAA;AACH,CAAC,CACF,CAAA;AACD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,OAAO,EAAE,IAAI,EAAE,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":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAC5C,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"}
|
@@ -1,5 +1,5 @@
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
1
2
|
import { cva } from "cva";
|
2
|
-
import { Slot } from "radix-ui";
|
3
3
|
import * as React from "react";
|
4
4
|
import { badgeColorVariants } from "../badge";
|
5
5
|
import { clx } from "../../utils/clx";
|
@@ -29,7 +29,7 @@ size = "base",
|
|
29
29
|
* passed child element instead.
|
30
30
|
*/
|
31
31
|
asChild = false, ...props }, ref) => {
|
32
|
-
const Component = asChild ? Slot
|
32
|
+
const Component = asChild ? Slot : "span";
|
33
33
|
return (React.createElement(Component, { ref: ref, className: clx(badgeColorVariants({ color }), iconBadgeVariants({ size }), className), ...props }, children));
|
34
34
|
});
|
35
35
|
IconBadge.displayName = "IconBadge";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-badge.js","sourceRoot":"","sources":["../../../../src/components/icon-badge/icon-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"icon-badge.js","sourceRoot":"","sources":["../../../../src/components/icon-badge/icon-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC,MAAM,iBAAiB,GAAG,GAAG,CAAC;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,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAEzC,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,GAAG,CACZ,kBAAkB,CAAC,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;AACD,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,CAAA","sourcesContent":["import { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"cva\"\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 : \"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":"AAEA,OAAO,EAAE,YAAY,EAAO,MAAM,KAAK,CAAA;AACvC,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"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Spinner } from "@medusajs/icons";
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
2
3
|
import { cva } from "cva";
|
3
|
-
import { Slot } from "radix-ui";
|
4
4
|
import * as React from "react";
|
5
5
|
import { clx } from "../../utils/clx";
|
6
6
|
const iconButtonVariants = cva({
|
@@ -45,7 +45,7 @@ asChild = false, className, children,
|
|
45
45
|
* Whether to show a loading spinner.
|
46
46
|
*/
|
47
47
|
isLoading = false, disabled, ...props }, ref) => {
|
48
|
-
const Component = asChild ? Slot
|
48
|
+
const Component = asChild ? Slot : "button";
|
49
49
|
/**
|
50
50
|
* In the case of a button where asChild is true, and isLoading is true, we ensure that
|
51
51
|
* 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,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,
|
1
|
+
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAgB,GAAG,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,KAAK,M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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,GAAG,CAAC,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;AACD,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAA","sourcesContent":["import { Spinner } from \"@medusajs/icons\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { VariantProps, cva } from \"cva\"\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 : \"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":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAC5C,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"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use client";
|
2
|
+
import * as Primitives from "@radix-ui/react-label";
|
2
3
|
import { cva } from "cva";
|
3
|
-
import { Label as RadixLabel } from "radix-ui";
|
4
4
|
import * as React from "react";
|
5
5
|
import { clx } from "../../utils/clx";
|
6
6
|
const labelVariants = cva({
|
@@ -34,7 +34,7 @@ size = "base",
|
|
34
34
|
* The label's font weight.
|
35
35
|
*/
|
36
36
|
weight = "regular", ...props }, ref) => {
|
37
|
-
return (React.createElement(
|
37
|
+
return (React.createElement(Primitives.Root, { ref: ref, className: clx(labelVariants({ size, weight }), className), ...props }));
|
38
38
|
});
|
39
39
|
Label.displayName = "Label";
|
40
40
|
export { Label };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC,MAAM,aAAa,GAAG,GAAG,CAAC;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,UAAU,CAAC,IAAI,IACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,KACtD,KAAK,GACT,CACH,CAAA;AACH,CAAC,CACF,CAAA;AACD,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport * as Primitives from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"cva\"\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 <Primitives.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 * as Primitives from "@radix-ui/react-popover";
|
2
2
|
import * as React from "react";
|
3
|
-
interface ContentProps extends React.ComponentPropsWithoutRef<typeof
|
3
|
+
interface ContentProps extends React.ComponentPropsWithoutRef<typeof Primitives.Content> {
|
4
4
|
}
|
5
5
|
declare const Popover: {
|
6
|
-
(props: React.ComponentPropsWithoutRef<typeof
|
6
|
+
(props: React.ComponentPropsWithoutRef<typeof Primitives.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<Primitives.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
10
|
+
Anchor: React.ForwardRefExoticComponent<Omit<Primitives.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
11
|
+
Close: React.ForwardRefExoticComponent<Omit<Primitives.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,KAAK,UAAU,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsC9B,UAAU,YACR,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC;CAAG;AAiEtE,QAAA,MAAM,OAAO;YAhGJ,MAAM,wBAAwB,CAAC,OAAO,WAAW,IAAI,CAAC;;;;;;;;CAsG7D,CAAA;AAEF,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import
|
1
|
+
import * as Primitives from "@radix-ui/react-popover";
|
2
2
|
import * as React from "react";
|
3
3
|
import { clx } from "../../utils/clx";
|
4
4
|
/**
|
5
5
|
* This component is based on the [Radix UI Popover](https://www.radix-ui.com/primitives/docs/components/popover) primitves.
|
6
6
|
*/
|
7
7
|
const Root = (props) => {
|
8
|
-
return React.createElement(
|
8
|
+
return React.createElement(Primitives.Root, { ...props });
|
9
9
|
};
|
10
10
|
Root.displayName = "Popover";
|
11
11
|
const Trigger = React.forwardRef((props, ref) => {
|
12
|
-
return React.createElement(
|
12
|
+
return React.createElement(Primitives.Trigger, { ref: ref, ...props });
|
13
13
|
});
|
14
14
|
Trigger.displayName = "Popover.Trigger";
|
15
15
|
const Anchor = React.forwardRef((props, ref) => {
|
16
|
-
return React.createElement(
|
16
|
+
return React.createElement(Primitives.Anchor, { ref: ref, ...props });
|
17
17
|
});
|
18
18
|
Anchor.displayName = "Popover.Anchor";
|
19
19
|
const Close = React.forwardRef((props, ref) => {
|
20
|
-
return React.createElement(
|
20
|
+
return React.createElement(Primitives.Close, { ref: ref, ...props });
|
21
21
|
});
|
22
22
|
Close.displayName = "Popover.Close";
|
23
23
|
/**
|
@@ -37,8 +37,8 @@ side = "bottom",
|
|
37
37
|
* The preferred alignment against the anchor. May change when collisions occur.
|
38
38
|
*/
|
39
39
|
align = "start", collisionPadding, ...props }, ref) => {
|
40
|
-
return (React.createElement(
|
41
|
-
React.createElement(
|
40
|
+
return (React.createElement(Primitives.Portal, null,
|
41
|
+
React.createElement(Primitives.Content, { ref: ref, sideOffset: sideOffset, side: side, align: align, collisionPadding: collisionPadding, className: 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 })));
|
42
42
|
});
|
43
43
|
Content.displayName = "Popover.Content";
|
44
44
|
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,OAAO,
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAEjC;;GAEG;AACH,MAAM,IAAI,GAAG,CACX,KAA6D,EAC7D,EAAE;IACF,OAAO,oBAAC,UAAU,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AACvC,CAAC,CAAA;AACD,IAAI,CAAC,WAAW,GAAG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V,KACG,KAAK,GACT,CACgB,CACrB,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,GAAG,CAAC,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;AAEF,OAAO,EAAE,OAAO,EAAE,CAAA","sourcesContent":["import * as Primitives from \"@radix-ui/react-popover\"\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 Primitives.Root>\n) => {\n return <Primitives.Root {...props} />\n}\nRoot.displayName = \"Popover\"\n\nconst Trigger = React.forwardRef<\n React.ElementRef<typeof Primitives.Trigger>,\n React.ComponentPropsWithoutRef<typeof Primitives.Trigger>\n>((props, ref) => {\n return <Primitives.Trigger ref={ref} {...props} />\n})\nTrigger.displayName = \"Popover.Trigger\"\n\nconst Anchor = React.forwardRef<\n React.ElementRef<typeof Primitives.Anchor>,\n React.ComponentPropsWithoutRef<typeof Primitives.Anchor>\n>((props, ref) => {\n return <Primitives.Anchor ref={ref} {...props} />\n})\nAnchor.displayName = \"Popover.Anchor\"\n\nconst Close = React.forwardRef<\n React.ElementRef<typeof Primitives.Close>,\n React.ComponentPropsWithoutRef<typeof Primitives.Close>\n>((props, ref) => {\n return <Primitives.Close ref={ref} {...props} />\n})\nClose.displayName = \"Popover.Close\"\n\ninterface ContentProps\n extends React.ComponentPropsWithoutRef<typeof Primitives.Content> {}\n\n/**\n * @excludeExternal\n */\nconst Content = React.forwardRef<\n React.ElementRef<typeof Primitives.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 <Primitives.Portal>\n <Primitives.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 </Primitives.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 * as Primitves from "@radix-ui/react-accordion";
|
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 Primitves.Header> {
|
5
5
|
status?: ProgressStatus;
|
6
6
|
}
|
7
7
|
declare const ProgressAccordion: {
|
8
|
-
(props: React.ComponentPropsWithoutRef<typeof
|
8
|
+
(props: React.ComponentPropsWithoutRef<typeof Primitves.Root>): React.JSX.Element;
|
9
9
|
displayName: string;
|
10
10
|
} & {
|
11
|
-
Item: React.ForwardRefExoticComponent<Omit<
|
11
|
+
Item: React.ForwardRefExoticComponent<Omit<Primitves.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<Primitves.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,KAAK,SAAS,MAAM,2BAA2B,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,SAAS,CAAC,MAAM,CAAC;IAC/D,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AA6FD,QAAA,MAAM,iBAAiB;YAtHF,MAAM,wBAAwB,CAAC,OAAO,UAAU,IAAI,CAAC;;;;;;CA0HxE,CAAA;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use client";
|
2
2
|
import { CheckCircleSolid, CircleDottedLine, CircleHalfSolid, Plus, } from "@medusajs/icons";
|
3
|
-
import
|
3
|
+
import * as Primitves from "@radix-ui/react-accordion";
|
4
4
|
import * as React from "react";
|
5
5
|
import { clx } from "../../utils/clx";
|
6
6
|
import { IconButton } from "../icon-button";
|
@@ -8,11 +8,11 @@ import { IconButton } from "../icon-button";
|
|
8
8
|
* This component is based on the [Radix UI Accordion](https://radix-ui.com/primitives/docs/components/accordion) primitves.
|
9
9
|
*/
|
10
10
|
const Root = (props) => {
|
11
|
-
return React.createElement(
|
11
|
+
return React.createElement(Primitves.Root, { ...props });
|
12
12
|
};
|
13
13
|
Root.displayName = "ProgressAccordion";
|
14
14
|
const Item = React.forwardRef(({ className, ...props }, ref) => {
|
15
|
-
return (React.createElement(
|
15
|
+
return (React.createElement(Primitves.Item, { ref: ref, className: clx("border-ui-border-base border-b last-of-type:border-b-0", className), ...props }));
|
16
16
|
});
|
17
17
|
Item.displayName = "ProgressAccordion.Item";
|
18
18
|
const ProgressIndicator = ({
|
@@ -41,16 +41,16 @@ const Header = React.forwardRef(({ className,
|
|
41
41
|
* The current status.
|
42
42
|
*/
|
43
43
|
status = "not-started", children, ...props }, ref) => {
|
44
|
-
return (React.createElement(
|
44
|
+
return (React.createElement(Primitves.Header, { ref: ref, className: clx("h3-core text-ui-fg-base group flex w-full flex-1 items-center gap-4 px-6", className), ...props },
|
45
45
|
React.createElement(ProgressIndicator, { status: status }),
|
46
46
|
children,
|
47
|
-
React.createElement(
|
47
|
+
React.createElement(Primitves.Trigger, { asChild: true, className: "ml-auto" },
|
48
48
|
React.createElement(IconButton, { variant: "transparent" },
|
49
49
|
React.createElement(Plus, { className: "transform transition-transform group-data-[state=open]:rotate-45" })))));
|
50
50
|
});
|
51
51
|
Header.displayName = "ProgressAccordion.Header";
|
52
52
|
const Content = React.forwardRef(({ className, ...props }, ref) => {
|
53
|
-
return (React.createElement(
|
53
|
+
return (React.createElement(Primitves.Content, { ref: ref, className: clx("overflow-hidden", "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down pl-[88px] pr-6", className), ...props }));
|
54
54
|
});
|
55
55
|
Content.displayName = "ProgressAccordion.Content";
|
56
56
|
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,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,IAAI,GACL,MAAM,iBAAiB,CAAA;AACxB,OAAO,
|
1
|
+
{"version":3,"file":"progress-accordion.js","sourceRoot":"","sources":["../../../../src/components/progress-accordion/progress-accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,IAAI,GACL,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C;;GAEG;AACH,MAAM,IAAI,GAAG,CAAC,KAA4D,EAAE,EAAE;IAC5E,OAAO,oBAAC,SAAS,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AACtC,CAAC,CAAA;AACD,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAA;AAEtC,MAAM,IAAI,GAAG,KAAK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S,CAAC,OAAO,IAAC,OAAO,QAAC,SAAS,EAAC,SAAS;YAC5C,oBAAC,UAAU,IAAC,OAAO,EAAC,aAAa;gBAC/B,oBAAC,IAAI,IAAC,SAAS,EAAC,kEAAkE,GAAG,CAC1E,CACK,CACH,CACpB,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,SAAS,CAAC,OAAO,IAChB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,GAAG,CACZ,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;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAA","sourcesContent":["\"use client\"\n\nimport {\n CheckCircleSolid,\n CircleDottedLine,\n CircleHalfSolid,\n Plus,\n} from \"@medusajs/icons\"\nimport * as Primitves from \"@radix-ui/react-accordion\"\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 Primitves.Root>) => {\n return <Primitves.Root {...props} />\n}\nRoot.displayName = \"ProgressAccordion\"\n\nconst Item = React.forwardRef<\n React.ElementRef<typeof Primitves.Item>,\n React.ComponentPropsWithoutRef<typeof Primitves.Item>\n>(({ className, ...props }, ref) => {\n return (\n <Primitves.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 Primitves.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 Primitves.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 <Primitves.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 <Primitves.Trigger asChild className=\"ml-auto\">\n <IconButton variant=\"transparent\">\n <Plus className=\"transform transition-transform group-data-[state=open]:rotate-45\" />\n </IconButton>\n </Primitves.Trigger>\n </Primitves.Header>\n )\n }\n)\nHeader.displayName = \"ProgressAccordion.Header\"\n\nconst Content = React.forwardRef<\n React.ElementRef<typeof Primitves.Content>,\n React.ComponentPropsWithoutRef<typeof Primitves.Content>\n>(({ className, ...props }, ref) => {\n return (\n <Primitves.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 * as ProgressTabsPrimitives from "@radix-ui/react-tabs";
|
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 ProgressTabsPrimitives.Trigger>, "asChild"> {
|
5
5
|
status?: ProgressStatus;
|
6
6
|
}
|
7
7
|
declare const ProgressTabs: {
|
8
|
-
(props:
|
8
|
+
(props: ProgressTabsPrimitives.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<ProgressTabsPrimitives.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
13
|
+
Content: React.ForwardRefExoticComponent<Omit<ProgressTabsPrimitives.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,KAAK,sBAAsB,MAAM,sBAAsB,CAAA;AAC9D,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,sBAAsB,CAAC,OAAO,CAAC,EACrE,SAAS,CACV;IACD,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AA6DD,QAAA,MAAM,YAAY;YA5Ge,uBAAuB,SAAS;;;;;;CAgH/D,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA"}
|