@nxgt/material 3.48.0 → 3.50.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 (120) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -3
  3. package/dist/{async-slice-DlvKCKAa.js → async-slice-3loEtzUY.js} +2 -2
  4. package/dist/{button-yaltbQmC.js → button-BRUaHD8z.js} +81 -112
  5. package/dist/charts.js +144 -144
  6. package/dist/{chip-BqWbbr1b.js → chip-DneTrtNj.js} +56 -56
  7. package/dist/{code-editor-C9qBNoYb.js → code-editor-R_nPN_-d.js} +308 -308
  8. package/dist/code-editor.js +47 -47
  9. package/dist/{code-language-items-DAHtfQ7W.js → code-language-items-BKEUhQlF.js} +2 -2
  10. package/dist/components/components.css +1 -0
  11. package/dist/components/ui/actions/action-card/action-card-indicator.css +48 -0
  12. package/dist/components/ui/actions/action-card/action-card-modes.css +4 -1
  13. package/dist/components/ui/actions/action-card/action-card-tile.css +141 -0
  14. package/dist/components/ui/actions/action-card/action-card.css +33 -3
  15. package/dist/{components-Ox6FHmpx.js → components-D6xFLcoE.js} +17646 -17567
  16. package/dist/components.js +26 -27
  17. package/dist/{dialog-CCCcnTIx.js → dialog-S7dLsYRZ.js} +16 -16
  18. package/dist/dnd.js +1 -1
  19. package/dist/{dropdown-menu-Df8785nt.js → dropdown-menu-XLlxfDgq.js} +271 -272
  20. package/dist/editor.js +1028 -1028
  21. package/dist/{empty-state-DcF4TBzi.js → empty-state-Dsf6R-Zo.js} +37 -37
  22. package/dist/{escape-owner-C4W_sOAU.js → escape-owner-B9eCwjLw.js} +1 -1
  23. package/dist/{field-blur-CJHzVSh9.js → field-blur-5uRDFHvB.js} +1 -1
  24. package/dist/{field-blur-context-Cft9s7Hg.js → field-blur-context-Cwt4TuBq.js} +1 -1
  25. package/dist/hooks.js +4 -4
  26. package/dist/{hover-card-C0fw2kLK.js → hover-card-PHUgRSjJ.js} +24 -24
  27. package/dist/{i18n-provider-C0fB0sEL.js → i18n-provider-DPM_ALQ4.js} +1 -1
  28. package/dist/i18n.js +5 -5
  29. package/dist/{icon-badge-aJ22mKGh.js → icon-badge-Dh6-FNOF.js} +3 -3
  30. package/dist/{icon-button-CN9r5TNE.js → icon-button-DSC2-IAG.js} +118 -86
  31. package/dist/lib/components/ui/actions/action-card/action-card-semantics.d.ts +25 -2
  32. package/dist/lib/components/ui/actions/action-card/action-card.d.ts +18 -2
  33. package/dist/lib/components/ui/actions/action-card/partials/action-card-icon.d.ts +6 -0
  34. package/dist/lib/components/ui/actions/action-card/partials/action-card-meta.d.ts +15 -0
  35. package/dist/lib/components/ui/actions/action-card/partials/action-card-status.d.ts +6 -0
  36. package/dist/lib/components/ui/actions/action-card/partials/action-card-text.d.ts +20 -0
  37. package/dist/lib/components/ui/actions/action-card/partials/action-card-title-button.d.ts +14 -0
  38. package/dist/lib/components/ui/actions/action-card/partials/action-card-trail.d.ts +6 -0
  39. package/dist/lib/components/ui/actions/action-card/use-action-card-names.d.ts +22 -0
  40. package/dist/lib/components/ui/actions/action-card/use-reveal.d.ts +23 -0
  41. package/dist/lib/components/ui/actions/button/button.variants.d.ts +1 -1
  42. package/dist/lib/components/ui/actions/icon-button/icon-button-busy.d.ts +22 -0
  43. package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +2 -0
  44. package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +7 -0
  45. package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
  46. package/dist/lib/components/ui/collections/filter/bar/partials/filter-quick-toggle.d.ts +3 -2
  47. package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +7 -1
  48. package/dist/lib/components/ui/collections/page-footer/page-footer.d.ts +6 -1
  49. package/dist/lib/components/ui/collections/row-menu/row-menu-trigger.d.ts +5 -2
  50. package/dist/lib/components/ui/collections/row-menu/row-menu.d.ts +1 -1
  51. package/dist/lib/components/ui/collections/server-table/index.d.ts +1 -1
  52. package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-chips.d.ts +5 -3
  53. package/dist/lib/components/ui/collections/server-table/types-paging.d.ts +17 -0
  54. package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -10
  55. package/dist/lib/components/ui/dates/duration-field/partials/use-duration-box.d.ts +1 -1
  56. package/dist/lib/components/ui/display/badge/badge.d.ts +1 -1
  57. package/dist/lib/components/ui/display/day-separator/day-separator.d.ts +1 -1
  58. package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-body.d.ts +5 -3
  59. package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-request-error.d.ts +15 -0
  60. package/dist/lib/components/ui/feedback/step-up-dialog/step-up-dialog.d.ts +6 -3
  61. package/dist/lib/components/ui/feedback/step-up-dialog/types.d.ts +12 -1
  62. package/dist/lib/components/ui/feedback/step-up-dialog/use-retry-focus.d.ts +27 -0
  63. package/dist/lib/components/ui/feedback/step-up-dialog/use-retry.d.ts +11 -0
  64. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  65. package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +20 -20
  66. package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +20 -20
  67. package/dist/lib/components/ui/fields/verification-code/use-settled-focus.d.ts +10 -0
  68. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +1 -1
  69. package/dist/lib/components/ui/media/carousel/use-carousel-engine.d.ts +1 -1
  70. package/dist/lib/components/ui/media/media-player/engine/use-queue-actions.d.ts +1 -1
  71. package/dist/lib/components/ui/media/pdf-reader/pdf-reader.slice.d.ts +1 -1
  72. package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +34 -34
  73. package/dist/lib/components/ui/widgets/chat/chat-message.variants.d.ts +2 -2
  74. package/dist/lib/components/ui/widgets/event-calendar/use-event-calendar.d.ts +1 -1
  75. package/dist/lib/i18n/resources/en/en.d.ts +1 -0
  76. package/dist/lib/i18n/resources/en/material.json.d.ts +2 -1
  77. package/dist/lib/i18n/resources/fr/fr.d.ts +1 -0
  78. package/dist/lib/i18n/resources/fr/material.json.d.ts +2 -1
  79. package/dist/lib/i18n/resources/resources.d.ts +2 -0
  80. package/dist/lib/i18n/translator.d.ts +1 -1
  81. package/dist/lib.js +1 -1
  82. package/dist/main.js +43 -44
  83. package/dist/map.js +79 -79
  84. package/dist/material.css +1 -1
  85. package/dist/nxgt-theme-ivgNca3z.js +37 -0
  86. package/dist/pdf-reader.js +1 -1
  87. package/dist/print.js +2 -2
  88. package/dist/{public-zVb_Nq_D.js → public-vxiijIJF.js} +82 -82
  89. package/dist/{rich-code-block-DMWZZJma.js → rich-code-block-BwvCXPqq.js} +52 -52
  90. package/dist/{sortable-provider-DstbgMVf.js → sortable-provider-D2pAFWQB.js} +218 -218
  91. package/dist/{tooltip-CkttDIab.js → spinner-BpVwI1ps.js} +503 -278
  92. package/dist/{stored-language-IaL1Ftn_.js → stored-language-Beyj2ult.js} +4 -2
  93. package/dist/theme-picker.js +45 -45
  94. package/dist/{theme-store-CSl51uNH.js → theme-store-BdPp43cV.js} +13 -13
  95. package/dist/{theme-toggle-CGW2_K54.js → theme-toggle-BTYRPkP4.js} +16 -16
  96. package/dist/themes.js +17 -17
  97. package/dist/{toggle-group-BMJNcFAC.js → toggle-group-BkH23Jk4.js} +11 -11
  98. package/dist/{toolbar-items-CsLGJMEJ.js → toolbar-items-CIMo4F9q.js} +421 -421
  99. package/dist/{translate-material-v9u-e7Kd.js → translate-material-DEUlaL_1.js} +2 -2
  100. package/dist/{translator-Dk4_qE6U.js → translator-CBgIb3zP.js} +1 -1
  101. package/dist/{use-chat-composer-Brcb5f7r.js → use-chat-composer-D8UAsX0f.js} +6228 -5999
  102. package/dist/{button-tones-BwuVvAmd.js → use-click-lock-BZYtTmVt.js} +37 -7
  103. package/dist/{use-heading-spy-DjKixjLm.js → use-heading-spy-C5LXtA8Z.js} +1 -1
  104. package/dist/{use-material-translation-DOkTaWK_.js → use-material-translation-DWWeeg-B.js} +2 -2
  105. package/dist/{use-theme-DMcyJ52N.js → use-theme-BCLireTd.js} +1 -1
  106. package/docs/components/buttons-and-actions.md +64 -5
  107. package/docs/components/data-table-filter-and-lists.md +30 -10
  108. package/docs/components/feedback-and-status.md +22 -3
  109. package/docs/components/form-fields.md +7 -0
  110. package/docs/guides/cards-and-tiles.md +60 -0
  111. package/docs/guides/server-lists-url.md +3 -2
  112. package/docs/roadmap.md +11 -0
  113. package/lib/components/components.css +1 -0
  114. package/lib/components/ui/actions/action-card/action-card-indicator.css +48 -0
  115. package/lib/components/ui/actions/action-card/action-card-modes.css +4 -1
  116. package/lib/components/ui/actions/action-card/action-card-tile.css +141 -0
  117. package/lib/components/ui/actions/action-card/action-card.css +33 -3
  118. package/package.json +1 -1
  119. package/dist/nxgt-theme-ZS945iMP.js +0 -37
  120. package/dist/spinner-C4CgDEYm.js +0 -229
