meticulous-ui 3.7.10 → 3.7.12

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 (310) hide show
  1. package/components/Button/Button.js +67 -46
  2. package/components/Carousel/Carousel.js +72 -127
  3. package/components/DatePicker/DatePicker.js +142 -181
  4. package/components/DatePicker/constants.js +1 -14
  5. package/components/DatePicker/utils.js +5 -1
  6. package/components/Dropdown/Dropdown.js +80 -114
  7. package/components/Glass/Glass.js +8 -2
  8. package/components/Icons/Add.js +11 -44
  9. package/components/Icons/AddCircle.js +8 -29
  10. package/components/Icons/AddCircleFilled.js +5 -20
  11. package/components/Icons/ArrowDown.js +5 -20
  12. package/components/Icons/ArrowLeft.js +5 -21
  13. package/components/Icons/ArrowRight.js +5 -21
  14. package/components/Icons/ArrowUp.js +5 -20
  15. package/components/Icons/BagFilled.js +5 -20
  16. package/components/Icons/BagOutline.js +8 -30
  17. package/components/Icons/BellFilled.js +8 -31
  18. package/components/Icons/BellOffFilled.js +9 -40
  19. package/components/Icons/BellOffOutline.js +9 -42
  20. package/components/Icons/BellOutline.js +8 -33
  21. package/components/Icons/BookmarkFilled.js +10 -23
  22. package/components/Icons/BookmarkOutline.js +5 -20
  23. package/components/Icons/BoxCoveredFilled.js +10 -41
  24. package/components/Icons/BoxCoveredOutline.js +8 -31
  25. package/components/Icons/BoxFilled.js +9 -34
  26. package/components/Icons/BoxOutline.js +8 -31
  27. package/components/Icons/CalendarDays.js +5 -20
  28. package/components/Icons/CalendarLinesPen.js +5 -21
  29. package/components/Icons/CartCheckFilled.js +9 -36
  30. package/components/Icons/CartCheckOutline.js +10 -46
  31. package/components/Icons/CartCrossFilled.js +9 -36
  32. package/components/Icons/CartCrossOutline.js +10 -45
  33. package/components/Icons/CartFilled.js +9 -34
  34. package/components/Icons/CartMinusFilled.js +9 -36
  35. package/components/Icons/CartMinusOutline.js +11 -47
  36. package/components/Icons/CartOutline.js +10 -46
  37. package/components/Icons/CartPlusFilled.js +9 -36
  38. package/components/Icons/CartPlusOutline.js +10 -45
  39. package/components/Icons/Check.js +5 -21
  40. package/components/Icons/CheckDouble.js +5 -21
  41. package/components/Icons/ChevronDown.js +5 -21
  42. package/components/Icons/ChevronLeft.js +5 -21
  43. package/components/Icons/ChevronRight.js +5 -21
  44. package/components/Icons/ChevronUp.js +5 -21
  45. package/components/Icons/ClockCircleOutline.js +8 -24
  46. package/components/Icons/ClockSquareOutline.js +8 -31
  47. package/components/Icons/Close.js +5 -18
  48. package/components/Icons/CloseCircleFilled.js +5 -20
  49. package/components/Icons/CloseCircleOutline.js +5 -21
  50. package/components/Icons/CommentBubbleFilled.js +10 -23
  51. package/components/Icons/CommentBubbleOutline.js +10 -23
  52. package/components/Icons/CommentFilled.js +10 -23
  53. package/components/Icons/CommentLineFilled.js +10 -23
  54. package/components/Icons/CommentLineOutline.js +10 -23
  55. package/components/Icons/CommentOutline.js +10 -23
  56. package/components/Icons/ContactDetailsFilled.js +8 -15
  57. package/components/Icons/ContactDetailsOutline.js +8 -15
  58. package/components/Icons/DeliveryTruckFastFilled.js +13 -26
  59. package/components/Icons/DeliveryTruckFastOutline.js +13 -26
  60. package/components/Icons/DeliveryTruckLeftFilled.js +9 -22
  61. package/components/Icons/DeliveryTruckLeftOutline.js +9 -22
  62. package/components/Icons/DeliveryTruckRightFilled.js +8 -21
  63. package/components/Icons/DeliveryTruckRightOutline.js +8 -21
  64. package/components/Icons/DetailsOutline.js +8 -15
  65. package/components/Icons/DiscordConversation.js +8 -27
  66. package/components/Icons/DiscordFilled.js +8 -21
  67. package/components/Icons/DiscordOutline.js +9 -25
  68. package/components/Icons/DoorClosedFilled.js +5 -20
  69. package/components/Icons/DoorClosedOutline.js +5 -21
  70. package/components/Icons/DoorOpenFilled.js +5 -20
  71. package/components/Icons/DoorOpenOutline.js +5 -21
  72. package/components/Icons/DotsHorizontalFilled.js +9 -34
  73. package/components/Icons/DotsHorizontalOutline.js +9 -43
  74. package/components/Icons/DotsVerticalFilled.js +9 -34
  75. package/components/Icons/DotsVerticalOutline.js +9 -43
  76. package/components/Icons/Download.js +8 -27
  77. package/components/Icons/DownloadBoxFilled.js +5 -20
  78. package/components/Icons/DownloadBoxOutline.js +9 -36
  79. package/components/Icons/EditBoxThick.js +5 -21
  80. package/components/Icons/EditBoxThin.js +8 -33
  81. package/components/Icons/EmailFilled.js +6 -19
  82. package/components/Icons/EmailOutline.js +6 -19
  83. package/components/Icons/ExitArrowInOutline.js +5 -21
  84. package/components/Icons/ExitArrowOutOutline.js +8 -33
  85. package/components/Icons/ExitFullScreen.js +5 -19
  86. package/components/Icons/ExitFullScreenThick.js +5 -19
  87. package/components/Icons/EyeClosed.js +5 -20
  88. package/components/Icons/EyeFilled.js +8 -29
  89. package/components/Icons/EyeOutline.js +8 -33
  90. package/components/Icons/FacebookFilled.js +6 -19
  91. package/components/Icons/FacebookMessengerOutline.js +8 -29
  92. package/components/Icons/FacebookOutline.js +5 -20
  93. package/components/Icons/FacebookRoundFilled.js +5 -18
  94. package/components/Icons/Filter.js +10 -17
  95. package/components/Icons/FilterList.js +5 -21
  96. package/components/Icons/FilterThickFilled.js +5 -18
  97. package/components/Icons/FilterThickOutline.js +5 -19
  98. package/components/Icons/FullScreenArrowThick.js +5 -19
  99. package/components/Icons/FullScreenArrowThin.js +5 -19
  100. package/components/Icons/FullScreenExit.js +10 -41
  101. package/components/Icons/FullScreenFilled.js +5 -20
  102. package/components/Icons/FullScreenOutline.js +5 -20
  103. package/components/Icons/HamburgerMenu.js +9 -40
  104. package/components/Icons/HamburgerSpaced.js +10 -23
  105. package/components/Icons/HeartFilled.js +5 -18
  106. package/components/Icons/HeartOutline.js +5 -23
  107. package/components/Icons/Help.js +5 -21
  108. package/components/Icons/HelpCircleFilled.js +5 -20
  109. package/components/Icons/HelpCircleOutline.js +9 -41
  110. package/components/Icons/HomeFilled.js +5 -20
  111. package/components/Icons/HomeOutline.js +5 -20
  112. package/components/Icons/Info.js +8 -27
  113. package/components/Icons/InfoCircleFilled.js +5 -20
  114. package/components/Icons/InfoCircleOutline.js +9 -16
  115. package/components/Icons/InfoSquareFilled.js +5 -20
  116. package/components/Icons/InfoSquareOutline.js +9 -23
  117. package/components/Icons/InstagramOuline.js +8 -21
  118. package/components/Icons/InstagramRoundFilled.js +13 -44
  119. package/components/Icons/KeyFilled.js +5 -20
  120. package/components/Icons/KeyInSquareFilled.js +8 -29
  121. package/components/Icons/KeyInSquareOutline.js +9 -38
  122. package/components/Icons/KeyOutline.js +8 -31
  123. package/components/Icons/KeySideSquareFilled.js +8 -29
  124. package/components/Icons/KeySideSquareOutline.js +5 -20
  125. package/components/Icons/KeySquareFilled.js +8 -29
  126. package/components/Icons/KeySquareOutline.js +5 -20
  127. package/components/Icons/Link.js +8 -31
  128. package/components/Icons/LinkedinFilled.js +6 -19
  129. package/components/Icons/LinkedinOutline.js +5 -19
  130. package/components/Icons/LinkedinRoundFilled.js +6 -19
  131. package/components/Icons/Loading.js +8 -21
  132. package/components/Icons/LocationArrowFilled.js +5 -12
  133. package/components/Icons/LocationArrowOutline.js +5 -21
  134. package/components/Icons/LocationFilled.js +10 -23
  135. package/components/Icons/LocationOutline.js +10 -23
  136. package/components/Icons/LockKeyhole.js +5 -20
  137. package/components/Icons/LockKeyholeOutline.js +9 -31
  138. package/components/Icons/LockKeyholeUnlocked.js +5 -20
  139. package/components/Icons/LockKeyholeUnlockedOutline.js +9 -31
  140. package/components/Icons/MediaPauseCircleFilled.js +5 -20
  141. package/components/Icons/MediaPauseCircleOuline.js +9 -36
  142. package/components/Icons/MediaPauseFilled.js +8 -27
  143. package/components/Icons/MediaPauseOutline.js +8 -31
  144. package/components/Icons/MediaPlayCircleFilled.js +5 -20
  145. package/components/Icons/MediaPlayCircleOutline.js +8 -31
  146. package/components/Icons/MediaPlayFilled.js +5 -18
  147. package/components/Icons/MediaPlayOutline.js +5 -20
  148. package/components/Icons/MediaStopCircleFilled.js +5 -20
  149. package/components/Icons/MediaStopCircleOutline.js +8 -31
  150. package/components/Icons/MediaStopFilled.js +5 -18
  151. package/components/Icons/MediaStopOutline.js +5 -20
  152. package/components/Icons/Minus.js +5 -21
  153. package/components/Icons/MinusCircle.js +10 -23
  154. package/components/Icons/MinusCircleFilled.js +10 -23
  155. package/components/Icons/MoneyBagOutline.js +10 -46
  156. package/components/Icons/MoneyBriefcaseFilled.js +5 -20
  157. package/components/Icons/MoneyBriefcaseOutline.js +9 -38
  158. package/components/Icons/NoEntry.js +5 -19
  159. package/components/Icons/NoEntryFilled.js +5 -18
  160. package/components/Icons/NoEntryOutline.js +8 -21
  161. package/components/Icons/PaymentCardFilled.js +9 -16
  162. package/components/Icons/PaymentCardOutline.js +9 -16
  163. package/components/Icons/PhoneCallingFilled.js +9 -36
  164. package/components/Icons/PhoneCallingOutline.js +9 -38
  165. package/components/Icons/PhoneFilled.js +5 -18
  166. package/components/Icons/PhoneOutline.js +5 -18
  167. package/components/Icons/Pin.js +5 -21
  168. package/components/Icons/PinAddFilled.js +10 -17
  169. package/components/Icons/PinAddOutline.js +10 -17
  170. package/components/Icons/PinCircleFilled.js +5 -20
  171. package/components/Icons/PinCircleOutline.js +8 -21
  172. package/components/Icons/PinFilled.js +5 -18
  173. package/components/Icons/PinOutline.js +5 -20
  174. package/components/Icons/PinSubFilled.js +10 -17
  175. package/components/Icons/PinSubOutline.js +10 -17
  176. package/components/Icons/PinterestFilled.js +10 -17
  177. package/components/Icons/PinterestOutline.js +5 -21
  178. package/components/Icons/ProfileFemaleOutline.js +6 -19
  179. package/components/Icons/ProfileGroupFilled.js +8 -28
  180. package/components/Icons/ProfileMaleFilled.js +8 -28
  181. package/components/Icons/ProfileMaleOutline.js +6 -19
  182. package/components/Icons/RedditFilled.js +10 -17
  183. package/components/Icons/RedditOutline.js +10 -43
  184. package/components/Icons/RedditRoundFilled.js +15 -52
  185. package/components/Icons/RedditRoundOutline.js +16 -53
  186. package/components/Icons/RupeeOutlined.js +5 -18
  187. package/components/Icons/RupeeSign.js +5 -21
  188. package/components/Icons/SaveFilled.js +10 -23
  189. package/components/Icons/SaveOutline.js +10 -23
  190. package/components/Icons/Search.js +10 -23
  191. package/components/Icons/SettingFilled.js +5 -18
  192. package/components/Icons/SettingOutline.js +5 -18
  193. package/components/Icons/ShareAllFilled.js +5 -20
  194. package/components/Icons/ShareAllOutline.js +11 -39
  195. package/components/Icons/ShareBoxOutline.js +5 -18
  196. package/components/Icons/ShareFilled.js +8 -29
  197. package/components/Icons/ShareOutline.js +8 -32
  198. package/components/Icons/ShareThickFilled.js +5 -18
  199. package/components/Icons/ShieldCheckFilled.js +5 -20
  200. package/components/Icons/ShieldCheckOutline.js +8 -31
  201. package/components/Icons/ShieldCrossFilled.js +5 -20
  202. package/components/Icons/ShieldCrossOutline.js +8 -30
  203. package/components/Icons/ShieldFilled.js +5 -18
  204. package/components/Icons/ShieldOutline.js +5 -20
  205. package/components/Icons/ShieldWarningFilled.js +5 -20
  206. package/components/Icons/ShieldWarningOutline.js +9 -23
  207. package/components/Icons/SnapchatFilled.js +10 -17
  208. package/components/Icons/SnapchatOutline.js +5 -20
  209. package/components/Icons/SortBottomToTop.js +10 -26
  210. package/components/Icons/SortHorizontal.js +5 -20
  211. package/components/Icons/SortTopToBottom.js +10 -26
  212. package/components/Icons/SortVertical.js +5 -20
  213. package/components/Icons/StarFilled.js +6 -19
  214. package/components/Icons/StarOutline.js +6 -19
  215. package/components/Icons/TelegramFilled.js +9 -22
  216. package/components/Icons/TelegramOutline.js +5 -20
  217. package/components/Icons/TelegramRoundFilled.js +9 -22
  218. package/components/Icons/ThumbsDownFilled.js +5 -18
  219. package/components/Icons/ThumbsDownOutline.js +5 -18
  220. package/components/Icons/ThumbsUpFilled.js +5 -18
  221. package/components/Icons/ThumbsUpOutline.js +5 -18
  222. package/components/Icons/TiktokBox.js +5 -18
  223. package/components/Icons/TiktokThickFilled.js +8 -21
  224. package/components/Icons/TiktokThinFilled.js +8 -32
  225. package/components/Icons/TrashBigFilled.js +10 -23
  226. package/components/Icons/TrashBigOutline.js +10 -23
  227. package/components/Icons/TrashFilled.js +8 -27
  228. package/components/Icons/TrashLinesFilled.js +8 -29
  229. package/components/Icons/TrashLinesOutline.js +11 -33
  230. package/components/Icons/TrashOutline.js +9 -31
  231. package/components/Icons/Upload.js +8 -27
  232. package/components/Icons/UploadBoxFilled.js +5 -20
  233. package/components/Icons/UploadBoxOutline.js +9 -36
  234. package/components/Icons/VolumeFilled.js +11 -30
  235. package/components/Icons/VolumeMuteFilled.js +11 -30
  236. package/components/Icons/VolumeMuteOutline.js +11 -30
  237. package/components/Icons/VolumeOffFilled.js +11 -30
  238. package/components/Icons/VolumeOffOutline.js +11 -30
  239. package/components/Icons/VolumeOutline.js +11 -30
  240. package/components/Icons/WalletFilled.js +10 -23
  241. package/components/Icons/WalletOutline.js +10 -23
  242. package/components/Icons/Warning.js +5 -21
  243. package/components/Icons/WarningCircleFilled.js +5 -18
  244. package/components/Icons/WarningCircleOutline.js +5 -18
  245. package/components/Icons/WarningSmall.js +5 -21
  246. package/components/Icons/WarningTriangleFilled.js +8 -21
  247. package/components/Icons/WarningTriangleOutline.js +5 -21
  248. package/components/Icons/WhatsappFilled.js +10 -17
  249. package/components/Icons/WhatsappOutline.js +5 -20
  250. package/components/Icons/Youtube.js +5 -18
  251. package/components/Icons/YoutubeFilled.js +10 -23
  252. package/components/Icons/YoutubeRoundFilled.js +9 -22
  253. package/components/Image/Image.js +27 -33
  254. package/components/Input/Checkbox/Checkbox.js +20 -30
  255. package/components/Input/FileUploader/FileUploader.js +82 -73
  256. package/components/Input/Input/Input.js +47 -49
  257. package/components/Input/Radio/Radio.js +17 -18
  258. package/components/Input/RadioGroup/RadioGroup.js +16 -33
  259. package/components/Input/Textarea/SvgIcon.js +7 -1
  260. package/components/Input/Textarea/Textarea.js +54 -54
  261. package/components/Loader/Loader.js +29 -18
  262. package/components/Loader/constants.js +12 -3
  263. package/components/MenuItem/MenuItem.js +28 -30
  264. package/components/Modal/Modal.js +37 -58
  265. package/components/OtpInput/OtpInput.js +28 -28
  266. package/components/PageLoader/PageLoader.js +9 -13
  267. package/components/Pagination/Pagination.js +95 -87
  268. package/components/Ripple/Ripple.js +2 -12
  269. package/components/RootComponent/RootComponent.js +4 -1
  270. package/components/Selectbox/Selectbox.js +101 -143
  271. package/components/Shimmer/Shimmer.js +13 -17
  272. package/components/Spinner/Spinner.js +22 -29
  273. package/components/Timer/Timer.js +92 -154
  274. package/components/Timer/components/TimerRing/TimerRing.js +11 -56
  275. package/components/Toast/Toast.js +81 -76
  276. package/components/Typography/Headings/H1.js +8 -2
  277. package/components/Typography/Headings/H2.js +8 -2
  278. package/components/Typography/Headings/H3.js +8 -2
  279. package/components/Typography/Headings/H4.js +8 -2
  280. package/components/Typography/Headings/H5.js +8 -2
  281. package/components/Typography/Headings/H6.js +8 -2
  282. package/components/Typography/Headings/index.js +8 -1
  283. package/components/Typography/P/P.js +12 -3
  284. package/components/VideoPlayer/VideoPlayer.js +23 -19
  285. package/components/VideoPlayer/components/Volumebar/Volumebar.js +6 -2
  286. package/components/VideoPlayer/useSpacebarToggle.js +1 -11
  287. package/components/VideoPlayer/useVolumeOverlay.js +4 -1
  288. package/hooks/useThrottle.js +3 -6
  289. package/hooks/useWindowSize.js +4 -1
  290. package/package.json +1 -1
  291. package/reactUtils/composeProviders.js +3 -1
  292. package/reactUtils/lazyImport.js +3 -1
  293. package/reactUtils/withErrorBoundary.js +8 -2
  294. package/utils/cancelablePromise.js +5 -4
  295. package/utils/createPubSub.js +12 -9
  296. package/utils/formatCompactNumber.js +4 -3
  297. package/utils/formatCurrency.js +4 -1
  298. package/utils/formatDate.js +5 -3
  299. package/utils/handleKeyboardNavigation.js +5 -1
  300. package/utils/isAuthenticated.js +3 -1
  301. package/utils/logError.js +4 -1
  302. package/utils/logInfo.js +6 -1
  303. package/utils/logWarn.js +6 -1
  304. package/utils/mergeDeep.js +3 -1
  305. package/utils/multiSort.js +4 -1
  306. package/utils/scrollToElement.js +4 -1
  307. package/utils/scrollToTop.js +4 -1
  308. package/utils/timeAgo.js +3 -1
  309. package/utils/trackEvent.js +5 -1
  310. package/utils/withTimeout.js +1 -3
