@react-spectrum/s2 3.0.0-nightly-fd7075c5f-250128 → 3.0.0-nightly-e3ed3c7f6-250130
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 +91 -67
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +163 -91
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +91 -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/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 +83 -83
- package/dist/Tabs.css +58 -58
- package/dist/Tabs.mjs +83 -83
- 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 +21 -1
- 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 +20 -19
- package/src/Menu.tsx +2 -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/Picker.cjs
CHANGED
|
@@ -61,57 +61,57 @@ $parcel$export(module.exports, "PickerSection", () => $b9c30139cd63c62a$export$a
|
|
|
61
61
|
const $b9c30139cd63c62a$export$b72b8dade9393cd5 = /*#__PURE__*/ (0, $ceqeb$react.createContext)(null);
|
|
62
62
|
const $b9c30139cd63c62a$var$inputButton = function anonymous(props) {
|
|
63
63
|
let rules = " .";
|
|
64
|
-
if (props.isQuiet) rules += '
|
|
65
|
-
else if (props.isFocusVisible) rules += '
|
|
66
|
-
else rules += '
|
|
67
|
-
rules += '
|
|
68
|
-
rules += '
|
|
69
|
-
rules += '
|
|
70
|
-
rules += '
|
|
71
|
-
rules += ' __b-g2ozi1';
|
|
72
|
-
rules += ' __c-g2ozi1';
|
|
73
|
-
rules += ' __d-g2ozi1';
|
|
64
|
+
if (props.isQuiet) rules += ' _Pa';
|
|
65
|
+
else if (props.isFocusVisible) rules += ' _Pb';
|
|
66
|
+
else rules += ' _Pa';
|
|
67
|
+
rules += ' ca_____M';
|
|
68
|
+
rules += ' cx';
|
|
69
|
+
rules += ' _Rc';
|
|
70
|
+
rules += ' _Q-3t1z';
|
|
74
71
|
rules += ' __e-g2ozi1';
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
else rules += '
|
|
80
|
-
if (props.
|
|
81
|
-
else rules += '
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
else
|
|
85
|
-
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
88
|
-
rules += '
|
|
89
|
-
rules += '
|
|
90
|
-
rules += '
|
|
91
|
-
rules += '
|
|
92
|
-
rules += '
|
|
93
|
-
rules += '
|
|
94
|
-
rules += '
|
|
95
|
-
rules += '
|
|
72
|
+
rules += ' __f-g2ozi1';
|
|
73
|
+
rules += ' __g-g2ozi1';
|
|
74
|
+
rules += ' __h-g2ozi1';
|
|
75
|
+
if (props.size === "XL") rules += ' pj';
|
|
76
|
+
else if (props.size === "L") rules += ' pi';
|
|
77
|
+
else if (props.size === "S") rules += ' ph';
|
|
78
|
+
else if (props.size === "XS") rules += ' pg';
|
|
79
|
+
else rules += ' pf';
|
|
80
|
+
if (props.isQuiet) rules += ' __qa';
|
|
81
|
+
else rules += ' __q-1s8glxue';
|
|
82
|
+
if (props.size === "XL") rules += ' -usygro_k-____g';
|
|
83
|
+
else if (props.size === "L") rules += ' -usygro_k-___0';
|
|
84
|
+
else if (props.size === "S") rules += ' -usygro_k-___u';
|
|
85
|
+
else rules += ' -usygro_k-___K';
|
|
86
|
+
rules += ' l-rwozxi';
|
|
87
|
+
rules += ' Yc';
|
|
88
|
+
rules += ' _g-bc1l9oh';
|
|
89
|
+
rules += ' _g-1uotwbwg';
|
|
90
|
+
rules += ' _g-eo0c6sf';
|
|
91
|
+
rules += ' _g-enzzrge';
|
|
92
|
+
rules += ' _g-enzykdd';
|
|
93
|
+
rules += ' _g-enzwzjc';
|
|
94
|
+
rules += ' _g-enzrfpb';
|
|
95
|
+
rules += ' _ga';
|
|
96
96
|
if (props.size === "XL") {
|
|
97
|
-
rules += '
|
|
98
|
-
rules += '
|
|
97
|
+
rules += ' _hbj';
|
|
98
|
+
rules += ' _hi';
|
|
99
99
|
} else if (props.size === "L") {
|
|
100
|
-
rules += '
|
|
101
|
-
rules += '
|
|
100
|
+
rules += ' _hbh';
|
|
101
|
+
rules += ' _hg';
|
|
102
102
|
} else if (props.size === "S") {
|
|
103
|
-
rules += '
|
|
104
|
-
rules += '
|
|
103
|
+
rules += ' _hbd';
|
|
104
|
+
rules += ' _hc';
|
|
105
105
|
} else if (props.size === "XS") {
|
|
106
|
-
rules += '
|
|
107
|
-
rules += '
|
|
106
|
+
rules += ' _hbb';
|
|
107
|
+
rules += ' _ha';
|
|
108
108
|
} else {
|
|
109
|
-
rules += '
|
|
110
|
-
rules += '
|
|
109
|
+
rules += ' _hbf';
|
|
110
|
+
rules += ' _he';
|
|
111
111
|
}
|
|
112
|
-
rules += '
|
|
113
|
-
rules += '
|
|
114
|
-
rules += '
|
|
112
|
+
rules += ' _ib';
|
|
113
|
+
rules += ' _j-1x99dlob';
|
|
114
|
+
rules += ' _ja';
|
|
115
115
|
if (props.isDisabled) rules += ' aj';
|
|
116
116
|
else {
|
|
117
117
|
if (props.isPressed) rules += ' ao';
|
|
@@ -119,27 +119,33 @@ const $b9c30139cd63c62a$var$inputButton = function anonymous(props) {
|
|
|
119
119
|
else if (props.isHovered) rules += ' ao';
|
|
120
120
|
else rules += ' an';
|
|
121
121
|
}
|
|
122
|
-
rules += '
|
|
123
|
-
rules += '
|
|
124
|
-
rules += '
|
|
125
|
-
rules += '
|
|
126
|
-
if (props.isDisabled) rules += '
|
|
127
|
-
else rules += '
|
|
128
|
-
rules += '
|
|
129
|
-
rules += '
|
|
130
|
-
rules += '
|
|
122
|
+
rules += ' _3d';
|
|
123
|
+
rules += ' _na';
|
|
124
|
+
rules += ' zaa';
|
|
125
|
+
rules += ' zf';
|
|
126
|
+
if (props.isDisabled) rules += ' xa_____O';
|
|
127
|
+
else rules += ' xa_____K';
|
|
128
|
+
if (props.isDisabled) rules += ' ya_____O';
|
|
129
|
+
else rules += ' ya_____K';
|
|
130
|
+
if (props.isDisabled) rules += ' va_____O';
|
|
131
|
+
else rules += ' va_____K';
|
|
132
|
+
if (props.isDisabled) rules += ' wa_____O';
|
|
133
|
+
else rules += ' wa_____K';
|
|
131
134
|
rules += ' _zh';
|
|
132
|
-
rules += '
|
|
133
|
-
rules += '
|
|
134
|
-
rules += '
|
|
135
|
-
rules += '
|
|
135
|
+
rules += ' _Ah';
|
|
136
|
+
rules += ' _Bh';
|
|
137
|
+
rules += ' _Ch';
|
|
138
|
+
rules += ' _5c';
|
|
139
|
+
rules += ' j-375top';
|
|
136
140
|
rules += ' _Sa';
|
|
141
|
+
rules += ' _U-375x7f';
|
|
142
|
+
rules += ' _Va';
|
|
137
143
|
if (props.isQuiet) {
|
|
138
|
-
rules += '
|
|
139
|
-
rules += '
|
|
140
|
-
} else rules += '
|
|
141
|
-
rules += '
|
|
142
|
-
rules += '
|
|
144
|
+
rules += ' ibH';
|
|
145
|
+
rules += ' iG';
|
|
146
|
+
} else rules += ' iF';
|
|
147
|
+
rules += ' F-375tnp';
|
|
148
|
+
rules += ' G-375tnq';
|
|
143
149
|
if (props.isQuiet) rules += ' ba';
|
|
144
150
|
else if (props.isDisabled) rules += ' bg';
|
|
145
151
|
else if (props.isOpen) rules += ' bh';
|
|
@@ -149,101 +155,113 @@ const $b9c30139cd63c62a$var$inputButton = function anonymous(props) {
|
|
|
149
155
|
else if (props.isHovered) rules += ' bh';
|
|
150
156
|
else rules += ' bg';
|
|
151
157
|
}
|
|
152
|
-
if (props.isQuiet) rules += '
|
|
153
|
-
rules += '
|
|
154
|
-
if (props.isQuiet) rules += ' -
|
|
155
|
-
else rules += ' -
|
|
156
|
-
if (props.isQuiet) rules += ' -
|
|
157
|
-
else rules += ' -
|
|
158
|
-
if (props.size === "XL") rules += ' -
|
|
159
|
-
else if (props.size === "L") rules += ' -
|
|
160
|
-
else if (props.size === "S") rules += ' -
|
|
161
|
-
else if (props.size === "XS") rules += ' -
|
|
162
|
-
else rules += ' -
|
|
158
|
+
if (props.isQuiet) rules += ' qd';
|
|
159
|
+
rules += ' __V-yksgrp';
|
|
160
|
+
if (props.isQuiet) rules += ' -_375tnp_F-a';
|
|
161
|
+
else rules += ' -_375tnp_F-I';
|
|
162
|
+
if (props.isQuiet) rules += ' -_375tnq_G-a';
|
|
163
|
+
else rules += ' -_375tnq_G-I';
|
|
164
|
+
if (props.size === "XL") rules += ' -_375top_j-j';
|
|
165
|
+
else if (props.size === "L") rules += ' -_375top_j-i';
|
|
166
|
+
else if (props.size === "S") rules += ' -_375top_j-h';
|
|
167
|
+
else if (props.size === "XS") rules += ' -_375top_j-g';
|
|
168
|
+
else rules += ' -_375top_j-f';
|
|
163
169
|
return rules;
|
|
164
170
|
};
|
|
165
|
-
const $b9c30139cd63c62a$var$quietFocusLine = "
|
|
171
|
+
const $b9c30139cd63c62a$var$quietFocusLine = " kb j-375zlr Ya _da _zf _Af _Bf _Cf bx ba_____M";
|
|
166
172
|
let $b9c30139cd63c62a$export$b1e5508a851be14d = function anonymous(props) {
|
|
167
173
|
let rules = " .";
|
|
168
|
-
rules += '
|
|
169
|
-
rules += '
|
|
170
|
-
if (props.size === "XL") rules += '
|
|
171
|
-
else if (props.size === "L") rules += '
|
|
172
|
-
else if (props.size === "M") rules += '
|
|
173
|
-
else if (props.size === "S") rules += '
|
|
174
|
-
rules += '
|
|
175
|
-
rules += '
|
|
176
|
-
rules += '
|
|
177
|
-
rules += '
|
|
178
|
-
rules += '
|
|
174
|
+
rules += ' _Pa';
|
|
175
|
+
rules += ' _3f';
|
|
176
|
+
if (props.size === "XL") rules += ' __l-14g31og';
|
|
177
|
+
else if (props.size === "L") rules += ' __l-1pqbi84';
|
|
178
|
+
else if (props.size === "M") rules += ' __l-n6rb9a';
|
|
179
|
+
else if (props.size === "S") rules += ' __l-iov3cy';
|
|
180
|
+
rules += ' __ra';
|
|
181
|
+
rules += ' o-17zqamw';
|
|
182
|
+
rules += ' __za';
|
|
183
|
+
rules += ' __Aa';
|
|
184
|
+
rules += ' Hd';
|
|
185
|
+
rules += ' Id';
|
|
179
186
|
rules += ' Fd';
|
|
180
|
-
rules += '
|
|
181
|
-
rules += '
|
|
182
|
-
rules += '
|
|
183
|
-
rules += '
|
|
184
|
-
rules += '
|
|
185
|
-
rules += '
|
|
186
|
-
rules += '
|
|
187
|
-
rules += '
|
|
188
|
-
rules += '
|
|
189
|
-
rules += ' _da';
|
|
187
|
+
rules += ' Gd';
|
|
188
|
+
rules += ' _g-bc1l9oh';
|
|
189
|
+
rules += ' _g-1uotwbwg';
|
|
190
|
+
rules += ' _g-eo0c6sf';
|
|
191
|
+
rules += ' _g-enzzrge';
|
|
192
|
+
rules += ' _g-enzykdd';
|
|
193
|
+
rules += ' _g-enzwzjc';
|
|
194
|
+
rules += ' _g-enzrfpb';
|
|
195
|
+
rules += ' _ga';
|
|
190
196
|
if (props.size === "XL") {
|
|
191
|
-
rules += '
|
|
192
|
-
rules += '
|
|
197
|
+
rules += ' _hbj';
|
|
198
|
+
rules += ' _hi';
|
|
193
199
|
} else if (props.size === "L") {
|
|
194
|
-
rules += '
|
|
195
|
-
rules += '
|
|
200
|
+
rules += ' _hbh';
|
|
201
|
+
rules += ' _hg';
|
|
196
202
|
} else if (props.size === "S") {
|
|
197
|
-
rules += '
|
|
198
|
-
rules += '
|
|
203
|
+
rules += ' _hbd';
|
|
204
|
+
rules += ' _hc';
|
|
199
205
|
} else if (props.size === "XS") {
|
|
200
|
-
rules += '
|
|
201
|
-
rules += '
|
|
206
|
+
rules += ' _hbb';
|
|
207
|
+
rules += ' _ha';
|
|
202
208
|
} else {
|
|
203
|
-
rules += '
|
|
204
|
-
rules += '
|
|
209
|
+
rules += ' _hbf';
|
|
210
|
+
rules += ' _he';
|
|
205
211
|
}
|
|
206
212
|
return rules;
|
|
207
213
|
};
|
|
208
214
|
const $b9c30139cd63c62a$var$invalidBorder = function anonymous(props) {
|
|
209
215
|
let rules = " .";
|
|
210
|
-
rules += ' Va';
|
|
211
216
|
rules += ' Ya';
|
|
212
|
-
rules += ' Za';
|
|
213
|
-
rules += ' _aa';
|
|
214
217
|
rules += ' _ba';
|
|
215
|
-
rules += '
|
|
216
|
-
rules += '
|
|
217
|
-
rules += '
|
|
218
|
-
rules += '
|
|
218
|
+
rules += ' _ca';
|
|
219
|
+
rules += ' _da';
|
|
220
|
+
rules += ' _ea';
|
|
221
|
+
rules += ' __Fa';
|
|
219
222
|
rules += ' _zh';
|
|
220
|
-
rules += '
|
|
223
|
+
rules += ' _Ah';
|
|
224
|
+
rules += ' _Bh';
|
|
225
|
+
rules += ' _Ch';
|
|
226
|
+
rules += ' za';
|
|
227
|
+
rules += ' tc';
|
|
221
228
|
rules += ' uc';
|
|
222
|
-
rules += '
|
|
229
|
+
rules += ' rc';
|
|
223
230
|
rules += ' sc';
|
|
224
|
-
rules += '
|
|
225
|
-
if (props.
|
|
226
|
-
else if (props.
|
|
227
|
-
else
|
|
228
|
-
|
|
229
|
-
rules += '
|
|
230
|
-
rules += '
|
|
231
|
+
if (props.isPressed) rules += ' xQ';
|
|
232
|
+
else if (props.isFocusVisible) rules += ' xP';
|
|
233
|
+
else if (props.isHovered) rules += ' xP';
|
|
234
|
+
else rules += ' xO';
|
|
235
|
+
if (props.isPressed) rules += ' yQ';
|
|
236
|
+
else if (props.isFocusVisible) rules += ' yP';
|
|
237
|
+
else if (props.isHovered) rules += ' yP';
|
|
238
|
+
else rules += ' yO';
|
|
239
|
+
if (props.isPressed) rules += ' vQ';
|
|
240
|
+
else if (props.isFocusVisible) rules += ' vP';
|
|
241
|
+
else if (props.isHovered) rules += ' vP';
|
|
242
|
+
else rules += ' vO';
|
|
243
|
+
if (props.isPressed) rules += ' wQ';
|
|
244
|
+
else if (props.isFocusVisible) rules += ' wP';
|
|
245
|
+
else if (props.isHovered) rules += ' wP';
|
|
246
|
+
else rules += ' wO';
|
|
231
247
|
rules += ' _Sa';
|
|
248
|
+
rules += ' _U-375x7f';
|
|
249
|
+
rules += ' _Va';
|
|
232
250
|
return rules;
|
|
233
251
|
};
|
|
234
252
|
const $b9c30139cd63c62a$var$valueStyles = function anonymous(props) {
|
|
235
253
|
let rules = " .";
|
|
236
|
-
if (props.isQuiet) rules += '
|
|
237
|
-
else rules += '
|
|
238
|
-
rules += '
|
|
239
|
-
rules += '
|
|
240
|
-
rules += '
|
|
241
|
-
rules += '
|
|
242
|
-
rules += '
|
|
243
|
-
rules += '
|
|
254
|
+
if (props.isQuiet) rules += ' __d-3t1x';
|
|
255
|
+
else rules += ' __d-3t1y';
|
|
256
|
+
rules += ' __zb';
|
|
257
|
+
rules += ' __Ab';
|
|
258
|
+
rules += ' _qa';
|
|
259
|
+
rules += ' _tb';
|
|
260
|
+
rules += ' _3d';
|
|
261
|
+
rules += ' _5c';
|
|
244
262
|
return rules;
|
|
245
263
|
};
|
|
246
|
-
const $b9c30139cd63c62a$var$iconStyles = "
|
|
264
|
+
const $b9c30139cd63c62a$var$iconStyles = " __c-3t1x U-3hn0u -rwx0fg_d-b";
|
|
247
265
|
let $b9c30139cd63c62a$var$InternalPickerContext = /*#__PURE__*/ (0, $ceqeb$react.createContext)({
|
|
248
266
|
size: 'M'
|
|
249
267
|
});
|
|
@@ -267,59 +285,59 @@ const $b9c30139cd63c62a$export$ba25329847403e11 = /*#__PURE__*/ (0, $ceqeb$react
|
|
|
267
285
|
style: UNSAFE_style,
|
|
268
286
|
className: UNSAFE_className + function anonymous(props, overrides) {
|
|
269
287
|
let rules = " .";
|
|
270
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
288
|
+
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)[^\s]+/g) || [];
|
|
271
289
|
rules += matches.join('');
|
|
272
|
-
let $
|
|
273
|
-
let $
|
|
290
|
+
let $__e = false;
|
|
291
|
+
let $__f = false;
|
|
274
292
|
for (let p of matches){
|
|
275
|
-
if (/^\s*
|
|
276
|
-
if (/^\s*
|
|
293
|
+
if (/^\s*__e/.test(p)) $__e = true;
|
|
294
|
+
if (/^\s*__f/.test(p)) $__f = true;
|
|
277
295
|
}
|
|
278
|
-
rules += '
|
|
279
|
-
if (!$
|
|
280
|
-
if (props.isInForm) rules += '
|
|
296
|
+
rules += ' _3f';
|
|
297
|
+
if (!$__e) {
|
|
298
|
+
if (props.isInForm) rules += ' __e-3t1y';
|
|
281
299
|
}
|
|
282
|
-
if (!$
|
|
300
|
+
if (!$__f) {
|
|
283
301
|
if (props.isInForm) {
|
|
284
|
-
if (props.labelPosition === "side") rules += '
|
|
302
|
+
if (props.labelPosition === "side") rules += ' __f-yqnebx';
|
|
285
303
|
}
|
|
286
304
|
}
|
|
287
|
-
if (props.isInForm) rules += '
|
|
305
|
+
if (props.isInForm) rules += ' __l-1a97rzt';
|
|
288
306
|
else {
|
|
289
|
-
if (props.labelPosition === "side") rules += '
|
|
290
|
-
else if (props.labelPosition === "top") rules += '
|
|
307
|
+
if (props.labelPosition === "side") rules += ' __l-ar5vcf';
|
|
308
|
+
else if (props.labelPosition === "top") rules += ' __l-2wzs0i';
|
|
291
309
|
}
|
|
292
|
-
if (props.labelPosition === "side") rules += '
|
|
293
|
-
else if (props.labelPosition === "top") rules += '
|
|
294
|
-
if (props.labelPosition === "side") rules += '
|
|
295
|
-
else if (props.labelPosition === "top") rules += '
|
|
310
|
+
if (props.labelPosition === "side") rules += ' __m-ar5vcf';
|
|
311
|
+
else if (props.labelPosition === "top") rules += ' __m-1a6w430';
|
|
312
|
+
if (props.labelPosition === "side") rules += ' __n-18h2yqz';
|
|
313
|
+
else if (props.labelPosition === "top") rules += ' __n-1srn173';
|
|
296
314
|
if (props.size === "XL") {
|
|
297
|
-
rules += '
|
|
298
|
-
rules += '
|
|
315
|
+
rules += ' _hbj';
|
|
316
|
+
rules += ' _hi';
|
|
299
317
|
} else if (props.size === "L") {
|
|
300
|
-
rules += '
|
|
301
|
-
rules += '
|
|
318
|
+
rules += ' _hbh';
|
|
319
|
+
rules += ' _hg';
|
|
302
320
|
} else if (props.size === "S") {
|
|
303
|
-
rules += '
|
|
304
|
-
rules += '
|
|
321
|
+
rules += ' _hbd';
|
|
322
|
+
rules += ' _hc';
|
|
305
323
|
} else if (props.size === "XS") {
|
|
306
|
-
rules += '
|
|
307
|
-
rules += '
|
|
324
|
+
rules += ' _hbb';
|
|
325
|
+
rules += ' _ha';
|
|
308
326
|
} else {
|
|
309
|
-
rules += '
|
|
310
|
-
rules += '
|
|
327
|
+
rules += ' _hbf';
|
|
328
|
+
rules += ' _he';
|
|
311
329
|
}
|
|
312
|
-
rules += '
|
|
313
|
-
rules += '
|
|
314
|
-
rules += '
|
|
315
|
-
if (props.size === "XL") rules += ' -
|
|
316
|
-
else if (props.size === "L") rules += ' -
|
|
317
|
-
else if (props.size === "S") rules += ' -
|
|
318
|
-
else if (props.size === "XS") rules += ' -
|
|
319
|
-
else rules += ' -
|
|
320
|
-
rules += ' -
|
|
321
|
-
rules += '
|
|
322
|
-
rules += '
|
|
330
|
+
rules += ' _5d';
|
|
331
|
+
rules += ' _j-1x99dlob';
|
|
332
|
+
rules += ' _ja';
|
|
333
|
+
if (props.size === "XL") rules += ' -aqrvqh_j-j';
|
|
334
|
+
else if (props.size === "L") rules += ' -aqrvqh_j-i';
|
|
335
|
+
else if (props.size === "S") rules += ' -aqrvqh_j-h';
|
|
336
|
+
else if (props.size === "XS") rules += ' -aqrvqh_j-g';
|
|
337
|
+
else rules += ' -aqrvqh_j-f';
|
|
338
|
+
rules += ' -_1inj1bc_h--prjw07';
|
|
339
|
+
rules += ' ie';
|
|
340
|
+
rules += ' __V-yksgrp';
|
|
323
341
|
return rules;
|
|
324
342
|
}({
|
|
325
343
|
isInForm: !!formContext,
|
|
@@ -384,7 +402,7 @@ const $b9c30139cd63c62a$export$ba25329847403e11 = /*#__PURE__*/ (0, $ceqeb$react
|
|
|
384
402
|
slots: {
|
|
385
403
|
description: {},
|
|
386
404
|
label: {
|
|
387
|
-
styles: "
|
|
405
|
+
styles: " _3a __d-3t1y __zb __Ab _qa _tb"
|
|
388
406
|
}
|
|
389
407
|
}
|
|
390
408
|
}
|
|
@@ -435,12 +453,12 @@ const $b9c30139cd63c62a$export$ba25329847403e11 = /*#__PURE__*/ (0, $ceqeb$react
|
|
|
435
453
|
},
|
|
436
454
|
styles: function anonymous(props) {
|
|
437
455
|
let rules = " .";
|
|
438
|
-
rules += '
|
|
439
|
-
if (props.isQuiet) rules += '
|
|
440
|
-
else rules += '
|
|
441
|
-
if (props.isQuiet) rules += '
|
|
442
|
-
else rules += '
|
|
443
|
-
if (props.isQuiet) rules += ' -
|
|
456
|
+
rules += ' B-375tnl';
|
|
457
|
+
if (props.isQuiet) rules += ' p___u';
|
|
458
|
+
else rules += ' p-1utmx2y';
|
|
459
|
+
if (props.isQuiet) rules += ' k-13f72lm';
|
|
460
|
+
else rules += ' k-1utmx2y';
|
|
461
|
+
if (props.isQuiet) rules += ' -_375tnl_B-M';
|
|
444
462
|
return rules;
|
|
445
463
|
}(props1),
|
|
446
464
|
children: /*#__PURE__*/ (0, $ceqeb$reactjsxruntime.jsx)((0, $ceqeb$reactariacomponents.Provider), {
|
package/dist/Picker.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;AAoGM,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAiF;AAE1H,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDN,MAAM;AAaC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBX,MAAM;;;;;;;;;;;;;;;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AAA,uBAAS,EAAE;IAC/B,IAAI,eACF,OAAO;IAGT,qBAAO,gCAAC,QAAQ,QAAQ;QAAC,OAAO;kBAAQ;;AAC1C;AAGO,SAAS,0CAAgC,KAA4B;IAC1E,IAAI,QAAC,IAAI,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IACxB,qBACE;;0BACE,gCAAC,CAAA,GAAA,yCAAiB;gBACf,GAAG,KAAK;gBACT,WAAW,CAAA,GAAA,iCAAM,EAAE;0BAAC;gBAAI;0BACvB,MAAM,QAAQ;;0BAEjB,gCAAC,CAAA,GAAA,iCAAM;;;AAGb","sources":["packages/@react-spectrum/s2/src/Picker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ListBoxSection as AriaListBoxSection,\n PopoverProps as AriaPopoverProps,\n Select as AriaSelect,\n SelectProps as AriaSelectProps,\n SelectRenderProps as AriaSelectRenderProps,\n Button,\n ButtonRenderProps,\n ContextValue,\n ListBox,\n ListBoxItem,\n ListBoxItemProps,\n ListBoxProps,\n Provider,\n SectionProps,\n SelectValue\n} from 'react-aria-components';\nimport {baseColor, edgeToText, focusRing, style} from '../style' with {type: 'macro'};\nimport {centerBaseline} from './CenterBaseline';\nimport {\n checkmark,\n description,\n Divider,\n icon,\n iconCenterWrapper,\n label,\n menuitem,\n section,\n sectionHeader,\n sectionHeading\n} from './Menu';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport ChevronIcon from '../ui-icons/Chevron';\nimport {field, fieldInput, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {\n FieldErrorIcon,\n FieldLabel,\n HelpText\n} from './Field';\nimport {FocusableRef, FocusableRefValue, HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {forwardRefType} from './types';\nimport {HeaderContext, HeadingContext, Text, TextContext} from './Content';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Placement} from 'react-aria';\nimport {PopoverBase} from './Popover';\nimport {pressScale} from './pressScale';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport React, {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface PickerStyleProps {\n /**\n * The size of the Picker.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * Whether the picker should be displayed with a quiet style.\n * @private\n */\n isQuiet?: boolean\n}\n\nexport interface PickerProps<T extends object> extends\n Omit<AriaSelectProps<T>, 'children' | 'style' | 'className'>,\n PickerStyleProps,\n StyleProps,\n SpectrumLabelableProps,\n HelpTextProps,\n Pick<ListBoxProps<T>, 'items'>,\n Pick<AriaPopoverProps, 'shouldFlip'> {\n /** The contents of the collection. */\n children: ReactNode | ((item: T) => ReactNode),\n /**\n * Direction the menu will render relative to the Picker.\n *\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top',\n /**\n * Alignment of the menu relative to the input target.\n *\n * @default 'start'\n */\n align?: 'start' | 'end',\n /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */\n menuWidth?: number\n}\n\ninterface PickerButtonProps extends PickerStyleProps, ButtonRenderProps {}\n\nexport const PickerContext = createContext<ContextValue<Partial<PickerProps<any>>, FocusableRefValue<HTMLButtonElement>>>(null);\n\nconst inputButton = style<PickerButtonProps | AriaSelectRenderProps>({\n ...focusRing(),\n ...fieldInput(),\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid',\n isQuiet: 'none'\n },\n position: 'relative',\n font: 'control',\n display: 'flex',\n textAlign: 'start',\n borderStyle: {\n default: 'none',\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n },\n borderRadius: 'control',\n alignItems: 'center',\n height: 'control',\n transition: 'default',\n columnGap: {\n default: 'text-to-control',\n isQuiet: 'text-to-visual'\n },\n paddingX: {\n default: 'edge-to-text',\n isQuiet: 0\n },\n backgroundColor: {\n default: baseColor('gray-100'),\n isOpen: 'gray-200',\n isDisabled: 'disabled',\n isQuiet: 'transparent'\n },\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n maxWidth: {\n isQuiet: 'max'\n },\n disableTapHighlight: true\n});\n\nconst quietFocusLine = style({\n width: 'full',\n // Use pixels since we are emulating a border.\n height: '[2px]',\n position: 'absolute',\n bottom: 0,\n borderRadius: 'full',\n backgroundColor: {\n default: 'blue-800',\n forcedColors: 'Highlight'\n }\n});\n\nexport let menu = style({\n outlineStyle: 'none',\n display: 'grid',\n gridTemplateColumns: {\n size: {\n S: [edgeToText(24), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(24)],\n M: [edgeToText(32), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(32)],\n L: [edgeToText(40), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(40)],\n XL: [edgeToText(48), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(48)]\n }\n },\n boxSizing: 'border-box',\n maxHeight: '[inherit]',\n overflow: 'auto',\n padding: 8,\n fontFamily: 'sans',\n fontSize: 'control'\n});\n\nconst invalidBorder = style({\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n pointerEvents: 'none',\n borderRadius: 'control',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: 'negative',\n transition: 'default'\n});\n\nconst valueStyles = style({\n flexGrow: {\n default: 1,\n isQuiet: 0\n },\n truncate: true,\n display: 'flex',\n alignItems: 'center'\n});\n\nconst iconStyles = style({\n flexShrink: 0,\n rotate: 90,\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n});\n\nlet InternalPickerContext = createContext<{size: 'S' | 'M' | 'L' | 'XL'}>({size: 'M'});\nlet InsideSelectValueContext = createContext(false);\n\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\nexport const Picker = /*#__PURE__*/ (forwardRef as forwardRefType)(function Picker<T extends object>(props: PickerProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, PickerContext);\n let domRef = useFocusableRef(ref);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n menuWidth,\n label,\n description: descriptionMessage,\n errorMessage,\n children,\n items,\n size = 'M',\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator,\n UNSAFE_className = '',\n UNSAFE_style,\n placeholder = stringFormatter.format('picker.placeholder'),\n isQuiet,\n ...pickerProps\n } = props;\n\n // Better way to encode this into a style? need to account for flipping\n let menuOffset: number;\n if (size === 'S') {\n menuOffset = 6;\n } else if (size === 'M') {\n menuOffset = 6;\n } else if (size === 'L') {\n menuOffset = 7;\n } else {\n menuOffset = 8;\n }\n\n return (\n <AriaSelect\n {...pickerProps}\n placeholder={placeholder}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n isInForm: !!formContext,\n labelPosition,\n size\n }, props.styles)}>\n {({isDisabled, isOpen, isFocusVisible, isInvalid, isRequired}) => (\n <>\n <InternalPickerContext.Provider value={{size}}>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isQuiet={isQuiet}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <Button\n ref={domRef}\n style={renderProps => pressScale(domRef)(renderProps)}\n // Prevent press scale from sticking while Picker is open.\n // @ts-ignore\n isPressed={false}\n className={renderProps => inputButton({\n ...renderProps,\n size: size,\n isOpen,\n isQuiet\n })}>\n {(renderProps) => (\n <>\n <SelectValue className={valueStyles({isQuiet}) + ' ' + raw('&> * {display: none;}')}>\n {({defaultChildren}) => {\n return (\n <Provider\n values={[\n [IconContext, {\n slots: {\n icon: {\n render: centerBaseline({slot: 'icon', styles: iconCenterWrapper}),\n styles: icon\n }\n }\n }],\n [TextContext, {\n slots: {\n description: {},\n label: {styles: style({\n display: 'block',\n flexGrow: 1,\n truncate: true\n })}\n }\n }],\n [InsideSelectValueContext, true]\n ]}>\n {defaultChildren}\n </Provider>\n );\n }}\n </SelectValue>\n {isInvalid && (\n <FieldErrorIcon isDisabled={isDisabled} />\n )}\n <ChevronIcon\n size={size}\n className={iconStyles} />\n {isFocusVisible && isQuiet && <span className={quietFocusLine} /> }\n {isInvalid && !isDisabled && !isQuiet &&\n // @ts-ignore known limitation detecting functions from the theme\n <div className={invalidBorder({...renderProps, size})} />\n }\n </>\n )}\n </Button>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={descriptionMessage}>\n {errorMessage}\n </HelpText>\n <PopoverBase\n hideArrow\n offset={menuOffset}\n placement={`${direction} ${align}` as Placement}\n shouldFlip={shouldFlip}\n UNSAFE_style={{\n width: menuWidth && !isQuiet ? `${menuWidth}px` : undefined\n }}\n styles={style({\n marginStart: {\n isQuiet: -12\n },\n minWidth: {\n default: '[var(--trigger-width)]',\n isQuiet: 192\n },\n width: {\n default: '[var(--trigger-width)]',\n isQuiet: '[calc(var(--trigger-width) + (-2 * self(marginStart)))]'\n }\n })(props)}>\n <Provider\n values={[\n [HeaderContext, {styles: sectionHeader({size})}],\n [HeadingContext, {styles: sectionHeading}],\n [TextContext, {\n slots: {\n description: {styles: description({size})}\n }\n }]\n ]}>\n <ListBox\n items={items}\n className={menu({size})}>\n {children}\n </ListBox>\n </Provider>\n </PopoverBase>\n </InternalPickerContext.Provider>\n </>\n )}\n </AriaSelect>\n );\n});\n\nexport interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className'>, StyleProps {\n children: ReactNode\n}\n\nconst checkmarkIconSize = {\n S: 'XS',\n M: 'M',\n L: 'L',\n XL: 'XL'\n} as const;\n\nexport function PickerItem(props: PickerItemProps) {\n let ref = useRef(null);\n let isLink = props.href != null;\n let {size} = useContext(InternalPickerContext);\n return (\n <ListBoxItem\n {...props}\n ref={ref}\n textValue={props.textValue || (typeof props.children === 'string' ? props.children as string : undefined)}\n style={pressScale(ref, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + menuitem({...renderProps, size, isLink}, props.styles)}>\n {(renderProps) => {\n let {children} = props;\n return (\n <DefaultProvider\n context={IconContext}\n value={{slots: {\n icon: {render: centerBaseline({slot: 'icon', styles: iconCenterWrapper}), styles: icon}\n }}}>\n <DefaultProvider\n context={TextContext}\n value={{\n slots: {\n label: {styles: label({size})},\n description: {styles: description({...renderProps, size})}\n }\n }}>\n {!isLink && <CheckmarkIcon size={checkmarkIconSize[size]} className={checkmark({...renderProps, size})} />}\n {typeof children === 'string' ? <Text slot=\"label\">{children}</Text> : children}\n </DefaultProvider>\n </DefaultProvider>\n );\n }}\n </ListBoxItem>\n );\n}\n\n// A Context.Provider that only sets a value if not inside SelectValue.\nfunction DefaultProvider({context, value, children}: {context: React.Context<any>, value: any, children: any}) {\n let inSelectValue = useContext(InsideSelectValueContext);\n if (inSelectValue) {\n return children;\n }\n\n return <context.Provider value={value}>{children}</context.Provider>;\n}\n\nexport interface PickerSectionProps<T extends object> extends SectionProps<T> {}\nexport function PickerSection<T extends object>(props: PickerSectionProps<T>) {\n let {size} = useContext(InternalPickerContext);\n return (\n <>\n <AriaListBoxSection\n {...props}\n className={section({size})}>\n {props.children}\n </AriaListBoxSection>\n <Divider />\n </>\n );\n}\n"],"names":[],"version":3,"file":"Picker.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;AAoGM,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAiF;AAE1H,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDN,MAAM;AAaC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcN,MAAM;;;;;;;;;;;;AAUN,MAAM;AASN,IAAI,4DAAwB,CAAA,GAAA,0BAAY,EAAkC;IAAC,MAAM;AAAG;AACpF,IAAI,+DAA2B,CAAA,GAAA,0BAAY,EAAE;AAKtC,MAAM,4CAAuB,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,OAAyB,MAAqB,EAAE,GAAoC;IAC9J,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,QAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,QAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,SAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,aACF,YAAY,iBACZ,QAAQ,qBACR,aAAa,iBACb,SAAS,SACT,KAAK,EACL,aAAa,kBAAkB,gBAC/B,YAAY,YACZ,QAAQ,SACR,KAAK,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L,OAAO;4BACL,OAAO;gCAAC,QAAQ,CAAA,GAAA,+BAAI,EAAE;0CAAC;gCAAI;4BAAE;4BAC7B,aAAa;gCAAC,QAAQ,CAAA,GAAA,qCAAU,EAAE;oCAAC,GAAG,WAAW;0CAAE;gCAAI;4BAAE;wBAC3D;oBACF;;wBACC,CAAC,wBAAU,gCAAC,CAAA,GAAA,iCAAY;4BAAE,MAAM,uCAAiB,CAAC,KAAK;4BAAE,WAAW,CAAA,GAAA,mCAAQ,EAAE;gCAAC,GAAG,WAAW;sCAAE;4BAAI;;wBACnG,OAAO,aAAa,yBAAW,gCAAC,CAAA,GAAA,8BAAG;4BAAE,MAAK;sCAAS;6BAAmB;;;;QAI/E;;AAGN;AAEA,uEAAuE;AACvE,SAAS,sCAAgB,WAAC,OAAO,SAAE,KAAK,YAAE,QAAQ,EAA2D;IAC3G,IAAI,gBAAgB,CAAA,GAAA,uBAAS,EAAE;IAC/B,IAAI,eACF,OAAO;IAGT,qBAAO,gCAAC,QAAQ,QAAQ;QAAC,OAAO;kBAAQ;;AAC1C;AAGO,SAAS,0CAAgC,KAA4B;IAC1E,IAAI,QAAC,IAAI,EAAC,GAAG,CAAA,GAAA,uBAAS,EAAE;IACxB,qBACE;;0BACE,gCAAC,CAAA,GAAA,yCAAiB;gBACf,GAAG,KAAK;gBACT,WAAW,CAAA,GAAA,iCAAM,EAAE;0BAAC;gBAAI;0BACvB,MAAM,QAAQ;;0BAEjB,gCAAC,CAAA,GAAA,iCAAM;;;AAGb","sources":["packages/@react-spectrum/s2/src/Picker.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ListBoxSection as AriaListBoxSection,\n PopoverProps as AriaPopoverProps,\n Select as AriaSelect,\n SelectProps as AriaSelectProps,\n SelectRenderProps as AriaSelectRenderProps,\n Button,\n ButtonRenderProps,\n ContextValue,\n ListBox,\n ListBoxItem,\n ListBoxItemProps,\n ListBoxProps,\n Provider,\n SectionProps,\n SelectValue\n} from 'react-aria-components';\nimport {baseColor, edgeToText, focusRing, style} from '../style' with {type: 'macro'};\nimport {centerBaseline} from './CenterBaseline';\nimport {\n checkmark,\n description,\n Divider,\n icon,\n iconCenterWrapper,\n label,\n menuitem,\n section,\n sectionHeader,\n sectionHeading\n} from './Menu';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport ChevronIcon from '../ui-icons/Chevron';\nimport {field, fieldInput, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {\n FieldErrorIcon,\n FieldLabel,\n HelpText\n} from './Field';\nimport {FocusableRef, FocusableRefValue, HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {forwardRefType} from './types';\nimport {HeaderContext, HeadingContext, Text, TextContext} from './Content';\nimport {IconContext} from './Icon';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Placement} from 'react-aria';\nimport {PopoverBase} from './Popover';\nimport {pressScale} from './pressScale';\nimport {raw} from '../style/style-macro' with {type: 'macro'};\nimport React, {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface PickerStyleProps {\n /**\n * The size of the Picker.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * Whether the picker should be displayed with a quiet style.\n * @private\n */\n isQuiet?: boolean\n}\n\nexport interface PickerProps<T extends object> extends\n Omit<AriaSelectProps<T>, 'children' | 'style' | 'className'>,\n PickerStyleProps,\n StyleProps,\n SpectrumLabelableProps,\n HelpTextProps,\n Pick<ListBoxProps<T>, 'items'>,\n Pick<AriaPopoverProps, 'shouldFlip'> {\n /** The contents of the collection. */\n children: ReactNode | ((item: T) => ReactNode),\n /**\n * Direction the menu will render relative to the Picker.\n *\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top',\n /**\n * Alignment of the menu relative to the input target.\n *\n * @default 'start'\n */\n align?: 'start' | 'end',\n /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */\n menuWidth?: number\n}\n\ninterface PickerButtonProps extends PickerStyleProps, ButtonRenderProps {}\n\nexport const PickerContext = createContext<ContextValue<Partial<PickerProps<any>>, FocusableRefValue<HTMLButtonElement>>>(null);\n\nconst inputButton = style<PickerButtonProps | AriaSelectRenderProps>({\n ...focusRing(),\n ...fieldInput(),\n outlineStyle: {\n default: 'none',\n isFocusVisible: 'solid',\n isQuiet: 'none'\n },\n position: 'relative',\n font: 'control',\n display: 'flex',\n textAlign: 'start',\n borderStyle: {\n default: 'none',\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n },\n borderRadius: 'control',\n alignItems: 'center',\n height: 'control',\n transition: 'default',\n columnGap: {\n default: 'text-to-control',\n isQuiet: 'text-to-visual'\n },\n paddingX: {\n default: 'edge-to-text',\n isQuiet: 0\n },\n backgroundColor: {\n default: baseColor('gray-100'),\n isOpen: 'gray-200',\n isDisabled: 'disabled',\n isQuiet: 'transparent'\n },\n color: {\n default: 'neutral',\n isDisabled: 'disabled'\n },\n maxWidth: {\n isQuiet: 'max'\n },\n disableTapHighlight: true\n});\n\nconst quietFocusLine = style({\n width: 'full',\n // Use pixels since we are emulating a border.\n height: '[2px]',\n position: 'absolute',\n bottom: 0,\n borderRadius: 'full',\n backgroundColor: {\n default: 'blue-800',\n forcedColors: 'Highlight'\n }\n});\n\nexport let menu = style({\n outlineStyle: 'none',\n display: 'grid',\n gridTemplateColumns: {\n size: {\n S: [edgeToText(24), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(24)],\n M: [edgeToText(32), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(32)],\n L: [edgeToText(40), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(40)],\n XL: [edgeToText(48), 'auto', 'auto', 'minmax(0, 1fr)', 'auto', 'auto', 'auto', edgeToText(48)]\n }\n },\n boxSizing: 'border-box',\n maxHeight: '[inherit]',\n overflow: 'auto',\n padding: 8,\n fontFamily: 'sans',\n fontSize: 'control'\n});\n\nconst invalidBorder = style({\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n pointerEvents: 'none',\n borderRadius: 'control',\n borderStyle: 'solid',\n borderWidth: 2,\n borderColor: 'negative',\n transition: 'default'\n});\n\nconst valueStyles = style({\n flexGrow: {\n default: 1,\n isQuiet: 0\n },\n truncate: true,\n display: 'flex',\n alignItems: 'center'\n});\n\nconst iconStyles = style({\n flexShrink: 0,\n rotate: 90,\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n});\n\nlet InternalPickerContext = createContext<{size: 'S' | 'M' | 'L' | 'XL'}>({size: 'M'});\nlet InsideSelectValueContext = createContext(false);\n\n/**\n * Pickers allow users to choose a single option from a collapsible list of options when space is limited.\n */\nexport const Picker = /*#__PURE__*/ (forwardRef as forwardRefType)(function Picker<T extends object>(props: PickerProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, PickerContext);\n let domRef = useFocusableRef(ref);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n direction = 'bottom',\n align = 'start',\n shouldFlip = true,\n menuWidth,\n label,\n description: descriptionMessage,\n errorMessage,\n children,\n items,\n size = 'M',\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator,\n UNSAFE_className = '',\n UNSAFE_style,\n placeholder = stringFormatter.format('picker.placeholder'),\n isQuiet,\n ...pickerProps\n } = props;\n\n // Better way to encode this into a style? need to account for flipping\n let menuOffset: number;\n if (size === 'S') {\n menuOffset = 6;\n } else if (size === 'M') {\n menuOffset = 6;\n } else if (size === 'L') {\n menuOffset = 7;\n } else {\n menuOffset = 8;\n }\n\n return (\n <AriaSelect\n {...pickerProps}\n placeholder={placeholder}\n style={UNSAFE_style}\n className={UNSAFE_className + style(field(), getAllowedOverrides())({\n isInForm: !!formContext,\n labelPosition,\n size\n }, props.styles)}>\n {({isDisabled, isOpen, isFocusVisible, isInvalid, isRequired}) => (\n <>\n <InternalPickerContext.Provider value={{size}}>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isQuiet={isQuiet}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <Button\n ref={domRef}\n style={renderProps => pressScale(domRef)(renderProps)}\n // Prevent press scale from sticking while Picker is open.\n // @ts-ignore\n isPressed={false}\n className={renderProps => inputButton({\n ...renderProps,\n size: size,\n isOpen,\n isQuiet\n })}>\n {(renderProps) => (\n <>\n <SelectValue className={valueStyles({isQuiet}) + ' ' + raw('&> * {display: none;}')}>\n {({defaultChildren}) => {\n return (\n <Provider\n values={[\n [IconContext, {\n slots: {\n icon: {\n render: centerBaseline({slot: 'icon', styles: iconCenterWrapper}),\n styles: icon\n }\n }\n }],\n [TextContext, {\n slots: {\n description: {},\n label: {styles: style({\n display: 'block',\n flexGrow: 1,\n truncate: true\n })}\n }\n }],\n [InsideSelectValueContext, true]\n ]}>\n {defaultChildren}\n </Provider>\n );\n }}\n </SelectValue>\n {isInvalid && (\n <FieldErrorIcon isDisabled={isDisabled} />\n )}\n <ChevronIcon\n size={size}\n className={iconStyles} />\n {isFocusVisible && isQuiet && <span className={quietFocusLine} /> }\n {isInvalid && !isDisabled && !isQuiet &&\n // @ts-ignore known limitation detecting functions from the theme\n <div className={invalidBorder({...renderProps, size})} />\n }\n </>\n )}\n </Button>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={descriptionMessage}>\n {errorMessage}\n </HelpText>\n <PopoverBase\n hideArrow\n offset={menuOffset}\n placement={`${direction} ${align}` as Placement}\n shouldFlip={shouldFlip}\n UNSAFE_style={{\n width: menuWidth && !isQuiet ? `${menuWidth}px` : undefined\n }}\n styles={style({\n marginStart: {\n isQuiet: -12\n },\n minWidth: {\n default: '[var(--trigger-width)]',\n isQuiet: 192\n },\n width: {\n default: '[var(--trigger-width)]',\n isQuiet: '[calc(var(--trigger-width) + (-2 * self(marginStart)))]'\n }\n })(props)}>\n <Provider\n values={[\n [HeaderContext, {styles: sectionHeader({size})}],\n [HeadingContext, {styles: sectionHeading}],\n [TextContext, {\n slots: {\n description: {styles: description({size})}\n }\n }]\n ]}>\n <ListBox\n items={items}\n className={menu({size})}>\n {children}\n </ListBox>\n </Provider>\n </PopoverBase>\n </InternalPickerContext.Provider>\n </>\n )}\n </AriaSelect>\n );\n});\n\nexport interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className'>, StyleProps {\n children: ReactNode\n}\n\nconst checkmarkIconSize = {\n S: 'XS',\n M: 'M',\n L: 'L',\n XL: 'XL'\n} as const;\n\nexport function PickerItem(props: PickerItemProps) {\n let ref = useRef(null);\n let isLink = props.href != null;\n let {size} = useContext(InternalPickerContext);\n return (\n <ListBoxItem\n {...props}\n ref={ref}\n textValue={props.textValue || (typeof props.children === 'string' ? props.children as string : undefined)}\n style={pressScale(ref, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + menuitem({...renderProps, size, isLink}, props.styles)}>\n {(renderProps) => {\n let {children} = props;\n return (\n <DefaultProvider\n context={IconContext}\n value={{slots: {\n icon: {render: centerBaseline({slot: 'icon', styles: iconCenterWrapper}), styles: icon}\n }}}>\n <DefaultProvider\n context={TextContext}\n value={{\n slots: {\n label: {styles: label({size})},\n description: {styles: description({...renderProps, size})}\n }\n }}>\n {!isLink && <CheckmarkIcon size={checkmarkIconSize[size]} className={checkmark({...renderProps, size})} />}\n {typeof children === 'string' ? <Text slot=\"label\">{children}</Text> : children}\n </DefaultProvider>\n </DefaultProvider>\n );\n }}\n </ListBoxItem>\n );\n}\n\n// A Context.Provider that only sets a value if not inside SelectValue.\nfunction DefaultProvider({context, value, children}: {context: React.Context<any>, value: any, children: any}) {\n let inSelectValue = useContext(InsideSelectValueContext);\n if (inSelectValue) {\n return children;\n }\n\n return <context.Provider value={value}>{children}</context.Provider>;\n}\n\nexport interface PickerSectionProps<T extends object> extends SectionProps<T> {}\nexport function PickerSection<T extends object>(props: PickerSectionProps<T>) {\n let {size} = useContext(InternalPickerContext);\n return (\n <>\n <AriaListBoxSection\n {...props}\n className={section({size})}>\n {props.children}\n </AriaListBoxSection>\n <Divider />\n </>\n );\n}\n"],"names":[],"version":3,"file":"Picker.cjs.map"}
|