@nxgt/material 3.47.0 → 3.49.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +3 -3
  3. package/dist/{button-yaltbQmC.js → button-DJgaQbBD.js} +49 -49
  4. package/dist/charts.js +144 -144
  5. package/dist/{chip-BqWbbr1b.js → chip-DN44R1vW.js} +56 -56
  6. package/dist/{code-editor-C9qBNoYb.js → code-editor-BJ9ewxSC.js} +307 -307
  7. package/dist/code-editor.js +46 -46
  8. package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BJE3VuQg.js} +1 -1
  9. package/dist/components/components.css +1 -0
  10. package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
  11. package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
  12. package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
  13. package/dist/components/ui/actions/action-card/action-card.css +33 -3
  14. package/dist/{components-DFPy96C3.js → components-AtBccCir.js} +15714 -15755
  15. package/dist/components.js +23 -23
  16. package/dist/{dialog-CCCcnTIx.js → dialog-ODql4vH7.js} +15 -15
  17. package/dist/{tooltip-CkttDIab.js → dist-B61_o9Mg.js} +69 -66
  18. package/dist/dnd.js +1 -1
  19. package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-DRXYP9ta.js} +274 -274
  20. package/dist/editor.js +1027 -1027
  21. package/dist/{empty-state-DcF4TBzi.js → empty-state-C9QqvBU1.js} +36 -36
  22. package/dist/{escape-owner-C4W_sOAU.js → escape-owner-DCrlERLM.js} +1 -1
  23. package/dist/{field-blur-CJHzVSh9.js → field-blur-DYGyIdfD.js} +1 -1
  24. package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-B-fSpl1H.js} +1 -1
  25. package/dist/hooks.js +2 -2
  26. package/dist/{hover-card-C0fw2kLK.js → hover-card-EO_CckIx.js} +19 -19
  27. package/dist/{icon-badge-aJ22mKGh.js → icon-badge-BQYj_LE6.js} +3 -3
  28. package/dist/{icon-button-CN9r5TNE.js → icon-button-B481L2TP.js} +20 -20
  29. package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
  30. package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
  31. package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
  32. package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
  33. package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
  34. package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
  35. package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
  36. package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
  37. package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
  38. package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
  39. package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
  40. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
  41. package/dist/lib/components/ui/collections/filter/query/filter-query-context.d.ts +1 -1
  42. package/dist/lib/components/ui/collections/filter/query/filter-query-model.d.ts +49 -0
  43. package/dist/lib/components/ui/collections/filter/query/types.d.ts +8 -0
  44. package/dist/lib/components/ui/collections/filter/query/use-filter-query-options.d.ts +2 -1
  45. package/dist/lib/components/ui/collections/filter/query/use-filter-query-value.d.ts +1 -0
  46. package/dist/lib/components/ui/collections/filter/query/use-filter-query.d.ts +3 -47
  47. package/dist/lib/components/ui/collections/filter/sections/filter-form-error.d.ts +16 -4
  48. package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
  49. package/dist/lib/components/ui/collections/server-table/types.d.ts +5 -0
  50. package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
  51. package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
  52. package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
  53. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  54. package/dist/lib/components/ui/fields/opening-hours/logic/status.d.ts +13 -2
  55. package/dist/lib/components/ui/fields/opening-hours/opening-hours-summary.d.ts +7 -3
  56. package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
  57. package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
  58. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
  59. package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
  60. package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
  61. package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
  62. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
  63. package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
  64. package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
  65. package/dist/lib/i18n/translator.d.ts +1 -1
  66. package/dist/main.js +30 -30
  67. package/dist/map.js +78 -78
  68. package/dist/material.css +1 -1
  69. package/dist/nxgt-theme-ivgNca3z.js +37 -0
  70. package/dist/pdf-reader.js +1 -1
  71. package/dist/{public-zVb_Nq_D.js → public-CZBz4JVu.js} +70 -70
  72. package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-597e0_Qm.js} +51 -51
  73. package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-CK_xAk2H.js} +217 -217
  74. package/dist/{spinner-C4CgDEYm.js → spinner-BhuZuHK1.js} +1 -1
  75. package/dist/theme-picker.js +45 -45
  76. package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
  77. package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-Dnjn83TJ.js} +15 -15
  78. package/dist/themes.js +17 -17
  79. package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
  80. package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CCwIu7fE.js} +426 -426
  81. package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-Ot5XUbdn.js} +5138 -4908
  82. package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
  83. package/docs/components/buttons-and-actions.md +62 -4
  84. package/docs/components/data-table-filter-and-lists.md +29 -2
  85. package/docs/components/form-fields.md +1 -1
  86. package/docs/guides/cards-and-tiles.md +60 -0
  87. package/docs/previews/data-table-filter-lists-filter.webp +0 -0
  88. package/docs/roadmap.md +21 -0
  89. package/docs/troubleshooting.md +24 -0
  90. package/lib/components/components.css +1 -0
  91. package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
  92. package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
  93. package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
  94. package/lib/components/ui/actions/action-card/action-card.css +33 -3
  95. package/package.json +1 -1
  96. package/dist/lib/components/ui/fields/opening-hours/logic/zoned.d.ts +0 -10
  97. package/dist/nxgt-theme-ZS945iMP.js +0 -37
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.49.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1820](https://github.com/softistx/nxgt-material/pull/1820) [`22d3dd0`](https://github.com/softistx/nxgt-material/commit/22d3dd018e478e9cc8907697be27a34775a91de3) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ActionCard` takes `status` (a soft badge line), `meta` (one line, with a tooltip only while it is clipped), a trailing `action` outside the press surface (the title becomes the card's one button, so the card and its action are two tab stops and nothing nests), and `variant="tile"`, a compact grid cell with no minimum width and no indicator by default. Without `action` the DOM is unchanged. With an `action`, `title` is required (the button's text; development builds warn without one and the button is then named after the status and the meta line), the `description` is the button's description, a `role` (`switch`, `checkbox`, `radio`) and its `aria-checked` move to the button instead of the plain root, hover and press answer only the title button, and the meta tooltip follows hover and focus of the card (only Escape dismisses it). A tile's `withIndicator` gets its own column. `RowMenu`'s children (radio and checkbox items) take the text size of its `items`, as their 44px floor already did.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#1823](https://github.com/softistx/nxgt-material/pull/1823) [`bc5775c`](https://github.com/softistx/nxgt-material/commit/bc5775c7cfb2354616214d21f3318102793b10bd) Thanks [@SteveGT96](https://github.com/SteveGT96)! - New recipe `Guides/Recipes/Status board`: a board of tiles in sections (an `ActionCard` tile with a status badge, the occupant as meta and a menu that changes the status) and an occupancy screen (figures, a table with a rate per section, tiles on a phone), with its code in the `nxgt-material` plugin's `screen-recipes` skill (2.5.0).
12
+
13
+ ## 3.48.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#1699](https://github.com/softistx/nxgt-material/pull/1699) [`b878272`](https://github.com/softistx/nxgt-material/commit/b878272974293b2b7887dccac43d6ba5adbcb659) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Filter: a field error's words show under the bar by default ([#1696](https://github.com/softistx/nxgt-material/issues/1696)). Until now a refused field read only "Invalid" on its pill and the message sat in the pill's description and editor, so a refused, empty list showed a red pill and no reason (WCAG 3.3.1, 3.3.3).
18
+
19
+ - The bar (`Filter`, `FilterBar`, `ServerTable`'s `filter`) shows one error `Alert` under it, in the place `formError` uses, with a line per refused field that names it: "Period: choose 366 days or fewer." `formError` comes first when both are set. It is no live region; the bar's one still tells the refusal once.
20
+ - New prop `errorSummary?: boolean`, default `true`. **This changes what the bar shows by default**: pass `errorSummary={false}` to keep the pills only, as before this release.
21
+ - In the facets panel, each refused facet already shows its message inline, so its Alert holds `formError` plus the lines of refused fields that have no section (a plain chip, which would read "Invalid" alone), and the live status now reads in the order of the screen: `formError` first, then the fields. The lines are plain text, not buttons that open the editor.
22
+
23
+ ### Patch Changes
24
+
25
+ - [#1818](https://github.com/softistx/nxgt-material/pull/1818) [`2b02261`](https://github.com/softistx/nxgt-material/commit/2b022614887e625eb18b728a4ccf0a8c6cc3ea3a) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `OpeningHours` and `OpeningHoursSummary` use the shared `@nxgt/material-core/zone` helpers. An unknown `timeZone` now falls back to UTC like `DateField`, instead of the viewer's clock, so "open now" agrees with the date fields for the same zone string.
26
+
3
27
  ## 3.47.0
4
28
 
5
29
  ### Minor Changes
package/README.md CHANGED
@@ -518,7 +518,7 @@ Not components: what the stylesheet gives any element.
518
518
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-loadmorebutton.webp" width="120" alt="LoadMoreButton"> | [`LoadMoreButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#loadmorebutton) | "Load more" button for cursor pagination; icon-only with a tooltip unless `expanded`. | `LoadMoreButton` |
519
519
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-scrolltotop.webp" width="120" alt="ScrollToTop"> | [`ScrollToTop`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#scrolltotop) | Floating button that appears past a scroll threshold. | `ScrollToTop` |
520
520
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-scrolltolatestbutton.webp" width="120" alt="ScrollToLatestButton"> | [`ScrollToLatestButton`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#scrolltolatestbutton) | "Jump to latest" over a scroll box: an arrow that widens into "3 new messages". | — |
521
- | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-actioncard.webp" width="120" alt="ActionCard"> | [`ActionCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#actioncard) | Clickable card (a `role="button"` with `aria-pressed`) with a shape icon that morphs when chosen, title, description and active indicator. | `ActionCard` |
521
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-actioncard.webp" width="120" alt="ActionCard"> | [`ActionCard`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#actioncard) | Clickable card (a `role="button"` with `aria-pressed`) with a shape icon that morphs when chosen, title, description and active indicator; `status`, `meta`, a trailing `action` (a `RowMenu`) and `variant="tile"` make a compact cell for status boards. | `ActionCard` |
522
522
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-themetoggle.webp" width="120" alt="ThemeToggle"> | [`ThemeToggle`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#themetoggle) | Light / dark / system switch that stores and applies the choice. | `ThemeToggle` |
523
523
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/buttons-actions-languageswitcher.webp" width="120" alt="LanguageSwitcher"> | [`LanguageSwitcher`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/buttons-and-actions.md#languageswitcher) | Globe button with a menu of the `I18nProvider` languages. | `LanguageSwitcher` |
524
524
 
@@ -642,7 +642,7 @@ Not components: what the stylesheet gives any element.
642
642
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-pagefooter.webp" width="120" alt="PageFooter"> | [`PageFooter`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#pagefooter) | The page footer of a feed that is not a table (a list of cards, a news feed) under a `FilterBar`: the range ("21–40 of 134") and Previous / Next as real links built from the URL's cursor trail (`pageInfo`, `totalCount`, `params`; `totalCount` is optional: a feed with no total shows no range, only Previous / Next), the same footer `ServerTable` draws, icon-only with `pageControls="icon"` (44px targets on a touch screen); an end with no page is a disabled button, `aria-disabled`. | `PageFooter` |
643
643
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-datagrid.webp" width="120" alt="DataGrid"> | [`DataGrid`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#datagrid) | An editable grid over `DataTable`'s columns: spreadsheet keys, a selected range, editors for text, numbers (with codes such as "abs"), options, dates and checkboxes, or your own; paste from Excel or Sheets, a fill handle that continues series, resizable, hideable and reorderable columns, undo, totals, and saving per cell, per row or in a batch with versions and conflicts ([guide](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/guides/data-grid.md)). Long grids render only what is in view; on a phone it is a list of rows that open a panel. | — (later) |
644
644
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-daygroupedlist.webp" width="120" alt="DayGroupedList"> | [`DayGroupedList`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#daygroupedlist), `groupByDay` | A list split by day — Today, Yesterday, This week, Earlier — under headings that stick while their items scroll. | — (later) |
645
- | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-filter.webp" width="120" alt="Filter"> | [`Filter`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#filter), `FilterProvider`, `FilterContent`, `FilterChips`, `FilterPresets`, `FilterSheetTrigger`, `FilterBar`, `useFilterUrlQuery` · `FilterFormField` | Schema-driven filters with chips, presets, validation, and URL or storage persistence, and a query-driven `variant="bar"` / `"facets"` (quick filters, locked conditions, a phone sheet, a URL codec for a loader; `bandDensity="compact"` as on `ServerTable`), and `FilterBar`, the same bar bound to the URL for a feed or list without a table (`useFilterUrlQuery` is its hook, also `ServerTable`'s), a field `default` shown as an uncounted hint chip (a button that opens the editor on the default), a pressed toggle or checked values with a "Default" word (`defaults` prop), a `scope` field as a leading pill kept by "Clear all", a server refusal shown on the chip (`errors`), on the search box (`searchError`) or as an Alert under the bar (`formError`) and a model with `search: false`; the filter bar's "Filters (N)" (`FilterSheetTrigger`) can be placed inside a `ServerTable` (its actions). | `Filter`, `FilterProvider`, `FilterContent`, `FilterChips`, `FilterPresets`, `FilterSheetTrigger`, `FilterFormField`; `FilterBar`, `useFilterUrlQuery`: — (later, #1569) |
645
+ | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-filter.webp" width="120" alt="Filter"> | [`Filter`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#filter), `FilterProvider`, `FilterContent`, `FilterChips`, `FilterPresets`, `FilterSheetTrigger`, `FilterBar`, `useFilterUrlQuery` · `FilterFormField` | Schema-driven filters with chips, presets, validation, and URL or storage persistence, and a query-driven `variant="bar"` / `"facets"` (quick filters, locked conditions, a phone sheet, a URL codec for a loader; `bandDensity="compact"` as on `ServerTable`), and `FilterBar`, the same bar bound to the URL for a feed or list without a table (`useFilterUrlQuery` is its hook, also `ServerTable`'s), a field `default` shown as an uncounted hint chip (a button that opens the editor on the default), a pressed toggle or checked values with a "Default" word (`defaults` prop), a `scope` field as a leading pill kept by "Clear all", a server refusal shown on the chip (`errors`, its words in the Alert under the bar unless `errorSummary={false}`), on the search box (`searchError`) or as an Alert under the bar (`formError`) and a model with `search: false`; the filter bar's "Filters (N)" (`FilterSheetTrigger`) can be placed inside a `ServerTable` (its actions). | `Filter`, `FilterProvider`, `FilterContent`, `FilterChips`, `FilterPresets`, `FilterSheetTrigger`, `FilterFormField`; `FilterBar`, `useFilterUrlQuery`: — (later, #1569) |
646
646
  | — | [`FilterInline`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#filterinline-filterpopover-filterdialog-filtersheet-filterdrawer), `FilterPopover`, `FilterDialog`, `FilterSheet`, `FilterDrawer` | The filter panel shown inline, or in a popover, dialog, sheet or drawer. | `FilterInline`, `FilterPopover`, `FilterDialog`, `FilterSheet`, `FilterDrawer` |
647
647
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-facetgroup.webp" width="120" alt="FacetGroup"> | [`FacetGroup`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#facetgroup) | A collapsible facet: a header button with the title, a count Badge of the active values, Clear and a chevron, over the values (typically a `CheckboxGroup` with counts). | `FacetGroup` |
648
648
  | <img src="https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/previews/data-table-filter-lists-pagination.webp" width="120" alt="Pagination"> | [`Pagination`](https://cdn.jsdelivr.net/npm/@nxgt/material@3/docs/components/data-table-filter-and-lists.md#pagination), `PaginationContent`, `PaginationItem`, `PaginationFirst`, `PaginationLast`, `PaginationLink`, `PaginationBar`, `paginationItems`… | Pagination primitives, with first / last links. `PaginationBar` adds a sibling window with ellipses. | `Pagination` (parts), `PaginationFirst`, `PaginationLast`, `PaginationLink`, `PaginationBar`, `paginationItems` |
@@ -805,7 +805,7 @@ which is private: adding it needs a GitHub account with access to it.
805
805
  | --- | --- |
806
806
  | skill `use-nxgt-material` | an index that picks the component by need and wires imports and `styles.css`; its references cover the tokens and themes, forms, i18n, tests by role, SSR and the other subpaths, read from these docs in `node_modules/@nxgt/material/docs/` |
807
807
  | skill `design-screens` | the library's visual language for a screen (hierarchy, rhythm, tones, surfaces, states, phone, dark, motion) and an 11-criteria grid to score a screen out of 5 |
808
- | skill `screen-recipes` | whole screens to start from (a home dashboard, a list with a detail sheet, forms and dialogs, tables and settings), each the code of a tested `Guides/Recipes/<Name>` story |
808
+ | skill `screen-recipes` | whole screens to start from (a home dashboard, a list with a detail sheet, forms and dialogs, tables and settings, a dense record page, a status board and an occupancy board), each the code of a tested `Guides/Recipes/<Name>` story |
809
809
  | agent `screen-builder` | builds a page or a form from the catalogue, with tests by role and name and an accessibility check, then looks at 360 and 1440 px screenshots in light and dark and fixes until the grid reads 4 everywhere |
810
810
  | agent `design-reviewer` | read-only: scores a screen's screenshots on the same 11 criteria and returns the fixes ranked, each with the component and prop |
811
811
  | skill `build-a-theme` + agent `theme-builder` | the app's own theme with `defineTheme`: seeds, tones, background and icon motif, generation, provider and picker; checks the AA contrast of the generated tokens in light and dark and looks at key screens |
@@ -1,9 +1,9 @@
1
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-C4CgDEYm.js";
6
- import { a as s, i as c, r as l, t as u } from "./button-tones-BwuVvAmd.js";
2
+ import { t } from "./is-production-GLw59WU8.js";
3
+ import { n, t as r } from "./dist-DVRQkaTK.js";
4
+ import { n as i, t as a } from "./dist-B61_o9Mg.js";
5
+ import { a as o, i as s, r as c, t as l } from "./button-tones-BwuVvAmd.js";
6
+ import { t as u } from "./spinner-BhuZuHK1.js";
7
7
  import { t as d } from "./button-group-context-CaP0X5p_.js";
8
8
  import { t as f } from "./has-text-content-Ds2dkHX_.js";
9
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";
@@ -59,42 +59,42 @@ var T = [
59
59
  {
60
60
  variant: "tonal",
61
61
  color: "primary",
62
- class: `${l.primary} ${u.primary} bg-primary/15 hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
62
+ class: `${c.primary} ${l.primary} bg-primary/15 hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
63
63
  },
64
64
  {
65
65
  variant: "tonal",
66
66
  color: "secondary",
67
- class: `${l.secondary} ${u.secondary} bg-secondary/15 hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
67
+ class: `${c.secondary} ${l.secondary} bg-secondary/15 hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
68
68
  },
69
69
  {
70
70
  variant: "tonal",
71
71
  color: "info",
72
- class: `${l.info} ${u.info} bg-info/15 hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
72
+ class: `${c.info} ${l.info} bg-info/15 hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
73
73
  },
74
74
  {
75
75
  variant: "tonal",
76
76
  color: "success",
77
- class: `${l.success} ${u.success} bg-success/15 hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
77
+ class: `${c.success} ${l.success} bg-success/15 hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
78
78
  },
79
79
  {
80
80
  variant: "tonal",
81
81
  color: "warning",
82
- class: `${l.warning} ${u.warning} bg-warning/15 hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
82
+ class: `${c.warning} ${l.warning} bg-warning/15 hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
83
83
  },
84
84
  {
85
85
  variant: "tonal",
86
86
  color: "error",
87
- class: `${l.error} ${u.error} bg-error/15 hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
87
+ class: `${c.error} ${l.error} bg-error/15 hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
88
88
  },
89
89
  {
90
90
  variant: "tonal",
91
91
  color: "default",
92
- class: `${l.default} ${u.default} bg-foreground/15 hover:bg-foreground/10 active:bg-muted focus:bg-muted`
92
+ class: `${c.default} ${l.default} bg-foreground/15 hover:bg-foreground/10 active:bg-muted focus:bg-muted`
93
93
  },
94
94
  {
95
95
  variant: "ghost",
96
96
  color: "primary",
97
- class: `${l.primary} ${u.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
97
+ class: `${c.primary} ${l.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
98
98
  },
99
99
  {
100
100
  variant: "ghost",
@@ -104,99 +104,99 @@ var T = [
104
104
  {
105
105
  variant: "ghost",
106
106
  color: "secondary",
107
- class: `${l.secondary} ${u.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
107
+ class: `${c.secondary} ${l.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
108
108
  },
109
109
  {
110
110
  variant: "ghost",
111
111
  color: "success",
112
- class: `${l.success} ${u.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
112
+ class: `${c.success} ${l.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
113
113
  },
114
114
  {
115
115
  variant: "ghost",
116
116
  color: "info",
117
- class: `${l.info} ${u.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
117
+ class: `${c.info} ${l.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
118
118
  },
119
119
  {
120
120
  variant: "ghost",
121
121
  color: "warning",
122
- class: `${l.warning} ${u.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
122
+ class: `${c.warning} ${l.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
123
123
  },
124
124
  {
125
125
  variant: "ghost",
126
126
  color: "error",
127
- class: `${l.error} ${u.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
127
+ class: `${c.error} ${l.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
128
128
  },
129
129
  {
130
130
  variant: "outlined",
131
131
  color: "primary",
132
- class: `${l.primary} ${u.primary} focus:bg-primary/10 hover:bg-primary/10`
132
+ class: `${c.primary} ${l.primary} focus:bg-primary/10 hover:bg-primary/10`
133
133
  },
134
134
  {
135
135
  variant: "outlined",
136
136
  color: "secondary",
137
- class: `${l.secondary} ${u.secondary} focus:bg-secondary/10 hover:bg-secondary/10`
137
+ class: `${c.secondary} ${l.secondary} focus:bg-secondary/10 hover:bg-secondary/10`
138
138
  },
139
139
  {
140
140
  variant: "outlined",
141
141
  color: "info",
142
- class: `${l.info} ${u.info} focus:bg-info/10 hover:bg-info/10`
142
+ class: `${c.info} ${l.info} focus:bg-info/10 hover:bg-info/10`
143
143
  },
144
144
  {
145
145
  variant: "outlined",
146
146
  color: "success",
147
- class: `${l.success} ${u.success} focus:bg-success/10 hover:bg-success/10`
147
+ class: `${c.success} ${l.success} focus:bg-success/10 hover:bg-success/10`
148
148
  },
149
149
  {
150
150
  variant: "outlined",
151
151
  color: "warning",
152
- class: `${l.warning} ${u.warning} focus:bg-warning/10 hover:bg-warning/10`
152
+ class: `${c.warning} ${l.warning} focus:bg-warning/10 hover:bg-warning/10`
153
153
  },
154
154
  {
155
155
  variant: "outlined",
156
156
  color: "error",
157
- class: `${l.error} ${u.error} focus:bg-error/10 hover:bg-error/10`
157
+ class: `${c.error} ${l.error} focus:bg-error/10 hover:bg-error/10`
158
158
  },
159
159
  {
160
160
  variant: "outlined",
161
161
  color: "default",
162
- class: `${l.default} ${u.default} focus:bg-foreground/10 hover:bg-foreground/10`
162
+ class: `${c.default} ${l.default} focus:bg-foreground/10 hover:bg-foreground/10`
163
163
  },
164
164
  {
165
165
  variant: "link",
166
166
  color: "primary",
167
- class: `${l.primary} ${u.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
167
+ class: `${c.primary} ${l.primary} hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
168
168
  },
169
169
  {
170
170
  variant: "link",
171
171
  color: "secondary",
172
- class: `${l.secondary} ${u.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
172
+ class: `${c.secondary} ${l.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
173
173
  },
174
174
  {
175
175
  variant: "link",
176
176
  color: "success",
177
- class: `${l.success} ${u.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
177
+ class: `${c.success} ${l.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
178
178
  },
179
179
  {
180
180
  variant: "link",
181
181
  color: "info",
182
- class: `${l.info} ${u.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
182
+ class: `${c.info} ${l.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
183
183
  },
184
184
  {
185
185
  variant: "link",
186
186
  color: "warning",
187
- class: `${l.warning} ${u.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
187
+ class: `${c.warning} ${l.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
188
188
  },
189
189
  {
190
190
  variant: "link",
191
191
  color: "error",
192
- class: `${l.error} ${u.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
192
+ class: `${c.error} ${l.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
193
193
  },
194
194
  {
195
195
  variant: "link",
196
196
  color: "default",
197
- class: `${l.default} ${u.default} hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
197
+ class: `${c.default} ${l.default} hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
198
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))]", {
199
+ ], E = a("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
200
  variants: {
201
201
  variant: {
202
202
  filled: "",
@@ -205,7 +205,7 @@ var T = [
205
205
  outlined: "shadow-[inset_0_0_0_1.5px_color-mix(in_oklab,var(--btn-line,currentColor)_55%,transparent)]",
206
206
  link: "nxgt-btn-bare focus:underline underline-offset-4 hover:underline"
207
207
  },
208
- color: c,
208
+ color: s,
209
209
  size: {
210
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
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]",
@@ -282,38 +282,38 @@ function N(e, t) {
282
282
  }
283
283
  //#endregion
284
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;
285
+ function P({ className: i, variant: a = "filled", asChild: s = !1, children: c, color: l, 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 = s ? r : "button", P = v(d), F = p ?? P, I = s && x !== void 0;
287
287
  y(() => {
288
- I && !a() && console.warn("Button: `selected` is ignored with `asChild`; set aria-pressed on the child element.");
288
+ I && !t() && console.warn("Button: `selected` is ignored with `asChild`; set aria-pressed on the child element.");
289
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, {
290
+ let L = !s && x !== void 0, R = v(o) || !!(j["aria-label"] || j["aria-labelledby"]) || f(c), z = N(h, m), B = m || z.locked, V = w(B, z, E);
291
+ return /* @__PURE__ */ S(o, {
292
292
  value: R,
293
293
  children: /* @__PURE__ */ C(M, {
294
294
  "data-slot": "button",
295
- "data-variant": i,
296
- "data-color": u,
295
+ "data-variant": a,
296
+ "data-color": l,
297
297
  "data-size": F,
298
298
  "data-shape": b,
299
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,
300
+ className: e("w-fit max-w-full min-w-0 justify-center", s && "nxgt-btn-as-child overflow-clip text-ellipsis whitespace-nowrap [overflow-clip-margin:22px]", D({
301
+ variant: a,
302
+ color: l,
303
303
  size: F
304
- }), k(_, F), r),
305
- type: c ? void 0 : O,
304
+ }), k(_, F), i),
305
+ type: s ? void 0 : O,
306
306
  disabled: T,
307
307
  ...j,
308
308
  "aria-disabled": B || j["aria-disabled"],
309
309
  "aria-busy": B || j["aria-busy"],
310
310
  "aria-pressed": L ? x : j["aria-pressed"],
311
311
  onClickCapture: V,
312
- children: [B && /* @__PURE__ */ S(o, {
312
+ children: [B && /* @__PURE__ */ S(u, {
313
313
  variant: g,
314
- color: i === "filled" ? "light" : u,
314
+ color: a === "filled" ? "light" : l,
315
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) })]
316
+ }), /* @__PURE__ */ S(n, { children: s ? c : A(c) })]
317
317
  })
318
318
  });
319
319
  }