@pequity/squirrel 6.1.1 → 7.0.1

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 (96) hide show
  1. package/dist/cjs/chunks/index.js +748 -504
  2. package/dist/cjs/chunks/p-alert.js +52 -0
  3. package/dist/cjs/chunks/p-avatar.js +65 -0
  4. package/dist/cjs/chunks/p-btn.js +2 -2
  5. package/dist/cjs/chunks/p-date-picker.js +2 -2
  6. package/dist/cjs/chunks/p-input-number.js +161 -0
  7. package/dist/cjs/chunks/p-input-percent.js +2 -2
  8. package/dist/cjs/chunks/p-input.js +111 -0
  9. package/dist/cjs/chunks/p-progress-bar.js +38 -0
  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/index.js +748 -504
  26. package/dist/es/chunks/p-alert.js +53 -0
  27. package/dist/es/chunks/p-avatar.js +66 -0
  28. package/dist/es/chunks/p-btn.js +2 -2
  29. package/dist/es/chunks/p-date-picker.js +2 -2
  30. package/dist/es/chunks/p-input-number.js +162 -0
  31. package/dist/es/chunks/p-input-percent.js +2 -2
  32. package/dist/es/chunks/p-input.js +112 -0
  33. package/dist/es/chunks/p-progress-bar.js +39 -0
  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 +8 -248
  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 +9 -525
  68. package/dist/squirrel.css +5 -5
  69. package/package.json +28 -28
  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 +2 -3
  75. package/squirrel/components/p-btn/p-btn.vue +2 -2
  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-table-header-cell/p-table-filter-icon.vue +8 -9
  80. package/squirrel/components/p-table-sort/p-table-sort.vue +13 -16
  81. package/squirrel/components/p-textarea/p-textarea.vue +55 -37
  82. package/squirrel/components/p-toggle/p-toggle.vue +59 -43
  83. package/squirrel/composables/useInputClasses.spec.js +50 -13
  84. package/squirrel/composables/useInputClasses.ts +18 -24
  85. package/squirrel/utils/index.ts +0 -7
  86. package/squirrel/utils/inputClasses.ts +8 -2
  87. package/dist/cjs/inputClassesMixin.js +0 -58
  88. package/dist/cjs/tailwind.js +0 -25
  89. package/dist/es/inputClassesMixin.js +0 -59
  90. package/dist/es/tailwind.js +0 -25
  91. package/dist/squirrel/utils/inputClassesMixin.d.ts +0 -56
  92. package/dist/squirrel/utils/tailwind.d.ts +0 -8
  93. package/squirrel/utils/inputClassesMixin.spec.js +0 -241
  94. package/squirrel/utils/inputClassesMixin.ts +0 -60
  95. package/squirrel/utils/tailwind.spec.js +0 -27
  96. package/squirrel/utils/tailwind.ts +0 -28
package/dist/es/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { _ } from "./chunks/p-action-bar.js";
2
- import { default as default2 } from "./p-alert.js";
3
- import { default as default3 } from "./p-avatar.js";
4
- import { _ as _2 } from "./chunks/p-btn.js";
5
- import { _ as _3 } from "./chunks/p-card.js";
6
- import { default as default4 } from "./p-checkbox.js";
7
- import { default as default5 } from "./p-chips.js";
8
- import { default as default6 } from "./p-close-btn.js";
9
- import { _ as _4 } from "./chunks/p-date-picker.js";
10
- import { default as default7 } from "./p-drawer.js";
11
- import { default as default8 } from "./p-dropdown.js";
2
+ import { _ as _2 } from "./chunks/p-alert.js";
3
+ import { _ as _3 } from "./chunks/p-avatar.js";
4
+ import { _ as _4 } from "./chunks/p-btn.js";
5
+ import { _ as _5 } from "./chunks/p-card.js";
6
+ import { default as default2 } from "./p-checkbox.js";
7
+ import { default as default3 } from "./p-chips.js";
8
+ import { default as default4 } from "./p-close-btn.js";
9
+ import { _ as _6 } from "./chunks/p-date-picker.js";
10
+ import { default as default5 } from "./p-drawer.js";
11
+ import { default as default6 } from "./p-dropdown.js";
12
12
  import { _ as _imports_0$1 } from "./chunks/p-dropdown-select.js";
