@react-spectrum/s2 3.0.0-nightly-4baa1b08e-241029 → 3.0.0-nightly-07431f4b1-241030
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/ActionButton.cjs +10 -32
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +20 -60
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +10 -32
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/Avatar.cjs +2 -4
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css +4 -16
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs +2 -4
- package/dist/Avatar.mjs.map +1 -1
- package/dist/Badge.cjs +5 -16
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +10 -30
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +5 -16
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +12 -41
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +38 -86
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +12 -41
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +19 -59
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +37 -113
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +19 -59
- package/dist/Button.mjs.map +1 -1
- package/dist/Card.cjs +27 -67
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +42 -117
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +27 -67
- package/dist/Card.mjs.map +1 -1
- package/dist/Checkbox.cjs +9 -27
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +17 -49
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +9 -27
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +5 -16
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +10 -30
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +5 -16
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/ClearButton.cjs +6 -17
- package/dist/ClearButton.cjs.map +1 -1
- package/dist/ClearButton.css +11 -35
- package/dist/ClearButton.css.map +1 -1
- package/dist/ClearButton.mjs +6 -17
- package/dist/ClearButton.mjs.map +1 -1
- package/dist/CloseButton.cjs +10 -32
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css +20 -64
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs +10 -32
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs +4 -16
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +8 -28
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +4 -16
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +5 -16
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +10 -30
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +5 -16
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +5 -15
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +10 -30
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +5 -15
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +6 -17
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +34 -50
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +6 -17
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +8 -26
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +16 -52
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +8 -26
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +6 -16
- package/dist/ColorSwatchPicker.cjs.map +1 -1
- package/dist/ColorSwatchPicker.css +8 -28
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +6 -16
- package/dist/ColorSwatchPicker.mjs.map +1 -1
- package/dist/ComboBox.cjs +22 -71
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +64 -152
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +22 -71
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +1 -1
- package/dist/ContextualHelp.css +2 -6
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs +1 -1
- package/dist/Dialog.cjs +2 -2
- package/dist/Dialog.css +2 -2
- package/dist/Dialog.mjs +2 -2
- package/dist/Disclosure.cjs +22 -61
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +47 -91
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +22 -61
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/DropZone.cjs +2 -4
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +4 -16
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +2 -4
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +16 -47
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +31 -95
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +16 -47
- package/dist/Field.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +6 -20
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css +10 -24
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs +6 -20
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs +2 -2
- package/dist/Image.css +2 -2
- package/dist/Image.mjs +2 -2
- package/dist/InlineAlert.cjs +2 -5
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +11 -15
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +2 -5
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Menu.cjs +22 -67
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +32 -96
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +22 -67
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +22 -68
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +63 -139
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +22 -68
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +2 -2
- package/dist/Modal.css +2 -2
- package/dist/Modal.mjs +2 -2
- package/dist/NumberField.cjs +23 -71
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +63 -146
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +23 -71
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +23 -67
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +50 -130
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +23 -67
- package/dist/Picker.mjs.map +1 -1
- package/dist/ProgressBar.cjs +23 -69
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +64 -140
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +23 -69
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +6 -20
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +12 -40
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +6 -20
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.css +7 -0
- package/dist/Provider.css.map +1 -1
- package/dist/Radio.cjs +8 -26
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +16 -48
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +8 -26
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +5 -16
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +10 -30
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +5 -16
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/SearchField.cjs +5 -16
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +10 -30
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +5 -16
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +8 -14
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +9 -29
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +8 -14
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +63 -196
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +61 -181
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +63 -196
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +9 -27
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css +17 -49
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs +9 -27
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs +6 -15
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +10 -26
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +6 -15
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +42 -86
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +65 -129
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +42 -86
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +4 -15
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +18 -34
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +4 -15
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TagGroup.cjs +14 -37
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +23 -67
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +14 -37
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +11 -34
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +22 -66
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +11 -34
- package/dist/TextField.mjs.map +1 -1
- package/dist/Tooltip.cjs +2 -4
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +4 -12
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +2 -4
- package/dist/Tooltip.mjs.map +1 -1
- package/package.json +17 -17
- package/page.css +7 -0
- package/src/page.macro.ts +11 -0
- package/style/dist/spectrum-theme.cjs +2 -8
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +2 -8
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +1 -4
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +4 -4
package/dist/Disclosure.css
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
border-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.q-
|
|
27
|
-
min-width: 12.5rem;
|
|
26
|
+
.q-1efr0vf {
|
|
27
|
+
min-width: calc(12.5rem * var(--s2-scale));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.Aa {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
min-height: var(--o);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.
|
|
136
|
+
.lG {
|
|
137
137
|
width: 100%;
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -205,28 +205,28 @@
|
|
|
205
205
|
-webkit-tap-highlight-color: #0000;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.-_375tou_o-
|
|
209
|
-
--o: 1.5rem;
|
|
208
|
+
.-_375tou_o-h {
|
|
209
|
+
--o: calc(1.5rem * var(--s2-scale));
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
.-_375tou_o-
|
|
213
|
-
--o: 2rem;
|
|
212
|
+
.-_375tou_o-j {
|
|
213
|
+
--o: calc(2rem * var(--s2-scale));
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
.-_375tou_o-
|
|
217
|
-
--o: 2.5rem;
|
|
216
|
+
.-_375tou_o-l {
|
|
217
|
+
--o: calc(2.5rem * var(--s2-scale));
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.-_375tou_o-
|
|
221
|
-
--o: 3rem;
|
|
220
|
+
.-_375tou_o-n {
|
|
221
|
+
--o: calc(3rem * var(--s2-scale));
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
.-_375tou_o-
|
|
225
|
-
--o: 3.5rem;
|
|
224
|
+
.-_375tou_o-o {
|
|
225
|
+
--o: calc(3.5rem * var(--s2-scale));
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.-_375tou_o-
|
|
229
|
-
--o: 4rem;
|
|
228
|
+
.-_375tou_o-p {
|
|
229
|
+
--o: calc(4rem * var(--s2-scale));
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.-_375tp0_u-a {
|
|
@@ -315,32 +315,32 @@
|
|
|
315
315
|
padding-inline-start: .5rem;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
.C-
|
|
319
|
-
padding-inline-start: .5625rem;
|
|
318
|
+
.C-1dtpt05 {
|
|
319
|
+
padding-inline-start: calc(.5625rem * var(--s2-scale));
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
.Ce {
|
|
323
323
|
padding-inline-start: .75rem;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
.C-
|
|
327
|
-
padding-inline-start: .9375rem;
|
|
326
|
+
.C-wukrgb {
|
|
327
|
+
padding-inline-start: calc(.9375rem * var(--s2-scale));
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
.Dd {
|
|
331
331
|
padding-inline-end: .5rem;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
.D-
|
|
335
|
-
padding-inline-end: .5625rem;
|
|
334
|
+
.D-1dtpt05 {
|
|
335
|
+
padding-inline-end: calc(.5625rem * var(--s2-scale));
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
.De {
|
|
339
339
|
padding-inline-end: .75rem;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
.D-
|
|
343
|
-
padding-inline-end: .9375rem;
|
|
342
|
+
.D-wukrgb {
|
|
343
|
+
padding-inline-end: calc(.9375rem * var(--s2-scale));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
|
|
@@ -368,74 +368,6 @@
|
|
|
368
368
|
|
|
369
369
|
@layer UNSAFE_overrides;
|
|
370
370
|
|
|
371
|
-
@layer _.b.b {
|
|
372
|
-
@media not ((hover: hover) and (pointer: fine)) {
|
|
373
|
-
.qb-z005a2 {
|
|
374
|
-
min-width: 15.625rem;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
._dbj {
|
|
378
|
-
font-size: 1.375rem;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
._dbl {
|
|
382
|
-
font-size: 1.5rem;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
._dbm {
|
|
386
|
-
font-size: 1.6875rem;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
._dbo {
|
|
390
|
-
font-size: 2.125rem;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.-_375tou_o-bn {
|
|
394
|
-
--o: 1.875rem;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.-_375tou_o-br {
|
|
398
|
-
--o: 2.5rem;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.-_375tou_o-bu {
|
|
402
|
-
--o: 3.125rem;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
.-_375tou_o-by {
|
|
406
|
-
--o: 3.75rem;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.-_375tou_o-bA {
|
|
410
|
-
--o: 4.375rem;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.-_375tou_o-bC {
|
|
414
|
-
--o: 5rem;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
._dbh {
|
|
418
|
-
font-size: 1.1875rem;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
.Cb-1itkwgp {
|
|
422
|
-
padding-inline-start: .703125rem;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.Cb-yk4pb9 {
|
|
426
|
-
padding-inline-start: 1.17188rem;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.Db-1itkwgp {
|
|
430
|
-
padding-inline-end: .703125rem;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.Db-yk4pb9 {
|
|
434
|
-
padding-inline-end: 1.17188rem;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
|
|
439
371
|
@layer _.c {
|
|
440
372
|
._c-enzwzjc:lang(he) {
|
|
441
373
|
font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
@@ -480,6 +412,30 @@
|
|
|
480
412
|
}
|
|
481
413
|
}
|
|
482
414
|
|
|
415
|
+
@layer _.b.b {
|
|
416
|
+
@media not ((hover: hover) and (pointer: fine)) {
|
|
417
|
+
._dbj {
|
|
418
|
+
font-size: 1.375rem;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
._dbl {
|
|
422
|
+
font-size: 1.5rem;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
._dbm {
|
|
426
|
+
font-size: 1.6875rem;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
._dbo {
|
|
430
|
+
font-size: 2.125rem;
|
|
431
|
+
}
|
|
432
|
+
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IAAA;;;;IAAA;;;;IAAA;;;;IAwLD;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAxLC;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AA2EC","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@import \"879f5cdc449bf13e\";\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 {ActionButtonContext} from './ActionButton';\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, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, size as sizeValue, style} from '../style' with { type: 'macro' };\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children'>, StyleProps {\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: ReactNode\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: 1,\n isQuiet: 0,\n isInGroup: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\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,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let isInGroup = useContext(DisclosureContext) !== null;\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density}]\n ]}>\n <RACDisclosure\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet, isInGroup}, 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 = forwardRef(Disclosure);\nexport {_Disclosure as Disclosure};\n\nexport interface DisclosureTitleProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\ninterface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0,\n flexGrow: 1\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: lightDark('transparent-black-100', 'transparent-white-100'),\n isHovered: lightDark('transparent-black-100', 'transparent-white-100'),\n isPressed: lightDark('transparent-black-300', 'transparent-white-300')\n },\n transition: 'default',\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: 'control'\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transition: 'default',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nconst InternalDisclosureHeader = createContext<{} | null>(null);\n\nfunction DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_className,\n UNSAFE_style,\n children\n } = props;\n let domRef = useDOMRef(ref);\n let {size, isQuiet, density} = useSlottedContext(DisclosureContext)!;\n\n let mapSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n };\n\n // maps to one size smaller in the compact density to ensure there is space between the top and bottom of the action button and container\n let newSize : 'XS' | 'S' | 'M' | 'L' | 'XL' | undefined = size;\n if (density === 'compact') {\n newSize = mapSize[size ?? 'M'] as 'XS' | 'S' | 'M' | 'L';\n }\n\n return (\n <Provider\n values={[\n [ActionButtonContext, {size: newSize, isQuiet}],\n [InternalDisclosureHeader, {}]\n ]}>\n <div\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + style({display: 'flex', alignItems: 'center', gap: 4})}\n ref={domRef}>\n {children}\n </div>\n </Provider>\n );\n}\n\n/**\n * A wrapper element for the disclosure title that can contain other elements not part of the trigger.\n */\nexport const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeaderWithForwardRef);\n\nfunction DisclosureTitle(props: DisclosureTitleProps, 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\n let buttonTrigger = (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={(renderProps) => buttonStyles({...renderProps, size, density, isQuiet})} 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 let ctx = useContext(InternalDisclosureHeader);\n if (ctx) {\n return buttonTrigger;\n }\n\n return (\n <DisclosureHeader>\n {buttonTrigger}\n </DisclosureHeader>\n );\n}\n\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nlet _DisclosureTitle = forwardRef(DisclosureTitle);\nexport {_DisclosureTitle as DisclosureTitle};\n\nexport interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, 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 = forwardRef(DisclosurePanel);\nexport {_DisclosurePanel as DisclosurePanel};\n\n"],"names":[],"version":3,"file":"Disclosure.css.map"}
|
|
1
|
+
{"mappings":"AC2CmB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAyEE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAKA;;;;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;;;;EAAA;;;;EA2EC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CwB;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgE1B;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAtQD;EAAA;;;;EAAA;;;;EA8EE;;;;EAwLD;;;;EAAA;;;;;AAtQD;;AA8EE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAwLD;;;;;;AA7GE","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@import \"879f5cdc449bf13e\";\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 {ActionButtonContext} from './ActionButton';\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, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, size as sizeValue, style} from '../style' with { type: 'macro' };\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children'>, StyleProps {\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: ReactNode\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: 1,\n isQuiet: 0,\n isInGroup: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\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,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let isInGroup = useContext(DisclosureContext) !== null;\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density}]\n ]}>\n <RACDisclosure\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet, isInGroup}, 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 = forwardRef(Disclosure);\nexport {_Disclosure as Disclosure};\n\nexport interface DisclosureTitleProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\ninterface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0,\n flexGrow: 1\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: lightDark('transparent-black-100', 'transparent-white-100'),\n isHovered: lightDark('transparent-black-100', 'transparent-white-100'),\n isPressed: lightDark('transparent-black-300', 'transparent-white-300')\n },\n transition: 'default',\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: 'control'\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transition: 'default',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nconst InternalDisclosureHeader = createContext<{} | null>(null);\n\nfunction DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_className,\n UNSAFE_style,\n children\n } = props;\n let domRef = useDOMRef(ref);\n let {size, isQuiet, density} = useSlottedContext(DisclosureContext)!;\n\n let mapSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n };\n\n // maps to one size smaller in the compact density to ensure there is space between the top and bottom of the action button and container\n let newSize : 'XS' | 'S' | 'M' | 'L' | 'XL' | undefined = size;\n if (density === 'compact') {\n newSize = mapSize[size ?? 'M'] as 'XS' | 'S' | 'M' | 'L';\n }\n\n return (\n <Provider\n values={[\n [ActionButtonContext, {size: newSize, isQuiet}],\n [InternalDisclosureHeader, {}]\n ]}>\n <div\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + style({display: 'flex', alignItems: 'center', gap: 4})}\n ref={domRef}>\n {children}\n </div>\n </Provider>\n );\n}\n\n/**\n * A wrapper element for the disclosure title that can contain other elements not part of the trigger.\n */\nexport const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeaderWithForwardRef);\n\nfunction DisclosureTitle(props: DisclosureTitleProps, 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\n let buttonTrigger = (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={(renderProps) => buttonStyles({...renderProps, size, density, isQuiet})} 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 let ctx = useContext(InternalDisclosureHeader);\n if (ctx) {\n return buttonTrigger;\n }\n\n return (\n <DisclosureHeader>\n {buttonTrigger}\n </DisclosureHeader>\n );\n}\n\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nlet _DisclosureTitle = forwardRef(DisclosureTitle);\nexport {_DisclosureTitle as DisclosureTitle};\n\nexport interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, 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 = forwardRef(DisclosurePanel);\nexport {_DisclosurePanel as DisclosurePanel};\n\n"],"names":[],"version":3,"file":"Disclosure.css.map"}
|
package/dist/Disclosure.mjs
CHANGED
|
@@ -48,10 +48,7 @@ const $cf1d656285911959$var$disclosure = function anonymous(props, overrides) {
|
|
|
48
48
|
rules += ' ta';
|
|
49
49
|
rules += ' wa';
|
|
50
50
|
rules += ' ch';
|
|
51
|
-
if (!$q)
|
|
52
|
-
rules += ' qb-z005a2';
|
|
53
|
-
rules += ' q-ffvo8f';
|
|
54
|
-
}
|
|
51
|
+
if (!$q) rules += ' q-1efr0vf';
|
|
55
52
|
return rules;
|
|
56
53
|
};
|
|
57
54
|
function $cf1d656285911959$var$Disclosure(props, ref) {
|
|
@@ -134,7 +131,7 @@ const $cf1d656285911959$var$buttonStyles = function anonymous(props) {
|
|
|
134
131
|
rules += ' i-10cd9hn';
|
|
135
132
|
rules += ' j-10cd9hn';
|
|
136
133
|
rules += ' o-375tou';
|
|
137
|
-
rules += '
|
|
134
|
+
rules += ' lG';
|
|
138
135
|
if (props.isPressed) rules += ' b-mufwl5';
|
|
139
136
|
else if (props.isHovered) rules += ' b-1tgz9bq';
|
|
140
137
|
else if (props.isFocusVisible) rules += ' b-1tgz9bq';
|
|
@@ -161,49 +158,21 @@ const $cf1d656285911959$var$buttonStyles = function anonymous(props) {
|
|
|
161
158
|
rules += ' _ja';
|
|
162
159
|
rules += ' __R-yksgrp';
|
|
163
160
|
if (props.size === "XL") {
|
|
164
|
-
if (props.density === "spacious")
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
} else if (props.density === "regular") {
|
|
168
|
-
rules += ' -_375tou_o-bA';
|
|
169
|
-
rules += ' -_375tou_o-z';
|
|
170
|
-
} else if (props.density === "compact") {
|
|
171
|
-
rules += ' -_375tou_o-by';
|
|
172
|
-
rules += ' -_375tou_o-x';
|
|
173
|
-
}
|
|
161
|
+
if (props.density === "spacious") rules += ' -_375tou_o-p';
|
|
162
|
+
else if (props.density === "regular") rules += ' -_375tou_o-o';
|
|
163
|
+
else if (props.density === "compact") rules += ' -_375tou_o-n';
|
|
174
164
|
} else if (props.size === "L") {
|
|
175
|
-
if (props.density === "spacious")
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
} else if (props.density === "regular") {
|
|
179
|
-
rules += ' -_375tou_o-by';
|
|
180
|
-
rules += ' -_375tou_o-x';
|
|
181
|
-
} else if (props.density === "compact") {
|
|
182
|
-
rules += ' -_375tou_o-bu';
|
|
183
|
-
rules += ' -_375tou_o-r';
|
|
184
|
-
}
|
|
165
|
+
if (props.density === "spacious") rules += ' -_375tou_o-o';
|
|
166
|
+
else if (props.density === "regular") rules += ' -_375tou_o-n';
|
|
167
|
+
else if (props.density === "compact") rules += ' -_375tou_o-l';
|
|
185
168
|
} else if (props.size === "M") {
|
|
186
|
-
if (props.density === "spacious")
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
} else if (props.density === "regular") {
|
|
190
|
-
rules += ' -_375tou_o-bu';
|
|
191
|
-
rules += ' -_375tou_o-r';
|
|
192
|
-
} else if (props.density === "compact") {
|
|
193
|
-
rules += ' -_375tou_o-br';
|
|
194
|
-
rules += ' -_375tou_o-q';
|
|
195
|
-
}
|
|
169
|
+
if (props.density === "spacious") rules += ' -_375tou_o-n';
|
|
170
|
+
else if (props.density === "regular") rules += ' -_375tou_o-l';
|
|
171
|
+
else if (props.density === "compact") rules += ' -_375tou_o-j';
|
|
196
172
|
} else if (props.size === "S") {
|
|
197
|
-
if (props.density === "spacious")
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
} else if (props.density === "regular") {
|
|
201
|
-
rules += ' -_375tou_o-br';
|
|
202
|
-
rules += ' -_375tou_o-q';
|
|
203
|
-
} else if (props.density === "compact") {
|
|
204
|
-
rules += ' -_375tou_o-bn';
|
|
205
|
-
rules += ' -_375tou_o-m';
|
|
206
|
-
}
|
|
173
|
+
if (props.density === "spacious") rules += ' -_375tou_o-l';
|
|
174
|
+
else if (props.density === "regular") rules += ' -_375tou_o-j';
|
|
175
|
+
else if (props.density === "compact") rules += ' -_375tou_o-h';
|
|
207
176
|
}
|
|
208
177
|
rules += ' -_375tp0_u-a';
|
|
209
178
|
rules += ' -_375tp1_v-a';
|
|
@@ -322,24 +291,16 @@ const $cf1d656285911959$var$panelStyles = function anonymous(props) {
|
|
|
322
291
|
if (props.isExpanded) rules += ' Ed';
|
|
323
292
|
if (props.isExpanded) rules += ' Ff';
|
|
324
293
|
if (props.isExpanded) {
|
|
325
|
-
if (props.size === "XL")
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
else if (props.size === "M") {
|
|
330
|
-
rules += ' Cb-1itkwgp';
|
|
331
|
-
rules += ' C-1ch0ogp';
|
|
332
|
-
} else if (props.size === "S") rules += ' Cd';
|
|
294
|
+
if (props.size === "XL") rules += ' C-wukrgb';
|
|
295
|
+
else if (props.size === "L") rules += ' Ce';
|
|
296
|
+
else if (props.size === "M") rules += ' C-1dtpt05';
|
|
297
|
+
else if (props.size === "S") rules += ' Cd';
|
|
333
298
|
}
|
|
334
299
|
if (props.isExpanded) {
|
|
335
|
-
if (props.size === "XL")
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
else if (props.size === "M") {
|
|
340
|
-
rules += ' Db-1itkwgp';
|
|
341
|
-
rules += ' D-1ch0ogp';
|
|
342
|
-
} else if (props.size === "S") rules += ' Dd';
|
|
300
|
+
if (props.size === "XL") rules += ' D-wukrgb';
|
|
301
|
+
else if (props.size === "L") rules += ' De';
|
|
302
|
+
else if (props.size === "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obe. 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 {ActionButtonContext} from './ActionButton';\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, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, size as sizeValue, style} from '../style' with { type: 'macro' };\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children'>, StyleProps {\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: ReactNode\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: 1,\n isQuiet: 0,\n isInGroup: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\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,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let isInGroup = useContext(DisclosureContext) !== null;\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density}]\n ]}>\n <RACDisclosure\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet, isInGroup}, 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 = forwardRef(Disclosure);\nexport {_Disclosure as Disclosure};\n\nexport interface DisclosureTitleProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\ninterface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0,\n flexGrow: 1\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: lightDark('transparent-black-100', 'transparent-white-100'),\n isHovered: lightDark('transparent-black-100', 'transparent-white-100'),\n isPressed: lightDark('transparent-black-300', 'transparent-white-300')\n },\n transition: 'default',\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: 'control'\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transition: 'default',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nconst InternalDisclosureHeader = createContext<{} | null>(null);\n\nfunction DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_className,\n UNSAFE_style,\n children\n } = props;\n let domRef = useDOMRef(ref);\n let {size, isQuiet, density} = useSlottedContext(DisclosureContext)!;\n\n let mapSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n };\n\n // maps to one size smaller in the compact density to ensure there is space between the top and bottom of the action button and container\n let newSize : 'XS' | 'S' | 'M' | 'L' | 'XL' | undefined = size;\n if (density === 'compact') {\n newSize = mapSize[size ?? 'M'] as 'XS' | 'S' | 'M' | 'L';\n }\n\n return (\n <Provider\n values={[\n [ActionButtonContext, {size: newSize, isQuiet}],\n [InternalDisclosureHeader, {}]\n ]}>\n <div\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + style({display: 'flex', alignItems: 'center', gap: 4})}\n ref={domRef}>\n {children}\n </div>\n </Provider>\n );\n}\n\n/**\n * A wrapper element for the disclosure title that can contain other elements not part of the trigger.\n */\nexport const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeaderWithForwardRef);\n\nfunction DisclosureTitle(props: DisclosureTitleProps, 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\n let buttonTrigger = (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={(renderProps) => buttonStyles({...renderProps, size, density, isQuiet})} 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 let ctx = useContext(InternalDisclosureHeader);\n if (ctx) {\n return buttonTrigger;\n }\n\n return (\n <DisclosureHeader>\n {buttonTrigger}\n </DisclosureHeader>\n );\n}\n\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nlet _DisclosureTitle = forwardRef(DisclosureTitle);\nexport {_DisclosureTitle as DisclosureTitle};\n\nexport interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, 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 = forwardRef(DisclosurePanel);\nexport {_DisclosurePanel as DisclosurePanel};\n\n"],"names":[],"version":3,"file":"Disclosure.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA+BM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAgF;AAE7H,MAAM;;;;;;;;;;;;;;;;;;;;;;AAwBN,SAAS,iCAAW,KAAsB,EAAE,GAA2B;IACrE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,cACP,UAAU,oBACV,OAAO,gBACP,YAAY,oBACZ,mBAAmB,IACpB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,YAAY,CAAA,GAAA,iBAAS,EAAE,+CAAuB;IAElD,qBACE,gBAAC,CAAA,GAAA,eAAO;QACN,QAAQ;YACN;gBAAC;gBAAmB;0BAAC;6BAAM;6BAAS;gBAAO;aAAE;SAC9C;kBACD,cAAA,gBAAC,CAAA,GAAA,iBAAY;YACV,GAAG,KAAK;YACT,KAAK;YACL,OAAO;YACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,iCAAW;yBAAC;2BAAS;YAAS,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AA,GAAA,gBAAQ,EAAE;IACzB,qBACE,gBAAC,CAAA,GAAA,sBAAiB;QACf,GAAG,QAAQ;QACZ,KAAK;QACL,OAAO;QACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,kCAAY;kBAAC;wBAAM;QAAU;kBAClE,MAAM,QAAQ;;AAGrB;AAEA;;CAEC,GACD,IAAI,0DAAmB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Disclosure.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 */\n\nimport {ActionButtonContext} from './ActionButton';\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, getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with { type: 'macro' };\nimport Chevron from '../ui-icons/Chevron';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, size as sizeValue, style} from '../style' with { type: 'macro' };\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DisclosureProps extends Omit<RACDisclosureProps, 'className' | 'style' | 'children'>, StyleProps {\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: ReactNode\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: 1,\n isQuiet: 0,\n isInGroup: {\n default: 0,\n ':last-child': {\n default: 1,\n isQuiet: 0\n }\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,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let isInGroup = useContext(DisclosureContext) !== null;\n\n return (\n <Provider\n values={[\n [DisclosureContext, {size, isQuiet, density}]\n ]}>\n <RACDisclosure\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + disclosure({isQuiet, isInGroup}, 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 = forwardRef(Disclosure);\nexport {_Disclosure as Disclosure};\n\nexport interface DisclosureTitleProps extends UnsafeStyles, DOMProps {\n /** The heading level of the disclosure header.\n * \n * @default 3\n */\n level?: number,\n /** The contents of the disclosure header. */\n children: React.ReactNode\n}\n\ninterface DisclosureHeaderProps extends UnsafeStyles, DOMProps {\n children: React.ReactNode\n}\n\nconst headingStyle = style({\n margin: 0,\n flexGrow: 1\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: lightDark('transparent-black-100', 'transparent-white-100'),\n isHovered: lightDark('transparent-black-100', 'transparent-white-100'),\n isPressed: lightDark('transparent-black-300', 'transparent-white-300')\n },\n transition: 'default',\n borderWidth: 0,\n borderRadius: {\n // Only rounded for keyboard focus and quiet.\n default: 'none',\n isFocusVisible: 'control',\n isQuiet: 'control'\n },\n textAlign: 'start',\n disableTapHighlight: true\n});\n\nconst chevronStyles = style({\n rotate: {\n isRTL: 180,\n isExpanded: 90\n },\n transition: 'default',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n flexShrink: 0\n});\n\nconst InternalDisclosureHeader = createContext<{} | null>(null);\n\nfunction DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRef<HTMLDivElement>) {\n let {\n UNSAFE_className,\n UNSAFE_style,\n children\n } = props;\n let domRef = useDOMRef(ref);\n let {size, isQuiet, density} = useSlottedContext(DisclosureContext)!;\n\n let mapSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n };\n\n // maps to one size smaller in the compact density to ensure there is space between the top and bottom of the action button and container\n let newSize : 'XS' | 'S' | 'M' | 'L' | 'XL' | undefined = size;\n if (density === 'compact') {\n newSize = mapSize[size ?? 'M'] as 'XS' | 'S' | 'M' | 'L';\n }\n\n return (\n <Provider\n values={[\n [ActionButtonContext, {size: newSize, isQuiet}],\n [InternalDisclosureHeader, {}]\n ]}>\n <div\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + style({display: 'flex', alignItems: 'center', gap: 4})}\n ref={domRef}>\n {children}\n </div>\n </Provider>\n );\n}\n\n/**\n * A wrapper element for the disclosure title that can contain other elements not part of the trigger.\n */\nexport const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)(DisclosureHeaderWithForwardRef);\n\nfunction DisclosureTitle(props: DisclosureTitleProps, 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\n let buttonTrigger = (\n <Heading\n {...domProps}\n level={level}\n ref={domRef}\n style={UNSAFE_style}\n className={(UNSAFE_className ?? '') + headingStyle}>\n <Button className={(renderProps) => buttonStyles({...renderProps, size, density, isQuiet})} 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 let ctx = useContext(InternalDisclosureHeader);\n if (ctx) {\n return buttonTrigger;\n }\n\n return (\n <DisclosureHeader>\n {buttonTrigger}\n </DisclosureHeader>\n );\n}\n\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nlet _DisclosureTitle = forwardRef(DisclosureTitle);\nexport {_DisclosureTitle as DisclosureTitle};\n\nexport interface DisclosurePanelProps extends Omit<RACDisclosurePanelProps, 'className' | 'style' | 'children'>, 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 = forwardRef(DisclosurePanel);\nexport {_DisclosurePanel as DisclosurePanel};\n\n"],"names":[],"version":3,"file":"Disclosure.mjs.map"}
|
package/dist/DropZone.cjs
CHANGED
|
@@ -88,8 +88,7 @@ const $797cda10ca96fc86$var$banner = function anonymous(props) {
|
|
|
88
88
|
rules += ' _1c';
|
|
89
89
|
rules += ' _2d';
|
|
90
90
|
rules += ' o-375tou';
|
|
91
|
-
rules += '
|
|
92
|
-
rules += ' rR';
|
|
91
|
+
rules += ' ry';
|
|
93
92
|
if (props.isPressed) rules += ' b_____F';
|
|
94
93
|
else if (props.isFocusVisible) rules += ' b_____F';
|
|
95
94
|
else if (props.isHovered) rules += ' b_____F';
|
|
@@ -104,8 +103,7 @@ const $797cda10ca96fc86$var$banner = function anonymous(props) {
|
|
|
104
103
|
rules += ' F-17c1d5h';
|
|
105
104
|
rules += ' C-17c1d5h';
|
|
106
105
|
rules += ' D-17c1d5h';
|
|
107
|
-
rules += ' -_375tou_o-
|
|
108
|
-
rules += ' -_375tou_o-k';
|
|
106
|
+
rules += ' -_375tou_o-g';
|
|
109
107
|
return rules;
|
|
110
108
|
};
|
|
111
109
|
function $797cda10ca96fc86$var$DropZone(props, ref) {
|
package/dist/DropZone.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyBM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyBM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBN,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,mCAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gCAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;wBAAA;kCACnG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gCAAC;wBAAI,WAAW,6BAAO;kCACrB,cAAA,gCAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF;AAEA;;CAEC,GACD,IAAI,2CAAY,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/DropZone.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 */\n\nimport {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style<DropZoneRenderProps>({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n maxWidth: 208,\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\nfunction DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner(renderProps)}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n}\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nlet _DropZone = /*#__PURE__*/ forwardRef(DropZone);\nexport {_DropZone as DropZone};\n"],"names":[],"version":3,"file":"DropZone.cjs.map"}
|
package/dist/DropZone.css
CHANGED
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
min-height: var(--o);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
119
|
-
max-width: 13rem;
|
|
118
|
+
.ry {
|
|
119
|
+
max-width: calc(13rem * var(--s2-scale));
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.b_____E {
|
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
padding-inline-end: calc((var(--o)) / 1.5);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
.-_375tou_o-
|
|
173
|
-
--o: 1.25rem;
|
|
172
|
+
.-_375tou_o-g {
|
|
173
|
+
--o: calc(1.25rem * var(--s2-scale));
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -221,16 +221,4 @@
|
|
|
221
221
|
.\.:not(#a#b) {
|
|
222
222
|
all: revert-layer;
|
|
223
223
|
}
|
|
224
|
-
|
|
225
|
-
@layer _.b.b {
|
|
226
|
-
@media not ((hover: hover) and (pointer: fine)) {
|
|
227
|
-
.rbS {
|
|
228
|
-
max-width: 16.25rem;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.-_375tou_o-bl {
|
|
232
|
-
--o: 1.5625rem;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
224
|
/*# sourceMappingURL=DropZone.css.map */
|
package/dist/DropZone.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACqCiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAxBE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAwBF
|
|
1
|
+
{"mappings":"ACqCiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAxBE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAwBF","sources":["1c1855bb3a6aeea4","packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["@import \"ab564bdb126b567b\";\n@import \"d5049ba06c2da1c6\";\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 {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style<DropZoneRenderProps>({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n maxWidth: 208,\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\nfunction DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner(renderProps)}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n}\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nlet _DropZone = /*#__PURE__*/ forwardRef(DropZone);\nexport {_DropZone as DropZone};\n"],"names":[],"version":3,"file":"DropZone.css.map"}
|
package/dist/DropZone.mjs
CHANGED
|
@@ -81,8 +81,7 @@ const $fb6e45fba2483f65$var$banner = function anonymous(props) {
|
|
|
81
81
|
rules += ' _1c';
|
|
82
82
|
rules += ' _2d';
|
|
83
83
|
rules += ' o-375tou';
|
|
84
|
-
rules += '
|
|
85
|
-
rules += ' rR';
|
|
84
|
+
rules += ' ry';
|
|
86
85
|
if (props.isPressed) rules += ' b_____F';
|
|
87
86
|
else if (props.isFocusVisible) rules += ' b_____F';
|
|
88
87
|
else if (props.isHovered) rules += ' b_____F';
|
|
@@ -97,8 +96,7 @@ const $fb6e45fba2483f65$var$banner = function anonymous(props) {
|
|
|
97
96
|
rules += ' F-17c1d5h';
|
|
98
97
|
rules += ' C-17c1d5h';
|
|
99
98
|
rules += ' D-17c1d5h';
|
|
100
|
-
rules += ' -_375tou_o-
|
|
101
|
-
rules += ' -_375tou_o-k';
|
|
99
|
+
rules += ' -_375tou_o-g';
|
|
102
100
|
return rules;
|
|
103
101
|
};
|
|
104
102
|
function $fb6e45fba2483f65$var$DropZone(props, ref) {
|
package/dist/DropZone.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyBM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyBM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBN,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,eAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gBAAC,CAAA,GAAA,yCAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;wBAAA;kCACnG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gBAAC;wBAAI,WAAW,6BAAO;kCACrB,cAAA,gBAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF;AAEA;;CAEC,GACD,IAAI,2CAAY,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/DropZone.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 */\n\nimport {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style<DropZoneRenderProps>({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n maxWidth: 208,\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\nfunction DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner(renderProps)}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n}\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nlet _DropZone = /*#__PURE__*/ forwardRef(DropZone);\nexport {_DropZone as DropZone};\n"],"names":[],"version":3,"file":"DropZone.mjs.map"}
|