@mihcm/ui 0.14.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/README.md +138 -0
- package/dist/AccessLevelGroup.d.ts +37 -0
- package/dist/AccessLevelGroup.d.ts.map +1 -0
- package/dist/AccessLevelGroup.js +39 -0
- package/dist/AccessLevelGroup.js.map +1 -0
- package/dist/AccessLevelGroup.native.d.ts +18 -0
- package/dist/AccessLevelGroup.native.d.ts.map +1 -0
- package/dist/AccessLevelGroup.native.js +40 -0
- package/dist/AccessLevelGroup.native.js.map +1 -0
- package/dist/Accordion.d.ts +52 -0
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/Accordion.js +90 -0
- package/dist/Accordion.js.map +1 -0
- package/dist/Accordion.native.d.ts +36 -0
- package/dist/Accordion.native.d.ts.map +1 -0
- package/dist/Accordion.native.js +86 -0
- package/dist/Accordion.native.js.map +1 -0
- package/dist/Alert.d.ts +33 -0
- package/dist/Alert.d.ts.map +1 -0
- package/dist/Alert.js +45 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Alert.native.d.ts +26 -0
- package/dist/Alert.native.d.ts.map +1 -0
- package/dist/Alert.native.js +41 -0
- package/dist/Alert.native.js.map +1 -0
- package/dist/AlertDialog.d.ts +57 -0
- package/dist/AlertDialog.d.ts.map +1 -0
- package/dist/AlertDialog.js +91 -0
- package/dist/AlertDialog.js.map +1 -0
- package/dist/AlertDialog.native.d.ts +66 -0
- package/dist/AlertDialog.native.d.ts.map +1 -0
- package/dist/AlertDialog.native.js +71 -0
- package/dist/AlertDialog.native.js.map +1 -0
- package/dist/AspectRatio.d.ts +18 -0
- package/dist/AspectRatio.d.ts.map +1 -0
- package/dist/AspectRatio.js +19 -0
- package/dist/AspectRatio.js.map +1 -0
- package/dist/AspectRatio.native.d.ts +7 -0
- package/dist/AspectRatio.native.d.ts.map +1 -0
- package/dist/AspectRatio.native.js +13 -0
- package/dist/AspectRatio.native.js.map +1 -0
- package/dist/Avatar.d.ts +45 -0
- package/dist/Avatar.d.ts.map +1 -0
- package/dist/Avatar.js +69 -0
- package/dist/Avatar.js.map +1 -0
- package/dist/Avatar.native.d.ts +38 -0
- package/dist/Avatar.native.d.ts.map +1 -0
- package/dist/Avatar.native.js +56 -0
- package/dist/Avatar.native.js.map +1 -0
- package/dist/AvatarGroup.d.ts +32 -0
- package/dist/AvatarGroup.d.ts.map +1 -0
- package/dist/AvatarGroup.js +45 -0
- package/dist/AvatarGroup.js.map +1 -0
- package/dist/AvatarGroup.native.d.ts +18 -0
- package/dist/AvatarGroup.native.d.ts.map +1 -0
- package/dist/AvatarGroup.native.js +35 -0
- package/dist/AvatarGroup.native.js.map +1 -0
- package/dist/Badge.d.ts +26 -0
- package/dist/Badge.d.ts.map +1 -0
- package/dist/Badge.js +44 -0
- package/dist/Badge.js.map +1 -0
- package/dist/Badge.native.d.ts +23 -0
- package/dist/Badge.native.d.ts.map +1 -0
- package/dist/Badge.native.js +49 -0
- package/dist/Badge.native.js.map +1 -0
- package/dist/Banner.d.ts +27 -0
- package/dist/Banner.d.ts.map +1 -0
- package/dist/Banner.js +41 -0
- package/dist/Banner.js.map +1 -0
- package/dist/Banner.native.d.ts +24 -0
- package/dist/Banner.native.d.ts.map +1 -0
- package/dist/Banner.native.js +39 -0
- package/dist/Banner.native.js.map +1 -0
- package/dist/BarList.d.ts +27 -0
- package/dist/BarList.d.ts.map +1 -0
- package/dist/BarList.js +25 -0
- package/dist/BarList.js.map +1 -0
- package/dist/Breadcrumb.d.ts +67 -0
- package/dist/Breadcrumb.d.ts.map +1 -0
- package/dist/Breadcrumb.js +63 -0
- package/dist/Breadcrumb.js.map +1 -0
- package/dist/Breadcrumb.native.d.ts +64 -0
- package/dist/Breadcrumb.native.d.ts.map +1 -0
- package/dist/Breadcrumb.native.js +50 -0
- package/dist/Breadcrumb.native.js.map +1 -0
- package/dist/Button.d.ts +42 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.js +68 -0
- package/dist/Button.js.map +1 -0
- package/dist/Button.native.d.ts +38 -0
- package/dist/Button.native.d.ts.map +1 -0
- package/dist/Button.native.js +51 -0
- package/dist/Button.native.js.map +1 -0
- package/dist/Calendar.d.ts +16 -0
- package/dist/Calendar.d.ts.map +1 -0
- package/dist/Calendar.js +94 -0
- package/dist/Calendar.js.map +1 -0
- package/dist/Calendar.native.d.ts +21 -0
- package/dist/Calendar.native.d.ts.map +1 -0
- package/dist/Calendar.native.js +15 -0
- package/dist/Calendar.native.js.map +1 -0
- package/dist/Card.d.ts +29 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/Card.js +44 -0
- package/dist/Card.js.map +1 -0
- package/dist/Card.native.d.ts +20 -0
- package/dist/Card.native.d.ts.map +1 -0
- package/dist/Card.native.js +32 -0
- package/dist/Card.native.js.map +1 -0
- package/dist/Carousel.d.ts +46 -0
- package/dist/Carousel.d.ts.map +1 -0
- package/dist/Carousel.js +115 -0
- package/dist/Carousel.js.map +1 -0
- package/dist/Carousel.native.d.ts +59 -0
- package/dist/Carousel.native.d.ts.map +1 -0
- package/dist/Carousel.native.js +93 -0
- package/dist/Carousel.native.js.map +1 -0
- package/dist/CategoryBar.d.ts +22 -0
- package/dist/CategoryBar.d.ts.map +1 -0
- package/dist/CategoryBar.js +27 -0
- package/dist/CategoryBar.js.map +1 -0
- package/dist/Chart.d.ts +77 -0
- package/dist/Chart.d.ts.map +1 -0
- package/dist/Chart.js +197 -0
- package/dist/Chart.js.map +1 -0
- package/dist/Checkbox.d.ts +28 -0
- package/dist/Checkbox.d.ts.map +1 -0
- package/dist/Checkbox.js +44 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/Checkbox.native.d.ts +13 -0
- package/dist/Checkbox.native.d.ts.map +1 -0
- package/dist/Checkbox.native.js +34 -0
- package/dist/Checkbox.native.js.map +1 -0
- package/dist/CheckboxGrid.d.ts +49 -0
- package/dist/CheckboxGrid.d.ts.map +1 -0
- package/dist/CheckboxGrid.js +79 -0
- package/dist/CheckboxGrid.js.map +1 -0
- package/dist/CheckboxGrid.native.d.ts +14 -0
- package/dist/CheckboxGrid.native.d.ts.map +1 -0
- package/dist/CheckboxGrid.native.js +47 -0
- package/dist/CheckboxGrid.native.js.map +1 -0
- package/dist/Collapsible.d.ts +51 -0
- package/dist/Collapsible.d.ts.map +1 -0
- package/dist/Collapsible.js +101 -0
- package/dist/Collapsible.js.map +1 -0
- package/dist/Collapsible.native.d.ts +53 -0
- package/dist/Collapsible.native.d.ts.map +1 -0
- package/dist/Collapsible.native.js +109 -0
- package/dist/Collapsible.native.js.map +1 -0
- package/dist/Combobox.d.ts +42 -0
- package/dist/Combobox.d.ts.map +1 -0
- package/dist/Combobox.js +96 -0
- package/dist/Combobox.js.map +1 -0
- package/dist/Combobox.native.d.ts +21 -0
- package/dist/Combobox.native.d.ts.map +1 -0
- package/dist/Combobox.native.js +28 -0
- package/dist/Combobox.native.js.map +1 -0
- package/dist/Command.d.ts +107 -0
- package/dist/Command.d.ts.map +1 -0
- package/dist/Command.js +68 -0
- package/dist/Command.js.map +1 -0
- package/dist/Command.native.d.ts +41 -0
- package/dist/Command.native.d.ts.map +1 -0
- package/dist/Command.native.js +31 -0
- package/dist/Command.native.js.map +1 -0
- package/dist/ContextMenu.d.ts +48 -0
- package/dist/ContextMenu.d.ts.map +1 -0
- package/dist/ContextMenu.js +79 -0
- package/dist/ContextMenu.js.map +1 -0
- package/dist/ContextMenu.native.d.ts +81 -0
- package/dist/ContextMenu.native.d.ts.map +1 -0
- package/dist/ContextMenu.native.js +82 -0
- package/dist/ContextMenu.native.js.map +1 -0
- package/dist/DataTable.d.ts +98 -0
- package/dist/DataTable.d.ts.map +1 -0
- package/dist/DataTable.js +291 -0
- package/dist/DataTable.js.map +1 -0
- package/dist/DataTable.native.d.ts +31 -0
- package/dist/DataTable.native.d.ts.map +1 -0
- package/dist/DataTable.native.js +22 -0
- package/dist/DataTable.native.js.map +1 -0
- package/dist/DatePicker.d.ts +63 -0
- package/dist/DatePicker.d.ts.map +1 -0
- package/dist/DatePicker.js +106 -0
- package/dist/DatePicker.js.map +1 -0
- package/dist/DatePicker.native.d.ts +21 -0
- package/dist/DatePicker.native.d.ts.map +1 -0
- package/dist/DatePicker.native.js +15 -0
- package/dist/DatePicker.native.js.map +1 -0
- package/dist/Dialog.d.ts +52 -0
- package/dist/Dialog.d.ts.map +1 -0
- package/dist/Dialog.js +93 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Dialog.native.d.ts +57 -0
- package/dist/Dialog.native.d.ts.map +1 -0
- package/dist/Dialog.native.js +62 -0
- package/dist/Dialog.native.js.map +1 -0
- package/dist/Drawer.d.ts +36 -0
- package/dist/Drawer.d.ts.map +1 -0
- package/dist/Drawer.js +57 -0
- package/dist/Drawer.js.map +1 -0
- package/dist/Drawer.native.d.ts +50 -0
- package/dist/Drawer.native.d.ts.map +1 -0
- package/dist/Drawer.native.js +43 -0
- package/dist/Drawer.native.js.map +1 -0
- package/dist/DropdownMenu.d.ts +57 -0
- package/dist/DropdownMenu.d.ts.map +1 -0
- package/dist/DropdownMenu.js +192 -0
- package/dist/DropdownMenu.js.map +1 -0
- package/dist/DropdownMenu.native.d.ts +53 -0
- package/dist/DropdownMenu.native.d.ts.map +1 -0
- package/dist/DropdownMenu.native.js +71 -0
- package/dist/DropdownMenu.native.js.map +1 -0
- package/dist/Dropzone.d.ts +27 -0
- package/dist/Dropzone.d.ts.map +1 -0
- package/dist/Dropzone.js +33 -0
- package/dist/Dropzone.js.map +1 -0
- package/dist/EmptyState.d.ts +21 -0
- package/dist/EmptyState.d.ts.map +1 -0
- package/dist/EmptyState.js +16 -0
- package/dist/EmptyState.js.map +1 -0
- package/dist/EmptyState.native.d.ts +19 -0
- package/dist/EmptyState.native.d.ts.map +1 -0
- package/dist/EmptyState.native.js +16 -0
- package/dist/EmptyState.native.js.map +1 -0
- package/dist/Form.d.ts +310 -0
- package/dist/Form.d.ts.map +1 -0
- package/dist/Form.js +260 -0
- package/dist/Form.js.map +1 -0
- package/dist/Form.native.d.ts +36 -0
- package/dist/Form.native.d.ts.map +1 -0
- package/dist/Form.native.js +33 -0
- package/dist/Form.native.js.map +1 -0
- package/dist/HoverCard.d.ts +47 -0
- package/dist/HoverCard.d.ts.map +1 -0
- package/dist/HoverCard.js +86 -0
- package/dist/HoverCard.js.map +1 -0
- package/dist/HoverCard.native.d.ts +48 -0
- package/dist/HoverCard.native.d.ts.map +1 -0
- package/dist/HoverCard.native.js +19 -0
- package/dist/HoverCard.native.js.map +1 -0
- package/dist/IconSidebar.d.ts +50 -0
- package/dist/IconSidebar.d.ts.map +1 -0
- package/dist/IconSidebar.js +121 -0
- package/dist/IconSidebar.js.map +1 -0
- package/dist/IconSidebar.native.d.ts +40 -0
- package/dist/IconSidebar.native.d.ts.map +1 -0
- package/dist/IconSidebar.native.js +24 -0
- package/dist/IconSidebar.native.js.map +1 -0
- package/dist/Input.d.ts +52 -0
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.js +57 -0
- package/dist/Input.js.map +1 -0
- package/dist/Input.native.d.ts +37 -0
- package/dist/Input.native.d.ts.map +1 -0
- package/dist/Input.native.js +39 -0
- package/dist/Input.native.js.map +1 -0
- package/dist/InputOTP.d.ts +30 -0
- package/dist/InputOTP.d.ts.map +1 -0
- package/dist/InputOTP.js +47 -0
- package/dist/InputOTP.js.map +1 -0
- package/dist/InputOTP.native.d.ts +32 -0
- package/dist/InputOTP.native.d.ts.map +1 -0
- package/dist/InputOTP.native.js +48 -0
- package/dist/InputOTP.native.js.map +1 -0
- package/dist/Label.d.ts +26 -0
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.js +35 -0
- package/dist/Label.js.map +1 -0
- package/dist/Label.native.d.ts +26 -0
- package/dist/Label.native.d.ts.map +1 -0
- package/dist/Label.native.js +30 -0
- package/dist/Label.native.js.map +1 -0
- package/dist/Link.d.ts +21 -0
- package/dist/Link.d.ts.map +1 -0
- package/dist/Link.js +46 -0
- package/dist/Link.js.map +1 -0
- package/dist/Link.native.d.ts +23 -0
- package/dist/Link.native.d.ts.map +1 -0
- package/dist/Link.native.js +59 -0
- package/dist/Link.native.js.map +1 -0
- package/dist/Logo.d.ts +25 -0
- package/dist/Logo.d.ts.map +1 -0
- package/dist/Logo.js +58 -0
- package/dist/Logo.js.map +1 -0
- package/dist/Logo.native.d.ts +22 -0
- package/dist/Logo.native.d.ts.map +1 -0
- package/dist/Logo.native.js +46 -0
- package/dist/Logo.native.js.map +1 -0
- package/dist/MainSidebar.d.ts +2 -0
- package/dist/MainSidebar.d.ts.map +1 -0
- package/dist/MainSidebar.js +3 -0
- package/dist/MainSidebar.js.map +1 -0
- package/dist/MainSidebar.native.d.ts +2 -0
- package/dist/MainSidebar.native.d.ts.map +1 -0
- package/dist/MainSidebar.native.js +2 -0
- package/dist/MainSidebar.native.js.map +1 -0
- package/dist/Menubar.d.ts +70 -0
- package/dist/Menubar.d.ts.map +1 -0
- package/dist/Menubar.js +142 -0
- package/dist/Menubar.js.map +1 -0
- package/dist/NavigationMenu.d.ts +12 -0
- package/dist/NavigationMenu.d.ts.map +1 -0
- package/dist/NavigationMenu.js +63 -0
- package/dist/NavigationMenu.js.map +1 -0
- package/dist/NavigationMenu.native.d.ts +44 -0
- package/dist/NavigationMenu.native.d.ts.map +1 -0
- package/dist/NavigationMenu.native.js +43 -0
- package/dist/NavigationMenu.native.js.map +1 -0
- package/dist/NotificationBadge.d.ts +33 -0
- package/dist/NotificationBadge.d.ts.map +1 -0
- package/dist/NotificationBadge.js +49 -0
- package/dist/NotificationBadge.js.map +1 -0
- package/dist/NotificationBadge.native.d.ts +25 -0
- package/dist/NotificationBadge.native.d.ts.map +1 -0
- package/dist/NotificationBadge.native.js +41 -0
- package/dist/NotificationBadge.native.js.map +1 -0
- package/dist/PageShell.d.ts +24 -0
- package/dist/PageShell.d.ts.map +1 -0
- package/dist/PageShell.js +24 -0
- package/dist/PageShell.js.map +1 -0
- package/dist/PageShell.native.d.ts +21 -0
- package/dist/PageShell.native.d.ts.map +1 -0
- package/dist/PageShell.native.js +19 -0
- package/dist/PageShell.native.js.map +1 -0
- package/dist/Pagination.d.ts +53 -0
- package/dist/Pagination.d.ts.map +1 -0
- package/dist/Pagination.js +79 -0
- package/dist/Pagination.js.map +1 -0
- package/dist/Pagination.native.d.ts +48 -0
- package/dist/Pagination.native.d.ts.map +1 -0
- package/dist/Pagination.native.js +55 -0
- package/dist/Pagination.native.js.map +1 -0
- package/dist/Popover.d.ts +57 -0
- package/dist/Popover.d.ts.map +1 -0
- package/dist/Popover.js +71 -0
- package/dist/Popover.js.map +1 -0
- package/dist/Popover.native.d.ts +48 -0
- package/dist/Popover.native.d.ts.map +1 -0
- package/dist/Popover.native.js +65 -0
- package/dist/Popover.native.js.map +1 -0
- package/dist/Popper.d.ts +54 -0
- package/dist/Popper.d.ts.map +1 -0
- package/dist/Popper.js +219 -0
- package/dist/Popper.js.map +1 -0
- package/dist/Progress.d.ts +79 -0
- package/dist/Progress.d.ts.map +1 -0
- package/dist/Progress.js +110 -0
- package/dist/Progress.js.map +1 -0
- package/dist/Progress.native.d.ts +42 -0
- package/dist/Progress.native.d.ts.map +1 -0
- package/dist/Progress.native.js +91 -0
- package/dist/Progress.native.js.map +1 -0
- package/dist/ProgressCircle.d.ts +69 -0
- package/dist/ProgressCircle.d.ts.map +1 -0
- package/dist/ProgressCircle.js +78 -0
- package/dist/ProgressCircle.js.map +1 -0
- package/dist/RadioCardGroup.d.ts +26 -0
- package/dist/RadioCardGroup.d.ts.map +1 -0
- package/dist/RadioCardGroup.js +26 -0
- package/dist/RadioCardGroup.js.map +1 -0
- package/dist/RadioGroup.d.ts +35 -0
- package/dist/RadioGroup.d.ts.map +1 -0
- package/dist/RadioGroup.js +68 -0
- package/dist/RadioGroup.js.map +1 -0
- package/dist/RadioGroup.native.d.ts +33 -0
- package/dist/RadioGroup.native.d.ts.map +1 -0
- package/dist/RadioGroup.native.js +55 -0
- package/dist/RadioGroup.native.js.map +1 -0
- package/dist/Resizable.d.ts +32 -0
- package/dist/Resizable.d.ts.map +1 -0
- package/dist/Resizable.js +31 -0
- package/dist/Resizable.js.map +1 -0
- package/dist/Resizable.native.d.ts +32 -0
- package/dist/Resizable.native.d.ts.map +1 -0
- package/dist/Resizable.native.js +23 -0
- package/dist/Resizable.native.js.map +1 -0
- package/dist/RichTextEditor.d.ts +38 -0
- package/dist/RichTextEditor.d.ts.map +1 -0
- package/dist/RichTextEditor.js +218 -0
- package/dist/RichTextEditor.js.map +1 -0
- package/dist/ScrollArea.d.ts +4 -0
- package/dist/ScrollArea.d.ts.map +1 -0
- package/dist/ScrollArea.js +26 -0
- package/dist/ScrollArea.js.map +1 -0
- package/dist/ScrollArea.native.d.ts +19 -0
- package/dist/ScrollArea.native.d.ts.map +1 -0
- package/dist/ScrollArea.native.js +19 -0
- package/dist/ScrollArea.native.js.map +1 -0
- package/dist/SearchField.d.ts +43 -0
- package/dist/SearchField.d.ts.map +1 -0
- package/dist/SearchField.js +34 -0
- package/dist/SearchField.js.map +1 -0
- package/dist/SearchField.native.d.ts +31 -0
- package/dist/SearchField.native.d.ts.map +1 -0
- package/dist/SearchField.native.js +30 -0
- package/dist/SearchField.native.js.map +1 -0
- package/dist/SectionHeader.d.ts +58 -0
- package/dist/SectionHeader.d.ts.map +1 -0
- package/dist/SectionHeader.js +95 -0
- package/dist/SectionHeader.js.map +1 -0
- package/dist/SectionHeader.native.d.ts +45 -0
- package/dist/SectionHeader.native.d.ts.map +1 -0
- package/dist/SectionHeader.native.js +92 -0
- package/dist/SectionHeader.native.js.map +1 -0
- package/dist/Select.d.ts +78 -0
- package/dist/Select.d.ts.map +1 -0
- package/dist/Select.js +310 -0
- package/dist/Select.js.map +1 -0
- package/dist/Select.native.d.ts +53 -0
- package/dist/Select.native.d.ts.map +1 -0
- package/dist/Select.native.js +86 -0
- package/dist/Select.native.js.map +1 -0
- package/dist/Separator.d.ts +20 -0
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Separator.js +20 -0
- package/dist/Separator.js.map +1 -0
- package/dist/Separator.native.d.ts +8 -0
- package/dist/Separator.native.d.ts.map +1 -0
- package/dist/Separator.native.js +17 -0
- package/dist/Separator.native.js.map +1 -0
- package/dist/Sheet.d.ts +54 -0
- package/dist/Sheet.d.ts.map +1 -0
- package/dist/Sheet.js +191 -0
- package/dist/Sheet.js.map +1 -0
- package/dist/Sheet.native.d.ts +55 -0
- package/dist/Sheet.native.d.ts.map +1 -0
- package/dist/Sheet.native.js +112 -0
- package/dist/Sheet.native.js.map +1 -0
- package/dist/Sidebar.d.ts +131 -0
- package/dist/Sidebar.d.ts.map +1 -0
- package/dist/Sidebar.js +328 -0
- package/dist/Sidebar.js.map +1 -0
- package/dist/Skeleton.d.ts +14 -0
- package/dist/Skeleton.d.ts.map +1 -0
- package/dist/Skeleton.js +17 -0
- package/dist/Skeleton.js.map +1 -0
- package/dist/Skeleton.native.d.ts +6 -0
- package/dist/Skeleton.native.d.ts.map +1 -0
- package/dist/Skeleton.native.js +26 -0
- package/dist/Skeleton.native.js.map +1 -0
- package/dist/Slider.d.ts +63 -0
- package/dist/Slider.d.ts.map +1 -0
- package/dist/Slider.js +109 -0
- package/dist/Slider.js.map +1 -0
- package/dist/Slider.native.d.ts +38 -0
- package/dist/Slider.native.d.ts.map +1 -0
- package/dist/Slider.native.js +18 -0
- package/dist/Slider.native.js.map +1 -0
- package/dist/SortableList.d.ts +26 -0
- package/dist/SortableList.d.ts.map +1 -0
- package/dist/SortableList.js +44 -0
- package/dist/SortableList.js.map +1 -0
- package/dist/SparkChart.d.ts +34 -0
- package/dist/SparkChart.d.ts.map +1 -0
- package/dist/SparkChart.js +55 -0
- package/dist/SparkChart.js.map +1 -0
- package/dist/StatCard.d.ts +35 -0
- package/dist/StatCard.d.ts.map +1 -0
- package/dist/StatCard.js +37 -0
- package/dist/StatCard.js.map +1 -0
- package/dist/StatCard.native.d.ts +28 -0
- package/dist/StatCard.native.d.ts.map +1 -0
- package/dist/StatCard.native.js +31 -0
- package/dist/StatCard.native.js.map +1 -0
- package/dist/StatusBadge.d.ts +23 -0
- package/dist/StatusBadge.d.ts.map +1 -0
- package/dist/StatusBadge.js +33 -0
- package/dist/StatusBadge.js.map +1 -0
- package/dist/StatusBadge.native.d.ts +21 -0
- package/dist/StatusBadge.native.d.ts.map +1 -0
- package/dist/StatusBadge.native.js +37 -0
- package/dist/StatusBadge.native.js.map +1 -0
- package/dist/Switch.d.ts +31 -0
- package/dist/Switch.d.ts.map +1 -0
- package/dist/Switch.js +46 -0
- package/dist/Switch.js.map +1 -0
- package/dist/Switch.native.d.ts +16 -0
- package/dist/Switch.native.d.ts.map +1 -0
- package/dist/Switch.native.js +41 -0
- package/dist/Switch.native.js.map +1 -0
- package/dist/TabNavigation.d.ts +49 -0
- package/dist/TabNavigation.d.ts.map +1 -0
- package/dist/TabNavigation.js +121 -0
- package/dist/TabNavigation.js.map +1 -0
- package/dist/Table.d.ts +54 -0
- package/dist/Table.d.ts.map +1 -0
- package/dist/Table.js +96 -0
- package/dist/Table.js.map +1 -0
- package/dist/Table.native.d.ts +37 -0
- package/dist/Table.native.d.ts.map +1 -0
- package/dist/Table.native.js +37 -0
- package/dist/Table.native.js.map +1 -0
- package/dist/Tabs.d.ts +45 -0
- package/dist/Tabs.d.ts.map +1 -0
- package/dist/Tabs.js +94 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Tabs.native.d.ts +47 -0
- package/dist/Tabs.native.d.ts.map +1 -0
- package/dist/Tabs.native.js +57 -0
- package/dist/Tabs.native.js.map +1 -0
- package/dist/Tag.d.ts +24 -0
- package/dist/Tag.d.ts.map +1 -0
- package/dist/Tag.js +41 -0
- package/dist/Tag.js.map +1 -0
- package/dist/Tag.native.d.ts +23 -0
- package/dist/Tag.native.d.ts.map +1 -0
- package/dist/Tag.native.js +55 -0
- package/dist/Tag.native.js.map +1 -0
- package/dist/Text.d.ts +26 -0
- package/dist/Text.d.ts.map +1 -0
- package/dist/Text.js +63 -0
- package/dist/Text.js.map +1 -0
- package/dist/Text.native.d.ts +18 -0
- package/dist/Text.native.d.ts.map +1 -0
- package/dist/Text.native.js +58 -0
- package/dist/Text.native.js.map +1 -0
- package/dist/Textarea.d.ts +23 -0
- package/dist/Textarea.d.ts.map +1 -0
- package/dist/Textarea.js +39 -0
- package/dist/Textarea.js.map +1 -0
- package/dist/Textarea.native.d.ts +16 -0
- package/dist/Textarea.native.d.ts.map +1 -0
- package/dist/Textarea.native.js +30 -0
- package/dist/Textarea.native.js.map +1 -0
- package/dist/TiptapEditor.d.ts +24 -0
- package/dist/TiptapEditor.d.ts.map +1 -0
- package/dist/TiptapEditor.js +84 -0
- package/dist/TiptapEditor.js.map +1 -0
- package/dist/TitleBar.d.ts +31 -0
- package/dist/TitleBar.d.ts.map +1 -0
- package/dist/TitleBar.js +27 -0
- package/dist/TitleBar.js.map +1 -0
- package/dist/TitleBar.native.d.ts +19 -0
- package/dist/TitleBar.native.d.ts.map +1 -0
- package/dist/TitleBar.native.js +16 -0
- package/dist/TitleBar.native.js.map +1 -0
- package/dist/Toast.d.ts +72 -0
- package/dist/Toast.d.ts.map +1 -0
- package/dist/Toast.js +194 -0
- package/dist/Toast.js.map +1 -0
- package/dist/Toast.native.d.ts +65 -0
- package/dist/Toast.native.d.ts.map +1 -0
- package/dist/Toast.native.js +182 -0
- package/dist/Toast.native.js.map +1 -0
- package/dist/Toggle.d.ts +46 -0
- package/dist/Toggle.d.ts.map +1 -0
- package/dist/Toggle.js +70 -0
- package/dist/Toggle.js.map +1 -0
- package/dist/Toggle.native.d.ts +42 -0
- package/dist/Toggle.native.d.ts.map +1 -0
- package/dist/Toggle.native.js +56 -0
- package/dist/Toggle.native.js.map +1 -0
- package/dist/Tooltip.d.ts +32 -0
- package/dist/Tooltip.d.ts.map +1 -0
- package/dist/Tooltip.js +43 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/Tooltip.native.d.ts +25 -0
- package/dist/Tooltip.native.d.ts.map +1 -0
- package/dist/Tooltip.native.js +25 -0
- package/dist/Tooltip.native.js.map +1 -0
- package/dist/TopBar.d.ts +105 -0
- package/dist/TopBar.d.ts.map +1 -0
- package/dist/TopBar.js +90 -0
- package/dist/TopBar.js.map +1 -0
- package/dist/TopBar.native.d.ts +67 -0
- package/dist/TopBar.native.d.ts.map +1 -0
- package/dist/TopBar.native.js +41 -0
- package/dist/TopBar.native.js.map +1 -0
- package/dist/Tracker.d.ts +44 -0
- package/dist/Tracker.d.ts.map +1 -0
- package/dist/Tracker.js +92 -0
- package/dist/Tracker.js.map +1 -0
- package/dist/TransferList.d.ts +51 -0
- package/dist/TransferList.d.ts.map +1 -0
- package/dist/TransferList.js +107 -0
- package/dist/TransferList.js.map +1 -0
- package/dist/TransferList.native.d.ts +14 -0
- package/dist/TransferList.native.d.ts.map +1 -0
- package/dist/TransferList.native.js +57 -0
- package/dist/TransferList.native.js.map +1 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/cn.d.ts +7 -0
- package/dist/internal/cn.d.ts.map +1 -0
- package/dist/internal/cn.js +30 -0
- package/dist/internal/cn.js.map +1 -0
- package/package.json +499 -0
- package/src/AccessLevelGroup.native.tsx +103 -0
- package/src/AccessLevelGroup.tsx +103 -0
- package/src/Accordion.native.tsx +199 -0
- package/src/Accordion.tsx +279 -0
- package/src/Alert.native.tsx +100 -0
- package/src/Alert.tsx +101 -0
- package/src/AlertDialog.native.tsx +189 -0
- package/src/AlertDialog.tsx +194 -0
- package/src/AspectRatio.native.tsx +28 -0
- package/src/AspectRatio.tsx +35 -0
- package/src/Avatar.native.tsx +142 -0
- package/src/Avatar.tsx +155 -0
- package/src/AvatarGroup.native.tsx +81 -0
- package/src/AvatarGroup.tsx +114 -0
- package/src/Badge.native.tsx +85 -0
- package/src/Badge.tsx +93 -0
- package/src/Banner.native.tsx +77 -0
- package/src/Banner.tsx +95 -0
- package/src/BarList.tsx +102 -0
- package/src/Breadcrumb.native.tsx +238 -0
- package/src/Breadcrumb.tsx +258 -0
- package/src/Button.native.tsx +123 -0
- package/src/Button.tsx +153 -0
- package/src/Calendar.native.tsx +28 -0
- package/src/Calendar.tsx +211 -0
- package/src/Card.native.tsx +82 -0
- package/src/Card.tsx +94 -0
- package/src/Carousel.native.tsx +224 -0
- package/src/Carousel.tsx +292 -0
- package/src/CategoryBar.tsx +85 -0
- package/src/Chart.tsx +467 -0
- package/src/Checkbox.native.tsx +69 -0
- package/src/Checkbox.tsx +108 -0
- package/src/CheckboxGrid.native.tsx +160 -0
- package/src/CheckboxGrid.tsx +262 -0
- package/src/Collapsible.native.tsx +240 -0
- package/src/Collapsible.tsx +241 -0
- package/src/Combobox.native.tsx +171 -0
- package/src/Combobox.tsx +272 -0
- package/src/Command.native.tsx +71 -0
- package/src/Command.tsx +203 -0
- package/src/ContextMenu.native.tsx +313 -0
- package/src/ContextMenu.tsx +238 -0
- package/src/DataTable.native.tsx +70 -0
- package/src/DataTable.tsx +989 -0
- package/src/DatePicker.native.tsx +46 -0
- package/src/DatePicker.tsx +357 -0
- package/src/Dialog.native.tsx +181 -0
- package/src/Dialog.tsx +224 -0
- package/src/Drawer.native.tsx +134 -0
- package/src/Drawer.tsx +119 -0
- package/src/DropdownMenu.native.tsx +258 -0
- package/src/DropdownMenu.tsx +387 -0
- package/src/Dropzone.tsx +95 -0
- package/src/EmptyState.native.tsx +43 -0
- package/src/EmptyState.tsx +52 -0
- package/src/Form.native.tsx +94 -0
- package/src/Form.tsx +1324 -0
- package/src/HoverCard.native.tsx +63 -0
- package/src/HoverCard.tsx +181 -0
- package/src/IconSidebar.native.tsx +94 -0
- package/src/IconSidebar.tsx +448 -0
- package/src/Input.native.tsx +99 -0
- package/src/Input.tsx +132 -0
- package/src/InputOTP.native.tsx +154 -0
- package/src/InputOTP.tsx +119 -0
- package/src/Label.native.tsx +55 -0
- package/src/Label.tsx +60 -0
- package/src/Link.native.tsx +89 -0
- package/src/Link.tsx +85 -0
- package/src/Logo.native.tsx +114 -0
- package/src/Logo.tsx +153 -0
- package/src/MainSidebar.native.tsx +8 -0
- package/src/MainSidebar.tsx +10 -0
- package/src/Menubar.tsx +485 -0
- package/src/NavigationMenu.native.tsx +136 -0
- package/src/NavigationMenu.tsx +180 -0
- package/src/NotificationBadge.native.tsx +80 -0
- package/src/NotificationBadge.tsx +91 -0
- package/src/PageShell.native.tsx +43 -0
- package/src/PageShell.tsx +50 -0
- package/src/Pagination.native.tsx +217 -0
- package/src/Pagination.tsx +250 -0
- package/src/Popover.native.tsx +139 -0
- package/src/Popover.tsx +175 -0
- package/src/Popper.tsx +399 -0
- package/src/Progress.native.tsx +197 -0
- package/src/Progress.tsx +286 -0
- package/src/ProgressCircle.tsx +200 -0
- package/src/RadioCardGroup.tsx +97 -0
- package/src/RadioGroup.native.tsx +153 -0
- package/src/RadioGroup.tsx +201 -0
- package/src/Resizable.native.tsx +76 -0
- package/src/Resizable.tsx +88 -0
- package/src/RichTextEditor.tsx +513 -0
- package/src/ScrollArea.native.tsx +36 -0
- package/src/ScrollArea.tsx +62 -0
- package/src/SearchField.native.tsx +104 -0
- package/src/SearchField.tsx +136 -0
- package/src/SectionHeader.native.tsx +226 -0
- package/src/SectionHeader.tsx +250 -0
- package/src/Select.native.tsx +299 -0
- package/src/Select.tsx +710 -0
- package/src/Separator.native.tsx +38 -0
- package/src/Separator.tsx +43 -0
- package/src/Sheet.native.tsx +233 -0
- package/src/Sheet.tsx +329 -0
- package/src/Sidebar.tsx +956 -0
- package/src/Skeleton.native.tsx +47 -0
- package/src/Skeleton.tsx +29 -0
- package/src/Slider.native.tsx +64 -0
- package/src/Slider.tsx +284 -0
- package/src/SortableList.tsx +158 -0
- package/src/SparkChart.tsx +143 -0
- package/src/StatCard.native.tsx +64 -0
- package/src/StatCard.tsx +75 -0
- package/src/StatusBadge.native.tsx +57 -0
- package/src/StatusBadge.tsx +52 -0
- package/src/Switch.native.tsx +78 -0
- package/src/Switch.tsx +94 -0
- package/src/TabNavigation.tsx +329 -0
- package/src/Table.native.tsx +183 -0
- package/src/Table.tsx +260 -0
- package/src/Tabs.native.tsx +139 -0
- package/src/Tabs.tsx +216 -0
- package/src/Tag.native.tsx +87 -0
- package/src/Tag.tsx +93 -0
- package/src/Text.native.tsx +95 -0
- package/src/Text.tsx +93 -0
- package/src/Textarea.native.tsx +64 -0
- package/src/Textarea.tsx +66 -0
- package/src/TitleBar.native.tsx +46 -0
- package/src/TitleBar.tsx +64 -0
- package/src/Toast.native.tsx +366 -0
- package/src/Toast.tsx +408 -0
- package/src/Toggle.native.tsx +162 -0
- package/src/Toggle.tsx +169 -0
- package/src/Tooltip.native.tsx +62 -0
- package/src/Tooltip.tsx +88 -0
- package/src/TopBar.native.tsx +223 -0
- package/src/TopBar.tsx +436 -0
- package/src/Tracker.tsx +244 -0
- package/src/TransferList.native.tsx +180 -0
- package/src/TransferList.tsx +297 -0
- package/src/globals.d.ts +1 -0
- package/src/index.ts +502 -0
- package/src/internal/cn.ts +31 -0
package/src/Calendar.tsx
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Calendar (web variant — React DOM).
|
|
5
|
+
*
|
|
6
|
+
* Date picker calendar grid powered by @daypicker/react v10.
|
|
7
|
+
* Styled with design system tokens.
|
|
8
|
+
*
|
|
9
|
+
* <Calendar mode="single" selected={date} onSelect={setDate} />
|
|
10
|
+
* <Calendar mode="range" selected={range} onSelect={setRange} />
|
|
11
|
+
*
|
|
12
|
+
* Wiki: docs/components/Calendar.md
|
|
13
|
+
*/
|
|
14
|
+
import { type ComponentProps, type CSSProperties } from 'react';
|
|
15
|
+
import { DayPicker, type ChevronProps, type DropdownProps } from '@daypicker/react';
|
|
16
|
+
import { cn } from './internal/cn.js';
|
|
17
|
+
|
|
18
|
+
export type CalendarProps = ComponentProps<typeof DayPicker>;
|
|
19
|
+
|
|
20
|
+
/** Day cell — compact popup geometry with an accessible 36 px day target. */
|
|
21
|
+
const CELL = 40;
|
|
22
|
+
const TARGET = 36;
|
|
23
|
+
const DAY_COLUMNS = 7;
|
|
24
|
+
|
|
25
|
+
export function Calendar({
|
|
26
|
+
className,
|
|
27
|
+
classNames,
|
|
28
|
+
components,
|
|
29
|
+
numberOfMonths = 1,
|
|
30
|
+
style,
|
|
31
|
+
styles,
|
|
32
|
+
showOutsideDays = true,
|
|
33
|
+
showWeekNumber = false,
|
|
34
|
+
...props
|
|
35
|
+
}: CalendarProps) {
|
|
36
|
+
const gridWidth = (showWeekNumber ? DAY_COLUMNS + 1 : DAY_COLUMNS) * CELL;
|
|
37
|
+
const monthGap = 16;
|
|
38
|
+
const navLeft = numberOfMonths > 1 ? -((numberOfMonths - 1) * (gridWidth + monthGap)) : 0;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<DayPicker
|
|
42
|
+
numberOfMonths={numberOfMonths}
|
|
43
|
+
showOutsideDays={showOutsideDays}
|
|
44
|
+
showWeekNumber={showWeekNumber}
|
|
45
|
+
className={cn('rdp-root p-3', className)}
|
|
46
|
+
style={{
|
|
47
|
+
display: 'inline-block',
|
|
48
|
+
'--rdp-day-width': `${CELL}px`,
|
|
49
|
+
'--rdp-day-height': `${CELL}px`,
|
|
50
|
+
'--rdp-day_button-width': `${TARGET}px`,
|
|
51
|
+
'--rdp-day_button-height': `${TARGET}px`,
|
|
52
|
+
'--mi-calendar-grid-width': `${gridWidth}px`,
|
|
53
|
+
'--mi-calendar-month-gap': `${monthGap}px`,
|
|
54
|
+
'--mi-calendar-nav-left': `${navLeft}px`,
|
|
55
|
+
...style,
|
|
56
|
+
} as CSSProperties}
|
|
57
|
+
styles={{
|
|
58
|
+
...styles,
|
|
59
|
+
month_grid: { width: gridWidth, tableLayout: 'fixed', ...styles?.month_grid },
|
|
60
|
+
}}
|
|
61
|
+
components={{
|
|
62
|
+
Dropdown: CalendarDropdown,
|
|
63
|
+
Chevron: CalendarChevron,
|
|
64
|
+
...components,
|
|
65
|
+
}}
|
|
66
|
+
classNames={{
|
|
67
|
+
months: 'relative flex flex-col gap-[var(--mi-calendar-month-gap)] sm:flex-row',
|
|
68
|
+
/* month is relative so nav buttons can overlay the caption row */
|
|
69
|
+
month: 'relative flex flex-col gap-3',
|
|
70
|
+
|
|
71
|
+
/* ── Caption ─────────────────────────────────── */
|
|
72
|
+
month_caption: 'flex min-h-11 items-center justify-center px-10',
|
|
73
|
+
caption_label: 'rdp-caption-label text-base font-semibold text-foreground',
|
|
74
|
+
dropdowns: 'rdp-dropdowns flex items-center justify-center gap-1.5',
|
|
75
|
+
dropdown_root: cn(
|
|
76
|
+
'rdp-dropdown-root relative inline-flex h-9 min-w-[5.5rem] items-center justify-center',
|
|
77
|
+
),
|
|
78
|
+
dropdown: cn(
|
|
79
|
+
'rdp-dropdown h-9 w-full appearance-none rounded-md border border-input bg-card px-2.5 pr-7',
|
|
80
|
+
'text-center text-sm font-semibold text-foreground shadow-mi-input outline-none',
|
|
81
|
+
'transition-[border-color,box-shadow] duration-200',
|
|
82
|
+
'focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/25',
|
|
83
|
+
),
|
|
84
|
+
months_dropdown: 'min-w-[6.5rem]',
|
|
85
|
+
years_dropdown: 'min-w-[5.5rem]',
|
|
86
|
+
chevron: 'rdp-chevron shrink-0 text-current',
|
|
87
|
+
|
|
88
|
+
/* ── Navigation ──────────────────────────────── */
|
|
89
|
+
nav: cn(
|
|
90
|
+
'absolute left-0 right-0 top-0 z-10 flex h-11 items-center justify-between px-0.5 pointer-events-none',
|
|
91
|
+
'sm:left-[var(--mi-calendar-nav-left)]',
|
|
92
|
+
),
|
|
93
|
+
button_previous: cn(
|
|
94
|
+
'rdp-button_previous pointer-events-auto absolute left-0 top-1.5 z-20 inline-flex size-8 items-center justify-center rounded-full',
|
|
95
|
+
'text-foreground/70 transition-colors duration-200',
|
|
96
|
+
'hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
97
|
+
'[&_svg]:size-4',
|
|
98
|
+
),
|
|
99
|
+
button_next: cn(
|
|
100
|
+
'rdp-button_next pointer-events-auto absolute right-0 top-1.5 z-20 inline-flex size-8 items-center justify-center rounded-full',
|
|
101
|
+
'text-foreground/70 transition-colors duration-200',
|
|
102
|
+
'hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',
|
|
103
|
+
'[&_svg]:size-4',
|
|
104
|
+
),
|
|
105
|
+
|
|
106
|
+
/* ── Grid ────────────────────────────────────── */
|
|
107
|
+
month_grid: 'rdp-month-grid border-separate border-spacing-0',
|
|
108
|
+
weekdays: '',
|
|
109
|
+
weekday: 'h-8 pb-1.5 text-center text-xs font-medium text-muted-foreground',
|
|
110
|
+
week_number_header: 'rdp-week-number-header h-8 w-10 pb-1.5 text-center text-xs font-semibold text-muted-foreground',
|
|
111
|
+
week_number: 'rdp-week-number w-10 p-0.5 text-center align-middle text-xs font-semibold text-muted-foreground',
|
|
112
|
+
week: '',
|
|
113
|
+
|
|
114
|
+
/* ── Day cell (td) ───────────────────────────── */
|
|
115
|
+
day: cn(
|
|
116
|
+
'relative size-10 p-0.5 text-center align-middle text-sm',
|
|
117
|
+
'focus-within:relative focus-within:z-20',
|
|
118
|
+
),
|
|
119
|
+
|
|
120
|
+
/* ── Day button ──────────────────────────────── */
|
|
121
|
+
day_button: cn(
|
|
122
|
+
'inline-flex size-9 items-center justify-center rounded-full p-0',
|
|
123
|
+
'text-sm font-normal transition-colors duration-150',
|
|
124
|
+
'hover:bg-muted hover:text-foreground',
|
|
125
|
+
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
126
|
+
'aria-selected:opacity-100',
|
|
127
|
+
),
|
|
128
|
+
|
|
129
|
+
/* ── Selection states ────────────────────────── */
|
|
130
|
+
range_start: 'day-range-start [&>button]:rounded-full',
|
|
131
|
+
range_end: 'day-range-end [&>button]:rounded-full',
|
|
132
|
+
selected: cn(
|
|
133
|
+
'[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:shadow-sm',
|
|
134
|
+
'[&>button:hover]:bg-primary [&>button:hover]:text-primary-foreground',
|
|
135
|
+
'[&>button:focus]:bg-primary [&>button:focus]:text-primary-foreground',
|
|
136
|
+
),
|
|
137
|
+
today: cn(
|
|
138
|
+
'font-semibold',
|
|
139
|
+
'[&>button]:ring-1 [&>button]:ring-primary/40',
|
|
140
|
+
),
|
|
141
|
+
outside: 'day-outside',
|
|
142
|
+
disabled: '[&>button]:cursor-not-allowed [&>button]:text-muted-foreground/20 [&>button:hover]:bg-transparent',
|
|
143
|
+
range_middle: cn(
|
|
144
|
+
'[&>button]:rounded-lg [&>button]:!bg-primary/8 [&>button]:!text-foreground [&>button]:!shadow-none',
|
|
145
|
+
'dark:[&>button]:!bg-primary/12 dark:[&>button]:!text-foreground',
|
|
146
|
+
),
|
|
147
|
+
hidden: 'invisible',
|
|
148
|
+
...classNames,
|
|
149
|
+
}}
|
|
150
|
+
{...props}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function CalendarDropdown({ options, className, ...selectProps }: DropdownProps) {
|
|
156
|
+
return (
|
|
157
|
+
<span className="rdp-dropdown-root relative inline-flex h-9 min-w-[5.5rem] items-center justify-center">
|
|
158
|
+
<select
|
|
159
|
+
{...selectProps}
|
|
160
|
+
className={cn(
|
|
161
|
+
'rdp-dropdown h-9 w-full appearance-none rounded-md border border-input bg-card px-2.5 pr-7',
|
|
162
|
+
'text-center text-sm font-semibold text-foreground shadow-mi-input outline-none',
|
|
163
|
+
'transition-[border-color,box-shadow] duration-200',
|
|
164
|
+
'focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/25',
|
|
165
|
+
className,
|
|
166
|
+
)}
|
|
167
|
+
>
|
|
168
|
+
{options?.map(({ value, label, disabled }) => (
|
|
169
|
+
<option key={value} value={value} disabled={disabled}>
|
|
170
|
+
{label}
|
|
171
|
+
</option>
|
|
172
|
+
))}
|
|
173
|
+
</select>
|
|
174
|
+
<CalendarChevron
|
|
175
|
+
aria-hidden={true}
|
|
176
|
+
orientation="down"
|
|
177
|
+
size={16}
|
|
178
|
+
className="pointer-events-none absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"
|
|
179
|
+
/>
|
|
180
|
+
</span>
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function CalendarChevron({
|
|
185
|
+
className,
|
|
186
|
+
disabled,
|
|
187
|
+
orientation = 'left',
|
|
188
|
+
size = 20,
|
|
189
|
+
style,
|
|
190
|
+
...props
|
|
191
|
+
}: ChevronProps & { 'aria-hidden'?: boolean }) {
|
|
192
|
+
const points = {
|
|
193
|
+
up: 'M6 15l6-6 6 6',
|
|
194
|
+
down: 'M6 9l6 6 6-6',
|
|
195
|
+
left: 'M15 18l-6-6 6-6',
|
|
196
|
+
right: 'M9 6l6 6-6 6',
|
|
197
|
+
}[orientation];
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
<svg
|
|
201
|
+
{...props}
|
|
202
|
+
className={cn('rdp-chevron shrink-0 fill-none stroke-current stroke-2', disabled && 'opacity-35', className)}
|
|
203
|
+
style={style}
|
|
204
|
+
width={size}
|
|
205
|
+
height={size}
|
|
206
|
+
viewBox="0 0 24 24"
|
|
207
|
+
>
|
|
208
|
+
<path d={points} strokeLinecap="round" strokeLinejoin="round" />
|
|
209
|
+
</svg>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card (React Native variant).
|
|
3
|
+
*
|
|
4
|
+
* Same composable pieces as the web variant. Headings render as
|
|
5
|
+
* `<Text>` with `accessibilityRole="header"` so screen readers
|
|
6
|
+
* announce them correctly.
|
|
7
|
+
*
|
|
8
|
+
* Wiki: docs/components/Card.md
|
|
9
|
+
*/
|
|
10
|
+
import { forwardRef } from 'react';
|
|
11
|
+
import { Text, View, type TextProps, type ViewProps } from 'react-native';
|
|
12
|
+
import { cn } from './internal/cn.js';
|
|
13
|
+
|
|
14
|
+
type ClassedViewProps = Omit<ViewProps, 'style'> & { className?: string };
|
|
15
|
+
type ClassedTextProps = Omit<TextProps, 'style'> & { className?: string };
|
|
16
|
+
|
|
17
|
+
export const Card = forwardRef<View, ClassedViewProps>(function Card(
|
|
18
|
+
{ className, ...props },
|
|
19
|
+
ref,
|
|
20
|
+
) {
|
|
21
|
+
return (
|
|
22
|
+
<View
|
|
23
|
+
ref={ref}
|
|
24
|
+
className={cn('rounded-lg border border-border bg-background', className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const CardHeader = forwardRef<View, ClassedViewProps>(function CardHeader(
|
|
31
|
+
{ className, ...props },
|
|
32
|
+
ref,
|
|
33
|
+
) {
|
|
34
|
+
return <View ref={ref} className={cn('gap-1.5 p-6', className)} {...props} />;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const CardTitle = forwardRef<Text, ClassedTextProps>(function CardTitle(
|
|
38
|
+
{ className, ...props },
|
|
39
|
+
ref,
|
|
40
|
+
) {
|
|
41
|
+
return (
|
|
42
|
+
<Text
|
|
43
|
+
ref={ref}
|
|
44
|
+
accessibilityRole="header"
|
|
45
|
+
className={cn('text-lg font-semibold leading-tight text-foreground', className)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const CardDescription = forwardRef<Text, ClassedTextProps>(function CardDescription(
|
|
52
|
+
{ className, ...props },
|
|
53
|
+
ref,
|
|
54
|
+
) {
|
|
55
|
+
return (
|
|
56
|
+
<Text
|
|
57
|
+
ref={ref}
|
|
58
|
+
className={cn('text-sm text-muted-foreground', className)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const CardContent = forwardRef<View, ClassedViewProps>(function CardContent(
|
|
65
|
+
{ className, ...props },
|
|
66
|
+
ref,
|
|
67
|
+
) {
|
|
68
|
+
return <View ref={ref} className={cn('p-6 pt-0', className)} {...props} />;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export const CardFooter = forwardRef<View, ClassedViewProps>(function CardFooter(
|
|
72
|
+
{ className, ...props },
|
|
73
|
+
ref,
|
|
74
|
+
) {
|
|
75
|
+
return (
|
|
76
|
+
<View
|
|
77
|
+
ref={ref}
|
|
78
|
+
className={cn('flex-row items-center gap-2 p-6 pt-0', className)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
});
|
package/src/Card.tsx
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Card (web variant — React DOM).
|
|
5
|
+
*
|
|
6
|
+
* A composable container surface. Exports six pieces that compose
|
|
7
|
+
* into the standard card pattern:
|
|
8
|
+
*
|
|
9
|
+
* <Card>
|
|
10
|
+
* <CardHeader>
|
|
11
|
+
* <CardTitle>...</CardTitle>
|
|
12
|
+
* <CardDescription>...</CardDescription>
|
|
13
|
+
* </CardHeader>
|
|
14
|
+
* <CardContent>...</CardContent>
|
|
15
|
+
* <CardFooter>...</CardFooter>
|
|
16
|
+
* </Card>
|
|
17
|
+
*
|
|
18
|
+
* Every piece is just a styled div / heading. No internal state, no
|
|
19
|
+
* special behaviour — Card is a layout primitive. Pair with `Button`
|
|
20
|
+
* and `Text` for content.
|
|
21
|
+
*
|
|
22
|
+
* Wiki: docs/components/Card.md
|
|
23
|
+
*/
|
|
24
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
25
|
+
import { cn } from './internal/cn.js';
|
|
26
|
+
|
|
27
|
+
export const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
|
28
|
+
function Card({ className, ...props }, ref) {
|
|
29
|
+
return (
|
|
30
|
+
<div
|
|
31
|
+
ref={ref}
|
|
32
|
+
className={cn(
|
|
33
|
+
'rounded-xl border border-secondary bg-card text-card-foreground transition-colors duration-150',
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
|
43
|
+
function CardHeader({ className, ...props }, ref) {
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn('flex flex-col gap-1.5 p-6', className)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
export const CardTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(
|
|
55
|
+
function CardTitle({ className, ...props }, ref) {
|
|
56
|
+
return (
|
|
57
|
+
<h3
|
|
58
|
+
ref={ref}
|
|
59
|
+
className={cn('text-lg font-semibold leading-tight tracking-tight', className)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export const CardDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(
|
|
67
|
+
function CardDescription({ className, ...props }, ref) {
|
|
68
|
+
return (
|
|
69
|
+
<p
|
|
70
|
+
ref={ref}
|
|
71
|
+
className={cn('text-sm text-muted-foreground', className)}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
export const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
|
79
|
+
function CardContent({ className, ...props }, ref) {
|
|
80
|
+
return <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />;
|
|
81
|
+
},
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
export const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(
|
|
85
|
+
function CardFooter({ className, ...props }, ref) {
|
|
86
|
+
return (
|
|
87
|
+
<div
|
|
88
|
+
ref={ref}
|
|
89
|
+
className={cn('flex items-center gap-2 p-6 pt-0', className)}
|
|
90
|
+
{...props}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
},
|
|
94
|
+
);
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carousel (React Native variant).
|
|
3
|
+
*
|
|
4
|
+
* Horizontal paging carousel backed by FlatList.
|
|
5
|
+
* Uses `data` + `renderItem` instead of composable children
|
|
6
|
+
* (FlatList requires a data-driven pattern).
|
|
7
|
+
*
|
|
8
|
+
* <Carousel
|
|
9
|
+
* data={slides}
|
|
10
|
+
* renderItem={({ item }) => <CarouselItem><Text>{item.title}</Text></CarouselItem>}
|
|
11
|
+
* />
|
|
12
|
+
*
|
|
13
|
+
* Wiki: docs/components/Carousel.md
|
|
14
|
+
*/
|
|
15
|
+
import {
|
|
16
|
+
createContext,
|
|
17
|
+
forwardRef,
|
|
18
|
+
useCallback,
|
|
19
|
+
useContext,
|
|
20
|
+
useEffect,
|
|
21
|
+
useRef,
|
|
22
|
+
useState,
|
|
23
|
+
type ReactNode,
|
|
24
|
+
} from 'react';
|
|
25
|
+
import {
|
|
26
|
+
FlatList,
|
|
27
|
+
Pressable,
|
|
28
|
+
View,
|
|
29
|
+
useWindowDimensions,
|
|
30
|
+
type FlatListProps,
|
|
31
|
+
type ListRenderItemInfo,
|
|
32
|
+
type NativeScrollEvent,
|
|
33
|
+
type NativeSyntheticEvent,
|
|
34
|
+
type ViewProps,
|
|
35
|
+
} from 'react-native';
|
|
36
|
+
import { cn } from './internal/cn.js';
|
|
37
|
+
|
|
38
|
+
/* ── Types ────────────────────────────────────────────────────────── */
|
|
39
|
+
|
|
40
|
+
/** Mirror the web CarouselApi shape for cross-platform consumers. */
|
|
41
|
+
export type CarouselApi = {
|
|
42
|
+
scrollPrev: () => void;
|
|
43
|
+
scrollNext: () => void;
|
|
44
|
+
canScrollPrev: boolean;
|
|
45
|
+
canScrollNext: boolean;
|
|
46
|
+
selectedIndex: number;
|
|
47
|
+
scrollTo: (index: number) => void;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type CarouselProps<T> = Omit<
|
|
51
|
+
FlatListProps<T>,
|
|
52
|
+
'horizontal' | 'pagingEnabled' | 'renderItem'
|
|
53
|
+
> & {
|
|
54
|
+
orientation?: 'horizontal' | 'vertical';
|
|
55
|
+
renderItem: (info: ListRenderItemInfo<T>) => ReactNode;
|
|
56
|
+
setApi?: (api: CarouselApi) => void;
|
|
57
|
+
className?: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type CarouselContextValue = {
|
|
61
|
+
orientation: 'horizontal' | 'vertical';
|
|
62
|
+
itemWidth: number;
|
|
63
|
+
itemHeight: number;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/* ── Context ──────────────────────────────────────────────────────── */
|
|
67
|
+
|
|
68
|
+
const CarouselContext = createContext<CarouselContextValue | null>(null);
|
|
69
|
+
|
|
70
|
+
export function useCarousel() {
|
|
71
|
+
const ctx = useContext(CarouselContext);
|
|
72
|
+
if (!ctx) throw new Error('useCarousel must be used within a <Carousel>');
|
|
73
|
+
return ctx;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ── Root ──────────────────────────────────────────────────────────── */
|
|
77
|
+
|
|
78
|
+
function CarouselInner<T>(
|
|
79
|
+
{
|
|
80
|
+
data,
|
|
81
|
+
renderItem,
|
|
82
|
+
orientation = 'horizontal',
|
|
83
|
+
setApi,
|
|
84
|
+
className,
|
|
85
|
+
...props
|
|
86
|
+
}: CarouselProps<T>,
|
|
87
|
+
ref: React.Ref<FlatList<T>>,
|
|
88
|
+
) {
|
|
89
|
+
const { width, height } = useWindowDimensions();
|
|
90
|
+
const flatListRef = useRef<FlatList<T>>(null);
|
|
91
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
92
|
+
const dataLength = data ? (data as T[]).length : 0;
|
|
93
|
+
|
|
94
|
+
const isHorizontal = orientation === 'horizontal';
|
|
95
|
+
const itemWidth = isHorizontal ? width : width;
|
|
96
|
+
const itemHeight = isHorizontal ? height : height;
|
|
97
|
+
|
|
98
|
+
const onMomentumScrollEnd = useCallback(
|
|
99
|
+
(e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
100
|
+
const offset = isHorizontal
|
|
101
|
+
? e.nativeEvent.contentOffset.x
|
|
102
|
+
: e.nativeEvent.contentOffset.y;
|
|
103
|
+
const size = isHorizontal ? width : height;
|
|
104
|
+
const index = Math.round(offset / size);
|
|
105
|
+
setActiveIndex(index);
|
|
106
|
+
},
|
|
107
|
+
[isHorizontal, width, height],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
const scrollTo = useCallback(
|
|
111
|
+
(index: number) => {
|
|
112
|
+
flatListRef.current?.scrollToIndex({ index, animated: true });
|
|
113
|
+
setActiveIndex(index);
|
|
114
|
+
},
|
|
115
|
+
[],
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const scrollPrev = useCallback(() => {
|
|
119
|
+
if (activeIndex > 0) scrollTo(activeIndex - 1);
|
|
120
|
+
}, [activeIndex, scrollTo]);
|
|
121
|
+
|
|
122
|
+
const scrollNext = useCallback(() => {
|
|
123
|
+
if (activeIndex < dataLength - 1) scrollTo(activeIndex + 1);
|
|
124
|
+
}, [activeIndex, dataLength, scrollTo]);
|
|
125
|
+
|
|
126
|
+
/* Expose imperative API */
|
|
127
|
+
const canScrollPrev = activeIndex > 0;
|
|
128
|
+
const canScrollNext = activeIndex < dataLength - 1;
|
|
129
|
+
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
const api: CarouselApi = {
|
|
132
|
+
scrollPrev,
|
|
133
|
+
scrollNext,
|
|
134
|
+
canScrollPrev,
|
|
135
|
+
canScrollNext,
|
|
136
|
+
selectedIndex: activeIndex,
|
|
137
|
+
scrollTo,
|
|
138
|
+
};
|
|
139
|
+
setApi?.(api);
|
|
140
|
+
}, [activeIndex, canScrollPrev, canScrollNext, scrollPrev, scrollNext, scrollTo, setApi]);
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<CarouselContext.Provider value={{ orientation, itemWidth, itemHeight }}>
|
|
144
|
+
<View
|
|
145
|
+
className={cn('relative', className)}
|
|
146
|
+
accessibilityRole="adjustable"
|
|
147
|
+
accessibilityLabel="carousel"
|
|
148
|
+
>
|
|
149
|
+
<FlatList
|
|
150
|
+
ref={(node) => {
|
|
151
|
+
(flatListRef as React.MutableRefObject<FlatList<T> | null>).current = node;
|
|
152
|
+
if (typeof ref === 'function') ref(node);
|
|
153
|
+
else if (ref) (ref as React.MutableRefObject<FlatList<T> | null>).current = node;
|
|
154
|
+
}}
|
|
155
|
+
data={data}
|
|
156
|
+
renderItem={renderItem as FlatListProps<T>['renderItem']}
|
|
157
|
+
horizontal={isHorizontal}
|
|
158
|
+
pagingEnabled
|
|
159
|
+
snapToAlignment="center"
|
|
160
|
+
showsHorizontalScrollIndicator={false}
|
|
161
|
+
showsVerticalScrollIndicator={false}
|
|
162
|
+
onMomentumScrollEnd={onMomentumScrollEnd}
|
|
163
|
+
{...props}
|
|
164
|
+
/>
|
|
165
|
+
</View>
|
|
166
|
+
</CarouselContext.Provider>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const Carousel = forwardRef(CarouselInner) as <T>(
|
|
171
|
+
props: CarouselProps<T> & { ref?: React.Ref<FlatList<T>> },
|
|
172
|
+
) => ReturnType<typeof CarouselInner>;
|
|
173
|
+
|
|
174
|
+
/* ── Item ──────────────────────────────────────────────────────────── */
|
|
175
|
+
|
|
176
|
+
type ClassedViewProps = Omit<ViewProps, 'style'> & { className?: string };
|
|
177
|
+
|
|
178
|
+
export const CarouselItem = forwardRef<View, ClassedViewProps>(
|
|
179
|
+
function CarouselItem({ className, ...props }, ref) {
|
|
180
|
+
return (
|
|
181
|
+
<View
|
|
182
|
+
ref={ref}
|
|
183
|
+
accessibilityRole="summary"
|
|
184
|
+
accessibilityLabel="slide"
|
|
185
|
+
className={cn('flex-1', className)}
|
|
186
|
+
{...props}
|
|
187
|
+
/>
|
|
188
|
+
);
|
|
189
|
+
},
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
/* ── Navigation buttons (thin wrappers — typically custom on native) */
|
|
193
|
+
|
|
194
|
+
export const CarouselPrevious = forwardRef<View, ClassedViewProps & { onPress?: () => void }>(
|
|
195
|
+
function CarouselPrevious({ className, onPress, children, ...props }, ref) {
|
|
196
|
+
return (
|
|
197
|
+
<Pressable ref={ref} onPress={onPress} className={cn(className)} {...props}>
|
|
198
|
+
{children}
|
|
199
|
+
</Pressable>
|
|
200
|
+
);
|
|
201
|
+
},
|
|
202
|
+
);
|
|
203
|
+
|
|
204
|
+
export const CarouselNext = forwardRef<View, ClassedViewProps & { onPress?: () => void }>(
|
|
205
|
+
function CarouselNext({ className, onPress, children, ...props }, ref) {
|
|
206
|
+
return (
|
|
207
|
+
<Pressable ref={ref} onPress={onPress} className={cn(className)} {...props}>
|
|
208
|
+
{children}
|
|
209
|
+
</Pressable>
|
|
210
|
+
);
|
|
211
|
+
},
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
/* ── Content (no-op wrapper for API symmetry) ────────────────────── */
|
|
215
|
+
|
|
216
|
+
export const CarouselContent = forwardRef<View, ClassedViewProps>(
|
|
217
|
+
function CarouselContent({ className, children, ...props }, ref) {
|
|
218
|
+
return (
|
|
219
|
+
<View ref={ref} className={cn(className)} {...props}>
|
|
220
|
+
{children}
|
|
221
|
+
</View>
|
|
222
|
+
);
|
|
223
|
+
},
|
|
224
|
+
);
|