@pequity/squirrel 6.1.0 → 7.0.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.
Files changed (98) hide show
  1. package/dist/cjs/chunks/p-alert.js +52 -0
  2. package/dist/cjs/chunks/p-avatar.js +65 -0
  3. package/dist/cjs/chunks/p-btn.js +4 -4
  4. package/dist/cjs/chunks/p-date-picker.js +2 -2
  5. package/dist/cjs/chunks/p-input-number.js +161 -0
  6. package/dist/cjs/chunks/p-input-percent.js +2 -2
  7. package/dist/cjs/chunks/p-input.js +111 -0
  8. package/dist/cjs/chunks/p-progress-bar.js +38 -0
  9. package/dist/cjs/chunks/p-select-btn.js +3 -4
  10. package/dist/cjs/chunks/p-textarea.js +89 -0
  11. package/dist/cjs/index.js +69 -76
  12. package/dist/cjs/inputClasses.js +8 -2
  13. package/dist/cjs/p-alert.js +2 -64
  14. package/dist/cjs/p-avatar.js +2 -70
  15. package/dist/cjs/p-drawer.js +2 -2
  16. package/dist/cjs/p-input-number.js +2 -145
  17. package/dist/cjs/p-input-search.js +2 -2
  18. package/dist/cjs/p-input.js +2 -92
  19. package/dist/cjs/p-modal.js +2 -2
  20. package/dist/cjs/p-progress-bar.js +2 -40
  21. package/dist/cjs/p-table-filter-icon.js +14 -9
  22. package/dist/cjs/p-textarea.js +2 -72
  23. package/dist/cjs/p-toggle.js +76 -64
  24. package/dist/cjs/useInputClasses.js +13 -18
  25. package/dist/es/chunks/p-alert.js +53 -0
  26. package/dist/es/chunks/p-avatar.js +66 -0
  27. package/dist/es/chunks/p-btn.js +4 -4
  28. package/dist/es/chunks/p-date-picker.js +2 -2
  29. package/dist/es/chunks/p-input-number.js +162 -0
  30. package/dist/es/chunks/p-input-percent.js +2 -2
  31. package/dist/es/chunks/p-input.js +112 -0
  32. package/dist/es/chunks/p-progress-bar.js +39 -0
  33. package/dist/es/chunks/p-select-btn.js +4 -5
  34. package/dist/es/chunks/p-textarea.js +90 -0
  35. package/dist/es/index.js +119 -126
  36. package/dist/es/inputClasses.js +8 -2
  37. package/dist/es/p-alert.js +2 -64
  38. package/dist/es/p-avatar.js +2 -70
  39. package/dist/es/p-drawer.js +2 -2
  40. package/dist/es/p-input-number.js +2 -145
  41. package/dist/es/p-input-search.js +2 -2
  42. package/dist/es/p-input.js +2 -92
  43. package/dist/es/p-modal.js +2 -2
  44. package/dist/es/p-progress-bar.js +2 -40
  45. package/dist/es/p-table-filter-icon.js +14 -9
  46. package/dist/es/p-textarea.js +2 -72
  47. package/dist/es/p-toggle.js +77 -65
  48. package/dist/es/useInputClasses.js +14 -19
  49. package/dist/squirrel/components/p-alert/p-alert.vue.d.ts +27 -10
  50. package/dist/squirrel/components/p-avatar/p-avatar.vue.d.ts +9 -10
  51. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +28 -28
  52. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +2 -2
  53. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +37 -13
  54. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +2 -2
  55. package/dist/squirrel/components/p-input/p-input.vue.d.ts +30 -61
  56. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +101 -65
  57. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +113 -83
  58. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +2 -2
  59. package/dist/squirrel/components/p-progress-bar/p-progress-bar.vue.d.ts +5 -20
  60. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
  61. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
  62. package/dist/squirrel/components/p-table-sort/p-table-sort.vue.d.ts +3 -7
  63. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +79 -42
  64. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +25 -62
  65. package/dist/squirrel/composables/useInputClasses.d.ts +2 -1
  66. package/dist/squirrel/utils/index.d.ts +1 -3
  67. package/dist/squirrel/utils/inputClasses.d.ts +12 -0
  68. package/dist/squirrel.css +5 -5
  69. package/package.json +19 -19
  70. package/squirrel/components/p-alert/p-alert.spec.js +9 -8
  71. package/squirrel/components/p-alert/p-alert.vue +19 -31
  72. package/squirrel/components/p-avatar/p-avatar.spec.ts +10 -3
  73. package/squirrel/components/p-avatar/p-avatar.vue +40 -42
  74. package/squirrel/components/p-btn/p-btn.spec.js +7 -7
  75. package/squirrel/components/p-btn/p-btn.vue +4 -4
  76. package/squirrel/components/p-input/p-input.vue +63 -40
  77. package/squirrel/components/p-input-number/p-input-number.vue +101 -86
  78. package/squirrel/components/p-progress-bar/p-progress-bar.vue +9 -14
  79. package/squirrel/components/p-select-btn/p-select-btn.spec.js +24 -5
  80. package/squirrel/components/p-select-btn/p-select-btn.vue +1 -1
  81. package/squirrel/components/p-table-header-cell/p-table-filter-icon.vue +8 -9
  82. package/squirrel/components/p-table-sort/p-table-sort.vue +13 -16
  83. package/squirrel/components/p-textarea/p-textarea.vue +55 -37
  84. package/squirrel/components/p-toggle/p-toggle.vue +59 -43
  85. package/squirrel/composables/useInputClasses.spec.js +50 -13
  86. package/squirrel/composables/useInputClasses.ts +18 -24
  87. package/squirrel/utils/index.ts +0 -7
  88. package/squirrel/utils/inputClasses.ts +8 -2
  89. package/dist/cjs/inputClassesMixin.js +0 -58
  90. package/dist/cjs/tailwind.js +0 -25
  91. package/dist/es/inputClassesMixin.js +0 -59
  92. package/dist/es/tailwind.js +0 -25
  93. package/dist/squirrel/utils/inputClassesMixin.d.ts +0 -56
  94. package/dist/squirrel/utils/tailwind.d.ts +0 -8
  95. package/squirrel/utils/inputClassesMixin.spec.js +0 -241
  96. package/squirrel/utils/inputClassesMixin.ts +0 -60
  97. package/squirrel/utils/tailwind.spec.js +0 -27
  98. package/squirrel/utils/tailwind.ts +0 -28
