@chayns-components/core 5.4.5 → 5.4.6-alpha.0

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 (472) hide show
  1. package/AGENTS.md +12 -0
  2. package/lib/cjs/components/accordion/Accordion.js +107 -12
  3. package/lib/cjs/components/accordion/Accordion.js.map +1 -1
  4. package/lib/cjs/components/accordion/Accordion.styles.js +23 -3
  5. package/lib/cjs/components/accordion/Accordion.styles.js.map +1 -1
  6. package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js +3 -1
  7. package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  8. package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js +36 -19
  9. package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  10. package/lib/cjs/components/accordion/accordion-head/AccordionHead.js +6 -3
  11. package/lib/cjs/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  12. package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js +14 -0
  13. package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  14. package/lib/cjs/components/amount-control/AmountControl.js +31 -17
  15. package/lib/cjs/components/amount-control/AmountControl.js.map +1 -1
  16. package/lib/cjs/components/amount-control/AmountControl.styles.js +18 -2
  17. package/lib/cjs/components/amount-control/AmountControl.styles.js.map +1 -1
  18. package/lib/cjs/components/button/Button.js +5 -1
  19. package/lib/cjs/components/button/Button.js.map +1 -1
  20. package/lib/cjs/components/button/Button.styles.js +10 -0
  21. package/lib/cjs/components/button/Button.styles.js.map +1 -1
  22. package/lib/cjs/components/button/Button.types.js.map +1 -1
  23. package/lib/cjs/components/checkbox/Checkbox.js +5 -1
  24. package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
  25. package/lib/cjs/components/checkbox/Checkbox.styles.js +29 -2
  26. package/lib/cjs/components/checkbox/Checkbox.styles.js.map +1 -1
  27. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js +7 -2
  28. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  29. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js +8 -2
  30. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
  31. package/lib/cjs/components/combobox/ComboBox.js +70 -26
  32. package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
  33. package/lib/cjs/components/combobox/ComboBox.styles.js +11 -0
  34. package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
  35. package/lib/cjs/components/combobox/ComboBox.types.js.map +1 -1
  36. package/lib/cjs/components/context-menu/ContextMenu.js +146 -42
  37. package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
  38. package/lib/cjs/components/context-menu/ContextMenu.styles.js +38 -0
  39. package/lib/cjs/components/context-menu/ContextMenu.styles.js.map +1 -1
  40. package/lib/cjs/components/context-menu/ContextMenu.types.js.map +1 -1
  41. package/lib/cjs/components/context-menu/ContextMenu.utils.js +27 -1
  42. package/lib/cjs/components/context-menu/ContextMenu.utils.js.map +1 -1
  43. package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.js +3 -8
  44. package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
  45. package/lib/cjs/components/dropdown-body-wrapper/DropdownBodyWrapper.js +1 -8
  46. package/lib/cjs/components/dropdown-body-wrapper/DropdownBodyWrapper.js.map +1 -1
  47. package/lib/cjs/components/file-input/FileInput.js +4 -2
  48. package/lib/cjs/components/file-input/FileInput.js.map +1 -1
  49. package/lib/cjs/components/file-list/file-item/FileItem.js +48 -25
  50. package/lib/cjs/components/file-list/file-item/FileItem.js.map +1 -1
  51. package/lib/cjs/components/file-list/file-item/FileItem.styles.js +25 -1
  52. package/lib/cjs/components/file-list/file-item/FileItem.styles.js.map +1 -1
  53. package/lib/cjs/components/file-select/FileSelect.js +27 -4
  54. package/lib/cjs/components/file-select/FileSelect.js.map +1 -1
  55. package/lib/cjs/components/file-select/FileSelect.styles.js +10 -0
  56. package/lib/cjs/components/file-select/FileSelect.styles.js.map +1 -1
  57. package/lib/cjs/components/filter/Filter.js +51 -16
  58. package/lib/cjs/components/filter/Filter.js.map +1 -1
  59. package/lib/cjs/components/filter/Filter.styles.js +9 -0
  60. package/lib/cjs/components/filter/Filter.styles.js.map +1 -1
  61. package/lib/cjs/components/filter/filter-content/FilterContent.js +14 -5
  62. package/lib/cjs/components/filter/filter-content/FilterContent.js.map +1 -1
  63. package/lib/cjs/components/filter/filter-content/FilterContent.types.js.map +1 -1
  64. package/lib/cjs/components/filter-buttons/FilterButtons.js +69 -4
  65. package/lib/cjs/components/filter-buttons/FilterButtons.js.map +1 -1
  66. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.js +40 -2
  67. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.js.map +1 -1
  68. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js +11 -0
  69. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
  70. package/lib/cjs/components/grid-image/GridImage.js +20 -2
  71. package/lib/cjs/components/grid-image/GridImage.js.map +1 -1
  72. package/lib/cjs/components/grid-image/GridImage.styles.js +11 -2
  73. package/lib/cjs/components/grid-image/GridImage.styles.js.map +1 -1
  74. package/lib/cjs/components/grouped-image/GroupedImage.js +23 -4
  75. package/lib/cjs/components/grouped-image/GroupedImage.js.map +1 -1
  76. package/lib/cjs/components/grouped-image/GroupedImage.styles.js +9 -0
  77. package/lib/cjs/components/grouped-image/GroupedImage.styles.js.map +1 -1
  78. package/lib/cjs/components/highlight-slider/HighlightSlider.js +13 -3
  79. package/lib/cjs/components/highlight-slider/HighlightSlider.js.map +1 -1
  80. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js +21 -4
  81. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js.map +1 -1
  82. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js +11 -2
  83. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js.map +1 -1
  84. package/lib/cjs/components/icon/Icon.js +24 -5
  85. package/lib/cjs/components/icon/Icon.js.map +1 -1
  86. package/lib/cjs/components/icon/Icon.styles.js +23 -0
  87. package/lib/cjs/components/icon/Icon.styles.js.map +1 -1
  88. package/lib/cjs/components/input/Input.js +29 -8
  89. package/lib/cjs/components/input/Input.js.map +1 -1
  90. package/lib/cjs/components/input/Input.styles.js +38 -3
  91. package/lib/cjs/components/input/Input.styles.js.map +1 -1
  92. package/lib/cjs/components/list/List.js +124 -37
  93. package/lib/cjs/components/list/List.js.map +1 -1
  94. package/lib/cjs/components/list/List.utils.js +213 -1
  95. package/lib/cjs/components/list/List.utils.js.map +1 -1
  96. package/lib/cjs/components/list/list-item/ListItem.js +84 -3
  97. package/lib/cjs/components/list/list-item/ListItem.js.map +1 -1
  98. package/lib/cjs/components/list/list-item/ListItem.styles.js +7 -0
  99. package/lib/cjs/components/list/list-item/ListItem.styles.js.map +1 -1
  100. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js +5 -1
  101. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  102. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js +5 -1
  103. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  104. package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +1 -0
  105. package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -1
  106. package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +3 -0
  107. package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -1
  108. package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +1 -0
  109. package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -1
  110. package/lib/cjs/components/list/list-item/useListItemFocus.js +47 -0
  111. package/lib/cjs/components/list/list-item/useListItemFocus.js.map +1 -0
  112. package/lib/cjs/components/mention-finder/MentionFinder.js +43 -5
  113. package/lib/cjs/components/mention-finder/MentionFinder.js.map +1 -1
  114. package/lib/cjs/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -1
  115. package/lib/cjs/components/multi-action-button/MultiActionButton.js +36 -3
  116. package/lib/cjs/components/multi-action-button/MultiActionButton.js.map +1 -1
  117. package/lib/cjs/components/multi-action-button/MultiActionButton.styles.js +6 -0
  118. package/lib/cjs/components/multi-action-button/MultiActionButton.styles.js.map +1 -1
  119. package/lib/cjs/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  120. package/lib/cjs/components/multi-action-button/action-button/ActionButton.js +7 -1
  121. package/lib/cjs/components/multi-action-button/action-button/ActionButton.js.map +1 -1
  122. package/lib/cjs/components/multi-action-button/action-button/ActionButton.styles.js +12 -0
  123. package/lib/cjs/components/multi-action-button/action-button/ActionButton.styles.js.map +1 -1
  124. package/lib/cjs/components/number-input/NumberInput.js +13 -10
  125. package/lib/cjs/components/number-input/NumberInput.js.map +1 -1
  126. package/lib/cjs/components/page-provider/PageProvider.js +4 -2
  127. package/lib/cjs/components/page-provider/PageProvider.js.map +1 -1
  128. package/lib/cjs/components/popup/Popup.js +8 -1
  129. package/lib/cjs/components/popup/Popup.js.map +1 -1
  130. package/lib/cjs/components/radio-button/RadioButton.js +29 -15
  131. package/lib/cjs/components/radio-button/RadioButton.js.map +1 -1
  132. package/lib/cjs/components/radio-button/RadioButton.styles.js +19 -8
  133. package/lib/cjs/components/radio-button/RadioButton.styles.js.map +1 -1
  134. package/lib/cjs/components/radio-button/radio-button-group/RadioButtonGroup.js +7 -4
  135. package/lib/cjs/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -1
  136. package/lib/cjs/components/search-box/SearchBox.js +20 -5
  137. package/lib/cjs/components/search-box/SearchBox.js.map +1 -1
  138. package/lib/cjs/components/search-input/SearchInput.js +56 -43
  139. package/lib/cjs/components/search-input/SearchInput.js.map +1 -1
  140. package/lib/cjs/components/search-input/SearchInput.styles.js +26 -2
  141. package/lib/cjs/components/search-input/SearchInput.styles.js.map +1 -1
  142. package/lib/cjs/components/select-button/SelectButton.js +4 -2
  143. package/lib/cjs/components/select-button/SelectButton.js.map +1 -1
  144. package/lib/cjs/components/setup-wizard/SetupWizard.js +10 -4
  145. package/lib/cjs/components/setup-wizard/SetupWizard.js.map +1 -1
  146. package/lib/cjs/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +5 -3
  147. package/lib/cjs/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -1
  148. package/lib/cjs/components/sharing-bar/SharingBar.js +31 -6
  149. package/lib/cjs/components/sharing-bar/SharingBar.js.map +1 -1
  150. package/lib/cjs/components/sharing-bar/SharingBar.styles.js +5 -0
  151. package/lib/cjs/components/sharing-bar/SharingBar.styles.js.map +1 -1
  152. package/lib/cjs/components/sharing-button/SharingButton.js +4 -2
  153. package/lib/cjs/components/sharing-button/SharingButton.js.map +1 -1
  154. package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js +3 -1
  155. package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js.map +1 -1
  156. package/lib/cjs/components/signature/Signature.js +6 -3
  157. package/lib/cjs/components/signature/Signature.js.map +1 -1
  158. package/lib/cjs/components/slider/Slider.js +30 -7
  159. package/lib/cjs/components/slider/Slider.js.map +1 -1
  160. package/lib/cjs/components/slider/Slider.styles.js +9 -2
  161. package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
  162. package/lib/cjs/components/slider-button/SliderButton.js +63 -6
  163. package/lib/cjs/components/slider-button/SliderButton.js.map +1 -1
  164. package/lib/cjs/components/slider-button/SliderButton.styles.js +15 -2
  165. package/lib/cjs/components/slider-button/SliderButton.styles.js.map +1 -1
  166. package/lib/cjs/components/slider-button/SliderButton.types.js +6 -0
  167. package/lib/cjs/components/slider-button/SliderButton.types.js.map +1 -0
  168. package/lib/cjs/components/slider-button/useSliderButtonPopupKeyboard.js +66 -0
  169. package/lib/cjs/components/slider-button/useSliderButtonPopupKeyboard.js.map +1 -0
  170. package/lib/cjs/components/slider-button/useSliderButtonThumbKeyboard.js +47 -0
  171. package/lib/cjs/components/slider-button/useSliderButtonThumbKeyboard.js.map +1 -0
  172. package/lib/cjs/components/tag-input/TagInput.js +92 -36
  173. package/lib/cjs/components/tag-input/TagInput.js.map +1 -1
  174. package/lib/cjs/components/tag-input/TagInput.styles.js +29 -3
  175. package/lib/cjs/components/tag-input/TagInput.styles.js.map +1 -1
  176. package/lib/cjs/components/text-area/TextArea.js +17 -8
  177. package/lib/cjs/components/text-area/TextArea.js.map +1 -1
  178. package/lib/cjs/components/text-area/TextArea.styles.js +15 -1
  179. package/lib/cjs/components/text-area/TextArea.styles.js.map +1 -1
  180. package/lib/cjs/components/truncation/Truncation.js +17 -3
  181. package/lib/cjs/components/truncation/Truncation.js.map +1 -1
  182. package/lib/cjs/components/truncation/Truncation.styles.js +18 -1
  183. package/lib/cjs/components/truncation/Truncation.styles.js.map +1 -1
  184. package/lib/cjs/hooks/dropdown.js +5 -24
  185. package/lib/cjs/hooks/dropdown.js.map +1 -1
  186. package/lib/cjs/hooks/useKeyboardFocusHighlighting.js +68 -0
  187. package/lib/cjs/hooks/useKeyboardFocusHighlighting.js.map +1 -0
  188. package/lib/cjs/utils/file.js.map +1 -1
  189. package/lib/cjs/utils/keyboardFocusHighlighting.styles.js +29 -0
  190. package/lib/cjs/utils/keyboardFocusHighlighting.styles.js.map +1 -0
  191. package/lib/esm/components/accordion/Accordion.js +105 -12
  192. package/lib/esm/components/accordion/Accordion.js.map +1 -1
  193. package/lib/esm/components/accordion/Accordion.styles.js +23 -3
  194. package/lib/esm/components/accordion/Accordion.styles.js.map +1 -1
  195. package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js +3 -1
  196. package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  197. package/lib/esm/components/accordion/accordion-group/AccordionGroup.js +33 -19
  198. package/lib/esm/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  199. package/lib/esm/components/accordion/accordion-head/AccordionHead.js +6 -3
  200. package/lib/esm/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  201. package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js +14 -0
  202. package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  203. package/lib/esm/components/amount-control/AmountControl.js +30 -16
  204. package/lib/esm/components/amount-control/AmountControl.js.map +1 -1
  205. package/lib/esm/components/amount-control/AmountControl.styles.js +18 -2
  206. package/lib/esm/components/amount-control/AmountControl.styles.js.map +1 -1
  207. package/lib/esm/components/button/Button.js +5 -1
  208. package/lib/esm/components/button/Button.js.map +1 -1
  209. package/lib/esm/components/button/Button.styles.js +10 -0
  210. package/lib/esm/components/button/Button.styles.js.map +1 -1
  211. package/lib/esm/components/button/Button.types.js.map +1 -1
  212. package/lib/esm/components/checkbox/Checkbox.js +5 -1
  213. package/lib/esm/components/checkbox/Checkbox.js.map +1 -1
  214. package/lib/esm/components/checkbox/Checkbox.styles.js +29 -2
  215. package/lib/esm/components/checkbox/Checkbox.styles.js.map +1 -1
  216. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +7 -2
  217. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  218. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js +8 -2
  219. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
  220. package/lib/esm/components/combobox/ComboBox.js +63 -22
  221. package/lib/esm/components/combobox/ComboBox.js.map +1 -1
  222. package/lib/esm/components/combobox/ComboBox.styles.js +11 -0
  223. package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
  224. package/lib/esm/components/combobox/ComboBox.types.js.map +1 -1
  225. package/lib/esm/components/context-menu/ContextMenu.js +145 -42
  226. package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
  227. package/lib/esm/components/context-menu/ContextMenu.styles.js +38 -0
  228. package/lib/esm/components/context-menu/ContextMenu.styles.js.map +1 -1
  229. package/lib/esm/components/context-menu/ContextMenu.types.js.map +1 -1
  230. package/lib/esm/components/context-menu/ContextMenu.utils.js +24 -0
  231. package/lib/esm/components/context-menu/ContextMenu.utils.js.map +1 -1
  232. package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.js +3 -8
  233. package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
  234. package/lib/esm/components/dropdown-body-wrapper/DropdownBodyWrapper.js +1 -8
  235. package/lib/esm/components/dropdown-body-wrapper/DropdownBodyWrapper.js.map +1 -1
  236. package/lib/esm/components/file-input/FileInput.js +4 -2
  237. package/lib/esm/components/file-input/FileInput.js.map +1 -1
  238. package/lib/esm/components/file-list/file-item/FileItem.js +49 -26
  239. package/lib/esm/components/file-list/file-item/FileItem.js.map +1 -1
  240. package/lib/esm/components/file-list/file-item/FileItem.styles.js +24 -0
  241. package/lib/esm/components/file-list/file-item/FileItem.styles.js.map +1 -1
  242. package/lib/esm/components/file-select/FileSelect.js +27 -4
  243. package/lib/esm/components/file-select/FileSelect.js.map +1 -1
  244. package/lib/esm/components/file-select/FileSelect.styles.js +10 -0
  245. package/lib/esm/components/file-select/FileSelect.styles.js.map +1 -1
  246. package/lib/esm/components/filter/Filter.js +52 -16
  247. package/lib/esm/components/filter/Filter.js.map +1 -1
  248. package/lib/esm/components/filter/Filter.styles.js +9 -0
  249. package/lib/esm/components/filter/Filter.styles.js.map +1 -1
  250. package/lib/esm/components/filter/filter-content/FilterContent.js +15 -5
  251. package/lib/esm/components/filter/filter-content/FilterContent.js.map +1 -1
  252. package/lib/esm/components/filter/filter-content/FilterContent.types.js.map +1 -1
  253. package/lib/esm/components/filter-buttons/FilterButtons.js +69 -5
  254. package/lib/esm/components/filter-buttons/FilterButtons.js.map +1 -1
  255. package/lib/esm/components/filter-buttons/filter-button/FilterButton.js +40 -2
  256. package/lib/esm/components/filter-buttons/filter-button/FilterButton.js.map +1 -1
  257. package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js +11 -0
  258. package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
  259. package/lib/esm/components/grid-image/GridImage.js +20 -2
  260. package/lib/esm/components/grid-image/GridImage.js.map +1 -1
  261. package/lib/esm/components/grid-image/GridImage.styles.js +10 -1
  262. package/lib/esm/components/grid-image/GridImage.styles.js.map +1 -1
  263. package/lib/esm/components/grouped-image/GroupedImage.js +22 -4
  264. package/lib/esm/components/grouped-image/GroupedImage.js.map +1 -1
  265. package/lib/esm/components/grouped-image/GroupedImage.styles.js +9 -0
  266. package/lib/esm/components/grouped-image/GroupedImage.styles.js.map +1 -1
  267. package/lib/esm/components/highlight-slider/HighlightSlider.js +13 -3
  268. package/lib/esm/components/highlight-slider/HighlightSlider.js.map +1 -1
  269. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js +20 -3
  270. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js.map +1 -1
  271. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js +10 -1
  272. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js.map +1 -1
  273. package/lib/esm/components/icon/Icon.js +26 -7
  274. package/lib/esm/components/icon/Icon.js.map +1 -1
  275. package/lib/esm/components/icon/Icon.styles.js +23 -0
  276. package/lib/esm/components/icon/Icon.styles.js.map +1 -1
  277. package/lib/esm/components/input/Input.js +24 -4
  278. package/lib/esm/components/input/Input.js.map +1 -1
  279. package/lib/esm/components/input/Input.styles.js +38 -3
  280. package/lib/esm/components/input/Input.styles.js.map +1 -1
  281. package/lib/esm/components/list/List.js +123 -37
  282. package/lib/esm/components/list/List.js.map +1 -1
  283. package/lib/esm/components/list/List.utils.js +202 -0
  284. package/lib/esm/components/list/List.utils.js.map +1 -1
  285. package/lib/esm/components/list/list-item/ListItem.js +85 -4
  286. package/lib/esm/components/list/list-item/ListItem.js.map +1 -1
  287. package/lib/esm/components/list/list-item/ListItem.styles.js +7 -0
  288. package/lib/esm/components/list/list-item/ListItem.styles.js.map +1 -1
  289. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js +6 -2
  290. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  291. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js +4 -0
  292. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  293. package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +1 -0
  294. package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -1
  295. package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +4 -1
  296. package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -1
  297. package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +1 -0
  298. package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -1
  299. package/lib/esm/components/list/list-item/useListItemFocus.js +40 -0
  300. package/lib/esm/components/list/list-item/useListItemFocus.js.map +1 -0
  301. package/lib/esm/components/mention-finder/MentionFinder.js +39 -3
  302. package/lib/esm/components/mention-finder/MentionFinder.js.map +1 -1
  303. package/lib/esm/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -1
  304. package/lib/esm/components/multi-action-button/MultiActionButton.js +36 -3
  305. package/lib/esm/components/multi-action-button/MultiActionButton.js.map +1 -1
  306. package/lib/esm/components/multi-action-button/MultiActionButton.styles.js +6 -0
  307. package/lib/esm/components/multi-action-button/MultiActionButton.styles.js.map +1 -1
  308. package/lib/esm/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  309. package/lib/esm/components/multi-action-button/action-button/ActionButton.js +7 -1
  310. package/lib/esm/components/multi-action-button/action-button/ActionButton.js.map +1 -1
  311. package/lib/esm/components/multi-action-button/action-button/ActionButton.styles.js +12 -0
  312. package/lib/esm/components/multi-action-button/action-button/ActionButton.styles.js.map +1 -1
  313. package/lib/esm/components/number-input/NumberInput.js +13 -10
  314. package/lib/esm/components/number-input/NumberInput.js.map +1 -1
  315. package/lib/esm/components/page-provider/PageProvider.js +4 -2
  316. package/lib/esm/components/page-provider/PageProvider.js.map +1 -1
  317. package/lib/esm/components/popup/Popup.js +8 -1
  318. package/lib/esm/components/popup/Popup.js.map +1 -1
  319. package/lib/esm/components/radio-button/RadioButton.js +29 -15
  320. package/lib/esm/components/radio-button/RadioButton.js.map +1 -1
  321. package/lib/esm/components/radio-button/RadioButton.styles.js +19 -8
  322. package/lib/esm/components/radio-button/RadioButton.styles.js.map +1 -1
  323. package/lib/esm/components/radio-button/radio-button-group/RadioButtonGroup.js +7 -4
  324. package/lib/esm/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -1
  325. package/lib/esm/components/search-box/SearchBox.js +17 -3
  326. package/lib/esm/components/search-box/SearchBox.js.map +1 -1
  327. package/lib/esm/components/search-input/SearchInput.js +56 -44
  328. package/lib/esm/components/search-input/SearchInput.js.map +1 -1
  329. package/lib/esm/components/search-input/SearchInput.styles.js +25 -1
  330. package/lib/esm/components/search-input/SearchInput.styles.js.map +1 -1
  331. package/lib/esm/components/select-button/SelectButton.js +4 -2
  332. package/lib/esm/components/select-button/SelectButton.js.map +1 -1
  333. package/lib/esm/components/setup-wizard/SetupWizard.js +10 -4
  334. package/lib/esm/components/setup-wizard/SetupWizard.js.map +1 -1
  335. package/lib/esm/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +5 -3
  336. package/lib/esm/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -1
  337. package/lib/esm/components/sharing-bar/SharingBar.js +30 -5
  338. package/lib/esm/components/sharing-bar/SharingBar.js.map +1 -1
  339. package/lib/esm/components/sharing-bar/SharingBar.styles.js +5 -0
  340. package/lib/esm/components/sharing-bar/SharingBar.styles.js.map +1 -1
  341. package/lib/esm/components/sharing-button/SharingButton.js +4 -2
  342. package/lib/esm/components/sharing-button/SharingButton.js.map +1 -1
  343. package/lib/esm/components/sharing-context-menu/SharingContextMenu.js +3 -1
  344. package/lib/esm/components/sharing-context-menu/SharingContextMenu.js.map +1 -1
  345. package/lib/esm/components/signature/Signature.js +6 -3
  346. package/lib/esm/components/signature/Signature.js.map +1 -1
  347. package/lib/esm/components/slider/Slider.js +30 -7
  348. package/lib/esm/components/slider/Slider.js.map +1 -1
  349. package/lib/esm/components/slider/Slider.styles.js +8 -1
  350. package/lib/esm/components/slider/Slider.styles.js.map +1 -1
  351. package/lib/esm/components/slider-button/SliderButton.js +62 -6
  352. package/lib/esm/components/slider-button/SliderButton.js.map +1 -1
  353. package/lib/esm/components/slider-button/SliderButton.styles.js +14 -1
  354. package/lib/esm/components/slider-button/SliderButton.styles.js.map +1 -1
  355. package/lib/esm/components/slider-button/SliderButton.types.js +2 -0
  356. package/lib/esm/components/slider-button/SliderButton.types.js.map +1 -0
  357. package/lib/esm/components/slider-button/useSliderButtonPopupKeyboard.js +56 -0
  358. package/lib/esm/components/slider-button/useSliderButtonPopupKeyboard.js.map +1 -0
  359. package/lib/esm/components/slider-button/useSliderButtonThumbKeyboard.js +38 -0
  360. package/lib/esm/components/slider-button/useSliderButtonThumbKeyboard.js.map +1 -0
  361. package/lib/esm/components/tag-input/TagInput.js +86 -35
  362. package/lib/esm/components/tag-input/TagInput.js.map +1 -1
  363. package/lib/esm/components/tag-input/TagInput.styles.js +27 -1
  364. package/lib/esm/components/tag-input/TagInput.styles.js.map +1 -1
  365. package/lib/esm/components/text-area/TextArea.js +18 -9
  366. package/lib/esm/components/text-area/TextArea.js.map +1 -1
  367. package/lib/esm/components/text-area/TextArea.styles.js +14 -0
  368. package/lib/esm/components/text-area/TextArea.styles.js.map +1 -1
  369. package/lib/esm/components/truncation/Truncation.js +18 -4
  370. package/lib/esm/components/truncation/Truncation.js.map +1 -1
  371. package/lib/esm/components/truncation/Truncation.styles.js +17 -0
  372. package/lib/esm/components/truncation/Truncation.styles.js.map +1 -1
  373. package/lib/esm/hooks/dropdown.js +5 -24
  374. package/lib/esm/hooks/dropdown.js.map +1 -1
  375. package/lib/esm/hooks/useKeyboardFocusHighlighting.js +61 -0
  376. package/lib/esm/hooks/useKeyboardFocusHighlighting.js.map +1 -0
  377. package/lib/esm/utils/file.js.map +1 -1
  378. package/lib/esm/utils/keyboardFocusHighlighting.styles.js +24 -0
  379. package/lib/esm/utils/keyboardFocusHighlighting.styles.js.map +1 -0
  380. package/lib/types/components/accordion/Accordion.d.ts +5 -0
  381. package/lib/types/components/accordion/Accordion.styles.d.ts +8 -4
  382. package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +2 -2
  383. package/lib/types/components/accordion/accordion-group/AccordionGroup.d.ts +7 -2
  384. package/lib/types/components/accordion/accordion-head/AccordionHead.d.ts +1 -0
  385. package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +18 -18
  386. package/lib/types/components/amount-control/AmountControl.d.ts +5 -0
  387. package/lib/types/components/amount-control/AmountControl.styles.d.ts +8 -4
  388. package/lib/types/components/button/Button.styles.d.ts +8 -6
  389. package/lib/types/components/button/Button.types.d.ts +8 -0
  390. package/lib/types/components/checkbox/Checkbox.d.ts +4 -0
  391. package/lib/types/components/checkbox/Checkbox.styles.d.ts +5 -1
  392. package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +5 -0
  393. package/lib/types/components/combobox/ComboBox.styles.d.ts +4 -2
  394. package/lib/types/components/combobox/ComboBox.types.d.ts +5 -0
  395. package/lib/types/components/context-menu/ContextMenu.styles.d.ts +4 -2
  396. package/lib/types/components/context-menu/ContextMenu.types.d.ts +6 -0
  397. package/lib/types/components/context-menu/ContextMenu.utils.d.ts +10 -0
  398. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
  399. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +2 -2
  400. package/lib/types/components/dropdown-body-wrapper/DropdownBodyWrapper.d.ts +0 -7
  401. package/lib/types/components/dropdown-body-wrapper/delayed-dropdown-content/DelayedDropdownContent.styles.d.ts +2 -2
  402. package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +2 -2
  403. package/lib/types/components/file-input/FileInput.d.ts +4 -0
  404. package/lib/types/components/file-input/FileInput.styles.d.ts +2 -2
  405. package/lib/types/components/file-list/file-item/FileItem.styles.d.ts +3 -0
  406. package/lib/types/components/file-select/FileSelect.d.ts +4 -0
  407. package/lib/types/components/file-select/FileSelect.styles.d.ts +6 -4
  408. package/lib/types/components/filter/Filter.d.ts +1 -0
  409. package/lib/types/components/filter/Filter.styles.d.ts +6 -4
  410. package/lib/types/components/filter/filter-content/FilterContent.types.d.ts +4 -0
  411. package/lib/types/components/filter-buttons/FilterButtons.d.ts +4 -0
  412. package/lib/types/components/filter-buttons/filter-button/FilterButton.d.ts +5 -0
  413. package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +12 -8
  414. package/lib/types/components/grid-image/GridImage.d.ts +4 -0
  415. package/lib/types/components/grid-image/GridImage.styles.d.ts +4 -2
  416. package/lib/types/components/grouped-image/GroupedImage.d.ts +4 -0
  417. package/lib/types/components/grouped-image/GroupedImage.styles.d.ts +8 -6
  418. package/lib/types/components/highlight-slider/HighlightSlider.d.ts +4 -0
  419. package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.d.ts +3 -0
  420. package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.d.ts +9 -5
  421. package/lib/types/components/icon/Icon.d.ts +4 -0
  422. package/lib/types/components/icon/Icon.styles.d.ts +1 -0
  423. package/lib/types/components/input/Input.d.ts +4 -0
  424. package/lib/types/components/input/Input.styles.d.ts +17 -9
  425. package/lib/types/components/list/List.d.ts +11 -0
  426. package/lib/types/components/list/List.utils.d.ts +32 -1
  427. package/lib/types/components/list/list-item/ListItem.d.ts +4 -0
  428. package/lib/types/components/list/list-item/ListItem.styles.d.ts +64 -64
  429. package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +2 -2
  430. package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +195 -194
  431. package/lib/types/components/list/list-item/useListItemFocus.d.ts +13 -0
  432. package/lib/types/components/masonry/masonry-item/MasonryItem.styles.d.ts +2 -2
  433. package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +4 -4
  434. package/lib/types/components/multi-action-button/MultiActionButton.styles.d.ts +2 -2
  435. package/lib/types/components/multi-action-button/MultiActionButton.types.d.ts +7 -0
  436. package/lib/types/components/multi-action-button/action-button/ActionButton.d.ts +4 -1
  437. package/lib/types/components/multi-action-button/action-button/ActionButton.styles.d.ts +4 -2
  438. package/lib/types/components/number-input/NumberInput.d.ts +4 -0
  439. package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +2 -2
  440. package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +6 -6
  441. package/lib/types/components/radio-button/RadioButton.d.ts +4 -0
  442. package/lib/types/components/radio-button/RadioButton.styles.d.ts +15 -9
  443. package/lib/types/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +5 -0
  444. package/lib/types/components/search-box/SearchBox.d.ts +4 -0
  445. package/lib/types/components/search-box/SearchBox.styles.d.ts +2 -2
  446. package/lib/types/components/search-input/SearchInput.d.ts +4 -0
  447. package/lib/types/components/search-input/SearchInput.styles.d.ts +17 -9
  448. package/lib/types/components/select-button/SelectButton.d.ts +4 -0
  449. package/lib/types/components/setup-wizard/SetupWizard.d.ts +5 -0
  450. package/lib/types/components/sharing-bar/SharingBar.d.ts +4 -0
  451. package/lib/types/components/sharing-button/SharingButton.d.ts +1 -1
  452. package/lib/types/components/sharing-context-menu/SharingContextMenu.d.ts +10 -2
  453. package/lib/types/components/signature/Signature.d.ts +4 -0
  454. package/lib/types/components/skeleton/base-skeleton/BaseSkeleton.styles.d.ts +4 -4
  455. package/lib/types/components/slider/Slider.d.ts +8 -0
  456. package/lib/types/components/slider/Slider.styles.d.ts +18 -14
  457. package/lib/types/components/slider-button/SliderButton.d.ts +1 -28
  458. package/lib/types/components/slider-button/SliderButton.styles.d.ts +6 -4
  459. package/lib/types/components/slider-button/SliderButton.types.d.ts +32 -0
  460. package/lib/types/components/slider-button/useSliderButtonPopupKeyboard.d.ts +17 -0
  461. package/lib/types/components/slider-button/useSliderButtonThumbKeyboard.d.ts +13 -0
  462. package/lib/types/components/tag-input/TagInput.d.ts +4 -0
  463. package/lib/types/components/tag-input/TagInput.styles.d.ts +12 -2
  464. package/lib/types/components/text-area/TextArea.d.ts +4 -0
  465. package/lib/types/components/text-area/TextArea.styles.d.ts +1 -0
  466. package/lib/types/components/truncation/Truncation.d.ts +4 -0
  467. package/lib/types/components/truncation/Truncation.styles.d.ts +7 -2
  468. package/lib/types/hooks/dropdown.d.ts +0 -2
  469. package/lib/types/hooks/useKeyboardFocusHighlighting.d.ts +5 -0
  470. package/lib/types/utils/file.d.ts +1 -1
  471. package/lib/types/utils/keyboardFocusHighlighting.styles.d.ts +9 -0
  472. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"MentionFinderItem.styles.js","names":["styled","css","StyledMentionFinderItem","div","theme","$isActive","StyledMentionFinderItemImage","img","$shouldShowRoundImage","StyledMentionFinderItemContent","text","StyledMentionFinderItemContentName","StyledMentionFinderItemContentInfo"],"sources":["../../../../../src/components/mention-finder/mention-finder-item/MentionFinderItem.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMentionFinderItemProps = WithTheme<{ $isActive: boolean }>;\n\nexport const StyledMentionFinderItem = styled.div<StyledMentionFinderItemProps>`\n align-items: center;\n cursor: pointer;\n display: flex;\n padding: 10px 8px;\n\n &:not(:last-child) {\n border-bottom: 1px solid\n rgba(${({ theme }: StyledMentionFinderItemProps) => theme['text-rgb']}, 0.15);\n }\n\n ${({ $isActive, theme }) =>\n $isActive &&\n css`\n background-color: ${theme['102']} !important;\n `}\n`;\n\ntype StyledMentionFinderItemImageProps = WithTheme<{\n $shouldShowRoundImage?: boolean;\n}>;\n\nexport const StyledMentionFinderItemImage = styled.img<StyledMentionFinderItemImageProps>`\n background-color: rgba(\n ${({ theme }: StyledMentionFinderItemImageProps) => theme['text-rgb']},\n 0.1\n );\n border-radius: ${({ $shouldShowRoundImage }) => ($shouldShowRoundImage ? '50%' : 'initial')};\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledMentionFinderItemImageProps) => theme['009-rgb']}, 0.08) inset;\n flex: 0 0 auto;\n height: 40px;\n object-fit: cover;\n overflow: hidden;\n transition: border-radius 0.3s ease;\n width: 40px;\n`;\n\ntype StyledMentionFinderItemContentProps = WithTheme<unknown>;\n\nexport const StyledMentionFinderItemContent = styled.div`\n color: ${({ theme }: StyledMentionFinderItemContentProps) => theme.text};\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n justify-content: center;\n line-height: normal;\n margin-left: 10px;\n min-width: 0;\n`;\n\nexport const StyledMentionFinderItemContentName = styled.div``;\n\nexport const StyledMentionFinderItemContentInfo = styled.div`\n font-size: 85%;\n margin-top: 2px;\n opacity: 0.75;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAK/C,OAAO,MAAMC,uBAAuB,GAAGF,MAAM,CAACG,GAAiC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,CAAC;EAAEC;AAAoC,CAAC,KAAKA,KAAK,CAAC,UAAU,CAAC;AACjF;AACA;AACA,MAAM,CAAC;EAAEC,SAAS;EAAED;AAAM,CAAC,KACnBC,SAAS,IACTJ,GAAG;AACX,gCAAgCG,KAAK,CAAC,KAAK,CAAC;AAC5C,SAAS;AACT,CAAC;AAMD,OAAO,MAAME,4BAA4B,GAAGN,MAAM,CAACO,GAAsC;AACzF;AACA,UAAU,CAAC;EAAEH;AAAyC,CAAC,KAAKA,KAAK,CAAC,UAAU,CAAC;AAC7E;AACA;AACA,qBAAqB,CAAC;EAAEI;AAAsB,CAAC,KAAMA,qBAAqB,GAAG,KAAK,GAAG,SAAU;AAC/F;AACA,eAAe,CAAC;EAAEJ;AAAyC,CAAC,KAAKA,KAAK,CAAC,SAAS,CAAC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAID,OAAO,MAAMK,8BAA8B,GAAGT,MAAM,CAACG,GAAG;AACxD,aAAa,CAAC;EAAEC;AAA2C,CAAC,KAAKA,KAAK,CAACM,IAAI;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,kCAAkC,GAAGX,MAAM,CAACG,GAAG,EAAE;AAE9D,OAAO,MAAMS,kCAAkC,GAAGZ,MAAM,CAACG,GAAG;AAC5D;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MentionFinderItem.styles.js","names":["styled","css","StyledMentionFinderItem","div","theme","$isActive","StyledMentionFinderItemImage","img","$shouldShowRoundImage","StyledMentionFinderItemContent","text","StyledMentionFinderItemContentName","StyledMentionFinderItemContentInfo"],"sources":["../../../../../src/components/mention-finder/mention-finder-item/MentionFinderItem.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledMentionFinderItemProps = WithTheme<{\n $isActive: boolean;\n}>;\n\nexport const StyledMentionFinderItem = styled.div<StyledMentionFinderItemProps>`\n align-items: center;\n cursor: pointer;\n display: flex;\n padding: 10px 8px;\n\n &:not(:last-child) {\n border-bottom: 1px solid\n rgba(${({ theme }: StyledMentionFinderItemProps) => theme['text-rgb']}, 0.15);\n }\n\n ${({ $isActive, theme }) =>\n $isActive &&\n css`\n background-color: ${theme['102']} !important;\n `}\n`;\n\ntype StyledMentionFinderItemImageProps = WithTheme<{\n $shouldShowRoundImage?: boolean;\n}>;\n\nexport const StyledMentionFinderItemImage = styled.img<StyledMentionFinderItemImageProps>`\n background-color: rgba(\n ${({ theme }: StyledMentionFinderItemImageProps) => theme['text-rgb']},\n 0.1\n );\n border-radius: ${({ $shouldShowRoundImage }) => ($shouldShowRoundImage ? '50%' : 'initial')};\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledMentionFinderItemImageProps) => theme['009-rgb']}, 0.08) inset;\n flex: 0 0 auto;\n height: 40px;\n object-fit: cover;\n overflow: hidden;\n transition: border-radius 0.3s ease;\n width: 40px;\n`;\n\ntype StyledMentionFinderItemContentProps = WithTheme<unknown>;\n\nexport const StyledMentionFinderItemContent = styled.div`\n color: ${({ theme }: StyledMentionFinderItemContentProps) => theme.text};\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n justify-content: center;\n line-height: normal;\n margin-left: 10px;\n min-width: 0;\n`;\n\nexport const StyledMentionFinderItemContentName = styled.div``;\n\nexport const StyledMentionFinderItemContentInfo = styled.div`\n font-size: 85%;\n margin-top: 2px;\n opacity: 0.75;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAO/C,OAAO,MAAMC,uBAAuB,GAAGF,MAAM,CAACG,GAAiC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,CAAC;EAAEC;AAAoC,CAAC,KAAKA,KAAK,CAAC,UAAU,CAAC;AACjF;AACA;AACA,MAAM,CAAC;EAAEC,SAAS;EAAED;AAAM,CAAC,KACnBC,SAAS,IACTJ,GAAG;AACX,gCAAgCG,KAAK,CAAC,KAAK,CAAC;AAC5C,SAAS;AACT,CAAC;AAMD,OAAO,MAAME,4BAA4B,GAAGN,MAAM,CAACO,GAAsC;AACzF;AACA,UAAU,CAAC;EAAEH;AAAyC,CAAC,KAAKA,KAAK,CAAC,UAAU,CAAC;AAC7E;AACA;AACA,qBAAqB,CAAC;EAAEI;AAAsB,CAAC,KAAMA,qBAAqB,GAAG,KAAK,GAAG,SAAU;AAC/F;AACA,eAAe,CAAC;EAAEJ;AAAyC,CAAC,KAAKA,KAAK,CAAC,SAAS,CAAC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAID,OAAO,MAAMK,8BAA8B,GAAGT,MAAM,CAACG,GAAG;AACxD,aAAa,CAAC;EAAEC;AAA2C,CAAC,KAAKA,KAAK,CAACM,IAAI;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,kCAAkC,GAAGX,MAAM,CAACG,GAAG,EAAE;AAE9D,OAAO,MAAMS,kCAAkC,GAAGZ,MAAM,CAACG,GAAG;AAC5D;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  import clsx from 'clsx';
2
2
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { useElementSize, useMeasuredClone } from '../../hooks/element';
4
+ import { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';
4
5
  import { useIsTouch } from '../../utils/environment';
5
6
  import ContextMenu from '../context-menu/ContextMenu';
6
7
  import ActionButton from './action-button/ActionButton';
@@ -64,11 +65,13 @@ const MultiActionButton = ({
64
65
  secondaryContextMenu,
65
66
  shouldAutoCollapse = false,
66
67
  shouldUseFullWidth,
68
+ shouldEnableKeyboardHighlighting,
67
69
  width
68
70
  }) => {
69
71
  const [isExtendedByClick, setIsExtendedByClick] = useState(false);
70
72
  const [isSecondaryExpanded, setIsSecondaryExpanded] = useState(false);
71
73
  const [isSecondaryHovered, setIsSecondaryHovered] = useState(false);
74
+ const [isSecondaryFocused, setIsSecondaryFocused] = useState(false);
72
75
  const autoCollapseTimeoutRef = useRef(null);
73
76
  const multiActionButtonRef = useRef(null);
74
77
  const secondaryContextMenuRef = useRef(null);
@@ -82,6 +85,7 @@ const MultiActionButton = ({
82
85
  const hasExpandableSecondaryAction = Boolean(secondaryAction) && !hasSecondaryContextMenu;
83
86
  const hasSecondaryAction = Boolean(secondaryTriggerAction);
84
87
  const shouldUseContentWidth = !width && !shouldUseFullWidth;
88
+ const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(shouldEnableKeyboardHighlighting && !isDisabled);
85
89
  const expandedMeasuredContent = useMemo(() => createMeasuredMultiActionButtonContent({
86
90
  backgroundColor,
87
91
  gapColor,
@@ -132,7 +136,15 @@ const MultiActionButton = ({
132
136
  height
133
137
  });
134
138
  const shouldHidePrimaryLabelForMinimumWidth = shouldKeepPrimaryLabelVisible && typeof availableWidth === 'number' && availableWidth <= minimumPrimaryLabelVisibleWidth;
135
- const resolvedWidth = shouldKeepFullWidth ? '100%' : effectiveIsCollapsed ? height : width ?? 'fit-content';
139
+ const resolvedWidth = useMemo(() => {
140
+ if (shouldKeepFullWidth) {
141
+ return '100%';
142
+ }
143
+ if (effectiveIsCollapsed) {
144
+ return height;
145
+ }
146
+ return width ?? 'fit-content';
147
+ }, [effectiveIsCollapsed, height, shouldKeepFullWidth, width]);
136
148
  const secondaryContextMenuTriggerStyle = getSecondaryContextMenuTriggerStyle({
137
149
  height,
138
150
  isCollapsed: isSecondaryHidden,
@@ -189,6 +201,7 @@ const MultiActionButton = ({
189
201
  setIsSecondaryExpanded(false);
190
202
  setIsExtendedByClick(false);
191
203
  setIsSecondaryHovered(false);
204
+ setIsSecondaryFocused(false);
192
205
  }
193
206
  }, [clearAutoCollapseTimeout, effectiveIsCollapsed, shouldPreventSecondaryExpansion]);
194
207
 
@@ -252,11 +265,26 @@ const MultiActionButton = ({
252
265
  setIsSecondaryExpanded(false);
253
266
  }
254
267
  }, [effectiveIsCollapsed, isExtendedByClick, isTouch]);
268
+ const handleSecondaryFocus = useCallback(() => {
269
+ if (!secondaryAction || isSecondaryHidden || isDisabled || shouldPreventSecondaryExpansion || secondaryAction.isDisabled) {
270
+ return;
271
+ }
272
+ setIsSecondaryFocused(true);
273
+ if (!isExtendedByClick) {
274
+ setIsSecondaryExpanded(true);
275
+ }
276
+ }, [isDisabled, isExtendedByClick, isSecondaryHidden, secondaryAction, shouldPreventSecondaryExpansion]);
277
+ const handleSecondaryBlur = useCallback(() => {
278
+ setIsSecondaryFocused(false);
279
+ if (!isExtendedByClick && !effectiveIsCollapsed) {
280
+ setIsSecondaryExpanded(false);
281
+ }
282
+ }, [effectiveIsCollapsed, isExtendedByClick]);
255
283
 
256
284
  /**
257
- * Secondary label is visible when expanded or when hovered (desktop only).
285
+ * Secondary label is visible when expanded or when hovered/focused.
258
286
  */
259
- const isSecondaryLabelVisible = isSecondaryExpanded || !isTouch && isSecondaryHovered;
287
+ const isSecondaryLabelVisible = isSecondaryExpanded || !isTouch && isSecondaryHovered || isSecondaryFocused;
260
288
  return /*#__PURE__*/React.createElement(React.Fragment, null, measuredElement, /*#__PURE__*/React.createElement(StyledMultiActionButton, {
261
289
  className: clsx('beta-chayns-multi-action', className),
262
290
  ref: multiActionButtonRef,
@@ -274,6 +302,7 @@ const MultiActionButton = ({
274
302
  isSolo: !hasSecondaryAction || isSecondaryHidden || effectiveIsCollapsed,
275
303
  onClick: handlePrimaryClick,
276
304
  showLabel: !effectiveIsCollapsed && !shouldHidePrimaryLabelForMinimumWidth && (shouldKeepPrimaryLabelVisible || !isAutoIconsOnly) && (shouldKeepPrimaryLabelVisible || !shouldHideSecondaryForAutoCollapse) && (!hasExpandableSecondaryAction || !isSecondaryExpanded),
305
+ shouldShowKeyboardHighlighting: shouldShowKeyboardHighlighting,
277
306
  shouldUseContentWidth: shouldUseContentWidth,
278
307
  height: height
279
308
  }), hasSecondaryAction && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledSeparator, {
@@ -298,6 +327,7 @@ const MultiActionButton = ({
298
327
  key: "multi-action-secondary-context-menu",
299
328
  onClick: handleSecondaryClick,
300
329
  showLabel: false,
330
+ shouldShowKeyboardHighlighting: shouldShowKeyboardHighlighting,
301
331
  shouldUseContentWidth: shouldUseContentWidth,
302
332
  height: height
303
333
  })) : /*#__PURE__*/React.createElement(ActionButton, {
@@ -312,7 +342,10 @@ const MultiActionButton = ({
312
342
  onClick: handleSecondaryClick,
313
343
  onMouseEnter: handleSecondaryMouseEnter,
314
344
  onMouseLeave: handleSecondaryMouseLeave,
345
+ onFocus: handleSecondaryFocus,
346
+ onBlur: handleSecondaryBlur,
315
347
  showLabel: !isSecondaryHidden && !isAutoIconsOnly && isSecondaryLabelVisible,
348
+ shouldShowKeyboardHighlighting: shouldShowKeyboardHighlighting,
316
349
  shouldUseContentWidth: shouldUseContentWidth,
317
350
  height: height
318
351
  }))));
@@ -1 +1 @@
1
- {"version":3,"file":"MultiActionButton.js","names":["clsx","React","useCallback","useEffect","useMemo","useRef","useState","useElementSize","useMeasuredClone","useIsTouch","ContextMenu","ActionButton","StyledMultiActionButton","StyledSeparator","getMinimumPrimaryLabelVisibleWidth","getMultiActionButtonAutoCollapseMode","getSecondaryContextMenuTriggerStyle","MultiActionButtonAutoCollapseMode","MultiActionButtonHeight","SECONDARY_CONTEXT_MENU_ACTION","icon","label","undefined","createMeasuredMultiActionButtonContent","backgroundColor","gapColor","height","primaryAction","secondaryAction","createElement","style","width","action","actionType","isCollapsed","isDisabled","isShrunk","isSolo","showLabel","shouldUseContentWidth","Fragment","$gapColor","$isHidden","isExpanded","isHidden","MultiActionButton","className","extendedTimeoutMs","Medium","secondaryContextMenu","shouldAutoCollapse","shouldUseFullWidth","isExtendedByClick","setIsExtendedByClick","isSecondaryExpanded","setIsSecondaryExpanded","isSecondaryHovered","setIsSecondaryHovered","autoCollapseTimeoutRef","multiActionButtonRef","secondaryContextMenuRef","autoCollapseMode","setAutoCollapseMode","Expanded","isTouch","parentSize","shouldUseParentElement","hasSecondaryContextMenu","Boolean","length","secondaryTriggerAction","hasExpandableSecondaryAction","hasSecondaryAction","expandedMeasuredContent","measuredElement","expandedMeasuredWidth","content","availableWidth","parentWidth","Math","min","previousMode","expandedWidth","isAutoIconsOnly","IconsOnly","isAutoPrimaryOnly","PrimaryOnly","shouldKeepFullWidth","shouldHideSecondaryForAutoCollapse","effectiveIsCollapsed","resolvedSecondaryAction","isSecondaryHidden","shouldPreventSecondaryExpansion","shouldKeepPrimaryLabelVisible","minimumPrimaryLabelVisibleWidth","hasVisibleSecondaryAction","shouldHidePrimaryLabelForMinimumWidth","resolvedWidth","secondaryContextMenuTriggerStyle","clearAutoCollapseTimeout","current","window","clearTimeout","resetAutoCollapseTimeout","setTimeout","expandSecondaryByClick","handlePrimaryClick","event","payload","isExtended","onClick","handleSecondaryClick","show","handleSecondaryMouseEnter","handleSecondaryMouseLeave","isSecondaryLabelVisible","ref","maxWidth","items","shouldDisableClick","shouldUseDefaultTriggerStyles","shouldHidePopupArrow","yOffset","key","onMouseEnter","onMouseLeave","displayName"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, {\n FC,\n MouseEvent,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useElementSize, useMeasuredClone } from '../../hooks/element';\nimport { useIsTouch } from '../../utils/environment';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport type { ContextMenuRef } from '../context-menu/ContextMenu.types';\nimport ActionButton from './action-button/ActionButton';\nimport { StyledMultiActionButton, StyledSeparator } from './MultiActionButton.styles';\nimport {\n getMinimumPrimaryLabelVisibleWidth,\n getMultiActionButtonAutoCollapseMode,\n getSecondaryContextMenuTriggerStyle,\n MultiActionButtonAutoCollapseMode,\n} from './MultiActionButton.utils';\nimport { MultiActionButtonHeight } from './MultiActionButton.types';\nimport type {\n MultiActionButtonAction,\n MultiActionButtonActionEvent,\n MultiActionButtonProps,\n} from './MultiActionButton.types';\n\nconst SECONDARY_CONTEXT_MENU_ACTION: MultiActionButtonAction = {\n icon: 'fa fa-chevron-down',\n label: undefined,\n};\n\ninterface CreateMeasuredMultiActionButtonContentOptions {\n backgroundColor?: string;\n gapColor?: string;\n height: number;\n primaryAction: MultiActionButtonAction;\n secondaryAction?: MultiActionButtonAction;\n}\n\nconst createMeasuredMultiActionButtonContent = ({\n backgroundColor,\n gapColor,\n height,\n primaryAction,\n secondaryAction,\n}: CreateMeasuredMultiActionButtonContentOptions): ReactNode => (\n <StyledMultiActionButton style={{ width: 'fit-content' }}>\n <ActionButton\n action={primaryAction}\n actionType=\"primary\"\n backgroundColor={primaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={false}\n isDisabled={false}\n isShrunk={false}\n isSolo={!secondaryAction}\n showLabel\n shouldUseContentWidth\n height={height}\n />\n {secondaryAction && (\n <>\n <StyledSeparator $gapColor={gapColor} $isHidden={false} />\n <ActionButton\n action={secondaryAction}\n actionType=\"secondary\"\n backgroundColor={secondaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={false}\n isDisabled={false}\n isExpanded={false}\n isHidden={false}\n showLabel={false}\n shouldUseContentWidth\n height={height}\n />\n </>\n )}\n </StyledMultiActionButton>\n);\n\n/**\n * Multi-action button with optional secondary action that can expand on hover/click.\n */\nconst MultiActionButton: FC<MultiActionButtonProps> = ({\n backgroundColor,\n className,\n extendedTimeoutMs = 3000,\n gapColor,\n height = MultiActionButtonHeight.Medium,\n isCollapsed = false,\n isDisabled = false,\n primaryAction,\n secondaryAction,\n secondaryContextMenu,\n shouldAutoCollapse = false,\n shouldUseFullWidth,\n width,\n}) => {\n const [isExtendedByClick, setIsExtendedByClick] = useState(false);\n const [isSecondaryExpanded, setIsSecondaryExpanded] = useState(false);\n const [isSecondaryHovered, setIsSecondaryHovered] = useState(false);\n\n const autoCollapseTimeoutRef = useRef<number | null>(null);\n const multiActionButtonRef = useRef<HTMLDivElement | null>(null);\n const secondaryContextMenuRef = useRef<ContextMenuRef>(null);\n const [autoCollapseMode, setAutoCollapseMode] = useState<MultiActionButtonAutoCollapseMode>(\n MultiActionButtonAutoCollapseMode.Expanded,\n );\n\n const isTouch = useIsTouch();\n const parentSize = useElementSize(multiActionButtonRef, { shouldUseParentElement: true });\n\n const hasSecondaryContextMenu = Boolean(secondaryContextMenu?.length);\n const secondaryTriggerAction = hasSecondaryContextMenu\n ? SECONDARY_CONTEXT_MENU_ACTION\n : secondaryAction;\n const hasExpandableSecondaryAction = Boolean(secondaryAction) && !hasSecondaryContextMenu;\n const hasSecondaryAction = Boolean(secondaryTriggerAction);\n const shouldUseContentWidth = !width && !shouldUseFullWidth;\n\n const expandedMeasuredContent = useMemo(\n () =>\n createMeasuredMultiActionButtonContent({\n backgroundColor,\n gapColor,\n height,\n primaryAction,\n secondaryAction: secondaryTriggerAction,\n }),\n [backgroundColor, gapColor, height, primaryAction, secondaryTriggerAction],\n );\n\n const { measuredElement, width: expandedMeasuredWidth } = useMeasuredClone({\n content: expandedMeasuredContent,\n });\n\n const availableWidth = useMemo(() => {\n const parentWidth = parentSize?.width;\n\n if (typeof width === 'number') {\n return typeof parentWidth === 'number' ? Math.min(parentWidth, width) : width;\n }\n\n return parentWidth;\n }, [parentSize?.width, width]);\n\n useEffect(() => {\n if (!shouldAutoCollapse || isCollapsed) {\n setAutoCollapseMode(MultiActionButtonAutoCollapseMode.Expanded);\n return;\n }\n\n if (expandedMeasuredWidth <= 0) {\n return;\n }\n\n setAutoCollapseMode((previousMode) =>\n getMultiActionButtonAutoCollapseMode({\n availableWidth,\n expandedWidth: expandedMeasuredWidth,\n hasSecondaryAction,\n height,\n previousMode,\n }),\n );\n }, [\n availableWidth,\n expandedMeasuredWidth,\n hasSecondaryAction,\n height,\n isCollapsed,\n shouldAutoCollapse,\n ]);\n\n const isAutoIconsOnly =\n shouldAutoCollapse && autoCollapseMode === MultiActionButtonAutoCollapseMode.IconsOnly;\n const isAutoPrimaryOnly =\n shouldAutoCollapse && autoCollapseMode === MultiActionButtonAutoCollapseMode.PrimaryOnly;\n const shouldKeepFullWidth = Boolean(shouldUseFullWidth);\n const shouldHideSecondaryForAutoCollapse = hasSecondaryAction && isAutoPrimaryOnly;\n const effectiveIsCollapsed = isCollapsed || (!shouldKeepFullWidth && isAutoPrimaryOnly);\n const resolvedSecondaryAction = hasSecondaryAction ? secondaryTriggerAction : undefined;\n const isSecondaryHidden = effectiveIsCollapsed || shouldHideSecondaryForAutoCollapse;\n const shouldPreventSecondaryExpansion = isAutoIconsOnly || isSecondaryHidden;\n const shouldKeepPrimaryLabelVisible = shouldKeepFullWidth && shouldAutoCollapse;\n const minimumPrimaryLabelVisibleWidth = getMinimumPrimaryLabelVisibleWidth({\n hasVisibleSecondaryAction: hasSecondaryAction,\n height,\n });\n const shouldHidePrimaryLabelForMinimumWidth =\n shouldKeepPrimaryLabelVisible &&\n typeof availableWidth === 'number' &&\n availableWidth <= minimumPrimaryLabelVisibleWidth;\n\n const resolvedWidth = shouldKeepFullWidth\n ? '100%'\n : effectiveIsCollapsed\n ? height\n : (width ?? 'fit-content');\n\n const secondaryContextMenuTriggerStyle = getSecondaryContextMenuTriggerStyle({\n height,\n isCollapsed: isSecondaryHidden,\n isExpanded: false,\n shouldUseContentWidth,\n });\n\n /**\n * Clears the current auto-collapse timer without changing visual state.\n */\n const clearAutoCollapseTimeout = useCallback(() => {\n if (autoCollapseTimeoutRef.current) {\n window.clearTimeout(autoCollapseTimeoutRef.current);\n autoCollapseTimeoutRef.current = null;\n }\n }, []);\n\n /**\n * Clears and restarts the auto-collapse timer used after click-triggered expansion.\n */\n const resetAutoCollapseTimeout = useCallback(() => {\n clearAutoCollapseTimeout();\n\n if (extendedTimeoutMs <= 0) {\n return;\n }\n\n autoCollapseTimeoutRef.current = window.setTimeout(() => {\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n }, extendedTimeoutMs);\n }, [clearAutoCollapseTimeout, extendedTimeoutMs]);\n\n /**\n * Expands the secondary action and remembers that it originated from a click.\n */\n const expandSecondaryByClick = useCallback(() => {\n setIsSecondaryExpanded(true);\n setIsExtendedByClick(true);\n resetAutoCollapseTimeout();\n }, [resetAutoCollapseTimeout]);\n\n /**\n * Cleanup timers on unmount.\n */\n useEffect(\n () => () => {\n clearAutoCollapseTimeout();\n },\n [clearAutoCollapseTimeout],\n );\n\n /**\n * Collapsing the control should also reset any temporary expansion state.\n */\n useEffect(() => {\n if (effectiveIsCollapsed || shouldPreventSecondaryExpansion) {\n clearAutoCollapseTimeout();\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n setIsSecondaryHovered(false);\n }\n }, [clearAutoCollapseTimeout, effectiveIsCollapsed, shouldPreventSecondaryExpansion]);\n\n /**\n * Handler for the primary action button.\n */\n const handlePrimaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (isDisabled || primaryAction.isDisabled) {\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'primary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n primaryAction.onClick?.(payload);\n },\n [isDisabled, isSecondaryExpanded, isTouch, primaryAction],\n );\n\n /**\n * Handler for the secondary action button.\n */\n const handleSecondaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (\n !resolvedSecondaryAction ||\n isSecondaryHidden ||\n isDisabled ||\n resolvedSecondaryAction.isDisabled\n ) {\n return;\n }\n\n if (hasSecondaryContextMenu) {\n secondaryContextMenuRef.current?.show();\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'secondary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n resolvedSecondaryAction.onClick?.(payload);\n if (!shouldPreventSecondaryExpansion) {\n expandSecondaryByClick();\n }\n },\n [\n expandSecondaryByClick,\n hasSecondaryContextMenu,\n isSecondaryHidden,\n isDisabled,\n isSecondaryExpanded,\n isTouch,\n resolvedSecondaryAction,\n shouldPreventSecondaryExpansion,\n ],\n );\n\n /**\n * Desktop hover behavior keeps the secondary action expanded while hovered.\n */\n const handleSecondaryMouseEnter = useCallback(() => {\n if (\n !secondaryAction ||\n isSecondaryHidden ||\n isTouch ||\n isDisabled ||\n shouldPreventSecondaryExpansion ||\n secondaryAction.isDisabled\n ) {\n return;\n }\n\n setIsSecondaryHovered(true);\n if (!isExtendedByClick) {\n setIsSecondaryExpanded(true);\n }\n }, [\n isSecondaryHidden,\n isDisabled,\n isExtendedByClick,\n isTouch,\n secondaryAction,\n shouldPreventSecondaryExpansion,\n ]);\n\n const handleSecondaryMouseLeave = useCallback(() => {\n if (isTouch) {\n return;\n }\n\n setIsSecondaryHovered(false);\n if (!isExtendedByClick && !effectiveIsCollapsed) {\n setIsSecondaryExpanded(false);\n }\n }, [effectiveIsCollapsed, isExtendedByClick, isTouch]);\n\n /**\n * Secondary label is visible when expanded or when hovered (desktop only).\n */\n const isSecondaryLabelVisible = isSecondaryExpanded || (!isTouch && isSecondaryHovered);\n\n return (\n <>\n {measuredElement}\n <StyledMultiActionButton\n className={clsx('beta-chayns-multi-action', className)}\n ref={multiActionButtonRef}\n style={{ maxWidth: '100%', width: resolvedWidth }}\n >\n <ActionButton\n action={primaryAction}\n actionType=\"primary\"\n backgroundColor={primaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={effectiveIsCollapsed}\n isDisabled={isDisabled}\n isShrunk={\n hasSecondaryAction &&\n ((!shouldKeepFullWidth && isAutoIconsOnly) || isSecondaryExpanded)\n }\n isSolo={!hasSecondaryAction || isSecondaryHidden || effectiveIsCollapsed}\n onClick={handlePrimaryClick}\n showLabel={\n !effectiveIsCollapsed &&\n !shouldHidePrimaryLabelForMinimumWidth &&\n (shouldKeepPrimaryLabelVisible || !isAutoIconsOnly) &&\n (shouldKeepPrimaryLabelVisible || !shouldHideSecondaryForAutoCollapse) &&\n (!hasExpandableSecondaryAction || !isSecondaryExpanded)\n }\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n {hasSecondaryAction && (\n <>\n <StyledSeparator $gapColor={gapColor} $isHidden={isSecondaryHidden} />\n {hasSecondaryContextMenu ? (\n <ContextMenu\n items={secondaryContextMenu ?? []}\n ref={secondaryContextMenuRef}\n shouldDisableClick\n shouldUseDefaultTriggerStyles={false}\n shouldHidePopupArrow\n yOffset={-6}\n style={secondaryContextMenuTriggerStyle}\n >\n <ActionButton\n action={\n resolvedSecondaryAction ?? SECONDARY_CONTEXT_MENU_ACTION\n }\n actionType=\"secondary\"\n backgroundColor={\n resolvedSecondaryAction?.backgroundColor ?? backgroundColor\n }\n isCollapsed={false}\n isDisabled={isDisabled}\n isExpanded={false}\n isHidden={isSecondaryHidden}\n key=\"multi-action-secondary-context-menu\"\n onClick={handleSecondaryClick}\n showLabel={false}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n </ContextMenu>\n ) : (\n <ActionButton\n action={\n resolvedSecondaryAction ??\n secondaryAction ??\n SECONDARY_CONTEXT_MENU_ACTION\n }\n actionType=\"secondary\"\n backgroundColor={\n resolvedSecondaryAction?.backgroundColor ?? backgroundColor\n }\n isCollapsed={false}\n isDisabled={isDisabled}\n isExpanded={!isAutoIconsOnly && isSecondaryExpanded}\n isHidden={isSecondaryHidden}\n key=\"multi-action-secondary-button\"\n onClick={handleSecondaryClick}\n onMouseEnter={handleSecondaryMouseEnter}\n onMouseLeave={handleSecondaryMouseLeave}\n showLabel={\n !isSecondaryHidden &&\n !isAutoIconsOnly &&\n isSecondaryLabelVisible\n }\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n )}\n </>\n )}\n </StyledMultiActionButton>\n </>\n );\n};\n\nMultiActionButton.displayName = 'MultiActionButton';\n\nexport default MultiActionButton;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM;AACvB,OAAOC,KAAK,IAIRC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,qBAAqB;AACtE,SAASC,UAAU,QAAQ,yBAAyB;AACpD,OAAOC,WAAW,MAAM,6BAA6B;AAErD,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,4BAA4B;AACrF,SACIC,kCAAkC,EAClCC,oCAAoC,EACpCC,m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ACtBT,eAAe,EACXkE,uBAAuB,EAAElE,eAAe,IAAIA,eAC/C;IACDU,WAAW,EAAE,KAAM;IACnBC,UAAU,EAAEA,UAAW;IACvBQ,UAAU,EAAE,CAACwC,eAAe,IAAI7B,mBAAoB;IACpDV,QAAQ,EAAE+C,iBAAkB;IAC5BgC,GAAG,EAAC,+BAA+B;IACnCb,OAAO,EAAEC,oBAAqB;IAC9Ba,YAAY,EAAEX,yBAA0B;IACxCY,YAAY,EAAEX,yBAA0B;IACxC5E,SAAS,EACL,CAACqD,iBAAiB,IAClB,CAACR,eAAe,IAChBgC,uBACH;IACD5E,qBAAqB,EAAEA,qBAAsB;IAC7Cb,MAAM,EAAEA;EAAO,CAClB,CAEP,CAEe,CAC3B,CAAC;AAEX,CAAC;AAEDmB,iBAAiB,CAACiF,WAAW,GAAG,mBAAmB;AAEnD,eAAejF,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"MultiActionButton.js","names":["clsx","React","useCallback","useEffect","useMemo","useRef","useState","useElementSize","useMeasuredClone","useKeyboardFocusHighlighting","useIsTouch","ContextMenu","ActionButton","StyledMultiActionButton","StyledSeparator","getMinimumPrimaryLabelVisibleWidth","getMultiActionButtonAutoCollapseMode","getSecondaryContextMenuTriggerStyle","MultiActionButtonAutoCollapseMode","MultiActionButtonHeight","SECONDARY_CONTEXT_MENU_ACTION","icon","label","undefined","createMeasuredMultiActionButtonContent","backgroundColor","gapColor","height","primaryAction","secondaryAction","createElement","style","width","action","actionType","isCollapsed","isDisabled","isShrunk","isSolo","showLabel","shouldUseContentWidth","Fragment","$gapColor","$isHidden","isExpanded","isHidden","MultiActionButton","className","extendedTimeoutMs","Medium","secondaryContextMenu","shouldAutoCollapse","shouldUseFullWidth","shouldEnableKeyboardHighlighting","isExtendedByClick","setIsExtendedByClick","isSecondaryExpanded","setIsSecondaryExpanded","isSecondaryHovered","setIsSecondaryHovered","isSecondaryFocused","setIsSecondaryFocused","autoCollapseTimeoutRef","multiActionButtonRef","secondaryContextMenuRef","autoCollapseMode","setAutoCollapseMode","Expanded","isTouch","parentSize","shouldUseParentElement","hasSecondaryContextMenu","Boolean","length","secondaryTriggerAction","hasExpandableSecondaryAction","hasSecondaryAction","shouldShowKeyboardHighlighting","expandedMeasuredContent","measuredElement","expandedMeasuredWidth","content","availableWidth","parentWidth","Math","min","previousMode","expandedWidth","isAutoIconsOnly","IconsOnly","isAutoPrimaryOnly","PrimaryOnly","shouldKeepFullWidth","shouldHideSecondaryForAutoCollapse","effectiveIsCollapsed","resolvedSecondaryAction","isSecondaryHidden","shouldPreventSecondaryExpansion","shouldKeepPrimaryLabelVisible","minimumPrimaryLabelVisibleWidth","hasVisibleSecondaryAction","shouldHidePrimaryLabelForMinimumWidth","resolvedWidth","secondaryContextMenuTriggerStyle","clearAutoCollapseTimeout","current","window","clearTimeout","resetAutoCollapseTimeout","setTimeout","expandSecondaryByClick","handlePrimaryClick","event","payload","isExtended","onClick","handleSecondaryClick","show","handleSecondaryMouseEnter","handleSecondaryMouseLeave","handleSecondaryFocus","handleSecondaryBlur","isSecondaryLabelVisible","ref","maxWidth","items","shouldDisableClick","shouldUseDefaultTriggerStyles","shouldHidePopupArrow","yOffset","key","onMouseEnter","onMouseLeave","onFocus","onBlur","displayName"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React, {\n FC,\n MouseEvent,\n ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useElementSize, useMeasuredClone } from '../../hooks/element';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\nimport { useIsTouch } from '../../utils/environment';\nimport ContextMenu from '../context-menu/ContextMenu';\nimport type { ContextMenuRef } from '../context-menu/ContextMenu.types';\nimport ActionButton from './action-button/ActionButton';\nimport { StyledMultiActionButton, StyledSeparator } from './MultiActionButton.styles';\nimport {\n getMinimumPrimaryLabelVisibleWidth,\n getMultiActionButtonAutoCollapseMode,\n getSecondaryContextMenuTriggerStyle,\n MultiActionButtonAutoCollapseMode,\n} from './MultiActionButton.utils';\nimport { MultiActionButtonHeight } from './MultiActionButton.types';\nimport type {\n MultiActionButtonAction,\n MultiActionButtonActionEvent,\n MultiActionButtonProps,\n} from './MultiActionButton.types';\n\nconst SECONDARY_CONTEXT_MENU_ACTION: MultiActionButtonAction = {\n icon: 'fa fa-chevron-down',\n label: undefined,\n};\n\ninterface CreateMeasuredMultiActionButtonContentOptions {\n backgroundColor?: string;\n gapColor?: string;\n height: number;\n primaryAction: MultiActionButtonAction;\n secondaryAction?: MultiActionButtonAction;\n}\n\nconst createMeasuredMultiActionButtonContent = ({\n backgroundColor,\n gapColor,\n height,\n primaryAction,\n secondaryAction,\n}: CreateMeasuredMultiActionButtonContentOptions): ReactNode => (\n <StyledMultiActionButton style={{ width: 'fit-content' }}>\n <ActionButton\n action={primaryAction}\n actionType=\"primary\"\n backgroundColor={primaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={false}\n isDisabled={false}\n isShrunk={false}\n isSolo={!secondaryAction}\n showLabel\n shouldUseContentWidth\n height={height}\n />\n {secondaryAction && (\n <>\n <StyledSeparator $gapColor={gapColor} $isHidden={false} />\n <ActionButton\n action={secondaryAction}\n actionType=\"secondary\"\n backgroundColor={secondaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={false}\n isDisabled={false}\n isExpanded={false}\n isHidden={false}\n showLabel={false}\n shouldUseContentWidth\n height={height}\n />\n </>\n )}\n </StyledMultiActionButton>\n);\n\n/**\n * Multi-action button with optional secondary action that can expand on hover/click.\n */\nconst MultiActionButton: FC<MultiActionButtonProps> = ({\n backgroundColor,\n className,\n extendedTimeoutMs = 3000,\n gapColor,\n height = MultiActionButtonHeight.Medium,\n isCollapsed = false,\n isDisabled = false,\n primaryAction,\n secondaryAction,\n secondaryContextMenu,\n shouldAutoCollapse = false,\n shouldUseFullWidth,\n shouldEnableKeyboardHighlighting,\n width,\n}) => {\n const [isExtendedByClick, setIsExtendedByClick] = useState(false);\n const [isSecondaryExpanded, setIsSecondaryExpanded] = useState(false);\n const [isSecondaryHovered, setIsSecondaryHovered] = useState(false);\n const [isSecondaryFocused, setIsSecondaryFocused] = useState(false);\n\n const autoCollapseTimeoutRef = useRef<number | null>(null);\n const multiActionButtonRef = useRef<HTMLDivElement | null>(null);\n const secondaryContextMenuRef = useRef<ContextMenuRef>(null);\n const [autoCollapseMode, setAutoCollapseMode] = useState<MultiActionButtonAutoCollapseMode>(\n MultiActionButtonAutoCollapseMode.Expanded,\n );\n\n const isTouch = useIsTouch();\n const parentSize = useElementSize(multiActionButtonRef, { shouldUseParentElement: true });\n\n const hasSecondaryContextMenu = Boolean(secondaryContextMenu?.length);\n const secondaryTriggerAction = hasSecondaryContextMenu\n ? SECONDARY_CONTEXT_MENU_ACTION\n : secondaryAction;\n const hasExpandableSecondaryAction = Boolean(secondaryAction) && !hasSecondaryContextMenu;\n const hasSecondaryAction = Boolean(secondaryTriggerAction);\n const shouldUseContentWidth = !width && !shouldUseFullWidth;\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n\n const expandedMeasuredContent = useMemo(\n () =>\n createMeasuredMultiActionButtonContent({\n backgroundColor,\n gapColor,\n height,\n primaryAction,\n secondaryAction: secondaryTriggerAction,\n }),\n [backgroundColor, gapColor, height, primaryAction, secondaryTriggerAction],\n );\n\n const { measuredElement, width: expandedMeasuredWidth } = useMeasuredClone({\n content: expandedMeasuredContent,\n });\n\n const availableWidth = useMemo(() => {\n const parentWidth = parentSize?.width;\n\n if (typeof width === 'number') {\n return typeof parentWidth === 'number' ? Math.min(parentWidth, width) : width;\n }\n\n return parentWidth;\n }, [parentSize?.width, width]);\n\n useEffect(() => {\n if (!shouldAutoCollapse || isCollapsed) {\n setAutoCollapseMode(MultiActionButtonAutoCollapseMode.Expanded);\n return;\n }\n\n if (expandedMeasuredWidth <= 0) {\n return;\n }\n\n setAutoCollapseMode((previousMode) =>\n getMultiActionButtonAutoCollapseMode({\n availableWidth,\n expandedWidth: expandedMeasuredWidth,\n hasSecondaryAction,\n height,\n previousMode,\n }),\n );\n }, [\n availableWidth,\n expandedMeasuredWidth,\n hasSecondaryAction,\n height,\n isCollapsed,\n shouldAutoCollapse,\n ]);\n\n const isAutoIconsOnly =\n shouldAutoCollapse && autoCollapseMode === MultiActionButtonAutoCollapseMode.IconsOnly;\n const isAutoPrimaryOnly =\n shouldAutoCollapse && autoCollapseMode === MultiActionButtonAutoCollapseMode.PrimaryOnly;\n const shouldKeepFullWidth = Boolean(shouldUseFullWidth);\n const shouldHideSecondaryForAutoCollapse = hasSecondaryAction && isAutoPrimaryOnly;\n const effectiveIsCollapsed = isCollapsed || (!shouldKeepFullWidth && isAutoPrimaryOnly);\n const resolvedSecondaryAction = hasSecondaryAction ? secondaryTriggerAction : undefined;\n const isSecondaryHidden = effectiveIsCollapsed || shouldHideSecondaryForAutoCollapse;\n const shouldPreventSecondaryExpansion = isAutoIconsOnly || isSecondaryHidden;\n const shouldKeepPrimaryLabelVisible = shouldKeepFullWidth && shouldAutoCollapse;\n const minimumPrimaryLabelVisibleWidth = getMinimumPrimaryLabelVisibleWidth({\n hasVisibleSecondaryAction: hasSecondaryAction,\n height,\n });\n const shouldHidePrimaryLabelForMinimumWidth =\n shouldKeepPrimaryLabelVisible &&\n typeof availableWidth === 'number' &&\n availableWidth <= minimumPrimaryLabelVisibleWidth;\n\n const resolvedWidth = useMemo(() => {\n if (shouldKeepFullWidth) {\n return '100%';\n }\n\n if (effectiveIsCollapsed) {\n return height;\n }\n\n return width ?? 'fit-content';\n }, [effectiveIsCollapsed, height, shouldKeepFullWidth, width]);\n\n const secondaryContextMenuTriggerStyle = getSecondaryContextMenuTriggerStyle({\n height,\n isCollapsed: isSecondaryHidden,\n isExpanded: false,\n shouldUseContentWidth,\n });\n\n /**\n * Clears the current auto-collapse timer without changing visual state.\n */\n const clearAutoCollapseTimeout = useCallback(() => {\n if (autoCollapseTimeoutRef.current) {\n window.clearTimeout(autoCollapseTimeoutRef.current);\n autoCollapseTimeoutRef.current = null;\n }\n }, []);\n\n /**\n * Clears and restarts the auto-collapse timer used after click-triggered expansion.\n */\n const resetAutoCollapseTimeout = useCallback(() => {\n clearAutoCollapseTimeout();\n\n if (extendedTimeoutMs <= 0) {\n return;\n }\n\n autoCollapseTimeoutRef.current = window.setTimeout(() => {\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n }, extendedTimeoutMs);\n }, [clearAutoCollapseTimeout, extendedTimeoutMs]);\n\n /**\n * Expands the secondary action and remembers that it originated from a click.\n */\n const expandSecondaryByClick = useCallback(() => {\n setIsSecondaryExpanded(true);\n setIsExtendedByClick(true);\n resetAutoCollapseTimeout();\n }, [resetAutoCollapseTimeout]);\n\n /**\n * Cleanup timers on unmount.\n */\n useEffect(\n () => () => {\n clearAutoCollapseTimeout();\n },\n [clearAutoCollapseTimeout],\n );\n\n /**\n * Collapsing the control should also reset any temporary expansion state.\n */\n useEffect(() => {\n if (effectiveIsCollapsed || shouldPreventSecondaryExpansion) {\n clearAutoCollapseTimeout();\n setIsSecondaryExpanded(false);\n setIsExtendedByClick(false);\n setIsSecondaryHovered(false);\n setIsSecondaryFocused(false);\n }\n }, [clearAutoCollapseTimeout, effectiveIsCollapsed, shouldPreventSecondaryExpansion]);\n\n /**\n * Handler for the primary action button.\n */\n const handlePrimaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (isDisabled || primaryAction.isDisabled) {\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'primary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n primaryAction.onClick?.(payload);\n },\n [isDisabled, isSecondaryExpanded, isTouch, primaryAction],\n );\n\n /**\n * Handler for the secondary action button.\n */\n const handleSecondaryClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n if (\n !resolvedSecondaryAction ||\n isSecondaryHidden ||\n isDisabled ||\n resolvedSecondaryAction.isDisabled\n ) {\n return;\n }\n\n if (hasSecondaryContextMenu) {\n secondaryContextMenuRef.current?.show();\n return;\n }\n\n const payload: MultiActionButtonActionEvent = {\n action: 'secondary',\n event,\n isExtended: isSecondaryExpanded,\n isTouch,\n };\n\n resolvedSecondaryAction.onClick?.(payload);\n if (!shouldPreventSecondaryExpansion) {\n expandSecondaryByClick();\n }\n },\n [\n expandSecondaryByClick,\n hasSecondaryContextMenu,\n isSecondaryHidden,\n isDisabled,\n isSecondaryExpanded,\n isTouch,\n resolvedSecondaryAction,\n shouldPreventSecondaryExpansion,\n ],\n );\n\n /**\n * Desktop hover behavior keeps the secondary action expanded while hovered.\n */\n const handleSecondaryMouseEnter = useCallback(() => {\n if (\n !secondaryAction ||\n isSecondaryHidden ||\n isTouch ||\n isDisabled ||\n shouldPreventSecondaryExpansion ||\n secondaryAction.isDisabled\n ) {\n return;\n }\n\n setIsSecondaryHovered(true);\n if (!isExtendedByClick) {\n setIsSecondaryExpanded(true);\n }\n }, [\n isSecondaryHidden,\n isDisabled,\n isExtendedByClick,\n isTouch,\n secondaryAction,\n shouldPreventSecondaryExpansion,\n ]);\n\n const handleSecondaryMouseLeave = useCallback(() => {\n if (isTouch) {\n return;\n }\n\n setIsSecondaryHovered(false);\n if (!isExtendedByClick && !effectiveIsCollapsed) {\n setIsSecondaryExpanded(false);\n }\n }, [effectiveIsCollapsed, isExtendedByClick, isTouch]);\n\n const handleSecondaryFocus = useCallback(() => {\n if (\n !secondaryAction ||\n isSecondaryHidden ||\n isDisabled ||\n shouldPreventSecondaryExpansion ||\n secondaryAction.isDisabled\n ) {\n return;\n }\n\n setIsSecondaryFocused(true);\n if (!isExtendedByClick) {\n setIsSecondaryExpanded(true);\n }\n }, [\n isDisabled,\n isExtendedByClick,\n isSecondaryHidden,\n secondaryAction,\n shouldPreventSecondaryExpansion,\n ]);\n\n const handleSecondaryBlur = useCallback(() => {\n setIsSecondaryFocused(false);\n if (!isExtendedByClick && !effectiveIsCollapsed) {\n setIsSecondaryExpanded(false);\n }\n }, [effectiveIsCollapsed, isExtendedByClick]);\n\n /**\n * Secondary label is visible when expanded or when hovered/focused.\n */\n const isSecondaryLabelVisible =\n isSecondaryExpanded || (!isTouch && isSecondaryHovered) || isSecondaryFocused;\n\n return (\n <>\n {measuredElement}\n <StyledMultiActionButton\n className={clsx('beta-chayns-multi-action', className)}\n ref={multiActionButtonRef}\n style={{ maxWidth: '100%', width: resolvedWidth }}\n >\n <ActionButton\n action={primaryAction}\n actionType=\"primary\"\n backgroundColor={primaryAction.backgroundColor ?? backgroundColor}\n isCollapsed={effectiveIsCollapsed}\n isDisabled={isDisabled}\n isShrunk={\n hasSecondaryAction &&\n ((!shouldKeepFullWidth && isAutoIconsOnly) || isSecondaryExpanded)\n }\n isSolo={!hasSecondaryAction || isSecondaryHidden || effectiveIsCollapsed}\n onClick={handlePrimaryClick}\n showLabel={\n !effectiveIsCollapsed &&\n !shouldHidePrimaryLabelForMinimumWidth &&\n (shouldKeepPrimaryLabelVisible || !isAutoIconsOnly) &&\n (shouldKeepPrimaryLabelVisible || !shouldHideSecondaryForAutoCollapse) &&\n (!hasExpandableSecondaryAction || !isSecondaryExpanded)\n }\n shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n {hasSecondaryAction && (\n <>\n <StyledSeparator $gapColor={gapColor} $isHidden={isSecondaryHidden} />\n {hasSecondaryContextMenu ? (\n <ContextMenu\n items={secondaryContextMenu ?? []}\n ref={secondaryContextMenuRef}\n shouldDisableClick\n shouldUseDefaultTriggerStyles={false}\n shouldHidePopupArrow\n yOffset={-6}\n style={secondaryContextMenuTriggerStyle}\n >\n <ActionButton\n action={\n resolvedSecondaryAction ?? SECONDARY_CONTEXT_MENU_ACTION\n }\n actionType=\"secondary\"\n backgroundColor={\n resolvedSecondaryAction?.backgroundColor ?? backgroundColor\n }\n isCollapsed={false}\n isDisabled={isDisabled}\n isExpanded={false}\n isHidden={isSecondaryHidden}\n key=\"multi-action-secondary-context-menu\"\n onClick={handleSecondaryClick}\n showLabel={false}\n shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n </ContextMenu>\n ) : (\n <ActionButton\n action={\n resolvedSecondaryAction ??\n secondaryAction ??\n SECONDARY_CONTEXT_MENU_ACTION\n }\n actionType=\"secondary\"\n backgroundColor={\n resolvedSecondaryAction?.backgroundColor ?? backgroundColor\n }\n isCollapsed={false}\n isDisabled={isDisabled}\n isExpanded={!isAutoIconsOnly && isSecondaryExpanded}\n isHidden={isSecondaryHidden}\n key=\"multi-action-secondary-button\"\n onClick={handleSecondaryClick}\n onMouseEnter={handleSecondaryMouseEnter}\n onMouseLeave={handleSecondaryMouseLeave}\n onFocus={handleSecondaryFocus}\n onBlur={handleSecondaryBlur}\n showLabel={\n !isSecondaryHidden &&\n !isAutoIconsOnly &&\n isSecondaryLabelVisible\n }\n shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n shouldUseContentWidth={shouldUseContentWidth}\n height={height}\n />\n )}\n </>\n )}\n </StyledMultiActionButton>\n </>\n );\n};\n\nMultiActionButton.displayName = 'MultiActionButton';\n\nexport default MultiActionButton;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,MAAM;AACvB,OAAOC,KAAK,IAIRC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACL,OAAO;AACd,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,qBAAqB;AACtE,SAASC,4BAA4B,QAAQ,0CAA0C;AACvF,SAASC,UAAU,QAAQ,yBAAyB;AACpD,OAAOC,WAAW,MAAM,6BAA6B;AAErD,OAAOC,YAAY,MAAM,8BAA8B;AACvD,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,4BAA4B;AACrF,SACIC,kCAAkC,EAClCC,oCAAoC,EACpCC,mCAAmC,EACnCC,iCAAiC,QAC9B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,mBAAoB;IACpDX,QAAQ,EAAEmD,iBAAkB;IAC5BkC,GAAG,EAAC,+BAA+B;IACnCf,OAAO,EAAEC,oBAAqB;IAC9Be,YAAY,EAAEb,yBAA0B;IACxCc,YAAY,EAAEb,yBAA0B;IACxCc,OAAO,EAAEb,oBAAqB;IAC9Bc,MAAM,EAAEb,mBAAoB;IAC5BlF,SAAS,EACL,CAACyD,iBAAiB,IAClB,CAACR,eAAe,IAChBkC,uBACH;IACD7C,8BAA8B,EAAEA,8BAA+B;IAC/DrC,qBAAqB,EAAEA,qBAAsB;IAC7Cb,MAAM,EAAEA;EAAO,CAClB,CAEP,CAEe,CAC3B,CAAC;AAEX,CAAC;AAEDmB,iBAAiB,CAACyF,WAAW,GAAG,mBAAmB;AAEnD,eAAezF,iBAAiB","ignoreList":[]}
@@ -9,6 +9,12 @@ export const StyledMultiActionButton = styled(motion.div)`
9
9
  position: relative;
10
10
  transition: width 0.2s ease;
11
11
  width: fit-content;
12
+
13
+ /* Keep normal clipping, but let focus-ring paint outside while focused. */
14
+ &:focus-within {
15
+ overflow: visible;
16
+ z-index: 1;
17
+ }
12
18
  `;
13
19
  export const StyledSeparator = styled.span`
14
20
  align-self: stretch;
@@ -1 +1 @@
1
- {"version":3,"file":"MultiActionButton.styles.js","names":["motion","styled","StyledMultiActionButton","div","StyledSeparator","span","$gapColor","theme","$isHidden"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledMultiActionButton = styled(motion.div)`\n align-items: stretch;\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n overflow: hidden;\n position: relative;\n transition: width 0.2s ease;\n width: fit-content;\n`;\n\ntype StyledSeparatorProps = WithTheme<{\n $gapColor?: string;\n $isHidden?: boolean;\n}>;\n\nexport const StyledSeparator = styled.span<StyledSeparatorProps>`\n align-self: stretch;\n background: ${({ $gapColor, theme }) => $gapColor || theme?.['cw-body-background'] || '#fff'};\n flex: 0 0 ${({ $isHidden }) => ($isHidden ? 0 : 1)}px;\n opacity: ${({ $isHidden }) => ($isHidden ? 0 : 1)};\n overflow: hidden;\n transition:\n flex-basis 0.2s ease,\n opacity 0.2s ease,\n width 0.2s ease;\n width: ${({ $isHidden }) => ($isHidden ? 0 : 1)}px;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,MAAM,mBAAmB;AAGtC,OAAO,MAAMC,uBAAuB,GAAGD,MAAM,CAACD,MAAM,CAACG,GAAG,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAOD,OAAO,MAAMC,eAAe,GAAGH,MAAM,CAACI,IAA0B;AAChE;AACA,kBAAkB,CAAC;EAAEC,SAAS;EAAEC;AAAM,CAAC,KAAKD,SAAS,IAAIC,KAAK,GAAG,oBAAoB,CAAC,IAAI,MAAM;AAChG,gBAAgB,CAAC;EAAEC;AAAU,CAAC,KAAMA,SAAS,GAAG,CAAC,GAAG,CAAE;AACtD,eAAe,CAAC;EAAEA;AAAU,CAAC,KAAMA,SAAS,GAAG,CAAC,GAAG,CAAE;AACrD;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEA;AAAU,CAAC,KAAMA,SAAS,GAAG,CAAC,GAAG,CAAE;AACnD,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"MultiActionButton.styles.js","names":["motion","styled","StyledMultiActionButton","div","StyledSeparator","span","$gapColor","theme","$isHidden"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledMultiActionButton = styled(motion.div)`\n align-items: stretch;\n display: inline-flex;\n max-width: 100%;\n min-width: 0;\n overflow: hidden;\n position: relative;\n transition: width 0.2s ease;\n width: fit-content;\n\n /* Keep normal clipping, but let focus-ring paint outside while focused. */\n &:focus-within {\n overflow: visible;\n z-index: 1;\n }\n`;\n\ntype StyledSeparatorProps = WithTheme<{\n $gapColor?: string;\n $isHidden?: boolean;\n}>;\n\nexport const StyledSeparator = styled.span<StyledSeparatorProps>`\n align-self: stretch;\n background: ${({ $gapColor, theme }) => $gapColor || theme?.['cw-body-background'] || '#fff'};\n flex: 0 0 ${({ $isHidden }) => ($isHidden ? 0 : 1)}px;\n opacity: ${({ $isHidden }) => ($isHidden ? 0 : 1)};\n overflow: hidden;\n transition:\n flex-basis 0.2s ease,\n opacity 0.2s ease,\n width 0.2s ease;\n width: ${({ $isHidden }) => ($isHidden ? 0 : 1)}px;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,MAAM,mBAAmB;AAGtC,OAAO,MAAMC,uBAAuB,GAAGD,MAAM,CAACD,MAAM,CAACG,GAAG,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAOD,OAAO,MAAMC,eAAe,GAAGH,MAAM,CAACI,IAA0B;AAChE;AACA,kBAAkB,CAAC;EAAEC,SAAS;EAAEC;AAAM,CAAC,KAAKD,SAAS,IAAIC,KAAK,GAAG,oBAAoB,CAAC,IAAI,MAAM;AAChG,gBAAgB,CAAC;EAAEC;AAAU,CAAC,KAAMA,SAAS,GAAG,CAAC,GAAG,CAAE;AACtD,eAAe,CAAC;EAAEA;AAAU,CAAC,KAAMA,SAAS,GAAG,CAAC,GAAG,CAAE;AACrD;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC;EAAEA;AAAU,CAAC,KAAMA,SAAS,GAAG,CAAC,GAAG,CAAE;AACnD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiActionButton.types.js","names":["MultiActionButtonStatusType","MultiActionButtonHeight"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.types.ts"],"sourcesContent":["import type { MouseEvent, ReactElement, ReactNode } from 'react';\nimport type { MotionValue } from 'motion/react';\nimport type { ContextMenuItem } from '../context-menu/ContextMenu.types';\n\n/**\n * Supported status types for the multi action button.\n */\nexport enum MultiActionButtonStatusType {\n /**\n * Pulsing background effect.\n * @description Applies a subtle animated overlay on the action background to draw attention.\n * This is intended for temporary states like recording or live activity indicators.\n */\n Pulse = 'pulse',\n}\n\n/**\n * Supported heights for the multi action button.\n */\nexport enum MultiActionButtonHeight {\n /**\n * Medium height (42px).\n */\n Medium = 42,\n /**\n * Large height (48px).\n */\n Large = 48,\n}\n\n/**\n * Minimal status configuration for an action.\n */\nexport type MultiActionButtonActionStatus = {\n /**\n * Optional pulse colors for the animation.\n * @description Defines the two colors for the pulsing background animation. If not provided, defaults to ['#A50000', '#630000'].\n * @optional\n */\n pulseColors?: [string, string];\n /**\n * Status type to apply.\n * @description Selects the visual emphasis type applied to the action. The component currently\n * supports a pulsing overlay, and additional types may be added later.\n * @optional\n */\n type?: MultiActionButtonStatusType;\n};\n\n/**\n * Event payload emitted on action click.\n */\nexport type MultiActionButtonActionEvent = {\n /**\n * Which action was clicked.\n * @description Indicates whether the primary or secondary action fired. This is helpful when\n * sharing a handler between both actions.\n */\n action: 'primary' | 'secondary';\n /**\n * Original click event.\n * @description Useful to access modifier keys, prevent default, or stop propagation.\n */\n event: MouseEvent<HTMLButtonElement>;\n /**\n * Whether the secondary action is currently extended.\n * @description Useful for flows that need to distinguish between a collapsed and expanded\n * secondary action, especially on touch devices.\n */\n isExtended: boolean;\n /**\n * Whether the device is considered touch.\n * @description Derived from pointer capabilities and used to decide between hover and click behavior.\n */\n isTouch: boolean;\n};\n\n/**\n * Configuration for a single action.\n */\nexport type MultiActionButtonAction = {\n /**\n * Optional background color for this action.\n * @description Overrides the component-level background color for this specific action.\n * If omitted, `MultiActionButton.backgroundColor` is used as fallback.\n * @optional\n */\n backgroundColor?: string;\n /**\n * Optional color for the icon and label.\n * @description Overrides the default text/icon color. If omitted, the current theme text color is used.\n * @optional\n */\n color?: string;\n /**\n * The icon for the action.\n * @description Can be a FontAwesome class string (e.g., 'fa fa-microphone') or a custom React element.\n * The icon is always rendered inside a fixed-size slot to keep alignment stable.\n */\n icon: string | ReactElement;\n /**\n * Whether the action is disabled.\n * @description Disabled actions do not respond to hover or click and are visually dimmed.\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Optional reason shown in a tooltip when the action is disabled.\n * @description Use this to explain why the action is currently unavailable.\n * @optional\n */\n disabledReason?: string;\n /**\n * The optional label for the action.\n * @description The label is shown next to the icon and will be truncated with ellipsis when\n * there is not enough horizontal space.\n * @optional\n */\n label: ReactNode;\n /**\n * Click handler for the action.\n * @description Receives a payload that includes the action type, extension state, and device info.\n * This allows external logic to decide whether the click should trigger an action immediately.\n * @optional\n */\n onClick?: (info: MultiActionButtonActionEvent) => void;\n /**\n * Status effect configuration for the action.\n * @description Controls optional visual emphasis like pulsing, without changing layout or sizing.\n * @optional\n */\n status?: MultiActionButtonActionStatus;\n};\n\nexport type MultiActionButtonSecondaryContextMenu = ContextMenuItem[];\n\n/**\n * Props for the MultiActionButton component.\n */\nexport type MultiActionButtonProps = {\n /**\n * Optional background color for both actions.\n * @description Overrides the default background color for the action buttons. This is useful\n * when the button is used on different backgrounds or when a specific brand color is needed.\n * If omitted, the primary color from the theme is used.\n * @default theme.primary\n * @optional\n */\n backgroundColor?: string;\n /**\n * Additional class name for the wrapper element.\n * @description Useful for custom styling or testing hooks.\n * @optional\n */\n className?: string;\n /**\n * Timeout in ms before the secondary action collapses after a click.\n * @description Set to 0 to keep the secondary action extended until the user collapses it.\n * @example\n * <MultiActionButton\n * primaryAction={primaryAction}\n * secondaryAction={secondaryAction}\n * extendedTimeoutMs={0}\n * />\n * @default 3000\n * @optional\n */\n extendedTimeoutMs?: number;\n /**\n * Height of the button.\n * @description Controls the height of the button. Use values from MultiActionButtonHeight enum or custom number.\n * @default MultiActionButtonHeight.Medium\n * @optional\n */\n height?: number;\n /**\n * Optional color for the 1px separator line between actions.\n * @description Defaults to theme.cw-body-background and falls back to #fff if not available.\n * @optional\n */\n gapColor?: string;\n /**\n * Whether the button is collapsed to a single icon.\n * @description When collapsed, only the primary icon is shown and the overall width shrinks to a circle.\n * Use this to provide compact states or toolbar modes.\n * @default false\n * @optional\n */\n isCollapsed?: boolean;\n /**\n * Whether the whole control is disabled.\n * @description Disables interactions for both actions, including hover expansion and clicks.\n * @default false\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Primary action configuration.\n * @description Required action shown on the left side (or as the only action when no secondary is provided).\n */\n primaryAction: MultiActionButtonAction;\n /**\n * Secondary action configuration.\n * @description Optional action shown on the right side. When present, it can expand on hover or click.\n * @optional\n */\n secondaryAction?: MultiActionButtonAction;\n /**\n * Context menu rendered as the secondary action.\n * @description When the list contains entries, the secondary slot renders a fixed down-arrow\n * trigger that opens a ContextMenu. If the list is empty or undefined, no context menu trigger\n * is shown and `secondaryAction` can be used as usual.\n * @optional\n */\n secondaryContextMenu?: MultiActionButtonSecondaryContextMenu;\n /**\n * Whether the button should collapse automatically based on the available width.\n * @description When enabled, the control switches from the default layout to an icon-only\n * layout and finally to a primary-only icon layout as space becomes tighter.\n * @default false\n * @optional\n */\n shouldAutoCollapse?: boolean;\n /**\n * Whether the button should take the full width of its parent.\n * @description When true, the control stretches to 100% width unless `width` is provided.\n * @optional\n */\n shouldUseFullWidth?: boolean;\n /**\n * Optional width override for the whole button.\n * @description Can be a fixed number or a MotionValue for external animations. When omitted,\n * the width is driven by the content unless `shouldUseFullWidth` is true.\n * @optional\n */\n width?: number | MotionValue<number>;\n};\n"],"mappings":"AAIA;AACA;AACA;AACA,WAAYA,2BAA2B,0BAA3BA,2BAA2B;EACnC;AACJ;AACA;AACA;AACA;EALYA,2BAA2B;EAAA,OAA3BA,2BAA2B;AAAA;;AASvC;AACA;AACA;AACA,WAAYC,uBAAuB,0BAAvBA,uBAAuB;EAC/B;AACJ;AACA;EAHYA,uBAAuB,CAAvBA,uBAAuB;EAK/B;AACJ;AACA;EAPYA,uBAAuB,CAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;;AAWnC;AACA;AACA;;AAiBA;AACA;AACA;;AA0BA;AACA;AACA;;AAyDA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"MultiActionButton.types.js","names":["MultiActionButtonStatusType","MultiActionButtonHeight"],"sources":["../../../../src/components/multi-action-button/MultiActionButton.types.ts"],"sourcesContent":["import type { MouseEvent, ReactElement, ReactNode } from 'react';\nimport type { MotionValue } from 'motion/react';\nimport type { ContextMenuItem } from '../context-menu/ContextMenu.types';\n\n/**\n * Supported status types for the multi action button.\n */\nexport enum MultiActionButtonStatusType {\n /**\n * Pulsing background effect.\n * @description Applies a subtle animated overlay on the action background to draw attention.\n * This is intended for temporary states like recording or live activity indicators.\n */\n Pulse = 'pulse',\n}\n\n/**\n * Supported heights for the multi action button.\n */\nexport enum MultiActionButtonHeight {\n /**\n * Medium height (42px).\n */\n Medium = 42,\n /**\n * Large height (48px).\n */\n Large = 48,\n}\n\n/**\n * Minimal status configuration for an action.\n */\nexport type MultiActionButtonActionStatus = {\n /**\n * Optional pulse colors for the animation.\n * @description Defines the two colors for the pulsing background animation. If not provided, defaults to ['#A50000', '#630000'].\n * @optional\n */\n pulseColors?: [string, string];\n /**\n * Status type to apply.\n * @description Selects the visual emphasis type applied to the action. The component currently\n * supports a pulsing overlay, and additional types may be added later.\n * @optional\n */\n type?: MultiActionButtonStatusType;\n};\n\n/**\n * Event payload emitted on action click.\n */\nexport type MultiActionButtonActionEvent = {\n /**\n * Which action was clicked.\n * @description Indicates whether the primary or secondary action fired. This is helpful when\n * sharing a handler between both actions.\n */\n action: 'primary' | 'secondary';\n /**\n * Original click event.\n * @description Useful to access modifier keys, prevent default, or stop propagation.\n */\n event: MouseEvent<HTMLButtonElement>;\n /**\n * Whether the secondary action is currently extended.\n * @description Useful for flows that need to distinguish between a collapsed and expanded\n * secondary action, especially on touch devices.\n */\n isExtended: boolean;\n /**\n * Whether the device is considered touch.\n * @description Derived from pointer capabilities and used to decide between hover and click behavior.\n */\n isTouch: boolean;\n};\n\n/**\n * Configuration for a single action.\n */\nexport type MultiActionButtonAction = {\n /**\n * Optional background color for this action.\n * @description Overrides the component-level background color for this specific action.\n * If omitted, `MultiActionButton.backgroundColor` is used as fallback.\n * @optional\n */\n backgroundColor?: string;\n /**\n * Optional color for the icon and label.\n * @description Overrides the default text/icon color. If omitted, the current theme text color is used.\n * @optional\n */\n color?: string;\n /**\n * The icon for the action.\n * @description Can be a FontAwesome class string (e.g., 'fa fa-microphone') or a custom React element.\n * The icon is always rendered inside a fixed-size slot to keep alignment stable.\n */\n icon: string | ReactElement;\n /**\n * Whether the action is disabled.\n * @description Disabled actions do not respond to hover or click and are visually dimmed.\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Optional reason shown in a tooltip when the action is disabled.\n * @description Use this to explain why the action is currently unavailable.\n * @optional\n */\n disabledReason?: string;\n /**\n * The optional label for the action.\n * @description The label is shown next to the icon and will be truncated with ellipsis when\n * there is not enough horizontal space.\n * @optional\n */\n label: ReactNode;\n /**\n * Click handler for the action.\n * @description Receives a payload that includes the action type, extension state, and device info.\n * This allows external logic to decide whether the click should trigger an action immediately.\n * @optional\n */\n onClick?: (info: MultiActionButtonActionEvent) => void;\n /**\n * Status effect configuration for the action.\n * @description Controls optional visual emphasis like pulsing, without changing layout or sizing.\n * @optional\n */\n status?: MultiActionButtonActionStatus;\n};\n\nexport type MultiActionButtonSecondaryContextMenu = ContextMenuItem[];\n\n/**\n * Props for the MultiActionButton component.\n */\nexport type MultiActionButtonProps = {\n /**\n * Optional background color for both actions.\n * @description Overrides the default background color for the action buttons. This is useful\n * when the button is used on different backgrounds or when a specific brand color is needed.\n * If omitted, the primary color from the theme is used.\n * @default theme.primary\n * @optional\n */\n backgroundColor?: string;\n /**\n * Additional class name for the wrapper element.\n * @description Useful for custom styling or testing hooks.\n * @optional\n */\n className?: string;\n /**\n * Timeout in ms before the secondary action collapses after a click.\n * @description Set to 0 to keep the secondary action extended until the user collapses it.\n * @example\n * <MultiActionButton\n * primaryAction={primaryAction}\n * secondaryAction={secondaryAction}\n * extendedTimeoutMs={0}\n * />\n * @default 3000\n * @optional\n */\n extendedTimeoutMs?: number;\n /**\n * Height of the button.\n * @description Controls the height of the button. Use values from MultiActionButtonHeight enum or custom number.\n * @default MultiActionButtonHeight.Medium\n * @optional\n */\n height?: number;\n /**\n * Optional color for the 1px separator line between actions.\n * @description Defaults to theme.cw-body-background and falls back to #fff if not available.\n * @optional\n */\n gapColor?: string;\n /**\n * Whether the button is collapsed to a single icon.\n * @description When collapsed, only the primary icon is shown and the overall width shrinks to a circle.\n * Use this to provide compact states or toolbar modes.\n * @default false\n * @optional\n */\n isCollapsed?: boolean;\n /**\n * Whether the whole control is disabled.\n * @description Disables interactions for both actions, including hover expansion and clicks.\n * @default false\n * @optional\n */\n isDisabled?: boolean;\n /**\n * Primary action configuration.\n * @description Required action shown on the left side (or as the only action when no secondary is provided).\n */\n primaryAction: MultiActionButtonAction;\n /**\n * Secondary action configuration.\n * @description Optional action shown on the right side. When present, it can expand on hover or click.\n * @optional\n */\n secondaryAction?: MultiActionButtonAction;\n /**\n * Context menu rendered as the secondary action.\n * @description When the list contains entries, the secondary slot renders a fixed down-arrow\n * trigger that opens a ContextMenu. If the list is empty or undefined, no context menu trigger\n * is shown and `secondaryAction` can be used as usual.\n * @optional\n */\n secondaryContextMenu?: MultiActionButtonSecondaryContextMenu;\n /**\n * Whether the button should collapse automatically based on the available width.\n * @description When enabled, the control switches from the default layout to an icon-only\n * layout and finally to a primary-only icon layout as space becomes tighter.\n * @default false\n * @optional\n */\n shouldAutoCollapse?: boolean;\n /**\n * Whether the button should take the full width of its parent.\n * @description When true, the control stretches to 100% width unless `width` is provided.\n * @optional\n */\n shouldUseFullWidth?: boolean;\n /**\n * Enables keyboard-only focus highlighting for interactive action buttons.\n * @description When enabled, focus ring styles are only shown for keyboard navigation.\n * @default false\n * @optional\n */\n shouldEnableKeyboardHighlighting?: boolean;\n /**\n * Optional width override for the whole button.\n * @description Can be a fixed number or a MotionValue for external animations. When omitted,\n * the width is driven by the content unless `shouldUseFullWidth` is true.\n * @optional\n */\n width?: number | MotionValue<number>;\n};\n"],"mappings":"AAIA;AACA;AACA;AACA,WAAYA,2BAA2B,0BAA3BA,2BAA2B;EACnC;AACJ;AACA;AACA;AACA;EALYA,2BAA2B;EAAA,OAA3BA,2BAA2B;AAAA;;AASvC;AACA;AACA;AACA,WAAYC,uBAAuB,0BAAvBA,uBAAuB;EAC/B;AACJ;AACA;EAHYA,uBAAuB,CAAvBA,uBAAuB;EAK/B;AACJ;AACA;EAPYA,uBAAuB,CAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;;AAWnC;AACA;AACA;;AAiBA;AACA;AACA;;AA0BA;AACA;AACA;;AAyDA;AACA;AACA","ignoreList":[]}
@@ -25,9 +25,12 @@ const ActionButton = ({
25
25
  onClick,
26
26
  onMouseEnter,
27
27
  onMouseLeave,
28
+ onFocus,
29
+ onBlur,
28
30
  showLabel,
29
31
  shouldUseContentWidth,
30
- height
32
+ height,
33
+ shouldShowKeyboardHighlighting = false
31
34
  }) => {
32
35
  const isPrimary = actionType === 'primary';
33
36
  const isSecondary = actionType === 'secondary';
@@ -83,9 +86,12 @@ const ActionButton = ({
83
86
  $height: height,
84
87
  $statusType: action.status?.type,
85
88
  $shouldUseContentWidth: shouldUseContentWidth,
89
+ $shouldShowKeyboardHighlighting: shouldShowKeyboardHighlighting,
86
90
  onClick: onClick,
87
91
  onMouseEnter: onMouseEnter,
88
92
  onMouseLeave: onMouseLeave,
93
+ onFocus: onFocus,
94
+ onBlur: onBlur,
89
95
  type: "button"
90
96
  }, shouldShowDisabledReason && disabledReason ? /*#__PURE__*/React.createElement(Tooltip, {
91
97
  alignment: PopupAlignment.BottomRight,
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButton.js","names":["AnimatePresence","React","Icon","Tooltip","StyledActionButton","StyledActionContent","StyledIconSlot","StyledLabelWrapper","StyledSecondaryLabel","PopupAlignment","LABEL_GAP","LABEL_TRANSITION","duration","ActionButton","action","actionType","backgroundColor","isCollapsed","isDisabled","isExpanded","isHidden","isShrunk","isSolo","onClick","onMouseEnter","onMouseLeave","showLabel","shouldUseContentWidth","height","isPrimary","isSecondary","actionColor","color","isActionDisabled","Boolean","disabledReason","trim","shouldShowDisabledReason","iconSize","actionContent","createElement","$height","$isDisabled","icon","icons","size","initial","animate","opacity","width","marginLeft","exit","transition","style","label","disabled","$backgroundColor","$isCollapsed","$isExpanded","undefined","$isInteractionDisabled","$isHidden","$isPrimary","$isSecondary","$isShrunk","$isSolo","$pulseColors","status","pulseColors","$statusType","type","$shouldUseContentWidth","alignment","BottomRight","item","text","maxItemWidth","displayName"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, { FC, MouseEvent } from 'react';\nimport Icon from '../../icon/Icon';\nimport Tooltip from '../../tooltip/Tooltip';\nimport {\n StyledActionButton,\n StyledActionContent,\n StyledIconSlot,\n StyledLabelWrapper,\n StyledSecondaryLabel,\n} from './ActionButton.styles';\nimport type { MultiActionButtonAction } from '../MultiActionButton.types';\nimport { PopupAlignment } from '../../../types/popup';\n\nconst LABEL_GAP = 6;\nconst LABEL_TRANSITION = { duration: 0.3 };\n\nexport type ActionButtonProps = {\n action: MultiActionButtonAction;\n actionType: 'primary' | 'secondary';\n backgroundColor?: string;\n isCollapsed: boolean;\n isDisabled: boolean;\n isExpanded?: boolean;\n isHidden?: boolean;\n isShrunk?: boolean;\n isSolo?: boolean;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n showLabel: boolean;\n shouldUseContentWidth: boolean;\n height: number;\n};\n\n/**\n * Shared action button UI used by both primary and secondary actions.\n * Keeps layout and animations consistent while isolating styling details.\n */\nconst ActionButton: FC<ActionButtonProps> = ({\n action,\n actionType,\n backgroundColor,\n isCollapsed,\n isDisabled,\n isExpanded,\n isHidden,\n isShrunk,\n isSolo,\n onClick,\n onMouseEnter,\n onMouseLeave,\n showLabel,\n shouldUseContentWidth,\n height,\n}) => {\n const isPrimary = actionType === 'primary';\n const isSecondary = actionType === 'secondary';\n const actionColor = action.color ?? '#FFFFFF';\n const isActionDisabled = isDisabled || Boolean(action.isDisabled);\n const disabledReason = action.disabledReason?.trim();\n const shouldShowDisabledReason = Boolean(disabledReason) && isActionDisabled;\n const iconSize = height - 24;\n\n const actionContent = (\n <StyledActionContent>\n <StyledIconSlot $height={height} $isDisabled={isActionDisabled}>\n {typeof action.icon === 'string' ? (\n <Icon icons={[action.icon]} color={actionColor} size={iconSize} />\n ) : (\n action.icon\n )}\n </StyledIconSlot>\n <AnimatePresence initial={false}>\n {/* Animate width and margin to avoid layout jumps when labels mount/unmount. */}\n {showLabel && (\n <StyledLabelWrapper\n animate={{ opacity: 1, width: 'auto', marginLeft: LABEL_GAP }}\n exit={{ opacity: 0, width: 0, marginLeft: 0 }}\n initial={{ opacity: 0, width: 0, marginLeft: 0 }}\n transition={LABEL_TRANSITION}\n >\n <StyledSecondaryLabel style={{ color: actionColor }}>\n {action.label}\n </StyledSecondaryLabel>\n </StyledLabelWrapper>\n )}\n </AnimatePresence>\n </StyledActionContent>\n );\n\n return (\n <StyledActionButton\n aria-disabled={isActionDisabled}\n disabled={isActionDisabled && !shouldShowDisabledReason}\n $backgroundColor={backgroundColor}\n $isCollapsed={isCollapsed}\n $isExpanded={isSecondary ? isExpanded : undefined}\n $isInteractionDisabled={isActionDisabled}\n $isHidden={isSecondary ? isHidden : undefined}\n $isPrimary={isPrimary}\n $isSecondary={isSecondary}\n $isShrunk={isPrimary ? isShrunk : undefined}\n $isSolo={isPrimary ? isSolo : undefined}\n $pulseColors={action.status?.pulseColors}\n $height={height}\n $statusType={action.status?.type}\n $shouldUseContentWidth={shouldUseContentWidth}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n type=\"button\"\n >\n {shouldShowDisabledReason && disabledReason ? (\n <Tooltip\n alignment={PopupAlignment.BottomRight}\n item={{ text: disabledReason }}\n maxItemWidth={400}\n >\n {actionContent}\n </Tooltip>\n ) : (\n actionContent\n )}\n </StyledActionButton>\n );\n};\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,OAAOC,KAAK,MAA0B,OAAO;AAC7C,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,OAAO,MAAM,uBAAuB;AAC3C,SACIC,kBAAkB,EAClBC,mBAAmB,EACnBC,cAAc,EACdC,kBAAkB,EAClBC,oBAAoB,QACjB,uBAAuB;AAE9B,SAASC,cAAc,QAAQ,sBAAsB;AAErD,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,gBAAgB,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAoB1C;AACA;AACA;AACA;AACA,MAAMC,YAAmC,GAAGA,CAAC;EACzCC,MAAM;EACNC,UAAU;EACVC,eAAe;EACfC,WAAW;EACXC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,qBAAqB;EACrBC;AACJ,CAAC,KAAK;EACF,MAAMC,SAAS,GAAGd,UAAU,KAAK,SAAS;EAC1C,MAAMe,WAAW,GAAGf,UAAU,KAAK,WAAW;EAC9C,MAAMgB,WAAW,GAAGjB,MAAM,CAACkB,KAAK,IAAI,SAAS;EAC7C,MAAMC,gBAAgB,GAAGf,UAAU,IAAIgB,OAAO,CAACpB,MAAM,CAACI,UAAU,CAAC;EACjE,MAAMiB,cAAc,GAAGrB,MAAM,CAACqB,cAAc,EAAEC,IAAI,CAAC,CAAC;EACpD,MAAMC,wBAAwB,GAAG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ACxDmB,gBAAgB,EAAExC,eAAgB;IAClCyC,YAAY,EAAExC,WAAY;IAC1ByC,WAAW,EAAE5B,WAAW,GAAGX,UAAU,GAAGwC,SAAU;IAClDC,sBAAsB,EAAE3B,gBAAiB;IACzC4B,SAAS,EAAE/B,WAAW,GAAGV,QAAQ,GAAGuC,SAAU;IAC9CG,UAAU,EAAEjC,SAAU;IACtBkC,YAAY,EAAEjC,WAAY;IAC1BkC,SAAS,EAAEnC,SAAS,GAAGR,QAAQ,GAAGsC,SAAU;IAC5CM,OAAO,EAAEpC,SAAS,GAAGP,MAAM,GAAGqC,SAAU;IACxCO,YAAY,EAAEpD,MAAM,CAACqD,MAAM,EAAEC,WAAY;IACzC3B,OAAO,EAAEb,MAAO;IAChByC,WAAW,EAAEvD,MAAM,CAACqD,MAAM,EAAEG,IAAK;IACjCC,sBAAsB,EAAE5C,qBAAsB;IAC9CJ,OAAO,EAAEA,OAAQ;IACjBC,YAAY,EAAEA,YAAa;IAC3BC,YAAY,EAAEA,YAAa;IAC3B6C,IAAI,EAAC;EAAQ,GAEZjC,wBAAwB,IAAIF,cAAc,gBACvClC,KAAA,CAAAuC,aAAA,CAACrC,OAAO;IACJqE,SAAS,EAAE/D,cAAc,CAACgE,WAAY;IACtCC,IAAI,EAAE;MAAEC,IAAI,EAAExC;IAAe,CAAE;IAC/ByC,YAAY,EAAE;EAAI,GAEjBrC,aACI,CAAC,GAEVA,aAEY,CAAC;AAE7B,CAAC;AAED1B,YAAY,CAACgE,WAAW,GAAG,cAAc;AAEzC,eAAehE,YAAY","ignoreList":[]}
1
+ {"version":3,"file":"ActionButton.js","names":["AnimatePresence","React","Icon","Tooltip","StyledActionButton","StyledActionContent","StyledIconSlot","StyledLabelWrapper","StyledSecondaryLabel","PopupAlignment","LABEL_GAP","LABEL_TRANSITION","duration","ActionButton","action","actionType","backgroundColor","isCollapsed","isDisabled","isExpanded","isHidden","isShrunk","isSolo","onClick","onMouseEnter","onMouseLeave","onFocus","onBlur","showLabel","shouldUseContentWidth","height","shouldShowKeyboardHighlighting","isPrimary","isSecondary","actionColor","color","isActionDisabled","Boolean","disabledReason","trim","shouldShowDisabledReason","iconSize","actionContent","createElement","$height","$isDisabled","icon","icons","size","initial","animate","opacity","width","marginLeft","exit","transition","style","label","disabled","$backgroundColor","$isCollapsed","$isExpanded","undefined","$isInteractionDisabled","$isHidden","$isPrimary","$isSecondary","$isShrunk","$isSolo","$pulseColors","status","pulseColors","$statusType","type","$shouldUseContentWidth","$shouldShowKeyboardHighlighting","alignment","BottomRight","item","text","maxItemWidth","displayName"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.tsx"],"sourcesContent":["import { AnimatePresence } from 'motion/react';\nimport React, { FC, FocusEventHandler, MouseEvent } from 'react';\nimport Icon from '../../icon/Icon';\nimport Tooltip from '../../tooltip/Tooltip';\nimport {\n StyledActionButton,\n StyledActionContent,\n StyledIconSlot,\n StyledLabelWrapper,\n StyledSecondaryLabel,\n} from './ActionButton.styles';\nimport type { MultiActionButtonAction } from '../MultiActionButton.types';\nimport { PopupAlignment } from '../../../types/popup';\n\nconst LABEL_GAP = 6;\nconst LABEL_TRANSITION = { duration: 0.3 };\n\nexport type ActionButtonProps = {\n action: MultiActionButtonAction;\n actionType: 'primary' | 'secondary';\n backgroundColor?: string;\n isCollapsed: boolean;\n isDisabled: boolean;\n isExpanded?: boolean;\n isHidden?: boolean;\n isShrunk?: boolean;\n isSolo?: boolean;\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void;\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n onFocus?: FocusEventHandler<HTMLButtonElement>;\n onBlur?: FocusEventHandler<HTMLButtonElement>;\n showLabel: boolean;\n shouldUseContentWidth: boolean;\n height: number;\n shouldShowKeyboardHighlighting?: boolean;\n};\n\n/**\n * Shared action button UI used by both primary and secondary actions.\n * Keeps layout and animations consistent while isolating styling details.\n */\nconst ActionButton: FC<ActionButtonProps> = ({\n action,\n actionType,\n backgroundColor,\n isCollapsed,\n isDisabled,\n isExpanded,\n isHidden,\n isShrunk,\n isSolo,\n onClick,\n onMouseEnter,\n onMouseLeave,\n onFocus,\n onBlur,\n showLabel,\n shouldUseContentWidth,\n height,\n shouldShowKeyboardHighlighting = false,\n}) => {\n const isPrimary = actionType === 'primary';\n const isSecondary = actionType === 'secondary';\n const actionColor = action.color ?? '#FFFFFF';\n const isActionDisabled = isDisabled || Boolean(action.isDisabled);\n const disabledReason = action.disabledReason?.trim();\n const shouldShowDisabledReason = Boolean(disabledReason) && isActionDisabled;\n const iconSize = height - 24;\n\n const actionContent = (\n <StyledActionContent>\n <StyledIconSlot $height={height} $isDisabled={isActionDisabled}>\n {typeof action.icon === 'string' ? (\n <Icon icons={[action.icon]} color={actionColor} size={iconSize} />\n ) : (\n action.icon\n )}\n </StyledIconSlot>\n <AnimatePresence initial={false}>\n {/* Animate width and margin to avoid layout jumps when labels mount/unmount. */}\n {showLabel && (\n <StyledLabelWrapper\n animate={{ opacity: 1, width: 'auto', marginLeft: LABEL_GAP }}\n exit={{ opacity: 0, width: 0, marginLeft: 0 }}\n initial={{ opacity: 0, width: 0, marginLeft: 0 }}\n transition={LABEL_TRANSITION}\n >\n <StyledSecondaryLabel style={{ color: actionColor }}>\n {action.label}\n </StyledSecondaryLabel>\n </StyledLabelWrapper>\n )}\n </AnimatePresence>\n </StyledActionContent>\n );\n\n return (\n <StyledActionButton\n aria-disabled={isActionDisabled}\n disabled={isActionDisabled && !shouldShowDisabledReason}\n $backgroundColor={backgroundColor}\n $isCollapsed={isCollapsed}\n $isExpanded={isSecondary ? isExpanded : undefined}\n $isInteractionDisabled={isActionDisabled}\n $isHidden={isSecondary ? isHidden : undefined}\n $isPrimary={isPrimary}\n $isSecondary={isSecondary}\n $isShrunk={isPrimary ? isShrunk : undefined}\n $isSolo={isPrimary ? isSolo : undefined}\n $pulseColors={action.status?.pulseColors}\n $height={height}\n $statusType={action.status?.type}\n $shouldUseContentWidth={shouldUseContentWidth}\n $shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n type=\"button\"\n >\n {shouldShowDisabledReason && disabledReason ? (\n <Tooltip\n alignment={PopupAlignment.BottomRight}\n item={{ text: disabledReason }}\n maxItemWidth={400}\n >\n {actionContent}\n </Tooltip>\n ) : (\n actionContent\n )}\n </StyledActionButton>\n );\n};\n\nActionButton.displayName = 'ActionButton';\n\nexport default ActionButton;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,cAAc;AAC9C,OAAOC,KAAK,MAA6C,OAAO;AAChE,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,OAAO,MAAM,uBAAuB;AAC3C,SACIC,kBAAkB,EAClBC,mBAAmB,EACnBC,cAAc,EACdC,kBAAkB,EAClBC,oBAAoB,QACjB,uBAAuB;AAE9B,SAASC,cAAc,QAAQ,sBAAsB;AAErD,MAAMC,SAAS,GAAG,CAAC;AACnB,MAAMC,gBAAgB,GAAG;EAAEC,QAAQ,EAAE;AAAI,CAAC;AAuB1C;AACA;AACA;AACA;AACA,MAAMC,YAAmC,GAAGA,CAAC;EACzCC,MAAM;EACNC,UAAU;EACVC,eAAe;EACfC,WAAW;EACXC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,YAAY;EACZC,YAAY;EACZC,OAAO;EACPC,MAAM;EACNC,SAAS;EACTC,qBAAqB;EACrBC,MAAM;EACNC,8BAA8B,GAAG;AACrC,CAAC,KAAK;EACF,MAAMC,SAAS,GAAGjB,UAAU,KAAK,SAAS;EAC1C,MAAMkB,WAAW,GAAGlB,UAAU,KAAK,WAAW;EAC9C,MAAMmB,WAAW,GAAGpB,MAAM,CAACqB,KAAK,IAAI,SAAS;EAC7C,MAAMC,gBAAgB,GAAGlB,UAAU,IAAImB,OAAO,CAACvB,MAAM,CAACI,UAAU,CAAC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${$backgroundColor || theme?.primary || '#000'} 85%, black)`};
170
170
  }
171
171
  `}
172
+
173
+ ${({
174
+ $shouldShowKeyboardHighlighting
175
+ }) => $shouldShowKeyboardHighlighting && css`
176
+ &:focus-visible {
177
+ transition: none;
178
+ outline: solid 2px color-mix(in srgb, currentColor 70%, transparent);
179
+ box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
180
+ outline-offset: 1px;
181
+ color: white;
182
+ }
183
+ `}
172
184
  `;
173
185
  export const StyledActionContent = styled.span`
174
186
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionButton.styles.js","names":["motion","styled","css","keyframes","MultiActionButtonStatusType","pulse","color1","color2","StyledActionButton","button","$height","$backgroundColor","theme","primary","$shouldUseContentWidth","$isExpanded","props","$isCollapsed","$isPrimary","$isShrunk","$isSecondary","$isHidden","$isSolo","$isInteractionDisabled","$statusType","$pulseColors","Pulse","StyledActionContent","span","StyledIconSlot","$isDisabled","StyledLabelWrapper","StyledSecondaryLabel"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport { MultiActionButtonStatusType } from '../MultiActionButton.types';\n\ntype StyledActionButtonProps = WithTheme<{\n $backgroundColor?: string;\n $isCollapsed?: boolean;\n $isExpanded?: boolean;\n $isHidden?: boolean;\n $isPrimary?: boolean;\n $isSecondary?: boolean;\n $isShrunk?: boolean;\n $isSolo?: boolean;\n $pulseColors?: [string, string];\n $isInteractionDisabled?: boolean;\n $height: number;\n $statusType?: MultiActionButtonStatusType;\n $shouldUseContentWidth?: boolean;\n}>;\n\nconst pulse = (color1: string, color2: string) => keyframes`\n 0% {\n background: ${color1};\n }\n 50% {\n background: ${color2};\n }\n 100% {\n background: ${color1};\n }\n`;\n\nexport const StyledActionButton = styled.button<StyledActionButtonProps>`\n align-items: center;\n border: none;\n border-radius: ${({ $height }) => $height / 2}px;\n cursor: pointer;\n display: inline-flex;\n flex: 1 1 auto;\n height: ${({ $height }) => $height}px;\n line-height: 22px;\n min-height: ${({ $height }) => $height}px;\n overflow: hidden;\n padding: 0;\n position: relative;\n transition:\n background-color 0.2s ease,\n border-radius 0.2s ease,\n color 0.2s ease,\n flex-grow 0.2s ease,\n opacity 0.2s ease,\n padding 0.2s ease,\n width 0.2s ease;\n user-select: none;\n white-space: nowrap;\n\n background-color: ${({ $backgroundColor, theme }) =>\n $backgroundColor || theme?.primary || '#000'};\n color: #fff;\n\n /* When width is content-driven, avoid flex stretching. */\n ${({ $shouldUseContentWidth }) =>\n $shouldUseContentWidth &&\n css`\n flex: 0 1 auto;\n `}\n\n /* Expanded secondary button when width is not content-driven. */\n ${({ $isExpanded, $shouldUseContentWidth }) =>\n $isExpanded &&\n !$shouldUseContentWidth &&\n css`\n flex: 1 1 auto;\n min-width: 0;\n `}\n\n /* Collapsed state clamps to a fixed icon size. */\n ${(props) =>\n props.$isCollapsed &&\n css`\n flex: 0 0 auto;\n padding: 0;\n width: ${props.$height}px;\n `}\n\n /* Primary action stretches unless content-driven. */\n ${({ $isPrimary, $isCollapsed, $shouldUseContentWidth }) =>\n $isPrimary &&\n !$isCollapsed &&\n !$shouldUseContentWidth &&\n css`\n flex: 1 1 auto;\n min-width: 0;\n `}\n\n /* Shrink the primary action to icon size when secondary is expanded. */\n ${(props) =>\n props.$isShrunk &&\n !props.$shouldUseContentWidth &&\n css`\n flex: 0 0 auto;\n padding: 0;\n width: ${props.$height}px;\n `}\n\n /* Keep secondary icon-only when collapsed and not expanded. */\n ${(props) =>\n props.$isSecondary &&\n !props.$isExpanded &&\n !props.$shouldUseContentWidth &&\n css`\n flex: 0 0 auto;\n padding: 0;\n width: ${props.$height}px;\n `}\n\n /* Fully hide the secondary action when the whole control is collapsed. */\n ${({ $isHidden }) =>\n $isHidden &&\n css`\n opacity: 0;\n pointer-events: none;\n width: 0;\n `}\n\n /* Joining both buttons into a pill shape. */\n ${({ $isPrimary }) =>\n $isPrimary &&\n css`\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n `}\n\n ${(props) =>\n props.$isPrimary &&\n props.$isCollapsed &&\n css`\n border-bottom-right-radius: ${props.$height / 2}px;\n border-top-right-radius: ${props.$height / 2}px;\n `}\n\n ${({ $isSecondary }) =>\n $isSecondary &&\n css`\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n `}\n\n ${(props) =>\n props.$isSolo &&\n css`\n border-radius: ${props.$height / 2}px;\n `}\n\n ${(props) =>\n props.$isCollapsed &&\n css`\n border-radius: ${props.$height / 2}px;\n `}\n\n ${({ $isInteractionDisabled }) =>\n $isInteractionDisabled &&\n css`\n cursor: default;\n `}\n\n /* Optional pulse overlay used by status. */\n ${({ $statusType, $pulseColors }) =>\n $statusType === MultiActionButtonStatusType.Pulse &&\n css`\n overflow: hidden;\n\n &::before {\n animation: ${pulse($pulseColors?.[0] || '#A50000', $pulseColors?.[1] || '#630000')}\n 1.6s ease-in-out infinite;\n border-radius: 3px;\n content: '';\n inset: 0;\n pointer-events: none;\n position: absolute;\n }\n `}\n\n &:disabled {\n cursor: default;\n }\n\n ${({ $isInteractionDisabled, $backgroundColor, theme }) =>\n !$isInteractionDisabled &&\n css`\n &:hover:not(:disabled) {\n background-color: ${`color-mix(in srgb, ${$backgroundColor || theme?.primary || '#000'} 85%, black)`};\n }\n `}\n`;\n\nexport const StyledActionContent = styled.span`\n align-items: center;\n display: inline-flex;\n flex: 1 1 auto;\n gap: 0;\n min-width: 0;\n position: relative;\n z-index: 1;\n`;\n\nexport const StyledIconSlot = styled.span<{ $height: number; $isDisabled?: boolean }>`\n align-items: center;\n display: inline-flex;\n flex: 0 0 auto;\n height: ${({ $height }) => $height}px;\n justify-content: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n transition: opacity 0.2s ease;\n width: ${({ $height }) => $height}px;\n`;\n\nexport const StyledLabelWrapper = styled(motion.span)`\n /* The wrapper animates width/margin to avoid layout jumps. */\n display: inline-flex;\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-align: left;\n`;\n\nexport const StyledSecondaryLabel = styled.span`\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n padding-right: 18px;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAE1D,SAASC,2BAA2B,QAAQ,4BAA4B;AAkBxE,MAAMC,KAAK,GAAGA,CAACC,MAAc,EAAEC,MAAc,KAAKJ,SAAS;AAC3D;AACA,sBAAsBG,MAAM;AAC5B;AACA;AACA,sBAAsBC,MAAM;AAC5B;AACA;AACA,sBAAsBD,MAAM;AAC5B;AACA,CAAC;AAED,OAAO,MAAME,kBAAkB,GAAGP,MAAM,CAACQ,MAA+B;AACxE;AACA;AACA,qBAAqB,CAAC;EAAEC;AAAQ,CAAC,KAAKA,OAAO,GAAG,CAAC;AACjD;AACA;AACA;AACA,cAAc,CAAC;EAAEA;AAAQ,CAAC,KAAKA,OAAO;AACtC;AACA,kBAAkB,CAAC;EAAEA;AAAQ,CAAC,KAAKA,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,CAAC;EAAEC,gBAAgB;EAAEC;AAAM,CAAC,KAC5CD,gBAAgB,IAAIC,KAAK,EAAEC,OAAO,IAAI,MAAM;AACpD;AACA;AACA;AACA,MAAM,CAAC;EAAEC;AAAuB,CAAC,KACzBA,sBAAsB,IACtBZ,GAAG;AACX;AACA,SAAS;AACT;AACA;AACA,MAAM,CAAC;EAAEa,WAAW;EAAED;AAAuB,CAAC,KACtCC,WAAW,IACX,CAACD,sBAAsB,IACvBZ,GAAG;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,MAA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C/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ActionButton.styles.js","names":["motion","styled","css","keyframes","MultiActionButtonStatusType","pulse","color1","color2","StyledActionButton","button","$height","$backgroundColor","theme","primary","$shouldUseContentWidth","$isExpanded","props","$isCollapsed","$isPrimary","$isShrunk","$isSecondary","$isHidden","$isSolo","$isInteractionDisabled","$statusType","$pulseColors","Pulse","$shouldShowKeyboardHighlighting","StyledActionContent","span","StyledIconSlot","$isDisabled","StyledLabelWrapper","StyledSecondaryLabel"],"sources":["../../../../../src/components/multi-action-button/action-button/ActionButton.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { WithTheme } from '../../color-scheme-provider/ColorSchemeProvider';\nimport { MultiActionButtonStatusType } from '../MultiActionButton.types';\n\ntype StyledActionButtonProps = WithTheme<{\n $backgroundColor?: string;\n $isCollapsed?: boolean;\n $isExpanded?: boolean;\n $isHidden?: boolean;\n $isPrimary?: boolean;\n $isSecondary?: boolean;\n $isShrunk?: boolean;\n $isSolo?: boolean;\n $pulseColors?: [string, string];\n $isInteractionDisabled?: boolean;\n $height: number;\n $statusType?: MultiActionButtonStatusType;\n $shouldUseContentWidth?: boolean;\n $shouldShowKeyboardHighlighting?: boolean;\n}>;\n\nconst pulse = (color1: string, color2: string) => keyframes`\n 0% {\n background: ${color1};\n }\n 50% {\n background: ${color2};\n }\n 100% {\n background: ${color1};\n }\n`;\n\nexport const StyledActionButton = styled.button<StyledActionButtonProps>`\n align-items: center;\n border: none;\n border-radius: ${({ $height }) => $height / 2}px;\n cursor: pointer;\n display: inline-flex;\n flex: 1 1 auto;\n height: ${({ $height }) => $height}px;\n line-height: 22px;\n min-height: ${({ $height }) => $height}px;\n overflow: hidden;\n padding: 0;\n position: relative;\n transition:\n background-color 0.2s ease,\n border-radius 0.2s ease,\n color 0.2s ease,\n flex-grow 0.2s ease,\n opacity 0.2s ease,\n padding 0.2s ease,\n width 0.2s ease;\n user-select: none;\n white-space: nowrap;\n\n background-color: ${({ $backgroundColor, theme }) =>\n $backgroundColor || theme?.primary || '#000'};\n color: #fff;\n\n /* When width is content-driven, avoid flex stretching. */\n ${({ $shouldUseContentWidth }) =>\n $shouldUseContentWidth &&\n css`\n flex: 0 1 auto;\n `}\n\n /* Expanded secondary button when width is not content-driven. */\n ${({ $isExpanded, $shouldUseContentWidth }) =>\n $isExpanded &&\n !$shouldUseContentWidth &&\n css`\n flex: 1 1 auto;\n min-width: 0;\n `}\n\n /* Collapsed state clamps to a fixed icon size. */\n ${(props) =>\n props.$isCollapsed &&\n css`\n flex: 0 0 auto;\n padding: 0;\n width: ${props.$height}px;\n `}\n\n /* Primary action stretches unless content-driven. */\n ${({ $isPrimary, $isCollapsed, $shouldUseContentWidth }) =>\n $isPrimary &&\n !$isCollapsed &&\n !$shouldUseContentWidth &&\n css`\n flex: 1 1 auto;\n min-width: 0;\n `}\n\n /* Shrink the primary action to icon size when secondary is expanded. */\n ${(props) =>\n props.$isShrunk &&\n !props.$shouldUseContentWidth &&\n css`\n flex: 0 0 auto;\n padding: 0;\n width: ${props.$height}px;\n `}\n\n /* Keep secondary icon-only when collapsed and not expanded. */\n ${(props) =>\n props.$isSecondary &&\n !props.$isExpanded &&\n !props.$shouldUseContentWidth &&\n css`\n flex: 0 0 auto;\n padding: 0;\n width: ${props.$height}px;\n `}\n\n /* Fully hide the secondary action when the whole control is collapsed. */\n ${({ $isHidden }) =>\n $isHidden &&\n css`\n opacity: 0;\n pointer-events: none;\n width: 0;\n `}\n\n /* Joining both buttons into a pill shape. */\n ${({ $isPrimary }) =>\n $isPrimary &&\n css`\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n `}\n\n ${(props) =>\n props.$isPrimary &&\n props.$isCollapsed &&\n css`\n border-bottom-right-radius: ${props.$height / 2}px;\n border-top-right-radius: ${props.$height / 2}px;\n `}\n\n ${({ $isSecondary }) =>\n $isSecondary &&\n css`\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n `}\n\n ${(props) =>\n props.$isSolo &&\n css`\n border-radius: ${props.$height / 2}px;\n `}\n\n ${(props) =>\n props.$isCollapsed &&\n css`\n border-radius: ${props.$height / 2}px;\n `}\n\n ${({ $isInteractionDisabled }) =>\n $isInteractionDisabled &&\n css`\n cursor: default;\n `}\n\n /* Optional pulse overlay used by status. */\n ${({ $statusType, $pulseColors }) =>\n $statusType === MultiActionButtonStatusType.Pulse &&\n css`\n overflow: hidden;\n\n &::before {\n animation: ${pulse($pulseColors?.[0] || '#A50000', $pulseColors?.[1] || '#630000')}\n 1.6s ease-in-out infinite;\n border-radius: 3px;\n content: '';\n inset: 0;\n pointer-events: none;\n position: absolute;\n }\n `}\n\n &:disabled {\n cursor: default;\n }\n\n ${({ $isInteractionDisabled, $backgroundColor, theme }) =>\n !$isInteractionDisabled &&\n css`\n &:hover:not(:disabled) {\n background-color: ${`color-mix(in srgb, ${$backgroundColor || theme?.primary || '#000'} 85%, black)`};\n }\n `}\n\n ${({ $shouldShowKeyboardHighlighting }) =>\n $shouldShowKeyboardHighlighting &&\n css`\n &:focus-visible {\n transition: none;\n outline: solid 2px color-mix(in srgb, currentColor 70%, transparent);\n box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);\n outline-offset: 1px;\n color: white;\n }\n `}\n`;\n\nexport const StyledActionContent = styled.span`\n align-items: center;\n display: inline-flex;\n flex: 1 1 auto;\n gap: 0;\n min-width: 0;\n position: relative;\n z-index: 1;\n`;\n\nexport const StyledIconSlot = styled.span<{ $height: number; $isDisabled?: boolean }>`\n align-items: center;\n display: inline-flex;\n flex: 0 0 auto;\n height: ${({ $height }) => $height}px;\n justify-content: center;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n transition: opacity 0.2s ease;\n width: ${({ $height }) => $height}px;\n`;\n\nexport const StyledLabelWrapper = styled(motion.span)`\n /* The wrapper animates width/margin to avoid layout jumps. */\n display: inline-flex;\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n text-align: left;\n`;\n\nexport const StyledSecondaryLabel = styled.span`\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n padding-right: 18px;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAE1D,SAASC,2BAA2B,QAAQ,4BAA4B;AAmBxE,MAAMC,KAAK,GAAGA,CAACC,MAAc,EAAEC,MAAc,KAAKJ,SAAS;AAC3D;AACA,sBAAsBG,MAAM;AAC5B;AACA;AACA,sBAAsBC,MAAM;AAC5B;AACA;AACA,sBAAsBD,MAAM;AAC5B;AACA,CAAC;AAED,OAAO,MAAME,kBAAkB,GAAGP,MAAM,CAACQ,MAA+B;AACxE;AACA;AACA,qBAAqB,CAAC;EAAEC;AAAQ,CAAC,KAAKA,OAAO,GAAG,CAAC;AACjD;AACA;AACA;AACA,cAAc,CAAC;EAAEA;AAAQ,CAAC,KAAKA,OAAO;AACtC;AACA,kBAAkB,CAAC;EAAEA;AAAQ,CAAC,KAAKA,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,CAAC;EAAEC,gBAAgB;EAAEC;AAAM,CAAC,KAC5CD,gBAAgB,IAAIC,KAAK,EAAEC,OAAO,IAAI,MAAM;AACpD;AACA;AACA;AACA,MAAM,CAAC;EAAEC;AAAuB,CAAC,KACzBA,sBAAsB,IACtBZ,GAAG;AACX;AACA,SAAS;AACT;AACA;AACA,MAAM,CAAC;EAAEa,WAAW;EAAED;AAAuB,CAAC,KACtCC,WAAW,IACX,CAACD,sBAAsB,IACvBZ,GAAG;AACX;AACA;AACA,SAAS;AACT;AACA;AACA,MAAOc,KAAK,IACJA,KAAK,CAACC,YAAY,IAClBf,GAA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;AACA;AACA,CAAC;AAED,OAAO,MAAMI,oBAAoB,GAAGhC,MAAM,CAAC4B,IAAI;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -6,7 +6,7 @@ import Input from '../input/Input';
6
6
  const NumberInput = t0 => {
7
7
  "use memo";
8
8
 
9
- const $ = _c(41);
9
+ const $ = _c(42);
10
10
  const {
11
11
  isDecimalInput,
12
12
  isMoneyInput,
@@ -20,7 +20,8 @@ const NumberInput = t0 => {
20
20
  isDisabled,
21
21
  onChange,
22
22
  shouldShowOnlyBottomBorder,
23
- minNumber: t3
23
+ minNumber: t3,
24
+ shouldEnableKeyboardHighlighting
24
25
  } = t0;
25
26
  const maxNumber = t1 === undefined ? Infinity : t1;
26
27
  const shouldTriggerChangeOnFormat = t2 === undefined ? true : t2;
@@ -198,7 +199,7 @@ const NumberInput = t0 => {
198
199
  const t11 = hasFocus ? plainText : formattedValue;
199
200
  const t12 = typeof isInvalid === "boolean" ? isInvalid : isValueInvalid;
200
201
  let t13;
201
- if ($[31] !== isDisabled || $[32] !== localPlaceholder || $[33] !== onLocalBlur || $[34] !== onLocalChange || $[35] !== onLocalFocus || $[36] !== shouldRemainPlaceholder || $[37] !== shouldShowOnlyBottomBorder || $[38] !== t11 || $[39] !== t12) {
202
+ if ($[31] !== isDisabled || $[32] !== localPlaceholder || $[33] !== onLocalBlur || $[34] !== onLocalChange || $[35] !== onLocalFocus || $[36] !== shouldEnableKeyboardHighlighting || $[37] !== shouldRemainPlaceholder || $[38] !== shouldShowOnlyBottomBorder || $[39] !== t11 || $[40] !== t12) {
202
203
  t13 = /*#__PURE__*/React.createElement(Input, {
203
204
  shouldRemainPlaceholder: shouldRemainPlaceholder,
204
205
  shouldShowOnlyBottomBorder: shouldShowOnlyBottomBorder,
@@ -210,20 +211,22 @@ const NumberInput = t0 => {
210
211
  onFocus: onLocalFocus,
211
212
  isDisabled: isDisabled,
212
213
  isInvalid: t12,
213
- shouldShowCenteredContent: shouldShowOnlyBottomBorder
214
+ shouldShowCenteredContent: shouldShowOnlyBottomBorder,
215
+ shouldEnableKeyboardHighlighting: shouldEnableKeyboardHighlighting
214
216
  });
215
217
  $[31] = isDisabled;
216
218
  $[32] = localPlaceholder;
217
219
  $[33] = onLocalBlur;
218
220
  $[34] = onLocalChange;
219
221
  $[35] = onLocalFocus;
220
- $[36] = shouldRemainPlaceholder;
221
- $[37] = shouldShowOnlyBottomBorder;
222
- $[38] = t11;
223
- $[39] = t12;
224
- $[40] = t13;
222
+ $[36] = shouldEnableKeyboardHighlighting;
223
+ $[37] = shouldRemainPlaceholder;
224
+ $[38] = shouldShowOnlyBottomBorder;
225
+ $[39] = t11;
226
+ $[40] = t12;
227
+ $[41] = t13;
225
228
  } else {
226
- t13 = $[40];
229
+ t13 = $[41];
227
230
  }
228
231
  return t13;
229
232
  };