@react-spectrum/s2 1.4.0 → 1.5.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/exports/CenterBaseline.cjs +12 -0
- package/dist/exports/CenterBaseline.cjs.map +1 -0
- package/dist/exports/CenterBaseline.mjs +7 -0
- package/dist/exports/CenterBaseline.mjs.map +1 -0
- package/dist/exports/Skeleton.cjs +1 -0
- package/dist/exports/Skeleton.cjs.map +1 -1
- package/dist/exports/Skeleton.mjs +2 -2
- package/dist/exports/Skeleton.mjs.map +1 -1
- package/dist/exports/index.cjs +3 -0
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.mjs +3 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/private/Accordion.cjs +2 -2
- package/dist/private/Accordion.css +2 -2
- package/dist/private/Accordion.mjs +2 -2
- package/dist/private/ActionBar.cjs +59 -59
- package/dist/private/ActionBar.cjs.map +1 -1
- package/dist/private/ActionBar.css +58 -58
- package/dist/private/ActionBar.css.map +1 -1
- package/dist/private/ActionBar.mjs +59 -59
- package/dist/private/ActionBar.mjs.map +1 -1
- package/dist/private/ActionButton.cjs +247 -247
- package/dist/private/ActionButton.cjs.map +1 -1
- package/dist/private/ActionButton.css +169 -169
- package/dist/private/ActionButton.css.map +1 -1
- package/dist/private/ActionButton.mjs +247 -247
- package/dist/private/ActionButton.mjs.map +1 -1
- package/dist/private/ActionButtonGroup.cjs +15 -15
- package/dist/private/ActionButtonGroup.css +9 -9
- package/dist/private/ActionButtonGroup.mjs +15 -15
- package/dist/private/ActionMenu.cjs.map +1 -1
- package/dist/private/ActionMenu.mjs.map +1 -1
- package/dist/private/Add.cjs +10 -10
- package/dist/private/Add.css +6 -6
- package/dist/private/Add.mjs +10 -10
- package/dist/private/AlertDialog.cjs +3 -3
- package/dist/private/AlertDialog.cjs.map +1 -1
- package/dist/private/AlertDialog.css +3 -3
- package/dist/private/AlertDialog.css.map +1 -1
- package/dist/private/AlertDialog.mjs +3 -3
- package/dist/private/AlertDialog.mjs.map +1 -1
- package/dist/private/Asterisk.cjs +6 -6
- package/dist/private/Asterisk.css +4 -4
- package/dist/private/Asterisk.mjs +6 -6
- package/dist/private/Avatar.cjs +16 -16
- package/dist/private/Avatar.css +16 -16
- package/dist/private/Avatar.mjs +16 -16
- package/dist/private/AvatarGroup.cjs +120 -120
- package/dist/private/AvatarGroup.css +31 -31
- package/dist/private/AvatarGroup.mjs +120 -120
- package/dist/private/Badge.cjs +197 -197
- package/dist/private/Badge.css +125 -125
- package/dist/private/Badge.mjs +197 -197
- package/dist/private/Breadcrumbs.cjs +234 -234
- package/dist/private/Breadcrumbs.cjs.map +1 -1
- package/dist/private/Breadcrumbs.css +100 -100
- package/dist/private/Breadcrumbs.css.map +1 -1
- package/dist/private/Breadcrumbs.mjs +234 -234
- package/dist/private/Breadcrumbs.mjs.map +1 -1
- package/dist/private/Button.cjs +326 -326
- package/dist/private/Button.cjs.map +1 -1
- package/dist/private/Button.css +172 -172
- package/dist/private/Button.css.map +1 -1
- package/dist/private/Button.mjs +326 -326
- package/dist/private/Button.mjs.map +1 -1
- package/dist/private/ButtonGroup.cjs +23 -20
- package/dist/private/ButtonGroup.cjs.map +1 -1
- package/dist/private/ButtonGroup.css +19 -15
- package/dist/private/ButtonGroup.css.map +1 -1
- package/dist/private/ButtonGroup.mjs +23 -20
- package/dist/private/ButtonGroup.mjs.map +1 -1
- package/dist/private/Calendar.cjs +232 -232
- package/dist/private/Calendar.cjs.map +1 -1
- package/dist/private/Calendar.css +149 -149
- package/dist/private/Calendar.css.map +1 -1
- package/dist/private/Calendar.mjs +232 -232
- package/dist/private/Calendar.mjs.map +1 -1
- package/dist/private/Card.cjs +309 -309
- package/dist/private/Card.css +206 -206
- package/dist/private/Card.mjs +309 -309
- package/dist/private/CardView.cjs +17 -17
- package/dist/private/CardView.css +17 -17
- package/dist/private/CardView.mjs +17 -17
- package/dist/private/CenterBaseline.cjs +1 -1
- package/dist/private/CenterBaseline.cjs.map +1 -1
- package/dist/private/CenterBaseline.css +2 -2
- package/dist/private/CenterBaseline.css.map +1 -1
- package/dist/private/CenterBaseline.mjs +1 -1
- package/dist/private/CenterBaseline.mjs.map +1 -1
- package/dist/private/Checkbox.cjs +188 -188
- package/dist/private/Checkbox.css +110 -110
- package/dist/private/Checkbox.mjs +188 -188
- package/dist/private/CheckboxGroup.cjs +43 -43
- package/dist/private/CheckboxGroup.css +37 -37
- package/dist/private/CheckboxGroup.mjs +43 -43
- package/dist/private/Checkmark.cjs +12 -12
- package/dist/private/Checkmark.css +8 -8
- package/dist/private/Checkmark.mjs +12 -12
- package/dist/private/Chevron.cjs +12 -12
- package/dist/private/Chevron.css +10 -10
- package/dist/private/Chevron.mjs +12 -12
- package/dist/private/ClearButton.cjs +30 -30
- package/dist/private/ClearButton.css +30 -30
- package/dist/private/ClearButton.mjs +30 -30
- package/dist/private/CloseButton.cjs +52 -52
- package/dist/private/CloseButton.cjs.map +1 -1
- package/dist/private/CloseButton.css +46 -46
- package/dist/private/CloseButton.css.map +1 -1
- package/dist/private/CloseButton.mjs +52 -52
- package/dist/private/CloseButton.mjs.map +1 -1
- package/dist/private/ColorArea.cjs +16 -16
- package/dist/private/ColorArea.css +16 -16
- package/dist/private/ColorArea.mjs +16 -16
- package/dist/private/ColorField.cjs +31 -31
- package/dist/private/ColorField.css +27 -27
- package/dist/private/ColorField.mjs +31 -31
- package/dist/private/ColorHandle.cjs +27 -27
- package/dist/private/ColorHandle.css +42 -42
- package/dist/private/ColorHandle.mjs +27 -27
- package/dist/private/ColorSlider.cjs +108 -108
- package/dist/private/ColorSlider.css +52 -52
- package/dist/private/ColorSlider.mjs +108 -108
- package/dist/private/ColorSwatch.cjs +29 -29
- package/dist/private/ColorSwatch.css +29 -29
- package/dist/private/ColorSwatch.mjs +29 -29
- package/dist/private/ColorSwatchPicker.cjs +29 -29
- package/dist/private/ColorSwatchPicker.css +48 -48
- package/dist/private/ColorSwatchPicker.mjs +29 -29
- package/dist/private/ColorWheel.cjs +26 -26
- package/dist/private/ColorWheel.css +17 -17
- package/dist/private/ColorWheel.mjs +26 -26
- package/dist/private/ComboBox.cjs +381 -381
- package/dist/private/ComboBox.cjs.map +1 -1
- package/dist/private/ComboBox.css +188 -188
- package/dist/private/ComboBox.css.map +1 -1
- package/dist/private/ComboBox.mjs +381 -381
- package/dist/private/ComboBox.mjs.map +1 -1
- package/dist/private/ContextualHelp.cjs +5 -5
- package/dist/private/ContextualHelp.cjs.map +1 -1
- package/dist/private/ContextualHelp.css +50 -50
- package/dist/private/ContextualHelp.css.map +1 -1
- package/dist/private/ContextualHelp.mjs +5 -5
- package/dist/private/ContextualHelp.mjs.map +1 -1
- package/dist/private/CornerTriangle.cjs +8 -8
- package/dist/private/CornerTriangle.css +6 -6
- package/dist/private/CornerTriangle.mjs +8 -8
- package/dist/private/Cross.cjs +14 -14
- package/dist/private/Cross.css +10 -10
- package/dist/private/Cross.mjs +14 -14
- package/dist/private/CustomDialog.cjs +25 -25
- package/dist/private/CustomDialog.css +25 -25
- package/dist/private/CustomDialog.mjs +25 -25
- package/dist/private/Dash.cjs +10 -10
- package/dist/private/Dash.css +6 -6
- package/dist/private/Dash.mjs +10 -10
- package/dist/private/DateField.cjs +73 -73
- package/dist/private/DateField.css +77 -77
- package/dist/private/DateField.mjs +73 -73
- package/dist/private/DatePicker.cjs +172 -172
- package/dist/private/DatePicker.cjs.map +1 -1
- package/dist/private/DatePicker.css +128 -128
- package/dist/private/DatePicker.css.map +1 -1
- package/dist/private/DatePicker.mjs +172 -172
- package/dist/private/DatePicker.mjs.map +1 -1
- package/dist/private/DateRangePicker.cjs +55 -55
- package/dist/private/DateRangePicker.cjs.map +1 -1
- package/dist/private/DateRangePicker.css +59 -59
- package/dist/private/DateRangePicker.css.map +1 -1
- package/dist/private/DateRangePicker.mjs +55 -55
- package/dist/private/DateRangePicker.mjs.map +1 -1
- package/dist/private/Dialog.cjs +17 -17
- package/dist/private/Dialog.css +70 -70
- package/dist/private/Dialog.mjs +17 -17
- package/dist/private/Disclosure.cjs +144 -122
- package/dist/private/Disclosure.cjs.map +1 -1
- package/dist/private/Disclosure.css +112 -112
- package/dist/private/Disclosure.css.map +1 -1
- package/dist/private/Disclosure.mjs +144 -122
- package/dist/private/Disclosure.mjs.map +1 -1
- package/dist/private/Divider.cjs +25 -25
- package/dist/private/Divider.css +25 -25
- package/dist/private/Divider.mjs +25 -25
- package/dist/private/DragHandle.cjs +8 -8
- package/dist/private/DragHandle.css +6 -6
- package/dist/private/DragHandle.mjs +8 -8
- package/dist/private/DragPreview.cjs +154 -154
- package/dist/private/DragPreview.css +106 -106
- package/dist/private/DragPreview.mjs +154 -154
- package/dist/private/DropZone.cjs +61 -61
- package/dist/private/DropZone.cjs.map +1 -1
- package/dist/private/DropZone.css +57 -57
- package/dist/private/DropZone.css.map +1 -1
- package/dist/private/DropZone.mjs +61 -61
- package/dist/private/DropZone.mjs.map +1 -1
- package/dist/private/Field.cjs +360 -360
- package/dist/private/Field.cjs.map +1 -1
- package/dist/private/Field.css +160 -160
- package/dist/private/Field.css.map +1 -1
- package/dist/private/Field.mjs +360 -360
- package/dist/private/Field.mjs.map +1 -1
- package/dist/private/Form.cjs +9 -9
- package/dist/private/Form.css +9 -9
- package/dist/private/Form.mjs +9 -9
- package/dist/private/FullscreenDialog.cjs +5 -5
- package/dist/private/FullscreenDialog.css +78 -78
- package/dist/private/FullscreenDialog.mjs +5 -5
- package/dist/private/IllustratedMessage.cjs +228 -228
- package/dist/private/IllustratedMessage.css +72 -72
- package/dist/private/IllustratedMessage.mjs +228 -228
- package/dist/private/Image.cjs +14 -14
- package/dist/private/Image.css +14 -14
- package/dist/private/Image.mjs +14 -14
- package/dist/private/InlineAlert.cjs +100 -100
- package/dist/private/InlineAlert.cjs.map +1 -1
- package/dist/private/InlineAlert.css +76 -76
- package/dist/private/InlineAlert.css.map +1 -1
- package/dist/private/InlineAlert.mjs +100 -100
- package/dist/private/InlineAlert.mjs.map +1 -1
- package/dist/private/LabeledValue.cjs +134 -134
- package/dist/private/LabeledValue.css +63 -63
- package/dist/private/LabeledValue.mjs +134 -134
- package/dist/private/Link.cjs +49 -49
- package/dist/private/Link.css +41 -41
- package/dist/private/Link.mjs +49 -49
- package/dist/private/LinkOut.cjs +8 -8
- package/dist/private/LinkOut.css +8 -8
- package/dist/private/LinkOut.mjs +8 -8
- package/dist/private/ListView.cjs +245 -245
- package/dist/private/ListView.cjs.map +1 -1
- package/dist/private/ListView.css +177 -177
- package/dist/private/ListView.css.map +1 -1
- package/dist/private/ListView.mjs +245 -245
- package/dist/private/ListView.mjs.map +1 -1
- package/dist/private/Menu.cjs +446 -446
- package/dist/private/Menu.cjs.map +1 -1
- package/dist/private/Menu.css +196 -196
- package/dist/private/Menu.css.map +1 -1
- package/dist/private/Menu.mjs +446 -446
- package/dist/private/Menu.mjs.map +1 -1
- package/dist/private/Meter.cjs +153 -153
- package/dist/private/Meter.css +91 -91
- package/dist/private/Meter.mjs +153 -153
- package/dist/private/Modal.cjs +74 -74
- package/dist/private/Modal.css +59 -59
- package/dist/private/Modal.mjs +74 -74
- package/dist/private/NotificationBadge.cjs +56 -56
- package/dist/private/NotificationBadge.cjs.map +1 -1
- package/dist/private/NotificationBadge.css +49 -49
- package/dist/private/NotificationBadge.css.map +1 -1
- package/dist/private/NotificationBadge.mjs +56 -56
- package/dist/private/NotificationBadge.mjs.map +1 -1
- package/dist/private/NumberField.cjs +114 -114
- package/dist/private/NumberField.css +99 -99
- package/dist/private/NumberField.mjs +114 -114
- package/dist/private/Picker.cjs +275 -275
- package/dist/private/Picker.cjs.map +1 -1
- package/dist/private/Picker.css +173 -173
- package/dist/private/Picker.css.map +1 -1
- package/dist/private/Picker.mjs +275 -275
- package/dist/private/Picker.mjs.map +1 -1
- package/dist/private/Popover.cjs +95 -95
- package/dist/private/Popover.cjs.map +1 -1
- package/dist/private/Popover.css +75 -75
- package/dist/private/Popover.css.map +1 -1
- package/dist/private/Popover.mjs +95 -95
- package/dist/private/Popover.mjs.map +1 -1
- package/dist/private/ProgressBar.cjs +163 -163
- package/dist/private/ProgressBar.css +99 -99
- package/dist/private/ProgressBar.mjs +163 -163
- package/dist/private/ProgressCircle.cjs +34 -31
- package/dist/private/ProgressCircle.cjs.map +1 -1
- package/dist/private/ProgressCircle.css +24 -24
- package/dist/private/ProgressCircle.css.map +1 -1
- package/dist/private/ProgressCircle.mjs +34 -31
- package/dist/private/ProgressCircle.mjs.map +1 -1
- package/dist/private/Provider.cjs +19 -19
- package/dist/private/Provider.css +15 -15
- package/dist/private/Provider.mjs +19 -19
- package/dist/private/RadioGroup.cjs +208 -208
- package/dist/private/RadioGroup.css +113 -113
- package/dist/private/RadioGroup.mjs +208 -208
- package/dist/private/RangeCalendar.cjs +16 -16
- package/dist/private/RangeCalendar.cjs.map +1 -1
- package/dist/private/RangeCalendar.css +17 -17
- package/dist/private/RangeCalendar.css.map +1 -1
- package/dist/private/RangeCalendar.mjs +16 -16
- package/dist/private/RangeCalendar.mjs.map +1 -1
- package/dist/private/RangeSlider.cjs.map +1 -1
- package/dist/private/RangeSlider.mjs.map +1 -1
- package/dist/private/SearchField.cjs +41 -41
- package/dist/private/SearchField.css +45 -45
- package/dist/private/SearchField.mjs +41 -41
- package/dist/private/SegmentedControl.cjs +178 -178
- package/dist/private/SegmentedControl.css +123 -123
- package/dist/private/SegmentedControl.mjs +178 -178
- package/dist/private/SelectBoxGroup.cjs +142 -142
- package/dist/private/SelectBoxGroup.css +120 -120
- package/dist/private/SelectBoxGroup.mjs +142 -142
- package/dist/private/Slider.cjs +292 -292
- package/dist/private/Slider.css +159 -159
- package/dist/private/Slider.mjs +292 -292
- package/dist/private/StatusLight.cjs +115 -115
- package/dist/private/StatusLight.css +59 -59
- package/dist/private/StatusLight.mjs +115 -115
- package/dist/private/Switch.cjs +171 -171
- package/dist/private/Switch.css +85 -85
- package/dist/private/Switch.mjs +171 -171
- package/dist/private/TableView.cjs +551 -534
- package/dist/private/TableView.cjs.map +1 -1
- package/dist/private/TableView.css +329 -303
- package/dist/private/TableView.css.map +1 -1
- package/dist/private/TableView.mjs +551 -534
- package/dist/private/TableView.mjs.map +1 -1
- package/dist/private/Tabs.cjs +131 -125
- package/dist/private/Tabs.cjs.map +1 -1
- package/dist/private/Tabs.css +105 -105
- package/dist/private/Tabs.css.map +1 -1
- package/dist/private/Tabs.mjs +131 -125
- package/dist/private/Tabs.mjs.map +1 -1
- package/dist/private/TabsPicker.cjs +127 -127
- package/dist/private/TabsPicker.css +108 -108
- package/dist/private/TabsPicker.mjs +127 -127
- package/dist/private/TagGroup.cjs +203 -203
- package/dist/private/TagGroup.cjs.map +1 -1
- package/dist/private/TagGroup.css +146 -146
- package/dist/private/TagGroup.css.map +1 -1
- package/dist/private/TagGroup.mjs +203 -203
- package/dist/private/TagGroup.mjs.map +1 -1
- package/dist/private/TextField.cjs +58 -58
- package/dist/private/TextField.css +54 -54
- package/dist/private/TextField.mjs +58 -58
- package/dist/private/TimeField.cjs +51 -51
- package/dist/private/TimeField.css +47 -47
- package/dist/private/TimeField.mjs +51 -51
- package/dist/private/Toast.cjs +120 -120
- package/dist/private/Toast.cjs.map +1 -1
- package/dist/private/Toast.css +110 -110
- package/dist/private/Toast.css.map +1 -1
- package/dist/private/Toast.mjs +120 -120
- package/dist/private/Toast.mjs.map +1 -1
- package/dist/private/ToggleButton.cjs +16 -16
- package/dist/private/ToggleButton.css +23 -23
- package/dist/private/ToggleButton.mjs +16 -16
- package/dist/private/Tooltip.cjs +86 -86
- package/dist/private/Tooltip.css +70 -70
- package/dist/private/Tooltip.mjs +86 -86
- package/dist/private/TreeView.cjs +229 -229
- package/dist/private/TreeView.cjs.map +1 -1
- package/dist/private/TreeView.css +184 -184
- package/dist/private/TreeView.css.map +1 -1
- package/dist/private/TreeView.mjs +229 -229
- package/dist/private/TreeView.mjs.map +1 -1
- package/dist/private/dnd-utils.cjs +42 -42
- package/dist/private/dnd-utils.css +39 -39
- package/dist/private/dnd-utils.mjs +42 -42
- package/dist/types/exports/CenterBaseline.d.ts +1 -0
- package/dist/types/exports/Skeleton.d.ts +1 -1
- package/dist/types/exports/index.d.ts +1 -0
- package/dist/types/src/CenterBaseline.d.ts +17 -0
- package/dist/types/src/ContextualHelp.d.ts +1 -1
- package/dist/types/src/Disclosure.d.ts +6 -1
- package/dist/types/src/ListView.d.ts +1 -1
- package/dist/types/src/Menu.d.ts +1 -1
- package/dist/types/src/Popover.d.ts +2 -2
- package/dist/types/src/style-utils.d.ts +4 -1
- package/exports/CenterBaseline.ts +1 -0
- package/exports/Skeleton.ts +1 -1
- package/exports/index.ts +2 -0
- package/icons/Icon.cjs +10 -10
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +10 -10
- 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/package.json +6 -6
- package/src/ActionBar.tsx +0 -1
- package/src/ActionButton.tsx +0 -1
- package/src/ActionMenu.tsx +0 -1
- package/src/AlertDialog.tsx +0 -1
- package/src/Breadcrumbs.tsx +0 -4
- package/src/Button.tsx +0 -1
- package/src/ButtonGroup.tsx +1 -0
- package/src/Calendar.tsx +0 -1
- package/src/CenterBaseline.tsx +17 -0
- package/src/CloseButton.tsx +0 -1
- package/src/ComboBox.tsx +0 -1
- package/src/ContextualHelp.tsx +1 -2
- package/src/DatePicker.tsx +0 -1
- package/src/DateRangePicker.tsx +0 -1
- package/src/Disclosure.tsx +92 -79
- package/src/DropZone.tsx +0 -1
- package/src/Field.tsx +0 -1
- package/src/InlineAlert.tsx +0 -1
- package/src/ListView.tsx +0 -2
- package/src/Menu.tsx +1 -8
- package/src/NotificationBadge.tsx +0 -1
- package/src/Picker.tsx +0 -1
- package/src/Popover.tsx +2 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/RangeCalendar.tsx +0 -1
- package/src/RangeSlider.tsx +0 -1
- package/src/TableView.tsx +75 -37
- package/src/Tabs.tsx +9 -2
- package/src/TagGroup.tsx +0 -1
- package/src/Toast.tsx +0 -3
- package/src/TreeView.tsx +0 -1
- package/src/style-utils.ts +13 -2
- package/style/__tests__/style-macro.test.js +71 -71
- package/style/dist/main.cjs +25 -25
- package/style/dist/module.mjs +13 -13
- package/style/dist/properties.mjs +3 -3
- package/style/dist/spectrum-theme.cjs +224 -224
- package/style/dist/spectrum-theme.mjs +217 -217
- package/style/dist/style-macro.cjs +100 -100
- package/style/dist/style-macro.mjs +94 -94
- package/style/dist/style-utils.cjs +51 -39
- package/style/dist/style-utils.cjs.map +1 -1
- package/style/dist/style-utils.mjs +50 -38
- package/style/dist/style-utils.mjs.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
1
|
+
var $5ead8b4c6b503f30$exports = require("./properties.cjs");
|
|
2
|
+
var $56lN2$path = require("path");
|
|
3
|
+
var $56lN2$fs = require("fs");
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
function $parcel$interopDefault(a) {
|
|
@@ -11,14 +11,14 @@ function $parcel$export(e, n, v, s) {
|
|
|
11
11
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
$parcel$export(module.exports, "ArbitraryProperty", () => $
|
|
15
|
-
$parcel$export(module.exports, "MappedProperty", () => $
|
|
16
|
-
$parcel$export(module.exports, "PercentageProperty", () => $
|
|
17
|
-
$parcel$export(module.exports, "SizingProperty", () => $
|
|
18
|
-
$parcel$export(module.exports, "ExpandedProperty", () => $
|
|
19
|
-
$parcel$export(module.exports, "parseArbitraryValue", () => $
|
|
20
|
-
$parcel$export(module.exports, "createTheme", () => $
|
|
21
|
-
$parcel$export(module.exports, "css", () => $
|
|
14
|
+
$parcel$export(module.exports, "ArbitraryProperty", () => $01c7b97da92e6691$export$d03475ad9df06cd2);
|
|
15
|
+
$parcel$export(module.exports, "MappedProperty", () => $01c7b97da92e6691$export$965169194d2485f7);
|
|
16
|
+
$parcel$export(module.exports, "PercentageProperty", () => $01c7b97da92e6691$export$6bff0717a72a8669);
|
|
17
|
+
$parcel$export(module.exports, "SizingProperty", () => $01c7b97da92e6691$export$8c6b4dc3755476bb);
|
|
18
|
+
$parcel$export(module.exports, "ExpandedProperty", () => $01c7b97da92e6691$export$1b6028cfca42adca);
|
|
19
|
+
$parcel$export(module.exports, "parseArbitraryValue", () => $01c7b97da92e6691$export$22a8270399010c94);
|
|
20
|
+
$parcel$export(module.exports, "createTheme", () => $01c7b97da92e6691$export$25d302a5b900a763);
|
|
21
|
+
$parcel$export(module.exports, "css", () => $01c7b97da92e6691$export$dbf350e5966cf602);
|
|
22
22
|
/*
|
|
23
23
|
* Copyright 2024 Adobe. All rights reserved.
|
|
24
24
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -32,11 +32,11 @@ $parcel$export(module.exports, "css", () => $cf0b57705fca33e1$export$dbf350e5966
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var $
|
|
35
|
+
var $01c7b97da92e6691$var$$parcel$__dirname = $56lN2$path.resolve(__dirname, "..");
|
|
36
36
|
// Postfix all class names with version for now.
|
|
37
|
-
const $
|
|
38
|
-
const $
|
|
39
|
-
class $
|
|
37
|
+
const $01c7b97da92e6691$var$json = JSON.parse((0, ($parcel$interopDefault($56lN2$fs))).readFileSync($01c7b97da92e6691$var$$parcel$__dirname + '/../package.json', 'utf8'));
|
|
38
|
+
const $01c7b97da92e6691$var$POSTFIX = $01c7b97da92e6691$var$json.version.includes('nightly') ? $01c7b97da92e6691$var$json.version.match(/-nightly-(.*)/)[1] : $01c7b97da92e6691$var$json.version.replace(/[0.]/g, '');
|
|
39
|
+
class $01c7b97da92e6691$export$d03475ad9df06cd2 {
|
|
40
40
|
constructor(property, toCSS){
|
|
41
41
|
this.property = property;
|
|
42
42
|
this.toCSS = toCSS || ((value)=>String(value));
|
|
@@ -50,14 +50,14 @@ class $cf0b57705fca33e1$export$d03475ad9df06cd2 {
|
|
|
50
50
|
return this.toCSS(value);
|
|
51
51
|
}
|
|
52
52
|
toCSSProperties(customProperty, value) {
|
|
53
|
-
return $
|
|
53
|
+
return $01c7b97da92e6691$var$mapConditionalValue(value, (value)=>[
|
|
54
54
|
{
|
|
55
55
|
[customProperty || this.property]: String(value)
|
|
56
56
|
}
|
|
57
57
|
]);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
class $
|
|
60
|
+
class $01c7b97da92e6691$export$965169194d2485f7 extends $01c7b97da92e6691$export$d03475ad9df06cd2 {
|
|
61
61
|
constructor(property, mapping){
|
|
62
62
|
super(property);
|
|
63
63
|
this.mapping = mapping;
|
|
@@ -73,15 +73,15 @@ class $cf0b57705fca33e1$export$965169194d2485f7 extends $cf0b57705fca33e1$export
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
class $
|
|
76
|
+
class $01c7b97da92e6691$export$40ae678e65d951f2 extends $01c7b97da92e6691$export$965169194d2485f7 {
|
|
77
77
|
toCSSValue(value) {
|
|
78
78
|
let [color, opacity] = value.split('/');
|
|
79
|
-
return $
|
|
79
|
+
return $01c7b97da92e6691$var$mapConditionalValue(this.mapping[color], (value)=>{
|
|
80
80
|
return opacity ? `rgb(from ${value} r g b / ${opacity}%)` : value;
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
class $
|
|
84
|
+
class $01c7b97da92e6691$export$6bff0717a72a8669 extends $01c7b97da92e6691$export$965169194d2485f7 {
|
|
85
85
|
constructor(property, mapping){
|
|
86
86
|
super(property, mapping);
|
|
87
87
|
}
|
|
@@ -90,7 +90,7 @@ class $cf0b57705fca33e1$export$6bff0717a72a8669 extends $cf0b57705fca33e1$export
|
|
|
90
90
|
return super.toCSSValue(value);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
class $
|
|
93
|
+
class $01c7b97da92e6691$export$8c6b4dc3755476bb extends $01c7b97da92e6691$export$6bff0717a72a8669 {
|
|
94
94
|
constructor(property, mapping, numberToCSS){
|
|
95
95
|
super(property, mapping);
|
|
96
96
|
this.numberToCSS = numberToCSS;
|
|
@@ -100,12 +100,12 @@ class $cf0b57705fca33e1$export$8c6b4dc3755476bb extends $cf0b57705fca33e1$export
|
|
|
100
100
|
return super.toCSSValue(value);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
class $
|
|
103
|
+
class $01c7b97da92e6691$export$1b6028cfca42adca {
|
|
104
104
|
constructor(properties, expand, mapping){
|
|
105
105
|
this.cssProperties = properties;
|
|
106
106
|
this.expand = expand;
|
|
107
|
-
if (mapping instanceof $
|
|
108
|
-
else if (mapping) this.mapping = new $
|
|
107
|
+
if (mapping instanceof $01c7b97da92e6691$export$965169194d2485f7) this.mapping = mapping;
|
|
108
|
+
else if (mapping) this.mapping = new $01c7b97da92e6691$export$965169194d2485f7(properties[0], mapping);
|
|
109
109
|
else this.mapping = null;
|
|
110
110
|
}
|
|
111
111
|
toCSSValue(value) {
|
|
@@ -114,23 +114,23 @@ class $cf0b57705fca33e1$export$1b6028cfca42adca {
|
|
|
114
114
|
}
|
|
115
115
|
toCSSProperties(customProperty, value) {
|
|
116
116
|
if (customProperty) throw new Error('Style properties that expand into multiple CSS properties cannot be set as CSS variables.');
|
|
117
|
-
return $
|
|
117
|
+
return $01c7b97da92e6691$var$mapConditionalValue(value, (value)=>[
|
|
118
118
|
this.expand(value)
|
|
119
119
|
]);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function $
|
|
122
|
+
function $01c7b97da92e6691$var$mapConditionalValue(value, fn) {
|
|
123
123
|
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
124
124
|
let res = {};
|
|
125
|
-
for(let condition in value)res[condition] = $
|
|
125
|
+
for(let condition in value)res[condition] = $01c7b97da92e6691$var$mapConditionalValue(value[condition], fn);
|
|
126
126
|
return res;
|
|
127
127
|
} else return fn(value);
|
|
128
128
|
}
|
|
129
|
-
function $
|
|
129
|
+
function $01c7b97da92e6691$var$mapConditionalShorthand(value, fn) {
|
|
130
130
|
if (typeof value === 'object') {
|
|
131
131
|
let res = {};
|
|
132
132
|
for(let condition in value){
|
|
133
|
-
let properties = $
|
|
133
|
+
let properties = $01c7b97da92e6691$var$mapConditionalShorthand(value[condition], fn);
|
|
134
134
|
for(let property in properties){
|
|
135
135
|
res[property] ??= {};
|
|
136
136
|
res[property][condition] = properties[property];
|
|
@@ -139,22 +139,22 @@ function $cf0b57705fca33e1$var$mapConditionalShorthand(value, fn) {
|
|
|
139
139
|
return res;
|
|
140
140
|
} else return fn(value);
|
|
141
141
|
}
|
|
142
|
-
function $
|
|
142
|
+
function $01c7b97da92e6691$export$22a8270399010c94(value) {
|
|
143
143
|
if (typeof value === 'string' && value.startsWith('--')) return `var(${value})`;
|
|
144
144
|
else if (typeof value === 'string' && value[0] === '[' && value[value.length - 1] === ']') return value.slice(1, -1);
|
|
145
145
|
else if (typeof value === 'string' && (/^(var|calc|min|max|clamp|round|mod|rem|sin|cos|tan|asin|acos|atan|atan2|pow|sqrt|hypot|log|exp|abs|sign)\(.+\)$/.test(value) || /^(inherit|initial|unset)$/.test(value))) return value;
|
|
146
146
|
}
|
|
147
|
-
function $
|
|
148
|
-
return $
|
|
147
|
+
function $01c7b97da92e6691$var$shortCSSPropertyName(property) {
|
|
148
|
+
return $5ead8b4c6b503f30$exports.properties[property] ?? $01c7b97da92e6691$var$generateArbitraryValueSelector(property, true);
|
|
149
149
|
}
|
|
150
|
-
function $
|
|
151
|
-
let className = $
|
|
150
|
+
function $01c7b97da92e6691$var$classNamePrefix(property, cssProperty) {
|
|
151
|
+
let className = $5ead8b4c6b503f30$exports.properties[cssProperty];
|
|
152
152
|
if (className && property === '--' + className) return '-' + className + '_-';
|
|
153
153
|
if (className && !property.startsWith('--')) return className;
|
|
154
|
-
return '-' + $
|
|
154
|
+
return '-' + $01c7b97da92e6691$var$generateArbitraryValueSelector(property, true) + '-';
|
|
155
155
|
}
|
|
156
|
-
let $
|
|
157
|
-
function $
|
|
156
|
+
let $01c7b97da92e6691$var$isCompilingDependencies = false;
|
|
157
|
+
function $01c7b97da92e6691$export$25d302a5b900a763(theme) {
|
|
158
158
|
let properties = new Map(Object.entries(theme.properties).map(([k, v])=>{
|
|
159
159
|
if (!Array.isArray(v) && v.cssProperties) return [
|
|
160
160
|
k,
|
|
@@ -162,7 +162,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
162
162
|
];
|
|
163
163
|
return [
|
|
164
164
|
k,
|
|
165
|
-
new $
|
|
165
|
+
new $01c7b97da92e6691$export$965169194d2485f7(k, v)
|
|
166
166
|
];
|
|
167
167
|
}));
|
|
168
168
|
let dependencies = new Set();
|
|
@@ -180,7 +180,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
180
180
|
let usedPriorities = 0;
|
|
181
181
|
let setRules = (key, value)=>{
|
|
182
182
|
usedPriorities = Math.max(usedPriorities, value[0]);
|
|
183
|
-
rules.set(key, new $
|
|
183
|
+
rules.set(key, new $01c7b97da92e6691$var$GroupRule(value[1]));
|
|
184
184
|
};
|
|
185
185
|
hasConditions = false;
|
|
186
186
|
for(let key in style){
|
|
@@ -196,7 +196,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
196
196
|
if (theme.shorthands[key]) {
|
|
197
197
|
let shorthand = theme.shorthands[key];
|
|
198
198
|
if (typeof shorthand === 'function') {
|
|
199
|
-
let expanded = $
|
|
199
|
+
let expanded = $01c7b97da92e6691$var$mapConditionalShorthand(value, shorthand);
|
|
200
200
|
for(let k in expanded){
|
|
201
201
|
let v = expanded[k];
|
|
202
202
|
values.set(k, v);
|
|
@@ -215,13 +215,13 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
215
215
|
if (value != null) {
|
|
216
216
|
if (!(dep in theme.properties)) throw new Error(`Unknown dependency ${dep}`);
|
|
217
217
|
let prop = properties.get(dep);
|
|
218
|
-
let name = `--${$
|
|
218
|
+
let name = `--${$01c7b97da92e6691$var$shortCSSPropertyName(prop.cssProperties[0])}`;
|
|
219
219
|
// Could potentially use @property to prevent the var from inheriting in children.
|
|
220
|
-
$
|
|
220
|
+
$01c7b97da92e6691$var$isCompilingDependencies = dep;
|
|
221
221
|
setRules(name, compileValue(name, dep, value));
|
|
222
|
-
$
|
|
222
|
+
$01c7b97da92e6691$var$isCompilingDependencies = null;
|
|
223
223
|
setRules(dep, compileValue(dep, dep, name));
|
|
224
|
-
$
|
|
224
|
+
$01c7b97da92e6691$var$isCompilingDependencies = false;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
dependencies.clear();
|
|
@@ -232,7 +232,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
232
232
|
for(let i = 0; i <= usedPriorities; i++){
|
|
233
233
|
if (first) first = false;
|
|
234
234
|
else css += ', ';
|
|
235
|
-
css += $
|
|
235
|
+
css += $01c7b97da92e6691$var$layerName($01c7b97da92e6691$var$generateName(i, true));
|
|
236
236
|
}
|
|
237
237
|
css += ';\n\n';
|
|
238
238
|
// If allowed overrides are provided, generate code to match the input override string and include only allowed classes.
|
|
@@ -262,13 +262,13 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
262
262
|
if (prop) {
|
|
263
263
|
for (let property of prop.cssProperties)// oxlint-disable-next-line max-depth
|
|
264
264
|
if (property && allowedOverridesSet.has(property)) {
|
|
265
|
-
let selector = $
|
|
265
|
+
let selector = $01c7b97da92e6691$var$classNamePrefix(property, property);
|
|
266
266
|
let p = property.replace('--', '__');
|
|
267
267
|
js += `let ${p} = false;\n`;
|
|
268
268
|
loop += ` if (p[1] === ${JSON.stringify(selector)}) ${p} = true;\n`;
|
|
269
269
|
}
|
|
270
270
|
} else if (property.startsWith('--') && allowedOverridesSet.has(property)) {
|
|
271
|
-
let selector = $
|
|
271
|
+
let selector = $01c7b97da92e6691$var$classNamePrefix(property, property);
|
|
272
272
|
let p = property.replace('--', '__');
|
|
273
273
|
js += `let ${p} = false;\n`;
|
|
274
274
|
loop += ` if (p[1] === ${JSON.stringify(selector)}) ${p} = true;\n`;
|
|
@@ -277,7 +277,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
277
277
|
let macroPart = process.env.NODE_ENV !== 'production' ? '|-macro\\$' : '';
|
|
278
278
|
let regex = `/(?:^|\\s)(${[
|
|
279
279
|
...allowedOverridesSet
|
|
280
|
-
].map((p)=>$
|
|
280
|
+
].map((p)=>$01c7b97da92e6691$var$classNamePrefix(p, p)).join('|')}${macroPart})[^\\s]+/g`;
|
|
281
281
|
if (loop) {
|
|
282
282
|
js += `let matches = String(overrides || '').matchAll(${regex});\n`;
|
|
283
283
|
js += 'for (let p of matches) {\n';
|
|
@@ -290,21 +290,21 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
290
290
|
let isStatic = !(hasConditions || allowedOverrides);
|
|
291
291
|
let className = '';
|
|
292
292
|
let rulesByLayer = new Map();
|
|
293
|
-
let rootRule = new $
|
|
293
|
+
let rootRule = new $01c7b97da92e6691$var$GroupRule([
|
|
294
294
|
...rules.values()
|
|
295
295
|
]);
|
|
296
296
|
if (isStatic) className += rootRule.getStaticClassName();
|
|
297
297
|
else js += rootRule.toJS(allowedOverridesSet) + '\n';
|
|
298
298
|
rootRule.toCSS(rulesByLayer);
|
|
299
299
|
for (let [layer, rules] of rulesByLayer){
|
|
300
|
-
css += `@layer ${$
|
|
300
|
+
css += `@layer ${$01c7b97da92e6691$var$layerName(layer)} {\n`;
|
|
301
301
|
css += rules.join('\n\n');
|
|
302
302
|
css += '}\n\n';
|
|
303
303
|
}
|
|
304
304
|
// @ts-expect-error
|
|
305
305
|
let loc = this?.loc?.filePath + ':' + this?.loc?.line + ':' + this?.loc?.col;
|
|
306
306
|
if (isStatic && process.env.NODE_ENV !== 'production') {
|
|
307
|
-
let id = $
|
|
307
|
+
let id = $01c7b97da92e6691$var$toBase62($01c7b97da92e6691$var$hash(className + loc));
|
|
308
308
|
css += `.-macro-static-${id} {
|
|
309
309
|
--macro-data-${id}: ${JSON.stringify({
|
|
310
310
|
style: style,
|
|
@@ -370,7 +370,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
370
370
|
// The @layer order in the generated CSS will ensure that it overrides classes applied by runtime conditions.
|
|
371
371
|
let isCSSCondition = condition in theme.conditions || /^[@:]/.test(condition);
|
|
372
372
|
if (!wasCSSCondition && isCSSCondition && rules.length) rules = [
|
|
373
|
-
new $
|
|
373
|
+
new $01c7b97da92e6691$var$GroupRule(rules)
|
|
374
374
|
];
|
|
375
375
|
wasCSSCondition = isCSSCondition;
|
|
376
376
|
// Increment the current priority whenever we see a new CSS condition.
|
|
@@ -410,7 +410,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
410
410
|
}
|
|
411
411
|
function compileCondition(conditions, condition, priority, rules) {
|
|
412
412
|
if (condition === 'default' || conditions.has(condition)) return [
|
|
413
|
-
new $
|
|
413
|
+
new $01c7b97da92e6691$var$GroupRule(rules)
|
|
414
414
|
];
|
|
415
415
|
if (condition in theme.conditions || /^[@:]/.test(condition)) {
|
|
416
416
|
// Conditions starting with : are CSS pseudo classes. Nest them inside the parent rule.
|
|
@@ -425,18 +425,18 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
425
425
|
rule.addPseudo(prelude);
|
|
426
426
|
return rule;
|
|
427
427
|
});
|
|
428
|
-
return new $
|
|
428
|
+
return new $01c7b97da92e6691$var$GroupRule(rulesWithPseudo, $01c7b97da92e6691$var$generateName(priority, true));
|
|
429
429
|
}
|
|
430
430
|
// Otherwise, wrap the rule in the condition (e.g. @media).
|
|
431
431
|
// Top level layer is based on the priority of the rule, not the condition.
|
|
432
432
|
// Also group in a sub-layer based on the condition so that lightningcss can more effectively deduplicate rules.
|
|
433
|
-
let layer = `${$
|
|
434
|
-
return new $
|
|
433
|
+
let layer = `${$01c7b97da92e6691$var$generateName(priority, true)}.${$5ead8b4c6b503f30$exports.conditions[prelude] || $01c7b97da92e6691$var$generateArbitraryValueSelector(condition, true)}`;
|
|
434
|
+
return new $01c7b97da92e6691$var$AtRule(rules, prelude, layer, condition);
|
|
435
435
|
});
|
|
436
436
|
}
|
|
437
437
|
hasConditions = true;
|
|
438
438
|
return [
|
|
439
|
-
new $
|
|
439
|
+
new $01c7b97da92e6691$var$ConditionalRule(rules, condition)
|
|
440
440
|
];
|
|
441
441
|
}
|
|
442
442
|
function compileRule(property, themeProperty, value, priority, conditions, skipConditions) {
|
|
@@ -444,7 +444,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
444
444
|
if (propertyFunction) {
|
|
445
445
|
// Expand value to conditional CSS values, and then to rules.
|
|
446
446
|
let propertyValue = value;
|
|
447
|
-
let arbitrary = $
|
|
447
|
+
let arbitrary = $01c7b97da92e6691$export$22a8270399010c94(value);
|
|
448
448
|
let cssValue = arbitrary ? arbitrary : propertyFunction.toCSSValue(value);
|
|
449
449
|
let cssProperties = propertyFunction.toCSSProperties(property.startsWith('--') ? property : null, cssValue);
|
|
450
450
|
return conditionalToRules(cssProperties, priority, conditions, skipConditions, (value, priority, conditions)=>{
|
|
@@ -461,23 +461,23 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
461
461
|
let cssProperties = prop.cssProperties;
|
|
462
462
|
if (cssProperties.length !== 1) throw new Error(`self(${v}) is not supported. ${v} expands to multiple CSS properties.`);
|
|
463
463
|
dependencies.add(v);
|
|
464
|
-
return `var(--${$
|
|
464
|
+
return `var(--${$01c7b97da92e6691$var$shortCSSPropertyName(cssProperties[0])}`;
|
|
465
465
|
});
|
|
466
466
|
// Generate selector. This consists of three parts: property, conditions, value.
|
|
467
467
|
let cssProperty = key;
|
|
468
468
|
if (property.startsWith('--')) cssProperty = propertyFunction.cssProperties[0];
|
|
469
|
-
let className = $
|
|
469
|
+
let className = $01c7b97da92e6691$var$classNamePrefix(key, cssProperty);
|
|
470
470
|
if (conditions.size > 0) for (let condition of conditions){
|
|
471
471
|
let prelude = theme.conditions[condition] || condition;
|
|
472
472
|
let preludes = Array.isArray(prelude) ? prelude : [
|
|
473
473
|
prelude
|
|
474
474
|
];
|
|
475
|
-
for (let prelude of preludes)className += $
|
|
475
|
+
for (let prelude of preludes)className += $5ead8b4c6b503f30$exports.conditions[prelude] || $01c7b97da92e6691$var$generateArbitraryValueSelector(condition);
|
|
476
476
|
}
|
|
477
|
-
if (cssProperty !== key) className += $
|
|
478
|
-
className += $
|
|
479
|
-
className += $
|
|
480
|
-
rules.push(new $
|
|
477
|
+
if (cssProperty !== key) className += $01c7b97da92e6691$var$shortCSSPropertyName(cssProperty);
|
|
478
|
+
className += $5ead8b4c6b503f30$exports.values[cssProperty]?.[String(value)] ?? $01c7b97da92e6691$var$generateArbitraryValueSelector(String(value));
|
|
479
|
+
className += $01c7b97da92e6691$var$POSTFIX;
|
|
480
|
+
rules.push(new $01c7b97da92e6691$var$StyleRule(className, key, String(value), $01c7b97da92e6691$var$isCompilingDependencies ? themeProperty : property, propertyValue));
|
|
481
481
|
}
|
|
482
482
|
return [
|
|
483
483
|
0,
|
|
@@ -487,7 +487,7 @@ function $cf0b57705fca33e1$export$25d302a5b900a763(theme) {
|
|
|
487
487
|
} else throw new Error('Unknown property ' + themeProperty);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function $
|
|
490
|
+
function $01c7b97da92e6691$var$kebab(property) {
|
|
491
491
|
if (property.startsWith('--')) return property;
|
|
492
492
|
return property.replace(/([a-z])([A-Z])/g, (_, a, b)=>`${a}-${b.toLowerCase()}`);
|
|
493
493
|
}
|
|
@@ -495,57 +495,57 @@ function $cf0b57705fca33e1$var$kebab(property) {
|
|
|
495
495
|
// This maps to an alphabet containing lower case letters, upper case letters, and numbers.
|
|
496
496
|
// For numbers larger than 62, an underscore is prepended.
|
|
497
497
|
// This encoding allows easy parsing to enable runtime merging by property.
|
|
498
|
-
function $
|
|
498
|
+
function $01c7b97da92e6691$var$generateName(index, atStart = false) {
|
|
499
499
|
if (index < 26) // lower case letters
|
|
500
500
|
return String.fromCharCode(index + 97);
|
|
501
501
|
if (index < 52) // upper case letters
|
|
502
502
|
return String.fromCharCode(index - 26 + 65);
|
|
503
503
|
if (index < 62 && !atStart) // numbers
|
|
504
504
|
return String.fromCharCode(index - 52 + 48);
|
|
505
|
-
return '_' + $
|
|
505
|
+
return '_' + $01c7b97da92e6691$var$generateName(index - (atStart ? 52 : 62));
|
|
506
506
|
}
|
|
507
507
|
// For arbitrary values, we use a hash of the string to generate the class name.
|
|
508
|
-
function $
|
|
509
|
-
let c = $
|
|
508
|
+
function $01c7b97da92e6691$var$generateArbitraryValueSelector(v, atStart = false) {
|
|
509
|
+
let c = $01c7b97da92e6691$var$toBase62($01c7b97da92e6691$var$hash(v));
|
|
510
510
|
if (atStart && /^[0-9]/.test(c)) c = `_${c}`;
|
|
511
511
|
return c;
|
|
512
512
|
}
|
|
513
|
-
function $
|
|
514
|
-
if (value === 0) return $
|
|
513
|
+
function $01c7b97da92e6691$var$toBase62(value) {
|
|
514
|
+
if (value === 0) return $01c7b97da92e6691$var$generateName(value);
|
|
515
515
|
let res = '';
|
|
516
516
|
while(value){
|
|
517
517
|
let remainder = value % 62;
|
|
518
|
-
res += $
|
|
518
|
+
res += $01c7b97da92e6691$var$generateName(remainder);
|
|
519
519
|
value = Math.floor((value - remainder) / 62);
|
|
520
520
|
}
|
|
521
521
|
return res;
|
|
522
522
|
}
|
|
523
523
|
// djb2 hash function.
|
|
524
524
|
// http://www.cse.yorku.ca/~oz/hash.html
|
|
525
|
-
function $
|
|
525
|
+
function $01c7b97da92e6691$var$hash(v) {
|
|
526
526
|
let hash = 5381;
|
|
527
527
|
for(let i = 0; i < v.length; i++)hash = (hash << 5) + hash + v.charCodeAt(i) >>> 0;
|
|
528
528
|
return hash;
|
|
529
529
|
}
|
|
530
|
-
function $
|
|
530
|
+
function $01c7b97da92e6691$var$layerName(name) {
|
|
531
531
|
// All of our layers should be sub-layers of a single parent layer, so that
|
|
532
532
|
// the unsafe overrides layer always comes after.
|
|
533
533
|
return `_.${name}`;
|
|
534
534
|
}
|
|
535
|
-
let $
|
|
536
|
-
/** A CSS style rule. */ class $
|
|
535
|
+
let $01c7b97da92e6691$var$conditionStack = [];
|
|
536
|
+
/** A CSS style rule. */ class $01c7b97da92e6691$var$StyleRule {
|
|
537
537
|
constructor(className, property, value, themeProperty, themeValue){
|
|
538
538
|
this.className = className;
|
|
539
539
|
this.pseudos = '';
|
|
540
540
|
this.property = property;
|
|
541
541
|
this.value = value;
|
|
542
|
-
if (process.env.NODE_ENV !== 'production' && $
|
|
542
|
+
if (process.env.NODE_ENV !== 'production' && $01c7b97da92e6691$var$isCompilingDependencies !== null) {
|
|
543
543
|
this.themeProperty = themeProperty;
|
|
544
544
|
this.themeValue = themeValue;
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
copy() {
|
|
548
|
-
let rule = new $
|
|
548
|
+
let rule = new $01c7b97da92e6691$var$StyleRule(this.className, this.property, this.value, this.themeProperty, this.themeValue);
|
|
549
549
|
rule.pseudos = this.pseudos;
|
|
550
550
|
return rule;
|
|
551
551
|
}
|
|
@@ -563,7 +563,7 @@ let $cf0b57705fca33e1$var$conditionStack = [];
|
|
|
563
563
|
preludes.forEach((p, i)=>{
|
|
564
564
|
content += `${p} {\n${' '.repeat((i + 2) * 2)}`;
|
|
565
565
|
});
|
|
566
|
-
content += `${$
|
|
566
|
+
content += `${$01c7b97da92e6691$var$kebab(this.property)}: ${this.value};\n`;
|
|
567
567
|
preludes.map((_, i)=>{
|
|
568
568
|
content += `${' '.repeat((preludes.length - i) * 2)}}\n`;
|
|
569
569
|
});
|
|
@@ -582,29 +582,29 @@ let $cf0b57705fca33e1$var$conditionStack = [];
|
|
|
582
582
|
res += `${indent}rules += ' ${this.className}';`;
|
|
583
583
|
if (process.env.NODE_ENV !== 'production' && this.themeProperty) {
|
|
584
584
|
let name = this.themeProperty;
|
|
585
|
-
if (this.pseudos) $
|
|
585
|
+
if (this.pseudos) $01c7b97da92e6691$var$conditionStack.push(this.pseudos);
|
|
586
586
|
let propertyName = JSON.stringify(name);
|
|
587
587
|
let valueJson = JSON.stringify(this.themeValue);
|
|
588
|
-
if ($
|
|
588
|
+
if ($01c7b97da92e6691$var$conditionStack.length) {
|
|
589
589
|
// name += ` (${conditionStack.join(', ')})`;
|
|
590
|
-
let conditionKey = JSON.stringify($
|
|
590
|
+
let conditionKey = JSON.stringify($01c7b97da92e6691$var$conditionStack.join(' && '));
|
|
591
591
|
// Ensure currentRules[name] is an object, converting from simple value if needed
|
|
592
592
|
res += ` currentRules[${propertyName}] = typeof currentRules[${propertyName}] === 'object' ? currentRules[${propertyName}] : {"default": currentRules[${propertyName}]};`;
|
|
593
593
|
// Set the value for this specific condition
|
|
594
594
|
res += ` currentRules[${propertyName}][${conditionKey}] = ${valueJson};`;
|
|
595
595
|
} else res += ` currentRules[${propertyName}] = ${valueJson};`;
|
|
596
|
-
if (this.pseudos) $
|
|
596
|
+
if (this.pseudos) $01c7b97da92e6691$var$conditionStack.pop();
|
|
597
597
|
}
|
|
598
598
|
return res;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
/** Base class for rules that contain other rules. */ class $
|
|
601
|
+
/** Base class for rules that contain other rules. */ class $01c7b97da92e6691$var$GroupRule {
|
|
602
602
|
constructor(rules, layer){
|
|
603
603
|
this.rules = rules;
|
|
604
604
|
this.layer = layer ?? null;
|
|
605
605
|
}
|
|
606
606
|
copy() {
|
|
607
|
-
return new $
|
|
607
|
+
return new $01c7b97da92e6691$var$GroupRule(this.rules.map((rule)=>rule.copy()), this.layer);
|
|
608
608
|
}
|
|
609
609
|
addPseudo(prelude) {
|
|
610
610
|
for (let rule of this.rules)rule.addPseudo(prelude);
|
|
@@ -617,23 +617,23 @@ let $cf0b57705fca33e1$var$conditionStack = [];
|
|
|
617
617
|
}
|
|
618
618
|
toJS(allowedOverridesSet, indent = '') {
|
|
619
619
|
let rules = this.rules.slice();
|
|
620
|
-
let conditional = rules.filter((rule)=>rule instanceof $
|
|
620
|
+
let conditional = rules.filter((rule)=>rule instanceof $01c7b97da92e6691$var$ConditionalRule).reverse().map((rule, i)=>{
|
|
621
621
|
return `${i > 0 ? ' else ' : ''}${rule.toJS(allowedOverridesSet, indent)}`;
|
|
622
622
|
});
|
|
623
|
-
let elseCases = rules.filter((rule)=>!(rule instanceof $
|
|
623
|
+
let elseCases = rules.filter((rule)=>!(rule instanceof $01c7b97da92e6691$var$ConditionalRule)).map((rule)=>rule.toJS(allowedOverridesSet, indent));
|
|
624
624
|
if (conditional.length && elseCases.length) return `${conditional.join('')} else {\n${indent} ${elseCases.join('\n' + indent + ' ')}\n${indent}}`;
|
|
625
625
|
if (conditional.length) return conditional.join('');
|
|
626
626
|
return elseCases.join('\n' + indent);
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
/** A rule that applies conditionally in CSS (e.g. @media). */ class $
|
|
629
|
+
/** A rule that applies conditionally in CSS (e.g. @media). */ class $01c7b97da92e6691$var$AtRule extends $01c7b97da92e6691$var$GroupRule {
|
|
630
630
|
constructor(rules, prelude, layer, themeCondition){
|
|
631
631
|
super(rules, layer);
|
|
632
632
|
this.prelude = prelude;
|
|
633
633
|
this.themeCondition = themeCondition;
|
|
634
634
|
}
|
|
635
635
|
copy() {
|
|
636
|
-
return new $
|
|
636
|
+
return new $01c7b97da92e6691$var$AtRule(this.rules.map((rule)=>rule.copy()), this.prelude, this.layer, this.themeCondition);
|
|
637
637
|
}
|
|
638
638
|
toCSS(rulesByLayer, preludes = [], layer) {
|
|
639
639
|
preludes.push(this.prelude);
|
|
@@ -641,37 +641,37 @@ let $cf0b57705fca33e1$var$conditionStack = [];
|
|
|
641
641
|
preludes?.pop();
|
|
642
642
|
}
|
|
643
643
|
toJS(allowedOverridesSet, indent) {
|
|
644
|
-
$
|
|
644
|
+
$01c7b97da92e6691$var$conditionStack.push(this.themeCondition || this.prelude);
|
|
645
645
|
let res = super.toJS(allowedOverridesSet, indent);
|
|
646
|
-
$
|
|
646
|
+
$01c7b97da92e6691$var$conditionStack.pop();
|
|
647
647
|
return res;
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
|
-
/** A rule that applies conditionally at runtime. */ class $
|
|
650
|
+
/** A rule that applies conditionally at runtime. */ class $01c7b97da92e6691$var$ConditionalRule extends $01c7b97da92e6691$var$GroupRule {
|
|
651
651
|
constructor(rules, condition){
|
|
652
652
|
super(rules);
|
|
653
653
|
this.condition = condition;
|
|
654
654
|
}
|
|
655
655
|
copy() {
|
|
656
|
-
return new $
|
|
656
|
+
return new $01c7b97da92e6691$var$ConditionalRule(this.rules.map((rule)=>rule.copy()), this.condition);
|
|
657
657
|
}
|
|
658
658
|
getStaticClassName() {
|
|
659
659
|
throw new Error('Conditional rules cannot be compiled to a static class name. This is a bug.');
|
|
660
660
|
}
|
|
661
661
|
toJS(allowedOverridesSet, indent = '') {
|
|
662
|
-
$
|
|
662
|
+
$01c7b97da92e6691$var$conditionStack.push(this.condition);
|
|
663
663
|
let res = `${indent}if (props.${this.condition}) {\n${super.toJS(allowedOverridesSet, indent + ' ')}\n${indent}}`;
|
|
664
|
-
$
|
|
664
|
+
$01c7b97da92e6691$var$conditionStack.pop();
|
|
665
665
|
return res;
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
-
function $
|
|
668
|
+
function $01c7b97da92e6691$export$dbf350e5966cf602(content, layer = '_.a') {
|
|
669
669
|
// Check if `this` is undefined, which means style was not called as a macro but as a normal function.
|
|
670
670
|
// We also check if this is globalThis, which happens in non-strict mode bundles.
|
|
671
671
|
// Also allow style to be called as a normal function in tests.
|
|
672
672
|
// @ts-ignore
|
|
673
673
|
if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The css macro must be imported with {type: "macro"}.');
|
|
674
|
-
let className = $
|
|
674
|
+
let className = $01c7b97da92e6691$var$generateArbitraryValueSelector(content, true);
|
|
675
675
|
content = `@layer ${layer} {
|
|
676
676
|
.${className} {
|
|
677
677
|
${content}
|
|
@@ -685,13 +685,13 @@ function $cf0b57705fca33e1$export$dbf350e5966cf602(content, layer = '_.a') {
|
|
|
685
685
|
});
|
|
686
686
|
return className;
|
|
687
687
|
}
|
|
688
|
-
function $
|
|
688
|
+
function $01c7b97da92e6691$export$d25ddfdf17c3ad3e(css) {
|
|
689
689
|
// Check if `this` is undefined, which means style was not called as a macro but as a normal function.
|
|
690
690
|
// We also check if this is globalThis, which happens in non-strict mode bundles.
|
|
691
691
|
// Also allow style to be called as a normal function in tests.
|
|
692
692
|
// @ts-ignore
|
|
693
693
|
if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The keyframes macro must be imported with {type: "macro"}.');
|
|
694
|
-
let name = $
|
|
694
|
+
let name = $01c7b97da92e6691$var$generateArbitraryValueSelector(css, true);
|
|
695
695
|
css = `@keyframes ${name} {
|
|
696
696
|
${css}
|
|
697
697
|
}`;
|