@react-spectrum/s2 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +3 -3
- package/dist/Accordion.cjs.map +1 -1
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionBar.cjs +62 -61
- package/dist/ActionBar.cjs.map +1 -1
- package/dist/ActionBar.css +58 -58
- package/dist/ActionBar.css.map +1 -1
- package/dist/ActionBar.mjs +62 -61
- package/dist/ActionBar.mjs.map +1 -1
- package/dist/ActionButton.cjs +234 -234
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +160 -160
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +234 -234
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +16 -16
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +16 -16
- package/dist/Add.cjs +10 -10
- package/dist/Add.css +6 -6
- package/dist/Add.mjs +10 -10
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Asterisk.cjs +6 -6
- package/dist/Asterisk.css +4 -4
- package/dist/Asterisk.mjs +6 -6
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +16 -16
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +121 -121
- package/dist/AvatarGroup.css +31 -31
- package/dist/AvatarGroup.mjs +121 -121
- package/dist/Badge.cjs +197 -197
- package/dist/Badge.css +125 -125
- package/dist/Badge.mjs +197 -197
- package/dist/Breadcrumbs.cjs +235 -235
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +100 -100
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +235 -235
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +333 -333
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +174 -174
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +333 -333
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +21 -21
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +21 -21
- package/dist/Calendar.cjs +169 -169
- package/dist/Calendar.cjs.map +1 -1
- package/dist/Calendar.css +134 -134
- package/dist/Calendar.css.map +1 -1
- package/dist/Calendar.mjs +169 -169
- package/dist/Calendar.mjs.map +1 -1
- package/dist/Card.cjs +310 -310
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +206 -206
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +310 -310
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +19 -19
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css +17 -17
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +19 -19
- package/dist/CardView.mjs.map +1 -1
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +162 -162
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +95 -91
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +162 -162
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +44 -44
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +37 -37
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +44 -44
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/Checkmark.cjs +12 -12
- package/dist/Checkmark.css +8 -8
- package/dist/Checkmark.mjs +12 -12
- package/dist/Chevron.cjs +12 -12
- package/dist/Chevron.css +10 -10
- package/dist/Chevron.mjs +12 -12
- package/dist/ClearButton.cjs +30 -30
- package/dist/ClearButton.css +30 -30
- package/dist/ClearButton.mjs +30 -30
- package/dist/CloseButton.cjs +56 -56
- package/dist/CloseButton.css +47 -47
- package/dist/CloseButton.mjs +56 -56
- package/dist/ColorArea.cjs +17 -17
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +16 -16
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +17 -17
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +32 -32
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +27 -27
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +32 -32
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +27 -27
- package/dist/ColorHandle.css +42 -42
- package/dist/ColorHandle.mjs +27 -27
- package/dist/ColorSlider.cjs +109 -109
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +52 -52
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +109 -109
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +30 -30
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +30 -30
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +30 -30
- package/dist/ColorSwatchPicker.css +48 -48
- package/dist/ColorSwatchPicker.mjs +30 -30
- package/dist/ColorWheel.cjs +31 -27
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css +17 -17
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs +31 -27
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +383 -383
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +187 -187
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +383 -383
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +50 -50
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/Cross.cjs +14 -14
- package/dist/Cross.css +10 -10
- package/dist/Cross.mjs +14 -14
- package/dist/CustomDialog.cjs +26 -26
- package/dist/CustomDialog.cjs.map +1 -1
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.css.map +1 -1
- package/dist/CustomDialog.mjs +26 -26
- package/dist/CustomDialog.mjs.map +1 -1
- package/dist/Dash.cjs +10 -10
- package/dist/Dash.css +6 -6
- package/dist/Dash.mjs +10 -10
- package/dist/DateField.cjs +74 -74
- package/dist/DateField.cjs.map +1 -1
- package/dist/DateField.css +77 -77
- package/dist/DateField.css.map +1 -1
- package/dist/DateField.mjs +74 -74
- package/dist/DateField.mjs.map +1 -1
- package/dist/DatePicker.cjs +173 -173
- package/dist/DatePicker.cjs.map +1 -1
- package/dist/DatePicker.css +128 -128
- package/dist/DatePicker.css.map +1 -1
- package/dist/DatePicker.mjs +173 -173
- package/dist/DatePicker.mjs.map +1 -1
- package/dist/DateRangePicker.cjs +56 -56
- package/dist/DateRangePicker.cjs.map +1 -1
- package/dist/DateRangePicker.css +59 -59
- package/dist/DateRangePicker.css.map +1 -1
- package/dist/DateRangePicker.mjs +56 -56
- package/dist/DateRangePicker.mjs.map +1 -1
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.cjs.map +1 -1
- package/dist/Dialog.css +70 -70
- package/dist/Dialog.css.map +1 -1
- package/dist/Dialog.mjs +17 -17
- package/dist/Dialog.mjs.map +1 -1
- package/dist/Disclosure.cjs +120 -120
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +120 -120
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +25 -25
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +26 -26
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +62 -62
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +57 -57
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +62 -62
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +348 -348
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +147 -147
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +348 -348
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css +9 -9
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs +10 -10
- package/dist/Form.mjs.map +1 -1
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.cjs.map +1 -1
- package/dist/FullscreenDialog.css +78 -78
- package/dist/FullscreenDialog.css.map +1 -1
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/FullscreenDialog.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +229 -229
- package/dist/IllustratedMessage.css +72 -72
- package/dist/IllustratedMessage.mjs +229 -229
- package/dist/Image.cjs +14 -14
- package/dist/Image.css +14 -14
- package/dist/Image.mjs +14 -14
- package/dist/InlineAlert.cjs +101 -101
- package/dist/InlineAlert.css +76 -76
- package/dist/InlineAlert.mjs +101 -101
- package/dist/Link.cjs +50 -50
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +41 -41
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +50 -50
- package/dist/Link.mjs.map +1 -1
- package/dist/LinkOut.cjs +8 -8
- package/dist/LinkOut.css +8 -8
- package/dist/LinkOut.mjs +8 -8
- package/dist/Menu.cjs +446 -443
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +184 -184
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +446 -443
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +154 -154
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +91 -91
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +154 -154
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +66 -66
- package/dist/Modal.cjs.map +1 -1
- package/dist/Modal.css +54 -54
- package/dist/Modal.css.map +1 -1
- package/dist/Modal.mjs +66 -66
- package/dist/Modal.mjs.map +1 -1
- package/dist/NotificationBadge.cjs +57 -57
- package/dist/NotificationBadge.css +49 -49
- package/dist/NotificationBadge.mjs +57 -57
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +99 -99
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +115 -115
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +275 -275
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +173 -173
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +275 -275
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +89 -89
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +70 -70
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +89 -89
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +164 -164
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +99 -99
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +164 -164
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +32 -32
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +24 -24
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +32 -32
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +11 -11
- package/dist/Provider.css +10 -10
- package/dist/Provider.mjs +11 -11
- package/dist/Radio.cjs +146 -146
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +78 -78
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +146 -146
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +42 -42
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +37 -37
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +42 -42
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeCalendar.cjs +8 -8
- package/dist/RangeCalendar.cjs.map +1 -1
- package/dist/RangeCalendar.css +10 -10
- package/dist/RangeCalendar.css.map +1 -1
- package/dist/RangeCalendar.mjs +8 -8
- package/dist/RangeCalendar.mjs.map +1 -1
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +45 -45
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +42 -42
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +180 -180
- package/dist/SegmentedControl.css +123 -123
- package/dist/SegmentedControl.mjs +180 -180
- package/dist/SelectBoxGroup.cjs +144 -144
- package/dist/SelectBoxGroup.cjs.map +1 -1
- package/dist/SelectBoxGroup.css +120 -120
- package/dist/SelectBoxGroup.css.map +1 -1
- package/dist/SelectBoxGroup.mjs +144 -144
- package/dist/SelectBoxGroup.mjs.map +1 -1
- package/dist/Slider.cjs +295 -295
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +154 -154
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +295 -295
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +116 -116
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +116 -116
- package/dist/Switch.cjs +155 -155
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +74 -74
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +155 -155
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +415 -415
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +416 -416
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +127 -127
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +105 -105
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +127 -127
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +127 -127
- package/dist/TabsPicker.cjs.map +1 -1
- package/dist/TabsPicker.css +108 -108
- package/dist/TabsPicker.css.map +1 -1
- package/dist/TabsPicker.mjs +127 -127
- package/dist/TabsPicker.mjs.map +1 -1
- package/dist/TagGroup.cjs +204 -204
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +146 -146
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +204 -204
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +54 -54
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +59 -59
- package/dist/TextField.mjs.map +1 -1
- package/dist/TimeField.cjs +52 -52
- package/dist/TimeField.cjs.map +1 -1
- package/dist/TimeField.css +47 -47
- package/dist/TimeField.css.map +1 -1
- package/dist/TimeField.mjs +52 -52
- package/dist/TimeField.mjs.map +1 -1
- package/dist/Toast.cjs +120 -120
- package/dist/Toast.cjs.map +1 -1
- package/dist/Toast.css +110 -110
- package/dist/Toast.css.map +1 -1
- package/dist/Toast.mjs +120 -120
- package/dist/Toast.mjs.map +1 -1
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +3 -3
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs +78 -78
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +65 -65
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +78 -78
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +144 -128
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +131 -127
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +144 -128
- package/dist/TreeView.mjs.map +1 -1
- package/dist/types.d.ts +68 -72
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs +12 -12
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +12 -12
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/icons/Skeleton.mjs.map +1 -1
- package/icons/runtime.cjs +16 -3
- package/icons/runtime.cjs.map +1 -1
- package/icons/runtime.mjs +16 -3
- package/icons/runtime.mjs.map +1 -1
- package/package.json +21 -21
- package/src/Accordion.tsx +1 -1
- package/src/ActionBar.tsx +2 -2
- package/src/ActionButton.tsx +1 -1
- package/src/Breadcrumbs.tsx +2 -2
- package/src/Button.tsx +2 -2
- package/src/Calendar.tsx +1 -1
- package/src/Card.tsx +1 -1
- package/src/CardView.tsx +1 -1
- package/src/Checkbox.tsx +2 -1
- package/src/CheckboxGroup.tsx +1 -1
- package/src/CoachMark.tsx +1 -1
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +1 -1
- package/src/ColorWheel.tsx +2 -2
- package/src/ComboBox.tsx +2 -2
- package/src/CustomDialog.tsx +1 -1
- package/src/DateField.tsx +1 -1
- package/src/DatePicker.tsx +1 -1
- package/src/DateRangePicker.tsx +1 -1
- package/src/Dialog.tsx +1 -1
- package/src/Disclosure.tsx +2 -2
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +1 -1
- package/src/Field.tsx +3 -3
- package/src/Form.tsx +1 -1
- package/src/FullscreenDialog.tsx +1 -1
- package/src/Link.tsx +1 -1
- package/src/Menu.tsx +11 -13
- package/src/Meter.tsx +1 -1
- package/src/Modal.tsx +1 -1
- package/src/NumberField.tsx +1 -1
- package/src/Picker.tsx +3 -3
- package/src/Popover.tsx +2 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/Radio.tsx +1 -1
- package/src/RadioGroup.tsx +1 -1
- package/src/RangeCalendar.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SelectBoxGroup.tsx +1 -1
- package/src/Slider.tsx +1 -1
- package/src/Switch.tsx +1 -1
- package/src/TableView.tsx +9 -9
- package/src/Tabs.tsx +4 -4
- package/src/TabsPicker.tsx +2 -2
- package/src/TagGroup.tsx +2 -2
- package/src/TextField.tsx +1 -1
- package/src/TimeField.tsx +1 -1
- package/src/Toast.tsx +1 -1
- package/src/ToggleButton.tsx +1 -1
- package/src/ToggleButtonGroup.tsx +1 -1
- package/src/Tooltip.tsx +1 -1
- package/src/TreeView.tsx +10 -6
- package/style/__tests__/mergeStyles.test.ts +68 -0
- package/style/__tests__/style-macro.test.js +79 -59
- package/style/dist/style-macro.cjs +65 -14
- package/style/dist/style-macro.cjs.map +1 -1
- package/style/dist/style-macro.mjs +65 -14
- package/style/dist/style-macro.mjs.map +1 -1
- package/style/runtime.ts +21 -5
- package/style/style-macro.ts +81 -16
- package/style/__tests__/mergeStyles.test.js +0 -32
package/dist/CloseButton.mjs
CHANGED
|
@@ -40,79 +40,79 @@ const $a9cda54c4f47ce52$var$styles = function anonymous(props, overrides) {
|
|
|
40
40
|
let rules = " ";
|
|
41
41
|
let width = false;
|
|
42
42
|
let flexShrink = false;
|
|
43
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
43
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
44
44
|
for (let p of matches){
|
|
45
45
|
if (p[1] === "Z") width = true;
|
|
46
46
|
if (p[1] === "_v") flexShrink = true;
|
|
47
47
|
rules += p[0];
|
|
48
48
|
}
|
|
49
|
-
if (props.isFocusVisible) rules += '
|
|
50
|
-
else rules += '
|
|
51
|
-
if (props.isStaticColor) rules += '
|
|
52
|
-
else rules += '
|
|
53
|
-
rules += '
|
|
54
|
-
rules += '
|
|
55
|
-
rules += '
|
|
56
|
-
if (props.staticColor === "white") rules += ' -Ovbhqd-
|
|
57
|
-
else if (props.staticColor === "black") rules += ' -Ovbhqd-
|
|
58
|
-
rules += '
|
|
59
|
-
rules += '
|
|
60
|
-
rules += '
|
|
49
|
+
if (props.isFocusVisible) rules += ' _Lf11';
|
|
50
|
+
else rules += ' _Le11';
|
|
51
|
+
if (props.isStaticColor) rules += ' Oe11';
|
|
52
|
+
else rules += ' Oh11';
|
|
53
|
+
rules += ' Olc11';
|
|
54
|
+
rules += ' _Mc11';
|
|
55
|
+
rules += ' _Kd11';
|
|
56
|
+
if (props.staticColor === "white") rules += ' -Ovbhqd-gcwrnr11';
|
|
57
|
+
else if (props.staticColor === "black") rules += ' -Ovbhqd-g4hn3s11';
|
|
58
|
+
rules += ' sd11';
|
|
59
|
+
rules += ' eb11';
|
|
60
|
+
rules += ' _Ca11';
|
|
61
61
|
if (props.size === "XL") {
|
|
62
|
-
if (!width) rules += '
|
|
62
|
+
if (!width) rules += ' ZF11';
|
|
63
63
|
} else if (props.size === "L") {
|
|
64
|
-
if (!width) rules += '
|
|
64
|
+
if (!width) rules += ' Zw11';
|
|
65
65
|
} else if (props.size === "S") {
|
|
66
|
-
if (!width) rules += '
|
|
66
|
+
if (!width) rules += ' Zo11';
|
|
67
67
|
} else if (props.size === "XS") {
|
|
68
|
-
if (!width) rules += '
|
|
69
|
-
} else if (!width) rules += '
|
|
70
|
-
if (props.size === "XL") rules += '
|
|
71
|
-
else if (props.size === "L") rules += '
|
|
72
|
-
else if (props.size === "S") rules += '
|
|
73
|
-
else if (props.size === "XS") rules += '
|
|
74
|
-
else rules += '
|
|
75
|
-
if (!flexShrink) rules += '
|
|
76
|
-
rules += '
|
|
77
|
-
rules += '
|
|
78
|
-
rules += '
|
|
79
|
-
rules += '
|
|
80
|
-
rules += '
|
|
81
|
-
rules += '
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
rules += '
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
68
|
+
if (!width) rules += ' Zm11';
|
|
69
|
+
} else if (!width) rules += ' ZC11';
|
|
70
|
+
if (props.size === "XL") rules += ' Fz11';
|
|
71
|
+
else if (props.size === "L") rules += ' Fv11';
|
|
72
|
+
else if (props.size === "S") rules += ' Fp11';
|
|
73
|
+
else if (props.size === "XS") rules += ' Fn11';
|
|
74
|
+
else rules += ' Fx11';
|
|
75
|
+
if (!flexShrink) rules += ' _va11';
|
|
76
|
+
rules += ' og11';
|
|
77
|
+
rules += ' ng11';
|
|
78
|
+
rules += ' kg11';
|
|
79
|
+
rules += ' jg11';
|
|
80
|
+
rules += ' Td11';
|
|
81
|
+
rules += ' Qd11';
|
|
82
|
+
rules += ' Sd11';
|
|
83
|
+
rules += ' Rd11';
|
|
84
|
+
rules += ' _je11';
|
|
85
|
+
rules += ' Yd11';
|
|
86
|
+
rules += ' Xb11';
|
|
87
|
+
rules += ' _2b11';
|
|
88
88
|
if (props.isPressed) {
|
|
89
|
-
if (props.isStaticColor) rules += '
|
|
90
|
-
else rules += '
|
|
89
|
+
if (props.isStaticColor) rules += ' gg11';
|
|
90
|
+
else rules += ' gF11';
|
|
91
91
|
} else if (props.isFocusVisible) {
|
|
92
|
-
if (props.isStaticColor) rules += '
|
|
93
|
-
else rules += '
|
|
92
|
+
if (props.isStaticColor) rules += ' gg11';
|
|
93
|
+
else rules += ' gF11';
|
|
94
94
|
} else if (props.isHovered) {
|
|
95
|
-
if (props.isStaticColor) rules += '
|
|
96
|
-
else rules += '
|
|
97
|
-
} else rules += '
|
|
95
|
+
if (props.isStaticColor) rules += ' gg11';
|
|
96
|
+
else rules += ' gF11';
|
|
97
|
+
} else rules += ' g911';
|
|
98
98
|
if (props.isStaticColor) {
|
|
99
|
-
if (props.isDisabled) rules += ' -_8sjo0b-
|
|
99
|
+
if (props.isDisabled) rules += ' -_8sjo0b-pi11';
|
|
100
100
|
else {
|
|
101
|
-
if (props.isPressed) rules += ' -_8sjo0b-
|
|
102
|
-
else if (props.isFocusVisible) rules += ' -_8sjo0b-
|
|
103
|
-
else if (props.isHovered) rules += ' -_8sjo0b-
|
|
104
|
-
else rules += ' -_8sjo0b-
|
|
101
|
+
if (props.isPressed) rules += ' -_8sjo0b-pk11';
|
|
102
|
+
else if (props.isFocusVisible) rules += ' -_8sjo0b-pk11';
|
|
103
|
+
else if (props.isHovered) rules += ' -_8sjo0b-pk11';
|
|
104
|
+
else rules += ' -_8sjo0b-pj11';
|
|
105
105
|
}
|
|
106
|
-
} else if (props.isDisabled) rules += ' -_8sjo0b-
|
|
106
|
+
} else if (props.isDisabled) rules += ' -_8sjo0b-pp11';
|
|
107
107
|
else {
|
|
108
|
-
if (props.isPressed) rules += ' -_8sjo0b-
|
|
109
|
-
else if (props.isFocusVisible) rules += ' -_8sjo0b-
|
|
110
|
-
else if (props.isHovered) rules += ' -_8sjo0b-
|
|
111
|
-
else rules += ' -_8sjo0b-
|
|
108
|
+
if (props.isPressed) rules += ' -_8sjo0b-po11';
|
|
109
|
+
else if (props.isFocusVisible) rules += ' -_8sjo0b-po11';
|
|
110
|
+
else if (props.isHovered) rules += ' -_8sjo0b-po11';
|
|
111
|
+
else rules += ' -_8sjo0b-pt11';
|
|
112
112
|
}
|
|
113
|
-
if (props.isDisabled) rules += ' -_8sjo0b-
|
|
114
|
-
else rules += ' -_8sjo0b-
|
|
115
|
-
rules += '
|
|
113
|
+
if (props.isDisabled) rules += ' -_8sjo0b-lpc11';
|
|
114
|
+
else rules += ' -_8sjo0b-lpb11';
|
|
115
|
+
rules += ' __ca11';
|
|
116
116
|
return rules;
|
|
117
117
|
};
|
|
118
118
|
const $a9cda54c4f47ce52$export$c796eec99a15b55d = /*#__PURE__*/ (0, $5wH0g$createContext)(null);
|
package/dist/ColorArea.cjs
CHANGED
|
@@ -52,7 +52,7 @@ const $4c6639e34959fe36$export$b2103f68a961418e = /*#__PURE__*/ (0, $lfrPf$react
|
|
|
52
52
|
let height = false;
|
|
53
53
|
let minWidth = false;
|
|
54
54
|
let minHeight = false;
|
|
55
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L|F|M|K)[^\s]+/g);
|
|
55
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L|F|M|K)[^\s]+/g);
|
|
56
56
|
for (let p of matches){
|
|
57
57
|
if (p[1] === "_P") position = true;
|
|
58
58
|
if (p[1] === "Z") width = true;
|
|
@@ -61,22 +61,22 @@ const $4c6639e34959fe36$export$b2103f68a961418e = /*#__PURE__*/ (0, $lfrPf$react
|
|
|
61
61
|
if (p[1] === "M") minHeight = true;
|
|
62
62
|
rules += p[0];
|
|
63
63
|
}
|
|
64
|
-
if (!position) rules += '
|
|
65
|
-
if (!width) rules += '
|
|
66
|
-
if (!height) rules += '
|
|
67
|
-
if (!minWidth) rules += '
|
|
68
|
-
if (!minHeight) rules += '
|
|
69
|
-
rules += '
|
|
70
|
-
rules += '
|
|
71
|
-
rules += '
|
|
72
|
-
rules += '
|
|
73
|
-
rules += '
|
|
74
|
-
rules += '
|
|
75
|
-
rules += '
|
|
76
|
-
rules += '
|
|
77
|
-
if (props.isDisabled) rules += '
|
|
78
|
-
else rules += '
|
|
79
|
-
if (props.isDisabled) rules += '
|
|
64
|
+
if (!position) rules += ' _Pc11';
|
|
65
|
+
if (!width) rules += ' Zr11';
|
|
66
|
+
if (!height) rules += ' Fs11';
|
|
67
|
+
if (!minWidth) rules += ' Nm11';
|
|
68
|
+
if (!minHeight) rules += ' Ml11';
|
|
69
|
+
rules += ' ob11';
|
|
70
|
+
rules += ' nb11';
|
|
71
|
+
rules += ' kb11';
|
|
72
|
+
rules += ' jb11';
|
|
73
|
+
rules += ' Oi11';
|
|
74
|
+
rules += ' Ola11';
|
|
75
|
+
rules += ' _Mb11';
|
|
76
|
+
rules += ' _Ka11';
|
|
77
|
+
if (props.isDisabled) rules += ' _Le11';
|
|
78
|
+
else rules += ' _Lf11';
|
|
79
|
+
if (props.isDisabled) rules += ' gH11';
|
|
80
80
|
return rules;
|
|
81
81
|
}(renderProps, styles),
|
|
82
82
|
children: ({ state: state })=>/*#__PURE__*/ (0, $lfrPf$reactjsxruntime.jsx)((0, $5b07976eb9e358fe$exports.ColorHandle), {
|
package/dist/ColorArea.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAAsE;AAK3G,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAA2B;IACvG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,mCAAQ,EAAE;IAC7B,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAQ;IAC1B,qBACE,gCAAC,CAAA,GAAA,oCAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gCAAC,CAAA,GAAA,qCAAU;gBACV,cAAc;gBACd,aAAa;oBACX,IAAI,KAAC,CAAC,KAAE,CAAC,EAAC,GAAG,MAAM,gBAAgB;oBACnC,OAAO;wBACL,GAAG,cAAc,QAAQ,IAAI,IAAI;2BACjC;oBACF;gBACF;;;AAIV","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let {direction} = useLocale();\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => {\n let {x, y} = state.getThumbPosition();\n return {\n x: direction === 'ltr' ? x : 1 - x,\n y\n };\n }} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAAsE;AAK3G,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAA2B;IACvG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,mCAAQ,EAAE;IAC7B,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAQ;IAC1B,qBACE,gCAAC,CAAA,GAAA,oCAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gCAAC,CAAA,GAAA,qCAAU;gBACV,cAAc;gBACd,aAAa;oBACX,IAAI,KAAC,CAAC,KAAE,CAAC,EAAC,GAAG,MAAM,gBAAgB;oBACnC,OAAO;wBACL,GAAG,cAAc,QAAQ,IAAI,IAAI;2BACjC;oBACF;gBACF;;;AAIV","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let {direction} = useLocale();\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => {\n let {x, y} = state.getThumbPosition();\n return {\n x: direction === 'ltr' ? x : 1 - x,\n y\n };\n }} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.cjs.map"}
|
package/dist/ColorArea.css
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._Pc11 {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.Zr11 {
|
|
7
7
|
width: calc(12rem * var(--s2-scale));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.Fs11 {
|
|
11
11
|
height: calc(12rem * var(--s2-scale));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.Nm11 {
|
|
15
15
|
min-width: calc(4rem * var(--s2-scale));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.Ml11 {
|
|
19
19
|
min-height: calc(4rem * var(--s2-scale));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.ob11 {
|
|
23
23
|
border-start-start-radius: .5rem;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.nb11 {
|
|
27
27
|
border-start-end-radius: .5rem;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.kb11 {
|
|
31
31
|
border-end-start-radius: .5rem;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.jb11 {
|
|
35
35
|
border-end-end-radius: .5rem;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.Oi11 {
|
|
39
39
|
outline-color: var(--lightningcss-light, #0000001a) var(--lightningcss-dark, #ffffff1a);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
._Mb11 {
|
|
43
43
|
outline-width: 1px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
._Ka11 {
|
|
47
47
|
outline-offset: -1px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
._Lf11 {
|
|
51
51
|
outline-style: solid;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
._Le11 {
|
|
55
55
|
outline-style: none;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
.gH11 {
|
|
59
59
|
background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #2c2c2c);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
@layer _.b.l {
|
|
66
66
|
@media (forced-colors: active) {
|
|
67
|
-
.
|
|
67
|
+
.Ola11 {
|
|
68
68
|
outline-color: buttonborder;
|
|
69
69
|
}
|
|
70
70
|
}
|
package/dist/ColorArea.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAiDmD;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let {direction} = useLocale();\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => {\n let {x, y} = state.getThumbPosition();\n return {\n x: direction === 'ltr' ? x : 1 - x,\n y\n };\n }} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.css.map"}
|
|
1
|
+
{"mappings":"AAiDmD;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let {direction} = useLocale();\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => {\n let {x, y} = state.getThumbPosition();\n return {\n x: direction === 'ltr' ? x : 1 - x,\n y\n };\n }} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.css.map"}
|
package/dist/ColorArea.mjs
CHANGED
|
@@ -45,7 +45,7 @@ const $40a2b649525568ab$export$b2103f68a961418e = /*#__PURE__*/ (0, $dNfSU$forwa
|
|
|
45
45
|
let height = false;
|
|
46
46
|
let minWidth = false;
|
|
47
47
|
let minHeight = false;
|
|
48
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L|F|M|K)[^\s]+/g);
|
|
48
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L|F|M|K)[^\s]+/g);
|
|
49
49
|
for (let p of matches){
|
|
50
50
|
if (p[1] === "_P") position = true;
|
|
51
51
|
if (p[1] === "Z") width = true;
|
|
@@ -54,22 +54,22 @@ const $40a2b649525568ab$export$b2103f68a961418e = /*#__PURE__*/ (0, $dNfSU$forwa
|
|
|
54
54
|
if (p[1] === "M") minHeight = true;
|
|
55
55
|
rules += p[0];
|
|
56
56
|
}
|
|
57
|
-
if (!position) rules += '
|
|
58
|
-
if (!width) rules += '
|
|
59
|
-
if (!height) rules += '
|
|
60
|
-
if (!minWidth) rules += '
|
|
61
|
-
if (!minHeight) rules += '
|
|
62
|
-
rules += '
|
|
63
|
-
rules += '
|
|
64
|
-
rules += '
|
|
65
|
-
rules += '
|
|
66
|
-
rules += '
|
|
67
|
-
rules += '
|
|
68
|
-
rules += '
|
|
69
|
-
rules += '
|
|
70
|
-
if (props.isDisabled) rules += '
|
|
71
|
-
else rules += '
|
|
72
|
-
if (props.isDisabled) rules += '
|
|
57
|
+
if (!position) rules += ' _Pc11';
|
|
58
|
+
if (!width) rules += ' Zr11';
|
|
59
|
+
if (!height) rules += ' Fs11';
|
|
60
|
+
if (!minWidth) rules += ' Nm11';
|
|
61
|
+
if (!minHeight) rules += ' Ml11';
|
|
62
|
+
rules += ' ob11';
|
|
63
|
+
rules += ' nb11';
|
|
64
|
+
rules += ' kb11';
|
|
65
|
+
rules += ' jb11';
|
|
66
|
+
rules += ' Oi11';
|
|
67
|
+
rules += ' Ola11';
|
|
68
|
+
rules += ' _Mb11';
|
|
69
|
+
rules += ' _Ka11';
|
|
70
|
+
if (props.isDisabled) rules += ' _Le11';
|
|
71
|
+
else rules += ' _Lf11';
|
|
72
|
+
if (props.isDisabled) rules += ' gH11';
|
|
73
73
|
return rules;
|
|
74
74
|
}(renderProps, styles),
|
|
75
75
|
children: ({ state: state })=>/*#__PURE__*/ (0, $dNfSU$jsx)((0, $b4f7db7c45cd3de9$export$92862704de639678), {
|
package/dist/ColorArea.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkBM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAsE;AAK3G,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAA2B;IACvG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,gBAAQ,EAAE;IAC7B,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,qBACE,gBAAC,CAAA,GAAA,gBAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gBAAC,CAAA,GAAA,yCAAU;gBACV,cAAc;gBACd,aAAa;oBACX,IAAI,KAAC,CAAC,KAAE,CAAC,EAAC,GAAG,MAAM,gBAAgB;oBACnC,OAAO;wBACL,GAAG,cAAc,QAAQ,IAAI,IAAI;2BACjC;oBACF;gBACF;;;AAIV","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let {direction} = useLocale();\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => {\n let {x, y} = state.getThumbPosition();\n return {\n x: direction === 'ltr' ? x : 1 - x,\n y\n };\n }} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAkBM,MAAM,0DAAmB,CAAA,GAAA,oBAAY,EAAsE;AAK3G,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAA2B;IACvG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,gBAAQ,EAAE;IAC7B,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,qBACE,gBAAC,CAAA,GAAA,gBAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gBAAC,CAAA,GAAA,yCAAU;gBACV,cAAc;gBACd,aAAa;oBACX,IAAI,KAAC,CAAC,KAAE,CAAC,EAAC,GAAG,MAAM,gBAAgB;oBACnC,OAAO;wBACL,GAAG,cAAc,QAAQ,IAAI,IAAI;2BACjC;oBACF;gBACF;;;AAIV","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue,\n useLocale\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n let {direction} = useLocale();\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => {\n let {x, y} = state.getThumbPosition();\n return {\n x: direction === 'ltr' ? x : 1 - x,\n y\n };\n }} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.mjs.map"}
|
package/dist/ColorField.cjs
CHANGED
|
@@ -57,57 +57,57 @@ const $c7ab41f1e9757931$export$b865d4358897bb17 = /*#__PURE__*/ (0, $4UooL$react
|
|
|
57
57
|
let rules = " ";
|
|
58
58
|
let gridColumnStart = false;
|
|
59
59
|
let gridColumnEnd = false;
|
|
60
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
60
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
61
61
|
for (let p of matches){
|
|
62
62
|
if (p[1] === "z") gridColumnStart = true;
|
|
63
63
|
if (p[1] === "y") gridColumnEnd = true;
|
|
64
64
|
rules += p[0];
|
|
65
65
|
}
|
|
66
|
-
rules += '
|
|
66
|
+
rules += ' se11';
|
|
67
67
|
if (props.isInForm) {
|
|
68
|
-
if (!gridColumnStart) rules += '
|
|
68
|
+
if (!gridColumnStart) rules += ' z2mU11';
|
|
69
69
|
}
|
|
70
70
|
if (props.isInForm) {
|
|
71
71
|
if (props.labelPosition === "side") {
|
|
72
|
-
if (!gridColumnEnd) rules += '
|
|
72
|
+
if (!gridColumnEnd) rules += ' yvoofG11';
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
if (props.isInForm) rules += '
|
|
75
|
+
if (props.isInForm) rules += ' DLwlgod11';
|
|
76
76
|
else {
|
|
77
|
-
if (props.labelPosition === "side") rules += '
|
|
78
|
-
else if (props.labelPosition === "top") rules += '
|
|
77
|
+
if (props.labelPosition === "side") rules += ' DPlN5qb11';
|
|
78
|
+
else if (props.labelPosition === "top") rules += ' DM8Mfn11';
|
|
79
79
|
}
|
|
80
|
-
if (props.labelPosition === "side") rules += '
|
|
81
|
-
else if (props.labelPosition === "top") rules += '
|
|
82
|
-
if (props.labelPosition === "side") rules += '
|
|
83
|
-
else if (props.labelPosition === "top") rules += '
|
|
80
|
+
if (props.labelPosition === "side") rules += ' EPlN5qb11';
|
|
81
|
+
else if (props.labelPosition === "top") rules += ' E4w1sLc11';
|
|
82
|
+
if (props.labelPosition === "side") rules += ' CbRM95c11';
|
|
83
|
+
else if (props.labelPosition === "top") rules += ' Cxaocre11';
|
|
84
84
|
if (props.size === "XL") {
|
|
85
|
-
rules += ' -_6BNtrc-
|
|
86
|
-
rules += '
|
|
85
|
+
rules += ' -_6BNtrc-e11';
|
|
86
|
+
rules += ' vx11';
|
|
87
87
|
} else if (props.size === "L") {
|
|
88
|
-
rules += ' -_6BNtrc-
|
|
89
|
-
rules += '
|
|
88
|
+
rules += ' -_6BNtrc-d11';
|
|
89
|
+
rules += ' vx11';
|
|
90
90
|
} else if (props.size === "S") {
|
|
91
|
-
rules += ' -_6BNtrc-
|
|
92
|
-
rules += '
|
|
91
|
+
rules += ' -_6BNtrc-b11';
|
|
92
|
+
rules += ' vx11';
|
|
93
93
|
} else if (props.size === "XS") {
|
|
94
|
-
rules += ' -_6BNtrc-
|
|
95
|
-
rules += '
|
|
94
|
+
rules += ' -_6BNtrc-a11';
|
|
95
|
+
rules += ' vx11';
|
|
96
96
|
} else {
|
|
97
|
-
rules += ' -_6BNtrc-
|
|
98
|
-
rules += '
|
|
97
|
+
rules += ' -_6BNtrc-c11';
|
|
98
|
+
rules += ' vx11';
|
|
99
99
|
}
|
|
100
|
-
rules += '
|
|
101
|
-
rules += '
|
|
102
|
-
rules += '
|
|
103
|
-
if (props.size === "XL") rules += ' -BhX7R-
|
|
104
|
-
else if (props.size === "L") rules += ' -BhX7R-
|
|
105
|
-
else if (props.size === "S") rules += ' -BhX7R-
|
|
106
|
-
else if (props.size === "XS") rules += ' -BhX7R-
|
|
107
|
-
else rules += ' -BhX7R-
|
|
108
|
-
rules += ' -AJjOLd-
|
|
109
|
-
rules += '
|
|
110
|
-
rules += '
|
|
100
|
+
rules += ' ea11';
|
|
101
|
+
rules += ' _Fd11';
|
|
102
|
+
rules += ' _FnuYUweb11';
|
|
103
|
+
if (props.size === "XL") rules += ' -BhX7R-Fz11';
|
|
104
|
+
else if (props.size === "L") rules += ' -BhX7R-Fv11';
|
|
105
|
+
else if (props.size === "S") rules += ' -BhX7R-Fp11';
|
|
106
|
+
else if (props.size === "XS") rules += ' -BhX7R-Fn11';
|
|
107
|
+
else rules += ' -BhX7R-Fx11';
|
|
108
|
+
rules += ' -AJjOLd-UVkF0Db11';
|
|
109
|
+
rules += ' qg11';
|
|
110
|
+
rules += ' __ca11';
|
|
111
111
|
return rules;
|
|
112
112
|
}({
|
|
113
113
|
size: props.size,
|
package/dist/ColorField.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA2BM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAwD;AAK9F,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAsB;IACrG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,sBACZ,kBAAkB,iBAClB,gBAAgB,mBAChB,aAAa,uBACb,YAAY,oBACZ,mBAAmB,YACnB,MAAM,EACN,GAAG,YACJ,GAAG;IAEJ,sCAAsC;IACtC,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAkB;IACpC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,4CAAiB,EAAE,QAAQ,SAAS;YACvC;gBACE,IAAI,SAAS,OAAO,EAClB,SAAS,OAAO,CAAC,MAAM;YAE3B;YACA;gBACE,OAAO,SAAS,OAAO;YACzB;QACF,CAAA;IAEA,qBACE,gCAAC,CAAA,GAAA,qCAAa;QACX,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAAsC;YAClE,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG;kBACF,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM,MAAM,IAAI;wBAChB,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,iCAAC,CAAA,GAAA,oCAAS;wBAAE,MAAM,MAAM,IAAI;;0CAC1B,gCAAC,CAAA,GAAA,+BAAI;gCAAE,KAAK;;4BACX,2BAAa,gCAAC,CAAA,GAAA,wCAAa;gCAAE,YAAY;;;;kCAE5C,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM,MAAM,IAAI;wBAChB,YAAY;wBACZ,WAAW;wBACX,aAAa;kCACZ;;;;;AAKX","sources":["packages/@react-spectrum/s2/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorField as AriaColorField,\n ColorFieldProps as AriaColorFieldProps,\n ContextValue,\n InputProps\n} from 'react-aria-components';\nimport {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react';\nimport {createFocusableRef} from '@react-spectrum/utils';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {GlobalDOMAttributes, HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {\n /**\n * The size of the color field.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ColorFieldContext = createContext<ContextValue<Partial<ColorFieldProps>, TextFieldRef>>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: Ref<TextFieldRef>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorFieldContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n necessityIndicator,\n labelPosition = 'top',\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className = '',\n styles,\n ...fieldProps\n } = props;\n\n // Expose imperative interface for ref\n let domRef = useRef<HTMLDivElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n return (\n <AriaColorField\n {...fieldProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={props.size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup size={props.size}>\n <Input ref={inputRef} />\n {isInvalid && <FieldErrorIcon isDisabled={isDisabled} />}\n </FieldGroup>\n <HelpText\n size={props.size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaColorField>\n );\n});\n"],"names":[],"version":3,"file":"ColorField.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AA2BM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAwD;AAK9F,MAAM,0DAAa,CAAA,GAAA,uBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAAsB;IACrG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,sBACZ,kBAAkB,iBAClB,gBAAgB,mBAChB,aAAa,uBACb,YAAY,oBACZ,mBAAmB,YACnB,MAAM,EACN,GAAG,YACJ,GAAG;IAEJ,sCAAsC;IACtC,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAkB;IACpC,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,CAAA,GAAA,gCAAkB,EAAE,KAAK,IAAO,CAAA;YAC9B,GAAG,CAAA,GAAA,4CAAiB,EAAE,QAAQ,SAAS;YACvC;gBACE,IAAI,SAAS,OAAO,EAClB,SAAS,OAAO,CAAC,MAAM;YAE3B;YACA;gBACE,OAAO,SAAS,OAAO;YACzB;QACF,CAAA;IAEA,qBACE,gCAAC,CAAA,GAAA,qCAAa;QACX,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAAsC;YAClE,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG;kBACF,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM,MAAM,IAAI;wBAChB,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,iCAAC,CAAA,GAAA,oCAAS;wBAAE,MAAM,MAAM,IAAI;;0CAC1B,gCAAC,CAAA,GAAA,+BAAI;gCAAE,KAAK;;4BACX,2BAAa,gCAAC,CAAA,GAAA,wCAAa;gCAAE,YAAY;;;;kCAE5C,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM,MAAM,IAAI;wBAChB,YAAY;wBACZ,WAAW;wBACX,aAAa;kCACZ;;;;;AAKX","sources":["packages/@react-spectrum/s2/src/ColorField.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorField as AriaColorField,\n ColorFieldProps as AriaColorFieldProps,\n ContextValue,\n InputProps\n} from 'react-aria-components';\nimport {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef} from 'react';\nimport {createFocusableRef} from '@react-spectrum/utils';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldErrorIcon, FieldGroup, FieldLabel, HelpText, Input} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {GlobalDOMAttributes, HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {style} from '../style' with {type: 'macro'};\nimport {TextFieldRef} from '@react-types/textfield';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorFieldProps extends Omit<AriaColorFieldProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {\n /**\n * The size of the color field.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ColorFieldContext = createContext<ContextValue<Partial<ColorFieldProps>, TextFieldRef>>(null);\n\n/**\n * A color field allows users to edit a hex color or individual color channel value.\n */\nexport const ColorField = forwardRef(function ColorField(props: ColorFieldProps, ref: Ref<TextFieldRef>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorFieldContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n necessityIndicator,\n labelPosition = 'top',\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className = '',\n styles,\n ...fieldProps\n } = props;\n\n // Expose imperative interface for ref\n let domRef = useRef<HTMLDivElement>(null);\n let inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => ({\n ...createFocusableRef(domRef, inputRef),\n select() {\n if (inputRef.current) {\n inputRef.current.select();\n }\n },\n getInputElement() {\n return inputRef.current;\n }\n }));\n\n return (\n <AriaColorField\n {...fieldProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={props.size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup size={props.size}>\n <Input ref={inputRef} />\n {isInvalid && <FieldErrorIcon isDisabled={isDisabled} />}\n </FieldGroup>\n <HelpText\n size={props.size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaColorField>\n );\n});\n"],"names":[],"version":3,"file":"ColorField.cjs.map"}
|