@scbt-ecom/ui 0.46.3 → 0.46.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.
@@ -6,4 +6,5 @@ export declare class TypeGuards {
6
6
  static isNil(value: unknown): value is boolean;
7
7
  static isArray(value: unknown): value is unknown[];
8
8
  static isArrayEmpty(value: unknown): value is boolean;
9
+ static isObject(value: unknown): value is Record<string, unknown>;
9
10
  }
@@ -190,8 +190,8 @@ const $ = "-", se = (e) => {
190
190
  n.push(h);
191
191
  const R = i(b, w);
192
192
  for (let S = 0; S < R.length; ++S) {
193
- const N = R[S];
194
- n.push(f + N);
193
+ const E = R[S];
194
+ n.push(f + E);
195
195
  }
196
196
  s = g + (s.length > 0 ? " " + s : s);
197
197
  }
@@ -231,21 +231,21 @@ function he(e, ...r) {
231
231
  const c = (e) => {
232
232
  const r = (t) => t[e] || [];
233
233
  return r.isThemeGetter = !0, r;
234
- }, te = /^\[(?:([a-z-]+):)?(.+)\]$/i, ye = /^\d+\/\d+$/, xe = /* @__PURE__ */ new Set(["px", "full", "screen"]), we = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ve = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ke = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ce = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ze = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, C = (e) => M(e) || xe.has(e) || ye.test(e), z = (e) => G(e, "length", Ee), M = (e) => !!e && !Number.isNaN(Number(e)), U = (e) => G(e, "number", M), P = (e) => !!e && Number.isInteger(Number(e)), Ae = (e) => e.endsWith("%") && M(e.slice(0, -1)), l = (e) => te.test(e), A = (e) => we.test(e), Se = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Me = (e) => G(e, Se, oe), Ge = (e) => G(e, "position", oe), Re = /* @__PURE__ */ new Set(["image", "url"]), Ie = (e) => G(e, Re, je), Pe = (e) => G(e, "", Ne), E = () => !0, G = (e, r, t) => {
234
+ }, te = /^\[(?:([a-z-]+):)?(.+)\]$/i, ye = /^\d+\/\d+$/, xe = /* @__PURE__ */ new Set(["px", "full", "screen"]), we = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ve = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, ke = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Ce = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ze = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, C = (e) => M(e) || xe.has(e) || ye.test(e), z = (e) => G(e, "length", je), M = (e) => !!e && !Number.isNaN(Number(e)), U = (e) => G(e, "number", M), P = (e) => !!e && Number.isInteger(Number(e)), Ae = (e) => e.endsWith("%") && M(e.slice(0, -1)), l = (e) => te.test(e), A = (e) => we.test(e), Se = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Me = (e) => G(e, Se, oe), Ge = (e) => G(e, "position", oe), Re = /* @__PURE__ */ new Set(["image", "url"]), Ie = (e) => G(e, Re, Ne), Pe = (e) => G(e, "", Ee), j = () => !0, G = (e, r, t) => {
235
235
  const o = te.exec(e);
236
236
  return o ? o[1] ? typeof r == "string" ? o[1] === r : r.has(o[1]) : t(o[2]) : !1;
237
- }, Ee = (e) => (
237
+ }, je = (e) => (
238
238
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
239
239
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
240
240
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
241
241
  ve.test(e) && !ke.test(e)
242
- ), oe = () => !1, Ne = (e) => Ce.test(e), je = (e) => ze.test(e), Te = () => {
243
- const e = c("colors"), r = c("spacing"), t = c("blur"), o = c("brightness"), i = c("borderColor"), n = c("borderRadius"), a = c("borderSpacing"), s = c("borderWidth"), u = c("contrast"), g = c("grayscale"), m = c("hueRotate"), y = c("invert"), x = c("gap"), v = c("gradientColorStops"), w = c("gradientColorStopPositions"), b = c("inset"), p = c("margin"), f = c("opacity"), h = c("padding"), R = c("saturate"), S = c("scale"), N = c("sepia"), B = c("skew"), F = c("space"), q = c("translate"), L = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], V = () => ["auto", l, r], d = () => [l, r], J = () => ["", C, z], j = () => ["auto", M, l], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], Z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], I = () => ["", "0", l], H = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], k = () => [M, l];
242
+ ), oe = () => !1, Ee = (e) => Ce.test(e), Ne = (e) => ze.test(e), Te = () => {
243
+ const e = c("colors"), r = c("spacing"), t = c("blur"), o = c("brightness"), i = c("borderColor"), n = c("borderRadius"), a = c("borderSpacing"), s = c("borderWidth"), u = c("contrast"), g = c("grayscale"), m = c("hueRotate"), y = c("invert"), x = c("gap"), v = c("gradientColorStops"), w = c("gradientColorStopPositions"), b = c("inset"), p = c("margin"), f = c("opacity"), h = c("padding"), R = c("saturate"), S = c("scale"), E = c("sepia"), B = c("skew"), F = c("space"), q = c("translate"), L = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", l, r], d = () => [l, r], J = () => ["", C, z], N = () => ["auto", M, l], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], Z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], I = () => ["", "0", l], H = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], k = () => [M, l];
244
244
  return {
245
245
  cacheSize: 500,
246
246
  separator: ":",
247
247
  theme: {
248
- colors: [E],
248
+ colors: [j],
249
249
  spacing: [C, z],
250
250
  blur: ["none", "", A, l],
251
251
  brightness: k(),
@@ -260,8 +260,8 @@ const c = (e) => {
260
260
  gap: d(),
261
261
  gradientColorStops: [e],
262
262
  gradientColorStopPositions: [Ae, z],
263
- inset: V(),
264
- margin: V(),
263
+ inset: O(),
264
+ margin: O(),
265
265
  opacity: k(),
266
266
  padding: d(),
267
267
  saturate: k(),
@@ -493,7 +493,7 @@ const c = (e) => {
493
493
  * @see https://tailwindcss.com/docs/flex-basis
494
494
  */
495
495
  basis: [{
496
- basis: V()
496
+ basis: O()
497
497
  }],
498
498
  /**
499
499
  * Flex Direction
@@ -542,7 +542,7 @@ const c = (e) => {
542
542
  * @see https://tailwindcss.com/docs/grid-template-columns
543
543
  */
544
544
  "grid-cols": [{
545
- "grid-cols": [E]
545
+ "grid-cols": [j]
546
546
  }],
547
547
  /**
548
548
  * Grid Column Start / End
@@ -558,21 +558,21 @@ const c = (e) => {
558
558
  * @see https://tailwindcss.com/docs/grid-column
559
559
  */
560
560
  "col-start": [{
561
- "col-start": j()
561
+ "col-start": N()
562
562
  }],
563
563
  /**
564
564
  * Grid Column End
565
565
  * @see https://tailwindcss.com/docs/grid-column
566
566
  */
567
567
  "col-end": [{
568
- "col-end": j()
568
+ "col-end": N()
569
569
  }],
570
570
  /**
571
571
  * Grid Template Rows
572
572
  * @see https://tailwindcss.com/docs/grid-template-rows
573
573
  */
574
574
  "grid-rows": [{
575
- "grid-rows": [E]
575
+ "grid-rows": [j]
576
576
  }],
577
577
  /**
578
578
  * Grid Row Start / End
@@ -588,14 +588,14 @@ const c = (e) => {
588
588
  * @see https://tailwindcss.com/docs/grid-row
589
589
  */
590
590
  "row-start": [{
591
- "row-start": j()
591
+ "row-start": N()
592
592
  }],
593
593
  /**
594
594
  * Grid Row End
595
595
  * @see https://tailwindcss.com/docs/grid-row
596
596
  */
597
597
  "row-end": [{
598
- "row-end": j()
598
+ "row-end": N()
599
599
  }],
600
600
  /**
601
601
  * Grid Auto Flow
@@ -644,7 +644,7 @@ const c = (e) => {
644
644
  * @see https://tailwindcss.com/docs/justify-content
645
645
  */
646
646
  "justify-content": [{
647
- justify: ["normal", ...O()]
647
+ justify: ["normal", ...V()]
648
648
  }],
649
649
  /**
650
650
  * Justify Items
@@ -665,7 +665,7 @@ const c = (e) => {
665
665
  * @see https://tailwindcss.com/docs/align-content
666
666
  */
667
667
  "align-content": [{
668
- content: ["normal", ...O(), "baseline"]
668
+ content: ["normal", ...V(), "baseline"]
669
669
  }],
670
670
  /**
671
671
  * Align Items
@@ -686,7 +686,7 @@ const c = (e) => {
686
686
  * @see https://tailwindcss.com/docs/place-content
687
687
  */
688
688
  "place-content": [{
689
- "place-content": [...O(), "baseline"]
689
+ "place-content": [...V(), "baseline"]
690
690
  }],
691
691
  /**
692
692
  * Place Items
@@ -935,7 +935,7 @@ const c = (e) => {
935
935
  * @see https://tailwindcss.com/docs/font-family
936
936
  */
937
937
  "font-family": [{
938
- font: [E]
938
+ font: [j]
939
939
  }],
940
940
  /**
941
941
  * Font Variant Numeric
@@ -1620,7 +1620,7 @@ const c = (e) => {
1620
1620
  * @see https://tailwindcss.com/docs/box-shadow-color
1621
1621
  */
1622
1622
  "shadow-color": [{
1623
- shadow: [E]
1623
+ shadow: [j]
1624
1624
  }],
1625
1625
  /**
1626
1626
  * Opacity
@@ -1713,7 +1713,7 @@ const c = (e) => {
1713
1713
  * @see https://tailwindcss.com/docs/sepia
1714
1714
  */
1715
1715
  sepia: [{
1716
- sepia: [N]
1716
+ sepia: [E]
1717
1717
  }],
1718
1718
  /**
1719
1719
  * Backdrop Filter
@@ -1784,7 +1784,7 @@ const c = (e) => {
1784
1784
  * @see https://tailwindcss.com/docs/backdrop-sepia
1785
1785
  */
1786
1786
  "backdrop-sepia": [{
1787
- "backdrop-sepia": [N]
1787
+ "backdrop-sepia": [E]
1788
1788
  }],
1789
1789
  // Tables
1790
1790
  /**
@@ -2269,7 +2269,7 @@ const c = (e) => {
2269
2269
  }
2270
2270
  };
2271
2271
  }, Le = /* @__PURE__ */ he(Te), We = (...e) => Le(ne(e));
2272
- class Ve {
2272
+ class Oe {
2273
2273
  static isString(r) {
2274
2274
  return typeof r == "string";
2275
2275
  }
@@ -2291,10 +2291,13 @@ class Ve {
2291
2291
  static isArrayEmpty(r) {
2292
2292
  return this.isArray(r) && !r.length;
2293
2293
  }
2294
+ static isObject(r) {
2295
+ return typeof r == "object" && r !== null && !Array.isArray(r);
2296
+ }
2294
2297
  }
2295
2298
  export {
2296
- Ve as T,
2299
+ Oe as T,
2297
2300
  ne as a,
2298
2301
  We as c
2299
2302
  };
2300
- //# sourceMappingURL=typeGuards-yOWv7RXH.js.map
2303
+ //# sourceMappingURL=typeGuards-CSJS99k6.js.map