@deepnoid/ui 0.0.105 → 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.
Files changed (67) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-S4DTK5GI.mjs → chunk-BEPW5BXD.mjs} +1 -1
  3. package/dist/{chunk-FNPWLOGV.mjs → chunk-HFJF2TTY.mjs} +337 -336
  4. package/dist/chunk-L3EXRVWC.mjs +12813 -0
  5. package/dist/chunk-LXPWTJ3F.mjs +58 -0
  6. package/dist/{chunk-R2E7UZZO.mjs → chunk-QGZEHOKA.mjs} +2 -1
  7. package/dist/components/accordion/accordion.test.js +337 -335
  8. package/dist/components/accordion/accordion.test.mjs +1 -1
  9. package/dist/components/button/button-group.test.js +337 -335
  10. package/dist/components/button/button-group.test.mjs +2 -2
  11. package/dist/components/button/button.test.js +7296 -443
  12. package/dist/components/button/button.test.mjs +2 -2
  13. package/dist/components/card/card.test.js +337 -335
  14. package/dist/components/card/card.test.mjs +1 -1
  15. package/dist/components/checkbox/checkbox.test.js +337 -335
  16. package/dist/components/checkbox/checkbox.test.mjs +2 -2
  17. package/dist/components/dateTimePicker/dateTimePicker.mjs +2 -2
  18. package/dist/components/dateTimePicker/index.mjs +2 -2
  19. package/dist/components/dropdown/dropdown.d.mts +121 -0
  20. package/dist/components/dropdown/dropdown.d.ts +121 -0
  21. package/dist/components/dropdown/dropdown.js +122 -0
  22. package/dist/components/dropdown/dropdown.mjs +10 -0
  23. package/dist/components/dropdown/dropdown.test.d.mts +2 -0
  24. package/dist/components/dropdown/dropdown.test.d.ts +2 -0
  25. package/dist/components/dropdown/dropdown.test.js +12997 -0
  26. package/dist/components/dropdown/dropdown.test.mjs +25 -0
  27. package/dist/components/dropdown/index.d.mts +5 -0
  28. package/dist/components/dropdown/index.d.ts +5 -0
  29. package/dist/components/dropdown/index.js +128 -0
  30. package/dist/components/dropdown/index.mjs +10 -0
  31. package/dist/components/input/input.test.js +7296 -443
  32. package/dist/components/input/input.test.mjs +2 -2
  33. package/dist/components/list/list.test.js +337 -335
  34. package/dist/components/list/list.test.mjs +1 -1
  35. package/dist/components/modal/modal.test.js +337 -335
  36. package/dist/components/modal/modal.test.mjs +1 -1
  37. package/dist/components/pagination/pagination.test.js +337 -335
  38. package/dist/components/pagination/pagination.test.mjs +1 -1
  39. package/dist/components/progress/progress.test.js +337 -335
  40. package/dist/components/progress/progress.test.mjs +1 -1
  41. package/dist/components/radio/radio.test.js +337 -335
  42. package/dist/components/radio/radio.test.mjs +1 -1
  43. package/dist/components/select/select.test.js +337 -335
  44. package/dist/components/select/select.test.mjs +2 -2
  45. package/dist/components/slider/slider.test.js +337 -335
  46. package/dist/components/slider/slider.test.mjs +1 -1
  47. package/dist/components/switch/switch.test.js +337 -335
  48. package/dist/components/switch/switch.test.mjs +1 -1
  49. package/dist/components/table/index.js +2 -1
  50. package/dist/components/table/index.mjs +1 -1
  51. package/dist/components/table/table.js +2 -1
  52. package/dist/components/table/table.mjs +1 -1
  53. package/dist/components/table/table.test.js +339 -336
  54. package/dist/components/table/table.test.mjs +2 -2
  55. package/dist/components/tabs/tabs.test.js +337 -335
  56. package/dist/components/tabs/tabs.test.mjs +2 -2
  57. package/dist/components/textarea/textarea.test.js +7296 -443
  58. package/dist/components/textarea/textarea.test.mjs +2 -2
  59. package/dist/components/toast/toast.test.js +337 -335
  60. package/dist/components/toast/toast.test.mjs +1 -1
  61. package/dist/components/tooltip/tooltip.test.js +337 -335
  62. package/dist/components/tooltip/tooltip.test.mjs +1 -1
  63. package/dist/index.js +3 -2
  64. package/dist/index.mjs +40 -40
  65. package/package.json +1 -1
  66. package/dist/chunk-H7BLXC5M.mjs +0 -5965
  67. package/dist/{chunk-466PGIGU.mjs → chunk-C2FQHRLB.mjs} +3 -3
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  userEvent
4
- } from "../../chunk-S4DTK5GI.mjs";
4
+ } from "../../chunk-BEPW5BXD.mjs";
5
5
  import {
6
6
  checkbox_default
7
7
  } from "../../chunk-ANYPMQH4.mjs";