13
13
  import { a } from "./chunks/p-dropdown-select.js";
14
14
  import { defineComponent, shallowRef, ref, computed, onMounted, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, withDirectives, unref, toDisplayString, withModifiers, createVNode, createTextVNode, Fragment, renderList, vShow, useAttrs, resolveDirective, normalizeStyle, isRef, renderSlot, provide, onBeforeUnmount, watch, mergeProps, toHandlers } from "vue";
@@ -18,53 +18,51 @@ import { useInputClasses } from "./useInputClasses.js";
18
18
  import { uniq, kebabCase } from "lodash-es";
19
19
  import { useToast } from "vue-toastification";
20
20
  import { P_ICON_ALIASES } from "./p-icon.js";
21
- import { _ as _5 } from "./chunks/p-info-icon.js";
22
- import { _ as _6 } from "./chunks/p-inline-date-picker.js";
23
- import { default as default9 } from "./p-input.js";
24
- import { default as default10 } from "./p-input-number.js";
25
- import { _ as _7 } from "./chunks/p-input-percent.js";
21
+ import { _ as _7 } from "./chunks/p-info-icon.js";
22
+ import { _ as _8 } from "./chunks/p-inline-date-picker.js";
23
+ import { _ as _9 } from "./chunks/p-input.js";
24
+ import { _ as _10 } from "./chunks/p-input-number.js";
25
+ import { _ as _11 } from "./chunks/p-input-percent.js";
26
26
  import PInputSearch from "./p-input-search.js";
27
- import { _ as _8 } from "./chunks/p-link.js";
28
- import { default as default11 } from "./p-loading.js";
27
+ import { _ as _12 } from "./chunks/p-link.js";
28
+ import { default as default7 } from "./p-loading.js";
29
29
  import { usePLoading } from "./usePLoading.js";
30
- import { default as default12 } from "./p-modal.js";
30
+ import { default as default8 } from "./p-modal.js";
31
31
  import { usePModal } from "./usePModal.js";
32
- import { _ as _9 } from "./chunks/p-pagination.js";
33
- import { _ as _10 } from "./chunks/p-pagination-info.js";
34
- import { default as default13 } from "./p-progress-bar.js";
35
- import { _ as _11 } from "./chunks/p-ring-loader.js";
36
- import { _ as _12 } from "./chunks/p-select.js";
37
- import { _ as _13 } from "./chunks/p-select-btn.js";
32
+ import { _ as _13 } from "./chunks/p-pagination.js";
33
+ import { _ as _14 } from "./chunks/p-pagination-info.js";
34
+ import { _ as _15 } from "./chunks/p-progress-bar.js";
35
+ import { _ as _16 } from "./chunks/p-ring-loader.js";
36
+ import { _ as _17 } from "./chunks/p-select.js";
37
+ import { _ as _18 } from "./chunks/p-select-btn.js";
38
38
  import { SIZES } from "./p-select-list.js";
39
39
  import { useSelectList } from "./useSelectList.js";
40
40
  import { toString } from "./string.js";
41
41
  import { splitStringForHighlight } from "./text.js";
42
- import { default as default14 } from "./p-select-pill.js";
43
- import { default as default15 } from "./p-skeleton-loader.js";
42
+ import { default as default9 } from "./p-select-pill.js";
43
+ import { default as default10 } from "./p-skeleton-loader.js";
44
44
  import { colsInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, isColsResizableInjectionKey } from "./p-table.js";
45
45
  import { MIN_WIDTH_COL_RESIZE } from "./p-table.js";
46
46
  import { usePTableColResize } from "./usePTableColResize.js";
47
47
  import PTableHeaderCell from "./p-table-header-cell.js";
48
48
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
49
49
  import { usePTableRowVirtualizer } from "./usePTableRowVirtualizer.js";
50
- import { default as default16 } from "./p-table-filter-icon.js";
51
- import { _ as _14 } from "./chunks/p-table-loader.js";
50
+ import { default as default11 } from "./p-table-filter-icon.js";
51
+ import { _ as _19 } from "./chunks/p-table-loader.js";
52
52
  import { SORTING_TYPES } from "./p-table-sort.js";
