@medway-ui/core 1.23.1 → 1.24.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/dist/assets/js/tokens.d.mts +695 -0
- package/dist/assets/js/tokens.d.mts.map +1 -0
- package/dist/assets/js/tokens.d.ts +695 -0
- package/dist/assets/js/tokens.d.ts.map +1 -0
- package/dist/assets/js/tokens.js +3 -0
- package/dist/assets/js/tokens.js.map +1 -0
- package/dist/assets/js/tokens.mjs +3 -0
- package/dist/assets/js/tokens.mjs.map +1 -0
- package/dist/components/Alert.d.mts +28 -0
- package/dist/components/Alert.d.mts.map +1 -0
- package/dist/components/Alert.d.ts +28 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/components/Alert.js +4 -0
- package/dist/components/Alert.js.map +1 -0
- package/dist/components/Alert.mjs +4 -0
- package/dist/components/Alert.mjs.map +1 -0
- package/dist/components/AlertDialog.d.mts +38 -0
- package/dist/components/AlertDialog.d.mts.map +1 -0
- package/dist/components/AlertDialog.d.ts +38 -0
- package/dist/components/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog.js +4 -0
- package/dist/components/AlertDialog.js.map +1 -0
- package/dist/components/AlertDialog.mjs +4 -0
- package/dist/components/AlertDialog.mjs.map +1 -0
- package/dist/components/Autocomplete.d.mts +57 -0
- package/dist/components/Autocomplete.d.mts.map +1 -0
- package/dist/components/Autocomplete.d.ts +57 -0
- package/dist/components/Autocomplete.d.ts.map +1 -0
- package/dist/components/Autocomplete.js +4 -0
- package/dist/components/Autocomplete.js.map +1 -0
- package/dist/components/Autocomplete.mjs +4 -0
- package/dist/components/Autocomplete.mjs.map +1 -0
- package/dist/components/Avatar.d.mts +18 -0
- package/dist/components/Avatar.d.mts.map +1 -0
- package/dist/components/Avatar.d.ts +18 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +4 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Avatar.mjs +4 -0
- package/dist/components/Avatar.mjs.map +1 -0
- package/dist/components/Badge.d.mts +16 -0
- package/dist/components/Badge.d.mts.map +1 -0
- package/dist/components/Badge.d.ts +16 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Badge.js +4 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Badge.mjs +4 -0
- package/dist/components/Badge.mjs.map +1 -0
- package/dist/components/Breadcrumb.d.mts +17 -0
- package/dist/components/Breadcrumb.d.mts.map +1 -0
- package/dist/components/Breadcrumb.d.ts +17 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb.js +3 -0
- package/dist/components/Breadcrumb.js.map +1 -0
- package/dist/components/Breadcrumb.mjs +3 -0
- package/dist/components/Breadcrumb.mjs.map +1 -0
- package/dist/components/Button.d.mts +19 -0
- package/dist/components/Button.d.mts.map +1 -0
- package/dist/components/Button.d.ts +19 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +4 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Button.mjs +4 -0
- package/dist/components/Button.mjs.map +1 -0
- package/dist/components/CardContinue.d.mts +20 -0
- package/dist/components/CardContinue.d.mts.map +1 -0
- package/dist/components/CardContinue.d.ts +20 -0
- package/dist/components/CardContinue.d.ts.map +1 -0
- package/dist/components/CardContinue.js +4 -0
- package/dist/components/CardContinue.js.map +1 -0
- package/dist/components/CardContinue.mjs +4 -0
- package/dist/components/CardContinue.mjs.map +1 -0
- package/dist/components/CardLesson.d.mts +45 -0
- package/dist/components/CardLesson.d.mts.map +1 -0
- package/dist/components/CardLesson.d.ts +45 -0
- package/dist/components/CardLesson.d.ts.map +1 -0
- package/dist/components/CardLesson.js +4 -0
- package/dist/components/CardLesson.js.map +1 -0
- package/dist/components/CardLesson.mjs +4 -0
- package/dist/components/CardLesson.mjs.map +1 -0
- package/dist/components/CardModule.d.mts +33 -0
- package/dist/components/CardModule.d.mts.map +1 -0
- package/dist/components/CardModule.d.ts +33 -0
- package/dist/components/CardModule.d.ts.map +1 -0
- package/dist/components/CardModule.js +4 -0
- package/dist/components/CardModule.js.map +1 -0
- package/dist/components/CardModule.mjs +4 -0
- package/dist/components/CardModule.mjs.map +1 -0
- package/dist/components/CardNews.d.mts +42 -0
- package/dist/components/CardNews.d.mts.map +1 -0
- package/dist/components/CardNews.d.ts +42 -0
- package/dist/components/CardNews.d.ts.map +1 -0
- package/dist/components/CardNews.js +4 -0
- package/dist/components/CardNews.js.map +1 -0
- package/dist/components/CardNews.mjs +4 -0
- package/dist/components/CardNews.mjs.map +1 -0
- package/dist/components/CardTopic.d.mts +27 -0
- package/dist/components/CardTopic.d.mts.map +1 -0
- package/dist/components/CardTopic.d.ts +27 -0
- package/dist/components/CardTopic.d.ts.map +1 -0
- package/dist/components/CardTopic.js +4 -0
- package/dist/components/CardTopic.js.map +1 -0
- package/dist/components/CardTopic.mjs +4 -0
- package/dist/components/CardTopic.mjs.map +1 -0
- package/dist/components/CardWeek.d.mts +32 -0
- package/dist/components/CardWeek.d.mts.map +1 -0
- package/dist/components/CardWeek.d.ts +32 -0
- package/dist/components/CardWeek.d.ts.map +1 -0
- package/dist/components/CardWeek.js +4 -0
- package/dist/components/CardWeek.js.map +1 -0
- package/dist/components/CardWeek.mjs +4 -0
- package/dist/components/CardWeek.mjs.map +1 -0
- package/dist/components/Checkbox.d.mts +14 -0
- package/dist/components/Checkbox.d.mts.map +1 -0
- package/dist/components/Checkbox.d.ts +14 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +4 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/Checkbox.mjs +4 -0
- package/dist/components/Checkbox.mjs.map +1 -0
- package/dist/components/Collapsible.d.mts +15 -0
- package/dist/components/Collapsible.d.mts.map +1 -0
- package/dist/components/Collapsible.d.ts +15 -0
- package/dist/components/Collapsible.d.ts.map +1 -0
- package/dist/components/Collapsible.js +4 -0
- package/dist/components/Collapsible.js.map +1 -0
- package/dist/components/Collapsible.mjs +4 -0
- package/dist/components/Collapsible.mjs.map +1 -0
- package/dist/components/Command.d.mts +17 -0
- package/dist/components/Command.d.mts.map +1 -0
- package/dist/components/Command.d.ts +17 -0
- package/dist/components/Command.d.ts.map +1 -0
- package/dist/components/Command.js +4 -0
- package/dist/components/Command.js.map +1 -0
- package/dist/components/Command.mjs +4 -0
- package/dist/components/Command.mjs.map +1 -0
- package/dist/components/DatePicker.d.mts +57 -0
- package/dist/components/DatePicker.d.mts.map +1 -0
- package/dist/components/DatePicker.d.ts +57 -0
- package/dist/components/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker.js +4 -0
- package/dist/components/DatePicker.js.map +1 -0
- package/dist/components/DatePicker.mjs +4 -0
- package/dist/components/DatePicker.mjs.map +1 -0
- package/dist/components/Dialog.d.mts +34 -0
- package/dist/components/Dialog.d.mts.map +1 -0
- package/dist/components/Dialog.d.ts +34 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog.js +4 -0
- package/dist/components/Dialog.js.map +1 -0
- package/dist/components/Dialog.mjs +4 -0
- package/dist/components/Dialog.mjs.map +1 -0
- package/dist/components/DropdownMenu.d.mts +28 -0
- package/dist/components/DropdownMenu.d.mts.map +1 -0
- package/dist/components/DropdownMenu.d.ts +28 -0
- package/dist/components/DropdownMenu.d.ts.map +1 -0
- package/dist/components/DropdownMenu.js +4 -0
- package/dist/components/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenu.mjs +4 -0
- package/dist/components/DropdownMenu.mjs.map +1 -0
- package/dist/components/FallbackImage.d.mts +8 -0
- package/dist/components/FallbackImage.d.mts.map +1 -0
- package/dist/components/FallbackImage.d.ts +8 -0
- package/dist/components/FallbackImage.d.ts.map +1 -0
- package/dist/components/FallbackImage.js +4 -0
- package/dist/components/FallbackImage.js.map +1 -0
- package/dist/components/FallbackImage.mjs +4 -0
- package/dist/components/FallbackImage.mjs.map +1 -0
- package/dist/components/IndexLevel.d.mts +47 -0
- package/dist/components/IndexLevel.d.mts.map +1 -0
- package/dist/components/IndexLevel.d.ts +47 -0
- package/dist/components/IndexLevel.d.ts.map +1 -0
- package/dist/components/IndexLevel.js +4 -0
- package/dist/components/IndexLevel.js.map +1 -0
- package/dist/components/IndexLevel.mjs +4 -0
- package/dist/components/IndexLevel.mjs.map +1 -0
- package/dist/components/IndexLevelAnimated.d.mts +34 -0
- package/dist/components/IndexLevelAnimated.d.mts.map +1 -0
- package/dist/components/IndexLevelAnimated.d.ts +34 -0
- package/dist/components/IndexLevelAnimated.d.ts.map +1 -0
- package/dist/components/IndexLevelAnimated.js +4 -0
- package/dist/components/IndexLevelAnimated.js.map +1 -0
- package/dist/components/IndexLevelAnimated.mjs +4 -0
- package/dist/components/IndexLevelAnimated.mjs.map +1 -0
- package/dist/components/Input.d.mts +39 -0
- package/dist/components/Input.d.mts.map +1 -0
- package/dist/components/Input.d.ts +39 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Input.js +4 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Input.mjs +4 -0
- package/dist/components/Input.mjs.map +1 -0
- package/dist/components/Label.d.mts +14 -0
- package/dist/components/Label.d.mts.map +1 -0
- package/dist/components/Label.d.ts +14 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Label.js +4 -0
- package/dist/components/Label.js.map +1 -0
- package/dist/components/Label.mjs +4 -0
- package/dist/components/Label.mjs.map +1 -0
- package/dist/components/Loading.d.mts +8 -0
- package/dist/components/Loading.d.mts.map +1 -0
- package/dist/components/Loading.d.ts +8 -0
- package/dist/components/Loading.d.ts.map +1 -0
- package/dist/components/Loading.js +4 -0
- package/dist/components/Loading.js.map +1 -0
- package/dist/components/Loading.mjs +4 -0
- package/dist/components/Loading.mjs.map +1 -0
- package/dist/components/Logo.d.mts +11 -0
- package/dist/components/Logo.d.mts.map +1 -0
- package/dist/components/Logo.d.ts +11 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/Logo.js +4 -0
- package/dist/components/Logo.js.map +1 -0
- package/dist/components/Logo.mjs +4 -0
- package/dist/components/Logo.mjs.map +1 -0
- package/dist/components/NoteEditor.d.mts +119 -0
- package/dist/components/NoteEditor.d.mts.map +1 -0
- package/dist/components/NoteEditor.d.ts +119 -0
- package/dist/components/NoteEditor.d.ts.map +1 -0
- package/dist/components/NoteEditor.js +4 -0
- package/dist/components/NoteEditor.js.map +1 -0
- package/dist/components/NoteEditor.mjs +4 -0
- package/dist/components/NoteEditor.mjs.map +1 -0
- package/dist/components/Pagination.d.mts +43 -0
- package/dist/components/Pagination.d.mts.map +1 -0
- package/dist/components/Pagination.d.ts +43 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +4 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Pagination.mjs +4 -0
- package/dist/components/Pagination.mjs.map +1 -0
- package/dist/components/Popover.d.mts +10 -0
- package/dist/components/Popover.d.mts.map +1 -0
- package/dist/components/Popover.d.ts +10 -0
- package/dist/components/Popover.d.ts.map +1 -0
- package/dist/components/Popover.js +4 -0
- package/dist/components/Popover.js.map +1 -0
- package/dist/components/Popover.mjs +4 -0
- package/dist/components/Popover.mjs.map +1 -0
- package/dist/components/Progress.d.mts +9 -0
- package/dist/components/Progress.d.mts.map +1 -0
- package/dist/components/Progress.d.ts +9 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/components/Progress.js +4 -0
- package/dist/components/Progress.js.map +1 -0
- package/dist/components/Progress.mjs +4 -0
- package/dist/components/Progress.mjs.map +1 -0
- package/dist/components/ProgressCircle.d.mts +14 -0
- package/dist/components/ProgressCircle.d.mts.map +1 -0
- package/dist/components/ProgressCircle.d.ts +14 -0
- package/dist/components/ProgressCircle.d.ts.map +1 -0
- package/dist/components/ProgressCircle.js +4 -0
- package/dist/components/ProgressCircle.js.map +1 -0
- package/dist/components/ProgressCircle.mjs +4 -0
- package/dist/components/ProgressCircle.mjs.map +1 -0
- package/dist/components/RadioGroup.d.mts +14 -0
- package/dist/components/RadioGroup.d.mts.map +1 -0
- package/dist/components/RadioGroup.d.ts +14 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup.js +4 -0
- package/dist/components/RadioGroup.js.map +1 -0
- package/dist/components/RadioGroup.mjs +4 -0
- package/dist/components/RadioGroup.mjs.map +1 -0
- package/dist/components/Ranking.d.mts +95 -0
- package/dist/components/Ranking.d.mts.map +1 -0
- package/dist/components/Ranking.d.ts +95 -0
- package/dist/components/Ranking.d.ts.map +1 -0
- package/dist/components/Ranking.js +4 -0
- package/dist/components/Ranking.js.map +1 -0
- package/dist/components/Ranking.mjs +4 -0
- package/dist/components/Ranking.mjs.map +1 -0
- package/dist/components/Rating.d.mts +27 -0
- package/dist/components/Rating.d.mts.map +1 -0
- package/dist/components/Rating.d.ts +27 -0
- package/dist/components/Rating.d.ts.map +1 -0
- package/dist/components/Rating.js +4 -0
- package/dist/components/Rating.js.map +1 -0
- package/dist/components/Rating.mjs +4 -0
- package/dist/components/Rating.mjs.map +1 -0
- package/dist/components/ScrollArea.d.mts +6 -0
- package/dist/components/ScrollArea.d.mts.map +1 -0
- package/dist/components/ScrollArea.d.ts +6 -0
- package/dist/components/ScrollArea.d.ts.map +1 -0
- package/dist/components/ScrollArea.js +4 -0
- package/dist/components/ScrollArea.js.map +1 -0
- package/dist/components/ScrollArea.mjs +4 -0
- package/dist/components/ScrollArea.mjs.map +1 -0
- package/dist/components/SegmentControl.d.mts +27 -0
- package/dist/components/SegmentControl.d.mts.map +1 -0
- package/dist/components/SegmentControl.d.ts +27 -0
- package/dist/components/SegmentControl.d.ts.map +1 -0
- package/dist/components/SegmentControl.js +4 -0
- package/dist/components/SegmentControl.js.map +1 -0
- package/dist/components/SegmentControl.mjs +4 -0
- package/dist/components/SegmentControl.mjs.map +1 -0
- package/dist/components/Select.d.mts +32 -0
- package/dist/components/Select.d.mts.map +1 -0
- package/dist/components/Select.d.ts +32 -0
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/components/Select.js +4 -0
- package/dist/components/Select.js.map +1 -0
- package/dist/components/Select.mjs +4 -0
- package/dist/components/Select.mjs.map +1 -0
- package/dist/components/Separator.d.mts +5 -0
- package/dist/components/Separator.d.mts.map +1 -0
- package/dist/components/Separator.d.ts +5 -0
- package/dist/components/Separator.d.ts.map +1 -0
- package/dist/components/Separator.js +4 -0
- package/dist/components/Separator.js.map +1 -0
- package/dist/components/Separator.mjs +4 -0
- package/dist/components/Separator.mjs.map +1 -0
- package/dist/components/Sheet.d.mts +16 -0
- package/dist/components/Sheet.d.mts.map +1 -0
- package/dist/components/Sheet.d.ts +16 -0
- package/dist/components/Sheet.d.ts.map +1 -0
- package/dist/components/Sheet.js +4 -0
- package/dist/components/Sheet.js.map +1 -0
- package/dist/components/Sheet.mjs +4 -0
- package/dist/components/Sheet.mjs.map +1 -0
- package/dist/components/Sidebar.d.mts +87 -0
- package/dist/components/Sidebar.d.mts.map +1 -0
- package/dist/components/Sidebar.d.ts +87 -0
- package/dist/components/Sidebar.d.ts.map +1 -0
- package/dist/components/Sidebar.js +4 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/components/Sidebar.mjs +4 -0
- package/dist/components/Sidebar.mjs.map +1 -0
- package/dist/components/Skeleton.d.mts +4 -0
- package/dist/components/Skeleton.d.mts.map +1 -0
- package/dist/components/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton.js +4 -0
- package/dist/components/Skeleton.js.map +1 -0
- package/dist/components/Skeleton.mjs +4 -0
- package/dist/components/Skeleton.mjs.map +1 -0
- package/dist/components/Switch.d.mts +15 -0
- package/dist/components/Switch.d.mts.map +1 -0
- package/dist/components/Switch.d.ts +15 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Switch.js +4 -0
- package/dist/components/Switch.js.map +1 -0
- package/dist/components/Switch.mjs +4 -0
- package/dist/components/Switch.mjs.map +1 -0
- package/dist/components/Switcher.d.mts +55 -0
- package/dist/components/Switcher.d.mts.map +1 -0
- package/dist/components/Switcher.d.ts +55 -0
- package/dist/components/Switcher.d.ts.map +1 -0
- package/dist/components/Switcher.js +4 -0
- package/dist/components/Switcher.js.map +1 -0
- package/dist/components/Switcher.mjs +4 -0
- package/dist/components/Switcher.mjs.map +1 -0
- package/dist/components/Tabs.d.mts +39 -0
- package/dist/components/Tabs.d.mts.map +1 -0
- package/dist/components/Tabs.d.ts +39 -0
- package/dist/components/Tabs.d.ts.map +1 -0
- package/dist/components/Tabs.js +4 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/Tabs.mjs +4 -0
- package/dist/components/Tabs.mjs.map +1 -0
- package/dist/components/Tag.d.mts +13 -0
- package/dist/components/Tag.d.mts.map +1 -0
- package/dist/components/Tag.d.ts +13 -0
- package/dist/components/Tag.d.ts.map +1 -0
- package/dist/components/Tag.js +4 -0
- package/dist/components/Tag.js.map +1 -0
- package/dist/components/Tag.mjs +4 -0
- package/dist/components/Tag.mjs.map +1 -0
- package/dist/components/Tile.d.mts +19 -0
- package/dist/components/Tile.d.mts.map +1 -0
- package/dist/components/Tile.d.ts +19 -0
- package/dist/components/Tile.d.ts.map +1 -0
- package/dist/components/Tile.js +4 -0
- package/dist/components/Tile.js.map +1 -0
- package/dist/components/Tile.mjs +4 -0
- package/dist/components/Tile.mjs.map +1 -0
- package/dist/components/Toast.d.mts +29 -0
- package/dist/components/Toast.d.mts.map +1 -0
- package/dist/components/Toast.d.ts +29 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/Toast.js +4 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/components/Toast.mjs +4 -0
- package/dist/components/Toast.mjs.map +1 -0
- package/dist/components/Tooltip.d.mts +8 -0
- package/dist/components/Tooltip.d.mts.map +1 -0
- package/dist/components/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip.js +4 -0
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/Tooltip.mjs +4 -0
- package/dist/components/Tooltip.mjs.map +1 -0
- package/dist/hooks/use-id.d.mts +2 -0
- package/dist/hooks/use-id.d.mts.map +1 -0
- package/dist/hooks/use-id.d.ts +2 -0
- package/dist/hooks/use-id.d.ts.map +1 -0
- package/dist/hooks/use-id.js +3 -0
- package/dist/hooks/use-id.js.map +1 -0
- package/dist/hooks/use-id.mjs +3 -0
- package/dist/hooks/use-id.mjs.map +1 -0
- package/dist/hooks/use-mobile.d.mts +2 -0
- package/dist/hooks/use-mobile.d.mts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +3 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-mobile.mjs +3 -0
- package/dist/hooks/use-mobile.mjs.map +1 -0
- package/dist/hooks/use-toast.d.mts +45 -0
- package/dist/hooks/use-toast.d.mts.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +4 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/hooks/use-toast.mjs +4 -0
- package/dist/hooks/use-toast.mjs.map +1 -0
- package/dist/index.d.mts +88 -1153
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +88 -1153
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -16
- package/dist/index.mjs.map +1 -1
- package/dist/lib/cmdk.d.mts +124 -0
- package/dist/lib/cmdk.d.mts.map +1 -0
- package/dist/lib/cmdk.d.ts +124 -0
- package/dist/lib/cmdk.d.ts.map +1 -0
- package/dist/lib/cmdk.js +4 -0
- package/dist/lib/cmdk.js.map +1 -0
- package/dist/lib/cmdk.mjs +4 -0
- package/dist/lib/cmdk.mjs.map +1 -0
- package/dist/lib/command-score.d.mts +2 -0
- package/dist/lib/command-score.d.mts.map +1 -0
- package/dist/lib/command-score.d.ts +2 -0
- package/dist/lib/command-score.d.ts.map +1 -0
- package/dist/lib/command-score.js +3 -0
- package/dist/lib/command-score.js.map +1 -0
- package/dist/lib/command-score.mjs +3 -0
- package/dist/lib/command-score.mjs.map +1 -0
- package/dist/lib/utils.d.mts +3 -0
- package/dist/lib/utils.d.mts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +3 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +3 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.mjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.mjs +7 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.mjs.map +1 -0
- package/dist/note-editor.d.mts +13 -0
- package/dist/note-editor.d.mts.map +1 -0
- package/dist/note-editor.d.ts +13 -0
- package/dist/note-editor.d.ts.map +1 -0
- package/dist/note-editor.js +3 -0
- package/dist/note-editor.js.map +1 -0
- package/dist/note-editor.mjs +3 -0
- package/dist/note-editor.mjs.map +1 -0
- package/package.json +67 -5
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
3
|
+
type AnimationType = "accordion" | "fade";
|
|
4
|
+
interface CollapsibleContentProps extends ComponentProps<typeof CollapsiblePrimitive.Content> {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
interface CollapsibleProps extends ComponentProps<typeof CollapsiblePrimitive.Root> {
|
|
8
|
+
animation?: AnimationType;
|
|
9
|
+
}
|
|
10
|
+
declare function Collapsible({ animation, ...props }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CollapsibleTrigger({ ...props }: ComponentProps<typeof CollapsiblePrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CollapsibleContent({ className, ...props }: CollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
14
|
+
export type { AnimationType, CollapsibleProps, CollapsibleContentProps };
|
|
15
|
+
//# sourceMappingURL=Collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.d.ts","sourceRoot":"","sources":["../../src/components/Collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAG/D,KAAK,aAAa,GAAG,WAAW,GAAG,MAAM,CAAC;AAM1C,UAAU,uBACR,SAAQ,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD,UAAU,gBACR,SAAQ,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC;IACxD,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAM7D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAIrD;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,2CAgB3E;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
"use strict";var l=require("react/jsx-runtime"),n=require("react"),o=require("radix-ui"),m=require("../lib/utils.js"),x=Object.defineProperty,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,v=(e,a,r)=>a in e?x(e,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[a]=r,s=(e,a)=>{for(var r in a||(a={}))d.call(a,r)&&v(e,r,a[r]);if(i)for(var r of i(a))p.call(a,r)&&v(e,r,a[r]);return e},c=(e,a)=>{var r={};for(var t in e)d.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&i)for(var t of i(e))a.indexOf(t)<0&&p.call(e,t)&&(r[t]=e[t]);return r};const b=n.createContext({animation:void 0});function C(e){var a=e,{animation:r}=a,t=c(a,["animation"]);return l.jsx(b.Provider,{value:n.useMemo(()=>({animation:r}),[r]),children:l.jsx(o.Collapsible.Root,s({"data-slot":"collapsible"},t))})}function j(e){var a=c(e,[]);return l.jsx(o.Collapsible.Trigger,s({"data-slot":"collapsible-trigger"},a))}function g(e){var a=e,{className:r}=a,t=c(a,["className"]);const{animation:u}=n.useContext(b),f={accordion:"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",fade:"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"};return l.jsx(o.Collapsible.Content,s({"data-slot":"collapsible-content",className:m.cn(u&&f[u],r)},t))}exports.Collapsible=C,exports.CollapsibleContent=g,exports.CollapsibleTrigger=j;
|
|
4
|
+
//# sourceMappingURL=Collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
import{jsx as o}from"react/jsx-runtime";import{createContext as b,useMemo as v,useContext as C}from"react";import{Collapsible as l}from"radix-ui";import{cn as g}from"../lib/utils.mjs";var O=Object.defineProperty,n=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,f=(t,a,e)=>a in t?O(t,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[a]=e,i=(t,a)=>{for(var e in a||(a={}))p.call(a,e)&&f(t,e,a[e]);if(n)for(var e of n(a))m.call(a,e)&&f(t,e,a[e]);return t},s=(t,a)=>{var e={};for(var r in t)p.call(t,r)&&a.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&n)for(var r of n(t))a.indexOf(r)<0&&m.call(t,r)&&(e[r]=t[r]);return e};const d=b({animation:void 0});function x(t){var a=t,{animation:e}=a,r=s(a,["animation"]);return o(d.Provider,{value:v(()=>({animation:e}),[e]),children:o(l.Root,i({"data-slot":"collapsible"},r))})}function y(t){var a=s(t,[]);return o(l.Trigger,i({"data-slot":"collapsible-trigger"},a))}function j(t){var a=t,{className:e}=a,r=s(a,["className"]);const{animation:c}=C(d),u={accordion:"overflow-hidden data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",fade:"data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in"};return o(l.Content,i({"data-slot":"collapsible-content",className:g(c&&u[c],e)},r))}export{x as Collapsible,j as CollapsibleContent,y as CollapsibleTrigger};
|
|
4
|
+
//# sourceMappingURL=Collapsible.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Collapsible.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from "../lib/cmdk.mjs";
|
|
2
|
+
import { Dialog } from "./Dialog.mjs";
|
|
3
|
+
import { type ComponentProps } from "react";
|
|
4
|
+
declare function Command({ className, ...props }: ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, ...props }: ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function CommandInput({ className, ...props }: ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function CommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CommandEmpty({ ...props }: ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CommandGroup({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandItem({ className, ...props }: ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function CommandShortcut({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
|
|
17
|
+
//# sourceMappingURL=Command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../src/components/Command.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EACL,MAAM,EAKP,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAWzC;AAED,iBAAS,aAAa,CAAC,EACrB,KAAyB,EACzB,WAA8C,EAC9C,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,2CAcA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAiB/C;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAY9C;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAQ/C;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAW/C;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,2CAQnD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAW9C;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,MAAM,CAAC,2CAWvE;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from "../lib/cmdk.js";
|
|
2
|
+
import { Dialog } from "./Dialog.js";
|
|
3
|
+
import { type ComponentProps } from "react";
|
|
4
|
+
declare function Command({ className, ...props }: ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, ...props }: ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function CommandInput({ className, ...props }: ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function CommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CommandEmpty({ ...props }: ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CommandGroup({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandItem({ className, ...props }: ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function CommandShortcut({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
|
|
17
|
+
//# sourceMappingURL=Command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["../../src/components/Command.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EACL,MAAM,EAKP,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAWzC;AAED,iBAAS,aAAa,CAAC,EACrB,KAAyB,EACzB,WAA8C,EAC9C,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,2CAcA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAiB/C;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAY9C;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAQ/C;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAW/C;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,2CAQnD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAW9C;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,MAAM,CAAC,2CAWvE;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
"use strict";var n=require("react/jsx-runtime"),o=require("../lib/cmdk.js"),p=require("@medway-ui/icons"),d=require("../lib/utils.js");require("radix-ui"),require("react");var f=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,i=(a,e,r)=>e in a?f(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,m=(a,e)=>{for(var r in e||(e={}))c.call(e,r)&&i(a,r,e[r]);if(l)for(var r of l(e))u.call(e,r)&&i(a,r,e[r]);return a},s=(a,e)=>{var r={};for(var t in a)c.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&l)for(var t of l(a))e.indexOf(t)<0&&u.call(a,t)&&(r[t]=a[t]);return r};function x(a){var e=a,{className:r}=e,t=s(e,["className"]);return n.jsx(o.Command,m({className:d.cn("flex size-full flex-col overflow-hidden rounded-md bg-surface-card text-gray-foreground",r),"data-slot":"command"},t))}function g(a){var e=a,{className:r}=e,t=s(e,["className"]);return n.jsxs("div",{className:"flex items-center border-b border-gray-stroke-muted px-4","cmdk-input-wrapper":"",children:[n.jsx(o.Command.Input,m({className:d.cn("flex h-12 w-full bg-transparent py-3 text-md font-medium outline-none placeholder:text-gray-foreground-muted disabled:cursor-not-allowed disabled:opacity-50",r),"data-slot":"command-input-wrapper"},t)),n.jsx(p.SearchMagnifyingGlass,{className:"text-gray-foreground-muted",size:24})]})}function v(a){var e=a,{className:r}=e,t=s(e,["className"]);return n.jsx(o.Command.List,m({className:d.cn("max-h-80 flex-1 overflow-y-auto overflow-x-hidden",r),"data-slot":"command-list","data-radix-scroll-area":""},t))}function y(a){var e=s(a,[]);return n.jsx(o.Command.Empty,m({className:"py-6 text-center text-sm","data-slot":"command-empty"},e))}function b(a){var e=a,{className:r}=e,t=s(e,["className"]);return n.jsx(o.Command.Group,m({className:d.cn("overflow-hidden p-2 text-gray-foreground [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-foreground-muted",r),"data-slot":"command-group"},t))}function N(a){var e=a,{className:r}=e,t=s(e,["className"]);return n.jsx(o.Command.Item,m({className:d.cn("outline-hidden relative flex cursor-default select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",r),"data-slot":"command-item"},t))}exports.Command=x,exports.CommandEmpty=y,exports.CommandGroup=b,exports.CommandInput=g,exports.CommandItem=N,exports.CommandList=v;
|
|
4
|
+
//# sourceMappingURL=Command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
import{jsx as o,jsxs as p}from"react/jsx-runtime";import{Command as n}from"../lib/cmdk.mjs";import{SearchMagnifyingGlass as f}from"@medway-ui/icons";import{cn as d}from"../lib/utils.mjs";import"radix-ui";import"react";var g=Object.defineProperty,l=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,u=(a,e,r)=>e in a?g(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,m=(a,e)=>{for(var r in e||(e={}))c.call(e,r)&&u(a,r,e[r]);if(l)for(var r of l(e))i.call(e,r)&&u(a,r,e[r]);return a},s=(a,e)=>{var r={};for(var t in a)c.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&l)for(var t of l(a))e.indexOf(t)<0&&i.call(a,t)&&(r[t]=a[t]);return r};function x(a){var e=a,{className:r}=e,t=s(e,["className"]);return o(n,m({className:d("flex size-full flex-col overflow-hidden rounded-md bg-surface-card text-gray-foreground",r),"data-slot":"command"},t))}function v(a){var e=a,{className:r}=e,t=s(e,["className"]);return p("div",{className:"flex items-center border-b border-gray-stroke-muted px-4","cmdk-input-wrapper":"",children:[o(n.Input,m({className:d("flex h-12 w-full bg-transparent py-3 text-md font-medium outline-none placeholder:text-gray-foreground-muted disabled:cursor-not-allowed disabled:opacity-50",r),"data-slot":"command-input-wrapper"},t)),o(f,{className:"text-gray-foreground-muted",size:24})]})}function y(a){var e=a,{className:r}=e,t=s(e,["className"]);return o(n.List,m({className:d("max-h-80 flex-1 overflow-y-auto overflow-x-hidden",r),"data-slot":"command-list","data-radix-scroll-area":""},t))}function b(a){var e=s(a,[]);return o(n.Empty,m({className:"py-6 text-center text-sm","data-slot":"command-empty"},e))}function N(a){var e=a,{className:r}=e,t=s(e,["className"]);return o(n.Group,m({className:d("overflow-hidden p-2 text-gray-foreground [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-foreground-muted",r),"data-slot":"command-group"},t))}function h(a){var e=a,{className:r}=e,t=s(e,["className"]);return o(n.Item,m({className:d("outline-hidden relative flex cursor-default select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",r),"data-slot":"command-item"},t))}export{x as Command,b as CommandEmpty,N as CommandGroup,v as CommandInput,h as CommandItem,y as CommandList};
|
|
4
|
+
//# sourceMappingURL=Command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type ComponentPropsWithoutRef, type HTMLAttributes } from "react";
|
|
3
|
+
declare const datePickerTriggerVariants: (props?: ({
|
|
4
|
+
size?: "md" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
type DatePickerValue = Date | null;
|
|
7
|
+
type DateRangeValue = {
|
|
8
|
+
start: Date | null;
|
|
9
|
+
end: Date | null;
|
|
10
|
+
} | null;
|
|
11
|
+
interface DatePickerLabelProps extends HTMLAttributes<HTMLLabelElement> {
|
|
12
|
+
htmlFor?: string;
|
|
13
|
+
}
|
|
14
|
+
interface DatePickerProps extends Omit<ComponentPropsWithoutRef<"button">, "value" | "defaultValue" | "onChange">, VariantProps<typeof datePickerTriggerVariants> {
|
|
15
|
+
value?: DatePickerValue;
|
|
16
|
+
defaultValue?: DatePickerValue;
|
|
17
|
+
onValueChange?: (value: DatePickerValue) => void;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
min?: Date;
|
|
21
|
+
max?: Date;
|
|
22
|
+
format?: (date: Date) => string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
contentClassName?: string;
|
|
25
|
+
yearRange?: {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
};
|
|
29
|
+
showYearSelector?: boolean;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface DateRangePickerProps extends Omit<ComponentPropsWithoutRef<"button">, "value" | "defaultValue" | "onChange">, VariantProps<typeof datePickerTriggerVariants> {
|
|
33
|
+
value?: DateRangeValue;
|
|
34
|
+
defaultValue?: DateRangeValue;
|
|
35
|
+
onValueChange?: (value: DateRangeValue) => void;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
min?: Date;
|
|
39
|
+
max?: Date;
|
|
40
|
+
format?: (date: Date) => string;
|
|
41
|
+
inputClassName?: string;
|
|
42
|
+
contentClassName?: string;
|
|
43
|
+
yearRange?: {
|
|
44
|
+
start: number;
|
|
45
|
+
end: number;
|
|
46
|
+
};
|
|
47
|
+
showYearSelector?: boolean;
|
|
48
|
+
invalid?: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare function DatePickerWrapper({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function DatePickerLabel({ className, children, ...props }: DatePickerLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
declare function DatePickerText({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, min, max, format, className, inputClassName, contentClassName, size, yearRange, showYearSelector, invalid, children, ...props }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function DateRangePicker({ value, defaultValue, onValueChange, placeholder, disabled, min, max, format, className, inputClassName, contentClassName, size, yearRange, showYearSelector, invalid, children, ...props }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export { DatePicker, DatePickerLabel, DatePickerText, DatePickerWrapper, DateRangePicker, datePickerTriggerVariants, };
|
|
56
|
+
export type { DatePickerLabelProps, DatePickerProps, DatePickerValue, DateRangePickerProps, DateRangeValue, };
|
|
57
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/components/DatePicker.tsx"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAUL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAmBf,QAAA,MAAM,yBAAyB;;8EAgB9B,CAAC;AAEF,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnC,KAAK,cAAc,GAAG;IAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eACR,SAAQ,IAAI,CACR,wBAAwB,CAAC,QAAQ,CAAC,EAClC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,EACD,YAAY,CAAC,OAAO,yBAAyB,CAAC;IAChD,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAA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QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAetB;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,eAAe,CAAC,2CAcjC;AA6ID,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,YAAmB,EACnB,aAAa,EACb,WAA2B,EAC3B,QAAQ,EACR,GAAG,EACH,GAAG,EACH,MAAsB,EACtB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,IAAW,EACX,SAA8B,EAC9B,gBAAuB,EACvB,OAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CA4TjB;AAED,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,YAAmB,EACnB,aAAa,EACb,WAAkC,EAClC,QAAQ,EACR,GAAG,EACH,GAAG,EACH,MAAsB,EACtB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,IAAW,EACX,SAA8B,EAC9B,gBAAuB,EACvB,OAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,2CA6VtB;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,yBAAyB,GAC1B,CAAC;AACF,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { type ComponentPropsWithoutRef, type HTMLAttributes } from "react";
|
|
3
|
+
declare const datePickerTriggerVariants: (props?: ({
|
|
4
|
+
size?: "md" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
type DatePickerValue = Date | null;
|
|
7
|
+
type DateRangeValue = {
|
|
8
|
+
start: Date | null;
|
|
9
|
+
end: Date | null;
|
|
10
|
+
} | null;
|
|
11
|
+
interface DatePickerLabelProps extends HTMLAttributes<HTMLLabelElement> {
|
|
12
|
+
htmlFor?: string;
|
|
13
|
+
}
|
|
14
|
+
interface DatePickerProps extends Omit<ComponentPropsWithoutRef<"button">, "value" | "defaultValue" | "onChange">, VariantProps<typeof datePickerTriggerVariants> {
|
|
15
|
+
value?: DatePickerValue;
|
|
16
|
+
defaultValue?: DatePickerValue;
|
|
17
|
+
onValueChange?: (value: DatePickerValue) => void;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
min?: Date;
|
|
21
|
+
max?: Date;
|
|
22
|
+
format?: (date: Date) => string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
contentClassName?: string;
|
|
25
|
+
yearRange?: {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
};
|
|
29
|
+
showYearSelector?: boolean;
|
|
30
|
+
invalid?: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface DateRangePickerProps extends Omit<ComponentPropsWithoutRef<"button">, "value" | "defaultValue" | "onChange">, VariantProps<typeof datePickerTriggerVariants> {
|
|
33
|
+
value?: DateRangeValue;
|
|
34
|
+
defaultValue?: DateRangeValue;
|
|
35
|
+
onValueChange?: (value: DateRangeValue) => void;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
min?: Date;
|
|
39
|
+
max?: Date;
|
|
40
|
+
format?: (date: Date) => string;
|
|
41
|
+
inputClassName?: string;
|
|
42
|
+
contentClassName?: string;
|
|
43
|
+
yearRange?: {
|
|
44
|
+
start: number;
|
|
45
|
+
end: number;
|
|
46
|
+
};
|
|
47
|
+
showYearSelector?: boolean;
|
|
48
|
+
invalid?: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare function DatePickerWrapper({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function DatePickerLabel({ className, children, ...props }: DatePickerLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
declare function DatePickerText({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
declare function DatePicker({ value, defaultValue, onValueChange, placeholder, disabled, min, max, format, className, inputClassName, contentClassName, size, yearRange, showYearSelector, invalid, children, ...props }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function DateRangePicker({ value, defaultValue, onValueChange, placeholder, disabled, min, max, format, className, inputClassName, contentClassName, size, yearRange, showYearSelector, invalid, children, ...props }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export { DatePicker, DatePickerLabel, DatePickerText, DatePickerWrapper, DateRangePicker, datePickerTriggerVariants, };
|
|
56
|
+
export type { DatePickerLabelProps, DatePickerProps, DatePickerValue, DateRangePickerProps, DateRangeValue, };
|
|
57
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/components/DatePicker.tsx"],"names":[],"mappings":"AASA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAUL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEpB,MAAM,OAAO,CAAC;AAmBf,QAAA,MAAM,yBAAyB;;8EAgB9B,CAAC;AAEF,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnC,KAAK,cAAc,GAAG;IAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAAC;AAEtE,UAAU,oBAAqB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eACR,SAAQ,IAAI,CACR,wBAAwB,CAAC,QAAQ,CAAC,EAClC,OAAO,GAAG,cAAc,GAAG,UAAU,CACtC,EACD,Y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require("react/jsx-runtime"),w=require("../lib/utils.js"),N=require("@medway-ui/icons"),Re=require("class-variance-authority"),l=require("react"),xe=require("react-dom"),Le=Object.defineProperty,Me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,ve=(t,a,s)=>a in t?Le(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s,S=(t,a)=>{for(var s in a||(a={}))he.call(a,s)&&ve(t,s,a[s]);if(G)for(var s of G(a))fe.call(a,s)&&ve(t,s,a[s]);return t},T=(t,a)=>Me(t,Pe(a)),Q=(t,a)=>{var s={};for(var d in t)he.call(t,d)&&a.indexOf(d)<0&&(s[d]=t[d]);if(t!=null&&G)for(var d of G(t))a.indexOf(d)<0&&fe.call(t,d)&&(s[d]=t[d]);return s};const me=l.createContext({invalid:!1}),be={start:1950,end:new Date().getFullYear()};function J(t,a){const s=t.getFullYear();return s<a.start?new Date(a.start,0,1):s>a.end?new Date(a.end,11,31):t}const ge=Re.cva(["shadow-xs flex w-full items-center justify-between gap-2 rounded-md border-2 border-gray-stroke-muted bg-surface-card px-4 py-3 text-left text-gray-foreground outline-none transition-[color,box-shadow] enabled:hover:border-gray-stroke-emphasis enabled:hover:ring-[3px] enabled:hover:ring-state-focus disabled:pointer-events-none disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted data-[invalid]:border-feedback-error-stroke data-[invalid]:enabled:hover:border-feedback-error-stroke data-[invalid]:enabled:hover:ring-[3px] data-[invalid]:enabled:hover:ring-state-error","group-has-[[data-slot=date-picker-label]]:data-[placeholder]:text-transparent"],{variants:{size:{lg:["h-12 max-h-12 text-md","max-sm:h-14 max-sm:text-base"],md:["h-10 max-h-10 text-sm","max-sm:h-11"]}},defaultVariants:{size:"lg"}});function Ae(t){var a=t,{className:s}=a,d=Q(a,["className"]);return e.jsx("div",S({className:w.cn("group relative flex flex-col gap-2",s),"data-slot":"date-picker-wrapper"},d))}function Fe(t){var a=t,{className:s,children:d}=a,g=Q(a,["className","children"]);return e.jsx("label",T(S({className:w.cn("pointer-events-none absolute start-3 top-0 z-10 origin-left -translate-y-1/2 bg-surface-card px-1 text-xs font-medium text-gray-foreground transition-all duration-200 ease-out","group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:start-4 group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-6 group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:bg-transparent group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:px-0 group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:text-md group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:font-normal group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:text-gray-foreground max-sm:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-7","group-has-[[data-slot=date-picker-trigger][data-size=md]]:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-5 group-has-[[data-slot=date-picker-trigger][data-size=md]]:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:!text-sm max-sm:group-has-[[data-slot=date-picker-trigger][data-size=md]]:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-[22px]",s),"data-slot":"date-picker-label"},g),{children:d}))}function We(t){var a=t,{className:s}=a,d=Q(a,["className"]);const{invalid:g}=l.useContext(me);return e.jsx("span",S({className:w.cn("-mt-1 text-xs",g?"text-feedback-error-foreground":"text-gray-foreground",s),"data-slot":"date-picker-text"},d))}function O(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function $(t,a){return t.getFullYear()===a.getFullYear()&&t.getMonth()===a.getMonth()&&t.getDate()===a.getDate()}function U(t,a){return new Date(t.getFullYear(),t.getMonth()+a,1)}function K(t){return new Date(t.getFullYear(),t.getMonth(),1)}function pe(t,a){return O(t).getTime()<O(a).getTime()}function ye(t,a){return O(t).getTime()>O(a).getTime()}function _(t,a,s){return!!(a&&pe(t,a)||s&&ye(t,s))}function ke(t){return new Intl.DateTimeFormat("pt-BR",{year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}const we=20,je=18,Ne=8,Ce=8,Ye=290,Te=330;function Oe(t,a){const s=window.innerHeight-t.bottom<a,d=window.innerWidth,g=window.matchMedia("(max-width: 639px)").matches?Math.min(512,d-16):Math.min(320,d),C=Ce,c=d-g-Ce;let p=t.left;return p<C?p=C:p>c&&(p=c),T(S({position:"fixed"},s?{bottom:window.innerHeight-t.top+Ne}:{top:t.bottom+Ne}),{left:p,width:g,maxWidth:360})}function De({open:t,estimatedHeight:a,triggerRef:s,rootRef:d}){const[g,C]=l.useState(null),c=l.useRef(null),p=l.useCallback(()=>{var z,A,F;const W=(F=(z=s.current)==null?void 0:z.getBoundingClientRect())!=null?F:(A=d.current)==null?void 0:A.getBoundingClientRect();W&&C(Oe(W,a))},[a,d,s]),v=l.useCallback(()=>{c.current===null&&(c.current=window.requestAnimationFrame(()=>{c.current=null,p()}))},[p]);return l.useEffect(()=>{if(!t){C(null);return}return window.addEventListener("scroll",v,{passive:!0,capture:!0}),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",v,{capture:!0}),window.removeEventListener("resize",v),c.current!==null&&(window.cancelAnimationFrame(c.current),c.current=null)}},[t,v]),{style:g,updatePosition:p}}function Ve(t){var a=t,{value:s,defaultValue:d=null,onValueChange:g,placeholder:C="Pick a date",disabled:c,min:p,max:v,format:z=ke,className:A,inputClassName:F,contentClassName:W,size:R="lg",yearRange:x=be,showYearSelector:X=!0,invalid:b=!1,children:Z}=a,ee=Q(a,["value","defaultValue","onValueChange","placeholder","disabled","min","max","format","className","inputClassName","contentClassName","size","yearRange","showYearSelector","invalid","children"]);const L=s!==void 0,[te,ae]=l.useState(d),n=L?s:te,[u,h]=l.useState(!1),[V,y]=l.useState(()=>K(J(n!=null?n:new Date,x))),M=l.useRef(null),I=l.useRef(null),q=l.useRef(null),H=l.useId(),{style:B,updatePosition:re}=De({open:u,estimatedHeight:Ye,triggerRef:I,rootRef:M}),D=l.useCallback(o=>{L||ae(o),g==null||g(o)},[L,g]);l.useEffect(()=>{u&&y(K(J(n!=null?n:new Date,x)))},[u,n,x]),l.useEffect(()=>{if(!u)return;const o=i=>{const m=M.current,j=q.current;m&&i.target instanceof Node&&!m.contains(i.target)&&!(j!=null&&j.contains(i.target))&&h(!1)},r=i=>{i.key==="Escape"&&h(!1)};return window.addEventListener("pointerdown",o,{capture:!0}),window.addEventListener("keydown",r),()=>{window.removeEventListener("pointerdown",o,{capture:!0}),window.removeEventListener("keydown",r)}},[u]);const ne=()=>{if(u){h(!1);return}re(),h(!0)},E=O(new Date),f=V.getFullYear(),k=V.getMonth(),se=new Date(f,k,1),oe=new Date(f,k+1,0).getDate(),ie=se.getDay(),Y=n?z(n):"",le=Array.from({length:12},(o,r)=>({value:r,label:new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(new Date(2e3,r,1))})),de=Array.from({length:x.end-x.start+1},(o,r)=>x.start+r),ue=o=>{y(new Date(f,o,1))},ce=o=>{y(new Date(o,k,1))};return e.jsxs(me.Provider,{value:l.useMemo(()=>({invalid:b}),[b]),children:[e.jsxs("div",{ref:M,className:w.cn("relative inline-flex w-full",A),children:[e.jsxs("button",T(S(T(S({ref:I,type:"button",disabled:c,"aria-haspopup":"dialog","aria-expanded":u,"aria-controls":u?H:void 0,"data-invalid":b||void 0,"data-slot":"date-picker-trigger","data-size":R,"data-state":u?"open":"closed"},!Y&&{"data-placeholder":""}),{className:w.cn(ge({size:R}),u&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",Y&&!b&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",Y&&b&&"border-feedback-error-stroke ring-[3px] ring-state-error",F),onClick:ne}),ee),{children:[e.jsx("span",{className:"truncate",children:Y||C}),e.jsx(N.Calendar,{size:R==="md"?je:we,strokeWidth:1.6,className:"shrink-0 !text-gray-foreground","aria-hidden":"true"})]})),u&&xe.createPortal(e.jsxs("div",{ref:q,id:H,role:"dialog","aria-label":"Calend\xE1rio","data-slot":"date-picker-content",style:B!=null?B:void 0,className:w.cn("z-50 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated p-3 shadow-md",W),children:[e.jsxs("div",{className:"mb-3 flex items-center justify-center gap-2",children:[e.jsx("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(o=>U(o,-1)),"aria-label":"M\xEAs anterior",children:e.jsx(N.ChevronLeftMd,{size:18,strokeWidth:1.8})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:k,onChange:o=>ue(Number(o.target.value)),className:"min-w-[7rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium capitalize text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[8rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar m\xEAs",children:le.map(o=>e.jsx("option",{value:o.value,className:"capitalize",children:o.label},o.value))}),e.jsx(N.ChevronDown,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}),X?e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:f,onChange:o=>ce(Number(o.target.value)),className:"min-w-[5rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[5.5rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar ano",children:de.map(o=>e.jsx("option",{value:o,children:o},o))}),e.jsx(N.ChevronDown,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}):e.jsx("div",{className:"text-sm font-semibold text-gray-foreground",children:f})]}),e.jsx("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(o=>U(o,1)),"aria-label":"Pr\xF3ximo m\xEAs",children:e.jsx(N.ChevronRightMd,{size:18,strokeWidth:1.8})})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-gray-foreground-muted max-sm:text-sm",children:[e.jsx("div",{children:"Dom"}),e.jsx("div",{children:"Seg"}),e.jsx("div",{children:"Ter"}),e.jsx("div",{children:"Qua"}),e.jsx("div",{children:"Qui"}),e.jsx("div",{children:"Sex"}),e.jsx("div",{children:"S\xE1b"})]}),e.jsxs("div",{className:"mt-2 grid grid-cols-7 gap-1",children:[Array.from({length:ie}).map((o,r)=>e.jsx("div",{},`empty-${r}`)),Array.from({length:oe}).map((o,r)=>{const i=new Date(f,k,r+1),m=n?$(i,n):!1,j=$(i,E),P=c||_(i,p,v);return e.jsx("button",{type:"button",disabled:P,onClick:()=>{D(i),h(!1)},className:w.cn("inline-flex h-9 w-full items-center justify-center rounded-md text-sm font-medium outline-none transition-colors hover:bg-secondary-background-soft-emphasis disabled:pointer-events-none disabled:opacity-50 max-sm:h-11 max-sm:text-base",j&&"ring-1 ring-gray-stroke-emphasis",m&&"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis"),"aria-pressed":m,children:r+1},i.toISOString())})]}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[e.jsx("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis max-sm:px-3 max-sm:py-2 max-sm:text-sm",onClick:()=>{D(E),h(!1)},disabled:c||_(E,p,v),children:"Hoje"}),e.jsx("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis max-sm:px-3 max-sm:py-2 max-sm:text-sm",onClick:()=>D(null),disabled:c||!n,children:"Limpar"})]})]}),document.body)]}),Z]})}function Ie(t){var a=t,{value:s,defaultValue:d=null,onValueChange:g,placeholder:C="Selecionar per\xEDodo",disabled:c,min:p,max:v,format:z=ke,className:A,inputClassName:F,contentClassName:W,size:R="lg",yearRange:x=be,showYearSelector:X=!0,invalid:b=!1,children:Z}=a,ee=Q(a,["value","defaultValue","onValueChange","placeholder","disabled","min","max","format","className","inputClassName","contentClassName","size","yearRange","showYearSelector","invalid","children"]);const L=s!==void 0,[te,ae]=l.useState(d),n=L?s:te,[u,h]=l.useState(!1),[V,y]=l.useState(()=>{var r,i;return K(J((i=(r=n==null?void 0:n.start)!=null?r:n==null?void 0:n.end)!=null?i:new Date,x))}),M=l.useRef(null),I=l.useRef(null),q=l.useRef(null),H=l.useId(),{style:B,updatePosition:re}=De({open:u,estimatedHeight:Te,triggerRef:I,rootRef:M}),D=l.useCallback(r=>{L||ae(r),g==null||g(r)},[L,g]);l.useEffect(()=>{var r,i;u&&y(K(J((i=(r=n==null?void 0:n.start)!=null?r:n==null?void 0:n.end)!=null?i:new Date,x)))},[u,n,x]),l.useEffect(()=>{if(!u)return;const r=m=>{const j=M.current,P=q.current;j&&m.target instanceof Node&&!j.contains(m.target)&&!(P!=null&&P.contains(m.target))&&h(!1)},i=m=>{m.key==="Escape"&&h(!1)};return window.addEventListener("pointerdown",r,{capture:!0}),window.addEventListener("keydown",i),()=>{window.removeEventListener("pointerdown",r,{capture:!0}),window.removeEventListener("keydown",i)}},[u]);const ne=()=>{if(u){h(!1);return}re(),h(!0)},E=O(new Date),f=V.getFullYear(),k=V.getMonth(),se=new Date(f,k,1),oe=new Date(f,k+1,0).getDate(),ie=se.getDay(),Y=Array.from({length:12},(r,i)=>({value:i,label:new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(new Date(2e3,i,1))})),le=Array.from({length:x.end-x.start+1},(r,i)=>x.start+i),de=r=>{y(new Date(f,r,1))},ue=r=>{y(new Date(r,k,1))},ce=r=>{c||_(r,p,v)||(!n||!n.start||n.end?D({start:r,end:null}):(pe(r,n.start)?D({start:r,end:n.start}):D({start:n.start,end:r}),h(!1)))},o=n!=null&&n.start&&n!=null&&n.end?`${z(n.start)} - ${z(n.end)}`:n!=null&&n.start?z(n.start):"";return e.jsxs(me.Provider,{value:l.useMemo(()=>({invalid:b}),[b]),children:[e.jsxs("div",{ref:M,className:w.cn("relative inline-flex w-full",A),children:[e.jsxs("button",T(S(T(S({ref:I,type:"button",disabled:c,"aria-haspopup":"dialog","aria-expanded":u,"aria-controls":u?H:void 0,"data-invalid":b||void 0,"data-slot":"date-picker-trigger","data-size":R,"data-state":u?"open":"closed"},!o&&{"data-placeholder":""}),{className:w.cn(ge({size:R}),u&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",o&&!b&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",o&&b&&"border-feedback-error-stroke ring-[3px] ring-state-error",F),onClick:ne}),ee),{children:[e.jsx("span",{className:"truncate",children:o||C}),e.jsx(N.Calendar,{size:R==="md"?je:we,strokeWidth:1.6,className:"shrink-0 !text-gray-foreground","aria-hidden":"true"})]})),u&&xe.createPortal(e.jsxs("div",{ref:q,id:H,role:"dialog","aria-label":"Calend\xE1rio","data-slot":"date-picker-content",style:B!=null?B:void 0,className:w.cn("z-50 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated p-3 shadow-md",W),children:[e.jsxs("div",{className:"mb-3 flex items-center justify-center gap-2",children:[e.jsx("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(r=>U(r,-1)),"aria-label":"M\xEAs anterior",children:e.jsx(N.ChevronLeftMd,{size:18,strokeWidth:1.8})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:k,onChange:r=>de(Number(r.target.value)),className:"min-w-[7rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium capitalize text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[8rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar m\xEAs",children:Y.map(r=>e.jsx("option",{value:r.value,className:"capitalize",children:r.label},r.value))}),e.jsx(N.ChevronDown,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}),X?e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:f,onChange:r=>ue(Number(r.target.value)),className:"min-w-[5rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[5.5rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar ano",children:le.map(r=>e.jsx("option",{value:r,children:r},r))}),e.jsx(N.ChevronDown,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}):e.jsx("div",{className:"text-sm font-semibold text-gray-foreground",children:f})]}),e.jsx("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(r=>U(r,1)),"aria-label":"Pr\xF3ximo m\xEAs",children:e.jsx(N.ChevronRightMd,{size:18,strokeWidth:1.8})})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-gray-foreground-muted max-sm:text-sm",children:[e.jsx("div",{children:"Dom"}),e.jsx("div",{children:"Seg"}),e.jsx("div",{children:"Ter"}),e.jsx("div",{children:"Qua"}),e.jsx("div",{children:"Qui"}),e.jsx("div",{children:"Sex"}),e.jsx("div",{children:"S\xE1b"})]}),e.jsxs("div",{className:"mt-2 grid grid-cols-7 gap-1",children:[Array.from({length:ie}).map((r,i)=>e.jsx("div",{},`empty-${i}`)),Array.from({length:oe}).map((r,i)=>{const m=new Date(f,k,i+1),j=(n==null?void 0:n.start)&&$(m,n.start),P=(n==null?void 0:n.end)&&$(m,n.end),ze=(n==null?void 0:n.start)&&(n==null?void 0:n.end)&&ye(m,n.start)&&pe(m,n.end),Ee=$(m,E),Se=c||_(m,p,v);return e.jsx("button",{type:"button",disabled:Se,onClick:()=>ce(m),className:w.cn("inline-flex h-9 w-full items-center justify-center rounded-md text-sm font-medium outline-none transition-colors hover:bg-secondary-background-soft-emphasis disabled:pointer-events-none disabled:opacity-50",Ee&&"ring-1 ring-gray-stroke-emphasis",ze&&"bg-primary-background-soft",(j||P)&&"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis"),"aria-pressed":j||P||void 0,children:i+1},m.toISOString())})]}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[e.jsx("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis",onClick:()=>{D({start:E,end:E}),h(!1)},disabled:c||_(E,p,v),children:"Hoje"}),e.jsx("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis",onClick:()=>D(null),disabled:c||!n,children:"Limpar"})]})]}),document.body)]}),Z]})}exports.DatePicker=Ve,exports.DatePickerLabel=Fe,exports.DatePickerText=We,exports.DatePickerWrapper=Ae,exports.DateRangePicker=Ie,exports.datePickerTriggerVariants=ge;
|
|
4
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
import{jsxs as c,jsx as r}from"react/jsx-runtime";import{cn as w}from"../lib/utils.mjs";import{Calendar as xe,ChevronLeftMd as ye,ChevronDown as U,ChevronRightMd as ke}from"@medway-ui/icons";import{cva as Oe}from"class-variance-authority";import{createContext as Ve,useState as A,useRef as F,useId as we,useCallback as K,useEffect as _,useMemo as Ne,useContext as Ie}from"react";import{createPortal as De}from"react-dom";var He=Object.defineProperty,Be=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Ee=(e,t,o)=>t in e?He(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,j=(e,t)=>{for(var o in t||(t={}))ze.call(t,o)&&Ee(e,o,t[o]);if(X)for(var o of X(t))Ce.call(t,o)&&Ee(e,o,t[o]);return e},O=(e,t)=>Be(e,Qe(t)),G=(e,t)=>{var o={};for(var d in e)ze.call(e,d)&&t.indexOf(d)<0&&(o[d]=e[d]);if(e!=null&&X)for(var d of X(e))t.indexOf(d)<0&&Ce.call(e,d)&&(o[d]=e[d]);return o};const fe=Ve({invalid:!1}),je={start:1950,end:new Date().getFullYear()};function Z(e,t){const o=e.getFullYear();return o<t.start?new Date(t.start,0,1):o>t.end?new Date(t.end,11,31):e}const be=Oe(["shadow-xs flex w-full items-center justify-between gap-2 rounded-md border-2 border-gray-stroke-muted bg-surface-card px-4 py-3 text-left text-gray-foreground outline-none transition-[color,box-shadow] enabled:hover:border-gray-stroke-emphasis enabled:hover:ring-[3px] enabled:hover:ring-state-focus disabled:pointer-events-none disabled:bg-gray-background-soft-muted disabled:text-gray-foreground-muted data-[invalid]:border-feedback-error-stroke data-[invalid]:enabled:hover:border-feedback-error-stroke data-[invalid]:enabled:hover:ring-[3px] data-[invalid]:enabled:hover:ring-state-error","group-has-[[data-slot=date-picker-label]]:data-[placeholder]:text-transparent"],{variants:{size:{lg:["h-12 max-h-12 text-md","max-sm:h-14 max-sm:text-base"],md:["h-10 max-h-10 text-sm","max-sm:h-11"]}},defaultVariants:{size:"lg"}});function $e(e){var t=e,{className:o}=t,d=G(t,["className"]);return r("div",j({className:w("group relative flex flex-col gap-2",o),"data-slot":"date-picker-wrapper"},d))}function _e(e){var t=e,{className:o,children:d}=t,g=G(t,["className","children"]);return r("label",O(j({className:w("pointer-events-none absolute start-3 top-0 z-10 origin-left -translate-y-1/2 bg-surface-card px-1 text-xs font-medium text-gray-foreground transition-all duration-200 ease-out","group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:start-4 group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-6 group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:bg-transparent group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:px-0 group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:text-md group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:font-normal group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:text-gray-foreground max-sm:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-7","group-has-[[data-slot=date-picker-trigger][data-size=md]]:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-5 group-has-[[data-slot=date-picker-trigger][data-size=md]]:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:!text-sm max-sm:group-has-[[data-slot=date-picker-trigger][data-size=md]]:group-has-[[data-slot=date-picker-trigger][data-placeholder]:not([data-state=open])]:top-[22px]",o),"data-slot":"date-picker-label"},g),{children:d}))}function Ge(e){var t=e,{className:o}=t,d=G(t,["className"]);const{invalid:g}=Ie(fe);return r("span",j({className:w("-mt-1 text-xs",g?"text-feedback-error-foreground":"text-gray-foreground",o),"data-slot":"date-picker-text"},d))}function V(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function q(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function ee(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function te(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ve(e,t){return V(e).getTime()<V(t).getTime()}function Se(e,t){return V(e).getTime()>V(t).getTime()}function J(e,t,o){return!!(t&&ve(e,t)||o&&Se(e,o))}function Re(e){return new Intl.DateTimeFormat("pt-BR",{year:"numeric",month:"2-digit",day:"2-digit"}).format(e)}const Le=20,Pe=18,Ae=8,Fe=8,qe=290,Je=330;function Ue(e,t){const o=window.innerHeight-e.bottom<t,d=window.innerWidth,g=window.matchMedia("(max-width: 639px)").matches?Math.min(512,d-16):Math.min(320,d),D=Fe,u=d-g-Fe;let p=e.left;return p<D?p=D:p>u&&(p=u),O(j({position:"fixed"},o?{bottom:window.innerHeight-e.top+Ae}:{top:e.bottom+Ae}),{left:p,width:g,maxWidth:360})}function Me({open:e,estimatedHeight:t,triggerRef:o,rootRef:d}){const[g,D]=A(null),u=F(null),p=K(()=>{var C,M,W;const Y=(W=(C=o.current)==null?void 0:C.getBoundingClientRect())!=null?W:(M=d.current)==null?void 0:M.getBoundingClientRect();Y&&D(Ue(Y,t))},[t,d,o]),v=K(()=>{u.current===null&&(u.current=window.requestAnimationFrame(()=>{u.current=null,p()}))},[p]);return _(()=>{if(!e){D(null);return}return window.addEventListener("scroll",v,{passive:!0,capture:!0}),window.addEventListener("resize",v),()=>{window.removeEventListener("scroll",v,{capture:!0}),window.removeEventListener("resize",v),u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null)}},[e,v]),{style:g,updatePosition:p}}function Ke(e){var t=e,{value:o,defaultValue:d=null,onValueChange:g,placeholder:D="Pick a date",disabled:u,min:p,max:v,format:C=Re,className:M,inputClassName:W,contentClassName:Y,size:S="lg",yearRange:h=je,showYearSelector:ae=!0,invalid:x=!1,children:re}=t,ne=G(t,["value","defaultValue","onValueChange","placeholder","disabled","min","max","format","className","inputClassName","contentClassName","size","yearRange","showYearSelector","invalid","children"]);const R=o!==void 0,[oe,se]=A(d),n=R?o:oe,[l,f]=A(!1),[I,y]=A(()=>te(Z(n!=null?n:new Date,h))),L=F(null),H=F(null),B=F(null),Q=we(),{style:$,updatePosition:ie}=Me({open:l,estimatedHeight:qe,triggerRef:H,rootRef:L}),z=K(s=>{R||se(s),g==null||g(s)},[R,g]);_(()=>{l&&y(te(Z(n!=null?n:new Date,h)))},[l,n,h]),_(()=>{if(!l)return;const s=i=>{const m=L.current,N=B.current;m&&i.target instanceof Node&&!m.contains(i.target)&&!(N!=null&&N.contains(i.target))&&f(!1)},a=i=>{i.key==="Escape"&&f(!1)};return window.addEventListener("pointerdown",s,{capture:!0}),window.addEventListener("keydown",a),()=>{window.removeEventListener("pointerdown",s,{capture:!0}),window.removeEventListener("keydown",a)}},[l]);const de=()=>{if(l){f(!1);return}ie(),f(!0)},E=V(new Date),b=I.getFullYear(),k=I.getMonth(),le=new Date(b,k,1),ce=new Date(b,k+1,0).getDate(),ue=le.getDay(),T=n?C(n):"",me=Array.from({length:12},(s,a)=>({value:a,label:new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(new Date(2e3,a,1))})),ge=Array.from({length:h.end-h.start+1},(s,a)=>h.start+a),pe=s=>{y(new Date(b,s,1))},he=s=>{y(new Date(s,k,1))};return c(fe.Provider,{value:Ne(()=>({invalid:x}),[x]),children:[c("div",{ref:L,className:w("relative inline-flex w-full",M),children:[c("button",O(j(O(j({ref:H,type:"button",disabled:u,"aria-haspopup":"dialog","aria-expanded":l,"aria-controls":l?Q:void 0,"data-invalid":x||void 0,"data-slot":"date-picker-trigger","data-size":S,"data-state":l?"open":"closed"},!T&&{"data-placeholder":""}),{className:w(be({size:S}),l&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",T&&!x&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",T&&x&&"border-feedback-error-stroke ring-[3px] ring-state-error",W),onClick:de}),ne),{children:[r("span",{className:"truncate",children:T||D}),r(xe,{size:S==="md"?Pe:Le,strokeWidth:1.6,className:"shrink-0 !text-gray-foreground","aria-hidden":"true"})]})),l&&De(c("div",{ref:B,id:Q,role:"dialog","aria-label":"Calend\xE1rio","data-slot":"date-picker-content",style:$!=null?$:void 0,className:w("z-50 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated p-3 shadow-md",Y),children:[c("div",{className:"mb-3 flex items-center justify-center gap-2",children:[r("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(s=>ee(s,-1)),"aria-label":"M\xEAs anterior",children:r(ye,{size:18,strokeWidth:1.8})}),c("div",{className:"flex items-center gap-2",children:[c("div",{className:"relative",children:[r("select",{value:k,onChange:s=>pe(Number(s.target.value)),className:"min-w-[7rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium capitalize text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[8rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar m\xEAs",children:me.map(s=>r("option",{value:s.value,className:"capitalize",children:s.label},s.value))}),r(U,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}),ae?c("div",{className:"relative",children:[r("select",{value:b,onChange:s=>he(Number(s.target.value)),className:"min-w-[5rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[5.5rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar ano",children:ge.map(s=>r("option",{value:s,children:s},s))}),r(U,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}):r("div",{className:"text-sm font-semibold text-gray-foreground",children:b})]}),r("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(s=>ee(s,1)),"aria-label":"Pr\xF3ximo m\xEAs",children:r(ke,{size:18,strokeWidth:1.8})})]}),c("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-gray-foreground-muted max-sm:text-sm",children:[r("div",{children:"Dom"}),r("div",{children:"Seg"}),r("div",{children:"Ter"}),r("div",{children:"Qua"}),r("div",{children:"Qui"}),r("div",{children:"Sex"}),r("div",{children:"S\xE1b"})]}),c("div",{className:"mt-2 grid grid-cols-7 gap-1",children:[Array.from({length:ue}).map((s,a)=>r("div",{},`empty-${a}`)),Array.from({length:ce}).map((s,a)=>{const i=new Date(b,k,a+1),m=n?q(i,n):!1,N=q(i,E),P=u||J(i,p,v);return r("button",{type:"button",disabled:P,onClick:()=>{z(i),f(!1)},className:w("inline-flex h-9 w-full items-center justify-center rounded-md text-sm font-medium outline-none transition-colors hover:bg-secondary-background-soft-emphasis disabled:pointer-events-none disabled:opacity-50 max-sm:h-11 max-sm:text-base",N&&"ring-1 ring-gray-stroke-emphasis",m&&"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis"),"aria-pressed":m,children:a+1},i.toISOString())})]}),c("div",{className:"mt-3 flex items-center justify-between gap-2",children:[r("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis max-sm:px-3 max-sm:py-2 max-sm:text-sm",onClick:()=>{z(E),f(!1)},disabled:u||J(E,p,v),children:"Hoje"}),r("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis max-sm:px-3 max-sm:py-2 max-sm:text-sm",onClick:()=>z(null),disabled:u||!n,children:"Limpar"})]})]}),document.body)]}),re]})}function Xe(e){var t=e,{value:o,defaultValue:d=null,onValueChange:g,placeholder:D="Selecionar per\xEDodo",disabled:u,min:p,max:v,format:C=Re,className:M,inputClassName:W,contentClassName:Y,size:S="lg",yearRange:h=je,showYearSelector:ae=!0,invalid:x=!1,children:re}=t,ne=G(t,["value","defaultValue","onValueChange","placeholder","disabled","min","max","format","className","inputClassName","contentClassName","size","yearRange","showYearSelector","invalid","children"]);const R=o!==void 0,[oe,se]=A(d),n=R?o:oe,[l,f]=A(!1),[I,y]=A(()=>{var a,i;return te(Z((i=(a=n==null?void 0:n.start)!=null?a:n==null?void 0:n.end)!=null?i:new Date,h))}),L=F(null),H=F(null),B=F(null),Q=we(),{style:$,updatePosition:ie}=Me({open:l,estimatedHeight:Je,triggerRef:H,rootRef:L}),z=K(a=>{R||se(a),g==null||g(a)},[R,g]);_(()=>{var a,i;l&&y(te(Z((i=(a=n==null?void 0:n.start)!=null?a:n==null?void 0:n.end)!=null?i:new Date,h)))},[l,n,h]),_(()=>{if(!l)return;const a=m=>{const N=L.current,P=B.current;N&&m.target instanceof Node&&!N.contains(m.target)&&!(P!=null&&P.contains(m.target))&&f(!1)},i=m=>{m.key==="Escape"&&f(!1)};return window.addEventListener("pointerdown",a,{capture:!0}),window.addEventListener("keydown",i),()=>{window.removeEventListener("pointerdown",a,{capture:!0}),window.removeEventListener("keydown",i)}},[l]);const de=()=>{if(l){f(!1);return}ie(),f(!0)},E=V(new Date),b=I.getFullYear(),k=I.getMonth(),le=new Date(b,k,1),ce=new Date(b,k+1,0).getDate(),ue=le.getDay(),T=Array.from({length:12},(a,i)=>({value:i,label:new Intl.DateTimeFormat("pt-BR",{month:"long"}).format(new Date(2e3,i,1))})),me=Array.from({length:h.end-h.start+1},(a,i)=>h.start+i),ge=a=>{y(new Date(b,a,1))},pe=a=>{y(new Date(a,k,1))},he=a=>{u||J(a,p,v)||(!n||!n.start||n.end?z({start:a,end:null}):(ve(a,n.start)?z({start:a,end:n.start}):z({start:n.start,end:a}),f(!1)))},s=n!=null&&n.start&&n!=null&&n.end?`${C(n.start)} - ${C(n.end)}`:n!=null&&n.start?C(n.start):"";return c(fe.Provider,{value:Ne(()=>({invalid:x}),[x]),children:[c("div",{ref:L,className:w("relative inline-flex w-full",M),children:[c("button",O(j(O(j({ref:H,type:"button",disabled:u,"aria-haspopup":"dialog","aria-expanded":l,"aria-controls":l?Q:void 0,"data-invalid":x||void 0,"data-slot":"date-picker-trigger","data-size":S,"data-state":l?"open":"closed"},!s&&{"data-placeholder":""}),{className:w(be({size:S}),l&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",s&&!x&&"border-gray-stroke-emphasis ring-[3px] ring-state-focus",s&&x&&"border-feedback-error-stroke ring-[3px] ring-state-error",W),onClick:de}),ne),{children:[r("span",{className:"truncate",children:s||D}),r(xe,{size:S==="md"?Pe:Le,strokeWidth:1.6,className:"shrink-0 !text-gray-foreground","aria-hidden":"true"})]})),l&&De(c("div",{ref:B,id:Q,role:"dialog","aria-label":"Calend\xE1rio","data-slot":"date-picker-content",style:$!=null?$:void 0,className:w("z-50 overflow-hidden rounded-md border border-gray-stroke-muted bg-surface-elevated p-3 shadow-md",Y),children:[c("div",{className:"mb-3 flex items-center justify-center gap-2",children:[r("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(a=>ee(a,-1)),"aria-label":"M\xEAs anterior",children:r(ye,{size:18,strokeWidth:1.8})}),c("div",{className:"flex items-center gap-2",children:[c("div",{className:"relative",children:[r("select",{value:k,onChange:a=>ge(Number(a.target.value)),className:"min-w-[7rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium capitalize text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[8rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar m\xEAs",children:T.map(a=>r("option",{value:a.value,className:"capitalize",children:a.label},a.value))}),r(U,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}),ae?c("div",{className:"relative",children:[r("select",{value:b,onChange:a=>pe(Number(a.target.value)),className:"min-w-[5rem] appearance-none rounded-md border border-gray-stroke-muted bg-surface-card py-1 pl-2 pr-7 text-sm font-medium text-gray-foreground outline-none hover:border-gray-stroke-emphasis focus:border-gray-stroke-emphasis focus:ring-2 focus:ring-state-focus max-sm:min-w-[5.5rem] max-sm:py-2 max-sm:text-base","aria-label":"Selecionar ano",children:me.map(a=>r("option",{value:a,children:a},a))}),r(U,{size:14,strokeWidth:1.8,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-gray-foreground","aria-hidden":!0})]}):r("div",{className:"text-sm font-semibold text-gray-foreground",children:b})]}),r("button",{type:"button",className:"inline-flex size-8 items-center justify-center rounded-md hover:bg-secondary-background-soft-emphasis max-sm:size-10",onClick:()=>y(a=>ee(a,1)),"aria-label":"Pr\xF3ximo m\xEAs",children:r(ke,{size:18,strokeWidth:1.8})})]}),c("div",{className:"grid grid-cols-7 gap-1 text-center text-xs font-medium text-gray-foreground-muted max-sm:text-sm",children:[r("div",{children:"Dom"}),r("div",{children:"Seg"}),r("div",{children:"Ter"}),r("div",{children:"Qua"}),r("div",{children:"Qui"}),r("div",{children:"Sex"}),r("div",{children:"S\xE1b"})]}),c("div",{className:"mt-2 grid grid-cols-7 gap-1",children:[Array.from({length:ue}).map((a,i)=>r("div",{},`empty-${i}`)),Array.from({length:ce}).map((a,i)=>{const m=new Date(b,k,i+1),N=(n==null?void 0:n.start)&&q(m,n.start),P=(n==null?void 0:n.end)&&q(m,n.end),We=(n==null?void 0:n.start)&&(n==null?void 0:n.end)&&Se(m,n.start)&&ve(m,n.end),Ye=q(m,E),Te=u||J(m,p,v);return r("button",{type:"button",disabled:Te,onClick:()=>he(m),className:w("inline-flex h-9 w-full items-center justify-center rounded-md text-sm font-medium outline-none transition-colors hover:bg-secondary-background-soft-emphasis disabled:pointer-events-none disabled:opacity-50",Ye&&"ring-1 ring-gray-stroke-emphasis",We&&"bg-primary-background-soft",(N||P)&&"bg-primary-background-fill text-primary-foreground-onfill hover:bg-primary-background-fill-emphasis"),"aria-pressed":N||P||void 0,children:i+1},m.toISOString())})]}),c("div",{className:"mt-3 flex items-center justify-between gap-2",children:[r("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis",onClick:()=>{z({start:E,end:E}),f(!1)},disabled:u||J(E,p,v),children:"Hoje"}),r("button",{type:"button",className:"rounded-md px-2 py-1 text-xs font-medium text-gray-foreground hover:bg-secondary-background-soft-emphasis",onClick:()=>z(null),disabled:u||!n,children:"Limpar"})]})]}),document.body)]}),re]})}export{Ke as DatePicker,_e as DatePickerLabel,Ge as DatePickerText,$e as DatePickerWrapper,Xe as DateRangePicker,be as datePickerTriggerVariants};
|
|
4
|
+
//# sourceMappingURL=DatePicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
declare function Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface DialogContainerProps extends ComponentProps<typeof DialogPrimitive.Content> {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
overlayClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function DialogContainer({ className, overlayClassName, children, showCloseButton, ...props }: DialogContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogContent({ containerClassName, className, children, }: {
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
interface DialogHeaderProps extends ComponentProps<"div"> {
|
|
19
|
+
separator?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function DialogHeader({ className, separator, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
interface DialogFooterProps extends ComponentProps<"div"> {
|
|
23
|
+
separator?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare function DialogFooter({ className, separator, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface DialogTitleProps extends ComponentProps<typeof DialogPrimitive.Title> {
|
|
27
|
+
iconLeft?: ReactNode;
|
|
28
|
+
iconRight?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare function DialogTitle({ className, iconLeft, iconRight, children, ...props }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export { Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
33
|
+
export type { DialogContainerProps, DialogFooterProps, DialogHeaderProps, DialogTitleProps, };
|
|
34
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","source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CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAcnB;AAED,UAAU,iBAAkB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,SAAiB,EACjB,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAcnB;AAED,UAAU,gBACR,SAAQ,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAiClB;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQpD;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC;AACF,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
3
|
+
declare function Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface DialogContainerProps extends ComponentProps<typeof DialogPrimitive.Content> {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
overlayClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
declare function DialogContainer({ className, overlayClassName, children, showCloseButton, ...props }: DialogContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogContent({ containerClassName, className, children, }: {
|
|
14
|
+
containerClassName?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
interface DialogHeaderProps extends ComponentProps<"div"> {
|
|
19
|
+
separator?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function DialogHeader({ className, separator, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
interface DialogFooterProps extends ComponentProps<"div"> {
|
|
23
|
+
separator?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare function DialogFooter({ className, separator, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface DialogTitleProps extends ComponentProps<typeof DialogPrimitive.Title> {
|
|
27
|
+
iconLeft?: ReactNode;
|
|
28
|
+
iconRight?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
declare function DialogTitle({ className, iconLeft, iconRight, children, ...props }: DialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export { Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
33
|
+
export type { DialogContainerProps, DialogFooterProps, DialogHeaderProps, DialogTitleProps, };
|
|
34
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/components/Dialog.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAExE;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEhD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAE/C;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAE9C;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWhD;AAED,UAAU,oBACR,SAAQ,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC;IACtD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAyBtB;AAED,iBAAS,aAAa,CAAC,EACrB,kBAAkB,EA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),b=require("@medway-ui/icons"),n=require("radix-ui"),p=require("react"),x=require("./Separator.js"),i=require("../lib/utils.js"),C=Object.defineProperty,O=Object.defineProperties,w=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,j=(e,a,t)=>a in e?C(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,l=(e,a)=>{for(var t in a||(a={}))v.call(a,t)&&j(e,t,a[t]);if(c)for(var t of c(a))h.call(a,t)&&j(e,t,a[t]);return e},N=(e,a)=>O(e,w(a)),s=(e,a)=>{var t={};for(var r in e)v.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&c)for(var r of c(e))a.indexOf(r)<0&&h.call(e,r)&&(t[r]=e[r]);return t};function P(e){var a=s(e,[]);return o.jsx(n.Dialog.Root,l({"data-slot":"dialog"},a))}function z(e){var a=s(e,[]);return o.jsx(n.Dialog.Trigger,l({"data-slot":"dialog-trigger"},a))}function y(e){var a=s(e,[]);return o.jsx(n.Dialog.Portal,l({"data-slot":"dialog-portal"},a))}function k(e){var a=s(e,[]);return o.jsx(n.Dialog.Close,l({"data-slot":"dialog-close"},a))}function D(e){var a=e,{className:t}=a,r=s(a,["className"]);return o.jsx(n.Dialog.Overlay,l({"data-slot":"dialog-overlay",className:i.cn("fixed inset-0 z-50 bg-black-48 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},r))}function q(e){var a=e,{className:t,overlayClassName:r,children:d,showCloseButton:g=!0}=a,m=s(a,["className","overlayClassName","children","showCloseButton"]);return o.jsxs(y,{"data-slot":"dialog-portal",children:[o.jsx(D,{className:i.cn("modal-overlay",r)}),o.jsxs(n.Dialog.Content,N(l({"data-slot":"dialog-container",className:i.cn("modal-overlay fixed left-1/2 top-1/2 z-50 flex max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-0 overflow-y-auto rounded-xl border bg-background p-0 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:max-h-[85vh] sm:max-w-lg",t)},m),{children:[d,g&&o.jsxs(n.Dialog.Close,{"data-slot":"dialog-close",className:"focus:outline-hidden absolute right-3 top-3 rounded-pill p-1.5 hover:bg-gray-background-soft disabled:pointer-events-none data-[state=open]:text-gray-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[o.jsx(b.CloseMd,{}),o.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}function R({containerClassName:e,className:a,children:t}){return o.jsx("div",{className:i.cn("mb-auto overflow-y-auto",e),children:o.jsx("div",{"data-slot":"dialog-content",className:i.cn("px-8 py-6 text-md leading-md text-primary-foreground",a),children:t})})}function T(e){var a=e,{className:t,separator:r=!1}=a,d=s(a,["className","separator"]);return o.jsxs(o.Fragment,{children:[o.jsx("div",l({"data-slot":"dialog-header",className:i.cn("flex flex-col gap-2 px-8 py-6 text-center sm:text-left",t)},d)),r&&o.jsx(x.Separator,{})]})}function E(e){var a=e,{className:t,separator:r=!1}=a,d=s(a,["className","separator"]);return o.jsxs(o.Fragment,{children:[r&&o.jsx(x.Separator,{}),o.jsx("div",l({"data-slot":"dialog-footer",className:i.cn("flex flex-col-reverse gap-2 px-8 py-6 sm:flex-row sm:justify-end",t)},d))]})}function F(e){var a=e,{className:t,iconLeft:r,iconRight:d,children:g}=a,m=s(a,["className","iconLeft","iconRight","children"]);const f=u=>p.isValidElement(u)?p.cloneElement(u,{size:32,strokeWidth:2.2,className:"flex-shrink-0"}):u;return o.jsxs(n.Dialog.Title,N(l({"data-slot":"dialog-title",className:i.cn("flex items-center gap-3 text-title-md font-semibold leading-title-md !text-content-title",t)},m),{children:[r&&f(r),g,d&&f(d)]}))}function S(e){var a=e,{className:t}=a,r=s(a,["className"]);return o.jsx(n.Dialog.Description,l({"data-slot":"dialog-description",className:i.cn("text-md leading-md text-content-paragraph",t)},r))}exports.Dialog=P,exports.DialogClose=k,exports.DialogContainer=q,exports.DialogContent=R,exports.DialogDescription=S,exports.DialogFooter=E,exports.DialogHeader=T,exports.DialogOverlay=D,exports.DialogPortal=y,exports.DialogTitle=F,exports.DialogTrigger=z;
|
|
4
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
import{jsx as l,jsxs as c,Fragment as v}from"react/jsx-runtime";import{CloseMd as O}from"@medway-ui/icons";import{Dialog as n}from"radix-ui";import{isValidElement as w,cloneElement as j}from"react";import{Separator as x}from"./Separator.mjs";import{cn as i}from"../lib/utils.mjs";var P=Object.defineProperty,z=Object.defineProperties,k=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,y=(e,a,t)=>a in e?P(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,r=(e,a)=>{for(var t in a||(a={}))h.call(a,t)&&y(e,t,a[t]);if(m)for(var t of m(a))N.call(a,t)&&y(e,t,a[t]);return e},b=(e,a)=>z(e,k(a)),s=(e,a)=>{var t={};for(var o in e)h.call(e,o)&&a.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&m)for(var o of m(e))a.indexOf(o)<0&&N.call(e,o)&&(t[o]=e[o]);return t};function T(e){var a=s(e,[]);return l(n.Root,r({"data-slot":"dialog"},a))}function E(e){var a=s(e,[]);return l(n.Trigger,r({"data-slot":"dialog-trigger"},a))}function D(e){var a=s(e,[]);return l(n.Portal,r({"data-slot":"dialog-portal"},a))}function R(e){var a=s(e,[]);return l(n.Close,r({"data-slot":"dialog-close"},a))}function C(e){var a=e,{className:t}=a,o=s(a,["className"]);return l(n.Overlay,r({"data-slot":"dialog-overlay",className:i("fixed inset-0 z-50 bg-black-48 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},o))}function _(e){var a=e,{className:t,overlayClassName:o,children:d,showCloseButton:f=!0}=a,g=s(a,["className","overlayClassName","children","showCloseButton"]);return c(D,{"data-slot":"dialog-portal",children:[l(C,{className:i("modal-overlay",o)}),c(n.Content,b(r({"data-slot":"dialog-container",className:i("modal-overlay fixed left-1/2 top-1/2 z-50 flex max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-0 overflow-y-auto rounded-xl border bg-background p-0 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:max-h-[85vh] sm:max-w-lg",t)},g),{children:[d,f&&c(n.Close,{"data-slot":"dialog-close",className:"focus:outline-hidden absolute right-3 top-3 rounded-pill p-1.5 hover:bg-gray-background-soft disabled:pointer-events-none data-[state=open]:text-gray-foreground [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[l(O,{}),l("span",{className:"sr-only",children:"Close"})]})]}))]})}function B({containerClassName:e,className:a,children:t}){return l("div",{className:i("mb-auto overflow-y-auto",e),children:l("div",{"data-slot":"dialog-content",className:i("px-8 py-6 text-md leading-md text-primary-foreground",a),children:t})})}function F(e){var a=e,{className:t,separator:o=!1}=a,d=s(a,["className","separator"]);return c(v,{children:[l("div",r({"data-slot":"dialog-header",className:i("flex flex-col gap-2 px-8 py-6 text-center sm:text-left",t)},d)),o&&l(x,{})]})}function H(e){var a=e,{className:t,separator:o=!1}=a,d=s(a,["className","separator"]);return c(v,{children:[o&&l(x,{}),l("div",r({"data-slot":"dialog-footer",className:i("flex flex-col-reverse gap-2 px-8 py-6 sm:flex-row sm:justify-end",t)},d))]})}function I(e){var a=e,{className:t,iconLeft:o,iconRight:d,children:f}=a,g=s(a,["className","iconLeft","iconRight","children"]);const u=p=>w(p)?j(p,{size:32,strokeWidth:2.2,className:"flex-shrink-0"}):p;return c(n.Title,b(r({"data-slot":"dialog-title",className:i("flex items-center gap-3 text-title-md font-semibold leading-title-md !text-content-title",t)},g),{children:[o&&u(o),f,d&&u(d)]}))}function L(e){var a=e,{className:t}=a,o=s(a,["className"]);return l(n.Description,r({"data-slot":"dialog-description",className:i("text-md leading-md text-content-paragraph",t)},o))}export{T as Dialog,R as DialogClose,_ as DialogContainer,B as DialogContent,L as DialogDescription,H as DialogFooter,F as DialogHeader,C as DialogOverlay,D as DialogPortal,I as DialogTitle,E as DialogTrigger};
|
|
4
|
+
//# sourceMappingURL=Dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
3
|
+
declare function DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, side, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
interface DropdownMenuLabelProps extends ComponentProps<typeof DropdownMenuPrimitive.Label> {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuShortcut({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function DropdownMenuSubContent({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
27
|
+
export type { DropdownMenuLabelProps };
|
|
28
|
+
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/components/DropdownMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAMjE,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,2CAIrD;AAED,iBAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAQtD;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAc,EACd,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAgBtD;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAA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S,sBAAsB,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,2CAeA;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,2CAWzD;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC;AACF,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
3
|
+
declare function DropdownMenu({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, side, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
interface DropdownMenuLabelProps extends ComponentProps<typeof DropdownMenuPrimitive.Label> {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuShortcut({ className, ...props }: ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function DropdownMenuSub({ ...props }: ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function DropdownMenuSubContent({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
27
|
+
export type { DropdownMenuLabelProps };
|
|
28
|
+
//# sourceMappingURL=DropdownMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../src/components/DropdownMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAMjE,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,2CAIrD;AAED,iBAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAQtD;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAc,EACd,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAgBtD;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,2CAIpD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC,2CAaA;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