@react-spectrum/s2 3.0.0-nightly-4baa1b08e-241029 → 3.0.0-nightly-dcc0752f8-241031
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 +10 -32
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +20 -60
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +10 -32
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/Avatar.cjs +2 -4
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css +4 -16
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs +2 -4
- package/dist/Avatar.mjs.map +1 -1
- package/dist/Badge.cjs +5 -16
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +10 -30
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +5 -16
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +12 -41
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +38 -86
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +12 -41
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +19 -59
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +37 -113
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +19 -59
- package/dist/Button.mjs.map +1 -1
- package/dist/Card.cjs +27 -67
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +42 -117
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +27 -67
- package/dist/Card.mjs.map +1 -1
- package/dist/Checkbox.cjs +9 -27
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +17 -49
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +9 -27
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +5 -16
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +10 -30
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +5 -16
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/ClearButton.cjs +6 -17
- package/dist/ClearButton.cjs.map +1 -1
- package/dist/ClearButton.css +11 -35
- package/dist/ClearButton.css.map +1 -1
- package/dist/ClearButton.mjs +6 -17
- package/dist/ClearButton.mjs.map +1 -1
- package/dist/CloseButton.cjs +10 -32
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css +20 -64
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs +10 -32
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs +4 -16
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +8 -28
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +4 -16
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +5 -16
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +10 -30
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +5 -16
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +5 -15
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +10 -30
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +5 -15
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +6 -17
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +34 -50
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +6 -17
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +8 -26
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +16 -52
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +8 -26
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +6 -16
- package/dist/ColorSwatchPicker.cjs.map +1 -1
- package/dist/ColorSwatchPicker.css +8 -28
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +6 -16
- package/dist/ColorSwatchPicker.mjs.map +1 -1
- package/dist/ComboBox.cjs +23 -72
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +64 -152
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +24 -73
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +1 -1
- package/dist/ContextualHelp.css +2 -6
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs +1 -1
- package/dist/Dialog.cjs +2 -2
- package/dist/Dialog.css +2 -2
- package/dist/Dialog.mjs +2 -2
- package/dist/Disclosure.cjs +22 -61
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +47 -91
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +22 -61
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/DropZone.cjs +2 -4
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +4 -16
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +2 -4
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +16 -47
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +31 -95
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +16 -47
- package/dist/Field.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +6 -20
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css +10 -24
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs +6 -20
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs +2 -2
- package/dist/Image.css +2 -2
- package/dist/Image.mjs +2 -2
- package/dist/InlineAlert.cjs +2 -5
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +11 -15
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +2 -5
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Menu.cjs +23 -68
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +32 -96
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +24 -69
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +22 -68
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +63 -139
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +22 -68
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +2 -2
- package/dist/Modal.css +2 -2
- package/dist/Modal.mjs +2 -2
- package/dist/NumberField.cjs +23 -71
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +63 -146
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +23 -71
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +24 -68
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +50 -130
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +25 -69
- package/dist/Picker.mjs.map +1 -1
- package/dist/ProgressBar.cjs +23 -69
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +64 -140
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +23 -69
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +6 -20
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +12 -40
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +6 -20
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.css +7 -0
- package/dist/Provider.css.map +1 -1
- package/dist/Radio.cjs +8 -26
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +16 -48
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +8 -26
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +5 -16
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +10 -30
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +5 -16
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/SearchField.cjs +5 -16
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +10 -30
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +5 -16
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +8 -14
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +9 -29
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +8 -14
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +63 -196
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +61 -181
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +63 -196
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +9 -27
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css +17 -49
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs +9 -27
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs +6 -15
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +10 -26
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +6 -15
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +42 -86
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +65 -129
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +42 -86
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +4 -15
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +18 -34
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +4 -15
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TagGroup.cjs +14 -37
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +23 -67
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +14 -37
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +11 -34
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +22 -66
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +11 -34
- package/dist/TextField.mjs.map +1 -1
- package/dist/Tooltip.cjs +2 -4
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +4 -12
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +2 -4
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +17 -17
- package/page.css +7 -0
- package/src/ComboBox.tsx +3 -3
- package/src/Menu.tsx +5 -5
- package/src/Picker.tsx +3 -3
- package/src/page.macro.ts +11 -0
- package/style/dist/spectrum-theme.cjs +2 -8
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +2 -8
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +1 -4
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +4 -4
package/dist/Card.cjs
CHANGED
|
@@ -132,25 +132,14 @@ let $230078a1c4ce81d8$var$card = function anonymous(props, overrides) {
|
|
|
132
132
|
if (props.isCardView) rules += ' __Da';
|
|
133
133
|
if (props.isLink) rules += ' __Hc';
|
|
134
134
|
if (!$l) {
|
|
135
|
-
if (props.isCardView) rules += '
|
|
136
|
-
else if (props.size === "XL")
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
rules += ' lX';
|
|
142
|
-
} else if (props.size === "M") {
|
|
143
|
-
rules += ' lbV';
|
|
144
|
-
rules += ' lQ';
|
|
145
|
-
} else if (props.size === "S") {
|
|
146
|
-
rules += ' lbQ';
|
|
147
|
-
rules += ' lP';
|
|
148
|
-
} else if (props.size === "XS") {
|
|
149
|
-
rules += ' lbH';
|
|
150
|
-
rules += ' lG';
|
|
151
|
-
}
|
|
135
|
+
if (props.isCardView) rules += ' lG';
|
|
136
|
+
else if (props.size === "XL") rules += ' l-yr8gfg';
|
|
137
|
+
else if (props.size === "L") rules += ' lD';
|
|
138
|
+
else if (props.size === "M") rules += ' lA';
|
|
139
|
+
else if (props.size === "S") rules += ' lx';
|
|
140
|
+
else if (props.size === "XS") rules += ' ls';
|
|
152
141
|
}
|
|
153
|
-
rules += '
|
|
142
|
+
rules += ' kG';
|
|
154
143
|
if (props.density === "spacious") {
|
|
155
144
|
if (props.size === "XL") rules += ' -nxovgr_E-i';
|
|
156
145
|
else if (props.size === "L") rules += ' -nxovgr_E-h';
|
|
@@ -168,10 +157,7 @@ let $230078a1c4ce81d8$var$card = function anonymous(props, overrides) {
|
|
|
168
157
|
else if (props.size === "L") rules += ' -nxovgr_E-f';
|
|
169
158
|
else if (props.size === "M") rules += ' -nxovgr_E-e';
|
|
170
159
|
else if (props.size === "S") rules += ' -nxovgr_E-d';
|
|
171
|
-
else if (props.size === "XS")
|
|
172
|
-
rules += ' -nxovgr_E-b-1aa9md1';
|
|
173
|
-
rules += ' -nxovgr_E--6njx2e';
|
|
174
|
-
}
|
|
160
|
+
else if (props.size === "XS") rules += ' -nxovgr_E--ve8p9e';
|
|
175
161
|
}
|
|
176
162
|
if (props.variant === "quiet") rules += ' -_1bqkh6r_E-a';
|
|
177
163
|
else rules += ' -_1bqkh6r_E--nxovgr';
|
|
@@ -276,7 +262,7 @@ let $230078a1c4ce81d8$var$preview = function anonymous(props) {
|
|
|
276
262
|
rules += ' _M-3t1z';
|
|
277
263
|
return rules;
|
|
278
264
|
};
|
|
279
|
-
const $230078a1c4ce81d8$var$image = " .
|
|
265
|
+
const $230078a1c4ce81d8$var$image = " . lG _b-375yqh __Nb __Da __Ba";
|
|
280
266
|
let $230078a1c4ce81d8$var$title = function anonymous(props) {
|
|
281
267
|
let rules = " .";
|
|
282
268
|
rules += ' _c-bc1l9oh';
|
|
@@ -364,13 +350,9 @@ let $230078a1c4ce81d8$var$content = function anonymous(props) {
|
|
|
364
350
|
rules += ' _1d';
|
|
365
351
|
rules += ' _0e';
|
|
366
352
|
if (props.size === "XL") rules += ' id';
|
|
367
|
-
else if (props.size === "L")
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
} else if (props.size === "M") {
|
|
371
|
-
rules += ' ib-1aa9md1';
|
|
372
|
-
rules += ' i-6njx2e';
|
|
373
|
-
} else if (props.size === "S") rules += ' ic';
|
|
353
|
+
else if (props.size === "L") rules += ' i-ve8p9e';
|
|
354
|
+
else if (props.size === "M") rules += ' i-ve8p9e';
|
|
355
|
+
else if (props.size === "S") rules += ' ic';
|
|
374
356
|
else if (props.size === "XS") rules += ' ic';
|
|
375
357
|
rules += ' E-13alit4a';
|
|
376
358
|
rules += ' E-nxovgr';
|
|
@@ -598,7 +580,7 @@ const $230078a1c4ce81d8$var$collection = function anonymous(props) {
|
|
|
598
580
|
else rules += ' jc';
|
|
599
581
|
return rules;
|
|
600
582
|
};
|
|
601
|
-
const $230078a1c4ce81d8$var$collectionImage = " .
|
|
583
|
+
const $230078a1c4ce81d8$var$collectionImage = " . lG _bb _b-7ptyxf-375yqh __b-7ptyxf-7u9dhm __Nb __Ba __Da";
|
|
602
584
|
const $230078a1c4ce81d8$export$c368ea3e577b1b86 = /*#__PURE__*/ (0, $1B7TP$react.forwardRef)(function CollectionCardPreview(props, ref) {
|
|
603
585
|
let { size: size } = (0, $1B7TP$react.useContext)($230078a1c4ce81d8$var$InternalCardContext);
|
|
604
586
|
return /*#__PURE__*/ (0, $1B7TP$reactjsxruntime.jsx)($230078a1c4ce81d8$export$115f017852a4bb7c, {
|
|
@@ -628,7 +610,7 @@ const $230078a1c4ce81d8$export$eff93e4e59ccc3b8 = /*#__PURE__*/ (0, $1B7TP$react
|
|
|
628
610
|
(0, $053b76ed3d29e13b$exports.ImageContext),
|
|
629
611
|
{
|
|
630
612
|
alt: '',
|
|
631
|
-
styles: " .
|
|
613
|
+
styles: " . lG _bb __Na __Ba __Da"
|
|
632
614
|
}
|
|
633
615
|
],
|
|
634
616
|
[
|
|
@@ -642,7 +624,7 @@ const $230078a1c4ce81d8$export$eff93e4e59ccc3b8 = /*#__PURE__*/ (0, $1B7TP$react
|
|
|
642
624
|
})
|
|
643
625
|
});
|
|
644
626
|
},
|
|
645
|
-
styles: " .
|
|
627
|
+
styles: " . kF rv pv l-3760fj"
|
|
646
628
|
}
|
|
647
629
|
]
|
|
648
630
|
],
|
|
@@ -669,7 +651,7 @@ const $230078a1c4ce81d8$export$78e8870b5d8ae469 = /*#__PURE__*/ (0, $1B7TP$react
|
|
|
669
651
|
(0, $053b76ed3d29e13b$exports.ImageContext),
|
|
670
652
|
{
|
|
671
653
|
alt: '',
|
|
672
|
-
styles: " .
|
|
654
|
+
styles: " . lG _b-375yqg __Nb __Ba __Da"
|
|
673
655
|
}
|
|
674
656
|
],
|
|
675
657
|
[
|
|
@@ -709,7 +691,7 @@ const $230078a1c4ce81d8$export$e6cbe35324ccf844 = /*#__PURE__*/ (0, $1B7TP$react
|
|
|
709
691
|
slots: {
|
|
710
692
|
preview: {
|
|
711
693
|
alt: '',
|
|
712
|
-
styles: " .
|
|
694
|
+
styles: " . lG _b-3760ey __Nb __Ba __Da"
|
|
713
695
|
},
|
|
714
696
|
thumbnail: {
|
|
715
697
|
alt: '',
|
|
@@ -718,22 +700,11 @@ const $230078a1c4ce81d8$export$e6cbe35324ccf844 = /*#__PURE__*/ (0, $1B7TP$react
|
|
|
718
700
|
rules += ' Uc';
|
|
719
701
|
rules += ' __Ba';
|
|
720
702
|
rules += ' __Da';
|
|
721
|
-
if (props.size === "XL")
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
rules += ' lv';
|
|
727
|
-
} else if (props.size === "M") {
|
|
728
|
-
rules += ' lbu';
|
|
729
|
-
rules += ' lr';
|
|
730
|
-
} else if (props.size === "S") {
|
|
731
|
-
rules += ' lbt';
|
|
732
|
-
rules += ' ls';
|
|
733
|
-
} else if (props.size === "XS") {
|
|
734
|
-
rules += ' lbn';
|
|
735
|
-
rules += ' lm';
|
|
736
|
-
}
|
|
703
|
+
if (props.size === "XL") rules += ' lo';
|
|
704
|
+
else if (props.size === "L") rules += ' lm';
|
|
705
|
+
else if (props.size === "M") rules += ' ll';
|
|
706
|
+
else if (props.size === "S") rules += ' lk';
|
|
707
|
+
else if (props.size === "XS") rules += ' lh';
|
|
737
708
|
rules += ' k-375toq';
|
|
738
709
|
if (props.size === "S") rules += ' _vb';
|
|
739
710
|
else if (props.size === "XS") rules += ' _vb';
|
|
@@ -754,22 +725,11 @@ const $230078a1c4ce81d8$export$e6cbe35324ccf844 = /*#__PURE__*/ (0, $1B7TP$react
|
|
|
754
725
|
if (props.size === "XS") rules += ' _Nb';
|
|
755
726
|
else rules += ' _Nc';
|
|
756
727
|
rules += ' d-1de2x0q';
|
|
757
|
-
if (props.size === "XL")
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
rules += ' -_375toq_k-v';
|
|
763
|
-
} else if (props.size === "M") {
|
|
764
|
-
rules += ' -_375toq_k-bu';
|
|
765
|
-
rules += ' -_375toq_k-r';
|
|
766
|
-
} else if (props.size === "S") {
|
|
767
|
-
rules += ' -_375toq_k-bt';
|
|
768
|
-
rules += ' -_375toq_k-s';
|
|
769
|
-
} else if (props.size === "XS") {
|
|
770
|
-
rules += ' -_375toq_k-bn';
|
|
771
|
-
rules += ' -_375toq_k-m';
|
|
772
|
-
}
|
|
728
|
+
if (props.size === "XL") rules += ' -_375toq_k-o';
|
|
729
|
+
else if (props.size === "L") rules += ' -_375toq_k-m';
|
|
730
|
+
else if (props.size === "M") rules += ' -_375toq_k-l';
|
|
731
|
+
else if (props.size === "S") rules += ' -_375toq_k-k';
|
|
732
|
+
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B;qBAAE;iBACH;0BACA;;;AAKX;AAEA,MAAM,mCAAa;IACjB,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;AACN;AAOO,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,MAAuB,EAAE,GAA2B;IAC7G,IAAI,QAAC,OAAO,KAAI,GAAG;IACnB,qBACE,gCAAC;QAAM,GAAG,MAAK;QAAE,KAAK;QAAK,SAAQ;kBAChC,CAAA,GAAA,6CAAiB,EAAE,OAAM,QAAQ,EAAE,CAAA,yBAClC,gCAAC,CAAA,GAAA,mCAAO;gBACN,QAAQ;oBACN;wBAAC,CAAA,GAAA,sCAAW;wBAAG;4BACb,OAAO;gCACL,SAAS;oCACP,KAAK;oCACL,MAAM;gCAOR;gCACA,WAAW;oCACT,KAAK;oCACL,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAiCL;8CAAC;oCAAI;gCACV;4BACF;wBACF;qBAAE;oBACF;wBAAC,CAAA,GAAA,uCAAY;wBAAG;4BACd,QAAQ,CAAA,GAAA,qCAAU,EAAE;wBAGtB;qBAAE;oBACF;wBAAC,CAAA,GAAA,uCAAY;wBAAG;4BAAC,MAAM,gCAAU,CAAC,KAAK;wBAAA;qBAAE;oBACzC;wBAAC,CAAA,GAAA,2CAAgB;wBAAG;4BAAC,MAAM,gCAAU,CAAC,KAAK;wBAAA;qBAAE;iBAC9C;0BACA;;;AAKX","sources":["packages/@react-spectrum/s2/src/Card.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 {ActionMenuContext} from './ActionMenu';\nimport {AvatarContext} from './Avatar';\nimport {ButtonContext, LinkButtonContext} from './Button';\nimport {Checkbox} from './Checkbox';\nimport {colorToken} from '../style/tokens' with {type: 'macro'};\nimport {composeRenderProps, ContextValue, DEFAULT_SLOT, type GridListItem, GridListItemProps, Provider} from 'react-aria-components';\nimport {ContentContext, FooterContext, TextContext} from './Content';\nimport {createContext, CSSProperties, forwardRef, ReactNode, useContext} from 'react';\nimport {DividerContext} from './Divider';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, size, style} from '../style' with {type: 'macro'};\nimport {getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {ImageContext} from './Image';\nimport {ImageCoordinator} from './ImageCoordinator';\nimport {mergeStyles} from '../style/runtime';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext, SkeletonWrapper, useIsSkeleton} from './Skeleton';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CardRenderProps {\n /** The size of the Card. */\n size: 'XS' | 'S' | 'M' | 'L' | 'XL'\n}\n\nexport interface CardProps extends Omit<GridListItemProps, 'className' | 'style' | 'children' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd'>, StyleProps {\n /** The children of the Card. */\n children: ReactNode | ((renderProps: CardRenderProps) => ReactNode),\n /**\n * The size of the Card.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of internal padding within the Card.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * The visual style of the Card.\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary' | 'tertiary' | 'quiet'\n}\n\nconst borderRadius = {\n default: 'lg',\n size: {\n XS: 'default',\n S: 'default'\n }\n} as const;\n\nlet card = style({\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius,\n '--s2-container-bg': {\n type: 'backgroundColor',\n value: {\n variant: {\n primary: 'elevated',\n secondary: 'layer-1'\n },\n forcedColors: 'ButtonFace'\n }\n },\n backgroundColor: {\n default: '--s2-container-bg',\n variant: {\n tertiary: 'transparent',\n quiet: 'transparent'\n }\n },\n boxShadow: {\n default: 'emphasized',\n isHovered: 'elevated',\n isFocusVisible: 'elevated',\n isSelected: 'elevated',\n forcedColors: '[0 0 0 1px ButtonBorder]',\n variant: {\n tertiary: {\n // Render border with box-shadow to avoid affecting layout.\n default: `[0 0 0 1px ${colorToken('gray-100')}]`,\n isHovered: `[0 0 0 1px ${colorToken('gray-200')}]`,\n isFocusVisible: `[0 0 0 1px ${colorToken('gray-200')}]`,\n isSelected: 'none',\n forcedColors: '[0 0 0 1px ButtonBorder]'\n },\n quiet: 'none'\n }\n },\n forcedColorAdjust: 'none',\n transition: 'default',\n fontFamily: 'sans',\n overflow: {\n default: 'clip',\n variant: {\n quiet: 'visible'\n }\n },\n contain: 'layout',\n disableTapHighlight: true,\n userSelect: {\n isCardView: 'none'\n },\n cursor: {\n isLink: 'pointer'\n },\n width: {\n size: {\n XS: 112,\n S: 192,\n M: 240,\n L: 320,\n XL: size(400)\n },\n isCardView: 'full'\n },\n height: 'full',\n '--card-spacing': {\n type: 'paddingTop',\n value: {\n density: {\n compact: {\n size: {\n XS: size(6),\n S: 8,\n M: 12,\n L: 16,\n XL: 20\n }\n },\n regular: {\n size: {\n XS: 8,\n S: 12,\n M: 16,\n L: 20,\n XL: 24\n }\n },\n spacious: {\n size: {\n XS: 12,\n S: 16,\n M: 20,\n L: 24,\n XL: 28\n }\n }\n }\n }\n },\n '--card-padding-y': {\n type: 'paddingTop',\n value: {\n default: '--card-spacing',\n variant: {\n quiet: 0\n }\n }\n },\n '--card-padding-x': {\n type: 'paddingStart',\n value: {\n default: '--card-spacing',\n variant: {\n quiet: 0\n }\n }\n },\n paddingY: '--card-padding-y',\n paddingX: '--card-padding-x',\n boxSizing: 'border-box',\n ...focusRing(),\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid',\n // Focus ring moves to preview when quiet.\n variant: {\n quiet: 'none'\n }\n }\n}, getAllowedOverrides());\n\nlet selectionIndicator = style({\n position: 'absolute',\n inset: 0,\n zIndex: 2,\n borderRadius,\n pointerEvents: 'none',\n borderWidth: 2,\n borderStyle: 'solid',\n borderColor: 'gray-1000',\n transition: 'default',\n opacity: {\n default: 0,\n isSelected: 1\n },\n // Quiet cards with no checkbox have an extra inner stroke\n // to distinguish the selection indicator from the preview.\n outlineColor: lightDark('transparent-white-600', 'transparent-black-600'),\n outlineOffset: -4,\n outlineStyle: {\n default: 'none',\n isStrokeInner: 'solid'\n },\n outlineWidth: 2\n});\n\nlet preview = style({\n position: 'relative',\n transition: 'default',\n overflow: 'clip',\n marginX: '[calc(var(--card-padding-x) * -1)]',\n marginTop: '[calc(var(--card-padding-y) * -1)]',\n marginBottom: {\n ':last-child': '[calc(var(--card-padding-y) * -1)]'\n },\n borderRadius: {\n isQuiet: borderRadius\n },\n boxShadow: {\n isQuiet: {\n isHovered: 'elevated',\n isFocusVisible: 'elevated',\n isSelected: 'elevated'\n }\n },\n ...focusRing(),\n outlineStyle: {\n default: 'none',\n isQuiet: {\n isFocusVisible: 'solid'\n }\n }\n});\n\nconst image = style({\n width: 'full',\n aspectRatio: '[3/2]',\n objectFit: 'cover',\n userSelect: 'none',\n pointerEvents: 'none'\n});\n\nlet title = style({\n font: 'title',\n fontSize: {\n size: {\n XS: 'title-xs',\n S: 'title-xs',\n M: 'title-sm',\n L: 'title',\n XL: 'title-lg'\n }\n },\n lineClamp: 3,\n gridArea: 'title'\n});\n\nlet description = style({\n font: 'body',\n fontSize: {\n size: {\n XS: 'body-2xs',\n S: 'body-2xs',\n M: 'body-xs',\n L: 'body-sm',\n XL: 'body'\n }\n },\n lineClamp: 3,\n gridArea: 'description'\n});\n\nlet content = style({\n display: 'grid',\n // By default, all elements are displayed in a stack.\n // If an action menu is present, place it next to the title.\n gridTemplateColumns: {\n default: ['1fr'],\n ':has([data-slot=menu])': ['minmax(0, 1fr)', 'auto']\n },\n gridTemplateAreas: {\n default: [\n 'title',\n 'description'\n ],\n ':has([data-slot=menu])': [\n 'title menu',\n 'description description'\n ]\n },\n columnGap: 4,\n flexGrow: 1,\n alignItems: 'baseline',\n alignContent: 'space-between',\n rowGap: {\n size: {\n XS: 4,\n S: 4,\n M: size(6),\n L: size(6),\n XL: 8\n }\n },\n paddingTop: {\n default: '--card-spacing',\n ':first-child': 0\n },\n paddingBottom: {\n default: '[calc(var(--card-spacing) * 1.5 / 2)]',\n ':last-child': 0\n }\n});\n\nlet actionMenu = style({\n gridArea: 'menu',\n // Don't cause the row to expand, preserve gap between title and description text.\n // Would use -100% here but it doesn't work in Firefox.\n marginY: '[calc(-1 * self(height))]'\n});\n\nlet footer = style({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'end',\n justifyContent: 'space-between',\n gap: 8,\n paddingTop: '[calc(var(--card-spacing) * 1.5 / 2)]'\n});\n\nexport const InternalCardViewContext = createContext<'div' | typeof GridListItem>('div');\nexport const CardContext = createContext<ContextValue<Partial<CardProps>, DOMRefValue<HTMLDivElement>>>(null);\n\ninterface InternalCardContextValue {\n isQuiet: boolean,\n size: 'XS' | 'S' | 'M' | 'L' | 'XL',\n isSelected: boolean,\n isHovered: boolean,\n isFocusVisible: boolean,\n isPressed: boolean,\n isCheckboxSelection: boolean\n}\n\nconst InternalCardContext = createContext<InternalCardContextValue>({\n isQuiet: false,\n size: 'M',\n isSelected: false,\n isHovered: false,\n isFocusVisible: false,\n isPressed: false,\n isCheckboxSelection: true\n});\n\nconst actionButtonSize = {\n XS: 'XS',\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nexport const Card = forwardRef(function Card(props: CardProps, ref: DOMRef<HTMLDivElement>) {\n [props] = useSpectrumContextProps(props, ref, CardContext);\n let domRef = useDOMRef(ref);\n let {density = 'regular', size = 'M', variant = 'primary', UNSAFE_className = '', UNSAFE_style, styles, id, ...otherProps} = props;\n let isQuiet = variant === 'quiet';\n let isSkeleton = useIsSkeleton();\n let children = (\n <Provider\n values={[\n [ImageContext, {alt: '', styles: image}],\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n title: {styles: title({size})},\n description: {styles: description({size})}\n }\n }],\n [ContentContext, {styles: content({size})}],\n [DividerContext, {size: 'S'}],\n [FooterContext, {styles: footer}],\n [ActionMenuContext, {\n isQuiet: true,\n size: actionButtonSize[size],\n isDisabled: isSkeleton,\n // @ts-ignore\n 'data-slot': 'menu',\n styles: actionMenu\n }],\n [SkeletonContext, isSkeleton]\n ]}>\n <ImageCoordinator>\n {typeof props.children === 'function' ? props.children({size}) : props.children}\n </ImageCoordinator>\n </Provider>\n );\n\n let ElementType = useContext(InternalCardViewContext);\n if (ElementType === 'div' || isSkeleton) {\n return (\n <div\n {...filterDOMProps(otherProps)}\n id={id != null ? String(id) : undefined}\n // @ts-ignore - React < 19 compat\n inert={isSkeleton ? 'true' : undefined}\n ref={domRef}\n className={UNSAFE_className + card({size, density, variant, isCardView: ElementType !== 'div'}, styles)}\n style={UNSAFE_style}>\n <InternalCardContext.Provider value={{size, isQuiet, isCheckboxSelection: false, isHovered: false, isFocusVisible: false, isSelected: false, isPressed: false}}>\n {children}\n </InternalCardContext.Provider>\n </div>\n );\n }\n\n let press = pressScale(domRef, UNSAFE_style);\n return (\n <ElementType\n {...props}\n ref={domRef}\n className={renderProps => UNSAFE_className + card({...renderProps, isCardView: true, isLink: !!props.href, size, density, variant}, styles)}\n style={renderProps =>\n // Only the preview in quiet cards scales down on press\n variant === 'quiet' ? UNSAFE_style : press(renderProps)\n }>\n {({selectionMode, selectionBehavior, isHovered, isFocusVisible, isSelected, isPressed}) => (\n <InternalCardContext.Provider value={{size, isQuiet, isCheckboxSelection: selectionMode !== 'none' && selectionBehavior === 'toggle', isHovered, isFocusVisible, isSelected, isPressed}}>\n {/* Selection indicator and checkbox move inside the preview for quiet cards */}\n {!isQuiet && <SelectionIndicator />}\n {!isQuiet && selectionMode !== 'none' && selectionBehavior === 'toggle' &&\n <CardCheckbox />\n }\n {/* this makes the :first-child selector work even with the checkbox */}\n <div className={style({display: 'contents'})}>\n {children}\n </div>\n </InternalCardContext.Provider>\n )}\n </ElementType>\n );\n});\n\nfunction SelectionIndicator() {\n let {size, isSelected, isQuiet, isCheckboxSelection} = useContext(InternalCardContext);\n return (\n <div\n className={selectionIndicator({\n size,\n isSelected,\n // Add an inner stroke only for quiet cards with no checkbox to\n // help distinguish the selected state from the preview.\n isStrokeInner: isQuiet && !isCheckboxSelection\n })} />\n );\n}\n\nfunction CardCheckbox() {\n let {size} = useContext(InternalCardContext);\n return (\n <div\n className={style({\n position: 'absolute',\n top: '--card-spacing',\n insetStart: '--card-spacing',\n zIndex: 2,\n padding: 4,\n backgroundColor: lightDark('transparent-white-600', 'transparent-black-600'),\n borderRadius: 'default',\n boxShadow: 'emphasized'\n })}>\n <Checkbox\n slot=\"selection\"\n excludeFromTabOrder\n size={size === 'XS' ? 'S' : size} />\n </div>\n );\n}\n\nexport interface CardPreviewProps extends UnsafeStyles, DOMProps {\n children: ReactNode\n}\n\nexport const CardPreview = forwardRef(function CardPreview(props: CardPreviewProps, ref: DOMRef<HTMLDivElement>) {\n let {size, isQuiet, isHovered, isFocusVisible, isSelected, isPressed, isCheckboxSelection} = useContext(InternalCardContext);\n let {UNSAFE_className, UNSAFE_style} = props;\n let domRef = useDOMRef(ref);\n return (\n <div\n {...filterDOMProps(props)}\n slot=\"preview\"\n ref={domRef}\n className={UNSAFE_className + preview({size, isQuiet, isHovered, isFocusVisible, isSelected})}\n style={isQuiet ? pressScale(domRef)({isPressed}) : UNSAFE_style}>\n {isQuiet && <SelectionIndicator />}\n {isQuiet && isCheckboxSelection && <CardCheckbox />}\n <div className={style({borderRadius: '[inherit]', overflow: 'clip'})}>\n {props.children}\n </div>\n </div>\n );\n});\n\nconst collection = style({\n display: 'grid',\n gridTemplateColumns: 'repeat(3, 1fr)',\n gap: {\n default: 4,\n size: {\n XS: 2,\n S: 2\n }\n }\n});\n\nconst collectionImage = style({\n width: 'full',\n aspectRatio: {\n default: 'square',\n ':nth-last-child(4):first-child': '[3/2]'\n },\n gridColumnEnd: {\n ':nth-last-child(4):first-child': 'span 3'\n },\n objectFit: 'cover',\n pointerEvents: 'none',\n userSelect: 'none'\n});\n\nexport const CollectionCardPreview = forwardRef(function CollectionCardPreview(props: CardPreviewProps, ref: DOMRef<HTMLDivElement>) {\n let {size} = useContext(InternalCardContext)!;\n return (\n <CardPreview {...props} ref={ref}>\n <div className={collection({size})}>\n <ImageContext.Provider value={{styles: collectionImage}}>\n {props.children}\n </ImageContext.Provider>\n </div>\n </CardPreview>\n );\n});\n\nexport interface AssetCardProps extends Omit<CardProps, 'density'> {}\n\nexport const AssetCard = forwardRef(function AssetCard(props: AssetCardProps, ref: DOMRef<HTMLDivElement>) {\n return (\n <Card {...props} ref={ref} density=\"regular\">\n {composeRenderProps(props.children, children => (\n <Provider\n values={[\n [ImageContext, {\n alt: '',\n styles: style({\n width: 'full',\n aspectRatio: 'square',\n objectFit: 'contain',\n pointerEvents: 'none',\n userSelect: 'none'\n })\n }],\n [IllustrationContext, {\n render(icon) {\n return (\n <SkeletonWrapper>\n <div\n className={style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'gray-100',\n aspectRatio: 'square'\n })}>\n {icon}\n </div>\n </SkeletonWrapper>\n );\n },\n styles: style({\n height: 'auto',\n maxSize: 160,\n // TODO: this is made up.\n width: '[50%]'\n })\n }]\n ]}>\n {children}\n </Provider>\n ))}\n </Card>\n );\n});\n\nconst avatarSize = {\n XS: 24,\n S: 48,\n M: 64,\n L: 64,\n XL: 80\n} as const;\n\nexport interface UserCardProps extends Omit<CardProps, 'density' | 'variant'> {\n // Quiet is not supported due to lack of indent between preview and avatar.\n variant?: 'primary' | 'secondary' | 'tertiary'\n}\n\nexport const UserCard = forwardRef(function UserCard(props: CardProps, ref: DOMRef<HTMLDivElement>) {\n let {size = 'M'} = props;\n return (\n <Card {...props} ref={ref} density=\"spacious\">\n {composeRenderProps(props.children, children => (\n <Provider\n values={[\n [ImageContext, {\n alt: '',\n styles: style({\n width: 'full',\n aspectRatio: '[3/1]',\n objectFit: 'cover',\n pointerEvents: 'none',\n userSelect: 'none'\n })\n }],\n [AvatarContext, {\n size: avatarSize[size],\n UNSAFE_style: {\n '--size': avatarSize[size] + 'px'\n } as CSSProperties,\n styles: style({\n position: 'relative',\n marginTop: {\n default: 0,\n ':is([slot=preview] + &)': '[calc(var(--size) / -2)]'\n }\n }),\n isOverBackground: true\n }]\n ]}>\n {children}\n </Provider>\n ))}\n </Card>\n );\n});\n\nconst buttonSize = {\n XS: 'S',\n S: 'S',\n M: 'M',\n L: 'L',\n XL: 'XL'\n} as const;\n\nexport interface ProductCardProps extends Omit<CardProps, 'density' | 'variant'> {\n // Quiet is not supported due to lack of indent between preview and thumbnail.\n variant?: 'primary' | 'secondary' | 'tertiary'\n}\n\nexport const ProductCard = forwardRef(function ProductCard(props: ProductCardProps, ref: DOMRef<HTMLDivElement>) {\n let {size = 'M'} = props;\n return (\n <Card {...props} ref={ref} density=\"spacious\">\n {composeRenderProps(props.children, children => (\n <Provider\n values={[\n [ImageContext, {\n slots: {\n preview: {\n alt: '',\n styles: style({\n width: 'full',\n aspectRatio: '[5/1]',\n objectFit: 'cover',\n pointerEvents: 'none',\n userSelect: 'none'\n })\n },\n thumbnail: {\n alt: '',\n styles: style({\n position: 'relative',\n pointerEvents: 'none',\n userSelect: 'none',\n size: {\n size: {\n XS: 24,\n S: 36,\n M: 40,\n L: 44,\n XL: 56\n }\n },\n borderRadius: {\n default: 'default',\n size: {\n XS: 'sm',\n S: 'sm'\n }\n },\n objectFit: 'cover',\n marginTop: {\n default: 0,\n ':is([slot=preview] + &)': '[calc(self(height) / -2)]'\n },\n outlineStyle: 'solid',\n outlineWidth: {\n default: 2,\n size: {\n XS: 1\n }\n },\n outlineColor: '--s2-container-bg'\n })({size})\n }\n }\n }],\n [FooterContext, {\n styles: mergeStyles(footer, style({\n justifyContent: 'end'\n }))\n }],\n [ButtonContext, {size: buttonSize[size]}],\n [LinkButtonContext, {size: buttonSize[size]}]\n ]}>\n {children}\n </Provider>\n ))}\n </Card>\n );\n});\n"],"names":[],"version":3,"file":"Card.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;AAiDD,MAAM,qCAAe;IACnB,SAAS;IACT,MAAM;QACJ,IAAI;QACJ,GAAG;IACL;AACF;AAEA,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsIJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BJ,MAAM;AAQN,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeJ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeJ,IAAI;;;;;;;;;;;;;;;;;;;;;;AAyCJ,IAAI;AAOJ,IAAI;AASG,MAAM,yDAA0B,CAAA,GAAA,0BAAY,EAA+B;AAC3E,MAAM,yDAAc,CAAA,GAAA,0BAAY,EAAiE;AAYxG,MAAM,0DAAsB,CAAA,GAAA,0BAAY,EAA4B;IAClE,SAAS;IACT,MAAM;IACN,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,WAAW;IACX,qBAAqB;AACvB;AAEA,MAAM,yCAAmB;IACvB,IAAI;IACJ,GAAG;IACH,GAAG;I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AAA,GAAA,uCAAY;wBAAG;4BACd,MAAM,gCAAU,CAAC,KAAK;4BACtB,cAAc;gCACZ,UAAU,gCAAU,CAAC,KAAK,GAAG;4BAC/B;4BACA,MAAM;4BAON,kBAAkB;wBACpB;qBAAE;iBACH;0BACA;;;AAKX;AAEA,MAAM,mCAAa;IACjB,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;AACN;AAOO,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,MAAuB,EAAE,GAA2B;IAC7G,IAAI,QAAC,OAAO,KAAI,GAAG;IACnB,qBACE,gCAAC;QAAM,GAAG,MAAK;QAAE,KAAK;QAAK,SAAQ;kBAChC,CAAA,GAAA,6CAAiB,EAAE,OAAM,QAAQ,EAAE,CAAA,yBAClC,gCAAC,CAAA,GAAA,mCAAO;gBACN,QAAQ;oBACN;wBAAC,CAAA,GAAA,sCAAW;wBAAG;4BACb,OAAO;gCACL,SAAS;oCACP,KAAK;oCACL,MAAM;gCAOR;gCACA,WAAW;oCACT,KAAK;oCACL,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAiCL;8CAAC;oCAAI;gCACV;4BACF;wBACF;qBAAE;oBACF;wBAAC,CAAA,GAAA,uCAAY;wBAAG;4BACd,QAAQ,CAAA,GAAA,qCAAU,EAAE;wBAGtB;qBAAE;oBACF;wBAAC,CAAA,GAAA,uCAAY;wBAAG;4BAAC,MAAM,gCAAU,CAAC,KAAK;wBAAA;qBAAE;oBACzC;wBAAC,CAAA,GAAA,2CAAgB;wBAAG;4BAAC,MAAM,gCAAU,CAAC,KAAK;wBAAA;qBAAE;iBAC9C;0BACA;;;AAKX","sources":["packages/@react-spectrum/s2/src/Card.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 {ActionMenuContext} from './ActionMenu';\nimport {AvatarContext} from './Avatar';\nimport {ButtonContext, LinkButtonContext} from './Button';\nimport {Checkbox} from './Checkbox';\nimport {colorToken} from '../style/tokens' with {type: 'macro'};\nimport {composeRenderProps, ContextValue, DEFAULT_SLOT, type GridListItem, GridListItemProps, Provider} from 'react-aria-components';\nimport {ContentContext, FooterContext, TextContext} from './Content';\nimport {createContext, CSSProperties, forwardRef, ReactNode, useContext} from 'react';\nimport {DividerContext} from './Divider';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {focusRing, lightDark, size, style} from '../style' with {type: 'macro'};\nimport {getAllowedOverrides, StyleProps, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustrationContext} from './Icon';\nimport {ImageContext} from './Image';\nimport {ImageCoordinator} from './ImageCoordinator';\nimport {mergeStyles} from '../style/runtime';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext, SkeletonWrapper, useIsSkeleton} from './Skeleton';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CardRenderProps {\n /** The size of the Card. */\n size: 'XS' | 'S' | 'M' | 'L' | 'XL'\n}\n\nexport interface CardProps extends Omit<GridListItemProps, 'className' | 'style' | 'children' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd'>, StyleProps {\n /** The children of the Card. */\n children: ReactNode | ((renderProps: CardRenderProps) => ReactNode),\n /**\n * The size of the Card.\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * The amount of internal padding within the Card.\n * @default 'regular'\n */\n density?: 'compact' | 'regular' | 'spacious',\n /**\n * The visual style of the Card.\n * @default 'primary'\n */\n variant?: 'primary' | 'secondary' | 'tertiary' | 'quiet'\n}\n\nconst borderRadius = {\n default: 'lg',\n size: {\n XS: 'default',\n S: 'default'\n }\n} as const;\n\nlet card = style({\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n borderRadius,\n '--s2-container-bg': {\n type: 'backgroundColor',\n value: {\n variant: {\n primary: 'elevated',\n secondary: 'layer-1'\n },\n forcedColors: 'ButtonFace'\n }\n },\n backgroundColor: {\n default: '--s2-container-bg',\n variant: {\n tertiary: 'transparent',\n quiet: 'transparent'\n }\n },\n boxShadow: {\n default: 'emphasized',\n isHovered: 'elevated',\n isFocusVisible: 'elevated',\n isSelected: 'elevated',\n forcedColors: '[0 0 0 1px ButtonBorder]',\n variant: {\n tertiary: {\n // Render border with box-shadow to avoid affecting layout.\n default: `[0 0 0 1px ${colorToken('gray-100')}]`,\n isHovered: `[0 0 0 1px ${colorToken('gray-200')}]`,\n isFocusVisible: `[0 0 0 1px ${colorToken('gray-200')}]`,\n isSelected: 'none',\n forcedColors: '[0 0 0 1px ButtonBorder]'\n },\n quiet: 'none'\n }\n },\n forcedColorAdjust: 'none',\n transition: 'default',\n fontFamily: 'sans',\n overflow: {\n default: 'clip',\n variant: {\n quiet: 'visible'\n }\n },\n contain: 'layout',\n disableTapHighlight: true,\n userSelect: {\n isCardView: 'none'\n },\n cursor: {\n isLink: 'pointer'\n },\n width: {\n size: {\n XS: 112,\n S: 192,\n M: 240,\n L: 320,\n XL: size(400)\n },\n isCardView: 'full'\n },\n height: 'full',\n '--card-spacing': {\n type: 'paddingTop',\n value: {\n density: {\n compact: {\n size: {\n XS: size(6),\n S: 8,\n M: 12,\n L: 16,\n XL: 20\n }\n },\n regular: {\n size: {\n XS: 8,\n S: 12,\n M: 16,\n L: 20,\n XL: 24\n }\n },\n spacious: {\n size: {\n XS: 12,\n S: 16,\n M: 20,\n L: 24,\n XL: 28\n }\n }\n }\n }\n },\n '--card-padding-y': {\n type: 'paddingTop',\n value: {\n default: '--card-spacing',\n variant: {\n quiet: 0\n }\n }\n },\n '--card-padding-x': {\n type: 'paddingStart',\n value: {\n default: '--card-spacing',\n variant: {\n quiet: 0\n }\n }\n },\n paddingY: '--card-padding-y',\n paddingX: '--card-padding-x',\n boxSizing: 'border-box',\n ...focusRing(),\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid',\n // Focus ring moves to preview when quiet.\n variant: {\n quiet: 'none'\n }\n }\n}, getAllowedOverrides());\n\nlet selectionIndicator = style({\n position: 'absolute',\n inset: 0,\n zIndex: 2,\n borderRadius,\n pointerEvents: 'none',\n borderWidth: 2,\n borderStyle: 'solid',\n borderColor: 'gray-1000',\n transition: 'default',\n opacity: {\n default: 0,\n isSelected: 1\n },\n // Quiet cards with no checkbox have an extra inner stroke\n // to distinguish the selection indicator from the preview.\n outlineColor: lightDark('transparent-white-600', 'transparent-black-600'),\n outlineOffset: -4,\n outlineStyle: {\n default: 'none',\n isStrokeInner: 'solid'\n },\n outlineWidth: 2\n});\n\nlet preview = style({\n position: 'relative',\n transition: 'default',\n overflow: 'clip',\n marginX: '[calc(var(--card-padding-x) * -1)]',\n marginTop: '[calc(var(--card-padding-y) * -1)]',\n marginBottom: {\n ':last-child': '[calc(var(--card-padding-y) * -1)]'\n },\n borderRadius: {\n isQuiet: borderRadius\n },\n boxShadow: {\n isQuiet: {\n isHovered: 'elevated',\n isFocusVisible: 'elevated',\n isSelected: 'elevated'\n }\n },\n ...focusRing(),\n outlineStyle: {\n default: 'none',\n isQuiet: {\n isFocusVisible: 'solid'\n }\n }\n});\n\nconst image = style({\n width: 'full',\n aspectRatio: '[3/2]',\n objectFit: 'cover',\n userSelect: 'none',\n pointerEvents: 'none'\n});\n\nlet title = style({\n font: 'title',\n fontSize: {\n size: {\n XS: 'title-xs',\n S: 'title-xs',\n M: 'title-sm',\n L: 'title',\n XL: 'title-lg'\n }\n },\n lineClamp: 3,\n gridArea: 'title'\n});\n\nlet description = style({\n font: 'body',\n fontSize: {\n size: {\n XS: 'body-2xs',\n S: 'body-2xs',\n M: 'body-xs',\n L: 'body-sm',\n XL: 'body'\n }\n },\n lineClamp: 3,\n gridArea: 'description'\n});\n\nlet content = style({\n display: 'grid',\n // By default, all elements are displayed in a stack.\n // If an action menu is present, place it next to the title.\n gridTemplateColumns: {\n default: ['1fr'],\n ':has([data-slot=menu])': ['minmax(0, 1fr)', 'auto']\n },\n gridTemplateAreas: {\n default: [\n 'title',\n 'description'\n ],\n ':has([data-slot=menu])': [\n 'title menu',\n 'description description'\n ]\n },\n columnGap: 4,\n flexGrow: 1,\n alignItems: 'baseline',\n alignContent: 'space-between',\n rowGap: {\n size: {\n XS: 4,\n S: 4,\n M: size(6),\n L: size(6),\n XL: 8\n }\n },\n paddingTop: {\n default: '--card-spacing',\n ':first-child': 0\n },\n paddingBottom: {\n default: '[calc(var(--card-spacing) * 1.5 / 2)]',\n ':last-child': 0\n }\n});\n\nlet actionMenu = style({\n gridArea: 'menu',\n // Don't cause the row to expand, preserve gap between title and description text.\n // Would use -100% here but it doesn't work in Firefox.\n marginY: '[calc(-1 * self(height))]'\n});\n\nlet footer = style({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'end',\n justifyContent: 'space-between',\n gap: 8,\n paddingTop: '[calc(var(--card-spacing) * 1.5 / 2)]'\n});\n\nexport const InternalCardViewContext = createContext<'div' | typeof GridListItem>('div');\nexport const CardContext = createContext<ContextValue<Partial<CardProps>, DOMRefValue<HTMLDivElement>>>(null);\n\ninterface InternalCardContextValue {\n isQuiet: boolean,\n size: 'XS' | 'S' | 'M' | 'L' | 'XL',\n isSelected: boolean,\n isHovered: boolean,\n isFocusVisible: boolean,\n isPressed: boolean,\n isCheckboxSelection: boolean\n}\n\nconst InternalCardContext = createContext<InternalCardContextValue>({\n isQuiet: false,\n size: 'M',\n isSelected: false,\n isHovered: false,\n isFocusVisible: false,\n isPressed: false,\n isCheckboxSelection: true\n});\n\nconst actionButtonSize = {\n XS: 'XS',\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nexport const Card = forwardRef(function Card(props: CardProps, ref: DOMRef<HTMLDivElement>) {\n [props] = useSpectrumContextProps(props, ref, CardContext);\n let domRef = useDOMRef(ref);\n let {density = 'regular', size = 'M', variant = 'primary', UNSAFE_className = '', UNSAFE_style, styles, id, ...otherProps} = props;\n let isQuiet = variant === 'quiet';\n let isSkeleton = useIsSkeleton();\n let children = (\n <Provider\n values={[\n [ImageContext, {alt: '', styles: image}],\n [TextContext, {\n slots: {\n [DEFAULT_SLOT]: {},\n title: {styles: title({size})},\n description: {styles: description({size})}\n }\n }],\n [ContentContext, {styles: content({size})}],\n [DividerContext, {size: 'S'}],\n [FooterContext, {styles: footer}],\n [ActionMenuContext, {\n isQuiet: true,\n size: actionButtonSize[size],\n isDisabled: isSkeleton,\n // @ts-ignore\n 'data-slot': 'menu',\n styles: actionMenu\n }],\n [SkeletonContext, isSkeleton]\n ]}>\n <ImageCoordinator>\n {typeof props.children === 'function' ? props.children({size}) : props.children}\n </ImageCoordinator>\n </Provider>\n );\n\n let ElementType = useContext(InternalCardViewContext);\n if (ElementType === 'div' || isSkeleton) {\n return (\n <div\n {...filterDOMProps(otherProps)}\n id={id != null ? String(id) : undefined}\n // @ts-ignore - React < 19 compat\n inert={isSkeleton ? 'true' : undefined}\n ref={domRef}\n className={UNSAFE_className + card({size, density, variant, isCardView: ElementType !== 'div'}, styles)}\n style={UNSAFE_style}>\n <InternalCardContext.Provider value={{size, isQuiet, isCheckboxSelection: false, isHovered: false, isFocusVisible: false, isSelected: false, isPressed: false}}>\n {children}\n </InternalCardContext.Provider>\n </div>\n );\n }\n\n let press = pressScale(domRef, UNSAFE_style);\n return (\n <ElementType\n {...props}\n ref={domRef}\n className={renderProps => UNSAFE_className + card({...renderProps, isCardView: true, isLink: !!props.href, size, density, variant}, styles)}\n style={renderProps =>\n // Only the preview in quiet cards scales down on press\n variant === 'quiet' ? UNSAFE_style : press(renderProps)\n }>\n {({selectionMode, selectionBehavior, isHovered, isFocusVisible, isSelected, isPressed}) => (\n <InternalCardContext.Provider value={{size, isQuiet, isCheckboxSelection: selectionMode !== 'none' && selectionBehavior === 'toggle', isHovered, isFocusVisible, isSelected, isPressed}}>\n {/* Selection indicator and checkbox move inside the preview for quiet cards */}\n {!isQuiet && <SelectionIndicator />}\n {!isQuiet && selectionMode !== 'none' && selectionBehavior === 'toggle' &&\n <CardCheckbox />\n }\n {/* this makes the :first-child selector work even with the checkbox */}\n <div className={style({display: 'contents'})}>\n {children}\n </div>\n </InternalCardContext.Provider>\n )}\n </ElementType>\n );\n});\n\nfunction SelectionIndicator() {\n let {size, isSelected, isQuiet, isCheckboxSelection} = useContext(InternalCardContext);\n return (\n <div\n className={selectionIndicator({\n size,\n isSelected,\n // Add an inner stroke only for quiet cards with no checkbox to\n // help distinguish the selected state from the preview.\n isStrokeInner: isQuiet && !isCheckboxSelection\n })} />\n );\n}\n\nfunction CardCheckbox() {\n let {size} = useContext(InternalCardContext);\n return (\n <div\n className={style({\n position: 'absolute',\n top: '--card-spacing',\n insetStart: '--card-spacing',\n zIndex: 2,\n padding: 4,\n backgroundColor: lightDark('transparent-white-600', 'transparent-black-600'),\n borderRadius: 'default',\n boxShadow: 'emphasized'\n })}>\n <Checkbox\n slot=\"selection\"\n excludeFromTabOrder\n size={size === 'XS' ? 'S' : size} />\n </div>\n );\n}\n\nexport interface CardPreviewProps extends UnsafeStyles, DOMProps {\n children: ReactNode\n}\n\nexport const CardPreview = forwardRef(function CardPreview(props: CardPreviewProps, ref: DOMRef<HTMLDivElement>) {\n let {size, isQuiet, isHovered, isFocusVisible, isSelected, isPressed, isCheckboxSelection} = useContext(InternalCardContext);\n let {UNSAFE_className, UNSAFE_style} = props;\n let domRef = useDOMRef(ref);\n return (\n <div\n {...filterDOMProps(props)}\n slot=\"preview\"\n ref={domRef}\n className={UNSAFE_className + preview({size, isQuiet, isHovered, isFocusVisible, isSelected})}\n style={isQuiet ? pressScale(domRef)({isPressed}) : UNSAFE_style}>\n {isQuiet && <SelectionIndicator />}\n {isQuiet && isCheckboxSelection && <CardCheckbox />}\n <div className={style({borderRadius: '[inherit]', overflow: 'clip'})}>\n {props.children}\n </div>\n </div>\n );\n});\n\nconst collection = style({\n display: 'grid',\n gridTemplateColumns: 'repeat(3, 1fr)',\n gap: {\n default: 4,\n size: {\n XS: 2,\n S: 2\n }\n }\n});\n\nconst collectionImage = style({\n width: 'full',\n aspectRatio: {\n default: 'square',\n ':nth-last-child(4):first-child': '[3/2]'\n },\n gridColumnEnd: {\n ':nth-last-child(4):first-child': 'span 3'\n },\n objectFit: 'cover',\n pointerEvents: 'none',\n userSelect: 'none'\n});\n\nexport const CollectionCardPreview = forwardRef(function CollectionCardPreview(props: CardPreviewProps, ref: DOMRef<HTMLDivElement>) {\n let {size} = useContext(InternalCardContext)!;\n return (\n <CardPreview {...props} ref={ref}>\n <div className={collection({size})}>\n <ImageContext.Provider value={{styles: collectionImage}}>\n {props.children}\n </ImageContext.Provider>\n </div>\n </CardPreview>\n );\n});\n\nexport interface AssetCardProps extends Omit<CardProps, 'density'> {}\n\nexport const AssetCard = forwardRef(function AssetCard(props: AssetCardProps, ref: DOMRef<HTMLDivElement>) {\n return (\n <Card {...props} ref={ref} density=\"regular\">\n {composeRenderProps(props.children, children => (\n <Provider\n values={[\n [ImageContext, {\n alt: '',\n styles: style({\n width: 'full',\n aspectRatio: 'square',\n objectFit: 'contain',\n pointerEvents: 'none',\n userSelect: 'none'\n })\n }],\n [IllustrationContext, {\n render(icon) {\n return (\n <SkeletonWrapper>\n <div\n className={style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'gray-100',\n aspectRatio: 'square'\n })}>\n {icon}\n </div>\n </SkeletonWrapper>\n );\n },\n styles: style({\n height: 'auto',\n maxSize: 160,\n // TODO: this is made up.\n width: '[50%]'\n })\n }]\n ]}>\n {children}\n </Provider>\n ))}\n </Card>\n );\n});\n\nconst avatarSize = {\n XS: 24,\n S: 48,\n M: 64,\n L: 64,\n XL: 80\n} as const;\n\nexport interface UserCardProps extends Omit<CardProps, 'density' | 'variant'> {\n // Quiet is not supported due to lack of indent between preview and avatar.\n variant?: 'primary' | 'secondary' | 'tertiary'\n}\n\nexport const UserCard = forwardRef(function UserCard(props: CardProps, ref: DOMRef<HTMLDivElement>) {\n let {size = 'M'} = props;\n return (\n <Card {...props} ref={ref} density=\"spacious\">\n {composeRenderProps(props.children, children => (\n <Provider\n values={[\n [ImageContext, {\n alt: '',\n styles: style({\n width: 'full',\n aspectRatio: '[3/1]',\n objectFit: 'cover',\n pointerEvents: 'none',\n userSelect: 'none'\n })\n }],\n [AvatarContext, {\n size: avatarSize[size],\n UNSAFE_style: {\n '--size': avatarSize[size] + 'px'\n } as CSSProperties,\n styles: style({\n position: 'relative',\n marginTop: {\n default: 0,\n ':is([slot=preview] + &)': '[calc(var(--size) / -2)]'\n }\n }),\n isOverBackground: true\n }]\n ]}>\n {children}\n </Provider>\n ))}\n </Card>\n );\n});\n\nconst buttonSize = {\n XS: 'S',\n S: 'S',\n M: 'M',\n L: 'L',\n XL: 'XL'\n} as const;\n\nexport interface ProductCardProps extends Omit<CardProps, 'density' | 'variant'> {\n // Quiet is not supported due to lack of indent between preview and thumbnail.\n variant?: 'primary' | 'secondary' | 'tertiary'\n}\n\nexport const ProductCard = forwardRef(function ProductCard(props: ProductCardProps, ref: DOMRef<HTMLDivElement>) {\n let {size = 'M'} = props;\n return (\n <Card {...props} ref={ref} density=\"spacious\">\n {composeRenderProps(props.children, children => (\n <Provider\n values={[\n [ImageContext, {\n slots: {\n preview: {\n alt: '',\n styles: style({\n width: 'full',\n aspectRatio: '[5/1]',\n objectFit: 'cover',\n pointerEvents: 'none',\n userSelect: 'none'\n })\n },\n thumbnail: {\n alt: '',\n styles: style({\n position: 'relative',\n pointerEvents: 'none',\n userSelect: 'none',\n size: {\n size: {\n XS: 24,\n S: 36,\n M: 40,\n L: 44,\n XL: 56\n }\n },\n borderRadius: {\n default: 'default',\n size: {\n XS: 'sm',\n S: 'sm'\n }\n },\n objectFit: 'cover',\n marginTop: {\n default: 0,\n ':is([slot=preview] + &)': '[calc(self(height) / -2)]'\n },\n outlineStyle: 'solid',\n outlineWidth: {\n default: 2,\n size: {\n XS: 1\n }\n },\n outlineColor: '--s2-container-bg'\n })({size})\n }\n }\n }],\n [FooterContext, {\n styles: mergeStyles(footer, style({\n justifyContent: 'end'\n }))\n }],\n [ButtonContext, {size: buttonSize[size]}],\n [LinkButtonContext, {size: buttonSize[size]}]\n ]}>\n {children}\n </Provider>\n ))}\n </Card>\n );\n});\n"],"names":[],"version":3,"file":"Card.cjs.map"}
|
package/dist/Card.css
CHANGED
|
@@ -57,32 +57,32 @@
|
|
|
57
57
|
cursor: pointer;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.
|
|
61
|
-
width: 7rem;
|
|
60
|
+
.ls {
|
|
61
|
+
width: calc(7rem * var(--s2-scale));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.
|
|
65
|
-
width: 12rem;
|
|
64
|
+
.lx {
|
|
65
|
+
width: calc(12rem * var(--s2-scale));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.
|
|
69
|
-
width: 15rem;
|
|
68
|
+
.lA {
|
|
69
|
+
width: calc(15rem * var(--s2-scale));
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.
|
|
73
|
-
width: 20rem;
|
|
72
|
+
.lD {
|
|
73
|
+
width: calc(20rem * var(--s2-scale));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.l-
|
|
77
|
-
width: 25rem;
|
|
76
|
+
.l-yr8gfg {
|
|
77
|
+
width: calc(25rem * var(--s2-scale));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.
|
|
80
|
+
.kG {
|
|
81
81
|
height: 100%;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.-nxovgr_E--
|
|
85
|
-
--card-spacing: .375rem;
|
|
84
|
+
.-nxovgr_E--ve8p9e {
|
|
85
|
+
--card-spacing: calc(.375rem * var(--s2-scale));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.-nxovgr_E-d {
|
|
@@ -375,8 +375,9 @@
|
|
|
375
375
|
align-content: space-between;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
.i-
|
|
379
|
-
row-gap: .375rem;
|
|
378
|
+
.i-ve8p9e {
|
|
379
|
+
row-gap: calc(.375rem * var(--s2-scale));
|
|
380
|
+
row-gap: calc(.375rem * var(--s2-scale));
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
.E-nxovgr {
|
|
@@ -551,16 +552,16 @@
|
|
|
551
552
|
aspect-ratio: 1;
|
|
552
553
|
}
|
|
553
554
|
|
|
554
|
-
.
|
|
555
|
+
.kF {
|
|
555
556
|
height: auto;
|
|
556
557
|
}
|
|
557
558
|
|
|
558
|
-
.
|
|
559
|
-
max-width: 10rem;
|
|
559
|
+
.rv {
|
|
560
|
+
max-width: calc(10rem * var(--s2-scale));
|
|
560
561
|
}
|
|
561
562
|
|
|
562
|
-
.
|
|
563
|
-
max-height: 10rem;
|
|
563
|
+
.pv {
|
|
564
|
+
max-height: calc(10rem * var(--s2-scale));
|
|
564
565
|
}
|
|
565
566
|
|
|
566
567
|
.l-3760fj {
|
|
@@ -571,7 +572,7 @@
|
|
|
571
572
|
aspect-ratio: 3;
|
|
572
573
|
}
|
|
573
574
|
|
|
574
|
-
.
|
|
575
|
+
.lG {
|
|
575
576
|
width: 100%;
|
|
576
577
|
}
|
|
577
578
|
|
|
@@ -592,24 +593,24 @@
|
|
|
592
593
|
user-select: none;
|
|
593
594
|
}
|
|
594
595
|
|
|
595
|
-
.
|
|
596
|
-
width: 1.5rem;
|
|
596
|
+
.lh {
|
|
597
|
+
width: calc(1.5rem * var(--s2-scale));
|
|
597
598
|
}
|
|
598
599
|
|
|
599
|
-
.
|
|
600
|
-
width: 2.25rem;
|
|
600
|
+
.lk {
|
|
601
|
+
width: calc(2.25rem * var(--s2-scale));
|
|
601
602
|
}
|
|
602
603
|
|
|
603
|
-
.
|
|
604
|
-
width: 2.5rem;
|
|
604
|
+
.ll {
|
|
605
|
+
width: calc(2.5rem * var(--s2-scale));
|
|
605
606
|
}
|
|
606
607
|
|
|
607
|
-
.
|
|
608
|
-
width: 2.75rem;
|
|
608
|
+
.lm {
|
|
609
|
+
width: calc(2.75rem * var(--s2-scale));
|
|
609
610
|
}
|
|
610
611
|
|
|
611
|
-
.
|
|
612
|
-
width: 3.5rem;
|
|
612
|
+
.lo {
|
|
613
|
+
width: calc(3.5rem * var(--s2-scale));
|
|
613
614
|
}
|
|
614
615
|
|
|
615
616
|
.k-375toq {
|
|
@@ -672,24 +673,24 @@
|
|
|
672
673
|
outline-color: var(--s2-container-bg);
|
|
673
674
|
}
|
|
674
675
|
|
|
675
|
-
.-_375toq_k-
|
|
676
|
-
--k: 1.5rem;
|
|
676
|
+
.-_375toq_k-h {
|
|
677
|
+
--k: calc(1.5rem * var(--s2-scale));
|
|
677
678
|
}
|
|
678
679
|
|
|
679
|
-
.-_375toq_k-
|
|
680
|
-
--k: 2.25rem;
|
|
680
|
+
.-_375toq_k-k {
|
|
681
|
+
--k: calc(2.25rem * var(--s2-scale));
|
|
681
682
|
}
|
|
682
683
|
|
|
683
|
-
.-_375toq_k-
|
|
684
|
-
--k: 2.5rem;
|
|
684
|
+
.-_375toq_k-l {
|
|
685
|
+
--k: calc(2.5rem * var(--s2-scale));
|
|
685
686
|
}
|
|
686
687
|
|
|
687
|
-
.-_375toq_k-
|
|
688
|
-
--k: 2.75rem;
|
|
688
|
+
.-_375toq_k-m {
|
|
689
|
+
--k: calc(2.75rem * var(--s2-scale));
|
|
689
690
|
}
|
|
690
691
|
|
|
691
|
-
.-_375toq_k-
|
|
692
|
-
--k: 3.5rem;
|
|
692
|
+
.-_375toq_k-o {
|
|
693
|
+
--k: calc(3.5rem * var(--s2-scale));
|
|
693
694
|
}
|
|
694
695
|
|
|
695
696
|
._2c {
|
|
@@ -810,30 +811,6 @@
|
|
|
810
811
|
|
|
811
812
|
@layer _.b.b {
|
|
812
813
|
@media not ((hover: hover) and (pointer: fine)) {
|
|
813
|
-
.lbH {
|
|
814
|
-
width: 8.75rem;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.lbQ {
|
|
818
|
-
width: 15rem;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
.lbV {
|
|
822
|
-
width: 18.75rem;
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
.lb0 {
|
|
826
|
-
width: 25rem;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
.lb-1eymhk2 {
|
|
830
|
-
width: 31.25rem;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.-nxovgr_E-b-1aa9md1 {
|
|
834
|
-
--card-spacing: .46875rem;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
814
|
._dbj {
|
|
838
815
|
font-size: 1.375rem;
|
|
839
816
|
}
|
|
@@ -853,58 +830,6 @@
|
|
|
853
830
|
._dbh {
|
|
854
831
|
font-size: 1.1875rem;
|
|
855
832
|
}
|
|
856
|
-
|
|
857
|
-
.ib-1aa9md1 {
|
|
858
|
-
row-gap: .46875rem;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
.rbM {
|
|
862
|
-
max-width: 12.5rem;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
.pbM {
|
|
866
|
-
max-height: 12.5rem;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
.lbn {
|
|
870
|
-
width: 1.875rem;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
.lbt {
|
|
874
|
-
width: 2.8125rem;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
.lbu {
|
|
878
|
-
width: 3.125rem;
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
.lbw {
|
|
882
|
-
width: 3.4375rem;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
.lbA {
|
|
886
|
-
width: 4.375rem;
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
.-_375toq_k-bn {
|
|
890
|
-
--k: 1.875rem;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
.-_375toq_k-bt {
|
|
894
|
-
--k: 2.8125rem;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
.-_375toq_k-bu {
|
|
898
|
-
--k: 3.125rem;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
.-_375toq_k-bw {
|
|
902
|
-
--k: 3.4375rem;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
.-_375toq_k-bA {
|
|
906
|
-
--k: 4.375rem;
|
|
907
|
-
}
|
|
908
833
|
}
|
|
909
834
|
}
|
|
910
835
|
|