package/dist/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const pActionBar_vue_vue_type_script_setup_true_lang = require("./chunks/p-action-bar.js");
4
- const pAlert = require("./p-alert.js");
5
- const pAvatar = require("./p-avatar.js");
4
+ const pAlert_vue_vue_type_script_setup_true_lang = require("./chunks/p-alert.js");
5
+ const pAvatar_vue_vue_type_script_setup_true_lang = require("./chunks/p-avatar.js");
6
6
  const pBtn_vue_vue_type_script_setup_true_lang = require("./chunks/p-btn.js");
7
7
  const pCard_vue_vue_type_script_setup_true_lang = require("./chunks/p-card.js");
8
8
  const pCheckbox = require("./p-checkbox.js");
@@ -21,8 +21,8 @@ const vueToastification = require("vue-toastification");
21
21
  const pIcon = require("./p-icon.js");
22
22
  const pInfoIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-info-icon.js");
23
23
  const pInlineDatePicker_vue_vue_type_script_setup_true_lang = require("./chunks/p-inline-date-picker.js");
24
- const pInput = require("./p-input.js");
25
- const pInputNumber = require("./p-input-number.js");
24
+ const pInput_vue_vue_type_script_setup_true_lang = require("./chunks/p-input.js");
25
+ const pInputNumber_vue_vue_type_script_setup_true_lang = require("./chunks/p-input-number.js");
26
26
  const pInputPercent_vue_vue_type_script_setup_true_lang = require("./chunks/p-input-percent.js");
27
27
  const pInputSearch = require("./p-input-search.js");
28
28
  const pLink_vue_vue_type_script_setup_true_lang = require("./chunks/p-link.js");
@@ -32,7 +32,7 @@ const pModal = require("./p-modal.js");
32
32
  const usePModal = require("./usePModal.js");
33
33
  const pPagination_vue_vue_type_script_setup_true_lang = require("./chunks/p-pagination.js");
34
34
  const pPaginationInfo_vue_vue_type_script_setup_true_lang = require("./chunks/p-pagination-info.js");
35
- const pProgressBar = require("./p-progress-bar.js");
35
+ const pProgressBar_vue_vue_type_script_setup_true_lang = require("./chunks/p-progress-bar.js");
36
36
  const pRingLoader_vue_vue_type_script_setup_true_lang = require("./chunks/p-ring-loader.js");
37
37
  const pSelect_vue_vue_type_script_setup_true_lang = require("./chunks/p-select.js");
38
38
  const pSelectBtn_vue_vue_type_script_setup_true_lang = require("./chunks/p-select-btn.js");
@@ -49,22 +49,20 @@ const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js")
49
49
  const usePTableRowVirtualizer = require("./usePTableRowVirtualizer.js");
50
50
  const pTableFilterIcon = require("./p-table-filter-icon.js");
51
51
  const pTableLoader_vue_vue_type_script_setup_true_lang = require("./chunks/p-table-loader.js");
52
- const pTableSort$1 = require("./p-table-sort.js");
52
+ const pTableSort = require("./p-table-sort.js");
53
53
  const pTableTd = require("./p-table-td.js");
54
54
  const pTabs_vue_vue_type_script_setup_true_lang = require("./chunks/p-tabs.js");
55
- const pTextarea = require("./p-textarea.js");
55
+ const pTextarea_vue_vue_type_script_setup_true_lang = require("./chunks/p-textarea.js");
56
56
  const pToggle = require("./p-toggle.js");
57
57
  const config = require("./config.js");
58
58
  const pBtn_types = require("./chunks/p-btn.types.js");
59
59
  const currency = require("./currency.js");
60
60
  const dom = require("./dom.js");
61
- const inputClassesMixin = require("./inputClassesMixin.js");
62
61
  const listKeyboardNavigation = require("./listKeyboardNavigation.js");
63
62
  const number = require("./number.js");
64
63
  const object = require("./object.js");
65
64
  const pagination = require("./pagination.js");
66
65
  const sanitization = require("./sanitization.js");
67
- const tailwind = require("./tailwind.js");
68
66
  const index = require("./chunks/index.js");
69
67
  const _hoisted_1$3 = ["data-has-error"];
70
68
  const _hoisted_2$3 = {
@@ -880,24 +878,6 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
880
878
  }
