@a-type/ui 3.1.1 → 4.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/actions/ActionBar.d.ts +1 -1
- package/dist/cjs/components/actions/ActionBar.js +2 -2
- package/dist/cjs/components/actions/ActionBar.js.map +1 -1
- package/dist/cjs/components/actions/ActionButton.d.ts +3 -3
- package/dist/cjs/components/actions/ActionButton.js +2 -2
- package/dist/cjs/components/actions/ActionButton.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.d.ts +4 -2
- package/dist/cjs/components/avatar/Avatar.js +4 -14
- package/dist/cjs/components/avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.stories.d.ts +18 -0
- package/dist/cjs/components/avatar/Avatar.stories.js +38 -0
- package/dist/cjs/components/avatar/Avatar.stories.js.map +1 -0
- package/dist/cjs/components/box/Box.stories.js +1 -1
- package/dist/cjs/components/box/Box.stories.js.map +1 -1
- package/dist/cjs/components/button/Button.d.ts +5 -5
- package/dist/cjs/components/button/Button.js +7 -12
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.stories.d.ts +1 -1
- package/dist/cjs/components/button/ConfirmedButton.js +1 -2
- package/dist/cjs/components/button/ConfirmedButton.js.map +1 -1
- package/dist/cjs/components/camera/Camera.d.ts +4 -4
- package/dist/cjs/components/camera/Camera.js +6 -7
- package/dist/cjs/components/camera/Camera.js.map +1 -1
- package/dist/cjs/components/card/Card.d.ts +8 -2
- package/dist/cjs/components/card/Card.js +21 -9
- package/dist/cjs/components/card/Card.js.map +1 -1
- package/dist/cjs/components/card/Card.stories.js +3 -3
- package/dist/cjs/components/card/Card.stories.js.map +1 -1
- package/dist/cjs/components/checkbox/Checkbox.d.ts +3 -3
- package/dist/cjs/components/checkbox/Checkbox.js +5 -38
- package/dist/cjs/components/checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/chip/Chip.d.ts +3 -2
- package/dist/cjs/components/chip/Chip.js +3 -4
- package/dist/cjs/components/chip/Chip.js.map +1 -1
- package/dist/cjs/components/chip/Chip.stories.d.ts +6 -1
- package/dist/cjs/components/chip/Chip.stories.js +9 -3
- package/dist/cjs/components/chip/Chip.stories.js.map +1 -1
- package/dist/cjs/components/collapsible/Collapsible.d.ts +11 -9
- package/dist/cjs/components/collapsible/Collapsible.js +18 -39
- package/dist/cjs/components/collapsible/Collapsible.js.map +1 -1
- package/dist/cjs/components/collapsible/Collapsible.stories.d.ts +1 -1
- package/dist/cjs/components/colorMode/ColorModeToggle.d.ts +4 -2
- package/dist/cjs/components/colorMode/ColorModeToggle.js +8 -9
- package/dist/cjs/components/colorMode/ColorModeToggle.js.map +1 -1
- package/dist/cjs/components/colorPicker/ColorPicker.d.ts +4 -3
- package/dist/cjs/components/colorPicker/ColorPicker.js +8 -4
- package/dist/cjs/components/colorPicker/ColorPicker.js.map +1 -1
- package/dist/cjs/components/contextMenu/contextMenu.d.ts +11 -12
- package/dist/cjs/components/contextMenu/contextMenu.js +9 -42
- package/dist/cjs/components/contextMenu/contextMenu.js.map +1 -1
- package/dist/cjs/components/contextMenu/contextMenu.stories.d.ts +22 -0
- package/dist/cjs/components/contextMenu/contextMenu.stories.js +22 -0
- package/dist/cjs/components/contextMenu/contextMenu.stories.js.map +1 -0
- package/dist/cjs/components/dialog/Dialog.d.ts +27 -22
- package/dist/cjs/components/dialog/Dialog.js +110 -80
- package/dist/cjs/components/dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/dialog/Dialog.stories.d.ts +8 -8
- package/dist/cjs/components/dialog/Dialog.stories.js +6 -6
- package/dist/cjs/components/dialog/Dialog.stories.js.map +1 -1
- package/dist/cjs/components/divider/Divider.js +2 -1
- package/dist/cjs/components/divider/Divider.js.map +1 -1
- package/dist/cjs/components/dropdownMenu/DropdownMenu.d.ts +26 -21
- package/dist/cjs/components/dropdownMenu/DropdownMenu.js +22 -19
- package/dist/cjs/components/dropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/cjs/components/dropdownMenu/DropdownMenu.stories.d.ts +3 -26
- package/dist/cjs/components/dropdownMenu/DropdownMenu.stories.js +6 -2
- package/dist/cjs/components/dropdownMenu/DropdownMenu.stories.js.map +1 -1
- package/dist/cjs/components/forms/EmojiField.d.ts +3 -2
- package/dist/cjs/components/forms/EmojiField.js +1 -1
- package/dist/cjs/components/forms/EmojiField.js.map +1 -1
- package/dist/cjs/components/forms/FormikForm.d.ts +2 -2
- package/dist/cjs/components/forms/FormikForm.stories.d.ts +2 -2
- package/dist/cjs/components/forms/SubmitButton.js +1 -1
- package/dist/cjs/components/forms/SubmitButton.js.map +1 -1
- package/dist/cjs/components/forms/TextField.js.map +1 -1
- package/dist/cjs/components/forms/ToggleGroupField.d.ts +3 -2
- package/dist/cjs/components/forms/ToggleGroupField.js +9 -2
- package/dist/cjs/components/forms/ToggleGroupField.js.map +1 -1
- package/dist/cjs/components/horizontalList/HorizontalList.d.ts +1 -3
- package/dist/cjs/components/horizontalList/HorizontalList.js +3 -3
- package/dist/cjs/components/horizontalList/HorizontalList.js.map +1 -1
- package/dist/cjs/components/horizontalList/HorizontalList.stories.js +1 -1
- package/dist/cjs/components/horizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/cjs/components/icon/Icon.d.ts +7 -3
- package/dist/cjs/components/icon/Icon.js +14 -2
- package/dist/cjs/components/icon/Icon.js.map +1 -1
- package/dist/cjs/components/icon/Icon.stories.d.ts +28 -0
- package/dist/cjs/components/icon/Icon.stories.js +34 -0
- package/dist/cjs/components/icon/Icon.stories.js.map +1 -0
- package/dist/cjs/components/imageUploader/ImageUploader.js +1 -1
- package/dist/cjs/components/imageUploader/ImageUploader.js.map +1 -1
- package/dist/cjs/components/index.d.ts +1 -1
- package/dist/cjs/components/index.js +1 -4
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/input/Input.d.ts +1 -2
- package/dist/cjs/components/input/Input.js +4 -5
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.stories.d.ts +1 -1
- package/dist/cjs/components/layouts/layouts.stories.js +6 -6
- package/dist/cjs/components/layouts/layouts.stories.js.map +1 -1
- package/dist/cjs/components/lightbox/Lightbox.d.ts +18 -16
- package/dist/cjs/components/lightbox/Lightbox.js +10 -43
- package/dist/cjs/components/lightbox/Lightbox.js.map +1 -1
- package/dist/cjs/components/lightbox/Lightbox.stories.d.ts +9 -7
- package/dist/cjs/components/marquee/marquee.stories.js +1 -1
- package/dist/cjs/components/marquee/marquee.stories.js.map +1 -1
- package/dist/cjs/components/navBar/NavBar.d.ts +9 -9
- package/dist/cjs/components/navBar/NavBar.js +5 -7
- package/dist/cjs/components/navBar/NavBar.js.map +1 -1
- package/dist/cjs/components/popover/Popover.d.ts +17 -13
- package/dist/cjs/components/popover/Popover.js +21 -51
- package/dist/cjs/components/popover/Popover.js.map +1 -1
- package/dist/cjs/components/popover/Popover.stories.d.ts +2 -23
- package/dist/cjs/components/popover/Popover.stories.js +1 -1
- package/dist/cjs/components/popover/Popover.stories.js.map +1 -1
- package/dist/cjs/components/progress/Progress.d.ts +22 -6
- package/dist/cjs/components/progress/Progress.js +17 -42
- package/dist/cjs/components/progress/Progress.js.map +1 -1
- package/dist/cjs/components/progress/Progress.stories.d.ts +13 -3
- package/dist/cjs/components/progress/Progress.stories.js +7 -2
- package/dist/cjs/components/progress/Progress.stories.js.map +1 -1
- package/dist/cjs/components/pwaInstall/PwaInstall.d.ts +3 -3
- package/dist/cjs/components/pwaInstall/PwaInstall.js +6 -4
- package/dist/cjs/components/pwaInstall/PwaInstall.js.map +1 -1
- package/dist/cjs/components/pwaInstall/PwaInstallTrigger.d.ts +1 -2
- package/dist/cjs/components/pwaInstall/PwaInstallTrigger.stories.js +1 -1
- package/dist/cjs/components/pwaInstall/PwaInstallTrigger.stories.js.map +1 -1
- package/dist/cjs/components/richEditor/index.js +1 -1
- package/dist/cjs/components/richEditor/index.js.map +1 -1
- package/dist/cjs/components/scrollArea/ScrollArea.d.ts +23 -28
- package/dist/cjs/components/scrollArea/ScrollArea.js +26 -56
- package/dist/cjs/components/scrollArea/ScrollArea.js.map +1 -1
- package/dist/cjs/components/scrollArea/ScrollArea.stories.d.ts +13 -10
- package/dist/cjs/components/scrollArea/ScrollArea.stories.js +16 -12
- package/dist/cjs/components/scrollArea/ScrollArea.stories.js.map +1 -1
- package/dist/cjs/components/select/Select.d.ts +40 -46
- package/dist/cjs/components/select/Select.js +40 -83
- package/dist/cjs/components/select/Select.js.map +1 -1
- package/dist/cjs/components/select/Select.stories.d.ts +18 -11
- package/dist/cjs/components/select/Select.stories.js +23 -2
- package/dist/cjs/components/select/Select.stories.js.map +1 -1
- package/dist/cjs/components/slider/Slider.d.ts +36 -13
- package/dist/cjs/components/slider/Slider.js +26 -41
- package/dist/cjs/components/slider/Slider.js.map +1 -1
- package/dist/cjs/components/slider/Slider.stories.d.ts +16 -7
- package/dist/cjs/components/slider/Slider.stories.js +23 -10
- package/dist/cjs/components/slider/Slider.stories.js.map +1 -1
- package/dist/cjs/components/switch/Switch.d.ts +4 -4
- package/dist/cjs/components/switch/Switch.js +3 -3
- package/dist/cjs/components/switch/Switch.js.map +1 -1
- package/dist/cjs/components/switch/Switch.stories.d.ts +27 -0
- package/dist/cjs/components/switch/Switch.stories.js +24 -0
- package/dist/cjs/components/switch/Switch.stories.js.map +1 -0
- package/dist/cjs/components/tabs/tabs.d.ts +16 -12
- package/dist/cjs/components/tabs/tabs.js +12 -47
- package/dist/cjs/components/tabs/tabs.js.map +1 -1
- package/dist/cjs/components/tabs/tabs.stories.js +3 -3
- package/dist/cjs/components/tabs/tabs.stories.js.map +1 -1
- package/dist/cjs/components/textArea/TextArea.d.ts +4 -4
- package/dist/cjs/components/textArea/TextArea.js +6 -8
- package/dist/cjs/components/textArea/TextArea.js.map +1 -1
- package/dist/cjs/components/textArea/TextArea.stories.d.ts +1 -1
- package/dist/cjs/components/toggleGroup/toggleGroup.d.ts +5 -6
- package/dist/cjs/components/toggleGroup/toggleGroup.js +6 -38
- package/dist/cjs/components/toggleGroup/toggleGroup.js.map +1 -1
- package/dist/cjs/components/toggleGroup/toggleGroup.stories.d.ts +17 -0
- package/dist/cjs/components/toggleGroup/toggleGroup.stories.js +21 -0
- package/dist/cjs/components/toggleGroup/toggleGroup.stories.js.map +1 -0
- package/dist/cjs/components/tooltip/Tooltip.d.ts +12 -9
- package/dist/cjs/components/tooltip/Tooltip.js +12 -43
- package/dist/cjs/components/tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/tooltip/Tooltip.stories.d.ts +2 -20
- package/dist/cjs/components/tooltip/Tooltip.stories.js +14 -5
- package/dist/cjs/components/tooltip/Tooltip.stories.js.map +1 -1
- package/dist/cjs/components/utility/ArrowSvg.d.ts +1 -0
- package/dist/cjs/components/utility/ArrowSvg.js +9 -0
- package/dist/cjs/components/utility/ArrowSvg.js.map +1 -0
- package/dist/cjs/components/utility/HideWhileKeyboardOpen.d.ts +1 -2
- package/dist/cjs/components/utility/HideWhileKeyboardOpen.js +3 -4
- package/dist/cjs/components/utility/HideWhileKeyboardOpen.js.map +1 -1
- package/dist/cjs/components/utility/SlotDiv.d.ts +3 -4
- package/dist/cjs/components/utility/SlotDiv.js +9 -7
- package/dist/cjs/components/utility/SlotDiv.js.map +1 -1
- package/dist/cjs/hooks/useTitleBarColor.stories.js +1 -1
- package/dist/cjs/hooks/useTitleBarColor.stories.js.map +1 -1
- package/dist/cjs/hooks/useVisualViewportOffset.js +31 -10
- package/dist/cjs/hooks/useVisualViewportOffset.js.map +1 -1
- package/dist/cjs/hooks/withClassName.d.ts +2 -2
- package/dist/cjs/hooks/withClassName.js.map +1 -1
- package/dist/cjs/hooks/withProps.d.ts +1 -1
- package/dist/cjs/hooks/withProps.js +1 -1
- package/dist/cjs/hooks/withProps.js.map +1 -1
- package/dist/cjs/themes.stories.js +2 -2
- package/dist/cjs/themes.stories.js.map +1 -1
- package/dist/cjs/uno/preflights/globals.js +29 -25
- package/dist/cjs/uno/preflights/globals.js.map +1 -1
- package/dist/cjs/uno/rules/util.js +18 -8
- package/dist/cjs/uno/rules/util.js.map +1 -1
- package/dist/cjs/uno/theme/animations.js +0 -74
- package/dist/cjs/uno/theme/animations.js.map +1 -1
- package/dist/css/main.css +9 -42
- package/dist/esm/components/actions/ActionBar.js +2 -2
- package/dist/esm/components/actions/ActionBar.js.map +1 -1
- package/dist/esm/components/actions/ActionButton.d.ts +3 -3
- package/dist/esm/components/actions/ActionButton.js +2 -2
- package/dist/esm/components/actions/ActionButton.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.d.ts +4 -2
- package/dist/esm/components/avatar/Avatar.js +4 -14
- package/dist/esm/components/avatar/Avatar.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.stories.d.ts +18 -0
- package/dist/esm/components/avatar/Avatar.stories.js +35 -0
- package/dist/esm/components/avatar/Avatar.stories.js.map +1 -0
- package/dist/esm/components/box/Box.stories.js +1 -1
- package/dist/esm/components/box/Box.stories.js.map +1 -1
- package/dist/esm/components/button/Button.d.ts +5 -5
- package/dist/esm/components/button/Button.js +7 -12
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.stories.d.ts +1 -1
- package/dist/esm/components/button/ConfirmedButton.js +1 -2
- package/dist/esm/components/button/ConfirmedButton.js.map +1 -1
- package/dist/esm/components/camera/Camera.d.ts +4 -4
- package/dist/esm/components/camera/Camera.js +6 -7
- package/dist/esm/components/camera/Camera.js.map +1 -1
- package/dist/esm/components/card/Card.d.ts +8 -2
- package/dist/esm/components/card/Card.js +21 -9
- package/dist/esm/components/card/Card.js.map +1 -1
- package/dist/esm/components/card/Card.stories.js +3 -3
- package/dist/esm/components/card/Card.stories.js.map +1 -1
- package/dist/esm/components/checkbox/Checkbox.d.ts +3 -3
- package/dist/esm/components/checkbox/Checkbox.js +5 -5
- package/dist/esm/components/checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/chip/Chip.d.ts +3 -2
- package/dist/esm/components/chip/Chip.js +3 -4
- package/dist/esm/components/chip/Chip.js.map +1 -1
- package/dist/esm/components/chip/Chip.stories.d.ts +6 -1
- package/dist/esm/components/chip/Chip.stories.js +9 -3
- package/dist/esm/components/chip/Chip.stories.js.map +1 -1
- package/dist/esm/components/collapsible/Collapsible.d.ts +11 -9
- package/dist/esm/components/collapsible/Collapsible.js +17 -5
- package/dist/esm/components/collapsible/Collapsible.js.map +1 -1
- package/dist/esm/components/collapsible/Collapsible.stories.d.ts +1 -1
- package/dist/esm/components/colorMode/ColorModeToggle.d.ts +4 -2
- package/dist/esm/components/colorMode/ColorModeToggle.js +8 -9
- package/dist/esm/components/colorMode/ColorModeToggle.js.map +1 -1
- package/dist/esm/components/colorPicker/ColorPicker.d.ts +4 -3
- package/dist/esm/components/colorPicker/ColorPicker.js +9 -5
- package/dist/esm/components/colorPicker/ColorPicker.js.map +1 -1
- package/dist/esm/components/contextMenu/contextMenu.d.ts +11 -12
- package/dist/esm/components/contextMenu/contextMenu.js +9 -9
- package/dist/esm/components/contextMenu/contextMenu.js.map +1 -1
- package/dist/esm/components/contextMenu/contextMenu.stories.d.ts +22 -0
- package/dist/esm/components/contextMenu/contextMenu.stories.js +19 -0
- package/dist/esm/components/contextMenu/contextMenu.stories.js.map +1 -0
- package/dist/esm/components/dialog/Dialog.d.ts +27 -22
- package/dist/esm/components/dialog/Dialog.js +110 -49
- package/dist/esm/components/dialog/Dialog.js.map +1 -1
- package/dist/esm/components/dialog/Dialog.stories.d.ts +8 -8
- package/dist/esm/components/dialog/Dialog.stories.js +6 -6
- package/dist/esm/components/dialog/Dialog.stories.js.map +1 -1
- package/dist/esm/components/divider/Divider.js +2 -1
- package/dist/esm/components/divider/Divider.js.map +1 -1
- package/dist/esm/components/dropdownMenu/DropdownMenu.d.ts +26 -21
- package/dist/esm/components/dropdownMenu/DropdownMenu.js +22 -19
- package/dist/esm/components/dropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/esm/components/dropdownMenu/DropdownMenu.stories.d.ts +3 -26
- package/dist/esm/components/dropdownMenu/DropdownMenu.stories.js +5 -1
- package/dist/esm/components/dropdownMenu/DropdownMenu.stories.js.map +1 -1
- package/dist/esm/components/forms/EmojiField.d.ts +3 -2
- package/dist/esm/components/forms/EmojiField.js +1 -1
- package/dist/esm/components/forms/EmojiField.js.map +1 -1
- package/dist/esm/components/forms/FormikForm.d.ts +2 -2
- package/dist/esm/components/forms/FormikForm.stories.d.ts +2 -2
- package/dist/esm/components/forms/SubmitButton.js +1 -1
- package/dist/esm/components/forms/SubmitButton.js.map +1 -1
- package/dist/esm/components/forms/TextField.js.map +1 -1
- package/dist/esm/components/forms/ToggleGroupField.d.ts +3 -2
- package/dist/esm/components/forms/ToggleGroupField.js +9 -2
- package/dist/esm/components/forms/ToggleGroupField.js.map +1 -1
- package/dist/esm/components/horizontalList/HorizontalList.d.ts +1 -3
- package/dist/esm/components/horizontalList/HorizontalList.js +4 -4
- package/dist/esm/components/horizontalList/HorizontalList.js.map +1 -1
- package/dist/esm/components/horizontalList/HorizontalList.stories.js +1 -1
- package/dist/esm/components/horizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/esm/components/icon/Icon.d.ts +7 -3
- package/dist/esm/components/icon/Icon.js +14 -2
- package/dist/esm/components/icon/Icon.js.map +1 -1
- package/dist/esm/components/icon/Icon.stories.d.ts +28 -0
- package/dist/esm/components/icon/Icon.stories.js +31 -0
- package/dist/esm/components/icon/Icon.stories.js.map +1 -0
- package/dist/esm/components/imageUploader/ImageUploader.js +1 -1
- package/dist/esm/components/imageUploader/ImageUploader.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/input/Input.d.ts +1 -2
- package/dist/esm/components/input/Input.js +4 -5
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.stories.d.ts +1 -1
- package/dist/esm/components/layouts/layouts.stories.js +4 -4
- package/dist/esm/components/layouts/layouts.stories.js.map +1 -1
- package/dist/esm/components/lightbox/Lightbox.d.ts +18 -16
- package/dist/esm/components/lightbox/Lightbox.js +6 -6
- package/dist/esm/components/lightbox/Lightbox.js.map +1 -1
- package/dist/esm/components/lightbox/Lightbox.stories.d.ts +9 -7
- package/dist/esm/components/marquee/marquee.stories.js +1 -1
- package/dist/esm/components/marquee/marquee.stories.js.map +1 -1
- package/dist/esm/components/navBar/NavBar.d.ts +9 -9
- package/dist/esm/components/navBar/NavBar.js +5 -7
- package/dist/esm/components/navBar/NavBar.js.map +1 -1
- package/dist/esm/components/popover/Popover.d.ts +17 -13
- package/dist/esm/components/popover/Popover.js +17 -14
- package/dist/esm/components/popover/Popover.js.map +1 -1
- package/dist/esm/components/popover/Popover.stories.d.ts +2 -23
- package/dist/esm/components/popover/Popover.stories.js +1 -1
- package/dist/esm/components/popover/Popover.stories.js.map +1 -1
- package/dist/esm/components/progress/Progress.d.ts +22 -6
- package/dist/esm/components/progress/Progress.js +16 -9
- package/dist/esm/components/progress/Progress.js.map +1 -1
- package/dist/esm/components/progress/Progress.stories.d.ts +13 -3
- package/dist/esm/components/progress/Progress.stories.js +6 -1
- package/dist/esm/components/progress/Progress.stories.js.map +1 -1
- package/dist/esm/components/pwaInstall/PwaInstall.d.ts +3 -3
- package/dist/esm/components/pwaInstall/PwaInstall.js +6 -4
- package/dist/esm/components/pwaInstall/PwaInstall.js.map +1 -1
- package/dist/esm/components/pwaInstall/PwaInstallTrigger.d.ts +1 -2
- package/dist/esm/components/pwaInstall/PwaInstallTrigger.stories.js +1 -1
- package/dist/esm/components/pwaInstall/PwaInstallTrigger.stories.js.map +1 -1
- package/dist/esm/components/richEditor/index.js +1 -1
- package/dist/esm/components/richEditor/index.js.map +1 -1
- package/dist/esm/components/scrollArea/ScrollArea.d.ts +23 -28
- package/dist/esm/components/scrollArea/ScrollArea.js +25 -21
- package/dist/esm/components/scrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/components/scrollArea/ScrollArea.stories.d.ts +13 -10
- package/dist/esm/components/scrollArea/ScrollArea.stories.js +13 -12
- package/dist/esm/components/scrollArea/ScrollArea.stories.js.map +1 -1
- package/dist/esm/components/select/Select.d.ts +40 -46
- package/dist/esm/components/select/Select.js +35 -77
- package/dist/esm/components/select/Select.js.map +1 -1
- package/dist/esm/components/select/Select.stories.d.ts +18 -11
- package/dist/esm/components/select/Select.stories.js +22 -1
- package/dist/esm/components/select/Select.stories.js.map +1 -1
- package/dist/esm/components/slider/Slider.d.ts +36 -13
- package/dist/esm/components/slider/Slider.js +23 -7
- package/dist/esm/components/slider/Slider.js.map +1 -1
- package/dist/esm/components/slider/Slider.stories.d.ts +16 -7
- package/dist/esm/components/slider/Slider.stories.js +22 -9
- package/dist/esm/components/slider/Slider.stories.js.map +1 -1
- package/dist/esm/components/switch/Switch.d.ts +4 -4
- package/dist/esm/components/switch/Switch.js +3 -3
- package/dist/esm/components/switch/Switch.js.map +1 -1
- package/dist/esm/components/switch/Switch.stories.d.ts +27 -0
- package/dist/esm/components/switch/Switch.stories.js +21 -0
- package/dist/esm/components/switch/Switch.stories.js.map +1 -0
- package/dist/esm/components/tabs/tabs.d.ts +16 -12
- package/dist/esm/components/tabs/tabs.js +10 -12
- package/dist/esm/components/tabs/tabs.js.map +1 -1
- package/dist/esm/components/tabs/tabs.stories.js +3 -3
- package/dist/esm/components/tabs/tabs.stories.js.map +1 -1
- package/dist/esm/components/textArea/TextArea.d.ts +4 -4
- package/dist/esm/components/textArea/TextArea.js +7 -9
- package/dist/esm/components/textArea/TextArea.js.map +1 -1
- package/dist/esm/components/textArea/TextArea.stories.d.ts +1 -1
- package/dist/esm/components/toggleGroup/toggleGroup.d.ts +5 -6
- package/dist/esm/components/toggleGroup/toggleGroup.js +4 -3
- package/dist/esm/components/toggleGroup/toggleGroup.js.map +1 -1
- package/dist/esm/components/toggleGroup/toggleGroup.stories.d.ts +17 -0
- package/dist/esm/components/toggleGroup/toggleGroup.stories.js +18 -0
- package/dist/esm/components/toggleGroup/toggleGroup.stories.js.map +1 -0
- package/dist/esm/components/tooltip/Tooltip.d.ts +12 -9
- package/dist/esm/components/tooltip/Tooltip.js +11 -9
- package/dist/esm/components/tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/tooltip/Tooltip.stories.d.ts +2 -20
- package/dist/esm/components/tooltip/Tooltip.stories.js +14 -5
- package/dist/esm/components/tooltip/Tooltip.stories.js.map +1 -1
- package/dist/esm/components/utility/ArrowSvg.d.ts +1 -0
- package/dist/esm/components/utility/ArrowSvg.js +6 -0
- package/dist/esm/components/utility/ArrowSvg.js.map +1 -0
- package/dist/esm/components/utility/HideWhileKeyboardOpen.d.ts +1 -2
- package/dist/esm/components/utility/HideWhileKeyboardOpen.js +3 -4
- package/dist/esm/components/utility/HideWhileKeyboardOpen.js.map +1 -1
- package/dist/esm/components/utility/SlotDiv.d.ts +3 -4
- package/dist/esm/components/utility/SlotDiv.js +9 -7
- package/dist/esm/components/utility/SlotDiv.js.map +1 -1
- package/dist/esm/hooks/useTitleBarColor.stories.js +1 -1
- package/dist/esm/hooks/useTitleBarColor.stories.js.map +1 -1
- package/dist/esm/hooks/useVisualViewportOffset.js +31 -10
- package/dist/esm/hooks/useVisualViewportOffset.js.map +1 -1
- package/dist/esm/hooks/withClassName.d.ts +2 -2
- package/dist/esm/hooks/withClassName.js +2 -2
- package/dist/esm/hooks/withClassName.js.map +1 -1
- package/dist/esm/hooks/withProps.d.ts +1 -1
- package/dist/esm/hooks/withProps.js +1 -1
- package/dist/esm/hooks/withProps.js.map +1 -1
- package/dist/esm/themes.stories.js +2 -2
- package/dist/esm/themes.stories.js.map +1 -1
- package/dist/esm/uno/preflights/globals.js +29 -25
- package/dist/esm/uno/preflights/globals.js.map +1 -1
- package/dist/esm/uno/rules/util.js +18 -8
- package/dist/esm/uno/rules/util.js.map +1 -1
- package/dist/esm/uno/theme/animations.js +0 -74
- package/dist/esm/uno/theme/animations.js.map +1 -1
- package/package.json +1 -21
- package/src/components/actions/ActionBar.tsx +13 -9
- package/src/components/actions/ActionButton.tsx +2 -4
- package/src/components/avatar/Avatar.stories.tsx +41 -0
- package/src/components/avatar/Avatar.tsx +26 -40
- package/src/components/box/Box.stories.tsx +1 -1
- package/src/components/button/Button.tsx +14 -19
- package/src/components/button/ConfirmedButton.tsx +3 -7
- package/src/components/camera/Camera.tsx +23 -21
- package/src/components/card/Card.stories.tsx +22 -15
- package/src/components/card/Card.tsx +57 -40
- package/src/components/checkbox/Checkbox.tsx +13 -9
- package/src/components/chip/Chip.stories.tsx +13 -6
- package/src/components/chip/Chip.tsx +6 -7
- package/src/components/collapsible/Collapsible.tsx +36 -18
- package/src/components/colorMode/ColorModeToggle.tsx +13 -12
- package/src/components/colorPicker/ColorPicker.tsx +33 -27
- package/src/components/contextMenu/contextMenu.stories.tsx +39 -0
- package/src/components/contextMenu/contextMenu.tsx +33 -32
- package/src/components/dialog/Dialog.stories.tsx +15 -37
- package/src/components/dialog/Dialog.tsx +218 -102
- package/src/components/divider/Divider.tsx +5 -1
- package/src/components/dropdownMenu/DropdownMenu.stories.tsx +63 -5
- package/src/components/dropdownMenu/DropdownMenu.tsx +86 -47
- package/src/components/forms/EmojiField.tsx +18 -15
- package/src/components/forms/SubmitButton.tsx +1 -1
- package/src/components/forms/TextField.tsx +2 -2
- package/src/components/forms/ToggleGroupField.tsx +9 -1
- package/src/components/horizontalList/HorizontalList.stories.tsx +2 -2
- package/src/components/horizontalList/HorizontalList.tsx +10 -18
- package/src/components/icon/Icon.stories.tsx +47 -0
- package/src/components/icon/Icon.tsx +30 -17
- package/src/components/imageUploader/ImageUploader.tsx +7 -9
- package/src/components/index.ts +1 -1
- package/src/components/input/Input.tsx +3 -7
- package/src/components/layouts/layouts.stories.tsx +10 -16
- package/src/components/lightbox/Lightbox.tsx +25 -13
- package/src/components/marquee/marquee.stories.tsx +5 -3
- package/src/components/navBar/NavBar.tsx +9 -17
- package/src/components/popover/Popover.stories.tsx +6 -7
- package/src/components/popover/Popover.tsx +86 -39
- package/src/components/progress/Progress.stories.tsx +15 -3
- package/src/components/progress/Progress.tsx +65 -11
- package/src/components/pwaInstall/PwaInstall.tsx +21 -22
- package/src/components/pwaInstall/PwaInstallTrigger.stories.tsx +5 -4
- package/src/components/pwaInstall/PwaInstallTrigger.tsx +1 -1
- package/src/components/richEditor/index.tsx +8 -4
- package/src/components/scrollArea/ScrollArea.stories.tsx +86 -45
- package/src/components/scrollArea/ScrollArea.tsx +108 -96
- package/src/components/select/Select.stories.tsx +39 -10
- package/src/components/select/Select.tsx +161 -218
- package/src/components/slider/Slider.stories.tsx +40 -15
- package/src/components/slider/Slider.tsx +62 -29
- package/src/components/switch/Switch.stories.tsx +24 -0
- package/src/components/switch/Switch.tsx +9 -8
- package/src/components/tabs/tabs.stories.tsx +7 -13
- package/src/components/tabs/tabs.tsx +34 -27
- package/src/components/textArea/TextArea.tsx +17 -25
- package/src/components/toggleGroup/toggleGroup.stories.tsx +27 -0
- package/src/components/toggleGroup/toggleGroup.tsx +10 -8
- package/src/components/tooltip/Tooltip.stories.tsx +20 -10
- package/src/components/tooltip/Tooltip.tsx +72 -30
- package/src/components/utility/ArrowSvg.tsx +15 -0
- package/src/components/utility/HideWhileKeyboardOpen.tsx +3 -8
- package/src/components/utility/SlotDiv.tsx +10 -10
- package/src/hooks/useTitleBarColor.stories.tsx +1 -3
- package/src/hooks/useVisualViewportOffset.ts +34 -11
- package/src/hooks/withClassName.tsx +3 -3
- package/src/hooks/withProps.tsx +1 -1
- package/src/themes.stories.tsx +10 -20
- package/src/uno/preflights/globals.ts +25 -21
- package/src/uno/rules/util.ts +18 -8
- package/src/uno/theme/animations.ts +0 -74
|
@@ -8,12 +8,6 @@ export const animation = {
|
|
|
8
8
|
keyframes: {
|
|
9
9
|
'progress-bar': `{0% { width: 0% } 100% { width: 100% }}`,
|
|
10
10
|
'pop-up': `{from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); }}`,
|
|
11
|
-
// TODO: move this out to app
|
|
12
|
-
'item-disappear': `{
|
|
13
|
-
0% {opacity:1;transform:translateY(0);height:var(--height);}
|
|
14
|
-
25% {opacity:1;transform:translateY(0);height:var(--height);}
|
|
15
|
-
100% {opacity:0;transform:translateY(30px);height:0;margin-top:0;}
|
|
16
|
-
}`,
|
|
17
11
|
'expand-scale-x': `{
|
|
18
12
|
from { transform: scaleX(0) }
|
|
19
13
|
to { transform: scaleX(1) }
|
|
@@ -32,40 +26,10 @@ export const animation = {
|
|
|
32
26
|
opacity: 0;
|
|
33
27
|
}
|
|
34
28
|
}`,
|
|
35
|
-
'scan-line': `{
|
|
36
|
-
0% { top: 0% }
|
|
37
|
-
30% { top: 100% }
|
|
38
|
-
70% { top: 100% }
|
|
39
|
-
100% { top: 0% }
|
|
40
|
-
}`,
|
|
41
29
|
'pop-in-from-half': `{
|
|
42
30
|
0% { opacity: 0; transform: scale(0.5) }
|
|
43
31
|
100% { opacity: 1; transform: scale(1) }
|
|
44
32
|
}`,
|
|
45
|
-
'radix-collapsible-open-vertical': `{
|
|
46
|
-
from { height: 0 }
|
|
47
|
-
to { height: var(--radix-collapsible-content-height) }
|
|
48
|
-
}`,
|
|
49
|
-
'radix-collapsible-close-vertical': `{
|
|
50
|
-
from { height: var(--radix-collapsible-content-height) }
|
|
51
|
-
to { height: 0 }
|
|
52
|
-
}`,
|
|
53
|
-
'radix-collapsible-open-horizontal': `{
|
|
54
|
-
from { width: 0 }
|
|
55
|
-
to { width: var(--radix-collapsible-content-width) }
|
|
56
|
-
}`,
|
|
57
|
-
'radix-collapsible-close-horizontal': `{
|
|
58
|
-
from { width: var(--radix-collapsible-content-width) }
|
|
59
|
-
to { width: 0 }
|
|
60
|
-
}`,
|
|
61
|
-
'radix-collapsible-open-both': `{
|
|
62
|
-
from { width: 0; height: 0 }
|
|
63
|
-
to { width: var(--radix-collapsible-content-width); height: var(--radix-collapsible-content-height) }
|
|
64
|
-
}`,
|
|
65
|
-
'radix-collapsible-close-both': `{
|
|
66
|
-
from { width: var(--radix-collapsible-content-width); height: var(--radix-collapsible-content-height) }
|
|
67
|
-
to { width: 0; height: 0 }
|
|
68
|
-
}`,
|
|
69
33
|
'peek-close': `{
|
|
70
34
|
from { height: calc(var(--collapsible-height) + 80px); max-height: none; }
|
|
71
35
|
to { height: min(var(--peek-height, 120px), var(--collapsible-height)); max-height: var(--peek-height, 120px); }
|
|
@@ -123,22 +87,6 @@ export const animation = {
|
|
|
123
87
|
0% { opacity: 1; transform: translate3d(0, 0, 0); }
|
|
124
88
|
100% { opacity: 0; transform: translate3d(100px, 0, 0); }
|
|
125
89
|
}`,
|
|
126
|
-
'popover-in': `{
|
|
127
|
-
0% { opacity: 0; transform: scale(0.95); }
|
|
128
|
-
100% { opacity: 1; transform: scale(1); }
|
|
129
|
-
}`,
|
|
130
|
-
'popover-out': `{
|
|
131
|
-
0% { opacity: 1; transform: scale(1); }
|
|
132
|
-
100% { opacity: 0; transform: scale(0.95); }
|
|
133
|
-
}`,
|
|
134
|
-
'dialog-in': `{
|
|
135
|
-
0% { opacity: 0; transform: translateY(20px) translate(-50%, -50%); }
|
|
136
|
-
100% { opacity: 1; transform: translateY(0) translate(-50%, -50%); }
|
|
137
|
-
}`,
|
|
138
|
-
'dialog-out': `{
|
|
139
|
-
0% { opacity: 1; transform: translateY(0) translate(-50%, -50%); }
|
|
140
|
-
100% { opacity: 0; transform: translateY(20px) translate(-50%, -50%); }
|
|
141
|
-
}`,
|
|
142
90
|
'checkbox-fade': `{
|
|
143
91
|
from { background-color: var(--v-bg-altered,var(--v-bg)); opacity: 1; }
|
|
144
92
|
to { background-color: transparent; opacity: 0.9; border-color: transparent; box-shadow: none; }
|
|
@@ -163,16 +111,6 @@ export const animation = {
|
|
|
163
111
|
'fade-in-right-big': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
164
112
|
'fade-in': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
165
113
|
'fade-out': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
166
|
-
'scan-line': 'linear',
|
|
167
|
-
'radix-collapsible-open-vertical': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
168
|
-
'radix-collapsible-close-vertical': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
169
|
-
'radix-collapsible-open-horizontal': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
170
|
-
'radix-collapsible-close-horizontal': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
171
|
-
'radix-collapsible-open-both': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
172
|
-
'radix-collapsible-close-both': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
173
|
-
'item-disappear': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
174
|
-
'dialog-in': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
175
|
-
'dialog-out': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
176
114
|
'checkbox-fade': 'cubic-bezier(0.64, -0.25, 0.1, 1.4)',
|
|
177
115
|
},
|
|
178
116
|
durations: {
|
|
@@ -191,18 +129,6 @@ export const animation = {
|
|
|
191
129
|
'fade-in-right-big': '300ms',
|
|
192
130
|
'fade-in': '200ms',
|
|
193
131
|
'fade-out': '200ms',
|
|
194
|
-
'scan-line': '1.5s',
|
|
195
|
-
'radix-collapsible-open-vertical': '200ms',
|
|
196
|
-
'radix-collapsible-close-vertical': '200ms',
|
|
197
|
-
'radix-collapsible-open-horizontal': '200ms',
|
|
198
|
-
'radix-collapsible-close-horizontal': '200ms',
|
|
199
|
-
'radix-collapsible-open-both': '200ms',
|
|
200
|
-
'radix-collapsible-close-both': '200ms',
|
|
201
|
-
'item-disappear': '300ms',
|
|
202
|
-
'popover-in': '100ms',
|
|
203
|
-
'popover-out': '100ms',
|
|
204
|
-
'dialog-in': '200ms',
|
|
205
|
-
'dialog-out': '200ms',
|
|
206
132
|
'checkbox-fade': '5000ms',
|
|
207
133
|
'pop-up': '200ms',
|
|
208
134
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../../src/uno/theme/animations.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAoB;IACtC,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAuB;IAC5C,SAAS,EAAE;QACV,cAAc,EAAE,yCAAyC;QACzD,QAAQ,EAAE,uHAAuH;QACjI,
|
|
1
|
+
{"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../../src/uno/theme/animations.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAoB;IACtC,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAuB;IAC5C,SAAS,EAAE;QACV,cAAc,EAAE,yCAAyC;QACzD,QAAQ,EAAE,uHAAuH;QACjI,gBAAgB,EAAE;;;MAGd;QACJ,GAAG,EAAE;;;;;;;;;;;;;MAaD;QACJ,kBAAkB,EAAE;;;MAGhB;QACJ,YAAY,EAAE;;;OAGT;QACL,WAAW,EAAE;;;OAGR;QACL,QAAQ,EAAE;;;OAGL;QACL,gBAAgB,EAAE;;;;OAIb;QACL,cAAc,EAAE;;;;;;;OAOX;QACL,cAAc,EAAE;;;OAGX;QACL,cAAc,EAAE;;;OAGX;QACL,gBAAgB,EAAE;;;OAGb;QACL,eAAe,EAAE;;;OAGZ;QACL,eAAe,EAAE;;;OAGZ;QACL,eAAe,EAAE;;;OAGZ;QACL,iBAAiB,EAAE;;;OAGd;QACL,gBAAgB,EAAE;;;OAGb;QACL,eAAe,EAAE;;;OAGZ;KACL;IACD,SAAS,EAAE;QACV,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,qCAAqC;QAC9C,QAAQ,EAAE,qCAAqC;QAC/C,UAAU,EAAE,UAAU;QACtB,YAAY,EAAE,qCAAqC;QACnD,cAAc,EAAE,qCAAqC;QACrD,cAAc,EAAE,qCAAqC;QACrD,eAAe,EAAE,qCAAqC;QACtD,aAAa,EAAE,qCAAqC;QACpD,eAAe,EAAE,qCAAqC;QACtD,eAAe,EAAE,qCAAqC;QACtD,gBAAgB,EAAE,qCAAqC;QACvD,gBAAgB,EAAE,qCAAqC;QACvD,kBAAkB,EAAE,qCAAqC;QACzD,kBAAkB,EAAE,qCAAqC;QACzD,mBAAmB,EAAE,qCAAqC;QAC1D,SAAS,EAAE,qCAAqC;QAChD,UAAU,EAAE,qCAAqC;QACjD,eAAe,EAAE,qCAAqC;KACtD;IACD,SAAS,EAAE;QACV,YAAY,EAAE,OAAO;QACrB,cAAc,EAAE,OAAO;QACvB,cAAc,EAAE,OAAO;QACvB,eAAe,EAAE,OAAO;QACxB,aAAa,EAAE,OAAO;QACtB,eAAe,EAAE,OAAO;QACxB,eAAe,EAAE,OAAO;QACxB,gBAAgB,EAAE,OAAO;QACzB,gBAAgB,EAAE,OAAO;QACzB,kBAAkB,EAAE,OAAO;QAC3B,mBAAmB,EAAE,OAAO;QAC5B,kBAAkB,EAAE,OAAO;QAC3B,mBAAmB,EAAE,OAAO;QAC5B,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,OAAO;QACnB,eAAe,EAAE,QAAQ;QACzB,QAAQ,EAAE,OAAO;KACjB;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a-type/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/a-type/ui"
|
|
@@ -42,26 +42,6 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@a-type/utils": "^1.1.4",
|
|
44
44
|
"@base-ui/react": "^1.0.0",
|
|
45
|
-
"@radix-ui/react-accordion": "^1.2.2",
|
|
46
|
-
"@radix-ui/react-checkbox": "^1.1.3",
|
|
47
|
-
"@radix-ui/react-collapsible": "^1.1.2",
|
|
48
|
-
"@radix-ui/react-context-menu": "^2.2.3",
|
|
49
|
-
"@radix-ui/react-dialog": "^1.1.3",
|
|
50
|
-
"@radix-ui/react-dropdown-menu": "^2.1.3",
|
|
51
|
-
"@radix-ui/react-icons": "^1.3.2",
|
|
52
|
-
"@radix-ui/react-menu": "^2.1.3",
|
|
53
|
-
"@radix-ui/react-popover": "^1.1.3",
|
|
54
|
-
"@radix-ui/react-progress": "^1.1.1",
|
|
55
|
-
"@radix-ui/react-radio-group": "^1.2.2",
|
|
56
|
-
"@radix-ui/react-scroll-area": "^1.2.2",
|
|
57
|
-
"@radix-ui/react-select": "^2.1.3",
|
|
58
|
-
"@radix-ui/react-slider": "^1.2.2",
|
|
59
|
-
"@radix-ui/react-slot": "^1.1.1",
|
|
60
|
-
"@radix-ui/react-switch": "^1.1.2",
|
|
61
|
-
"@radix-ui/react-tabs": "^1.1.2",
|
|
62
|
-
"@radix-ui/react-toast": "^1.2.3",
|
|
63
|
-
"@radix-ui/react-toggle-group": "^1.1.1",
|
|
64
|
-
"@radix-ui/react-tooltip": "^1.1.5",
|
|
65
45
|
"@unocss/preset-mini": "66.5.4",
|
|
66
46
|
"@unocss/preset-wind3": "66.5.4",
|
|
67
47
|
"@use-gesture/react": "^10.3.1",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import classNames from 'clsx';
|
|
2
2
|
import { ReactNode, Suspense } from 'react';
|
|
3
|
+
import { ScrollArea } from '../scrollArea/ScrollArea.js';
|
|
3
4
|
|
|
4
5
|
export interface ActionBarProps {
|
|
5
6
|
children: ReactNode;
|
|
@@ -21,20 +22,23 @@ export function ActionBar({
|
|
|
21
22
|
className={classNames(
|
|
22
23
|
'layer-components:(flex flex-row items-center justify-start w-full overflow-hidden relative h-[max-content] transition-[height] springy)',
|
|
23
24
|
'layer-components:[&:empty]:height-0',
|
|
24
|
-
!disableShadow &&
|
|
25
|
-
'after:(content-[""] absolute right-0 top-0 bottom-0 w-50px z-1 bg-gradient-to-l from-[color:var(--v-bg,var(--mode-white))] from-20% to-transparent pointer-events-none)',
|
|
26
25
|
className,
|
|
27
26
|
)}
|
|
28
27
|
{...rest}
|
|
29
28
|
>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
wrap && 'layer-variants:flex-wrap',
|
|
34
|
-
)}
|
|
29
|
+
<ScrollArea
|
|
30
|
+
disableFades={disableShadow}
|
|
31
|
+
className="layer-components:(flex-grow w-full h-full)"
|
|
35
32
|
>
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
<ScrollArea.Content
|
|
34
|
+
className={classNames(
|
|
35
|
+
'layer-composed:(flex flex-row items-center justify-start relative h-full)',
|
|
36
|
+
wrap && 'layer-variants:flex-wrap',
|
|
37
|
+
)}
|
|
38
|
+
>
|
|
39
|
+
{children}
|
|
40
|
+
</ScrollArea.Content>
|
|
41
|
+
</ScrollArea>
|
|
38
42
|
</div>
|
|
39
43
|
</Suspense>
|
|
40
44
|
);
|
|
@@ -5,15 +5,14 @@ import { useEffect, useState } from 'react';
|
|
|
5
5
|
import { Button, ButtonProps } from '../button/Button.js';
|
|
6
6
|
import { CollapsibleContent, CollapsibleRoot } from '../collapsible/index.js';
|
|
7
7
|
|
|
8
|
-
export
|
|
8
|
+
export type ActionButtonProps = ButtonProps & {
|
|
9
9
|
visible?: boolean;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
|
|
12
12
|
export function ActionButton({
|
|
13
13
|
children,
|
|
14
14
|
className,
|
|
15
15
|
visible = true,
|
|
16
|
-
asChild,
|
|
17
16
|
...rest
|
|
18
17
|
}: ActionButtonProps) {
|
|
19
18
|
// this rather convoluted logic is meant to do:
|
|
@@ -47,7 +46,6 @@ export function ActionButton({
|
|
|
47
46
|
'layer-variants:(font-normal m-2 mx-1)',
|
|
48
47
|
className,
|
|
49
48
|
)}
|
|
50
|
-
asChild={asChild}
|
|
51
49
|
{...rest}
|
|
52
50
|
>
|
|
53
51
|
{children}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Avatar } from './Avatar.js';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Avatar',
|
|
6
|
+
component: Avatar,
|
|
7
|
+
argTypes: {},
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: { expanded: true },
|
|
10
|
+
},
|
|
11
|
+
} satisfies Meta<typeof Avatar>;
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof Avatar>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
render(args) {
|
|
19
|
+
return <Avatar {...args} />;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithImage: Story = {
|
|
24
|
+
args: {
|
|
25
|
+
imageSrc: 'https://i.pravatar.cc/300',
|
|
26
|
+
name: 'John Doe',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const WithName: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
name: 'Jane Smith',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const FailedImage: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
imageSrc: 'http://localhost:3333/nonexistent.jpg',
|
|
39
|
+
name: 'Fallback User',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Avatar as BaseAvatar,
|
|
3
|
+
AvatarRootProps as BaseAvatarProps,
|
|
4
|
+
} from '@base-ui/react/avatar';
|
|
1
5
|
import classNames from 'clsx';
|
|
2
|
-
import { CSSProperties, HTMLProps
|
|
6
|
+
import { CSSProperties, HTMLProps } from 'react';
|
|
3
7
|
import { Icon } from '../icon/index.js';
|
|
4
8
|
|
|
5
|
-
export interface AvatarProps {
|
|
9
|
+
export interface AvatarProps extends BaseAvatarProps {
|
|
6
10
|
className?: string;
|
|
7
11
|
popIn?: boolean;
|
|
8
12
|
style?: CSSProperties;
|
|
9
13
|
imageSrc?: string | null;
|
|
10
14
|
name?: string;
|
|
11
15
|
crossOrigin?: HTMLProps<HTMLImageElement>['crossOrigin'];
|
|
16
|
+
size?: string | number;
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
export function Avatar({
|
|
@@ -17,11 +22,13 @@ export function Avatar({
|
|
|
17
22
|
imageSrc,
|
|
18
23
|
name,
|
|
19
24
|
crossOrigin,
|
|
25
|
+
style,
|
|
26
|
+
size,
|
|
20
27
|
...rest
|
|
21
28
|
}: AvatarProps) {
|
|
22
29
|
const empty = !name && !imageSrc;
|
|
23
30
|
return (
|
|
24
|
-
<
|
|
31
|
+
<BaseAvatar.Root
|
|
25
32
|
data-pop={popIn}
|
|
26
33
|
className={classNames(
|
|
27
34
|
'layer-components:(flex items-center justify-center rounded-lg border-default overflow-hidden w-24px aspect-1 select-none relative bg-white flex-shrink-0)',
|
|
@@ -30,48 +37,27 @@ export function Avatar({
|
|
|
30
37
|
empty && 'layer-components:(border-dashed bg-gray-light)',
|
|
31
38
|
className,
|
|
32
39
|
)}
|
|
40
|
+
style={size ? { width: size, height: size, ...style } : style}
|
|
33
41
|
{...rest}
|
|
34
42
|
>
|
|
35
|
-
{
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
{imageSrc && (
|
|
44
|
+
<BaseAvatar.Image
|
|
45
|
+
className="w-full h-full object-cover"
|
|
46
|
+
referrerPolicy="no-referrer"
|
|
47
|
+
src={imageSrc}
|
|
48
|
+
alt={`${name ?? 'user'}'s profile picture`}
|
|
39
49
|
crossOrigin={crossOrigin}
|
|
40
50
|
/>
|
|
41
51
|
)}
|
|
52
|
+
{!empty && (
|
|
53
|
+
<BaseAvatar.Fallback
|
|
54
|
+
className="text-size-[calc(0.5px*var(--avatar-size,24px))]"
|
|
55
|
+
style={{ '--avatar-size': size } as any}
|
|
56
|
+
>
|
|
57
|
+
{name?.charAt(0) || '?'}
|
|
58
|
+
</BaseAvatar.Fallback>
|
|
59
|
+
)}
|
|
42
60
|
{empty && <Icon name="profile" />}
|
|
43
|
-
</
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function AvatarContent({
|
|
48
|
-
name,
|
|
49
|
-
imageSrc,
|
|
50
|
-
crossOrigin = 'anonymous',
|
|
51
|
-
}: {
|
|
52
|
-
name?: string;
|
|
53
|
-
imageSrc?: string | null;
|
|
54
|
-
crossOrigin?: HTMLProps<HTMLImageElement>['crossOrigin'];
|
|
55
|
-
}) {
|
|
56
|
-
const [fallback, setFallback] = useState(false);
|
|
57
|
-
const triggerFallback = () => {
|
|
58
|
-
setFallback(true);
|
|
59
|
-
};
|
|
60
|
-
if (imageSrc && !fallback) {
|
|
61
|
-
return (
|
|
62
|
-
<img
|
|
63
|
-
className="w-full h-full object-cover"
|
|
64
|
-
referrerPolicy="no-referrer"
|
|
65
|
-
src={imageSrc}
|
|
66
|
-
alt={`${name ?? 'user'}'s profile picture`}
|
|
67
|
-
crossOrigin={crossOrigin}
|
|
68
|
-
onError={triggerFallback}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
return (
|
|
73
|
-
<div className="color-black items-center justify-center flex text-sm font-bold">
|
|
74
|
-
{name?.charAt(0) || '?'}
|
|
75
|
-
</div>
|
|
61
|
+
</BaseAvatar.Root>
|
|
76
62
|
);
|
|
77
63
|
}
|
|
@@ -123,7 +123,7 @@ function SurfaceContent({ name }: { name: string }) {
|
|
|
123
123
|
<Switch checked />
|
|
124
124
|
</Box>
|
|
125
125
|
<Progress value={50} className="w-full" />
|
|
126
|
-
<ToggleGroup
|
|
126
|
+
<ToggleGroup defaultValue={['one']}>
|
|
127
127
|
<ToggleGroup.Item value="one">One</ToggleGroup.Item>
|
|
128
128
|
<ToggleGroup.Item value="two">Two</ToggleGroup.Item>
|
|
129
129
|
</ToggleGroup>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Button as BaseButton,
|
|
3
|
+
ButtonProps as BaseButtonProps,
|
|
4
|
+
} from '@base-ui/react/button';
|
|
2
5
|
import { clsx } from 'clsx';
|
|
3
6
|
import { AnimatePresence, motion } from 'motion/react';
|
|
4
7
|
import {
|
|
@@ -20,9 +23,12 @@ import { useIsDropdownTrigger } from '../dropdownMenu/DropdownTriggerContext.js'
|
|
|
20
23
|
import { IconLoadingProvider } from '../icon/IconLoadingContext.js';
|
|
21
24
|
import { Icon } from '../icon/index.js';
|
|
22
25
|
import { Spinner } from '../spinner/index.js';
|
|
26
|
+
import { SlotDiv } from '../utility/SlotDiv.js';
|
|
23
27
|
import { getButtonClassName } from './classes.js';
|
|
24
28
|
|
|
25
|
-
export interface ButtonProps
|
|
29
|
+
export interface ButtonProps
|
|
30
|
+
extends ButtonHTMLAttributes<HTMLButtonElement>,
|
|
31
|
+
Pick<BaseButtonProps, 'render' | 'focusableWhenDisabled'> {
|
|
26
32
|
color?: PaletteName;
|
|
27
33
|
emphasis?:
|
|
28
34
|
| 'primary'
|
|
@@ -37,7 +43,6 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
37
43
|
align?: 'start' | 'stretch' | 'end';
|
|
38
44
|
visuallyDisabled?: boolean;
|
|
39
45
|
loading?: boolean;
|
|
40
|
-
asChild?: boolean;
|
|
41
46
|
visuallyFocused?: boolean;
|
|
42
47
|
disableIconMode?: boolean;
|
|
43
48
|
ref?: Ref<HTMLButtonElement>;
|
|
@@ -57,16 +62,14 @@ export function ButtonRoot({
|
|
|
57
62
|
loading,
|
|
58
63
|
children,
|
|
59
64
|
disabled,
|
|
60
|
-
asChild,
|
|
61
65
|
disableIconMode,
|
|
62
66
|
disableDropdownTriggerIcon,
|
|
63
67
|
ref,
|
|
64
68
|
...props
|
|
65
69
|
}: ButtonProps) {
|
|
66
|
-
const Comp = asChild ? Slot : 'button';
|
|
67
|
-
|
|
68
70
|
const isFormSubmitting = false;
|
|
69
|
-
const isSubmitLoading =
|
|
71
|
+
const isSubmitLoading =
|
|
72
|
+
'type' in props && props.type === 'submit' && isFormSubmitting;
|
|
70
73
|
const isLoading = loading || isSubmitLoading;
|
|
71
74
|
|
|
72
75
|
const childArray = childArrayWithoutFragments(children);
|
|
@@ -117,15 +120,9 @@ export function ButtonRoot({
|
|
|
117
120
|
buttonProps['aria-pressed'] = !!toggled;
|
|
118
121
|
}
|
|
119
122
|
|
|
120
|
-
// for asChild, no need to do the rest of this stuff.
|
|
121
|
-
if (asChild) {
|
|
122
|
-
// avoid rendering loading spinner with asChild
|
|
123
|
-
return <Comp {...buttonProps}>{children}</Comp>;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
123
|
return (
|
|
127
124
|
<IconLoadingProvider value={isLoading}>
|
|
128
|
-
<
|
|
125
|
+
<BaseButton {...buttonProps}>
|
|
129
126
|
<AnimatePresence>
|
|
130
127
|
{isLoading && (
|
|
131
128
|
<motion.div
|
|
@@ -151,12 +148,10 @@ export function ButtonRoot({
|
|
|
151
148
|
{children}
|
|
152
149
|
{isDropdownTrigger && (
|
|
153
150
|
<IconLoadingProvider value={false}>
|
|
154
|
-
<DropdownMenuTriggerIcon
|
|
155
|
-
<Icon name="chevron" />
|
|
156
|
-
</DropdownMenuTriggerIcon>
|
|
151
|
+
<DropdownMenuTriggerIcon render={<Icon name="chevron" />} />
|
|
157
152
|
</IconLoadingProvider>
|
|
158
153
|
)}
|
|
159
|
-
</
|
|
154
|
+
</BaseButton>
|
|
160
155
|
</IconLoadingProvider>
|
|
161
156
|
);
|
|
162
157
|
}
|
|
@@ -181,7 +176,7 @@ export const ButtonToggleIndicator = memo(function ToggleIndicator({
|
|
|
181
176
|
});
|
|
182
177
|
|
|
183
178
|
// allows custom icons to trigger icon button behavior
|
|
184
|
-
export const ButtonIcon = withClassName(
|
|
179
|
+
export const ButtonIcon = withClassName(SlotDiv, 'icon flex-shrink-0 flex');
|
|
185
180
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
186
181
|
|
|
187
182
|
export const Button = Object.assign(ButtonRoot, {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
1
|
import { useCallback, useState } from 'react';
|
|
4
2
|
import {
|
|
5
3
|
Dialog,
|
|
@@ -57,15 +55,13 @@ export function ConfirmedButton({
|
|
|
57
55
|
|
|
58
56
|
return (
|
|
59
57
|
<Dialog open={open} onOpenChange={setOpen}>
|
|
60
|
-
<DialogTrigger
|
|
61
|
-
<Button {...rest} />
|
|
62
|
-
</DialogTrigger>
|
|
58
|
+
<DialogTrigger render={<Button />} {...rest} />
|
|
63
59
|
<DialogContent>
|
|
64
60
|
<DialogTitle>{confirmTitle}</DialogTitle>
|
|
65
61
|
<P>{confirmText}</P>
|
|
66
62
|
<DialogActions>
|
|
67
|
-
<DialogClose
|
|
68
|
-
|
|
63
|
+
<DialogClose render={<Button emphasis="default" />}>
|
|
64
|
+
{cancelAction}
|
|
69
65
|
</DialogClose>
|
|
70
66
|
<Button
|
|
71
67
|
loading={loading}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Button as BaseButton,
|
|
3
|
+
ButtonProps as BaseButtonProps,
|
|
4
|
+
} from '@base-ui/react/button';
|
|
2
5
|
import classNames from 'clsx';
|
|
3
6
|
import {
|
|
4
7
|
MouseEvent,
|
|
@@ -17,8 +20,8 @@ import { Select, SelectContent, SelectItem } from '../select/index.js';
|
|
|
17
20
|
|
|
18
21
|
const CameraContext = createContext<{
|
|
19
22
|
triggerCapture: () => void;
|
|
20
|
-
selectedDeviceId: string | undefined;
|
|
21
|
-
selectDeviceId: (id: string) => void;
|
|
23
|
+
selectedDeviceId: string | undefined | null;
|
|
24
|
+
selectDeviceId: (id: string | null) => void;
|
|
22
25
|
devices: MediaDeviceInfo[];
|
|
23
26
|
fullscreen: boolean;
|
|
24
27
|
setFullscreen: (fullscreen: boolean) => void;
|
|
@@ -61,7 +64,7 @@ export function CameraRoot({
|
|
|
61
64
|
}, [!!stream]);
|
|
62
65
|
|
|
63
66
|
const [selectedDeviceId, setSelectedDeviceId] = useState<
|
|
64
|
-
string | undefined
|
|
67
|
+
string | undefined | null
|
|
65
68
|
>();
|
|
66
69
|
|
|
67
70
|
const cleanupRef = useRef<() => void>(undefined);
|
|
@@ -71,7 +74,7 @@ export function CameraRoot({
|
|
|
71
74
|
navigator.mediaDevices
|
|
72
75
|
?.getUserMedia({
|
|
73
76
|
video: {
|
|
74
|
-
deviceId: selectedDeviceId,
|
|
77
|
+
deviceId: selectedDeviceId || undefined,
|
|
75
78
|
facingMode,
|
|
76
79
|
},
|
|
77
80
|
})
|
|
@@ -183,26 +186,23 @@ export function CameraRoot({
|
|
|
183
186
|
);
|
|
184
187
|
}
|
|
185
188
|
|
|
186
|
-
export
|
|
189
|
+
export type CameraShutterButtonProps = BaseButtonProps & {
|
|
187
190
|
className?: string;
|
|
188
|
-
asChild?: boolean;
|
|
189
191
|
onClick?: (ev: MouseEvent<HTMLButtonElement>) => void;
|
|
190
192
|
ref?: Ref<HTMLButtonElement>;
|
|
191
|
-
}
|
|
193
|
+
};
|
|
192
194
|
|
|
193
195
|
export function CameraShutterButton({
|
|
194
|
-
asChild,
|
|
195
196
|
onClick,
|
|
196
197
|
ref,
|
|
197
198
|
...rest
|
|
198
199
|
}: CameraShutterButtonProps) {
|
|
199
|
-
const Comp = asChild ? Slot : StyledShutterButton;
|
|
200
200
|
const { triggerCapture } = useContext(CameraContext);
|
|
201
201
|
|
|
202
202
|
return (
|
|
203
|
-
<
|
|
203
|
+
<StyledShutterButton
|
|
204
204
|
ref={ref}
|
|
205
|
-
aria-label={
|
|
205
|
+
aria-label={'Capture photo'}
|
|
206
206
|
onClick={(ev) => {
|
|
207
207
|
triggerCapture();
|
|
208
208
|
onClick?.(ev);
|
|
@@ -213,7 +213,7 @@ export function CameraShutterButton({
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
const StyledShutterButton = withClassName(
|
|
216
|
-
|
|
216
|
+
BaseButton,
|
|
217
217
|
'absolute bottom-3 left-1/2 -translate-x-1/2 w-16 h-16 bg-white rounded-full cursor-pointer border-2 border-black border-solid ring-2 ring-white opacity-80',
|
|
218
218
|
'hover:bg-gray-wash hover:opacity-100',
|
|
219
219
|
'focus-visible:bg-lighten-1',
|
|
@@ -258,14 +258,16 @@ export const CameraDeviceSelector = (props: CameraDeviceSelectorProps) => {
|
|
|
258
258
|
value={selectedDeviceId || 'default'}
|
|
259
259
|
onValueChange={selectDeviceId}
|
|
260
260
|
>
|
|
261
|
-
<Select.Trigger
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
<Select.Trigger
|
|
262
|
+
render={
|
|
263
|
+
<Button
|
|
264
|
+
emphasis="ghost"
|
|
265
|
+
className="absolute bottom-2 left-2 color-white"
|
|
266
|
+
>
|
|
267
|
+
<Icon name="refresh" />
|
|
268
|
+
</Button>
|
|
269
|
+
}
|
|
270
|
+
/>
|
|
269
271
|
<SelectContent>
|
|
270
272
|
{devices.map((device) => (
|
|
271
273
|
<SelectItem key={device.deviceId} value={device.deviceId}>
|
|
@@ -33,9 +33,11 @@ export const Default: Story = {
|
|
|
33
33
|
render: (args) => (
|
|
34
34
|
<div className="row items-stretch">
|
|
35
35
|
<CardRoot {...args} className="min-h-20vh">
|
|
36
|
-
<CardImage
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
<CardImage
|
|
37
|
+
render={
|
|
38
|
+
<img src="https://resources.biscuits.club/images/pashka.jpg" />
|
|
39
|
+
}
|
|
40
|
+
/>
|
|
39
41
|
<CardMain onClick={() => alert('clicked')}>
|
|
40
42
|
<CardTitle>Card Title</CardTitle>
|
|
41
43
|
<CardContent>
|
|
@@ -120,12 +122,14 @@ export const NonInteractive: Story = {
|
|
|
120
122
|
export const AsChild: Story = {
|
|
121
123
|
render: () => (
|
|
122
124
|
<CardRoot>
|
|
123
|
-
<CardMain
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
<CardMain
|
|
126
|
+
render={
|
|
127
|
+
<a href="#here">
|
|
128
|
+
<CardTitle>Card Title</CardTitle>
|
|
129
|
+
<CardContent>Other stuff</CardContent>
|
|
130
|
+
</a>
|
|
131
|
+
}
|
|
132
|
+
/>
|
|
129
133
|
<CardFooter>
|
|
130
134
|
<CardActions>
|
|
131
135
|
<Button size="small">Button</Button>
|
|
@@ -141,12 +145,15 @@ export const AsChild: Story = {
|
|
|
141
145
|
export const AsChildNonInteractive: Story = {
|
|
142
146
|
render: () => (
|
|
143
147
|
<CardRoot>
|
|
144
|
-
<CardMain
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
<CardMain
|
|
149
|
+
nonInteractive
|
|
150
|
+
render={
|
|
151
|
+
<button>
|
|
152
|
+
<CardTitle>Card Title</CardTitle>
|
|
153
|
+
<CardContent>Other stuff</CardContent>
|
|
154
|
+
</button>
|
|
155
|
+
}
|
|
156
|
+
/>
|
|
150
157
|
<CardFooter>
|
|
151
158
|
<CardActions>
|
|
152
159
|
<Button size="small">Button</Button>
|