@react-spectrum/s2 3.0.0-nightly-326f48154-241216 → 3.0.0-nightly-adae13c78-241218
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/ActionButton.cjs +58 -80
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +76 -96
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +58 -80
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs.map +1 -1
- package/dist/ActionButtonGroup.css.map +1 -1
- package/dist/ActionButtonGroup.mjs.map +1 -1
- package/dist/Badge.cjs +66 -66
- package/dist/Badge.css +43 -43
- package/dist/Badge.mjs +66 -66
- package/dist/Breadcrumbs.cjs +6 -6
- package/dist/Breadcrumbs.css +4 -4
- package/dist/Breadcrumbs.mjs +6 -6
- package/dist/Button.cjs +89 -134
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +102 -134
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +89 -134
- package/dist/Button.mjs.map +1 -1
- package/dist/Card.cjs +4 -4
- package/dist/Card.css +3 -3
- package/dist/Card.mjs +4 -4
- package/dist/CardView.cjs +1 -1
- package/dist/CardView.css +1 -1
- package/dist/CardView.mjs +1 -1
- package/dist/Checkbox.cjs +10 -10
- package/dist/Checkbox.css +10 -10
- package/dist/Checkbox.mjs +10 -10
- package/dist/CloseButton.cjs +17 -28
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css +19 -31
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs +17 -28
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs +1 -1
- package/dist/ColorArea.css +1 -1
- package/dist/ColorArea.mjs +1 -1
- package/dist/ColorHandle.cjs +3 -3
- package/dist/ColorHandle.css +3 -3
- package/dist/ColorHandle.mjs +3 -3
- package/dist/ColorSlider.cjs +1 -1
- package/dist/ColorSlider.css +1 -1
- package/dist/ColorSlider.mjs +1 -1
- package/dist/ColorSwatchPicker.cjs +1 -1
- package/dist/ColorSwatchPicker.css +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ColorWheel.cjs +2 -2
- package/dist/ColorWheel.css +1 -1
- package/dist/ColorWheel.mjs +2 -2
- package/dist/ComboBox.cjs +5 -5
- package/dist/ComboBox.css +4 -4
- package/dist/ComboBox.mjs +5 -5
- package/dist/Disclosure.cjs +1 -1
- package/dist/Disclosure.css +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/Divider.cjs +8 -8
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +13 -13
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +8 -8
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +4 -4
- package/dist/DropZone.css +2 -2
- package/dist/DropZone.mjs +4 -4
- package/dist/Field.cjs +23 -18
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +7 -15
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +23 -18
- package/dist/Field.mjs.map +1 -1
- package/dist/InlineAlert.cjs +24 -29
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +15 -19
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +24 -29
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs +7 -6
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +14 -14
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +7 -6
- package/dist/Link.mjs.map +1 -1
- package/dist/Menu.cjs +28 -8
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +3 -3
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +29 -9
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +13 -13
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +18 -22
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +13 -13
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.css +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberField.cjs +4 -4
- package/dist/NumberField.css +4 -4
- package/dist/NumberField.mjs +4 -4
- package/dist/Picker.cjs +4 -4
- package/dist/Picker.css +4 -4
- package/dist/Picker.mjs +4 -4
- package/dist/Popover.cjs +3 -3
- package/dist/Popover.css +3 -3
- package/dist/Popover.mjs +3 -3
- package/dist/ProgressBar.cjs +20 -18
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +20 -24
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +20 -18
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +11 -9
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +14 -14
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +11 -9
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +1 -1
- package/dist/Provider.css +1 -1
- package/dist/Provider.mjs +1 -1
- package/dist/Radio.cjs +6 -6
- package/dist/Radio.css +6 -6
- package/dist/Radio.mjs +6 -6
- package/dist/SearchField.cjs +1 -1
- package/dist/SearchField.css +1 -1
- package/dist/SearchField.mjs +1 -1
- package/dist/SegmentedControl.cjs +8 -8
- package/dist/SegmentedControl.css +8 -8
- package/dist/SegmentedControl.mjs +8 -8
- package/dist/Slider.cjs +8 -8
- package/dist/Slider.css +5 -5
- package/dist/Slider.mjs +8 -8
- package/dist/Switch.cjs +7 -7
- package/dist/Switch.css +6 -6
- package/dist/Switch.mjs +7 -7
- package/dist/TableView.cjs +17 -17
- package/dist/TableView.css +11 -11
- package/dist/TableView.mjs +17 -17
- package/dist/Tabs.cjs +5 -5
- package/dist/Tabs.css +5 -5
- package/dist/Tabs.mjs +5 -5
- package/dist/TabsPicker.cjs +1 -1
- package/dist/TabsPicker.css +1 -1
- package/dist/TabsPicker.mjs +1 -1
- package/dist/TagGroup.cjs +10 -10
- package/dist/TagGroup.css +8 -8
- package/dist/TagGroup.mjs +10 -10
- package/dist/ToggleButton.cjs +1 -0
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +1 -0
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/Tooltip.cjs +1 -1
- package/dist/Tooltip.css +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/types.d.ts +9 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/ActionButton.tsx +19 -43
- package/src/ActionButtonGroup.tsx +1 -1
- package/src/Button.tsx +36 -79
- package/src/CloseButton.tsx +10 -20
- package/src/Divider.tsx +10 -16
- package/src/Field.tsx +19 -17
- package/src/InlineAlert.tsx +0 -1
- package/src/Link.tsx +7 -12
- package/src/Menu.tsx +24 -8
- package/src/Meter.tsx +7 -14
- package/src/ProgressBar.tsx +8 -15
- package/src/ProgressCircle.tsx +12 -15
- package/src/ToggleButton.tsx +1 -0
- package/src/bar-utils.ts +3 -10
- package/src/style-utils.ts +15 -8
- package/style/dist/spectrum-theme.cjs +15 -1
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +15 -1
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +40 -27
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +4 -2
- package/style/tokens.ts +30 -0
package/dist/ProgressBar.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AC2DyB;;;;;;;;;;AASA;;;;;;;;;;AAST;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0CI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;
|
|
1
|
+
{"mappings":"AC2DyB;;;;;;;;;;AASA;;;;;;;;;;AAST;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EA0CI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAKA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAaP;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAiBkB;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AA7Ef;EA0CI;;;;EAAA;;;;;AA1CJ;;AA0CI;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAKA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAaP;;;;;;AAbO;EAAA;IAAA;;;;;;AAaP","sources":["7293bad37f188837","packages/@react-spectrum/s2/src/ProgressBar.tsx"],"sourcesContent":["@import \"0b8d2821d82ee250\";\n@import \"f2b8eec694697861\";\n@import \"bd67a9a4e04bbe30\";\n@import \"928e619efccddb64\";\n@import \"27fd25d02acf65a5\";\n@import \"47f66b5fa7a24be0\";\n@import \"5d9861be4320075f\";\n","/*\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 ProgressBar as AriaProgressBar,\n ProgressBarProps as AriaProgressBarProps,\n ContextValue\n} from 'react-aria-components';\nimport {bar, track} from './bar-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMRef, DOMRefValue, LabelPosition} from '@react-types/shared';\nimport {FieldLabel} from './Field';\nimport {fieldLabel, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {mergeStyles} from '../style/runtime';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocale} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface ProgressBarStyleProps {\n /**\n * The size of the ProgressBar.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean,\n /**\n * The static color style to apply. Useful when the button appears over a color background.\n */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The label's overall position relative to the element it is labeling.\n * @default 'top'\n */\n labelPosition?: LabelPosition\n\n}\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'children' | 'className' | 'style'>, ProgressBarStyleProps, StyleProps {\n /** The content to display as the label. */\n label?: ReactNode\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst indeterminateLTR = keyframes(`\n 0% {\n transform: translateX(-70%) scaleX(0.7);\n }\n 100% {\n transform: translateX(100%) scaleX(0.7);\n }\n`);\n\nconst indeterminateRTL = keyframes(`\n 0% {\n transform: translateX(100%) scaleX(0.7);\n }\n 100% {\n transform: translateX(-70%) scaleX(0.7);\n }\n`);\n\nconst wrapper = style({\n ...bar(),\n gridTemplateColumns: {\n default: {\n labelPosition: {\n top: ['1fr', 'auto'],\n side: ['auto', '1fr']\n }\n },\n isIndeterminate: {\n labelPosition: {\n top: ['1fr'],\n side: ['auto', '1fr']\n }\n }\n },\n gridTemplateAreas: {\n default: {\n labelPosition: {\n top: [\n 'label value',\n 'bar bar'\n ],\n side: [\n 'label bar value'\n ]\n }\n },\n isIndeterminate: {\n labelPosition: {\n top: [\n 'label',\n 'bar'\n ],\n side: [\n 'label bar'\n ]\n }\n }\n }\n}, getAllowedOverrides());\n\nconst valueStyles = style({\n ...fieldLabel(),\n gridArea: 'value'\n});\n\nconst trackStyles = style({\n ...track(),\n height: {\n default: 6,\n size: {\n S: 4, // progress-bar-thickness-small\n M: 6, // progress-bar-thickness-medium\n L: 8, // progress-bar-thickness-large\n XL: 10 // progress-bar-thickness-extra-large\n }\n }\n});\n\nconst fill = style<ProgressBarStyleProps & {isStaticColor: boolean}>({\n height: 'full',\n borderStyle: 'none',\n borderRadius: 'full',\n backgroundColor: {\n default: 'accent',\n isStaticColor: 'transparent-overlay-900',\n forcedColors: 'ButtonText'\n },\n width: {\n isIndeterminate: 'full'\n },\n transformOrigin: {\n isIndeterminate: 'left'\n }\n});\n\nconst indeterminateAnimation = style({\n animation: {\n direction: {\n ltr: indeterminateLTR,\n rtl: indeterminateRTL\n }\n },\n animationDuration: 1000,\n animationIterationCount: 'infinite',\n animationTimingFunction: 'in-out',\n willChange: 'transform',\n position: 'relative'\n});\n\n/**\n * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.\n * They can represent either determinate or indeterminate progress.\n */\nexport const ProgressBar = /*#__PURE__*/ forwardRef(function ProgressBar(props: ProgressBarProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressBarContext);\n let {\n label, size = 'M',\n staticColor,\n isIndeterminate,\n labelPosition = 'top',\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n let {direction} = useLocale();\n let isStaticColor = !!staticColor;\n\n return (\n <AriaProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + wrapper({...props, size, labelPosition, staticColor}, props.styles)}>\n {({percentage, valueText}) => (\n <>\n {label && <FieldLabel size={size} labelAlign=\"start\" labelPosition={labelPosition} staticColor={staticColor}>{label}</FieldLabel>}\n {label && !isIndeterminate && <span className={valueStyles({size, labelAlign: 'end', isStaticColor})}>{valueText}</span>}\n <div className={trackStyles({isStaticColor, size})}>\n <div\n className={mergeStyles(fill({...props, isStaticColor}), (isIndeterminate ? indeterminateAnimation({direction}) : null))}\n style={{width: isIndeterminate ? undefined : percentage + '%'}} />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n});\n\n"],"names":[],"version":3,"file":"ProgressBar.css.map"}
|
package/dist/ProgressBar.mjs
CHANGED
|
@@ -41,6 +41,8 @@ const $b847b7cd294eafba$var$wrapper = function anonymous(props, overrides) {
|
|
|
41
41
|
if (/^\s*q/.test(p)) $q = true;
|
|
42
42
|
if (/^\s*r/.test(p)) $r = true;
|
|
43
43
|
}
|
|
44
|
+
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
45
|
+
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
44
46
|
if (!$U) rules += ' Uc';
|
|
45
47
|
rules += ' _Zf';
|
|
46
48
|
if (props.isIndeterminate) {
|
|
@@ -100,9 +102,8 @@ const $b847b7cd294eafba$var$valueStyles = function anonymous(props) {
|
|
|
100
102
|
rules += ' _eb';
|
|
101
103
|
rules += ' _f-1x99dlob';
|
|
102
104
|
rules += ' _fa';
|
|
103
|
-
rules += '
|
|
104
|
-
if (props.
|
|
105
|
-
else if (props.staticColor === "white") rules += ' a_____d';
|
|
105
|
+
rules += ' aa_____K';
|
|
106
|
+
if (props.isStaticColor) rules += ' a_____G';
|
|
106
107
|
else if (props.isDisabled) rules += ' aj';
|
|
107
108
|
else {
|
|
108
109
|
if (props.isPressed) rules += ' an';
|
|
@@ -141,15 +142,14 @@ const $b847b7cd294eafba$var$trackStyles = function anonymous(props) {
|
|
|
141
142
|
rules += ' _wf';
|
|
142
143
|
rules += ' _xf';
|
|
143
144
|
rules += ' _yf';
|
|
144
|
-
rules += '
|
|
145
|
-
if (props.
|
|
146
|
-
else if (props.staticColor === "white") rules += ' b____7';
|
|
145
|
+
rules += ' ba_____J';
|
|
146
|
+
if (props.isStaticColor) rules += ' b_____z';
|
|
147
147
|
else rules += ' bi';
|
|
148
148
|
rules += ' _Nab';
|
|
149
149
|
rules += ' _Na';
|
|
150
150
|
rules += ' _Lab';
|
|
151
151
|
rules += ' _La';
|
|
152
|
-
rules += '
|
|
152
|
+
rules += ' da_____K';
|
|
153
153
|
rules += ' da';
|
|
154
154
|
rules += ' __Q-3t1y';
|
|
155
155
|
if (props.size === "XL") rules += ' ky';
|
|
@@ -167,14 +167,13 @@ const $b847b7cd294eafba$var$fill = function anonymous(props) {
|
|
|
167
167
|
rules += ' _wf';
|
|
168
168
|
rules += ' _xf';
|
|
169
169
|
rules += ' _yf';
|
|
170
|
-
rules += '
|
|
171
|
-
if (props.
|
|
172
|
-
else if (props.staticColor === "white") rules += ' b_____f';
|
|
170
|
+
rules += ' ba_____K';
|
|
171
|
+
if (props.isStaticColor) rules += ' b_____F';
|
|
173
172
|
else {
|
|
174
|
-
if (props.isPressed) rules += '
|
|
175
|
-
else if (props.isFocusVisible) rules += '
|
|
176
|
-
else if (props.isHovered) rules += '
|
|
177
|
-
else rules += '
|
|
173
|
+
if (props.isPressed) rules += ' b_____S';
|
|
174
|
+
else if (props.isFocusVisible) rules += ' b_____S';
|
|
175
|
+
else if (props.isHovered) rules += ' b_____S';
|
|
176
|
+
else rules += ' b_____R';
|
|
178
177
|
}
|
|
179
178
|
if (props.isIndeterminate) rules += ' lb';
|
|
180
179
|
if (props.isIndeterminate) rules += ' __Gh';
|
|
@@ -196,6 +195,7 @@ const $b847b7cd294eafba$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $cNVLZ$forwa
|
|
|
196
195
|
let { label: label, size: size = 'M', staticColor: staticColor, isIndeterminate: isIndeterminate, labelPosition: labelPosition = 'top', UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className = '' } = props;
|
|
197
196
|
let domRef = (0, $cNVLZ$useDOMRef)(ref);
|
|
198
197
|
let { direction: direction } = (0, $cNVLZ$useLocale)();
|
|
198
|
+
let isStaticColor = !!staticColor;
|
|
199
199
|
return /*#__PURE__*/ (0, $cNVLZ$jsx)((0, $cNVLZ$ProgressBar), {
|
|
200
200
|
...props,
|
|
201
201
|
ref: domRef,
|
|
@@ -203,7 +203,8 @@ const $b847b7cd294eafba$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $cNVLZ$forwa
|
|
|
203
203
|
className: UNSAFE_className + $b847b7cd294eafba$var$wrapper({
|
|
204
204
|
...props,
|
|
205
205
|
size: size,
|
|
206
|
-
labelPosition: labelPosition
|
|
206
|
+
labelPosition: labelPosition,
|
|
207
|
+
staticColor: staticColor
|
|
207
208
|
}, props.styles),
|
|
208
209
|
children: ({ percentage: percentage, valueText: valueText })=>/*#__PURE__*/ (0, $cNVLZ$jsxs)((0, $cNVLZ$Fragment), {
|
|
209
210
|
children: [
|
|
@@ -218,18 +219,19 @@ const $b847b7cd294eafba$export$c17561cb55d4db30 = /*#__PURE__*/ (0, $cNVLZ$forwa
|
|
|
218
219
|
className: $b847b7cd294eafba$var$valueStyles({
|
|
219
220
|
size: size,
|
|
220
221
|
labelAlign: 'end',
|
|
221
|
-
|
|
222
|
+
isStaticColor: isStaticColor
|
|
222
223
|
}),
|
|
223
224
|
children: valueText
|
|
224
225
|
}),
|
|
225
226
|
/*#__PURE__*/ (0, $cNVLZ$jsx)("div", {
|
|
226
227
|
className: $b847b7cd294eafba$var$trackStyles({
|
|
227
|
-
|
|
228
|
+
isStaticColor: isStaticColor,
|
|
229
|
+
size: size
|
|
228
230
|
}),
|
|
229
231
|
children: /*#__PURE__*/ (0, $cNVLZ$jsx)("div", {
|
|
230
232
|
className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)($b847b7cd294eafba$var$fill({
|
|
231
233
|
...props,
|
|
232
|
-
|
|
234
|
+
isStaticColor: isStaticColor
|
|
233
235
|
}), isIndeterminate ? $b847b7cd294eafba$var$indeterminateAnimation({
|
|
234
236
|
direction: direction
|
|
235
237
|
}) : null),
|
package/dist/ProgressBar.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+CM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA+D;AAE7G,MAAM;AASN,MAAM;AASN,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+CM,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAA+D;AAE7G,MAAM;AASN,MAAM;AASN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaN,MAAM;;;;;;;;;;;;;;;;;;;;AAiBN,MAAM;;;;;;;;;;;AAkBC,MAAM,4CAAc,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAA2B;IAC3H,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SACF,KAAK,QAAE,OAAO,kBACd,WAAW,mBACX,eAAe,iBACf,gBAAgB,qBAChB,YAAY,oBACZ,mBAAmB,IACpB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,gBAAgB,CAAC,CAAC;IAEtB,qBACE,gBAAC,CAAA,GAAA,kBAAc;QACZ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB,8BAAQ;YAAC,GAAG,KAAK;kBAAE;2BAAM;yBAAe;QAAW,GAAG,MAAM,MAAM;kBAC/F,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBACvB;;oBACG,uBAAS,gBAAC,CAAA,GAAA,yCAAS;wBAAE,MAAM;wBAAM,YAAW;wBAAQ,eAAe;wBAAe,aAAa;kCAAc;;oBAC7G,SAAS,CAAC,iCAAmB,gBAAC;wBAAK,WAAW,kCAAY;kCAAC;4BAAM,YAAY;2CAAO;wBAAa;kCAAK;;kCACvG,gBAAC;wBAAI,WAAW,kCAAY;2CAAC;kCAAe;wBAAI;kCAC9C,cAAA,gBAAC;4BACC,WAAW,CAAA,GAAA,yCAAU,EAAE,2BAAK;gCAAC,GAAG,KAAK;+CAAE;4BAAa,IAAK,kBAAkB,6CAAuB;2CAAC;4BAAS,KAAK;4BACjH,OAAO;gCAAC,OAAO,kBAAkB,YAAY,aAAa;4BAAG;;;;;;AAM3E","sources":["packages/@react-spectrum/s2/src/ProgressBar.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 ProgressBar as AriaProgressBar,\n ProgressBarProps as AriaProgressBarProps,\n ContextValue\n} from 'react-aria-components';\nimport {bar, track} from './bar-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMRef, DOMRefValue, LabelPosition} from '@react-types/shared';\nimport {FieldLabel} from './Field';\nimport {fieldLabel, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {mergeStyles} from '../style/runtime';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocale} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface ProgressBarStyleProps {\n /**\n * The size of the ProgressBar.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean,\n /**\n * The static color style to apply. Useful when the button appears over a color background.\n */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The label's overall position relative to the element it is labeling.\n * @default 'top'\n */\n labelPosition?: LabelPosition\n\n}\n\nexport interface ProgressBarProps extends Omit<AriaProgressBarProps, 'children' | 'className' | 'style'>, ProgressBarStyleProps, StyleProps {\n /** The content to display as the label. */\n label?: ReactNode\n}\n\nexport const ProgressBarContext = createContext<ContextValue<ProgressBarProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst indeterminateLTR = keyframes(`\n 0% {\n transform: translateX(-70%) scaleX(0.7);\n }\n 100% {\n transform: translateX(100%) scaleX(0.7);\n }\n`);\n\nconst indeterminateRTL = keyframes(`\n 0% {\n transform: translateX(100%) scaleX(0.7);\n }\n 100% {\n transform: translateX(-70%) scaleX(0.7);\n }\n`);\n\nconst wrapper = style({\n ...bar(),\n gridTemplateColumns: {\n default: {\n labelPosition: {\n top: ['1fr', 'auto'],\n side: ['auto', '1fr']\n }\n },\n isIndeterminate: {\n labelPosition: {\n top: ['1fr'],\n side: ['auto', '1fr']\n }\n }\n },\n gridTemplateAreas: {\n default: {\n labelPosition: {\n top: [\n 'label value',\n 'bar bar'\n ],\n side: [\n 'label bar value'\n ]\n }\n },\n isIndeterminate: {\n labelPosition: {\n top: [\n 'label',\n 'bar'\n ],\n side: [\n 'label bar'\n ]\n }\n }\n }\n}, getAllowedOverrides());\n\nconst valueStyles = style({\n ...fieldLabel(),\n gridArea: 'value'\n});\n\nconst trackStyles = style({\n ...track(),\n height: {\n default: 6,\n size: {\n S: 4, // progress-bar-thickness-small\n M: 6, // progress-bar-thickness-medium\n L: 8, // progress-bar-thickness-large\n XL: 10 // progress-bar-thickness-extra-large\n }\n }\n});\n\nconst fill = style<ProgressBarStyleProps & {isStaticColor: boolean}>({\n height: 'full',\n borderStyle: 'none',\n borderRadius: 'full',\n backgroundColor: {\n default: 'accent',\n isStaticColor: 'transparent-overlay-900',\n forcedColors: 'ButtonText'\n },\n width: {\n isIndeterminate: 'full'\n },\n transformOrigin: {\n isIndeterminate: 'left'\n }\n});\n\nconst indeterminateAnimation = style({\n animation: {\n direction: {\n ltr: indeterminateLTR,\n rtl: indeterminateRTL\n }\n },\n animationDuration: 1000,\n animationIterationCount: 'infinite',\n animationTimingFunction: 'in-out',\n willChange: 'transform',\n position: 'relative'\n});\n\n/**\n * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.\n * They can represent either determinate or indeterminate progress.\n */\nexport const ProgressBar = /*#__PURE__*/ forwardRef(function ProgressBar(props: ProgressBarProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressBarContext);\n let {\n label, size = 'M',\n staticColor,\n isIndeterminate,\n labelPosition = 'top',\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n let {direction} = useLocale();\n let isStaticColor = !!staticColor;\n\n return (\n <AriaProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + wrapper({...props, size, labelPosition, staticColor}, props.styles)}>\n {({percentage, valueText}) => (\n <>\n {label && <FieldLabel size={size} labelAlign=\"start\" labelPosition={labelPosition} staticColor={staticColor}>{label}</FieldLabel>}\n {label && !isIndeterminate && <span className={valueStyles({size, labelAlign: 'end', isStaticColor})}>{valueText}</span>}\n <div className={trackStyles({isStaticColor, size})}>\n <div\n className={mergeStyles(fill({...props, isStaticColor}), (isIndeterminate ? indeterminateAnimation({direction}) : null))}\n style={{width: isIndeterminate ? undefined : percentage + '%'}} />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n});\n\n"],"names":[],"version":3,"file":"ProgressBar.mjs.map"}
|
package/dist/ProgressCircle.cjs
CHANGED
|
@@ -39,6 +39,8 @@ const $1c116ea4b0d2d023$var$wrapper = function anonymous(props, overrides) {
|
|
|
39
39
|
if (/^\s*l/.test(p)) $l = true;
|
|
40
40
|
if (/^\s*k/.test(p)) $k = true;
|
|
41
41
|
}
|
|
42
|
+
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
43
|
+
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
42
44
|
if (!$l) {
|
|
43
45
|
if (props.size === "L") rules += ' l_q';
|
|
44
46
|
else if (props.size === "S") rules += ' lE';
|
|
@@ -54,17 +56,15 @@ const $1c116ea4b0d2d023$var$wrapper = function anonymous(props, overrides) {
|
|
|
54
56
|
};
|
|
55
57
|
const $1c116ea4b0d2d023$var$track = function anonymous(props) {
|
|
56
58
|
let rules = " .";
|
|
57
|
-
rules += '
|
|
58
|
-
if (props.
|
|
59
|
-
else if (props.staticColor === "white") rules += ' f_____b';
|
|
59
|
+
rules += ' fa_____J';
|
|
60
|
+
if (props.isStaticColor) rules += ' f_____B';
|
|
60
61
|
else rules += ' fk';
|
|
61
62
|
return rules;
|
|
62
63
|
};
|
|
63
64
|
const $1c116ea4b0d2d023$var$fill = function anonymous(props) {
|
|
64
65
|
let rules = " .";
|
|
65
|
-
rules += '
|
|
66
|
-
if (props.
|
|
67
|
-
else if (props.staticColor === "white") rules += ' f_____h';
|
|
66
|
+
rules += ' fa_____O';
|
|
67
|
+
if (props.isStaticColor) rules += ' f_____H';
|
|
68
68
|
else rules += ' fA';
|
|
69
69
|
rules += ' R-375ty3';
|
|
70
70
|
rules += ' __Ga';
|
|
@@ -82,13 +82,15 @@ const $1c116ea4b0d2d023$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $5RNes$react
|
|
|
82
82
|
else if (size === 'L') strokeWidth = 4;
|
|
83
83
|
// SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.
|
|
84
84
|
let radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
85
|
+
let isStaticColor = !!staticColor;
|
|
85
86
|
return /*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)((0, $5RNes$reactariacomponents.ProgressBar), {
|
|
86
87
|
...props,
|
|
87
88
|
ref: domRef,
|
|
88
89
|
style: UNSAFE_style,
|
|
89
90
|
className: (renderProps)=>UNSAFE_className + $1c116ea4b0d2d023$var$wrapper({
|
|
90
91
|
...renderProps,
|
|
91
|
-
size: size
|
|
92
|
+
size: size,
|
|
93
|
+
staticColor: staticColor
|
|
92
94
|
}, props.styles),
|
|
93
95
|
children: ({ percentage: percentage, isIndeterminate: isIndeterminate })=>/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsxs)("svg", {
|
|
94
96
|
fill: "none",
|
|
@@ -101,7 +103,7 @@ const $1c116ea4b0d2d023$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $5RNes$react
|
|
|
101
103
|
r: radius,
|
|
102
104
|
strokeWidth: strokeWidth,
|
|
103
105
|
className: $1c116ea4b0d2d023$var$track({
|
|
104
|
-
|
|
106
|
+
isStaticColor: isStaticColor
|
|
105
107
|
})
|
|
106
108
|
}),
|
|
107
109
|
/*#__PURE__*/ (0, $5RNes$reactjsxruntime.jsx)("circle", {
|
|
@@ -110,7 +112,7 @@ const $1c116ea4b0d2d023$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $5RNes$react
|
|
|
110
112
|
r: radius,
|
|
111
113
|
strokeWidth: strokeWidth,
|
|
112
114
|
className: $1c116ea4b0d2d023$var$fill({
|
|
113
|
-
|
|
115
|
+
isStaticColor: isStaticColor
|
|
114
116
|
}),
|
|
115
117
|
style: {
|
|
116
118
|
// These cubic-bezier timing functions were derived from the previous animation keyframes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA0BM,MAAM,0DAAwB,CAAA,GAAA,0BAAY,EAAkE;AAEnH,yEAAyE;AACzE,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA0BM,MAAM,0DAAwB,CAAA,GAAA,0BAAY,EAAkE;AAEnH,yEAAyE;AACzE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;AAYN,MAAM;;;;;;;AAQN,MAAM;;;;;;;;;AAeN,MAAM;AAUN,iFAAiF;AACjF,MAAM;AAcC,MAAM,4CAAiB,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE,SAAS,eAAe,KAA0B,EAAE,GAA2B;IACpI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,kBACP,WAAW,gBACX,YAAY,oBACZ,mBAAmB,IACpB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,cAAc;IAClB,IAAI,SAAS,KACX,cAAc;SACT,IAAI,SAAS,KAClB,cAAc;IAGhB,yGAAyG;IACzG,IAAI,SAAS,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,CAAC;IAC/C,IAAI,gBAAgB,CAAC,CAAC;IAEtB,qBACE,gCAAC,CAAA,GAAA,sCAAa;QACX,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBACnD,GAAG,WAAW;sBACd;6BACA;YACF,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,mBAAE,eAAe,EAAC,iBAC7B,iCAAC;gBACC,MAAK;gBACL,OAAM;gBACN,QAAO;;kCACP,gCAAC;wBACC,IAAG;wBACH,IAAG;wBACH,GAAG;wBACH,aAAa;wBACb,WAAW,4BAAM;2CAAC;wBAAa;;kCACjC,gCAAC;wBACC,IAAG;wBACH,IAAG;wBACH,GAAG;wBACH,aAAa;wBACb,WAAW,2BAAK;2CAAC;wBAAa;wBAC9B,OAAO;4BACL,yFAAyF;4BACzF,gGAAgG;4BAChG,WAAW,kBAAkB,GAAG,wCAAkB,2CAA2C,EAAE,0CAAoB,4CAA4C,CAAC,GAAG;wBACrK;wBACA,2FAA2F;wBAC3F,YAAW;wBACX,sDAAsD;wBACtD,iBAAgB;wBAChB,kBAAkB,mBAAmB,cAAc,OAAO,YAAY,MAAM;wBAC5E,eAAc;;;;;AAK1B","sources":["packages/@react-spectrum/s2/src/ProgressCircle.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 {ContextValue, ProgressBar as RACProgressBar, ProgressBarProps as RACProgressBarProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ProgressCircleStyleProps {\n /**\n * The size of the ProgressCircle.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** The static color style to apply. Useful when the button appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean\n}\n\nexport const ProgressCircleContext = createContext<ContextValue<ProgressCircleProps, DOMRefValue<HTMLDivElement>>>(null);\n\n// Double check the types passed to each style, may not need all for each\nconst wrapper = style<ProgressCircleStyleProps>({\n ...staticColor(),\n size: {\n default: 32,\n size: {\n S: 16,\n L: 64\n }\n },\n aspectRatio: 'square'\n}, getAllowedOverrides({height: true}));\n\nconst track = style({\n stroke: {\n default: 'gray-300',\n isStaticColor: 'transparent-overlay-300',\n forcedColors: 'Background'\n }\n});\n\nconst fill = style({\n stroke: {\n default: 'blue-900',\n isStaticColor: 'transparent-overlay-900',\n forcedColors: 'Highlight'\n },\n rotate: -90,\n transformOrigin: 'center'\n});\n\nexport interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, UnsafeStyles {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\nconst rotationAnimation = keyframes(`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`);\n\n// stroke-dashoffset represents `100 - percentage`. See below for how this works.\nconst dashoffsetAnimation = keyframes(`\n 0%, 100% {\n stroke-dashoffset: 75;\n }\n\n 30% {\n stroke-dashoffset: 20;\n }\n`);\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nexport const ProgressCircle = /*#__PURE__*/ forwardRef(function ProgressCircle(props: ProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressCircleContext);\n let {\n size = 'M',\n staticColor,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let strokeWidth = 3;\n if (size === 'S') {\n strokeWidth = 2;\n } else if (size === 'L') {\n strokeWidth = 4;\n }\n\n // SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.\n let radius = `calc(50% - ${strokeWidth / 2}px)`;\n let isStaticColor = !!staticColor;\n\n return (\n <RACProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({\n ...renderProps,\n size,\n staticColor\n }, props.styles)}>\n {({percentage, isIndeterminate}) => (\n <svg\n fill=\"none\"\n width=\"100%\"\n height=\"100%\">\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={track({isStaticColor})} />\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={fill({isStaticColor})}\n style={{\n // These cubic-bezier timing functions were derived from the previous animation keyframes\n // using a best fit algorithm, and then manually adjusted to approximate the original animation.\n animation: isIndeterminate ? `${rotationAnimation} 1s cubic-bezier(.6, .1, .3, .9) infinite, ${dashoffsetAnimation} 1s cubic-bezier(.25, .1, .25, 1.3) infinite` : undefined\n }}\n // Normalize the path length to 100 so we can easily set stroke-dashoffset to a percentage.\n pathLength=\"100\"\n // Add extra gap between dashes so 0% works in Chrome.\n strokeDasharray=\"100 200\"\n strokeDashoffset={isIndeterminate || percentage == null ? undefined : 100 - percentage}\n strokeLinecap=\"round\" />\n </svg>\n )}\n </RACProgressBar>\n );\n});\n"],"names":[],"version":3,"file":"ProgressCircle.cjs.map"}
|
package/dist/ProgressCircle.css
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
+
.-_1de2x0q_b-c {
|
|
3
|
+
--s2-container-bg: white;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.-_1de2x0q_b-b {
|
|
7
|
+
--s2-container-bg: black;
|
|
8
|
+
}
|
|
9
|
+
|
|
2
10
|
.lU {
|
|
3
11
|
width: calc(2rem * var(--s2-scale));
|
|
4
12
|
}
|
|
@@ -31,24 +39,16 @@
|
|
|
31
39
|
stroke: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
32
40
|
}
|
|
33
41
|
|
|
34
|
-
.
|
|
35
|
-
stroke:
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.f_____o {
|
|
39
|
-
stroke: #00000026;
|
|
42
|
+
.f_____B {
|
|
43
|
+
stroke: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .17);
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
.fA {
|
|
43
47
|
stroke: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #5681ff);
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
.
|
|
47
|
-
stroke:
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.f_____u {
|
|
51
|
-
stroke: #000000ed;
|
|
50
|
+
.f_____H {
|
|
51
|
+
stroke: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / .94);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.R-375ty3 {
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
|
|
65
65
|
@layer _.b.a {
|
|
66
66
|
@media (forced-colors: active) {
|
|
67
|
-
.
|
|
67
|
+
.fa_____J {
|
|
68
68
|
stroke: background;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.
|
|
71
|
+
.fa_____O {
|
|
72
72
|
stroke: highlight;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACuCgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;
|
|
1
|
+
{"mappings":"ACuCgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAYF;;;;EAAA;;;;EAQD;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AApBG;;AAYF;EAAA;IAAA;;;;IAQD;;;;;;AAAA;;;;AAea;;;;;;;;;;AAWE","sources":["899fc8f7586d17bf","packages/@react-spectrum/s2/src/ProgressCircle.tsx"],"sourcesContent":["@import \"766ebfa3e9b99037\";\n@import \"cdcaa7bc1c97d336\";\n@import \"788ab0411a865673\";\n@import \"73f154e47fb53c5b\";\n@import \"6c6d672d6676880a\";\n","/*\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 {ContextValue, ProgressBar as RACProgressBar, ProgressBarProps as RACProgressBarProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ProgressCircleStyleProps {\n /**\n * The size of the ProgressCircle.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** The static color style to apply. Useful when the button appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean\n}\n\nexport const ProgressCircleContext = createContext<ContextValue<ProgressCircleProps, DOMRefValue<HTMLDivElement>>>(null);\n\n// Double check the types passed to each style, may not need all for each\nconst wrapper = style<ProgressCircleStyleProps>({\n ...staticColor(),\n size: {\n default: 32,\n size: {\n S: 16,\n L: 64\n }\n },\n aspectRatio: 'square'\n}, getAllowedOverrides({height: true}));\n\nconst track = style({\n stroke: {\n default: 'gray-300',\n isStaticColor: 'transparent-overlay-300',\n forcedColors: 'Background'\n }\n});\n\nconst fill = style({\n stroke: {\n default: 'blue-900',\n isStaticColor: 'transparent-overlay-900',\n forcedColors: 'Highlight'\n },\n rotate: -90,\n transformOrigin: 'center'\n});\n\nexport interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, UnsafeStyles {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\nconst rotationAnimation = keyframes(`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`);\n\n// stroke-dashoffset represents `100 - percentage`. See below for how this works.\nconst dashoffsetAnimation = keyframes(`\n 0%, 100% {\n stroke-dashoffset: 75;\n }\n\n 30% {\n stroke-dashoffset: 20;\n }\n`);\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nexport const ProgressCircle = /*#__PURE__*/ forwardRef(function ProgressCircle(props: ProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressCircleContext);\n let {\n size = 'M',\n staticColor,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let strokeWidth = 3;\n if (size === 'S') {\n strokeWidth = 2;\n } else if (size === 'L') {\n strokeWidth = 4;\n }\n\n // SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.\n let radius = `calc(50% - ${strokeWidth / 2}px)`;\n let isStaticColor = !!staticColor;\n\n return (\n <RACProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({\n ...renderProps,\n size,\n staticColor\n }, props.styles)}>\n {({percentage, isIndeterminate}) => (\n <svg\n fill=\"none\"\n width=\"100%\"\n height=\"100%\">\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={track({isStaticColor})} />\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={fill({isStaticColor})}\n style={{\n // These cubic-bezier timing functions were derived from the previous animation keyframes\n // using a best fit algorithm, and then manually adjusted to approximate the original animation.\n animation: isIndeterminate ? `${rotationAnimation} 1s cubic-bezier(.6, .1, .3, .9) infinite, ${dashoffsetAnimation} 1s cubic-bezier(.25, .1, .25, 1.3) infinite` : undefined\n }}\n // Normalize the path length to 100 so we can easily set stroke-dashoffset to a percentage.\n pathLength=\"100\"\n // Add extra gap between dashes so 0% works in Chrome.\n strokeDasharray=\"100 200\"\n strokeDashoffset={isIndeterminate || percentage == null ? undefined : 100 - percentage}\n strokeLinecap=\"round\" />\n </svg>\n )}\n </RACProgressBar>\n );\n});\n"],"names":[],"version":3,"file":"ProgressCircle.css.map"}
|
package/dist/ProgressCircle.mjs
CHANGED
|
@@ -32,6 +32,8 @@ const $41ddd91dbbf0c389$var$wrapper = function anonymous(props, overrides) {
|
|
|
32
32
|
if (/^\s*l/.test(p)) $l = true;
|
|
33
33
|
if (/^\s*k/.test(p)) $k = true;
|
|
34
34
|
}
|
|
35
|
+
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
36
|
+
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
35
37
|
if (!$l) {
|
|
36
38
|
if (props.size === "L") rules += ' l_q';
|
|
37
39
|
else if (props.size === "S") rules += ' lE';
|
|
@@ -47,17 +49,15 @@ const $41ddd91dbbf0c389$var$wrapper = function anonymous(props, overrides) {
|
|
|
47
49
|
};
|
|
48
50
|
const $41ddd91dbbf0c389$var$track = function anonymous(props) {
|
|
49
51
|
let rules = " .";
|
|
50
|
-
rules += '
|
|
51
|
-
if (props.
|
|
52
|
-
else if (props.staticColor === "white") rules += ' f_____b';
|
|
52
|
+
rules += ' fa_____J';
|
|
53
|
+
if (props.isStaticColor) rules += ' f_____B';
|
|
53
54
|
else rules += ' fk';
|
|
54
55
|
return rules;
|
|
55
56
|
};
|
|
56
57
|
const $41ddd91dbbf0c389$var$fill = function anonymous(props) {
|
|
57
58
|
let rules = " .";
|
|
58
|
-
rules += '
|
|
59
|
-
if (props.
|
|
60
|
-
else if (props.staticColor === "white") rules += ' f_____h';
|
|
59
|
+
rules += ' fa_____O';
|
|
60
|
+
if (props.isStaticColor) rules += ' f_____H';
|
|
61
61
|
else rules += ' fA';
|
|
62
62
|
rules += ' R-375ty3';
|
|
63
63
|
rules += ' __Ga';
|
|
@@ -75,13 +75,15 @@ const $41ddd91dbbf0c389$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $8ijGz$forwa
|
|
|
75
75
|
else if (size === 'L') strokeWidth = 4;
|
|
76
76
|
// SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.
|
|
77
77
|
let radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
78
|
+
let isStaticColor = !!staticColor;
|
|
78
79
|
return /*#__PURE__*/ (0, $8ijGz$jsx)((0, $8ijGz$ProgressBar), {
|
|
79
80
|
...props,
|
|
80
81
|
ref: domRef,
|
|
81
82
|
style: UNSAFE_style,
|
|
82
83
|
className: (renderProps)=>UNSAFE_className + $41ddd91dbbf0c389$var$wrapper({
|
|
83
84
|
...renderProps,
|
|
84
|
-
size: size
|
|
85
|
+
size: size,
|
|
86
|
+
staticColor: staticColor
|
|
85
87
|
}, props.styles),
|
|
86
88
|
children: ({ percentage: percentage, isIndeterminate: isIndeterminate })=>/*#__PURE__*/ (0, $8ijGz$jsxs)("svg", {
|
|
87
89
|
fill: "none",
|
|
@@ -94,7 +96,7 @@ const $41ddd91dbbf0c389$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $8ijGz$forwa
|
|
|
94
96
|
r: radius,
|
|
95
97
|
strokeWidth: strokeWidth,
|
|
96
98
|
className: $41ddd91dbbf0c389$var$track({
|
|
97
|
-
|
|
99
|
+
isStaticColor: isStaticColor
|
|
98
100
|
})
|
|
99
101
|
}),
|
|
100
102
|
/*#__PURE__*/ (0, $8ijGz$jsx)("circle", {
|
|
@@ -103,7 +105,7 @@ const $41ddd91dbbf0c389$export$c79b9d6b4cc92af7 = /*#__PURE__*/ (0, $8ijGz$forwa
|
|
|
103
105
|
r: radius,
|
|
104
106
|
strokeWidth: strokeWidth,
|
|
105
107
|
className: $41ddd91dbbf0c389$var$fill({
|
|
106
|
-
|
|
108
|
+
isStaticColor: isStaticColor
|
|
107
109
|
}),
|
|
108
110
|
style: {
|
|
109
111
|
// These cubic-bezier timing functions were derived from the previous animation keyframes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA0BM,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAAkE;AAEnH,yEAAyE;AACzE,MAAM
|
|
1
|
+
{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AA0BM,MAAM,0DAAwB,CAAA,GAAA,oBAAY,EAAkE;AAEnH,yEAAyE;AACzE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;AAYN,MAAM;;;;;;;AAQN,MAAM;;;;;;;;;AAeN,MAAM;AAUN,iFAAiF;AACjF,MAAM;AAcC,MAAM,4CAAiB,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,eAAe,KAA0B,EAAE,GAA2B;IACpI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,kBACP,WAAW,gBACX,YAAY,oBACZ,mBAAmB,IACpB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,cAAc;IAClB,IAAI,SAAS,KACX,cAAc;SACT,IAAI,SAAS,KAClB,cAAc;IAGhB,yGAAyG;IACzG,IAAI,SAAS,CAAC,WAAW,EAAE,cAAc,EAAE,GAAG,CAAC;IAC/C,IAAI,gBAAgB,CAAC,CAAC;IAEtB,qBACE,gBAAC,CAAA,GAAA,kBAAa;QACX,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,CAAA,cAAe,mBAAmB,8BAAQ;gBACnD,GAAG,WAAW;sBACd;6BACA;YACF,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,mBAAE,eAAe,EAAC,iBAC7B,iBAAC;gBACC,MAAK;gBACL,OAAM;gBACN,QAAO;;kCACP,gBAAC;wBACC,IAAG;wBACH,IAAG;wBACH,GAAG;wBACH,aAAa;wBACb,WAAW,4BAAM;2CAAC;wBAAa;;kCACjC,gBAAC;wBACC,IAAG;wBACH,IAAG;wBACH,GAAG;wBACH,aAAa;wBACb,WAAW,2BAAK;2CAAC;wBAAa;wBAC9B,OAAO;4BACL,yFAAyF;4BACzF,gGAAgG;4BAChG,WAAW,kBAAkB,GAAG,wCAAkB,2CAA2C,EAAE,0CAAoB,4CAA4C,CAAC,GAAG;wBACrK;wBACA,2FAA2F;wBAC3F,YAAW;wBACX,sDAAsD;wBACtD,iBAAgB;wBAChB,kBAAkB,mBAAmB,cAAc,OAAO,YAAY,MAAM;wBAC5E,eAAc;;;;;AAK1B","sources":["packages/@react-spectrum/s2/src/ProgressCircle.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 {ContextValue, ProgressBar as RACProgressBar, ProgressBarProps as RACProgressBarProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {keyframes} from '../style/style-macro' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ProgressCircleStyleProps {\n /**\n * The size of the ProgressCircle.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L',\n /** The static color style to apply. Useful when the button appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /**\n * Whether presentation is indeterminate when progress isn't known.\n */\n isIndeterminate?: boolean\n}\n\nexport const ProgressCircleContext = createContext<ContextValue<ProgressCircleProps, DOMRefValue<HTMLDivElement>>>(null);\n\n// Double check the types passed to each style, may not need all for each\nconst wrapper = style<ProgressCircleStyleProps>({\n ...staticColor(),\n size: {\n default: 32,\n size: {\n S: 16,\n L: 64\n }\n },\n aspectRatio: 'square'\n}, getAllowedOverrides({height: true}));\n\nconst track = style({\n stroke: {\n default: 'gray-300',\n isStaticColor: 'transparent-overlay-300',\n forcedColors: 'Background'\n }\n});\n\nconst fill = style({\n stroke: {\n default: 'blue-900',\n isStaticColor: 'transparent-overlay-900',\n forcedColors: 'Highlight'\n },\n rotate: -90,\n transformOrigin: 'center'\n});\n\nexport interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, UnsafeStyles {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight\n}\n\nconst rotationAnimation = keyframes(`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`);\n\n// stroke-dashoffset represents `100 - percentage`. See below for how this works.\nconst dashoffsetAnimation = keyframes(`\n 0%, 100% {\n stroke-dashoffset: 75;\n }\n\n 30% {\n stroke-dashoffset: 20;\n }\n`);\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nexport const ProgressCircle = /*#__PURE__*/ forwardRef(function ProgressCircle(props: ProgressCircleProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ProgressCircleContext);\n let {\n size = 'M',\n staticColor,\n UNSAFE_style,\n UNSAFE_className = ''\n } = props;\n let domRef = useDOMRef(ref);\n\n let strokeWidth = 3;\n if (size === 'S') {\n strokeWidth = 2;\n } else if (size === 'L') {\n strokeWidth = 4;\n }\n\n // SVG strokes are centered, so subtract half the stroke width from the radius to create an inner stroke.\n let radius = `calc(50% - ${strokeWidth / 2}px)`;\n let isStaticColor = !!staticColor;\n\n return (\n <RACProgressBar\n {...props}\n ref={domRef}\n style={UNSAFE_style}\n className={renderProps => UNSAFE_className + wrapper({\n ...renderProps,\n size,\n staticColor\n }, props.styles)}>\n {({percentage, isIndeterminate}) => (\n <svg\n fill=\"none\"\n width=\"100%\"\n height=\"100%\">\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={track({isStaticColor})} />\n <circle\n cx=\"50%\"\n cy=\"50%\"\n r={radius}\n strokeWidth={strokeWidth}\n className={fill({isStaticColor})}\n style={{\n // These cubic-bezier timing functions were derived from the previous animation keyframes\n // using a best fit algorithm, and then manually adjusted to approximate the original animation.\n animation: isIndeterminate ? `${rotationAnimation} 1s cubic-bezier(.6, .1, .3, .9) infinite, ${dashoffsetAnimation} 1s cubic-bezier(.25, .1, .25, 1.3) infinite` : undefined\n }}\n // Normalize the path length to 100 so we can easily set stroke-dashoffset to a percentage.\n pathLength=\"100\"\n // Add extra gap between dashes so 0% works in Chrome.\n strokeDasharray=\"100 200\"\n strokeDashoffset={isIndeterminate || percentage == null ? undefined : 100 - percentage}\n strokeLinecap=\"round\" />\n </svg>\n )}\n </RACProgressBar>\n );\n});\n"],"names":[],"version":3,"file":"ProgressCircle.mjs.map"}
|
package/dist/Provider.cjs
CHANGED
|
@@ -53,7 +53,7 @@ let $914a06b3a1c679bc$var$providerStyles = function anonymous(props) {
|
|
|
53
53
|
else if (props.colorScheme === "light") rules += ' _Aa';
|
|
54
54
|
else if (props.colorScheme === "light dark") rules += ' _Ac';
|
|
55
55
|
else rules += ' _A-10jn6wd';
|
|
56
|
-
if (props.background === "layer-2") rules += ' -_1de2x0q_b-
|
|
56
|
+
if (props.background === "layer-2") rules += ' -_1de2x0q_b-______x';
|
|
57
57
|
else if (props.background === "layer-1") rules += ' -_1de2x0q_b-e';
|
|
58
58
|
else if (props.background === "base") rules += ' -_1de2x0q_b-d';
|
|
59
59
|
if (props.background === "layer-2") rules += ' b-1de2x0q';
|
package/dist/Provider.css
CHANGED
package/dist/Provider.mjs
CHANGED
|
@@ -46,7 +46,7 @@ let $9affbfa4e13b9582$var$providerStyles = function anonymous(props) {
|
|
|
46
46
|
else if (props.colorScheme === "light") rules += ' _Aa';
|
|
47
47
|
else if (props.colorScheme === "light dark") rules += ' _Ac';
|
|
48
48
|
else rules += ' _A-10jn6wd';
|
|
49
|
-
if (props.background === "layer-2") rules += ' -_1de2x0q_b-
|
|
49
|
+
if (props.background === "layer-2") rules += ' -_1de2x0q_b-______x';
|
|
50
50
|
else if (props.background === "layer-1") rules += ' -_1de2x0q_b-e';
|
|
51
51
|
else if (props.background === "base") rules += ' -_1de2x0q_b-d';
|
|
52
52
|
if (props.background === "layer-2") rules += ' b-1de2x0q';
|
package/dist/Radio.cjs
CHANGED
|
@@ -67,7 +67,7 @@ const $49f41f366ec3019f$var$wrapper = function anonymous(props, overrides) {
|
|
|
67
67
|
rules += ' _f-1x99dlob';
|
|
68
68
|
rules += ' _fa';
|
|
69
69
|
if (props.isDisabled) {
|
|
70
|
-
rules += '
|
|
70
|
+
rules += ' aa_____O';
|
|
71
71
|
rules += ' aj';
|
|
72
72
|
} else {
|
|
73
73
|
if (props.isPressed) rules += ' ao';
|
|
@@ -88,7 +88,7 @@ const $49f41f366ec3019f$var$circle = function anonymous(props) {
|
|
|
88
88
|
let rules = " .";
|
|
89
89
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
90
90
|
else rules += ' _La';
|
|
91
|
-
rules += '
|
|
91
|
+
rules += ' da_____M';
|
|
92
92
|
rules += ' dx';
|
|
93
93
|
rules += ' _Nc';
|
|
94
94
|
rules += ' _M-3t1z';
|
|
@@ -121,16 +121,16 @@ const $49f41f366ec3019f$var$circle = function anonymous(props) {
|
|
|
121
121
|
rules += ' _zb';
|
|
122
122
|
rules += ' bd';
|
|
123
123
|
if (props.isDisabled) {
|
|
124
|
-
rules += '
|
|
124
|
+
rules += ' ca_____O';
|
|
125
125
|
rules += ' cj';
|
|
126
126
|
} else if (props.isInvalid) {
|
|
127
|
-
rules += '
|
|
127
|
+
rules += ' ca_____P';
|
|
128
128
|
if (props.isPressed) rules += ' cQ';
|
|
129
129
|
else if (props.isFocusVisible) rules += ' cP';
|
|
130
130
|
else if (props.isHovered) rules += ' cP';
|
|
131
131
|
else rules += ' cO';
|
|
132
132
|
} else if (props.isSelected) {
|
|
133
|
-
rules += '
|
|
133
|
+
rules += ' ca_____M';
|
|
134
134
|
if (props.isEmphasized) {
|
|
135
135
|
if (props.isPressed) rules += ' cz';
|
|
136
136
|
else if (props.isFocusVisible) rules += ' cz';
|
|
@@ -138,7 +138,7 @@ const $49f41f366ec3019f$var$circle = function anonymous(props) {
|
|
|
138
138
|
else rules += ' cy';
|
|
139
139
|
}
|
|
140
140
|
} else {
|
|
141
|
-
rules += '
|
|
141
|
+
rules += ' ca_____I';
|
|
142
142
|
if (props.isPressed) rules += ' co';
|
|
143
143
|
else if (props.isFocusVisible) rules += ' co';
|
|
144
144
|
else if (props.isHovered) rules += ' co';
|
package/dist/Radio.css
CHANGED
|
@@ -320,27 +320,27 @@
|
|
|
320
320
|
|
|
321
321
|
@layer _.b.a {
|
|
322
322
|
@media (forced-colors: active) {
|
|
323
|
-
.
|
|
323
|
+
.aa_____O {
|
|
324
324
|
color: graytext;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
.
|
|
327
|
+
.da_____M {
|
|
328
328
|
outline-color: highlight;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
.
|
|
331
|
+
.ca_____I {
|
|
332
332
|
border-color: buttonborder;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
.
|
|
335
|
+
.ca_____M {
|
|
336
336
|
border-color: highlight;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
.
|
|
339
|
+
.ca_____P {
|
|
340
340
|
border-color: mark;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
.
|
|
343
|
+
.ca_____O {
|
|
344
344
|
border-color: graytext;
|
|
345
345
|
}
|
|
346
346
|
}
|