@nonsuch/component-library 0.2.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.
@@ -1 +1 @@
1
- .ns-button[data-v-e1d8675d]{font-family:Fixel Text,Roboto,sans-serif;font-weight:500;letter-spacing:.02em}
1
+ .ns-button[data-v-ed26f034]{font-family:Fixel Text,Roboto,sans-serif;font-weight:500;letter-spacing:.02em}.ns-skeleton[data-v-6093e4f3]{border-radius:8px}
@@ -1,35 +1,162 @@
1
- import a from "quasar/src/components/btn/QBtn.js";
2
- import { defineComponent as d, openBlock as u, createBlock as l, mergeProps as s, withCtx as c, renderSlot as f } from "vue";
3
- const p = /* @__PURE__ */ d({
1
+ import h from "quasar/src/components/btn/QBtn.js";
2
+ import { defineComponent as s, openBlock as u, createBlock as d, mergeProps as c, withCtx as l, renderSlot as i, createVNode as g, unref as v, provide as y, inject as S, computed as k } from "vue";
3
+ import w from "quasar/src/components/spinner/QSpinnerDots.js";
4
+ import C from "quasar/src/components/skeleton/QSkeleton.js";
5
+ const B = /* @__PURE__ */ s({
4
6
  __name: "NsButton",
5
7
  props: {
6
8
  color: { default: "primary" },
7
9
  size: { default: "md" },
8
10
  unelevated: { type: Boolean, default: !0 },
9
11
  noCaps: { type: Boolean, default: !0 },
10
- rounded: { type: Boolean, default: !0 }
12
+ rounded: { type: Boolean, default: !0 },
13
+ loading: { type: Boolean, default: !1 }
11
14
  },
12
15
  setup(e) {
13
- return (t, o) => (u(), l(a, s(t.$attrs, {
16
+ return (o, t) => (u(), d(h, c(o.$attrs, {
14
17
  color: e.color,
15
18
  size: e.size,
16
19
  unelevated: e.unelevated,
17
20
  "no-caps": e.noCaps,
18
21
  rounded: e.rounded,
22
+ loading: e.loading,
19
23
  class: "ns-button"
20
24
  }), {
21
- default: c(() => [
22
- f(t.$slots, "default", {}, void 0, !0)
25
+ loading: l(() => [
26
+ i(o.$slots, "loading", {}, () => [
27
+ g(v(w), { color: "white" })
28
+ ], !0)
29
+ ]),
30
+ default: l(() => [
31
+ i(o.$slots, "default", {}, void 0, !0)
23
32
  ]),
24
33
  _: 3
25
- }, 16, ["color", "size", "unelevated", "no-caps", "rounded"]));
34
+ }, 16, ["color", "size", "unelevated", "no-caps", "rounded", "loading"]));
35
+ }
36
+ }), m = (e, o) => {
37
+ const t = e.__vccOpts || e;
38
+ for (const [n, r] of o)
39
+ t[n] = r;
40
+ return t;
41
+ }, E = /* @__PURE__ */ m(B, [["__scopeId", "data-v-ed26f034"]]), I = /* @__PURE__ */ s({
42
+ __name: "NsSkeleton",
43
+ props: {
44
+ type: { default: "rect" },
45
+ animation: { default: "wave" },
46
+ square: { type: Boolean, default: !1 },
47
+ bordered: { type: Boolean, default: !1 },
48
+ width: { default: void 0 },
49
+ height: { default: void 0 }
50
+ },
51
+ setup(e) {
52
+ return (o, t) => (u(), d(C, c(o.$attrs, {
53
+ type: e.type,
54
+ animation: e.animation,
55
+ square: e.square,
56
+ bordered: e.bordered,
57
+ width: e.width,
58
+ height: e.height,
59
+ class: "ns-skeleton"
60
+ }), null, 16, ["type", "animation", "square", "bordered", "width", "height"]));
61
+ }
62
+ }), R = /* @__PURE__ */ m(I, [["__scopeId", "data-v-6093e4f3"]]), N = {
63
+ common: {
64
+ loading: "Loading…",
65
+ retry: "Retry",
66
+ cancel: "Cancel",
67
+ confirm: "Confirm",
68
+ save: "Save",
69
+ delete: "Delete",
70
+ edit: "Edit",
71
+ search: "Search",
72
+ noResults: "No results found",
73
+ showMore: "Show more",
74
+ showLess: "Show less"
75
+ },
76
+ product: {
77
+ addToCart: "Add to cart",
78
+ outOfStock: "Out of stock",
79
+ inStock: "In stock",
80
+ quantity: "Quantity",
81
+ price: "Price",
82
+ sale: "Sale"
83
+ },
84
+ media: {
85
+ zoomIn: "Zoom in",
86
+ zoomOut: "Zoom out",
87
+ fullscreen: "Fullscreen",
88
+ exitFullscreen: "Exit fullscreen",
89
+ previousImage: "Previous image",
90
+ nextImage: "Next image"
91
+ },
92
+ validation: {
93
+ required: "This field is required",
94
+ invalidEmail: "Please enter a valid email address",
95
+ tooShort: "Too short",
96
+ tooLong: "Too long"
97
+ }
98
+ }, T = {
99
+ common: {
100
+ loading: "Chargement…",
101
+ retry: "Réessayer",
102
+ cancel: "Annuler",
103
+ confirm: "Confirmer",
104
+ save: "Enregistrer",
105
+ delete: "Supprimer",
106
+ edit: "Modifier",
107
+ search: "Rechercher",
108
+ noResults: "Aucun résultat trouvé",
109
+ showMore: "Afficher plus",
110
+ showLess: "Afficher moins"
111
+ },
112
+ product: {
113
+ addToCart: "Ajouter au panier",
114
+ outOfStock: "Rupture de stock",
115
+ inStock: "En stock",
116
+ quantity: "Quantité",
117
+ price: "Prix",
118
+ sale: "Solde"
119
+ },
120
+ media: {
121
+ zoomIn: "Agrandir",
122
+ zoomOut: "Réduire",
123
+ fullscreen: "Plein écran",
124
+ exitFullscreen: "Quitter le plein écran",
125
+ previousImage: "Image précédente",
126
+ nextImage: "Image suivante"
127
+ },
128
+ validation: {
129
+ required: "Ce champ est requis",
130
+ invalidEmail: "Veuillez entrer une adresse courriel valide",
131
+ tooShort: "Trop court",
132
+ tooLong: "Trop long"
26
133
  }
27
- }), i = (e, t) => {
28
- const o = e.__vccOpts || e;
29
- for (const [n, r] of t)
30
- o[n] = r;
31
- return o;
32
- }, B = /* @__PURE__ */ i(p, [["__scopeId", "data-v-e1d8675d"]]);
134
+ }, f = /* @__PURE__ */ Symbol("ns-locale");
135
+ function b(e) {
136
+ y(f, e);
137
+ }
138
+ function q() {
139
+ return S(f, N);
140
+ }
141
+ function O(e, o) {
142
+ const t = q();
143
+ return k(() => {
144
+ const n = e();
145
+ if (n != null) return n;
146
+ const r = o.split(".");
147
+ let a = t;
148
+ for (const p of r)
149
+ a = a[p];
150
+ return a;
151
+ });
152
+ }
33
153
  export {
34
- B as NsButton
154
+ E as NsButton,
155
+ f as NsLocaleKey,
156
+ R as NsSkeleton,
157
+ N as nsLocaleEnCA,
158
+ T as nsLocaleFrCA,
159
+ b as provideNsLocale,
160
+ O as useNsDefault,
161
+ q as useNsLocale
35
162
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nonsuch/component-library",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "A Vue 3 component library built on Quasar with opinionated defaults and custom components.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -67,6 +67,7 @@
67
67
  "eslint-config-prettier": "^10.1.8",
68
68
  "eslint-plugin-vue": "^10.7.0",
69
69
  "happy-dom": "^20.5.3",
70
+ "postcss-rtlcss": "^5.7.1",
70
71
  "prettier": "^3.8.1",
71
72
  "quasar": "^2.18.6",
72
73
  "sass-embedded": "^1.97.3",