@nxgt/material 3.49.0 → 3.51.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 +34 -0
- package/README.md +1 -1
- package/dist/{async-slice-DlvKCKAa.js → async-slice-BGtmF3K5.js} +2 -2
- package/dist/{button-DJgaQbBD.js → button-BWcr2b49.js} +45 -76
- package/dist/charts.js +3 -3
- package/dist/{chip-DN44R1vW.js → chip-CmLW6ZrT.js} +3 -3
- package/dist/{code-editor-BJ9ewxSC.js → code-editor-BKMaeIF6.js} +6 -6
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-BJE3VuQg.js → code-language-items-Cs1Pwd1h.js} +2 -2
- package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +14 -9
- package/dist/components/ui/layout/auth-card/auth-card-backdrop.css +2 -2
- package/dist/{components-AtBccCir.js → components-CuwU9Sux.js} +11878 -11614
- package/dist/components.js +26 -27
- package/dist/{dialog-ODql4vH7.js → dialog-TdT_5iUc.js} +7 -7
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-DRXYP9ta.js → dropdown-menu-BozV6Ikw.js} +25 -26
- package/dist/editor.js +9 -9
- package/dist/{empty-state-C9QqvBU1.js → empty-state-gzBPimAo.js} +2 -2
- package/dist/{escape-owner-DCrlERLM.js → escape-owner-Bu-aDEEO.js} +1 -1
- package/dist/{field-blur-DYGyIdfD.js → field-blur-47zmuDkH.js} +1 -1
- package/dist/{field-blur-context-B-fSpl1H.js → field-blur-context-6McYOnM8.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-EO_CckIx.js → hover-card-zHdZJpBG.js} +14 -14
- package/dist/{i18n-provider-C0fB0sEL.js → i18n-provider-Ang2f31m.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-BQYj_LE6.js → icon-badge-CRFGIQPX.js} +3 -3
- package/dist/{icon-button-B481L2TP.js → icon-button-CtG3Snfm.js} +119 -87
- package/dist/lib/components/ui/actions/icon-button/icon-button-busy.d.ts +22 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +2 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +7 -0
- package/dist/lib/components/ui/collections/data-table/data-table-selection-host.d.ts +7 -0
- package/dist/lib/components/ui/collections/data-table/internal.d.ts +1 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +2 -1
- package/dist/lib/components/ui/collections/filter/bar/partials/filter-quick-toggle.d.ts +3 -2
- package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +7 -1
- package/dist/lib/components/ui/collections/page-footer/page-footer.d.ts +6 -1
- package/dist/lib/components/ui/collections/row-menu/row-menu-trigger.d.ts +5 -2
- package/dist/lib/components/ui/collections/server-table/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/server-table/partials/filtered-server-table.d.ts +8 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band.d.ts +10 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +3 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-more.d.ts +4 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk.d.ts +2 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-controls.d.ts +16 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-chips.d.ts +5 -3
- package/dist/lib/components/ui/collections/server-table/partials/server-table-grid.d.ts +3 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-selection-bar.d.ts +17 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-view.d.ts +15 -0
- package/dist/lib/components/ui/collections/server-table/partials/use-server-table-phone-row.d.ts +14 -0
- package/dist/lib/components/ui/collections/server-table/partials/use-server-table-selection-slots.d.ts +24 -0
- package/dist/lib/components/ui/collections/server-table/types-paging.d.ts +17 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -10
- package/dist/lib/components/ui/collections/server-table/use-selection-band.d.ts +14 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-body.d.ts +5 -3
- package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-request-error.d.ts +15 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/step-up-dialog.d.ts +6 -3
- package/dist/lib/components/ui/feedback/step-up-dialog/types.d.ts +12 -1
- package/dist/lib/components/ui/feedback/step-up-dialog/use-retry-focus.d.ts +27 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/use-retry.d.ts +11 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/verification-code/use-settled-focus.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +12 -1
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +6 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +6 -2
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +43 -44
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-CZBz4JVu.js → public-CTZ5RK_Y.js} +20 -20
- package/dist/{rich-code-block-597e0_Qm.js → rich-code-block-oTgL-s4W.js} +5 -5
- package/dist/{sortable-provider-CK_xAk2H.js → sortable-provider-CpA5NYgD.js} +2 -2
- package/dist/{dist-B61_o9Mg.js → spinner-UvqlDsV8.js} +478 -256
- package/dist/{stored-language-IaL1Ftn_.js → stored-language-Cb9FMEwk.js} +12 -4
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-Dnjn83TJ.js → theme-toggle-BZVz6O5q.js} +1 -1
- package/dist/{toolbar-items-CCwIu7fE.js → toolbar-items-C09bJphe.js} +106 -106
- package/dist/{translate-material-v9u-e7Kd.js → translate-material-D6KCK21i.js} +2 -2
- package/dist/{translator-Dk4_qE6U.js → translator-BnQXtpSZ.js} +1 -1
- package/dist/{use-chat-composer-Ot5XUbdn.js → use-chat-composer-AZAj4tFJ.js} +4881 -4882
- package/dist/{button-tones-BwuVvAmd.js → use-click-lock-BZYtTmVt.js} +37 -7
- package/dist/{use-heading-spy-DjKixjLm.js → use-heading-spy-C9-A2md2.js} +1 -1
- package/dist/{use-material-translation-DOkTaWK_.js → use-material-translation-pLgSqqLw.js} +2 -2
- package/docs/components/buttons-and-actions.md +2 -1
- package/docs/components/data-table-filter-and-lists.md +67 -14
- package/docs/components/feedback-and-status.md +22 -3
- package/docs/components/form-fields.md +7 -0
- package/docs/guides/backgrounds.md +3 -1
- package/docs/guides/cards-and-tiles.md +3 -0
- package/docs/guides/server-lists-url.md +3 -2
- package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +14 -9
- package/lib/components/ui/layout/auth-card/auth-card-backdrop.css +2 -2
- package/package.json +1 -1
- package/dist/spinner-BhuZuHK1.js +0 -229
package/dist/i18n.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./is-production-GLw59WU8.js";
|
|
2
|
-
import { a as t, i as n, n as r, r as i } from "./stored-language-
|
|
3
|
-
import { n as a, r as o, t as s } from "./i18n-provider-
|
|
4
|
-
import { i as c, n as l, o as u, r as d, t as f } from "./translator-
|
|
2
|
+
import { a as t, i as n, n as r, r as i } from "./stored-language-Cb9FMEwk.js";
|
|
3
|
+
import { n as a, r as o, t as s } from "./i18n-provider-Ang2f31m.js";
|
|
4
|
+
import { i as c, n as l, o as u, r as d, t as f } from "./translator-BnQXtpSZ.js";
|
|
5
5
|
import { o as p, t as m } from "./merge-BCZE6HGq.js";
|
|
6
|
-
import { t as h } from "./translate-material-
|
|
7
|
-
import { t as g } from "./use-material-translation-
|
|
6
|
+
import { t as h } from "./translate-material-D6KCK21i.js";
|
|
7
|
+
import { t as g } from "./use-material-translation-pLgSqqLw.js";
|
|
8
8
|
import { useCallback as _ } from "react";
|
|
9
9
|
//#region lib/i18n/merge-resources.ts
|
|
10
10
|
function v(e, t, n = "") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./utils-BLfntITJ.js";
|
|
2
|
-
import { f as t } from "./dialog-
|
|
3
|
-
import { a as n, i as r, n as i } from "./field-blur-context-
|
|
4
|
-
import { t as a } from "./icon-button-
|
|
2
|
+
import { f as t } from "./dialog-TdT_5iUc.js";
|
|
3
|
+
import { a as n, i as r, n as i } from "./field-blur-context-6McYOnM8.js";
|
|
4
|
+
import { t as a } from "./icon-button-CtG3Snfm.js";
|
|
5
5
|
import { isValidElement as o, useId as s } from "react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
7
|
import { describedBy as u } from "@nxgt/material-core/described-by";
|
|
@@ -2,20 +2,20 @@ import { t as e } from "./utils-BLfntITJ.js";
|
|
|
2
2
|
import { t } from "./is-production-GLw59WU8.js";
|
|
3
3
|
import { n } from "./use-shape-morph-BKA_R5P5.js";
|
|
4
4
|
import { n as r, t as i } from "./dist-DVRQkaTK.js";
|
|
5
|
-
import { n as a,
|
|
6
|
-
import { a as
|
|
7
|
-
import { t as
|
|
8
|
-
import { shapeOutline as
|
|
9
|
-
import { useContext as
|
|
10
|
-
import { jsx as
|
|
5
|
+
import { n as a, r as o, t as s } from "./spinner-UvqlDsV8.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
|
|
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
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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: `${
|
|
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
|
-
],
|
|
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: [...
|
|
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
|
|
237
|
-
return (t) =>
|
|
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
|
|
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
|
|
292
|
-
let a =
|
|
293
|
-
return n(o, a, !0), /* @__PURE__ */
|
|
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__ */
|
|
322
|
+
children: /* @__PURE__ */ x("path", {
|
|
300
323
|
ref: o,
|
|
301
|
-
d:
|
|
324
|
+
d: _(a),
|
|
302
325
|
vectorEffect: "non-scaling-stroke",
|
|
303
326
|
paintOrder: "stroke",
|
|
304
|
-
className: e("stroke-transparent stroke-1 transition-[fill]",
|
|
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
|
|
311
|
-
return e === void 0 || !Number.isFinite(e) || e < .5 ? null :
|
|
339
|
+
function P(e) {
|
|
340
|
+
return e === void 0 || !Number.isFinite(e) || e < .5 ? null : C(e);
|
|
312
341
|
}
|
|
313
|
-
function
|
|
314
|
-
let
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
-
"data-variant":
|
|
325
|
-
"data-color":
|
|
326
|
-
type:
|
|
327
|
-
"data-size":
|
|
328
|
-
"data-shape":
|
|
329
|
-
"data-morph":
|
|
330
|
-
"data-selected":
|
|
331
|
-
className: e(
|
|
332
|
-
variant:
|
|
333
|
-
color:
|
|
334
|
-
size:
|
|
335
|
-
}) :
|
|
336
|
-
variant:
|
|
337
|
-
color:
|
|
338
|
-
size:
|
|
339
|
-
width:
|
|
340
|
-
}),
|
|
341
|
-
...
|
|
351
|
+
"data-variant": t ?? "filled",
|
|
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({
|
|
359
|
+
variant: t,
|
|
360
|
+
color: n,
|
|
361
|
+
size: w
|
|
362
|
+
}) : D({
|
|
363
|
+
variant: t,
|
|
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
|
-
|
|
344
|
-
shape:
|
|
345
|
-
variant:
|
|
346
|
-
color:
|
|
371
|
+
u ? /* @__PURE__ */ x(M, {
|
|
372
|
+
shape: u,
|
|
373
|
+
variant: t ?? "filled",
|
|
374
|
+
color: n ?? (t === "ghost" ? "default" : "primary")
|
|
347
375
|
}) : null,
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
-
|
|
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":
|
|
384
|
+
"data-tone": m,
|
|
353
385
|
className: "nxgt-icon-button-badge",
|
|
354
|
-
children:
|
|
386
|
+
children: j
|
|
355
387
|
})
|
|
356
388
|
]
|
|
357
389
|
})
|
|
358
390
|
});
|
|
359
391
|
}
|
|
360
|
-
function
|
|
392
|
+
function I({ tooltip: e, "aria-label": t, ...n }) {
|
|
361
393
|
let r = t ?? (typeof e == "string" ? e : void 0);
|
|
362
|
-
return e ? /* @__PURE__ */
|
|
394
|
+
return e ? /* @__PURE__ */ x(o, {
|
|
363
395
|
content: e,
|
|
364
|
-
children: /* @__PURE__ */
|
|
396
|
+
children: /* @__PURE__ */ x(F, {
|
|
365
397
|
"aria-label": r,
|
|
366
398
|
...n
|
|
367
399
|
})
|
|
368
|
-
}) : /* @__PURE__ */
|
|
400
|
+
}) : /* @__PURE__ */ x(F, {
|
|
369
401
|
"aria-label": r,
|
|
370
402
|
...n
|
|
371
403
|
});
|
|
372
404
|
}
|
|
373
405
|
//#endregion
|
|
374
|
-
export {
|
|
406
|
+
export { D as n, C as r, I as t };
|
|
@@ -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;
|
|
@@ -51,6 +51,13 @@ export type IconButtonProps = {
|
|
|
51
51
|
* alert), `error` (a notification) or `neutral` (the page's text colour).
|
|
52
52
|
*/
|
|
53
53
|
badgeTone?: 'primary' | 'error' | 'neutral';
|
|
54
|
+
/**
|
|
55
|
+
* Busy, as `Button`'s `loading`: `aria-busy` and `aria-disabled`, a
|
|
56
|
+
* spinner in place of the icon (the button keeps its size) and every
|
|
57
|
+
* click blocked. It stays focusable (no native `disabled`), so the
|
|
58
|
+
* focus is not lost while the work runs.
|
|
59
|
+
*/
|
|
60
|
+
loading?: boolean;
|
|
54
61
|
};
|
|
55
62
|
export declare function IconButton({ tooltip, 'aria-label': ariaLabel, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
56
63
|
export { variants as iconButtonVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set by a host that shows the selection itself, in a bar of its own
|
|
3
|
+
* (`ServerTable`'s selection band, #1718): the count and "Clear selection"
|
|
4
|
+
* of the cards' and tiles' list bar are then left out, so the selection is
|
|
5
|
+
* told once. Not exported from the package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DataTableSelectionHostContext: import('react').Context<boolean>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type DataTableListSlots, DataTableListSlotsContext, } from './data-table-list-slots.js';
|
|
2
|
+
export { DataTableSelectionHostContext } from './data-table-selection-host.js';
|
|
2
3
|
export { DataTableLink } from './partials/data-table-link.js';
|
|
3
4
|
export { DataTablePager } from './partials/data-table-pager.js';
|
package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export declare const hasListBar: <TData extends RowData>(table: DataTableTable<T
|
|
|
8
8
|
/**
|
|
9
9
|
* The list's header row, where a table's header row would be (the cards'
|
|
10
10
|
* `showHeader`): "Select all on this page" and, beside it, "N rows selected"
|
|
11
|
-
* while rows are selected
|
|
11
|
+
* while rows are selected (a host with its own selection bar, `ServerTable`'s
|
|
12
|
+
* band, leaves the count and "Clear selection" to it). With nothing selected there is no count: "20 rows"
|
|
12
13
|
* beside the checkbox would read as its label, and the range is the footer's
|
|
13
14
|
* (#1706). The selection is told politely by the footer's status. At the end, "Clear
|
|
14
15
|
* selection" (only while rows are selected; an icon on a narrow list, still
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FilterModelField } from '@nxgt/material-core/filter';
|
|
2
2
|
/**
|
|
3
3
|
* A switch or checkbox as a quick filter: a toggle button (`aria-pressed`),
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* the Chip's toggle look: its label alone while off (no plus, not dashed, so
|
|
5
|
+
* it never reads as the "+ Field" pill that opens an editor), selected with
|
|
6
|
+
* the Chip's own check mark once on ("Yes"); pressed again, its condition goes.
|
|
6
7
|
* A "No" condition leaves it off, shown as a chip; pressing it then sets
|
|
7
8
|
* "Yes". The focus stays on it.
|
|
8
9
|
* A field on by default shows pressed with no condition, marked "Default"
|
|
@@ -18,7 +18,13 @@ export declare const FILTER_SHEET_COUNT_CLASS = "rounded-full bg-primary/10 px-1
|
|
|
18
18
|
/** The sheet: its header (the title, then Close), the scrolling sections, the footer. */
|
|
19
19
|
export declare const FILTER_SHEET_CLASS = "motion-reduce:transition-none";
|
|
20
20
|
export declare const FILTER_SHEET_HEADER_CLASS = "flex-row items-center justify-between gap-2 border-b py-2 pr-2 text-left";
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* In the header's flow, not at the corner. `relative`, never `static`: the
|
|
23
|
+
* button's invisible 44px hit area (`::after`, absolute) is placed against
|
|
24
|
+
* the nearest positioned ancestor, which for a static button is the whole
|
|
25
|
+
* sheet, so it covered the sections and swallowed a tap on their headers (#1733).
|
|
26
|
+
*/
|
|
27
|
+
export declare const FILTER_SHEET_CLOSE_CLASS = "relative top-auto right-auto size-11";
|
|
22
28
|
export declare const FILTER_SHEET_LOCKED_CLASS = "flex flex-wrap items-center gap-2 border-b px-4 py-3";
|
|
23
29
|
/**
|
|
24
30
|
* The sections, each a FacetGroup. Every row is a 44px target (WCAG 2.5.5):
|
|
@@ -27,6 +27,11 @@ export type PageFooterProps = {
|
|
|
27
27
|
live?: boolean;
|
|
28
28
|
/** Makes Previous and Next inert (a feed that is loading). */
|
|
29
29
|
disabled?: boolean;
|
|
30
|
+
/** Renders nothing when there is a single page: no previous page and no
|
|
31
|
+
* next page. Default `false` (the footer shows its range, "1–5 of 5").
|
|
32
|
+
* The range is then not on screen: say the count elsewhere (a status
|
|
33
|
+
* line, a heading) or keep the footer. */
|
|
34
|
+
hideOnSinglePage?: boolean;
|
|
30
35
|
/** Your router's link; it must forward `className` and `ref`. */
|
|
31
36
|
linkComponent?: DataTableLinkComponent;
|
|
32
37
|
} & Omit<ComponentProps<'div'>, 'children'>;
|
|
@@ -37,4 +42,4 @@ export type PageFooterProps = {
|
|
|
37
42
|
* `ServerTable` draws. Renders nothing for an empty result. Without a
|
|
38
43
|
* `totalCount` (a cursor feed with no total) it is the Previous / Next alone.
|
|
39
44
|
*/
|
|
40
|
-
export declare function PageFooter({ pageInfo, totalCount, params, pageSize, count, pageHref, pagingNames, pageControls, live, disabled, linkComponent, className, ...props }: PageFooterProps): import("react").JSX.Element | null;
|
|
45
|
+
export declare function PageFooter({ pageInfo, totalCount, params, pageSize, count, pageHref, pagingNames, pageControls, live, disabled, hideOnSinglePage, linkComponent, className, ...props }: PageFooterProps): import("react").JSX.Element | null;
|
|
@@ -11,6 +11,9 @@ export type RowMenuTriggerProps = Omit<IconButtonProps, 'children' | 'tooltip' |
|
|
|
11
11
|
* The "..." button of a row: a ghost `IconButton` with an ellipsis, named
|
|
12
12
|
* after its row. It is 44px on a coarse pointer (and below `md`), 36px with a
|
|
13
13
|
* fine pointer from `md` up. It forwards its props and its `ref`, so it works
|
|
14
|
-
* as the child of a `DropdownMenuTrigger asChild`.
|
|
14
|
+
* as the child of a `DropdownMenuTrigger asChild`. `loading` (as `Button`'s)
|
|
15
|
+
* marks it busy while an action chosen from its menu runs: `aria-busy`, a
|
|
16
|
+
* spinner in place of the dots, the same size, the focus kept, and the menu
|
|
17
|
+
* does not reopen until it is over.
|
|
15
18
|
*/
|
|
16
|
-
export declare function RowMenuTrigger({ label, className, 'aria-label': ariaLabel, ...props }: RowMenuTriggerProps): import("react").JSX.Element;
|
|
19
|
+
export declare function RowMenuTrigger({ label, loading, onPointerDown, onKeyDown, className, 'aria-label': ariaLabel, ...props }: RowMenuTriggerProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { defineFilterModel, type FilterCodecOptions, type FilterCondition, type FilterLockedCondition, type FilterModel, type FilterQuery, parseFilterQuery, serializeFilterQuery, } from '@nxgt/material-core/filter';
|
|
1
|
+
export { defineFilterModel, effectiveConditions, type FilterCodecOptions, type FilterCondition, type FilterFieldError, type FilterFieldErrors, type FilterLockedCondition, type FilterModel, type FilterQuery, type FilterSplitErrors, parseFilterQuery, serializeFilterQuery, splitFilterErrors, } from '@nxgt/material-core/filter';
|
|
2
2
|
export { type CursorConnection, createSorting, FIRST_PAGE, firstPage, isFiltered, isNewQuery, nextPage, type PageCursor, type PagingNames, pagingNames, paramsFromQuery, previousPage, queryFromParams, queryKey, type RouterQuery, readCursor, type ServerPagination, type ServerPaginationOptions, type SortingOptions, serverPagination, type TableFilterBinding, type TableFilterOptions, type TableSort, type TableSorting, tableFilters, withoutFilters, } from '@nxgt/material-core/table-url';
|
|
3
3
|
export * from './server-table.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RowData } from '@tanstack/react-table';
|
|
2
|
+
import { ServerTableFilter, ServerTableProps } from '../types.js';
|
|
3
|
+
import { TableAnswer } from '../use-table-answer.js';
|
|
4
|
+
export declare function FilteredServerTable<T extends RowData>({ props, filter, answer, }: {
|
|
5
|
+
props: ServerTableProps<T>;
|
|
6
|
+
filter: ServerTableFilter;
|
|
7
|
+
answer: TableAnswer;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -9,6 +9,15 @@ type BandProps = {
|
|
|
9
9
|
search?: ReactNode;
|
|
10
10
|
/** `'compact'`: half the room under the band (the surface's top is in the root). */
|
|
11
11
|
density?: 'comfortable' | 'compact';
|
|
12
|
+
/** `bulkActions` with the Filter's bar: the band's controls (the search and
|
|
13
|
+
* the page's actions) give their place to `bar` while rows are selected
|
|
14
|
+
* (#1718). They stay mounted and keep their size, hidden, so nothing
|
|
15
|
+
* moves; `bar` is `null` while nothing is selected. */
|
|
16
|
+
selection?: {
|
|
17
|
+
bar: ReactNode;
|
|
18
|
+
/** `bandActions: 'inline'`: the search keeps a phone's row with a lone icon action. */
|
|
19
|
+
inline: boolean;
|
|
20
|
+
};
|
|
12
21
|
/** Below 768px with a list in cards or tiles: the band's second row (the
|
|
13
22
|
* `actions` go into it, after the list's sort and "Filters (N)"). */
|
|
14
23
|
phoneRow?: {
|
|
@@ -20,7 +29,7 @@ type BandProps = {
|
|
|
20
29
|
};
|
|
21
30
|
};
|
|
22
31
|
/** The top band: the title, then the search landmark, then the page's actions. A string title is an `<h2>`. */
|
|
23
|
-
export declare function ServerTableBand({ title, description, actions, search, density, phoneRow, }: BandProps): import("react").JSX.Element | null;
|
|
32
|
+
export declare function ServerTableBand({ title, description, actions, search, density, phoneRow, selection, }: BandProps): import("react").JSX.Element | null;
|
|
24
33
|
/**
|
|
25
34
|
* One `search` landmark: the bar (the search, the quick filters, "Add
|
|
26
35
|
* filter", and "Filters (N)" on a phone), then from 768px the active filters
|
package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare function ServerTableBulkButtons<T extends RowData>({ actions, ids
|
|
|
25
25
|
root?: () => ParentNode | null;
|
|
26
26
|
/** The phone's selection bar: the first three actions keep their icon,
|
|
27
27
|
* label and count (and wrap onto a second line when they do not fit); the
|
|
28
|
-
* others go into a "More" menu, each with its count.
|
|
29
|
-
|
|
28
|
+
* others go into a "More" menu, each with its count. A number is how
|
|
29
|
+
* many keep their button (the selection band's one row on a phone). */
|
|
30
|
+
phone?: boolean | number;
|
|
30
31
|
}): import("react").JSX.Element;
|
package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-more.d.ts
CHANGED
|
@@ -13,12 +13,14 @@ export type BulkMoreEntry<T> = {
|
|
|
13
13
|
/** Set past the action's `max`: the item is disabled and shows it. */
|
|
14
14
|
notice: ReactNode | null;
|
|
15
15
|
};
|
|
16
|
-
/** The phone bar's "More" menu: one item per action past the
|
|
16
|
+
/** The phone bar's "More" menu: one item per action past the limit, each
|
|
17
17
|
* with its count. Past its `max` an item is disabled and its notice is its
|
|
18
18
|
* description (`aria-describedby`), under the label. */
|
|
19
|
-
export declare function BulkMoreMenu<T>({ entries, selection, focus, moreLabel, }: {
|
|
19
|
+
export declare function BulkMoreMenu<T>({ entries, selection, focus, moreLabel, compact, }: {
|
|
20
20
|
entries: BulkMoreEntry<T>[];
|
|
21
21
|
selection: ServerTableSelection;
|
|
22
22
|
focus: ReturnType<typeof useBulkFocus>;
|
|
23
23
|
moreLabel: string;
|
|
24
|
+
/** The selection band's one phone row: the trigger is an ellipsis icon, still named. */
|
|
25
|
+
compact?: boolean;
|
|
24
26
|
}): import("react").JSX.Element;
|