@@ -10,27 +10,46 @@ import { MEDIUM as P, SIZE as S } from "./constants.js";
10
10
  import t from "prop-types";
11
11
  import l, { css as a } from "styled-components";
12
12
  const K = l.button`
13
- height: ${({ $height: o }) => o}rem;
14
- width: ${({ $width: o }) => o}rem;
13
+ height: ${({
14
+ $height: o
15
+ }) => o}rem;
16
+ width: ${({
17
+ $width: o
18
+ }) => o}rem;
15
19
  border-radius: 0.96rem;
16
20
  border: none;
17
21
  padding: 0.96rem 0.64rem;
18
22
  position: relative;
19
23
  overflow: hidden;
20
- background-color: ${({ $selectedColor: o, disabled: e }) => e ? y.m500 : o};
21
- cursor: ${({ disabled: o, $isLoading: e }) => o ? "not-allowed" : e ? "auto" : "pointer"};
24
+ background-color: ${({
25
+ $selectedColor: o,
26
+ disabled: e
27
+ }) => e ? y.m500 : o};
28
+ cursor: ${({
29
+ disabled: o,
30
+ $isLoading: e
31
+ }) => o ? "not-allowed" : e ? "auto" : "pointer"};
22
32
 
23
- ${({ $isLoading: o }) => o && a`
33
+ ${({
34
+ $isLoading: o
35
+ }) => o && a`
24
36
  pointer-events: none;
25
37
  `};
