@simsustech/quasar-components 0.11.9 → 0.11.11

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-Du4fNbTV.js +573 -0
  3. package/dist/authentication.js +218 -106
  4. package/dist/form.js +164 -305
  5. package/dist/general.js +51 -95
  6. package/dist/md3.js +435 -0
  7. package/dist/{nl-BTgHOvpQ.js → nl-BJwNz421.js} +70 -0
  8. package/dist/{nl-jHKPHlmh.js → nl-CneFq5NZ.js} +4 -0
  9. package/dist/nl-NLgZUAKl.js +6 -0
  10. package/dist/types/ui/authentication/AccountsTable.vue.d.ts +5 -0
  11. package/dist/types/ui/authentication/ConsentList.vue.d.ts +3 -0
  12. package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +2 -2
  13. package/dist/types/ui/authentication/LoginButton.vue.d.ts +1 -1
  14. package/dist/types/ui/authentication/LoginForm.vue.d.ts +6 -2
  15. package/dist/types/ui/authentication/LogoutButton.vue.d.ts +12 -0
  16. package/dist/types/ui/authentication/LogoutForm.vue.d.ts +18 -0
  17. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +10 -2
  18. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +10 -2
  19. package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +2 -2
  20. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +4 -1
  21. package/dist/types/ui/authentication/index.d.ts +2 -0
  22. package/dist/types/ui/authentication/lang/index.d.ts +12 -0
  23. package/dist/types/ui/form/DateInput.vue.d.ts +19 -1
  24. package/dist/types/ui/form/FormInput.vue.d.ts +2 -15
  25. package/dist/types/ui/form/FormItem.vue.d.ts +2 -19
  26. package/dist/types/ui/form/LocaleSelect.vue.d.ts +6 -4
  27. package/dist/types/ui/form/lang/index.d.ts +1131 -0
  28. package/dist/types/ui/general/QDrawerList.vue.d.ts +2 -7
  29. package/dist/types/ui/general/QLanguageSelect.vue.d.ts +7 -4
  30. package/dist/types/ui/general/QStyledCard.vue.d.ts +9 -5
  31. package/dist/types/ui/general/QStyledLayout.vue.d.ts +1 -1
  32. package/dist/types/ui/general/QSubmitButton.vue.d.ts +1 -1
  33. package/dist/types/ui/general/ResourcePage.vue.d.ts +17 -5
  34. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +9 -4
  35. package/dist/types/ui/md3/Md3Layout.vue.d.ts +31 -0
  36. package/dist/types/ui/md3/NavigationRailFabs.vue.d.ts +14 -0
  37. package/dist/types/ui/md3/index.d.ts +3 -0
  38. package/dist/types/ui/md3/lang/en-US.d.ts +3 -0
  39. package/dist/types/ui/md3/lang/index.d.ts +12 -0
  40. package/dist/types/ui/md3/lang/nl.d.ts +3 -0
  41. package/package.json +21 -14
  42. package/src/ui/authentication/AccountsTable.vue +18 -9
  43. package/src/ui/authentication/ConsentList.vue +13 -18
  44. package/src/ui/authentication/LoginForm.vue +12 -3
  45. package/src/ui/authentication/LogoutButton.vue +31 -0
  46. package/src/ui/authentication/LogoutForm.vue +49 -0
  47. package/src/ui/authentication/PasswordChangeForm.vue +11 -3
  48. package/src/ui/authentication/RegisterForm.vue +11 -3
  49. package/src/ui/authentication/UserMenuButton.vue +9 -3
  50. package/src/ui/authentication/index.ts +2 -0
  51. package/src/ui/authentication/lang/en-US.ts +4 -0
  52. package/src/ui/authentication/lang/index.ts +4 -0
  53. package/src/ui/authentication/lang/nl.ts +4 -0
  54. package/src/ui/form/DateInput.vue +53 -26
  55. package/src/ui/form/LocaleSelect.vue +29 -43
  56. package/src/ui/form/lang/en-US.ts +377 -0
  57. package/src/ui/form/lang/index.ts +377 -0
  58. package/src/ui/form/lang/nl.ts +377 -0
  59. package/src/ui/general/QLanguageSelect.vue +30 -105
  60. package/src/ui/general/QLanguageSelectBtn.vue.bak +99 -0
  61. package/src/ui/general/QStyledCard.vue +2 -2
  62. package/src/ui/general/ResourcePage.vue +13 -5
  63. package/src/ui/general/ResponsiveDialog.vue +23 -6
  64. package/src/ui/general/index.ts +1 -0
  65. package/src/ui/md3/Md3Layout.vue +139 -0
  66. package/src/ui/md3/NavigationRailFabs.vue +68 -0
  67. package/src/ui/md3/index.ts +3 -0
  68. package/src/ui/md3/lang/en-US.ts +7 -0
  69. package/src/ui/md3/lang/index.ts +41 -0
  70. package/src/ui/md3/lang/nl.ts +7 -0
  71. package/vite.config.ts +4 -73
  72. package/dist/flags.js +0 -255
  73. package/dist/icons.js +0 -25
  74. package/dist/index-DnmJt2wP.js +0 -7921
  75. package/dist/nl-BL9hHEHL.js +0 -76
