@povio/ui 3.2.2-rc.6 → 3.2.2-rc.7

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 (28) hide show
  1. package/dist/components/inputs/DateTime/shared/DateField.js +80 -83
  2. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  3. package/dist/components/inputs/File/FileUpload.js +6 -1
  4. package/dist/components/inputs/File/fileUpload.types.d.ts +6 -0
  5. package/dist/components/inputs/File/shared/FileCard.d.ts +2 -2
  6. package/dist/components/inputs/File/shared/FileCard.js +46 -40
  7. package/dist/components/inputs/File/shared/FileCardList.d.ts +2 -2
  8. package/dist/components/inputs/File/shared/FileCardList.js +27 -21
  9. package/dist/components/inputs/File/shared/FileUploadContent.d.ts +1 -1
  10. package/dist/components/inputs/File/shared/FileUploadContent.js +98 -84
  11. package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +2 -2
  12. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +157 -121
  13. package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +2 -2
  14. package/dist/components/inputs/File/shared/FileUploadContentError.js +189 -153
  15. package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +2 -2
  16. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +181 -145
  17. package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +2 -2
  18. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +209 -168
  19. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +4 -2
  20. package/dist/components/inputs/Selection/Select/QuerySelect.js +42 -38
  21. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
  22. package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
  23. package/dist/components/inputs/Selection/shared/select.context.js +2 -2
  24. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +4 -1
  25. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +91 -64
  26. package/dist/config/uiConfig.context.d.ts +4 -0
  27. package/dist/config/uiConfig.context.js +10 -2
  28. package/package.json +1 -1
@@ -13,139 +13,168 @@ import { FileTrigger } from "react-aria-components";
13
13
  import { useTranslation } from "react-i18next";
14
14
  //#region src/components/inputs/File/shared/FileUploadContentFilled.tsx
15
15
  var FileUploadContentFilled = (t0) => {
16
- const $ = c(50);
17
- const { variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon: t1, singleFile, onRemove } = t0;
16
+ const $ = c(63);
17
+ const { variant, as, isDisabled, state, browseText, fileTriggerProps, removeWithIcon: t1, singleFile, onRemove, browseButtonProps } = t0;
18
18
  const removeWithIcon = t1 === void 0 ? false : t1;
19
19
  const { t } = useTranslation("ui");
20
20
  let t2;
21
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
22
- t2 = clsx("flex w-full flex-fill flex-col items-start");
23
- $[0] = t2;
24
- } else t2 = $[0];
25
- const t3 = variant === "horizontal";
26
- const t4 = variant === "vertical";
27
- const t5 = variant === "vertical" && as === "button";
28
- const t6 = variant === "vertical" && as === "link";
29
- let t7;
30
- if ($[1] !== t3 || $[2] !== t4 || $[3] !== t5 || $[4] !== t6) {
31
- t7 = clsx("flex w-full items-center", {
32
- "flex-row gap-file-upload-content-gap-left-to-right-content": t3,
33
- "flex-col": t4,
34
- "gap-file-upload-content-gap-content-to-button": t5,
35
- "gap-file-upload-content-gap-text-to-text": t6
36
- });
37
- $[1] = t3;
38
- $[2] = t4;
39
- $[3] = t5;
40
- $[4] = t6;
41
- $[5] = t7;
42
- } else t7 = $[5];
21
+ if ($[0] !== browseButtonProps) {
22
+ t2 = browseButtonProps ?? {};
23
+ $[0] = browseButtonProps;
24
+ $[1] = t2;
25
+ } else t2 = $[1];
26
+ let browseButtonClassName;
27
+ let browseButtonRestProps;
28
+ let t3;
29
+ let t4;
30
+ let t5;
31
+ if ($[2] !== t2) {
32
+ ({className: browseButtonClassName, size: t3, variant: t4, width: t5, ...browseButtonRestProps} = t2);
33
+ $[2] = t2;
34
+ $[3] = browseButtonClassName;
35
+ $[4] = browseButtonRestProps;
36
+ $[5] = t3;
37
+ $[6] = t4;
38
+ $[7] = t5;
39
+ } else {
40
+ browseButtonClassName = $[3];
41
+ browseButtonRestProps = $[4];
42
+ t3 = $[5];
43
+ t4 = $[6];
44
+ t5 = $[7];
45
+ }
46
+ const browseButtonSize = t3 === void 0 ? "xs" : t3;
47
+ const browseButtonVariant = t4 === void 0 ? "outlined" : t4;
48
+ const browseButtonWidth = t5 === void 0 ? "hug" : t5;
49
+ let t6;
50
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
51
+ t6 = clsx("flex w-full flex-fill flex-col items-start");
52
+ $[8] = t6;
53
+ } else t6 = $[8];
54
+ const t7 = variant === "horizontal";
43
55
  const t8 = variant === "vertical";