8
8
  import {
9
9
  act,
10
10
  render
11
- } from "../../chunk-FNPWLOGV.mjs";
11
+ } from "../../chunk-HFJF2TTY.mjs";
12
12
  import "../../chunk-E3G5QXSH.mjs";
13
13
  import "../../chunk-J725QONZ.mjs";
14
14
  import "../../chunk-IZ6II3QA.mjs";
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  dateTimePickerStyle,
4
4
  dateTimePicker_default
5
- } from "../../chunk-466PGIGU.mjs";
6
- import "../../chunk-FDKT4IBP.mjs";
5
+ } from "../../chunk-C2FQHRLB.mjs";
7
6
  import "../../chunk-BCN5F2MN.mjs";
8
7
  import "../../chunk-7MVEAQ7Z.mjs";
9
8
  import "../../chunk-EYY4CRRR.mjs";
10
9
  import "../../chunk-V77MALL4.mjs";
11
10
  import "../../chunk-FWJ2ZKH6.mjs";
11
+ import "../../chunk-FDKT4IBP.mjs";
12
12
  import "../../chunk-P732YGHO.mjs";
13
13
  import "../../chunk-ZYIIXWVY.mjs";
14
14
  import "../../chunk-LCI6RPWE.mjs";
@@ -2,13 +2,13 @@
2
2
  import "../../chunk-75HLCORR.mjs";
3
3
  import {
4
4
  dateTimePicker_default
5
- } from "../../chunk-466PGIGU.mjs";
6
- import "../../chunk-FDKT4IBP.mjs";
5
+ } from "../../chunk-C2FQHRLB.mjs";
7
6
  import "../../chunk-BCN5F2MN.mjs";
8
7
  import "../../chunk-7MVEAQ7Z.mjs";
9
8
  import "../../chunk-EYY4CRRR.mjs";
10
9
  import "../../chunk-V77MALL4.mjs";
11
10
  import "../../chunk-FWJ2ZKH6.mjs";
11
+ import "../../chunk-FDKT4IBP.mjs";
12
12
  import "../../chunk-P732YGHO.mjs";
13
13
  import "../../chunk-ZYIIXWVY.mjs";
14
14
  import "../../chunk-LCI6RPWE.mjs";
