meticulous-ui 3.2.3 → 3.2.4

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/README.md CHANGED
@@ -83,30 +83,30 @@ import blue from 'meticulous-ui/colors/blue';
83
83
 
84
84
  ## 📦 Icon Components
85
85
 
86
- | Group | Icons |
87
- | --- | --- |
88
- | Arrows & Chevrons | `ArrowDown`, `ArrowLeft`, `ArrowRight`, `ArrowUp`, `ChevronDown`, `ChevronLeft`, `ChevronRight`, `ChevronUp` |
89
- | Actions | `Add`, `AddCircle`, `AddCircleFilled`, `Minus`, `MinusCircle`, `MinusCircleFilled`, `Close`, `CloseCircleFilled`, `CloseCircleOutline`, `Check`, `CheckDouble`, `Link`, `Search`, `Loading` |
90
- | Bells & Dots | `BellFilled`, `BellOutline`, `BellOffFilled`, `BellOffOutline`, `DotsHorizontalFilled`, `DotsHorizontalOutline`, `DotsVerticalFilled`, `DotsVerticalOutline` |
91
- | Bookmarks & Reactions | `BookmarkFilled`, `BookmarkOutline`, `HeartFilled`, `HeartOutline`, `StarFilled`, `StarOutline`, `ThumbsUpFilled`, `ThumbsUpOutline`, `ThumbsDownFilled`, `ThumbsDownOutline` |
92
- | Calendar & Clock | `CalendarDays`, `CalendarLinesPen`, `ClockCircleOutline`, `ClockSquareOutline` |
93
- | Commerce | `BagFilled`, `BagOutline`, `CartFilled`, `CartOutline`, `CartCheckFilled`, `CartCheckOutline`, `CartCrossFilled`, `CartCrossOutline`, `CartMinusFilled`, `CartMinusOutline`, `CartPlusFilled`, `CartPlusOutline`, `PaymentCardFilled`, `PaymentCardOutline`, `WalletFilled`, `WalletOutline`, `MoneyBagOutline`, `MoneyBriefcaseFilled`, `MoneyBriefcaseOutline`, `RupeeOutlined`, `RupeeSign` |
94
- | Communication | `CommentFilled`, `CommentOutline`, `CommentBubbleFilled`, `CommentBubbleOutline`, `CommentLineFilled`, `CommentLineOutline`, `EmailFilled`, `EmailOutline`, `PhoneFilled`, `PhoneOutline`, `PhoneCallingFilled`, `PhoneCallingOutline`, `ContactDetailsFilled`, `ContactDetailsOutline` |
95
- | Delivery & Boxes | `BoxFilled`, `BoxOutline`, `BoxCoveredFilled`, `BoxCoveredOutline`, `DeliveryTruckFastFilled`, `DeliveryTruckFastOutline`, `DeliveryTruckLeftFilled`, `DeliveryTruckLeftOutline`, `DeliveryTruckRightFilled`, `DeliveryTruckRightOutline` |
96
- | Doors & Exit | `DoorClosedFilled`, `DoorClosedOutline`, `DoorOpenFilled`, `DoorOpenOutline`, `ExitArrowInOutline`, `ExitArrowOutOutline` |
97
- | Edit & Files | `EditBoxThick`, `EditBoxThin`, `SaveFilled`, `SaveOutline`, `Download`, `DownloadBoxFilled`, `DownloadBoxOutline`, `Upload`, `UploadBoxFilled`, `UploadBoxOutline` |
98
- | Eye & Fullscreen | `EyeClosed`, `EyeFilled`, `EyeOutline`, `FullScreenFilled`, `FullScreenOutline`, `FullScreenArrowThick`, `FullScreenArrowThin` |
99
- | Filter, Sort & Menu | `Filter`, `FilterList`, `FilterThickFilled`, `FilterThickOutline`, `SortBottomToTop`, `SortTopToBottom`, `SortHorizontal`, `SortVertical`, `HamburgerMenu`, `HamburgerSpaced`, `SettingFilled`, `SettingOutline` |
100
- | Home & Location | `HomeFilled`, `HomeOutline`, `LocationFilled`, `LocationOutline`, `LocationArrowFilled`, `LocationArrowOutline`, `Pin`, `PinFilled`, `PinOutline`, `PinAddFilled`, `PinAddOutline`, `PinCircleFilled`, `PinCircleOutline`, `PinSubFilled`, `PinSubOutline` |
101
- | Info & Help | `Info`, `InfoCircleFilled`, `InfoCircleOutline`, `InfoSquareFilled`, `InfoSquareOutline`, `Help`, `HelpCircleFilled`, `HelpCircleOutline`, `DetailsOutline` |
102
- | Keys & Locks | `KeyFilled`, `KeyOutline`, `KeyInSquareFilled`, `KeyInSquareOutline`, `KeySideSquareFilled`, `KeySideSquareOutline`, `KeySquareFilled`, `KeySquareOutline`, `LockKeyhole`, `LockKeyholeOutline`, `LockKeyholeUnlocked`, `LockKeyholeUnlockedOutline` |
103
- | Media & Volume | `MediaPlayFilled`, `MediaPlayOutline`, `MediaPlayCircleFilled`, `MediaPlayCircleOutline`, `MediaPauseFilled`, `MediaPauseOutline`, `MediaPauseCircleFilled`, `MediaPauseCircleOuline`, `MediaStopFilled`, `MediaStopOutline`, `MediaStopCircleFilled`, `MediaStopCircleOutline`, `VolumeFilled`, `VolumeOutline`, `VolumeMuteFilled`, `VolumeMuteOutline`, `VolumeOffFilled`, `VolumeOffOutline` |
104
- | Profile | `ProfileMaleFilled`, `ProfileMaleOutline`, `ProfileFemaleOutline`, `ProfileGroupFilled` |
105
- | Security & Shield | `ShieldFilled`, `ShieldOutline`, `ShieldCheckFilled`, `ShieldCheckOutline`, `ShieldCrossFilled`, `ShieldCrossOutline`, `ShieldWarningFilled`, `ShieldWarningOutline`, `NoEntry`, `NoEntryFilled`, `NoEntryOutline` |
106
- | Share | `ShareFilled`, `ShareOutline`, `ShareAllFilled`, `ShareAllOutline`, `ShareBoxOutline`, `ShareThickFilled` |
107
- | Social Media | `DiscordConversation`, `DiscordFilled`, `DiscordOutline`, `FacebookFilled`, `FacebookOutline`, `FacebookMessengerOutline`, `FacebookRoundFilled`, `InstagramOuline`, `InstagramRoundFilled`, `LinkedinFilled`, `LinkedinOutline`, `LinkedinRoundFilled`, `PinterestFilled`, `PinterestOutline`, `RedditFilled`, `RedditOutline`, `RedditRoundFilled`, `RedditRoundOutline`, `SnapchatFilled`, `SnapchatOutline`, `TelegramFilled`, `TelegramOutline`, `TelegramRoundFilled`, `TiktokBox`, `TiktokThickFilled`, `TiktokThinFilled`, `WhatsappFilled`, `WhatsappOutline`, `Youtube`, `YoutubeFilled`, `YoutubeRoundFilled` |
108
- | Trash | `TrashFilled`, `TrashOutline`, `TrashBigFilled`, `TrashBigOutline`, `TrashLinesFilled`, `TrashLinesOutline` |
109
- | Warnings & Errors | `Warning`, `WarningSmall`, `WarningCircleFilled`, `WarningCircleOutline`, `WarningTriangleFilled`, `WarningTriangleOutline` |
86
+ | Group | Icons |
87
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
88
+ | Arrows & Chevrons | `ArrowDown`, `ArrowLeft`, `ArrowRight`, `ArrowUp`, `ChevronDown`, `ChevronLeft`, `ChevronRight`, `ChevronUp` |
89
+ | Actions | `Add`, `AddCircle`, `AddCircleFilled`, `Minus`, `MinusCircle`, `MinusCircleFilled`, `Close`, `CloseCircleFilled`, `CloseCircleOutline`, `Check`, `CheckDouble`, `Link`, `Search`, `Loading` |
90
+ | Bells & Dots | `BellFilled`, `BellOutline`, `BellOffFilled`, `BellOffOutline`, `DotsHorizontalFilled`, `DotsHorizontalOutline`, `DotsVerticalFilled`, `DotsVerticalOutline` |
91
+ | Bookmarks & Reactions | `BookmarkFilled`, `BookmarkOutline`, `HeartFilled`, `HeartOutline`, `StarFilled`, `StarOutline`, `ThumbsUpFilled`, `ThumbsUpOutline`, `ThumbsDownFilled`, `ThumbsDownOutline` |
92
+ | Calendar & Clock | `CalendarDays`, `CalendarLinesPen`, `ClockCircleOutline`, `ClockSquareOutline` |
93
+ | Commerce | `BagFilled`, `BagOutline`, `CartFilled`, `CartOutline`, `CartCheckFilled`, `CartCheckOutline`, `CartCrossFilled`, `CartCrossOutline`, `CartMinusFilled`, `CartMinusOutline`, `CartPlusFilled`, `CartPlusOutline`, `PaymentCardFilled`, `PaymentCardOutline`, `WalletFilled`, `WalletOutline`, `MoneyBagOutline`, `MoneyBriefcaseFilled`, `MoneyBriefcaseOutline`, `RupeeOutlined`, `RupeeSign` |
94
+ | Communication | `CommentFilled`, `CommentOutline`, `CommentBubbleFilled`, `CommentBubbleOutline`, `CommentLineFilled`, `CommentLineOutline`, `EmailFilled`, `EmailOutline`, `PhoneFilled`, `PhoneOutline`, `PhoneCallingFilled`, `PhoneCallingOutline`, `ContactDetailsFilled`, `ContactDetailsOutline` |
95
+ | Delivery & Boxes | `BoxFilled`, `BoxOutline`, `BoxCoveredFilled`, `BoxCoveredOutline`, `DeliveryTruckFastFilled`, `DeliveryTruckFastOutline`, `DeliveryTruckLeftFilled`, `DeliveryTruckLeftOutline`, `DeliveryTruckRightFilled`, `DeliveryTruckRightOutline` |
96
+ | Doors & Exit | `DoorClosedFilled`, `DoorClosedOutline`, `DoorOpenFilled`, `DoorOpenOutline`, `ExitArrowInOutline`, `ExitArrowOutOutline` |
97
+ | Edit & Files | `EditBoxThick`, `EditBoxThin`, `SaveFilled`, `SaveOutline`, `Download`, `DownloadBoxFilled`, `DownloadBoxOutline`, `Upload`, `UploadBoxFilled`, `UploadBoxOutline` |
98
+ | Eye & Fullscreen | `EyeClosed`, `EyeFilled`, `EyeOutline`, `FullScreenFilled`, `FullScreenOutline`, `FullScreenArrowThick`, `FullScreenArrowThin` |
99
+ | Filter, Sort & Menu | `Filter`, `FilterList`, `FilterThickFilled`, `FilterThickOutline`, `SortBottomToTop`, `SortTopToBottom`, `SortHorizontal`, `SortVertical`, `HamburgerMenu`, `HamburgerSpaced`, `SettingFilled`, `SettingOutline` |
100
+ | Home & Location | `HomeFilled`, `HomeOutline`, `LocationFilled`, `LocationOutline`, `LocationArrowFilled`, `LocationArrowOutline`, `Pin`, `PinFilled`, `PinOutline`, `PinAddFilled`, `PinAddOutline`, `PinCircleFilled`, `PinCircleOutline`, `PinSubFilled`, `PinSubOutline` |
101
+ | Info & Help | `Info`, `InfoCircleFilled`, `InfoCircleOutline`, `InfoSquareFilled`, `InfoSquareOutline`, `Help`, `HelpCircleFilled`, `HelpCircleOutline`, `DetailsOutline` |
102
+ | Keys & Locks | `KeyFilled`, `KeyOutline`, `KeyInSquareFilled`, `KeyInSquareOutline`, `KeySideSquareFilled`, `KeySideSquareOutline`, `KeySquareFilled`, `KeySquareOutline`, `LockKeyhole`, `LockKeyholeOutline`, `LockKeyholeUnlocked`, `LockKeyholeUnlockedOutline` |
103
+ | Media & Volume | `MediaPlayFilled`, `MediaPlayOutline`, `MediaPlayCircleFilled`, `MediaPlayCircleOutline`, `MediaPauseFilled`, `MediaPauseOutline`, `MediaPauseCircleFilled`, `MediaPauseCircleOuline`, `MediaStopFilled`, `MediaStopOutline`, `MediaStopCircleFilled`, `MediaStopCircleOutline`, `VolumeFilled`, `VolumeOutline`, `VolumeMuteFilled`, `VolumeMuteOutline`, `VolumeOffFilled`, `VolumeOffOutline` |
104
+ | Profile | `ProfileMaleFilled`, `ProfileMaleOutline`, `ProfileFemaleOutline`, `ProfileGroupFilled` |
105
+ | Security & Shield | `ShieldFilled`, `ShieldOutline`, `ShieldCheckFilled`, `ShieldCheckOutline`, `ShieldCrossFilled`, `ShieldCrossOutline`, `ShieldWarningFilled`, `ShieldWarningOutline`, `NoEntry`, `NoEntryFilled`, `NoEntryOutline` |
106
+ | Share | `ShareFilled`, `ShareOutline`, `ShareAllFilled`, `ShareAllOutline`, `ShareBoxOutline`, `ShareThickFilled` |
107
+ | Social Media | `DiscordConversation`, `DiscordFilled`, `DiscordOutline`, `FacebookFilled`, `FacebookOutline`, `FacebookMessengerOutline`, `FacebookRoundFilled`, `InstagramOuline`, `InstagramRoundFilled`, `LinkedinFilled`, `LinkedinOutline`, `LinkedinRoundFilled`, `PinterestFilled`, `PinterestOutline`, `RedditFilled`, `RedditOutline`, `RedditRoundFilled`, `RedditRoundOutline`, `SnapchatFilled`, `SnapchatOutline`, `TelegramFilled`, `TelegramOutline`, `TelegramRoundFilled`, `TiktokBox`, `TiktokThickFilled`, `TiktokThinFilled`, `WhatsappFilled`, `WhatsappOutline`, `Youtube`, `YoutubeFilled`, `YoutubeRoundFilled` |
108
+ | Trash | `TrashFilled`, `TrashOutline`, `TrashBigFilled`, `TrashBigOutline`, `TrashLinesFilled`, `TrashLinesOutline` |
109
+ | Warnings & Errors | `Warning`, `WarningSmall`, `WarningCircleFilled`, `WarningCircleOutline`, `WarningTriangleFilled`, `WarningTriangleOutline` |
110
110
 
