@nexus-cross/design-system 1.0.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/cursor-rules/nexus-project-setup.mdc +292 -0
- package/cursor-rules/nexus-ui-api.mdc +698 -0
- package/cursor-rules/nexus-ui-components.mdc +136 -0
- package/dist/accordion.d.mts +28 -0
- package/dist/accordion.d.ts +28 -0
- package/dist/accordion.js +28 -0
- package/dist/accordion.mjs +3 -0
- package/dist/avatar.d.mts +17 -0
- package/dist/avatar.d.ts +17 -0
- package/dist/avatar.js +16 -0
- package/dist/avatar.mjs +3 -0
- package/dist/button.d.mts +17 -0
- package/dist/button.d.ts +17 -0
- package/dist/button.js +16 -0
- package/dist/button.mjs +3 -0
- package/dist/carousel.d.mts +36 -0
- package/dist/carousel.d.ts +36 -0
- package/dist/carousel.js +32 -0
- package/dist/carousel.mjs +3 -0
- package/dist/checkbox.d.mts +21 -0
- package/dist/checkbox.d.ts +21 -0
- package/dist/checkbox.js +20 -0
- package/dist/checkbox.mjs +3 -0
- package/dist/chip.d.mts +16 -0
- package/dist/chip.d.ts +16 -0
- package/dist/chip.js +16 -0
- package/dist/chip.mjs +3 -0
- package/dist/chunks/chunk-22ULI3BF.js +21 -0
- package/dist/chunks/chunk-26BUGBOY.mjs +57 -0
- package/dist/chunks/chunk-2JTPRBHZ.mjs +36 -0
- package/dist/chunks/chunk-2MC7XJSE.js +98 -0
- package/dist/chunks/chunk-2RPRCWKV.mjs +139 -0
- package/dist/chunks/chunk-2ZXDXO4I.js +166 -0
- package/dist/chunks/chunk-33UFQJIO.mjs +135 -0
- package/dist/chunks/chunk-3HHJORN7.mjs +137 -0
- package/dist/chunks/chunk-3PCNRCTB.js +61 -0
- package/dist/chunks/chunk-3VFBPFZF.mjs +640 -0
- package/dist/chunks/chunk-4J3GCZ7W.mjs +102 -0
- package/dist/chunks/chunk-54IA2P2Z.mjs +40 -0
- package/dist/chunks/chunk-54RBL7J4.mjs +179 -0
- package/dist/chunks/chunk-5JHJNN2K.js +83 -0
- package/dist/chunks/chunk-5JHN4FCY.mjs +58 -0
- package/dist/chunks/chunk-6FMDO6TT.mjs +114 -0
- package/dist/chunks/chunk-6H7V2I3X.mjs +270 -0
- package/dist/chunks/chunk-7AISZYWL.js +7 -0
- package/dist/chunks/chunk-7G65JBTN.js +133 -0
- package/dist/chunks/chunk-ADO7PDLY.mjs +66 -0
- package/dist/chunks/chunk-AFSEYJZT.js +267 -0
- package/dist/chunks/chunk-AOXXE5UQ.mjs +14 -0
- package/dist/chunks/chunk-AZ2URLDD.js +39 -0
- package/dist/chunks/chunk-B6G5TJRO.js +116 -0
- package/dist/chunks/chunk-BLGQHR3M.js +56 -0
- package/dist/chunks/chunk-BPUQ2CO2.mjs +48 -0
- package/dist/chunks/chunk-BSZ2LN6E.js +129 -0
- package/dist/chunks/chunk-CA3SOLI3.mjs +78 -0
- package/dist/chunks/chunk-CSJDDREF.js +90 -0
- package/dist/chunks/chunk-CVYXRSXT.mjs +8 -0
- package/dist/chunks/chunk-CZC76ZD5.js +10 -0
- package/dist/chunks/chunk-D6FII7HW.js +202 -0
- package/dist/chunks/chunk-DLFV7ZZV.js +112 -0
- package/dist/chunks/chunk-DO6VK2QQ.mjs +108 -0
- package/dist/chunks/chunk-ECVAVQUY.mjs +243 -0
- package/dist/chunks/chunk-EHAUUUWB.mjs +120 -0
- package/dist/chunks/chunk-EVOOTSY5.js +59 -0
- package/dist/chunks/chunk-GX6GSWX3.mjs +38 -0
- package/dist/chunks/chunk-HHXDOKXY.js +108 -0
- package/dist/chunks/chunk-HNLI646G.mjs +325 -0
- package/dist/chunks/chunk-HUPAHDJ7.js +273 -0
- package/dist/chunks/chunk-I252NERB.mjs +21 -0
- package/dist/chunks/chunk-IE4DGLMH.js +75 -0
- package/dist/chunks/chunk-INP2AH3B.js +27 -0
- package/dist/chunks/chunk-IOSIQLZL.js +70 -0
- package/dist/chunks/chunk-J5ZKGPBY.js +132 -0
- package/dist/chunks/chunk-JNMCYWGY.js +10 -0
- package/dist/chunks/chunk-LI7SFBUQ.mjs +89 -0
- package/dist/chunks/chunk-LMMON5AU.mjs +81 -0
- package/dist/chunks/chunk-LOQXCHKL.js +74 -0
- package/dist/chunks/chunk-MA2VCCIY.js +71 -0
- package/dist/chunks/chunk-MCKOWMLS.mjs +8 -0
- package/dist/chunks/chunk-MRRKW5QN.mjs +108 -0
- package/dist/chunks/chunk-MTX7GD3H.js +80 -0
- package/dist/chunks/chunk-NFIPQZ4O.js +100 -0
- package/dist/chunks/chunk-NHDGKOAM.js +104 -0
- package/dist/chunks/chunk-OMN5YQCE.js +143 -0
- package/dist/chunks/chunk-OTGS6BDQ.mjs +25 -0
- package/dist/chunks/chunk-P2T72N62.mjs +34 -0
- package/dist/chunks/chunk-P3DZKXG4.js +116 -0
- package/dist/chunks/chunk-QK6NCII4.js +36 -0
- package/dist/chunks/chunk-QZ4QR3XV.mjs +142 -0
- package/dist/chunks/chunk-RS3SBY3I.js +163 -0
- package/dist/chunks/chunk-RX5UKRYK.mjs +76 -0
- package/dist/chunks/chunk-SGNRVYYQ.mjs +99 -0
- package/dist/chunks/chunk-SJMCPSVH.mjs +76 -0
- package/dist/chunks/chunk-T2IY2TSR.js +43 -0
- package/dist/chunks/chunk-U53UA76K.js +653 -0
- package/dist/chunks/chunk-U56AGSLE.mjs +106 -0
- package/dist/chunks/chunk-ULGYTBCT.mjs +47 -0
- package/dist/chunks/chunk-V5OTJP6H.mjs +5 -0
- package/dist/chunks/chunk-VGO4Z2WH.js +336 -0
- package/dist/chunks/chunk-VIGRCJAE.mjs +37 -0
- package/dist/chunks/chunk-VVXQZ4XH.mjs +93 -0
- package/dist/chunks/chunk-W4GG5A7K.mjs +51 -0
- package/dist/chunks/chunk-WKCXACMZ.js +99 -0
- package/dist/chunks/chunk-WR55D4ZS.js +80 -0
- package/dist/chunks/chunk-X2SHTVZQ.js +89 -0
- package/dist/chunks/chunk-XEHFB62A.js +82 -0
- package/dist/chunks/chunk-XG6QG65W.mjs +63 -0
- package/dist/chunks/chunk-YB5ZKHVB.js +64 -0
- package/dist/chunks/chunk-YCG4FZC3.js +167 -0
- package/dist/chunks/chunk-YEWKPWK3.mjs +80 -0
- package/dist/chunks/chunk-YLO4UKSC.mjs +48 -0
- package/dist/chunks/chunk-YZV6FWE7.js +160 -0
- package/dist/chunks/chunk-ZWSIIGA3.mjs +58 -0
- package/dist/client-only.d.mts +13 -0
- package/dist/client-only.d.ts +13 -0
- package/dist/client-only.js +11 -0
- package/dist/client-only.mjs +2 -0
- package/dist/countdown.d.mts +27 -0
- package/dist/countdown.d.ts +27 -0
- package/dist/countdown.js +16 -0
- package/dist/countdown.mjs +3 -0
- package/dist/counter.d.mts +15 -0
- package/dist/counter.d.ts +15 -0
- package/dist/counter.js +11 -0
- package/dist/counter.mjs +2 -0
- package/dist/data-list.d.mts +33 -0
- package/dist/data-list.d.ts +33 -0
- package/dist/data-list.js +14 -0
- package/dist/data-list.mjs +5 -0
- package/dist/divider.d.mts +14 -0
- package/dist/divider.d.ts +14 -0
- package/dist/divider.js +16 -0
- package/dist/divider.mjs +3 -0
- package/dist/drawer.d.mts +42 -0
- package/dist/drawer.d.ts +42 -0
- package/dist/drawer.js +44 -0
- package/dist/drawer.mjs +3 -0
- package/dist/ellipsis.d.mts +16 -0
- package/dist/ellipsis.d.ts +16 -0
- package/dist/ellipsis.js +12 -0
- package/dist/ellipsis.mjs +3 -0
- package/dist/error-boundary.d.mts +20 -0
- package/dist/error-boundary.d.ts +20 -0
- package/dist/error-boundary.js +11 -0
- package/dist/error-boundary.mjs +2 -0
- package/dist/hooks/useCheckDevice.d.mts +47 -0
- package/dist/hooks/useCheckDevice.d.ts +47 -0
- package/dist/hooks/useCheckDevice.js +8 -0
- package/dist/hooks/useCheckDevice.mjs +2 -0
- package/dist/hooks/useClickOutside.d.mts +12 -0
- package/dist/hooks/useClickOutside.d.ts +12 -0
- package/dist/hooks/useClickOutside.js +8 -0
- package/dist/hooks/useClickOutside.mjs +2 -0
- package/dist/hooks/useDraggableBottomSheet.d.mts +24 -0
- package/dist/hooks/useDraggableBottomSheet.d.ts +24 -0
- package/dist/hooks/useDraggableBottomSheet.js +11 -0
- package/dist/hooks/useDraggableBottomSheet.mjs +2 -0
- package/dist/hooks/useDraggableWindow.d.mts +21 -0
- package/dist/hooks/useDraggableWindow.d.ts +21 -0
- package/dist/hooks/useDraggableWindow.js +11 -0
- package/dist/hooks/useDraggableWindow.mjs +2 -0
- package/dist/hooks/useInView.d.mts +14 -0
- package/dist/hooks/useInView.d.ts +14 -0
- package/dist/hooks/useInView.js +17 -0
- package/dist/hooks/useInView.mjs +2 -0
- package/dist/hooks/useModal.d.mts +2 -0
- package/dist/hooks/useModal.d.ts +2 -0
- package/dist/hooks/useModal.js +11 -0
- package/dist/hooks/useModal.mjs +2 -0
- package/dist/index.d.mts +76 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +746 -0
- package/dist/index.mjs +328 -0
- package/dist/infinite-scroll.d.mts +26 -0
- package/dist/infinite-scroll.d.ts +26 -0
- package/dist/infinite-scroll.js +12 -0
- package/dist/infinite-scroll.mjs +3 -0
- package/dist/marquee.d.mts +12 -0
- package/dist/marquee.d.ts +12 -0
- package/dist/marquee.js +12 -0
- package/dist/marquee.mjs +3 -0
- package/dist/modal/index.d.mts +87 -0
- package/dist/modal/index.d.ts +87 -0
- package/dist/modal/index.js +54 -0
- package/dist/modal/index.mjs +9 -0
- package/dist/number-input.d.mts +38 -0
- package/dist/number-input.d.ts +38 -0
- package/dist/number-input.js +20 -0
- package/dist/number-input.mjs +3 -0
- package/dist/pagination.d.mts +22 -0
- package/dist/pagination.d.ts +22 -0
- package/dist/pagination.js +20 -0
- package/dist/pagination.mjs +3 -0
- package/dist/popover.d.mts +25 -0
- package/dist/popover.d.ts +25 -0
- package/dist/popover.js +32 -0
- package/dist/popover.mjs +3 -0
- package/dist/radio-group.d.mts +29 -0
- package/dist/radio-group.d.ts +29 -0
- package/dist/radio-group.js +24 -0
- package/dist/radio-group.mjs +3 -0
- package/dist/schemas/_all.json +2250 -0
- package/dist/schemas/accordion.json +101 -0
- package/dist/schemas/avatar.json +55 -0
- package/dist/schemas/button.json +71 -0
- package/dist/schemas/carousel.json +32 -0
- package/dist/schemas/carouselButton.json +20 -0
- package/dist/schemas/carouselDots.json +17 -0
- package/dist/schemas/carouselSlide.json +20 -0
- package/dist/schemas/checkBox.json +57 -0
- package/dist/schemas/chip.json +49 -0
- package/dist/schemas/clientOnly.json +19 -0
- package/dist/schemas/countdown.json +58 -0
- package/dist/schemas/counter.json +57 -0
- package/dist/schemas/dataList.json +56 -0
- package/dist/schemas/divider.json +40 -0
- package/dist/schemas/drawer.json +27 -0
- package/dist/schemas/drawerContent.json +50 -0
- package/dist/schemas/ellipsis.json +49 -0
- package/dist/schemas/errorBoundary.json +22 -0
- package/dist/schemas/infiniteScroll.json +65 -0
- package/dist/schemas/marquee.json +46 -0
- package/dist/schemas/modalCall.json +21 -0
- package/dist/schemas/modalTemplate.json +123 -0
- package/dist/schemas/numberInput.json +77 -0
- package/dist/schemas/pagination.json +50 -0
- package/dist/schemas/popover.json +67 -0
- package/dist/schemas/radioGroup.json +61 -0
- package/dist/schemas/radioItem.json +35 -0
- package/dist/schemas/select.json +62 -0
- package/dist/schemas/selectItem.json +31 -0
- package/dist/schemas/skeleton.json +48 -0
- package/dist/schemas/spinner.json +27 -0
- package/dist/schemas/switch.json +41 -0
- package/dist/schemas/tab.json +89 -0
- package/dist/schemas/table.json +75 -0
- package/dist/schemas/tableRow.json +32 -0
- package/dist/schemas/tdColumn.json +107 -0
- package/dist/schemas/textArea.json +44 -0
- package/dist/schemas/textInput.json +67 -0
- package/dist/schemas/themeProvider.json +65 -0
- package/dist/schemas/toaster.json +31 -0
- package/dist/schemas/tooltip.json +67 -0
- package/dist/schemas/virtualGrid.json +59 -0
- package/dist/schemas/virtualList.json +54 -0
- package/dist/schemas.d.mts +1263 -0
- package/dist/schemas.d.ts +1263 -0
- package/dist/schemas.js +513 -0
- package/dist/schemas.mjs +469 -0
- package/dist/select.d.mts +31 -0
- package/dist/select.d.ts +31 -0
- package/dist/select.js +24 -0
- package/dist/select.mjs +3 -0
- package/dist/skeleton.d.mts +15 -0
- package/dist/skeleton.d.ts +15 -0
- package/dist/skeleton.js +12 -0
- package/dist/skeleton.mjs +3 -0
- package/dist/spinner.d.mts +9 -0
- package/dist/spinner.d.ts +9 -0
- package/dist/spinner.js +12 -0
- package/dist/spinner.mjs +3 -0
- package/dist/styles/layer.d.mts +3 -0
- package/dist/styles/layer.d.ts +3 -0
- package/dist/styles/layer.js +18 -0
- package/dist/styles/layer.mjs +16 -0
- package/dist/styles.css +2401 -0
- package/dist/styles.d.mts +3 -0
- package/dist/styles.d.ts +3 -0
- package/dist/styles.js +16 -0
- package/dist/styles.layered.css +2404 -0
- package/dist/styles.mjs +14 -0
- package/dist/switch.d.mts +15 -0
- package/dist/switch.d.ts +15 -0
- package/dist/switch.js +16 -0
- package/dist/switch.mjs +3 -0
- package/dist/tab.d.mts +36 -0
- package/dist/tab.d.ts +36 -0
- package/dist/tab.js +20 -0
- package/dist/tab.mjs +3 -0
- package/dist/table.d.mts +80 -0
- package/dist/table.d.ts +80 -0
- package/dist/table.js +33 -0
- package/dist/table.mjs +4 -0
- package/dist/text-area.d.mts +15 -0
- package/dist/text-area.d.ts +15 -0
- package/dist/text-area.js +16 -0
- package/dist/text-area.mjs +3 -0
- package/dist/text-input.d.mts +21 -0
- package/dist/text-input.d.ts +21 -0
- package/dist/text-input.js +16 -0
- package/dist/text-input.mjs +3 -0
- package/dist/theme-provider.d.mts +25 -0
- package/dist/theme-provider.d.ts +25 -0
- package/dist/theme-provider.js +15 -0
- package/dist/theme-provider.mjs +2 -0
- package/dist/toast.d.mts +42 -0
- package/dist/toast.d.ts +42 -0
- package/dist/toast.js +20 -0
- package/dist/toast.mjs +3 -0
- package/dist/tooltip.d.mts +24 -0
- package/dist/tooltip.d.ts +24 -0
- package/dist/tooltip.js +20 -0
- package/dist/tooltip.mjs +3 -0
- package/dist/useModal-BsGIcP8t.d.mts +128 -0
- package/dist/useModal-BsGIcP8t.d.ts +128 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +11 -0
- package/dist/utils/cn.mjs +2 -0
- package/dist/utils/scroll.d.mts +4 -0
- package/dist/utils/scroll.d.ts +4 -0
- package/dist/utils/scroll.js +15 -0
- package/dist/utils/scroll.mjs +2 -0
- package/dist/virtual-scroll.d.mts +34 -0
- package/dist/virtual-scroll.d.ts +34 -0
- package/dist/virtual-scroll.js +16 -0
- package/dist/virtual-scroll.mjs +3 -0
- package/package.json +291 -0
- package/scripts/setup-cursor-rules.cjs +92 -0
package/dist/styles.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { built_default } from './chunks/chunk-V5OTJP6H.mjs';
|
|
2
|
+
import './chunks/chunk-CVYXRSXT.mjs';
|
|
3
|
+
|
|
4
|
+
// src/styles/inject.ts
|
|
5
|
+
var STYLE_ID = "__nexus-ds__";
|
|
6
|
+
var __nexus_styles_injected__ = typeof document !== "undefined" && !document.getElementById(STYLE_ID) ? (() => {
|
|
7
|
+
const style = document.createElement("style");
|
|
8
|
+
style.id = STYLE_ID;
|
|
9
|
+
style.textContent = built_default;
|
|
10
|
+
document.head.appendChild(style);
|
|
11
|
+
return true;
|
|
12
|
+
})() : false;
|
|
13
|
+
|
|
14
|
+
export { __nexus_styles_injected__ };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const switchVariants: (props?: ({
|
|
6
|
+
size?: "md" | "sm" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'>, VariantProps<typeof switchVariants> {
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
11
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
12
|
+
}
|
|
13
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
|
|
15
|
+
export { Switch, type SwitchProps, switchVariants };
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const switchVariants: (props?: ({
|
|
6
|
+
size?: "md" | "sm" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'onChange'>, VariantProps<typeof switchVariants> {
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
11
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
12
|
+
}
|
|
13
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
|
|
15
|
+
export { Switch, type SwitchProps, switchVariants };
|
package/dist/switch.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkX2SHTVZQ_js = require('./chunks/chunk-X2SHTVZQ.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Switch", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkX2SHTVZQ_js.Switch; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "switchVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkX2SHTVZQ_js.switchVariants; }
|
|
16
|
+
});
|
package/dist/switch.mjs
ADDED
package/dist/tab.d.mts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const tabListVariants: (props?: ({
|
|
7
|
+
variant?: "line" | "pill" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare const tabTriggerVariants: (props?: ({
|
|
10
|
+
variant?: "line" | "pill" | null | undefined;
|
|
11
|
+
size?: "md" | "sm" | null | undefined;
|
|
12
|
+
active?: boolean | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
interface TabItem {
|
|
15
|
+
key: string;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface TabProps extends VariantProps<typeof tabListVariants> {
|
|
21
|
+
items: TabItem[];
|
|
22
|
+
activeKey?: string;
|
|
23
|
+
defaultActiveKey?: string;
|
|
24
|
+
size?: 'sm' | 'md';
|
|
25
|
+
destroyInactive?: boolean;
|
|
26
|
+
onTabChange?: (key: string) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
tabListClassName?: string;
|
|
29
|
+
tabPanelClassName?: string;
|
|
30
|
+
}
|
|
31
|
+
declare function Tab({ items, activeKey: controlledKey, defaultActiveKey, variant, size, destroyInactive, onTabChange, className, tabListClassName, tabPanelClassName, }: TabProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare namespace Tab {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Tab, type TabItem, type TabProps, tabListVariants, tabTriggerVariants };
|
package/dist/tab.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const tabListVariants: (props?: ({
|
|
7
|
+
variant?: "line" | "pill" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare const tabTriggerVariants: (props?: ({
|
|
10
|
+
variant?: "line" | "pill" | null | undefined;
|
|
11
|
+
size?: "md" | "sm" | null | undefined;
|
|
12
|
+
active?: boolean | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
interface TabItem {
|
|
15
|
+
key: string;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface TabProps extends VariantProps<typeof tabListVariants> {
|
|
21
|
+
items: TabItem[];
|
|
22
|
+
activeKey?: string;
|
|
23
|
+
defaultActiveKey?: string;
|
|
24
|
+
size?: 'sm' | 'md';
|
|
25
|
+
destroyInactive?: boolean;
|
|
26
|
+
onTabChange?: (key: string) => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
tabListClassName?: string;
|
|
29
|
+
tabPanelClassName?: string;
|
|
30
|
+
}
|
|
31
|
+
declare function Tab({ items, activeKey: controlledKey, defaultActiveKey, variant, size, destroyInactive, onTabChange, className, tabListClassName, tabPanelClassName, }: TabProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare namespace Tab {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Tab, type TabItem, type TabProps, tabListVariants, tabTriggerVariants };
|
package/dist/tab.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2ZXDXO4I_js = require('./chunks/chunk-2ZXDXO4I.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Tab", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk2ZXDXO4I_js.Tab; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "tabListVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk2ZXDXO4I_js.tabListVariants; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "tabTriggerVariants", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk2ZXDXO4I_js.tabTriggerVariants; }
|
|
20
|
+
});
|
package/dist/tab.mjs
ADDED
package/dist/table.d.mts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactElement, ReactNode, MouseEvent } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
type TableThRowDataType = {
|
|
7
|
+
className?: string;
|
|
8
|
+
label?: ReactElement | string;
|
|
9
|
+
fieldId: string | null;
|
|
10
|
+
rowSpan?: number;
|
|
11
|
+
colSpan?: number;
|
|
12
|
+
thColSpan?: number;
|
|
13
|
+
thRowSpan?: number;
|
|
14
|
+
size?: number | string;
|
|
15
|
+
align?: 'center' | 'left' | 'right';
|
|
16
|
+
enableSorting?: boolean;
|
|
17
|
+
order?: 'desc' | 'asc' | '';
|
|
18
|
+
sortValue?: string | number;
|
|
19
|
+
handleClickSort?: (params: {
|
|
20
|
+
index: number;
|
|
21
|
+
fieldId: string;
|
|
22
|
+
order: 'desc' | 'asc' | '';
|
|
23
|
+
}) => Promise<void> | void;
|
|
24
|
+
};
|
|
25
|
+
type TableData = Record<string, unknown>;
|
|
26
|
+
type ChildrenFuncParamsType<T> = {
|
|
27
|
+
index: number;
|
|
28
|
+
item: T extends (infer R)[] ? R : never;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
interface TableProps<T extends TableData[]> {
|
|
32
|
+
className?: string;
|
|
33
|
+
theadClassName?: string;
|
|
34
|
+
notification?: ReactNode;
|
|
35
|
+
list: T | null | undefined;
|
|
36
|
+
noDataMsg?: ReactElement | string;
|
|
37
|
+
hideThead?: boolean;
|
|
38
|
+
sortUpElement?: ReactElement | string;
|
|
39
|
+
sortDownElement?: ReactElement | string;
|
|
40
|
+
loadingType?: 'loading' | 'skeleton';
|
|
41
|
+
loadingElement?: ReactElement;
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
skeletonCount?: number;
|
|
44
|
+
children: (obj: ChildrenFuncParamsType<T>) => ReactNode;
|
|
45
|
+
}
|
|
46
|
+
declare function Table<T extends TableData[]>({ className, theadClassName, list, children, loadingElement, noDataMsg, hideThead, sortUpElement, sortDownElement, loadingType, loading, skeletonCount, notification, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const tableRowVariants: (props?: ({
|
|
49
|
+
variant?: "default" | "accent" | null | undefined;
|
|
50
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
|
+
type TableRowProps = VariantProps<typeof tableRowVariants> & {
|
|
52
|
+
className?: string;
|
|
53
|
+
children: ReactNode | string;
|
|
54
|
+
onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
|
|
55
|
+
};
|
|
56
|
+
declare const TableRow: {
|
|
57
|
+
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
type TdColumnProps = TableThRowDataType & {
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
textOverflow?: 'auto' | 'truncate' | 'wrap' | 'break-all';
|
|
64
|
+
highlightKey?: string | null;
|
|
65
|
+
};
|
|
66
|
+
declare const TdColumn: {
|
|
67
|
+
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
68
|
+
displayName: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type TableHighlightContextType = {
|
|
72
|
+
highlightValue: string | null;
|
|
73
|
+
setHighlightValue: (value: string | null) => void;
|
|
74
|
+
};
|
|
75
|
+
declare const useTableHighlight: () => TableHighlightContextType;
|
|
76
|
+
declare const TableHighlightProvider: ({ children }: {
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
79
|
+
|
|
80
|
+
export { type ChildrenFuncParamsType, Table, type TableData, TableHighlightProvider, type TableProps, TableRow, type TableRowProps, type TableThRowDataType, TdColumn, type TdColumnProps, tableRowVariants, useTableHighlight };
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactElement, ReactNode, MouseEvent } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
type TableThRowDataType = {
|
|
7
|
+
className?: string;
|
|
8
|
+
label?: ReactElement | string;
|
|
9
|
+
fieldId: string | null;
|
|
10
|
+
rowSpan?: number;
|
|
11
|
+
colSpan?: number;
|
|
12
|
+
thColSpan?: number;
|
|
13
|
+
thRowSpan?: number;
|
|
14
|
+
size?: number | string;
|
|
15
|
+
align?: 'center' | 'left' | 'right';
|
|
16
|
+
enableSorting?: boolean;
|
|
17
|
+
order?: 'desc' | 'asc' | '';
|
|
18
|
+
sortValue?: string | number;
|
|
19
|
+
handleClickSort?: (params: {
|
|
20
|
+
index: number;
|
|
21
|
+
fieldId: string;
|
|
22
|
+
order: 'desc' | 'asc' | '';
|
|
23
|
+
}) => Promise<void> | void;
|
|
24
|
+
};
|
|
25
|
+
type TableData = Record<string, unknown>;
|
|
26
|
+
type ChildrenFuncParamsType<T> = {
|
|
27
|
+
index: number;
|
|
28
|
+
item: T extends (infer R)[] ? R : never;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
interface TableProps<T extends TableData[]> {
|
|
32
|
+
className?: string;
|
|
33
|
+
theadClassName?: string;
|
|
34
|
+
notification?: ReactNode;
|
|
35
|
+
list: T | null | undefined;
|
|
36
|
+
noDataMsg?: ReactElement | string;
|
|
37
|
+
hideThead?: boolean;
|
|
38
|
+
sortUpElement?: ReactElement | string;
|
|
39
|
+
sortDownElement?: ReactElement | string;
|
|
40
|
+
loadingType?: 'loading' | 'skeleton';
|
|
41
|
+
loadingElement?: ReactElement;
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
skeletonCount?: number;
|
|
44
|
+
children: (obj: ChildrenFuncParamsType<T>) => ReactNode;
|
|
45
|
+
}
|
|
46
|
+
declare function Table<T extends TableData[]>({ className, theadClassName, list, children, loadingElement, noDataMsg, hideThead, sortUpElement, sortDownElement, loadingType, loading, skeletonCount, notification, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const tableRowVariants: (props?: ({
|
|
49
|
+
variant?: "default" | "accent" | null | undefined;
|
|
50
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
|
+
type TableRowProps = VariantProps<typeof tableRowVariants> & {
|
|
52
|
+
className?: string;
|
|
53
|
+
children: ReactNode | string;
|
|
54
|
+
onClick?: (e: MouseEvent<HTMLTableRowElement>) => void;
|
|
55
|
+
};
|
|
56
|
+
declare const TableRow: {
|
|
57
|
+
({ className, children, onClick, variant }: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
type TdColumnProps = TableThRowDataType & {
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
textOverflow?: 'auto' | 'truncate' | 'wrap' | 'break-all';
|
|
64
|
+
highlightKey?: string | null;
|
|
65
|
+
};
|
|
66
|
+
declare const TdColumn: {
|
|
67
|
+
({ className, children, fieldId, size, colSpan, rowSpan, align, textOverflow, highlightKey, }: TdColumnProps): react_jsx_runtime.JSX.Element;
|
|
68
|
+
displayName: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type TableHighlightContextType = {
|
|
72
|
+
highlightValue: string | null;
|
|
73
|
+
setHighlightValue: (value: string | null) => void;
|
|
74
|
+
};
|
|
75
|
+
declare const useTableHighlight: () => TableHighlightContextType;
|
|
76
|
+
declare const TableHighlightProvider: ({ children }: {
|
|
77
|
+
children: ReactNode;
|
|
78
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
79
|
+
|
|
80
|
+
export { type ChildrenFuncParamsType, Table, type TableData, TableHighlightProvider, type TableProps, TableRow, type TableRowProps, type TableThRowDataType, TdColumn, type TdColumnProps, tableRowVariants, useTableHighlight };
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkVGO4Z2WH_js = require('./chunks/chunk-VGO4Z2WH.js');
|
|
4
|
+
require('./chunks/chunk-BLGQHR3M.js');
|
|
5
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
6
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "Table", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkVGO4Z2WH_js.Table; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "TableHighlightProvider", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkVGO4Z2WH_js.TableHighlightProvider; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "TableRow", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkVGO4Z2WH_js.TableRow; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "TdColumn", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkVGO4Z2WH_js.TdColumn; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "tableRowVariants", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunkVGO4Z2WH_js.tableRowVariants; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "useTableHighlight", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkVGO4Z2WH_js.useTableHighlight; }
|
|
33
|
+
});
|
package/dist/table.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const textAreaVariants: (props?: ({
|
|
6
|
+
state?: "error" | "default" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {
|
|
9
|
+
error?: boolean;
|
|
10
|
+
showCount?: boolean;
|
|
11
|
+
onValueChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
14
|
+
|
|
15
|
+
export { TextArea, type TextAreaProps, textAreaVariants };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const textAreaVariants: (props?: ({
|
|
6
|
+
state?: "error" | "default" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textAreaVariants> {
|
|
9
|
+
error?: boolean;
|
|
10
|
+
showCount?: boolean;
|
|
11
|
+
onValueChange?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
14
|
+
|
|
15
|
+
export { TextArea, type TextAreaProps, textAreaVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkWR55D4ZS_js = require('./chunks/chunk-WR55D4ZS.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "TextArea", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkWR55D4ZS_js.TextArea; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "textAreaVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkWR55D4ZS_js.textAreaVariants; }
|
|
16
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const textInputVariants: (props?: ({
|
|
6
|
+
size?: "xl" | "lg" | "md" | "sm" | null | undefined;
|
|
7
|
+
state?: "error" | "default" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof textInputVariants> {
|
|
10
|
+
error?: boolean;
|
|
11
|
+
prefixIcon?: React.ReactNode;
|
|
12
|
+
suffixIcon?: React.ReactNode;
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
showCount?: boolean;
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
|
|
21
|
+
export { TextInput, type TextInputProps, textInputVariants };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const textInputVariants: (props?: ({
|
|
6
|
+
size?: "xl" | "lg" | "md" | "sm" | null | undefined;
|
|
7
|
+
state?: "error" | "default" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof textInputVariants> {
|
|
10
|
+
error?: boolean;
|
|
11
|
+
prefixIcon?: React.ReactNode;
|
|
12
|
+
suffixIcon?: React.ReactNode;
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
showCount?: boolean;
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
|
|
21
|
+
export { TextInput, type TextInputProps, textInputVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkD6FII7HW_js = require('./chunks/chunk-D6FII7HW.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "TextInput", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkD6FII7HW_js.TextInput; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "textInputVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkD6FII7HW_js.textInputVariants; }
|
|
16
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ThemeProviderProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
defaultTheme?: string;
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
themes?: string[];
|
|
8
|
+
attribute?: string | string[];
|
|
9
|
+
enableSystem?: boolean;
|
|
10
|
+
disableTransitionOnChange?: boolean;
|
|
11
|
+
forcedTheme?: string;
|
|
12
|
+
enableColorScheme?: boolean;
|
|
13
|
+
nonce?: string;
|
|
14
|
+
}
|
|
15
|
+
declare let ThemeProvider: React.FC<ThemeProviderProps>;
|
|
16
|
+
declare let useTheme: () => {
|
|
17
|
+
theme: string | undefined;
|
|
18
|
+
setTheme: (theme: string) => void;
|
|
19
|
+
resolvedTheme: string | undefined;
|
|
20
|
+
themes: string[];
|
|
21
|
+
systemTheme: string | undefined;
|
|
22
|
+
forcedTheme: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { ThemeProvider, type ThemeProviderProps, useTheme };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ThemeProviderProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
defaultTheme?: string;
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
themes?: string[];
|
|
8
|
+
attribute?: string | string[];
|
|
9
|
+
enableSystem?: boolean;
|
|
10
|
+
disableTransitionOnChange?: boolean;
|
|
11
|
+
forcedTheme?: string;
|
|
12
|
+
enableColorScheme?: boolean;
|
|
13
|
+
nonce?: string;
|
|
14
|
+
}
|
|
15
|
+
declare let ThemeProvider: React.FC<ThemeProviderProps>;
|
|
16
|
+
declare let useTheme: () => {
|
|
17
|
+
theme: string | undefined;
|
|
18
|
+
setTheme: (theme: string) => void;
|
|
19
|
+
resolvedTheme: string | undefined;
|
|
20
|
+
themes: string[];
|
|
21
|
+
systemTheme: string | undefined;
|
|
22
|
+
forcedTheme: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { ThemeProvider, type ThemeProviderProps, useTheme };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk22ULI3BF_js = require('./chunks/chunk-22ULI3BF.js');
|
|
4
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "ThemeProvider", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk22ULI3BF_js.ThemeProvider; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "useTheme", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk22ULI3BF_js.useTheme; }
|
|
15
|
+
});
|
package/dist/toast.d.mts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ToasterProps as ToasterProps$1, ExternalToast } from 'sonner';
|
|
2
|
+
export { ExternalToast as ToastOptions, toast } from 'sonner';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
6
|
+
interface ToasterProps extends Partial<ToasterProps$1> {
|
|
7
|
+
position?: ToastPosition;
|
|
8
|
+
unstyled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Toaster({ position, unstyled, toastOptions, ...props }: ToasterProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
type ToastOptions = ExternalToast;
|
|
13
|
+
/**
|
|
14
|
+
* Sonner toast 래퍼 훅.
|
|
15
|
+
*
|
|
16
|
+
* `toast()` 함수를 직접 사용해도 되지만,
|
|
17
|
+
* 편의 메서드(successToast, errorToast 등)를 제공합니다.
|
|
18
|
+
*
|
|
19
|
+
* headless 모드: `toast.custom(<MyComponent />)` 사용
|
|
20
|
+
*/
|
|
21
|
+
declare function useToast(): {
|
|
22
|
+
toast: (message: string, options?: ToastOptions) => string | number;
|
|
23
|
+
successToast: (message: string, options?: ToastOptions) => string | number;
|
|
24
|
+
errorToast: (message: string, options?: ToastOptions) => string | number;
|
|
25
|
+
warningToast: (message: string, options?: ToastOptions) => string | number;
|
|
26
|
+
infoToast: (message: string, options?: ToastOptions) => string | number;
|
|
27
|
+
promiseToast: <T>(promise: Promise<T> | (() => Promise<T>), msgs: {
|
|
28
|
+
loading: string;
|
|
29
|
+
success: string | ((data: T) => string);
|
|
30
|
+
error: string | ((error: unknown) => string);
|
|
31
|
+
}, options?: ToastOptions) => (string & {
|
|
32
|
+
unwrap: () => Promise<T>;
|
|
33
|
+
}) | (number & {
|
|
34
|
+
unwrap: () => Promise<T>;
|
|
35
|
+
}) | {
|
|
36
|
+
unwrap: () => Promise<T>;
|
|
37
|
+
};
|
|
38
|
+
customToast: (jsx: (id: string | number) => React.ReactElement, options?: ToastOptions) => string | number;
|
|
39
|
+
dismissToast: (id?: string | number) => string | number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { type ToastPosition, Toaster, type ToasterProps, useToast };
|
package/dist/toast.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ToasterProps as ToasterProps$1, ExternalToast } from 'sonner';
|
|
2
|
+
export { ExternalToast as ToastOptions, toast } from 'sonner';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
6
|
+
interface ToasterProps extends Partial<ToasterProps$1> {
|
|
7
|
+
position?: ToastPosition;
|
|
8
|
+
unstyled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Toaster({ position, unstyled, toastOptions, ...props }: ToasterProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
type ToastOptions = ExternalToast;
|
|
13
|
+
/**
|
|
14
|
+
* Sonner toast 래퍼 훅.
|
|
15
|
+
*
|
|
16
|
+
* `toast()` 함수를 직접 사용해도 되지만,
|
|
17
|
+
* 편의 메서드(successToast, errorToast 등)를 제공합니다.
|
|
18
|
+
*
|
|
19
|
+
* headless 모드: `toast.custom(<MyComponent />)` 사용
|
|
20
|
+
*/
|
|
21
|
+
declare function useToast(): {
|
|
22
|
+
toast: (message: string, options?: ToastOptions) => string | number;
|
|
23
|
+
successToast: (message: string, options?: ToastOptions) => string | number;
|
|
24
|
+
errorToast: (message: string, options?: ToastOptions) => string | number;
|
|
25
|
+
warningToast: (message: string, options?: ToastOptions) => string | number;
|
|
26
|
+
infoToast: (message: string, options?: ToastOptions) => string | number;
|
|
27
|
+
promiseToast: <T>(promise: Promise<T> | (() => Promise<T>), msgs: {
|
|
28
|
+
loading: string;
|
|
29
|
+
success: string | ((data: T) => string);
|
|
30
|
+
error: string | ((error: unknown) => string);
|
|
31
|
+
}, options?: ToastOptions) => (string & {
|
|
32
|
+
unwrap: () => Promise<T>;
|
|
33
|
+
}) | (number & {
|
|
34
|
+
unwrap: () => Promise<T>;
|
|
35
|
+
}) | {
|
|
36
|
+
unwrap: () => Promise<T>;
|
|
37
|
+
};
|
|
38
|
+
customToast: (jsx: (id: string | number) => React.ReactElement, options?: ToastOptions) => string | number;
|
|
39
|
+
dismissToast: (id?: string | number) => string | number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { type ToastPosition, Toaster, type ToasterProps, useToast };
|