@react-spectrum/s2 3.0.0-nightly-db60babaf-241014 → 3.0.0-nightly-e1b72a79f-241016
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.css +3 -3
- package/dist/AlertDialog.css +2 -2
- package/dist/Badge.cjs +60 -60
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +88 -88
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +60 -60
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.css +1 -1
- package/dist/Button.cjs +4 -4
- package/dist/Button.css +7 -7
- package/dist/Button.mjs +4 -4
- package/dist/Card.cjs +1 -1
- package/dist/Card.css +2 -2
- package/dist/Card.mjs +1 -1
- package/dist/CardView.css +1 -1
- package/dist/Checkbox.cjs +1 -1
- package/dist/Checkbox.css +3 -3
- package/dist/Checkbox.mjs +1 -1
- package/dist/CloseButton.css +1 -1
- package/dist/ColorHandle.cjs +1 -1
- package/dist/ColorHandle.css +1 -1
- package/dist/ColorHandle.mjs +1 -1
- package/dist/ColorSwatchPicker.css +1 -1
- package/dist/ContextualHelp.cjs +1 -1
- package/dist/ContextualHelp.css +7 -7
- package/dist/ContextualHelp.mjs +1 -1
- package/dist/Dialog.cjs +1 -1
- package/dist/Dialog.css +3 -3
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.cjs +3 -3
- package/dist/Disclosure.css +9 -1
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +3 -3
- package/dist/DropZone.css +3 -3
- package/dist/Field.cjs +1 -1
- package/dist/Field.css +3 -3
- package/dist/Field.mjs +1 -1
- package/dist/InlineAlert.cjs +20 -20
- package/dist/InlineAlert.css +31 -31
- package/dist/InlineAlert.mjs +20 -20
- package/dist/Link.css +1 -1
- package/dist/Menu.cjs +1 -1
- package/dist/Menu.css +2 -2
- package/dist/Menu.mjs +1 -1
- package/dist/Meter.cjs +6 -6
- package/dist/Meter.css +11 -11
- package/dist/Meter.mjs +6 -6
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.css +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/Picker.css +2 -2
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.css +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/ProgressBar.css +2 -2
- package/dist/Provider.cjs +1 -1
- package/dist/Provider.css +1 -1
- package/dist/Provider.mjs +1 -1
- package/dist/Radio.css +1 -1
- package/dist/{MoveHorizontalCircleTableWidget.cjs → S2_MoveHorizontalTableWidget.cjs} +7 -7
- package/dist/S2_MoveHorizontalTableWidget.cjs.map +1 -0
- package/dist/{MoveHorizontalCircleTableWidget.mjs → S2_MoveHorizontalTableWidget.mjs} +7 -7
- package/dist/S2_MoveHorizontalTableWidget.mjs.map +1 -0
- package/dist/SegmentedControl.css +1 -1
- package/dist/Slider.css +1 -1
- package/dist/StatusLight.cjs +15 -15
- package/dist/StatusLight.css +20 -20
- package/dist/StatusLight.mjs +15 -15
- package/dist/Switch.css +1 -1
- package/dist/TableView.cjs +7 -9
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +11 -20
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +7 -9
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.css +1 -1
- package/dist/TagGroup.css +3 -3
- package/dist/Tooltip.cjs +1 -1
- package/dist/Tooltip.css +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +18 -18
- package/src/Badge.tsx +30 -30
- package/src/TableView.tsx +5 -10
- package/style/dist/spectrum-theme.cjs +112 -92
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +112 -92
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +1 -1
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +25 -5
- package/dist/MoveHorizontalCircleTableWidget.cjs.map +0 -1
- package/dist/MoveHorizontalCircleTableWidget.mjs.map +0 -1
package/dist/ActionButton.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.dx {
|
|
11
|
-
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #
|
|
11
|
+
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.dc {
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
.b_____E {
|
|
186
|
-
background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #
|
|
186
|
+
background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #4069fd);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
.b_____F {
|
|
190
|
-
background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #
|
|
190
|
+
background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
.bg {
|
package/dist/AlertDialog.css
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.-rwx0fg_e-e {
|
|
11
|
-
--iconPrimary: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #
|
|
11
|
+
--iconPrimary: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #fc432e);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.-rwx0fg_e-g {
|
|
15
|
-
--iconPrimary: var(--lightningcss-light, #
|
|
15
|
+
--iconPrimary: var(--lightningcss-light, #d45b00) var(--lightningcss-dark, #e06400);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
package/dist/Badge.cjs
CHANGED
|
@@ -101,69 +101,69 @@ const $660a621e3a266afc$var$badge = function anonymous(props, overrides) {
|
|
|
101
101
|
rules += ' -oelgqu_A--177861o';
|
|
102
102
|
rules += ' jbH';
|
|
103
103
|
rules += ' jG';
|
|
104
|
-
if (props.fillStyle === "outline") rules += '
|
|
104
|
+
if (props.fillStyle === "outline") rules += ' b______k';
|
|
105
105
|
else if (props.fillStyle === "subtle") {
|
|
106
|
-
if (props.variant === "silver") rules += '
|
|
107
|
-
else if (props.variant === "cinnamon") rules += '
|
|
108
|
-
else if (props.variant === "brown") rules += '
|
|
109
|
-
else if (props.variant === "turquoise") rules += '
|
|
110
|
-
else if (props.variant === "pink") rules += '
|
|
111
|
-
else if (props.variant === "magenta") rules += '
|
|
112
|
-
else if (props.variant === "fuchsia") rules += '
|
|
113
|
-
else if (props.variant === "purple") rules += '
|
|
114
|
-
else if (props.variant === "indigo") rules += '
|
|
115
|
-
else if (props.variant === "blue") rules += '
|
|
116
|
-
else if (props.variant === "cyan") rules += '
|
|
117
|
-
else if (props.variant === "seafoam") rules += '
|
|
118
|
-
else if (props.variant === "green") rules += '
|
|
119
|
-
else if (props.variant === "celery") rules += '
|
|
120
|
-
else if (props.variant === "charteuse") rules += '
|
|
121
|
-
else if (props.variant === "yellow") rules += '
|
|
122
|
-
else if (props.variant === "orange") rules += '
|
|
123
|
-
else if (props.variant === "red") rules += '
|
|
124
|
-
else if (props.variant === "gray") rules += '
|
|
125
|
-
else if (props.variant === "negative") rules += '
|
|
126
|
-
else if (props.variant === "notice") rules += '
|
|
127
|
-
else if (props.variant === "positive") rules += '
|
|
128
|
-
else if (props.variant === "neutral") rules += '
|
|
129
|
-
else if (props.variant === "informative") rules += '
|
|
130
|
-
else if (props.variant === "accent") rules += '
|
|
106
|
+
if (props.variant === "silver") rules += ' b______j';
|
|
107
|
+
else if (props.variant === "cinnamon") rules += ' b______f';
|
|
108
|
+
else if (props.variant === "brown") rules += ' b______h';
|
|
109
|
+
else if (props.variant === "turquoise") rules += ' b______d';
|
|
110
|
+
else if (props.variant === "pink") rules += ' b______b';
|
|
111
|
+
else if (props.variant === "magenta") rules += ' b_____9';
|
|
112
|
+
else if (props.variant === "fuchsia") rules += ' b_____7';
|
|
113
|
+
else if (props.variant === "purple") rules += ' b_____5';
|
|
114
|
+
else if (props.variant === "indigo") rules += ' b_____3';
|
|
115
|
+
else if (props.variant === "blue") rules += ' b_____G';
|
|
116
|
+
else if (props.variant === "cyan") rules += ' b_____1';
|
|
117
|
+
else if (props.variant === "seafoam") rules += ' b_____Z';
|
|
118
|
+
else if (props.variant === "green") rules += ' b_____P';
|
|
119
|
+
else if (props.variant === "celery") rules += ' b_____X';
|
|
120
|
+
else if (props.variant === "charteuse") rules += ' b_____V';
|
|
121
|
+
else if (props.variant === "yellow") rules += ' b_____T';
|
|
122
|
+
else if (props.variant === "orange") rules += ' b_____R';
|
|
123
|
+
else if (props.variant === "red") rules += ' b_____M';
|
|
124
|
+
else if (props.variant === "gray") rules += ' b_____J';
|
|
125
|
+
else if (props.variant === "negative") rules += ' b_____M';
|
|
126
|
+
else if (props.variant === "notice") rules += ' b_____R';
|
|
127
|
+
else if (props.variant === "positive") rules += ' b_____P';
|
|
128
|
+
else if (props.variant === "neutral") rules += ' b_____J';
|
|
129
|
+
else if (props.variant === "informative") rules += ' b_____G';
|
|
130
|
+
else if (props.variant === "accent") rules += ' b_____G';
|
|
131
131
|
} else if (props.fillStyle === "bold") {
|
|
132
|
-
if (props.variant === "silver") rules += '
|
|
133
|
-
else if (props.variant === "cinnamon") rules += '
|
|
134
|
-
else if (props.variant === "brown") rules += '
|
|
135
|
-
else if (props.variant === "turquoise") rules += '
|
|
136
|
-
else if (props.variant === "pink") rules += '
|
|
137
|
-
else if (props.variant === "magenta") rules += '
|
|
138
|
-
else if (props.variant === "fuchsia") rules += '
|
|
139
|
-
else if (props.variant === "purple") rules += '
|
|
140
|
-
else if (props.variant === "indigo") rules += '
|
|
132
|
+
if (props.variant === "silver") rules += ' b______i';
|
|
133
|
+
else if (props.variant === "cinnamon") rules += ' b______e';
|
|
134
|
+
else if (props.variant === "brown") rules += ' b______g';
|
|
135
|
+
else if (props.variant === "turquoise") rules += ' b______c';
|
|
136
|
+
else if (props.variant === "pink") rules += ' b______a';
|
|
137
|
+
else if (props.variant === "magenta") rules += ' b_____8';
|
|
138
|
+
else if (props.variant === "fuchsia") rules += ' b_____6';
|
|
139
|
+
else if (props.variant === "purple") rules += ' b_____4';
|
|
140
|
+
else if (props.variant === "indigo") rules += ' b_____2';
|
|
141
141
|
else if (props.variant === "blue") rules += ' b_____E';
|
|
142
|
-
else if (props.variant === "cyan") rules += '
|
|
143
|
-
else if (props.variant === "seafoam") rules += '
|
|
144
|
-
else if (props.variant === "green") rules += '
|
|
145
|
-
else if (props.variant === "celery") rules += '
|
|
146
|
-
else if (props.variant === "charteuse") rules += '
|
|
147
|
-
else if (props.variant === "yellow") rules += '
|
|
148
|
-
else if (props.variant === "orange") rules += '
|
|
149
|
-
else if (props.variant === "red") rules += '
|
|
150
|
-
else if (props.variant === "gray") rules += '
|
|
142
|
+
else if (props.variant === "cyan") rules += ' b_____0';
|
|
143
|
+
else if (props.variant === "seafoam") rules += ' b_____Y';
|
|
144
|
+
else if (props.variant === "green") rules += ' b_____N';
|
|
145
|
+
else if (props.variant === "celery") rules += ' b_____W';
|
|
146
|
+
else if (props.variant === "charteuse") rules += ' b_____U';
|
|
147
|
+
else if (props.variant === "yellow") rules += ' b_____S';
|
|
148
|
+
else if (props.variant === "orange") rules += ' b_____Q';
|
|
149
|
+
else if (props.variant === "red") rules += ' b_____K';
|
|
150
|
+
else if (props.variant === "gray") rules += ' b_____H';
|
|
151
151
|
else if (props.variant === "negative") {
|
|
152
|
-
if (props.isPressed) rules += ' b_____J';
|
|
153
|
-
else if (props.isFocusVisible) rules += ' b_____J';
|
|
154
|
-
else if (props.isHovered) rules += ' b_____J';
|
|
155
|
-
else rules += ' b_____I';
|
|
156
|
-
} else if (props.variant === "notice") rules += ' b_____M';
|
|
157
|
-
else if (props.variant === "positive") {
|
|
158
152
|
if (props.isPressed) rules += ' b_____L';
|
|
159
153
|
else if (props.isFocusVisible) rules += ' b_____L';
|
|
160
154
|
else if (props.isHovered) rules += ' b_____L';
|
|
161
155
|
else rules += ' b_____K';
|
|
156
|
+
} else if (props.variant === "notice") rules += ' b_____Q';
|
|
157
|
+
else if (props.variant === "positive") {
|
|
158
|
+
if (props.isPressed) rules += ' b_____O';
|
|
159
|
+
else if (props.isFocusVisible) rules += ' b_____O';
|
|
160
|
+
else if (props.isHovered) rules += ' b_____O';
|
|
161
|
+
else rules += ' b_____N';
|
|
162
162
|
} else if (props.variant === "neutral") {
|
|
163
|
-
if (props.isPressed) rules += '
|
|
164
|
-
else if (props.isFocusVisible) rules += '
|
|
165
|
-
else if (props.isHovered) rules += '
|
|
166
|
-
else rules += '
|
|
163
|
+
if (props.isPressed) rules += ' b_____I';
|
|
164
|
+
else if (props.isFocusVisible) rules += ' b_____I';
|
|
165
|
+
else if (props.isHovered) rules += ' b_____I';
|
|
166
|
+
else rules += ' b_____H';
|
|
167
167
|
} else if (props.variant === "informative") {
|
|
168
168
|
if (props.isPressed) rules += ' b_____F';
|
|
169
169
|
else if (props.isFocusVisible) rules += ' b_____F';
|
|
@@ -183,12 +183,12 @@ const $660a621e3a266afc$var$badge = function anonymous(props, overrides) {
|
|
|
183
183
|
rules += ' sc';
|
|
184
184
|
rules += ' tc';
|
|
185
185
|
if (props.fillStyle === "outline") {
|
|
186
|
-
if (props.variant === "negative") rules += '
|
|
187
|
-
else if (props.variant === "notice") rules += '
|
|
188
|
-
else if (props.variant === "positive") rules += '
|
|
189
|
-
else if (props.variant === "neutral") rules += '
|
|
190
|
-
else if (props.variant === "informative") rules += '
|
|
191
|
-
else if (props.variant === "accent") rules += '
|
|
186
|
+
if (props.variant === "negative") rules += ' c-awl6xt';
|
|
187
|
+
else if (props.variant === "notice") rules += ' c-1c1g5qb';
|
|
188
|
+
else if (props.variant === "positive") rules += ' c-32o7sp';
|
|
189
|
+
else if (props.variant === "neutral") rules += ' c-lj7qwa';
|
|
190
|
+
else if (props.variant === "informative") rules += ' c-1n5lxsq';
|
|
191
|
+
else if (props.variant === "accent") rules += ' c-1n5lxsq';
|
|
192
192
|
} else rules += ' ca';
|
|
193
193
|
rules += ' -rwx0fg_e-b';
|
|
194
194
|
if (props.size === "XL") {
|
package/dist/Badge.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA0CM,MAAM,0DAAe,CAAA,GAAA,0BAAY,EAAkE;AAE1G,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiIN,SAAS,4BAAM,KAAiB,EAAE,GAA2B;IAC3D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAAQ,WACR,UAAU,iBACV,OAAO,gBACP,YAAY,QACZ,GAAG,YACJ,GAAG,OAAO,gCAAgC;IAC3C,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,gCAAC,CAAA,GAAA,mCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBAAC,MAAM;gBAA+C;aAAE;YACtE;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBACZ,QAAQ,CAAA,GAAA,wCAAa,EAAE;wBAAC,MAAM;wBAAQ,MAAM;oBAAmB;oBAC/D,MAAM;gBACR;aAAE;SACH;kBACD,cAAA,gCAAC,CAAA,GAAA,yCAAc;sBACb,cAAA,gCAAC;gBACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;gBAC9B,MAAK;gBACL,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,4BAAM;6BAAC;0BAAS;+BAAM;gBAAS,GAAG,MAAM,MAAM;gBAC1F,OAAO,MAAM,YAAY;gBACzB,KAAK;0BAEH,OAAO,aAAa,YAAY,2BAC5B,gCAAC,CAAA,GAAA,8BAAG;8BAAG;qBACP;;;;AAMhB;AAEA;;CAEC,GACD,IAAI,0DAAS,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Badge.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 {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {centerBaseline} from './CenterBaseline';\nimport {centerPadding, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport React, {createContext, forwardRef, ReactNode} from 'react';\nimport {SkeletonWrapper} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface BadgeStyleProps {\n /**\n * The size of the badge.\n
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA0CM,MAAM,0DAAe,CAAA,GAAA,0BAAY,EAAkE;AAE1G,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiIN,SAAS,4BAAM,KAAiB,EAAE,GAA2B;IAC3D,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAAQ,WACR,UAAU,iBACV,OAAO,gBACP,YAAY,QACZ,GAAG,YACJ,GAAG,OAAO,gCAAgC;IAC3C,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,aAAa,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,KAAK,CAAC,CAAA,IAAK,eAAC,CAAA,GAAA,sCAAI,EAAE,cAAc,CAAC;IAEzF,qBACE,gCAAC,CAAA,GAAA,mCAAO;QACN,QAAQ;YACN;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBAAC,MAAM;gBAA+C;aAAE;YACtE;gBAAC,CAAA,GAAA,qCAAU;gBAAG;oBACZ,QAAQ,CAAA,GAAA,wCAAa,EAAE;wBAAC,MAAM;wBAAQ,MAAM;oBAAmB;oBAC/D,MAAM;gBACR;aAAE;SACH;kBACD,cAAA,gCAAC,CAAA,GAAA,yCAAc;sBACb,cAAA,gCAAC;gBACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;gBAC9B,MAAK;gBACL,WAAW,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,4BAAM;6BAAC;0BAAS;+BAAM;gBAAS,GAAG,MAAM,MAAM;gBAC1F,OAAO,MAAM,YAAY;gBACzB,KAAK;0BAEH,OAAO,aAAa,YAAY,2BAC5B,gCAAC,CAAA,GAAA,8BAAG;8BAAG;qBACP;;;;AAMhB;AAEA;;CAEC,GACD,IAAI,0DAAS,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Badge.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 {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {centerBaseline} from './CenterBaseline';\nimport {centerPadding, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {fontRelative, lightDark, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport React, {createContext, forwardRef, ReactNode} from 'react';\nimport {SkeletonWrapper} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface BadgeStyleProps {\n /**\n * The size of the badge.\n *\n * @default 'S'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The variant changes the background color of the badge. When badge has a semantic meaning, they should use the variant for semantic colors.\n *\n * @default 'neutral'\n */\n variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'charteuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver',\n /**\n * The fill of the badge.\n * @default 'bold'\n */\n fillStyle?: 'bold' | 'subtle' | 'outline'\n}\n\nexport interface BadgeProps extends DOMProps, AriaLabelingProps, StyleProps, BadgeStyleProps, SlotProps {\n /**\n * The content to display in the badge.\n */\n children: ReactNode\n}\n\nexport const BadgeContext = createContext<ContextValue<Partial<BadgeProps>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst badge = style<BadgeStyleProps>({\n display: 'flex',\n font: 'control',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 'control',\n minHeight: 'control',\n paddingX: {\n default: 'edge-to-text',\n ':has([slot=icon]:only-child)': 0\n },\n '--labelPadding': {\n type: 'paddingTop',\n value: centerPadding()\n },\n aspectRatio: {\n ':has([slot=icon]:only-child)': 'square'\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n ':has([slot=icon]:only-child)': 0\n }\n },\n columnGap: 'text-to-visual',\n color: {\n fillStyle: {\n bold: {\n default: 'white',\n variant: {\n notice: 'black',\n orange: 'black',\n yellow: 'black',\n charteuse: 'black',\n celery: 'black'\n }\n },\n subtle: 'gray-1000',\n outline: 'gray-1000'\n }\n },\n backgroundColor: {\n fillStyle: {\n bold: {\n variant: {\n accent: 'accent',\n informative: 'informative',\n neutral: 'neutral-subdued',\n positive: 'positive',\n notice: 'notice',\n negative: 'negative',\n gray: 'gray',\n red: 'red',\n orange: 'orange',\n yellow: 'yellow',\n charteuse: 'chartreuse',\n celery: 'celery',\n green: 'green',\n seafoam: 'seafoam',\n cyan: 'cyan',\n blue: 'blue',\n indigo: 'indigo',\n purple: 'purple',\n fuchsia: 'fuchsia',\n magenta: 'magenta',\n pink: 'pink',\n turquoise: 'turquoise',\n brown: 'brown',\n cinnamon: 'cinnamon',\n silver: 'silver'\n }\n },\n subtle: {\n variant: {\n accent: 'accent-subtle',\n informative: 'informative-subtle',\n neutral: 'neutral-subtle',\n positive: 'positive-subtle',\n notice: 'notice-subtle',\n negative: 'negative-subtle',\n gray: 'gray-subtle',\n red: 'red-subtle',\n orange: 'orange-subtle',\n yellow: 'yellow-subtle',\n charteuse: 'chartreuse-subtle',\n celery: 'celery-subtle',\n green: 'green-subtle',\n seafoam: 'seafoam-subtle',\n cyan: 'cyan-subtle',\n blue: 'blue-subtle',\n indigo: 'indigo-subtle',\n purple: 'purple-subtle',\n fuchsia: 'fuchsia-subtle',\n magenta: 'magenta-subtle',\n pink: 'pink-subtle',\n turquoise: 'turquoise-subtle',\n brown: 'brown-subtle',\n cinnamon: 'cinnamon-subtle',\n silver: 'silver-subtle'\n }\n },\n outline: 'layer-2'\n }\n },\n borderStyle: 'solid',\n boxSizing: 'border-box',\n borderWidth: 2,\n borderColor: {\n default: 'transparent',\n fillStyle: {\n outline: {\n variant: {\n accent: lightDark('accent-800', 'accent-900'), // accent-visual-color\n informative: lightDark('informative-800', 'informative-900'), // informative-visual-color\n neutral: lightDark('gray-500', 'gray-600'), // neutral-visual-color\n positive: lightDark('positive-800', 'positive-900'), // positive-visual-color\n notice: lightDark('notice-800', 'notice-900'), // notice-visual-color\n negative: lightDark('negative-800', 'negative-900') // negative-visual-color\n }\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n}, getAllowedOverrides());\n\nfunction Badge(props: BadgeProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, BadgeContext);\n let {\n children,\n variant = 'neutral',\n size = 'S',\n fillStyle = 'bold',\n ...otherProps\n } = props; // useProviderProps(props) in v3\n let domRef = useDOMRef(ref);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <Provider\n values={[\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n <SkeletonWrapper>\n <span\n {...filterDOMProps(otherProps)}\n role=\"presentation\"\n className={(props.UNSAFE_className || '') + badge({variant, size, fillStyle}, props.styles)}\n style={props.UNSAFE_style}\n ref={domRef}>\n {\n typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children\n }\n </span>\n </SkeletonWrapper>\n </Provider>\n );\n}\n\n/**\n * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.\n */\nlet _Badge = forwardRef(Badge);\nexport {_Badge as Badge};\n"],"names":[],"version":3,"file":"Badge.cjs.map"}
|
package/dist/Badge.css
CHANGED
|
@@ -98,175 +98,175 @@
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.b_____F {
|
|
101
|
-
background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #
|
|
101
|
+
background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
104
|
+
.b_____I {
|
|
105
105
|
background-color: var(--lightningcss-light, #292929) var(--lightningcss-dark, #444);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.
|
|
109
|
-
background-color: var(--lightningcss-light, #036e45) var(--lightningcss-dark, #
|
|
108
|
+
.b_____O {
|
|
109
|
+
background-color: var(--lightningcss-light, #036e45) var(--lightningcss-dark, #047c4b);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
.
|
|
113
|
-
background-color: var(--lightningcss-light, #b72818) var(--lightningcss-dark, #
|
|
112
|
+
.b_____L {
|
|
113
|
+
background-color: var(--lightningcss-light, #b72818) var(--lightningcss-dark, #cd2e1d);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.
|
|
116
|
+
.b_____H {
|
|
117
117
|
background-color: var(--lightningcss-light, #505050) var(--lightningcss-dark, #6d6d6d);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.
|
|
121
|
-
background-color: var(--lightningcss-light, #d73220) var(--lightningcss-dark, #
|
|
120
|
+
.b_____K {
|
|
121
|
+
background-color: var(--lightningcss-light, #d73220) var(--lightningcss-dark, #df3422);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.
|
|
124
|
+
.b_____Q {
|
|
125
125
|
background-color: var(--lightningcss-light, #fc7d00) var(--lightningcss-dark, #e06400);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
.
|
|
128
|
+
.b_____S {
|
|
129
129
|
background-color: var(--lightningcss-light, #f5c700) var(--lightningcss-dark, #da9f00);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
.
|
|
132
|
+
.b_____U {
|
|
133
133
|
background-color: var(--lightningcss-light, #a3c400) var(--lightningcss-dark, #88a400);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.
|
|
136
|
+
.b_____W {
|
|
137
137
|
background-color: var(--lightningcss-light, #5db41f) var(--lightningcss-dark, #4e9a17);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
.
|
|
141
|
-
background-color: var(--lightningcss-light, #05834e) var(--lightningcss-dark, #
|
|
140
|
+
.b_____N {
|
|
141
|
+
background-color: var(--lightningcss-light, #05834e) var(--lightningcss-dark, #068850);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
.
|
|
145
|
-
background-color: var(--lightningcss-light, #07816d) var(--lightningcss-dark, #
|
|
144
|
+
.b_____Y {
|
|
145
|
+
background-color: var(--lightningcss-light, #07816d) var(--lightningcss-dark, #088670);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
.
|
|
149
|
-
background-color: var(--lightningcss-light, #0b78b3) var(--lightningcss-dark, #
|
|
148
|
+
.b_____0 {
|
|
149
|
+
background-color: var(--lightningcss-light, #0b78b3) var(--lightningcss-dark, #0d7dba);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
.b_____E {
|
|
153
|
-
background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #
|
|
153
|
+
background-color: var(--lightningcss-light, #3b63fb) var(--lightningcss-dark, #4069fd);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
.
|
|
157
|
-
background-color: var(--lightningcss-light, #7155fa) var(--lightningcss-dark, #
|
|
156
|
+
.b_____2 {
|
|
157
|
+
background-color: var(--lightningcss-light, #7155fa) var(--lightningcss-dark, #745bfc);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.
|
|
161
|
-
background-color: var(--lightningcss-light, #9a47e2) var(--lightningcss-dark, #
|
|
160
|
+
.b_____4 {
|
|
161
|
+
background-color: var(--lightningcss-light, #9a47e2) var(--lightningcss-dark, #9d4ee4);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.
|
|
165
|
-
background-color: var(--lightningcss-light, #b539c8) var(--lightningcss-dark, #
|
|
164
|
+
.b_____6 {
|
|
165
|
+
background-color: var(--lightningcss-light, #b539c8) var(--lightningcss-dark, #ba3cce);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
.
|
|
169
|
-
background-color: var(--lightningcss-light, #d92361) var(--lightningcss-dark, #
|
|
168
|
+
.b_____8 {
|
|
169
|
+
background-color: var(--lightningcss-light, #d92361) var(--lightningcss-dark, #e02665);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
.
|
|
173
|
-
background-color: var(--lightningcss-light, #ce2a92) var(--lightningcss-dark, #
|
|
172
|
+
.b______a {
|
|
173
|
+
background-color: var(--lightningcss-light, #ce2a92) var(--lightningcss-dark, #d52d97);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
.
|
|
177
|
-
background-color: var(--lightningcss-light, #087e89) var(--lightningcss-dark, #
|
|
176
|
+
.b______c {
|
|
177
|
+
background-color: var(--lightningcss-light, #087e89) var(--lightningcss-dark, #09838e);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.
|
|
181
|
-
background-color: var(--lightningcss-light, #8b6d42) var(--lightningcss-dark, #
|
|
180
|
+
.b______g {
|
|
181
|
+
background-color: var(--lightningcss-light, #8b6d42) var(--lightningcss-dark, #8f7245);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.
|
|
185
|
-
background-color: var(--lightningcss-light, #aa5e38) var(--lightningcss-dark, #
|
|
184
|
+
.b______e {
|
|
185
|
+
background-color: var(--lightningcss-light, #aa5e38) var(--lightningcss-dark, #b0623b);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
.
|
|
189
|
-
background-color: var(--lightningcss-light, #727272) var(--lightningcss-dark, #
|
|
188
|
+
.b______i {
|
|
189
|
+
background-color: var(--lightningcss-light, #727272) var(--lightningcss-dark, #767676);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
.
|
|
193
|
-
background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #
|
|
192
|
+
.b_____J {
|
|
193
|
+
background-color: var(--lightningcss-light, #e9e9e9) var(--lightningcss-dark, #393939);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
.
|
|
197
|
-
background-color: var(--lightningcss-light, #ffebe8) var(--lightningcss-dark, #
|
|
196
|
+
.b_____M {
|
|
197
|
+
background-color: var(--lightningcss-light, #ffebe8) var(--lightningcss-dark, #571107);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
.
|
|
201
|
-
background-color: var(--lightningcss-light, #ffeccf) var(--lightningcss-dark, #
|
|
200
|
+
.b_____R {
|
|
201
|
+
background-color: var(--lightningcss-light, #ffeccf) var(--lightningcss-dark, #501b00);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.
|
|
205
|
-
background-color: var(--lightningcss-light, #fff197) var(--lightningcss-dark, #
|
|
204
|
+
.b_____T {
|
|
205
|
+
background-color: var(--lightningcss-light, #fff197) var(--lightningcss-dark, #3d2700);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.
|
|
209
|
-
background-color: var(--lightningcss-light, #eaf6ad) var(--lightningcss-dark, #
|
|
208
|
+
.b_____V {
|
|
209
|
+
background-color: var(--lightningcss-light, #eaf6ad) var(--lightningcss-dark, #272f00);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
.
|
|
213
|
-
background-color: var(--lightningcss-light, #c5ff9c) var(--lightningcss-dark, #
|
|
212
|
+
.b_____X {
|
|
213
|
+
background-color: var(--lightningcss-light, #c5ff9c) var(--lightningcss-dark, #153301);
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
.
|
|
217
|
-
background-color: var(--lightningcss-light, #d7f7e1) var(--lightningcss-dark, #
|
|
216
|
+
.b_____P {
|
|
217
|
+
background-color: var(--lightningcss-light, #d7f7e1) var(--lightningcss-dark, #003326);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.
|
|
221
|
-
background-color: var(--lightningcss-light, #d3f6ea) var(--lightningcss-dark, #
|
|
220
|
+
.b_____Z {
|
|
221
|
+
background-color: var(--lightningcss-light, #d3f6ea) var(--lightningcss-dark, #00322c);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
.
|
|
225
|
-
background-color: var(--lightningcss-light, #d9f4fd) var(--lightningcss-dark, #
|
|
224
|
+
.b_____1 {
|
|
225
|
+
background-color: var(--lightningcss-light, #d9f4fd) var(--lightningcss-dark, #003041);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.
|
|
229
|
-
background-color: var(--lightningcss-light, #e5f0fe) var(--lightningcss-dark, #
|
|
228
|
+
.b_____G {
|
|
229
|
+
background-color: var(--lightningcss-light, #e5f0fe) var(--lightningcss-dark, #0c2175);
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
.
|
|
233
|
-
background-color: var(--lightningcss-light, #ebeeff) var(--lightningcss-dark, #
|
|
232
|
+
.b_____3 {
|
|
233
|
+
background-color: var(--lightningcss-light, #ebeeff) var(--lightningcss-dark, #2f008c);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
.
|
|
237
|
-
background-color: var(--lightningcss-light, #f4ebfc) var(--lightningcss-dark, #
|
|
236
|
+
.b_____5 {
|
|
237
|
+
background-color: var(--lightningcss-light, #f4ebfc) var(--lightningcss-dark, #40007a);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
.
|
|
241
|
-
background-color: var(--lightningcss-light, #fde9ff) var(--lightningcss-dark, #
|
|
240
|
+
.b_____7 {
|
|
241
|
+
background-color: var(--lightningcss-light, #fde9ff) var(--lightningcss-dark, #4f005f);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
.
|
|
245
|
-
background-color: var(--lightningcss-light, #ffe8f0) var(--lightningcss-dark, #
|
|
244
|
+
.b_____9 {
|
|
245
|
+
background-color: var(--lightningcss-light, #ffe8f0) var(--lightningcss-dark, #5d0022);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
.
|
|
249
|
-
background-color: var(--lightningcss-light, #ffe8f7) var(--lightningcss-dark, #
|
|
248
|
+
.b______b {
|
|
249
|
+
background-color: var(--lightningcss-light, #ffe8f7) var(--lightningcss-dark, #5a0039);
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
.
|
|
253
|
-
background-color: var(--lightningcss-light, #d1f5f5) var(--lightningcss-dark, #
|
|
252
|
+
.b______d {
|
|
253
|
+
background-color: var(--lightningcss-light, #d1f5f5) var(--lightningcss-dark, #003136);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.
|
|
257
|
-
background-color: var(--lightningcss-light, #f7eee1) var(--lightningcss-dark, #
|
|
256
|
+
.b______h {
|
|
257
|
+
background-color: var(--lightningcss-light, #f7eee1) var(--lightningcss-dark, #3a280e);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
.
|
|
261
|
-
background-color: var(--lightningcss-light, #f9ece5) var(--lightningcss-dark, #
|
|
260
|
+
.b______f {
|
|
261
|
+
background-color: var(--lightningcss-light, #f9ece5) var(--lightningcss-dark, #4f1c07);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.
|
|
265
|
-
background-color: var(--lightningcss-light, #efefef) var(--lightningcss-dark, #
|
|
264
|
+
.b______j {
|
|
265
|
+
background-color: var(--lightningcss-light, #efefef) var(--lightningcss-dark, #2c2c2c);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
.
|
|
269
|
-
background-color: var(--lightningcss-light, #fff) var(--lightningcss-dark, #
|
|
268
|
+
.b______k {
|
|
269
|
+
background-color: var(--lightningcss-light, #fff) var(--lightningcss-dark, #222);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
.wa {
|
|
@@ -297,24 +297,24 @@
|
|
|
297
297
|
border-color: #0000;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
.
|
|
301
|
-
border-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #
|
|
300
|
+
.c-1n5lxsq {
|
|
301
|
+
border-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #5681ff);
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
.
|
|
305
|
-
border-color: var(--lightningcss-light, #
|
|
304
|
+
.c-lj7qwa {
|
|
305
|
+
border-color: var(--lightningcss-light, #8f8f8f) var(--lightningcss-dark, #8a8a8a);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
.
|
|
309
|
-
border-color: var(--lightningcss-light, #
|
|
308
|
+
.c-32o7sp {
|
|
309
|
+
border-color: var(--lightningcss-light, #079355) var(--lightningcss-dark, #099d59);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
.
|
|
313
|
-
border-color: var(--lightningcss-light, #
|
|
312
|
+
.c-1c1g5qb {
|
|
313
|
+
border-color: var(--lightningcss-light, #d45b00) var(--lightningcss-dark, #e06400);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
.
|
|
317
|
-
border-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #
|
|
316
|
+
.c-awl6xt {
|
|
317
|
+
border-color: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #fc432e);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
.-rwx0fg_e-b {
|
package/dist/Badge.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACsDc;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;;;;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;;;;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;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgJiB;;;;EAAA;;;;EAAA;;;;EAEyB;;;;EACtC;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAnJJ;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAgJiB","sources":["31052c90be0d94da","packages/@react-spectrum/s2/src/Badge.tsx"],"sourcesContent":["@import \"08c4d7ffd2baa021\";\n@import \"1aad76937c73131b\";\n@import \"7989dc282effbbd8\";\n@import \"a50d3ac159f93c2b\";\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 {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {centerBaseline} from './CenterBaseline';\nimport {centerPadding, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {fontRelative, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport React, {createContext, forwardRef, ReactNode} from 'react';\nimport {SkeletonWrapper} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface BadgeStyleProps {\n /**\n * The size of the badge.\n
|
|
1
|
+
{"mappings":"ACsDc;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;;;;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;;;;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;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgJiB;;;;EAAA;;;;EAAA;;;;EAEyB;;;;EACtC;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAnJJ;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAgJiB","sources":["31052c90be0d94da","packages/@react-spectrum/s2/src/Badge.tsx"],"sourcesContent":["@import \"08c4d7ffd2baa021\";\n@import \"1aad76937c73131b\";\n@import \"7989dc282effbbd8\";\n@import \"a50d3ac159f93c2b\";\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 {AriaLabelingProps, DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {centerBaseline} from './CenterBaseline';\nimport {centerPadding, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {ContextValue, Provider, SlotProps} from 'react-aria-components';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {fontRelative, lightDark, style} from '../style' with {type: 'macro'};\nimport {IconContext} from './Icon';\nimport React, {createContext, forwardRef, ReactNode} from 'react';\nimport {SkeletonWrapper} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface BadgeStyleProps {\n /**\n * The size of the badge.\n *\n * @default 'S'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The variant changes the background color of the badge. When badge has a semantic meaning, they should use the variant for semantic colors.\n *\n * @default 'neutral'\n */\n variant?: 'accent' | 'informative' | 'neutral' | 'positive' | 'notice' | 'negative' | 'gray' | 'red' | 'orange' | 'yellow' | 'charteuse' | 'celery' | 'green' | 'seafoam' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'fuchsia' | 'magenta' | 'pink' | 'turquoise' | 'brown' | 'cinnamon' | 'silver',\n /**\n * The fill of the badge.\n * @default 'bold'\n */\n fillStyle?: 'bold' | 'subtle' | 'outline'\n}\n\nexport interface BadgeProps extends DOMProps, AriaLabelingProps, StyleProps, BadgeStyleProps, SlotProps {\n /**\n * The content to display in the badge.\n */\n children: ReactNode\n}\n\nexport const BadgeContext = createContext<ContextValue<Partial<BadgeProps>, DOMRefValue<HTMLDivElement>>>(null);\n\nconst badge = style<BadgeStyleProps>({\n display: 'flex',\n font: 'control',\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: 'control',\n minHeight: 'control',\n paddingX: {\n default: 'edge-to-text',\n ':has([slot=icon]:only-child)': 0\n },\n '--labelPadding': {\n type: 'paddingTop',\n value: centerPadding()\n },\n aspectRatio: {\n ':has([slot=icon]:only-child)': 'square'\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n ':has([slot=icon]:only-child)': 0\n }\n },\n columnGap: 'text-to-visual',\n color: {\n fillStyle: {\n bold: {\n default: 'white',\n variant: {\n notice: 'black',\n orange: 'black',\n yellow: 'black',\n charteuse: 'black',\n celery: 'black'\n }\n },\n subtle: 'gray-1000',\n outline: 'gray-1000'\n }\n },\n backgroundColor: {\n fillStyle: {\n bold: {\n variant: {\n accent: 'accent',\n informative: 'informative',\n neutral: 'neutral-subdued',\n positive: 'positive',\n notice: 'notice',\n negative: 'negative',\n gray: 'gray',\n red: 'red',\n orange: 'orange',\n yellow: 'yellow',\n charteuse: 'chartreuse',\n celery: 'celery',\n green: 'green',\n seafoam: 'seafoam',\n cyan: 'cyan',\n blue: 'blue',\n indigo: 'indigo',\n purple: 'purple',\n fuchsia: 'fuchsia',\n magenta: 'magenta',\n pink: 'pink',\n turquoise: 'turquoise',\n brown: 'brown',\n cinnamon: 'cinnamon',\n silver: 'silver'\n }\n },\n subtle: {\n variant: {\n accent: 'accent-subtle',\n informative: 'informative-subtle',\n neutral: 'neutral-subtle',\n positive: 'positive-subtle',\n notice: 'notice-subtle',\n negative: 'negative-subtle',\n gray: 'gray-subtle',\n red: 'red-subtle',\n orange: 'orange-subtle',\n yellow: 'yellow-subtle',\n charteuse: 'chartreuse-subtle',\n celery: 'celery-subtle',\n green: 'green-subtle',\n seafoam: 'seafoam-subtle',\n cyan: 'cyan-subtle',\n blue: 'blue-subtle',\n indigo: 'indigo-subtle',\n purple: 'purple-subtle',\n fuchsia: 'fuchsia-subtle',\n magenta: 'magenta-subtle',\n pink: 'pink-subtle',\n turquoise: 'turquoise-subtle',\n brown: 'brown-subtle',\n cinnamon: 'cinnamon-subtle',\n silver: 'silver-subtle'\n }\n },\n outline: 'layer-2'\n }\n },\n borderStyle: 'solid',\n boxSizing: 'border-box',\n borderWidth: 2,\n borderColor: {\n default: 'transparent',\n fillStyle: {\n outline: {\n variant: {\n accent: lightDark('accent-800', 'accent-900'), // accent-visual-color\n informative: lightDark('informative-800', 'informative-900'), // informative-visual-color\n neutral: lightDark('gray-500', 'gray-600'), // neutral-visual-color\n positive: lightDark('positive-800', 'positive-900'), // positive-visual-color\n notice: lightDark('notice-800', 'notice-900'), // notice-visual-color\n negative: lightDark('negative-800', 'negative-900') // negative-visual-color\n }\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n}, getAllowedOverrides());\n\nfunction Badge(props: BadgeProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, BadgeContext);\n let {\n children,\n variant = 'neutral',\n size = 'S',\n fillStyle = 'bold',\n ...otherProps\n } = props; // useProviderProps(props) in v3\n let domRef = useDOMRef(ref);\n let isTextOnly = React.Children.toArray(props.children).every(c => !React.isValidElement(c));\n\n return (\n <Provider\n values={[\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }]\n ]}>\n <SkeletonWrapper>\n <span\n {...filterDOMProps(otherProps)}\n role=\"presentation\"\n className={(props.UNSAFE_className || '') + badge({variant, size, fillStyle}, props.styles)}\n style={props.UNSAFE_style}\n ref={domRef}>\n {\n typeof children === 'string' || isTextOnly\n ? <Text>{children}</Text>\n : children\n }\n </span>\n </SkeletonWrapper>\n </Provider>\n );\n}\n\n/**\n * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.\n */\nlet _Badge = forwardRef(Badge);\nexport {_Badge as Badge};\n"],"names":[],"version":3,"file":"Badge.css.map"}
|