@react-spectrum/s2 3.0.0-nightly-e228ed814-250129 → 3.0.0-nightly-016590a4a-250131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +3 -3
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.mjs +3 -3
- package/dist/ActionBar.cjs +47 -47
- package/dist/ActionBar.css +51 -51
- package/dist/ActionBar.mjs +47 -47
- package/dist/ActionButton.cjs +97 -97
- package/dist/ActionButton.css +96 -96
- package/dist/ActionButton.mjs +97 -97
- package/dist/ActionButtonGroup.cjs +11 -11
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +11 -11
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +14 -14
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +100 -100
- package/dist/AvatarGroup.css +34 -34
- package/dist/AvatarGroup.mjs +100 -100
- package/dist/Badge.cjs +92 -67
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +168 -92
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +92 -67
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +115 -115
- package/dist/Breadcrumbs.css +89 -89
- package/dist/Breadcrumbs.mjs +115 -115
- package/dist/Button.cjs +236 -152
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +309 -165
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +236 -152
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +19 -19
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +19 -19
- package/dist/Card.cjs +264 -261
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +210 -198
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +264 -261
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +15 -15
- package/dist/CardView.css +18 -18
- package/dist/CardView.mjs +15 -15
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +124 -73
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +201 -81
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +124 -73
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +49 -49
- package/dist/CheckboxGroup.css +41 -41
- package/dist/CheckboxGroup.mjs +49 -49
- package/dist/ClearButton.cjs +15 -15
- package/dist/ClearButton.css +17 -17
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.cjs +35 -35
- package/dist/CloseButton.css +33 -33
- package/dist/CloseButton.mjs +35 -35
- package/dist/ColorArea.cjs +22 -22
- package/dist/ColorArea.css +15 -15
- package/dist/ColorArea.mjs +22 -22
- package/dist/ColorField.cjs +38 -38
- package/dist/ColorField.css +32 -32
- package/dist/ColorField.mjs +38 -38
- package/dist/ColorHandle.cjs +27 -21
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +93 -45
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +27 -21
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +52 -52
- package/dist/ColorSlider.css +51 -51
- package/dist/ColorSlider.mjs +52 -52
- package/dist/ColorSwatch.cjs +27 -24
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +41 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +27 -24
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +23 -23
- package/dist/ColorSwatchPicker.css +60 -48
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +23 -23
- package/dist/ColorWheel.cjs +22 -22
- package/dist/ColorWheel.css +16 -16
- package/dist/ColorWheel.mjs +22 -22
- package/dist/ComboBox.cjs +80 -80
- package/dist/ComboBox.css +88 -88
- package/dist/ComboBox.mjs +80 -80
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +38 -38
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/CustomDialog.cjs +31 -31
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.mjs +31 -31
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.css +64 -64
- package/dist/Dialog.mjs +17 -17
- package/dist/Disclosure.cjs +111 -108
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +124 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +111 -108
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.css +16 -16
- package/dist/Divider.mjs +26 -26
- package/dist/DropZone.cjs +56 -47
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +80 -56
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +56 -47
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +204 -150
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +246 -150
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +204 -150
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.css +9 -9
- package/dist/Form.mjs +10 -10
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.css +72 -72
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/IllustratedMessage.cjs +134 -134
- package/dist/IllustratedMessage.css +69 -69
- package/dist/IllustratedMessage.mjs +134 -134
- package/dist/Image.cjs +12 -12
- package/dist/Image.css +13 -13
- package/dist/Image.mjs +12 -12
- package/dist/InlineAlert.cjs +104 -77
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +149 -77
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +104 -77
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs +31 -31
- package/dist/Link.css +30 -30
- package/dist/Link.mjs +31 -31
- package/dist/Menu.cjs +269 -264
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +152 -152
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +270 -265
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +85 -85
- package/dist/Meter.css +81 -81
- package/dist/Meter.mjs +85 -85
- package/dist/Modal.cjs +48 -48
- package/dist/Modal.css +46 -46
- package/dist/Modal.mjs +48 -48
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.css +114 -114
- package/dist/NumberField.mjs +115 -115
- package/dist/Picker.cjs +193 -175
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +223 -163
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +193 -175
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +84 -78
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +89 -65
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +84 -78
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +98 -98
- package/dist/ProgressBar.css +92 -92
- package/dist/ProgressBar.mjs +98 -98
- package/dist/ProgressCircle.cjs +17 -17
- package/dist/ProgressCircle.css +15 -15
- package/dist/ProgressCircle.mjs +17 -17
- package/dist/Provider.cjs +4 -4
- package/dist/Provider.css +5 -5
- package/dist/Provider.mjs +4 -4
- package/dist/Radio.cjs +152 -80
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +240 -96
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +152 -80
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +47 -47
- package/dist/RadioGroup.css +41 -41
- package/dist/RadioGroup.mjs +47 -47
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.css +47 -47
- package/dist/SearchField.mjs +42 -42
- package/dist/SegmentedControl.cjs +101 -89
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +140 -92
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +101 -89
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +229 -196
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +221 -149
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +229 -196
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +56 -56
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +56 -56
- package/dist/Switch.cjs +107 -74
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +141 -69
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +107 -74
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +280 -253
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -163
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +280 -253
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +493 -197
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +250 -134
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +494 -198
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +415 -0
- package/dist/TabsPicker.cjs.map +1 -0
- package/dist/TabsPicker.css +482 -0
- package/dist/TabsPicker.css.map +1 -0
- package/dist/TabsPicker.mjs +409 -0
- package/dist/TabsPicker.mjs.map +1 -0
- package/dist/TagGroup.cjs +148 -148
- package/dist/TagGroup.css +134 -134
- package/dist/TagGroup.mjs +148 -148
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.css +62 -62
- package/dist/TextField.mjs +59 -59
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.mjs +3 -3
- package/dist/Tooltip.cjs +60 -57
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +83 -71
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +60 -57
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +465 -0
- package/dist/TreeView.cjs.map +1 -0
- package/dist/TreeView.css +632 -0
- package/dist/TreeView.css.map +1 -0
- package/dist/TreeView.mjs +455 -0
- package/dist/TreeView.mjs.map +1 -0
- package/dist/main.cjs +4 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +3 -1
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +33 -8
- package/dist/types.d.ts.map +1 -1
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +5 -5
- package/icons/Skeleton.mjs +2 -2
- package/package.json +21 -19
- package/src/Badge.tsx +4 -1
- package/src/Content.tsx +2 -1
- package/src/Menu.tsx +2 -0
- package/src/Tabs.tsx +450 -144
- package/src/TabsPicker.tsx +350 -0
- package/src/TreeView.tsx +497 -0
- package/src/index.ts +2 -0
- package/style/__tests__/style-macro.test.js +18 -18
- package/style/dist/spectrum-theme.cjs +20 -10
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +20 -10
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +4 -0
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +18 -11
package/dist/DropZone.cjs
CHANGED
|
@@ -40,73 +40,82 @@ $parcel$export(module.exports, "DropZone", () => $797cda10ca96fc86$export$3c6489
|
|
|
40
40
|
const $797cda10ca96fc86$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $faaBC$react.createContext)(null);
|
|
41
41
|
const $797cda10ca96fc86$var$dropzone = function anonymous(props, overrides) {
|
|
42
42
|
let rules = " .";
|
|
43
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
43
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:B|C|D|E|__d|__c|g|_9|_8|__E|__g|__h|__e|__f|Y|__U|_b|_d|Z|_a|k|p|q|j|n|o)[^\s]+/g) || [];
|
|
44
44
|
rules += matches.join('');
|
|
45
|
-
let $
|
|
46
|
-
for (let p of matches)if (/^\s*
|
|
47
|
-
rules += ' _0d';
|
|
45
|
+
let $Y = false;
|
|
46
|
+
for (let p of matches)if (/^\s*Y/.test(p)) $Y = true;
|
|
48
47
|
rules += ' _3d';
|
|
49
|
-
rules += '
|
|
50
|
-
|
|
51
|
-
rules += '
|
|
52
|
-
rules += '
|
|
53
|
-
rules += '
|
|
54
|
-
rules += '
|
|
55
|
-
rules += '
|
|
56
|
-
rules += '
|
|
57
|
-
rules += '
|
|
58
|
-
rules += '
|
|
48
|
+
rules += ' _6d';
|
|
49
|
+
rules += ' _5c';
|
|
50
|
+
if (!$Y) rules += ' Yc';
|
|
51
|
+
rules += ' _g-bc1l9oh';
|
|
52
|
+
rules += ' _g-1uotwbwg';
|
|
53
|
+
rules += ' _g-eo0c6sf';
|
|
54
|
+
rules += ' _g-enzzrge';
|
|
55
|
+
rules += ' _g-enzykdd';
|
|
56
|
+
rules += ' _g-enzwzjc';
|
|
57
|
+
rules += ' _g-enzrfpb';
|
|
58
|
+
rules += ' _ga';
|
|
59
59
|
rules += ' ao';
|
|
60
|
-
if (props.isDropTarget) rules += '
|
|
61
|
-
else rules += '
|
|
60
|
+
if (props.isDropTarget) rules += ' za';
|
|
61
|
+
else rules += ' zb';
|
|
62
62
|
if (props.isDropTarget) rules += ' br';
|
|
63
|
+
rules += ' tc';
|
|
63
64
|
rules += ' uc';
|
|
64
|
-
rules += '
|
|
65
|
+
rules += ' rc';
|
|
65
66
|
rules += ' sc';
|
|
66
|
-
rules += '
|
|
67
|
-
if (props.
|
|
68
|
-
else
|
|
69
|
-
|
|
70
|
-
rules += '
|
|
71
|
-
rules += '
|
|
72
|
-
rules += '
|
|
67
|
+
if (props.isFocusVisible) rules += ' xx';
|
|
68
|
+
else if (props.isDropTarget) rules += ' xx';
|
|
69
|
+
else rules += ' xi';
|
|
70
|
+
if (props.isFocusVisible) rules += ' yx';
|
|
71
|
+
else if (props.isDropTarget) rules += ' yx';
|
|
72
|
+
else rules += ' yi';
|
|
73
|
+
if (props.isFocusVisible) rules += ' vx';
|
|
74
|
+
else if (props.isDropTarget) rules += ' vx';
|
|
75
|
+
else rules += ' vi';
|
|
76
|
+
if (props.isFocusVisible) rules += ' wx';
|
|
77
|
+
else if (props.isDropTarget) rules += ' wx';
|
|
78
|
+
else rules += ' wi';
|
|
73
79
|
rules += ' _zd';
|
|
74
|
-
rules += '
|
|
80
|
+
rules += ' _Ad';
|
|
81
|
+
rules += ' _Bd';
|
|
82
|
+
rules += ' _Cd';
|
|
83
|
+
rules += ' Hh';
|
|
84
|
+
rules += ' Ih';
|
|
75
85
|
rules += ' Fh';
|
|
76
|
-
rules += '
|
|
77
|
-
rules += ' Dh';
|
|
86
|
+
rules += ' Gh';
|
|
78
87
|
return rules;
|
|
79
88
|
};
|
|
80
89
|
const $797cda10ca96fc86$var$banner = function anonymous(props) {
|
|
81
90
|
let rules = " .";
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
rules += '
|
|
86
|
-
rules += '
|
|
87
|
-
rules += ' _0d';
|
|
88
|
-
rules += ' _2c';
|
|
91
|
+
rules += ' Ya';
|
|
92
|
+
rules += ' _ca';
|
|
93
|
+
rules += ' _ea';
|
|
94
|
+
rules += ' B_d';
|
|
95
|
+
rules += ' C_d';
|
|
89
96
|
rules += ' _3d';
|
|
90
|
-
rules += '
|
|
91
|
-
rules += '
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
rules += ' _5c';
|
|
98
|
+
rules += ' _6d';
|
|
99
|
+
rules += ' n-375tot';
|
|
100
|
+
rules += ' ke';
|
|
101
|
+
if (props.size === "L") rules += ' q___L';
|
|
102
|
+
else if (props.size === "S") rules += ' q__Z';
|
|
103
|
+
else rules += ' q___v';
|
|
95
104
|
if (props.isPressed) rules += ' b_____S';
|
|
96
105
|
else if (props.isFocusVisible) rules += ' b_____S';
|
|
97
106
|
else if (props.isHovered) rules += ' b_____S';
|
|
98
107
|
else rules += ' b_____R';
|
|
99
|
-
rules += ' _wc';
|
|
100
|
-
rules += ' _xc';
|
|
101
|
-
rules += ' _yc';
|
|
102
108
|
rules += ' _zc';
|
|
109
|
+
rules += ' _Ac';
|
|
110
|
+
rules += ' _Bc';
|
|
111
|
+
rules += ' _Cc';
|
|
103
112
|
rules += ' ac';
|
|
104
|
-
rules += '
|
|
105
|
-
rules += '
|
|
113
|
+
rules += ' _id';
|
|
114
|
+
rules += ' H-17c1d5h';
|
|
115
|
+
rules += ' I-17c1d5h';
|
|
106
116
|
rules += ' F-17c1d5h';
|
|
107
|
-
rules += '
|
|
108
|
-
rules += '
|
|
109
|
-
rules += ' -_375tou_o-I';
|
|
117
|
+
rules += ' G-17c1d5h';
|
|
118
|
+
rules += ' -_375tot_n-I';
|
|
110
119
|
return rules;
|
|
111
120
|
};
|
|
112
121
|
const $797cda10ca96fc86$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $faaBC$react.forwardRef)(function DropZone(props, ref) {
|
package/dist/DropZone.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA4D;AAEvG,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,0BAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BC,MAAM,2CAAW,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAClH,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,KACR,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,mCAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gCAAC,CAAA,GAAA,mDAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;kCAAE;wBAAI;kCACzG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gCAAC;wBAAI,WAAW,6BAAO;kCAAC;wBAAI;kCAC1B,cAAA,gCAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF","sources":["packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.cjs.map"}
|
package/dist/DropZone.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.Yc {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._ga {
|
|
7
7
|
font-family: adobe-clean-variable, adobe-clean, ui-sans-serif, system-ui, sans-serif;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
color: var(--lightningcss-light, #131313) var(--lightningcss-dark, #f2f2f2);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.zb {
|
|
15
15
|
border-style: dashed;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.za {
|
|
19
19
|
border-style: solid;
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -23,111 +23,135 @@
|
|
|
23
23
|
background-color: var(--lightningcss-light, #e5f0fe) var(--lightningcss-dark, #0f1c52);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.tc {
|
|
27
27
|
border-top-width: 2px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.uc {
|
|
31
31
|
border-bottom-width: 2px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.rc {
|
|
35
35
|
border-inline-start-width: 2px;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.sc {
|
|
39
39
|
border-inline-end-width: 2px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
43
|
-
border-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
42
|
+
.xi {
|
|
43
|
+
border-top-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.xx {
|
|
47
|
+
border-top-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.yi {
|
|
51
|
+
border-bottom-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.yx {
|
|
55
|
+
border-bottom-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.vi {
|
|
59
|
+
border-inline-start-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
44
60
|
}
|
|
45
61
|
|
|
46
|
-
.
|
|
47
|
-
border-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
62
|
+
.vx {
|
|
63
|
+
border-inline-start-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
48
64
|
}
|
|
49
65
|
|
|
50
|
-
.
|
|
66
|
+
.wi {
|
|
67
|
+
border-inline-end-color: var(--lightningcss-light, #dadada) var(--lightningcss-dark, #393939);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.wx {
|
|
71
|
+
border-inline-end-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
._zd {
|
|
51
75
|
border-start-start-radius: .625rem;
|
|
52
76
|
}
|
|
53
77
|
|
|
54
|
-
.
|
|
78
|
+
._Ad {
|
|
55
79
|
border-start-end-radius: .625rem;
|
|
56
80
|
}
|
|
57
81
|
|
|
58
|
-
.
|
|
82
|
+
._Bd {
|
|
59
83
|
border-end-start-radius: .625rem;
|
|
60
84
|
}
|
|
61
85
|
|
|
62
|
-
.
|
|
86
|
+
._Cd {
|
|
63
87
|
border-end-end-radius: .625rem;
|
|
64
88
|
}
|
|
65
89
|
|
|
66
|
-
.
|
|
90
|
+
.Hh {
|
|
67
91
|
padding-top: 1.5rem;
|
|
68
92
|
}
|
|
69
93
|
|
|
70
|
-
.
|
|
94
|
+
.Ih {
|
|
71
95
|
padding-bottom: 1.5rem;
|
|
72
96
|
}
|
|
73
97
|
|
|
74
|
-
.
|
|
98
|
+
.Fh {
|
|
75
99
|
padding-inline-start: 1.5rem;
|
|
76
100
|
}
|
|
77
101
|
|
|
78
|
-
.
|
|
102
|
+
.Gh {
|
|
79
103
|
padding-inline-end: 1.5rem;
|
|
80
104
|
}
|
|
81
105
|
|
|
82
|
-
.
|
|
106
|
+
.Ya {
|
|
83
107
|
position: absolute;
|
|
84
108
|
}
|
|
85
109
|
|
|
86
|
-
.
|
|
110
|
+
._ca {
|
|
87
111
|
left: 0;
|
|
88
112
|
}
|
|
89
113
|
|
|
90
|
-
.
|
|
114
|
+
._ea {
|
|
91
115
|
right: 0;
|
|
92
116
|
}
|
|
93
117
|
|
|
94
|
-
.
|
|
118
|
+
.B_d {
|
|
95
119
|
margin-inline-start: auto;
|
|
96
120
|
}
|
|
97
121
|
|
|
98
|
-
.
|
|
122
|
+
.C_d {
|
|
99
123
|
margin-inline-end: auto;
|
|
100
124
|
}
|
|
101
125
|
|
|
102
|
-
.
|
|
126
|
+
._3d {
|
|
103
127
|
display: flex;
|
|
104
128
|
}
|
|
105
129
|
|
|
106
|
-
.
|
|
130
|
+
._5c {
|
|
107
131
|
align-items: center;
|
|
108
132
|
}
|
|
109
133
|
|
|
110
|
-
.
|
|
134
|
+
._6d {
|
|
111
135
|
justify-content: center;
|
|
112
136
|
}
|
|
113
137
|
|
|
114
|
-
.
|
|
115
|
-
min-height: var(--
|
|
138
|
+
.n-375tot {
|
|
139
|
+
min-height: var(--n);
|
|
116
140
|
}
|
|
117
141
|
|
|
118
|
-
.
|
|
142
|
+
.ke {
|
|
119
143
|
width: fit-content;
|
|
120
144
|
}
|
|
121
145
|
|
|
122
|
-
.
|
|
146
|
+
.q___v {
|
|
123
147
|
max-width: calc(12rem * var(--s2-scale));
|
|
124
148
|
}
|
|
125
149
|
|
|
126
|
-
.
|
|
150
|
+
.q__Z {
|
|
127
151
|
max-width: calc(10rem * var(--s2-scale));
|
|
128
152
|
}
|
|
129
153
|
|
|
130
|
-
.
|
|
154
|
+
.q___L {
|
|
131
155
|
max-width: calc(13rem * var(--s2-scale));
|
|
132
156
|
}
|
|
133
157
|
|
|
@@ -139,19 +163,19 @@
|
|
|
139
163
|
background-color: var(--lightningcss-light, #274dea) var(--lightningcss-dark, #345bf8);
|
|
140
164
|
}
|
|
141
165
|
|
|
142
|
-
.
|
|
166
|
+
._zc {
|
|
143
167
|
border-start-start-radius: .5rem;
|
|
144
168
|
}
|
|
145
169
|
|
|
146
|
-
.
|
|
170
|
+
._Ac {
|
|
147
171
|
border-start-end-radius: .5rem;
|
|
148
172
|
}
|
|
149
173
|
|
|
150
|
-
.
|
|
174
|
+
._Bc {
|
|
151
175
|
border-end-start-radius: .5rem;
|
|
152
176
|
}
|
|
153
177
|
|
|
154
|
-
.
|
|
178
|
+
._Cc {
|
|
155
179
|
border-end-end-radius: .5rem;
|
|
156
180
|
}
|
|
157
181
|
|
|
@@ -159,71 +183,71 @@
|
|
|
159
183
|
color: #fff;
|
|
160
184
|
}
|
|
161
185
|
|
|
162
|
-
.
|
|
186
|
+
._id {
|
|
163
187
|
font-variation-settings: "wght" 700;
|
|
164
188
|
font-synthesis-weight: none;
|
|
165
189
|
font-weight: 700;
|
|
166
190
|
}
|
|
167
191
|
|
|
168
|
-
.
|
|
169
|
-
padding-top: calc((var(--
|
|
192
|
+
.H-17c1d5h {
|
|
193
|
+
padding-top: calc((var(--n)) / 1.5);
|
|
170
194
|
}
|
|
171
195
|
|
|
172
|
-
.
|
|
173
|
-
padding-bottom: calc((var(--
|
|
196
|
+
.I-17c1d5h {
|
|
197
|
+
padding-bottom: calc((var(--n)) / 1.5);
|
|
174
198
|
}
|
|
175
199
|
|
|
176
|
-
.
|
|
177
|
-
padding-inline-start: calc((var(--
|
|
200
|
+
.F-17c1d5h {
|
|
201
|
+
padding-inline-start: calc((var(--n)) / 1.5);
|
|
178
202
|
}
|
|
179
203
|
|
|
180
|
-
.
|
|
181
|
-
padding-inline-end: calc((var(--
|
|
204
|
+
.G-17c1d5h {
|
|
205
|
+
padding-inline-end: calc((var(--n)) / 1.5);
|
|
182
206
|
}
|
|
183
207
|
|
|
184
|
-
.-
|
|
185
|
-
--
|
|
208
|
+
.-_375tot_n-I {
|
|
209
|
+
--n: calc(1.25rem * var(--s2-scale));
|
|
186
210
|
}
|
|
187
211
|
}
|
|
188
212
|
|
|
189
213
|
@layer _.b {
|
|
190
|
-
.
|
|
214
|
+
._g-enzrfpb:lang(ar) {
|
|
191
215
|
font-family: myriad-arabic, ui-sans-serif, system-ui, sans-serif;
|
|
192
216
|
}
|
|
193
217
|
}
|
|
194
218
|
|
|
195
219
|
@layer _.c {
|
|
196
|
-
.
|
|
220
|
+
._g-enzwzjc:lang(he) {
|
|
197
221
|
font-family: myriad-hebrew, ui-sans-serif, system-ui, sans-serif;
|
|
198
222
|
}
|
|
199
223
|
}
|
|
200
224
|
|
|
201
225
|
@layer _.d {
|
|
202
|
-
.
|
|
226
|
+
._g-enzykdd:lang(ja) {
|
|
203
227
|
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
204
228
|
}
|
|
205
229
|
}
|
|
206
230
|
|
|
207
231
|
@layer _.e {
|
|
208
|
-
.
|
|
232
|
+
._g-enzzrge:lang(ko) {
|
|
209
233
|
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
210
234
|
}
|
|
211
235
|
}
|
|
212
236
|
|
|
213
237
|
@layer _.f {
|
|
214
|
-
.
|
|
238
|
+
._g-eo0c6sf:lang(zh) {
|
|
215
239
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
216
240
|
}
|
|
217
241
|
}
|
|
218
242
|
|
|
219
243
|
@layer _.g {
|
|
220
|
-
.
|
|
244
|
+
._g-1uotwbwg:lang(zh-hant) {
|
|
221
245
|
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
222
246
|
}
|
|
223
247
|
}
|
|
224
248
|
|
|
225
249
|
@layer _.h {
|
|
226
|
-
.
|
|
250
|
+
._g-bc1l9oh:is(:lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
227
251
|
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
228
252
|
}
|
|
229
253
|
}
|
package/dist/DropZone.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AC2CiB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBF;;;;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;;;;;AAxBE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["1c1855bb3a6aeea4","packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["@import \"ab564bdb126b567b\";\n@import \"d5049ba06c2da1c6\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.css.map"}
|
|
1
|
+
{"mappings":"AC2CiB;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;;;;EAwBF;;;;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;;;;;AAxBE;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA","sources":["1c1855bb3a6aeea4","packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["@import \"ab564bdb126b567b\";\n@import \"d5049ba06c2da1c6\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.css.map"}
|
package/dist/DropZone.mjs
CHANGED
|
@@ -33,73 +33,82 @@ function $parcel$interopDefault(a) {
|
|
|
33
33
|
const $fb6e45fba2483f65$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $4h9kk$createContext)(null);
|
|
34
34
|
const $fb6e45fba2483f65$var$dropzone = function anonymous(props, overrides) {
|
|
35
35
|
let rules = " .";
|
|
36
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
36
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:B|C|D|E|__d|__c|g|_9|_8|__E|__g|__h|__e|__f|Y|__U|_b|_d|Z|_a|k|p|q|j|n|o)[^\s]+/g) || [];
|
|
37
37
|
rules += matches.join('');
|
|
38
|
-
let $
|
|
39
|
-
for (let p of matches)if (/^\s*
|
|
40
|
-
rules += ' _0d';
|
|
38
|
+
let $Y = false;
|
|
39
|
+
for (let p of matches)if (/^\s*Y/.test(p)) $Y = true;
|
|
41
40
|
rules += ' _3d';
|
|
42
|
-
rules += '
|
|
43
|
-
|
|
44
|
-
rules += '
|
|
45
|
-
rules += '
|
|
46
|
-
rules += '
|
|
47
|
-
rules += '
|
|
48
|
-
rules += '
|
|
49
|
-
rules += '
|
|
50
|
-
rules += '
|
|
51
|
-
rules += '
|
|
41
|
+
rules += ' _6d';
|
|
42
|
+
rules += ' _5c';
|
|
43
|
+
if (!$Y) rules += ' Yc';
|
|
44
|
+
rules += ' _g-bc1l9oh';
|
|
45
|
+
rules += ' _g-1uotwbwg';
|
|
46
|
+
rules += ' _g-eo0c6sf';
|
|
47
|
+
rules += ' _g-enzzrge';
|
|
48
|
+
rules += ' _g-enzykdd';
|
|
49
|
+
rules += ' _g-enzwzjc';
|
|
50
|
+
rules += ' _g-enzrfpb';
|
|
51
|
+
rules += ' _ga';
|
|
52
52
|
rules += ' ao';
|
|
53
|
-
if (props.isDropTarget) rules += '
|
|
54
|
-
else rules += '
|
|
53
|
+
if (props.isDropTarget) rules += ' za';
|
|
54
|
+
else rules += ' zb';
|
|
55
55
|
if (props.isDropTarget) rules += ' br';
|
|
56
|
+
rules += ' tc';
|
|
56
57
|
rules += ' uc';
|
|
57
|
-
rules += '
|
|
58
|
+
rules += ' rc';
|
|
58
59
|
rules += ' sc';
|
|
59
|
-
rules += '
|
|
60
|
-
if (props.
|
|
61
|
-
else
|
|
62
|
-
|
|
63
|
-
rules += '
|
|
64
|
-
rules += '
|
|
65
|
-
rules += '
|
|
60
|
+
if (props.isFocusVisible) rules += ' xx';
|
|
61
|
+
else if (props.isDropTarget) rules += ' xx';
|
|
62
|
+
else rules += ' xi';
|
|
63
|
+
if (props.isFocusVisible) rules += ' yx';
|
|
64
|
+
else if (props.isDropTarget) rules += ' yx';
|
|
65
|
+
else rules += ' yi';
|
|
66
|
+
if (props.isFocusVisible) rules += ' vx';
|
|
67
|
+
else if (props.isDropTarget) rules += ' vx';
|
|
68
|
+
else rules += ' vi';
|
|
69
|
+
if (props.isFocusVisible) rules += ' wx';
|
|
70
|
+
else if (props.isDropTarget) rules += ' wx';
|
|
71
|
+
else rules += ' wi';
|
|
66
72
|
rules += ' _zd';
|
|
67
|
-
rules += '
|
|
73
|
+
rules += ' _Ad';
|
|
74
|
+
rules += ' _Bd';
|
|
75
|
+
rules += ' _Cd';
|
|
76
|
+
rules += ' Hh';
|
|
77
|
+
rules += ' Ih';
|
|
68
78
|
rules += ' Fh';
|
|
69
|
-
rules += '
|
|
70
|
-
rules += ' Dh';
|
|
79
|
+
rules += ' Gh';
|
|
71
80
|
return rules;
|
|
72
81
|
};
|
|
73
82
|
const $fb6e45fba2483f65$var$banner = function anonymous(props) {
|
|
74
83
|
let rules = " .";
|
|
75
|
-
rules += '
|
|
76
|
-
rules += '
|
|
77
|
-
rules += '
|
|
78
|
-
rules += '
|
|
79
|
-
rules += '
|
|
80
|
-
rules += ' _0d';
|
|
81
|
-
rules += ' _2c';
|
|
84
|
+
rules += ' Ya';
|
|
85
|
+
rules += ' _ca';
|
|
86
|
+
rules += ' _ea';
|
|
87
|
+
rules += ' B_d';
|
|
88
|
+
rules += ' C_d';
|
|
82
89
|
rules += ' _3d';
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
rules += ' _5c';
|
|
91
|
+
rules += ' _6d';
|
|
92
|
+
rules += ' n-375tot';
|
|
93
|
+
rules += ' ke';
|
|
94
|
+
if (props.size === "L") rules += ' q___L';
|
|
95
|
+
else if (props.size === "S") rules += ' q__Z';
|
|
96
|
+
else rules += ' q___v';
|
|
88
97
|
if (props.isPressed) rules += ' b_____S';
|
|
89
98
|
else if (props.isFocusVisible) rules += ' b_____S';
|
|
90
99
|
else if (props.isHovered) rules += ' b_____S';
|
|
91
100
|
else rules += ' b_____R';
|
|
92
|
-
rules += ' _wc';
|
|
93
|
-
rules += ' _xc';
|
|
94
|
-
rules += ' _yc';
|
|
95
101
|
rules += ' _zc';
|
|
102
|
+
rules += ' _Ac';
|
|
103
|
+
rules += ' _Bc';
|
|
104
|
+
rules += ' _Cc';
|
|
96
105
|
rules += ' ac';
|
|
97
|
-
rules += '
|
|
98
|
-
rules += '
|
|
106
|
+
rules += ' _id';
|
|
107
|
+
rules += ' H-17c1d5h';
|
|
108
|
+
rules += ' I-17c1d5h';
|
|
99
109
|
rules += ' F-17c1d5h';
|
|
100
|
-
rules += '
|
|
101
|
-
rules += '
|
|
102
|
-
rules += ' -_375tou_o-I';
|
|
110
|
+
rules += ' G-17c1d5h';
|
|
111
|
+
rules += ' -_375tot_n-I';
|
|
103
112
|
return rules;
|
|
104
113
|
};
|
|
105
114
|
const $fb6e45fba2483f65$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $4h9kk$forwardRef)(function DropZone(props, ref) {
|
package/dist/DropZone.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA4D;AAEvG,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AA+BM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAA4D;AAEvG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BC,MAAM,2CAAW,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAClH,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,QACF,OAAO,KACR,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,eAAU;QACR,GAAG,KAAK;QACT,KAAK;QACL,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,+BAAS,aAAa,MAAM,MAAM;kBAC5F,CAAA,4BACC;;kCACE,gBAAC,CAAA,GAAA,yCAAwB,EAAE,QAAQ;wBAAC,OAAO;4BAAC,cAAc;4BAAM,cAAc,YAAY,YAAY;kCAAE;wBAAI;kCACzG,MAAM,QAAQ;;oBAEf,YAAY,YAAY,IAAI,MAAM,QAAQ,kBAC1C,gBAAC;wBAAI,WAAW,6BAAO;kCAAC;wBAAI;kCAC1B,cAAA,gBAAC;sCACE,MAAM,cAAc,GAAG,MAAM,cAAc,GAAG,gBAAgB,MAAM,CAAC;;;;;;AAQtF","sources":["packages/@react-spectrum/s2/src/DropZone.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ContextValue, DropZoneRenderProps, DropZone as RACDropZone, DropZoneProps as RACDropZoneProps} from 'react-aria-components';\nimport {createContext, forwardRef, ReactNode} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {IllustratedMessageContext} from './IllustratedMessage';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DropZoneProps extends Omit<RACDropZoneProps, 'className' | 'style' | 'children' | 'isDisabled' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, UnsafeStyles, DOMProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The content to display in the drop zone. */\n children?: ReactNode,\n /** Whether the drop zone has been filled. */\n isFilled?: boolean,\n /** The message to replace the default banner message that is shown when the drop zone is filled. */\n replaceMessage?: string,\n /**\n * The size of the DropZone.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L'\n}\n\nexport const DropZoneContext = createContext<ContextValue<DropZoneProps, DOMRefValue<HTMLDivElement>>>(null);\n\nconst dropzone = style<DropZoneRenderProps>({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n position: 'relative',\n fontFamily: 'sans',\n color: 'gray-900',\n borderStyle: {\n default: 'dashed',\n isDropTarget: 'solid'\n },\n backgroundColor: {\n isDropTarget: 'blue-200'\n },\n borderWidth: 2,\n borderColor: {\n default: 'gray-300',\n isDropTarget: 'blue-800',\n isFocusVisible: 'blue-800'\n },\n borderRadius: 'lg',\n padding: 24\n}, getAllowedOverrides({height: true}));\n\nconst banner = style({\n position: 'absolute',\n left: 0,\n right: 0,\n marginX: 'auto',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 20,\n width: 'fit',\n maxWidth: {\n default: 192,\n size: {\n S: 160,\n L: 208\n }\n },\n backgroundColor: 'accent',\n borderRadius: 'default',\n color: 'white',\n fontWeight: 'bold',\n padding: '[calc((self(minHeight))/1.5)]'\n});\n\n/**\n * A drop zone is an area into which one or multiple objects can be dragged and dropped.\n */\nexport const DropZone = /*#__PURE__*/ forwardRef(function DropZone(props: DropZoneProps, ref: DOMRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, DropZoneContext);\n let {\n size = 'M'\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <RACDropZone\n {...props}\n ref={domRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + dropzone(renderProps, props.styles)}>\n {renderProps => (\n <>\n <IllustratedMessageContext.Provider value={{isInDropZone: true, isDropTarget: renderProps.isDropTarget, size}}>\n {props.children}\n </IllustratedMessageContext.Provider>\n {(renderProps.isDropTarget && props.isFilled) &&\n <div className={banner({size})}>\n <span>\n {props.replaceMessage ? props.replaceMessage : stringFormatter.format('dropzone.replaceMessage')}\n </span>\n </div>\n }\n </>\n )}\n </RACDropZone>\n );\n});\n"],"names":[],"version":3,"file":"DropZone.mjs.map"}
|