881
879
  });
882
880
  const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-8560a8de"]]);
883
- const _sfc_main = vue.defineComponent({
884
- name: "PTableSort",
885
- props: {
886
- modelValue: {
887
- type: String,
888
- default: pTableSort$1.SORTING_TYPES.NO_SORTING,
889
- validator(value) {
890
- return Object.values(pTableSort$1.SORTING_TYPES).includes(value);
891
- }
892
- }
893
- },
894
- emits: ["update:modelValue"],
895
- data() {
896
- return {
897
- SORTING_TYPES: pTableSort$1.SORTING_TYPES
898
- };
899
- }
900
- });
901
881
  const _imports_0 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75838)'%3e%3cpath%20d='M11.6533%203.37331L8.47329%200.18664C8.41131%200.124154%208.33758%200.074558%208.25634%200.0407122C8.1751%200.00686641%208.08796%20-0.0105591%207.99995%20-0.0105591C7.91194%20-0.0105591%207.82481%200.00686641%207.74357%200.0407122C7.66233%200.074558%207.58859%200.124154%207.52662%200.18664L4.34662%203.37331C4.253%203.46615%204.18902%203.58468%204.16277%203.71388C4.13651%203.84309%204.14916%203.97719%204.19911%204.09921C4.24906%204.22123%204.33407%204.3257%204.44339%204.39941C4.55271%204.47312%204.68144%204.51275%204.81329%204.51331H6.81329C6.83571%204.51054%206.85846%204.51235%206.88016%204.51865C6.90186%204.52494%206.92205%204.53559%206.93951%204.54993C6.95697%204.56427%206.97133%204.58201%206.98172%204.60207C6.99211%204.62214%206.99832%204.6441%206.99995%204.66664V14.9933C6.99995%2015.2585%207.10531%2015.5129%207.29285%2015.7004C7.48038%2015.888%207.73474%2015.9933%207.99995%2015.9933C8.26517%2015.9933%208.51952%2015.888%208.70706%2015.7004C8.8946%2015.5129%208.99995%2015.2585%208.99995%2014.9933V4.66664C8.99995%204.62244%209.01751%204.58004%209.04877%204.54879C9.08002%204.51753%209.12242%204.49997%209.16662%204.49997H11.1666C11.2985%204.49942%2011.4272%204.45978%2011.5365%204.38608C11.6458%204.31237%2011.7308%204.2079%2011.7808%204.08587C11.8307%203.96385%2011.8434%203.82976%2011.8171%203.70055C11.7909%203.57134%2011.7269%203.45282%2011.6333%203.35997L11.6533%203.37331Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75838'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
902
882
  const _imports_1 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_80096)'%3e%3cpath%20d='M11.6533%203.37331L8.47329%200.18664C8.41131%200.124154%208.33758%200.074558%208.25634%200.0407122C8.1751%200.00686641%208.08796%20-0.0105591%207.99995%20-0.0105591C7.91194%20-0.0105591%207.82481%200.00686641%207.74357%200.0407122C7.66233%200.074558%207.58859%200.124154%207.52662%200.18664L4.34662%203.37331C4.253%203.46615%204.18902%203.58468%204.16277%203.71388C4.13651%203.84309%204.14916%203.97719%204.19911%204.09921C4.24906%204.22123%204.33407%204.3257%204.44339%204.39941C4.55271%204.47312%204.68144%204.51275%204.81329%204.51331H6.81329C6.83571%204.51054%206.85846%204.51235%206.88016%204.51865C6.90186%204.52494%206.92205%204.53559%206.93951%204.54993C6.95697%204.56427%206.97133%204.58201%206.98172%204.60207C6.99211%204.62214%206.99832%204.6441%206.99995%204.66664V14.9933C6.99995%2015.2585%207.10531%2015.5129%207.29285%2015.7004C7.48038%2015.888%207.73474%2015.9933%207.99995%2015.9933C8.26517%2015.9933%208.51952%2015.888%208.70706%2015.7004C8.8946%2015.5129%208.99995%2015.2585%208.99995%2014.9933V4.66664C8.99995%204.62244%209.01751%204.58004%209.04877%204.54879C9.08002%204.51753%209.12242%204.49997%209.16662%204.49997H11.1666C11.2985%204.49942%2011.4272%204.45978%2011.5365%204.38608C11.6458%204.31237%2011.7308%204.2079%2011.7808%204.08587C11.8307%203.96385%2011.8434%203.82976%2011.8171%203.70055C11.7909%203.57134%2011.7269%203.45282%2011.6333%203.35997L11.6533%203.37331Z'%20fill='%23323CEB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_80096'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
