@adgytec/adgytec-web-ui-components 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -2
- package/dist/assets/AppBarHeadline.css +1 -1
- package/dist/assets/CalendarCell.css +1 -1
- package/dist/assets/CalendarMenuItem.css +1 -1
- package/dist/assets/Card.css +1 -0
- package/dist/assets/CardIcon.css +1 -0
- package/dist/assets/ConnectedButtonGroup.css +1 -1
- package/dist/assets/ListAvatar.css +1 -0
- package/dist/assets/ListBox.css +1 -0
- package/dist/assets/ListIcon.css +1 -0
- package/dist/assets/ListItem.css +1 -0
- package/dist/assets/ListLabelText.css +1 -0
- package/dist/assets/ListMedia.css +1 -0
- package/dist/assets/ListOverlineText.css +1 -0
- package/dist/assets/ListSupportingText.css +1 -0
- package/dist/assets/ListTrailingText.css +1 -0
- package/dist/assets/NavigationScrollContainer.css +1 -1
- package/dist/assets/SideSheet.css +1 -1
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/core7.css +1 -1
- package/dist/chunks/ActionDialog.map +1 -1
- package/dist/chunks/AppBar +42 -42
- package/dist/chunks/AppBar.map +1 -1
- package/dist/chunks/AppBarAction.map +1 -1
- package/dist/chunks/AppBarAvatar.map +1 -1
- package/dist/chunks/AppBarHeadline +2 -2
- package/dist/chunks/AppBarHeadline.map +1 -1
- package/dist/chunks/BaseCalendar +69 -63
- package/dist/chunks/BaseCalendar.map +1 -1
- package/dist/chunks/BottomSheet.map +1 -1
- package/dist/chunks/BottomSheetModal.map +1 -1
- package/dist/chunks/ButtonGroup.map +1 -1
- package/dist/chunks/CalendarCell +25 -39
- package/dist/chunks/CalendarCell.map +1 -1
- package/dist/chunks/CalendarGrid.map +1 -1
- package/dist/chunks/CalendarMenuItem +1 -1
- package/dist/chunks/CalendarMenuItem.map +1 -1
- package/dist/chunks/Card +22 -0
- package/dist/chunks/Card.map +1 -0
- package/dist/chunks/CardIcon +23 -0
- package/dist/chunks/CardIcon.map +1 -0
- package/dist/chunks/CenteredSlider.map +1 -1
- package/dist/chunks/ComboBox.map +1 -1
- package/dist/chunks/ComboBoxPopover.map +1 -1
- package/dist/chunks/ComboBoxTrigger +592 -62
- package/dist/chunks/ComboBoxTrigger.map +1 -1
- package/dist/chunks/ConnectedButtonGroup +19 -16
- package/dist/chunks/ConnectedButtonGroup.map +1 -1
- package/dist/chunks/Dialog.map +1 -1
- package/dist/chunks/Disclosure.map +1 -1
- package/dist/chunks/DisclosureGroup.map +1 -1
- package/dist/chunks/DisclosureHeader.map +1 -1
- package/dist/chunks/DisclosurePanel.map +1 -1
- package/dist/chunks/Divider.map +1 -1
- package/dist/chunks/FieldError.map +1 -1
- package/dist/chunks/GridBackgroundDecorator.map +1 -1
- package/dist/chunks/Icon.map +1 -1
- package/dist/chunks/Input.map +1 -1
- package/dist/chunks/Input2 +2 -1
- package/dist/chunks/Input2.map +1 -1
- package/dist/chunks/ListAction +13 -0
- package/dist/chunks/ListAction.map +1 -0
- package/dist/chunks/ListAvatar +20 -0
- package/dist/chunks/ListAvatar.map +1 -0
- package/dist/chunks/ListBox +16 -0
- package/dist/chunks/ListBox.map +1 -0
- package/dist/chunks/ListIcon +21 -0
- package/dist/chunks/ListIcon.map +1 -0
- package/dist/chunks/ListItem +63 -0
- package/dist/chunks/ListItem.map +1 -0
- package/dist/chunks/ListLabelText +22 -0
- package/dist/chunks/ListLabelText.map +1 -0
- package/dist/chunks/ListMedia +15 -0
- package/dist/chunks/ListMedia.map +1 -0
- package/dist/chunks/ListOverlineText +21 -0
- package/dist/chunks/ListOverlineText.map +1 -0
- package/dist/chunks/ListSupportingText +22 -0
- package/dist/chunks/ListSupportingText.map +1 -0
- package/dist/chunks/ListTrailingText +21 -0
- package/dist/chunks/ListTrailingText.map +1 -0
- package/dist/chunks/Loader.map +1 -1
- package/dist/chunks/MenuPopover.map +1 -1
- package/dist/chunks/Modal.map +1 -1
- package/dist/chunks/ModalOverlay.map +1 -1
- package/dist/chunks/Navigation +20 -20
- package/dist/chunks/Navigation.map +1 -1
- package/dist/chunks/NavigationScrollContainer +48 -32
- package/dist/chunks/NavigationScrollContainer.map +1 -1
- package/dist/chunks/NavigationSection.map +1 -1
- package/dist/chunks/NavigationSectionLabel.map +1 -1
- package/dist/chunks/Popover.map +1 -1
- package/dist/chunks/RadialGlowDecorator.map +1 -1
- package/dist/chunks/Radio.map +1 -1
- package/dist/chunks/RichTooltip.map +1 -1
- package/dist/chunks/RichTooltipActions.map +1 -1
- package/dist/chunks/RichTooltipInfo.map +1 -1
- package/dist/chunks/SearchField.map +1 -1
- package/dist/chunks/SelectPopover.map +1 -1
- package/dist/chunks/SelectTrigger.map +1 -1
- package/dist/chunks/SideSheet +7 -7
- package/dist/chunks/SideSheet.map +1 -1
- package/dist/chunks/SideSheetModal.map +1 -1
- package/dist/chunks/Slider.map +1 -1
- package/dist/chunks/SliderOutput.map +1 -1
- package/dist/chunks/SliderStops +3 -3
- package/dist/chunks/SliderStops.map +1 -1
- package/dist/chunks/SliderThumb.map +1 -1
- package/dist/chunks/Snackbar +18 -27
- package/dist/chunks/Snackbar.map +1 -1
- package/dist/chunks/SplitButton +13 -10
- package/dist/chunks/SplitButton.map +1 -1
- package/dist/chunks/SplitButtonTrigger +8 -7
- package/dist/chunks/SplitButtonTrigger.map +1 -1
- package/dist/chunks/SubmenuPopover.map +1 -1
- package/dist/chunks/Switch.map +1 -1
- package/dist/chunks/Tab.map +1 -1
- package/dist/chunks/TabList.map +1 -1
- package/dist/chunks/TabPanel.map +1 -1
- package/dist/chunks/TabPanels.map +1 -1
- package/dist/chunks/Tabs.map +1 -1
- package/dist/chunks/Tag.map +1 -1
- package/dist/chunks/ThemeSelector +75 -71
- package/dist/chunks/ThemeSelector.map +1 -1
- package/dist/chunks/Toolbar.map +1 -1
- package/dist/chunks/Tooltip.map +1 -1
- package/dist/chunks/base.map +1 -1
- package/dist/chunks/compiler-runtime +2 -2
- package/dist/chunks/compiler-runtime.map +1 -1
- package/dist/chunks/context.map +1 -1
- package/dist/chunks/core +27 -25
- package/dist/chunks/core.map +1 -1
- package/dist/chunks/core2.map +1 -1
- package/dist/chunks/core3.map +1 -1
- package/dist/chunks/core4.map +1 -1
- package/dist/chunks/core5.map +1 -1
- package/dist/chunks/core6 +11 -11
- package/dist/chunks/core6.map +1 -1
- package/dist/chunks/core7.map +1 -1
- package/dist/chunks/core8.map +1 -1
- package/dist/chunks/core9.map +1 -1
- package/dist/chunks/navContext.map +1 -1
- package/dist/chunks/tapTarget.map +1 -1
- package/dist/chunks/types +6 -0
- package/dist/chunks/types.map +1 -0
- package/dist/chunks/useHover +460 -153
- package/dist/chunks/useHover.map +1 -1
- package/dist/chunks/useSplash +17 -19
- package/dist/chunks/useSplash.map +1 -1
- package/dist/components/AppBar/AppBar/AppBar.d.ts +29 -0
- package/dist/components/AppBar/AppBar/types.d.ts +29 -4
- package/dist/components/AppBar/AppBarAction/AppBarAction.d.ts +19 -1
- package/dist/components/AppBar/AppBarAvatar/AppBarAvatar.d.ts +20 -1
- package/dist/components/AppBar/AppBarHeadline/AppBarHeadline.d.ts +19 -1
- package/dist/components/AppBar/AppBarState/AppBarState.d.ts +28 -2
- package/dist/components/AppBar/AppBarState/context.d.ts +37 -0
- package/dist/components/AppBar/AppBarState/index.js +16 -10
- package/dist/components/AppBar/AppBarState/index.js.map +1 -1
- package/dist/components/AppBar/core/alignment.d.ts +6 -0
- package/dist/components/AppBar/core/context.d.ts +16 -0
- package/dist/components/AppBar/core/index.js.map +1 -1
- package/dist/components/AppBar/core/size.d.ts +13 -0
- package/dist/components/AppBar/index.js +7 -7
- package/dist/components/Button/Button/Button.d.ts +17 -0
- package/dist/components/Button/Button/index.js.map +1 -1
- package/dist/components/Button/Button/types.d.ts +4 -0
- package/dist/components/Button/ButtonGroups/ButtonGroup/ButtonGroup.d.ts +17 -0
- package/dist/components/Button/ButtonGroups/ButtonGroup/types.d.ts +24 -0
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/context.d.ts +22 -0
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/index.js.map +1 -1
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/useButtonGroupContext.d.ts +5 -0
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/useConnectedButtonGroupContext.d.ts +5 -0
- package/dist/components/Button/ButtonGroups/ConnectedButton/ConnectedButton.d.ts +13 -0
- package/dist/components/Button/ButtonGroups/ConnectedButton/types.d.ts +19 -1
- package/dist/components/Button/ButtonGroups/ConnectedButtonGroup/ConnectedButtonGroup.d.ts +18 -0
- package/dist/components/Button/ButtonGroups/ConnectedButtonGroup/types.d.ts +24 -0
- package/dist/components/Button/IconButton/IconButton.d.ts +21 -0
- package/dist/components/Button/IconButton/index.js.map +1 -1
- package/dist/components/Button/IconButton/types.d.ts +4 -0
- package/dist/components/Button/LinkButton/LinkButton.d.ts +15 -0
- package/dist/components/Button/LinkButton/index.js.map +1 -1
- package/dist/components/Button/LinkButton/types.d.ts +4 -0
- package/dist/components/Button/LinkIconButton/LinkIconButton.d.ts +19 -0
- package/dist/components/Button/LinkIconButton/index.js.map +1 -1
- package/dist/components/Button/LinkIconButton/types.d.ts +4 -0
- package/dist/components/Button/SplitButton/SplitButton/SplitButton.d.ts +24 -0
- package/dist/components/Button/SplitButton/SplitButton/types.d.ts +23 -0
- package/dist/components/Button/SplitButton/SplitButtonContext/context.d.ts +11 -0
- package/dist/components/Button/SplitButton/SplitButtonContext/index.js.map +1 -1
- package/dist/components/Button/SplitButton/SplitButtonContext/useSplitButtonContext.d.ts +5 -0
- package/dist/components/Button/SplitButton/SplitButtonPrimary/SplitButtonPrimary.d.ts +15 -0
- package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js +2 -2
- package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js.map +1 -1
- package/dist/components/Button/SplitButton/SplitButtonPrimary/types.d.ts +11 -0
- package/dist/components/Button/SplitButton/SplitButtonTrigger/SplitButtonTrigger.d.ts +19 -0
- package/dist/components/Button/SplitButton/SplitButtonTrigger/types.d.ts +5 -0
- package/dist/components/Button/SplitButton/core/size.d.ts +13 -0
- package/dist/components/Button/ToggleButton/ToggleButton.d.ts +21 -0
- package/dist/components/Button/ToggleButton/index.js.map +1 -1
- package/dist/components/Button/ToggleButton/types.d.ts +14 -0
- package/dist/components/Button/ToggleIconButton/ToggleIconButton.d.ts +21 -0
- package/dist/components/Button/ToggleIconButton/index.js.map +1 -1
- package/dist/components/Button/ToggleIconButton/types.d.ts +9 -0
- package/dist/components/Button/core/button.d.ts +33 -0
- package/dist/components/Button/core/color.d.ts +38 -0
- package/dist/components/Button/core/shape.d.ts +6 -0
- package/dist/components/Button/core/sizes.d.ts +26 -0
- package/dist/components/Button/core/useButtonConfig.d.ts +25 -0
- package/dist/components/Button/core/variant.d.ts +6 -0
- package/dist/components/Button/core/width.d.ts +7 -0
- package/dist/components/Button/core/withTooltip.d.ts +9 -2
- package/dist/components/Calendar/BaseCalendar/BaseCalendar.d.ts +23 -2
- package/dist/components/Calendar/Calendar/Calendar.d.ts +39 -2
- package/dist/components/Calendar/Calendar/index.js +18 -12
- package/dist/components/Calendar/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/CalendarCell/CalendarCell.d.ts +14 -2
- package/dist/components/Calendar/CalendarGrid/CalendarGrid.d.ts +12 -2
- package/dist/components/Calendar/CalendarMenuItem/CalendarMenuItem.d.ts +12 -1
- package/dist/components/Calendar/CalendarMonthMenu/CalendarMonthMenu.d.ts +14 -2
- package/dist/components/Calendar/CalendarMonthMenu/index.js +2 -2
- package/dist/components/Calendar/CalendarMonthMenu/index.js.map +1 -1
- package/dist/components/Calendar/CalendarYearMenu/CalendarYearMenu.d.ts +14 -2
- package/dist/components/Calendar/CalendarYearMenu/index.js.map +1 -1
- package/dist/components/Calendar/RangeCalendar/RangeCalendar.d.ts +40 -2
- package/dist/components/Calendar/RangeCalendar/index.js +19 -15
- package/dist/components/Calendar/RangeCalendar/index.js.map +1 -1
- package/dist/components/Calendar/core/calendar.d.ts +26 -0
- package/dist/components/Calendar/core/useCalendarState.d.ts +15 -0
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/index.js +4 -3
- package/dist/components/Card/Card/Card.d.ts +22 -0
- package/dist/components/{Image → Card/Card}/index.d.ts +1 -1
- package/dist/components/Card/Card/index.js +3 -0
- package/dist/components/Card/Card/types.d.ts +30 -0
- package/dist/components/Card/CardIcon/CardIcon.d.ts +26 -0
- package/dist/components/Card/CardIcon/index.d.ts +1 -0
- package/dist/components/Card/CardIcon/index.js +2 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +4 -0
- package/dist/components/Decorators/GridBackgroundDecorator/GridBackgroundDecorator.d.ts +46 -7
- package/dist/components/Decorators/RadialGlowDecorator/RadialGlowDecorator.d.ts +53 -6
- package/dist/components/Dialog/ActionDialog/ActionDialog.d.ts +33 -0
- package/dist/components/Dialog/ActionDialog/types.d.ts +28 -2
- package/dist/components/Dialog/Dialog/Dialog.d.ts +32 -1
- package/dist/components/Dialog/Modal/Modal.d.ts +24 -1
- package/dist/components/Dialog/ModalOverlay/ModalOverlay.d.ts +25 -1
- package/dist/components/Dialog/core/context.d.ts +8 -0
- package/dist/components/Dialog/core/index.js.map +1 -1
- package/dist/components/Dialog/core/typography.d.ts +9 -0
- package/dist/components/Disclosure/Disclosure/Disclosure.d.ts +25 -1
- package/dist/components/Disclosure/DisclosureGroup/DisclosureGroup.d.ts +50 -2
- package/dist/components/Disclosure/DisclosureHeader/DisclosureHeader.d.ts +31 -2
- package/dist/components/Disclosure/DisclosurePanel/DisclosurePanel.d.ts +31 -2
- package/dist/components/Disclosure/context/context.d.ts +11 -2
- package/dist/components/Disclosure/context/index.js.map +1 -1
- package/dist/components/Disclosure/context/useDisclosureTypographyContext.d.ts +18 -2
- package/dist/components/Divider/Divider.d.ts +30 -1
- package/dist/components/Icon/Icon.d.ts +29 -0
- package/dist/components/Icon/types.d.ts +28 -0
- package/dist/components/Input/CharacterCount/CharacterCount.d.ts +11 -2
- package/dist/components/Input/CharacterCount/index.js.map +1 -1
- package/dist/components/Input/Checkbox/Checkbox.d.ts +15 -0
- package/dist/components/Input/Checkbox/CheckboxGroup.d.ts +17 -0
- package/dist/components/Input/Checkbox/context.d.ts +10 -2
- package/dist/components/Input/Checkbox/types.d.ts +42 -0
- package/dist/components/Input/DateField/DateField.d.ts +17 -1
- package/dist/components/Input/DateField/index.js.map +1 -1
- package/dist/components/Input/DateField/types.d.ts +4 -0
- package/dist/components/Input/DatePicker/DatePicker/DatePicker.d.ts +17 -1
- package/dist/components/Input/DatePicker/DatePicker/index.js.map +1 -1
- package/dist/components/Input/DatePicker/DatePicker/types.d.ts +10 -0
- package/dist/components/Input/DatePicker/DateRangePicker/DateRangePicker.d.ts +17 -1
- package/dist/components/Input/DatePicker/DateRangePicker/index.js.map +1 -1
- package/dist/components/Input/DatePicker/DateRangePicker/types.d.ts +10 -0
- package/dist/components/Input/DatePicker/core/datePicker.d.ts +3 -0
- package/dist/components/Input/Description/Description.d.ts +12 -1
- package/dist/components/Input/Description/index.js.map +1 -1
- package/dist/components/Input/FieldError/FieldError.d.ts +12 -1
- package/dist/components/Input/Input/Input.d.ts +27 -0
- package/dist/components/Input/Input/InputButton.d.ts +10 -1
- package/dist/components/Input/Input/handleInputButton.d.ts +6 -0
- package/dist/components/Input/Input/types.d.ts +20 -0
- package/dist/components/Input/Label/Label.d.ts +12 -1
- package/dist/components/Input/Label/index.js.map +1 -1
- package/dist/components/Input/Radio/Radio.d.ts +16 -0
- package/dist/components/Input/Radio/RadioGroup.d.ts +17 -0
- package/dist/components/Input/Radio/context.d.ts +10 -2
- package/dist/components/Input/Radio/types.d.ts +40 -0
- package/dist/components/Input/SearchField/SearchField.d.ts +16 -0
- package/dist/components/Input/SearchField/types.d.ts +9 -0
- package/dist/components/Input/Select/ComboBox/ComboBox.d.ts +29 -1
- package/dist/components/Input/Select/ComboBox/context.d.ts +3 -0
- package/dist/components/Input/Select/ComboBox/types.d.ts +9 -0
- package/dist/components/Input/Select/ComboBoxPopover/ComboBoxPopover.d.ts +10 -1
- package/dist/components/Input/Select/ComboBoxTrigger/ComboBoxTrigger.d.ts +10 -2
- package/dist/components/Input/Select/Select/Select.d.ts +29 -1
- package/dist/components/Input/Select/Select/index.js.map +1 -1
- package/dist/components/Input/Select/Select/types.d.ts +4 -0
- package/dist/components/Input/Select/SelectItem/SelectItem.d.ts +19 -0
- package/dist/components/Input/Select/SelectItem/index.js.map +1 -1
- package/dist/components/Input/Select/SelectItem/types.d.ts +9 -0
- package/dist/components/Input/Select/SelectList/SelectList.d.ts +14 -2
- package/dist/components/Input/Select/SelectList/index.js.map +1 -1
- package/dist/components/Input/Select/SelectListSection/SelectListSection.d.ts +4 -1
- package/dist/components/Input/Select/SelectListSection/index.js.map +1 -1
- package/dist/components/Input/Select/SelectListSectionHeader/SelectListSectionHeader.d.ts +3 -0
- package/dist/components/Input/Select/SelectListSectionHeader/index.js.map +1 -1
- package/dist/components/Input/Select/SelectPopover/SelectPopover.d.ts +10 -1
- package/dist/components/Input/Select/SelectTrigger/SelectTrigger.d.ts +10 -1
- package/dist/components/Input/Slider/CenteredSlider/CenteredSlider.d.ts +23 -1
- package/dist/components/Input/Slider/CenteredSlider/types.d.ts +6 -0
- package/dist/components/Input/Slider/RangeSlider/RangeSlider.d.ts +24 -1
- package/dist/components/Input/Slider/RangeSlider/index.js.map +1 -1
- package/dist/components/Input/Slider/RangeSlider/types.d.ts +9 -0
- package/dist/components/Input/Slider/Slider/Slider.d.ts +24 -1
- package/dist/components/Input/Slider/Slider/types.d.ts +13 -0
- package/dist/components/Input/Slider/SliderOutput/SliderOutput.d.ts +19 -1
- package/dist/components/Input/Slider/SliderStops/SliderStops.d.ts +18 -0
- package/dist/components/Input/Slider/SliderStops/core.d.ts +54 -10
- package/dist/components/Input/Slider/SliderStops/types.d.ts +38 -0
- package/dist/components/Input/Slider/SliderThumb/SliderThumb.d.ts +32 -2
- package/dist/components/Input/Slider/SliderThumb/context.d.ts +20 -0
- package/dist/components/Input/Slider/core/color.d.ts +1 -0
- package/dist/components/Input/Slider/core/size.d.ts +12 -0
- package/dist/components/Input/Slider/core/slider.d.ts +44 -0
- package/dist/components/Input/Slider/core/variant.d.ts +10 -0
- package/dist/components/Input/Switch/Switch.d.ts +15 -0
- package/dist/components/Input/Switch/types.d.ts +33 -0
- package/dist/components/Input/TextArea/TextArea.d.ts +19 -0
- package/dist/components/Input/TextArea/index.js.map +1 -1
- package/dist/components/Input/TextArea/types.d.ts +11 -0
- package/dist/components/Input/TimeField/TimeField.d.ts +17 -1
- package/dist/components/Input/TimeField/index.js.map +1 -1
- package/dist/components/Input/TimeField/types.d.ts +4 -0
- package/dist/components/Input/core/input.d.ts +15 -0
- package/dist/components/Input/core/textField.d.ts +13 -0
- package/dist/components/Input/hooks/index.js.map +1 -1
- package/dist/components/Input/hooks/useControllableState.d.ts +17 -2
- package/dist/components/List/ListAction/ListAction.d.ts +24 -0
- package/dist/components/List/ListAction/index.d.ts +1 -0
- package/dist/components/List/ListAction/index.js +2 -0
- package/dist/components/List/ListAvatar/ListAvatar.d.ts +23 -0
- package/dist/components/List/ListAvatar/index.d.ts +1 -0
- package/dist/components/List/ListAvatar/index.js +2 -0
- package/dist/components/List/ListBox/ListBox.d.ts +29 -0
- package/dist/components/List/ListBox/index.d.ts +2 -0
- package/dist/components/List/ListBox/index.js +2 -0
- package/dist/components/List/ListBox/types.d.ts +20 -0
- package/dist/components/List/ListIcon/ListIcon.d.ts +20 -0
- package/dist/components/List/ListIcon/index.d.ts +1 -0
- package/dist/components/List/ListIcon/index.js +2 -0
- package/dist/components/List/ListItem/ListItem.d.ts +36 -0
- package/dist/components/List/ListItem/index.d.ts +2 -0
- package/dist/components/List/ListItem/index.js +2 -0
- package/dist/components/List/ListItem/types.d.ts +30 -0
- package/dist/components/List/ListLabelText/ListLabelText.d.ts +17 -0
- package/dist/components/List/ListLabelText/index.d.ts +1 -0
- package/dist/components/List/ListLabelText/index.js +2 -0
- package/dist/components/List/ListMedia/ListMedia.d.ts +22 -0
- package/dist/components/List/ListMedia/index.d.ts +2 -0
- package/dist/components/List/ListMedia/index.js +2 -0
- package/dist/components/List/ListMedia/types.d.ts +42 -0
- package/dist/components/List/ListOverlineText/ListOverlineText.d.ts +17 -0
- package/dist/components/List/ListOverlineText/index.d.ts +1 -0
- package/dist/components/List/ListOverlineText/index.js +2 -0
- package/dist/components/List/ListSupportingText/ListSupportingText.d.ts +17 -0
- package/dist/components/List/ListSupportingText/index.d.ts +1 -0
- package/dist/components/List/ListSupportingText/index.js +2 -0
- package/dist/components/List/ListTrailingText/ListTrailingText.d.ts +17 -0
- package/dist/components/List/ListTrailingText/index.d.ts +1 -0
- package/dist/components/List/ListTrailingText/index.js +2 -0
- package/dist/components/List/index.d.ts +10 -0
- package/dist/components/List/index.js +11 -0
- package/dist/components/Loader/Loader.d.ts +26 -1
- package/dist/components/Menu/Menu/Menu.d.ts +31 -1
- package/dist/components/Menu/Menu/index.js.map +1 -1
- package/dist/components/Menu/Menu/types.d.ts +18 -0
- package/dist/components/Menu/MenuItem/MenuItem.d.ts +22 -0
- package/dist/components/Menu/MenuItem/index.js.map +1 -1
- package/dist/components/Menu/MenuItem/types.d.ts +24 -0
- package/dist/components/Menu/MenuPopover/MenuPopover.d.ts +21 -1
- package/dist/components/Menu/MenuSection/MenuSection.d.ts +23 -1
- package/dist/components/Menu/MenuSection/index.js.map +1 -1
- package/dist/components/Menu/MenuSectionHeader/MenuSectionHeader.d.ts +16 -1
- package/dist/components/Menu/MenuSectionHeader/index.js.map +1 -1
- package/dist/components/Menu/MenuShortcut/MenuShortcut.d.ts +16 -1
- package/dist/components/Menu/MenuShortcut/index.js.map +1 -1
- package/dist/components/Menu/MenuTrailingText/MenuTrailingText.d.ts +16 -1
- package/dist/components/Menu/MenuTrailingText/index.js.map +1 -1
- package/dist/components/Menu/MenuTrigger/MenuTrigger.d.ts +43 -2
- package/dist/components/Menu/MenuTrigger/index.js.map +1 -1
- package/dist/components/Menu/SubmenuPopover/SubmenuPopover.d.ts +22 -1
- package/dist/components/Menu/context/context.d.ts +13 -0
- package/dist/components/Menu/context/index.js.map +1 -1
- package/dist/components/Menu/context/useMenuConfigContext.d.ts +6 -0
- package/dist/components/Menu/core/color.d.ts +20 -0
- package/dist/components/Menu/core/layout.d.ts +17 -0
- package/dist/components/Menu/core/menu.d.ts +18 -0
- package/dist/components/Navigation/Navigation/Navigation.d.ts +28 -0
- package/dist/components/Navigation/Navigation/navContext.d.ts +19 -0
- package/dist/components/Navigation/Navigation/navRenderingContext.d.ts +16 -0
- package/dist/components/Navigation/Navigation/types.d.ts +28 -0
- package/dist/components/Navigation/NavigationItem/NavigationButton/NavigationButton.d.ts +15 -0
- package/dist/components/Navigation/NavigationItem/NavigationButton/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationButton/types.d.ts +9 -0
- package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/NavigationItemIconRenderer.d.ts +21 -2
- package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationLink/NavigationLink.d.ts +15 -0
- package/dist/components/Navigation/NavigationItem/NavigationLink/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationLink/types.d.ts +5 -0
- package/dist/components/Navigation/NavigationItem/core/navigationItem.d.ts +22 -0
- package/dist/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.d.ts +22 -1
- package/dist/components/Navigation/NavigationSection/NavigationSection/NavigationSection.d.ts +24 -1
- package/dist/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.d.ts +16 -1
- package/dist/components/Navigation/NavigationState/NavigationState.d.ts +27 -2
- package/dist/components/Navigation/NavigationState/context.d.ts +32 -1
- package/dist/components/Navigation/NavigationState/index.d.ts +1 -0
- package/dist/components/Navigation/NavigationState/index.js +61 -2
- package/dist/components/Navigation/NavigationState/index.js.map +1 -0
- package/dist/components/Navigation/NavigationState/types.d.ts +12 -0
- package/dist/components/Navigation/SubNavigation/SubNavigation/SubNavigation.d.ts +35 -2
- package/dist/components/Navigation/SubNavigation/SubNavigation/index.js +4 -4
- package/dist/components/Navigation/SubNavigation/SubNavigation/index.js.map +1 -1
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/SubNavigationTrigger.d.ts +40 -2
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js +5 -5
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js.map +1 -1
- package/dist/components/Navigation/core/navLabelContext.d.ts +6 -0
- package/dist/components/Navigation/core/navigation.d.ts +9 -0
- package/dist/components/Navigation/core/navigationInfo.d.ts +19 -0
- package/dist/components/Navigation/index.js +2 -2
- package/dist/components/Popover/Popover.d.ts +34 -1
- package/dist/components/Sheets/BottomSheet/BottomSheet.d.ts +40 -2
- package/dist/components/Sheets/BottomSheet/index.d.ts +1 -0
- package/dist/components/Sheets/BottomSheet/types.d.ts +37 -0
- package/dist/components/Sheets/BottomSheetModal/BottomSheetModal.d.ts +34 -0
- package/dist/components/Sheets/BottomSheetModal/context.d.ts +10 -0
- package/dist/components/Sheets/BottomSheetModal/types.d.ts +38 -0
- package/dist/components/Sheets/SideSheet/SideSheet.d.ts +46 -0
- package/dist/components/Sheets/SideSheet/SideSheetDialog.d.ts +43 -0
- package/dist/components/Sheets/SideSheet/types.d.ts +96 -2
- package/dist/components/Sheets/SideSheetModal/SideSheetModal.d.ts +34 -0
- package/dist/components/Sheets/SideSheetModal/context.d.ts +13 -0
- package/dist/components/Sheets/SideSheetModal/types.d.ts +49 -0
- package/dist/components/Sheets/core/layout.d.ts +11 -0
- package/dist/components/Snackbar/SnackbarRegion.d.ts +50 -0
- package/dist/components/Snackbar/context.d.ts +38 -0
- package/dist/components/Snackbar/types.d.ts +69 -0
- package/dist/components/Splash/Splash.d.ts +6 -0
- package/dist/components/Splash/types.d.ts +10 -0
- package/dist/components/Splash/useSplash.d.ts +21 -0
- package/dist/components/Tabs/Tab/Tab.d.ts +33 -2
- package/dist/components/Tabs/TabList/TabList.d.ts +42 -1
- package/dist/components/Tabs/TabPanel/TabPanel.d.ts +28 -1
- package/dist/components/Tabs/TabPanels/TabPanels.d.ts +28 -1
- package/dist/components/Tabs/Tabs/Tabs.d.ts +43 -1
- package/dist/components/Tag/Tag.d.ts +37 -0
- package/dist/components/Tag/core.d.ts +6 -0
- package/dist/components/Tag/types.d.ts +48 -2
- package/dist/components/ThemeSelector/ThemeItem.d.ts +46 -2
- package/dist/components/ThemeSelector/ThemeProvider.d.ts +29 -2
- package/dist/components/ThemeSelector/ThemeSelector.d.ts +24 -0
- package/dist/components/ThemeSelector/core.d.ts +58 -0
- package/dist/components/ThemeSelector/index.d.ts +2 -0
- package/dist/components/ThemeSelector/index.js +2 -2
- package/dist/components/ThemeSelector/types.d.ts +69 -2
- package/dist/components/Toolbar/Toolbar.d.ts +47 -0
- package/dist/components/Toolbar/ToolbarToggleButtonGroup.d.ts +35 -1
- package/dist/components/Toolbar/types.d.ts +60 -0
- package/dist/components/Tooltip/RichTooltip/RichTooltip/RichTooltip.d.ts +56 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipActions/RichTooltipActions.d.ts +27 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipInfo/RichTooltipInfo.d.ts +31 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/RichTooltipSubhead.d.ts +22 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/index.js.map +1 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/RichTooltipText.d.ts +26 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/index.js.map +1 -1
- package/dist/components/Tooltip/Tooltip/Tooltip.d.ts +35 -1
- package/dist/components/Tooltip/TooltipTrigger/TooltipTrigger.d.ts +29 -1
- package/dist/components/Tooltip/TooltipTrigger/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +131 -125
- package/dist/index.js.map +1 -1
- package/dist/utils/gradients/gradients.d.ts +97 -0
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/ref/ref.d.ts +35 -2
- package/dist/utils/scroll/scroll.d.ts +67 -4
- package/dist/utils/tapTarget/tapTarget.d.ts +57 -0
- package/dist/utils/theme/build.d.ts +24 -0
- package/dist/utils/theme/types.d.ts +70 -0
- package/dist/utils/theme/useTheme.d.ts +40 -0
- package/dist/utils/typography/base.d.ts +68 -0
- package/dist/utils/typography/core.d.ts +16 -0
- package/dist/utils/typography/fluid.d.ts +36 -0
- package/package.json +23 -25
- package/dist/chunks/NavigationState +0 -69
- package/dist/chunks/NavigationState.map +0 -1
- package/dist/chunks/useGlobalListeners +0 -294
- package/dist/chunks/useGlobalListeners.map +0 -1
- package/dist/chunks/usePress +0 -535
- package/dist/chunks/usePress.map +0 -1
- package/dist/components/Image/Image.d.ts +0 -2
- package/dist/components/Image/index.js +0 -29
- package/dist/components/Image/index.js.map +0 -1
- package/dist/components/Image/types.d.ts +0 -9
- package/dist/utils/form/form.d.ts +0 -13
- package/dist/utils/form/index.d.ts +0 -1
|
@@ -4,60 +4,50 @@ import { r as n } from "./core";
|
|
|
4
4
|
import { t as r } from "./ConnectedButtonGroup";
|
|
5
5
|
import { t as i } from "./Switch";
|
|
6
6
|
import a from "clsx";
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { useLocalStorage as
|
|
7
|
+
import { useCallback as o, useLayoutEffect as s, useMemo as c } from "react";
|
|
8
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
9
|
+
import { useLocalStorage as d, useMediaQuery as f } from "usehooks-ts";
|
|
10
10
|
import '../assets/ThemeSelector.css';//#region src/utils/theme/build.ts
|
|
11
|
-
var
|
|
11
|
+
var p = ({ isDarkMode: e, isMonochrome: t, contrast: n }) => {
|
|
12
12
|
let r = e ? "dark" : "light";
|
|
13
13
|
return t ? `monochrome-${r}` : `${r}${n === "standard" ? "" : n === "medium" ? "-medium-contrast" : "-high-contrast"}`;
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
let a = {
|
|
14
|
+
}, m = "(prefers-color-scheme: dark)", h = "application-theme";
|
|
15
|
+
function g({ defaultThemeMode: e = "system", defaultContrast: t = "standard", isMonochrome: n = !1, localStorageKey: r = h, initializeWithValue: i = !0 } = {}) {
|
|
16
|
+
let a = c(() => ({
|
|
17
17
|
mode: e,
|
|
18
18
|
contrast: t,
|
|
19
19
|
isMonochrome: n
|
|
20
|
-
}
|
|
21
|
-
|
|
20
|
+
}), [
|
|
21
|
+
e,
|
|
22
|
+
t,
|
|
23
|
+
n
|
|
24
|
+
]), s = f(m, { initializeWithValue: i }), [l, u] = d(r, a, { initializeWithValue: i }), p = l.mode === "dark" || l.mode === "system" && s, g = o((e) => {
|
|
25
|
+
u((t) => ({
|
|
22
26
|
...t,
|
|
23
27
|
mode: e
|
|
24
28
|
}));
|
|
25
|
-
},
|
|
26
|
-
|
|
29
|
+
}, [u]), _ = o((e) => {
|
|
30
|
+
u((t) => ({
|
|
27
31
|
...t,
|
|
28
32
|
contrast: e
|
|
29
33
|
}));
|
|
30
|
-
},
|
|
31
|
-
|
|
34
|
+
}, [u]), v = o((e) => {
|
|
35
|
+
u((t) => ({
|
|
32
36
|
...t,
|
|
33
37
|
isMonochrome: e
|
|
34
38
|
}));
|
|
35
|
-
};
|
|
39
|
+
}, [u]);
|
|
36
40
|
return {
|
|
37
|
-
...
|
|
38
|
-
isDarkMode:
|
|
39
|
-
setMode:
|
|
40
|
-
setContrast:
|
|
41
|
-
setMonochrome:
|
|
41
|
+
...l,
|
|
42
|
+
isDarkMode: p,
|
|
43
|
+
setMode: g,
|
|
44
|
+
setContrast: _,
|
|
45
|
+
setMonochrome: v
|
|
42
46
|
};
|
|
43
47
|
}
|
|
44
48
|
//#endregion
|
|
45
|
-
//#region src/components/ThemeSelector/
|
|
46
|
-
var
|
|
47
|
-
let t = (0, g.c)(5), { children: n } = e, { isDarkMode: r, isMonochrome: i, contrast: a } = h(), s, c;
|
|
48
|
-
return t[0] !== a || t[1] !== r || t[2] !== i ? (s = () => {
|
|
49
|
-
let e = f({
|
|
50
|
-
isDarkMode: r,
|
|
51
|
-
isMonochrome: i,
|
|
52
|
-
contrast: a
|
|
53
|
-
});
|
|
54
|
-
document.documentElement.setAttribute("data-theme", e);
|
|
55
|
-
}, c = [
|
|
56
|
-
r,
|
|
57
|
-
i,
|
|
58
|
-
a
|
|
59
|
-
], t[0] = a, t[1] = r, t[2] = i, t[3] = s, t[4] = c) : (s = t[3], c = t[4]), o(s, c), n;
|
|
60
|
-
}, v = (e) => [
|
|
49
|
+
//#region src/components/ThemeSelector/core.ts
|
|
50
|
+
var _ = (e) => [
|
|
61
51
|
{
|
|
62
52
|
id: "system",
|
|
63
53
|
value: e.system
|
|
@@ -70,7 +60,7 @@ var g = e(), _ = (e) => {
|
|
|
70
60
|
id: "dark",
|
|
71
61
|
value: e.dark
|
|
72
62
|
}
|
|
73
|
-
],
|
|
63
|
+
], v = (e) => [
|
|
74
64
|
{
|
|
75
65
|
id: "standard",
|
|
76
66
|
value: e.standard
|
|
@@ -84,101 +74,115 @@ var g = e(), _ = (e) => {
|
|
|
84
74
|
value: e.high
|
|
85
75
|
}
|
|
86
76
|
];
|
|
87
|
-
function
|
|
77
|
+
function y(e) {
|
|
88
78
|
return e === "system" || e === "dark" || e === "light";
|
|
89
79
|
}
|
|
90
|
-
function
|
|
80
|
+
function b(e) {
|
|
91
81
|
return e === "standard" || e === "medium" || e === "high";
|
|
92
82
|
}
|
|
93
|
-
var
|
|
83
|
+
var x = {
|
|
94
84
|
selector: "_selector_o55o3_2",
|
|
95
85
|
"theme-item": "_theme-item_o55o3_7",
|
|
96
86
|
"theme-item-info": "_theme-item-info_o55o3_12"
|
|
97
|
-
},
|
|
98
|
-
className: a(
|
|
99
|
-
children: [/* @__PURE__ */
|
|
100
|
-
className: a(
|
|
101
|
-
children: [/* @__PURE__ */
|
|
87
|
+
}, S = ({ heading: e, description: n, children: r, className: i, useInline: o = !1 }) => o ? /* @__PURE__ */ u("span", {
|
|
88
|
+
className: a(x["theme-item"], i),
|
|
89
|
+
children: [/* @__PURE__ */ u("span", {
|
|
90
|
+
className: a(x["theme-item-info"]),
|
|
91
|
+
children: [/* @__PURE__ */ l("span", {
|
|
102
92
|
className: a(t.titleMedium),
|
|
103
93
|
slot: "label",
|
|
104
94
|
children: e
|
|
105
|
-
}), n && /* @__PURE__ */
|
|
95
|
+
}), n && /* @__PURE__ */ l("span", {
|
|
106
96
|
className: a(t.bodyMedium),
|
|
107
97
|
slot: "description",
|
|
108
98
|
children: n
|
|
109
99
|
})]
|
|
110
100
|
}), r]
|
|
111
|
-
}) : /* @__PURE__ */
|
|
112
|
-
className: a(
|
|
113
|
-
children: [/* @__PURE__ */
|
|
114
|
-
className: a(
|
|
115
|
-
children: [/* @__PURE__ */
|
|
101
|
+
}) : /* @__PURE__ */ u("div", {
|
|
102
|
+
className: a(x["theme-item"], i),
|
|
103
|
+
children: [/* @__PURE__ */ u("div", {
|
|
104
|
+
className: a(x["theme-item-info"]),
|
|
105
|
+
children: [/* @__PURE__ */ l("h3", {
|
|
116
106
|
className: a(t.titleMedium),
|
|
117
107
|
children: e
|
|
118
|
-
}), n && /* @__PURE__ */
|
|
108
|
+
}), n && /* @__PURE__ */ l("p", {
|
|
119
109
|
className: a(t.bodyMedium),
|
|
120
110
|
children: n
|
|
121
111
|
})]
|
|
122
112
|
}), r]
|
|
123
|
-
}), w = {
|
|
113
|
+
}), C = e(), w = (e) => {
|
|
114
|
+
let t = (0, C.c)(5), { children: n } = e, { isDarkMode: r, isMonochrome: i, contrast: a } = g(), o, c;
|
|
115
|
+
return t[0] !== a || t[1] !== r || t[2] !== i ? (o = () => {
|
|
116
|
+
let e = p({
|
|
117
|
+
isDarkMode: r,
|
|
118
|
+
isMonochrome: i,
|
|
119
|
+
contrast: a
|
|
120
|
+
});
|
|
121
|
+
document.documentElement.setAttribute("data-theme", e);
|
|
122
|
+
}, c = [
|
|
123
|
+
r,
|
|
124
|
+
i,
|
|
125
|
+
a
|
|
126
|
+
], t[0] = a, t[1] = r, t[2] = i, t[3] = o, t[4] = c) : (o = t[3], c = t[4]), s(o, c), n;
|
|
127
|
+
}, T = {
|
|
124
128
|
heading: "Theme Mode",
|
|
125
129
|
description: "Choose how the interface appearance is displayed across the app. You can follow your system settings or manually use light or dark mode.",
|
|
126
130
|
system: "System",
|
|
127
131
|
dark: "Dark",
|
|
128
132
|
light: "Light"
|
|
129
|
-
},
|
|
133
|
+
}, E = {
|
|
130
134
|
heading: "Theme Contrast",
|
|
131
135
|
description: "Adjust the interface contrast level to improve visibility and readability based on your visual preference and viewing environment.",
|
|
132
136
|
standard: "Standard",
|
|
133
137
|
medium: "Medium",
|
|
134
138
|
high: "High"
|
|
135
|
-
},
|
|
139
|
+
}, D = {
|
|
136
140
|
heading: "Monochrome",
|
|
137
141
|
description: "Use a monochrome appearance with neutral tones instead of the default colorful theme. This can provide a cleaner and more focused visual experience."
|
|
138
|
-
},
|
|
139
|
-
let { mode:
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
className: a(
|
|
142
|
+
}, O = ({ modeDetails: e = T, contrastDetails: t = E, monochromeDetails: o = D }) => {
|
|
143
|
+
let { mode: s, isMonochrome: d, contrast: f, setContrast: p, setMode: m, setMonochrome: h } = g(), C = c(() => _(e), [e]), w = c(() => v(t), [t]);
|
|
144
|
+
return /* @__PURE__ */ u("div", {
|
|
145
|
+
className: a(x.selector),
|
|
142
146
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ l(S, {
|
|
144
148
|
heading: e.heading,
|
|
145
149
|
description: e.description,
|
|
146
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ l(r, {
|
|
147
151
|
selectionMode: "single",
|
|
148
|
-
selectedKeys: [
|
|
152
|
+
selectedKeys: [s],
|
|
149
153
|
onSelectionChange: (e) => {
|
|
150
154
|
let t = Array.from(e)[0];
|
|
151
|
-
|
|
155
|
+
y(t) && m(t);
|
|
152
156
|
},
|
|
153
|
-
children:
|
|
157
|
+
children: C.map((e) => /* @__PURE__ */ l(n, {
|
|
154
158
|
id: e.id,
|
|
155
159
|
children: e.value
|
|
156
160
|
}, e.id))
|
|
157
161
|
})
|
|
158
162
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ l(S, {
|
|
160
164
|
heading: t.heading,
|
|
161
165
|
description: t.description,
|
|
162
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ l(r, {
|
|
163
167
|
color: "tonal",
|
|
164
168
|
selectionMode: "single",
|
|
165
169
|
selectedKeys: [f],
|
|
166
170
|
onSelectionChange: (e) => {
|
|
167
171
|
let t = Array.from(e)[0];
|
|
168
|
-
|
|
172
|
+
b(t) && p(t);
|
|
169
173
|
},
|
|
170
174
|
isDisabled: d,
|
|
171
|
-
children:
|
|
175
|
+
children: w.map((e) => /* @__PURE__ */ l(n, {
|
|
172
176
|
id: e.id,
|
|
173
177
|
children: e.value
|
|
174
178
|
}, e.id))
|
|
175
179
|
})
|
|
176
180
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ l(i, {
|
|
178
182
|
isSelected: d,
|
|
179
|
-
onChange:
|
|
183
|
+
onChange: h,
|
|
180
184
|
containerStateLayer: !0,
|
|
181
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ l(S, {
|
|
182
186
|
heading: o.heading,
|
|
183
187
|
description: o.description,
|
|
184
188
|
useInline: !0
|
|
@@ -188,6 +192,6 @@ var S = {
|
|
|
188
192
|
});
|
|
189
193
|
};
|
|
190
194
|
//#endregion
|
|
191
|
-
export {
|
|
195
|
+
export { b as a, g as c, v as i, p as l, w as n, y as o, S as r, _ as s, O as t };
|
|
192
196
|
|
|
193
197
|
//# sourceMappingURL=ThemeSelector.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeSelector","names":["prev","isMonochrome","keys","item"],"sources":["../../src/utils/theme/build.ts","../../src/utils/theme/useTheme.ts","../../src/components/ThemeSelector/ThemeProvider.tsx","../../src/components/ThemeSelector/core.ts","../../src/components/ThemeSelector/themeSelector.module.css","../../src/components/ThemeSelector/ThemeItem.tsx","../../src/components/ThemeSelector/ThemeSelector.tsx"],"sourcesContent":["import type { ThemeBuildOptions } from \"./types\";\n\nexport const buildThemeString = ({\n isDarkMode,\n isMonochrome,\n contrast,\n}: ThemeBuildOptions) => {\n const mode = isDarkMode ? \"dark\" : \"light\";\n if (isMonochrome) return `monochrome-${mode}`;\n\n const contrastSuffix =\n contrast === \"standard\"\n ? \"\"\n : contrast === \"medium\"\n ? \"-medium-contrast\"\n : \"-high-contrast\";\n\n return `${mode}${contrastSuffix}`;\n};\n","import { useLocalStorage, useMediaQuery } from \"usehooks-ts\";\nimport type {\n ThemeContrast,\n ThemeMode,\n ThemeOptions,\n ThemeReturn,\n ThemeStorage,\n} from \"./types\";\n\nconst COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nconst LOCAL_STORAGE_KEY = \"application-theme\";\n\nexport function useTheme({\n defaultThemeMode = \"system\",\n defaultContrast = \"standard\",\n isMonochrome = false,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true,\n}: ThemeOptions = {}): ThemeReturn {\n const defaultValue: ThemeStorage = {\n mode: defaultThemeMode,\n contrast: defaultContrast,\n isMonochrome,\n };\n\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, { initializeWithValue });\n const [theme, setTheme] = useLocalStorage<ThemeStorage>(\n localStorageKey,\n defaultValue,\n {\n initializeWithValue,\n }\n );\n\n const isDarkMode =\n theme.mode === \"dark\" || (theme.mode === \"system\" && isDarkOS);\n\n const setMode = (mode: ThemeMode) => {\n setTheme((prev) => ({ ...prev, mode }));\n };\n\n const setContrast = (contrast: ThemeContrast) => {\n setTheme((prev) => ({ ...prev, contrast }));\n };\n\n const setMonochrome = (isMonochrome: boolean) => {\n setTheme((prev) => ({ ...prev, isMonochrome }));\n };\n\n return {\n ...theme,\n isDarkMode,\n setMode,\n setContrast,\n setMonochrome,\n };\n}\n","import { type ReactNode, useLayoutEffect } from \"react\";\nimport { buildThemeString, useTheme } from \"@/utils\";\n\nexport const ThemeProvider = ({ children }: { children?: ReactNode }) => {\n const { isDarkMode, isMonochrome, contrast } = useTheme();\n\n useLayoutEffect(() => {\n const themeString = buildThemeString({\n isDarkMode,\n isMonochrome,\n contrast,\n });\n document.documentElement.setAttribute(\"data-theme\", themeString);\n }, [isDarkMode, isMonochrome, contrast]);\n\n return children;\n};\n","import type { Key } from \"react-aria-components\";\nimport type { ThemeContrast, ThemeMode } from \"@/utils\";\nimport type { ThemeContrastTranslations, ThemeModeTranslations } from \"./types\";\n\nexport const modeItems = (\n modeDetails: ThemeModeTranslations\n): {\n id: ThemeMode;\n value: string;\n}[] => {\n return [\n { id: \"system\", value: modeDetails.system },\n { id: \"light\", value: modeDetails.light },\n { id: \"dark\", value: modeDetails.dark },\n ];\n};\n\nexport const contrastItems = (\n contrastDetails: ThemeContrastTranslations\n): {\n id: ThemeContrast;\n value: string;\n}[] => {\n return [\n { id: \"standard\", value: contrastDetails.standard },\n { id: \"medium\", value: contrastDetails.medium },\n { id: \"high\", value: contrastDetails.high },\n ];\n};\n\nexport function isThemeMode(value: Key): value is ThemeMode {\n return value === \"system\" || value === \"dark\" || value === \"light\";\n}\n\nexport function isThemeContrast(value: Key): value is ThemeContrast {\n return value === \"standard\" || value === \"medium\" || value === \"high\";\n}\n","@layer adgytec.comps {\n .selector {\n display: grid;\n gap: var(--md-sys-layout-space-24);\n }\n\n .theme-item {\n display: grid;\n gap: var(--md-sys-layout-space-16);\n }\n\n .theme-item-info {\n display: grid;\n }\n}\n","import clsx from \"clsx\";\nimport type { ReactNode } from \"react\";\nimport { typography } from \"@/utils\";\nimport styles from \"./themeSelector.module.css\";\n\nexport const ThemeItem = ({\n heading,\n description,\n children,\n className,\n useInline = false,\n}: {\n heading: string;\n description?: string;\n children?: ReactNode;\n className?: string;\n useInline?: boolean;\n}) => {\n if (useInline) {\n return (\n <span className={clsx(styles[\"theme-item\"], className)}>\n <span className={clsx(styles[\"theme-item-info\"])}>\n <span className={clsx(typography.titleMedium)} slot=\"label\">\n {heading}\n </span>\n\n {description && (\n <span\n className={clsx(typography.bodyMedium)}\n slot=\"description\"\n >\n {description}\n </span>\n )}\n </span>\n\n {children}\n </span>\n );\n }\n return (\n <div className={clsx(styles[\"theme-item\"], className)}>\n <div className={clsx(styles[\"theme-item-info\"])}>\n <h3 className={clsx(typography.titleMedium)}>{heading}</h3>\n\n {description && (\n <p className={clsx(typography.bodyMedium)}>{description}</p>\n )}\n </div>\n\n {children}\n </div>\n );\n};\n","import clsx from \"clsx\";\nimport { useMemo } from \"react\";\nimport { useTheme } from \"@/utils\";\nimport { ConnectedButton, ConnectedButtonGroup } from \"../Button\";\nimport { Switch } from \"../Input\";\nimport { contrastItems, isThemeContrast, isThemeMode, modeItems } from \"./core\";\nimport { ThemeItem } from \"./ThemeItem\";\nimport styles from \"./themeSelector.module.css\";\nimport type {\n ThemeContrastTranslations,\n ThemeModeTranslations,\n ThemeMonochromeTranslations,\n ThemeSelectorProps,\n} from \"./types\";\n\nconst defaultMode: ThemeModeTranslations = {\n heading: \"Theme Mode\",\n description:\n \"Choose how the interface appearance is displayed across the app. You can follow your system settings or manually use light or dark mode.\",\n\n system: \"System\",\n dark: \"Dark\",\n light: \"Light\",\n};\n\nconst defaultContrast: ThemeContrastTranslations = {\n heading: \"Theme Contrast\",\n description:\n \"Adjust the interface contrast level to improve visibility and readability based on your visual preference and viewing environment.\",\n\n standard: \"Standard\",\n medium: \"Medium\",\n high: \"High\",\n};\n\nconst defaultMonochrome: ThemeMonochromeTranslations = {\n heading: \"Monochrome\",\n description:\n \"Use a monochrome appearance with neutral tones instead of the default colorful theme. This can provide a cleaner and more focused visual experience.\",\n};\n\nexport const ThemeSelector: React.FC<ThemeSelectorProps> = ({\n modeDetails = defaultMode,\n contrastDetails = defaultContrast,\n monochromeDetails = defaultMonochrome,\n}) => {\n const {\n mode,\n isMonochrome,\n contrast,\n setContrast,\n setMode,\n setMonochrome,\n } = useTheme();\n\n const themeModeItems = useMemo(() => modeItems(modeDetails), [modeDetails]);\n const themeContrastItems = useMemo(\n () => contrastItems(contrastDetails),\n [contrastDetails]\n );\n\n return (\n <div className={clsx(styles[\"selector\"])}>\n <ThemeItem\n heading={modeDetails.heading}\n description={modeDetails.description}\n >\n <ConnectedButtonGroup\n selectionMode=\"single\"\n selectedKeys={[mode]}\n onSelectionChange={(keys) => {\n const themeMode = Array.from(keys)[0];\n if (!isThemeMode(themeMode)) return;\n\n setMode(themeMode);\n }}\n >\n {themeModeItems.map((item) => (\n <ConnectedButton key={item.id} id={item.id}>\n {item.value}\n </ConnectedButton>\n ))}\n </ConnectedButtonGroup>\n </ThemeItem>\n\n <ThemeItem\n heading={contrastDetails.heading}\n description={contrastDetails.description}\n >\n <ConnectedButtonGroup\n color=\"tonal\"\n selectionMode=\"single\"\n selectedKeys={[contrast]}\n onSelectionChange={(keys) => {\n const themeContrast = Array.from(keys)[0];\n if (!isThemeContrast(themeContrast)) return;\n\n setContrast(themeContrast);\n }}\n isDisabled={isMonochrome}\n >\n {themeContrastItems.map((item) => (\n <ConnectedButton key={item.id} id={item.id}>\n {item.value}\n </ConnectedButton>\n ))}\n </ConnectedButtonGroup>\n </ThemeItem>\n\n <Switch\n isSelected={isMonochrome}\n onChange={setMonochrome}\n containerStateLayer\n >\n <ThemeItem\n heading={monochromeDetails.heading}\n description={monochromeDetails.description}\n useInline\n ></ThemeItem>\n </Switch>\n </div>\n );\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"ThemeSelector","names":["prev","isMonochrome","clsx","styles","_c","keys","item","clsx","styles","require_compiler_runtime","ConnectedButton","ConnectedButtonGroup","Switch","clsx$1","buildThemeString","mode","isDarkMode","isMonochrome","contrast","COLOR_SCHEME_QUERY","LOCAL_STORAGE_KEY","useTheme","defaultValue","useMemo","defaultThemeMode","defaultContrast","isDarkOS","useMediaQuery","theme","setTheme","useLocalStorage","localStorageKey","setMode","useCallback","prev","setContrast","prev_0","setMonochrome","prev_1","isMonochrome_0","modeItems","modeDetails","contrastItems","contrastDetails","isThemeMode","value","isThemeContrast","themeSelector_module_default","ThemeItem","useInline","className","typography","heading","description","children","import_compiler_runtime","ThemeProvider","$","t0","t1","t2","themeString","useLayoutEffect","defaultMode","defaultMonochrome","ThemeSelector","themeModeItems","themeContrastItems","\"selector\"","themeMode","keys","item","themeContrast","keys_0","item_0","monochromeDetails"],"sources":["../../src/utils/theme/build.ts","../../src/utils/theme/useTheme.ts","../../src/components/ThemeSelector/core.ts","../../src/components/ThemeSelector/themeSelector.module.css","../../src/components/ThemeSelector/ThemeItem.tsx","../../src/components/ThemeSelector/ThemeProvider.tsx","../../src/components/ThemeSelector/ThemeSelector.tsx"],"sourcesContent":["import type { ThemeBuildOptions } from \"./types\";\n\n/**\n * Generates the theme string suffix or identifier based on current theme settings.\n *\n * This identifier corresponds to the theme definition classes and data attributes\n * (such as `data-theme=\"...\"`) applied to the root element (`document.documentElement` or body).\n *\n * - Monochrome modes produce `\"monochrome-dark\"` or `\"monochrome-light\"`.\n * - Standard contrast modes produce `\"dark\"` or `\"light\"`.\n * - Elevated contrast modes produce `\"dark-medium-contrast\"`, `\"dark-high-contrast\"`,\n * `\"light-medium-contrast\"`, or `\"light-high-contrast\"`.\n *\n * @param options - Theme configuration flags (dark mode, monochrome, contrast).\n * @returns Formatted theme string (e.g. `\"dark\"`, `\"light-high-contrast\"`, `\"monochrome-dark\"`).\n *\n * @example\n * ```ts\n * const themeString = buildThemeString({\n * isDarkMode: true,\n * isMonochrome: false,\n * contrast: \"high\",\n * });\n * // returns \"dark-high-contrast\"\n * ```\n */\nexport const buildThemeString = ({\n isDarkMode,\n isMonochrome,\n contrast,\n}: ThemeBuildOptions): string => {\n const mode = isDarkMode ? \"dark\" : \"light\";\n if (isMonochrome) return `monochrome-${mode}`;\n\n const contrastSuffix =\n contrast === \"standard\"\n ? \"\"\n : contrast === \"medium\"\n ? \"-medium-contrast\"\n : \"-high-contrast\";\n\n return `${mode}${contrastSuffix}`;\n};\n","import { useCallback, useMemo } from \"react\";\nimport { useLocalStorage, useMediaQuery } from \"usehooks-ts\";\nimport type {\n ThemeContrast,\n ThemeMode,\n ThemeOptions,\n ThemeReturn,\n ThemeStorage,\n} from \"./types\";\n\nconst COLOR_SCHEME_QUERY = \"(prefers-color-scheme: dark)\";\nconst LOCAL_STORAGE_KEY = \"application-theme\";\n\n/**\n * React hook that manages the application theme state with `localStorage` persistence\n * and automatic synchronization with system preferences.\n *\n * Tracks theme mode (`\"system\"`, `\"dark\"`, `\"light\"`), contrast level (`\"standard\"`,\n * `\"medium\"`, `\"high\"`), and monochrome mode. When `mode` is set to `\"system\"`,\n * `isDarkMode` dynamically listens to the OS `(prefers-color-scheme: dark)` media query.\n *\n * All setter callbacks (`setMode`, `setContrast`, `setMonochrome`) are referentially stable\n * via `useCallback`.\n *\n * @param options - Configuration options for initial defaults and storage key.\n * @returns Current theme state and updater functions.\n *\n * @example\n * ```tsx\n * import { useTheme, buildThemeString } from '@adgytec/web-ui-components';\n * import { useEffect } from 'react';\n *\n * function App() {\n * const theme = useTheme();\n *\n * useEffect(() => {\n * const themeString = buildThemeString({\n * isDarkMode: theme.isDarkMode,\n * isMonochrome: theme.isMonochrome,\n * contrast: theme.contrast,\n * });\n * document.documentElement.setAttribute('data-theme', themeString);\n * }, [theme.isDarkMode, theme.isMonochrome, theme.contrast]);\n *\n * return (\n * <div>\n * <button onClick={() => theme.setMode('dark')}>Dark Mode</button>\n * <button onClick={() => theme.setContrast('high')}>High Contrast</button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useTheme({\n defaultThemeMode = \"system\",\n defaultContrast = \"standard\",\n isMonochrome = false,\n localStorageKey = LOCAL_STORAGE_KEY,\n initializeWithValue = true,\n}: ThemeOptions = {}): ThemeReturn {\n const defaultValue: ThemeStorage = useMemo(\n () => ({\n mode: defaultThemeMode,\n contrast: defaultContrast,\n isMonochrome,\n }),\n [defaultThemeMode, defaultContrast, isMonochrome]\n );\n\n const isDarkOS = useMediaQuery(COLOR_SCHEME_QUERY, { initializeWithValue });\n const [theme, setTheme] = useLocalStorage<ThemeStorage>(\n localStorageKey,\n defaultValue,\n {\n initializeWithValue,\n }\n );\n\n const isDarkMode =\n theme.mode === \"dark\" || (theme.mode === \"system\" && isDarkOS);\n\n const setMode = useCallback(\n (mode: ThemeMode) => {\n setTheme((prev) => ({ ...prev, mode }));\n },\n [setTheme]\n );\n\n const setContrast = useCallback(\n (contrast: ThemeContrast) => {\n setTheme((prev) => ({ ...prev, contrast }));\n },\n [setTheme]\n );\n\n const setMonochrome = useCallback(\n (isMonochrome: boolean) => {\n setTheme((prev) => ({ ...prev, isMonochrome }));\n },\n [setTheme]\n );\n\n return {\n ...theme,\n isDarkMode,\n setMode,\n setContrast,\n setMonochrome,\n };\n}\n","import type { Key } from \"react-aria-components\";\nimport type { ThemeContrast, ThemeMode } from \"@/utils\";\nimport type { ThemeContrastTranslations, ThemeModeTranslations } from \"./types\";\n\n/**\n * Generates an array of theme mode options with translated labels.\n *\n * @param modeDetails - Translations for theme mode labels (`system`, `light`, `dark`).\n * @returns Array of mode items with `id` and localized `value`.\n *\n * @example\n * ```tsx\n * const items = modeItems({\n * heading: \"Theme Mode\",\n * system: \"System\",\n * light: \"Light\",\n * dark: \"Dark\",\n * });\n * ```\n */\nexport const modeItems = (\n modeDetails: ThemeModeTranslations\n): {\n id: ThemeMode;\n value: string;\n}[] => {\n return [\n { id: \"system\", value: modeDetails.system },\n { id: \"light\", value: modeDetails.light },\n { id: \"dark\", value: modeDetails.dark },\n ];\n};\n\n/**\n * Generates an array of theme contrast options with translated labels.\n *\n * @param contrastDetails - Translations for contrast level labels (`standard`, `medium`, `high`).\n * @returns Array of contrast items with `id` and localized `value`.\n *\n * @example\n * ```tsx\n * const items = contrastItems({\n * heading: \"Contrast\",\n * standard: \"Standard\",\n * medium: \"Medium\",\n * high: \"High\",\n * });\n * ```\n */\nexport const contrastItems = (\n contrastDetails: ThemeContrastTranslations\n): {\n id: ThemeContrast;\n value: string;\n}[] => {\n return [\n { id: \"standard\", value: contrastDetails.standard },\n { id: \"medium\", value: contrastDetails.medium },\n { id: \"high\", value: contrastDetails.high },\n ];\n};\n\n/**\n * Type guard function to check if a React Aria `Key` is a valid {@link ThemeMode}.\n *\n * @param value - The key to test.\n * @returns `true` if `value` is `\"system\"`, `\"light\"`, or `\"dark\"`.\n *\n * @example\n * ```tsx\n * if (isThemeMode(selectedKey)) {\n * setMode(selectedKey);\n * }\n * ```\n */\nexport function isThemeMode(value: Key): value is ThemeMode {\n return value === \"system\" || value === \"dark\" || value === \"light\";\n}\n\n/**\n * Type guard function to check if a React Aria `Key` is a valid {@link ThemeContrast}.\n *\n * @param value - The key to test.\n * @returns `true` if `value` is `\"standard\"`, `\"medium\"`, or `\"high\"`.\n *\n * @example\n * ```tsx\n * if (isThemeContrast(selectedKey)) {\n * setContrast(selectedKey);\n * }\n * ```\n */\nexport function isThemeContrast(value: Key): value is ThemeContrast {\n return value === \"standard\" || value === \"medium\" || value === \"high\";\n}\n","@layer adgytec.comps {\n .selector {\n display: grid;\n gap: var(--md-sys-layout-space-24);\n }\n\n .theme-item {\n display: grid;\n gap: var(--md-sys-layout-space-16);\n }\n\n .theme-item-info {\n display: grid;\n }\n}\n","import clsx from \"clsx\";\nimport type { ReactNode } from \"react\";\nimport { typography } from \"@/utils\";\nimport styles from \"./themeSelector.module.css\";\n\n/**\n * Props for the {@link ThemeItem} component.\n */\nexport interface ThemeItemProps {\n /**\n * Section title heading text.\n */\n heading: string;\n\n /**\n * Optional explanatory text describing the setting.\n */\n description?: string;\n\n /**\n * Interactive control element(s) (e.g. connected button groups or switches) associated with the item.\n */\n children?: ReactNode;\n\n /**\n * Optional custom CSS class name applied to the container.\n */\n className?: string;\n\n /**\n * Whether to render inline `span` elements instead of block `div` elements.\n * Useful when nesting inside a label or interactive component like `Switch`.\n *\n * @default false\n */\n useInline?: boolean;\n}\n\n/**\n * Layout helper component for a single setting item within {@link ThemeSelector}.\n *\n * Renders a styled heading (`typography.titleMedium`), an optional description (`typography.bodyMedium`),\n * and the child controls. Supports both block rendering and inline `span` rendering.\n *\n * @example\n * ```tsx\n * import { ThemeItem } from \"@adgytec/web-ui-components\";\n *\n * export function SettingRow() {\n * return (\n * <ThemeItem\n * heading=\"Appearance\"\n * description=\"Select your preferred color mode.\"\n * >\n * <Controls />\n * </ThemeItem>\n * );\n * }\n * ```\n */\nexport const ThemeItem: React.FC<ThemeItemProps> = ({\n heading,\n description,\n children,\n className,\n useInline = false,\n}) => {\n if (useInline) {\n return (\n <span className={clsx(styles[\"theme-item\"], className)}>\n <span className={clsx(styles[\"theme-item-info\"])}>\n <span className={clsx(typography.titleMedium)} slot=\"label\">\n {heading}\n </span>\n\n {description && (\n <span\n className={clsx(typography.bodyMedium)}\n slot=\"description\"\n >\n {description}\n </span>\n )}\n </span>\n\n {children}\n </span>\n );\n }\n return (\n <div className={clsx(styles[\"theme-item\"], className)}>\n <div className={clsx(styles[\"theme-item-info\"])}>\n <h3 className={clsx(typography.titleMedium)}>{heading}</h3>\n\n {description && (\n <p className={clsx(typography.bodyMedium)}>{description}</p>\n )}\n </div>\n\n {children}\n </div>\n );\n};\n","import { type ReactNode, useLayoutEffect } from \"react\";\nimport { buildThemeString, useTheme } from \"@/utils\";\n\n/**\n * Props for the {@link ThemeProvider} component.\n */\nexport interface ThemeProviderProps {\n /**\n * Application content to be rendered inside the provider.\n */\n children?: ReactNode;\n}\n\n/**\n * Top-level provider component that synchronizes the application root with the current theme settings.\n *\n * Subscribes to the theme state via {@link useTheme} (mode, dark mode calculation,\n * contrast level, and monochrome setting) and dynamically assigns the computed theme\n * string to the `data-theme` attribute of `document.documentElement`.\n *\n * @example\n * ```tsx\n * import { ThemeProvider } from \"@adgytec/web-ui-components\";\n *\n * export function App() {\n * return (\n * <ThemeProvider>\n * <MainContent />\n * </ThemeProvider>\n * );\n * }\n * ```\n */\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({ children }) => {\n const { isDarkMode, isMonochrome, contrast } = useTheme();\n\n useLayoutEffect(() => {\n const themeString = buildThemeString({\n isDarkMode,\n isMonochrome,\n contrast,\n });\n document.documentElement.setAttribute(\"data-theme\", themeString);\n }, [isDarkMode, isMonochrome, contrast]);\n\n return children;\n};\n","import clsx from \"clsx\";\nimport { useMemo } from \"react\";\nimport { useTheme } from \"@/utils\";\nimport { ConnectedButton, ConnectedButtonGroup } from \"../Button\";\nimport { Switch } from \"../Input\";\nimport { contrastItems, isThemeContrast, isThemeMode, modeItems } from \"./core\";\nimport { ThemeItem } from \"./ThemeItem\";\nimport styles from \"./themeSelector.module.css\";\nimport type {\n ThemeContrastTranslations,\n ThemeModeTranslations,\n ThemeMonochromeTranslations,\n ThemeSelectorProps,\n} from \"./types\";\n\nconst defaultMode: ThemeModeTranslations = {\n heading: \"Theme Mode\",\n description:\n \"Choose how the interface appearance is displayed across the app. You can follow your system settings or manually use light or dark mode.\",\n\n system: \"System\",\n dark: \"Dark\",\n light: \"Light\",\n};\n\nconst defaultContrast: ThemeContrastTranslations = {\n heading: \"Theme Contrast\",\n description:\n \"Adjust the interface contrast level to improve visibility and readability based on your visual preference and viewing environment.\",\n\n standard: \"Standard\",\n medium: \"Medium\",\n high: \"High\",\n};\n\nconst defaultMonochrome: ThemeMonochromeTranslations = {\n heading: \"Monochrome\",\n description:\n \"Use a monochrome appearance with neutral tones instead of the default colorful theme. This can provide a cleaner and more focused visual experience.\",\n};\n\n/**\n * Settings UI component for managing application theme appearance.\n *\n * Provides user controls for:\n * - **Theme Mode**: Connected button group with `\"System\"`, `\"Light\"`, and `\"Dark\"` options.\n * - **Theme Contrast**: Connected button group with `\"Standard\"`, `\"Medium\"`, and `\"High\"` options (disabled when monochrome is active).\n * - **Monochrome Mode**: An interactive {@link Switch} to toggle neutral grayscale styling.\n *\n * Directly connects to {@link useTheme} to read and update theme settings, which are\n * persisted to local storage and applied to `document.documentElement` by {@link ThemeProvider}.\n *\n * @example\n * ```tsx\n * import { ThemeProvider, ThemeSelector } from \"@adgytec/web-ui-components\";\n *\n * export function SettingsMenu() {\n * return (\n * <ThemeProvider>\n * <ThemeSelector />\n * </ThemeProvider>\n * );\n * }\n * ```\n */\nexport const ThemeSelector: React.FC<ThemeSelectorProps> = ({\n modeDetails = defaultMode,\n contrastDetails = defaultContrast,\n monochromeDetails = defaultMonochrome,\n}) => {\n const {\n mode,\n isMonochrome,\n contrast,\n setContrast,\n setMode,\n setMonochrome,\n } = useTheme();\n\n const themeModeItems = useMemo(() => modeItems(modeDetails), [modeDetails]);\n const themeContrastItems = useMemo(\n () => contrastItems(contrastDetails),\n [contrastDetails]\n );\n\n return (\n <div className={clsx(styles[\"selector\"])}>\n <ThemeItem\n heading={modeDetails.heading}\n description={modeDetails.description}\n >\n <ConnectedButtonGroup\n selectionMode=\"single\"\n selectedKeys={[mode]}\n onSelectionChange={(keys) => {\n const themeMode = Array.from(keys)[0];\n if (!isThemeMode(themeMode)) return;\n\n setMode(themeMode);\n }}\n >\n {themeModeItems.map((item) => (\n <ConnectedButton key={item.id} id={item.id}>\n {item.value}\n </ConnectedButton>\n ))}\n </ConnectedButtonGroup>\n </ThemeItem>\n\n <ThemeItem\n heading={contrastDetails.heading}\n description={contrastDetails.description}\n >\n <ConnectedButtonGroup\n color=\"tonal\"\n selectionMode=\"single\"\n selectedKeys={[contrast]}\n onSelectionChange={(keys) => {\n const themeContrast = Array.from(keys)[0];\n if (!isThemeContrast(themeContrast)) return;\n\n setContrast(themeContrast);\n }}\n isDisabled={isMonochrome}\n >\n {themeContrastItems.map((item) => (\n <ConnectedButton key={item.id} id={item.id}>\n {item.value}\n </ConnectedButton>\n ))}\n </ConnectedButtonGroup>\n </ThemeItem>\n\n <Switch\n isSelected={isMonochrome}\n onChange={setMonochrome}\n containerStateLayer\n >\n <ThemeItem\n heading={monochromeDetails.heading}\n description={monochromeDetails.description}\n useInline\n ></ThemeItem>\n </Switch>\n </div>\n );\n};\n"],"mappings":"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"}
|
package/dist/chunks/Toolbar.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar","names":[],"sources":["../../src/components/Toolbar/toolbar.module.css","../../src/components/Toolbar/Toolbar.tsx","../../src/components/Toolbar/ToolbarToggleButtonGroup.tsx"],"sourcesContent":["/* configurable tokens\n*\n* --md-toolbar-background\n*\n* --md-toolbar-button-background\n* --md-toolbar-toggle-button-background\n* --md-toolbar-toggle-button-selected-background\n*\n* --md-toolbar-button-color\n* --md-toolbar-toggle-button-color\n* --md-toolbar-toggle-button-selected-color\n*\n* configurable tokens end */\n\n@layer adgytec.comps {\n .toolbar {\n --_md-toolbar-background: var(\n --md-toolbar-background,\n var(--_md-toolbar-background-default)\n );\n --_md-toolbar-button-background: var(\n --md-toolbar-button-background,\n var(--_md-toolbar-button-background-default)\n );\n --_md-toolbar-toggle-button-background: var(\n --md-toolbar-toggle-button-background,\n var(--_md-toolbar-toggle-button-background-default)\n );\n --_md-toolbar-toggle-button-selected-background: var(\n --md-toolbar-toggle-button-selected-background,\n var(--_md-toolbar-toggle-button-selected-background-default)\n );\n --_md-toolbar-button-color: var(\n --md-toolbar-button-color,\n var(--_md-toolbar-button-color-default)\n );\n --_md-toolbar-toggle-button-color: var(\n --md-toolbar-toggle-button-color,\n var(--_md-toolbar-toggle-button-color-default)\n );\n --_md-toolbar-toggle-button-selected-color: var(\n --md-toolbar-toggle-button-selected-color,\n var(--_md-toolbar-toggle-button-selected-color-default)\n );\n\n --md-divider-color: var(--_md-toolbar-button-color);\n\n --_md-toolbar-space-between-actions: var(--md-sys-layout-space-4);\n\n border-radius: var(--md-sys-shape-corner-radius-full);\n padding: var(--md-sys-layout-space-8);\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--_md-toolbar-space-between-actions);\n\n background-color: var(--_md-toolbar-background);\n\n .section {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--_md-toolbar-space-between-actions);\n }\n\n &[data-variant=\"floating\"] {\n box-shadow: var(--md-sys-elevation-shadow-3);\n }\n\n &[data-orientation=\"vertical\"] {\n flex-direction: column;\n\n .section {\n flex-direction: column;\n }\n }\n }\n\n .toolbar[data-color=\"standard\"] {\n --_md-toolbar-background-default: var(--md-sys-color-surface-container);\n\n --_md-toolbar-button-background-default: var(\n --md-sys-color-surface-container\n );\n\n --_md-toolbar-toggle-button-background-default: var(\n --md-sys-color-surface-container\n );\n\n --_md-toolbar-toggle-button-selected-background-default: var(\n --md-sys-color-secondary-container\n );\n\n --_md-toolbar-button-color-default: var(\n --md-sys-color-on-surface-variant\n );\n\n --_md-toolbar-toggle-button-color-default: var(\n --md-sys-color-on-surface-variant\n );\n\n --_md-toolbar-toggle-button-selected-color-default: var(\n --md-sys-color-on-secondary-container\n );\n }\n\n .toolbar[data-color=\"vibrant\"] {\n --_md-toolbar-background-default: var(--md-sys-color-primary-container);\n\n --_md-toolbar-button-background-default: var(\n --md-sys-color-primary-container\n );\n\n --_md-toolbar-toggle-button-background-default: var(\n --md-sys-color-primary-container\n );\n\n --_md-toolbar-toggle-button-selected-background-default: var(\n --md-sys-color-surface-container\n );\n\n --_md-toolbar-button-color-default: var(\n --md-sys-color-on-primary-container\n );\n\n --_md-toolbar-toggle-button-color-default: var(\n --md-sys-color-on-primary-container\n );\n\n --_md-toolbar-toggle-button-selected-color-default: var(\n --md-sys-color-on-surface\n );\n }\n}\n\n@layer adgytec.overrides {\n .toolbar[data-orientation=\"horizontal\"] [data-divider] {\n block-size: auto;\n align-self: stretch;\n }\n\n /* button reset */\n .toolbar [data-visual-button] {\n /* outlined button */\n --_md-button-outline-width: 0px;\n border: none;\n\n /* elevated button */\n box-shadow: none;\n\n --_md-toggle-button-selected-shape: var(--_md-button-shape);\n\n &[data-disabled] {\n background-color: transparent;\n }\n }\n\n .toolbar [data-button]:not([data-color=\"filled\"]),\n .toolbar [data-toggle-button] {\n /* colors */\n --md-button-background: var(--_md-toolbar-button-background);\n --md-toggle-button-selected-background: var(\n --_md-toolbar-toggle-button-selected-background\n );\n --md-toggle-button-background: var(\n --_md-toolbar-toggle-button-background\n );\n\n --md-button-color: var(--_md-toolbar-button-color);\n --md-toggle-button-selected-color: var(\n --_md-toolbar-toggle-button-selected-color\n );\n --md-toggle-button-color: var(--_md-toolbar-toggle-button-color);\n }\n}\n","import clsx from \"clsx\";\nimport { Toolbar as AriaToolbar } from \"react-aria-components\";\nimport styles from \"./toolbar.module.css\";\nimport type { ToolbarProps } from \"./types\";\n\nexport const Toolbar: React.FC<ToolbarProps> = ({\n className,\n variant = \"docked\",\n color = \"standard\",\n ...props\n}) => {\n return (\n <AriaToolbar\n className={(renderProps) =>\n clsx(\n styles[\"toolbar\"],\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n data-variant={variant}\n data-color={color}\n />\n );\n};\n","import clsx from \"clsx\";\nimport { ToggleButtonGroup } from \"react-aria-components\";\nimport styles from \"./toolbar.module.css\";\n\nexport const ToolbarToggleButtonGroup: React.FC<\n React.ComponentPropsWithRef<typeof ToggleButtonGroup>\n> = ({ className, ...props }) => {\n return (\n <ToggleButtonGroup\n className={(renderProps) =>\n clsx(\n styles[\"section\"],\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;GCKa,KAAmC,EAC5C,cACA,aAAU,UACV,WAAQ,YACR,GAAG,QAGC,kBAAC,GAAD;CACI,YAAY,MACR,EACI,EAAO,SACP,OAAO,KAAc,aACf,EAAU,CAAW,IACrB,CACV;CAEJ,GAAI;CACJ,gBAAc;CACd,cAAY;AAAM,CAAA,YCnBjB,KAET,MAAA;CAAA,IAAA,KAAA,GAAA,EAAA,EAAA,CAAA,CAAA,GAAA,GAAA;CAAA,AAAA,EAAA,OAAA,KAAwB,IAAA,EAAA,IAAA,IAAA,EAAA,OAAvB,kBAAA,KAAA,GAAuB,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAAA,AAAA,EAAA,OAAA,IASX,IAAA,EAAA,MANM,KAAA,MACP,EACI,EAAM,SACN,OAAO,KAAc,aACf,EAAU,CACF,IAFd,CAGJ,GAAC,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAGP,OAHO,EAAA,OAAA,KAAA,EAAA,OAAA,KAPT,IAAA,kBAAC,GAAD;EACe,WAAA;EAMN,GAED;CAAK,CAAA,GACX,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,KAAA,IAAA,EAAA,IAVF;AAUE"}
|
|
1
|
+
{"version":3,"file":"Toolbar","names":["Toolbar","AriaToolbar","clsx","styles","_c","clsx","styles","require_compiler_runtime","clsx$1","toolbar_module_default","Toolbar$1","props","Toolbar","\"toolbar\"","className","renderProps","variant","color","import_compiler_runtime","ToolbarToggleButtonGroup","$","t0","t1","t2","ToggleButtonGroup"],"sources":["../../src/components/Toolbar/toolbar.module.css","../../src/components/Toolbar/Toolbar.tsx","../../src/components/Toolbar/ToolbarToggleButtonGroup.tsx"],"sourcesContent":["/* configurable tokens\n*\n* --md-toolbar-background\n*\n* --md-toolbar-button-background\n* --md-toolbar-toggle-button-background\n* --md-toolbar-toggle-button-selected-background\n*\n* --md-toolbar-button-color\n* --md-toolbar-toggle-button-color\n* --md-toolbar-toggle-button-selected-color\n*\n* configurable tokens end */\n\n@layer adgytec.comps {\n .toolbar {\n --_md-toolbar-background: var(\n --md-toolbar-background,\n var(--_md-toolbar-background-default)\n );\n --_md-toolbar-button-background: var(\n --md-toolbar-button-background,\n var(--_md-toolbar-button-background-default)\n );\n --_md-toolbar-toggle-button-background: var(\n --md-toolbar-toggle-button-background,\n var(--_md-toolbar-toggle-button-background-default)\n );\n --_md-toolbar-toggle-button-selected-background: var(\n --md-toolbar-toggle-button-selected-background,\n var(--_md-toolbar-toggle-button-selected-background-default)\n );\n --_md-toolbar-button-color: var(\n --md-toolbar-button-color,\n var(--_md-toolbar-button-color-default)\n );\n --_md-toolbar-toggle-button-color: var(\n --md-toolbar-toggle-button-color,\n var(--_md-toolbar-toggle-button-color-default)\n );\n --_md-toolbar-toggle-button-selected-color: var(\n --md-toolbar-toggle-button-selected-color,\n var(--_md-toolbar-toggle-button-selected-color-default)\n );\n\n --md-divider-color: var(--_md-toolbar-button-color);\n\n --_md-toolbar-space-between-actions: var(--md-sys-layout-space-4);\n\n border-radius: var(--md-sys-shape-corner-radius-full);\n padding: var(--md-sys-layout-space-8);\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--_md-toolbar-space-between-actions);\n\n background-color: var(--_md-toolbar-background);\n\n .section {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--_md-toolbar-space-between-actions);\n }\n\n &[data-variant=\"floating\"] {\n box-shadow: var(--md-sys-elevation-shadow-3);\n }\n\n &[data-orientation=\"vertical\"] {\n flex-direction: column;\n\n .section {\n flex-direction: column;\n }\n }\n }\n\n .toolbar[data-color=\"standard\"] {\n --_md-toolbar-background-default: var(--md-sys-color-surface-container);\n\n --_md-toolbar-button-background-default: var(\n --md-sys-color-surface-container\n );\n\n --_md-toolbar-toggle-button-background-default: var(\n --md-sys-color-surface-container\n );\n\n --_md-toolbar-toggle-button-selected-background-default: var(\n --md-sys-color-secondary-container\n );\n\n --_md-toolbar-button-color-default: var(\n --md-sys-color-on-surface-variant\n );\n\n --_md-toolbar-toggle-button-color-default: var(\n --md-sys-color-on-surface-variant\n );\n\n --_md-toolbar-toggle-button-selected-color-default: var(\n --md-sys-color-on-secondary-container\n );\n }\n\n .toolbar[data-color=\"vibrant\"] {\n --_md-toolbar-background-default: var(--md-sys-color-primary-container);\n\n --_md-toolbar-button-background-default: var(\n --md-sys-color-primary-container\n );\n\n --_md-toolbar-toggle-button-background-default: var(\n --md-sys-color-primary-container\n );\n\n --_md-toolbar-toggle-button-selected-background-default: var(\n --md-sys-color-surface-container\n );\n\n --_md-toolbar-button-color-default: var(\n --md-sys-color-on-primary-container\n );\n\n --_md-toolbar-toggle-button-color-default: var(\n --md-sys-color-on-primary-container\n );\n\n --_md-toolbar-toggle-button-selected-color-default: var(\n --md-sys-color-on-surface\n );\n }\n}\n\n@layer adgytec.overrides {\n .toolbar[data-orientation=\"horizontal\"] [data-divider] {\n block-size: auto;\n align-self: stretch;\n }\n\n /* button reset */\n .toolbar [data-visual-button] {\n /* outlined button */\n --_md-button-outline-width: 0px;\n border: none;\n\n /* elevated button */\n box-shadow: none;\n\n --_md-toggle-button-selected-shape: var(--_md-button-shape);\n\n &[data-disabled] {\n background-color: transparent;\n }\n }\n\n .toolbar [data-button]:not([data-color=\"filled\"]),\n .toolbar [data-toggle-button] {\n /* colors */\n --md-button-background: var(--_md-toolbar-button-background);\n --md-toggle-button-selected-background: var(\n --_md-toolbar-toggle-button-selected-background\n );\n --md-toggle-button-background: var(\n --_md-toolbar-toggle-button-background\n );\n\n --md-button-color: var(--_md-toolbar-button-color);\n --md-toggle-button-selected-color: var(\n --_md-toolbar-toggle-button-selected-color\n );\n --md-toggle-button-color: var(--_md-toolbar-toggle-button-color);\n }\n}\n","import clsx from \"clsx\";\nimport { Toolbar as AriaToolbar } from \"react-aria-components\";\nimport styles from \"./toolbar.module.css\";\nimport type { ToolbarProps } from \"./types\";\n\n/**\n * Container for a set of related action buttons, toggle buttons, and dividers, following\n * [Material 3 Toolbar](https://m3.material.io/) design patterns.\n *\n * Extends React Aria Components `Toolbar` with Material 3 styling and interactive behaviors:\n * - Manages single-tab-stop keyboard navigation across action items using arrow keys.\n * - Supports horizontal and vertical orientations via the `orientation` prop.\n * - Supports docked and elevated floating display variants via `variant`.\n * - Provides `\"standard\"` (surface container) and `\"vibrant\"` (primary container) color themes via `color`.\n * - Automatically adjusts button borders, shadows, and colors to seamlessly fit the toolbar surface.\n *\n * Configurable CSS tokens:\n * - `--md-toolbar-background`: Background color of the toolbar.\n * - `--md-toolbar-button-background`: Background color for buttons within the toolbar.\n * - `--md-toolbar-toggle-button-background`: Background color for toggle buttons.\n * - `--md-toolbar-toggle-button-selected-background`: Background color for selected toggle buttons.\n * - `--md-toolbar-button-color`: Text and icon color for buttons within the toolbar.\n * - `--md-toolbar-toggle-button-color`: Text and icon color for toggle buttons within the toolbar.\n * - `--md-toolbar-toggle-button-selected-color`: Text and icon color for selected toggle buttons.\n *\n * @example\n * ```tsx\n * import {\n * Divider,\n * IconButton,\n * ToggleIconButton,\n * Toolbar,\n * ToolbarToggleButtonGroup,\n * } from \"@adgytec/web-ui-components\";\n * import { AlignCenter, AlignLeft, AlignRight, Bold, Italic } from \"lucide-react\";\n *\n * export function EditorToolbar() {\n * return (\n * <Toolbar aria-label=\"Editor actions\" variant=\"floating\">\n * <ToolbarToggleButtonGroup selectionMode=\"single\">\n * <ToggleIconButton id=\"left\" icon={AlignLeft} aria-label=\"Align left\" />\n * <ToggleIconButton id=\"center\" icon={AlignCenter} aria-label=\"Align center\" />\n * <ToggleIconButton id=\"right\" icon={AlignRight} aria-label=\"Align right\" />\n * </ToolbarToggleButtonGroup>\n * <Divider orientation=\"vertical\" />\n * <IconButton icon={Bold} aria-label=\"Bold\" />\n * <IconButton icon={Italic} aria-label=\"Italic\" />\n * </Toolbar>\n * );\n * }\n * ```\n */\nexport const Toolbar: React.FC<ToolbarProps> = ({\n className,\n variant = \"docked\",\n color = \"standard\",\n ...props\n}) => {\n return (\n <AriaToolbar\n className={(renderProps) =>\n clsx(\n styles[\"toolbar\"],\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n data-variant={variant}\n data-color={color}\n />\n );\n};\n","import clsx from \"clsx\";\nimport { ToggleButtonGroup } from \"react-aria-components\";\nimport styles from \"./toolbar.module.css\";\n\n/**\n * Props for the {@link ToolbarToggleButtonGroup} component.\n * Extends React Aria Components `ToggleButtonGroup` props.\n */\nexport interface ToolbarToggleButtonGroupProps\n extends React.ComponentPropsWithRef<typeof ToggleButtonGroup> {}\n\n/**\n * Section wrapper for grouping toggle buttons inside a {@link Toolbar}.\n *\n * Extends React Aria Components `ToggleButtonGroup` to arrange grouped toggle buttons\n * (e.g. alignment choices, text format styles) with appropriate toolbar spacing,\n * selection handling, and orientation alignment.\n *\n * @example\n * ```tsx\n * import {\n * ToggleIconButton,\n * Toolbar,\n * ToolbarToggleButtonGroup,\n * } from \"@adgytec/web-ui-components\";\n * import { Bold, Italic } from \"lucide-react\";\n *\n * export function Example() {\n * return (\n * <Toolbar aria-label=\"Text styles\">\n * <ToolbarToggleButtonGroup selectionMode=\"multiple\" aria-label=\"Format\">\n * <ToggleIconButton id=\"bold\" icon={Bold} aria-label=\"Bold\" />\n * <ToggleIconButton id=\"italic\" icon={Italic} aria-label=\"Italic\" />\n * </ToolbarToggleButtonGroup>\n * </Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarToggleButtonGroup: React.FC<\n ToolbarToggleButtonGroupProps\n> = ({ className, ...props }) => {\n return (\n <ToggleButtonGroup\n className={(renderProps) =>\n clsx(\n styles[\"section\"],\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;GCoDaA,KAAmC,EAC5C,cACA,aAAU,UACV,WAAQ,YACR,GAAGW,QAGC,kBAACV,GAAD;CACI,YAAY,MACRC,EACIC,EAAOU,SACP,OAAOC,KAAc,aACfA,EAAUC,CAAW,IACrBD,CACV;CAEJ,GAAIH;CACJ,gBAAcK;CACd,cAAYC;AAAM,CAAA,YC/BjBE,KAET,MAAA;CAAA,IAAAC,KAAA,GAAAhB,EAAAA,EAAAA,CAAA,CAAA,GAAAU,GAAAH;CAAA,AAAAS,EAAA,OAAAC,KAAwB,IAAAD,EAAA,IAAA,IAAAA,EAAA,OAAvB,eAAA,GAAAT,KAAAU,GAAuB,EAAA,KAAAA,GAAA,EAAA,KAAAP,GAAA,EAAA,KAAAH;CAAA,IAAAW;CAAA,AAAAF,EAAA,OAAAN,IASX,IAAAM,EAAA,MANM,KAAA,MACPf,EACIC,EAAM,SACN,OAAOQ,KAAc,aACfA,EAAUC,CACF,IAFdD,CAGJ,GAAC,EAAA,KAAAA,GAAA,EAAA,KAAAQ;CAAA,IAAAC;CAGP,OAHOH,EAAA,OAAAT,KAAAS,EAAA,OAAAE,KAPT,IAAA,kBAACE,GAAD;EACe,WAAAF;EAMN,GAEDX;CAAK,CAAA,GACX,EAAA,KAAAA,GAAA,EAAA,KAAAW,GAAA,EAAA,KAAAC,KAAA,IAAAH,EAAA,IAVFG;AAUE"}
|
package/dist/chunks/Tooltip.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip","names":[],"sources":["../../src/components/Tooltip/Tooltip/tooltip.module.css","../../src/components/Tooltip/Tooltip/Tooltip.tsx"],"sourcesContent":["/* configurable tokens\n*\n* --md-tooltip-background\n* --md-tooltip-color\n*\n* configurable tokens end */\n\n@layer adgytec.comps {\n .tooltip {\n --_md-tooltip-background: var(\n --md-tooltip-background,\n var(--md-sys-color-inverse-surface)\n );\n --_md-tooltip-color: var(\n --md-tooltip-color,\n var(--md-sys-color-inverse-on-surface)\n );\n\n --_offset: calc(4 * var(--dp, 1px));\n\n background-color: var(--_md-tooltip-background);\n color: var(--_md-tooltip-color);\n\n padding-inline: var(--md-sys-layout-space-8);\n padding-block: var(--md-sys-layout-space-4);\n\n max-inline-size: calc(300 * var(--dp, 1px));\n border-radius: var(--md-sys-shape-corner-radius-extra-small);\n\n transform: translate3d(0, 0, 0);\n transition:\n transform var(--md-sys-motion-expressive-fast-spatial)\n var(--md-sys-motion-expressive-fast-spatial-duration),\n opacity var(--md-sys-motion-expressive-fast-effects)\n var(--md-sys-motion-expressive-fast-effects-duration);\n\n &[data-placement=\"bottom\"] {\n --_origin: translateY(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"top\"] {\n --_origin: translateY(var(--_offset));\n }\n\n &[data-placement=\"right\"] {\n --_origin: translateX(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"left\"] {\n --_origin: translateX(var(--_offset));\n }\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--_origin);\n opacity: 0;\n }\n }\n}\n","import clsx from \"clsx\";\nimport { Tooltip as AriaTooltip } from \"react-aria-components\";\nimport { typography } from \"@/utils/typography\";\nimport styles from \"./tooltip.module.css\";\n\
|
|
1
|
+
{"version":3,"file":"Tooltip","names":["Tooltip","AriaTooltip","clsx","styles","typography","clsx$1","tooltip_module_default","Tooltip$1","props","Tooltip","\"tooltip\"","className","renderProps"],"sources":["../../src/components/Tooltip/Tooltip/tooltip.module.css","../../src/components/Tooltip/Tooltip/Tooltip.tsx"],"sourcesContent":["/* configurable tokens\n*\n* --md-tooltip-background\n* --md-tooltip-color\n*\n* configurable tokens end */\n\n@layer adgytec.comps {\n .tooltip {\n --_md-tooltip-background: var(\n --md-tooltip-background,\n var(--md-sys-color-inverse-surface)\n );\n --_md-tooltip-color: var(\n --md-tooltip-color,\n var(--md-sys-color-inverse-on-surface)\n );\n\n --_offset: calc(4 * var(--dp, 1px));\n\n background-color: var(--_md-tooltip-background);\n color: var(--_md-tooltip-color);\n\n padding-inline: var(--md-sys-layout-space-8);\n padding-block: var(--md-sys-layout-space-4);\n\n max-inline-size: calc(300 * var(--dp, 1px));\n border-radius: var(--md-sys-shape-corner-radius-extra-small);\n\n transform: translate3d(0, 0, 0);\n transition:\n transform var(--md-sys-motion-expressive-fast-spatial)\n var(--md-sys-motion-expressive-fast-spatial-duration),\n opacity var(--md-sys-motion-expressive-fast-effects)\n var(--md-sys-motion-expressive-fast-effects-duration);\n\n &[data-placement=\"bottom\"] {\n --_origin: translateY(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"top\"] {\n --_origin: translateY(var(--_offset));\n }\n\n &[data-placement=\"right\"] {\n --_origin: translateX(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"left\"] {\n --_origin: translateX(var(--_offset));\n }\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--_origin);\n opacity: 0;\n }\n }\n}\n","import clsx from \"clsx\";\nimport { Tooltip as AriaTooltip } from \"react-aria-components\";\nimport { typography } from \"@/utils/typography\";\nimport styles from \"./tooltip.module.css\";\n\n/**\n * Props for the {@link Tooltip} component.\n * Extends React Aria Components `Tooltip` props.\n *\n * Configurable CSS tokens:\n * - `--md-tooltip-background`: Background color of the tooltip (`var(--md-sys-color-inverse-surface)`).\n * - `--md-tooltip-color`: Text color of the tooltip (`var(--md-sys-color-inverse-on-surface)`).\n */\nexport interface TooltipProps\n extends React.ComponentPropsWithRef<typeof AriaTooltip> {}\n\n/**\n * Plain tooltip component implementing [Material 3 Tooltips](https://m3.material.io/components/tooltips/overview).\n *\n * Provides brief, informative text messages when hovering, focusing, or long-pressing an element.\n * Supports smooth directional entrance/exit slide transitions and opacity fading based on `data-placement`.\n *\n * Configurable CSS tokens:\n * - `--md-tooltip-background`: Background color of the tooltip (`var(--md-sys-color-inverse-surface)`).\n * - `--md-tooltip-color`: Text color of the tooltip (`var(--md-sys-color-inverse-on-surface)`).\n *\n * @example\n * ```tsx\n * import { Button, Tooltip, TooltipTrigger } from \"@adgytec/web-ui-components\";\n *\n * export function Example() {\n * return (\n * <TooltipTrigger>\n * <Button label=\"Save Changes\" />\n * <Tooltip placement=\"top\">Saves the current document</Tooltip>\n * </TooltipTrigger>\n * );\n * }\n * ```\n */\nexport const Tooltip: React.FC<TooltipProps> = ({\n className,\n offset = 4,\n ...props\n}) => {\n return (\n <AriaTooltip\n offset={offset}\n className={(renderProps) =>\n clsx(\n styles[\"tooltip\"],\n typography.labelMedium,\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n data-tooltip\n />\n );\n};\n"],"mappings":";;;;yCCwCaA,KAAmC,EAC5C,cACA,YAAS,GACT,GAAGQ,QAGC,kBAACP,GAAD;CACY;CACR,YAAY,MACRC,EACIC,EAAOO,SACPN,EAAW,aACX,OAAOO,KAAc,aACfA,EAAUC,CAAW,IACrBD,CACV;CAEJ,GAAIH;CACJ,gBAAA;AAAY,CAAA"}
|
package/dist/chunks/base.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base","names":[],"sources":["../../src/utils/typography/base.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"base","names":["typography"],"sources":["../../src/utils/typography/base.ts"],"sourcesContent":["/**\n * Standard typography variants based on Material Design 3 guidelines.\n *\n * Maps typography roles to pre-defined CSS class names configuring font-family,\n * font-size, line-height, letter-spacing, and font-weight.\n *\n * Each role is available in two forms:\n * - **Standard**: The default type scale definition.\n * - **Emphasized**: A heavier font-weight variant (e.g., medium/semi-bold/bold) for emphasis.\n *\n * ### Categories:\n * - **Display**: Large, expressive short text (e.g. hero stats, numbers).\n * - **Headline**: High-emphasis titles for main screens or sections.\n * - **Title**: Medium-emphasis headers for cards, dialogs, and list items.\n * - **Body**: Longer passages, descriptive copy, and form inputs.\n * - **Label**: Compact utility styles for buttons, chips, tabs, and form field captions.\n *\n * @example\n * ```tsx\n * import { typography } from '@adgytec/web-ui-components';\n * import clsx from 'clsx';\n *\n * function Heading() {\n * return (\n * <h1 className={clsx(typography.headlineLarge)}>\n * Dashboard Overview\n * </h1>\n * );\n * }\n * ```\n */\nexport const typography = {\n // 1. Display\n\n /** Large display style (57px) for high-impact, short hero text. */\n displayLarge: \"typography-display-large\",\n /** Emphasized (heavier weight) variant of `displayLarge`. */\n displayLargeEmphasized: \"typography-display-large-emphasized\",\n\n /** Medium display style (45px) for prominent short text. */\n displayMedium: \"typography-display-medium\",\n /** Emphasized (heavier weight) variant of `displayMedium`. */\n displayMediumEmphasized: \"typography-display-medium-emphasized\",\n\n /** Small display style (36px) for compact hero headings. */\n displaySmall: \"typography-display-small\",\n /** Emphasized (heavier weight) variant of `displaySmall`. */\n displaySmallEmphasized: \"typography-display-small-emphasized\",\n\n // 2. Headline\n\n /** Large headline style (32px) for primary screen and section titles. */\n headlineLarge: \"typography-headline-large\",\n /** Emphasized (heavier weight) variant of `headlineLarge`. */\n headlineLargeEmphasized: \"typography-headline-large-emphasized\",\n\n /** Medium headline style (28px) for secondary screen titles. */\n headlineMedium: \"typography-headline-medium\",\n /** Emphasized (heavier weight) variant of `headlineMedium`. */\n headlineMediumEmphasized: \"typography-headline-medium-emphasized\",\n\n /** Small headline style (24px) for tertiary screen titles. */\n headlineSmall: \"typography-headline-small\",\n /** Emphasized (heavier weight) variant of `headlineSmall`. */\n headlineSmallEmphasized: \"typography-headline-small-emphasized\",\n\n // 3. Title\n\n /** Large title style (22px) for top-level card titles, app bars, and dialog headers. */\n titleLarge: \"typography-title-large\",\n /** Emphasized (heavier weight) variant of `titleLarge`. */\n titleLargeEmphasized: \"typography-title-large-emphasized\",\n\n /** Medium title style (16px) for section headers and prominent list items. */\n titleMedium: \"typography-title-medium\",\n /** Emphasized (heavier weight) variant of `titleMedium`. */\n titleMediumEmphasized: \"typography-title-medium-emphasized\",\n\n /** Small title style (14px) for compact card headers, subheads, and tabs. */\n titleSmall: \"typography-title-small\",\n /** Emphasized (heavier weight) variant of `titleSmall`. */\n titleSmallEmphasized: \"typography-title-small-emphasized\",\n\n // 4. Body\n\n /** Large body style (16px) for primary body text, article paragraphs, and form inputs. */\n bodyLarge: \"typography-body-large\",\n /** Emphasized (heavier weight) variant of `bodyLarge`. */\n bodyLargeEmphasized: \"typography-body-large-emphasized\",\n\n /** Medium body style (14px) for secondary descriptions and supporting text. */\n bodyMedium: \"typography-body-medium\",\n /** Emphasized (heavier weight) variant of `bodyMedium`. */\n bodyMediumEmphasized: \"typography-body-medium-emphasized\",\n\n /** Small body style (12px) for compact descriptions, disclaimers, and legal text. */\n bodySmall: \"typography-body-small\",\n /** Emphasized (heavier weight) variant of `bodySmall`. */\n bodySmallEmphasized: \"typography-body-small-emphasized\",\n\n // 5. Label\n\n /** Large label style (14px) for buttons, navigation items, chips, and field labels. */\n labelLarge: \"typography-label-large\",\n /** Emphasized (heavier weight) variant of `labelLarge`. */\n labelLargeEmphasized: \"typography-label-large-emphasized\",\n\n /** Medium label style (12px) for helper text, tooltips, tags, and character counts. */\n labelMedium: \"typography-label-medium\",\n /** Emphasized (heavier weight) variant of `labelMedium`. */\n labelMediumEmphasized: \"typography-label-medium-emphasized\",\n\n /** Small label style (11px) for overline text, timestamps, and compact metadata. */\n labelSmall: \"typography-label-small\",\n /** Emphasized (heavier weight) variant of `labelSmall`. */\n labelSmallEmphasized: \"typography-label-small-emphasized\",\n} as const;\n\n/**\n * Union of all standard typography CSS class name values in {@link typography}.\n */\nexport type TypographyVariant = (typeof typography)[keyof typeof typography];\n\n/**\n * Union of all standard typography role keys in {@link typography}.\n */\nexport type TypographyKey = keyof typeof typography;\n"],"mappings":";AA+BA,IAAaA,IAAa;CAItB,cAAc;CAEd,wBAAwB;CAGxB,eAAe;CAEf,yBAAyB;CAGzB,cAAc;CAEd,wBAAwB;CAKxB,eAAe;CAEf,yBAAyB;CAGzB,gBAAgB;CAEhB,0BAA0B;CAG1B,eAAe;CAEf,yBAAyB;CAKzB,YAAY;CAEZ,sBAAsB;CAGtB,aAAa;CAEb,uBAAuB;CAGvB,YAAY;CAEZ,sBAAsB;CAKtB,WAAW;CAEX,qBAAqB;CAGrB,YAAY;CAEZ,sBAAsB;CAGtB,WAAW;CAEX,qBAAqB;CAKrB,YAAY;CAEZ,sBAAsB;CAGtB,aAAa;CAEb,uBAAuB;CAGvB,YAAY;CAEZ,sBAAsB;AAC1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = /* @__PURE__ */ t(((t, n) => {
|
|
4
|
-
n.exports = { ...e };
|
|
4
|
+
n.exports = Object.prototype.hasOwnProperty.call(e, "module.exports") ? e["module.exports"] : { ...e };
|
|
5
5
|
})), r = /* @__PURE__ */ t(((e) => {
|
|
6
6
|
var t = n().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
7
7
|
e.c = function(e) {
|
|
@@ -16,7 +16,7 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
|
|
|
16
16
|
};
|
|
17
17
|
})();
|
|
18
18
|
})), a = /* @__PURE__ */ t(((e, t) => {
|
|
19
|
-
process.env.NODE_ENV === "production" ?
|
|
19
|
+
t.exports = process.env.NODE_ENV === "production" ? r() : i();
|
|
20
20
|
}));
|
|
21
21
|
//#endregion
|
|
22
22
|
export { a as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-runtime","names":[],"sources":["../../builtin:esm-external-require-react","../../node_modules/react/cjs/react-compiler-runtime.production.js","../../node_modules/react/cjs/react-compiler-runtime.development.js","../../node_modules/react/compiler-runtime.js"],"sourcesContent":["import * as m from 'react';module.exports = { ...m };","/**\n * @license React\n * react-compiler-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ReactSharedInternals =\n require(\"react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nexports.c = function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n};\n","/**\n * @license React\n * react-compiler-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n var ReactSharedInternals =\n require(\"react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n exports.c = function (size) {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher.useMemoCache(size);\n };\n })();\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-compiler-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-compiler-runtime.development.js');\n}\n"],"
|
|
1
|
+
{"version":3,"file":"compiler-runtime","names":["m","__commonJSMin","mod","cb","require_builtin_esm_external_require_react","require_react_compiler_runtime_production","ReactSharedInternals","size","require_react_compiler_runtime_development","dispatcher","require_compiler_runtime","module"],"sources":["../../builtin:esm-external-require-react","../../node_modules/react/cjs/react-compiler-runtime.production.js","../../node_modules/react/cjs/react-compiler-runtime.development.js","../../node_modules/react/compiler-runtime.js"],"sourcesContent":["import * as m from 'react';module.exports = Object.prototype.hasOwnProperty.call(m, 'module.exports') ? m['module.exports'] : { ...m };","/**\n * @license React\n * react-compiler-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar ReactSharedInternals =\n require(\"react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nexports.c = function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n};\n","/**\n * @license React\n * react-compiler-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n var ReactSharedInternals =\n require(\"react\").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n exports.c = function (size) {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher.useMemoCache(size);\n };\n })();\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-compiler-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-compiler-runtime.development.js');\n}\n"],"ignoreList":[1,2,3],"mappings":";;;CAA2B,EAAO,UAAU,OAAO,UAAU,eAAe,KAAKA,GAAG,gBAAgB,IAAIA,EAAE,oBAAoB,EAAE,GAAGA,EAAE;;CCWrI,IAAIM,IAAAF,EAAA,CAAA,CACe;CACnB,EAAQ,IAAI,SAAU,GAAM;EAC1B,OAAOE,EAAqB,EAAE,aAAaC,CAAI;CACjD;;CCJA,AAAA,QAAA,IAAA,aAAA,iBACG,WAAY;EACX,IAAID,IAAAF,EAAA,CAAA,CACe;EACnB,EAAQ,IAAI,SAAU,GAAM;GAC1B,IAAIK,IAAaH,EAAqB;GAKtC,OAJSG,MAAT,QACE,QAAQ,MACN,+aACF,GACKA,EAAW,aAAaF,CAAI;EACrC;CACF,EAAA,CAAG;;CCdL,AAGEI,EAAO,UAHT,QAAA,IAAA,aAA6B,eACpBN,EAAA,IAEAG,EAAA"}
|
package/dist/chunks/context.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context","names":[],"sources":["../../src/components/Input/Select/ComboBox/context.ts"],"sourcesContent":["import { createContext } from \"react\";\nimport type { ComboBoxRenderProps } from \"react-aria-components\";\n\nexport const ComboboxContext = createContext<Partial<ComboBoxRenderProps>>({});\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"context","names":["ComboboxContext","createContext"],"sources":["../../src/components/Input/Select/ComboBox/context.ts"],"sourcesContent":["import { createContext } from \"react\";\nimport type { ComboBoxRenderProps } from \"react-aria-components\";\n\n/**\n * Context communicating ComboBox state (e.g. `isOpen`, `isInvalid`, `isDisabled`) down to {@link ComboBoxTrigger}.\n */\nexport const ComboboxContext = createContext<Partial<ComboBoxRenderProps>>({});\n"],"mappings":";;AAMA,IAAaA,IAAkBC,EAA4C,CAAC,CAAC"}
|
package/dist/chunks/core
CHANGED
|
@@ -55,48 +55,50 @@ var v = {
|
|
|
55
55
|
large: n.headlineSmall,
|
|
56
56
|
"extra-large": n.headlineLarge
|
|
57
57
|
}, T = (e) => x[e], E = x.size, D = { button: "_button_4jeo2_2" }, O = e(), k = (e) => {
|
|
58
|
-
let n = (0, O.c)(
|
|
59
|
-
n[0] === e ? (o = n[1], c = n[2], l = n[3], m = n[4], _ = n[5], v = n[6]) : ({icon:
|
|
60
|
-
let { shape:
|
|
61
|
-
n[
|
|
62
|
-
let
|
|
63
|
-
n[
|
|
64
|
-
let { isSelected: t, isDisabled: n, isFocusVisible: a, isFocused: s, isPressed:
|
|
58
|
+
let n = (0, O.c)(29), o, c, l, m, _, v, x, C;
|
|
59
|
+
n[0] === e ? (o = n[1], c = n[2], l = n[3], m = n[4], _ = n[5], v = n[6], x = n[7], C = n[8]) : ({icon: l, selectedIcon: x, children: o, onPress: _, iconPlacement: m, tooltip: C, className: c, ...v} = e, n[0] = e, n[1] = o, n[2] = c, n[3] = l, n[4] = m, n[5] = _, n[6] = v, n[7] = x, n[8] = C);
|
|
60
|
+
let { shape: T, size: E, color: k, iconPlacement: A } = s(), M = m ?? A ?? "start", { splashInfo: N, handlePress: P } = a(_), F = typeof o == "function", I;
|
|
61
|
+
n[9] !== c || n[10] !== k ? (I = (e) => u(h, t, y(k), typeof c == "function" ? c(e) : c), n[9] = c, n[10] = k, n[11] = I) : I = n[11];
|
|
62
|
+
let L;
|
|
63
|
+
n[12] !== M || n[13] !== o || n[14] !== l || n[15] !== F || n[16] !== x || n[17] !== T || n[18] !== E || n[19] !== N ? (L = (e) => {
|
|
64
|
+
let { isSelected: t, isDisabled: n, isFocusVisible: a, isFocused: s, isPressed: c, isHovered: p } = e, m = {
|
|
65
65
|
"data-hovered": p || void 0,
|
|
66
66
|
"data-disabled": n || void 0,
|
|
67
67
|
"data-focused": s || void 0,
|
|
68
68
|
"data-focus-visible": a || void 0,
|
|
69
|
-
"data-pressed":
|
|
69
|
+
"data-pressed": c || void 0,
|
|
70
70
|
"data-selected": t || void 0,
|
|
71
71
|
"data-toggle-button": !0,
|
|
72
|
-
"data-shape":
|
|
72
|
+
"data-shape": T,
|
|
73
73
|
"data-visual-button": !0
|
|
74
|
-
}, h =
|
|
75
|
-
t &&
|
|
76
|
-
let _ = S[
|
|
74
|
+
}, h = l;
|
|
75
|
+
t && x && (h = x);
|
|
76
|
+
let _ = S[E], v = h && /* @__PURE__ */ d(r, {
|
|
77
77
|
icon: h,
|
|
78
78
|
size: _
|
|
79
79
|
});
|
|
80
80
|
return /* @__PURE__ */ f("span", {
|
|
81
81
|
...m,
|
|
82
|
-
className: u(g, b, w[
|
|
82
|
+
className: u(g, b, w[E], D.button),
|
|
83
83
|
children: [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
N && /* @__PURE__ */ d(i, { ...N }),
|
|
85
|
+
M === "start" && v,
|
|
86
|
+
F ? o(e) : o,
|
|
87
|
+
M === "end" && v
|
|
88
88
|
]
|
|
89
89
|
});
|
|
90
|
-
}, n[
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
onPress:
|
|
94
|
-
className:
|
|
95
|
-
...
|
|
90
|
+
}, n[12] = M, n[13] = o, n[14] = l, n[15] = F, n[16] = x, n[17] = T, n[18] = E, n[19] = N, n[20] = L) : L = n[20];
|
|
91
|
+
let R;
|
|
92
|
+
n[21] !== P || n[22] !== v || n[23] !== I || n[24] !== L ? (R = /* @__PURE__ */ d(p, {
|
|
93
|
+
onPress: P,
|
|
94
|
+
className: I,
|
|
95
|
+
...v,
|
|
96
96
|
"data-connected-button": !0,
|
|
97
97
|
"data-button": !0,
|
|
98
|
-
children:
|
|
99
|
-
}), n[
|
|
98
|
+
children: L
|
|
99
|
+
}), n[21] = P, n[22] = v, n[23] = I, n[24] = L, n[25] = R) : R = n[25];
|
|
100
|
+
let z;
|
|
101
|
+
return n[26] !== R || n[27] !== C ? (z = j(R, C), n[26] = R, n[27] = C, n[28] = z) : z = n[28], z;
|
|
100
102
|
};
|
|
101
103
|
//#endregion
|
|
102
104
|
//#region src/components/Button/core/useButtonConfig.ts
|