44
- const t9 = variant === "horizontal";
45
- let t10;
46
- if ($[6] !== isDisabled || $[7] !== t8 || $[8] !== t9) {
47
- t10 = clsx("flex min-w-0 max-w-full grow items-center gap-file-upload-content-gap-icon-to-content", {
56
+ const t9 = variant === "vertical" && as === "button";
57
+ const t10 = variant === "vertical" && as === "link";
58
+ let t11;
59
+ if ($[9] !== t10 || $[10] !== t7 || $[11] !== t8 || $[12] !== t9) {
60
+ t11 = clsx("flex w-full items-center", {
61
+ "flex-row gap-file-upload-content-gap-left-to-right-content": t7,
48
62
  "flex-col": t8,
49
- "flex-row": t9,
50
- "opacity-50": isDisabled
63
+ "gap-file-upload-content-gap-content-to-button": t9,
64
+ "gap-file-upload-content-gap-text-to-text": t10
51
65
  });
52
- $[6] = isDisabled;
53
- $[7] = t8;
54
- $[8] = t9;
55
66
  $[9] = t10;
56
- } else t10 = $[9];
57
- let t11;
58
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
59
- t11 = /* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-6 w-6 text-text-default-1" });
60
- $[10] = t11;
61
- } else t11 = $[10];
67
+ $[10] = t7;
68
+ $[11] = t8;
69
+ $[12] = t9;
70
+ $[13] = t11;
71
+ } else t11 = $[13];
62
72
  const t12 = variant === "vertical";
63
73
  const t13 = variant === "horizontal";
64
74
  let t14;
65
- if ($[11] !== t12 || $[12] !== t13) {
66
- t14 = clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
67
- "max-w-full items-center": t12,
68
- "max-w-[calc(100%-32px)]": t13
75
+ if ($[14] !== isDisabled || $[15] !== t12 || $[16] !== t13) {
76
+ t14 = clsx("flex min-w-0 max-w-full grow items-center gap-file-upload-content-gap-icon-to-content", {
77
+ "flex-col": t12,
78
+ "flex-row": t13,
79
+ "opacity-50": isDisabled
80
+ });
81
+ $[14] = isDisabled;
82
+ $[15] = t12;
83
+ $[16] = t13;
84
+ $[17] = t14;
85
+ } else t14 = $[17];
86
+ let t15;
87
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
88
+ t15 = /* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-6 w-6 text-text-default-1" });
89
+ $[18] = t15;
90
+ } else t15 = $[18];
91
+ const t16 = variant === "vertical";
92
+ const t17 = variant === "horizontal";
93
+ let t18;
94
+ if ($[19] !== t16 || $[20] !== t17) {
95
+ t18 = clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
96
+ "max-w-full items-center": t16,
97
+ "max-w-[calc(100%-32px)]": t17
69
98
  });
70
- $[11] = t12;
71
- $[12] = t13;
72
- $[13] = t14;
73
- } else t14 = $[13];
74
- const t15 = state.file?.name ?? state.displayName ?? "";
75
- let t16;
76
- if ($[14] !== t15) {
77
- t16 = /* @__PURE__ */ jsx(Typography, {
99
+ $[19] = t16;
100
+ $[20] = t17;
101
+ $[21] = t18;
102
+ } else t18 = $[21];
103
+ const t19 = state.file?.name ?? state.displayName ?? "";
104
+ let t20;
105
+ if ($[22] !== t19) {
106
+ t20 = /* @__PURE__ */ jsx(Typography, {
78
107
  variant: "prominent-1",
79
108
  size: "label-1",
80
109
  as: "span",
81
110
  className: "self-stretch truncate text-center text-text-default-1",
82
- children: t15
111
+ children: t19
83
112
  });
84
- $[14] = t15;
85
- $[15] = t16;
86
- } else t16 = $[15];
87
- const t17 = singleFile ? "label-2" : "label-3";
88
- let t18;
89
- if ($[16] !== state) {
90
- t18 = FileUtils.getFileDisplaySize(state);
91
- $[16] = state;
92
- $[17] = t18;
93
- } else t18 = $[17];
94
- let t19;
95
- if ($[18] !== t17 || $[19] !== t18) {
96
- t19 = /* @__PURE__ */ jsx(Typography, {
113
+ $[22] = t19;
114
+ $[23] = t20;
115
+ } else t20 = $[23];
116
+ const t21 = singleFile ? "label-2" : "label-3";
117
+ let t22;
118
+ if ($[24] !== state) {
119
+ t22 = FileUtils.getFileDisplaySize(state);
120
+ $[24] = state;
121
+ $[25] = t22;
122
+ } else t22 = $[25];
123
+ let t23;
124
+ if ($[26] !== t21 || $[27] !== t22) {
125
+ t23 = /* @__PURE__ */ jsx(Typography, {
97
126
  variant: "default",
98
- size: t17,
127
+ size: t21,
99
128
  as: "span",
100
129
  className: "text-text-default-2",
101
- children: t18
130
+ children: t22
102
131
  });
103
- $[18] = t17;
104
- $[19] = t18;
105
- $[20] = t19;
106
- } else t19 = $[20];
107
- let t20;
108
- if ($[21] !== t14 || $[22] !== t16 || $[23] !== t19) {
109
- t20 = /* @__PURE__ */ jsxs("div", {
110
- className: t14,
111
- children: [t16, t19]
132
+ $[26] = t21;
133
+ $[27] = t22;
134
+ $[28] = t23;
135
+ } else t23 = $[28];
136
+ let t24;
137
+ if ($[29] !== t18 || $[30] !== t20 || $[31] !== t23) {
138
+ t24 = /* @__PURE__ */ jsxs("div", {
139
+ className: t18,
140
+ children: [t20, t23]
112
141
  });
113
- $[21] = t14;
114
- $[22] = t16;
115
- $[23] = t19;
116
- $[24] = t20;
117
- } else t20 = $[24];
118
- let t21;
119
- if ($[25] !== t10 || $[26] !== t20) {
120
- t21 = /* @__PURE__ */ jsxs("div", {
121
- className: t10,
122
- children: [t11, t20]
142
+ $[29] = t18;
143
+ $[30] = t20;
144
+ $[31] = t23;
145
+ $[32] = t24;
146
+ } else t24 = $[32];
147
+ let t25;
148
+ if ($[33] !== t14 || $[34] !== t24) {
149
+ t25 = /* @__PURE__ */ jsxs("div", {
150
+ className: t14,
151
+ children: [t15, t24]
123
152
  });
124
- $[25] = t10;
125
- $[26] = t20;
126
- $[27] = t21;
127
- } else t21 = $[27];
128
- const t22 = variant === "vertical" && as === "button";
129
- const t23 = as === "link" && variant === "vertical";
130
- const t24 = as === "button" && variant === "vertical";
131
- const t25 = variant === "horizontal";
132
- let t26;
133
- if ($[28] !== t22 || $[29] !== t23 || $[30] !== t24 || $[31] !== t25) {
134
- t26 = clsx("flex flex-none items-center justify-end", {
135
- "flex-col": t22,
136
- "gap-file-upload-content-gap-text-to-text": t23,
137
- "gap-file-upload-content-gap-content-to-button": t24,
138
- "gap-file-upload-content-gap-button-to-button": t25
153
+ $[33] = t14;
154
+ $[34] = t24;
155
+ $[35] = t25;
156
+ } else t25 = $[35];
157
+ const t26 = variant === "vertical" && as === "button";
158
+ const t27 = as === "link" && variant === "vertical";
159
+ const t28 = as === "button" && variant === "vertical";
160
+ const t29 = variant === "horizontal";
161
+ let t30;
162
+ if ($[36] !== t26 || $[37] !== t27 || $[38] !== t28 || $[39] !== t29) {
163
+ t30 = clsx("flex flex-none items-center justify-end", {
164
+ "flex-col": t26,
165
+ "gap-file-upload-content-gap-text-to-text": t27,
166
+ "gap-file-upload-content-gap-content-to-button": t28,
167
+ "gap-file-upload-content-gap-button-to-button": t29
139
168
  });
140
- $[28] = t22;
141
- $[29] = t23;
142
- $[30] = t24;
143
- $[31] = t25;
144
- $[32] = t26;
145
- } else t26 = $[32];
146
- let t27;
147
- if ($[33] !== as || $[34] !== browseText || $[35] !== fileTriggerProps || $[36] !== isDisabled || $[37] !== onRemove || $[38] !== removeWithIcon || $[39] !== state.id || $[40] !== t || $[41] !== variant) {
148
- t27 = as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
169
+ $[36] = t26;
170
+ $[37] = t27;
171
+ $[38] = t28;
172
+ $[39] = t29;
173
+ $[40] = t30;
174
+ } else t30 = $[40];
175
+ let t31;
176
+ if ($[41] !== as || $[42] !== browseButtonClassName || $[43] !== browseButtonRestProps || $[44] !== browseButtonSize || $[45] !== browseButtonVariant || $[46] !== browseButtonWidth || $[47] !== browseText || $[48] !== fileTriggerProps || $[49] !== isDisabled || $[50] !== onRemove || $[51] !== removeWithIcon || $[52] !== state.id || $[53] !== t || $[54] !== variant) {
177
+ t31 = as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileTrigger, {
149
178
  ...fileTriggerProps,
150
179
  children: /* @__PURE__ */ jsx(TextButton, {
151
180
  className: clsx("text-interactive-text-primary-idle", { "[&>span>span]:font-medium!": variant === "vertical" }),
@@ -176,10 +205,12 @@ var FileUploadContentFilled = (t0) => {
176
205
  children: [fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, {
177
206
  ...fileTriggerProps,
178
207
  children: /* @__PURE__ */ jsx(Button$1, {
179
- variant: "outlined",
180
- size: "xs",
181
- width: "hug",
208
+ ...browseButtonRestProps,
209
+ variant: browseButtonVariant,
210
+ size: browseButtonSize,
211
+ width: browseButtonWidth,
182
212
  isDisabled,
213
+ className: browseButtonClassName,
183
214
  children: browseText ?? ""
184
215
  })
185
216
  }), removeWithIcon ? /* @__PURE__ */ jsx(InlineIconButton, {
@@ -199,42 +230,47 @@ var FileUploadContentFilled = (t0) => {
199
230
  children: t(_temp3)
200
231
  })]
201
232
  });
202
- $[33] = as;
203
- $[34] = browseText;
204
- $[35] = fileTriggerProps;
205
- $[36] = isDisabled;
206
- $[37] = onRemove;
207
- $[38] = removeWithIcon;
208
- $[39] = state.id;
209
- $[40] = t;
210
- $[41] = variant;
211
- $[42] = t27;
212
- } else t27 = $[42];
213
- let t28;
214
- if ($[43] !== t26 || $[44] !== t27) {
215
- t28 = /* @__PURE__ */ jsx("div", {
216
- className: t26,
217
- children: t27
233
+ $[41] = as;
234
+ $[42] = browseButtonClassName;
235
+ $[43] = browseButtonRestProps;
236
+ $[44] = browseButtonSize;
237
+ $[45] = browseButtonVariant;
238
+ $[46] = browseButtonWidth;
239
+ $[47] = browseText;
240
+ $[48] = fileTriggerProps;
241
+ $[49] = isDisabled;
242
+ $[50] = onRemove;
243
+ $[51] = removeWithIcon;
244
+ $[52] = state.id;
245
+ $[53] = t;
246
+ $[54] = variant;
247
+ $[55] = t31;
248
+ } else t31 = $[55];
249
+ let t32;
250
+ if ($[56] !== t30 || $[57] !== t31) {
251
+ t32 = /* @__PURE__ */ jsx("div", {
252
+ className: t30,
253
+ children: t31
218
254
  });
219
- $[43] = t26;
220
- $[44] = t27;
221
- $[45] = t28;
222
- } else t28 = $[45];
223
- let t29;
224
- if ($[46] !== t21 || $[47] !== t28 || $[48] !== t7) {
225
- t29 = /* @__PURE__ */ jsx("div", {
226
- className: t2,
255
+ $[56] = t30;
256
+ $[57] = t31;
257
+ $[58] = t32;
258
+ } else t32 = $[58];
259
+ let t33;
260
+ if ($[59] !== t11 || $[60] !== t25 || $[61] !== t32) {
261
+ t33 = /* @__PURE__ */ jsx("div", {
262
+ className: t6,
227
263
  children: /* @__PURE__ */ jsxs("div", {
228
- className: t7,
229
- children: [t21, t28]
264
+ className: t11,
265
+ children: [t25, t32]
230
266
  })
231
267
  });
232
- $[46] = t21;
233
- $[47] = t28;
234
- $[48] = t7;
235
- $[49] = t29;
236
- } else t29 = $[49];
237
- return t29;
268
+ $[59] = t11;
269
+ $[60] = t25;
270
+ $[61] = t32;
271
+ $[62] = t33;
272
+ } else t33 = $[62];
273
+ return t33;
238
274
  };
239
275
  function _temp($) {
240
276
  return $.ui.fileUpload.or;
@@ -1,9 +1,9 @@
1
1
  import { FileUploadBaseProps, FileUploadState } from '../fileUpload.types';
2
- type FileUploadContentLoadingProps = Pick<FileUploadBaseProps, "variant" | "as" | "isDisabled" | "emptyText" | "browseText"> & {
2
+ type FileUploadContentLoadingProps = Pick<FileUploadBaseProps, "variant" | "as" | "isDisabled" | "emptyText" | "browseText" | "cancelButtonProps"> & {
3
3
  index: number;
4
4
  state: FileUploadState;
5
5
  singleFile?: boolean;
6
6
  onCancel: (index: number) => void;
7
7
  };
8
- export declare const FileUploadContentLoading: ({ index, variant, as, state, isDisabled, singleFile, onCancel, }: FileUploadContentLoadingProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const FileUploadContentLoading: ({ index, variant, as, state, isDisabled, singleFile, onCancel, cancelButtonProps, }: FileUploadContentLoadingProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};