@vibe/core 4.5.8 → 4.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/counter/dist/Counter/Counter.js +2 -0
- package/dist/components/counter/dist/Counter/Counter.js.map +1 -0
- package/dist/components/counter/dist/Counter/Counter.module.scss.js +2 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/label/dist/Label/Label.module.scss.js +1 -1
- package/dist/components/label/dist/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/components/link/dist/Link/Link.module.scss.js +1 -1
- package/dist/components/radio-button/dist/RadioButton/RadioButton.js +2 -0
- package/dist/components/radio-button/dist/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/radio-button/dist/RadioButton/RadioButton.module.scss.js +2 -0
- package/dist/hooks/dist/useAfterFirstRender/index.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -2
- package/dist/metadata/components.json +2 -2
- package/dist/metadata.json +2 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroup.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Badge/Badge.d.ts +1 -1
- package/dist/mocked_classnames/components/index.d.ts +2 -2
- package/dist/mocked_classnames/hooks/index.d.ts +1 -2
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/Avatar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.js.map +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.js.map +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableText/EditableText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EmptyState/EmptyState.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/Modal/Modal.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Switch/Switch.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/Toggle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/next/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/index.js +1 -1
- package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/src/components/Avatar/Avatar.module.scss.js +1 -1
- package/dist/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/src/components/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/src/components/Badge/Badge.js +1 -1
- package/dist/src/components/Badge/Badge.js.map +1 -1
- package/dist/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
- package/dist/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/src/components/EditableText/EditableText.module.scss.js +1 -1
- package/dist/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/src/components/EmptyState/EmptyState.module.scss.js +1 -1
- package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/src/components/List/List.module.scss.js +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
- package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/src/components/Modal/Modal/Modal.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/src/components/Search/Search.module.scss.js +1 -1
- package/dist/src/components/Skeleton/Skeleton.module.scss.js +1 -1
- package/dist/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/src/components/Switch/Switch.module.scss.js +1 -1
- package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
- package/dist/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/src/components/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/src/components/Toggle/Toggle.module.scss.js +1 -1
- package/dist/src/components/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
- package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
- package/dist/src/components/next/List/List.module.scss.js +1 -1
- package/dist/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/style/dist/index.min.css.js +1 -1
- package/package.json +13 -11
- package/dist/components/Counter/Counter.d.ts +0 -51
- package/dist/components/Counter/Counter.types.d.ts +0 -3
- package/dist/components/Counter/index.d.ts +0 -2
- package/dist/components/RadioButton/RadioButton.d.ts +0 -74
- package/dist/components/RadioButton/index.d.ts +0 -1
- package/dist/hooks/useAfterFirstRender/index.d.ts +0 -2
- package/dist/mocked_classnames/components/Counter/Counter.d.ts +0 -51
- package/dist/mocked_classnames/components/Counter/Counter.types.d.ts +0 -3
- package/dist/mocked_classnames/components/Counter/index.d.ts +0 -2
- package/dist/mocked_classnames/components/RadioButton/RadioButton.d.ts +0 -74
- package/dist/mocked_classnames/components/RadioButton/index.d.ts +0 -1
- package/dist/mocked_classnames/hooks/useAfterFirstRender/index.d.ts +0 -2
- package/dist/mocked_classnames/src/components/Counter/Counter.js +0 -2
- package/dist/mocked_classnames/src/components/Counter/Counter.js.map +0 -1
- package/dist/mocked_classnames/src/components/Counter/Counter.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.js +0 -2
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.js.map +0 -1
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.module.scss.js +0 -2
- package/dist/mocked_classnames/src/hooks/useAfterFirstRender/index.js.map +0 -1
- package/dist/src/components/Counter/Counter.js +0 -2
- package/dist/src/components/Counter/Counter.js.map +0 -1
- package/dist/src/components/Counter/Counter.module.scss.js +0 -2
- package/dist/src/components/Counter/Counter.module.scss.js.map +0 -1
- package/dist/src/components/RadioButton/RadioButton.js +0 -2
- package/dist/src/components/RadioButton/RadioButton.js.map +0 -1
- package/dist/src/components/RadioButton/RadioButton.module.scss.js +0 -2
- package/dist/src/components/RadioButton/RadioButton.module.scss.js.map +0 -1
- package/dist/src/hooks/useAfterFirstRender/index.js +0 -2
- package/dist/src/hooks/useAfterFirstRender/index.js.map +0 -1
- /package/dist/{mocked_classnames/src/components → components/counter/dist}/Counter/Counter.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/radio-button/dist}/RadioButton/RadioButton.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/hooks → hooks/dist}/useAfterFirstRender/index.js +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type VibeComponentProps } from "../../types";
|
|
3
|
-
export interface RadioButtonProps extends VibeComponentProps {
|
|
4
|
-
/**
|
|
5
|
-
* Class name applied to the label text.
|
|
6
|
-
*/
|
|
7
|
-
labelClassName?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Class name applied to the radio button element.
|
|
10
|
-
*/
|
|
11
|
-
radioButtonClassName?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The label text displayed next to the radio button.
|
|
14
|
-
*/
|
|
15
|
-
text?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The value associated with the radio button.
|
|
18
|
-
*/
|
|
19
|
-
value?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The name of the radio button group.
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
/**
|
|
25
|
-
* If true, the radio button automatically receives focus on mount.
|
|
26
|
-
*/
|
|
27
|
-
autoFocus?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* If true, the radio button is disabled.
|
|
30
|
-
*/
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* The reason why the radio button is disabled, displayed in a tooltip.
|
|
34
|
-
*/
|
|
35
|
-
disabledReason?: string;
|
|
36
|
-
/**
|
|
37
|
-
* If true, the radio button is checked by default.
|
|
38
|
-
*/
|
|
39
|
-
defaultChecked?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The child elements inside the radio button.
|
|
42
|
-
*/
|
|
43
|
-
children?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* Callback fired when the radio button selection changes.
|
|
46
|
-
*/
|
|
47
|
-
onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;
|
|
48
|
-
/**
|
|
49
|
-
* If provided, controls the checked state of the radio button.
|
|
50
|
-
*/
|
|
51
|
-
checked?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If true, clicking on children will trigger selection.
|
|
54
|
-
*/
|
|
55
|
-
retainChildClick?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* The tab index applied to the children.
|
|
58
|
-
*/
|
|
59
|
-
childrenTabIndex?: number;
|
|
60
|
-
/**
|
|
61
|
-
* If true, disables the label animation.
|
|
62
|
-
*/
|
|
63
|
-
noLabelAnimation?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* ARIA label for accessibility when no text is provided.
|
|
66
|
-
*/
|
|
67
|
-
"aria-label"?: string;
|
|
68
|
-
/**
|
|
69
|
-
* ID of element that describe this radio button.
|
|
70
|
-
*/
|
|
71
|
-
"aria-describedby"?: string;
|
|
72
|
-
}
|
|
73
|
-
declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
74
|
-
export default RadioButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RadioButton, type RadioButtonProps } from "./RadioButton";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type CounterColor, type CounterSize, type CounterType } from "./Counter.types";
|
|
3
|
-
import { type VibeComponentProps } from "../../types";
|
|
4
|
-
export interface CounterProps extends VibeComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* The ID of the element describing the counter.
|
|
7
|
-
*/
|
|
8
|
-
"aria-labelledby"?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Class name applied to the counter element.
|
|
11
|
-
*/
|
|
12
|
-
counterClassName?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The numeric value displayed in the counter.
|
|
15
|
-
*/
|
|
16
|
-
count?: number;
|
|
17
|
-
/**
|
|
18
|
-
* The label of the counter for accessibility.
|
|
19
|
-
*/
|
|
20
|
-
"aria-label"?: string;
|
|
21
|
-
/**
|
|
22
|
-
* The size of the counter.
|
|
23
|
-
*/
|
|
24
|
-
size?: CounterSize;
|
|
25
|
-
/**
|
|
26
|
-
* The visual style of the counter.
|
|
27
|
-
*/
|
|
28
|
-
kind?: CounterType;
|
|
29
|
-
/**
|
|
30
|
-
* The color of the counter.
|
|
31
|
-
*/
|
|
32
|
-
color?: CounterColor;
|
|
33
|
-
/**
|
|
34
|
-
* The maximum number of digits displayed before truncation.
|
|
35
|
-
*/
|
|
36
|
-
maxDigits?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Text prepended to the counter value.
|
|
39
|
-
*/
|
|
40
|
-
prefix?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Callback fired when the counter is clicked.
|
|
43
|
-
*/
|
|
44
|
-
onMouseDown?: (event: React.MouseEvent<HTMLSpanElement>) => void;
|
|
45
|
-
/**
|
|
46
|
-
* If true, disables counter animations.
|
|
47
|
-
*/
|
|
48
|
-
noAnimation?: boolean;
|
|
49
|
-
}
|
|
50
|
-
declare const Counter: ({ className, counterClassName, count, size, kind, color, maxDigits, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, id, prefix, onMouseDown, noAnimation, "data-testid": dataTestId }: CounterProps) => React.JSX.Element;
|
|
51
|
-
export default Counter;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type VibeComponentProps } from "../../types";
|
|
3
|
-
export interface RadioButtonProps extends VibeComponentProps {
|
|
4
|
-
/**
|
|
5
|
-
* Class name applied to the label text.
|
|
6
|
-
*/
|
|
7
|
-
labelClassName?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Class name applied to the radio button element.
|
|
10
|
-
*/
|
|
11
|
-
radioButtonClassName?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The label text displayed next to the radio button.
|
|
14
|
-
*/
|
|
15
|
-
text?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The value associated with the radio button.
|
|
18
|
-
*/
|
|
19
|
-
value?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The name of the radio button group.
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
/**
|
|
25
|
-
* If true, the radio button automatically receives focus on mount.
|
|
26
|
-
*/
|
|
27
|
-
autoFocus?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* If true, the radio button is disabled.
|
|
30
|
-
*/
|
|
31
|
-
disabled?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* The reason why the radio button is disabled, displayed in a tooltip.
|
|
34
|
-
*/
|
|
35
|
-
disabledReason?: string;
|
|
36
|
-
/**
|
|
37
|
-
* If true, the radio button is checked by default.
|
|
38
|
-
*/
|
|
39
|
-
defaultChecked?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The child elements inside the radio button.
|
|
42
|
-
*/
|
|
43
|
-
children?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* Callback fired when the radio button selection changes.
|
|
46
|
-
*/
|
|
47
|
-
onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;
|
|
48
|
-
/**
|
|
49
|
-
* If provided, controls the checked state of the radio button.
|
|
50
|
-
*/
|
|
51
|
-
checked?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* If true, clicking on children will trigger selection.
|
|
54
|
-
*/
|
|
55
|
-
retainChildClick?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* The tab index applied to the children.
|
|
58
|
-
*/
|
|
59
|
-
childrenTabIndex?: number;
|
|
60
|
-
/**
|
|
61
|
-
* If true, disables the label animation.
|
|
62
|
-
*/
|
|
63
|
-
noLabelAnimation?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* ARIA label for accessibility when no text is provided.
|
|
66
|
-
*/
|
|
67
|
-
"aria-label"?: string;
|
|
68
|
-
/**
|
|
69
|
-
* ID of element that describe this radio button.
|
|
70
|
-
*/
|
|
71
|
-
"aria-describedby"?: string;
|
|
72
|
-
}
|
|
73
|
-
declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
74
|
-
export default RadioButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RadioButton, type RadioButtonProps } from "./RadioButton";
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{camelCase as i}from"es-toolkit";import{useEventListener as a,getStyle as o,NOOP as r}from"@vibe/shared";import{getTestId as n,ComponentDefaultTestId as s}from"../../tests/testIds.js";import l from"classnames";import d,{useState as c,useRef as m,useCallback as u,useEffect as f,useMemo as v}from"react";import{SwitchTransition as p,CSSTransition as E}from"react-transition-group";import b from"../../hooks/useAfterFirstRender/index.js";import x from"./Counter.module.scss.js";import{ComponentVibeId as N}from"../../tests/constants.js";var A=function(A){var g=A.className,k=A.counterClassName,y=A.count,h=void 0===y?0:y,j=A.size,C=void 0===j?"large":j,R=A.kind,w=void 0===R?"fill":R,M=A.color,T=void 0===M?"primary":M,D=A.maxDigits,O=void 0===D?3:D,U=A["aria-labelledby"],z=void 0===U?"":U,L=A["aria-label"],P=void 0===L?"":L,_=A.id,B=void 0===_?"":_,F=A.prefix,H=void 0===F?"":F,I=A.onMouseDown,q=void 0===I?r:I,G=A.noAnimation,J=void 0!==G&&G,K=A["data-testid"],Q=c(!1),S=e(Q,2),V=S[0],W=S[1],X=m(null),Y=m(null),Z=u((function(){W(!0)}),[W]),$=u((function(){W(!1)}),[W]);a({eventName:"animationend",callback:$,ref:X});var ee=b();f((function(){ee.current&&Z()}),[h,ee,Z]),f((function(){O>0||console.error("Max digits must be a positive number")}),[O]);var te=v((function(){return l(x.counter,o(x,i("size-"+C)),o(x,i("kind-"+w)),o(x,i("color-"+T)),t({},x.withAnimation,V),k)}),[C,w,T,V,k]),ie="counter"+(B?"-".concat(B):""),ae=(null==h?void 0:(""+h).length)>O?"".concat(Math.pow(10,O)-1,"+"):h+"",oe=d.createElement("span",{id:ie,"data-testid":K||n(s.COUNTER,B)},H+ae);return d.createElement("span",{className:g,"aria-label":"".concat(P," ").concat(ae),"aria-labelledby":z,onMouseDown:q,"data-vibe":N.COUNTER},d.createElement("div",{className:te,"aria-label":ae,ref:X},J?oe:d.createElement(p,{mode:"out-in"},d.createElement(E,{key:ae,nodeRef:Y,classNames:{enter:x.fadeEnter,enterActive:x.fadeEnterActive,exit:x.fadeExit,exitActive:x.fadeExitActive},addEndListener:function(e){var t;null===(t=Y.current)||void 0===t||t.addEventListener("transitionend",e,!1)}},d.createElement("span",{ref:Y,id:ie,"data-testid":K||n(s.COUNTER,B)},H+ae)))))};export{A as default};
|
|
2
|
-
//# sourceMappingURL=Counter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Counter.js","sources":["../../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { getStyle, NOOP } from \"@vibe/shared\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { CSSTransition, SwitchTransition } from \"react-transition-group\";\nimport useEventListener from \"../../hooks/useEventListener\";\nimport useAfterFirstRender from \"../../hooks/useAfterFirstRender\";\n\nimport { type CounterColor, type CounterSize, type CounterType } from \"./Counter.types\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Counter.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface CounterProps extends VibeComponentProps {\n /**\n * The ID of the element describing the counter.\n */\n \"aria-labelledby\"?: string;\n /**\n * Class name applied to the counter element.\n */\n counterClassName?: string;\n /**\n * The numeric value displayed in the counter.\n */\n count?: number;\n /**\n * The label of the counter for accessibility.\n */\n \"aria-label\"?: string;\n /**\n * The size of the counter.\n */\n size?: CounterSize;\n /**\n * The visual style of the counter.\n */\n kind?: CounterType;\n /**\n * The color of the counter.\n */\n color?: CounterColor;\n /**\n * The maximum number of digits displayed before truncation.\n */\n maxDigits?: number;\n /**\n * Text prepended to the counter value.\n */\n prefix?: string;\n /**\n * Callback fired when the counter is clicked.\n */\n onMouseDown?: (event: React.MouseEvent<HTMLSpanElement>) => void;\n /**\n * If true, disables counter animations.\n */\n noAnimation?: boolean;\n}\n\nconst Counter = ({\n className,\n counterClassName,\n count = 0,\n size = \"large\",\n kind = \"fill\",\n color = \"primary\",\n maxDigits = 3,\n \"aria-labelledby\": ariaLabelledBy = \"\",\n \"aria-label\": ariaLabel = \"\",\n id = \"\",\n prefix = \"\",\n onMouseDown = NOOP,\n noAnimation = false,\n \"data-testid\": dataTestId\n}: CounterProps) => {\n const [countChangeAnimationState, setCountChangeAnimationState] = useState(false);\n\n const ref = useRef<HTMLDivElement>(null);\n const nodeRef = useRef<HTMLSpanElement>(null);\n\n const setCountChangedAnimationActive = useCallback(() => {\n setCountChangeAnimationState(true);\n }, [setCountChangeAnimationState]);\n\n const setCountChangedAnimationNotActive = useCallback(() => {\n setCountChangeAnimationState(false);\n }, [setCountChangeAnimationState]);\n\n useEventListener({\n eventName: \"animationend\",\n callback: setCountChangedAnimationNotActive,\n ref\n });\n\n const isAfterFirstRender = useAfterFirstRender();\n\n useEffect(() => {\n if (isAfterFirstRender.current) {\n setCountChangedAnimationActive();\n }\n }, [count, isAfterFirstRender, setCountChangedAnimationActive]);\n\n useEffect(() => {\n if (maxDigits <= 0) {\n console.error(\"Max digits must be a positive number\");\n }\n }, [maxDigits]);\n\n const classNames = useMemo(() => {\n return cx(\n styles.counter,\n getStyle(styles, camelCase(\"size-\" + size)),\n getStyle(styles, camelCase(\"kind-\" + kind)),\n getStyle(styles, camelCase(\"color-\" + color)),\n {\n [styles.withAnimation]: countChangeAnimationState\n },\n counterClassName\n );\n }, [size, kind, color, countChangeAnimationState, counterClassName]);\n\n const counterId = \"counter\" + (id ? `-${id}` : \"\");\n const countText = count?.toString().length > maxDigits ? `${10 ** maxDigits - 1}+` : String(count);\n const counter = (\n <span id={counterId} data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}>\n {prefix + countText}\n </span>\n );\n\n return (\n <span\n className={className}\n aria-label={`${ariaLabel} ${countText}`}\n aria-labelledby={ariaLabelledBy}\n onMouseDown={onMouseDown}\n data-vibe={ComponentVibeId.COUNTER}\n >\n <div className={classNames} aria-label={countText} ref={ref}>\n {noAnimation ? (\n counter\n ) : (\n <SwitchTransition mode=\"out-in\">\n <CSSTransition\n key={countText}\n nodeRef={nodeRef}\n classNames={{\n enter: styles.fadeEnter,\n enterActive: styles.fadeEnterActive,\n exit: styles.fadeExit,\n exitActive: styles.fadeExitActive\n }}\n addEndListener={done => {\n nodeRef.current?.addEventListener(\"transitionend\", done, false);\n }}\n >\n <span\n ref={nodeRef}\n id={counterId}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}\n >\n {prefix + countText}\n </span>\n </CSSTransition>\n </SwitchTransition>\n )}\n </div>\n </span>\n );\n};\n\nexport default Counter;\n"],"names":["Counter","_ref","className","counterClassName","_ref$count","count","_ref$size","size","_ref$kind","kind","_ref$color","color","_ref$maxDigits","maxDigits","_ref$ariaLabelledby","ariaLabelledBy","_ref$ariaLabel","ariaLabel","_ref$id","id","_ref$prefix","prefix","_ref$onMouseDown","onMouseDown","NOOP","_ref$noAnimation","noAnimation","dataTestId","_useState","useState","_useState2","_slicedToArray","countChangeAnimationState","setCountChangeAnimationState","ref","useRef","nodeRef","setCountChangedAnimationActive","useCallback","setCountChangedAnimationNotActive","useEventListener","eventName","callback","isAfterFirstRender","useAfterFirstRender","useEffect","current","console","error","classNames","useMemo","cx","styles","counter","getStyle","camelCase","_defineProperty","withAnimation","counterId","concat","countText","length","Math","pow","String","React","createElement","getTestId","ComponentDefaultTestId","COUNTER","ComponentVibeId","SwitchTransition","mode","CSSTransition","key","enter","fadeEnter","enterActive","fadeEnterActive","exit","fadeExit","exitActive","fadeExitActive","addEndListener","done","_a","addEventListener"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={counter:"counter",withAnimation:"withAnimation",counterPopElastic:"counterPopElastic",sizeXs:"sizeXs",sizeSmall:"sizeSmall",sizeLarge:"sizeLarge",kindFill:"kindFill",colorPrimary:"colorPrimary",colorDark:"colorDark",colorNegative:"colorNegative",colorLight:"colorLight",kindLine:"kindLine",fadeEnter:"fadeEnter",fadeEnterActive:"fadeEnterActive",fadeExit:"fadeExit",fadeExitActive:"fadeExitActive","counter-pop-elastic":"counter-pop-elastic"};!function(n){const o="s_id-b4f9c23ba3ce_4_5_7";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+o))return;const r=document.createElement("style");r.id=o,t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[o]=n)}("/* stylelint-disable */\n/* stylelint-enable */\n.counter {\n display: inline-flex;\n justify-content: center;\n border-radius: 30px;\n overflow: hidden;\n transform-origin: center;\n}\n@keyframes counter-pop-elastic {\n 0% {\n transform: scale(1);\n }\n 33% {\n transform: scale(1.2);\n }\n 66% {\n transform: scale(0.9);\n }\n 100% {\n transform: scale(1);\n }\n}\n.withAnimation {\n animation: counterPopElastic var(--motion-expressive-short);\n}\n.sizeXs {\n font: var(--font-text3-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeSmall {\n font: var(--font-text2-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeLarge {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n font: var(--font-text2-normal);\n min-width: 24px;\n padding: 2px var(--space-8);\n}\n.kindFill.colorPrimary {\n color: var(--fixed-light-color);\n background-color: var(--primary-color);\n}\n.kindFill.colorDark {\n color: var(--text-color-on-inverted);\n background-color: var(--inverted-color-background);\n}\n.kindFill.colorNegative {\n color: var(--fixed-light-color);\n background-color: var(--negative-color);\n}\n.kindFill.colorLight {\n color: var(--primary-text-color);\n background-color: var(--ui-background-color);\n}\n.kindLine {\n box-shadow: 0 0 0 1px currentColor inset;\n}\n.kindLine.colorPrimary {\n color: var(--primary-color);\n}\n.kindLine.colorDark {\n color: var(--inverted-color-background);\n}\n.kindLine.colorNegative {\n color: var(--negative-color);\n}\n.kindLine.colorLight {\n color: var(--primary-text-color);\n box-shadow: 0 0 0 1px var(--ui-background-color) inset !important;\n}\n/* New number enters */\n.fadeEnter {\n opacity: 0;\n transform: translateY(15px);\n}\n.fadeEnterActive {\n position: relative;\n opacity: 1;\n transition: transform var(--motion-productive-long) var(--motion-timing-enter), opacity var(--motion-productive-short);\n transform: translateY(0);\n}\n/* Old number exits */\n.fadeExit {\n position: relative;\n opacity: 1;\n transform: translateY(0);\n}\n.fadeExitActive {\n position: relative;\n opacity: 0;\n transform: translateY(-15px);\n transition: transform var(--motion-productive-long) var(--motion-timing-exit), opacity var(--motion-productive-short);\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=Counter.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import a from"classnames";import t,{forwardRef as i,useRef as s,useCallback as o,useMemo as l}from"react";import{useMergeRef as r}from"@vibe/shared";import{Clickable as d}from"@vibe/clickable/mockedClassNames";import{Text as n}from"@vibe/typography/mockedClassNames";import{Tooltip as m}from"@vibe/tooltip/mockedClassNames";import{getTestId as c,ComponentDefaultTestId as u}from"../../tests/testIds.js";import b from"./RadioButton.module.scss.js";import{ComponentVibeId as p}from"../../tests/constants.js";var v=i((function(i,v){var f=i.className,N=i.text,C=void 0===N?"":N,h=i.value,k=void 0===h?"":h,O=i.name,T=void 0===O?"":O,B=i.labelClassName,E=i.radioButtonClassName,_=i.disabled,y=void 0!==_&&_,A=i.autoFocus,I=i.disabledReason,R=i.defaultChecked,j=void 0!==R&&R,x=i.children,g=i.onSelect,D=i.checked,L=i.retainChildClick,U=void 0===L||L,F=i.childrenTabIndex,P=void 0===F?0:F,H=i.noLabelAnimation,S=void 0!==H&&H,q=i["aria-label"],w=i["aria-describedby"],z=i.id,G=i["data-testid"],J=s(),K=r(v,J),M=o((function(){!y&&U&&(J.current&&(J.current.checked=!0),g&&g(null))}),[g,J,y,U]),Q=l((function(){return void 0!==D?{checked:D}:{defaultChecked:j}}),[D,j]);return t.createElement(m,{content:y?I:null},t.createElement("label",{"data-testid":G||c(u.RADIO_BUTTON,z),"data-vibe":p.RADIO_BUTTON,className:a(b.radioButton,f,e(e({},b.disabled,y),"disabled",y))},t.createElement("span",{className:a(b.inputContainer)},t.createElement("input",Object.assign({className:a(b.input),type:"radio",value:k,name:T,autoFocus:A,disabled:y},Q,{"aria-label":q,"aria-describedby":w,onChange:g,ref:K})),t.createElement("span",{"data-testid":c(u.RADIO_BUTTON_CONTROL,z),className:a(b.control,E,e({},b.labelAnimation,!S))})),C&&t.createElement(n,{element:"span",type:"text2",className:B,"data-testid":c(u.RADIO_BUTTON_LABEL,z)},C),x&&t.createElement(d,{onClick:M,tabIndex:P},x)))}));export{v as default};
|
|
2
|
-
//# sourceMappingURL=RadioButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sources":["../../../../../src/components/RadioButton/RadioButton.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { forwardRef, useCallback, useMemo, useRef } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { Clickable } from \"@vibe/clickable\";\nimport { Text } from \"@vibe/typography\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./RadioButton.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface RadioButtonProps extends VibeComponentProps {\n /**\n * Class name applied to the label text.\n */\n labelClassName?: string;\n /**\n * Class name applied to the radio button element.\n */\n radioButtonClassName?: string;\n /**\n * The label text displayed next to the radio button.\n */\n text?: string;\n /**\n * The value associated with the radio button.\n */\n value?: string;\n /**\n * The name of the radio button group.\n */\n name?: string;\n /**\n * If true, the radio button automatically receives focus on mount.\n */\n autoFocus?: boolean;\n /**\n * If true, the radio button is disabled.\n */\n disabled?: boolean;\n /**\n * The reason why the radio button is disabled, displayed in a tooltip.\n */\n disabledReason?: string;\n /**\n * If true, the radio button is checked by default.\n */\n defaultChecked?: boolean;\n /**\n * The child elements inside the radio button.\n */\n children?: React.ReactNode;\n /**\n * Callback fired when the radio button selection changes.\n */\n onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;\n /**\n * If provided, controls the checked state of the radio button.\n */\n checked?: boolean;\n /**\n * If true, clicking on children will trigger selection.\n */\n retainChildClick?: boolean;\n /**\n * The tab index applied to the children.\n */\n childrenTabIndex?: number;\n /**\n * If true, disables the label animation.\n */\n noLabelAnimation?: boolean;\n /**\n * ARIA label for accessibility when no text is provided.\n */\n \"aria-label\"?: string;\n /**\n * ID of element that describe this radio button.\n */\n \"aria-describedby\"?: string;\n}\n\nconst RadioButton = forwardRef(\n (\n {\n className,\n text = \"\",\n value = \"\",\n name = \"\",\n labelClassName,\n radioButtonClassName,\n disabled = false,\n autoFocus,\n disabledReason,\n defaultChecked = false,\n children,\n onSelect,\n checked,\n retainChildClick = true,\n childrenTabIndex = 0,\n noLabelAnimation = false,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n id,\n \"data-testid\": dataTestId\n }: RadioButtonProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const inputRef = useRef<HTMLInputElement | null>();\n const mergedRef = useMergeRef(ref, inputRef);\n\n const onChildClick = useCallback(() => {\n if (disabled || !retainChildClick) return;\n if (inputRef.current) {\n inputRef.current.checked = true;\n }\n if (onSelect) {\n onSelect(null);\n }\n }, [onSelect, inputRef, disabled, retainChildClick]);\n\n const checkedProps = useMemo(() => {\n if (checked !== undefined) {\n return { checked };\n }\n return { defaultChecked };\n }, [checked, defaultChecked]);\n\n const tooltipContent = disabled ? disabledReason : null;\n\n return (\n <Tooltip content={tooltipContent}>\n <label\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.RADIO_BUTTON, id)}\n data-vibe={ComponentVibeId.RADIO_BUTTON}\n className={cx(styles.radioButton, className, {\n [styles.disabled]: disabled,\n disabled: disabled\n })}\n >\n <span className={cx(styles.inputContainer)}>\n <input\n className={cx(styles.input)}\n type=\"radio\"\n value={value}\n name={name}\n autoFocus={autoFocus}\n disabled={disabled}\n {...checkedProps}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n onChange={onSelect}\n ref={mergedRef}\n />\n <span\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_CONTROL, id)}\n className={cx(styles.control, radioButtonClassName, {\n [styles.labelAnimation]: !noLabelAnimation\n })}\n />\n </span>\n {text && (\n <Text\n element=\"span\"\n type=\"text2\"\n className={labelClassName}\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_LABEL, id)}\n >\n {text}\n </Text>\n )}\n {children && (\n <Clickable onClick={onChildClick} tabIndex={childrenTabIndex}>\n {children}\n </Clickable>\n )}\n </label>\n </Tooltip>\n );\n }\n);\n\nexport default RadioButton;\n"],"names":["RadioButton","forwardRef","_ref","ref","className","_ref$text","text","_ref$value","value","_ref$name","name","labelClassName","radioButtonClassName","_ref$disabled","disabled","autoFocus","disabledReason","_ref$defaultChecked","defaultChecked","children","onSelect","checked","_ref$retainChildClick","retainChildClick","_ref$childrenTabIndex","childrenTabIndex","_ref$noLabelAnimation","noLabelAnimation","ariaLabel","ariaDescribedby","id","dataTestId","inputRef","useRef","mergedRef","useMergeRef","onChildClick","useCallback","current","checkedProps","useMemo","undefined","React","createElement","Tooltip","content","getTestId","ComponentDefaultTestId","RADIO_BUTTON","ComponentVibeId","cx","styles","radioButton","_defineProperty","inputContainer","Object","assign","input","type","onChange","RADIO_BUTTON_CONTROL","control","labelAnimation","Text","element","RADIO_BUTTON_LABEL","Clickable","onClick","tabIndex"],"mappings":"0kBAkFMA,IAAAA,EAAcC,GAClB,SAAAC,EAuBEC,GACE,IAtBAC,EAASF,EAATE,UAASC,EAAAH,EACTI,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EAAAE,EAAAL,EACTM,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EAAAE,EAAAP,EACVQ,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAcT,EAAdS,eACAC,EAAoBV,EAApBU,qBAAoBC,EAAAX,EACpBY,SAAAA,OAAW,IAAHD,GAAQA,EAChBE,EAASb,EAATa,UACAC,EAAcd,EAAdc,eAAcC,EAAAf,EACdgB,eAAAA,OAAiB,IAAHD,GAAQA,EACtBE,EAAQjB,EAARiB,SACAC,EAAQlB,EAARkB,SACAC,EAAOnB,EAAPmB,QAAOC,EAAApB,EACPqB,iBAAAA,OAAmB,IAAHD,GAAOA,EAAAE,EAAAtB,EACvBuB,iBAAAA,OAAmB,IAAHD,EAAG,EAACA,EAAAE,EAAAxB,EACpByB,iBAAAA,OAAmB,IAAHD,GAAQA,EACVE,EAAS1B,EAAvB,cACoB2B,EAAe3B,EAAnC,oBACA4B,EAAE5B,EAAF4B,GACeC,EAAU7B,EAAzB,eAII8B,EAAWC,IACXC,EAAYC,EAAYhC,EAAK6B,GAE7BI,EAAeC,GAAY,YAC3BvB,GAAaS,IACbS,EAASM,UACXN,EAASM,QAAQjB,SAAU,GAEzBD,GACFA,EAAS,MAEZ,GAAE,CAACA,EAAUY,EAAUlB,EAAUS,IAE5BgB,EAAeC,GAAQ,WAC3B,YAAgBC,IAAZpB,EACK,CAAEA,QAAAA,GAEJ,CAAEH,eAAAA,EACX,GAAG,CAACG,EAASH,IAIb,OACEwB,EAACC,cAAAC,EAAQ,CAAAC,QAHY/B,EAAWE,EAAiB,MAI/C0B,EACeC,cAAA,QAAA,CAAA,cAAAZ,GAAce,EAAUC,EAAuBC,aAAclB,GAC/D,YAAAmB,EAAgBD,aAC3B5C,UAAW8C,EAAGC,EAAOC,YAAahD,EAASiD,EAAAA,EAAA,CAAA,EACxCF,EAAOrC,SAAWA,GAAQ,WACjBA,KAGZ4B,EAAAC,cAAA,OAAA,CAAMvC,UAAW8C,EAAGC,EAAOG,iBACzBZ,EAAAC,cAAA,QAAAY,OAAAC,OAAA,CACEpD,UAAW8C,EAAGC,EAAOM,OACrBC,KAAK,QACLlD,MAAOA,EACPE,KAAMA,EACNK,UAAWA,EACXD,SAAUA,GACNyB,EACQ,CAAA,aAAAX,qBACMC,EAClB8B,SAAUvC,EACVjB,IAAK+B,KAEPQ,EAAAC,cAAA,OAAA,CAAA,cACeG,EAAUC,EAAuBa,qBAAsB9B,GACpE1B,UAAW8C,EAAGC,EAAOU,QAASjD,EAAoByC,KAC/CF,EAAOW,gBAAkBnC,OAI/BrB,GACCoC,EAACC,cAAAoB,EACC,CAAAC,QAAQ,OACRN,KAAK,QACLtD,UAAWO,EACE,cAAAmC,EAAUC,EAAuBkB,mBAAoBnC,IAEjExB,GAGJa,GACCuB,EAAAC,cAACuB,EAAU,CAAAC,QAAS/B,EAAcgC,SAAU3C,GACzCN,IAMb"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={radioButton:"radioButton",inputContainer:"inputContainer",input:"input",control:"control",labelAnimation:"labelAnimation",radioCheckedAnimation:"radioCheckedAnimation",disabled:"disabled",label:"label"};!function(n){const o="s_id-f0fb17b54d8d_4_5_7";if("undefined"!=typeof document){const e=document.head||document.getElementsByTagName("head")[0];if(e.querySelector("#"+o))return;const i=document.createElement("style");i.id=o,e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i),i.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[o]=n)}("/* stylelint-disable unit-disallowed-list */\n.radioButton {\n display: grid;\n grid-template-columns: 1.5em auto;\n grid-gap: 0.5em;\n cursor: pointer;\n}\n.inputContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.input {\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n}\n.control {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n border: 0.1em solid;\n box-sizing: border-box;\n border-color: var(--ui-border-color);\n border-radius: 50%;\n transition: border-width var(--motion-productive-medium) var(--motion-timing-enter);\n background-color: var(--secondary-background-color);\n}\ninput:checked + .control {\n border-color: var(--primary-color);\n border-width: 0.3em;\n}\ninput:checked + .labelAnimation {\n animation-name: radioCheckedAnimation;\n animation-duration: var(--motion-productive-medium);\n animation-timing-function: var(--motion-timing-enter);\n animation-fill-mode: forwards;\n}\ninput:disabled + .control {\n border: 0.5em solid;\n border-color: var(--disabled-background-color);\n border-radius: 50%;\n}\ninput:checked:disabled + .control {\n border: 0.3em solid;\n border-color: var(--disabled-background-color);\n background-color: var(--secondary-text-color);\n}\n.radioButton.disabled {\n cursor: not-allowed;\n}\n.radioButton.disabled .label {\n color: var(--disabled-text-color);\n}\n.inputContainer input:focus-visible + .control {\n outline: none;\n border-color: var(--primary-color);\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5);\n border-radius: 50%;\n}\n.radioButton:hover .inputContainer input:enabled:checked + .control {\n border-color: var(--primary-hover-color);\n}\n.radioButton:hover .inputContainer input:enabled:not(:checked) + .control,\n.radioButton:focus-within .inputContainer input:enabled:not(:checked) + .control {\n border-color: var(--primary-text-color);\n}\n@keyframes radioCheckedAnimation {\n 0% {\n height: 1em;\n width: 1em;\n }\n 50% {\n height: 0.8em;\n width: 0.8em;\n }\n 100% {\n height: 1em;\n width: 1em;\n }\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=RadioButton.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/hooks/useAfterFirstRender/index.ts"],"sourcesContent":["import { type RefObject, useEffect, useRef } from \"react\";\n\nexport default function useAfterFirstRender(): RefObject<boolean> {\n const isAfterFirstRender = useRef(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n isAfterFirstRender.current = true;\n }, 0);\n return () => clearTimeout(timer);\n }, []);\n\n return isAfterFirstRender;\n}\n"],"names":["useAfterFirstRender","isAfterFirstRender","useRef","useEffect","timer","setTimeout","current","clearTimeout"],"mappings":"8CAEc,SAAUA,IACtB,IAAMC,EAAqBC,GAAO,GASlC,OAPAC,GAAU,WACR,IAAMC,EAAQC,YAAW,WACvBJ,EAAmBK,SAAU,CAC9B,GAAE,GACH,OAAO,WAAA,OAAMC,aAAaH,EAAM,CACjC,GAAE,IAEIH,CACT"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{camelCase as i}from"es-toolkit";import{getTestId as o,ComponentDefaultTestId as r}from"../../tests/testIds.js";import a from"classnames";import n,{useState as s,useRef as d,useCallback as l,useEffect as c,useMemo as m}from"react";import{SwitchTransition as u,CSSTransition as f}from"react-transition-group";import v from"../../hooks/useAfterFirstRender/index.js";import p from"./Counter.module.scss.js";import{ComponentVibeId as E}from"../../tests/constants.js";import{useEventListener as b}from"../../../shared/dist/hooks/useEventListener.js";import{getStyle as x}from"../../../shared/dist/utils/typesciptCssModulesHelper.js";import{NOOP as N}from"../../../shared/dist/utils/function-utils.js";var h=function(h){var j=h.className,A=h.counterClassName,k=h.count,y=void 0===k?0:k,g=h.size,C=void 0===g?"large":g,M=h.kind,R=void 0===M?"fill":M,w=h.color,T=void 0===w?"primary":w,D=h.maxDigits,L=void 0===D?3:D,O=h["aria-labelledby"],U=void 0===O?"":O,z=h["aria-label"],H=void 0===z?"":z,P=h.id,_=void 0===P?"":P,B=h.prefix,F=void 0===B?"":B,I=h.onMouseDown,q=void 0===I?N:I,G=h.noAnimation,J=void 0!==G&&G,K=h["data-testid"],Q=s(!1),S=e(Q,2),V=S[0],W=S[1],X=d(null),Y=d(null),Z=l((function(){W(!0)}),[W]),$=l((function(){W(!1)}),[W]);b({eventName:"animationend",callback:$,ref:X});var ee=v();c((function(){ee.current&&Z()}),[y,ee,Z]),c((function(){L>0||console.error("Max digits must be a positive number")}),[L]);var te=m((function(){return a(p.counter,x(p,i("size-"+C)),x(p,i("kind-"+R)),x(p,i("color-"+T)),t({},p.withAnimation,V),A)}),[C,R,T,V,A]),ie="counter"+(_?"-".concat(_):""),oe=(null==y?void 0:(""+y).length)>L?"".concat(Math.pow(10,L)-1,"+"):y+"",re=n.createElement("span",{id:ie,"data-testid":K||o(r.COUNTER,_)},F+oe);return n.createElement("span",{className:j,"aria-label":"".concat(H," ").concat(oe),"aria-labelledby":U,onMouseDown:q,"data-vibe":E.COUNTER},n.createElement("div",{className:te,"aria-label":oe,ref:X},J?re:n.createElement(u,{mode:"out-in"},n.createElement(f,{key:oe,nodeRef:Y,classNames:{enter:p.fadeEnter,enterActive:p.fadeEnterActive,exit:p.fadeExit,exitActive:p.fadeExitActive},addEndListener:function(e){var t;null===(t=Y.current)||void 0===t||t.addEventListener("transitionend",e,!1)}},n.createElement("span",{ref:Y,id:ie,"data-testid":K||o(r.COUNTER,_)},F+oe)))))};export{h as default};
|
|
2
|
-
//# sourceMappingURL=Counter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Counter.js","sources":["../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { getStyle, NOOP } from \"@vibe/shared\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { CSSTransition, SwitchTransition } from \"react-transition-group\";\nimport useEventListener from \"../../hooks/useEventListener\";\nimport useAfterFirstRender from \"../../hooks/useAfterFirstRender\";\n\nimport { type CounterColor, type CounterSize, type CounterType } from \"./Counter.types\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Counter.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface CounterProps extends VibeComponentProps {\n /**\n * The ID of the element describing the counter.\n */\n \"aria-labelledby\"?: string;\n /**\n * Class name applied to the counter element.\n */\n counterClassName?: string;\n /**\n * The numeric value displayed in the counter.\n */\n count?: number;\n /**\n * The label of the counter for accessibility.\n */\n \"aria-label\"?: string;\n /**\n * The size of the counter.\n */\n size?: CounterSize;\n /**\n * The visual style of the counter.\n */\n kind?: CounterType;\n /**\n * The color of the counter.\n */\n color?: CounterColor;\n /**\n * The maximum number of digits displayed before truncation.\n */\n maxDigits?: number;\n /**\n * Text prepended to the counter value.\n */\n prefix?: string;\n /**\n * Callback fired when the counter is clicked.\n */\n onMouseDown?: (event: React.MouseEvent<HTMLSpanElement>) => void;\n /**\n * If true, disables counter animations.\n */\n noAnimation?: boolean;\n}\n\nconst Counter = ({\n className,\n counterClassName,\n count = 0,\n size = \"large\",\n kind = \"fill\",\n color = \"primary\",\n maxDigits = 3,\n \"aria-labelledby\": ariaLabelledBy = \"\",\n \"aria-label\": ariaLabel = \"\",\n id = \"\",\n prefix = \"\",\n onMouseDown = NOOP,\n noAnimation = false,\n \"data-testid\": dataTestId\n}: CounterProps) => {\n const [countChangeAnimationState, setCountChangeAnimationState] = useState(false);\n\n const ref = useRef<HTMLDivElement>(null);\n const nodeRef = useRef<HTMLSpanElement>(null);\n\n const setCountChangedAnimationActive = useCallback(() => {\n setCountChangeAnimationState(true);\n }, [setCountChangeAnimationState]);\n\n const setCountChangedAnimationNotActive = useCallback(() => {\n setCountChangeAnimationState(false);\n }, [setCountChangeAnimationState]);\n\n useEventListener({\n eventName: \"animationend\",\n callback: setCountChangedAnimationNotActive,\n ref\n });\n\n const isAfterFirstRender = useAfterFirstRender();\n\n useEffect(() => {\n if (isAfterFirstRender.current) {\n setCountChangedAnimationActive();\n }\n }, [count, isAfterFirstRender, setCountChangedAnimationActive]);\n\n useEffect(() => {\n if (maxDigits <= 0) {\n console.error(\"Max digits must be a positive number\");\n }\n }, [maxDigits]);\n\n const classNames = useMemo(() => {\n return cx(\n styles.counter,\n getStyle(styles, camelCase(\"size-\" + size)),\n getStyle(styles, camelCase(\"kind-\" + kind)),\n getStyle(styles, camelCase(\"color-\" + color)),\n {\n [styles.withAnimation]: countChangeAnimationState\n },\n counterClassName\n );\n }, [size, kind, color, countChangeAnimationState, counterClassName]);\n\n const counterId = \"counter\" + (id ? `-${id}` : \"\");\n const countText = count?.toString().length > maxDigits ? `${10 ** maxDigits - 1}+` : String(count);\n const counter = (\n <span id={counterId} data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}>\n {prefix + countText}\n </span>\n );\n\n return (\n <span\n className={className}\n aria-label={`${ariaLabel} ${countText}`}\n aria-labelledby={ariaLabelledBy}\n onMouseDown={onMouseDown}\n data-vibe={ComponentVibeId.COUNTER}\n >\n <div className={classNames} aria-label={countText} ref={ref}>\n {noAnimation ? (\n counter\n ) : (\n <SwitchTransition mode=\"out-in\">\n <CSSTransition\n key={countText}\n nodeRef={nodeRef}\n classNames={{\n enter: styles.fadeEnter,\n enterActive: styles.fadeEnterActive,\n exit: styles.fadeExit,\n exitActive: styles.fadeExitActive\n }}\n addEndListener={done => {\n nodeRef.current?.addEventListener(\"transitionend\", done, false);\n }}\n >\n <span\n ref={nodeRef}\n id={counterId}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}\n >\n {prefix + countText}\n </span>\n </CSSTransition>\n </SwitchTransition>\n )}\n </div>\n </span>\n );\n};\n\nexport default Counter;\n"],"names":["Counter","_ref","className","counterClassName","_ref$count","count","_ref$size","size","_ref$kind","kind","_ref$color","color","_ref$maxDigits","maxDigits","_ref$ariaLabelledby","ariaLabelledBy","_ref$ariaLabel","ariaLabel","_ref$id","id","_ref$prefix","prefix","_ref$onMouseDown","onMouseDown","NOOP","_ref$noAnimation","noAnimation","dataTestId","_useState","useState","_useState2","_slicedToArray","countChangeAnimationState","setCountChangeAnimationState","ref","useRef","nodeRef","setCountChangedAnimationActive","useCallback","setCountChangedAnimationNotActive","useEventListener","eventName","callback","isAfterFirstRender","useAfterFirstRender","useEffect","current","console","error","classNames","useMemo","cx","styles","counter","getStyle","camelCase","_defineProperty","withAnimation","counterId","concat","countText","length","Math","pow","String","React","createElement","getTestId","ComponentDefaultTestId","COUNTER","ComponentVibeId","SwitchTransition","mode","CSSTransition","key","enter","fadeEnter","enterActive","fadeEnterActive","exit","fadeExit","exitActive","fadeExitActive","addEndListener","done","_a","addEventListener"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={counter:"counter_75bdeea958",withAnimation:"withAnimation_28c6e8a578",counterPopElastic:"counterPopElastic_9c781a661c",sizeXs:"sizeXs_7e1d1fecef",sizeSmall:"sizeSmall_aab9dad177",sizeLarge:"sizeLarge_20fb45c2b5",kindFill:"kindFill_a1373d0bad",colorPrimary:"colorPrimary_cf3a43007e",colorDark:"colorDark_2eb6c543a1",colorNegative:"colorNegative_abd5ea0c48",colorLight:"colorLight_b9f19f3d24",kindLine:"kindLine_ff0cdee2e1",fadeEnter:"fadeEnter_ea2e1ee130",fadeEnterActive:"fadeEnterActive_6cd1723c92",fadeExit:"fadeExit_4da6bf5216",fadeExitActive:"fadeExitActive_ab7a8dc3d2","counter-pop-elastic":"counter-pop-elastic_2dce59163f"};!function(n){const o="s_id-b4f9c23ba3ce_4_5_7";if("undefined"!=typeof document){const e=document.head||document.getElementsByTagName("head")[0];if(e.querySelector("#"+o))return;const t=document.createElement("style");t.id=o,e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t),t.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[o]=n)}("/* stylelint-disable */\n/* stylelint-enable */\n.counter_75bdeea958 {\n display: inline-flex;\n justify-content: center;\n border-radius: 30px;\n overflow: hidden;\n transform-origin: center;\n}\n@keyframes counter-pop-elastic_2dce59163f {\n 0% {\n transform: scale(1);\n }\n 33% {\n transform: scale(1.2);\n }\n 66% {\n transform: scale(0.9);\n }\n 100% {\n transform: scale(1);\n }\n}\n.withAnimation_28c6e8a578 {\n animation: counterPopElastic_9c781a661c var(--motion-expressive-short);\n}\n.sizeXs_7e1d1fecef {\n font: var(--font-text3-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeSmall_aab9dad177 {\n font: var(--font-text2-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeLarge_20fb45c2b5 {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n font: var(--font-text2-normal);\n min-width: 24px;\n padding: 2px var(--space-8);\n}\n.kindFill_a1373d0bad.colorPrimary_cf3a43007e {\n color: var(--fixed-light-color);\n background-color: var(--primary-color);\n}\n.kindFill_a1373d0bad.colorDark_2eb6c543a1 {\n color: var(--text-color-on-inverted);\n background-color: var(--inverted-color-background);\n}\n.kindFill_a1373d0bad.colorNegative_abd5ea0c48 {\n color: var(--fixed-light-color);\n background-color: var(--negative-color);\n}\n.kindFill_a1373d0bad.colorLight_b9f19f3d24 {\n color: var(--primary-text-color);\n background-color: var(--ui-background-color);\n}\n.kindLine_ff0cdee2e1 {\n box-shadow: 0 0 0 1px currentColor inset;\n}\n.kindLine_ff0cdee2e1.colorPrimary_cf3a43007e {\n color: var(--primary-color);\n}\n.kindLine_ff0cdee2e1.colorDark_2eb6c543a1 {\n color: var(--inverted-color-background);\n}\n.kindLine_ff0cdee2e1.colorNegative_abd5ea0c48 {\n color: var(--negative-color);\n}\n.kindLine_ff0cdee2e1.colorLight_b9f19f3d24 {\n color: var(--primary-text-color);\n box-shadow: 0 0 0 1px var(--ui-background-color) inset !important;\n}\n/* New number enters */\n.fadeEnter_ea2e1ee130 {\n opacity: 0;\n transform: translateY(15px);\n}\n.fadeEnterActive_6cd1723c92 {\n position: relative;\n opacity: 1;\n transition: transform var(--motion-productive-long) var(--motion-timing-enter), opacity var(--motion-productive-short);\n transform: translateY(0);\n}\n/* Old number exits */\n.fadeExit_4da6bf5216 {\n position: relative;\n opacity: 1;\n transform: translateY(0);\n}\n.fadeExitActive_ab7a8dc3d2 {\n position: relative;\n opacity: 0;\n transform: translateY(-15px);\n transition: transform var(--motion-productive-long) var(--motion-timing-exit), opacity var(--motion-productive-short);\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=Counter.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Counter.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"classnames";import a,{forwardRef as o,useRef as i,useCallback as s,useMemo as l}from"react";import{getTestId as n,ComponentDefaultTestId as r}from"../../tests/testIds.js";import d from"./RadioButton.module.scss.js";import{ComponentVibeId as c}from"../../tests/constants.js";import m from"../../../components/tooltip/dist/Tooltip/Tooltip.js";import p from"../../../components/typography/dist/Text/Text.js";import u from"../../../components/clickable/dist/Clickable/Clickable.js";import{useMergeRef as b}from"../../../shared/dist/hooks/useMergeRef.js";var f=o((function(o,f){var v=o.className,T=o.text,N=void 0===T?"":T,h=o.value,C=void 0===h?"":h,k=o.name,O=void 0===k?"":k,j=o.labelClassName,B=o.radioButtonClassName,E=o.disabled,R=void 0!==E&&E,_=o.autoFocus,x=o.disabledReason,y=o.defaultChecked,A=void 0!==y&&y,I=o.children,g=o.onSelect,D=o.checked,L=o.retainChildClick,U=void 0===L||L,F=o.childrenTabIndex,P=void 0===F?0:F,H=o.noLabelAnimation,M=void 0!==H&&H,S=o["aria-label"],q=o["aria-describedby"],w=o.id,z=o["data-testid"],G=i(),J=b(f,G),K=s((function(){!R&&U&&(G.current&&(G.current.checked=!0),g&&g(null))}),[g,G,R,U]),Q=l((function(){return void 0!==D?{checked:D}:{defaultChecked:A}}),[D,A]);return a.createElement(m,{content:R?x:null},a.createElement("label",{"data-testid":z||n(r.RADIO_BUTTON,w),"data-vibe":c.RADIO_BUTTON,className:t(d.radioButton,v,e(e({},d.disabled,R),"disabled",R))},a.createElement("span",{className:t(d.inputContainer)},a.createElement("input",Object.assign({className:t(d.input),type:"radio",value:C,name:O,autoFocus:_,disabled:R},Q,{"aria-label":S,"aria-describedby":q,onChange:g,ref:J})),a.createElement("span",{"data-testid":n(r.RADIO_BUTTON_CONTROL,w),className:t(d.control,B,e({},d.labelAnimation,!M))})),N&&a.createElement(p,{element:"span",type:"text2",className:j,"data-testid":n(r.RADIO_BUTTON_LABEL,w)},N),I&&a.createElement(u,{onClick:K,tabIndex:P},I)))}));export{f as default};
|
|
2
|
-
//# sourceMappingURL=RadioButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sources":["../../../../src/components/RadioButton/RadioButton.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { forwardRef, useCallback, useMemo, useRef } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { Clickable } from \"@vibe/clickable\";\nimport { Text } from \"@vibe/typography\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./RadioButton.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface RadioButtonProps extends VibeComponentProps {\n /**\n * Class name applied to the label text.\n */\n labelClassName?: string;\n /**\n * Class name applied to the radio button element.\n */\n radioButtonClassName?: string;\n /**\n * The label text displayed next to the radio button.\n */\n text?: string;\n /**\n * The value associated with the radio button.\n */\n value?: string;\n /**\n * The name of the radio button group.\n */\n name?: string;\n /**\n * If true, the radio button automatically receives focus on mount.\n */\n autoFocus?: boolean;\n /**\n * If true, the radio button is disabled.\n */\n disabled?: boolean;\n /**\n * The reason why the radio button is disabled, displayed in a tooltip.\n */\n disabledReason?: string;\n /**\n * If true, the radio button is checked by default.\n */\n defaultChecked?: boolean;\n /**\n * The child elements inside the radio button.\n */\n children?: React.ReactNode;\n /**\n * Callback fired when the radio button selection changes.\n */\n onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;\n /**\n * If provided, controls the checked state of the radio button.\n */\n checked?: boolean;\n /**\n * If true, clicking on children will trigger selection.\n */\n retainChildClick?: boolean;\n /**\n * The tab index applied to the children.\n */\n childrenTabIndex?: number;\n /**\n * If true, disables the label animation.\n */\n noLabelAnimation?: boolean;\n /**\n * ARIA label for accessibility when no text is provided.\n */\n \"aria-label\"?: string;\n /**\n * ID of element that describe this radio button.\n */\n \"aria-describedby\"?: string;\n}\n\nconst RadioButton = forwardRef(\n (\n {\n className,\n text = \"\",\n value = \"\",\n name = \"\",\n labelClassName,\n radioButtonClassName,\n disabled = false,\n autoFocus,\n disabledReason,\n defaultChecked = false,\n children,\n onSelect,\n checked,\n retainChildClick = true,\n childrenTabIndex = 0,\n noLabelAnimation = false,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n id,\n \"data-testid\": dataTestId\n }: RadioButtonProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const inputRef = useRef<HTMLInputElement | null>();\n const mergedRef = useMergeRef(ref, inputRef);\n\n const onChildClick = useCallback(() => {\n if (disabled || !retainChildClick) return;\n if (inputRef.current) {\n inputRef.current.checked = true;\n }\n if (onSelect) {\n onSelect(null);\n }\n }, [onSelect, inputRef, disabled, retainChildClick]);\n\n const checkedProps = useMemo(() => {\n if (checked !== undefined) {\n return { checked };\n }\n return { defaultChecked };\n }, [checked, defaultChecked]);\n\n const tooltipContent = disabled ? disabledReason : null;\n\n return (\n <Tooltip content={tooltipContent}>\n <label\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.RADIO_BUTTON, id)}\n data-vibe={ComponentVibeId.RADIO_BUTTON}\n className={cx(styles.radioButton, className, {\n [styles.disabled]: disabled,\n disabled: disabled\n })}\n >\n <span className={cx(styles.inputContainer)}>\n <input\n className={cx(styles.input)}\n type=\"radio\"\n value={value}\n name={name}\n autoFocus={autoFocus}\n disabled={disabled}\n {...checkedProps}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n onChange={onSelect}\n ref={mergedRef}\n />\n <span\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_CONTROL, id)}\n className={cx(styles.control, radioButtonClassName, {\n [styles.labelAnimation]: !noLabelAnimation\n })}\n />\n </span>\n {text && (\n <Text\n element=\"span\"\n type=\"text2\"\n className={labelClassName}\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_LABEL, id)}\n >\n {text}\n </Text>\n )}\n {children && (\n <Clickable onClick={onChildClick} tabIndex={childrenTabIndex}>\n {children}\n </Clickable>\n )}\n </label>\n </Tooltip>\n );\n }\n);\n\nexport default RadioButton;\n"],"names":["RadioButton","forwardRef","_ref","ref","className","_ref$text","text","_ref$value","value","_ref$name","name","labelClassName","radioButtonClassName","_ref$disabled","disabled","autoFocus","disabledReason","_ref$defaultChecked","defaultChecked","children","onSelect","checked","_ref$retainChildClick","retainChildClick","_ref$childrenTabIndex","childrenTabIndex","_ref$noLabelAnimation","noLabelAnimation","ariaLabel","ariaDescribedby","id","dataTestId","inputRef","useRef","mergedRef","useMergeRef","onChildClick","useCallback","current","checkedProps","useMemo","undefined","React","createElement","Tooltip","content","getTestId","ComponentDefaultTestId","RADIO_BUTTON","ComponentVibeId","cx","styles","radioButton","_defineProperty","inputContainer","Object","assign","input","type","onChange","RADIO_BUTTON_CONTROL","control","labelAnimation","Text","element","RADIO_BUTTON_LABEL","Clickable","onClick","tabIndex"],"mappings":"ooBAkFMA,IAAAA,EAAcC,GAClB,SAAAC,EAuBEC,GACE,IAtBAC,EAASF,EAATE,UAASC,EAAAH,EACTI,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EAAAE,EAAAL,EACTM,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EAAAE,EAAAP,EACVQ,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAcT,EAAdS,eACAC,EAAoBV,EAApBU,qBAAoBC,EAAAX,EACpBY,SAAAA,OAAW,IAAHD,GAAQA,EAChBE,EAASb,EAATa,UACAC,EAAcd,EAAdc,eAAcC,EAAAf,EACdgB,eAAAA,OAAiB,IAAHD,GAAQA,EACtBE,EAAQjB,EAARiB,SACAC,EAAQlB,EAARkB,SACAC,EAAOnB,EAAPmB,QAAOC,EAAApB,EACPqB,iBAAAA,OAAmB,IAAHD,GAAOA,EAAAE,EAAAtB,EACvBuB,iBAAAA,OAAmB,IAAHD,EAAG,EAACA,EAAAE,EAAAxB,EACpByB,iBAAAA,OAAmB,IAAHD,GAAQA,EACVE,EAAS1B,EAAvB,cACoB2B,EAAe3B,EAAnC,oBACA4B,EAAE5B,EAAF4B,GACeC,EAAU7B,EAAzB,eAII8B,EAAWC,IACXC,EAAYC,EAAYhC,EAAK6B,GAE7BI,EAAeC,GAAY,YAC3BvB,GAAaS,IACbS,EAASM,UACXN,EAASM,QAAQjB,SAAU,GAEzBD,GACFA,EAAS,MAEZ,GAAE,CAACA,EAAUY,EAAUlB,EAAUS,IAE5BgB,EAAeC,GAAQ,WAC3B,YAAgBC,IAAZpB,EACK,CAAEA,QAAAA,GAEJ,CAAEH,eAAAA,EACX,GAAG,CAACG,EAASH,IAIb,OACEwB,EAACC,cAAAC,EAAQ,CAAAC,QAHY/B,EAAWE,EAAiB,MAI/C0B,EACeC,cAAA,QAAA,CAAA,cAAAZ,GAAce,EAAUC,EAAuBC,aAAclB,GAC/D,YAAAmB,EAAgBD,aAC3B5C,UAAW8C,EAAGC,EAAOC,YAAahD,EAASiD,EAAAA,EAAA,CAAA,EACxCF,EAAOrC,SAAWA,GAAQ,WACjBA,KAGZ4B,EAAAC,cAAA,OAAA,CAAMvC,UAAW8C,EAAGC,EAAOG,iBACzBZ,EAAAC,cAAA,QAAAY,OAAAC,OAAA,CACEpD,UAAW8C,EAAGC,EAAOM,OACrBC,KAAK,QACLlD,MAAOA,EACPE,KAAMA,EACNK,UAAWA,EACXD,SAAUA,GACNyB,EACQ,CAAA,aAAAX,qBACMC,EAClB8B,SAAUvC,EACVjB,IAAK+B,KAEPQ,EAAAC,cAAA,OAAA,CAAA,cACeG,EAAUC,EAAuBa,qBAAsB9B,GACpE1B,UAAW8C,EAAGC,EAAOU,QAASjD,EAAoByC,KAC/CF,EAAOW,gBAAkBnC,OAI/BrB,GACCoC,EAACC,cAAAoB,EACC,CAAAC,QAAQ,OACRN,KAAK,QACLtD,UAAWO,EACE,cAAAmC,EAAUC,EAAuBkB,mBAAoBnC,IAEjExB,GAGJa,GACCuB,EAAAC,cAACuB,EAAU,CAAAC,QAAS/B,EAAcgC,SAAU3C,GACzCN,IAMb"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={radioButton:"radioButton_e8291bd6df",inputContainer:"inputContainer_faae611c0c",input:"input_a34ba40ef3",control:"control_ddb218a75a",labelAnimation:"labelAnimation_bb72252d3d",radioCheckedAnimation:"radioCheckedAnimation_b29f59a7a2",disabled:"disabled_e85bfc53c5",label:"label_fb6c047b6d"};!function(n){const e="s_id-f0fb17b54d8d_4_5_7";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+e))return;const d=document.createElement("style");d.id=e,o.firstChild?o.insertBefore(d,o.firstChild):o.appendChild(d),d.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}("/* stylelint-disable unit-disallowed-list */\n.radioButton_e8291bd6df {\n display: grid;\n grid-template-columns: 1.5em auto;\n grid-gap: 0.5em;\n cursor: pointer;\n}\n.inputContainer_faae611c0c {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.input_a34ba40ef3 {\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n}\n.control_ddb218a75a {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n border: 0.1em solid;\n box-sizing: border-box;\n border-color: var(--ui-border-color);\n border-radius: 50%;\n transition: border-width var(--motion-productive-medium) var(--motion-timing-enter);\n background-color: var(--secondary-background-color);\n}\ninput:checked + .control_ddb218a75a {\n border-color: var(--primary-color);\n border-width: 0.3em;\n}\ninput:checked + .labelAnimation_bb72252d3d {\n animation-name: radioCheckedAnimation_b29f59a7a2;\n animation-duration: var(--motion-productive-medium);\n animation-timing-function: var(--motion-timing-enter);\n animation-fill-mode: forwards;\n}\ninput:disabled + .control_ddb218a75a {\n border: 0.5em solid;\n border-color: var(--disabled-background-color);\n border-radius: 50%;\n}\ninput:checked:disabled + .control_ddb218a75a {\n border: 0.3em solid;\n border-color: var(--disabled-background-color);\n background-color: var(--secondary-text-color);\n}\n.radioButton_e8291bd6df.disabled_e85bfc53c5 {\n cursor: not-allowed;\n}\n.radioButton_e8291bd6df.disabled_e85bfc53c5 .label_fb6c047b6d {\n color: var(--disabled-text-color);\n}\n.inputContainer_faae611c0c input:focus-visible + .control_ddb218a75a {\n outline: none;\n border-color: var(--primary-color);\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5);\n border-radius: 50%;\n}\n.radioButton_e8291bd6df:hover .inputContainer_faae611c0c input:enabled:checked + .control_ddb218a75a {\n border-color: var(--primary-hover-color);\n}\n.radioButton_e8291bd6df:hover .inputContainer_faae611c0c input:enabled:not(:checked) + .control_ddb218a75a,\n.radioButton_e8291bd6df:focus-within .inputContainer_faae611c0c input:enabled:not(:checked) + .control_ddb218a75a {\n border-color: var(--primary-text-color);\n}\n@keyframes radioCheckedAnimation_b29f59a7a2 {\n 0% {\n height: 1em;\n width: 1em;\n }\n 50% {\n height: 0.8em;\n width: 0.8em;\n }\n 100% {\n height: 1em;\n width: 1em;\n }\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=RadioButton.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/hooks/useAfterFirstRender/index.ts"],"sourcesContent":["import { type RefObject, useEffect, useRef } from \"react\";\n\nexport default function useAfterFirstRender(): RefObject<boolean> {\n const isAfterFirstRender = useRef(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n isAfterFirstRender.current = true;\n }, 0);\n return () => clearTimeout(timer);\n }, []);\n\n return isAfterFirstRender;\n}\n"],"names":["useAfterFirstRender","isAfterFirstRender","useRef","useEffect","timer","setTimeout","current","clearTimeout"],"mappings":"8CAEc,SAAUA,IACtB,IAAMC,EAAqBC,GAAO,GASlC,OAPAC,GAAU,WACR,IAAMC,EAAQC,YAAW,WACvBJ,EAAmBK,SAAU,CAC9B,GAAE,GACH,OAAO,WAAA,OAAMC,aAAaH,EAAM,CACjC,GAAE,IAEIH,CACT"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|