903
883
  const _imports_2 = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1019_75842)'%3e%3cpath%20d='M11.8%2011.8933C11.75%2011.7716%2011.665%2011.6674%2011.5559%2011.5938C11.4467%2011.5203%2011.3183%2011.4807%2011.1866%2011.48H9.18664C9.16473%2011.4828%209.14248%2011.4812%209.12119%2011.4753C9.0999%2011.4694%209.07999%2011.4594%209.06262%2011.4457C9.04525%2011.4321%209.03077%2011.4151%209.02001%2011.3958C9.00926%2011.3765%209.00245%2011.3553%208.99997%2011.3333V1C8.99997%200.734784%208.89462%200.48043%208.70708%200.292893C8.51954%200.105357%208.26519%200%207.99997%200C7.73476%200%207.4804%200.105357%207.29287%200.292893C7.10533%200.48043%206.99997%200.734784%206.99997%201V11.3333C6.99997%2011.3775%206.98241%2011.4199%206.95116%2011.4512C6.9199%2011.4824%206.87751%2011.5%206.83331%2011.5H4.83331C4.70146%2011.5006%204.57273%2011.5402%204.46341%2011.6139C4.35409%2011.6876%204.26908%2011.7921%204.21913%2011.9141C4.16918%2012.0361%204.15653%2012.1702%204.18279%2012.2994C4.20904%2012.4286%204.27302%2012.5472%204.36664%2012.64L7.54664%2015.8267C7.60861%2015.8892%207.68235%2015.9387%207.76359%2015.9726C7.84483%2016.0064%207.93196%2016.0239%208.01997%2016.0239C8.10798%2016.0239%208.19512%2016.0064%208.27636%2015.9726C8.3576%2015.9387%208.43133%2015.8892%208.49331%2015.8267L11.6733%2012.64C11.7677%2012.5431%2011.8303%2012.4198%2011.853%2012.2864C11.8756%2012.153%2011.8571%2012.0159%2011.8%2011.8933Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1019_75842'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
@@ -920,48 +900,65 @@ const _hoisted_6 = {
920
900
  key: 1,
921
901
  src: _imports_3
922
902
  };
923
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
924
- return vue.openBlock(), vue.createElementBlock("div", null, [
925
- vue.createElementVNode("div", _hoisted_1, [
926
- _cache[3] || (_cache[3] = vue.createElementVNode("div", { class: "px-4 text-xs font-semibold text-p-gray-40" }, "SORT", -1)),
927
- vue.createElementVNode("div", {
928
- class: vue.normalizeClass([
929
- "px-4 text-xs font-semibold text-primary",
930
- [_ctx.SORTING_TYPES.ASC, _ctx.SORTING_TYPES.DESC].includes(_ctx.modelValue) ? "cursor-pointer opacity-100" : "opacity-50"
903
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
904
+ ...{
905
+ name: "PTableSort"
906
+ },
907
+ __name: "p-table-sort",
908
+ props: {
909
+ modelValue: {
910
+ type: String,
911
+ default: pTableSort.SORTING_TYPES.NO_SORTING,
912
+ validator(value) {
913
+ return Object.values(pTableSort.SORTING_TYPES).includes(value);
914
+ }
915
+ }
916
+ },
917
+ emits: ["update:modelValue"],
918
+ setup(__props) {
919
+ return (_ctx, _cache) => {
920
+ return vue.openBlock(), vue.createElementBlock("div", null, [
921
+ vue.createElementVNode("div", _hoisted_1, [
922
+ _cache[3] || (_cache[3] = vue.createElementVNode("div", { class: "px-4 text-xs font-semibold text-p-gray-40" }, "SORT", -1)),
923
+ vue.createElementVNode("div", {
924
+ class: vue.normalizeClass([
925
+ "px-4 text-xs font-semibold text-primary",
926
+ [vue.unref(pTableSort.SORTING_TYPES).ASC, vue.unref(pTableSort.SORTING_TYPES).DESC].includes(__props.modelValue) ? "cursor-pointer opacity-100" : "opacity-50"
927
+ ]),
928
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", vue.unref(pTableSort.SORTING_TYPES).NO_SORTING))
929
+ }, " Clear ", 2)
931
930
  ]),
932
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", _ctx.SORTING_TYPES.NO_SORTING))
933
- }, " Clear ", 2)
934
- ]),
935
- vue.createElementVNode("div", _hoisted_2, [
936
- vue.createElementVNode("div", {
937
- class: "flex cursor-pointer items-center justify-between px-4 py-1 hover:bg-p-blue-10",
938
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", _ctx.SORTING_TYPES.ASC))
939
- }, [
940
- vue.createElementVNode("div", {
941
- class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": _ctx.modelValue === _ctx.SORTING_TYPES.ASC }])
942
- }, " Sort ascending ", 2),
943
- vue.createElementVNode("div", null, [
944
- _ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.DESC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_3)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_4))
945
- ])
946
- ]),
947
- vue.createElementVNode("div", {
948
- class: "flex cursor-pointer items-center justify-between px-4 py-1 hover:bg-p-blue-10",
949
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:modelValue", _ctx.SORTING_TYPES.DESC))
950
- }, [
951
- vue.createElementVNode("div", {
952
- class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": _ctx.modelValue === _ctx.SORTING_TYPES.DESC }])
953
- }, " Sort descending ", 2),
954
- vue.createElementVNode("div", null, [
955
- _ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.ASC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_5)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_6))
931
+ vue.createElementVNode("div", _hoisted_2, [
932
+ vue.createElementVNode("div", {
933
+ class: "flex cursor-pointer items-center justify-between px-4 py-1 hover:bg-p-blue-10",
934
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:modelValue", vue.unref(pTableSort.SORTING_TYPES).ASC))
935
+ }, [
936
+ vue.createElementVNode("div", {
937
+ class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).ASC }])
938
+ }, " Sort ascending ", 2),
939
+ vue.createElementVNode("div", null, [
940
+ __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).NO_SORTING || __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).DESC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_3)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_4))
941
+ ])
942
+ ]),
943
+ vue.createElementVNode("div", {
944
+ class: "flex cursor-pointer items-center justify-between px-4 py-1 hover:bg-p-blue-10",
945
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:modelValue", vue.unref(pTableSort.SORTING_TYPES).DESC))
946
+ }, [
947
+ vue.createElementVNode("div", {
948
+ class: vue.normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).DESC }])
949
+ }, " Sort descending ", 2),
950
+ vue.createElementVNode("div", null, [
951
+ __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).NO_SORTING || __props.modelValue === vue.unref(pTableSort.SORTING_TYPES).ASC ? (vue.openBlock(), vue.createElementBlock("img", _hoisted_5)) : (vue.openBlock(), vue.createElementBlock("img", _hoisted_6))
952
+ ])
953
+ ])
956
954
  ])
