@solostylist/ui-kit 2.0.1 → 2.0.3
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/s-animated-gradient-text/index.d.ts +2 -0
- package/dist/s-animated-gradient-text/index.js +2 -0
- package/dist/s-animated-gradient-text/s-animated-gradient-text.d.ts +64 -0
- package/dist/s-animated-gradient-text/s-animated-gradient-text.js +92 -0
- package/dist/s-announcement-bar/index.d.ts +2 -0
- package/dist/s-announcement-bar/index.js +2 -0
- package/dist/s-announcement-bar/s-announcement-bar.d.ts +113 -0
- package/dist/s-announcement-bar/s-announcement-bar.js +272 -0
- package/dist/s-carousel/s-carousel.d.ts +2 -0
- package/dist/s-carousel/s-carousel.js +52 -50
- package/dist/s-date-picker/s-date-picker.js +1 -1
- package/dist/s-datetime-picker/s-datetime-picker.js +1 -1
- package/dist/s-drawer/index.d.ts +3 -0
- package/dist/s-drawer/index.js +2 -0
- package/dist/s-drawer/s-drawer.d.ts +70 -0
- package/dist/s-drawer/s-drawer.js +139 -0
- package/dist/s-gradient-blob-pulse/index.d.ts +2 -0
- package/dist/s-gradient-blob-pulse/index.js +2 -0
- package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.d.ts +62 -0
- package/dist/s-gradient-blob-pulse/s-gradient-blob-pulse.js +236 -0
- package/dist/s-gradient-icon/index.d.ts +1 -1
- package/dist/s-gradient-icon/s-gradient-icon.d.ts +4 -4
- package/dist/s-gradient-icon/s-gradient-icon.js +2 -2
- package/dist/s-icon-button/s-icon-button.d.ts +6 -2
- package/dist/s-interactive-card/index.d.ts +3 -0
- package/dist/s-interactive-card/index.js +2 -0
- package/dist/s-interactive-card/s-interactive-card.d.ts +57 -0
- package/dist/s-interactive-card/s-interactive-card.js +150 -0
- package/dist/s-language-switcher/s-language-switcher.js +66 -71
- package/dist/s-list-action-item/index.d.ts +2 -0
- package/dist/s-list-action-item/index.js +2 -0
- package/dist/s-list-action-item/s-list-action-item.d.ts +89 -0
- package/dist/s-list-action-item/s-list-action-item.js +149 -0
- package/dist/s-mega-menu/index.d.ts +3 -0
- package/dist/s-mega-menu/index.js +2 -0
- package/dist/s-mega-menu/mega-menu-panel.d.ts +38 -0
- package/dist/s-mega-menu/mega-menu-panel.js +251 -0
- package/dist/s-mega-menu/mega-menu-slots.d.ts +65 -0
- package/dist/s-mega-menu/mega-menu-slots.js +232 -0
- package/dist/s-mega-menu/mega-menu-trigger.d.ts +35 -0
- package/dist/s-mega-menu/mega-menu-trigger.js +49 -0
- package/dist/s-mega-menu/s-mega-menu.d.ts +23 -0
- package/dist/s-mega-menu/s-mega-menu.js +225 -0
- package/dist/s-mega-menu/types.d.ts +188 -0
- package/dist/s-mega-menu/types.js +0 -0
- package/dist/s-mega-menu/utils.d.ts +51 -0
- package/dist/s-mega-menu/utils.js +51 -0
- package/dist/s-mobile-dock/index.d.ts +3 -0
- package/dist/s-mobile-dock/index.js +2 -0
- package/dist/s-mobile-dock/s-mobile-dock.d.ts +96 -0
- package/dist/s-mobile-dock/s-mobile-dock.js +145 -0
- package/dist/s-nav-item/index.d.ts +1 -1
- package/dist/s-nav-item/s-nav-item.d.ts +35 -16
- package/dist/s-nav-item/s-nav-item.js +55 -77
- package/dist/s-nav-items/s-nav-items.js +68 -112
- package/dist/s-number-range/index.d.ts +3 -0
- package/dist/s-number-range/index.js +2 -0
- package/dist/s-number-range/s-number-range.d.ts +109 -0
- package/dist/s-number-range/s-number-range.js +250 -0
- package/dist/s-popover/index.d.ts +5 -0
- package/dist/s-popover/index.js +3 -0
- package/dist/s-popover/placement.d.ts +14 -0
- package/dist/s-popover/placement.js +65 -0
- package/dist/s-popover/s-popover-content.d.ts +22 -0
- package/dist/s-popover/s-popover-content.js +21 -0
- package/dist/s-popover/s-popover.d.ts +59 -0
- package/dist/s-popover/s-popover.js +66 -0
- package/dist/s-product-card/index.d.ts +3 -0
- package/dist/s-product-card/index.js +2 -0
- package/dist/s-product-card/s-product-card.d.ts +216 -0
- package/dist/s-product-card/s-product-card.js +499 -0
- package/dist/s-product-gallery/index.d.ts +3 -0
- package/dist/s-product-gallery/index.js +2 -0
- package/dist/s-product-gallery/s-product-gallery.d.ts +116 -0
- package/dist/s-product-gallery/s-product-gallery.js +427 -0
- package/dist/s-scroll-to-top/s-scroll-to-top.d.ts +1 -1
- package/dist/s-segmented-control/index.d.ts +3 -0
- package/dist/s-segmented-control/index.js +2 -0
- package/dist/s-segmented-control/s-segmented-control.d.ts +94 -0
- package/dist/s-segmented-control/s-segmented-control.js +298 -0
- package/dist/s-stepper/index.d.ts +3 -0
- package/dist/s-stepper/index.js +2 -0
- package/dist/s-stepper/s-stepper.d.ts +90 -0
- package/dist/s-stepper/s-stepper.js +102 -0
- package/dist/s-swatch/index.d.ts +3 -0
- package/dist/s-swatch/index.js +2 -0
- package/dist/s-swatch/s-swatch.d.ts +235 -0
- package/dist/s-swatch/s-swatch.js +218 -0
- package/dist/s-text-editor/s-text-editor-toolbar.js +105 -108
- package/dist/s-tool-item/s-tool-item.d.ts +10 -6
- package/dist/s-tool-item/s-tool-item.js +12 -12
- package/dist/theme/component-augmentation.d.ts +65 -1
- package/dist/theme/components/drawer.d.ts +1 -0
- package/dist/theme/components/drawer.js +4 -1
- package/dist/theme/components/slider.js +18 -1
- package/dist/theme/components/step-connector.d.ts +0 -3
- package/dist/theme/components/step-connector.js +1 -6
- package/dist/theme/components/step-icon.d.ts +3 -12
- package/dist/theme/components/step-icon.js +3 -14
- package/package.json +7 -2
- package/dist/theme/components/components.d.ts +0 -2
- package/dist/theme/components/slider.d.ts +0 -34
|
@@ -1,49 +1,50 @@
|
|
|
1
1
|
import { toSxArray as e } from "../utils/sx.js";
|
|
2
2
|
import { STextField as t } from "../s-text-field/s-text-field.js";
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import i from "@mui/material/
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import d from "@mui/
|
|
10
|
-
import f from "@mui/
|
|
11
|
-
import p from "@mui/icons-material/
|
|
12
|
-
import m from "@mui/icons-material/
|
|
13
|
-
import h from "@mui/icons-material/
|
|
14
|
-
import g from "@mui/icons-material/
|
|
15
|
-
import _ from "@mui/icons-material/
|
|
16
|
-
import v from "@mui/material/
|
|
17
|
-
import y from "@mui/material/
|
|
3
|
+
import { SPopover as n } from "../s-popover/s-popover.js";
|
|
4
|
+
import { SPopoverContent as r } from "../s-popover/s-popover-content.js";
|
|
5
|
+
import i from "@mui/material/IconButton";
|
|
6
|
+
import * as a from "react";
|
|
7
|
+
import o from "@mui/material/Select";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
import { MenuItem as l, styled as u, useThemeProps as d } from "@mui/material";
|
|
10
|
+
import f from "@mui/material/Stack";
|
|
11
|
+
import p from "@mui/icons-material/Code";
|
|
12
|
+
import m from "@mui/icons-material/FormatBold";
|
|
13
|
+
import h from "@mui/icons-material/FormatItalic";
|
|
14
|
+
import g from "@mui/icons-material/FormatListBulleted";
|
|
15
|
+
import _ from "@mui/icons-material/FormatListNumbered";
|
|
16
|
+
import v from "@mui/icons-material/Link";
|
|
17
|
+
import y from "@mui/icons-material/StrikethroughS";
|
|
18
|
+
import b from "@mui/material/FormControl";
|
|
18
19
|
//#region lib/s-text-editor/s-text-editor-toolbar.tsx
|
|
19
|
-
var
|
|
20
|
+
var x = u(f, {
|
|
20
21
|
name: "STextEditorToolbar",
|
|
21
22
|
slot: "Root"
|
|
22
|
-
})({}),
|
|
23
|
-
let
|
|
24
|
-
props:
|
|
23
|
+
})({}), S = a.forwardRef(function(i, u) {
|
|
24
|
+
let S = d({
|
|
25
|
+
props: i,
|
|
25
26
|
name: "STextEditorToolbar"
|
|
26
|
-
}), { className:
|
|
27
|
-
...
|
|
28
|
-
disabled:
|
|
29
|
-
editorReady:
|
|
30
|
-
}, [
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
...
|
|
35
|
-
className: ["tiptap-toolbar",
|
|
36
|
-
ownerState:
|
|
37
|
-
ref:
|
|
38
|
-
spacing:
|
|
39
|
-
"aria-disabled":
|
|
27
|
+
}), { className: T, disabled: E = !1, editor: D, spacing: O = 1, sx: k, ...A } = S, j = {
|
|
28
|
+
...S,
|
|
29
|
+
disabled: E,
|
|
30
|
+
editorReady: D != null
|
|
31
|
+
}, [M, N] = a.useState(!1), [P, F] = a.useState(null), [I, L] = a.useState("");
|
|
32
|
+
return a.useEffect(() => {
|
|
33
|
+
E && (N(!1), F(null), L(""));
|
|
34
|
+
}, [E]), /* @__PURE__ */ c(a.Fragment, { children: [/* @__PURE__ */ s(x, {
|
|
35
|
+
...A,
|
|
36
|
+
className: ["tiptap-toolbar", T].filter(Boolean).join(" "),
|
|
37
|
+
ownerState: j,
|
|
38
|
+
ref: u,
|
|
39
|
+
spacing: O,
|
|
40
|
+
"aria-disabled": E || void 0,
|
|
40
41
|
sx: [{
|
|
41
42
|
borderBottom: "1px solid",
|
|
42
43
|
borderColor: "divider",
|
|
43
44
|
p: "8px",
|
|
44
45
|
minHeight: "57px"
|
|
45
|
-
}, ...e(
|
|
46
|
-
children:
|
|
46
|
+
}, ...e(k)],
|
|
47
|
+
children: D ? /* @__PURE__ */ c(f, {
|
|
47
48
|
direction: "row",
|
|
48
49
|
spacing: .5,
|
|
49
50
|
sx: {
|
|
@@ -51,25 +52,25 @@ var b = c(u, {
|
|
|
51
52
|
flexWrap: "wrap"
|
|
52
53
|
},
|
|
53
54
|
children: [
|
|
54
|
-
/* @__PURE__ */ o
|
|
55
|
-
disabled:
|
|
55
|
+
/* @__PURE__ */ c(o, {
|
|
56
|
+
disabled: E,
|
|
56
57
|
inputProps: { "aria-label": "Text format" },
|
|
57
58
|
onChange: (e) => {
|
|
58
59
|
let t = e.target.value;
|
|
59
60
|
if (t) {
|
|
60
61
|
if (t === "p") {
|
|
61
|
-
|
|
62
|
+
D.chain().focus().setParagraph().run();
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
65
|
if (t.startsWith("h")) {
|
|
65
66
|
let e = parseInt(t.replace("h", ""));
|
|
66
|
-
!isNaN(e) && e >= 1 && e <= 6 &&
|
|
67
|
+
!isNaN(e) && e >= 1 && e <= 6 && D.chain().focus().setHeading({ level: e }).run();
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
},
|
|
70
|
-
value:
|
|
71
|
-
children: [/* @__PURE__ */
|
|
72
|
-
disabled:
|
|
71
|
+
value: C(D),
|
|
72
|
+
children: [/* @__PURE__ */ s(l, {
|
|
73
|
+
disabled: E || !D.can().chain().focus().setParagraph().run(),
|
|
73
74
|
value: "p",
|
|
74
75
|
children: "Paragraph"
|
|
75
76
|
}), [
|
|
@@ -79,117 +80,113 @@ var b = c(u, {
|
|
|
79
80
|
4,
|
|
80
81
|
5,
|
|
81
82
|
6
|
|
82
|
-
].map((e) => /* @__PURE__ */
|
|
83
|
-
disabled:
|
|
83
|
+
].map((e) => /* @__PURE__ */ c(l, {
|
|
84
|
+
disabled: E || !D.can().chain().focus().setHeading({ level: e }).run(),
|
|
84
85
|
value: `h${e}`,
|
|
85
86
|
children: ["Heading ", e]
|
|
86
87
|
}, e))]
|
|
87
88
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
active:
|
|
90
|
-
disabled:
|
|
89
|
+
/* @__PURE__ */ s(w, {
|
|
90
|
+
active: D.isActive("bold"),
|
|
91
|
+
disabled: E || !D.can().chain().focus().toggleBold().run(),
|
|
91
92
|
label: "Bold",
|
|
92
93
|
onClick: () => {
|
|
93
|
-
|
|
94
|
+
D.chain().focus().toggleBold().run();
|
|
94
95
|
},
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ s(m, {})
|
|
96
97
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
active:
|
|
99
|
-
disabled:
|
|
98
|
+
/* @__PURE__ */ s(w, {
|
|
99
|
+
active: D.isActive("italic"),
|
|
100
|
+
disabled: E || !D.can().chain().focus().toggleItalic().run(),
|
|
100
101
|
label: "Italic",
|
|
101
102
|
onClick: () => {
|
|
102
|
-
|
|
103
|
+
D.chain().focus().toggleItalic().run();
|
|
103
104
|
},
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ s(h, {})
|
|
105
106
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
active:
|
|
108
|
-
disabled:
|
|
107
|
+
/* @__PURE__ */ s(w, {
|
|
108
|
+
active: D.isActive("strike"),
|
|
109
|
+
disabled: E || !D.can().chain().focus().toggleStrike().run(),
|
|
109
110
|
label: "Strikethrough",
|
|
110
111
|
onClick: () => {
|
|
111
|
-
|
|
112
|
+
D.chain().focus().toggleStrike().run();
|
|
112
113
|
},
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ s(y, {})
|
|
114
115
|
}),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
active:
|
|
117
|
-
disabled:
|
|
116
|
+
/* @__PURE__ */ s(w, {
|
|
117
|
+
active: D.isActive("codeBlock"),
|
|
118
|
+
disabled: E || !D.can().chain().focus().toggleCodeBlock().run(),
|
|
118
119
|
label: "Code block",
|
|
119
120
|
onClick: () => {
|
|
120
|
-
|
|
121
|
+
D.chain().focus().toggleCodeBlock().run();
|
|
121
122
|
},
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ s(p, {})
|
|
123
124
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
active:
|
|
126
|
-
disabled:
|
|
125
|
+
/* @__PURE__ */ s(w, {
|
|
126
|
+
active: D.isActive("bulletList"),
|
|
127
|
+
disabled: E || !D.can().chain().focus().toggleBulletList().run(),
|
|
127
128
|
label: "Bulleted list",
|
|
128
129
|
onClick: () => {
|
|
129
|
-
|
|
130
|
+
D.chain().focus().toggleBulletList().run();
|
|
130
131
|
},
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
+
children: /* @__PURE__ */ s(g, {})
|
|
132
133
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
active:
|
|
135
|
-
disabled:
|
|
134
|
+
/* @__PURE__ */ s(w, {
|
|
135
|
+
active: D.isActive("orderedList"),
|
|
136
|
+
disabled: E || !D.can().chain().focus().toggleOrderedList().run(),
|
|
136
137
|
label: "Numbered list",
|
|
137
138
|
onClick: () => {
|
|
138
|
-
|
|
139
|
+
D.chain().focus().toggleOrderedList().run();
|
|
139
140
|
},
|
|
140
|
-
children: /* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ s(_, {})
|
|
141
142
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
disabled:
|
|
143
|
+
/* @__PURE__ */ s(w, {
|
|
144
|
+
disabled: E,
|
|
144
145
|
label: "Set link",
|
|
145
146
|
onClick: (e) => {
|
|
146
|
-
|
|
147
|
+
L(D.getAttributes("link").href ?? ""), F(e.currentTarget), N(!0);
|
|
147
148
|
},
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ s(v, {})
|
|
149
150
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
active:
|
|
152
|
-
disabled:
|
|
151
|
+
/* @__PURE__ */ s(w, {
|
|
152
|
+
active: D.isActive("link"),
|
|
153
|
+
disabled: E || !D.can().chain().focus().unsetLink().run(),
|
|
153
154
|
label: "Remove link",
|
|
154
155
|
onClick: () => {
|
|
155
|
-
|
|
156
|
+
D.chain().focus().unsetLink().run();
|
|
156
157
|
},
|
|
157
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ s(v, {})
|
|
158
159
|
})
|
|
159
160
|
]
|
|
160
161
|
}) : null
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
-
anchorEl:
|
|
163
|
-
|
|
164
|
-
horizontal: "left",
|
|
165
|
-
vertical: "bottom"
|
|
166
|
-
},
|
|
162
|
+
}), /* @__PURE__ */ s(n, {
|
|
163
|
+
anchorEl: P,
|
|
164
|
+
placement: "bottom-start",
|
|
167
165
|
onClose: () => {
|
|
168
|
-
|
|
166
|
+
N(!1), F(null), L("");
|
|
169
167
|
},
|
|
170
|
-
open: !
|
|
171
|
-
|
|
172
|
-
children: /* @__PURE__ */ a(v, { children: /* @__PURE__ */ a(t, {
|
|
168
|
+
open: !E && M,
|
|
169
|
+
children: /* @__PURE__ */ s(r, { children: /* @__PURE__ */ s(b, { children: /* @__PURE__ */ s(t, {
|
|
173
170
|
name: "url",
|
|
174
171
|
label: "URL",
|
|
175
172
|
onChange: (e) => {
|
|
176
|
-
|
|
173
|
+
L(e.target.value);
|
|
177
174
|
},
|
|
178
175
|
onKeyUp: (e) => {
|
|
179
176
|
if (e.key === "Enter") {
|
|
180
|
-
if (
|
|
181
|
-
|
|
177
|
+
if (I === "") {
|
|
178
|
+
D?.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
182
179
|
return;
|
|
183
180
|
}
|
|
184
|
-
|
|
181
|
+
D?.chain().focus().setLink({ href: I }).run(), N(!1), F(null), L("");
|
|
185
182
|
}
|
|
186
183
|
},
|
|
187
|
-
value:
|
|
188
|
-
}) })
|
|
184
|
+
value: I
|
|
185
|
+
}) }) })
|
|
189
186
|
})] });
|
|
190
187
|
});
|
|
191
|
-
|
|
192
|
-
function
|
|
188
|
+
S.displayName = "STextEditorToolbar";
|
|
189
|
+
function C(e) {
|
|
193
190
|
if (e.isActive("paragraph")) return "p";
|
|
194
191
|
for (let t of [
|
|
195
192
|
1,
|
|
@@ -201,16 +198,16 @@ function S(e) {
|
|
|
201
198
|
]) if (e.isActive("heading", { level: t })) return `h${t}`;
|
|
202
199
|
return "p";
|
|
203
200
|
}
|
|
204
|
-
var
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
-
"aria-label":
|
|
201
|
+
var w = a.forwardRef(function({ active: e, children: t, disabled: n, label: r, onClick: a }, o) {
|
|
202
|
+
return /* @__PURE__ */ s(i, {
|
|
203
|
+
"aria-label": r,
|
|
207
204
|
"aria-pressed": e,
|
|
208
205
|
color: e ? "primary" : "inherit",
|
|
209
|
-
disabled:
|
|
210
|
-
onClick:
|
|
211
|
-
ref:
|
|
206
|
+
disabled: n,
|
|
207
|
+
onClick: a,
|
|
208
|
+
ref: o,
|
|
212
209
|
children: t
|
|
213
210
|
});
|
|
214
211
|
});
|
|
215
212
|
//#endregion
|
|
216
|
-
export {
|
|
213
|
+
export { S as STextEditorToolbar };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoxProps, TypographyProps } from '@mui/material';
|
|
2
|
-
import {
|
|
2
|
+
import { SNavItemRowProps } from '../s-nav-item';
|
|
3
3
|
import { OwnerStateSlotProps as MuiOwnerStateSlotProps } from '../utils/slots';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
export interface SToolItemOwnerState extends SToolItemProps {
|
|
@@ -9,12 +9,16 @@ export interface SToolItemOwnerState extends SToolItemProps {
|
|
|
9
9
|
}
|
|
10
10
|
type OwnerStateSlotProps<Props> = MuiOwnerStateSlotProps<Props, SToolItemOwnerState>;
|
|
11
11
|
export interface SToolItemSlots {
|
|
12
|
+
/** Interactive tile element, or the row element when `expanded`. */
|
|
12
13
|
button?: React.ElementType;
|
|
13
|
-
|
|
14
|
+
/** Visible label element. */
|
|
15
|
+
label?: React.ElementType;
|
|
14
16
|
}
|
|
15
17
|
export interface SToolItemSlotProps {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
/** Props or owner-state callback for the tile/row slot. */
|
|
19
|
+
button?: OwnerStateSlotProps<SNavItemRowProps>;
|
|
20
|
+
/** Props or owner-state callback for the label slot. */
|
|
21
|
+
label?: OwnerStateSlotProps<TypographyProps>;
|
|
18
22
|
}
|
|
19
23
|
/** Props for a compact tool navigation item. */
|
|
20
24
|
export interface SToolItemProps extends Omit<BoxProps<'li'>, 'children' | 'component' | 'onClick'> {
|
|
@@ -24,10 +28,10 @@ export interface SToolItemProps extends Omit<BoxProps<'li'>, 'children' | 'compo
|
|
|
24
28
|
expanded?: boolean;
|
|
25
29
|
/** Tool icon. */
|
|
26
30
|
icon?: React.ReactNode;
|
|
31
|
+
/** Visible tool label. */
|
|
32
|
+
label: React.ReactNode;
|
|
27
33
|
/** Called when the tool is activated. */
|
|
28
34
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
29
|
-
/** Visible tool label. */
|
|
30
|
-
primary: React.ReactNode;
|
|
31
35
|
/** Selected navigation state. */
|
|
32
36
|
selected?: boolean;
|
|
33
37
|
/** Components used for internal structural slots. */
|
|
@@ -21,37 +21,37 @@ var p = n.forwardRef(function(t, n) {
|
|
|
21
21
|
let s = c({
|
|
22
22
|
props: t,
|
|
23
23
|
name: "SToolItem"
|
|
24
|
-
}), { disabled: p = !1, expanded: m = !1, icon: h,
|
|
24
|
+
}), { disabled: p = !1, expanded: m = !1, icon: h, label: g, onClick: _, selected: v = !1, slotProps: y, slots: b, sx: x, ...S } = s, C = {
|
|
25
25
|
...s,
|
|
26
26
|
disabled: p,
|
|
27
27
|
expanded: m,
|
|
28
28
|
selected: v
|
|
29
|
-
}, w = f(y?.button, C), T = f(y?.
|
|
30
|
-
O?.(e), e.defaultPrevented ||
|
|
29
|
+
}, w = f(y?.button, C), T = f(y?.label, C), { onClick: E, ...D } = w ?? {}, O = E, k = (e) => {
|
|
30
|
+
O?.(e), e.defaultPrevented || _?.(e);
|
|
31
31
|
};
|
|
32
32
|
if (m) {
|
|
33
|
-
let t = l(b?.button, D, C), i = l(b?.
|
|
33
|
+
let t = l(b?.button, D, C), i = l(b?.label, T ?? {}, C);
|
|
34
34
|
return /* @__PURE__ */ r(d, {
|
|
35
35
|
...S,
|
|
36
36
|
disabled: p,
|
|
37
37
|
icon: h,
|
|
38
|
+
label: g,
|
|
38
39
|
onClick: k,
|
|
39
40
|
ownerState: C,
|
|
40
|
-
primary: _,
|
|
41
41
|
ref: n,
|
|
42
42
|
selected: v,
|
|
43
43
|
slots: {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
item: b?.button,
|
|
45
|
+
label: b?.label
|
|
46
46
|
},
|
|
47
47
|
slotProps: {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
item: t,
|
|
49
|
+
label: i
|
|
50
50
|
},
|
|
51
51
|
sx: [{ cursor: p ? "not-allowed" : void 0 }, ...e(x)]
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
let A = b?.button ?? a, j = b?.
|
|
54
|
+
let A = b?.button ?? a, j = b?.label ?? o, { sx: M, ...N } = D, { sx: P, ...F } = T ?? {}, I = l(b?.button, N, C), L = l(b?.label, F, C), R = typeof g == "string" ? g : void 0;
|
|
55
55
|
return /* @__PURE__ */ r(u, {
|
|
56
56
|
...S,
|
|
57
57
|
ownerState: C,
|
|
@@ -66,7 +66,7 @@ var p = n.forwardRef(function(t, n) {
|
|
|
66
66
|
"aria-label": R,
|
|
67
67
|
disabled: p,
|
|
68
68
|
onClick: (e) => {
|
|
69
|
-
O?.(e), e.defaultPrevented ||
|
|
69
|
+
O?.(e), e.defaultPrevented || _?.(e);
|
|
70
70
|
},
|
|
71
71
|
title: R,
|
|
72
72
|
sx: [{
|
|
@@ -106,7 +106,7 @@ var p = n.forwardRef(function(t, n) {
|
|
|
106
106
|
maxWidth: "100%",
|
|
107
107
|
overflowWrap: "anywhere"
|
|
108
108
|
}, ...e(P)],
|
|
109
|
-
children:
|
|
109
|
+
children: g
|
|
110
110
|
})]
|
|
111
111
|
})
|
|
112
112
|
});
|