111
111
  ## 📦 Tokens
112
112
 
@@ -186,20 +186,35 @@ import blue from 'meticulous-ui/colors/blue';
186
186
  | `maskPhone` | `(str) → string` | Masks all digits except the last four; preserves formatting chars |
187
187
  | `generateInitials` | `(name) → string` | Extracts uppercased first letter of each word, e.g. `"JD"` |
188
188
 
189
+ ### Device Utilities
190
+
191
+ | Function | Signature | Description |
192
+ | ----------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------ |
193
+ | `isMobile` | `() → boolean` | `true` when the UA matches any known mobile platform |
194
+ | `isIOS` | `() → boolean` | `true` on iPhone, iPad, and iPod; handles iPadOS 13+ UA quirk |
195
+ | `isAndroid` | `() → boolean` | `true` when the UA string contains `Android` |
196
+ | `isSafari` | `() → boolean` | `true` for genuine Safari; excludes Chrome/Android which also include "Safari" |
197
+ | `isDarkMode` | `() → boolean` | `true` when the OS/browser prefers dark color scheme |
198
+ | `isOnline` | `() → boolean` | `true` when the browser reports network connectivity |
199
+ | `copyToClipboard` | `(text: string) → Promise<void>` | Copies text using Clipboard API with `execCommand` fallback |
200
+ | `downloadFile` | `(url: string, filename?: string) → void` | Triggers a file download; filename inferred from URL if omitted |
201
+ | `openInNewTab` | `(url: string) → void` | Opens URL in a new tab with `noopener,noreferrer` |
202
+ | `getScreenSize` | `() → { width, height, deviceWidth, deviceHeight, pixelRatio }` | Returns viewport size, physical screen size, and device pixel ratio |
203
+
189
204
  ### Validation Utilities
