@vibe/core 4.5.8 → 4.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (338) hide show
  1. package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +1 -1
  2. package/dist/components/Badge/Badge.d.ts +1 -1
  3. package/dist/components/counter/dist/Counter/Counter.js +2 -0
  4. package/dist/components/counter/dist/Counter/Counter.js.map +1 -0
  5. package/dist/components/counter/dist/Counter/Counter.module.scss.js +2 -0
  6. package/dist/components/index.d.ts +2 -2
  7. package/dist/components/label/dist/Label/Label.module.scss.js +1 -1
  8. package/dist/components/label/dist/Label/LabelCelebrationAnimation.module.scss.js +1 -1
  9. package/dist/components/link/dist/Link/Link.module.scss.js +1 -1
  10. package/dist/components/radio-button/dist/RadioButton/RadioButton.js +2 -0
  11. package/dist/components/radio-button/dist/RadioButton/RadioButton.js.map +1 -0
  12. package/dist/components/radio-button/dist/RadioButton/RadioButton.module.scss.js +2 -0
  13. package/dist/hooks/dist/useAfterFirstRender/index.js.map +1 -0
  14. package/dist/hooks/index.d.ts +1 -2
  15. package/dist/metadata/components.json +2 -2
  16. package/dist/metadata.json +2 -2
  17. package/dist/mocked_classnames/components/AvatarGroup/AvatarGroup.types.d.ts +1 -1
  18. package/dist/mocked_classnames/components/Badge/Badge.d.ts +1 -1
  19. package/dist/mocked_classnames/components/index.d.ts +2 -2
  20. package/dist/mocked_classnames/hooks/index.d.ts +1 -2
  21. package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  22. package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  23. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  24. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  25. package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  26. package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  27. package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
  28. package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
  29. package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  30. package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
  31. package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
  32. package/dist/mocked_classnames/src/components/Avatar/Avatar.module.scss.js +1 -1
  33. package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
  34. package/dist/mocked_classnames/src/components/Avatar/AvatarContent.module.scss.js +1 -1
  35. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  36. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.js +1 -1
  37. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.js.map +1 -1
  38. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  39. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  40. package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  41. package/dist/mocked_classnames/src/components/Badge/Badge.js +1 -1
  42. package/dist/mocked_classnames/src/components/Badge/Badge.js.map +1 -1
  43. package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
  44. package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  45. package/dist/mocked_classnames/src/components/BaseItem/BaseItem.module.scss.js +1 -1
  46. package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
  47. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  48. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  49. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
  50. package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  51. package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
  52. package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  53. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  54. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  55. package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  56. package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
  57. package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  58. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  59. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  60. package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  61. package/dist/mocked_classnames/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  62. package/dist/mocked_classnames/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  63. package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
  64. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
  65. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
  66. package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
  67. package/dist/mocked_classnames/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
  68. package/dist/mocked_classnames/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
  69. package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
  70. package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
  71. package/dist/mocked_classnames/src/components/EditableText/EditableText.module.scss.js +1 -1
  72. package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
  73. package/dist/mocked_classnames/src/components/EmptyState/EmptyState.module.scss.js +1 -1
  74. package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  75. package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +1 -1
  76. package/dist/mocked_classnames/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
  77. package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
  78. package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
  79. package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
  80. package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  81. package/dist/mocked_classnames/src/components/ListItem/ListItem.module.scss.js +1 -1
  82. package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  83. package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  84. package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  85. package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  86. package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  87. package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  88. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
  89. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
  90. package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
  91. package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  92. package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  93. package/dist/mocked_classnames/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  94. package/dist/mocked_classnames/src/components/Modal/Modal/Modal.module.scss.js +1 -1
  95. package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  96. package/dist/mocked_classnames/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
  97. package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
  98. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
  99. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
  100. package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
  101. package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
  102. package/dist/mocked_classnames/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
  103. package/dist/mocked_classnames/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
  104. package/dist/mocked_classnames/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
  105. package/dist/mocked_classnames/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
  106. package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  107. package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  108. package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
  109. package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
  110. package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
  111. package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  112. package/dist/mocked_classnames/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
  113. package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  114. package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
  115. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  116. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  117. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  118. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  119. package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  120. package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
  121. package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  122. package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
  123. package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
  124. package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
  125. package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  126. package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
  127. package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  128. package/dist/mocked_classnames/src/components/Switch/Switch.module.scss.js +1 -1
  129. package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
  130. package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
  131. package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
  132. package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
  133. package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
  134. package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
  135. package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
  136. package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
  137. package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
  138. package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
  139. package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  140. package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  141. package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  142. package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  143. package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
  144. package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
  145. package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  146. package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  147. package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  148. package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  149. package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  150. package/dist/mocked_classnames/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  151. package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  152. package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
  153. package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  154. package/dist/mocked_classnames/src/components/Toggle/MockToggle.module.scss.js +1 -1
  155. package/dist/mocked_classnames/src/components/Toggle/Toggle.module.scss.js +1 -1
  156. package/dist/mocked_classnames/src/components/Toggle/ToggleText.module.scss.js +1 -1
  157. package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
  158. package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  159. package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  160. package/dist/mocked_classnames/src/components/next/List/List.module.scss.js +1 -1
  161. package/dist/mocked_classnames/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
  162. package/dist/mocked_classnames/src/index.js +1 -1
  163. package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
  164. package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
  165. package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
  166. package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
  167. package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
  168. package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
  169. package/dist/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
  170. package/dist/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
  171. package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
  172. package/dist/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
  173. package/dist/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
  174. package/dist/src/components/Avatar/Avatar.module.scss.js +1 -1
  175. package/dist/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
  176. package/dist/src/components/Avatar/AvatarContent.module.scss.js +1 -1
  177. package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
  178. package/dist/src/components/AvatarGroup/AvatarGroupCounter.js +1 -1
  179. package/dist/src/components/AvatarGroup/AvatarGroupCounter.js.map +1 -1
  180. package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
  181. package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
  182. package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
  183. package/dist/src/components/Badge/Badge.js +1 -1
  184. package/dist/src/components/Badge/Badge.js.map +1 -1
  185. package/dist/src/components/Badge/Badge.module.scss.js +1 -1
  186. package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
  187. package/dist/src/components/BaseItem/BaseItem.module.scss.js +1 -1
  188. package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
  189. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
  190. package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
  191. package/dist/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
  192. package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
  193. package/dist/src/components/Chips/Chips.module.scss.js +1 -1
  194. package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
  195. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
  196. package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
  197. package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
  198. package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
  199. package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
  200. package/dist/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
  201. package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
  202. package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
  203. package/dist/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
  204. package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
  205. package/dist/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
  206. package/dist/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
  207. package/dist/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
  208. package/dist/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
  209. package/dist/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
  210. package/dist/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
  211. package/dist/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
  212. package/dist/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
  213. package/dist/src/components/EditableText/EditableText.module.scss.js +1 -1
  214. package/dist/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
  215. package/dist/src/components/EmptyState/EmptyState.module.scss.js +1 -1
  216. package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
  217. package/dist/src/components/HiddenText/HiddenText.module.scss.js +1 -1
  218. package/dist/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
  219. package/dist/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
  220. package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
  221. package/dist/src/components/List/List.module.scss.js +1 -1
  222. package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
  223. package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
  224. package/dist/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
  225. package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
  226. package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
  227. package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
  228. package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
  229. package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
  230. package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
  231. package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
  232. package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
  233. package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
  234. package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
  235. package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
  236. package/dist/src/components/Modal/Modal/Modal.module.scss.js +1 -1
  237. package/dist/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
  238. package/dist/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
  239. package/dist/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
  240. package/dist/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
  241. package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
  242. package/dist/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
  243. package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
  244. package/dist/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
  245. package/dist/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
  246. package/dist/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
  247. package/dist/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
  248. package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
  249. package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
  250. package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
  251. package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
  252. package/dist/src/components/Search/Search.module.scss.js +1 -1
  253. package/dist/src/components/Skeleton/Skeleton.module.scss.js +1 -1
  254. package/dist/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
  255. package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
  256. package/dist/src/components/Slider/Slider.module.scss.js +1 -1
  257. package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
  258. package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
  259. package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
  260. package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
  261. package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
  262. package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
  263. package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
  264. package/dist/src/components/Steps/Steps.module.scss.js +1 -1
  265. package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
  266. package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
  267. package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
  268. package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
  269. package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
  270. package/dist/src/components/Switch/Switch.module.scss.js +1 -1
  271. package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
  272. package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
  273. package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
  274. package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
  275. package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
  276. package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
  277. package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
  278. package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
  279. package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
  280. package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
  281. package/dist/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
  282. package/dist/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
  283. package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
  284. package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
  285. package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
  286. package/dist/src/components/TextField/TextField.module.scss.js +1 -1
  287. package/dist/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
  288. package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
  289. package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
  290. package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
  291. package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
  292. package/dist/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
  293. package/dist/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
  294. package/dist/src/components/Toast/Toast.module.scss.js +1 -1
  295. package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
  296. package/dist/src/components/Toggle/MockToggle.module.scss.js +1 -1
  297. package/dist/src/components/Toggle/Toggle.module.scss.js +1 -1
  298. package/dist/src/components/Toggle/ToggleText.module.scss.js +1 -1
  299. package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
  300. package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
  301. package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
  302. package/dist/src/components/next/List/List.module.scss.js +1 -1
  303. package/dist/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
  304. package/dist/src/index.js +1 -1
  305. package/dist/style/dist/index.min.css.js +1 -1
  306. package/package.json +13 -11
  307. package/dist/components/Counter/Counter.d.ts +0 -51
  308. package/dist/components/Counter/Counter.types.d.ts +0 -3
  309. package/dist/components/Counter/index.d.ts +0 -2
  310. package/dist/components/RadioButton/RadioButton.d.ts +0 -74
  311. package/dist/components/RadioButton/index.d.ts +0 -1
  312. package/dist/hooks/useAfterFirstRender/index.d.ts +0 -2
  313. package/dist/mocked_classnames/components/Counter/Counter.d.ts +0 -51
  314. package/dist/mocked_classnames/components/Counter/Counter.types.d.ts +0 -3
  315. package/dist/mocked_classnames/components/Counter/index.d.ts +0 -2
  316. package/dist/mocked_classnames/components/RadioButton/RadioButton.d.ts +0 -74
  317. package/dist/mocked_classnames/components/RadioButton/index.d.ts +0 -1
  318. package/dist/mocked_classnames/hooks/useAfterFirstRender/index.d.ts +0 -2
  319. package/dist/mocked_classnames/src/components/Counter/Counter.js +0 -2
  320. package/dist/mocked_classnames/src/components/Counter/Counter.js.map +0 -1
  321. package/dist/mocked_classnames/src/components/Counter/Counter.module.scss.js +0 -2
  322. package/dist/mocked_classnames/src/components/RadioButton/RadioButton.js +0 -2
  323. package/dist/mocked_classnames/src/components/RadioButton/RadioButton.js.map +0 -1
  324. package/dist/mocked_classnames/src/components/RadioButton/RadioButton.module.scss.js +0 -2
  325. package/dist/mocked_classnames/src/hooks/useAfterFirstRender/index.js.map +0 -1
  326. package/dist/src/components/Counter/Counter.js +0 -2
  327. package/dist/src/components/Counter/Counter.js.map +0 -1
  328. package/dist/src/components/Counter/Counter.module.scss.js +0 -2
  329. package/dist/src/components/Counter/Counter.module.scss.js.map +0 -1
  330. package/dist/src/components/RadioButton/RadioButton.js +0 -2
  331. package/dist/src/components/RadioButton/RadioButton.js.map +0 -1
  332. package/dist/src/components/RadioButton/RadioButton.module.scss.js +0 -2
  333. package/dist/src/components/RadioButton/RadioButton.module.scss.js.map +0 -1
  334. package/dist/src/hooks/useAfterFirstRender/index.js +0 -2
  335. package/dist/src/hooks/useAfterFirstRender/index.js.map +0 -1
  336. /package/dist/{mocked_classnames/src/components → components/counter/dist}/Counter/Counter.module.scss.js.map +0 -0
  337. /package/dist/{mocked_classnames/src/components → components/radio-button/dist}/RadioButton/RadioButton.module.scss.js.map +0 -0
  338. /package/dist/{mocked_classnames/src/hooks → hooks/dist}/useAfterFirstRender/index.js +0 -0
