@simsustech/quasar-components 0.11.8 → 0.11.10

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 (31) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/authentication.js +70 -41
  3. package/dist/form.js +9 -5
  4. package/dist/general.js +144 -46
  5. package/dist/quasar-components.css +1 -4
  6. package/dist/types/ui/authentication/AccountsTable.vue.d.ts +5 -0
  7. package/dist/types/ui/authentication/ConsentList.vue.d.ts +3 -0
  8. package/dist/types/ui/authentication/LoginForm.vue.d.ts +4 -0
  9. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +8 -0
  10. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +8 -0
  11. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +3 -0
  12. package/dist/types/ui/form/DateInput.vue.d.ts +8 -0
  13. package/dist/types/ui/general/QLanguageSelectBtn.vue.d.ts +11 -0
  14. package/dist/types/ui/general/ResourcePage.vue.d.ts +8 -0
  15. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +6 -2
  16. package/dist/types/ui/general/index.d.ts +1 -0
  17. package/package.json +1 -1
  18. package/src/ui/authentication/AccountsTable.vue +18 -9
  19. package/src/ui/authentication/ConsentList.vue +13 -18
  20. package/src/ui/authentication/LoginForm.vue +12 -3
  21. package/src/ui/authentication/PasswordChangeForm.vue +11 -3
  22. package/src/ui/authentication/RegisterForm.vue +11 -3
  23. package/src/ui/authentication/UserMenuButton.vue +9 -3
  24. package/src/ui/form/DateInput.vue +11 -3
  25. package/src/ui/general/QLanguageSelect.vue +1 -0
  26. package/src/ui/general/QLanguageSelectBtn.vue +99 -0
  27. package/src/ui/general/QStyledCard.vue +3 -19
  28. package/src/ui/general/ResourcePage.vue +13 -5
  29. package/src/ui/general/ResponsiveDialog.vue +10 -3
  30. package/src/ui/general/index.ts +1 -0
  31. package/vite.config.ts +0 -70
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @simsustech/quasar-components
2
2
 
3
+ ## 0.11.10
4
+
5
+ ### Patch Changes
6
+
7
+ - e934bb1: feat(components): add QLanguageSelectBtn
8
+ - c5bc275: feat(components): add icon props
9
+
10
+ ## 0.11.9
11
+
12
+ ### Patch Changes
13
+
14
+ - 365945e: feat(QStyledCard): remove max-width
15
+
3
16
  ## 0.11.8
4
17
 
5
18
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  import { useQuasar, QForm, QInput, QStepper, QStep, QStepperNavigation, QIcon, QBtn, QSlider, QList, QItem, QItemSection, QMenu, QTable, QTr, QTd, QItemLabel, QSelect, QTh } from "quasar";
2
- import { ref, defineComponent, watch, computed, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toRef, createCommentVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, toRefs, createElementVNode } from "vue";
2
+ import { ref, defineComponent, watch, computed, createBlock, openBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toRef, createCommentVNode, toRefs, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode } from "vue";
3
3
  import { _ as _sfc_main$d } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-UtpXkOh7.js";
4
4
  const lang$1 = {
5
5
  isoName: "en-US",
@@ -741,7 +741,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
741
741
  email: {},
742
742
  minimumPasswordLength: { default: 8 },
743
743
  form: { default: void 0 },
744
- input: { default: void 0 }
744
+ input: { default: void 0 },
745
+ icons: { default: () => ({
746
+ visibility: "visibility",
747
+ visibilityOff: "visibility_off"
748
+ }) }
745
749
  },
746
750
  emits: ["submit"],