190
205
 
191
- | Function | Signature | Description |
192
- | ------------------ | ---------------------- | ---------------------------------------------------------------------------- |
193
- | `isEmail` | `(value) → boolean` | Valid email — must have local part, `@`, and domain with dot |
194
- | `isPhone` | `(value) → boolean` | Plausible phone — optional `+`, 7–15 digits, allows spaces/hyphens/parens |
195
- | `isURL` | `(value) → boolean` | Valid `http` or `https` URL via native `URL` constructor |
196
- | `isPasswordStrong` | `(value) → boolean` | 8+ chars with uppercase, lowercase, digit, and special character |
197
- | `isPAN` | `(value) → boolean` | Indian PAN — `AAAAA0000A` (5 letters, 4 digits, 1 letter) |
198
- | `isAadhaar` | `(value) → boolean` | Indian Aadhaar — 12 digits, first digit non-zero; strips spaces |
199
- | `isGST` | `(value) → boolean` | Indian GSTIN — 2-digit state code + PAN + entity digit + `Z` + check char |
200
- | `isRequired` | `(value) → boolean` | `false` for `null`, `undefined`, blank strings, and empty arrays |
201
- | `minLength` | `(value, n) → boolean` | `true` when `value.length >= n` |
202
- | `maxLength` | `(value, n) → boolean` | `true` when `value.length <= n` |
206
+ | Function | Signature | Description |
207
+ | ------------------ | ---------------------- | ------------------------------------------------------------------------- |
208
+ | `isEmail` | `(value) → boolean` | Valid email — must have local part, `@`, and domain with dot |
209
+ | `isPhone` | `(value) → boolean` | Plausible phone — optional `+`, 7–15 digits, allows spaces/hyphens/parens |
210
+ | `isURL` | `(value) → boolean` | Valid `http` or `https` URL via native `URL` constructor |
211
+ | `isPasswordStrong` | `(value) → boolean` | 8+ chars with uppercase, lowercase, digit, and special character |
212
+ | `isPAN` | `(value) → boolean` | Indian PAN — `AAAAA0000A` (5 letters, 4 digits, 1 letter) |
213
+ | `isAadhaar` | `(value) → boolean` | Indian Aadhaar — 12 digits, first digit non-zero; strips spaces |
214
+ | `isGST` | `(value) → boolean` | Indian GSTIN — 2-digit state code + PAN + entity digit + `Z` + check char |
215
+ | `isRequired` | `(value) → boolean` | `false` for `null`, `undefined`, blank strings, and empty arrays |
216
+ | `minLength` | `(value, n) → boolean` | `true` when `value.length >= n` |
217
+ | `maxLength` | `(value, n) → boolean` | `true` when `value.length <= n` |
203
218
 
