@jbpark/ui-kit 2.7.0 → 2.9.0
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 +17 -0
- package/README.md +17 -0
- package/dist/{components/atoms/Button/index.d.mts → Button.d.mts} +4 -4
- package/dist/Button.d.mts.map +1 -0
- package/dist/{components/atoms/Button/index.mjs → Button.mjs} +4 -4
- package/dist/Button.mjs.map +1 -0
- package/dist/{components/molecules/Card/index.d.mts → Card.d.mts} +2 -2
- package/dist/Card.d.mts.map +1 -0
- package/dist/{components/molecules/Card/index.mjs → Card.mjs} +3 -3
- package/dist/Card.mjs.map +1 -0
- package/dist/{components/templates/Layout/index.d.mts → Layout.d.mts} +11 -11
- package/dist/Layout.d.mts.map +1 -0
- package/dist/{components/templates/Layout/index.mjs → Layout.mjs} +6 -6
- package/dist/Layout.mjs.map +1 -0
- package/dist/{components/molecules/Space/index.d.mts → Space.d.mts} +2 -2
- package/dist/Space.d.mts.map +1 -0
- package/dist/{components/molecules/Space/index.mjs → Space.mjs} +3 -3
- package/dist/Space.mjs.map +1 -0
- package/dist/Tag.d.mts +17 -0
- package/dist/Tag.d.mts.map +1 -0
- package/dist/Tag.mjs +29 -0
- package/dist/Tag.mjs.map +1 -0
- package/dist/components/atoms/FloatButton/BackTop/index.d.mts +1 -1
- package/dist/components/atoms/FloatButton/index.d.mts +1 -1
- package/dist/components/atoms/FloatButton/index.mjs +1 -1
- package/dist/components/atoms/Input/Search/index.mjs +1 -1
- package/dist/components/atoms/Radio/Group/index.mjs +1 -1
- package/dist/components/atoms/Skeleton/index.d.mts +1 -1
- package/dist/components/atoms/Skeleton/index.d.mts.map +1 -1
- package/dist/components/atoms/index.d.mts +2 -1
- package/dist/components/atoms/index.mjs +2 -1
- package/dist/components/molecules/index.d.mts +3 -3
- package/dist/components/molecules/index.mjs +2 -2
- package/dist/components/organisms/Drawer/index.mjs +1 -1
- package/dist/components/organisms/List/index.d.mts +1 -1
- package/dist/components/organisms/List/index.d.mts.map +1 -1
- package/dist/components/organisms/Modal/index.mjs +1 -1
- package/dist/components/templates/index.d.mts +1 -1
- package/dist/components/templates/index.mjs +1 -1
- package/dist/core/button.d.mts +1 -1
- package/dist/core/dialog.mjs +1 -1
- package/dist/index.d.mts +6 -5
- package/dist/index.mjs +6 -5
- package/dist/style.css +68 -0
- package/package.json +26 -1
- package/dist/components/atoms/Button/index.d.mts.map +0 -1
- package/dist/components/atoms/Button/index.mjs.map +0 -1
- package/dist/components/molecules/Card/index.d.mts.map +0 -1
- package/dist/components/molecules/Card/index.mjs.map +0 -1
- package/dist/components/molecules/Space/index.d.mts.map +0 -1
- package/dist/components/molecules/Space/index.mjs.map +0 -1
- package/dist/components/templates/Layout/index.d.mts.map +0 -1
- package/dist/components/templates/Layout/index.mjs.map +0 -1
package/README.ko.md
CHANGED
|
@@ -51,6 +51,7 @@ src/
|
|
|
51
51
|
| **Skeleton** | 로딩 스켈레톤 | `Button`, `Node` |
|
|
52
52
|
| **Spin** | 로딩 스피너 | - |
|
|
53
53
|
| **Switch** | 토글 스위치 | - |
|
|
54
|
+
| **Tag** | 알약 모양의 라벨/태그 | - |
|
|
54
55
|
| **Typography** | 텍스트 컴포넌트 | `Link`, `Paragraph`, `Text`, `Title` |
|
|
55
56
|
|
|
56
57
|
## 🔬 Molecules (분자)
|
|
@@ -140,13 +141,29 @@ function App() {
|
|
|
140
141
|
|
|
141
142
|
```tsx
|
|
142
143
|
// Typography 컴포넌트
|
|
144
|
+
// Button 컴포넌트
|
|
145
|
+
import { Button } from '@jbpark/ui-kit/Button';
|
|
146
|
+
// Card 컴포넌트
|
|
147
|
+
import { Card } from '@jbpark/ui-kit/Card';
|
|
148
|
+
// Layout 컴포넌트
|
|
149
|
+
import { Layout } from '@jbpark/ui-kit/Layout';
|
|
143
150
|
// Menu 컴포넌트
|
|
144
151
|
import { Menu } from '@jbpark/ui-kit/Menu';
|
|
145
152
|
// Reveals 컴포넌트
|
|
146
153
|
import { Reveals } from '@jbpark/ui-kit/Reveals';
|
|
154
|
+
// Space 컴포넌트
|
|
155
|
+
import { Space } from '@jbpark/ui-kit/Space';
|
|
156
|
+
// Tag 컴포넌트
|
|
157
|
+
import { Tag } from '@jbpark/ui-kit/Tag';
|
|
147
158
|
import { Typography } from '@jbpark/ui-kit/Typography';
|
|
148
159
|
```
|
|
149
160
|
|
|
161
|
+
> 필요한 컴포넌트만 쓸 거라면 루트 `@jbpark/ui-kit` 대신 개별 import 경로를 쓰는 걸
|
|
162
|
+
> 권장합니다. 루트 진입점은 organisms 전체(Swiper 포함)를 다시 export하는데,
|
|
163
|
+
> `Swiper`가 `swiper`의 CSS를 사이드 이펙트로 불러오기 때문에 Node/SSR
|
|
164
|
+
> 빌드(예: Astro static build)에서 순수 `.css` import를 처리 못 해 빌드가
|
|
165
|
+
> 깨질 수 있습니다.
|
|
166
|
+
|
|
150
167
|
### 유틸리티 및 열거형 import
|
|
151
168
|
|
|
152
169
|
```tsx
|
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ Basic UI building blocks
|
|
|
51
51
|
| **Skeleton** | Loading skeleton | `Button`, `Node` |
|
|
52
52
|
| **Spin** | Loading spinner | - |
|
|
53
53
|
| **Switch** | Toggle switch component | - |
|
|
54
|
+
| **Tag** | Pill-style label/tag | - |
|
|
54
55
|
| **Typography** | Text components | `Link`, `Paragraph`, `Text`, `Title` |
|
|
55
56
|
|
|
56
57
|
## 🔬 Molecules
|
|
@@ -140,13 +141,29 @@ function App() {
|
|
|
140
141
|
|
|
141
142
|
```tsx
|
|
142
143
|
// Typography component
|
|
144
|
+
// Button component
|
|
145
|
+
import { Button } from '@jbpark/ui-kit/Button';
|
|
146
|
+
// Card component
|
|
147
|
+
import { Card } from '@jbpark/ui-kit/Card';
|
|
148
|
+
// Layout component
|
|
149
|
+
import { Layout } from '@jbpark/ui-kit/Layout';
|
|
143
150
|
// Menu component
|
|
144
151
|
import { Menu } from '@jbpark/ui-kit/Menu';
|
|
145
152
|
// Reveals component
|
|
146
153
|
import { Reveals } from '@jbpark/ui-kit/Reveals';
|
|
154
|
+
// Space component
|
|
155
|
+
import { Space } from '@jbpark/ui-kit/Space';
|
|
156
|
+
// Tag component
|
|
157
|
+
import { Tag } from '@jbpark/ui-kit/Tag';
|
|
147
158
|
import { Typography } from '@jbpark/ui-kit/Typography';
|
|
148
159
|
```
|
|
149
160
|
|
|
161
|
+
> Prefer these individual import paths over the root `@jbpark/ui-kit` entry when
|
|
162
|
+
> you don't need every component. The root entry re-exports all organisms,
|
|
163
|
+
> including `Swiper`, which pulls in `swiper`'s CSS as a side effect — this
|
|
164
|
+
> can break Node/SSR builds (e.g. Astro static builds) that don't expect a
|
|
165
|
+
> bare `.css` import.
|
|
166
|
+
|
|
150
167
|
### Import Utilities and Enums
|
|
151
168
|
|
|
152
169
|
```tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Props as Props$1 } from "
|
|
2
|
-
import "
|
|
1
|
+
import { Props as Props$1 } from "./core/button.mjs";
|
|
2
|
+
import "./core.mjs";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/atoms/Button/index.d.ts
|
|
@@ -36,5 +36,5 @@ declare const Button: ({
|
|
|
36
36
|
...props
|
|
37
37
|
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
38
38
|
//#endregion
|
|
39
|
-
export {
|
|
40
|
-
//# sourceMappingURL=
|
|
39
|
+
export { Props, Button as default };
|
|
40
|
+
//# sourceMappingURL=Button.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.mts","names":[],"sources":["../src/components/atoms/Button/index.tsx"],"mappings":";;;;;KAQK,WAAA,GAAc,OAAA;AAAA,KAEd,YAAA;AAAA,UAeY,KAAA,SAAc,IAAA,CAAK,WAAA;EAClC,IAAA,GAAO,KAAA,CAAM,SAAA;EACb,KAAA;EACA,MAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;EACA,OAAA;EACA,KAAA;EACA,KAAA,GAAQ,YAAA;EACR,OAAA;IAAsB,IAAA,EAAM,KAAA,CAAM,SAAA;EAAA;AAAA;AAAA,cAkD9B,MAAA;EAAU,IAAA;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,IAAA;EAAA,KAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,OAAA;EAAA,MAAA;EAAA,QAAA;EAAA,WAAA;EAAA,GAAA;AAAA,GAeb,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { Button as Button$1 } from "
|
|
5
|
-
import "
|
|
3
|
+
import { cn } from "./utils.mjs";
|
|
4
|
+
import { Button as Button$1 } from "./core/button.mjs";
|
|
5
|
+
import "./core.mjs";
|
|
6
6
|
import { LoaderCircle } from "lucide-react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
@@ -66,4 +66,4 @@ const Button = ({ icon, className, type = "default", variant, size = "middle", c
|
|
|
66
66
|
|
|
67
67
|
//#endregion
|
|
68
68
|
export { Button as default };
|
|
69
|
-
//# sourceMappingURL=
|
|
69
|
+
//# sourceMappingURL=Button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.mjs","names":["button.Button"],"sources":["../src/components/atoms/Button/index.tsx"],"sourcesContent":["'use client';\n\nimport { LoaderCircle } from 'lucide-react';\n\nimport { button } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst Core = button.Button;\ntype ButtonProps = button.Props;\n\ntype PresetColors =\n | 'blue'\n | 'purple'\n | 'cyan'\n | 'green'\n | 'magenta'\n | 'pink'\n | 'red'\n | 'orange'\n | 'yellow'\n | 'volcano'\n | 'geekblue'\n | 'lime'\n | 'gold';\n\nexport interface Props extends Omit<ButtonProps, 'size' | 'variant' | 'type'> {\n icon?: React.ReactNode;\n block?: boolean;\n danger?: boolean;\n disabled?: boolean;\n size?: 'small' | 'middle' | 'large';\n type?: 'primary' | 'default' | 'dashed' | 'text' | 'link';\n variant?: 'solid' | 'outlined' | 'dashed' | 'filled' | 'text' | 'link';\n shape?: 'default' | 'circle' | 'round';\n color?: PresetColors | 'default' | 'primary' | 'danger';\n loading?: boolean | { icon: React.ReactNode };\n}\n\nconst variantClasses: Record<string, string> = {\n solid: '',\n outlined: cn(\n 'border border-[color-mix(in_oklch,var(--btn-border),transparent_50%)]',\n 'bg-background text-foreground',\n 'hover:bg-accent',\n ),\n dashed: cn(\n 'border border-dashed border-[color-mix(in_oklch,var(--btn-border),transparent_50%)]',\n 'bg-background text-foreground',\n 'hover:bg-accent',\n ),\n filled: cn('bg-muted text-foreground', 'hover:bg-muted/80'),\n text: cn('bg-transparent text-foreground', 'hover:bg-accent'),\n link: cn(\n 'bg-transparent text-primary',\n 'underline-offset-4 hover:underline',\n 'hover:bg-primary/10',\n ),\n};\n\nconst typeToVariant: Record<string, string> = {\n primary: 'solid',\n default: 'outlined',\n dashed: 'dashed',\n text: 'text',\n link: 'link',\n};\n\nconst sizesClasses: Record<string, string> = {\n small: 'h-6 px-3 text-sm',\n middle: 'h-8 px-4 text-base',\n large: 'h-10 px-5 text-lg',\n};\n\nconst iconClasses: Record<string, string> = {\n small: `size-6 [&_svg:not([class*='size-'])]:size-3`,\n middle: `size-8 [&_svg:not([class*='size-'])]:size-4`,\n large: `size-10 [&_svg:not([class*='size-'])]:size-5`,\n};\n\nconst shapesClasses = {\n default: 'rounded-sm',\n circle: 'rounded-full',\n round: 'rounded-2xl',\n};\n\nconst Button = ({\n icon,\n className,\n type = 'default',\n variant,\n size = 'middle',\n color = 'default',\n shape = 'default',\n block = false,\n disabled,\n loading,\n danger,\n children,\n onMouseDown,\n ...props\n}: Props) => {\n const iconOnly = icon && !children;\n const computedColor = danger ? 'danger' : color;\n const colored = computedColor && computedColor !== 'default';\n const resolvedVariant = variant ?? typeToVariant[type] ?? 'solid';\n\n const displayIcon = loading ? (\n typeof loading === 'object' ? (\n loading.icon\n ) : (\n <LoaderCircle className=\"animate-spin\" />\n )\n ) : (\n icon\n );\n\n return (\n <Core\n disabled={disabled}\n variant=\"default\"\n data-color={computedColor}\n className={cn(\n 'inline-flex items-center justify-center gap-x-2',\n 'rounded-lg',\n 'cursor-pointer',\n 'h-auto py-0',\n 'transition-all',\n variantClasses[resolvedVariant],\n sizesClasses[size || 'medium'],\n iconOnly && ['p-0', iconClasses[size || 'medium']],\n shapesClasses[shape || 'default'],\n block && 'w-full',\n colored &&\n (resolvedVariant === 'solid'\n ? [\n 'bg-(--btn-bg)',\n 'hover:bg-(--btn-bg-hover)',\n 'active:bg-(--btn-bg-active)',\n 'text-(--btn-fg)',\n 'border-(--btn-border)',\n ]\n : [\n 'text-(--btn-bg)',\n 'border-[color-mix(in_oklch,var(--btn-border),transparent_50%)]',\n //\n ]),\n className,\n //\n )}\n onMouseDown={e => {\n e.preventDefault();\n onMouseDown?.(e);\n }}\n {...props}\n >\n {displayIcon}\n {children}\n </Core>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;;;;;AAOA,MAAM,OAAOA;AA+Bb,MAAM,iBAAyC;CAC7C,OAAO;CACP,UAAU,GACR,yEACA,iCACA,kBACD;CACD,QAAQ,GACN,uFACA,iCACA,kBACD;CACD,QAAQ,GAAG,4BAA4B,oBAAoB;CAC3D,MAAM,GAAG,kCAAkC,kBAAkB;CAC7D,MAAM,GACJ,+BACA,sCACA,sBACD;CACF;AAED,MAAM,gBAAwC;CAC5C,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACN,MAAM;CACP;AAED,MAAM,eAAuC;CAC3C,OAAO;CACP,QAAQ;CACR,OAAO;CACR;AAED,MAAM,cAAsC;CAC1C,OAAO;CACP,QAAQ;CACR,OAAO;CACR;AAED,MAAM,gBAAgB;CACpB,SAAS;CACT,QAAQ;CACR,OAAO;CACR;AAED,MAAM,UAAU,EACd,MACA,WACA,OAAO,WACP,SACA,OAAO,UACP,QAAQ,WACR,QAAQ,WACR,QAAQ,OACR,UACA,SACA,QACA,UACA,aACA,GAAG,YACQ;CACX,MAAM,WAAW,QAAQ,CAAC;CAC1B,MAAM,gBAAgB,SAAS,WAAW;CAC1C,MAAM,UAAU,iBAAiB,kBAAkB;CACnD,MAAM,kBAAkB,WAAW,cAAc,SAAS;CAE1D,MAAM,cAAc,UAClB,OAAO,YAAY,WACjB,QAAQ,OAER,oBAAC,gBAAa,WAAU,iBAAiB,GAG3C;AAGF,QACE,qBAAC;EACW;EACV,SAAQ;EACR,cAAY;EACZ,WAAW,GACT,mDACA,cACA,kBACA,eACA,kBACA,eAAe,kBACf,aAAa,QAAQ,WACrB,YAAY,CAAC,OAAO,YAAY,QAAQ,UAAU,EAClD,cAAc,SAAS,YACvB,SAAS,UACT,YACG,oBAAoB,UACjB;GACE;GACA;GACA;GACA;GACA;GACD,GACD,CACE,mBACA,iEAED,GACP,UAED;EACD,cAAa,MAAK;AAChB,KAAE,gBAAgB;AAClB,iBAAc,EAAE;;EAElB,GAAI;aAEH,aACA;GACI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.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"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { cn, renderConditional } from "
|
|
1
|
+
import { cn, renderConditional } from "./utils.mjs";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/molecules/Card/index.tsx
|
|
5
5
|
const Card = ({ title, children, className, classNames, variant = "outlined", ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
7
|
-
className: cn("w-full", "rounded-lg p-4", "bg-
|
|
7
|
+
className: cn("w-full", "rounded-lg p-4", "bg-card text-card-foreground shadow-sm transition-all", variant === "outlined" && "border-border border", className),
|
|
8
8
|
...props,
|
|
9
9
|
children: [renderConditional(title, (v) => /* @__PURE__ */ jsx("div", {
|
|
10
10
|
className: cn("mb-4 font-bold", classNames?.title),
|
|
@@ -18,4 +18,4 @@ const Card = ({ title, children, className, classNames, variant = "outlined", ..
|
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
export { Card as default };
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=Card.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.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-card text-card-foreground shadow-sm transition-all',\n variant === 'outlined' && 'border-border border',\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,yDACA,YAAY,cAAc,wBAC1B,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"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Props
|
|
2
|
-
import { Props as Props$
|
|
3
|
-
import { Props as Props$
|
|
4
|
-
import { Props as Props$4 } from "./Sider/index.mjs";
|
|
1
|
+
import { Props } from "./components/templates/Layout/Content/index.mjs";
|
|
2
|
+
import { Props as Props$1 } from "./components/templates/Layout/Footer/index.mjs";
|
|
3
|
+
import { Props as Props$2 } from "./components/templates/Layout/Header/index.mjs";
|
|
4
|
+
import { Props as Props$4 } from "./components/templates/Layout/Sider/index.mjs";
|
|
5
5
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/templates/Layout/index.d.ts
|
|
8
|
-
interface Props extends React.ComponentPropsWithoutRef<'div'> {}
|
|
8
|
+
interface Props$3 extends React.ComponentPropsWithoutRef<'div'> {}
|
|
9
9
|
declare const Layout: {
|
|
10
10
|
({
|
|
11
11
|
children,
|
|
12
12
|
className,
|
|
13
13
|
...props
|
|
14
|
-
}: Props): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
}: Props$3): react_jsx_runtime0.JSX.Element;
|
|
15
15
|
Content: ({
|
|
16
16
|
children,
|
|
17
17
|
className,
|
|
18
18
|
...props
|
|
19
|
-
}: Props
|
|
19
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
20
20
|
Footer: ({
|
|
21
21
|
children,
|
|
22
22
|
className,
|
|
23
23
|
...props
|
|
24
|
-
}: Props$
|
|
24
|
+
}: Props$1) => react_jsx_runtime0.JSX.Element;
|
|
25
25
|
Header: ({
|
|
26
26
|
children,
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: Props$
|
|
29
|
+
}: Props$2) => react_jsx_runtime0.JSX.Element;
|
|
30
30
|
Sider: ({
|
|
31
31
|
children,
|
|
32
32
|
className,
|
|
@@ -44,5 +44,5 @@ declare const Layout: {
|
|
|
44
44
|
}: Props$4) => react_jsx_runtime0.JSX.Element;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
47
|
-
export { Layout };
|
|
48
|
-
//# sourceMappingURL=
|
|
47
|
+
export { type Props as ContentProps, type Props$1 as FooterProps, type Props$2 as HeaderProps, Props$3 as Props, type Props$4 as SiderProps, Layout as default };
|
|
48
|
+
//# sourceMappingURL=Layout.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Layout.d.mts","names":[],"sources":["../src/components/templates/Layout/index.tsx"],"mappings":";;;;;;;UAciB,OAAA,SAAc,KAAA,CAAM,wBAAA;AAAA,cAO/B,MAAA;EAAA;;;;KAA6C,OAAA,GAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { cn } from "
|
|
2
|
-
import Content from "./Content/index.mjs";
|
|
3
|
-
import Footer from "./Footer/index.mjs";
|
|
4
|
-
import Header from "./Header/index.mjs";
|
|
5
|
-
import Sider from "./Sider/index.mjs";
|
|
1
|
+
import { cn } from "./utils.mjs";
|
|
2
|
+
import Content from "./components/templates/Layout/Content/index.mjs";
|
|
3
|
+
import Footer from "./components/templates/Layout/Footer/index.mjs";
|
|
4
|
+
import Header from "./components/templates/Layout/Header/index.mjs";
|
|
5
|
+
import Sider from "./components/templates/Layout/Sider/index.mjs";
|
|
6
6
|
import { Children, isValidElement } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
|
|
@@ -22,4 +22,4 @@ Layout.Sider = Sider;
|
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
24
|
export { Layout as default };
|
|
25
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=Layout.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Layout.mjs","names":[],"sources":["../src/components/templates/Layout/index.tsx"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Content from './Content';\nimport Footer from './Footer';\nimport Header from './Header';\nimport Sider from './Sider';\n\nexport type { Props as ContentProps } from './Content';\nexport type { Props as FooterProps } from './Footer';\nexport type { Props as HeaderProps } from './Header';\nexport type { Props as SiderProps } from './Sider';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst hasSiderChild = (children: React.ReactNode) =>\n Children.toArray(children).some(\n child => isValidElement(child) && child.type === Sider,\n );\n\nconst Layout = ({ children, className, ...props }: Props) => {\n const isRow = hasSiderChild(children);\n\n return (\n <div\n className={cn(\n 'flex min-h-0 w-full flex-1',\n isRow ? 'flex-row' : 'flex-col',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nLayout.Content = Content;\nLayout.Footer = Footer;\nLayout.Header = Header;\nLayout.Sider = Sider;\n\nexport default Layout;\n"],"mappings":";;;;;;;;;AAgBA,MAAM,iBAAiB,aACrB,SAAS,QAAQ,SAAS,CAAC,MACzB,UAAS,eAAe,MAAM,IAAI,MAAM,SAAS,MAClD;AAEH,MAAM,UAAU,EAAE,UAAU,WAAW,GAAG,YAAmB;AAG3D,QACE,oBAAC;EACC,WAAW,GACT,8BALQ,cAAc,SAAS,GAMvB,aAAa,YACrB,UACD;EACD,GAAI;EAEH;GACG;;AAIV,OAAO,UAAU;AACjB,OAAO,SAAS;AAChB,OAAO,SAAS;AAChB,OAAO,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Space.d.mts","names":[],"sources":["../src/components/molecules/Space/index.tsx"],"mappings":";;;UAMU,KAAA,SAAc,KAAA,CAAM,qBAAA;EAC5B,OAAA;EACA,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,WAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,IAAA;IACE,IAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAiBE,KAAA;EAAS,OAAA;EAAA,MAAA;EAAA,QAAA;EAAA,IAAA;EAAA,WAAA;EAAA,KAAA;EAAA,IAAA;EAAA,KAAA;EAAA,SAAA;EAAA,IAAA;EAAA,MAAA;EAAA,KAAA;EAAA,GAAA;AAAA,GAcZ,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "
|
|
2
|
-
import Skeleton from "
|
|
1
|
+
import { cn } from "./utils.mjs";
|
|
2
|
+
import Skeleton from "./components/atoms/Skeleton/index.mjs";
|
|
3
3
|
import { Children } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -38,4 +38,4 @@ const Space = ({ loading, loader, children, size = "middle", orientation = "hori
|
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
export { Space as default };
|
|
41
|
-
//# sourceMappingURL=
|
|
41
|
+
//# sourceMappingURL=Space.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Space.mjs","names":[],"sources":["../src/components/molecules/Space/index.tsx"],"sourcesContent":["import { Children } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Skeleton from '../../atoms/Skeleton';\n\ninterface Props extends React.ComponentPropsWithRef<'div'> {\n loading?: boolean;\n loader?: React.ReactNode;\n orientation?: 'horizontal' | 'vertical';\n size?: 'small' | 'middle' | 'large' | number | number[];\n align?: 'start' | 'end' | 'center' | 'baseline';\n wrap?: boolean;\n split?: React.ReactNode;\n grid?: {\n rows?: number;\n cols?: number;\n };\n}\n\nconst sizes: Record<string, number[]> = {\n small: [4, 4],\n middle: [8, 8],\n large: [16, 16],\n};\n\nconst aligns: Record<string, string> = {\n start: 'items-start text-start',\n end: 'items-end text-end',\n center: 'items-center text-center',\n baseline: 'items-baseline text-baseline',\n};\n\nconst Space = ({\n loading,\n loader,\n children,\n size = 'middle',\n orientation = 'horizontal',\n align = 'center',\n wrap = false,\n split,\n className,\n grid,\n hidden,\n style,\n ...props\n}: Props) => {\n const [x, y] =\n typeof size === 'string'\n ? sizes[size] || [0, 0]\n : Array.isArray(size)\n ? size\n : [size, size];\n const count = Children.count(children);\n\n if (loading) {\n return <div className={cn(className)}>{loader || <Skeleton />}</div>;\n }\n\n return (\n <div\n className={cn(\n 'flex flex-nowrap',\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap && 'flex-wrap',\n aligns[align],\n grid && 'grid',\n hidden && 'hidden',\n className,\n )}\n style={{\n columnGap: x,\n rowGap: y,\n gridTemplateRows: grid?.rows\n ? `repeat(${grid.rows}, minmax(0, 1fr))`\n : undefined,\n gridTemplateColumns: grid?.cols\n ? `repeat(${grid.cols}, minmax(0, 1fr))`\n : undefined,\n ...style,\n }}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <>\n {child}\n {split && i < count - 1 && split}\n </>\n ))}\n </div>\n );\n};\n\nexport default Space;\n"],"mappings":";;;;;;AAoBA,MAAM,QAAkC;CACtC,OAAO,CAAC,GAAG,EAAE;CACb,QAAQ,CAAC,GAAG,EAAE;CACd,OAAO,CAAC,IAAI,GAAG;CAChB;AAED,MAAM,SAAiC;CACrC,OAAO;CACP,KAAK;CACL,QAAQ;CACR,UAAU;CACX;AAED,MAAM,SAAS,EACb,SACA,QACA,UACA,OAAO,UACP,cAAc,cACd,QAAQ,UACR,OAAO,OACP,OACA,WACA,MACA,QACA,OACA,GAAG,YACQ;CACX,MAAM,CAAC,GAAG,KACR,OAAO,SAAS,WACZ,MAAM,SAAS,CAAC,GAAG,EAAE,GACrB,MAAM,QAAQ,KAAK,GACjB,OACA,CAAC,MAAM,KAAK;CACpB,MAAM,QAAQ,SAAS,MAAM,SAAS;AAEtC,KAAI,QACF,QAAO,oBAAC;EAAI,WAAW,GAAG,UAAU;YAAG,UAAU,oBAAC,aAAW;GAAO;AAGtE,QACE,oBAAC;EACC,WAAW,GACT,oBACA,gBAAgB,eAAe,aAAa,YAC5C,QAAQ,aACR,OAAO,QACP,QAAQ,QACR,UAAU,UACV,UACD;EACD,OAAO;GACL,WAAW;GACX,QAAQ;GACR,kBAAkB,MAAM,OACpB,UAAU,KAAK,KAAK,qBACpB;GACJ,qBAAqB,MAAM,OACvB,UAAU,KAAK,KAAK,qBACpB;GACJ,GAAG;GACJ;EACD,GAAI;YAEH,SAAS,IAAI,WAAW,OAAO,MAC9B,8CACG,OACA,SAAS,IAAI,QAAQ,KAAK,SAC1B,CACH;GACE"}
|
package/dist/Tag.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/atoms/Tag/index.d.ts
|
|
4
|
+
interface Props extends React.ComponentPropsWithoutRef<'span'> {
|
|
5
|
+
variant?: 'default' | 'outlined';
|
|
6
|
+
color?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
7
|
+
}
|
|
8
|
+
declare const Tag: ({
|
|
9
|
+
className,
|
|
10
|
+
variant,
|
|
11
|
+
color,
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Props, Tag as default };
|
|
17
|
+
//# sourceMappingURL=Tag.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.mts","names":[],"sources":["../src/components/atoms/Tag/index.tsx"],"mappings":";;;UAEiB,KAAA,SAAc,KAAA,CAAM,wBAAA;EACnC,OAAA;EACA,KAAA;AAAA;AAAA,cAmBI,GAAA;EAAO,SAAA;EAAA,OAAA;EAAA,KAAA;EAAA,QAAA;EAAA,GAAA;AAAA,GAMV,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/Tag.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from "./utils.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/atoms/Tag/index.tsx
|
|
5
|
+
const fillColorClasses = {
|
|
6
|
+
default: "bg-muted text-muted-foreground",
|
|
7
|
+
primary: "bg-primary/10 text-primary",
|
|
8
|
+
success: "bg-green-500/10 text-green-600 dark:text-green-400",
|
|
9
|
+
warning: "bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",
|
|
10
|
+
danger: "bg-destructive/10 text-destructive"
|
|
11
|
+
};
|
|
12
|
+
const outlinedColorClasses = {
|
|
13
|
+
default: "border-border text-foreground",
|
|
14
|
+
primary: "border-primary text-primary",
|
|
15
|
+
success: "border-green-500 text-green-600 dark:text-green-400",
|
|
16
|
+
warning: "border-yellow-500 text-yellow-600 dark:text-yellow-400",
|
|
17
|
+
danger: "border-destructive text-destructive"
|
|
18
|
+
};
|
|
19
|
+
const Tag = ({ className, variant = "default", color = "default", children, ...props }) => {
|
|
20
|
+
return /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: cn("inline-flex items-center", "rounded-full px-2.5 py-1", "text-xs font-medium", variant === "default" && fillColorClasses[color], variant === "outlined" && ["border", outlinedColorClasses[color]], className),
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Tag as default };
|
|
29
|
+
//# sourceMappingURL=Tag.mjs.map
|
package/dist/Tag.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.mjs","names":[],"sources":["../src/components/atoms/Tag/index.tsx"],"sourcesContent":["import { cn } from '@repo/ui/utils';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'span'> {\n variant?: 'default' | 'outlined';\n color?: 'default' | 'primary' | 'success' | 'warning' | 'danger';\n}\n\nconst fillColorClasses: Record<string, string> = {\n default: 'bg-muted text-muted-foreground',\n primary: 'bg-primary/10 text-primary',\n success: 'bg-green-500/10 text-green-600 dark:text-green-400',\n warning: 'bg-yellow-500/10 text-yellow-600 dark:text-yellow-400',\n danger: 'bg-destructive/10 text-destructive',\n};\n\nconst outlinedColorClasses: Record<string, string> = {\n default: 'border-border text-foreground',\n primary: 'border-primary text-primary',\n success: 'border-green-500 text-green-600 dark:text-green-400',\n warning: 'border-yellow-500 text-yellow-600 dark:text-yellow-400',\n danger: 'border-destructive text-destructive',\n};\n\nconst Tag = ({\n className,\n variant = 'default',\n color = 'default',\n children,\n ...props\n}: Props) => {\n return (\n <span\n className={cn(\n 'inline-flex items-center',\n 'rounded-full px-2.5 py-1',\n 'text-xs font-medium',\n variant === 'default' && fillColorClasses[color],\n variant === 'outlined' && ['border', outlinedColorClasses[color]],\n className,\n //\n )}\n {...props}\n >\n {children}\n </span>\n );\n};\n\nexport default Tag;\n"],"mappings":";;;;AAOA,MAAM,mBAA2C;CAC/C,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACT;AAED,MAAM,uBAA+C;CACnD,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACT;AAED,MAAM,OAAO,EACX,WACA,UAAU,WACV,QAAQ,WACR,UACA,GAAG,YACQ;AACX,QACE,oBAAC;EACC,WAAW,GACT,4BACA,4BACA,uBACA,YAAY,aAAa,iBAAiB,QAC1C,YAAY,cAAc,CAAC,UAAU,qBAAqB,OAAO,EACjE,UAED;EACD,GAAI;EAEH;GACI"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { cn } from "../../../../utils.mjs";
|
|
4
4
|
import { input_exports } from "../../../../core/input.mjs";
|
|
5
5
|
import "../../../../core.mjs";
|
|
6
|
-
import Button from "
|
|
6
|
+
import Button from "../../../../Button.mjs";
|
|
7
7
|
import { CircleX, Search } from "lucide-react";
|
|
8
8
|
import { useRef } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -36,7 +36,7 @@ declare const Skeleton: {
|
|
|
36
36
|
height,
|
|
37
37
|
children,
|
|
38
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> |
|
|
39
|
+
}: Props): string | number | bigint | boolean | react_jsx_runtime0.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null | undefined;
|
|
40
40
|
Button: ({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
@@ -1 +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
|
|
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,kBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import Button from "../../Button.mjs";
|
|
2
|
+
import Tag from "../../Tag.mjs";
|
|
1
3
|
import Typography from "../../Typography.mjs";
|
|
2
|
-
import { Button } from "./Button/index.mjs";
|
|
3
4
|
import { Checkbox } from "./Checkbox/index.mjs";
|
|
4
5
|
import { ColorPicker } from "./ColorPicker/index.mjs";
|
|
5
6
|
import { FloatButton } from "./FloatButton/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Button from "
|
|
1
|
+
import Button from "../../Button.mjs";
|
|
2
2
|
import Checkbox from "./Checkbox/index.mjs";
|
|
3
3
|
import Typography from "../../Typography.mjs";
|
|
4
4
|
import Popover from "./Popover/index.mjs";
|
|
@@ -11,5 +11,6 @@ import Select from "./Select/index.mjs";
|
|
|
11
11
|
import Skeleton from "./Skeleton/index.mjs";
|
|
12
12
|
import Spin from "./Spin/index.mjs";
|
|
13
13
|
import Switch from "./Switch/index.mjs";
|
|
14
|
+
import Tag from "../../Tag.mjs";
|
|
14
15
|
|
|
15
16
|
export { };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import Card from "../../Card.mjs";
|
|
1
2
|
import Menu from "../../Menu.mjs";
|
|
2
3
|
import Reveals from "../../Reveals.mjs";
|
|
3
|
-
import
|
|
4
|
+
import Space from "../../Space.mjs";
|
|
4
5
|
import { Collapse } from "./Collapse/index.mjs";
|
|
5
6
|
import { Dropdown } from "./Dropdown/index.mjs";
|
|
6
7
|
import { Marquees } from "./Marquees/index.mjs";
|
|
7
|
-
import { Splitter } from "./Splitter/index.mjs";
|
|
8
|
-
import { Space } from "./Space/index.mjs";
|
|
8
|
+
import { Splitter } from "./Splitter/index.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Card from "
|
|
1
|
+
import Card from "../../Card.mjs";
|
|
2
2
|
import Collapse from "./Collapse/index.mjs";
|
|
3
3
|
import Menu from "../../Menu.mjs";
|
|
4
4
|
import Dropdown from "./Dropdown/index.mjs";
|
|
5
5
|
import Marquees from "./Marquees/index.mjs";
|
|
6
6
|
import Reveals from "../../Reveals.mjs";
|
|
7
7
|
import Splitter from "./Splitter/index.mjs";
|
|
8
|
-
import Space from "
|
|
8
|
+
import Space from "../../Space.mjs";
|
|
9
9
|
|
|
10
10
|
export { };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { cn, renderConditional } from "../../../utils.mjs";
|
|
4
4
|
import { drawer_exports } from "../../../core/drawer.mjs";
|
|
5
5
|
import "../../../core.mjs";
|
|
6
|
-
import Button from "
|
|
6
|
+
import Button from "../../../Button.mjs";
|
|
7
7
|
import { X } from "lucide-react";
|
|
8
8
|
import { useEffect } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -40,7 +40,7 @@ declare const List: {
|
|
|
40
40
|
classNames,
|
|
41
41
|
renderItem,
|
|
42
42
|
...props
|
|
43
|
-
}: Props<T>): string | number | bigint | true | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined
|
|
43
|
+
}: Props<T>): string | number | bigint | true | react_jsx_runtime0.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined>;
|
|
44
44
|
Item: ({
|
|
45
45
|
children,
|
|
46
46
|
className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/organisms/List/index.tsx"],"mappings":";;;;;;UAWU,KAAA,YAAiB,IAAA,CACzB,KAAA,CAAM,wBAAA;EAGN,OAAA;EACA,WAAA,GAAc,KAAA,CAAM,cAAA,QAAsB,QAAA;EAC1C,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,UAAA;IACE,KAAA;IACA,MAAA;IACA,IAAA;EAAA;EAEF,MAAA;IACE,OAAA;IACA,OAAA;IACA,MAAA,GAAS,KAAA,CAAM,SAAA;IACf,OAAA,GAAU,wBAAA;IACV,IAAA;EAAA;EAEF,IAAA,GAAO,CAAA;EACP,UAAA,IAAc,IAAA,EAAM,CAAA,EAAG,KAAA,aAAkB,KAAA,CAAM,SAAA;AAAA;AAAA,cAG3C,IAAA;EAAA;IAAS,OAAA;IAAA,WAAA;IAAA,MAAA;IAAA,MAAA;IAAA,KAAA;IAAA,KAAA;IAAA,MAAA;IAAA,IAAA;IAAA,SAAA;IAAA,UAAA;IAAA,UAAA;IAAA,GAAA;EAAA,GAaZ,KAAA,CAAM,CAAA,sCAAE,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
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/organisms/List/index.tsx"],"mappings":";;;;;;UAWU,KAAA,YAAiB,IAAA,CACzB,KAAA,CAAM,wBAAA;EAGN,OAAA;EACA,WAAA,GAAc,KAAA,CAAM,cAAA,QAAsB,QAAA;EAC1C,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,UAAA;IACE,KAAA;IACA,MAAA;IACA,IAAA;EAAA;EAEF,MAAA;IACE,OAAA;IACA,OAAA;IACA,MAAA,GAAS,KAAA,CAAM,SAAA;IACf,OAAA,GAAU,wBAAA;IACV,IAAA;EAAA;EAEF,IAAA,GAAO,CAAA;EACP,UAAA,IAAc,IAAA,EAAM,CAAA,EAAG,KAAA,aAAkB,KAAA,CAAM,SAAA;AAAA;AAAA,cAG3C,IAAA;EAAA;IAAS,OAAA;IAAA,WAAA;IAAA,MAAA;IAAA,MAAA;IAAA,KAAA;IAAA,KAAA;IAAA,MAAA;IAAA,IAAA;IAAA,SAAA;IAAA,UAAA;IAAA,UAAA;IAAA,GAAA;EAAA,GAaZ,KAAA,CAAM,CAAA,sCAAE,kBAAA,CAAA,GAAA,CAAA,OAAA,GAAA,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"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { cn } from "../../../utils.mjs";
|
|
4
4
|
import { dialog_exports } from "../../../core/dialog.mjs";
|
|
5
5
|
import "../../../core.mjs";
|
|
6
|
-
import Button from "
|
|
6
|
+
import Button from "../../../Button.mjs";
|
|
7
7
|
import "../../../index.mjs";
|
|
8
8
|
import { Check, CircleQuestionMark, Info, OctagonAlert, OctagonX } from "lucide-react";
|
|
9
9
|
import React, { useEffect, useState } from "react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Layout from "../../Layout.mjs";
|
package/dist/core/button.d.mts
CHANGED
|
@@ -9,7 +9,7 @@ declare namespace button_d_exports {
|
|
|
9
9
|
}
|
|
10
10
|
declare const buttonVariants: (props?: ({
|
|
11
11
|
variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
12
|
-
size?: "default" | "
|
|
12
|
+
size?: "default" | "icon" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
13
13
|
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
14
14
|
type Props = React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
15
15
|
asChild?: boolean;
|
package/dist/core/dialog.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
4
4
|
import { cn } from "../utils.mjs";
|
|
5
|
-
import Button from "../
|
|
5
|
+
import Button from "../Button.mjs";
|
|
6
6
|
import "../index.mjs";
|
|
7
7
|
import { XIcon } from "lucide-react";
|
|
8
8
|
import "react";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import Button from "./Button.mjs";
|
|
2
|
+
import Tag from "./Tag.mjs";
|
|
1
3
|
import Typography from "./Typography.mjs";
|
|
4
|
+
import Card from "./Card.mjs";
|
|
2
5
|
import Menu from "./Menu.mjs";
|
|
3
6
|
import Reveals from "./Reveals.mjs";
|
|
4
|
-
import
|
|
7
|
+
import Space from "./Space.mjs";
|
|
8
|
+
import Layout from "./Layout.mjs";
|
|
5
9
|
import { Checkbox } from "./components/atoms/Checkbox/index.mjs";
|
|
6
10
|
import { ColorPicker } from "./components/atoms/ColorPicker/index.mjs";
|
|
7
11
|
import { FloatButton } from "./components/atoms/FloatButton/index.mjs";
|
|
@@ -14,22 +18,19 @@ import { Skeleton } from "./components/atoms/Skeleton/index.mjs";
|
|
|
14
18
|
import { Spin } from "./components/atoms/Spin/index.mjs";
|
|
15
19
|
import { Switch } from "./components/atoms/Switch/index.mjs";
|
|
16
20
|
import "./components/atoms/index.mjs";
|
|
17
|
-
import { Card } from "./components/molecules/Card/index.mjs";
|
|
18
21
|
import { Collapse } from "./components/molecules/Collapse/index.mjs";
|
|
19
22
|
import { Dropdown } from "./components/molecules/Dropdown/index.mjs";
|
|
20
23
|
import { Marquees } from "./components/molecules/Marquees/index.mjs";
|
|
21
24
|
import { Splitter } from "./components/molecules/Splitter/index.mjs";
|
|
22
|
-
import { Space } from "./components/molecules/Space/index.mjs";
|
|
23
25
|
import "./components/molecules/index.mjs";
|
|
24
26
|
import { Drawer, Props as Props$1 } from "./components/organisms/Drawer/index.mjs";
|
|
25
27
|
import { List } from "./components/organisms/List/index.mjs";
|
|
26
28
|
import { Modal } from "./components/organisms/Modal/index.mjs";
|
|
27
29
|
import { Swiper } from "./components/organisms/Swiper/index.mjs";
|
|
28
30
|
import "./components/organisms/index.mjs";
|
|
29
|
-
import { Layout } from "./components/templates/Layout/index.mjs";
|
|
30
31
|
import "./components/templates/index.mjs";
|
|
31
32
|
import { ThemeConfig, ThemeToken } from "./providers/Config/types.mjs";
|
|
32
33
|
import { useConfig } from "./providers/Config/context.mjs";
|
|
33
34
|
import { Config, Props } from "./providers/Config/index.mjs";
|
|
34
35
|
import "./providers/index.mjs";
|
|
35
|
-
export { Button, Card, Checkbox, Collapse, ColorPicker, Config, Props as ConfigProps, Drawer, Props$1 as DrawerProps, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, ThemeConfig, ThemeToken, Typography, useConfig };
|
|
36
|
+
export { Button, Card, Checkbox, Collapse, ColorPicker, Config, Props as ConfigProps, Drawer, Props$1 as DrawerProps, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, Tag, ThemeConfig, ThemeToken, Typography, useConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.mjs";
|
|
2
|
-
import Button from "./
|
|
2
|
+
import Button from "./Button.mjs";
|
|
3
3
|
import Checkbox from "./components/atoms/Checkbox/index.mjs";
|
|
4
4
|
import Typography from "./Typography.mjs";
|
|
5
5
|
import Popover from "./components/atoms/Popover/index.mjs";
|
|
@@ -12,25 +12,26 @@ import Select from "./components/atoms/Select/index.mjs";
|
|
|
12
12
|
import Skeleton from "./components/atoms/Skeleton/index.mjs";
|
|
13
13
|
import Spin from "./components/atoms/Spin/index.mjs";
|
|
14
14
|
import Switch from "./components/atoms/Switch/index.mjs";
|
|
15
|
+
import Tag from "./Tag.mjs";
|
|
15
16
|
import "./components/atoms/index.mjs";
|
|
16
|
-
import Card from "./
|
|
17
|
+
import Card from "./Card.mjs";
|
|
17
18
|
import Collapse from "./components/molecules/Collapse/index.mjs";
|
|
18
19
|
import Menu from "./Menu.mjs";
|
|
19
20
|
import Dropdown from "./components/molecules/Dropdown/index.mjs";
|
|
20
21
|
import Marquees from "./components/molecules/Marquees/index.mjs";
|
|
21
22
|
import Reveals from "./Reveals.mjs";
|
|
22
23
|
import Splitter from "./components/molecules/Splitter/index.mjs";
|
|
23
|
-
import Space from "./
|
|
24
|
+
import Space from "./Space.mjs";
|
|
24
25
|
import "./components/molecules/index.mjs";
|
|
25
26
|
import Drawer from "./components/organisms/Drawer/index.mjs";
|
|
26
27
|
import List from "./components/organisms/List/index.mjs";
|
|
27
28
|
import Modal from "./components/organisms/Modal/index.mjs";
|
|
28
29
|
import Swiper from "./components/organisms/Swiper/index.mjs";
|
|
29
30
|
import "./components/organisms/index.mjs";
|
|
30
|
-
import Layout from "./
|
|
31
|
+
import Layout from "./Layout.mjs";
|
|
31
32
|
import "./components/templates/index.mjs";
|
|
32
33
|
import { useConfig } from "./providers/Config/context.mjs";
|
|
33
34
|
import Config from "./providers/Config/index.mjs";
|
|
34
35
|
import "./providers/index.mjs";
|
|
35
36
|
|
|
36
|
-
export { Button, Card, Checkbox, Collapse, ColorPicker, Config, Drawer, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, Typography, useConfig };
|
|
37
|
+
export { Button, Card, Checkbox, Collapse, ColorPicker, Config, Drawer, Dropdown, FloatButton, Input, Layout, List, Marquees, Menu, Modal, Popover, Progress, Radio, Reveals, Select, Skeleton, Space, Spin, Splitter, Swiper, Switch, Tag, Typography, useConfig };
|
package/dist/style.css
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
:root, :host {
|
|
6
6
|
--color-red-400: oklch(70.4% 0.191 22.216);
|
|
7
7
|
--color-yellow-400: oklch(85.2% 0.199 91.936);
|
|
8
|
+
--color-yellow-500: oklch(79.5% 0.184 86.047);
|
|
9
|
+
--color-yellow-600: oklch(68.1% 0.162 75.834);
|
|
8
10
|
--color-green-400: oklch(79.2% 0.209 151.711);
|
|
11
|
+
--color-green-500: oklch(72.3% 0.219 149.579);
|
|
12
|
+
--color-green-600: oklch(62.7% 0.194 149.214);
|
|
9
13
|
--color-blue-400: oklch(70.7% 0.165 254.624);
|
|
10
14
|
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
11
15
|
--color-black: #000;
|
|
@@ -227,6 +231,9 @@
|
|
|
227
231
|
.relative {
|
|
228
232
|
position: relative;
|
|
229
233
|
}
|
|
234
|
+
.static {
|
|
235
|
+
position: static;
|
|
236
|
+
}
|
|
230
237
|
.sticky {
|
|
231
238
|
position: sticky;
|
|
232
239
|
}
|
|
@@ -871,6 +878,9 @@
|
|
|
871
878
|
border-color: color-mix(in oklch,var(--btn-border),transparent 50%);
|
|
872
879
|
}
|
|
873
880
|
}
|
|
881
|
+
.border-border {
|
|
882
|
+
border-color: var(--border);
|
|
883
|
+
}
|
|
874
884
|
.border-border\/60 {
|
|
875
885
|
border-color: var(--border);
|
|
876
886
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -880,9 +890,15 @@
|
|
|
880
890
|
.border-current {
|
|
881
891
|
border-color: currentcolor;
|
|
882
892
|
}
|
|
893
|
+
.border-destructive {
|
|
894
|
+
border-color: var(--destructive);
|
|
895
|
+
}
|
|
883
896
|
.border-gray-200 {
|
|
884
897
|
border-color: var(--color-gray-200);
|
|
885
898
|
}
|
|
899
|
+
.border-green-500 {
|
|
900
|
+
border-color: var(--color-green-500);
|
|
901
|
+
}
|
|
886
902
|
.border-input {
|
|
887
903
|
border-color: var(--input);
|
|
888
904
|
}
|
|
@@ -892,6 +908,9 @@
|
|
|
892
908
|
.border-transparent {
|
|
893
909
|
border-color: transparent;
|
|
894
910
|
}
|
|
911
|
+
.border-yellow-500 {
|
|
912
|
+
border-color: var(--color-yellow-500);
|
|
913
|
+
}
|
|
895
914
|
.bg-\(--btn-bg\) {
|
|
896
915
|
background-color: var(--btn-bg);
|
|
897
916
|
}
|
|
@@ -922,9 +941,24 @@
|
|
|
922
941
|
.bg-border {
|
|
923
942
|
background-color: var(--border);
|
|
924
943
|
}
|
|
944
|
+
.bg-card {
|
|
945
|
+
background-color: var(--card);
|
|
946
|
+
}
|
|
925
947
|
.bg-destructive {
|
|
926
948
|
background-color: var(--destructive);
|
|
927
949
|
}
|
|
950
|
+
.bg-destructive\/10 {
|
|
951
|
+
background-color: var(--destructive);
|
|
952
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
953
|
+
background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
.bg-green-500\/10 {
|
|
957
|
+
background-color: color-mix(in srgb, oklch(72.3% 0.219 149.579) 10%, transparent);
|
|
958
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
959
|
+
background-color: color-mix(in oklab, var(--color-green-500) 10%, transparent);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
928
962
|
.bg-inherit {
|
|
929
963
|
background-color: inherit;
|
|
930
964
|
}
|
|
@@ -937,6 +971,12 @@
|
|
|
937
971
|
.bg-primary {
|
|
938
972
|
background-color: var(--primary);
|
|
939
973
|
}
|
|
974
|
+
.bg-primary\/10 {
|
|
975
|
+
background-color: var(--primary);
|
|
976
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
977
|
+
background-color: color-mix(in oklab, var(--primary) 10%, transparent);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
940
980
|
.bg-primary\/20 {
|
|
941
981
|
background-color: var(--primary);
|
|
942
982
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -952,6 +992,12 @@
|
|
|
952
992
|
.bg-white {
|
|
953
993
|
background-color: var(--color-white);
|
|
954
994
|
}
|
|
995
|
+
.bg-yellow-500\/10 {
|
|
996
|
+
background-color: color-mix(in srgb, oklch(79.5% 0.184 86.047) 10%, transparent);
|
|
997
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
998
|
+
background-color: color-mix(in oklab, var(--color-yellow-500) 10%, transparent);
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
955
1001
|
.fill-primary {
|
|
956
1002
|
fill: var(--primary);
|
|
957
1003
|
}
|
|
@@ -982,6 +1028,9 @@
|
|
|
982
1028
|
.px-2 {
|
|
983
1029
|
padding-inline: calc(var(--spacing) * 2);
|
|
984
1030
|
}
|
|
1031
|
+
.px-2\.5 {
|
|
1032
|
+
padding-inline: calc(var(--spacing) * 2.5);
|
|
1033
|
+
}
|
|
985
1034
|
.px-3 {
|
|
986
1035
|
padding-inline: calc(var(--spacing) * 3);
|
|
987
1036
|
}
|
|
@@ -1141,6 +1190,9 @@
|
|
|
1141
1190
|
.text-blue-400 {
|
|
1142
1191
|
color: var(--color-blue-400);
|
|
1143
1192
|
}
|
|
1193
|
+
.text-card-foreground {
|
|
1194
|
+
color: var(--card-foreground);
|
|
1195
|
+
}
|
|
1144
1196
|
.text-current {
|
|
1145
1197
|
color: currentcolor;
|
|
1146
1198
|
}
|
|
@@ -1153,6 +1205,9 @@
|
|
|
1153
1205
|
.text-green-400 {
|
|
1154
1206
|
color: var(--color-green-400);
|
|
1155
1207
|
}
|
|
1208
|
+
.text-green-600 {
|
|
1209
|
+
color: var(--color-green-600);
|
|
1210
|
+
}
|
|
1156
1211
|
.text-muted-foreground {
|
|
1157
1212
|
color: var(--muted-foreground);
|
|
1158
1213
|
}
|
|
@@ -1177,6 +1232,9 @@
|
|
|
1177
1232
|
.text-yellow-400 {
|
|
1178
1233
|
color: var(--color-yellow-400);
|
|
1179
1234
|
}
|
|
1235
|
+
.text-yellow-600 {
|
|
1236
|
+
color: var(--color-yellow-600);
|
|
1237
|
+
}
|
|
1180
1238
|
.underline {
|
|
1181
1239
|
text-decoration-line: underline;
|
|
1182
1240
|
}
|
|
@@ -2581,6 +2639,16 @@
|
|
|
2581
2639
|
}
|
|
2582
2640
|
}
|
|
2583
2641
|
}
|
|
2642
|
+
.dark\:text-green-400 {
|
|
2643
|
+
&:is(.dark *) {
|
|
2644
|
+
color: var(--color-green-400);
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
.dark\:text-yellow-400 {
|
|
2648
|
+
&:is(.dark *) {
|
|
2649
|
+
color: var(--color-yellow-400);
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2584
2652
|
.dark\:hover\:bg-accent\/50 {
|
|
2585
2653
|
&:is(.dark *) {
|
|
2586
2654
|
&:hover {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbpark/ui-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Modern React UI component library built with TypeScript, Tailwind CSS, and Radix UI. Featuring atoms, molecules, organisms and layout templates for building beautiful interfaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -46,6 +46,26 @@
|
|
|
46
46
|
"import": "./dist/Typography.mjs",
|
|
47
47
|
"default": "./dist/Typography.mjs"
|
|
48
48
|
},
|
|
49
|
+
"./Button": {
|
|
50
|
+
"types": "./dist/Button.d.mts",
|
|
51
|
+
"import": "./dist/Button.mjs",
|
|
52
|
+
"default": "./dist/Button.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./Tag": {
|
|
55
|
+
"types": "./dist/Tag.d.mts",
|
|
56
|
+
"import": "./dist/Tag.mjs",
|
|
57
|
+
"default": "./dist/Tag.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./Card": {
|
|
60
|
+
"types": "./dist/Card.d.mts",
|
|
61
|
+
"import": "./dist/Card.mjs",
|
|
62
|
+
"default": "./dist/Card.mjs"
|
|
63
|
+
},
|
|
64
|
+
"./Space": {
|
|
65
|
+
"types": "./dist/Space.d.mts",
|
|
66
|
+
"import": "./dist/Space.mjs",
|
|
67
|
+
"default": "./dist/Space.mjs"
|
|
68
|
+
},
|
|
49
69
|
"./Menu": {
|
|
50
70
|
"types": "./dist/Menu.d.mts",
|
|
51
71
|
"import": "./dist/Menu.mjs",
|
|
@@ -56,6 +76,11 @@
|
|
|
56
76
|
"import": "./dist/Reveals.mjs",
|
|
57
77
|
"default": "./dist/Reveals.mjs"
|
|
58
78
|
},
|
|
79
|
+
"./Layout": {
|
|
80
|
+
"types": "./dist/Layout.d.mts",
|
|
81
|
+
"import": "./dist/Layout.mjs",
|
|
82
|
+
"default": "./dist/Layout.mjs"
|
|
83
|
+
},
|
|
59
84
|
"./utils": {
|
|
60
85
|
"types": "./dist/utils.d.mts",
|
|
61
86
|
"import": "./dist/utils.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/atoms/Button/index.tsx"],"mappings":";;;;;KAQK,WAAA,GAAc,OAAA;AAAA,KAEd,YAAA;AAAA,UAeY,KAAA,SAAc,IAAA,CAAK,WAAA;EAClC,IAAA,GAAO,KAAA,CAAM,SAAA;EACb,KAAA;EACA,MAAA;EACA,QAAA;EACA,IAAA;EACA,IAAA;EACA,OAAA;EACA,KAAA;EACA,KAAA,GAAQ,YAAA;EACR,OAAA;IAAsB,IAAA,EAAM,KAAA,CAAM,SAAA;EAAA;AAAA;AAAA,cAkD9B,MAAA;EAAU,IAAA;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,IAAA;EAAA,KAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,OAAA;EAAA,MAAA;EAAA,QAAA;EAAA,WAAA;EAAA,GAAA;AAAA,GAeb,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["button.Button"],"sources":["../../../../src/components/atoms/Button/index.tsx"],"sourcesContent":["'use client';\n\nimport { LoaderCircle } from 'lucide-react';\n\nimport { button } from '@repo/ui/core';\nimport { cn } from '@repo/ui/utils';\n\nconst Core = button.Button;\ntype ButtonProps = button.Props;\n\ntype PresetColors =\n | 'blue'\n | 'purple'\n | 'cyan'\n | 'green'\n | 'magenta'\n | 'pink'\n | 'red'\n | 'orange'\n | 'yellow'\n | 'volcano'\n | 'geekblue'\n | 'lime'\n | 'gold';\n\nexport interface Props extends Omit<ButtonProps, 'size' | 'variant' | 'type'> {\n icon?: React.ReactNode;\n block?: boolean;\n danger?: boolean;\n disabled?: boolean;\n size?: 'small' | 'middle' | 'large';\n type?: 'primary' | 'default' | 'dashed' | 'text' | 'link';\n variant?: 'solid' | 'outlined' | 'dashed' | 'filled' | 'text' | 'link';\n shape?: 'default' | 'circle' | 'round';\n color?: PresetColors | 'default' | 'primary' | 'danger';\n loading?: boolean | { icon: React.ReactNode };\n}\n\nconst variantClasses: Record<string, string> = {\n solid: '',\n outlined: cn(\n 'border border-[color-mix(in_oklch,var(--btn-border),transparent_50%)]',\n 'bg-background text-foreground',\n 'hover:bg-accent',\n ),\n dashed: cn(\n 'border border-dashed border-[color-mix(in_oklch,var(--btn-border),transparent_50%)]',\n 'bg-background text-foreground',\n 'hover:bg-accent',\n ),\n filled: cn('bg-muted text-foreground', 'hover:bg-muted/80'),\n text: cn('bg-transparent text-foreground', 'hover:bg-accent'),\n link: cn(\n 'bg-transparent text-primary',\n 'underline-offset-4 hover:underline',\n 'hover:bg-primary/10',\n ),\n};\n\nconst typeToVariant: Record<string, string> = {\n primary: 'solid',\n default: 'outlined',\n dashed: 'dashed',\n text: 'text',\n link: 'link',\n};\n\nconst sizesClasses: Record<string, string> = {\n small: 'h-6 px-3 text-sm',\n middle: 'h-8 px-4 text-base',\n large: 'h-10 px-5 text-lg',\n};\n\nconst iconClasses: Record<string, string> = {\n small: `size-6 [&_svg:not([class*='size-'])]:size-3`,\n middle: `size-8 [&_svg:not([class*='size-'])]:size-4`,\n large: `size-10 [&_svg:not([class*='size-'])]:size-5`,\n};\n\nconst shapesClasses = {\n default: 'rounded-sm',\n circle: 'rounded-full',\n round: 'rounded-2xl',\n};\n\nconst Button = ({\n icon,\n className,\n type = 'default',\n variant,\n size = 'middle',\n color = 'default',\n shape = 'default',\n block = false,\n disabled,\n loading,\n danger,\n children,\n onMouseDown,\n ...props\n}: Props) => {\n const iconOnly = icon && !children;\n const computedColor = danger ? 'danger' : color;\n const colored = computedColor && computedColor !== 'default';\n const resolvedVariant = variant ?? typeToVariant[type] ?? 'solid';\n\n const displayIcon = loading ? (\n typeof loading === 'object' ? (\n loading.icon\n ) : (\n <LoaderCircle className=\"animate-spin\" />\n )\n ) : (\n icon\n );\n\n return (\n <Core\n disabled={disabled}\n variant=\"default\"\n data-color={computedColor}\n className={cn(\n 'inline-flex items-center justify-center gap-x-2',\n 'rounded-lg',\n 'cursor-pointer',\n 'h-auto py-0',\n 'transition-all',\n variantClasses[resolvedVariant],\n sizesClasses[size || 'medium'],\n iconOnly && ['p-0', iconClasses[size || 'medium']],\n shapesClasses[shape || 'default'],\n block && 'w-full',\n colored &&\n (resolvedVariant === 'solid'\n ? [\n 'bg-(--btn-bg)',\n 'hover:bg-(--btn-bg-hover)',\n 'active:bg-(--btn-bg-active)',\n 'text-(--btn-fg)',\n 'border-(--btn-border)',\n ]\n : [\n 'text-(--btn-bg)',\n 'border-[color-mix(in_oklch,var(--btn-border),transparent_50%)]',\n //\n ]),\n className,\n //\n )}\n onMouseDown={e => {\n e.preventDefault();\n onMouseDown?.(e);\n }}\n {...props}\n >\n {displayIcon}\n {children}\n </Core>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;;;;;AAOA,MAAM,OAAOA;AA+Bb,MAAM,iBAAyC;CAC7C,OAAO;CACP,UAAU,GACR,yEACA,iCACA,kBACD;CACD,QAAQ,GACN,uFACA,iCACA,kBACD;CACD,QAAQ,GAAG,4BAA4B,oBAAoB;CAC3D,MAAM,GAAG,kCAAkC,kBAAkB;CAC7D,MAAM,GACJ,+BACA,sCACA,sBACD;CACF;AAED,MAAM,gBAAwC;CAC5C,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACN,MAAM;CACP;AAED,MAAM,eAAuC;CAC3C,OAAO;CACP,QAAQ;CACR,OAAO;CACR;AAED,MAAM,cAAsC;CAC1C,OAAO;CACP,QAAQ;CACR,OAAO;CACR;AAED,MAAM,gBAAgB;CACpB,SAAS;CACT,QAAQ;CACR,OAAO;CACR;AAED,MAAM,UAAU,EACd,MACA,WACA,OAAO,WACP,SACA,OAAO,UACP,QAAQ,WACR,QAAQ,WACR,QAAQ,OACR,UACA,SACA,QACA,UACA,aACA,GAAG,YACQ;CACX,MAAM,WAAW,QAAQ,CAAC;CAC1B,MAAM,gBAAgB,SAAS,WAAW;CAC1C,MAAM,UAAU,iBAAiB,kBAAkB;CACnD,MAAM,kBAAkB,WAAW,cAAc,SAAS;CAE1D,MAAM,cAAc,UAClB,OAAO,YAAY,WACjB,QAAQ,OAER,oBAAC,gBAAa,WAAU,iBAAiB,GAG3C;AAGF,QACE,qBAAC;EACW;EACV,SAAQ;EACR,cAAY;EACZ,WAAW,GACT,mDACA,cACA,kBACA,eACA,kBACA,eAAe,kBACf,aAAa,QAAQ,WACrB,YAAY,CAAC,OAAO,YAAY,QAAQ,UAAU,EAClD,cAAc,SAAS,YACvB,SAAS,UACT,YACG,oBAAoB,UACjB;GACE;GACA;GACA;GACA;GACA;GACD,GACD,CACE,mBACA,iEAED,GACP,UAED;EACD,cAAa,MAAK;AAChB,KAAE,gBAAgB;AAClB,iBAAc,EAAE;;EAElB,GAAI;aAEH,aACA;GACI"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/molecules/Space/index.tsx"],"mappings":";;;UAMU,KAAA,SAAc,KAAA,CAAM,qBAAA;EAC5B,OAAA;EACA,MAAA,GAAS,KAAA,CAAM,SAAA;EACf,WAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA,GAAQ,KAAA,CAAM,SAAA;EACd,IAAA;IACE,IAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAiBE,KAAA;EAAS,OAAA;EAAA,MAAA;EAAA,QAAA;EAAA,IAAA;EAAA,WAAA;EAAA,KAAA;EAAA,IAAA;EAAA,KAAA;EAAA,SAAA;EAAA,IAAA;EAAA,MAAA;EAAA,KAAA;EAAA,GAAA;AAAA,GAcZ,KAAA,KAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/molecules/Space/index.tsx"],"sourcesContent":["import { Children } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Skeleton from '../../atoms/Skeleton';\n\ninterface Props extends React.ComponentPropsWithRef<'div'> {\n loading?: boolean;\n loader?: React.ReactNode;\n orientation?: 'horizontal' | 'vertical';\n size?: 'small' | 'middle' | 'large' | number | number[];\n align?: 'start' | 'end' | 'center' | 'baseline';\n wrap?: boolean;\n split?: React.ReactNode;\n grid?: {\n rows?: number;\n cols?: number;\n };\n}\n\nconst sizes: Record<string, number[]> = {\n small: [4, 4],\n middle: [8, 8],\n large: [16, 16],\n};\n\nconst aligns: Record<string, string> = {\n start: 'items-start text-start',\n end: 'items-end text-end',\n center: 'items-center text-center',\n baseline: 'items-baseline text-baseline',\n};\n\nconst Space = ({\n loading,\n loader,\n children,\n size = 'middle',\n orientation = 'horizontal',\n align = 'center',\n wrap = false,\n split,\n className,\n grid,\n hidden,\n style,\n ...props\n}: Props) => {\n const [x, y] =\n typeof size === 'string'\n ? sizes[size] || [0, 0]\n : Array.isArray(size)\n ? size\n : [size, size];\n const count = Children.count(children);\n\n if (loading) {\n return <div className={cn(className)}>{loader || <Skeleton />}</div>;\n }\n\n return (\n <div\n className={cn(\n 'flex flex-nowrap',\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap && 'flex-wrap',\n aligns[align],\n grid && 'grid',\n hidden && 'hidden',\n className,\n )}\n style={{\n columnGap: x,\n rowGap: y,\n gridTemplateRows: grid?.rows\n ? `repeat(${grid.rows}, minmax(0, 1fr))`\n : undefined,\n gridTemplateColumns: grid?.cols\n ? `repeat(${grid.cols}, minmax(0, 1fr))`\n : undefined,\n ...style,\n }}\n {...props}\n >\n {Children.map(children, (child, i) => (\n <>\n {child}\n {split && i < count - 1 && split}\n </>\n ))}\n </div>\n );\n};\n\nexport default Space;\n"],"mappings":";;;;;;AAoBA,MAAM,QAAkC;CACtC,OAAO,CAAC,GAAG,EAAE;CACb,QAAQ,CAAC,GAAG,EAAE;CACd,OAAO,CAAC,IAAI,GAAG;CAChB;AAED,MAAM,SAAiC;CACrC,OAAO;CACP,KAAK;CACL,QAAQ;CACR,UAAU;CACX;AAED,MAAM,SAAS,EACb,SACA,QACA,UACA,OAAO,UACP,cAAc,cACd,QAAQ,UACR,OAAO,OACP,OACA,WACA,MACA,QACA,OACA,GAAG,YACQ;CACX,MAAM,CAAC,GAAG,KACR,OAAO,SAAS,WACZ,MAAM,SAAS,CAAC,GAAG,EAAE,GACrB,MAAM,QAAQ,KAAK,GACjB,OACA,CAAC,MAAM,KAAK;CACpB,MAAM,QAAQ,SAAS,MAAM,SAAS;AAEtC,KAAI,QACF,QAAO,oBAAC;EAAI,WAAW,GAAG,UAAU;YAAG,UAAU,oBAAC,aAAW;GAAO;AAGtE,QACE,oBAAC;EACC,WAAW,GACT,oBACA,gBAAgB,eAAe,aAAa,YAC5C,QAAQ,aACR,OAAO,QACP,QAAQ,QACR,UAAU,UACV,UACD;EACD,OAAO;GACL,WAAW;GACX,QAAQ;GACR,kBAAkB,MAAM,OACpB,UAAU,KAAK,KAAK,qBACpB;GACJ,qBAAqB,MAAM,OACvB,UAAU,KAAK,KAAK,qBACpB;GACJ,GAAG;GACJ;EACD,GAAI;YAEH,SAAS,IAAI,WAAW,OAAO,MAC9B,8CACG,OACA,SAAS,IAAI,QAAQ,KAAK,SAC1B,CACH;GACE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../../src/components/templates/Layout/index.tsx"],"mappings":";;;;;;;UAciB,KAAA,SAAc,KAAA,CAAM,wBAAA;AAAA,cAO/B,MAAA;EAAA;;;;KAA6C,KAAA,GAAK,kBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/templates/Layout/index.tsx"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nimport { cn } from '@repo/ui/utils';\n\nimport Content from './Content';\nimport Footer from './Footer';\nimport Header from './Header';\nimport Sider from './Sider';\n\nexport type { Props as ContentProps } from './Content';\nexport type { Props as FooterProps } from './Footer';\nexport type { Props as HeaderProps } from './Header';\nexport type { Props as SiderProps } from './Sider';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst hasSiderChild = (children: React.ReactNode) =>\n Children.toArray(children).some(\n child => isValidElement(child) && child.type === Sider,\n );\n\nconst Layout = ({ children, className, ...props }: Props) => {\n const isRow = hasSiderChild(children);\n\n return (\n <div\n className={cn(\n 'flex min-h-0 w-full flex-1',\n isRow ? 'flex-row' : 'flex-col',\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n};\n\nLayout.Content = Content;\nLayout.Footer = Footer;\nLayout.Header = Header;\nLayout.Sider = Sider;\n\nexport default Layout;\n"],"mappings":";;;;;;;;;AAgBA,MAAM,iBAAiB,aACrB,SAAS,QAAQ,SAAS,CAAC,MACzB,UAAS,eAAe,MAAM,IAAI,MAAM,SAAS,MAClD;AAEH,MAAM,UAAU,EAAE,UAAU,WAAW,GAAG,YAAmB;AAG3D,QACE,oBAAC;EACC,WAAW,GACT,8BALQ,cAAc,SAAS,GAMvB,aAAa,YACrB,UACD;EACD,GAAI;EAEH;GACG;;AAIV,OAAO,UAAU;AACjB,OAAO,SAAS;AAChB,OAAO,SAAS;AAChB,OAAO,QAAQ"}
|