53
- import { default as default17 } from "./p-table-td.js";
54
- import { _ as _15 } from "./chunks/p-tabs.js";
55
- import { default as default18 } from "./p-textarea.js";
56
- import { default as default19 } from "./p-toggle.js";
53
+ import { default as default12 } from "./p-table-td.js";
54
+ import { _ as _20 } from "./chunks/p-tabs.js";
55
+ import { _ as _21 } from "./chunks/p-textarea.js";
56
+ import { default as default13 } from "./p-toggle.js";
57
57
  import { squirrelTailwindConfig } from "./config.js";
58
58
  import { S } from "./chunks/p-btn.types.js";
59
59
  import { CURRENCY_INPUT_DEFAULTS } from "./currency.js";
60
60
  import { getNextActiveElement, isElement, isVisible } from "./dom.js";
61
- import { default as default20 } from "./inputClassesMixin.js";
62
61
  import { setupListKeyboardNavigation } from "./listKeyboardNavigation.js";
63
62
  import { toNumberOrNull } from "./number.js";
64
63
  import { isObject } from "./object.js";
65
64
  import { createPagingRange } from "./pagination.js";
66
65
  import { sanitizeUrl } from "./sanitization.js";
67
- import { getColor, getColorDeep, getScreen } from "./tailwind.js";
68
66
  import { M, N, f, i, c, x } from "./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__ */ defineComponent({
880
878
  }
881
879
  });
882
880
  const pTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-8560a8de"]]);
