@react-spectrum/s2 3.0.0-nightly-e228ed814-250129 → 3.0.0-nightly-e3ed3c7f6-250130
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 +91 -67
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +163 -91
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +91 -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/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 +83 -83
- package/dist/Tabs.css +58 -58
- package/dist/Tabs.mjs +83 -83
- 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 +21 -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 +20 -19
- package/src/Menu.tsx +2 -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/InlineAlert.css
CHANGED
|
@@ -1,110 +1,182 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._Pa {
|
|
3
3
|
outline-style: none;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._Pb {
|
|
7
7
|
outline-style: solid;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.cx {
|
|
11
11
|
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
._Rc {
|
|
15
15
|
outline-width: 2px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
._Q-3t1z {
|
|
19
19
|
outline-offset: 2px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
._3b {
|
|
23
23
|
display: inline-block;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.Yc {
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.__ra {
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.Hh {
|
|
35
35
|
padding-top: 1.5rem;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.Ih {
|
|
39
39
|
padding-bottom: 1.5rem;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.Fh {
|
|
43
43
|
padding-inline-start: 1.5rem;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.Gh {
|
|
47
47
|
padding-inline-end: 1.5rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
._zd {
|
|
51
51
|
border-start-start-radius: .625rem;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
._Ad {
|
|
55
55
|
border-start-end-radius: .625rem;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
._Bd {
|
|
59
59
|
border-end-start-radius: .625rem;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
._Cd {
|
|
63
63
|
border-end-end-radius: .625rem;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
.za {
|
|
67
67
|
border-style: solid;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.
|
|
70
|
+
.tc {
|
|
71
71
|
border-top-width: 2px;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.
|
|
74
|
+
.uc {
|
|
75
75
|
border-bottom-width: 2px;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.
|
|
78
|
+
.rc {
|
|
79
79
|
border-inline-start-width: 2px;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
.sc {
|
|
83
83
|
border-inline-end-width: 2px;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.
|
|
87
|
-
border-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
86
|
+
.xx {
|
|
87
|
+
border-top-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.x_4 {
|
|
91
|
+
border-top-color: var(--lightningcss-light, #0ba45d) var(--lightningcss-dark, #047c4b);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.x2 {
|
|
95
|
+
border-top-color: var(--lightningcss-light, #e86a00) var(--lightningcss-dark, #b94900);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.xN {
|
|
99
|
+
border-top-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #df3422);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.xm {
|
|
103
|
+
border-top-color: var(--lightningcss-light, #505050) var(--lightningcss-dark, #afafaf);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.xa {
|
|
107
|
+
border-top-color: #0000;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.yx {
|
|
111
|
+
border-bottom-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.y_4 {
|
|
115
|
+
border-bottom-color: var(--lightningcss-light, #0ba45d) var(--lightningcss-dark, #047c4b);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.y2 {
|
|
119
|
+
border-bottom-color: var(--lightningcss-light, #e86a00) var(--lightningcss-dark, #b94900);
|
|
88
120
|
}
|
|
89
121
|
|
|
90
|
-
.
|
|
91
|
-
border-color: var(--lightningcss-light, #
|
|
122
|
+
.yN {
|
|
123
|
+
border-bottom-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #df3422);
|
|
92
124
|
}
|
|
93
125
|
|
|
94
|
-
.
|
|
95
|
-
border-color: var(--lightningcss-light, #
|
|
126
|
+
.ym {
|
|
127
|
+
border-bottom-color: var(--lightningcss-light, #505050) var(--lightningcss-dark, #afafaf);
|
|
96
128
|
}
|
|
97
129
|
|
|
98
|
-
.
|
|
99
|
-
border-color:
|
|
130
|
+
.ya {
|
|
131
|
+
border-bottom-color: #0000;
|
|
100
132
|
}
|
|
101
133
|
|
|
102
|
-
.
|
|
103
|
-
border-color: var(--lightningcss-light, #
|
|
134
|
+
.vx {
|
|
135
|
+
border-inline-start-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
104
136
|
}
|
|
105
137
|
|
|
106
|
-
.
|
|
107
|
-
border-color: #
|
|
138
|
+
.v_4 {
|
|
139
|
+
border-inline-start-color: var(--lightningcss-light, #0ba45d) var(--lightningcss-dark, #047c4b);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.v2 {
|
|
143
|
+
border-inline-start-color: var(--lightningcss-light, #e86a00) var(--lightningcss-dark, #b94900);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.vN {
|
|
147
|
+
border-inline-start-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #df3422);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.vm {
|
|
151
|
+
border-inline-start-color: var(--lightningcss-light, #505050) var(--lightningcss-dark, #afafaf);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.va {
|
|
155
|
+
border-inline-start-color: #0000;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.wx {
|
|
159
|
+
border-inline-end-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.w_4 {
|
|
163
|
+
border-inline-end-color: var(--lightningcss-light, #0ba45d) var(--lightningcss-dark, #047c4b);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.w2 {
|
|
167
|
+
border-inline-end-color: var(--lightningcss-light, #e86a00) var(--lightningcss-dark, #b94900);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.wN {
|
|
171
|
+
border-inline-end-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #df3422);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.wm {
|
|
175
|
+
border-inline-end-color: var(--lightningcss-light, #505050) var(--lightningcss-dark, #afafaf);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.wa {
|
|
179
|
+
border-inline-end-color: #0000;
|
|
108
180
|
}
|
|
109
181
|
|
|
110
182
|
.b_____T {
|
|
@@ -167,102 +239,102 @@
|
|
|
167
239
|
background-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #444);
|
|
168
240
|
}
|
|
169
241
|
|
|
170
|
-
.
|
|
242
|
+
.__e-qb5q8i {
|
|
171
243
|
grid-column-start: icon;
|
|
172
244
|
}
|
|
173
245
|
|
|
174
|
-
.
|
|
246
|
+
.__f-qb5q8i {
|
|
175
247
|
grid-column-end: icon;
|
|
176
248
|
}
|
|
177
249
|
|
|
178
|
-
.
|
|
250
|
+
.__g-qb5q8i {
|
|
179
251
|
grid-row-start: icon;
|
|
180
252
|
}
|
|
181
253
|
|
|
182
|
-
.
|
|
254
|
+
.__h-qb5q8i {
|
|
183
255
|
grid-row-end: icon;
|
|
184
256
|
}
|
|
185
257
|
|
|
186
|
-
.-
|
|
258
|
+
.-rwx0fg_d-g {
|
|
187
259
|
--iconPrimary: var(--lightningcss-light, #d45b00) var(--lightningcss-dark, #e06400);
|
|
188
260
|
}
|
|
189
261
|
|
|
190
|
-
.-
|
|
262
|
+
.-rwx0fg_d-c {
|
|
191
263
|
--iconPrimary: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #5681ff);
|
|
192
264
|
}
|
|
193
265
|
|
|
194
|
-
.-
|
|
266
|
+
.-rwx0fg_d-f {
|
|
195
267
|
--iconPrimary: var(--lightningcss-light, #079355) var(--lightningcss-dark, #099d59);
|
|
196
268
|
}
|
|
197
269
|
|
|
198
|
-
.-
|
|
270
|
+
.-rwx0fg_d-e {
|
|
199
271
|
--iconPrimary: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #fc432e);
|
|
200
272
|
}
|
|
201
273
|
|
|
202
|
-
.-
|
|
274
|
+
.-rwx0fg_d-d {
|
|
203
275
|
--iconPrimary: var(--lightningcss-light, #8f8f8f) var(--lightningcss-dark, #8a8a8a);
|
|
204
276
|
}
|
|
205
277
|
|
|
206
|
-
.-
|
|
278
|
+
.-rwx0fg_d-A {
|
|
207
279
|
--iconPrimary: white;
|
|
208
280
|
}
|
|
209
281
|
|
|
210
|
-
.-
|
|
282
|
+
.-rwx0fg_d-z {
|
|
211
283
|
--iconPrimary: black;
|
|
212
284
|
}
|
|
213
285
|
|
|
214
|
-
.
|
|
286
|
+
._3f {
|
|
215
287
|
display: grid;
|
|
216
288
|
}
|
|
217
289
|
|
|
218
|
-
.
|
|
290
|
+
.ih {
|
|
219
291
|
column-gap: 1.5rem;
|
|
220
292
|
}
|
|
221
293
|
|
|
222
|
-
.
|
|
294
|
+
.__l-1j10eqz {
|
|
223
295
|
grid-template-columns: 1fr auto;
|
|
224
296
|
}
|
|
225
297
|
|
|
226
|
-
.
|
|
298
|
+
.__m-1cy57v8 {
|
|
227
299
|
grid-template-rows: auto auto auto;
|
|
228
300
|
}
|
|
229
301
|
|
|
230
|
-
.
|
|
302
|
+
.kb {
|
|
231
303
|
width: 100%;
|
|
232
304
|
}
|
|
233
305
|
|
|
234
|
-
.
|
|
306
|
+
.__n-fb6mkc {
|
|
235
307
|
grid-template-areas: "heading icon"
|
|
236
308
|
"content content";
|
|
237
309
|
}
|
|
238
310
|
|
|
239
|
-
.
|
|
311
|
+
.Da {
|
|
240
312
|
margin-top: 0;
|
|
241
313
|
}
|
|
242
314
|
|
|
243
|
-
.
|
|
315
|
+
.__e-1c6tcyh {
|
|
244
316
|
grid-column-start: heading;
|
|
245
317
|
}
|
|
246
318
|
|
|
247
|
-
.
|
|
319
|
+
.__f-1c6tcyh {
|
|
248
320
|
grid-column-end: heading;
|
|
249
321
|
}
|
|
250
322
|
|
|
251
|
-
.
|
|
323
|
+
.__g-1c6tcyh {
|
|
252
324
|
grid-row-start: heading;
|
|
253
325
|
}
|
|
254
326
|
|
|
255
|
-
.
|
|
327
|
+
.__h-1c6tcyh {
|
|
256
328
|
grid-row-end: heading;
|
|
257
329
|
}
|
|
258
330
|
|
|
259
|
-
.
|
|
331
|
+
._id {
|
|
260
332
|
font-variation-settings: "wght" 700;
|
|
261
333
|
font-synthesis-weight: none;
|
|
262
334
|
font-weight: 700;
|
|
263
335
|
}
|
|
264
336
|
|
|
265
|
-
.
|
|
337
|
+
._ja {
|
|
266
338
|
line-height: 1.3;
|
|
267
339
|
}
|
|
268
340
|
|
|
@@ -270,37 +342,37 @@
|
|
|
270
342
|
color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
|
|
271
343
|
}
|
|
272
344
|
|
|
273
|
-
.
|
|
345
|
+
.__e-drkpd0 {
|
|
274
346
|
grid-column-start: content;
|
|
275
347
|
}
|
|
276
348
|
|
|
277
|
-
.
|
|
349
|
+
.__f-drkpd0 {
|
|
278
350
|
grid-column-end: content;
|
|
279
351
|
}
|
|
280
352
|
|
|
281
|
-
.
|
|
353
|
+
.__g-drkpd0 {
|
|
282
354
|
grid-row-start: content;
|
|
283
355
|
}
|
|
284
356
|
|
|
285
|
-
.
|
|
357
|
+
.__h-drkpd0 {
|
|
286
358
|
grid-row-end: content;
|
|
287
359
|
}
|
|
288
360
|
|
|
289
|
-
.
|
|
361
|
+
._ga {
|
|
290
362
|
font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
|
|
291
363
|
}
|
|
292
364
|
|
|
293
|
-
.
|
|
365
|
+
._he {
|
|
294
366
|
font-size: .875rem;
|
|
295
367
|
}
|
|
296
368
|
|
|
297
|
-
.
|
|
369
|
+
._ib {
|
|
298
370
|
font-variation-settings: "wght" 400;
|
|
299
371
|
font-synthesis-weight: none;
|
|
300
372
|
font-weight: 400;
|
|
301
373
|
}
|
|
302
374
|
|
|
303
|
-
.
|
|
375
|
+
._jb {
|
|
304
376
|
line-height: 1.5;
|
|
305
377
|
}
|
|
306
378
|
|
|
@@ -318,72 +390,72 @@
|
|
|
318
390
|
}
|
|
319
391
|
|
|
320
392
|
@layer _.b {
|
|
321
|
-
.
|
|
393
|
+
._i-1x99dlod:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
322
394
|
font-variation-settings: "wght" 700;
|
|
323
395
|
font-synthesis-weight: none;
|
|
324
396
|
font-weight: 700;
|
|
325
397
|
}
|
|
326
398
|
|
|
327
|
-
.
|
|
399
|
+
._j-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
328
400
|
line-height: 1.5;
|
|
329
401
|
}
|
|
330
402
|
|
|
331
|
-
.
|
|
403
|
+
._g-enzrfpb:lang(ar) {
|
|
332
404
|
font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
|
|
333
405
|
}
|
|
334
406
|
|
|
335
|
-
.
|
|
407
|
+
._j-1x99dloc:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
336
408
|
line-height: 1.7;
|
|
337
409
|
}
|
|
338
410
|
}
|
|
339
411
|
|
|
340
412
|
@layer _.b.a {
|
|
341
413
|
@media (forced-colors: active) {
|
|
342
|
-
.
|
|
414
|
+
.ca_____M {
|
|
343
415
|
outline-color: highlight;
|
|
344
416
|
}
|
|
345
417
|
}
|
|
346
418
|
}
|
|
347
419
|
|
|
348
420
|
@layer _.c {
|
|
349
|
-
.
|
|
421
|
+
._g-enzwzjc:lang(he) {
|
|
350
422
|
font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
351
423
|
}
|
|
352
424
|
}
|
|
353
425
|
|
|
354
426
|
@layer _.d {
|
|
355
|
-
.
|
|
427
|
+
._g-enzykdd:lang(ja) {
|
|
356
428
|
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
357
429
|
}
|
|
358
430
|
}
|
|
359
431
|
|
|
360
432
|
@layer _.e {
|
|
361
|
-
.
|
|
433
|
+
._g-enzzrge:lang(ko) {
|
|
362
434
|
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
363
435
|
}
|
|
364
436
|
}
|
|
365
437
|
|
|
366
438
|
@layer _.f {
|
|
367
|
-
.
|
|
439
|
+
._g-eo0c6sf:lang(zh) {
|
|
368
440
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
369
441
|
}
|
|
370
442
|
}
|
|
371
443
|
|
|
372
444
|
@layer _.g {
|
|
373
|
-
.
|
|
445
|
+
._g-1uotwbwg:lang(zh-hant) {
|
|
374
446
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
375
447
|
}
|
|
376
448
|
}
|
|
377
449
|
|
|
378
450
|
@layer _.h {
|
|
379
|
-
.
|
|
451
|
+
._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
380
452
|
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
381
453
|
}
|
|
382
454
|
}
|
|
383
455
|
|
|
384
456
|
@layer _.b.b {
|
|
385
457
|
@media not ((hover: hover) and (pointer: fine)) {
|
|
386
|
-
.
|
|
458
|
+
._hbf {
|
|
387
459
|
font-size: 1.0625rem;
|
|
388
460
|
}
|
|
389
461
|
}
|
package/dist/InlineAlert.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACyDoB;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;;;;EAiEP;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAmCA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAoBG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAiBA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzII;EAwHJ;;;;;;EAAA;;;;EAiBA;;;;EAAA;;;;;AAzII;EAAA;IAAA;;;;;;AAwHJ;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA","sources":["22171ecf279467c9","packages/@react-spectrum/s2/src/InlineAlert.tsx"],"sourcesContent":["@import \"05e5e4aa26bfa23e\";\n@import \"f0ba8200e7cea625\";\n@import \"0ad65d68fdf037be\";\n@import \"d57ae7ad1398d4b5\";\n@import \"11184415316db266\";\n","/*\n * Copyright 2023 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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport CheckmarkCircle from '../s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg';\nimport {ComponentType, createContext, forwardRef, ReactNode, useEffect, useRef} from 'react';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, style} from '../style' with {type: 'macro'};\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport InfoCircle from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useFocusRing} from 'react-aria';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface InlineAlertProps extends DOMProps, StyleProps, InlineStylesProps, SlotProps {\n /**\n * The contents of the Inline Alert.\n */\n children: ReactNode,\n /**\n * Whether to automatically focus the Inline Alert when it first renders.\n */\n autoFocus?: boolean\n}\n\ninterface InlineStylesProps {\n /**\n * The semantic tone of a Inline Alert.\n * @default neutral\n */\n variant?: 'informative' | 'positive' | 'notice' | 'negative' | 'neutral',\n /**\n * The visual style of the Inline Alert.\n * @default border\n */\n fillStyle?: 'border' | 'subtleFill' | 'boldFill'\n}\n\nexport const InlineAlertContext = createContext<ContextValue<Partial<InlineAlertProps>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst inlineAlert = style<InlineStylesProps & {isFocusVisible?: boolean}>({\n ...focusRing(),\n display: 'inline-block',\n position: 'relative',\n boxSizing: 'border-box',\n padding: 24,\n borderRadius: 'lg',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: {\n fillStyle: {\n border: {\n variant: {\n informative: 'informative-800',\n positive: 'positive-700',\n notice: 'notice-700',\n negative: 'negative-800',\n neutral: 'gray-700' // is there a semantic color name for neutral?\n }\n },\n subtleFill: 'transparent',\n boldFill: 'transparent'\n }\n },\n backgroundColor: {\n variant: {\n informative: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'informative-subtle',\n boldFill: 'informative'\n }\n },\n positive: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'positive-subtle',\n boldFill: 'positive'\n }\n },\n notice: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'notice-subtle',\n boldFill: 'notice'\n }\n },\n negative: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'negative-subtle',\n boldFill: 'negative'\n }\n },\n neutral: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'neutral-subtle',\n boldFill: 'neutral-subdued'\n }\n }\n }\n }\n}, getAllowedOverrides());\n\nconst icon = style<InlineStylesProps>({\n gridArea: 'icon',\n '--iconPrimary': {\n type: 'fill',\n value: {\n fillStyle: {\n border: {\n variant: {\n informative: 'informative',\n positive: 'positive',\n notice: 'notice',\n negative: 'negative',\n neutral: 'neutral'\n }\n },\n subtleFill: {\n variant: {\n informative: 'informative',\n positive: 'positive',\n notice: 'negative',\n negative: 'negative',\n neutral: 'neutral'\n }\n },\n boldFill: {\n default: 'white',\n variant: {\n notice: 'black'\n }\n }\n }\n }\n }\n});\n\nconst grid = style({\n display: 'grid',\n columnGap: 24,\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'auto auto auto',\n width: 'full',\n gridTemplateAreas: [\n 'heading icon',\n 'content content'\n ]\n});\n\nlet ICONS = {\n informative: InfoCircle,\n positive: CheckmarkCircle,\n notice: NoticeSquare,\n negative: AlertTriangle,\n neutral: undefined\n};\n\nconst heading = style({\n marginTop: 0,\n gridArea: 'heading',\n font: 'title-sm',\n color: {\n default: 'title',\n fillStyle: {\n boldFill: {\n default: 'white',\n variant: {\n notice: 'black'\n }\n }\n }\n }\n});\n\nconst content = style({\n gridArea: 'content',\n font: 'body-sm',\n color: {\n default: 'body',\n fillStyle: {\n boldFill: {\n default: 'white',\n variant: {\n notice: 'black'\n }\n }\n }\n }\n});\n\n/**\n * Inline alerts display a non-modal message associated with objects in a view.\n * These are often used in form validation, providing a place to aggregate feedback related to multiple fields.\n */\nexport const InlineAlert = /*#__PURE__*/ forwardRef(function InlineAlert(props: InlineAlertProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, InlineAlertContext);\n let {\n children,\n variant = 'neutral',\n fillStyle = 'border',\n autoFocus\n } = props;\n\n let domRef = useDOMRef(ref);\n\n let Icon: ComponentType<any> | null | undefined = null;\n let iconAlt = '';\n if (variant in ICONS) {\n Icon = ICONS[variant];\n if (Icon) {\n iconAlt = stringFormatter.format(`inlinealert.${variant}`);\n }\n }\n\n let {isFocusVisible, focusProps} = useFocusRing({autoFocus: props.autoFocus});\n let autoFocusRef = useRef(props.autoFocus);\n useEffect(() => {\n if (autoFocusRef.current && domRef.current) {\n domRef.current.focus();\n }\n autoFocusRef.current = false;\n }, [domRef]);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...focusProps}\n ref={domRef}\n tabIndex={autoFocus ? -1 : undefined}\n autoFocus={autoFocus}\n role=\"alert\"\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + inlineAlert({\n variant,\n fillStyle,\n isFocusVisible\n }, props.styles)}>\n <div\n className={grid}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({fillStyle})}],\n [ContentContext, {styles: content({fillStyle})}],\n [IconContext, {styles: icon({variant, fillStyle})}]\n ]}>\n {Icon && <Icon aria-label={iconAlt} />}\n {children}\n </Provider>\n </div>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"InlineAlert.css.map"}
|
|
1
|
+
{"mappings":"ACyDoB;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;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAiEP;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAmCA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAoBG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAiBA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzII;EAwHJ;;;;;;EAAA;;;;EAiBA;;;;EAAA;;;;;AAzII;EAAA;IAAA;;;;;;AAwHJ;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA","sources":["22171ecf279467c9","packages/@react-spectrum/s2/src/InlineAlert.tsx"],"sourcesContent":["@import \"05e5e4aa26bfa23e\";\n@import \"f0ba8200e7cea625\";\n@import \"0ad65d68fdf037be\";\n@import \"d57ae7ad1398d4b5\";\n@import \"11184415316db266\";\n","/*\n * Copyright 2023 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 AlertTriangle from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport CheckmarkCircle from '../s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg';\nimport {ComponentType, createContext, forwardRef, ReactNode, useEffect, useRef} from 'react';\nimport {ContentContext, HeadingContext} from './Content';\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, style} from '../style' with {type: 'macro'};\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport InfoCircle from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useFocusRing} from 'react-aria';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface InlineAlertProps extends DOMProps, StyleProps, InlineStylesProps, SlotProps {\n /**\n * The contents of the Inline Alert.\n */\n children: ReactNode,\n /**\n * Whether to automatically focus the Inline Alert when it first renders.\n */\n autoFocus?: boolean\n}\n\ninterface InlineStylesProps {\n /**\n * The semantic tone of a Inline Alert.\n * @default neutral\n */\n variant?: 'informative' | 'positive' | 'notice' | 'negative' | 'neutral',\n /**\n * The visual style of the Inline Alert.\n * @default border\n */\n fillStyle?: 'border' | 'subtleFill' | 'boldFill'\n}\n\nexport const InlineAlertContext = createContext<ContextValue<Partial<InlineAlertProps>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst inlineAlert = style<InlineStylesProps & {isFocusVisible?: boolean}>({\n ...focusRing(),\n display: 'inline-block',\n position: 'relative',\n boxSizing: 'border-box',\n padding: 24,\n borderRadius: 'lg',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: {\n fillStyle: {\n border: {\n variant: {\n informative: 'informative-800',\n positive: 'positive-700',\n notice: 'notice-700',\n negative: 'negative-800',\n neutral: 'gray-700' // is there a semantic color name for neutral?\n }\n },\n subtleFill: 'transparent',\n boldFill: 'transparent'\n }\n },\n backgroundColor: {\n variant: {\n informative: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'informative-subtle',\n boldFill: 'informative'\n }\n },\n positive: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'positive-subtle',\n boldFill: 'positive'\n }\n },\n notice: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'notice-subtle',\n boldFill: 'notice'\n }\n },\n negative: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'negative-subtle',\n boldFill: 'negative'\n }\n },\n neutral: {\n fillStyle: {\n border: 'gray-25',\n subtleFill: 'neutral-subtle',\n boldFill: 'neutral-subdued'\n }\n }\n }\n }\n}, getAllowedOverrides());\n\nconst icon = style<InlineStylesProps>({\n gridArea: 'icon',\n '--iconPrimary': {\n type: 'fill',\n value: {\n fillStyle: {\n border: {\n variant: {\n informative: 'informative',\n positive: 'positive',\n notice: 'notice',\n negative: 'negative',\n neutral: 'neutral'\n }\n },\n subtleFill: {\n variant: {\n informative: 'informative',\n positive: 'positive',\n notice: 'negative',\n negative: 'negative',\n neutral: 'neutral'\n }\n },\n boldFill: {\n default: 'white',\n variant: {\n notice: 'black'\n }\n }\n }\n }\n }\n});\n\nconst grid = style({\n display: 'grid',\n columnGap: 24,\n gridTemplateColumns: '1fr auto',\n gridTemplateRows: 'auto auto auto',\n width: 'full',\n gridTemplateAreas: [\n 'heading icon',\n 'content content'\n ]\n});\n\nlet ICONS = {\n informative: InfoCircle,\n positive: CheckmarkCircle,\n notice: NoticeSquare,\n negative: AlertTriangle,\n neutral: undefined\n};\n\nconst heading = style({\n marginTop: 0,\n gridArea: 'heading',\n font: 'title-sm',\n color: {\n default: 'title',\n fillStyle: {\n boldFill: {\n default: 'white',\n variant: {\n notice: 'black'\n }\n }\n }\n }\n});\n\nconst content = style({\n gridArea: 'content',\n font: 'body-sm',\n color: {\n default: 'body',\n fillStyle: {\n boldFill: {\n default: 'white',\n variant: {\n notice: 'black'\n }\n }\n }\n }\n});\n\n/**\n * Inline alerts display a non-modal message associated with objects in a view.\n * These are often used in form validation, providing a place to aggregate feedback related to multiple fields.\n */\nexport const InlineAlert = /*#__PURE__*/ forwardRef(function InlineAlert(props: InlineAlertProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, InlineAlertContext);\n let {\n children,\n variant = 'neutral',\n fillStyle = 'border',\n autoFocus\n } = props;\n\n let domRef = useDOMRef(ref);\n\n let Icon: ComponentType<any> | null | undefined = null;\n let iconAlt = '';\n if (variant in ICONS) {\n Icon = ICONS[variant];\n if (Icon) {\n iconAlt = stringFormatter.format(`inlinealert.${variant}`);\n }\n }\n\n let {isFocusVisible, focusProps} = useFocusRing({autoFocus: props.autoFocus});\n let autoFocusRef = useRef(props.autoFocus);\n useEffect(() => {\n if (autoFocusRef.current && domRef.current) {\n domRef.current.focus();\n }\n autoFocusRef.current = false;\n }, [domRef]);\n\n return (\n <div\n {...filterDOMProps(props)}\n {...focusProps}\n ref={domRef}\n tabIndex={autoFocus ? -1 : undefined}\n autoFocus={autoFocus}\n role=\"alert\"\n style={props.UNSAFE_style}\n className={(props.UNSAFE_className || '') + inlineAlert({\n variant,\n fillStyle,\n isFocusVisible\n }, props.styles)}>\n <div\n className={grid}>\n <Provider\n values={[\n [HeadingContext, {styles: heading({fillStyle})}],\n [ContentContext, {styles: content({fillStyle})}],\n [IconContext, {styles: icon({variant, fillStyle})}]\n ]}>\n {Icon && <Icon aria-label={iconAlt} />}\n {children}\n </Provider>\n </div>\n </div>\n );\n});\n"],"names":[],"version":3,"file":"InlineAlert.css.map"}
|