26
38
 
27
- ${({ disabled: o, $isLoading: e }) => !(o || e) && a`
39
+ ${({
40
+ disabled: o,
41
+ $isLoading: e
42
+ }) => !(o || e) && a`
28
43
  &:hover {
29
- background-color: ${({ $hoverColor: r }) => r};
44
+ background-color: ${({
45
+ $hoverColor: r
46
+ }) => r};
30
47
  }
31
48
 
32
49
  &:active {
33
- background-color: ${({ $activeColor: r }) => r};
50
+ background-color: ${({
51
+ $activeColor: r
52
+ }) => r};
34
53
  }
35
54
  `};
36
55
 
@@ -38,21 +57,34 @@ const K = l.button`
38
57
  outline: none;
39
58
  }
40
59
  `, M = l.div`
41
- font-size: ${({ $font: o }) => o}rem;
60
+ font-size: ${({
61
+ $font: o
62
+ }) => o}rem;
42
63
  font-weight: 500;
43
64
  max-width: 100%;
44
65
  overflow: hidden;
45
- color: ${({ $textColor: o }) => o};
46
- opacity: ${({ $isLoading: o }) => o ? 0 : 1};
66
+ color: ${({
67
+ $textColor: o
68
+ }) => o};
69
+ opacity: ${({
70
+ $isLoading: o
71
+ }) => o ? 0 : 1};
47
72
  transition: opacity 0.3s ease;
