@react-spectrum/s2 3.0.0-nightly-6193c40ee-240920 → 3.0.0-nightly-9421c1409-240922

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.
@@ -0,0 +1,446 @@
1
+ @layer _.a {
2
+ .ub {
3
+ border-top-width: 1px;
4
+ }
5
+
6
+ .ua {
7
+ border-top-width: 0;
8
+ }
9
+
10
+ .va {
11
+ border-bottom-width: 0;
12
+ }
13
+
14
+ .wa {
15
+ border-style: solid;
16
+ }
17
+
18
+ .ch {
19
+ border-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
20
+ }
21
+
22
+ .q-ffvo8f {
23
+ min-width: 12.5rem;
24
+ }
25
+
26
+ .Aa {
27
+ margin-top: 0;
28
+ }
29
+
30
+ .Ba {
31
+ margin-bottom: 0;
32
+ }
33
+
34
+ .ya {
35
+ margin-inline-start: 0;
36
+ }
37
+
38
+ .za {
39
+ margin-inline-end: 0;
40
+ }
41
+
42
+ ._La {
43
+ outline-style: none;
44
+ }
45
+
46
+ ._Lb {
47
+ outline-style: solid;
48
+ }
49
+
50
+ .dx {
51
+ outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #456efe);
52
+ }
53
+
54
+ ._Nc {
55
+ outline-width: 2px;
56
+ }
57
+
58
+ ._M-3hmpw {
59
+ outline-offset: -2px;
60
+ }
61
+
62
+ ._di {
63
+ font-size: 1.125rem;
64
+ }
65
+
66
+ ._dj {
67
+ font-size: 1.375rem;
68
+ }
69
+
70
+ ._dn {
71
+ font-size: 1.75rem;
72
+ }
73
+
74
+ ._ed {
75
+ font-variation-settings: "wght" 700;
76
+ font-synthesis-weight: none;
77
+ font-weight: 700;
78
+ }
79
+
80
+ ._fa {
81
+ line-height: 1.3;
82
+ }
83
+
84
+ .ao {
85
+ color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
86
+ }
87
+
88
+ .aj {
89
+ color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
90
+ }
91
+
92
+ ._Zd {
93
+ display: flex;
94
+ }
95
+
96
+ ._1d {
97
+ align-items: baseline;
98
+ }
99
+
100
+ .C-10cd9hn {
101
+ padding-inline-start: calc(var(--o) * 3 / 8 - 1px);
102
+ }
103
+
104
+ .D-10cd9hn {
105
+ padding-inline-end: calc(var(--o) * 3 / 8 - 1px);
106
+ }
107
+
108
+ .E-1dbqcch {
109
+ padding-top: calc((var(--o) - var(--u, 0px) - var(--v, 0px) - 1lh) / 2);
110
+ }
111
+
112
+ .F-1dbqcch {
113
+ padding-bottom: calc((var(--o) - var(--u, 0px) - var(--v, 0px) - 1lh) / 2);
114
+ }
115
+
116
+ .i-10cd9hn {
117
+ row-gap: calc(var(--o) * 3 / 8 - 1px);
118
+ }
119
+
120
+ .j-10cd9hn {
121
+ column-gap: calc(var(--o) * 3 / 8 - 1px);
122
+ }
123
+
124
+ .o-375tou {
125
+ min-height: var(--o);
126
+ }
127
+
128
+ .l4 {
129
+ width: 100%;
130
+ }
131
+
132
+ .ba {
133
+ background-color: #0000;
134
+ }
135
+
136
+ .b_____k {
137
+ background-color: #00000017;
138
+ }
139
+
140
+ .u-375tp0 {
141
+ border-top-width: var(--u);
142
+ }
143
+
144
+ .v-375tp1 {
145
+ border-bottom-width: var(--v);
146
+ }
147
+
148
+ .sa {
149
+ border-inline-start-width: 0;
150
+ }
151
+
152
+ .ta {
153
+ border-inline-end-width: 0;
154
+ }
155
+
156
+ ._va {
157
+ border-start-start-radius: 0;
158
+ }
159
+
160
+ ._vh {
161
+ border-start-start-radius: .571429em;
162
+ }
163
+
164
+ ._wa {
165
+ border-start-end-radius: 0;
166
+ }
167
+
168
+ ._wh {
169
+ border-start-end-radius: .571429em;
170
+ }
171
+
172
+ ._xa {
173
+ border-end-start-radius: 0;
174
+ }
175
+
176
+ ._xh {
177
+ border-end-start-radius: .571429em;
178
+ }
179
+
180
+ ._ya {
181
+ border-end-end-radius: 0;
182
+ }
183
+
184
+ ._yh {
185
+ border-end-end-radius: .571429em;
186
+ }
187
+
188
+ ._ja {
189
+ text-align: start;
190
+ }
191
+
192
+ .__R-yksgrp {
193
+ -webkit-tap-highlight-color: #0000;
194
+ }
195
+
196
+ .-_375tou_o-m {
197
+ --o: 1.5rem;
198
+ }
199
+
200
+ .-_375tou_o-q {
201
+ --o: 2rem;
202
+ }
203
+
204
+ .-_375tou_o-r {
205
+ --o: 2.5rem;
206
+ }
207
+
208
+ .-_375tou_o-x {
209
+ --o: 3rem;
210
+ }
211
+
212
+ .-_375tou_o-z {
213
+ --o: 3.5rem;
214
+ }
215
+
216
+ .-_375tou_o-B {
217
+ --o: 4rem;
218
+ }
219
+
220
+ .-_375tp0_u-a {
221
+ --u: 0px;
222
+ }
223
+
224
+ .-_375tp1_v-a {
225
+ --v: 0px;
226
+ }
227
+
228
+ .R-375xa6 {
229
+ rotate: 180deg;
230
+ }
231
+
232
+ .R-3hn0u {
233
+ rotate: 90deg;
234
+ }
235
+
236
+ ._Q-37j0s6 {
237
+ transition-duration: .1s;
238
+ }
239
+
240
+ .-rwx0fg_e-b {
241
+ --iconPrimary: currentColor;
242
+ }
243
+
244
+ ._8-3t1x {
245
+ flex-shrink: 0;
246
+ }
247
+
248
+ ._ca {
249
+ font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
250
+ }
251
+
252
+ ._dg {
253
+ font-size: 1rem;
254
+ }
255
+
256
+ ._eb {
257
+ font-variation-settings: "wght" 400;
258
+ font-synthesis-weight: none;
259
+ font-weight: 400;
260
+ }
261
+
262
+ ._fb {
263
+ line-height: 1.5;
264
+ }
265
+
266
+ .an {
267
+ color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
268
+ }
269
+
270
+ .Ed {
271
+ padding-top: .5rem;
272
+ }
273
+
274
+ .Ff {
275
+ padding-bottom: 1rem;
276
+ }
277
+
278
+ .Cd {
279
+ padding-inline-start: .5rem;
280
+ }
281
+
282
+ .C-1ch0ogp {
283
+ padding-inline-start: .5625rem;
284
+ }
285
+
286
+ .Ce {
287
+ padding-inline-start: .75rem;
288
+ }
289
+
290
+ .C-1p15uv3 {
291
+ padding-inline-start: .9375rem;
292
+ }
293
+
294
+ .Dd {
295
+ padding-inline-end: .5rem;
296
+ }
297
+
298
+ .D-1ch0ogp {
299
+ padding-inline-end: .5625rem;
300
+ }
301
+
302
+ .De {
303
+ padding-inline-end: .75rem;
304
+ }
305
+
306
+ .D-1p15uv3 {
307
+ padding-inline-end: .9375rem;
308
+ }
309
+ }
310
+
311
+ @layer _.b {
312
+ .v-uamghwb:last-child {
313
+ border-bottom-width: 1px;
314
+ }
315
+
316
+ .v-uamghwa:last-child {
317
+ border-bottom-width: 0;
318
+ }
319
+
320
+ ._f-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
321
+ line-height: 1.5;
322
+ }
323
+
324
+ ._c-enzrfpb:lang(ar) {
325
+ font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
326
+ }
327
+
328
+ ._f-1x99dloc:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
329
+ line-height: 1.7;
330
+ }
331
+ }
332
+
333
+ @layer UNSAFE_overrides;
334
+
335
+ @layer _.b.b {
336
+ @media not ((hover: hover) and (pointer: fine)) {
337
+ .qb-z005a2 {
338
+ min-width: 15.625rem;
339
+ }
340
+
341
+ ._dbj {
342
+ font-size: 1.375rem;
343
+ }
344
+
345
+ ._dbm {
346
+ font-size: 1.6875rem;
347
+ }
348
+
349
+ ._dbo {
350
+ font-size: 2.125rem;
351
+ }
352
+
353
+ .-_375tou_o-bn {
354
+ --o: 1.875rem;
355
+ }
356
+
357
+ .-_375tou_o-br {
358
+ --o: 2.5rem;
359
+ }
360
+
361
+ .-_375tou_o-bu {
362
+ --o: 3.125rem;
363
+ }
364
+
365
+ .-_375tou_o-by {
366
+ --o: 3.75rem;
367
+ }
368
+
369
+ .-_375tou_o-bA {
370
+ --o: 4.375rem;
371
+ }
372
+
373
+ .-_375tou_o-bC {
374
+ --o: 5rem;
375
+ }
376
+
377
+ ._dbh {
378
+ font-size: 1.1875rem;
379
+ }
380
+
381
+ .Cb-1itkwgp {
382
+ padding-inline-start: .703125rem;
383
+ }
384
+
385
+ .Cb-yk4pb9 {
386
+ padding-inline-start: 1.17188rem;
387
+ }
388
+
389
+ .Db-1itkwgp {
390
+ padding-inline-end: .703125rem;
391
+ }
392
+
393
+ .Db-yk4pb9 {
394
+ padding-inline-end: 1.17188rem;
395
+ }
396
+ }
397
+ }
398
+
399
+ @layer _.c {
400
+ ._c-enzwzjc:lang(he) {
401
+ font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
402
+ }
403
+ }
404
+
405
+ @layer _.d {
406
+ ._c-enzykdd:lang(ja) {
407
+ font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
408
+ }
409
+ }
410
+
411
+ @layer _.e {
412
+ ._c-enzzrge:lang(ko) {
413
+ font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
414
+ }
415
+ }
416
+
417
+ @layer _.f {
418
+ ._c-eo0c6sf:lang(zh) {
419
+ font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
420
+ }
421
+ }
422
+
423
+ @layer _.g {
424
+ ._c-1uotwbwg:lang(zh-hant) {
425
+ font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
426
+ }
427
+ }
428
+
429
+ @layer _.h {
430
+ ._c-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
431
+ font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
432
+ }
433
+ }
434
+
435
+ @layer _.b.a {
436
+ @media (forced-colors: active) {
437
+ .da_____z {
438
+ outline-color: highlight;
439
+ }
440
+ }
441
+ }
442
+
443
+ .\.:not(#a#b) {
444
+ all: revert-layer;
445
+ }
446
+ /*# sourceMappingURL=Disclosure.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"AC2CmB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAmEE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAIA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA4EC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAsDF;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzMD;EAAA;;;;EAAA;;;;EAuEE;;;;EAkID;;;;EAAA;;;;;AAzMD;;AAAA;EAAA;IAAA;;;;IAuEE;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAkID;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAlIC;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AA4EC","sources":["af82a6f8008c749b","packages/@react-spectrum/s2/src/Disclosure.tsx"],"sourcesContent":["@import \"02b9b02b69a441b2\";\n@import \"80d1cf6aba9342e9\";\n@import \"d47c144c912b2c65\";\n@import \"54c3947845455457\";\n@import \"47e48706d70658de\";\n","/*\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 */\n\nimport {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue, forwardRefType} from '@react-types/shared';\nimport {Button, ContextValue, DisclosureStateContext, Heading, Provider, Disclosure as RACDisclosure, DisclosurePanel as RACDisclosurePanel, DisclosurePanelProps as RACDisclosurePanelProps, DisclosureProps as RACDisclosureProps, useLocale, useSlottedContext} from 'react-aria-components';\nimport {CenterBaseline} from './CenterBaseline';\nimport {centerPadding, focusRing, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport React, {createContext, forwardRef, ReactElement, useContext} from 'react';\nimport {size as sizeValue, style} from '../style/spectrum-theme' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface DisclosureProps extends RACDisclosureProps, StyleProps, DOMProps {\n /**\n * The size of the disclosure.\n * @default \"M\"\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of space between the disclosures.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular' | 'spacious',\n /** Whether the disclosure should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** The contents of the disclosure, consisting of an DisclosureHeader and DisclosurePanel. */\n children: [ReactElement<DisclosureHeaderProps>, ReactElement<DisclosurePanelProps>]\n}\n\nexport const DisclosureContext = createContext<ContextValue<Omit<DisclosureProps, 'children'>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst disclosure = style({\n color: 'heading',\n borderTopWidth: {\n default: 1,\n isQuiet: 0\n },\n borderBottomWidth: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\n },\n borderStartWidth: 0,\n borderEndWidth: 0,\n borderStyle: 'solid',\n borderColor: 'gray-200',\n minWidth: sizeValue(200)\n}, getAllowedOverrides());\n\nfunction Disclosure(props: DisclosureProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, DisclosureContext);\n let {\n size = 'M',\n density = 'regular',\n isQuiet, isDisabled\n } = props;\n let domRef = useDOMRef(ref);\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density, isDisabled}]\n ]}>\n <RACDisclosure\n {...domProps}\n isDisabled={isDisabled}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet}, props.styles)}>\n {props.children}\n </RACDisclosure>\n </Provider>\n );\n}\n\n/**\n * A disclosure is a collapsible section of content. It is composed of a a header with a heading and trigger button, and a panel that contains the content.\n */\nlet _Disclosure = /*#__PURE__*/ (forwardRef as forwardRefType)(Disclosure);\nexport {_Disclosure as Disclosure};\n\nexport interface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0\n});\n\nconst buttonStyles = style({\n ...focusRing(),\n outlineOffset: -2,\n font: 'heading',\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n fontWeight: 'bold',\n fontSize: {\n size: {\n S: 'heading-xs',\n M: 'heading-sm',\n L: 'heading',\n XL: 'heading-lg'\n }\n },\n lineHeight: 'ui',\n display: 'flex',\n alignItems: 'baseline',\n paddingX: '[calc(self(minHeight) * 3/8 - 1px)]',\n paddingY: centerPadding(),\n gap: '[calc(self(minHeight) * 3/8 - 1px)]',\n minHeight: {\n // compact is equivalent to 'control', but other densities have more padding.\n size: {\n S: {\n density: {\n compact: 24,\n regular: 32,\n spacious: 40\n }\n },\n M: {\n density: {\n compact: 32,\n regular: 40,\n spacious: 48\n }\n },\n L: {\n density: {\n compact: 40,\n regular: 48,\n spacious: 56\n }\n },\n XL: {\n density: {\n compact: 48,\n regular: 56,\n spacious: 64\n }\n }\n }\n },\n width: 'full',\n backgroundColor: {\n default: 'transparent',\n isFocusVisible: 'transparent-black-100',\n isHovered: 'transparent-black-100'\n },\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet hover.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: {\n isHovered: 'control',\n isFocusVisible: 'control'\n }\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transitionDuration: '100ms',\n transitionProperty: 'rotate',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nfunction DisclosureHeader(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n level = 3,\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n const domProps = filterDOMProps(otherProps);\n let {direction} = useLocale();\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let {size, density, isQuiet} = useSlottedContext(DisclosureContext)!;\n let isRTL = direction === 'rtl';\n return (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={({isHovered, isFocused, isFocusVisible, isDisabled}) => buttonStyles({size, isHovered, isFocused, isFocusVisible, density, isQuiet, isDisabled})} slot=\"trigger\">\n <CenterBaseline>\n <Chevron size={size} className={chevronStyles({isExpanded, isRTL})} aria-hidden=\"true\" />\n </CenterBaseline>\n {props.children}\n </Button>\n </Heading>\n );\n}\n\n/**\n * A header for a disclosure. Contains a heading and a trigger button to expand/collapse the panel.\n */\nlet _DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeader);\nexport {_DisclosureHeader as DisclosureHeader};\n\nexport interface DisclosurePanelProps extends RACDisclosurePanelProps, UnsafeStyles, DOMProps, AriaLabelingProps {\n children: React.ReactNode\n}\n\nconst panelStyles = style({\n font: 'body',\n paddingTop: {\n isExpanded: 8\n },\n paddingBottom: {\n isExpanded: 16\n },\n paddingX: {\n isExpanded: {\n size: {\n S: 8,\n M: sizeValue(9),\n L: 12,\n XL: sizeValue(15)\n }\n }\n }\n});\n\nfunction DisclosurePanel(props: DisclosurePanelProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_style,\n UNSAFE_className = '',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n let {size} = useSlottedContext(DisclosureContext)!;\n let {isExpanded} = useContext(DisclosureStateContext)!;\n let panelRef = useDOMRef(ref);\n return (\n <RACDisclosurePanel\n {...domProps}\n ref={panelRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + panelStyles({size, isExpanded})}>\n {props.children}\n </RACDisclosurePanel>\n );\n}\n\n/**\n * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.\n */\nlet _DisclosurePanel = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosurePanel);\nexport {_DisclosurePanel as DisclosurePanel};\n\n"],"names":[],"version":3,"file":"Disclosure.css.map"}