@react-spectrum/s2 1.0.0 → 1.1.0
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.cjs.map +1 -1
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionBar.cjs +62 -61
- package/dist/ActionBar.cjs.map +1 -1
- package/dist/ActionBar.css +58 -58
- package/dist/ActionBar.css.map +1 -1
- package/dist/ActionBar.mjs +62 -61
- package/dist/ActionBar.mjs.map +1 -1
- package/dist/ActionButton.cjs +234 -234
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +160 -160
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +234 -234
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +16 -16
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +16 -16
- package/dist/Add.cjs +10 -10
- package/dist/Add.css +6 -6
- package/dist/Add.mjs +10 -10
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Asterisk.cjs +6 -6
- package/dist/Asterisk.css +4 -4
- package/dist/Asterisk.mjs +6 -6
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +16 -16
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +121 -121
- package/dist/AvatarGroup.css +31 -31
- package/dist/AvatarGroup.mjs +121 -121
- package/dist/Badge.cjs +197 -197
- package/dist/Badge.css +125 -125
- package/dist/Badge.mjs +197 -197
- package/dist/Breadcrumbs.cjs +235 -235
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +100 -100
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +235 -235
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +333 -333
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +174 -174
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +333 -333
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +21 -21
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +21 -21
- package/dist/Calendar.cjs +169 -169
- package/dist/Calendar.cjs.map +1 -1
- package/dist/Calendar.css +134 -134
- package/dist/Calendar.css.map +1 -1
- package/dist/Calendar.mjs +169 -169
- package/dist/Calendar.mjs.map +1 -1
- package/dist/Card.cjs +310 -310
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +206 -206
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +310 -310
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +19 -19
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css +17 -17
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +19 -19
- package/dist/CardView.mjs.map +1 -1
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +162 -162
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +95 -91
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +162 -162
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +44 -44
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +37 -37
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +44 -44
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/Checkmark.cjs +12 -12
- package/dist/Checkmark.css +8 -8
- package/dist/Checkmark.mjs +12 -12
- package/dist/Chevron.cjs +12 -12
- package/dist/Chevron.css +10 -10
- package/dist/Chevron.mjs +12 -12
- package/dist/ClearButton.cjs +30 -30
- package/dist/ClearButton.css +30 -30
- package/dist/ClearButton.mjs +30 -30
- package/dist/CloseButton.cjs +56 -56
- package/dist/CloseButton.css +47 -47
- package/dist/CloseButton.mjs +56 -56
- package/dist/ColorArea.cjs +17 -17
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +16 -16
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +17 -17
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +32 -32
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +27 -27
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +32 -32
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +27 -27
- package/dist/ColorHandle.css +42 -42
- package/dist/ColorHandle.mjs +27 -27
- package/dist/ColorSlider.cjs +109 -109
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +52 -52
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +109 -109
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +30 -30
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +30 -30
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +30 -30
- package/dist/ColorSwatchPicker.css +48 -48
- package/dist/ColorSwatchPicker.mjs +30 -30
- package/dist/ColorWheel.cjs +31 -27
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css +17 -17
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs +31 -27
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +383 -383
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +187 -187
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +383 -383
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +50 -50
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/Cross.cjs +14 -14
- package/dist/Cross.css +10 -10
- package/dist/Cross.mjs +14 -14
- package/dist/CustomDialog.cjs +26 -26
- package/dist/CustomDialog.cjs.map +1 -1
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.css.map +1 -1
- package/dist/CustomDialog.mjs +26 -26
- package/dist/CustomDialog.mjs.map +1 -1
- package/dist/Dash.cjs +10 -10
- package/dist/Dash.css +6 -6
- package/dist/Dash.mjs +10 -10
- package/dist/DateField.cjs +74 -74
- package/dist/DateField.cjs.map +1 -1
- package/dist/DateField.css +77 -77
- package/dist/DateField.css.map +1 -1
- package/dist/DateField.mjs +74 -74
- package/dist/DateField.mjs.map +1 -1
- package/dist/DatePicker.cjs +173 -173
- package/dist/DatePicker.cjs.map +1 -1
- package/dist/DatePicker.css +128 -128
- package/dist/DatePicker.css.map +1 -1
- package/dist/DatePicker.mjs +173 -173
- package/dist/DatePicker.mjs.map +1 -1
- package/dist/DateRangePicker.cjs +56 -56
- package/dist/DateRangePicker.cjs.map +1 -1
- package/dist/DateRangePicker.css +59 -59
- package/dist/DateRangePicker.css.map +1 -1
- package/dist/DateRangePicker.mjs +56 -56
- package/dist/DateRangePicker.mjs.map +1 -1
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.cjs.map +1 -1
- package/dist/Dialog.css +70 -70
- package/dist/Dialog.css.map +1 -1
- package/dist/Dialog.mjs +17 -17
- package/dist/Dialog.mjs.map +1 -1
- package/dist/Disclosure.cjs +120 -120
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +120 -120
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +25 -25
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +26 -26
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +62 -62
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +57 -57
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +62 -62
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +348 -348
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +147 -147
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +348 -348
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css +9 -9
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs +10 -10
- package/dist/Form.mjs.map +1 -1
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.cjs.map +1 -1
- package/dist/FullscreenDialog.css +78 -78
- package/dist/FullscreenDialog.css.map +1 -1
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/FullscreenDialog.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +229 -229
- package/dist/IllustratedMessage.css +72 -72
- package/dist/IllustratedMessage.mjs +229 -229
- package/dist/Image.cjs +14 -14
- package/dist/Image.css +14 -14
- package/dist/Image.mjs +14 -14
- package/dist/InlineAlert.cjs +101 -101
- package/dist/InlineAlert.css +76 -76
- package/dist/InlineAlert.mjs +101 -101
- package/dist/Link.cjs +50 -50
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +41 -41
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +50 -50
- package/dist/Link.mjs.map +1 -1
- package/dist/LinkOut.cjs +8 -8
- package/dist/LinkOut.css +8 -8
- package/dist/LinkOut.mjs +8 -8
- package/dist/Menu.cjs +446 -443
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +184 -184
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +446 -443
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +154 -154
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +91 -91
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +154 -154
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +66 -66
- package/dist/Modal.cjs.map +1 -1
- package/dist/Modal.css +54 -54
- package/dist/Modal.css.map +1 -1
- package/dist/Modal.mjs +66 -66
- package/dist/Modal.mjs.map +1 -1
- package/dist/NotificationBadge.cjs +57 -57
- package/dist/NotificationBadge.css +49 -49
- package/dist/NotificationBadge.mjs +57 -57
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +99 -99
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +115 -115
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +275 -275
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +173 -173
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +275 -275
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +89 -89
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +70 -70
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +89 -89
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +164 -164
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +99 -99
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +164 -164
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +32 -32
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +24 -24
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +32 -32
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +11 -11
- package/dist/Provider.css +10 -10
- package/dist/Provider.mjs +11 -11
- package/dist/Radio.cjs +146 -146
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +78 -78
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +146 -146
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +42 -42
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +37 -37
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +42 -42
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeCalendar.cjs +8 -8
- package/dist/RangeCalendar.cjs.map +1 -1
- package/dist/RangeCalendar.css +10 -10
- package/dist/RangeCalendar.css.map +1 -1
- package/dist/RangeCalendar.mjs +8 -8
- package/dist/RangeCalendar.mjs.map +1 -1
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +45 -45
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +42 -42
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +180 -180
- package/dist/SegmentedControl.css +123 -123
- package/dist/SegmentedControl.mjs +180 -180
- package/dist/SelectBoxGroup.cjs +144 -144
- package/dist/SelectBoxGroup.cjs.map +1 -1
- package/dist/SelectBoxGroup.css +120 -120
- package/dist/SelectBoxGroup.css.map +1 -1
- package/dist/SelectBoxGroup.mjs +144 -144
- package/dist/SelectBoxGroup.mjs.map +1 -1
- package/dist/Slider.cjs +295 -295
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +154 -154
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +295 -295
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +116 -116
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +116 -116
- package/dist/Switch.cjs +155 -155
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +74 -74
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +155 -155
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +415 -415
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +416 -416
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +127 -127
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +105 -105
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +127 -127
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +127 -127
- package/dist/TabsPicker.cjs.map +1 -1
- package/dist/TabsPicker.css +108 -108
- package/dist/TabsPicker.css.map +1 -1
- package/dist/TabsPicker.mjs +127 -127
- package/dist/TabsPicker.mjs.map +1 -1
- package/dist/TagGroup.cjs +204 -204
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +146 -146
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +204 -204
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +54 -54
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +59 -59
- package/dist/TextField.mjs.map +1 -1
- package/dist/TimeField.cjs +52 -52
- package/dist/TimeField.cjs.map +1 -1
- package/dist/TimeField.css +47 -47
- package/dist/TimeField.css.map +1 -1
- package/dist/TimeField.mjs +52 -52
- package/dist/TimeField.mjs.map +1 -1
- package/dist/Toast.cjs +120 -120
- package/dist/Toast.cjs.map +1 -1
- package/dist/Toast.css +110 -110
- package/dist/Toast.css.map +1 -1
- package/dist/Toast.mjs +120 -120
- package/dist/Toast.mjs.map +1 -1
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +3 -3
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs +78 -78
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +65 -65
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +78 -78
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +144 -128
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +131 -127
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +144 -128
- package/dist/TreeView.mjs.map +1 -1
- package/dist/types.d.ts +68 -72
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs +12 -12
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +12 -12
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/icons/Skeleton.mjs.map +1 -1
- package/icons/runtime.cjs +16 -3
- package/icons/runtime.cjs.map +1 -1
- package/icons/runtime.mjs +16 -3
- package/icons/runtime.mjs.map +1 -1
- package/package.json +21 -21
- package/src/Accordion.tsx +1 -1
- package/src/ActionBar.tsx +2 -2
- package/src/ActionButton.tsx +1 -1
- package/src/Breadcrumbs.tsx +2 -2
- package/src/Button.tsx +2 -2
- package/src/Calendar.tsx +1 -1
- package/src/Card.tsx +1 -1
- package/src/CardView.tsx +1 -1
- package/src/Checkbox.tsx +2 -1
- package/src/CheckboxGroup.tsx +1 -1
- package/src/CoachMark.tsx +1 -1
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +1 -1
- package/src/ColorWheel.tsx +2 -2
- package/src/ComboBox.tsx +2 -2
- package/src/CustomDialog.tsx +1 -1
- package/src/DateField.tsx +1 -1
- package/src/DatePicker.tsx +1 -1
- package/src/DateRangePicker.tsx +1 -1
- package/src/Dialog.tsx +1 -1
- package/src/Disclosure.tsx +2 -2
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +1 -1
- package/src/Field.tsx +3 -3
- package/src/Form.tsx +1 -1
- package/src/FullscreenDialog.tsx +1 -1
- package/src/Link.tsx +1 -1
- package/src/Menu.tsx +11 -13
- package/src/Meter.tsx +1 -1
- package/src/Modal.tsx +1 -1
- package/src/NumberField.tsx +1 -1
- package/src/Picker.tsx +3 -3
- package/src/Popover.tsx +2 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/Radio.tsx +1 -1
- package/src/RadioGroup.tsx +1 -1
- package/src/RangeCalendar.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SelectBoxGroup.tsx +1 -1
- package/src/Slider.tsx +1 -1
- package/src/Switch.tsx +1 -1
- package/src/TableView.tsx +9 -9
- package/src/Tabs.tsx +4 -4
- package/src/TabsPicker.tsx +2 -2
- package/src/TagGroup.tsx +2 -2
- package/src/TextField.tsx +1 -1
- package/src/TimeField.tsx +1 -1
- package/src/Toast.tsx +1 -1
- package/src/ToggleButton.tsx +1 -1
- package/src/ToggleButtonGroup.tsx +1 -1
- package/src/Tooltip.tsx +1 -1
- package/src/TreeView.tsx +10 -6
- package/style/__tests__/mergeStyles.test.ts +68 -0
- package/style/__tests__/style-macro.test.js +79 -59
- package/style/dist/style-macro.cjs +65 -14
- package/style/dist/style-macro.cjs.map +1 -1
- package/style/dist/style-macro.mjs +65 -14
- package/style/dist/style-macro.mjs.map +1 -1
- package/style/runtime.ts +21 -5
- package/style/style-macro.ts +81 -16
- package/style/__tests__/mergeStyles.test.js +0 -32
package/dist/Toast.css
CHANGED
|
@@ -1,464 +1,464 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.Wu11 {
|
|
3
3
|
top: 16px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._lu11 {
|
|
7
7
|
bottom: 16px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.IC11 {
|
|
11
11
|
margin-inline-start: 1rem;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.HM11 {
|
|
15
15
|
margin-inline-end: auto;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.HC11 {
|
|
19
19
|
margin-inline-end: 1rem;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.Ka11 {
|
|
23
23
|
max-height: 100%;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
._Pc11 {
|
|
27
27
|
position: relative;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
._ta11 {
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
._tb11 {
|
|
35
35
|
flex-direction: column-reverse;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.Jy11 {
|
|
39
39
|
margin-top: 0;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.Gy11 {
|
|
43
43
|
margin-bottom: 0;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.Tf11 {
|
|
47
47
|
padding-top: 16px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
.Tt11 {
|
|
51
51
|
padding-top: 8px;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
.Qt11 {
|
|
55
55
|
padding-bottom: 8px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
.Qf11 {
|
|
59
59
|
padding-bottom: 16px;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
.Sd11 {
|
|
63
63
|
padding-inline-start: 0;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
.St11 {
|
|
67
67
|
padding-inline-start: 8px;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.
|
|
70
|
+
.Rd11 {
|
|
71
71
|
padding-inline-end: 0;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.
|
|
74
|
+
.Iy11 {
|
|
75
75
|
margin-inline-start: 0;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.
|
|
78
|
+
.Ic11 {
|
|
79
79
|
margin-inline-start: -.5rem;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
.Hy11 {
|
|
83
83
|
margin-inline-end: 0;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.
|
|
86
|
+
.Hc11 {
|
|
87
87
|
margin-inline-end: -.5rem;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.
|
|
90
|
+
._Na11 {
|
|
91
91
|
overflow-x: auto;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
.
|
|
94
|
+
.Pa11 {
|
|
95
95
|
overflow-y: auto;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.
|
|
98
|
+
._Le11 {
|
|
99
99
|
outline-style: none;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
._Lf11 {
|
|
103
103
|
outline-style: solid;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
.Oh11 {
|
|
107
107
|
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
.
|
|
110
|
+
.Ok11 {
|
|
111
111
|
outline-color: #fff;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.
|
|
114
|
+
._Mc11 {
|
|
115
115
|
outline-width: 2px;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
118
|
+
._Kd11 {
|
|
119
119
|
outline-offset: 2px;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
.
|
|
122
|
+
.Ul11 {
|
|
123
123
|
row-gap: 1rem;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.
|
|
126
|
+
.ql11 {
|
|
127
127
|
column-gap: 1rem;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.
|
|
130
|
+
.Sf11 {
|
|
131
131
|
padding-inline-start: 16px;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
.
|
|
134
|
+
.Rt11 {
|
|
135
135
|
padding-inline-end: 8px;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.
|
|
138
|
+
.Te11 {
|
|
139
139
|
padding-top: 12px;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
.
|
|
142
|
+
.Qe11 {
|
|
143
143
|
padding-bottom: 12px;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
.
|
|
146
|
+
.oc11 {
|
|
147
147
|
border-start-start-radius: .625rem;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.
|
|
150
|
+
.nc11 {
|
|
151
151
|
border-start-end-radius: .625rem;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
.
|
|
154
|
+
.kc11 {
|
|
155
155
|
border-end-start-radius: .625rem;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.
|
|
158
|
+
.jc11 {
|
|
159
159
|
border-end-end-radius: .625rem;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
.
|
|
162
|
+
.Mj11 {
|
|
163
163
|
min-height: calc(3.5rem * var(--s2-scale));
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.-Zn3gsb-
|
|
166
|
+
.-Zn3gsb-L0uB6Qb11 {
|
|
167
167
|
--maxWidth: calc(21rem * var(--s2-scale));
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
.
|
|
170
|
+
.LksArhc11 {
|
|
171
171
|
max-width: min(var(--maxWidth), 90vw);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
.
|
|
174
|
+
._oa11 {
|
|
175
175
|
box-sizing: border-box;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
.
|
|
178
|
+
._va11 {
|
|
179
179
|
flex-shrink: 0;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
.
|
|
182
|
+
.uk11 {
|
|
183
183
|
font-family: var(--s2-font-family-sans, adobe-clean-spectrum-vf), adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
.-_6BNtrc-
|
|
186
|
+
.-_6BNtrc-c11 {
|
|
187
187
|
--fs: pow(1.125, 0);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
.
|
|
190
|
+
.vx11 {
|
|
191
191
|
font-size: round(var(--s2-font-size-base, 14) * var(--fs) / 16 * 1rem, 1px);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.
|
|
194
|
+
.xb11 {
|
|
195
195
|
font-weight: 400;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.
|
|
198
|
+
._xa11 {
|
|
199
199
|
font-synthesis-weight: none;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
.
|
|
202
|
+
._Fd11 {
|
|
203
203
|
line-height: round(1em * (1.15 + (1 - ((min(32, var(--s2-font-size-base, 14) * var(--fs)) - 10)) / 22) * .15), 2px);
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
.
|
|
206
|
+
.px11 {
|
|
207
207
|
color: #fff;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
.
|
|
210
|
+
.g611 {
|
|
211
211
|
background-color: var(--lightningcss-light, #505050) var(--lightningcss-dark, #6d6d6d);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
.
|
|
214
|
+
.g211 {
|
|
215
215
|
background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #4069fd);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.
|
|
218
|
+
.g111 {
|
|
219
219
|
background-color: var(--lightningcss-light, #05834e) var(--lightningcss-dark, #068850);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.
|
|
222
|
+
.gB11 {
|
|
223
223
|
background-color: var(--lightningcss-light, #d73220) var(--lightningcss-dark, #df3422);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
.-_8sjo0b-
|
|
226
|
+
.-_8sjo0b-t5ZbAob11 {
|
|
227
227
|
--iconPrimary: currentColor;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
.
|
|
230
|
+
._nLeasBb11 {
|
|
231
231
|
box-shadow: 0 4px 12px var(--lightningcss-light, #00000014) var(--lightningcss-dark, #0000003d), 0 2px 6px var(--lightningcss-light, #0000000a) var(--lightningcss-dark, #0000001f), 0 0 2px var(--lightningcss-light, #0000001f) var(--lightningcss-dark, #0000005c);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.
|
|
234
|
+
._nd11 {
|
|
235
235
|
box-shadow: none;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.
|
|
238
|
+
._8d11 {
|
|
239
239
|
will-change: transform;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
.
|
|
242
|
+
.se11 {
|
|
243
243
|
display: grid;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
.
|
|
246
|
+
.D4w1sLc11 {
|
|
247
247
|
grid-template-columns: auto 1fr auto;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
.
|
|
250
|
+
.CWLL0Xb11 {
|
|
251
251
|
grid-template-areas: "content content content"
|
|
252
252
|
"expand . action";
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
.
|
|
255
|
+
._ub11 {
|
|
256
256
|
flex-grow: 1;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
.
|
|
259
|
+
._wb11 {
|
|
260
260
|
flex-wrap: wrap;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
.
|
|
263
|
+
.eb11 {
|
|
264
264
|
align-items: center;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
.
|
|
267
|
+
.qj11 {
|
|
268
268
|
column-gap: 1.5rem;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
.
|
|
271
|
+
.ea11 {
|
|
272
272
|
align-items: baseline;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
.
|
|
275
|
+
.zk52g2d11 {
|
|
276
276
|
grid-column-start: content;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
.
|
|
279
|
+
.yk52g2d11 {
|
|
280
280
|
grid-column-end: content;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.
|
|
283
|
+
.Bk52g2d11 {
|
|
284
284
|
grid-row-start: content;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
.
|
|
287
|
+
.Ak52g2d11 {
|
|
288
288
|
grid-row-end: content;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
.
|
|
291
|
+
.ri11 {
|
|
292
292
|
cursor: default;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.
|
|
295
|
+
.ZJ11 {
|
|
296
296
|
width: fit-content;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.-nTSCV-
|
|
299
|
+
.-nTSCV-LTAEPe11 {
|
|
300
300
|
overflow-wrap: break-word;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
.
|
|
303
|
+
.__ZLTAEPe11 {
|
|
304
304
|
word-break: break-word;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
.
|
|
307
|
+
.Na11 {
|
|
308
308
|
min-width: 0;
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
.
|
|
311
|
+
._pb11 {
|
|
312
312
|
--lightningcss-light: initial;
|
|
313
313
|
--lightningcss-dark: ;
|
|
314
314
|
color-scheme: light;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
.
|
|
317
|
+
.sk11 {
|
|
318
318
|
display: none;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
.
|
|
321
|
+
.sd11 {
|
|
322
322
|
display: flex;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
.
|
|
325
|
+
._Cb11 {
|
|
326
326
|
justify-content: end;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
.
|
|
329
|
+
.Ue11 {
|
|
330
330
|
row-gap: .5rem;
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
.
|
|
333
|
+
.qe11 {
|
|
334
334
|
column-gap: .5rem;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
.
|
|
337
|
+
._Ia11 {
|
|
338
338
|
opacity: 0;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
.
|
|
341
|
+
._Ib11 {
|
|
342
342
|
opacity: 1;
|
|
343
343
|
}
|
|
344
344
|
|
|
345
|
-
.
|
|
345
|
+
._Pb11 {
|
|
346
346
|
position: fixed;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
.
|
|
349
|
+
.Wr11 {
|
|
350
350
|
top: 0;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
.
|
|
353
|
+
._lr11 {
|
|
354
354
|
bottom: 0;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
.
|
|
357
|
+
._Ar11 {
|
|
358
358
|
inset-inline-start: 0;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
.
|
|
361
|
+
._zr11 {
|
|
362
362
|
inset-inline-end: 0;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
.
|
|
365
|
+
.g811 {
|
|
366
366
|
background-color: #00000070;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
.
|
|
369
|
+
.zPgKvMe11 {
|
|
370
370
|
grid-column-start: expand;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
.
|
|
373
|
+
.yPgKvMe11 {
|
|
374
374
|
grid-column-end: expand;
|
|
375
375
|
}
|
|
376
376
|
|
|
377
|
-
.
|
|
377
|
+
.BPgKvMe11 {
|
|
378
378
|
grid-row-start: expand;
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
-
.
|
|
381
|
+
.APgKvMe11 {
|
|
382
382
|
grid-row-end: expand;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
.
|
|
385
|
+
.IM11 {
|
|
386
386
|
margin-inline-start: auto;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
.
|
|
389
|
+
.zzz3eAe11 {
|
|
390
390
|
grid-column-start: action;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
.
|
|
393
|
+
.yzz3eAe11 {
|
|
394
394
|
grid-column-end: action;
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
-
.
|
|
397
|
+
.Bzz3eAe11 {
|
|
398
398
|
grid-row-start: action;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
.
|
|
401
|
+
.Azz3eAe11 {
|
|
402
402
|
grid-row-end: action;
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
@layer _.b {
|
|
407
|
-
.
|
|
407
|
+
.ucJ9TBTb11:lang(ar) {
|
|
408
408
|
font-family: adobe-clean-arabic, myriad-arabic, ui-sans-serif, system-ui, sans-serif;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
.
|
|
411
|
+
._FnuYUweb11:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
412
412
|
line-height: 1.5;
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
@layer _.b.l {
|
|
417
417
|
@media (forced-colors: active) {
|
|
418
|
-
.
|
|
418
|
+
.Olc11 {
|
|
419
419
|
outline-color: highlight;
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
@layer _.c {
|
|
425
|
-
.
|
|
425
|
+
.ud3Euai11:lang(he) {
|
|
426
426
|
font-family: adobe-clean-hebrew, myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
@layer _.d {
|
|
431
|
-
.
|
|
431
|
+
.uea11:lang(ja) {
|
|
432
432
|
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
@layer _.e {
|
|
437
|
-
.
|
|
437
|
+
.ugb11:lang(ko) {
|
|
438
438
|
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
@layer _.f {
|
|
443
|
-
.
|
|
443
|
+
.uhd11:lang(zh) {
|
|
444
444
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
@layer _.g {
|
|
449
|
-
.
|
|
449
|
+
.uje11:lang(zh-hant) {
|
|
450
450
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
@layer _.h {
|
|
455
|
-
.
|
|
455
|
+
.u2NhKxcl11:lang(zh-HK) {
|
|
456
456
|
font-family: adobe-clean-han-hong-kong, source-han-hong-kong, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
@layer _.i {
|
|
461
|
-
.
|
|
461
|
+
.uic11:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
462
462
|
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
463
463
|
}
|
|
464
464
|
}
|
package/dist/Toast.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AC+IoB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA+CF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CC;;;;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;;;;EAyCD;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAmBG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAYJ;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0GuC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA2IpC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0BA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAnbA;EA4FD;;;;EAAA;;;;;AA5FC;EAAA;IAAA;;;;;;AA4FD;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["6dc577186b5a1727","packages/@react-spectrum/s2/src/Toast.tsx"],"sourcesContent":["@import \"a0170cf5756cc69c\";\n@import \"a2ac041fc39dd90c\";\n@import \"edbbbe6b05e0b3b2\";\n@import \"9dfb5fe5fb904d99\";\n@import \"6adef38be65b19a3\";\n@import \"591ce9936d0f37f8\";\n@import \"1be8abfe00176762\";\n@import \"e2df49088a479e17\";\n@import \"e897bf6437583377\";\n","/*\n * Copyright 2025 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 {ActionButton} from './ActionButton';\nimport AlertIcon from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg';\nimport Chevron from '../s2wf-icons/S2_Icon_ChevronDown_20_N.svg';\nimport {CloseButton} from './CloseButton';\nimport {createContext, ReactNode, useContext, useEffect, useMemo, useRef} from 'react';\nimport {DOMProps} from '@react-types/shared';\nimport {filterDOMProps, isWebKit, useEvent} from '@react-aria/utils';\nimport {flushSync} from 'react-dom';\nimport {focusRing, style} from '../style' with {type: 'macro'};\nimport {FocusScope, useModalOverlay} from 'react-aria';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ToastOptions as RACToastOptions, UNSTABLE_Toast as Toast, UNSTABLE_ToastContent as ToastContent, UNSTABLE_ToastList as ToastList, ToastProps, UNSTABLE_ToastQueue as ToastQueue, UNSTABLE_ToastRegion as ToastRegion, ToastRegionProps, UNSTABLE_ToastStateContext as ToastStateContext} from 'react-aria-components';\nimport {Text} from './Content';\nimport toastCss from './Toast.module.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useMediaQuery} from '@react-spectrum/utils';\nimport {useOverlayTriggerState} from 'react-stately';\n\nexport type ToastPlacement = 'top' | 'top end' | 'bottom' | 'bottom end';\nexport interface ToastContainerProps extends Omit<ToastRegionProps<SpectrumToastValue>, 'queue' | 'children' | 'style' | 'className'> {\n /**\n * Placement of the toast container on the page.\n * @default \"bottom\"\n */\n placement?: ToastPlacement\n}\n\nexport interface ToastOptions extends Omit<RACToastOptions, 'priority'>, DOMProps {\n /** A label for the action button within the toast. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Whether the toast should automatically close when an action is performed. */\n shouldCloseOnAction?: boolean\n}\n\nexport interface SpectrumToastValue extends DOMProps {\n /** The content of the toast. */\n children: string,\n /** The variant (i.e. color) of the toast. */\n variant: 'positive' | 'negative' | 'info' | 'neutral',\n /** A label for the action button within the toast. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Whether the toast should automatically close when an action is performed. */\n shouldCloseOnAction?: boolean\n}\n\nlet globalReduceMotion = false;\nfunction startViewTransition(fn: () => void, type: string) {\n if ('startViewTransition' in document) {\n // Safari doesn't support :active-view-transition-type() yet, so we fall back to a class on the html element.\n document.documentElement.classList.add(toastCss[type]);\n if (globalReduceMotion) {\n document.documentElement.classList.add(toastCss.reduceMotion);\n }\n\n let viewTransition = document.startViewTransition(() => flushSync(fn));\n\n viewTransition.ready.catch(() => {});\n viewTransition.finished.then(() => {\n document.documentElement.classList.remove(toastCss[type], toastCss.reduceMotion);\n });\n } else {\n fn();\n }\n}\n\n// There is a single global toast queue instance for the whole app, initialized lazily.\nlet globalToastQueue: ToastQueue<SpectrumToastValue> | null = null;\nfunction getGlobalToastQueue() {\n if (!globalToastQueue) {\n globalToastQueue = new ToastQueue({\n maxVisibleToasts: Infinity,\n wrapUpdate(fn, action) {\n startViewTransition(fn, `toast-${action}`);\n }\n });\n }\n\n return globalToastQueue;\n}\n\nfunction addToast(children: string, variant: SpectrumToastValue['variant'], options: ToastOptions = {}) {\n let value = {\n children,\n variant,\n actionLabel: options.actionLabel,\n onAction: options.onAction,\n shouldCloseOnAction: options.shouldCloseOnAction,\n ...filterDOMProps(options)\n };\n\n // Minimum time of 5s from https://spectrum.adobe.com/page/toast/#Auto-dismissible\n // Actionable toasts cannot be auto dismissed. That would fail WCAG SC 2.2.1.\n // It is debatable whether non-actionable toasts would also fail.\n let timeout = options.timeout && !options.actionLabel ? Math.max(options.timeout, 5000) : undefined;\n let queue = getGlobalToastQueue();\n let key = queue.add(value, {timeout, onClose: options.onClose});\n return () => queue.close(key);\n}\n\ntype CloseFunction = () => void;\n\nconst SpectrumToastQueue = {\n /** Queues a neutral toast. */\n neutral(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'neutral', options);\n },\n /** Queues a positive toast. */\n positive(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'positive', options);\n },\n /** Queues a negative toast. */\n negative(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'negative', options);\n },\n /** Queues an informational toast. */\n info(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'info', options);\n }\n};\n\nexport {SpectrumToastQueue as ToastQueue};\n\nconst toastRegion = style({\n ...focusRing(),\n display: 'flex',\n flexDirection: {\n placement: {\n top: 'column',\n bottom: 'column-reverse'\n }\n },\n position: 'fixed',\n insetX: 0,\n width: 'fit',\n top: {\n placement: {\n top: {\n default: 16,\n isExpanded: 0\n }\n }\n },\n bottom: {\n placement: {\n bottom: {\n default: 16,\n isExpanded: 0\n }\n }\n },\n marginStart: {\n align: {\n start: 16,\n center: 'auto',\n end: 'auto'\n }\n },\n marginEnd: {\n align: {\n start: 'auto',\n center: 'auto',\n end: 16\n }\n },\n boxSizing: 'border-box',\n maxHeight: 'full',\n borderRadius: 'lg'\n});\n\nconst toastList = style({\n position: 'relative',\n flexGrow: 1,\n display: 'flex',\n gap: 8,\n flexDirection: {\n placement: {\n top: 'column',\n bottom: 'column-reverse'\n }\n },\n boxSizing: 'border-box',\n marginY: 0,\n padding: {\n default: 0,\n // Add padding when expanded to account for focus ring.\n isExpanded: 8\n },\n paddingBottom: {\n isExpanded: {\n placement: {\n top: 8,\n bottom: 16\n }\n }\n },\n paddingTop: {\n isExpanded: {\n placement: {\n top: 16,\n bottom: 8\n }\n }\n },\n margin: 0,\n marginX: {\n default: 0,\n // Undo padding for focus ring.\n isExpanded: -8\n },\n overflow: {\n isExpanded: 'auto'\n }\n});\n\nconst toastStyle = style({\n ...focusRing(),\n outlineColor: {\n default: 'focus-ring',\n isExpanded: 'white'\n },\n display: 'flex',\n gap: 16,\n paddingStart: 16,\n paddingEnd: 8,\n paddingY: 12,\n borderRadius: 'lg',\n minHeight: 56,\n '--maxWidth': {\n type: 'maxWidth',\n value: 336\n },\n maxWidth: 'min(var(--maxWidth), 90vw)',\n boxSizing: 'border-box',\n flexShrink: 0,\n font: 'ui',\n color: 'white',\n backgroundColor: {\n variant: {\n neutral: 'neutral-subdued',\n info: 'informative',\n positive: 'positive',\n negative: 'negative'\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n boxShadow: {\n default: 'elevated',\n isExpanded: 'none'\n },\n willChange: 'transform'\n});\n\nconst toastBody = style({\n // The top toast in a non-expanded stack has the expand button, so it is rendered as a grid.\n // Otherwise it uses flex so the content can wrap when needed.\n display: {\n default: 'grid',\n isSingle: 'flex'\n },\n gridTemplateColumns: ['auto', '1fr', 'auto'],\n gridTemplateAreas: [\n 'content content content',\n 'expand . action'\n ],\n flexGrow: 1,\n flexWrap: 'wrap',\n alignItems: 'center',\n columnGap: 24,\n rowGap: 8\n});\n\nconst toastContent = style({\n display: 'flex',\n gap: 8,\n alignItems: 'baseline',\n gridArea: 'content',\n cursor: 'default',\n width: 'fit',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n minWidth: 0\n});\n\nconst controls = style({\n colorScheme: 'light',\n display: {\n default: 'none',\n isExpanded: 'flex'\n },\n justifyContent: 'end',\n gap: 8,\n opacity: {\n default: 0,\n isExpanded: 1\n }\n});\n\nconst ICONS = {\n info: InfoIcon,\n negative: AlertIcon,\n positive: CheckmarkIcon\n};\n\ninterface ToastContainerContextValue {\n isExpanded: boolean,\n toggleExpanded: () => void\n}\n\nconst ToastContainerContext = createContext<ToastContainerContextValue | null>(null);\n\n/**\n * A ToastContainer renders the queued toasts in an application. It should be placed\n * at the root of the app.\n */\nexport function ToastContainer(props: ToastContainerProps): ReactNode {\n let {\n placement = 'bottom'\n } = props;\n let queue = getGlobalToastQueue();\n let align = 'center';\n [placement, align = 'center'] = placement.split(' ') as any;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let regionRef = useRef<HTMLDivElement | null>(null);\n\n let state = useOverlayTriggerState({});\n let {isOpen: isExpanded, close, toggle} = state;\n let ctx = useMemo(() => ({\n isExpanded,\n toggleExpanded() {\n if (!isExpanded && queue.visibleToasts.length <= 1) {\n return;\n }\n\n startViewTransition(\n () => toggle(),\n isExpanded ? 'toast-collapse' : 'toast-expand'\n );\n }\n }), [isExpanded, toggle, queue]);\n\n // Set the state to collapsed whenever the queue is emptied.\n useEffect(() => {\n return queue.subscribe(() => {\n if (queue.visibleToasts.length === 0 && isExpanded) {\n close();\n }\n });\n }, [queue, isExpanded, close]);\n\n let collapse = () => {\n regionRef.current?.focus();\n ctx.toggleExpanded();\n };\n\n // Prevent scroll, aria hide outside, and contain focus when expanded, since we take over the whole screen.\n // Attach event handler to the ref since ToastRegion doesn't pass through onKeyDown.\n useModalOverlay({}, state, regionRef);\n useEvent(regionRef, 'keydown', isExpanded ? (e) => {\n if (e.key === 'Escape') {\n collapse();\n }\n } : undefined);\n\n let prefersReducedMotion = useMediaQuery('(prefers-reduced-motion)');\n let reduceMotion = props['PRIVATE_forceReducedMotion'] ?? prefersReducedMotion;\n useEffect(() => {\n let oldGlobalReduceMotion = globalReduceMotion;\n globalReduceMotion = reduceMotion;\n return () => {\n globalReduceMotion = oldGlobalReduceMotion;\n };\n }, [reduceMotion]);\n\n return (\n <ToastRegion\n {...props}\n ref={regionRef}\n queue={queue}\n className={renderProps => toastRegion({\n ...renderProps,\n placement,\n align,\n isExpanded\n })}>\n <FocusScope contain={isExpanded}>\n <ToastContainerContext.Provider value={ctx}>\n {isExpanded && (\n // eslint-disable-next-line\n <div\n className={toastCss['toast-background'] + style({position: 'fixed', inset: 0, backgroundColor: 'transparent-black-500'})}\n onClick={collapse} />\n )}\n <SpectrumToastList\n placement={placement}\n align={align}\n reduceMotion={reduceMotion} />\n <div className={toastCss['toast-controls'] + controls({isExpanded})}>\n <ActionButton\n size=\"S\"\n onPress={() => queue.clear()}\n // Default focus ring does not have enough contrast against gray background.\n UNSAFE_style={{outlineColor: 'white'}}>\n {stringFormatter.format('toast.clearAll')}\n </ActionButton>\n <ActionButton\n size=\"S\"\n onPress={collapse}\n UNSAFE_style={{outlineColor: 'white'}}>\n {stringFormatter.format('toast.collapse')}\n </ActionButton>\n </div>\n </ToastContainerContext.Provider>\n </FocusScope>\n </ToastRegion>\n );\n}\n\nfunction SpectrumToastList({placement, align, reduceMotion}) {\n let {isExpanded, toggleExpanded} = useContext(ToastContainerContext)!;\n\n // Attach click handler to ref since ToastList doesn't pass through onClick/onPress.\n let toastListRef = useRef(null);\n useEvent(toastListRef, 'click', (e) => {\n // Have to check if this is a button because stopPropagation in react events doesn't affect native events.\n if (!isExpanded && !(e.target as Element)?.closest('button')) {\n toggleExpanded();\n }\n });\n\n return (\n <ToastList<SpectrumToastValue>\n ref={toastListRef}\n style={({isHovered}) => {\n let origin = isHovered ? 95 : 55;\n return {\n perspective: 80,\n perspectiveOrigin: 'center ' + (placement === 'top' ? `calc(100% + ${origin}px)` : `${-origin}px`),\n transition: 'perspective-origin 400ms'\n };\n }}\n className={toastCss[isExpanded ? 'toast-list-expanded' : 'toast-list-collapsed'] + toastList({placement, align, isExpanded})}>\n {({toast}) => (\n <SpectrumToast\n toast={toast}\n placement={placement}\n align={align}\n reduceMotion={reduceMotion} />\n )}\n </ToastList>\n );\n}\n\ninterface SpectrumToastProps extends ToastProps<SpectrumToastValue> {\n placement?: 'top' | 'bottom',\n align?: 'start' | 'center' | 'end',\n reduceMotion?: boolean\n}\n\n// Exported locally for stories.\nexport function SpectrumToast(props: SpectrumToastProps): ReactNode {\n let {toast, placement = 'bottom', align = 'center'} = props;\n let variant = toast.content.variant || 'info';\n let Icon = ICONS[variant];\n let state = useContext(ToastStateContext)!;\n let visibleToasts = state.visibleToasts;\n let index = visibleToasts.indexOf(toast);\n let isMain = index <= 0;\n let ctx = useContext(ToastContainerContext);\n let isExpanded = ctx?.isExpanded || false;\n let toastRef = useRef<HTMLDivElement | null>(null);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n // When not expanded, use a presentational div for the toasts behind the top one.\n // The content is invisible, all we show is the background color.\n if (!isMain && ctx && !ctx.isExpanded) {\n return (\n <div\n role=\"presentation\"\n style={{\n position: 'absolute',\n [placement === 'top' ? 'bottom' : 'top']: 0,\n left: 0,\n width: '100%',\n translate: `0 0 ${(-12 * index) / 16}rem`,\n // Only 3 toasts are visible in the stack at once, but all toasts are in the DOM.\n // This allows view transitions to smoothly animate them from where they would be\n // in the collapsed stack to their final position in the expanded list.\n opacity: index >= 3 ? 0 : 1,\n zIndex: visibleToasts.length - index - 1,\n // When reduced motion is enabled, use append index to view-transition-name\n // so that adding/removing a toast cross fades instead of transitioning the position.\n // This works because the toasts are seen as separate elements instead of the same one when their index changes.\n viewTransitionName: toast.key + (props.reduceMotion ? '-' + index : ''),\n viewTransitionClass: [toastCss.toast, toastCss['background-toast']].map(c => CSS.escape(c)).join(' ')\n }}\n className={toastCss.toast + toastStyle({variant: toast.content.variant || 'info', index, isExpanded})}\n ref={fixSafariTransform} />\n );\n }\n\n return (\n <Toast\n ref={toastRef}\n toast={toast}\n style={{\n zIndex: visibleToasts.length - index - 1,\n viewTransitionName: toast.key,\n viewTransitionClass: [toastCss.toast, !isMain ? toastCss['background-toast'] : '', toastCss[placement], toastCss[align]].filter(Boolean).map(c => CSS.escape(c)).join(' ')\n }}\n className={renderProps => toastCss.toast + toastStyle({\n ...renderProps,\n variant: toast.content.variant || 'info',\n index,\n isExpanded\n })}>\n <div role=\"presentation\" className={toastBody({isSingle: !isMain || visibleToasts.length <= 1 || isExpanded})}>\n <ToastContent className={toastContent + (ctx && isMain ? ` ${toastCss['toast-content']}` : null)}>\n {Icon &&\n <CenterBaseline>\n <Icon />\n </CenterBaseline>\n }\n <Text slot=\"title\">{toast.content.children}</Text>\n </ToastContent>\n {!isExpanded && visibleToasts.length > 1 &&\n <ActionButton\n isQuiet\n staticColor=\"white\"\n styles={style({gridArea: 'expand'})}\n // Make the chevron line up with the toast text, even though there is padding within the button.\n UNSAFE_style={{marginInlineStart: variant === 'neutral' ? -10 : 14}}\n UNSAFE_className={ctx && isMain ? toastCss['toast-expand'] : undefined}\n onPress={() => {\n // This button disappears when clicked, so move focus to the toast.\n toastRef.current?.focus();\n ctx?.toggleExpanded();\n }}>\n <Text>{stringFormatter.format('toast.showAll')}</Text>\n {/* @ts-ignore */}\n <Chevron UNSAFE_style={{rotate: placement === 'bottom' ? '180deg' : undefined}} />\n </ActionButton>\n }\n {toast.content.actionLabel &&\n <Button\n variant=\"secondary\"\n fillStyle=\"outline\"\n staticColor=\"white\"\n onPress={() => {\n toast.content.onAction?.();\n if (toast.content.shouldCloseOnAction) {\n state.close(toast.key);\n }\n }}\n UNSAFE_className={ctx && isMain ? toastCss['toast-action'] : undefined}\n styles={style({marginStart: 'auto', gridArea: 'action'})}>\n {toast.content.actionLabel}\n </Button>\n }\n </div>\n <CloseButton\n staticColor=\"white\"\n UNSAFE_className={ctx && isMain ? toastCss['toast-close'] : undefined} />\n </Toast>\n );\n}\n\nfunction fixSafariTransform(el: HTMLDivElement | null) {\n // Safari has a bug where the toasts display in the wrong position (CSS transform is not applied correctly).\n // Work around this by removing it, forcing a reflow, and re-applying.\n if (el && isWebKit()) {\n let translate = el.style.translate;\n el.style.translate = '';\n el.offsetHeight;\n el.style.translate = translate;\n }\n}\n"],"names":[],"version":3,"file":"Toast.css.map"}
|
|
1
|
+
{"mappings":"AC+IoB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA+CF;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA6CC;;;;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;;;;EAyCD;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAmBG;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAYJ;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0GuC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA2IpC;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0BA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAnbA;EA4FD;;;;EAAA;;;;;AA5FC;EAAA;IAAA;;;;;;AA4FD;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["6dc577186b5a1727","packages/@react-spectrum/s2/src/Toast.tsx"],"sourcesContent":["@import \"a0170cf5756cc69c\";\n@import \"a2ac041fc39dd90c\";\n@import \"edbbbe6b05e0b3b2\";\n@import \"9dfb5fe5fb904d99\";\n@import \"6adef38be65b19a3\";\n@import \"591ce9936d0f37f8\";\n@import \"1be8abfe00176762\";\n@import \"e2df49088a479e17\";\n@import \"e897bf6437583377\";\n","/*\n * Copyright 2025 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 {ActionButton} from './ActionButton';\nimport AlertIcon from '../s2wf-icons/S2_Icon_AlertTriangle_20_N.svg';\nimport {Button} from './Button';\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../s2wf-icons/S2_Icon_CheckmarkCircle_20_N.svg';\nimport Chevron from '../s2wf-icons/S2_Icon_ChevronDown_20_N.svg';\nimport {CloseButton} from './CloseButton';\nimport {createContext, ReactNode, useContext, useEffect, useMemo, useRef} from 'react';\nimport {DOMProps} from '@react-types/shared';\nimport {filterDOMProps, isWebKit, useEvent} from '@react-aria/utils';\nimport {flushSync} from 'react-dom';\nimport {focusRing, style} from '../style' with {type: 'macro'};\nimport {FocusScope, useModalOverlay} from 'react-aria';\nimport InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ToastOptions as RACToastOptions, UNSTABLE_Toast as Toast, UNSTABLE_ToastContent as ToastContent, UNSTABLE_ToastList as ToastList, ToastProps, UNSTABLE_ToastQueue as ToastQueue, UNSTABLE_ToastRegion as ToastRegion, ToastRegionProps, UNSTABLE_ToastStateContext as ToastStateContext} from 'react-aria-components';\nimport {Text} from './Content';\nimport toastCss from './Toast.module.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useMediaQuery} from '@react-spectrum/utils';\nimport {useOverlayTriggerState} from 'react-stately';\n\nexport type ToastPlacement = 'top' | 'top end' | 'bottom' | 'bottom end';\nexport interface ToastContainerProps extends Omit<ToastRegionProps<SpectrumToastValue>, 'queue' | 'children' | 'style' | 'className' | 'render'> {\n /**\n * Placement of the toast container on the page.\n * @default \"bottom\"\n */\n placement?: ToastPlacement\n}\n\nexport interface ToastOptions extends Omit<RACToastOptions, 'priority'>, DOMProps {\n /** A label for the action button within the toast. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Whether the toast should automatically close when an action is performed. */\n shouldCloseOnAction?: boolean\n}\n\nexport interface SpectrumToastValue extends DOMProps {\n /** The content of the toast. */\n children: string,\n /** The variant (i.e. color) of the toast. */\n variant: 'positive' | 'negative' | 'info' | 'neutral',\n /** A label for the action button within the toast. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Whether the toast should automatically close when an action is performed. */\n shouldCloseOnAction?: boolean\n}\n\nlet globalReduceMotion = false;\nfunction startViewTransition(fn: () => void, type: string) {\n if ('startViewTransition' in document) {\n // Safari doesn't support :active-view-transition-type() yet, so we fall back to a class on the html element.\n document.documentElement.classList.add(toastCss[type]);\n if (globalReduceMotion) {\n document.documentElement.classList.add(toastCss.reduceMotion);\n }\n\n let viewTransition = document.startViewTransition(() => flushSync(fn));\n\n viewTransition.ready.catch(() => {});\n viewTransition.finished.then(() => {\n document.documentElement.classList.remove(toastCss[type], toastCss.reduceMotion);\n });\n } else {\n fn();\n }\n}\n\n// There is a single global toast queue instance for the whole app, initialized lazily.\nlet globalToastQueue: ToastQueue<SpectrumToastValue> | null = null;\nfunction getGlobalToastQueue() {\n if (!globalToastQueue) {\n globalToastQueue = new ToastQueue({\n maxVisibleToasts: Infinity,\n wrapUpdate(fn, action) {\n startViewTransition(fn, `toast-${action}`);\n }\n });\n }\n\n return globalToastQueue;\n}\n\nfunction addToast(children: string, variant: SpectrumToastValue['variant'], options: ToastOptions = {}) {\n let value = {\n children,\n variant,\n actionLabel: options.actionLabel,\n onAction: options.onAction,\n shouldCloseOnAction: options.shouldCloseOnAction,\n ...filterDOMProps(options)\n };\n\n // Minimum time of 5s from https://spectrum.adobe.com/page/toast/#Auto-dismissible\n // Actionable toasts cannot be auto dismissed. That would fail WCAG SC 2.2.1.\n // It is debatable whether non-actionable toasts would also fail.\n let timeout = options.timeout && !options.actionLabel ? Math.max(options.timeout, 5000) : undefined;\n let queue = getGlobalToastQueue();\n let key = queue.add(value, {timeout, onClose: options.onClose});\n return () => queue.close(key);\n}\n\ntype CloseFunction = () => void;\n\nconst SpectrumToastQueue = {\n /** Queues a neutral toast. */\n neutral(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'neutral', options);\n },\n /** Queues a positive toast. */\n positive(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'positive', options);\n },\n /** Queues a negative toast. */\n negative(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'negative', options);\n },\n /** Queues an informational toast. */\n info(children: string, options: ToastOptions = {}): CloseFunction {\n return addToast(children, 'info', options);\n }\n};\n\nexport {SpectrumToastQueue as ToastQueue};\n\nconst toastRegion = style({\n ...focusRing(),\n display: 'flex',\n flexDirection: {\n placement: {\n top: 'column',\n bottom: 'column-reverse'\n }\n },\n position: 'fixed',\n insetX: 0,\n width: 'fit',\n top: {\n placement: {\n top: {\n default: 16,\n isExpanded: 0\n }\n }\n },\n bottom: {\n placement: {\n bottom: {\n default: 16,\n isExpanded: 0\n }\n }\n },\n marginStart: {\n align: {\n start: 16,\n center: 'auto',\n end: 'auto'\n }\n },\n marginEnd: {\n align: {\n start: 'auto',\n center: 'auto',\n end: 16\n }\n },\n boxSizing: 'border-box',\n maxHeight: 'full',\n borderRadius: 'lg'\n});\n\nconst toastList = style({\n position: 'relative',\n flexGrow: 1,\n display: 'flex',\n gap: 8,\n flexDirection: {\n placement: {\n top: 'column',\n bottom: 'column-reverse'\n }\n },\n boxSizing: 'border-box',\n marginY: 0,\n padding: {\n default: 0,\n // Add padding when expanded to account for focus ring.\n isExpanded: 8\n },\n paddingBottom: {\n isExpanded: {\n placement: {\n top: 8,\n bottom: 16\n }\n }\n },\n paddingTop: {\n isExpanded: {\n placement: {\n top: 16,\n bottom: 8\n }\n }\n },\n margin: 0,\n marginX: {\n default: 0,\n // Undo padding for focus ring.\n isExpanded: -8\n },\n overflow: {\n isExpanded: 'auto'\n }\n});\n\nconst toastStyle = style({\n ...focusRing(),\n outlineColor: {\n default: 'focus-ring',\n isExpanded: 'white'\n },\n display: 'flex',\n gap: 16,\n paddingStart: 16,\n paddingEnd: 8,\n paddingY: 12,\n borderRadius: 'lg',\n minHeight: 56,\n '--maxWidth': {\n type: 'maxWidth',\n value: 336\n },\n maxWidth: 'min(var(--maxWidth), 90vw)',\n boxSizing: 'border-box',\n flexShrink: 0,\n font: 'ui',\n color: 'white',\n backgroundColor: {\n variant: {\n neutral: 'neutral-subdued',\n info: 'informative',\n positive: 'positive',\n negative: 'negative'\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n boxShadow: {\n default: 'elevated',\n isExpanded: 'none'\n },\n willChange: 'transform'\n});\n\nconst toastBody = style({\n // The top toast in a non-expanded stack has the expand button, so it is rendered as a grid.\n // Otherwise it uses flex so the content can wrap when needed.\n display: {\n default: 'grid',\n isSingle: 'flex'\n },\n gridTemplateColumns: ['auto', '1fr', 'auto'],\n gridTemplateAreas: [\n 'content content content',\n 'expand . action'\n ],\n flexGrow: 1,\n flexWrap: 'wrap',\n alignItems: 'center',\n columnGap: 24,\n rowGap: 8\n});\n\nconst toastContent = style({\n display: 'flex',\n gap: 8,\n alignItems: 'baseline',\n gridArea: 'content',\n cursor: 'default',\n width: 'fit',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n minWidth: 0\n});\n\nconst controls = style({\n colorScheme: 'light',\n display: {\n default: 'none',\n isExpanded: 'flex'\n },\n justifyContent: 'end',\n gap: 8,\n opacity: {\n default: 0,\n isExpanded: 1\n }\n});\n\nconst ICONS = {\n info: InfoIcon,\n negative: AlertIcon,\n positive: CheckmarkIcon\n};\n\ninterface ToastContainerContextValue {\n isExpanded: boolean,\n toggleExpanded: () => void\n}\n\nconst ToastContainerContext = createContext<ToastContainerContextValue | null>(null);\n\n/**\n * A ToastContainer renders the queued toasts in an application. It should be placed\n * at the root of the app.\n */\nexport function ToastContainer(props: ToastContainerProps): ReactNode {\n let {\n placement = 'bottom'\n } = props;\n let queue = getGlobalToastQueue();\n let align = 'center';\n [placement, align = 'center'] = placement.split(' ') as any;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let regionRef = useRef<HTMLDivElement | null>(null);\n\n let state = useOverlayTriggerState({});\n let {isOpen: isExpanded, close, toggle} = state;\n let ctx = useMemo(() => ({\n isExpanded,\n toggleExpanded() {\n if (!isExpanded && queue.visibleToasts.length <= 1) {\n return;\n }\n\n startViewTransition(\n () => toggle(),\n isExpanded ? 'toast-collapse' : 'toast-expand'\n );\n }\n }), [isExpanded, toggle, queue]);\n\n // Set the state to collapsed whenever the queue is emptied.\n useEffect(() => {\n return queue.subscribe(() => {\n if (queue.visibleToasts.length === 0 && isExpanded) {\n close();\n }\n });\n }, [queue, isExpanded, close]);\n\n let collapse = () => {\n regionRef.current?.focus();\n ctx.toggleExpanded();\n };\n\n // Prevent scroll, aria hide outside, and contain focus when expanded, since we take over the whole screen.\n // Attach event handler to the ref since ToastRegion doesn't pass through onKeyDown.\n useModalOverlay({}, state, regionRef);\n useEvent(regionRef, 'keydown', isExpanded ? (e) => {\n if (e.key === 'Escape') {\n collapse();\n }\n } : undefined);\n\n let prefersReducedMotion = useMediaQuery('(prefers-reduced-motion)');\n let reduceMotion = props['PRIVATE_forceReducedMotion'] ?? prefersReducedMotion;\n useEffect(() => {\n let oldGlobalReduceMotion = globalReduceMotion;\n globalReduceMotion = reduceMotion;\n return () => {\n globalReduceMotion = oldGlobalReduceMotion;\n };\n }, [reduceMotion]);\n\n return (\n <ToastRegion\n {...props}\n ref={regionRef}\n queue={queue}\n className={renderProps => toastRegion({\n ...renderProps,\n placement,\n align,\n isExpanded\n })}>\n <FocusScope contain={isExpanded}>\n <ToastContainerContext.Provider value={ctx}>\n {isExpanded && (\n // eslint-disable-next-line\n <div\n className={toastCss['toast-background'] + style({position: 'fixed', inset: 0, backgroundColor: 'transparent-black-500'})}\n onClick={collapse} />\n )}\n <SpectrumToastList\n placement={placement}\n align={align}\n reduceMotion={reduceMotion} />\n <div className={toastCss['toast-controls'] + controls({isExpanded})}>\n <ActionButton\n size=\"S\"\n onPress={() => queue.clear()}\n // Default focus ring does not have enough contrast against gray background.\n UNSAFE_style={{outlineColor: 'white'}}>\n {stringFormatter.format('toast.clearAll')}\n </ActionButton>\n <ActionButton\n size=\"S\"\n onPress={collapse}\n UNSAFE_style={{outlineColor: 'white'}}>\n {stringFormatter.format('toast.collapse')}\n </ActionButton>\n </div>\n </ToastContainerContext.Provider>\n </FocusScope>\n </ToastRegion>\n );\n}\n\nfunction SpectrumToastList({placement, align, reduceMotion}) {\n let {isExpanded, toggleExpanded} = useContext(ToastContainerContext)!;\n\n // Attach click handler to ref since ToastList doesn't pass through onClick/onPress.\n let toastListRef = useRef(null);\n useEvent(toastListRef, 'click', (e) => {\n // Have to check if this is a button because stopPropagation in react events doesn't affect native events.\n if (!isExpanded && !(e.target as Element)?.closest('button')) {\n toggleExpanded();\n }\n });\n\n return (\n <ToastList<SpectrumToastValue>\n ref={toastListRef}\n style={({isHovered}) => {\n let origin = isHovered ? 95 : 55;\n return {\n perspective: 80,\n perspectiveOrigin: 'center ' + (placement === 'top' ? `calc(100% + ${origin}px)` : `${-origin}px`),\n transition: 'perspective-origin 400ms'\n };\n }}\n className={toastCss[isExpanded ? 'toast-list-expanded' : 'toast-list-collapsed'] + toastList({placement, align, isExpanded})}>\n {({toast}) => (\n <SpectrumToast\n toast={toast}\n placement={placement}\n align={align}\n reduceMotion={reduceMotion} />\n )}\n </ToastList>\n );\n}\n\ninterface SpectrumToastProps extends ToastProps<SpectrumToastValue> {\n placement?: 'top' | 'bottom',\n align?: 'start' | 'center' | 'end',\n reduceMotion?: boolean\n}\n\n// Exported locally for stories.\nexport function SpectrumToast(props: SpectrumToastProps): ReactNode {\n let {toast, placement = 'bottom', align = 'center'} = props;\n let variant = toast.content.variant || 'info';\n let Icon = ICONS[variant];\n let state = useContext(ToastStateContext)!;\n let visibleToasts = state.visibleToasts;\n let index = visibleToasts.indexOf(toast);\n let isMain = index <= 0;\n let ctx = useContext(ToastContainerContext);\n let isExpanded = ctx?.isExpanded || false;\n let toastRef = useRef<HTMLDivElement | null>(null);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n // When not expanded, use a presentational div for the toasts behind the top one.\n // The content is invisible, all we show is the background color.\n if (!isMain && ctx && !ctx.isExpanded) {\n return (\n <div\n role=\"presentation\"\n style={{\n position: 'absolute',\n [placement === 'top' ? 'bottom' : 'top']: 0,\n left: 0,\n width: '100%',\n translate: `0 0 ${(-12 * index) / 16}rem`,\n // Only 3 toasts are visible in the stack at once, but all toasts are in the DOM.\n // This allows view transitions to smoothly animate them from where they would be\n // in the collapsed stack to their final position in the expanded list.\n opacity: index >= 3 ? 0 : 1,\n zIndex: visibleToasts.length - index - 1,\n // When reduced motion is enabled, use append index to view-transition-name\n // so that adding/removing a toast cross fades instead of transitioning the position.\n // This works because the toasts are seen as separate elements instead of the same one when their index changes.\n viewTransitionName: toast.key + (props.reduceMotion ? '-' + index : ''),\n viewTransitionClass: [toastCss.toast, toastCss['background-toast']].map(c => CSS.escape(c)).join(' ')\n }}\n className={toastCss.toast + toastStyle({variant: toast.content.variant || 'info', index, isExpanded})}\n ref={fixSafariTransform} />\n );\n }\n\n return (\n <Toast\n ref={toastRef}\n toast={toast}\n style={{\n zIndex: visibleToasts.length - index - 1,\n viewTransitionName: toast.key,\n viewTransitionClass: [toastCss.toast, !isMain ? toastCss['background-toast'] : '', toastCss[placement], toastCss[align]].filter(Boolean).map(c => CSS.escape(c)).join(' ')\n }}\n className={renderProps => toastCss.toast + toastStyle({\n ...renderProps,\n variant: toast.content.variant || 'info',\n index,\n isExpanded\n })}>\n <div role=\"presentation\" className={toastBody({isSingle: !isMain || visibleToasts.length <= 1 || isExpanded})}>\n <ToastContent className={toastContent + (ctx && isMain ? ` ${toastCss['toast-content']}` : null)}>\n {Icon &&\n <CenterBaseline>\n <Icon />\n </CenterBaseline>\n }\n <Text slot=\"title\">{toast.content.children}</Text>\n </ToastContent>\n {!isExpanded && visibleToasts.length > 1 &&\n <ActionButton\n isQuiet\n staticColor=\"white\"\n styles={style({gridArea: 'expand'})}\n // Make the chevron line up with the toast text, even though there is padding within the button.\n UNSAFE_style={{marginInlineStart: variant === 'neutral' ? -10 : 14}}\n UNSAFE_className={ctx && isMain ? toastCss['toast-expand'] : undefined}\n onPress={() => {\n // This button disappears when clicked, so move focus to the toast.\n toastRef.current?.focus();\n ctx?.toggleExpanded();\n }}>\n <Text>{stringFormatter.format('toast.showAll')}</Text>\n {/* @ts-ignore */}\n <Chevron UNSAFE_style={{rotate: placement === 'bottom' ? '180deg' : undefined}} />\n </ActionButton>\n }\n {toast.content.actionLabel &&\n <Button\n variant=\"secondary\"\n fillStyle=\"outline\"\n staticColor=\"white\"\n onPress={() => {\n toast.content.onAction?.();\n if (toast.content.shouldCloseOnAction) {\n state.close(toast.key);\n }\n }}\n UNSAFE_className={ctx && isMain ? toastCss['toast-action'] : undefined}\n styles={style({marginStart: 'auto', gridArea: 'action'})}>\n {toast.content.actionLabel}\n </Button>\n }\n </div>\n <CloseButton\n staticColor=\"white\"\n UNSAFE_className={ctx && isMain ? toastCss['toast-close'] : undefined} />\n </Toast>\n );\n}\n\nfunction fixSafariTransform(el: HTMLDivElement | null) {\n // Safari has a bug where the toasts display in the wrong position (CSS transform is not applied correctly).\n // Work around this by removing it, forcing a reflow, and re-applying.\n if (el && isWebKit()) {\n let translate = el.style.translate;\n el.style.translate = '';\n el.offsetHeight;\n el.style.translate = translate;\n }\n}\n"],"names":[],"version":3,"file":"Toast.css.map"}
|