@lotte-innovate/ui-component-test 0.1.65 → 0.1.67
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +133 -133
- package/dist/globals.css +4 -4
- package/dist/lib/.storybook/main.d.ts +3 -0
- package/dist/lib/.storybook/manager.d.ts +1 -0
- package/dist/lib/.storybook/preview.d.ts +9 -0
- package/dist/lib/Typography/Header/index.d.ts +1 -1
- package/dist/lib/Typography/Text/index.d.ts +1 -1
- package/dist/lib/color/constants.d.ts +0 -15
- package/dist/lib/color/constants.js +0 -32
- package/dist/lib/color/constants.mjs.map +1 -1
- package/dist/lib/components/Accordion/index.d.ts +1 -0
- package/dist/lib/components/Accordion/index.js +18 -4
- package/dist/lib/components/Accordion/index.mjs +1 -1
- package/dist/lib/components/Accordion/index.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.js +9 -6
- package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +2 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +2 -2
- package/dist/lib/components/AspectRatio/index.js +3 -1
- package/dist/lib/components/AspectRatio/index.mjs +1 -1
- package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
- package/dist/lib/components/Avatar/index.d.ts +1 -1
- package/dist/lib/components/Avatar/index.js +9 -1
- package/dist/lib/components/Avatar/index.mjs +2 -1
- package/dist/lib/components/Avatar/index.mjs.map +1 -1
- package/dist/lib/components/Badge/index.d.ts +2 -2
- package/dist/lib/components/Badge/index.js +10 -1
- package/dist/lib/components/Badge/index.mjs +1 -1
- package/dist/lib/components/Badge/index.mjs.map +1 -1
- package/dist/lib/components/BubbleChart/index.js +1 -1
- package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
- package/dist/lib/components/Button/index.d.ts +2 -2
- package/dist/lib/components/Button/index.js +10 -1
- package/dist/lib/components/Button/index.mjs +1 -1
- package/dist/lib/components/Button/index.mjs.map +1 -1
- package/dist/lib/components/Callout/CalloutRoot.d.ts +1 -1
- package/dist/lib/components/Callout/CalloutRoot.js +11 -3
- package/dist/lib/components/Callout/CalloutRoot.mjs +2 -1
- package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
- package/dist/lib/components/Card/index.d.ts +2 -2
- package/dist/lib/components/Card/index.js +8 -1
- package/dist/lib/components/Card/index.mjs +1 -1
- package/dist/lib/components/Card/index.mjs.map +1 -1
- package/dist/lib/components/Checkbox/index.d.ts +1 -1
- package/dist/lib/components/Checkbox/index.js +10 -2
- package/dist/lib/components/Checkbox/index.mjs +1 -1
- package/dist/lib/components/Checkbox/index.mjs.map +1 -1
- package/dist/lib/components/CheckboxCard/index.d.ts +1 -1
- package/dist/lib/components/CheckboxCard/index.js +8 -1
- package/dist/lib/components/CheckboxCard/index.mjs +1 -1
- package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +11 -2
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +2 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.js +11 -2
- package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +2 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +1 -1
- package/dist/lib/components/DataList/DataListLabel.d.ts +1 -1
- package/dist/lib/components/DataList/DataListRoot.js +9 -2
- package/dist/lib/components/DataList/DataListRoot.mjs +2 -1
- package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
- package/dist/lib/components/DataList/DataListValue.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogAction.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogCancel.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogContent.d.ts +1 -1
- package/dist/lib/components/Dialog/DialogRoot.js +9 -1
- package/dist/lib/components/Dialog/DialogRoot.mjs +2 -1
- package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +10 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +2 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/lib/components/HoverCard/HoverCardContent.d.ts +2 -2
- package/dist/lib/components/HoverCard/HoverCardRoot.js +10 -1
- package/dist/lib/components/HoverCard/HoverCardRoot.mjs +2 -1
- package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
- package/dist/lib/components/IconButton/index.d.ts +1 -1
- package/dist/lib/components/IconButton/index.js +9 -1
- package/dist/lib/components/IconButton/index.mjs +1 -1
- package/dist/lib/components/IconButton/index.mjs.map +1 -1
- package/dist/lib/components/Inset/index.d.ts +1 -1
- package/dist/lib/components/Inset/index.js +7 -1
- package/dist/lib/components/Inset/index.mjs +1 -1
- package/dist/lib/components/Inset/index.mjs.map +1 -1
- package/dist/lib/components/Label/index.d.ts +1 -1
- package/dist/lib/components/Label/index.js +11 -3
- package/dist/lib/components/Label/index.mjs +1 -1
- package/dist/lib/components/Label/index.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarContent.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarItem.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarRadioGroup.js +1 -0
- package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -0
- package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarRoot.js +13 -3
- package/dist/lib/components/Menubar/MenubarRoot.mjs +2 -1
- package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSubContent.d.ts +1 -1
- package/dist/lib/components/Menubar/MenubarTrigger.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +11 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +2 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +2 -2
- package/dist/lib/components/Popover/PopoverClose.d.ts +1 -1
- package/dist/lib/components/Popover/PopoverContent.d.ts +1 -1
- package/dist/lib/components/Popover/PopoverRoot.js +8 -1
- package/dist/lib/components/Popover/PopoverRoot.mjs +2 -1
- package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
- package/dist/lib/components/Progress/index.d.ts +1 -1
- package/dist/lib/components/Progress/index.js +11 -1
- package/dist/lib/components/Progress/index.mjs +1 -1
- package/dist/lib/components/Progress/index.mjs.map +1 -1
- package/dist/lib/components/RadarChart/index.js +1 -1
- package/dist/lib/components/RadarChart/index.mjs.map +1 -1
- package/dist/lib/components/Radio/index.js +10 -4
- package/dist/lib/components/Radio/index.mjs +1 -1
- package/dist/lib/components/Radio/index.mjs.map +1 -1
- package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +1 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.js +12 -2
- package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +2 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
- package/dist/lib/components/RadioGroup/RadioGroupRoot.js +11 -2
- package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +2 -1
- package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ScrollArea/index.js +3 -1
- package/dist/lib/components/ScrollArea/index.mjs +1 -1
- package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +7 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
- package/dist/lib/components/Select/index.d.ts +4 -2
- package/dist/lib/components/Select/index.js +30 -13
- package/dist/lib/components/Select/index.mjs +1 -1
- package/dist/lib/components/Select/index.mjs.map +1 -1
- package/dist/lib/components/Separator/index.js +7 -1
- package/dist/lib/components/Separator/index.mjs +1 -1
- package/dist/lib/components/Separator/index.mjs.map +1 -1
- package/dist/lib/components/Skeleton/index.d.ts +1 -1
- package/dist/lib/components/Skeleton/index.js +4 -1
- package/dist/lib/components/Skeleton/index.mjs +1 -1
- package/dist/lib/components/Skeleton/index.mjs.map +1 -1
- package/dist/lib/components/Slider/index.d.ts +1 -1
- package/dist/lib/components/Slider/index.js +13 -5
- package/dist/lib/components/Slider/index.mjs +1 -1
- package/dist/lib/components/Slider/index.mjs.map +1 -1
- package/dist/lib/components/Spinner/index.js +3 -1
- package/dist/lib/components/Spinner/index.mjs +1 -1
- package/dist/lib/components/Spinner/index.mjs.map +1 -1
- package/dist/lib/components/TabNav/index.js +6 -4
- package/dist/lib/components/TabNav/index.mjs +1 -1
- package/dist/lib/components/TabNav/index.mjs.map +1 -1
- package/dist/lib/components/Table/index.d.ts +1 -1
- package/dist/lib/components/Table/index.js +7 -1
- package/dist/lib/components/Table/index.mjs +1 -1
- package/dist/lib/components/Table/index.mjs.map +1 -1
- package/dist/lib/components/Tabs/index.d.ts +1 -1
- package/dist/lib/components/Tabs/index.js +4 -4
- package/dist/lib/components/Tabs/index.mjs +1 -1
- package/dist/lib/components/Tabs/index.mjs.map +1 -1
- package/dist/lib/components/TextArea/index.d.ts +1 -1
- package/dist/lib/components/TextArea/index.js +11 -4
- package/dist/lib/components/TextArea/index.mjs +1 -1
- package/dist/lib/components/TextArea/index.mjs.map +1 -1
- package/dist/lib/components/TextField/index.d.ts +1 -1
- package/dist/lib/components/TextField/index.js +11 -4
- package/dist/lib/components/TextField/index.mjs +1 -1
- package/dist/lib/components/TextField/index.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastActionButton.d.ts +1 -1
- package/dist/lib/components/Toast/ToastActionButton.js +2 -2
- package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
- package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastRoot.d.ts +1 -1
- package/dist/lib/components/Toast/ToastRoot.js +11 -3
- package/dist/lib/components/Toast/ToastRoot.mjs +2 -1
- package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.js +9 -1
- package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
- package/dist/lib/components/Toggle/index.d.ts +1 -1
- package/dist/lib/components/Toggle/index.js +9 -1
- package/dist/lib/components/Toggle/index.mjs +1 -1
- package/dist/lib/components/Toggle/index.mjs.map +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +10 -2
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +2 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ToggleSwitch/index.d.ts +1 -1
- package/dist/lib/components/ToggleSwitch/index.js +13 -1
- package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
- package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
- package/dist/lib/components/Tooltip/index.d.ts +2 -2
- package/dist/lib/components/Tooltip/index.js +13 -8
- package/dist/lib/components/Tooltip/index.mjs +1 -1
- package/dist/lib/components/Tooltip/index.mjs.map +1 -1
- package/dist/lib/constants.d.ts +0 -2
- package/dist/lib/constants.js +7 -31
- package/dist/lib/constants.mjs +1 -1
- package/dist/lib/constants.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/theme/ThemeProvider.d.ts +16 -0
- package/dist/lib/theme/ThemeProvider.js +29 -0
- package/dist/lib/theme/ThemeProvider.mjs +3 -0
- package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
- package/dist/lib/theme/index.d.ts +2 -0
- package/dist/lib/theme/index.js +2 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/classPrefixes.js +1 -0
- package/dist/lib/utils/useDarkMode.js +1 -0
- package/dist/lib/utils/useDarkMode.mjs +1 -0
- package/dist/lib/utils/useDarkMode.mjs.map +1 -1
- package/dist/tailwind.config.js +4 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +141 -140
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { Preview } from '@storybook/react';
|
3
|
+
import '../src/app/globals.css';
|
4
|
+
import '../src/app/styles.css';
|
5
|
+
import '../src/app/stories.css';
|
6
|
+
import 'tailwindcss/tailwind.css';
|
7
|
+
declare const preview: Preview;
|
8
|
+
export default preview;
|
9
|
+
export declare const decorators: ((Story: any, context: any) => React.JSX.Element)[];
|
@@ -5,7 +5,7 @@ export interface HeaderProps extends VariantProps<typeof headerVariants> {
|
|
5
5
|
color?: IColor;
|
6
6
|
}
|
7
7
|
declare let headerVariants: (props?: ({
|
8
|
-
weight?: "
|
8
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
9
9
|
headers?: "h2" | "h3" | "h1" | "h4" | "h5" | "h6" | null | undefined;
|
10
10
|
color?: string | null | undefined;
|
11
11
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
@@ -8,7 +8,7 @@ export interface TextProps extends VariantProps<typeof textVariants> {
|
|
8
8
|
align?: 'left' | 'center' | 'right';
|
9
9
|
}
|
10
10
|
declare const textVariants: (props?: ({
|
11
|
-
weight?: "
|
11
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | "light" | null | undefined;
|
12
12
|
color?: string | null | undefined;
|
13
13
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
14
14
|
export declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & TextProps & React.RefAttributes<HTMLSpanElement>>;
|
@@ -2,20 +2,6 @@ import { IColor, IAlphaColor, IDarkColor } from '../types';
|
|
2
2
|
export declare const colorOptions: IColor[];
|
3
3
|
export declare const alphaColorOptions: IAlphaColor[];
|
4
4
|
export declare const darkColorOptions: IDarkColor[];
|
5
|
-
export declare const alphaOptions: {
|
6
|
-
1: string;
|
7
|
-
2: string;
|
8
|
-
3: string;
|
9
|
-
4: string;
|
10
|
-
5: string;
|
11
|
-
6: string;
|
12
|
-
7: string;
|
13
|
-
8: string;
|
14
|
-
9: string;
|
15
|
-
10: string;
|
16
|
-
11: string;
|
17
|
-
12: string;
|
18
|
-
};
|
19
5
|
export declare const ColorStyle: Record<string, string>;
|
20
6
|
export declare const DarkColorStyle: Record<string, string>;
|
21
7
|
export declare const chartColorList: {
|
@@ -26,4 +12,3 @@ export declare const chartAlphaColorList: {
|
|
26
12
|
sorting: string[];
|
27
13
|
mixed: string[];
|
28
14
|
};
|
29
|
-
export declare const chartColorOptions: IColor[];
|
@@ -122,20 +122,6 @@ export var darkColorOptions = [
|
|
122
122
|
'orangeDarkA',
|
123
123
|
'whiteDark',
|
124
124
|
];
|
125
|
-
export var alphaOptions = {
|
126
|
-
1: '1',
|
127
|
-
2: '2',
|
128
|
-
3: '6',
|
129
|
-
4: '9',
|
130
|
-
5: '12',
|
131
|
-
6: '15',
|
132
|
-
7: '20',
|
133
|
-
8: '27',
|
134
|
-
9: '45',
|
135
|
-
10: '50',
|
136
|
-
11: '62',
|
137
|
-
12: '89',
|
138
|
-
};
|
139
125
|
export var ColorStyle = {
|
140
126
|
black: 'slate-12',
|
141
127
|
white: '#ffffff',
|
@@ -276,21 +262,3 @@ export var chartAlphaColorList = {
|
|
276
262
|
limeA[2],
|
277
263
|
],
|
278
264
|
};
|
279
|
-
export var chartColorOptions = [
|
280
|
-
'blue',
|
281
|
-
'crimson',
|
282
|
-
'teal',
|
283
|
-
'orange',
|
284
|
-
'purple',
|
285
|
-
'amber',
|
286
|
-
'slate',
|
287
|
-
'cyan',
|
288
|
-
'red',
|
289
|
-
'grass',
|
290
|
-
'brown',
|
291
|
-
'indigo',
|
292
|
-
'plum',
|
293
|
-
'yellow',
|
294
|
-
'sky',
|
295
|
-
'lime',
|
296
|
-
];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.mjs","sources":["../../lib/color/constants.js"],"sourcesContent":["import { blue, crimson, teal, orange, purple, amber, slate, cyan, red, grass, brown, indigo, plum, yellow, sky, lime, } from './light';\nimport { blueA, crimsonA, tealA, orangeA, purpleA, amberA, slateA, cyanA, redA, grassA, brownA, indigoA, plumA, yellowA, skyA, limeA, } from './alpha';\nexport var colorOptions = [\n // 'black',\n 'slate',\n 'olive',\n 'sand',\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'bronze',\n 'gold',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'orange',\n // 'white',\n];\nexport var alphaColorOptions = [\n 'slateA',\n 'oliveA',\n 'sandA',\n 'tomatoA',\n 'redA',\n 'rubyA',\n 'crimsonA',\n 'pinkA',\n 'plumA',\n 'purpleA',\n 'violetA',\n 'irisA',\n 'indigoA',\n 'blueA',\n 'cyanA',\n 'tealA',\n 'jadeA',\n 'greenA',\n 'grassA',\n 'brownA',\n 'bronzeA',\n 'goldA',\n 'skyA',\n 'mintA',\n 'limeA',\n 'yellowA',\n 'amberA',\n 'orangeA',\n];\nexport var darkColorOptions = [\n 'blackDark',\n 'slateDark',\n 'oliveDark',\n 'sandDark',\n 'tomatoDark',\n 'redDark',\n 'rubyDark',\n 'crimsonDark',\n 'pinkDark',\n 'plumDark',\n 'purpleDark',\n 'violetDark',\n 'irisDark',\n 'indigoDark',\n 'blueDark',\n 'cyanDark',\n 'tealDark',\n 'jadeDark',\n 'greenDark',\n 'grassDark',\n 'brownDark',\n 'bronzeDark',\n 'goldDark',\n 'skyDark',\n 'mintDark',\n 'limeDark',\n 'yellowDark',\n 'amberDark',\n 'orangeDark',\n 'slateDarkA',\n 'oliveDarkA',\n 'sandDarkA',\n 'tomatoDarkA',\n 'redDarkA',\n 'rubyDarkA',\n 'crimsonDarkA',\n 'pinkDarkA',\n 'plumDarkA',\n 'purpleDarkA',\n 'violetDarkA',\n 'irisDarkA',\n 'indigoDarkA',\n 'blueDarkA',\n 'cyanDarkA',\n 'tealDarkA',\n 'jadeDarkA',\n 'greenDarkA',\n 'grassDarkA',\n 'brownDarkA',\n 'bronzeDarkA',\n 'goldDarkA',\n 'skyDarkA',\n 'mintDarkA',\n 'limeDarkA',\n 'yellowDarkA',\n 'amberDarkA',\n 'orangeDarkA',\n 'whiteDark',\n];\nexport var
|
1
|
+
{"version":3,"file":"constants.mjs","sources":["../../lib/color/constants.js"],"sourcesContent":["import { blue, crimson, teal, orange, purple, amber, slate, cyan, red, grass, brown, indigo, plum, yellow, sky, lime, } from './light';\nimport { blueA, crimsonA, tealA, orangeA, purpleA, amberA, slateA, cyanA, redA, grassA, brownA, indigoA, plumA, yellowA, skyA, limeA, } from './alpha';\nexport var colorOptions = [\n // 'black',\n 'slate',\n 'olive',\n 'sand',\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'bronze',\n 'gold',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'orange',\n // 'white',\n];\nexport var alphaColorOptions = [\n 'slateA',\n 'oliveA',\n 'sandA',\n 'tomatoA',\n 'redA',\n 'rubyA',\n 'crimsonA',\n 'pinkA',\n 'plumA',\n 'purpleA',\n 'violetA',\n 'irisA',\n 'indigoA',\n 'blueA',\n 'cyanA',\n 'tealA',\n 'jadeA',\n 'greenA',\n 'grassA',\n 'brownA',\n 'bronzeA',\n 'goldA',\n 'skyA',\n 'mintA',\n 'limeA',\n 'yellowA',\n 'amberA',\n 'orangeA',\n];\nexport var darkColorOptions = [\n 'blackDark',\n 'slateDark',\n 'oliveDark',\n 'sandDark',\n 'tomatoDark',\n 'redDark',\n 'rubyDark',\n 'crimsonDark',\n 'pinkDark',\n 'plumDark',\n 'purpleDark',\n 'violetDark',\n 'irisDark',\n 'indigoDark',\n 'blueDark',\n 'cyanDark',\n 'tealDark',\n 'jadeDark',\n 'greenDark',\n 'grassDark',\n 'brownDark',\n 'bronzeDark',\n 'goldDark',\n 'skyDark',\n 'mintDark',\n 'limeDark',\n 'yellowDark',\n 'amberDark',\n 'orangeDark',\n 'slateDarkA',\n 'oliveDarkA',\n 'sandDarkA',\n 'tomatoDarkA',\n 'redDarkA',\n 'rubyDarkA',\n 'crimsonDarkA',\n 'pinkDarkA',\n 'plumDarkA',\n 'purpleDarkA',\n 'violetDarkA',\n 'irisDarkA',\n 'indigoDarkA',\n 'blueDarkA',\n 'cyanDarkA',\n 'tealDarkA',\n 'jadeDarkA',\n 'greenDarkA',\n 'grassDarkA',\n 'brownDarkA',\n 'bronzeDarkA',\n 'goldDarkA',\n 'skyDarkA',\n 'mintDarkA',\n 'limeDarkA',\n 'yellowDarkA',\n 'amberDarkA',\n 'orangeDarkA',\n 'whiteDark',\n];\nexport var ColorStyle = {\n black: 'slate-12',\n white: '#ffffff',\n slate: 'slate-9',\n olive: 'olive-9',\n sand: 'sand-9',\n tomato: 'tomato-9',\n red: 'red-9',\n ruby: 'ruby-9',\n crimson: 'crimson-9',\n pink: 'pink-9',\n plum: 'plum-9',\n purple: 'purple-9',\n violet: 'violet-9',\n iris: 'iris-9',\n indigo: 'indigo-9',\n blue: 'blue-9',\n cyan: 'cyan-9',\n teal: 'teal-9',\n jade: 'jade-9',\n green: 'green-9',\n grass: 'grass-9',\n brown: 'brown-9',\n bronze: 'bronze-9',\n gold: 'gold-9',\n sky: 'sky-9',\n mint: 'mint-9',\n lime: 'lime-9',\n yellow: 'yellow-9',\n amber: 'amber-9',\n orange: 'orange-9',\n};\nexport var DarkColorStyle = {\n blackDark: 'slateDark-12',\n whiteDark: 'slateDark-1',\n slateDark: 'slateDark-9',\n oliveDark: 'oliveDark-9',\n sandDark: 'sandDark-9',\n tomatoDark: 'tomatoDark-9',\n redDark: 'redDark-9',\n rubyDark: 'rubyDark-9',\n crimsonDark: 'crimsonDark-9',\n pinkDark: 'pinkDark-9',\n plumDark: 'plumDark-9',\n purpleDark: 'purpleDark-9',\n violetDark: 'violetDark-9',\n irisDark: 'irisDark-9',\n indigoDark: 'indigoDark-9',\n blueDark: 'blueDark-9',\n cyanDark: 'cyanDark-9',\n tealDark: 'tealDark-9',\n jadeDark: 'jadeDark-9',\n greenDark: 'greenDark-9',\n grassDark: 'grassDark-9',\n brownDark: 'brownDark-9',\n bronzeDark: 'bronzeDark-9',\n goldDark: 'goldDark-9',\n skyDark: 'skyDark-9',\n mintDark: 'mintDark-9',\n limeDark: 'limeDark-9',\n yellowDark: 'yellowDark-9',\n amberDark: 'amberDark-9',\n orangeDark: 'orangeDark-9',\n};\nexport var chartColorList = {\n sorting: [\n crimson[9],\n orange[9],\n amber[9],\n teal[9],\n blue[9],\n purple[9],\n slate[9],\n red[9],\n brown[9],\n yellow[9],\n lime[9],\n grass[9],\n sky[9],\n cyan[9],\n indigo[9],\n plum[9],\n ],\n mixed: [\n blue[9],\n crimson[9],\n teal[9],\n orange[9],\n purple[9],\n amber[9],\n slate[9],\n cyan[9],\n red[9],\n grass[9],\n brown[9],\n indigo[9],\n plum[9],\n yellow[9],\n sky[9],\n lime[9],\n ],\n};\nexport var chartAlphaColorList = {\n sorting: [\n crimsonA[2],\n orangeA[2],\n amberA[2],\n tealA[2],\n blueA[2],\n purpleA[2],\n slateA[2],\n redA[2],\n brownA[2],\n yellowA[2],\n limeA[2],\n grassA[2],\n skyA[2],\n cyanA[2],\n indigoA[2],\n plumA[2],\n ],\n mixed: [\n blueA[2],\n crimsonA[2],\n tealA[2],\n orangeA[2],\n purpleA[2],\n amberA[2],\n slateA[2],\n cyanA[2],\n redA[2],\n grassA[2],\n brownA[2],\n indigoA[2],\n plumA[2],\n yellowA[2],\n skyA[2],\n limeA[2],\n ],\n};\n"],"names":["ColorStyle","black","white","slate","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","bronze","gold","sky","mint","lime","yellow","amber","orange","DarkColorStyle","blackDark","whiteDark","slateDark","oliveDark","sandDark","tomatoDark","redDark","rubyDark","crimsonDark","pinkDark","plumDark","purpleDark","violetDark","irisDark","indigoDark","blueDark","cyanDark","tealDark","jadeDark","greenDark","grassDark","brownDark","bronzeDark","goldDark","skyDark","mintDark","limeDark","yellowDark","amberDark","orangeDark","chartColorList","sorting","mixed","chartAlphaColorList","crimsonA","orangeA","amberA","tealA","blueA","purpleA","slateA","redA","brownA","yellowA","limeA","grassA","skyA","cyanA","indigoA","plumA"],"mappings":"4ZA4HU,IAACA,EAAa,CACpBC,MAAO,WACPC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,KAAM,SACNC,OAAQ,WACRC,IAAK,QACLC,KAAM,SACNC,QAAS,YACTC,KAAM,SACNC,KAAM,SACNC,OAAQ,WACRC,OAAQ,WACRC,KAAM,SACNC,OAAQ,WACRC,KAAM,SACNC,KAAM,SACNC,KAAM,SACNC,KAAM,SACNC,MAAO,UACPC,MAAO,UACPC,MAAO,UACPC,OAAQ,WACRC,KAAM,SACNC,IAAK,QACLC,KAAM,SACNC,KAAM,SACNC,OAAQ,WACRC,MAAO,UACPC,OAAQ,YAEDC,EAAiB,CACxBC,UAAW,eACXC,UAAW,cACXC,UAAW,cACXC,UAAW,cACXC,SAAU,aACVC,WAAY,eACZC,QAAS,YACTC,SAAU,aACVC,YAAa,gBACbC,SAAU,aACVC,SAAU,aACVC,WAAY,eACZC,WAAY,eACZC,SAAU,aACVC,WAAY,eACZC,SAAU,aACVC,SAAU,aACVC,SAAU,aACVC,SAAU,aACVC,UAAW,cACXC,UAAW,cACXC,UAAW,cACXC,WAAY,eACZC,SAAU,aACVC,QAAS,YACTC,SAAU,aACVC,SAAU,aACVC,WAAY,eACZC,UAAW,cACXC,WAAY,gBAELC,EAAiB,CACxBC,QAAS,CACLtD,EAAQ,GACRqB,EAAO,GACPD,EAAM,GACNX,EAAK,GACLF,EAAK,GACLJ,EAAO,GACPT,EAAM,GACNI,EAAI,GACJe,EAAM,GACNM,EAAO,GACPD,EAAK,GACLN,EAAM,GACNI,EAAI,GACJR,EAAK,GACLF,EAAO,GACPJ,EAAK,IAETqD,MAAO,CACHhD,EAAK,GACLP,EAAQ,GACRS,EAAK,GACLY,EAAO,GACPlB,EAAO,GACPiB,EAAM,GACN1B,EAAM,GACNc,EAAK,GACLV,EAAI,GACJc,EAAM,GACNC,EAAM,GACNP,EAAO,GACPJ,EAAK,GACLiB,EAAO,GACPH,EAAI,GACJE,EAAK,KAGFsC,EAAsB,CAC7BF,QAAS,CACLG,EAAS,GACTC,EAAQ,GACRC,EAAO,GACPC,EAAM,GACNC,EAAM,GACNC,EAAQ,GACRC,EAAO,GACPC,EAAK,GACLC,EAAO,GACPC,EAAQ,GACRC,EAAM,GACNC,EAAO,GACPC,EAAK,GACLC,EAAM,GACNC,EAAQ,GACRC,EAAM,IAEVjB,MAAO,CACHM,EAAM,GACNJ,EAAS,GACTG,EAAM,GACNF,EAAQ,GACRI,EAAQ,GACRH,EAAO,GACPI,EAAO,GACPO,EAAM,GACNN,EAAK,GACLI,EAAO,GACPH,EAAO,GACPM,EAAQ,GACRC,EAAM,GACNN,EAAQ,GACRG,EAAK,GACLF,EAAM"}
|
@@ -8,6 +8,7 @@ export interface AccordionProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
8
8
|
declare const accoridanVariants: (props?: ({
|
9
9
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
10
10
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
11
|
+
export declare const useAccordionContext: () => AccordionProps;
|
11
12
|
export declare const Root: React.ForwardRefExoticComponent<((Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & AccordionProps) & React.RefAttributes<HTMLDivElement>>;
|
12
13
|
export declare const Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLDivElement>>;
|
13
14
|
export declare const Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AccordionProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -21,12 +21,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
21
21
|
return t;
|
22
22
|
};
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
24
|
-
import React from 'react';
|
24
|
+
import React, { createContext, useContext } from 'react';
|
25
25
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
26
26
|
import { ChevronDownIcon } from '@radix-ui/react-icons';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { cva } from 'class-variance-authority';
|
29
29
|
import { scalingVariants } from '../../../lib/constants';
|
30
|
+
import { useTheme } from '../../../lib/theme';
|
30
31
|
var accoridanVariants = cva('', {
|
31
32
|
variants: {
|
32
33
|
scaling: __assign({}, scalingVariants),
|
@@ -35,9 +36,21 @@ var accoridanVariants = cva('', {
|
|
35
36
|
scaling: '100%',
|
36
37
|
},
|
37
38
|
});
|
39
|
+
var AccordionContext = createContext({
|
40
|
+
scaling: '100%',
|
41
|
+
color: 'red',
|
42
|
+
});
|
43
|
+
export var useAccordionContext = function () {
|
44
|
+
return useContext(AccordionContext);
|
45
|
+
};
|
38
46
|
export var Root = React.forwardRef(function (_a, forwardedRef) {
|
39
|
-
var className = _a.className, children = _a.children, scaling = _a.scaling, rootProps = __rest(_a, ["className", "children", "scaling"]);
|
40
|
-
|
47
|
+
var className = _a.className, children = _a.children, scaling = _a.scaling, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, ["className", "children", "scaling", "color"]);
|
48
|
+
var theme = useTheme().theme;
|
49
|
+
var contextValue = {
|
50
|
+
scaling: theme.themeScaling || scaling,
|
51
|
+
color: theme.themeColor || color,
|
52
|
+
};
|
53
|
+
return (_jsx(AccordionContext.Provider, { value: contextValue, children: _jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: contextValue.scaling }), className) }, rootProps, { ref: forwardedRef, children: children })) }));
|
41
54
|
});
|
42
55
|
Root.displayName = 'Accordion.Root';
|
43
56
|
export var Item = React.forwardRef(function (_a, forwardedRef) {
|
@@ -46,7 +59,8 @@ export var Item = React.forwardRef(function (_a, forwardedRef) {
|
|
46
59
|
});
|
47
60
|
Item.displayName = 'Accordion.Item';
|
48
61
|
export var Trigger = React.forwardRef(function (_a, forwardedRef) {
|
49
|
-
var className = _a.className, children = _a.children,
|
62
|
+
var className = _a.className, children = _a.children, rootProps = __rest(_a, ["className", "children"]);
|
63
|
+
var color = useAccordionContext().color;
|
50
64
|
return (_jsx(AccordionPrimitive.Header, __assign({}, rootProps, { className: cn('flex', className), children: _jsxs(AccordionPrimitive.Trigger, __assign({}, rootProps, { ref: forwardedRef, className: cn("group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal", "dark:bg-[#111113] text-".concat(color, "A-11 dark:text-").concat(color, "Dark-11 "), "hover:bg-".concat(color, "A-4 dark:hover:bg-").concat(color, "Dark-4 hover:text-").concat(color, "A-11 dark:hover:text-").concat(color, "DarkA-11"), "data-[state=open]:bg-".concat(color, "A-5 dark:data-[state=open]:bg-").concat(color, "DarkA-5"), "disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8", className), children: [children, _jsx(ChevronDownIcon, { className: "transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180", "aria-hidden": true })] })) })));
|
51
65
|
});
|
52
66
|
Trigger.displayName = 'Accordion.Trigger';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r,jsxs as
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import a,{createContext as t,useContext as o}from"react";import*as n from"@radix-ui/react-accordion";import{ChevronDownIcon as c}from"@radix-ui/react-icons";import{cn as s}from"../../utils/utils.mjs";import{cva as i}from"class-variance-authority";import{scalingVariants as l}from"../../constants.mjs";import{useTheme as d}from"../../theme/ThemeProvider.mjs";var m=function(){return m=Object.assign||function(r){for(var e,a=1,t=arguments.length;a<t;a++)for(var o in e=arguments[a])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},m.apply(this,arguments)},p=function(r,e){var a={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(a[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(r);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(r,t[o])&&(a[t[o]]=r[t[o]])}return a},f=i("",{variants:{scaling:m({},l)},defaultVariants:{scaling:"100%"}}),u=t({scaling:"100%",color:"red"}),h=function(){return o(u)},x=a.forwardRef((function(e,a){var t=e.className,o=e.children,c=e.scaling,i=e.color,l=void 0===i?"red":i,h=p(e,["className","children","scaling","color"]),x=d().theme,b={scaling:x.themeScaling||c,color:x.themeColor||l};return r(u.Provider,{value:b,children:r(n.Root,m({className:s("w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4",f({scaling:b.scaling}),t)},h,{ref:a,children:o}))})}));x.displayName="Accordion.Root";var b=a.forwardRef((function(e,a){var t=e.className,o=e.children,c=p(e,["className","children"]);return r(n.Item,m({},c,{ref:a,className:s("mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b",t),children:o}))}));b.displayName="Accordion.Item";var g=a.forwardRef((function(a,t){var o=a.className,i=a.children,l=p(a,["className","children"]),d=h().color;return r(n.Header,m({},l,{className:s("flex",o),children:e(n.Trigger,m({},l,{ref:t,className:s("group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal","dark:bg-[#111113] text-".concat(d,"A-11 dark:text-").concat(d,"Dark-11 "),"hover:bg-".concat(d,"A-4 dark:hover:bg-").concat(d,"Dark-4 hover:text-").concat(d,"A-11 dark:hover:text-").concat(d,"DarkA-11"),"data-[state=open]:bg-".concat(d,"A-5 dark:data-[state=open]:bg-").concat(d,"DarkA-5"),"disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8",o),children:[i,r(c,{className:"transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180","aria-hidden":!0})]}))}))}));g.displayName="Accordion.Trigger";var v=a.forwardRef((function(e,a){var t=e.className,o=e.children,c=p(e,["className","children"]);return r(n.Content,m({},c,{ref:a,className:s("max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11",t),children:r("div",{className:"h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal",children:o})}))}));v.displayName="Accordion.Content";var A={Root:x,Item:b,Trigger:g,Content:v};export{v as Content,b as Item,x as Root,g as Trigger,A as default,h as useAccordionContext};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Accordion/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDownIcon } from '@radix-ui/react-icons';\nimport { cn } from '../../../lib/utils/utils';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants } from '../../../lib/constants';\nvar accoridanVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nexport var Root = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, rootProps = __rest(_a, [\"className\", \"children\", \"scaling\"]);\n return (_jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: scaling }), className) }, rootProps, { ref: forwardedRef, children: children })));\n});\nRoot.displayName = 'Accordion.Root';\nexport var Item = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Item, __assign({}, rootProps, { ref: forwardedRef, className: cn('mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b', className), children: children })));\n});\nItem.displayName = 'Accordion.Item';\nexport var Trigger = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children,
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/Accordion/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { createContext, useContext } from 'react';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { ChevronDownIcon } from '@radix-ui/react-icons';\nimport { cn } from '../../../lib/utils/utils';\nimport { cva } from 'class-variance-authority';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nvar accoridanVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar AccordionContext = createContext({\n scaling: '100%',\n color: 'red',\n});\nexport var useAccordionContext = function () {\n return useContext(AccordionContext);\n};\nexport var Root = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, scaling = _a.scaling, _b = _a.color, color = _b === void 0 ? 'red' : _b, rootProps = __rest(_a, [\"className\", \"children\", \"scaling\", \"color\"]);\n var theme = useTheme().theme;\n var contextValue = {\n scaling: theme.themeScaling || scaling,\n color: theme.themeColor || color,\n };\n return (_jsx(AccordionContext.Provider, { value: contextValue, children: _jsx(AccordionPrimitive.Root, __assign({ className: cn('w-[280px] rounded-md border border-slateA-4 dark:border-slateDarkA-4', accoridanVariants({ scaling: contextValue.scaling }), className) }, rootProps, { ref: forwardedRef, children: children })) }));\n});\nRoot.displayName = 'Accordion.Root';\nexport var Item = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Item, __assign({}, rootProps, { ref: forwardedRef, className: cn('mt-px w-[278px] overflow-hidden first:mt-0 first:rounded-t last:rounded-b', className), children: children })));\n});\nItem.displayName = 'Accordion.Item';\nexport var Trigger = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n var color = useAccordionContext().color;\n return (_jsx(AccordionPrimitive.Header, __assign({}, rootProps, { className: cn('flex', className), children: _jsxs(AccordionPrimitive.Trigger, __assign({}, rootProps, { ref: forwardedRef, className: cn(\"group flex h-[44px] w-[278px] cursor-default items-center justify-between px-[20px] py-[10px] text-base font-normal\", \"dark:bg-[#111113] text-\".concat(color, \"A-11 dark:text-\").concat(color, \"Dark-11 \"), \"hover:bg-\".concat(color, \"A-4 dark:hover:bg-\").concat(color, \"Dark-4 hover:text-\").concat(color, \"A-11 dark:hover:text-\").concat(color, \"DarkA-11\"), \"data-[state=open]:bg-\".concat(color, \"A-5 dark:data-[state=open]:bg-\").concat(color, \"DarkA-5\"), \"disabled:bg-slateA-3 disabled:text-slateA-8 disabled:dark:bg-slateDarkA-3 disabled:dark:text-slateDarkA-8\", className), children: [children, _jsx(ChevronDownIcon, { className: \"transition-transform duration-300 ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:rotate-180\", \"aria-hidden\": true })] })) })));\n});\nTrigger.displayName = 'Accordion.Trigger';\nexport var Content = React.forwardRef(function (_a, forwardedRef) {\n var className = _a.className, children = _a.children, rootProps = __rest(_a, [\"className\", \"children\"]);\n return (_jsx(AccordionPrimitive.Content, __assign({}, rootProps, { ref: forwardedRef, className: cn('max-h-[800px] w-[278px] overflow-hidden border-t border-t-slateA-4 bg-slateA-2 text-[16px] text-slateA-11 data-[state=closed]:animate-slideUp data-[state=open]:animate-slideDown dark:border-t-slateDarkA-4 dark:bg-slateDarkA-2 dark:text-slateDarkA-11', className), children: _jsx(\"div\", { className: \"h-auto max-h-[1000px] overflow-y-auto px-[20px] py-[15px] text-base font-normal\", children: children }) })));\n});\nContent.displayName = 'Accordion.Content';\nvar Accordion = {\n Root: Root,\n Item: Item,\n Trigger: Trigger,\n Content: Content,\n};\nexport default Accordion;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","accoridanVariants","cva","variants","scaling","scalingVariants","defaultVariants","AccordionContext","createContext","color","useAccordionContext","useContext","Root","React","forwardRef","_a","forwardedRef","className","children","_b","rootProps","theme","useTheme","contextValue","themeScaling","themeColor","_jsx","Provider","value","AccordionPrimitive","cn","ref","displayName","Item","Trigger","Header","_jsxs","concat","ChevronDownIcon","Content","Accordion"],"mappings":"wZAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EASIiB,EAAoBC,EAAI,GAAI,CAC5BC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGbG,EAAmBC,EAAc,CACjCJ,QAAS,OACTK,MAAO,QAEAC,EAAsB,WAC7B,OAAOC,EAAWJ,EACtB,EACWK,EAAOC,EAAMC,YAAW,SAAUC,EAAIC,GAC7C,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUd,EAAUW,EAAGX,QAASe,EAAKJ,EAAGN,MAAOA,OAAe,IAAPU,EAAgB,MAAQA,EAAIC,EAAYxB,EAAOmB,EAAI,CAAC,YAAa,WAAY,UAAW,UACvLM,EAAQC,IAAWD,MACnBE,EAAe,CACfnB,QAASiB,EAAMG,cAAgBpB,EAC/BK,MAAOY,EAAMI,YAAchB,GAE/B,OAAQiB,EAAKnB,EAAiBoB,SAAU,CAAEC,MAAOL,EAAcL,SAAUQ,EAAKG,EAAmBjB,KAAM/B,EAAS,CAAEoC,UAAWa,EAAG,uEAAwE7B,EAAkB,CAAEG,QAASmB,EAAanB,UAAYa,IAAcG,EAAW,CAAEW,IAAKf,EAAcE,SAAUA,MAC1T,IACAN,EAAKoB,YAAc,iBACT,IAACC,EAAOpB,EAAMC,YAAW,SAAUC,EAAIC,GAC7C,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUE,EAAYxB,EAAOmB,EAAI,CAAC,YAAa,aAC3F,OAAQW,EAAKG,EAAmBI,KAAMpD,EAAS,CAAE,EAAEuC,EAAW,CAAEW,IAAKf,EAAcC,UAAWa,EAAG,4EAA6Eb,GAAYC,SAAUA,IACxM,IACAe,EAAKD,YAAc,iBACT,IAACE,EAAUrB,EAAMC,YAAW,SAAUC,EAAIC,GAChD,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUE,EAAYxB,EAAOmB,EAAI,CAAC,YAAa,aACvFN,EAAQC,IAAsBD,MAClC,OAAQiB,EAAKG,EAAmBM,OAAQtD,EAAS,CAAE,EAAEuC,EAAW,CAAEH,UAAWa,EAAG,OAAQb,GAAYC,SAAUkB,EAAMP,EAAmBK,QAASrD,EAAS,CAAA,EAAIuC,EAAW,CAAEW,IAAKf,EAAcC,UAAWa,EAAG,sHAAuH,0BAA0BO,OAAO5B,EAAO,mBAAmB4B,OAAO5B,EAAO,YAAa,YAAY4B,OAAO5B,EAAO,sBAAsB4B,OAAO5B,EAAO,sBAAsB4B,OAAO5B,EAAO,yBAAyB4B,OAAO5B,EAAO,YAAa,wBAAwB4B,OAAO5B,EAAO,kCAAkC4B,OAAO5B,EAAO,WAAY,4GAA6GQ,GAAYC,SAAU,CAACA,EAAUQ,EAAKY,EAAiB,CAAErB,UAAW,6GAA8G,eAAe,UACl8B,IACAiB,EAAQF,YAAc,oBACZ,IAACO,EAAU1B,EAAMC,YAAW,SAAUC,EAAIC,GAChD,IAAIC,EAAYF,EAAGE,UAAWC,EAAWH,EAAGG,SAAUE,EAAYxB,EAAOmB,EAAI,CAAC,YAAa,aAC3F,OAAQW,EAAKG,EAAmBU,QAAS1D,EAAS,CAAA,EAAIuC,EAAW,CAAEW,IAAKf,EAAcC,UAAWa,EAAG,4PAA6Pb,GAAYC,SAAUQ,EAAK,MAAO,CAAET,UAAW,kFAAmFC,SAAUA,MACjf,IACAqB,EAAQP,YAAc,oBACnB,IAACQ,EAAY,CACZ5B,KAAMA,EACNqB,KAAMA,EACNC,QAASA,EACTK,QAASA"}
|
@@ -6,9 +6,9 @@ export interface AlertDialogActionProps extends VariantProps<typeof alertDialogA
|
|
6
6
|
appearance?: IAppearance;
|
7
7
|
}
|
8
8
|
export declare const alertDialogActionVariants: (props?: ({
|
9
|
-
radius?: "
|
9
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
10
10
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
11
|
-
weight?: "
|
11
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
12
12
|
color?: string | null | undefined;
|
13
13
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
14
14
|
export declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -6,8 +6,8 @@ export interface AlertDialogCancelProps extends VariantProps<typeof alertDialogC
|
|
6
6
|
appearance?: IAppearance;
|
7
7
|
}
|
8
8
|
export declare const alertDialogCancelVariants: (props?: ({
|
9
|
-
radius?: "
|
9
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
10
10
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
11
|
-
weight?: "
|
11
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
12
12
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
13
13
|
export declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -6,6 +6,6 @@ export interface AlertDialogContentProps extends VariantProps<typeof alertDialog
|
|
6
6
|
export declare const alertDialogContentVariants: (props?: ({
|
7
7
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
8
8
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
9
|
-
radius?: "
|
9
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
10
10
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
11
11
|
export declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
'use client';
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
2
3
|
__assign = Object.assign || function(t) {
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
@@ -21,8 +22,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
21
22
|
return t;
|
22
23
|
};
|
23
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
|
-
import { forwardRef, createContext, useContext,
|
25
|
+
import { forwardRef, createContext, useContext, } from 'react';
|
25
26
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
27
|
+
import { useTheme } from '../../../lib/theme';
|
26
28
|
var AlertDialogContext = createContext({
|
27
29
|
size: 'medium',
|
28
30
|
scaling: '100%',
|
@@ -35,12 +37,13 @@ export var useAlertDialogContext = function () {
|
|
35
37
|
};
|
36
38
|
export var AlertDialogRoot = forwardRef(function (_a, ref) {
|
37
39
|
var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, props = __rest(_a, ["children", "radius", "size", "scaling", "color"]);
|
38
|
-
var
|
39
|
-
|
40
|
+
var theme = useTheme().theme;
|
41
|
+
var contextValue = {
|
42
|
+
radius: theme.themeRadius || radius,
|
43
|
+
scaling: theme.themeScaling || scaling,
|
44
|
+
color: theme.themeColor || color,
|
40
45
|
size: size,
|
41
|
-
|
42
|
-
color: color,
|
43
|
-
}); }, [radius, size, scaling, color]);
|
46
|
+
};
|
44
47
|
return (_jsx(AlertDialogContext.Provider, { value: contextValue, children: _jsx("div", { ref: ref, children: _jsx(AlertDialogPrimitive.Root, __assign({}, props, { children: children })) }) }));
|
45
48
|
});
|
46
49
|
AlertDialogRoot.displayName = 'AlertDialog.Root';
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
1
|
+
"use client";
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as o,useContext as t}from"react";import*as i from"@radix-ui/react-alert-dialog";import{useTheme as n}from"../../theme/ThemeProvider.mjs";var a=function(){return a=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},a.apply(this,arguments)},l=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},c=e({size:"medium",scaling:"100%",color:"red",radius:"medium",appearance:"solid"}),s=function(){return t(c)},m=o((function(e,o){var t=e.children,s=e.radius,m=e.size,p=e.scaling,u=e.color,d=l(e,["children","radius","size","scaling","color"]),f=n().theme,h={radius:f.themeRadius||s,scaling:f.themeScaling||p,color:f.themeColor||u,size:m};return r(c.Provider,{value:h,children:r("div",{ref:o,children:r(i.Root,a({},d,{children:t}))})})}));m.displayName="AlertDialog.Root";export{m as AlertDialogRoot,s as useAlertDialogContext};
|
2
3
|
//# sourceMappingURL=AlertDialogRoot.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AlertDialogRoot.mjs","sources":[
|
1
|
+
{"version":3,"file":"AlertDialogRoot.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -7,10 +7,10 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
7
7
|
appearance?: IAppearance;
|
8
8
|
}
|
9
9
|
declare const buttonVariants: (props?: ({
|
10
|
-
radius?: "
|
10
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
11
11
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
12
12
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
13
|
-
weight?: "
|
13
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
14
14
|
color?: string | null | undefined;
|
15
15
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
16
16
|
export declare const AlertDialogTrigger: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -26,6 +26,7 @@ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
26
26
|
import { cva } from 'class-variance-authority';
|
27
27
|
import { cn } from '../../../lib/utils/utils';
|
28
28
|
import { scalingVariants } from '../../../lib/constants';
|
29
|
+
import { useTheme } from '../../../lib/theme';
|
29
30
|
export var aspectRatioVariants = cva('', {
|
30
31
|
variants: {
|
31
32
|
scaling: __assign({}, scalingVariants),
|
@@ -36,7 +37,8 @@ export var aspectRatioVariants = cva('', {
|
|
36
37
|
});
|
37
38
|
var AspectRatio = forwardRef(function (_a, ref) {
|
38
39
|
var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, ["children", "className", "ratio", "scaling"]);
|
39
|
-
|
40
|
+
var theme = useTheme().theme;
|
41
|
+
return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: theme.themeScaling || scaling }), className), children: children })));
|
40
42
|
});
|
41
43
|
AspectRatio.displayName = 'AspectRatio';
|
42
44
|
export default AspectRatio;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as e from"@radix-ui/react-aspect-ratio";import{cva as a}from"class-variance-authority";import{cn as o}from"../../utils/utils.mjs";import{scalingVariants as i}from"../../constants.mjs";import{useTheme as n}from"../../theme/ThemeProvider.mjs";var s=function(){return s=Object.assign||function(r){for(var t,e=1,a=arguments.length;e<a;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},s.apply(this,arguments)},c=function(r,t){var e={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&t.indexOf(a)<0&&(e[a]=r[a]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(r);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(r,a[o])&&(e[a[o]]=r[a[o]])}return e},l=a("",{variants:{scaling:s({},i)},defaultVariants:{scaling:"100%"}}),m=t((function(t,a){var i=t.children,m=t.className,p=t.ratio,f=void 0===p?16/9:p,u=t.scaling,y=c(t,["children","className","ratio","scaling"]),h=n().theme;return r(e.Root,s({ratio:f,ref:a},y,{className:o(l({scaling:h.themeScaling||u}),m),children:i}))}));m.displayName="AspectRatio";export{l as aspectRatioVariants,m as default};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../lib/components/AspectRatio/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nexport var aspectRatioVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar AspectRatio = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, [\"children\", \"className\", \"ratio\", \"scaling\"]);\n return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: scaling }), className), children: children })));\n});\nAspectRatio.displayName = 'AspectRatio';\nexport default AspectRatio;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","aspectRatioVariants","cva","variants","scaling","scalingVariants","defaultVariants","AspectRatio","forwardRef","_a","ref","children","className","_b","ratio","props","_jsx","AspectRatioPrimitive","Root","cn","displayName"],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../lib/components/AspectRatio/index.js"],"sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from 'react';\nimport * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';\nimport { cva } from 'class-variance-authority';\nimport { cn } from '../../../lib/utils/utils';\nimport { scalingVariants } from '../../../lib/constants';\nimport { useTheme } from '../../../lib/theme';\nexport var aspectRatioVariants = cva('', {\n variants: {\n scaling: __assign({}, scalingVariants),\n },\n defaultVariants: {\n scaling: '100%',\n },\n});\nvar AspectRatio = forwardRef(function (_a, ref) {\n var children = _a.children, className = _a.className, _b = _a.ratio, ratio = _b === void 0 ? 16 / 9 : _b, scaling = _a.scaling, props = __rest(_a, [\"children\", \"className\", \"ratio\", \"scaling\"]);\n var theme = useTheme().theme;\n return (_jsx(AspectRatioPrimitive.Root, __assign({ ratio: ratio, ref: ref }, props, { className: cn(aspectRatioVariants({ scaling: theme.themeScaling || scaling }), className), children: children })));\n});\nAspectRatio.displayName = 'AspectRatio';\nexport default AspectRatio;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","aspectRatioVariants","cva","variants","scaling","scalingVariants","defaultVariants","AspectRatio","forwardRef","_a","ref","children","className","_b","ratio","props","theme","useTheme","_jsx","AspectRatioPrimitive","Root","cn","themeScaling","displayName"],"mappings":"mUAAA,IAAIA,EAAsC,WAStC,OARAA,EAAWC,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KACzDN,EAAEM,GAAKL,EAAEK,IAEjB,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EACIQ,EAAkC,SAAUX,EAAGY,GAC/C,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3DW,EAAEC,QAAQR,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUS,qBAAqBP,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,EAQWiB,EAAsBC,EAAI,GAAI,CACrCC,SAAU,CACNC,QAASvB,EAAS,CAAE,EAAEwB,IAE1BC,gBAAiB,CACbF,QAAS,UAGbG,EAAcC,GAAW,SAAUC,EAAIC,GACvC,IAAIC,EAAWF,EAAGE,SAAUC,EAAYH,EAAGG,UAAWC,EAAKJ,EAAGK,MAAOA,OAAe,IAAPD,EAAgB,GAAK,EAAIA,EAAIT,EAAUK,EAAGL,QAASW,EAAQnB,EAAOa,EAAI,CAAC,WAAY,YAAa,QAAS,YAClLO,EAAQC,IAAWD,MACvB,OAAQE,EAAKC,EAAqBC,KAAMvC,EAAS,CAAEiC,MAAOA,EAAOJ,IAAKA,GAAOK,EAAO,CAAEH,UAAWS,EAAGpB,EAAoB,CAAEG,QAASY,EAAMM,cAAgBlB,IAAYQ,GAAYD,SAAUA,IAC/L,IACAJ,EAAYgB,YAAc"}
|
@@ -12,7 +12,7 @@ export interface AvatarProps extends VariantProps<typeof AvatarVariants> {
|
|
12
12
|
delayMs?: number;
|
13
13
|
}
|
14
14
|
declare const AvatarVariants: (props?: ({
|
15
|
-
radius?: "
|
15
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
16
16
|
size?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | null | undefined;
|
17
17
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
18
18
|
color?: string | null | undefined;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
'use client';
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
2
3
|
__assign = Object.assign || function(t) {
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
@@ -26,6 +27,7 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
26
27
|
import { cva } from 'class-variance-authority';
|
27
28
|
import { cn } from '../../../lib/utils/utils';
|
28
29
|
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants } from '../../../lib/constants';
|
30
|
+
import { useTheme } from '../../../lib/theme/ThemeProvider';
|
29
31
|
var AvatarVariants = cva('font-medium', {
|
30
32
|
variants: {
|
31
33
|
radius: __assign({}, radiusVariants['base']),
|
@@ -51,8 +53,14 @@ var AvatarVariants = cva('font-medium', {
|
|
51
53
|
});
|
52
54
|
var Avatar = forwardRef(function (_a, ref) {
|
53
55
|
var className = _a.className, fallbackClassName = _a.fallbackClassName, radius = _a.radius, scaling = _a.scaling, size = _a.size, fallbackText = _a.fallbackText, imagePath = _a.imagePath, alt = _a.alt, _b = _a.appearance, appearance = _b === void 0 ? 'solid' : _b, _c = _a.color, color = _c === void 0 ? 'red' : _c, ariaLabel = _a.ariaLabel, ariaLabelledby = _a.ariaLabelledby, title = _a.title, _d = _a.delayMs, delayMs = _d === void 0 ? 300 : _d, props = __rest(_a, ["className", "fallbackClassName", "radius", "scaling", "size", "fallbackText", "imagePath", "alt", "appearance", "color", "ariaLabel", "ariaLabelledby", "title", "delayMs"]);
|
56
|
+
var theme = useTheme().theme;
|
57
|
+
var avatarStyle = {
|
58
|
+
radius: theme.themeRadius || radius,
|
59
|
+
scaling: theme.themeScaling || scaling,
|
60
|
+
color: theme.themeColor || color,
|
61
|
+
};
|
54
62
|
var imgAltText = alt || ariaLabel || fallbackText || 'Avatar Image';
|
55
|
-
return (_jsxs(AvatarPrimitive.Root, __assign({ className: cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants(
|
63
|
+
return (_jsxs(AvatarPrimitive.Root, __assign({ className: cn("inline-flex select-none items-center justify-center overflow-hidden align-middle", AvatarVariants(avatarStyle), appearanceStyle(appearance, avatarStyle.color, false), className) }, props, { ref: ref, role: "img", "aria-label": ariaLabel || imgAltText, "aria-labelledby": ariaLabelledby, title: title || imgAltText, tabIndex: 0, children: [_jsx(AvatarPrimitive.Image, { className: "h-full w-full border-none object-cover", src: imagePath, alt: imgAltText, title: title || imgAltText }), _jsx(AvatarPrimitive.Fallback, { className: cn("leading-1 flex h-full w-full items-center justify-center", className), delayMs: delayMs, "aria-hidden": "true", children: fallbackText })] })));
|
56
64
|
});
|
57
65
|
Avatar.displayName = 'Avatar';
|
58
66
|
export default Avatar;
|
@@ -1,2 +1,3 @@
|
|
1
|
-
|
1
|
+
"use client";
|
2
|
+
import{jsxs as e,jsx as a}from"react/jsx-runtime";import{forwardRef as t}from"react";import*as r from"@radix-ui/react-avatar";import{cva as l}from"class-variance-authority";import{cn as i}from"../../utils/utils.mjs";import{radiusVariants as o,scalingVariants as s,primaryColorStyle as n,appearanceStyle as p}from"../../constants.mjs";import{useTheme as c}from"../../theme/ThemeProvider.mjs";var x=function(){return x=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var l in a=arguments[t])Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l]);return e},x.apply(this,arguments)},m=function(e,a){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(r=Object.getOwnPropertySymbols(e);l<r.length;l++)a.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(t[r[l]]=e[r[l]])}return t},f=l("font-medium",{variants:{radius:x({},o.base),size:{1:"h-[24px] w-[24px] text-[12px]",2:"h-[32px] w-[32px] text-[14px]",3:"h-[40px] w-[40px] text-[16px]",4:"h-[48px] w-[48px] text-[18px]",5:"h-[64px] w-[64px] text-[24px]",6:"h-[80px] w-[80px] text-[28px]",7:"h-[96px] w-[96px] text-[28px]",8:"h-[128px] w-[128px] text-[35px]",9:"h-[160px] w-[160px] text-[60px]"},scaling:x({},s),color:n()},defaultVariants:{radius:"full",color:"red",size:"3"}}),d=t((function(t,l){var o=t.className;t.fallbackClassName;var s=t.radius,n=t.scaling;t.size;var d=t.fallbackText,u=t.imagePath,h=t.alt,b=t.appearance,y=void 0===b?"solid":b,v=t.color,g=void 0===v?"red":v,w=t.ariaLabel,j=t.ariaLabelledby,O=t.title,N=t.delayMs,P=void 0===N?300:N,k=m(t,["className","fallbackClassName","radius","scaling","size","fallbackText","imagePath","alt","appearance","color","ariaLabel","ariaLabelledby","title","delayMs"]),z=c().theme,I={radius:z.themeRadius||s,scaling:z.themeScaling||n,color:z.themeColor||g},L=h||w||d||"Avatar Image";return e(r.Root,x({className:i("inline-flex select-none items-center justify-center overflow-hidden align-middle",f(I),p(y,I.color,!1),o)},k,{ref:l,role:"img","aria-label":w||L,"aria-labelledby":j,title:O||L,tabIndex:0,children:[a(r.Image,{className:"h-full w-full border-none object-cover",src:u,alt:L,title:O||L}),a(r.Fallback,{className:i("leading-1 flex h-full w-full items-center justify-center",o),delayMs:P,"aria-hidden":"true",children:d})]}))}));d.displayName="Avatar";export{d as default};
|
2
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -8,10 +8,10 @@ export interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps
|
|
8
8
|
weight?: IWeight;
|
9
9
|
}
|
10
10
|
declare const BadgeVariants: (props?: ({
|
11
|
-
radius?: "
|
11
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
12
12
|
size?: "small" | "medium" | "large" | null | undefined;
|
13
13
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
14
|
-
weight?: "
|
14
|
+
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
15
15
|
color?: string | null | undefined;
|
16
16
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
17
17
|
declare const Badge: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
@@ -25,6 +25,7 @@ import { forwardRef } from 'react';
|
|
25
25
|
import { cva } from 'class-variance-authority';
|
26
26
|
import { cn } from '../../../lib/utils/utils';
|
27
27
|
import { appearanceStyle, primaryColorStyle, radiusVariants, scalingVariants, weightVariants, } from '../../../lib/constants';
|
28
|
+
import { useTheme } from '../../../lib/theme';
|
28
29
|
var BadgeVariants = cva('inline-flex items-center transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 w-fit', {
|
29
30
|
variants: {
|
30
31
|
radius: __assign({}, radiusVariants['base']),
|
@@ -47,7 +48,15 @@ var BadgeVariants = cva('inline-flex items-center transition-colors focus:outlin
|
|
47
48
|
});
|
48
49
|
var Badge = forwardRef(function (_a, ref) {
|
49
50
|
var className = _a.className, children = _a.children, radius = _a.radius, scaling = _a.scaling, weight = _a.weight, size = _a.size, _b = _a.color, color = _b === void 0 ? 'red' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, props = __rest(_a, ["className", "children", "radius", "scaling", "weight", "size", "color", "appearance"]);
|
50
|
-
var
|
51
|
+
var theme = useTheme().theme;
|
52
|
+
var badgeStyle = {
|
53
|
+
radius: theme.themeRadius || radius,
|
54
|
+
scaling: theme.themeScaling || scaling,
|
55
|
+
weight: theme.themeWeight || weight,
|
56
|
+
color: theme.themeColor || color,
|
57
|
+
size: size,
|
58
|
+
};
|
59
|
+
var badgeClassName = cn(BadgeVariants(badgeStyle), appearanceStyle(appearance, badgeStyle.color, false), className);
|
51
60
|
return (_jsx("div", __assign({ ref: ref, className: badgeClassName }, props, { children: children })));
|
52
61
|
});
|
53
62
|
Badge.displayName = 'Badge';
|