@slotted/react 0.1.0-beta.19 → 0.1.0-beta.20
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/dist/{alert-DPSZUCRn.js → alert-BGox6hzF.js} +45 -44
- package/dist/alert.js +1 -1
- package/dist/button-BxgjXAos.js +118 -0
- package/dist/button.js +3 -3
- package/dist/{cascader-neDJl-we.js → cascader-DO1HiJT6.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/{column-manager-C8fN_mDy.js → column-manager-Dm5ZLz6p.js} +1 -1
- package/dist/column-manager.js +1 -1
- package/dist/{dashboard-grid-z3nKqvN8.js → dashboard-grid-Bx4J-aC7.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-aHlR2FHu.js → data-grid-Dez5RojO.js} +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-Cu6LtnDX.js → data-list-B18kLC9Q.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/docs/alert.json +13 -2
- package/dist/docs/alert.md +12 -1
- package/dist/docs/button.examples.md +20 -0
- package/dist/docs/button.json +119 -0
- package/dist/docs/button.md +22 -0
- package/dist/docs/chart.examples.md +12 -1
- package/dist/docs/chart.json +3 -3
- package/dist/docs/chart.md +1 -1
- package/dist/{filter-bar-BHzy0o7n.js → filter-bar-CzuAJsSf.js} +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/{icon-button-DbSZKGT4.js → icon-button-DERKFHX1.js} +50 -23
- package/dist/{import-export-center-BX1Bhj8c.js → import-export-center-tbHmRTGb.js} +3 -3
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +112 -112
- package/dist/{markdown-gfrgwq6-.js → markdown-BEQ1uEqm.js} +2 -2
- package/dist/markdown.js +1 -1
- package/dist/{notification-center-CAbkHDlC.js → notification-center-CQqPcJr4.js} +1 -1
- package/dist/notification-center.js +1 -1
- package/dist/{saved-views-CmsTqrCY.js → saved-views-B54F_Bk4.js} +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/{split-button-BhKdDspN.js → split-button-Dg67gBMP.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/alert.css +1 -1
- package/dist/styles/data-grid.css +2 -2
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/filter-bar.css +2 -2
- package/dist/styles/import-export-center.css +2 -2
- package/dist/styles/index.css +3 -3
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/table.css +2 -2
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-BHuKvsgJ.js → table-Cz9YpgLT.js} +1 -1
- package/dist/table.js +1 -1
- package/dist/{tour-6ai_6m2y.js → tour-BYNqu1dL.js} +1 -1
- package/dist/tour.js +1 -1
- package/dist/{transfer-4Vo11sGY.js → transfer-CEHIa2XD.js} +1 -1
- package/dist/transfer.js +1 -1
- package/dist/types/alert/alert.d.ts +1 -1
- package/dist/types/alert/alert.d.ts.map +1 -1
- package/dist/types/alert/alert.types.d.ts +8 -0
- package/dist/types/alert/alert.types.d.ts.map +1 -1
- package/dist/types/alert/index.d.ts +1 -1
- package/dist/types/alert/index.d.ts.map +1 -1
- package/dist/types/button/button-link.d.ts.map +1 -1
- package/dist/types/button/button-root.d.ts +21 -1
- package/dist/types/button/button-root.d.ts.map +1 -1
- package/dist/types/button/button.types.d.ts +19 -0
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/button/icon-button-link.d.ts +9 -0
- package/dist/types/button/icon-button-link.d.ts.map +1 -0
- package/dist/types/button/index.d.ts +2 -1
- package/dist/types/button/index.d.ts.map +1 -1
- package/dist/{wizard-ijqGsc5t.js → wizard-DCS6BaK8.js} +2 -2
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/button-D31perSu.js +0 -100
|
@@ -82,82 +82,83 @@ var D = {
|
|
|
82
82
|
warning: "status-warning",
|
|
83
83
|
danger: "status-danger"
|
|
84
84
|
};
|
|
85
|
-
function O({
|
|
86
|
-
let
|
|
85
|
+
function O({ actionsPlacement: a, children: s, defaultOpen: g = !0, dismissible: v = !1, hideIcon: y = !1, icon: x, live: S, messages: C, onBlur: w, onFocus: T, onOpenChange: E, open: O, reach: k, ref: A, render: j, restoreFocus: M = !0, tone: N, variant: P, ...F }) {
|
|
86
|
+
let I = _(), L = e(h, C), [R, z] = f(g), [B, V] = f(!1), H = `${l()}title`, U = S ?? I.live, W = O ?? R, G = d(null), K = d(!1), q = d(W), J = d(M);
|
|
87
87
|
c(() => {
|
|
88
|
-
|
|
89
|
-
}, [
|
|
90
|
-
let
|
|
91
|
-
if (!
|
|
92
|
-
|
|
93
|
-
let e =
|
|
88
|
+
J.current = M;
|
|
89
|
+
}, [M]);
|
|
90
|
+
let Y = o(() => {
|
|
91
|
+
if (!J.current || !K.current) return;
|
|
92
|
+
K.current = !1;
|
|
93
|
+
let e = G.current;
|
|
94
94
|
e !== null && e.isConnected && e.focus();
|
|
95
95
|
}, []);
|
|
96
96
|
c(() => {
|
|
97
|
-
|
|
98
|
-
}, [
|
|
99
|
-
let
|
|
100
|
-
live:
|
|
101
|
-
registerTitle:
|
|
102
|
-
titleId:
|
|
103
|
-
}), [
|
|
104
|
-
function
|
|
97
|
+
q.current && !W && Y(), q.current = W;
|
|
98
|
+
}, [W, Y]), c(() => () => Y(), [Y]);
|
|
99
|
+
let X = u(() => ({
|
|
100
|
+
live: U,
|
|
101
|
+
registerTitle: V,
|
|
102
|
+
titleId: H
|
|
103
|
+
}), [U, H]);
|
|
104
|
+
function Z(e, t) {
|
|
105
105
|
i({
|
|
106
|
-
controlled:
|
|
107
|
-
initial:
|
|
108
|
-
onRequest: (e) =>
|
|
109
|
-
}).request(!1, e, t) &&
|
|
106
|
+
controlled: O,
|
|
107
|
+
initial: R,
|
|
108
|
+
onRequest: (e) => E?.(e.value, e)
|
|
109
|
+
}).request(!1, e, t) && z(!1);
|
|
110
110
|
}
|
|
111
|
-
let
|
|
112
|
-
...
|
|
113
|
-
...
|
|
114
|
-
...
|
|
111
|
+
let Q = D[N ?? I.tone], $ = r({
|
|
112
|
+
...B ? { "aria-labelledby": H } : {},
|
|
113
|
+
...F,
|
|
114
|
+
...W ? { "data-open": "" } : {},
|
|
115
115
|
children: /* @__PURE__ */ m(b, {
|
|
116
|
-
value:
|
|
116
|
+
value: X,
|
|
117
117
|
children: [
|
|
118
|
-
|
|
118
|
+
y || x == null && Q === null ? null : /* @__PURE__ */ p("span", {
|
|
119
119
|
"aria-hidden": "true",
|
|
120
120
|
"data-part": "icon",
|
|
121
121
|
"data-part-icon": "",
|
|
122
|
-
children:
|
|
123
|
-
name:
|
|
122
|
+
children: x ?? (Q === null ? null : /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(t, {
|
|
123
|
+
name: Q,
|
|
124
124
|
solid: !0
|
|
125
125
|
}) }))
|
|
126
126
|
}),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"aria-label":
|
|
127
|
+
s,
|
|
128
|
+
v ? /* @__PURE__ */ p("button", {
|
|
129
|
+
"aria-label": L("dismiss"),
|
|
130
130
|
"data-part": "dismiss",
|
|
131
131
|
"data-part-dismiss": "",
|
|
132
132
|
onClick: (e) => {
|
|
133
|
-
e.defaultPrevented ||
|
|
133
|
+
e.defaultPrevented || Z("dismiss", e);
|
|
134
134
|
},
|
|
135
135
|
type: "button",
|
|
136
136
|
children: /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(t, { name: "x" }) })
|
|
137
137
|
}) : null
|
|
138
138
|
]
|
|
139
139
|
}),
|
|
140
|
-
"data-
|
|
140
|
+
"data-actions-placement": a ?? ((k ?? I.reach) === "page" ? "end" : "below"),
|
|
141
|
+
"data-live": U,
|
|
141
142
|
"data-part": "root",
|
|
142
|
-
"data-reach":
|
|
143
|
-
"data-tone":
|
|
143
|
+
"data-reach": k ?? I.reach,
|
|
144
|
+
"data-tone": N ?? I.tone,
|
|
144
145
|
"data-ui": "alert",
|
|
145
|
-
"data-variant":
|
|
146
|
-
hidden: !
|
|
146
|
+
"data-variant": P ?? I.variant,
|
|
147
|
+
hidden: !W,
|
|
147
148
|
onBlur: (e) => {
|
|
148
|
-
|
|
149
|
+
w?.(e);
|
|
149
150
|
let t = e.relatedTarget;
|
|
150
|
-
(t === null || !e.currentTarget.contains(t)) && (
|
|
151
|
+
(t === null || !e.currentTarget.contains(t)) && (K.current = !1);
|
|
151
152
|
},
|
|
152
153
|
onFocus: (e) => {
|
|
153
|
-
|
|
154
|
+
T?.(e);
|
|
154
155
|
let t = e.relatedTarget;
|
|
155
|
-
t instanceof HTMLElement && !e.currentTarget.contains(t) && (
|
|
156
|
+
t instanceof HTMLElement && !e.currentTarget.contains(t) && (G.current = t), K.current = !0;
|
|
156
157
|
},
|
|
157
|
-
ref:
|
|
158
|
-
tabIndex:
|
|
158
|
+
ref: A,
|
|
159
|
+
tabIndex: F.tabIndex ?? -1
|
|
159
160
|
});
|
|
160
|
-
return
|
|
161
|
+
return j === void 0 ? /* @__PURE__ */ p("section", { ...$ }) : j($);
|
|
161
162
|
}
|
|
162
163
|
//#endregion
|
|
163
164
|
export { w as a, T as i, E as n, v as o, C as r, _ as s, O as t };
|
package/dist/alert.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./alert-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./alert-BGox6hzF.js";
|
|
2
2
|
export { o as Alert, n as AlertActions, i as AlertContent, r as AlertDefaultsProvider, t as AlertDescription, e as AlertTitle, a as useAlertDefaults };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
|
+
import { a as t, c as n, d as r, f as i, i as a, l as o, m as s, o as c, p as l, r as u, s as d, u as f } from "./icon-button-DERKFHX1.js";
|
|
3
|
+
import { definedProps as p, keyedProps as m } from "@slotted/core/selector-key";
|
|
4
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
5
|
+
import { buttonMessages as g } from "@slotted/core/i18n";
|
|
6
|
+
//#region src/button/button-link.tsx
|
|
7
|
+
function _({ children: e, disabled: t = !1, end: i, fullWidth: a = !1, href: o, justify: l = "center", onAuxClick: u, onAuxClickCapture: f, onClick: g, onClickCapture: _, onKeyDown: v, onKeyDownCapture: y, render: b, size: x, start: S, tone: C, variant: w, ...T }) {
|
|
8
|
+
let E = n({
|
|
9
|
+
size: x,
|
|
10
|
+
tone: C,
|
|
11
|
+
variant: w
|
|
12
|
+
}, r), D = m({
|
|
13
|
+
...T,
|
|
14
|
+
...d({
|
|
15
|
+
disabled: t,
|
|
16
|
+
fullWidth: a,
|
|
17
|
+
justify: l,
|
|
18
|
+
...E
|
|
19
|
+
}),
|
|
20
|
+
children: /* @__PURE__ */ h(s, {
|
|
21
|
+
end: i,
|
|
22
|
+
start: S,
|
|
23
|
+
children: e
|
|
24
|
+
}),
|
|
25
|
+
...c(t, o, b !== void 0, {
|
|
26
|
+
onAuxClick: u,
|
|
27
|
+
onAuxClickCapture: f,
|
|
28
|
+
onClick: g,
|
|
29
|
+
onClickCapture: _,
|
|
30
|
+
onKeyDown: v,
|
|
31
|
+
onKeyDownCapture: y,
|
|
32
|
+
tabIndex: T.tabIndex
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
return b === void 0 ? /* @__PURE__ */ h("a", { ...D }) : b(p(D));
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/button/icon-button-link.tsx
|
|
39
|
+
function v({ children: e, disabled: t = !1, href: r, onAuxClick: a, onAuxClickCapture: o, onClick: s, onClickCapture: l, onKeyDown: u, onKeyDownCapture: f, render: g, shape: _ = i.shape, size: v, tone: y, variant: b, ...x }) {
|
|
40
|
+
let S = n({
|
|
41
|
+
size: v,
|
|
42
|
+
tone: y,
|
|
43
|
+
variant: b
|
|
44
|
+
}, i), C = m({
|
|
45
|
+
...x,
|
|
46
|
+
...d({
|
|
47
|
+
disabled: t,
|
|
48
|
+
shape: _,
|
|
49
|
+
...S
|
|
50
|
+
}),
|
|
51
|
+
children: /* @__PURE__ */ h("span", {
|
|
52
|
+
"data-part": "icon",
|
|
53
|
+
"data-part-icon": "",
|
|
54
|
+
children: e
|
|
55
|
+
}),
|
|
56
|
+
...c(t, r, g !== void 0, {
|
|
57
|
+
onAuxClick: a,
|
|
58
|
+
onAuxClickCapture: o,
|
|
59
|
+
onClick: s,
|
|
60
|
+
onClickCapture: l,
|
|
61
|
+
onKeyDown: u,
|
|
62
|
+
onKeyDownCapture: f,
|
|
63
|
+
tabIndex: x.tabIndex
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
return g === void 0 ? /* @__PURE__ */ h("a", { ...C }) : g(p(C));
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/button/toggle-button.tsx
|
|
70
|
+
function y({ children: r, defaultPressed: i, disabled: c = !1, end: p, focusableWhenDisabled: _ = !1, fullWidth: v = !1, justify: y = "center", loading: b = !1, loadingDelay: x = 0, messages: S, onClick: C, onClickCapture: w, onPressedChange: T, pressed: E, render: D, size: O, start: k, tone: A, type: j = "button", variant: M, ...N }) {
|
|
71
|
+
let P = n({
|
|
72
|
+
size: O,
|
|
73
|
+
tone: A,
|
|
74
|
+
variant: M
|
|
75
|
+
}, l), F = t({
|
|
76
|
+
disabled: c,
|
|
77
|
+
focusableWhenDisabled: _,
|
|
78
|
+
loading: b
|
|
79
|
+
}), I = o({
|
|
80
|
+
loading: b,
|
|
81
|
+
loadingDelay: x
|
|
82
|
+
}), L = e(g, S), R = f({
|
|
83
|
+
defaultPressed: i,
|
|
84
|
+
onPressedChange: T,
|
|
85
|
+
pressed: E
|
|
86
|
+
}), z = m({
|
|
87
|
+
...N,
|
|
88
|
+
...d({
|
|
89
|
+
disabled: c,
|
|
90
|
+
fullWidth: v,
|
|
91
|
+
justify: y,
|
|
92
|
+
loading: b,
|
|
93
|
+
pressed: R.pressed,
|
|
94
|
+
...P
|
|
95
|
+
}),
|
|
96
|
+
"aria-disabled": F.ariaDisabled,
|
|
97
|
+
"aria-pressed": R.pressed,
|
|
98
|
+
children: /* @__PURE__ */ h(s, {
|
|
99
|
+
end: p,
|
|
100
|
+
indicator: I ? /* @__PURE__ */ h(u, { label: L("loading") }) : null,
|
|
101
|
+
start: k,
|
|
102
|
+
children: r
|
|
103
|
+
}),
|
|
104
|
+
disabled: F.nativelyDisabled,
|
|
105
|
+
onClick: (e) => {
|
|
106
|
+
if (F.refuses) return a(e);
|
|
107
|
+
C?.(e), e.defaultPrevented || R.requestToggle(e);
|
|
108
|
+
},
|
|
109
|
+
onClickCapture: (e) => {
|
|
110
|
+
if (F.refuses) return a(e);
|
|
111
|
+
w?.(e);
|
|
112
|
+
},
|
|
113
|
+
type: j
|
|
114
|
+
});
|
|
115
|
+
return D === void 0 ? /* @__PURE__ */ h("button", { ...z }) : D(z);
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
export { v as n, _ as r, y as t };
|
package/dist/button.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as e, t } from "./button-defaults-DNq_DDJh.js";
|
|
2
|
-
import { n, t as r } from "./icon-button-
|
|
3
|
-
import { n as i,
|
|
4
|
-
export { n as Button, t as ButtonDefaultsProvider,
|
|
2
|
+
import { n, t as r } from "./icon-button-DERKFHX1.js";
|
|
3
|
+
import { n as i, r as a, t as o } from "./button-BxgjXAos.js";
|
|
4
|
+
export { n as Button, t as ButtonDefaultsProvider, a as ButtonLink, r as IconButton, i as IconButtonLink, o as ToggleButton, e as useButtonDefaults };
|
|
@@ -2,7 +2,7 @@ import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { t as i } from "./spinner-ring-DyfaYloA.js";
|
|
5
|
-
import { n as a } from "./icon-button-
|
|
5
|
+
import { n as a } from "./icon-button-DERKFHX1.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { b as o } from "./field-CnSMUZw6.js";
|
|
8
8
|
import { t as s } from "./select-tags-3792weoq.js";
|
package/dist/cascader.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./cascader-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./cascader-DO1HiJT6.js";
|
|
2
2
|
export { r as CASCADER_FALLBACK, i as Cascader, t as CascaderDefaultsProvider, n as CascaderPanel, e as useCascaderDefaults };
|
|
@@ -2,7 +2,7 @@ import { r as e } from "./i18n-D7xXDd8-.js";
|
|
|
2
2
|
import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
3
3
|
import { _ as r, c as i, n as a, t as o } from "./menu-parts-BDdCTmko.js";
|
|
4
4
|
import { d as s, f as c, s as l } from "./drawer-Du1aC1px.js";
|
|
5
|
-
import { n as u } from "./icon-button-
|
|
5
|
+
import { n as u } from "./icon-button-DERKFHX1.js";
|
|
6
6
|
import { t as d } from "./checkbox-Hq1PXk04.js";
|
|
7
7
|
import { t as f } from "./text-field-CHYoral_.js";
|
|
8
8
|
import { a as p, f as m, l as h, p as g } from "./popover-BfEn2wdZ.js";
|
package/dist/column-manager.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./column-manager-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./column-manager-Dm5ZLz6p.js";
|
|
2
2
|
export { i as ColumnManager, t as ColumnManagerProvider, n as ColumnManagerRoot, r as ColumnManagerTrigger, e as useColumnManagerDefaults };
|
|
@@ -2,7 +2,7 @@ import { r as e } from "./i18n-D7xXDd8-.js";
|
|
|
2
2
|
import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
3
3
|
import { _ as r, c as i, d as a, g as o, n as s, p as c, t as l } from "./menu-parts-BDdCTmko.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { n as u, t as d } from "./icon-button-
|
|
5
|
+
import { n as u, t as d } from "./icon-button-DERKFHX1.js";
|
|
6
6
|
import { a as f, c as p, i as m, o as ee, s as h } from "./card-DRmq8_5e.js";
|
|
7
7
|
import { i as g, o as _, r as v } from "./skeleton-DeEOmm1y.js";
|
|
8
8
|
import { i as y, n as b, o as x, r as S, t as C } from "./result-state-BMYhelu1.js";
|
package/dist/dashboard-grid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "./dashboard-grid-Bx4J-aC7.js";
|
|
2
2
|
export { t as DASHBOARD_GRID_FALLBACK, i as DashboardGrid, e as DashboardGridDefaultsProvider, n as DashboardWidget, r as useDashboardGridDefaults, a as usePersistedDashboardLayout };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
3
|
import { _ as i, c as a, g as o, n as s, t as c } from "./menu-parts-BDdCTmko.js";
|
|
4
|
-
import { n as l } from "./icon-button-
|
|
4
|
+
import { n as l } from "./icon-button-DERKFHX1.js";
|
|
5
5
|
import { a as u, i as d, n as f, r as p } from "./tooltip-DrFiRlH8.js";
|
|
6
6
|
import { t as m } from "./checkbox-Hq1PXk04.js";
|
|
7
7
|
import { i as h } from "./skeleton-DeEOmm1y.js";
|
package/dist/data-grid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./data-grid-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./data-grid-Dez5RojO.js";
|
|
2
2
|
export { e as DRAG_COLUMN, n as DataGrid, i as DataGridDefaultsProvider, r as EXPANDER_COLUMN, a as SELECTION_COLUMN, t as useDataGridDefaults, o as usePersistedGridView };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, r as t } from "./i18n-D7xXDd8-.js";
|
|
2
2
|
import { n, t as r } from "./icon-D04-_QFA.js";
|
|
3
3
|
import { _ as i, g as a, h as o, m as s, n as c, o as l, t as ee } from "./menu-parts-BDdCTmko.js";
|
|
4
|
-
import { n as u } from "./icon-button-
|
|
4
|
+
import { n as u } from "./icon-button-DERKFHX1.js";
|
|
5
5
|
import { t as te } from "./checkbox-Hq1PXk04.js";
|
|
6
6
|
import { i as d, n as f } from "./skeleton-DeEOmm1y.js";
|
|
7
7
|
import { t as p } from "./visually-hidden-BUSrFZ1_.js";
|
package/dist/data-list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./data-list-
|
|
1
|
+
import { n as e, r as t, t as n } from "./data-list-B18kLC9Q.js";
|
|
2
2
|
export { n as DataList, e as DataListDefaultsProvider, t as useDataListDefaults };
|
package/dist/docs/alert.json
CHANGED
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"off",
|
|
30
30
|
"polite",
|
|
31
31
|
"assertive"
|
|
32
|
+
],
|
|
33
|
+
"actionsPlacement": [
|
|
34
|
+
"below",
|
|
35
|
+
"end"
|
|
32
36
|
]
|
|
33
37
|
},
|
|
34
38
|
"members": {
|
|
@@ -145,6 +149,13 @@
|
|
|
145
149
|
"appliesTo": "Alert",
|
|
146
150
|
"description": "Whether the text announces itself. polite writes role=\"status\" on the content part and assertive writes role=\"alert\"; both imply aria-live and aria-atomic, and neither is written on the box"
|
|
147
151
|
},
|
|
152
|
+
{
|
|
153
|
+
"name": "actionsPlacement",
|
|
154
|
+
"type": "'below' | 'end'",
|
|
155
|
+
"defaultValue": "end for reach='page', below otherwise",
|
|
156
|
+
"appliesTo": "Alert",
|
|
157
|
+
"description": "Where the actions stand. below puts them on a row under the words; end puts them at the end of the words’ line, before the dismiss control, once the box is 40rem wide, and under the words below that width"
|
|
158
|
+
},
|
|
148
159
|
{
|
|
149
160
|
"name": "hideIcon",
|
|
150
161
|
"type": "boolean",
|
|
@@ -370,9 +381,9 @@
|
|
|
370
381
|
{
|
|
371
382
|
"id": "actions",
|
|
372
383
|
"title": "What the message asks for",
|
|
373
|
-
"note": "The controls are the consumer’s own Buttons, in a part outside the live region — a reader hearing the message is not read two button labels in the middle of it. They stack when the box is narrow.",
|
|
384
|
+
"note": "The controls are the consumer’s own Buttons, in a part outside the live region — a reader hearing the message is not read two button labels in the middle of it. They stack when the box is narrow. actionsPlacement=\"end\" puts them at the end of the message’s own line once the box is 40rem wide, which a page banner does by default.",
|
|
374
385
|
"language": "tsx",
|
|
375
|
-
"source": "<Alert tone=\"warning\">\n <AlertContent>\n <AlertTitle>Sua assinatura expira em três dias</AlertTitle>\n </AlertContent>\n <AlertActions>\n <Button size=\"sm\" tone=\"warning\">\n Renovar\n </Button>\n <Button size=\"sm\" tone=\"warning\" variant=\"ghost\">\n Ver planos\n </Button>\n </AlertActions>\n</Alert>;\n",
|
|
386
|
+
"source": "<Alert tone=\"warning\">\n <AlertContent>\n <AlertTitle>Sua assinatura expira em três dias</AlertTitle>\n </AlertContent>\n <AlertActions>\n <Button size=\"sm\" tone=\"warning\">\n Renovar\n </Button>\n <Button size=\"sm\" tone=\"warning\" variant=\"ghost\">\n Ver planos\n </Button>\n </AlertActions>\n</Alert>;\n\n<Alert actionsPlacement=\"end\">\n <AlertContent>\n <AlertDescription>A sugestão altera três linhas do plano.</AlertDescription>\n </AlertContent>\n <AlertActions>\n <Button size=\"sm\">Aplicar</Button>\n </AlertActions>\n</Alert>;\n",
|
|
376
387
|
"verdict": "excerpt"
|
|
377
388
|
},
|
|
378
389
|
{
|
package/dist/docs/alert.md
CHANGED
|
@@ -49,6 +49,7 @@ Excerpt — not a complete module
|
|
|
49
49
|
| `variant` | `'soft' \| 'outline' \| 'solid'` | soft | Alert | How that colour is painted. soft carries the tone’s surface and its border, outline the border alone, solid the tone’s fill and the ink the theme measures against it |
|
|
50
50
|
| `reach` | `'inline' \| 'section' \| 'page'` | section | Alert | The scope the message applies to. inline is tightest and sits beside a field group; page loses its corners and its inline edges because it runs to both edges of what holds it |
|
|
51
51
|
| `live` | `'off' \| 'polite' \| 'assertive'` | off | Alert | Whether the text announces itself. polite writes role="status" on the content part and assertive writes role="alert"; both imply aria-live and aria-atomic, and neither is written on the box |
|
|
52
|
+
| `actionsPlacement` | `'below' \| 'end'` | end for reach='page', below otherwise | Alert | Where the actions stand. below puts them on a row under the words; end puts them at the end of the words’ line, before the dismiss control, once the box is 40rem wide, and under the words below that width |
|
|
52
53
|
| `hideIcon` | `boolean` | false | Alert | Draws no mark at all, for a callout that carries its own artwork in the body |
|
|
53
54
|
| `icon` | `ReactNode` | — | Alert | Replaces the tone’s mark, keeping the box, the size and the place on the message’s first line. Angular projects an element carrying slAlertIcon instead |
|
|
54
55
|
| `dismissible` | `boolean` | false | Alert | Renders the control that closes the message. A critical banner should not have one: the guide’s rule is that it does not go away on its own |
|
|
@@ -75,6 +76,7 @@ Excerpt — not a complete module
|
|
|
75
76
|
| `variant` | `soft`, `outline`, `solid` | `soft` |
|
|
76
77
|
| `reach` | `inline`, `section`, `page` | `section` |
|
|
77
78
|
| `live` | `off`, `polite`, `assertive` | `off` |
|
|
79
|
+
| `actionsPlacement` | `below`, `end` | — |
|
|
78
80
|
|
|
79
81
|
## Rules
|
|
80
82
|
|
|
@@ -163,7 +165,7 @@ Excerpt — not a complete module
|
|
|
163
165
|
|
|
164
166
|
### What the message asks for
|
|
165
167
|
|
|
166
|
-
The controls are the consumer’s own Buttons, in a part outside the live region — a reader hearing the message is not read two button labels in the middle of it. They stack when the box is narrow.
|
|
168
|
+
The controls are the consumer’s own Buttons, in a part outside the live region — a reader hearing the message is not read two button labels in the middle of it. They stack when the box is narrow. actionsPlacement="end" puts them at the end of the message’s own line once the box is 40rem wide, which a page banner does by default.
|
|
167
169
|
|
|
168
170
|
Excerpt — not a complete module
|
|
169
171
|
|
|
@@ -181,6 +183,15 @@ Excerpt — not a complete module
|
|
|
181
183
|
</Button>
|
|
182
184
|
</AlertActions>
|
|
183
185
|
</Alert>;
|
|
186
|
+
|
|
187
|
+
<Alert actionsPlacement="end">
|
|
188
|
+
<AlertContent>
|
|
189
|
+
<AlertDescription>A sugestão altera três linhas do plano.</AlertDescription>
|
|
190
|
+
</AlertContent>
|
|
191
|
+
<AlertActions>
|
|
192
|
+
<Button size="sm">Aplicar</Button>
|
|
193
|
+
</AlertActions>
|
|
194
|
+
</Alert>;
|
|
184
195
|
```
|
|
185
196
|
|
|
186
197
|
### What a reader hears, and when
|
|
@@ -104,6 +104,26 @@ import { Bold } from 'lucide-react';
|
|
|
104
104
|
</IconButton>;
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
### Previous and next record
|
|
108
|
+
|
|
109
|
+
Excerpt — not a complete module
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
113
|
+
|
|
114
|
+
<ButtonGroup aria-label="Records">
|
|
115
|
+
<IconButtonLink
|
|
116
|
+
aria-label="Previous record"
|
|
117
|
+
render={(props) => <RouterLink to="/records/1" {...props} />}
|
|
118
|
+
>
|
|
119
|
+
<ChevronLeft aria-hidden="true" />
|
|
120
|
+
</IconButtonLink>
|
|
121
|
+
<IconButtonLink aria-label="Next record" href="/records/3">
|
|
122
|
+
<ChevronRight aria-hidden="true" />
|
|
123
|
+
</IconButtonLink>
|
|
124
|
+
</ButtonGroup>;
|
|
125
|
+
```
|
|
126
|
+
|
|
107
127
|
### A toggle that owns its own state
|
|
108
128
|
|
|
109
129
|
Excerpt — not a complete module
|
package/dist/docs/button.json
CHANGED
|
@@ -138,6 +138,32 @@
|
|
|
138
138
|
"indicator"
|
|
139
139
|
]
|
|
140
140
|
},
|
|
141
|
+
"iconButtonLink": {
|
|
142
|
+
"nativeElement": "a",
|
|
143
|
+
"defaults": {
|
|
144
|
+
"tone": "secondary",
|
|
145
|
+
"variant": "ghost",
|
|
146
|
+
"size": "md",
|
|
147
|
+
"shape": "square",
|
|
148
|
+
"disabled": false
|
|
149
|
+
},
|
|
150
|
+
"capabilities": [
|
|
151
|
+
"appearance",
|
|
152
|
+
"shape",
|
|
153
|
+
"disabled"
|
|
154
|
+
],
|
|
155
|
+
"states": [
|
|
156
|
+
"default",
|
|
157
|
+
"hover",
|
|
158
|
+
"active",
|
|
159
|
+
"focus-visible",
|
|
160
|
+
"disabled"
|
|
161
|
+
],
|
|
162
|
+
"parts": [
|
|
163
|
+
"root",
|
|
164
|
+
"icon"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
141
167
|
"toggleButton": {
|
|
142
168
|
"nativeElement": "button",
|
|
143
169
|
"defaults": {
|
|
@@ -590,6 +616,91 @@
|
|
|
590
616
|
"Add a tooltip when the icon alone does not say what the action does. The accessible name does not replace a visible label."
|
|
591
617
|
]
|
|
592
618
|
},
|
|
619
|
+
"iconButtonLink": {
|
|
620
|
+
"imports": {
|
|
621
|
+
"source": "import {\n Button,\n ButtonDefaultsProvider,\n ButtonLink,\n IconButton,\n ToggleButton,\n} from '@slotted/react';"
|
|
622
|
+
},
|
|
623
|
+
"anatomy": [
|
|
624
|
+
{
|
|
625
|
+
"part": "root",
|
|
626
|
+
"element": "a, or the element render returns",
|
|
627
|
+
"required": true,
|
|
628
|
+
"purpose": "The control. Carries data-ui=\"button\", data-tone, data-variant and data-size. It also carries data-shape, and data-disabled when it applies."
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"part": "icon",
|
|
632
|
+
"element": "span",
|
|
633
|
+
"required": true,
|
|
634
|
+
"purpose": "Wraps the children."
|
|
635
|
+
}
|
|
636
|
+
],
|
|
637
|
+
"api": [
|
|
638
|
+
{
|
|
639
|
+
"name": "aria-label | aria-labelledby",
|
|
640
|
+
"type": "string",
|
|
641
|
+
"defaultValue": "required",
|
|
642
|
+
"appliesTo": "IconButtonLink",
|
|
643
|
+
"description": "The accessible name. Required, because an icon supplies no text. When both are present, aria-labelledby names the link."
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "href",
|
|
647
|
+
"type": "string",
|
|
648
|
+
"defaultValue": "required without render",
|
|
649
|
+
"appliesTo": "IconButtonLink",
|
|
650
|
+
"description": "The destination. A disabled IconButtonLink does not render it."
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"name": "render",
|
|
654
|
+
"type": "(rootProps) => ReactElement",
|
|
655
|
+
"defaultValue": "—",
|
|
656
|
+
"appliesTo": "IconButtonLink",
|
|
657
|
+
"description": "Renders the root through a router’s link component. The function receives anchor props — every root prop — and must pass all of them on."
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"name": "tone",
|
|
661
|
+
"type": "accent | secondary | neutral | info | success | warning | danger",
|
|
662
|
+
"defaultValue": "secondary",
|
|
663
|
+
"appliesTo": "IconButtonLink",
|
|
664
|
+
"description": "The semantic colour: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does."
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "variant",
|
|
668
|
+
"type": "solid | outline | ghost",
|
|
669
|
+
"defaultValue": "ghost",
|
|
670
|
+
"appliesTo": "IconButtonLink",
|
|
671
|
+
"description": "How the tone is painted: solid, outline or ghost."
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "size",
|
|
675
|
+
"type": "sm | md | lg",
|
|
676
|
+
"defaultValue": "md",
|
|
677
|
+
"appliesTo": "IconButtonLink",
|
|
678
|
+
"description": "The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height."
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "shape",
|
|
682
|
+
"type": "square | circle",
|
|
683
|
+
"defaultValue": "square",
|
|
684
|
+
"appliesTo": "IconButtonLink",
|
|
685
|
+
"description": "The corners of the control: square keeps the radius of the control scale, circle rounds it fully. Both are as wide as they are tall."
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"name": "disabled",
|
|
689
|
+
"type": "boolean",
|
|
690
|
+
"defaultValue": "false",
|
|
691
|
+
"appliesTo": "IconButtonLink",
|
|
692
|
+
"description": "Removes the href and refuses activation. The link stays focusable with role=\"link\" and aria-disabled."
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"composition": [],
|
|
696
|
+
"events": [],
|
|
697
|
+
"accessibility": [
|
|
698
|
+
"IconButtonLink renders an anchor, so it is announced as a link and activates on Enter. Use it for an icon-only control that navigates, such as the previous and next record; an icon-only action is an IconButton.",
|
|
699
|
+
"The type requires an accessible name: pass aria-label or aria-labelledby. An icon supplies no text the name could be computed from.",
|
|
700
|
+
"A disabled IconButtonLink renders no href and stays in the tab sequence with role=\"link\" and aria-disabled.",
|
|
701
|
+
"The render function receives every root prop, including the accessible name and the data attributes, and must pass all of them to the element it renders."
|
|
702
|
+
]
|
|
703
|
+
},
|
|
593
704
|
"toggleButton": {
|
|
594
705
|
"imports": {
|
|
595
706
|
"source": "import {\n Button,\n ButtonDefaultsProvider,\n ButtonLink,\n IconButton,\n ToggleButton,\n} from '@slotted/react';"
|
|
@@ -906,6 +1017,14 @@
|
|
|
906
1017
|
"source": "import { Bold } from 'lucide-react';\n\n<IconButton\n aria-label=\"Bold\"\n pressed={bold}\n onPressedChange={(bold) => setBold(bold)}\n tone=\"secondary\"\n>\n <Bold aria-hidden=\"true\" />\n</IconButton>;\n",
|
|
907
1018
|
"verdict": "excerpt"
|
|
908
1019
|
},
|
|
1020
|
+
{
|
|
1021
|
+
"id": "react-icon-button-link-router",
|
|
1022
|
+
"title": "Previous and next record",
|
|
1023
|
+
"note": null,
|
|
1024
|
+
"language": "tsx",
|
|
1025
|
+
"source": "import { ChevronLeft, ChevronRight } from 'lucide-react';\n\n<ButtonGroup aria-label=\"Records\">\n <IconButtonLink\n aria-label=\"Previous record\"\n render={(props) => <RouterLink to=\"/records/1\" {...props} />}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </IconButtonLink>\n <IconButtonLink aria-label=\"Next record\" href=\"/records/3\">\n <ChevronRight aria-hidden=\"true\" />\n </IconButtonLink>\n</ButtonGroup>;\n",
|
|
1026
|
+
"verdict": "excerpt"
|
|
1027
|
+
},
|
|
909
1028
|
{
|
|
910
1029
|
"id": "react-toggle-button-uncontrolled",
|
|
911
1030
|
"title": "A toggle that owns its own state",
|
package/dist/docs/button.md
CHANGED
|
@@ -56,6 +56,13 @@ export default function ButtonBasic() {
|
|
|
56
56
|
| `icon` | span | yes |
|
|
57
57
|
| `indicator` | span with role="progressbar" | no |
|
|
58
58
|
|
|
59
|
+
### iconButtonLink
|
|
60
|
+
|
|
61
|
+
| Part | Element | Required |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| `root` | a, or the element render returns | yes |
|
|
64
|
+
| `icon` | span | yes |
|
|
65
|
+
|
|
59
66
|
### toggleButton
|
|
60
67
|
|
|
61
68
|
| Part | Element | Required |
|
|
@@ -123,6 +130,19 @@ export default function ButtonBasic() {
|
|
|
123
130
|
| `onPressedChange` | `(pressed, request) => void` | — | IconButton | Called with the requested value and the request: value, previous value, reason (pointer or keyboard), event and cancel(). |
|
|
124
131
|
| `type` | `button \| submit \| reset` | button | IconButton | The native button type. Set submit only for a button that submits its form. |
|
|
125
132
|
|
|
133
|
+
### iconButtonLink
|
|
134
|
+
|
|
135
|
+
| Name | Type | Default | Applies to | Description |
|
|
136
|
+
| --- | --- | --- | --- | --- |
|
|
137
|
+
| `aria-label \| aria-labelledby` | `string` | required | IconButtonLink | The accessible name. Required, because an icon supplies no text. When both are present, aria-labelledby names the link. |
|
|
138
|
+
| `href` | `string` | required without render | IconButtonLink | The destination. A disabled IconButtonLink does not render it. |
|
|
139
|
+
| `render` | `(rootProps) => ReactElement` | — | IconButtonLink | Renders the root through a router’s link component. The function receives anchor props — every root prop — and must pass all of them on. |
|
|
140
|
+
| `tone` | `accent \| secondary \| neutral \| info \| success \| warning \| danger` | secondary | IconButtonLink | The semantic colour: accent for the primary action, secondary for a neutral one, neutral for a primary action drawn in ink where the accent is kept for data, and success, warning or danger for what the action does. |
|
|
141
|
+
| `variant` | `solid \| outline \| ghost` | ghost | IconButtonLink | How the tone is painted: solid, outline or ghost. |
|
|
142
|
+
| `size` | `sm \| md \| lg` | md | IconButtonLink | The step of the control scale. Each step reads the --slotted-control-* tokens, so the density of the theme sets the height. |
|
|
143
|
+
| `shape` | `square \| circle` | square | IconButtonLink | The corners of the control: square keeps the radius of the control scale, circle rounds it fully. Both are as wide as they are tall. |
|
|
144
|
+
| `disabled` | `boolean` | false | IconButtonLink | Removes the href and refuses activation. The link stays focusable with role="link" and aria-disabled. |
|
|
145
|
+
|
|
126
146
|
### toggleButton
|
|
127
147
|
|
|
128
148
|
| Name | Type | Default | Applies to | Description |
|
|
@@ -175,6 +195,8 @@ export default function ButtonBasic() {
|
|
|
175
195
|
- A pressed icon button uses the selected colours of the theme — accent text on the accent selection background, inside the accent edge — whatever its tone and variant. On hover it uses the hover step of that background, not the neutral hover of an unpressed button.
|
|
176
196
|
- The control is as wide as it is tall, at the control height, and never smaller than the WCAG 2.2 minimum target of 24 by 24 CSS pixels at any density.
|
|
177
197
|
- Add a tooltip when the icon alone does not say what the action does. The accessible name does not replace a visible label.
|
|
198
|
+
- IconButtonLink renders an anchor, so it is announced as a link and activates on Enter. Use it for an icon-only control that navigates, such as the previous and next record; an icon-only action is an IconButton.
|
|
199
|
+
- A disabled IconButtonLink renders no href and stays in the tab sequence with role="link" and aria-disabled.
|
|
178
200
|
- ToggleButton renders a native button with aria-pressed, so it is announced as a toggle button and activates on Space and Enter.
|
|
179
201
|
- Keep the label the same in both states: "Mute" stays "Mute" and the state is announced beside it. When the label has to change, use a Button.
|
|
180
202
|
- The change request carries a reason. A native button fires the same click for a pointer, Space and Enter; the reason is pointer when the click reports a click count and keyboard when it reports none.
|