@@ -1,21 +1,21 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { n as t } from "./use-shape-morph-BKA_R5P5.js";
3
- import { n, t as r } from "./dist-DVRQkaTK.js";
4
- import { o as i, t as a } from "./tooltip-CkttDIab.js";
5
- import { t as o } from "./is-production-GLw59WU8.js";
6
- import { a as s, i as c, n as l, r as u, t as d } from "./button-tones-BwuVvAmd.js";
7
- import { t as f } from "./button-group-context-CaP0X5p_.js";
8
- import { shapeOutline as p, toSvgPath as m } from "@nxgt/material-core/shapes";
9
- import { useContext as h, useEffect as g, useRef as _ } from "react";
10
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
2
+ import { t } from "./is-production-GLw59WU8.js";
3
+ import { n } from "./use-shape-morph-BKA_R5P5.js";
4
+ import { n as r, t as i } from "./dist-DVRQkaTK.js";
5
+ import { n as a, r as o, t as s } from "./spinner-BpVwI1ps.js";
6
+ import { a as c, i as l, n as u, o as d, r as f, s as p, t as m } from "./use-click-lock-BZYtTmVt.js";
7
+ import { t as h } from "./button-group-context-CaP0X5p_.js";
8
+ import { shapeOutline as g, toSvgPath as _ } from "@nxgt/material-core/shapes";
9
+ import { useContext as v, useEffect as y, useRef as b } from "react";
10
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
11
11
  //#region lib/components/ui/display/count-badge/format-count.ts
