@react-spectrum/s2 3.0.0-nightly-56da82e3e-250212 → 3.0.0-nightly-260eb700f-250213
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 +68 -92
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +92 -164
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +68 -92
- 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 +152 -236
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +165 -309
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +152 -236
- 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 +261 -264
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +198 -210
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +261 -264
- 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 +73 -124
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +81 -201
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +73 -124
- 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 +21 -27
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +45 -93
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +21 -27
- 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 +24 -27
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -41
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +24 -27
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +23 -23
- package/dist/ColorSwatchPicker.css +48 -60
- 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/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 +108 -111
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -124
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +108 -111
- 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 +47 -56
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +56 -80
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +47 -56
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +150 -204
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +150 -246
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +150 -204
- 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 +77 -104
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +77 -149
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +77 -104
- 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 -269
- package/dist/Menu.css +155 -155
- package/dist/Menu.mjs +269 -269
- 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 +177 -195
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +164 -224
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +177 -195
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +79 -85
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +65 -89
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +79 -85
- 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 +80 -152
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +96 -240
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +80 -152
- 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 +89 -101
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +92 -140
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +89 -101
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +196 -229
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +149 -221
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +196 -229
- 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 +74 -107
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +69 -141
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +74 -107
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +253 -280
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +163 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +253 -280
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +108 -108
- package/dist/Tabs.css +81 -81
- package/dist/Tabs.mjs +108 -108
- package/dist/TabsPicker.cjs +105 -105
- package/dist/TabsPicker.css +111 -111
- package/dist/TabsPicker.mjs +105 -105
- 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 +57 -60
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +71 -83
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +57 -60
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +199 -248
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +131 -175
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +202 -248
- package/dist/TreeView.mjs.map +1 -1
- package/dist/main.cjs +1 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +2 -2
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +4 -1
- 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 -21
- package/src/TreeView.tsx +66 -134
- package/src/index.ts +1 -1
- package/style/__tests__/style-macro.test.js +18 -18
- package/style/dist/spectrum-theme.cjs +10 -20
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +10 -20
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +0 -4
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +11 -19
package/dist/Disclosure.css
CHANGED
|
@@ -1,111 +1,99 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.ub {
|
|
3
3
|
border-top-width: 1px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.ua {
|
|
7
7
|
border-top-width: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.vb {
|
|
11
11
|
border-bottom-width: 1px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.va {
|
|
15
15
|
border-bottom-width: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.wa {
|
|
19
19
|
border-style: solid;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
23
|
-
border-
|
|
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);
|
|
22
|
+
.ch {
|
|
23
|
+
border-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
32
24
|
}
|
|
33
25
|
|
|
34
|
-
.
|
|
35
|
-
border-inline-end-color: var(--lightningcss-light, #e1e1e1) var(--lightningcss-dark, #323232);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.p___C {
|
|
26
|
+
.q___C {
|
|
39
27
|
min-width: calc(12.5rem * var(--s2-scale));
|
|
40
28
|
}
|
|
41
29
|
|
|
42
|
-
.
|
|
30
|
+
.Aa {
|
|
43
31
|
margin-top: 0;
|
|
44
32
|
}
|
|
45
33
|
|
|
46
|
-
.
|
|
34
|
+
.Ba {
|
|
47
35
|
margin-bottom: 0;
|
|
48
36
|
}
|
|
49
37
|
|
|
50
|
-
.
|
|
38
|
+
.ya {
|
|
51
39
|
margin-inline-start: 0;
|
|
52
40
|
}
|
|
53
41
|
|
|
54
|
-
.
|
|
42
|
+
.za {
|
|
55
43
|
margin-inline-end: 0;
|
|
56
44
|
}
|
|
57
45
|
|
|
58
|
-
.
|
|
46
|
+
._9-3t1y {
|
|
59
47
|
flex-shrink: 1;
|
|
60
48
|
}
|
|
61
49
|
|
|
62
|
-
.
|
|
50
|
+
.qo {
|
|
63
51
|
min-width: 0;
|
|
64
52
|
}
|
|
65
53
|
|
|
66
|
-
.
|
|
54
|
+
._Ma {
|
|
67
55
|
outline-style: none;
|
|
68
56
|
}
|
|
69
57
|
|
|
70
|
-
.
|
|
58
|
+
._Mb {
|
|
71
59
|
outline-style: solid;
|
|
72
60
|
}
|
|
73
61
|
|
|
74
|
-
.
|
|
62
|
+
.dx {
|
|
75
63
|
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
76
64
|
}
|
|
77
65
|
|
|
78
|
-
.
|
|
66
|
+
._Oc {
|
|
79
67
|
outline-width: 2px;
|
|
80
68
|
}
|
|
81
69
|
|
|
82
|
-
.
|
|
70
|
+
._N-3hmpw {
|
|
83
71
|
outline-offset: -2px;
|
|
84
72
|
}
|
|
85
73
|
|
|
86
|
-
.
|
|
74
|
+
._ei {
|
|
87
75
|
font-size: 1.125rem;
|
|
88
76
|
}
|
|
89
77
|
|
|
90
|
-
.
|
|
78
|
+
._ek {
|
|
91
79
|
font-size: 1.25rem;
|
|
92
80
|
}
|
|
93
81
|
|
|
94
|
-
.
|
|
82
|
+
._ej {
|
|
95
83
|
font-size: 1.375rem;
|
|
96
84
|
}
|
|
97
85
|
|
|
98
|
-
.
|
|
86
|
+
._en {
|
|
99
87
|
font-size: 1.75rem;
|
|
100
88
|
}
|
|
101
89
|
|
|
102
|
-
.
|
|
90
|
+
._fd {
|
|
103
91
|
font-variation-settings: "wght" 700;
|
|
104
92
|
font-synthesis-weight: none;
|
|
105
93
|
font-weight: 700;
|
|
106
94
|
}
|
|
107
95
|
|
|
108
|
-
.
|
|
96
|
+
._ga {
|
|
109
97
|
line-height: 1.3;
|
|
110
98
|
}
|
|
111
99
|
|
|
@@ -117,43 +105,43 @@
|
|
|
117
105
|
color: var(--lightningcss-light, #c6c6c6) var(--lightningcss-dark, #444);
|
|
118
106
|
}
|
|
119
107
|
|
|
120
|
-
.
|
|
108
|
+
.__a-3t1y {
|
|
121
109
|
flex-grow: 1;
|
|
122
110
|
}
|
|
123
111
|
|
|
124
|
-
.
|
|
112
|
+
._2d {
|
|
125
113
|
align-items: baseline;
|
|
126
114
|
}
|
|
127
115
|
|
|
128
|
-
.
|
|
129
|
-
padding-inline-start: calc(var(--
|
|
116
|
+
.C-10cd9hn {
|
|
117
|
+
padding-inline-start: calc(var(--o) * 3 / 8 - 1px);
|
|
130
118
|
}
|
|
131
119
|
|
|
132
|
-
.
|
|
133
|
-
padding-inline-end: calc(var(--
|
|
120
|
+
.D-10cd9hn {
|
|
121
|
+
padding-inline-end: calc(var(--o) * 3 / 8 - 1px);
|
|
134
122
|
}
|
|
135
123
|
|
|
136
|
-
.
|
|
137
|
-
padding-top: calc((var(--
|
|
124
|
+
.E-1dbqcch {
|
|
125
|
+
padding-top: calc((var(--o) - var(--u, 0px) - var(--v, 0px) - 1lh) / 2);
|
|
138
126
|
}
|
|
139
127
|
|
|
140
|
-
.
|
|
141
|
-
padding-bottom: calc((var(--
|
|
128
|
+
.F-1dbqcch {
|
|
129
|
+
padding-bottom: calc((var(--o) - var(--u, 0px) - var(--v, 0px) - 1lh) / 2);
|
|
142
130
|
}
|
|
143
131
|
|
|
144
|
-
.
|
|
145
|
-
row-gap: calc(var(--
|
|
132
|
+
.i-10cd9hn {
|
|
133
|
+
row-gap: calc(var(--o) * 3 / 8 - 1px);
|
|
146
134
|
}
|
|
147
135
|
|
|
148
|
-
.
|
|
149
|
-
column-gap: calc(var(--
|
|
136
|
+
.j-10cd9hn {
|
|
137
|
+
column-gap: calc(var(--o) * 3 / 8 - 1px);
|
|
150
138
|
}
|
|
151
139
|
|
|
152
|
-
.
|
|
153
|
-
min-height: var(--
|
|
140
|
+
.o-375tou {
|
|
141
|
+
min-height: var(--o);
|
|
154
142
|
}
|
|
155
143
|
|
|
156
|
-
.
|
|
144
|
+
.lb {
|
|
157
145
|
width: 100%;
|
|
158
146
|
}
|
|
159
147
|
|
|
@@ -169,153 +157,153 @@
|
|
|
169
157
|
background-color: var(--lightningcss-light, #00000026) var(--lightningcss-dark, #ffffff2b);
|
|
170
158
|
}
|
|
171
159
|
|
|
172
|
-
.
|
|
173
|
-
border-top-width: var(--
|
|
160
|
+
.u-375tp0 {
|
|
161
|
+
border-top-width: var(--u);
|
|
174
162
|
}
|
|
175
163
|
|
|
176
|
-
.
|
|
177
|
-
border-bottom-width: var(--
|
|
164
|
+
.v-375tp1 {
|
|
165
|
+
border-bottom-width: var(--v);
|
|
178
166
|
}
|
|
179
167
|
|
|
180
|
-
.
|
|
168
|
+
.sa {
|
|
181
169
|
border-inline-start-width: 0;
|
|
182
170
|
}
|
|
183
171
|
|
|
184
|
-
.
|
|
172
|
+
.ta {
|
|
185
173
|
border-inline-end-width: 0;
|
|
186
174
|
}
|
|
187
175
|
|
|
188
|
-
.
|
|
176
|
+
._wa {
|
|
189
177
|
border-start-start-radius: 0;
|
|
190
178
|
}
|
|
191
179
|
|
|
192
|
-
.
|
|
180
|
+
._wh {
|
|
193
181
|
border-start-start-radius: .571429em;
|
|
194
182
|
}
|
|
195
183
|
|
|
196
|
-
.
|
|
184
|
+
._xa {
|
|
197
185
|
border-start-end-radius: 0;
|
|
198
186
|
}
|
|
199
187
|
|
|
200
|
-
.
|
|
188
|
+
._xh {
|
|
201
189
|
border-start-end-radius: .571429em;
|
|
202
190
|
}
|
|
203
191
|
|
|
204
|
-
.
|
|
192
|
+
._ya {
|
|
205
193
|
border-end-start-radius: 0;
|
|
206
194
|
}
|
|
207
195
|
|
|
208
|
-
.
|
|
196
|
+
._yh {
|
|
209
197
|
border-end-start-radius: .571429em;
|
|
210
198
|
}
|
|
211
199
|
|
|
212
|
-
.
|
|
200
|
+
._za {
|
|
213
201
|
border-end-end-radius: 0;
|
|
214
202
|
}
|
|
215
203
|
|
|
216
|
-
.
|
|
204
|
+
._zh {
|
|
217
205
|
border-end-end-radius: .571429em;
|
|
218
206
|
}
|
|
219
207
|
|
|
220
|
-
.
|
|
208
|
+
._ka {
|
|
221
209
|
text-align: start;
|
|
222
210
|
}
|
|
223
211
|
|
|
224
|
-
.
|
|
212
|
+
.__S-yksgrp {
|
|
225
213
|
-webkit-tap-highlight-color: #0000;
|
|
226
214
|
}
|
|
227
215
|
|
|
228
|
-
.-
|
|
229
|
-
--
|
|
216
|
+
.-_375tou_o-M {
|
|
217
|
+
--o: calc(1.5rem * var(--s2-scale));
|
|
230
218
|
}
|
|
231
219
|
|
|
232
|
-
.-
|
|
233
|
-
--
|
|
220
|
+
.-_375tou_o-U {
|
|
221
|
+
--o: calc(2rem * var(--s2-scale));
|
|
234
222
|
}
|
|
235
223
|
|
|
236
|
-
.-
|
|
237
|
-
--
|
|
224
|
+
.-_375tou_o-2 {
|
|
225
|
+
--o: calc(2.5rem * var(--s2-scale));
|
|
238
226
|
}
|
|
239
227
|
|
|
240
|
-
.-
|
|
241
|
-
--
|
|
228
|
+
.-_375tou_o-_a {
|
|
229
|
+
--o: calc(3rem * var(--s2-scale));
|
|
242
230
|
}
|
|
243
231
|
|
|
244
|
-
.-
|
|
245
|
-
--
|
|
232
|
+
.-_375tou_o-_i {
|
|
233
|
+
--o: calc(3.5rem * var(--s2-scale));
|
|
246
234
|
}
|
|
247
235
|
|
|
248
|
-
.-
|
|
249
|
-
--
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.-_375toz_t-a {
|
|
253
|
-
--t: 0px;
|
|
236
|
+
.-_375tou_o-_q {
|
|
237
|
+
--o: calc(4rem * var(--s2-scale));
|
|
254
238
|
}
|
|
255
239
|
|
|
256
240
|
.-_375tp0_u-a {
|
|
257
241
|
--u: 0px;
|
|
258
242
|
}
|
|
259
243
|
|
|
260
|
-
|
|
244
|
+
.-_375tp1_v-a {
|
|
245
|
+
--v: 0px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.R-375xa6 {
|
|
261
249
|
rotate: 180deg;
|
|
262
250
|
}
|
|
263
251
|
|
|
264
|
-
.
|
|
252
|
+
.R-3hn0u {
|
|
265
253
|
rotate: 90deg;
|
|
266
254
|
}
|
|
267
255
|
|
|
268
|
-
.
|
|
256
|
+
._Pa {
|
|
269
257
|
transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
|
|
270
258
|
}
|
|
271
259
|
|
|
272
|
-
.
|
|
260
|
+
._R-375x7f {
|
|
273
261
|
transition-duration: .15s;
|
|
274
262
|
}
|
|
275
263
|
|
|
276
|
-
.
|
|
264
|
+
._Sa {
|
|
277
265
|
transition-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
278
266
|
}
|
|
279
267
|
|
|
280
|
-
.-
|
|
268
|
+
.-rwx0fg_e-b {
|
|
281
269
|
--iconPrimary: currentColor;
|
|
282
270
|
}
|
|
283
271
|
|
|
284
|
-
.
|
|
272
|
+
._9-3t1x {
|
|
285
273
|
flex-shrink: 0;
|
|
286
274
|
}
|
|
287
275
|
|
|
288
|
-
.
|
|
276
|
+
._0d {
|
|
289
277
|
display: flex;
|
|
290
278
|
}
|
|
291
279
|
|
|
292
|
-
.
|
|
280
|
+
._2c {
|
|
293
281
|
align-items: center;
|
|
294
282
|
}
|
|
295
283
|
|
|
296
|
-
.
|
|
284
|
+
.ic {
|
|
297
285
|
row-gap: .25rem;
|
|
298
286
|
}
|
|
299
287
|
|
|
300
|
-
.
|
|
288
|
+
.jc {
|
|
301
289
|
column-gap: .25rem;
|
|
302
290
|
}
|
|
303
291
|
|
|
304
|
-
.
|
|
292
|
+
._da {
|
|
305
293
|
font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
|
|
306
294
|
}
|
|
307
295
|
|
|
308
|
-
.
|
|
296
|
+
._eg {
|
|
309
297
|
font-size: 1rem;
|
|
310
298
|
}
|
|
311
299
|
|
|
312
|
-
.
|
|
300
|
+
._fb {
|
|
313
301
|
font-variation-settings: "wght" 400;
|
|
314
302
|
font-synthesis-weight: none;
|
|
315
303
|
font-weight: 400;
|
|
316
304
|
}
|
|
317
305
|
|
|
318
|
-
.
|
|
306
|
+
._gb {
|
|
319
307
|
line-height: 1.5;
|
|
320
308
|
}
|
|
321
309
|
|
|
@@ -323,92 +311,92 @@
|
|
|
323
311
|
color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #dbdbdb);
|
|
324
312
|
}
|
|
325
313
|
|
|
326
|
-
.
|
|
314
|
+
.Ed {
|
|
327
315
|
padding-top: .5rem;
|
|
328
316
|
}
|
|
329
317
|
|
|
330
|
-
.
|
|
318
|
+
.Ff {
|
|
331
319
|
padding-bottom: 1rem;
|
|
332
320
|
}
|
|
333
321
|
|
|
334
|
-
.
|
|
322
|
+
.Cd {
|
|
335
323
|
padding-inline-start: .5rem;
|
|
336
324
|
}
|
|
337
325
|
|
|
338
|
-
.
|
|
326
|
+
.Ce {
|
|
339
327
|
padding-inline-start: .75rem;
|
|
340
328
|
}
|
|
341
329
|
|
|
342
|
-
.
|
|
330
|
+
.Dd {
|
|
343
331
|
padding-inline-end: .5rem;
|
|
344
332
|
}
|
|
345
333
|
|
|
346
|
-
.
|
|
334
|
+
.De {
|
|
347
335
|
padding-inline-end: .75rem;
|
|
348
336
|
}
|
|
349
337
|
}
|
|
350
338
|
|
|
351
339
|
@layer _.b {
|
|
352
|
-
.
|
|
340
|
+
.v-uamghwb:last-child {
|
|
353
341
|
border-bottom-width: 1px;
|
|
354
342
|
}
|
|
355
343
|
|
|
356
|
-
.
|
|
344
|
+
.v-uamghwa:last-child {
|
|
357
345
|
border-bottom-width: 0;
|
|
358
346
|
}
|
|
359
347
|
|
|
360
|
-
.
|
|
348
|
+
._g-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
361
349
|
line-height: 1.5;
|
|
362
350
|
}
|
|
363
351
|
|
|
364
|
-
.
|
|
352
|
+
._d-enzrfpb:lang(ar) {
|
|
365
353
|
font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
|
|
366
354
|
}
|
|
367
355
|
|
|
368
|
-
.
|
|
356
|
+
._g-1x99dloc:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
369
357
|
line-height: 1.7;
|
|
370
358
|
}
|
|
371
359
|
}
|
|
372
360
|
|
|
373
361
|
@layer _.c {
|
|
374
|
-
.
|
|
362
|
+
._d-enzwzjc:lang(he) {
|
|
375
363
|
font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
376
364
|
}
|
|
377
365
|
}
|
|
378
366
|
|
|
379
367
|
@layer _.d {
|
|
380
|
-
.
|
|
368
|
+
._d-enzykdd:lang(ja) {
|
|
381
369
|
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
382
370
|
}
|
|
383
371
|
}
|
|
384
372
|
|
|
385
373
|
@layer _.e {
|
|
386
|
-
.
|
|
374
|
+
._d-enzzrge:lang(ko) {
|
|
387
375
|
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
388
376
|
}
|
|
389
377
|
}
|
|
390
378
|
|
|
391
379
|
@layer _.f {
|
|
392
|
-
.
|
|
380
|
+
._d-eo0c6sf:lang(zh) {
|
|
393
381
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
394
382
|
}
|
|
395
383
|
}
|
|
396
384
|
|
|
397
385
|
@layer _.g {
|
|
398
|
-
.
|
|
386
|
+
._d-1uotwbwg:lang(zh-hant) {
|
|
399
387
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
400
388
|
}
|
|
401
389
|
}
|
|
402
390
|
|
|
403
391
|
@layer _.h {
|
|
404
|
-
.
|
|
392
|
+
._d-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
405
393
|
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
406
394
|
}
|
|
407
395
|
}
|
|
408
396
|
|
|
409
397
|
@layer _.b.a {
|
|
410
398
|
@media (forced-colors: active) {
|
|
411
|
-
.
|
|
399
|
+
.da_____M {
|
|
412
400
|
outline-color: highlight;
|
|
413
401
|
}
|
|
414
402
|
}
|
|
@@ -416,23 +404,23 @@
|
|
|
416
404
|
|
|
417
405
|
@layer _.b.b {
|
|
418
406
|
@media not ((hover: hover) and (pointer: fine)) {
|
|
419
|
-
.
|
|
407
|
+
._ebj {
|
|
420
408
|
font-size: 1.375rem;
|
|
421
409
|
}
|
|
422
410
|
|
|
423
|
-
.
|
|
411
|
+
._ebl {
|
|
424
412
|
font-size: 1.5rem;
|
|
425
413
|
}
|
|
426
414
|
|
|
427
|
-
.
|
|
415
|
+
._ebm {
|
|
428
416
|
font-size: 1.6875rem;
|
|
429
417
|
}
|
|
430
418
|
|
|
431
|
-
.
|
|
419
|
+
._ebo {
|
|
432
420
|
font-size: 2.125rem;
|
|
433
421
|
}
|
|
434
422
|
|
|
435
|
-
.
|
|
423
|
+
._ebh {
|
|
436
424
|
font-size: 1.1875rem;
|
|
437
425
|
}
|
|
438
426
|
}
|
package/dist/Disclosure.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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<Partial<DisclosureProps>, 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;;;;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<Partial<DisclosureProps>, 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"}
|