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
|
@@ -29,13 +29,8 @@ const Bn = Hn`
|
|
|
29
29
|
margin-bottom: 16px;
|
|
30
30
|
`, F = i.div`
|
|
31
31
|
flex: 1;
|
|
32
|
-
background: ${({
|
|
33
|
-
$active: e
|
|
34
|
-
$primary: t
|
|
35
|
-
}) => e ? t : "#f1f3f4"};
|
|
36
|
-
color: ${({
|
|
37
|
-
$active: e
|
|
38
|
-
}) => e ? "#fff" : "#5f6368"};
|
|
32
|
+
background: ${({ $active: e, $primary: t }) => e ? t : "#f1f3f4"};
|
|
33
|
+
color: ${({ $active: e }) => e ? "#fff" : "#5f6368"};
|
|
39
34
|
border-radius: 12px;
|
|
40
35
|
padding: 10px 14px;
|
|
41
36
|
font-size: 13px;
|
|
@@ -66,13 +61,8 @@ const Bn = Hn`
|
|
|
66
61
|
`, on = i.button`
|
|
67
62
|
flex: 1;
|
|
68
63
|
border: none;
|
|
69
|
-
background: ${({
|
|
70
|
-
$active: e
|
|
71
|
-
}) => e ? "#fff" : "transparent"};
|
|
72
|
-
color: ${({
|
|
73
|
-
$active: e,
|
|
74
|
-
$primary: t
|
|
75
|
-
}) => e ? t : "#5f6368"};
|
|
64
|
+
background: ${({ $active: e }) => e ? "#fff" : "transparent"};
|
|
65
|
+
color: ${({ $active: e, $primary: t }) => e ? t : "#5f6368"};
|
|
76
66
|
border-radius: 8px;
|
|
77
67
|
padding: 6px 0;
|
|
78
68
|
font-size: 12px;
|
|
@@ -81,14 +71,10 @@ const Bn = Hn`
|
|
|
81
71
|
transition:
|
|
82
72
|
background 0.15s,
|
|
83
73
|
color 0.15s;
|
|
84
|
-
box-shadow: ${({
|
|
85
|
-
$active: e
|
|
86
|
-
}) => e ? "0 1px 4px rgba(0,0,0,0.1)" : "none"};
|
|
74
|
+
box-shadow: ${({ $active: e }) => e ? "0 1px 4px rgba(0,0,0,0.1)" : "none"};
|
|
87
75
|
|
|
88
76
|
&:focus-visible {
|
|
89
|
-
outline: 2px solid ${({
|
|
90
|
-
$primary: e
|
|
91
|
-
}) => e};
|
|
77
|
+
outline: 2px solid ${({ $primary: e }) => e};
|
|
92
78
|
outline-offset: 2px;
|
|
93
79
|
}
|
|
94
80
|
`, Jn = i.div`
|
|
@@ -113,15 +99,11 @@ const Bn = Hn`
|
|
|
113
99
|
|
|
114
100
|
&:hover {
|
|
115
101
|
background: #f1f3f4;
|
|
116
|
-
color: ${({
|
|
117
|
-
$primary: e
|
|
118
|
-
}) => e};
|
|
102
|
+
color: ${({ $primary: e }) => e};
|
|
119
103
|
}
|
|
120
104
|
|
|
121
105
|
&:focus-visible {
|
|
122
|
-
outline: 2px solid ${({
|
|
123
|
-
$primary: e
|
|
124
|
-
}) => e};
|
|
106
|
+
outline: 2px solid ${({ $primary: e }) => e};
|
|
125
107
|
}
|
|
126
108
|
`, sn = i.button`
|
|
127
109
|
background: none;
|
|
@@ -139,9 +121,7 @@ const Bn = Hn`
|
|
|
139
121
|
}
|
|
140
122
|
|
|
141
123
|
&:focus-visible {
|
|
142
|
-
outline: 2px solid ${({
|
|
143
|
-
$primary: e
|
|
144
|
-
}) => e};
|
|
124
|
+
outline: 2px solid ${({ $primary: e }) => e};
|
|
145
125
|
}
|
|
146
126
|
`, Kn = i.div`
|
|
147
127
|
display: grid;
|
|
@@ -166,14 +146,8 @@ const Bn = Hn`
|
|
|
166
146
|
content: '';
|
|
167
147
|
position: absolute;
|
|
168
148
|
inset: 4px 0;
|
|
169
|
-
background: ${({
|
|
170
|
-
|
|
171
|
-
$primaryLight: t
|
|
172
|
-
}) => e ? t : "transparent"};
|
|
173
|
-
border-radius: ${({
|
|
174
|
-
$rangeStart: e,
|
|
175
|
-
$rangeEnd: t
|
|
176
|
-
}) => e ? "50% 0 0 50%" : t ? "0 50% 50% 0" : "0"};
|
|
149
|
+
background: ${({ $inRange: e, $primaryLight: t }) => e ? t : "transparent"};
|
|
150
|
+
border-radius: ${({ $rangeStart: e, $rangeEnd: t }) => e ? "50% 0 0 50%" : t ? "0 50% 50% 0" : "0"};
|
|
177
151
|
pointer-events: none;
|
|
178
152
|
}
|
|
179
153
|
`, Zn = i.button`
|
|
@@ -188,55 +162,26 @@ const Bn = Hn`
|
|
|
188
162
|
justify-content: center;
|
|
189
163
|
font-size: 13px;
|
|
190
164
|
font-weight: 500;
|
|
191
|
-
cursor: ${({
|
|
192
|
-
$
|
|
193
|
-
disabled: t
|
|
194
|
-
}) => e
|
|
195
|
-
background: ${({
|
|
196
|
-
$selected: e,
|
|
197
|
-
$hovered: t,
|
|
198
|
-
$primary: c,
|
|
199
|
-
$primaryLight: p
|
|
200
|
-
}) => e ? c : t ? p : "transparent"};
|
|
201
|
-
color: ${({
|
|
202
|
-
$selected: e,
|
|
203
|
-
$today: t,
|
|
204
|
-
disabled: c,
|
|
205
|
-
$primary: p
|
|
206
|
-
}) => e ? "#fff" : c ? "#dadce0" : t ? p : "#202124"};
|
|
207
|
-
outline: ${({
|
|
208
|
-
$today: e,
|
|
209
|
-
$selected: t,
|
|
210
|
-
$primary: c
|
|
211
|
-
}) => e && !t ? `2px solid ${c}` : "none"};
|
|
165
|
+
cursor: ${({ $empty: e, disabled: t }) => e || t ? "default" : "pointer"};
|
|
166
|
+
background: ${({ $selected: e, $hovered: t, $primary: c, $primaryLight: p }) => e ? c : t ? p : "transparent"};
|
|
167
|
+
color: ${({ $selected: e, $today: t, disabled: c, $primary: p }) => e ? "#fff" : c ? "#dadce0" : t ? p : "#202124"};
|
|
168
|
+
outline: ${({ $today: e, $selected: t, $primary: c }) => e && !t ? `2px solid ${c}` : "none"};
|
|
212
169
|
outline-offset: -2px;
|
|
213
170
|
transition:
|
|
214
171
|
background 0.12s,
|
|
215
172
|
color 0.12s;
|
|
216
|
-
pointer-events: ${({
|
|
217
|
-
$empty: e,
|
|
218
|
-
disabled: t
|
|
219
|
-
}) => e || t ? "none" : "auto"};
|
|
173
|
+
pointer-events: ${({ $empty: e, disabled: t }) => e || t ? "none" : "auto"};
|
|
220
174
|
|
|
221
|
-
${({
|
|
222
|
-
$empty: e
|
|
223
|
-
}) => e && Cn`
|
|
175
|
+
${({ $empty: e }) => e && Cn`
|
|
224
176
|
visibility: hidden;
|
|
225
177
|
`}
|
|
226
178
|
|
|
227
179
|
&:hover {
|
|
228
|
-
background: ${({
|
|
229
|
-
$selected: e,
|
|
230
|
-
$primary: t,
|
|
231
|
-
$primaryDark: c,
|
|
232
|
-
$primaryLight: p
|
|
233
|
-
}) => e ? c : p};
|
|
180
|
+
background: ${({ $selected: e, $primary: t, $primaryDark: c, $primaryLight: p }) => e ? c : p};
|
|
234
181
|
}
|
|
235
182
|
|
|
236
183
|
&:focus-visible {
|
|
237
|
-
outline: 2px solid ${({
|
|
238
|
-
$primary: e
|
|
239
|
-
}) => e};
|
|
184
|
+
outline: 2px solid ${({ $primary: e }) => e};
|
|
240
185
|
}
|
|
241
186
|
`, Vn = i.div`
|
|
242
187
|
display: grid;
|
|
@@ -245,13 +190,8 @@ const Bn = Hn`
|
|
|
245
190
|
padding: 4px 0;
|
|
246
191
|
`, ln = i.button`
|
|
247
192
|
border: none;
|
|
248
|
-
background: ${({
|
|
249
|
-
$active: e
|
|
250
|
-
$primary: t
|
|
251
|
-
}) => e ? t : "transparent"};
|
|
252
|
-
color: ${({
|
|
253
|
-
$active: e
|
|
254
|
-
}) => e ? "#fff" : "#202124"};
|
|
193
|
+
background: ${({ $active: e, $primary: t }) => e ? t : "transparent"};
|
|
194
|
+
color: ${({ $active: e }) => e ? "#fff" : "#202124"};
|
|
255
195
|
border-radius: 10px;
|
|
256
196
|
padding: 8px 4px;
|
|
257
197
|
font-size: 13px;
|
|
@@ -262,16 +202,11 @@ const Bn = Hn`
|
|
|
262
202
|
color 0.13s;
|
|
263
203
|
|
|
264
204
|
&:hover {
|
|
265
|
-
background: ${({
|
|
266
|
-
$active: e,
|
|
267
|
-
$primaryDark: t
|
|
268
|
-
}) => e ? t : "#f1f3f4"};
|
|
205
|
+
background: ${({ $active: e, $primaryDark: t }) => e ? t : "#f1f3f4"};
|
|
269
206
|
}
|
|
270
207
|
|
|
271
208
|
&:focus-visible {
|
|
272
|
-
outline: 2px solid ${({
|
|
273
|
-
$primary: e
|
|
274
|
-
}) => e};
|
|
209
|
+
outline: 2px solid ${({ $primary: e }) => e};
|
|
275
210
|
}
|
|
276
211
|
`, ne = i.div`
|
|
277
212
|
display: grid;
|
|
@@ -290,14 +225,8 @@ const Bn = Hn`
|
|
|
290
225
|
border-top: 1px solid #f1f3f4;
|
|
291
226
|
`, cn = i.button`
|
|
292
227
|
border: none;
|
|
293
|
-
background: ${({
|
|
294
|
-
$isPrimary: e,
|
|
295
|
-
$primary: t
|
|
296
|
-
}) => e ? t : "transparent"};
|
|
297
|
-
color: ${({
|
|
298
|
-
$isPrimary: e,
|
|
299
|
-
$primary: t
|
|
300
|
-
}) => e ? "#fff" : t};
|
|
228
|
+
background: ${({ $isPrimary: e, $primary: t }) => e ? t : "transparent"};
|
|
229
|
+
color: ${({ $isPrimary: e, $primary: t }) => e ? "#fff" : t};
|
|
301
230
|
border-radius: 8px;
|
|
302
231
|
padding: 7px 16px;
|
|
303
232
|
font-size: 13px;
|
|
@@ -308,11 +237,7 @@ const Bn = Hn`
|
|
|
308
237
|
opacity 0.14s;
|
|
309
238
|
|
|
310
239
|
&:hover {
|
|
311
|
-
background: ${({
|
|
312
|
-
$isPrimary: e,
|
|
313
|
-
$primaryDark: t,
|
|
314
|
-
$primaryLight: c
|
|
315
|
-
}) => e ? t : c};
|
|
240
|
+
background: ${({ $isPrimary: e, $primaryDark: t, $primaryLight: c }) => e ? t : c};
|
|
316
241
|
}
|
|
317
242
|
|
|
318
243
|
&:disabled {
|
|
@@ -321,17 +246,38 @@ const Bn = Hn`
|
|
|
321
246
|
}
|
|
322
247
|
|
|
323
248
|
&:focus-visible {
|
|
324
|
-
outline: 2px solid ${({
|
|
325
|
-
$primary: e
|
|
326
|
-
}) => e};
|
|
249
|
+
outline: 2px solid ${({ $primary: e }) => e};
|
|
327
250
|
}
|
|
328
|
-
`, te = () => /* @__PURE__ */ o(
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
251
|
+
`, te = () => /* @__PURE__ */ o(
|
|
252
|
+
"svg",
|
|
253
|
+
{
|
|
254
|
+
width: "16",
|
|
255
|
+
height: "16",
|
|
256
|
+
viewBox: "0 0 24 24",
|
|
257
|
+
fill: "none",
|
|
258
|
+
stroke: "currentColor",
|
|
259
|
+
strokeWidth: "2.5",
|
|
260
|
+
strokeLinecap: "round",
|
|
261
|
+
strokeLinejoin: "round",
|
|
262
|
+
children: /* @__PURE__ */ o("polyline", { points: "15 18 9 12 15 6" })
|
|
263
|
+
}
|
|
264
|
+
), oe = () => /* @__PURE__ */ o(
|
|
265
|
+
"svg",
|
|
266
|
+
{
|
|
267
|
+
width: "16",
|
|
268
|
+
height: "16",
|
|
269
|
+
viewBox: "0 0 24 24",
|
|
270
|
+
fill: "none",
|
|
271
|
+
stroke: "currentColor",
|
|
272
|
+
strokeWidth: "2.5",
|
|
273
|
+
strokeLinecap: "round",
|
|
274
|
+
strokeLinejoin: "round",
|
|
275
|
+
children: /* @__PURE__ */ o("polyline", { points: "9 18 15 12 9 6" })
|
|
276
|
+
}
|
|
277
|
+
), d = { CALENDAR: "calendar", MONTH: "month", YEAR: "year" }, re = /* @__PURE__ */ new Date(), an = 1924, ie = re.getFullYear() + 20, se = Array.from(
|
|
278
|
+
{ length: ie - an + 1 },
|
|
279
|
+
(e, t) => an + t
|
|
280
|
+
), le = ({
|
|
335
281
|
theme: e = "blue",
|
|
336
282
|
mode: t = s.SINGLE,
|
|
337
283
|
value: c,
|
|
@@ -347,11 +293,10 @@ const Bn = Hn`
|
|
|
347
293
|
const I = Ln(() => {
|
|
348
294
|
var n;
|
|
349
295
|
return (n = Yn[e]) != null ? n : In;
|
|
350
|
-
}, [e]), f = I.m500, T = I.m700, A = I.m100, O = {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}, W = /* @__PURE__ */ new Date(), [a, fn] = m(t), [P, z] = m(W.getFullYear()), [v, $] = m(W.getMonth()), [y, R] = m(d.CALENDAR), [E, _] = m(c != null ? c : null), [r, j] = m((Q = p == null ? void 0 : p[0]) != null ? Q : null), [h, N] = m((X = p == null ? void 0 : p[1]) != null ? X : null), [S, w] = m(null), [D, L] = m(!1), un = On(P, v), U = Gn((n) => !!(!n || G && n < G || M && n > M), [G, M]), xn = () => {
|
|
296
|
+
}, [e]), f = I.m500, T = I.m700, A = I.m100, O = { $primary: f, $primaryDark: T, $primaryLight: A }, W = /* @__PURE__ */ new Date(), [a, fn] = m(t), [P, z] = m(W.getFullYear()), [v, $] = m(W.getMonth()), [y, R] = m(d.CALENDAR), [E, _] = m(c != null ? c : null), [r, j] = m((Q = p == null ? void 0 : p[0]) != null ? Q : null), [h, N] = m((X = p == null ? void 0 : p[1]) != null ? X : null), [S, w] = m(null), [D, L] = m(!1), un = On(P, v), U = Gn(
|
|
297
|
+
(n) => !!(!n || G && n < G || M && n > M),
|
|
298
|
+
[G, M]
|
|
299
|
+
), xn = () => {
|
|
355
300
|
v === 0 ? ($(11), z((n) => n - 1)) : $((n) => n - 1);
|
|
356
301
|
}, gn = () => {
|
|
357
302
|
v === 11 ? ($(0), z((n) => n + 1)) : $((n) => n + 1);
|
|
@@ -361,7 +306,10 @@ const Bn = Hn`
|
|
|
361
306
|
_(n), Y || l == null || l(n);
|
|
362
307
|
return;
|
|
363
308
|
}
|
|
364
|
-
!D || !r ? (j(n), N(null), L(!0)) : (N(n), L(!1), Y || l == null || l([
|
|
309
|
+
!D || !r ? (j(n), N(null), L(!0)) : (N(n), L(!1), Y || l == null || l([
|
|
310
|
+
n <= r ? n : r,
|
|
311
|
+
n <= r ? r : n
|
|
312
|
+
]));
|
|
365
313
|
}
|
|
366
314
|
}, H = (n) => {
|
|
367
315
|
fn(n), _(null), j(null), N(null), L(!1), w(null);
|
|
@@ -378,15 +326,62 @@ const Bn = Hn`
|
|
|
378
326
|
}
|
|
379
327
|
}, hn = () => {
|
|
380
328
|
_(null), j(null), N(null), L(!1), w(null), l == null || l(a === s.SINGLE ? null : [null, null]);
|
|
381
|
-
}, u = D && S ? S : h, q = (n) => a === s.RANGE && zn(n, r, u), J = (n) => a === s.RANGE && _n(n, r, u), yn = (n) => a === s.RANGE && jn(n, r, u), kn = (n) => a === s.SINGLE ? tn(n, E) : q(n) || J(n), K = a === s.SINGLE ? B(E) : B(
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
329
|
+
}, u = D && S ? S : h, q = (n) => a === s.RANGE && zn(n, r, u), J = (n) => a === s.RANGE && _n(n, r, u), yn = (n) => a === s.RANGE && jn(n, r, u), kn = (n) => a === s.SINGLE ? tn(n, E) : q(n) || J(n), K = a === s.SINGLE ? B(E) : B(
|
|
330
|
+
r ? r <= (u != null ? u : r) ? r : u : null
|
|
331
|
+
), vn = a === s.RANGE ? B(u ? u >= r ? u : r : null) : null, $n = a === s.SINGLE ? !E : !r || !h, En = () => /* @__PURE__ */ o(Vn, { children: en.map((n, k) => /* @__PURE__ */ o(
|
|
332
|
+
ln,
|
|
333
|
+
{
|
|
334
|
+
$active: k === v,
|
|
335
|
+
...O,
|
|
336
|
+
onClick: () => {
|
|
337
|
+
$(k), R(d.CALENDAR);
|
|
338
|
+
},
|
|
339
|
+
children: n.slice(0, 3)
|
|
340
|
+
},
|
|
341
|
+
n
|
|
342
|
+
)) }), An = () => /* @__PURE__ */ o(ne, { children: se.map((n) => /* @__PURE__ */ o(
|
|
343
|
+
ln,
|
|
344
|
+
{
|
|
345
|
+
$active: n === P,
|
|
346
|
+
...O,
|
|
347
|
+
onClick: () => {
|
|
348
|
+
z(n), R(d.CALENDAR);
|
|
349
|
+
},
|
|
350
|
+
children: n
|
|
351
|
+
},
|
|
352
|
+
n
|
|
353
|
+
)) }), Rn = () => /* @__PURE__ */ x(Kn, { children: [
|
|
386
354
|
Tn.map((n) => /* @__PURE__ */ o(Qn, { children: n }, n)),
|
|
387
355
|
un.map((n, k) => {
|
|
388
356
|
const b = !n, Z = U(n), C = !b && kn(n), Nn = !b && Pn(n), V = !b && q(n), nn = !b && J(n), Sn = !b && yn(n), wn = !b && S && tn(n, S);
|
|
389
|
-
return /* @__PURE__ */ o(
|
|
357
|
+
return /* @__PURE__ */ o(
|
|
358
|
+
Xn,
|
|
359
|
+
{
|
|
360
|
+
$inRange: Sn || V || nn,
|
|
361
|
+
$rangeStart: V,
|
|
362
|
+
$rangeEnd: nn,
|
|
363
|
+
$primaryLight: A,
|
|
364
|
+
children: /* @__PURE__ */ o(
|
|
365
|
+
Zn,
|
|
366
|
+
{
|
|
367
|
+
$empty: b,
|
|
368
|
+
$selected: C,
|
|
369
|
+
$today: Nn,
|
|
370
|
+
$hovered: wn && !C,
|
|
371
|
+
disabled: Z,
|
|
372
|
+
...O,
|
|
373
|
+
onClick: () => bn(n),
|
|
374
|
+
onMouseEnter: () => !b && w(n),
|
|
375
|
+
onMouseLeave: () => w(null),
|
|
376
|
+
"aria-label": n ? n.toDateString() : void 0,
|
|
377
|
+
"aria-pressed": C,
|
|
378
|
+
tabIndex: b || Z ? -1 : 0,
|
|
379
|
+
children: n == null ? void 0 : n.getDate()
|
|
380
|
+
}
|
|
381
|
+
)
|
|
382
|
+
},
|
|
383
|
+
k
|
|
384
|
+
);
|
|
390
385
|
})
|
|
391
386
|
] });
|
|
392
387
|
return /* @__PURE__ */ x(Fn, { ...pn, children: [
|
|
@@ -400,25 +395,49 @@ const Bn = Hn`
|
|
|
400
395
|
/* @__PURE__ */ o("span", { children: "To" }),
|
|
401
396
|
vn
|
|
402
397
|
] })
|
|
403
|
-
] }) : /* @__PURE__ */ x(F, { $active: !!E, $primary: f, style: {
|
|
404
|
-
flex: "none",
|
|
405
|
-
width: "100%"
|
|
406
|
-
}, children: [
|
|
398
|
+
] }) : /* @__PURE__ */ x(F, { $active: !!E, $primary: f, style: { flex: "none", width: "100%" }, children: [
|
|
407
399
|
/* @__PURE__ */ o("span", { children: "Selected" }),
|
|
408
400
|
K
|
|
409
401
|
] }) }),
|
|
410
402
|
dn && /* @__PURE__ */ x(qn, { children: [
|
|
411
|
-
/* @__PURE__ */ o(
|
|
412
|
-
|
|
403
|
+
/* @__PURE__ */ o(
|
|
404
|
+
on,
|
|
405
|
+
{
|
|
406
|
+
$active: a === s.SINGLE,
|
|
407
|
+
$primary: f,
|
|
408
|
+
onClick: () => H(s.SINGLE),
|
|
409
|
+
children: "Single"
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ o(
|
|
413
|
+
on,
|
|
414
|
+
{
|
|
415
|
+
$active: a === s.RANGE,
|
|
416
|
+
$primary: f,
|
|
417
|
+
onClick: () => H(s.RANGE),
|
|
418
|
+
children: "Range"
|
|
419
|
+
}
|
|
420
|
+
)
|
|
413
421
|
] }),
|
|
414
422
|
/* @__PURE__ */ x(Jn, { children: [
|
|
415
423
|
/* @__PURE__ */ o(rn, { $primary: f, onClick: xn, "aria-label": "Previous month", children: /* @__PURE__ */ o(te, {}) }),
|
|
416
|
-
/* @__PURE__ */ x("div", { style: {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
424
|
+
/* @__PURE__ */ x("div", { style: { display: "flex", gap: 4 }, children: [
|
|
425
|
+
/* @__PURE__ */ o(
|
|
426
|
+
sn,
|
|
427
|
+
{
|
|
428
|
+
$primary: f,
|
|
429
|
+
onClick: () => R(y === d.MONTH ? d.CALENDAR : d.MONTH),
|
|
430
|
+
children: en[v]
|
|
431
|
+
}
|
|
432
|
+
),
|
|
433
|
+
/* @__PURE__ */ o(
|
|
434
|
+
sn,
|
|
435
|
+
{
|
|
436
|
+
$primary: f,
|
|
437
|
+
onClick: () => R(y === d.YEAR ? d.CALENDAR : d.YEAR),
|
|
438
|
+
children: P
|
|
439
|
+
}
|
|
440
|
+
)
|
|
422
441
|
] }),
|
|
423
442
|
/* @__PURE__ */ o(rn, { $primary: f, onClick: gn, "aria-label": "Next month", children: /* @__PURE__ */ o(oe, {}) })
|
|
424
443
|
] }),
|
|
@@ -426,8 +445,28 @@ const Bn = Hn`
|
|
|
426
445
|
y === d.MONTH && En(),
|
|
427
446
|
y === d.YEAR && An(),
|
|
428
447
|
Y && y === d.CALENDAR && /* @__PURE__ */ x(ee, { children: [
|
|
429
|
-
/* @__PURE__ */ o(
|
|
430
|
-
|
|
448
|
+
/* @__PURE__ */ o(
|
|
449
|
+
cn,
|
|
450
|
+
{
|
|
451
|
+
$primary: f,
|
|
452
|
+
$primaryDark: T,
|
|
453
|
+
$primaryLight: A,
|
|
454
|
+
onClick: hn,
|
|
455
|
+
children: "Clear"
|
|
456
|
+
}
|
|
457
|
+
),
|
|
458
|
+
/* @__PURE__ */ o(
|
|
459
|
+
cn,
|
|
460
|
+
{
|
|
461
|
+
$isPrimary: !0,
|
|
462
|
+
$primary: f,
|
|
463
|
+
$primaryDark: T,
|
|
464
|
+
$primaryLight: A,
|
|
465
|
+
disabled: $n,
|
|
466
|
+
onClick: mn,
|
|
467
|
+
children: "Apply"
|
|
468
|
+
}
|
|
469
|
+
)
|
|
431
470
|
] })
|
|
432
471
|
] });
|
|
433
472
|
};
|
|
@@ -435,17 +474,17 @@ le.propTypes = {
|
|
|
435
474
|
/** Color theme key from the meticulous-ui color map */
|
|
436
475
|
theme: g.string,
|
|
437
476
|
/** Initial selection mode. Can be switched via the built-in toggle unless `showModeToggle` is false. */
|
|
438
|
-
mode:
|
|
477
|
+
mode: g.oneOf(["single", "range"]),
|
|
439
478
|
/** Controlled selected date for single mode */
|
|
440
|
-
value:
|
|
479
|
+
value: g.instanceOf(Date),
|
|
441
480
|
/** Controlled selected range for range mode — `[start, end]` */
|
|
442
|
-
rangeValue:
|
|
481
|
+
rangeValue: g.arrayOf(g.instanceOf(Date)),
|
|
443
482
|
/** Called with a `Date` in single mode or `[Date, Date]` tuple in range mode */
|
|
444
483
|
onChange: g.func,
|
|
445
484
|
/** Dates before this value are disabled */
|
|
446
|
-
minDate:
|
|
485
|
+
minDate: g.instanceOf(Date),
|
|
447
486
|
/** Dates after this value are disabled */
|
|
448
|
-
maxDate:
|
|
487
|
+
maxDate: g.instanceOf(Date),
|
|
449
488
|
/** Shows or hides the Single / Range mode toggle pill */
|
|
450
489
|
showModeToggle: g.bool,
|
|
451
490
|
/** Shows or hides the Clear / Apply footer. When false, `onChange` fires immediately on each click. */
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
const e = [
|
|
1
|
+
const e = [
|
|
2
|
+
"January",
|
|
3
|
+
"February",
|
|
4
|
+
"March",
|
|
5
|
+
"April",
|
|
6
|
+
"May",
|
|
7
|
+
"June",
|
|
8
|
+
"July",
|
|
9
|
+
"August",
|
|
10
|
+
"September",
|
|
11
|
+
"October",
|
|
12
|
+
"November",
|
|
13
|
+
"December"
|
|
14
|
+
], r = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], u = {
|
|
2
15
|
SINGLE: "single",
|
|
3
16
|
RANGE: "range"
|
|
4
17
|
};
|
|
@@ -2,11 +2,7 @@ const i = (e, t) => new Date(e, t + 1, 0).getDate(), u = (e, t) => new Date(e, t
|
|
|
2
2
|
if (!t || !n) return !1;
|
|
3
3
|
const [s, r] = t <= n ? [t, n] : [n, t];
|
|
4
4
|
return e > s && e < r;
|
|
5
|
-
}, l = (e, t, n) => !t || !n ? !1 : a(e, t <= n ? t : n), D = (e, t, n) => !t || !n ? !1 : a(e, t <= n ? n : t), f = (e) => e ? e.toLocaleDateString("en-US", {
|
|
6
|
-
month: "short",
|
|
7
|
-
day: "numeric",
|
|
8
|
-
year: "numeric"
|
|
9
|
-
}) : "—", y = (e, t) => {
|
|
5
|
+
}, l = (e, t, n) => !t || !n ? !1 : a(e, t <= n ? t : n), D = (e, t, n) => !t || !n ? !1 : a(e, t <= n ? n : t), f = (e) => e ? e.toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" }) : "—", y = (e, t) => {
|
|
10
6
|
const n = i(e, t), s = u(e, t), r = [];
|
|
11
7
|
for (let o = 0; o < s; o++) r.push(null);
|
|
12
8
|
for (let o = 1; o <= n; o++) r.push(new Date(e, t, o));
|