@deepnoid/ui 0.0.106 → 0.0.107
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 +1 -1
- package/dist/{chunk-S4DTK5GI.mjs → chunk-BEPW5BXD.mjs} +1 -1
- package/dist/{chunk-FNPWLOGV.mjs → chunk-HFJF2TTY.mjs} +337 -336
- package/dist/chunk-L3EXRVWC.mjs +12813 -0
- package/dist/chunk-LXPWTJ3F.mjs +58 -0
- package/dist/components/accordion/accordion.test.js +337 -335
- package/dist/components/accordion/accordion.test.mjs +1 -1
- package/dist/components/button/button-group.test.js +337 -335
- package/dist/components/button/button-group.test.mjs +2 -2
- package/dist/components/button/button.test.js +7296 -443
- package/dist/components/button/button.test.mjs +2 -2
- package/dist/components/card/card.test.js +337 -335
- package/dist/components/card/card.test.mjs +1 -1
- package/dist/components/checkbox/checkbox.test.js +337 -335
- package/dist/components/checkbox/checkbox.test.mjs +2 -2
- package/dist/components/dateTimePicker/dateTimePicker.mjs +4 -4
- package/dist/components/dateTimePicker/index.mjs +4 -4
- package/dist/components/dropdown/dropdown.d.mts +121 -0
- package/dist/components/dropdown/dropdown.d.ts +121 -0
- package/dist/components/dropdown/dropdown.js +122 -0
- package/dist/components/dropdown/dropdown.mjs +10 -0
- package/dist/components/dropdown/dropdown.test.d.mts +2 -0
- package/dist/components/dropdown/dropdown.test.d.ts +2 -0
- package/dist/components/dropdown/dropdown.test.js +12997 -0
- package/dist/components/dropdown/dropdown.test.mjs +25 -0
- package/dist/components/dropdown/index.d.mts +5 -0
- package/dist/components/dropdown/index.d.ts +5 -0
- package/dist/components/dropdown/index.js +128 -0
- package/dist/components/dropdown/index.mjs +10 -0
- package/dist/components/input/input.test.js +7296 -443
- package/dist/components/input/input.test.mjs +2 -2
- package/dist/components/list/list.test.js +337 -335
- package/dist/components/list/list.test.mjs +1 -1
- package/dist/components/modal/modal.test.js +337 -335
- package/dist/components/modal/modal.test.mjs +1 -1
- package/dist/components/pagination/pagination.test.js +337 -335
- package/dist/components/pagination/pagination.test.mjs +1 -1
- package/dist/components/progress/progress.test.js +337 -335
- package/dist/components/progress/progress.test.mjs +1 -1
- package/dist/components/radio/radio.test.js +337 -335
- package/dist/components/radio/radio.test.mjs +1 -1
- package/dist/components/select/index.mjs +2 -2
- package/dist/components/select/select.mjs +2 -2
- package/dist/components/select/select.test.js +337 -335
- package/dist/components/select/select.test.mjs +4 -4
- package/dist/components/slider/slider.test.js +337 -335
- package/dist/components/slider/slider.test.mjs +1 -1
- package/dist/components/switch/switch.test.js +337 -335
- package/dist/components/switch/switch.test.mjs +1 -1
- package/dist/components/table/table.test.js +337 -335
- package/dist/components/table/table.test.mjs +1 -1
- package/dist/components/tabs/tabs.test.js +337 -335
- package/dist/components/tabs/tabs.test.mjs +2 -2
- package/dist/components/textarea/textarea.test.js +7296 -443
- package/dist/components/textarea/textarea.test.mjs +2 -2
- package/dist/components/toast/toast.test.js +337 -335
- package/dist/components/toast/toast.test.mjs +1 -1
- package/dist/components/tooltip/tooltip.test.js +337 -335
- package/dist/components/tooltip/tooltip.test.mjs +1 -1
- package/dist/index.mjs +36 -36
- package/package.json +1 -1
- package/dist/chunk-H7BLXC5M.mjs +0 -5965
- package/dist/{chunk-JN7EGKJL.mjs → chunk-2BCJZILI.mjs} +3 -3
- package/dist/{chunk-TSMVRGDO.mjs → chunk-C2FQHRLB.mjs} +3 -3
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
mapPropsVariants
|
|
4
|
+
} from "./chunk-E3G5QXSH.mjs";
|
|
5
|
+
import {
|
|
6
|
+
tv
|
|
7
|
+
} from "./chunk-J725QONZ.mjs";
|
|
8
|
+
|
|
9
|
+
// src/components/dropdown/dropdown.tsx
|
|
10
|
+
import React, { forwardRef, useCallback, useMemo } from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var Dropdown = forwardRef((originalProps, ref) => {
|
|
13
|
+
const [props, variantProps] = mapPropsVariants(originalProps, dropdown.variantKeys);
|
|
14
|
+
const { children, classNames } = props;
|
|
15
|
+
const slots = useMemo(() => dropdown({ ...variantProps }), [...Object.values(variantProps)]);
|
|
16
|
+
const getBaseProps = useCallback(() => {
|
|
17
|
+
return {
|
|
18
|
+
className: slots.base({ class: classNames == null ? void 0 : classNames.base })
|
|
19
|
+
};
|
|
20
|
+
}, [slots, classNames == null ? void 0 : classNames.base]);
|
|
21
|
+
return /* @__PURE__ */ jsx("div", { ref, ...getBaseProps(), children: React.Children.map(children, (child, index) => {
|
|
22
|
+
return React.cloneElement(child, {
|
|
23
|
+
...variantProps,
|
|
24
|
+
...child.props
|
|
25
|
+
});
|
|
26
|
+
}) });
|
|
27
|
+
});
|
|
28
|
+
Dropdown.displayName = "Dropdown";
|
|
29
|
+
var dropdown_default = Dropdown;
|
|
30
|
+
var dropdown = tv({
|
|
31
|
+
slots: {
|
|
32
|
+
base: ["flex", "flex-col"]
|
|
33
|
+
},
|
|
34
|
+
variants: {
|
|
35
|
+
variant: {
|
|
36
|
+
solid: {},
|
|
37
|
+
line: {}
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
sm: {},
|
|
41
|
+
md: {},
|
|
42
|
+
lg: {}
|
|
43
|
+
},
|
|
44
|
+
color: {
|
|
45
|
+
primary: {},
|
|
46
|
+
secondary: {}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: "solid",
|
|
51
|
+
color: "primary",
|
|
52
|
+
size: "md"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
dropdown_default
|
|
58
|
+
};
|