@pequity/squirrel 6.0.13 → 6.1.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 (61) hide show
  1. package/dist/cjs/chunks/p-action-bar.js +4 -4
  2. package/dist/cjs/chunks/p-btn.js +204 -0
  3. package/dist/cjs/chunks/p-select-btn.js +5 -4
  4. package/dist/cjs/index.js +28 -23
  5. package/dist/cjs/inputClasses.js +6 -4
  6. package/dist/cjs/p-btn.js +2 -169
  7. package/dist/es/chunks/p-action-bar.js +8 -8
  8. package/dist/es/chunks/p-btn.js +205 -0
  9. package/dist/es/chunks/p-select-btn.js +5 -4
  10. package/dist/es/index.js +65 -60
  11. package/dist/es/inputClasses.js +6 -4
  12. package/dist/es/p-btn.js +2 -169
  13. package/dist/squirrel/components/p-btn/p-btn.vue.d.ts +106 -46
  14. package/dist/squirrel/components/p-card/p-card.vue.d.ts +27 -14
  15. package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +43 -12
  16. package/dist/squirrel/components/p-close-btn/p-close-btn.vue.d.ts +1 -1
  17. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +1 -1
  18. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +15 -422
  19. package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +1 -3
  20. package/dist/squirrel/components/p-info-icon/p-info-icon.vue.d.ts +13 -11
  21. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +39 -14
  22. package/dist/squirrel/components/p-input/p-input.vue.d.ts +2 -2
  23. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +2 -2
  24. package/dist/squirrel/components/p-input-search/p-input-search.vue.d.ts +2 -2
  25. package/dist/squirrel/components/p-link/p-link.vue.d.ts +17 -13
  26. package/dist/squirrel/components/p-loading/p-loading.vue.d.ts +1 -3
  27. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +240 -22
  28. package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +77 -10
  29. package/dist/squirrel/components/p-select/p-select.vue.d.ts +116 -14
  30. package/dist/squirrel/components/p-select-btn/p-select-btn.vue.d.ts +37 -13
  31. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +14 -418
  32. package/dist/squirrel/components/p-table/p-table.vue.d.ts +61 -19
  33. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +1 -1
  34. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +1 -1
  35. package/dist/squirrel/components/p-table-td/p-table-td.vue.d.ts +23 -11
  36. package/dist/squirrel/components/p-tabs/p-tabs.vue.d.ts +1 -1
  37. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +1 -1
  38. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +1 -1
  39. package/dist/squirrel/utils/inputClasses.d.ts +75 -25
  40. package/dist/squirrel/utils/inputClassesMixin.d.ts +1 -1
  41. package/dist/squirrel.css +2 -9
  42. package/package.json +25 -24
  43. package/squirrel/assets/squirrel.css +1 -1
  44. package/squirrel/components/p-action-bar/p-action-bar.stories.js +1 -2
  45. package/squirrel/components/p-btn/p-btn.spec.js +227 -161
  46. package/squirrel/components/p-btn/p-btn.stories.js +32 -8
  47. package/squirrel/components/p-btn/p-btn.vue +106 -73
  48. package/squirrel/components/p-dropdown/p-dropdown.vue +0 -1
  49. package/squirrel/components/p-file-upload/p-file-upload.vue +6 -16
  50. package/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue +1 -1
  51. package/squirrel/components/p-select/p-select.spec.js +1 -1
  52. package/squirrel/components/p-select-btn/p-select-btn.stories.js +45 -4
  53. package/squirrel/components/p-select-btn/p-select-btn.vue +2 -2
  54. package/squirrel/components/p-tabs/p-tabs.stories.js +2 -2
  55. package/squirrel/composables/useInputClasses.spec.js +3 -3
  56. package/squirrel/utils/inputClasses.ts +6 -4
  57. package/squirrel/utils/inputClassesMixin.spec.js +3 -3
  58. package/squirrel/assets/file-upload-drag-over-icon.svg +0 -5
  59. package/squirrel/assets/file-upload-upload-icon.svg +0 -5
  60. package/squirrel/assets/file-upload-x-icon-hover.svg +0 -8
  61. package/squirrel/assets/file-upload-x-icon.svg +0 -8
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, createBlock, openBlock, Teleport, createElementBlock, createCommentVNode, mergeProps, createElementVNode, createVNode, toDisplayString, Fragment, renderList, withCtx, unref, resolveDynamicComponent } from "vue";
2
- import PBtn from "../p-btn.js";
2
+ import { _ as _sfc_main$1 } from "./p-btn.js";
3
3
  import PCloseBtn from "../p-close-btn.js";