48
73
  `, W = l.div`
49
- height: ${({ $height: o }) => o}rem;
50
- width: ${({ $width: o }) => o}rem;
74
+ height: ${({
75
+ $height: o
76
+ }) => o}rem;
77
+ width: ${({
78
+ $width: o
79
+ }) => o}rem;
51
80
  display: inline-block;
52
81
  position: relative;
53
82
  border-radius: 0.96rem;
54
83
 
55
- ${({ disabled: o, $isLoading: e }) => !(o || e) && a`
84
+ ${({
85
+ disabled: o,
86
+ $isLoading: e
87
+ }) => !(o || e) && a`
56
88
  box-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.2);
57
89
  transition:
58
90
  transform 0.2s,
@@ -70,10 +102,15 @@ const K = l.button`
70
102
  display: flex;
71
103
  align-items: center;
72
104
  justify-content: center;
73
- opacity: ${({ $isLoading: o }) => o ? 1 : 0};
105
+ opacity: ${({
106
+ $isLoading: o
107
+ }) => o ? 1 : 0};
74
108
  transition: opacity 0.3s ease;
75
109
  pointer-events: none;
76
- `, U = ({ theme: o, children: e }) => /* @__PURE__ */ i(B, { rippleColor: o.m100, children: e }), Y = (o) => {
110
+ `, U = ({
111
+ theme: o,
112
+ children: e
113
+ }) => /* @__PURE__ */ i(B, { rippleColor: o.m100, children: e }), Y = (o) => {
77
114
  var b;
78
115
  const {
79
116
  children: e,
@@ -96,35 +133,19 @@ const K = l.button`
96
133
  p.current = g;
97
134
  }