@@ -1,2 +0,0 @@
1
- export { default as Counter, type CounterProps } from "./Counter";
2
- export * from "./Counter.types";
@@ -1,74 +0,0 @@
1
- import React from "react";
2
- import { type VibeComponentProps } from "../../types";
3
- export interface RadioButtonProps extends VibeComponentProps {
4
- /**
5
- * Class name applied to the label text.
6
- */
7
- labelClassName?: string;
8
- /**
9
- * Class name applied to the radio button element.
10
- */
11
- radioButtonClassName?: string;
12
- /**
13
- * The label text displayed next to the radio button.
14
- */
15
- text?: string;
16
- /**
17
- * The value associated with the radio button.
18
- */
19
- value?: string;
20
- /**
21
- * The name of the radio button group.
22
- */
23
- name?: string;
24
- /**
25
- * If true, the radio button automatically receives focus on mount.
26
- */
27
- autoFocus?: boolean;
28
- /**
29
- * If true, the radio button is disabled.
30
- */
31
- disabled?: boolean;
32
- /**
33
- * The reason why the radio button is disabled, displayed in a tooltip.
34
- */
35
- disabledReason?: string;
36
- /**
37
- * If true, the radio button is checked by default.
38
- */
39
- defaultChecked?: boolean;
40
- /**
41
- * The child elements inside the radio button.
42
- */
43
- children?: React.ReactNode;
44
- /**
45
- * Callback fired when the radio button selection changes.
46
- */
47
- onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;
48
- /**
49
- * If provided, controls the checked state of the radio button.
50
- */
51
- checked?: boolean;
52
- /**
53
- * If true, clicking on children will trigger selection.
54
- */
55
- retainChildClick?: boolean;
56
- /**
57
- * The tab index applied to the children.
58
- */
59
- childrenTabIndex?: number;
60
- /**
61
- * If true, disables the label animation.
62
- */
63
- noLabelAnimation?: boolean;
64
- /**
65
- * ARIA label for accessibility when no text is provided.
66
- */
67
- "aria-label"?: string;
68
- /**
69
- * ID of element that describe this radio button.
70
- */
71
- "aria-describedby"?: string;
72
- }
73
- declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
74
- export default RadioButton;
@@ -1 +0,0 @@
1
- export { default as RadioButton, type RadioButtonProps } from "./RadioButton";
@@ -1,2 +0,0 @@
1
- import { type RefObject } from "react";
2
- export default function useAfterFirstRender(): RefObject<boolean>;
@@ -1,51 +0,0 @@
1
- import React from "react";
2
- import { type CounterColor, type CounterSize, type CounterType } from "./Counter.types";
3
- import { type VibeComponentProps } from "../../types";
4
- export interface CounterProps extends VibeComponentProps {
5
- /**
6
- * The ID of the element describing the counter.
7
- */
8
- "aria-labelledby"?: string;
9
- /**
10
- * Class name applied to the counter element.
11
- */
12
- counterClassName?: string;
13
- /**
14
- * The numeric value displayed in the counter.
15
- */
16
- count?: number;
17
- /**
18
- * The label of the counter for accessibility.
19
- */
20
- "aria-label"?: string;
21
- /**
22
- * The size of the counter.
23
- */
24
- size?: CounterSize;
25
- /**
26
- * The visual style of the counter.
27
- */
28
- kind?: CounterType;
29
- /**
30
- * The color of the counter.
31
- */
32
- color?: CounterColor;
33
- /**
34
- * The maximum number of digits displayed before truncation.
35
- */
36
- maxDigits?: number;
37
- /**
38
- * Text prepended to the counter value.
39
- */
40
- prefix?: string;
41
- /**
42
- * Callback fired when the counter is clicked.
43
- */
44
- onMouseDown?: (event: React.MouseEvent<HTMLSpanElement>) => void;
45
- /**
46
- * If true, disables counter animations.
47
- */
48
- noAnimation?: boolean;
49
- }
50
- declare const Counter: ({ className, counterClassName, count, size, kind, color, maxDigits, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, id, prefix, onMouseDown, noAnimation, "data-testid": dataTestId }: CounterProps) => React.JSX.Element;
51
- export default Counter;
@@ -1,3 +0,0 @@
1
- export type CounterType = "fill" | "line";
2
- export type CounterColor = "primary" | "dark" | "negative" | "light";
3
- export type CounterSize = "xs" | "small" | "large";
@@ -1,2 +0,0 @@
1
- export { default as Counter, type CounterProps } from "./Counter";
2
- export * from "./Counter.types";
@@ -1,74 +0,0 @@
1
- import React from "react";
2
- import { type VibeComponentProps } from "../../types";
3
- export interface RadioButtonProps extends VibeComponentProps {
4
- /**
5
- * Class name applied to the label text.
6
- */
7
- labelClassName?: string;
8
- /**
9
- * Class name applied to the radio button element.
10
- */
11
- radioButtonClassName?: string;
12
- /**
13
- * The label text displayed next to the radio button.
14
- */
15
- text?: string;
16
- /**
17
- * The value associated with the radio button.
18
- */
19
- value?: string;
20
- /**
21
- * The name of the radio button group.
22
- */
23
- name?: string;
24
- /**
25
- * If true, the radio button automatically receives focus on mount.
26
- */
27
- autoFocus?: boolean;
28
- /**
29
- * If true, the radio button is disabled.
30
- */
31
- disabled?: boolean;
32
- /**
33
- * The reason why the radio button is disabled, displayed in a tooltip.
34
- */
35
- disabledReason?: string;
36
- /**
37
- * If true, the radio button is checked by default.
38
- */
39
- defaultChecked?: boolean;
40
- /**
41
- * The child elements inside the radio button.
42
- */
43
- children?: React.ReactNode;
44
- /**
45
- * Callback fired when the radio button selection changes.
46
- */
47
- onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;
48
- /**
49
- * If provided, controls the checked state of the radio button.
50
- */
51
- checked?: boolean;
52
- /**
53
- * If true, clicking on children will trigger selection.
54
- */
55
- retainChildClick?: boolean;
56
- /**
57
- * The tab index applied to the children.
58
- */
59
- childrenTabIndex?: number;
60
- /**
61
- * If true, disables the label animation.
62
- */
63
- noLabelAnimation?: boolean;
64
- /**
65
- * ARIA label for accessibility when no text is provided.
66
- */
67
- "aria-label"?: string;
68
- /**
69
- * ID of element that describe this radio button.
70
- */
71
- "aria-describedby"?: string;
72
- }
73
- declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
74
- export default RadioButton;
@@ -1 +0,0 @@
1
- export { default as RadioButton, type RadioButtonProps } from "./RadioButton";
@@ -1,2 +0,0 @@
1
- import { type RefObject } from "react";
2
- export default function useAfterFirstRender(): RefObject<boolean>;
@@ -1,2 +0,0 @@
1
- import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{camelCase as i}from"es-toolkit";import{useEventListener as a,getStyle as o,NOOP as r}from"@vibe/shared";import{getTestId as n,ComponentDefaultTestId as s}from"../../tests/testIds.js";import l from"classnames";import d,{useState as c,useRef as m,useCallback as u,useEffect as f,useMemo as v}from"react";import{SwitchTransition as p,CSSTransition as E}from"react-transition-group";import b from"../../hooks/useAfterFirstRender/index.js";import x from"./Counter.module.scss.js";import{ComponentVibeId as N}from"../../tests/constants.js";var A=function(A){var g=A.className,k=A.counterClassName,y=A.count,h=void 0===y?0:y,j=A.size,C=void 0===j?"large":j,R=A.kind,w=void 0===R?"fill":R,M=A.color,T=void 0===M?"primary":M,D=A.maxDigits,O=void 0===D?3:D,U=A["aria-labelledby"],z=void 0===U?"":U,L=A["aria-label"],P=void 0===L?"":L,_=A.id,B=void 0===_?"":_,F=A.prefix,H=void 0===F?"":F,I=A.onMouseDown,q=void 0===I?r:I,G=A.noAnimation,J=void 0!==G&&G,K=A["data-testid"],Q=c(!1),S=e(Q,2),V=S[0],W=S[1],X=m(null),Y=m(null),Z=u((function(){W(!0)}),[W]),$=u((function(){W(!1)}),[W]);a({eventName:"animationend",callback:$,ref:X});var ee=b();f((function(){ee.current&&Z()}),[h,ee,Z]),f((function(){O>0||console.error("Max digits must be a positive number")}),[O]);var te=v((function(){return l(x.counter,o(x,i("size-"+C)),o(x,i("kind-"+w)),o(x,i("color-"+T)),t({},x.withAnimation,V),k)}),[C,w,T,V,k]),ie="counter"+(B?"-".concat(B):""),ae=(null==h?void 0:(""+h).length)>O?"".concat(Math.pow(10,O)-1,"+"):h+"",oe=d.createElement("span",{id:ie,"data-testid":K||n(s.COUNTER,B)},H+ae);return d.createElement("span",{className:g,"aria-label":"".concat(P," ").concat(ae),"aria-labelledby":z,onMouseDown:q,"data-vibe":N.COUNTER},d.createElement("div",{className:te,"aria-label":ae,ref:X},J?oe:d.createElement(p,{mode:"out-in"},d.createElement(E,{key:ae,nodeRef:Y,classNames:{enter:x.fadeEnter,enterActive:x.fadeEnterActive,exit:x.fadeExit,exitActive:x.fadeExitActive},addEndListener:function(e){var t;null===(t=Y.current)||void 0===t||t.addEventListener("transitionend",e,!1)}},d.createElement("span",{ref:Y,id:ie,"data-testid":K||n(s.COUNTER,B)},H+ae)))))};export{A as default};
2
- //# sourceMappingURL=Counter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Counter.js","sources":["../../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { getStyle, NOOP } from \"@vibe/shared\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { CSSTransition, SwitchTransition } from \"react-transition-group\";\nimport useEventListener from \"../../hooks/useEventListener\";\nimport useAfterFirstRender from \"../../hooks/useAfterFirstRender\";\n\nimport { type CounterColor, type CounterSize, type CounterType } from \"./Counter.types\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Counter.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface CounterProps extends VibeComponentProps {\n /**\n * The ID of the element describing the counter.\n */\n \"aria-labelledby\"?: string;\n /**\n * Class name applied to the counter element.\n */\n counterClassName?: string;\n /**\n * The numeric value displayed in the counter.\n */\n count?: number;\n /**\n * The label of the counter for accessibility.\n */\n \"aria-label\"?: string;\n /**\n * The size of the counter.\n */\n size?: CounterSize;\n /**\n * The visual style of the counter.\n */\n kind?: CounterType;\n /**\n * The color of the counter.\n */\n color?: CounterColor;\n /**\n * The maximum number of digits displayed before truncation.\n */\n maxDigits?: number;\n /**\n * Text prepended to the counter value.\n */\n prefix?: string;\n /**\n * Callback fired when the counter is clicked.\n */\n onMouseDown?: (event: React.MouseEvent<HTMLSpanElement>) => void;\n /**\n * If true, disables counter animations.\n */\n noAnimation?: boolean;\n}\n\nconst Counter = ({\n className,\n counterClassName,\n count = 0,\n size = \"large\",\n kind = \"fill\",\n color = \"primary\",\n maxDigits = 3,\n \"aria-labelledby\": ariaLabelledBy = \"\",\n \"aria-label\": ariaLabel = \"\",\n id = \"\",\n prefix = \"\",\n onMouseDown = NOOP,\n noAnimation = false,\n \"data-testid\": dataTestId\n}: CounterProps) => {\n const [countChangeAnimationState, setCountChangeAnimationState] = useState(false);\n\n const ref = useRef<HTMLDivElement>(null);\n const nodeRef = useRef<HTMLSpanElement>(null);\n\n const setCountChangedAnimationActive = useCallback(() => {\n setCountChangeAnimationState(true);\n }, [setCountChangeAnimationState]);\n\n const setCountChangedAnimationNotActive = useCallback(() => {\n setCountChangeAnimationState(false);\n }, [setCountChangeAnimationState]);\n\n useEventListener({\n eventName: \"animationend\",\n callback: setCountChangedAnimationNotActive,\n ref\n });\n\n const isAfterFirstRender = useAfterFirstRender();\n\n useEffect(() => {\n if (isAfterFirstRender.current) {\n setCountChangedAnimationActive();\n }\n }, [count, isAfterFirstRender, setCountChangedAnimationActive]);\n\n useEffect(() => {\n if (maxDigits <= 0) {\n console.error(\"Max digits must be a positive number\");\n }\n }, [maxDigits]);\n\n const classNames = useMemo(() => {\n return cx(\n styles.counter,\n getStyle(styles, camelCase(\"size-\" + size)),\n getStyle(styles, camelCase(\"kind-\" + kind)),\n getStyle(styles, camelCase(\"color-\" + color)),\n {\n [styles.withAnimation]: countChangeAnimationState\n },\n counterClassName\n );\n }, [size, kind, color, countChangeAnimationState, counterClassName]);\n\n const counterId = \"counter\" + (id ? `-${id}` : \"\");\n const countText = count?.toString().length > maxDigits ? `${10 ** maxDigits - 1}+` : String(count);\n const counter = (\n <span id={counterId} data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}>\n {prefix + countText}\n </span>\n );\n\n return (\n <span\n className={className}\n aria-label={`${ariaLabel} ${countText}`}\n aria-labelledby={ariaLabelledBy}\n onMouseDown={onMouseDown}\n data-vibe={ComponentVibeId.COUNTER}\n >\n <div className={classNames} aria-label={countText} ref={ref}>\n {noAnimation ? (\n counter\n ) : (\n <SwitchTransition mode=\"out-in\">\n <CSSTransition\n key={countText}\n nodeRef={nodeRef}\n classNames={{\n enter: styles.fadeEnter,\n enterActive: styles.fadeEnterActive,\n exit: styles.fadeExit,\n exitActive: styles.fadeExitActive\n }}\n addEndListener={done => {\n nodeRef.current?.addEventListener(\"transitionend\", done, false);\n }}\n >\n <span\n ref={nodeRef}\n id={counterId}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}\n >\n {prefix + countText}\n </span>\n </CSSTransition>\n </SwitchTransition>\n )}\n </div>\n </span>\n );\n};\n\nexport default Counter;\n"],"names":["Counter","_ref","className","counterClassName","_ref$count","count","_ref$size","size","_ref$kind","kind","_ref$color","color","_ref$maxDigits","maxDigits","_ref$ariaLabelledby","ariaLabelledBy","_ref$ariaLabel","ariaLabel","_ref$id","id","_ref$prefix","prefix","_ref$onMouseDown","onMouseDown","NOOP","_ref$noAnimation","noAnimation","dataTestId","_useState","useState","_useState2","_slicedToArray","countChangeAnimationState","setCountChangeAnimationState","ref","useRef","nodeRef","setCountChangedAnimationActive","useCallback","setCountChangedAnimationNotActive","useEventListener","eventName","callback","isAfterFirstRender","useAfterFirstRender","useEffect","current","console","error","classNames","useMemo","cx","styles","counter","getStyle","camelCase","_defineProperty","withAnimation","counterId","concat","countText","length","Math","pow","String","React","createElement","getTestId","ComponentDefaultTestId","COUNTER","ComponentVibeId","SwitchTransition","mode","CSSTransition","key","enter","fadeEnter","enterActive","fadeEnterActive","exit","fadeExit","exitActive","fadeExitActive","addEndListener","done","_a","addEventListener"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- var n={counter:"counter",withAnimation:"withAnimation",counterPopElastic:"counterPopElastic",sizeXs:"sizeXs",sizeSmall:"sizeSmall",sizeLarge:"sizeLarge",kindFill:"kindFill",colorPrimary:"colorPrimary",colorDark:"colorDark",colorNegative:"colorNegative",colorLight:"colorLight",kindLine:"kindLine",fadeEnter:"fadeEnter",fadeEnterActive:"fadeEnterActive",fadeExit:"fadeExit",fadeExitActive:"fadeExitActive","counter-pop-elastic":"counter-pop-elastic"};!function(n){const o="s_id-b4f9c23ba3ce_4_5_7";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+o))return;const r=document.createElement("style");r.id=o,t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[o]=n)}("/* stylelint-disable */\n/* stylelint-enable */\n.counter {\n display: inline-flex;\n justify-content: center;\n border-radius: 30px;\n overflow: hidden;\n transform-origin: center;\n}\n@keyframes counter-pop-elastic {\n 0% {\n transform: scale(1);\n }\n 33% {\n transform: scale(1.2);\n }\n 66% {\n transform: scale(0.9);\n }\n 100% {\n transform: scale(1);\n }\n}\n.withAnimation {\n animation: counterPopElastic var(--motion-expressive-short);\n}\n.sizeXs {\n font: var(--font-text3-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeSmall {\n font: var(--font-text2-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeLarge {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n font: var(--font-text2-normal);\n min-width: 24px;\n padding: 2px var(--space-8);\n}\n.kindFill.colorPrimary {\n color: var(--fixed-light-color);\n background-color: var(--primary-color);\n}\n.kindFill.colorDark {\n color: var(--text-color-on-inverted);\n background-color: var(--inverted-color-background);\n}\n.kindFill.colorNegative {\n color: var(--fixed-light-color);\n background-color: var(--negative-color);\n}\n.kindFill.colorLight {\n color: var(--primary-text-color);\n background-color: var(--ui-background-color);\n}\n.kindLine {\n box-shadow: 0 0 0 1px currentColor inset;\n}\n.kindLine.colorPrimary {\n color: var(--primary-color);\n}\n.kindLine.colorDark {\n color: var(--inverted-color-background);\n}\n.kindLine.colorNegative {\n color: var(--negative-color);\n}\n.kindLine.colorLight {\n color: var(--primary-text-color);\n box-shadow: 0 0 0 1px var(--ui-background-color) inset !important;\n}\n/* New number enters */\n.fadeEnter {\n opacity: 0;\n transform: translateY(15px);\n}\n.fadeEnterActive {\n position: relative;\n opacity: 1;\n transition: transform var(--motion-productive-long) var(--motion-timing-enter), opacity var(--motion-productive-short);\n transform: translateY(0);\n}\n/* Old number exits */\n.fadeExit {\n position: relative;\n opacity: 1;\n transform: translateY(0);\n}\n.fadeExitActive {\n position: relative;\n opacity: 0;\n transform: translateY(-15px);\n transition: transform var(--motion-productive-long) var(--motion-timing-exit), opacity var(--motion-productive-short);\n}");export{n as default};
2
- //# sourceMappingURL=Counter.module.scss.js.map
@@ -1,2 +0,0 @@
1
- import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import a from"classnames";import t,{forwardRef as i,useRef as s,useCallback as o,useMemo as l}from"react";import{useMergeRef as r}from"@vibe/shared";import{Clickable as d}from"@vibe/clickable/mockedClassNames";import{Text as n}from"@vibe/typography/mockedClassNames";import{Tooltip as m}from"@vibe/tooltip/mockedClassNames";import{getTestId as c,ComponentDefaultTestId as u}from"../../tests/testIds.js";import b from"./RadioButton.module.scss.js";import{ComponentVibeId as p}from"../../tests/constants.js";var v=i((function(i,v){var f=i.className,N=i.text,C=void 0===N?"":N,h=i.value,k=void 0===h?"":h,O=i.name,T=void 0===O?"":O,B=i.labelClassName,E=i.radioButtonClassName,_=i.disabled,y=void 0!==_&&_,A=i.autoFocus,I=i.disabledReason,R=i.defaultChecked,j=void 0!==R&&R,x=i.children,g=i.onSelect,D=i.checked,L=i.retainChildClick,U=void 0===L||L,F=i.childrenTabIndex,P=void 0===F?0:F,H=i.noLabelAnimation,S=void 0!==H&&H,q=i["aria-label"],w=i["aria-describedby"],z=i.id,G=i["data-testid"],J=s(),K=r(v,J),M=o((function(){!y&&U&&(J.current&&(J.current.checked=!0),g&&g(null))}),[g,J,y,U]),Q=l((function(){return void 0!==D?{checked:D}:{defaultChecked:j}}),[D,j]);return t.createElement(m,{content:y?I:null},t.createElement("label",{"data-testid":G||c(u.RADIO_BUTTON,z),"data-vibe":p.RADIO_BUTTON,className:a(b.radioButton,f,e(e({},b.disabled,y),"disabled",y))},t.createElement("span",{className:a(b.inputContainer)},t.createElement("input",Object.assign({className:a(b.input),type:"radio",value:k,name:T,autoFocus:A,disabled:y},Q,{"aria-label":q,"aria-describedby":w,onChange:g,ref:K})),t.createElement("span",{"data-testid":c(u.RADIO_BUTTON_CONTROL,z),className:a(b.control,E,e({},b.labelAnimation,!S))})),C&&t.createElement(n,{element:"span",type:"text2",className:B,"data-testid":c(u.RADIO_BUTTON_LABEL,z)},C),x&&t.createElement(d,{onClick:M,tabIndex:P},x)))}));export{v as default};
2
- //# sourceMappingURL=RadioButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButton.js","sources":["../../../../../src/components/RadioButton/RadioButton.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { forwardRef, useCallback, useMemo, useRef } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { Clickable } from \"@vibe/clickable\";\nimport { Text } from \"@vibe/typography\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./RadioButton.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface RadioButtonProps extends VibeComponentProps {\n /**\n * Class name applied to the label text.\n */\n labelClassName?: string;\n /**\n * Class name applied to the radio button element.\n */\n radioButtonClassName?: string;\n /**\n * The label text displayed next to the radio button.\n */\n text?: string;\n /**\n * The value associated with the radio button.\n */\n value?: string;\n /**\n * The name of the radio button group.\n */\n name?: string;\n /**\n * If true, the radio button automatically receives focus on mount.\n */\n autoFocus?: boolean;\n /**\n * If true, the radio button is disabled.\n */\n disabled?: boolean;\n /**\n * The reason why the radio button is disabled, displayed in a tooltip.\n */\n disabledReason?: string;\n /**\n * If true, the radio button is checked by default.\n */\n defaultChecked?: boolean;\n /**\n * The child elements inside the radio button.\n */\n children?: React.ReactNode;\n /**\n * Callback fired when the radio button selection changes.\n */\n onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;\n /**\n * If provided, controls the checked state of the radio button.\n */\n checked?: boolean;\n /**\n * If true, clicking on children will trigger selection.\n */\n retainChildClick?: boolean;\n /**\n * The tab index applied to the children.\n */\n childrenTabIndex?: number;\n /**\n * If true, disables the label animation.\n */\n noLabelAnimation?: boolean;\n /**\n * ARIA label for accessibility when no text is provided.\n */\n \"aria-label\"?: string;\n /**\n * ID of element that describe this radio button.\n */\n \"aria-describedby\"?: string;\n}\n\nconst RadioButton = forwardRef(\n (\n {\n className,\n text = \"\",\n value = \"\",\n name = \"\",\n labelClassName,\n radioButtonClassName,\n disabled = false,\n autoFocus,\n disabledReason,\n defaultChecked = false,\n children,\n onSelect,\n checked,\n retainChildClick = true,\n childrenTabIndex = 0,\n noLabelAnimation = false,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n id,\n \"data-testid\": dataTestId\n }: RadioButtonProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const inputRef = useRef<HTMLInputElement | null>();\n const mergedRef = useMergeRef(ref, inputRef);\n\n const onChildClick = useCallback(() => {\n if (disabled || !retainChildClick) return;\n if (inputRef.current) {\n inputRef.current.checked = true;\n }\n if (onSelect) {\n onSelect(null);\n }\n }, [onSelect, inputRef, disabled, retainChildClick]);\n\n const checkedProps = useMemo(() => {\n if (checked !== undefined) {\n return { checked };\n }\n return { defaultChecked };\n }, [checked, defaultChecked]);\n\n const tooltipContent = disabled ? disabledReason : null;\n\n return (\n <Tooltip content={tooltipContent}>\n <label\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.RADIO_BUTTON, id)}\n data-vibe={ComponentVibeId.RADIO_BUTTON}\n className={cx(styles.radioButton, className, {\n [styles.disabled]: disabled,\n disabled: disabled\n })}\n >\n <span className={cx(styles.inputContainer)}>\n <input\n className={cx(styles.input)}\n type=\"radio\"\n value={value}\n name={name}\n autoFocus={autoFocus}\n disabled={disabled}\n {...checkedProps}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n onChange={onSelect}\n ref={mergedRef}\n />\n <span\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_CONTROL, id)}\n className={cx(styles.control, radioButtonClassName, {\n [styles.labelAnimation]: !noLabelAnimation\n })}\n />\n </span>\n {text && (\n <Text\n element=\"span\"\n type=\"text2\"\n className={labelClassName}\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_LABEL, id)}\n >\n {text}\n </Text>\n )}\n {children && (\n <Clickable onClick={onChildClick} tabIndex={childrenTabIndex}>\n {children}\n </Clickable>\n )}\n </label>\n </Tooltip>\n );\n }\n);\n\nexport default RadioButton;\n"],"names":["RadioButton","forwardRef","_ref","ref","className","_ref$text","text","_ref$value","value","_ref$name","name","labelClassName","radioButtonClassName","_ref$disabled","disabled","autoFocus","disabledReason","_ref$defaultChecked","defaultChecked","children","onSelect","checked","_ref$retainChildClick","retainChildClick","_ref$childrenTabIndex","childrenTabIndex","_ref$noLabelAnimation","noLabelAnimation","ariaLabel","ariaDescribedby","id","dataTestId","inputRef","useRef","mergedRef","useMergeRef","onChildClick","useCallback","current","checkedProps","useMemo","undefined","React","createElement","Tooltip","content","getTestId","ComponentDefaultTestId","RADIO_BUTTON","ComponentVibeId","cx","styles","radioButton","_defineProperty","inputContainer","Object","assign","input","type","onChange","RADIO_BUTTON_CONTROL","control","labelAnimation","Text","element","RADIO_BUTTON_LABEL","Clickable","onClick","tabIndex"],"mappings":"0kBAkFMA,IAAAA,EAAcC,GAClB,SAAAC,EAuBEC,GACE,IAtBAC,EAASF,EAATE,UAASC,EAAAH,EACTI,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EAAAE,EAAAL,EACTM,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EAAAE,EAAAP,EACVQ,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAcT,EAAdS,eACAC,EAAoBV,EAApBU,qBAAoBC,EAAAX,EACpBY,SAAAA,OAAW,IAAHD,GAAQA,EAChBE,EAASb,EAATa,UACAC,EAAcd,EAAdc,eAAcC,EAAAf,EACdgB,eAAAA,OAAiB,IAAHD,GAAQA,EACtBE,EAAQjB,EAARiB,SACAC,EAAQlB,EAARkB,SACAC,EAAOnB,EAAPmB,QAAOC,EAAApB,EACPqB,iBAAAA,OAAmB,IAAHD,GAAOA,EAAAE,EAAAtB,EACvBuB,iBAAAA,OAAmB,IAAHD,EAAG,EAACA,EAAAE,EAAAxB,EACpByB,iBAAAA,OAAmB,IAAHD,GAAQA,EACVE,EAAS1B,EAAvB,cACoB2B,EAAe3B,EAAnC,oBACA4B,EAAE5B,EAAF4B,GACeC,EAAU7B,EAAzB,eAII8B,EAAWC,IACXC,EAAYC,EAAYhC,EAAK6B,GAE7BI,EAAeC,GAAY,YAC3BvB,GAAaS,IACbS,EAASM,UACXN,EAASM,QAAQjB,SAAU,GAEzBD,GACFA,EAAS,MAEZ,GAAE,CAACA,EAAUY,EAAUlB,EAAUS,IAE5BgB,EAAeC,GAAQ,WAC3B,YAAgBC,IAAZpB,EACK,CAAEA,QAAAA,GAEJ,CAAEH,eAAAA,EACX,GAAG,CAACG,EAASH,IAIb,OACEwB,EAACC,cAAAC,EAAQ,CAAAC,QAHY/B,EAAWE,EAAiB,MAI/C0B,EACeC,cAAA,QAAA,CAAA,cAAAZ,GAAce,EAAUC,EAAuBC,aAAclB,GAC/D,YAAAmB,EAAgBD,aAC3B5C,UAAW8C,EAAGC,EAAOC,YAAahD,EAASiD,EAAAA,EAAA,CAAA,EACxCF,EAAOrC,SAAWA,GAAQ,WACjBA,KAGZ4B,EAAAC,cAAA,OAAA,CAAMvC,UAAW8C,EAAGC,EAAOG,iBACzBZ,EAAAC,cAAA,QAAAY,OAAAC,OAAA,CACEpD,UAAW8C,EAAGC,EAAOM,OACrBC,KAAK,QACLlD,MAAOA,EACPE,KAAMA,EACNK,UAAWA,EACXD,SAAUA,GACNyB,EACQ,CAAA,aAAAX,qBACMC,EAClB8B,SAAUvC,EACVjB,IAAK+B,KAEPQ,EAAAC,cAAA,OAAA,CAAA,cACeG,EAAUC,EAAuBa,qBAAsB9B,GACpE1B,UAAW8C,EAAGC,EAAOU,QAASjD,EAAoByC,KAC/CF,EAAOW,gBAAkBnC,OAI/BrB,GACCoC,EAACC,cAAAoB,EACC,CAAAC,QAAQ,OACRN,KAAK,QACLtD,UAAWO,EACE,cAAAmC,EAAUC,EAAuBkB,mBAAoBnC,IAEjExB,GAGJa,GACCuB,EAAAC,cAACuB,EAAU,CAAAC,QAAS/B,EAAcgC,SAAU3C,GACzCN,IAMb"}
@@ -1,2 +0,0 @@
1
- var n={radioButton:"radioButton",inputContainer:"inputContainer",input:"input",control:"control",labelAnimation:"labelAnimation",radioCheckedAnimation:"radioCheckedAnimation",disabled:"disabled",label:"label"};!function(n){const o="s_id-f0fb17b54d8d_4_5_7";if("undefined"!=typeof document){const e=document.head||document.getElementsByTagName("head")[0];if(e.querySelector("#"+o))return;const i=document.createElement("style");i.id=o,e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i),i.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[o]=n)}("/* stylelint-disable unit-disallowed-list */\n.radioButton {\n display: grid;\n grid-template-columns: 1.5em auto;\n grid-gap: 0.5em;\n cursor: pointer;\n}\n.inputContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.input {\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n}\n.control {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n border: 0.1em solid;\n box-sizing: border-box;\n border-color: var(--ui-border-color);\n border-radius: 50%;\n transition: border-width var(--motion-productive-medium) var(--motion-timing-enter);\n background-color: var(--secondary-background-color);\n}\ninput:checked + .control {\n border-color: var(--primary-color);\n border-width: 0.3em;\n}\ninput:checked + .labelAnimation {\n animation-name: radioCheckedAnimation;\n animation-duration: var(--motion-productive-medium);\n animation-timing-function: var(--motion-timing-enter);\n animation-fill-mode: forwards;\n}\ninput:disabled + .control {\n border: 0.5em solid;\n border-color: var(--disabled-background-color);\n border-radius: 50%;\n}\ninput:checked:disabled + .control {\n border: 0.3em solid;\n border-color: var(--disabled-background-color);\n background-color: var(--secondary-text-color);\n}\n.radioButton.disabled {\n cursor: not-allowed;\n}\n.radioButton.disabled .label {\n color: var(--disabled-text-color);\n}\n.inputContainer input:focus-visible + .control {\n outline: none;\n border-color: var(--primary-color);\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5);\n border-radius: 50%;\n}\n.radioButton:hover .inputContainer input:enabled:checked + .control {\n border-color: var(--primary-hover-color);\n}\n.radioButton:hover .inputContainer input:enabled:not(:checked) + .control,\n.radioButton:focus-within .inputContainer input:enabled:not(:checked) + .control {\n border-color: var(--primary-text-color);\n}\n@keyframes radioCheckedAnimation {\n 0% {\n height: 1em;\n width: 1em;\n }\n 50% {\n height: 0.8em;\n width: 0.8em;\n }\n 100% {\n height: 1em;\n width: 1em;\n }\n}");export{n as default};
2
- //# sourceMappingURL=RadioButton.module.scss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/hooks/useAfterFirstRender/index.ts"],"sourcesContent":["import { type RefObject, useEffect, useRef } from \"react\";\n\nexport default function useAfterFirstRender(): RefObject<boolean> {\n const isAfterFirstRender = useRef(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n isAfterFirstRender.current = true;\n }, 0);\n return () => clearTimeout(timer);\n }, []);\n\n return isAfterFirstRender;\n}\n"],"names":["useAfterFirstRender","isAfterFirstRender","useRef","useEffect","timer","setTimeout","current","clearTimeout"],"mappings":"8CAEc,SAAUA,IACtB,IAAMC,EAAqBC,GAAO,GASlC,OAPAC,GAAU,WACR,IAAMC,EAAQC,YAAW,WACvBJ,EAAmBK,SAAU,CAC9B,GAAE,GACH,OAAO,WAAA,OAAMC,aAAaH,EAAM,CACjC,GAAE,IAEIH,CACT"}
@@ -1,2 +0,0 @@
1
- import{slicedToArray as e,defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{camelCase as i}from"es-toolkit";import{getTestId as o,ComponentDefaultTestId as r}from"../../tests/testIds.js";import a from"classnames";import n,{useState as s,useRef as d,useCallback as l,useEffect as c,useMemo as m}from"react";import{SwitchTransition as u,CSSTransition as f}from"react-transition-group";import v from"../../hooks/useAfterFirstRender/index.js";import p from"./Counter.module.scss.js";import{ComponentVibeId as E}from"../../tests/constants.js";import{useEventListener as b}from"../../../shared/dist/hooks/useEventListener.js";import{getStyle as x}from"../../../shared/dist/utils/typesciptCssModulesHelper.js";import{NOOP as N}from"../../../shared/dist/utils/function-utils.js";var h=function(h){var j=h.className,A=h.counterClassName,k=h.count,y=void 0===k?0:k,g=h.size,C=void 0===g?"large":g,M=h.kind,R=void 0===M?"fill":M,w=h.color,T=void 0===w?"primary":w,D=h.maxDigits,L=void 0===D?3:D,O=h["aria-labelledby"],U=void 0===O?"":O,z=h["aria-label"],H=void 0===z?"":z,P=h.id,_=void 0===P?"":P,B=h.prefix,F=void 0===B?"":B,I=h.onMouseDown,q=void 0===I?N:I,G=h.noAnimation,J=void 0!==G&&G,K=h["data-testid"],Q=s(!1),S=e(Q,2),V=S[0],W=S[1],X=d(null),Y=d(null),Z=l((function(){W(!0)}),[W]),$=l((function(){W(!1)}),[W]);b({eventName:"animationend",callback:$,ref:X});var ee=v();c((function(){ee.current&&Z()}),[y,ee,Z]),c((function(){L>0||console.error("Max digits must be a positive number")}),[L]);var te=m((function(){return a(p.counter,x(p,i("size-"+C)),x(p,i("kind-"+R)),x(p,i("color-"+T)),t({},p.withAnimation,V),A)}),[C,R,T,V,A]),ie="counter"+(_?"-".concat(_):""),oe=(null==y?void 0:(""+y).length)>L?"".concat(Math.pow(10,L)-1,"+"):y+"",re=n.createElement("span",{id:ie,"data-testid":K||o(r.COUNTER,_)},F+oe);return n.createElement("span",{className:j,"aria-label":"".concat(H," ").concat(oe),"aria-labelledby":U,onMouseDown:q,"data-vibe":E.COUNTER},n.createElement("div",{className:te,"aria-label":oe,ref:X},J?re:n.createElement(u,{mode:"out-in"},n.createElement(f,{key:oe,nodeRef:Y,classNames:{enter:p.fadeEnter,enterActive:p.fadeEnterActive,exit:p.fadeExit,exitActive:p.fadeExitActive},addEndListener:function(e){var t;null===(t=Y.current)||void 0===t||t.addEventListener("transitionend",e,!1)}},n.createElement("span",{ref:Y,id:ie,"data-testid":K||o(r.COUNTER,_)},F+oe)))))};export{h as default};
2
- //# sourceMappingURL=Counter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Counter.js","sources":["../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { getStyle, NOOP } from \"@vibe/shared\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { CSSTransition, SwitchTransition } from \"react-transition-group\";\nimport useEventListener from \"../../hooks/useEventListener\";\nimport useAfterFirstRender from \"../../hooks/useAfterFirstRender\";\n\nimport { type CounterColor, type CounterSize, type CounterType } from \"./Counter.types\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Counter.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface CounterProps extends VibeComponentProps {\n /**\n * The ID of the element describing the counter.\n */\n \"aria-labelledby\"?: string;\n /**\n * Class name applied to the counter element.\n */\n counterClassName?: string;\n /**\n * The numeric value displayed in the counter.\n */\n count?: number;\n /**\n * The label of the counter for accessibility.\n */\n \"aria-label\"?: string;\n /**\n * The size of the counter.\n */\n size?: CounterSize;\n /**\n * The visual style of the counter.\n */\n kind?: CounterType;\n /**\n * The color of the counter.\n */\n color?: CounterColor;\n /**\n * The maximum number of digits displayed before truncation.\n */\n maxDigits?: number;\n /**\n * Text prepended to the counter value.\n */\n prefix?: string;\n /**\n * Callback fired when the counter is clicked.\n */\n onMouseDown?: (event: React.MouseEvent<HTMLSpanElement>) => void;\n /**\n * If true, disables counter animations.\n */\n noAnimation?: boolean;\n}\n\nconst Counter = ({\n className,\n counterClassName,\n count = 0,\n size = \"large\",\n kind = \"fill\",\n color = \"primary\",\n maxDigits = 3,\n \"aria-labelledby\": ariaLabelledBy = \"\",\n \"aria-label\": ariaLabel = \"\",\n id = \"\",\n prefix = \"\",\n onMouseDown = NOOP,\n noAnimation = false,\n \"data-testid\": dataTestId\n}: CounterProps) => {\n const [countChangeAnimationState, setCountChangeAnimationState] = useState(false);\n\n const ref = useRef<HTMLDivElement>(null);\n const nodeRef = useRef<HTMLSpanElement>(null);\n\n const setCountChangedAnimationActive = useCallback(() => {\n setCountChangeAnimationState(true);\n }, [setCountChangeAnimationState]);\n\n const setCountChangedAnimationNotActive = useCallback(() => {\n setCountChangeAnimationState(false);\n }, [setCountChangeAnimationState]);\n\n useEventListener({\n eventName: \"animationend\",\n callback: setCountChangedAnimationNotActive,\n ref\n });\n\n const isAfterFirstRender = useAfterFirstRender();\n\n useEffect(() => {\n if (isAfterFirstRender.current) {\n setCountChangedAnimationActive();\n }\n }, [count, isAfterFirstRender, setCountChangedAnimationActive]);\n\n useEffect(() => {\n if (maxDigits <= 0) {\n console.error(\"Max digits must be a positive number\");\n }\n }, [maxDigits]);\n\n const classNames = useMemo(() => {\n return cx(\n styles.counter,\n getStyle(styles, camelCase(\"size-\" + size)),\n getStyle(styles, camelCase(\"kind-\" + kind)),\n getStyle(styles, camelCase(\"color-\" + color)),\n {\n [styles.withAnimation]: countChangeAnimationState\n },\n counterClassName\n );\n }, [size, kind, color, countChangeAnimationState, counterClassName]);\n\n const counterId = \"counter\" + (id ? `-${id}` : \"\");\n const countText = count?.toString().length > maxDigits ? `${10 ** maxDigits - 1}+` : String(count);\n const counter = (\n <span id={counterId} data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}>\n {prefix + countText}\n </span>\n );\n\n return (\n <span\n className={className}\n aria-label={`${ariaLabel} ${countText}`}\n aria-labelledby={ariaLabelledBy}\n onMouseDown={onMouseDown}\n data-vibe={ComponentVibeId.COUNTER}\n >\n <div className={classNames} aria-label={countText} ref={ref}>\n {noAnimation ? (\n counter\n ) : (\n <SwitchTransition mode=\"out-in\">\n <CSSTransition\n key={countText}\n nodeRef={nodeRef}\n classNames={{\n enter: styles.fadeEnter,\n enterActive: styles.fadeEnterActive,\n exit: styles.fadeExit,\n exitActive: styles.fadeExitActive\n }}\n addEndListener={done => {\n nodeRef.current?.addEventListener(\"transitionend\", done, false);\n }}\n >\n <span\n ref={nodeRef}\n id={counterId}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COUNTER, id)}\n >\n {prefix + countText}\n </span>\n </CSSTransition>\n </SwitchTransition>\n )}\n </div>\n </span>\n );\n};\n\nexport default Counter;\n"],"names":["Counter","_ref","className","counterClassName","_ref$count","count","_ref$size","size","_ref$kind","kind","_ref$color","color","_ref$maxDigits","maxDigits","_ref$ariaLabelledby","ariaLabelledBy","_ref$ariaLabel","ariaLabel","_ref$id","id","_ref$prefix","prefix","_ref$onMouseDown","onMouseDown","NOOP","_ref$noAnimation","noAnimation","dataTestId","_useState","useState","_useState2","_slicedToArray","countChangeAnimationState","setCountChangeAnimationState","ref","useRef","nodeRef","setCountChangedAnimationActive","useCallback","setCountChangedAnimationNotActive","useEventListener","eventName","callback","isAfterFirstRender","useAfterFirstRender","useEffect","current","console","error","classNames","useMemo","cx","styles","counter","getStyle","camelCase","_defineProperty","withAnimation","counterId","concat","countText","length","Math","pow","String","React","createElement","getTestId","ComponentDefaultTestId","COUNTER","ComponentVibeId","SwitchTransition","mode","CSSTransition","key","enter","fadeEnter","enterActive","fadeEnterActive","exit","fadeExit","exitActive","fadeExitActive","addEndListener","done","_a","addEventListener"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- var n={counter:"counter_75bdeea958",withAnimation:"withAnimation_28c6e8a578",counterPopElastic:"counterPopElastic_9c781a661c",sizeXs:"sizeXs_7e1d1fecef",sizeSmall:"sizeSmall_aab9dad177",sizeLarge:"sizeLarge_20fb45c2b5",kindFill:"kindFill_a1373d0bad",colorPrimary:"colorPrimary_cf3a43007e",colorDark:"colorDark_2eb6c543a1",colorNegative:"colorNegative_abd5ea0c48",colorLight:"colorLight_b9f19f3d24",kindLine:"kindLine_ff0cdee2e1",fadeEnter:"fadeEnter_ea2e1ee130",fadeEnterActive:"fadeEnterActive_6cd1723c92",fadeExit:"fadeExit_4da6bf5216",fadeExitActive:"fadeExitActive_ab7a8dc3d2","counter-pop-elastic":"counter-pop-elastic_2dce59163f"};!function(n){const o="s_id-b4f9c23ba3ce_4_5_7";if("undefined"!=typeof document){const e=document.head||document.getElementsByTagName("head")[0];if(e.querySelector("#"+o))return;const t=document.createElement("style");t.id=o,e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t),t.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[o]=n)}("/* stylelint-disable */\n/* stylelint-enable */\n.counter_75bdeea958 {\n display: inline-flex;\n justify-content: center;\n border-radius: 30px;\n overflow: hidden;\n transform-origin: center;\n}\n@keyframes counter-pop-elastic_2dce59163f {\n 0% {\n transform: scale(1);\n }\n 33% {\n transform: scale(1.2);\n }\n 66% {\n transform: scale(0.9);\n }\n 100% {\n transform: scale(1);\n }\n}\n.withAnimation_28c6e8a578 {\n animation: counterPopElastic_9c781a661c var(--motion-expressive-short);\n}\n.sizeXs_7e1d1fecef {\n font: var(--font-text3-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeSmall_aab9dad177 {\n font: var(--font-text2-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n min-width: 18px;\n line-height: 18px;\n padding: 0 var(--space-8);\n}\n.sizeLarge_20fb45c2b5 {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n font: var(--font-text2-normal);\n min-width: 24px;\n padding: 2px var(--space-8);\n}\n.kindFill_a1373d0bad.colorPrimary_cf3a43007e {\n color: var(--fixed-light-color);\n background-color: var(--primary-color);\n}\n.kindFill_a1373d0bad.colorDark_2eb6c543a1 {\n color: var(--text-color-on-inverted);\n background-color: var(--inverted-color-background);\n}\n.kindFill_a1373d0bad.colorNegative_abd5ea0c48 {\n color: var(--fixed-light-color);\n background-color: var(--negative-color);\n}\n.kindFill_a1373d0bad.colorLight_b9f19f3d24 {\n color: var(--primary-text-color);\n background-color: var(--ui-background-color);\n}\n.kindLine_ff0cdee2e1 {\n box-shadow: 0 0 0 1px currentColor inset;\n}\n.kindLine_ff0cdee2e1.colorPrimary_cf3a43007e {\n color: var(--primary-color);\n}\n.kindLine_ff0cdee2e1.colorDark_2eb6c543a1 {\n color: var(--inverted-color-background);\n}\n.kindLine_ff0cdee2e1.colorNegative_abd5ea0c48 {\n color: var(--negative-color);\n}\n.kindLine_ff0cdee2e1.colorLight_b9f19f3d24 {\n color: var(--primary-text-color);\n box-shadow: 0 0 0 1px var(--ui-background-color) inset !important;\n}\n/* New number enters */\n.fadeEnter_ea2e1ee130 {\n opacity: 0;\n transform: translateY(15px);\n}\n.fadeEnterActive_6cd1723c92 {\n position: relative;\n opacity: 1;\n transition: transform var(--motion-productive-long) var(--motion-timing-enter), opacity var(--motion-productive-short);\n transform: translateY(0);\n}\n/* Old number exits */\n.fadeExit_4da6bf5216 {\n position: relative;\n opacity: 1;\n transform: translateY(0);\n}\n.fadeExitActive_ab7a8dc3d2 {\n position: relative;\n opacity: 0;\n transform: translateY(-15px);\n transition: transform var(--motion-productive-long) var(--motion-timing-exit), opacity var(--motion-productive-short);\n}");export{n as default};
2
- //# sourceMappingURL=Counter.module.scss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Counter.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import t from"classnames";import a,{forwardRef as o,useRef as i,useCallback as s,useMemo as l}from"react";import{getTestId as n,ComponentDefaultTestId as r}from"../../tests/testIds.js";import d from"./RadioButton.module.scss.js";import{ComponentVibeId as c}from"../../tests/constants.js";import m from"../../../components/tooltip/dist/Tooltip/Tooltip.js";import p from"../../../components/typography/dist/Text/Text.js";import u from"../../../components/clickable/dist/Clickable/Clickable.js";import{useMergeRef as b}from"../../../shared/dist/hooks/useMergeRef.js";var f=o((function(o,f){var v=o.className,T=o.text,N=void 0===T?"":T,h=o.value,C=void 0===h?"":h,k=o.name,O=void 0===k?"":k,j=o.labelClassName,B=o.radioButtonClassName,E=o.disabled,R=void 0!==E&&E,_=o.autoFocus,x=o.disabledReason,y=o.defaultChecked,A=void 0!==y&&y,I=o.children,g=o.onSelect,D=o.checked,L=o.retainChildClick,U=void 0===L||L,F=o.childrenTabIndex,P=void 0===F?0:F,H=o.noLabelAnimation,M=void 0!==H&&H,S=o["aria-label"],q=o["aria-describedby"],w=o.id,z=o["data-testid"],G=i(),J=b(f,G),K=s((function(){!R&&U&&(G.current&&(G.current.checked=!0),g&&g(null))}),[g,G,R,U]),Q=l((function(){return void 0!==D?{checked:D}:{defaultChecked:A}}),[D,A]);return a.createElement(m,{content:R?x:null},a.createElement("label",{"data-testid":z||n(r.RADIO_BUTTON,w),"data-vibe":c.RADIO_BUTTON,className:t(d.radioButton,v,e(e({},d.disabled,R),"disabled",R))},a.createElement("span",{className:t(d.inputContainer)},a.createElement("input",Object.assign({className:t(d.input),type:"radio",value:C,name:O,autoFocus:_,disabled:R},Q,{"aria-label":S,"aria-describedby":q,onChange:g,ref:J})),a.createElement("span",{"data-testid":n(r.RADIO_BUTTON_CONTROL,w),className:t(d.control,B,e({},d.labelAnimation,!M))})),N&&a.createElement(p,{element:"span",type:"text2",className:j,"data-testid":n(r.RADIO_BUTTON_LABEL,w)},N),I&&a.createElement(u,{onClick:K,tabIndex:P},I)))}));export{f as default};
2
- //# sourceMappingURL=RadioButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButton.js","sources":["../../../../src/components/RadioButton/RadioButton.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { forwardRef, useCallback, useMemo, useRef } from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { Clickable } from \"@vibe/clickable\";\nimport { Text } from \"@vibe/typography\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./RadioButton.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface RadioButtonProps extends VibeComponentProps {\n /**\n * Class name applied to the label text.\n */\n labelClassName?: string;\n /**\n * Class name applied to the radio button element.\n */\n radioButtonClassName?: string;\n /**\n * The label text displayed next to the radio button.\n */\n text?: string;\n /**\n * The value associated with the radio button.\n */\n value?: string;\n /**\n * The name of the radio button group.\n */\n name?: string;\n /**\n * If true, the radio button automatically receives focus on mount.\n */\n autoFocus?: boolean;\n /**\n * If true, the radio button is disabled.\n */\n disabled?: boolean;\n /**\n * The reason why the radio button is disabled, displayed in a tooltip.\n */\n disabledReason?: string;\n /**\n * If true, the radio button is checked by default.\n */\n defaultChecked?: boolean;\n /**\n * The child elements inside the radio button.\n */\n children?: React.ReactNode;\n /**\n * Callback fired when the radio button selection changes.\n */\n onSelect?: (event: React.ChangeEvent<HTMLInputElement | null>) => void;\n /**\n * If provided, controls the checked state of the radio button.\n */\n checked?: boolean;\n /**\n * If true, clicking on children will trigger selection.\n */\n retainChildClick?: boolean;\n /**\n * The tab index applied to the children.\n */\n childrenTabIndex?: number;\n /**\n * If true, disables the label animation.\n */\n noLabelAnimation?: boolean;\n /**\n * ARIA label for accessibility when no text is provided.\n */\n \"aria-label\"?: string;\n /**\n * ID of element that describe this radio button.\n */\n \"aria-describedby\"?: string;\n}\n\nconst RadioButton = forwardRef(\n (\n {\n className,\n text = \"\",\n value = \"\",\n name = \"\",\n labelClassName,\n radioButtonClassName,\n disabled = false,\n autoFocus,\n disabledReason,\n defaultChecked = false,\n children,\n onSelect,\n checked,\n retainChildClick = true,\n childrenTabIndex = 0,\n noLabelAnimation = false,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n id,\n \"data-testid\": dataTestId\n }: RadioButtonProps,\n ref: React.ForwardedRef<HTMLInputElement>\n ) => {\n const inputRef = useRef<HTMLInputElement | null>();\n const mergedRef = useMergeRef(ref, inputRef);\n\n const onChildClick = useCallback(() => {\n if (disabled || !retainChildClick) return;\n if (inputRef.current) {\n inputRef.current.checked = true;\n }\n if (onSelect) {\n onSelect(null);\n }\n }, [onSelect, inputRef, disabled, retainChildClick]);\n\n const checkedProps = useMemo(() => {\n if (checked !== undefined) {\n return { checked };\n }\n return { defaultChecked };\n }, [checked, defaultChecked]);\n\n const tooltipContent = disabled ? disabledReason : null;\n\n return (\n <Tooltip content={tooltipContent}>\n <label\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.RADIO_BUTTON, id)}\n data-vibe={ComponentVibeId.RADIO_BUTTON}\n className={cx(styles.radioButton, className, {\n [styles.disabled]: disabled,\n disabled: disabled\n })}\n >\n <span className={cx(styles.inputContainer)}>\n <input\n className={cx(styles.input)}\n type=\"radio\"\n value={value}\n name={name}\n autoFocus={autoFocus}\n disabled={disabled}\n {...checkedProps}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n onChange={onSelect}\n ref={mergedRef}\n />\n <span\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_CONTROL, id)}\n className={cx(styles.control, radioButtonClassName, {\n [styles.labelAnimation]: !noLabelAnimation\n })}\n />\n </span>\n {text && (\n <Text\n element=\"span\"\n type=\"text2\"\n className={labelClassName}\n data-testid={getTestId(ComponentDefaultTestId.RADIO_BUTTON_LABEL, id)}\n >\n {text}\n </Text>\n )}\n {children && (\n <Clickable onClick={onChildClick} tabIndex={childrenTabIndex}>\n {children}\n </Clickable>\n )}\n </label>\n </Tooltip>\n );\n }\n);\n\nexport default RadioButton;\n"],"names":["RadioButton","forwardRef","_ref","ref","className","_ref$text","text","_ref$value","value","_ref$name","name","labelClassName","radioButtonClassName","_ref$disabled","disabled","autoFocus","disabledReason","_ref$defaultChecked","defaultChecked","children","onSelect","checked","_ref$retainChildClick","retainChildClick","_ref$childrenTabIndex","childrenTabIndex","_ref$noLabelAnimation","noLabelAnimation","ariaLabel","ariaDescribedby","id","dataTestId","inputRef","useRef","mergedRef","useMergeRef","onChildClick","useCallback","current","checkedProps","useMemo","undefined","React","createElement","Tooltip","content","getTestId","ComponentDefaultTestId","RADIO_BUTTON","ComponentVibeId","cx","styles","radioButton","_defineProperty","inputContainer","Object","assign","input","type","onChange","RADIO_BUTTON_CONTROL","control","labelAnimation","Text","element","RADIO_BUTTON_LABEL","Clickable","onClick","tabIndex"],"mappings":"ooBAkFMA,IAAAA,EAAcC,GAClB,SAAAC,EAuBEC,GACE,IAtBAC,EAASF,EAATE,UAASC,EAAAH,EACTI,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EAAAE,EAAAL,EACTM,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EAAAE,EAAAP,EACVQ,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAcT,EAAdS,eACAC,EAAoBV,EAApBU,qBAAoBC,EAAAX,EACpBY,SAAAA,OAAW,IAAHD,GAAQA,EAChBE,EAASb,EAATa,UACAC,EAAcd,EAAdc,eAAcC,EAAAf,EACdgB,eAAAA,OAAiB,IAAHD,GAAQA,EACtBE,EAAQjB,EAARiB,SACAC,EAAQlB,EAARkB,SACAC,EAAOnB,EAAPmB,QAAOC,EAAApB,EACPqB,iBAAAA,OAAmB,IAAHD,GAAOA,EAAAE,EAAAtB,EACvBuB,iBAAAA,OAAmB,IAAHD,EAAG,EAACA,EAAAE,EAAAxB,EACpByB,iBAAAA,OAAmB,IAAHD,GAAQA,EACVE,EAAS1B,EAAvB,cACoB2B,EAAe3B,EAAnC,oBACA4B,EAAE5B,EAAF4B,GACeC,EAAU7B,EAAzB,eAII8B,EAAWC,IACXC,EAAYC,EAAYhC,EAAK6B,GAE7BI,EAAeC,GAAY,YAC3BvB,GAAaS,IACbS,EAASM,UACXN,EAASM,QAAQjB,SAAU,GAEzBD,GACFA,EAAS,MAEZ,GAAE,CAACA,EAAUY,EAAUlB,EAAUS,IAE5BgB,EAAeC,GAAQ,WAC3B,YAAgBC,IAAZpB,EACK,CAAEA,QAAAA,GAEJ,CAAEH,eAAAA,EACX,GAAG,CAACG,EAASH,IAIb,OACEwB,EAACC,cAAAC,EAAQ,CAAAC,QAHY/B,EAAWE,EAAiB,MAI/C0B,EACeC,cAAA,QAAA,CAAA,cAAAZ,GAAce,EAAUC,EAAuBC,aAAclB,GAC/D,YAAAmB,EAAgBD,aAC3B5C,UAAW8C,EAAGC,EAAOC,YAAahD,EAASiD,EAAAA,EAAA,CAAA,EACxCF,EAAOrC,SAAWA,GAAQ,WACjBA,KAGZ4B,EAAAC,cAAA,OAAA,CAAMvC,UAAW8C,EAAGC,EAAOG,iBACzBZ,EAAAC,cAAA,QAAAY,OAAAC,OAAA,CACEpD,UAAW8C,EAAGC,EAAOM,OACrBC,KAAK,QACLlD,MAAOA,EACPE,KAAMA,EACNK,UAAWA,EACXD,SAAUA,GACNyB,EACQ,CAAA,aAAAX,qBACMC,EAClB8B,SAAUvC,EACVjB,IAAK+B,KAEPQ,EAAAC,cAAA,OAAA,CAAA,cACeG,EAAUC,EAAuBa,qBAAsB9B,GACpE1B,UAAW8C,EAAGC,EAAOU,QAASjD,EAAoByC,KAC/CF,EAAOW,gBAAkBnC,OAI/BrB,GACCoC,EAACC,cAAAoB,EACC,CAAAC,QAAQ,OACRN,KAAK,QACLtD,UAAWO,EACE,cAAAmC,EAAUC,EAAuBkB,mBAAoBnC,IAEjExB,GAGJa,GACCuB,EAAAC,cAACuB,EAAU,CAAAC,QAAS/B,EAAcgC,SAAU3C,GACzCN,IAMb"}
@@ -1,2 +0,0 @@
1
- var n={radioButton:"radioButton_e8291bd6df",inputContainer:"inputContainer_faae611c0c",input:"input_a34ba40ef3",control:"control_ddb218a75a",labelAnimation:"labelAnimation_bb72252d3d",radioCheckedAnimation:"radioCheckedAnimation_b29f59a7a2",disabled:"disabled_e85bfc53c5",label:"label_fb6c047b6d"};!function(n){const e="s_id-f0fb17b54d8d_4_5_7";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+e))return;const d=document.createElement("style");d.id=e,o.firstChild?o.insertBefore(d,o.firstChild):o.appendChild(d),d.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}("/* stylelint-disable unit-disallowed-list */\n.radioButton_e8291bd6df {\n display: grid;\n grid-template-columns: 1.5em auto;\n grid-gap: 0.5em;\n cursor: pointer;\n}\n.inputContainer_faae611c0c {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.input_a34ba40ef3 {\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n}\n.control_ddb218a75a {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n border: 0.1em solid;\n box-sizing: border-box;\n border-color: var(--ui-border-color);\n border-radius: 50%;\n transition: border-width var(--motion-productive-medium) var(--motion-timing-enter);\n background-color: var(--secondary-background-color);\n}\ninput:checked + .control_ddb218a75a {\n border-color: var(--primary-color);\n border-width: 0.3em;\n}\ninput:checked + .labelAnimation_bb72252d3d {\n animation-name: radioCheckedAnimation_b29f59a7a2;\n animation-duration: var(--motion-productive-medium);\n animation-timing-function: var(--motion-timing-enter);\n animation-fill-mode: forwards;\n}\ninput:disabled + .control_ddb218a75a {\n border: 0.5em solid;\n border-color: var(--disabled-background-color);\n border-radius: 50%;\n}\ninput:checked:disabled + .control_ddb218a75a {\n border: 0.3em solid;\n border-color: var(--disabled-background-color);\n background-color: var(--secondary-text-color);\n}\n.radioButton_e8291bd6df.disabled_e85bfc53c5 {\n cursor: not-allowed;\n}\n.radioButton_e8291bd6df.disabled_e85bfc53c5 .label_fb6c047b6d {\n color: var(--disabled-text-color);\n}\n.inputContainer_faae611c0c input:focus-visible + .control_ddb218a75a {\n outline: none;\n border-color: var(--primary-color);\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5);\n border-radius: 50%;\n}\n.radioButton_e8291bd6df:hover .inputContainer_faae611c0c input:enabled:checked + .control_ddb218a75a {\n border-color: var(--primary-hover-color);\n}\n.radioButton_e8291bd6df:hover .inputContainer_faae611c0c input:enabled:not(:checked) + .control_ddb218a75a,\n.radioButton_e8291bd6df:focus-within .inputContainer_faae611c0c input:enabled:not(:checked) + .control_ddb218a75a {\n border-color: var(--primary-text-color);\n}\n@keyframes radioCheckedAnimation_b29f59a7a2 {\n 0% {\n height: 1em;\n width: 1em;\n }\n 50% {\n height: 0.8em;\n width: 0.8em;\n }\n 100% {\n height: 1em;\n width: 1em;\n }\n}");export{n as default};
2
- //# sourceMappingURL=RadioButton.module.scss.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioButton.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{useRef as r,useEffect as t}from"react";function n(){var n=r(!1);return t((function(){var r=setTimeout((function(){n.current=!0}),0);return function(){return clearTimeout(r)}}),[]),n}export{n as default};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/hooks/useAfterFirstRender/index.ts"],"sourcesContent":["import { type RefObject, useEffect, useRef } from \"react\";\n\nexport default function useAfterFirstRender(): RefObject<boolean> {\n const isAfterFirstRender = useRef(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n isAfterFirstRender.current = true;\n }, 0);\n return () => clearTimeout(timer);\n }, []);\n\n return isAfterFirstRender;\n}\n"],"names":["useAfterFirstRender","isAfterFirstRender","useRef","useEffect","timer","setTimeout","current","clearTimeout"],"mappings":"8CAEc,SAAUA,IACtB,IAAMC,EAAqBC,GAAO,GASlC,OAPAC,GAAU,WACR,IAAMC,EAAQC,YAAW,WACvBJ,EAAmBK,SAAU,CAC9B,GAAE,GACH,OAAO,WAAA,OAAMC,aAAaH,EAAM,CACjC,GAAE,IAEIH,CACT"}