@causw/core 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Avatar/Avatar.d.cts +2 -2
- package/dist/components/Avatar/Avatar.d.mts +2 -2
- package/dist/components/Avatar/Avatar.styles.d.cts +3 -3
- package/dist/components/Avatar/Avatar.styles.d.mts +3 -3
- package/dist/components/BottomNavigation/BottomNavigation.cjs +78 -0
- package/dist/components/BottomNavigation/BottomNavigation.d.cts +48 -0
- package/dist/components/BottomNavigation/BottomNavigation.d.cts.map +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.d.mts +49 -0
- package/dist/components/BottomNavigation/BottomNavigation.d.mts.map +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.mjs +78 -0
- package/dist/components/BottomNavigation/BottomNavigation.mjs.map +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.cjs +26 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts +57 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.d.cts.map +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts +57 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.d.mts.map +1 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.mjs +26 -0
- package/dist/components/BottomNavigation/BottomNavigation.styles.mjs.map +1 -0
- package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.cjs +22 -0
- package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.mjs +19 -0
- package/dist/components/BottomNavigation/hooks/useBottomNavigationContext.mjs.map +1 -0
- package/dist/components/BottomNavigation/index.d.mts +1 -0
- package/dist/components/BottomSheet/BottomSheet.cjs +94 -0
- package/dist/components/BottomSheet/BottomSheet.d.cts +69 -0
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.d.mts +69 -0
- package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.mjs +93 -0
- package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.styles.cjs +21 -0
- package/dist/components/BottomSheet/BottomSheet.styles.d.cts +54 -0
- package/dist/components/BottomSheet/BottomSheet.styles.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.styles.d.mts +54 -0
- package/dist/components/BottomSheet/BottomSheet.styles.d.mts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.styles.mjs +21 -0
- package/dist/components/BottomSheet/BottomSheet.styles.mjs.map +1 -0
- package/dist/components/BottomSheet/index.d.mts +1 -0
- package/dist/components/Box/Box.styles.d.mts +3 -3
- package/dist/components/Button/Button.d.cts +2 -2
- package/dist/components/Button/Button.d.mts +2 -2
- package/dist/components/Button/Button.styles.d.mts +3 -3
- package/dist/components/CTAButton/CTAButton.d.cts +2 -2
- package/dist/components/CTAButton/CTAButton.d.mts +2 -2
- package/dist/components/CTAButton/CTAButton.styles.d.cts +3 -3
- package/dist/components/CTAButton/CTAButton.styles.d.mts +3 -3
- package/dist/components/Calendar/Calendar.cjs +191 -0
- package/dist/components/Calendar/Calendar.d.cts +40 -0
- package/dist/components/Calendar/Calendar.d.cts.map +1 -0
- package/dist/components/Calendar/Calendar.d.mts +40 -0
- package/dist/components/Calendar/Calendar.d.mts.map +1 -0
- package/dist/components/Calendar/Calendar.mjs +190 -0
- package/dist/components/Calendar/Calendar.mjs.map +1 -0
- package/dist/components/Calendar/Calendar.styles.cjs +121 -0
- package/dist/components/Calendar/Calendar.styles.d.cts +269 -0
- package/dist/components/Calendar/Calendar.styles.d.cts.map +1 -0
- package/dist/components/Calendar/Calendar.styles.d.mts +269 -0
- package/dist/components/Calendar/Calendar.styles.d.mts.map +1 -0
- package/dist/components/Calendar/Calendar.styles.mjs +120 -0
- package/dist/components/Calendar/Calendar.styles.mjs.map +1 -0
- package/dist/components/Calendar/index.d.mts +1 -0
- package/dist/components/Checkbox/Checkbox.d.cts +4 -4
- package/dist/components/Checkbox/Checkbox.d.mts +4 -4
- package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
- package/dist/components/Checkbox/Checkbox.styles.d.mts +3 -3
- package/dist/components/Chip/Chip.d.cts +2 -2
- package/dist/components/Chip/Chip.styles.d.cts +3 -3
- package/dist/components/Dialog/Dialog.d.cts +5 -5
- package/dist/components/Dialog/Dialog.styles.d.cts +3 -3
- package/dist/components/Dialog/Dialog.styles.d.cts.map +1 -1
- package/dist/components/Drawer/Drawer.cjs +41 -0
- package/dist/components/Drawer/Drawer.d.cts +29 -0
- package/dist/components/Drawer/Drawer.d.cts.map +1 -0
- package/dist/components/Drawer/Drawer.d.mts +29 -0
- package/dist/components/Drawer/Drawer.d.mts.map +1 -0
- package/dist/components/Drawer/Drawer.mjs +40 -0
- package/dist/components/Drawer/Drawer.mjs.map +1 -0
- package/dist/components/Drawer/Drawer.styles.cjs +23 -0
- package/dist/components/Drawer/Drawer.styles.d.cts +36 -0
- package/dist/components/Drawer/Drawer.styles.d.cts.map +1 -0
- package/dist/components/Drawer/Drawer.styles.d.mts +36 -0
- package/dist/components/Drawer/Drawer.styles.d.mts.map +1 -0
- package/dist/components/Drawer/Drawer.styles.mjs +23 -0
- package/dist/components/Drawer/Drawer.styles.mjs.map +1 -0
- package/dist/components/Drawer/index.d.mts +1 -0
- package/dist/components/Dropdown/Dropdown.d.cts +3 -3
- package/dist/components/Field/Field.d.mts +5 -5
- package/dist/components/Float/Float.styles.d.cts +3 -3
- package/dist/components/Float/Float.styles.d.mts +3 -3
- package/dist/components/FloatingActionButton/FloatingActionButton.d.cts +2 -2
- package/dist/components/FloatingActionButton/FloatingActionButton.d.mts +2 -2
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.cts +3 -3
- package/dist/components/FloatingActionButton/FloatingActionButton.styles.d.mts +3 -3
- package/dist/components/Grid/Grid.styles.d.cts +3 -3
- package/dist/components/Grid/Grid.styles.d.mts +3 -3
- package/dist/components/HStack/HStack.d.cts +2 -2
- package/dist/components/HStack/HStack.d.mts +2 -2
- package/dist/components/Modal/Modal.d.cts +7 -7
- package/dist/components/Modal/Modal.d.mts +7 -7
- package/dist/components/Modal/Modal.styles.d.cts +3 -3
- package/dist/components/Modal/Modal.styles.d.mts +3 -3
- package/dist/components/Primitive/Primitive.d.cts +16 -16
- package/dist/components/Radio/Radio.d.cts +3 -3
- package/dist/components/Radio/Radio.d.cts.map +1 -1
- package/dist/components/Radio/Radio.d.mts +3 -3
- package/dist/components/Radio/Radio.d.mts.map +1 -1
- package/dist/components/RatioChart/RatioChart.d.cts +5 -5
- package/dist/components/RatioChart/RatioChartEditor.d.cts +2 -2
- package/dist/components/Select/Select.d.cts +5 -5
- package/dist/components/Select/Select.styles.d.cts +3 -3
- package/dist/components/Separator/Separator.styles.d.mts +3 -3
- package/dist/components/Sidebar/Sidebar.cjs +95 -0
- package/dist/components/Sidebar/Sidebar.d.cts +64 -0
- package/dist/components/Sidebar/Sidebar.d.cts.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.mts +65 -0
- package/dist/components/Sidebar/Sidebar.d.mts.map +1 -0
- package/dist/components/Sidebar/Sidebar.mjs +95 -0
- package/dist/components/Sidebar/Sidebar.mjs.map +1 -0
- package/dist/components/Sidebar/Sidebar.styles.cjs +32 -0
- package/dist/components/Sidebar/Sidebar.styles.d.cts +75 -0
- package/dist/components/Sidebar/Sidebar.styles.d.cts.map +1 -0
- package/dist/components/Sidebar/Sidebar.styles.d.mts +75 -0
- package/dist/components/Sidebar/Sidebar.styles.d.mts.map +1 -0
- package/dist/components/Sidebar/Sidebar.styles.mjs +32 -0
- package/dist/components/Sidebar/Sidebar.styles.mjs.map +1 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.cjs +22 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.d.cts +5 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.d.cts.map +1 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.d.mts +7 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.d.mts.map +1 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.mjs +19 -0
- package/dist/components/Sidebar/hooks/useSidebarContext.mjs.map +1 -0
- package/dist/components/Sidebar/index.d.mts +2 -0
- package/dist/components/Spacer/Spacer.styles.d.cts +3 -3
- package/dist/components/Spacer/Spacer.styles.d.cts.map +1 -1
- package/dist/components/Spacer/Spacer.styles.d.mts +3 -3
- package/dist/components/Stack/Stack.styles.d.mts +3 -3
- package/dist/components/Tab/Tab.d.cts +6 -6
- package/dist/components/Tab/Tab.d.mts +6 -6
- package/dist/components/Tab/Tab.styles.d.cts +3 -3
- package/dist/components/Tab/Tab.styles.d.mts +3 -3
- package/dist/components/Text/Text.d.cts +1 -1
- package/dist/components/Text/Text.d.mts +1 -1
- package/dist/components/Text/Text.styles.d.cts +3 -3
- package/dist/components/Text/Text.styles.d.mts +3 -3
- package/dist/components/TextArea/TextArea.d.cts +4 -4
- package/dist/components/TextArea/TextArea.d.mts +4 -4
- package/dist/components/TextArea/TextArea.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.styles.d.mts +3 -3
- package/dist/components/TextInput/TextInput.d.cts +2 -2
- package/dist/components/TextInput/TextInput.d.mts +2 -2
- package/dist/components/TextInput/TextInput.styles.d.cts +3 -3
- package/dist/components/TextInput/TextInput.styles.d.mts +3 -3
- package/dist/components/Toast/Toast.d.cts +3 -3
- package/dist/components/Toast/Toast.d.mts +3 -3
- package/dist/components/Toast/Toast.styles.d.cts +3 -3
- package/dist/components/Toast/Toast.styles.d.mts +3 -3
- package/dist/components/Toggle/Toggle.d.cts +4 -4
- package/dist/components/Toggle/Toggle.d.mts +4 -4
- package/dist/components/Toggle/Toggle.styles.d.cts +3 -3
- package/dist/components/VStack/VStack.d.mts +2 -2
- package/dist/components/index.d.mts +12 -1
- package/dist/hooks/bottomSheet/useBottomSheet.cjs +15 -0
- package/dist/hooks/bottomSheet/useBottomSheet.mjs +13 -0
- package/dist/hooks/bottomSheet/useBottomSheet.mjs.map +1 -0
- package/dist/index.cjs +10 -0
- package/dist/index.d.cts +7 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_Text = require('../Text/Text.cjs');
|
|
3
|
+
const require_useBottomSheet = require('../../hooks/bottomSheet/useBottomSheet.cjs');
|
|
4
|
+
const require_Drawer = require('../Drawer/Drawer.cjs');
|
|
5
|
+
const require_BottomSheet_styles = require('./BottomSheet.styles.cjs');
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
|
|
10
|
+
//#region src/components/BottomSheet/BottomSheet.tsx
|
|
11
|
+
const BottomSheetRoot = ({ children, open: controlledOpen, defaultOpen = false, onOpenChange, headerAlign = "left" }) => {
|
|
12
|
+
const [uncontrolledOpen, setUncontrolledOpen] = (0, react.useState)(defaultOpen);
|
|
13
|
+
const isControlled = controlledOpen !== void 0;
|
|
14
|
+
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
15
|
+
const handleOpenChange = (newOpen) => {
|
|
16
|
+
if (!isControlled) setUncontrolledOpen(newOpen);
|
|
17
|
+
onOpenChange?.(newOpen);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useBottomSheet.BottomSheetContext.Provider, {
|
|
20
|
+
value: {
|
|
21
|
+
headerAlign,
|
|
22
|
+
isOpen,
|
|
23
|
+
onOpen: () => handleOpenChange(true),
|
|
24
|
+
onClose: () => handleOpenChange(false)
|
|
25
|
+
},
|
|
26
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Drawer.Drawer.Root, {
|
|
27
|
+
open: isOpen,
|
|
28
|
+
onOpenChange: handleOpenChange,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
const BottomSheetTrigger = require_Drawer.Drawer.Trigger;
|
|
34
|
+
const BottomSheetHandle = () => {
|
|
35
|
+
const { handle } = require_BottomSheet_styles.bottomSheet();
|
|
36
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: handle() });
|
|
37
|
+
};
|
|
38
|
+
const BottomSheetContent = ({ children, className, ...props }) => {
|
|
39
|
+
const { content } = require_BottomSheet_styles.bottomSheet();
|
|
40
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Drawer.Drawer.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Drawer.Drawer.Overlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Drawer.Drawer.Content, {
|
|
41
|
+
className: content({ className }),
|
|
42
|
+
...props,
|
|
43
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BottomSheetHandle, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
44
|
+
className: "w-full",
|
|
45
|
+
children
|
|
46
|
+
})]
|
|
47
|
+
})] });
|
|
48
|
+
};
|
|
49
|
+
const BottomSheetHeader = ({ title, className }) => {
|
|
50
|
+
const { headerAlign } = require_useBottomSheet.useBottomSheet();
|
|
51
|
+
const { header } = require_BottomSheet_styles.bottomSheet({ headerAlign });
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
53
|
+
className: header({ className }),
|
|
54
|
+
children: title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Drawer.Drawer.Title, {
|
|
55
|
+
asChild: true,
|
|
56
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
57
|
+
as: "h2",
|
|
58
|
+
typography: "subtitle-18-bold",
|
|
59
|
+
children: title
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const BottomSheetBody = ({ className, children, maxHeight }) => {
|
|
65
|
+
const { body } = require_BottomSheet_styles.bottomSheet();
|
|
66
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
67
|
+
className: body({ className }),
|
|
68
|
+
style: { maxHeight },
|
|
69
|
+
children
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const BottomSheetFooter = ({ className, children }) => {
|
|
73
|
+
const { footer } = require_BottomSheet_styles.bottomSheet();
|
|
74
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
75
|
+
className: footer({ className }),
|
|
76
|
+
children
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const BottomSheet = Object.assign(BottomSheetRoot, {
|
|
80
|
+
Trigger: BottomSheetTrigger,
|
|
81
|
+
Content: BottomSheetContent,
|
|
82
|
+
Header: BottomSheetHeader,
|
|
83
|
+
Body: BottomSheetBody,
|
|
84
|
+
Footer: BottomSheetFooter
|
|
85
|
+
});
|
|
86
|
+
BottomSheetRoot.displayName = "BottomSheet";
|
|
87
|
+
BottomSheetTrigger.displayName = "BottomSheet.Trigger";
|
|
88
|
+
BottomSheetContent.displayName = "BottomSheet.Content";
|
|
89
|
+
BottomSheetHeader.displayName = "BottomSheet.Header";
|
|
90
|
+
BottomSheetBody.displayName = "BottomSheet.Body";
|
|
91
|
+
BottomSheetFooter.displayName = "BottomSheet.Footer";
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
exports.BottomSheet = BottomSheet;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Drawer } from "../Drawer/Drawer.cjs";
|
|
2
|
+
import { HeaderAlign } from "./BottomSheet.styles.cjs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import * as react_jsx_runtime79 from "react/jsx-runtime";
|
|
5
|
+
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
6
|
+
|
|
7
|
+
//#region src/components/BottomSheet/BottomSheet.d.ts
|
|
8
|
+
interface BottomSheetRootProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
headerAlign?: HeaderAlign;
|
|
14
|
+
}
|
|
15
|
+
declare const BottomSheet: {
|
|
16
|
+
({
|
|
17
|
+
children,
|
|
18
|
+
open: controlledOpen,
|
|
19
|
+
defaultOpen,
|
|
20
|
+
onOpenChange,
|
|
21
|
+
headerAlign
|
|
22
|
+
}: BottomSheetRootProps): react_jsx_runtime79.JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
} & {
|
|
25
|
+
Trigger: React.ForwardRefExoticComponent<_radix_ui_react_dialog0.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
26
|
+
Content: {
|
|
27
|
+
({
|
|
28
|
+
children,
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof Drawer.Content>): react_jsx_runtime79.JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
Header: {
|
|
35
|
+
({
|
|
36
|
+
title,
|
|
37
|
+
className
|
|
38
|
+
}: {
|
|
39
|
+
title?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): react_jsx_runtime79.JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
Body: {
|
|
45
|
+
({
|
|
46
|
+
className,
|
|
47
|
+
children,
|
|
48
|
+
maxHeight
|
|
49
|
+
}: {
|
|
50
|
+
children: React.ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
maxHeight?: string | number;
|
|
53
|
+
}): react_jsx_runtime79.JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
Footer: {
|
|
57
|
+
({
|
|
58
|
+
className,
|
|
59
|
+
children
|
|
60
|
+
}: {
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
className?: string;
|
|
63
|
+
}): react_jsx_runtime79.JSX.Element;
|
|
64
|
+
displayName: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { BottomSheet };
|
|
69
|
+
//# sourceMappingURL=BottomSheet.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"mappings":";;;;;;;UAMU,oBAAA;EACR,QAAA,GAAW,KAAA,CAAM,SAAA;EACjB,IAAA;EACA,WAAA;EACA,YAAA,IAAgB,IAAA;EAChB,WAAA,GAAc,WAAA;AAAA;AAAA,cAkHH,WAAA;EAAA;;;;;;KAzGV,oBAAA,GAAoB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;2CAAA,uBAAA,CAAA,kBAAA;;;;;;OAwCpB,KAAA,CAAM,cAAA,QAAsB,MAAA,CAAO,OAAA,IAAQ,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;MAkB5C,KAAA;MACA,SAAA;IAAA,IACD,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;MAsBC,QAAA,EAAU,KAAA,CAAM,SAAA;MAChB,SAAA;MACA,SAAA;IAAA,IACD,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;MAaC,QAAA,EAAU,KAAA,CAAM,SAAA;MAChB,SAAA;IAAA,IACD,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Drawer } from "../Drawer/Drawer.mjs";
|
|
2
|
+
import { HeaderAlign } from "./BottomSheet.styles.mjs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import * as react_jsx_runtime79 from "react/jsx-runtime";
|
|
5
|
+
import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
|
|
6
|
+
|
|
7
|
+
//#region src/components/BottomSheet/BottomSheet.d.ts
|
|
8
|
+
interface BottomSheetRootProps {
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
headerAlign?: HeaderAlign;
|
|
14
|
+
}
|
|
15
|
+
declare const BottomSheet: {
|
|
16
|
+
({
|
|
17
|
+
children,
|
|
18
|
+
open: controlledOpen,
|
|
19
|
+
defaultOpen,
|
|
20
|
+
onOpenChange,
|
|
21
|
+
headerAlign
|
|
22
|
+
}: BottomSheetRootProps): react_jsx_runtime79.JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
} & {
|
|
25
|
+
Trigger: React.ForwardRefExoticComponent<_radix_ui_react_dialog0.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
26
|
+
Content: {
|
|
27
|
+
({
|
|
28
|
+
children,
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<typeof Drawer.Content>): react_jsx_runtime79.JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
Header: {
|
|
35
|
+
({
|
|
36
|
+
title,
|
|
37
|
+
className
|
|
38
|
+
}: {
|
|
39
|
+
title?: string;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): react_jsx_runtime79.JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
Body: {
|
|
45
|
+
({
|
|
46
|
+
className,
|
|
47
|
+
children,
|
|
48
|
+
maxHeight
|
|
49
|
+
}: {
|
|
50
|
+
children: React.ReactNode;
|
|
51
|
+
className?: string;
|
|
52
|
+
maxHeight?: string | number;
|
|
53
|
+
}): react_jsx_runtime79.JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
Footer: {
|
|
57
|
+
({
|
|
58
|
+
className,
|
|
59
|
+
children
|
|
60
|
+
}: {
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
className?: string;
|
|
63
|
+
}): react_jsx_runtime79.JSX.Element;
|
|
64
|
+
displayName: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { BottomSheet };
|
|
69
|
+
//# sourceMappingURL=BottomSheet.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.mts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"mappings":";;;;;;;UAMU,oBAAA;EACR,QAAA,GAAW,KAAA,CAAM,SAAA;EACjB,IAAA;EACA,WAAA;EACA,YAAA,IAAgB,IAAA;EAChB,WAAA,GAAc,WAAA;AAAA;AAAA,cAkHH,WAAA;EAAA;;;;;;KAzGV,oBAAA,GAAoB,mBAAA,CAAA,GAAA,CAAA,OAAA;;;2CAAA,uBAAA,CAAA,kBAAA;;;;;;OAwCpB,KAAA,CAAM,cAAA,QAAsB,MAAA,CAAO,OAAA,IAAQ,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;MAkB5C,KAAA;MACA,SAAA;IAAA,IACD,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;MAsBC,QAAA,EAAU,KAAA,CAAM,SAAA;MAChB,SAAA;MACA,SAAA;IAAA,IACD,mBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;MAaC,QAAA,EAAU,KAAA,CAAM,SAAA;MAChB,SAAA;IAAA,IACD,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Text } from "../Text/Text.mjs";
|
|
2
|
+
import { BottomSheetContext, useBottomSheet } from "../../hooks/bottomSheet/useBottomSheet.mjs";
|
|
3
|
+
import { Drawer } from "../Drawer/Drawer.mjs";
|
|
4
|
+
import { bottomSheet } from "./BottomSheet.styles.mjs";
|
|
5
|
+
import React, { useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/BottomSheet/BottomSheet.tsx
|
|
9
|
+
const BottomSheetRoot = ({ children, open: controlledOpen, defaultOpen = false, onOpenChange, headerAlign = "left" }) => {
|
|
10
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
11
|
+
const isControlled = controlledOpen !== void 0;
|
|
12
|
+
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
13
|
+
const handleOpenChange = (newOpen) => {
|
|
14
|
+
if (!isControlled) setUncontrolledOpen(newOpen);
|
|
15
|
+
onOpenChange?.(newOpen);
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ jsx(BottomSheetContext.Provider, {
|
|
18
|
+
value: {
|
|
19
|
+
headerAlign,
|
|
20
|
+
isOpen,
|
|
21
|
+
onOpen: () => handleOpenChange(true),
|
|
22
|
+
onClose: () => handleOpenChange(false)
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ jsx(Drawer.Root, {
|
|
25
|
+
open: isOpen,
|
|
26
|
+
onOpenChange: handleOpenChange,
|
|
27
|
+
children
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const BottomSheetTrigger = Drawer.Trigger;
|
|
32
|
+
const BottomSheetHandle = () => {
|
|
33
|
+
const { handle } = bottomSheet();
|
|
34
|
+
return /* @__PURE__ */ jsx("div", { className: handle() });
|
|
35
|
+
};
|
|
36
|
+
const BottomSheetContent = ({ children, className, ...props }) => {
|
|
37
|
+
const { content } = bottomSheet();
|
|
38
|
+
return /* @__PURE__ */ jsxs(Drawer.Portal, { children: [/* @__PURE__ */ jsx(Drawer.Overlay, {}), /* @__PURE__ */ jsxs(Drawer.Content, {
|
|
39
|
+
className: content({ className }),
|
|
40
|
+
...props,
|
|
41
|
+
children: [/* @__PURE__ */ jsx(BottomSheetHandle, {}), /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: "w-full",
|
|
43
|
+
children
|
|
44
|
+
})]
|
|
45
|
+
})] });
|
|
46
|
+
};
|
|
47
|
+
const BottomSheetHeader = ({ title, className }) => {
|
|
48
|
+
const { headerAlign } = useBottomSheet();
|
|
49
|
+
const { header } = bottomSheet({ headerAlign });
|
|
50
|
+
return /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: header({ className }),
|
|
52
|
+
children: title && /* @__PURE__ */ jsx(Drawer.Title, {
|
|
53
|
+
asChild: true,
|
|
54
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
55
|
+
as: "h2",
|
|
56
|
+
typography: "subtitle-18-bold",
|
|
57
|
+
children: title
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const BottomSheetBody = ({ className, children, maxHeight }) => {
|
|
63
|
+
const { body } = bottomSheet();
|
|
64
|
+
return /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: body({ className }),
|
|
66
|
+
style: { maxHeight },
|
|
67
|
+
children
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const BottomSheetFooter = ({ className, children }) => {
|
|
71
|
+
const { footer } = bottomSheet();
|
|
72
|
+
return /* @__PURE__ */ jsx("div", {
|
|
73
|
+
className: footer({ className }),
|
|
74
|
+
children
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const BottomSheet = Object.assign(BottomSheetRoot, {
|
|
78
|
+
Trigger: BottomSheetTrigger,
|
|
79
|
+
Content: BottomSheetContent,
|
|
80
|
+
Header: BottomSheetHeader,
|
|
81
|
+
Body: BottomSheetBody,
|
|
82
|
+
Footer: BottomSheetFooter
|
|
83
|
+
});
|
|
84
|
+
BottomSheetRoot.displayName = "BottomSheet";
|
|
85
|
+
BottomSheetTrigger.displayName = "BottomSheet.Trigger";
|
|
86
|
+
BottomSheetContent.displayName = "BottomSheet.Content";
|
|
87
|
+
BottomSheetHeader.displayName = "BottomSheet.Header";
|
|
88
|
+
BottomSheetBody.displayName = "BottomSheet.Body";
|
|
89
|
+
BottomSheetFooter.displayName = "BottomSheet.Footer";
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
export { BottomSheet };
|
|
93
|
+
//# sourceMappingURL=BottomSheet.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.mjs","names":[],"sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Drawer } from '../Drawer/Drawer';\nimport { Text } from '../Text';\nimport { BottomSheetContext, useBottomSheet } from '../../hooks';\nimport { bottomSheet, HeaderAlign } from './BottomSheet.styles';\n\ninterface BottomSheetRootProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n headerAlign?: HeaderAlign;\n}\n\nconst BottomSheetRoot = ({\n children,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n headerAlign = 'left',\n}: BottomSheetRootProps) => {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);\n\n const isControlled = controlledOpen !== undefined;\n const isOpen = isControlled ? controlledOpen : uncontrolledOpen;\n\n const handleOpenChange = (newOpen: boolean) => {\n if (!isControlled) {\n setUncontrolledOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n };\n\n return (\n <BottomSheetContext.Provider\n value={{\n headerAlign,\n isOpen,\n onOpen: () => handleOpenChange(true),\n onClose: () => handleOpenChange(false),\n }}\n >\n <Drawer.Root open={isOpen} onOpenChange={handleOpenChange}>\n {children}\n </Drawer.Root>\n </BottomSheetContext.Provider>\n );\n};\n\nconst BottomSheetTrigger = Drawer.Trigger;\n\nconst BottomSheetHandle = () => {\n const { handle } = bottomSheet();\n return <div className={handle()} />;\n};\n\nconst BottomSheetContent = ({\n children,\n className,\n ...props\n}: React.ComponentProps<typeof Drawer.Content>) => {\n const { content } = bottomSheet();\n return (\n <Drawer.Portal>\n <Drawer.Overlay />\n\n <Drawer.Content className={content({ className })} {...props}>\n <BottomSheetHandle />\n <div className=\"w-full\">{children}</div>\n </Drawer.Content>\n </Drawer.Portal>\n );\n};\n\nconst BottomSheetHeader = ({\n title,\n className,\n}: {\n title?: string;\n className?: string;\n}) => {\n const { headerAlign } = useBottomSheet();\n const { header } = bottomSheet({ headerAlign });\n\n return (\n <div className={header({ className })}>\n {title && (\n <Drawer.Title asChild>\n <Text as=\"h2\" typography=\"subtitle-18-bold\">\n {title}\n </Text>\n </Drawer.Title>\n )}\n </div>\n );\n};\n\nconst BottomSheetBody = ({\n className,\n children,\n maxHeight,\n}: {\n children: React.ReactNode;\n className?: string;\n maxHeight?: string | number;\n}) => {\n const { body } = bottomSheet();\n return (\n <div className={body({ className })} style={{ maxHeight }}>\n {children}\n </div>\n );\n};\n\nconst BottomSheetFooter = ({\n className,\n children,\n}: {\n children: React.ReactNode;\n className?: string;\n}) => {\n const { footer } = bottomSheet();\n return <div className={footer({ className })}>{children}</div>;\n};\n\nexport const BottomSheet = Object.assign(BottomSheetRoot, {\n Trigger: BottomSheetTrigger,\n Content: BottomSheetContent,\n Header: BottomSheetHeader,\n Body: BottomSheetBody,\n Footer: BottomSheetFooter,\n});\n\nBottomSheetRoot.displayName = 'BottomSheet';\nBottomSheetTrigger.displayName = 'BottomSheet.Trigger';\nBottomSheetContent.displayName = 'BottomSheet.Content';\nBottomSheetHeader.displayName = 'BottomSheet.Header';\nBottomSheetBody.displayName = 'BottomSheet.Body';\nBottomSheetFooter.displayName = 'BottomSheet.Footer';\n"],"mappings":";;;;;;;;AAcA,MAAM,mBAAmB,EACvB,UACA,MAAM,gBACN,cAAc,OACd,cACA,cAAc,aACY;CAC1B,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,YAAY;CAErE,MAAM,eAAe,mBAAmB;CACxC,MAAM,SAAS,eAAe,iBAAiB;CAE/C,MAAM,oBAAoB,YAAqB;AAC7C,MAAI,CAAC,aACH,qBAAoB,QAAQ;AAE9B,iBAAe,QAAQ;;AAGzB,QACE,oBAAC,mBAAmB;EAClB,OAAO;GACL;GACA;GACA,cAAc,iBAAiB,KAAK;GACpC,eAAe,iBAAiB,MAAM;GACvC;YAED,oBAAC,OAAO;GAAK,MAAM;GAAQ,cAAc;GACtC;IACW;GACc;;AAIlC,MAAM,qBAAqB,OAAO;AAElC,MAAM,0BAA0B;CAC9B,MAAM,EAAE,WAAW,aAAa;AAChC,QAAO,oBAAC,SAAI,WAAW,QAAQ,GAAI;;AAGrC,MAAM,sBAAsB,EAC1B,UACA,WACA,GAAG,YAC8C;CACjD,MAAM,EAAE,YAAY,aAAa;AACjC,QACE,qBAAC,OAAO,qBACN,oBAAC,OAAO,YAAU,EAElB,qBAAC,OAAO;EAAQ,WAAW,QAAQ,EAAE,WAAW,CAAC;EAAE,GAAI;aACrD,oBAAC,sBAAoB,EACrB,oBAAC;GAAI,WAAU;GAAU;IAAe;GACzB,IACH;;AAIpB,MAAM,qBAAqB,EACzB,OACA,gBAII;CACJ,MAAM,EAAE,gBAAgB,gBAAgB;CACxC,MAAM,EAAE,WAAW,YAAY,EAAE,aAAa,CAAC;AAE/C,QACE,oBAAC;EAAI,WAAW,OAAO,EAAE,WAAW,CAAC;YAClC,SACC,oBAAC,OAAO;GAAM;aACZ,oBAAC;IAAK,IAAG;IAAK,YAAW;cACtB;KACI;IACM;GAEb;;AAIV,MAAM,mBAAmB,EACvB,WACA,UACA,gBAKI;CACJ,MAAM,EAAE,SAAS,aAAa;AAC9B,QACE,oBAAC;EAAI,WAAW,KAAK,EAAE,WAAW,CAAC;EAAE,OAAO,EAAE,WAAW;EACtD;GACG;;AAIV,MAAM,qBAAqB,EACzB,WACA,eAII;CACJ,MAAM,EAAE,WAAW,aAAa;AAChC,QAAO,oBAAC;EAAI,WAAW,OAAO,EAAE,WAAW,CAAC;EAAG;GAAe;;AAGhE,MAAa,cAAc,OAAO,OAAO,iBAAiB;CACxD,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACN,QAAQ;CACT,CAAC;AAEF,gBAAgB,cAAc;AAC9B,mBAAmB,cAAc;AACjC,mBAAmB,cAAc;AACjC,kBAAkB,cAAc;AAChC,gBAAgB,cAAc;AAC9B,kBAAkB,cAAc"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let tailwind_variants = require("tailwind-variants");
|
|
3
|
+
|
|
4
|
+
//#region src/components/BottomSheet/BottomSheet.styles.ts
|
|
5
|
+
const bottomSheet = (0, tailwind_variants.tv)({
|
|
6
|
+
slots: {
|
|
7
|
+
content: "flex w-full flex-col items-center gap-8 rounded-t-2xl bg-white px-6 py-3.5 pb-10 shadow-[0_-2px_30px_0_rgba(51,53,61,0.30)]",
|
|
8
|
+
handle: "h-1 w-11 rounded-full bg-gray-200",
|
|
9
|
+
header: "text-left",
|
|
10
|
+
body: "overflow-y-auto",
|
|
11
|
+
footer: ""
|
|
12
|
+
},
|
|
13
|
+
variants: { headerAlign: {
|
|
14
|
+
left: { header: "text-left" },
|
|
15
|
+
center: { header: "text-center" }
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { headerAlign: "left" }
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.bottomSheet = bottomSheet;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as tailwind_variants51 from "tailwind-variants";
|
|
2
|
+
import { VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
//#region src/components/BottomSheet/BottomSheet.styles.d.ts
|
|
5
|
+
declare const bottomSheet: tailwind_variants51.TVReturnType<{
|
|
6
|
+
headerAlign: {
|
|
7
|
+
left: {
|
|
8
|
+
header: string;
|
|
9
|
+
};
|
|
10
|
+
center: {
|
|
11
|
+
header: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
content: string;
|
|
16
|
+
handle: string;
|
|
17
|
+
header: string;
|
|
18
|
+
body: string;
|
|
19
|
+
footer: string;
|
|
20
|
+
}, undefined, {
|
|
21
|
+
headerAlign: {
|
|
22
|
+
left: {
|
|
23
|
+
header: string;
|
|
24
|
+
};
|
|
25
|
+
center: {
|
|
26
|
+
header: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
content: string;
|
|
31
|
+
handle: string;
|
|
32
|
+
header: string;
|
|
33
|
+
body: string;
|
|
34
|
+
footer: string;
|
|
35
|
+
}, tailwind_variants51.TVReturnType<{
|
|
36
|
+
headerAlign: {
|
|
37
|
+
left: {
|
|
38
|
+
header: string;
|
|
39
|
+
};
|
|
40
|
+
center: {
|
|
41
|
+
header: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
content: string;
|
|
46
|
+
handle: string;
|
|
47
|
+
header: string;
|
|
48
|
+
body: string;
|
|
49
|
+
footer: string;
|
|
50
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
51
|
+
type HeaderAlign = VariantProps<typeof bottomSheet>['headerAlign'];
|
|
52
|
+
//#endregion
|
|
53
|
+
export { HeaderAlign };
|
|
54
|
+
//# sourceMappingURL=BottomSheet.styles.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.styles.d.cts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheet.styles.ts"],"mappings":";;;;cAEa,WAAA,EAsBX,mBAAA,CAtBsB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsBtB,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;KAEU,WAAA,GAAc,YAAA,QAAoB,WAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as tailwind_variants51 from "tailwind-variants";
|
|
2
|
+
import { VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
//#region src/components/BottomSheet/BottomSheet.styles.d.ts
|
|
5
|
+
declare const bottomSheet: tailwind_variants51.TVReturnType<{
|
|
6
|
+
headerAlign: {
|
|
7
|
+
left: {
|
|
8
|
+
header: string;
|
|
9
|
+
};
|
|
10
|
+
center: {
|
|
11
|
+
header: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
content: string;
|
|
16
|
+
handle: string;
|
|
17
|
+
header: string;
|
|
18
|
+
body: string;
|
|
19
|
+
footer: string;
|
|
20
|
+
}, undefined, {
|
|
21
|
+
headerAlign: {
|
|
22
|
+
left: {
|
|
23
|
+
header: string;
|
|
24
|
+
};
|
|
25
|
+
center: {
|
|
26
|
+
header: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
content: string;
|
|
31
|
+
handle: string;
|
|
32
|
+
header: string;
|
|
33
|
+
body: string;
|
|
34
|
+
footer: string;
|
|
35
|
+
}, tailwind_variants51.TVReturnType<{
|
|
36
|
+
headerAlign: {
|
|
37
|
+
left: {
|
|
38
|
+
header: string;
|
|
39
|
+
};
|
|
40
|
+
center: {
|
|
41
|
+
header: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
content: string;
|
|
46
|
+
handle: string;
|
|
47
|
+
header: string;
|
|
48
|
+
body: string;
|
|
49
|
+
footer: string;
|
|
50
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
51
|
+
type HeaderAlign = VariantProps<typeof bottomSheet>['headerAlign'];
|
|
52
|
+
//#endregion
|
|
53
|
+
export { HeaderAlign };
|
|
54
|
+
//# sourceMappingURL=BottomSheet.styles.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.styles.d.mts","names":[],"sources":["../../../src/components/BottomSheet/BottomSheet.styles.ts"],"mappings":";;;;cAEa,WAAA,EAsBX,mBAAA,CAtBsB,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsBtB,mBAAA,CAAA,YAAA;;;;;;;;;;;;;;;;KAEU,WAAA,GAAc,YAAA,QAAoB,WAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
|
|
3
|
+
//#region src/components/BottomSheet/BottomSheet.styles.ts
|
|
4
|
+
const bottomSheet = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
content: "flex w-full flex-col items-center gap-8 rounded-t-2xl bg-white px-6 py-3.5 pb-10 shadow-[0_-2px_30px_0_rgba(51,53,61,0.30)]",
|
|
7
|
+
handle: "h-1 w-11 rounded-full bg-gray-200",
|
|
8
|
+
header: "text-left",
|
|
9
|
+
body: "overflow-y-auto",
|
|
10
|
+
footer: ""
|
|
11
|
+
},
|
|
12
|
+
variants: { headerAlign: {
|
|
13
|
+
left: { header: "text-left" },
|
|
14
|
+
center: { header: "text-center" }
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { headerAlign: "left" }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { bottomSheet };
|
|
21
|
+
//# sourceMappingURL=BottomSheet.styles.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.styles.mjs","names":[],"sources":["../../../src/components/BottomSheet/BottomSheet.styles.ts"],"sourcesContent":["import { tv, VariantProps } from 'tailwind-variants';\n\nexport const bottomSheet = tv({\n slots: {\n content:\n 'flex w-full flex-col items-center gap-8 rounded-t-2xl bg-white px-6 py-3.5 pb-10 shadow-[0_-2px_30px_0_rgba(51,53,61,0.30)]',\n handle: 'h-1 w-11 rounded-full bg-gray-200',\n header: 'text-left',\n body: 'overflow-y-auto',\n footer: '',\n },\n variants: {\n headerAlign: {\n left: {\n header: 'text-left',\n },\n center: {\n header: 'text-center',\n },\n },\n },\n defaultVariants: {\n headerAlign: 'left',\n },\n});\n\nexport type HeaderAlign = VariantProps<typeof bottomSheet>['headerAlign'];\n"],"mappings":";;;AAEA,MAAa,cAAc,GAAG;CAC5B,OAAO;EACL,SACE;EACF,QAAQ;EACR,QAAQ;EACR,MAAM;EACN,QAAQ;EACT;CACD,UAAU,EACR,aAAa;EACX,MAAM,EACJ,QAAQ,aACT;EACD,QAAQ,EACN,QAAQ,eACT;EACF,EACF;CACD,iBAAiB,EACf,aAAa,QACd;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { BottomSheet } from "./BottomSheet.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants3 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Box/Box.styles.d.ts
|
|
5
|
-
declare const box:
|
|
5
|
+
declare const box: tailwind_variants3.TVReturnType<{
|
|
6
6
|
padding: {
|
|
7
7
|
none: string;
|
|
8
8
|
xs: string;
|
|
@@ -66,7 +66,7 @@ declare const box: tailwind_variants5.TVReturnType<{
|
|
|
66
66
|
inverse: string;
|
|
67
67
|
transparent: string;
|
|
68
68
|
};
|
|
69
|
-
}, undefined,
|
|
69
|
+
}, undefined, tailwind_variants3.TVReturnType<{
|
|
70
70
|
padding: {
|
|
71
71
|
none: string;
|
|
72
72
|
xs: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PrimitiveProps } from "../Primitive/Primitive.cjs";
|
|
2
2
|
import { ButtonVariants } from "./Button.styles.cjs";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Button/Button.d.ts
|
|
7
7
|
interface ButtonProps extends Omit<ComponentProps<'button'>, 'color'>, ButtonVariants, PrimitiveProps {}
|
|
@@ -13,7 +13,7 @@ declare function Button({
|
|
|
13
13
|
className,
|
|
14
14
|
children,
|
|
15
15
|
...props
|
|
16
|
-
}: ButtonProps):
|
|
16
|
+
}: ButtonProps): react_jsx_runtime15.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { Button, ButtonProps };
|
|
19
19
|
//# sourceMappingURL=Button.d.cts.map
|
|
@@ -2,7 +2,7 @@ import { PrimitiveProps } from "../Primitive/Primitive.mjs";
|
|
|
2
2
|
import "../Primitive/index.mjs";
|
|
3
3
|
import { ButtonVariants } from "./Button.styles.mjs";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Button/Button.d.ts
|
|
8
8
|
interface ButtonProps extends Omit<ComponentProps<'button'>, 'color'>, ButtonVariants, PrimitiveProps {}
|
|
@@ -14,7 +14,7 @@ declare function Button({
|
|
|
14
14
|
className,
|
|
15
15
|
children,
|
|
16
16
|
...props
|
|
17
|
-
}: ButtonProps):
|
|
17
|
+
}: ButtonProps): react_jsx_runtime16.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { Button, ButtonProps };
|
|
20
20
|
//# sourceMappingURL=Button.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants37 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Button/Button.styles.d.ts
|
|
5
|
-
declare const button:
|
|
5
|
+
declare const button: tailwind_variants37.TVReturnType<{
|
|
6
6
|
size: {
|
|
7
7
|
sm: string;
|
|
8
8
|
md: string;
|
|
@@ -38,7 +38,7 @@ declare const button: tailwind_variants31.TVReturnType<{
|
|
|
38
38
|
true: string;
|
|
39
39
|
false: string;
|
|
40
40
|
};
|
|
41
|
-
}, undefined,
|
|
41
|
+
}, undefined, tailwind_variants37.TVReturnType<{
|
|
42
42
|
size: {
|
|
43
43
|
sm: string;
|
|
44
44
|
md: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PrimitiveProps } from "../Primitive/Primitive.cjs";
|
|
2
2
|
import { CTAButtonVariants } from "./CTAButton.styles.cjs";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/CTAButton/CTAButton.d.ts
|
|
7
7
|
interface CTAButtonProps extends Omit<ComponentProps<'button'>, 'color'>, PrimitiveProps, CTAButtonVariants {}
|
|
@@ -12,7 +12,7 @@ declare function CTAButton({
|
|
|
12
12
|
className,
|
|
13
13
|
children,
|
|
14
14
|
...props
|
|
15
|
-
}: CTAButtonProps):
|
|
15
|
+
}: CTAButtonProps): react_jsx_runtime17.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { CTAButton, CTAButtonProps };
|
|
18
18
|
//# sourceMappingURL=CTAButton.d.cts.map
|
|
@@ -2,7 +2,7 @@ import { PrimitiveProps } from "../Primitive/Primitive.mjs";
|
|
|
2
2
|
import "../Primitive/index.mjs";
|
|
3
3
|
import { CTAButtonVariants } from "./CTAButton.styles.mjs";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/CTAButton/CTAButton.d.ts
|
|
8
8
|
interface CTAButtonProps extends Omit<ComponentProps<'button'>, 'color'>, PrimitiveProps, CTAButtonVariants {}
|
|
@@ -13,7 +13,7 @@ declare function CTAButton({
|
|
|
13
13
|
className,
|
|
14
14
|
children,
|
|
15
15
|
...props
|
|
16
|
-
}: CTAButtonProps):
|
|
16
|
+
}: CTAButtonProps): react_jsx_runtime17.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { CTAButton, CTAButtonProps };
|
|
19
19
|
//# sourceMappingURL=CTAButton.d.mts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as tailwind_variants39 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/CTAButton/CTAButton.styles.d.ts
|
|
5
|
-
declare const ctaButton:
|
|
5
|
+
declare const ctaButton: tailwind_variants39.TVReturnType<{
|
|
6
6
|
color: {
|
|
7
7
|
blue: string;
|
|
8
8
|
red: string;
|
|
@@ -34,7 +34,7 @@ declare const ctaButton: tailwind_variants37.TVReturnType<{
|
|
|
34
34
|
true: string;
|
|
35
35
|
false: string;
|
|
36
36
|
};
|
|
37
|
-
}, undefined,
|
|
37
|
+
}, undefined, tailwind_variants39.TVReturnType<{
|
|
38
38
|
color: {
|
|
39
39
|
blue: string;
|
|
40
40
|
red: string;
|