@igne-agency/react-web-ui 0.4.0 → 0.6.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.
- package/dist/base.css +3 -0
- package/dist/components/accordion/accordion.css +21 -21
- package/dist/components/accordion/accordion.d.ts +17 -4
- package/dist/components/accordion/accordion.js +83 -36
- package/dist/components/accordion/accordion.module.js +6 -6
- package/dist/components/attachment-tile/attachment-preview.d.ts +56 -13
- package/dist/components/attachment-tile/attachment-preview.js +388 -119
- package/dist/components/attachment-tile/attachment-tile.css +31 -25
- package/dist/components/attachment-tile/attachment-tile.d.ts +32 -10
- package/dist/components/attachment-tile/attachment-tile.js +160 -43
- package/dist/components/attachment-tile/attachment-tile.module.js +8 -8
- package/dist/components/attachment-tile/index.d.ts +1 -1
- package/dist/components/avatar/avatar.css +9 -9
- package/dist/components/avatar/avatar.d.ts +50 -5
- package/dist/components/avatar/avatar.js +178 -64
- package/dist/components/avatar/avatar.module.js +3 -3
- package/dist/components/avatar-group/avatar-group-context.d.ts +2 -4
- package/dist/components/avatar-group/avatar-group-context.js +2 -2
- package/dist/components/avatar-group/avatar-group.css +26 -20
- package/dist/components/avatar-group/avatar-group.d.ts +85 -27
- package/dist/components/avatar-group/avatar-group.js +400 -246
- package/dist/components/avatar-group/avatar-group.module.js +8 -8
- package/dist/components/breadcrumbs/breadcrumbs.css +12 -12
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +69 -23
- package/dist/components/breadcrumbs/breadcrumbs.js +299 -248
- package/dist/components/breadcrumbs/breadcrumbs.module.js +8 -8
- package/dist/components/button/button.css +29 -31
- package/dist/components/button/button.d.ts +20 -16
- package/dist/components/button/button.js +140 -145
- package/dist/components/button/button.module.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/checkbox-field/checkbox-field.js +63 -49
- package/dist/components/checkbox-field/checkbox.css +105 -56
- package/dist/components/checkbox-field/checkbox.d.ts +3 -2
- package/dist/components/checkbox-field/checkbox.js +12 -9
- package/dist/components/checkbox-field/checkbox.module.js +4 -4
- package/dist/components/checkbox-group-field/checkbox-group-field.js +78 -72
- package/dist/components/checkbox-group-field/checkbox-group.css +14 -10
- package/dist/components/checkbox-group-field/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.js +2 -2
- package/dist/components/checkbox-group-field/checkbox-group.module.js +2 -2
- package/dist/components/collapsible/collapsible.css +20 -20
- package/dist/components/collapsible/collapsible.d.ts +17 -4
- package/dist/components/collapsible/collapsible.js +83 -36
- package/dist/components/collapsible/collapsible.module.js +5 -5
- package/dist/components/combobox-field/combobox-field.js +206 -158
- package/dist/components/combobox-field/combobox.css +492 -277
- package/dist/components/combobox-field/combobox.d.ts +148 -39
- package/dist/components/combobox-field/combobox.js +506 -206
- package/dist/components/combobox-field/combobox.module.js +21 -21
- package/dist/components/combobox-field/value-state-view.css +5 -5
- package/dist/components/combobox-field/value-state-view.module.js +4 -4
- package/dist/components/composer/composer-attachments.d.ts +30 -11
- package/dist/components/composer/composer-attachments.js +45 -40
- package/dist/components/composer/composer-editor.css +40 -35
- package/dist/components/composer/composer-editor.d.ts +14 -4
- package/dist/components/composer/composer-editor.js +134 -44
- package/dist/components/composer/composer-editor.module.js +5 -5
- package/dist/components/composer/composer.css +22 -22
- package/dist/components/composer/composer.d.ts +13 -2
- package/dist/components/composer/composer.js +78 -63
- package/dist/components/composer/composer.module.js +5 -5
- package/dist/components/composer/index.d.ts +2 -2
- package/dist/components/composer/mention-text.css +5 -5
- package/dist/components/composer/mention-text.module.js +1 -1
- package/dist/components/confirm-dialog/confirm-dialog.css +29 -29
- package/dist/components/confirm-dialog/confirm-dialog.d.ts +57 -3
- package/dist/components/confirm-dialog/confirm-dialog.js +266 -108
- package/dist/components/confirm-dialog/confirm-dialog.module.js +5 -5
- package/dist/components/conversation/conversation.css +52 -52
- package/dist/components/conversation/conversation.d.ts +43 -18
- package/dist/components/conversation/conversation.js +120 -78
- package/dist/components/conversation/conversation.module.js +15 -15
- package/dist/components/date-field/date-field.d.ts +1 -1
- package/dist/components/date-field/date-field.js +202 -100
- package/dist/components/date-field/date-input.d.ts +73 -37
- package/dist/components/date-field/date-input.js +72 -45
- package/dist/components/date-field/index.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.d.ts +1 -1
- package/dist/components/date-range-field/date-range-field.js +219 -107
- package/dist/components/date-range-field/date-range-input.d.ts +84 -40
- package/dist/components/date-range-field/date-range-input.js +83 -48
- package/dist/components/dialog/dialog.css +32 -32
- package/dist/components/dialog/dialog.d.ts +8 -7
- package/dist/components/dialog/dialog.js +8 -26
- package/dist/components/dialog/dialog.module.js +6 -6
- package/dist/components/divider/divider.css +6 -6
- package/dist/components/divider/divider.d.ts +36 -2
- package/dist/components/divider/divider.js +195 -29
- package/dist/components/divider/divider.module.js +3 -3
- package/dist/components/drawer/drawer.css +55 -56
- package/dist/components/drawer/drawer.d.ts +8 -7
- package/dist/components/drawer/drawer.js +8 -26
- package/dist/components/drawer/drawer.module.js +6 -6
- package/dist/components/field/field.css +34 -24
- package/dist/components/field/field.d.ts +60 -37
- package/dist/components/field/field.js +242 -157
- package/dist/components/field/field.module.js +12 -10
- package/dist/components/field/input-parts.d.ts +11 -13
- package/dist/components/field/input-parts.js +23 -42
- package/dist/components/field-placeholder/field-placeholder.css +6 -6
- package/dist/components/field-placeholder/field-placeholder.module.js +4 -4
- package/dist/components/fieldset/field-group.d.ts +1 -1
- package/dist/components/fieldset/field-group.js +48 -42
- package/dist/components/fieldset/fieldset-root.d.ts +1 -1
- package/dist/components/fieldset/fieldset-root.js +19 -17
- package/dist/components/fieldset/fieldset.d.ts +2 -2
- package/dist/components/fieldset/fieldset.js +2 -2
- package/dist/components/file-field/file-field.css +126 -60
- package/dist/components/file-field/file-field.js +201 -109
- package/dist/components/file-field/file-field.module.js +4 -4
- package/dist/components/file-field/file-input.d.ts +66 -40
- package/dist/components/file-field/file-input.js +188 -132
- package/dist/components/filter-bar/filter-bar.css +8 -8
- package/dist/components/filter-bar/filter-bar.d.ts +12 -3
- package/dist/components/filter-bar/filter-bar.js +23 -25
- package/dist/components/filter-bar/filter-bar.module.js +5 -5
- package/dist/components/form/form.d.ts +19 -7
- package/dist/components/form/form.js +80 -29
- package/dist/components/icon/icon.css +2 -2
- package/dist/components/icon/icon.module.js +1 -1
- package/dist/components/link/link.css +6 -5
- package/dist/components/link/link.module.js +1 -1
- package/dist/components/menu/menu.css +52 -47
- package/dist/components/menu/menu.d.ts +32 -25
- package/dist/components/menu/menu.js +75 -124
- package/dist/components/menu/menu.module.js +8 -8
- package/dist/components/nav/nav-context.d.ts +1 -1
- package/dist/components/nav/nav-item-view.d.ts +10 -13
- package/dist/components/nav/nav-item-view.js +42 -54
- package/dist/components/nav/nav.css +150 -119
- package/dist/components/nav/nav.d.ts +61 -17
- package/dist/components/nav/nav.js +271 -176
- package/dist/components/nav/nav.module.js +17 -15
- package/dist/components/number-field/number-field.css +153 -64
- package/dist/components/number-field/number-field.d.ts +2 -2
- package/dist/components/number-field/number-field.js +112 -91
- package/dist/components/number-field/number-field.module.js +6 -6
- package/dist/components/number-field/number-input.d.ts +43 -23
- package/dist/components/number-field/number-input.js +179 -125
- package/dist/components/otp-field/otp-field.css +153 -60
- package/dist/components/otp-field/otp-field.d.ts +2 -2
- package/dist/components/otp-field/otp-field.js +62 -46
- package/dist/components/otp-field/otp-field.module.js +4 -4
- package/dist/components/otp-field/otp-input.d.ts +8 -6
- package/dist/components/otp-field/otp-input.js +92 -92
- package/dist/components/pagination/pagination.d.ts +46 -15
- package/dist/components/pagination/pagination.js +217 -224
- package/dist/components/password-field/password-field.css +23 -23
- package/dist/components/password-field/password-field.js +107 -85
- package/dist/components/password-field/password-field.module.js +8 -8
- package/dist/components/password-field/password-strength.d.ts +107 -3
- package/dist/components/password-field/password-strength.js +569 -92
- package/dist/components/photo-field/photo-field.js +137 -112
- package/dist/components/photo-field/photo-input.css +67 -44
- package/dist/components/photo-field/photo-input.d.ts +59 -15
- package/dist/components/photo-field/photo-input.js +173 -86
- package/dist/components/photo-field/photo-input.module.js +10 -8
- package/dist/components/popover/popover.css +41 -41
- package/dist/components/popover/popover.d.ts +66 -25
- package/dist/components/popover/popover.js +332 -217
- package/dist/components/popover/popover.module.js +15 -19
- package/dist/components/radio-group-field/radio-group-field.js +80 -71
- package/dist/components/radio-group-field/radio-group.css +112 -60
- package/dist/components/radio-group-field/radio-group.d.ts +19 -3
- package/dist/components/radio-group-field/radio-group.js +66 -23
- package/dist/components/radio-group-field/radio-group.module.js +4 -4
- package/dist/components/segmented-control-field/segmented-control-field.d.ts +1 -1
- package/dist/components/segmented-control-field/segmented-control-field.js +111 -96
- package/dist/components/segmented-control-field/segmented-control.css +132 -79
- package/dist/components/segmented-control-field/segmented-control.d.ts +39 -15
- package/dist/components/segmented-control-field/segmented-control.js +124 -41
- package/dist/components/segmented-control-field/segmented-control.module.js +4 -4
- package/dist/components/select-field/select.css +214 -101
- package/dist/components/select-field/select.d.ts +43 -11
- package/dist/components/select-field/select.js +194 -109
- package/dist/components/select-field/select.module.js +14 -14
- package/dist/components/skeleton/skeleton.css +4 -4
- package/dist/components/skeleton/skeleton.module.js +3 -3
- package/dist/components/stale/stale.css +15 -15
- package/dist/components/stale/stale.d.ts +27 -3
- package/dist/components/stale/stale.js +147 -66
- package/dist/components/stale/stale.module.js +6 -6
- package/dist/components/status-message/status-message.css +22 -22
- package/dist/components/status-message/status-message.module.js +6 -6
- package/dist/components/switch-field/switch-field.js +77 -57
- package/dist/components/switch-field/switch.css +112 -63
- package/dist/components/switch-field/switch.d.ts +20 -3
- package/dist/components/switch-field/switch.js +70 -27
- package/dist/components/switch-field/switch.module.js +4 -4
- package/dist/components/tabs/tabs.css +32 -32
- package/dist/components/tabs/tabs.d.ts +21 -7
- package/dist/components/tabs/tabs.js +73 -14
- package/dist/components/tabs/tabs.module.js +7 -7
- package/dist/components/tag/tag.css +84 -84
- package/dist/components/tag/tag.module.js +3 -3
- package/dist/components/tag-group/tag-group.css +94 -94
- package/dist/components/tag-group/tag-group.module.js +4 -4
- package/dist/components/text-field/text-field.css +159 -82
- package/dist/components/text-field/text-field.d.ts +1 -1
- package/dist/components/text-field/text-field.js +139 -110
- package/dist/components/text-field/text-field.module.js +9 -9
- package/dist/components/text-field/text-input.d.ts +81 -45
- package/dist/components/text-field/text-input.js +366 -217
- package/dist/components/textarea-field/textarea-field.css +7 -2
- package/dist/components/textarea-field/textarea-field.js +72 -56
- package/dist/components/textarea-field/textarea-field.module.js +2 -2
- package/dist/components/time-field/time-field.js +153 -60
- package/dist/components/time-field/time-input.d.ts +21 -10
- package/dist/components/time-field/time-input.js +22 -11
- package/dist/components/toast/toast-provider.css +34 -31
- package/dist/components/toast/toast-provider.d.ts +63 -14
- package/dist/components/toast/toast-provider.js +174 -111
- package/dist/components/toast/toast-provider.module.js +7 -7
- package/dist/components/toggle-group-field/toggle-group-field.d.ts +1 -1
- package/dist/components/toggle-group-field/toggle-group-field.js +95 -89
- package/dist/components/toggle-group-field/toggle-group.css +117 -67
- package/dist/components/toggle-group-field/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group-field/toggle-group.js +2 -2
- package/dist/components/toggle-group-field/toggle-group.module.js +2 -2
- package/dist/components/tooltip/tooltip.css +4 -4
- package/dist/components/tooltip/tooltip.module.js +1 -1
- package/dist/data-table/data-table-content.js +6 -5
- package/dist/data-table/data-table-parts.d.ts +41 -13
- package/dist/data-table/data-table-parts.js +213 -172
- package/dist/data-table/data-table-selection.d.ts +105 -3
- package/dist/data-table/data-table-selection.js +654 -145
- package/dist/data-table/data-table.css +125 -128
- package/dist/data-table/data-table.d.ts +21 -26
- package/dist/data-table/data-table.js +20 -23
- package/dist/data-table/data-table.module.js +32 -34
- package/dist/data-table/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/calendar/calendar-navigation.d.ts +39 -5
- package/dist/lib/calendar/calendar-navigation.js +185 -118
- package/dist/lib/calendar/calendar-parts.d.ts +143 -0
- package/dist/lib/calendar/calendar-parts.js +540 -0
- package/dist/lib/calendar/calendar-prefab.d.ts +52 -0
- package/dist/lib/calendar/calendar-prefab.js +311 -0
- package/dist/lib/calendar/calendar-year.d.ts +3 -1
- package/dist/lib/calendar/calendar-year.js +139 -131
- package/dist/lib/calendar/temporal.css +325 -232
- package/dist/lib/calendar/temporal.d.ts +67 -82
- package/dist/lib/calendar/temporal.js +258 -569
- package/dist/lib/calendar/temporal.module.js +38 -38
- package/dist/lib/forms/use-connected-field.d.ts +1 -1
- package/dist/lib/forms/use-connected-field.js +1 -1
- package/dist/lib/render-as.d.ts +13 -0
- package/dist/lib/render-as.js +46 -0
- package/dist/terrazzo/index.d.ts +4 -3
- package/dist/terrazzo/index.js +17 -6
- package/dist/tokens.css +28 -4
- package/package.json +2 -2
- package/tokens/dark.tokens.json +6 -0
- package/tokens/sys.tokens.json +7 -0
- package/dist/components/button/close-button.d.ts +0 -16
- package/dist/components/button/close-button.js +0 -30
|
@@ -12,6 +12,7 @@ import { focusFirstInvalid } from "./first-invalid.js";
|
|
|
12
12
|
import { FormDisabledProvider, FormStatusProvider, useFormDisabled, useFormStatus } from "./form-context.js";
|
|
13
13
|
import form_module_default from "./form.module.js";
|
|
14
14
|
import { c } from "react/compiler-runtime";
|
|
15
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
15
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
import { useEffect, useRef, useState } from "react";
|
|
17
18
|
import { useStore } from "@tanstack/react-form";
|
|
@@ -203,14 +204,64 @@ var FormErrors = (t0) => {
|
|
|
203
204
|
return t2;
|
|
204
205
|
};
|
|
205
206
|
/**
|
|
206
|
-
*
|
|
207
|
-
*
|
|
207
|
+
* What the form shows while its wait is worth showing, such as a spinner: it
|
|
208
|
+
* renders once the form has been busy for 150 ms, and stays at least 200 ms.
|
|
209
|
+
* It is decoration; `Form.Submit` announces the wait.
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* <Form.Pending render={<Spinner size={1} />} />
|
|
213
|
+
*/
|
|
214
|
+
var FormPending = (t0) => {
|
|
215
|
+
const $ = c(11);
|
|
216
|
+
let props;
|
|
217
|
+
let ref;
|
|
218
|
+
let render;
|
|
219
|
+
if ($[0] !== t0) {
|
|
220
|
+
({render, ref, ...props} = t0);
|
|
221
|
+
$[0] = t0;
|
|
222
|
+
$[1] = props;
|
|
223
|
+
$[2] = ref;
|
|
224
|
+
$[3] = render;
|
|
225
|
+
} else {
|
|
226
|
+
props = $[1];
|
|
227
|
+
ref = $[2];
|
|
228
|
+
render = $[3];
|
|
229
|
+
}
|
|
230
|
+
const busy = useFormDisabled();
|
|
231
|
+
let t1;
|
|
232
|
+
if ($[4] !== busy) {
|
|
233
|
+
t1 = { busy };
|
|
234
|
+
$[4] = busy;
|
|
235
|
+
$[5] = t1;
|
|
236
|
+
} else t1 = $[5];
|
|
237
|
+
const t2 = useBusyPhase(t1) !== "fresh";
|
|
238
|
+
let t3;
|
|
239
|
+
if ($[6] !== props || $[7] !== ref || $[8] !== render || $[9] !== t2) {
|
|
240
|
+
t3 = {
|
|
241
|
+
defaultTagName: "span",
|
|
242
|
+
render,
|
|
243
|
+
ref,
|
|
244
|
+
enabled: t2,
|
|
245
|
+
props
|
|
246
|
+
};
|
|
247
|
+
$[6] = props;
|
|
248
|
+
$[7] = ref;
|
|
249
|
+
$[8] = render;
|
|
250
|
+
$[9] = t2;
|
|
251
|
+
$[10] = t3;
|
|
252
|
+
} else t3 = $[10];
|
|
253
|
+
return useRender(t3);
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* The form's submit button. A wait that lasts 150 ms shows a `Form.Pending`
|
|
257
|
+
* spinner in place of its icon, is announced as `busyLabel`, and stays shown
|
|
258
|
+
* at least 200 ms.
|
|
208
259
|
*
|
|
209
260
|
* @example
|
|
210
261
|
* <Form.Submit busyLabel="Saving">Save</Form.Submit>
|
|
211
262
|
*/
|
|
212
263
|
var FormSubmit = (t0) => {
|
|
213
|
-
const $ = c(
|
|
264
|
+
const $ = c(22);
|
|
214
265
|
let busyLabel;
|
|
215
266
|
let children;
|
|
216
267
|
let icon;
|
|
@@ -244,13 +295,12 @@ var FormSubmit = (t0) => {
|
|
|
244
295
|
const t3 = shown ? void 0 : icon;
|
|
245
296
|
const t4 = shown || void 0;
|
|
246
297
|
let t5;
|
|
247
|
-
if ($[8]
|
|
248
|
-
t5 =
|
|
249
|
-
$[8] =
|
|
250
|
-
|
|
251
|
-
} else t5 = $[9];
|
|
298
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
299
|
+
t5 = /* @__PURE__ */ jsx(FormPending, { render: /* @__PURE__ */ jsx(Spinner, { size: 1 }) });
|
|
300
|
+
$[8] = t5;
|
|
301
|
+
} else t5 = $[8];
|
|
252
302
|
let t6;
|
|
253
|
-
if ($[
|
|
303
|
+
if ($[9] !== children || $[10] !== props || $[11] !== t3 || $[12] !== t4 || $[13] !== variant) {
|
|
254
304
|
t6 = /* @__PURE__ */ jsxs(Button, {
|
|
255
305
|
...props,
|
|
256
306
|
type: "submit",
|
|
@@ -259,34 +309,34 @@ var FormSubmit = (t0) => {
|
|
|
259
309
|
"aria-busy": t4,
|
|
260
310
|
children: [t5, children]
|
|
261
311
|
});
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
|
|
269
|
-
} else t6 = $[16];
|
|
312
|
+
$[9] = children;
|
|
313
|
+
$[10] = props;
|
|
314
|
+
$[11] = t3;
|
|
315
|
+
$[12] = t4;
|
|
316
|
+
$[13] = variant;
|
|
317
|
+
$[14] = t6;
|
|
318
|
+
} else t6 = $[14];
|
|
270
319
|
let t7;
|
|
271
|
-
if ($[
|
|
320
|
+
if ($[15] !== busyLabel || $[16] !== shown || $[17] !== status) {
|
|
272
321
|
t7 = shown && status !== null ? createPortal(busyLabel, status) : null;
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
} else t7 = $[
|
|
322
|
+
$[15] = busyLabel;
|
|
323
|
+
$[16] = shown;
|
|
324
|
+
$[17] = status;
|
|
325
|
+
$[18] = t7;
|
|
326
|
+
} else t7 = $[18];
|
|
278
327
|
let t8;
|
|
279
|
-
if ($[
|
|
328
|
+
if ($[19] !== t6 || $[20] !== t7) {
|
|
280
329
|
t8 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, t7] });
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
} else t8 = $[
|
|
330
|
+
$[19] = t6;
|
|
331
|
+
$[20] = t7;
|
|
332
|
+
$[21] = t8;
|
|
333
|
+
} else t8 = $[21];
|
|
285
334
|
return t8;
|
|
286
335
|
};
|
|
287
336
|
/**
|
|
288
337
|
* A form over a TanStack Form instance: `Root` is the `<form>`, `Errors` its
|
|
289
|
-
* form-level errors
|
|
338
|
+
* form-level errors, `Submit` its submit button and `Pending` what shows while
|
|
339
|
+
* it waits.
|
|
290
340
|
*
|
|
291
341
|
* @example
|
|
292
342
|
* <Form.Root form={form}>
|
|
@@ -298,6 +348,7 @@ var FormSubmit = (t0) => {
|
|
|
298
348
|
var Form = {
|
|
299
349
|
Root: FormRoot,
|
|
300
350
|
Errors: FormErrors,
|
|
351
|
+
Pending: FormPending,
|
|
301
352
|
Submit: FormSubmit
|
|
302
353
|
};
|
|
303
354
|
function _temp(state) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._icon_24xqt_3 {
|
|
4
4
|
display: inline-block;
|
|
5
5
|
flex-shrink: 0;
|
|
6
6
|
vertical-align: middle;
|
|
7
|
-
fill: var(--icon-
|
|
7
|
+
fill: var(--icon-fg, currentcolor);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._link_3h8gn_3 {
|
|
4
4
|
color: var(--link-fg, var(--sys-color-primary));
|
|
5
|
-
|
|
5
|
+
font: var(--link-font, inherit);
|
|
6
|
+
text-decoration: var(--link-text-decoration, underline);
|
|
6
7
|
text-underline-offset: var(--link-underline-offset, var(--sys-unit-1));
|
|
7
8
|
}
|
|
8
|
-
.
|
|
9
|
+
._link_3h8gn_3 {
|
|
9
10
|
outline: 0 solid var(--sys-color-focus-ring);
|
|
10
11
|
outline-offset: var(--sys-focus-ring-offset);
|
|
11
12
|
}
|
|
12
|
-
.
|
|
13
|
+
._link_3h8gn_3:focus-visible {
|
|
13
14
|
outline-width: var(--sys-focus-ring-width);
|
|
14
15
|
}
|
|
15
|
-
.
|
|
16
|
+
._link_3h8gn_3:hover {
|
|
16
17
|
color: var(--link-hover-fg, var(--sys-color-on-primary-container));
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer kit.reset, kit.base, kit.components;
|
|
2
2
|
@layer kit.components {
|
|
3
|
-
.
|
|
3
|
+
._positioner_75w81_3 {
|
|
4
4
|
--_popup-edge-padding: var(
|
|
5
5
|
--popup-edge-padding,
|
|
6
6
|
var(--sys-unit-16)
|
|
@@ -11,71 +11,72 @@
|
|
|
11
11
|
inherits: false;
|
|
12
12
|
initial-value: 0px;
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
._positioner_75w81_3 {
|
|
15
15
|
outline: none;
|
|
16
|
-
filter: var(--sys-elevation-1-filter);
|
|
16
|
+
filter: var(--menu-filter, var(--sys-elevation-1-filter));
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
._popup_75w81_18 {
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
border: none;
|
|
21
|
-
border-radius: var(--sys-radius-md);
|
|
22
|
-
background: var(--sys-color-surface-overlay);
|
|
23
|
-
padding: var(--sys-unit-4);
|
|
24
|
-
color: var(--sys-color-text);
|
|
21
|
+
border-radius: var(--popup-radius, var(--sys-radius-md));
|
|
22
|
+
background: var(--popup-bg, var(--sys-color-surface-overlay));
|
|
23
|
+
padding: var(--popup-pad, var(--sys-unit-4));
|
|
24
|
+
color: var(--popup-fg, var(--sys-color-text));
|
|
25
25
|
transform-origin: var(--transform-origin);
|
|
26
26
|
scrollbar-width: thin;
|
|
27
|
-
scrollbar-color: var(--sys-color-outline) transparent;
|
|
27
|
+
scrollbar-color: var(--popup-scrollbar-fg, var(--sys-color-outline)) transparent;
|
|
28
28
|
}
|
|
29
29
|
@media not (prefers-reduced-motion) {
|
|
30
|
-
.
|
|
30
|
+
._popup_75w81_18 {
|
|
31
31
|
transition: opacity var(--sys-motion-instant) var(--sys-motion-standard), transform var(--sys-motion-instant) var(--sys-motion-standard);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
._popup_75w81_18[data-starting-style], ._popup_75w81_18[data-ending-style] {
|
|
35
35
|
opacity: 0;
|
|
36
36
|
transform: scale(0.96);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
39
|
-
min-inline-size: 12rem;
|
|
38
|
+
._popup_75w81_18 {
|
|
39
|
+
min-inline-size: var(--menu-min-inline-size, 12rem);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
._arrow_75w81_41 {
|
|
42
42
|
display: flex;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
._arrow_75w81_41[data-side=top] {
|
|
45
45
|
bottom: -8px;
|
|
46
46
|
transform: rotate(180deg);
|
|
47
47
|
}
|
|
48
|
-
.
|
|
48
|
+
._arrow_75w81_41[data-side=bottom] {
|
|
49
49
|
top: -8px;
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
._arrow_75w81_41[data-side=left] {
|
|
52
52
|
right: -12px;
|
|
53
53
|
transform: rotate(90deg);
|
|
54
54
|
}
|
|
55
|
-
.
|
|
55
|
+
._arrow_75w81_41[data-side=right] {
|
|
56
56
|
left: -12px;
|
|
57
57
|
transform: rotate(-90deg);
|
|
58
58
|
}
|
|
59
|
-
.
|
|
60
|
-
fill: var(--sys-color-surface-overlay);
|
|
59
|
+
._arrowFill_75w81_59 {
|
|
60
|
+
fill: var(--popup-bg, var(--sys-color-surface-overlay));
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
._item_75w81_62 {
|
|
63
63
|
display: flex;
|
|
64
64
|
align-items: center;
|
|
65
|
-
gap: var(--sys-unit-6);
|
|
65
|
+
gap: var(--popup-item-gap, var(--sys-unit-6));
|
|
66
66
|
box-sizing: border-box;
|
|
67
|
-
min-block-size: var(--sys-unit-20);
|
|
68
|
-
border-radius: var(--sys-radius-sm);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
min-block-size: var(--popup-item-min-block-size, var(--sys-unit-20));
|
|
68
|
+
border-radius: var(--popup-item-radius, var(--sys-radius-sm));
|
|
69
|
+
background: var(--popup-item-bg, transparent);
|
|
70
|
+
padding: var(--popup-item-pad-y, var(--sys-unit-4)) var(--popup-item-pad-x, var(--sys-unit-6));
|
|
71
|
+
color: var(--popup-item-fg, var(--popup-fg, var(--sys-color-text)));
|
|
72
|
+
font: var(--popup-item-font, var(--sys-font-body-medium));
|
|
72
73
|
user-select: none;
|
|
73
74
|
}
|
|
74
|
-
.
|
|
75
|
+
._item_75w81_62 {
|
|
75
76
|
position: relative;
|
|
76
77
|
isolation: isolate;
|
|
77
78
|
}
|
|
78
|
-
.
|
|
79
|
+
._item_75w81_62::after {
|
|
79
80
|
content: "";
|
|
80
81
|
position: absolute;
|
|
81
82
|
z-index: -1;
|
|
@@ -86,37 +87,41 @@
|
|
|
86
87
|
pointer-events: none;
|
|
87
88
|
}
|
|
88
89
|
@media not (prefers-reduced-motion) {
|
|
89
|
-
.
|
|
90
|
+
._item_75w81_62::after {
|
|
90
91
|
transition: opacity var(--sys-motion-instant) var(--sys-motion-standard);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
|
-
.
|
|
94
|
+
._item_75w81_62:hover:not(:disabled, [data-disabled])::after {
|
|
94
95
|
opacity: var(--sys-state-hover);
|
|
95
96
|
}
|
|
96
|
-
.
|
|
97
|
+
._item_75w81_62:active:not(:disabled, [data-disabled])::after {
|
|
97
98
|
opacity: var(--sys-state-pressed);
|
|
98
99
|
}
|
|
99
|
-
.
|
|
100
|
+
._item_75w81_62 {
|
|
100
101
|
outline: none;
|
|
101
102
|
}
|
|
102
|
-
.
|
|
103
|
-
background: var(--
|
|
104
|
-
color: var(--sys-color-
|
|
103
|
+
._item_75w81_62[data-selected] {
|
|
104
|
+
background: var(--popup-item-selected-bg, var(--popup-item-bg, transparent));
|
|
105
|
+
color: var(--popup-item-selected-fg, var(--popup-item-fg, var(--popup-fg, var(--sys-color-text))));
|
|
105
106
|
}
|
|
106
|
-
.
|
|
107
|
-
|
|
107
|
+
._item_75w81_62[data-highlighted] {
|
|
108
|
+
background: var(--popup-item-highlighted-bg, var(--sys-color-primary-container));
|
|
109
|
+
color: var(--popup-item-highlighted-fg, var(--sys-color-on-primary-container));
|
|
108
110
|
}
|
|
109
|
-
.
|
|
111
|
+
._item_75w81_62[data-disabled] {
|
|
112
|
+
color: var(--popup-item-disabled-fg, var(--sys-color-disabled-fg));
|
|
113
|
+
}
|
|
114
|
+
._linkItem_75w81_114 {
|
|
110
115
|
text-decoration: none;
|
|
111
116
|
}
|
|
112
|
-
.
|
|
113
|
-
block-size: 1px;
|
|
114
|
-
margin: var(--sys-unit-2) 0;
|
|
115
|
-
background: var(--sys-color-border);
|
|
117
|
+
._separator_75w81_117 {
|
|
118
|
+
block-size: var(--menu-separator-size, 1px);
|
|
119
|
+
margin: var(--menu-separator-space, var(--sys-unit-2)) 0;
|
|
120
|
+
background: var(--menu-separator-bg, var(--sys-color-border));
|
|
116
121
|
}
|
|
117
|
-
.
|
|
118
|
-
padding: var(--sys-unit-4) var(--sys-unit-6);
|
|
119
|
-
color: var(--sys-color-text-muted);
|
|
120
|
-
font: var(--sys-font-label-small);
|
|
122
|
+
._groupLabel_75w81_122 {
|
|
123
|
+
padding: var(--menu-group-label-pad-y, var(--sys-unit-4)) var(--menu-group-label-pad-x, var(--sys-unit-6));
|
|
124
|
+
color: var(--menu-group-label-fg, var(--sys-color-text-muted));
|
|
125
|
+
font: var(--menu-group-label-font, var(--sys-font-label-small));
|
|
121
126
|
}
|
|
122
127
|
}
|
|
@@ -14,23 +14,15 @@ export type MenuRootProps<Payload = unknown> = Omit<BaseMenu.Root.Props<Payload>
|
|
|
14
14
|
}>;
|
|
15
15
|
/** Holds the menu's open state for its parts. It renders no element of its own. */
|
|
16
16
|
declare const Root: <Payload>(props: MenuRootProps<Payload>) => ReactNode;
|
|
17
|
-
type
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/** Accessible name, surfaced as the tooltip hint and the `aria-label`. */
|
|
21
|
-
label: string;
|
|
22
|
-
children?: never;
|
|
17
|
+
export type MenuTriggerProps = Omit<ComponentProps<typeof BaseMenu.Trigger>, "render"> & Readonly<{
|
|
18
|
+
/** The button to render, such as `<IconButton label="Row actions" variant="tertiary"><MoreIcon /></IconButton>`. */
|
|
19
|
+
render: NonNullable<ComponentProps<typeof BaseMenu.Trigger>["render"]>;
|
|
23
20
|
}>;
|
|
24
|
-
type TextTriggerProps = TriggerBaseProps & Readonly<{
|
|
25
|
-
/** Optional leading icon rendered before the label. */
|
|
26
|
-
icon?: ReactNode;
|
|
27
|
-
children: ReactNode;
|
|
28
|
-
label?: never;
|
|
29
|
-
}>;
|
|
30
|
-
export type MenuTriggerProps = IconTriggerProps | TextTriggerProps;
|
|
31
21
|
/**
|
|
32
|
-
* The button that opens a menu
|
|
33
|
-
*
|
|
22
|
+
* The button that opens a menu. It renders whichever button it is given.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <Menu.Trigger render={<IconButton label="Row actions" variant="tertiary"><MoreIcon /></IconButton>} />
|
|
34
26
|
*/
|
|
35
27
|
declare const Trigger: (props: MenuTriggerProps) => ReactNode;
|
|
36
28
|
export type MenuPositionerProps = Omit<ComponentProps<typeof BaseMenu.Positioner>, "ref">;
|
|
@@ -44,14 +36,22 @@ export type MenuContentProps = ComponentProps<typeof BaseMenu.Popup> & Readonly<
|
|
|
44
36
|
}>;
|
|
45
37
|
/** `Portal`, `Positioner` and `Popup` in one: the menu's surface, placed against its trigger. */
|
|
46
38
|
declare const Content: ({ container, side, sideOffset, align, alignOffset, ...props }: MenuContentProps) => ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
declare const
|
|
39
|
+
/**
|
|
40
|
+
* The arrow pointing from the popup at its trigger: the kit's own shape, or the
|
|
41
|
+
* children given in its place.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <Menu.Arrow />
|
|
45
|
+
*/
|
|
46
|
+
declare const Arrow: ({ className, children, ...props }: ComponentProps<typeof BaseMenu.Arrow>) => ReactNode;
|
|
47
|
+
export type MenuItemProps = ComponentProps<typeof BaseMenu.Item>;
|
|
48
|
+
/**
|
|
49
|
+
* An action. A leading icon goes in its children, before the label.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <Menu.Item onClick={download}><DownloadIcon />Download</Menu.Item>
|
|
53
|
+
*/
|
|
54
|
+
declare const Item: ({ className, ...props }: MenuItemProps) => ReactNode;
|
|
55
55
|
export type MenuLinkItemProps = ComponentProps<typeof BaseMenu.LinkItem>;
|
|
56
56
|
/**
|
|
57
57
|
* An item that leads to a page. It spreads every other prop onto the `<a>` and
|
|
@@ -83,10 +83,17 @@ type MenuParts = Readonly<{
|
|
|
83
83
|
*
|
|
84
84
|
* @example
|
|
85
85
|
* <Menu.Root>
|
|
86
|
-
* <Menu.Trigger
|
|
86
|
+
* <Menu.Trigger
|
|
87
|
+
* render={
|
|
88
|
+
* <IconButton label="Row actions" variant="tertiary">
|
|
89
|
+
* <MoreIcon />
|
|
90
|
+
* </IconButton>
|
|
91
|
+
* }
|
|
92
|
+
* />
|
|
87
93
|
* <Menu.Content sideOffset={8}>
|
|
88
94
|
* <Menu.Arrow />
|
|
89
|
-
* <Menu.Item
|
|
95
|
+
* <Menu.Item onClick={download}>
|
|
96
|
+
* <DownloadIcon />
|
|
90
97
|
* Download
|
|
91
98
|
* </Menu.Item>
|
|
92
99
|
* </Menu.Content>
|