98
135
  d == null || d(s);
99
- }, { m400: k, m500: I, m600: L } = (b = j[r]) != null ? b : w, { height: h, width: f, font: T } = S[v] || {}, $ = ["white", "yellow"].includes(r) ? y.m600 : E, u = /* @__PURE__ */ z(
100
- K,
101
- {
102
- type: "button",
103
- ...C,
104
- onKeyDown: x,
105
- $hoverColor: I,
106
- $activeColor: L,
107
- $selectedColor: k,
108
- $height: h,
109
- $width: c || f,
110
- disabled: o.disabled,
111
- $isLoading: n,
112
- children: [
113
- /* @__PURE__ */ i(O, { $isLoading: n, children: /* @__PURE__ */ i(R, { size: "small", color: m || $ }) }),
114
- /* @__PURE__ */ i(M, { $isLoading: n, $textColor: m || $, $font: T, children: e })
115
- ]
116
- }
117
- );
118
- return /* @__PURE__ */ i(
119
- W,
120
- {
121
- $height: h,
122
- $width: c || f,
123
- disabled: o.disabled,
124
- $isLoading: n,
125
- children: n ? u : /* @__PURE__ */ i(U, { theme: r, children: u })
126
- }
127
- );
136
+ }, {
137
+ m400: k,
138
+ m500: I,
139
+ m600: L
140
+ } = (b = j[r]) != null ? b : w, {
141
+ height: h,
142
+ width: f,
143
+ font: T
144
+ } = S[v] || {}, $ = ["white", "yellow"].includes(r) ? y.m600 : E, u = /* @__PURE__ */ z(K, { type: "button", ...C, onKeyDown: x, $hoverColor: I, $activeColor: L, $selectedColor: k, $height: h, $width: c || f, disabled: o.disabled, $isLoading: n, children: [
145
+ /* @__PURE__ */ i(O, { $isLoading: n, children: /* @__PURE__ */ i(R, { size: "small", color: m || $ }) }),
146
+ /* @__PURE__ */ i(M, { $isLoading: n, $textColor: m || $, $font: T, children: e })
147
+ ] });
148
+ return /* @__PURE__ */ i(W, { $height: h, $width: c || f, disabled: o.disabled, $isLoading: n, children: n ? u : /* @__PURE__ */ i(U, { theme: r, children: u }) });
128
149
  };
