@sprinklrjs/spaceweb 10.1.0 → 12.14.4

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 (855) hide show
  1. package/allComponentsAndUtilities.d.ts +1 -0
  2. package/allComponentsAndUtilities.js +2 -1
  3. package/asyncSelect/asyncSelect.d.ts +4 -2
  4. package/asyncSelect/asyncSelect.js +43 -108
  5. package/asyncSelect/groupedAsyncSelect.d.ts +5 -0
  6. package/asyncSelect/groupedAsyncSelect.js +41 -0
  7. package/asyncSelect/helpers.d.ts +9 -3
  8. package/asyncSelect/helpers.js +35 -4
  9. package/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +17 -12
  10. package/asyncSelect/hooks/useAsyncOptionHandlers.js +73 -26
  11. package/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
  12. package/asyncSelect/hooks/useAsyncSelect.js +182 -0
  13. package/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
  14. package/asyncSelect/hooks/useResolveSelectedOptions.js +59 -47
  15. package/asyncSelect/index.d.ts +4 -1
  16. package/asyncSelect/index.js +8 -0
  17. package/asyncSelect/types.d.ts +63 -12
  18. package/avatar/avatar.js +12 -2
  19. package/avatar/index.d.ts +1 -1
  20. package/avatar/styled-component.js +7 -22
  21. package/avatar/types.d.ts +1 -1
  22. package/badge/styled-component.js +10 -8
  23. package/banner/banner-item.d.ts +12 -0
  24. package/banner/banner-item.js +14 -0
  25. package/banner/banner.d.ts +19 -0
  26. package/banner/banner.js +56 -0
  27. package/banner/index.d.ts +5 -0
  28. package/banner/index.js +14 -0
  29. package/banner/locale.d.ts +6 -0
  30. package/banner/locale.js +2 -0
  31. package/banner/package.json +4 -0
  32. package/banner/styled-component.d.ts +6 -0
  33. package/banner/styled-component.js +39 -0
  34. package/banner/types.d.ts +26 -0
  35. package/banner/types.js +2 -0
  36. package/breadcrumb/breadcrumb-item.d.ts +7 -0
  37. package/breadcrumb/breadcrumb-item.js +41 -0
  38. package/breadcrumb/breadcrumb.d.ts +7 -0
  39. package/breadcrumb/breadcrumb.js +29 -0
  40. package/breadcrumb/index.d.ts +4 -0
  41. package/breadcrumb/index.js +17 -0
  42. package/breadcrumb/package.json +4 -0
  43. package/breadcrumb/styled-components.d.ts +7 -0
  44. package/breadcrumb/styled-components.js +19 -0
  45. package/breadcrumb/types.d.ts +38 -0
  46. package/breadcrumb/types.js +2 -0
  47. package/button/Button.d.ts +3 -3
  48. package/button/Button.js +14 -2
  49. package/button/IconButton/IconButton.d.ts +2 -4
  50. package/button/IconButton/IconButton.js +5 -2
  51. package/button/IconButton/types.d.ts +10 -1
  52. package/button/basewebAdapter.d.ts +9 -6
  53. package/button/basewebAdapter.js +1 -1
  54. package/button/styled-components.js +30 -25
  55. package/button/types.d.ts +4 -1
  56. package/button-group/ButtonGroup.d.ts +1 -0
  57. package/button-group/ButtonGroup.js +9 -5
  58. package/button-group/StatefulButtonGroup.d.ts +1 -0
  59. package/button-group/index.d.ts +1 -2
  60. package/button-group/index.js +1 -5
  61. package/button-group/styled-components.d.ts +34 -0
  62. package/button-group/styled-components.js +60 -12
  63. package/button-group/types.d.ts +3 -0
  64. package/checkbox/basewebAdapters.d.ts +5 -2
  65. package/checkbox/basewebAdapters.js +9 -2
  66. package/checkbox/index.d.ts +1 -1
  67. package/checkbox/index.js +1 -2
  68. package/checkbox/styled-components.js +1 -1
  69. package/checkbox/types.d.ts +15 -8
  70. package/color-picker/ColorPalette.d.ts +9 -0
  71. package/color-picker/ColorPalette.js +26 -0
  72. package/color-picker/ColorPicker.d.ts +3 -0
  73. package/color-picker/ColorPicker.js +35 -0
  74. package/color-picker/Swatch.d.ts +12 -0
  75. package/color-picker/Swatch.js +40 -0
  76. package/color-picker/colors.d.ts +1 -0
  77. package/color-picker/colors.js +109 -0
  78. package/color-picker/getContrastRatio.d.ts +1 -0
  79. package/color-picker/getContrastRatio.js +23 -0
  80. package/color-picker/index.d.ts +3 -0
  81. package/color-picker/index.js +7 -0
  82. package/color-picker/locale.d.ts +3 -0
  83. package/color-picker/locale.js +2 -0
  84. package/color-picker/package.json +4 -0
  85. package/color-picker/styled-component.d.ts +1 -0
  86. package/color-picker/styled-component.js +5 -0
  87. package/color-picker/types.d.ts +15 -0
  88. package/color-picker/types.js +2 -0
  89. package/currency/Currency.d.ts +3 -0
  90. package/currency/Currency.js +14 -0
  91. package/currency/constants.d.ts +3 -0
  92. package/currency/constants.js +8 -0
  93. package/currency/index.d.ts +5 -0
  94. package/currency/index.js +12 -0
  95. package/currency/package.json +4 -0
  96. package/currency/types.d.ts +7 -0
  97. package/currency/types.js +2 -0
  98. package/currency/useCurrency.d.ts +2 -0
  99. package/currency/useCurrency.js +12 -0
  100. package/currency/utils.d.ts +8 -0
  101. package/currency/utils.js +11 -0
  102. package/date-input/Before.d.ts +4 -2
  103. package/date-input/Before.js +4 -4
  104. package/date-input/CalendarIconButton.js +7 -1
  105. package/date-input/DateInput.d.ts +1 -1
  106. package/date-input/DateInput.js +47 -26
  107. package/date-input/styled-components.d.ts +2 -2
  108. package/date-input/styled-components.js +10 -8
  109. package/date-input/types.d.ts +4 -2
  110. package/date-picker/Calendar.d.ts +1 -1
  111. package/date-picker/Calendar.js +16 -6
  112. package/date-picker/DateInput.d.ts +3 -2
  113. package/date-picker/DateInput.js +19 -17
  114. package/date-picker/DatePickerContent.d.ts +9 -3
  115. package/date-picker/DatePickerContent.js +59 -8
  116. package/date-picker/DatePickerInput.js +13 -16
  117. package/date-picker/DateTimeContainer.d.ts +4 -2
  118. package/date-picker/DateTimeContainer.js +5 -5
  119. package/date-picker/StatelessDatePicker.d.ts +1 -1
  120. package/date-picker/StatelessDatePicker.js +40 -20
  121. package/date-picker/TimeInput.d.ts +5 -2
  122. package/date-picker/TimeInput.js +4 -2
  123. package/date-picker/index.d.ts +1 -0
  124. package/date-picker/index.js +3 -1
  125. package/date-picker/locale.d.ts +2 -0
  126. package/date-picker/stateful-container.d.ts +1 -1
  127. package/date-picker/stateful-container.js +11 -8
  128. package/date-picker/styled-components.d.ts +0 -1
  129. package/date-picker/styled-components.js +54 -27
  130. package/date-picker/types.d.ts +10 -1
  131. package/date-picker/utils.d.ts +10 -7
  132. package/date-picker/utils.js +12 -4
  133. package/date-time/DateTime.d.ts +3 -0
  134. package/date-time/DateTime.js +12 -0
  135. package/date-time/index.d.ts +3 -0
  136. package/date-time/index.js +9 -0
  137. package/date-time/package.json +4 -0
  138. package/date-time/types.d.ts +21 -0
  139. package/date-time/types.js +18 -0
  140. package/date-time/useDateTime.d.ts +2 -0
  141. package/date-time/useDateTime.js +13 -0
  142. package/date-time/variants.d.ts +4 -0
  143. package/date-time/variants.js +87 -0
  144. package/esm/allComponentsAndUtilities.d.ts +1 -0
  145. package/esm/allComponentsAndUtilities.js +2 -0
  146. package/esm/asyncSelect/asyncSelect.d.ts +4 -2
  147. package/esm/asyncSelect/asyncSelect.js +46 -111
  148. package/esm/asyncSelect/groupedAsyncSelect.d.ts +5 -0
  149. package/esm/asyncSelect/groupedAsyncSelect.js +37 -0
  150. package/esm/asyncSelect/helpers.d.ts +9 -3
  151. package/esm/asyncSelect/helpers.js +31 -3
  152. package/esm/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +17 -12
  153. package/esm/asyncSelect/hooks/useAsyncOptionHandlers.js +76 -29
  154. package/esm/asyncSelect/hooks/useAsyncSelect.d.ts +10 -0
  155. package/esm/asyncSelect/hooks/useAsyncSelect.js +178 -0
  156. package/esm/asyncSelect/hooks/useResolveSelectedOptions.d.ts +10 -7
  157. package/esm/asyncSelect/hooks/useResolveSelectedOptions.js +62 -50
  158. package/esm/asyncSelect/index.d.ts +4 -1
  159. package/esm/asyncSelect/index.js +3 -0
  160. package/esm/asyncSelect/types.d.ts +63 -12
  161. package/esm/avatar/avatar.js +12 -2
  162. package/esm/avatar/index.d.ts +1 -1
  163. package/esm/avatar/styled-component.js +7 -22
  164. package/esm/avatar/types.d.ts +1 -1
  165. package/esm/badge/styled-component.js +10 -8
  166. package/esm/banner/banner-item.d.ts +12 -0
  167. package/esm/banner/banner-item.js +12 -0
  168. package/esm/banner/banner.d.ts +19 -0
  169. package/esm/banner/banner.js +54 -0
  170. package/esm/banner/index.d.ts +5 -0
  171. package/esm/banner/index.js +3 -0
  172. package/esm/banner/locale.d.ts +6 -0
  173. package/esm/banner/locale.js +1 -0
  174. package/esm/banner/styled-component.d.ts +6 -0
  175. package/esm/banner/styled-component.js +35 -0
  176. package/esm/banner/types.d.ts +26 -0
  177. package/esm/banner/types.js +1 -0
  178. package/esm/breadcrumb/breadcrumb-item.d.ts +7 -0
  179. package/esm/breadcrumb/breadcrumb-item.js +39 -0
  180. package/esm/breadcrumb/breadcrumb.d.ts +7 -0
  181. package/esm/breadcrumb/breadcrumb.js +27 -0
  182. package/esm/breadcrumb/index.d.ts +4 -0
  183. package/esm/breadcrumb/index.js +3 -0
  184. package/esm/breadcrumb/styled-components.d.ts +7 -0
  185. package/esm/breadcrumb/styled-components.js +15 -0
  186. package/esm/breadcrumb/types.d.ts +38 -0
  187. package/esm/breadcrumb/types.js +1 -0
  188. package/esm/button/Button.d.ts +3 -3
  189. package/esm/button/Button.js +14 -2
  190. package/esm/button/IconButton/IconButton.d.ts +2 -4
  191. package/esm/button/IconButton/IconButton.js +5 -2
  192. package/esm/button/IconButton/types.d.ts +10 -1
  193. package/esm/button/basewebAdapter.d.ts +9 -6
  194. package/esm/button/basewebAdapter.js +1 -1
  195. package/esm/button/styled-components.js +30 -25
  196. package/esm/button/types.d.ts +4 -1
  197. package/esm/button-group/ButtonGroup.d.ts +1 -0
  198. package/esm/button-group/ButtonGroup.js +9 -5
  199. package/esm/button-group/StatefulButtonGroup.d.ts +1 -0
  200. package/esm/button-group/index.d.ts +1 -2
  201. package/esm/button-group/index.js +0 -1
  202. package/esm/button-group/styled-components.d.ts +34 -0
  203. package/esm/button-group/styled-components.js +58 -11
  204. package/esm/button-group/types.d.ts +3 -0
  205. package/esm/checkbox/basewebAdapters.d.ts +5 -2
  206. package/esm/checkbox/basewebAdapters.js +9 -2
  207. package/esm/checkbox/index.d.ts +1 -1
  208. package/esm/checkbox/index.js +1 -1
  209. package/esm/checkbox/styled-components.js +1 -1
  210. package/esm/checkbox/types.d.ts +15 -8
  211. package/esm/color-picker/ColorPalette.d.ts +9 -0
  212. package/esm/color-picker/ColorPalette.js +22 -0
  213. package/esm/color-picker/ColorPicker.d.ts +3 -0
  214. package/esm/color-picker/ColorPicker.js +31 -0
  215. package/esm/color-picker/Swatch.d.ts +12 -0
  216. package/esm/color-picker/Swatch.js +37 -0
  217. package/esm/color-picker/colors.d.ts +1 -0
  218. package/esm/color-picker/colors.js +106 -0
  219. package/esm/color-picker/getContrastRatio.d.ts +1 -0
  220. package/esm/color-picker/getContrastRatio.js +19 -0
  221. package/esm/color-picker/index.d.ts +3 -0
  222. package/esm/color-picker/index.js +2 -0
  223. package/esm/color-picker/locale.d.ts +3 -0
  224. package/esm/color-picker/locale.js +1 -0
  225. package/esm/color-picker/styled-component.d.ts +1 -0
  226. package/esm/color-picker/styled-component.js +2 -0
  227. package/esm/color-picker/types.d.ts +15 -0
  228. package/esm/color-picker/types.js +1 -0
  229. package/esm/currency/Currency.d.ts +3 -0
  230. package/esm/currency/Currency.js +10 -0
  231. package/esm/currency/constants.d.ts +3 -0
  232. package/esm/currency/constants.js +5 -0
  233. package/esm/currency/index.d.ts +5 -0
  234. package/esm/currency/index.js +5 -0
  235. package/esm/currency/types.d.ts +7 -0
  236. package/esm/currency/types.js +1 -0
  237. package/esm/currency/useCurrency.d.ts +2 -0
  238. package/esm/currency/useCurrency.js +8 -0
  239. package/esm/currency/utils.d.ts +8 -0
  240. package/esm/currency/utils.js +7 -0
  241. package/esm/date-input/Before.d.ts +4 -2
  242. package/esm/date-input/Before.js +4 -4
  243. package/esm/date-input/CalendarIconButton.js +7 -1
  244. package/esm/date-input/DateInput.d.ts +1 -1
  245. package/esm/date-input/DateInput.js +48 -27
  246. package/esm/date-input/styled-components.d.ts +2 -2
  247. package/esm/date-input/styled-components.js +10 -7
  248. package/esm/date-input/types.d.ts +4 -2
  249. package/esm/date-picker/Calendar.d.ts +1 -1
  250. package/esm/date-picker/Calendar.js +17 -7
  251. package/esm/date-picker/DateInput.d.ts +3 -2
  252. package/esm/date-picker/DateInput.js +20 -18
  253. package/esm/date-picker/DatePickerContent.d.ts +9 -3
  254. package/esm/date-picker/DatePickerContent.js +60 -9
  255. package/esm/date-picker/DatePickerInput.js +13 -16
  256. package/esm/date-picker/DateTimeContainer.d.ts +4 -2
  257. package/esm/date-picker/DateTimeContainer.js +5 -5
  258. package/esm/date-picker/StatelessDatePicker.d.ts +1 -1
  259. package/esm/date-picker/StatelessDatePicker.js +40 -20
  260. package/esm/date-picker/TimeInput.d.ts +5 -2
  261. package/esm/date-picker/TimeInput.js +4 -2
  262. package/esm/date-picker/index.d.ts +1 -0
  263. package/esm/date-picker/index.js +1 -0
  264. package/esm/date-picker/locale.d.ts +2 -0
  265. package/esm/date-picker/stateful-container.d.ts +1 -1
  266. package/esm/date-picker/stateful-container.js +11 -8
  267. package/esm/date-picker/styled-components.d.ts +0 -1
  268. package/esm/date-picker/styled-components.js +53 -26
  269. package/esm/date-picker/types.d.ts +10 -1
  270. package/esm/date-picker/utils.d.ts +10 -7
  271. package/esm/date-picker/utils.js +13 -5
  272. package/esm/date-time/DateTime.d.ts +3 -0
  273. package/esm/date-time/DateTime.js +8 -0
  274. package/esm/date-time/index.d.ts +3 -0
  275. package/esm/date-time/index.js +3 -0
  276. package/esm/date-time/types.d.ts +21 -0
  277. package/esm/date-time/types.js +15 -0
  278. package/esm/date-time/useDateTime.d.ts +2 -0
  279. package/esm/date-time/useDateTime.js +9 -0
  280. package/esm/date-time/variants.d.ts +4 -0
  281. package/esm/date-time/variants.js +84 -0
  282. package/esm/form-control/context.d.ts +6 -13
  283. package/esm/form-control/context.js +10 -9
  284. package/esm/form-control/form-control.d.ts +1 -1
  285. package/esm/form-control/form-control.js +17 -12
  286. package/esm/form-control/styled-component.js +18 -7
  287. package/esm/helpers/ClearIconButton.js +3 -1
  288. package/esm/helpers/StyledTombstone.d.ts +1 -0
  289. package/esm/helpers/StyledTombstone.js +17 -0
  290. package/esm/helpers/baseui/useConvertOverrides.js +6 -1
  291. package/esm/helpers/baseui/withThemeOverride.js +1 -1
  292. package/esm/helpers/commonStyles.d.ts +2 -2
  293. package/esm/helpers/commonStyles.js +3 -6
  294. package/esm/helpers/index.d.ts +1 -0
  295. package/esm/helpers/index.js +8 -0
  296. package/esm/helpers/styletron.d.ts +14 -3
  297. package/esm/helpers/themeHelpers.d.ts +1 -0
  298. package/esm/helpers/themeHelpers.js +13 -0
  299. package/esm/hooks/useAutoFocus.d.ts +6 -7
  300. package/esm/hooks/useAutoFocus.js +19 -13
  301. package/esm/hooks/useCombinedRef.d.ts +1 -0
  302. package/esm/hooks/useCombinedRef.js +33 -0
  303. package/esm/hooks/useIsMobileDevice.d.ts +1 -0
  304. package/esm/hooks/useIsMobileDevice.js +6 -0
  305. package/esm/hooks/useMatchMedia.d.ts +3 -0
  306. package/esm/hooks/useMatchMedia.js +49 -0
  307. package/esm/icon/components/alert-solid.js +2 -0
  308. package/esm/icon/components/alert.js +2 -0
  309. package/esm/icon/components/calendar-solid.js +2 -0
  310. package/esm/icon/components/chevron-down.js +2 -0
  311. package/esm/icon/components/chevron-left.d.ts +3 -0
  312. package/esm/icon/components/chevron-left.js +8 -0
  313. package/esm/icon/components/chevron-right.d.ts +3 -0
  314. package/esm/icon/components/chevron-right.js +8 -0
  315. package/esm/icon/components/close.js +2 -0
  316. package/esm/icon/components/error-clr.js +2 -0
  317. package/esm/icon/components/error-solid.js +2 -0
  318. package/esm/icon/components/error.js +2 -0
  319. package/esm/icon/components/imagePreview.js +2 -0
  320. package/esm/icon/components/info.js +2 -0
  321. package/esm/icon/components/play-video.js +2 -0
  322. package/esm/icon/components/reset-color.d.ts +3 -0
  323. package/esm/icon/components/reset-color.js +8 -0
  324. package/esm/icon/components/search.js +2 -0
  325. package/esm/icon/components/tick.js +2 -0
  326. package/esm/icon/components/tickCircle-solid.js +2 -0
  327. package/esm/icon/components/user.js +2 -0
  328. package/esm/icon/components/video-non-playable.js +2 -0
  329. package/esm/index.d.ts +2 -0
  330. package/esm/index.js +2 -0
  331. package/esm/input/basewebAdapters.d.ts +1 -1
  332. package/esm/input/basewebAdapters.js +18 -3
  333. package/esm/input/index.d.ts +2 -1
  334. package/esm/input/index.js +1 -0
  335. package/esm/input/styled-components.d.ts +1 -1
  336. package/esm/input/styled-components.js +8 -6
  337. package/esm/input/types.d.ts +10 -4
  338. package/esm/layer/useLayersContextValue.js +3 -2
  339. package/esm/list/avatar-list-item.d.ts +12 -22
  340. package/esm/list/avatar-list-item.js +8 -10
  341. package/esm/list/divider.js +6 -3
  342. package/esm/list/index.d.ts +1 -1
  343. package/esm/list/index.js +1 -1
  344. package/esm/list/list-item.d.ts +3 -1
  345. package/esm/list/list-item.js +9 -6
  346. package/esm/list/list.d.ts +10 -5
  347. package/esm/list/list.js +47 -6
  348. package/esm/list/styled-component.d.ts +1 -0
  349. package/esm/list/styled-component.js +23 -17
  350. package/esm/list/types.d.ts +8 -0
  351. package/esm/list/utils.d.ts +2 -0
  352. package/esm/list/utils.js +10 -0
  353. package/esm/locale/en_US.js +35 -0
  354. package/esm/locale/types.d.ts +21 -0
  355. package/esm/menu/MenuContext.d.ts +2 -1
  356. package/esm/menu/MenuContext.js +1 -0
  357. package/esm/menu/menu-item.d.ts +8 -2
  358. package/esm/menu/menu-item.js +11 -11
  359. package/esm/menu/menu.d.ts +6 -0
  360. package/esm/menu/menu.js +11 -11
  361. package/esm/menu/types.d.ts +1 -0
  362. package/esm/menu/useKeyboardNavigation.d.ts +6 -3
  363. package/esm/menu/useKeyboardNavigation.js +21 -14
  364. package/esm/menu/useStatefulMenu.d.ts +5 -2
  365. package/esm/menu/useStatefulMenu.js +14 -8
  366. package/esm/modal/adapter.d.ts +1 -1
  367. package/esm/modal/index.d.ts +1 -1
  368. package/esm/modal/index.js +1 -1
  369. package/esm/modal/modal.js +5 -5
  370. package/esm/modal/overrides.d.ts +2 -3
  371. package/esm/modal/overrides.js +6 -8
  372. package/esm/modal/styled-components.d.ts +1 -1
  373. package/esm/modal/styled-components.js +8 -8
  374. package/esm/number/Number.d.ts +3 -0
  375. package/esm/number/Number.js +10 -0
  376. package/esm/number/constants.d.ts +2 -0
  377. package/esm/number/constants.js +4 -0
  378. package/esm/number/index.d.ts +5 -0
  379. package/esm/number/index.js +5 -0
  380. package/esm/number/types.d.ts +6 -0
  381. package/esm/number/types.js +1 -0
  382. package/esm/number/useNumber.d.ts +2 -0
  383. package/esm/number/useNumber.js +8 -0
  384. package/esm/overrides/index.d.ts +1 -1
  385. package/esm/overrides/index.js +1 -1
  386. package/esm/overrides/mergeOverrides.d.ts +3 -2
  387. package/esm/overrides/mergeOverrides.js +5 -4
  388. package/esm/payment-card/basewebAdapters.d.ts +2 -0
  389. package/esm/payment-card/basewebAdapters.js +27 -4
  390. package/esm/payment-card/styled-components.js +25 -6
  391. package/esm/payment-card/types.d.ts +4 -2
  392. package/esm/phone-input/country-select-container.js +1 -1
  393. package/esm/phone-input/country-select.js +4 -6
  394. package/esm/phone-input/default-props.d.ts +6 -9
  395. package/esm/phone-input/default-props.js +7 -9
  396. package/esm/phone-input/flag-container.js +1 -1
  397. package/esm/phone-input/phone-input.d.ts +0 -6
  398. package/esm/phone-input/phone-input.js +21 -12
  399. package/esm/phone-input/stateful-phone-input-container.js +4 -3
  400. package/esm/phone-input/stateful-phone-input.d.ts +0 -6
  401. package/esm/phone-input/styled-components.d.ts +9 -1
  402. package/esm/phone-input/styled-components.js +21 -7
  403. package/esm/phone-input/types.d.ts +2 -1
  404. package/esm/phone-input/utils.d.ts +10 -3
  405. package/esm/phone-input/utils.js +10 -5
  406. package/esm/popover/adapter.d.ts +4 -3
  407. package/esm/popover/adapter.js +15 -0
  408. package/esm/popover/overrides.js +8 -19
  409. package/esm/popover/popover.d.ts +6 -3
  410. package/esm/popover/popover.js +13 -6
  411. package/esm/popover/stateful-popover.js +2 -2
  412. package/esm/popover/types.d.ts +10 -2
  413. package/esm/popover/types.js +2 -1
  414. package/esm/popover/utils.d.ts +12 -0
  415. package/esm/popover/utils.js +9 -0
  416. package/esm/progress/circular/styled-component.d.ts +1 -1
  417. package/esm/progress/circular/styled-component.js +3 -3
  418. package/esm/progress/linear/styled-component.d.ts +1 -1
  419. package/esm/progress/linear/styled-component.js +5 -5
  420. package/esm/radio/basewebAdapters.d.ts +8 -11
  421. package/esm/radio/basewebAdapters.js +6 -3
  422. package/esm/radio/radio.js +6 -5
  423. package/esm/radio/styled-components.js +9 -11
  424. package/esm/radio/types.d.ts +13 -6
  425. package/esm/search/index.d.ts +1 -0
  426. package/esm/search/index.js +1 -0
  427. package/esm/search/search.d.ts +1 -1
  428. package/esm/search/search.js +15 -6
  429. package/esm/search/stateful-search.d.ts +3 -0
  430. package/esm/search/stateful-search.js +15 -0
  431. package/esm/search/styled-components.d.ts +1 -10
  432. package/esm/search/styled-components.js +54 -24
  433. package/esm/search/types.d.ts +8 -2
  434. package/esm/select/adaptor.d.ts +1 -1
  435. package/esm/select/base-select.d.ts +36 -16
  436. package/esm/select/base-select.js +185 -88
  437. package/esm/select/constants.d.ts +3 -0
  438. package/esm/select/constants.js +3 -1
  439. package/esm/select/default-props.d.ts +9 -5
  440. package/esm/select/default-props.js +4 -1
  441. package/esm/select/index.d.ts +4 -4
  442. package/esm/select/index.js +3 -3
  443. package/esm/select/locale.d.ts +4 -0
  444. package/esm/select/mobileSelect/MobileSelect.js +3 -5
  445. package/esm/select/mobileSelect/MobileSheet.js +3 -1
  446. package/esm/select/multi-value.js +22 -12
  447. package/esm/select/overlaySelect/OverlaySelect.js +10 -18
  448. package/esm/select/overlaySelect/hooks/useControlRef.d.ts +9 -0
  449. package/esm/select/overlaySelect/hooks/useControlRef.js +33 -0
  450. package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +24 -0
  451. package/esm/select/overlaySelect/{useOverlaySelectOverrides.js → hooks/useOverlaySelectOverrides.js} +31 -28
  452. package/esm/select/overlaySelect/{usePopover.d.ts → hooks/usePopover.d.ts} +1 -1
  453. package/esm/select/overlaySelect/{usePopover.js → hooks/usePopover.js} +2 -2
  454. package/esm/select/overrides.d.ts +3 -1
  455. package/esm/select/overrides.js +19 -13
  456. package/esm/select/select-variants.js +2 -2
  457. package/esm/select/select.d.ts +9 -5
  458. package/esm/select/select.js +9 -3
  459. package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
  460. package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.js +70 -0
  461. package/esm/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -32
  462. package/esm/select/selectMenuAdapter/SelectMenuAdapter.js +11 -5
  463. package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +8 -2
  464. package/esm/select/selectMenuAdapter/SelectMenuItem.js +2 -4
  465. package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
  466. package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +16 -0
  467. package/esm/select/selectMenuAdapter/types.d.ts +42 -0
  468. package/esm/select/selectMenuAdapter/types.js +1 -0
  469. package/esm/select/stateful-select.d.ts +9 -5
  470. package/esm/select/stateful-select.js +3 -3
  471. package/esm/select/styled-component.d.ts +15 -4
  472. package/esm/select/styled-component.js +60 -10
  473. package/esm/select/types.d.ts +36 -9
  474. package/esm/select/types.js +1 -0
  475. package/esm/select/utils/default-filter-options.d.ts +2 -1
  476. package/esm/select/utils/default-filter-options.js +5 -1
  477. package/esm/select/utils/hidden-element.d.ts +6 -0
  478. package/esm/select/utils/hidden-element.js +16 -0
  479. package/esm/select/utils/merge-options.d.ts +2 -0
  480. package/esm/select/utils/merge-options.js +18 -0
  481. package/esm/select/utils/test-utils.d.ts +1 -0
  482. package/esm/select/utils/test-utils.js +7 -0
  483. package/esm/slider/mark.d.ts +3 -3
  484. package/esm/slider/slider.js +2 -1
  485. package/esm/slider/stateful-slider.js +1 -1
  486. package/esm/slider/styled-components.js +4 -4
  487. package/esm/slider/types.d.ts +9 -2
  488. package/esm/snackbar/Snackbar.js +12 -12
  489. package/esm/snackbar/styled-component.js +9 -6
  490. package/esm/spacewebProvider/CustomBaseProvider.js +1 -0
  491. package/esm/spacewebProvider/SpacewebProvider.d.ts +3 -1
  492. package/esm/spacewebProvider/SpacewebProvider.js +9 -9
  493. package/esm/stack/stack.js +6 -13
  494. package/esm/style/_buildUtils.d.ts +1 -1
  495. package/esm/style/_buildUtils.js +3 -1
  496. package/esm/style/_parseStyle.js +12 -7
  497. package/esm/style/useMemoizedStyletron.d.ts +1 -1
  498. package/esm/style/useMemoizedStyletron.js +6 -1
  499. package/esm/styleEngine/styleEngine.d.ts +1 -2
  500. package/esm/switch/__test__/switch.spec.js +13 -0
  501. package/esm/switch/styled-components.js +14 -21
  502. package/esm/switch/switch.js +5 -2
  503. package/esm/switch/types.d.ts +8 -11
  504. package/esm/tag/avatar-tag.js +23 -16
  505. package/esm/tag/styled-components.js +32 -27
  506. package/esm/tag/tag.js +20 -12
  507. package/esm/tag/types.d.ts +2 -2
  508. package/esm/tag/utils.d.ts +50 -0
  509. package/esm/tag/utils.js +64 -0
  510. package/esm/textarea/basewebAdapters.js +4 -4
  511. package/esm/textarea/styled-components.d.ts +1 -1
  512. package/esm/textarea/textarea.js +4 -8
  513. package/esm/textarea/types.d.ts +7 -5
  514. package/esm/theme/Provider.d.ts +10 -0
  515. package/esm/theme/Provider.js +61 -0
  516. package/esm/theme/context.d.ts +1 -10
  517. package/esm/theme/context.js +1 -61
  518. package/esm/theme/index.d.ts +1 -0
  519. package/esm/theme/index.js +1 -0
  520. package/esm/themes/index.js +1 -1
  521. package/esm/themes/responsive-theme.d.ts +2 -2
  522. package/esm/time-picker/TimePicker.d.ts +1 -6
  523. package/esm/time-picker/TimePicker.js +4 -4
  524. package/esm/time-picker/types.d.ts +3 -1
  525. package/esm/time-range-picker/RangeSelector.js +6 -5
  526. package/esm/time-range-picker/RangeSelectorContainer.js +27 -27
  527. package/esm/time-range-picker/TimeRangeList.js +8 -1
  528. package/esm/time-range-picker/TimeRangePicker.js +26 -17
  529. package/esm/time-range-picker/index.d.ts +1 -1
  530. package/esm/time-range-picker/index.js +1 -1
  531. package/esm/time-range-picker/locale.d.ts +3 -0
  532. package/esm/time-range-picker/types.d.ts +17 -3
  533. package/esm/time-range-picker/utils.d.ts +47 -18
  534. package/esm/time-range-picker/utils.js +94 -16
  535. package/esm/time-zone-picker/TimezonePicker.d.ts +1 -6
  536. package/esm/time-zone-picker/TimezonePicker.js +5 -7
  537. package/esm/time-zone-picker/types.d.ts +2 -0
  538. package/esm/tooltip/disabled-tooltip-container.d.ts +26 -1
  539. package/esm/tooltip/overrides.js +1 -2
  540. package/esm/tooltip/stateful-tooltip-container.d.ts +26 -1
  541. package/esm/tooltip/stateful-tooltip.d.ts +27 -1
  542. package/esm/tooltip/stateful-tooltip.js +2 -2
  543. package/esm/tooltip/tooltip.d.ts +1 -1
  544. package/esm/tooltip/tooltip.js +7 -4
  545. package/esm/tooltip/types.d.ts +12 -2
  546. package/esm/types.d.ts +5 -3
  547. package/esm/typography/Typography.js +14 -1
  548. package/esm/typography/constants.d.ts +56 -0
  549. package/esm/typography/constants.js +56 -0
  550. package/esm/typography/index.d.ts +1 -0
  551. package/esm/typography/index.js +1 -0
  552. package/esm/typography/styled-components.js +12 -4
  553. package/esm/typography/types.d.ts +1 -1
  554. package/esm/utils/intlNumberFormatUtils/index.d.ts +7 -0
  555. package/esm/utils/intlNumberFormatUtils/index.js +36 -0
  556. package/esm/utils/intlNumberFormatUtils/types.d.ts +21 -0
  557. package/esm/utils/intlNumberFormatUtils/types.js +6 -0
  558. package/esm/video/Video.js +4 -2
  559. package/esm/video/types.d.ts +2 -0
  560. package/form-control/context.d.ts +6 -13
  561. package/form-control/context.js +11 -10
  562. package/form-control/form-control.d.ts +1 -1
  563. package/form-control/form-control.js +16 -11
  564. package/form-control/styled-component.js +18 -7
  565. package/helpers/ClearIconButton.js +3 -1
  566. package/helpers/StyledTombstone.d.ts +1 -0
  567. package/helpers/StyledTombstone.js +21 -0
  568. package/helpers/baseui/useConvertOverrides.js +6 -1
  569. package/helpers/baseui/withThemeOverride.js +1 -1
  570. package/helpers/commonStyles.d.ts +2 -2
  571. package/helpers/commonStyles.js +3 -6
  572. package/helpers/index.d.ts +1 -0
  573. package/helpers/index.js +10 -1
  574. package/helpers/styletron.d.ts +14 -3
  575. package/helpers/themeHelpers.d.ts +1 -0
  576. package/helpers/themeHelpers.js +15 -1
  577. package/hooks/useAutoFocus.d.ts +6 -7
  578. package/hooks/useAutoFocus.js +19 -14
  579. package/hooks/useCombinedRef.d.ts +1 -0
  580. package/hooks/useCombinedRef.js +35 -1
  581. package/hooks/useIsMobileDevice.d.ts +1 -0
  582. package/hooks/useIsMobileDevice.js +11 -0
  583. package/hooks/useMatchMedia.d.ts +3 -0
  584. package/hooks/useMatchMedia.js +52 -0
  585. package/icon/components/alert-solid.js +2 -0
  586. package/icon/components/alert.js +2 -0
  587. package/icon/components/calendar-solid.js +2 -0
  588. package/icon/components/chevron-down.js +2 -0
  589. package/icon/components/chevron-left.d.ts +3 -0
  590. package/icon/components/chevron-left.js +11 -0
  591. package/icon/components/chevron-right.d.ts +3 -0
  592. package/icon/components/chevron-right.js +11 -0
  593. package/icon/components/close.js +2 -0
  594. package/icon/components/error-clr.js +2 -0
  595. package/icon/components/error-solid.js +2 -0
  596. package/icon/components/error.js +2 -0
  597. package/icon/components/imagePreview.js +2 -0
  598. package/icon/components/info.js +2 -0
  599. package/icon/components/play-video.js +2 -0
  600. package/icon/components/reset-color.d.ts +3 -0
  601. package/icon/components/reset-color.js +11 -0
  602. package/icon/components/search.js +2 -0
  603. package/icon/components/tick.js +2 -0
  604. package/icon/components/tickCircle-solid.js +2 -0
  605. package/icon/components/user.js +2 -0
  606. package/icon/components/video-non-playable.js +2 -0
  607. package/index.d.ts +2 -0
  608. package/index.js +3 -0
  609. package/input/basewebAdapters.d.ts +1 -1
  610. package/input/basewebAdapters.js +18 -3
  611. package/input/index.d.ts +2 -1
  612. package/input/index.js +3 -1
  613. package/input/styled-components.d.ts +1 -1
  614. package/input/styled-components.js +7 -5
  615. package/input/types.d.ts +10 -4
  616. package/layer/useLayersContextValue.js +2 -1
  617. package/list/avatar-list-item.d.ts +12 -22
  618. package/list/avatar-list-item.js +6 -8
  619. package/list/divider.js +6 -3
  620. package/list/index.d.ts +1 -1
  621. package/list/index.js +2 -1
  622. package/list/list-item.d.ts +3 -1
  623. package/list/list-item.js +9 -6
  624. package/list/list.d.ts +10 -5
  625. package/list/list.js +47 -6
  626. package/list/styled-component.d.ts +1 -0
  627. package/list/styled-component.js +24 -18
  628. package/list/types.d.ts +8 -0
  629. package/list/utils.d.ts +2 -0
  630. package/list/utils.js +14 -0
  631. package/locale/en_US.js +35 -0
  632. package/locale/types.d.ts +21 -0
  633. package/menu/MenuContext.d.ts +2 -1
  634. package/menu/MenuContext.js +1 -0
  635. package/menu/menu-item.d.ts +8 -2
  636. package/menu/menu-item.js +11 -11
  637. package/menu/menu.d.ts +6 -0
  638. package/menu/menu.js +11 -11
  639. package/menu/types.d.ts +1 -0
  640. package/menu/useKeyboardNavigation.d.ts +6 -3
  641. package/menu/useKeyboardNavigation.js +21 -14
  642. package/menu/useStatefulMenu.d.ts +5 -2
  643. package/menu/useStatefulMenu.js +14 -8
  644. package/modal/adapter.d.ts +1 -1
  645. package/modal/index.d.ts +1 -1
  646. package/modal/index.js +1 -2
  647. package/modal/modal.js +4 -4
  648. package/modal/overrides.d.ts +2 -3
  649. package/modal/overrides.js +7 -9
  650. package/modal/styled-components.d.ts +1 -1
  651. package/modal/styled-components.js +8 -9
  652. package/number/Number.d.ts +3 -0
  653. package/number/Number.js +14 -0
  654. package/number/constants.d.ts +2 -0
  655. package/number/constants.js +7 -0
  656. package/number/index.d.ts +5 -0
  657. package/number/index.js +12 -0
  658. package/number/package.json +4 -0
  659. package/number/types.d.ts +6 -0
  660. package/number/types.js +2 -0
  661. package/number/useNumber.d.ts +2 -0
  662. package/number/useNumber.js +12 -0
  663. package/overrides/index.d.ts +1 -1
  664. package/overrides/index.js +2 -1
  665. package/overrides/mergeOverrides.d.ts +3 -2
  666. package/overrides/mergeOverrides.js +6 -4
  667. package/package.json +18 -12
  668. package/payment-card/basewebAdapters.d.ts +2 -0
  669. package/payment-card/basewebAdapters.js +27 -4
  670. package/payment-card/styled-components.js +24 -5
  671. package/payment-card/types.d.ts +4 -2
  672. package/phone-input/country-select-container.js +1 -1
  673. package/phone-input/country-select.js +4 -6
  674. package/phone-input/default-props.d.ts +6 -9
  675. package/phone-input/default-props.js +8 -9
  676. package/phone-input/flag-container.js +1 -1
  677. package/phone-input/phone-input.d.ts +0 -6
  678. package/phone-input/phone-input.js +20 -11
  679. package/phone-input/stateful-phone-input-container.js +4 -3
  680. package/phone-input/stateful-phone-input.d.ts +0 -6
  681. package/phone-input/styled-components.d.ts +9 -1
  682. package/phone-input/styled-components.js +22 -7
  683. package/phone-input/types.d.ts +2 -1
  684. package/phone-input/utils.d.ts +10 -3
  685. package/phone-input/utils.js +11 -5
  686. package/popover/adapter.d.ts +4 -3
  687. package/popover/adapter.js +16 -1
  688. package/popover/overrides.js +8 -19
  689. package/popover/popover.d.ts +6 -3
  690. package/popover/popover.js +12 -5
  691. package/popover/stateful-popover.js +2 -2
  692. package/popover/types.d.ts +10 -2
  693. package/popover/types.js +5 -4
  694. package/popover/utils.d.ts +12 -0
  695. package/popover/utils.js +11 -1
  696. package/progress/circular/styled-component.d.ts +1 -1
  697. package/progress/circular/styled-component.js +4 -4
  698. package/progress/linear/styled-component.d.ts +1 -1
  699. package/progress/linear/styled-component.js +5 -5
  700. package/radio/basewebAdapters.d.ts +8 -11
  701. package/radio/basewebAdapters.js +6 -3
  702. package/radio/radio.js +6 -5
  703. package/radio/styled-components.js +9 -11
  704. package/radio/types.d.ts +13 -6
  705. package/search/index.d.ts +1 -0
  706. package/search/index.js +3 -1
  707. package/search/search.d.ts +1 -1
  708. package/search/search.js +14 -5
  709. package/search/stateful-search.d.ts +3 -0
  710. package/search/stateful-search.js +19 -0
  711. package/search/styled-components.d.ts +1 -10
  712. package/search/styled-components.js +56 -25
  713. package/search/types.d.ts +8 -2
  714. package/select/adaptor.d.ts +1 -1
  715. package/select/base-select.d.ts +36 -16
  716. package/select/base-select.js +183 -86
  717. package/select/constants.d.ts +3 -0
  718. package/select/constants.js +4 -2
  719. package/select/default-props.d.ts +9 -5
  720. package/select/default-props.js +4 -1
  721. package/select/index.d.ts +4 -4
  722. package/select/index.js +4 -2
  723. package/select/locale.d.ts +4 -0
  724. package/select/mobileSelect/MobileSelect.js +3 -5
  725. package/select/mobileSelect/MobileSheet.js +3 -1
  726. package/select/multi-value.js +21 -11
  727. package/select/overlaySelect/OverlaySelect.js +9 -17
  728. package/select/overlaySelect/hooks/useControlRef.d.ts +9 -0
  729. package/select/overlaySelect/hooks/useControlRef.js +37 -0
  730. package/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +24 -0
  731. package/select/overlaySelect/{useOverlaySelectOverrides.js → hooks/useOverlaySelectOverrides.js} +31 -28
  732. package/select/overlaySelect/{usePopover.d.ts → hooks/usePopover.d.ts} +1 -1
  733. package/select/overlaySelect/{usePopover.js → hooks/usePopover.js} +2 -2
  734. package/select/overrides.d.ts +3 -1
  735. package/select/overrides.js +20 -14
  736. package/select/select-variants.js +2 -2
  737. package/select/select.d.ts +9 -5
  738. package/select/select.js +9 -3
  739. package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +118 -0
  740. package/select/selectMenuAdapter/CollapsibleSelectMenu.js +74 -0
  741. package/select/selectMenuAdapter/SelectMenuAdapter.d.ts +2 -32
  742. package/select/selectMenuAdapter/SelectMenuAdapter.js +11 -5
  743. package/select/selectMenuAdapter/SelectMenuItem.d.ts +8 -2
  744. package/select/selectMenuAdapter/SelectMenuItem.js +2 -4
  745. package/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +6 -0
  746. package/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +20 -0
  747. package/select/selectMenuAdapter/types.d.ts +42 -0
  748. package/select/selectMenuAdapter/types.js +2 -0
  749. package/select/stateful-select.d.ts +9 -5
  750. package/select/stateful-select.js +3 -3
  751. package/select/styled-component.d.ts +15 -4
  752. package/select/styled-component.js +58 -11
  753. package/select/types.d.ts +36 -9
  754. package/select/types.js +2 -1
  755. package/select/utils/default-filter-options.d.ts +2 -1
  756. package/select/utils/default-filter-options.js +6 -5
  757. package/select/utils/hidden-element.d.ts +6 -0
  758. package/select/utils/hidden-element.js +19 -0
  759. package/select/utils/merge-options.d.ts +2 -0
  760. package/select/utils/merge-options.js +22 -0
  761. package/select/utils/test-utils.d.ts +1 -0
  762. package/select/utils/test-utils.js +11 -0
  763. package/slider/mark.d.ts +3 -3
  764. package/slider/slider.js +2 -1
  765. package/slider/stateful-slider.js +1 -1
  766. package/slider/styled-components.js +4 -4
  767. package/slider/types.d.ts +9 -2
  768. package/snackbar/Snackbar.js +12 -12
  769. package/snackbar/styled-component.js +9 -6
  770. package/spacewebProvider/CustomBaseProvider.js +1 -0
  771. package/spacewebProvider/SpacewebProvider.d.ts +3 -1
  772. package/spacewebProvider/SpacewebProvider.js +8 -8
  773. package/stack/stack.js +6 -13
  774. package/style/_buildUtils.d.ts +1 -1
  775. package/style/_buildUtils.js +3 -1
  776. package/style/_parseStyle.js +12 -7
  777. package/style/useMemoizedStyletron.d.ts +1 -1
  778. package/style/useMemoizedStyletron.js +6 -1
  779. package/styleEngine/styleEngine.d.ts +1 -2
  780. package/switch/__test__/switch.spec.js +13 -0
  781. package/switch/styled-components.js +14 -21
  782. package/switch/switch.js +5 -2
  783. package/switch/types.d.ts +8 -11
  784. package/tag/avatar-tag.js +23 -16
  785. package/tag/styled-components.js +32 -27
  786. package/tag/tag.js +19 -11
  787. package/tag/types.d.ts +2 -2
  788. package/tag/utils.d.ts +50 -0
  789. package/tag/utils.js +67 -1
  790. package/textarea/basewebAdapters.js +3 -3
  791. package/textarea/styled-components.d.ts +1 -1
  792. package/textarea/textarea.js +3 -7
  793. package/textarea/types.d.ts +7 -5
  794. package/theme/Provider.d.ts +10 -0
  795. package/theme/Provider.js +65 -0
  796. package/theme/context.d.ts +1 -10
  797. package/theme/context.js +1 -61
  798. package/theme/index.d.ts +1 -0
  799. package/theme/index.js +1 -0
  800. package/themes/index.js +1 -1
  801. package/themes/responsive-theme.d.ts +2 -2
  802. package/time-picker/TimePicker.d.ts +1 -6
  803. package/time-picker/TimePicker.js +4 -4
  804. package/time-picker/types.d.ts +3 -1
  805. package/time-range-picker/RangeSelector.js +5 -4
  806. package/time-range-picker/RangeSelectorContainer.js +26 -26
  807. package/time-range-picker/TimeRangeList.js +8 -1
  808. package/time-range-picker/TimeRangePicker.js +25 -16
  809. package/time-range-picker/index.d.ts +1 -1
  810. package/time-range-picker/index.js +4 -1
  811. package/time-range-picker/locale.d.ts +3 -0
  812. package/time-range-picker/types.d.ts +17 -3
  813. package/time-range-picker/utils.d.ts +47 -18
  814. package/time-range-picker/utils.js +98 -17
  815. package/time-zone-picker/TimezonePicker.d.ts +1 -6
  816. package/time-zone-picker/TimezonePicker.js +5 -7
  817. package/time-zone-picker/types.d.ts +2 -0
  818. package/tooltip/disabled-tooltip-container.d.ts +26 -1
  819. package/tooltip/overrides.js +1 -2
  820. package/tooltip/stateful-tooltip-container.d.ts +26 -1
  821. package/tooltip/stateful-tooltip.d.ts +27 -1
  822. package/tooltip/stateful-tooltip.js +2 -2
  823. package/tooltip/tooltip.d.ts +1 -1
  824. package/tooltip/tooltip.js +7 -4
  825. package/tooltip/types.d.ts +12 -2
  826. package/tsconfig.tsbuildinfo +1 -1
  827. package/types.d.ts +5 -3
  828. package/typography/Typography.js +14 -1
  829. package/typography/constants.d.ts +56 -0
  830. package/typography/constants.js +57 -1
  831. package/typography/index.d.ts +1 -0
  832. package/typography/index.js +3 -1
  833. package/typography/styled-components.js +11 -3
  834. package/typography/types.d.ts +1 -1
  835. package/utils/intlNumberFormatUtils/index.d.ts +7 -0
  836. package/utils/intlNumberFormatUtils/index.js +40 -0
  837. package/utils/intlNumberFormatUtils/types.d.ts +21 -0
  838. package/utils/intlNumberFormatUtils/types.js +9 -0
  839. package/utils/package.json +4 -0
  840. package/video/Video.js +4 -2
  841. package/video/types.d.ts +2 -0
  842. package/esm/icon/components/chevron-right-solid.d.ts +0 -3
  843. package/esm/icon/components/chevron-right-solid.js +0 -6
  844. package/esm/phone-input/virtualized-country-select-dropdown.d.ts +0 -31
  845. package/esm/phone-input/virtualized-country-select-dropdown.js +0 -33
  846. package/esm/select/overlaySelect/useOverlaySelectOverrides.d.ts +0 -14
  847. package/esm/style/_escapeClassName.d.ts +0 -6
  848. package/esm/style/_escapeClassName.js +0 -6
  849. package/icon/components/chevron-right-solid.d.ts +0 -3
  850. package/icon/components/chevron-right-solid.js +0 -9
  851. package/phone-input/virtualized-country-select-dropdown.d.ts +0 -31
  852. package/phone-input/virtualized-country-select-dropdown.js +0 -35
  853. package/select/overlaySelect/useOverlaySelectOverrides.d.ts +0 -14
  854. package/style/_escapeClassName.d.ts +0 -6
  855. package/style/_escapeClassName.js +0 -9
@@ -2,23 +2,30 @@ import { __assign, __rest } from "tslib";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback, useMemo } from 'react';
4
4
  import { Avatar } from '../avatar';
5
- import { borderRadius } from '../helpers/longHandHelpers';
6
- import { getComponentTheme } from '../helpers/themeHelpers';
7
5
  import Tag from './tag';
8
- var tagRootStyles = function (_a) {
9
- var theme = _a.theme, px2rem = _a.px2rem;
10
- var tagBorderRadius = getComponentTheme(theme, 'multiSelect').tagBorderRadius;
11
- return __assign(__assign({}, (tagBorderRadius && borderRadius(tagBorderRadius))), { marginLeft: px2rem(4) });
12
- };
13
- var avatarRootStyles = function (_a) {
14
- var theme = _a.theme;
15
- var avatarMarginLeft = getComponentTheme(theme, 'tag').avatarMarginLeft;
16
- return { marginLeft: avatarMarginLeft };
17
- };
6
+ import { useStyle } from '../style';
7
+ import { getDefaultTagSize, getTagSizeTheme } from './utils';
18
8
  var AvatarTag = function (props) {
19
- var avatarProps = props.avatarProps, startEnhancer = props.startEnhancer, className = props.className, tagProps = __rest(props, ["avatarProps", "startEnhancer", "className"]);
20
- var startEnhancerOverride = useCallback(function (sharedProps) { return (_jsxs(_Fragment, { children: [typeof startEnhancer === 'function' ? startEnhancer(sharedProps) : startEnhancer, _jsx(Avatar, __assign({ size: "sm" }, avatarProps, { className: [avatarRootStyles, avatarProps === null || avatarProps === void 0 ? void 0 : avatarProps.className] }), void 0)] }, void 0)); }, [avatarProps, startEnhancer]);
21
- var mergedClassName = useMemo(function () { return [tagRootStyles, className]; }, [className]);
22
- return _jsx(Tag, __assign({ size: "lg", startEnhancer: startEnhancerOverride, className: mergedClassName }, tagProps), void 0);
9
+ var avatarProps = props.avatarProps, startEnhancer = props.startEnhancer, className = props.className, _size = props.size, tagProps = __rest(props, ["avatarProps", "startEnhancer", "className", "size"]);
10
+ var theme = useStyle().theme;
11
+ var size = _size !== null && _size !== void 0 ? _size : getDefaultTagSize(theme);
12
+ var avatarIconSize = getTagSizeTheme(theme, size).avatarIconSize;
13
+ var customTagOverrides = {
14
+ StartEnhancer: {
15
+ style: function (_a, _b) {
16
+ var $size = _b.$size;
17
+ return ($size === 'lg' ? { marginLeft: '8px' } : {});
18
+ },
19
+ },
20
+ Action: {
21
+ style: function (_a, _b) {
22
+ var $size = _b.$size;
23
+ return ($size === 'lg' ? { marginRight: '4px' } : {});
24
+ },
25
+ },
26
+ };
27
+ var startEnhancerOverride = useCallback(function (sharedProps) { return (_jsxs(_Fragment, { children: [typeof startEnhancer === 'function' ? startEnhancer(sharedProps) : startEnhancer, _jsx(Avatar, __assign({ size: avatarIconSize }, avatarProps, { className: [avatarProps === null || avatarProps === void 0 ? void 0 : avatarProps.className] }), void 0)] }, void 0)); }, [avatarProps, startEnhancer, avatarIconSize]);
28
+ var mergedClassName = useMemo(function () { return [className]; }, [className]);
29
+ return (_jsx(Tag, __assign({ overrides: customTagOverrides, size: size, startEnhancer: startEnhancerOverride, className: mergedClassName }, tagProps), void 0));
23
30
  };
24
31
  export default AvatarTag;
@@ -1,46 +1,51 @@
1
1
  import { __assign } from "tslib";
2
2
  import { borderRadius as borderRadiusLonghand, borderStyle, borderColor, borderWidth, margin, } from '../helpers/longHandHelpers';
3
- import { getComponentSizeTheme, getComponentTheme } from '../helpers/themeHelpers';
4
3
  import { getFocusVisibleStyles } from '../helpers/commonStyles';
5
4
  import { styled } from '../style';
6
5
  import { getIntentStyles } from './intentStyles';
7
- export var StyledStartEnhancer = styled('div', 'inline-flex items-center', function (_a) {
8
- var px2rem = _a.px2rem;
9
- return ({
10
- marginRight: px2rem(6),
11
- });
6
+ import { getTagSizeTheme } from './utils';
7
+ export var StyledStartEnhancer = styled('div', 'inline-flex items-center', function (_a, _b) {
8
+ var px2rem = _a.px2rem, theme = _a.theme;
9
+ var $size = _b.$size;
10
+ var _c = getTagSizeTheme(theme, $size), startEnhancerMarginLeft = _c.startEnhancerMarginLeft, startEnhancerMarginRight = _c.startEnhancerMarginRight;
11
+ return {
12
+ marginRight: startEnhancerMarginRight,
13
+ marginLeft: startEnhancerMarginLeft,
14
+ };
12
15
  });
13
16
  export var StyledRoot = styled('span', 'inline-flex items-center box-border', function (utils, _a) {
14
17
  var _b;
15
18
  var $withStartEnhancer = _a.$withStartEnhancer, $size = _a.$size, $closeable = _a.$closeable, $intent = _a.$intent, $variant = _a.$variant, $clickable = _a.$clickable, $isFocusVisible = _a.$isFocusVisible;
16
- var direction = utils.direction, theme = utils.theme, px2rem = utils.px2rem;
17
- var paddingStartDir = direction === 'rtl' ? 'paddingRight' : 'paddingLeft';
18
- var paddingEndDir = direction === 'rtl' ? 'paddingLeft' : 'paddingRight';
19
- var borderRadius = getComponentTheme(theme, 'tag').borderRadius;
20
- var height = getComponentSizeTheme(theme, 'tag', $size, 'lg').height;
21
- var paddingStart = $size === 'sm' ? px2rem(10) : theme.padding['3'];
22
- if ($withStartEnhancer)
23
- paddingStart = theme.padding['1'];
24
- var paddingEnd = $closeable ? '0' : paddingStart;
19
+ var theme = utils.theme;
20
+ var paddingStartDir = 'paddingLeft';
21
+ var paddingEndDir = 'paddingRight';
22
+ var _c = getTagSizeTheme(theme, $size), height = _c.height, borderRadius = _c.borderRadius, paddingX = _c.paddingX, paddingY = _c.paddingY;
23
+ var paddingStart = $withStartEnhancer ? '0' : paddingX;
24
+ var paddingEnd = $closeable ? '0' : paddingX;
25
25
  var typographyStyles = $intent === 'default'
26
26
  ? __assign(__assign({}, theme.typography.l2), { fontWeight: theme.fontWeight.normal }) : __assign(__assign({}, theme.typography.l2), { fontWeight: theme.fontWeight.semibold });
27
27
  var hoverStyles = __assign({ boxShadow: 'inset 0px 0px 100px rgba(0, 0, 0, 0.08)' }, borderColor(theme.spr.border06));
28
28
  var activeStyles = __assign({}, borderColor(theme.spr.interactive01));
29
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign((_b = { height: height }, _b[paddingStartDir] = paddingStart, _b[paddingEndDir] = paddingEnd, _b.maxWidth = 'none', _b), typographyStyles), margin(0)), borderStyle('solid')), borderColor(theme.borderColor.transparent)), borderWidth('1px')), borderRadiusLonghand(borderRadius)), getIntentStyles(theme, $intent, $variant)), ($clickable && __assign({ cursor: 'pointer',
29
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign((_b = { height: height }, _b[paddingStartDir] = paddingStart, _b[paddingEndDir] = paddingEnd, _b.paddingTop = paddingY, _b.paddingBottom = paddingY, _b.maxWidth = 'none', _b), typographyStyles), margin(0)), borderStyle('solid')), borderColor(theme.borderColor.transparent)), borderWidth('1px')), borderRadiusLonghand(borderRadius)), getIntentStyles(theme, $intent, $variant)), ($clickable && __assign({ cursor: 'pointer',
30
30
  // temporary boxShadow onHover
31
31
  ':hover': hoverStyles, ':active': activeStyles }, getFocusVisibleStyles(utils)))), { ':focus': __assign({}, ($isFocusVisible && hoverStyles)) });
32
32
  });
33
- export var StyledAction = styled('span', 'cursor-pointer inline-flex items-center justify-center pl-2 pr-2', function (_a) {
34
- var _b;
35
- var px2rem = _a.px2rem, direction = _a.direction;
36
- var marginStartDir = direction === 'rtl' ? 'marginRight' : 'marginLeft';
37
- return _b = {},
38
- _b[marginStartDir] = px2rem(6),
39
- _b;
33
+ export var StyledAction = styled('span', 'cursor-pointer inline-flex items-center justify-center', function (_a, _b) {
34
+ var theme = _a.theme;
35
+ var $size = _b.$size;
36
+ var clearableIconMarginX = getTagSizeTheme(theme, $size).clearableIconMarginX;
37
+ return {
38
+ marginRight: clearableIconMarginX,
39
+ marginLeft: clearableIconMarginX,
40
+ };
40
41
  });
41
- export var StyledText = styled('span', 'truncate', function (_a) {
42
- var px2rem = _a.px2rem;
43
- return ({
42
+ export var StyledText = styled('span', 'truncate', function (_a, _b) {
43
+ var px2rem = _a.px2rem, theme = _a.theme;
44
+ var $size = _b.$size;
45
+ var _c = getTagSizeTheme(theme, $size), fontSize = _c.fontSize, lineHeight = _c.lineHeight;
46
+ return {
44
47
  maxWidth: px2rem(128),
45
- });
48
+ fontSize: fontSize,
49
+ lineHeight: lineHeight,
50
+ };
46
51
  });
package/esm/tag/tag.js CHANGED
@@ -1,18 +1,21 @@
1
1
  import { __assign, __read, __rest } from "tslib";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef, useCallback } from 'react';
4
+ import _omit from 'lodash/omit';
4
5
  import { IconButton } from '../button';
5
- import { getComponentTheme } from '../helpers/themeHelpers';
6
6
  import { useFocusVisible } from '../hooks/useFocusVisible';
7
7
  import CloseIcon from '../icon/components/close';
8
8
  import { useOverrides } from '../overrides';
9
9
  import { useStyle } from '../style';
10
10
  import { StyledAction, StyledRoot, StyledStartEnhancer, StyledText } from './styled-components';
11
- import { getTextFromChildren } from './utils';
11
+ import { getDefaultTagSize, getTagSizeTheme, getTextFromChildren } from './utils';
12
+ import { useLocale } from '../locale';
13
+ import { borderRadius } from '../helpers/longHandHelpers';
12
14
  var Tag = forwardRef(function (props, ref) {
13
- var children = props.children, _a = props.closeable, closeable = _a === void 0 ? true : _a, _b = props.size, size = _b === void 0 ? 'lg' : _b, _c = props.isFocused, isFocused = _c === void 0 ? false : _c, _d = props.isHovered, isHovered = _d === void 0 ? false : _d, onActionClick = props.onActionClick, onActionKeyDown = props.onActionKeyDown, _e = props.onClick, onClick = _e === void 0 ? null : _e, _f = props.onKeyDown, onKeyDown = _f === void 0 ? null : _f, overrides = props.overrides, title = props.title, _g = props.variant, variant = _g === void 0 ? 'light' : _g, _h = props.intent, intent = _h === void 0 ? 'default' : _h, className = props.className, startEnhancer = props.startEnhancer, restProps = __rest(props, ["children", "closeable", "size", "isFocused", "isHovered", "onActionClick", "onActionKeyDown", "onClick", "onKeyDown", "overrides", "title", "variant", "intent", "className", "startEnhancer"]);
14
- var _j = useFocusVisible(), $isFocusVisible = _j.$isFocusVisible, onBlur = _j.onBlur, onFocus = _j.onFocus;
15
+ var children = props.children, _a = props.closeable, closeable = _a === void 0 ? true : _a, _size = props.size, _b = props.isFocused, isFocused = _b === void 0 ? false : _b, _c = props.isHovered, isHovered = _c === void 0 ? false : _c, onActionClick = props.onActionClick, onActionKeyDown = props.onActionKeyDown, _d = props.onClick, onClick = _d === void 0 ? null : _d, _e = props.onKeyDown, onKeyDown = _e === void 0 ? null : _e, overrides = props.overrides, title = props.title, _f = props.variant, variant = _f === void 0 ? 'light' : _f, _g = props.intent, intent = _g === void 0 ? 'default' : _g, className = props.className, startEnhancer = props.startEnhancer, restProps = __rest(props, ["children", "closeable", "size", "isFocused", "isHovered", "onActionClick", "onActionKeyDown", "onClick", "onKeyDown", "overrides", "title", "variant", "intent", "className", "startEnhancer"]);
16
+ var _h = useFocusVisible(), $isFocusVisible = _h.$isFocusVisible, onBlur = _h.onBlur, onFocus = _h.onFocus;
15
17
  var theme = useStyle().theme;
18
+ var size = _size !== null && _size !== void 0 ? _size : getDefaultTagSize(theme);
16
19
  var handleKeyDown = useCallback(function (event) {
17
20
  if (event.currentTarget !== event.target) {
18
21
  return;
@@ -29,11 +32,11 @@ var Tag = forwardRef(function (props, ref) {
29
32
  onKeyDown(event);
30
33
  }
31
34
  }, [closeable, onActionClick, onActionKeyDown, onClick, onKeyDown]);
32
- var _k = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Root, StyledRoot), 2), Root = _k[0], rootProps = _k[1];
33
- var _l = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Action, StyledAction), 2), Action = _l[0], actionProps = _l[1];
34
- var _m = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.ActionIcon, CloseIcon), 2), ActionIcon = _m[0], actionIconProps = _m[1];
35
- var _o = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Text, StyledText), 2), Text = _o[0], textProps = _o[1];
36
- var _p = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.StartEnhancer, StyledStartEnhancer), 2), StartEnhancer = _p[0], startEnhancerProps = _p[1];
35
+ var _j = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Root, StyledRoot), 2), Root = _j[0], rootProps = _j[1];
36
+ var _k = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Action, StyledAction), 2), Action = _k[0], actionProps = _k[1];
37
+ var _l = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.ActionIcon, CloseIcon), 2), ActionIcon = _l[0], actionIconProps = _l[1];
38
+ var _m = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.Text, StyledText), 2), Text = _m[0], textProps = _m[1];
39
+ var _o = __read(useOverrides(overrides === null || overrides === void 0 ? void 0 : overrides.StartEnhancer, StyledStartEnhancer), 2), StartEnhancer = _o[0], startEnhancerProps = _o[1];
37
40
  var clickable = typeof onClick === 'function';
38
41
  var sharedProps = {
39
42
  $clickable: clickable,
@@ -47,9 +50,14 @@ var Tag = forwardRef(function (props, ref) {
47
50
  $intent: intent,
48
51
  };
49
52
  var titleText = title || getTextFromChildren(children);
50
- var actionSize = 8;
51
- var actionButtonBorderRadius = getComponentTheme(theme, 'tag').actionButtonBorderRadius;
52
- return (_jsxs(Root, __assign({ ref: ref, "data-spaceweb": "tag", role: clickable ? 'button' : null, tabIndex: clickable ? 0 : null, onFocus: onFocus, onBlur: onBlur, className: className, onClick: onClick, onKeyDown: handleKeyDown }, sharedProps, restProps, rootProps, { children: [startEnhancer && (_jsx(StartEnhancer, __assign({}, sharedProps, startEnhancerProps, { children: typeof startEnhancer === 'function' ? startEnhancer(sharedProps) : startEnhancer }), void 0)), _jsx(Text, __assign({ title: titleText }, sharedProps, textProps, { children: children }), void 0), closeable ? (_jsx(Action, __assign({ "aria-hidden": true, role: "presentation", onClick: onActionClick }, sharedProps, actionProps, { children: _jsx(IconButton, __assign({ type: "button", size: "xxxs", shape: "square", className: "hover:spr-clr-grey" }, { children: _jsx(ActionIcon, __assign({}, actionIconProps), void 0) }), void 0) }), void 0)) : null] }), void 0));
53
+ var _p = getTagSizeTheme(theme, size), clearableIconSize = _p.clearableIconSize, clearableIconButtonSize = _p.clearableIconButtonSize, clearableIconButtonBorderRadius = _p.clearableIconButtonBorderRadius;
54
+ var actionIconButtonOverrides = {
55
+ BaseButton: {
56
+ style: __assign({ height: clearableIconButtonSize, width: clearableIconButtonSize }, borderRadius(clearableIconButtonBorderRadius)),
57
+ },
58
+ };
59
+ var locale = useLocale();
60
+ return (_jsxs(Root, __assign({ ref: ref, "data-spaceweb": "tag", role: clickable ? 'button' : null, tabIndex: clickable ? 0 : null, onFocus: onFocus, onBlur: onBlur, className: className, onClick: onClick, onKeyDown: handleKeyDown }, sharedProps, restProps, rootProps, { children: [startEnhancer && (_jsx(StartEnhancer, __assign({}, sharedProps, startEnhancerProps, { children: typeof startEnhancer === 'function' ? startEnhancer(sharedProps) : startEnhancer }), void 0)), _jsx(Text, __assign({ title: titleText }, sharedProps, textProps, { children: children }), void 0), closeable ? (_jsx(Action, __assign({ "aria-hidden": true, role: "presentation", onClick: onActionClick }, sharedProps, _omit(actionProps, 'tabIndex'), { children: _jsx(IconButton, __assign({ shape: "square", type: "button", className: "hover:spr-clr-grey", "aria-label": locale.tag.closeAriaLabel, overrides: actionIconButtonOverrides, tabIndex: actionProps === null || actionProps === void 0 ? void 0 : actionProps.tabIndex }, { children: _jsx(ActionIcon, __assign({ size: clearableIconSize }, actionIconProps), void 0) }), void 0) }), void 0)) : null] }), void 0));
53
61
  });
54
62
  Tag.displayName = 'Tag';
55
63
  export default Tag;
@@ -4,7 +4,7 @@ import { Override } from '../overrides';
4
4
  import { ClassName } from '../types';
5
5
  export declare type Intent = 'success' | 'error' | 'warning' | 'info' | 'default';
6
6
  export declare type Variant = 'solid' | 'light';
7
- export declare type Size = 'sm' | 'lg';
7
+ export declare type Size = 'xxxs' | 'sm' | 'lg';
8
8
  export declare type TagOverrides = {
9
9
  Root?: Override<SharedProps & Record<string, any>>;
10
10
  Action?: Override<SharedProps & Record<string, any>>;
@@ -34,7 +34,7 @@ export declare type TagProps = {
34
34
  variant?: Variant;
35
35
  size?: Size;
36
36
  };
37
- export declare type AvatarTagProps = Omit<TagProps, 'size' | 'overrides'> & {
37
+ export declare type AvatarTagProps = Omit<TagProps, 'overrides'> & {
38
38
  avatarProps: AvatarProps;
39
39
  overrides?: TagProps['overrides'] & {
40
40
  StartEnhancer?: Override<Record<string, any>>;
@@ -1,2 +1,52 @@
1
1
  import * as React from 'react';
2
+ import { Theme } from '@sprinklrjs/spaceweb-themes/types';
2
3
  export declare function getTextFromChildren(children: React.ReactNode): string | null;
4
+ export declare const getDefaultTagSize: (theme: Theme) => 'xxxs' | 'sm' | 'lg';
5
+ export declare const tagSizeMap: {
6
+ xxxs: {
7
+ paddingY: string;
8
+ paddingX: string;
9
+ height: string;
10
+ fontSize: string;
11
+ lineHeight: string;
12
+ borderRadius: string;
13
+ avatarIconSize: number;
14
+ clearableIconSize: string;
15
+ clearableIconButtonSize: string;
16
+ clearableIconButtonBorderRadius: string;
17
+ clearableIconMarginX: string;
18
+ startEnhancerMarginLeft: string;
19
+ startEnhancerMarginRight: string;
20
+ };
21
+ sm: {
22
+ paddingY: string;
23
+ paddingX: string;
24
+ height: string;
25
+ fontSize: string;
26
+ lineHeight: string;
27
+ borderRadius: string;
28
+ avatarIconSize: number;
29
+ clearableIconSize: string;
30
+ clearableIconButtonSize: string;
31
+ clearableIconButtonBorderRadius: string;
32
+ clearableIconMarginX: string;
33
+ startEnhancerMarginLeft: string;
34
+ startEnhancerMarginRight: string;
35
+ };
36
+ lg: {
37
+ paddingY: string;
38
+ paddingX: string;
39
+ height: string;
40
+ fontSize: string;
41
+ lineHeight: string;
42
+ borderRadius: string;
43
+ avatarIconSize: number;
44
+ clearableIconSize: string;
45
+ clearableIconButtonSize: string;
46
+ clearableIconButtonBorderRadius: string;
47
+ clearableIconMarginX: string;
48
+ startEnhancerMarginLeft: string;
49
+ startEnhancerMarginRight: string;
50
+ };
51
+ };
52
+ export declare const getTagSizeTheme: (theme: any, size: any) => any;
package/esm/tag/utils.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { getComponentSizeTheme } from '../helpers/themeHelpers';
2
3
  var JOINABLE_TYPES = new Set(['string', 'number']);
3
4
  // Checks the children of a React component to ensure every value is a number
4
5
  // or a string. If they are, they are joined and returned. Useful for collecting
@@ -17,3 +18,66 @@ export function getTextFromChildren(children) {
17
18
  // <Tag>foo {'bar'} baz</Tag> => 'foo bar baz'
18
19
  return childList.join('');
19
20
  }
21
+ export var getDefaultTagSize = function (theme) {
22
+ switch (theme.density) {
23
+ case 'COMFORTABLE':
24
+ return 'sm';
25
+ case 'SPACIOUS':
26
+ return 'sm';
27
+ case 'COMPACT':
28
+ return 'xxxs';
29
+ default:
30
+ return 'lg';
31
+ }
32
+ };
33
+ export var tagSizeMap = {
34
+ xxxs: {
35
+ paddingY: '1px',
36
+ paddingX: '6px',
37
+ height: '18px',
38
+ fontSize: '13px',
39
+ lineHeight: '16px',
40
+ borderRadius: '4px',
41
+ avatarIconSize: 12,
42
+ clearableIconSize: '8px',
43
+ clearableIconButtonSize: '14px',
44
+ clearableIconButtonBorderRadius: '2px',
45
+ clearableIconMarginX: '3px',
46
+ startEnhancerMarginLeft: '6px',
47
+ startEnhancerMarginRight: '2px',
48
+ },
49
+ sm: {
50
+ paddingY: '2px',
51
+ paddingX: '8px',
52
+ height: '22px',
53
+ fontSize: '14px',
54
+ lineHeight: '18px',
55
+ borderRadius: '5px',
56
+ avatarIconSize: 14,
57
+ clearableIconSize: '9px',
58
+ clearableIconButtonSize: '16px',
59
+ clearableIconButtonBorderRadius: '3px',
60
+ clearableIconMarginX: '5px',
61
+ startEnhancerMarginLeft: '8px',
62
+ startEnhancerMarginRight: '3px',
63
+ },
64
+ lg: {
65
+ paddingY: '7px',
66
+ paddingX: '12px',
67
+ height: '34px',
68
+ fontSize: '16px',
69
+ lineHeight: '18px',
70
+ borderRadius: '6px',
71
+ avatarIconSize: 20,
72
+ clearableIconSize: '10px',
73
+ clearableIconButtonSize: '18px',
74
+ clearableIconButtonBorderRadius: '3px',
75
+ clearableIconMarginX: '7px',
76
+ startEnhancerMarginLeft: '12px',
77
+ startEnhancerMarginRight: '4px',
78
+ },
79
+ };
80
+ export var getTagSizeTheme = function (theme, size) {
81
+ var _a, _b;
82
+ return (_b = (_a = getComponentSizeTheme(theme, 'tag', size, getDefaultTagSize(theme))) !== null && _a !== void 0 ? _a : tagSizeMap[size]) !== null && _b !== void 0 ? _b : tagSizeMap[getDefaultTagSize(theme)];
83
+ };
@@ -1,6 +1,6 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import { useMemo } from 'react';
3
- import { borderStyle } from '../helpers/longHandHelpers';
3
+ import { borderRadius, borderStyle } from '../helpers/longHandHelpers';
4
4
  import { getTextareaInputContainerStyles, getTextareaInputStyles } from './styled-components';
5
5
  import { useConvertOverrides } from '../helpers/baseui/useConvertOverrides';
6
6
  import { add$props } from '../helpers';
@@ -15,7 +15,7 @@ function useTextareaAdapter(props) {
15
15
  var handleChange = useDebouncedEventHandler((_a = props.debouncedOnChange) !== null && _a !== void 0 ? _a : _noop, props.onChange, props.debounceInterval || 200);
16
16
  var overrides = useConvertOverrides({
17
17
  Root: {
18
- style: [__assign({ backgroundColor: 'transparent' }, borderStyle('none'))],
18
+ style: [__assign(__assign({ backgroundColor: 'transparent' }, borderStyle('none')), borderRadius('0px'))], // overriding baseweb borderRadius
19
19
  },
20
20
  InputContainer: {
21
21
  style: inputContainerStyles,
@@ -23,10 +23,10 @@ function useTextareaAdapter(props) {
23
23
  },
24
24
  Input: {
25
25
  style: getTextareaInputStyles,
26
- props: __assign({ onChange: handleChange, $autoSize: autoSize }, sharedProps),
26
+ props: __assign({ $autoSize: autoSize, 'aria-required': restProps['aria-required'] }, sharedProps),
27
27
  },
28
28
  }, restProps.overrides);
29
29
  var rows = autoSize && !restProps.rows ? 1 : restProps.rows;
30
- return __assign(__assign({}, restProps), { overrides: overrides, rows: rows });
30
+ return __assign(__assign({}, restProps), { overrides: overrides, rows: rows, onChange: handleChange });
31
31
  }
32
32
  export default useTextareaAdapter;
@@ -1,4 +1,4 @@
1
- export declare const getTextareaInputStyles: (import("..").StyleFn<import("../input").SharedProps> | (({}: {}, { $autoSize }: {
1
+ export declare const getTextareaInputStyles: (import("..").StyleFn<Partial<Pick<import("../input").SharedProps, "$disabled" | "$size" | "$variant">>> | (({}: {}, { $autoSize }: {
2
2
  $autoSize: any;
3
3
  }) => "overflow-hidden" | "resize") | (({ theme }: {
4
4
  theme: any;
@@ -1,11 +1,12 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Textarea as BaseTextarea, StatefulTextarea as BaseStatefulTextarea } from 'baseui/textarea';
3
+ import { Textarea as BaseTextarea, StatefulTextarea as BaseStatefulTextarea, } from 'baseui/textarea';
4
4
  import useTextareaAdapter from './basewebAdapters';
5
5
  import useAutoFocus from '../hooks/useAutoFocus';
6
6
  import useAutoSizeTextarea from './useAutoSizeTextarea';
7
7
  // @ts-ignore
8
8
  BaseTextarea.displayName = 'BaseUITextarea';
9
+ // @ts-ignore
9
10
  BaseStatefulTextarea.displayName = 'BaseUIStatefulTextarea';
10
11
  export var Textarea = function (props) {
11
12
  var autoFocus = props.autoFocus, restProps = __rest(props, ["autoFocus"]);
@@ -16,18 +17,13 @@ export var Textarea = function (props) {
16
17
  inputRef: autoFocusRef,
17
18
  });
18
19
  var adaptedProps = useTextareaAdapter(restProps);
19
- return _jsx(BaseTextarea, __assign({}, adaptedProps, { inputRef: inputRef }), void 0);
20
+ return (_jsx(BaseTextarea, __assign({}, adaptedProps, { overrides: adaptedProps.overrides, inputRef: inputRef }), void 0));
20
21
  };
21
22
  Textarea.displayName = 'Textarea';
22
23
  export var StatefulTextarea = function (props) {
23
24
  var autoFocus = props.autoFocus, restProps = __rest(props, ["autoFocus"]);
24
25
  var autoFocusRef = useAutoFocus({ autoFocus: autoFocus, inputRef: restProps.inputRef });
25
- var inputRef = useAutoSizeTextarea({
26
- value: restProps.value,
27
- autoSize: restProps.autoSize,
28
- inputRef: autoFocusRef,
29
- });
30
26
  var adaptedProps = useTextareaAdapter(restProps);
31
- return _jsx(BaseStatefulTextarea, __assign({}, adaptedProps, { inputRef: inputRef }), void 0);
27
+ return (_jsx(BaseStatefulTextarea, __assign({}, adaptedProps, { overrides: adaptedProps.overrides, inputRef: autoFocusRef }), void 0));
32
28
  };
33
29
  StatefulTextarea.displayName = 'StatefulTextarea';
@@ -1,27 +1,29 @@
1
+ import { Ref } from 'react';
1
2
  import { TextareaProps as BaseTextareaProps, StatefulTextareaProps as BaseStatefulTextareaProps } from 'baseui/textarea';
2
3
  import { InputSize, InputVariant, FocusPosition } from '../input';
3
4
  import { Intent, SpacewebComponentProps } from '../types';
4
5
  import { Override } from '../overrides';
5
- export declare type TextareaProps = SpacewebComponentProps<Omit<BaseTextareaProps, 'size' | 'overrides' | 'autoFocus'>> & {
6
+ export declare type TextareaProps = SpacewebComponentProps<Omit<BaseTextareaProps, 'size' | 'overrides' | 'autoFocus' | 'inputRef'>> & {
6
7
  size?: InputSize;
7
8
  variant?: InputVariant;
8
9
  overrides?: {
9
- [key in keyof BaseTextareaProps['overrides']]?: Override<any>;
10
+ [key in keyof Required<BaseTextareaProps>['overrides']]?: Override<any>;
10
11
  };
11
12
  intent?: Intent;
12
13
  debouncedOnChange?: BaseTextareaProps['onChange'];
13
14
  debounceInterval?: number;
14
15
  autoFocus?: FocusPosition;
15
16
  autoSize?: boolean;
17
+ inputRef?: Ref<HTMLTextAreaElement>;
16
18
  };
17
- export declare type StatefulTextareaProps = SpacewebComponentProps<Omit<BaseStatefulTextareaProps, 'size' | 'overrides' | 'autoFocus'>> & {
19
+ export declare type StatefulTextareaProps = SpacewebComponentProps<Omit<BaseStatefulTextareaProps, 'size' | 'overrides' | 'autoFocus' | 'inputRef'>> & {
18
20
  size?: InputSize;
19
21
  variant?: InputVariant;
20
22
  overrides?: {
21
- [key in keyof BaseStatefulTextareaProps['overrides']]?: Override<any>;
23
+ [key in keyof Required<BaseStatefulTextareaProps>['overrides']]?: Override<any>;
22
24
  };
23
25
  debouncedOnChange?: BaseStatefulTextareaProps['onChange'];
24
26
  debounceInterval?: number;
25
27
  autoFocus?: FocusPosition;
26
- autoSize?: boolean;
28
+ inputRef?: Ref<HTMLTextAreaElement>;
27
29
  };
@@ -0,0 +1,10 @@
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
+ import { ThemeProviderT } from './types';
3
+ import type { Density } from '@sprinklrjs/spaceweb-themes/types';
4
+ declare type Props = PropsWithChildren<{
5
+ theme?: ThemeProviderT;
6
+ containerElement?: HTMLElement | null;
7
+ density?: Density;
8
+ }>;
9
+ export declare const ThemeProvider: (props: Props) => ReactElement;
10
+ export {};
@@ -0,0 +1,61 @@
1
+ import { __assign, __read } from "tslib";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useMemo, useState } from 'react';
4
+ import _merge from 'lodash/merge';
5
+ import { ThemeProvider as BaseUIThemProvider } from 'baseui';
6
+ import usePrevious from '../hooks/usePrevious';
7
+ import useMemoizedStyletron from '../style/useMemoizedStyletron';
8
+ import SPACEWEB_THEME_VS_BASEUI_THEME from '../themes';
9
+ import { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect';
10
+ import { themeContext, useTheme } from './context';
11
+ var THEME_NAMES = ['hyperspace-light', 'space-light', 'space-dark', 'hyperspace-dark'];
12
+ var addDensityToTheme = function (theme, density) {
13
+ var _a;
14
+ return (__assign(__assign({}, theme), { theme: __assign(__assign({}, theme.theme), { density: density || ((_a = theme.theme) === null || _a === void 0 ? void 0 : _a.density) }) }));
15
+ };
16
+ export var ThemeProvider = function (props) {
17
+ var theme = props.theme, children = props.children, elementToApplyClass = props.containerElement, density = props.density;
18
+ var _a = __read(useState(null), 2), containerElementRef = _a[0], setContainerElementRef = _a[1];
19
+ var outerTheme = useTheme();
20
+ var _b = __read(useMemoizedStyletron(), 2), baseUITheme = _b[1];
21
+ if (typeof outerTheme === 'undefined' && typeof theme === 'undefined') {
22
+ throw new Error('No Theme present in context & props');
23
+ }
24
+ var Provider = themeContext.Provider;
25
+ var value = useMemo(function () {
26
+ var _a, _b;
27
+ if (theme) {
28
+ var newTheme = void 0;
29
+ if (typeof theme === 'function') {
30
+ newTheme = theme(outerTheme);
31
+ }
32
+ else {
33
+ var newThemeName = (_a = theme.theme) === null || _a === void 0 ? void 0 : _a.name, outerThemeName = (_b = outerTheme === null || outerTheme === void 0 ? void 0 : outerTheme.theme) === null || _b === void 0 ? void 0 : _b.name,
34
+ // theme should be merged if both the outerTheme & themeToOverride has same name
35
+ shouldMergeThemes = !newThemeName || !outerThemeName || newThemeName === outerThemeName;
36
+ if (shouldMergeThemes) {
37
+ newTheme = _merge({}, outerTheme, theme);
38
+ }
39
+ else {
40
+ newTheme = __assign({ direction: outerTheme === null || outerTheme === void 0 ? void 0 : outerTheme.direction }, theme);
41
+ }
42
+ }
43
+ if (typeof newTheme !== 'object') {
44
+ throw new Error('theme has to be an object of shape {theme : {}, classes : {}}');
45
+ }
46
+ return addDensityToTheme(newTheme, density);
47
+ }
48
+ return addDensityToTheme(outerTheme, density);
49
+ }, [theme, outerTheme, density]);
50
+ var themeName = value.theme.name, prevThemName = usePrevious(themeName), containerElement = elementToApplyClass !== null && elementToApplyClass !== void 0 ? elementToApplyClass : containerElementRef, prevContainerElement = usePrevious(containerElement);
51
+ useIsomorphicLayoutEffect(function () {
52
+ prevThemName && (prevContainerElement === null || prevContainerElement === void 0 ? void 0 : prevContainerElement.classList.remove(prevThemName));
53
+ THEME_NAMES.forEach(function (name) { return containerElement === null || containerElement === void 0 ? void 0 : containerElement.classList.remove(name); });
54
+ containerElement === null || containerElement === void 0 ? void 0 : containerElement.classList.add(themeName);
55
+ }, [themeName, prevThemName, containerElement, prevContainerElement]);
56
+ var baseuiThemeWithDirection = useMemo(function () { return (__assign(__assign({}, SPACEWEB_THEME_VS_BASEUI_THEME[themeName]), { direction: value.direction || 'ltr' })); }, [value.direction, themeName]);
57
+ /**
58
+ * Box component/styled cannot be used here as styletron might not be initialized when ThemeProvider renders for the first time.
59
+ */
60
+ return (_jsx("div", __assign({ "data-testid": "theme-provider-container", style: { display: 'contents' }, ref: setContainerElementRef }, { children: _jsx(BaseUIThemProvider, __assign({ theme: baseuiThemeWithDirection !== null && baseuiThemeWithDirection !== void 0 ? baseuiThemeWithDirection : baseUITheme }, { children: _jsx(Provider, __assign({ value: value }, { children: children }), void 0) }), void 0) }), void 0));
61
+ };
@@ -1,14 +1,5 @@
1
- import { ReactElement, PropsWithChildren } from 'react';
1
+ /// <reference types="react" />
2
2
  import { ThemeContext } from '../types';
3
- import { ThemeProviderT } from './types';
4
- import type { Density } from '@sprinklrjs/spaceweb-themes/types';
5
3
  export declare const themeContext: import("react").Context<ThemeContext>;
6
4
  export declare const useTheme: () => ThemeContext;
7
- declare type Props = PropsWithChildren<{
8
- theme?: ThemeProviderT;
9
- containerElement?: HTMLElement | null;
10
- density?: Density;
11
- }>;
12
- export declare const ThemeProvider: (props: Props) => ReactElement;
13
5
  export declare const ThemeConsumer: import("react").Consumer<ThemeContext>;
14
- export {};
@@ -1,65 +1,5 @@
1
- import { __assign, __read } from "tslib";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { createContext, useContext, useMemo, useState } from 'react';
4
- import _merge from 'lodash/merge';
1
+ import { createContext, useContext } from 'react';
5
2
  import hyperspaceLight from '@sprinklrjs/spaceweb-themes/hyperspace/light';
6
- import { ThemeProvider as BaseUIThemProvider } from 'baseui';
7
- import usePrevious from '../hooks/usePrevious';
8
- import useMemoizedStyletron from '../style/useMemoizedStyletron';
9
- import SPACEWEB_THEME_VS_BASEUI_THEME from '../themes';
10
- import { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect';
11
- //todo: remove default sprLight, too many tests failing on removal
12
3
  export var themeContext = createContext(hyperspaceLight);
13
4
  export var useTheme = function () { return useContext(themeContext); };
14
- var THEME_NAMES = ['hyperspace-light', 'space-light', 'space-dark', 'hyperspace-dark'];
15
- var addDensityToTheme = function (theme, density) {
16
- var _a;
17
- return (__assign(__assign({}, theme), { theme: __assign(__assign({}, theme.theme), { density: density || ((_a = theme.theme) === null || _a === void 0 ? void 0 : _a.density) }) }));
18
- };
19
- export var ThemeProvider = function (props) {
20
- var _a;
21
- var theme = props.theme, children = props.children, elementToApplyClass = props.containerElement, density = props.density;
22
- var _b = __read(useState(null), 2), containerElementRef = _b[0], setContainerElementRef = _b[1];
23
- var outerTheme = useTheme();
24
- var _c = __read(useMemoizedStyletron(), 2), baseUITheme = _c[1];
25
- if (typeof outerTheme === 'undefined' && typeof theme === 'undefined') {
26
- throw new Error('No Theme present in context & props');
27
- }
28
- var Provider = themeContext.Provider;
29
- var value = useMemo(function () {
30
- var _a, _b;
31
- if (theme) {
32
- var newTheme = void 0;
33
- if (typeof theme === 'function') {
34
- newTheme = theme(outerTheme);
35
- }
36
- else {
37
- var newThemeName = (_a = theme.theme) === null || _a === void 0 ? void 0 : _a.name, outerThemeName = (_b = outerTheme === null || outerTheme === void 0 ? void 0 : outerTheme.theme) === null || _b === void 0 ? void 0 : _b.name,
38
- // theme should be merged if both the outerTheme & themeToOverride has same name
39
- shouldMergeThemes = !newThemeName || !outerThemeName || newThemeName === outerThemeName;
40
- if (shouldMergeThemes) {
41
- newTheme = _merge({}, outerTheme, theme);
42
- }
43
- else {
44
- newTheme = __assign({ direction: outerTheme === null || outerTheme === void 0 ? void 0 : outerTheme.direction }, theme);
45
- }
46
- }
47
- if (typeof newTheme !== 'object') {
48
- throw new Error('theme has to be an object of shape {theme : {}, classes : {}}');
49
- }
50
- return addDensityToTheme(newTheme, density);
51
- }
52
- return addDensityToTheme(outerTheme, density);
53
- }, [theme, outerTheme, density]);
54
- var themeName = value.theme.name, prevThemName = usePrevious(themeName), containerElement = elementToApplyClass !== null && elementToApplyClass !== void 0 ? elementToApplyClass : containerElementRef, prevContainerElement = usePrevious(containerElement);
55
- useIsomorphicLayoutEffect(function () {
56
- prevThemName && (prevContainerElement === null || prevContainerElement === void 0 ? void 0 : prevContainerElement.classList.remove(prevThemName));
57
- THEME_NAMES.forEach(function (name) { return containerElement === null || containerElement === void 0 ? void 0 : containerElement.classList.remove(name); });
58
- containerElement === null || containerElement === void 0 ? void 0 : containerElement.classList.add(themeName);
59
- }, [themeName, prevThemName, containerElement, prevContainerElement]);
60
- /**
61
- * Box component/styled cannot be used here as styletron might not be initialized when ThemeProvider renders for the first time.
62
- */
63
- return (_jsx("div", __assign({ "data-testid": "theme-provider-container", style: { display: 'contents' }, ref: setContainerElementRef }, { children: _jsx(BaseUIThemProvider, __assign({ theme: (_a = SPACEWEB_THEME_VS_BASEUI_THEME[themeName]) !== null && _a !== void 0 ? _a : baseUITheme }, { children: _jsx(Provider, __assign({ value: value }, { children: children }), void 0) }), void 0) }), void 0));
64
- };
65
5
  export var ThemeConsumer = themeContext.Consumer;
@@ -1,2 +1,3 @@
1
+ export * from './Provider';
1
2
  export * from './context';
2
3
  export * from './types';
@@ -1,2 +1,3 @@
1
+ export * from './Provider';
1
2
  export * from './context';
2
3
  export * from './types';
@@ -14,5 +14,5 @@ var SPACEWEB_THEME_VS_BASEUI_THEME = {
14
14
  };
15
15
  export default SPACEWEB_THEME_VS_BASEUI_THEME;
16
16
  export function createTheme(theme, overrides) {
17
- return _merge(theme, overrides);
17
+ return _merge({}, theme, overrides);
18
18
  }