957
- ])
958
- ])
959
- ]);
960
- }
961
- const pTableSort = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
955
+ ]);
956
+ };
957
+ }
958
+ });
962
959
  exports.PActionBar = pActionBar_vue_vue_type_script_setup_true_lang._sfc_main;
963
- exports.PAlert = pAlert;
964
- exports.PAvatar = pAvatar;
960
+ exports.PAlert = pAlert_vue_vue_type_script_setup_true_lang._sfc_main;
961
+ exports.PAvatar = pAvatar_vue_vue_type_script_setup_true_lang._sfc_main;
965
962
  exports.PBtn = pBtn_vue_vue_type_script_setup_true_lang._sfc_main;
966
963
  exports.PCard = pCard_vue_vue_type_script_setup_true_lang._sfc_main;
967
964
  exports.PCheckbox = pCheckbox;
@@ -976,8 +973,8 @@ exports.useInputClasses = useInputClasses.useInputClasses;
976
973
  exports.P_ICON_ALIASES = pIcon.P_ICON_ALIASES;
977
974
  exports.PInfoIcon = pInfoIcon_vue_vue_type_script_setup_true_lang._sfc_main;
978
975
  exports.PInlineDatePicker = pInlineDatePicker_vue_vue_type_script_setup_true_lang._sfc_main;
979
- exports.PInput = pInput;
980
- exports.PInputNumber = pInputNumber;
976
+ exports.PInput = pInput_vue_vue_type_script_setup_true_lang._sfc_main;
977
+ exports.PInputNumber = pInputNumber_vue_vue_type_script_setup_true_lang._sfc_main;
981
978
  exports.PInputPercent = pInputPercent_vue_vue_type_script_setup_true_lang._sfc_main;
982
979
  exports.PInputSearch = pInputSearch;
983
980
  exports.PLink = pLink_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -987,7 +984,7 @@ exports.PModal = pModal;
987
984
  exports.usePModal = usePModal.usePModal;
988
985
  exports.PPagination = pPagination_vue_vue_type_script_setup_true_lang._sfc_main;
989
986
  exports.PPaginationInfo = pPaginationInfo_vue_vue_type_script_setup_true_lang._sfc_main;
990
- exports.PProgressBar = pProgressBar;
987
+ exports.PProgressBar = pProgressBar_vue_vue_type_script_setup_true_lang._sfc_main;
991
988
  exports.PRingLoader = pRingLoader_vue_vue_type_script_setup_true_lang._sfc_main;
992
989
  exports.PSelect = pSelect_vue_vue_type_script_setup_true_lang._sfc_main;
993
990
  exports.PSelectBtn = pSelectBtn_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1006,10 +1003,10 @@ exports.PTableHeaderCell = pTableHeaderCell;
1006
1003
  exports.usePTableRowVirtualizer = usePTableRowVirtualizer.usePTableRowVirtualizer;
1007
1004
  exports.PFilterIcon = pTableFilterIcon;
1008
1005
  exports.PTableLoader = pTableLoader_vue_vue_type_script_setup_true_lang._sfc_main;
1009
- exports.SORTING_TYPES = pTableSort$1.SORTING_TYPES;
1006
+ exports.SORTING_TYPES = pTableSort.SORTING_TYPES;
1010
1007
  exports.PTableTd = pTableTd;
1011
1008
  exports.PTabs = pTabs_vue_vue_type_script_setup_true_lang._sfc_main;
1012
- exports.PTextarea = pTextarea;
1009
+ exports.PTextarea = pTextarea_vue_vue_type_script_setup_true_lang._sfc_main;
1013
1010
  exports.PToggle = pToggle;
1014
1011
  exports.squirrelTailwindConfig = config.squirrelTailwindConfig;
1015
1012
  exports.SIZES = pBtn_types.SIZES;
@@ -1017,15 +1014,11 @@ exports.CURRENCY_INPUT_DEFAULTS = currency.CURRENCY_INPUT_DEFAULTS;
1017
1014
  exports.getNextActiveElement = dom.getNextActiveElement;
1018
1015
  exports.isElement = dom.isElement;
1019
1016
  exports.isVisible = dom.isVisible;
1020
- exports.inputClassesMixin = inputClassesMixin;
1021
1017
  exports.setupListKeyboardNavigation = listKeyboardNavigation.setupListKeyboardNavigation;
1022
1018
  exports.toNumberOrNull = number.toNumberOrNull;
1023
1019
  exports.isObject = object.isObject;
1024
1020
  exports.createPagingRange = pagination.createPagingRange;
1025
1021
  exports.sanitizeUrl = sanitization.sanitizeUrl;
