@nxgt/material 3.10.2 → 3.12.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/CHANGELOG.md +96 -0
- package/README.md +10 -11
- package/dist/{async-slice-DDjaJY_F.js → async-slice-4qbER86I.js} +1 -1
- package/dist/button-BNjw-pnE.js +327 -0
- package/dist/button-group-context-CaP0X5p_.js +5 -0
- package/dist/{button-tones-BgZJ1tkD.js → button-tones-BwuVvAmd.js} +9 -1
- package/dist/{callout-view-DdJPdFrP.js → callout-view-C6voDS00.js} +1 -1
- package/dist/charts.js +5 -5
- package/dist/{chip-DpySRqCy.js → chip-DLgQTJBZ.js} +4 -4
- package/dist/{code-editor-BiA14xua.js → code-editor-BZbaYLvo.js} +8 -8
- package/dist/code-editor.js +7 -7
- package/dist/{code-language-items-C_dJ6GVs.js → code-language-items-BT5BO5w6.js} +2 -2
- package/dist/components/base.css +21 -6
- package/dist/components/components.css +6 -2
- package/dist/components/type-scale.css +194 -0
- package/dist/components/ui/actions/button/button.css +156 -0
- package/dist/components/ui/actions/button-group/button-group-standard.css +131 -0
- package/dist/components/ui/actions/button-group/button-group.css +4 -1
- package/dist/components/ui/actions/icon-button/icon-button.css +115 -0
- package/dist/components/ui/actions/morph-fill.css +62 -0
- package/dist/components/ui/feedback/toast/toast-expressive.css +17 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +49 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +0 -17
- package/dist/components/ui/layout/sidebar/sidebar-tokens.css +7 -2
- package/dist/{components-BkF9N-Yx.js → components-yx1t_5_P.js} +13740 -13422
- package/dist/components.js +24 -24
- package/dist/{dialog-CkIYpJXk.js → dialog-BQp5IdFl.js} +147 -147
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-BC5Tbhb9.js → dropdown-menu-BsH9W_3C.js} +3 -3
- package/dist/editor-viewer.js +1 -1
- package/dist/editor.js +13 -13
- package/dist/{empty-state-SeAg2TOX.js → empty-state-WaU4-T2c.js} +5 -5
- package/dist/escape-owner-C4W_sOAU.js +116 -0
- package/dist/{field-blur-DPLsMufs.js → field-blur-CJHzVSh9.js} +1 -1
- package/dist/{field-blur-context-1ZwJgsHE.js → field-blur-context-Cft9s7Hg.js} +2 -2
- package/dist/{hover-card-Cox-tPDz.js → hover-card-C0fw2kLK.js} +72 -71
- package/dist/i18n.js +12 -12
- package/dist/{icon-badge-q3Ve8gra.js → icon-badge-DUAq9f7H.js} +4 -4
- package/dist/icon-button-ifTpXt0A.js +355 -0
- package/dist/{illustration-BfHRpVzM.js → illustration-BmQmvW_4.js} +1 -1
- package/dist/illustrations.js +2 -2
- package/dist/lib/components/ui/actions/button/button-tones.d.ts +16 -0
- package/dist/lib/components/ui/actions/button/button.d.ts +13 -0
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +4 -3
- package/dist/lib/components/ui/actions/button-group/button-group-context.d.ts +16 -0
- package/dist/lib/components/ui/actions/button-group/button-group-reset.d.ts +13 -0
- package/dist/lib/components/ui/actions/button-group/button-group.d.ts +19 -2
- package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +3 -2
- package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +18 -4
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +34 -4
- package/dist/lib/components/ui/display/badge/badge.d.ts +7 -2
- package/dist/lib/components/ui/display/entity-header/entity-header.d.ts +9 -1
- package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +16 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-actions.d.ts +6 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-body.d.ts +14 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-icon.d.ts +6 -0
- package/dist/lib/components/ui/display/entity-header/partials/shown.d.ts +2 -0
- package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +8 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +2 -1
- package/dist/lib/components/ui/display/stat-card/index.d.ts +1 -1
- package/dist/lib/components/ui/display/stat-card/partials/stat-card-compact.d.ts +12 -0
- package/dist/lib/components/ui/display/stat-card/stat-card-classes.d.ts +3 -2
- package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +2 -2
- package/dist/lib/components/ui/display/stat-card/types.d.ts +9 -0
- package/dist/lib/components/ui/feedback/alert/alert-variants.d.ts +18 -0
- package/dist/lib/components/ui/feedback/alert/alert.d.ts +2 -6
- package/dist/lib/components/ui/feedback/typing-indicator/typing-indicator.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +3 -106
- package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +113 -0
- package/dist/lib/components/ui/layout/app-shell/app-breadcrumb.d.ts +2 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-icon-item.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-label-item.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +6 -0
- package/dist/lib/components/ui/layout/app-shell/observe-layout.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/shape-units.d.ts +16 -0
- package/dist/lib/components/ui/layout/app-shell/shapes-clear-content.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/watch-content.d.ts +19 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +1 -1
- package/dist/lib/components/ui/primitives/toggle/toggle.d.ts +1 -1
- package/dist/lib/components/ui/primitives/typography/typography.d.ts +17 -7
- package/dist/lib/components/ui/primitives/typography/typography.variants.d.ts +55 -0
- package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +2 -2
- package/dist/lib/components/ui/tones.d.ts +1 -1
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +2 -2
- package/dist/{line-path-BQeLQZ-P.js → line-path-C5pZGC49.js} +1 -1
- package/dist/main.js +29 -29
- package/dist/map.js +9 -9
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -1
- package/dist/{public-CtpsxV4I.js → public-B0Nq_yYV.js} +524 -524
- package/dist/{render-json-DyFYFIkZ.js → render-json-BOhvPnSv.js} +1 -1
- package/dist/{rich-code-block-C2Fp_FDU.js → rich-code-block-v7WmeZp9.js} +5 -5
- package/dist/{rich-text-viewer-LO1IZCWs.js → rich-text-viewer-W15XIwah.js} +2 -2
- package/dist/{skeleton-Bmp4gWAH.js → skeleton-DSdtr2qc.js} +1 -1
- package/dist/{sortable-provider-pVaEZzty.js → sortable-provider-CgDTolQR.js} +3 -3
- package/dist/{spinner-CsHcmcpF.js → spinner-BtSIYVrC.js} +3 -3
- package/dist/{state-scenes-SGNyZjTz.js → state-scenes-BX03WmSu.js} +1 -1
- package/dist/styles.css +2 -0
- package/dist/theme-picker.js +3 -3
- package/dist/{theme-toggle-oU-fh6WE.js → theme-toggle-B2Pehdhn.js} +2 -2
- package/dist/{toggle-group-j8zaxEg1.js → toggle-group-BMJNcFAC.js} +1 -1
- package/dist/{toolbar-items-CqHvlTU8.js → toolbar-items-rUHdVqAq.js} +399 -398
- package/dist/{tooltip-rhbqNmr3.js → tooltip-CkttDIab.js} +1 -1
- package/dist/{translate-material-CGZljjp1.js → translate-material-Bd_KgfB8.js} +1 -1
- package/dist/{translator-DCYO4Ij3.js → translator-Dje8HrNz.js} +5 -5
- package/dist/{use-chat-composer-nWWfVyrK.js → use-chat-composer-B0_STpQN.js} +4173 -4173
- package/dist/{use-material-translation-DkxcLbLM.js → use-material-translation-B3V_bz-5.js} +1 -1
- package/dist/{utils-Bcd2Z3ea.js → utils-BLfntITJ.js} +14 -1
- package/docs/components/buttons-and-actions.md +64 -15
- package/docs/components/data-display.md +40 -9
- package/docs/components/feedback-and-status.md +12 -1
- package/docs/components/navigation-and-layout.md +4 -3
- package/docs/components/primitives.md +52 -10
- package/docs/guides/app-shell.md +52 -8
- package/docs/guides/backgrounds.md +2 -0
- package/docs/guides/theming.md +55 -3
- package/docs/previews/buttons-actions-button.webp +0 -0
- package/docs/previews/buttons-actions-iconbutton.webp +0 -0
- package/docs/previews/data-display-badge.webp +0 -0
- package/docs/previews/data-display-entityheader.webp +0 -0
- package/docs/previews/data-display-listtile.webp +0 -0
- package/docs/previews/data-display-statcard.webp +0 -0
- package/docs/previews/feedback-status-banner.webp +0 -0
- package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-sidebar.webp +0 -0
- package/docs/previews/primitives-typography.webp +0 -0
- package/docs/roadmap.md +53 -4
- package/docs/troubleshooting.md +75 -4
- package/lib/components/base.css +21 -6
- package/lib/components/components.css +6 -2
- package/lib/components/type-scale.css +194 -0
- package/lib/components/ui/actions/button/button.css +156 -0
- package/lib/components/ui/actions/button-group/button-group-standard.css +131 -0
- package/lib/components/ui/actions/button-group/button-group.css +4 -1
- package/lib/components/ui/actions/icon-button/icon-button.css +115 -0
- package/lib/components/ui/actions/morph-fill.css +62 -0
- package/lib/components/ui/feedback/toast/toast-expressive.css +17 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +49 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +0 -17
- package/lib/components/ui/layout/sidebar/sidebar-tokens.css +7 -2
- package/lib/styles.css +2 -0
- package/package.json +2 -1
- package/dist/button-DbfdITBB.js +0 -322
- package/dist/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
- package/dist/components/ui/actions/icon-button/icon-button-morph.css +0 -152
- package/dist/escape-owner-CripBce_.js +0 -57
- package/dist/icon-button-DJcWpIhu.js +0 -319
- package/lib/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
- package/lib/components/ui/actions/icon-button/icon-button-morph.css +0 -152
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,101 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1472](https://github.com/softistx/nxgt-material/pull/1472) [`d01b87a`](https://github.com/softistx/nxgt-material/commit/d01b87a5be1e5b82cc46749fb67fe9193aac338f) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `StatCard` gets a compact `size="sm"`, `EntityHeader` a `stats` prop, and `Banner` takes `Alert`'s look.
|
|
8
|
+
|
|
9
|
+
- `StatCard size="sm"` is a tile 40 to 56 px tall for a header band: the optional icon, then the value (tabular figures) over its label. It keeps `tone` and `variant`; `hint`, `delta` and `valueSize` are ignored. Tiles in a `flex flex-wrap` row wrap on a phone. New type `StatCardSize`.
|
|
10
|
+
- `EntityHeader` takes `stats` (`{ label, value, tone? }[]`), rendered as these tiles under `metadata`, so figures show as tiles while facts stay in `metadata`. New type `EntityStat`.
|
|
11
|
+
- `Banner` keeps its role and API (page level, `action`, `onDismiss`, default icon per tone) but now looks exactly like `Alert`: the light tone surface, the start accent bar, the tone-coloured icon, the title and description typography and the padding. It shares `Alert`'s variants, so the two cannot drift. Visual change: the solid tinted fill, the full tone border and the rounded corners are gone. `Alert` itself is unchanged, apart from its icon wrapper carrying `data-slot="alert-icon"` and its icon colour, size and margin rules now applying to the SVG inside that wrapper only, not to any SVG in its text.
|
|
12
|
+
|
|
13
|
+
- [#1467](https://github.com/softistx/nxgt-material/pull/1467) [`338a8fe`](https://github.com/softistx/nxgt-material/commit/338a8fe79cb47dccaa52632da1eaa5d49bc1ef38) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `Badge` becomes a status badge: a 20 px pill with the `label-sm` text, compact padding and no hover or pointer affordance (a `Badge` link no longer fades on hover). New `soft` variant, a tonal fill from the tone tokens and the recommended variant for a state, and a `tone` prop for `soft` and `outlined` (neutral by default; `BadgeTone` is the library's `Tone`, so a tone declared in `AppTones` works too); `outlined` is now a thin 1 px line at 40 % of the tone. Visual change: every Badge is 20 px high and a little smaller in text, `CountBadge` keeps its own h-4 / 10 px size and loses the hover. `ListTile` with an `href` now ends with a discreet, decorative chevron after `trailing` (flipped in right-to-left); `chevron={false}` opts out, `chevron` opts a button tile in. A tile that already passes its own `ChevronRight` as `trailing` shows two: drop yours or pass `chevron={false}`.
|
|
14
|
+
|
|
15
|
+
- [#1477](https://github.com/softistx/nxgt-material/pull/1477) [`90290fd`](https://github.com/softistx/nxgt-material/commit/90290fdedb66bd7a88932e910ad810e90e83826c) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ActivityLayout` takes `breadcrumb` (default `true`): `breadcrumb={false}` hides the trail, for an error page whose matched routes would show a misleading one ([#1475](https://github.com/softistx/nxgt-material/issues/1475)). The trail is also hidden when every matched `handle.breadcrumb` renders `null`, and a crumb that renders `null` is left out with its separator. The Autocomplete and Combobox options no longer shrink below their content on a coarse pointer when the list scrolls: `ComboboxList` uses `auto-rows-max` ([#1474](https://github.com/softistx/nxgt-material/issues/1474)).
|
|
16
|
+
|
|
17
|
+
- [#1465](https://github.com/softistx/nxgt-material/pull/1465) [`af31879`](https://github.com/softistx/nxgt-material/commit/af31879654725cdf62ea753b994b6e2d2aee3386) Thanks [@SteveGT96](https://github.com/SteveGT96)! - ActivityLayout and `AppSidebar`: a `MenuItem` takes `display?: 'icon'`. On a `footer` entry (a "Settings") it is drawn as a round, icon-only `IconButton` in the collapsed rail, the expanded sidebar and the phone's menu sheet: the label is its tooltip and its accessible name, it is `aria-current="page"` and tonal when active, and its target is 44 px on a coarse pointer. Entries without it keep their icon and label.
|
|
18
|
+
|
|
19
|
+
**Visual change** (every `SidebarMenuItem`, `AppSidebar` and `ActivityLayout`): the active entry's label and icon are drawn in primary at 85 % of its lightness in light (`--sidebar-active-foreground`), so the label reads 4.5:1 or more on its pill for every theme preset (it was `--primary` itself, 3.7:1 on the corail preset's pill). The dark foreground and the pills are unchanged. A theme that sets `--sidebar-active-foreground` is unaffected.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#1479](https://github.com/softistx/nxgt-material/pull/1479) [`f8779d6`](https://github.com/softistx/nxgt-material/commit/f8779d6d56a06eff970b1676e472884a769cd4b9) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ActivityLayout`'s backdrop no longer draws a shape over the page's text or fields ([#1478](https://github.com/softistx/nxgt-material/issues/1478)). Shapes of a theme's background or of a `backdrop` `Background` (the motif and illustrated presets) are now hidden while they lie over, or within 8px of, a line of text or a control of the content: they fade out in 150ms (none under reduced motion) and fade back once clear, on scroll, resize and when the content changes. A moon, a planet or an eclipse is hidden whole, with its halo. They are hidden, never moved, so the shapes keep their places in the empty space, and nothing shows before the first check. The check keeps the content's boxes and only shifts them on scroll (rAF-throttled). The backdrop stays below the content (`-z-10`), under dialogs, sheets and sticky headers. Visible change: on a phone, and on a page that fills the column, fewer shapes show. Docs: the app-shell guide's "Where the shapes go".
|
|
24
|
+
|
|
25
|
+
- [#1481](https://github.com/softistx/nxgt-material/pull/1481) [`eff59eb`](https://github.com/softistx/nxgt-material/commit/eff59eb10fc9d272e3e84d1fc85bde0d46d18214) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Stacked toasts pass axe's `target-size` on a coarse pointer again. Fixes [#1480](https://github.com/softistx/nxgt-material/issues/1480).
|
|
26
|
+
|
|
27
|
+
A toast behind the front one in a collapsed stack is scaled and offset under it, so its covered close button (41.8 px once scaled, overlapping the front one's hit area) failed `target-size` since 3.11. The buttons (action and close) of such a toast are now hidden (`visibility: hidden`) until the stack opens on hover, or while focus is inside the toaster, so a Tab from the front toast still reaches them. Nothing changes for a single toast or an expanded stack.
|
|
28
|
+
|
|
29
|
+
## 3.11.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- [#1436](https://github.com/softistx/nxgt-material/pull/1436) [`cdd7025`](https://github.com/softistx/nxgt-material/commit/cdd7025df8e581b3b04168c10c8f4afd3a5ec9a7) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Button goes Material 3 Expressive. New options, no breaking type change: `size` adds `xl` (56 px) and `2xl` (96 px) to `xs`, `sm`, `default` and `lg`; `shape` is `round` (default) or `square`, and the corners spring when the button is pressed (a round one squares, a square one rounds, and the button scales to .97, .985 at `2xl`; reduced motion keeps the colour change only); `selected` makes it a toggle (`aria-pressed` and `data-selected`), takes the other shape and a solid fill of its colour (ignored with `asChild`, with a warning in development). A round button's radius is half its height, never 999px, and every corner stays at 4 px or more at the spring's overshoot. On a coarse pointer every size has a 44 px hit area. `buttonVariants` carries the same look, so Pagination, AlertDialog and the calendar's date picker follow.
|
|
34
|
+
|
|
35
|
+
**Visual changes** (every `Button`, and what uses `buttonVariants`):
|
|
36
|
+
|
|
37
|
+
- Padding grows: `default` 16 → 18 px, `xs` 8 → 12 px, `sm` 12 → 16 px, with an icon too. A button without a `size` keeps its content height and its 16 px padding.
|
|
38
|
+
- Labels use the type scale and are heavier: weights 560 (`xs`) to 700 (`2xl`), `lg` 14 → 16 px (`title-md`), `xl` 24 px, `2xl` 32 px. The icon follows the size (`xs` 14 px, `default` 18 px, `2xl` 44 px).
|
|
39
|
+
- The `filled` and `tonal` variants lose their `shadow-xs`.
|
|
40
|
+
- The focus is a 2 px outline in the colour, 2 px off the button, instead of a 3 px ring; `aria-invalid` focuses in the error colour.
|
|
41
|
+
- A disabled button has neutral text (40 % of the text colour), whatever the variant and colour, and a neutral fill (12 %) except `ghost` and `link`, which stay transparent, instead of 50 % opacity.
|
|
42
|
+
- The `outlined` line is 1.5 px, drawn inside the box at 55 % of the colour, instead of a 1 px border at 50 %.
|
|
43
|
+
- A `ghost` button is neutral without a `color` (and with `color="default"`); one given a `color`, `primary` included, is tinted by it (its text and hover), where `primary` was neutral.
|
|
44
|
+
- A pressed button squeezes (radius and scale).
|
|
45
|
+
- The label is what is cut with an ellipsis, not the button: the host no longer truncates (an `asChild` host still does), the children of a button are no longer all `truncate`, and a `buttonVariants` element (Pagination's links, AlertDialog's actions) no longer cuts bare text with an ellipsis.
|
|
46
|
+
- Toolbar items keep the Toolbar's own look. `IconButton` and `ButtonGroup` take the same look in this release (their own changesets).
|
|
47
|
+
- A `Banner`'s text actions (`ghost` and `link`) are pulled back by the button's own padding (`--btn-px`, less `--btn-pxi` with a leading icon) instead of a list of fixed margins per size, so they stay aligned at every size.
|
|
48
|
+
- A `Button` with a height class of your own (`h-11`) keeps the pill radius of its `size` (half of `--btn-h`, 36 px without one): set `--btn-h` with your height (`[--btn-h:44px] h-(--btn-h)`), or use `size`. The date and time pickers' OK and Cancel do this on a coarse pointer, so their pill follows their 44 px.
|
|
49
|
+
- An `asChild` button (a link) cuts its text with `overflow: clip` and a 22 px clip margin instead of `truncate`, so its 44 px hit area on a coarse pointer is not clipped.
|
|
50
|
+
- A `ghost` button given `selected` without a `color` is a neutral tint, as `IconButton`'s ghost toggle is (12 % of the text colour, label and icon in the full text colour); it is tinted by its `color` when one is set (an explicit `color="default"` selects as a solid fill of the text colour).
|
|
51
|
+
- A selected button is the system's selected item in forced colours (`SelectedItem` and `SelectedItemText`, the icon's line too).
|
|
52
|
+
|
|
53
|
+
- [#1447](https://github.com/softistx/nxgt-material/pull/1447) [`452216b`](https://github.com/softistx/nxgt-material/commit/452216bec6789708831d4b490c27a3962e06e6a9) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ButtonGroup` gets the Material 3 Expressive "standard" look and a shared size. `look="standard"` is an opt-in in this release (it becomes the default in the next major, with `look="legacy"` to keep the original): the buttons keep their own look, 8px apart, and a pressed one widens by 14px on each side while its neighbours give the same width back (half each, or all of it when it sits at an end), so the group never changes width; the buttons spring on `spatial-fast`, and reduced motion turns the exchange off. At `xs`, `sm` and `default` the exchange is 7, 10 and 11px per side, the most a button of that size can give back at the end of the group without its padding going below 0 in the spring's overshoot (10px without a `size`). An icon-only button keeps its icon and 2px each side, so next to a pressed button at the end of the group it may give back less than asked and the group widens by the difference. `size` (`xs`, `sm`, `default`, `lg` or `xl`) is shared by every `Button` and `IconButton` in the group through a context; a child with a `size` of its own keeps it. `data-slot="button-group"`, `data-look` and `data-size` are on the host. On a coarse pointer the gap grows to `max(8px, 44px - the size's height)` (20px at `xs`, 12px at `sm`, 8px from `default`), so every button, across and between wrapped rows, keeps a 44px hit area that touches no neighbour's.
|
|
54
|
+
|
|
55
|
+
A `ButtonGroup` without `look` is unchanged: the original rules (tinted, rounded children, `w-full`, 8px of padding) now apply to `.nxgt-button-group:not(:where([data-look]))`, at the same specificity as before; `size` works on it too.
|
|
56
|
+
|
|
57
|
+
`Button`'s `outlined` variant keeps its line in forced colours (a `ButtonText` outline, where the inset shadow is removed), as `IconButton`'s does.
|
|
58
|
+
|
|
59
|
+
- [#1444](https://github.com/softistx/nxgt-material/pull/1444) [`9215bc1`](https://github.com/softistx/nxgt-material/commit/9215bc181f93f24cc4151b5ab168ecb40b4e790d) Thanks [@SteveGT96](https://github.com/SteveGT96)! - IconButton goes Material 3 Expressive, on the look `Button` already has. New options and one narrow type break (see the Type note): `size` is `xs`, `sm`, `default`, `lg` or `xl` (24, 32, 36, 40 and 56 px, with icons of 14, 16, 18, 20 and 28 px), and `width` is `narrow`, `default` or `wide` (0.78, 1 and 1.45 times the height); `width` is ignored when `shape` draws the button as an expressive shape (a warning in development). A button without a `size` is exactly what it was: 36 px, a circle, a 16 px icon (an explicit `size="default"` has an 18 px icon; the ladder's icon size applies to a glyph without its own `size-*` class, and the `Icon` component is 16 px unless sized). `iconButtonVariants` takes `size` and `width` too (`ScrollToTop`'s props follow). The `morph` options (`pill`, `round`, `none`) keep their meaning; a toggle now sets `data-selected` and its fill is the one `Button` shares (`morph-fill.css`), the pill being the button's own width rather than a `::before`.
|
|
60
|
+
|
|
61
|
+
**Visual changes** (every `IconButton`, and what uses `iconButtonVariants`: the close buttons of Dialog, Drawer and Sheet):
|
|
62
|
+
|
|
63
|
+
- The `filled` and `tonal` variants lose their `shadow-xs`, and the `outlined` line is Button's: 1.5 px inside the box at 55 % of the colour, instead of a 1 px border at 50 %; it gives way to the fill when selected and disappears when disabled.
|
|
64
|
+
- A `ghost` toggle without a `color` is neutral when selected too (a 12 % tint of the text colour, the icon in full text colour); it is primary only when a `color` is set. Its focus outline is the text's colour.
|
|
65
|
+
- The focus is a 2 px outline in the colour, 2 px off the button, instead of a 3 px ring; `aria-invalid` focuses in the error colour.
|
|
66
|
+
- A disabled button has neutral text and icon (40 % of the text colour) and a neutral fill (12 %), except `ghost` and `link`, which stay transparent, instead of 50 % opacity; a disabled `outlined` button loses its line.
|
|
67
|
+
- An `aria-invalid` button no longer draws an error border and ring: only its focus outline (and an `outlined` line) turns to the error colour.
|
|
68
|
+
- A pill toggle's selected width follows its `size`; use `size` rather than a `size-*` class on a pill toggle.
|
|
69
|
+
- A pressed button squeezes (the corners go toward a square, and it scales to .97); reduced motion keeps the colour change only.
|
|
70
|
+
- On a coarse pointer every size has a 44 px hit area, a shaped button too.
|
|
71
|
+
- Toolbar items and shaped buttons keep their own looks.
|
|
72
|
+
- An `IconButton` without a `variant` is the `filled` one in `data-variant` too, so a disabled one no longer has an invisible icon; in an editor toolbar, a variant-less IconButton now matches `[data-variant=filled]` selectors (every shipped ToolbarIconButton passes a variant).
|
|
73
|
+
- `Sheet`'s close button merges the variant's classes with its own position and touch box through `cn`, so the size classes of the ladder do not fight the touch box's; Dialog, Sheet, Drawer, Popover and AlertDialog give their content no `ButtonGroup` size, where an overlay opened from a sized group used to pass it on.
|
|
74
|
+
|
|
75
|
+
**Type note**: `IconButton` and `IconLinkButton` now have a typed `size`, so spreading a `Button`'s props into them no longer compiles when `size` is `icon`, `icon-xs`, `icon-sm`, `icon-lg` or `2xl`: drop `size` before spreading (`const { size, ...rest } = props`). `Button`'s `shape` (`round` or `square`) is likewise not `IconButton`'s `shape` (an expressive shape name).
|
|
76
|
+
|
|
77
|
+
- [#1433](https://github.com/softistx/nxgt-material/pull/1433) [`f66606d`](https://github.com/softistx/nxgt-material/commit/f66606d86c847aefbfcef94f2c8d525ff052b510) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Typography takes the Material 3 type scale. `variant` accepts `display`, `headline`, `title`, `body` and `label`, each in `lg`, `md` and `sm` (`title-md`, `body-sm`…), `body-md` by default, and the new `emphasized` prop gives the same step a heavier weight. The scale is a set of Tailwind 4 tokens in `styles.css`, `--text-<role>-<size>` with its `--line-height`, `--letter-spacing` and `--font-weight` (and `--font-weight-em` for the emphasized weight), so `text-title-md` and `text-title-md-em` are native utilities that set size, line height, tracking and weight together. An app or a zone retunes any of them with a CSS variable on `:root` or the zone; a variable font such as Inter reads the numeric weights on its `wght` axis. There is no `defineTheme` key.
|
|
78
|
+
|
|
79
|
+
The fifteen former variants stay, deprecated, as aliases of the scale by name, the old semibold ones on the emphasized step, so no type breaks but **their sizes change**:
|
|
80
|
+
|
|
81
|
+
| Former variant | Now | Size before → after |
|
|
82
|
+
| --- | --- | --- |
|
|
83
|
+
| `normal`, `body-medium` | `body-md` | 14 → 14 px (weight 400, which `Typography` now sets itself instead of inheriting its parent's) |
|
|
84
|
+
| `body-small` | `body-sm` | 12 → 12 px |
|
|
85
|
+
| `caption` | `label-sm`, muted | 10 → 11 px |
|
|
86
|
+
| `title-small` | `title-sm` emphasized | 16 → 14 px |
|
|
87
|
+
| `title-medium` | `title-md` emphasized | 18 → 16 px |
|
|
88
|
+
| `title-large` | `title-lg` emphasized | 20 → 22 px |
|
|
89
|
+
| `headline-small` | `headline-sm` emphasized | 24 → 24 px |
|
|
90
|
+
| `headline-medium` | `headline-md` emphasized | 30 → 28 px |
|
|
91
|
+
| `headline-large` | `headline-lg` emphasized | 36 → 32 px |
|
|
92
|
+
| `headline-larger` | `display-sm` emphasized | 48 → 36 px |
|
|
93
|
+
| `huge-small` | `display-sm` emphasized | 60 → 36 px |
|
|
94
|
+
| `huge-medium` | `display-md` emphasized | 72 → 45 px |
|
|
95
|
+
| `huge-large`, `huge-larger` | `display-lg` emphasized | 96 → 57 px |
|
|
96
|
+
|
|
97
|
+
The weights follow the scale too (emphasized 540 to 700 instead of 600), as do the line heights and the tracking. The bare `h1` to `h6` elements (`base.css`) read the scale too, with weight 500: `h1` is `headline-md` (24 → 28 px), `h2` `headline-sm` (20 → 24 px), `h3` `title-lg` (18 → 22 px), `h4` `title-md` (16 px), `h5` `title-sm` (14 px) and `h6` `label-md` (12 px), each with the step's line height and tracking, so retuning a step retunes the headings.
|
|
98
|
+
|
|
3
99
|
## 3.10.2
|
|
4
100
|
|
|
5
101
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -420,7 +420,7 @@ Each area a consumer starts from has its own page under `docs/guides/`.
|
|
|
420
420
|
| --- | --- |
|
|
421
421
|
| [Forms](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/forms.md) | wiring fields to React Hook Form and Zod, composite values (contacts, opening hours), config-driven `Field`, server errors, what each field emits |
|
|
422
422
|
| [i18n](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/i18n.md) | adding your strings next to the package's, switching language, translated Zod messages, SSR without a text mismatch |
|
|
423
|
-
| [App shell](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md) | laying out an app with `ActivityLayout` (route changes cross-fade by default, `routeTransition={false}` opts out; it draws the theme's background, `backdrop` is the exception and `backdrop={false}` a plain page), its `items` (rendered as links; `linkComponent` to pass your own), the brand (`logo`, `name`, and `context` for the phone sheet's tenant line), the header's title, a route's `handle.title` as the page's `h1` in the app bar (`AppShellHandle`, `PageTitle`; it labels `<main>`, and `usePageTitleFocus()` focuses it after a navigation), and `AccountMenu`, the active entry and breadcrumbs (needs a data router; `breadcrumbRoot` replaces the home icon with a text link), the `<main>` landmark, the `h1` title, document scrolling, and a background preset behind the shell (`backdrop`) |
|
|
423
|
+
| [App shell](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/app-shell.md) | laying out an app with `ActivityLayout` (route changes cross-fade by default, `routeTransition={false}` opts out; it draws the theme's background, `backdrop` is the exception and `backdrop={false}` a plain page), its `items` (rendered as links; `linkComponent` to pass your own), the brand (`logo`, `name`, and `context` for the phone sheet's tenant line), the header's title, a route's `handle.title` as the page's `h1` in the app bar (`AppShellHandle`, `PageTitle`; it labels `<main>`, and `usePageTitleFocus()` focuses it after a navigation), and `AccountMenu`, the active entry and breadcrumbs (needs a data router; `breadcrumbRoot` replaces the home icon with a text link, `breadcrumb={false}` hides the trail), the `<main>` landmark, the `h1` title, document scrolling, and a background preset behind the shell (`backdrop`) |
|
|
424
424
|
| [Themes for your app](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/themes.md) | defining app themes, generating their stylesheets and types with the Vite plugin's `themes` option or the `nxgt-theme` command, the CI check |
|
|
425
425
|
| [Theming](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/theming.md) | changing colours, radius or fonts, motion and corner tokens, dark mode, tones (the `data-tone` channel, app tones and the calm zone `data-density="calm"`), touch targets, using the compiled CSS without Tailwind |
|
|
426
426
|
| [Printing](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/printing.md) | producing PDFs with `@nxgt/material/print` and getting the file in one call (download, new tab, preview, server `Response`) — its own entry since 2.0.0, with optional peers, a bundling trap on SSR servers, and the `next.config.ts` a Next.js route handler (and `output: 'standalone'`) needs |
|
|
@@ -476,7 +476,7 @@ Not components: what the stylesheet gives any element.
|
|
|
476
476
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-accordion.webp" width="120" alt="Accordion"> | [`Accordion`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#accordion), `AccordionItem`, `AccordionTrigger`, `AccordionContent` | Collapsible sections whose content springs open, in three looks (`flush`, `separated` cards, `contained` list) and three sizes. | `Accordion` (same parts) |
|
|
477
477
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-collapsible.webp" width="120" alt="Collapsible"> | [`Collapsible`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#collapsible), `CollapsibleTrigger`, `CollapsibleContent` | A single show / hide region that springs open, and its trigger (optionally styled: `tonal` or `text`). | `Collapsible` (same parts) |
|
|
478
478
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-card.webp" width="120" alt="Card"> | [`Card`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#card), `CardHeader`, `CardTitle`, `CardDescription`, `CardAction`, `CardContent`, `CardFooter` | Card surface with header, action slot, content and footer. | `Card` (same parts) |
|
|
479
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-typography.webp" width="120" alt="Typography"> | [`Typography`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#typography) | Text in the Material type scale
|
|
479
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-typography.webp" width="120" alt="Typography"> | [`Typography`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#typography) | Text in the Material 3 type scale: display, headline, title, body and label in three sizes, `emphasized` for the heavier weight; the former names are deprecated aliases. | `Typography` |
|
|
480
480
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-anchorheading.webp" width="120" alt="AnchorHeading"> | [`AnchorHeading`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#anchorheading) | Heading with a hover copy-link (always visible on the phone). | `AnchorHeading` |
|
|
481
481
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-label.webp" width="120" alt="Label"> | [`Label`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#label) | Form label with an optional required asterisk. | `Label` |
|
|
482
482
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/primitives-helpertext.webp" width="120" alt="HelperText"> | [`HelperText`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/primitives.md#helpertext) | Hint or error message under a field. | `HelperText` |
|
|
@@ -499,9 +499,9 @@ Not components: what the stylesheet gives any element.
|
|
|
499
499
|
|
|
500
500
|
| Preview | Component | What it does | @nxgt/material-vue |
|
|
501
501
|
| --- | --- | --- | --- |
|
|
502
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-button.webp" width="120" alt="Button"> | [`Button`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#button) | Filled, tonal, outlined, ghost or link button in seven colours,
|
|
503
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-iconbutton.webp" width="120" alt="IconButton"> | [`IconButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#iconbutton) | Icon-only button with an optional tooltip; `shape` draws it as an expressive shape and morphs when it changes. | `IconButton` |
|
|
504
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-buttongroup.webp" width="120" alt="ButtonGroup"> | [`ButtonGroup`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#buttongroup) | Joins adjacent buttons into one control. | `ButtonGroup` |
|
|
502
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-button.webp" width="120" alt="Button"> | [`Button`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#button) | Filled, tonal, outlined, ghost or link button in seven colours, six sizes (24 to 96 px), round or square (`shape`), a `selected` toggle and a loading state. | `Button` |
|
|
503
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-iconbutton.webp" width="120" alt="IconButton"> | [`IconButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#iconbutton) | Icon-only button in five sizes and three widths, with an optional tooltip; a toggle fills and widens; `shape` draws it as an expressive shape and morphs when it changes. | `IconButton` |
|
|
504
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-buttongroup.webp" width="120" alt="ButtonGroup"> | [`ButtonGroup`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#buttongroup) | Joins adjacent buttons into one control; `look="standard"` widens the pressed one and `size` is shared. | `ButtonGroup` |
|
|
505
505
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-splitbutton.webp" width="120" alt="SplitButton"> | [`SplitButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#splitbutton) | Main action plus a menu of related ones: two halves, five sizes, an open state that morphs. | `SplitButton` |
|
|
506
506
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-fab.webp" width="120" alt="Fab"> | [`Fab`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#fab), `FabDock` | The screen's main floating action: four sizes, tonal or filled in three tones or an app tone, extended, folds on scroll (`useScrollAway`). | — |
|
|
507
507
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-fabmenu.webp" width="120" alt="FabMenu"> | [`FabMenu`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#fabmenu) | A FAB that opens a few related actions as pills, with a scrim. | — |
|
|
@@ -593,20 +593,19 @@ Not components: what the stylesheet gives any element.
|
|
|
593
593
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-avatar.webp" width="120" alt="Avatar"> | [`Avatar`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#avatar), `AvatarImage`, `AvatarFallback`, `AvatarBase` | Image with a fallback and an optional online / offline dot; `shape` clips it to an expressive shape; `tone` colours the fallback. | `Avatar`, `AvatarImage`, `AvatarFallback` |
|
|
594
594
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-avatargroup.webp" width="120" alt="AvatarGroup"> | [`AvatarGroup`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#avatargroup) | Overlapping avatars with a `+N` overflow. | `AvatarGroup` |
|
|
595
595
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-shape.webp" width="120" alt="Shape"> | [`Shape`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#shape) | Material 3 Expressive's 35 shapes and a squircle as a backdrop, an icon container or a mask for a photo, with a morph; eight tones or an app tone. | — |
|
|
596
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-badge.webp" width="120" alt="Badge"> | [`Badge`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#badge) |
|
|
596
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-badge.webp" width="120" alt="Badge"> | [`Badge`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#badge) | Status pill, 20 px: default, secondary, error, success, info, warning, `soft` (tonal, for states), outlined. | `Badge` |
|
|
597
597
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-countbadge.webp" width="120" alt="CountBadge"> | [`CountBadge`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#countbadge) | Count in the corner of its children, capped at `99+` and hidden at 0; `animated` pops it in when it changes. | `CountBadge` |
|
|
598
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-countbadge.webp" width="120" alt="CountBadge"> | [`CountBadge`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#countbadge) | Count in the corner of its children, capped at `99+` and hidden at 0. | `CountBadge` |
|
|
599
598
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-dayseparator.webp" width="120" alt="DaySeparator"> | [`DaySeparator`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#dayseparator), `isNewDay`, `formatDayLabel` | "Today", "Yesterday", the weekday or the date between two hairlines, in the provider's language; sticky if asked. | — |
|
|
600
599
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-periodcards.webp" width="120" alt="PeriodCards"> | [`PeriodCards`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#periodcards) | Consecutive date ranges (terms, sprints) as cards: a "Current" marker with `aria-current`, a link over each card, as many 14rem columns as fit (one on a phone). | — |
|
|
601
600
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-chip.webp" width="120" alt="Chip"> | [`Chip`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#chip) | Compact pill in three looks (hairline, soft, tag) and a dashed add pill, with leading, avatar and trailing slots, a selected state and a dismiss button; a coloured soft chip reads as a status (the tone's container, its text colour on it). | `Chip` |
|
|
602
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-statcard.webp" width="120" alt="StatCard"> | [`StatCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#statcard) | KPI tile with value, hint, icon, toned delta and a loading skeleton; `tone` and `variant` (`outlined`, `tonal`, `filled`) colour it, `valueSize` enlarges the value. | `StatCard` |
|
|
601
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-statcard.webp" width="120" alt="StatCard"> | [`StatCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#statcard) | KPI tile with value, hint, icon, toned delta and a loading skeleton; `tone` and `variant` (`outlined`, `tonal`, `filled`) colour it, `valueSize` enlarges the value, `size="sm"` makes a compact tile (it ignores `hint`, `delta` and `valueSize`). | `StatCard` |
|
|
603
602
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-metric-cards.webp" width="120" alt="TrendCard"> | [`TrendCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#metric-cards), `GoalCard`, `BreakdownCard`, `RankCard`, `CompareCard`, `HeatweekCard`, `FunnelCard`, `GaugeCard`, `SparkbarCard`, `DeltaListCard`, `BandCard`, `LatencyCard`, `RatioCard`, `ThresholdCard`, `PaceCard`, `HistogramCard`, `Sparkline` | Dashboard tiles including compare, heat, funnel, gauge, spark bars, delta list, range band, latency, ratio, threshold, pace and labelled histogram. Container queries. A `tone` (named, or your app's) draws the accent in it; deltas and breaches stay semantic. | `TrendCard`, `GoalCard`, `BreakdownCard`, `RankCard`, `CompareCard`, `HeatweekCard`, `FunnelCard`, `GaugeCard`, `SparkbarCard`, `DeltaListCard`, `BandCard`, `LatencyCard`, `RatioCard`, `ThresholdCard`, `PaceCard`, `HistogramCard` |
|
|
604
603
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-card-presets.webp" width="120" alt="FeatureCard"> | [`FeatureCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#card-presets), `MediaCard`, `PricingCard`, `ProfileCard`, `QuoteCard`, `OverlayCard`, `SpotlightCard`, `CrewCard`, `SplitCard`, `TicketCard`, `NoticeCard`, `TimelineCard`, `MessageCard`, `EventCard`, `StackCard`, `LinkCard`, `AlbumCard`, `TagCard`, `ReceiptCard`, `ReviewCard`, `OfferCard`, `PlaceCard`, `FileCard`, `StatusCard`, `ScoreCard`, `ShortcutCard`, `ChecklistCard` | Card presets including overlay, ticket, inbox, event, stack, link, album, tags, receipt, review, offer, place, file, status, score, shortcuts and checklist. Container queries. | `FeatureCard`, `MediaCard`, `PricingCard`, `ProfileCard`, `QuoteCard`, `OverlayCard`, `SpotlightCard`, `CrewCard`, `SplitCard`, `TicketCard`, `NoticeCard`, `TimelineCard`, `MessageCard`, `EventCard`, `StackCard`, `LinkCard`, `AlbumCard`, `TagCard`, `ReceiptCard`, `ReviewCard`, `OfferCard`, `PlaceCard`, `FileCard`, `StatusCard`, `ScoreCard`, `ShortcutCard`, `ChecklistCard` |
|
|
605
604
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-statusindicator.webp" width="120" alt="StatusIndicator"> | [`StatusIndicator`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#statusindicator) | Coloured status dot with an optional pulse and label. | `StatusIndicator` |
|
|
606
605
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-summarydata.webp" width="120" alt="SummaryData"> | [`SummaryData`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#summarydata) | Label / value pairs as a grid or inline; hides empty values. | `SummaryData` |
|
|
607
606
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-description.webp" width="120" alt="Description"> | [`Description`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#description) | Read-only label / value pair that renders nothing when empty. | `Description` |
|
|
608
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-entityheader.webp" width="120" alt="EntityHeader"> | [`EntityHeader`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#entityheader) | Page header with icon, title, status, metadata and actions. | `EntityHeader` |
|
|
609
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-listtile.webp" width="120" alt="ListTile"> | [`ListTile`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#listtile) | Row with leading / trailing slots, title and subtitle; becomes a link or button when interactive. `size="sm"` is the dense row. | `ListTile` |
|
|
607
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-entityheader.webp" width="120" alt="EntityHeader"> | [`EntityHeader`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#entityheader) | Page header with icon, title, status, metadata, `stats` (figures as compact `size="sm"` StatCard tiles) and actions. | `EntityHeader` |
|
|
608
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-listtile.webp" width="120" alt="ListTile"> | [`ListTile`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#listtile) | Row with leading / trailing slots, title and subtitle; becomes a link (with a decorative chevron) or button when interactive. `size="sm"` is the dense row. | `ListTile` |
|
|
610
609
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-accordioncard.webp" width="120" alt="AccordionCard"> | [`AccordionCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#accordioncard) | Renders `items` (title, content) as a styled accordion. | `AccordionCard` |
|
|
611
610
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-timeline.webp" width="120" alt="Timeline"> | [`Timeline`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#timeline), `TimelineItem`, `RelativeTime` | Vertical event timeline with toned icons and relative times. | `Timeline`, `TimelineItem`, `RelativeTime` |
|
|
612
611
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-eventchip.webp" width="120" alt="EventChip"> | [`EventChip`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#eventchip) | Calendar event pill — soft, solid or outlined — with its times, all-day and continuation edges. | `EventChip` |
|
|
@@ -682,7 +681,7 @@ Not components: what the stylesheet gives any element.
|
|
|
682
681
|
| Preview | Component | What it does | @nxgt/material-vue |
|
|
683
682
|
| --- | --- | --- | --- |
|
|
684
683
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/feedback-status-alert.webp" width="120" alt="Alert"> | [`Alert`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/feedback-and-status.md#alert) | Callout with icon, title and description in seven tones. | `Alert` |
|
|
685
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/feedback-status-banner.webp" width="120" alt="Banner"> | [`Banner`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/feedback-and-status.md#banner) | Dismissible info / success / warning / error banner with an action. | `Banner` |
|
|
684
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/feedback-status-banner.webp" width="120" alt="Banner"> | [`Banner`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/feedback-and-status.md#banner) | Dismissible info / success / warning / error banner with an action, in the look of `Alert` (light surface, start bar). | `Banner` |
|
|
686
685
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/feedback-status-alertdialog.webp" width="120" alt="AlertDialog"> | [`AlertDialog`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/feedback-and-status.md#alertdialog), `AlertDialogContent`, `AlertDialogAction`, `AlertDialogCancel`… | Parts for a blocking confirmation dialog. | `AlertDialog` (same parts) |
|
|
687
686
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/feedback-status-confirmdialog.webp" width="120" alt="ConfirmDialog"> | [`ConfirmDialog`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/feedback-and-status.md#confirmdialog), `ConfirmationDialog`, `CustomAlertDialog` | Confirm / cancel dialog with async loading. `ConfirmationDialog` adds a trigger and an optional Zod form. | `ConfirmDialog`, `ConfirmationDialog`, `CustomAlertDialog` |
|
|
688
687
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/feedback-status-customdialog.webp" width="120" alt="CustomDialog"> | [`CustomDialog`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/feedback-and-status.md#customdialog) | Ready-made dialog with trigger, icon, title, body and footer. | `CustomDialog` |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as e, r as t, t as n } from "./stored-language-BeIKw3-K.js";
|
|
2
|
-
import { r } from "./translator-
|
|
2
|
+
import { r } from "./translator-Dje8HrNz.js";
|
|
3
3
|
import { t as i } from "./_baseIsEqual-C6ksIHya.js";
|
|
4
4
|
import { useMemo as a } from "react";
|
|
5
5
|
import { asyncThunkCreator as o, buildCreateSlice as s } from "@reduxjs/toolkit";
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
+
import { n as t, t as n } from "./dist-DVRQkaTK.js";
|
|
3
|
+
import { o as r, t as i } from "./tooltip-CkttDIab.js";
|
|
4
|
+
import { t as a } from "./is-production-GLw59WU8.js";
|
|
5
|
+
import { t as o } from "./spinner-BtSIYVrC.js";
|
|
6
|
+
import { a as s, i as c, r as l, t as u } from "./button-tones-BwuVvAmd.js";
|
|
7
|
+
import { t as d } from "./button-group-context-CaP0X5p_.js";
|
|
8
|
+
import { t as f } from "./has-text-content-Ds2dkHX_.js";
|
|
9
|
+
import { Children as p, Fragment as m, cloneElement as h, isValidElement as g, useCallback as _, useContext as v, useEffect as y, useRef as b, useState as x } from "react";
|
|
10
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
11
|
+
//#region lib/components/ui/actions/button/busy-click-capture.ts
|
|
12
|
+
function w(e, t, n) {
|
|
13
|
+
return (r) => {
|
|
14
|
+
if (e || t.isLocked()) {
|
|
15
|
+
r.preventDefault(), r.stopPropagation();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
t.lock(), n?.(r);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region lib/components/ui/actions/button/button.compound-variants.ts
|
|
23
|
+
var T = [
|
|
24
|
+
{
|
|
25
|
+
variant: "filled",
|
|
26
|
+
color: "primary",
|
|
27
|
+
class: "bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--color-primary)_90%,black)] [&_svg]:data-[slot=icon]:text-primary-foreground active:bg-[color-mix(in_oklab,var(--color-primary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-primary)_85%,black)]"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
variant: "filled",
|
|
31
|
+
color: "secondary",
|
|
32
|
+
class: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--color-secondary)_90%,black)] [&_svg]:data-[slot=icon]:text-secondary-foreground active:bg-[color-mix(in_oklab,var(--color-secondary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-secondary)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-secondary)_70%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-secondary)_50%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))]"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
variant: "filled",
|
|
36
|
+
color: "success",
|
|
37
|
+
class: "bg-success text-success-foreground hover:bg-[color-mix(in_oklab,var(--color-success)_90%,black)] [&_svg]:data-[slot=icon]:text-success-foreground active:bg-[color-mix(in_oklab,var(--color-success)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-success)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-success)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-success)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))]"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
variant: "filled",
|
|
41
|
+
color: "info",
|
|
42
|
+
class: "bg-info text-info-foreground hover:bg-[color-mix(in_oklab,var(--color-info)_90%,black)] [&_svg]:data-[slot=icon]:text-info-foreground active:bg-[color-mix(in_oklab,var(--color-info)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-info)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-info)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-info)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))]"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
variant: "filled",
|
|
46
|
+
color: "warning",
|
|
47
|
+
class: "bg-warning text-warning-foreground hover:bg-[color-mix(in_oklab,var(--color-warning)_90%,black)] [&_svg]:data-[slot=icon]:text-warning-foreground active:bg-[color-mix(in_oklab,var(--color-warning)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-warning)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-warning)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))]"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
variant: "filled",
|
|
51
|
+
color: "error",
|
|
52
|
+
class: "bg-error text-error-foreground hover:bg-[color-mix(in_oklab,var(--color-error)_90%,black)] [&_svg]:data-[slot=icon]:text-error-foreground active:bg-[color-mix(in_oklab,var(--color-error)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-error)_85%,black)]"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
variant: "filled",
|
|
56
|
+
color: "default",
|
|
57
|
+
class: "bg-foreground text-background hover:bg-[color-mix(in_oklab,var(--color-foreground)_90%,var(--color-background))] [&_svg]:data-[slot=icon]:text-foreground active:bg-[color-mix(in_oklab,var(--color-foreground)_70%,var(--color-background))] focus:bg-[color-mix(in_oklab,var(--color-foreground)_80%,var(--color-background))]"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
variant: "tonal",
|
|
61
|
+
color: "primary",
|
|
62
|
+
class: `${l.primary} ${u.primary} bg-primary/15 hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
variant: "tonal",
|
|
66
|
+
color: "secondary",
|
|
67
|
+
class: `${l.secondary} ${u.secondary} bg-secondary/15 hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
variant: "tonal",
|
|
71
|
+
color: "info",
|
|
72
|
+
class: `${l.info} ${u.info} bg-info/15 hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
variant: "tonal",
|
|
76
|
+
color: "success",
|
|
77
|
+
class: `${l.success} ${u.success} bg-success/15 hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
variant: "tonal",
|
|
81
|
+
color: "warning",
|
|
82
|
+
class: `${l.warning} ${u.warning} bg-warning/15 hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
variant: "tonal",
|
|
86
|
+
color: "error",
|
|
87
|
+
class: `${l.error} ${u.error} bg-error/15 hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
variant: "tonal",
|
|
91
|
+
color: "default",
|
|
92
|
+
class: `${l.default} ${u.default} bg-foreground/15 hover:bg-foreground/10 active:bg-muted focus:bg-muted`
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
variant: "ghost",
|
|
96
|
+
color: "primary",
|
|
97
|
+
class: `${l.primary} ${u.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
variant: "ghost",
|
|
101
|
+
color: "default",
|
|
102
|
+
class: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
color: "secondary",
|
|
107
|
+
class: `${l.secondary} ${u.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
variant: "ghost",
|
|
111
|
+
color: "success",
|
|
112
|
+
class: `${l.success} ${u.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
variant: "ghost",
|
|
116
|
+
color: "info",
|
|
117
|
+
class: `${l.info} ${u.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
variant: "ghost",
|
|
121
|
+
color: "warning",
|
|
122
|
+
class: `${l.warning} ${u.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
variant: "ghost",
|
|
126
|
+
color: "error",
|
|
127
|
+
class: `${l.error} ${u.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
variant: "outlined",
|
|
131
|
+
color: "primary",
|
|
132
|
+
class: `${l.primary} ${u.primary} focus:bg-primary/10 hover:bg-primary/10`
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
variant: "outlined",
|
|
136
|
+
color: "secondary",
|
|
137
|
+
class: `${l.secondary} ${u.secondary} focus:bg-secondary/10 hover:bg-secondary/10`
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
variant: "outlined",
|
|
141
|
+
color: "info",
|
|
142
|
+
class: `${l.info} ${u.info} focus:bg-info/10 hover:bg-info/10`
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
variant: "outlined",
|
|
146
|
+
color: "success",
|
|
147
|
+
class: `${l.success} ${u.success} focus:bg-success/10 hover:bg-success/10`
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
variant: "outlined",
|
|
151
|
+
color: "warning",
|
|
152
|
+
class: `${l.warning} ${u.warning} focus:bg-warning/10 hover:bg-warning/10`
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
variant: "outlined",
|
|
156
|
+
color: "error",
|
|
157
|
+
class: `${l.error} ${u.error} focus:bg-error/10 hover:bg-error/10`
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
variant: "outlined",
|
|
161
|
+
color: "default",
|
|
162
|
+
class: `${l.default} ${u.default} focus:bg-foreground/10 hover:bg-foreground/10`
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
variant: "link",
|
|
166
|
+
color: "primary",
|
|
167
|
+
class: `${l.primary} ${u.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
variant: "link",
|
|
171
|
+
color: "secondary",
|
|
172
|
+
class: `${l.secondary} ${u.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
variant: "link",
|
|
176
|
+
color: "success",
|
|
177
|
+
class: `${l.success} ${u.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
variant: "link",
|
|
181
|
+
color: "info",
|
|
182
|
+
class: `${l.info} ${u.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
variant: "link",
|
|
186
|
+
color: "warning",
|
|
187
|
+
class: `${l.warning} ${u.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
variant: "link",
|
|
191
|
+
color: "error",
|
|
192
|
+
class: `${l.error} ${u.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
variant: "link",
|
|
196
|
+
color: "default",
|
|
197
|
+
class: `${l.default} ${u.default} hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
|
|
198
|
+
}
|
|
199
|
+
], E = r("nxgt-btn nxgt-morph-fill inline-flex center gap-[var(--btn-gap,0.5rem)] h-min cursor-pointer whitespace-nowrap disabled:pointer-events-none aria-busy:cursor-progress [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-[var(--btn-ic,1rem)] shrink-0 [&_svg]:shrink-0 aria-invalid:[--btn-focus:var(--color-error)] aria-invalid:[--btn-line:var(--color-error)] px-[calc(var(--btn-px,1rem)+var(--btn-dx,0px))] py-2 has-[>svg]:px-[calc(var(--btn-px,1rem)-var(--btn-pxi,0.25rem)+var(--btn-dx,0px))]", {
|
|
200
|
+
variants: {
|
|
201
|
+
variant: {
|
|
202
|
+
filled: "",
|
|
203
|
+
tonal: "",
|
|
204
|
+
ghost: "nxgt-btn-bare",
|
|
205
|
+
outlined: "shadow-[inset_0_0_0_1.5px_color-mix(in_oklab,var(--btn-line,currentColor)_55%,transparent)]",
|
|
206
|
+
link: "nxgt-btn-bare focus:underline underline-offset-4 hover:underline"
|
|
207
|
+
},
|
|
208
|
+
color: c,
|
|
209
|
+
size: {
|
|
210
|
+
xs: "h-(--btn-h) [--btn-h:24px] [--btn-px:12px] [--btn-pxi:4px] [--btn-gap:4px] [--btn-ic:14px] [--btn-sq:6px] [--btn-fs:var(--text-label-md)] [--btn-lh:var(--text-label-md--line-height)] [--btn-ls:var(--text-label-md--letter-spacing)] [--btn-fw:560]",
|
|
211
|
+
sm: "h-(--btn-h) [--btn-h:32px] [--btn-px:16px] [--btn-pxi:4px] [--btn-gap:6px] [--btn-ic:16px] [--btn-sq:8px] [--btn-fs:var(--text-label-lg)] [--btn-lh:var(--text-label-lg--line-height)] [--btn-ls:var(--text-label-lg--letter-spacing)] [--btn-fw:580]",
|
|
212
|
+
default: "h-(--btn-h) [--btn-h:36px] [--btn-px:18px] [--btn-pxi:5px] [--btn-gap:8px] [--btn-ic:18px] [--btn-sq:10px] [--btn-fs:var(--text-label-lg)] [--btn-lh:var(--text-label-lg--line-height)] [--btn-ls:var(--text-label-lg--letter-spacing)] [--btn-fw:600]",
|
|
213
|
+
lg: "h-(--btn-h) [--btn-h:40px] [--btn-px:24px] [--btn-pxi:8px] [--btn-gap:8px] [--btn-ic:20px] [--btn-sq:12px] [--btn-fs:var(--text-title-md)] [--btn-lh:var(--text-title-md--line-height)] [--btn-ls:var(--text-title-md--letter-spacing)] [--btn-fw:620]",
|
|
214
|
+
xl: "h-(--btn-h) [--btn-h:56px] [--btn-px:40px] [--btn-pxi:14px] [--btn-gap:12px] [--btn-ic:28px] [--btn-sq:16px] [--btn-fs:var(--text-headline-sm)] [--btn-lh:var(--text-headline-sm--line-height)] [--btn-ls:var(--text-headline-sm--letter-spacing)] [--btn-fw:650]",
|
|
215
|
+
"2xl": "h-(--btn-h) [--btn-h:96px] [--btn-px:64px] [--btn-pxi:20px] [--btn-gap:16px] [--btn-ic:44px] [--btn-sq:28px] [--btn-scale:0.985] [--btn-fs:var(--text-headline-lg)] [--btn-lh:var(--text-headline-lg--line-height)] [--btn-ls:var(--text-headline-lg--letter-spacing)] [--btn-fw:700]",
|
|
216
|
+
icon: "size-9 px-0 py-0 has-[>svg]:px-0 [--btn-h:36px] [--btn-sq:10px]",
|
|
217
|
+
"icon-xs": "size-6 px-0 py-0 has-[>svg]:px-0 [--btn-h:24px] [--btn-sq:6px] [--btn-ic:12px]",
|
|
218
|
+
"icon-sm": "size-8 px-0 py-0 has-[>svg]:px-0 [--btn-h:32px] [--btn-sq:8px]",
|
|
219
|
+
"icon-lg": "size-10 px-0 py-0 has-[>svg]:px-0 [--btn-h:40px] [--btn-sq:12px]"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
defaultVariants: {
|
|
223
|
+
variant: "filled",
|
|
224
|
+
color: "primary"
|
|
225
|
+
},
|
|
226
|
+
compoundVariants: T
|
|
227
|
+
}), D = ((e) => E(e?.variant === "ghost" && e.color == null ? {
|
|
228
|
+
...e,
|
|
229
|
+
color: "default"
|
|
230
|
+
} : e)), O = {
|
|
231
|
+
xs: "min-h-6",
|
|
232
|
+
sm: "min-h-8",
|
|
233
|
+
default: "min-h-9",
|
|
234
|
+
lg: "min-h-10",
|
|
235
|
+
xl: "min-h-14",
|
|
236
|
+
"2xl": "min-h-24"
|
|
237
|
+
};
|
|
238
|
+
function k(e, t) {
|
|
239
|
+
return !e || t?.startsWith("icon") ? !1 : `h-auto ${t ? O[t] : ""} whitespace-normal **:whitespace-normal text-center`;
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region lib/components/ui/actions/button/label-text.tsx
|
|
243
|
+
function A(e) {
|
|
244
|
+
let t = [], n = 0, r = [], i = () => {
|
|
245
|
+
if (r.length === 0) return;
|
|
246
|
+
let e = r.join("");
|
|
247
|
+
r = [], e.trim() === "" ? t.push(e) : t.push(/* @__PURE__ */ S("span", {
|
|
248
|
+
"data-slot": "button-label",
|
|
249
|
+
children: e
|
|
250
|
+
}, `label-${n++}`));
|
|
251
|
+
};
|
|
252
|
+
for (let n of p.toArray(e)) {
|
|
253
|
+
if (typeof n == "string" || typeof n == "number" || typeof n == "bigint") {
|
|
254
|
+
r.push(n);
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
i(), t.push(j(n));
|
|
258
|
+
}
|
|
259
|
+
return i(), t;
|
|
260
|
+
}
|
|
261
|
+
function j(e) {
|
|
262
|
+
return g(e) && e.type === m ? h(e, void 0, A(e.props.children)) : e;
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region lib/components/ui/actions/button/use-click-lock.ts
|
|
266
|
+
var M = 1e3;
|
|
267
|
+
function N(e, t) {
|
|
268
|
+
let n = b(!1), r = b(!1), i = b(void 0), [a, o] = x(!1), s = _(() => {
|
|
269
|
+
n.current = !1, r.current = !1, clearTimeout(i.current), o(!1);
|
|
270
|
+
}, []), c = _(() => {
|
|
271
|
+
e && (n.current = !0, o(!0), clearTimeout(i.current), i.current = setTimeout(() => {
|
|
272
|
+
r.current || s();
|
|
273
|
+
}, M));
|
|
274
|
+
}, [e, s]);
|
|
275
|
+
return y(() => {
|
|
276
|
+
n.current && (t ? r.current = !0 : r.current && s());
|
|
277
|
+
}, [t, s]), y(() => () => clearTimeout(i.current), []), {
|
|
278
|
+
locked: a,
|
|
279
|
+
lock: c,
|
|
280
|
+
isLocked: _(() => n.current, [])
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region lib/components/ui/actions/button/button.tsx
|
|
285
|
+
function P({ className: r, variant: i = "filled", asChild: c = !1, children: l, color: u, size: p, loading: m = !1, lockOnClick: h, spinnerVariant: g = "2", wrap: _, shape: b, selected: x, disabled: T, onClickCapture: E, type: O = "button", ...j }) {
|
|
286
|
+
let M = c ? n : "button", P = v(d), F = p ?? P, I = c && x !== void 0;
|
|
287
|
+
y(() => {
|
|
288
|
+
I && !a() && console.warn("Button: `selected` is ignored with `asChild`; set aria-pressed on the child element.");
|
|
289
|
+
}, [I]);
|
|
290
|
+
let L = !c && x !== void 0, R = v(s) || !!(j["aria-label"] || j["aria-labelledby"]) || f(l), z = N(h, m), B = m || z.locked, V = w(B, z, E);
|
|
291
|
+
return /* @__PURE__ */ S(s, {
|
|
292
|
+
value: R,
|
|
293
|
+
children: /* @__PURE__ */ C(M, {
|
|
294
|
+
"data-slot": "button",
|
|
295
|
+
"data-variant": i,
|
|
296
|
+
"data-color": u,
|
|
297
|
+
"data-size": F,
|
|
298
|
+
"data-shape": b,
|
|
299
|
+
"data-selected": L && x ? "true" : void 0,
|
|
300
|
+
className: e("w-fit max-w-full min-w-0 justify-center", c && "nxgt-btn-as-child overflow-clip text-ellipsis whitespace-nowrap [overflow-clip-margin:22px]", D({
|
|
301
|
+
variant: i,
|
|
302
|
+
color: u,
|
|
303
|
+
size: F
|
|
304
|
+
}), k(_, F), r),
|
|
305
|
+
type: c ? void 0 : O,
|
|
306
|
+
disabled: T,
|
|
307
|
+
...j,
|
|
308
|
+
"aria-disabled": B || j["aria-disabled"],
|
|
309
|
+
"aria-busy": B || j["aria-busy"],
|
|
310
|
+
"aria-pressed": L ? x : j["aria-pressed"],
|
|
311
|
+
onClickCapture: V,
|
|
312
|
+
children: [B && /* @__PURE__ */ S(o, {
|
|
313
|
+
variant: g,
|
|
314
|
+
color: i === "filled" ? "light" : u,
|
|
315
|
+
className: e("starting:scale-0 duration-500", g === "4" ? "size-7.5" : "size-4.5")
|
|
316
|
+
}), /* @__PURE__ */ S(t, { children: c ? l : A(l) })]
|
|
317
|
+
})
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function F({ tooltip: e, ...t }) {
|
|
321
|
+
return e ? /* @__PURE__ */ S(i, {
|
|
322
|
+
content: e,
|
|
323
|
+
children: /* @__PURE__ */ S(P, { ...t })
|
|
324
|
+
}) : /* @__PURE__ */ S(P, { ...t });
|
|
325
|
+
}
|
|
326
|
+
//#endregion
|
|
327
|
+
export { w as a, D as i, N as n, A as r, F as t };
|
|
@@ -24,6 +24,14 @@ var t = e(!1), n = {
|
|
|
24
24
|
warning: "[&_svg]:stroke-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:[&_svg]:stroke-[color-mix(in_oklab,var(--color-warning)_85%,white)]",
|
|
25
25
|
error: "[&_svg]:stroke-[color-mix(in_oklab,var(--color-error)_85%,black)] dark:[&_svg]:stroke-[color-mix(in_oklab,var(--color-error)_70%,white)]",
|
|
26
26
|
default: "[&_svg]:stroke-foreground"
|
|
27
|
+
}, a = {
|
|
28
|
+
primary: "[--morph-on:var(--color-primary)] [--morph-on-fg:var(--color-primary-foreground)] [--btn-focus:var(--color-primary-text)] [--btn-line:var(--color-primary)]",
|
|
29
|
+
secondary: "[--morph-on:var(--color-secondary)] dark:[--morph-on:color-mix(in_oklab,var(--color-secondary)_70%,var(--color-background))] [--morph-on-fg:var(--color-secondary-foreground)] [--btn-focus:var(--color-secondary)] [--btn-line:var(--color-secondary)]",
|
|
30
|
+
success: "[--morph-on:var(--color-success)] dark:[--morph-on:color-mix(in_oklab,var(--color-success)_60%,var(--color-background))] [--morph-on-fg:var(--color-success-foreground)] [--btn-focus:var(--color-success)] dark:[--btn-focus:color-mix(in_oklab,var(--color-success)_85%,white)] [--btn-line:var(--color-success)]",
|
|
31
|
+
info: "[--morph-on:var(--color-info)] dark:[--morph-on:color-mix(in_oklab,var(--color-info)_60%,var(--color-background))] [--morph-on-fg:var(--color-info-foreground)] [--btn-focus:var(--color-info)] [--btn-line:var(--color-info)]",
|
|
32
|
+
warning: "[--morph-on:var(--color-warning)] dark:[--morph-on:color-mix(in_oklab,var(--color-warning)_60%,var(--color-background))] [--morph-on-fg:var(--color-warning-foreground)] [--btn-focus:color-mix(in_oklab,var(--color-warning)_85%,black)] dark:[--btn-focus:color-mix(in_oklab,var(--color-warning)_85%,white)] [--btn-line:var(--color-warning)]",
|
|
33
|
+
error: "[--morph-on:var(--color-error)] [--morph-on-fg:var(--color-error-foreground)] [--btn-focus:color-mix(in_oklab,var(--color-error)_85%,black)] dark:[--btn-focus:color-mix(in_oklab,var(--color-error)_70%,white)] [--btn-line:var(--color-error)]",
|
|
34
|
+
default: "[--morph-on:var(--color-foreground)] [--morph-on-fg:var(--color-background)] [--btn-focus:var(--color-foreground)] [--btn-line:var(--color-foreground)]"
|
|
27
35
|
};
|
|
28
36
|
//#endregion
|
|
29
|
-
export { t as i, i as n, n as r, r as t };
|
|
37
|
+
export { t as a, a as i, i as n, n as r, r as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
|
-
import { t } from "./utils-
|
|
2
|
+
import { t } from "./utils-BLfntITJ.js";
|
|
3
3
|
import { V as n } from "./youtube-node-OWSNlYCc.js";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/components/ui/widgets/editor/viewer/callout-view.tsx
|
package/dist/charts.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as e } from "./ui.utils-CAnKTCw5.js";
|
|
2
|
-
import { t } from "./utils-
|
|
3
|
-
import { t as n } from "./use-material-translation-
|
|
4
|
-
import { t as r } from "./button-
|
|
2
|
+
import { t } from "./utils-BLfntITJ.js";
|
|
3
|
+
import { t as n } from "./use-material-translation-B3V_bz-5.js";
|
|
4
|
+
import { t as r } from "./button-BNjw-pnE.js";
|
|
5
5
|
import { t as i } from "./use-ssr-media-query-C6M5m8sf.js";
|
|
6
6
|
import { i as a, n as o, r as s, t as c } from "./util-4heV2LPI.js";
|
|
7
7
|
import { t as l } from "./useIsomorphicLayoutEffect-DfgAhWcH.js";
|
|
8
8
|
import { t as u } from "./warn-once-C_e47JM8.js";
|
|
9
|
-
import { t as d } from "./chip-
|
|
10
|
-
import { c as f, d as p, f as m, i as h, o as g, p as _, s as v, t as y } from "./line-path-
|
|
9
|
+
import { t as d } from "./chip-DLgQTJBZ.js";
|
|
10
|
+
import { c as f, d as p, f as m, i as h, o as g, p as _, s as v, t as y } from "./line-path-C5pZGC49.js";
|
|
11
11
|
import { t as b } from "./live-status-BGPaN8r8.js";
|
|
12
12
|
import { t as x } from "./linear-G97mfnKF.js";
|
|
13
13
|
import { t as S } from "./band-ZcHOFBlS.js";
|