747
751
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -822,7 +826,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
822
826
  }), {
823
827
  append: withCtx(() => [
824
828
  createVNode(_component_q_icon, {
825
- name: showPassword.value ? "visibility" : "visibility_off",
829
+ name: showPassword.value ? _ctx.icons.visibility : _ctx.icons.visibilityOff,
826
830
  class: "cursor-pointer",
827
831
  onClick: _cache[1] || (_cache[1] = ($event) => showPassword.value = !showPassword.value)
828
832
  }, null, 8, ["name"])
@@ -842,7 +846,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
842
846
  }), {
843
847
  append: withCtx(() => [
844
848
  createVNode(_component_q_icon, {
845
- name: showRepeatPassword.value ? "visibility" : "visibility_off",
849
+ name: showRepeatPassword.value ? _ctx.icons.visibility : _ctx.icons.visibilityOff,
846
850
  class: "cursor-pointer",
847
851
  onClick: _cache[3] || (_cache[3] = ($event) => showRepeatPassword.value = !showRepeatPassword.value)
848
852
  }, null, 8, ["name"])
@@ -987,10 +991,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
987
991
  useUsername: { type: Boolean },
988
992
  passwordForgotUrl: {},
989
993
  form: {},
990
- input: {}
994
+ input: {},
995
+ icons: {}
991
996
  },
992
997
  emits: ["submit"],
993
998
  setup(__props, { expose: __expose, emit: __emit }) {
999
+ var _a, _b;
1000
+ const props = __props;
1001
+ const { icons } = toRefs(props);
994
1002
  const emit = __emit;
995
1003
  const $q = useQuasar();
996
1004
  const lang2 = useLang();
@@ -1016,8 +1024,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1016
1024
  password: [(val) => !!val || lang2.value.login.validations.fieldRequired]
1017
1025
  }));
1018
1026
  const submit = (evt) => {
1019
- var _a;
1020
- (_a = formRef.value) == null ? void 0 : _a.validate().then((success) => {
1027
+ var _a2;
1028
+ (_a2 = formRef.value) == null ? void 0 : _a2.validate().then((success) => {
1021
1029
  if (success) {
1022
1030
  emit("submit", {
1023
1031
  email: email.value.trim(),
@@ -1028,6 +1036,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1028
1036
  } else evt.done();
1029
1037
  });
1030
1038
  };
1039
+ const visibilityIcon = ((_a = icons.value) == null ? void 0 : _a.visibility) ?? "visibility";
1040
+ const visibilityOffIcon = ((_b = icons.value) == null ? void 0 : _b.visibilifyOff) ?? "visibility_off";
1031
1041
  const variables = ref({
1032
1042
  header,
1033
1043
  createAccount,
@@ -1091,7 +1101,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1091
1101
  }), {
1092
1102
  append: withCtx(() => [
1093
1103
  createVNode(_component_q_icon, {
1094
- name: showPassword.value ? "visibility" : "visibility_off",
1104
+ name: showPassword.value ? unref(visibilityIcon) : unref(visibilityOffIcon),
1095
1105
  class: "cursor-pointer",
1096
1106
  onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1097
1107
  }, null, 8, ["name"])
@@ -1206,7 +1216,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1206
1216
  extraFields: { default: void 0 },
1207
1217
  minimumPasswordLength: { default: 8 },
1208
1218
  form: { default: void 0 },
1209
- input: { default: void 0 }
1219
+ input: { default: void 0 },
1220
+ icons: { default: () => ({
1221
+ visibility: "visibility",
1222
+ visibilityOff: "visibility_off"
1223
+ }) }
1210
1224
  },
1211
1225
  emits: ["submit"],
1212
1226
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -1335,7 +1349,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1335
1349
  }), {
1336
1350
  append: withCtx(() => [
1337
1351
  createVNode(_component_q_icon, {
1338
- name: showPassword.value ? "visibility" : "visibility_off",
1352
+ name: showPassword.value ? _ctx.icons.visibility : _ctx.icons.visibilityOff,
1339
1353
  class: "cursor-pointer",
1340
1354
  onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1341
1355
  }, null, 8, ["name"])
@@ -1355,7 +1369,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1355
1369
  }, {
1356
1370
  append: withCtx(() => [
1357
1371
  createVNode(_component_q_icon, {
1358
- name: showPassword.value ? "visibility" : "visibility_off",
1372
+ name: showPassword.value ? _ctx.icons.visibility : _ctx.icons.visibilityOff,
1359
1373
  class: "cursor-pointer",
1360
1374
  onClick: _cache[4] || (_cache[4] = ($event) => showPassword.value = !showPassword.value)
1361
1375
  }, null, 8, ["name"])
@@ -1431,9 +1445,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1431
1445
  props: {
1432
1446
  scopes: {},
1433
1447
  claims: {},
1434
- resourceScopes: {}
1448
+ resourceScopes: {},
1449
+ icons: {}
1435
1450
  },
1436
1451
  setup(__props, { expose: __expose }) {
1452
+ var _a;
1453
+ const props = __props;
1454
+ const { icons } = toRefs(props);
1437
1455
  const $q = useQuasar();
1438
1456
  const lang2 = useLang();
1439
1457
  if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
@@ -1443,6 +1461,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1443
1461
  const message = computed(() => lang2.value.consent.message);
1444
1462
  const allow = computed(() => lang2.value.consent.allow);
1445
1463
  const deny = computed(() => lang2.value.consent.deny);
1464
+ const checkIcon = ((_a = icons.value) == null ? void 0 : _a.check) ?? "check";
1446
1465
  const variables = ref({
1447
1466
  message,
1448
1467
  allow,
@@ -1471,8 +1490,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1471
1490
  default: withCtx(() => [
1472
1491
  createVNode(_component_q_icon, {
1473
1492
  color: "green",
1474
- name: "check"
1475
- })
1493
+ name: unref(checkIcon)
1494
+ }, null, 8, ["name"])
1476
1495
  ]),
1477
1496
  _: 1
1478
1497
  }),
@@ -1495,8 +1514,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1495
1514
  default: withCtx(() => [
1496
1515
  createVNode(_component_q_icon, {
1497
1516
  color: "green",
1498
- name: "check"
1499
- })
1517
+ name: unref(checkIcon)
1518
+ }, null, 8, ["name"])
1500
1519
  ]),
1501
1520
  _: 1
1502
1521
  }),
@@ -1519,8 +1538,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1519
1538
  default: withCtx(() => [
1520
1539
  createVNode(_component_q_icon, {
1521
1540
  color: "green",
1522
- name: "check"
1523
- })
1541
+ name: unref(checkIcon)
1542
+ }, null, 8, ["name"])
1524
1543
  ]),
1525
1544
  _: 1
1526
1545
  }),
@@ -1546,10 +1565,14 @@ const __default__$1 = {
1546
1565
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1547
1566
  ...__default__$1,
1548
1567
  props: {
1549
- userRoute: {}
1568
+ userRoute: {},
1569
+ icons: {}
1550
1570
  },
1551
1571
  emits: ["signOut"],
1552
1572
  setup(__props, { expose: __expose, emit: __emit }) {
1573
+ var _a;
1574
+ const props = __props;
1575
+ const { icons } = toRefs(props);
1553
1576
  const emit = __emit;
1554
1577
  const $q = useQuasar();
1555
1578
  const lang2 = useLang();
@@ -1557,6 +1580,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1557
1580
  watch($q.lang, (val) => {
1558
1581
  loadLang($q.lang.isoName);
1559
1582
  });
1583
+ const personIcon = ((_a = icons.value) == null ? void 0 : _a.person) ?? "person";
1560
1584
  const variables = ref({
1561
1585
  // header: lang.value.some.nested.prop
1562
1586
  });
@@ -1573,7 +1597,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1573
1597
  const _component_q_list = QList;
1574
1598
  const _component_q_menu = QMenu;
1575
1599
  const _component_q_btn = QBtn;
1576
- return openBlock(), createBlock(_component_q_btn, { icon: "person" }, {
1600
+ return openBlock(), createBlock(_component_q_btn, { icon: unref(personIcon) }, {
1577
1601
  default: withCtx(() => [
1578
1602
  createVNode(_component_q_menu, null, {
1579
1603
  default: withCtx(() => [
@@ -1613,7 +1637,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1613
1637
  })
1614
1638
  ]),
1615
1639
  _: 3
1616
- });
1640
+ }, 8, ["icon"]);
1617
1641
  };
1618
1642
  }
1619
1643
  });
@@ -1653,13 +1677,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1653
1677
  count: {},
1654
1678
  pagination: {},
1655
1679
  mappedRoles: {},
1656
- columns: {}
1680
+ columns: {},
1681
+ icons: {}
1657
1682
  },