12
- function b(e, t = 99) {
12
+ function C(e, t = 99) {
13
13
  let n = Math.max(0, Math.round(e));
14
14
  return n > t ? `${t}+` : String(n);
15
15
  }
16
16
  //#endregion
17
17
  //#region lib/components/ui/actions/icon-button/icon-button.compound-variants.ts
18
- var x = [
18
+ var w = [
19
19
  {
20
20
  variant: "filled",
21
21
  color: "primary",
@@ -54,37 +54,37 @@ var x = [
54
54
  {
55
55
  variant: "tonal",
56
56
  color: "primary",
57
- class: `${u.primary} ${d.primary} ${l.primary} bg-primary/15 hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
57
+ class: `${l.primary} ${u.primary} ${f.primary} bg-primary/15 hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
58
58
  },
59
59
  {
60
60
  variant: "tonal",
61
61
  color: "secondary",
62
- class: `${u.secondary} ${d.secondary} ${l.secondary} bg-secondary/15 hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
62
+ class: `${l.secondary} ${u.secondary} ${f.secondary} bg-secondary/15 hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
63
63
  },
64
64
  {
65
65
  variant: "tonal",
66
66
  color: "success",
67
- class: `${u.success} ${d.success} ${l.success} bg-success/15 hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
67
+ class: `${l.success} ${u.success} ${f.success} bg-success/15 hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
68
68
  },
69
69
  {
70
70
  variant: "tonal",
71
71
  color: "info",
72
- class: `${u.info} ${d.info} ${l.info} bg-info/15 hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
72
+ class: `${l.info} ${u.info} ${f.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: "warning",
77
- class: `${u.warning} ${d.warning} ${l.warning} bg-warning/15 hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
77
+ class: `${l.warning} ${u.warning} ${f.warning} bg-warning/15 hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
78
78
  },
79
79
  {
80
80
  variant: "tonal",
81
81
  color: "error",
82
- class: `${u.error} ${d.error} ${l.error} bg-error/15 hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
82
+ class: `${l.error} ${u.error} ${f.error} bg-error/15 hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
83
83
  },
84
84
  {
85
85
  variant: "tonal",
86
86
  color: "default",
87
- class: `${u.default} ${d.default} ${l.default} bg-foreground/15 hover:bg-foreground/10 active:bg-muted focus:bg-muted`
87
+ class: `${l.default} ${u.default} ${f.default} bg-foreground/15 hover:bg-foreground/10 active:bg-muted focus:bg-muted`
88
88
  },
89
89
  {
90
90
  variant: "ghost",
@@ -99,99 +99,99 @@ var x = [
99
99
  {
100
100
  variant: "ghost",
101
101
  color: "secondary",
102
- class: `${u.secondary} ${d.secondary} ${l.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
102
+ class: `${l.secondary} ${u.secondary} ${f.secondary} hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
103
103
  },
104
104
  {
105
105
  variant: "ghost",
106
106
  color: "success",
107
- class: `${u.success} ${d.success} ${l.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
107
+ class: `${l.success} ${u.success} ${f.success} hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
108
108
  },
109
109
  {
110
110
  variant: "ghost",
111
111
  color: "info",
112
- class: `${u.info} ${d.info} ${l.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
112
+ class: `${l.info} ${u.info} ${f.info} hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
113
113
  },
114
114
  {
115
115
  variant: "ghost",
116
116
  color: "warning",
117
- class: `${u.warning} ${d.warning} ${l.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
117
+ class: `${l.warning} ${u.warning} ${f.warning} hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
118
118
  },
119
119
  {
120
120
  variant: "ghost",
121
121
  color: "error",
122
- class: `${u.error} ${d.error} ${l.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
122
+ class: `${l.error} ${u.error} ${f.error} hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
123
123
  },
124
124
  {
125
125
  variant: "outlined",
126
126
  color: "primary",
127
- class: `${u.primary} ${d.primary} ${l.primary} focus:bg-primary/10 hover:bg-primary/10`
127
+ class: `${l.primary} ${u.primary} ${f.primary} focus:bg-primary/10 hover:bg-primary/10`
128
128
  },
129
129
  {
130
130
  variant: "outlined",
131
131
  color: "secondary",
132
- class: `${u.secondary} ${d.secondary} ${l.secondary} focus:bg-secondary/10 hover:bg-secondary/10`
132
+ class: `${l.secondary} ${u.secondary} ${f.secondary} focus:bg-secondary/10 hover:bg-secondary/10`
133
133
  },
134
134
  {
135
135
  variant: "outlined",
136
136
  color: "success",
137
- class: `${u.success} ${d.success} ${l.success} focus:bg-success/10 hover:bg-success/10`
137
+ class: `${l.success} ${u.success} ${f.success} focus:bg-success/10 hover:bg-success/10`
138
138
  },
139
139
  {
140
140
  variant: "outlined",
141
141
  color: "info",
142
- class: `${u.info} ${d.info} ${l.info} focus:bg-info/10 hover:bg-info/10`
142
+ class: `${l.info} ${u.info} ${f.info} focus:bg-info/10 hover:bg-info/10`
143
143
  },
144
144
  {
145
145
  variant: "outlined",
146
146
  color: "warning",
147
- class: `${u.warning} ${d.warning} ${l.warning} focus:bg-warning/10 hover:bg-warning/10`
147
+ class: `${l.warning} ${u.warning} ${f.warning} focus:bg-warning/10 hover:bg-warning/10`
148
148
  },
149
149
  {
150
150
  variant: "outlined",
151
151
  color: "error",
152
- class: `${u.error} ${d.error} ${l.error} focus:bg-error/10 hover:bg-error/10`
152
+ class: `${l.error} ${u.error} ${f.error} focus:bg-error/10 hover:bg-error/10`
153
153
  },
154
154
  {
155
155
  variant: "outlined",
156
156
  color: "default",
157
- class: `${u.default} ${d.default} ${l.default} focus:bg-foreground/10 hover:bg-foreground/10`
157
+ class: `${l.default} ${u.default} ${f.default} focus:bg-foreground/10 hover:bg-foreground/10`
158
158
  },
159
159
  {
160
160
  variant: "link",
161
161
  color: "primary",
162
- class: `${u.primary} ${d.primary} ${l.primary} underline-offset-4 hover:underline hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
162
+ class: `${l.primary} ${u.primary} ${f.primary} underline-offset-4 hover:underline hover:bg-primary/10 active:bg-primary/5 focus:bg-primary/10`
163
163
  },
164
164
  {
165
165
  variant: "link",
166
166
  color: "secondary",
167
- class: `${u.secondary} ${d.secondary} ${l.secondary} underline-offset-4 hover:underline hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
167
+ class: `${l.secondary} ${u.secondary} ${f.secondary} underline-offset-4 hover:underline hover:bg-secondary/10 active:bg-secondary/5 focus:bg-secondary/10`
168
168
  },
169
169
  {
170
170
  variant: "link",
171
171
  color: "success",
172
- class: `${u.success} ${d.success} ${l.success} underline-offset-4 hover:underline hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
172
+ class: `${l.success} ${u.success} ${f.success} underline-offset-4 hover:underline hover:bg-success/10 active:bg-success/5 focus:bg-success/10`
173
173
  },
174
174
  {
175
175
  variant: "link",
176
176
  color: "info",
177
- class: `${u.info} ${d.info} ${l.info} underline-offset-4 hover:underline hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
177
+ class: `${l.info} ${u.info} ${f.info} underline-offset-4 hover:underline hover:bg-info/10 active:bg-info/5 focus:bg-info/10`
178
178
  },
179
179
  {
180
180
  variant: "link",
181
181
  color: "warning",
182
- class: `${u.warning} ${d.warning} ${l.warning} underline-offset-4 hover:underline hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
182
+ class: `${l.warning} ${u.warning} ${f.warning} underline-offset-4 hover:underline hover:bg-warning/10 active:bg-warning/5 focus:bg-warning/10`
183
183
  },
184
184
  {
185
185
  variant: "link",
186
186
  color: "error",
187
- class: `${u.error} ${d.error} ${l.error} underline-offset-4 hover:underline hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
187
+ class: `${l.error} ${u.error} ${f.error} underline-offset-4 hover:underline hover:bg-error/10 active:bg-error/5 focus:bg-error/10`
188
188
  },
189
189
  {
190
190
  variant: "link",
191
191
  color: "default",
192
- class: `${u.default} ${d.default} ${l.default} underline-offset-4 hover:underline hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
192
+ class: `${l.default} ${u.default} ${f.default} underline-offset-4 hover:underline hover:bg-foreground/10 active:bg-muted focus:bg-foreground/10`
193
193
  }
194
- ], S = i("inline-flex center gap-2 cursor-pointer whitespace-nowrap text-sm font-medium disabled:pointer-events-none [&_svg]:bg-transparent [&_svg]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-(--btn-ic,1rem) shrink-0 [&_svg]:shrink-0", {
194
+ ], T = a("inline-flex center gap-2 cursor-pointer whitespace-nowrap text-sm font-medium disabled:pointer-events-none [&_svg]:bg-transparent [&_svg]:text-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-(--btn-ic,1rem) shrink-0 [&_svg]:shrink-0", {
195
195
  variants: {
196
196
  look: {
197
197
  btn: "nxgt-btn nxgt-morph-fill aria-invalid:[--btn-focus:var(--color-error)] aria-invalid:[--btn-line:var(--color-error)]",
@@ -226,22 +226,45 @@ var x = [
226
226
  size: "legacy",
227
227
  width: "default"
228
228
  },
229
- compoundVariants: [...x, {
229
+ compoundVariants: [...w, {
230
230
  look: "btn",
231
231
  size: "legacy",
232
232
  width: "default",
233
233
  class: "[--btn-round:50%]"
234
234
  }]
235
235
  });
236
- function C(e) {
237
- return (t) => S({
236
+ function E(e) {
237
+ return (t) => T({
238
238
  ...t,
239
239
  look: e,
240
240
  size: t?.size ?? "legacy",
241
241
  color: t?.variant === "ghost" && t.color == null ? "default" : t?.color
242
242
  });
243
243
  }
244
- var w = C("btn"), T = C("shaped"), E = {
244
+ var D = E("btn"), O = E("shaped");
245
+ //#endregion
246
+ //#region lib/components/ui/actions/icon-button/icon-button-busy.tsx
247
+ function k(e, t) {
248
+ let n = m(!1, e);
249
+ return {
250
+ busyClassName: e ? "relative [&_[data-slot=icon]]:invisible" : void 0,
251
+ hostProps: {
252
+ "aria-disabled": e || t["aria-disabled"],
253
+ "aria-busy": e || t["aria-busy"],
254
+ onClickCapture: d(e, n, t.onClickCapture)
255
+ }
256
+ };
257
+ }
258
+ function A({ variant: e, color: t }) {
259
+ return /* @__PURE__ */ x(s, {
260
+ variant: "2",
261
+ color: e === "filled" ? "light" : t ?? (e === "ghost" ? "default" : "primary"),
262
+ className: "absolute inset-0 m-auto size-(--btn-ic,1rem)"
263
+ });
264
+ }
265
+ //#endregion
266
+ //#region lib/components/ui/actions/icon-button/icon-button-surface.ts
267
+ var j = {
245
268
  filled: {
246
269
  primary: "fill-primary",
247
270
  secondary: "fill-secondary dark:fill-[color-mix(in_oklab,var(--color-secondary)_70%,var(--color-background))]",
@@ -288,87 +311,96 @@ var w = C("btn"), T = C("shaped"), E = {
288
311
  default: "fill-transparent group-hover/icon-button:fill-accent dark:group-hover/icon-button:fill-accent/50"
289
312
  }
290
313
  };
291
- function D({ shape: n, variant: r, color: i }) {
292
- let a = p(n), o = _(null);
293
- return t(o, a, !0), /* @__PURE__ */ v("svg", {
314
+ function M({ shape: t, variant: r, color: i }) {
315
+ let a = g(t), o = b(null);
316
+ return n(o, a, !0), /* @__PURE__ */ x("svg", {
294
317
  "data-slot": "icon-button-shape",
295
318
  viewBox: "0 0 100 100",
296
319
  "aria-hidden": "true",
297
320
  focusable: "false",
298
321
  className: e("-z-10 pointer-events-none absolute inset-0 size-full overflow-visible transition-[filter]", r === "filled" && "group-hover/icon-button:brightness-90 group-active/icon-button:brightness-80"),
299
- children: /* @__PURE__ */ v("path", {
322
+ children: /* @__PURE__ */ x("path", {
300
323
  ref: o,
301
- d: m(a),
324
+ d: _(a),
302
325
  vectorEffect: "non-scaling-stroke",
303
326
  paintOrder: "stroke",
304
- className: e("stroke-transparent stroke-1 transition-[fill]", E[r][i], "group-focus-visible/icon-button:stroke-ring/50 group-focus-visible/icon-button:stroke-[6px]", "forced-colors:fill-none forced-colors:stroke-[ButtonText] forced-colors:group-focus-visible/icon-button:stroke-[Highlight]")
327
+ className: e("stroke-transparent stroke-1 transition-[fill]", j[r][i], "group-focus-visible/icon-button:stroke-ring/50 group-focus-visible/icon-button:stroke-[6px]", "forced-colors:fill-none forced-colors:stroke-[ButtonText] forced-colors:group-focus-visible/icon-button:stroke-[Highlight]")
305
328
  })
306
329
  });
307
330
  }
331
+ function N(e, n) {
332
+ let r = !!e && n != null && n !== "default";
333
+ y(() => {
334
+ r && !t() && console.warn("IconButton: `width` is ignored with `shape`; a shaped button is as wide as it is high.");
335
+ }, [r]);
336
+ }
308
337
  //#endregion
309
338
  //#region lib/components/ui/actions/icon-button/icon-button.tsx
310
- function O(e) {
311
- return e === void 0 || !Number.isFinite(e) || e < .5 ? null : b(e);
339
+ function P(e) {
340
+ return e === void 0 || !Number.isFinite(e) || e < .5 ? null : C(e);
312
341
  }
313
- function k({ variant: t, color: i, size: a, width: c, className: l, asChild: u, type: d = "button", shape: p, morph: m = "pill", badge: _, badgeTone: b = "primary", children: x, ...S }) {
314
- let C = u ? r : "button", E = h(f), k = a ?? E, A = !!(S["aria-label"] || S["aria-labelledby"]), j = !!p && c != null && c !== "default";
315
- g(() => {
316
- j && !o() && console.warn("IconButton: `width` is ignored with `shape`; a shaped button is as wide as it is high.");
317
- }, [j]);
318
- let M = !p && m !== "none" && S["aria-pressed"] !== void 0, N = O(_), P = S["aria-pressed"] === !0 || S["aria-pressed"] === "true";
319
- return /* @__PURE__ */ v(s, {
320
- value: A,
321
- children: /* @__PURE__ */ y(C, {
342
+ function F({ variant: t, color: n, size: a, width: o, className: s, asChild: c, type: l = "button", shape: u, morph: d = "pill", badge: f, badgeTone: m = "primary", loading: g = !1, children: _, ...y }) {
343
+ let b = c ? i : "button", C = v(h), w = a ?? C, T = !!(y["aria-label"] || y["aria-labelledby"]);
344
+ N(u, o);
345
+ let E = !u && d !== "none" && y["aria-pressed"] != null, j = P(f), F = String(y["aria-pressed"]) === "true", I = k(g, y);
346
+ return /* @__PURE__ */ x(p, {
347
+ value: T,
348
+ children: /* @__PURE__ */ S(b, {
322
349
  "data-slot": "icon-button",
323
350
  "data-icon-button": "",
324
351
  "data-variant": t ?? "filled",
325
- "data-color": i,
326
- type: u ? void 0 : d,
327
- "data-size": k,
328
- "data-shape": p,
329
- "data-morph": M ? m : void 0,
330
- "data-selected": M && P ? "true" : void 0,
331
- className: e(p ? T({
352
+ "data-color": n,
353
+ type: c ? void 0 : l,
354
+ "data-size": w,
355
+ "data-shape": u,
356
+ "data-morph": E ? d : void 0,
357
+ "data-selected": E && F ? "true" : void 0,
358
+ className: e(u ? O({
332
359
  variant: t,
333
- color: i,
334
- size: k
335
- }) : w({
360
+ color: n,
361
+ size: w
362
+ }) : D({
336
363
  variant: t,
337
- color: i,
338
- size: k,
339
- width: c
340
- }), p && "group/icon-button nxgt-touch-target relative isolate bg-transparent! border-0! shadow-none! ring-0! focus-visible:ring-0! aria-invalid:ring-0! forced-colors:[&_svg]:stroke-[ButtonText] forced-colors:[&_svg]:text-[ButtonText]", l),
341
- ...S,
364
+ color: n,
365
+ size: w,
366
+ width: o
367
+ }), u && "group/icon-button nxgt-touch-target relative isolate bg-transparent! border-0! shadow-none! ring-0! focus-visible:ring-0! aria-invalid:ring-0! forced-colors:[&_svg]:stroke-[ButtonText] forced-colors:[&_svg]:text-[ButtonText]", I.busyClassName, s),
368
+ ...y,
369
+ ...I.hostProps,
342
370
  children: [
343
- p ? /* @__PURE__ */ v(D, {
344
- shape: p,
371
+ u ? /* @__PURE__ */ x(M, {
372
+ shape: u,
345
373
  variant: t ?? "filled",
346
- color: i ?? (t === "ghost" ? "default" : "primary")
374
+ color: n ?? (t === "ghost" ? "default" : "primary")
347
375
  }) : null,
348
- /* @__PURE__ */ v(n, { children: x }),
349
- N === null ? null : /* @__PURE__ */ v("span", {
376
+ /* @__PURE__ */ x(r, { children: _ }),
377
+ g && /* @__PURE__ */ x(A, {
378
+ variant: t ?? "filled",
379
+ color: n
380
+ }),
381
+ j === null ? null : /* @__PURE__ */ x("span", {
350
382
  "data-slot": "icon-button-badge",
351
383
  "aria-hidden": "true",
352
- "data-tone": b,
384
+ "data-tone": m,
353
385
  className: "nxgt-icon-button-badge",
354
- children: N
386
+ children: j
355
387
  })
356
388
  ]
357
389
  })
358
390
  });
359
391
  }
360
- function A({ tooltip: e, "aria-label": t, ...n }) {
392
+ function I({ tooltip: e, "aria-label": t, ...n }) {
361
393
  let r = t ?? (typeof e == "string" ? e : void 0);
362
- return e ? /* @__PURE__ */ v(a, {
394
+ return e ? /* @__PURE__ */ x(o, {
363
395
  content: e,
364
- children: /* @__PURE__ */ v(k, {
396
+ children: /* @__PURE__ */ x(F, {
365
397
  "aria-label": r,
366
398
  ...n
367
399
  })
368
- }) : /* @__PURE__ */ v(k, {
400
+ }) : /* @__PURE__ */ x(F, {
369
401
  "aria-label": r,
370
402
  ...n
371
403
  });
372
404
  }
373
405
  //#endregion
374
- export { w as n, b as r, A as t };
406
+ export { D as n, C as r, I as t };
@@ -8,16 +8,33 @@ type Div = ComponentProps<'div'>;
8
8
  * the tag of the title (a button's children are presentational: a heading only
9
9
  * where the card is plain).
10
10
  */
11
- export declare function actionCardSemantics({ active, disabled, hasIcon, role, tabIndex, onClick, onKeyDown, onKeyUp, }: {
11
+ export declare function actionCardSemantics({ hasAction, active, disabled, hasIcon, role, ariaChecked, tabIndex, onClick, onKeyDown, onKeyUp, }: {
12
+ /** The card has an `action`: the title becomes its one button and the root stays plain. */
13
+ hasAction?: boolean;
12
14
  active: boolean | undefined;
13
15
  disabled: boolean;
14
16
  hasIcon: boolean;
17
+ /** The caller's `aria-checked`: it follows a `role` other than `button` onto the title button. */
18
+ ariaChecked?: Div['aria-checked'];
15
19
  } & Pick<Div, 'role' | 'tabIndex' | 'onClick' | 'onKeyDown' | 'onKeyUp'>): {
16
- Title: "span" | "h3";
20
+ Title: "span";
21
+ button: Pick<ComponentProps<"button">, "role" | "aria-checked" | "aria-pressed" | "disabled" | "onClick" | "onKeyDown" | "onKeyUp">;
22
+ attributes: {
23
+ 'data-slot': string;
24
+ 'data-icon': string | undefined;
25
+ 'data-has-action': string;
26
+ 'data-disabled': string | undefined;
27
+ 'data-active': string | undefined;
28
+ 'data-interactive': string;
29
+ };
30
+ } | {
31
+ Title: "h3" | "span";
32
+ button: undefined;
17
33
  attributes: {
18
34
  onClick: (event: import('react').MouseEvent<HTMLDivElement>) => void;
19
35
  onKeyDown: (event: import('react').KeyboardEvent<HTMLDivElement>) => void;
20
36
  onKeyUp: (event: import('react').KeyboardEvent<HTMLDivElement>) => void;
37
+ 'data-has-action': string | undefined;
21
38
  'data-slot': string;
22
39
  'data-icon': string | undefined;
23
40
  role: import('react').AriaRole | undefined;
@@ -29,4 +46,10 @@ export declare function actionCardSemantics({ active, disabled, hasIcon, role, t
29
46
  'data-interactive': string | undefined;
30
47
  };
31
48
  };
49
+ /**
50
+ * The props that stay on the root: with a title button it owns the role, the
51
+ * state and the name, so the caller's `aria-checked` and `aria-label` are not
52
+ * applied to the plain `div`.
53
+ */
54
+ export declare function actionCardRootProps<P extends Div>(props: P, hasButton: boolean): P;
32
55
  export {};
@@ -2,9 +2,25 @@ import { ComponentProps, ReactNode } from 'react';
2
2
  export type ActionCardProps = {
3
3
  active?: boolean;
4
4
  icon?: ReactNode;
5
- variant?: 'sm' | 'md';
5
+ /** `tile` is a compact grid cell: no minimum width, no indicator unless `withIndicator`. */
6
+ variant?: 'sm' | 'md' | 'tile';
6
7
  title?: ReactNode;
7
8
  description?: ReactNode;
9
+ /** A line under the title: a string or number becomes a soft `Badge`, a node is shown as given (pass a toned `Badge`). */
10
+ status?: ReactNode;
11
+ /** A secondary line, one line with an ellipsis; a tooltip shows it whole only while it is clipped. */
12
+ meta?: ReactNode;
13
+ /**
14
+ * A trailing control (a `RowMenu`, an `IconButton`) in its own area, outside
15
+ * the card's press surface. With it, a card that chooses or reacts is a
16
+ * plain `div` whose title is the one button, named after the title, the
17
+ * status and the meta and described by the `description`; the action is its
18
+ * second tab stop. `title` is required then. A `role` (`switch`, `checkbox`,
19
+ * `radio`) and its `aria-checked` move to the button; `aria-label` is not
20
+ * applied. The card's `disabled` does not reach the action: disable its
21
+ * control too. Without it, nothing changes.
22
+ */
23
+ action?: ReactNode;
8
24
  withIndicator?: boolean;
9
25
  /**
10
26
  * Out of reach: `aria-disabled`, off the Tab order, no click and no key.
@@ -12,4 +28,4 @@ export type ActionCardProps = {
12
28
  */
13
29
  disabled?: boolean;
14
30
  } & Omit<ComponentProps<'div'>, 'title'>;
15
- export declare function ActionCard({ icon, active, className, title, description, variant, tabIndex, withIndicator, disabled, role, onClick, onKeyDown, onKeyUp, ...props }: ActionCardProps): import("react").JSX.Element;
31
+ export declare function ActionCard({ icon, active, className, title, description, status, meta, action, variant, tabIndex, withIndicator, disabled, role, onClick, onKeyDown, onKeyUp, ...props }: ActionCardProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** The card's leading icon in a circle that morphs to a filled cookie when chosen. */
3
+ export declare function ActionCardIcon({ active, children, }: {
4
+ active: boolean | undefined;
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The card's secondary line: one line with an ellipsis, the full text always
4
+ * in the DOM. Its tooltip shows the whole text only while the line is clipped
5
+ * and the card's pressable element is `revealed` (hovered or focused), and it
6
+ * takes no tab stop of its own. The pointer crossing the line or leaving the
7
+ * tooltip changes nothing (the card owns hover and focus): only Escape
8
+ * dismisses it.
9
+ */
10
+ export declare function ActionCardMeta({ id, revealed, onDismiss, children, }: {
11
+ id: string;
12
+ revealed: boolean;
13
+ onDismiss: () => void;
14
+ children: ReactNode;
15
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** The line under the title: text becomes a soft badge, a node is shown as given. */
3
+ export declare function ActionCardStatus({ id, children, }: {
4
+ id: string;
5
+ children: ReactNode;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { ComponentProps, ElementType, ReactNode } from 'react';
2
+ import { useActionCardNames } from '../use-action-card-names.js';
3
+ import { useReveal } from '../use-reveal.js';
4
+ import { ActionCardTitleButton } from './action-card-title-button.js';
5
+ /**
6
+ * The card's text block: the title (the card's one button when it has an
7
+ * `action`, else a heading or a span), the description, the status and the
8
+ * meta line. With an `action` the button is always there, named after the
9
+ * status and the meta when there is no title.
10
+ */
11
+ export declare function ActionCardText({ title, description, status, meta, Title, button, names, reveal, }: {
12
+ title: ReactNode;
13
+ description: ReactNode;
14
+ status: ReactNode;
15
+ meta: ReactNode;
16
+ Title: ElementType;
17
+ button: Omit<ComponentProps<typeof ActionCardTitleButton>, 'id' | 'labelledBy' | 'describedBy' | 'children'> | undefined;
18
+ names: ReturnType<typeof useActionCardNames>;
19
+ reveal: ReturnType<typeof useReveal>;
20
+ }): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ /**
3
+ * The title of a card that has an `action`: the card's one button. Its
4
+ * `::after` is stretched over the card (action-card-tile.css), so the whole
5
+ * card presses it, and the action sits above it as a sibling, never inside.
6
+ * Named after the title, the status and the meta line together, and described
7
+ * by the card's description.
8
+ */
9
+ export declare function ActionCardTitleButton({ id, labelledBy, describedBy, children, ...props }: {
10
+ id: string;
11
+ labelledBy: string | undefined;
12
+ describedBy: string | undefined;
13
+ children?: ReactNode;
14
+ } & Omit<ComponentProps<'button'>, 'children' | 'id'>): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ /** The card's trailing parts: its `action` in its own area, then the indicator. */
3
+ export declare function ActionCardTrail({ action, withIndicator, }: {
4
+ action: ReactNode;
5
+ withIndicator: boolean;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The ids a card's parts carry, and what the button of a card with an
3
+ * `action` is named and described after: the title, then the status, then the
4
+ * meta line for its name (only those the card shows; undefined when none is,
5
+ * as an empty string would give the button no name at all), and the
6
+ * description for its description.
7
+ */
8
+ export declare function useActionCardNames(has: {
9
+ title: boolean;
10
+ description: boolean;
11
+ status: boolean;
12
+ meta: boolean;
13
+ }): {
14
+ ids: {
15
+ title: string;
16
+ description: string;
17
+ status: string;
18
+ meta: string;
19
+ };
20
+ labelledBy: string | undefined;
21
+ describedBy: string | undefined;
22
+ };
@@ -0,0 +1,23 @@
1
+ import { FocusEvent, PointerEvent } from 'react';
2
+ type Own = {
3
+ onPointerEnter?: (event: PointerEvent<never>) => void;
4
+ onPointerLeave?: (event: PointerEvent<never>) => void;
5
+ onFocus?: (event: FocusEvent<never>) => void;
6
+ onBlur?: (event: FocusEvent<never>) => void;
7
+ };
8
+ /**
9
+ * Whether a card's meta line is revealed: its pressable element is hovered by
10
+ * a mouse or a pen (a tap leaves no hover) or has focus. `bind(own)` returns
11
+ * the four handlers, calling the caller's own first. `dismiss` clears both.
12
+ */
13
+ export declare function useReveal(): {
14
+ revealed: boolean;
15
+ dismiss: () => void;
16
+ bind: (own?: Own) => {
17
+ onPointerEnter: (event: PointerEvent<never>) => void;
18
+ onPointerLeave: (event: PointerEvent<never>) => void;
19
+ onFocus: (event: FocusEvent<never>) => void;
20
+ onBlur: (event: FocusEvent<never>) => void;
21
+ };
22
+ };
23
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  declare const buttonVariantsByColor: (props?: ({
3
- variant?: "tonal" | "filled" | "link" | "ghost" | "outlined" | null | undefined;
3
+ variant?: "link" | "tonal" | "filled" | "ghost" | "outlined" | null | undefined;
4
4
  color?: "primary" | "secondary" | "success" | "info" | "warning" | "error" | "default" | null | undefined;
5
5
  size?: "lg" | "sm" | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "xs" | "xl" | "2xl" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,22 @@
1
+ import { ComponentProps } from 'react';
2
+ type Props = ComponentProps<'button'>;
3
+ /**
4
+ * What `loading` adds to an `IconButton`'s host, as `Button`'s: `aria-busy`
5
+ * and `aria-disabled` (which win over the caller's while busy, and stand when
6
+ * idle), every click blocked, and the classes that hide the icon and anchor the
7
+ * spinner. Spread it after the caller's props.
8
+ */
9
+ export declare function useBusyProps(loading: boolean, props: Props): {
10
+ busyClassName: string | undefined;
11
+ hostProps: {
12
+ 'aria-disabled': (boolean | "false" | "true") | undefined;
13
+ 'aria-busy': (boolean | "false" | "true") | undefined;
14
+ onClickCapture: (event: import('react').MouseEvent<HTMLButtonElement>) => void;
15
+ };
16
+ };
17
+ /** The busy spinner, over the icon's place; the icon keeps its room, hidden. */
18
+ export declare function IconButtonSpinner({ variant, color, }: {
19
+ variant: string;
20
+ color: string | null | undefined;
21
+ }): import("react").JSX.Element;
22
+ export {};
@@ -22,3 +22,5 @@ export declare function IconButtonShape({ shape, variant, color, }: {
22
22
  variant: IconButtonVariant;
23
23
  color: IconButtonColor;
24
24
  }): import("react").JSX.Element;
25
+ /** A `width` other than the default is ignored with a `shape`: a warning in development. */
26
+ export declare function useIgnoredWidthWarning(shape: ShapeName | undefined, width: string | null | undefined): void;