@medway-ui/core 1.36.2 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +200 -17
- package/COMPONENTS_SUMMARY.md +8 -5
- package/README.md +1 -1
- package/dist/COMPONENTS.md +200 -17
- package/dist/COMPONENTS_SUMMARY.md +8 -5
- package/dist/assets/css/tokens.css +51 -20
- package/dist/assets/js/tokens.d.ts +27 -1
- package/dist/assets/js/tokens.js +1 -2
- package/dist/assets/js/tokens.mjs +1 -2
- package/dist/assets/js/tokens.ts +30 -0
- package/dist/components/Alert.d.ts +1 -2
- package/dist/components/Alert.js +1 -2
- package/dist/components/Alert.mjs +1 -2
- package/dist/components/AlertDialog.d.ts +0 -1
- package/dist/components/AlertDialog.js +1 -2
- package/dist/components/AlertDialog.mjs +1 -2
- package/dist/components/Autocomplete.d.ts +5 -3
- package/dist/components/Autocomplete.js +1 -2
- package/dist/components/Autocomplete.mjs +1 -2
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.js +1 -2
- package/dist/components/Avatar.mjs +1 -2
- package/dist/components/Badge.d.ts +14 -5
- package/dist/components/Badge.js +1 -2
- package/dist/components/Badge.mjs +1 -2
- package/dist/components/Breadcrumb.d.ts +0 -1
- package/dist/components/Breadcrumb.js +1 -2
- package/dist/components/Breadcrumb.mjs +1 -2
- package/dist/components/Button.d.ts +0 -1
- package/dist/components/Button.js +1 -2
- package/dist/components/Button.mjs +1 -2
- package/dist/components/CardContinue.d.ts +0 -1
- package/dist/components/CardContinue.js +1 -2
- package/dist/components/CardContinue.mjs +1 -2
- package/dist/components/CardLesson.d.ts +0 -1
- package/dist/components/CardLesson.js +1 -2
- package/dist/components/CardLesson.mjs +1 -2
- package/dist/components/CardModule.d.ts +0 -1
- package/dist/components/CardModule.js +1 -2
- package/dist/components/CardModule.mjs +1 -2
- package/dist/components/CardNews.d.ts +6 -2
- package/dist/components/CardNews.js +1 -2
- package/dist/components/CardNews.mjs +1 -2
- package/dist/components/CardTopic.d.ts +0 -1
- package/dist/components/CardTopic.js +1 -2
- package/dist/components/CardTopic.mjs +1 -2
- package/dist/components/CardWeek.d.ts +0 -1
- package/dist/components/CardWeek.js +1 -2
- package/dist/components/CardWeek.mjs +1 -2
- package/dist/components/Carousel.d.ts +0 -1
- package/dist/components/Carousel.js +1 -2
- package/dist/components/Carousel.mjs +1 -2
- package/dist/components/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox.js +1 -2
- package/dist/components/Checkbox.mjs +1 -2
- package/dist/components/Chip.d.ts +2 -3
- package/dist/components/Chip.js +1 -2
- package/dist/components/Chip.mjs +1 -2
- package/dist/components/Collapsible.d.ts +0 -1
- package/dist/components/Collapsible.js +1 -2
- package/dist/components/Collapsible.mjs +1 -2
- package/dist/components/Command.d.ts +1 -2
- package/dist/components/Command.js +1 -2
- package/dist/components/Command.mjs +1 -2
- package/dist/components/ConfirmDeleteButton.d.ts +0 -1
- package/dist/components/ConfirmDeleteButton.js +1 -2
- package/dist/components/ConfirmDeleteButton.mjs +1 -2
- package/dist/components/DatePicker.d.ts +2 -3
- package/dist/components/DatePicker.js +1 -2
- package/dist/components/DatePicker.mjs +1 -2
- package/dist/components/Dialog.d.ts +4 -6
- package/dist/components/Dialog.js +1 -2
- package/dist/components/Dialog.mjs +1 -2
- package/dist/components/Dismiss.d.ts +12 -0
- package/dist/components/Dismiss.js +3 -0
- package/dist/components/Dismiss.mjs +3 -0
- package/dist/components/DropdownMenu.d.ts +11 -5
- package/dist/components/DropdownMenu.js +1 -2
- package/dist/components/DropdownMenu.mjs +1 -2
- package/dist/components/FallbackImage.d.ts +0 -1
- package/dist/components/FallbackImage.js +0 -1
- package/dist/components/FallbackImage.mjs +0 -1
- package/dist/components/IndexLevel.d.ts +0 -1
- package/dist/components/IndexLevel.js +0 -1
- package/dist/components/IndexLevel.mjs +0 -1
- package/dist/components/IndexLevelAnimated.d.ts +0 -1
- package/dist/components/IndexLevelAnimated.js +0 -1
- package/dist/components/IndexLevelAnimated.mjs +0 -1
- package/dist/components/Input.d.ts +2 -2
- package/dist/components/Input.js +1 -2
- package/dist/components/Input.mjs +1 -2
- package/dist/components/Label.d.ts +0 -1
- package/dist/components/Label.js +1 -2
- package/dist/components/Label.mjs +1 -2
- package/dist/components/Loading.d.ts +3 -4
- package/dist/components/Loading.js +1 -2
- package/dist/components/Loading.mjs +1 -2
- package/dist/components/LoadingOverlay.d.ts +30 -0
- package/dist/components/LoadingOverlay.js +3 -0
- package/dist/components/LoadingOverlay.mjs +3 -0
- package/dist/components/Logo.d.ts +0 -1
- package/dist/components/Logo.js +0 -1
- package/dist/components/Logo.mjs +1 -2
- package/dist/components/NoteEditor.d.ts +22 -8
- package/dist/components/NoteEditor.js +1 -2
- package/dist/components/NoteEditor.mjs +1 -2
- package/dist/components/NoteEditorLinkDialog.d.ts +0 -8
- package/dist/components/NoteEditorLinkDialog.js +1 -2
- package/dist/components/NoteEditorLinkDialog.mjs +1 -2
- package/dist/components/Offcanvas.d.ts +0 -1
- package/dist/components/Offcanvas.js +1 -2
- package/dist/components/Offcanvas.mjs +1 -2
- package/dist/components/Pagination.d.ts +0 -1
- package/dist/components/Pagination.js +1 -2
- package/dist/components/Pagination.mjs +1 -2
- package/dist/components/Popover.d.ts +0 -1
- package/dist/components/Popover.js +1 -2
- package/dist/components/Popover.mjs +1 -2
- package/dist/components/Progress.d.ts +0 -1
- package/dist/components/Progress.js +1 -2
- package/dist/components/Progress.mjs +1 -2
- package/dist/components/ProgressCircle.d.ts +0 -1
- package/dist/components/ProgressCircle.js +1 -2
- package/dist/components/ProgressCircle.mjs +1 -2
- package/dist/components/RadioGroup.d.ts +0 -1
- package/dist/components/RadioGroup.js +1 -2
- package/dist/components/RadioGroup.mjs +1 -2
- package/dist/components/Ranking.d.ts +0 -1
- package/dist/components/Ranking.js +1 -2
- package/dist/components/Ranking.mjs +1 -2
- package/dist/components/Rating.d.ts +0 -1
- package/dist/components/Rating.js +1 -2
- package/dist/components/Rating.mjs +1 -2
- package/dist/components/ScrollArea.d.ts +0 -1
- package/dist/components/ScrollArea.js +0 -1
- package/dist/components/ScrollArea.mjs +0 -1
- package/dist/components/SegmentControl.d.ts +0 -1
- package/dist/components/SegmentControl.js +1 -2
- package/dist/components/SegmentControl.mjs +1 -2
- package/dist/components/Select.d.ts +0 -1
- package/dist/components/Select.js +1 -2
- package/dist/components/Select.mjs +1 -2
- package/dist/components/Separator.d.ts +0 -1
- package/dist/components/Separator.js +0 -1
- package/dist/components/Separator.mjs +0 -1
- package/dist/components/Sheet.d.ts +0 -1
- package/dist/components/Sheet.js +1 -2
- package/dist/components/Sheet.mjs +1 -2
- package/dist/components/Sidebar.d.ts +1 -2
- package/dist/components/Sidebar.js +1 -2
- package/dist/components/Sidebar.mjs +1 -2
- package/dist/components/Skeleton.d.ts +0 -1
- package/dist/components/Skeleton.js +0 -1
- package/dist/components/Skeleton.mjs +0 -1
- package/dist/components/Switch.d.ts +0 -1
- package/dist/components/Switch.js +1 -2
- package/dist/components/Switch.mjs +1 -2
- package/dist/components/Switcher.d.ts +3 -6
- package/dist/components/Switcher.js +1 -2
- package/dist/components/Switcher.mjs +1 -2
- package/dist/components/Tabs.d.ts +0 -1
- package/dist/components/Tabs.js +1 -2
- package/dist/components/Tabs.mjs +1 -2
- package/dist/components/Tag.d.ts +4 -3
- package/dist/components/Tag.js +1 -2
- package/dist/components/Tag.mjs +1 -2
- package/dist/components/TagPicker.d.ts +1 -2
- package/dist/components/TagPicker.js +1 -2
- package/dist/components/TagPicker.mjs +1 -2
- package/dist/components/Textarea.d.ts +14 -0
- package/dist/components/Textarea.js +3 -0
- package/dist/components/Textarea.mjs +3 -0
- package/dist/components/Tile.d.ts +0 -1
- package/dist/components/Tile.js +1 -2
- package/dist/components/Tile.mjs +1 -2
- package/dist/components/Toast.d.ts +5 -4
- package/dist/components/Toast.js +1 -2
- package/dist/components/Toast.mjs +1 -2
- package/dist/components/Tooltip.d.ts +0 -1
- package/dist/components/Tooltip.js +1 -2
- package/dist/components/Tooltip.mjs +1 -2
- package/dist/hooks/use-composed-refs.d.ts +0 -1
- package/dist/hooks/use-composed-refs.js +1 -2
- package/dist/hooks/use-composed-refs.mjs +0 -1
- package/dist/hooks/use-field-fill.d.ts +10 -0
- package/dist/hooks/use-field-fill.js +2 -0
- package/dist/hooks/use-field-fill.mjs +2 -0
- package/dist/hooks/use-id.d.ts +0 -1
- package/dist/hooks/use-id.js +0 -1
- package/dist/hooks/use-id.mjs +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.js +0 -1
- package/dist/hooks/use-mobile.mjs +0 -1
- package/dist/hooks/use-prefers-reduced-motion.d.ts +0 -1
- package/dist/hooks/use-prefers-reduced-motion.js +1 -2
- package/dist/hooks/use-prefers-reduced-motion.mjs +0 -1
- package/dist/hooks/use-toast.d.ts +1 -2
- package/dist/hooks/use-toast.js +1 -2
- package/dist/hooks/use-toast.mjs +1 -2
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/dist/lib/cmdk.d.ts +2 -3
- package/dist/lib/cmdk.js +1 -2
- package/dist/lib/cmdk.mjs +1 -2
- package/dist/lib/command-score.d.ts +0 -1
- package/dist/lib/command-score.js +0 -1
- package/dist/lib/command-score.mjs +0 -1
- package/dist/lib/floating-label.d.ts +2 -0
- package/dist/lib/floating-label.js +2 -0
- package/dist/lib/floating-label.mjs +2 -0
- package/dist/lib/image-toolbar-placement.d.ts +0 -1
- package/dist/lib/image-toolbar-placement.js +0 -1
- package/dist/lib/image-toolbar-placement.mjs +0 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +1 -2
- package/dist/lib/utils.mjs +1 -2
- package/dist/note-editor.d.ts +0 -1
- package/dist/note-editor.js +0 -1
- package/dist/note-editor.mjs +0 -1
- package/package.json +7 -7
- package/dist/assets/js/tokens.d.mts +0 -794
- package/dist/assets/js/tokens.d.mts.map +0 -1
- package/dist/assets/js/tokens.d.ts.map +0 -1
- package/dist/assets/js/tokens.js.map +0 -1
- package/dist/assets/js/tokens.mjs.map +0 -1
- package/dist/components/Alert.d.mts +0 -29
- package/dist/components/Alert.d.mts.map +0 -1
- package/dist/components/Alert.d.ts.map +0 -1
- package/dist/components/Alert.js.map +0 -1
- package/dist/components/Alert.mjs.map +0 -1
- package/dist/components/AlertDialog.d.mts +0 -39
- package/dist/components/AlertDialog.d.mts.map +0 -1
- package/dist/components/AlertDialog.d.ts.map +0 -1
- package/dist/components/AlertDialog.js.map +0 -1
- package/dist/components/AlertDialog.mjs.map +0 -1
- package/dist/components/Autocomplete.d.mts +0 -57
- package/dist/components/Autocomplete.d.mts.map +0 -1
- package/dist/components/Autocomplete.d.ts.map +0 -1
- package/dist/components/Autocomplete.js.map +0 -1
- package/dist/components/Autocomplete.mjs.map +0 -1
- package/dist/components/Avatar.d.mts +0 -18
- package/dist/components/Avatar.d.mts.map +0 -1
- package/dist/components/Avatar.d.ts.map +0 -1
- package/dist/components/Avatar.js.map +0 -1
- package/dist/components/Avatar.mjs.map +0 -1
- package/dist/components/Badge.d.mts +0 -16
- package/dist/components/Badge.d.mts.map +0 -1
- package/dist/components/Badge.d.ts.map +0 -1
- package/dist/components/Badge.js.map +0 -1
- package/dist/components/Badge.mjs.map +0 -1
- package/dist/components/Breadcrumb.d.mts +0 -20
- package/dist/components/Breadcrumb.d.mts.map +0 -1
- package/dist/components/Breadcrumb.d.ts.map +0 -1
- package/dist/components/Breadcrumb.js.map +0 -1
- package/dist/components/Breadcrumb.mjs.map +0 -1
- package/dist/components/Button.d.mts +0 -21
- package/dist/components/Button.d.mts.map +0 -1
- package/dist/components/Button.d.ts.map +0 -1
- package/dist/components/Button.js.map +0 -1
- package/dist/components/Button.mjs.map +0 -1
- package/dist/components/CardContinue.d.mts +0 -20
- package/dist/components/CardContinue.d.mts.map +0 -1
- package/dist/components/CardContinue.d.ts.map +0 -1
- package/dist/components/CardContinue.js.map +0 -1
- package/dist/components/CardContinue.mjs.map +0 -1
- package/dist/components/CardLesson.d.mts +0 -45
- package/dist/components/CardLesson.d.mts.map +0 -1
- package/dist/components/CardLesson.d.ts.map +0 -1
- package/dist/components/CardLesson.js.map +0 -1
- package/dist/components/CardLesson.mjs.map +0 -1
- package/dist/components/CardModule.d.mts +0 -33
- package/dist/components/CardModule.d.mts.map +0 -1
- package/dist/components/CardModule.d.ts.map +0 -1
- package/dist/components/CardModule.js.map +0 -1
- package/dist/components/CardModule.mjs.map +0 -1
- package/dist/components/CardNews.d.mts +0 -42
- package/dist/components/CardNews.d.mts.map +0 -1
- package/dist/components/CardNews.d.ts.map +0 -1
- package/dist/components/CardNews.js.map +0 -1
- package/dist/components/CardNews.mjs.map +0 -1
- package/dist/components/CardTopic.d.mts +0 -27
- package/dist/components/CardTopic.d.mts.map +0 -1
- package/dist/components/CardTopic.d.ts.map +0 -1
- package/dist/components/CardTopic.js.map +0 -1
- package/dist/components/CardTopic.mjs.map +0 -1
- package/dist/components/CardWeek.d.mts +0 -32
- package/dist/components/CardWeek.d.mts.map +0 -1
- package/dist/components/CardWeek.d.ts.map +0 -1
- package/dist/components/CardWeek.js.map +0 -1
- package/dist/components/CardWeek.mjs.map +0 -1
- package/dist/components/Carousel.d.mts +0 -76
- package/dist/components/Carousel.d.mts.map +0 -1
- package/dist/components/Carousel.d.ts.map +0 -1
- package/dist/components/Carousel.js.map +0 -1
- package/dist/components/Carousel.mjs.map +0 -1
- package/dist/components/Checkbox.d.mts +0 -14
- package/dist/components/Checkbox.d.mts.map +0 -1
- package/dist/components/Checkbox.d.ts.map +0 -1
- package/dist/components/Checkbox.js.map +0 -1
- package/dist/components/Checkbox.mjs.map +0 -1
- package/dist/components/Chip.d.mts +0 -38
- package/dist/components/Chip.d.mts.map +0 -1
- package/dist/components/Chip.d.ts.map +0 -1
- package/dist/components/Chip.js.map +0 -1
- package/dist/components/Chip.mjs.map +0 -1
- package/dist/components/Collapsible.d.mts +0 -15
- package/dist/components/Collapsible.d.mts.map +0 -1
- package/dist/components/Collapsible.d.ts.map +0 -1
- package/dist/components/Collapsible.js.map +0 -1
- package/dist/components/Collapsible.mjs.map +0 -1
- package/dist/components/Command.d.mts +0 -20
- package/dist/components/Command.d.mts.map +0 -1
- package/dist/components/Command.d.ts.map +0 -1
- package/dist/components/Command.js.map +0 -1
- package/dist/components/Command.mjs.map +0 -1
- package/dist/components/ConfirmDeleteButton.d.mts +0 -26
- package/dist/components/ConfirmDeleteButton.d.mts.map +0 -1
- package/dist/components/ConfirmDeleteButton.d.ts.map +0 -1
- package/dist/components/ConfirmDeleteButton.js.map +0 -1
- package/dist/components/ConfirmDeleteButton.mjs.map +0 -1
- package/dist/components/DatePicker.d.mts +0 -57
- package/dist/components/DatePicker.d.mts.map +0 -1
- package/dist/components/DatePicker.d.ts.map +0 -1
- package/dist/components/DatePicker.js.map +0 -1
- package/dist/components/DatePicker.mjs.map +0 -1
- package/dist/components/Dialog.d.mts +0 -35
- package/dist/components/Dialog.d.mts.map +0 -1
- package/dist/components/Dialog.d.ts.map +0 -1
- package/dist/components/Dialog.js.map +0 -1
- package/dist/components/Dialog.mjs.map +0 -1
- package/dist/components/DropdownMenu.d.mts +0 -28
- package/dist/components/DropdownMenu.d.mts.map +0 -1
- package/dist/components/DropdownMenu.d.ts.map +0 -1
- package/dist/components/DropdownMenu.js.map +0 -1
- package/dist/components/DropdownMenu.mjs.map +0 -1
- package/dist/components/FallbackImage.d.mts +0 -8
- package/dist/components/FallbackImage.d.mts.map +0 -1
- package/dist/components/FallbackImage.d.ts.map +0 -1
- package/dist/components/FallbackImage.js.map +0 -1
- package/dist/components/FallbackImage.mjs.map +0 -1
- package/dist/components/IndexLevel.d.mts +0 -47
- package/dist/components/IndexLevel.d.mts.map +0 -1
- package/dist/components/IndexLevel.d.ts.map +0 -1
- package/dist/components/IndexLevel.js.map +0 -1
- package/dist/components/IndexLevel.mjs.map +0 -1
- package/dist/components/IndexLevelAnimated.d.mts +0 -34
- package/dist/components/IndexLevelAnimated.d.mts.map +0 -1
- package/dist/components/IndexLevelAnimated.d.ts.map +0 -1
- package/dist/components/IndexLevelAnimated.js.map +0 -1
- package/dist/components/IndexLevelAnimated.mjs.map +0 -1
- package/dist/components/Input.d.mts +0 -43
- package/dist/components/Input.d.mts.map +0 -1
- package/dist/components/Input.d.ts.map +0 -1
- package/dist/components/Input.js.map +0 -1
- package/dist/components/Input.mjs.map +0 -1
- package/dist/components/Label.d.mts +0 -14
- package/dist/components/Label.d.mts.map +0 -1
- package/dist/components/Label.d.ts.map +0 -1
- package/dist/components/Label.js.map +0 -1
- package/dist/components/Label.mjs.map +0 -1
- package/dist/components/Loading.d.mts +0 -8
- package/dist/components/Loading.d.mts.map +0 -1
- package/dist/components/Loading.d.ts.map +0 -1
- package/dist/components/Loading.js.map +0 -1
- package/dist/components/Loading.mjs.map +0 -1
- package/dist/components/Logo.d.mts +0 -9
- package/dist/components/Logo.d.mts.map +0 -1
- package/dist/components/Logo.d.ts.map +0 -1
- package/dist/components/Logo.js.map +0 -1
- package/dist/components/Logo.mjs.map +0 -1
- package/dist/components/NoteEditor.d.mts +0 -124
- package/dist/components/NoteEditor.d.mts.map +0 -1
- package/dist/components/NoteEditor.d.ts.map +0 -1
- package/dist/components/NoteEditor.js.map +0 -1
- package/dist/components/NoteEditor.mjs.map +0 -1
- package/dist/components/NoteEditorLinkDialog.d.mts +0 -36
- package/dist/components/NoteEditorLinkDialog.d.mts.map +0 -1
- package/dist/components/NoteEditorLinkDialog.d.ts.map +0 -1
- package/dist/components/NoteEditorLinkDialog.js.map +0 -1
- package/dist/components/NoteEditorLinkDialog.mjs.map +0 -1
- package/dist/components/Offcanvas.d.mts +0 -53
- package/dist/components/Offcanvas.d.mts.map +0 -1
- package/dist/components/Offcanvas.d.ts.map +0 -1
- package/dist/components/Offcanvas.js.map +0 -1
- package/dist/components/Offcanvas.mjs.map +0 -1
- package/dist/components/Pagination.d.mts +0 -43
- package/dist/components/Pagination.d.mts.map +0 -1
- package/dist/components/Pagination.d.ts.map +0 -1
- package/dist/components/Pagination.js.map +0 -1
- package/dist/components/Pagination.mjs.map +0 -1
- package/dist/components/Popover.d.mts +0 -10
- package/dist/components/Popover.d.mts.map +0 -1
- package/dist/components/Popover.d.ts.map +0 -1
- package/dist/components/Popover.js.map +0 -1
- package/dist/components/Popover.mjs.map +0 -1
- package/dist/components/Progress.d.mts +0 -9
- package/dist/components/Progress.d.mts.map +0 -1
- package/dist/components/Progress.d.ts.map +0 -1
- package/dist/components/Progress.js.map +0 -1
- package/dist/components/Progress.mjs.map +0 -1
- package/dist/components/ProgressCircle.d.mts +0 -14
- package/dist/components/ProgressCircle.d.mts.map +0 -1
- package/dist/components/ProgressCircle.d.ts.map +0 -1
- package/dist/components/ProgressCircle.js.map +0 -1
- package/dist/components/ProgressCircle.mjs.map +0 -1
- package/dist/components/RadioGroup.d.mts +0 -14
- package/dist/components/RadioGroup.d.mts.map +0 -1
- package/dist/components/RadioGroup.d.ts.map +0 -1
- package/dist/components/RadioGroup.js.map +0 -1
- package/dist/components/RadioGroup.mjs.map +0 -1
- package/dist/components/Ranking.d.mts +0 -95
- package/dist/components/Ranking.d.mts.map +0 -1
- package/dist/components/Ranking.d.ts.map +0 -1
- package/dist/components/Ranking.js.map +0 -1
- package/dist/components/Ranking.mjs.map +0 -1
- package/dist/components/Rating.d.mts +0 -29
- package/dist/components/Rating.d.mts.map +0 -1
- package/dist/components/Rating.d.ts.map +0 -1
- package/dist/components/Rating.js.map +0 -1
- package/dist/components/Rating.mjs.map +0 -1
- package/dist/components/ScrollArea.d.mts +0 -6
- package/dist/components/ScrollArea.d.mts.map +0 -1
- package/dist/components/ScrollArea.d.ts.map +0 -1
- package/dist/components/ScrollArea.js.map +0 -1
- package/dist/components/ScrollArea.mjs.map +0 -1
- package/dist/components/SegmentControl.d.mts +0 -27
- package/dist/components/SegmentControl.d.mts.map +0 -1
- package/dist/components/SegmentControl.d.ts.map +0 -1
- package/dist/components/SegmentControl.js.map +0 -1
- package/dist/components/SegmentControl.mjs.map +0 -1
- package/dist/components/Select.d.mts +0 -32
- package/dist/components/Select.d.mts.map +0 -1
- package/dist/components/Select.d.ts.map +0 -1
- package/dist/components/Select.js.map +0 -1
- package/dist/components/Select.mjs.map +0 -1
- package/dist/components/Separator.d.mts +0 -5
- package/dist/components/Separator.d.mts.map +0 -1
- package/dist/components/Separator.d.ts.map +0 -1
- package/dist/components/Separator.js.map +0 -1
- package/dist/components/Separator.mjs.map +0 -1
- package/dist/components/Sheet.d.mts +0 -17
- package/dist/components/Sheet.d.mts.map +0 -1
- package/dist/components/Sheet.d.ts.map +0 -1
- package/dist/components/Sheet.js.map +0 -1
- package/dist/components/Sheet.mjs.map +0 -1
- package/dist/components/Sidebar.d.mts +0 -90
- package/dist/components/Sidebar.d.mts.map +0 -1
- package/dist/components/Sidebar.d.ts.map +0 -1
- package/dist/components/Sidebar.js.map +0 -1
- package/dist/components/Sidebar.mjs.map +0 -1
- package/dist/components/Skeleton.d.mts +0 -4
- package/dist/components/Skeleton.d.mts.map +0 -1
- package/dist/components/Skeleton.d.ts.map +0 -1
- package/dist/components/Skeleton.js.map +0 -1
- package/dist/components/Skeleton.mjs.map +0 -1
- package/dist/components/Switch.d.mts +0 -15
- package/dist/components/Switch.d.mts.map +0 -1
- package/dist/components/Switch.d.ts.map +0 -1
- package/dist/components/Switch.js.map +0 -1
- package/dist/components/Switch.mjs.map +0 -1
- package/dist/components/Switcher.d.mts +0 -56
- package/dist/components/Switcher.d.mts.map +0 -1
- package/dist/components/Switcher.d.ts.map +0 -1
- package/dist/components/Switcher.js.map +0 -1
- package/dist/components/Switcher.mjs.map +0 -1
- package/dist/components/Tabs.d.mts +0 -39
- package/dist/components/Tabs.d.mts.map +0 -1
- package/dist/components/Tabs.d.ts.map +0 -1
- package/dist/components/Tabs.js.map +0 -1
- package/dist/components/Tabs.mjs.map +0 -1
- package/dist/components/Tag.d.mts +0 -14
- package/dist/components/Tag.d.mts.map +0 -1
- package/dist/components/Tag.d.ts.map +0 -1
- package/dist/components/Tag.js.map +0 -1
- package/dist/components/Tag.mjs.map +0 -1
- package/dist/components/TagPicker.d.mts +0 -91
- package/dist/components/TagPicker.d.mts.map +0 -1
- package/dist/components/TagPicker.d.ts.map +0 -1
- package/dist/components/TagPicker.js.map +0 -1
- package/dist/components/TagPicker.mjs.map +0 -1
- package/dist/components/Tile.d.mts +0 -20
- package/dist/components/Tile.d.mts.map +0 -1
- package/dist/components/Tile.d.ts.map +0 -1
- package/dist/components/Tile.js.map +0 -1
- package/dist/components/Tile.mjs.map +0 -1
- package/dist/components/Toast.d.mts +0 -34
- package/dist/components/Toast.d.mts.map +0 -1
- package/dist/components/Toast.d.ts.map +0 -1
- package/dist/components/Toast.js.map +0 -1
- package/dist/components/Toast.mjs.map +0 -1
- package/dist/components/Tooltip.d.mts +0 -8
- package/dist/components/Tooltip.d.mts.map +0 -1
- package/dist/components/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip.js.map +0 -1
- package/dist/components/Tooltip.mjs.map +0 -1
- package/dist/hooks/use-composed-refs.d.mts +0 -3
- package/dist/hooks/use-composed-refs.d.mts.map +0 -1
- package/dist/hooks/use-composed-refs.d.ts.map +0 -1
- package/dist/hooks/use-composed-refs.js.map +0 -1
- package/dist/hooks/use-composed-refs.mjs.map +0 -1
- package/dist/hooks/use-id.d.mts +0 -2
- package/dist/hooks/use-id.d.mts.map +0 -1
- package/dist/hooks/use-id.d.ts.map +0 -1
- package/dist/hooks/use-id.js.map +0 -1
- package/dist/hooks/use-id.mjs.map +0 -1
- package/dist/hooks/use-mobile.d.mts +0 -2
- package/dist/hooks/use-mobile.d.mts.map +0 -1
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-mobile.js.map +0 -1
- package/dist/hooks/use-mobile.mjs.map +0 -1
- package/dist/hooks/use-prefers-reduced-motion.d.mts +0 -2
- package/dist/hooks/use-prefers-reduced-motion.d.mts.map +0 -1
- package/dist/hooks/use-prefers-reduced-motion.d.ts.map +0 -1
- package/dist/hooks/use-prefers-reduced-motion.js.map +0 -1
- package/dist/hooks/use-prefers-reduced-motion.mjs.map +0 -1
- package/dist/hooks/use-toast.d.mts +0 -45
- package/dist/hooks/use-toast.d.mts.map +0 -1
- package/dist/hooks/use-toast.d.ts.map +0 -1
- package/dist/hooks/use-toast.js.map +0 -1
- package/dist/hooks/use-toast.mjs.map +0 -1
- package/dist/index.d.mts +0 -96
- package/dist/index.d.mts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/lib/cmdk.d.mts +0 -124
- package/dist/lib/cmdk.d.mts.map +0 -1
- package/dist/lib/cmdk.d.ts.map +0 -1
- package/dist/lib/cmdk.js.map +0 -1
- package/dist/lib/cmdk.mjs.map +0 -1
- package/dist/lib/command-score.d.mts +0 -2
- package/dist/lib/command-score.d.mts.map +0 -1
- package/dist/lib/command-score.d.ts.map +0 -1
- package/dist/lib/command-score.js.map +0 -1
- package/dist/lib/command-score.mjs.map +0 -1
- package/dist/lib/image-toolbar-placement.d.mts +0 -32
- package/dist/lib/image-toolbar-placement.d.mts.map +0 -1
- package/dist/lib/image-toolbar-placement.d.ts.map +0 -1
- package/dist/lib/image-toolbar-placement.js.map +0 -1
- package/dist/lib/image-toolbar-placement.mjs.map +0 -1
- package/dist/lib/utils.d.mts +0 -4
- package/dist/lib/utils.d.mts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/utils.mjs.map +0 -1
- package/dist/note-editor.d.mts +0 -14
- package/dist/note-editor.d.mts.map +0 -1
- package/dist/note-editor.d.ts.map +0 -1
- package/dist/note-editor.js.map +0 -1
- package/dist/note-editor.mjs.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var
|
|
4
|
-
//# sourceMappingURL=Pagination.js.map
|
|
3
|
+
"use strict";var i=require("react/jsx-runtime"),F=require("../assets/js/tokens.js"),P=require("./Button.js"),x=require("../lib/utils.js"),z=require("@medway-ui/icons"),g=require("react"),S=Object.defineProperty,$=Object.defineProperties,H=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,C=(a,e,r)=>e in a?S(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,f=(a,e)=>{for(var r in e||(e={}))R.call(e,r)&&C(a,r,e[r]);if(b)for(var r of b(e))E.call(e,r)&&C(a,r,e[r]);return a},h=(a,e)=>$(a,H(e)),m=(a,e)=>{var r={};for(var s in a)R.call(a,s)&&e.indexOf(s)<0&&(r[s]=a[s]);if(a!=null&&b)for(var s of b(a))e.indexOf(s)<0&&E.call(a,s)&&(r[s]=a[s]);return r};const W={regular:"regular-soft",emphasis:"emphasis-soft",error:"error-soft",warning:"warning-soft",success:"success-soft",outlined:"regular-basic"};function L(a){var e=a,{className:r}=e,s=m(e,["className"]);return i.jsx("nav",f({"aria-label":"Pagina\xE7\xE3o",className:x.cn("flex w-full flex-wrap items-center justify-between gap-4",r)},s))}function I(a){var e=a,{className:r}=e,s=m(e,["className"]);return i.jsx("ul",f({className:x.cn("flex min-w-0 max-w-full flex-row flex-wrap items-center justify-center gap-2",r)},s))}function y(a){var e=a,{count:r,label:s="itens",className:n}=e,t=m(e,["count","label","className"]);return i.jsx("p",h(f({className:x.cn("text-xs font-medium text-gray-foreground-muted",n)},t),{children:s==="itens"?i.jsxs(i.Fragment,{children:["Mostrando"," ",i.jsx("span",{className:"font-semibold text-gray-foreground",children:r})," ",s]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"font-semibold text-gray-foreground",children:r})," ",s]})}))}function w(a){var e=a,{className:r}=e,s=m(e,["className"]);return i.jsx("li",f({className:r},s))}const k=g.forwardRef(function(a,e){var r=a,{className:s,isActive:n,iconLeft:t,iconRight:o,size:l="md",variant:u="regular",activeVariant:p,inactiveVariant:d}=r,j=m(r,["className","isActive","iconLeft","iconRight","size","variant","activeVariant","inactiveVariant"]);return i.jsx(P.Button,h(f({ref:e,"aria-current":n?"page":void 0,variant:(()=>{var N;return n&&p?p:!n&&d?d:n?u:(N=W[u])!=null?N:u})(),className:x.cn("transition-none",s),size:l,iconLeft:t,iconRight:o},j),{children:j.children}))}),q=g.forwardRef(function(a,e){var r=a,{className:s,size:n="md",variant:t="regular-basic"}=r,o=m(r,["className","size","variant"]);return i.jsx(P.Button,h(f({ref:e,"aria-label":"P\xE1gina anterior",className:s,iconLeft:i.jsx(z.ChevronLeftDuo,{}),variant:t,size:n},o),{children:o.children||"Anterior"}))}),M=g.forwardRef(function(a,e){var r=a,{className:s,size:n="md",variant:t="regular-basic"}=r,o=m(r,["className","size","variant"]);return i.jsx(P.Button,h(f({ref:e,className:s,variant:t,iconRight:i.jsx(z.ChevronRightDuo,{}),size:n},o),{children:o.children||"Pr\xF3ximo"}))});function V(a){var e=a,{className:r,size:s="md"}=e,n=m(e,["className","size"]);return i.jsx("span",h(f({"aria-hidden":!0,className:x.cn("flex items-center justify-center text-gray-foreground-muted",{sm:"size-8",md:"size-10",lg:"size-12"}[s],r)},n),{children:i.jsx(z.MoreHorizontal,{className:"h-4 w-4"})}))}function A(a,e,r=2){const s=[];if(e<=r+2)for(let n=1;n<=e;n++)s.push(n);else{const n=Math.floor(r/2);if(a<=n+1){for(let t=1;t<=r+1;t++)s.push(t);r+1<e&&s.push(-1,e)}else if(a>=e-n){s.push(1),e-r>1&&s.push(-1);for(let t=e-r;t<=e;t++)s.push(t)}else{const t=a-n,o=a+n;s.push(1),t>2&&s.push(-1);for(let l=t;l<=o;l++)s.push(l);o<e-1&&s.push(-1),s.push(e)}}return s}function Q({currentPage:a,totalPages:e,maxVisibleItems:r,onPageChange:s,itemsPerPage:n,totalItems:t,className:o,responsive:l=!0,size:u="md",variant:p="regular"}){const[d,j]=g.useState(!1);g.useEffect(()=>{if(typeof window=="undefined"||!l)return;const c=parseInt(F.screens.tablet),v=()=>{j(window.innerWidth<=c)};return window.addEventListener("resize",v),v(),()=>window.removeEventListener("resize",v)},[l]);const N=typeof r=="number"?r:l&&d?0:2,O=l&&d,B=l?"max-[500px]:hidden":void 0,D=()=>A(a,e,N);return i.jsxs(L,{className:o,children:[n!==void 0&&!O?i.jsx(y,{count:n,label:"itens"}):i.jsx("div",{}),i.jsxs(I,{className:l?"max-[500px]:w-full max-[500px]:justify-between":void 0,children:[i.jsx(w,{children:i.jsx(q,{onClick:()=>s(Math.max(1,a-1)),disabled:a<=1,size:u})}),D().map((c,v)=>i.jsx(w,{className:B,children:c===-1?i.jsx(V,{size:u}):i.jsx(k,{"aria-label":`P\xE1gina ${c}`,onClick:()=>{c!==a&&s(c)},isActive:c===a,size:u,variant:p,children:c})},c===-1?`ellipsis-${v}`:c)),i.jsx(w,{children:i.jsx(M,{onClick:()=>s(Math.min(e,a+1)),disabled:a>=e,size:u})})]}),t!==void 0&&!O?i.jsx(y,{count:t,label:"total"}):i.jsx("div",{})]})}exports.Pagination=Q,exports.PaginationContent=I,exports.PaginationEllipsis=V,exports.PaginationInfo=y,exports.PaginationItem=w,exports.PaginationLink=k,exports.PaginationNext=M,exports.PaginationPrevious=q,exports.PaginationRoot=L,exports.calculatePageNumbers=A;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsx as
|
|
4
|
-
//# sourceMappingURL=Pagination.mjs.map
|
|
3
|
+
import{jsx as n,jsxs as b,Fragment as E}from"react/jsx-runtime";import{screens as B}from"../assets/js/tokens.mjs";import{Button as z}from"./Button.mjs";import{cn as p}from"../lib/utils.mjs";import{ChevronLeftDuo as F,ChevronRightDuo as H,MoreHorizontal as Q}from"@medway-ui/icons";import{forwardRef as y,useState as T,useEffect as U}from"react";var q=Object.defineProperty,G=Object.defineProperties,J=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,R=(a,e,r)=>e in a?q(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)&&R(a,r,e[r]);if(w)for(var r of w(e))L.call(e,r)&&R(a,r,e[r]);return a},h=(a,e)=>G(a,J(e)),f=(a,e)=>{var r={};for(var i in a)C.call(a,i)&&e.indexOf(i)<0&&(r[i]=a[i]);if(a!=null&&w)for(var i of w(a))e.indexOf(i)<0&&L.call(a,i)&&(r[i]=a[i]);return r};const K={regular:"regular-soft",emphasis:"emphasis-soft",error:"error-soft",warning:"warning-soft",success:"success-soft",outlined:"regular-basic"};function I(a){var e=a,{className:r}=e,i=f(e,["className"]);return n("nav",m({"aria-label":"Pagina\xE7\xE3o",className:p("flex w-full flex-wrap items-center justify-between gap-4",r)},i))}function M(a){var e=a,{className:r}=e,i=f(e,["className"]);return n("ul",m({className:p("flex min-w-0 max-w-full flex-row flex-wrap items-center justify-center gap-2",r)},i))}function j(a){var e=a,{count:r,label:i="itens",className:s}=e,t=f(e,["count","label","className"]);return n("p",h(m({className:p("text-xs font-medium text-gray-foreground-muted",s)},t),{children:i==="itens"?b(E,{children:["Mostrando"," ",n("span",{className:"font-semibold text-gray-foreground",children:r})," ",i]}):b(E,{children:[n("span",{className:"font-semibold text-gray-foreground",children:r})," ",i]})}))}function P(a){var e=a,{className:r}=e,i=f(e,["className"]);return n("li",m({className:r},i))}const V=y(function(a,e){var r=a,{className:i,isActive:s,iconLeft:t,iconRight:o,size:l="md",variant:u="regular",activeVariant:g,inactiveVariant:d}=r,N=f(r,["className","isActive","iconLeft","iconRight","size","variant","activeVariant","inactiveVariant"]);return n(z,h(m({ref:e,"aria-current":s?"page":void 0,variant:(()=>{var x;return s&&g?g:!s&&d?d:s?u:(x=K[u])!=null?x:u})(),className:p("transition-none",i),size:l,iconLeft:t,iconRight:o},N),{children:N.children}))}),k=y(function(a,e){var r=a,{className:i,size:s="md",variant:t="regular-basic"}=r,o=f(r,["className","size","variant"]);return n(z,h(m({ref:e,"aria-label":"P\xE1gina anterior",className:i,iconLeft:n(F,{}),variant:t,size:s},o),{children:o.children||"Anterior"}))}),A=y(function(a,e){var r=a,{className:i,size:s="md",variant:t="regular-basic"}=r,o=f(r,["className","size","variant"]);return n(z,h(m({ref:e,className:i,variant:t,iconRight:n(H,{}),size:s},o),{children:o.children||"Pr\xF3ximo"}))});function $(a){var e=a,{className:r,size:i="md"}=e,s=f(e,["className","size"]);return n("span",h(m({"aria-hidden":!0,className:p("flex items-center justify-center text-gray-foreground-muted",{sm:"size-8",md:"size-10",lg:"size-12"}[i],r)},s),{children:n(Q,{className:"h-4 w-4"})}))}function D(a,e,r=2){const i=[];if(e<=r+2)for(let s=1;s<=e;s++)i.push(s);else{const s=Math.floor(r/2);if(a<=s+1){for(let t=1;t<=r+1;t++)i.push(t);r+1<e&&i.push(-1,e)}else if(a>=e-s){i.push(1),e-r>1&&i.push(-1);for(let t=e-r;t<=e;t++)i.push(t)}else{const t=a-s,o=a+s;i.push(1),t>2&&i.push(-1);for(let l=t;l<=o;l++)i.push(l);o<e-1&&i.push(-1),i.push(e)}}return i}function X({currentPage:a,totalPages:e,maxVisibleItems:r,onPageChange:i,itemsPerPage:s,totalItems:t,className:o,responsive:l=!0,size:u="md",variant:g="regular"}){const[d,N]=T(!1);U(()=>{if(typeof window=="undefined"||!l)return;const c=parseInt(B.tablet),v=()=>{N(window.innerWidth<=c)};return window.addEventListener("resize",v),v(),()=>window.removeEventListener("resize",v)},[l]);const x=typeof r=="number"?r:l&&d?0:2,O=l&&d,S=l?"max-[500px]:hidden":void 0,W=()=>D(a,e,x);return b(I,{className:o,children:[s!==void 0&&!O?n(j,{count:s,label:"itens"}):n("div",{}),b(M,{className:l?"max-[500px]:w-full max-[500px]:justify-between":void 0,children:[n(P,{children:n(k,{onClick:()=>i(Math.max(1,a-1)),disabled:a<=1,size:u})}),W().map((c,v)=>n(P,{className:S,children:c===-1?n($,{size:u}):n(V,{"aria-label":`P\xE1gina ${c}`,onClick:()=>{c!==a&&i(c)},isActive:c===a,size:u,variant:g,children:c})},c===-1?`ellipsis-${v}`:c)),n(P,{children:n(A,{onClick:()=>i(Math.min(e,a+1)),disabled:a>=e,size:u})})]}),t!==void 0&&!O?n(j,{count:t,label:"total"}):n("div",{})]})}export{X as Pagination,M as PaginationContent,$ as PaginationEllipsis,j as PaginationInfo,P as PaginationItem,V as PaginationLink,A as PaginationNext,k as PaginationPrevious,I as PaginationRoot,D as calculatePageNumbers};
|
|
@@ -7,4 +7,3 @@ declare function PopoverContent({ className, align, sideOffset, showArrow, ...pr
|
|
|
7
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare const PopoverAnchor: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
10
|
-
//# sourceMappingURL=Popover.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var a=require("react/jsx-runtime"),n=require("radix-ui"),g=require("../lib/utils.js"),l=require("react"),
|
|
4
|
-
//# sourceMappingURL=Popover.js.map
|
|
3
|
+
"use strict";var a=require("react/jsx-runtime"),n=require("radix-ui"),g=require("../lib/utils.js"),l=require("react"),b=Object.defineProperty,P=Object.defineProperties,w=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,p=(r,e,t)=>e in r?b(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,i=(r,e)=>{for(var t in e||(e={}))f.call(e,t)&&p(r,t,e[t]);if(s)for(var t of s(e))c.call(e,t)&&p(r,t,e[t]);return r},O=(r,e)=>P(r,w(e)),u=(r,e)=>{var t={};for(var o in r)f.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(r!=null&&s)for(var o of s(r))e.indexOf(o)<0&&c.call(r,o)&&(t[o]=r[o]);return t};function h(r){var e=u(r,[]);return a.jsx(n.Popover.Root,i({"data-slot":"popover"},e))}const j=l.forwardRef(function(r,e){return a.jsx(n.Popover.Trigger,i({ref:e,"data-slot":"popover-trigger"},r))});function x(r){var e=r,{className:t,align:o="center",sideOffset:v=4,showArrow:m=!1}=e,d=u(e,["className","align","sideOffset","showArrow"]);return a.jsx(n.Popover.Portal,{children:a.jsxs(n.Popover.Content,O(i({align:o,className:g.cn("z-50 w-72 rounded-md border border-gray-stroke-muted bg-surface-card p-4 text-gray-foreground shadow-level-3 outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:!animate-none",t),"data-slot":"popover-content",sideOffset:v},d),{children:[d.children,m&&a.jsx(n.Popover.Arrow,{className:"-my-px fill-surface-card drop-shadow-[0_1px_0_var(--color-gray-stroke-muted)]"})]}))})}l.forwardRef(function(r,e){return a.jsx(n.Popover.Anchor,i({ref:e,"data-slot":"popover-anchor"},r))}),exports.Popover=h,exports.PopoverContent=x,exports.PopoverTrigger=j;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsx as n,jsxs as g}from"react/jsx-runtime";import{Popover as a}from"radix-ui";import{cn as b}from"../lib/utils.mjs";import{forwardRef as l}from"react";var w=Object.defineProperty,O=Object.defineProperties,h=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,c=(r,e,t)=>e in r?w(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,i=(r,e)=>{for(var t in e||(e={}))f.call(e,t)&&c(r,t,e[t]);if(s)for(var t of s(e))p.call(e,t)&&c(r,t,e[t]);return r},y=(r,e)=>O(r,h(e)),m=(r,e)=>{var t={};for(var o in r)f.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(r!=null&&s)for(var o of s(r))e.indexOf(o)<0&&p.call(r,o)&&(t[o]=r[o]);return t};function P(r){var e=m(r,[]);return n(a.Root,i({"data-slot":"popover"},e))}const j=l(function(r,e){return n(a.Trigger,i({ref:e,"data-slot":"popover-trigger"},r))});function x(r){var e=r,{className:t,align:o="center",sideOffset:u=4,showArrow:v=!1}=e,d=m(e,["className","align","sideOffset","showArrow"]);return n(a.Portal,{children:g(a.Content,y(i({align:o,className:b("z-50 w-72 rounded-md border bg-surface-card p-4 text-gray-foreground shadow-
|
|
4
|
-
//# sourceMappingURL=Popover.mjs.map
|
|
3
|
+
import{jsx as n,jsxs as g}from"react/jsx-runtime";import{Popover as a}from"radix-ui";import{cn as b}from"../lib/utils.mjs";import{forwardRef as l}from"react";var w=Object.defineProperty,O=Object.defineProperties,h=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,c=(r,e,t)=>e in r?w(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,i=(r,e)=>{for(var t in e||(e={}))f.call(e,t)&&c(r,t,e[t]);if(s)for(var t of s(e))p.call(e,t)&&c(r,t,e[t]);return r},y=(r,e)=>O(r,h(e)),m=(r,e)=>{var t={};for(var o in r)f.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(r!=null&&s)for(var o of s(r))e.indexOf(o)<0&&p.call(r,o)&&(t[o]=r[o]);return t};function P(r){var e=m(r,[]);return n(a.Root,i({"data-slot":"popover"},e))}const j=l(function(r,e){return n(a.Trigger,i({ref:e,"data-slot":"popover-trigger"},r))});function x(r){var e=r,{className:t,align:o="center",sideOffset:u=4,showArrow:v=!1}=e,d=m(e,["className","align","sideOffset","showArrow"]);return n(a.Portal,{children:g(a.Content,y(i({align:o,className:b("z-50 w-72 rounded-md border border-gray-stroke-muted bg-surface-card p-4 text-gray-foreground shadow-level-3 outline-none 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 motion-reduce:!animate-none",t),"data-slot":"popover-content",sideOffset:u},d),{children:[d.children,v&&n(a.Arrow,{className:"-my-px fill-surface-card drop-shadow-[0_1px_0_var(--color-gray-stroke-muted)]"})]}))})}l(function(r,e){return n(a.Anchor,i({ref:e,"data-slot":"popover-anchor"},r))});export{P as Popover,x as PopoverContent,j as PopoverTrigger};
|
|
@@ -6,4 +6,3 @@ export interface ProgressProps extends ComponentProps<typeof ProgressPrimitive.R
|
|
|
6
6
|
}
|
|
7
7
|
declare function Progress({ className, indicatorClassName, label, value, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export { Progress };
|
|
9
|
-
//# sourceMappingURL=Progress.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var t=require("react/jsx-runtime"),f=require("radix-ui"),
|
|
4
|
-
//# sourceMappingURL=Progress.js.map
|
|
3
|
+
"use strict";var t=require("react/jsx-runtime"),f=require("radix-ui"),x=require("../hooks/use-id.js"),d=require("../lib/utils.js"),g=Object.defineProperty,y=Object.defineProperties,j=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,m=(e,r,a)=>r in e?g(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,O=(e,r)=>{for(var a in r||(r={}))v.call(r,a)&&m(e,a,r[a]);if(o)for(var a of o(r))p.call(r,a)&&m(e,a,r[a]);return e},P=(e,r)=>y(e,j(r)),N=(e,r)=>{var a={};for(var l in e)v.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&o)for(var l of o(e))r.indexOf(l)<0&&p.call(e,l)&&(a[l]=e[l]);return a};function h(e){var r=e,{className:a,indicatorClassName:l,label:s,value:i}=r,n=N(r,["className","indicatorClassName","label","value"]);const c=d.clampPercentage(i!=null?i:0),b=Math.round(c),u=x.useId();return t.jsxs("div",{className:"flex w-full flex-col gap-2",children:[s&&t.jsxs("div",{"data-slot":"progress-label",className:"text-xs font-medium text-gray-foreground-muted",children:[t.jsxs("span",{className:"font-semibold text-gray-foreground",children:[b,"%"]})," ",t.jsx("span",{id:u,children:s})]}),t.jsx(f.Progress.Root,P(O({"data-slot":"progress",className:d.cn("relative flex h-px w-full overflow-x-clip rounded-pill bg-gray-stroke-muted",a),value:i==null?i:c,"aria-labelledby":s&&!n["aria-label"]?u:void 0,"aria-label":s||n["aria-labelledby"]?void 0:"Progresso"},n),{children:t.jsx(f.Progress.Indicator,{"data-slot":"progress-indicator",className:d.cn("relative -top-[0.5px] flex h-0.5 w-full flex-1 bg-primary-stroke transition-transform motion-reduce:transition-none",l),style:{transform:`translateX(-${100-c}%)`}})}))]})}exports.Progress=h;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsxs as
|
|
4
|
-
//# sourceMappingURL=Progress.mjs.map
|
|
3
|
+
import{jsxs as c,jsx as d}from"react/jsx-runtime";import{Progress as m}from"radix-ui";import{useId as x}from"../hooks/use-id.mjs";import{cn as p,clampPercentage as y}from"../lib/utils.mjs";var O=Object.defineProperty,N=Object.defineProperties,P=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,b=(e,r,a)=>r in e?O(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,h=(e,r)=>{for(var a in r||(r={}))u.call(r,a)&&b(e,a,r[a]);if(s)for(var a of s(r))v.call(r,a)&&b(e,a,r[a]);return e},w=(e,r)=>N(e,P(r)),j=(e,r)=>{var a={};for(var l in e)u.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&s)for(var l of s(e))r.indexOf(l)<0&&v.call(e,l)&&(a[l]=e[l]);return a};function I(e){var r=e,{className:a,indicatorClassName:l,label:t,value:o}=r,i=j(r,["className","indicatorClassName","label","value"]);const n=y(o!=null?o:0),g=Math.round(n),f=x();return c("div",{className:"flex w-full flex-col gap-2",children:[t&&c("div",{"data-slot":"progress-label",className:"text-xs font-medium text-gray-foreground-muted",children:[c("span",{className:"font-semibold text-gray-foreground",children:[g,"%"]})," ",d("span",{id:f,children:t})]}),d(m.Root,w(h({"data-slot":"progress",className:p("relative flex h-px w-full overflow-x-clip rounded-pill bg-gray-stroke-muted",a),value:o==null?o:n,"aria-labelledby":t&&!i["aria-label"]?f:void 0,"aria-label":t||i["aria-labelledby"]?void 0:"Progresso"},i),{children:d(m.Indicator,{"data-slot":"progress-indicator",className:p("relative -top-[0.5px] flex h-0.5 w-full flex-1 bg-primary-stroke transition-transform motion-reduce:transition-none",l),style:{transform:`translateX(-${100-n}%)`}})}))]})}export{I as Progress};
|
|
@@ -11,4 +11,3 @@ export interface ProgressCircleProps extends ComponentProps<"div"> {
|
|
|
11
11
|
}
|
|
12
12
|
declare function ProgressCircle({ className, indicatorClassName, trackClassName, valueClassName, label, labelClassName, style, value, size, strokeWidth, ...props }: ProgressCircleProps): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export { ProgressCircle };
|
|
14
|
-
//# sourceMappingURL=ProgressCircle.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var l=require("react/jsx-runtime"),i=require("../lib/utils.js"),z=Object.defineProperty,$=Object.defineProperties,D=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,g=(e,r,a)=>r in e?z(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,N=(e,r)=>{for(var a in r||(r={}))y.call(r,a)&&g(e,a,r[a]);if(c)for(var a of c(r))b.call(r,a)&&g(e,a,r[a]);return e},S=(e,r)=>$(e,D(r)),W=(e,r)=>{var a={};for(var s in e)y.call(e,s)&&r.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&c)for(var s of c(e))r.indexOf(s)<0&&b.call(e,s)&&(a[s]=e[s]);return a};const I=18,q=32;function E(e){var r=e,{className:a,indicatorClassName:s,trackClassName:j,valueClassName:k,label:d,labelClassName:C,style:O,value:n=0,size:t=96,strokeWidth:u=2}=r,m=W(r,["className","indicatorClassName","trackClassName","valueClassName","label","labelClassName","style","value","size","strokeWidth"]),p
|
|
4
|
-
//# sourceMappingURL=ProgressCircle.js.map
|
|
3
|
+
"use strict";var l=require("react/jsx-runtime"),i=require("../lib/utils.js"),z=Object.defineProperty,$=Object.defineProperties,D=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,g=(e,r,a)=>r in e?z(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,N=(e,r)=>{for(var a in r||(r={}))y.call(r,a)&&g(e,a,r[a]);if(c)for(var a of c(r))b.call(r,a)&&g(e,a,r[a]);return e},S=(e,r)=>$(e,D(r)),W=(e,r)=>{var a={};for(var s in e)y.call(e,s)&&r.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&c)for(var s of c(e))r.indexOf(s)<0&&b.call(e,s)&&(a[s]=e[s]);return a};const I=18,q=32;function E(e){var r=e,{className:a,indicatorClassName:s,trackClassName:j,valueClassName:k,label:d,labelClassName:C,style:O,value:n=0,size:t=96,strokeWidth:u=2}=r,m=W(r,["className","indicatorClassName","trackClassName","valueClassName","label","labelClassName","style","value","size","strokeWidth"]),h,p;const o=typeof n=="string",v=o?0:Math.round(i.clampPercentage(n)),f=(t-u)/2,x=f*2*Math.PI,P=x-v/100*x,w=Math.max(I,Math.min(t/5,q)),M=Math.max(10,Math.min(t/9,16));return l.jsxs("div",S(N({"data-slot":"progress-circle",className:i.cn("relative inline-flex items-center justify-center",a),style:N({width:t,height:t},O),role:"progressbar","aria-label":m["aria-labelledby"]?void 0:(p=(h=m["aria-label"])!=null?h:d)!=null?p:"Progresso","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?void 0:v,"aria-valuetext":o?n:void 0},m),{children:[l.jsxs("svg",{className:"absolute inset-0 -rotate-90",width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[l.jsx("circle",{"data-slot":"progress-circle-track",cx:t/2,cy:t/2,r:f,stroke:"currentColor",strokeWidth:u,fill:"none",className:i.cn("text-gray-stroke-muted",j)}),l.jsx("circle",{"data-slot":"progress-circle-indicator",cx:t/2,cy:t/2,r:f,stroke:"currentColor",strokeWidth:u,fill:"none",strokeDasharray:x,strokeDashoffset:P,strokeLinecap:"round",className:i.cn("text-primary-stroke transition-[stroke-dashoffset] duration-300 ease-in-out motion-reduce:transition-none",s)})]}),l.jsxs("div",{"data-slot":"progress-circle-content",className:"relative z-10 flex flex-col items-center justify-center px-2 text-sm font-medium text-gray-foreground-muted",children:[l.jsxs("div",{children:[l.jsx("span",{className:i.cn("mr-px font-semibold",k),style:{fontSize:`${w}px`},children:o?n:v}),!o&&"%"]}),d&&l.jsx("div",{"data-slot":"progress-circle-label",className:i.cn("text-center font-medium leading-tight text-gray-foreground-muted",C),style:{fontSize:`${M}px`},children:d})]})]}))}exports.ProgressCircle=E;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsxs as n,jsx as c}from"react/jsx-runtime";import{cn as
|
|
4
|
-
//# sourceMappingURL=ProgressCircle.mjs.map
|
|
3
|
+
import{jsxs as n,jsx as c}from"react/jsx-runtime";import{cn as o,clampPercentage as $}from"../lib/utils.mjs";var D=Object.defineProperty,S=Object.defineProperties,W=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,N=(e,r,a)=>r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,k=(e,r)=>{for(var a in r||(r={}))b.call(r,a)&&N(e,a,r[a]);if(d)for(var a of d(r))g.call(r,a)&&N(e,a,r[a]);return e},I=(e,r)=>S(e,W(r)),E=(e,r)=>{var a={};for(var l in e)b.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&d)for(var l of d(e))r.indexOf(l)<0&&g.call(e,l)&&(a[l]=e[l]);return a};const L=18,B=32;function F(e){var r=e,{className:a,indicatorClassName:l,trackClassName:C,valueClassName:O,label:m,labelClassName:j,style:P,value:i=0,size:t=96,strokeWidth:u=2}=r,f=E(r,["className","indicatorClassName","trackClassName","valueClassName","label","labelClassName","style","value","size","strokeWidth"]),x,y;const s=typeof i=="string",v=s?0:Math.round($(i)),p=(t-u)/2,h=p*2*Math.PI,w=h-v/100*h,M=Math.max(L,Math.min(t/5,B)),z=Math.max(10,Math.min(t/9,16));return n("div",I(k({"data-slot":"progress-circle",className:o("relative inline-flex items-center justify-center",a),style:k({width:t,height:t},P),role:"progressbar","aria-label":f["aria-labelledby"]?void 0:(y=(x=f["aria-label"])!=null?x:m)!=null?y:"Progresso","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s?void 0:v,"aria-valuetext":s?i:void 0},f),{children:[n("svg",{className:"absolute inset-0 -rotate-90",width:t,height:t,viewBox:`0 0 ${t} ${t}`,children:[c("circle",{"data-slot":"progress-circle-track",cx:t/2,cy:t/2,r:p,stroke:"currentColor",strokeWidth:u,fill:"none",className:o("text-gray-stroke-muted",C)}),c("circle",{"data-slot":"progress-circle-indicator",cx:t/2,cy:t/2,r:p,stroke:"currentColor",strokeWidth:u,fill:"none",strokeDasharray:h,strokeDashoffset:w,strokeLinecap:"round",className:o("text-primary-stroke transition-[stroke-dashoffset] duration-300 ease-in-out motion-reduce:transition-none",l)})]}),n("div",{"data-slot":"progress-circle-content",className:"relative z-10 flex flex-col items-center justify-center px-2 text-sm font-medium text-gray-foreground-muted",children:[n("div",{children:[c("span",{className:o("mr-px font-semibold",O),style:{fontSize:`${M}px`},children:s?i:v}),!s&&"%"]}),m&&c("div",{"data-slot":"progress-circle-label",className:o("text-center font-medium leading-tight text-gray-foreground-muted",j),style:{fontSize:`${z}px`},children:m})]})]}))}export{F as ProgressCircle};
|
|
@@ -11,4 +11,3 @@ interface RadioGroupItemProps extends ComponentProps<typeof RadioGroupPrimitive.
|
|
|
11
11
|
declare const RadioGroupItem: import("react").ForwardRefExoticComponent<Omit<RadioGroupItemProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
export { RadioGroup, RadioGroupItem, radioGroupVariants };
|
|
13
13
|
export type { RadioGroupItemProps };
|
|
14
|
-
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var
|
|
4
|
-
//# sourceMappingURL=RadioGroup.js.map
|
|
3
|
+
"use strict";var i=require("react/jsx-runtime"),m=require("react"),s=require("radix-ui"),h=require("class-variance-authority"),d=require("../lib/utils.js"),k=Object.defineProperty,y=Object.defineProperties,j=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,r,a)=>r in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,b=(e,r)=>{for(var a in r||(r={}))c.call(r,a)&&u(e,a,r[a]);if(o)for(var a of o(r))l.call(r,a)&&u(e,a,r[a]);return e},z=(e,r)=>y(e,j(r)),g=(e,r)=>{var a={};for(var t in e)c.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&o)for(var t of o(e))r.indexOf(t)<0&&l.call(e,t)&&(a[t]=e[t]);return a};const x={sm:"size-1.5",md:"size-1.5",lg:"size-2"},p=h.cva("inline-flex items-center justify-center place-items-center gap-2 rounded-pill whitespace-nowrap transition-[background-color,border-color,box-shadow] disabled:pointer-events-none shrink-0 [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-4 focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-surface-card border-2 border-gray-stroke-muted enabled:hover:ring-4 data-[state=unchecked]:enabled:hover:ring-state-hover data-[state=unchecked]:enabled:hover:border-gray-stroke disabled:bg-gray-background-soft-muted data-[state=checked]:bg-primary-background-fill data-[state=checked]:border-primary-background-fill data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis data-[state=checked]:enabled:hover:border-primary-background-fill-emphasis data-[state=checked]:enabled:hover:ring-state-active disabled:data-[state=checked]:bg-gray-background-soft-muted disabled:data-[state=checked]:border-gray-stroke-muted data-[state=unchecked]:enabled:hover:border-gray-stroke data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis"},size:{sm:"size-4",md:"size-5",lg:"size-6"}},defaultVariants:{variant:"regular",size:"md"}});function O(e){var r=e,{className:a}=r,t=g(r,["className"]);return i.jsx(s.RadioGroup.Root,b({"data-slot":"radio-group",className:d.cn("grid gap-3",a)},t))}const w=m.forwardRef(function(e,r){var a=e,{className:t,size:n,variant:v}=a,f=g(a,["className","size","variant"]);return i.jsx(s.RadioGroup.Item,z(b({ref:r,"data-slot":"radio-group-item",className:d.cn("group peer aspect-square size-4 shrink-0 rounded-full outline-none disabled:cursor-not-allowed",p({size:n,variant:v}),t)},f),{children:i.jsx(s.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:i.jsx("span",{className:d.cn("block rounded-full bg-primary-foreground-onfill group-data-[disabled]:bg-gray-background-fill-muted",x[n||"md"])})})}))});exports.RadioGroup=O,exports.RadioGroupItem=w,exports.radioGroupVariants=p;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsx as o}from"react/jsx-runtime";import{forwardRef as v}from"react";import{RadioGroup as i}from"radix-ui";import{
|
|
4
|
-
//# sourceMappingURL=RadioGroup.mjs.map
|
|
3
|
+
import{jsx as o}from"react/jsx-runtime";import{forwardRef as v}from"react";import{RadioGroup as i}from"radix-ui";import{cva as h}from"class-variance-authority";import{cn as d}from"../lib/utils.mjs";var k=Object.defineProperty,y=Object.defineProperties,z=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,r,a)=>r in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,b=(e,r)=>{for(var a in r||(r={}))l.call(r,a)&&u(e,a,r[a]);if(s)for(var a of s(r))c.call(r,a)&&u(e,a,r[a]);return e},O=(e,r)=>y(e,z(r)),m=(e,r)=>{var a={};for(var t in e)l.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&s)for(var t of s(e))r.indexOf(t)<0&&c.call(e,t)&&(a[t]=e[t]);return a};const j={sm:"size-1.5",md:"size-1.5",lg:"size-2"},p=h("inline-flex items-center justify-center place-items-center gap-2 rounded-pill whitespace-nowrap transition-[background-color,border-color,box-shadow] disabled:pointer-events-none shrink-0 [&_svg]:shrink-0 hover:cursor-pointer focus:outline-0 focus-visible:ring-4 focus-visible:ring-state-focus [grid-template-areas:'stack']",{variants:{variant:{regular:"bg-surface-card border-2 border-gray-stroke-muted enabled:hover:ring-4 data-[state=unchecked]:enabled:hover:ring-state-hover data-[state=unchecked]:enabled:hover:border-gray-stroke disabled:bg-gray-background-soft-muted data-[state=checked]:bg-primary-background-fill data-[state=checked]:border-primary-background-fill data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis data-[state=checked]:enabled:hover:border-primary-background-fill-emphasis data-[state=checked]:enabled:hover:ring-state-active disabled:data-[state=checked]:bg-gray-background-soft-muted disabled:data-[state=checked]:border-gray-stroke-muted data-[state=unchecked]:enabled:hover:border-gray-stroke data-[state=checked]:enabled:hover:bg-primary-background-fill-emphasis"},size:{sm:"size-4",md:"size-5",lg:"size-6"}},defaultVariants:{variant:"regular",size:"md"}});function w(e){var r=e,{className:a}=r,t=m(r,["className"]);return o(i.Root,b({"data-slot":"radio-group",className:d("grid gap-3",a)},t))}const N=v(function(e,r){var a=e,{className:t,size:n,variant:g}=a,f=m(a,["className","size","variant"]);return o(i.Item,O(b({ref:r,"data-slot":"radio-group-item",className:d("group peer aspect-square size-4 shrink-0 rounded-full outline-none disabled:cursor-not-allowed",p({size:n,variant:g}),t)},f),{children:o(i.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:o("span",{className:d("block rounded-full bg-primary-foreground-onfill group-data-[disabled]:bg-gray-background-fill-muted",j[n||"md"])})})}))});export{w as RadioGroup,N as RadioGroupItem,p as radioGroupVariants};
|
|
@@ -92,4 +92,3 @@ declare function RankingPerformance({ answered, correct, minQuestions, className
|
|
|
92
92
|
declare function RankingButton({ children, className, onClick, ...props }: RankingButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
93
93
|
export { Ranking, RankingHeader, RankingHeaderCell, RankingBody, RankingItem, RankingNumber, RankingTopicColumn, RankingTopicContent, RankingSpecialty, RankingTopic, RankingSuperFocus, RankingAssigneesColumn, RankingAssigneeLabel, RankingAssigneeGroup, RankingAssigneeItem, RankingPriority, RankingQuestions, RankingPerformance, RankingButton, };
|
|
94
94
|
export type { RankingProps, RankingHeaderProps, RankingHeaderCellProps, RankingItemProps, RankingNumberProps, RankingTopicColumnProps, RankingTopicContentProps, RankingSpecialtyProps, RankingTopicProps, RankingSuperFocusProps, RankingAssigneesColumnProps, RankingAssigneeLabelProps, RankingAssigneeGroupProps, RankingAssigneeItemProps, RankingPriorityProps, RankingQuestionsProps, RankingPerformanceProps, RankingButtonProps, PerformanceData, ProgressStatusKey, };
|
|
95
|
-
//# sourceMappingURL=Ranking.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var n=require("react/jsx-runtime"),i=require("../lib/utils.js"),u=require("@medway-ui/icons"),b=require("./Button.js"),p=require("./Avatar.js"),v=require("./Tag.js"),x=require("./Tooltip.js"),F=Object.defineProperty,M=Object.defineProperties,E=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(r,e,s)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,l=(r,e)=>{for(var s in e||(e={}))y.call(e,s)&&w(r,s,e[s]);if(h)for(var s of h(e))k.call(e,s)&&w(r,s,e[s]);return r},c=(r,e)=>M(r,E(e)),o=(r,e)=>{var s={};for(var a in r)y.call(r,a)&&e.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&h)for(var a of h(r))e.indexOf(a)<0&&k.call(r,a)&&(s[a]=r[a]);return s};function B(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:n.jsx("table",c(l({className:i.cn("w-full border-collapse text-left",a)},t),{children:s}))})}function D(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("thead",c(l({className:i.cn("h-11 border-b border-gray-stroke-muted bg-surface-card",a)},t),{children:n.jsx("tr",{children:s})}))}function I(r){var e=r,{children:s,className:a,tooltip:t,highlight:d}=e,m=o(e,["children","className","tooltip","highlight"]);return n.jsx("th",c(l({className:i.cn("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",a)},m),{children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:i.cn(d&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:s}),t&&n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:n.jsx(b.Button,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:n.jsx(u.Info,{"aria-hidden":"true",className:"size-4"})})}),n.jsx(x.TooltipContent,{children:t})]})})]})}))}function S(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tbody",c(l({className:i.cn("bg-surface-card",a)},t),{children:s}))}function L(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tr",c(l({className:i.cn("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",a)},t),{children:s}))}function Q(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",{className:"py-4 pl-5 align-middle",children:n.jsx("div",c(l({className:i.cn("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",a)},t),{children:s}))})}function W(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex items-center gap-5",a),children:n.jsx("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:s})})}))}function G(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",a)},t),{children:s}))}function H(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",a)},t),{children:s}))}function X(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-5",a)},t),{children:s}))}function Y(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx(v.Tag,c(l({className:i.cn("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",a)},t),{icon:n.jsx(u.CheckboxFill,{className:"text-primary-foreground"}),children:s}))}function Z(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex flex-col items-start gap-2",a),children:s})}))}function J(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("p",c(l({className:i.cn("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",a)},t),{children:s}))}function K(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("avatar-group flex shrink-0 items-center gap-2",a)},t),{children:s}))}function U(r){var e=r,{src:s,alt:a,fallback:t="?",className:d,tooltip:m}=e,g=o(e,["src","alt","fallback","className","tooltip"]);const f=n.jsxs(p.Avatar,c(l({size:"sm",className:i.cn("ring-2 ring-background",d)},g),{children:[n.jsx(p.AvatarImage,{src:s,alt:a}),n.jsx(p.AvatarFallback,{children:t})]}));return m?n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:f}),n.jsx(x.TooltipContent,{children:m})]})}):f}function V(r){var e=r,{children:s,className:a,icon:t}=e,d=o(e,["children","className","icon"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx(v.Tag,{variant:"regular-soft",className:a,icon:t,children:s})}))}function _({className:r,percentage:e,label:s}){return n.jsx("div",{role:"progressbar","aria-label":s,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i.clampPercentage(e)),className:i.cn("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-100",r),children:n.jsx("div",{className:i.cn("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-all duration-300"),style:{width:`${i.clampPercentage(e)}%`}})})}function ee(r){var e=r,{questions:s,answered:a,className:t}=e,d=o(e,["questions","answered","className"]);const m=a>0&&s>0?i.clampPercentage(a/s*100):0;return a===0?n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:n.jsx(u.RemoveMinus,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),n.jsx("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsxs("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[n.jsx("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-4",children:n.jsxs("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[n.jsx("span",{className:"font-semibold text-gray-foreground",children:a})," ",a>1?"respondidas":"respondida"]})}),n.jsx(_,{percentage:m,label:`${a} ${a>1?"respondidas":"respondida"}`})]})}))}const re={notStarted:{icon:u.RemoveMinus,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:u.Warning,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:u.Check,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:u.CloseMd,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function ne(r,e,s){return[[r,"notStarted"],[e,"minNotReached"],[s>=80,"dominated"],[!0,"notDominated"]].find(([a])=>a)[1]}function se(r){var e=r,{answered:s,correct:a,minQuestions:t,className:d}=e,m=o(e,["answered","correct","minQuestions","className"]);const g=s>0?a/s*100:0,f=s===0,C=s<t,R=t-s,T=ne(f,C,g),{icon:z,bgColor:P,iconColor:q,titleClassName:O,statusLabel:N,title:$,subtitle:A}=re[T],j={progress:g,correct:a,answered:s,remainingQuestions:R};return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},m),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",d),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:i.cn("flex size-4 items-center justify-center rounded-full",P),children:n.jsx(z,{"aria-hidden":"true",className:i.cn("size-3",q),strokeWidth:2.6})}),n.jsxs("div",{className:"flex flex-col items-start justify-center",children:[N&&n.jsxs("span",{className:"sr-only",children:[N,": "]}),n.jsx("span",{className:i.cn("whitespace-nowrap",O),children:$(j)}),n.jsx("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:A(j)})]})]})})}))}function ae(r){var e=r,{children:s,className:a,onClick:t}=e,d=o(e,["children","className","onClick"]);return n.jsx("td",{className:"px-5 py-4 align-middle",children:n.jsx(b.Button,c(l({variant:"regular-soft",size:"sm",iconRight:n.jsx(u.ArrowRightMd,{className:"size-4"}),onClick:t,className:a},d),{children:s}))})}exports.Ranking=B,exports.RankingAssigneeGroup=K,exports.RankingAssigneeItem=U,exports.RankingAssigneeLabel=J,exports.RankingAssigneesColumn=Z,exports.RankingBody=S,exports.RankingButton=ae,exports.RankingHeader=D,exports.RankingHeaderCell=I,exports.RankingItem=L,exports.RankingNumber=Q,exports.RankingPerformance=se,exports.RankingPriority=V,exports.RankingQuestions=ee,exports.RankingSpecialty=H,exports.RankingSuperFocus=Y,exports.RankingTopic=X,exports.RankingTopicColumn=W,exports.RankingTopicContent=G;
|
|
4
|
-
//# sourceMappingURL=Ranking.js.map
|
|
3
|
+
"use strict";var n=require("react/jsx-runtime"),i=require("../lib/utils.js"),u=require("@medway-ui/icons"),b=require("./Button.js"),p=require("./Avatar.js"),v=require("./Tag.js"),x=require("./Tooltip.js"),F=Object.defineProperty,M=Object.defineProperties,E=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,w=(r,e,s)=>e in r?F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[e]=s,l=(r,e)=>{for(var s in e||(e={}))y.call(e,s)&&w(r,s,e[s]);if(h)for(var s of h(e))k.call(e,s)&&w(r,s,e[s]);return r},c=(r,e)=>M(r,E(e)),o=(r,e)=>{var s={};for(var a in r)y.call(r,a)&&e.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&h)for(var a of h(r))e.indexOf(a)<0&&k.call(r,a)&&(s[a]=r[a]);return s};function I(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:n.jsx("table",c(l({className:i.cn("w-full border-collapse text-left",a)},t),{children:s}))})}function B(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("thead",c(l({className:i.cn("h-11 border-b border-gray-stroke-muted bg-surface-card",a)},t),{children:n.jsx("tr",{children:s})}))}function D(r){var e=r,{children:s,className:a,tooltip:t,highlight:d}=e,m=o(e,["children","className","tooltip","highlight"]);return n.jsx("th",c(l({className:i.cn("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",a)},m),{children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:i.cn(d&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:s}),t&&n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:n.jsx(b.Button,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:n.jsx(u.Info,{"aria-hidden":"true",className:"size-4"})})}),n.jsx(x.TooltipContent,{children:t})]})})]})}))}function S(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tbody",c(l({className:i.cn("bg-surface-card",a)},t),{children:s}))}function L(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("tr",c(l({className:i.cn("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",a)},t),{children:s}))}function Q(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",{className:"py-4 pl-5 align-middle",children:n.jsx("div",c(l({className:i.cn("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",a)},t),{children:s}))})}function W(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex items-center gap-5",a),children:n.jsx("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:s})})}))}function G(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",a)},t),{children:s}))}function H(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",a)},t),{children:s}))}function X(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("span",c(l({className:i.cn("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-sm",a)},t),{children:s}))}function Y(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx(v.Tag,c(l({className:i.cn("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",a)},t),{icon:n.jsx(u.CheckboxFill,{className:"text-primary-foreground"}),children:s}))}function Z(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},t),{children:n.jsx("div",{className:i.cn("flex flex-col items-start gap-2",a),children:s})}))}function J(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("p",c(l({className:i.cn("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",a)},t),{children:s}))}function K(r){var e=r,{children:s,className:a}=e,t=o(e,["children","className"]);return n.jsx("div",c(l({className:i.cn("avatar-group flex shrink-0 items-center gap-2",a)},t),{children:s}))}function U(r){var e=r,{src:s,alt:a,fallback:t="?",className:d,tooltip:m}=e,g=o(e,["src","alt","fallback","className","tooltip"]);const f=n.jsxs(p.Avatar,c(l({size:"sm",tabIndex:m?0:void 0,className:i.cn("ring-2 ring-background",m&&"outline-none focus-visible:ring-4 focus-visible:ring-state-focus",d)},g),{children:[n.jsx(p.AvatarImage,{src:s,alt:a!=null?a:typeof m=="string"?m:""}),n.jsx(p.AvatarFallback,{children:t})]}));return m?n.jsx(x.TooltipProvider,{children:n.jsxs(x.Tooltip,{children:[n.jsx(x.TooltipTrigger,{asChild:!0,children:f}),n.jsx(x.TooltipContent,{children:m})]})}):f}function V(r){var e=r,{children:s,className:a,icon:t}=e,d=o(e,["children","className","icon"]);return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx(v.Tag,{variant:"regular-soft",className:a,icon:t,children:s})}))}function _({className:r,percentage:e,label:s}){return n.jsx("div",{role:"progressbar","aria-label":s,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i.clampPercentage(e)),className:i.cn("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-stroke-muted",r),children:n.jsx("div",{className:i.cn("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-[width] duration-300 motion-reduce:transition-none"),style:{width:`${i.clampPercentage(e)}%`}})})}function ee(r){var e=r,{questions:s,answered:a,className:t}=e,d=o(e,["questions","answered","className"]);const m=a>0&&s>0?i.clampPercentage(a/s*100):0;return a===0?n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:n.jsx(u.RemoveMinus,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),n.jsx("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):n.jsx("td",c(l({className:"px-5 py-4 align-middle"},d),{children:n.jsxs("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[n.jsx("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-xs",children:n.jsxs("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[n.jsx("span",{className:"font-semibold text-gray-foreground",children:a})," ",a>1?"respondidas":"respondida"]})}),n.jsx(_,{percentage:m,label:`${a} ${a>1?"respondidas":"respondida"}`})]})}))}const re={notStarted:{icon:u.RemoveMinus,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:u.Warning,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:u.Check,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:u.CloseMd,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function ne(r,e,s){return[[r,"notStarted"],[e,"minNotReached"],[s>=80,"dominated"],[!0,"notDominated"]].find(([a])=>a)[1]}function se(r){var e=r,{answered:s,correct:a,minQuestions:t,className:d}=e,m=o(e,["answered","correct","minQuestions","className"]);const g=s>0?a/s*100:0,f=s===0,C=s<t,R=t-s,T=ne(f,C,g),{icon:z,bgColor:P,iconColor:q,titleClassName:O,statusLabel:N,title:$,subtitle:A}=re[T],j={progress:g,correct:a,answered:s,remainingQuestions:R};return n.jsx("td",c(l({className:"px-5 py-4 align-middle"},m),{children:n.jsx("div",{className:i.cn("flex min-w-[140px] flex-col items-start justify-center gap-2",d),children:n.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[n.jsx("div",{className:i.cn("flex size-4 items-center justify-center rounded-full",P),children:n.jsx(z,{"aria-hidden":"true",className:i.cn("size-3",q),strokeWidth:2.6})}),n.jsxs("div",{className:"flex flex-col items-start justify-center",children:[N&&n.jsxs("span",{className:"sr-only",children:[N,": "]}),n.jsx("span",{className:i.cn("whitespace-nowrap",O),children:$(j)}),n.jsx("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:A(j)})]})]})})}))}function ae(r){var e=r,{children:s,className:a,onClick:t}=e,d=o(e,["children","className","onClick"]);return n.jsx("td",{className:"px-5 py-4 align-middle",children:n.jsx(b.Button,c(l({variant:"regular-soft",size:"sm",iconRight:n.jsx(u.ArrowRightMd,{className:"size-4"}),onClick:t,className:a},d),{children:s}))})}exports.Ranking=I,exports.RankingAssigneeGroup=K,exports.RankingAssigneeItem=U,exports.RankingAssigneeLabel=J,exports.RankingAssigneesColumn=Z,exports.RankingBody=S,exports.RankingButton=ae,exports.RankingHeader=B,exports.RankingHeaderCell=D,exports.RankingItem=L,exports.RankingNumber=Q,exports.RankingPerformance=se,exports.RankingPriority=V,exports.RankingQuestions=ee,exports.RankingSpecialty=H,exports.RankingSuperFocus=Y,exports.RankingTopic=X,exports.RankingTopicColumn=W,exports.RankingTopicContent=G;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsx as s,jsxs as d,Fragment as b}from"react/jsx-runtime";import{cn as i,clampPercentage as p}from"../lib/utils.mjs";import{ArrowRightMd as L,Info as Q,CloseMd as q,Check as B,Warning as W,RemoveMinus as v,CheckboxFill as G}from"@medway-ui/icons";import{Button as y}from"./Button.mjs";import{Avatar as H,AvatarImage as U,AvatarFallback as X}from"./Avatar.mjs";import{Tag as k}from"./Tag.mjs";import{TooltipProvider as w,Tooltip as C,TooltipTrigger as R,TooltipContent as j}from"./Tooltip.mjs";var Y=Object.defineProperty,Z=Object.defineProperties,J=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,O=(r,e,a)=>e in r?Y(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,l=(r,e)=>{for(var a in e||(e={}))z.call(e,a)&&O(r,a,e[a]);if(h)for(var a of h(e))$.call(e,a)&&O(r,a,e[a]);return r},o=(r,e)=>Z(r,J(e)),c=(r,e)=>{var a={};for(var n in r)z.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&h)for(var n of h(r))e.indexOf(n)<0&&$.call(r,n)&&(a[n]=r[n]);return a};function K(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:s("table",o(l({className:i("w-full border-collapse text-left",n)},t),{children:a}))})}function V(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("thead",o(l({className:i("h-11 border-b border-gray-stroke-muted bg-surface-card",n)},t),{children:s("tr",{children:a})}))}function _(r){var e=r,{children:a,className:n,tooltip:t,highlight:m}=e,u=c(e,["children","className","tooltip","highlight"]);return s("th",o(l({className:i("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",n)},u),{children:d("div",{className:"flex items-center gap-1.5",children:[s("span",{className:i(m&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:a}),t&&s(w,{children:d(C,{children:[s(R,{asChild:!0,children:s(y,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:s(Q,{"aria-hidden":"true",className:"size-4"})})}),s(j,{children:t})]})})]})}))}function ee(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tbody",o(l({className:i("bg-surface-card",n)},t),{children:a}))}function re(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tr",o(l({className:i("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",n)},t),{children:a}))}function ae(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",{className:"py-4 pl-5 align-middle",children:s("div",o(l({className:i("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",n)},t),{children:a}))})}function ne(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex items-center gap-5",n),children:s("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:a})})}))}function se(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",n)},t),{children:a}))}function te(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",n)},t),{children:a}))}function ie(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-5",n)},t),{children:a}))}function le(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s(k,o(l({className:i("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",n)},t),{icon:s(G,{className:"text-primary-foreground"}),children:a}))}function oe(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex flex-col items-start gap-2",n),children:a})}))}function ce(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("p",o(l({className:i("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",n)},t),{children:a}))}function de(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("avatar-group flex shrink-0 items-center gap-2",n)},t),{children:a}))}function me(r){var e=r,{src:a,alt:n,fallback:t="?",className:m,tooltip:u}=e,f=c(e,["src","alt","fallback","className","tooltip"]);const g=d(H,o(l({size:"sm",className:i("ring-2 ring-background",m)},f),{children:[s(U,{src:a,alt:n}),s(X,{children:t})]}));return u?s(w,{children:d(C,{children:[s(R,{asChild:!0,children:g}),s(j,{children:u})]})}):g}function ue(r){var e=r,{children:a,className:n,icon:t}=e,m=c(e,["children","className","icon"]);return s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s(k,{variant:"regular-soft",className:n,icon:t,children:a})}))}function fe({className:r,percentage:e,label:a}){return s("div",{role:"progressbar","aria-label":a,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p(e)),className:i("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-100",r),children:s("div",{className:i("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-all duration-300"),style:{width:`${p(e)}%`}})})}function ge(r){var e=r,{questions:a,answered:n,className:t}=e,m=c(e,["questions","answered","className"]);const u=n>0&&a>0?p(n/a*100):0;return n===0?s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:s(v,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),s("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:d("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[s("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-4",children:d("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[s("span",{className:"font-semibold text-gray-foreground",children:n})," ",n>1?"respondidas":"respondida"]})}),s(fe,{percentage:u,label:`${n} ${n>1?"respondidas":"respondida"}`})]})}))}const he={notStarted:{icon:v,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:W,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:B,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:q,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function pe(r,e,a){return[[r,"notStarted"],[e,"minNotReached"],[a>=80,"dominated"],[!0,"notDominated"]].find(([n])=>n)[1]}function Ne(r){var e=r,{answered:a,correct:n,minQuestions:t,className:m}=e,u=c(e,["answered","correct","minQuestions","className"]);const f=a>0?n/a*100:0,g=a===0,T=a<t,P=t-a,A=pe(g,T,f),{icon:E,bgColor:F,iconColor:M,titleClassName:S,statusLabel:N,title:D,subtitle:I}=he[A],x={progress:f,correct:n,answered:a,remainingQuestions:P};return s("td",o(l({className:"px-5 py-4 align-middle"},u),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",m),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:i("flex size-4 items-center justify-center rounded-full",F),children:s(E,{"aria-hidden":"true",className:i("size-3",M),strokeWidth:2.6})}),d("div",{className:"flex flex-col items-start justify-center",children:[N&&d("span",{className:"sr-only",children:[N,": "]}),s("span",{className:i("whitespace-nowrap",S),children:D(x)}),s("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:I(x)})]})]})})}))}function xe(r){var e=r,{children:a,className:n,onClick:t}=e,m=c(e,["children","className","onClick"]);return s("td",{className:"px-5 py-4 align-middle",children:s(y,o(l({variant:"regular-soft",size:"sm",iconRight:s(L,{className:"size-4"}),onClick:t,className:n},m),{children:a}))})}export{K as Ranking,de as RankingAssigneeGroup,me as RankingAssigneeItem,ce as RankingAssigneeLabel,oe as RankingAssigneesColumn,ee as RankingBody,xe as RankingButton,V as RankingHeader,_ as RankingHeaderCell,re as RankingItem,ae as RankingNumber,Ne as RankingPerformance,ue as RankingPriority,ge as RankingQuestions,te as RankingSpecialty,le as RankingSuperFocus,ie as RankingTopic,ne as RankingTopicColumn,se as RankingTopicContent};
|
|
4
|
-
//# sourceMappingURL=Ranking.mjs.map
|
|
3
|
+
import{jsx as s,jsxs as d,Fragment as b}from"react/jsx-runtime";import{cn as i,clampPercentage as p}from"../lib/utils.mjs";import{ArrowRightMd as q,Info as L,CloseMd as Q,Check as B,Warning as W,RemoveMinus as v,CheckboxFill as G}from"@medway-ui/icons";import{Button as y}from"./Button.mjs";import{Avatar as H,AvatarImage as X,AvatarFallback as Y}from"./Avatar.mjs";import{Tag as k}from"./Tag.mjs";import{TooltipProvider as w,Tooltip as C,TooltipTrigger as R,TooltipContent as j}from"./Tooltip.mjs";var Z=Object.defineProperty,J=Object.defineProperties,K=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,O=(r,e,a)=>e in r?Z(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,l=(r,e)=>{for(var a in e||(e={}))z.call(e,a)&&O(r,a,e[a]);if(h)for(var a of h(e))$.call(e,a)&&O(r,a,e[a]);return r},o=(r,e)=>J(r,K(e)),c=(r,e)=>{var a={};for(var n in r)z.call(r,n)&&e.indexOf(n)<0&&(a[n]=r[n]);if(r!=null&&h)for(var n of h(r))e.indexOf(n)<0&&$.call(r,n)&&(a[n]=r[n]);return a};function U(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",{className:"w-full overflow-x-auto rounded-lg border border-gray-stroke-muted",children:s("table",o(l({className:i("w-full border-collapse text-left",n)},t),{children:a}))})}function V(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("thead",o(l({className:i("h-11 border-b border-gray-stroke-muted bg-surface-card",n)},t),{children:s("tr",{children:a})}))}function _(r){var e=r,{children:a,className:n,tooltip:t,highlight:m}=e,u=c(e,["children","className","tooltip","highlight"]);return s("th",o(l({className:i("text-ellipsis whitespace-nowrap px-5 text-sm font-semibold text-gray-foreground first:pr-0",n)},u),{children:d("div",{className:"flex items-center gap-1.5",children:[s("span",{className:i(m&&"flex size-7 shrink-0 items-center justify-center rounded-full bg-primary-foreground-onfill"),children:a}),t&&s(w,{children:d(C,{children:[s(R,{asChild:!0,children:s(y,{type:"button",variant:"regular-basic",size:"sm","aria-label":t,className:"!h-6 !min-h-6 !w-6 !min-w-6 !p-0 text-gray-foreground",iconLeft:s(L,{"aria-hidden":"true",className:"size-4"})})}),s(j,{children:t})]})})]})}))}function ee(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tbody",o(l({className:i("bg-surface-card",n)},t),{children:a}))}function re(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("tr",o(l({className:i("w-full border-t border-solid border-gray-stroke-muted first:border-t-0",n)},t),{children:a}))}function ae(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",{className:"py-4 pl-5 align-middle",children:s("div",o(l({className:i("flex size-7 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap rounded-full bg-primary-foreground text-sm font-semibold text-primary-foreground-onfill",n)},t),{children:a}))})}function ne(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex items-center gap-5",n),children:s("div",{className:"flex shrink-0 items-center gap-5 pr-8",children:a})})}))}function se(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("flex shrink-0 flex-col items-start whitespace-nowrap text-gray-foreground",n)},t),{children:a}))}function te(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-xxs font-medium leading-xxs",n)},t),{children:a}))}function ie(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("span",o(l({className:i("shrink-0 overflow-hidden text-ellipsis font-sans text-sm font-semibold leading-sm",n)},t),{children:a}))}function le(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s(k,o(l({className:i("bg-gradient-to-r from-cm-24 to-secondary-24 text-primary-foreground",n)},t),{icon:s(G,{className:"text-primary-foreground"}),children:a}))}function oe(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("td",o(l({className:"px-5 py-4 align-middle"},t),{children:s("div",{className:i("flex flex-col items-start gap-2",n),children:a})}))}function ce(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("p",o(l({className:i("relative shrink-0 overflow-hidden text-ellipsis whitespace-nowrap text-xxs font-medium leading-xxs text-gray-foreground",n)},t),{children:a}))}function de(r){var e=r,{children:a,className:n}=e,t=c(e,["children","className"]);return s("div",o(l({className:i("avatar-group flex shrink-0 items-center gap-2",n)},t),{children:a}))}function me(r){var e=r,{src:a,alt:n,fallback:t="?",className:m,tooltip:u}=e,f=c(e,["src","alt","fallback","className","tooltip"]);const g=d(H,o(l({size:"sm",tabIndex:u?0:void 0,className:i("ring-2 ring-background",u&&"outline-none focus-visible:ring-4 focus-visible:ring-state-focus",m)},f),{children:[s(X,{src:a,alt:n!=null?n:typeof u=="string"?u:""}),s(Y,{children:t})]}));return u?s(w,{children:d(C,{children:[s(R,{asChild:!0,children:g}),s(j,{children:u})]})}):g}function ue(r){var e=r,{children:a,className:n,icon:t}=e,m=c(e,["children","className","icon"]);return s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s(k,{variant:"regular-soft",className:n,icon:t,children:a})}))}function fe({className:r,percentage:e,label:a}){return s("div",{role:"progressbar","aria-label":a,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(p(e)),className:i("relative h-0.5 w-full overflow-hidden rounded-pill bg-gray-stroke-muted",r),children:s("div",{className:i("absolute inset-y-0 left-0 rounded-pill bg-primary-stroke transition-[width] duration-300 motion-reduce:transition-none"),style:{width:`${p(e)}%`}})})}function ge(r){var e=r,{questions:a,answered:n,className:t}=e,m=c(e,["questions","answered","className"]);const u=n>0&&a>0?p(n/a*100):0;return n===0?s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:"flex size-4 items-center justify-center rounded-full bg-gray-background-soft",children:s(v,{className:"size-3 text-gray-foreground",strokeWidth:2.6})}),s("span",{className:"whitespace-nowrap font-medium text-gray-foreground-muted",children:"N\xE3o iniciado"})]})})})):s("td",o(l({className:"px-5 py-4 align-middle"},m),{children:d("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",t),children:[s("div",{className:"flex shrink-0 items-center gap-0.5 text-xs leading-xs",children:d("span",{className:"relative shrink-0 whitespace-nowrap font-medium text-gray-foreground-muted",children:[s("span",{className:"font-semibold text-gray-foreground",children:n})," ",n>1?"respondidas":"respondida"]})}),s(fe,{percentage:u,label:`${n} ${n>1?"respondidas":"respondida"}`})]})}))}const he={notStarted:{icon:v,bgColor:"bg-gray-background-soft",iconColor:"text-gray-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"N\xE3o iniciado",subtitle:()=>""},minNotReached:{icon:W,bgColor:"bg-feedback-warning-background-soft",iconColor:"text-feedback-warning-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:()=>"M\xEDnimo n\xE3o atingido",subtitle:({remainingQuestions:r})=>r>1?`Faltam ${r} quest\xF5es`:`Falta ${r} quest\xE3o`},dominated:{icon:B,statusLabel:"Dominado",bgColor:"bg-feedback-success-background-soft",iconColor:"text-feedback-success-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`},notDominated:{icon:Q,statusLabel:"N\xE3o dominado",bgColor:"bg-feedback-error-background-soft",iconColor:"text-feedback-error-foreground",titleClassName:"font-medium text-gray-foreground-muted",title:({progress:r})=>d(b,{children:[d("span",{className:"font-semibold text-gray-foreground",children:[Math.round(r),"%"]})," ","de ",r>1?"acertos":"acerto"]}),subtitle:({correct:r,answered:e})=>`${r} de ${e} acertos`}};function pe(r,e,a){return[[r,"notStarted"],[e,"minNotReached"],[a>=80,"dominated"],[!0,"notDominated"]].find(([n])=>n)[1]}function xe(r){var e=r,{answered:a,correct:n,minQuestions:t,className:m}=e,u=c(e,["answered","correct","minQuestions","className"]);const f=a>0?n/a*100:0,g=a===0,T=a<t,P=t-a,A=pe(g,T,f),{icon:E,bgColor:F,iconColor:M,titleClassName:I,statusLabel:x,title:D,subtitle:S}=he[A],N={progress:f,correct:n,answered:a,remainingQuestions:P};return s("td",o(l({className:"px-5 py-4 align-middle"},u),{children:s("div",{className:i("flex min-w-[140px] flex-col items-start justify-center gap-2",m),children:d("div",{className:"flex shrink-0 items-center justify-center gap-2 text-xs font-medium text-gray-foreground-muted",children:[s("div",{className:i("flex size-4 items-center justify-center rounded-full",F),children:s(E,{"aria-hidden":"true",className:i("size-3",M),strokeWidth:2.6})}),d("div",{className:"flex flex-col items-start justify-center",children:[x&&d("span",{className:"sr-only",children:[x,": "]}),s("span",{className:i("whitespace-nowrap",I),children:D(N)}),s("span",{className:"whitespace-nowrap text-xxs font-semibold text-gray-foreground-muted",children:S(N)})]})]})})}))}function Ne(r){var e=r,{children:a,className:n,onClick:t}=e,m=c(e,["children","className","onClick"]);return s("td",{className:"px-5 py-4 align-middle",children:s(y,o(l({variant:"regular-soft",size:"sm",iconRight:s(q,{className:"size-4"}),onClick:t,className:n},m),{children:a}))})}export{U as Ranking,de as RankingAssigneeGroup,me as RankingAssigneeItem,ce as RankingAssigneeLabel,oe as RankingAssigneesColumn,ee as RankingBody,Ne as RankingButton,V as RankingHeader,_ as RankingHeaderCell,re as RankingItem,ae as RankingNumber,xe as RankingPerformance,ue as RankingPriority,ge as RankingQuestions,te as RankingSpecialty,le as RankingSuperFocus,ie as RankingTopic,ne as RankingTopicColumn,se as RankingTopicContent};
|
|
@@ -26,4 +26,3 @@ declare const RatingLabelVariants: (props?: ({
|
|
|
26
26
|
declare function Rating({ value, onChange, maxStars, readOnly, labels, size, className, classNameContainer, classNameLabels, label, getValueLabel, }: RatingProps): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export { Rating, RatingButtonVariants, RatingLabelVariants, RatingStarVariants, };
|
|
28
28
|
export type { RatingProps, RatingSize, RatingStarState };
|
|
29
|
-
//# sourceMappingURL=Rating.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var s=require("react/jsx-runtime"),
|
|
4
|
-
//# sourceMappingURL=Rating.js.map
|
|
3
|
+
"use strict";var s=require("react/jsx-runtime"),k=require("../lib/utils.js"),g=require("class-variance-authority"),h=require("react"),T=require("../hooks/use-id.js");const b="M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",V="transition-[width,height] duration-150 motion-reduce:transition-none",A=g.cva(V,{variants:{size:{sm:"size-6",md:"size-7",lg:"size-8"}},defaultVariants:{size:"md"}}),U=g.cva(V,{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"}},defaultVariants:{size:"md"}}),R=g.cva("inline-flex items-center justify-center rounded-sm outline-none focus-visible:ring-4 focus-visible:ring-state-focus",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"},readOnly:{true:"cursor-default",false:"cursor-pointer"}},defaultVariants:{size:"md",readOnly:!1}}),q=g.cva("flex w-full min-w-0 justify-between text-gray-foreground font-medium gap-2",{variants:{size:{sm:"text-xs",md:"text-xs",lg:"text-sm"}},defaultVariants:{size:"md"}});function Z({state:r,highlighted:l=!1,className:n}){const a=T.useId();return r==="full"?s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s.jsx("path",{d:b,className:l?"fill-feedback-warning-background-soft-emphasis stroke-feedback-warning-stroke-emphasis":"fill-feedback-warning-background-soft stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):r==="half"?s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s.jsx("stop",{offset:"50%",className:"[stop-color:var(--color-feedback-warning-background-soft)]",stopOpacity:"1"}),s.jsx("stop",{offset:"50%",stopColor:"transparent",stopOpacity:"0"})]})}),s.jsx("path",{d:b,fill:`url(#${a})`,className:"stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}):s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s.jsx("path",{d:b,fill:"transparent",className:"stroke-gray-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function G(r,l){const n=r+1;return l>=n?"full":l>=n-.5?"half":"empty"}function H(r,l){return`Nota ${r} de ${l}`}const J={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1};function P({value:r,onChange:l,maxStars:n=5,readOnly:a=!1,labels:u,size:c="md",className:M,classNameContainer:O,classNameLabels:S,label:B="Avalia\xE7\xE3o",getValueLabel:j=H}){const[E,D]=h.useState(r!=null?r:0),[x,z]=h.useState(null),[y,v]=h.useState(null),L=h.useRef([]),N=r!==void 0,d=N?r:E,p=Math.ceil(d)-1,I=y!=null?y:p>=0?p:0,C=t=>{if(a)return;const e=t+1;N||D(e),l==null||l(e)},W=(t,e)=>{var o;const f=J[t.key];let i;if(f!==void 0)i=Math.min(Math.max(e+f,0),n-1);else if(t.key==="Home")i=0;else if(t.key==="End")i=n-1;else return;t.preventDefault();const m=i+1===d;i===e&&m||(v(i),(o=L.current[i])==null||o.focus(),m||C(i))},$=t=>{t.currentTarget.contains(t.relatedTarget)||v(null)},F=t=>{a||z(t)},K=()=>{a||z(null)};return s.jsxs("div",{"data-slot":"rating",className:k.cn("inline-flex w-fit flex-col gap-2",M),children:[s.jsx("div",{role:a?"img":"radiogroup","aria-label":a?j(d,n):B,className:k.cn("inline-flex flex-row flex-wrap gap-1",O),onMouseLeave:K,onBlur:$,children:Array.from({length:n},(t,e)=>{const o=x!==null,f=o&&e<=x,i=x===e&&!a,m=o?f?"full":"empty":G(e,d);return s.jsx("button",{ref:w=>{L.current[e]=w},type:"button",disabled:a,onClick:()=>C(e),onKeyDown:w=>W(w,e),onFocus:()=>v(e),onMouseEnter:()=>F(e),className:R({size:c,readOnly:a}),role:a?void 0:"radio","aria-checked":a?void 0:e===p,"aria-hidden":a||void 0,tabIndex:a||e===I?void 0:-1,"aria-label":j(e+1,n),children:s.jsx(Z,{state:m,highlighted:i,className:i?U({size:c}):A({size:c})})},e)})}),u&&u.length===2&&s.jsxs("div",{className:k.cn(q({size:c}),S),children:[s.jsx("span",{className:"truncate",children:u[0]}),s.jsx("span",{className:"truncate text-right",children:u[1]})]})]})}exports.Rating=P,exports.RatingButtonVariants=R,exports.RatingLabelVariants=q,exports.RatingStarVariants=A;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
import{jsxs as g,jsx as s}from"react/jsx-runtime";import{cn as
|
|
4
|
-
//# sourceMappingURL=Rating.mjs.map
|
|
3
|
+
import{jsxs as g,jsx as s}from"react/jsx-runtime";import{cn as x}from"../lib/utils.mjs";import{cva as h}from"class-variance-authority";import{useState as b,useRef as Z}from"react";import{useId as q}from"../hooks/use-id.mjs";const z="M0.888855 9.61676C0.523397 9.27879 0.721914 8.66782 1.21623 8.60921L8.2204 7.77843C8.42186 7.75455 8.59685 7.62803 8.68182 7.44381L11.6361 1.03906C11.8446 0.587053 12.4872 0.586967 12.6957 1.03898L15.6499 7.44368C15.7349 7.6279 15.9087 7.75475 16.1102 7.77864L23.1148 8.60921C23.6091 8.66782 23.807 9.27897 23.4416 9.61694L18.2638 14.4061C18.1148 14.5438 18.0485 14.7488 18.0881 14.9478L19.4622 21.8658C19.5593 22.354 19.0396 22.7323 18.6053 22.4892L12.4507 19.0432C12.2737 18.9441 12.0586 18.9446 11.8816 19.0437L5.72641 22.4883C5.29205 22.7314 4.7715 22.354 4.86851 21.8658L6.2429 14.9483C6.28244 14.7493 6.21629 14.5438 6.06735 14.406L0.888855 9.61676Z",A="transition-[width,height] duration-150 motion-reduce:transition-none",M=h(A,{variants:{size:{sm:"size-6",md:"size-7",lg:"size-8"}},defaultVariants:{size:"md"}}),G=h(A,{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"}},defaultVariants:{size:"md"}}),O=h("inline-flex items-center justify-center rounded-sm outline-none focus-visible:ring-4 focus-visible:ring-state-focus",{variants:{size:{sm:"size-7",md:"size-8",lg:"size-9"},readOnly:{true:"cursor-default",false:"cursor-pointer"}},defaultVariants:{size:"md",readOnly:!1}}),R=h("flex w-full min-w-0 justify-between text-gray-foreground font-medium gap-2",{variants:{size:{sm:"text-xs",md:"text-xs",lg:"text-sm"}},defaultVariants:{size:"md"}});function H({state:r,highlighted:l=!1,className:n}){const a=q();return r==="full"?s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s("path",{d:z,className:l?"fill-feedback-warning-background-soft-emphasis stroke-feedback-warning-stroke-emphasis":"fill-feedback-warning-background-soft stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):r==="half"?g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:[s("defs",{children:g("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s("stop",{offset:"50%",className:"[stop-color:var(--color-feedback-warning-background-soft)]",stopOpacity:"1"}),s("stop",{offset:"50%",stopColor:"transparent",stopOpacity:"0"})]})}),s("path",{d:z,fill:`url(#${a})`,className:"stroke-feedback-warning-stroke",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}):s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 24",fill:"none",className:n,children:s("path",{d:z,fill:"transparent",className:"stroke-gray-stroke-emphasis",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function J(r,l){const n=r+1;return l>=n?"full":l>=n-.5?"half":"empty"}function P(r,l){return`Nota ${r} de ${l}`}const Q={ArrowRight:1,ArrowUp:1,ArrowLeft:-1,ArrowDown:-1};function Y({value:r,onChange:l,maxStars:n=5,readOnly:a=!1,labels:d,size:c="md",className:B,classNameContainer:E,classNameLabels:D,label:S="Avalia\xE7\xE3o",getValueLabel:y=P}){const[W,I]=b(r!=null?r:0),[p,L]=b(null),[N,w]=b(null),C=Z([]),V=r!==void 0,u=V?r:W,k=Math.ceil(u)-1,$=N!=null?N:k>=0?k:0,j=t=>{if(a)return;const e=t+1;V||I(e),l==null||l(e)},F=(t,e)=>{var o;const f=Q[t.key];let i;if(f!==void 0)i=Math.min(Math.max(e+f,0),n-1);else if(t.key==="Home")i=0;else if(t.key==="End")i=n-1;else return;t.preventDefault();const m=i+1===u;i===e&&m||(w(i),(o=C.current[i])==null||o.focus(),m||j(i))},K=t=>{t.currentTarget.contains(t.relatedTarget)||w(null)},T=t=>{a||L(t)},U=()=>{a||L(null)};return g("div",{"data-slot":"rating",className:x("inline-flex w-fit flex-col gap-2",B),children:[s("div",{role:a?"img":"radiogroup","aria-label":a?y(u,n):S,className:x("inline-flex flex-row flex-wrap gap-1",E),onMouseLeave:U,onBlur:K,children:Array.from({length:n},(t,e)=>{const o=p!==null,f=o&&e<=p,i=p===e&&!a,m=o?f?"full":"empty":J(e,u);return s("button",{ref:v=>{C.current[e]=v},type:"button",disabled:a,onClick:()=>j(e),onKeyDown:v=>F(v,e),onFocus:()=>w(e),onMouseEnter:()=>T(e),className:O({size:c,readOnly:a}),role:a?void 0:"radio","aria-checked":a?void 0:e===k,"aria-hidden":a||void 0,tabIndex:a||e===$?void 0:-1,"aria-label":y(e+1,n),children:s(H,{state:m,highlighted:i,className:i?G({size:c}):M({size:c})})},e)})}),d&&d.length===2&&g("div",{className:x(R({size:c}),D),children:[s("span",{className:"truncate",children:d[0]}),s("span",{className:"truncate text-right",children:d[1]})]})]})}export{Y as Rating,O as RatingButtonVariants,R as RatingLabelVariants,M as RatingStarVariants};
|
|
@@ -3,4 +3,3 @@ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
|
3
3
|
declare function ScrollArea({ className, children, ...props }: ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function ScrollBar({ className, orientation, ...props }: ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export { ScrollArea, ScrollBar };
|
|
6
|
-
//# sourceMappingURL=ScrollArea.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
3
|
"use strict";var t=require("react/jsx-runtime"),o=require("radix-ui"),i=require("../lib/utils.js"),m=Object.defineProperty,x=Object.defineProperties,h=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,v=(e,r,a)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,f=(e,r)=>{for(var a in r||(r={}))u.call(r,a)&&v(e,a,r[a]);if(n)for(var a of n(r))d.call(r,a)&&v(e,a,r[a]);return e},b=(e,r)=>x(e,h(r)),p=(e,r)=>{var a={};for(var l in e)u.call(e,l)&&r.indexOf(l)<0&&(a[l]=e[l]);if(e!=null&&n)for(var l of n(e))r.indexOf(l)<0&&d.call(e,l)&&(a[l]=e[l]);return a};function j(e){var r=e,{className:a,children:l}=r,c=p(r,["className","children"]);return t.jsxs(o.ScrollArea.Root,b(f({"data-slot":"scroll-area",className:i.cn("relative",a)},c),{children:[t.jsx(o.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit]",children:l}),t.jsx(s,{}),t.jsx(s,{orientation:"horizontal"}),t.jsx(o.ScrollArea.Corner,{})]}))}function s(e){var r=e,{className:a,orientation:l="vertical"}=r,c=p(r,["className","orientation"]);return t.jsx(o.ScrollArea.ScrollAreaScrollbar,b(f({"data-slot":"scroll-area-scrollbar",orientation:l,className:i.cn("flex touch-none select-none",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",a)},c),{children:t.jsx(o.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-gray-stroke-muted"})}))}exports.ScrollArea=j,exports.ScrollBar=s;
|
|
4
|
-
//# sourceMappingURL=ScrollArea.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
3
|
import{jsxs as v,jsx as t}from"react/jsx-runtime";import{ScrollArea as l}from"radix-ui";import{cn as s}from"../lib/utils.mjs";var h=Object.defineProperty,O=Object.defineProperties,x=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,d=(e,r,a)=>r in e?h(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,u=(e,r)=>{for(var a in r||(r={}))f.call(r,a)&&d(e,a,r[a]);if(n)for(var a of n(r))p.call(r,a)&&d(e,a,r[a]);return e},b=(e,r)=>O(e,x(r)),m=(e,r)=>{var a={};for(var o in e)f.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&n)for(var o of n(e))r.indexOf(o)<0&&p.call(e,o)&&(a[o]=e[o]);return a};function y(e){var r=e,{className:a,children:o}=r,c=m(r,["className","children"]);return v(l.Root,b(u({"data-slot":"scroll-area",className:s("relative",a)},c),{children:[t(l.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit]",children:o}),t(i,{}),t(i,{orientation:"horizontal"}),t(l.Corner,{})]}))}function i(e){var r=e,{className:a,orientation:o="vertical"}=r,c=m(r,["className","orientation"]);return t(l.ScrollAreaScrollbar,b(u({"data-slot":"scroll-area-scrollbar",orientation:o,className:s("flex touch-none select-none",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",a)},c),{children:t(l.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-gray-stroke-muted"})}))}export{y as ScrollArea,i as ScrollBar};
|
|
4
|
-
//# sourceMappingURL=ScrollArea.mjs.map
|
|
@@ -24,4 +24,3 @@ declare const SegmentControlTrigger: import("react").ForwardRefExoticComponent<O
|
|
|
24
24
|
declare function SegmentControlContent({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export { SegmentControl, SegmentControlContent, SegmentControlList, SegmentControlTrigger, segmentControlTriggerVariants, };
|
|
26
26
|
export type { SegmentControlListProps, SegmentControlTriggerProps };
|
|
27
|
-
//# sourceMappingURL=SegmentControl.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
"use strict";var s=require("react/jsx-runtime"),V=require("class-variance-authority"),l=require("radix-ui"),u=require("react"),A=require("./Badge.js"),R=require("./ScrollArea.js"),g=require("./Tooltip.js"),I=require("../hooks/use-id.js"),o=require("../lib/utils.js"),L=Object.defineProperty,B=Object.defineProperties,U=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(
|
|
4
|
-
//# sourceMappingURL=SegmentControl.js.map
|
|
3
|
+
"use strict";var s=require("react/jsx-runtime"),V=require("class-variance-authority"),l=require("radix-ui"),u=require("react"),A=require("./Badge.js"),R=require("./ScrollArea.js"),g=require("./Tooltip.js"),I=require("../hooks/use-id.js"),o=require("../lib/utils.js"),L=Object.defineProperty,B=Object.defineProperties,U=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,z=(a,e,r)=>e in a?L(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r,v=(a,e)=>{for(var r in e||(e={}))C.call(e,r)&&z(a,r,e[r]);if(m)for(var r of m(e))T.call(e,r)&&z(a,r,e[r]);return a},S=(a,e)=>B(a,U(e)),p=(a,e)=>{var r={};for(var t in a)C.call(a,t)&&e.indexOf(t)<0&&(r[t]=a[t]);if(a!=null&&m)for(var t of m(a))e.indexOf(t)<0&&T.call(a,t)&&(r[t]=a[t]);return r};const w=u.createContext(null);function D(a){var e=a,{className:r,size:t="md",children:n}=e,i=p(e,["className","size","children"]);return s.jsx(w.Provider,{value:u.useMemo(()=>({size:t}),[t]),children:s.jsx(l.Tabs.Root,S(v({"data-slot":"tabs",className:o.cn("flex flex-col gap-2",r)},i),{children:n}))})}function E(a){var e=a,{className:r,containerClassName:t}=e,n=p(e,["className","containerClassName"]);return s.jsx(R.ScrollArea,{className:o.cn("[&_[data-slot=scroll-area-scrollbar][data-orientation=horizontal]]:h-1",t),children:s.jsx(l.Tabs.List,v({"data-slot":"tabs-list",className:o.cn("inline-flex w-fit items-center justify-center gap-0.5 rounded-md bg-gray-background-soft p-0.5",r)},n))})}const O=V.cva("shadow-transparent data-[state=active]:shadow-level-1 group inline-flex items-center justify-center whitespace-nowrap rounded-[6px] font-medium text-gray-foreground hover:text-gray-foreground-emphasis outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-state-focus data-[state=active]:bg-surface-card data-[state=active]:text-primary-foreground data-[state=active]:hover:text-primary-foreground-emphasis [&_svg]:shrink-0 [&_svg]:text-inherit disabled:text-gray-foreground-muted disabled:pointer-events-none",{variants:{size:{sm:"max-h-7 gap-2 px-3 py-1.5 text-xs [&_svg]:size-4",md:"max-h-9 gap-2.5 px-3.5 py-2 text-sm [&_svg]:size-5",lg:"max-h-11 gap-3 px-4 py-2.5 text-md [&_svg]:size-6"}},defaultVariants:{size:"md"}}),M=u.forwardRef(function(a,e){var r=a,{className:t,icon:n,tooltip:i,tooltipSide:q="top",badge:x,badgeVariant:P,children:c}=r,f=p(r,["className","icon","tooltip","tooltipSide","badge","badgeVariant","children"]),b;const _=d=>d!=null&&d!==0&&d!==""&&d!=="0"&&!f.disabled,h=u.useContext(w),j=I.useId(),y=(b=h==null?void 0:h.size)!=null?b:"md",k=()=>f.asChild?s.jsx(l.Slot.Slottable,{children:c}):c?s.jsxs("span",{className:"inline-grid [grid-template-areas:'stack']",children:[s.jsx("span",{"aria-hidden":"true",className:"invisible font-semibold [grid-area:stack]",children:c}),s.jsx("span",{className:"font-medium [grid-area:stack] group-data-[state=active]:font-semibold",children:c})]}):null,N=s.jsxs(l.Tabs.Trigger,S(v({ref:e,"data-slot":"tabs-trigger","aria-describedby":i?j:void 0,className:o.cn(O({size:y,className:t}))},f),{children:[n,k(),_(x)&&s.jsx(A.Badge,{size:y,variant:P,children:String(x)})]}));return i?s.jsx(g.TooltipProvider,{children:s.jsxs(g.Tooltip,{children:[s.jsx(g.TooltipTrigger,{asChild:!0,children:s.jsxs("span",{className:"inline-flex",children:[N,s.jsx("span",{id:j,hidden:!0,children:i})]})}),s.jsx(g.TooltipContent,{side:q,children:i})]})}):N});function W(a){var e=a,{className:r}=e,t=p(e,["className"]);return s.jsx(l.Tabs.Content,v({"data-slot":"tabs-content",className:o.cn("flex-1 rounded-md outline-none focus-visible:ring-4 focus-visible:ring-state-focus",r)},t))}exports.SegmentControl=D,exports.SegmentControlContent=W,exports.SegmentControlList=E,exports.SegmentControlTrigger=M,exports.segmentControlTriggerVariants=O;
|