@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
|
@@ -457,13 +457,24 @@ Excerpt — not a complete module
|
|
|
457
457
|
|
|
458
458
|
### On the page, or as a card
|
|
459
459
|
|
|
460
|
-
plain sits on the page’s own surface for a report; card draws its own surface, border and padding, and fills the grid cell it is given.
|
|
460
|
+
plain sits on the page’s own surface for a report; card draws its own surface, border and padding, and fills the grid cell it is given. Inside a section whose heading already names the chart, leave title out and pass aria-label: it names the plot.
|
|
461
461
|
|
|
462
462
|
Excerpt — not a complete module
|
|
463
463
|
|
|
464
464
|
```tsx
|
|
465
465
|
<Chart {...revenue} variant="plain" />;
|
|
466
466
|
<Chart {...revenue} variant="card" />;
|
|
467
|
+
|
|
468
|
+
<Section>
|
|
469
|
+
<SectionHeader>
|
|
470
|
+
<SectionTitle>
|
|
471
|
+
<SectionHeading>Receita</SectionHeading>
|
|
472
|
+
</SectionTitle>
|
|
473
|
+
</SectionHeader>
|
|
474
|
+
<SectionBody>
|
|
475
|
+
<Chart aria-label="Receita, últimos 12 meses" data={data} series={series} />
|
|
476
|
+
</SectionBody>
|
|
477
|
+
</Section>;
|
|
467
478
|
```
|
|
468
479
|
|
|
469
480
|
### The controls, and when to show them
|
package/dist/docs/chart.json
CHANGED
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
"type": "ReactNode",
|
|
579
579
|
"defaultValue": "—",
|
|
580
580
|
"appliesTo": "Chart",
|
|
581
|
-
"description": "The caption, and the plot’s accessible name. Not the native title attribute"
|
|
581
|
+
"description": "The caption, and the plot’s accessible name. Not the native title attribute. Without title, the plot is named by the aria-label passed to Chart; use it when a surrounding heading already names the chart"
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
"name": "description",
|
|
@@ -1358,9 +1358,9 @@
|
|
|
1358
1358
|
{
|
|
1359
1359
|
"id": "card",
|
|
1360
1360
|
"title": "On the page, or as a card",
|
|
1361
|
-
"note": "plain sits on the page’s own surface for a report; card draws its own surface, border and padding, and fills the grid cell it is given.",
|
|
1361
|
+
"note": "plain sits on the page’s own surface for a report; card draws its own surface, border and padding, and fills the grid cell it is given. Inside a section whose heading already names the chart, leave title out and pass aria-label: it names the plot.",
|
|
1362
1362
|
"language": "tsx",
|
|
1363
|
-
"source": "<Chart {...revenue} variant=\"plain\" />;\n<Chart {...revenue} variant=\"card\" />;\n",
|
|
1363
|
+
"source": "<Chart {...revenue} variant=\"plain\" />;\n<Chart {...revenue} variant=\"card\" />;\n\n<Section>\n <SectionHeader>\n <SectionTitle>\n <SectionHeading>Receita</SectionHeading>\n </SectionTitle>\n </SectionHeader>\n <SectionBody>\n <Chart aria-label=\"Receita, últimos 12 meses\" data={data} series={series} />\n </SectionBody>\n</Section>;\n",
|
|
1364
1364
|
"verdict": "excerpt"
|
|
1365
1365
|
},
|
|
1366
1366
|
{
|
package/dist/docs/chart.md
CHANGED
|
@@ -87,7 +87,7 @@ Excerpt — not a complete module
|
|
|
87
87
|
| `annotations` | `readonly ChartAnnotation[]` | — | Chart | Lines and bands on either axis, labelled, in a tone. On the category axis a value names a category by its key or its x value; one that names none is not drawn |
|
|
88
88
|
| `recordKey` | `string` | — | Chart | The field that names a record when x is a value axis, for points and selection |
|
|
89
89
|
| `locale` | `string` | — | Chart | BCP 47, for every number and date; the language in force when absent |
|
|
90
|
-
| `title` | `ReactNode` | — | Chart | The caption, and the plot’s accessible name. Not the native title attribute |
|
|
90
|
+
| `title` | `ReactNode` | — | Chart | The caption, and the plot’s accessible name. Not the native title attribute. Without title, the plot is named by the aria-label passed to Chart; use it when a surrounding heading already names the chart |
|
|
91
91
|
| `description` | `ReactNode` | — | Chart | One line under the title |
|
|
92
92
|
| `help` | `ReactNode` | — | Chart | A note behind an information control beside the title |
|
|
93
93
|
| `actions` | `ReactNode` | — | Chart | The consumer’s own controls, before the toolbar |
|
|
@@ -3,7 +3,7 @@ import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
|
3
3
|
import { _ as r, a as i, c as a, d as o, h as s, m as c, n as l, t as u, u as d } from "./menu-parts-BDdCTmko.js";
|
|
4
4
|
import { a as f, d as p, l as m, n as h, o as g, r as ee, s as te } from "./drawer-Du1aC1px.js";
|
|
5
5
|
import { t as ne } from "./spinner-ring-DyfaYloA.js";
|
|
6
|
-
import { n as _, t as re } from "./icon-button-
|
|
6
|
+
import { n as _, t as re } from "./icon-button-DERKFHX1.js";
|
|
7
7
|
import { t as ie } from "./text-field-CHYoral_.js";
|
|
8
8
|
import { a as ae, d as oe, f as se, l as ce, p as le, r as ue } from "./popover-BfEn2wdZ.js";
|
|
9
9
|
import { n as de } from "./kbd-dNz8QHfL.js";
|
package/dist/filter-bar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./filter-bar-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./filter-bar-CzuAJsSf.js";
|
|
2
2
|
export { r as FILTER_BAR_FALLBACK, t as FilterBar, n as FilterBarDefaultsProvider, e as useFilterBarDefaults };
|
|
@@ -76,17 +76,44 @@ function v(t, n) {
|
|
|
76
76
|
function y(e) {
|
|
77
77
|
e.preventDefault(), e.stopPropagation(), e.nativeEvent.stopImmediatePropagation?.();
|
|
78
78
|
}
|
|
79
|
-
function b(
|
|
79
|
+
function b(e, t, n, r) {
|
|
80
|
+
let i = (t) => e ? (y(t), !0) : !1;
|
|
81
|
+
return {
|
|
82
|
+
"aria-disabled": e || void 0,
|
|
83
|
+
role: e ? "link" : void 0,
|
|
84
|
+
tabIndex: e ? r.tabIndex ?? 0 : r.tabIndex,
|
|
85
|
+
...!n && !e ? { href: t } : {},
|
|
86
|
+
onAuxClick: (e) => {
|
|
87
|
+
i(e) || r.onAuxClick?.(e);
|
|
88
|
+
},
|
|
89
|
+
onAuxClickCapture: (e) => {
|
|
90
|
+
i(e) || r.onAuxClickCapture?.(e);
|
|
91
|
+
},
|
|
92
|
+
onClick: (e) => {
|
|
93
|
+
i(e) || r.onClick?.(e);
|
|
94
|
+
},
|
|
95
|
+
onClickCapture: (e) => {
|
|
96
|
+
i(e) || r.onClickCapture?.(e);
|
|
97
|
+
},
|
|
98
|
+
onKeyDown: (e) => {
|
|
99
|
+
e.key === "Enter" && i(e) || r.onKeyDown?.(e);
|
|
100
|
+
},
|
|
101
|
+
onKeyDownCapture: (e) => {
|
|
102
|
+
e.key === "Enter" && i(e) || r.onKeyDownCapture?.(e);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function x({ disabled: e = !1, focusableWhenDisabled: t = !1, loading: n = !1 }) {
|
|
80
107
|
return {
|
|
81
108
|
refuses: e || n,
|
|
82
109
|
nativelyDisabled: e && !t,
|
|
83
110
|
ariaDisabled: e && t || n || void 0
|
|
84
111
|
};
|
|
85
112
|
}
|
|
86
|
-
function
|
|
113
|
+
function S(e) {
|
|
87
114
|
return e.detail === 0 ? "keyboard" : "pointer";
|
|
88
115
|
}
|
|
89
|
-
function
|
|
116
|
+
function C({ loading: e = !1, loadingDelay: t = 0 }) {
|
|
90
117
|
let [n, r] = s(!1);
|
|
91
118
|
return o(() => {
|
|
92
119
|
if (!e || t <= 0) {
|
|
@@ -97,7 +124,7 @@ function S({ loading: e = !1, loadingDelay: t = 0 }) {
|
|
|
97
124
|
return () => clearTimeout(n);
|
|
98
125
|
}, [e, t]), e && (t <= 0 || n);
|
|
99
126
|
}
|
|
100
|
-
function
|
|
127
|
+
function w({ defaultPressed: e = !1, onPressedChange: t, pressed: n }) {
|
|
101
128
|
let [r, i] = s(e), o = a({
|
|
102
129
|
controlled: n,
|
|
103
130
|
initial: r,
|
|
@@ -107,16 +134,16 @@ function C({ defaultPressed: e = !1, onPressedChange: t, pressed: n }) {
|
|
|
107
134
|
pressed: o.value,
|
|
108
135
|
requestToggle(e) {
|
|
109
136
|
let t = !o.value;
|
|
110
|
-
o.request(t,
|
|
137
|
+
o.request(t, S(e), e) && i(t);
|
|
111
138
|
}
|
|
112
139
|
};
|
|
113
140
|
}
|
|
114
|
-
function
|
|
141
|
+
function T({ defaultPressed: e, pressed: t }) {
|
|
115
142
|
return t !== void 0 || e !== void 0;
|
|
116
143
|
}
|
|
117
144
|
//#endregion
|
|
118
145
|
//#region src/button/button-indicator.tsx
|
|
119
|
-
function
|
|
146
|
+
function E({ label: e }) {
|
|
120
147
|
return /* @__PURE__ */ l("span", {
|
|
121
148
|
"aria-label": e,
|
|
122
149
|
"data-part": "indicator",
|
|
@@ -129,16 +156,16 @@ function T({ label: e }) {
|
|
|
129
156
|
}
|
|
130
157
|
//#endregion
|
|
131
158
|
//#region src/button/button.tsx
|
|
132
|
-
function
|
|
159
|
+
function D({ children: e, disabled: n = !1, end: i, focusableWhenDisabled: a = !1, fullWidth: o = !1, justify: s = "center", loading: c = !1, loadingDelay: u = 0, messages: m, onClick: h, onClickCapture: g, render: b, size: S, start: w, tone: T, type: D = "button", variant: O, ...k }) {
|
|
133
160
|
let A = v({
|
|
134
|
-
size:
|
|
135
|
-
tone:
|
|
161
|
+
size: S,
|
|
162
|
+
tone: T,
|
|
136
163
|
variant: O
|
|
137
|
-
}, p), j =
|
|
164
|
+
}, p), j = x({
|
|
138
165
|
disabled: n,
|
|
139
166
|
focusableWhenDisabled: a,
|
|
140
167
|
loading: c
|
|
141
|
-
}), M =
|
|
168
|
+
}), M = C({
|
|
142
169
|
loading: c,
|
|
143
170
|
loadingDelay: u
|
|
144
171
|
}), N = t(d, m), P = r({
|
|
@@ -153,7 +180,7 @@ function E({ children: e, disabled: n = !1, end: i, focusableWhenDisabled: a = !
|
|
|
153
180
|
"aria-disabled": j.ariaDisabled,
|
|
154
181
|
children: /* @__PURE__ */ l(f, {
|
|
155
182
|
end: i,
|
|
156
|
-
indicator: M ? /* @__PURE__ */ l(
|
|
183
|
+
indicator: M ? /* @__PURE__ */ l(E, { label: N("loading") }) : null,
|
|
157
184
|
start: w,
|
|
158
185
|
children: e
|
|
159
186
|
}),
|
|
@@ -168,26 +195,26 @@ function E({ children: e, disabled: n = !1, end: i, focusableWhenDisabled: a = !
|
|
|
168
195
|
},
|
|
169
196
|
type: D
|
|
170
197
|
});
|
|
171
|
-
return
|
|
198
|
+
return b === void 0 ? /* @__PURE__ */ l("button", { ...P }) : b(P);
|
|
172
199
|
}
|
|
173
200
|
//#endregion
|
|
174
201
|
//#region src/button/icon-button.tsx
|
|
175
|
-
function
|
|
202
|
+
function O({ children: e, defaultPressed: n, disabled: i = !1, focusableWhenDisabled: a = !1, loading: o = !1, loadingDelay: s = 0, messages: c, onClick: f, onClickCapture: p, onPressedChange: m, pressed: g, render: b, shape: S = h.shape, size: D, tone: O, type: k = "button", variant: A, ...j }) {
|
|
176
203
|
let M = v({
|
|
177
204
|
size: D,
|
|
178
205
|
tone: O,
|
|
179
206
|
variant: A
|
|
180
|
-
}, h), N =
|
|
207
|
+
}, h), N = x({
|
|
181
208
|
disabled: i,
|
|
182
209
|
focusableWhenDisabled: a,
|
|
183
210
|
loading: o
|
|
184
|
-
}), P =
|
|
211
|
+
}), P = C({
|
|
185
212
|
loading: o,
|
|
186
213
|
loadingDelay: s
|
|
187
|
-
}), F = t(d, c), I =
|
|
214
|
+
}), F = t(d, c), I = T({
|
|
188
215
|
defaultPressed: n,
|
|
189
216
|
pressed: g
|
|
190
|
-
}), L =
|
|
217
|
+
}), L = w({
|
|
191
218
|
defaultPressed: n,
|
|
192
219
|
onPressedChange: m,
|
|
193
220
|
pressed: g
|
|
@@ -197,7 +224,7 @@ function D({ children: e, defaultPressed: n, disabled: i = !1, focusableWhenDisa
|
|
|
197
224
|
disabled: i,
|
|
198
225
|
loading: o,
|
|
199
226
|
pressed: I ? L.pressed : void 0,
|
|
200
|
-
shape:
|
|
227
|
+
shape: S,
|
|
201
228
|
...M
|
|
202
229
|
}),
|
|
203
230
|
"aria-disabled": N.ariaDisabled,
|
|
@@ -205,7 +232,7 @@ function D({ children: e, defaultPressed: n, disabled: i = !1, focusableWhenDisa
|
|
|
205
232
|
children: /* @__PURE__ */ u("span", {
|
|
206
233
|
"data-part": "icon",
|
|
207
234
|
"data-part-icon": "",
|
|
208
|
-
children: [e, P ? /* @__PURE__ */ l(
|
|
235
|
+
children: [e, P ? /* @__PURE__ */ l(E, { label: F("loading") }) : null]
|
|
209
236
|
}),
|
|
210
237
|
disabled: N.nativelyDisabled,
|
|
211
238
|
onClick: (e) => {
|
|
@@ -218,7 +245,7 @@ function D({ children: e, defaultPressed: n, disabled: i = !1, focusableWhenDisa
|
|
|
218
245
|
},
|
|
219
246
|
type: k
|
|
220
247
|
});
|
|
221
|
-
return
|
|
248
|
+
return b === void 0 ? /* @__PURE__ */ l("button", { ...R }) : b(R);
|
|
222
249
|
}
|
|
223
250
|
//#endregion
|
|
224
|
-
export {
|
|
251
|
+
export { x as a, v as c, m as d, h as f, y as i, C as l, f as m, D as n, b as o, g as p, E as r, _ as s, O as t, w as u };
|
|
@@ -2,13 +2,13 @@ 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 { t as i } from "./spinner-ring-DyfaYloA.js";
|
|
4
4
|
import { n as a } from "./progress-indicator-D0acshNn.js";
|
|
5
|
-
import { n as o } from "./icon-button-
|
|
6
|
-
import {
|
|
5
|
+
import { n as o } from "./icon-button-DERKFHX1.js";
|
|
6
|
+
import { r as s } from "./button-BxgjXAos.js";
|
|
7
7
|
import { a as c, i as l, n as u, r as d } from "./tooltip-DrFiRlH8.js";
|
|
8
8
|
import { i as f, t as p } from "./skeleton-DeEOmm1y.js";
|
|
9
9
|
import { i as m, n as h, o as g, r as _, t as v } from "./result-state-BMYhelu1.js";
|
|
10
10
|
import { a as ee, r as te, t as y } from "./tabs-C-Bc7WmQ.js";
|
|
11
|
-
import { A as b, O as ne, b as x, c as S, f as C, l as re, u as w, v as T } from "./table-
|
|
11
|
+
import { A as b, O as ne, b as x, c as S, f as C, l as re, u as w, v as T } from "./table-Cz9YpgLT.js";
|
|
12
12
|
import { v as ie } from "./toast-DHDVXIew.js";
|
|
13
13
|
import { keyedProps as ae, selectorKeyProps as oe } from "@slotted/core/selector-key";
|
|
14
14
|
import { createControllable as se } from "@slotted/core/state";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./import-export-center-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./import-export-center-tbHmRTGb.js";
|
|
2
2
|
export { t as ImportExportCenter, n as ImportExportCenterDefaultsProvider, e as useImportExportCenterDefaults, r as useJobToasts };
|