@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/TableView.mjs
CHANGED
|
@@ -83,10 +83,10 @@ const $0fcd5fb617970a1d$var$table = function anonymous(props, overrides) {
|
|
|
83
83
|
rules += ' _eb';
|
|
84
84
|
rules += ' __va';
|
|
85
85
|
rules += ' __wa';
|
|
86
|
-
rules += '
|
|
86
|
+
rules += ' ba_____H';
|
|
87
87
|
if (props.isQuiet) rules += ' ba';
|
|
88
88
|
else rules += ' bd';
|
|
89
|
-
rules += '
|
|
89
|
+
rules += ' da_____I';
|
|
90
90
|
if (props.isFocusVisible) rules += ' dx';
|
|
91
91
|
else rules += ' di';
|
|
92
92
|
if (props.isFocusVisible) rules += ' _Nc';
|
|
@@ -356,7 +356,7 @@ function $0fcd5fb617970a1d$var$CellFocusRing() {
|
|
|
356
356
|
else rules += ' _La';
|
|
357
357
|
rules += ' _M-3hmpw';
|
|
358
358
|
rules += ' _Nc';
|
|
359
|
-
rules += '
|
|
359
|
+
rules += ' da_____M';
|
|
360
360
|
rules += ' dx';
|
|
361
361
|
rules += ' _v-3762yr';
|
|
362
362
|
rules += ' _w-3762yr';
|
|
@@ -377,7 +377,7 @@ const $0fcd5fb617970a1d$var$columnStyles = function anonymous(props) {
|
|
|
377
377
|
let rules = " .";
|
|
378
378
|
rules += ' k-17zqamw';
|
|
379
379
|
rules += ' __na';
|
|
380
|
-
rules += '
|
|
380
|
+
rules += ' aa_____K';
|
|
381
381
|
if (props.isPressed) rules += ' ao';
|
|
382
382
|
else if (props.isFocusVisible) rules += ' ao';
|
|
383
383
|
else if (props.isHovered) rules += ' ao';
|
|
@@ -417,7 +417,7 @@ const $0fcd5fb617970a1d$var$columnStyles = function anonymous(props) {
|
|
|
417
417
|
rules += ' _ca';
|
|
418
418
|
rules += ' _ed';
|
|
419
419
|
rules += ' _Zd';
|
|
420
|
-
rules += '
|
|
420
|
+
rules += ' ca_____I';
|
|
421
421
|
rules += ' ci';
|
|
422
422
|
if (props.isQuiet) rules += ' ub';
|
|
423
423
|
else rules += ' ua';
|
|
@@ -511,7 +511,7 @@ const $0fcd5fb617970a1d$var$resizableMenuButtonWrapper = function anonymous(prop
|
|
|
511
511
|
else rules += ' _La';
|
|
512
512
|
rules += ' _M-3hmpw';
|
|
513
513
|
rules += ' _Nc';
|
|
514
|
-
rules += '
|
|
514
|
+
rules += ' da_____M';
|
|
515
515
|
rules += ' dx';
|
|
516
516
|
rules += ' _v-3762yr';
|
|
517
517
|
rules += ' _w-3762yr';
|
|
@@ -574,10 +574,10 @@ const $0fcd5fb617970a1d$var$resizerHandleContainer = function anonymous(props) {
|
|
|
574
574
|
};
|
|
575
575
|
const $0fcd5fb617970a1d$var$resizerHandle = function anonymous(props) {
|
|
576
576
|
let rules = " .";
|
|
577
|
-
if (props.isResizing) rules += '
|
|
578
|
-
else if (props.isFocusVisible) rules += '
|
|
579
|
-
else if (props.isHovered) rules += '
|
|
580
|
-
else rules += '
|
|
577
|
+
if (props.isResizing) rules += ' ba_____M';
|
|
578
|
+
else if (props.isFocusVisible) rules += ' ba_____M';
|
|
579
|
+
else if (props.isHovered) rules += ' ba_____I';
|
|
580
|
+
else rules += ' ba_____H';
|
|
581
581
|
if (props.isResizing) rules += ' b-14crvkh';
|
|
582
582
|
else if (props.isFocusVisible) rules += ' b-14crvkh';
|
|
583
583
|
else if (props.isHovered) rules += ' bi';
|
|
@@ -592,7 +592,7 @@ const $0fcd5fb617970a1d$var$resizerHandle = function anonymous(props) {
|
|
|
592
592
|
};
|
|
593
593
|
const $0fcd5fb617970a1d$var$columnHeaderText = " . __vb __wb _ma _pb q-1wikn8b _9-3t1x _8-3t1y hF";
|
|
594
594
|
const $0fcd5fb617970a1d$var$chevronIcon = " . R-3hn0u yG ybH q-1wikn8b _8-3t1x -rwx0fg_e-b";
|
|
595
|
-
const $0fcd5fb617970a1d$var$nubbin = " . Ua Xa V-avx9c1 l-1wikn8b k-1wikn8b e-14crvkh
|
|
595
|
+
const $0fcd5fb617970a1d$var$nubbin = " . Ua Xa V-avx9c1 l-1wikn8b k-1wikn8b e-14crvkh ea______a -rwx0fg_e-A -rwx0fg_e-a______b";
|
|
596
596
|
function $0fcd5fb617970a1d$var$ResizableColumnContents(props) {
|
|
597
597
|
let { allowsSorting: allowsSorting, sortDirection: sortDirection, sort: sort, startResize: startResize, children: children, isHovered: isHovered, align: align } = props;
|
|
598
598
|
let { setIsInResizeMode: setIsInResizeMode, isInResizeMode: isInResizeMode } = (0, $auVFN$useContext)($0fcd5fb617970a1d$var$InternalTableContext);
|
|
@@ -735,7 +735,7 @@ const $0fcd5fb617970a1d$var$selectAllCheckboxColumn = function anonymous(props)
|
|
|
735
735
|
rules += ' _La';
|
|
736
736
|
rules += ' Uc';
|
|
737
737
|
rules += ' _0b';
|
|
738
|
-
rules += '
|
|
738
|
+
rules += ' ca_____I';
|
|
739
739
|
rules += ' ci';
|
|
740
740
|
rules += ' sa';
|
|
741
741
|
rules += ' ta';
|
|
@@ -820,7 +820,7 @@ const $0fcd5fb617970a1d$var$commonCellStyles = {
|
|
|
820
820
|
};
|
|
821
821
|
const $0fcd5fb617970a1d$var$cell = function anonymous(props) {
|
|
822
822
|
let rules = " .";
|
|
823
|
-
rules += '
|
|
823
|
+
rules += ' ca_____I';
|
|
824
824
|
rules += ' ci';
|
|
825
825
|
rules += ' v-375tp1';
|
|
826
826
|
rules += ' u-375tp0';
|
|
@@ -871,7 +871,7 @@ const $0fcd5fb617970a1d$var$cell = function anonymous(props) {
|
|
|
871
871
|
const $0fcd5fb617970a1d$var$stickyCell = {
|
|
872
872
|
backgroundColor: 'gray-25'
|
|
873
873
|
};
|
|
874
|
-
const $0fcd5fb617970a1d$var$checkboxCellStyle = " . ca va ua sa ta wa Uc an
|
|
874
|
+
const $0fcd5fb617970a1d$var$checkboxCellStyle = " . ca va ua sa ta wa Uc an aa_____K _La Cf Df b-19jpv4m _0b k-1xrzxd1";
|
|
875
875
|
const $0fcd5fb617970a1d$var$cellContent = function anonymous(props) {
|
|
876
876
|
let rules = " .";
|
|
877
877
|
rules += ' __vb';
|
|
@@ -963,7 +963,7 @@ const $0fcd5fb617970a1d$var$row = function anonymous(props) {
|
|
|
963
963
|
rules += ' Uc';
|
|
964
964
|
rules += ' __na';
|
|
965
965
|
rules += ' b-19jpv4m';
|
|
966
|
-
rules += ' -_19jpv4m_b-
|
|
966
|
+
rules += ' -_19jpv4m_b-a_____H';
|
|
967
967
|
if (props.isSelected) {
|
|
968
968
|
if (props.isPressed) rules += ' -_19jpv4m_b--1hocwbr';
|
|
969
969
|
else if (props.isHovered) rules += ' -_19jpv4m_b--1hocwbr';
|
|
@@ -974,7 +974,7 @@ const $0fcd5fb617970a1d$var$row = function anonymous(props) {
|
|
|
974
974
|
else if (props.isFocusVisibleWithin) rules += ' -_19jpv4m_b--26tcdv';
|
|
975
975
|
else if (props.isQuiet) rules += ' -_19jpv4m_b--1de2x0q';
|
|
976
976
|
else rules += ' -_19jpv4m_b-d';
|
|
977
|
-
rules += ' -oorfdf_d-
|
|
977
|
+
rules += ' -oorfdf_d-a_____M';
|
|
978
978
|
rules += ' -oorfdf_d-x';
|
|
979
979
|
rules += ' _La';
|
|
980
980
|
rules += ' ua';
|
|
@@ -982,7 +982,7 @@ const $0fcd5fb617970a1d$var$row = function anonymous(props) {
|
|
|
982
982
|
rules += ' sa';
|
|
983
983
|
rules += ' ta';
|
|
984
984
|
rules += ' wa';
|
|
985
|
-
rules += '
|
|
985
|
+
rules += ' ca_____I';
|
|
986
986
|
rules += ' ci';
|
|
987
987
|
rules += ' _zb';
|
|
988
988
|
return rules;
|
package/dist/Tabs.cjs
CHANGED
|
@@ -212,8 +212,8 @@ function $b27519d6a701105b$export$e51a686c67fdaa2d(props1) {
|
|
|
212
212
|
const $b27519d6a701105b$var$selectedIndicator = function anonymous(props) {
|
|
213
213
|
let rules = " .";
|
|
214
214
|
rules += ' Ua';
|
|
215
|
-
if (props.isDisabled) rules += '
|
|
216
|
-
else rules += '
|
|
215
|
+
if (props.isDisabled) rules += ' ba_____O';
|
|
216
|
+
else rules += ' ba_____M';
|
|
217
217
|
if (props.isDisabled) rules += ' bg';
|
|
218
218
|
else {
|
|
219
219
|
if (props.isPressed) rules += ' bo';
|
|
@@ -307,13 +307,13 @@ const $b27519d6a701105b$var$tab = function anonymous(props, overrides) {
|
|
|
307
307
|
}
|
|
308
308
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
309
309
|
else rules += ' _La';
|
|
310
|
-
rules += '
|
|
310
|
+
rules += ' da_____M';
|
|
311
311
|
rules += ' dx';
|
|
312
312
|
rules += ' _Nc';
|
|
313
313
|
rules += ' _M-3t1z';
|
|
314
314
|
rules += ' _Zd';
|
|
315
|
-
if (props.isDisabled) rules += '
|
|
316
|
-
else if (props.isSelected) rules += '
|
|
315
|
+
if (props.isDisabled) rules += ' aa_____O';
|
|
316
|
+
else if (props.isSelected) rules += ' aa_____M';
|
|
317
317
|
if (props.isDisabled) rules += ' aj';
|
|
318
318
|
else if (props.isHovered) {
|
|
319
319
|
if (props.isPressed) rules += ' an';
|
package/dist/Tabs.css
CHANGED
|
@@ -368,23 +368,23 @@
|
|
|
368
368
|
|
|
369
369
|
@layer _.b.a {
|
|
370
370
|
@media (forced-colors: active) {
|
|
371
|
-
.
|
|
371
|
+
.ba_____M {
|
|
372
372
|
background-color: highlight;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
.
|
|
375
|
+
.ba_____O {
|
|
376
376
|
background-color: graytext;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
.
|
|
379
|
+
.da_____M {
|
|
380
380
|
outline-color: highlight;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
-
.
|
|
383
|
+
.aa_____M {
|
|
384
384
|
color: highlight;
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
-
.
|
|
387
|
+
.aa_____O {
|
|
388
388
|
color: graytext;
|
|
389
389
|
}
|
|
390
390
|
}
|
package/dist/Tabs.mjs
CHANGED
|
@@ -202,8 +202,8 @@ function $79e2b4a1b34d1592$export$e51a686c67fdaa2d(props1) {
|
|
|
202
202
|
const $79e2b4a1b34d1592$var$selectedIndicator = function anonymous(props) {
|
|
203
203
|
let rules = " .";
|
|
204
204
|
rules += ' Ua';
|
|
205
|
-
if (props.isDisabled) rules += '
|
|
206
|
-
else rules += '
|
|
205
|
+
if (props.isDisabled) rules += ' ba_____O';
|
|
206
|
+
else rules += ' ba_____M';
|
|
207
207
|
if (props.isDisabled) rules += ' bg';
|
|
208
208
|
else {
|
|
209
209
|
if (props.isPressed) rules += ' bo';
|
|
@@ -297,13 +297,13 @@ const $79e2b4a1b34d1592$var$tab = function anonymous(props, overrides) {
|
|
|
297
297
|
}
|
|
298
298
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
299
299
|
else rules += ' _La';
|
|
300
|
-
rules += '
|
|
300
|
+
rules += ' da_____M';
|
|
301
301
|
rules += ' dx';
|
|
302
302
|
rules += ' _Nc';
|
|
303
303
|
rules += ' _M-3t1z';
|
|
304
304
|
rules += ' _Zd';
|
|
305
|
-
if (props.isDisabled) rules += '
|
|
306
|
-
else if (props.isSelected) rules += '
|
|
305
|
+
if (props.isDisabled) rules += ' aa_____O';
|
|
306
|
+
else if (props.isSelected) rules += ' aa_____M';
|
|
307
307
|
if (props.isDisabled) rules += ' aj';
|
|
308
308
|
else if (props.isHovered) {
|
|
309
309
|
if (props.isPressed) rules += ' an';
|
package/dist/TabsPicker.cjs
CHANGED
|
@@ -60,7 +60,7 @@ const $9d2c38978395d44a$var$inputButton = function anonymous(props) {
|
|
|
60
60
|
let rules = " .";
|
|
61
61
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
62
62
|
else rules += ' _La';
|
|
63
|
-
rules += '
|
|
63
|
+
rules += ' da_____M';
|
|
64
64
|
rules += ' dx';
|
|
65
65
|
rules += ' _Nc';
|
|
66
66
|
rules += ' _M-3t1z';
|
package/dist/TabsPicker.css
CHANGED
package/dist/TabsPicker.mjs
CHANGED
|
@@ -53,7 +53,7 @@ const $0067ea932a992b6a$var$inputButton = function anonymous(props) {
|
|
|
53
53
|
let rules = " .";
|
|
54
54
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
55
55
|
else rules += ' _La';
|
|
56
|
-
rules += '
|
|
56
|
+
rules += ' da_____M';
|
|
57
57
|
rules += ' dx';
|
|
58
58
|
rules += ' _Nc';
|
|
59
59
|
rules += ' _M-3t1z';
|
package/dist/TagGroup.cjs
CHANGED
|
@@ -482,7 +482,7 @@ const $2e3ddd7543f4a901$var$tagStyles = function anonymous(props) {
|
|
|
482
482
|
let rules = " .";
|
|
483
483
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
484
484
|
else rules += ' _La';
|
|
485
|
-
rules += '
|
|
485
|
+
rules += ' da_____M';
|
|
486
486
|
rules += ' dx';
|
|
487
487
|
rules += ' _Nc';
|
|
488
488
|
rules += ' _M-3t1z';
|
|
@@ -519,9 +519,9 @@ const $2e3ddd7543f4a901$var$tagStyles = function anonymous(props) {
|
|
|
519
519
|
rules += ' _eb';
|
|
520
520
|
rules += ' _f-1x99dlob';
|
|
521
521
|
rules += ' _fa';
|
|
522
|
-
if (props.isDisabled) rules += '
|
|
523
|
-
else if (props.isSelected) rules += '
|
|
524
|
-
else rules += '
|
|
522
|
+
if (props.isDisabled) rules += ' aa_____O';
|
|
523
|
+
else if (props.isSelected) rules += ' aa_____N';
|
|
524
|
+
else rules += ' aa_____K';
|
|
525
525
|
if (props.isDisabled) rules += ' aj';
|
|
526
526
|
else if (props.isSelected) {
|
|
527
527
|
if (props.isEmphasized) rules += ' ac';
|
|
@@ -537,15 +537,15 @@ const $2e3ddd7543f4a901$var$tagStyles = function anonymous(props) {
|
|
|
537
537
|
rules += ' _Q-375x7f';
|
|
538
538
|
rules += ' _Ra';
|
|
539
539
|
rules += ' qo';
|
|
540
|
-
if (props.isSelected) rules += '
|
|
541
|
-
else rules += '
|
|
540
|
+
if (props.isSelected) rules += ' ba_____M';
|
|
541
|
+
else rules += ' ba_____J';
|
|
542
542
|
if (props.isDisabled) rules += ' bg';
|
|
543
543
|
else if (props.isSelected) {
|
|
544
544
|
if (props.isEmphasized) {
|
|
545
|
-
if (props.isPressed) rules += '
|
|
546
|
-
else if (props.isFocusVisible) rules += '
|
|
547
|
-
else if (props.isHovered) rules += '
|
|
548
|
-
else rules += '
|
|
545
|
+
if (props.isPressed) rules += ' b_____S';
|
|
546
|
+
else if (props.isFocusVisible) rules += ' b_____S';
|
|
547
|
+
else if (props.isHovered) rules += ' b_____S';
|
|
548
|
+
else rules += ' b_____R';
|
|
549
549
|
} else {
|
|
550
550
|
if (props.isPressed) rules += ' bo';
|
|
551
551
|
else if (props.isFocusVisible) rules += ' bo';
|
package/dist/TagGroup.css
CHANGED
|
@@ -304,11 +304,11 @@
|
|
|
304
304
|
background-color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
.
|
|
307
|
+
.b_____R {
|
|
308
308
|
background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #4069fd);
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
.
|
|
311
|
+
.b_____S {
|
|
312
312
|
background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -583,27 +583,27 @@
|
|
|
583
583
|
|
|
584
584
|
@layer _.b.a {
|
|
585
585
|
@media (forced-colors: active) {
|
|
586
|
-
.
|
|
586
|
+
.da_____M {
|
|
587
587
|
outline-color: highlight;
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
.
|
|
590
|
+
.aa_____K {
|
|
591
591
|
color: buttontext;
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
.
|
|
594
|
+
.aa_____N {
|
|
595
595
|
color: highlighttext;
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
.
|
|
598
|
+
.aa_____O {
|
|
599
599
|
color: graytext;
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
-
.
|
|
602
|
+
.ba_____J {
|
|
603
603
|
background-color: buttonface;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
.
|
|
606
|
+
.ba_____M {
|
|
607
607
|
background-color: highlight;
|
|
608
608
|
}
|
|
609
609
|
}
|
package/dist/TagGroup.mjs
CHANGED
|
@@ -474,7 +474,7 @@ const $1d63bfab43d9ffe1$var$tagStyles = function anonymous(props) {
|
|
|
474
474
|
let rules = " .";
|
|
475
475
|
if (props.isFocusVisible) rules += ' _Lb';
|
|
476
476
|
else rules += ' _La';
|
|
477
|
-
rules += '
|
|
477
|
+
rules += ' da_____M';
|
|
478
478
|
rules += ' dx';
|
|
479
479
|
rules += ' _Nc';
|
|
480
480
|
rules += ' _M-3t1z';
|
|
@@ -511,9 +511,9 @@ const $1d63bfab43d9ffe1$var$tagStyles = function anonymous(props) {
|
|
|
511
511
|
rules += ' _eb';
|
|
512
512
|
rules += ' _f-1x99dlob';
|
|
513
513
|
rules += ' _fa';
|
|
514
|
-
if (props.isDisabled) rules += '
|
|
515
|
-
else if (props.isSelected) rules += '
|
|
516
|
-
else rules += '
|
|
514
|
+
if (props.isDisabled) rules += ' aa_____O';
|
|
515
|
+
else if (props.isSelected) rules += ' aa_____N';
|
|
516
|
+
else rules += ' aa_____K';
|
|
517
517
|
if (props.isDisabled) rules += ' aj';
|
|
518
518
|
else if (props.isSelected) {
|
|
519
519
|
if (props.isEmphasized) rules += ' ac';
|
|
@@ -529,15 +529,15 @@ const $1d63bfab43d9ffe1$var$tagStyles = function anonymous(props) {
|
|
|
529
529
|
rules += ' _Q-375x7f';
|
|
530
530
|
rules += ' _Ra';
|
|
531
531
|
rules += ' qo';
|
|
532
|
-
if (props.isSelected) rules += '
|
|
533
|
-
else rules += '
|
|
532
|
+
if (props.isSelected) rules += ' ba_____M';
|
|
533
|
+
else rules += ' ba_____J';
|
|
534
534
|
if (props.isDisabled) rules += ' bg';
|
|
535
535
|
else if (props.isSelected) {
|
|
536
536
|
if (props.isEmphasized) {
|
|
537
|
-
if (props.isPressed) rules += '
|
|
538
|
-
else if (props.isFocusVisible) rules += '
|
|
539
|
-
else if (props.isHovered) rules += '
|
|
540
|
-
else rules += '
|
|
537
|
+
if (props.isPressed) rules += ' b_____S';
|
|
538
|
+
else if (props.isFocusVisible) rules += ' b_____S';
|
|
539
|
+
else if (props.isHovered) rules += ' b_____S';
|
|
540
|
+
else rules += ' b_____R';
|
|
541
541
|
} else {
|
|
542
542
|
if (props.isPressed) rules += ' bo';
|
|
543
543
|
else if (props.isFocusVisible) rules += ' bo';
|
package/dist/ToggleButton.cjs
CHANGED
|
@@ -59,6 +59,7 @@ const $d16e5203405a91b7$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $kyLWK$react
|
|
|
59
59
|
className: (renderProps)=>(props.UNSAFE_className || '') + (0, $6e265ff388155b91$exports.btnStyles)({
|
|
60
60
|
...renderProps,
|
|
61
61
|
staticColor: staticColor,
|
|
62
|
+
isStaticColor: !!staticColor,
|
|
62
63
|
size: size,
|
|
63
64
|
isQuiet: isQuiet,
|
|
64
65
|
isEmphasized: isEmphasized,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAyBM,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAAyE;AAMjH,MAAM,0DAAe,CAAA,GAAA,uBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,MAAM,CAAA,GAAA,4CAAgB,EAAE,CAAA,GAAA,kDAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,gBACvB,eAAe,MAAM,YAAY,QACjC,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gCAAC,CAAA,GAAA,uCAAc;QACZ,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,E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oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,qCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,wCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gCAAC,CAAA,GAAA,8BAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ToggleButton.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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children?: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<ToggleButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.cjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"ACgFiC;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAEyB;;;;EACtC;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAHa;;AAEyB","sources":["bc1013d4d937a6f8","packages/@react-spectrum/s2/src/ToggleButton.tsx"],"sourcesContent":["@import \"2356498b79989caa\";\n@import \"00644bdfe594b970\";\n@import \"2645bae9c4681078\";\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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children?: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<ToggleButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.css.map"}
|
package/dist/ToggleButton.mjs
CHANGED
|
@@ -52,6 +52,7 @@ const $fe4c9df7420c3c9f$export$d2b052e7b4be1756 = /*#__PURE__*/ (0, $fpet3$forwa
|
|
|
52
52
|
className: (renderProps)=>(props.UNSAFE_className || '') + (0, $da878a05ab4a403e$export$446543cff2a0f496)({
|
|
53
53
|
...renderProps,
|
|
54
54
|
staticColor: staticColor,
|
|
55
|
+
isSt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packages/@react-spectrum/s2/src/ToggleButton.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 {ActionButtonStyleProps, btnStyles} from './ActionButton';\nimport {centerBaseline} from './CenterBaseline';\nimport {ContextValue, Provider, ToggleButton as RACToggleButton, ToggleButtonProps as RACToggleButtonProps, useSlottedContext} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {StyleProps} from './style-utils';\nimport {Text, TextContext} from './Content';\nimport {ToggleButtonGroupContext} from './ToggleButtonGroup';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the button. */\n children?: ReactNode,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\nexport const ToggleButtonContext = createContext<ContextValue<ToggleButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ToggleButtons allow users to toggle a selection on or off, for example\n * switching between two states or modes.\n */\nexport const ToggleButton = forwardRef(function ToggleButton(props: ToggleButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ToggleButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let ctx = useSlottedContext(ToggleButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n isEmphasized = props.isEmphasized,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACToggleButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n isEmphasized,\n isPending: false,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACToggleButton>\n );\n});\n"],"names":[],"version":3,"file":"ToggleButton.mjs.map"}
|
package/dist/Tooltip.cjs
CHANGED
package/dist/Tooltip.css
CHANGED
package/dist/Tooltip.mjs
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export interface ActionButtonGroupProps extends UnsafeStyles, SlotProps {
|
|
|
46
46
|
/** Whether the buttons should divide the container width equally. */
|
|
47
47
|
isJustified?: boolean;
|
|
48
48
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
49
|
-
staticColor?: 'white' | 'black';
|
|
49
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
50
50
|
/**
|
|
51
51
|
* The axis the group should align with.
|
|
52
52
|
* @default 'horizontal'
|
|
@@ -217,7 +217,7 @@ interface ActionButtonStyleProps {
|
|
|
217
217
|
*/
|
|
218
218
|
size?: 'XS' | 'S' | 'M' | 'L' | 'XL';
|
|
219
219
|
/** The static color style to apply. Useful when the ActionButton appears over a color background. */
|
|
220
|
-
staticColor?: 'black' | 'white';
|
|
220
|
+
staticColor?: 'black' | 'white' | 'auto';
|
|
221
221
|
/** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */
|
|
222
222
|
isQuiet?: boolean;
|
|
223
223
|
}
|
|
@@ -334,7 +334,7 @@ interface DividerSpectrumProps {
|
|
|
334
334
|
*/
|
|
335
335
|
orientation?: 'horizontal' | 'vertical';
|
|
336
336
|
/** The static color style to apply. Useful when the Divider appears over a color background. */
|
|
337
|
-
staticColor?: 'white' | 'black';
|
|
337
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
338
338
|
}
|
|
339
339
|
export interface DividerProps extends DividerSpectrumProps, Omit<SeparatorProps, 'className' | 'style' | 'elementType'>, StyleProps {
|
|
340
340
|
}
|
|
@@ -463,7 +463,7 @@ interface ProgressCircleStyleProps {
|
|
|
463
463
|
*/
|
|
464
464
|
size?: 'S' | 'M' | 'L';
|
|
465
465
|
/** The static color style to apply. Useful when the button appears over a color background. */
|
|
466
|
-
staticColor?: 'black' | 'white';
|
|
466
|
+
staticColor?: 'black' | 'white' | 'auto';
|
|
467
467
|
/**
|
|
468
468
|
* Whether presentation is indeterminate when progress isn't known.
|
|
469
469
|
*/
|
|
@@ -499,7 +499,7 @@ interface ButtonStyleProps {
|
|
|
499
499
|
*/
|
|
500
500
|
size?: 'S' | 'M' | 'L' | 'XL';
|
|
501
501
|
/** The static color style to apply. Useful when the Button appears over a color background. */
|
|
502
|
-
staticColor?: 'white' | 'black';
|
|
502
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
503
503
|
}
|
|
504
504
|
export interface ButtonProps extends Omit<_ButtonProps1, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, ButtonStyleProps {
|
|
505
505
|
/** The content to display in the Button. */
|
|
@@ -565,7 +565,7 @@ export interface CloseButtonProps extends Pick<_ButtonProps1, 'isDisabled'>, Sty
|
|
|
565
565
|
*/
|
|
566
566
|
size?: 'S' | 'M' | 'L' | 'XL';
|
|
567
567
|
/** The static color style to apply. Useful when the Button appears over a color background. */
|
|
568
|
-
staticColor?: 'white' | 'black';
|
|
568
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
569
569
|
}
|
|
570
570
|
/**
|
|
571
571
|
* A CloseButton allows a user to dismiss a dialog.
|
|
@@ -1130,7 +1130,7 @@ interface LinkStyleProps {
|
|
|
1130
1130
|
*/
|
|
1131
1131
|
variant?: 'primary' | 'secondary';
|
|
1132
1132
|
/** The static color style to apply. Useful when the link appears over a color background. */
|
|
1133
|
-
staticColor?: 'white' | 'black';
|
|
1133
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
1134
1134
|
/** Whether the link is on its own vs inside a longer string of text. */
|
|
1135
1135
|
isStandalone?: boolean;
|
|
1136
1136
|
/** Whether the link should be displayed with a quiet style. */
|
|
@@ -1159,7 +1159,7 @@ interface MeterStyleProps {
|
|
|
1159
1159
|
/**
|
|
1160
1160
|
* The static color style to apply. Useful when the button appears over a color background.
|
|
1161
1161
|
*/
|
|
1162
|
-
staticColor?: 'white' | 'black';
|
|
1162
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
1163
1163
|
/**
|
|
1164
1164
|
* The label's overall position relative to the element it is labeling.
|
|
1165
1165
|
* @default 'top'
|
|
@@ -1208,7 +1208,7 @@ interface ProgressBarStyleProps {
|
|
|
1208
1208
|
/**
|
|
1209
1209
|
* The static color style to apply. Useful when the button appears over a color background.
|
|
1210
1210
|
*/
|
|
1211
|
-
staticColor?: 'white' | 'black';
|
|
1211
|
+
staticColor?: 'white' | 'black' | 'auto';
|
|
1212
1212
|
/**
|
|
1213
1213
|
* The label's overall position relative to the element it is labeling.
|
|
1214
1214
|
* @default 'top'
|