129
150
  Y.propTypes = {
130
151
  /** Button label or content */
@@ -134,7 +155,7 @@ Y.propTypes = {
134
155
  /** Button size variant: `'small'`, `'medium'`, `'large'`, or `'ex-large'` */
135
156
  size: t.string,
136
157
  /** Override the button width */
137
- width: t.oneOfType([t.string, t.number]),
158
+ width: /* @__PURE__ */ t.oneOfType([t.string, t.number]),
138
159
  /** Icon component rendered to the left of the label */
139
160
  leftIcon: t.elementType,
140
161
  /** Icon component rendered to the right of the label */
@@ -18,29 +18,41 @@ const xe = o.div`
18
18
  overflow: hidden;
19
19
  width: 100%;
20
20
  outline: none;
21
- cursor: ${({ $draggable: t }) => t ? "grab" : "default"};
21
+ cursor: ${({
22
+ $draggable: t
23
+ }) => t ? "grab" : "default"};
22
24
 
23
25
  &:active {
24
- cursor: ${({ $draggable: t }) => t ? "grabbing" : "default"};
26
+ cursor: ${({
27
+ $draggable: t
28
+ }) => t ? "grabbing" : "default"};
25
29
  }
26
30
  `, we = o.div`
27
31
  display: flex;
28
32
  width: 100%;
29
- transform: translateX(${({ $translateX: t }) => t}%);
30
- transition: ${({ $dragging: t }) => t ? "none" : "transform 0.35s ease"};
33
+ transform: translateX(${({
34
+ $translateX: t
35
+ }) => t}%);
36
+ transition: ${({
37
+ $dragging: t
38
+ }) => t ? "none" : "transform 0.35s ease"};
31
39
 
32
40
  @media (prefers-reduced-motion: reduce) {
33
41
  transition: none;
34
42
  }
35
43
 
36
44
  & > * {
37
- flex: 0 0 ${({ $visibleSlides: t }) => 100 / t}%;
45
+ flex: 0 0 ${({
46
+ $visibleSlides: t
47
+ }) => 100 / t}%;
38
48
  min-width: 0;
39
49
  box-sizing: border-box;
40
50
  }
41
51
  `, J = o.button`
42
52
  position: absolute;
43
- top: ${({ $arrowTop: t }) => t != null ? t : "50%"};
53
+ top: ${({
54
+ $arrowTop: t
55
+ }) => t != null ? t : "50%"};
44
56
  transform: translateY(-50%);
45
57
  z-index: 1;
46
58
  display: flex;
@@ -58,7 +70,10 @@ const xe = o.div`
58
70
  opacity 0.3s;
59
71
  padding: 0;
60
72
 
61
- ${({ $direction: t, $overlay: u }) => t === "prev" ? `left: ${u ? "12px" : "-16px"};` : `right: ${u ? "12px" : "-16px"};`}
73
+ ${({
74
+ $direction: t,
75
+ $overlay: u
76
+ }) => t === "prev" ? `left: ${u ? "12px" : "-16px"};` : `right: ${u ? "12px" : "-16px"};`}
62
77
 
63
78
  &:hover:not(:disabled) {
64
79
  background: #f5f5f5;
@@ -75,11 +90,16 @@ const xe = o.div`
75
90
  border-color: #f9a8c0;
76
91
  }
77
92
 
78
- ${({ $viewportFocused: t }) => t && `
93
+ ${({
94
+ $viewportFocused: t
95
+ }) => t && `
79
96
  border-color: #bdbdbd;
80
97
  `}
81
98
 
82
- ${({ $overlay: t, $visible: u }) => t && !u && `
99
+ ${({
100
+ $overlay: t,
101
+ $visible: u
102
+ }) => t && !u && `
83
103
  opacity: 0;
84
104
  pointer-events: none;
85
105
  `}
@@ -88,11 +108,15 @@ const xe = o.div`
88
108
  gap: 6px;
89
109
  align-items: center;
90
110
  `, ke = o.button`
91
- width: ${({ $active: t }) => t ? "20px" : "8px"};
111
+ width: ${({
112
+ $active: t
113
+ }) => t ? "20px" : "8px"};
92
114
  height: 8px;
93
115
  border-radius: 4px;
94
116
  border: none;
95
- background: ${({ $active: t }) => t ? "#333" : "#ccc"};
117
+ background: ${({
118
+ $active: t
119
+ }) => t ? "#333" : "#ccc"};
96
120
  cursor: pointer;
97
121
  padding: 0;
98
122
  transition:
@@ -115,8 +139,12 @@ const xe = o.div`
115
139
  inset: 0;
116
140
  width: 0%;
117
141
  background: #333;
118
- animation: ${ye} ${({ $duration: t }) => t}s linear forwards;
119
- animation-play-state: ${({ $paused: t }) => t ? "paused" : "running"};
142
+ animation: ${ye} ${({
143
+ $duration: t
144
+ }) => t}s linear forwards;
145
+ animation-play-state: ${({
146
+ $paused: t
147
+ }) => t ? "paused" : "running"};
120
148
 
121
149
  @media (prefers-reduced-motion: reduce) {
122
150
  animation: none;
@@ -221,120 +249,37 @@ const xe = o.div`
221
249
  }, ue = (e) => {
222
250
  e.key === "ArrowLeft" ? (e.preventDefault(), M()) : e.key === "ArrowRight" && (e.preventDefault(), E());
223
251
  }, Y = (G = (A = U.current) == null ? void 0 : A.clientWidth) != null ? G : 0, de = Y > 0 ? te / Y * 100 : 0, fe = -(i * (100 / L)) + de, q = v !== void 0 ? typeof v == "number" ? `${v}px` : v : void 0, z = s + 1;
224
- return /* @__PURE__ */ C(
225
- xe,
226
- {
227
- onClick: K,
228
- onMouseEnter: ne,
229
- onMouseLeave: re,
230
- onMouseMove: ce,
231
- onMouseUp: le,
232
- onKeyDown: ue,
233
- role: "region",
234
- "aria-label": "Carousel",
235
- ...ee,
236
- children: [
237
- /* @__PURE__ */ C(
238
- me,
239
- {
240
- onTouchStart: ie,
241
- onTouchMove: oe,
242
- onTouchEnd: se,
243
- children: [
244
- V && /* @__PURE__ */ r(
245
- J,
246
- {
247
- onClick: M,
248
- disabled: !h && i === 0,
249
- "aria-label": "Previous slide",
250
- $direction: "prev",
251
- $overlay: a,
252
- $visible: W,
253
- $arrowTop: q,
254
- $viewportFocused: F,
255
- children: /* @__PURE__ */ r(pe, { size: 20, "aria-hidden": "true" })
256
- }
257
- ),
258
- /* @__PURE__ */ r(
259
- ve,
260
- {
261
- ref: U,
262
- tabIndex: 0,
263
- "aria-label": "Carousel slides. Use arrow keys to navigate.",
264
- $draggable: $,
265
- onFocus: () => {
266
- j(!0), g(!0);
267
- },
268
- onBlur: () => {
269
- j(!1), g(!1);
270
- },
271
- onMouseDown: ae,
272
- onMouseLeave: (e) => {
273
- e.buttons !== 1 && (k && _ && (m(!1), x(0)), c.current = null);
274
- },
275
- children: /* @__PURE__ */ r(we, { $translateX: fe, $visibleSlides: L, $dragging: _, children: t.map(u) })
276
- }
277
- ),
278
- V && /* @__PURE__ */ r(
279
- J,
280
- {
281
- onClick: E,
282
- disabled: !h && i === s,
283
- "aria-label": "Next slide",
284
- $direction: "next",
285
- $overlay: a,
286
- $visible: W,
287
- $arrowTop: q,
288
- $viewportFocused: F,
289
- children: /* @__PURE__ */ r(be, { size: 20, "aria-hidden": "true" })
290
- }
291
- ),
292
- w && /* @__PURE__ */ r(
293
- Ee,
294
- {
295
- onClick: () => g((e) => !e),
296
- "aria-label": b ? "Play slideshow" : "Pause slideshow",
297
- children: b ? /* @__PURE__ */ r(Te, {}) : /* @__PURE__ */ r(Ie, {})
298
- }
299
- )
300
- ]
301
- }
302
- ),
303
- /* @__PURE__ */ C(
304
- "div",
305
- {
306
- "aria-live": "polite",
307
- "aria-atomic": "true",
308
- style: {
309
- position: "absolute",
310
- width: 1,
311
- height: 1,
312
- overflow: "hidden",
313
- clip: "rect(0,0,0,0)",
314
- whiteSpace: "nowrap"
315
- },
316
- children: [
317
- "Slide ",
318
- i + 1,
319
- " of ",
320
- z
321
- ]
322
- }
323
- ),
324
- w && Z && /* @__PURE__ */ r(Me, { $duration: D, $paused: b }, i),
325
- !Q && /* @__PURE__ */ r($e, { children: Array.from({ length: z }).map((e, n) => /* @__PURE__ */ r(
326
- ke,
327
- {
328
- $active: n === i,
329
- onClick: () => y(n),
330
- "aria-label": `Slide ${n + 1} of ${z}`,
331
- "aria-current": n === i ? "true" : void 0
332
- },
333
- n
334
- )) })
335
- ]
336
- }
337
- );
252
+ return /* @__PURE__ */ C(xe, { onClick: K, onMouseEnter: ne, onMouseLeave: re, onMouseMove: ce, onMouseUp: le, onKeyDown: ue, role: "region", "aria-label": "Carousel", ...ee, children: [
253
+ /* @__PURE__ */ C(me, { onTouchStart: ie, onTouchMove: oe, onTouchEnd: se, children: [
254
+ V && /* @__PURE__ */ r(J, { onClick: M, disabled: !h && i === 0, "aria-label": "Previous slide", $direction: "prev", $overlay: a, $visible: W, $arrowTop: q, $viewportFocused: F, children: /* @__PURE__ */ r(pe, { size: 20, "aria-hidden": "true" }) }),
255
+ /* @__PURE__ */ r(ve, { ref: U, tabIndex: 0, "aria-label": "Carousel slides. Use arrow keys to navigate.", $draggable: $, onFocus: () => {
256
+ j(!0), g(!0);
257
+ }, onBlur: () => {
258
+ j(!1), g(!1);
259
+ }, onMouseDown: ae, onMouseLeave: (e) => {
260
+ e.buttons !== 1 && (k && _ && (m(!1), x(0)), c.current = null);
261
+ }, children: /* @__PURE__ */ r(we, { $translateX: fe, $visibleSlides: L, $dragging: _, children: t.map(u) }) }),
262
+ V && /* @__PURE__ */ r(J, { onClick: E, disabled: !h && i === s, "aria-label": "Next slide", $direction: "next", $overlay: a, $visible: W, $arrowTop: q, $viewportFocused: F, children: /* @__PURE__ */ r(be, { size: 20, "aria-hidden": "true" }) }),
263
+ w && /* @__PURE__ */ r(Ee, { onClick: () => g((e) => !e), "aria-label": b ? "Play slideshow" : "Pause slideshow", children: b ? /* @__PURE__ */ r(Te, {}) : /* @__PURE__ */ r(Ie, {}) })
264
+ ] }),
265
+ /* @__PURE__ */ C("div", { "aria-live": "polite", "aria-atomic": "true", style: {
266
+ position: "absolute",
267
+ width: 1,
268
+ height: 1,
269
+ overflow: "hidden",
270
+ clip: "rect(0,0,0,0)",
271
+ whiteSpace: "nowrap"
272
+ }, children: [
273
+ "Slide ",
274
+ i + 1,
275
+ " of ",
276
+ z
277
+ ] }),
278
+ w && Z && /* @__PURE__ */ r(Me, { $duration: D, $paused: b }, i),
279
+ !Q && /* @__PURE__ */ r($e, { children: Array.from({
280
+ length: z
281
+ }).map((e, n) => /* @__PURE__ */ r(ke, { $active: n === i, onClick: () => y(n), "aria-label": `Slide ${n + 1} of ${z}`, "aria-current": n === i ? "true" : void 0 }, n)) })
282
+ ] });
338
283
  };
339
284
  export {
340
285
  Pe as default