@react-spectrum/s2 3.0.0-nightly-e228ed814-250129 → 3.0.0-nightly-016590a4a-250131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +3 -3
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.mjs +3 -3
- package/dist/ActionBar.cjs +47 -47
- package/dist/ActionBar.css +51 -51
- package/dist/ActionBar.mjs +47 -47
- package/dist/ActionButton.cjs +97 -97
- package/dist/ActionButton.css +96 -96
- package/dist/ActionButton.mjs +97 -97
- package/dist/ActionButtonGroup.cjs +11 -11
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +11 -11
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +14 -14
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +100 -100
- package/dist/AvatarGroup.css +34 -34
- package/dist/AvatarGroup.mjs +100 -100
- package/dist/Badge.cjs +92 -67
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +168 -92
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +92 -67
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +115 -115
- package/dist/Breadcrumbs.css +89 -89
- package/dist/Breadcrumbs.mjs +115 -115
- package/dist/Button.cjs +236 -152
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +309 -165
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +236 -152
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +19 -19
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +19 -19
- package/dist/Card.cjs +264 -261
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +210 -198
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +264 -261
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +15 -15
- package/dist/CardView.css +18 -18
- package/dist/CardView.mjs +15 -15
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +124 -73
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +201 -81
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +124 -73
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +49 -49
- package/dist/CheckboxGroup.css +41 -41
- package/dist/CheckboxGroup.mjs +49 -49
- package/dist/ClearButton.cjs +15 -15
- package/dist/ClearButton.css +17 -17
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.cjs +35 -35
- package/dist/CloseButton.css +33 -33
- package/dist/CloseButton.mjs +35 -35
- package/dist/ColorArea.cjs +22 -22
- package/dist/ColorArea.css +15 -15
- package/dist/ColorArea.mjs +22 -22
- package/dist/ColorField.cjs +38 -38
- package/dist/ColorField.css +32 -32
- package/dist/ColorField.mjs +38 -38
- package/dist/ColorHandle.cjs +27 -21
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +93 -45
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +27 -21
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +52 -52
- package/dist/ColorSlider.css +51 -51
- package/dist/ColorSlider.mjs +52 -52
- package/dist/ColorSwatch.cjs +27 -24
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +41 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +27 -24
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +23 -23
- package/dist/ColorSwatchPicker.css +60 -48
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +23 -23
- package/dist/ColorWheel.cjs +22 -22
- package/dist/ColorWheel.css +16 -16
- package/dist/ColorWheel.mjs +22 -22
- package/dist/ComboBox.cjs +80 -80
- package/dist/ComboBox.css +88 -88
- package/dist/ComboBox.mjs +80 -80
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +38 -38
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/CustomDialog.cjs +31 -31
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.mjs +31 -31
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.css +64 -64
- package/dist/Dialog.mjs +17 -17
- package/dist/Disclosure.cjs +111 -108
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +124 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +111 -108
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.css +16 -16
- package/dist/Divider.mjs +26 -26
- package/dist/DropZone.cjs +56 -47
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +80 -56
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +56 -47
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +204 -150
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +246 -150
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +204 -150
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.css +9 -9
- package/dist/Form.mjs +10 -10
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.css +72 -72
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/IllustratedMessage.cjs +134 -134
- package/dist/IllustratedMessage.css +69 -69
- package/dist/IllustratedMessage.mjs +134 -134
- package/dist/Image.cjs +12 -12
- package/dist/Image.css +13 -13
- package/dist/Image.mjs +12 -12
- package/dist/InlineAlert.cjs +104 -77
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +149 -77
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +104 -77
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs +31 -31
- package/dist/Link.css +30 -30
- package/dist/Link.mjs +31 -31
- package/dist/Menu.cjs +269 -264
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +152 -152
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +270 -265
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +85 -85
- package/dist/Meter.css +81 -81
- package/dist/Meter.mjs +85 -85
- package/dist/Modal.cjs +48 -48
- package/dist/Modal.css +46 -46
- package/dist/Modal.mjs +48 -48
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.css +114 -114
- package/dist/NumberField.mjs +115 -115
- package/dist/Picker.cjs +193 -175
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +223 -163
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +193 -175
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +84 -78
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +89 -65
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +84 -78
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +98 -98
- package/dist/ProgressBar.css +92 -92
- package/dist/ProgressBar.mjs +98 -98
- package/dist/ProgressCircle.cjs +17 -17
- package/dist/ProgressCircle.css +15 -15
- package/dist/ProgressCircle.mjs +17 -17
- package/dist/Provider.cjs +4 -4
- package/dist/Provider.css +5 -5
- package/dist/Provider.mjs +4 -4
- package/dist/Radio.cjs +152 -80
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +240 -96
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +152 -80
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +47 -47
- package/dist/RadioGroup.css +41 -41
- package/dist/RadioGroup.mjs +47 -47
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.css +47 -47
- package/dist/SearchField.mjs +42 -42
- package/dist/SegmentedControl.cjs +101 -89
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +140 -92
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +101 -89
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +229 -196
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +221 -149
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +229 -196
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +56 -56
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +56 -56
- package/dist/Switch.cjs +107 -74
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +141 -69
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +107 -74
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +280 -253
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -163
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +280 -253
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +493 -197
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +250 -134
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +494 -198
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +415 -0
- package/dist/TabsPicker.cjs.map +1 -0
- package/dist/TabsPicker.css +482 -0
- package/dist/TabsPicker.css.map +1 -0
- package/dist/TabsPicker.mjs +409 -0
- package/dist/TabsPicker.mjs.map +1 -0
- package/dist/TagGroup.cjs +148 -148
- package/dist/TagGroup.css +134 -134
- package/dist/TagGroup.mjs +148 -148
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.css +62 -62
- package/dist/TextField.mjs +59 -59
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.mjs +3 -3
- package/dist/Tooltip.cjs +60 -57
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +83 -71
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +60 -57
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +465 -0
- package/dist/TreeView.cjs.map +1 -0
- package/dist/TreeView.css +632 -0
- package/dist/TreeView.css.map +1 -0
- package/dist/TreeView.mjs +455 -0
- package/dist/TreeView.mjs.map +1 -0
- package/dist/main.cjs +4 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +3 -1
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +33 -8
- package/dist/types.d.ts.map +1 -1
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +5 -5
- package/icons/Skeleton.mjs +2 -2
- package/package.json +21 -19
- package/src/Badge.tsx +4 -1
- package/src/Content.tsx +2 -1
- package/src/Menu.tsx +2 -0
- package/src/Tabs.tsx +450 -144
- package/src/TabsPicker.tsx +350 -0
- package/src/TreeView.tsx +497 -0
- package/src/index.ts +2 -0
- package/style/__tests__/style-macro.test.js +18 -18
- package/style/dist/spectrum-theme.cjs +20 -10
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +20 -10
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +4 -0
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +18 -11
package/dist/Disclosure.css
CHANGED
|
@@ -1,99 +1,111 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.tb {
|
|
3
3
|
border-top-width: 1px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.ta {
|
|
7
7
|
border-top-width: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.ub {
|
|
11
11
|
border-bottom-width: 1px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.ua {
|
|
15
15
|
border-bottom-width: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.za {
|
|
19
19
|
border-style: solid;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
23
|
-
border-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
22
|
+
.xh {
|
|
23
|
+
border-top-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.yh {
|
|
27
|
+
border-bottom-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vh {
|
|
31
|
+
border-inline-start-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
24
32
|
}
|
|
25
33
|
|
|
26
|
-
.
|
|
34
|
+
.wh {
|
|
35
|
+
border-inline-end-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.p___C {
|
|
27
39
|
min-width: calc(12.5rem * var(--s2-scale));
|
|
28
40
|
}
|
|
29
41
|
|
|
30
|
-
.
|
|
42
|
+
.Da {
|
|
31
43
|
margin-top: 0;
|
|
32
44
|
}
|
|
33
45
|
|
|
34
|
-
.
|
|
46
|
+
.Ea {
|
|
35
47
|
margin-bottom: 0;
|
|
36
48
|
}
|
|
37
49
|
|
|
38
|
-
.
|
|
50
|
+
.Ba {
|
|
39
51
|
margin-inline-start: 0;
|
|
40
52
|
}
|
|
41
53
|
|
|
42
|
-
.
|
|
54
|
+
.Ca {
|
|
43
55
|
margin-inline-end: 0;
|
|
44
56
|
}
|
|
45
57
|
|
|
46
|
-
.
|
|
58
|
+
.__c-3t1y {
|
|
47
59
|
flex-shrink: 1;
|
|
48
60
|
}
|
|
49
61
|
|
|
50
|
-
.
|
|
62
|
+
.po {
|
|
51
63
|
min-width: 0;
|
|
52
64
|
}
|
|
53
65
|
|
|
54
|
-
.
|
|
66
|
+
._Pa {
|
|
55
67
|
outline-style: none;
|
|
56
68
|
}
|
|
57
69
|
|
|
58
|
-
.
|
|
70
|
+
._Pb {
|
|
59
71
|
outline-style: solid;
|
|
60
72
|
}
|
|
61
73
|
|
|
62
|
-
.
|
|
74
|
+
.cx {
|
|
63
75
|
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
64
76
|
}
|
|
65
77
|
|
|
66
|
-
.
|
|
78
|
+
._Rc {
|
|
67
79
|
outline-width: 2px;
|
|
68
80
|
}
|
|
69
81
|
|
|
70
|
-
.
|
|
82
|
+
._Q-3hmpw {
|
|
71
83
|
outline-offset: -2px;
|
|
72
84
|
}
|
|
73
85
|
|
|
74
|
-
.
|
|
86
|
+
._hi {
|
|
75
87
|
font-size: 1.125rem;
|
|
76
88
|
}
|
|
77
89
|
|
|
78
|
-
.
|
|
90
|
+
._hk {
|
|
79
91
|
font-size: 1.25rem;
|
|
80
92
|
}
|
|
81
93
|
|
|
82
|
-
.
|
|
94
|
+
._hj {
|
|
83
95
|
font-size: 1.375rem;
|
|
84
96
|
}
|
|
85
97
|
|
|
86
|
-
.
|
|
98
|
+
._hn {
|
|
87
99
|
font-size: 1.75rem;
|
|
88
100
|
}
|
|
89
101
|
|
|
90
|
-
.
|
|
102
|
+
._id {
|
|
91
103
|
font-variation-settings: "wght" 700;
|
|
92
104
|
font-synthesis-weight: none;
|
|
93
105
|
font-weight: 700;
|
|
94
106
|
}
|
|
95
107
|
|
|
96
|
-
.
|
|
108
|
+
._ja {
|
|
97
109
|
line-height: 1.3;
|
|
98
110
|
}
|
|
99
111
|
|
|
@@ -105,43 +117,43 @@
|
|
|
105
117
|
color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
|
|
106
118
|
}
|
|
107
119
|
|
|
108
|
-
.
|
|
120
|
+
.__d-3t1y {
|
|
109
121
|
flex-grow: 1;
|
|
110
122
|
}
|
|
111
123
|
|
|
112
|
-
.
|
|
124
|
+
._5d {
|
|
113
125
|
align-items: baseline;
|
|
114
126
|
}
|
|
115
127
|
|
|
116
|
-
.
|
|
117
|
-
padding-inline-start: calc(var(--
|
|
128
|
+
.F-10cd9hn {
|
|
129
|
+
padding-inline-start: calc(var(--n) * 3 / 8 - 1px);
|
|
118
130
|
}
|
|
119
131
|
|
|
120
|
-
.
|
|
121
|
-
padding-inline-end: calc(var(--
|
|
132
|
+
.G-10cd9hn {
|
|
133
|
+
padding-inline-end: calc(var(--n) * 3 / 8 - 1px);
|
|
122
134
|
}
|
|
123
135
|
|
|
124
|
-
.
|
|
125
|
-
padding-top: calc((var(--
|
|
136
|
+
.H-1dbqcch {
|
|
137
|
+
padding-top: calc((var(--n) - var(--t, 0px) - var(--u, 0px) - 1lh) / 2);
|
|
126
138
|
}
|
|
127
139
|
|
|
128
|
-
.
|
|
129
|
-
padding-bottom: calc((var(--
|
|
140
|
+
.I-1dbqcch {
|
|
141
|
+
padding-bottom: calc((var(--n) - var(--t, 0px) - var(--u, 0px) - 1lh) / 2);
|
|
130
142
|
}
|
|
131
143
|
|
|
132
|
-
.
|
|
133
|
-
row-gap: calc(var(--
|
|
144
|
+
.h-10cd9hn {
|
|
145
|
+
row-gap: calc(var(--n) * 3 / 8 - 1px);
|
|
134
146
|
}
|
|
135
147
|
|
|
136
|
-
.
|
|
137
|
-
column-gap: calc(var(--
|
|
148
|
+
.i-10cd9hn {
|
|
149
|
+
column-gap: calc(var(--n) * 3 / 8 - 1px);
|
|
138
150
|
}
|
|
139
151
|
|
|
140
|
-
.
|
|
141
|
-
min-height: var(--
|
|
152
|
+
.n-375tot {
|
|
153
|
+
min-height: var(--n);
|
|
142
154
|
}
|
|
143
155
|
|
|
144
|
-
.
|
|
156
|
+
.kb {
|
|
145
157
|
width: 100%;
|
|
146
158
|
}
|
|
147
159
|
|
|
@@ -157,153 +169,153 @@
|
|
|
157
169
|
background-color: var(--lightningcss-light, #00000026) var(--lightningcss-dark, #ffffff2b);
|
|
158
170
|
}
|
|
159
171
|
|
|
160
|
-
.
|
|
161
|
-
border-top-width: var(--
|
|
172
|
+
.t-375toz {
|
|
173
|
+
border-top-width: var(--t);
|
|
162
174
|
}
|
|
163
175
|
|
|
164
|
-
.
|
|
165
|
-
border-bottom-width: var(--
|
|
176
|
+
.u-375tp0 {
|
|
177
|
+
border-bottom-width: var(--u);
|
|
166
178
|
}
|
|
167
179
|
|
|
168
|
-
.
|
|
180
|
+
.ra {
|
|
169
181
|
border-inline-start-width: 0;
|
|
170
182
|
}
|
|
171
183
|
|
|
172
|
-
.
|
|
184
|
+
.sa {
|
|
173
185
|
border-inline-end-width: 0;
|
|
174
186
|
}
|
|
175
187
|
|
|
176
|
-
.
|
|
188
|
+
._za {
|
|
177
189
|
border-start-start-radius: 0;
|
|
178
190
|
}
|
|
179
191
|
|
|
180
|
-
.
|
|
192
|
+
._zh {
|
|
181
193
|
border-start-start-radius: .571429em;
|
|
182
194
|
}
|
|
183
195
|
|
|
184
|
-
.
|
|
196
|
+
._Aa {
|
|
185
197
|
border-start-end-radius: 0;
|
|
186
198
|
}
|
|
187
199
|
|
|
188
|
-
.
|
|
200
|
+
._Ah {
|
|
189
201
|
border-start-end-radius: .571429em;
|
|
190
202
|
}
|
|
191
203
|
|
|
192
|
-
.
|
|
204
|
+
._Ba {
|
|
193
205
|
border-end-start-radius: 0;
|
|
194
206
|
}
|
|
195
207
|
|
|
196
|
-
.
|
|
208
|
+
._Bh {
|
|
197
209
|
border-end-start-radius: .571429em;
|
|
198
210
|
}
|
|
199
211
|
|
|
200
|
-
.
|
|
212
|
+
._Ca {
|
|
201
213
|
border-end-end-radius: 0;
|
|
202
214
|
}
|
|
203
215
|
|
|
204
|
-
.
|
|
216
|
+
._Ch {
|
|
205
217
|
border-end-end-radius: .571429em;
|
|
206
218
|
}
|
|
207
219
|
|
|
208
|
-
.
|
|
220
|
+
._na {
|
|
209
221
|
text-align: start;
|
|
210
222
|
}
|
|
211
223
|
|
|
212
|
-
.
|
|
224
|
+
.__V-yksgrp {
|
|
213
225
|
-webkit-tap-highlight-color: #0000;
|
|
214
226
|
}
|
|
215
227
|
|
|
216
|
-
.-
|
|
217
|
-
--
|
|
228
|
+
.-_375tot_n-M {
|
|
229
|
+
--n: calc(1.5rem * var(--s2-scale));
|
|
218
230
|
}
|
|
219
231
|
|
|
220
|
-
.-
|
|
221
|
-
--
|
|
232
|
+
.-_375tot_n-U {
|
|
233
|
+
--n: calc(2rem * var(--s2-scale));
|
|
222
234
|
}
|
|
223
235
|
|
|
224
|
-
.-
|
|
225
|
-
--
|
|
236
|
+
.-_375tot_n-2 {
|
|
237
|
+
--n: calc(2.5rem * var(--s2-scale));
|
|
226
238
|
}
|
|
227
239
|
|
|
228
|
-
.-
|
|
229
|
-
--
|
|
240
|
+
.-_375tot_n-_a {
|
|
241
|
+
--n: calc(3rem * var(--s2-scale));
|
|
230
242
|
}
|
|
231
243
|
|
|
232
|
-
.-
|
|
233
|
-
--
|
|
244
|
+
.-_375tot_n-_i {
|
|
245
|
+
--n: calc(3.5rem * var(--s2-scale));
|
|
234
246
|
}
|
|
235
247
|
|
|
236
|
-
.-
|
|
237
|
-
--
|
|
248
|
+
.-_375tot_n-_q {
|
|
249
|
+
--n: calc(4rem * var(--s2-scale));
|
|
238
250
|
}
|
|
239
251
|
|
|
240
|
-
.-
|
|
241
|
-
--
|
|
252
|
+
.-_375toz_t-a {
|
|
253
|
+
--t: 0px;
|
|
242
254
|
}
|
|
243
255
|
|
|
244
|
-
.-
|
|
245
|
-
--
|
|
256
|
+
.-_375tp0_u-a {
|
|
257
|
+
--u: 0px;
|
|
246
258
|
}
|
|
247
259
|
|
|
248
|
-
.
|
|
260
|
+
.U-375xa6 {
|
|
249
261
|
rotate: 180deg;
|
|
250
262
|
}
|
|
251
263
|
|
|
252
|
-
.
|
|
264
|
+
.U-3hn0u {
|
|
253
265
|
rotate: 90deg;
|
|
254
266
|
}
|
|
255
267
|
|
|
256
|
-
.
|
|
268
|
+
._Sa {
|
|
257
269
|
transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
|
|
258
270
|
}
|
|
259
271
|
|
|
260
|
-
.
|
|
272
|
+
._U-375x7f {
|
|
261
273
|
transition-duration: .15s;
|
|
262
274
|
}
|
|
263
275
|
|
|
264
|
-
.
|
|
276
|
+
._Va {
|
|
265
277
|
transition-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
266
278
|
}
|
|
267
279
|
|
|
268
|
-
.-
|
|
280
|
+
.-rwx0fg_d-b {
|
|
269
281
|
--iconPrimary: currentColor;
|
|
270
282
|
}
|
|
271
283
|
|
|
272
|
-
.
|
|
284
|
+
.__c-3t1x {
|
|
273
285
|
flex-shrink: 0;
|
|
274
286
|
}
|
|
275
287
|
|
|
276
|
-
.
|
|
288
|
+
._3d {
|
|
277
289
|
display: flex;
|
|
278
290
|
}
|
|
279
291
|
|
|
280
|
-
.
|
|
292
|
+
._5c {
|
|
281
293
|
align-items: center;
|
|
282
294
|
}
|
|
283
295
|
|
|
284
|
-
.
|
|
296
|
+
.hc {
|
|
285
297
|
row-gap: .25rem;
|
|
286
298
|
}
|
|
287
299
|
|
|
288
|
-
.
|
|
300
|
+
.ic {
|
|
289
301
|
column-gap: .25rem;
|
|
290
302
|
}
|
|
291
303
|
|
|
292
|
-
.
|
|
304
|
+
._ga {
|
|
293
305
|
font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
|
|
294
306
|
}
|
|
295
307
|
|
|
296
|
-
.
|
|
308
|
+
._hg {
|
|
297
309
|
font-size: 1rem;
|
|
298
310
|
}
|
|
299
311
|
|
|
300
|
-
.
|
|
312
|
+
._ib {
|
|
301
313
|
font-variation-settings: "wght" 400;
|
|
302
314
|
font-synthesis-weight: none;
|
|
303
315
|
font-weight: 400;
|
|
304
316
|
}
|
|
305
317
|
|
|
306
|
-
.
|
|
318
|
+
._jb {
|
|
307
319
|
line-height: 1.5;
|
|
308
320
|
}
|
|
309
321
|
|
|
@@ -311,92 +323,92 @@
|
|
|
311
323
|
color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
|
|
312
324
|
}
|
|
313
325
|
|
|
314
|
-
.
|
|
326
|
+
.Hd {
|
|
315
327
|
padding-top: .5rem;
|
|
316
328
|
}
|
|
317
329
|
|
|
318
|
-
.
|
|
330
|
+
.If {
|
|
319
331
|
padding-bottom: 1rem;
|
|
320
332
|
}
|
|
321
333
|
|
|
322
|
-
.
|
|
334
|
+
.Fd {
|
|
323
335
|
padding-inline-start: .5rem;
|
|
324
336
|
}
|
|
325
337
|
|
|
326
|
-
.
|
|
338
|
+
.Fe {
|
|
327
339
|
padding-inline-start: .75rem;
|
|
328
340
|
}
|
|
329
341
|
|
|
330
|
-
.
|
|
342
|
+
.Gd {
|
|
331
343
|
padding-inline-end: .5rem;
|
|
332
344
|
}
|
|
333
345
|
|
|
334
|
-
.
|
|
346
|
+
.Ge {
|
|
335
347
|
padding-inline-end: .75rem;
|
|
336
348
|
}
|
|
337
349
|
}
|
|
338
350
|
|
|
339
351
|
@layer _.b {
|
|
340
|
-
.
|
|
352
|
+
.u-uamghwb:last-child {
|
|
341
353
|
border-bottom-width: 1px;
|
|
342
354
|
}
|
|
343
355
|
|
|
344
|
-
.
|
|
356
|
+
.u-uamghwa:last-child {
|
|
345
357
|
border-bottom-width: 0;
|
|
346
358
|
}
|
|
347
359
|
|
|
348
|
-
.
|
|
360
|
+
._j-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
349
361
|
line-height: 1.5;
|
|
350
362
|
}
|
|
351
363
|
|
|
352
|
-
.
|
|
364
|
+
._g-enzrfpb:lang(ar) {
|
|
353
365
|
font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
|
|
354
366
|
}
|
|
355
367
|
|
|
356
|
-
.
|
|
368
|
+
._j-1x99dloc:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
357
369
|
line-height: 1.7;
|
|
358
370
|
}
|
|
359
371
|
}
|
|
360
372
|
|
|
361
373
|
@layer _.c {
|
|
362
|
-
.
|
|
374
|
+
._g-enzwzjc:lang(he) {
|
|
363
375
|
font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
364
376
|
}
|
|
365
377
|
}
|
|
366
378
|
|
|
367
379
|
@layer _.d {
|
|
368
|
-
.
|
|
380
|
+
._g-enzykdd:lang(ja) {
|
|
369
381
|
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
370
382
|
}
|
|
371
383
|
}
|
|
372
384
|
|
|
373
385
|
@layer _.e {
|
|
374
|
-
.
|
|
386
|
+
._g-enzzrge:lang(ko) {
|
|
375
387
|
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
376
388
|
}
|
|
377
389
|
}
|
|
378
390
|
|
|
379
391
|
@layer _.f {
|
|
380
|
-
.
|
|
392
|
+
._g-eo0c6sf:lang(zh) {
|
|
381
393
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
382
394
|
}
|
|
383
395
|
}
|
|
384
396
|
|
|
385
397
|
@layer _.g {
|
|
386
|
-
.
|
|
398
|
+
._g-1uotwbwg:lang(zh-hant) {
|
|
387
399
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
388
400
|
}
|
|
389
401
|
}
|
|
390
402
|
|
|
391
403
|
@layer _.h {
|
|
392
|
-
.
|
|
404
|
+
._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
393
405
|
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
394
406
|
}
|
|
395
407
|
}
|
|
396
408
|
|
|
397
409
|
@layer _.b.a {
|
|
398
410
|
@media (forced-colors: active) {
|
|
399
|
-
.
|
|
411
|
+
.ca_____M {
|
|
400
412
|
outline-color: highlight;
|
|
401
413
|
}
|
|
402
414
|
}
|
|
@@ -404,23 +416,23 @@
|
|
|
404
416
|
|
|
405
417
|
@layer _.b.b {
|
|
406
418
|
@media not ((hover: hover) and (pointer: fine)) {
|
|
407
|
-
.
|
|
419
|
+
._hbj {
|
|
408
420
|
font-size: 1.375rem;
|
|
409
421
|
}
|
|
410
422
|
|
|
411
|
-
.
|
|
423
|
+
._hbl {
|
|
412
424
|
font-size: 1.5rem;
|
|
413
425
|
}
|
|
414
426
|
|
|
415
|
-
.
|
|
427
|
+
._hbm {
|
|
416
428
|
font-size: 1.6875rem;
|
|
417
429
|
}
|
|
418
430
|
|
|
419
|
-
.
|
|
431
|
+
._hbo {
|
|
420
432
|
font-size: 2.125rem;
|
|
421
433
|
}
|
|
422
434
|
|
|
423
|
-
.
|
|
435
|
+
._hbh {
|
|
424
436
|
font-size: 1.1875rem;
|
|
425
437
|
}
|
|
426
438
|
}
|
package/dist/Disclosure.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AC2CmB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAsEE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQA;;;;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;;;;EAAA;;;;EA4EC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CwB;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6D1B;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AApQD;EAAA;;;;EAAA;;;;EA8EE;;;;EAsLD;;;;EAAA;;;;;AAtLC;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAsLD","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, 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 a DisclosureTitle 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: 200\n}, getAllowedOverrides());\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 */\nexport const Disclosure = forwardRef(function 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\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 display: 'flex',\n flexShrink: 1,\n minWidth: 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 flexGrow: 1,\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\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nexport const DisclosureTitle = forwardRef(function 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\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: 9,\n L: 12,\n XL: 15\n }\n }\n }\n});\n\n/**\n * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.\n */\nexport const DisclosurePanel = forwardRef(function 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"],"names":[],"version":3,"file":"Disclosure.css.map"}
|
|
1
|
+
{"mappings":"AC2CmB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAsEE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAQA;;;;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;;;;EAAA;;;;EA4EC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CwB;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6D1B;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AApQD;EAAA;;;;EAAA;;;;EA8EE;;;;EAsLD;;;;EAAA;;;;;AAtLC;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAsLD","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, 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 a DisclosureTitle 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: 200\n}, getAllowedOverrides());\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 */\nexport const Disclosure = forwardRef(function 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\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 display: 'flex',\n flexShrink: 1,\n minWidth: 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 flexGrow: 1,\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\n/**\n * A disclosure title consisting of a heading and a trigger button to expand/collapse the panel.\n */\nexport const DisclosureTitle = forwardRef(function 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\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: 9,\n L: 12,\n XL: 15\n }\n }\n }\n});\n\n/**\n * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded.\n */\nexport const DisclosurePanel = forwardRef(function 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"],"names":[],"version":3,"file":"Disclosure.css.map"}
|