@codefast/ui 0.3.9 → 0.3.10
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/CHANGELOG.md +11 -0
- package/dist/components/accordion.cjs +97 -1
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +51 -1
- package/dist/components/alert-dialog.cjs +155 -1
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +94 -1
- package/dist/components/alert.cjs +84 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +41 -1
- package/dist/components/aspect-ratio.cjs +43 -1
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/aspect-ratio.js +9 -1
- package/dist/components/avatar.cjs +65 -1
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +25 -1
- package/dist/components/badge.cjs +66 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +29 -1
- package/dist/components/breadcrumb.cjs +126 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +74 -1
- package/dist/components/button-group.cjs +86 -1
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +43 -1
- package/dist/components/button.cjs +92 -1
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +55 -1
- package/dist/components/calendar.cjs +150 -1
- package/dist/components/calendar.d.ts +12 -19
- package/dist/components/calendar.js +113 -1
- package/dist/components/card.cjs +105 -1
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +53 -1
- package/dist/components/carousel.cjs +210 -1
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +151 -1
- package/dist/components/chart.cjs +250 -3
- package/dist/components/chart.d.ts +9 -9
- package/dist/components/chart.js +198 -3
- package/dist/components/checkbox-cards.cjs +69 -1
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +32 -1
- package/dist/components/checkbox-group.cjs +63 -1
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +26 -1
- package/dist/components/checkbox.cjs +53 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +19 -1
- package/dist/components/collapsible.cjs +61 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/collapsible.js +21 -1
- package/dist/components/command.cjs +167 -1
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +106 -1
- package/dist/components/context-menu.cjs +218 -1
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +142 -1
- package/dist/components/dialog.cjs +164 -1
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +106 -1
- package/dist/components/drawer.cjs +143 -1
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +85 -1
- package/dist/components/dropdown-menu.cjs +221 -1
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +145 -1
- package/dist/components/empty.cjs +113 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +61 -1
- package/dist/components/field.cjs +193 -1
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +129 -1
- package/dist/components/form.cjs +151 -1
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +96 -1
- package/dist/components/hover-card.cjs +77 -1
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +34 -1
- package/dist/components/input-group.cjs +155 -1
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +97 -1
- package/dist/components/input-number.cjs +98 -1
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +64 -1
- package/dist/components/input-otp.cjs +101 -1
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +49 -1
- package/dist/components/input-password.cjs +71 -1
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +37 -1
- package/dist/components/input-search.cjs +80 -1
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +46 -1
- package/dist/components/input.cjs +45 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +11 -1
- package/dist/components/item.cjs +186 -1
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +119 -1
- package/dist/components/kbd.cjs +54 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +17 -1
- package/dist/components/label.cjs +45 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +11 -1
- package/dist/components/menubar.cjs +232 -1
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +153 -1
- package/dist/components/native-select.cjs +75 -1
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +35 -1
- package/dist/components/navigation-menu.cjs +146 -2
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +94 -2
- package/dist/components/pagination.cjs +138 -1
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +86 -1
- package/dist/components/popover.cjs +86 -1
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +40 -1
- package/dist/components/progress-circle.cjs +184 -1
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +147 -1
- package/dist/components/progress.cjs +52 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +18 -1
- package/dist/components/radio-cards.cjs +66 -1
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +29 -1
- package/dist/components/radio-group.cjs +59 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +22 -1
- package/dist/components/radio.cjs +47 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +13 -1
- package/dist/components/resizable.cjs +71 -1
- package/dist/components/resizable.d.ts +8 -8
- package/dist/components/resizable.js +31 -1
- package/dist/components/scroll-area.cjs +140 -1
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +100 -1
- package/dist/components/select.cjs +180 -1
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +119 -1
- package/dist/components/separator.cjs +82 -1
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +42 -1
- package/dist/components/sheet.cjs +184 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +123 -1
- package/dist/components/sidebar.cjs +506 -1
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +400 -1
- package/dist/components/skeleton.cjs +44 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +10 -1
- package/dist/components/slider.cjs +79 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +45 -1
- package/dist/components/sonner.cjs +57 -1
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +17 -1
- package/dist/components/spinner.cjs +75 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +41 -1
- package/dist/components/switch.cjs +49 -1
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +15 -1
- package/dist/components/table.cjs +118 -1
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +63 -1
- package/dist/components/tabs.cjs +75 -1
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +32 -1
- package/dist/components/textarea.cjs +44 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +10 -1
- package/dist/components/toggle-group.cjs +90 -1
- package/dist/components/toggle-group.d.ts +10 -12
- package/dist/components/toggle-group.js +53 -1
- package/dist/components/toggle.cjs +71 -1
- package/dist/components/toggle.d.ts +10 -12
- package/dist/components/toggle.js +34 -1
- package/dist/components/tooltip.cjs +90 -1
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +44 -1
- package/dist/css/amber.css +95 -1
- package/dist/css/blue.css +95 -1
- package/dist/css/cyan.css +95 -1
- package/dist/css/emerald.css +95 -1
- package/dist/css/fuchsia.css +95 -1
- package/dist/css/gray.css +95 -1
- package/dist/css/green.css +95 -1
- package/dist/css/indigo.css +95 -1
- package/dist/css/lime.css +95 -1
- package/dist/css/neutral.css +95 -1
- package/dist/css/orange.css +95 -1
- package/dist/css/pink.css +95 -1
- package/dist/css/preset.css +118 -1
- package/dist/css/purple.css +95 -1
- package/dist/css/red.css +95 -1
- package/dist/css/rose.css +95 -1
- package/dist/css/sky.css +95 -1
- package/dist/css/slate.css +95 -1
- package/dist/css/stone.css +95 -1
- package/dist/css/style.css +3 -1
- package/dist/css/teal.css +95 -1
- package/dist/css/violet.css +95 -1
- package/dist/css/yellow.css +95 -1
- package/dist/css/zinc.css +95 -1
- package/dist/hooks/use-animated-value.cjs +74 -1
- package/dist/hooks/use-animated-value.d.ts +9 -10
- package/dist/hooks/use-animated-value.js +40 -1
- package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +18 -1
- package/dist/hooks/use-copy-to-clipboard.js +23 -1
- package/dist/hooks/use-is-mobile.cjs +39 -1
- package/dist/hooks/use-is-mobile.d.ts +15 -6
- package/dist/hooks/use-is-mobile.js +5 -1
- package/dist/hooks/use-media-query.cjs +56 -1
- package/dist/hooks/use-media-query.d.ts +11 -3
- package/dist/hooks/use-media-query.js +22 -1
- package/dist/hooks/use-mutation-observer.cjs +56 -1
- package/dist/hooks/use-mutation-observer.d.ts +8 -12
- package/dist/hooks/use-mutation-observer.js +22 -1
- package/dist/hooks/use-pagination.cjs +92 -1
- package/dist/hooks/use-pagination.d.ts +12 -10
- package/dist/hooks/use-pagination.js +55 -1
- package/dist/index.cjs +1081 -1
- package/dist/index.d.ts +130 -131
- package/dist/index.js +69 -1
- package/dist/primitives/checkbox-group.cjs +151 -1
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +99 -1
- package/dist/primitives/input-number.cjs +439 -1
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +381 -1
- package/dist/primitives/input.cjs +99 -1
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +53 -1
- package/dist/primitives/progress-circle.cjs +198 -1
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +128 -1
- package/package.json +385 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import { InputGroupInput } from
|
|
3
|
-
type InputPasswordProps = Omit<ComponentProps<typeof InputGroupInput>,
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
import { InputGroupInput } from './input-group';
|
|
3
|
+
type InputPasswordProps = Omit<ComponentProps<typeof InputGroupInput>, 'type'>;
|
|
4
4
|
declare function InputPassword({ className, disabled, readOnly, ...props }: InputPasswordProps): JSX.Element;
|
|
5
5
|
export { InputPassword };
|
|
6
6
|
export type { InputPasswordProps };
|
|
@@ -1,2 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
4
|
+
import { useCallback, useState } from "react";
|
|
5
|
+
import { InputGroup, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
6
|
+
function InputPassword({ className, disabled, readOnly, ...props }) {
|
|
7
|
+
const [type, setType] = useState('password');
|
|
8
|
+
const togglePasswordVisibility = useCallback(()=>{
|
|
9
|
+
setType((previous)=>'password' === previous ? 'text' : 'password');
|
|
10
|
+
}, []);
|
|
11
|
+
return /*#__PURE__*/ jsxs(InputGroup, {
|
|
12
|
+
className: className,
|
|
13
|
+
"data-disabled": disabled ? 'true' : void 0,
|
|
14
|
+
"data-slot": "input-password",
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ jsx(InputGroupInput, {
|
|
17
|
+
autoCapitalize: "none",
|
|
18
|
+
"data-slot": "input-password-item",
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
readOnly: readOnly,
|
|
21
|
+
type: type,
|
|
22
|
+
...props
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ jsx(InputGroupButton, {
|
|
25
|
+
"aria-label": 'password' === type ? 'Show password' : 'Hide password',
|
|
26
|
+
className: "focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0",
|
|
27
|
+
"data-slot": "input-password-toggle",
|
|
28
|
+
disabled: disabled,
|
|
29
|
+
size: "icon-sm",
|
|
30
|
+
type: "button",
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
onClick: togglePasswordVisibility,
|
|
33
|
+
children: 'password' === type ? /*#__PURE__*/ jsx(EyeOffIcon, {}) : /*#__PURE__*/ jsx(EyeIcon, {})
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export { InputPassword };
|
|
@@ -1,2 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
InputSearch: ()=>InputSearch
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const react_use_controllable_state_namespaceObject = require("@radix-ui/react-use-controllable-state");
|
|
32
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
33
|
+
const external_input_group_cjs_namespaceObject = require("./input-group.cjs");
|
|
34
|
+
function InputSearch({ className, defaultValue, disabled, onChange, readOnly, value: valueProperty, ...props }) {
|
|
35
|
+
const [value, setValue] = (0, react_use_controllable_state_namespaceObject.useControllableState)({
|
|
36
|
+
defaultProp: defaultValue,
|
|
37
|
+
onChange,
|
|
38
|
+
prop: valueProperty
|
|
39
|
+
});
|
|
40
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup, {
|
|
41
|
+
className: className,
|
|
42
|
+
"data-disabled": disabled ? 'true' : void 0,
|
|
43
|
+
"data-slot": "input-search",
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupAddon, {
|
|
46
|
+
align: "inline-start",
|
|
47
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.SearchIcon, {})
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput, {
|
|
50
|
+
"data-slot": "input-search-item",
|
|
51
|
+
disabled: disabled,
|
|
52
|
+
readOnly: readOnly,
|
|
53
|
+
type: "search",
|
|
54
|
+
value: value ?? '',
|
|
55
|
+
onChange: (event)=>{
|
|
56
|
+
setValue(event.target.value);
|
|
57
|
+
},
|
|
58
|
+
...props
|
|
59
|
+
}),
|
|
60
|
+
value ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton, {
|
|
61
|
+
"aria-label": "Clear search",
|
|
62
|
+
className: "focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0",
|
|
63
|
+
"data-slot": "input-search-clear",
|
|
64
|
+
disabled: disabled ?? readOnly,
|
|
65
|
+
size: "icon-sm",
|
|
66
|
+
variant: "ghost",
|
|
67
|
+
onClick: ()=>{
|
|
68
|
+
setValue('');
|
|
69
|
+
},
|
|
70
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.XIcon, {})
|
|
71
|
+
}) : null
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
exports.InputSearch = __webpack_exports__.InputSearch;
|
|
76
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
77
|
+
"InputSearch"
|
|
78
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
79
|
+
Object.defineProperty(exports, '__esModule', {
|
|
80
|
+
value: true
|
|
81
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import { InputGroupInput } from
|
|
3
|
-
interface InputSearchProps extends Omit<ComponentProps<typeof InputGroupInput>,
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
import { InputGroupInput } from './input-group';
|
|
3
|
+
interface InputSearchProps extends Omit<ComponentProps<typeof InputGroupInput>, 'defaultValue' | 'onChange' | 'type' | 'value'> {
|
|
4
4
|
defaultValue?: string;
|
|
5
5
|
onChange?: (value?: string) => void;
|
|
6
6
|
value?: string;
|
|
@@ -1,2 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
4
|
+
import { SearchIcon, XIcon } from "lucide-react";
|
|
5
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
6
|
+
function InputSearch({ className, defaultValue, disabled, onChange, readOnly, value: valueProperty, ...props }) {
|
|
7
|
+
const [value, setValue] = useControllableState({
|
|
8
|
+
defaultProp: defaultValue,
|
|
9
|
+
onChange,
|
|
10
|
+
prop: valueProperty
|
|
11
|
+
});
|
|
12
|
+
return /*#__PURE__*/ jsxs(InputGroup, {
|
|
13
|
+
className: className,
|
|
14
|
+
"data-disabled": disabled ? 'true' : void 0,
|
|
15
|
+
"data-slot": "input-search",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ jsx(InputGroupAddon, {
|
|
18
|
+
align: "inline-start",
|
|
19
|
+
children: /*#__PURE__*/ jsx(SearchIcon, {})
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsx(InputGroupInput, {
|
|
22
|
+
"data-slot": "input-search-item",
|
|
23
|
+
disabled: disabled,
|
|
24
|
+
readOnly: readOnly,
|
|
25
|
+
type: "search",
|
|
26
|
+
value: value ?? '',
|
|
27
|
+
onChange: (event)=>{
|
|
28
|
+
setValue(event.target.value);
|
|
29
|
+
},
|
|
30
|
+
...props
|
|
31
|
+
}),
|
|
32
|
+
value ? /*#__PURE__*/ jsx(InputGroupButton, {
|
|
33
|
+
"aria-label": "Clear search",
|
|
34
|
+
className: "focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0",
|
|
35
|
+
"data-slot": "input-search-clear",
|
|
36
|
+
disabled: disabled ?? readOnly,
|
|
37
|
+
size: "icon-sm",
|
|
38
|
+
variant: "ghost",
|
|
39
|
+
onClick: ()=>{
|
|
40
|
+
setValue('');
|
|
41
|
+
},
|
|
42
|
+
children: /*#__PURE__*/ jsx(XIcon, {})
|
|
43
|
+
}) : null
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { InputSearch };
|
|
@@ -1,2 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
"use client";
|
|
2
|
-
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
Input: ()=>Input
|
|
29
|
+
});
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
32
|
+
function Input({ className, type, ...props }) {
|
|
33
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("input", {
|
|
34
|
+
className: (0, tailwind_variants_namespaceObject.cn)('file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className),
|
|
35
|
+
"data-slot": "input",
|
|
36
|
+
type: type,
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.Input = __webpack_exports__.Input;
|
|
41
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
42
|
+
"Input"
|
|
43
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
44
|
+
Object.defineProperty(exports, '__esModule', {
|
|
45
|
+
value: true
|
|
46
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
type InputProps = ComponentProps<
|
|
1
|
+
import type { ComponentProps, JSX } from 'react';
|
|
2
|
+
type InputProps = ComponentProps<'input'>;
|
|
3
3
|
declare function Input({ className, type, ...props }: InputProps): JSX.Element;
|
|
4
4
|
export { Input };
|
|
5
5
|
export type { InputProps };
|
package/dist/components/input.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
+
function Input({ className, type, ...props }) {
|
|
5
|
+
return /*#__PURE__*/ jsx("input", {
|
|
6
|
+
className: cn('file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-lg border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3', 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive', className),
|
|
7
|
+
"data-slot": "input",
|
|
8
|
+
type: type,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export { Input };
|
package/dist/components/item.cjs
CHANGED
|
@@ -1 +1,186 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
ItemContent: ()=>ItemContent,
|
|
28
|
+
ItemFooter: ()=>ItemFooter,
|
|
29
|
+
ItemGroup: ()=>ItemGroup,
|
|
30
|
+
ItemTitle: ()=>ItemTitle,
|
|
31
|
+
ItemMedia: ()=>ItemMedia,
|
|
32
|
+
itemVariants: ()=>itemVariants,
|
|
33
|
+
ItemActions: ()=>ItemActions,
|
|
34
|
+
ItemDescription: ()=>ItemDescription,
|
|
35
|
+
ItemHeader: ()=>ItemHeader,
|
|
36
|
+
ItemSeparator: ()=>ItemSeparator,
|
|
37
|
+
Item: ()=>Item,
|
|
38
|
+
itemMediaVariants: ()=>itemMediaVariants
|
|
39
|
+
});
|
|
40
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
41
|
+
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
42
|
+
const react_slot_namespaceObject = require("@radix-ui/react-slot");
|
|
43
|
+
const external_separator_cjs_namespaceObject = require("./separator.cjs");
|
|
44
|
+
const itemVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
45
|
+
base: (0, tailwind_variants_namespaceObject.cn)('group/item flex flex-wrap items-center rounded-lg border border-transparent text-sm transition-colors duration-100 outline-hidden', '[a]:transition-colors [a]:hover:bg-accent/50', 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3'),
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
size: 'default',
|
|
48
|
+
variant: 'default'
|
|
49
|
+
},
|
|
50
|
+
variants: {
|
|
51
|
+
size: {
|
|
52
|
+
default: 'gap-4 p-4',
|
|
53
|
+
sm: 'gap-2.5 px-4 py-3'
|
|
54
|
+
},
|
|
55
|
+
variant: {
|
|
56
|
+
default: 'bg-transparent',
|
|
57
|
+
muted: 'bg-muted/50',
|
|
58
|
+
outline: 'border-border'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const itemMediaVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
63
|
+
base: (0, tailwind_variants_namespaceObject.cn)("group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center gap-2", "[&_svg]:pointer-events-none group-has-[[data-slot=item-description]]/item:translate-y-0.5"),
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
variant: 'default'
|
|
66
|
+
},
|
|
67
|
+
variants: {
|
|
68
|
+
variant: {
|
|
69
|
+
default: 'bg-transparent',
|
|
70
|
+
icon: "size-8 shrink-0 rounded-md border bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
71
|
+
image: 'size-10 shrink-0 overflow-hidden rounded-md [&_img]:size-full [&_img]:object-cover'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
function ItemGroup({ className, ...props }) {
|
|
76
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
77
|
+
className: (0, tailwind_variants_namespaceObject.cn)('group/item-group flex flex-col', className),
|
|
78
|
+
"data-slot": "item-group",
|
|
79
|
+
role: "list",
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function ItemSeparator({ className, ...props }) {
|
|
84
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator, {
|
|
85
|
+
className: (0, tailwind_variants_namespaceObject.cn)('my-0', className),
|
|
86
|
+
"data-slot": "item-separator",
|
|
87
|
+
orientation: "horizontal",
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function Item({ asChild = false, className, size = 'default', variant = 'default', ...props }) {
|
|
92
|
+
const Component = asChild ? react_slot_namespaceObject.Slot : 'div';
|
|
93
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
94
|
+
className: itemVariants({
|
|
95
|
+
className,
|
|
96
|
+
size,
|
|
97
|
+
variant
|
|
98
|
+
}),
|
|
99
|
+
"data-size": size,
|
|
100
|
+
"data-slot": "item",
|
|
101
|
+
"data-variant": variant,
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function ItemMedia({ className, variant = 'default', ...props }) {
|
|
106
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
+
className: itemMediaVariants({
|
|
108
|
+
className,
|
|
109
|
+
variant
|
|
110
|
+
}),
|
|
111
|
+
"data-slot": "item-media",
|
|
112
|
+
"data-variant": variant,
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function ItemContent({ className, ...props }) {
|
|
117
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
118
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none', className),
|
|
119
|
+
"data-slot": "item-content",
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function ItemTitle({ className, ...props }) {
|
|
124
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
125
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex w-fit items-center gap-2 text-sm leading-snug font-medium', className),
|
|
126
|
+
"data-slot": "item-title",
|
|
127
|
+
...props
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function ItemDescription({ className, ...props }) {
|
|
131
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
132
|
+
className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground line-clamp-2 text-sm leading-normal font-normal text-balance', '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4', className),
|
|
133
|
+
"data-slot": "item-description",
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function ItemActions({ className, ...props }) {
|
|
138
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
139
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex items-center gap-2', className),
|
|
140
|
+
"data-slot": "item-actions",
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function ItemHeader({ className, ...props }) {
|
|
145
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
146
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex basis-full items-center justify-between gap-2', className),
|
|
147
|
+
"data-slot": "item-header",
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function ItemFooter({ className, ...props }) {
|
|
152
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
153
|
+
className: (0, tailwind_variants_namespaceObject.cn)('flex basis-full items-center justify-between gap-2', className),
|
|
154
|
+
"data-slot": "item-footer",
|
|
155
|
+
...props
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
exports.Item = __webpack_exports__.Item;
|
|
159
|
+
exports.ItemActions = __webpack_exports__.ItemActions;
|
|
160
|
+
exports.ItemContent = __webpack_exports__.ItemContent;
|
|
161
|
+
exports.ItemDescription = __webpack_exports__.ItemDescription;
|
|
162
|
+
exports.ItemFooter = __webpack_exports__.ItemFooter;
|
|
163
|
+
exports.ItemGroup = __webpack_exports__.ItemGroup;
|
|
164
|
+
exports.ItemHeader = __webpack_exports__.ItemHeader;
|
|
165
|
+
exports.ItemMedia = __webpack_exports__.ItemMedia;
|
|
166
|
+
exports.ItemSeparator = __webpack_exports__.ItemSeparator;
|
|
167
|
+
exports.ItemTitle = __webpack_exports__.ItemTitle;
|
|
168
|
+
exports.itemMediaVariants = __webpack_exports__.itemMediaVariants;
|
|
169
|
+
exports.itemVariants = __webpack_exports__.itemVariants;
|
|
170
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
171
|
+
"Item",
|
|
172
|
+
"ItemActions",
|
|
173
|
+
"ItemContent",
|
|
174
|
+
"ItemDescription",
|
|
175
|
+
"ItemFooter",
|
|
176
|
+
"ItemGroup",
|
|
177
|
+
"ItemHeader",
|
|
178
|
+
"ItemMedia",
|
|
179
|
+
"ItemSeparator",
|
|
180
|
+
"ItemTitle",
|
|
181
|
+
"itemMediaVariants",
|
|
182
|
+
"itemVariants"
|
|
183
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
184
|
+
Object.defineProperty(exports, '__esModule', {
|
|
185
|
+
value: true
|
|
186
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import { Separator } from
|
|
1
|
+
import type { VariantProps } from '@codefast/tailwind-variants';
|
|
2
|
+
import type { ComponentProps, JSX } from 'react';
|
|
3
|
+
import { Separator } from './separator';
|
|
4
4
|
declare const itemVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
5
|
size: {
|
|
6
6
|
default: string;
|
|
@@ -19,27 +19,27 @@ declare const itemMediaVariants: import("@codefast/tailwind-variants").VariantFu
|
|
|
19
19
|
image: string;
|
|
20
20
|
};
|
|
21
21
|
}, Record<string, never>>;
|
|
22
|
-
type ItemGroupProps = ComponentProps<
|
|
22
|
+
type ItemGroupProps = ComponentProps<'div'>;
|
|
23
23
|
declare function ItemGroup({ className, ...props }: ItemGroupProps): JSX.Element;
|
|
24
24
|
type ItemSeparatorProps = ComponentProps<typeof Separator>;
|
|
25
25
|
declare function ItemSeparator({ className, ...props }: ItemSeparatorProps): JSX.Element;
|
|
26
|
-
type ItemProps = ComponentProps<
|
|
26
|
+
type ItemProps = ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
|
|
27
27
|
asChild?: boolean;
|
|
28
28
|
};
|
|
29
29
|
declare function Item({ asChild, className, size, variant, ...props }: ItemProps): JSX.Element;
|
|
30
|
-
type ItemMediaProps = ComponentProps<
|
|
30
|
+
type ItemMediaProps = ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>;
|
|
31
31
|
declare function ItemMedia({ className, variant, ...props }: ItemMediaProps): JSX.Element;
|
|
32
|
-
type ItemContentProps = ComponentProps<
|
|
32
|
+
type ItemContentProps = ComponentProps<'div'>;
|
|
33
33
|
declare function ItemContent({ className, ...props }: ItemContentProps): JSX.Element;
|
|
34
|
-
type ItemTitleProps = ComponentProps<
|
|
34
|
+
type ItemTitleProps = ComponentProps<'div'>;
|
|
35
35
|
declare function ItemTitle({ className, ...props }: ItemTitleProps): JSX.Element;
|
|
36
|
-
type ItemDescriptionProps = ComponentProps<
|
|
36
|
+
type ItemDescriptionProps = ComponentProps<'p'>;
|
|
37
37
|
declare function ItemDescription({ className, ...props }: ItemDescriptionProps): JSX.Element;
|
|
38
|
-
type ItemActionsProps = ComponentProps<
|
|
38
|
+
type ItemActionsProps = ComponentProps<'div'>;
|
|
39
39
|
declare function ItemActions({ className, ...props }: ItemActionsProps): JSX.Element;
|
|
40
|
-
type ItemHeaderProps = ComponentProps<
|
|
40
|
+
type ItemHeaderProps = ComponentProps<'div'>;
|
|
41
41
|
declare function ItemHeader({ className, ...props }: ItemHeaderProps): JSX.Element;
|
|
42
|
-
type ItemFooterProps = ComponentProps<
|
|
42
|
+
type ItemFooterProps = ComponentProps<'div'>;
|
|
43
43
|
declare function ItemFooter({ className, ...props }: ItemFooterProps): JSX.Element;
|
|
44
44
|
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, itemMediaVariants, ItemSeparator, ItemTitle, itemVariants, };
|
|
45
45
|
export type { ItemActionsProps, ItemContentProps, ItemDescriptionProps, ItemFooterProps, ItemGroupProps, ItemHeaderProps, ItemMediaProps, ItemProps, ItemSeparatorProps, ItemTitleProps, };
|