huaira-ui 0.1.0-canary.0
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/Accordion/Accordion.d.ts +15 -0
- package/Accordion/Accordion.interface.d.ts +10 -0
- package/Accordion/Accordion.js +39 -0
- package/Accordion/index.d.ts +2 -0
- package/Accordion/index.js +5 -0
- package/Alert/Alert.d.ts +7 -0
- package/Alert/Alert.interface.d.ts +9 -0
- package/Alert/Alert.interface.js +12 -0
- package/Alert/Alert.js +29 -0
- package/Alert/index.d.ts +2 -0
- package/Alert/index.js +5 -0
- package/Avatar/Avatar.d.ts +7 -0
- package/Avatar/Avatar.interface.d.ts +39 -0
- package/Avatar/Avatar.interface.js +38 -0
- package/Avatar/Avatar.js +69 -0
- package/Avatar/AvatarGroup.d.ts +12 -0
- package/Avatar/AvatarGroup.js +23 -0
- package/Avatar/index.d.ts +14 -0
- package/Avatar/index.js +9 -0
- package/Badge/Badge.d.ts +7 -0
- package/Badge/Badge.interface.d.ts +35 -0
- package/Badge/Badge.interface.js +32 -0
- package/Badge/Badge.js +25 -0
- package/Badge/index.d.ts +2 -0
- package/Badge/index.js +5 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +7 -0
- package/Breadcrumbs/Breadcrumbs.interface.d.ts +19 -0
- package/Breadcrumbs/Breadcrumbs.interface.js +13 -0
- package/Breadcrumbs/Breadcrumbs.js +43 -0
- package/Breadcrumbs/index.d.ts +2 -0
- package/Breadcrumbs/index.js +5 -0
- package/Button/Button.d.ts +7 -0
- package/Button/Button.interface.d.ts +68 -0
- package/Button/Button.interface.js +43 -0
- package/Button/Button.js +74 -0
- package/Button/index.d.ts +2 -0
- package/Button/index.js +5 -0
- package/Card/Card.d.ts +24 -0
- package/Card/Card.interface.d.ts +26 -0
- package/Card/Card.interface.js +21 -0
- package/Card/Card.js +40 -0
- package/Card/CardActions.d.ts +10 -0
- package/Card/CardActions.js +24 -0
- package/Card/CardBody.d.ts +10 -0
- package/Card/CardBody.js +24 -0
- package/Card/CardFigure.d.ts +10 -0
- package/Card/CardFigure.js +24 -0
- package/Card/CardTitle.d.ts +10 -0
- package/Card/CardTitle.js +24 -0
- package/Card/index.d.ts +2 -0
- package/Card/index.js +5 -0
- package/Checkbox/Checkbox.d.ts +7 -0
- package/Checkbox/Checkbox.interface.d.ts +41 -0
- package/Checkbox/Checkbox.interface.js +25 -0
- package/Checkbox/Checkbox.js +52 -0
- package/Checkbox/index.d.ts +2 -0
- package/Checkbox/index.js +5 -0
- package/Checkbox/use-RHF-checkbox-integration.d.ts +34 -0
- package/Checkbox/use-RHF-checkbox-integration.js +21 -0
- package/Collapse/Collapse.d.ts +10 -0
- package/Collapse/Collapse.interface.d.ts +31 -0
- package/Collapse/Collapse.interface.js +18 -0
- package/Collapse/Collapse.js +45 -0
- package/Collapse/CollapseContent.d.ts +5 -0
- package/Collapse/CollapseContent.js +21 -0
- package/Collapse/CollapseTitle.d.ts +5 -0
- package/Collapse/CollapseTitle.js +21 -0
- package/Collapse/index.d.ts +2 -0
- package/Collapse/index.js +5 -0
- package/Divider/Divider.d.ts +7 -0
- package/Divider/Divider.interface.d.ts +35 -0
- package/Divider/Divider.interface.js +27 -0
- package/Divider/Divider.js +25 -0
- package/Divider/index.d.ts +2 -0
- package/Divider/index.js +5 -0
- package/Drawer/Drawer.d.ts +20 -0
- package/Drawer/Drawer.interface.d.ts +27 -0
- package/Drawer/Drawer.interface.js +11 -0
- package/Drawer/Drawer.js +45 -0
- package/Drawer/DrawerContent.d.ts +7 -0
- package/Drawer/DrawerContent.js +25 -0
- package/Drawer/DrawerOverlay.d.ts +7 -0
- package/Drawer/DrawerOverlay.js +26 -0
- package/Drawer/DrawerSide.d.ts +7 -0
- package/Drawer/DrawerSide.js +25 -0
- package/Drawer/index.d.ts +2 -0
- package/Drawer/index.js +5 -0
- package/Dropdown/Dropdown.d.ts +7 -0
- package/Dropdown/Dropdown.interface.d.ts +34 -0
- package/Dropdown/Dropdown.interface.js +22 -0
- package/Dropdown/Dropdown.js +88 -0
- package/Dropdown/index.d.ts +2 -0
- package/Dropdown/index.js +5 -0
- package/Fab/Fab.d.ts +7 -0
- package/Fab/Fab.interface.d.ts +29 -0
- package/Fab/Fab.interface.js +7 -0
- package/Fab/Fab.js +54 -0
- package/Fab/index.d.ts +2 -0
- package/Fab/index.js +5 -0
- package/Form/Form.d.ts +4 -0
- package/Form/Form.interface.d.ts +8 -0
- package/Form/Form.js +28 -0
- package/Form/index.d.ts +2 -0
- package/Form/index.js +5 -0
- package/Input/Input.d.ts +7 -0
- package/Input/Input.interface.d.ts +51 -0
- package/Input/Input.interface.js +21 -0
- package/Input/Input.js +69 -0
- package/Input/index.d.ts +2 -0
- package/Input/index.js +5 -0
- package/InputPassword/InputPassword.d.ts +7 -0
- package/InputPassword/InputPassword.interface.d.ts +7 -0
- package/InputPassword/InputPassword.js +67 -0
- package/InputPassword/index.d.ts +9 -0
- package/InputPassword/index.js +5 -0
- package/Label/Label.d.ts +7 -0
- package/Label/Label.interface.d.ts +13 -0
- package/Label/Label.interface.js +11 -0
- package/Label/Label.js +62 -0
- package/Label/index.d.ts +2 -0
- package/Label/index.js +5 -0
- package/List/List.d.ts +12 -0
- package/List/List.interface.d.ts +12 -0
- package/List/List.interface.js +7 -0
- package/List/List.js +27 -0
- package/List/ListRow.d.ts +7 -0
- package/List/ListRow.js +25 -0
- package/List/index.d.ts +2 -0
- package/List/index.js +5 -0
- package/Loading/Loading.d.ts +7 -0
- package/Loading/Loading.interface.d.ts +35 -0
- package/Loading/Loading.interface.js +33 -0
- package/Loading/Loading.js +23 -0
- package/Loading/index.d.ts +2 -0
- package/Loading/index.js +5 -0
- package/Modal/Modal.d.ts +7 -0
- package/Modal/Modal.interface.d.ts +13 -0
- package/Modal/Modal.interface.js +11 -0
- package/Modal/Modal.js +55 -0
- package/Modal/index.d.ts +2 -0
- package/Modal/index.js +5 -0
- package/Modal/useModalEffects.d.ts +9 -0
- package/Modal/useModalEffects.js +27 -0
- package/PinCode/PinCode.d.ts +7 -0
- package/PinCode/PinCode.interface.d.ts +62 -0
- package/PinCode/PinCode.interface.js +21 -0
- package/PinCode/PinCode.js +81 -0
- package/PinCode/index.d.ts +2 -0
- package/PinCode/index.js +5 -0
- package/Progress/Progress.d.ts +7 -0
- package/Progress/Progress.interface.d.ts +19 -0
- package/Progress/Progress.interface.js +16 -0
- package/Progress/Progress.js +26 -0
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +5 -0
- package/README.md +227 -0
- package/RadialProgress/RadialProgress.d.ts +7 -0
- package/RadialProgress/RadialProgress.interface.d.ts +26 -0
- package/RadialProgress/RadialProgress.interface.js +26 -0
- package/RadialProgress/RadialProgress.js +43 -0
- package/RadialProgress/index.d.ts +2 -0
- package/RadialProgress/index.js +5 -0
- package/Radio/Radio.d.ts +7 -0
- package/Radio/Radio.interface.d.ts +49 -0
- package/Radio/Radio.interface.js +25 -0
- package/Radio/Radio.js +70 -0
- package/Radio/index.d.ts +2 -0
- package/Radio/index.js +5 -0
- package/Range/Range.d.ts +7 -0
- package/Range/Range.interface.d.ts +56 -0
- package/Range/Range.interface.js +25 -0
- package/Range/Range.js +187 -0
- package/Range/index.d.ts +2 -0
- package/Range/index.js +5 -0
- package/Range/rangeUtils.d.ts +4 -0
- package/Range/rangeUtils.js +10 -0
- package/Range/useRange.d.ts +25 -0
- package/Range/useRange.js +71 -0
- package/Rating/Rating.d.ts +7 -0
- package/Rating/Rating.interface.d.ts +37 -0
- package/Rating/Rating.interface.js +21 -0
- package/Rating/Rating.js +65 -0
- package/Rating/index.d.ts +2 -0
- package/Rating/index.js +5 -0
- package/Select/Select.d.ts +7 -0
- package/Select/Select.interface.d.ts +53 -0
- package/Select/Select.interface.js +21 -0
- package/Select/Select.js +59 -0
- package/Select/index.d.ts +2 -0
- package/Select/index.js +5 -0
- package/SelectSearch/ClearButton.d.ts +7 -0
- package/SelectSearch/ClearButton.js +32 -0
- package/SelectSearch/DefaultOptionRenderer.d.ts +7 -0
- package/SelectSearch/DefaultOptionRenderer.js +32 -0
- package/SelectSearch/SelectSearch.d.ts +7 -0
- package/SelectSearch/SelectSearch.interface.d.ts +86 -0
- package/SelectSearch/SelectSearch.interface.js +21 -0
- package/SelectSearch/SelectSearch.js +197 -0
- package/SelectSearch/SelectSearchDropdown.d.ts +24 -0
- package/SelectSearch/SelectSearchDropdown.js +68 -0
- package/SelectSearch/hooks/useClickOutside.d.ts +7 -0
- package/SelectSearch/hooks/useDropdownPosition.d.ts +7 -0
- package/SelectSearch/index.d.ts +2 -0
- package/SelectSearch/index.js +5 -0
- package/SelectSearch/useClickOutside.js +19 -0
- package/SelectSearch/useDropdownPosition.js +43 -0
- package/SelectSearch/utils.d.ts +5 -0
- package/SelectSearch/utils.js +7 -0
- package/Skeleton/Skeleton.d.ts +7 -0
- package/Skeleton/Skeleton.interface.d.ts +13 -0
- package/Skeleton/Skeleton.interface.js +7 -0
- package/Skeleton/Skeleton.js +25 -0
- package/Skeleton/index.d.ts +2 -0
- package/Skeleton/index.js +5 -0
- package/Stat/Stat.d.ts +32 -0
- package/Stat/Stat.interface.d.ts +34 -0
- package/Stat/Stat.interface.js +10 -0
- package/Stat/Stat.js +42 -0
- package/Stat/StatActions.d.ts +7 -0
- package/Stat/StatActions.js +25 -0
- package/Stat/StatDesc.d.ts +7 -0
- package/Stat/StatDesc.js +25 -0
- package/Stat/StatFigure.d.ts +7 -0
- package/Stat/StatFigure.js +25 -0
- package/Stat/StatItem.d.ts +7 -0
- package/Stat/StatItem.js +25 -0
- package/Stat/StatTitle.d.ts +7 -0
- package/Stat/StatTitle.js +25 -0
- package/Stat/StatValue.d.ts +7 -0
- package/Stat/StatValue.js +25 -0
- package/Stat/index.d.ts +2 -0
- package/Stat/index.js +5 -0
- package/Swap/Swap.d.ts +7 -0
- package/Swap/Swap.interface.d.ts +16 -0
- package/Swap/Swap.interface.js +7 -0
- package/Swap/Swap.js +62 -0
- package/Swap/index.d.ts +2 -0
- package/Swap/index.js +5 -0
- package/Tab/Tab.d.ts +12 -0
- package/Tab/Tab.interface.d.ts +40 -0
- package/Tab/Tab.interface.js +24 -0
- package/Tab/Tab.js +45 -0
- package/Tab/TabItem.d.ts +7 -0
- package/Tab/TabItem.js +44 -0
- package/Tab/index.d.ts +2 -0
- package/Tab/index.js +5 -0
- package/Table/Table.d.ts +32 -0
- package/Table/Table.interface.d.ts +23 -0
- package/Table/Table.interface.js +16 -0
- package/Table/Table.js +53 -0
- package/Table/TableBody.d.ts +9 -0
- package/Table/TableBody.js +23 -0
- package/Table/TableCell.d.ts +9 -0
- package/Table/TableCell.js +23 -0
- package/Table/TableFooter.d.ts +9 -0
- package/Table/TableFooter.js +23 -0
- package/Table/TableHead.d.ts +9 -0
- package/Table/TableHead.js +23 -0
- package/Table/TableHeader.d.ts +9 -0
- package/Table/TableHeader.js +23 -0
- package/Table/TableRow.d.ts +11 -0
- package/Table/TableRow.js +23 -0
- package/Table/index.d.ts +8 -0
- package/Table/index.js +5 -0
- package/Textarea/Textarea.d.ts +7 -0
- package/Textarea/Textarea.interface.d.ts +49 -0
- package/Textarea/Textarea.interface.js +21 -0
- package/Textarea/Textarea.js +52 -0
- package/Textarea/index.d.ts +2 -0
- package/Textarea/index.js +5 -0
- package/ThemeGenerator/CSSModal.d.ts +8 -0
- package/ThemeGenerator/CSSModal.js +74 -0
- package/ThemeGenerator/ColorPickerModal.d.ts +12 -0
- package/ThemeGenerator/ColorPickerModal.js +191 -0
- package/ThemeGenerator/ThemeEditor.d.ts +13 -0
- package/ThemeGenerator/ThemeEditor.js +382 -0
- package/ThemeGenerator/ThemeGenerator.d.ts +9 -0
- package/ThemeGenerator/ThemeGenerator.interface.d.ts +94 -0
- package/ThemeGenerator/ThemeGenerator.interface.js +462 -0
- package/ThemeGenerator/ThemeGenerator.js +209 -0
- package/ThemeGenerator/ThemeList.d.ts +12 -0
- package/ThemeGenerator/ThemeList.js +158 -0
- package/ThemeGenerator/ThemePreview.d.ts +6 -0
- package/ThemeGenerator/ThemePreview.js +597 -0
- package/ThemeGenerator/index.d.ts +4 -0
- package/ThemeGenerator/index.js +6 -0
- package/ThemeGenerator/themeUtils.d.ts +17 -0
- package/ThemeGenerator/themeUtils.js +176 -0
- package/ThemeGenerator/useThemeGenerator.d.ts +22 -0
- package/ThemeGenerator/useThemeGenerator.js +162 -0
- package/Timeline/Timeline.d.ts +28 -0
- package/Timeline/Timeline.interface.d.ts +34 -0
- package/Timeline/Timeline.interface.js +10 -0
- package/Timeline/Timeline.js +40 -0
- package/Timeline/TimelineConnector.d.ts +7 -0
- package/Timeline/TimelineConnector.js +23 -0
- package/Timeline/TimelineEnd.d.ts +7 -0
- package/Timeline/TimelineEnd.js +25 -0
- package/Timeline/TimelineItem.d.ts +7 -0
- package/Timeline/TimelineItem.js +24 -0
- package/Timeline/TimelineMiddle.d.ts +7 -0
- package/Timeline/TimelineMiddle.js +25 -0
- package/Timeline/TimelineStart.d.ts +7 -0
- package/Timeline/TimelineStart.js +25 -0
- package/Timeline/index.d.ts +2 -0
- package/Timeline/index.js +5 -0
- package/Toast/Toast.d.ts +7 -0
- package/Toast/Toast.interface.d.ts +43 -0
- package/Toast/Toast.interface.js +24 -0
- package/Toast/Toast.js +89 -0
- package/Toast/Toaster.d.ts +7 -0
- package/Toast/Toaster.js +65 -0
- package/Toast/index.d.ts +4 -0
- package/Toast/index.js +7 -0
- package/Toast/toast-store.d.ts +22 -0
- package/Toast/toast-store.js +54 -0
- package/Toggle/Toggle.d.ts +7 -0
- package/Toggle/Toggle.interface.d.ts +39 -0
- package/Toggle/Toggle.interface.js +20 -0
- package/Toggle/Toggle.js +45 -0
- package/Toggle/index.d.ts +2 -0
- package/Toggle/index.js +5 -0
- package/Tooltip/Tooltip.d.ts +7 -0
- package/Tooltip/Tooltip.interface.d.ts +32 -0
- package/Tooltip/Tooltip.interface.js +26 -0
- package/Tooltip/Tooltip.js +36 -0
- package/Tooltip/index.d.ts +2 -0
- package/Tooltip/index.js +5 -0
- package/Tooltip/useTooltipPosition.d.ts +3 -0
- package/Tooltip/useTooltipPosition.js +44 -0
- package/components/Accordion.d.ts +6 -0
- package/components/Alert.d.ts +6 -0
- package/components/Avatar.d.ts +6 -0
- package/components/Badge.d.ts +6 -0
- package/components/Breadcrumbs.d.ts +6 -0
- package/components/Button.d.ts +6 -0
- package/components/Card.d.ts +6 -0
- package/components/Checkbox.d.ts +6 -0
- package/components/Collapse.d.ts +6 -0
- package/components/Divider.d.ts +6 -0
- package/components/Drawer.d.ts +6 -0
- package/components/Dropdown.d.ts +6 -0
- package/components/Fab.d.ts +6 -0
- package/components/Form.d.ts +6 -0
- package/components/Input.d.ts +6 -0
- package/components/InputPassword.d.ts +6 -0
- package/components/Label.d.ts +6 -0
- package/components/List.d.ts +6 -0
- package/components/Loading.d.ts +6 -0
- package/components/Modal.d.ts +6 -0
- package/components/PinCode.d.ts +6 -0
- package/components/Progress.d.ts +6 -0
- package/components/RadialProgress.d.ts +6 -0
- package/components/Radio.d.ts +6 -0
- package/components/Range.d.ts +6 -0
- package/components/Rating.d.ts +6 -0
- package/components/Select.d.ts +6 -0
- package/components/SelectSearch.d.ts +6 -0
- package/components/Skeleton.d.ts +6 -0
- package/components/Stat.d.ts +6 -0
- package/components/Swap.d.ts +6 -0
- package/components/Tab.d.ts +6 -0
- package/components/Table.d.ts +6 -0
- package/components/Textarea.d.ts +6 -0
- package/components/ThemeGenerator.d.ts +6 -0
- package/components/Timeline.d.ts +6 -0
- package/components/Toast.d.ts +6 -0
- package/components/Toggle.d.ts +6 -0
- package/components/Tooltip.d.ts +6 -0
- package/components/hooks.d.ts +2 -0
- package/constants.d.ts +14 -0
- package/defaultThemes.d.ts +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +5 -0
- package/hooks/use-RHF-integration.d.ts +32 -0
- package/hooks/use-RHF-integration.js +43 -0
- package/hooks/useRipple.d.ts +7 -0
- package/hooks/useRipple.js +21 -0
- package/huaira.css +2 -0
- package/index.css +2 -0
- package/index.d.ts +114 -0
- package/index.js +45 -0
- package/libs/vendor/clsx.js +19 -0
- package/libs/vendor/daisyui.js +7 -0
- package/libs/vendor/daisyui2.js +1093 -0
- package/libs/vendor/merge-refs.js +15 -0
- package/libs/vendor/tailwind-merge.js +1717 -0
- package/libs/vendor/uuid.js +11 -0
- package/libs/vendor/uuid2.js +10 -0
- package/libs/vendor/uuid3.js +22 -0
- package/package.json +43 -0
- package/types.d.ts +17 -0
- package/utils.d.ts +15 -0
- package/utils.ts/utils.js +206 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AccordionProps } from './Accordion.interface';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
({ ref, name, icon, allowMultipleExpanded, dataTheme, className, children, ...props }: AccordionProps): ReactElement;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Item: {
|
|
8
|
+
({ ref, children, name, icon, open, dataTheme, className, onOpen, onClose, onToggle, ...props }: import('..').CollapseProps): ReactElement;
|
|
9
|
+
displayName: string;
|
|
10
|
+
} & {
|
|
11
|
+
Title: ({ children, className, ...props }: import('../Collapse/CollapseTitle').CollapseTitleProps) => ReactElement;
|
|
12
|
+
Content: ({ children, className, ...props }: import('../Collapse/CollapseContent').CollapseContentProps) => ReactElement;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactElement, Ref } from 'react';
|
|
2
|
+
import { default as Collapse } from '../Collapse';
|
|
3
|
+
import { IComponentBaseProps } from '../types';
|
|
4
|
+
export type AccordionProps = Omit<HTMLAttributes<HTMLDivElement>, "type"> & IComponentBaseProps & {
|
|
5
|
+
ref?: Ref<HTMLDivElement>;
|
|
6
|
+
name?: string;
|
|
7
|
+
allowMultipleExpanded?: boolean;
|
|
8
|
+
icon?: "arrow" | "plus";
|
|
9
|
+
children: ReactElement<typeof Collapse> | ReactElement<typeof Collapse>[];
|
|
10
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import { cn as e } from "../utils.ts/utils.js";
|
|
5
|
+
import t from "../Collapse/Collapse.js";
|
|
6
|
+
import { c as n } from "react/compiler-runtime";
|
|
7
|
+
import { Children as r, cloneElement as i, isValidElement as a } from "react";
|
|
8
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/Accordion/Accordion.tsx
|
|
10
|
+
var s = (t) => {
|
|
11
|
+
let s = n(26), c, l, u, d, f, p, m, h;
|
|
12
|
+
s[0] === t ? (c = s[1], l = s[2], u = s[3], d = s[4], f = s[5], p = s[6], m = s[7], h = s[8]) : ({ref: p, name: m, icon: d, allowMultipleExpanded: h, dataTheme: u, className: l, children: c, ...f} = t, s[0] = t, s[1] = c, s[2] = l, s[3] = u, s[4] = d, s[5] = f, s[6] = p, s[7] = m, s[8] = h);
|
|
13
|
+
let g = m === void 0 ? "accordion" : m, _ = h === void 0 ? !1 : h, v;
|
|
14
|
+
s[9] === l ? v = s[10] : (v = e("accordion", l), s[9] = l, s[10] = v);
|
|
15
|
+
let y = v, b;
|
|
16
|
+
if (s[11] !== _ || s[12] !== c || s[13] !== d || s[14] !== g) {
|
|
17
|
+
let e;
|
|
18
|
+
s[16] !== _ || s[17] !== d || s[18] !== g ? (e = (e) => a(e) ? i(e, _ ? {
|
|
19
|
+
...e.props,
|
|
20
|
+
icon: d
|
|
21
|
+
} : {
|
|
22
|
+
...e.props,
|
|
23
|
+
icon: d,
|
|
24
|
+
name: g
|
|
25
|
+
}) : e, s[16] = _, s[17] = d, s[18] = g, s[19] = e) : e = s[19], b = r.map(c, e), s[11] = _, s[12] = c, s[13] = d, s[14] = g, s[15] = b;
|
|
26
|
+
} else b = s[15];
|
|
27
|
+
let x = b, S;
|
|
28
|
+
return s[20] !== x || s[21] !== y || s[22] !== u || s[23] !== f || s[24] !== p ? (S = /* @__PURE__ */ o("div", {
|
|
29
|
+
"data-theme": u,
|
|
30
|
+
className: y,
|
|
31
|
+
ref: p,
|
|
32
|
+
...f,
|
|
33
|
+
children: x
|
|
34
|
+
}), s[20] = x, s[21] = y, s[22] = u, s[23] = f, s[24] = p, s[25] = S) : S = s[25], S;
|
|
35
|
+
};
|
|
36
|
+
s.displayName = "Accordion";
|
|
37
|
+
var c = Object.assign(s, { Item: t });
|
|
38
|
+
//#endregion
|
|
39
|
+
export { c as default };
|
package/Alert/Alert.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import { IComponentBaseProps, Status } from '../types';
|
|
3
|
+
export declare const ALERT = "alert";
|
|
4
|
+
export declare const ALERT_MAP: Record<Status, string>;
|
|
5
|
+
export interface AlertProps extends HTMLAttributes<HTMLDivElement>, IComponentBaseProps {
|
|
6
|
+
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
status?: Status;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
//#region src/components/Alert/Alert.interface.ts
|
|
5
|
+
var e = "alert", t = {
|
|
6
|
+
error: "alert-error",
|
|
7
|
+
info: "alert-info",
|
|
8
|
+
success: "alert-success",
|
|
9
|
+
warning: "alert-warning"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as ALERT, t as ALERT_MAP };
|
package/Alert/Alert.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import { addMappedClass as e, cn as t } from "../utils.ts/utils.js";
|
|
5
|
+
import { ALERT as n, ALERT_MAP as r } from "./Alert.interface.js";
|
|
6
|
+
import { c as i } from "react/compiler-runtime";
|
|
7
|
+
import { jsxs as a } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/Alert/Alert.tsx
|
|
9
|
+
var o = (o) => {
|
|
10
|
+
let s = i(26), c, l, u, d, f, p, m;
|
|
11
|
+
s[0] === o ? (c = s[1], l = s[2], u = s[3], d = s[4], f = s[5], p = s[6], m = s[7]) : ({ref: f, children: c, icon: d, status: m, dataTheme: u, className: l, ...p} = o, s[0] = o, s[1] = c, s[2] = l, s[3] = u, s[4] = d, s[5] = f, s[6] = p, s[7] = m);
|
|
12
|
+
let h, g, _, v, y;
|
|
13
|
+
if (s[8] !== l || s[9] !== u || s[10] !== f || s[11] !== p || s[12] !== m) {
|
|
14
|
+
let i = [n];
|
|
15
|
+
e(i, m, r), h = "alert", g = p, _ = f, v = u, y = t(...i, l), s[8] = l, s[9] = u, s[10] = f, s[11] = p, s[12] = m, s[13] = h, s[14] = g, s[15] = _, s[16] = v, s[17] = y;
|
|
16
|
+
} else h = s[13], g = s[14], _ = s[15], v = s[16], y = s[17];
|
|
17
|
+
let b;
|
|
18
|
+
return s[18] !== c || s[19] !== d || s[20] !== h || s[21] !== g || s[22] !== _ || s[23] !== v || s[24] !== y ? (b = /* @__PURE__ */ a("div", {
|
|
19
|
+
role: h,
|
|
20
|
+
...g,
|
|
21
|
+
ref: _,
|
|
22
|
+
"data-theme": v,
|
|
23
|
+
className: y,
|
|
24
|
+
children: [d, c]
|
|
25
|
+
}), s[18] = c, s[19] = d, s[20] = h, s[21] = g, s[22] = _, s[23] = v, s[24] = y, s[25] = b) : b = s[25], b;
|
|
26
|
+
};
|
|
27
|
+
o.displayName = "Alert";
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as default };
|
package/Alert/index.d.ts
ADDED
package/Alert/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { AvatarProps } from './Avatar.interface';
|
|
3
|
+
declare const Avatar: {
|
|
4
|
+
({ ref: propRef, size, src, letters, shape, color, border, borderColor, status, dataTheme, className, innerClassName, children, ...props }: AvatarProps): ReactElement;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Avatar;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import { ComponentColor, IComponentBaseProps, Shape, Size } from '../types';
|
|
3
|
+
export declare const AVATAR = "avatar";
|
|
4
|
+
export declare const BORDER = "ring ring-offset-base-100 ring-offset-2";
|
|
5
|
+
export declare const SIZE_MAP: Record<Size, string>;
|
|
6
|
+
export declare const BORDER_COLOR_MAP: Record<Exclude<ComponentColor, "ghost">, string>;
|
|
7
|
+
export declare const SHAPE_MAP: Record<Shape, string>;
|
|
8
|
+
export declare const PLACEHOLDER_COLOR_MAP: Record<Exclude<ComponentColor, "ghost">, string>;
|
|
9
|
+
export declare const PLACEHOLDER_DEFAULT = "bg-neutral-focus text-neutral-content";
|
|
10
|
+
export declare const AVATAR_MAP: {
|
|
11
|
+
success: string;
|
|
12
|
+
info: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
error: string;
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
accent: string;
|
|
18
|
+
neutral: string;
|
|
19
|
+
circle: string;
|
|
20
|
+
square: string;
|
|
21
|
+
xs: string;
|
|
22
|
+
sm: string;
|
|
23
|
+
md: string;
|
|
24
|
+
lg: string;
|
|
25
|
+
xl: string;
|
|
26
|
+
};
|
|
27
|
+
export interface AvatarProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, IComponentBaseProps {
|
|
28
|
+
ref?: Ref<HTMLDivElement>;
|
|
29
|
+
src?: string;
|
|
30
|
+
letters?: string;
|
|
31
|
+
size?: Size | number;
|
|
32
|
+
shape?: Shape;
|
|
33
|
+
color?: Exclude<ComponentColor, "ghost">;
|
|
34
|
+
border?: boolean;
|
|
35
|
+
borderColor?: Exclude<ComponentColor, "ghost">;
|
|
36
|
+
status?: "online" | "offline";
|
|
37
|
+
innerClassName?: string;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
//#region src/components/Avatar/Avatar.interface.ts
|
|
5
|
+
var e = "avatar", t = "ring ring-offset-base-100 ring-offset-2", n = {
|
|
6
|
+
xs: "w-10 h-10",
|
|
7
|
+
sm: "w-14 h-14",
|
|
8
|
+
md: "w-24 h-24",
|
|
9
|
+
lg: "w-32 h-32",
|
|
10
|
+
xl: "w-40 h-40"
|
|
11
|
+
}, r = {
|
|
12
|
+
primary: "ring-primary",
|
|
13
|
+
secondary: "ring-secondary",
|
|
14
|
+
error: "ring-error",
|
|
15
|
+
info: "ring-info",
|
|
16
|
+
success: "ring-success",
|
|
17
|
+
warning: "ring-warning",
|
|
18
|
+
accent: "ring-accent",
|
|
19
|
+
neutral: "ring-neutral"
|
|
20
|
+
}, i = {
|
|
21
|
+
circle: "rounded-full",
|
|
22
|
+
square: "rounded-btn"
|
|
23
|
+
}, a = {
|
|
24
|
+
primary: "bg-primary text-primary-content",
|
|
25
|
+
secondary: "bg-secondary text-secondary-content",
|
|
26
|
+
accent: "bg-accent text-accent-content",
|
|
27
|
+
neutral: "bg-neutral text-neutral-content",
|
|
28
|
+
error: "bg-error text-error-content",
|
|
29
|
+
info: "bg-info text-info-content",
|
|
30
|
+
success: "bg-success text-success-content",
|
|
31
|
+
warning: "bg-warning text-warning-content"
|
|
32
|
+
}, o = "bg-neutral-focus text-neutral-content", s = {
|
|
33
|
+
...n,
|
|
34
|
+
...i,
|
|
35
|
+
...r
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { e as AVATAR, s as AVATAR_MAP, t as BORDER, a as PLACEHOLDER_COLOR_MAP, o as PLACEHOLDER_DEFAULT };
|
package/Avatar/Avatar.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import { cn as e, isSingleStringChild as t } from "../utils.ts/utils.js";
|
|
5
|
+
import { AVATAR as n, AVATAR_MAP as r, PLACEHOLDER_COLOR_MAP as i, PLACEHOLDER_DEFAULT as a } from "./Avatar.interface.js";
|
|
6
|
+
import { c as o } from "react/compiler-runtime";
|
|
7
|
+
import { Children as s, cloneElement as c } from "react";
|
|
8
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/Avatar/Avatar.tsx
|
|
10
|
+
var u = (u) => {
|
|
11
|
+
let d = o(46), f, p, m, h, g, _, v, y, b, x, S, C, w, T;
|
|
12
|
+
d[0] === u ? (f = d[1], p = d[2], m = d[3], h = d[4], g = d[5], _ = d[6], v = d[7], y = d[8], b = d[9], x = d[10], S = d[11], C = d[12], w = d[13], T = d[14]) : ({ref: b, size: w, src: S, letters: y, shape: T, color: g, border: f, borderColor: p, status: C, dataTheme: _, className: h, innerClassName: v, children: m, ...x} = u, d[0] = u, d[1] = f, d[2] = p, d[3] = m, d[4] = h, d[5] = g, d[6] = _, d[7] = v, d[8] = y, d[9] = b, d[10] = x, d[11] = S, d[12] = C, d[13] = w, d[14] = T);
|
|
13
|
+
let E = w === void 0 ? "sm" : w, D = T === void 0 ? "circle" : T, O = C === "online", k = C === "offline", A = !S, j;
|
|
14
|
+
d[15] !== h || d[16] !== O || d[17] !== k || d[18] !== A ? (j = e(n, h, {
|
|
15
|
+
online: O,
|
|
16
|
+
offline: k,
|
|
17
|
+
"avatar-placeholder": A
|
|
18
|
+
}), d[15] = h, d[16] = O, d[17] = k, d[18] = A, d[19] = j) : j = d[19];
|
|
19
|
+
let M = j, N, P, F, I, L, R;
|
|
20
|
+
if (d[20] !== f || d[21] !== p || d[22] !== m || d[23] !== g || d[24] !== M || d[25] !== _ || d[26] !== v || d[27] !== y || d[28] !== b || d[29] !== x || d[30] !== D || d[31] !== E || d[32] !== S) {
|
|
21
|
+
let n = e(v, typeof E == "string" && r[E], f && "ring ring-offset-base-100 ring-offset-2", p && r[p], D && r[D]), o = e(n, g ? i[g] : a), u = typeof E == "number" ? {
|
|
22
|
+
width: E,
|
|
23
|
+
height: E
|
|
24
|
+
} : {};
|
|
25
|
+
I = "Avatar photo", L = x, R = _, N = M, P = b, F = (() => {
|
|
26
|
+
if (S) return /* @__PURE__ */ l("div", {
|
|
27
|
+
className: n,
|
|
28
|
+
style: u,
|
|
29
|
+
children: /* @__PURE__ */ l("img", {
|
|
30
|
+
"aria-hidden": !0,
|
|
31
|
+
alt: "",
|
|
32
|
+
src: S
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
if (y || t(m)) return /* @__PURE__ */ l("div", {
|
|
36
|
+
className: o,
|
|
37
|
+
style: u,
|
|
38
|
+
children: /* @__PURE__ */ l("span", { children: y ?? m })
|
|
39
|
+
});
|
|
40
|
+
if (s.count(m) === 1) {
|
|
41
|
+
let t = s.only(m);
|
|
42
|
+
return c(t, {
|
|
43
|
+
className: e(n, t.props.className),
|
|
44
|
+
style: {
|
|
45
|
+
...u,
|
|
46
|
+
...t.props.style
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */ l("div", {
|
|
51
|
+
className: n,
|
|
52
|
+
style: u,
|
|
53
|
+
children: m
|
|
54
|
+
});
|
|
55
|
+
})(), d[20] = f, d[21] = p, d[22] = m, d[23] = g, d[24] = M, d[25] = _, d[26] = v, d[27] = y, d[28] = b, d[29] = x, d[30] = D, d[31] = E, d[32] = S, d[33] = N, d[34] = P, d[35] = F, d[36] = I, d[37] = L, d[38] = R;
|
|
56
|
+
} else N = d[33], P = d[34], F = d[35], I = d[36], L = d[37], R = d[38];
|
|
57
|
+
let z;
|
|
58
|
+
return d[39] !== N || d[40] !== P || d[41] !== F || d[42] !== I || d[43] !== L || d[44] !== R ? (z = /* @__PURE__ */ l("div", {
|
|
59
|
+
"aria-label": I,
|
|
60
|
+
...L,
|
|
61
|
+
"data-theme": R,
|
|
62
|
+
className: N,
|
|
63
|
+
ref: P,
|
|
64
|
+
children: F
|
|
65
|
+
}), d[39] = N, d[40] = P, d[41] = F, d[42] = I, d[43] = L, d[44] = R, d[45] = z) : z = d[45], z;
|
|
66
|
+
};
|
|
67
|
+
u.displayName = "Avatar";
|
|
68
|
+
//#endregion
|
|
69
|
+
export { u as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes, JSX, ReactElement, Ref } from 'react';
|
|
2
|
+
import { AvatarProps } from '../Avatar';
|
|
3
|
+
export type AvatarGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
ref?: Ref<HTMLDivElement>;
|
|
5
|
+
children: ReactElement<AvatarProps> | ReactElement<AvatarProps>[];
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const AvatarGroup: {
|
|
9
|
+
({ ref: propRef, children, className, ...props }: AvatarGroupProps): JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default AvatarGroup;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import { cn as e } from "../utils.ts/utils.js";
|
|
5
|
+
import { c as t } from "react/compiler-runtime";
|
|
6
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/Avatar/AvatarGroup.tsx
|
|
8
|
+
var r = (r) => {
|
|
9
|
+
let i = t(12), a, o, s, c;
|
|
10
|
+
i[0] === r ? (a = i[1], o = i[2], s = i[3], c = i[4]) : ({ref: s, children: a, className: o, ...c} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = c);
|
|
11
|
+
let l;
|
|
12
|
+
i[5] === o ? l = i[6] : (l = e("avatar-group -space-x-6", o), i[5] = o, i[6] = l);
|
|
13
|
+
let u = l, d;
|
|
14
|
+
return i[7] !== a || i[8] !== u || i[9] !== s || i[10] !== c ? (d = /* @__PURE__ */ n("div", {
|
|
15
|
+
...c,
|
|
16
|
+
className: u,
|
|
17
|
+
ref: s,
|
|
18
|
+
children: a
|
|
19
|
+
}), i[7] = a, i[8] = u, i[9] = s, i[10] = c, i[11] = d) : d = i[11], d;
|
|
20
|
+
};
|
|
21
|
+
r.displayName = "AvatarGroup";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as AvatarGroup } from './AvatarGroup';
|
|
2
|
+
export type { AvatarProps } from './Avatar.interface';
|
|
3
|
+
export type { AvatarGroupProps } from './AvatarGroup';
|
|
4
|
+
export { AvatarGroup };
|
|
5
|
+
declare const _default: {
|
|
6
|
+
({ ref: propRef, size, src, letters, shape, color, border, borderColor, status, dataTheme, className, innerClassName, children, ...props }: import('./Avatar.interface').AvatarProps): import('react').ReactElement;
|
|
7
|
+
displayName: string;
|
|
8
|
+
} & {
|
|
9
|
+
Group: {
|
|
10
|
+
({ ref: propRef, children, className, ...props }: import('./AvatarGroup').AvatarGroupProps): import("react").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
package/Avatar/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import e from "./Avatar.js";
|
|
5
|
+
import t from "./AvatarGroup.js";
|
|
6
|
+
//#region src/components/Avatar/index.ts
|
|
7
|
+
var n = Object.assign(e, { Group: t });
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as AvatarGroup, n as default };
|
package/Badge/Badge.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { BadgeProps } from './Badge.interface';
|
|
3
|
+
declare const Badge: {
|
|
4
|
+
({ ref: propRef, children, size, color, variant, responsive, dataTheme, className, ...props }: BadgeProps): ReactElement;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Badge;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HTMLAttributes, Ref } from 'react';
|
|
2
|
+
import { ComponentColor, IComponentBaseProps, Size } from '../types';
|
|
3
|
+
export declare const BADGE = "badge";
|
|
4
|
+
export declare const COLOR_MAP: Record<ComponentColor, string>;
|
|
5
|
+
export declare const SIZE_MAP: Record<Size, string>;
|
|
6
|
+
type Variant = "soft" | "dash" | "outline";
|
|
7
|
+
export declare const VARIANT_MAP: Record<Variant, string>;
|
|
8
|
+
export declare const BADGE_MAP: {
|
|
9
|
+
responsive: string;
|
|
10
|
+
soft: string;
|
|
11
|
+
dash: string;
|
|
12
|
+
outline: string;
|
|
13
|
+
xs: string;
|
|
14
|
+
sm: string;
|
|
15
|
+
md: string;
|
|
16
|
+
lg: string;
|
|
17
|
+
xl: string;
|
|
18
|
+
success: string;
|
|
19
|
+
info: string;
|
|
20
|
+
warning: string;
|
|
21
|
+
error: string;
|
|
22
|
+
primary: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
accent: string;
|
|
25
|
+
neutral: string;
|
|
26
|
+
ghost: string;
|
|
27
|
+
};
|
|
28
|
+
export interface BadgeProps extends Omit<HTMLAttributes<HTMLDivElement>, "color">, IComponentBaseProps {
|
|
29
|
+
ref?: Ref<HTMLDivElement>;
|
|
30
|
+
size?: Size;
|
|
31
|
+
color?: ComponentColor;
|
|
32
|
+
variant?: Variant;
|
|
33
|
+
responsive?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
//#region src/components/Badge/Badge.interface.ts
|
|
5
|
+
var e = "badge", t = {
|
|
6
|
+
primary: "badge-primary",
|
|
7
|
+
secondary: "badge-secondary",
|
|
8
|
+
error: "badge-error",
|
|
9
|
+
info: "badge-info",
|
|
10
|
+
success: "badge-success",
|
|
11
|
+
warning: "badge-warning",
|
|
12
|
+
accent: "badge-accent",
|
|
13
|
+
neutral: "badge-neutral",
|
|
14
|
+
ghost: "badge-ghost"
|
|
15
|
+
}, n = {
|
|
16
|
+
xs: "badge-xs",
|
|
17
|
+
sm: "badge-sm",
|
|
18
|
+
md: "badge-md",
|
|
19
|
+
lg: "badge-lg",
|
|
20
|
+
xl: "badge-xl"
|
|
21
|
+
}, r = {
|
|
22
|
+
soft: "badge-soft",
|
|
23
|
+
dash: "badge-dash",
|
|
24
|
+
outline: "badge-outline"
|
|
25
|
+
}, i = {
|
|
26
|
+
...t,
|
|
27
|
+
...n,
|
|
28
|
+
...r,
|
|
29
|
+
responsive: "badge-xs md:badge-sm lg:badge-md xl:badge-lg"
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { e as BADGE, i as BADGE_MAP };
|
package/Badge/Badge.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import { cn as e } from "../utils.ts/utils.js";
|
|
5
|
+
import { BADGE as t, BADGE_MAP as n } from "./Badge.interface.js";
|
|
6
|
+
import { c as r } from "react/compiler-runtime";
|
|
7
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/Badge/Badge.tsx
|
|
9
|
+
var a = (a) => {
|
|
10
|
+
let o = r(22), s, c, l, u, d, f, p, m, h;
|
|
11
|
+
o[0] === a ? (s = o[1], c = o[2], l = o[3], u = o[4], d = o[5], f = o[6], p = o[7], m = o[8], h = o[9]) : ({ref: d, children: s, size: m, color: l, variant: h, responsive: p, dataTheme: u, className: c, ...f} = a, o[0] = a, o[1] = s, o[2] = c, o[3] = l, o[4] = u, o[5] = d, o[6] = f, o[7] = p, o[8] = m, o[9] = h);
|
|
12
|
+
let g = m === void 0 ? "md" : m, _ = g !== "md" && n[g], v = l && n[l], y = h && n[h], b = p && n.responsive, x;
|
|
13
|
+
o[10] !== c || o[11] !== _ || o[12] !== v || o[13] !== y || o[14] !== b ? (x = e(t, _, v, y, b, c), o[10] = c, o[11] = _, o[12] = v, o[13] = y, o[14] = b, o[15] = x) : x = o[15];
|
|
14
|
+
let S = x, C;
|
|
15
|
+
return o[16] !== s || o[17] !== S || o[18] !== u || o[19] !== d || o[20] !== f ? (C = /* @__PURE__ */ i("div", {
|
|
16
|
+
...f,
|
|
17
|
+
"data-theme": u,
|
|
18
|
+
className: S,
|
|
19
|
+
ref: d,
|
|
20
|
+
children: s
|
|
21
|
+
}), o[16] = s, o[17] = S, o[18] = u, o[19] = d, o[20] = f, o[21] = C) : C = o[21], C;
|
|
22
|
+
};
|
|
23
|
+
a.displayName = "Badge";
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a as default };
|
package/Badge/index.d.ts
ADDED
package/Badge/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { BreadcrumbsProps } from './Breadcrumbs.interface';
|
|
3
|
+
declare const Breadcrumbs: {
|
|
4
|
+
({ ref: propRef, children, maxWidth, separator, dataTheme, className, innerProps, innerRef, ...props }: BreadcrumbsProps): ReactElement;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Breadcrumbs;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import { IComponentBaseProps } from '../types';
|
|
3
|
+
export declare const BREADCRUMBS = "breadcrumbs";
|
|
4
|
+
export type BreadcrumbsSeparator = "arrow" | "slash" | "dash" | "bullet" | "pipe";
|
|
5
|
+
export declare const SEPARATOR_MAP: Record<BreadcrumbsSeparator, string>;
|
|
6
|
+
export interface BreadcrumbItem {
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
href?: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface BreadcrumbsProps extends Omit<HTMLAttributes<HTMLDivElement>, "children">, IComponentBaseProps {
|
|
13
|
+
ref?: Ref<HTMLDivElement>;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
maxWidth?: string;
|
|
16
|
+
separator?: BreadcrumbsSeparator;
|
|
17
|
+
innerProps?: HTMLAttributes<HTMLUListElement>;
|
|
18
|
+
innerRef?: Ref<HTMLUListElement>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
//#region src/components/Breadcrumbs/Breadcrumbs.interface.ts
|
|
5
|
+
var e = "breadcrumbs", t = {
|
|
6
|
+
arrow: "",
|
|
7
|
+
slash: "breadcrumbs-slash",
|
|
8
|
+
dash: "breadcrumbs-dash",
|
|
9
|
+
bullet: "breadcrumbs-bullet",
|
|
10
|
+
pipe: "breadcrumbs-pipe"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as BREADCRUMBS, t as SEPARATOR_MAP };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
/* huira-ui 0.1.0-canary.0 - MIT License - Inspired by daisyUI */
|
|
4
|
+
import { cn as e } from "../utils.ts/utils.js";
|
|
5
|
+
import { BREADCRUMBS as t, SEPARATOR_MAP as n } from "./Breadcrumbs.interface.js";
|
|
6
|
+
import { c as r } from "react/compiler-runtime";
|
|
7
|
+
import { Children as i } from "react";
|
|
8
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
10
|
+
var o = (o) => {
|
|
11
|
+
let c = r(29), l, u, d, f, p, m, h, g, _;
|
|
12
|
+
c[0] === o ? (l = c[1], u = c[2], d = c[3], f = c[4], p = c[5], m = c[6], h = c[7], g = c[8], _ = c[9]) : ({ref: h, children: l, maxWidth: m, separator: _, dataTheme: d, className: u, innerProps: f, innerRef: p, ...g} = o, c[0] = o, c[1] = l, c[2] = u, c[3] = d, c[4] = f, c[5] = p, c[6] = m, c[7] = h, c[8] = g, c[9] = _);
|
|
13
|
+
let v = n[_ === void 0 ? "arrow" : _], y;
|
|
14
|
+
c[10] !== u || c[11] !== v ? (y = e(t, v, u), c[10] = u, c[11] = v, c[12] = y) : y = c[12];
|
|
15
|
+
let b = y, x;
|
|
16
|
+
c[13] !== m || c[14] !== g.style ? (x = m ? {
|
|
17
|
+
maxWidth: m,
|
|
18
|
+
...g.style
|
|
19
|
+
} : g.style, c[13] = m, c[14] = g.style, c[15] = x) : x = c[15];
|
|
20
|
+
let S;
|
|
21
|
+
c[16] === l ? S = c[17] : (S = i.map(l, s), c[16] = l, c[17] = S);
|
|
22
|
+
let C;
|
|
23
|
+
c[18] !== f || c[19] !== p || c[20] !== S ? (C = /* @__PURE__ */ a("ul", {
|
|
24
|
+
...f,
|
|
25
|
+
ref: p,
|
|
26
|
+
children: S
|
|
27
|
+
}), c[18] = f, c[19] = p, c[20] = S, c[21] = C) : C = c[21];
|
|
28
|
+
let w;
|
|
29
|
+
return c[22] !== b || c[23] !== d || c[24] !== h || c[25] !== g || c[26] !== x || c[27] !== C ? (w = /* @__PURE__ */ a("div", {
|
|
30
|
+
...g,
|
|
31
|
+
"data-theme": d,
|
|
32
|
+
className: b,
|
|
33
|
+
style: x,
|
|
34
|
+
ref: h,
|
|
35
|
+
children: C
|
|
36
|
+
}), c[22] = b, c[23] = d, c[24] = h, c[25] = g, c[26] = x, c[27] = C, c[28] = w) : w = c[28], w;
|
|
37
|
+
};
|
|
38
|
+
o.displayName = "Breadcrumbs";
|
|
39
|
+
function s(e) {
|
|
40
|
+
return /* @__PURE__ */ a("li", { children: e });
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { o as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ButtonProps } from './Button.interface';
|
|
3
|
+
declare const Button: {
|
|
4
|
+
({ ref: propRef, children, href, shape, size, variant, color, startIcon, endIcon, wide, fullWidth, responsive, noAnimation, loading, loadingVariant, active, disabled, soft, dash, ripple, dataTheme, className, style, ...props }: ButtonProps): ReactElement;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Button;
|