204
219
  ## 🌱 Features
205
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "license": "ISC",
5
5
  "description": "A comprehensive React UI component library with a wide range of customizable components, icons, colors, and utilities for building modern web applications.",
6
6
  "main": "./index.js",
@@ -0,0 +1,12 @@
1
+ const a = async (t) => {
2
+ var o;
3
+ if ((o = navigator.clipboard) != null && o.writeText) {
4
+ await navigator.clipboard.writeText(t);
5
+ return;
6
+ }
7
+ const e = document.createElement("textarea");
8
+ e.value = t, e.style.cssText = "position:fixed;opacity:0", document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
9
+ };
10
+ export {
11
+ a as default
12
+ };
@@ -0,0 +1,7 @@
1
+ const n = (d, e) => {
2
+ const o = document.createElement("a");
3
+ o.href = d, o.download = e || d.split("/").pop() || "download", document.body.appendChild(o), o.click(), document.body.removeChild(o);
4
+ };
5
+ export {
6
+ n as default
7
+ };
@@ -0,0 +1,10 @@
1
+ const e = () => ({
2
+ width: window.innerWidth,
3
+ height: window.innerHeight,
4
+ deviceWidth: screen.width,
5
+ deviceHeight: screen.height,
6
+ pixelRatio: window.devicePixelRatio || 1
7
+ });
8
+ export {
9
+ e as default
10
+ };
package/utils/index.js CHANGED
@@ -1,50 +1,50 @@
1
- import r from "./capFirstLetter.js";
2
- import o from "./capitalize.js";
1
+ import o from "./capFirstLetter.js";
2
+ import r from "./capitalize.js";
3
3
  import m from "./camelCase.js";
