sprintify-ui 0.6.38 → 0.6.39

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.
@@ -243,7 +243,7 @@ function u0() {
243
243
  return a(Zb.apply(null, arguments));
244
244
  };
245
245
  }
246
- function $t(n) {
246
+ function Ht(n) {
247
247
  var t = function(r) {
248
248
  return r[n] || [];
249
249
  };
@@ -309,7 +309,7 @@ function E0(n) {
309
309
  return p0.test(n);
310
310
  }
311
311
  function S0() {
312
- var n = $t("colors"), t = $t("spacing"), e = $t("blur"), r = $t("brightness"), i = $t("borderColor"), o = $t("borderRadius"), a = $t("borderSpacing"), l = $t("borderWidth"), s = $t("contrast"), d = $t("grayscale"), c = $t("hueRotate"), h = $t("invert"), f = $t("gap"), p = $t("gradientColorStops"), g = $t("gradientColorStopPositions"), m = $t("inset"), v = $t("margin"), y = $t("opacity"), b = $t("padding"), u = $t("saturate"), w = $t("scale"), x = $t("sepia"), _ = $t("skew"), k = $t("space"), E = $t("translate"), D = function() {
312
+ var n = Ht("colors"), t = Ht("spacing"), e = Ht("blur"), r = Ht("brightness"), i = Ht("borderColor"), o = Ht("borderRadius"), a = Ht("borderSpacing"), l = Ht("borderWidth"), s = Ht("contrast"), d = Ht("grayscale"), c = Ht("hueRotate"), h = Ht("invert"), f = Ht("gap"), p = Ht("gradientColorStops"), g = Ht("gradientColorStopPositions"), m = Ht("inset"), v = Ht("margin"), y = Ht("opacity"), b = Ht("padding"), u = Ht("saturate"), w = Ht("scale"), x = Ht("sepia"), _ = Ht("skew"), k = Ht("space"), E = Ht("translate"), D = function() {
313
313
  return ["auto", "contain", "none"];
314
314
  }, A = function() {
315
315
  return ["auto", "hidden", "clip", "visible", "scroll"];
@@ -2563,13 +2563,14 @@ const fr = {
2563
2563
  }
2564
2564
  };
2565
2565
  function Vi(n) {
2566
- const t = cd(), e = qt.props.size ?? "md";
2566
+ var i;
2567
+ const t = cd(), e = ((i = $t.props) == null ? void 0 : i.size) ?? "md";
2567
2568
  return {
2568
2569
  size: L(() => {
2569
2570
  if (t.smaller("sm").value)
2570
2571
  return "md";
2571
- let i = T(n);
2572
- return i || (i = e), Object.keys(fr).includes(i) || (i = e), i;
2572
+ let o = T(n);
2573
+ return o || (o = e), Object.keys(fr).includes(o) || (o = e), o;
2573
2574
  })
2574
2575
  };
2575
2576
  }
@@ -5854,7 +5855,7 @@ const Jw = ["value", "name", "disabled", "required"], ex = ["value"], Su = "", _
5854
5855
  const e = n, { size: r } = Vi(L(() => e.size)), i = L(() => {
5855
5856
  const y = Kt(e.modelValue ?? {});
5856
5857
  return y.address_1 = y.address_1 ?? "", y.address_2 = y.address_2 ?? "", y.city = y.city ?? "", y.postal_code = y.postal_code ?? "", y.country = y.country ?? "", y.region = y.region ?? "", y;
5857
- }), o = L(() => e.restrictCountry ? i.value.country ? i.value.country : nx : i.value.country ?? null), a = L(() => e.countries && tn(e.countries) && e.countries.length ? e.countries : qt.countries), l = L(() => e.regions && tn(e.regions) && e.regions.length ? e.regions : qt.regions), s = L(() => l.value.filter(
5858
+ }), o = L(() => e.restrictCountry ? i.value.country ? i.value.country : nx : i.value.country ?? null), a = L(() => e.countries && tn(e.countries) && e.countries.length ? e.countries : $t.countries), l = L(() => e.regions && tn(e.regions) && e.regions.length ? e.regions : $t.regions), s = L(() => l.value.filter(
5858
5859
  (y) => y.country_id == i.value.country
5859
5860
  )), d = L(() => e.prefix ? e.prefix + "." : "");
5860
5861
  function c(y, b) {
@@ -7638,7 +7639,7 @@ const qx = {
7638
7639
  }
7639
7640
  );
7640
7641
  function b() {
7641
- o.value || (o.value = !0, i.value = !0, qt.http.get(r.url, {
7642
+ o.value || (o.value = !0, i.value = !0, $t.http.get(r.url, {
7642
7643
  params: {
7643
7644
  [r.queryKey]: l.value,
7644
7645
  page: s.value
@@ -8004,8 +8005,8 @@ function tg(n, t) {
8004
8005
  const e = gh(n), r = gh(t);
8005
8006
  return e > r ? (e + 0.05) / (r + 0.05) : (r + 0.05) / (e + 0.05);
8006
8007
  }
8007
- var ng = {}, rg = {}, Od = { exports: {} }, Ht = String, ig = function() {
8008
- return { isColorSupported: !1, reset: Ht, bold: Ht, dim: Ht, italic: Ht, underline: Ht, inverse: Ht, hidden: Ht, strikethrough: Ht, black: Ht, red: Ht, green: Ht, yellow: Ht, blue: Ht, magenta: Ht, cyan: Ht, white: Ht, gray: Ht, bgBlack: Ht, bgRed: Ht, bgGreen: Ht, bgYellow: Ht, bgBlue: Ht, bgMagenta: Ht, bgCyan: Ht, bgWhite: Ht };
8008
+ var ng = {}, rg = {}, Od = { exports: {} }, qt = String, ig = function() {
8009
+ return { isColorSupported: !1, reset: qt, bold: qt, dim: qt, italic: qt, underline: qt, inverse: qt, hidden: qt, strikethrough: qt, black: qt, red: qt, green: qt, yellow: qt, blue: qt, magenta: qt, cyan: qt, white: qt, gray: qt, bgBlack: qt, bgRed: qt, bgGreen: qt, bgYellow: qt, bgBlue: qt, bgMagenta: qt, bgCyan: qt, bgWhite: qt };
8009
8010
  };
8010
8011
  Od.exports = ig();
8011
8012
  Od.exports.createColors = ig;
@@ -8852,7 +8853,7 @@ const Rd = /* @__PURE__ */ Se({
8852
8853
  },
8853
8854
  emits: ["update:modelValue"],
8854
8855
  setup(n, { expose: t, emit: e }) {
8855
- const r = n, i = qt.http, o = oe(null), a = oe(r.currentModel);
8856
+ const r = n, i = $t.http, o = oe(null), a = oe(r.currentModel);
8856
8857
  ut(
8857
8858
  () => r.currentModel,
8858
8859
  (s, d) => {
@@ -24049,7 +24050,7 @@ const RO = { class: "grow" }, MO = {
24049
24050
  "fetch"
24050
24051
  ],
24051
24052
  setup(n, { expose: t, emit: e }) {
24052
- const r = n, i = qt.http, o = oe(null), a = oe(!1), l = am(), s = lm(), d = l.name, c = Vi(r.size);
24053
+ const r = n, i = $t.http, o = oe(null), a = oe(!1), l = am(), s = lm(), d = l.name, c = Vi(r.size);
24053
24054
  let h = !1;
24054
24055
  Fn(() => {
24055
24056
  h = !0;
@@ -24097,8 +24098,8 @@ const RO = { class: "grow" }, MO = {
24097
24098
  const Ce = s.resolve({
24098
24099
  name: l.name,
24099
24100
  params: l.params
24100
- }), I = qt.formatQueryString(Te), X = Ce.fullPath + "?" + I, ee = ne();
24101
- if (qt.formatQueryString(ee) != I) {
24101
+ }), I = $t.formatQueryString(Te), X = Ce.fullPath + "?" + I, ee = ne();
24102
+ if ($t.formatQueryString(ee) != I) {
24102
24103
  if (!p.value) {
24103
24104
  s.replace(X);
24104
24105
  return;
@@ -24145,7 +24146,7 @@ const RO = { class: "grow" }, MO = {
24145
24146
  }
24146
24147
  );
24147
24148
  function ne() {
24148
- return qt.parseQueryString(window.location.search.replace(/^(\?)/, ""));
24149
+ return $t.parseQueryString(window.location.search.replace(/^(\?)/, ""));
24149
24150
  }
24150
24151
  function z() {
24151
24152
  if (!r.historyMode || h || l.name != d)
@@ -24162,11 +24163,11 @@ const RO = { class: "grow" }, MO = {
24162
24163
  function F(Te = !1, Ce = !0) {
24163
24164
  if (h)
24164
24165
  return;
24165
- const I = $.value.split(/[?#]/), X = I[0], ee = I[1] ?? null, le = qt.parseQueryString(ee), U = Wl(
24166
+ const I = $.value.split(/[?#]/), X = I[0], ee = I[1] ?? null, le = $t.parseQueryString(ee), U = Wl(
24166
24167
  Kt(u.value),
24167
24168
  Kt(r.urlQuery),
24168
24169
  Kt(le)
24169
- ), ae = qt.formatQueryString(U), ve = X + "?" + ae;
24170
+ ), ae = $t.formatQueryString(U), ve = X + "?" + ae;
24170
24171
  y == ve && !Te || (Ce && (g.value = !0), y = ve, i.get(ve).then((Ie) => {
24171
24172
  se.value = Ie.data, g.value = !1, m.value = !1, p.value = !0, e("fetch", se.value);
24172
24173
  }).catch(() => {
@@ -25375,7 +25376,7 @@ const Uy = /* @__PURE__ */ pi(YR, [["render", XR]]), JR = ["disabled"], eM = /*
25375
25376
  "fetch"
25376
25377
  ],
25377
25378
  setup(n, { expose: t, emit: e }) {
25378
- const r = n, i = lm(), o = qt.http, a = _d(), l = Yi(), s = oe(null), d = Vi(r.size), c = L(() => d.size.value == "md" ? "sm" : (d.size.value == "sm", "xs")), h = oe(null);
25379
+ const r = n, i = lm(), o = $t.http, a = _d(), l = Yi(), s = oe(null), d = Vi(r.size), c = L(() => d.size.value == "md" ? "sm" : (d.size.value == "sm", "xs")), h = oe(null);
25379
25380
  function f(z) {
25380
25381
  r.showUrl && i.push(r.showUrl(z)), e("cell-click", z);
25381
25382
  }
@@ -29538,7 +29539,7 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
29538
29539
  setup(n, { expose: t }) {
29539
29540
  const e = n, r = oe(
29540
29541
  null
29541
- ), i = qt.http, o = oe(!1), a = oe(!1), l = oe(!1), s = oe(""), d = oe(1), c = oe([]), h = oe(
29542
+ ), i = $t.http, o = oe(!1), a = oe(!1), l = oe(!1), s = oe(""), d = oe(1), c = oe([]), h = oe(
29542
29543
  null
29543
29544
  ), { items: f, lastPage: p } = Td(h), g = (u) => {
29544
29545
  d.value = 1, s.value != u && (s.value = u, o.value = !0, b());
@@ -29927,7 +29928,7 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
29927
29928
  (h) => null
29928
29929
  );
29929
29930
  oe(["#10b981", "#06b6d4", "#a855f7"]);
29930
- const a = L(() => e.locales ? e.locales : qt.locales), l = L(() => {
29931
+ const a = L(() => e.locales ? e.locales : $t.locales), l = L(() => {
29931
29932
  let h = {};
29932
29933
  return e.modelValue && Hb(e.modelValue) && (h = e.modelValue), Object.keys(a.value).forEach((f) => {
29933
29934
  li(e.modelValue, f) || (h[f] = e.defaultValue);
@@ -30274,7 +30275,7 @@ const JM = ["disabled"], eI = ["accept", "multiple"], _f = /* @__PURE__ */ Se({
30274
30275
  "end"
30275
30276
  ],
30276
30277
  setup(n, { emit: t }) {
30277
- const e = n, r = qt.http, i = Yi(), o = L(() => e.component == "BaseFilePickerCrop" ? Qy : _f), a = L(() => {
30278
+ const e = n, r = $t.http, i = Yi(), o = L(() => e.component == "BaseFilePickerCrop" ? Qy : _f), a = L(() => {
30278
30279
  const c = {
30279
30280
  disabled: e.disabled || e.loading || l.value,
30280
30281
  twButton: e.twButton,
@@ -30315,7 +30316,7 @@ const JM = ["disabled"], eI = ["accept", "multiple"], _f = /* @__PURE__ */ Se({
30315
30316
  async function d(c) {
30316
30317
  const h = new FormData();
30317
30318
  h.append("file", c);
30318
- const p = (await r.post(e.url ?? qt.upload_url, h)).data;
30319
+ const p = (await r.post(e.url ?? $t.upload_url, h)).data;
30319
30320
  return p.original_file = c, new Promise((g) => {
30320
30321
  const m = new FileReader();
30321
30322
  m.onload = (v) => {
@@ -30462,7 +30463,7 @@ const sI = { class: "absolute z-[1] inset-0 flex h-full w-full items-center just
30462
30463
  },
30463
30464
  emits: ["error", "success"],
30464
30465
  setup(n, { expose: t, emit: e }) {
30465
- const r = n, i = Yi(), o = oe(null), a = oe(!1), l = oe({}), s = L(() => r.axiosInstance ? r.axiosInstance : qt.http), d = L(() => o.value), c = L(() => Object.keys(l.value).length > 0), h = L(() => {
30466
+ const r = n, i = Yi(), o = oe(null), a = oe(!1), l = oe({}), s = L(() => r.axiosInstance ? r.axiosInstance : $t.http), d = L(() => o.value), c = L(() => Object.keys(l.value).length > 0), h = L(() => {
30466
30467
  if (!c.value)
30467
30468
  return null;
30468
30469
  const k = Object.keys(l.value);
@@ -31094,7 +31095,7 @@ const hI = ["onClick"], pI = { class: "px-2 flex items-center" }, mI = { class:
31094
31095
  },
31095
31096
  emits: ["update:modelValue"],
31096
31097
  setup(n, { expose: t, emit: e }) {
31097
- const r = n, i = qt.http, o = oe(null), a = oe(r.currentModels);
31098
+ const r = n, i = $t.http, o = oe(null), a = oe(r.currentModels);
31098
31099
  ut(
31099
31100
  () => r.currentModels,
31100
31101
  (s, d) => {
@@ -45553,7 +45554,7 @@ const NB = /* @__PURE__ */ pi(CB, [["render", IB]]), PB = /* @__PURE__ */ j("spa
45553
45554
  const w5 = 100, N5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45554
45555
  __proto__: null,
45555
45556
  MAGIC_NUM: w5
45556
- }, Symbol.toStringTag, { value: "Module" })), P5 = { en: Um, fr: Vm }, qt = {
45557
+ }, Symbol.toStringTag, { value: "Module" })), P5 = { en: Um, fr: Vm }, $t = {
45557
45558
  http: Fb.create(),
45558
45559
  locales: {
45559
45560
  en: "English",
@@ -45582,7 +45583,7 @@ const w5 = 100, N5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
45582
45583
  function x5(n, t) {
45583
45584
  for (const e in Yp)
45584
45585
  n.component(e, Yp[e]);
45585
- t != null && t.http && (qt.http = t.http), t != null && t.locales && (qt.locales = t.locales), t != null && t.upload_url && (qt.upload_url = t.upload_url), t != null && t.formatQueryString && (qt.formatQueryString = t.formatQueryString), t != null && t.parseQueryString && (qt.parseQueryString = t.parseQueryString), t != null && t.countries && (qt.countries = t.countries), t != null && t.regions && (qt.regions = t.regions), n.config.globalProperties.$i18n && ut(
45586
+ t != null && t.http && ($t.http = t.http), t != null && t.locales && ($t.locales = t.locales), t != null && t.upload_url && ($t.upload_url = t.upload_url), t != null && t.formatQueryString && ($t.formatQueryString = t.formatQueryString), t != null && t.parseQueryString && ($t.parseQueryString = t.parseQueryString), t != null && t.countries && ($t.countries = t.countries), t != null && t.regions && ($t.regions = t.regions), t != null && t.props && ($t.props = t.props), n.config.globalProperties.$i18n && ut(
45586
45587
  () => n.config.globalProperties.$i18n.locale,
45587
45588
  (e) => {
45588
45589
  $i().set(e);
@@ -45692,7 +45693,7 @@ export {
45692
45693
  N5 as MyConstants,
45693
45694
  I5 as base64ToBlob,
45694
45695
  tD as blobToBase64,
45695
- qt as config,
45696
+ $t as config,
45696
45697
  B5 as default,
45697
45698
  kd as disableScroll,
45698
45699
  Ad as enableScroll,
@@ -202,6 +202,9 @@ import { Locales } from './types';
202
202
  import { Country } from './types/Country';
203
203
  import { Region } from './types/Region';
204
204
  import { Size } from './utils/sizes';
205
+ export interface OptionProps {
206
+ size?: Size;
207
+ }
205
208
  export interface Options {
206
209
  http?: AxiosInstance;
207
210
  upload_url?: string;
@@ -210,9 +213,7 @@ export interface Options {
210
213
  parseQueryString?: (params: string) => Record<string, any>;
211
214
  countries?: Country[];
212
215
  regions?: Region[];
213
- props?: {
214
- size?: Size;
215
- };
216
+ props?: OptionProps;
216
217
  }
217
218
  declare const config: {
218
219
  http: AxiosInstance;
@@ -222,9 +223,7 @@ declare const config: {
222
223
  parseQueryString(params: string): Record<string, any>;
223
224
  countries: Country[];
224
225
  regions: Region[];
225
- props: {
226
- size: string;
227
- };
226
+ props: OptionProps | undefined;
228
227
  };
229
228
  declare function install(app: App, options?: Options): void;
230
229
  declare const _default: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.6.38",
3
+ "version": "0.6.39",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -7,7 +7,7 @@ function useInputSize(size: MaybeRef<Size | '' | undefined | null>) {
7
7
 
8
8
  const bp = useBreakpoints();
9
9
 
10
- const defaultSize = (config.props.size ?? 'md') as Size;
10
+ const defaultSize = (config.props?.size ?? 'md') as Size;
11
11
 
12
12
  const sizeInternal = computed(() => {
13
13
 
package/src/index.ts CHANGED
@@ -19,6 +19,10 @@ import { Region } from './types/Region';
19
19
  import { useI18nStore } from './stores/i18n';
20
20
  import { Size } from './utils/sizes';
21
21
 
22
+ export interface OptionProps {
23
+ size?: Size;
24
+ }
25
+
22
26
  export interface Options {
23
27
  http?: AxiosInstance;
24
28
  upload_url?: string;
@@ -29,9 +33,7 @@ export interface Options {
29
33
  parseQueryString?: (params: string) => Record<string, any>;
30
34
  countries?: Country[];
31
35
  regions?: Region[];
32
- props?: {
33
- size?: Size
34
- }
36
+ props?: OptionProps
35
37
  }
36
38
 
37
39
  const config = {
@@ -57,8 +59,8 @@ const config = {
57
59
  countries: [] as Country[],
58
60
  regions: [] as Region[],
59
61
  props: {
60
- size: 'md'
61
- }
62
+ size: 'md',
63
+ } as OptionProps | undefined
62
64
  };
63
65
 
64
66
  function install(app: App, options?: Options) {
@@ -95,6 +97,10 @@ function install(app: App, options?: Options) {
95
97
  config.regions = options.regions;
96
98
  }
97
99
 
100
+ if (options?.props) {
101
+ config.props = options.props;
102
+ }
103
+
98
104
  if (app.config.globalProperties.$i18n) {
99
105
  watch(
100
106
  () => app.config.globalProperties.$i18n.locale,