@slotted/react 0.1.0-beta.22 → 0.1.0-beta.24
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-Bi9s1cjV.js +174 -0
- package/dist/alert.js +1 -1
- package/dist/docs/alert.json +2 -2
- package/dist/docs/alert.md +4 -8
- package/dist/docs/data-grid.json +1 -1
- package/dist/docs/data-grid.md +1 -1
- package/dist/docs/datetime-picker.json +0 -1
- package/dist/docs/datetime-picker.md +1 -1
- package/dist/docs/drawer.examples.md +1 -1
- package/dist/docs/drawer.json +3 -1
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/listbox.json +0 -1
- package/dist/docs/listbox.md +1 -1
- package/dist/docs/menu.json +0 -1
- package/dist/docs/menu.md +1 -1
- package/dist/docs/table.json +1 -0
- package/dist/docs/table.md +1 -1
- package/dist/docs/time-picker.json +0 -1
- package/dist/docs/time-picker.md +1 -1
- package/dist/index.js +3 -3
- package/dist/{markdown-BEQ1uEqm.js → markdown-Bw6L0Ifo.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/color-picker.css +1 -1
- package/dist/styles/column-manager.css +2 -2
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/dashboard-grid.css +1 -1
- package/dist/styles/data-grid.css +6 -6
- package/dist/styles/data-list.css +1 -1
- package/dist/styles/datetime-picker.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/event-calendar.css +2 -2
- package/dist/styles/filter-bar.css +6 -6
- package/dist/styles/import-export-center.css +4 -4
- package/dist/styles/index.css +11 -11
- package/dist/styles/listbox.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/saved-views.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/table.css +4 -4
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/transfer.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/alert/alert-parts.d.ts +5 -3
- package/dist/types/alert/alert-parts.d.ts.map +1 -1
- package/dist/types/alert/alert.d.ts.map +1 -1
- package/dist/{wizard-DCS6BaK8.js → wizard-gZyH8HIo.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/alert-BGox6hzF.js +0 -164
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AlertActionsProps, AlertContentProps, AlertDescriptionProps, AlertLive, AlertTitleProps } from './alert.types';
|
|
1
|
+
import type { AlertActionsProps, AlertContentProps, AlertDescriptionProps, AlertLive, AlertTitleProps, AlertTone } from './alert.types';
|
|
2
2
|
/**
|
|
3
3
|
* What the box tells the parts inside it: which role the announcing region
|
|
4
4
|
* carries, and the identifier the title has to write so the box can be named
|
|
@@ -11,6 +11,7 @@ import type { AlertActionsProps, AlertContentProps, AlertDescriptionProps, Alert
|
|
|
11
11
|
*/
|
|
12
12
|
export interface AlertContextValue {
|
|
13
13
|
live: AlertLive;
|
|
14
|
+
tone: AlertTone;
|
|
14
15
|
titleId: string;
|
|
15
16
|
registerTitle: (present: boolean) => void;
|
|
16
17
|
}
|
|
@@ -43,7 +44,8 @@ export declare function AlertDescription({ render, ...nativeProps }: AlertDescri
|
|
|
43
44
|
* The controls that act on the message, outside the region that announces: a
|
|
44
45
|
* reader hearing the message is not read the labels of two buttons in the
|
|
45
46
|
* middle of it. What goes in is the consumer's own `Button`s, because `button`
|
|
46
|
-
* already owns what a button is
|
|
47
|
+
* already owns what a button is; they take the alert's tone and the small
|
|
48
|
+
* size through its defaults, and a button that states an axis still wins.
|
|
47
49
|
*/
|
|
48
|
-
export declare function AlertActions({ render, ...nativeProps }: AlertActionsProps):
|
|
50
|
+
export declare function AlertActions({ render, ...nativeProps }: AlertActionsProps): import("react").JSX.Element;
|
|
49
51
|
//# sourceMappingURL=alert-parts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-parts.d.ts","sourceRoot":"","sources":["../../../src/alert/alert-parts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alert-parts.d.ts","sourceRoot":"","sources":["../../../src/alert/alert-parts.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EAET,eAAe,EACf,SAAS,EACV,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C;AAID,eAAO,MAAM,aAAa,yDAAwB,CAAC;AAqBnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,iBAAiB,+VAWzE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,eAAe,+VAerE;AAED,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,qBAAqB,+VAIjF;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,iBAAiB,+BASzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/alert/alert.tsx"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AAYzC,OAAO,KAAK,EAAoB,UAAU,EAA6B,MAAM,eAAe,CAAC;AAkB7F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,EACpB,gBAAgB,EAChB,QAAQ,EACR,WAAkB,EAClB,WAAmB,EACnB,QAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,EACN,YAAmB,EACnB,IAAI,EACJ,OAAO,EACP,GAAG,WAAW,EACf,EAAE,UAAU,+
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/alert/alert.tsx"],"names":[],"mappings":"AACA,OAAO,iCAAiC,CAAC;AAYzC,OAAO,KAAK,EAAoB,UAAU,EAA6B,MAAM,eAAe,CAAC;AAkB7F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,EACpB,gBAAgB,EAChB,QAAQ,EACR,WAAkB,EAClB,WAAmB,EACnB,QAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,EACN,YAAmB,EACnB,IAAI,EACJ,OAAO,EACP,GAAG,WAAW,EACf,EAAE,UAAU,+VA6HZ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
import { a as i, i as a, r as o, t as s } from "./alert-
|
|
3
|
+
import { a as i, i as a, r as o, t as s } from "./alert-Bi9s1cjV.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { n as c } from "./icon-button-DERKFHX1.js";
|
|
6
6
|
/* empty css */
|
package/dist/wizard.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./wizard-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "./wizard-gZyH8HIo.js";
|
|
2
2
|
export { r as WIZARD_FALLBACK, m as Wizard, l as WizardActions, f as WizardCancel, o as WizardComplete, d as WizardDefaultsProvider, e as WizardDraftStatus, u as WizardEdit, p as WizardNext, t as WizardPrevious, s as WizardSaveDraft, h as WizardSkip, n as WizardStep, a as useWizard, c as useWizardDefaults, i as useWizardStep };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slotted/react",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.24",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -538,17 +538,17 @@
|
|
|
538
538
|
"./*/styles.css": "./dist/styles/*.css"
|
|
539
539
|
},
|
|
540
540
|
"peerDependencies": {
|
|
541
|
-
"@slotted/core": "0.1.0-beta.
|
|
542
|
-
"@slotted/theme": "0.1.0-beta.
|
|
541
|
+
"@slotted/core": "0.1.0-beta.24",
|
|
542
|
+
"@slotted/theme": "0.1.0-beta.24",
|
|
543
543
|
"react": ">=19.2.0 <20",
|
|
544
544
|
"react-dom": ">=19.2.0 <20"
|
|
545
545
|
},
|
|
546
546
|
"devDependencies": {
|
|
547
547
|
"@slotted/agent-docs": "0.0.0",
|
|
548
|
-
"@slotted/core": "0.1.0-beta.
|
|
548
|
+
"@slotted/core": "0.1.0-beta.24",
|
|
549
549
|
"@slotted/storybook-workbench": "0.0.0",
|
|
550
|
-
"@slotted/styles": "0.1.0-beta.
|
|
551
|
-
"@slotted/theme": "0.1.0-beta.
|
|
550
|
+
"@slotted/styles": "0.1.0-beta.24",
|
|
551
|
+
"@slotted/theme": "0.1.0-beta.24",
|
|
552
552
|
"@storybook/react-vite": "10.5.10",
|
|
553
553
|
"@testing-library/jest-dom": "7.0.1",
|
|
554
554
|
"@testing-library/react": "16.3.3",
|
package/dist/alert-BGox6hzF.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./i18n-D7xXDd8-.js";
|
|
2
|
-
import { n as t, t as n } from "./icon-D04-_QFA.js";
|
|
3
|
-
import { keyedProps as r } from "@slotted/core/selector-key";
|
|
4
|
-
import { createControllable as i } from "@slotted/core/state";
|
|
5
|
-
import { createContext as a, useCallback as o, useContext as s, useEffect as c, useId as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
6
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
|
-
import { alertMessages as h } from "@slotted/core/i18n";
|
|
8
|
-
//#region src/alert/alert-defaults.tsx
|
|
9
|
-
var g = a({
|
|
10
|
-
live: "off",
|
|
11
|
-
reach: "section",
|
|
12
|
-
tone: "accent",
|
|
13
|
-
variant: "soft"
|
|
14
|
-
});
|
|
15
|
-
function _() {
|
|
16
|
-
return s(g);
|
|
17
|
-
}
|
|
18
|
-
function v({ children: e, ...t }) {
|
|
19
|
-
let n = _();
|
|
20
|
-
return /* @__PURE__ */ p(g.Provider, {
|
|
21
|
-
value: {
|
|
22
|
-
live: t.live ?? n.live,
|
|
23
|
-
reach: t.reach ?? n.reach,
|
|
24
|
-
tone: t.tone ?? n.tone,
|
|
25
|
-
variant: t.variant ?? n.variant
|
|
26
|
-
},
|
|
27
|
-
children: e
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/alert/alert-parts.tsx
|
|
32
|
-
var y = a(void 0), b = y.Provider;
|
|
33
|
-
function x(e) {
|
|
34
|
-
let t = s(y);
|
|
35
|
-
if (t === void 0) throw Error(`Alert${e} has to be rendered inside an Alert.`);
|
|
36
|
-
return t;
|
|
37
|
-
}
|
|
38
|
-
var S = {
|
|
39
|
-
off: void 0,
|
|
40
|
-
polite: "status",
|
|
41
|
-
assertive: "alert"
|
|
42
|
-
};
|
|
43
|
-
function C({ render: e, ...t }) {
|
|
44
|
-
let { live: n } = x("Content"), i = S[n], a = r({
|
|
45
|
-
...t,
|
|
46
|
-
...i === void 0 ? {} : { role: i },
|
|
47
|
-
"data-part": "content"
|
|
48
|
-
});
|
|
49
|
-
return e === void 0 ? /* @__PURE__ */ p("div", { ...a }) : e(a);
|
|
50
|
-
}
|
|
51
|
-
function w({ render: e, ...t }) {
|
|
52
|
-
let { registerTitle: n, titleId: i } = x("Title");
|
|
53
|
-
c(() => (n(!0), () => n(!1)), [n]);
|
|
54
|
-
let a = r({
|
|
55
|
-
id: i,
|
|
56
|
-
...t,
|
|
57
|
-
"data-part": "title"
|
|
58
|
-
});
|
|
59
|
-
return e === void 0 ? /* @__PURE__ */ p("div", { ...a }) : e(a);
|
|
60
|
-
}
|
|
61
|
-
function T({ render: e, ...t }) {
|
|
62
|
-
let n = r({
|
|
63
|
-
...t,
|
|
64
|
-
"data-part": "description"
|
|
65
|
-
});
|
|
66
|
-
return e === void 0 ? /* @__PURE__ */ p("p", { ...n }) : e(n);
|
|
67
|
-
}
|
|
68
|
-
function E({ render: e, ...t }) {
|
|
69
|
-
let n = r({
|
|
70
|
-
...t,
|
|
71
|
-
"data-part": "actions"
|
|
72
|
-
});
|
|
73
|
-
return e === void 0 ? /* @__PURE__ */ p("div", { ...n }) : e(n);
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/alert/alert.tsx
|
|
77
|
-
var D = {
|
|
78
|
-
accent: "status-info",
|
|
79
|
-
secondary: null,
|
|
80
|
-
info: "status-info",
|
|
81
|
-
success: "status-success",
|
|
82
|
-
warning: "status-warning",
|
|
83
|
-
danger: "status-danger"
|
|
84
|
-
};
|
|
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
|
-
c(() => {
|
|
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
|
-
e !== null && e.isConnected && e.focus();
|
|
95
|
-
}, []);
|
|
96
|
-
c(() => {
|
|
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
|
-
i({
|
|
106
|
-
controlled: O,
|
|
107
|
-
initial: R,
|
|
108
|
-
onRequest: (e) => E?.(e.value, e)
|
|
109
|
-
}).request(!1, e, t) && z(!1);
|
|
110
|
-
}
|
|
111
|
-
let Q = D[N ?? I.tone], $ = r({
|
|
112
|
-
...B ? { "aria-labelledby": H } : {},
|
|
113
|
-
...F,
|
|
114
|
-
...W ? { "data-open": "" } : {},
|
|
115
|
-
children: /* @__PURE__ */ m(b, {
|
|
116
|
-
value: X,
|
|
117
|
-
children: [
|
|
118
|
-
y || x == null && Q === null ? null : /* @__PURE__ */ p("span", {
|
|
119
|
-
"aria-hidden": "true",
|
|
120
|
-
"data-part": "icon",
|
|
121
|
-
"data-part-icon": "",
|
|
122
|
-
children: x ?? (Q === null ? null : /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(t, {
|
|
123
|
-
name: Q,
|
|
124
|
-
solid: !0
|
|
125
|
-
}) }))
|
|
126
|
-
}),
|
|
127
|
-
s,
|
|
128
|
-
v ? /* @__PURE__ */ p("button", {
|
|
129
|
-
"aria-label": L("dismiss"),
|
|
130
|
-
"data-part": "dismiss",
|
|
131
|
-
"data-part-dismiss": "",
|
|
132
|
-
onClick: (e) => {
|
|
133
|
-
e.defaultPrevented || Z("dismiss", e);
|
|
134
|
-
},
|
|
135
|
-
type: "button",
|
|
136
|
-
children: /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(t, { name: "x" }) })
|
|
137
|
-
}) : null
|
|
138
|
-
]
|
|
139
|
-
}),
|
|
140
|
-
"data-actions-placement": a ?? ((k ?? I.reach) === "page" ? "end" : "below"),
|
|
141
|
-
"data-live": U,
|
|
142
|
-
"data-part": "root",
|
|
143
|
-
"data-reach": k ?? I.reach,
|
|
144
|
-
"data-tone": N ?? I.tone,
|
|
145
|
-
"data-ui": "alert",
|
|
146
|
-
"data-variant": P ?? I.variant,
|
|
147
|
-
hidden: !W,
|
|
148
|
-
onBlur: (e) => {
|
|
149
|
-
w?.(e);
|
|
150
|
-
let t = e.relatedTarget;
|
|
151
|
-
(t === null || !e.currentTarget.contains(t)) && (K.current = !1);
|
|
152
|
-
},
|
|
153
|
-
onFocus: (e) => {
|
|
154
|
-
T?.(e);
|
|
155
|
-
let t = e.relatedTarget;
|
|
156
|
-
t instanceof HTMLElement && !e.currentTarget.contains(t) && (G.current = t), K.current = !0;
|
|
157
|
-
},
|
|
158
|
-
ref: A,
|
|
159
|
-
tabIndex: F.tabIndex ?? -1
|
|
160
|
-
});
|
|
161
|
-
return j === void 0 ? /* @__PURE__ */ p("section", { ...$ }) : j($);
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
export { w as a, T as i, E as n, v as o, C as r, _ as s, O as t };
|