1658
1683
  emits: ["update:pagination", "update:criteria", "addRole", "removeRole"],
1659
1684
  setup(__props, { emit: __emit }) {
1685
+ var _a, _b, _c;
1660
1686
  const props = __props;
1661
1687
  const emit = __emit;
1662
- const { modelValue, count, mappedRoles, columns } = toRefs(props);
1688
+ const { modelValue, count, mappedRoles, columns, icons } = toRefs(props);
1663
1689
  const lang2 = useLang();
1664
1690
  const $q = useQuasar();
1665
1691
  const sortBy = ref(props.pagination.sortBy);
@@ -1768,13 +1794,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1768
1794
  });
1769
1795
  };
1770
1796
  const openRemoveRoleDialog = (account) => {
1771
- var _a;
1797
+ var _a2;
1772
1798
  $q.dialog({
1773
1799
  message: lang2.value.account.messages.removeRole(account),
1774
1800
  options: {
1775
1801
  type: "radio",
1776
1802
  model: "role",
1777
- items: (_a = account.roles) == null ? void 0 : _a.map((role) => ({
1803
+ items: (_a2 = account.roles) == null ? void 0 : _a2.map((role) => ({
1778
1804
  label: mappedRoles.value[role],
1779
1805
  value: role
1780
1806
  }))
@@ -1785,6 +1811,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1785
1811
  emit("removeRole", { id: account.id, role });
1786
1812
  });
1787
1813
  };
1814
+ const searchIcon = ((_a = icons.value) == null ? void 0 : _a.search) ?? "search";
1815
+ const cancelIcon = ((_b = icons.value) == null ? void 0 : _b.cancel) ?? "cancel";
1816
+ const moreVertIcon = ((_c = icons.value) == null ? void 0 : _c.moreVert) ?? "more_vert";
1788
1817
  return (_ctx, _cache) => {
1789
1818
  const _component_q_th = QTh;
1790
1819
  const _component_q_tr = QTr;
@@ -1829,7 +1858,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1829
1858
  ]),
1830
1859
  "top-right": withCtx(() => [
1831
1860
  createVNode(_component_q_btn, {
1832
- icon: "search",
1861
+ icon: unref(searchIcon),
1833
1862
  flat: ""
1834
1863
  }, {
1835
1864
  default: withCtx(() => [
@@ -1844,11 +1873,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1844
1873
  append: withCtx(() => [
1845
1874
  name.value ? (openBlock(), createBlock(_component_q_icon, {
1846
1875
  key: 0,
1847
- name: "cancel",
1848
- onClick: _cache[0] || (_cache[0] = ($event) => name.value = ""),
1849
1876
  class: "q-field__focusable-action",
1850
- role: "button"
1851
- })) : createCommentVNode("", true)
1877
+ role: "button",
1878
+ name: unref(cancelIcon),
1879
+ onClick: _cache[0] || (_cache[0] = ($event) => name.value = "")
1880
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1852
1881
  ]),
1853
1882
  _: 1
1854
1883
  }, 8, ["modelValue", "label"]),
@@ -1860,11 +1889,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1860
1889
  append: withCtx(() => [
1861
1890
  email.value ? (openBlock(), createBlock(_component_q_icon, {
1862
1891
  key: 0,
1863
- name: "cancel",
1864
- onClick: _cache[2] || (_cache[2] = ($event) => email.value = ""),
1865
1892
  class: "q-field__focusable-action",
1866
- role: "button"
1867
- })) : createCommentVNode("", true)
1893
+ role: "button",
1894
+ name: unref(cancelIcon),
1895
+ onClick: _cache[2] || (_cache[2] = ($event) => email.value = "")
1896
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1868
1897
  ]),
1869
1898
  _: 1
1870
1899
  }, 8, ["modelValue", "label"]),
@@ -1881,11 +1910,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1881
1910
  append: withCtx(() => [
1882
1911
  roles.value.length ? (openBlock(), createBlock(_component_q_icon, {
1883
1912
  key: 0,
1884
- name: "cancel",
1885
- onClick: _cache[4] || (_cache[4] = ($event) => roles.value = []),
1886
1913
  class: "q-field__focusable-action",
1887
- role: "button"
1888
- })) : createCommentVNode("", true)
1914
+ role: "button",
1915
+ name: unref(cancelIcon),
1916
+ onClick: _cache[4] || (_cache[4] = ($event) => roles.value = [])
1917
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1889
1918
  ]),
1890
1919
  _: 1
1891
1920
  }, 8, ["modelValue", "label", "options"])
@@ -1895,7 +1924,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1895
1924
  })
1896
1925
  ]),
