@nxgt/material 3.81.0 → 3.82.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 +20 -0
- package/README.md +2 -2
- package/dist/{alert-dialog-DOZ0SfQs.js → alert-dialog-DXLJ4AZP.js} +74 -73
- package/dist/components/ui/collections/data-table/data-table-items.css +15 -0
- package/dist/{components-B00kDHzJ.js → components-BmZk-git.js} +105 -82
- package/dist/components.js +4 -4
- package/dist/editor.js +973 -966
- package/dist/{hooks-DvIsom2p.js → hooks-k8_f3B0k.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/lib/components/ui/fields/inline-edit/inline-edit-display.d.ts +5 -1
- package/dist/lib/components/ui/fields/inline-edit/inline-edit-editor.d.ts +6 -1
- package/dist/lib/components/ui/fields/inline-edit/inline-edit.d.ts +14 -1
- package/dist/lib/components/ui/fields/inline-edit/use-inline-edit.d.ts +4 -1
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-grid.types.d.ts +6 -1
- package/dist/lib/components/ui/layout/dashboard-grid/dashboard-tile.d.ts +1 -1
- package/dist/lib/components/ui/media/galleries/gallery.utils.d.ts +14 -0
- package/dist/lib/components/ui/media/galleries/partials/gallery-tile-button.d.ts +12 -0
- package/dist/lib/components/ui/media/galleries/partials/gallery-tile.d.ts +3 -1
- package/dist/lib/illustrations-game/index.d.ts +4 -3
- package/dist/main.js +5 -5
- package/dist/material.css +1 -1
- package/dist/{use-chat-composer-BBF1BI_s.js → use-chat-composer-BfFcmDua.js} +1409 -1365
- package/dist/{use-heading-spy-BgyA6SJl.js → use-heading-spy-gDNtK1sU.js} +1 -1
- package/docs/README.md +1 -1
- package/docs/components/data-display.md +1 -1
- package/docs/components/form-fields.md +5 -0
- package/docs/components/navigation-and-layout.md +1 -0
- package/docs/guides/icon-motifs.md +1 -1
- package/docs/guides/illustrations.md +5 -5
- package/docs/previews/feedback-status-illustration-game.webp +0 -0
- package/lib/components/ui/collections/data-table/data-table-items.css +15 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @nxgt/material
|
|
2
2
|
|
|
3
|
+
## 3.82.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2466](https://github.com/softistx/nxgt-material/pull/2466) [`849e55f`](https://github.com/softistx/nxgt-material/commit/849e55f047f40dbf62459dd9611da743ee133e96) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `DashboardTile` takes a `headingLevel` prop (`2` to `6`, default `3`, so nothing changes for existing tiles) to set the level of its title and keep the page's outline right. Fixes [#2453](https://github.com/softistx/nxgt-material/issues/2453).
|
|
8
|
+
|
|
9
|
+
- [#2476](https://github.com/softistx/nxgt-material/pull/2476) [`3451afc`](https://github.com/softistx/nxgt-material/commit/3451afc178b3173dcbe4710192e2e5f3389c5d0d) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `@nxgt/material/illustrations/game` gains nine scenes for classic roles: `protector`, `elder`, `village-idiot`, `scapegoat`, `raven`, `fox`, `siblings`, `big-bad-wolf` and `wolf-father`, themed and dark-mode aware like the others. `fox` and `scapegoat` draw their animal as vector art (the sprites have none), in the same tone and dark mode as the icons. Fixes [#2473](https://github.com/softistx/nxgt-material/issues/2473).
|
|
10
|
+
|
|
11
|
+
- [#2478](https://github.com/softistx/nxgt-material/pull/2478) [`add1d9f`](https://github.com/softistx/nxgt-material/commit/add1d9f9d363ed48f1ef8f1e0c99354fa4a555b3) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `InlineEdit` can be a document's title: `variant` sets the type step of its text and input, `headingLevel` (`1` to `6`) renders it as a heading, and `defaultEditing` (or `editing` with `onEditingChange`) opens it in editing mode. The input now has an accessible name even without a `label`. Defaults are unchanged. Fixes [#2457](https://github.com/softistx/nxgt-material/issues/2457).
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#2475](https://github.com/softistx/nxgt-material/pull/2475) [`f370c1c`](https://github.com/softistx/nxgt-material/commit/f370c1c9b2979799aab62b0d0732fbc3e278e9de) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ServerTable` and `DataTable` in the `cards` and `tiles` layouts no longer sit 4px inside their container: the list's room for the focus ring was inside the scroll box, so with `surface="none"` the first card started 4px right of a heading above it. The scroll box now takes that room back on both inline sides; the focus ring still fits. The list now reaches 4px past its parent on each inline side, so the parent needs that much inline room (a gutter) to avoid a horizontal scroll or a clipped ring. Fixes [#2472](https://github.com/softistx/nxgt-material/issues/2472).
|
|
16
|
+
|
|
17
|
+
- [#2463](https://github.com/softistx/nxgt-material/pull/2463) [`b28f55f`](https://github.com/softistx/nxgt-material/commit/b28f55f3be17138177cc803a5b24f664f13a445f) Thanks [@SteveGT96](https://github.com/SteveGT96)! - The `link` feature's toolbar control (and every other editor control that opens an `AlertDialog`) keeps `aria-expanded` and `aria-haspopup` on its button instead of on a wrapper `div`, so axe no longer reports `aria-allowed-attr`. `AlertDialogTrigger` now renders its child itself (`asChild`) with no extra `div` around it: a single element child is slotted (`asChild`), anything else (text, a fragment) gets the trigger's own button, and the wrapper `div` is gone. Fixes [#2461](https://github.com/softistx/nxgt-material/issues/2461).
|
|
18
|
+
|
|
19
|
+
- [#2468](https://github.com/softistx/nxgt-material/pull/2468) [`dadd372`](https://github.com/softistx/nxgt-material/commit/dadd3727328e7d8245ea143016fa87423e5463eb) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `Gallery` with `preset="photos"` (justified rows) keeps a short last row at the row height and start-aligned, instead of stretching its few tiles across the whole width and blowing them up. A last row that is nearly full (it would need at most 1.3 times the target height to fill the width) still fills it, and a lone photo on a narrow screen follows the same rule. Fixes [#2445](https://github.com/softistx/nxgt-material/issues/2445).
|
|
20
|
+
- Updated dependencies [[`3451afc`](https://github.com/softistx/nxgt-material/commit/3451afc178b3173dcbe4710192e2e5f3389c5d0d)]:
|
|
21
|
+
- @nxgt/material-core@0.50.0
|
|
22
|
+
|
|
3
23
|
## 3.81.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -210,7 +210,7 @@ reads `duotone.svg`, the file that exists (it used to ask for the missing
|
|
|
210
210
|
| `@nxgt/material/illustrations` | State illustrations: `Illustration` (`scene`: `empty`, `no-results`, `not-found`, `error`, `offline`, `success`, `welcome`, `forbidden`, `maintenance`, `invitation`, `sign-in`, `empty-inbox`, or an id of the `scenes` table it is given; `size`, `title`, `animated`, `hero`, `satellites`, `iconStyle`, `tone`, `duotone`) draws a hero icon on a Material 3 Expressive plate with satellites, from the Font Awesome sprites your app serves (no icon artwork ships); `IllustrationDefaults` (`icons`: `'suggested'` or a table, `iconStyle`, `sets`) opts a subtree's `EmptyState` and `ErrorState` into them; `ILLUSTRATION_SCENES`, `SUGGESTED_ICONS` and the types re-exported from `@nxgt/material-core/illustrations` (`SceneRow`, `SceneTable`), plus `IconStyleInput` and `IconStyleRef` (the `iconStyle` types: `{ family?, type? }` or one of the 37 sprite file names), `SceneId` and `RegisteredScene` (the scene id types: the built-in ids plus those registered through `IllustrationSceneRegistry` by an imported set, or through `RegisteredScenes` by you), `RegisteredScenes` (an interface to augment with the ids of a table of your own registered through `sets`) and `SceneTableIds` (the helper type that gives a table's ids: `interface RegisteredScenes extends SceneTableIds<typeof MY_SCENES> {}`). `unauthorized` and `maintenance` states draw the `forbidden` and `maintenance` scenes. `EmptyState`, `ErrorState` and the `DataTable` empty row (`emptyIllustration`) also take `illustration` as a scene id or `true`. Colours are theme tones in `styles.css`; its own entry ([illustrations guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/illustrations.md)) |
|
|
211
211
|
| `@nxgt/material/illustrations/health` | The health scenes: `HEALTH_SCENES` (`patient-record`, `consultation`, `appointment`, `lab-sample`, `prescription`, `vaccination`, `hospitalisation`, `emergency`, `no-patients`, `lab-results`), `HEALTH_SCENE_IDS`, `HEALTH_SUGGESTED_ICONS`, `HealthScene`; register it with `<IllustrationDefaults sets={[HEALTH_SCENES]}>` so `<Illustration scene="patient-record" />` and `<EmptyState illustration="no-patients" />` work (or pass `scenes={HEALTH_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. An app that does not import it does not carry it |
|
|
212
212
|
| `@nxgt/material/illustrations/education` | The education scenes: `EDUCATION_SCENES` (`classroom`, `homework`, `exam-grades`, `timetable`, `attendance`, `enrolment`, `library`, `graduation`, `no-students`, `report-card`), `EDUCATION_SCENE_IDS`, `EDUCATION_SUGGESTED_ICONS`, `EducationScene`; register it with `<IllustrationDefaults sets={[EDUCATION_SCENES]}>` so `<Illustration scene="classroom" />` and `<EmptyState illustration="no-students" />` work (or pass `scenes={EDUCATION_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. An app that does not import it does not carry it |
|
|
213
|
-
| `@nxgt/material/illustrations/game` | The game scenes, for a game, quiz, community or event app: `GAME_SCENES` (`night-sky`, `dawn`, `village`, `day-village`, `graveyard`, `seer`, `healer`, `archer`, `cupid`, `wolf`, `villager`, `witch`, `victory`, `empty-table`, `waiting-players`, `connection-lost`), `GAME_SCENE_IDS`, `GAME_SUGGESTED_ICONS`, `GameScene`; register it with `<IllustrationDefaults sets={[GAME_SCENES]}>` so `<Illustration scene="village" />` and `<EmptyState illustration="empty-table" />` work (or pass `scenes={GAME_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. Pass `title` for an accessible name, otherwise the picture is decorative (`aria-hidden`). An app that does not import it does not carry it |
|
|
213
|
+
| `@nxgt/material/illustrations/game` | The game scenes, for a game, quiz, community or event app: `GAME_SCENES` (twenty-five scenes: `night-sky`, `dawn`, `village`, `day-village`, `graveyard`, `seer`, `healer`, `archer`, `cupid`, `wolf`, `villager`, `witch`, `protector`, `elder`, `village-idiot`, `scapegoat`, `raven`, `fox`, `siblings`, `big-bad-wolf`, `wolf-father`, `victory`, `empty-table`, `waiting-players`, `connection-lost`), `GAME_SCENE_IDS`, `GAME_SUGGESTED_ICONS`, `GameScene`; register it with `<IllustrationDefaults sets={[GAME_SCENES]}>` so `<Illustration scene="village" />` and `<EmptyState illustration="empty-table" />` work (or pass `scenes={GAME_SCENES}` to one `Illustration`); importing it adds the ids to `SceneId`. Pass `title` for an accessible name, otherwise the picture is decorative (`aria-hidden`). An app that does not import it does not carry it |
|
|
214
214
|
| `@nxgt/material/backgrounds` | Background presets: `Background` (a superset of the `/components` one: `preset`, `animated`, `grain`, `seed`, `fill`, `motif`, and for `preset="icons"` `icons`, `iconStyle` and `iconMotif`), `AVAILABLE_BACKGROUND_PRESETS` and `AvailableBackgroundPreset` (the 52 ids `Background` draws), `MoonOptions` (the `moon` prop), `IconMotifOptions` (`iconMotif`, with `quiet`: a band the icons fade out of for text), `IconLayout`, `IconQuiet`, `SkyPreset` and `CelestialPreset` (the `sky` ids), `IconsInput` (`icons`), `IconStyleInput` and `IconStyleRef` (`iconStyle`: `{ family?, type? }` or one of the 37 sprite file names, completed by the editor, any other string is a type error), `sky` (`'moon'` or a celestial preset over any preset, also read from the theme's `background.sky`; the four celestial presets and `sky` share the opt-in `@nxgt/material/backgrounds/celestial.css`, also in `backgrounds.css`), `MOTIF_SHAPES_ALL` (the 25 motif shapes), the `MotifLayout` type, the types and tables (`BACKGROUND_PRESETS`, `BACKGROUND_TONES`, ...) re-exported from `@nxgt/material-core/backgrounds`; its own entry, with an opt-in stylesheet ([backgrounds guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/backgrounds.md)) |
|
|
215
215
|
| `@nxgt/material/editor` | The rich text editor: `DocumentEditor` and `DocumentEditorFormField` (with an `outline`, a block handle, focus mode, find and replace, `onUpload`, `onAssist` and `comments`), `CompactEditor` and `CompactEditorFormField`, `RichChatComposer`, `EditorRoot` and the parts (`EditorToolbar`, `EditorContent`, `EditorFooter`, `EditorAssistantPanel`, ...), `useEditor`, the kits (`documentKit`, `compactKit`, `chatKit`, `formNodesKit`), `withFeatures` / `withoutFeatures` and `defineFeature`, and the converters `toHtml`, `toJson`, `toMarkdown`, `fromMarkdown` and `looksLikeMarkdown` — **its own entry, and not in the barrel above**. **Client-only**: import it from a `'use client'` file; `/editor/viewer` is the server-safe one. The `.nxgt-prose` page styles ship in `styles.css` with the component CSS ([DocumentEditor](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/rich-widgets.md#documenteditor)) |
|
|
216
216
|
| `@nxgt/material/editor/viewer` | `RichTextViewer`: shows a saved document (HTML, JSON or Markdown) read-only, **server-safe**, with no editor instance and no `'use client'` ([RichTextViewer](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/rich-widgets.md#richtextviewer)) |
|
|
@@ -714,7 +714,7 @@ Not components: what the stylesheet gives any element.
|
|
|
714
714
|
| <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` |
|
|
715
715
|
| <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` |
|
|
716
716
|
| <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` |
|
|
717
|
-
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-tubecap.webp" width="120" alt="TubeCap"> | [`TubeCap`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#tubecap) | A specimen tube's chip: a cap in its fixed convention colour, the container's name beside it, optional volume, accession and action |
|
|
717
|
+
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-tubecap.webp" width="120" alt="TubeCap"> | [`TubeCap`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#tubecap) | A specimen tube's chip: a cap in its fixed convention colour, the container's name beside it, optional volume, accession and action | `TubeCap` |
|
|
718
718
|
| <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` |
|
|
719
719
|
| <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` |
|
|
720
720
|
| <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-display-descriptionlist.webp" width="120" alt="DescriptionList"> | [`DescriptionList`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-display.md#descriptionlist), `DescriptionList.Group` | Dense auto-fill grid of `Description`s in a `dl` (`minItem`, `maxColumns`, `meta`, `span`, `labelPosition`, `lines`), or tonal panels per group with `variant="panels"`. | — (later, [#1614](https://github.com/softistx/nxgt-material/issues/1614)) |
|
|
@@ -7,64 +7,65 @@ import { t as a } from "./in-dialog-D61Yeaol.js";
|
|
|
7
7
|
import { a as o, c as s, d as c, i as l, l as u, n as d, o as f, r as p, s as m, t as h, u as g } from "./use-return-focus-C_Qz_yTk.js";
|
|
8
8
|
import { i as _ } from "./escape-owner-DpaP0lm1.js";
|
|
9
9
|
import * as v from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { Fragment as y, isValidElement as b } from "react";
|
|
11
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
11
12
|
//#region ../../node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
12
|
-
var
|
|
13
|
-
Action: () =>
|
|
14
|
-
AlertDialog: () =>
|
|
15
|
-
AlertDialogAction: () =>
|
|
16
|
-
AlertDialogCancel: () =>
|
|
17
|
-
AlertDialogContent: () =>
|
|
18
|
-
AlertDialogDescription: () =>
|
|
19
|
-
AlertDialogOverlay: () =>
|
|
20
|
-
AlertDialogPortal: () =>
|
|
21
|
-
AlertDialogTitle: () =>
|
|
22
|
-
AlertDialogTrigger: () =>
|
|
23
|
-
Cancel: () =>
|
|
24
|
-
Content: () =>
|
|
25
|
-
Description: () =>
|
|
26
|
-
Overlay: () =>
|
|
27
|
-
Portal: () =>
|
|
28
|
-
Root: () =>
|
|
29
|
-
Title: () =>
|
|
30
|
-
Trigger: () =>
|
|
31
|
-
createAlertDialogScope: () =>
|
|
32
|
-
}),
|
|
13
|
+
var C = /* @__PURE__ */ e({
|
|
14
|
+
Action: () => K,
|
|
15
|
+
AlertDialog: () => k,
|
|
16
|
+
AlertDialogAction: () => R,
|
|
17
|
+
AlertDialogCancel: () => B,
|
|
18
|
+
AlertDialogContent: () => F,
|
|
19
|
+
AlertDialogDescription: () => L,
|
|
20
|
+
AlertDialogOverlay: () => M,
|
|
21
|
+
AlertDialogPortal: () => j,
|
|
22
|
+
AlertDialogTitle: () => I,
|
|
23
|
+
AlertDialogTrigger: () => A,
|
|
24
|
+
Cancel: () => q,
|
|
25
|
+
Content: () => G,
|
|
26
|
+
Description: () => Y,
|
|
27
|
+
Overlay: () => W,
|
|
28
|
+
Portal: () => U,
|
|
29
|
+
Root: () => V,
|
|
30
|
+
Title: () => J,
|
|
31
|
+
Trigger: () => H,
|
|
32
|
+
createAlertDialogScope: () => D
|
|
33
|
+
}), w = Object.defineProperty, T = (e, t) => w(e, "name", {
|
|
33
34
|
value: t,
|
|
34
35
|
configurable: !0
|
|
35
|
-
}), [
|
|
36
|
+
}), [E, D] = i("AlertDialog", [c]), O = c(), k = /* @__PURE__ */ T((e) => {
|
|
36
37
|
let { __scopeAlertDialog: t, ...n } = e;
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
...
|
|
38
|
+
return /* @__PURE__ */ x(p, {
|
|
39
|
+
...O(t),
|
|
39
40
|
...n,
|
|
40
41
|
modal: !0
|
|
41
42
|
});
|
|
42
|
-
}, "AlertDialog"),
|
|
43
|
+
}, "AlertDialog"), A = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
43
44
|
let { __scopeAlertDialog: n, ...r } = e;
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
...
|
|
45
|
+
return /* @__PURE__ */ x(g, {
|
|
46
|
+
...O(n),
|
|
46
47
|
...r,
|
|
47
48
|
ref: t
|
|
48
49
|
});
|
|
49
|
-
}, "AlertDialogTrigger")),
|
|
50
|
+
}, "AlertDialogTrigger")), j = /* @__PURE__ */ T((e) => {
|
|
50
51
|
let { __scopeAlertDialog: t, ...n } = e;
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
...
|
|
52
|
+
return /* @__PURE__ */ x(s, {
|
|
53
|
+
...O(t),
|
|
53
54
|
...n
|
|
54
55
|
});
|
|
55
|
-
}, "AlertDialogPortal"),
|
|
56
|
+
}, "AlertDialogPortal"), M = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
56
57
|
let { __scopeAlertDialog: n, ...r } = e;
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
...
|
|
58
|
+
return /* @__PURE__ */ x(m, {
|
|
59
|
+
...O(n),
|
|
59
60
|
...r,
|
|
60
61
|
ref: t
|
|
61
62
|
});
|
|
62
|
-
}, "AlertDialogOverlay")), [
|
|
63
|
-
let { __scopeAlertDialog: i, children: a, ...s } = e, c =
|
|
64
|
-
return /* @__PURE__ */
|
|
63
|
+
}, "AlertDialogOverlay")), [N, P] = E("AlertDialogContent"), F = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
64
|
+
let { __scopeAlertDialog: i, children: a, ...s } = e, c = O(i), l = n(t, v.useRef(null)), u = v.useRef(null);
|
|
65
|
+
return /* @__PURE__ */ x(N, {
|
|
65
66
|
scope: i,
|
|
66
67
|
cancelRef: u,
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ x(o, {
|
|
68
69
|
role: "alertdialog",
|
|
69
70
|
...c,
|
|
70
71
|
...s,
|
|
@@ -77,65 +78,65 @@ var x = /* @__PURE__ */ e({
|
|
|
77
78
|
children: a
|
|
78
79
|
})
|
|
79
80
|
});
|
|
80
|
-
}, "AlertDialogContent")),
|
|
81
|
+
}, "AlertDialogContent")), I = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
81
82
|
let { __scopeAlertDialog: n, ...r } = e;
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
...
|
|
83
|
+
return /* @__PURE__ */ x(u, {
|
|
84
|
+
...O(n),
|
|
84
85
|
...r,
|
|
85
86
|
ref: t
|
|
86
87
|
});
|
|
87
|
-
}, "AlertDialogTitle")),
|
|
88
|
+
}, "AlertDialogTitle")), L = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
88
89
|
let { __scopeAlertDialog: n, ...r } = e;
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
...
|
|
90
|
+
return /* @__PURE__ */ x(f, {
|
|
91
|
+
...O(n),
|
|
91
92
|
...r,
|
|
92
93
|
ref: t
|
|
93
94
|
});
|
|
94
|
-
}, "AlertDialogDescription")),
|
|
95
|
+
}, "AlertDialogDescription")), R = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
95
96
|
let { __scopeAlertDialog: n, ...r } = e;
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
...
|
|
97
|
+
return /* @__PURE__ */ x(l, {
|
|
98
|
+
...O(n),
|
|
98
99
|
...r,
|
|
99
100
|
ref: t
|
|
100
101
|
});
|
|
101
|
-
}, "AlertDialogAction")),
|
|
102
|
-
let { __scopeAlertDialog: r, ...i } = e, { cancelRef: a } =
|
|
103
|
-
return /* @__PURE__ */
|
|
102
|
+
}, "AlertDialogAction")), z = "AlertDialogCancel", B = v.forwardRef(/* @__PURE__ */ T(function(e, t) {
|
|
103
|
+
let { __scopeAlertDialog: r, ...i } = e, { cancelRef: a } = P(z, r), o = O(r), s = n(t, a);
|
|
104
|
+
return /* @__PURE__ */ x(l, {
|
|
104
105
|
...o,
|
|
105
106
|
...i,
|
|
106
107
|
ref: s
|
|
107
108
|
});
|
|
108
|
-
}, "AlertDialogCancel")),
|
|
109
|
+
}, "AlertDialogCancel")), V = k, H = A, U = j, W = M, G = F, K = R, q = B, J = I, Y = L;
|
|
109
110
|
//#endregion
|
|
110
111
|
//#region lib/components/ui/feedback/alert-dialog/alert-dialog.tsx
|
|
111
|
-
function
|
|
112
|
-
return /* @__PURE__ */
|
|
112
|
+
function X({ ...e }) {
|
|
113
|
+
return /* @__PURE__ */ x(V, {
|
|
113
114
|
"data-slot": "alert-dialog",
|
|
114
115
|
...e
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
-
return /* @__PURE__ */
|
|
118
|
+
function Z({ children: e, asChild: t = !0, ...n }) {
|
|
119
|
+
return /* @__PURE__ */ x(H, {
|
|
119
120
|
"data-slot": "alert-dialog-trigger",
|
|
120
|
-
asChild: t,
|
|
121
|
+
asChild: t && b(e) && e.type !== y,
|
|
121
122
|
...n,
|
|
122
|
-
children:
|
|
123
|
+
children: e
|
|
123
124
|
});
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
-
return /* @__PURE__ */
|
|
126
|
+
function Q({ ...e }) {
|
|
127
|
+
return /* @__PURE__ */ x(U, {
|
|
127
128
|
"data-slot": "alert-dialog-portal",
|
|
128
129
|
...e
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
-
return /* @__PURE__ */
|
|
132
|
+
function $({ className: e, ...n }) {
|
|
133
|
+
return /* @__PURE__ */ x(W, {
|
|
133
134
|
"data-slot": "alert-dialog-overlay",
|
|
134
135
|
className: t("nxgt-scrim fixed inset-0 z-50", e),
|
|
135
136
|
...n
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function ee({ className: e, onOpenAutoFocus: n, onCloseAutoFocus: r, onEscapeKeyDown: i, ref: o, ...s }) {
|
|
139
140
|
let c = h({
|
|
140
141
|
onOpenAutoFocus: n,
|
|
141
142
|
onCloseAutoFocus: r
|
|
@@ -144,9 +145,9 @@ function Q({ className: e, onOpenAutoFocus: n, onCloseAutoFocus: r, onEscapeKeyD
|
|
|
144
145
|
onEscapeKeyDown: i,
|
|
145
146
|
...s
|
|
146
147
|
}, !0);
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ x(_, { children: /* @__PURE__ */ x(a, {
|
|
148
149
|
value: !0,
|
|
149
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ S(Q, { children: [/* @__PURE__ */ x($, { ref: l.overlayRef }), /* @__PURE__ */ x(G, {
|
|
150
151
|
ref: l.ref,
|
|
151
152
|
"data-slot": "alert-dialog-content",
|
|
152
153
|
className: t("nxgt-dialog fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 p-6 sm:max-w-lg max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto", e),
|
|
@@ -158,33 +159,33 @@ function Q({ className: e, onOpenAutoFocus: n, onCloseAutoFocus: r, onEscapeKeyD
|
|
|
158
159
|
})] })
|
|
159
160
|
}) });
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
-
return /* @__PURE__ */
|
|
162
|
+
function te({ className: e, ...n }) {
|
|
163
|
+
return /* @__PURE__ */ x("div", {
|
|
163
164
|
"data-slot": "alert-dialog-header",
|
|
164
165
|
className: t("flex flex-col gap-2 text-center sm:text-left", e),
|
|
165
166
|
...n
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
-
return /* @__PURE__ */
|
|
169
|
+
function ne({ className: e, ...n }) {
|
|
170
|
+
return /* @__PURE__ */ x("div", {
|
|
170
171
|
"data-slot": "alert-dialog-footer",
|
|
171
172
|
className: t("flex flex-col-reverse gap-2 pt-2 max-sm:*:w-full sm:flex-row sm:justify-end", e),
|
|
172
173
|
...n
|
|
173
174
|
});
|
|
174
175
|
}
|
|
175
|
-
function
|
|
176
|
-
return /* @__PURE__ */
|
|
176
|
+
function re({ className: e, ...n }) {
|
|
177
|
+
return /* @__PURE__ */ x(J, {
|
|
177
178
|
"data-slot": "alert-dialog-title",
|
|
178
179
|
className: t("text-2xl/8 font-medium tracking-tight text-foreground", e),
|
|
179
180
|
...n
|
|
180
181
|
});
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
-
return /* @__PURE__ */
|
|
183
|
+
function ie({ className: e, ...n }) {
|
|
184
|
+
return /* @__PURE__ */ x(Y, {
|
|
184
185
|
"data-slot": "alert-dialog-description",
|
|
185
186
|
className: t("text-muted-foreground text-sm/6", e),
|
|
186
187
|
...n
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
190
|
//#endregion
|
|
190
|
-
export {
|
|
191
|
+
export { te as a, re as c, q as d, C as f, ne as i, Z as l, ee as n, $ as o, ie as r, Q as s, X as t, K as u };
|
|
@@ -48,6 +48,21 @@
|
|
|
48
48
|
gap: var(--nxgt-cards-gap, 0.75rem);
|
|
49
49
|
grid-template-columns: minmax(0, 1fr);
|
|
50
50
|
}
|
|
51
|
+
/* The list's 4px of ring room sits inside the scroll box, which clips: the
|
|
52
|
+
* box takes it back on each inline side, so the cards' edges (not the
|
|
53
|
+
* room's) meet the page's edge and the heading above (#2472); the parent needs 4px of inline room. */
|
|
54
|
+
[data-slot="table-wrapper"]:has(> [data-slot="data-table-cards"]) {
|
|
55
|
+
margin-inline: -4px;
|
|
56
|
+
/* `w-full` (utilities layer) would win over this layer. */
|
|
57
|
+
width: calc(100% + 8px) !important;
|
|
58
|
+
}
|
|
59
|
+
/* Tiles keep their own 4px margin, except on a phone (#2292). */
|
|
60
|
+
@media (min-width: 768px) {
|
|
61
|
+
[data-slot="table-wrapper"]:has(> [data-slot="data-table-tiles"]) {
|
|
62
|
+
margin-inline: -4px;
|
|
63
|
+
width: calc(100% + 8px) !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
51
66
|
@container (min-width: 36rem) {
|
|
52
67
|
[data-slot="data-table-cards"] {
|
|
53
68
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|