4
4
  import PDropdown from "../p-dropdown.js";
5
- import { _ as _sfc_main$1 } from "./p-icon.js";
5
+ import { _ as _sfc_main$2 } from "./p-icon.js";
6
6
  import { isComponent } from "../component.js";
7
7
  import { isString } from "../string.js";
8
8
  const _hoisted_1 = { class: "flex h-12 w-max select-none items-center rounded-lg bg-p-purple-60 px-2 text-sm font-medium text-white" };
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  return openBlock(), createElementBlock(Fragment, {
45
45
  key: `action-${actionOrMenu.label}`
46
46
  }, [
47
- !actionOrMenu.subActions ? (openBlock(), createBlock(PBtn, {
47
+ !actionOrMenu.subActions ? (openBlock(), createBlock(_sfc_main$1, {
48
48
  key: 0,
49
49
  size: "sm",
50
50
  type: "secondary-ghost-dark",
@@ -56,7 +56,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
56
  key: 0,
57
57
  class: "h-4 w-4"
58
58
  })) : createCommentVNode("", true),
59
- unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$1, {
59
+ unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$2, {
60
60
  key: 1,
61
61
  icon: actionOrMenu.icon,
62
62
  width: "16px",
@@ -77,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
77
  return openBlock(), createElementBlock("div", {
78
78
  key: `subaction-${subaction.name}`
79
79
  }, [
80
- createVNode(PBtn, {
80
+ createVNode(_sfc_main$1, {
81
81
  size: "sm",
82
82
  class: "w-full",
83
83
  type: "secondary-ghost-dark",
@@ -89,7 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
89
  key: 0,
90
90
  class: "h-4 w-4"
91
91
  })) : createCommentVNode("", true),
92
- unref(isString)(subaction.icon) ? (openBlock(), createBlock(_sfc_main$1, {
92
+ unref(isString)(subaction.icon) ? (openBlock(), createBlock(_sfc_main$2, {
93
93
  key: 1,
94
94
  icon: subaction.icon,
95
95
  width: "16px",
@@ -105,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
105
105
  ])
106
106
  ]),
107
107
  default: withCtx(() => [
108
- createVNode(PBtn, {
108
+ createVNode(_sfc_main$1, {
109
109
  size: "sm",
110
110
  type: "secondary-ghost-dark"
111
111
  }, {
@@ -115,7 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
115
115
  key: 0,
116
116
  class: "h-4 w-4"
117
117
  })) : createCommentVNode("", true),
118
- unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$1, {
118
+ unref(isString)(actionOrMenu.icon) ? (openBlock(), createBlock(_sfc_main$2, {
119
119
  key: 1,
120
120
  icon: actionOrMenu.icon,
121
121
  width: "16px",
@@ -0,0 +1,205 @@
1
+ import { defineComponent, computed, createElementBlock, createBlock, unref, openBlock, mergeProps, renderSlot, resolveDynamicComponent, withCtx, createElementVNode, createCommentVNode, normalizeClass } from "vue";
2
+ import { S as SIZES } from "./p-btn.types.js";
3
+ import { _ as _sfc_main$1 } from "./p-icon.js";
4
+ import { _ as _sfc_main$2 } from "./p-ring-loader.js";
5
+ import { isExternalLink } from "../link.js";
6
+ import { sanitizeUrl } from "../sanitization.js";
7
+ import { c as ce } from "./index.js";
8
+ const _hoisted_1 = ["href", "disabled", "aria-disabled"];
9
+ const _hoisted_2 = { class: "slot-wrapper empty:hidden" };
10
+ const btnClasses = {
11
+ slots: {
12
+ button: "relative inline-block rounded font-medium outline-none disabled:pointer-events-none disabled:cursor-default disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:cursor-default aria-disabled:opacity-50",
13
+ content: "flex items-center justify-center has-[.slot-wrapper:empty]:gap-0",
14
+ loader: "absolute bottom-0 left-0 right-0 top-0 flex items-center justify-center font-medium",
15
+ icon: "shrink-0"
16
+ },
17
+ variants: {
18
+ type: {
19
+ primary: {
20
+ button: "bg-primary text-surface hover:bg-accent active:bg-p-blue-80",
21
+ loader: "text-surface"
22
+ },
23
+ secondary: {
24
+ button: "bg-p-gray-20 hover:bg-p-gray-30 active:bg-p-gray-40",
25
+ loader: "text-p-purple-60"
26
+ },
27
+ "primary-outline": {
28
+ button: "bg-p-blue-10 text-p-purple-60 ring-1 ring-inset ring-p-purple-60 hover:bg-p-gray-20",
29
+ loader: "text-p-purple-60"
30
+ },
31
+ "secondary-outline": {
32
+ button: "bg-surface text-p-purple-60 ring-1 ring-inset ring-p-gray-30 hover:bg-p-blue-10 aria-selected:bg-p-blue-10",
33
+ loader: "text-p-purple-60"
34
+ },
35
+ "secondary-outline-blue": {
36
+ button: "bg-surface text-p-purple-60 ring-1 ring-inset ring-p-gray-30 hover:bg-p-blue-10 aria-selected:bg-p-blue-15 aria-selected:text-p-blue-60",
37
+ loader: "text-p-purple-60"
38
+ },
39
+ error: { button: "bg-p-red-40 text-white hover:bg-p-red-50", loader: "text-white" },
40
+ success: { button: "bg-p-green-40 text-white hover:bg-p-green-50", loader: "text-white" },
41
+ "primary-link": { button: "bg-transparent text-primary underline hover:text-accent", loader: "text-p-blue-60" },
42
+ "secondary-ghost": { button: "text-on-surface hover:bg-p-gray-20", loader: "text-p-purple-60" },
43
+ "secondary-ghost-dark": { button: "text-white hover:bg-p-purple-50", loader: "text-p-blue-15" }
44
+ },
45
+ size: {
46
+ sm: {
47
+ button: "px-2 has-[.slot-wrapper:empty]:px-1 py-1 text-sm",
48
+ content: "gap-1",
49
+ icon: "text-lg"
50
+ },
51
+ md: {
52
+ button: "px-6 has-[.slot-wrapper:empty]:px-2 py-2 text-base",
53
+ content: "gap-2",
54
+ icon: "text-xl"
55
+ },
56
+ lg: {
57
+ button: "px-6 has-[.slot-wrapper:empty]:px-2.5 py-2.5 text-lg",
58
+ content: "gap-2.5",
59
+ icon: "text-2xl"
60
+ }
61
+ }
62
+ },
63
+ defaultVariants: {
64
+ type: "primary",
65
+ size: "md"
66
+ }
67
+ };
68
+ const btn = ce(btnClasses);
69
+ const BUTTON_TYPES = Object.keys(btnClasses.variants.type);
70
+ const BUTTON_NATIVE_TYPES = ["button", "submit", "reset"];
71
+ const LOADER_SIZES = { sm: 24, md: 30, lg: 40 };
72
+ const _sfc_main = /* @__PURE__ */ defineComponent({
73
+ ...{
74
+ name: "PBtn",
75
+ inheritAttrs: false
76
+ },
77
+ __name: "p-btn",
78
+ props: {
79
+ /**
80
+ * The button style e.g primary, secondary, primary-outline, secondary-outline, error, success, primary-link
81
+ */
82
+ type: {
83
+ type: String,
84
+ default: "primary",
85
+ validator(value) {
86
+ return BUTTON_TYPES.includes(value);
87
+ }
88
+ },
89
+ /**
90
+ * The button native type e.g button, submit, reset
91
+ */
92
+ nativeType: {
93
+ type: String,
94
+ default: "button",
95
+ validator(value) {
96
+ return BUTTON_NATIVE_TYPES.includes(value);
97
+ }
98
+ },
99
+ /**
100
+ * The button size e.g sm, md, lg
101
+ */
102
+ size: {
103
+ type: String,
104
+ default: "md",
105
+ validator(value) {
106
+ return SIZES.includes(value);
107
+ }
108
+ },
109
+ /**
110
+ * Whether the button is loading
111
+ */
112
+ loading: {
113
+ type: Boolean,
114
+ default: false
115
+ },
116
+ /**
117
+ * Whether the button is selected (sets aria-selected attribute)
118
+ */
119
+ selected: {
120
+ type: Boolean,
121
+ default: false
122
+ },
123
+ /**
124
+ * Exactly as the `to` prop in `RouterLink`, when used, it renders a link that triggers a navigation on click.
125
+ * See https://router.vuejs.org/api/#RouteLocationRaw
126
+ */
127
+ to: {
128
+ type: [Object, String],
129
+ default: ""
130
+ },
131
+ /**
132
+ * The icon to display on the button
133
+ */
134
+ icon: {
135
+ type: String,
136
+ default: ""
137
+ },
138
+ iconRight: {
139
+ type: String,
140
+ default: ""
141
+ }
142
+ },
143
+ setup(__props) {
144
+ const props = __props;
145
+ const classes = computed(() => {
146
+ const { button, content, loader, icon } = btn({
147
+ type: props.type,
148
+ size: props.size
149
+ });
150
+ return { button: button(), content: content(), loader: loader(), icon: icon() };
151
+ });
152
+ const loaderSize = computed(() => {
153
+ return Number(`${LOADER_SIZES[props.size]}`);
154
+ });
155
+ return (_ctx, _cache) => {
156
+ return typeof __props.to === "string" && unref(isExternalLink)(__props.to) ? (openBlock(), createElementBlock("a", mergeProps({ key: 0 }, _ctx.$attrs, {
157
+ href: unref(sanitizeUrl)(__props.to),
158
+ target: "_blank",
159
+ class: classes.value.button,
160
+ disabled: !!_ctx.$attrs.disabled ? true : null,
161
+ "aria-disabled": !!_ctx.$attrs.disabled
162
+ }), [
163
+ renderSlot(_ctx.$slots, "default")
164
+ ], 16, _hoisted_1)) : (openBlock(), createBlock(resolveDynamicComponent(__props.to ? "RouterLink" : "button"), mergeProps({
165
+ key: 1,
166
+ type: __props.to ? null : __props.nativeType,
167
+ to: __props.to ? __props.to : null,
168
+ "aria-selected": __props.selected,
169
+ class: classes.value.button
170
+ }, _ctx.$attrs, {
171
+ disabled: !!_ctx.$attrs.disabled || __props.loading ? true : null,
172
+ "aria-disabled": _ctx.$attrs.disabled
173
+ }), {
174
+ default: withCtx(() => [
175
+ createElementVNode("div", {
176
+ class: normalizeClass([{ invisible: __props.loading }, classes.value.content])
177
+ }, [
178
+ __props.icon ? (openBlock(), createBlock(_sfc_main$1, {
179
+ key: 0,
180
+ icon: __props.icon,
181
+ class: normalizeClass(classes.value.icon)
182
+ }, null, 8, ["icon", "class"])) : createCommentVNode("", true),
183
+ createElementVNode("span", _hoisted_2, [
184
+ renderSlot(_ctx.$slots, "default")
185
+ ]),
186
+ __props.iconRight ? (openBlock(), createBlock(_sfc_main$1, {
187
+ key: 1,
188
+ icon: __props.iconRight,
189
+ class: normalizeClass(classes.value.icon)
190
+ }, null, 8, ["icon", "class"])) : createCommentVNode("", true)
191
+ ], 2),
192
+ __props.loading ? (openBlock(), createBlock(_sfc_main$2, {
193
+ key: 0,
194
+ size: loaderSize.value,
195
+ class: normalizeClass(classes.value.loader)
196
+ }, null, 8, ["size", "class"])) : createCommentVNode("", true)
197
+ ]),
198
+ _: 3
199
+ }, 16, ["type", "to", "aria-selected", "class", "disabled", "aria-disabled"]));
200
+ };
201
+ }
202
+ });
203
+ export {
204
+ _sfc_main as _
205
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, resolveDirective, createElementBlock, openBlock, normalizeClass, Fragment, renderList, withDirectives, createVNode, withCtx, renderSlot, createTextVNode, toDisplayString } from "vue";
2
- import PBtn from "../p-btn.js";
2
+ import { _ as _sfc_main$1 } from "./p-btn.js";
3
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  ...{
5
5
  name: "PSelectBtn"
@@ -62,13 +62,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
62
62
  }, [
63
63
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
64
64
  return withDirectives((openBlock(), createElementBlock("div", {
65
- key: item[_ctx.itemValue],
65
+ key: String(item[_ctx.itemValue]),
66
66
  class: normalizeClass(["inline-flex", { "*:px-0 *:py-0": _ctx.noPadding, grow: _ctx.grow }])
67
67
  }, [
68
- createVNode(PBtn, {
68
+ createVNode(_sfc_main$1, {
69
69
  size: _ctx.size,
70
70
  type: "secondary-outline-blue",
71
71
  disabled: item.disabled,
72
+ icon: String(item.icon),
72
73
  class: normalizeClass({
73
74
  "rounded-none": index !== 0 && index !== _ctx.items.length - 1 && _ctx.items.length > 1,
74
75
  "rounded-br-none rounded-tr-none": index === 0 && _ctx.items.length > 1,
@@ -88,7 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
89
  ])
89
90
  ]),
90
91
  _: 2
91
- }, 1032, ["size", "disabled", "class", "selected", "onClick"])
92
+ }, 1032, ["size", "disabled", "icon", "class", "selected", "onClick"])
92
93
  ], 2)), [
93
94
  [_directive_tooltip, { content: tooltipText(item) }]
94
95
  ]);
package/dist/es/index.js CHANGED
@@ -1,38 +1,37 @@
1
1
  import { _ } from "./chunks/p-action-bar.js";
2
2
  import { default as default2 } from "./p-alert.js";
3
3
  import { default as default3 } from "./p-avatar.js";
4
- import { default as default4 } from "./p-btn.js";
5
- import { _ as _2 } from "./chunks/p-card.js";
6
- import { default as default5 } from "./p-checkbox.js";
7
- import { default as default6 } from "./p-chips.js";
8
- import { default as default7 } from "./p-close-btn.js";
9
- import { _ as _3 } from "./chunks/p-date-picker.js";
10
- import { default as default8 } from "./p-drawer.js";
11
- import { default as default9 } from "./p-dropdown.js";
12
- import { _ as _imports_0$2 } from "./chunks/p-dropdown-select.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";
12
+ import { _ as _imports_0$1 } from "./chunks/p-dropdown-select.js";
13
13
  import { a } from "./chunks/p-dropdown-select.js";
14
- import { defineComponent, shallowRef, ref, computed, onMounted, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, withDirectives, unref, toDisplayString, withModifiers, createTextVNode, Fragment, renderList, vShow, useAttrs, resolveDirective, normalizeStyle, createVNode, isRef, renderSlot, provide, onBeforeUnmount, watch, mergeProps, toHandlers } from "vue";
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";
15
15
  import { formatBytes, getFileExtension } from "./p-file-upload.js";
16
+ import { _ as _sfc_main$4 } from "./chunks/p-icon.js";
16
17
  import { useInputClasses } from "./useInputClasses.js";
17
18
  import { uniq, kebabCase } from "lodash-es";
18
19
  import { useToast } from "vue-toastification";
19
- import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
20
20
  import { P_ICON_ALIASES } from "./p-icon.js";
21
- import { _ as _4 } from "./chunks/p-icon.js";
22
21
  import { _ as _5 } from "./chunks/p-info-icon.js";
23
22
  import { _ as _6 } from "./chunks/p-inline-date-picker.js";
24
- import { default as default10 } from "./p-input.js";
25
- import { default as default11 } from "./p-input-number.js";
23
+ import { default as default9 } from "./p-input.js";
24
+ import { default as default10 } from "./p-input-number.js";
26
25
  import { _ as _7 } from "./chunks/p-input-percent.js";
27
26
  import PInputSearch from "./p-input-search.js";
28
27
  import { _ as _8 } from "./chunks/p-link.js";
29
- import { default as default12 } from "./p-loading.js";
28
+ import { default as default11 } from "./p-loading.js";
30
29
  import { usePLoading } from "./usePLoading.js";
31
- import { default as default13 } from "./p-modal.js";
30
+ import { default as default12 } from "./p-modal.js";
32
31
  import { usePModal } from "./usePModal.js";
33
32
  import { _ as _9 } from "./chunks/p-pagination.js";
34
33
  import { _ as _10 } from "./chunks/p-pagination-info.js";
35
- import { default as default14 } from "./p-progress-bar.js";
34
+ import { default as default13 } from "./p-progress-bar.js";
36
35
  import { _ as _11 } from "./chunks/p-ring-loader.js";
37
36
  import { _ as _12 } from "./chunks/p-select.js";
38
37
  import { _ as _13 } from "./chunks/p-select-btn.js";
@@ -40,25 +39,26 @@ import { SIZES } from "./p-select-list.js";
40
39
  import { useSelectList } from "./useSelectList.js";
41
40
  import { toString } from "./string.js";
42
41
  import { splitStringForHighlight } from "./text.js";
43
- import { default as default15 } from "./p-select-pill.js";
44
- import { default as default16 } from "./p-skeleton-loader.js";
42
+ import { default as default14 } from "./p-select-pill.js";
43
+ import { default as default15 } from "./p-skeleton-loader.js";
45
44
  import { colsInjectionKey, isFirstColFixedInjectionKey, isLastColFixedInjectionKey, isColsResizableInjectionKey } from "./p-table.js";
46
45
  import { MIN_WIDTH_COL_RESIZE } from "./p-table.js";
47
46
  import { usePTableColResize } from "./usePTableColResize.js";
48
47
  import PTableHeaderCell from "./p-table-header-cell.js";
48
+ import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
49
49
  import { usePTableRowVirtualizer } from "./usePTableRowVirtualizer.js";
50
- import { default as default17 } from "./p-table-filter-icon.js";
50
+ import { default as default16 } from "./p-table-filter-icon.js";
51
51
  import { _ as _14 } from "./chunks/p-table-loader.js";
52
52
  import { SORTING_TYPES } from "./p-table-sort.js";
53
- import { default as default18 } from "./p-table-td.js";
53
+ import { default as default17 } from "./p-table-td.js";
54
54
  import { _ as _15 } from "./chunks/p-tabs.js";
55
- import { default as default19 } from "./p-textarea.js";
56
- import { default as default20 } from "./p-toggle.js";
55
+ import { default as default18 } from "./p-textarea.js";
56
+ import { default as default19 } 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 default21 } from "./inputClassesMixin.js";
61
+ import { default as default20 } from "./inputClassesMixin.js";
62
62
  import { setupListKeyboardNavigation } from "./listKeyboardNavigation.js";
63
63
  import { toNumberOrNull } from "./number.js";
64
64
  import { isObject } from "./object.js";
@@ -66,8 +66,6 @@ import { createPagingRange } from "./pagination.js";
66
66
  import { sanitizeUrl } from "./sanitization.js";
67
67
  import { getColor, getColorDeep, getScreen } from "./tailwind.js";
68
68
  import { M, N, f, i, c, x } from "./chunks/index.js";
69
- const _imports_0$1 = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8335%206.25016L10.0002%202.0835L14.1668%206.25016'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3cpath%20d='M10%202.0835V13.7502'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3cpath%20d='M2.91675%2015V18.3333H17.0834V15'%20stroke='%23767189'%20stroke-width='1.25'%20/%3e%3c/svg%3e";
70
- const _imports_1$1 = "data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M33%2012H14V44H42V21L33%2012Z'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3cpath%20d='M9%2036H6V4H25L28%207'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3cpath%20d='M37%2030H19M28%2021V39'%20stroke='%231A123B'%20stroke-width='3'%20/%3e%3c/svg%3e";
71
69
  const _hoisted_1$3 = ["data-has-error"];
72
70
  const _hoisted_2$3 = {
73
71
  key: 0,
@@ -259,19 +257,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
259
257
  }, [
260
258
  !maxFilesReached.value ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
261
259
  !isDraggingOver.value ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
262
- _cache[4] || (_cache[4] = createElementVNode("img", {
263
- src: _imports_0$1,
264
- class: "h-8 w-8"
265
- }, null, -1)),
260
+ createVNode(_sfc_main$4, {
261
+ icon: "upload",
262
+ width: "32",
263
+ class: "text-p-gray-50"
264
+ }),
266
265
  createElementVNode("div", _hoisted_4$3, [
267
266
  _cache[3] || (_cache[3] = createTextVNode(" Drag or ")),
268
267
  createElementVNode("span", _hoisted_5$3, "select " + toDisplayString(fileWord.value), 1)
269
268
  ])
270
269
  ])) : (openBlock(), createElementBlock("div", _hoisted_6$3, [
271
- _cache[5] || (_cache[5] = createElementVNode("img", {
272
- src: _imports_1$1,
273
- class: "h-8 w-8"
274
- }, null, -1)),
270
+ createVNode(_sfc_main$4, {
271
+ icon: "tdesign:drag-drop",
272
+ width: "32",
273
+ class: "text-primary"
274
+ }),
275
275
  createElementVNode("div", _hoisted_7, "Drop " + toDisplayString(fileWord.value), 1)
276
276
  ])),
277
277
  createElementVNode("input", {
@@ -304,9 +304,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
304
304
  title: file.name
305
305
  }, toDisplayString(file.name), 9, _hoisted_10),
306
306
  createElementVNode("button", {
307
- class: "bg-file-upload-x-icon h-4 w-4 shrink-0 cursor-pointer",
307
+ class: "h-5 shrink-0 cursor-pointer overflow-hidden",
308
308
  onClick: withModifiers(($event) => removeFile(index), ["stop"])
309
- }, null, 8, _hoisted_11)
309
+ }, [
310
+ createVNode(_sfc_main$4, {
311
+ icon: "weui:close2-outlined",
312
+ width: "20",
313
+ class: "text-p-gray-60 hover:text-on-error"
314
+ })
315
+ ], 8, _hoisted_11)
310
316
  ], 2);
311
317
  }), 128))
312
318
  ])
@@ -321,7 +327,6 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
321
327
  };
322
328
  }
323
329
  });
324
- const pFileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-216025be"]]);
325
330
  const _hoisted_1$2 = ["data-has-error"];
326
331
  const _hoisted_2$2 = { class: "text-p-purple-60" };
327
332
  const _hoisted_3$2 = { class: "flex flex-row" };
@@ -330,7 +335,7 @@ const _hoisted_5$2 = ["title"];
330
335
  const _hoisted_6$2 = {
331
336
  key: 0,
332
337
  class: "ml-auto fill-p-purple-60 pl-2",
333
- src: _imports_0$2
338
+ src: _imports_0$1
334
339
  };
335
340
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
336
341
  ...{
@@ -960,44 +965,44 @@ export {
960
965
  _ as PActionBar,
961
966
  default2 as PAlert,
962
967
  default3 as PAvatar,
963
- default4 as PBtn,
964
- _2 as PCard,
965
- default5 as PCheckbox,
966
- default6 as PChips,
967
- default7 as PCloseBtn,
968
- _3 as PDatePicker,
969
- default8 as PDrawer,
970
- default9 as PDropdown,
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,
971
976
  a as PDropdownSelect,
972
- pFileUpload as PFileUpload,
973
- default17 as PFilterIcon,
974
- _4 as PIcon,
977
+ _sfc_main$3 as PFileUpload,
978
+ default16 as PFilterIcon,
979
+ _sfc_main$4 as PIcon,
975
980
  _5 as PInfoIcon,
976
981
  _6 as PInlineDatePicker,
977
- default10 as PInput,
978
- default11 as PInputNumber,
982
+ default9 as PInput,
983
+ default10 as PInputNumber,
979
984
  _7 as PInputPercent,
980
985
  PInputSearch,
981
986
  _8 as PLink,
982
- default12 as PLoading,
983
- default13 as PModal,
987
+ default11 as PLoading,
988
+ default12 as PModal,
984
989
  _9 as PPagination,
985
990
  _10 as PPaginationInfo,
986
- default14 as PProgressBar,
991
+ default13 as PProgressBar,
987
992
  _11 as PRingLoader,
988
993
  _12 as PSelect,
989
994
  _13 as PSelectBtn,
990
995
  _sfc_main$2 as PSelectList,
991
- default15 as PSelectPill,
992
- default16 as PSkeletonLoader,
996
+ default14 as PSelectPill,
997
+ default15 as PSkeletonLoader,
993
998
  pTable as PTable,
994
999
  PTableHeaderCell,
995
1000
  _14 as PTableLoader,
996
1001
  pTableSort as PTableSort,
997
- default18 as PTableTd,
1002
+ default17 as PTableTd,
998
1003
  _15 as PTabs,
999
- default19 as PTextarea,
1000
- default20 as PToggle,
1004
+ default18 as PTextarea,
1005
+ default19 as PToggle,
1001
1006
  P_ICON_ALIASES,
1002
1007
  S as SIZES,
1003
1008
  SORTING_TYPES,
@@ -1011,7 +1016,7 @@ export {
1011
1016
  getColorDeep,
1012
1017
  getNextActiveElement,
1013
1018
  getScreen,
1014
- default21 as inputClassesMixin,
1019
+ default20 as inputClassesMixin,
1015
1020
  isColsResizableInjectionKey,
1016
1021
  isElement,
1017
1022
  isFirstColFixedInjectionKey,
@@ -37,7 +37,9 @@ const inputClasses = ce({
37
37
  }
38
38
  },
39
39
  rounded: {
40
- true: "rounded-full"
40
+ true: {
41
+ input: "rounded-full"
42
+ }
41
43
  }
42
44
  },
43
45
  compoundVariants: [
@@ -109,13 +111,13 @@ const selectClasses = ce({
109
111
  variants: {
110
112
  size: {
111
113
  sm: {
112
- input: "bg-[right_0.675rem_center] pr-8"
114
+ input: "bg-[position:right_0.675rem_center] pr-8"
113
115
  },
114
116
  md: {
115
- input: "bg-[right_1rem_center] pr-10"
117
+ input: "bg-[position:right_1rem_center] pr-10"
116
118
  },
117
119
  lg: {
118
- input: "bg-[right_1.25rem_center] pr-12"
120
+ input: "bg-[position:right_1.25rem_center] pr-12"
119
121
  }
120
122
  }
121
123
  }