meticulous-ui 3.7.12 → 3.7.13
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.
- package/components/Button/Button.js +46 -67
- package/components/Carousel/Carousel.js +127 -72
- package/components/DatePicker/DatePicker.js +181 -142
- package/components/DatePicker/constants.js +14 -1
- package/components/DatePicker/utils.js +1 -5
- package/components/Dropdown/Dropdown.js +114 -80
- package/components/Glass/Glass.js +2 -8
- package/components/Icons/Add.js +44 -11
- package/components/Icons/AddCircle.js +29 -8
- package/components/Icons/AddCircleFilled.js +20 -5
- package/components/Icons/ArrowDown.js +20 -5
- package/components/Icons/ArrowLeft.js +21 -5
- package/components/Icons/ArrowRight.js +21 -5
- package/components/Icons/ArrowUp.js +20 -5
- package/components/Icons/BagFilled.js +20 -5
- package/components/Icons/BagOutline.js +30 -8
- package/components/Icons/BellFilled.js +31 -8
- package/components/Icons/BellOffFilled.js +40 -9
- package/components/Icons/BellOffOutline.js +42 -9
- package/components/Icons/BellOutline.js +33 -8
- package/components/Icons/BookmarkFilled.js +23 -10
- package/components/Icons/BookmarkOutline.js +20 -5
- package/components/Icons/BoxCoveredFilled.js +41 -10
- package/components/Icons/BoxCoveredOutline.js +31 -8
- package/components/Icons/BoxFilled.js +34 -9
- package/components/Icons/BoxOutline.js +31 -8
- package/components/Icons/CalendarDays.js +20 -5
- package/components/Icons/CalendarLinesPen.js +21 -5
- package/components/Icons/CartCheckFilled.js +36 -9
- package/components/Icons/CartCheckOutline.js +46 -10
- package/components/Icons/CartCrossFilled.js +36 -9
- package/components/Icons/CartCrossOutline.js +45 -10
- package/components/Icons/CartFilled.js +34 -9
- package/components/Icons/CartMinusFilled.js +36 -9
- package/components/Icons/CartMinusOutline.js +47 -11
- package/components/Icons/CartOutline.js +46 -10
- package/components/Icons/CartPlusFilled.js +36 -9
- package/components/Icons/CartPlusOutline.js +45 -10
- package/components/Icons/Check.js +21 -5
- package/components/Icons/CheckDouble.js +21 -5
- package/components/Icons/ChevronDown.js +21 -5
- package/components/Icons/ChevronLeft.js +21 -5
- package/components/Icons/ChevronRight.js +21 -5
- package/components/Icons/ChevronUp.js +21 -5
- package/components/Icons/ClockCircleOutline.js +24 -8
- package/components/Icons/ClockSquareOutline.js +31 -8
- package/components/Icons/Close.js +18 -5
- package/components/Icons/CloseCircleFilled.js +20 -5
- package/components/Icons/CloseCircleOutline.js +21 -5
- package/components/Icons/CommentBubbleFilled.js +23 -10
- package/components/Icons/CommentBubbleOutline.js +23 -10
- package/components/Icons/CommentFilled.js +23 -10
- package/components/Icons/CommentLineFilled.js +23 -10
- package/components/Icons/CommentLineOutline.js +23 -10
- package/components/Icons/CommentOutline.js +23 -10
- package/components/Icons/ContactDetailsFilled.js +15 -8
- package/components/Icons/ContactDetailsOutline.js +15 -8
- package/components/Icons/DeliveryTruckFastFilled.js +26 -13
- package/components/Icons/DeliveryTruckFastOutline.js +26 -13
- package/components/Icons/DeliveryTruckLeftFilled.js +22 -9
- package/components/Icons/DeliveryTruckLeftOutline.js +22 -9
- package/components/Icons/DeliveryTruckRightFilled.js +21 -8
- package/components/Icons/DeliveryTruckRightOutline.js +21 -8
- package/components/Icons/DetailsOutline.js +15 -8
- package/components/Icons/DiscordConversation.js +27 -8
- package/components/Icons/DiscordFilled.js +21 -8
- package/components/Icons/DiscordOutline.js +25 -9
- package/components/Icons/DoorClosedFilled.js +20 -5
- package/components/Icons/DoorClosedOutline.js +21 -5
- package/components/Icons/DoorOpenFilled.js +20 -5
- package/components/Icons/DoorOpenOutline.js +21 -5
- package/components/Icons/DotsHorizontalFilled.js +34 -9
- package/components/Icons/DotsHorizontalOutline.js +43 -9
- package/components/Icons/DotsVerticalFilled.js +34 -9
- package/components/Icons/DotsVerticalOutline.js +43 -9
- package/components/Icons/Download.js +27 -8
- package/components/Icons/DownloadBoxFilled.js +20 -5
- package/components/Icons/DownloadBoxOutline.js +36 -9
- package/components/Icons/EditBoxThick.js +21 -5
- package/components/Icons/EditBoxThin.js +33 -8
- package/components/Icons/EmailFilled.js +19 -6
- package/components/Icons/EmailOutline.js +19 -6
- package/components/Icons/ExitArrowInOutline.js +21 -5
- package/components/Icons/ExitArrowOutOutline.js +33 -8
- package/components/Icons/ExitFullScreen.js +19 -5
- package/components/Icons/ExitFullScreenThick.js +19 -5
- package/components/Icons/EyeClosed.js +20 -5
- package/components/Icons/EyeFilled.js +29 -8
- package/components/Icons/EyeOutline.js +33 -8
- package/components/Icons/FacebookFilled.js +19 -6
- package/components/Icons/FacebookMessengerOutline.js +29 -8
- package/components/Icons/FacebookOutline.js +20 -5
- package/components/Icons/FacebookRoundFilled.js +18 -5
- package/components/Icons/Filter.js +17 -10
- package/components/Icons/FilterList.js +21 -5
- package/components/Icons/FilterThickFilled.js +18 -5
- package/components/Icons/FilterThickOutline.js +19 -5
- package/components/Icons/FullScreenArrowThick.js +19 -5
- package/components/Icons/FullScreenArrowThin.js +19 -5
- package/components/Icons/FullScreenExit.js +41 -10
- package/components/Icons/FullScreenFilled.js +20 -5
- package/components/Icons/FullScreenOutline.js +20 -5
- package/components/Icons/HamburgerMenu.js +40 -9
- package/components/Icons/HamburgerSpaced.js +23 -10
- package/components/Icons/HeartFilled.js +18 -5
- package/components/Icons/HeartOutline.js +23 -5
- package/components/Icons/Help.js +21 -5
- package/components/Icons/HelpCircleFilled.js +20 -5
- package/components/Icons/HelpCircleOutline.js +41 -9
- package/components/Icons/HomeFilled.js +20 -5
- package/components/Icons/HomeOutline.js +20 -5
- package/components/Icons/Info.js +27 -8
- package/components/Icons/InfoCircleFilled.js +20 -5
- package/components/Icons/InfoCircleOutline.js +16 -9
- package/components/Icons/InfoSquareFilled.js +20 -5
- package/components/Icons/InfoSquareOutline.js +23 -9
- package/components/Icons/InstagramOuline.js +21 -8
- package/components/Icons/InstagramRoundFilled.js +44 -13
- package/components/Icons/KeyFilled.js +20 -5
- package/components/Icons/KeyInSquareFilled.js +29 -8
- package/components/Icons/KeyInSquareOutline.js +38 -9
- package/components/Icons/KeyOutline.js +31 -8
- package/components/Icons/KeySideSquareFilled.js +29 -8
- package/components/Icons/KeySideSquareOutline.js +20 -5
- package/components/Icons/KeySquareFilled.js +29 -8
- package/components/Icons/KeySquareOutline.js +20 -5
- package/components/Icons/Link.js +31 -8
- package/components/Icons/LinkedinFilled.js +19 -6
- package/components/Icons/LinkedinOutline.js +19 -5
- package/components/Icons/LinkedinRoundFilled.js +19 -6
- package/components/Icons/Loading.js +21 -8
- package/components/Icons/LocationArrowFilled.js +12 -5
- package/components/Icons/LocationArrowOutline.js +21 -5
- package/components/Icons/LocationFilled.js +23 -10
- package/components/Icons/LocationOutline.js +23 -10
- package/components/Icons/LockKeyhole.js +20 -5
- package/components/Icons/LockKeyholeOutline.js +31 -9
- package/components/Icons/LockKeyholeUnlocked.js +20 -5
- package/components/Icons/LockKeyholeUnlockedOutline.js +31 -9
- package/components/Icons/MediaPauseCircleFilled.js +20 -5
- package/components/Icons/MediaPauseCircleOuline.js +36 -9
- package/components/Icons/MediaPauseFilled.js +27 -8
- package/components/Icons/MediaPauseOutline.js +31 -8
- package/components/Icons/MediaPlayCircleFilled.js +20 -5
- package/components/Icons/MediaPlayCircleOutline.js +31 -8
- package/components/Icons/MediaPlayFilled.js +18 -5
- package/components/Icons/MediaPlayOutline.js +20 -5
- package/components/Icons/MediaStopCircleFilled.js +20 -5
- package/components/Icons/MediaStopCircleOutline.js +31 -8
- package/components/Icons/MediaStopFilled.js +18 -5
- package/components/Icons/MediaStopOutline.js +20 -5
- package/components/Icons/Minus.js +21 -5
- package/components/Icons/MinusCircle.js +23 -10
- package/components/Icons/MinusCircleFilled.js +23 -10
- package/components/Icons/MoneyBagOutline.js +46 -10
- package/components/Icons/MoneyBriefcaseFilled.js +20 -5
- package/components/Icons/MoneyBriefcaseOutline.js +38 -9
- package/components/Icons/NoEntry.js +19 -5
- package/components/Icons/NoEntryFilled.js +18 -5
- package/components/Icons/NoEntryOutline.js +21 -8
- package/components/Icons/PaymentCardFilled.js +16 -9
- package/components/Icons/PaymentCardOutline.js +16 -9
- package/components/Icons/PhoneCallingFilled.js +36 -9
- package/components/Icons/PhoneCallingOutline.js +38 -9
- package/components/Icons/PhoneFilled.js +18 -5
- package/components/Icons/PhoneOutline.js +18 -5
- package/components/Icons/Pin.js +21 -5
- package/components/Icons/PinAddFilled.js +17 -10
- package/components/Icons/PinAddOutline.js +17 -10
- package/components/Icons/PinCircleFilled.js +20 -5
- package/components/Icons/PinCircleOutline.js +21 -8
- package/components/Icons/PinFilled.js +18 -5
- package/components/Icons/PinOutline.js +20 -5
- package/components/Icons/PinSubFilled.js +17 -10
- package/components/Icons/PinSubOutline.js +17 -10
- package/components/Icons/PinterestFilled.js +17 -10
- package/components/Icons/PinterestOutline.js +21 -5
- package/components/Icons/ProfileFemaleOutline.js +19 -6
- package/components/Icons/ProfileGroupFilled.js +28 -8
- package/components/Icons/ProfileMaleFilled.js +28 -8
- package/components/Icons/ProfileMaleOutline.js +19 -6
- package/components/Icons/RedditFilled.js +17 -10
- package/components/Icons/RedditOutline.js +43 -10
- package/components/Icons/RedditRoundFilled.js +52 -15
- package/components/Icons/RedditRoundOutline.js +53 -16
- package/components/Icons/RupeeOutlined.js +18 -5
- package/components/Icons/RupeeSign.js +21 -5
- package/components/Icons/SaveFilled.js +23 -10
- package/components/Icons/SaveOutline.js +23 -10
- package/components/Icons/Search.js +23 -10
- package/components/Icons/SettingFilled.js +18 -5
- package/components/Icons/SettingOutline.js +18 -5
- package/components/Icons/ShareAllFilled.js +20 -5
- package/components/Icons/ShareAllOutline.js +39 -11
- package/components/Icons/ShareBoxOutline.js +18 -5
- package/components/Icons/ShareFilled.js +29 -8
- package/components/Icons/ShareOutline.js +32 -8
- package/components/Icons/ShareThickFilled.js +18 -5
- package/components/Icons/ShieldCheckFilled.js +20 -5
- package/components/Icons/ShieldCheckOutline.js +31 -8
- package/components/Icons/ShieldCrossFilled.js +20 -5
- package/components/Icons/ShieldCrossOutline.js +30 -8
- package/components/Icons/ShieldFilled.js +18 -5
- package/components/Icons/ShieldOutline.js +20 -5
- package/components/Icons/ShieldWarningFilled.js +20 -5
- package/components/Icons/ShieldWarningOutline.js +23 -9
- package/components/Icons/SnapchatFilled.js +17 -10
- package/components/Icons/SnapchatOutline.js +20 -5
- package/components/Icons/SortBottomToTop.js +26 -10
- package/components/Icons/SortHorizontal.js +20 -5
- package/components/Icons/SortTopToBottom.js +26 -10
- package/components/Icons/SortVertical.js +20 -5
- package/components/Icons/StarFilled.js +19 -6
- package/components/Icons/StarOutline.js +19 -6
- package/components/Icons/TelegramFilled.js +22 -9
- package/components/Icons/TelegramOutline.js +20 -5
- package/components/Icons/TelegramRoundFilled.js +22 -9
- package/components/Icons/ThumbsDownFilled.js +18 -5
- package/components/Icons/ThumbsDownOutline.js +18 -5
- package/components/Icons/ThumbsUpFilled.js +18 -5
- package/components/Icons/ThumbsUpOutline.js +18 -5
- package/components/Icons/TiktokBox.js +18 -5
- package/components/Icons/TiktokThickFilled.js +21 -8
- package/components/Icons/TiktokThinFilled.js +32 -8
- package/components/Icons/TrashBigFilled.js +23 -10
- package/components/Icons/TrashBigOutline.js +23 -10
- package/components/Icons/TrashFilled.js +27 -8
- package/components/Icons/TrashLinesFilled.js +29 -8
- package/components/Icons/TrashLinesOutline.js +33 -11
- package/components/Icons/TrashOutline.js +31 -9
- package/components/Icons/Upload.js +27 -8
- package/components/Icons/UploadBoxFilled.js +20 -5
- package/components/Icons/UploadBoxOutline.js +36 -9
- package/components/Icons/VolumeFilled.js +30 -11
- package/components/Icons/VolumeMuteFilled.js +30 -11
- package/components/Icons/VolumeMuteOutline.js +30 -11
- package/components/Icons/VolumeOffFilled.js +30 -11
- package/components/Icons/VolumeOffOutline.js +30 -11
- package/components/Icons/VolumeOutline.js +30 -11
- package/components/Icons/WalletFilled.js +23 -10
- package/components/Icons/WalletOutline.js +23 -10
- package/components/Icons/Warning.js +21 -5
- package/components/Icons/WarningCircleFilled.js +18 -5
- package/components/Icons/WarningCircleOutline.js +18 -5
- package/components/Icons/WarningSmall.js +21 -5
- package/components/Icons/WarningTriangleFilled.js +21 -8
- package/components/Icons/WarningTriangleOutline.js +21 -5
- package/components/Icons/WhatsappFilled.js +17 -10
- package/components/Icons/WhatsappOutline.js +20 -5
- package/components/Icons/Youtube.js +18 -5
- package/components/Icons/YoutubeFilled.js +23 -10
- package/components/Icons/YoutubeRoundFilled.js +22 -9
- package/components/Image/Image.js +33 -27
- package/components/Input/Checkbox/Checkbox.js +30 -20
- package/components/Input/FileUploader/FileUploader.js +73 -82
- package/components/Input/Input/Input.js +49 -47
- package/components/Input/Radio/Radio.js +18 -17
- package/components/Input/RadioGroup/RadioGroup.js +33 -16
- package/components/Input/Textarea/SvgIcon.js +1 -7
- package/components/Input/Textarea/Textarea.js +54 -54
- package/components/Loader/Loader.js +18 -29
- package/components/Loader/constants.js +3 -12
- package/components/MenuItem/MenuItem.js +30 -28
- package/components/Modal/Modal.js +58 -37
- package/components/OtpInput/OtpInput.js +28 -28
- package/components/PageLoader/PageLoader.js +13 -9
- package/components/Pagination/Pagination.js +87 -95
- package/components/Ripple/Ripple.js +12 -2
- package/components/RootComponent/RootComponent.js +1 -4
- package/components/Selectbox/Selectbox.js +143 -101
- package/components/Shimmer/Shimmer.js +17 -13
- package/components/Spinner/Spinner.js +29 -22
- package/components/Timer/Timer.js +154 -92
- package/components/Timer/components/TimerRing/TimerRing.js +56 -11
- package/components/Toast/Toast.js +76 -81
- package/components/Typography/Headings/H1.js +2 -8
- package/components/Typography/Headings/H2.js +2 -8
- package/components/Typography/Headings/H3.js +2 -8
- package/components/Typography/Headings/H4.js +2 -8
- package/components/Typography/Headings/H5.js +2 -8
- package/components/Typography/Headings/H6.js +2 -8
- package/components/Typography/Headings/index.js +1 -8
- package/components/Typography/P/P.js +3 -12
- package/components/VideoPlayer/VideoPlayer.js +19 -23
- package/components/VideoPlayer/components/Volumebar/Volumebar.js +2 -6
- package/components/VideoPlayer/useSpacebarToggle.js +11 -1
- package/components/VideoPlayer/useVolumeOverlay.js +1 -4
- package/hooks/useThrottle.js +6 -3
- package/hooks/useWindowSize.js +1 -4
- package/package.json +1 -1
- package/reactUtils/composeProviders.js +1 -3
- package/reactUtils/lazyImport.js +1 -3
- package/reactUtils/withErrorBoundary.js +2 -8
- package/utils/cancelablePromise.js +4 -5
- package/utils/createPubSub.js +9 -12
- package/utils/formatCompactNumber.js +3 -4
- package/utils/formatCurrency.js +1 -4
- package/utils/formatDate.js +3 -5
- package/utils/handleKeyboardNavigation.js +1 -5
- package/utils/isAuthenticated.js +1 -3
- package/utils/logError.js +1 -4
- package/utils/logInfo.js +1 -6
- package/utils/logWarn.js +1 -6
- package/utils/mergeDeep.js +1 -3
- package/utils/multiSort.js +1 -4
- package/utils/scrollToElement.js +1 -4
- package/utils/scrollToTop.js +1 -4
- package/utils/timeAgo.js +1 -3
- package/utils/trackEvent.js +1 -5
- package/utils/withTimeout.js +3 -1
|
@@ -10,46 +10,27 @@ 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: ${({
|
|
14
|
-
$
|
|
15
|
-
}) => o}rem;
|
|
16
|
-
width: ${({
|
|
17
|
-
$width: o
|
|
18
|
-
}) => o}rem;
|
|
13
|
+
height: ${({ $height: o }) => o}rem;
|
|
14
|
+
width: ${({ $width: o }) => o}rem;
|
|
19
15
|
border-radius: 0.96rem;
|
|
20
16
|
border: none;
|
|
21
17
|
padding: 0.96rem 0.64rem;
|
|
22
18
|
position: relative;
|
|
23
19
|
overflow: hidden;
|
|
24
|
-
background-color: ${({
|
|
25
|
-
$
|
|
26
|
-
disabled: e
|
|
27
|
-
}) => e ? y.m500 : o};
|
|
28
|
-
cursor: ${({
|
|
29
|
-
disabled: o,
|
|
30
|
-
$isLoading: e
|
|
31
|
-
}) => o ? "not-allowed" : e ? "auto" : "pointer"};
|
|
20
|
+
background-color: ${({ $selectedColor: o, disabled: e }) => e ? y.m500 : o};
|
|
21
|
+
cursor: ${({ disabled: o, $isLoading: e }) => o ? "not-allowed" : e ? "auto" : "pointer"};
|
|
32
22
|
|
|
33
|
-
${({
|
|
34
|
-
$isLoading: o
|
|
35
|
-
}) => o && a`
|
|
23
|
+
${({ $isLoading: o }) => o && a`
|
|
36
24
|
pointer-events: none;
|
|
37
25
|
`};
|
|
38
26
|
|
|
39
|
-
${({
|
|
40
|
-
disabled: o,
|
|
41
|
-
$isLoading: e
|
|
42
|
-
}) => !(o || e) && a`
|
|
27
|
+
${({ disabled: o, $isLoading: e }) => !(o || e) && a`
|
|
43
28
|
&:hover {
|
|
44
|
-
background-color: ${({
|
|
45
|
-
$hoverColor: r
|
|
46
|
-
}) => r};
|
|
29
|
+
background-color: ${({ $hoverColor: r }) => r};
|
|
47
30
|
}
|
|
48
31
|
|
|
49
32
|
&:active {
|
|
50
|
-
background-color: ${({
|
|
51
|
-
$activeColor: r
|
|
52
|
-
}) => r};
|
|
33
|
+
background-color: ${({ $activeColor: r }) => r};
|
|
53
34
|
}
|
|
54
35
|
`};
|
|
55
36
|
|
|
@@ -57,34 +38,21 @@ const K = l.button`
|
|
|
57
38
|
outline: none;
|
|
58
39
|
}
|
|
59
40
|
`, M = l.div`
|
|
60
|
-
font-size: ${({
|
|
61
|
-
$font: o
|
|
62
|
-
}) => o}rem;
|
|
41
|
+
font-size: ${({ $font: o }) => o}rem;
|
|
63
42
|
font-weight: 500;
|
|
64
43
|
max-width: 100%;
|
|
65
44
|
overflow: hidden;
|
|
66
|
-
color: ${({
|
|
67
|
-
$
|
|
68
|
-
}) => o};
|
|
69
|
-
opacity: ${({
|
|
70
|
-
$isLoading: o
|
|
71
|
-
}) => o ? 0 : 1};
|
|
45
|
+
color: ${({ $textColor: o }) => o};
|
|
46
|
+
opacity: ${({ $isLoading: o }) => o ? 0 : 1};
|
|
72
47
|
transition: opacity 0.3s ease;
|
|
73
48
|
`, W = l.div`
|
|
74
|
-
height: ${({
|
|
75
|
-
$
|
|
76
|
-
}) => o}rem;
|
|
77
|
-
width: ${({
|
|
78
|
-
$width: o
|
|
79
|
-
}) => o}rem;
|
|
49
|
+
height: ${({ $height: o }) => o}rem;
|
|
50
|
+
width: ${({ $width: o }) => o}rem;
|
|
80
51
|
display: inline-block;
|
|
81
52
|
position: relative;
|
|
82
53
|
border-radius: 0.96rem;
|
|
83
54
|
|
|
84
|
-
${({
|
|
85
|
-
disabled: o,
|
|
86
|
-
$isLoading: e
|
|
87
|
-
}) => !(o || e) && a`
|
|
55
|
+
${({ disabled: o, $isLoading: e }) => !(o || e) && a`
|
|
88
56
|
box-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.2);
|
|
89
57
|
transition:
|
|
90
58
|
transform 0.2s,
|
|
@@ -102,15 +70,10 @@ const K = l.button`
|
|
|
102
70
|
display: flex;
|
|
103
71
|
align-items: center;
|
|
104
72
|
justify-content: center;
|
|
105
|
-
opacity: ${({
|
|
106
|
-
$isLoading: o
|
|
107
|
-
}) => o ? 1 : 0};
|
|
73
|
+
opacity: ${({ $isLoading: o }) => o ? 1 : 0};
|
|
108
74
|
transition: opacity 0.3s ease;
|
|
109
75
|
pointer-events: none;
|
|
110
|
-
`, U = ({
|
|
111
|
-
theme: o,
|
|
112
|
-
children: e
|
|
113
|
-
}) => /* @__PURE__ */ i(B, { rippleColor: o.m100, children: e }), Y = (o) => {
|
|
76
|
+
`, U = ({ theme: o, children: e }) => /* @__PURE__ */ i(B, { rippleColor: o.m100, children: e }), Y = (o) => {
|
|
114
77
|
var b;
|
|
115
78
|
const {
|
|
116
79
|
children: e,
|
|
@@ -133,19 +96,35 @@ const K = l.button`
|
|
|
133
96
|
p.current = g;
|
|
134
97
|
}
|
|
135
98
|
d == null || d(s);
|
|
136
|
-
}, {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
+
);
|
|
149
128
|
};
|
|
150
129
|
Y.propTypes = {
|
|
151
130
|
/** Button label or content */
|
|
@@ -155,7 +134,7 @@ Y.propTypes = {
|
|
|
155
134
|
/** Button size variant: `'small'`, `'medium'`, `'large'`, or `'ex-large'` */
|
|
156
135
|
size: t.string,
|
|
157
136
|
/** Override the button width */
|
|
158
|
-
width:
|
|
137
|
+
width: t.oneOfType([t.string, t.number]),
|
|
159
138
|
/** Icon component rendered to the left of the label */
|
|
160
139
|
leftIcon: t.elementType,
|
|
161
140
|
/** Icon component rendered to the right of the label */
|
|
@@ -18,41 +18,29 @@ const xe = o.div`
|
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
width: 100%;
|
|
20
20
|
outline: none;
|
|
21
|
-
cursor: ${({
|
|
22
|
-
$draggable: t
|
|
23
|
-
}) => t ? "grab" : "default"};
|
|
21
|
+
cursor: ${({ $draggable: t }) => t ? "grab" : "default"};
|
|
24
22
|
|
|
25
23
|
&:active {
|
|
26
|
-
cursor: ${({
|
|
27
|
-
$draggable: t
|
|
28
|
-
}) => t ? "grabbing" : "default"};
|
|
24
|
+
cursor: ${({ $draggable: t }) => t ? "grabbing" : "default"};
|
|
29
25
|
}
|
|
30
26
|
`, we = o.div`
|
|
31
27
|
display: flex;
|
|
32
28
|
width: 100%;
|
|
33
|
-
transform: translateX(${({
|
|
34
|
-
$
|
|
35
|
-
}) => t}%);
|
|
36
|
-
transition: ${({
|
|
37
|
-
$dragging: t
|
|
38
|
-
}) => t ? "none" : "transform 0.35s ease"};
|
|
29
|
+
transform: translateX(${({ $translateX: t }) => t}%);
|
|
30
|
+
transition: ${({ $dragging: t }) => t ? "none" : "transform 0.35s ease"};
|
|
39
31
|
|
|
40
32
|
@media (prefers-reduced-motion: reduce) {
|
|
41
33
|
transition: none;
|
|
42
34
|
}
|
|
43
35
|
|
|
44
36
|
& > * {
|
|
45
|
-
flex: 0 0 ${({
|
|
46
|
-
$visibleSlides: t
|
|
47
|
-
}) => 100 / t}%;
|
|
37
|
+
flex: 0 0 ${({ $visibleSlides: t }) => 100 / t}%;
|
|
48
38
|
min-width: 0;
|
|
49
39
|
box-sizing: border-box;
|
|
50
40
|
}
|
|
51
41
|
`, J = o.button`
|
|
52
42
|
position: absolute;
|
|
53
|
-
top: ${({
|
|
54
|
-
$arrowTop: t
|
|
55
|
-
}) => t != null ? t : "50%"};
|
|
43
|
+
top: ${({ $arrowTop: t }) => t != null ? t : "50%"};
|
|
56
44
|
transform: translateY(-50%);
|
|
57
45
|
z-index: 1;
|
|
58
46
|
display: flex;
|
|
@@ -70,10 +58,7 @@ const xe = o.div`
|
|
|
70
58
|
opacity 0.3s;
|
|
71
59
|
padding: 0;
|
|
72
60
|
|
|
73
|
-
${({
|
|
74
|
-
$direction: t,
|
|
75
|
-
$overlay: u
|
|
76
|
-
}) => t === "prev" ? `left: ${u ? "12px" : "-16px"};` : `right: ${u ? "12px" : "-16px"};`}
|
|
61
|
+
${({ $direction: t, $overlay: u }) => t === "prev" ? `left: ${u ? "12px" : "-16px"};` : `right: ${u ? "12px" : "-16px"};`}
|
|
77
62
|
|
|
78
63
|
&:hover:not(:disabled) {
|
|
79
64
|
background: #f5f5f5;
|
|
@@ -90,16 +75,11 @@ const xe = o.div`
|
|
|
90
75
|
border-color: #f9a8c0;
|
|
91
76
|
}
|
|
92
77
|
|
|
93
|
-
${({
|
|
94
|
-
$viewportFocused: t
|
|
95
|
-
}) => t && `
|
|
78
|
+
${({ $viewportFocused: t }) => t && `
|
|
96
79
|
border-color: #bdbdbd;
|
|
97
80
|
`}
|
|
98
81
|
|
|
99
|
-
${({
|
|
100
|
-
$overlay: t,
|
|
101
|
-
$visible: u
|
|
102
|
-
}) => t && !u && `
|
|
82
|
+
${({ $overlay: t, $visible: u }) => t && !u && `
|
|
103
83
|
opacity: 0;
|
|
104
84
|
pointer-events: none;
|
|
105
85
|
`}
|
|
@@ -108,15 +88,11 @@ const xe = o.div`
|
|
|
108
88
|
gap: 6px;
|
|
109
89
|
align-items: center;
|
|
110
90
|
`, ke = o.button`
|
|
111
|
-
width: ${({
|
|
112
|
-
$active: t
|
|
113
|
-
}) => t ? "20px" : "8px"};
|
|
91
|
+
width: ${({ $active: t }) => t ? "20px" : "8px"};
|
|
114
92
|
height: 8px;
|
|
115
93
|
border-radius: 4px;
|
|
116
94
|
border: none;
|
|
117
|
-
background: ${({
|
|
118
|
-
$active: t
|
|
119
|
-
}) => t ? "#333" : "#ccc"};
|
|
95
|
+
background: ${({ $active: t }) => t ? "#333" : "#ccc"};
|
|
120
96
|
cursor: pointer;
|
|
121
97
|
padding: 0;
|
|
122
98
|
transition:
|
|
@@ -139,12 +115,8 @@ const xe = o.div`
|
|
|
139
115
|
inset: 0;
|
|
140
116
|
width: 0%;
|
|
141
117
|
background: #333;
|
|
142
|
-
animation: ${ye} ${({
|
|
143
|
-
|
|
144
|
-
}) => t}s linear forwards;
|
|
145
|
-
animation-play-state: ${({
|
|
146
|
-
$paused: t
|
|
147
|
-
}) => t ? "paused" : "running"};
|
|
118
|
+
animation: ${ye} ${({ $duration: t }) => t}s linear forwards;
|
|
119
|
+
animation-play-state: ${({ $paused: t }) => t ? "paused" : "running"};
|
|
148
120
|
|
|
149
121
|
@media (prefers-reduced-motion: reduce) {
|
|
150
122
|
animation: none;
|
|
@@ -249,37 +221,120 @@ const xe = o.div`
|
|
|
249
221
|
}, ue = (e) => {
|
|
250
222
|
e.key === "ArrowLeft" ? (e.preventDefault(), M()) : e.key === "ArrowRight" && (e.preventDefault(), E());
|
|
251
223
|
}, 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;
|
|
252
|
-
return /* @__PURE__ */ C(
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
+
);
|
|
283
338
|
};
|
|
284
339
|
export {
|
|
285
340
|
Pe as default
|