883
- const _sfc_main = defineComponent({
884
- name: "PTableSort",
885
- props: {
886
- modelValue: {
887
- type: String,
888
- default: SORTING_TYPES.NO_SORTING,
889
- validator(value) {
890
- return Object.values(SORTING_TYPES).includes(value);
891
- }
892
- }
893
- },
894
- emits: ["update:modelValue"],
895
- data() {
896
- return {
897
- 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,89 +900,106 @@ 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 openBlock(), createElementBlock("div", null, [
925
- createElementVNode("div", _hoisted_1, [
926
- _cache[3] || (_cache[3] = createElementVNode("div", { class: "px-4 text-xs font-semibold text-p-gray-40" }, "SORT", -1)),
927
- createElementVNode("div", {
928
- class: 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__ */ defineComponent({
904
+ ...{
905
+ name: "PTableSort"
906
+ },
907
+ __name: "p-table-sort",
908
+ props: {
909
+ modelValue: {
910
+ type: String,
911
+ default: SORTING_TYPES.NO_SORTING,
912
+ validator(value) {
913
+ return Object.values(SORTING_TYPES).includes(value);
914
+ }
915
+ }
916
+ },
917
+ emits: ["update:modelValue"],
918
+ setup(__props) {
919
+ return (_ctx, _cache) => {
920
+ return openBlock(), createElementBlock("div", null, [
921
+ createElementVNode("div", _hoisted_1, [
922
+ _cache[3] || (_cache[3] = createElementVNode("div", { class: "px-4 text-xs font-semibold text-p-gray-40" }, "SORT", -1)),
923
+ createElementVNode("div", {
924
+ class: normalizeClass([
925
+ "px-4 text-xs font-semibold text-primary",
926
+ [unref(SORTING_TYPES).ASC, unref(SORTING_TYPES).DESC].includes(__props.modelValue) ? "cursor-pointer opacity-100" : "opacity-50"
927
+ ]),
928
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", unref(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
- createElementVNode("div", _hoisted_2, [
936
- 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
- createElementVNode("div", {
941
- class: normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": _ctx.modelValue === _ctx.SORTING_TYPES.ASC }])
942
- }, " Sort ascending ", 2),
943
- createElementVNode("div", null, [
944
- _ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.DESC ? (openBlock(), createElementBlock("img", _hoisted_3)) : (openBlock(), createElementBlock("img", _hoisted_4))
945
- ])
946
- ]),
947
- 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
- createElementVNode("div", {
952
- class: normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": _ctx.modelValue === _ctx.SORTING_TYPES.DESC }])
953
- }, " Sort descending ", 2),
954
- createElementVNode("div", null, [
955
- _ctx.modelValue === _ctx.SORTING_TYPES.NO_SORTING || _ctx.modelValue === _ctx.SORTING_TYPES.ASC ? (openBlock(), createElementBlock("img", _hoisted_5)) : (openBlock(), createElementBlock("img", _hoisted_6))
931
+ createElementVNode("div", _hoisted_2, [
932
+ 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", unref(SORTING_TYPES).ASC))
935
+ }, [
936
+ createElementVNode("div", {
937
+ class: normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": __props.modelValue === unref(SORTING_TYPES).ASC }])
938
+ }, " Sort ascending ", 2),
939
+ createElementVNode("div", null, [
940
+ __props.modelValue === unref(SORTING_TYPES).NO_SORTING || __props.modelValue === unref(SORTING_TYPES).DESC ? (openBlock(), createElementBlock("img", _hoisted_3)) : (openBlock(), createElementBlock("img", _hoisted_4))
941
+ ])
942
+ ]),
943
+ 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", unref(SORTING_TYPES).DESC))
946
+ }, [
947
+ createElementVNode("div", {
948
+ class: normalizeClass(["text-sm font-semibold text-p-purple-60", { "text-primary": __props.modelValue === unref(SORTING_TYPES).DESC }])
949
+ }, " Sort descending ", 2),
950
+ createElementVNode("div", null, [
951
+ __props.modelValue === unref(SORTING_TYPES).NO_SORTING || __props.modelValue === unref(SORTING_TYPES).ASC ? (openBlock(), createElementBlock("img", _hoisted_5)) : (openBlock(), createElementBlock("img", _hoisted_6))
952
+ ])
953
+ ])
956
954
  ])
957
- ])
958
- ])
959
- ]);
960
- }
961
- const pTableSort = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
955
+ ]);
956
+ };
957
+ }
958
+ });
962
959
  export {
963
960
  CURRENCY_INPUT_DEFAULTS,
964
961
  MIN_WIDTH_COL_RESIZE,
965
962
  _ as PActionBar,
966
- default2 as PAlert,
967
- default3 as PAvatar,
968
- _2 as PBtn,
969
- _3 as PCard,
970
- default4 as PCheckbox,
971
- default5 as PChips,
972
- default6 as PCloseBtn,
973
- _4 as PDatePicker,
974
- default7 as PDrawer,
975
- default8 as PDropdown,
963
+ _2 as PAlert,
964
+ _3 as PAvatar,
965
+ _4 as PBtn,
966
+ _5 as PCard,
967
+ default2 as PCheckbox,
968
+ default3 as PChips,
969
+ default4 as PCloseBtn,
970
+ _6 as PDatePicker,
971
+ default5 as PDrawer,
972
+ default6 as PDropdown,
976
973
  a as PDropdownSelect,
977
974
  _sfc_main$3 as PFileUpload,
978
- default16 as PFilterIcon,
975
+ default11 as PFilterIcon,
979
976
  _sfc_main$4 as PIcon,
980
- _5 as PInfoIcon,
981
- _6 as PInlineDatePicker,
982
- default9 as PInput,
983
- default10 as PInputNumber,
984
- _7 as PInputPercent,
977
+ _7 as PInfoIcon,
978
+ _8 as PInlineDatePicker,
979
+ _9 as PInput,
980
+ _10 as PInputNumber,
981
+ _11 as PInputPercent,
985
982
  PInputSearch,
986
- _8 as PLink,
987
- default11 as PLoading,
988
- default12 as PModal,
989
- _9 as PPagination,
990
- _10 as PPaginationInfo,
991
- default13 as PProgressBar,
992
- _11 as PRingLoader,
993
- _12 as PSelect,
994
- _13 as PSelectBtn,
983
+ _12 as PLink,
984
+ default7 as PLoading,
985
+ default8 as PModal,
986
+ _13 as PPagination,
987
+ _14 as PPaginationInfo,
988
+ _15 as PProgressBar,
989
+ _16 as PRingLoader,
990
+ _17 as PSelect,
991
+ _18 as PSelectBtn,
995
992
  _sfc_main$2 as PSelectList,
996
- default14 as PSelectPill,
997
- default15 as PSkeletonLoader,
993
+ default9 as PSelectPill,
994
+ default10 as PSkeletonLoader,
998
995
  pTable as PTable,
999
996
  PTableHeaderCell,
1000
- _14 as PTableLoader,
1001
- pTableSort as PTableSort,
1002
- default17 as PTableTd,
1003
- _15 as PTabs,
1004
- default18 as PTextarea,
1005
- default19 as PToggle,
997
+ _19 as PTableLoader,
998
+ _sfc_main as PTableSort,
999
+ default12 as PTableTd,
1000
+ _20 as PTabs,
1001
+ _21 as PTextarea,
1002
+ default13 as PToggle,
1006
1003
  P_ICON_ALIASES,
1007
1004
  S as SIZES,
1008
1005
  SORTING_TYPES,
@@ -1012,11 +1009,7 @@ export {
1012
1009
  createPagingRange,
1013
1010
  f as createTV,
1014
1011
  i as defaultConfig,
1015
- getColor,
1016
- getColorDeep,
1017
1012
  getNextActiveElement,
1018
- getScreen,
1019
- default20 as inputClassesMixin,
1020
1013
  isColsResizableInjectionKey,
1021
1014
  isElement,
1022
1015
  isFirstColFixedInjectionKey,
@@ -93,12 +93,18 @@ const inputClasses = ce({
93
93
  const textareaClasses = ce({
94
94
  extend: inputClasses,
95
95
  slots: {
96
- input: "resize-y overflow-auto px-3 py-3"
96
+ input: "resize-y overflow-auto"
97
97
  },
98
98
  variants: {
99
99
  size: {
100
+ sm: {
101
+ input: "h-auto py-2"
102
+ },
100
103
  md: {
101
- input: "h-auto"
104
+ input: "h-auto py-3"
105
+ },
106
+ lg: {
107
+ input: "h-auto py-4"
102
108
  }
103
109
  }
104
110
  }
@@ -1,66 +1,4 @@
1
- import { getColor } from "./tailwind.js";
2
- import { defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
3
- import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
4
- const ALERT_TYPES = {
5
- info: `bg-info text-on-info`,
6
- warning: `bg-warning text-on-warning`,
7
- error: `bg-error text-on-error`,
8
- success: `bg-success text-on-success`
9
- };
10
- const _sfc_main = defineComponent({
11
- name: "PAlert",
12
- props: {
13
- type: {
14
- type: String,
15
- default: "info",
16
- validator(value) {
17
- return Object.keys(ALERT_TYPES).includes(value);
18
- }
19
- }
20
- },
21
- computed: {
22
- classes() {
23
- return `${ALERT_TYPES[this.type]}`;
24
- },
25
- svgColor() {
26
- const type = `on-${this.type}`;
27
- return getColor(type);
28
- }
29
- }
30
- });
31
- const _hoisted_1 = { class: "flex" };
32
- const _hoisted_2 = { class: "pr-2" };
33
- const _hoisted_3 = {
34
- width: "16",
35
- height: "16",
36
- viewBox: "0 0 16 16",
37
- fill: "none",
38
- xmlns: "http://www.w3.org/2000/svg"
39
- };
40
- const _hoisted_4 = ["fill"];
41
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
42
- return openBlock(), createElementBlock("div", {
43
- class: normalizeClass(["rounded p-4 text-xs font-semibold", _ctx.classes]),
44
- role: "alert"
45
- }, [
46
- createElementVNode("div", _hoisted_1, [
47
- createElementVNode("div", _hoisted_2, [
48
- renderSlot(_ctx.$slots, "icon", {}, () => [
49
- (openBlock(), createElementBlock("svg", _hoisted_3, [
50
- createElementVNode("path", {
51
- 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",
52
- fill: _ctx.svgColor
53
- }, null, 8, _hoisted_4)
54
- ]))
55
- ])
56
- ]),
57
- createElementVNode("div", null, [
58
- renderSlot(_ctx.$slots, "default")
59
- ])
60
- ])
61
- ], 2);
62
- }
63
- const PAlert = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
1
+ import { _ as _sfc_main } from "./chunks/p-alert.js";
64
2
  export {
65
- PAlert as default
3
+ _sfc_main as default
66
4
  };
@@ -1,72 +1,4 @@
1
- import { defineComponent, createElementBlock, openBlock, normalizeClass, toDisplayString } from "vue";
2
- import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
3
- const SHAPES = {
4
- rectangle: "rectangle",
5
- circle: "circle"
6
- };
7
- const SHAPE_CLASSES = {
8
- [SHAPES.rectangle]: "rounded-lg",
9
- [SHAPES.circle]: "rounded-full"
10
- };
11
- const _sfc_main = defineComponent({
12
- name: "PAvatar",
13
- props: {
14
- shape: {
15
- type: String,
16
- default: SHAPES.circle,
17
- validator: (value) => Object.values(SHAPES).includes(value)
18
- },
19
- imageSrc: {
20
- type: String,
21
- default: ""
22
- },
23
- label: {
24
- type: String,
25
- required: true
26
- },
27
- imageClass: {
28
- type: String,
29
- default: ""
30
- },
31
- labelClass: {
32
- type: String,
33
- default: ""
34
- }
35
- },
36
- data() {
37
- return {
38
- imageBroken: false
39
- };
40
- },
41
- computed: {
42
- shapeClass() {
43
- return SHAPE_CLASSES[this.shape];
44
- }
45
- },
46
- watch: {
47
- imageSrc() {
48
- this.imageBroken = false;
49
- }
50
- }
51
- });
52
- const _hoisted_1 = ["src", "alt"];
53
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
54
- return openBlock(), createElementBlock("div", {
55
- class: normalizeClass(_ctx.shapeClass)
56
- }, [
57
- _ctx.imageSrc && !_ctx.imageBroken ? (openBlock(), createElementBlock("img", {
58
- key: 0,
59
- src: _ctx.imageSrc,
60
- alt: _ctx.label,
61
- class: normalizeClass(["h-full w-full object-cover", [_ctx.shapeClass, _ctx.imageClass]]),
62
- onError: _cache[0] || (_cache[0] = ($event) => _ctx.imageBroken = true)
63
- }, null, 42, _hoisted_1)) : (openBlock(), createElementBlock("div", {
64
- key: 1,
65
- class: normalizeClass(["flex h-full w-full items-center justify-center", [_ctx.shapeClass, _ctx.labelClass]])
66
- }, toDisplayString(_ctx.label), 3))
67
- ], 2);
68
- }
69
- const pAvatar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
1
+ import { _ as _sfc_main } from "./chunks/p-avatar.js";
70
2
  export {
71
- pAvatar as default
3
+ _sfc_main as default
72
4
  };
@@ -1,11 +1,11 @@
1
- import PAlert from "./p-alert.js";
1
+ import { _ as _sfc_main } from "./chunks/p-alert.js";
2
2
  import PCloseBtn from "./p-close-btn.js";
3
3
  import { defineComponent, useCssVars, resolveComponent, createBlock, createCommentVNode, openBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementVNode, normalizeStyle, normalizeClass, vShow, renderSlot, createElementBlock, toDisplayString } from "vue";
4
4
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
5
5
  const __default__ = defineComponent({
6
6
  name: "PDrawer",
7
7
  components: {
8
- PAlert,
8
+ PAlert: _sfc_main,
9
9
  PCloseBtn
10
10
  },
11
11
  props: {
@@ -1,147 +1,4 @@
1
- import { _ as _sfc_main$1 } from "./chunks/p-info-icon.js";
2
- import inputClassesMixin from "./inputClassesMixin.js";
3
- import { toNumberOrNull } from "./number.js";
4
- import { kebabCase } from "lodash-es";
5
- import { defineComponent, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, withDirectives, renderSlot, createBlock, createCommentVNode, toDisplayString, mergeProps, vShow } from "vue";
6
- import { useCurrencyInput } from "vue-currency-input";
7
- import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
8
- const ALL_OPTIONS = [
9
- "locale",
10
- "currency",
11
- "currencyDisplay",
12
- "hideGroupingSeparatorOnFocus",
13
- "hideCurrencySymbolOnFocus",
14
- "hideNegligibleDecimalDigitsOnFocus",
15
- "precision",
16
- "autoDecimalDigits",
17
- "valueRange",
18
- "useGrouping",
19
- "valueScaling"
20
- ];
21
- const _sfc_main = defineComponent({
22
- name: "PInputNumber",
23
- components: {
24
- PInfoIcon: _sfc_main$1
25
- },
26
- mixins: [inputClassesMixin],
27
- inheritAttrs: false,
28
- props: {
29
- modelValue: {
30
- type: [Number, String],
31
- default: null
32
- },
33
- label: {
34
- type: String,
35
- default: ""
36
- },
37
- errorMsg: {
38
- type: String,
39
- default: ""
40
- },
41
- required: {
42
- type: Boolean,
43
- default: false
44
- },
45
- selectOnClick: {
46
- type: Boolean,
47
- default: true
48
- },
49
- tooltipText: {
50
- type: String,
51
- default: ""
52
- }
53
- },
54
- emits: ["update:modelValue", "change"],
55
- setup(props, { attrs, emit, expose }) {
56
- const DEFAULTS = {
57
- locale: "en-US",
58
- currency: "USD",
59
- precision: 0,
60
- currencyDisplay: "hidden"
61
- };
62
- const inputCurrencyOptions = computed(() => {
63
- ALL_OPTIONS.forEach((key) => {
64
- const attr = attrs[kebabCase(key)];
65
- if (attr && typeof attr !== "undefined") {
66
- DEFAULTS[key] = attr;
67
- }
68
- });
69
- return DEFAULTS;
70
- });
71
- const { inputRef, numberValue, setValue } = useCurrencyInput(
72
- inputCurrencyOptions.value,
73
- false
74
- );
75
- watch(numberValue, (value) => {
76
- emit("update:modelValue", toNumberOrNull(value));
77
- });
78
- watch(
79
- () => props.modelValue,
80
- (value) => {
81
- setValue(toNumberOrNull(value));
82
- }
83
- );
84
- const computedAttrs = computed(() => {
85
- const { class: classes, style: style2, ...rest } = attrs;
86
- return rest;
87
- });
88
- const style = computed(() => {
89
- return attrs.style;
90
- });
91
- const focus = () => {
92
- props.selectOnClick && inputRef.value.select();
93
- };
94
- expose({ setValue });
95
- return { inputRef, computedAttrs, style, focus };
96
- }
97
- });
98
- const _hoisted_1 = ["data-has-error"];
99
- const _hoisted_2 = { class: "flex flex-row items-center" };
100
- const _hoisted_3 = { class: "relative w-full" };
101
- const _hoisted_4 = { key: 0 };
102
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
- const _component_PInfoIcon = resolveComponent("PInfoIcon");
104
- return openBlock(), createElementBlock("div", {
105
- class: normalizeClass([{ hidden: _ctx.$attrs.hidden }, _ctx.$attrs.class]),
106
- "data-has-error": !!_ctx.errorMsg,
107
- style: normalizeStyle(_ctx.style)
108
- }, [
109
- createElementVNode("div", _hoisted_2, [
110
- renderSlot(_ctx.$slots, "label", {
111
- label: _ctx.label,
112
- labelClasses: _ctx.labelClasses
113
- }, () => [
114
- _ctx.label ? (openBlock(), createElementBlock("label", {
115
- key: 0,
116
- class: normalizeClass(_ctx.labelClasses)
117
- }, toDisplayString(_ctx.label), 3)) : createCommentVNode("", true)
118
- ]),
119
- _ctx.tooltipText ? (openBlock(), createBlock(_component_PInfoIcon, {
120
- key: 0,
121
- text: _ctx.tooltipText,
122
- class: "ml-1"
123
- }, null, 8, ["text"])) : createCommentVNode("", true)
124
- ]),
125
- createElementVNode("div", _hoisted_3, [
126
- !!_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_4, [
127
- renderSlot(_ctx.$slots, "prefix")
128
- ])) : createCommentVNode("", true),
129
- createElementVNode("input", mergeProps({
130
- ref: "inputRef",
131
- type: "text"
132
- }, _ctx.computedAttrs, {
133
- class: _ctx.inputClasses,
134
- onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.focus && _ctx.focus(...args))
135
- }), null, 16)
136
- ]),
137
- withDirectives(createElementVNode("div", {
138
- class: normalizeClass(_ctx.errorMsgClasses)
139
- }, toDisplayString(_ctx.errorMsg), 3), [
140
- [vShow, _ctx.errorMsg]
141
- ])
142
- ], 14, _hoisted_1);
143
- }
144
- const PInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
1
+ import { _ as _sfc_main } from "./chunks/p-input-number.js";
145
2
  export {
146
- PInputNumber as default
3
+ _sfc_main as default
147
4
  };