@wherabouts/vue-ui 0.1.1 → 0.3.0

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/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
- const ne = {
2
- AU: "Australia"
3
- };
1
+ import { countryName as ne } from "@wherabouts/sdk";
4
2
  function Oe(e) {
5
3
  return {
6
4
  id: e.id,
@@ -11,30 +9,30 @@ function Oe(e) {
11
9
  suburb: e.locality,
12
10
  state: e.state,
13
11
  postcode: e.postcode,
14
- country: ne[e.country] ?? e.country
12
+ country: ne(e.country)
15
13
  };
16
14
  }
17
- function Q(e) {
15
+ function Y(e) {
18
16
  var r, t, o = "";
19
17
  if (typeof e == "string" || typeof e == "number") o += e;
20
18
  else if (typeof e == "object") if (Array.isArray(e)) {
21
19
  var l = e.length;
22
- for (r = 0; r < l; r++) e[r] && (t = Q(e[r])) && (o && (o += " "), o += t);
20
+ for (r = 0; r < l; r++) e[r] && (t = Y(e[r])) && (o && (o += " "), o += t);
23
21
  } else for (t in e) e[t] && (o && (o += " "), o += t);
24
22
  return o;
25
23
  }
26
24
  function se() {
27
- for (var e, r, t = 0, o = "", l = arguments.length; t < l; t++) (e = arguments[t]) && (r = Q(e)) && (o && (o += " "), o += r);
25
+ for (var e, r, t = 0, o = "", l = arguments.length; t < l; t++) (e = arguments[t]) && (r = Y(e)) && (o && (o += " "), o += r);
28
26
  return o;
29
27
  }
30
- const $ = "-", le = (e) => {
28
+ const B = "-", le = (e) => {
31
29
  const r = ae(e), {
32
30
  conflictingClassGroups: t,
33
31
  conflictingClassGroupModifiers: o
34
32
  } = e;
35
33
  return {
36
34
  getClassGroupId: (a) => {
37
- const s = a.split($);
35
+ const s = a.split(B);
38
36
  return s[0] === "" && s.length !== 1 && s.shift(), D(s, r) || ie(a);
39
37
  },
40
38
  getConflictingClassGroupIds: (a, s) => {
@@ -50,13 +48,13 @@ const $ = "-", le = (e) => {
50
48
  return l;
51
49
  if (r.validators.length === 0)
52
50
  return;
53
- const n = e.join($);
51
+ const n = e.join(B);
54
52
  return r.validators.find(({
55
53
  validator: a
56
54
  }) => a(n))?.classGroupId;
57
- }, H = /^\[(.+)\]$/, ie = (e) => {
58
- if (H.test(e)) {
59
- const r = H.exec(e)[1], t = r?.substring(0, r.indexOf(":"));
55
+ }, K = /^\[(.+)\]$/, ie = (e) => {
56
+ if (K.test(e)) {
57
+ const r = K.exec(e)[1], t = r?.substring(0, r.indexOf(":"));
60
58
  if (t)
61
59
  return "arbitrary.." + t;
62
60
  }
@@ -69,18 +67,18 @@ const $ = "-", le = (e) => {
69
67
  validators: []
70
68
  };
71
69
  return de(Object.entries(e.classGroups), t).forEach(([n, a]) => {
72
- U(a, o, n, r);
70
+ $(a, o, n, r);
73
71
  }), o;
74
- }, U = (e, r, t, o) => {
72
+ }, $ = (e, r, t, o) => {
75
73
  e.forEach((l) => {
76
74
  if (typeof l == "string") {
77
- const n = l === "" ? r : K(r, l);
75
+ const n = l === "" ? r : Q(r, l);
78
76
  n.classGroupId = t;
79
77
  return;
80
78
  }
81
79
  if (typeof l == "function") {
82
80
  if (ce(l)) {
83
- U(l(o), r, t, o);
81
+ $(l(o), r, t, o);
84
82
  return;
85
83
  }
86
84
  r.validators.push({
@@ -90,12 +88,12 @@ const $ = "-", le = (e) => {
90
88
  return;
91
89
  }
92
90
  Object.entries(l).forEach(([n, a]) => {
93
- U(a, K(r, n), t, o);
91
+ $(a, Q(r, n), t, o);
94
92
  });
95
93
  });
96
- }, K = (e, r) => {
94
+ }, Q = (e, r) => {
97
95
  let t = e;
98
- return r.split($).forEach((o) => {
96
+ return r.split(B).forEach((o) => {
99
97
  t.nextPart.has(o) || t.nextPart.set(o, {
100
98
  nextPart: /* @__PURE__ */ new Map(),
101
99
  validators: []
@@ -203,9 +201,9 @@ const $ = "-", le = (e) => {
203
201
  if (n.includes(h))
204
202
  continue;
205
203
  n.push(h);
206
- const R = l(b, w);
207
- for (let S = 0; S < R.length; ++S) {
208
- const j = R[S];
204
+ const P = l(b, w);
205
+ for (let S = 0; S < P.length; ++S) {
206
+ const j = P[S];
209
207
  n.push(f + j);
210
208
  }
211
209
  s = g + (s.length > 0 ? " " + s : s);
@@ -246,43 +244,43 @@ function ye(e, ...r) {
246
244
  const c = (e) => {
247
245
  const r = (t) => t[e] || [];
248
246
  return r.isThemeGetter = !0, r;
249
- }, te = /^\[(?:([a-z-]+):)?(.+)\]$/i, xe = /^\d+\/\d+$/, we = /* @__PURE__ */ new Set(["px", "full", "screen"]), ve = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ce = /\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)|color-mix)\(.+\)$/, ze = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ae = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, k = (e) => M(e) || we.has(e) || xe.test(e), z = (e) => G(e, "length", je), M = (e) => !!e && !Number.isNaN(Number(e)), _ = (e) => G(e, "number", M), I = (e) => !!e && Number.isInteger(Number(e)), Se = (e) => e.endsWith("%") && M(e.slice(0, -1)), i = (e) => te.test(e), A = (e) => ve.test(e), Me = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Ge = (e) => G(e, Me, oe), Re = (e) => G(e, "position", oe), Pe = /* @__PURE__ */ new Set(["image", "url"]), Ie = (e) => G(e, Pe, Te), Ne = (e) => G(e, "", Ee), N = () => !0, G = (e, r, t) => {
247
+ }, te = /^\[(?:([a-z-]+):)?(.+)\]$/i, xe = /^\d+\/\d+$/, we = /* @__PURE__ */ new Set(["px", "full", "screen"]), ve = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ke = /\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$/, Ce = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, ze = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Ae = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, C = (e) => M(e) || we.has(e) || xe.test(e), z = (e) => G(e, "length", je), M = (e) => !!e && !Number.isNaN(Number(e)), _ = (e) => G(e, "number", M), I = (e) => !!e && Number.isInteger(Number(e)), Se = (e) => e.endsWith("%") && M(e.slice(0, -1)), i = (e) => te.test(e), A = (e) => ve.test(e), Me = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Ge = (e) => G(e, Me, oe), Pe = (e) => G(e, "position", oe), Re = /* @__PURE__ */ new Set(["image", "url"]), Ie = (e) => G(e, Re, Te), Ne = (e) => G(e, "", Ee), N = () => !0, G = (e, r, t) => {
250
248
  const o = te.exec(e);
251
249
  return o ? o[1] ? typeof r == "string" ? o[1] === r : r.has(o[1]) : t(o[2]) : !1;
252
250
  }, je = (e) => (
253
251
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
254
252
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
255
253
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
256
- Ce.test(e) && !ke.test(e)
254
+ ke.test(e) && !Ce.test(e)
257
255
  ), oe = () => !1, Ee = (e) => ze.test(e), Te = (e) => Ae.test(e), Le = () => {
258
- const e = c("colors"), r = c("spacing"), t = c("blur"), o = c("brightness"), l = 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"), j = c("sepia"), B = c("skew"), F = c("space"), q = c("translate"), L = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], O = () => ["auto", i, r], d = () => [i, r], J = () => ["", k, z], E = () => ["auto", M, i], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], T = () => ["solid", "dashed", "dotted", "double", "none"], Y = () => ["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"], P = () => ["", "0", i], Z = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], C = () => [M, i];
256
+ const e = c("colors"), r = c("spacing"), t = c("blur"), o = c("brightness"), l = 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"), P = c("saturate"), S = c("scale"), j = c("sepia"), U = c("skew"), F = c("space"), q = c("translate"), L = () => ["auto", "contain", "none"], W = () => ["auto", "hidden", "clip", "visible", "scroll"], V = () => ["auto", i, r], d = () => [i, r], J = () => ["", C, z], E = () => ["auto", M, i], 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"], R = () => ["", "0", i], H = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], k = () => [M, i];
259
257
  return {
260
258
  cacheSize: 500,
261
259
  separator: ":",
262
260
  theme: {
263
261
  colors: [N],
264
- spacing: [k, z],
262
+ spacing: [C, z],
265
263
  blur: ["none", "", A, i],
266
- brightness: C(),
264
+ brightness: k(),
267
265
  borderColor: [e],
268
266
  borderRadius: ["none", "", "full", A, i],
269
267
  borderSpacing: d(),
270
268
  borderWidth: J(),
271
- contrast: C(),
272
- grayscale: P(),
273
- hueRotate: C(),
274
- invert: P(),
269
+ contrast: k(),
270
+ grayscale: R(),
271
+ hueRotate: k(),
272
+ invert: R(),
275
273
  gap: d(),
276
274
  gradientColorStops: [e],
277
275
  gradientColorStopPositions: [Se, z],
278
- inset: O(),
279
- margin: O(),
280
- opacity: C(),
276
+ inset: V(),
277
+ margin: V(),
278
+ opacity: k(),
281
279
  padding: d(),
282
- saturate: C(),
283
- scale: C(),
284
- sepia: P(),
285
- skew: C(),
280
+ saturate: k(),
281
+ scale: k(),
282
+ sepia: R(),
283
+ skew: k(),
286
284
  space: d(),
287
285
  translate: d()
288
286
  },
@@ -312,14 +310,14 @@ const c = (e) => {
312
310
  * @see https://tailwindcss.com/docs/break-after
313
311
  */
314
312
  "break-after": [{
315
- "break-after": Z()
313
+ "break-after": H()
316
314
  }],
317
315
  /**
318
316
  * Break Before
319
317
  * @see https://tailwindcss.com/docs/break-before
320
318
  */
321
319
  "break-before": [{
322
- "break-before": Z()
320
+ "break-before": H()
323
321
  }],
324
322
  /**
325
323
  * Break Inside
@@ -508,7 +506,7 @@ const c = (e) => {
508
506
  * @see https://tailwindcss.com/docs/flex-basis
509
507
  */
510
508
  basis: [{
511
- basis: O()
509
+ basis: V()
512
510
  }],
513
511
  /**
514
512
  * Flex Direction
@@ -536,14 +534,14 @@ const c = (e) => {
536
534
  * @see https://tailwindcss.com/docs/flex-grow
537
535
  */
538
536
  grow: [{
539
- grow: P()
537
+ grow: R()
540
538
  }],
541
539
  /**
542
540
  * Flex Shrink
543
541
  * @see https://tailwindcss.com/docs/flex-shrink
544
542
  */
545
543
  shrink: [{
546
- shrink: P()
544
+ shrink: R()
547
545
  }],
548
546
  /**
549
547
  * Order
@@ -659,7 +657,7 @@ const c = (e) => {
659
657
  * @see https://tailwindcss.com/docs/justify-content
660
658
  */
661
659
  "justify-content": [{
662
- justify: ["normal", ...V()]
660
+ justify: ["normal", ...O()]
663
661
  }],
664
662
  /**
665
663
  * Justify Items
@@ -680,7 +678,7 @@ const c = (e) => {
680
678
  * @see https://tailwindcss.com/docs/align-content
681
679
  */
682
680
  "align-content": [{
683
- content: ["normal", ...V(), "baseline"]
681
+ content: ["normal", ...O(), "baseline"]
684
682
  }],
685
683
  /**
686
684
  * Align Items
@@ -701,7 +699,7 @@ const c = (e) => {
701
699
  * @see https://tailwindcss.com/docs/place-content
702
700
  */
703
701
  "place-content": [{
704
- "place-content": [...V(), "baseline"]
702
+ "place-content": [...O(), "baseline"]
705
703
  }],
706
704
  /**
707
705
  * Place Items
@@ -1001,7 +999,7 @@ const c = (e) => {
1001
999
  * @see https://tailwindcss.com/docs/line-height
1002
1000
  */
1003
1001
  leading: [{
1004
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", k, i]
1002
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose", C, i]
1005
1003
  }],
1006
1004
  /**
1007
1005
  * List Style Image
@@ -1077,14 +1075,14 @@ const c = (e) => {
1077
1075
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1078
1076
  */
1079
1077
  "text-decoration-thickness": [{
1080
- decoration: ["auto", "from-font", k, z]
1078
+ decoration: ["auto", "from-font", C, z]
1081
1079
  }],
1082
1080
  /**
1083
1081
  * Text Underline Offset
1084
1082
  * @see https://tailwindcss.com/docs/text-underline-offset
1085
1083
  */
1086
1084
  "underline-offset": [{
1087
- "underline-offset": ["auto", k, i]
1085
+ "underline-offset": ["auto", C, i]
1088
1086
  }],
1089
1087
  /**
1090
1088
  * Text Decoration Color
@@ -1187,7 +1185,7 @@ const c = (e) => {
1187
1185
  * @see https://tailwindcss.com/docs/background-position
1188
1186
  */
1189
1187
  "bg-position": [{
1190
- bg: [...X(), Re]
1188
+ bg: [...X(), Pe]
1191
1189
  }],
1192
1190
  /**
1193
1191
  * Background Repeat
@@ -1566,14 +1564,14 @@ const c = (e) => {
1566
1564
  * @see https://tailwindcss.com/docs/outline-offset
1567
1565
  */
1568
1566
  "outline-offset": [{
1569
- "outline-offset": [k, i]
1567
+ "outline-offset": [C, i]
1570
1568
  }],
1571
1569
  /**
1572
1570
  * Outline Width
1573
1571
  * @see https://tailwindcss.com/docs/outline-width
1574
1572
  */
1575
1573
  "outline-w": [{
1576
- outline: [k, z]
1574
+ outline: [C, z]
1577
1575
  }],
1578
1576
  /**
1579
1577
  * Outline Color
@@ -1613,7 +1611,7 @@ const c = (e) => {
1613
1611
  * @see https://tailwindcss.com/docs/ring-offset-width
1614
1612
  */
1615
1613
  "ring-offset-w": [{
1616
- "ring-offset": [k, z]
1614
+ "ring-offset": [C, z]
1617
1615
  }],
1618
1616
  /**
1619
1617
  * Ring Offset Color
@@ -1649,14 +1647,14 @@ const c = (e) => {
1649
1647
  * @see https://tailwindcss.com/docs/mix-blend-mode
1650
1648
  */
1651
1649
  "mix-blend": [{
1652
- "mix-blend": [...Y(), "plus-lighter", "plus-darker"]
1650
+ "mix-blend": [...Z(), "plus-lighter", "plus-darker"]
1653
1651
  }],
1654
1652
  /**
1655
1653
  * Background Blend Mode
1656
1654
  * @see https://tailwindcss.com/docs/background-blend-mode
1657
1655
  */
1658
1656
  "bg-blend": [{
1659
- "bg-blend": Y()
1657
+ "bg-blend": Z()
1660
1658
  }],
1661
1659
  // Filters
1662
1660
  /**
@@ -1721,7 +1719,7 @@ const c = (e) => {
1721
1719
  * @see https://tailwindcss.com/docs/saturate
1722
1720
  */
1723
1721
  saturate: [{
1724
- saturate: [R]
1722
+ saturate: [P]
1725
1723
  }],
1726
1724
  /**
1727
1725
  * Sepia
@@ -1792,7 +1790,7 @@ const c = (e) => {
1792
1790
  * @see https://tailwindcss.com/docs/backdrop-saturate
1793
1791
  */
1794
1792
  "backdrop-saturate": [{
1795
- "backdrop-saturate": [R]
1793
+ "backdrop-saturate": [P]
1796
1794
  }],
1797
1795
  /**
1798
1796
  * Backdrop Sepia
@@ -1857,7 +1855,7 @@ const c = (e) => {
1857
1855
  * @see https://tailwindcss.com/docs/transition-duration
1858
1856
  */
1859
1857
  duration: [{
1860
- duration: C()
1858
+ duration: k()
1861
1859
  }],
1862
1860
  /**
1863
1861
  * Transition Timing Function
@@ -1871,7 +1869,7 @@ const c = (e) => {
1871
1869
  * @see https://tailwindcss.com/docs/transition-delay
1872
1870
  */
1873
1871
  delay: [{
1874
- delay: C()
1872
+ delay: k()
1875
1873
  }],
1876
1874
  /**
1877
1875
  * Animation
@@ -1935,14 +1933,14 @@ const c = (e) => {
1935
1933
  * @see https://tailwindcss.com/docs/skew
1936
1934
  */
1937
1935
  "skew-x": [{
1938
- "skew-x": [B]
1936
+ "skew-x": [U]
1939
1937
  }],
1940
1938
  /**
1941
1939
  * Skew Y
1942
1940
  * @see https://tailwindcss.com/docs/skew
1943
1941
  */
1944
1942
  "skew-y": [{
1945
- "skew-y": [B]
1943
+ "skew-y": [U]
1946
1944
  }],
1947
1945
  /**
1948
1946
  * Transform Origin
@@ -2208,7 +2206,7 @@ const c = (e) => {
2208
2206
  * @see https://tailwindcss.com/docs/stroke-width
2209
2207
  */
2210
2208
  "stroke-w": [{
2211
- stroke: [k, z, _]
2209
+ stroke: [C, z, _]
2212
2210
  }],
2213
2211
  /**
2214
2212
  * Stroke
@@ -2284,11 +2282,11 @@ const c = (e) => {
2284
2282
  }
2285
2283
  };
2286
2284
  }, We = /* @__PURE__ */ ye(Le);
2287
- function Ve(...e) {
2285
+ function _e(...e) {
2288
2286
  return We(se(e));
2289
2287
  }
2290
2288
  export {
2291
- Ve as cn,
2289
+ _e as cn,
2292
2290
  Oe as toAddressWithParsed
2293
2291
  };
2294
2292
  //# sourceMappingURL=index.js.map