@pathscale/ui 0.1.0 → 0.1.1
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/LICENSE +1 -0
- package/README.md +59 -1
- package/dist/components/accordion/Accordion.d.ts +25 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/alert/Alert.d.ts +17 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/artboard/Artboard.d.ts +9 -0
- package/dist/components/artboard/index.d.ts +1 -0
- package/dist/components/avatar/Avatar.d.ts +26 -0
- package/dist/components/avatar/AvatarGroup.d.ts +15 -0
- package/dist/components/avatar/index.d.ts +3 -8
- package/dist/components/background/Background.d.ts +5 -0
- package/dist/components/background/index.d.ts +1 -0
- package/dist/components/badge/Badge.d.ts +19 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/bottom-sheet/BottomSheet.d.ts +11 -0
- package/dist/components/bottom-sheet/index.d.ts +2 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +7 -0
- package/dist/components/breadcrumbs/BreadcrumbsItem.d.ts +6 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/browsermockup/BrowserMockup.d.ts +10 -0
- package/dist/components/browsermockup/index.d.ts +2 -0
- package/dist/components/button/Button.d.ts +36 -0
- package/dist/components/button/index.d.ts +1 -9
- package/dist/components/calendar/Calendar.d.ts +27 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/card/Card.d.ts +28 -0
- package/dist/components/card/CardActions.d.ts +4 -0
- package/dist/components/card/CardBody.d.ts +4 -0
- package/dist/components/card/CardImage.d.ts +3 -0
- package/dist/components/card/CardTitle.d.ts +6 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/carousel/Carousel.d.ts +15 -0
- package/dist/components/carousel/CarouselItem.d.ts +6 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/chatbubble/ChatBubble.d.ts +13 -0
- package/dist/components/chatbubble/ChatBubbleAvatar.d.ts +6 -0
- package/dist/components/chatbubble/ChatBubbleFooter.d.ts +5 -0
- package/dist/components/chatbubble/ChatBubbleHeader.d.ts +5 -0
- package/dist/components/chatbubble/ChatBubbleMessage.d.ts +7 -0
- package/dist/components/chatbubble/ChatBubbleTime.d.ts +5 -0
- package/dist/components/chatbubble/index.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +20 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/codemockup/CodeMockup.d.ts +5 -0
- package/dist/components/codemockup/CodeMockupLine.d.ts +12 -0
- package/dist/components/codemockup/index.d.ts +2 -0
- package/dist/components/collapse/Collapse.d.ts +20 -0
- package/dist/components/collapse/CollapseContent.d.ts +4 -0
- package/dist/components/collapse/CollapseDetails.d.ts +17 -0
- package/dist/components/collapse/CollapseTitle.d.ts +9 -0
- package/dist/components/collapse/index.d.ts +4 -0
- package/dist/components/connectionstatus/ConnectionStatus.d.ts +59 -0
- package/dist/components/connectionstatus/index.d.ts +2 -0
- package/dist/components/copy-button/CopyButton.d.ts +11 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/countdown/Countdown.d.ts +7 -0
- package/dist/components/countdown/index.d.ts +1 -0
- package/dist/components/diff/Diff.d.ts +7 -0
- package/dist/components/diff/index.d.ts +1 -0
- package/dist/components/divider/Divider.d.ts +21 -0
- package/dist/components/divider/Divider.styles.d.ts +25 -0
- package/dist/components/divider/index.d.ts +2 -0
- package/dist/components/dock/Dock.d.ts +14 -0
- package/dist/components/dock/DockItem.d.ts +9 -0
- package/dist/components/dock/DockLabel.d.ts +6 -0
- package/dist/components/dock/index.d.ts +3 -0
- package/dist/components/drawer/Drawer.d.ts +14 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +28 -0
- package/dist/components/dropdown/DropdownDetails.d.ts +14 -0
- package/dist/components/dropdown/DropdownItem.d.ts +19 -0
- package/dist/components/dropdown/DropdownMenu.d.ts +9 -0
- package/dist/components/dropdown/DropdownToggle.d.ts +17 -0
- package/dist/components/dropdown/dropdownContext.d.ts +9 -0
- package/dist/components/dropdown/index.d.ts +2 -0
- package/dist/components/fileinput/FileInput.d.ts +14 -0
- package/dist/components/fileinput/index.d.ts +1 -0
- package/dist/components/flex/Flex.d.ts +18 -0
- package/dist/components/flex/index.d.ts +1 -0
- package/dist/components/footer/Footer.d.ts +11 -0
- package/dist/components/footer/FooterTitle.d.ts +4 -0
- package/dist/components/footer/index.d.ts +3 -0
- package/dist/components/form/Form.d.ts +22 -0
- package/dist/components/form/FormDropdown.d.ts +25 -0
- package/dist/components/form/FormField.d.ts +14 -0
- package/dist/components/form/Label.d.ts +7 -0
- package/dist/components/form/NumberField.d.ts +20 -0
- package/dist/components/form/PasswordField.d.ts +16 -0
- package/dist/components/form/ValidatedForm.d.ts +26 -0
- package/dist/components/form/index.d.ts +4 -0
- package/dist/components/grid/Grid.d.ts +18 -0
- package/dist/components/grid/index.d.ts +1 -0
- package/dist/components/hero/Hero.d.ts +10 -0
- package/dist/components/hero/HeroContent.d.ts +6 -0
- package/dist/components/hero/HeroOverlay.d.ts +6 -0
- package/dist/components/hero/index.d.ts +4 -0
- package/dist/components/icon/Icon.d.ts +11 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/indicator/Indicator.d.ts +30 -0
- package/dist/components/indicator/index.d.ts +2 -0
- package/dist/components/input/Input.d.ts +23 -0
- package/dist/components/input/index.d.ts +3 -8
- package/dist/components/join/Join.d.ts +9 -0
- package/dist/components/join/index.d.ts +2 -0
- package/dist/components/kbd/Kbd.d.ts +4 -0
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/link/Link.d.ts +12 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/loading/Loading.d.ts +14 -0
- package/dist/components/loading/index.d.ts +1 -0
- package/dist/components/mask/Mask.d.ts +14 -0
- package/dist/components/mask/index.d.ts +2 -0
- package/dist/components/menu/Menu.d.ts +21 -0
- package/dist/components/menu/MenuDetails.d.ts +8 -0
- package/dist/components/menu/MenuDropdown.d.ts +12 -0
- package/dist/components/menu/MenuItem.d.ts +9 -0
- package/dist/components/menu/MenuTitle.d.ts +8 -0
- package/dist/components/menu/index.d.ts +3 -0
- package/dist/components/modal/Modal.d.ts +26 -0
- package/dist/components/modal/ModalActions.d.ts +3 -0
- package/dist/components/modal/ModalBody.d.ts +3 -0
- package/dist/components/modal/ModalHeader.d.ts +3 -0
- package/dist/components/modal/ModalLegacy.d.ts +8 -0
- package/dist/components/modal/index.d.ts +6 -0
- package/dist/components/navbar/Navbar.d.ts +15 -0
- package/dist/components/navbar/NavbarRow.d.ts +9 -0
- package/dist/components/navbar/NavbarSection.d.ts +8 -0
- package/dist/components/navbar/NavbarStack.d.ts +10 -0
- package/dist/components/navbar/index.d.ts +4 -0
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/phonemockup/PhoneMockup.d.ts +8 -0
- package/dist/components/phonemockup/index.d.ts +1 -0
- package/dist/components/progress/Progress.d.ts +14 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/props-table/PropsTable.d.ts +14 -0
- package/dist/components/props-table/index.d.ts +2 -0
- package/dist/components/radialprogress/RadialProgress.d.ts +10 -0
- package/dist/components/radialprogress/index.d.ts +1 -0
- package/dist/components/radio/Radio.d.ts +16 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/range/Range.d.ts +12 -0
- package/dist/components/range/index.d.ts +1 -0
- package/dist/components/rating/Rating.d.ts +23 -0
- package/dist/components/rating/RatingHidden.d.ts +4 -0
- package/dist/components/rating/RatingItem.d.ts +9 -0
- package/dist/components/rating/index.d.ts +4 -0
- package/dist/components/select/Select.d.ts +15 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/showcase/ShowcaseBlock.d.ts +10 -0
- package/dist/components/showcase/index.d.ts +2 -0
- package/dist/components/showcase-section/ShowcaseSection.d.ts +8 -0
- package/dist/components/showcase-section/index.d.ts +2 -0
- package/dist/components/sidenav/Sidenav.d.ts +14 -0
- package/dist/components/sidenav/SidenavButton.d.ts +9 -0
- package/dist/components/sidenav/SidenavGroup.d.ts +10 -0
- package/dist/components/sidenav/SidenavItem.d.ts +8 -0
- package/dist/components/sidenav/SidenavLink.d.ts +9 -0
- package/dist/components/sidenav/SidenavMenu.d.ts +5 -0
- package/dist/components/sidenav/index.d.ts +12 -0
- package/dist/components/skeleton/Skeleton.d.ts +5 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/stack/Stack.d.ts +17 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stat-card/StatCard.d.ts +22 -0
- package/dist/components/stat-card/StatCardSection.d.ts +5 -0
- package/dist/components/stat-card/index.d.ts +1 -0
- package/dist/components/stats/Stat.d.ts +12 -0
- package/dist/components/stats/StatSection.d.ts +6 -0
- package/dist/components/stats/Stats.d.ts +15 -0
- package/dist/components/stats/index.d.ts +1 -0
- package/dist/components/status/Status.d.ts +8 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/steps/Step.d.ts +19 -0
- package/dist/components/steps/Steps.d.ts +18 -0
- package/dist/components/steps/index.d.ts +2 -0
- package/dist/components/streaming-table/StreamingTable.d.ts +26 -0
- package/dist/components/streaming-table/createRowStore.d.ts +7 -0
- package/dist/components/streaming-table/createStreamingTableStore.d.ts +13 -0
- package/dist/components/streaming-table/index.d.ts +5 -0
- package/dist/components/streaming-table/types.d.ts +46 -0
- package/dist/components/svgbackground/SvgBackground.d.ts +21 -0
- package/dist/components/svgbackground/index.d.ts +2 -0
- package/dist/components/swap/Swap.d.ts +12 -0
- package/dist/components/swap/index.d.ts +1 -0
- package/dist/components/table/EnhancedTable.d.ts +45 -0
- package/dist/components/table/Table.d.ts +18 -0
- package/dist/components/table/TableBody.d.ts +5 -0
- package/dist/components/table/TableCell.d.ts +7 -0
- package/dist/components/table/TableFooter.d.ts +7 -0
- package/dist/components/table/TableHead.d.ts +7 -0
- package/dist/components/table/TableHeadCell.d.ts +7 -0
- package/dist/components/table/TableRow.d.ts +8 -0
- package/dist/components/table/index.d.ts +4 -0
- package/dist/components/tabs/RadioTab.d.ts +16 -0
- package/dist/components/tabs/Tab.d.ts +12 -0
- package/dist/components/tabs/Tabs.d.ts +12 -0
- package/dist/components/tabs/index.d.ts +4 -0
- package/dist/components/textarea/Textarea.d.ts +14 -0
- package/dist/components/textarea/index.d.ts +1 -8
- package/dist/components/timeline/Timeline.d.ts +11 -0
- package/dist/components/timeline/TimelineEnd.d.ts +6 -0
- package/dist/components/timeline/TimelineItem.d.ts +8 -0
- package/dist/components/timeline/TimelineMiddle.d.ts +4 -0
- package/dist/components/timeline/TimelineStart.d.ts +6 -0
- package/dist/components/timeline/index.d.ts +5 -0
- package/dist/components/toast/Toast.d.ts +21 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toastcontainer/ToastContainer.d.ts +2 -0
- package/dist/components/toastcontainer/index.d.ts +1 -0
- package/dist/components/toggle/Toggle.d.ts +19 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +15 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/types.d.ts +15 -0
- package/dist/components/utils.d.ts +9 -0
- package/dist/components/windowmockup/WindowMockup.d.ts +11 -0
- package/dist/components/windowmockup/index.d.ts +1 -0
- package/dist/index.d.ts +93 -7
- package/dist/index.js +12922 -4
- package/dist/lib/iterable.d.ts +9 -0
- package/dist/lib/props/index.d.ts +1 -0
- package/dist/lib/props/types.d.ts +1 -0
- package/dist/lib/refs/index.d.ts +2 -0
- package/dist/lib/refs/mergeRefs.d.ts +7 -0
- package/dist/lib/refs/types.d.ts +1 -0
- package/dist/lib/style/classes.d.ts +33 -0
- package/dist/lib/style/index.d.ts +1 -0
- package/dist/lib/tag/createIsButton.d.ts +21 -0
- package/dist/lib/tag/createTagName.d.ts +12 -0
- package/dist/lib/tag/index.d.ts +2 -0
- package/dist/sidenav/Sidenav.css +150 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/toastStore.d.ts +17 -0
- package/dist/styles/icons/generated-icons.css +1 -0
- package/package.json +63 -43
- package/dist/Avatar-CzIirpVq.d.ts +0 -33
- package/dist/Button-BOYHKShy.d.ts +0 -63
- package/dist/Input-CvNxe1rq.d.ts +0 -34
- package/dist/Textarea-5_oQknZn.d.ts +0 -37
- package/dist/chunk/3MUBOGZG.js +0 -213
- package/dist/chunk/EB7KXR65.js +0 -102
- package/dist/chunk/G6RG4LR7.js +0 -87
- package/dist/chunk/HEJAQSH5.jsx +0 -100
- package/dist/chunk/HKS7ET6T.js +0 -56
- package/dist/chunk/KACNXPUM.jsx +0 -103
- package/dist/chunk/NLD5D3P7.jsx +0 -94
- package/dist/chunk/P7WPLZNA.jsx +0 -59
- package/dist/chunk/UTRNHAP4.js +0 -95
- package/dist/chunk/VMEDFWWG.js +0 -102
- package/dist/chunk/WB6NEEQV.jsx +0 -107
- package/dist/chunk/YZ3ID3UY.jsx +0 -226
- package/dist/classes-B_S9K-9I.d.ts +0 -13
- package/dist/components/avatar/index.js +0 -1
- package/dist/components/avatar/index.jsx +0 -7
- package/dist/components/button/index.js +0 -1
- package/dist/components/button/index.jsx +0 -8
- package/dist/components/input/index.js +0 -1
- package/dist/components/input/index.jsx +0 -7
- package/dist/components/polymorphic/index.d.ts +0 -35
- package/dist/components/polymorphic/index.js +0 -1
- package/dist/components/polymorphic/index.jsx +0 -8
- package/dist/components/textarea/index.js +0 -1
- package/dist/components/textarea/index.jsx +0 -7
- package/dist/index.css +0 -73
- package/dist/index.jsx +0 -20
package/dist/chunk/NLD5D3P7.jsx
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cva
|
|
3
|
-
} from "./P7WPLZNA.jsx";
|
|
4
|
-
|
|
5
|
-
// src/components/input/Input.tsx
|
|
6
|
-
import {
|
|
7
|
-
createMemo,
|
|
8
|
-
createSignal,
|
|
9
|
-
mergeProps,
|
|
10
|
-
Show,
|
|
11
|
-
splitProps
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/input/Input.styles.ts
|
|
15
|
-
var inputVariants = cva(
|
|
16
|
-
[
|
|
17
|
-
"block w-full appearance-none outline-none bg-transparent",
|
|
18
|
-
"border transition-colors duration-200",
|
|
19
|
-
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
20
|
-
],
|
|
21
|
-
{
|
|
22
|
-
variants: {
|
|
23
|
-
color: {
|
|
24
|
-
danger: "border-red-500 text-red-600",
|
|
25
|
-
success: "border-green-500 text-green-600",
|
|
26
|
-
warning: "border-orange-500 text-orange-600"
|
|
27
|
-
},
|
|
28
|
-
rounded: {
|
|
29
|
-
true: "rounded-full",
|
|
30
|
-
false: "rounded-md"
|
|
31
|
-
},
|
|
32
|
-
expanded: {
|
|
33
|
-
true: "w-full",
|
|
34
|
-
false: "w-fit"
|
|
35
|
-
},
|
|
36
|
-
loading: {
|
|
37
|
-
true: "opacity-50",
|
|
38
|
-
false: ""
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
color: void 0,
|
|
43
|
-
rounded: false,
|
|
44
|
-
expanded: true,
|
|
45
|
-
loading: false
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
// src/components/input/Input.tsx
|
|
51
|
-
var Input = (props) => {
|
|
52
|
-
const defaultedProps = mergeProps({ type: "text" }, props);
|
|
53
|
-
const [localProps, variantProps, otherProps] = splitProps(
|
|
54
|
-
defaultedProps,
|
|
55
|
-
["type", "passwordReveal", "leftIcon", "rightIcon"],
|
|
56
|
-
["class", ...inputVariants.variantKeys]
|
|
57
|
-
);
|
|
58
|
-
const [showPassword, setShowPassword] = createSignal(false);
|
|
59
|
-
const computedType = createMemo(
|
|
60
|
-
() => localProps.passwordReveal && showPassword() ? "text" : defaultedProps.type
|
|
61
|
-
);
|
|
62
|
-
return <div class="relative flex items-center">
|
|
63
|
-
<Show when={localProps.leftIcon}>
|
|
64
|
-
<span class="absolute left-3 top-1/2 -translate-y-1/2">
|
|
65
|
-
{localProps.leftIcon}
|
|
66
|
-
</span>
|
|
67
|
-
</Show>
|
|
68
|
-
|
|
69
|
-
<input
|
|
70
|
-
class={inputVariants(variantProps)}
|
|
71
|
-
type={computedType()}
|
|
72
|
-
aria-invalid={variantProps.color === "danger" ? "true" : void 0}
|
|
73
|
-
{...otherProps}
|
|
74
|
-
/>
|
|
75
|
-
|
|
76
|
-
<Show when={localProps.passwordReveal && localProps.rightIcon}>
|
|
77
|
-
<button
|
|
78
|
-
type="button"
|
|
79
|
-
onClick={() => setShowPassword((prev) => !prev)}
|
|
80
|
-
class="absolute right-3 top-1/2 -translate-y-1/2 outline-none"
|
|
81
|
-
>
|
|
82
|
-
{localProps.rightIcon}
|
|
83
|
-
</button>
|
|
84
|
-
</Show>
|
|
85
|
-
</div>;
|
|
86
|
-
};
|
|
87
|
-
var Input_default = Input;
|
|
88
|
-
|
|
89
|
-
// src/components/input/index.ts
|
|
90
|
-
var input_default = Input_default;
|
|
91
|
-
|
|
92
|
-
export {
|
|
93
|
-
input_default
|
|
94
|
-
};
|
package/dist/chunk/P7WPLZNA.jsx
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// src/lib/style/classes.ts
|
|
2
|
-
function classes(...args) {
|
|
3
|
-
return args.flat().filter(Boolean).join(" ");
|
|
4
|
-
}
|
|
5
|
-
function falsyToString(value) {
|
|
6
|
-
return typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
7
|
-
}
|
|
8
|
-
function cva(base, config) {
|
|
9
|
-
const fn = (props) => {
|
|
10
|
-
if (config?.variants == null) return classes(base, props?.class);
|
|
11
|
-
const { variants, defaultVariants } = config;
|
|
12
|
-
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
|
13
|
-
const variantProp = props?.[variant];
|
|
14
|
-
const defaultVariantProp = defaultVariants?.[variant];
|
|
15
|
-
if (variantProp === null) return null;
|
|
16
|
-
const variantKey = falsyToString(variantProp) || falsyToString(
|
|
17
|
-
defaultVariantProp
|
|
18
|
-
);
|
|
19
|
-
return variants[variant]?.[variantKey];
|
|
20
|
-
});
|
|
21
|
-
const propsWithoutUndefined = Object.entries(props || {}).reduce(
|
|
22
|
-
(acc, [key, value]) => {
|
|
23
|
-
if (value !== void 0) {
|
|
24
|
-
acc[key] = value;
|
|
25
|
-
}
|
|
26
|
-
return acc;
|
|
27
|
-
},
|
|
28
|
-
{}
|
|
29
|
-
);
|
|
30
|
-
const getCompoundVariantClassNames = config?.compoundVariants?.reduce(
|
|
31
|
-
(acc, { class: cvClass, ...compoundVariantOptions }) => {
|
|
32
|
-
const isMatch = Object.entries(compoundVariantOptions).every(
|
|
33
|
-
([key, value]) => {
|
|
34
|
-
const currentValue = {
|
|
35
|
-
...defaultVariants,
|
|
36
|
-
...propsWithoutUndefined
|
|
37
|
-
}[key];
|
|
38
|
-
return Array.isArray(value) ? value.includes(currentValue) : currentValue === value;
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
return isMatch ? [...acc, cvClass] : acc;
|
|
42
|
-
},
|
|
43
|
-
[]
|
|
44
|
-
);
|
|
45
|
-
return classes(
|
|
46
|
-
base,
|
|
47
|
-
getVariantClassNames,
|
|
48
|
-
getCompoundVariantClassNames,
|
|
49
|
-
props?.class
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
fn.variantKeys = config?.variants ? Object.keys(config.variants) : [];
|
|
53
|
-
return fn;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export {
|
|
57
|
-
classes,
|
|
58
|
-
cva
|
|
59
|
-
};
|
package/dist/chunk/UTRNHAP4.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { cva } from './HKS7ET6T.js';
|
|
2
|
-
import { delegateEvents, template, insert, createComponent, spread, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
3
|
-
import { mergeProps, splitProps, createSignal, createMemo, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/input/Input.styles.ts
|
|
6
|
-
var inputVariants = cva(
|
|
7
|
-
[
|
|
8
|
-
"block w-full appearance-none outline-none bg-transparent",
|
|
9
|
-
"border transition-colors duration-200",
|
|
10
|
-
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
11
|
-
],
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
color: {
|
|
15
|
-
danger: "border-red-500 text-red-600",
|
|
16
|
-
success: "border-green-500 text-green-600",
|
|
17
|
-
warning: "border-orange-500 text-orange-600"
|
|
18
|
-
},
|
|
19
|
-
rounded: {
|
|
20
|
-
true: "rounded-full",
|
|
21
|
-
false: "rounded-md"
|
|
22
|
-
},
|
|
23
|
-
expanded: {
|
|
24
|
-
true: "w-full",
|
|
25
|
-
false: "w-fit"
|
|
26
|
-
},
|
|
27
|
-
loading: {
|
|
28
|
-
true: "opacity-50",
|
|
29
|
-
false: ""
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
color: void 0,
|
|
34
|
-
rounded: false,
|
|
35
|
-
expanded: true,
|
|
36
|
-
loading: false
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
// src/components/input/Input.tsx
|
|
42
|
-
var _tmpl$ = /* @__PURE__ */ template(`<span class="absolute left-3 top-1/2 -translate-y-1/2">`);
|
|
43
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<button type=button class="absolute right-3 top-1/2 -translate-y-1/2 outline-none">`);
|
|
44
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<div class="relative flex items-center"><input>`);
|
|
45
|
-
var Input = (props) => {
|
|
46
|
-
const defaultedProps = mergeProps({
|
|
47
|
-
type: "text"
|
|
48
|
-
}, props);
|
|
49
|
-
const [localProps, variantProps, otherProps] = splitProps(defaultedProps, ["type", "passwordReveal", "leftIcon", "rightIcon"], ["class", ...inputVariants.variantKeys]);
|
|
50
|
-
const [showPassword, setShowPassword] = createSignal(false);
|
|
51
|
-
const computedType = createMemo(() => localProps.passwordReveal && showPassword() ? "text" : defaultedProps.type);
|
|
52
|
-
return (() => {
|
|
53
|
-
var _el$ = _tmpl$3(), _el$3 = _el$.firstChild;
|
|
54
|
-
insert(_el$, createComponent(Show, {
|
|
55
|
-
get when() {
|
|
56
|
-
return localProps.leftIcon;
|
|
57
|
-
},
|
|
58
|
-
get children() {
|
|
59
|
-
var _el$2 = _tmpl$();
|
|
60
|
-
insert(_el$2, () => localProps.leftIcon);
|
|
61
|
-
return _el$2;
|
|
62
|
-
}
|
|
63
|
-
}), _el$3);
|
|
64
|
-
spread(_el$3, mergeProps$1({
|
|
65
|
-
get ["class"]() {
|
|
66
|
-
return inputVariants(variantProps);
|
|
67
|
-
},
|
|
68
|
-
get type() {
|
|
69
|
-
return computedType();
|
|
70
|
-
},
|
|
71
|
-
get ["aria-invalid"]() {
|
|
72
|
-
return variantProps.color === "danger" ? "true" : void 0;
|
|
73
|
-
}
|
|
74
|
-
}, otherProps), false, false);
|
|
75
|
-
insert(_el$, createComponent(Show, {
|
|
76
|
-
get when() {
|
|
77
|
-
return localProps.passwordReveal && localProps.rightIcon;
|
|
78
|
-
},
|
|
79
|
-
get children() {
|
|
80
|
-
var _el$4 = _tmpl$2();
|
|
81
|
-
_el$4.$$click = () => setShowPassword((prev) => !prev);
|
|
82
|
-
insert(_el$4, () => localProps.rightIcon);
|
|
83
|
-
return _el$4;
|
|
84
|
-
}
|
|
85
|
-
}), null);
|
|
86
|
-
return _el$;
|
|
87
|
-
})();
|
|
88
|
-
};
|
|
89
|
-
var Input_default = Input;
|
|
90
|
-
delegateEvents(["click"]);
|
|
91
|
-
|
|
92
|
-
// src/components/input/index.ts
|
|
93
|
-
var input_default = Input_default;
|
|
94
|
-
|
|
95
|
-
export { input_default };
|
package/dist/chunk/VMEDFWWG.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { cva } from './HKS7ET6T.js';
|
|
2
|
-
import { template, insert, createComponent, spread, mergeProps as mergeProps$1, effect, className } from 'solid-js/web';
|
|
3
|
-
import { mergeProps, splitProps, createSignal, createEffect, createMemo, Show } from 'solid-js';
|
|
4
|
-
|
|
5
|
-
// src/components/Avatar/Avatar.styles.ts
|
|
6
|
-
var avatarVariants = cva(
|
|
7
|
-
[
|
|
8
|
-
"flex items-center justify-center mx-1",
|
|
9
|
-
"font-medium outline-none select-none transition active:transition-none",
|
|
10
|
-
"not-disabled:cursor-pointer",
|
|
11
|
-
"disabled:cursor-not-allowed disabled:opacity-25",
|
|
12
|
-
"aria-busy:cursor-wait"
|
|
13
|
-
],
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
sm: "size-8 text-sm",
|
|
18
|
-
md: "size-16 text-base",
|
|
19
|
-
lg: "size-24 text-lg"
|
|
20
|
-
},
|
|
21
|
-
shape: {
|
|
22
|
-
circle: "rounded-full overflow-hidden",
|
|
23
|
-
rounded: "rounded-lg overflow-hidden"
|
|
24
|
-
},
|
|
25
|
-
variant: {
|
|
26
|
-
filled: "bg-gray-200 text-gray-800",
|
|
27
|
-
outlined: "border-2 border-gray-300 text-gray-800",
|
|
28
|
-
ghost: "text-gray-800"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
size: "md",
|
|
33
|
-
shape: "circle",
|
|
34
|
-
variant: "filled"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
// src/components/Avatar/utils.ts
|
|
40
|
-
function parseCaption(alt) {
|
|
41
|
-
if (!alt) return "";
|
|
42
|
-
const parts = alt.split(" ");
|
|
43
|
-
if (parts.length >= 2 && parts[0] && parts[1]) {
|
|
44
|
-
return `${parts[0][0] ?? ""}${parts[1][0] ?? ""}`;
|
|
45
|
-
}
|
|
46
|
-
return "";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// src/components/Avatar/Avatar.tsx
|
|
50
|
-
var _tmpl$ = /* @__PURE__ */ template(`<img class="size-full object-cover">`);
|
|
51
|
-
var _tmpl$2 = /* @__PURE__ */ template(`<figure>`);
|
|
52
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<figcaption class=text-lg>`);
|
|
53
|
-
var Avatar = (rawProps) => {
|
|
54
|
-
const props = mergeProps({
|
|
55
|
-
alt: "User Avatar"
|
|
56
|
-
}, rawProps);
|
|
57
|
-
const [variantProps, otherProps] = splitProps(props, ["class", ...avatarVariants.variantKeys]);
|
|
58
|
-
const [source, setSource] = createSignal(props.src || props.dataSrc);
|
|
59
|
-
createEffect(() => {
|
|
60
|
-
if (import.meta.env.PROD && props.dataSrc) {
|
|
61
|
-
setSource(props.dataSrc);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
createMemo(() => source() ? "" : props.class ?? "bg-blue-500");
|
|
65
|
-
createMemo(() => source() ? "" : props.text ?? "text-white");
|
|
66
|
-
const caption = createMemo(() => parseCaption(props.alt));
|
|
67
|
-
return (() => {
|
|
68
|
-
var _el$ = _tmpl$2();
|
|
69
|
-
insert(_el$, createComponent(Show, {
|
|
70
|
-
get when() {
|
|
71
|
-
return source();
|
|
72
|
-
},
|
|
73
|
-
get fallback() {
|
|
74
|
-
return (() => {
|
|
75
|
-
var _el$3 = _tmpl$3();
|
|
76
|
-
insert(_el$3, caption);
|
|
77
|
-
return _el$3;
|
|
78
|
-
})();
|
|
79
|
-
},
|
|
80
|
-
get children() {
|
|
81
|
-
var _el$2 = _tmpl$();
|
|
82
|
-
spread(_el$2, mergeProps$1({
|
|
83
|
-
get src() {
|
|
84
|
-
return source();
|
|
85
|
-
},
|
|
86
|
-
get ["data-src"]() {
|
|
87
|
-
return props.dataSrc;
|
|
88
|
-
}
|
|
89
|
-
}, otherProps), false, false);
|
|
90
|
-
return _el$2;
|
|
91
|
-
}
|
|
92
|
-
}));
|
|
93
|
-
effect(() => className(_el$, avatarVariants(variantProps)));
|
|
94
|
-
return _el$;
|
|
95
|
-
})();
|
|
96
|
-
};
|
|
97
|
-
var Avatar_default = Avatar;
|
|
98
|
-
|
|
99
|
-
// src/components/Avatar/index.ts
|
|
100
|
-
var Avatar_default2 = Avatar_default;
|
|
101
|
-
|
|
102
|
-
export { Avatar_default2 as Avatar_default };
|
package/dist/chunk/WB6NEEQV.jsx
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
classes,
|
|
3
|
-
cva
|
|
4
|
-
} from "./P7WPLZNA.jsx";
|
|
5
|
-
|
|
6
|
-
// src/components/textarea/Textarea.tsx
|
|
7
|
-
import {
|
|
8
|
-
createMemo,
|
|
9
|
-
createSignal,
|
|
10
|
-
splitProps,
|
|
11
|
-
Show
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/textarea/Textarea.styles.ts
|
|
15
|
-
var textareaVariants = cva(
|
|
16
|
-
[
|
|
17
|
-
"block w-full rounded-md border bg-white px-3 py-2 text-sm",
|
|
18
|
-
"text-gray-900 placeholder-gray-400",
|
|
19
|
-
"focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent",
|
|
20
|
-
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
21
|
-
],
|
|
22
|
-
{
|
|
23
|
-
variants: {
|
|
24
|
-
size: {
|
|
25
|
-
sm: "text-sm py-1.5",
|
|
26
|
-
md: "text-base py-2",
|
|
27
|
-
lg: "text-lg py-3"
|
|
28
|
-
},
|
|
29
|
-
color: {
|
|
30
|
-
primary: "border-blue-500",
|
|
31
|
-
info: "border-cyan-500",
|
|
32
|
-
success: "border-green-500",
|
|
33
|
-
warning: "border-yellow-500",
|
|
34
|
-
danger: "border-red-500"
|
|
35
|
-
},
|
|
36
|
-
loading: {
|
|
37
|
-
true: "opacity-50 cursor-wait",
|
|
38
|
-
false: ""
|
|
39
|
-
},
|
|
40
|
-
resize: {
|
|
41
|
-
none: "resize-none",
|
|
42
|
-
both: "resize",
|
|
43
|
-
x: "resize-x",
|
|
44
|
-
y: "resize-y"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: {
|
|
48
|
-
size: "md",
|
|
49
|
-
color: "primary",
|
|
50
|
-
loading: false,
|
|
51
|
-
resize: "y"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
// src/components/textarea/Textarea.tsx
|
|
57
|
-
var Textarea = (props) => {
|
|
58
|
-
const [localProps, variantProps, otherProps] = splitProps(
|
|
59
|
-
props,
|
|
60
|
-
["hasCounter", "value", "onInput", "onFocus", "onBlur", "maxLength"],
|
|
61
|
-
["class", ...textareaVariants.variantKeys]
|
|
62
|
-
);
|
|
63
|
-
const [isFocused, setFocused] = createSignal(false);
|
|
64
|
-
const valueLength = createMemo(
|
|
65
|
-
() => typeof localProps.value === "string" ? localProps.value.length : 0
|
|
66
|
-
);
|
|
67
|
-
const showCounter = createMemo(
|
|
68
|
-
() => localProps.maxLength && localProps.hasCounter
|
|
69
|
-
);
|
|
70
|
-
return <div class="relative w-full">
|
|
71
|
-
<textarea
|
|
72
|
-
class={textareaVariants(variantProps)}
|
|
73
|
-
value={localProps.value}
|
|
74
|
-
maxLength={localProps.maxLength}
|
|
75
|
-
onInput={localProps.onInput}
|
|
76
|
-
onFocus={(e) => {
|
|
77
|
-
setFocused(true);
|
|
78
|
-
typeof localProps.onFocus === "function" && localProps.onFocus(e);
|
|
79
|
-
}}
|
|
80
|
-
onBlur={(e) => {
|
|
81
|
-
setFocused(false);
|
|
82
|
-
typeof localProps.onBlur === "function" && localProps.onBlur(e);
|
|
83
|
-
}}
|
|
84
|
-
aria-invalid={variantProps.color === "danger" ? "true" : void 0}
|
|
85
|
-
{...otherProps}
|
|
86
|
-
/>
|
|
87
|
-
|
|
88
|
-
<Show when={showCounter()}>
|
|
89
|
-
<small
|
|
90
|
-
class={classes(
|
|
91
|
-
"absolute bottom-1 right-2 text-xs text-gray-500 transition-opacity",
|
|
92
|
-
isFocused() ? "opacity-100" : "opacity-0"
|
|
93
|
-
)}
|
|
94
|
-
>
|
|
95
|
-
{valueLength()} / {localProps.maxLength}
|
|
96
|
-
</small>
|
|
97
|
-
</Show>
|
|
98
|
-
</div>;
|
|
99
|
-
};
|
|
100
|
-
var Textarea_default = Textarea;
|
|
101
|
-
|
|
102
|
-
// src/components/textarea/index.ts
|
|
103
|
-
var textarea_default = Textarea_default;
|
|
104
|
-
|
|
105
|
-
export {
|
|
106
|
-
textarea_default
|
|
107
|
-
};
|
package/dist/chunk/YZ3ID3UY.jsx
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PolymorphicButton_default
|
|
3
|
-
} from "./KACNXPUM.jsx";
|
|
4
|
-
import {
|
|
5
|
-
cva
|
|
6
|
-
} from "./P7WPLZNA.jsx";
|
|
7
|
-
|
|
8
|
-
// src/components/button/Button.tsx
|
|
9
|
-
import {
|
|
10
|
-
mergeProps,
|
|
11
|
-
splitProps
|
|
12
|
-
} from "solid-js";
|
|
13
|
-
|
|
14
|
-
// src/components/button/Button.styles.ts
|
|
15
|
-
var buttonVariants = cva(
|
|
16
|
-
[
|
|
17
|
-
"inline-flex items-center font-medium outline-none select-none",
|
|
18
|
-
"not-disabled:cursor-pointer",
|
|
19
|
-
"disabled:cursor-not-allowed disabled:opacity-25",
|
|
20
|
-
"aria-busy:cursor-wait",
|
|
21
|
-
"transition active:transition-none"
|
|
22
|
-
],
|
|
23
|
-
{
|
|
24
|
-
variants: {
|
|
25
|
-
size: {
|
|
26
|
-
sm: "text-sm leading-tight",
|
|
27
|
-
md: "text-base leading-tight",
|
|
28
|
-
lg: "text-lg leading-tight"
|
|
29
|
-
},
|
|
30
|
-
color: {
|
|
31
|
-
inverse: "",
|
|
32
|
-
primary: "",
|
|
33
|
-
secondary: "",
|
|
34
|
-
tertiary: "",
|
|
35
|
-
accent: "",
|
|
36
|
-
positive: "",
|
|
37
|
-
destructive: ""
|
|
38
|
-
},
|
|
39
|
-
align: {
|
|
40
|
-
start: "justify-start",
|
|
41
|
-
center: "justify-center",
|
|
42
|
-
end: "justify-end"
|
|
43
|
-
},
|
|
44
|
-
shape: {
|
|
45
|
-
circle: "rounded-full",
|
|
46
|
-
rounded: "rounded-lg"
|
|
47
|
-
},
|
|
48
|
-
spacing: {
|
|
49
|
-
0: "gap-0 p-0",
|
|
50
|
-
xs: "gap-1.5 px-1.5 py-1.5",
|
|
51
|
-
sm: "gap-1.5 px-2 py-2",
|
|
52
|
-
md: "gap-1.5 px-3 py-2",
|
|
53
|
-
lg: "gap-1.5 px-3.5 py-2.5"
|
|
54
|
-
},
|
|
55
|
-
loading: {
|
|
56
|
-
true: "",
|
|
57
|
-
false: ""
|
|
58
|
-
},
|
|
59
|
-
stretched: {
|
|
60
|
-
true: "w-full",
|
|
61
|
-
false: "w-fit"
|
|
62
|
-
},
|
|
63
|
-
variant: {
|
|
64
|
-
fill: [
|
|
65
|
-
"not-disabled:hover:opacity-75 not-disabled:active:opacity-50",
|
|
66
|
-
"aria-[current]:opacity-75 data-expanded:opacity-75 data-open:opacity-75",
|
|
67
|
-
"focus-visible:opacity-75"
|
|
68
|
-
],
|
|
69
|
-
gray: [
|
|
70
|
-
"bg-bg-primary not-disabled:hover:bg-bg-secondary not-disabled:active:bg-bg-secondary not-disabled:active:opacity-75",
|
|
71
|
-
"aria-[current]:bg-bg-secondary data-expanded:bg-bg-secondary data-open:bg-bg-secondary",
|
|
72
|
-
"focus-visible:bg-bg-secondary"
|
|
73
|
-
],
|
|
74
|
-
ghost: [
|
|
75
|
-
"not-disabled:hover:bg-bg-primary not-disabled:active:bg-bg-primary not-disabled:active:opacity-75",
|
|
76
|
-
"aria-[current]:bg-bg-primary data-expanded:bg-bg-primary data-open:bg-bg-primary",
|
|
77
|
-
"focus-visible:bg-bg-primary"
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
compoundVariants: [
|
|
82
|
-
{
|
|
83
|
-
variant: "fill",
|
|
84
|
-
color: "inverse",
|
|
85
|
-
class: "bg-bg-inverse text-fg-inverse"
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
variant: "fill",
|
|
89
|
-
color: "primary",
|
|
90
|
-
class: "bg-bg-primary text-fg-body"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
variant: "fill",
|
|
94
|
-
color: "secondary",
|
|
95
|
-
class: "bg-bg-secondary text-fg-body"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
variant: "fill",
|
|
99
|
-
color: "tertiary",
|
|
100
|
-
class: "bg-bg-tertiary text-fg-body"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
variant: "fill",
|
|
104
|
-
color: "accent",
|
|
105
|
-
class: "bg-bg-accent text-light"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
variant: "fill",
|
|
109
|
-
color: "positive",
|
|
110
|
-
class: "bg-bg-positive text-light"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
variant: "fill",
|
|
114
|
-
color: "destructive",
|
|
115
|
-
class: "bg-bg-destructive text-light"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
variant: "gray",
|
|
119
|
-
color: "inverse",
|
|
120
|
-
class: "text-fg-inverse"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
variant: "gray",
|
|
124
|
-
color: "primary",
|
|
125
|
-
class: "text-fg-primary"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
variant: "gray",
|
|
129
|
-
color: "secondary",
|
|
130
|
-
class: "text-fg-secondary"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
variant: "gray",
|
|
134
|
-
color: "tertiary",
|
|
135
|
-
class: "text-fg-tertiary"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
variant: "gray",
|
|
139
|
-
color: "accent",
|
|
140
|
-
class: "text-fg-accent"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
variant: "gray",
|
|
144
|
-
color: "positive",
|
|
145
|
-
class: "text-fg-positive"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
variant: "gray",
|
|
149
|
-
color: "destructive",
|
|
150
|
-
class: "text-fg-destructive"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
variant: "ghost",
|
|
154
|
-
color: "inverse",
|
|
155
|
-
class: "text-fg-inverse"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
variant: "ghost",
|
|
159
|
-
color: "primary",
|
|
160
|
-
class: "text-fg-primary"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
variant: "ghost",
|
|
164
|
-
color: "secondary",
|
|
165
|
-
class: "text-fg-secondary"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
variant: "ghost",
|
|
169
|
-
color: "tertiary",
|
|
170
|
-
class: "text-fg-tertiary"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
variant: "ghost",
|
|
174
|
-
color: "accent",
|
|
175
|
-
class: "text-fg-accent"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
variant: "ghost",
|
|
179
|
-
color: "positive",
|
|
180
|
-
class: "text-fg-positive"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
variant: "ghost",
|
|
184
|
-
color: "destructive",
|
|
185
|
-
class: "text-fg-destructive"
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
defaultVariants: {
|
|
189
|
-
size: "md",
|
|
190
|
-
color: "primary",
|
|
191
|
-
align: "center",
|
|
192
|
-
shape: "rounded",
|
|
193
|
-
spacing: "md",
|
|
194
|
-
variant: "fill",
|
|
195
|
-
loading: false,
|
|
196
|
-
stretched: false
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
|
|
201
|
-
// src/components/button/Button.tsx
|
|
202
|
-
var Button = (props) => {
|
|
203
|
-
const defaultedProps = mergeProps(
|
|
204
|
-
{
|
|
205
|
-
color: "primary"
|
|
206
|
-
},
|
|
207
|
-
props
|
|
208
|
-
);
|
|
209
|
-
const [variantProps, otherProps] = splitProps(defaultedProps, [
|
|
210
|
-
"class",
|
|
211
|
-
...buttonVariants.variantKeys
|
|
212
|
-
]);
|
|
213
|
-
return <PolymorphicButton_default
|
|
214
|
-
class={buttonVariants(variantProps)}
|
|
215
|
-
aria-busy={variantProps.loading ? "true" : void 0}
|
|
216
|
-
{...otherProps}
|
|
217
|
-
/>;
|
|
218
|
-
};
|
|
219
|
-
var Button_default = Button;
|
|
220
|
-
|
|
221
|
-
// src/components/button/index.ts
|
|
222
|
-
var button_default = Button_default;
|
|
223
|
-
|
|
224
|
-
export {
|
|
225
|
-
button_default
|
|
226
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type ClassArgs = string | number | boolean | null | undefined | ClassArgs[];
|
|
2
|
-
type ClassProps = {
|
|
3
|
-
class?: ClassArgs;
|
|
4
|
-
};
|
|
5
|
-
type OmitUndefined<T> = T extends undefined ? never : T;
|
|
6
|
-
type StringToBoolean<T> = T extends "true" | "false" ? boolean : T;
|
|
7
|
-
type ConfigSchema = Record<string, Record<string, ClassArgs>>;
|
|
8
|
-
type ConfigVariants<T extends ConfigSchema> = {
|
|
9
|
-
[Variant in keyof T]?: StringToBoolean<keyof T[Variant]> | null | undefined;
|
|
10
|
-
};
|
|
11
|
-
type VariantProps<Component extends (...args: []) => unknown> = Omit<OmitUndefined<Parameters<Component>[0]>, "class">;
|
|
12
|
-
|
|
13
|
-
export type { ConfigVariants as C, VariantProps as V, ClassProps as a };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Avatar_default as default } from '../../chunk/VMEDFWWG.js';
|