4
- import t from "./chunk.js";
5
- import i from "./clamp.js";
4
+ import i from "./chunk.js";
5
+ import t from "./clamp.js";
6
6
  import p from "./compose.js";
7
7
  import f from "./deepClone.js";
8
8
  import e from "./flattenObject.js";
9
9
  import a from "./formatCompactNumber.js";
10
10
  import s from "./formatCurrency.js";
11
11
  import n from "./formatDate.js";
12
- import c from "./formatNumber.js";
13
- import u from "./formatTime.js";
14
- import d from "./generateInitials.js";
15
- import l from "./getGreetingByTime.js";
12
+ import d from "./formatNumber.js";
13
+ import l from "./formatTime.js";
14
+ import c from "./generateInitials.js";
15
+ import u from "./getGreetingByTime.js";
16
16
  import y from "./groupBy.js";
17
17
  import g from "./hasEqualProps.js";
18
- import h from "./addDays.js";
18
+ import b from "./addDays.js";
19
19
  import k from "./countdown.js";
20
20
  import C from "./differenceInDays.js";
21
- import E from "./isEmpty.js";
22
- import B from "./isEqual.js";
23
- import P from "./isNonEmptyArray.js";
24
- import b from "./isPast.js";
25
- import T from "./isToday.js";
26
- import q from "./kebabCase.js";
27
- import x from "./keyBy.js";
21
+ import h from "./isEmpty.js";
22
+ import E from "./isEqual.js";
23
+ import S from "./isNonEmptyArray.js";
24
+ import T from "./isPast.js";
25
+ import B from "./isToday.js";
26
+ import P from "./kebabCase.js";
27
+ import w from "./keyBy.js";
28
28
  import A from "./maskEmail.js";
