@povio/ui 3.2.2-rc.6 → 3.2.2

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