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.
- package/components/Button/Button.js +67 -46
- package/components/Carousel/Carousel.js +72 -127
- package/components/DatePicker/DatePicker.js +142 -181
- package/components/DatePicker/constants.js +1 -14
- package/components/DatePicker/utils.js +5 -1
- package/components/Dropdown/Dropdown.js +80 -114
- package/components/Glass/Glass.js +8 -2
- package/components/Icons/Add.js +11 -44
- package/components/Icons/AddCircle.js +8 -29
- package/components/Icons/AddCircleFilled.js +5 -20
- package/components/Icons/ArrowDown.js +5 -20
- package/components/Icons/ArrowLeft.js +5 -21
- package/components/Icons/ArrowRight.js +5 -21
- package/components/Icons/ArrowUp.js +5 -20
- package/components/Icons/BagFilled.js +5 -20
- package/components/Icons/BagOutline.js +8 -30
- package/components/Icons/BellFilled.js +8 -31
- package/components/Icons/BellOffFilled.js +9 -40
- package/components/Icons/BellOffOutline.js +9 -42
- package/components/Icons/BellOutline.js +8 -33
- package/components/Icons/BookmarkFilled.js +10 -23
- package/components/Icons/BookmarkOutline.js +5 -20
- package/components/Icons/BoxCoveredFilled.js +10 -41
- package/components/Icons/BoxCoveredOutline.js +8 -31
- package/components/Icons/BoxFilled.js +9 -34
- package/components/Icons/BoxOutline.js +8 -31
- package/components/Icons/CalendarDays.js +5 -20
- package/components/Icons/CalendarLinesPen.js +5 -21
- package/components/Icons/CartCheckFilled.js +9 -36
- package/components/Icons/CartCheckOutline.js +10 -46
- package/components/Icons/CartCrossFilled.js +9 -36
- package/components/Icons/CartCrossOutline.js +10 -45
- package/components/Icons/CartFilled.js +9 -34
- package/components/Icons/CartMinusFilled.js +9 -36
- package/components/Icons/CartMinusOutline.js +11 -47
- package/components/Icons/CartOutline.js +10 -46
- package/components/Icons/CartPlusFilled.js +9 -36
- package/components/Icons/CartPlusOutline.js +10 -45
- package/components/Icons/Check.js +5 -21
- package/components/Icons/CheckDouble.js +5 -21
- package/components/Icons/ChevronDown.js +5 -21
- package/components/Icons/ChevronLeft.js +5 -21
- package/components/Icons/ChevronRight.js +5 -21
- package/components/Icons/ChevronUp.js +5 -21
- package/components/Icons/ClockCircleOutline.js +8 -24
- package/components/Icons/ClockSquareOutline.js +8 -31
- package/components/Icons/Close.js +5 -18
- package/components/Icons/CloseCircleFilled.js +5 -20
- package/components/Icons/CloseCircleOutline.js +5 -21
- package/components/Icons/CommentBubbleFilled.js +10 -23
- package/components/Icons/CommentBubbleOutline.js +10 -23
- package/components/Icons/CommentFilled.js +10 -23
- package/components/Icons/CommentLineFilled.js +10 -23
- package/components/Icons/CommentLineOutline.js +10 -23
- package/components/Icons/CommentOutline.js +10 -23
- package/components/Icons/ContactDetailsFilled.js +8 -15
- package/components/Icons/ContactDetailsOutline.js +8 -15
- package/components/Icons/DeliveryTruckFastFilled.js +13 -26
- package/components/Icons/DeliveryTruckFastOutline.js +13 -26
- package/components/Icons/DeliveryTruckLeftFilled.js +9 -22
- package/components/Icons/DeliveryTruckLeftOutline.js +9 -22
- package/components/Icons/DeliveryTruckRightFilled.js +8 -21
- package/components/Icons/DeliveryTruckRightOutline.js +8 -21
- package/components/Icons/DetailsOutline.js +8 -15
- package/components/Icons/DiscordConversation.js +8 -27
- package/components/Icons/DiscordFilled.js +8 -21
- package/components/Icons/DiscordOutline.js +9 -25
- package/components/Icons/DoorClosedFilled.js +5 -20
- package/components/Icons/DoorClosedOutline.js +5 -21
- package/components/Icons/DoorOpenFilled.js +5 -20
- package/components/Icons/DoorOpenOutline.js +5 -21
- package/components/Icons/DotsHorizontalFilled.js +9 -34
- package/components/Icons/DotsHorizontalOutline.js +9 -43
- package/components/Icons/DotsVerticalFilled.js +9 -34
- package/components/Icons/DotsVerticalOutline.js +9 -43
- package/components/Icons/Download.js +8 -27
- package/components/Icons/DownloadBoxFilled.js +5 -20
- package/components/Icons/DownloadBoxOutline.js +9 -36
- package/components/Icons/EditBoxThick.js +5 -21
- package/components/Icons/EditBoxThin.js +8 -33
- package/components/Icons/EmailFilled.js +6 -19
- package/components/Icons/EmailOutline.js +6 -19
- package/components/Icons/ExitArrowInOutline.js +5 -21
- package/components/Icons/ExitArrowOutOutline.js +8 -33
- package/components/Icons/ExitFullScreen.js +5 -19
- package/components/Icons/ExitFullScreenThick.js +5 -19
- package/components/Icons/EyeClosed.js +5 -20
- package/components/Icons/EyeFilled.js +8 -29
- package/components/Icons/EyeOutline.js +8 -33
- package/components/Icons/FacebookFilled.js +6 -19
- package/components/Icons/FacebookMessengerOutline.js +8 -29
- package/components/Icons/FacebookOutline.js +5 -20
- package/components/Icons/FacebookRoundFilled.js +5 -18
- package/components/Icons/Filter.js +10 -17
- package/components/Icons/FilterList.js +5 -21
- package/components/Icons/FilterThickFilled.js +5 -18
- package/components/Icons/FilterThickOutline.js +5 -19
- package/components/Icons/FullScreenArrowThick.js +5 -19
- package/components/Icons/FullScreenArrowThin.js +5 -19
- package/components/Icons/FullScreenExit.js +10 -41
- package/components/Icons/FullScreenFilled.js +5 -20
- package/components/Icons/FullScreenOutline.js +5 -20
- package/components/Icons/HamburgerMenu.js +9 -40
- package/components/Icons/HamburgerSpaced.js +10 -23
- package/components/Icons/HeartFilled.js +5 -18
- package/components/Icons/HeartOutline.js +5 -23
- package/components/Icons/Help.js +5 -21
- package/components/Icons/HelpCircleFilled.js +5 -20
- package/components/Icons/HelpCircleOutline.js +9 -41
- package/components/Icons/HomeFilled.js +5 -20
- package/components/Icons/HomeOutline.js +5 -20
- package/components/Icons/Info.js +8 -27
- package/components/Icons/InfoCircleFilled.js +5 -20
- package/components/Icons/InfoCircleOutline.js +9 -16
- package/components/Icons/InfoSquareFilled.js +5 -20
- package/components/Icons/InfoSquareOutline.js +9 -23
- package/components/Icons/InstagramOuline.js +8 -21
- package/components/Icons/InstagramRoundFilled.js +13 -44
- package/components/Icons/KeyFilled.js +5 -20
- package/components/Icons/KeyInSquareFilled.js +8 -29
- package/components/Icons/KeyInSquareOutline.js +9 -38
- package/components/Icons/KeyOutline.js +8 -31
- package/components/Icons/KeySideSquareFilled.js +8 -29
- package/components/Icons/KeySideSquareOutline.js +5 -20
- package/components/Icons/KeySquareFilled.js +8 -29
- package/components/Icons/KeySquareOutline.js +5 -20
- package/components/Icons/Link.js +8 -31
- package/components/Icons/LinkedinFilled.js +6 -19
- package/components/Icons/LinkedinOutline.js +5 -19
- package/components/Icons/LinkedinRoundFilled.js +6 -19
- package/components/Icons/Loading.js +8 -21
- package/components/Icons/LocationArrowFilled.js +5 -12
- package/components/Icons/LocationArrowOutline.js +5 -21
- package/components/Icons/LocationFilled.js +10 -23
- package/components/Icons/LocationOutline.js +10 -23
- package/components/Icons/LockKeyhole.js +5 -20
- package/components/Icons/LockKeyholeOutline.js +9 -31
- package/components/Icons/LockKeyholeUnlocked.js +5 -20
- package/components/Icons/LockKeyholeUnlockedOutline.js +9 -31
- package/components/Icons/MediaPauseCircleFilled.js +5 -20
- package/components/Icons/MediaPauseCircleOuline.js +9 -36
- package/components/Icons/MediaPauseFilled.js +8 -27
- package/components/Icons/MediaPauseOutline.js +8 -31
- package/components/Icons/MediaPlayCircleFilled.js +5 -20
- package/components/Icons/MediaPlayCircleOutline.js +8 -31
- package/components/Icons/MediaPlayFilled.js +5 -18
- package/components/Icons/MediaPlayOutline.js +5 -20
- package/components/Icons/MediaStopCircleFilled.js +5 -20
- package/components/Icons/MediaStopCircleOutline.js +8 -31
- package/components/Icons/MediaStopFilled.js +5 -18
- package/components/Icons/MediaStopOutline.js +5 -20
- package/components/Icons/Minus.js +5 -21
- package/components/Icons/MinusCircle.js +10 -23
- package/components/Icons/MinusCircleFilled.js +10 -23
- package/components/Icons/MoneyBagOutline.js +10 -46
- package/components/Icons/MoneyBriefcaseFilled.js +5 -20
- package/components/Icons/MoneyBriefcaseOutline.js +9 -38
- package/components/Icons/NoEntry.js +5 -19
- package/components/Icons/NoEntryFilled.js +5 -18
- package/components/Icons/NoEntryOutline.js +8 -21
- package/components/Icons/PaymentCardFilled.js +9 -16
- package/components/Icons/PaymentCardOutline.js +9 -16
- package/components/Icons/PhoneCallingFilled.js +9 -36
- package/components/Icons/PhoneCallingOutline.js +9 -38
- package/components/Icons/PhoneFilled.js +5 -18
- package/components/Icons/PhoneOutline.js +5 -18
- package/components/Icons/Pin.js +5 -21
- package/components/Icons/PinAddFilled.js +10 -17
- package/components/Icons/PinAddOutline.js +10 -17
- package/components/Icons/PinCircleFilled.js +5 -20
- package/components/Icons/PinCircleOutline.js +8 -21
- package/components/Icons/PinFilled.js +5 -18
- package/components/Icons/PinOutline.js +5 -20
- package/components/Icons/PinSubFilled.js +10 -17
- package/components/Icons/PinSubOutline.js +10 -17
- package/components/Icons/PinterestFilled.js +10 -17
- package/components/Icons/PinterestOutline.js +5 -21
- package/components/Icons/ProfileFemaleOutline.js +6 -19
- package/components/Icons/ProfileGroupFilled.js +8 -28
- package/components/Icons/ProfileMaleFilled.js +8 -28
- package/components/Icons/ProfileMaleOutline.js +6 -19
- package/components/Icons/RedditFilled.js +10 -17
- package/components/Icons/RedditOutline.js +10 -43
- package/components/Icons/RedditRoundFilled.js +15 -52
- package/components/Icons/RedditRoundOutline.js +16 -53
- package/components/Icons/RupeeOutlined.js +5 -18
- package/components/Icons/RupeeSign.js +5 -21
- package/components/Icons/SaveFilled.js +10 -23
- package/components/Icons/SaveOutline.js +10 -23
- package/components/Icons/Search.js +10 -23
- package/components/Icons/SettingFilled.js +5 -18
- package/components/Icons/SettingOutline.js +5 -18
- package/components/Icons/ShareAllFilled.js +5 -20
- package/components/Icons/ShareAllOutline.js +11 -39
- package/components/Icons/ShareBoxOutline.js +5 -18
- package/components/Icons/ShareFilled.js +8 -29
- package/components/Icons/ShareOutline.js +8 -32
- package/components/Icons/ShareThickFilled.js +5 -18
- package/components/Icons/ShieldCheckFilled.js +5 -20
- package/components/Icons/ShieldCheckOutline.js +8 -31
- package/components/Icons/ShieldCrossFilled.js +5 -20
- package/components/Icons/ShieldCrossOutline.js +8 -30
- package/components/Icons/ShieldFilled.js +5 -18
- package/components/Icons/ShieldOutline.js +5 -20
- package/components/Icons/ShieldWarningFilled.js +5 -20
- package/components/Icons/ShieldWarningOutline.js +9 -23
- package/components/Icons/SnapchatFilled.js +10 -17
- package/components/Icons/SnapchatOutline.js +5 -20
- package/components/Icons/SortBottomToTop.js +10 -26
- package/components/Icons/SortHorizontal.js +5 -20
- package/components/Icons/SortTopToBottom.js +10 -26
- package/components/Icons/SortVertical.js +5 -20
- package/components/Icons/StarFilled.js +6 -19
- package/components/Icons/StarOutline.js +6 -19
- package/components/Icons/TelegramFilled.js +9 -22
- package/components/Icons/TelegramOutline.js +5 -20
- package/components/Icons/TelegramRoundFilled.js +9 -22
- package/components/Icons/ThumbsDownFilled.js +5 -18
- package/components/Icons/ThumbsDownOutline.js +5 -18
- package/components/Icons/ThumbsUpFilled.js +5 -18
- package/components/Icons/ThumbsUpOutline.js +5 -18
- package/components/Icons/TiktokBox.js +5 -18
- package/components/Icons/TiktokThickFilled.js +8 -21
- package/components/Icons/TiktokThinFilled.js +8 -32
- package/components/Icons/TrashBigFilled.js +10 -23
- package/components/Icons/TrashBigOutline.js +10 -23
- package/components/Icons/TrashFilled.js +8 -27
- package/components/Icons/TrashLinesFilled.js +8 -29
- package/components/Icons/TrashLinesOutline.js +11 -33
- package/components/Icons/TrashOutline.js +9 -31
- package/components/Icons/Upload.js +8 -27
- package/components/Icons/UploadBoxFilled.js +5 -20
- package/components/Icons/UploadBoxOutline.js +9 -36
- package/components/Icons/VolumeFilled.js +11 -30
- package/components/Icons/VolumeMuteFilled.js +11 -30
- package/components/Icons/VolumeMuteOutline.js +11 -30
- package/components/Icons/VolumeOffFilled.js +11 -30
- package/components/Icons/VolumeOffOutline.js +11 -30
- package/components/Icons/VolumeOutline.js +11 -30
- package/components/Icons/WalletFilled.js +10 -23
- package/components/Icons/WalletOutline.js +10 -23
- package/components/Icons/Warning.js +5 -21
- package/components/Icons/WarningCircleFilled.js +5 -18
- package/components/Icons/WarningCircleOutline.js +5 -18
- package/components/Icons/WarningSmall.js +5 -21
- package/components/Icons/WarningTriangleFilled.js +8 -21
- package/components/Icons/WarningTriangleOutline.js +5 -21
- package/components/Icons/WhatsappFilled.js +10 -17
- package/components/Icons/WhatsappOutline.js +5 -20
- package/components/Icons/Youtube.js +5 -18
- package/components/Icons/YoutubeFilled.js +10 -23
- package/components/Icons/YoutubeRoundFilled.js +9 -22
- package/components/Image/Image.js +27 -33
- package/components/Input/Checkbox/Checkbox.js +20 -30
- package/components/Input/FileUploader/FileUploader.js +82 -73
- package/components/Input/Input/Input.js +47 -49
- package/components/Input/Radio/Radio.js +17 -18
- package/components/Input/RadioGroup/RadioGroup.js +16 -33
- package/components/Input/Textarea/SvgIcon.js +7 -1
- package/components/Input/Textarea/Textarea.js +54 -54
- package/components/Loader/Loader.js +29 -18
- package/components/Loader/constants.js +12 -3
- package/components/MenuItem/MenuItem.js +28 -30
- package/components/Modal/Modal.js +37 -58
- package/components/OtpInput/OtpInput.js +28 -28
- package/components/PageLoader/PageLoader.js +9 -13
- package/components/Pagination/Pagination.js +95 -87
- package/components/Ripple/Ripple.js +2 -12
- package/components/RootComponent/RootComponent.js +4 -1
- package/components/Selectbox/Selectbox.js +101 -143
- package/components/Shimmer/Shimmer.js +13 -17
- package/components/Spinner/Spinner.js +22 -29
- package/components/Timer/Timer.js +92 -154
- package/components/Timer/components/TimerRing/TimerRing.js +11 -56
- package/components/Toast/Toast.js +81 -76
- package/components/Typography/Headings/H1.js +8 -2
- package/components/Typography/Headings/H2.js +8 -2
- package/components/Typography/Headings/H3.js +8 -2
- package/components/Typography/Headings/H4.js +8 -2
- package/components/Typography/Headings/H5.js +8 -2
- package/components/Typography/Headings/H6.js +8 -2
- package/components/Typography/Headings/index.js +8 -1
- package/components/Typography/P/P.js +12 -3
- package/components/VideoPlayer/VideoPlayer.js +23 -19
- package/components/VideoPlayer/components/Volumebar/Volumebar.js +6 -2
- package/components/VideoPlayer/useSpacebarToggle.js +1 -11
- package/components/VideoPlayer/useVolumeOverlay.js +4 -1
- package/hooks/useThrottle.js +3 -6
- package/hooks/useWindowSize.js +4 -1
- package/package.json +1 -1
- package/reactUtils/composeProviders.js +3 -1
- package/reactUtils/lazyImport.js +3 -1
- package/reactUtils/withErrorBoundary.js +8 -2
- package/utils/cancelablePromise.js +5 -4
- package/utils/createPubSub.js +12 -9
- package/utils/formatCompactNumber.js +4 -3
- package/utils/formatCurrency.js +4 -1
- package/utils/formatDate.js +5 -3
- package/utils/handleKeyboardNavigation.js +5 -1
- package/utils/isAuthenticated.js +3 -1
- package/utils/logError.js +4 -1
- package/utils/logInfo.js +6 -1
- package/utils/logWarn.js +6 -1
- package/utils/mergeDeep.js +3 -1
- package/utils/multiSort.js +4 -1
- package/utils/scrollToElement.js +4 -1
- package/utils/scrollToTop.js +4 -1
- package/utils/timeAgo.js +3 -1
- package/utils/trackEvent.js +5 -1
- 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: ${({
|
|
14
|
-
|
|
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: ${({
|
|
21
|
-
|
|
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
|
-
${({
|
|
33
|
+
${({
|
|
34
|
+
$isLoading: o
|
|
35
|
+
}) => o && a`
|
|
24
36
|
pointer-events: none;
|
|
25
37
|
`};
|
|
26
38
|
|
|
27
|
-
${({
|
|
39
|
+
${({
|
|
40
|
+
disabled: o,
|
|
41
|
+
$isLoading: e
|
|
42
|
+
}) => !(o || e) && a`
|
|
28
43
|
&:hover {
|
|
29
|
-
background-color: ${({
|
|
44
|
+
background-color: ${({
|
|
45
|
+
$hoverColor: r
|
|
46
|
+
}) => r};
|
|
30
47
|
}
|
|
31
48
|
|
|
32
49
|
&:active {
|
|
33
|
-
background-color: ${({
|
|
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: ${({
|
|
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: ${({
|
|
46
|
-
|
|
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: ${({
|
|
50
|
-
|
|
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
|
-
${({
|
|
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: ${({
|
|
105
|
+
opacity: ${({
|
|
106
|
+
$isLoading: o
|
|
107
|
+
}) => o ? 1 : 0};
|
|
74
108
|
transition: opacity 0.3s ease;
|
|
75
109
|
pointer-events: none;
|
|
76
|
-
`, U = ({
|
|
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
|
-
}, {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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: ${({
|
|
21
|
+
cursor: ${({
|
|
22
|
+
$draggable: t
|
|
23
|
+
}) => t ? "grab" : "default"};
|
|
22
24
|
|
|
23
25
|
&:active {
|
|
24
|
-
cursor: ${({
|
|
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(${({
|
|
30
|
-
|
|
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 ${({
|
|
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: ${({
|
|
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
|
-
${({
|
|
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
|
-
${({
|
|
93
|
+
${({
|
|
94
|
+
$viewportFocused: t
|
|
95
|
+
}) => t && `
|
|
79
96
|
border-color: #bdbdbd;
|
|
80
97
|
`}
|
|
81
98
|
|
|
82
|
-
${({
|
|
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: ${({
|
|
111
|
+
width: ${({
|
|
112
|
+
$active: t
|
|
113
|
+
}) => t ? "20px" : "8px"};
|
|
92
114
|
height: 8px;
|
|
93
115
|
border-radius: 4px;
|
|
94
116
|
border: none;
|
|
95
|
-
background: ${({
|
|
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} ${({
|
|
119
|
-
|
|
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
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
"aria-label": "
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|