29
29
  import D from "./maskPhone.js";
30
- import L from "./mergeDeep.js";
30
+ import I from "./mergeDeep.js";
31
31
  import N from "./omit.js";
32
- import w from "./percentage.js";
33
- import I from "./pick.js";
34
- import S from "./randomBetween.js";
35
- import G from "./randomInt.js";
36
- import R from "./randomValue.js";
37
- import j from "./removeExtraSpaces.js";
38
- import v from "./roundTo.js";
39
- import z from "./slugify.js";
40
- import F from "./snakeCase.js";
41
- import O from "./sortBy.js";
42
- import U from "./timeAgo.js";
43
- import V from "./titleCase.js";
44
- import H from "./truncate.js";
45
- import J from "./uniqueBy.js";
46
- import K from "./isEmail.js";
47
- import M from "./isPhone.js";
32
+ import q from "./percentage.js";
33
+ import x from "./pick.js";
34
+ import L from "./randomBetween.js";
35
+ import O from "./randomInt.js";
36
+ import z from "./randomValue.js";
37
+ import F from "./removeExtraSpaces.js";
38
+ import G from "./roundTo.js";
39
+ import M from "./slugify.js";
40
+ import R from "./snakeCase.js";
41
+ import j from "./sortBy.js";
42
+ import v from "./timeAgo.js";
43
+ import U from "./titleCase.js";
44
+ import V from "./truncate.js";
45
+ import H from "./uniqueBy.js";
46
+ import J from "./isEmail.js";
47
+ import K from "./isPhone.js";
48
48
  import Q from "./isURL.js";
49
49
  import W from "./isPasswordStrong.js";
50
50
  import X from "./isPAN.js";
@@ -52,60 +52,70 @@ import Y from "./isAadhaar.js";
52
52
  import Z from "./isGST.js";
53
53
  import _ from "./isRequired.js";
54
54
  import $ from "./minLength.js";