1026
- exports.getColor = tailwind.getColor;
1027
- exports.getColorDeep = tailwind.getColorDeep;
1028
- exports.getScreen = tailwind.getScreen;
1029
1022
  exports.cn = index.M;
1030
1023
  exports.cnBase = index.N;
1031
1024
  exports.createTV = index.fe;
@@ -1035,4 +1028,4 @@ exports.voidEmpty = index.x;
1035
1028
  exports.PFileUpload = _sfc_main$3;
1036
1029
  exports.PSelectList = _sfc_main$2;
1037
1030
  exports.PTable = pTable;
1038
- exports.PTableSort = pTableSort;
1031
+ exports.PTableSort = _sfc_main;
@@ -95,12 +95,18 @@ const inputClasses = index.ce({
95
95
  const textareaClasses = index.ce({
96
96
  extend: inputClasses,
97
97
  slots: {
98
- input: "resize-y overflow-auto px-3 py-3"
98
+ input: "resize-y overflow-auto"
99
99
  },
100
100
  variants: {
101
101
  size: {
102
+ sm: {
103
+ input: "h-auto py-2"
104
+ },
102
105
  md: {
103
- input: "h-auto"
106
+ input: "h-auto py-3"
107
+ },
108
+ lg: {
109
+ input: "h-auto py-4"
104
110
  }
105
111
  }
106
112
  }
@@ -1,65 +1,3 @@
1
1
  "use strict";
2
- const tailwind = require("./tailwind.js");
3
- const vue = require("vue");
4
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
5
- const ALERT_TYPES = {
6
- info: `bg-info text-on-info`,
7
- warning: `bg-warning text-on-warning`,
8
- error: `bg-error text-on-error`,
9
- success: `bg-success text-on-success`
10
- };
11
- const _sfc_main = vue.defineComponent({
12
- name: "PAlert",
13
- props: {
14
- type: {
15
- type: String,
16
- default: "info",
17
- validator(value) {
18
- return Object.keys(ALERT_TYPES).includes(value);
19
- }
20
- }
21
- },
22
- computed: {
23
- classes() {
24
- return `${ALERT_TYPES[this.type]}`;
25
- },
26
- svgColor() {
27
- const type = `on-${this.type}`;
28
- return tailwind.getColor(type);
29
- }
30
- }
31
- });
32
- const _hoisted_1 = { class: "flex" };
33
- const _hoisted_2 = { class: "pr-2" };
34
- const _hoisted_3 = {
35
- width: "16",
36
- height: "16",
37
- viewBox: "0 0 16 16",
38
- fill: "none",
39
- xmlns: "http://www.w3.org/2000/svg"
40
- };
41
- const _hoisted_4 = ["fill"];
42
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
43
- return vue.openBlock(), vue.createElementBlock("div", {
44
- class: vue.normalizeClass(["rounded p-4 text-xs font-semibold", _ctx.classes]),
45
- role: "alert"
46
- }, [
47
- vue.createElementVNode("div", _hoisted_1, [
48
- vue.createElementVNode("div", _hoisted_2, [
49
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
50
- (vue.openBlock(), vue.createElementBlock("svg", _hoisted_3, [
51
- vue.createElementVNode("path", {
52
- d: "M8 0C6.41775 0 4.87104 0.469192 3.55544 1.34824C2.23985 2.22729 1.21447 3.47672 0.608967 4.93853C0.00346629 6.40034 -0.15496 8.00887 0.153721 9.56072C0.462403 11.1126 1.22433 12.538 2.34315 13.6569C3.46197 14.7757 4.88743 15.5376 6.43928 15.8463C7.99113 16.155 9.59966 15.9965 11.0615 15.391C12.5233 14.7855 13.7727 13.7602 14.6518 12.4446C15.5308 11.129 16 9.58225 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0V0ZM8.16667 3.33333C8.36445 3.33333 8.55779 3.39198 8.72224 3.50186C8.88669 3.61175 9.01486 3.76792 9.09055 3.95065C9.16624 4.13338 9.18604 4.33444 9.14746 4.52842C9.10887 4.72241 9.01363 4.90059 8.87378 5.04044C8.73392 5.18029 8.55574 5.27553 8.36176 5.31412C8.16778 5.3527 7.96671 5.3329 7.78399 5.25721C7.60126 5.18153 7.44508 5.05335 7.3352 4.8889C7.22532 4.72445 7.16667 4.53112 7.16667 4.33333C7.16667 4.06812 7.27203 3.81376 7.45956 3.62623C7.6471 3.43869 7.90145 3.33333 8.16667 3.33333ZM9.66667 12.3333H7C6.82319 12.3333 6.65362 12.2631 6.5286 12.1381C6.40358 12.013 6.33334 11.8435 6.33334 11.6667C6.33334 11.4899 6.40358 11.3203 6.5286 11.1953C6.65362 11.0702 6.82319 11 7 11H7.5C7.54421 11 7.5866 10.9824 7.61786 10.9512C7.64911 10.9199 7.66667 10.8775 7.66667 10.8333V7.83333C7.66667 7.78913 7.64911 7.74674 7.61786 7.71548C7.5866 7.68423 7.54421 7.66667 7.5 7.66667H7C6.82319 7.66667 6.65362 7.59643 6.5286 7.47141C6.40358 7.34638 6.33334 7.17681 6.33334 7C6.33334 6.82319 6.40358 6.65362 6.5286 6.5286C6.65362 6.40357 6.82319 6.33333 7 6.33333H7.66667C8.02029 6.33333 8.35943 6.47381 8.60948 6.72386C8.85953 6.97391 9 7.31305 9 7.66667V10.8333C9 10.8775 9.01756 10.9199 9.04882 10.9512C9.08008 10.9824 9.12247 11 9.16667 11H9.66667C9.84348 11 10.0131 11.0702 10.1381 11.1953C10.2631 11.3203 10.3333 11.4899 10.3333 11.6667C10.3333 11.8435 10.2631 12.013 10.1381 12.1381C10.0131 12.2631 9.84348 12.3333 9.66667 12.3333Z",
53
- fill: _ctx.svgColor
54
- }, null, 8, _hoisted_4)
55
- ]))
56
- ])
57
- ]),
58
- vue.createElementVNode("div", null, [
59
- vue.renderSlot(_ctx.$slots, "default")
60
- ])
61
- ])
62
- ], 2);
63
- }
64
- const PAlert = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
65
- module.exports = PAlert;
2
+ const pAlert_vue_vue_type_script_setup_true_lang = require("./chunks/p-alert.js");
3
+ module.exports = pAlert_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,71 +1,3 @@
1
1
  "use strict";
2
- const vue = require("vue");
3
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
4
- const SHAPES = {
5
- rectangle: "rectangle",
6
- circle: "circle"
7
- };
8
- const SHAPE_CLASSES = {
9
- [SHAPES.rectangle]: "rounded-lg",
10
- [SHAPES.circle]: "rounded-full"
11
- };
12
- const _sfc_main = vue.defineComponent({
13
- name: "PAvatar",
14
- props: {
15
- shape: {
16
- type: String,
17
- default: SHAPES.circle,
18
- validator: (value) => Object.values(SHAPES).includes(value)
19
- },
20
- imageSrc: {
21
- type: String,
22
- default: ""
23
- },
24
- label: {
25
- type: String,
26
- required: true
27
- },
28
- imageClass: {
29
- type: String,
30
- default: ""
31
- },
32
- labelClass: {
33
- type: String,
34
- default: ""
35
- }
36
- },
37
- data() {
38
- return {
39
- imageBroken: false
40
- };
41
- },
42
- computed: {
43
- shapeClass() {
44
- return SHAPE_CLASSES[this.shape];
45
- }
46
- },
47
- watch: {
48
- imageSrc() {
49
- this.imageBroken = false;
50
- }
51
- }
52
- });
53
- const _hoisted_1 = ["src", "alt"];
54
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
55
- return vue.openBlock(), vue.createElementBlock("div", {
56
- class: vue.normalizeClass(_ctx.shapeClass)
57
- }, [
58
- _ctx.imageSrc && !_ctx.imageBroken ? (vue.openBlock(), vue.createElementBlock("img", {
59
- key: 0,
60
- src: _ctx.imageSrc,
61
- alt: _ctx.label,
62
- class: vue.normalizeClass(["h-full w-full object-cover", [_ctx.shapeClass, _ctx.imageClass]]),
63
- onError: _cache[0] || (_cache[0] = ($event) => _ctx.imageBroken = true)
64
- }, null, 42, _hoisted_1)) : (vue.openBlock(), vue.createElementBlock("div", {
65
- key: 1,
66
- class: vue.normalizeClass(["flex h-full w-full items-center justify-center", [_ctx.shapeClass, _ctx.labelClass]])
67
- }, vue.toDisplayString(_ctx.label), 3))
68
- ], 2);
69
- }
70
- const pAvatar = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
71
- module.exports = pAvatar;
2
+ const pAvatar_vue_vue_type_script_setup_true_lang = require("./chunks/p-avatar.js");
3
+ module.exports = pAvatar_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- const pAlert = require("./p-alert.js");
2
+ const pAlert_vue_vue_type_script_setup_true_lang = require("./chunks/p-alert.js");
3
3
  const pCloseBtn = require("./p-close-btn.js");
