@react-spectrum/s2 3.0.0-nightly-e3ed3c7f6-250130 → 3.0.0-nightly-016590a4a-250131
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/Badge.cjs +2 -1
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +6 -2
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +2 -1
- package/dist/Badge.mjs.map +1 -1
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs.map +1 -1
- package/dist/Tabs.cjs +462 -166
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +232 -116
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +463 -167
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +415 -0
- package/dist/TabsPicker.cjs.map +1 -0
- package/dist/TabsPicker.css +482 -0
- package/dist/TabsPicker.css.map +1 -0
- package/dist/TabsPicker.mjs +409 -0
- package/dist/TabsPicker.mjs.map +1 -0
- package/dist/types.d.ts +12 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/Badge.tsx +4 -1
- package/src/Content.tsx +2 -1
- package/src/Tabs.tsx +450 -144
- package/src/TabsPicker.tsx +350 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import "./TabsPicker.css";
|
|
2
|
+
import {centerBaseline as $1f4b04be3f24aae3$export$9d7e2342a7e53afa} from "./CenterBaseline.mjs";
|
|
3
|
+
import {checkmark as $13afb0ea5f0ed767$export$292abbf31ed842a, description as $13afb0ea5f0ed767$export$6d59db4903f20f7d, icon as $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27, label as $13afb0ea5f0ed767$export$1237798dc640739a, menuitem as $13afb0ea5f0ed767$export$f68e44d881264486, sectionHeader as $13afb0ea5f0ed767$export$562e61a0817eb32e, sectionHeading as $13afb0ea5f0ed767$export$300ac6f106ef584d} from "./Menu.mjs";
|
|
4
|
+
import $81cf3d4588736e7d$export$2e2bcd8739ae039 from "./Checkmark.mjs";
|
|
5
|
+
import $4b69f02ec06b9226$export$2e2bcd8739ae039 from "./Chevron.mjs";
|
|
6
|
+
import {FieldLabel as $9afd80978c252040$export$1acdcf5a973a8414} from "./Field.mjs";
|
|
7
|
+
import {HeaderContext as $8e847109a6ab556d$export$e0e4026c12a8bdbb, HeadingContext as $8e847109a6ab556d$export$d688439359537581, Text as $8e847109a6ab556d$export$5f1af8db9871e1d6, TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
|
|
8
|
+
import {IconContext as $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed} from "../icons/Icon.mjs";
|
|
9
|
+
import {PopoverBase as $88b746eba92c8d0d$export$fde1b04c590741a3} from "./Popover.mjs";
|
|
10
|
+
import {pressScale as $10ea7662e51a285b$export$56e8cba416805d8d} from "./pressScale.mjs";
|
|
11
|
+
import {useFormProps as $9b916426527cebe7$export$a6b5be5c6b451665} from "./Form.mjs";
|
|
12
|
+
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
|
|
13
|
+
import {jsxs as $vecDw$jsxs, jsx as $vecDw$jsx, Fragment as $vecDw$Fragment} from "react/jsx-runtime";
|
|
14
|
+
import {Select as $vecDw$Select, Button as $vecDw$Button, SelectValue as $vecDw$SelectValue, Provider as $vecDw$Provider, DEFAULT_SLOT as $vecDw$DEFAULT_SLOT, ListBox as $vecDw$ListBox, ListBoxItem as $vecDw$ListBoxItem} from "react-aria-components";
|
|
15
|
+
import {createContext as $vecDw$createContext, forwardRef as $vecDw$forwardRef, useRef as $vecDw$useRef, useContext as $vecDw$useContext} from "react";
|
|
16
|
+
import {useFocusableRef as $vecDw$useFocusableRef} from "@react-spectrum/utils";
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
27
|
+
* governing permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const $0067ea932a992b6a$export$b72b8dade9393cd5 = /*#__PURE__*/ (0, $vecDw$createContext)(null);
|
|
44
|
+
const $0067ea932a992b6a$var$inputButton = function anonymous(props) {
|
|
45
|
+
let rules = " .";
|
|
46
|
+
if (props.isFocusVisible) rules += ' _Pb';
|
|
47
|
+
else rules += ' _Pa';
|
|
48
|
+
rules += ' ca_____M';
|
|
49
|
+
rules += ' cx';
|
|
50
|
+
rules += ' _Rc';
|
|
51
|
+
rules += ' _Q-3t1z';
|
|
52
|
+
rules += ' __e-g2ozi1';
|
|
53
|
+
rules += ' __f-g2ozi1';
|
|
54
|
+
rules += ' __g-g2ozi1';
|
|
55
|
+
rules += ' __h-g2ozi1';
|
|
56
|
+
if (props.size === "XL") rules += ' pj';
|
|
57
|
+
else if (props.size === "L") rules += ' pi';
|
|
58
|
+
else if (props.size === "S") rules += ' ph';
|
|
59
|
+
else if (props.size === "XS") rules += ' pg';
|
|
60
|
+
else rules += ' pf';
|
|
61
|
+
if (props.isQuiet) rules += ' __qa';
|
|
62
|
+
else rules += ' __q-1s8glxue';
|
|
63
|
+
if (props.size === "XL") rules += ' -usygro_k-____g';
|
|
64
|
+
else if (props.size === "L") rules += ' -usygro_k-___0';
|
|
65
|
+
else if (props.size === "S") rules += ' -usygro_k-___u';
|
|
66
|
+
else rules += ' -usygro_k-___K';
|
|
67
|
+
rules += ' l-rwozxi';
|
|
68
|
+
rules += ' Yc';
|
|
69
|
+
rules += ' _g-bc1l9oh';
|
|
70
|
+
rules += ' _g-1uotwbwg';
|
|
71
|
+
rules += ' _g-eo0c6sf';
|
|
72
|
+
rules += ' _g-enzzrge';
|
|
73
|
+
rules += ' _g-enzykdd';
|
|
74
|
+
rules += ' _g-enzwzjc';
|
|
75
|
+
rules += ' _g-enzrfpb';
|
|
76
|
+
rules += ' _ga';
|
|
77
|
+
rules += ' _hbf';
|
|
78
|
+
rules += ' _he';
|
|
79
|
+
rules += ' _ib';
|
|
80
|
+
rules += ' _j-1x99dlob';
|
|
81
|
+
rules += ' _ja';
|
|
82
|
+
if (props.isDisabled) rules += ' aj';
|
|
83
|
+
else {
|
|
84
|
+
if (props.isPressed) rules += ' ao';
|
|
85
|
+
else if (props.isFocusVisible) rules += ' ao';
|
|
86
|
+
else if (props.isHovered) rules += ' ao';
|
|
87
|
+
else rules += ' an';
|
|
88
|
+
}
|
|
89
|
+
rules += ' _3d';
|
|
90
|
+
rules += ' _na';
|
|
91
|
+
rules += ' zf';
|
|
92
|
+
rules += ' _zb';
|
|
93
|
+
rules += ' _Ab';
|
|
94
|
+
rules += ' _Bb';
|
|
95
|
+
rules += ' _Cb';
|
|
96
|
+
rules += ' _5c';
|
|
97
|
+
rules += ' _Sa';
|
|
98
|
+
rules += ' _U-375x7f';
|
|
99
|
+
rules += ' _Va';
|
|
100
|
+
rules += ' ibH';
|
|
101
|
+
rules += ' iG';
|
|
102
|
+
rules += ' F-375tnp';
|
|
103
|
+
rules += ' G-375tnq';
|
|
104
|
+
rules += ' ba';
|
|
105
|
+
if (props.isQuiet) rules += ' qd';
|
|
106
|
+
rules += ' __V-yksgrp';
|
|
107
|
+
if (props.density === "compact") rules += ' jU';
|
|
108
|
+
else rules += ' j_a';
|
|
109
|
+
rules += ' __ra';
|
|
110
|
+
rules += ' -_375tnp_F-a';
|
|
111
|
+
rules += ' -_375tnq_G-a';
|
|
112
|
+
return rules;
|
|
113
|
+
};
|
|
114
|
+
let $0067ea932a992b6a$export$b1e5508a851be14d = function anonymous(props) {
|
|
115
|
+
let rules = " .";
|
|
116
|
+
rules += ' _Pa';
|
|
117
|
+
rules += ' _3f';
|
|
118
|
+
rules += ' __l-n6rb9a';
|
|
119
|
+
rules += ' __ra';
|
|
120
|
+
rules += ' o-17zqamw';
|
|
121
|
+
rules += ' __za';
|
|
122
|
+
rules += ' __Aa';
|
|
123
|
+
rules += ' Hd';
|
|
124
|
+
rules += ' Id';
|
|
125
|
+
rules += ' Fd';
|
|
126
|
+
rules += ' Gd';
|
|
127
|
+
rules += ' _g-bc1l9oh';
|
|
128
|
+
rules += ' _g-1uotwbwg';
|
|
129
|
+
rules += ' _g-eo0c6sf';
|
|
130
|
+
rules += ' _g-enzzrge';
|
|
131
|
+
rules += ' _g-enzykdd';
|
|
132
|
+
rules += ' _g-enzwzjc';
|
|
133
|
+
rules += ' _g-enzrfpb';
|
|
134
|
+
rules += ' _ga';
|
|
135
|
+
if (props.size === "XL") {
|
|
136
|
+
rules += ' _hbj';
|
|
137
|
+
rules += ' _hi';
|
|
138
|
+
} else if (props.size === "L") {
|
|
139
|
+
rules += ' _hbh';
|
|
140
|
+
rules += ' _hg';
|
|
141
|
+
} else if (props.size === "S") {
|
|
142
|
+
rules += ' _hbd';
|
|
143
|
+
rules += ' _hc';
|
|
144
|
+
} else if (props.size === "XS") {
|
|
145
|
+
rules += ' _hbb';
|
|
146
|
+
rules += ' _ha';
|
|
147
|
+
} else {
|
|
148
|
+
rules += ' _hbf';
|
|
149
|
+
rules += ' _he';
|
|
150
|
+
}
|
|
151
|
+
return rules;
|
|
152
|
+
};
|
|
153
|
+
const $0067ea932a992b6a$var$valueStyles = " __d-3t1x __zb __Ab _qa _tb _3d _5c jb";
|
|
154
|
+
const $0067ea932a992b6a$var$iconStyles = " __c-3t1x U-3hn0u -rwx0fg_d-b";
|
|
155
|
+
const $0067ea932a992b6a$var$iconCenterWrapper = function anonymous(props) {
|
|
156
|
+
let rules = " .";
|
|
157
|
+
rules += ' _3d';
|
|
158
|
+
rules += ' __e-qb5q8i';
|
|
159
|
+
rules += ' __f-qb5q8i';
|
|
160
|
+
rules += ' __g-qb5q8i';
|
|
161
|
+
rules += ' __h-qb5q8i';
|
|
162
|
+
if (props.labelBehavior === "hide") rules += ' F-ve8p9e';
|
|
163
|
+
return rules;
|
|
164
|
+
};
|
|
165
|
+
let $0067ea932a992b6a$var$InsideSelectValueContext = /*#__PURE__*/ (0, $vecDw$createContext)(false);
|
|
166
|
+
function $0067ea932a992b6a$var$Picker(props1, ref) {
|
|
167
|
+
[props1, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props1, ref, $0067ea932a992b6a$export$b72b8dade9393cd5);
|
|
168
|
+
let domRef = (0, $vecDw$useFocusableRef)(ref);
|
|
169
|
+
props1 = (0, $9b916426527cebe7$export$a6b5be5c6b451665)(props1);
|
|
170
|
+
let { direction: direction = 'bottom', align: align = 'start', shouldFlip: shouldFlip = true, children: children, items: items, density: density, labelBehavior: labelBehavior = 'show', valueId: valueId, ...pickerProps } = props1;
|
|
171
|
+
let isQuiet = true;
|
|
172
|
+
const menuOffset = 6;
|
|
173
|
+
const size = 'M';
|
|
174
|
+
let ariaLabelledby = props1['aria-labelledby'] ?? '';
|
|
175
|
+
return /*#__PURE__*/ (0, $vecDw$jsxs)("div", {
|
|
176
|
+
children: [
|
|
177
|
+
/*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$Select), {
|
|
178
|
+
...pickerProps,
|
|
179
|
+
"aria-labelledby": `${labelBehavior === 'hide' ? valueId : ''} ${ariaLabelledby}`,
|
|
180
|
+
children: ({ isOpen: isOpen })=>/*#__PURE__*/ (0, $vecDw$jsxs)((0, $vecDw$Fragment), {
|
|
181
|
+
children: [
|
|
182
|
+
/*#__PURE__*/ (0, $vecDw$jsx)((0, $9afd80978c252040$export$1acdcf5a973a8414), {
|
|
183
|
+
isQuiet: isQuiet
|
|
184
|
+
}),
|
|
185
|
+
/*#__PURE__*/ (0, $vecDw$jsxs)((0, $vecDw$Button), {
|
|
186
|
+
ref: domRef,
|
|
187
|
+
style: (renderProps)=>(0, $10ea7662e51a285b$export$56e8cba416805d8d)(domRef)(renderProps),
|
|
188
|
+
// Prevent press scale from sticking while Picker is open.
|
|
189
|
+
// @ts-ignore
|
|
190
|
+
isPressed: false,
|
|
191
|
+
className: (renderProps)=>$0067ea932a992b6a$var$inputButton({
|
|
192
|
+
...renderProps,
|
|
193
|
+
size: 'M',
|
|
194
|
+
isOpen: isOpen,
|
|
195
|
+
isQuiet: isQuiet,
|
|
196
|
+
density: density
|
|
197
|
+
}),
|
|
198
|
+
children: [
|
|
199
|
+
/*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$SelectValue), {
|
|
200
|
+
className: $0067ea932a992b6a$var$valueStyles + ' ' + "-u6zm92",
|
|
201
|
+
children: ({ defaultChildren: defaultChildren })=>{
|
|
202
|
+
return /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$Provider), {
|
|
203
|
+
values: [
|
|
204
|
+
[
|
|
205
|
+
(0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
|
|
206
|
+
{
|
|
207
|
+
slots: {
|
|
208
|
+
icon: {
|
|
209
|
+
render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
|
|
210
|
+
slot: 'icon',
|
|
211
|
+
styles: $0067ea932a992b6a$var$iconCenterWrapper({
|
|
212
|
+
labelBehavior: labelBehavior
|
|
213
|
+
})
|
|
214
|
+
}),
|
|
215
|
+
styles: (0, $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27)
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
(0, $8e847109a6ab556d$export$9afb8bc826b033ea),
|
|
222
|
+
{
|
|
223
|
+
slots: {
|
|
224
|
+
// Default slot is useful when converting other collections to PickerItems.
|
|
225
|
+
[(0, $vecDw$DEFAULT_SLOT)]: {
|
|
226
|
+
id: valueId,
|
|
227
|
+
styles: function anonymous(props) {
|
|
228
|
+
let rules = " .";
|
|
229
|
+
if (props.labelBehavior === "hide") rules += ' _3j';
|
|
230
|
+
else rules += ' _3a';
|
|
231
|
+
rules += ' __d-3t1y';
|
|
232
|
+
rules += ' __zb';
|
|
233
|
+
rules += ' __Ab';
|
|
234
|
+
rules += ' _qa';
|
|
235
|
+
rules += ' _tb';
|
|
236
|
+
return rules;
|
|
237
|
+
}({
|
|
238
|
+
labelBehavior: labelBehavior
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
$0067ea932a992b6a$var$InsideSelectValueContext,
|
|
246
|
+
true
|
|
247
|
+
]
|
|
248
|
+
],
|
|
249
|
+
children: defaultChildren
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}),
|
|
253
|
+
/*#__PURE__*/ (0, $vecDw$jsx)((0, $4b69f02ec06b9226$export$2e2bcd8739ae039), {
|
|
254
|
+
size: size,
|
|
255
|
+
className: $0067ea932a992b6a$var$iconStyles
|
|
256
|
+
})
|
|
257
|
+
]
|
|
258
|
+
}),
|
|
259
|
+
/*#__PURE__*/ (0, $vecDw$jsx)((0, $88b746eba92c8d0d$export$fde1b04c590741a3), {
|
|
260
|
+
hideArrow: true,
|
|
261
|
+
offset: menuOffset,
|
|
262
|
+
placement: `${direction} ${align}`,
|
|
263
|
+
shouldFlip: shouldFlip,
|
|
264
|
+
styles: " B-375tnl p___u k-13f72lm -_375tnl_B-M",
|
|
265
|
+
children: /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$Provider), {
|
|
266
|
+
values: [
|
|
267
|
+
[
|
|
268
|
+
(0, $8e847109a6ab556d$export$e0e4026c12a8bdbb),
|
|
269
|
+
{
|
|
270
|
+
styles: (0, $13afb0ea5f0ed767$export$562e61a0817eb32e)({
|
|
271
|
+
size: size
|
|
272
|
+
})
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
[
|
|
276
|
+
(0, $8e847109a6ab556d$export$d688439359537581),
|
|
277
|
+
{
|
|
278
|
+
styles: (0, $13afb0ea5f0ed767$export$300ac6f106ef584d)
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
[
|
|
282
|
+
(0, $8e847109a6ab556d$export$9afb8bc826b033ea),
|
|
283
|
+
{
|
|
284
|
+
slots: {
|
|
285
|
+
description: {
|
|
286
|
+
styles: (0, $13afb0ea5f0ed767$export$6d59db4903f20f7d)({
|
|
287
|
+
size: size
|
|
288
|
+
})
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
],
|
|
294
|
+
children: /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$ListBox), {
|
|
295
|
+
items: items,
|
|
296
|
+
className: $0067ea932a992b6a$export$b1e5508a851be14d,
|
|
297
|
+
children: children
|
|
298
|
+
})
|
|
299
|
+
})
|
|
300
|
+
})
|
|
301
|
+
]
|
|
302
|
+
})
|
|
303
|
+
}),
|
|
304
|
+
/*#__PURE__*/ (0, $vecDw$jsx)($0067ea932a992b6a$var$TabLine, {
|
|
305
|
+
isDisabled: props1.isDisabled
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Pickers allow users to choose a single option from a collapsible list of options when space is limited.
|
|
312
|
+
*/ let $0067ea932a992b6a$export$ba25329847403e11 = /*#__PURE__*/ (0, $vecDw$forwardRef)($0067ea932a992b6a$var$Picker);
|
|
313
|
+
const $0067ea932a992b6a$var$selectedIndicator = function anonymous(props) {
|
|
314
|
+
let rules = " .";
|
|
315
|
+
if (props.isDisabled) rules += ' ba_____O';
|
|
316
|
+
else rules += ' ba_____M';
|
|
317
|
+
if (props.isDisabled) rules += ' bg';
|
|
318
|
+
else {
|
|
319
|
+
if (props.isPressed) rules += ' bo';
|
|
320
|
+
else if (props.isFocusVisible) rules += ' bo';
|
|
321
|
+
else if (props.isHovered) rules += ' bo';
|
|
322
|
+
else rules += ' bn';
|
|
323
|
+
}
|
|
324
|
+
rules += ' j-375zlr';
|
|
325
|
+
rules += ' zf';
|
|
326
|
+
rules += ' _zf';
|
|
327
|
+
rules += ' _Af';
|
|
328
|
+
rules += ' _Bf';
|
|
329
|
+
rules += ' _Cf';
|
|
330
|
+
rules += ' D-yj8a3w';
|
|
331
|
+
rules += ' _U-375x5l';
|
|
332
|
+
rules += ' _Va';
|
|
333
|
+
return rules;
|
|
334
|
+
};
|
|
335
|
+
function $0067ea932a992b6a$var$TabLine(props) {
|
|
336
|
+
return /*#__PURE__*/ (0, $vecDw$jsx)("div", {
|
|
337
|
+
className: $0067ea932a992b6a$var$selectedIndicator(props)
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
function $0067ea932a992b6a$export$d601881f38163e28(props) {
|
|
341
|
+
let ref = (0, $vecDw$useRef)(null);
|
|
342
|
+
let isLink = props.href != null;
|
|
343
|
+
const size = 'M';
|
|
344
|
+
return /*#__PURE__*/ (0, $vecDw$jsx)((0, $vecDw$ListBoxItem), {
|
|
345
|
+
...props,
|
|
346
|
+
ref: ref,
|
|
347
|
+
textValue: props.textValue || (typeof props.children === 'string' ? props.children : undefined),
|
|
348
|
+
style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(ref, props.UNSAFE_style),
|
|
349
|
+
className: (renderProps)=>(props.UNSAFE_className || '') + (0, $13afb0ea5f0ed767$export$f68e44d881264486)({
|
|
350
|
+
...renderProps,
|
|
351
|
+
size: size,
|
|
352
|
+
isLink: isLink
|
|
353
|
+
}, props.styles),
|
|
354
|
+
children: (renderProps)=>{
|
|
355
|
+
let { children: children } = props;
|
|
356
|
+
return /*#__PURE__*/ (0, $vecDw$jsx)($0067ea932a992b6a$var$DefaultProvider, {
|
|
357
|
+
context: (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
|
|
358
|
+
value: {
|
|
359
|
+
slots: {
|
|
360
|
+
icon: {
|
|
361
|
+
render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
|
|
362
|
+
slot: 'icon',
|
|
363
|
+
styles: $0067ea932a992b6a$var$iconCenterWrapper({})
|
|
364
|
+
}),
|
|
365
|
+
styles: (0, $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27)
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
children: /*#__PURE__*/ (0, $vecDw$jsxs)($0067ea932a992b6a$var$DefaultProvider, {
|
|
370
|
+
context: (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
|
|
371
|
+
value: {
|
|
372
|
+
slots: {
|
|
373
|
+
[(0, $vecDw$DEFAULT_SLOT)]: {
|
|
374
|
+
styles: (0, $13afb0ea5f0ed767$export$1237798dc640739a)({
|
|
375
|
+
size: size
|
|
376
|
+
})
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
children: [
|
|
381
|
+
!isLink && /*#__PURE__*/ (0, $vecDw$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
|
|
382
|
+
size: size,
|
|
383
|
+
className: (0, $13afb0ea5f0ed767$export$292abbf31ed842a)({
|
|
384
|
+
...renderProps,
|
|
385
|
+
size: size
|
|
386
|
+
})
|
|
387
|
+
}),
|
|
388
|
+
typeof children === 'string' ? /*#__PURE__*/ (0, $vecDw$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
|
|
389
|
+
children: children
|
|
390
|
+
}) : children
|
|
391
|
+
]
|
|
392
|
+
})
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
// A Context.Provider that only sets a value if not inside SelectValue.
|
|
398
|
+
function $0067ea932a992b6a$var$DefaultProvider({ context: context, value: value, children: children }) {
|
|
399
|
+
let inSelectValue = (0, $vecDw$useContext)($0067ea932a992b6a$var$InsideSelectValueContext);
|
|
400
|
+
if (inSelectValue) return children;
|
|
401
|
+
return /*#__PURE__*/ (0, $vecDw$jsx)(context.Provider, {
|
|
402
|
+
value: value,
|
|
403
|
+
children: children
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
export {$0067ea932a992b6a$export$b72b8dade9393cd5 as PickerContext, $0067ea932a992b6a$export$b1e5508a851be14d as menu, $0067ea932a992b6a$export$ba25329847403e11 as Picker, $0067ea932a992b6a$export$d601881f38163e28 as PickerItem};
|
|
409
|
+
//# sourceMappingURL=TabsPicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"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","sources":["packages/@react-spectrum/s2/src/TabsPicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {\n PopoverProps as AriaPopoverProps,\n Select as AriaSelect,\n SelectProps as AriaSelectProps,\n Button,\n ContextValue,\n DEFAULT_SLOT,\n ListBox,\n ListBoxItem,\n ListBoxItemProps,\n ListBoxProps,\n Provider,\n SelectValue\n} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {\n checkmark,\n description,\n icon,\n label,\n menuitem,\n sectionHeader,\n sectionHeading\n} from './Menu';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport ChevronIcon from '../ui-icons/Chevron';\nimport {edgeToText, focusRing, size, style} from '../style' with {type: 'macro'};\nimport {fieldInput, StyleProps} from './style-utils' with {type: 'macro'};\nimport {\n FieldLabel\n} from './Field';\nimport {FocusableRef, FocusableRefValue, SpectrumLabelableProps} from '@react-types/shared';\nimport {forwardRefType} from './types';\nimport {HeaderContext, HeadingContext, Text, TextContext} from './Content';\nimport {IconContext} from './Icon';\nimport {Placement} from 'react-aria';\nimport {PopoverBase} from './Popover';\nimport {pressScale} from './pressScale';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport React, {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\nexport interface PickerStyleProps {\n}\nexport interface PickerProps<T extends object> extends\n Omit<AriaSelectProps<T>, 'children' | 'style' | 'className' | 'placeholder'>,\n PickerStyleProps,\n StyleProps,\n SpectrumLabelableProps,\n Pick<ListBoxProps<T>, 'items'>,\n Pick<AriaPopoverProps, 'shouldFlip'> {\n /** The contents of the collection. */\n children: ReactNode | ((item: T) => ReactNode),\n /**\n * Direction the menu will render relative to the Picker.\n *\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top',\n /**\n * Alignment of the menu relative to the input target.\n *\n * @default 'start'\n */\n align?: 'start' | 'end',\n /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */\n menuWidth?: number,\n /** Density of the tabs, affects the height of the picker. */\n density: 'compact' | 'regular',\n /**\n * If the tab picker should only display icon and no text for the button label.\n * @default 'show\n */\n labelBehavior?: 'show' | 'hide',\n /** Id for the SelectedValue so we can label using it. */\n valueId?: string\n}\nexport const PickerContext = createContext<ContextValue<Partial<PickerProps<any>>, FocusableRefValue<HTMLButtonElement>>>(null);\nconst inputButton = style({\n ...focusRing(),\n ...fieldInput(),\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid'\n },\n position: 'relative',\n font: 'ui',\n display: 'flex',\n textAlign: 'start',\n borderStyle: 'none',\n borderRadius: 'sm',\n alignItems: 'center',\n transition: 'default',\n columnGap: 'text-to-visual',\n paddingX: 0,\n backgroundColor: 'transparent',\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n maxWidth: {\n isQuiet: 'max'\n },\n disableTapHighlight: true,\n height: {\n default: 48,\n density: {\n compact: 32\n }\n },\n boxSizing: 'border-box'\n});\nexport let menu = style({\n outlineStyle: 'none',\n display: 'grid',\n gridTemplateColumns: [edgeToText(32), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(32)],\n boxSizing: 'border-box',\n maxHeight: '[inherit]',\n overflow: 'auto',\n padding: 8,\n fontFamily: 'sans',\n fontSize: 'control'\n});\nconst valueStyles = style({\n flexGrow: 0,\n truncate: true,\n display: 'flex',\n alignItems: 'center',\n height: 'full'\n});\nconst iconStyles = style({\n flexShrink: 0,\n rotate: 90,\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n});\nconst iconCenterWrapper = style({\n display: 'flex',\n gridArea: 'icon',\n paddingStart: {\n labelBehavior: {\n hide: size(6)\n }\n }\n});\nlet InsideSelectValueContext = createContext(false);\nfunction Picker<T extends object>(props: PickerProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, PickerContext);\n let domRef = useFocusableRef(ref);\n props = useFormProps(props);\n let {\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n children,\n items,\n density,\n labelBehavior = 'show',\n valueId,\n ...pickerProps\n } = props;\n let isQuiet = true;\n const menuOffset: number = 6;\n const size = 'M';\n let ariaLabelledby = props['aria-labelledby'] ?? '';\n return (\n <div>\n <AriaSelect\n {...pickerProps}\n aria-labelledby={`${labelBehavior === 'hide' ? valueId : ''} ${ariaLabelledby}`}>\n {({isOpen}) => (\n <>\n <FieldLabel isQuiet={isQuiet} />\n <Button\n ref={domRef}\n style={renderProps => pressScale(domRef)(renderProps)}\n // Prevent press scale from sticking while Picker is open.\n // @ts-ignore\n isPressed={false}\n className={renderProps => inputButton({\n ...renderProps,\n size: 'M',\n isOpen,\n isQuiet,\n density\n })}>\n <SelectValue className={valueStyles + ' ' + raw('&> * {display: none;}')}>\n {({defaultChildren}) => {\n return (\n <Provider\n values={[\n [IconContext, {\n slots: {\n icon: {\n render: centerBaseline({slot: 'icon', styles: iconCenterWrapper({labelBehavior})}),\n styles: icon\n }\n }\n }],\n [TextContext, {\n slots: {\n // Default slot is useful when converting other collections to PickerItems.\n [DEFAULT_SLOT]: {\n id: valueId,\n styles: style({\n display: {\n default: 'block',\n labelBehavior: {\n hide: 'none'\n }\n },\n flexGrow: 1,\n truncate: true\n })({labelBehavior})\n }\n }\n }],\n [InsideSelectValueContext, true]\n ]}>\n {defaultChildren}\n </Provider>\n );\n }}\n </SelectValue>\n <ChevronIcon\n size={size}\n className={iconStyles} />\n </Button>\n <PopoverBase\n hideArrow\n offset={menuOffset}\n placement={`${direction} ${align}` as Placement}\n shouldFlip={shouldFlip}\n styles={style({\n marginStart: -12,\n minWidth: 192,\n width: '[calc(var(--trigger-width) + (-2 * self(marginStart)))]'\n })}>\n <Provider\n values={[\n [HeaderContext, {styles: sectionHeader({size})}],\n [HeadingContext, {styles: sectionHeading}],\n [TextContext, {\n slots: {\n description: {styles: description({size})}\n }\n }]\n ]}>\n <ListBox\n items={items}\n className={menu}>\n {children}\n </ListBox>\n </Provider>\n </PopoverBase>\n </>\n )}\n </AriaSelect>\n <TabLine isDisabled={props.isDisabled} />\n </div>\n );\n}\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\nlet _Picker = /*#__PURE__*/ (forwardRef as forwardRefType)(Picker);\nexport {_Picker as Picker};\n\n\nconst selectedIndicator = style({\n backgroundColor: {\n default: 'neutral',\n isDisabled: 'disabled',\n forcedColors: {\n default: 'Highlight',\n isDisabled: 'GrayText'\n }\n },\n height: '[2px]',\n borderStyle: 'none',\n borderRadius: 'full',\n marginTop: '[-2px]',\n transitionDuration: 130,\n transitionTimingFunction: 'in-out'\n});\nfunction TabLine(props) {\n return <div className={selectedIndicator(props)} />;\n}\n\n\nexport interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className'>, StyleProps {\n children: ReactNode\n}\nexport function PickerItem(props: PickerItemProps) {\n let ref = useRef(null);\n let isLink = props.href != null;\n const size = 'M';\n return (\n <ListBoxItem\n {...props}\n ref={ref}\n textValue={props.textValue || (typeof props.children === 'string' ? props.children as string : undefined)}\n style={pressScale(ref, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + menuitem({...renderProps, size, isLink}, props.styles)}>\n {(renderProps) => {\n let {children} = props;\n return (\n <DefaultProvider\n context={IconContext}\n value={{slots: {\n icon: {render: centerBaseline({slot: 'icon', styles: iconCenterWrapper({})}), styles: icon}\n }}}>\n <DefaultProvider\n context={TextContext}\n value={{\n slots: {\n [DEFAULT_SLOT]: {styles: label({size})}\n }\n }}>\n {!isLink && <CheckmarkIcon size={size} className={checkmark({...renderProps, size})} />}\n {typeof children === 'string' ? <Text>{children}</Text> : children}\n </DefaultProvider>\n </DefaultProvider>\n );\n }}\n </ListBoxItem>\n );\n}\n// A Context.Provider that only sets a value if not inside SelectValue.\nfunction DefaultProvider({context, value, children}: {context: React.Context<any>, value: any, children: any}) {\n let inSelectValue = useContext(InsideSelectValueContext);\n if (inSelectValue) {\n return children;\n }\n return <context.Provider value={value}>{children}</context.Provider>;\n}\n"],"names":[],"version":3,"file":"TabsPicker.mjs.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -175,6 +175,7 @@ interface ContentProps extends UnsafeStyles, SlotProps {
|
|
|
175
175
|
children?: ReactNode;
|
|
176
176
|
styles?: StyleString;
|
|
177
177
|
isHidden?: boolean;
|
|
178
|
+
id?: string;
|
|
178
179
|
}
|
|
179
180
|
interface HeadingProps extends ContentProps {
|
|
180
181
|
level?: number;
|
|
@@ -1542,14 +1543,18 @@ export interface TabsProps extends Omit<_TabsProps1, 'className' | 'style' | 'ch
|
|
|
1542
1543
|
* @default 'regular'
|
|
1543
1544
|
*/
|
|
1544
1545
|
density?: 'compact' | 'regular';
|
|
1546
|
+
/**
|
|
1547
|
+
* Defines if the text within the tabs should be hidden and only the icon should be shown.
|
|
1548
|
+
* The text is always visible when the item is collapsed into a picker.
|
|
1549
|
+
* @default 'show'
|
|
1550
|
+
*/
|
|
1551
|
+
labelBehavior?: 'show' | 'hide';
|
|
1545
1552
|
}
|
|
1546
1553
|
export interface TabProps extends Omit<_TabProps1, 'children' | 'style' | 'className'>, StyleProps {
|
|
1547
1554
|
/** The content to display in the tab. */
|
|
1548
|
-
children
|
|
1555
|
+
children: ReactNode;
|
|
1549
1556
|
}
|
|
1550
|
-
export interface TabListProps<T> extends Omit<_TabListProps1<T>, '
|
|
1551
|
-
/** The content to display in the tablist. */
|
|
1552
|
-
children?: ReactNode;
|
|
1557
|
+
export interface TabListProps<T> extends Omit<_TabListProps1<T>, 'style' | 'className' | 'aria-label' | 'aria-labelledby'>, StyleProps {
|
|
1553
1558
|
}
|
|
1554
1559
|
export interface TabPanelProps extends Omit<_TabPanelProps1, 'children' | 'style' | 'className'>, UnsafeStyles {
|
|
1555
1560
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
@@ -1558,13 +1563,13 @@ export interface TabPanelProps extends Omit<_TabPanelProps1, 'children' | 'style
|
|
|
1558
1563
|
children?: ReactNode;
|
|
1559
1564
|
}
|
|
1560
1565
|
export const TabsContext: Context<ContextValue<TabsProps, DOMRefValue<HTMLDivElement>>>;
|
|
1561
|
-
export function TabPanel(props: TabPanelProps): JSX.Element;
|
|
1562
|
-
export function Tab(props: TabProps): JSX.Element;
|
|
1563
|
-
export function TabList<T extends object>(props: TabListProps<T>): JSX.Element;
|
|
1564
1566
|
/**
|
|
1565
1567
|
* Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit.
|
|
1566
1568
|
*/
|
|
1567
1569
|
export const Tabs: ForwardRefExoticComponent<TabsProps & RefAttributes<DOMRefValue<HTMLDivElement>>>;
|
|
1570
|
+
export function TabList<T extends object>(props: TabListProps<T>): JSX.Element | undefined;
|
|
1571
|
+
export function Tab(props: TabProps): JSX.Element;
|
|
1572
|
+
export function TabPanel(props: TabPanelProps): JSX.Element | null;
|
|
1568
1573
|
export interface TagProps extends Omit<_TagProps1, 'children' | 'style' | 'className'> {
|
|
1569
1574
|
/** The children of the tag. */
|
|
1570
1575
|
children?: ReactNode;
|