@luxonis/common-fe-components 1.24.1 → 1.24.3
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/components/custom/Alert.d.ts +3 -1
- package/dist/components/custom/Alert.d.ts.map +1 -1
- package/dist/components/custom/Alert.js +6 -5
- package/dist/components/custom/Alert.js.map +1 -1
- package/dist/components/custom/Badge.d.ts +1 -1
- package/dist/components/custom/Badge.d.ts.map +1 -1
- package/dist/components/custom/Badge.js +7 -7
- package/dist/components/custom/Badge.js.map +1 -1
- package/dist/components/custom/BadgeButton.d.ts.map +1 -1
- package/dist/components/custom/BadgeButton.js +3 -3
- package/dist/components/custom/BadgeButton.js.map +1 -1
- package/dist/components/custom/BadgeLine.d.ts +1 -1
- package/dist/components/custom/BadgeLine.d.ts.map +1 -1
- package/dist/components/custom/BadgeLine.js +4 -4
- package/dist/components/custom/BadgeLine.js.map +1 -1
- package/dist/components/custom/Button.d.ts +5 -5
- package/dist/components/custom/Button.d.ts.map +1 -1
- package/dist/components/custom/Button.js +23 -15
- package/dist/components/custom/Button.js.map +1 -1
- package/dist/components/custom/Card.d.ts.map +1 -1
- package/dist/components/custom/Card.js +9 -7
- package/dist/components/custom/Card.js.map +1 -1
- package/dist/components/custom/CardList.d.ts +3 -3
- package/dist/components/custom/CardList.d.ts.map +1 -1
- package/dist/components/custom/CardList.js +7 -6
- package/dist/components/custom/CardList.js.map +1 -1
- package/dist/components/custom/Checkbox.d.ts +3 -1
- package/dist/components/custom/Checkbox.d.ts.map +1 -1
- package/dist/components/custom/Checkbox.js +10 -8
- package/dist/components/custom/Checkbox.js.map +1 -1
- package/dist/components/custom/Circle.d.ts +3 -3
- package/dist/components/custom/Circle.d.ts.map +1 -1
- package/dist/components/custom/Circle.js +6 -5
- package/dist/components/custom/Circle.js.map +1 -1
- package/dist/components/custom/Command.d.ts.map +1 -1
- package/dist/components/custom/Command.js +1 -1
- package/dist/components/custom/Command.js.map +1 -1
- package/dist/components/custom/DatePicker.d.ts.map +1 -1
- package/dist/components/custom/DatePicker.js +17 -11
- package/dist/components/custom/DatePicker.js.map +1 -1
- package/dist/components/custom/DropdownMenu.d.ts +2 -2
- package/dist/components/custom/DropdownMenu.d.ts.map +1 -1
- package/dist/components/custom/DropdownMenu.js +3 -3
- package/dist/components/custom/DropdownMenu.js.map +1 -1
- package/dist/components/custom/Dropzone.d.ts +2 -2
- package/dist/components/custom/Dropzone.d.ts.map +1 -1
- package/dist/components/custom/Dropzone.js +30 -20
- package/dist/components/custom/Dropzone.js.map +1 -1
- package/dist/components/custom/EmptyView.d.ts.map +1 -1
- package/dist/components/custom/EmptyView.js +4 -3
- package/dist/components/custom/EmptyView.js.map +1 -1
- package/dist/components/custom/ErrorView.d.ts +1 -1
- package/dist/components/custom/ErrorView.d.ts.map +1 -1
- package/dist/components/custom/ErrorView.js +11 -9
- package/dist/components/custom/ErrorView.js.map +1 -1
- package/dist/components/custom/ExternalLink.d.ts.map +1 -1
- package/dist/components/custom/ExternalLink.js +3 -3
- package/dist/components/custom/ExternalLink.js.map +1 -1
- package/dist/components/custom/FilterDropdown.d.ts +2 -2
- package/dist/components/custom/FilterDropdown.d.ts.map +1 -1
- package/dist/components/custom/FilterDropdown.js +41 -24
- package/dist/components/custom/FilterDropdown.js.map +1 -1
- package/dist/components/custom/Flex.d.ts +1 -1
- package/dist/components/custom/Flex.d.ts.map +1 -1
- package/dist/components/custom/Flex.js +3 -3
- package/dist/components/custom/Flex.js.map +1 -1
- package/dist/components/custom/Form.d.ts +5 -5
- package/dist/components/custom/Form.d.ts.map +1 -1
- package/dist/components/custom/Form.js +27 -18
- package/dist/components/custom/Form.js.map +1 -1
- package/dist/components/custom/FullscreenImage.d.ts.map +1 -1
- package/dist/components/custom/FullscreenImage.js +2 -2
- package/dist/components/custom/FullscreenImage.js.map +1 -1
- package/dist/components/custom/Grid.d.ts +1 -1
- package/dist/components/custom/Grid.d.ts.map +1 -1
- package/dist/components/custom/Grid.js +5 -4
- package/dist/components/custom/Grid.js.map +1 -1
- package/dist/components/custom/Icon.d.ts.map +1 -1
- package/dist/components/custom/Icon.js +1 -1
- package/dist/components/custom/Icon.js.map +1 -1
- package/dist/components/custom/IconHelp.d.ts.map +1 -1
- package/dist/components/custom/IconHelp.js +1 -1
- package/dist/components/custom/IconHelp.js.map +1 -1
- package/dist/components/custom/Input.d.ts.map +1 -1
- package/dist/components/custom/Input.js +12 -6
- package/dist/components/custom/Input.js.map +1 -1
- package/dist/components/custom/KpiDisplay.d.ts.map +1 -1
- package/dist/components/custom/KpiDisplay.js +1 -1
- package/dist/components/custom/KpiDisplay.js.map +1 -1
- package/dist/components/custom/LabelledProgress.d.ts.map +1 -1
- package/dist/components/custom/LabelledProgress.js +2 -2
- package/dist/components/custom/LabelledProgress.js.map +1 -1
- package/dist/components/custom/Markdown.d.ts.map +1 -1
- package/dist/components/custom/Markdown.js +15 -12
- package/dist/components/custom/Markdown.js.map +1 -1
- package/dist/components/custom/Modal.d.ts +4 -4
- package/dist/components/custom/Modal.d.ts.map +1 -1
- package/dist/components/custom/Modal.js +20 -14
- package/dist/components/custom/Modal.js.map +1 -1
- package/dist/components/custom/MonospaceBlock.d.ts.map +1 -1
- package/dist/components/custom/MonospaceBlock.js +5 -5
- package/dist/components/custom/MonospaceBlock.js.map +1 -1
- package/dist/components/custom/PasswordInput.d.ts +1 -1
- package/dist/components/custom/PasswordInput.d.ts.map +1 -1
- package/dist/components/custom/PasswordInput.js +4 -4
- package/dist/components/custom/PasswordInput.js.map +1 -1
- package/dist/components/custom/ProgressTicker.d.ts.map +1 -1
- package/dist/components/custom/ProgressTicker.js +1 -1
- package/dist/components/custom/ProgressTicker.js.map +1 -1
- package/dist/components/custom/RadioGroup.d.ts +48 -48
- package/dist/components/custom/RadioGroup.d.ts.map +1 -1
- package/dist/components/custom/RadioGroup.js +28 -28
- package/dist/components/custom/RadioGroup.js.map +1 -1
- package/dist/components/custom/Select.d.ts.map +1 -1
- package/dist/components/custom/Select.js +6 -2
- package/dist/components/custom/Select.js.map +1 -1
- package/dist/components/custom/SelectCards.d.ts.map +1 -1
- package/dist/components/custom/SelectCards.js +5 -5
- package/dist/components/custom/SelectCards.js.map +1 -1
- package/dist/components/custom/Slider.d.ts +48 -48
- package/dist/components/custom/Slider.d.ts.map +1 -1
- package/dist/components/custom/Slider.js +2 -2
- package/dist/components/custom/Slider.js.map +1 -1
- package/dist/components/custom/SourceCode.d.ts.map +1 -1
- package/dist/components/custom/SourceCode.js +13 -7
- package/dist/components/custom/SourceCode.js.map +1 -1
- package/dist/components/custom/StatusBar.d.ts.map +1 -1
- package/dist/components/custom/StatusBar.js +3 -3
- package/dist/components/custom/StatusBar.js.map +1 -1
- package/dist/components/custom/Stepper.d.ts.map +1 -1
- package/dist/components/custom/Stepper.js +6 -6
- package/dist/components/custom/Stepper.js.map +1 -1
- package/dist/components/custom/Switch.d.ts +1 -0
- package/dist/components/custom/Switch.d.ts.map +1 -1
- package/dist/components/custom/Switch.js +3 -3
- package/dist/components/custom/Switch.js.map +1 -1
- package/dist/components/custom/Table.d.ts +1 -1
- package/dist/components/custom/Table.d.ts.map +1 -1
- package/dist/components/custom/Table.js +14 -10
- package/dist/components/custom/Table.js.map +1 -1
- package/dist/components/custom/Text.d.ts +5 -0
- package/dist/components/custom/Text.d.ts.map +1 -1
- package/dist/components/custom/Text.js +6 -6
- package/dist/components/custom/Text.js.map +1 -1
- package/dist/components/custom/TimePicker.d.ts.map +1 -1
- package/dist/components/custom/TimePicker.js +3 -3
- package/dist/components/custom/TimePicker.js.map +1 -1
- package/dist/components/custom/Toast.d.ts +5 -5
- package/dist/components/custom/Toast.d.ts.map +1 -1
- package/dist/components/custom/Toast.js +8 -8
- package/dist/components/custom/Toast.js.map +1 -1
- package/dist/components/custom/Toggle.d.ts +5 -0
- package/dist/components/custom/Toggle.d.ts.map +1 -0
- package/dist/components/custom/Toggle.js +12 -0
- package/dist/components/custom/Toggle.js.map +1 -0
- package/dist/components/custom/Tooltip.d.ts.map +1 -1
- package/dist/components/custom/Tooltip.js +6 -6
- package/dist/components/custom/Tooltip.js.map +1 -1
- package/dist/components/custom/TurnstileWidget.d.ts.map +1 -1
- package/dist/components/custom/TurnstileWidget.js +1 -1
- package/dist/components/custom/TurnstileWidget.js.map +1 -1
- package/dist/components/custom/VideoPlayer.d.ts.map +1 -1
- package/dist/components/custom/VideoPlayer.js +32 -12
- package/dist/components/custom/VideoPlayer.js.map +1 -1
- package/dist/components/custom/devices/devices-constants.d.ts.map +1 -1
- package/dist/components/custom/devices/devices-constants.js +13 -2
- package/dist/components/custom/devices/devices-constants.js.map +1 -1
- package/dist/components/custom/devices/devices-family.d.ts +1 -1
- package/dist/components/custom/devices/devices-family.d.ts.map +1 -1
- package/dist/components/custom/devices/devices-family.js +7 -4
- package/dist/components/custom/devices/devices-family.js.map +1 -1
- package/dist/components/custom/devices/devices-list.d.ts.map +1 -1
- package/dist/components/custom/devices/devices-list.js +13 -2
- package/dist/components/custom/devices/devices-list.js.map +1 -1
- package/dist/components/custom/devices/devices.d.ts +1 -1
- package/dist/components/custom/devices/devices.d.ts.map +1 -1
- package/dist/components/custom/devices/devices.js +14 -8
- package/dist/components/custom/devices/devices.js.map +1 -1
- package/dist/components/custom/devices/index.d.ts +2 -2
- package/dist/components/custom/devices/index.d.ts.map +1 -1
- package/dist/components/custom/devices/index.js +2 -2
- package/dist/components/custom/devices/index.js.map +1 -1
- package/dist/components/custom/index.d.ts +33 -32
- package/dist/components/custom/index.d.ts.map +1 -1
- package/dist/components/custom/index.js +33 -32
- package/dist/components/custom/index.js.map +1 -1
- package/dist/components/custom/oak4/Oak4DeviceCard.d.ts.map +1 -1
- package/dist/components/custom/oak4/Oak4DeviceCard.js +3 -3
- package/dist/components/custom/oak4/Oak4DeviceCard.js.map +1 -1
- package/dist/components/shadow-panda/Accordion.d.ts +2 -2
- package/dist/components/shadow-panda/Accordion.d.ts.map +1 -1
- package/dist/components/shadow-panda/Accordion.js +3 -3
- package/dist/components/shadow-panda/Accordion.js.map +1 -1
- package/dist/components/shadow-panda/Avatar.d.ts +1 -1
- package/dist/components/shadow-panda/Avatar.d.ts.map +1 -1
- package/dist/components/shadow-panda/Avatar.js +1 -1
- package/dist/components/shadow-panda/Avatar.js.map +1 -1
- package/dist/components/shadow-panda/Calendar.d.ts +1 -1
- package/dist/components/shadow-panda/Calendar.d.ts.map +1 -1
- package/dist/components/shadow-panda/Calendar.js +2 -2
- package/dist/components/shadow-panda/Calendar.js.map +1 -1
- package/dist/components/shadow-panda/DropdownMenu.d.ts +2 -2
- package/dist/components/shadow-panda/DropdownMenu.d.ts.map +1 -1
- package/dist/components/shadow-panda/DropdownMenu.js +6 -6
- package/dist/components/shadow-panda/DropdownMenu.js.map +1 -1
- package/dist/components/shadow-panda/Form.d.ts +1 -1
- package/dist/components/shadow-panda/Form.d.ts.map +1 -1
- package/dist/components/shadow-panda/Form.js +12 -10
- package/dist/components/shadow-panda/Form.js.map +1 -1
- package/dist/components/shadow-panda/Popover.d.ts +22 -22
- package/dist/components/shadow-panda/Popover.d.ts.map +1 -1
- package/dist/components/shadow-panda/Popover.js +3 -3
- package/dist/components/shadow-panda/Popover.js.map +1 -1
- package/dist/components/shadow-panda/Progress.d.ts +1 -1
- package/dist/components/shadow-panda/Progress.d.ts.map +1 -1
- package/dist/components/shadow-panda/Progress.js +3 -3
- package/dist/components/shadow-panda/Progress.js.map +1 -1
- package/dist/components/shadow-panda/Separator.d.ts +1 -1
- package/dist/components/shadow-panda/Separator.d.ts.map +1 -1
- package/dist/components/shadow-panda/Separator.js +3 -3
- package/dist/components/shadow-panda/Separator.js.map +1 -1
- package/dist/components/shadow-panda/Skeleton.js +1 -1
- package/dist/components/shadow-panda/Skeleton.js.map +1 -1
- package/dist/components/shadow-panda/Table.d.ts.map +1 -1
- package/dist/components/shadow-panda/Table.js +8 -8
- package/dist/components/shadow-panda/Table.js.map +1 -1
- package/dist/components/shadow-panda/Tabs.d.ts +1 -1
- package/dist/components/shadow-panda/Tabs.d.ts.map +1 -1
- package/dist/components/shadow-panda/Tabs.js +1 -1
- package/dist/components/shadow-panda/Tabs.js.map +1 -1
- package/dist/components/shadow-panda/Textarea.d.ts.map +1 -1
- package/dist/components/shadow-panda/Textarea.js +2 -2
- package/dist/components/shadow-panda/Textarea.js.map +1 -1
- package/dist/components/shadow-panda/Toaster.d.ts.map +1 -1
- package/dist/components/shadow-panda/Toaster.js +3 -3
- package/dist/components/shadow-panda/Toaster.js.map +1 -1
- package/dist/components/shadow-panda/_Alert.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Alert.js +2 -2
- package/dist/components/shadow-panda/_Alert.js.map +1 -1
- package/dist/components/shadow-panda/_Badge.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Badge.js +1 -1
- package/dist/components/shadow-panda/_Badge.js.map +1 -1
- package/dist/components/shadow-panda/_Button.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Button.js +2 -2
- package/dist/components/shadow-panda/_Button.js.map +1 -1
- package/dist/components/shadow-panda/_Card.js +5 -5
- package/dist/components/shadow-panda/_Card.js.map +1 -1
- package/dist/components/shadow-panda/_Checkbox.d.ts +1 -1
- package/dist/components/shadow-panda/_Checkbox.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Checkbox.js +5 -5
- package/dist/components/shadow-panda/_Checkbox.js.map +1 -1
- package/dist/components/shadow-panda/_Command.d.ts +4 -4
- package/dist/components/shadow-panda/_Command.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Command.js +4 -4
- package/dist/components/shadow-panda/_Command.js.map +1 -1
- package/dist/components/shadow-panda/_Dialog.d.ts +2 -2
- package/dist/components/shadow-panda/_Dialog.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Dialog.js +2 -2
- package/dist/components/shadow-panda/_Dialog.js.map +1 -1
- package/dist/components/shadow-panda/_Input.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Input.js +1 -1
- package/dist/components/shadow-panda/_Input.js.map +1 -1
- package/dist/components/shadow-panda/_Label.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Label.js +1 -1
- package/dist/components/shadow-panda/_Label.js.map +1 -1
- package/dist/components/shadow-panda/_RadioGroup.d.ts +2 -2
- package/dist/components/shadow-panda/_RadioGroup.d.ts.map +1 -1
- package/dist/components/shadow-panda/_RadioGroup.js +3 -3
- package/dist/components/shadow-panda/_RadioGroup.js.map +1 -1
- package/dist/components/shadow-panda/_Select.d.ts +2 -2
- package/dist/components/shadow-panda/_Select.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Select.js +4 -4
- package/dist/components/shadow-panda/_Select.js.map +1 -1
- package/dist/components/shadow-panda/_Slider.d.ts +1 -1
- package/dist/components/shadow-panda/_Slider.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Slider.js +25 -18
- package/dist/components/shadow-panda/_Slider.js.map +1 -1
- package/dist/components/shadow-panda/_Toggle.d.ts +6 -0
- package/dist/components/shadow-panda/_Toggle.d.ts.map +1 -0
- package/dist/components/shadow-panda/_Toggle.js +6 -0
- package/dist/components/shadow-panda/_Toggle.js.map +1 -0
- package/dist/components/shadow-panda/_Tooltip.d.ts +1 -1
- package/dist/components/shadow-panda/_Tooltip.d.ts.map +1 -1
- package/dist/components/shadow-panda/_Tooltip.js +1 -1
- package/dist/components/shadow-panda/_Tooltip.js.map +1 -1
- package/dist/components/shadow-panda/index.d.ts +6 -5
- package/dist/components/shadow-panda/index.d.ts.map +1 -1
- package/dist/components/shadow-panda/index.js +6 -5
- package/dist/components/shadow-panda/index.js.map +1 -1
- package/dist/components/skeletons/Button.d.ts.map +1 -1
- package/dist/components/skeletons/Button.js +2 -2
- package/dist/components/skeletons/Button.js.map +1 -1
- package/dist/components/skeletons/Grid.d.ts +1 -1
- package/dist/components/skeletons/Grid.d.ts.map +1 -1
- package/dist/components/skeletons/Grid.js +5 -5
- package/dist/components/skeletons/Grid.js.map +1 -1
- package/dist/components/skeletons/Input.d.ts.map +1 -1
- package/dist/components/skeletons/Input.js +2 -2
- package/dist/components/skeletons/Input.js.map +1 -1
- package/dist/components/skeletons/Table.d.ts.map +1 -1
- package/dist/components/skeletons/Table.js +4 -4
- package/dist/components/skeletons/Table.js.map +1 -1
- package/dist/components/skeletons/Textarea.d.ts.map +1 -1
- package/dist/components/skeletons/Textarea.js +2 -2
- package/dist/components/skeletons/Textarea.js.map +1 -1
- package/dist/components/skeletons/index.d.ts +1 -1
- package/dist/components/skeletons/index.d.ts.map +1 -1
- package/dist/components/skeletons/index.js +1 -1
- package/dist/components/skeletons/index.js.map +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +4 -4
- package/dist/helpers.js.map +1 -1
- package/dist/hooks/copy.d.ts.map +1 -1
- package/dist/hooks/copy.js +3 -1
- package/dist/hooks/copy.js.map +1 -1
- package/dist/hooks/dropzone.d.ts +1 -1
- package/dist/hooks/dropzone.d.ts.map +1 -1
- package/dist/hooks/dropzone.js +10 -4
- package/dist/hooks/dropzone.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/modal.d.ts.map +1 -1
- package/dist/hooks/modal.js +1 -1
- package/dist/hooks/modal.js.map +1 -1
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +9 -5
- package/dist/hooks/use-toast.js.map +1 -1
- package/dist/hooks/use-translations.d.ts +1 -1
- package/dist/hooks/use-translations.d.ts.map +1 -1
- package/dist/hooks/use-translations.js +2 -2
- package/dist/hooks/use-translations.js.map +1 -1
- package/dist/hooks/use-window-width.js.map +1 -1
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +2 -2
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/react-icons.d.ts +11 -10
- package/dist/icons/react-icons.d.ts.map +1 -1
- package/dist/icons/react-icons.js +11 -10
- package/dist/icons/react-icons.js.map +1 -1
- package/dist/icons/style-provider.d.ts.map +1 -1
- package/dist/icons/style-provider.js +2 -2
- package/dist/icons/style-provider.js.map +1 -1
- package/dist/icons/svg/AccessDenied.d.ts.map +1 -1
- package/dist/icons/svg/AccessDenied.js.map +1 -1
- package/dist/icons/svg/Empty.d.ts.map +1 -1
- package/dist/icons/svg/Empty.js.map +1 -1
- package/dist/icons/svg/Error.d.ts.map +1 -1
- package/dist/icons/svg/Error.js.map +1 -1
- package/dist/icons/svg/Logo.d.ts.map +1 -1
- package/dist/icons/svg/Logo.js.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +3 -2
- package/dist/panda.css +4 -0
- package/dist/panda.d.ts.map +1 -1
- package/dist/panda.js +98 -90
- package/dist/panda.js.map +1 -1
- package/dist/recipes/colors.d.ts.map +1 -1
- package/dist/recipes/colors.js +1 -8
- package/dist/recipes/colors.js.map +1 -1
- package/dist/recipes/hover.d.ts.map +1 -1
- package/dist/recipes/hover.js.map +1 -1
- package/dist/translations/en/common/common.js +1 -1
- package/dist/translations/en/common/common.js.map +1 -1
- package/dist/translations/en/index.d.ts.map +1 -1
- package/dist/translations/en/index.js +1 -1
- package/dist/translations/en/index.js.map +1 -1
- package/dist/translations/formatters.d.ts +1 -1
- package/dist/translations/formatters.d.ts.map +1 -1
- package/dist/translations/formatters.js.map +1 -1
- package/package.json +89 -89
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { IconType } from 'react-icons';
|
|
3
3
|
import { type ColorStylesProps } from '../../recipes/colors.js';
|
|
4
|
+
import { _Alert } from '../shadow-panda/_Alert.js';
|
|
4
5
|
type BaseAlertProps = Omit<React.ComponentProps<typeof _Alert>, 'children' | 'variant' | 'colorVariant' | 'title' | 'description' | 'actions'>;
|
|
5
6
|
export type AlertProps = BaseAlertProps & ColorStylesProps & {
|
|
6
7
|
title?: React.ReactNode;
|
|
7
8
|
description?: React.ReactNode;
|
|
8
9
|
actions?: React.ReactNode;
|
|
9
10
|
bodyClassName?: string;
|
|
11
|
+
icon?: IconType | null;
|
|
10
12
|
};
|
|
11
13
|
export declare const Alert: (props: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Alert.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Alert.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAKnD,KAAK,cAAc,GAAG,IAAI,CACzB,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EACnC,UAAU,GAAG,SAAS,GAAG,cAAc,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAC7E,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,cAAc,GACtC,gBAAgB,GAAG;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACvB,CAAC;AAEH,eAAO,MAAM,KAAK,UAAW,UAAU,4CA+BtC,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { _Alert } from '../shadow-panda/_Alert.js';
|
|
3
|
-
import { colorStyles } from '../../recipes/colors.js';
|
|
4
2
|
import { clsx } from '../../helpers.js';
|
|
5
|
-
import {
|
|
3
|
+
import { colorStyles } from '../../recipes/colors.js';
|
|
4
|
+
import { _Alert } from '../shadow-panda/_Alert.js';
|
|
6
5
|
import { Flex } from './Flex.js';
|
|
6
|
+
import { Icon } from './Icon';
|
|
7
|
+
import { NormalText, SubHeader } from './Text.js';
|
|
7
8
|
export const Alert = (props) => {
|
|
8
|
-
const { variant, colorVariant, className, title, description, actions, bodyClassName, ...rest } = props;
|
|
9
|
-
return (_jsxs(_Alert, { padding: "sm", className: clsx(colorStyles({ colorVariant, variant }), className), ...rest, children: [title && _jsx(SubHeader, { text: title, color: "unset" }), _jsxs(Flex, { justify: "space-between", align: "center", className: bodyClassName ?? '', children: [description && _jsx(NormalText, { text: description, color: "unset" }), actions] })] }));
|
|
9
|
+
const { variant, colorVariant, className, title, description, actions, bodyClassName, icon, ...rest } = props;
|
|
10
|
+
return (_jsxs(_Alert, { padding: "sm", className: clsx(colorStyles({ colorVariant, variant }), className), ...rest, children: [title && _jsx(SubHeader, { text: title, color: "unset" }), _jsxs(Flex, { justify: "space-between", align: "center", className: bodyClassName ?? '', children: [icon && _jsx(Icon, { icon: icon, size: "md" }), description && _jsx(NormalText, { text: description, color: "unset" }), actions] })] }));
|
|
10
11
|
};
|
|
11
12
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/components/custom/Alert.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/components/custom/Alert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAyB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAgBlD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;IAC1C,MAAM,EACL,OAAO,EACP,YAAY,EACZ,SAAS,EACT,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,IAAI,EACJ,GAAG,IAAI,EACP,GAAG,KAAK,CAAC;IACV,OAAO,CACN,MAAC,MAAM,IACN,OAAO,EAAC,IAAI,EACZ,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAC9D,IAAI,aAEP,KAAK,IAAI,KAAC,SAAS,IAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,OAAO,GAAG,EAElD,MAAC,IAAI,IACJ,OAAO,EAAC,eAAe,EACvB,KAAK,EAAC,QAAQ,EACd,SAAS,EAAE,aAAa,IAAI,EAAE,aAE7B,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,EACtC,WAAW,IAAI,KAAC,UAAU,IAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAC,OAAO,GAAG,EAC9D,OAAO,IACF,IACC,CACT,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { IconType } from 'react-icons';
|
|
3
|
-
import { type _BadgeProps } from '../shadow-panda/_Badge.js';
|
|
4
3
|
import { type PropsFromCVA } from '../../helpers.js';
|
|
4
|
+
import { type _BadgeProps } from '../shadow-panda/_Badge.js';
|
|
5
5
|
import { type IconProps } from './Icon.js';
|
|
6
6
|
declare const badgeStyler: import("../../styled-system/types/recipe.mjs").RecipeRuntimeFn<{
|
|
7
7
|
variant: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Badge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAQ,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAI3D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAIjD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkEf,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,GAC9D,YAAY,CAAC,OAAO,WAAW,CAAC,GAAG;IAClC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEH,eAAO,MAAM,KAAK,UAAW,UAAU,4CA6DtC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { _Badge } from '../shadow-panda/_Badge.js';
|
|
3
|
-
import { cva } from '../../styled-system/css/cva.mjs';
|
|
4
|
-
import { css } from '../../styled-system/css/css.mjs';
|
|
5
|
-
import { DotIcon } from '../../icons/react-icons.js';
|
|
6
2
|
import { clsx } from '../../helpers.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { DotIcon } from '../../icons/react-icons.js';
|
|
4
|
+
import { css } from '../../styled-system/css/css.mjs';
|
|
5
|
+
import { cva } from '../../styled-system/css/cva.mjs';
|
|
6
|
+
import { _Badge } from '../shadow-panda/_Badge.js';
|
|
10
7
|
import { Flex } from './Flex.js';
|
|
8
|
+
import { Icon } from './Icon.js';
|
|
9
|
+
import { SubLabel } from './Text.js';
|
|
10
|
+
import { Tooltip } from './Tooltip.js';
|
|
11
11
|
const badgeStyler = cva({
|
|
12
12
|
base: {
|
|
13
13
|
borderWidth: 'thin',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/custom/Badge.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../../src/components/custom/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAqB,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,MAAM,EAAoB,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW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AAE,KAAK,EACX,KAAK,EAAC,OAAO,EACb,MAAM,EAAC,MAAM,EACb,SAAS,EAAE,GAAG,CAAC;wBACd,YAAY,EAAE,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM;wBACxD,UAAU,EAAE,QAAQ;wBACpB,QAAQ,EAAE,QAAQ;qBAClB,CAAC,GACD,IACI,GACC,CACT,CAAC;IAEF,OAAO,OAAO,CAAC,CAAC,CAAC,CAChB,KAAC,OAAO,IAAC,OAAO,EAAE,OAAO,YACxB,KAAC,cAAc,KAAG,GACT,CACV,CAAC,CAAC,CAAC,CACH,KAAC,cAAc,KAAG,CAClB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeButton.d.ts","sourceRoot":"","sources":["../../../src/components/custom/BadgeButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeButton.d.ts","sourceRoot":"","sources":["../../../src/components/custom/BadgeButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAKpD,KAAK,cAAc,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,cAAc,4CAuBhD,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { uuidv4 } from '@luxonis/common-fe-utils';
|
|
3
3
|
import { css } from '../../styled-system/css/css.mjs';
|
|
4
|
-
import { SubLabel } from './Text.js';
|
|
5
|
-
import { Flex } from './Flex.js';
|
|
6
|
-
import { Button } from './Button.js';
|
|
7
4
|
import { Badge } from './Badge.js';
|
|
5
|
+
import { Button } from './Button.js';
|
|
6
|
+
import { Flex } from './Flex.js';
|
|
7
|
+
import { SubLabel } from './Text.js';
|
|
8
8
|
export const BadgeButton = (props) => {
|
|
9
9
|
const { label, variant, onClick, icon } = props;
|
|
10
10
|
return (_jsx(Badge, { label: _jsxs(Flex, { align: "center", gap: "smaller.xs", className: css({ py: '1' }), children: [_jsx(SubLabel, { text: label, className: css({ paddingLeft: '1' }) }), _jsx(Button, { onClick: onClick, variant: "ghost", icon: icon, size: "sm", colorVariant: "white", width: "icon.xs", height: "icon.xs" })] }), variant: variant }, `${uuidv4()}-badge-button`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeButton.js","sourceRoot":"","sources":["../../../src/components/custom/BadgeButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"BadgeButton.js","sourceRoot":"","sources":["../../../src/components/custom/BadgeButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGlD,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AASrC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAqB,EAAE,EAAE;IACpD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEhD,OAAO,CACN,KAAC,KAAK,IAEL,KAAK,EACJ,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,GAAG,EAAC,YAAY,EAAC,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,aAChE,KAAC,QAAQ,IAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,GAAI,EAC/D,KAAC,MAAM,IACN,OAAO,EAAE,OAAO,EAChB,OAAO,EAAC,OAAO,EACf,IAAI,EAAE,IAAI,EACV,IAAI,EAAC,IAAI,EACT,YAAY,EAAC,OAAO,EACpB,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,GACf,IACI,EAER,OAAO,EAAE,OAAO,IAfX,GAAG,MAAM,EAAE,eAAe,CAgB9B,CACF,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeLine.d.ts","sourceRoot":"","sources":["../../../src/components/custom/BadgeLine.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeLine.d.ts","sourceRoot":"","sources":["../../../src/components/custom/BadgeLine.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAGjD,KAAK,cAAc,GAAG;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,SAAS,CAAC;AAEd,eAAO,MAAM,SAAS,UAAW,cAAc,4CAiE9C,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { uuidv4 } from '@luxonis/common-fe-utils';
|
|
3
3
|
import { css } from '../../styled-system/css/css.mjs';
|
|
4
|
-
import { Label, SubLabel } from './Text.js';
|
|
5
|
-
import { Flex } from './Flex.js';
|
|
6
4
|
import { Badge } from './Badge.js';
|
|
5
|
+
import { Flex } from './Flex.js';
|
|
6
|
+
import { Label, SubLabel } from './Text.js';
|
|
7
7
|
export const BadgeLine = (props) => {
|
|
8
8
|
const { maxBadges = 1, labels, variant, tooltip, ...rest } = props;
|
|
9
9
|
const listStyles = css({
|
|
@@ -12,7 +12,7 @@ export const BadgeLine = (props) => {
|
|
|
12
12
|
});
|
|
13
13
|
const listItemStyles = css({ color: 'dark.gray' });
|
|
14
14
|
const badgesSliceIndex = labels.length > maxBadges ? maxBadges : labels.length + 1;
|
|
15
|
-
return (_jsxs(Flex, { gap: "smaller.xs", wrap: "wrap", flexWrap: "nowrap", ...rest, children: [labels.slice(0, badgesSliceIndex).map(label => (_jsx(Badge, { label: tooltip ? (_jsx(Flex, { maxWidth: "container.smaller.xxs", children: _jsx(SubLabel, { text: label, color: "unset", weight: "bold", className: css({
|
|
15
|
+
return (_jsxs(Flex, { gap: "smaller.xs", wrap: "wrap", flexWrap: "nowrap", ...rest, children: [labels.slice(0, badgesSliceIndex).map((label) => (_jsx(Badge, { label: tooltip ? (_jsx(Flex, { maxWidth: "container.smaller.xxs", children: _jsx(SubLabel, { text: label, color: "unset", weight: "bold", className: css({
|
|
16
16
|
textOverflow: 'ellipsis',
|
|
17
17
|
whiteSpace: 'nowrap',
|
|
18
18
|
overflow: 'hidden',
|
|
@@ -20,6 +20,6 @@ export const BadgeLine = (props) => {
|
|
|
20
20
|
textOverflow: 'ellipsis',
|
|
21
21
|
whiteSpace: 'nowrap',
|
|
22
22
|
overflow: 'hidden',
|
|
23
|
-
}) })), tooltip: label, variant: variant }, uuidv4()))), maxBadges < labels.length && (_jsx(Badge, { variant: "gray", tooltip: _jsx("ul", { className: listStyles, children: labels.slice(badgesSliceIndex).map(label => (_jsx("li", { className: listItemStyles, children: _jsx(Label, { color: "light", text: label }) }, uuidv4()))) }), label: `+${labels.length - badgesSliceIndex}` }))] }));
|
|
23
|
+
}) })), tooltip: label, variant: variant }, uuidv4()))), maxBadges < labels.length && (_jsx(Badge, { variant: "gray", tooltip: _jsx("ul", { className: listStyles, children: labels.slice(badgesSliceIndex).map((label) => (_jsx("li", { className: listItemStyles, children: _jsx(Label, { color: "light", text: label }) }, uuidv4()))) }), label: `+${labels.length - badgesSliceIndex}` }))] }));
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=BadgeLine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeLine.js","sourceRoot":"","sources":["../../../src/components/custom/BadgeLine.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"BadgeLine.js","sourceRoot":"","sources":["../../../src/components/custom/BadgeLine.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAS5C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAClD,MAAM,EAAE,SAAS,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEnE,MAAM,UAAU,GAAG,GAAG,CAAC;QACtB,aAAa,EAAE,MAAM;QACrB,iBAAiB,EAAE,QAAQ;KAC3B,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IAEnD,MA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EAAE,cAAc,YAC3C,KAAC,KAAK,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,KAAK,GAAI,IAD5B,MAAM,EAAE,CAEZ,CACL,CAAC,GACE,EAEN,KAAK,EAAE,IAAI,MAAM,CAAC,MAAM,GAAG,gBAAgB,EAAE,GAC5C,CACF,IACK,CACP,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { IconType } from 'react-icons';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import type { UtilityValues } from '../../styled-system/types/prop-type.mjs';
|
|
5
|
-
import type { HTMLStyledProps } from '../../styled-system/types/jsx.mjs';
|
|
6
|
-
import type { HoverColorStylesProps } from '../../recipes/hover.js';
|
|
2
|
+
import type { IconType } from 'react-icons';
|
|
7
3
|
import type { PropsFromCVA } from '../../helpers.js';
|
|
4
|
+
import type { HoverColorStylesProps } from '../../recipes/hover.js';
|
|
5
|
+
import type { HTMLStyledProps } from '../../styled-system/types/jsx.mjs';
|
|
6
|
+
import type { UtilityValues } from '../../styled-system/types/prop-type.mjs';
|
|
7
|
+
import { _Button } from '../shadow-panda/_Button.js';
|
|
8
8
|
import type { IconProps } from './Icon.js';
|
|
9
9
|
declare const customButtonStyler: import("../../styled-system/types/recipe.mjs").RecipeRuntimeFn<{
|
|
10
10
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAA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AC,OAAO,OAAO,CAAC,EAAE,SAAS,CAAC,GACzE,qBAAqB,GACrB,gBAAgB,CAAC;AAElB,eAAO,MAAM,MAAM,oGAsFlB,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { clsx } from '../../helpers.js';
|
|
5
|
+
import { SelectIcon } from '../../icons/react-icons.js';
|
|
6
|
+
import { colorStyles } from '../../recipes/colors.js';
|
|
7
|
+
import { hoverStyles } from '../../recipes/hover.js';
|
|
8
|
+
import { css } from '../../styled-system/css/css.mjs';
|
|
9
|
+
import { cva } from '../../styled-system/css/cva.mjs';
|
|
4
10
|
import { _Button } from '../shadow-panda/_Button.js';
|
|
5
|
-
import { Separator } from '../shadow-panda/Separator.js';
|
|
6
11
|
import { DropdownMenu, DropdownMenuGroup, DropdownMenuSeparator, DropdownMenuTrigger, } from '../shadow-panda/DropdownMenu.js';
|
|
7
|
-
import {
|
|
8
|
-
import { css } from '../../styled-system/css/css.mjs';
|
|
9
|
-
import { hoverStyles } from '../../recipes/hover.js';
|
|
10
|
-
import { colorStyles } from '../../recipes/colors.js';
|
|
11
|
-
import { SelectIcon } from '../../icons/react-icons.js';
|
|
12
|
-
import { clsx } from '../../helpers.js';
|
|
13
|
-
import { Label } from './Text.js';
|
|
14
|
-
import { Icon } from './Icon.js';
|
|
15
|
-
import { Flex } from './Flex.js';
|
|
12
|
+
import { Separator } from '../shadow-panda/Separator.js';
|
|
16
13
|
import { DropdownMenuContent, DropdownMenuItem } from './DropdownMenu.js';
|
|
14
|
+
import { Flex } from './Flex.js';
|
|
15
|
+
import { Icon } from './Icon.js';
|
|
16
|
+
import { Label } from './Text.js';
|
|
17
17
|
const customButtonStyler = cva({
|
|
18
18
|
base: {
|
|
19
19
|
rounded: 'common',
|
|
@@ -48,13 +48,18 @@ export const Button = React.forwardRef((props, ref) => {
|
|
|
48
48
|
_onClick(event);
|
|
49
49
|
}
|
|
50
50
|
}, [_onClick]);
|
|
51
|
-
const mobileLabelStyles = hideLabelOnMobile
|
|
52
|
-
|
|
51
|
+
const mobileLabelStyles = hideLabelOnMobile
|
|
52
|
+
? css({ sm: { display: 'block' }, display: 'none' })
|
|
53
|
+
: '';
|
|
54
|
+
const customStyles = customButtonStyler({
|
|
55
|
+
size,
|
|
56
|
+
disabled: !!rest.disabled,
|
|
57
|
+
});
|
|
53
58
|
const withSelectorStyles = css({ paddingRight: 0 });
|
|
54
|
-
return (_jsxs(_Button, { ...rest, ref: ref, size: size ?? (!label && !children ? 'icon' : undefined), type: type ?? 'button', onClick: onClick, className: clsx(colorStyles({ variant, colorVariant }), hoverStyles({ variant, colorVariant, hoverStyle }), customStyles, selector ? withSelectorStyles : null, className), "data-cy": dataCy, children: [_jsxs(Flex, { align: "center", gap: "xs", width: props.contentWidth ?? 'auto', children: [iconPosition === 'end' && label && (_jsx(Label, { text: label, className: mobileLabelStyles, color: "unset", weight: "medium", break: "none" })), icon && _jsx(Icon, { icon: icon, ...iconProps }), iconPosition === 'start' && label && (_jsx(Label, { text: label, className: mobileLabelStyles, color: "unset", weight: "medium", break: "none" })), children] }), selector && (_jsxs(Flex, { height: "full", children: [_jsx(Separator, { orientation: "vertical", height: "full" }), _jsx(ButtonSelect, { ...selector })] }))] }));
|
|
59
|
+
return (_jsxs(_Button, { ...rest, ref: ref, size: size ?? (!label && !children ? 'icon' : undefined), type: type ?? 'button', onClick: onClick, className: clsx(colorStyles({ variant, colorVariant }), hoverStyles({ variant, colorVariant, hoverStyle }), customStyles, selector ? withSelectorStyles : null, className), "data-cy": dataCy, children: [_jsxs(Flex, { align: "center", gap: "xs", width: props.contentWidth ?? 'auto', children: [iconPosition === 'end' && label && (_jsx(Label, { text: label, className: mobileLabelStyles, color: "unset", weight: "medium", break: "none" })), icon && _jsx(Icon, { icon: icon, ...iconProps }), iconPosition === 'start' && label && (_jsx(Label, { text: label, className: mobileLabelStyles, color: "unset", weight: "medium", break: "none" })), children] }), selector && (_jsxs(Flex, { height: "full", children: [_jsx(Separator, { orientation: "vertical", height: "full" }), _jsx(ButtonSelect, { ...selector, disabled: rest.disabled })] }))] }));
|
|
55
60
|
});
|
|
56
61
|
const ButtonSelect = (props) => {
|
|
57
|
-
const { items, action, onSelect: _onSelect, className } = props;
|
|
62
|
+
const { items, action, onSelect: _onSelect, className, disabled } = props;
|
|
58
63
|
const onSelect = React.useCallback((event, id) => {
|
|
59
64
|
if (_onSelect) {
|
|
60
65
|
event.stopPropagation();
|
|
@@ -67,6 +72,9 @@ const ButtonSelect = (props) => {
|
|
|
67
72
|
padding: 'smaller.sm',
|
|
68
73
|
color: 'inherit',
|
|
69
74
|
});
|
|
70
|
-
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, "data-cy": 'dropdown-menu-trigger',
|
|
75
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, "data-cy": 'dropdown-menu-trigger', disabled: disabled, children: _jsx(Flex, { className: clsx(className, styles), onClick: (event) => {
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
event.stopPropagation();
|
|
78
|
+
}, role: "button", children: _jsx(Icon, { icon: SelectIcon }) }) }), _jsxs(DropdownMenuContent, { maxHeight: "container.smaller.xs", overflowY: "auto", children: [action && (_jsxs(_Fragment, { children: [_jsx(DropdownMenuGroup, { children: action }), items.length > 0 && _jsx(DropdownMenuSeparator, {})] })), _jsx(DropdownMenuGroup, { "data-cy": 'dropdown-menu-items', children: items.map((item) => (_jsx(DropdownMenuItem, { onClick: (event) => onSelect(event, item.id), label: item.value }, `button-select-item-${item.id}`))) })] })] }));
|
|
71
79
|
};
|
|
72
80
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/custom/Button.tsx"],"names":[],"mappings":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C,IAAI,EAAE,EAAE,CAAC,CACpB,KAAC,gBAAgB,IAEhB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,EAC5C,KAAK,EAAE,IAAI,CAAC,KAAK,IAFZ,sBAAsB,IAAI,CAAC,EAAE,EAAE,CAGnC,CACF,CAAC,GACiB,IACC,IACR,CACf,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAMpE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAGjD,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,qBAAqB,CAAC;AAE1B,eAAO,MAAM,IAAI,UAAW,SAAS,4CAyEpC,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { clsx } from '../../helpers.js';
|
|
4
|
+
import { colorStyles } from '../../recipes/colors.js';
|
|
5
|
+
import { hoverStyles } from '../../recipes/hover.js';
|
|
6
|
+
import { css } from '../../styled-system/css/css.mjs';
|
|
3
7
|
import { _Card } from '../shadow-panda/_Card.js';
|
|
4
8
|
import { Separator } from '../shadow-panda/Separator.js';
|
|
5
|
-
import { css } from '../../styled-system/css/css.mjs';
|
|
6
|
-
import { hoverStyles } from '../../recipes/hover.js';
|
|
7
|
-
import { colorStyles } from '../../recipes/colors.js';
|
|
8
|
-
import { clsx } from '../../helpers.js';
|
|
9
|
-
import { Header, SubLabel } from './Text.js';
|
|
10
9
|
import { Flex } from './Flex.js';
|
|
10
|
+
import { Header, SubLabel } from './Text.js';
|
|
11
11
|
export const Card = (props) => {
|
|
12
12
|
const { title, titleSeparator = true, subtitle, actions, footer, wrapper, children, fullWidth, cardStyles, disabled, variant = 'outline', colorVariant = 'white', withHoverEffect, hoverStyle, ...rest } = props;
|
|
13
13
|
// TODO swap cardStyles with className
|
|
14
|
-
const styles = clsx(colorStyles({ variant, colorVariant }), withHoverEffect
|
|
14
|
+
const styles = clsx(colorStyles({ variant, colorVariant }), withHoverEffect
|
|
15
|
+
? hoverStyles({ variant, colorVariant, hoverStyle })
|
|
16
|
+
: undefined, cardStyles, fullWidth ? css({ width: 'full', overflow: 'auto' }) : null, css({ borderRadius: 'common' }));
|
|
15
17
|
const cursor = React.useMemo(() => (disabled ? 'not-allowed' : rest.onClick ? 'pointer' : undefined), [disabled, rest.onClick]);
|
|
16
18
|
const Wrapper = React.useMemo(() => (wrapper ? wrapper : React.Fragment), [wrapper]);
|
|
17
|
-
return (_jsxs(_Card, { className: styles, cursor: cursor, children: [((title !== undefined && title !== null) || subtitle !== undefined) && (_jsxs(_Fragment, { children: [_jsxs(Flex, { justify: "space-between", align: "center", gap: "sm", padding: "sm", children: [_jsxs(Flex, { direction: "column", maxWidth: "full", flexGrow: 1, children: [typeof title === 'string' ? _jsx(Header, { text: title, break: "none" }) : title, subtitle && _jsx(SubLabel, { text: subtitle })] }), actions] }), titleSeparator && _jsx(Separator, {})] })), _jsx(Wrapper, { children: _jsx(Flex, { direction: "column", padding: "sm", ...rest, children: children }) }), footer && (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsx(Flex, { justify: "space-between", align: "center", padding: "sm", children: footer })] }))] }));
|
|
19
|
+
return (_jsxs(_Card, { className: styles, cursor: cursor, children: [((title !== undefined && title !== null) || subtitle !== undefined) && (_jsxs(_Fragment, { children: [_jsxs(Flex, { justify: "space-between", align: "center", gap: "sm", padding: "sm", children: [_jsxs(Flex, { direction: "column", maxWidth: "full", flexGrow: 1, children: [typeof title === 'string' ? (_jsx(Header, { text: title, break: "none" })) : (title), subtitle && _jsx(SubLabel, { text: subtitle })] }), actions] }), titleSeparator && _jsx(Separator, {})] })), _jsx(Wrapper, { children: _jsx(Flex, { direction: "column", padding: "sm", ...rest, children: children }) }), footer && (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsx(Flex, { justify: "space-between", align: "center", padding: "sm", children: footer })] }))] }));
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/custom/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../src/components/custom/Card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,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AQ,EAAC,OAAO,EAAC,IAAI,YACvD,MAAM,GACD,IACL,CACH,IACM,CACR,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TableCell } from '../shadow-panda/Table.js';
|
|
3
2
|
import type { PropsFromCVA } from '../../helpers.js';
|
|
4
|
-
import
|
|
5
|
-
import { TableRow } from './Table.js';
|
|
3
|
+
import { TableCell } from '../shadow-panda/Table.js';
|
|
6
4
|
import { type CardProps } from './Card.js';
|
|
5
|
+
import { TableRow } from './Table.js';
|
|
6
|
+
import type { StyledTextProps } from './Text.js';
|
|
7
7
|
type TableRowProps = React.ComponentProps<typeof TableRow>;
|
|
8
8
|
type TableCellProps = React.ComponentProps<typeof TableCell>;
|
|
9
9
|
declare const backgroundVariants: import("../../styled-system/types/recipe.mjs").RecipeRuntimeFn<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardList.d.ts","sourceRoot":"","sources":["../../../src/components/custom/CardList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CardList.d.ts","sourceRoot":"","sources":["../../../src/components/custom/CardList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAa,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,EAAS,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC3D,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC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
import { TableBody, TableCell } from '../shadow-panda/Table.js';
|
|
5
|
-
import { cva } from '../../styled-system/css/cva.mjs';
|
|
6
4
|
import { clsx } from '../../helpers.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Flex } from './Flex.js';
|
|
5
|
+
import { cva } from '../../styled-system/css/cva.mjs';
|
|
6
|
+
import { TableBody, TableCell } from '../shadow-panda/Table.js';
|
|
10
7
|
import { Card } from './Card.js';
|
|
8
|
+
import { Flex } from './Flex.js';
|
|
9
|
+
import { Table, TableRow } from './Table.js';
|
|
10
|
+
import { Label, NormalText, SubLabel } from './Text.js';
|
|
11
11
|
const CardListVariantContext = React.createContext('table');
|
|
12
12
|
const backgroundVariants = cva({
|
|
13
13
|
base: {
|
|
@@ -64,7 +64,8 @@ export const CardListItem = (props) => {
|
|
|
64
64
|
if (variantCtx === 'column') {
|
|
65
65
|
return (_jsx(Wrapper, { children: _jsxs(Flex, { ...rowProps, full: !!wrapper, direction: "column", children: [_jsx(Label, { text: label, weight: "medium", color: "normal" }), _jsx(Label, { text: value, ...valueProps })] }) }));
|
|
66
66
|
}
|
|
67
|
-
return (_jsxs(TableRow, { className: clsx(variant && backgroundVariants({ variant }), hoverVariants({ variant }), className), ...rowProps, children: [_jsx(TableCell, { textAlign: "left", colSpan: !(value || valueAction) ? 2 : 1, ...cellProps, children: _jsx(Wrapper, { children: _jsx(Flex, { full: !!wrapper, direction: "row", align: "center", gap: "xs", children: _jsxs(Flex, { gap: "xs", children: [_jsxs(Flex, { direction: "column", align: "start", justify: "center", gap: "xs", children: [typeof label === 'string' ? _jsx(NormalText, { text: label }) : label, typeof sublabel === 'string' ? _jsx(SubLabel, { text: sublabel }) : sublabel] }), labelAction] }) }) }) }), (value || valueAction) && (_jsx(TableCell, { ...cellProps, children: _jsx(Wrapper, { children: _jsxs(Flex, { wrap: "wrap", full: !!wrapper, gap: "xs", align: "center", justify: "end", children: [value &&
|
|
67
|
+
return (_jsxs(TableRow, { className: clsx(variant && backgroundVariants({ variant }), hoverVariants({ variant }), className), ...rowProps, children: [_jsx(TableCell, { textAlign: "left", colSpan: !(value || valueAction) ? 2 : 1, ...cellProps, children: _jsx(Wrapper, { children: _jsx(Flex, { full: !!wrapper, direction: "row", align: "center", gap: "xs", children: _jsxs(Flex, { gap: "xs", children: [_jsxs(Flex, { direction: "column", align: "start", justify: "center", gap: "xs", children: [typeof label === 'string' ? (_jsx(NormalText, { text: label })) : (label), typeof sublabel === 'string' ? (_jsx(SubLabel, { text: sublabel })) : (sublabel)] }), labelAction] }) }) }) }), (value || valueAction) && (_jsx(TableCell, { ...cellProps, children: _jsx(Wrapper, { children: _jsxs(Flex, { wrap: "wrap", full: !!wrapper, gap: "xs", align: "center", justify: "end", children: [value &&
|
|
68
|
+
(!raw ? _jsx(NormalText, { text: value, color: "label" }) : value), valueAction] }) }) }))] }));
|
|
68
69
|
};
|
|
69
70
|
export const CardList = (props) => {
|
|
70
71
|
const { entity, empty, children, layout = 'table', ...cardProps } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardList.js","sourceRoot":"","sources":["../../../src/components/custom/CardList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CardList.js","sourceRoot":"","sources":["../../../src/components/custom/CardList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAA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AAC,CAAC,CAAC,CACH,QAAQ,CACR,GACgC,GAC5B,CACP,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -3,8 +3,10 @@ import { _Checkbox } from '../shadow-panda/_Checkbox.js';
|
|
|
3
3
|
type BaseCheckboxProps = React.ComponentProps<typeof _Checkbox>;
|
|
4
4
|
type CheckboxItemProps = {
|
|
5
5
|
id?: string;
|
|
6
|
-
label?: string;
|
|
6
|
+
label?: string | React.ReactNode;
|
|
7
7
|
value?: boolean;
|
|
8
|
+
containerClassName?: string;
|
|
9
|
+
subLabel?: React.ReactNode;
|
|
8
10
|
};
|
|
9
11
|
export type CheckboxProps = Omit<BaseCheckboxProps, 'checked' | 'value'> & CheckboxItemProps;
|
|
10
12
|
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAKzD,KAAK,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAEhE,KAAK,iBAAiB,GAAG;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,OAAO,CAAC,GACvE,iBAAiB,CAAC;AAEnB,eAAO,MAAM,QAAQ,sGA+BpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAG,MAAM,GAAG,QAuClE,CAAC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
2
|
import { uuidv4 } from '@luxonis/common-fe-utils';
|
|
4
|
-
import
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import { _Checkbox } from '../shadow-panda/_Checkbox.js';
|
|
6
|
-
import {
|
|
5
|
+
import { _Label } from '../shadow-panda/_Label.js';
|
|
7
6
|
import { Flex } from './Flex.js';
|
|
7
|
+
import { NormalText } from './Text.js';
|
|
8
8
|
export const Checkbox = React.forwardRef((props, ref) => {
|
|
9
|
-
const {
|
|
10
|
-
return (_jsx(_Label, { cursor: "pointer", children: _jsxs(Flex, { gap: "xs", align: "center", children: [_jsx(_Checkbox, { checked: value, onCheckedChange: onChange, ...rest, ref: ref }), _jsx(NormalText, { text: label })] }) }));
|
|
9
|
+
const { label, value = false, onChange, containerClassName, subLabel, ...rest } = props;
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(_Label, { cursor: "pointer", children: _jsxs(Flex, { gap: "xs", align: "center", className: containerClassName, children: [_jsx(_Checkbox, { checked: value, onCheckedChange: onChange, ...rest, ref: ref }), typeof label === 'string' ? _jsx(NormalText, { text: label }) : label] }) }), subLabel] }));
|
|
11
11
|
});
|
|
12
12
|
export const CheckboxGroup = (props) => {
|
|
13
13
|
const { items, onChange } = props;
|
|
14
|
-
const [checked, setChecked] = React.useState(() => Object.fromEntries(items
|
|
14
|
+
const [checked, setChecked] = React.useState(() => Object.fromEntries(items
|
|
15
|
+
.filter((item) => item.value && item.id)
|
|
16
|
+
.map((item) => [item.id, true])));
|
|
15
17
|
const handleToggleCheck = React.useCallback((id) => {
|
|
16
18
|
if (id) {
|
|
17
19
|
let newList = {};
|
|
@@ -26,6 +28,6 @@ export const CheckboxGroup = (props) => {
|
|
|
26
28
|
onChange?.(newList);
|
|
27
29
|
}
|
|
28
30
|
}, [checked, onChange]);
|
|
29
|
-
return (_jsx(Flex, { direction: "column", children: items.map(item => (_jsx(Checkbox, { onChange: () => handleToggleCheck(item.id), ...item }, `checkbox-group-${uuidv4()}`))) }));
|
|
31
|
+
return (_jsx(Flex, { direction: "column", children: items.map((item) => (_jsx(Checkbox, { onChange: () => handleToggleCheck(item.id), ...item }, `checkbox-group-${uuidv4()}`))) }));
|
|
30
32
|
};
|
|
31
33
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/custom/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/custom/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAevC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACvC,CACC,KAAo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BACjB,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC;gBACxC,OAAO,GAAG,OAAO,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACP,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;YACtC,CAAC;YACD,UAAU,CAAC,OAAO,CAAC,CAAC;YACpB,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC;QACrB,CAAC;IACF,CAAC,EACD,CAAC,OAAO,EAAE,QAAQ,CAAC,CACnB,CAAC;IAEF,OAAO,CACN,KAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,YACtB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACpB,KAAC,QAAQ,IAER,QAAQ,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,KACtC,IAAI,IAFH,kBAAkB,MAAM,EAAE,EAAE,CAGhC,CACF,CAAC,GACI,CACP,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { IconType } from 'react-icons';
|
|
2
1
|
import React from 'react';
|
|
2
|
+
import type { IconType } from 'react-icons';
|
|
3
3
|
import type { PropsFromCVA } from '../../helpers.js';
|
|
4
|
-
import type { StyledTextProps } from './Text.js';
|
|
5
|
-
import type { IconProps } from './Icon.js';
|
|
6
4
|
import { type FlexProps } from './Flex.js';
|
|
5
|
+
import type { IconProps } from './Icon.js';
|
|
6
|
+
import type { StyledTextProps } from './Text.js';
|
|
7
7
|
declare const circleStyler: import("../../styled-system/types/recipe.mjs").RecipeRuntimeFn<{
|
|
8
8
|
variant: {
|
|
9
9
|
success: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../../../src/components/custom/Circle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDhB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,CAChD,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAChC,YAAY,CAAC,OAAO,YAAY,CAAC,GAAG;IACnC,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;CACvC,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAClC,CAAC;AAEF,eAAO,MAAM,MAAM,UAAW,WAAW,4CA2CxC,CAAC"}
|