@vritti/quantum-ui 0.1.4 → 0.1.6
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/dist/Button.js +1 -1
- package/dist/Checkbox.d.ts +27 -0
- package/dist/Checkbox.js +615 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/PasswordField.d.ts +18 -0
- package/dist/PasswordField.js +117 -0
- package/dist/PasswordField.js.map +1 -0
- package/dist/TextField.d.ts +3 -2
- package/dist/TextField.js +23 -53
- package/dist/TextField.js.map +1 -1
- package/dist/ThemeToggle.js +2 -110
- package/dist/ThemeToggle.js.map +1 -1
- package/dist/components/Checkbox.d.ts +2 -0
- package/dist/components/Checkbox.js +2 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/PasswordField.d.ts +2 -0
- package/dist/components/PasswordField.js +2 -0
- package/dist/components/PasswordField.js.map +1 -0
- package/dist/createLucideIcon.js +113 -0
- package/dist/createLucideIcon.js.map +1 -0
- package/dist/index.d.ts +34 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index2.js +34 -116
- package/dist/index2.js.map +1 -1
- package/dist/index3.js +126 -0
- package/dist/index3.js.map +1 -0
- package/package.json +10 -1
- package/readme.md +0 -472
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { forwardRef, createElement } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license lucide-react v0.544.0 - ISC
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the ISC license.
|
|
7
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
11
|
+
const toCamelCase = (string) => string.replace(
|
|
12
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
13
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
14
|
+
);
|
|
15
|
+
const toPascalCase = (string) => {
|
|
16
|
+
const camelCase = toCamelCase(string);
|
|
17
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
18
|
+
};
|
|
19
|
+
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
20
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
21
|
+
}).join(" ").trim();
|
|
22
|
+
const hasA11yProp = (props) => {
|
|
23
|
+
for (const prop in props) {
|
|
24
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @license lucide-react v0.544.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
var defaultAttributes = {
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
width: 24,
|
|
40
|
+
height: 24,
|
|
41
|
+
viewBox: "0 0 24 24",
|
|
42
|
+
fill: "none",
|
|
43
|
+
stroke: "currentColor",
|
|
44
|
+
strokeWidth: 2,
|
|
45
|
+
strokeLinecap: "round",
|
|
46
|
+
strokeLinejoin: "round"
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @license lucide-react v0.544.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const Icon = forwardRef(
|
|
58
|
+
({
|
|
59
|
+
color = "currentColor",
|
|
60
|
+
size = 24,
|
|
61
|
+
strokeWidth = 2,
|
|
62
|
+
absoluteStrokeWidth,
|
|
63
|
+
className = "",
|
|
64
|
+
children,
|
|
65
|
+
iconNode,
|
|
66
|
+
...rest
|
|
67
|
+
}, ref) => createElement(
|
|
68
|
+
"svg",
|
|
69
|
+
{
|
|
70
|
+
ref,
|
|
71
|
+
...defaultAttributes,
|
|
72
|
+
width: size,
|
|
73
|
+
height: size,
|
|
74
|
+
stroke: color,
|
|
75
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
76
|
+
className: mergeClasses("lucide", className),
|
|
77
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
78
|
+
...rest
|
|
79
|
+
},
|
|
80
|
+
[
|
|
81
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
82
|
+
...Array.isArray(children) ? children : [children]
|
|
83
|
+
]
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @license lucide-react v0.544.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
const createLucideIcon = (iconName, iconNode) => {
|
|
96
|
+
const Component = forwardRef(
|
|
97
|
+
({ className, ...props }, ref) => createElement(Icon, {
|
|
98
|
+
ref,
|
|
99
|
+
iconNode,
|
|
100
|
+
className: mergeClasses(
|
|
101
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
102
|
+
`lucide-${iconName}`,
|
|
103
|
+
className
|
|
104
|
+
),
|
|
105
|
+
...props
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
Component.displayName = toPascalCase(iconName);
|
|
109
|
+
return Component;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export { createLucideIcon as c };
|
|
113
|
+
//# sourceMappingURL=createLucideIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLucideIcon.js","sources":["../node_modules/lucide-react/dist/esm/shared/src/utils.js","../node_modules/lucide-react/dist/esm/defaultAttributes.js","../node_modules/lucide-react/dist/esm/Icon.js","../node_modules/lucide-react/dist/esm/createLucideIcon.js"],"sourcesContent":["/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.544.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,WAAW,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE;AAC3F,MAAM,WAAW,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,OAAO;AAC9C,EAAE,uBAAuB;AACzB,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW;AAC3D,CAAC;AACD,MA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AC7B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AACvD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC5B,QAAQ;AACR,OAAO;AACP,MAAM,GAAG;AACT,KAAK;AACL,GAAG;AACH,EAAE,SAAS,CAAC,WAAW,GAAG,YAAY,CAAC,QAAQ,CAAC;AAChD,EAAE,OAAO,SAAS;AAClB;;;;","x_google_ignoreList":[0,1,2,3]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
1
2
|
import { ClassValue } from 'clsx';
|
|
2
3
|
import { default as default_2 } from 'react';
|
|
3
4
|
import * as React_2 from 'react';
|
|
@@ -87,17 +88,48 @@ export declare function CardTitle({ className, ...props }: React_2.ComponentProp
|
|
|
87
88
|
return <div data-slot='card-title' className={cn('leading-none font-semibold', className)} {...props} />;
|
|
88
89
|
}
|
|
89
90
|
|
|
91
|
+
export declare function Checkbox({
|
|
92
|
+
className,
|
|
93
|
+
...props
|
|
94
|
+
}: React_2.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
95
|
+
return (
|
|
96
|
+
<CheckboxPrimitive.Root
|
|
97
|
+
data-slot="checkbox"
|
|
98
|
+
className={cn(
|
|
99
|
+
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
100
|
+
className
|
|
101
|
+
)}
|
|
102
|
+
{...props}
|
|
103
|
+
>
|
|
104
|
+
<CheckboxPrimitive.Indicator
|
|
105
|
+
data-slot="checkbox-indicator"
|
|
106
|
+
className="grid place-content-center text-current transition-none"
|
|
107
|
+
>
|
|
108
|
+
<CheckIcon className="size-3.5" />
|
|
109
|
+
</CheckboxPrimitive.Indicator>
|
|
110
|
+
</CheckboxPrimitive.Root>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
90
114
|
export declare function cn(...inputs: ClassValue[]) {
|
|
91
115
|
return twMerge(clsx(inputs));
|
|
92
116
|
}
|
|
93
117
|
|
|
118
|
+
export declare const PasswordField: default_2.FC<PasswordFieldProps>;
|
|
119
|
+
|
|
120
|
+
declare interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'endAdornment'> {
|
|
121
|
+
showStrengthIndicator?: boolean;
|
|
122
|
+
toggleAriaLabel?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
94
125
|
export declare const TextField: default_2.FC<TextFieldProps>;
|
|
95
126
|
|
|
96
127
|
declare interface TextFieldProps extends default_2.ComponentProps<'input'> {
|
|
97
128
|
label?: string;
|
|
98
|
-
message?:
|
|
99
|
-
required?: boolean;
|
|
129
|
+
message?: default_2.ReactNode;
|
|
100
130
|
error?: boolean;
|
|
131
|
+
startAdornment?: default_2.ReactNode;
|
|
132
|
+
endAdornment?: default_2.ReactNode;
|
|
101
133
|
}
|
|
102
134
|
|
|
103
135
|
export declare const ThemeToggle: default_2.FC<ThemeToggleProps>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { c as cn } from './utils.js';
|
|
2
2
|
export { B as Button, b as buttonVariants } from './Button.js';
|
|
3
3
|
export { C as Card, a as CardContent, b as CardDescription, c as CardFooter, d as CardHeader, e as CardTitle } from './Card.js';
|
|
4
|
+
export { C as Checkbox } from './Checkbox.js';
|
|
4
5
|
export { T as TextField } from './TextField.js';
|
|
6
|
+
export { P as PasswordField } from './PasswordField.js';
|
|
5
7
|
export { T as ThemeToggle } from './ThemeToggle.js';
|
|
6
8
|
export { T as Typography } from './Typography.js';
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/index2.js
CHANGED
|
@@ -1,123 +1,41 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import 'react-dom';
|
|
3
|
+
import { c as createSlot } from './index3.js';
|
|
2
4
|
import { jsx } from 'react/jsx-runtime';
|
|
3
5
|
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
};
|
|
6
|
+
// src/primitive.tsx
|
|
7
|
+
var NODES = [
|
|
8
|
+
"a",
|
|
9
|
+
"button",
|
|
10
|
+
"div",
|
|
11
|
+
"form",
|
|
12
|
+
"h2",
|
|
13
|
+
"h3",
|
|
14
|
+
"img",
|
|
15
|
+
"input",
|
|
16
|
+
"label",
|
|
17
|
+
"li",
|
|
18
|
+
"nav",
|
|
19
|
+
"ol",
|
|
20
|
+
"p",
|
|
21
|
+
"select",
|
|
22
|
+
"span",
|
|
23
|
+
"svg",
|
|
24
|
+
"ul"
|
|
25
|
+
];
|
|
26
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
27
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
28
|
+
const Node = React.forwardRef((props, forwardedRef) => {
|
|
29
|
+
const { asChild, ...primitiveProps } = props;
|
|
30
|
+
const Comp = asChild ? Slot : node;
|
|
31
|
+
if (typeof window !== "undefined") {
|
|
32
|
+
window[Symbol.for("radix-ui")] = true;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/slot.tsx
|
|
38
|
-
// @__NO_SIDE_EFFECTS__
|
|
39
|
-
function createSlot(ownerName) {
|
|
40
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
41
|
-
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
42
|
-
const { children, ...slotProps } = props;
|
|
43
|
-
const childrenArray = React.Children.toArray(children);
|
|
44
|
-
const slottable = childrenArray.find(isSlottable);
|
|
45
|
-
if (slottable) {
|
|
46
|
-
const newElement = slottable.props.children;
|
|
47
|
-
const newChildren = childrenArray.map((child) => {
|
|
48
|
-
if (child === slottable) {
|
|
49
|
-
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
50
|
-
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
51
|
-
} else {
|
|
52
|
-
return child;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
56
|
-
}
|
|
57
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
34
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
58
35
|
});
|
|
59
|
-
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
63
|
-
// @__NO_SIDE_EFFECTS__
|
|
64
|
-
function createSlotClone(ownerName) {
|
|
65
|
-
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
66
|
-
const { children, ...slotProps } = props;
|
|
67
|
-
if (React.isValidElement(children)) {
|
|
68
|
-
const childrenRef = getElementRef(children);
|
|
69
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
70
|
-
if (children.type !== React.Fragment) {
|
|
71
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
72
|
-
}
|
|
73
|
-
return React.cloneElement(children, props2);
|
|
74
|
-
}
|
|
75
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
76
|
-
});
|
|
77
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
78
|
-
return SlotClone;
|
|
79
|
-
}
|
|
80
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
81
|
-
function isSlottable(child) {
|
|
82
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
83
|
-
}
|
|
84
|
-
function mergeProps(slotProps, childProps) {
|
|
85
|
-
const overrideProps = { ...childProps };
|
|
86
|
-
for (const propName in childProps) {
|
|
87
|
-
const slotPropValue = slotProps[propName];
|
|
88
|
-
const childPropValue = childProps[propName];
|
|
89
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
90
|
-
if (isHandler) {
|
|
91
|
-
if (slotPropValue && childPropValue) {
|
|
92
|
-
overrideProps[propName] = (...args) => {
|
|
93
|
-
const result = childPropValue(...args);
|
|
94
|
-
slotPropValue(...args);
|
|
95
|
-
return result;
|
|
96
|
-
};
|
|
97
|
-
} else if (slotPropValue) {
|
|
98
|
-
overrideProps[propName] = slotPropValue;
|
|
99
|
-
}
|
|
100
|
-
} else if (propName === "style") {
|
|
101
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
102
|
-
} else if (propName === "className") {
|
|
103
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return { ...slotProps, ...overrideProps };
|
|
107
|
-
}
|
|
108
|
-
function getElementRef(element) {
|
|
109
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
110
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
111
|
-
if (mayWarn) {
|
|
112
|
-
return element.ref;
|
|
113
|
-
}
|
|
114
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
115
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
116
|
-
if (mayWarn) {
|
|
117
|
-
return element.props.ref;
|
|
118
|
-
}
|
|
119
|
-
return element.props.ref || element.ref;
|
|
120
|
-
}
|
|
36
|
+
Node.displayName = `Primitive.${node}`;
|
|
37
|
+
return { ...primitive, [node]: Node };
|
|
38
|
+
}, {});
|
|
121
39
|
|
|
122
|
-
export {
|
|
40
|
+
export { Primitive as P };
|
|
123
41
|
//# sourceMappingURL=index2.js.map
|
package/dist/index2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;AAAA;AAEA,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE;AAC5B,EAAE,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AACjC,IAAI,OAAO,GAAG,CAAC,KAAK,CAAC;AACrB,EAAE,CAAC,MAAM,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,EAAE;AAC7C,IAAI,GAAG,CAAC,OAAO,GAAG,KAAK;AACvB,EAAE;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AI,OAAO,EAAE;AACf,IAAI,OAAO,OAAO,CAAC,GAAG;AACtB,EAAE;AACF,EAAE,MAAM,GAAG,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG;AAC/D,EAAE,OAAO,GAAG,MAAM,IAAI,gBAAgB,IAAI,MAAM,IAAI,MAAM,CAAC,cAAc;AACzE,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG;AAC5B,EAAE;AACF,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG;AACzC;;;;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"index2.js","sources":["../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n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as React from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// packages/react/compose-refs/src/compose-refs.tsx
|
|
5
|
+
function setRef(ref, value) {
|
|
6
|
+
if (typeof ref === "function") {
|
|
7
|
+
return ref(value);
|
|
8
|
+
} else if (ref !== null && ref !== void 0) {
|
|
9
|
+
ref.current = value;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function composeRefs(...refs) {
|
|
13
|
+
return (node) => {
|
|
14
|
+
let hasCleanup = false;
|
|
15
|
+
const cleanups = refs.map((ref) => {
|
|
16
|
+
const cleanup = setRef(ref, node);
|
|
17
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
18
|
+
hasCleanup = true;
|
|
19
|
+
}
|
|
20
|
+
return cleanup;
|
|
21
|
+
});
|
|
22
|
+
if (hasCleanup) {
|
|
23
|
+
return () => {
|
|
24
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
25
|
+
const cleanup = cleanups[i];
|
|
26
|
+
if (typeof cleanup == "function") {
|
|
27
|
+
cleanup();
|
|
28
|
+
} else {
|
|
29
|
+
setRef(refs[i], null);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function useComposedRefs(...refs) {
|
|
37
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/slot.tsx
|
|
41
|
+
// @__NO_SIDE_EFFECTS__
|
|
42
|
+
function createSlot(ownerName) {
|
|
43
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
44
|
+
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
45
|
+
const { children, ...slotProps } = props;
|
|
46
|
+
const childrenArray = React.Children.toArray(children);
|
|
47
|
+
const slottable = childrenArray.find(isSlottable);
|
|
48
|
+
if (slottable) {
|
|
49
|
+
const newElement = slottable.props.children;
|
|
50
|
+
const newChildren = childrenArray.map((child) => {
|
|
51
|
+
if (child === slottable) {
|
|
52
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
53
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
54
|
+
} else {
|
|
55
|
+
return child;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
59
|
+
}
|
|
60
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
61
|
+
});
|
|
62
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
63
|
+
return Slot2;
|
|
64
|
+
}
|
|
65
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
66
|
+
// @__NO_SIDE_EFFECTS__
|
|
67
|
+
function createSlotClone(ownerName) {
|
|
68
|
+
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
69
|
+
const { children, ...slotProps } = props;
|
|
70
|
+
if (React.isValidElement(children)) {
|
|
71
|
+
const childrenRef = getElementRef(children);
|
|
72
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
73
|
+
if (children.type !== React.Fragment) {
|
|
74
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
75
|
+
}
|
|
76
|
+
return React.cloneElement(children, props2);
|
|
77
|
+
}
|
|
78
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
79
|
+
});
|
|
80
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
81
|
+
return SlotClone;
|
|
82
|
+
}
|
|
83
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
84
|
+
function isSlottable(child) {
|
|
85
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
86
|
+
}
|
|
87
|
+
function mergeProps(slotProps, childProps) {
|
|
88
|
+
const overrideProps = { ...childProps };
|
|
89
|
+
for (const propName in childProps) {
|
|
90
|
+
const slotPropValue = slotProps[propName];
|
|
91
|
+
const childPropValue = childProps[propName];
|
|
92
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
93
|
+
if (isHandler) {
|
|
94
|
+
if (slotPropValue && childPropValue) {
|
|
95
|
+
overrideProps[propName] = (...args) => {
|
|
96
|
+
const result = childPropValue(...args);
|
|
97
|
+
slotPropValue(...args);
|
|
98
|
+
return result;
|
|
99
|
+
};
|
|
100
|
+
} else if (slotPropValue) {
|
|
101
|
+
overrideProps[propName] = slotPropValue;
|
|
102
|
+
}
|
|
103
|
+
} else if (propName === "style") {
|
|
104
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
105
|
+
} else if (propName === "className") {
|
|
106
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return { ...slotProps, ...overrideProps };
|
|
110
|
+
}
|
|
111
|
+
function getElementRef(element) {
|
|
112
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
113
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
114
|
+
if (mayWarn) {
|
|
115
|
+
return element.ref;
|
|
116
|
+
}
|
|
117
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
118
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
119
|
+
if (mayWarn) {
|
|
120
|
+
return element.props.ref;
|
|
121
|
+
}
|
|
122
|
+
return element.props.ref || element.ref;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { Slot as S, createSlot as c, useComposedRefs as u };
|
|
126
|
+
//# sourceMappingURL=index3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index3.js","sources":["../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;AAAA;AAEA,SAAS,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE;AAC5B,EAAE,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AACjC,IAAI,OAAO,GAAG,CAAC,KAAK,CAAC;AACrB,EAAE,CAAC,MAAM,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,MAAM,EAAE;AAC7C,IAAI,GAAG,CAAC,OAAO,GAAG,KAAK;AACvB,EAAE;AACF;AACA,SAAS,WAAW,CAAC,GAAG,IAAI,EAAE;AAC9B,EAAE,OAAO,CAAC,IAAI,KAAK;AACnB,IAAI,IAAI,UAAU,GAAG,KAAK;AAC1B,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK;AACvC,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC;AACvC,MAAM,IAAI,CAAC,UAAU,IAAI,OAAO,OAAO,IAAI,UAAU,EAAE;AACvD,QAAQ,UAAU,GAAG,IAAI;AACzB,MAAM;AACN,MAAM,OAAO,OAAO;AACpB,IAAI,CAAC,CAAC;AACN,IAAI,IAAI,UAAU,EAAE;AACpB,MAAM,OAAO,MAAM;AACnB,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAClD,UAAU,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC;AACrC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|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.6",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"main": "./dist/index.js",
|
|
@@ -34,6 +34,14 @@
|
|
|
34
34
|
"./ThemeToggle": {
|
|
35
35
|
"types": "./dist/components/ThemeToggle.d.ts",
|
|
36
36
|
"import": "./dist/components/ThemeToggle.js"
|
|
37
|
+
},
|
|
38
|
+
"./Checkbox": {
|
|
39
|
+
"types": "./dist/components/Checkbox.d.ts",
|
|
40
|
+
"import": "./dist/components/Checkbox.js"
|
|
41
|
+
},
|
|
42
|
+
"./PasswordField": {
|
|
43
|
+
"types": "./dist/components/PasswordField.d.ts",
|
|
44
|
+
"import": "./dist/components/PasswordField.js"
|
|
37
45
|
}
|
|
38
46
|
},
|
|
39
47
|
"files": [
|
|
@@ -83,6 +91,7 @@
|
|
|
83
91
|
"vite-plugin-dts": "^4.5.4"
|
|
84
92
|
},
|
|
85
93
|
"dependencies": {
|
|
94
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
86
95
|
"@radix-ui/react-label": "^2.1.7",
|
|
87
96
|
"@radix-ui/react-slot": "^1.2.3",
|
|
88
97
|
"@tailwindcss/vite": "^4.1.13",
|