@jbpark/ui-kit 2.3.3 → 2.3.4
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/README.ko.md +0 -1
- package/README.md +0 -1
- package/dist/Menu.d.mts +62 -2
- package/dist/Menu.d.mts.map +1 -0
- package/dist/Menu.mjs +66 -5
- package/dist/Menu.mjs.map +1 -0
- package/dist/Reveals.d.mts +43 -2
- package/dist/Reveals.d.mts.map +1 -0
- package/dist/Reveals.mjs +28 -3
- package/dist/Reveals.mjs.map +1 -0
- package/dist/Typography.d.mts +40 -2
- package/dist/Typography.d.mts.map +1 -0
- package/dist/Typography.mjs +20 -3
- package/dist/Typography.mjs.map +1 -0
- package/dist/{chunk-BWyCjowX.mjs → _virtual/_rolldown/runtime.mjs} +4 -4
- package/dist/components/atoms/Button/index.d.mts +36 -0
- package/dist/components/atoms/Button/index.d.mts.map +1 -0
- package/dist/components/atoms/Button/index.mjs +56 -0
- package/dist/components/atoms/Button/index.mjs.map +1 -0
- package/dist/components/atoms/Checkbox/Group/index.d.mts +21 -0
- package/dist/components/atoms/Checkbox/Group/index.d.mts.map +1 -0
- package/dist/components/atoms/Checkbox/Group/index.mjs +41 -0
- package/dist/components/atoms/Checkbox/Group/index.mjs.map +1 -0
- package/dist/components/atoms/Checkbox/index.d.mts +45 -0
- package/dist/components/atoms/Checkbox/index.d.mts.map +1 -0
- package/dist/components/atoms/Checkbox/index.mjs +70 -0
- package/dist/components/atoms/Checkbox/index.mjs.map +1 -0
- package/dist/components/atoms/ColorPicker/index.d.mts +18 -0
- package/dist/components/atoms/ColorPicker/index.d.mts.map +1 -0
- package/dist/components/atoms/ColorPicker/index.mjs +39 -0
- package/dist/components/atoms/ColorPicker/index.mjs.map +1 -0
- package/dist/components/atoms/FloatButton/BackTop/index.d.mts +12 -0
- package/dist/components/atoms/FloatButton/BackTop/index.d.mts.map +1 -0
- package/dist/components/atoms/FloatButton/BackTop/index.mjs +27 -0
- package/dist/components/atoms/FloatButton/BackTop/index.mjs.map +1 -0
- package/dist/components/atoms/FloatButton/index.d.mts +22 -0
- package/dist/components/atoms/FloatButton/index.d.mts.map +1 -0
- package/dist/components/atoms/FloatButton/index.mjs +19 -0
- package/dist/components/atoms/FloatButton/index.mjs.map +1 -0
- package/dist/components/atoms/Input/Search/index.d.mts +15 -0
- package/dist/components/atoms/Input/Search/index.d.mts.map +1 -0
- package/dist/components/atoms/Input/Search/index.mjs +57 -0
- package/dist/components/atoms/Input/Search/index.mjs.map +1 -0
- package/dist/components/atoms/Input/TextArea/index.d.mts +1 -0
- package/dist/components/atoms/Input/TextArea/index.mjs +18 -0
- package/dist/components/atoms/Input/TextArea/index.mjs.map +1 -0
- package/dist/components/atoms/Input/index.d.mts +31 -0
- package/dist/components/atoms/Input/index.d.mts.map +1 -0
- package/dist/components/atoms/Input/index.mjs +17 -0
- package/dist/components/atoms/Input/index.mjs.map +1 -0
- package/dist/components/atoms/Popover/index.d.mts +19 -0
- package/dist/components/atoms/Popover/index.d.mts.map +1 -0
- package/dist/components/atoms/Popover/index.mjs +229 -0
- package/dist/components/atoms/Popover/index.mjs.map +1 -0
- package/dist/components/atoms/Progress/index.d.mts +20 -0
- package/dist/components/atoms/Progress/index.d.mts.map +1 -0
- package/dist/components/atoms/Progress/index.mjs +25 -0
- package/dist/components/atoms/Progress/index.mjs.map +1 -0
- package/dist/components/atoms/Radio/Group/index.d.mts +21 -0
- package/dist/components/atoms/Radio/Group/index.d.mts.map +1 -0
- package/dist/components/atoms/Radio/Group/index.mjs +41 -0
- package/dist/components/atoms/Radio/Group/index.mjs.map +1 -0
- package/dist/components/atoms/Radio/index.d.mts +47 -0
- package/dist/components/atoms/Radio/index.d.mts.map +1 -0
- package/dist/components/atoms/Radio/index.mjs +77 -0
- package/dist/components/atoms/Radio/index.mjs.map +1 -0
- package/dist/components/atoms/Select/index.d.mts +31 -0
- package/dist/components/atoms/Select/index.d.mts.map +1 -0
- package/dist/components/atoms/Select/index.mjs +31 -0
- package/dist/components/atoms/Select/index.mjs.map +1 -0
- package/dist/components/atoms/Skeleton/Button/index.d.mts +2 -0
- package/dist/components/atoms/Skeleton/Button/index.mjs +15 -0
- package/dist/components/atoms/Skeleton/Button/index.mjs.map +1 -0
- package/dist/components/atoms/Skeleton/Node/index.d.mts +2 -0
- package/dist/components/atoms/Skeleton/Node/index.mjs +16 -0
- package/dist/components/atoms/Skeleton/Node/index.mjs.map +1 -0
- package/dist/components/atoms/Skeleton/index.d.mts +51 -0
- package/dist/components/atoms/Skeleton/index.d.mts.map +1 -0
- package/dist/components/atoms/Skeleton/index.mjs +46 -0
- package/dist/components/atoms/Skeleton/index.mjs.map +1 -0
- package/dist/components/atoms/Spin/index.d.mts +14 -0
- package/dist/components/atoms/Spin/index.d.mts.map +1 -0
- package/dist/components/atoms/Spin/index.mjs +17 -0
- package/dist/components/atoms/Spin/index.mjs.map +1 -0
- package/dist/components/atoms/Switch/index.d.mts +24 -0
- package/dist/components/atoms/Switch/index.d.mts.map +1 -0
- package/dist/components/atoms/Switch/index.mjs +32 -0
- package/dist/components/atoms/Switch/index.mjs.map +1 -0
- package/dist/components/atoms/Typography/Link/index.d.mts +12 -0
- package/dist/components/atoms/Typography/Link/index.d.mts.map +1 -0
- package/dist/components/atoms/Typography/Link/index.mjs +15 -0
- package/dist/components/atoms/Typography/Link/index.mjs.map +1 -0
- package/dist/components/atoms/Typography/Paragraph/index.d.mts +12 -0
- package/dist/components/atoms/Typography/Paragraph/index.d.mts.map +1 -0
- package/dist/components/atoms/Typography/Paragraph/index.mjs +15 -0
- package/dist/components/atoms/Typography/Paragraph/index.mjs.map +1 -0
- package/dist/components/atoms/Typography/Text/index.d.mts +17 -0
- package/dist/components/atoms/Typography/Text/index.d.mts.map +1 -0
- package/dist/components/atoms/Typography/Text/index.mjs +15 -0
- package/dist/components/atoms/Typography/Text/index.mjs.map +1 -0
- package/dist/components/atoms/Typography/Title/index.d.mts +15 -0
- package/dist/components/atoms/Typography/Title/index.d.mts.map +1 -0
- package/dist/components/atoms/Typography/Title/index.mjs +24 -0
- package/dist/components/atoms/Typography/Title/index.mjs.map +1 -0
- package/dist/components/atoms/index.d.mts +13 -0
- package/dist/components/atoms/index.mjs +15 -0
- package/dist/components/molecules/Card/index.d.mts +22 -0
- package/dist/components/molecules/Card/index.d.mts.map +1 -0
- package/dist/components/molecules/Card/index.mjs +21 -0
- package/dist/components/molecules/Card/index.mjs.map +1 -0
- package/dist/components/molecules/Collapse/index.d.mts +36 -0
- package/dist/components/molecules/Collapse/index.d.mts.map +1 -0
- package/dist/components/molecules/Collapse/index.mjs +53 -0
- package/dist/components/molecules/Collapse/index.mjs.map +1 -0
- package/dist/components/molecules/Dropdown/index.d.mts +23 -0
- package/dist/components/molecules/Dropdown/index.d.mts.map +1 -0
- package/dist/components/molecules/Dropdown/index.mjs +66 -0
- package/dist/components/molecules/Dropdown/index.mjs.map +1 -0
- package/dist/components/molecules/Marquees/Item/index.d.mts +17 -0
- package/dist/components/molecules/Marquees/Item/index.d.mts.map +1 -0
- package/dist/components/molecules/Marquees/Item/index.mjs +103 -0
- package/dist/components/molecules/Marquees/Item/index.mjs.map +1 -0
- package/dist/components/molecules/Marquees/index.d.mts +31 -0
- package/dist/components/molecules/Marquees/index.d.mts.map +1 -0
- package/dist/components/molecules/Marquees/index.mjs +63 -0
- package/dist/components/molecules/Marquees/index.mjs.map +1 -0
- package/dist/components/molecules/Menu/Item/Label/index.mjs +18 -0
- package/dist/components/molecules/Menu/Item/Label/index.mjs.map +1 -0
- package/dist/components/molecules/Menu/Item/index.mjs +122 -0
- package/dist/components/molecules/Menu/Item/index.mjs.map +1 -0
- package/dist/{index-CsjsTuId.d.mts → components/molecules/Reveals/Item/index.d.mts} +4 -41
- package/dist/components/molecules/Reveals/Item/index.d.mts.map +1 -0
- package/dist/{Reveals-Cqo3i2hh.mjs → components/molecules/Reveals/Item/index.mjs} +5 -27
- package/dist/components/molecules/Reveals/Item/index.mjs.map +1 -0
- package/dist/components/molecules/Space/index.d.mts +34 -0
- package/dist/components/molecules/Space/index.d.mts.map +1 -0
- package/dist/components/molecules/Space/index.mjs +41 -0
- package/dist/components/molecules/Space/index.mjs.map +1 -0
- package/dist/components/molecules/index.d.mts +7 -0
- package/dist/components/molecules/index.mjs +9 -0
- package/dist/components/organisms/Drawer/index.d.mts +54 -0
- package/dist/components/organisms/Drawer/index.d.mts.map +1 -0
- package/dist/components/organisms/Drawer/index.mjs +72 -0
- package/dist/components/organisms/Drawer/index.mjs.map +1 -0
- package/dist/components/organisms/List/Item/index.mjs +15 -0
- package/dist/components/organisms/List/Item/index.mjs.map +1 -0
- package/dist/components/organisms/List/index.d.mts +52 -0
- package/dist/components/organisms/List/index.d.mts.map +1 -0
- package/dist/components/organisms/List/index.mjs +77 -0
- package/dist/components/organisms/List/index.mjs.map +1 -0
- package/dist/components/organisms/Modal/index.d.mts +66 -0
- package/dist/components/organisms/Modal/index.d.mts.map +1 -0
- package/dist/components/organisms/Modal/index.mjs +197 -0
- package/dist/components/organisms/Modal/index.mjs.map +1 -0
- package/dist/components/organisms/Swiper/Slide/index.mjs +17 -0
- package/dist/components/organisms/Swiper/Slide/index.mjs.map +1 -0
- package/dist/components/organisms/Swiper/index.d.mts +42 -0
- package/dist/components/organisms/Swiper/index.d.mts.map +1 -0
- package/dist/components/organisms/Swiper/index.mjs +58 -0
- package/dist/components/organisms/Swiper/index.mjs.map +1 -0
- package/dist/components/organisms/index.d.mts +4 -0
- package/dist/components/organisms/index.mjs +6 -0
- package/dist/components/templates/Layout/Content/index.d.mts +1 -0
- package/dist/components/templates/Layout/Content/index.mjs +15 -0
- package/dist/components/templates/Layout/Content/index.mjs.map +1 -0
- package/dist/components/templates/Layout/Footer/index.d.mts +1 -0
- package/dist/components/templates/Layout/Footer/index.mjs +15 -0
- package/dist/components/templates/Layout/Footer/index.mjs.map +1 -0
- package/dist/components/templates/Layout/Header/index.d.mts +7 -0
- package/dist/components/templates/Layout/Header/index.d.mts.map +1 -0
- package/dist/components/templates/Layout/Header/index.mjs +15 -0
- package/dist/components/templates/Layout/Header/index.mjs.map +1 -0
- package/dist/components/templates/Layout/Sider/index.d.mts +1 -0
- package/dist/components/templates/Layout/Sider/index.mjs +15 -0
- package/dist/components/templates/Layout/Sider/index.mjs.map +1 -0
- package/dist/components/templates/Layout/index.d.mts +38 -0
- package/dist/components/templates/Layout/index.d.mts.map +1 -0
- package/dist/components/templates/Layout/index.mjs +23 -0
- package/dist/components/templates/Layout/index.mjs.map +1 -0
- package/dist/components/templates/index.d.mts +1 -0
- package/dist/components/templates/index.mjs +3 -0
- package/dist/core/accordion.d.mts +32 -0
- package/dist/core/accordion.d.mts.map +1 -0
- package/dist/core/accordion.mjs +59 -0
- package/dist/core/accordion.mjs.map +1 -0
- package/dist/core/button.d.mts +26 -0
- package/dist/core/button.d.mts.map +1 -0
- package/dist/core/button.mjs +55 -0
- package/dist/core/button.mjs.map +1 -0
- package/dist/core/checkbox.d.mts +15 -0
- package/dist/core/checkbox.d.mts.map +1 -0
- package/dist/core/checkbox.mjs +34 -0
- package/dist/core/checkbox.mjs.map +1 -0
- package/dist/core/dialog.d.mts +68 -0
- package/dist/core/dialog.d.mts.map +1 -0
- package/dist/core/dialog.mjs +124 -0
- package/dist/core/dialog.mjs.map +1 -0
- package/dist/core/drawer.d.mts +60 -0
- package/dist/core/drawer.d.mts.map +1 -0
- package/dist/core/drawer.mjs +120 -0
- package/dist/core/drawer.mjs.map +1 -0
- package/dist/core/field.d.mts +68 -0
- package/dist/core/field.d.mts.map +1 -0
- package/dist/core/field.mjs +145 -0
- package/dist/core/field.mjs.map +1 -0
- package/dist/core/input.d.mts +15 -0
- package/dist/core/input.d.mts.map +1 -0
- package/dist/core/input.mjs +27 -0
- package/dist/core/input.mjs.map +1 -0
- package/dist/core/label.d.mts +15 -0
- package/dist/core/label.d.mts.map +1 -0
- package/dist/core/label.mjs +24 -0
- package/dist/core/label.mjs.map +1 -0
- package/dist/core/popover.d.mts +38 -0
- package/dist/core/popover.d.mts.map +1 -0
- package/dist/core/popover.mjs +78 -0
- package/dist/core/popover.mjs.map +1 -0
- package/dist/core/progress.d.mts +22 -0
- package/dist/core/progress.d.mts.map +1 -0
- package/dist/core/progress.mjs +29 -0
- package/dist/core/progress.mjs.map +1 -0
- package/dist/core/radio-group.d.mts +19 -0
- package/dist/core/radio-group.d.mts.map +1 -0
- package/dist/core/radio-group.mjs +43 -0
- package/dist/core/radio-group.mjs.map +1 -0
- package/dist/core/select.d.mts +56 -0
- package/dist/core/select.d.mts.map +1 -0
- package/dist/core/select.mjs +144 -0
- package/dist/core/select.mjs.map +1 -0
- package/dist/core/separator.d.mts +17 -0
- package/dist/core/separator.d.mts.map +1 -0
- package/dist/core/separator.mjs +25 -0
- package/dist/core/separator.mjs.map +1 -0
- package/dist/core/skeleton.d.mts +13 -0
- package/dist/core/skeleton.d.mts.map +1 -0
- package/dist/core/skeleton.mjs +17 -0
- package/dist/core/skeleton.mjs.map +1 -0
- package/dist/core/switch.d.mts +22 -0
- package/dist/core/switch.d.mts.map +1 -0
- package/dist/core/switch.mjs +39 -0
- package/dist/core/switch.mjs.map +1 -0
- package/dist/core/textarea.d.mts +14 -0
- package/dist/core/textarea.d.mts.map +1 -0
- package/dist/core/textarea.mjs +25 -0
- package/dist/core/textarea.mjs.map +1 -0
- package/dist/core.d.mts +16 -1
- package/dist/core.mjs +16 -4
- package/dist/enums.d.mts +2 -1
- package/dist/enums.d.mts.map +1 -0
- package/dist/enums.mjs +2 -1
- package/dist/enums.mjs.map +1 -0
- package/dist/index.d.mts +29 -714
- package/dist/index.mjs +31 -5
- package/dist/node_modules/gsap/CSSPlugin.mjs +920 -0
- package/dist/node_modules/gsap/CSSPlugin.mjs.map +1 -0
- package/dist/node_modules/gsap/gsap-core.mjs +2723 -0
- package/dist/node_modules/gsap/gsap-core.mjs.map +1 -0
- package/dist/node_modules/gsap/index.mjs +9 -0
- package/dist/node_modules/gsap/index.mjs.map +1 -0
- package/dist/{output.css → style.css} +3 -196
- package/dist/style.css.map +1 -0
- package/dist/style.mjs +1 -0
- package/dist/utils.d.mts +2 -1
- package/dist/utils.d.mts.map +1 -0
- package/dist/utils.mjs +16 -2
- package/dist/utils.mjs.map +1 -0
- package/package.json +10 -11
- package/dist/Typography-Dznhj8uL.mjs +0 -71
- package/dist/index-BNAJ1QtH.d.mts +0 -75
- package/dist/index-tclrN3ts.d.mts +0 -61
- package/dist/index-y5n1p7t3.d.mts +0 -390
- package/dist/src-B6Kaolt3.mjs +0 -6158
- package/dist/src-BzCZ9O6j.css +0 -211
- package/dist/utils-1s_37TSX.mjs +0 -16
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./Button/index.mjs";
|
|
2
|
+
import "./Node/index.mjs";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/atoms/Skeleton/index.d.ts
|
|
7
|
+
interface Props extends React.ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
active?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
avatar?: boolean;
|
|
11
|
+
size?: 'default' | 'small' | 'large';
|
|
12
|
+
count?: number;
|
|
13
|
+
gap?: number;
|
|
14
|
+
direction?: 'horizontal' | 'vertical';
|
|
15
|
+
width?: string | number | (string | number)[];
|
|
16
|
+
height?: string | number | (string | number)[];
|
|
17
|
+
classNames?: {
|
|
18
|
+
wrapper?: string;
|
|
19
|
+
avatar?: string;
|
|
20
|
+
item?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare const Skeleton: {
|
|
24
|
+
({
|
|
25
|
+
active,
|
|
26
|
+
loading,
|
|
27
|
+
avatar,
|
|
28
|
+
size,
|
|
29
|
+
direction,
|
|
30
|
+
count,
|
|
31
|
+
gap,
|
|
32
|
+
className,
|
|
33
|
+
classNames,
|
|
34
|
+
style,
|
|
35
|
+
width,
|
|
36
|
+
height,
|
|
37
|
+
children,
|
|
38
|
+
...props
|
|
39
|
+
}: Props): string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react_jsx_runtime0.JSX.Element | null | undefined;
|
|
40
|
+
Button: ({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
44
|
+
Node: ({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Skeleton };
|
|
51
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/atoms/Skeleton/index.tsx"],"mappings":";;;;;;UAYiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,MAAA;EACA,OAAA;EACA,MAAA;EACA,IAAA;EACA,KAAA;EACA,GAAA;EACA,SAAA;EACA,KAAA;EACA,MAAA;EACA,UAAA;IACE,OAAA;IACA,MAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAUE,QAAA;EAAA;;;;;;;;;;;;;;;KAeH,KAAA,wCAAK,QAAA,CAAA,KAAA,CAAA,SAAA,IAAA,OAAA,sCAAA,KAAA,CAAA,WAAA,GAAA,KAAA,CAAA,YAAA,mBAAA,KAAA,CAAA,qBAAA,SAAA,QAAA,CAAA,KAAA,CAAA,SAAA,wBAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { cn } from "../../../utils.mjs";
|
|
2
|
+
import { skeleton_exports } from "../../../core/skeleton.mjs";
|
|
3
|
+
import "../../../core.mjs";
|
|
4
|
+
import Button from "./Button/index.mjs";
|
|
5
|
+
import Node from "./Node/index.mjs";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/atoms/Skeleton/index.tsx
|
|
9
|
+
const { Skeleton: Core } = skeleton_exports;
|
|
10
|
+
const getValueAtIndex = (value, index) => {
|
|
11
|
+
return Array.isArray(value) ? value[index] ?? value[0] : value;
|
|
12
|
+
};
|
|
13
|
+
const SIZES = {
|
|
14
|
+
small: "w-48 h-4",
|
|
15
|
+
default: "w-60 h-6",
|
|
16
|
+
large: "w-72 h-8"
|
|
17
|
+
};
|
|
18
|
+
const Skeleton = ({ active = true, loading = true, avatar, size = "default", direction = "vertical", count = 1, gap = 6, className, classNames = {}, style, width, height, children, ...props }) => {
|
|
19
|
+
if (!loading) return children;
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: cn("flex items-center gap-3"),
|
|
22
|
+
children: [avatar && /* @__PURE__ */ jsx(Core, { className: cn("h-12 w-12", "rounded-xl", !active && "animate-none", classNames.avatar) }), /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: cn("flex grow", direction === "vertical" && "flex-col", classNames.wrapper),
|
|
24
|
+
style: { gap },
|
|
25
|
+
children: Array.from({ length: count }).map((_, index) => {
|
|
26
|
+
const itemWidth = getValueAtIndex(width, index);
|
|
27
|
+
const itemHeight = getValueAtIndex(height, index);
|
|
28
|
+
return /* @__PURE__ */ jsx(Core, {
|
|
29
|
+
className: cn("rounded-md", !active && "animate-none", SIZES[size], className, classNames.item),
|
|
30
|
+
style: {
|
|
31
|
+
...style,
|
|
32
|
+
width: itemWidth,
|
|
33
|
+
height: itemHeight
|
|
34
|
+
},
|
|
35
|
+
...props
|
|
36
|
+
}, index);
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
Skeleton.Button = Button;
|
|
42
|
+
Skeleton.Node = Node;
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Skeleton as default };
|
|
46
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["skeleton"],"sources":["../../../../src/components/atoms/Skeleton/index.tsx"],"sourcesContent":["import { skeleton } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nimport Button from './Button';\nimport Node from './Node';\n\nconst { Skeleton: Core } = skeleton;\n\nconst getValueAtIndex = <T,>(value: T | T[], index: number) => {\n return Array.isArray(value) ? (value[index] ?? value[0]) : value;\n};\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n active?: boolean;\n loading?: boolean;\n avatar?: boolean;\n size?: 'default' | 'small' | 'large';\n count?: number;\n gap?: number;\n direction?: 'horizontal' | 'vertical';\n width?: string | number | (string | number)[];\n height?: string | number | (string | number)[];\n classNames?: {\n wrapper?: string;\n avatar?: string;\n item?: string;\n };\n}\n\nconst SIZES = {\n small: 'w-48 h-4',\n default: 'w-60 h-6',\n large: 'w-72 h-8',\n};\n\nconst Skeleton = ({\n active = true,\n loading = true,\n avatar,\n size = 'default',\n direction = 'vertical',\n count = 1,\n gap = 6,\n className,\n classNames = {},\n style,\n width,\n height,\n children,\n ...props\n}: Props) => {\n if (!loading) {\n return children;\n }\n\n return (\n <div\n className={cn(\n 'flex items-center gap-3',\n //\n )}\n >\n {avatar && (\n <Core\n className={cn(\n 'h-12 w-12',\n 'rounded-xl',\n !active && 'animate-none',\n classNames.avatar,\n )}\n />\n )}\n <div\n className={cn(\n 'flex grow',\n direction === 'vertical' && 'flex-col',\n classNames.wrapper,\n )}\n style={{\n gap,\n }}\n >\n {Array.from({ length: count }).map((_, index) => {\n const itemWidth = getValueAtIndex(width, index);\n const itemHeight = getValueAtIndex(height, index);\n\n return (\n <Core\n key={index}\n className={cn(\n 'rounded-md',\n !active && 'animate-none',\n SIZES[size],\n className,\n classNames.item,\n //\n )}\n style={{\n ...style,\n width: itemWidth,\n height: itemHeight,\n }}\n {...props}\n />\n );\n })}\n </div>\n </div>\n );\n};\n\nSkeleton.Button = Button;\nSkeleton.Node = Node;\n\nexport { Button, Node };\n\nexport default Skeleton;\n"],"mappings":";;;;;;;;AAMA,MAAM,EAAE,UAAU,SAASA;AAE3B,MAAM,mBAAuB,OAAgB,UAAkB;AAC7D,QAAO,MAAM,QAAQ,MAAM,GAAI,MAAM,UAAU,MAAM,KAAM;;AAoB7D,MAAM,QAAQ;CACZ,OAAO;CACP,SAAS;CACT,OAAO;CACR;AAED,MAAM,YAAY,EAChB,SAAS,MACT,UAAU,MACV,QACA,OAAO,WACP,YAAY,YACZ,QAAQ,GACR,MAAM,GACN,WACA,aAAa,EAAE,EACf,OACA,OACA,QACA,UACA,GAAG,YACQ;AACX,KAAI,CAAC,QACH,QAAO;AAGT,QACE,qBAAC;EACC,WAAW,GACT,0BAED;aAEA,UACC,oBAAC,QACC,WAAW,GACT,aACA,cACA,CAAC,UAAU,gBACX,WAAW,OACZ,GACD,EAEJ,oBAAC;GACC,WAAW,GACT,aACA,cAAc,cAAc,YAC5B,WAAW,QACZ;GACD,OAAO,EACL,KACD;aAEA,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC,CAAC,KAAK,GAAG,UAAU;IAC/C,MAAM,YAAY,gBAAgB,OAAO,MAAM;IAC/C,MAAM,aAAa,gBAAgB,QAAQ,MAAM;AAEjD,WACE,oBAAC;KAEC,WAAW,GACT,cACA,CAAC,UAAU,gBACX,MAAM,OACN,WACA,WAAW,KAEZ;KACD,OAAO;MACL,GAAG;MACH,OAAO;MACP,QAAQ;MACT;KACD,GAAI;OAdC,MAeL;KAEJ;IACE;GACF;;AAIV,SAAS,SAAS;AAClB,SAAS,OAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Spin/index.d.ts
|
|
4
|
+
interface Props extends React.ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
spinning?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Spin: ({
|
|
8
|
+
spinning,
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: Props) => react_jsx_runtime0.JSX.Element | null;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Spin };
|
|
14
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/atoms/Spin/index.tsx"],"mappings":";;;UAIiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,QAAA;AAAA;AAAA,cAGI,IAAA;EAAQ,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAAmC,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "../../../utils.mjs";
|
|
2
|
+
import { Loader2 } from "lucide-react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/atoms/Spin/index.tsx
|
|
6
|
+
const Spin = ({ spinning, className, ...props }) => {
|
|
7
|
+
if (spinning) return /* @__PURE__ */ jsx("div", {
|
|
8
|
+
className: cn("flex h-full items-center justify-center"),
|
|
9
|
+
...props,
|
|
10
|
+
children: /* @__PURE__ */ jsx(Loader2, { className: cn("animate-spin", className) })
|
|
11
|
+
});
|
|
12
|
+
return null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Spin as default };
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/atoms/Spin/index.tsx"],"sourcesContent":["import { Loader2 } from 'lucide-react';\n\nimport { cn } from '@repo/ui/utils';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {\n spinning?: boolean;\n}\n\nconst Spin = ({ spinning, className, ...props }: Props) => {\n if (spinning) {\n return (\n <div\n className={cn(\n 'flex h-full items-center justify-center',\n //\n )}\n {...props}\n >\n <Loader2\n className={cn(\n 'animate-spin',\n className,\n //\n )}\n />\n </div>\n );\n }\n\n return null;\n};\n\nexport default Spin;\n"],"mappings":";;;;;AAQA,MAAM,QAAQ,EAAE,UAAU,WAAW,GAAG,YAAmB;AACzD,KAAI,SACF,QACE,oBAAC;EACC,WAAW,GACT,0CAED;EACD,GAAI;YAEJ,oBAAC,WACC,WAAW,GACT,gBACA,UAED,GACD;GACE;AAIV,QAAO"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Switch/index.d.ts
|
|
4
|
+
interface Props extends Omit<React.ComponentPropsWithoutRef<'button'>, 'onChange'> {
|
|
5
|
+
classNames?: {
|
|
6
|
+
track?: string;
|
|
7
|
+
handle?: string;
|
|
8
|
+
};
|
|
9
|
+
defaultChecked?: boolean;
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onChange?: (checked: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const Switch: ({
|
|
15
|
+
className,
|
|
16
|
+
classNames,
|
|
17
|
+
defaultChecked,
|
|
18
|
+
checked: _checked,
|
|
19
|
+
onChange: _onChange,
|
|
20
|
+
...props
|
|
21
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Switch };
|
|
24
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/atoms/Switch/index.tsx"],"mappings":";;;UASU,KAAA,SAAc,IAAA,CACtB,KAAA,CAAM,wBAAA;EAGN,UAAA;IACE,KAAA;IACA,MAAA;EAAA;EAEF,cAAA;EACA,OAAA;EACA,QAAA;EACA,QAAA,IAAY,OAAA;AAAA;AAAA,cAGR,MAAA;EAAU,SAAA;EAAA,UAAA;EAAA,cAAA;EAAA,OAAA,EAAA,QAAA;EAAA,QAAA,EAAA,SAAA;EAAA,GAAA;AAAA,GAOb,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../utils.mjs";
|
|
4
|
+
import { switch_exports } from "../../../core/switch.mjs";
|
|
5
|
+
import "../../../core.mjs";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/atoms/Switch/index.tsx
|
|
10
|
+
const { Switch: Core } = switch_exports;
|
|
11
|
+
const Switch = ({ className, classNames, defaultChecked, checked: _checked, onChange: _onChange = () => {}, ...props }) => {
|
|
12
|
+
const [uncontrolledChecked, setUncontrolledChecked] = useState(defaultChecked || false);
|
|
13
|
+
const controlled = _checked !== void 0;
|
|
14
|
+
const checked = controlled ? _checked : uncontrolledChecked;
|
|
15
|
+
const onChange = (next) => {
|
|
16
|
+
if (!controlled) setUncontrolledChecked(next);
|
|
17
|
+
_onChange(next);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ jsx(Core, {
|
|
20
|
+
checked,
|
|
21
|
+
className: cn("h-8.5 w-13", className, classNames?.track),
|
|
22
|
+
handleClassName: cn("h-7 w-7", "data-[state=checked]:translate-x-5", "data-[state=unchecked]:translate-x-[2px]", classNames?.handle),
|
|
23
|
+
onCheckedChange: (checked) => {
|
|
24
|
+
onChange(checked);
|
|
25
|
+
},
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Switch as default };
|
|
32
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["switchComponent"],"sources":["../../../../src/components/atoms/Switch/index.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\n\nimport { switchComponent } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst { Switch: Core } = switchComponent;\n\ninterface Props extends Omit<\n React.ComponentPropsWithoutRef<'button'>,\n 'onChange'\n> {\n classNames?: {\n track?: string;\n handle?: string;\n };\n defaultChecked?: boolean;\n checked?: boolean;\n disabled?: boolean;\n onChange?: (checked: boolean) => void;\n}\n\nconst Switch = ({\n className,\n classNames,\n defaultChecked,\n checked: _checked,\n onChange: _onChange = () => {},\n ...props\n}: Props) => {\n const [uncontrolledChecked, setUncontrolledChecked] = useState<boolean>(\n defaultChecked || false,\n );\n\n const controlled = _checked !== undefined;\n const checked = controlled ? _checked : uncontrolledChecked;\n\n const onChange = (next: boolean) => {\n if (!controlled) {\n setUncontrolledChecked(next);\n }\n _onChange(next);\n };\n\n return (\n <Core\n checked={checked}\n className={cn(\n 'h-8.5 w-13',\n className,\n classNames?.track,\n //\n )}\n handleClassName={cn(\n 'h-7 w-7',\n 'data-[state=checked]:translate-x-5',\n 'data-[state=unchecked]:translate-x-[2px]',\n classNames?.handle,\n )}\n onCheckedChange={checked => {\n onChange(checked);\n }}\n {...props}\n />\n );\n};\n\nexport default Switch;\n"],"mappings":";;;;;;;;;AAOA,MAAM,EAAE,QAAQ,SAASA;AAgBzB,MAAM,UAAU,EACd,WACA,YACA,gBACA,SAAS,UACT,UAAU,kBAAkB,IAC5B,GAAG,YACQ;CACX,MAAM,CAAC,qBAAqB,0BAA0B,SACpD,kBAAkB,MACnB;CAED,MAAM,aAAa,aAAa;CAChC,MAAM,UAAU,aAAa,WAAW;CAExC,MAAM,YAAY,SAAkB;AAClC,MAAI,CAAC,WACH,wBAAuB,KAAK;AAE9B,YAAU,KAAK;;AAGjB,QACE,oBAAC;EACU;EACT,WAAW,GACT,cACA,WACA,YAAY,MAEb;EACD,iBAAiB,GACf,WACA,sCACA,4CACA,YAAY,OACb;EACD,kBAAiB,YAAW;AAC1B,YAAS,QAAQ;;EAEnB,GAAI;GACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Typography/Link/index.d.ts
|
|
4
|
+
interface Props extends React.ComponentPropsWithoutRef<'a'> {}
|
|
5
|
+
declare const Link: ({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Link, Props };
|
|
12
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../src/components/atoms/Typography/Link/index.tsx"],"mappings":";;;UAEiB,KAAA,SAAc,KAAA,CAAM,wBAAA;AAAA,cAE/B,IAAA;EAAQ,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAAmC,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "../../../../utils.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/atoms/Typography/Link/index.tsx
|
|
5
|
+
const Link = ({ children, className, ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("a", {
|
|
7
|
+
className: cn("underline-offset-1 hover:underline", className),
|
|
8
|
+
...props,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Link as default };
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/components/atoms/Typography/Link/index.tsx"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'a'> {}\n\nconst Link = ({ children, className, ...props }: Props) => {\n return (\n <a\n className={cn(\n 'underline-offset-1 hover:underline',\n className,\n //\n )}\n {...props}\n >\n {children}\n </a>\n );\n};\n\nexport default Link;\n"],"mappings":";;;;AAIA,MAAM,QAAQ,EAAE,UAAU,WAAW,GAAG,YAAmB;AACzD,QACE,oBAAC;EACC,WAAW,GACT,sCACA,UAED;EACD,GAAI;EAEH;GACC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Typography/Paragraph/index.d.ts
|
|
4
|
+
interface Props extends React.ComponentPropsWithoutRef<'p'> {}
|
|
5
|
+
declare const Paragraph: ({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Paragraph, Props };
|
|
12
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../src/components/atoms/Typography/Paragraph/index.tsx"],"mappings":";;;UAEiB,KAAA,SAAc,KAAA,CAAM,wBAAA;AAAA,cAE/B,SAAA;EAAa,QAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAAmC,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "../../../../utils.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/atoms/Typography/Paragraph/index.tsx
|
|
5
|
+
const Paragraph = ({ children, className, ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("p", {
|
|
7
|
+
...props,
|
|
8
|
+
className: cn(className),
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Paragraph as default };
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/components/atoms/Typography/Paragraph/index.tsx"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'p'> {}\n\nconst Paragraph = ({ children, className, ...props }: Props) => {\n return (\n <p\n {...props}\n className={cn(\n className,\n //\n )}\n >\n {children}\n </p>\n );\n};\n\nexport default Paragraph;\n"],"mappings":";;;;AAIA,MAAM,aAAa,EAAE,UAAU,WAAW,GAAG,YAAmB;AAC9D,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GACT,UAED;EAEA;GACC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Typography/Text/index.d.ts
|
|
4
|
+
interface Props extends React.ComponentPropsWithoutRef<'span'> {
|
|
5
|
+
underline?: boolean;
|
|
6
|
+
strong?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Text: ({
|
|
9
|
+
children,
|
|
10
|
+
underline,
|
|
11
|
+
strong,
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Props, Text };
|
|
17
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../src/components/atoms/Typography/Text/index.tsx"],"mappings":";;;UAEiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,SAAA;EACA,MAAA;AAAA;AAAA,cAGI,IAAA;EAAQ,QAAA;EAAA,SAAA;EAAA,MAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAAsD,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from "../../../../utils.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/atoms/Typography/Text/index.tsx
|
|
5
|
+
const Text = ({ children, underline, strong, className, ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("span", {
|
|
7
|
+
className: cn("text-nowrap", underline && "underline", strong && "font-bold", className),
|
|
8
|
+
...props,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Text as default };
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/components/atoms/Typography/Text/index.tsx"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'span'> {\n underline?: boolean;\n strong?: boolean;\n}\n\nconst Text = ({ children, underline, strong, className, ...props }: Props) => {\n return (\n <span\n className={cn(\n 'text-nowrap',\n underline && 'underline',\n strong && 'font-bold',\n className,\n )}\n {...props}\n >\n {children}\n </span>\n );\n};\n\nexport default Text;\n"],"mappings":";;;;AAOA,MAAM,QAAQ,EAAE,UAAU,WAAW,QAAQ,WAAW,GAAG,YAAmB;AAC5E,QACE,oBAAC;EACC,WAAW,GACT,eACA,aAAa,aACb,UAAU,aACV,UACD;EACD,GAAI;EAEH;GACI"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Typography/Title/index.d.ts
|
|
4
|
+
interface Props extends React.ComponentPropsWithoutRef<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> {
|
|
5
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
}
|
|
7
|
+
declare const Title: ({
|
|
8
|
+
children,
|
|
9
|
+
level,
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Props, Title };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../../src/components/atoms/Typography/Title/index.tsx"],"mappings":";;;UAEiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EAGnC,KAAA;AAAA;AAAA,cAcI,KAAA;EAAS,QAAA;EAAA,KAAA;EAAA,SAAA;EAAA,GAAA;AAAA,GAA8C,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from "../../../../utils.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/atoms/Typography/Title/index.tsx
|
|
5
|
+
const styles = {
|
|
6
|
+
h1: "text-6xl",
|
|
7
|
+
h2: "text-5xl",
|
|
8
|
+
h3: "text-4xl",
|
|
9
|
+
h4: "text-3xl",
|
|
10
|
+
h5: "text-2xl",
|
|
11
|
+
h6: "text-xl"
|
|
12
|
+
};
|
|
13
|
+
const Title = ({ children, level = 1, className, ...props }) => {
|
|
14
|
+
const Element = level < 1 || level > 6 ? "h1" : `h${level}`;
|
|
15
|
+
return /* @__PURE__ */ jsx(Element, {
|
|
16
|
+
className: cn("leading-snug font-bold", styles[Element], className),
|
|
17
|
+
...props,
|
|
18
|
+
children
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Title as default };
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../src/components/atoms/Typography/Title/index.tsx"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\nexport interface Props extends React.ComponentPropsWithoutRef<\n 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n> {\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\ntype ElementType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nconst styles: Record<string, string> = {\n h1: 'text-6xl',\n h2: 'text-5xl',\n h3: 'text-4xl',\n h4: 'text-3xl',\n h5: 'text-2xl',\n h6: 'text-xl',\n};\n\nconst Title = ({ children, level = 1, className, ...props }: Props) => {\n const Element: ElementType = level < 1 || level > 6 ? 'h1' : `h${level}`;\n\n return (\n <Element\n className={cn('leading-snug font-bold', styles[Element], className)}\n {...props}\n >\n {children}\n </Element>\n );\n};\n\nexport default Title;\n"],"mappings":";;;;AAUA,MAAM,SAAiC;CACrC,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,MAAM,SAAS,EAAE,UAAU,QAAQ,GAAG,WAAW,GAAG,YAAmB;CACrE,MAAM,UAAuB,QAAQ,KAAK,QAAQ,IAAI,OAAO,IAAI;AAEjE,QACE,oBAAC;EACC,WAAW,GAAG,0BAA0B,OAAO,UAAU,UAAU;EACnE,GAAI;EAEH;GACO"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Typography from "../../Typography.mjs";
|
|
2
|
+
import { Button } from "./Button/index.mjs";
|
|
3
|
+
import { Checkbox } from "./Checkbox/index.mjs";
|
|
4
|
+
import { ColorPicker } from "./ColorPicker/index.mjs";
|
|
5
|
+
import { FloatButton } from "./FloatButton/index.mjs";
|
|
6
|
+
import { Input } from "./Input/index.mjs";
|
|
7
|
+
import { Popover } from "./Popover/index.mjs";
|
|
8
|
+
import { Progress } from "./Progress/index.mjs";
|
|
9
|
+
import { Radio } from "./Radio/index.mjs";
|
|
10
|
+
import { Select } from "./Select/index.mjs";
|
|
11
|
+
import { Skeleton } from "./Skeleton/index.mjs";
|
|
12
|
+
import { Spin } from "./Spin/index.mjs";
|
|
13
|
+
import { Switch } from "./Switch/index.mjs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Button from "./Button/index.mjs";
|
|
2
|
+
import Checkbox from "./Checkbox/index.mjs";
|
|
3
|
+
import Typography from "../../Typography.mjs";
|
|
4
|
+
import Popover from "./Popover/index.mjs";
|
|
5
|
+
import ColorPicker from "./ColorPicker/index.mjs";
|
|
6
|
+
import FloatButton from "./FloatButton/index.mjs";
|
|
7
|
+
import Input from "./Input/index.mjs";
|
|
8
|
+
import Progress from "./Progress/index.mjs";
|
|
9
|
+
import Radio from "./Radio/index.mjs";
|
|
10
|
+
import Select from "./Select/index.mjs";
|
|
11
|
+
import Skeleton from "./Skeleton/index.mjs";
|
|
12
|
+
import Spin from "./Spin/index.mjs";
|
|
13
|
+
import Switch from "./Switch/index.mjs";
|
|
14
|
+
|
|
15
|
+
export { };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/molecules/Card/index.d.ts
|
|
4
|
+
interface Props extends Omit<React.ComponentPropsWithRef<'div'>, 'title'> {
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
variant?: 'outlined' | 'borderless';
|
|
7
|
+
classNames?: {
|
|
8
|
+
title?: string;
|
|
9
|
+
body?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const Card: ({
|
|
13
|
+
title,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
classNames,
|
|
17
|
+
variant,
|
|
18
|
+
...props
|
|
19
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Card };
|
|
22
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/Card/index.tsx"],"mappings":";;;UAEU,KAAA,SAAc,IAAA,CAAK,KAAA,CAAM,qBAAA;EACjC,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,OAAA;EACA,UAAA;IACE,KAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIE,IAAA;EAAQ,KAAA;EAAA,QAAA;EAAA,SAAA;EAAA,UAAA;EAAA,OAAA;EAAA,GAAA;AAAA,GAOX,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cn, renderConditional } from "../../../utils.mjs";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/Card/index.tsx
|
|
5
|
+
const Card = ({ title, children, className, classNames, variant = "outlined", ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
7
|
+
className: cn("w-full", "rounded-lg p-4", "bg-white shadow-sm transition-all", variant === "outlined" && "border border-gray-200", className),
|
|
8
|
+
...props,
|
|
9
|
+
children: [renderConditional(title, (v) => /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: cn("mb-4 font-bold", classNames?.title),
|
|
11
|
+
children: v
|
|
12
|
+
})), /* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: cn(classNames?.body),
|
|
14
|
+
children
|
|
15
|
+
})]
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Card as default };
|
|
21
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/molecules/Card/index.tsx"],"sourcesContent":["import { cn, renderConditional } from '@repo/ui/utils';\n\ninterface Props extends Omit<React.ComponentPropsWithRef<'div'>, 'title'> {\n title?: React.ReactNode;\n variant?: 'outlined' | 'borderless';\n classNames?: {\n title?: string;\n body?: string;\n };\n}\n\nconst Card = ({\n title,\n children,\n className,\n classNames,\n variant = 'outlined',\n ...props\n}: Props) => {\n return (\n <div\n className={cn(\n 'w-full',\n 'rounded-lg p-4',\n 'bg-white shadow-sm transition-all',\n variant === 'outlined' && 'border border-gray-200',\n className,\n //\n )}\n {...props}\n >\n {renderConditional(title, v => (\n <div\n className={cn(\n 'mb-4 font-bold',\n classNames?.title,\n //\n )}\n >\n {v}\n </div>\n ))}\n <div\n className={cn(\n classNames?.body,\n //\n )}\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport default Card;\n"],"mappings":";;;;AAWA,MAAM,QAAQ,EACZ,OACA,UACA,WACA,YACA,UAAU,YACV,GAAG,YACQ;AACX,QACE,qBAAC;EACC,WAAW,GACT,UACA,kBACA,qCACA,YAAY,cAAc,0BAC1B,UAED;EACD,GAAI;aAEH,kBAAkB,QAAO,MACxB,oBAAC;GACC,WAAW,GACT,kBACA,YAAY,MAEb;aAEA;IACG,CACN,EACF,oBAAC;GACC,WAAW,GACT,YAAY,KAEb;GAEA;IACG;GACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/Collapse/index.d.ts
|
|
5
|
+
interface Item {
|
|
6
|
+
key: React.Key;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface Props extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
12
|
+
items?: Item[];
|
|
13
|
+
accordion?: boolean;
|
|
14
|
+
expandIcon?: React.ReactNode;
|
|
15
|
+
classNames?: {
|
|
16
|
+
item?: string;
|
|
17
|
+
header?: string;
|
|
18
|
+
body?: string;
|
|
19
|
+
};
|
|
20
|
+
defaultActiveKey?: string[] | number[];
|
|
21
|
+
activeKey?: string[] | number[];
|
|
22
|
+
onChange?: (keys: string[]) => void;
|
|
23
|
+
}
|
|
24
|
+
declare const Collapse: ({
|
|
25
|
+
expandIcon,
|
|
26
|
+
accordion,
|
|
27
|
+
items,
|
|
28
|
+
className,
|
|
29
|
+
classNames,
|
|
30
|
+
defaultActiveKey,
|
|
31
|
+
activeKey: _activeKey,
|
|
32
|
+
onChange: _onChange
|
|
33
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Collapse };
|
|
36
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/Collapse/index.tsx"],"mappings":";;;;UAUU,IAAA;EACR,GAAA,EAAK,KAAA,CAAM,GAAA;EACX,KAAA,EAAO,KAAA,CAAM,SAAA;EACb,QAAA;EACA,QAAA,EAAU,KAAA,CAAM,SAAA;AAAA;AAAA,UAGR,KAAA,SAAc,IAAA,CACtB,KAAA,CAAM,wBAAA;EAGN,KAAA,GAAQ,IAAA;EACR,SAAA;EACA,UAAA,GAAa,KAAA,CAAM,SAAA;EACnB,UAAA;IACE,IAAA;IACA,MAAA;IACA,IAAA;EAAA;EAEF,gBAAA;EACA,SAAA;EACA,QAAA,IAAY,IAAA;AAAA;AAAA,cAGR,QAAA;EAAY,UAAA;EAAA,SAAA;EAAA,KAAA;EAAA,SAAA;EAAA,UAAA;EAAA,gBAAA;EAAA,SAAA,EAAA,UAAA;EAAA,QAAA,EAAA;AAAA,GASf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../utils.mjs";
|
|
4
|
+
import { accordion_exports } from "../../../core/accordion.mjs";
|
|
5
|
+
import "../../../core.mjs";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/molecules/Collapse/index.tsx
|
|
10
|
+
const { Accordion, AccordionItem, AccordionTrigger, AccordionContent } = accordion_exports;
|
|
11
|
+
const Collapse = ({ expandIcon, accordion = false, items = [], className, classNames, defaultActiveKey, activeKey: _activeKey, onChange: _onChange }) => {
|
|
12
|
+
const controlled = _activeKey !== void 0;
|
|
13
|
+
return /* @__PURE__ */ jsx(Accordion, {
|
|
14
|
+
className,
|
|
15
|
+
...accordion ? controlled ? {
|
|
16
|
+
type: "single",
|
|
17
|
+
value: `${_activeKey?.[0] ?? ""}`,
|
|
18
|
+
onValueChange: (value) => {
|
|
19
|
+
_onChange?.(value ? [value] : []);
|
|
20
|
+
}
|
|
21
|
+
} : {
|
|
22
|
+
type: "single",
|
|
23
|
+
defaultValue: `${defaultActiveKey?.[0] ?? ""}`
|
|
24
|
+
} : controlled ? {
|
|
25
|
+
type: "multiple",
|
|
26
|
+
value: _activeKey?.map((key) => `${key}`),
|
|
27
|
+
onValueChange: (values) => {
|
|
28
|
+
_onChange?.(values);
|
|
29
|
+
}
|
|
30
|
+
} : {
|
|
31
|
+
type: "multiple",
|
|
32
|
+
defaultValue: defaultActiveKey?.map((key) => `${key}`)
|
|
33
|
+
},
|
|
34
|
+
children: items.map(({ label, children, disabled }, key) => /* @__PURE__ */ jsxs(AccordionItem, {
|
|
35
|
+
value: `${key}`,
|
|
36
|
+
className: cn("border-none", classNames?.item),
|
|
37
|
+
disabled,
|
|
38
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
39
|
+
className: cn("hover:no-underline", classNames?.header, disabled && "cursor-no-drop opacity-50"),
|
|
40
|
+
expandIcon,
|
|
41
|
+
disabled,
|
|
42
|
+
children: label
|
|
43
|
+
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
44
|
+
className: cn(classNames?.body),
|
|
45
|
+
children
|
|
46
|
+
})]
|
|
47
|
+
}, key))
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Collapse as default };
|
|
53
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["accordion"],"sources":["../../../../src/components/molecules/Collapse/index.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { accordion } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst { Accordion, AccordionItem, AccordionTrigger, AccordionContent } =\n accordion;\n\ninterface Item {\n key: React.Key;\n label: React.ReactNode;\n disabled?: boolean;\n children: React.ReactNode;\n}\n\ninterface Props extends Omit<\n React.ComponentPropsWithoutRef<'div'>,\n 'onChange'\n> {\n items?: Item[];\n accordion?: boolean;\n expandIcon?: React.ReactNode;\n classNames?: {\n item?: string;\n header?: string;\n body?: string;\n };\n defaultActiveKey?: string[] | number[];\n activeKey?: string[] | number[];\n onChange?: (keys: string[]) => void;\n}\n\nconst Collapse = ({\n expandIcon,\n accordion = false,\n items = [],\n className,\n classNames,\n defaultActiveKey,\n activeKey: _activeKey,\n onChange: _onChange,\n}: Props) => {\n const controlled = _activeKey !== undefined;\n\n const accordionProps = accordion\n ? controlled\n ? {\n type: 'single' as const,\n value: `${_activeKey?.[0] ?? ''}`,\n onValueChange: (value: string) => {\n _onChange?.(value ? [value] : []);\n },\n }\n : {\n type: 'single' as const,\n defaultValue: `${defaultActiveKey?.[0] ?? ''}`,\n }\n : controlled\n ? {\n type: 'multiple' as const,\n value: _activeKey?.map(key => `${key}`),\n onValueChange: (values: string[]) => {\n _onChange?.(values);\n },\n }\n : {\n type: 'multiple' as const,\n defaultValue: defaultActiveKey?.map(key => `${key}`),\n };\n\n return (\n <Accordion className={className} {...accordionProps}>\n {items.map(({ label, children, disabled }, key) => (\n <AccordionItem\n key={key}\n value={`${key}`}\n className={cn(\n 'border-none',\n classNames?.item,\n //\n )}\n disabled={disabled}\n >\n <AccordionTrigger\n className={cn(\n 'hover:no-underline',\n classNames?.header,\n disabled && 'cursor-no-drop opacity-50',\n //\n )}\n expandIcon={expandIcon}\n disabled={disabled}\n >\n {label}\n </AccordionTrigger>\n <AccordionContent\n className={cn(\n classNames?.body,\n //\n )}\n >\n {children}\n </AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n );\n};\n\nexport default Collapse;\n"],"mappings":";;;;;;;;;AAOA,MAAM,EAAE,WAAW,eAAe,kBAAkB,qBAClDA;AA0BF,MAAM,YAAY,EAChB,YACA,YAAY,OACZ,QAAQ,EAAE,EACV,WACA,YACA,kBACA,WAAW,YACX,UAAU,gBACC;CACX,MAAM,aAAa,eAAe;AA4BlC,QACE,oBAAC;EAAqB;EAAW,GA3BZ,YACnB,aACE;GACE,MAAM;GACN,OAAO,GAAG,aAAa,MAAM;GAC7B,gBAAgB,UAAkB;AAChC,gBAAY,QAAQ,CAAC,MAAM,GAAG,EAAE,CAAC;;GAEpC,GACD;GACE,MAAM;GACN,cAAc,GAAG,mBAAmB,MAAM;GAC3C,GACH,aACE;GACE,MAAM;GACN,OAAO,YAAY,KAAI,QAAO,GAAG,MAAM;GACvC,gBAAgB,WAAqB;AACnC,gBAAY,OAAO;;GAEtB,GACD;GACE,MAAM;GACN,cAAc,kBAAkB,KAAI,QAAO,GAAG,MAAM;GACrD;YAIF,MAAM,KAAK,EAAE,OAAO,UAAU,YAAY,QACzC,qBAAC;GAEC,OAAO,GAAG;GACV,WAAW,GACT,eACA,YAAY,KAEb;GACS;cAEV,oBAAC;IACC,WAAW,GACT,sBACA,YAAY,QACZ,YAAY,4BAEb;IACW;IACF;cAET;KACgB,EACnB,oBAAC;IACC,WAAW,GACT,YAAY,KAEb;IAEA;KACgB;KA5Bd,IA6BS,CAChB;GACQ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MenuProps } from "../../../Menu.mjs";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/molecules/Dropdown/index.d.ts
|
|
5
|
+
type ChangeEventHandler = (open: boolean) => void;
|
|
6
|
+
interface Props extends React.ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
open?: boolean;
|
|
8
|
+
trigger?: string;
|
|
9
|
+
menu?: MenuProps;
|
|
10
|
+
placement?: string;
|
|
11
|
+
onOpenChange?: ChangeEventHandler;
|
|
12
|
+
}
|
|
13
|
+
declare const Dropdown: ({
|
|
14
|
+
children,
|
|
15
|
+
menu,
|
|
16
|
+
trigger,
|
|
17
|
+
open: _open,
|
|
18
|
+
onOpenChange: _onOpenChange,
|
|
19
|
+
...props
|
|
20
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Dropdown };
|
|
23
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/Dropdown/index.tsx"],"mappings":";;;;KAUK,kBAAA,IAAsB,IAAA;AAAA,UAEjB,KAAA,SAAc,KAAA,CAAM,wBAAA;EAC5B,IAAA;EACA,OAAA;EACA,IAAA,GAAO,SAAA;EACP,SAAA;EACA,YAAA,GAAe,kBAAA;AAAA;AAAA,cAGX,QAAA;EAAY,QAAA;EAAA,IAAA;EAAA,OAAA;EAAA,IAAA,EAAA,KAAA;EAAA,YAAA,EAAA,aAAA;EAAA,GAAA;AAAA,GAOf,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|