@vibe/core 4.5.5 → 4.5.7
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/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/dist/components/checkbox/dist/Checkbox/Checkbox.js +2 -0
- package/dist/components/checkbox/dist/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/dist/Checkbox/Checkbox.module.scss.js +2 -0
- package/dist/components/checkbox/dist/Checkbox/hooks/useSupportFirefoxLabelClick.js +2 -0
- package/dist/components/checkbox/dist/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +1 -0
- package/dist/components/divider/dist/Divider/Divider.module.scss.js +1 -1
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.js +2 -0
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.js.map +1 -0
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.module.scss.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.js.map +1 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.module.scss.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumberHelpers.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumberHelpers.js.map +1 -0
- package/dist/components/formatted-number/dist/FormattedNumber/textManipulations.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/textManipulations.js.map +1 -0
- package/dist/components/index.d.ts +4 -4
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.js.map +1 -0
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.js.map +1 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBarHelpers.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBarHelpers.js.map +1 -0
- package/dist/metadata/components.json +11 -11
- package/dist/metadata.json +11 -11
- package/dist/mocked_classnames/components/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/dist/mocked_classnames/components/index.d.ts +4 -4
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Accordion/AccordionItem/AccordionItem.js +1 -1
- package/dist/mocked_classnames/src/components/Accordion/AccordionItem/AccordionItem.js.map +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.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.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/Counter/Counter.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/Label/Label.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Link/Link.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/RadioButton/RadioButton.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/Accordion/AccordionItem/AccordionItem.js +1 -1
- package/dist/src/components/Accordion/AccordionItem/AccordionItem.js.map +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.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.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/Counter/Counter.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/Label/Label.module.scss.js +1 -1
- package/dist/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/src/components/Link/Link.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/RadioButton/RadioButton.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 +6 -2
- package/dist/components/Checkbox/Checkbox.d.ts +0 -67
- package/dist/components/Checkbox/hooks/useSupportFirefoxLabelClick.d.ts +0 -6
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +0 -59
- package/dist/components/ExpandCollapse/ExpandCollapse.types.d.ts +0 -1
- package/dist/components/ExpandCollapse/index.d.ts +0 -1
- package/dist/components/FormattedNumber/FormattedNumber.d.ts +0 -38
- package/dist/components/FormattedNumber/FormattedNumberHelpers.d.ts +0 -4
- package/dist/components/FormattedNumber/index.d.ts +0 -1
- package/dist/components/ProgressBars/PercentageLabel/PercentageLabel.d.ts +0 -13
- package/dist/components/ProgressBars/ProgressBar/Bar/Bar.d.ts +0 -48
- package/dist/components/ProgressBars/ProgressBar/ProgressBar.d.ts +0 -69
- package/dist/components/ProgressBars/ProgressBar/ProgressBar.types.d.ts +0 -3
- package/dist/components/ProgressBars/ProgressBar/ProgressBarHelpers.d.ts +0 -4
- package/dist/components/ProgressBars/index.d.ts +0 -2
- package/dist/helpers/textManipulations.d.ts +0 -10
- package/dist/mocked_classnames/components/Checkbox/Checkbox.d.ts +0 -67
- package/dist/mocked_classnames/components/Checkbox/hooks/useSupportFirefoxLabelClick.d.ts +0 -6
- package/dist/mocked_classnames/components/Checkbox/index.d.ts +0 -1
- package/dist/mocked_classnames/components/ExpandCollapse/ExpandCollapse.d.ts +0 -59
- package/dist/mocked_classnames/components/ExpandCollapse/ExpandCollapse.types.d.ts +0 -1
- package/dist/mocked_classnames/components/ExpandCollapse/index.d.ts +0 -1
- package/dist/mocked_classnames/components/FormattedNumber/FormattedNumber.d.ts +0 -38
- package/dist/mocked_classnames/components/FormattedNumber/FormattedNumberHelpers.d.ts +0 -4
- package/dist/mocked_classnames/components/FormattedNumber/index.d.ts +0 -1
- package/dist/mocked_classnames/components/ProgressBars/PercentageLabel/PercentageLabel.d.ts +0 -13
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/Bar/Bar.d.ts +0 -48
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBar.d.ts +0 -69
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBar.types.d.ts +0 -3
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBarHelpers.d.ts +0 -4
- package/dist/mocked_classnames/components/ProgressBars/index.d.ts +0 -2
- package/dist/mocked_classnames/helpers/textManipulations.d.ts +0 -10
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js +0 -2
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js +0 -2
- package/dist/mocked_classnames/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +0 -1
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.js +0 -2
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.js.map +0 -1
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.js.map +0 -1
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumberHelpers.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumberHelpers.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js.map +0 -1
- package/dist/mocked_classnames/src/helpers/textManipulations.js +0 -2
- package/dist/mocked_classnames/src/helpers/textManipulations.js.map +0 -1
- package/dist/src/components/Checkbox/Checkbox.js +0 -2
- package/dist/src/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/src/components/Checkbox/Checkbox.module.scss.js +0 -2
- package/dist/src/components/Checkbox/Checkbox.module.scss.js.map +0 -1
- package/dist/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js +0 -2
- package/dist/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +0 -1
- package/dist/src/components/ExpandCollapse/ExpandCollapse.js +0 -2
- package/dist/src/components/ExpandCollapse/ExpandCollapse.js.map +0 -1
- package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +0 -2
- package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js.map +0 -1
- package/dist/src/components/FormattedNumber/FormattedNumber.js +0 -2
- package/dist/src/components/FormattedNumber/FormattedNumber.js.map +0 -1
- package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js +0 -2
- package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js.map +0 -1
- package/dist/src/components/FormattedNumber/FormattedNumberHelpers.js +0 -2
- package/dist/src/components/FormattedNumber/FormattedNumberHelpers.js.map +0 -1
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.js +0 -2
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.js.map +0 -1
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +0 -2
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js.map +0 -1
- package/dist/src/helpers/textManipulations.js +0 -2
- package/dist/src/helpers/textManipulations.js.map +0 -1
- /package/dist/{mocked_classnames/src/components → components/checkbox/dist}/Checkbox/Checkbox.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/expand-collapse/dist}/ExpandCollapse/ExpandCollapse.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/formatted-number/dist}/FormattedNumber/FormattedNumber.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/progress-bars/dist}/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/progress-bars/dist}/ProgressBars/ProgressBar/Bar/Bar.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/progress-bars/dist}/ProgressBars/ProgressBar/ProgressBar.module.scss.js.map +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React, { type FC, type ReactElement } from "react";
|
|
2
|
-
import { type VibeComponentProps, type ElementContent } from "../../types";
|
|
3
|
-
import { type ExpandCollapseIconPosition } from "./ExpandCollapse.types";
|
|
4
|
-
export interface ExpandCollapseProps extends VibeComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* Custom renderer for the header component.
|
|
7
|
-
*/
|
|
8
|
-
headerComponentRenderer?: () => ReactElement;
|
|
9
|
-
/**
|
|
10
|
-
* Class name applied to the header.
|
|
11
|
-
*/
|
|
12
|
-
headerClassName?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Class name applied to the content.
|
|
15
|
-
*/
|
|
16
|
-
contentClassName?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Class name applied to the root component.
|
|
19
|
-
*/
|
|
20
|
-
componentClassName?: string;
|
|
21
|
-
/**
|
|
22
|
-
* The title displayed in the header.
|
|
23
|
-
*/
|
|
24
|
-
title?: ElementContent;
|
|
25
|
-
/**
|
|
26
|
-
* The content inside the expandable section.
|
|
27
|
-
*/
|
|
28
|
-
children?: ElementContent;
|
|
29
|
-
/**
|
|
30
|
-
* The size of the expand/collapse icon.
|
|
31
|
-
*/
|
|
32
|
-
iconSize?: number | string;
|
|
33
|
-
/**
|
|
34
|
-
* The position of the icon.
|
|
35
|
-
*/
|
|
36
|
-
iconPosition?: ExpandCollapseIconPosition;
|
|
37
|
-
/**
|
|
38
|
-
* If true, the section is open by default when rendered.
|
|
39
|
-
*/
|
|
40
|
-
defaultOpenState?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Controls the open state of the section.
|
|
43
|
-
*/
|
|
44
|
-
open?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Callback fired when the header is clicked.
|
|
47
|
-
*/
|
|
48
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
49
|
-
/**
|
|
50
|
-
* If true, hides the border around the component.
|
|
51
|
-
*/
|
|
52
|
-
hideBorder?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* If true, captures the click event on the button.
|
|
55
|
-
*/
|
|
56
|
-
captureOnClick?: boolean;
|
|
57
|
-
}
|
|
58
|
-
declare const ExpandCollapse: FC<ExpandCollapseProps>;
|
|
59
|
-
export default ExpandCollapse;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ExpandCollapseIconPosition = "left" | "right";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ExpandCollapse, type ExpandCollapseProps } from "./ExpandCollapse";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type VibeComponentProps } from "../../types";
|
|
3
|
-
export interface FormattedNumberProps extends VibeComponentProps {
|
|
4
|
-
/**
|
|
5
|
-
* The numeric value to format.
|
|
6
|
-
*/
|
|
7
|
-
value?: number | string;
|
|
8
|
-
/**
|
|
9
|
-
* The text displayed before the number.
|
|
10
|
-
*/
|
|
11
|
-
prefix?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The text displayed after the number.
|
|
14
|
-
*/
|
|
15
|
-
suffix?: string;
|
|
16
|
-
/**
|
|
17
|
-
* The text displayed when no value is provided.
|
|
18
|
-
*/
|
|
19
|
-
emptyPlaceHolder?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The number of decimal places to display (0 ~ 20).
|
|
22
|
-
*/
|
|
23
|
-
decimalPrecision?: number;
|
|
24
|
-
/**
|
|
25
|
-
* If true, formats the number into a compact notation.
|
|
26
|
-
*/
|
|
27
|
-
compact?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* The locale used for formatting (Unicode BCP 47 locale identifier).
|
|
30
|
-
*/
|
|
31
|
-
local?: string;
|
|
32
|
-
/**
|
|
33
|
-
* If true, reverses the order of the prefix and suffix.
|
|
34
|
-
*/
|
|
35
|
-
rtl?: boolean;
|
|
36
|
-
}
|
|
37
|
-
declare const FormattedNumber: React.ForwardRefExoticComponent<FormattedNumberProps & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
-
export default FormattedNumber;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as FormattedNumber, type FormattedNumberProps } from "./FormattedNumber";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type FC } from "react";
|
|
2
|
-
export interface PercentageLabelProps {
|
|
3
|
-
/**
|
|
4
|
-
* The ID of the element this label is associated with.
|
|
5
|
-
*/
|
|
6
|
-
forElement: string;
|
|
7
|
-
/**
|
|
8
|
-
* The percentage value to display.
|
|
9
|
-
*/
|
|
10
|
-
value: number;
|
|
11
|
-
}
|
|
12
|
-
declare const PercentageLabel: FC<PercentageLabelProps>;
|
|
13
|
-
export default PercentageLabel;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { type FC } from "react";
|
|
2
|
-
import { type VibeComponentProps } from "../../../../types";
|
|
3
|
-
import { type ProgressBarStyle } from "../ProgressBar.types";
|
|
4
|
-
export type BarType = "primary" | "secondary";
|
|
5
|
-
export interface BarProps extends VibeComponentProps {
|
|
6
|
-
/**
|
|
7
|
-
* Determines the visual style of the progress bar.
|
|
8
|
-
*/
|
|
9
|
-
barStyle?: ProgressBarStyle;
|
|
10
|
-
/**
|
|
11
|
-
* The minimum value of the progress bar.
|
|
12
|
-
*/
|
|
13
|
-
min?: number;
|
|
14
|
-
/**
|
|
15
|
-
* The maximum value of the progress bar.
|
|
16
|
-
*/
|
|
17
|
-
max?: number;
|
|
18
|
-
/**
|
|
19
|
-
* The current progress value.
|
|
20
|
-
*/
|
|
21
|
-
value?: number;
|
|
22
|
-
/**
|
|
23
|
-
* If true, enables animation effects.
|
|
24
|
-
*/
|
|
25
|
-
animated?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Base class name for the bar.
|
|
28
|
-
*/
|
|
29
|
-
baseClass?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The ARIA label describing the progress bar.
|
|
32
|
-
*/
|
|
33
|
-
barLabelName?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Custom color for the progress bar.
|
|
36
|
-
*/
|
|
37
|
-
color?: string;
|
|
38
|
-
/**
|
|
39
|
-
* The type of the bar.
|
|
40
|
-
*/
|
|
41
|
-
type?: BarType;
|
|
42
|
-
/**
|
|
43
|
-
* If true, allows displaying percentage values higher than 100% when value exceeds max.
|
|
44
|
-
*/
|
|
45
|
-
allowExceedingMax?: boolean;
|
|
46
|
-
}
|
|
47
|
-
declare const Bar: FC<BarProps>;
|
|
48
|
-
export default Bar;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type ProgressBarSize, type ProgressBarStyle } from "./ProgressBar.types";
|
|
3
|
-
import { type VibeComponentProps } from "../../../types";
|
|
4
|
-
export interface ProgressBarProps extends VibeComponentProps {
|
|
5
|
-
/**
|
|
6
|
-
* Determines the visual style of the progress bar.
|
|
7
|
-
*/
|
|
8
|
-
barStyle?: ProgressBarStyle;
|
|
9
|
-
/**
|
|
10
|
-
* The minimum value of the progress bar.
|
|
11
|
-
*/
|
|
12
|
-
min?: number;
|
|
13
|
-
/**
|
|
14
|
-
* The maximum value of the progress bar.
|
|
15
|
-
*/
|
|
16
|
-
max?: number;
|
|
17
|
-
/**
|
|
18
|
-
* The current progress value.
|
|
19
|
-
*/
|
|
20
|
-
value?: number;
|
|
21
|
-
/**
|
|
22
|
-
* The secondary progress value.
|
|
23
|
-
*/
|
|
24
|
-
valueSecondary?: number;
|
|
25
|
-
/**
|
|
26
|
-
* If true, enables animation effects.
|
|
27
|
-
*/
|
|
28
|
-
animated?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The size of the progress bar.
|
|
31
|
-
*/
|
|
32
|
-
size?: ProgressBarSize;
|
|
33
|
-
/**
|
|
34
|
-
* If true, displays the progress percentage.
|
|
35
|
-
*/
|
|
36
|
-
indicateProgress?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* If true, enables multiple progress bars.
|
|
39
|
-
* **Note:** `value`, `valueSecondary`, and `barStyle` will not be used.
|
|
40
|
-
*/
|
|
41
|
-
multi?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* An array of bar values and colors for multi-bar mode.
|
|
44
|
-
*/
|
|
45
|
-
multiValues?: {
|
|
46
|
-
/**
|
|
47
|
-
* The progress value for a bar.
|
|
48
|
-
*/
|
|
49
|
-
value?: number;
|
|
50
|
-
/**
|
|
51
|
-
* The bar color in hex format (`#000000` - `#ffffff`).
|
|
52
|
-
*/
|
|
53
|
-
color?: string;
|
|
54
|
-
}[];
|
|
55
|
-
/**
|
|
56
|
-
* The ARIA label for the progress bar.
|
|
57
|
-
*/
|
|
58
|
-
"aria-label"?: string;
|
|
59
|
-
/**
|
|
60
|
-
* If true, makes the progress bar span the full container width.
|
|
61
|
-
*/
|
|
62
|
-
fullWidth?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* If true, allows displaying percentage values higher than 100% when value exceeds max.
|
|
65
|
-
*/
|
|
66
|
-
allowExceedingMax?: boolean;
|
|
67
|
-
}
|
|
68
|
-
declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
-
export default ProgressBar;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type SIZES } from "./../../../constants/sizes";
|
|
2
|
-
export type Size = (typeof SIZES)[keyof typeof SIZES];
|
|
3
|
-
export declare const calculatePercentage: (value: number, min: number, max: number, allowExceeding?: boolean) => number;
|
|
4
|
-
export declare const getProgressBarClassNames: (value: number) => string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const formatNumberConsts: Readonly<{
|
|
2
|
-
MIN_PRECISION: 0;
|
|
3
|
-
MAX_PRECISION: 20;
|
|
4
|
-
DEFAULT_LOCAL: "en-US";
|
|
5
|
-
}>;
|
|
6
|
-
export declare function formatNumber(value: number, { local, isCompact, precision }?: {
|
|
7
|
-
local?: Intl.Locale["language"];
|
|
8
|
-
isCompact?: boolean;
|
|
9
|
-
precision?: number;
|
|
10
|
-
}): string;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e,{forwardRef as a,useRef as t,useCallback as o,useEffect as l,useMemo as n}from"react";import i from"classnames";import{isNil as r,noop as s}from"es-toolkit";import{Icon as c}from"@vibe/icon/mockedClassNames";import{Remove as d,Check as m}from"@vibe/icons";import{useSupportFirefoxLabelClick as u}from"./hooks/useSupportFirefoxLabelClick.js";import{useMergeRef as p}from"@vibe/shared";import{getTestId as C}from"../../tests/testIds.js";import{ComponentDefaultTestId as b,ComponentVibeId as f}from"../../tests/constants.js";import{Text as v}from"@vibe/typography/mockedClassNames";import h from"./Checkbox.module.scss.js";var k=a((function(a,k){var E=a.className,y=a.checkboxClassName,x=a.labelClassName,N=a["aria-label"],B=a.label,K=a["aria-labelledby"],F=a.onChange,g=void 0===F?s:F,H=a.checked,O=a.autoFocus,X=a.indeterminate,w=void 0!==X&&X,I=a.disabled,L=void 0!==I&&I,j=a.defaultChecked,A=a.tabIndex,_=a.value,D=void 0===_?"":_,M=a.name,S=void 0===M?"":M,U=a.id,q=a.separateLabel,z=void 0!==q&&q,R=a["data-testid"],T=t(null),G=p(k,T),J=o((function(e){var a=e.currentTarget;window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){a.blur()}))}))}),[]),P=j;r(P)&&r(H)&&(P=!1),l((function(){T.current&&(T.current.indeterminate=w)}),[T,w]);var Q=u({inputRef:T}).onClickCapture,V=n((function(){return N||("string"==typeof B?B:"")}),[N,B]),W=o((function(e){var a;" "===e.key&&(e.preventDefault(),null===(a=T.current)||void 0===a||a.click())}),[T]),Y=L?void 0:null!=A?A:0;return z?e.createElement("div",{className:i(h.wrapper,E),"data-testid":R||C(b.CHECKBOX,U),"data-vibe":f.CHECKBOX},e.createElement("input",{ref:G,id:U,className:h.input,value:D,name:S,type:"checkbox",autoFocus:O,onChange:g,defaultChecked:P,disabled:L,"aria-label":V,"aria-labelledby":K,checked:H,tabIndex:-1}),e.createElement("label",{htmlFor:U,className:i(h.checkbox,y),"data-testid":C(b.CHECKBOX_CHECKBOX,U),tabIndex:Y,onMouseUp:J,onKeyDown:W,onClickCapture:Q},e.createElement(c,{className:h.icon,type:"svg",icon:w?d:m,ignoreFocusStyle:!0,"aria-hidden":!0,size:"16"})),!1===B?null:e.createElement("label",{htmlFor:U,className:i(h.label,x),"data-testid":C(b.CHECKBOX_LABEL,U),onMouseUp:J,onClickCapture:Q},e.createElement(v,{element:"span",type:"text2"},B))):e.createElement("label",{className:i(h.wrapper,E),tabIndex:Y,onMouseUp:J,onKeyDown:W,"data-testid":R||C(b.CHECKBOX,U),htmlFor:U,onClickCapture:Q,"data-vibe":f.CHECKBOX},e.createElement("input",{ref:G,id:U,className:h.input,value:D,name:S,type:"checkbox",autoFocus:O,onChange:g,defaultChecked:P,disabled:L,"aria-label":V,"aria-labelledby":K,checked:H,tabIndex:-1}),e.createElement("div",{className:i(h.checkbox,y),"data-testid":C(b.CHECKBOX_CHECKBOX,U)},e.createElement(c,{className:h.icon,type:"svg",icon:w?d:m,ignoreFocusStyle:!0,"aria-hidden":!0,size:"16"})),!1===B?null:e.createElement(v,{element:"span",type:"text2",className:i(h.label,x),"data-testid":C(b.CHECKBOX_LABEL,U)},B))}));export{k as default};
|
|
2
|
-
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useEffect, useMemo, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { isNil, noop as NOOP } from \"es-toolkit\";\nimport { Icon } from \"@vibe/icon\";\nimport { Check, Remove } from \"@vibe/icons\";\nimport { useSupportFirefoxLabelClick } from \"./hooks/useSupportFirefoxLabelClick\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId, ComponentVibeId } from \"../../tests/constants\";\nimport { Text } from \"@vibe/typography\";\nimport styles from \"./Checkbox.module.scss\";\n\nexport interface CheckBoxProps extends VibeComponentProps {\n /**\n * Class name applied to the checkbox element.\n */\n checkboxClassName?: string;\n /**\n * Class name applied to the label element.\n */\n labelClassName?: string;\n /**\n * The label of the checkbox for accessibility.\n */\n \"aria-label\"?: string;\n /**\n * The content displayed next to the checkbox.\n */\n label?: React.ReactNode | Array<React.ReactNode>;\n /**\n * The ID of an element describing the checkbox.\n */\n \"aria-labelledby\"?: string;\n /**\n * Callback fired when the checkbox value changes.\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * If true, controls the checked state of the checkbox.\n */\n checked?: boolean;\n /**\n * If true, displays an indeterminate state.\n */\n indeterminate?: boolean;\n /**\n * If true, the checkbox automatically receives focus.\n */\n autoFocus?: boolean;\n /**\n * If true, the checkbox is disabled.\n */\n disabled?: boolean;\n /**\n * The initial checked state of the checkbox.\n */\n defaultChecked?: boolean;\n /**\n * The value submitted with the form when checked.\n */\n value?: string;\n /**\n * The name of the checkbox, used for form submission.\n */\n name?: string;\n /**\n * The tab order of the checkbox.\n */\n tabIndex?: number;\n /**\n * If true, uses separate labels with htmlFor/id association instead of wrapping the input.\n * If using this the id prop is required for it to function correctly.\n */\n separateLabel?: boolean;\n}\n\nconst Checkbox = forwardRef(\n (\n {\n className,\n checkboxClassName,\n labelClassName,\n \"aria-label\": ariaLabel,\n label,\n \"aria-labelledby\": ariaLabelledBy,\n onChange = NOOP,\n checked,\n autoFocus,\n indeterminate = false,\n disabled = false,\n defaultChecked,\n tabIndex,\n value = \"\",\n name = \"\",\n id,\n separateLabel = false,\n \"data-testid\": dataTestId\n }: CheckBoxProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const mergedInputRef = useMergeRef(ref, inputRef);\n\n const onMouseUpCallback = useCallback((e: React.MouseEvent<HTMLElement>) => {\n const target = e.currentTarget;\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n target.blur();\n });\n });\n }, []);\n\n let overrideDefaultChecked = defaultChecked;\n\n // If component did not receive default checked and checked props, choose default checked as\n // default behavior (handle isChecked logic inside input) and set default value\n if (isNil(overrideDefaultChecked) && isNil(checked)) {\n overrideDefaultChecked = false;\n }\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = indeterminate;\n }\n }, [inputRef, indeterminate]);\n\n const { onClickCapture: onClickCaptureLabel } = useSupportFirefoxLabelClick({ inputRef });\n\n const finalAriaLabel = useMemo(() => {\n if (ariaLabel) return ariaLabel;\n if (typeof label === \"string\") return label;\n return \"\";\n }, [ariaLabel, label]);\n\n const onKeyDownCallback = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n inputRef.current?.click();\n }\n },\n [inputRef]\n );\n\n const wrapperTabIndex = disabled ? undefined : tabIndex ?? 0;\n\n if (separateLabel) {\n return (\n <div\n className={cx(styles.wrapper, className)}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.CHECKBOX, id)}\n data-vibe={ComponentVibeId.CHECKBOX}\n >\n <input\n ref={mergedInputRef}\n id={id}\n className={styles.input}\n value={value}\n name={name}\n type=\"checkbox\"\n autoFocus={autoFocus}\n onChange={onChange}\n defaultChecked={overrideDefaultChecked}\n disabled={disabled}\n aria-label={finalAriaLabel}\n aria-labelledby={ariaLabelledBy}\n checked={checked}\n tabIndex={-1}\n />\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n <label\n htmlFor={id}\n className={cx(styles.checkbox, checkboxClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_CHECKBOX, id)}\n tabIndex={wrapperTabIndex}\n onMouseUp={onMouseUpCallback}\n onKeyDown={onKeyDownCallback}\n onClickCapture={onClickCaptureLabel}\n >\n <Icon\n className={styles.icon}\n type=\"svg\"\n icon={indeterminate ? Remove : Check}\n ignoreFocusStyle\n aria-hidden={true}\n size=\"16\"\n />\n </label>\n {label === false ? null : (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <label\n htmlFor={id}\n className={cx(styles.label, labelClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_LABEL, id)}\n onMouseUp={onMouseUpCallback}\n onClickCapture={onClickCaptureLabel}\n >\n <Text element=\"span\" type=\"text2\">\n {label}\n </Text>\n </label>\n )}\n </div>\n );\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <label\n className={cx(styles.wrapper, className)}\n tabIndex={wrapperTabIndex}\n onMouseUp={onMouseUpCallback}\n onKeyDown={onKeyDownCallback}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.CHECKBOX, id)}\n htmlFor={id}\n onClickCapture={onClickCaptureLabel}\n data-vibe={ComponentVibeId.CHECKBOX}\n >\n <input\n ref={mergedInputRef}\n id={id}\n className={styles.input}\n value={value}\n name={name}\n type=\"checkbox\"\n autoFocus={autoFocus}\n onChange={onChange}\n defaultChecked={overrideDefaultChecked}\n disabled={disabled}\n aria-label={finalAriaLabel}\n aria-labelledby={ariaLabelledBy}\n checked={checked}\n tabIndex={-1}\n />\n <div\n className={cx(styles.checkbox, checkboxClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_CHECKBOX, id)}\n >\n <Icon\n className={styles.icon}\n type=\"svg\"\n icon={indeterminate ? Remove : Check}\n ignoreFocusStyle\n aria-hidden={true}\n size=\"16\"\n />\n </div>\n {label === false ? null : (\n <Text\n element=\"span\"\n type=\"text2\"\n className={cx(styles.label, labelClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_LABEL, id)}\n >\n {label}\n </Text>\n )}\n </label>\n );\n }\n);\n\nexport default Checkbox;\n"],"names":["Checkbox","forwardRef","_ref","ref","className","checkboxClassName","labelClassName","ariaLabel","label","ariaLabelledBy","_ref$onChange","onChange","NOOP","checked","autoFocus","_ref$indeterminate","indeterminate","_ref$disabled","disabled","defaultChecked","tabIndex","_ref$value","value","_ref$name","name","id","_ref$separateLabel","separateLabel","dataTestId","inputRef","useRef","mergedInputRef","useMergeRef","onMouseUpCallback","useCallback","e","target","currentTarget","window","requestAnimationFrame","blur","overrideDefaultChecked","isNil","useEffect","current","onClickCaptureLabel","useSupportFirefoxLabelClick","onClickCapture","finalAriaLabel","useMemo","onKeyDownCallback","key","preventDefault","_a","click","wrapperTabIndex","undefined","React","createElement","cx","styles","wrapper","getTestId","ComponentDefaultTestId","CHECKBOX","ComponentVibeId","input","type","htmlFor","checkbox","CHECKBOX_CHECKBOX","onMouseUp","onKeyDown","Icon","icon","Remove","Check","ignoreFocusStyle","size","CHECKBOX_LABEL","Text","element"],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={wrapper:"wrapper",checkbox:"checkbox",icon:"icon",label:"label",input:"input",checkboxGrowAnimation:"checkboxGrowAnimation"};!function(n){const e="s_id-61898ce5ef6e_4_5_4";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+e))return;const r=document.createElement("style");r.id=e,o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}('@charset "UTF-8";\n/* stylelint-disable */\n/* stylelint-enable */\n/* stylelint-disable */\n/* stylelint-enable */\n/* stylelint-disable selector-class-pattern */\n.wrapper {\n position: relative;\n display: flex;\n align-items: center;\n width: fit-content;\n height: min-content;\n outline: none; /* focus ring is rendered on .checkbox child, not the wrapper */\n}\n.checkbox {\n cursor: pointer;\n visibility: visible;\n display: flex;\n justify-content: center;\n flex-direction: column;\n height: 16px;\n width: 16px;\n border: 1px solid;\n border-color: var(--ui-border-color);\n border-radius: 2px;\n transition: transform var(--motion-productive-short) var(--motion-timing-enter);\n position: relative;\n overflow: hidden;\n background-color: var(--secondary-background-color);\n}\n.checkbox:after {\n content: " ";\n background-color: transparent;\n position: absolute;\n height: 16px;\n z-index: 2;\n inset-inline: 0;\n width: 100%;\n}\n.checkbox:hover {\n border-color: var(--secondary-text-color);\n}\n.icon {\n width: 100%;\n color: var(--text-color-on-primary);\n visibility: hidden;\n}\n.label {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n cursor: pointer;\n user-select: none;\n margin-inline-start: var(--space-8);\n}\n/* Since it is not possible to change the design of the checkbox according to the requirements using css, */\n/* we hide the checkbox and draw a new one instead. */\n/* In order to allow accessibility, all operations will be performed on the hidden checkbox and be reflected */\n.input {\n opacity: 0;\n width: 0;\n height: 0;\n position: absolute;\n}\n/* For any active attribute in the hidden checkbox, we will change the appearance of the checkbox we drew in its place. */\n.input:focus + .checkbox {\n border-color: var(--secondary-text-color);\n}\n.input:focus:checked + .checkbox {\n background-color: var(--primary-hover-color);\n border-color: transparent;\n}\n.input:focus-visible + .checkbox {\n outline: none;\n z-index: 11;\n border-radius: 2px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.input:checked:focus + .checkbox:after,\n.input:indeterminate:focus + .checkbox:after {\n background-color: var(--primary-hover-color);\n}\n/* Tab navigation — non-separate mode: the wrapper <label> is the Tab target */\n.wrapper:focus-visible > .checkbox {\n outline: none;\n z-index: 11;\n border-radius: 2px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.wrapper:focus-visible > .input:checked ~ .checkbox,\n.wrapper:focus-visible > .input:indeterminate ~ .checkbox {\n background-color: var(--primary-hover-color);\n border-color: transparent;\n}\n/* Tab navigation — separate mode: the .checkbox <label> is the Tab target */\n.checkbox:focus-visible {\n outline: none;\n z-index: 11;\n border-radius: 2px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.input:checked + .checkbox:focus-visible,\n.input:indeterminate + .checkbox:focus-visible {\n background-color: var(--primary-hover-color);\n border-color: transparent;\n}\n.input:checked + .checkbox,\n.input:indeterminate + .checkbox {\n animation: checkboxGrowAnimation var(--motion-productive-short);\n background-color: var(--primary-color);\n border-color: transparent;\n}\n.input:checked + .checkbox:hover,\n.input:indeterminate + .checkbox:hover {\n background-color: var(--primary-hover-color);\n border-color: transparent;\n}\n.input:checked + .checkbox:hover:after,\n.input:indeterminate + .checkbox:hover:after {\n background-color: var(--primary-hover-color);\n}\n.input:checked + .checkbox:after,\n.input:indeterminate + .checkbox:after {\n content: " ";\n background-color: var(--primary-color);\n height: 16px;\n transform: scaleX(0);\n transition: transform var(--motion-productive-long);\n transform-origin: right;\n inset-inline-start: 0;\n}\n.input:checked + .checkbox > .icon,\n.input:indeterminate + .checkbox > .icon {\n visibility: visible;\n}\n.input:checked:disabled + .checkbox:after,\n.input:indeterminate:disabled + .checkbox:after {\n background-color: var(--disabled-background-color);\n}\n.input:disabled + .checkbox .icon,\n.input:disabled + .checkbox:hover .icon {\n color: var(--disabled-text-color);\n}\n.input:disabled + .checkbox,\n.input:disabled + .checkbox:hover {\n cursor: not-allowed;\n background-color: var(--disabled-background-color);\n border-color: var(--ui-border-color);\n}\n.input:disabled ~ .label {\n cursor: not-allowed;\n color: var(--disabled-text-color);\n}\n@keyframes checkboxGrowAnimation {\n 0% {\n transform: scale(0.8);\n }\n 100% {\n transform: scale(1);\n }\n}');export{n as default};
|
|
2
|
-
//# sourceMappingURL=Checkbox.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useRef as e,useCallback as r}from"react";import{isFirefox as t}from"@vibe/shared";function n(n){var c=n.inputRef,i=e(!1);return{onClickCapture:r((function(e){var r;if(!i.current&&e.shiftKey&&t()&&(null===(r=null==c?void 0:c.current)||void 0===r?void 0:r.dispatchEvent)){e.preventDefault();var n=new MouseEvent("click",{shiftKey:!0,bubbles:!0,cancelable:!0});i.current=!0,c.current.dispatchEvent(n)}else i.current&&(i.current=!1)}),[i,c])}}export{n as useSupportFirefoxLabelClick};
|
|
2
|
-
//# sourceMappingURL=useSupportFirefoxLabelClick.js.map
|
package/dist/mocked_classnames/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSupportFirefoxLabelClick.js","sources":["../../../../../../src/components/Checkbox/hooks/useSupportFirefoxLabelClick.tsx"],"sourcesContent":["import type React from \"react\";\nimport { useCallback, useRef } from \"react\";\nimport { isFirefox } from \"@vibe/shared\";\n\nexport function useSupportFirefoxLabelClick({ inputRef }: { inputRef: React.RefObject<HTMLInputElement> }) {\n // The purpose of this variable is to make sure that the captured event is a checkbox's label click event and not a manual event\n // that we actually created in this hook.\n // We handle the custom event create state as ref because this variable should not be depend on the component renders\n // and it should be unique per checkbox.\n const customEventCreated = useRef(false);\n\n // fix for known bug firefox bug: firefox does not support checking or unchecking checkbox by its label when shift pressed\n const onClickCapture = useCallback(\n (e: React.MouseEvent) => {\n // We would like to dispatch a manual event to click on the input only for cases where there is a bug in supporting this capability -\n // firefox browsers when the shift key is pressed.\n // In addition we make sure here that the captured event is not a manually generated event created by this code because we want to prevent\n // an infinite loop in recursion here.\n if (!customEventCreated.current && e.shiftKey && isFirefox() && inputRef?.current?.dispatchEvent) {\n e.preventDefault();\n const manualClickEvent = new MouseEvent(\"click\", {\n shiftKey: true,\n // After dispatch this event we will want it to be captured by all the relevant event listeners which registered to this checkbox input.\n bubbles: true,\n cancelable: true\n });\n\n customEventCreated.current = true;\n inputRef.current.dispatchEvent(manualClickEvent);\n } else if (customEventCreated.current) {\n customEventCreated.current = false;\n }\n },\n [customEventCreated, inputRef]\n );\n\n return { onClickCapture };\n}\n"],"names":["useSupportFirefoxLabelClick","_ref","inputRef","customEventCreated","useRef","onClickCapture","useCallback","e","current","shiftKey","isFirefox","_a","dispatchEvent","preventDefault","manualClickEvent","MouseEvent","bubbles","cancelable"],"mappings":"yFAIgB,SAAAA,EAA2BC,GAA8D,IAA3DC,EAAQD,EAARC,SAKtCC,EAAqBC,GAAO,GA2BlC,MAAO,CAAEC,eAxBcC,GACrB,SAACC,SAKC,IAAKJ,EAAmBK,SAAWD,EAAEE,UAAYC,MAAkC,UAAnBR,aAAQ,EAARA,EAAUM,eAAS,IAAAG,OAAA,EAAAA,EAAAC,eAAe,CAChGL,EAAEM,iBACF,IAAMC,EAAmB,IAAIC,WAAW,QAAS,CAC/CN,UAAU,EAEVO,SAAS,EACTC,YAAY,IAGdd,EAAmBK,SAAU,EAC7BN,EAASM,QAAQI,cAAcE,EACjC,MAAWX,EAAmBK,UAC5BL,EAAmBK,SAAU,EAEjC,GACA,CAACL,EAAoBD,IAIzB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import o from"classnames";import a,{forwardRef as n,useRef as r,useState as i,useCallback as s}from"react";import{useMergeRef as l}from"@vibe/shared";import{Icon as c}from"@vibe/icon/mockedClassNames";import{Text as d}from"@vibe/typography/mockedClassNames";import{DropdownChevronDown as m}from"@vibe/icons";import{getTestId as p,ComponentDefaultTestId as v}from"../../tests/testIds.js";import f from"./ExpandCollapse.module.scss.js";import{ComponentVibeId as u}from"../../tests/constants.js";var C=n((function(n,C){var h=n.children,N=n.headerComponentRenderer,E=void 0===N?null:N,g=n.title,y=void 0===g?"":g,b=n.className,P=n.defaultOpenState,k=void 0!==P&&P,x=n.iconSize,B=void 0===x?24:x,O=n.iconPosition,A=void 0===O?"right":O,j=n.id,I=void 0===j?"":j,L=n.open,S=n.onClick,_=void 0===S?null:S,z=n.hideBorder,D=void 0!==z&&z,X=n.headerClassName,w=n.contentClassName,H=n.componentClassName,R=n["data-testid"],T=n.captureOnClick,q=void 0===T||T,F=r(null),G=l(C,F),J=i(k),K=e(J,2),M=K[0],Q=K[1],U=void 0===L?M:L,V=function(){Q(!M)},W=s((function(){return"string"==typeof y?a.createElement(d,{type:"text1",className:o(f.headerContent)},y):y}),[y]),Y=function(){return a.createElement(c,{className:o(f.iconComponent,t(t({},f.animateIconOpen,U),f.animateIconClose,!U)),type:"svg",icon:m,size:B})};return a.createElement("div",{ref:G,className:b,id:I,"data-testid":R||p(v.EXPAND_COLLAPSE,I),"data-vibe":u.EXPAND_COLLAPSE},a.createElement("div",{className:o(f.expandCollapse,t(t({},f.hideBorder,D),f.showBorder,!D),H)},a.createElement("button",{type:"button",className:o(f.header,f.section,X,t(t(t({},f.headerOpen,U),f.hideBorderBottom,D),f.leftIcon,"left"===A)),onClickCapture:q?_||V:void 0,onClick:q?void 0:_||V,"aria-expanded":U,"aria-controls":"".concat(I,"-controls")},"left"===A&&Y(),"string"!=typeof y||0!==y.length?W():E&&E(),"right"===A&&Y()),U&&a.createElement("div",{className:o(f.content,f.section,w,t({},f.animateExpandCollapseContent,U)),id:"".concat(I,"-controls"),role:"region"},h)))}));export{C as default};
|
|
2
|
-
//# sourceMappingURL=ExpandCollapse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandCollapse.js","sources":["../../../../../src/components/ExpandCollapse/ExpandCollapse.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { type FC, forwardRef, type ReactElement, useCallback, useRef, useState } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { Icon } from \"@vibe/icon\";\nimport { Text } from \"@vibe/typography\";\nimport { DropdownChevronDown } from \"@vibe/icons\";\nimport { type VibeComponentProps, type ElementContent } from \"../../types\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./ExpandCollapse.module.scss\";\nimport { type ExpandCollapseIconPosition } from \"./ExpandCollapse.types\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface ExpandCollapseProps extends VibeComponentProps {\n /**\n * Custom renderer for the header component.\n */\n headerComponentRenderer?: () => ReactElement;\n /**\n * Class name applied to the header.\n */\n headerClassName?: string;\n /**\n * Class name applied to the content.\n */\n contentClassName?: string;\n /**\n * Class name applied to the root component.\n */\n componentClassName?: string;\n /**\n * The title displayed in the header.\n */\n title?: ElementContent;\n /**\n * The content inside the expandable section.\n */\n children?: ElementContent;\n /**\n * The size of the expand/collapse icon.\n */\n iconSize?: number | string;\n /**\n * The position of the icon.\n */\n iconPosition?: ExpandCollapseIconPosition;\n /**\n * If true, the section is open by default when rendered.\n */\n defaultOpenState?: boolean;\n /**\n * Controls the open state of the section.\n */\n open?: boolean;\n /**\n * Callback fired when the header is clicked.\n */\n onClick?: (event: React.MouseEvent) => void;\n /**\n * If true, hides the border around the component.\n */\n hideBorder?: boolean;\n /**\n * If true, captures the click event on the button.\n */\n captureOnClick?: boolean;\n}\n\nconst ExpandCollapse: FC<ExpandCollapseProps> = forwardRef(\n (\n {\n children,\n headerComponentRenderer = null,\n title = \"\",\n className,\n defaultOpenState = false,\n iconSize = 24,\n iconPosition = \"right\",\n id = \"\",\n open,\n onClick = null,\n hideBorder = false,\n headerClassName,\n contentClassName,\n componentClassName,\n \"data-testid\": dataTestId,\n captureOnClick = true\n },\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n const [isOpen, setIsOpen] = useState(defaultOpenState);\n const isExpanded = open === undefined ? isOpen : open;\n\n const toggleExpand = () => {\n setIsOpen(!isOpen);\n };\n const renderHeader = useCallback(() => {\n return typeof title === \"string\" ? (\n <Text type=\"text1\" className={cx(styles.headerContent)}>\n {title}\n </Text>\n ) : (\n title\n );\n }, [title]);\n\n const renderIcon = () => (\n <Icon\n className={cx(styles.iconComponent, {\n [styles.animateIconOpen]: isExpanded,\n [styles.animateIconClose]: !isExpanded\n })}\n type=\"svg\"\n icon={DropdownChevronDown}\n size={iconSize}\n />\n );\n\n return (\n <div\n ref={mergedRef}\n className={className}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.EXPAND_COLLAPSE, id)}\n data-vibe={ComponentVibeId.EXPAND_COLLAPSE}\n >\n <div\n className={cx(\n styles.expandCollapse,\n {\n [styles.hideBorder]: hideBorder,\n [styles.showBorder]: !hideBorder\n },\n componentClassName\n )}\n >\n <button\n type=\"button\"\n className={cx(styles.header, styles.section, headerClassName, {\n [styles.headerOpen]: isExpanded,\n [styles.hideBorderBottom]: hideBorder,\n [styles.leftIcon]: iconPosition === \"left\"\n })}\n onClickCapture={captureOnClick ? onClick || toggleExpand : undefined}\n onClick={!captureOnClick ? onClick || toggleExpand : undefined}\n aria-expanded={isExpanded}\n aria-controls={`${id}-controls`}\n >\n {iconPosition === \"left\" && renderIcon()}\n {typeof title !== \"string\" || title.length !== 0\n ? renderHeader()\n : headerComponentRenderer && headerComponentRenderer()}\n {iconPosition === \"right\" && renderIcon()}\n </button>\n {isExpanded && (\n <div\n className={cx(styles.content, styles.section, contentClassName, {\n [styles.animateExpandCollapseContent]: isExpanded\n })}\n id={`${id}-controls`}\n role=\"region\"\n >\n {children}\n </div>\n )}\n </div>\n </div>\n );\n }\n);\n\nexport default ExpandCollapse;\n"],"names":["ExpandCollapse","forwardRef","_ref","ref","children","_ref$headerComponentR","headerComponentRenderer","_ref$title","title","className","_ref$defaultOpenState","defaultOpenState","_ref$iconSize","iconSize","_ref$iconPosition","iconPosition","_ref$id","id","open","_ref$onClick","onClick","_ref$hideBorder","hideBorder","headerClassName","contentClassName","componentClassName","dataTestId","_ref$captureOnClick","captureOnClick","componentRef","useRef","mergedRef","useMergeRef","_useState","useState","_useState2","_slicedToArray","isOpen","setIsOpen","isExpanded","undefined","toggleExpand","renderHeader","useCallback","React","createElement","Text","type","cx","styles","headerContent","renderIcon","Icon","iconComponent","_defineProperty","animateIconOpen","animateIconClose","icon","DropdownChevronDown","size","getTestId","ComponentDefaultTestId","EXPAND_COLLAPSE","ComponentVibeId","expandCollapse","showBorder","header","section","headerOpen","hideBorderBottom","leftIcon","onClickCapture","concat","length","content","animateExpandCollapseContent","role"],"mappings":"glBAmEMA,IAAAA,EAA0CC,GAC9C,SAAAC,EAmBEC,GACE,IAlBAC,EAAQF,EAARE,SAAQC,EAAAH,EACRI,wBAAAA,OAA0B,IAAHD,EAAG,KAAIA,EAAAE,EAAAL,EAC9BM,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EACVE,EAASP,EAATO,UAASC,EAAAR,EACTS,iBAAAA,OAAmB,IAAHD,GAAQA,EAAAE,EAAAV,EACxBW,SAAAA,OAAW,IAAHD,EAAG,GAAEA,EAAAE,EAAAZ,EACba,aAAAA,OAAe,IAAHD,EAAG,QAAOA,EAAAE,EAAAd,EACtBe,GAAAA,OAAK,IAAHD,EAAG,GAAEA,EACPE,EAAIhB,EAAJgB,KAAIC,EAAAjB,EACJkB,QAAAA,OAAU,IAAHD,EAAG,KAAIA,EAAAE,EAAAnB,EACdoB,WAAAA,OAAa,IAAHD,GAAQA,EAClBE,EAAerB,EAAfqB,gBACAC,EAAgBtB,EAAhBsB,iBACAC,EAAkBvB,EAAlBuB,mBACeC,EAAUxB,EAAzB,eAAayB,EAAAzB,EACb0B,eAAAA,OAAiB,IAAHD,GAAOA,EAIjBE,EAAeC,EAAO,MACtBC,EAAYC,EAAY7B,EAAK0B,GAEnCI,EAA4BC,EAASvB,GAAiBwB,EAAAC,EAAAH,EAAA,GAA/CI,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAClBI,OAAsBC,IAATtB,EAAqBmB,EAASnB,EAE3CuB,EAAe,WACnBH,GAAWD,IAEPK,EAAeC,GAAY,WAC/B,MAAwB,iBAAVnC,EACZoC,EAAAC,cAACC,EAAI,CAACC,KAAK,QAAQtC,UAAWuC,EAAGC,EAAOC,gBACrC1C,GAGHA,CAEJ,GAAG,CAACA,IAEE2C,EAAa,WAAH,OACdP,EAACC,cAAAO,EACC,CAAA3C,UAAWuC,EAAGC,EAAOI,cAAaC,EAAAA,EAC/BL,CAAAA,EAAAA,EAAOM,gBAAkBhB,GACzBU,EAAOO,kBAAoBjB,IAE9BQ,KAAK,MACLU,KAAMC,EACNC,KAAM9C,KAIV,OACE+B,EACEC,cAAA,MAAA,CAAA1C,IAAK4B,EACLtB,UAAWA,EACXQ,GAAIA,EACS,cAAAS,GAAckC,EAAUC,EAAuBC,gBAAiB7C,GAAG,YACrE8C,EAAgBD,iBAE3BlB,EAAAC,cAAA,MAAA,CACEpC,UAAWuC,EACTC,EAAOe,eAAcV,EAAAA,EAElBL,GAAAA,EAAO3B,WAAaA,GACpB2B,EAAOgB,YAAc3C,GAExBG,IAGFmB,EAAAC,cAAA,SAAA,CACEE,KAAK,SACLtC,UAAWuC,EAAGC,EAAOiB,OAAQjB,EAAOkB,QAAS5C,EAAe+B,EAAAA,EAAAA,EAAA,CAAA,EACzDL,EAAOmB,WAAa7B,GACpBU,EAAOoB,iBAAmB/C,GAC1B2B,EAAOqB,SAA4B,SAAjBvD,IAErBwD,eAAgB3C,EAAiBR,GAAWqB,OAAeD,EAC3DpB,QAAUQ,OAA2CY,EAA1BpB,GAAWqB,EACvB,gBAAAF,EACA,gBAAA,GAAAiC,OAAGvD,EAAE,cAEF,SAAjBF,GAA2BoC,IACV,iBAAV3C,GAAuC,IAAjBA,EAAMiE,OAChC/B,IACApC,GAA2BA,IACb,UAAjBS,GAA4BoC,KAE9BZ,GACCK,EAAAC,cAAA,MAAA,CACEpC,UAAWuC,EAAGC,EAAOyB,QAASzB,EAAOkB,QAAS3C,EAAgB8B,EAC3DL,CAAAA,EAAAA,EAAO0B,6BAA+BpC,IAEzCtB,GAAEuD,GAAAA,OAAKvD,EAAa,aACpB2D,KAAK,UAEJxE,IAMb"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={expandCollapse:"expandCollapse",header:"header","focus-visible":"focus-visible",headerContent:"headerContent",iconComponent:"iconComponent",content:"content",section:"section",hideBorder:"hideBorder",hideBorderBottom:"hideBorderBottom",showBorder:"showBorder",headerOpen:"headerOpen",animateIconOpen:"animateIconOpen",animateIconClose:"animateIconClose",leftIcon:"leftIcon"};!function(n){const e="s_id-56805b2f3dc6_4_5_4";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+e))return;const r=document.createElement("style");r.id=e,o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}("/* stylelint-disable */\n/* stylelint-enable */\n.expandCollapse {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n color: var(--primary-text-color);\n background-color: transparent;\n box-sizing: border-box;\n border-radius: var(--border-radius-small);\n}\n.header {\n border: none;\n margin: 0;\n padding: 0;\n width: auto;\n overflow: visible;\n background: transparent;\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n /* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */\n line-height: normal;\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n /* Corrects inability to style clickable `input` types in iOS */\n appearance: none;\n padding: var(--space-16);\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n}\n.header:focus-visible, .header.focus-visible {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.header:focus:not(.focus-visible) {\n outline: none;\n}\n.header:hover {\n background-color: var(--primary-background-hover-color);\n}\n.header:active {\n transform: scale(1);\n}\n.header .headerContent {\n margin: 0;\n}\n.header .iconComponent {\n color: var(--icon-color);\n}\n.content {\n padding: var(--space-16);\n}\n.section {\n width: 100%;\n}\n.hideBorder {\n border: none;\n}\n.hideBorderBottom {\n border-bottom: none;\n}\n.showBorder {\n border: 1px solid var(--ui-border-color);\n}\n.showBorder .headerOpen {\n border-bottom: 1px solid;\n border-color: var(--ui-border-color);\n}\n.animateIconOpen {\n transform: rotate(-180deg);\n transition: transform var(--motion-expressive-short) var(--motion-timing-transition);\n}\n.animateIconClose {\n transform: rotate(-360deg);\n transition: transform var(--motion-expressive-short) var(--motion-timing-transition);\n}\n.header.leftIcon {\n justify-content: flex-start;\n gap: var(--space-8);\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=ExpandCollapse.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"classnames";import t,{forwardRef as r,useMemo as a}from"react";import{formatNumberConsts as s,formatNumber as l}from"../../helpers/textManipulations.js";import{validateValue as m}from"./FormattedNumberHelpers.js";import{getTestId as o,ComponentDefaultTestId as i}from"../../tests/testIds.js";import n from"./FormattedNumber.module.scss.js";var c=r((function(r,c){var u=r.value,p=r.className,d=r.local,f=void 0===d?s.DEFAULT_LOCAL:d,N=r.prefix,v=r.suffix,E=r.emptyPlaceHolder,x=void 0===E?"N/A":E,j=r.decimalPrecision,A=void 0===j?2:j,F=r.compact,b=void 0===F||F,L=r.rtl,M=r.id,T=r["data-testid"],C=a((function(){return v?t.createElement("span",{className:e(n.suffix)},v):null}),[v]),D=a((function(){return N?t.createElement("span",{className:e(n.prefix)},N):null}),[N]),H=a((function(){return l(Number(u),{local:f,precision:A,isCompact:b})}),[u,A,f,b]);return m(u)?t.createElement("span",null,x):t.createElement("div",{ref:c,className:p,id:M,"data-testid":T||o(i.FORMATTED_NUMBER,M)},L?C:D,t.createElement("span",null,H),L?D:C)}));export{c as default};
|
|
2
|
-
//# sourceMappingURL=FormattedNumber.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormattedNumber.js","sources":["../../../../../src/components/FormattedNumber/FormattedNumber.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { useMemo, forwardRef } from \"react\";\nimport { formatNumber, formatNumberConsts } from \"../../helpers/textManipulations\";\nimport { validateValue } from \"./FormattedNumberHelpers\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./FormattedNumber.module.scss\";\n\nexport interface FormattedNumberProps extends VibeComponentProps {\n /**\n * The numeric value to format.\n */\n value?: number | string;\n /**\n * The text displayed before the number.\n */\n prefix?: string;\n /**\n * The text displayed after the number.\n */\n suffix?: string;\n /**\n * The text displayed when no value is provided.\n */\n emptyPlaceHolder?: string;\n /**\n * The number of decimal places to display (0 ~ 20).\n */\n decimalPrecision?: number;\n /**\n * If true, formats the number into a compact notation.\n */\n compact?: boolean;\n /**\n * The locale used for formatting (Unicode BCP 47 locale identifier).\n */\n local?: string;\n /**\n * If true, reverses the order of the prefix and suffix.\n */\n rtl?: boolean;\n}\n\nconst FormattedNumber = forwardRef(\n (\n {\n value,\n className,\n local = formatNumberConsts.DEFAULT_LOCAL,\n prefix,\n suffix,\n emptyPlaceHolder = \"N/A\",\n decimalPrecision = 2,\n compact = true,\n rtl,\n id,\n \"data-testid\": dataTestId\n }: FormattedNumberProps,\n ref: React.ForwardedRef<HTMLDivElement>\n ) => {\n const renderSuffix = useMemo(() => {\n if (!suffix) return null;\n\n return <span className={cx(styles.suffix)}>{suffix}</span>;\n }, [suffix]);\n\n const renderPrefix = useMemo(() => {\n if (!prefix) return null;\n\n return <span className={cx(styles.prefix)}>{prefix}</span>;\n }, [prefix]);\n\n const calculatedValue = useMemo(() => {\n return formatNumber(Number(value), {\n local,\n precision: decimalPrecision,\n isCompact: compact\n });\n }, [value, decimalPrecision, local, compact]);\n\n if (validateValue(value)) {\n return <span>{emptyPlaceHolder}</span>;\n }\n\n return (\n <div\n ref={ref}\n className={className}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.FORMATTED_NUMBER, id)}\n >\n {rtl ? renderSuffix : renderPrefix}\n <span>{calculatedValue}</span>\n {rtl ? renderPrefix : renderSuffix}\n </div>\n );\n }\n);\n\nexport default FormattedNumber;\n"],"names":["FormattedNumber","forwardRef","_ref","ref","value","className","_ref$local","local","formatNumberConsts","DEFAULT_LOCAL","prefix","suffix","_ref$emptyPlaceHolder","emptyPlaceHolder","_ref$decimalPrecision","decimalPrecision","_ref$compact","compact","rtl","id","dataTestId","renderSuffix","useMemo","React","createElement","cx","styles","renderPrefix","calculatedValue","formatNumber","Number","precision","isCompact","validateValue","getTestId","ComponentDefaultTestId","FORMATTED_NUMBER"],"mappings":"kWA2CMA,IAAAA,EAAkBC,GACtB,SAAAC,EAcEC,GACE,IAbAC,EAAKF,EAALE,MACAC,EAASH,EAATG,UAASC,EAAAJ,EACTK,MAAAA,OAAK,IAAAD,EAAGE,EAAmBC,cAAaH,EACxCI,EAAMR,EAANQ,OACAC,EAAMT,EAANS,OAAMC,EAAAV,EACNW,iBAAAA,OAAmB,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EACxBa,iBAAAA,OAAmB,IAAHD,EAAG,EAACA,EAAAE,EAAAd,EACpBe,QAAAA,OAAU,IAAHD,GAAOA,EACdE,EAAGhB,EAAHgB,IACAC,EAAEjB,EAAFiB,GACeC,EAAUlB,EAAzB,eAIImB,EAAeC,GAAQ,WAC3B,OAAKX,EAEEY,EAAMC,cAAA,OAAA,CAAAnB,UAAWoB,EAAGC,EAAOf,SAAUA,GAFxB,IAGtB,GAAG,CAACA,IAEEgB,EAAeL,GAAQ,WAC3B,OAAKZ,EAEEa,EAAMC,cAAA,OAAA,CAAAnB,UAAWoB,EAAGC,EAAOhB,SAAUA,GAFxB,IAGtB,GAAG,CAACA,IAEEkB,EAAkBN,GAAQ,WAC9B,OAAOO,EAAaC,OAAO1B,GAAQ,CACjCG,MAAAA,EACAwB,UAAWhB,EACXiB,UAAWf,GAEd,GAAE,CAACb,EAAOW,EAAkBR,EAAOU,IAEpC,OAAIgB,EAAc7B,GACTmB,EAAAC,cAAA,OAAA,KAAOX,GAIdU,uBACEpB,IAAKA,EACLE,UAAWA,EACXc,GAAIA,EAAE,cACOC,GAAcc,EAAUC,EAAuBC,iBAAkBjB,IAE7ED,EAAMG,EAAeM,EACtBJ,EAAAC,cAAA,OAAA,KAAOI,GACNV,EAAMS,EAAeN,EAG5B"}
|
package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.module.scss.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={formattedNumberComponent:"formattedNumberComponent",prefix:"prefix",suffix:"suffix"};!function(e){const n="s_id-d821b20045aa_4_5_4";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const i=document.createElement("style");i.id=n,t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.formattedNumberComponent {\n display: flex;\n flex-direction: row;\n box-sizing: border-box;\n font-family: var(--font-family);\n width: 100%;\n}\n.prefix {\n white-space: pre;\n}\n.suffix {\n white-space: pre;\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=FormattedNumber.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n=function(n){var e=null==n,t="string"==typeof n&&!n.replace(" ","").length;return e||isNaN(Number(n))||t};Object.freeze({range:function(n,e){return function(t,r,c){if(n>t[r]||t[r]>e)return Error("Invalid prop ".concat(r," supplied to ").concat(c,". ").concat(r," should be between ").concat(n," to ").concat(e,"."))}}});export{n as validateValue};
|
|
2
|
-
//# sourceMappingURL=FormattedNumberHelpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormattedNumberHelpers.js","sources":["../../../../../src/components/FormattedNumber/FormattedNumberHelpers.ts"],"sourcesContent":["export const validateValue = (value: number | string): boolean => {\n const isNullOrUndefined = value === null || value === undefined;\n const isEmptyStringWithSpaces = typeof value === \"string\" && !value.replace(\" \", \"\").length;\n return isNullOrUndefined || isNaN(Number(value)) || isEmptyStringWithSpaces;\n};\n\nconst range =\n (min: number, max: number) => (props: Record<string, number>, propName: string, componentName: string) => {\n if (props[propName] < min || props[propName] > max) {\n return new Error(\n `Invalid prop ${propName} supplied to ${componentName}. ${propName} should be between ${min} to ${max}.`\n );\n }\n };\n\nexport const customPropTypes = Object.freeze({\n range\n});\n"],"names":["validateValue","value","isNullOrUndefined","isEmptyStringWithSpaces","replace","length","isNaN","Number","Object","freeze","range","min","max","props","propName","componentName","Error","concat"],"mappings":"IAAaA,EAAgB,SAACC,GAC5B,IAAMC,EAAoBD,QACpBE,EAA2C,iBAAVF,IAAuBA,EAAMG,QAAQ,IAAK,IAAIC,OACrF,OAAOH,GAAqBI,MAAMC,OAAON,KAAWE,CACtD,EAW+BK,OAAOC,OAAO,CAC3CC,MATA,SAACC,EAAaC,GAAW,OAAK,SAACC,EAA+BC,EAAkBC,GAC9E,GAAsBJ,EAAlBE,EAAMC,IAAmBD,EAAMC,GAAYF,EAC7C,OAAWI,MAAKC,gBAAAA,OACEH,EAAQ,iBAAAG,OAAgBF,EAAa,MAAAE,OAAKH,EAAQG,uBAAAA,OAAsBN,UAAGM,OAAOL,EAAG,MAG1G"}
|
package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import l from"./PercentageLabel.module.scss.js";var a=function(a){var r=a.forElement,t=a.value,o=void 0===t?0:t;return null==o?null:e.createElement("label",{htmlFor:void 0===r?"":r,className:l.label},"".concat(o.toFixed(),"%"))};export{a as default};
|
|
2
|
-
//# sourceMappingURL=PercentageLabel.js.map
|
package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PercentageLabel.js","sources":["../../../../../../src/components/ProgressBars/PercentageLabel/PercentageLabel.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport styles from \"./PercentageLabel.module.scss\";\n\nexport interface PercentageLabelProps {\n /**\n * The ID of the element this label is associated with.\n */\n forElement: string;\n /**\n * The percentage value to display.\n */\n value: number;\n}\n\nconst PercentageLabel: FC<PercentageLabelProps> = ({ forElement = \"\", value = 0 }) => {\n if (value === null || value === undefined) return null;\n return (\n <label htmlFor={forElement} className={styles.label}>\n {`${value.toFixed()}%`}\n </label>\n );\n};\n\nexport default PercentageLabel;\n"],"names":["PercentageLabel","_ref","_ref$forElement","forElement","_ref$value","value","React","htmlFor","className","styles","label","concat","toFixed"],"mappings":"qEAcA,IAAMA,EAA4C,SAA7BC,GAAgE,IAAAC,EAAAD,EAAhCE,WAAeC,EAAAH,EAAEI,MAAAA,OAAQ,IAAHD,EAAG,EAACA,EAC7E,OAAIC,QAA8C,KAEhDC,yBAAOC,aAHuD,IAAHL,EAAG,GAAEA,EAGpCM,UAAWC,EAAOC,OAC3C,GAAAC,OAAGN,EAAMO,UAAS,KAGzB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={label:"label"};!function(e){const t="s_id-0e1723f4aae0_4_5_4";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".label {\n padding-inline-start: var(--space-4);\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=PercentageLabel.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as r}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import a,{useMemo as e}from"react";import{camelCase as t}from"es-toolkit";import{getStyle as o}from"@vibe/shared";import{getTestId as i,ComponentDefaultTestId as s}from"../../../../tests/testIds.js";import l from"classnames";import{calculatePercentage as n}from"../ProgressBarHelpers.js";import m from"./Bar.module.scss.js";var u=function(u){var c=u.value,d=u.type,p=u.barStyle,f=u.animated,b=u.min,v=u.max,g=u.color,x=u.barLabelName,j=u.id,y=u["data-testid"],h=u.className,B=u.allowExceedingMax,_=void 0!==B&&B,w=e((function(){return l(m.bar,o(m,t("type__"+d+"--"+p)),h,r({},m.animate,f))}),[d,p,f,h]),M=e((function(){return null==c?0:n(c,b,v,_)}),[c,b,v,_]),N=e((function(){return Math.min(M,100)}),[M]),P=e((function(){return _&&M>100?Math.max(M,100):100}),[_,M]);return c?a.createElement("div",{role:"progressbar","aria-label":x,"aria-valuenow":M,"aria-valuemin":0,"aria-valuemax":P,className:w,style:Object.assign({width:"".concat(N,"%")},g&&{backgroundColor:g}),id:j,"data-testid":y||i(s.BAR,j)}):null};export{u as default};
|
|
2
|
-
//# sourceMappingURL=Bar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.js","sources":["../../../../../../../src/components/ProgressBars/ProgressBar/Bar/Bar.tsx"],"sourcesContent":["import React, { type FC, useMemo } from \"react\";\nimport { camelCase } from \"es-toolkit\";\nimport { getStyle } from \"@vibe/shared\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport { calculatePercentage } from \"../ProgressBarHelpers\";\nimport { type VibeComponentProps } from \"../../../../types\";\nimport { type ProgressBarStyle } from \"../ProgressBar.types\";\nimport styles from \"./Bar.module.scss\";\n\nexport type BarType = \"primary\" | \"secondary\";\n\nexport interface BarProps extends VibeComponentProps {\n /**\n * Determines the visual style of the progress bar.\n */\n barStyle?: ProgressBarStyle;\n /**\n * The minimum value of the progress bar.\n */\n min?: number;\n /**\n * The maximum value of the progress bar.\n */\n max?: number;\n /**\n * The current progress value.\n */\n value?: number;\n /**\n * If true, enables animation effects.\n */\n animated?: boolean;\n /**\n * Base class name for the bar.\n */\n baseClass?: string;\n /**\n * The ARIA label describing the progress bar.\n */\n barLabelName?: string;\n /**\n * Custom color for the progress bar.\n */\n color?: string;\n /**\n * The type of the bar.\n */\n type?: BarType;\n /**\n * If true, allows displaying percentage values higher than 100% when value exceeds max.\n */\n allowExceedingMax?: boolean;\n}\n\nconst Bar: FC<BarProps> = ({\n value,\n type,\n barStyle,\n animated,\n min,\n max,\n color,\n barLabelName,\n id,\n \"data-testid\": dataTestId,\n className,\n allowExceedingMax = false\n}) => {\n const classNames = useMemo(() => {\n return cx(styles.bar, getStyle(styles, camelCase(\"type__\" + type + \"--\" + barStyle)), className, {\n [styles.animate]: animated\n });\n }, [type, barStyle, animated, className]);\n\n const valuePercentage = useMemo(() => {\n if (value === null || value === undefined) return 0;\n return calculatePercentage(value, min, max, allowExceedingMax);\n }, [value, min, max, allowExceedingMax]);\n\n const visualWidthPercentage = useMemo(() => {\n // For visual purposes, cap the width at 100% to prevent overflow\n return Math.min(valuePercentage, 100);\n }, [valuePercentage]);\n\n const ariaValueMax = useMemo(() => {\n // When allowExceedingMax is true and value exceeds max,\n // set aria-valuemax to the actual value percentage to maintain consistency\n if (allowExceedingMax && valuePercentage > 100) {\n return Math.max(valuePercentage, 100);\n }\n return 100;\n }, [allowExceedingMax, valuePercentage]);\n\n if (!value) return null;\n\n return (\n <div\n role=\"progressbar\"\n aria-label={barLabelName}\n aria-valuenow={valuePercentage}\n aria-valuemin={0}\n aria-valuemax={ariaValueMax}\n className={classNames}\n style={{\n width: `${visualWidthPercentage}%`,\n ...(color && { backgroundColor: color })\n }}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.BAR, id)}\n />\n );\n};\n\nexport default Bar;\n"],"names":["Bar","_ref","value","type","barStyle","animated","min","max","color","barLabelName","id","dataTestId","className","_ref$allowExceedingMa","allowExceedingMax","classNames","useMemo","cx","styles","bar","getStyle","camelCase","_defineProperty","animate","valuePercentage","calculatePercentage","visualWidthPercentage","Math","ariaValueMax","React","createElement","role","style","width","concat","backgroundColor","getTestId","ComponentDefaultTestId","BAR"],"mappings":"0ZAuDA,IAAMA,EAAoB,SAAjBC,GAaJ,IAZHC,EAAKD,EAALC,MACAC,EAAIF,EAAJE,KACAC,EAAQH,EAARG,SACAC,EAAQJ,EAARI,SACAC,EAAGL,EAAHK,IACAC,EAAGN,EAAHM,IACAC,EAAKP,EAALO,MACAC,EAAYR,EAAZQ,aACAC,EAAET,EAAFS,GACeC,EAAUV,EAAzB,eACAW,EAASX,EAATW,UAASC,EAAAZ,EACTa,kBAAAA,OAAoB,IAAHD,GAAQA,EAEnBE,EAAaC,GAAQ,WACzB,OAAOC,EAAGC,EAAOC,IAAKC,EAASF,EAAQG,EAAU,SAAWlB,EAAO,KAAOC,IAAYQ,EAASU,EAC5FJ,CAAAA,EAAAA,EAAOK,QAAUlB,GAErB,GAAE,CAACF,EAAMC,EAAUC,EAAUO,IAExBY,EAAkBR,GAAQ,WAC9B,OAAId,QAA8C,EAC3CuB,EAAoBvB,EAAOI,EAAKC,EAAKO,EAC7C,GAAE,CAACZ,EAAOI,EAAKC,EAAKO,IAEfY,EAAwBV,GAAQ,WAEpC,OAAOW,KAAKrB,IAAIkB,EAAiB,IACnC,GAAG,CAACA,IAEEI,EAAeZ,GAAQ,WAG3B,OAAIF,GAAqBU,EAAkB,IAClCG,KAAKpB,IAAIiB,EAAiB,KAE5B,GACT,GAAG,CAACV,EAAmBU,IAEvB,OAAKtB,EAGH2B,EACEC,cAAA,MAAA,CAAAC,KAAK,2BACOtB,EAAY,gBACTe,EAAe,gBACf,EAAC,gBACDI,EACfhB,UAAWG,EACXiB,qBACEC,MAAK,GAAAC,OAAKR,EAAqB,MAC3BlB,GAAS,CAAE2B,gBAAiB3B,IAElCE,GAAIA,EAAE,cACOC,GAAcyB,EAAUC,EAAuBC,IAAK5B,KAflD,IAkBrB"}
|
package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var r={bar:"bar",typePrimaryPrimary:"typePrimaryPrimary",typePrimarySecondary:"typePrimarySecondary",typePrimaryPositive:"typePrimaryPositive",typePrimaryNegative:"typePrimaryNegative",typePrimaryWarning:"typePrimaryWarning",typeSecondaryPrimary:"typeSecondaryPrimary",typeSecondarySecondary:"typeSecondarySecondary",typeSecondaryPositive:"typeSecondaryPositive",typeSecondaryNegative:"typeSecondaryNegative",typeSecondaryWarning:"typeSecondaryWarning",animate:"animate"};!function(r){const e="s_id-42e81e30eb6c_4_5_4";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+e))return;const a=document.createElement("style");a.id=e,n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.appendChild(document.createTextNode(r))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=r)}(".bar {\n inset-inline-start: 0;\n height: 100%;\n position: absolute;\n border-radius: var(--border-radius-small);\n}\n\n.typePrimaryPrimary {\n background-color: var(--primary-color);\n}\n\n.typePrimarySecondary {\n background-color: var(--inverted-color-background);\n}\n\n.typePrimaryPositive {\n background-color: var(--positive-color);\n}\n\n.typePrimaryNegative {\n background-color: var(--negative-color);\n}\n\n.typePrimaryWarning {\n background-color: var(--warning-color);\n}\n\n.typeSecondaryPrimary {\n background-color: var(--primary-selected-color);\n}\n\n.typeSecondarySecondary {\n background-color: var(--ui-border-color);\n}\n\n.typeSecondaryPositive {\n background-color: var(--positive-color-selected);\n}\n\n.typeSecondaryNegative {\n background-color: var(--negative-color-selected);\n}\n\n.typeSecondaryWarning {\n background-color: var(--warning-color-selected);\n}\n\n.animate {\n transition: width 300ms var(--motion-timing-transition);\n}");export{r as default};
|
|
2
|
-
//# sourceMappingURL=Bar.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as e,toConsumableArray as a}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import r,{forwardRef as t,useMemo as l}from"react";import i from"classnames";import{getStyle as n}from"@vibe/shared";import o from"../PercentageLabel/PercentageLabel.js";import{calculatePercentage as m,getProgressBarClassNames as s}from"./ProgressBarHelpers.js";import d from"./Bar/Bar.js";import{ComponentDefaultTestId as c,ComponentVibeId as u}from"../../../tests/constants.js";import{getTestId as v}from"../../../tests/testIds.js";import p from"./ProgressBar.module.scss.js";var f=t((function(t,f){var b=t.min,E=void 0===b?0:b,y=t.max,g=void 0===y?100:y,x=t.value,R=void 0===x?0:x,P=t.valueSecondary,S=void 0===P?0:P,_=t.animated,B=void 0===_||_,N=t.barStyle,j=void 0===N?"primary":N,A=t.className,w=t.size,M=void 0===w?"small":w,h=t.indicateProgress,L=void 0!==h&&h,O=t.multi,C=void 0!==O&&O,F=t.multiValues,G=void 0===F?[]:F,H=t["aria-label"],I=void 0===H?"":H,W=t.id,Y=t.fullWidth,k=void 0!==Y&&Y,z=t.allowExceedingMax,D=void 0!==z&&z,V=t["data-testid"],q=l((function(){return i(p.wrapper,e(e({},n(p,""+M),M),p.fullWidth,k),A)}),[M,k,A]),J=l((function(){if(C){var e=G&&G.length&&G[0].value;return null==e?0:m(e,E,g,D)}return null==R?0:m(R,E,g,D)}),[R,E,g,C,G,D]),K=l((function(){return C?r.createElement(r.Fragment,null,a(G).reverse().map((function(e,a){var t=e.value,l=e.color;return r.createElement(d,{className:s(t),barStyle:"none",value:t,animated:B,type:"primary",color:l,min:E,max:g,allowExceedingMax:D,id:"bar_".concat(l,"_").concat(a),key:"bar_".concat(l,"_").concat(a)})}))):null}),[E,g,B,G,C,D]),Q=L?r.createElement(o,{forElement:"linear-progress-bar",value:J}):null,T=C?null:r.createElement(r.Fragment,null,r.createElement(d,{className:s(R),barLabelName:I,barStyle:j,value:S,animated:B,type:"secondary",min:E,max:g,allowExceedingMax:D,"data-testid":c.BAR_SECONDARY}),r.createElement(d,{className:s(R),barStyle:j,value:R,animated:B,type:"primary",min:E,max:g,allowExceedingMax:D,"data-testid":c.BAR_PRIMARY}));return r.createElement("div",{className:q,ref:f,id:W,"data-testid":V||v(c.PROGRESS_BAR,W),"data-vibe":u.PROGRESS_BAR},r.createElement("div",{className:p.container},T,K),Q)}));export{f as default};
|
|
2
|
-
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../../../../src/components/ProgressBars/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\nimport cx from \"classnames\";\nimport { getStyle } from \"@vibe/shared\";\nimport PercentageLabel from \"../PercentageLabel/PercentageLabel\";\nimport { type ProgressBarSize, type ProgressBarStyle } from \"./ProgressBar.types\";\nimport { calculatePercentage, getProgressBarClassNames } from \"./ProgressBarHelpers\";\nimport Bar from \"./Bar/Bar\";\nimport { type VibeComponentProps } from \"../../../types\";\nimport { ComponentDefaultTestId, ComponentVibeId } from \"../../../tests/constants\";\nimport { getTestId } from \"../../../tests/test-ids-utils\";\nimport styles from \"./ProgressBar.module.scss\";\n\nexport interface ProgressBarProps extends VibeComponentProps {\n /**\n * Determines the visual style of the progress bar.\n */\n barStyle?: ProgressBarStyle;\n /**\n * The minimum value of the progress bar.\n */\n min?: number;\n /**\n * The maximum value of the progress bar.\n */\n max?: number;\n /**\n * The current progress value.\n */\n value?: number;\n /**\n * The secondary progress value.\n */\n valueSecondary?: number;\n /**\n * If true, enables animation effects.\n */\n animated?: boolean;\n /**\n * The size of the progress bar.\n */\n size?: ProgressBarSize;\n /**\n * If true, displays the progress percentage.\n */\n indicateProgress?: boolean;\n /**\n * If true, enables multiple progress bars.\n * **Note:** `value`, `valueSecondary`, and `barStyle` will not be used.\n */\n multi?: boolean;\n /**\n * An array of bar values and colors for multi-bar mode.\n */\n multiValues?: {\n /**\n * The progress value for a bar.\n */\n value?: number;\n /**\n * The bar color in hex format (`#000000` - `#ffffff`).\n */\n color?: string;\n }[];\n /**\n * The ARIA label for the progress bar.\n */\n \"aria-label\"?: string;\n /**\n * If true, makes the progress bar span the full container width.\n */\n fullWidth?: boolean;\n /**\n * If true, allows displaying percentage values higher than 100% when value exceeds max.\n */\n allowExceedingMax?: boolean;\n}\n\nconst ProgressBar = forwardRef(\n (\n {\n min = 0,\n max = 100,\n value = 0,\n valueSecondary = 0,\n animated = true,\n barStyle = \"primary\",\n className,\n size = \"small\",\n indicateProgress = false,\n multi = false,\n multiValues = [],\n \"aria-label\": ariaLabel = \"\",\n id,\n fullWidth = false,\n allowExceedingMax = false,\n \"data-testid\": dataTestId\n }: ProgressBarProps,\n ref: React.ForwardedRef<HTMLDivElement>\n ) => {\n const wrapperClassName = useMemo(() => {\n return cx(\n styles.wrapper,\n {\n [getStyle(styles, size.toString())]: size,\n [styles.fullWidth]: fullWidth\n },\n className\n );\n }, [size, fullWidth, className]);\n\n const valuePercentage = useMemo(() => {\n if (multi) {\n const firstValue = multiValues && multiValues.length && multiValues[0].value;\n if (firstValue === null || firstValue === undefined) return 0;\n return calculatePercentage(firstValue, min, max, allowExceedingMax);\n }\n if (value === null || value === undefined) return 0;\n return calculatePercentage(value, min, max, allowExceedingMax);\n }, [value, min, max, multi, multiValues, allowExceedingMax]);\n\n const renderMultiBars = useMemo(() => {\n if (!multi) return null;\n return (\n <>\n {[...multiValues].reverse().map(({ value: baseValue, color }, i) => (\n <Bar\n className={getProgressBarClassNames(baseValue)}\n barStyle=\"none\"\n value={baseValue}\n animated={animated}\n type=\"primary\"\n color={color}\n min={min}\n max={max}\n allowExceedingMax={allowExceedingMax}\n id={`bar_${color}_${i}`}\n key={`bar_${color}_${i}`}\n />\n ))}\n </>\n );\n }, [min, max, animated, multiValues, multi, allowExceedingMax]);\n\n const renderPercentage = indicateProgress ? (\n <PercentageLabel forElement=\"linear-progress-bar\" value={valuePercentage} />\n ) : null;\n\n const renderBaseBars = !multi ? (\n <>\n <Bar\n className={getProgressBarClassNames(value)}\n barLabelName={ariaLabel}\n barStyle={barStyle}\n value={valueSecondary}\n animated={animated}\n type=\"secondary\"\n min={min}\n max={max}\n allowExceedingMax={allowExceedingMax}\n data-testid={ComponentDefaultTestId.BAR_SECONDARY}\n />\n <Bar\n className={getProgressBarClassNames(value)}\n barStyle={barStyle}\n value={value}\n animated={animated}\n type=\"primary\"\n min={min}\n max={max}\n allowExceedingMax={allowExceedingMax}\n data-testid={ComponentDefaultTestId.BAR_PRIMARY}\n />\n </>\n ) : null;\n\n return (\n <div\n className={wrapperClassName}\n ref={ref}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.PROGRESS_BAR, id)}\n data-vibe={ComponentVibeId.PROGRESS_BAR}\n >\n <div className={styles.container}>\n {renderBaseBars}\n {renderMultiBars}\n </div>\n {renderPercentage}\n </div>\n );\n }\n);\n\nexport default ProgressBar;\n"],"names":["ProgressBar","forwardRef","_ref","ref","_ref$min","min","_ref$max","max","_ref$value","value","_ref$valueSecondary","valueSecondary","_ref$animated","animated","_ref$barStyle","barStyle","className","_ref$size","size","_ref$indicateProgress","indicateProgress","_ref$multi","multi","_ref$multiValues","multiValues","_ref$ariaLabel","ariaLabel","id","_ref$fullWidth","fullWidth","_ref$allowExceedingMa","allowExceedingMax","dataTestId","wrapperClassName","useMemo","cx","styles","wrapper","_defineProperty","getStyle","valuePercentage","firstValue","length","calculatePercentage","renderMultiBars","React","createElement","Fragment","_toConsumableArray","reverse","map","_ref2","i","baseValue","color","Bar","getProgressBarClassNames","type","concat","key","renderPercentage","PercentageLabel","forElement","renderBaseBars","barLabelName","ComponentDefaultTestId","BAR_SECONDARY","BAR_PRIMARY","getTestId","PROGRESS_BAR","ComponentVibeId","container"],"mappings":"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"}
|
package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={wrapper:"wrapper",fullWidth:"fullWidth",container:"container",progressBar:"progressBar",completed:"completed",label:"label",large:"large",medium:"medium",small:"small"};!function(e){const n="s_id-90665a136ed0_4_5_4";if("undefined"!=typeof document){const r=document.head||document.getElementsByTagName("head")[0];if(r.querySelector("#"+n))return;const t=document.createElement("style");t.id=n,r.firstChild?r.insertBefore(t,r.firstChild):r.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.wrapper {\n display: flex;\n flex-direction: row;\n justify-content: center;\n width: 100%;\n font: var(--font-text2-normal);\n line-height: 8px !important;\n}\n.wrapper.fullWidth {\n width: 100%;\n}\n.wrapper.fullWidth .container {\n border-radius: 0;\n}\n.wrapper.fullWidth .container .progressBar {\n border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;\n}\n.wrapper.fullWidth .container .progressBar.completed {\n border-radius: 0;\n}\n.label {\n padding-inline-start: var(--space-4);\n}\n.large {\n height: 8px;\n line-height: 8px;\n}\n.medium {\n height: 6px;\n line-height: 6px;\n}\n.small {\n height: 4px;\n line-height: 4px;\n}\n.container {\n position: relative;\n width: 100%;\n background-color: var(--ui-background-color);\n border-radius: var(--border-radius-small);\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=ProgressBar.module.scss.js.map
|
package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as r}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import e from"classnames";import o from"./ProgressBar.module.scss.js";var s=function(r,e,o,s){var m=Number(r-e)/Number(o-e)*100;return!s&&m>100?100:m},m=function(s){return e(o.progressBar,r({},o.completed,s>=100))};export{s as calculatePercentage,m as getProgressBarClassNames};
|
|
2
|
-
//# sourceMappingURL=ProgressBarHelpers.js.map
|
package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBarHelpers.js","sources":["../../../../../../src/components/ProgressBars/ProgressBar/ProgressBarHelpers.ts"],"sourcesContent":["import { type SIZES } from \"./../../../constants/sizes\";\nimport cx from \"classnames\";\nimport styles from \"./ProgressBar.module.scss\";\n\nexport type Size = (typeof SIZES)[keyof typeof SIZES];\n\nexport const calculatePercentage = (value: number, min: number, max: number, allowExceeding?: boolean) => {\n const valuePercentage = (Number(value - min) / Number(max - min)) * 100;\n return !allowExceeding && valuePercentage > 100 ? 100 : valuePercentage;\n};\n\nexport const getProgressBarClassNames = (value: number) => {\n return cx(styles.progressBar, { [styles.completed]: value >= 100 });\n};\n"],"names":["calculatePercentage","value","min","max","allowExceeding","valuePercentage","Number","getProgressBarClassNames","cx","styles","progressBar","_defineProperty","completed"],"mappings":"yJAMaA,IAAAA,EAAsB,SAACC,EAAeC,EAAaC,EAAaC,GAC3E,IAAMC,EAAmBC,OAAOL,EAAQC,GAAOI,OAAOH,EAAMD,GAAQ,IACpE,OAAQE,GAAkBC,EAAkB,IAAM,IAAMA,CAC1D,EAEaE,EAA2B,SAACN,GACvC,OAAOO,EAAGC,EAAOC,YAAWC,EAAA,CAAA,EAAKF,EAAOG,UAAYX,GAAS,KAC/D"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{convertToArray as t}from"@vibe/shared";var r=0,o=20,e="en-US";var n=Object.freeze({MIN_PRECISION:r,MAX_PRECISION:o,DEFAULT_LOCAL:e});function a(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.local,c=void 0===i?e:i,l=a.isCompact,m=void 0===l||l,u=a.precision,s=void 0===u?2:u;if(null!=n){var v=function(r){var o;try{o=!!Intl.NumberFormat.supportedLocalesOf(t(r),{localeMatcher:"lookup"}).length}catch(t){o=!1}return o}(c),f=function(t){return r>t?r:t>o?o:t}(s);return new Intl.NumberFormat(v?c:e,Object.assign(Object.assign({},m&&{notation:"compact"}),{maximumFractionDigits:f})).format(n)}}export{a as formatNumber,n as formatNumberConsts};
|
|
2
|
-
//# sourceMappingURL=textManipulations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"textManipulations.js","sources":["../../../../src/helpers/textManipulations.ts"],"sourcesContent":["import { convertToArray } from \"@vibe/shared\";\n\nconst MIN_PRECISION = 0;\nconst MAX_PRECISION = 20;\nconst DEFAULT_LOCAL = \"en-US\";\n\nfunction validateLocalSupported(local: string) {\n let isLocalSupported;\n try {\n const options = { localeMatcher: \"lookup\" as const };\n isLocalSupported = !!Intl.NumberFormat.supportedLocalesOf(convertToArray(local), options).length;\n } catch (err) {\n isLocalSupported = false;\n }\n\n return isLocalSupported;\n}\n\nfunction validatePrecision(precision: number) {\n if (precision < MIN_PRECISION) return MIN_PRECISION;\n if (precision > MAX_PRECISION) return MAX_PRECISION;\n return precision;\n}\n\nexport const formatNumberConsts = Object.freeze({\n MIN_PRECISION,\n MAX_PRECISION,\n DEFAULT_LOCAL\n});\n\nexport function formatNumber(\n value: number,\n {\n local = DEFAULT_LOCAL,\n isCompact = true,\n precision = 2\n }: { local?: Intl.Locale[\"language\"]; isCompact?: boolean; precision?: number } = {}\n) {\n if (value === undefined || value === null) return;\n const isLocalSupported = validateLocalSupported(local);\n const normalizedPrecision = validatePrecision(precision);\n const selectedLocal = isLocalSupported ? local : DEFAULT_LOCAL;\n return new Intl.NumberFormat(selectedLocal, {\n ...(isCompact && { notation: \"compact\" }),\n maximumFractionDigits: normalizedPrecision\n }).format(value);\n}\n"],"names":["MIN_PRECISION","MAX_PRECISION","DEFAULT_LOCAL","formatNumberConsts","Object","freeze","formatNumber","value","_ref","arguments","length","undefined","_ref$local","local","_ref$isCompact","isCompact","_ref$precision","precision","isLocalSupported","Intl","NumberFormat","supportedLocalesOf","convertToArray","localeMatcher","err","validateLocalSupported","normalizedPrecision","validatePrecision","assign","notation","maximumFractionDigits","format"],"mappings":"8CAEA,IAAMA,EAAgB,EAChBC,EAAgB,GAChBC,EAAgB,YAoBTC,EAAqBC,OAAOC,OAAO,CAC9CL,cAAAA,EACAC,cAAAA,EACAC,cAAAA,aAGcI,EACdC,GAKoF,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAF,CAAE,EAAAG,EAAAJ,EAHlFK,MAAAA,OAAQX,IAAHU,EAAGV,EAAaU,EAAAE,EAAAN,EACrBO,UAAAA,OAAY,IAAHD,GAAOA,EAAAE,EAAAR,EAChBS,UAAAA,OAAY,IAAHD,EAAG,EAACA,EAGf,GAAIT,QAAJ,CACA,IAAMW,EAjCR,SAAgCL,GAC9B,IAAIK,EACJ,IAEEA,IAAqBC,KAAKC,aAAaC,mBAAmBC,EAAeT,GADzD,CAAEU,cAAe,WACyDb,MAC3F,CAAC,MAAOc,GACPN,GAAmB,CACrB,CAEA,OAAOA,CACT,CAuB2BO,CAAuBZ,GAC1Ca,EAtBR,SAA2BT,GACzB,OAAgBjB,EAAZiB,EAAkCjB,EAClCiB,EAAYhB,EAAsBA,EAC/BgB,CACT,CAkB8BU,CAAkBV,GAE9C,OAAO,IAAIE,KAAKC,aADMF,EAAmBL,EAAQX,EACPE,OAAAwB,OAAAxB,OAAAwB,OAAA,CAAA,EACpCb,GAAa,CAAEc,SAAU,YAC7B,CAAAC,sBAAuBJ,KACtBK,OAAOxB,EAPiC,CAQ7C"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e,{forwardRef as t,useRef as a,useCallback as o,useEffect as n,useMemo as r}from"react";import i from"classnames";import{isNil as l,noop as s}from"es-toolkit";import{useSupportFirefoxLabelClick as c}from"./hooks/useSupportFirefoxLabelClick.js";import{getTestId as d}from"../../tests/testIds.js";import{ComponentDefaultTestId as m,ComponentVibeId as u}from"../../tests/constants.js";import p from"./Checkbox.module.scss.js";import C from"../../../components/icon/dist/Icon/Icon.js";import b from"../../../icons/dist/react/Remove.js";import f from"../../../icons/dist/react/Check.js";import h from"../../../components/typography/dist/Text/Text.js";import{useMergeRef as v}from"../../../shared/dist/hooks/useMergeRef.js";var k=t((function(t,k){var E=t.className,x=t.checkboxClassName,y=t.labelClassName,N=t["aria-label"],B=t.label,K=t["aria-labelledby"],g=t.onChange,F=void 0===g?s:g,H=t.checked,O=t.autoFocus,X=t.indeterminate,j=void 0!==X&&X,w=t.disabled,I=void 0!==w&&w,L=t.defaultChecked,A=t.tabIndex,M=t.value,_=void 0===M?"":M,D=t.name,R=void 0===D?"":D,S=t.id,T=t.separateLabel,U=void 0!==T&&T,q=t["data-testid"],z=a(null),G=v(k,z),J=o((function(e){var t=e.currentTarget;window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){t.blur()}))}))}),[]),P=L;l(P)&&l(H)&&(P=!1),n((function(){z.current&&(z.current.indeterminate=j)}),[z,j]);var Q=c({inputRef:z}).onClickCapture,V=r((function(){return N||("string"==typeof B?B:"")}),[N,B]),W=o((function(e){var t;" "===e.key&&(e.preventDefault(),null===(t=z.current)||void 0===t||t.click())}),[z]),Y=I?void 0:null!=A?A:0;return U?e.createElement("div",{className:i(p.wrapper,E),"data-testid":q||d(m.CHECKBOX,S),"data-vibe":u.CHECKBOX},e.createElement("input",{ref:G,id:S,className:p.input,value:_,name:R,type:"checkbox",autoFocus:O,onChange:F,defaultChecked:P,disabled:I,"aria-label":V,"aria-labelledby":K,checked:H,tabIndex:-1}),e.createElement("label",{htmlFor:S,className:i(p.checkbox,x),"data-testid":d(m.CHECKBOX_CHECKBOX,S),tabIndex:Y,onMouseUp:J,onKeyDown:W,onClickCapture:Q},e.createElement(C,{className:p.icon,type:"svg",icon:j?b:f,ignoreFocusStyle:!0,"aria-hidden":!0,size:"16"})),!1===B?null:e.createElement("label",{htmlFor:S,className:i(p.label,y),"data-testid":d(m.CHECKBOX_LABEL,S),onMouseUp:J,onClickCapture:Q},e.createElement(h,{element:"span",type:"text2"},B))):e.createElement("label",{className:i(p.wrapper,E),tabIndex:Y,onMouseUp:J,onKeyDown:W,"data-testid":q||d(m.CHECKBOX,S),htmlFor:S,onClickCapture:Q,"data-vibe":u.CHECKBOX},e.createElement("input",{ref:G,id:S,className:p.input,value:_,name:R,type:"checkbox",autoFocus:O,onChange:F,defaultChecked:P,disabled:I,"aria-label":V,"aria-labelledby":K,checked:H,tabIndex:-1}),e.createElement("div",{className:i(p.checkbox,x),"data-testid":d(m.CHECKBOX_CHECKBOX,S)},e.createElement(C,{className:p.icon,type:"svg",icon:j?b:f,ignoreFocusStyle:!0,"aria-hidden":!0,size:"16"})),!1===B?null:e.createElement(h,{element:"span",type:"text2",className:i(p.label,y),"data-testid":d(m.CHECKBOX_LABEL,S)},B))}));export{k as default};
|
|
2
|
-
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useEffect, useMemo, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { isNil, noop as NOOP } from \"es-toolkit\";\nimport { Icon } from \"@vibe/icon\";\nimport { Check, Remove } from \"@vibe/icons\";\nimport { useSupportFirefoxLabelClick } from \"./hooks/useSupportFirefoxLabelClick\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId, ComponentVibeId } from \"../../tests/constants\";\nimport { Text } from \"@vibe/typography\";\nimport styles from \"./Checkbox.module.scss\";\n\nexport interface CheckBoxProps extends VibeComponentProps {\n /**\n * Class name applied to the checkbox element.\n */\n checkboxClassName?: string;\n /**\n * Class name applied to the label element.\n */\n labelClassName?: string;\n /**\n * The label of the checkbox for accessibility.\n */\n \"aria-label\"?: string;\n /**\n * The content displayed next to the checkbox.\n */\n label?: React.ReactNode | Array<React.ReactNode>;\n /**\n * The ID of an element describing the checkbox.\n */\n \"aria-labelledby\"?: string;\n /**\n * Callback fired when the checkbox value changes.\n */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * If true, controls the checked state of the checkbox.\n */\n checked?: boolean;\n /**\n * If true, displays an indeterminate state.\n */\n indeterminate?: boolean;\n /**\n * If true, the checkbox automatically receives focus.\n */\n autoFocus?: boolean;\n /**\n * If true, the checkbox is disabled.\n */\n disabled?: boolean;\n /**\n * The initial checked state of the checkbox.\n */\n defaultChecked?: boolean;\n /**\n * The value submitted with the form when checked.\n */\n value?: string;\n /**\n * The name of the checkbox, used for form submission.\n */\n name?: string;\n /**\n * The tab order of the checkbox.\n */\n tabIndex?: number;\n /**\n * If true, uses separate labels with htmlFor/id association instead of wrapping the input.\n * If using this the id prop is required for it to function correctly.\n */\n separateLabel?: boolean;\n}\n\nconst Checkbox = forwardRef(\n (\n {\n className,\n checkboxClassName,\n labelClassName,\n \"aria-label\": ariaLabel,\n label,\n \"aria-labelledby\": ariaLabelledBy,\n onChange = NOOP,\n checked,\n autoFocus,\n indeterminate = false,\n disabled = false,\n defaultChecked,\n tabIndex,\n value = \"\",\n name = \"\",\n id,\n separateLabel = false,\n \"data-testid\": dataTestId\n }: CheckBoxProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const inputRef = useRef<HTMLInputElement>(null);\n const mergedInputRef = useMergeRef(ref, inputRef);\n\n const onMouseUpCallback = useCallback((e: React.MouseEvent<HTMLElement>) => {\n const target = e.currentTarget;\n window.requestAnimationFrame(() => {\n window.requestAnimationFrame(() => {\n target.blur();\n });\n });\n }, []);\n\n let overrideDefaultChecked = defaultChecked;\n\n // If component did not receive default checked and checked props, choose default checked as\n // default behavior (handle isChecked logic inside input) and set default value\n if (isNil(overrideDefaultChecked) && isNil(checked)) {\n overrideDefaultChecked = false;\n }\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = indeterminate;\n }\n }, [inputRef, indeterminate]);\n\n const { onClickCapture: onClickCaptureLabel } = useSupportFirefoxLabelClick({ inputRef });\n\n const finalAriaLabel = useMemo(() => {\n if (ariaLabel) return ariaLabel;\n if (typeof label === \"string\") return label;\n return \"\";\n }, [ariaLabel, label]);\n\n const onKeyDownCallback = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \" \") {\n e.preventDefault();\n inputRef.current?.click();\n }\n },\n [inputRef]\n );\n\n const wrapperTabIndex = disabled ? undefined : tabIndex ?? 0;\n\n if (separateLabel) {\n return (\n <div\n className={cx(styles.wrapper, className)}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.CHECKBOX, id)}\n data-vibe={ComponentVibeId.CHECKBOX}\n >\n <input\n ref={mergedInputRef}\n id={id}\n className={styles.input}\n value={value}\n name={name}\n type=\"checkbox\"\n autoFocus={autoFocus}\n onChange={onChange}\n defaultChecked={overrideDefaultChecked}\n disabled={disabled}\n aria-label={finalAriaLabel}\n aria-labelledby={ariaLabelledBy}\n checked={checked}\n tabIndex={-1}\n />\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n <label\n htmlFor={id}\n className={cx(styles.checkbox, checkboxClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_CHECKBOX, id)}\n tabIndex={wrapperTabIndex}\n onMouseUp={onMouseUpCallback}\n onKeyDown={onKeyDownCallback}\n onClickCapture={onClickCaptureLabel}\n >\n <Icon\n className={styles.icon}\n type=\"svg\"\n icon={indeterminate ? Remove : Check}\n ignoreFocusStyle\n aria-hidden={true}\n size=\"16\"\n />\n </label>\n {label === false ? null : (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <label\n htmlFor={id}\n className={cx(styles.label, labelClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_LABEL, id)}\n onMouseUp={onMouseUpCallback}\n onClickCapture={onClickCaptureLabel}\n >\n <Text element=\"span\" type=\"text2\">\n {label}\n </Text>\n </label>\n )}\n </div>\n );\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <label\n className={cx(styles.wrapper, className)}\n tabIndex={wrapperTabIndex}\n onMouseUp={onMouseUpCallback}\n onKeyDown={onKeyDownCallback}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.CHECKBOX, id)}\n htmlFor={id}\n onClickCapture={onClickCaptureLabel}\n data-vibe={ComponentVibeId.CHECKBOX}\n >\n <input\n ref={mergedInputRef}\n id={id}\n className={styles.input}\n value={value}\n name={name}\n type=\"checkbox\"\n autoFocus={autoFocus}\n onChange={onChange}\n defaultChecked={overrideDefaultChecked}\n disabled={disabled}\n aria-label={finalAriaLabel}\n aria-labelledby={ariaLabelledBy}\n checked={checked}\n tabIndex={-1}\n />\n <div\n className={cx(styles.checkbox, checkboxClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_CHECKBOX, id)}\n >\n <Icon\n className={styles.icon}\n type=\"svg\"\n icon={indeterminate ? Remove : Check}\n ignoreFocusStyle\n aria-hidden={true}\n size=\"16\"\n />\n </div>\n {label === false ? null : (\n <Text\n element=\"span\"\n type=\"text2\"\n className={cx(styles.label, labelClassName)}\n data-testid={getTestId(ComponentDefaultTestId.CHECKBOX_LABEL, id)}\n >\n {label}\n </Text>\n )}\n </label>\n );\n }\n);\n\nexport default Checkbox;\n"],"names":["Checkbox","forwardRef","_ref","ref","className","checkboxClassName","labelClassName","ariaLabel","label","ariaLabelledBy","_ref$onChange","onChange","NOOP","checked","autoFocus","_ref$indeterminate","indeterminate","_ref$disabled","disabled","defaultChecked","tabIndex","_ref$value","value","_ref$name","name","id","_ref$separateLabel","separateLabel","dataTestId","inputRef","useRef","mergedInputRef","useMergeRef","onMouseUpCallback","useCallback","e","target","currentTarget","window","requestAnimationFrame","blur","overrideDefaultChecked","isNil","useEffect","current","onClickCaptureLabel","useSupportFirefoxLabelClick","onClickCapture","finalAriaLabel","useMemo","onKeyDownCallback","key","preventDefault","_a","click","wrapperTabIndex","undefined","React","createElement","cx","styles","wrapper","getTestId","ComponentDefaultTestId","CHECKBOX","ComponentVibeId","input","type","htmlFor","checkbox","CHECKBOX_CHECKBOX","onMouseUp","onKeyDown","Icon","icon","Remove","Check","ignoreFocusStyle","size","CHECKBOX_LABEL","Text","element"],"mappings":"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"}
|