package/dist/general.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { u as useLang, l as loadLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-UtpXkOh7.js";
2
- import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QLayout, QHeader, QToolbar, QBtn, QToolbarTitle, QPageContainer, QPage, QPageSticky, QSpace, QSelect, QItem, QItemSection, QItemLabel, QList } from "quasar";
3
- import { defineComponent, watch, ref, createBlock, openBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, normalizeClass, createCommentVNode, toRefs, createElementBlock, useAttrs, computed, mergeProps, resolveDynamicComponent, createTextVNode, toDisplayString } from "vue";
4
- import { u as useLang$1, f as flags } from "./index-DnmJt2wP.js";
5
- const _hoisted_1$2 = { class: "text-h6" };
2
+ import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QLayout, QHeader, QToolbar, QBtn, QToolbarTitle, QPageContainer, QPage, QPageSticky, QSpace, QList } from "quasar";
3
+ import { defineComponent, watch, ref, createBlock, openBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, normalizeClass, createElementBlock } from "vue";
4
+ import { _ as _sfc_main$6 } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-Du4fNbTV.js";
5
+ const _hoisted_1$1 = { class: "text-h6" };
6
6
  const _hoisted_2$1 = { class: "text-subtitle2" };
7
7
  const __default__$2 = {
8
8
  name: "QStyledCard"
@@ -35,13 +35,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
35
35
  const _component_q_card_actions = QCardActions;
36
36
  return openBlock(), createBlock(unref(QCard), {
37
37
  ref_key: "qCardRef",
38
- ref: qCardRef
38
+ ref: qCardRef,
39
+ style: { "max-width": "300px" }
39
40
  }, {
40
41
  default: withCtx(() => [
41
42
  renderSlot(_ctx.$slots, "image"),
42
43
  createVNode(_component_q_card_section, null, {
43
44
  default: withCtx(() => [
44
- createElementVNode("div", _hoisted_1$2, [
45
+ createElementVNode("div", _hoisted_1$1, [
45
46
  renderSlot(_ctx.$slots, "title")
46
47
  ]),
47
48
  createElementVNode("div", _hoisted_2$1, [
@@ -76,8 +77,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
76
77
  props: {
77
78
  display: { type: Boolean },
78
79
  buttonType: { default: "submit" },
79
- closeIcon: { default: "close" },
80
- padding: { type: Boolean }
80
+ padding: { type: Boolean },
81
+ icons: { default: () => ({
82
+ close: "close"
83
+ }) }
81
84
  },
82
85
  emits: ["submit"],
83
86
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -139,16 +142,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
139
142
  createVNode(_component_q_layout, {
140
143
  view: "LHh lpR fff",
141
144
  container: "",
142
- class: normalizeClass(unref($q).dark.isActive ? "bg-dark" : "bg-white"),
145
+ class: "bg-light-surface dark:bg-dark-surface",
143
146
  style: { "min-width": "85vw" }
144
147
  }, {
145
148
  default: withCtx(() => [
146
- createVNode(_component_q_header, { class: "bg-primary" }, {
149
+ createVNode(_component_q_header, { class: "bg-light-surface-container-high dark:bg-dark-surface-container-high" }, {
147
150
  default: withCtx(() => [
148
151
  createVNode(_component_q_toolbar, null, {
149
152
  default: withCtx(() => [
150
153
  createVNode(_component_q_btn, {
151
- icon: _ctx.closeIcon,
154
+ icon: _ctx.icons.close,
155
+ class: "text-light-on-surface dark:text-dark-on-surface",
152
156
  flat: "",
153
157
  round: "",
154
158
  dense: "",
@@ -162,7 +166,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
162
166
  }),
163
167
  !_ctx.display ? (openBlock(), createBlock(_sfc_main$5, {
164
168
  key: 0,
165
- color: "accent",
169
+ flat: "",
170
+ class: "text-light-primary dark:text-dark-primary",
166
171
  type: _ctx.buttonType,
167
172
  onSubmit: submit
168
173
  }, null, 8, ["type"])) : createCommentVNode("", true)
@@ -188,14 +193,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
188
193
  })
189
194
  ]),
190
195
  _: 3
191
- }, 8, ["class"])
196
+ })
192
197
  ]),
193
198
  _: 3
194
199
  }, 8, ["maximized"]);
195
200
  };
196
201
  }
197
202
  });
198
- const _hoisted_1$1 = { style: { "margin-top": "80px" } };
203
+ const _hoisted_1 = { style: { "margin-top": "80px" } };
199
204
  const _hoisted_2 = { key: 0 };
200
205
  const _hoisted_3 = { key: 1 };
201
206
  const __default__ = {
@@ -207,7 +212,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
207
212
  type: { default: void 0 },
208
213
  disabled: { type: Boolean, default: false },
209
214
  topBarFab: { type: Boolean, default: false },
210
- topBarShrink: { type: Boolean, default: true }
215
+ topBarShrink: { type: Boolean, default: true },
216
+ icons: { default: () => ({
217
+ add: "add",
218
+ edit: "edit"
219
+ }) }
211
220
  },
212
221
  emits: ["create", "update"],
213
222
  setup(__props, { emit: __emit }) {
@@ -232,7 +241,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
232
241
  const _component_q_page = QPage;
233
242
  return openBlock(), createBlock(_component_q_page, { class: "q-ma-md" }, {
234
243
  default: withCtx(() => [
235
- createElementVNode("div", _hoisted_1$1, [
244
+ createElementVNode("div", _hoisted_1, [
236
245
  renderSlot(_ctx.$slots, "default")
237
246
  ]),
238
247
  createVNode(_component_q_page_sticky, {
@@ -254,10 +263,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
254
263
  round: "",
255
264
  size: "lg",
256
265
  dense: "",
257
- icon: "add",
266
+ icon: _ctx.icons.add,
258
267
  class: "q-mr-sm bg-primary text-white",
259
268
  onClick: create
260
- }, null, 8, ["disable"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
269
+ }, null, 8, ["disable", "icon"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
261
270
  key: 1,
262
271
  disable: unref(disabled),
263
272
  flat: "",
@@ -265,10 +274,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
265
274
  round: "",
266
275
  size: "lg",
267
276
  dense: "",
268
- icon: "edit",
277
+ icon: _ctx.icons.edit,
269
278
  class: "q-mr-sm bg-primary text-white",
270
279
  onClick: update
271
- }, null, 8, ["disable"])) : createCommentVNode("", true)
280
+ }, null, 8, ["disable", "icon"])) : createCommentVNode("", true)
272
281
  ])) : createCommentVNode("", true),
273
282
  createVNode(_component_q_toolbar_title, { shrink: _ctx.topBarShrink }, {
274
283
  default: withCtx(() => [
@@ -282,17 +291,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
282
291
  key: 0,
283
292
  disable: unref(disabled),
284
293
  label: unref(lang).add,
285
- icon: "add",
294
+ icon: _ctx.icons.add,
286
295
  outline: "",
287
296
  onClick: create
288
- }, null, 8, ["disable", "label"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
297
+ }, null, 8, ["disable", "label", "icon"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
289
298
  key: 1,
290
299
  disable: unref(disabled),
291
300
  label: unref(lang).edit,
292
- icon: "edit",
301
+ icon: _ctx.icons.edit,
293
302
  outline: "",
294
303
  onClick: update
295
- }, null, 8, ["disable", "label"])) : createCommentVNode("", true)
304
+ }, null, 8, ["disable", "label", "icon"])) : createCommentVNode("", true)
296
305
  ])) : createCommentVNode("", true),
297
306
  createVNode(_component_q_space, { horizontal: "" }),
298
307
  renderSlot(_ctx.$slots, "header-side")
@@ -308,88 +317,35 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
308
317
  };
309
318
  }
310
319
  });
311
- const _hoisted_1 = { key: 0 };
312
320
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
313
321
  __name: "QLanguageSelect",
314
322
  props: {
315
323
  modelValue: {},
316
324
  languageImports: {},
317
- allowedCodes: { default: () => ["en-US", "nl"] }
325
+ locales: {}
318
326
  },
319
327
  setup(__props) {
328
+ const props = __props;
329
+ const { modelValue, languageImports, locales } = toRefs(props);
320
330
  const $q = useQuasar();
321
- const attrs = useAttrs();
322
- const flagsLang = useLang$1();
323
- const languageOptions = computed(() => {
324
- const options = [];
325
- for (let lang of Object.keys(flagsLang.value.languages)) {
326
- if (!__props.allowedCodes.length || __props.allowedCodes.includes(lang)) {
327
- options.push({
328
- label: flagsLang.value.languages[lang],
329
- value: lang
330
- });
331
- }
331
+ watch(modelValue, (langIso) => {
332
+ try {
333
+ languageImports.value[langIso]().then(
334
+ // langList[`../../../node_modules/quasar/lang/${langIso}.mjs`]().then(
335
+ (lang) => {
336
+ $q.lang.set(lang.default);
337
+ }
338
+ );
339
+ } catch (e) {
340
+ console.error(e);
332
341
  }
333
- return options;
334
342
  });
335
- watch(
336
- () => __props.modelValue,
337
- (langIso) => {
338
- try {
339
- __props.languageImports[langIso]().then(
340
- // langList[`../../../node_modules/quasar/lang/${langIso}.mjs`]().then(
341
- (lang) => {
342
- $q.lang.set(lang.default);
343
- }
344
- );
345
- } catch (e) {
346
- console.error(e);
347
- }
348
- }
349
- );
350
343
  return (_ctx, _cache) => {
351
- const _component_q_item_section = QItemSection;
352
- const _component_q_item_label = QItemLabel;
353
- const _component_q_item = QItem;
354
- return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
355
- options: languageOptions.value,
356
- "model-value": _ctx.modelValue,
357
- "emit-value": "",
358
- "map-options": ""
359
- }), {
360
- selected: withCtx(() => [
361
- _ctx.modelValue ? (openBlock(), createElementBlock("div", _hoisted_1, [
362
- (openBlock(), createBlock(resolveDynamicComponent(flags[_ctx.modelValue.slice(-2).toLowerCase()])))
363
- ])) : createCommentVNode("", true)
364
- ]),
365
- option: withCtx((scope) => [
366
- createVNode(_component_q_item, normalizeProps(guardReactiveProps(scope.itemProps)), {
367
- default: withCtx(() => [
368
- createVNode(_component_q_item_section, { avatar: "" }, {
369
- default: withCtx(() => [
370
- (openBlock(), createBlock(resolveDynamicComponent(
371
- flags[scope.opt.value.slice(-2).toLowerCase()]
372
- )))
373
- ]),
374
- _: 2
375
- }, 1024),
376
- createVNode(_component_q_item_section, null, {
377
- default: withCtx(() => [
378
- createVNode(_component_q_item_label, null, {
379
- default: withCtx(() => [
380
- createTextVNode(toDisplayString(scope.opt.label), 1)
381
- ]),
382
- _: 2
383
- }, 1024)
384
- ]),
385
- _: 2
386
- }, 1024)
387
- ]),
388
- _: 2
389
- }, 1040)
390
- ]),
391
- _: 1
392
- }, 16, ["options", "model-value"]);
344
+ return openBlock(), createBlock(_sfc_main$6, {
345
+ "model-value": unref(modelValue),
346
+ locales: unref(locales),
347
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => _ctx.$emit("update:model-value", val))
348
+ }, null, 8, ["model-value", "locales"]);
393
349
  };
394
350
  }
395
351
  });