1897
1926
  _: 1
1898
- })
1927
+ }, 8, ["icon"])
1899
1928
  ]),
1900
1929
  body: withCtx((props2) => [
1901
1930
  createVNode(_component_q_tr, { props: props2 }, {
@@ -1917,7 +1946,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1917
1946
  size: "sm",
1918
1947
  round: "",
1919
1948
  flat: "",
1920
- icon: "more_vert"
1949
+ icon: unref(moreVertIcon)
1921
1950
  }, {
1922
1951
  default: withCtx(() => [
1923
1952
  createVNode(_component_q_menu, null, {
@@ -1970,7 +1999,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1970
1999
  }, 1024)
1971
2000
  ]),
1972
2001
  _: 2
1973
- }, 1024)
2002
+ }, 1032, ["icon"])
1974
2003
  ]),
1975
2004
  _: 2
1976
2005
  }, 1024)
package/dist/form.js CHANGED
@@ -381,7 +381,11 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
381
381
  label: { default: "" },
382
382
  required: { type: Boolean },
383
383
  clearable: { type: Boolean },
384
- date: { default: () => ({}) }
384
+ date: { default: () => ({}) },
385
+ icons: { default: () => ({
386
+ event: "event",
387
+ clear: "clear"
388
+ }) }
385
389
  },
386
390
  emits: ["update:modelValue"],
387
391
  setup(__props, { emit: __emit }) {
@@ -543,12 +547,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
543
547
  append: withCtx(() => [
544
548
  _ctx.clearable ? (openBlock(), createBlock(_component_q_icon, {
545
549
  key: 0,
546
- name: "clear",
550
+ name: _ctx.icons.clear,
547
551
  class: "cursor-pointer",
548
552
  onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", null))
549
- })) : createCommentVNode("", true),
553
+ }, null, 8, ["name"])) : createCommentVNode("", true),
550
554
  createVNode(_component_q_icon, {
551
- name: "event",
555
+ name: _ctx.icons.event,
552
556
  class: "cursor-pointer"
553
557
  }, {
554
558
  default: withCtx(() => [
@@ -589,7 +593,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
589
593
  })
590
594
  ]),
591
595
  _: 1
592
- })
596
+ }, 8, ["name"])
593
597
  ]),
594
598
  _: 1
595
599
  }, 8, ["model-value", "rules", "label"]);