@fragment-build/ui 2.0.2 → 2.2.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/README.md +19 -4
- package/index.js +68 -0
- package/package.json +25 -24
- package/dist/components/base/Accordion.d.ts +0 -2
- package/dist/components/base/Accordion.js +0 -5
- package/dist/components/base/Accordion.js.map +0 -1
- package/dist/components/base/Alert.d.ts +0 -1
- package/dist/components/base/Alert.js +0 -4
- package/dist/components/base/Alert.js.map +0 -1
- package/dist/components/base/Autocomplete.d.ts +0 -3
- package/dist/components/base/Autocomplete.js +0 -6
- package/dist/components/base/Autocomplete.js.map +0 -1
- package/dist/components/base/Avatar.d.ts +0 -2
- package/dist/components/base/Avatar.js +0 -5
- package/dist/components/base/Avatar.js.map +0 -1
- package/dist/components/base/Badge.d.ts +0 -1
- package/dist/components/base/Badge.js +0 -4
- package/dist/components/base/Badge.js.map +0 -1
- package/dist/components/base/Breadcrumbs.d.ts +0 -2
- package/dist/components/base/Breadcrumbs.js +0 -5
- package/dist/components/base/Breadcrumbs.js.map +0 -1
- package/dist/components/base/Button.d.ts +0 -2
- package/dist/components/base/Button.js +0 -5
- package/dist/components/base/Button.js.map +0 -1
- package/dist/components/base/Calendar.d.ts +0 -1
- package/dist/components/base/Calendar.js +0 -4
- package/dist/components/base/Calendar.js.map +0 -1
- package/dist/components/base/Card.d.ts +0 -2
- package/dist/components/base/Card.js +0 -5
- package/dist/components/base/Card.js.map +0 -1
- package/dist/components/base/Checkbox.d.ts +0 -2
- package/dist/components/base/Checkbox.js +0 -5
- package/dist/components/base/Checkbox.js.map +0 -1
- package/dist/components/base/Chip.d.ts +0 -1
- package/dist/components/base/Chip.js +0 -4
- package/dist/components/base/Chip.js.map +0 -1
- package/dist/components/base/CircularProgress.d.ts +0 -1
- package/dist/components/base/CircularProgress.js +0 -4
- package/dist/components/base/CircularProgress.js.map +0 -1
- package/dist/components/base/Code.d.ts +0 -1
- package/dist/components/base/Code.js +0 -4
- package/dist/components/base/Code.js.map +0 -1
- package/dist/components/base/DateInput.d.ts +0 -1
- package/dist/components/base/DateInput.js +0 -4
- package/dist/components/base/DateInput.js.map +0 -1
- package/dist/components/base/DatePicker.d.ts +0 -1
- package/dist/components/base/DatePicker.js +0 -4
- package/dist/components/base/DatePicker.js.map +0 -1
- package/dist/components/base/DateRangePicker.d.ts +0 -1
- package/dist/components/base/DateRangePicker.js +0 -4
- package/dist/components/base/DateRangePicker.js.map +0 -1
- package/dist/components/base/Divider.d.ts +0 -1
- package/dist/components/base/Divider.js +0 -4
- package/dist/components/base/Divider.js.map +0 -1
- package/dist/components/base/Drawer.d.ts +0 -8
- package/dist/components/base/Drawer.js +0 -8
- package/dist/components/base/Drawer.js.map +0 -1
- package/dist/components/base/Dropdown.d.ts +0 -11
- package/dist/components/base/Dropdown.js +0 -8
- package/dist/components/base/Dropdown.js.map +0 -1
- package/dist/components/base/Form.d.ts +0 -0
- package/dist/components/base/Form.js +0 -6
- package/dist/components/base/Form.js.map +0 -1
- package/dist/components/base/Image.d.ts +0 -1
- package/dist/components/base/Image.js +0 -4
- package/dist/components/base/Image.js.map +0 -1
- package/dist/components/base/Input.d.ts +0 -1
- package/dist/components/base/Input.js +0 -4
- package/dist/components/base/Input.js.map +0 -1
- package/dist/components/base/InputOtp.d.ts +0 -1
- package/dist/components/base/InputOtp.js +0 -4
- package/dist/components/base/InputOtp.js.map +0 -1
- package/dist/components/base/Kbd.d.ts +0 -1
- package/dist/components/base/Kbd.js +0 -4
- package/dist/components/base/Kbd.js.map +0 -1
- package/dist/components/base/Link.d.ts +0 -1
- package/dist/components/base/Link.js +0 -4
- package/dist/components/base/Link.js.map +0 -1
- package/dist/components/base/Listbox.d.ts +0 -3
- package/dist/components/base/Listbox.js +0 -6
- package/dist/components/base/Listbox.js.map +0 -1
- package/dist/components/base/Modal.d.ts +0 -8
- package/dist/components/base/Modal.js +0 -8
- package/dist/components/base/Modal.js.map +0 -1
- package/dist/components/base/Navbar.d.ts +0 -7
- package/dist/components/base/Navbar.js +0 -10
- package/dist/components/base/Navbar.js.map +0 -1
- package/dist/components/base/NumberInput.d.ts +0 -1
- package/dist/components/base/NumberInput.js +0 -4
- package/dist/components/base/NumberInput.js.map +0 -1
- package/dist/components/base/Pagination.d.ts +0 -3
- package/dist/components/base/Pagination.js +0 -6
- package/dist/components/base/Pagination.js.map +0 -1
- package/dist/components/base/Popover.d.ts +0 -234
- package/dist/components/base/Popover.js +0 -6
- package/dist/components/base/Popover.js.map +0 -1
- package/dist/components/base/Progress.d.ts +0 -1
- package/dist/components/base/Progress.js +0 -4
- package/dist/components/base/Progress.js.map +0 -1
- package/dist/components/base/Radio.d.ts +0 -2
- package/dist/components/base/Radio.js +0 -5
- package/dist/components/base/Radio.js.map +0 -1
- package/dist/components/base/RangeCalendar.d.ts +0 -1
- package/dist/components/base/RangeCalendar.js +0 -4
- package/dist/components/base/RangeCalendar.js.map +0 -1
- package/dist/components/base/ScrollShadow.d.ts +0 -1
- package/dist/components/base/ScrollShadow.js +0 -4
- package/dist/components/base/ScrollShadow.js.map +0 -1
- package/dist/components/base/Select.d.ts +0 -3
- package/dist/components/base/Select.js +0 -6
- package/dist/components/base/Select.js.map +0 -1
- package/dist/components/base/Skeleton.d.ts +0 -1
- package/dist/components/base/Skeleton.js +0 -4
- package/dist/components/base/Skeleton.js.map +0 -1
- package/dist/components/base/Slider.d.ts +0 -1
- package/dist/components/base/Slider.js +0 -4
- package/dist/components/base/Slider.js.map +0 -1
- package/dist/components/base/Snippet.d.ts +0 -1
- package/dist/components/base/Snippet.js +0 -4
- package/dist/components/base/Snippet.js.map +0 -1
- package/dist/components/base/Spacer.d.ts +0 -1
- package/dist/components/base/Spacer.js +0 -4
- package/dist/components/base/Spacer.js.map +0 -1
- package/dist/components/base/Spinner.d.ts +0 -1
- package/dist/components/base/Spinner.js +0 -4
- package/dist/components/base/Spinner.js.map +0 -1
- package/dist/components/base/Switch.d.ts +0 -1
- package/dist/components/base/Switch.js +0 -4
- package/dist/components/base/Switch.js.map +0 -1
- package/dist/components/base/Table.d.ts +0 -6
- package/dist/components/base/Table.js +0 -9
- package/dist/components/base/Table.js.map +0 -1
- package/dist/components/base/Tabs.d.ts +0 -2
- package/dist/components/base/Tabs.js +0 -5
- package/dist/components/base/Tabs.js.map +0 -1
- package/dist/components/base/Textarea.d.ts +0 -1
- package/dist/components/base/Textarea.js +0 -4
- package/dist/components/base/Textarea.js.map +0 -1
- package/dist/components/base/TimeInput.d.ts +0 -1
- package/dist/components/base/TimeInput.js +0 -4
- package/dist/components/base/TimeInput.js.map +0 -1
- package/dist/components/base/Toast.d.ts +0 -2
- package/dist/components/base/Toast.js +0 -5
- package/dist/components/base/Toast.js.map +0 -1
- package/dist/components/base/Tooltip.d.ts +0 -1
- package/dist/components/base/Tooltip.js +0 -4
- package/dist/components/base/Tooltip.js.map +0 -1
- package/dist/components/base/User.d.ts +0 -1
- package/dist/components/base/User.js +0 -4
- package/dist/components/base/User.js.map +0 -1
- package/dist/components/base/index.d.ts +0 -48
- package/dist/components/base/index.js +0 -49
- package/dist/components/base/index.js.map +0 -1
- package/dist/components/chart/Chart.d.ts +0 -13
- package/dist/components/chart/Chart.js +0 -30
- package/dist/components/chart/Chart.js.map +0 -1
- package/dist/components/chart/Chart.stories.d.ts +0 -12
- package/dist/components/chart/Chart.stories.js +0 -194
- package/dist/components/chart/Chart.stories.js.map +0 -1
- package/dist/components/color-input/ColorInput.d.ts +0 -8
- package/dist/components/color-input/ColorInput.js +0 -23
- package/dist/components/color-input/ColorInput.js.map +0 -1
- package/dist/components/color-input/ColorInput.stories.d.ts +0 -7
- package/dist/components/color-input/ColorInput.stories.js +0 -21
- package/dist/components/color-input/ColorInput.stories.js.map +0 -1
- package/dist/components/color-selector/ColorSelector.d.ts +0 -14
- package/dist/components/color-selector/ColorSelector.js +0 -15
- package/dist/components/color-selector/ColorSelector.js.map +0 -1
- package/dist/components/color-selector/ColorSelector.stories.d.ts +0 -8
- package/dist/components/color-selector/ColorSelector.stories.js +0 -35
- package/dist/components/color-selector/ColorSelector.stories.js.map +0 -1
- package/dist/components/grid/Grid.d.ts +0 -8
- package/dist/components/grid/Grid.js +0 -28
- package/dist/components/grid/Grid.js.map +0 -1
- package/dist/components/grid/Grid.stories.d.ts +0 -8
- package/dist/components/grid/Grid.stories.js +0 -29
- package/dist/components/grid/Grid.stories.js.map +0 -1
- package/dist/components/index.d.ts +0 -7
- package/dist/components/index.js +0 -8
- package/dist/components/index.js.map +0 -1
- package/dist/components/multi-switch/MultiSwitch.d.ts +0 -9
- package/dist/components/multi-switch/MultiSwitch.js +0 -31
- package/dist/components/multi-switch/MultiSwitch.js.map +0 -1
- package/dist/components/multi-switch/MultiSwitch.stories.d.ts +0 -8
- package/dist/components/multi-switch/MultiSwitch.stories.js +0 -28
- package/dist/components/multi-switch/MultiSwitch.stories.js.map +0 -1
- package/dist/components/theme-switch/ThemeSwitch.d.ts +0 -6
- package/dist/components/theme-switch/ThemeSwitch.js +0 -16
- package/dist/components/theme-switch/ThemeSwitch.js.map +0 -1
- package/dist/components/theme-switch/ThemeSwitch.stories.d.ts +0 -6
- package/dist/components/theme-switch/ThemeSwitch.stories.js +0 -13
- package/dist/components/theme-switch/ThemeSwitch.stories.js.map +0 -1
- package/dist/constants.d.ts +0 -12
- package/dist/constants.js +0 -13
- package/dist/constants.js.map +0 -1
- package/dist/context.d.ts +0 -102
- package/dist/context.js +0 -467
- package/dist/context.js.map +0 -1
- package/dist/fragments/form/Form.d.ts +0 -8
- package/dist/fragments/form/Form.js +0 -18
- package/dist/fragments/form/Form.js.map +0 -1
- package/dist/fragments/form/FormSection.d.ts +0 -12
- package/dist/fragments/form/FormSection.js +0 -38
- package/dist/fragments/form/FormSection.js.map +0 -1
- package/dist/fragments/form/FormSection.stories.d.ts +0 -10
- package/dist/fragments/form/FormSection.stories.js +0 -52
- package/dist/fragments/form/FormSection.stories.js.map +0 -1
- package/dist/fragments/index.d.ts +0 -6
- package/dist/fragments/index.js +0 -7
- package/dist/fragments/index.js.map +0 -1
- package/dist/fragments/page/PageHeader.d.ts +0 -10
- package/dist/fragments/page/PageHeader.js +0 -14
- package/dist/fragments/page/PageHeader.js.map +0 -1
- package/dist/fragments/page/PageHeader.stories.d.ts +0 -8
- package/dist/fragments/page/PageHeader.stories.js +0 -33
- package/dist/fragments/page/PageHeader.stories.js.map +0 -1
- package/dist/fragments/shell/Shell.d.ts +0 -10
- package/dist/fragments/shell/Shell.js +0 -6
- package/dist/fragments/shell/Shell.js.map +0 -1
- package/dist/fragments/shell/Shell.stories.d.ts +0 -10
- package/dist/fragments/shell/Shell.stories.js +0 -278
- package/dist/fragments/shell/Shell.stories.js.map +0 -1
- package/dist/fragments/sidebar/Sidebar.d.ts +0 -47
- package/dist/fragments/sidebar/Sidebar.js +0 -84
- package/dist/fragments/sidebar/Sidebar.js.map +0 -1
- package/dist/fragments/sidebar/Sidebar.stories.d.ts +0 -8
- package/dist/fragments/sidebar/Sidebar.stories.js +0 -155
- package/dist/fragments/sidebar/Sidebar.stories.js.map +0 -1
- package/dist/fragments/sidebar/Sidebar.styles.d.ts +0 -118
- package/dist/fragments/sidebar/Sidebar.styles.js +0 -45
- package/dist/fragments/sidebar/Sidebar.styles.js.map +0 -1
- package/dist/fragments/widget/Widget.d.ts +0 -15
- package/dist/fragments/widget/Widget.js +0 -309
- package/dist/fragments/widget/Widget.js.map +0 -1
- package/dist/fragments/widget/Widget.stories.d.ts +0 -8
- package/dist/fragments/widget/Widget.stories.js +0 -46
- package/dist/fragments/widget/Widget.stories.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/provider.d.ts +0 -7
- package/dist/provider.js +0 -17
- package/dist/provider.js.map +0 -1
- package/dist/tailwind.plugin.d.ts +0 -3
- package/dist/tailwind.plugin.js +0 -53
- package/dist/tailwind.plugin.js.map +0 -1
- package/dist/withFragment.d.ts +0 -2
- package/dist/withFragment.js +0 -21
- package/dist/withFragment.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.js","sourceRoot":"","sources":["../../../src/components/base/TimeInput.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/components/base/Toast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Tooltip: import("@heroui/react").InternalForwardRefRenderFunction<"div", import("@heroui/react").TooltipProps, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/base/Tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const User: import("@heroui/react").InternalForwardRefRenderFunction<"div", import("@heroui/react").UserProps, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/components/base/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export { Accordion, AccordionItem } from './Accordion';
|
|
2
|
-
export { Alert } from './Alert';
|
|
3
|
-
export { Autocomplete, AutocompleteItem, AutocompleteSection } from './Autocomplete';
|
|
4
|
-
export { Avatar } from './Avatar';
|
|
5
|
-
export { Badge } from './Badge';
|
|
6
|
-
export { Breadcrumbs, BreadcrumbItem } from './Breadcrumbs';
|
|
7
|
-
export { Button, ButtonGroup } from './Button';
|
|
8
|
-
export { Calendar } from './Calendar';
|
|
9
|
-
export { Card, CardBody, CardFooter, CardHeader } from './Card';
|
|
10
|
-
export { Checkbox, CheckboxGroup } from './Checkbox';
|
|
11
|
-
export { Chip } from './Chip';
|
|
12
|
-
export { CircularProgress } from './CircularProgress';
|
|
13
|
-
export { Code } from './Code';
|
|
14
|
-
export { DateInput } from './DateInput';
|
|
15
|
-
export { DatePicker } from './DatePicker';
|
|
16
|
-
export { DateRangePicker } from './DateRangePicker';
|
|
17
|
-
export { Divider } from './Divider';
|
|
18
|
-
export { Drawer, DrawerBody, DrawerContent, DrawerFooter, DrawerHeader } from './Drawer';
|
|
19
|
-
export { Dropdown, DropdownItem, DropdownMenu, DropdownSection, DropdownTrigger } from './Dropdown';
|
|
20
|
-
export { Image } from './Image';
|
|
21
|
-
export { Input } from './Input';
|
|
22
|
-
export { InputOtp } from './InputOtp';
|
|
23
|
-
export { Kbd } from './Kbd';
|
|
24
|
-
export { Link } from './Link';
|
|
25
|
-
export { Listbox, ListboxItem, ListboxSection } from './Listbox';
|
|
26
|
-
export { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from './Modal';
|
|
27
|
-
export { Navbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenu, NavbarMenuItem, NavbarMenuToggle } from './Navbar';
|
|
28
|
-
export { NumberInput } from './NumberInput';
|
|
29
|
-
export { Pagination, PaginationCursor, PaginationItem } from './Pagination';
|
|
30
|
-
export { Popover, PopoverContent, PopoverTrigger } from './Popover';
|
|
31
|
-
export { Progress } from './Progress';
|
|
32
|
-
export { Radio, RadioGroup } from './Radio';
|
|
33
|
-
export { RangeCalendar } from './RangeCalendar';
|
|
34
|
-
export { ScrollShadow } from './ScrollShadow';
|
|
35
|
-
export { Select, SelectItem, SelectSection } from './Select';
|
|
36
|
-
export { Skeleton } from './Skeleton';
|
|
37
|
-
export { Slider } from './Slider';
|
|
38
|
-
export { Snippet } from './Snippet';
|
|
39
|
-
export { Spacer } from './Spacer';
|
|
40
|
-
export { Spinner } from './Spinner';
|
|
41
|
-
export { Switch } from './Switch';
|
|
42
|
-
export { Tab, Tabs } from './Tabs';
|
|
43
|
-
export { Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from './Table';
|
|
44
|
-
export { Textarea } from './Textarea';
|
|
45
|
-
export { TimeInput } from './TimeInput';
|
|
46
|
-
export { Toast, ToastProvider } from './Toast';
|
|
47
|
-
export { Tooltip } from './Tooltip';
|
|
48
|
-
export { User } from './User';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export { Accordion, AccordionItem } from './Accordion';
|
|
2
|
-
export { Alert } from './Alert';
|
|
3
|
-
export { Autocomplete, AutocompleteItem, AutocompleteSection } from './Autocomplete';
|
|
4
|
-
export { Avatar } from './Avatar';
|
|
5
|
-
export { Badge } from './Badge';
|
|
6
|
-
export { Breadcrumbs, BreadcrumbItem } from './Breadcrumbs';
|
|
7
|
-
export { Button, ButtonGroup } from './Button';
|
|
8
|
-
export { Calendar } from './Calendar';
|
|
9
|
-
export { Card, CardBody, CardFooter, CardHeader } from './Card';
|
|
10
|
-
export { Checkbox, CheckboxGroup } from './Checkbox';
|
|
11
|
-
export { Chip } from './Chip';
|
|
12
|
-
export { CircularProgress } from './CircularProgress';
|
|
13
|
-
export { Code } from './Code';
|
|
14
|
-
export { DateInput } from './DateInput';
|
|
15
|
-
export { DatePicker } from './DatePicker';
|
|
16
|
-
export { DateRangePicker } from './DateRangePicker';
|
|
17
|
-
export { Divider } from './Divider';
|
|
18
|
-
export { Drawer, DrawerBody, DrawerContent, DrawerFooter, DrawerHeader } from './Drawer';
|
|
19
|
-
export { Dropdown, DropdownItem, DropdownMenu, DropdownSection, DropdownTrigger } from './Dropdown';
|
|
20
|
-
export { Image } from './Image';
|
|
21
|
-
export { Input } from './Input';
|
|
22
|
-
export { InputOtp } from './InputOtp';
|
|
23
|
-
export { Kbd } from './Kbd';
|
|
24
|
-
export { Link } from './Link';
|
|
25
|
-
export { Listbox, ListboxItem, ListboxSection } from './Listbox';
|
|
26
|
-
export { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from './Modal';
|
|
27
|
-
export { Navbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenu, NavbarMenuItem, NavbarMenuToggle } from './Navbar';
|
|
28
|
-
export { NumberInput } from './NumberInput';
|
|
29
|
-
export { Pagination, PaginationCursor, PaginationItem } from './Pagination';
|
|
30
|
-
export { Popover, PopoverContent, PopoverTrigger } from './Popover';
|
|
31
|
-
export { Progress } from './Progress';
|
|
32
|
-
export { Radio, RadioGroup } from './Radio';
|
|
33
|
-
export { RangeCalendar } from './RangeCalendar';
|
|
34
|
-
export { ScrollShadow } from './ScrollShadow';
|
|
35
|
-
export { Select, SelectItem, SelectSection } from './Select';
|
|
36
|
-
export { Skeleton } from './Skeleton';
|
|
37
|
-
export { Slider } from './Slider';
|
|
38
|
-
export { Snippet } from './Snippet';
|
|
39
|
-
export { Spacer } from './Spacer';
|
|
40
|
-
export { Spinner } from './Spinner';
|
|
41
|
-
export { Switch } from './Switch';
|
|
42
|
-
export { Tab, Tabs } from './Tabs';
|
|
43
|
-
export { Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from './Table';
|
|
44
|
-
export { Textarea } from './Textarea';
|
|
45
|
-
export { TimeInput } from './TimeInput';
|
|
46
|
-
export { Toast, ToastProvider } from './Toast';
|
|
47
|
-
export { Tooltip } from './Tooltip';
|
|
48
|
-
export { User } from './User';
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB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AU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Primary UI component for Dashboard Charts
|
|
3
|
-
*/
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import type { Props as ApexChartProps } from 'react-apexcharts';
|
|
6
|
-
export interface ChartProps {
|
|
7
|
-
type: 'area' | 'line' | 'column' | 'bar' | 'pie' | 'donut' | 'radial';
|
|
8
|
-
series: ApexAxisChartSeries | ApexNonAxisChartSeries;
|
|
9
|
-
options?: ApexCharts.ApexOptions;
|
|
10
|
-
height?: ApexChartProps['height'];
|
|
11
|
-
width?: ApexChartProps['width'];
|
|
12
|
-
}
|
|
13
|
-
export declare const Chart: React.FC<ChartProps>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Primary UI component for Dashboard Charts
|
|
4
|
-
*/
|
|
5
|
-
import React, { useContext, useEffect, useState } from 'react';
|
|
6
|
-
import defaultsDeep from 'lodash.defaultsdeep';
|
|
7
|
-
import { Spinner } from '../base';
|
|
8
|
-
import { FragmentUIContext } from '../../context';
|
|
9
|
-
export const Chart = (props) => {
|
|
10
|
-
const context = useContext(FragmentUIContext);
|
|
11
|
-
const defaults = context['defaults']['chart']?.[props.type];
|
|
12
|
-
const mergedProps = React.useMemo(() => defaultsDeep({ ...props }, defaults ?? {}), [props, defaults]);
|
|
13
|
-
const [component, setComponent] = useState(_jsx("div", { style: { height: mergedProps.height, width: mergedProps.width }, className: "flex justify-center align-center", children: _jsx(Spinner, {}) }));
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
const importComponent = async () => {
|
|
16
|
-
const module = await import('react-apexcharts');
|
|
17
|
-
const ApexChart = module.default;
|
|
18
|
-
setComponent(_jsx(ApexChart, { ...mergedProps, type: defaults?.options?.chart?.type, height: props.height ?? defaults?.options?.chart?.height, width: props.width ?? defaults?.options?.chart?.width }));
|
|
19
|
-
};
|
|
20
|
-
importComponent();
|
|
21
|
-
}, [
|
|
22
|
-
mergedProps,
|
|
23
|
-
defaults?.options?.chart?.type,
|
|
24
|
-
defaults?.options?.chart?.height,
|
|
25
|
-
defaults?.options?.chart?.width,
|
|
26
|
-
props.height, props.width,
|
|
27
|
-
]);
|
|
28
|
-
return component;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=Chart.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.js","sourceRoot":"","sources":["../../../src/components/chart/Chart.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,YAAY,MAAM,qBAAqB,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AC;QAEF,eAAe,EAAE,CAAC;IACpB,CAAC,EAAE;QACD,WAAW;QACX,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI;QAC9B,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM;QAChC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK;QAC/B,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK;KAC1B,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Chart } from './Chart';
|
|
3
|
-
declare const meta: Meta<typeof Chart>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Area: Story;
|
|
7
|
-
export declare const Line: Story;
|
|
8
|
-
export declare const Column: Story;
|
|
9
|
-
export declare const Bar: Story;
|
|
10
|
-
export declare const Pie: Story;
|
|
11
|
-
export declare const Donut: Story;
|
|
12
|
-
export declare const Radial: Story;
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { Chart } from './Chart';
|
|
2
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'components/Chart',
|
|
5
|
-
component: Chart,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
10
|
-
export const Area = {
|
|
11
|
-
args: {
|
|
12
|
-
type: 'area',
|
|
13
|
-
height: '500px',
|
|
14
|
-
options: {
|
|
15
|
-
xaxis: {
|
|
16
|
-
categories: ['01 February', '02 February', '03 February', '04 February', '05 February', '06 February', '07 February'],
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
series: [
|
|
20
|
-
{
|
|
21
|
-
name: 'New users',
|
|
22
|
-
data: [6500, 6418, 6456, 6526, 6356, 6456],
|
|
23
|
-
color: '#1A56DB',
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export const Line = {
|
|
29
|
-
args: {
|
|
30
|
-
type: 'line',
|
|
31
|
-
height: '500px',
|
|
32
|
-
series: [
|
|
33
|
-
{
|
|
34
|
-
name: 'Clicks',
|
|
35
|
-
data: [6500, 6418, 6456, 6526, 6356, 6456],
|
|
36
|
-
color: '#1A56DB',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'CPC',
|
|
40
|
-
data: [6456, 6356, 6526, 6332, 6418, 6500],
|
|
41
|
-
color: '#7E3AF2',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
export const Column = {
|
|
47
|
-
args: {
|
|
48
|
-
type: 'column',
|
|
49
|
-
height: '500px',
|
|
50
|
-
series: [
|
|
51
|
-
{
|
|
52
|
-
name: 'Organic',
|
|
53
|
-
color: '#1A56DB',
|
|
54
|
-
data: [
|
|
55
|
-
{ x: 'Mon', y: 231 },
|
|
56
|
-
{ x: 'Tue', y: 122 },
|
|
57
|
-
{ x: 'Wed', y: 63 },
|
|
58
|
-
{ x: 'Thu', y: 421 },
|
|
59
|
-
{ x: 'Fri', y: 122 },
|
|
60
|
-
{ x: 'Sat', y: 323 },
|
|
61
|
-
{ x: 'Sun', y: 111 },
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'Social media',
|
|
66
|
-
color: '#FDBA8C',
|
|
67
|
-
data: [
|
|
68
|
-
{ x: 'Mon', y: 232 },
|
|
69
|
-
{ x: 'Tue', y: 113 },
|
|
70
|
-
{ x: 'Wed', y: 341 },
|
|
71
|
-
{ x: 'Thu', y: 224 },
|
|
72
|
-
{ x: 'Fri', y: 522 },
|
|
73
|
-
{ x: 'Sat', y: 411 },
|
|
74
|
-
{ x: 'Sun', y: 243 },
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
export const Bar = {
|
|
81
|
-
args: {
|
|
82
|
-
type: 'bar',
|
|
83
|
-
height: '500px',
|
|
84
|
-
options: {
|
|
85
|
-
tooltip: {
|
|
86
|
-
y: {
|
|
87
|
-
formatter: function (value) {
|
|
88
|
-
return '$' + value;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
series: [
|
|
94
|
-
{
|
|
95
|
-
name: 'Income',
|
|
96
|
-
color: '#31C48D',
|
|
97
|
-
data: [1420, 1620, 1820, 1420, 1650, 2120],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: 'Expense',
|
|
101
|
-
data: [788, 810, 866, 788, 1100, 1200],
|
|
102
|
-
color: '#F05252',
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
export const Pie = {
|
|
108
|
-
args: {
|
|
109
|
-
type: 'pie',
|
|
110
|
-
height: '500px',
|
|
111
|
-
options: {
|
|
112
|
-
labels: ['Direct', 'Organic search', 'Referrals'],
|
|
113
|
-
yaxis: {
|
|
114
|
-
labels: {
|
|
115
|
-
formatter: function (value) {
|
|
116
|
-
return value + '%';
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
xaxis: {
|
|
121
|
-
labels: {
|
|
122
|
-
formatter: function (value) {
|
|
123
|
-
return value + '%';
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
series: [52.8, 26.8, 20.4],
|
|
129
|
-
},
|
|
130
|
-
};
|
|
131
|
-
export const Donut = {
|
|
132
|
-
args: {
|
|
133
|
-
type: 'donut',
|
|
134
|
-
height: '500px',
|
|
135
|
-
options: {
|
|
136
|
-
labels: ['Direct', 'Sponsor', 'Affiliate', 'Email marketing'],
|
|
137
|
-
plotOptions: {
|
|
138
|
-
pie: {
|
|
139
|
-
donut: {
|
|
140
|
-
labels: {
|
|
141
|
-
total: {
|
|
142
|
-
label: 'Unique visitors',
|
|
143
|
-
formatter: function (w) {
|
|
144
|
-
const sum = w.globals.seriesTotals.reduce((a, b) => {
|
|
145
|
-
return a + b;
|
|
146
|
-
}, 0);
|
|
147
|
-
return '$' + sum + 'k';
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
value: {
|
|
151
|
-
formatter: function (value) {
|
|
152
|
-
return value + 'k';
|
|
153
|
-
},
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
yaxis: {
|
|
160
|
-
labels: {
|
|
161
|
-
formatter: function (value) {
|
|
162
|
-
return value + 'k';
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
xaxis: {
|
|
167
|
-
labels: {
|
|
168
|
-
formatter: function (value) {
|
|
169
|
-
return value + 'k';
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
series: [35.1, 23.5, 2.4, 5.4],
|
|
175
|
-
},
|
|
176
|
-
};
|
|
177
|
-
export const Radial = {
|
|
178
|
-
args: {
|
|
179
|
-
type: 'radial',
|
|
180
|
-
height: '500px',
|
|
181
|
-
options: {
|
|
182
|
-
labels: ['Done', 'In progress', 'To do'],
|
|
183
|
-
yaxis: {
|
|
184
|
-
labels: {
|
|
185
|
-
formatter: function (value) {
|
|
186
|
-
return value + '%';
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
series: [90, 85, 70],
|
|
192
|
-
},
|
|
193
|
-
};
|
|
194
|
-
//# sourceMappingURL=Chart.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.stories.js","sourceRoot":"","sources":["../../../src/components/ch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0 @@
|
|
|
1
|
-
import type { InputProps } from '@heroui/react';
|
|
2
|
-
/**
|
|
3
|
-
* Primary UI component for selecting a color
|
|
4
|
-
*/
|
|
5
|
-
export interface ColorInputProps extends InputProps {
|
|
6
|
-
placeholderValue?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const ColorInput: ({ defaultValue, placeholderValue, label, errorMessage, onValueChange, isInvalid, value: controlledValue, placeholder, ...rest }: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
-
import { Avatar, Input } from '../base';
|
|
4
|
-
import { withFragment } from '../../withFragment';
|
|
5
|
-
;
|
|
6
|
-
export const ColorInput = withFragment(({ defaultValue, placeholderValue, label = 'Color', errorMessage = 'Please enter a valid color in hex format e.g. #f3f or #ff33ff', onValueChange, isInvalid, value: controlledValue, placeholder, ...rest }) => {
|
|
7
|
-
const [value, setValue] = useState(controlledValue || defaultValue);
|
|
8
|
-
useEffect(() => onValueChange && onValueChange(value || ''), [value, onValueChange]);
|
|
9
|
-
useEffect(() => setValue(controlledValue), [controlledValue]);
|
|
10
|
-
const validateHexColor = (value) => value.match(/^#(?:[0-9a-fA-F]{3}){1,2}$/i);
|
|
11
|
-
const invalid = useMemo(() => {
|
|
12
|
-
if (!value)
|
|
13
|
-
return false;
|
|
14
|
-
return validateHexColor(value) && !isInvalid ? false : true;
|
|
15
|
-
}, [value, isInvalid]);
|
|
16
|
-
const handleOnChange = (e) => {
|
|
17
|
-
if (rest.onChange)
|
|
18
|
-
rest.onChange(e);
|
|
19
|
-
setValue(e.currentTarget.value);
|
|
20
|
-
};
|
|
21
|
-
return (_jsx(Input, { ...rest, label: label, type: "text", value: value, onValueChange: setValue, isInvalid: invalid, errorMessage: invalid && errorMessage, placeholder: placeholder || placeholderValue, endContent: (_jsx(Avatar, { as: "button", size: "sm", showFallback: true, fallback: (_jsx("input", { type: "color", className: "w-full h-full opacity-0 cursor-pointer", value: placeholderValue && !value ? placeholderValue : value, onChange: handleOnChange })), style: { backgroundColor: value || placeholderValue }, classNames: { base: 'shrink-0 self-center -mb-0.5', fallback: 'w-full h-full' } })) }));
|
|
22
|
-
}, 'colorInput');
|
|
23
|
-
//# sourceMappingURL=ColorInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorInput.js","sourceRoot":"","sources":["../../../src/components/color-input/ColorInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAe,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQjD,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC,CAAC,EACtC,YAAY,EACZ,gBAAgB,EAChB,KAAK,GAAG,OAAO,EACf,YAAY,GAAG,+DAA+D,EAC9E,aAAa,EACb,SAAS,EACT,KAAK,EAAE,eAAe,EACtB,WAAW,EACX,GAAG,IAAI,EACS,EAAE,EAAE;IACpB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAoD,eAAe,IAAI,YAAY,CAAC,CAAC;IAEvH,SAAS,CAAC,GAAG,EAAE,CAAC,aAAa,IAAI,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IAErF,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAE9D,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAEvF,MAAM,OAAO,GAAG,OAAO,CAAC,GA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Obj } from '@storybook/react-vite';
|
|
2
|
-
import { ColorInput } from './ColorInput';
|
|
3
|
-
declare const meta: Meta<typeof ColorInput>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Primary: Story;
|
|
7
|
-
export declare const PlaceholderValue: Story;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ColorInput } from './ColorInput';
|
|
2
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'components/ColorInput',
|
|
5
|
-
component: ColorInput,
|
|
6
|
-
tags: ['autodocs'],
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
10
|
-
export const Primary = {
|
|
11
|
-
args: {
|
|
12
|
-
onValueChange: console.log,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
export const PlaceholderValue = {
|
|
16
|
-
args: {
|
|
17
|
-
onValueChange: console.log,
|
|
18
|
-
placeholderValue: '#7d7d7d',
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=ColorInput.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorInput.stories.js","sourceRoot":"","sources":["../../../src/components/color-input/ColorInput.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,qGAAqG;AACrG,MAAM,IAAI,GAA4B;IACpC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,8FAA8F;AAC9F,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,aAAa,EAAE,OAAO,CAAC,GAAG;KAC3B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,IAAI,EAAE;QACJ,aAAa,EAAE,OAAO,CAAC,GAAG;QAC1B,gBAAgB,EAAE,SAAS;KAC5B;CACF,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type AvatarProps } from '@heroui/react';
|
|
2
|
-
/**
|
|
3
|
-
* Primary UI component for selecting a color
|
|
4
|
-
*/
|
|
5
|
-
export interface ColorSelectorProps {
|
|
6
|
-
values: string[];
|
|
7
|
-
value?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onValueChange: (color: string) => void;
|
|
10
|
-
color?: AvatarProps['color'];
|
|
11
|
-
size?: AvatarProps['size'];
|
|
12
|
-
icon?: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
export declare const ColorSelector: React.FC<ColorSelectorProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { Avatar, Button } from '../base';
|
|
4
|
-
import { withFragment } from '../../withFragment';
|
|
5
|
-
export const ColorSelector = withFragment(({ values, value: controlledValue, defaultValue, onValueChange, icon, ...rest }) => {
|
|
6
|
-
const [value, setValue] = useState(defaultValue && values.includes(defaultValue) ? defaultValue : values[0]);
|
|
7
|
-
useEffect(() => onValueChange(value), [value, onValueChange]);
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
if (!controlledValue)
|
|
10
|
-
return;
|
|
11
|
-
setValue(controlledValue);
|
|
12
|
-
}, [controlledValue]);
|
|
13
|
-
return (_jsx("div", { className: "flex gap-3", children: values.map((color) => (_jsx(Button, { radius: "full", size: rest.size, isIconOnly: true, disableRipple: true, className: "overflow-visible", children: _jsx(Avatar, { showFallback: true, fallback: value === color && icon ? icon : _jsx(_Fragment, {}), style: { backgroundColor: color }, classNames: { base: 'shrink-0' }, isBordered: value === color, onClick: () => setValue(color), ...rest }) }))) }));
|
|
14
|
-
}, 'colorSelector');
|
|
15
|
-
//# sourceMappingURL=ColorSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorSelector.js","sourceRoot":"","sources":["../../../src/components/color-selector/ColorSelector.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAiBlD,MAAM,CAAC,MAAM,aAAa,GAAiC,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzJ,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,IAAI,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7G,SAAS,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IAE9D,SAAS,CAAC,GAAG,EAAE;QACb,IAAG,CAAC,eAAe;YAAE,OAAO;QAC5B,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC5B,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAEtB,OAAO,CACL,cAAK,SAAS,EAAC,YAAY,YACxB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,KAAC,MAAM,IAAC,MAAM,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,QAAC,aAAa,QAAC,SAAS,EAAC,kBAAkB,YAC1F,KAAC,MAAM,IACL,YAAY,QACZ,QAAQ,EAAE,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAK,EAChD,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EACjC,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAChC,UAAU,EAAE,KAAK,KAAK,KAAK,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAC1B,IAAI,GACR,GACK,CACV,CAAC,GACE,CACP,CAAC;AACJ,CAAC,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { ColorSelector } from './ColorSelector';
|
|
3
|
-
declare const meta: Meta<typeof ColorSelector>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Primary: Story;
|
|
7
|
-
export declare const WithIcon: Story;
|
|
8
|
-
export declare const Small: Story;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ColorSelector } from './ColorSelector';
|
|
3
|
-
import { IconCheck } from '@tabler/icons-react';
|
|
4
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'components/ColorSelector',
|
|
7
|
-
component: ColorSelector,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
12
|
-
export const Primary = {
|
|
13
|
-
args: {
|
|
14
|
-
values: ['red', 'green', 'blue'],
|
|
15
|
-
onValueChange: console.log,
|
|
16
|
-
color: 'primary',
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
export const WithIcon = {
|
|
20
|
-
args: {
|
|
21
|
-
values: ['red', 'green', 'blue'],
|
|
22
|
-
onValueChange: console.log,
|
|
23
|
-
color: 'primary',
|
|
24
|
-
icon: _jsx(IconCheck, { size: 24, stroke: 1.5 })
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
export const Small = {
|
|
28
|
-
args: {
|
|
29
|
-
values: ['red', 'green', 'blue'],
|
|
30
|
-
onValueChange: console.log,
|
|
31
|
-
color: 'primary',
|
|
32
|
-
size: 'sm',
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=ColorSelector.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorSelector.stories.js","sourceRoot":"","sources":["../../../src/components/color-selector/ColorSelector.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,qGAAqG;AACrG,MAAM,IAAI,GAA+B;IACvC,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,8FAA8F;AAC9F,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;QAChC,aAAa,EAAE,OAAO,CAAC,GAAG;QAC1B,KAAK,EAAE,SAAS;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;QAChC,aAAa,EAAE,OAAO,CAAC,GAAG;QAC1B,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,GAAI;KAC3C;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC;QAChC,aAAa,EAAE,OAAO,CAAC,GAAG;QAC1B,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,IAAI;KACX;CACF,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { tv } from '@heroui/react';
|
|
3
|
-
const grid = tv({
|
|
4
|
-
slots: {
|
|
5
|
-
base: 'grid gap-6 grid-flow-row-dense',
|
|
6
|
-
},
|
|
7
|
-
variants: {
|
|
8
|
-
size: {
|
|
9
|
-
sm: {
|
|
10
|
-
base: 'grid-cols-1'
|
|
11
|
-
},
|
|
12
|
-
md: {
|
|
13
|
-
base: 'grid-cols-1 lg:grid-cols-2'
|
|
14
|
-
},
|
|
15
|
-
lg: {
|
|
16
|
-
base: 'grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3'
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
size: 'md',
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
export const Grid = ({ children, ...props }) => {
|
|
25
|
-
const { base } = grid(props);
|
|
26
|
-
return _jsx("div", { className: base(), children: children });
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=Grid.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../src/components/grid/Grid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAWnC,MAAM,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,EAAE;QACL,IAAI,EAAE,gCAAgC;KACvC;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE;gBACF,IAAI,EAAE,aAAa;aACpB;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,4BAA4B;aACnC;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,4CAA4C;aACnD;SACF;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,IAAI;KACX;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAClE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAE7B,OAAO,cAAK,SAAS,EAAE,IAAI,EAAE,YAAG,QAAQ,GAAO,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { Grid } from './Grid';
|
|
3
|
-
declare const meta: Meta<typeof Grid>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Small: Story;
|
|
7
|
-
export declare const Medium: Story;
|
|
8
|
-
export declare const Large: Story;
|