@grupor5/raya 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -4
- package/dist/atoms/avatar/index.d.mts +12 -0
- package/dist/atoms/avatar/index.d.ts +12 -0
- package/dist/atoms/avatar/index.js +99 -0
- package/dist/atoms/avatar/index.mjs +76 -0
- package/dist/atoms/badge/index.d.mts +16 -0
- package/dist/atoms/badge/index.d.ts +16 -0
- package/dist/atoms/badge/index.js +149 -0
- package/dist/atoms/badge/index.mjs +146 -0
- package/dist/atoms/button/index.d.mts +11 -0
- package/dist/atoms/button/index.d.ts +11 -0
- package/dist/atoms/button/index.js +307 -0
- package/dist/atoms/button/index.mjs +301 -0
- package/dist/atoms/checkbox/index.d.mts +6 -0
- package/dist/atoms/checkbox/index.d.ts +6 -0
- package/dist/atoms/checkbox/index.js +98 -0
- package/dist/atoms/checkbox/index.mjs +75 -0
- package/dist/atoms/input/index.d.mts +12 -0
- package/dist/atoms/input/index.d.ts +12 -0
- package/dist/atoms/input/index.js +104 -0
- package/dist/atoms/input/index.mjs +82 -0
- package/dist/atoms/label/index.d.mts +8 -0
- package/dist/atoms/label/index.d.ts +8 -0
- package/dist/atoms/label/index.js +77 -0
- package/dist/atoms/label/index.mjs +54 -0
- package/dist/atoms/radio/index.d.mts +7 -0
- package/dist/atoms/radio/index.d.ts +7 -0
- package/dist/atoms/radio/index.js +97 -0
- package/dist/atoms/radio/index.mjs +73 -0
- package/dist/atoms/switch/index.d.mts +6 -0
- package/dist/atoms/switch/index.d.ts +6 -0
- package/dist/atoms/switch/index.js +97 -0
- package/dist/atoms/switch/index.mjs +74 -0
- package/dist/atoms/tag/index.d.mts +14 -0
- package/dist/atoms/tag/index.d.ts +14 -0
- package/dist/atoms/tag/index.js +128 -0
- package/dist/atoms/tag/index.mjs +122 -0
- package/dist/atoms/textarea/index.d.mts +11 -0
- package/dist/atoms/textarea/index.d.ts +11 -0
- package/dist/atoms/textarea/index.js +125 -0
- package/dist/atoms/textarea/index.mjs +103 -0
- package/dist/atoms/typography/index.d.mts +20 -0
- package/dist/atoms/typography/index.d.ts +20 -0
- package/dist/atoms/typography/index.js +140 -0
- package/dist/atoms/typography/index.mjs +115 -0
- package/dist/hooks/index.d.mts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +17 -0
- package/dist/hooks/index.mjs +15 -0
- package/dist/hooks/use-pagination.d.mts +10 -0
- package/dist/hooks/use-pagination.d.ts +10 -0
- package/dist/hooks/use-pagination.js +54 -0
- package/dist/hooks/use-pagination.mjs +51 -0
- package/dist/hooks/use-toast.d.mts +2 -0
- package/dist/hooks/use-toast.d.ts +2 -0
- package/dist/hooks/use-toast.js +2 -0
- package/dist/hooks/use-toast.mjs +1 -0
- package/dist/hooks/useModal.d.mts +7 -0
- package/dist/hooks/useModal.d.ts +7 -0
- package/dist/hooks/useModal.js +17 -0
- package/dist/hooks/useModal.mjs +15 -0
- package/dist/index.d.mts +50 -1298
- package/dist/index.d.ts +50 -1298
- package/dist/molecules/accordion/index.d.mts +17 -0
- package/dist/molecules/accordion/index.d.ts +17 -0
- package/dist/molecules/accordion/index.js +154 -0
- package/dist/molecules/accordion/index.mjs +128 -0
- package/dist/molecules/alert/index.d.mts +14 -0
- package/dist/molecules/alert/index.d.ts +14 -0
- package/dist/molecules/alert/index.js +425 -0
- package/dist/molecules/alert/index.mjs +402 -0
- package/dist/molecules/card/index.d.mts +10 -0
- package/dist/molecules/card/index.d.ts +10 -0
- package/dist/molecules/card/index.js +128 -0
- package/dist/molecules/card/index.mjs +101 -0
- package/dist/molecules/chart/index.d.mts +80 -0
- package/dist/molecules/chart/index.d.ts +80 -0
- package/dist/molecules/chart/index.js +300 -0
- package/dist/molecules/chart/index.mjs +272 -0
- package/dist/molecules/data-table/index.d.mts +57 -0
- package/dist/molecules/data-table/index.d.ts +57 -0
- package/dist/molecules/data-table/index.js +1456 -0
- package/dist/molecules/data-table/index.mjs +1430 -0
- package/dist/molecules/date-picker/index.d.mts +12 -0
- package/dist/molecules/date-picker/index.d.ts +12 -0
- package/dist/molecules/date-picker/index.js +756 -0
- package/dist/molecules/date-picker/index.mjs +734 -0
- package/dist/molecules/dropdown/index.d.mts +21 -0
- package/dist/molecules/dropdown/index.d.ts +21 -0
- package/dist/molecules/dropdown/index.js +221 -0
- package/dist/molecules/dropdown/index.mjs +198 -0
- package/dist/molecules/form/index.d.mts +19 -0
- package/dist/molecules/form/index.d.ts +19 -0
- package/dist/molecules/form/index.js +139 -0
- package/dist/molecules/form/index.mjs +114 -0
- package/dist/molecules/pagination/index.d.mts +15 -0
- package/dist/molecules/pagination/index.d.ts +15 -0
- package/dist/molecules/pagination/index.js +605 -0
- package/dist/molecules/pagination/index.mjs +583 -0
- package/dist/molecules/progress-bar/index.d.mts +15 -0
- package/dist/molecules/progress-bar/index.d.ts +15 -0
- package/dist/molecules/progress-bar/index.js +166 -0
- package/dist/molecules/progress-bar/index.mjs +144 -0
- package/dist/molecules/select/index.d.mts +15 -0
- package/dist/molecules/select/index.d.ts +15 -0
- package/dist/molecules/select/index.js +201 -0
- package/dist/molecules/select/index.mjs +169 -0
- package/dist/molecules/stepper/index.d.mts +67 -0
- package/dist/molecules/stepper/index.d.ts +67 -0
- package/dist/molecules/stepper/index.js +287 -0
- package/dist/molecules/stepper/index.mjs +260 -0
- package/dist/molecules/tabs/index.d.mts +9 -0
- package/dist/molecules/tabs/index.d.ts +9 -0
- package/dist/molecules/tabs/index.js +112 -0
- package/dist/molecules/tabs/index.mjs +86 -0
- package/dist/tokens/badge.d.mts +39 -0
- package/dist/tokens/badge.d.ts +39 -0
- package/dist/tokens/badge.js +61 -0
- package/dist/tokens/badge.mjs +59 -0
- package/dist/tokens/buttons.d.mts +277 -0
- package/dist/tokens/buttons.d.ts +277 -0
- package/dist/tokens/buttons.js +191 -0
- package/dist/tokens/buttons.mjs +173 -0
- package/dist/tokens/colors.d.mts +65 -0
- package/dist/tokens/colors.d.ts +65 -0
- package/dist/tokens/colors.js +68 -0
- package/dist/tokens/colors.mjs +66 -0
- package/dist/tokens/effects.d.mts +124 -0
- package/dist/tokens/effects.d.ts +124 -0
- package/dist/tokens/effects.js +130 -0
- package/dist/tokens/effects.mjs +115 -0
- package/dist/tokens/grids.d.mts +331 -0
- package/dist/tokens/grids.d.ts +331 -0
- package/dist/tokens/grids.js +305 -0
- package/dist/tokens/grids.mjs +292 -0
- package/dist/tokens/icons.d.mts +134 -0
- package/dist/tokens/icons.d.ts +134 -0
- package/dist/tokens/icons.js +108 -0
- package/dist/tokens/icons.mjs +97 -0
- package/dist/tokens/index.d.mts +6 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +775 -0
- package/dist/tokens/index.mjs +743 -0
- package/dist/tokens/progress-bar.d.mts +31 -0
- package/dist/tokens/progress-bar.d.ts +31 -0
- package/dist/tokens/progress-bar.js +70 -0
- package/dist/tokens/progress-bar.mjs +68 -0
- package/dist/tokens/spacing.d.mts +90 -0
- package/dist/tokens/spacing.d.ts +90 -0
- package/dist/tokens/spacing.js +120 -0
- package/dist/tokens/spacing.mjs +109 -0
- package/dist/tokens/stroke.d.mts +292 -0
- package/dist/tokens/stroke.d.ts +292 -0
- package/dist/tokens/stroke.js +202 -0
- package/dist/tokens/stroke.mjs +186 -0
- package/dist/tokens/tab.d.mts +31 -0
- package/dist/tokens/tab.d.ts +31 -0
- package/dist/tokens/tab.js +48 -0
- package/dist/tokens/tab.mjs +46 -0
- package/dist/tokens/tag.d.mts +53 -0
- package/dist/tokens/tag.d.ts +53 -0
- package/dist/tokens/tag.js +80 -0
- package/dist/tokens/tag.mjs +78 -0
- package/dist/tokens/typography.d.mts +394 -0
- package/dist/tokens/typography.d.ts +394 -0
- package/dist/tokens/typography.js +302 -0
- package/dist/tokens/typography.mjs +292 -0
- package/dist/utils/classNames.d.mts +3 -0
- package/dist/utils/classNames.d.ts +3 -0
- package/dist/utils/classNames.js +8 -0
- package/dist/utils/classNames.mjs +6 -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 +9 -0
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.mjs +12 -0
- package/package.json +34 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "children"> & VariantProps<(props?: ({
|
|
11
|
+
variant?: "default" | "button" | null | undefined;
|
|
12
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const Accordion: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
|
|
17
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "children"> & VariantProps<(props?: ({
|
|
11
|
+
variant?: "default" | "button" | null | undefined;
|
|
12
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const Accordion: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
|
|
17
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var clsx = require('clsx');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var rayaIcons = require('@grupor5/raya-icons');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
30
|
+
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
31
|
+
|
|
32
|
+
var __defProp = Object.defineProperty;
|
|
33
|
+
var __defProps = Object.defineProperties;
|
|
34
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
35
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
36
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
37
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
38
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
39
|
+
var __spreadValues = (a, b) => {
|
|
40
|
+
for (var prop in b || (b = {}))
|
|
41
|
+
if (__hasOwnProp.call(b, prop))
|
|
42
|
+
__defNormalProp(a, prop, b[prop]);
|
|
43
|
+
if (__getOwnPropSymbols)
|
|
44
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
45
|
+
if (__propIsEnum.call(b, prop))
|
|
46
|
+
__defNormalProp(a, prop, b[prop]);
|
|
47
|
+
}
|
|
48
|
+
return a;
|
|
49
|
+
};
|
|
50
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
51
|
+
var __objRest = (source, exclude) => {
|
|
52
|
+
var target = {};
|
|
53
|
+
for (var prop in source)
|
|
54
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
55
|
+
target[prop] = source[prop];
|
|
56
|
+
if (source != null && __getOwnPropSymbols)
|
|
57
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
58
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
59
|
+
target[prop] = source[prop];
|
|
60
|
+
}
|
|
61
|
+
return target;
|
|
62
|
+
};
|
|
63
|
+
function cn(...inputs) {
|
|
64
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
65
|
+
}
|
|
66
|
+
var AccordionItemContext = React__namespace.createContext({});
|
|
67
|
+
var accordionItemVariants = classVarianceAuthority.cva("w-full", {
|
|
68
|
+
variants: {
|
|
69
|
+
variant: {
|
|
70
|
+
default: "border-b",
|
|
71
|
+
button: ""
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
variant: "default"
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var AccordionTrigger = React__namespace.forwardRef((_a, ref) => {
|
|
79
|
+
var _b = _a, { className, children, icon } = _b, props = __objRest(_b, ["className", "children", "icon"]);
|
|
80
|
+
const { variant } = React__namespace.useContext(AccordionItemContext);
|
|
81
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
82
|
+
AccordionPrimitive__namespace.Trigger,
|
|
83
|
+
__spreadProps(__spreadValues({
|
|
84
|
+
ref,
|
|
85
|
+
className: cn(
|
|
86
|
+
"flex flex-1 items-center justify-between py-2 text-sm font-normal transition-all [&[data-state=open]>svg:not(.variant-icon)]:rotate-180",
|
|
87
|
+
"hover:bg-[#FAF9FB]",
|
|
88
|
+
"disabled:border-neutral-400 disabled:bg-neutral-100 disabled:text-muted-foreground",
|
|
89
|
+
{
|
|
90
|
+
"rounded-md border border-input bg-transparent px-4 shadow-sm": variant === "button",
|
|
91
|
+
"px-4": variant === "default"
|
|
92
|
+
},
|
|
93
|
+
className
|
|
94
|
+
)
|
|
95
|
+
}, props), {
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
98
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "variant-icon", children: icon }),
|
|
99
|
+
children
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
102
|
+
rayaIcons.DownIcon,
|
|
103
|
+
{
|
|
104
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
})
|
|
109
|
+
) });
|
|
110
|
+
});
|
|
111
|
+
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
112
|
+
var AccordionContent = React__namespace.forwardRef((_a, ref) => {
|
|
113
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
114
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
115
|
+
AccordionPrimitive__namespace.Content,
|
|
116
|
+
__spreadProps(__spreadValues({
|
|
117
|
+
ref,
|
|
118
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
119
|
+
}, props), {
|
|
120
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("px-4 py-4", className), children })
|
|
121
|
+
})
|
|
122
|
+
);
|
|
123
|
+
});
|
|
124
|
+
AccordionContent.displayName = AccordionPrimitive__namespace.Content.displayName;
|
|
125
|
+
var AccordionItem = React__namespace.forwardRef((_a, ref) => {
|
|
126
|
+
var _b = _a, { className, variant = "default", children } = _b, props = __objRest(_b, ["className", "variant", "children"]);
|
|
127
|
+
const variantValue = variant != null ? variant : "default";
|
|
128
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AccordionItemContext.Provider, { value: { variant: variantValue }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
129
|
+
AccordionPrimitive__namespace.Item,
|
|
130
|
+
__spreadProps(__spreadValues({
|
|
131
|
+
ref,
|
|
132
|
+
className: cn(accordionItemVariants({ variant: variantValue }), className)
|
|
133
|
+
}, props), {
|
|
134
|
+
children
|
|
135
|
+
})
|
|
136
|
+
) });
|
|
137
|
+
});
|
|
138
|
+
AccordionItem.displayName = "AccordionItem";
|
|
139
|
+
var Accordion = React__namespace.forwardRef((_a, ref) => {
|
|
140
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
141
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142
|
+
AccordionPrimitive__namespace.Root,
|
|
143
|
+
__spreadValues({
|
|
144
|
+
ref,
|
|
145
|
+
className: cn("w-full", className)
|
|
146
|
+
}, props)
|
|
147
|
+
);
|
|
148
|
+
});
|
|
149
|
+
Accordion.displayName = "Accordion";
|
|
150
|
+
|
|
151
|
+
exports.Accordion = Accordion;
|
|
152
|
+
exports.AccordionContent = AccordionContent;
|
|
153
|
+
exports.AccordionItem = AccordionItem;
|
|
154
|
+
exports.AccordionTrigger = AccordionTrigger;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { DownIcon } from '@grupor5/raya-icons';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __defProps = Object.defineProperties;
|
|
11
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
15
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
16
|
+
var __spreadValues = (a, b) => {
|
|
17
|
+
for (var prop in b || (b = {}))
|
|
18
|
+
if (__hasOwnProp.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
if (__getOwnPropSymbols)
|
|
21
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
22
|
+
if (__propIsEnum.call(b, prop))
|
|
23
|
+
__defNormalProp(a, prop, b[prop]);
|
|
24
|
+
}
|
|
25
|
+
return a;
|
|
26
|
+
};
|
|
27
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
28
|
+
var __objRest = (source, exclude) => {
|
|
29
|
+
var target = {};
|
|
30
|
+
for (var prop in source)
|
|
31
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
if (source != null && __getOwnPropSymbols)
|
|
34
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
35
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
36
|
+
target[prop] = source[prop];
|
|
37
|
+
}
|
|
38
|
+
return target;
|
|
39
|
+
};
|
|
40
|
+
function cn(...inputs) {
|
|
41
|
+
return twMerge(clsx(inputs));
|
|
42
|
+
}
|
|
43
|
+
var AccordionItemContext = React.createContext({});
|
|
44
|
+
var accordionItemVariants = cva("w-full", {
|
|
45
|
+
variants: {
|
|
46
|
+
variant: {
|
|
47
|
+
default: "border-b",
|
|
48
|
+
button: ""
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
variant: "default"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
var AccordionTrigger = React.forwardRef((_a, ref) => {
|
|
56
|
+
var _b = _a, { className, children, icon } = _b, props = __objRest(_b, ["className", "children", "icon"]);
|
|
57
|
+
const { variant } = React.useContext(AccordionItemContext);
|
|
58
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
59
|
+
AccordionPrimitive.Trigger,
|
|
60
|
+
__spreadProps(__spreadValues({
|
|
61
|
+
ref,
|
|
62
|
+
className: cn(
|
|
63
|
+
"flex flex-1 items-center justify-between py-2 text-sm font-normal transition-all [&[data-state=open]>svg:not(.variant-icon)]:rotate-180",
|
|
64
|
+
"hover:bg-[#FAF9FB]",
|
|
65
|
+
"disabled:border-neutral-400 disabled:bg-neutral-100 disabled:text-muted-foreground",
|
|
66
|
+
{
|
|
67
|
+
"rounded-md border border-input bg-transparent px-4 shadow-sm": variant === "button",
|
|
68
|
+
"px-4": variant === "default"
|
|
69
|
+
},
|
|
70
|
+
className
|
|
71
|
+
)
|
|
72
|
+
}, props), {
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
75
|
+
icon && /* @__PURE__ */ jsx("span", { className: "variant-icon", children: icon }),
|
|
76
|
+
children
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ jsx(
|
|
79
|
+
DownIcon,
|
|
80
|
+
{
|
|
81
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
) });
|
|
87
|
+
});
|
|
88
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
89
|
+
var AccordionContent = React.forwardRef((_a, ref) => {
|
|
90
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
AccordionPrimitive.Content,
|
|
93
|
+
__spreadProps(__spreadValues({
|
|
94
|
+
ref,
|
|
95
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
96
|
+
}, props), {
|
|
97
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("px-4 py-4", className), children })
|
|
98
|
+
})
|
|
99
|
+
);
|
|
100
|
+
});
|
|
101
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
102
|
+
var AccordionItem = React.forwardRef((_a, ref) => {
|
|
103
|
+
var _b = _a, { className, variant = "default", children } = _b, props = __objRest(_b, ["className", "variant", "children"]);
|
|
104
|
+
const variantValue = variant != null ? variant : "default";
|
|
105
|
+
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { variant: variantValue }, children: /* @__PURE__ */ jsx(
|
|
106
|
+
AccordionPrimitive.Item,
|
|
107
|
+
__spreadProps(__spreadValues({
|
|
108
|
+
ref,
|
|
109
|
+
className: cn(accordionItemVariants({ variant: variantValue }), className)
|
|
110
|
+
}, props), {
|
|
111
|
+
children
|
|
112
|
+
})
|
|
113
|
+
) });
|
|
114
|
+
});
|
|
115
|
+
AccordionItem.displayName = "AccordionItem";
|
|
116
|
+
var Accordion = React.forwardRef((_a, ref) => {
|
|
117
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
118
|
+
return /* @__PURE__ */ jsx(
|
|
119
|
+
AccordionPrimitive.Root,
|
|
120
|
+
__spreadValues({
|
|
121
|
+
ref,
|
|
122
|
+
className: cn("w-full", className)
|
|
123
|
+
}, props)
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
Accordion.displayName = "Accordion";
|
|
127
|
+
|
|
128
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
+
variant?: "default" | "success" | "danger" | "warning" | null | undefined;
|
|
7
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
8
|
+
isClosable?: boolean;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
13
|
+
|
|
14
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
+
variant?: "default" | "success" | "danger" | "warning" | null | undefined;
|
|
7
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & {
|
|
8
|
+
isClosable?: boolean;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
13
|
+
|
|
14
|
+
export { Alert, AlertDescription, AlertTitle };
|