55
- import rr from "./maxLength.js";
56
- const mo = {
55
+ import oo from "./maxLength.js";
56
+ import ro from "./isMobile.js";
57
+ import mo from "./isIOS.js";
58
+ import io from "./isAndroid.js";
59
+ import to from "./isSafari.js";
60
+ import po from "./isDarkMode.js";
61
+ import fo from "./isOnline.js";
62
+ import eo from "./copyToClipboard.js";
63
+ import ao from "./downloadFile.js";
64
+ import so from "./openInNewTab.js";
65
+ import no from "./getScreenSize.js";
66
+ const Tr = {
57
67
  // string
58
- capFirstLetter: r,
59
- capitalize: o,
68
+ capFirstLetter: o,
69
+ capitalize: r,
60
70
  camelCase: m,
61
- generateInitials: d,
62
- kebabCase: q,
71
+ generateInitials: c,
72
+ kebabCase: P,
63
73
  maskEmail: A,
64
74
  maskPhone: D,
65
- removeExtraSpaces: j,
66
- slugify: z,
67
- snakeCase: F,
68
- titleCase: V,
69
- truncate: H,
75
+ removeExtraSpaces: F,
76
+ slugify: M,
77
+ snakeCase: R,
78
+ titleCase: U,
79
+ truncate: V,
70
80
  // number
71
- clamp: i,
81
+ clamp: t,
72
82
  formatCompactNumber: a,
73
83
  formatCurrency: s,
74
- formatNumber: c,
75
- percentage: w,
76
- randomBetween: S,
77
- randomInt: G,
78
- randomValue: R,
79
- roundTo: v,
84
+ formatNumber: d,
85
+ percentage: q,
86
+ randomBetween: L,
87
+ randomInt: O,
88
+ randomValue: z,
89
+ roundTo: G,
80
90
  // date-time
81
- addDays: h,
91
+ addDays: b,
82
92
  countdown: k,
83
93
  differenceInDays: C,
84
94
  formatDate: n,
85
- formatTime: u,
86
- getGreetingByTime: l,
87
- isPast: b,
88
- isToday: T,
89
- timeAgo: U,
95
+ formatTime: l,
96
+ getGreetingByTime: u,
97
+ isPast: T,
98
+ isToday: B,
99
+ timeAgo: v,
90
100
  // object / array
91
- chunk: t,
101
+ chunk: i,
92
102
  compose: p,
93
103
  deepClone: f,
94
104
  flattenObject: e,
95
105
  groupBy: y,
96
106
  hasEqualProps: g,
97
- isEmpty: E,
98
- isEqual: B,
99
- isNonEmptyArray: P,
100
- keyBy: x,
101
- mergeDeep: L,
107
+ isEmpty: h,
108
+ isEqual: E,
109
+ isNonEmptyArray: S,
110
+ keyBy: w,
111
+ mergeDeep: I,
102
112
  omit: N,
103
- pick: I,
104
- sortBy: O,
105
- uniqueBy: J,
113
+ pick: x,
114
+ sortBy: j,
115
+ uniqueBy: H,
106
116
  // validation
107
- isEmail: K,
108
- isPhone: M,
117
+ isEmail: J,
118
+ isPhone: K,
109
119
  isURL: Q,
110
120
  isPasswordStrong: W,
111
121
  isPAN: X,
@@ -113,8 +123,19 @@ const mo = {
113
123
  isGST: Z,
114
124
  isRequired: _,
115
125
  minLength: $,
116
- maxLength: rr
126
+ maxLength: oo,
127
+ // device
128
+ isMobile: ro,
129
+ isIOS: mo,
130
+ isAndroid: io,
131
+ isSafari: to,
132
+ isDarkMode: po,
133
+ isOnline: fo,
134
+ copyToClipboard: eo,
135
+ downloadFile: ao,
136
+ openInNewTab: so,
137
+ getScreenSize: no
117
138
  };
118
139
  export {
119
- mo as default
140
+ Tr as default
120
141
  };
@@ -0,0 +1,4 @@
1
+ const t = () => /Android/i.test(navigator.userAgent);
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = () => window.matchMedia("(prefers-color-scheme: dark)").matches;
2
+ export {
3
+ e as default
4
+ };
package/utils/isIOS.js ADDED
@@ -0,0 +1,4 @@
1
+ const t = () => /iPhone|iPad|iPod/i.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const e = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const n = () => navigator.onLine;
2
+ export {
3
+ n as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const a = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,6 @@
1
+ const n = (e) => {
2
+ window.open(e, "_blank", "noopener,noreferrer");
3
+ };
4
+ export {
5
+ n as default
6
+ };