@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,7 +1,7 @@
|
|
|
1
|
-
import $
|
|
2
|
-
import {resolve as $
|
|
3
|
-
import {fileURLToPath as $
|
|
4
|
-
import $
|
|
1
|
+
import $21kDB$propertiesmjs2 from "./properties.mjs";
|
|
2
|
+
import {resolve as $21kDB$resolve, dirname as $21kDB$dirname} from "path";
|
|
3
|
+
import {fileURLToPath as $21kDB$fileURLToPath} from "url";
|
|
4
|
+
import $21kDB$fs from "fs";
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright 2024 Adobe. All rights reserved.
|
|
@@ -18,11 +18,11 @@ import $5VBDY$fs from "fs";
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var $
|
|
21
|
+
var $2b02e40735e2ad11$var$$parcel$__dirname = $21kDB$resolve($21kDB$dirname($21kDB$fileURLToPath(import.meta.url)), "..");
|
|
22
22
|
// Postfix all class names with version for now.
|
|
23
|
-
const $
|
|
24
|
-
const $
|
|
25
|
-
class $
|
|
23
|
+
const $2b02e40735e2ad11$var$json = JSON.parse((0, $21kDB$fs).readFileSync($2b02e40735e2ad11$var$$parcel$__dirname + '/../package.json', 'utf8'));
|
|
24
|
+
const $2b02e40735e2ad11$var$POSTFIX = $2b02e40735e2ad11$var$json.version.includes('nightly') ? $2b02e40735e2ad11$var$json.version.match(/-nightly-(.*)/)[1] : $2b02e40735e2ad11$var$json.version.replace(/[0.]/g, '');
|
|
25
|
+
class $2b02e40735e2ad11$export$d03475ad9df06cd2 {
|
|
26
26
|
constructor(property, toCSS){
|
|
27
27
|
this.property = property;
|
|
28
28
|
this.toCSS = toCSS || ((value)=>String(value));
|
|
@@ -36,14 +36,14 @@ class $e3c5b37c91268204$export$d03475ad9df06cd2 {
|
|
|
36
36
|
return this.toCSS(value);
|
|
37
37
|
}
|
|
38
38
|
toCSSProperties(customProperty, value) {
|
|
39
|
-
return $
|
|
39
|
+
return $2b02e40735e2ad11$var$mapConditionalValue(value, (value)=>[
|
|
40
40
|
{
|
|
41
41
|
[customProperty || this.property]: String(value)
|
|
42
42
|
}
|
|
43
43
|
]);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
class $
|
|
46
|
+
class $2b02e40735e2ad11$export$965169194d2485f7 extends $2b02e40735e2ad11$export$d03475ad9df06cd2 {
|
|
47
47
|
constructor(property, mapping){
|
|
48
48
|
super(property);
|
|
49
49
|
this.mapping = mapping;
|
|
@@ -59,15 +59,15 @@ class $e3c5b37c91268204$export$965169194d2485f7 extends $e3c5b37c91268204$export
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
class $
|
|
62
|
+
class $2b02e40735e2ad11$export$40ae678e65d951f2 extends $2b02e40735e2ad11$export$965169194d2485f7 {
|
|
63
63
|
toCSSValue(value) {
|
|
64
64
|
let [color, opacity] = value.split('/');
|
|
65
|
-
return $
|
|
65
|
+
return $2b02e40735e2ad11$var$mapConditionalValue(this.mapping[color], (value)=>{
|
|
66
66
|
return opacity ? `rgb(from ${value} r g b / ${opacity}%)` : value;
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
class $
|
|
70
|
+
class $2b02e40735e2ad11$export$6bff0717a72a8669 extends $2b02e40735e2ad11$export$965169194d2485f7 {
|
|
71
71
|
constructor(property, mapping){
|
|
72
72
|
super(property, mapping);
|
|
73
73
|
}
|
|
@@ -76,7 +76,7 @@ class $e3c5b37c91268204$export$6bff0717a72a8669 extends $e3c5b37c91268204$export
|
|
|
76
76
|
return super.toCSSValue(value);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
class $
|
|
79
|
+
class $2b02e40735e2ad11$export$8c6b4dc3755476bb extends $2b02e40735e2ad11$export$6bff0717a72a8669 {
|
|
80
80
|
constructor(property, mapping, numberToCSS){
|
|
81
81
|
super(property, mapping);
|
|
82
82
|
this.numberToCSS = numberToCSS;
|
|
@@ -86,12 +86,12 @@ class $e3c5b37c91268204$export$8c6b4dc3755476bb extends $e3c5b37c91268204$export
|
|
|
86
86
|
return super.toCSSValue(value);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
class $
|
|
89
|
+
class $2b02e40735e2ad11$export$1b6028cfca42adca {
|
|
90
90
|
constructor(properties, expand, mapping){
|
|
91
91
|
this.cssProperties = properties;
|
|
92
92
|
this.expand = expand;
|
|
93
|
-
if (mapping instanceof $
|
|
94
|
-
else if (mapping) this.mapping = new $
|
|
93
|
+
if (mapping instanceof $2b02e40735e2ad11$export$965169194d2485f7) this.mapping = mapping;
|
|
94
|
+
else if (mapping) this.mapping = new $2b02e40735e2ad11$export$965169194d2485f7(properties[0], mapping);
|
|
95
95
|
else this.mapping = null;
|
|
96
96
|
}
|
|
97
97
|
toCSSValue(value) {
|
|
@@ -100,23 +100,23 @@ class $e3c5b37c91268204$export$1b6028cfca42adca {
|
|
|
100
100
|
}
|
|
101
101
|
toCSSProperties(customProperty, value) {
|
|
102
102
|
if (customProperty) throw new Error('Style properties that expand into multiple CSS properties cannot be set as CSS variables.');
|
|
103
|
-
return $
|
|
103
|
+
return $2b02e40735e2ad11$var$mapConditionalValue(value, (value)=>[
|
|
104
104
|
this.expand(value)
|
|
105
105
|
]);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function $
|
|
108
|
+
function $2b02e40735e2ad11$var$mapConditionalValue(value, fn) {
|
|
109
109
|
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
110
110
|
let res = {};
|
|
111
|
-
for(let condition in value)res[condition] = $
|
|
111
|
+
for(let condition in value)res[condition] = $2b02e40735e2ad11$var$mapConditionalValue(value[condition], fn);
|
|
112
112
|
return res;
|
|
113
113
|
} else return fn(value);
|
|
114
114
|
}
|
|
115
|
-
function $
|
|
115
|
+
function $2b02e40735e2ad11$var$mapConditionalShorthand(value, fn) {
|
|
116
116
|
if (typeof value === 'object') {
|
|
117
117
|
let res = {};
|
|
118
118
|
for(let condition in value){
|
|
119
|
-
let properties = $
|
|
119
|
+
let properties = $2b02e40735e2ad11$var$mapConditionalShorthand(value[condition], fn);
|
|
120
120
|
for(let property in properties){
|
|
121
121
|
res[property] ??= {};
|
|
122
122
|
res[property][condition] = properties[property];
|
|
@@ -125,22 +125,22 @@ function $e3c5b37c91268204$var$mapConditionalShorthand(value, fn) {
|
|
|
125
125
|
return res;
|
|
126
126
|
} else return fn(value);
|
|
127
127
|
}
|
|
128
|
-
function $
|
|
128
|
+
function $2b02e40735e2ad11$export$22a8270399010c94(value) {
|
|
129
129
|
if (typeof value === 'string' && value.startsWith('--')) return `var(${value})`;
|
|
130
130
|
else if (typeof value === 'string' && value[0] === '[' && value[value.length - 1] === ']') return value.slice(1, -1);
|
|
131
131
|
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;
|
|
132
132
|
}
|
|
133
|
-
function $
|
|
134
|
-
return $
|
|
133
|
+
function $2b02e40735e2ad11$var$shortCSSPropertyName(property) {
|
|
134
|
+
return $21kDB$propertiesmjs1.properties[property] ?? $2b02e40735e2ad11$var$generateArbitraryValueSelector(property, true);
|
|
135
135
|
}
|
|
136
|
-
function $
|
|
137
|
-
let className = $
|
|
136
|
+
function $2b02e40735e2ad11$var$classNamePrefix(property, cssProperty) {
|
|
137
|
+
let className = $21kDB$propertiesmjs1.properties[cssProperty];
|
|
138
138
|
if (className && property === '--' + className) return '-' + className + '_-';
|
|
139
139
|
if (className && !property.startsWith('--')) return className;
|
|
140
|
-
return '-' + $
|
|
140
|
+
return '-' + $2b02e40735e2ad11$var$generateArbitraryValueSelector(property, true) + '-';
|
|
141
141
|
}
|
|
142
|
-
let $
|
|
143
|
-
function $
|
|
142
|
+
let $2b02e40735e2ad11$var$isCompilingDependencies = false;
|
|
143
|
+
function $2b02e40735e2ad11$export$25d302a5b900a763(theme) {
|
|
144
144
|
let properties = new Map(Object.entries(theme.properties).map(([k, v])=>{
|
|
145
145
|
if (!Array.isArray(v) && v.cssProperties) return [
|
|
146
146
|
k,
|
|
@@ -148,7 +148,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
148
148
|
];
|
|
149
149
|
return [
|
|
150
150
|
k,
|
|
151
|
-
new $
|
|
151
|
+
new $2b02e40735e2ad11$export$965169194d2485f7(k, v)
|
|
152
152
|
];
|
|
153
153
|
}));
|
|
154
154
|
let dependencies = new Set();
|
|
@@ -166,7 +166,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
166
166
|
let usedPriorities = 0;
|
|
167
167
|
let setRules = (key, value)=>{
|
|
168
168
|
usedPriorities = Math.max(usedPriorities, value[0]);
|
|
169
|
-
rules.set(key, new $
|
|
169
|
+
rules.set(key, new $2b02e40735e2ad11$var$GroupRule(value[1]));
|
|
170
170
|
};
|
|
171
171
|
hasConditions = false;
|
|
172
172
|
for(let key in style){
|
|
@@ -182,7 +182,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
182
182
|
if (theme.shorthands[key]) {
|
|
183
183
|
let shorthand = theme.shorthands[key];
|
|
184
184
|
if (typeof shorthand === 'function') {
|
|
185
|
-
let expanded = $
|
|
185
|
+
let expanded = $2b02e40735e2ad11$var$mapConditionalShorthand(value, shorthand);
|
|
186
186
|
for(let k in expanded){
|
|
187
187
|
let v = expanded[k];
|
|
188
188
|
values.set(k, v);
|
|
@@ -201,13 +201,13 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
201
201
|
if (value != null) {
|
|
202
202
|
if (!(dep in theme.properties)) throw new Error(`Unknown dependency ${dep}`);
|
|
203
203
|
let prop = properties.get(dep);
|
|
204
|
-
let name = `--${$
|
|
204
|
+
let name = `--${$2b02e40735e2ad11$var$shortCSSPropertyName(prop.cssProperties[0])}`;
|
|
205
205
|
// Could potentially use @property to prevent the var from inheriting in children.
|
|
206
|
-
$
|
|
206
|
+
$2b02e40735e2ad11$var$isCompilingDependencies = dep;
|
|
207
207
|
setRules(name, compileValue(name, dep, value));
|
|
208
|
-
$
|
|
208
|
+
$2b02e40735e2ad11$var$isCompilingDependencies = null;
|
|
209
209
|
setRules(dep, compileValue(dep, dep, name));
|
|
210
|
-
$
|
|
210
|
+
$2b02e40735e2ad11$var$isCompilingDependencies = false;
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
dependencies.clear();
|
|
@@ -218,7 +218,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
218
218
|
for(let i = 0; i <= usedPriorities; i++){
|
|
219
219
|
if (first) first = false;
|
|
220
220
|
else css += ', ';
|
|
221
|
-
css += $
|
|
221
|
+
css += $2b02e40735e2ad11$var$layerName($2b02e40735e2ad11$var$generateName(i, true));
|
|
222
222
|
}
|
|
223
223
|
css += ';\n\n';
|
|
224
224
|
// If allowed overrides are provided, generate code to match the input override string and include only allowed classes.
|
|
@@ -248,13 +248,13 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
248
248
|
if (prop) {
|
|
249
249
|
for (let property of prop.cssProperties)// oxlint-disable-next-line max-depth
|
|
250
250
|
if (property && allowedOverridesSet.has(property)) {
|
|
251
|
-
let selector = $
|
|
251
|
+
let selector = $2b02e40735e2ad11$var$classNamePrefix(property, property);
|
|
252
252
|
let p = property.replace('--', '__');
|
|
253
253
|
js += `let ${p} = false;\n`;
|
|
254
254
|
loop += ` if (p[1] === ${JSON.stringify(selector)}) ${p} = true;\n`;
|
|
255
255
|
}
|
|
256
256
|
} else if (property.startsWith('--') && allowedOverridesSet.has(property)) {
|
|
257
|
-
let selector = $
|
|
257
|
+
let selector = $2b02e40735e2ad11$var$classNamePrefix(property, property);
|
|
258
258
|
let p = property.replace('--', '__');
|
|
259
259
|
js += `let ${p} = false;\n`;
|
|
260
260
|
loop += ` if (p[1] === ${JSON.stringify(selector)}) ${p} = true;\n`;
|
|
@@ -263,7 +263,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
263
263
|
let macroPart = process.env.NODE_ENV !== 'production' ? '|-macro\\$' : '';
|
|
264
264
|
let regex = `/(?:^|\\s)(${[
|
|
265
265
|
...allowedOverridesSet
|
|
266
|
-
].map((p)=>$
|
|
266
|
+
].map((p)=>$2b02e40735e2ad11$var$classNamePrefix(p, p)).join('|')}${macroPart})[^\\s]+/g`;
|
|
267
267
|
if (loop) {
|
|
268
268
|
js += `let matches = String(overrides || '').matchAll(${regex});\n`;
|
|
269
269
|
js += 'for (let p of matches) {\n';
|
|
@@ -276,21 +276,21 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
276
276
|
let isStatic = !(hasConditions || allowedOverrides);
|
|
277
277
|
let className = '';
|
|
278
278
|
let rulesByLayer = new Map();
|
|
279
|
-
let rootRule = new $
|
|
279
|
+
let rootRule = new $2b02e40735e2ad11$var$GroupRule([
|
|
280
280
|
...rules.values()
|
|
281
281
|
]);
|
|
282
282
|
if (isStatic) className += rootRule.getStaticClassName();
|
|
283
283
|
else js += rootRule.toJS(allowedOverridesSet) + '\n';
|
|
284
284
|
rootRule.toCSS(rulesByLayer);
|
|
285
285
|
for (let [layer, rules] of rulesByLayer){
|
|
286
|
-
css += `@layer ${$
|
|
286
|
+
css += `@layer ${$2b02e40735e2ad11$var$layerName(layer)} {\n`;
|
|
287
287
|
css += rules.join('\n\n');
|
|
288
288
|
css += '}\n\n';
|
|
289
289
|
}
|
|
290
290
|
// @ts-expect-error
|
|
291
291
|
let loc = this?.loc?.filePath + ':' + this?.loc?.line + ':' + this?.loc?.col;
|
|
292
292
|
if (isStatic && process.env.NODE_ENV !== 'production') {
|
|
293
|
-
let id = $
|
|
293
|
+
let id = $2b02e40735e2ad11$var$toBase62($2b02e40735e2ad11$var$hash(className + loc));
|
|
294
294
|
css += `.-macro-static-${id} {
|
|
295
295
|
--macro-data-${id}: ${JSON.stringify({
|
|
296
296
|
style: style,
|
|
@@ -356,7 +356,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
356
356
|
// The @layer order in the generated CSS will ensure that it overrides classes applied by runtime conditions.
|
|
357
357
|
let isCSSCondition = condition in theme.conditions || /^[@:]/.test(condition);
|
|
358
358
|
if (!wasCSSCondition && isCSSCondition && rules.length) rules = [
|
|
359
|
-
new $
|
|
359
|
+
new $2b02e40735e2ad11$var$GroupRule(rules)
|
|
360
360
|
];
|
|
361
361
|
wasCSSCondition = isCSSCondition;
|
|
362
362
|
// Increment the current priority whenever we see a new CSS condition.
|
|
@@ -396,7 +396,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
396
396
|
}
|
|
397
397
|
function compileCondition(conditions, condition, priority, rules) {
|
|
398
398
|
if (condition === 'default' || conditions.has(condition)) return [
|
|
399
|
-
new $
|
|
399
|
+
new $2b02e40735e2ad11$var$GroupRule(rules)
|
|
400
400
|
];
|
|
401
401
|
if (condition in theme.conditions || /^[@:]/.test(condition)) {
|
|
402
402
|
// Conditions starting with : are CSS pseudo classes. Nest them inside the parent rule.
|
|
@@ -411,18 +411,18 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
411
411
|
rule.addPseudo(prelude);
|
|
412
412
|
return rule;
|
|
413
413
|
});
|
|
414
|
-
return new $
|
|
414
|
+
return new $2b02e40735e2ad11$var$GroupRule(rulesWithPseudo, $2b02e40735e2ad11$var$generateName(priority, true));
|
|
415
415
|
}
|
|
416
416
|
// Otherwise, wrap the rule in the condition (e.g. @media).
|
|
417
417
|
// Top level layer is based on the priority of the rule, not the condition.
|
|
418
418
|
// Also group in a sub-layer based on the condition so that lightningcss can more effectively deduplicate rules.
|
|
419
|
-
let layer = `${$
|
|
420
|
-
return new $
|
|
419
|
+
let layer = `${$2b02e40735e2ad11$var$generateName(priority, true)}.${$21kDB$propertiesmjs.conditions[prelude] || $2b02e40735e2ad11$var$generateArbitraryValueSelector(condition, true)}`;
|
|
420
|
+
return new $2b02e40735e2ad11$var$AtRule(rules, prelude, layer, condition);
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
hasConditions = true;
|
|
424
424
|
return [
|
|
425
|
-
new $
|
|
425
|
+
new $2b02e40735e2ad11$var$ConditionalRule(rules, condition)
|
|
426
426
|
];
|
|
427
427
|
}
|
|
428
428
|
function compileRule(property, themeProperty, value, priority, conditions, skipConditions) {
|
|
@@ -430,7 +430,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
430
430
|
if (propertyFunction) {
|
|
431
431
|
// Expand value to conditional CSS values, and then to rules.
|
|
432
432
|
let propertyValue = value;
|
|
433
|
-
let arbitrary = $
|
|
433
|
+
let arbitrary = $2b02e40735e2ad11$export$22a8270399010c94(value);
|
|
434
434
|
let cssValue = arbitrary ? arbitrary : propertyFunction.toCSSValue(value);
|
|
435
435
|
let cssProperties = propertyFunction.toCSSProperties(property.startsWith('--') ? property : null, cssValue);
|
|
436
436
|
return conditionalToRules(cssProperties, priority, conditions, skipConditions, (value, priority, conditions)=>{
|
|
@@ -447,23 +447,23 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
447
447
|
let cssProperties = prop.cssProperties;
|
|
448
448
|
if (cssProperties.length !== 1) throw new Error(`self(${v}) is not supported. ${v} expands to multiple CSS properties.`);
|
|
449
449
|
dependencies.add(v);
|
|
450
|
-
return `var(--${$
|
|
450
|
+
return `var(--${$2b02e40735e2ad11$var$shortCSSPropertyName(cssProperties[0])}`;
|
|
451
451
|
});
|
|
452
452
|
// Generate selector. This consists of three parts: property, conditions, value.
|
|
453
453
|
let cssProperty = key;
|
|
454
454
|
if (property.startsWith('--')) cssProperty = propertyFunction.cssProperties[0];
|
|
455
|
-
let className = $
|
|
455
|
+
let className = $2b02e40735e2ad11$var$classNamePrefix(key, cssProperty);
|
|
456
456
|
if (conditions.size > 0) for (let condition of conditions){
|
|
457
457
|
let prelude = theme.conditions[condition] || condition;
|
|
458
458
|
let preludes = Array.isArray(prelude) ? prelude : [
|
|
459
459
|
prelude
|
|
460
460
|
];
|
|
461
|
-
for (let prelude of preludes)className += $
|
|
461
|
+
for (let prelude of preludes)className += $21kDB$propertiesmjs.conditions[prelude] || $2b02e40735e2ad11$var$generateArbitraryValueSelector(condition);
|
|
462
462
|
}
|
|
463
|
-
if (cssProperty !== key) className += $
|
|
464
|
-
className += $
|
|
465
|
-
className += $
|
|
466
|
-
rules.push(new $
|
|
463
|
+
if (cssProperty !== key) className += $2b02e40735e2ad11$var$shortCSSPropertyName(cssProperty);
|
|
464
|
+
className += $21kDB$propertiesmjs2.values[cssProperty]?.[String(value)] ?? $2b02e40735e2ad11$var$generateArbitraryValueSelector(String(value));
|
|
465
|
+
className += $2b02e40735e2ad11$var$POSTFIX;
|
|
466
|
+
rules.push(new $2b02e40735e2ad11$var$StyleRule(className, key, String(value), $2b02e40735e2ad11$var$isCompilingDependencies ? themeProperty : property, propertyValue));
|
|
467
467
|
}
|
|
468
468
|
return [
|
|
469
469
|
0,
|
|
@@ -473,7 +473,7 @@ function $e3c5b37c91268204$export$25d302a5b900a763(theme) {
|
|
|
473
473
|
} else throw new Error('Unknown property ' + themeProperty);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
function $
|
|
476
|
+
function $2b02e40735e2ad11$var$kebab(property) {
|
|
477
477
|
if (property.startsWith('--')) return property;
|
|
478
478
|
return property.replace(/([a-z])([A-Z])/g, (_, a, b)=>`${a}-${b.toLowerCase()}`);
|
|
479
479
|
}
|
|
@@ -481,57 +481,57 @@ function $e3c5b37c91268204$var$kebab(property) {
|
|
|
481
481
|
// This maps to an alphabet containing lower case letters, upper case letters, and numbers.
|
|
482
482
|
// For numbers larger than 62, an underscore is prepended.
|
|
483
483
|
// This encoding allows easy parsing to enable runtime merging by property.
|
|
484
|
-
function $
|
|
484
|
+
function $2b02e40735e2ad11$var$generateName(index, atStart = false) {
|
|
485
485
|
if (index < 26) // lower case letters
|
|
486
486
|
return String.fromCharCode(index + 97);
|
|
487
487
|
if (index < 52) // upper case letters
|
|
488
488
|
return String.fromCharCode(index - 26 + 65);
|
|
489
489
|
if (index < 62 && !atStart) // numbers
|
|
490
490
|
return String.fromCharCode(index - 52 + 48);
|
|
491
|
-
return '_' + $
|
|
491
|
+
return '_' + $2b02e40735e2ad11$var$generateName(index - (atStart ? 52 : 62));
|
|
492
492
|
}
|
|
493
493
|
// For arbitrary values, we use a hash of the string to generate the class name.
|
|
494
|
-
function $
|
|
495
|
-
let c = $
|
|
494
|
+
function $2b02e40735e2ad11$var$generateArbitraryValueSelector(v, atStart = false) {
|
|
495
|
+
let c = $2b02e40735e2ad11$var$toBase62($2b02e40735e2ad11$var$hash(v));
|
|
496
496
|
if (atStart && /^[0-9]/.test(c)) c = `_${c}`;
|
|
497
497
|
return c;
|
|
498
498
|
}
|
|
499
|
-
function $
|
|
500
|
-
if (value === 0) return $
|
|
499
|
+
function $2b02e40735e2ad11$var$toBase62(value) {
|
|
500
|
+
if (value === 0) return $2b02e40735e2ad11$var$generateName(value);
|
|
501
501
|
let res = '';
|
|
502
502
|
while(value){
|
|
503
503
|
let remainder = value % 62;
|
|
504
|
-
res += $
|
|
504
|
+
res += $2b02e40735e2ad11$var$generateName(remainder);
|
|
505
505
|
value = Math.floor((value - remainder) / 62);
|
|
506
506
|
}
|
|
507
507
|
return res;
|
|
508
508
|
}
|
|
509
509
|
// djb2 hash function.
|
|
510
510
|
// http://www.cse.yorku.ca/~oz/hash.html
|
|
511
|
-
function $
|
|
511
|
+
function $2b02e40735e2ad11$var$hash(v) {
|
|
512
512
|
let hash = 5381;
|
|
513
513
|
for(let i = 0; i < v.length; i++)hash = (hash << 5) + hash + v.charCodeAt(i) >>> 0;
|
|
514
514
|
return hash;
|
|
515
515
|
}
|
|
516
|
-
function $
|
|
516
|
+
function $2b02e40735e2ad11$var$layerName(name) {
|
|
517
517
|
// All of our layers should be sub-layers of a single parent layer, so that
|
|
518
518
|
// the unsafe overrides layer always comes after.
|
|
519
519
|
return `_.${name}`;
|
|
520
520
|
}
|
|
521
|
-
let $
|
|
522
|
-
/** A CSS style rule. */ class $
|
|
521
|
+
let $2b02e40735e2ad11$var$conditionStack = [];
|
|
522
|
+
/** A CSS style rule. */ class $2b02e40735e2ad11$var$StyleRule {
|
|
523
523
|
constructor(className, property, value, themeProperty, themeValue){
|
|
524
524
|
this.className = className;
|
|
525
525
|
this.pseudos = '';
|
|
526
526
|
this.property = property;
|
|
527
527
|
this.value = value;
|
|
528
|
-
if (process.env.NODE_ENV !== 'production' && $
|
|
528
|
+
if (process.env.NODE_ENV !== 'production' && $2b02e40735e2ad11$var$isCompilingDependencies !== null) {
|
|
529
529
|
this.themeProperty = themeProperty;
|
|
530
530
|
this.themeValue = themeValue;
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
copy() {
|
|
534
|
-
let rule = new $
|
|
534
|
+
let rule = new $2b02e40735e2ad11$var$StyleRule(this.className, this.property, this.value, this.themeProperty, this.themeValue);
|
|
535
535
|
rule.pseudos = this.pseudos;
|
|
536
536
|
return rule;
|
|
537
537
|
}
|
|
@@ -549,7 +549,7 @@ let $e3c5b37c91268204$var$conditionStack = [];
|
|
|
549
549
|
preludes.forEach((p, i)=>{
|
|
550
550
|
content += `${p} {\n${' '.repeat((i + 2) * 2)}`;
|
|
551
551
|
});
|
|
552
|
-
content += `${$
|
|
552
|
+
content += `${$2b02e40735e2ad11$var$kebab(this.property)}: ${this.value};\n`;
|
|
553
553
|
preludes.map((_, i)=>{
|
|
554
554
|
content += `${' '.repeat((preludes.length - i) * 2)}}\n`;
|
|
555
555
|
});
|
|
@@ -568,29 +568,29 @@ let $e3c5b37c91268204$var$conditionStack = [];
|
|
|
568
568
|
res += `${indent}rules += ' ${this.className}';`;
|
|
569
569
|
if (process.env.NODE_ENV !== 'production' && this.themeProperty) {
|
|
570
570
|
let name = this.themeProperty;
|
|
571
|
-
if (this.pseudos) $
|
|
571
|
+
if (this.pseudos) $2b02e40735e2ad11$var$conditionStack.push(this.pseudos);
|
|
572
572
|
let propertyName = JSON.stringify(name);
|
|
573
573
|
let valueJson = JSON.stringify(this.themeValue);
|
|
574
|
-
if ($
|
|
574
|
+
if ($2b02e40735e2ad11$var$conditionStack.length) {
|
|
575
575
|
// name += ` (${conditionStack.join(', ')})`;
|
|
576
|
-
let conditionKey = JSON.stringify($
|
|
576
|
+
let conditionKey = JSON.stringify($2b02e40735e2ad11$var$conditionStack.join(' && '));
|
|
577
577
|
// Ensure currentRules[name] is an object, converting from simple value if needed
|
|
578
578
|
res += ` currentRules[${propertyName}] = typeof currentRules[${propertyName}] === 'object' ? currentRules[${propertyName}] : {"default": currentRules[${propertyName}]};`;
|
|
579
579
|
// Set the value for this specific condition
|
|
580
580
|
res += ` currentRules[${propertyName}][${conditionKey}] = ${valueJson};`;
|
|
581
581
|
} else res += ` currentRules[${propertyName}] = ${valueJson};`;
|
|
582
|
-
if (this.pseudos) $
|
|
582
|
+
if (this.pseudos) $2b02e40735e2ad11$var$conditionStack.pop();
|
|
583
583
|
}
|
|
584
584
|
return res;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
/** Base class for rules that contain other rules. */ class $
|
|
587
|
+
/** Base class for rules that contain other rules. */ class $2b02e40735e2ad11$var$GroupRule {
|
|
588
588
|
constructor(rules, layer){
|
|
589
589
|
this.rules = rules;
|
|
590
590
|
this.layer = layer ?? null;
|
|
591
591
|
}
|
|
592
592
|
copy() {
|
|
593
|
-
return new $
|
|
593
|
+
return new $2b02e40735e2ad11$var$GroupRule(this.rules.map((rule)=>rule.copy()), this.layer);
|
|
594
594
|
}
|
|
595
595
|
addPseudo(prelude) {
|
|
596
596
|
for (let rule of this.rules)rule.addPseudo(prelude);
|
|
@@ -603,23 +603,23 @@ let $e3c5b37c91268204$var$conditionStack = [];
|
|
|
603
603
|
}
|
|
604
604
|
toJS(allowedOverridesSet, indent = '') {
|
|
605
605
|
let rules = this.rules.slice();
|
|
606
|
-
let conditional = rules.filter((rule)=>rule instanceof $
|
|
606
|
+
let conditional = rules.filter((rule)=>rule instanceof $2b02e40735e2ad11$var$ConditionalRule).reverse().map((rule, i)=>{
|
|
607
607
|
return `${i > 0 ? ' else ' : ''}${rule.toJS(allowedOverridesSet, indent)}`;
|
|
608
608
|
});
|
|
609
|
-
let elseCases = rules.filter((rule)=>!(rule instanceof $
|
|
609
|
+
let elseCases = rules.filter((rule)=>!(rule instanceof $2b02e40735e2ad11$var$ConditionalRule)).map((rule)=>rule.toJS(allowedOverridesSet, indent));
|
|
610
610
|
if (conditional.length && elseCases.length) return `${conditional.join('')} else {\n${indent} ${elseCases.join('\n' + indent + ' ')}\n${indent}}`;
|
|
611
611
|
if (conditional.length) return conditional.join('');
|
|
612
612
|
return elseCases.join('\n' + indent);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
/** A rule that applies conditionally in CSS (e.g. @media). */ class $
|
|
615
|
+
/** A rule that applies conditionally in CSS (e.g. @media). */ class $2b02e40735e2ad11$var$AtRule extends $2b02e40735e2ad11$var$GroupRule {
|
|
616
616
|
constructor(rules, prelude, layer, themeCondition){
|
|
617
617
|
super(rules, layer);
|
|
618
618
|
this.prelude = prelude;
|
|
619
619
|
this.themeCondition = themeCondition;
|
|
620
620
|
}
|
|
621
621
|
copy() {
|
|
622
|
-
return new $
|
|
622
|
+
return new $2b02e40735e2ad11$var$AtRule(this.rules.map((rule)=>rule.copy()), this.prelude, this.layer, this.themeCondition);
|
|
623
623
|
}
|
|
624
624
|
toCSS(rulesByLayer, preludes = [], layer) {
|
|
625
625
|
preludes.push(this.prelude);
|
|
@@ -627,37 +627,37 @@ let $e3c5b37c91268204$var$conditionStack = [];
|
|
|
627
627
|
preludes?.pop();
|
|
628
628
|
}
|
|
629
629
|
toJS(allowedOverridesSet, indent) {
|
|
630
|
-
$
|
|
630
|
+
$2b02e40735e2ad11$var$conditionStack.push(this.themeCondition || this.prelude);
|
|
631
631
|
let res = super.toJS(allowedOverridesSet, indent);
|
|
632
|
-
$
|
|
632
|
+
$2b02e40735e2ad11$var$conditionStack.pop();
|
|
633
633
|
return res;
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
/** A rule that applies conditionally at runtime. */ class $
|
|
636
|
+
/** A rule that applies conditionally at runtime. */ class $2b02e40735e2ad11$var$ConditionalRule extends $2b02e40735e2ad11$var$GroupRule {
|
|
637
637
|
constructor(rules, condition){
|
|
638
638
|
super(rules);
|
|
639
639
|
this.condition = condition;
|
|
640
640
|
}
|
|
641
641
|
copy() {
|
|
642
|
-
return new $
|
|
642
|
+
return new $2b02e40735e2ad11$var$ConditionalRule(this.rules.map((rule)=>rule.copy()), this.condition);
|
|
643
643
|
}
|
|
644
644
|
getStaticClassName() {
|
|
645
645
|
throw new Error('Conditional rules cannot be compiled to a static class name. This is a bug.');
|
|
646
646
|
}
|
|
647
647
|
toJS(allowedOverridesSet, indent = '') {
|
|
648
|
-
$
|
|
648
|
+
$2b02e40735e2ad11$var$conditionStack.push(this.condition);
|
|
649
649
|
let res = `${indent}if (props.${this.condition}) {\n${super.toJS(allowedOverridesSet, indent + ' ')}\n${indent}}`;
|
|
650
|
-
$
|
|
650
|
+
$2b02e40735e2ad11$var$conditionStack.pop();
|
|
651
651
|
return res;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
function $
|
|
654
|
+
function $2b02e40735e2ad11$export$dbf350e5966cf602(content, layer = '_.a') {
|
|
655
655
|
// Check if `this` is undefined, which means style was not called as a macro but as a normal function.
|
|
656
656
|
// We also check if this is globalThis, which happens in non-strict mode bundles.
|
|
657
657
|
// Also allow style to be called as a normal function in tests.
|
|
658
658
|
// @ts-ignore
|
|
659
659
|
if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The css macro must be imported with {type: "macro"}.');
|
|
660
|
-
let className = $
|
|
660
|
+
let className = $2b02e40735e2ad11$var$generateArbitraryValueSelector(content, true);
|
|
661
661
|
content = `@layer ${layer} {
|
|
662
662
|
.${className} {
|
|
663
663
|
${content}
|
|
@@ -671,13 +671,13 @@ function $e3c5b37c91268204$export$dbf350e5966cf602(content, layer = '_.a') {
|
|
|
671
671
|
});
|
|
672
672
|
return className;
|
|
673
673
|
}
|
|
674
|
-
function $
|
|
674
|
+
function $2b02e40735e2ad11$export$d25ddfdf17c3ad3e(css) {
|
|
675
675
|
// Check if `this` is undefined, which means style was not called as a macro but as a normal function.
|
|
676
676
|
// We also check if this is globalThis, which happens in non-strict mode bundles.
|
|
677
677
|
// Also allow style to be called as a normal function in tests.
|
|
678
678
|
// @ts-ignore
|
|
679
679
|
if ((this == null || this === globalThis) && process.env.NODE_ENV !== 'test') throw new Error('The keyframes macro must be imported with {type: "macro"}.');
|
|
680
|
-
let name = $
|
|
680
|
+
let name = $2b02e40735e2ad11$var$generateArbitraryValueSelector(css, true);
|
|
681
681
|
css = `@keyframes ${name} {
|
|
682
682
|
${css}
|
|
683
683
|
}`;
|
|
@@ -689,5 +689,5 @@ function $e3c5b37c91268204$export$d25ddfdf17c3ad3e(css) {
|
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
|
|
692
|
-
export {$
|
|
692
|
+
export {$2b02e40735e2ad11$export$d03475ad9df06cd2 as ArbitraryProperty, $2b02e40735e2ad11$export$965169194d2485f7 as MappedProperty, $2b02e40735e2ad11$export$40ae678e65d951f2 as ColorProperty, $2b02e40735e2ad11$export$6bff0717a72a8669 as PercentageProperty, $2b02e40735e2ad11$export$8c6b4dc3755476bb as SizingProperty, $2b02e40735e2ad11$export$1b6028cfca42adca as ExpandedProperty, $2b02e40735e2ad11$export$22a8270399010c94 as parseArbitraryValue, $2b02e40735e2ad11$export$25d302a5b900a763 as createTheme, $2b02e40735e2ad11$export$dbf350e5966cf602 as css, $2b02e40735e2ad11$export$d25ddfdf17c3ad3e as keyframes};
|
|
693
693
|
//# sourceMappingURL=style-macro.mjs.map
|