beez-ui 0.9.0 → 0.9.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.
- package/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/dist/components/account-menu.d.ts +10 -0
- package/dist/components/account-menu.js +139 -118
- package/dist/components/file-upload.d.ts +14 -4
- package/dist/components/file-upload.js +304 -206
- package/dist/components/filter-presets-bar.d.ts +3 -1
- package/dist/components/filter-presets-bar.js +62 -60
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -39,6 +39,8 @@ export interface FilterPresetSaveButtonProps {
|
|
|
39
39
|
/** Saves the current query under the given name. Returns `false` when there is no query to save. */
|
|
40
40
|
onSaveCurrentQuery: (presetName: string) => boolean;
|
|
41
41
|
labels?: Partial<FilterPresetLabels>;
|
|
42
|
+
/** Classes of the icon button, for example to adapt it to the action slot of an input. */
|
|
43
|
+
className?: string;
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Compact icon button that saves the current query as a named preset. Fits the action slot of
|
|
@@ -46,7 +48,7 @@ export interface FilterPresetSaveButtonProps {
|
|
|
46
48
|
* @param props - Save availability, save callback and optional labels.
|
|
47
49
|
* @returns The button and its naming popover.
|
|
48
50
|
*/
|
|
49
|
-
export declare function FilterPresetSaveButton({ canSaveCurrentQuery, onSaveCurrentQuery, labels }: FilterPresetSaveButtonProps): import("react").JSX.Element;
|
|
51
|
+
export declare function FilterPresetSaveButton({ canSaveCurrentQuery, onSaveCurrentQuery, labels, className }: FilterPresetSaveButtonProps): import("react").JSX.Element;
|
|
50
52
|
export interface FilterPresetsBarProps {
|
|
51
53
|
presets: readonly FilterPreset[];
|
|
52
54
|
/** Qualifiers of the filter bar, offered as suggestions while editing a preset query. */
|
|
@@ -74,8 +74,8 @@ const CHIP_ICON_BUTTON_CLASS_NAME = "inline-flex cursor-pointer items-center bor
|
|
|
74
74
|
* @returns The button and its naming popover.
|
|
75
75
|
*/
|
|
76
76
|
export function FilterPresetSaveButton(t0) {
|
|
77
|
-
const $ = _c(
|
|
78
|
-
const { canSaveCurrentQuery, onSaveCurrentQuery, labels } = t0;
|
|
77
|
+
const $ = _c(46);
|
|
78
|
+
const { canSaveCurrentQuery, onSaveCurrentQuery, labels, className } = t0;
|
|
79
79
|
let t1;
|
|
80
80
|
if ($[0] !== labels) {
|
|
81
81
|
t1 = {
|
|
@@ -138,7 +138,7 @@ export function FilterPresetSaveButton(t0) {
|
|
|
138
138
|
t5 = $[8];
|
|
139
139
|
}
|
|
140
140
|
let t6;
|
|
141
|
-
if ($[9] !== resolvedLabels.saveAction || $[
|
|
141
|
+
if ($[9] !== className || $[10] !== resolvedLabels.saveAction || $[11] !== t4) {
|
|
142
142
|
t6 = /* @__PURE__ */ _jsx(TooltipTrigger, {
|
|
143
143
|
asChild: true,
|
|
144
144
|
children: /* @__PURE__ */ _jsx(PopoverTrigger, {
|
|
@@ -146,6 +146,7 @@ export function FilterPresetSaveButton(t0) {
|
|
|
146
146
|
children: /* @__PURE__ */ _jsx(Button, {
|
|
147
147
|
"data-slot": "filter-preset-save-button",
|
|
148
148
|
"aria-label": resolvedLabels.saveAction,
|
|
149
|
+
className,
|
|
149
150
|
disabled: t4,
|
|
150
151
|
size: "icon-xs",
|
|
151
152
|
type: "button",
|
|
@@ -154,56 +155,57 @@ export function FilterPresetSaveButton(t0) {
|
|
|
154
155
|
})
|
|
155
156
|
})
|
|
156
157
|
});
|
|
157
|
-
$[9] =
|
|
158
|
-
$[10] =
|
|
159
|
-
$[11] =
|
|
158
|
+
$[9] = className;
|
|
159
|
+
$[10] = resolvedLabels.saveAction;
|
|
160
|
+
$[11] = t4;
|
|
161
|
+
$[12] = t6;
|
|
160
162
|
} else {
|
|
161
|
-
t6 = $[
|
|
163
|
+
t6 = $[12];
|
|
162
164
|
}
|
|
163
165
|
let t7;
|
|
164
|
-
if ($[
|
|
166
|
+
if ($[13] !== resolvedLabels.saveAction) {
|
|
165
167
|
t7 = /* @__PURE__ */ _jsx(TooltipContent, { children: resolvedLabels.saveAction });
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
+
$[13] = resolvedLabels.saveAction;
|
|
169
|
+
$[14] = t7;
|
|
168
170
|
} else {
|
|
169
|
-
t7 = $[
|
|
171
|
+
t7 = $[14];
|
|
170
172
|
}
|
|
171
173
|
let t8;
|
|
172
|
-
if ($[
|
|
174
|
+
if ($[15] !== t6 || $[16] !== t7) {
|
|
173
175
|
t8 = /* @__PURE__ */ _jsxs(Tooltip, { children: [t6, t7] });
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
176
|
+
$[15] = t6;
|
|
177
|
+
$[16] = t7;
|
|
178
|
+
$[17] = t8;
|
|
177
179
|
} else {
|
|
178
|
-
t8 = $[
|
|
180
|
+
t8 = $[17];
|
|
179
181
|
}
|
|
180
182
|
let t9;
|
|
181
|
-
if ($[
|
|
183
|
+
if ($[18] !== nameInputId || $[19] !== resolvedLabels.presetName) {
|
|
182
184
|
t9 = /* @__PURE__ */ _jsx(Label, {
|
|
183
185
|
htmlFor: nameInputId,
|
|
184
186
|
children: resolvedLabels.presetName
|
|
185
187
|
});
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
188
|
+
$[18] = nameInputId;
|
|
189
|
+
$[19] = resolvedLabels.presetName;
|
|
190
|
+
$[20] = t9;
|
|
189
191
|
} else {
|
|
190
|
-
t9 = $[
|
|
192
|
+
t9 = $[20];
|
|
191
193
|
}
|
|
192
194
|
let t10;
|
|
193
|
-
if ($[
|
|
195
|
+
if ($[21] !== error) {
|
|
194
196
|
t10 = (event) => {
|
|
195
197
|
setNameDraft(event.target.value);
|
|
196
198
|
if (error) {
|
|
197
199
|
setError(null);
|
|
198
200
|
}
|
|
199
201
|
};
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
+
$[21] = error;
|
|
203
|
+
$[22] = t10;
|
|
202
204
|
} else {
|
|
203
|
-
t10 = $[
|
|
205
|
+
t10 = $[22];
|
|
204
206
|
}
|
|
205
207
|
let t11;
|
|
206
|
-
if ($[
|
|
208
|
+
if ($[23] !== handleConfirmSave) {
|
|
207
209
|
t11 = (event_0) => {
|
|
208
210
|
if (event_0.key !== ENTER_KEY) {
|
|
209
211
|
return;
|
|
@@ -211,13 +213,13 @@ export function FilterPresetSaveButton(t0) {
|
|
|
211
213
|
event_0.preventDefault();
|
|
212
214
|
handleConfirmSave();
|
|
213
215
|
};
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
+
$[23] = handleConfirmSave;
|
|
217
|
+
$[24] = t11;
|
|
216
218
|
} else {
|
|
217
|
-
t11 = $[
|
|
219
|
+
t11 = $[24];
|
|
218
220
|
}
|
|
219
221
|
let t12;
|
|
220
|
-
if ($[
|
|
222
|
+
if ($[25] !== nameDraft || $[26] !== nameInputId || $[27] !== resolvedLabels.presetNamePlaceholder || $[28] !== t10 || $[29] !== t11) {
|
|
221
223
|
t12 = /* @__PURE__ */ _jsx(Input, {
|
|
222
224
|
id: nameInputId,
|
|
223
225
|
onChange: t10,
|
|
@@ -226,29 +228,29 @@ export function FilterPresetSaveButton(t0) {
|
|
|
226
228
|
type: "text",
|
|
227
229
|
value: nameDraft
|
|
228
230
|
});
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
231
|
+
$[25] = nameDraft;
|
|
232
|
+
$[26] = nameInputId;
|
|
233
|
+
$[27] = resolvedLabels.presetNamePlaceholder;
|
|
234
|
+
$[28] = t10;
|
|
235
|
+
$[29] = t11;
|
|
236
|
+
$[30] = t12;
|
|
235
237
|
} else {
|
|
236
|
-
t12 = $[
|
|
238
|
+
t12 = $[30];
|
|
237
239
|
}
|
|
238
240
|
let t13;
|
|
239
|
-
if ($[
|
|
241
|
+
if ($[31] !== error) {
|
|
240
242
|
t13 = error ? /* @__PURE__ */ _jsx("p", {
|
|
241
243
|
className: ERROR_CLASS_NAME,
|
|
242
244
|
role: "alert",
|
|
243
245
|
children: error
|
|
244
246
|
}) : null;
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
+
$[31] = error;
|
|
248
|
+
$[32] = t13;
|
|
247
249
|
} else {
|
|
248
|
-
t13 = $[
|
|
250
|
+
t13 = $[32];
|
|
249
251
|
}
|
|
250
252
|
let t14;
|
|
251
|
-
if ($[
|
|
253
|
+
if ($[33] !== handleConfirmSave || $[34] !== resolvedLabels.saveConfirm || $[35] !== resolvedLabels.saveConfirmAriaLabel) {
|
|
252
254
|
t14 = /* @__PURE__ */ _jsx(Button, {
|
|
253
255
|
"aria-label": resolvedLabels.saveConfirmAriaLabel,
|
|
254
256
|
onClick: handleConfirmSave,
|
|
@@ -256,15 +258,15 @@ export function FilterPresetSaveButton(t0) {
|
|
|
256
258
|
type: "button",
|
|
257
259
|
children: resolvedLabels.saveConfirm
|
|
258
260
|
});
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
261
|
+
$[33] = handleConfirmSave;
|
|
262
|
+
$[34] = resolvedLabels.saveConfirm;
|
|
263
|
+
$[35] = resolvedLabels.saveConfirmAriaLabel;
|
|
264
|
+
$[36] = t14;
|
|
263
265
|
} else {
|
|
264
|
-
t14 = $[
|
|
266
|
+
t14 = $[36];
|
|
265
267
|
}
|
|
266
268
|
let t15;
|
|
267
|
-
if ($[
|
|
269
|
+
if ($[37] !== t12 || $[38] !== t13 || $[39] !== t14 || $[40] !== t9) {
|
|
268
270
|
t15 = /* @__PURE__ */ _jsxs(PopoverContent, {
|
|
269
271
|
align: "end",
|
|
270
272
|
className: FORM_POPOVER_CLASS_NAME,
|
|
@@ -275,27 +277,27 @@ export function FilterPresetSaveButton(t0) {
|
|
|
275
277
|
t14
|
|
276
278
|
]
|
|
277
279
|
});
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
280
|
+
$[37] = t12;
|
|
281
|
+
$[38] = t13;
|
|
282
|
+
$[39] = t14;
|
|
283
|
+
$[40] = t9;
|
|
284
|
+
$[41] = t15;
|
|
283
285
|
} else {
|
|
284
|
-
t15 = $[
|
|
286
|
+
t15 = $[41];
|
|
285
287
|
}
|
|
286
288
|
let t16;
|
|
287
|
-
if ($[
|
|
289
|
+
if ($[42] !== isOpen || $[43] !== t15 || $[44] !== t8) {
|
|
288
290
|
t16 = /* @__PURE__ */ _jsxs(Popover, {
|
|
289
291
|
onOpenChange: handleOpenChange,
|
|
290
292
|
open: isOpen,
|
|
291
293
|
children: [t8, t15]
|
|
292
294
|
});
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
295
|
+
$[42] = isOpen;
|
|
296
|
+
$[43] = t15;
|
|
297
|
+
$[44] = t8;
|
|
298
|
+
$[45] = t16;
|
|
297
299
|
} else {
|
|
298
|
-
t16 = $[
|
|
300
|
+
t16 = $[45];
|
|
299
301
|
}
|
|
300
302
|
return t16;
|
|
301
303
|
}
|