4
4
  const vue = require("vue");
5
5
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
6
6
  const __default__ = vue.defineComponent({
7
7
  name: "PDrawer",
8
8
  components: {
9
- PAlert: pAlert,
9
+ PAlert: pAlert_vue_vue_type_script_setup_true_lang._sfc_main,
10
10
  PCloseBtn: pCloseBtn
11
11
  },
12
12
  props: {
@@ -1,146 +1,3 @@
1
1
  "use strict";
2
- const pInfoIcon_vue_vue_type_script_setup_true_lang = require("./chunks/p-info-icon.js");
3
- const inputClassesMixin = require("./inputClassesMixin.js");
4
- const number = require("./number.js");
5
- const lodashEs = require("lodash-es");
6
- const vue = require("vue");
7
- const vueCurrencyInput = require("vue-currency-input");
8
- const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
9
- const ALL_OPTIONS = [
10
- "locale",
11
- "currency",
12
- "currencyDisplay",
13
- "hideGroupingSeparatorOnFocus",
14
- "hideCurrencySymbolOnFocus",
15
- "hideNegligibleDecimalDigitsOnFocus",
16
- "precision",
17
- "autoDecimalDigits",
18
- "valueRange",
19
- "useGrouping",
20
- "valueScaling"
21
- ];
22
- const _sfc_main = vue.defineComponent({
23
- name: "PInputNumber",
24
- components: {
25
- PInfoIcon: pInfoIcon_vue_vue_type_script_setup_true_lang._sfc_main
26
- },
27
- mixins: [inputClassesMixin],
28
- inheritAttrs: false,
29
- props: {
30
- modelValue: {
31
- type: [Number, String],
32
- default: null
33
- },
34
- label: {
35
- type: String,
36
- default: ""
37
- },
38
- errorMsg: {
39
- type: String,
40
- default: ""
41
- },
42
- required: {
43
- type: Boolean,
44
- default: false
45
- },
46
- selectOnClick: {
47
- type: Boolean,
48
- default: true
49
- },
50
- tooltipText: {
51
- type: String,
52
- default: ""
53
- }
54
- },
55
- emits: ["update:modelValue", "change"],
56
- setup(props, { attrs, emit, expose }) {
57
- const DEFAULTS = {
58
- locale: "en-US",
59
- currency: "USD",
60
- precision: 0,
61
- currencyDisplay: "hidden"
62
- };
63
- const inputCurrencyOptions = vue.computed(() => {
64
- ALL_OPTIONS.forEach((key) => {
65
- const attr = attrs[lodashEs.kebabCase(key)];
66
- if (attr && typeof attr !== "undefined") {
67
- DEFAULTS[key] = attr;
68
- }
69
- });
70
- return DEFAULTS;
71
- });
72
- const { inputRef, numberValue, setValue } = vueCurrencyInput.useCurrencyInput(
73
- inputCurrencyOptions.value,
74
- false
75
- );
76
- vue.watch(numberValue, (value) => {
77
- emit("update:modelValue", number.toNumberOrNull(value));
78
- });
79
- vue.watch(
80
- () => props.modelValue,
81
- (value) => {
82
- setValue(number.toNumberOrNull(value));
83
- }
84
- );
85
- const computedAttrs = vue.computed(() => {
86
- const { class: classes, style: style2, ...rest } = attrs;
87
- return rest;
88
- });
89
- const style = vue.computed(() => {
90
- return attrs.style;
91
- });
92
- const focus = () => {
93
- props.selectOnClick && inputRef.value.select();
94
- };
95
- expose({ setValue });
96
- return { inputRef, computedAttrs, style, focus };
97
- }
98
- });
99
- const _hoisted_1 = ["data-has-error"];
100
- const _hoisted_2 = { class: "flex flex-row items-center" };
101
- const _hoisted_3 = { class: "relative w-full" };
102
- const _hoisted_4 = { key: 0 };
103
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
104
- const _component_PInfoIcon = vue.resolveComponent("PInfoIcon");
105
- return vue.openBlock(), vue.createElementBlock("div", {
106
- class: vue.normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
107
- "data-has-error": !!_ctx.errorMsg,
108
- style: vue.normalizeStyle(_ctx.style)
109
- }, [
110
- vue.createElementVNode("div", _hoisted_2, [
111
- vue.renderSlot(_ctx.$slots, "label", {
112
- label: _ctx.label,
113
- labelClasses: _ctx.labelClasses
114
- }, () => [
115
- _ctx.label ? (vue.openBlock(), vue.createElementBlock("label", {
116
- key: 0,
117
- class: vue.normalizeClass(_ctx.labelClasses)
118
- }, vue.toDisplayString(_ctx.label), 3)) : vue.createCommentVNode("", true)
119
- ]),
120
- _ctx.tooltipText ? (vue.openBlock(), vue.createBlock(_component_PInfoIcon, {
121
- key: 0,
122
- text: _ctx.tooltipText,
123
- class: "ml-1"
124
- }, null, 8, ["text"])) : vue.createCommentVNode("", true)
125
- ]),
126
- vue.createElementVNode("div", _hoisted_3, [
127
- !!_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
128
- vue.renderSlot(_ctx.$slots, "prefix")
129
- ])) : vue.createCommentVNode("", true),
130
- vue.createElementVNode("input", vue.mergeProps({
131
- ref: "inputRef",
132
- type: "text"
133
- }, _ctx.computedAttrs, {
134
- class: _ctx.inputClasses,
135
- onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.focus && _ctx.focus(...args))
136
- }), null, 16)
137
- ]),
138
- vue.withDirectives(vue.createElementVNode("div", {
139
- class: vue.normalizeClass(_ctx.errorMsgClasses)
140
- }, vue.toDisplayString(_ctx.errorMsg), 3), [
141
- [vue.vShow, _ctx.errorMsg]
142
- ])
143
- ], 14, _hoisted_1);
144
- }
145
- const PInputNumber = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
146
- module.exports = PInputNumber;
2
+ const pInputNumber_vue_vue_type_script_setup_true_lang = require("./chunks/p-input-number.js");
3
+ module.exports = pInputNumber_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  const pBtn_types = require("./chunks/p-btn.types.js");
3
- const pInput = require("./p-input.js");
3
+ const pInput_vue_vue_type_script_setup_true_lang = require("./chunks/p-input.js");
4
4
  const vue = require("vue");
5
5
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
6
6
  const _sfc_main = vue.defineComponent({
7
7
  name: "PInputSearch",
8
8
  components: {
9
- PInput: pInput
9
+ PInput: pInput_vue_vue_type_script_setup_true_lang._sfc_main
10
10
  },
11
11
  inheritAttrs: false,
12
12
  props: {