@@ -0,0 +1,121 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
4
+ import React__default, { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.mjs';
6
+
7
+ interface Props {
8
+ children?: ReactNode;
9
+ classNames?: SlotsToClasses<DropdownSlots>;
10
+ }
11
+ type DropdownProps = Props & DropdownVariantProps;
12
+ declare const Dropdown: React__default.ForwardRefExoticComponent<Props & DropdownVariantProps & React__default.RefAttributes<HTMLDivElement>>;
13
+
14
+ declare const dropdown: tailwind_variants.TVReturnType<{
15
+ variant: {
16
+ solid: {};
17
+ line: {};
18
+ };
19
+ size: {
20
+ sm: {};
21
+ md: {};
22
+ lg: {};
23
+ };
24
+ color: {
25
+ primary: {};
26
+ secondary: {};
27
+ };
28
+ }, {
29
+ base: string[];
30
+ }, undefined, {
31
+ responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
32
+ size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
33
+ variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
34
+ color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
35
+ } | undefined;
36
+ } & tailwind_variants_dist_config.TWMConfig & {
37
+ twMergeConfig: {
38
+ classGroups: {
39
+ fontSize: {
40
+ text: string[];
41
+ }[];
42
+ borderRadius: {
43
+ rounded: string[];
44
+ }[];
45
+ boxShadow: {
46
+ shadow: string[];
47
+ }[];
48
+ padding: {
49
+ p: string[];
50
+ }[];
51
+ gap: {
52
+ gap: string[];
53
+ }[];
54
+ };
55
+ };
56
+ }, {
57
+ variant: {
58
+ solid: {};
59
+ line: {};
60
+ };
61
+ size: {
62
+ sm: {};
63
+ md: {};
64
+ lg: {};
65
+ };
66
+ color: {
67
+ primary: {};
68
+ secondary: {};
69
+ };
70
+ }, {
71
+ base: string[];
72
+ }, tailwind_variants.TVReturnType<{
73
+ variant: {
74
+ solid: {};
75
+ line: {};
76
+ };
77
+ size: {
78
+ sm: {};
79
+ md: {};
80
+ lg: {};
81
+ };
82
+ color: {
83
+ primary: {};
84
+ secondary: {};
85
+ };
86
+ }, {
87
+ base: string[];
88
+ }, undefined, tailwind_variants_dist_config.TVConfig<{
89
+ variant: {
90
+ solid: {};
91
+ line: {};
92
+ };
93
+ size: {
94
+ sm: {};
95
+ md: {};
96
+ lg: {};
97
+ };
98
+ color: {
99
+ primary: {};
100
+ secondary: {};
101
+ };
102
+ }, {
103
+ variant: {
104
+ solid: {};
105
+ line: {};
106
+ };
107
+ size: {
108
+ sm: {};
109
+ md: {};
110
+ lg: {};
111
+ };
112
+ color: {
113
+ primary: {};
114
+ secondary: {};
115
+ };
116
+ }>, unknown, unknown, undefined>>;
117
+ type DropdownVariantProps = VariantProps<typeof dropdown>;
118
+ type DropdownSlots = keyof ReturnType<typeof dropdown>;
119
+ type DropdownReturnType = ReturnType<typeof dropdown>;
120
+
121
+ export { type DropdownProps, type DropdownReturnType, type DropdownSlots, type DropdownVariantProps, type Props, Dropdown as default };
@@ -0,0 +1,121 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
4
+ import React__default, { ReactNode } from 'react';
5
+ import { SlotsToClasses } from '../../utils/types.js';
6
+
7
+ interface Props {
8
+ children?: ReactNode;
9
+ classNames?: SlotsToClasses<DropdownSlots>;
10
+ }
11
+ type DropdownProps = Props & DropdownVariantProps;
12
+ declare const Dropdown: React__default.ForwardRefExoticComponent<Props & DropdownVariantProps & React__default.RefAttributes<HTMLDivElement>>;
13
+
14
+ declare const dropdown: tailwind_variants.TVReturnType<{
15
+ variant: {
16
+ solid: {};
17
+ line: {};
18
+ };
19
+ size: {
20
+ sm: {};
21
+ md: {};
22
+ lg: {};
23
+ };
24
+ color: {
25
+ primary: {};
26
+ secondary: {};
27
+ };
28
+ }, {
29
+ base: string[];
30
+ }, undefined, {
31
+ responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {
32
+ size?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
33
+ variant?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
34
+ color?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | undefined;
35
+ } | undefined;
36
+ } & tailwind_variants_dist_config.TWMConfig & {
37
+ twMergeConfig: {
38
+ classGroups: {
39
+ fontSize: {
40
+ text: string[];
41
+ }[];
42
+ borderRadius: {
43
+ rounded: string[];
44
+ }[];
45
+ boxShadow: {
46
+ shadow: string[];
47
+ }[];
48
+ padding: {
49
+ p: string[];
50
+ }[];
51
+ gap: {
52
+ gap: string[];
53
+ }[];
54
+ };
55
+ };
56
+ }, {
57
+ variant: {
58
+ solid: {};
59
+ line: {};
60
+ };
61
+ size: {
62
+ sm: {};
63
+ md: {};
64
+ lg: {};
65
+ };
66
+ color: {
67
+ primary: {};
68
+ secondary: {};
69
+ };
70
+ }, {
71
+ base: string[];
72
+ }, tailwind_variants.TVReturnType<{
73
+ variant: {
74
+ solid: {};
75
+ line: {};
76
+ };
77
+ size: {
78
+ sm: {};
79
+ md: {};
80
+ lg: {};
81
+ };
82
+ color: {
83
+ primary: {};
84
+ secondary: {};
85
+ };
86
+ }, {
87
+ base: string[];
88
+ }, undefined, tailwind_variants_dist_config.TVConfig<{
89
+ variant: {
90
+ solid: {};
91
+ line: {};
92
+ };
93
+ size: {
94
+ sm: {};
95
+ md: {};
96
+ lg: {};
97
+ };
98
+ color: {
99
+ primary: {};
100
+ secondary: {};
101
+ };
102
+ }, {
103
+ variant: {
104
+ solid: {};
105
+ line: {};
106
+ };
107
+ size: {
108
+ sm: {};
109
+ md: {};
110
+ lg: {};
111
+ };
112
+ color: {
113
+ primary: {};
114
+ secondary: {};
115
+ };
116
+ }>, unknown, unknown, undefined>>;
117
+ type DropdownVariantProps = VariantProps<typeof dropdown>;
118
+ type DropdownSlots = keyof ReturnType<typeof dropdown>;
119
+ type DropdownReturnType = ReturnType<typeof dropdown>;
120
+
121
+ export { type DropdownProps, type DropdownReturnType, type DropdownSlots, type DropdownVariantProps, type Props, Dropdown as default };
@@ -0,0 +1,122 @@
1
+ "use client";
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+
31
+ // src/components/dropdown/dropdown.tsx
32
+ var dropdown_exports = {};
33
+ __export(dropdown_exports, {
34
+ default: () => dropdown_default
35
+ });
36
+ module.exports = __toCommonJS(dropdown_exports);
37
+ var import_react = __toESM(require("react"));
38
+
39
+ // src/utils/tailwind-variants.ts
40
+ var import_tailwind_variants = require("tailwind-variants");
41
+ var COMMON_SIZE = ["sm", "md", "lg"];
42
+ var COMMON_RADIUS = ["xlg", "xxlg", "none", "full"];
43
+ var COMMON_FONTSIZE = ["h1", "h2", "h3", "h4", "h5"];
44
+ var COMMON_SHADOW = ["inner", "drop"];
45
+ var tv = (0, import_tailwind_variants.createTV)({
46
+ // twMerge: false,
47
+ twMergeConfig: {
48
+ classGroups: {
49
+ fontSize: [{ text: [...COMMON_SIZE, ...COMMON_FONTSIZE] }],
50
+ borderRadius: [{ rounded: [...COMMON_RADIUS, ...COMMON_SIZE] }],
51
+ boxShadow: [{ shadow: [...COMMON_SHADOW] }],
52
+ padding: [{ p: [...COMMON_SIZE] }],
53
+ gap: [{ gap: [...COMMON_SIZE] }]
54
+ }
55
+ }
56
+ });
57
+
58
+ // src/utils/props.ts
59
+ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
60
+ if (!variantKeys) {
61
+ return [props, {}];
62
+ }
63
+ const picked = variantKeys.reduce((acc, key) => {
64
+ if (key in props) {
65
+ return { ...acc, [key]: props[key] };
66
+ } else {
67
+ return acc;
68
+ }
69
+ }, {});
70
+ if (removeVariantProps) {
71
+ const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
72
+ return [omitted, picked];
73
+ } else {
74
+ return [props, picked];
75
+ }
76
+ };
77
+
78
+ // src/components/dropdown/dropdown.tsx
79
+ var import_jsx_runtime = require("react/jsx-runtime");
80
+ var Dropdown = (0, import_react.forwardRef)((originalProps, ref) => {
81
+ const [props, variantProps] = mapPropsVariants(originalProps, dropdown.variantKeys);
82
+ const { children, classNames } = props;
83
+ const slots = (0, import_react.useMemo)(() => dropdown({ ...variantProps }), [...Object.values(variantProps)]);
84
+ const getBaseProps = (0, import_react.useCallback)(() => {
85
+ return {
86
+ className: slots.base({ class: classNames == null ? void 0 : classNames.base })
87
+ };
88
+ }, [slots, classNames == null ? void 0 : classNames.base]);
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, ...getBaseProps(), children: import_react.default.Children.map(children, (child, index) => {
90
+ return import_react.default.cloneElement(child, {
91
+ ...variantProps,
92
+ ...child.props
93
+ });
94
+ }) });
95
+ });
96
+ Dropdown.displayName = "Dropdown";
97
+ var dropdown_default = Dropdown;
98
+ var dropdown = tv({
99
+ slots: {
100
+ base: ["flex", "flex-col"]
101
+ },
102
+ variants: {
103
+ variant: {
104
+ solid: {},
105
+ line: {}
106
+ },
107
+ size: {
108
+ sm: {},
109
+ md: {},
110
+ lg: {}
111
+ },
112
+ color: {
113
+ primary: {},
114
+ secondary: {}
115
+ }
116
+ },
117
+ defaultVariants: {
118
+ variant: "solid",
119
+ color: "primary",
120
+ size: "md"
121
+ }
122
+ });
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import {
3
+ dropdown_default
4
+ } from "../../chunk-LXPWTJ3F.mjs";
5
+ import "../../chunk-E3G5QXSH.mjs";
6
+ import "../../chunk-J725QONZ.mjs";
7
+ import "../../chunk-IZ6II3QA.mjs";
8
+ export {
9
+ dropdown_default as default
10
+ };
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }