welcome-ui 8.1.0 → 8.1.2

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 (287) hide show
  1. package/dist/{AXB53BZF-XKOjjeWO.mjs → AXB53BZF-BOEe01VW.mjs} +3 -3
  2. package/dist/Accordion.mjs +23 -30
  3. package/dist/Alert.mjs +70 -76
  4. package/dist/AspectRatio.mjs +9 -9
  5. package/dist/Avatar.mjs +47 -48
  6. package/dist/{BYC7LY2E-CWSI38FM.mjs → BYC7LY2E-B1IDizRs.mjs} +127 -128
  7. package/dist/Badge.mjs +25 -25
  8. package/dist/Box.mjs +5 -5
  9. package/dist/Breadcrumb.mjs +168 -172
  10. package/dist/Button.mjs +67 -72
  11. package/dist/ButtonGroup.mjs +12 -13
  12. package/dist/Card.mjs +14 -14
  13. package/dist/Checkbox.mjs +2 -2
  14. package/dist/ClearButton.mjs +15 -15
  15. package/dist/CloseButton.mjs +9 -9
  16. package/dist/{CustomPopper-B2Cqfph4.mjs → CustomInput-IA_gVoXd.mjs} +1445 -1466
  17. package/dist/DatePicker.mjs +80 -81
  18. package/dist/DateTimePicker.mjs +61 -66
  19. package/dist/DateTimePickerCommon.mjs +1 -1
  20. package/dist/Drawer.mjs +181 -188
  21. package/dist/DropdownMenu.mjs +411 -414
  22. package/dist/Field.mjs +91 -103
  23. package/dist/FieldGroup.mjs +9 -12
  24. package/dist/FileDrop.mjs +556 -587
  25. package/dist/FileUpload.mjs +71 -92
  26. package/dist/Files.mjs +46 -46
  27. package/dist/Flex.mjs +13 -13
  28. package/dist/Grid.mjs +29 -29
  29. package/dist/Hint.mjs +12 -12
  30. package/dist/{ITI7HKP4-C89kOQb8.mjs → ITI7HKP4-EL9KXYBU.mjs} +67 -68
  31. package/dist/Icon.mjs +25 -25
  32. package/dist/Icons.mjs +988 -988
  33. package/dist/IconsFont.mjs +22 -22
  34. package/dist/InputText.mjs +58 -66
  35. package/dist/{JC64G2H7-afsomHuH.mjs → JC64G2H7-BzklVBKM.mjs} +46 -47
  36. package/dist/{KUU7WJ55-CzsjuIMv.mjs → KUU7WJ55-CS4NemC6.mjs} +1 -1
  37. package/dist/LVA2YJMS-DDEmK0pp.mjs +1482 -0
  38. package/dist/Label.mjs +35 -37
  39. package/dist/Link.mjs +28 -32
  40. package/dist/Loader.mjs +16 -20
  41. package/dist/Logo.mjs +42 -55
  42. package/dist/{MTZPJQMC-TybFZCho.mjs → MTZPJQMC-CMjAwC0N.mjs} +2 -2
  43. package/dist/Modal.mjs +253 -276
  44. package/dist/{NLEBE274-oSxMftGy.mjs → NLEBE274-QOMV1l7e.mjs} +9 -9
  45. package/dist/{P2CTZE2T-DOT1mNnX.mjs → P2CTZE2T-Cl2w7OLV.mjs} +48 -49
  46. package/dist/{P4IRICAX-CWSZLTGz.mjs → P4IRICAX-DezbJY4s.mjs} +3 -3
  47. package/dist/Pagination.mjs +104 -104
  48. package/dist/PasswordInput.mjs +34 -35
  49. package/dist/Picker.mjs +33 -35
  50. package/dist/Popover.mjs +99 -106
  51. package/dist/{QYJ6MIDR-DJ-vUdAM.mjs → QYJ6MIDR-Bb0O5xUM.mjs} +30 -31
  52. package/dist/Radio.mjs +48 -54
  53. package/dist/RadioGroup.mjs +47 -47
  54. package/dist/RadioTab.mjs +35 -37
  55. package/dist/{SYRFVSLH-B6m278Vb.mjs → SYRFVSLH-jn06-eLy.mjs} +10 -11
  56. package/dist/Search.mjs +159 -175
  57. package/dist/Select.mjs +338 -373
  58. package/dist/Shape.mjs +9 -9
  59. package/dist/Slider.mjs +336 -359
  60. package/dist/Stack.mjs +24 -22
  61. package/dist/Swiper.mjs +224 -231
  62. package/dist/Table.mjs +23 -23
  63. package/dist/Tabs.mjs +200 -205
  64. package/dist/Tag.mjs +53 -55
  65. package/dist/Text.mjs +47 -49
  66. package/dist/Textarea.mjs +40 -40
  67. package/dist/TimePicker.mjs +57 -58
  68. package/dist/Toast.mjs +128 -135
  69. package/dist/Toggle.mjs +24 -27
  70. package/dist/Tooltip.mjs +99 -103
  71. package/dist/UniversalLink.mjs +15 -15
  72. package/dist/{VEVQD5MH-0w9Y7Ytc.mjs → VEVQD5MH-CuegL0m0.mjs} +3 -3
  73. package/dist/{VGCJ63VH-C0UPBY-5.mjs → VGCJ63VH-BMzoZtCu.mjs} +38 -39
  74. package/dist/VariantIcon.mjs +22 -14
  75. package/dist/WelcomeLoader.mjs +121 -122
  76. package/dist/WuiProvider.mjs +58 -69
  77. package/dist/{X5NMLKT6-BJw3xE-K.mjs → X5NMLKT6-CvSCix-_.mjs} +2 -2
  78. package/dist/{YV4JVR4I-DPC8mMuG.mjs → YV4JVR4I-Bh7B7TET.mjs} +57 -57
  79. package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  80. package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
  81. package/dist/hide-focus-rings-root-BNyva1yb.mjs +14 -0
  82. package/dist/{index-5HBq1O6Z.mjs → index-5PUh49rV.mjs} +73 -74
  83. package/dist/index-B0gDDiFm.mjs +66 -0
  84. package/dist/index-B22SHR8h.mjs +26 -0
  85. package/dist/{index-DAZ1SYdj.mjs → index-BNGGwOCo.mjs} +7 -7
  86. package/dist/{index-SQQQ4dEE.mjs → index-BQtDgQBH.mjs} +8 -8
  87. package/dist/index-BhcLigYU.mjs +77 -0
  88. package/dist/{index-QaLwIvZS.mjs → index-Bkl89twW.mjs} +8 -8
  89. package/dist/{index-BaLGEKs7.mjs → index-C7zM96J_.mjs} +8 -8
  90. package/dist/index-CQD9fgf_.mjs +11 -0
  91. package/dist/index-CmsWSKKs.mjs +11 -0
  92. package/dist/{index-DvzWKxKE.mjs → index-DqBUFsqP.mjs} +7 -7
  93. package/dist/index-u1oHKa7X.mjs +16 -0
  94. package/dist/index-wr_b5GSV.mjs +36 -0
  95. package/dist/radio-group-RFyDp0KD.mjs +51 -0
  96. package/dist/theme.mjs +801 -801
  97. package/dist/throttle-BDBzFeFj.mjs +13 -0
  98. package/dist/types/components/Accordion/index.d.ts +1 -1
  99. package/dist/types/components/Accordion/styles.d.ts +2 -2
  100. package/dist/types/components/Accordion/theme.d.ts +1 -1
  101. package/dist/types/components/Alert/index.d.ts +2 -2
  102. package/dist/types/components/Alert/styles.d.ts +9 -9
  103. package/dist/types/components/Alert/theme.d.ts +3 -3
  104. package/dist/types/components/AspectRatio/styles.d.ts +2 -3
  105. package/dist/types/components/Avatar/index.d.ts +3 -2
  106. package/dist/types/components/Avatar/styles.d.ts +8 -8
  107. package/dist/types/components/Avatar/theme.d.ts +3 -3
  108. package/dist/types/components/Avatar/utils.d.ts +1 -1
  109. package/dist/types/components/Badge/index.d.ts +2 -2
  110. package/dist/types/components/Badge/styles.d.ts +5 -5
  111. package/dist/types/components/Badge/theme.d.ts +1 -1
  112. package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
  113. package/dist/types/components/Breadcrumb/index.d.ts +2 -2
  114. package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
  115. package/dist/types/components/Button/index.d.ts +5 -4
  116. package/dist/types/components/Button/styles.d.ts +1 -1
  117. package/dist/types/components/Button/theme.d.ts +7 -7
  118. package/dist/types/components/ButtonGroup/index.d.ts +4 -4
  119. package/dist/types/components/Card/Cover.styles.d.ts +4 -4
  120. package/dist/types/components/Card/index.d.ts +3 -2
  121. package/dist/types/components/Card/theme.d.ts +1 -1
  122. package/dist/types/components/Checkbox/index.d.ts +2 -2
  123. package/dist/types/components/Checkbox/styles.d.ts +1 -1
  124. package/dist/types/components/Checkbox/theme.d.ts +1 -1
  125. package/dist/types/components/ClearButton/index.d.ts +6 -5
  126. package/dist/types/components/ClearButton/styles.d.ts +4 -4
  127. package/dist/types/components/CloseButton/styles.d.ts +4 -4
  128. package/dist/types/components/DatePicker/index.d.ts +3 -3
  129. package/dist/types/components/DateTimePicker/index.d.ts +2 -2
  130. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
  131. package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
  132. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
  133. package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
  134. package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
  135. package/dist/types/components/DateTimePickerCommon/utils.d.ts +2 -2
  136. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
  137. package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
  138. package/dist/types/components/Drawer/index.d.ts +12 -12
  139. package/dist/types/components/Drawer/styles.d.ts +5 -5
  140. package/dist/types/components/Drawer/theme.d.ts +2 -2
  141. package/dist/types/components/DropdownMenu/index.d.ts +4 -4
  142. package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
  143. package/dist/types/components/Field/index.d.ts +8 -8
  144. package/dist/types/components/Field/styles.d.ts +1 -1
  145. package/dist/types/components/Field/utils.d.ts +1 -1
  146. package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
  147. package/dist/types/components/FileDrop/Message.d.ts +1 -1
  148. package/dist/types/components/FileDrop/index.d.ts +20 -20
  149. package/dist/types/components/FileDrop/theme.d.ts +1 -1
  150. package/dist/types/components/FileUpload/index.d.ts +13 -13
  151. package/dist/types/components/Files/index.d.ts +5 -5
  152. package/dist/types/components/Files/types.d.ts +1 -1
  153. package/dist/types/components/Hint/index.d.ts +2 -1
  154. package/dist/types/components/Hint/theme.d.ts +1 -1
  155. package/dist/types/components/Icon/index.d.ts +3 -3
  156. package/dist/types/components/Icon/styles.d.ts +3 -3
  157. package/dist/types/components/Icon/theme.d.ts +3 -3
  158. package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
  159. package/dist/types/components/Icons/index.d.ts +2 -2
  160. package/dist/types/components/IconsFont/index.d.ts +3 -2
  161. package/dist/types/components/IconsFont/styles.d.ts +1 -1
  162. package/dist/types/components/InputText/index.d.ts +1 -1
  163. package/dist/types/components/InputText/styles.d.ts +1 -1
  164. package/dist/types/components/Label/index.d.ts +3 -2
  165. package/dist/types/components/Label/theme.d.ts +1 -1
  166. package/dist/types/components/Link/index.d.ts +5 -5
  167. package/dist/types/components/Link/styles.d.ts +4 -4
  168. package/dist/types/components/Link/theme.d.ts +1 -1
  169. package/dist/types/components/Loader/index.d.ts +1 -1
  170. package/dist/types/components/Loader/styles.d.ts +4 -4
  171. package/dist/types/components/Loader/theme.d.ts +4 -4
  172. package/dist/types/components/Logo/Solutions.d.ts +2 -1
  173. package/dist/types/components/Logo/Symbol.d.ts +2 -1
  174. package/dist/types/components/Logo/Wui.d.ts +2 -1
  175. package/dist/types/components/Logo/index.d.ts +5 -5
  176. package/dist/types/components/Modal/Assets/Backdrop.d.ts +6 -5
  177. package/dist/types/components/Modal/Assets/Iframe.d.ts +2 -1
  178. package/dist/types/components/Modal/Assets/index.d.ts +9 -9
  179. package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
  180. package/dist/types/components/Modal/Close.d.ts +4 -3
  181. package/dist/types/components/Modal/Content.d.ts +5 -3
  182. package/dist/types/components/Modal/Footer.d.ts +1 -1
  183. package/dist/types/components/Modal/Header.d.ts +2 -2
  184. package/dist/types/components/Modal/index.d.ts +17 -17
  185. package/dist/types/components/Modal/styles.d.ts +7 -7
  186. package/dist/types/components/Modal/theme.d.ts +2 -2
  187. package/dist/types/components/Pagination/index.d.ts +2 -2
  188. package/dist/types/components/Pagination/theme.d.ts +1 -1
  189. package/dist/types/components/Pagination/utils.d.ts +1 -1
  190. package/dist/types/components/Picker/index.d.ts +1 -1
  191. package/dist/types/components/Picker/styles.d.ts +1 -1
  192. package/dist/types/components/Popover/Arrow.d.ts +2 -1
  193. package/dist/types/components/Popover/Content.d.ts +3 -2
  194. package/dist/types/components/Popover/Popover.d.ts +5 -4
  195. package/dist/types/components/Popover/PopoverHover.d.ts +4 -3
  196. package/dist/types/components/Popover/Trigger.d.ts +1 -1
  197. package/dist/types/components/Popover/styles.d.ts +4 -4
  198. package/dist/types/components/Popover/theme.d.ts +1 -1
  199. package/dist/types/components/Popover/usePopover.d.ts +6 -6
  200. package/dist/types/components/Radio/index.d.ts +3 -3
  201. package/dist/types/components/Radio/styles.d.ts +5 -5
  202. package/dist/types/components/Radio/theme.d.ts +1 -1
  203. package/dist/types/components/RadioGroup/index.d.ts +2 -2
  204. package/dist/types/components/RadioTab/index.d.ts +3 -3
  205. package/dist/types/components/RadioTab/styles.d.ts +9 -3
  206. package/dist/types/components/RadioTab/theme.d.ts +1 -1
  207. package/dist/types/components/Search/index.d.ts +5 -5
  208. package/dist/types/components/Select/index.d.ts +11 -11
  209. package/dist/types/components/Select/styles.d.ts +6 -6
  210. package/dist/types/components/Select/utils.d.ts +7 -11
  211. package/dist/types/components/Shape/index.d.ts +1 -1
  212. package/dist/types/components/Shape/styles.d.ts +3 -3
  213. package/dist/types/components/Slider/Range.d.ts +3 -3
  214. package/dist/types/components/Slider/index.d.ts +2 -2
  215. package/dist/types/components/Slider/styles.d.ts +16 -16
  216. package/dist/types/components/Slider/theme.d.ts +1 -1
  217. package/dist/types/components/Stack/index.d.ts +1 -1
  218. package/dist/types/components/Swiper/index.d.ts +17 -16
  219. package/dist/types/components/Swiper/styles.d.ts +53 -53
  220. package/dist/types/components/Swiper/theme.d.ts +1 -1
  221. package/dist/types/components/System/index.d.ts +14 -14
  222. package/dist/types/components/Table/index.d.ts +7 -6
  223. package/dist/types/components/Table/styles.d.ts +1 -1
  224. package/dist/types/components/Table/theme.d.ts +1 -1
  225. package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
  226. package/dist/types/components/Tabs/TabList.d.ts +4 -4
  227. package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
  228. package/dist/types/components/Tabs/styles.d.ts +2 -2
  229. package/dist/types/components/Tabs/theme.d.ts +2 -2
  230. package/dist/types/components/Tag/index.d.ts +3 -2
  231. package/dist/types/components/Tag/styles.d.ts +1 -1
  232. package/dist/types/components/Tag/theme.d.ts +2 -2
  233. package/dist/types/components/Text/index.d.ts +2 -2
  234. package/dist/types/components/Textarea/index.d.ts +1 -1
  235. package/dist/types/components/Textarea/theme.d.ts +1 -1
  236. package/dist/types/components/TimePicker/index.d.ts +2 -2
  237. package/dist/types/components/Toast/Growl.d.ts +1 -1
  238. package/dist/types/components/Toast/Snackbar.d.ts +1 -1
  239. package/dist/types/components/Toast/ToastWrapper.d.ts +5 -5
  240. package/dist/types/components/Toast/index.d.ts +6 -6
  241. package/dist/types/components/Toast/styles.d.ts +16 -16
  242. package/dist/types/components/Toast/theme.d.ts +2 -2
  243. package/dist/types/components/Toast/utils.d.ts +13 -13
  244. package/dist/types/components/Toggle/index.d.ts +3 -3
  245. package/dist/types/components/Toggle/styles.d.ts +4 -5
  246. package/dist/types/components/Toggle/theme.d.ts +5 -5
  247. package/dist/types/components/Tooltip/index.d.ts +2 -2
  248. package/dist/types/components/Tooltip/styles.d.ts +1 -1
  249. package/dist/types/components/Tooltip/theme.d.ts +1 -1
  250. package/dist/types/components/VariantIcon/index.d.ts +1 -1
  251. package/dist/types/components/VariantIcon/styles.d.ts +1 -1
  252. package/dist/types/components/VariantIcon/theme.d.ts +2 -2
  253. package/dist/types/components/WuiProvider/font.d.ts +5 -3
  254. package/dist/types/components/WuiProvider/index.d.ts +1 -1
  255. package/dist/types/theme/colors.d.ts +11 -3
  256. package/dist/types/theme/dark.d.ts +1 -1
  257. package/dist/types/theme/defaultFields.d.ts +10 -10
  258. package/dist/types/theme/fonts.d.ts +5 -5
  259. package/dist/types/theme/index.d.ts +31 -31
  260. package/dist/types/theme/screens.d.ts +1 -1
  261. package/dist/types/theme/space.d.ts +1 -1
  262. package/dist/types/theme/typography.d.ts +1 -1
  263. package/dist/types/utils/field-styles.d.ts +6 -6
  264. package/dist/types/utils/index.d.ts +2 -2
  265. package/dist/types/utils/ts-utils.d.ts +1 -1
  266. package/dist/types/utils/use-copy-text.d.ts +1 -1
  267. package/dist/types/utils/use-create-portal.d.ts +1 -1
  268. package/dist/types/utils/use-viewport.d.ts +2 -2
  269. package/dist/types/utils/wrap-children.d.ts +1 -1
  270. package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
  271. package/dist/{use-viewport-CWpjoHXy.mjs → use-viewport-CfklieD-.mjs} +2 -2
  272. package/dist/utils.mjs +29 -102
  273. package/dist/wrap-children-aq69jtFP.mjs +12 -0
  274. package/package.json +28 -4
  275. package/dist/LVA2YJMS-C-kJ1lkr.mjs +0 -873
  276. package/dist/hide-focus-rings-root-CCXdysih.mjs +0 -15
  277. package/dist/index-CYmF7qCH.mjs +0 -11
  278. package/dist/index-C_k-m0Rl.mjs +0 -36
  279. package/dist/index-D8v_VJ9z.mjs +0 -26
  280. package/dist/index-DpkNUfAS.mjs +0 -11
  281. package/dist/index-i_anpNhw.mjs +0 -66
  282. package/dist/index-wl3X6EM1.mjs +0 -16
  283. package/dist/jsx-runtime-B7I4PJ0H.mjs +0 -613
  284. package/dist/radio-group-C0fUHvam.mjs +0 -52
  285. package/dist/throttle-CW18pWlW.mjs +0 -13
  286. package/dist/wrap-children-DBSD-X5-.mjs +0 -9
  287. package/dist/{downshift.esm-B7Jil1wW.mjs → downshift.esm-D0ns_SQs.mjs} +9 -9
@@ -1,16 +1,15 @@
1
- import { CheckboxProps } from '../Checkbox';
2
- import { ToggleOptions } from './index';
3
1
  import { Size } from './theme';
2
+ import { ToggleOptions } from './index';
4
3
  import * as Ariakit from '@ariakit/react';
5
4
  export declare const Toggle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Ariakit.CheckboxOptions<"input"> & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
6
- ref?: ((instance: HTMLInputElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLInputElement> | null | undefined;
5
+ ref?: import('react').Ref<HTMLInputElement>;
7
6
  }, keyof Ariakit.CheckboxOptions<T>> & {
8
7
  [index: `data-${string}`]: unknown;
9
8
  }, ToggleOptions>> & string & Omit<(props: Ariakit.CheckboxProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, keyof import('react').Component<any, {}, any>>;
10
9
  export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, {
11
- onClick: CheckboxProps["onClick"];
10
+ onClick: React.MouseEventHandler<HTMLInputElement>;
12
11
  }>> & string;
13
12
  export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, {
14
- checked?: boolean;
13
+ checked: boolean;
15
14
  size: Size;
16
15
  }>> & string;
@@ -1,11 +1,11 @@
1
1
  import { CSSObject } from '@xstyled/styled-components';
2
- import { ThemeValues } from '../theme';
2
+ import { ThemeValues } from '../../theme';
3
3
  export type Size = 'xs' | 'sm' | 'md';
4
+ type State = 'default' | 'checked' | 'disabled';
4
5
  export type ThemeToggles = {
5
- after: Record<'sizes' | State, CSSObject>;
6
- icon: Record<'position' | 'sizes', CSSObject>;
7
- item: Record<'sizes' | State, CSSObject>;
6
+ after: Record<State | 'sizes', CSSObject>;
7
+ icon: Record<'sizes' | 'position', CSSObject>;
8
+ item: Record<State | 'sizes', CSSObject>;
8
9
  };
9
- type State = 'checked' | 'default' | 'disabled';
10
10
  export declare const getToggles: (theme: ThemeValues) => ThemeToggles;
11
11
  export {};
@@ -3,9 +3,9 @@ import { CreateWuiProps } from '../System';
3
3
  import * as Ariakit from '@ariakit/react';
4
4
  export type TooltipOptions = {
5
5
  children: React.ReactNode;
6
- content: JSX.Element | string;
6
+ content: string | JSX.Element;
7
7
  fixed?: boolean;
8
8
  withArrow?: boolean;
9
- } & Pick<Ariakit.TooltipOptions, 'gutter'> & Pick<Ariakit.TooltipStoreProps, 'placement'>;
9
+ } & Pick<Ariakit.TooltipStoreProps, 'placement'> & Pick<Ariakit.TooltipOptions, 'gutter'>;
10
10
  export type TooltipProps = CreateWuiProps<'div', TooltipOptions>;
11
11
  export declare const Tooltip: import('../System').CreateWuiComponent<"div", TooltipProps>;
@@ -2,7 +2,7 @@ import { TooltipProps } from './index';
2
2
  type FadeIn = {
3
3
  fixed?: boolean;
4
4
  placement?: TooltipProps['placement'];
5
- popoverHeight?: number;
5
+ popoverHeight: number;
6
6
  withArrow?: boolean;
7
7
  };
8
8
  export declare const FadeIn: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, FadeIn>> & string;
@@ -1,4 +1,4 @@
1
1
  import { CSSObject } from '@xstyled/styled-components';
2
- import { ThemeValues } from '../theme';
2
+ import { ThemeValues } from '../../theme';
3
3
  export type ThemeTooltips = CSSObject;
4
4
  export declare const getTooltips: (theme: ThemeValues) => ThemeTooltips;
@@ -1,5 +1,5 @@
1
- import { CreateWuiProps } from '../System';
2
1
  import { Size, Variant } from './theme';
2
+ import { CreateWuiProps } from '../System';
3
3
  export interface VariantIconOptions {
4
4
  icon?: JSX.Element;
5
5
  size?: Size;
@@ -1,4 +1,4 @@
1
1
  import { VariantIconOptions } from '.';
2
2
  export declare const VariantIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, {
3
- variant: string | VariantIconOptions["variant"];
3
+ variant: VariantIconOptions["variant"] | string;
4
4
  }>> & string;
@@ -1,6 +1,6 @@
1
1
  import { CSSObject } from '@xstyled/styled-components';
2
- import { ThemeValues } from '../theme';
2
+ import { ThemeValues } from '../../theme';
3
3
  export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
4
+ export type Variant = 'danger' | 'warning' | 'success' | 'info' | 'default' | 'ai';
4
5
  export type ThemeVariantIcon = Record<Variant, CSSObject>;
5
- export type Variant = 'ai' | 'danger' | 'default' | 'info' | 'success' | 'warning';
6
6
  export declare const getVariantIcon: (theme: ThemeValues) => ThemeVariantIcon;
@@ -1,5 +1,5 @@
1
1
  import { css } from '@xstyled/styled-components';
2
- import { ThemeValues } from '../theme';
2
+ import { ThemeValues } from '../../theme';
3
3
  type FontVariation = {
4
4
  display?: FontDisplay;
5
5
  extensions?: string[];
@@ -9,6 +9,8 @@ type FontVariation = {
9
9
  url: string;
10
10
  weight?: string;
11
11
  };
12
- export declare function getSource(url: FontVariation['url'], extensions: FontVariation['extensions'], isVariable: FontVariation['isVariable']): string | undefined;
13
- export declare const fonts: (theme: ThemeValues) => null | ReturnType<typeof css>;
12
+ export declare function getSource(url: FontVariation['url'], extensions: FontVariation['extensions'], isVariable: FontVariation['isVariable']): string;
13
+ export declare const fonts: () => ({ theme }: {
14
+ theme: ThemeValues;
15
+ }) => ReturnType<typeof css>;
14
16
  export {};
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ThemeValues } from '../theme';
2
+ import { ThemeValues } from '../../theme';
3
3
  export interface WuiProviderProps {
4
4
  children?: React.ReactNode;
5
5
  hasGlobalStyle?: boolean;
@@ -100,7 +100,6 @@ declare const palette: {
100
100
  'yellow-90': string;
101
101
  };
102
102
  export declare const getColors: (systemColors: typeof palette) => {
103
- overlay: string;
104
103
  'primary-10': string;
105
104
  'primary-20': string;
106
105
  'primary-30': string;
@@ -116,6 +115,7 @@ export declare const getColors: (systemColors: typeof palette) => {
116
115
  'secondary-pink': string;
117
116
  'secondary-teal': string;
118
117
  'secondary-violet': string;
118
+ overlay: string;
119
119
  'beige-10': string;
120
120
  'beige-20': string;
121
121
  'beige-30': string;
@@ -217,7 +217,6 @@ export declare const getColors: (systemColors: typeof palette) => {
217
217
  'yellow-90': string;
218
218
  };
219
219
  export declare const colors: {
220
- overlay: string;
221
220
  'primary-10': string;
222
221
  'primary-20': string;
223
222
  'primary-30': string;
@@ -233,6 +232,7 @@ export declare const colors: {
233
232
  'secondary-pink': string;
234
233
  'secondary-teal': string;
235
234
  'secondary-violet': string;
235
+ overlay: string;
236
236
  'beige-10': string;
237
237
  'beige-20': string;
238
238
  'beige-30': string;
@@ -334,5 +334,13 @@ export declare const colors: {
334
334
  'yellow-90': string;
335
335
  };
336
336
  export type ThemeColors = typeof colors;
337
- export type ThemeSecondaryColors = 'blue' | 'green' | 'orange' | 'pink' | 'teal' | 'violet';
337
+ declare const enum SecondaryColors {
338
+ 'blue' = 0,
339
+ 'green' = 1,
340
+ 'orange' = 2,
341
+ 'pink' = 3,
342
+ 'teal' = 4,
343
+ 'violet' = 5
344
+ }
345
+ export type ThemeSecondaryColors = keyof typeof SecondaryColors;
338
346
  export {};
@@ -1,6 +1,6 @@
1
1
  import { ThemeValues } from '.';
2
2
  type RecursivePartial<T> = {
3
- [P in keyof T]?: RecursivePartial<T[P]> | T[P];
3
+ [P in keyof T]?: T[P] | RecursivePartial<T[P]>;
4
4
  };
5
5
  export declare const colorsDark: ThemeValues['colors'];
6
6
  export declare const darkTheme: RecursivePartial<ThemeValues>;
@@ -1,6 +1,11 @@
1
1
  import { CSSObject } from '@xstyled/styled-components';
2
+ import { DefaultFieldStylesProps } from '../utils/field-styles';
2
3
  import { ThemeValues } from '.';
3
- import { Size } from '../utils/field-styles';
4
+ type VariantsTheme = {
5
+ danger: CSSObject;
6
+ success: CSSObject;
7
+ warning: CSSObject;
8
+ };
4
9
  export type ThemeDefaultFields = {
5
10
  checkableField: {
6
11
  checked: CSSObject;
@@ -13,11 +18,11 @@ export type ThemeDefaultFields = {
13
18
  default: CSSObject;
14
19
  disabled: CSSObject;
15
20
  fieldset: CSSObject;
16
- focused: {
21
+ focused: VariantsTheme & {
17
22
  default: CSSObject;
18
- } & VariantsTheme;
23
+ };
19
24
  hover: CSSObject;
20
- iconPlacement: Record<Size, CSSObject>;
25
+ iconPlacement: Record<DefaultFieldStylesProps['size'], CSSObject>;
21
26
  placeholder: CSSObject;
22
27
  select: {
23
28
  default: CSSObject;
@@ -27,13 +32,8 @@ export type ThemeDefaultFields = {
27
32
  selected: CSSObject;
28
33
  selectedAndHighlighted: CSSObject;
29
34
  };
30
- sizes: Record<Size, CSSObject>;
35
+ sizes: Record<DefaultFieldStylesProps['size'], CSSObject>;
31
36
  variants: VariantsTheme;
32
37
  };
33
- type VariantsTheme = {
34
- danger: CSSObject;
35
- success: CSSObject;
36
- warning: CSSObject;
37
- };
38
38
  export declare const getDefaultFields: (theme: ThemeValues) => ThemeDefaultFields;
39
39
  export {};
@@ -1,9 +1,4 @@
1
1
  import { ThemeValues } from '.';
2
- export type ThemeFontFaces = {
3
- 'welcome-font': FontFace[];
4
- 'welcome-icon-font': FontFace[];
5
- 'work-sans': FontFace[];
6
- };
7
2
  type FontFace = {
8
3
  display?: FontDisplay;
9
4
  extensions?: string[];
@@ -14,5 +9,10 @@ type FontFace = {
14
9
  url: string;
15
10
  weight?: string;
16
11
  };
12
+ export type ThemeFontFaces = {
13
+ 'welcome-font': FontFace[];
14
+ 'welcome-icon-font': FontFace[];
15
+ 'work-sans': FontFace[];
16
+ };
17
17
  export declare const fontFaces: (theme: ThemeValues) => ThemeFontFaces;
18
18
  export {};
@@ -6,16 +6,16 @@ import { ThemeBadges } from '../components/Badge/theme';
6
6
  import { ThemeBreadcrumbs } from '../components/Breadcrumb/theme';
7
7
  import { ThemeButtons } from '../components/Button/theme';
8
8
  import { ThemeCards } from '../components/Card/theme';
9
- import { ThemeCheckboxes } from '../components/Checkbox/theme';
10
9
  import { ThemeDateTimePickerCommon } from '../components/DateTimePickerCommon/theme';
10
+ import { ThemeCheckboxes } from '../components/Checkbox/theme';
11
11
  import { ThemeDrawers } from '../components/Drawer/theme';
12
12
  import { ThemeDropdownMenu } from '../components/DropdownMenu/theme';
13
13
  import { ThemeFileDrops } from '../components/FileDrop/theme';
14
14
  import { ThemeHints } from '../components/Hint/theme';
15
- import { ThemeIcons } from '../components/Icon/theme';
16
15
  import { ThemeLabels } from '../components/Label/theme';
17
16
  import { ThemeLinks } from '../components/Link/theme';
18
17
  import { ThemeLoaders } from '../components/Loader/theme';
18
+ import { ThemeIcons } from '../components/Icon/theme';
19
19
  import { ThemeModals } from '../components/Modal/theme';
20
20
  import { ThemePagination } from '../components/Pagination/theme';
21
21
  import { ThemePopovers } from '../components/Popover/theme';
@@ -31,33 +31,24 @@ import { ThemeToasts } from '../components/Toast/theme';
31
31
  import { ThemeToggles } from '../components/Toggle/theme';
32
32
  import { ThemeTooltips } from '../components/Tooltip/theme';
33
33
  import { ThemeVariantIcon } from '../components/VariantIcon/theme';
34
- import { ThemeBorderWidths } from './borders';
34
+ import { darkTheme } from './dark';
35
35
  import { ThemeColors } from './colors';
36
- import { ThemeDefaultFields } from './defaultFields';
37
- import { ThemeFocus } from './focus';
38
36
  import { ThemeFontFaces } from './fonts';
37
+ import { ThemeFonts, ThemeFontSizes, ThemeFontWeights, ThemeLetterSpacings, ThemeLineHeights, ThemeTexts, ThemeTextsFontColors, ThemeTextsFontFamily, ThemeTextsFontWeights, ThemeTextsTextTransform } from './typography';
38
+ import { ThemeTimingFunction, ThemeTransitions } from './transitions';
39
+ import { ThemeUnderline } from './underline';
39
40
  import { ThemeRadii } from './radii';
41
+ import { ThemeBorderWidths } from './borders';
40
42
  import { ThemeScreens } from './screens';
41
- import { ThemeSelection } from './selection';
42
43
  import { ThemeShadows } from './shadows';
43
44
  import { ThemeSpace } from './space';
44
- import { ThemeTimingFunction, ThemeTransitions } from './transitions';
45
- import { ThemeFonts, ThemeFontSizes, ThemeFontWeights, ThemeLetterSpacings, ThemeLineHeights, ThemeTexts, ThemeTextsFontColors, ThemeTextsFontFamily, ThemeTextsFontWeights, ThemeTextsTextTransform } from './typography';
46
- import { ThemeUnderline } from './underline';
47
- import { darkTheme } from './dark';
48
- export type ThemeColorTokens = keyof ThemeColors;
49
- export type ThemeFontsUrl = 'https://cdn.welcome-ui.com/fonts' | 'https://cdn.welcometothejungle.com/fonts' | string;
50
- export type ThemeProps = {
51
- [param: string]: unknown;
52
- defaultFontFamily?: string;
53
- defaultFontSize?: number;
54
- defaultLetterSpacing?: string;
55
- defaultLineHeight?: number;
56
- fontsUrl?: ThemeFontsUrl;
57
- headingFontFamily?: string;
58
- iconFontFamily?: string;
59
- };
60
- export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledComponentsTheme {
45
+ import { ThemeSelection } from './selection';
46
+ import { ThemeFocus } from './focus';
47
+ import { ThemeDefaultFields } from './defaultFields';
48
+ type OverrideKeys = 'colors' | 'radii' | 'borderWidths' | 'fontSizes' | 'lineHeights' | 'fontWeights' | 'letterSpacings' | 'fonts' | 'sizes' | 'screens' | 'space' | 'shadows' | 'texts';
49
+ type XStyledTheme = Omit<XStyledDefaultTheme, OverrideKeys>;
50
+ type StyledComponentsTheme = Omit<StyledComponentDefaultTheme, OverrideKeys>;
51
+ export interface ThemeValues extends XStyledTheme, StyledComponentsTheme {
61
52
  accordions: ThemeAccordions;
62
53
  alerts: ThemeAlerts;
63
54
  avatars: ThemeAvatars;
@@ -77,10 +68,10 @@ export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledCo
77
68
  fileDrops: ThemeFileDrops;
78
69
  focus: ThemeFocus;
79
70
  fontFaces: ThemeFontFaces;
80
- fonts: ThemeFonts;
81
71
  fontSizes: ThemeFontSizes;
82
- fontsUrl: ThemeFontsUrl;
83
72
  fontWeights: ThemeFontWeights;
73
+ fonts: ThemeFonts;
74
+ fontsUrl: ThemeFontsUrl;
84
75
  hints: ThemeHints;
85
76
  icons: ThemeIcons;
86
77
  inset: ThemeSpace;
@@ -111,12 +102,12 @@ export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledCo
111
102
  textsFontWeights: ThemeTextsFontWeights;
112
103
  textsTextTransform: ThemeTextsTextTransform;
113
104
  timingFunction: ThemeTimingFunction;
114
- toasts: ThemeToasts;
115
105
  toEm: (int: number) => string;
116
- toggles: ThemeToggles;
117
- tooltips: ThemeTooltips;
118
106
  toPx: (int: number) => string;
119
107
  toRem: (int: number) => string;
108
+ toasts: ThemeToasts;
109
+ toggles: ThemeToggles;
110
+ tooltips: ThemeTooltips;
120
111
  transformers: {
121
112
  border: (value: CSSScalar) => CSSScalar;
122
113
  px: (value: CSSScalar) => CSSScalar;
@@ -125,8 +116,17 @@ export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledCo
125
116
  underline: ThemeUnderline;
126
117
  variantIcon: ThemeVariantIcon;
127
118
  }
128
- type OverrideKeys = 'borderWidths' | 'colors' | 'fonts' | 'fontSizes' | 'fontWeights' | 'letterSpacings' | 'lineHeights' | 'radii' | 'screens' | 'shadows' | 'sizes' | 'space' | 'texts';
129
- type StyledComponentsTheme = Omit<StyledComponentDefaultTheme, OverrideKeys>;
130
- type XStyledTheme = Omit<XStyledDefaultTheme, OverrideKeys>;
119
+ export type ThemeFontsUrl = 'https://cdn.welcome-ui.com/fonts' | 'https://cdn.welcometothejungle.com/fonts' | string;
120
+ export type ThemeColorTokens = keyof ThemeColors;
121
+ export type ThemeProps = {
122
+ [param: string]: unknown;
123
+ defaultFontFamily?: string;
124
+ defaultFontSize?: number;
125
+ defaultLetterSpacing?: string;
126
+ defaultLineHeight?: number;
127
+ fontsUrl?: ThemeFontsUrl;
128
+ headingFontFamily?: string;
129
+ iconFontFamily?: string;
130
+ };
131
131
  export declare const createTheme: (options?: ThemeProps) => ThemeValues;
132
132
  export { darkTheme };
@@ -1,6 +1,6 @@
1
1
  export type ThemeScreens = {
2
- [key: number]: number;
3
2
  [key: string]: number;
3
+ [key: number]: number;
4
4
  '3xl': number;
5
5
  '4xl': number;
6
6
  lg: number;
@@ -1,7 +1,7 @@
1
1
  import { ThemeValues } from '.';
2
2
  export type ThemeSpace = {
3
- [key: number]: string;
4
3
  [key: string]: string;
4
+ [key: number]: string;
5
5
  '3xl': string;
6
6
  '4xl': string;
7
7
  '5xl': string;
@@ -127,7 +127,7 @@ export type ThemeTexts = {
127
127
  export declare const getTexts: (theme: ThemeValues) => ThemeTexts;
128
128
  export type ThemeFonts = {
129
129
  headings: string;
130
- icons?: string;
130
+ icons: string;
131
131
  texts: string;
132
132
  };
133
133
  export declare const getFonts: (defaultFontFamily: ThemeProps["defaultFontFamily"], headingFontFamily: ThemeProps["headingFontFamily"], iconFontFamily: ThemeProps["iconFontFamily"]) => ThemeFonts;
@@ -1,17 +1,17 @@
1
1
  import { css } from '@xstyled/styled-components';
2
2
  export type DefaultFieldIconSize = 'sm' | 'xs';
3
- export type Size = 'lg' | 'md' | 'sm' | 'xs';
3
+ export type Size = 'xs' | 'sm' | 'md' | 'lg';
4
4
  export declare const FIELD_ICON_SIZE: {
5
5
  [key in Size]: DefaultFieldIconSize;
6
6
  };
7
- export type DefaultFieldStylesProps = {
7
+ export type DefaultFieldStylesProps = Partial<{
8
8
  hasIcon?: boolean;
9
- iconPlacement?: 'both' | 'left' | 'right';
9
+ iconPlacement?: 'right' | 'left' | 'both';
10
10
  isClearable?: boolean;
11
- size?: Size;
11
+ size: Size;
12
12
  transparent?: boolean;
13
- variant?: 'danger' | 'success' | 'warning';
14
- };
13
+ variant: 'danger' | 'success' | 'warning';
14
+ }>;
15
15
  type DefaultFieldStyles = (args: DefaultFieldStylesProps) => ReturnType<typeof css>;
16
16
  export declare const defaultFieldStyles: DefaultFieldStyles;
17
17
  export {};
@@ -1,10 +1,10 @@
1
- export * from './field-styles';
2
1
  export * from './format-bytes';
3
2
  export * from './hex-to-rgba';
3
+ export * from './field-styles';
4
4
  export * from './overflow-ellipsis';
5
5
  export * from './throttle';
6
- export * from './ts-utils';
7
6
  export * from './use-copy-text';
8
7
  export * from './use-fork-ref';
9
8
  export * from './use-isomorphic-layout-effect';
10
9
  export * from './use-viewport';
10
+ export * from './ts-utils';
@@ -16,4 +16,4 @@
16
16
  * const bg: color = 'yellow'
17
17
  * const bg: color = '#FFF'
18
18
  */
19
- export type LiteralUnion<T, U = string> = (Record<never, never> & U) | T;
19
+ export type LiteralUnion<T, U = string> = T | (U & Record<never, never>);
@@ -1,4 +1,4 @@
1
- type Content = number | React.RefObject<HTMLElement | HTMLInputElement> | string;
1
+ type Content = React.RefObject<HTMLElement | HTMLInputElement> | number | string;
2
2
  type Timeout = number;
3
3
  type useCopyTextReturn = [() => void, boolean];
4
4
  export declare function useCopyText(content: Content, timeout: Timeout): useCopyTextReturn;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Hook that mimic the React createPortal function in order to make it SSR friendly
3
3
  */
4
- export declare function useCreatePortal(disable?: boolean): ((children: React.ReactNode) => unknown) | ((children: React.ReactNode, container?: DocumentFragment | Element, key?: null | string) => import('react').ReactPortal);
4
+ export declare function useCreatePortal(disable?: boolean): ((children: React.ReactNode) => any) | ((children: React.ReactNode, container?: Element | DocumentFragment, key?: string | null) => import('react').ReactPortal);
@@ -1,6 +1,6 @@
1
1
  type Size = {
2
- height: number | undefined;
3
- width: number | undefined;
2
+ height: number;
3
+ width: number;
4
4
  };
5
5
  export declare function useViewportSize(): Size;
6
6
  export {};
@@ -1 +1 @@
1
- export declare const wrapChildren: (children?: JSX.Element | string) => unknown;
1
+ export declare const wrapChildren: (children?: string | JSX.Element) => unknown;
@@ -3,13 +3,12 @@ import { useMemo as e } from "react";
3
3
  function o(u, n) {
4
4
  typeof u == "function" ? u(n) : u && (u.current = n);
5
5
  }
6
- function s(u, n) {
7
- return e(() => u == null && n == null ? () => {
8
- } : (t) => {
6
+ function l(u, n) {
7
+ return e(() => u == null && n == null ? null : (t) => {
9
8
  o(u, t), o(n, t);
10
9
  }, [u, n]);
11
10
  }
12
11
  export {
13
12
  o as s,
14
- s as u
13
+ l as u
15
14
  };
@@ -4,9 +4,9 @@ import { u as o } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
4
4
  function w() {
5
5
  const [t, e] = n({ height: void 0, width: void 0 });
6
6
  return o(() => {
7
- e({ height: window.innerHeight, width: window.innerWidth });
7
+ e({ width: window.innerWidth, height: window.innerHeight });
8
8
  function i() {
9
- e({ height: window.innerHeight, width: window.innerWidth });
9
+ e({ width: window.innerWidth, height: window.innerHeight });
10
10
  }
11
11
  return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
12
12
  }, []), t;
package/dist/utils.mjs CHANGED
@@ -1,106 +1,33 @@
1
1
  "use client";
2
- import { F as L, d as q } from "./field-styles-BVlRlvuu.mjs";
3
- import { f as N } from "./format-bytes-gST0dTWd.mjs";
4
- import { h as P } from "./hex-to-rgba-DU_XzKIK.mjs";
5
- import { o as B } from "./overflow-ellipsis-DGV5Kgt-.mjs";
6
- import { t as j } from "./throttle-CW18pWlW.mjs";
7
- import { g as w } from "./_commonjsHelpers-CXJ7dpIk.mjs";
8
- import { useState as D, useCallback as E } from "react";
9
- import { s as K, u as O } from "./use-fork-ref-DvaCTfQ_.mjs";
10
- import { u as X } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
11
- import { u as $ } from "./use-viewport-CWpjoHXy.mjs";
12
- var m, C;
13
- function T() {
14
- return C || (C = 1, m = function() {
15
- var e = document.getSelection();
16
- if (!e.rangeCount)
17
- return function() {
18
- };
19
- for (var o = document.activeElement, c = [], l = 0; l < e.rangeCount; l++)
20
- c.push(e.getRangeAt(l));
21
- switch (o.tagName.toUpperCase()) {
22
- // .toUpperCase handles XHTML
23
- case "INPUT":
24
- case "TEXTAREA":
25
- o.blur();
26
- break;
27
- default:
28
- o = null;
29
- break;
30
- }
31
- return e.removeAllRanges(), function() {
32
- e.type === "Caret" && e.removeAllRanges(), e.rangeCount || c.forEach(function(u) {
33
- e.addRange(u);
34
- }), o && o.focus();
35
- };
36
- }), m;
37
- }
38
- var y, b;
39
- function h() {
40
- if (b) return y;
41
- b = 1;
42
- var e = T(), o = {
43
- "text/plain": "Text",
44
- "text/html": "Url",
45
- default: "Text"
46
- }, c = "Copy to clipboard: #{key}, Enter";
47
- function l(a) {
48
- var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
49
- return a.replace(/#{\s*key\s*}/g, t);
50
- }
51
- function u(a, t) {
52
- var s, g, v, f, i, r, p = !1;
53
- t || (t = {}), s = t.debug || !1;
54
- try {
55
- v = e(), f = document.createRange(), i = document.getSelection(), r = document.createElement("span"), r.textContent = a, r.ariaHidden = "true", r.style.all = "unset", r.style.position = "fixed", r.style.top = 0, r.style.clip = "rect(0, 0, 0, 0)", r.style.whiteSpace = "pre", r.style.webkitUserSelect = "text", r.style.MozUserSelect = "text", r.style.msUserSelect = "text", r.style.userSelect = "text", r.addEventListener("copy", function(n) {
56
- if (n.stopPropagation(), t.format)
57
- if (n.preventDefault(), typeof n.clipboardData > "u") {
58
- s && console.warn("unable to use e.clipboardData"), s && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
59
- var d = o[t.format] || o.default;
60
- window.clipboardData.setData(d, a);
61
- } else
62
- n.clipboardData.clearData(), n.clipboardData.setData(t.format, a);
63
- t.onCopy && (n.preventDefault(), t.onCopy(n.clipboardData));
64
- }), document.body.appendChild(r), f.selectNodeContents(r), i.addRange(f);
65
- var x = document.execCommand("copy");
66
- if (!x)
67
- throw new Error("copy command was unsuccessful");
68
- p = !0;
69
- } catch (n) {
70
- s && console.error("unable to copy using execCommand: ", n), s && console.warn("trying IE specific stuff");
71
- try {
72
- window.clipboardData.setData(t.format || "text", a), t.onCopy && t.onCopy(window.clipboardData), p = !0;
73
- } catch (d) {
74
- s && console.error("unable to copy using clipboardData: ", d), s && console.error("falling back to prompt"), g = l("message" in t ? t.message : c), window.prompt(g, a);
75
- }
76
- } finally {
77
- i && (typeof i.removeRange == "function" ? i.removeRange(f) : i.removeAllRanges()), r && document.body.removeChild(r), v();
78
- }
79
- return p;
80
- }
81
- return y = u, y;
82
- }
83
- var S = h();
84
- const R = /* @__PURE__ */ w(S);
85
- function A(e, o) {
86
- const [c, l] = D(!1);
87
- return [E(() => {
88
- let a;
89
- typeof e == "number" || typeof e == "string" ? a = e.toString() : e.current instanceof HTMLInputElement ? a = e.current.value : e.current instanceof HTMLElement && (a = e.current.textContent);
90
- const t = a && R(a);
91
- l(t || !1), o && setTimeout(l, o);
92
- }, [e, o]), c];
2
+ import { f as y } from "./format-bytes-gST0dTWd.mjs";
3
+ import { h as C } from "./hex-to-rgba-BIDK-3ab.mjs";
4
+ import { F as S, d as T } from "./field-styles-CfVLcVQp.mjs";
5
+ import { o as h } from "./overflow-ellipsis-DGV5Kgt-.mjs";
6
+ import { t as L } from "./throttle-BDBzFeFj.mjs";
7
+ import { useState as p, useCallback as a } from "react";
8
+ import { c as i } from "./index-BhcLigYU.mjs";
9
+ import { s as g, u as v } from "./use-fork-ref-CUZErtAC.mjs";
10
+ import { u as k } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
11
+ import { u as B } from "./use-viewport-CfklieD-.mjs";
12
+ function c(e, r) {
13
+ const [s, t] = p();
14
+ return [a(() => {
15
+ let o;
16
+ typeof e == "number" || typeof e == "string" ? o = e.toString() : e.current instanceof HTMLInputElement ? o = e.current.value : e.current instanceof HTMLElement && (o = e.current.textContent);
17
+ const f = i(o);
18
+ t(f), r && setTimeout(t, r);
19
+ }, [e, r]), s];
93
20
  }
94
21
  export {
95
- L as FIELD_ICON_SIZE,
96
- q as defaultFieldStyles,
97
- N as formatBytes,
98
- P as hexToRGBA,
99
- B as overflowEllipsis,
100
- K as setRef,
101
- j as throttle,
102
- A as useCopyText,
103
- O as useForkRef,
104
- X as useIsomorphicLayoutEffect,
105
- $ as useViewportSize
22
+ S as FIELD_ICON_SIZE,
23
+ T as defaultFieldStyles,
24
+ y as formatBytes,
25
+ C as hexToRGBA,
26
+ h as overflowEllipsis,
27
+ g as setRef,
28
+ L as throttle,
29
+ c as useCopyText,
30
+ v as useForkRef,
31
+ k as useIsomorphicLayoutEffect,
32
+ B as useViewportSize
106
33
  };