@react-spectrum/s2 3.0.0-nightly-56da82e3e-250212 → 3.0.0-nightly-3dbdc1e8e-250214
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 +68 -92
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +92 -164
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +68 -92
- 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 +152 -236
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +165 -309
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +152 -236
- 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 +261 -264
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +198 -210
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +261 -264
- 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 +73 -124
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +81 -201
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +73 -124
- 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 +21 -27
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +45 -93
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +21 -27
- 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 +24 -27
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -41
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +24 -27
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +23 -23
- package/dist/ColorSwatchPicker.css +48 -60
- 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 +108 -111
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -124
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +108 -111
- 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 +47 -56
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +56 -80
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +47 -56
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +150 -204
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +150 -246
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +150 -204
- 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 +77 -104
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +77 -149
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +77 -104
- 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 -269
- package/dist/Menu.css +155 -155
- package/dist/Menu.mjs +269 -269
- 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 +177 -195
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +164 -224
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +177 -195
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +79 -85
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +65 -89
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +79 -85
- 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 +80 -152
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +96 -240
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +80 -152
- 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 +89 -101
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +92 -140
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +89 -101
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +196 -229
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +149 -221
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +196 -229
- 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 +74 -107
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +69 -141
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +74 -107
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +253 -280
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +163 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +253 -280
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +108 -108
- package/dist/Tabs.css +81 -81
- package/dist/Tabs.mjs +108 -108
- package/dist/TabsPicker.cjs +105 -105
- package/dist/TabsPicker.css +111 -111
- package/dist/TabsPicker.mjs +105 -105
- 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 +57 -60
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +71 -83
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +57 -60
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +199 -248
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +131 -175
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +202 -248
- package/dist/TreeView.mjs.map +1 -1
- package/dist/main.cjs +1 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +2 -2
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +4 -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 +21 -21
- package/src/TreeView.tsx +66 -134
- package/src/index.ts +1 -1
- package/style/__tests__/style-macro.test.js +18 -18
- package/style/dist/spectrum-theme.cjs +10 -20
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +10 -20
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +0 -4
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +11 -19
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 += '
|
|
64
|
+
if (props.isQuiet) rules += ' _Ma';
|
|
65
|
+
else if (props.isFocusVisible) rules += ' _Mb';
|
|
66
|
+
else rules += ' _Ma';
|
|
67
|
+
rules += ' da_____M';
|
|
68
|
+
rules += ' dx';
|
|
69
|
+
rules += ' _Oc';
|
|
70
|
+
rules += ' _N-3t1z';
|
|
71
|
+
rules += ' __b-g2ozi1';
|
|
72
|
+
rules += ' __c-g2ozi1';
|
|
73
|
+
rules += ' __d-g2ozi1';
|
|
71
74
|
rules += ' __e-g2ozi1';
|
|
72
|
-
rules += '
|
|
73
|
-
rules += '
|
|
74
|
-
rules += '
|
|
75
|
-
if (props.size === "
|
|
76
|
-
else
|
|
77
|
-
|
|
78
|
-
else
|
|
79
|
-
|
|
80
|
-
if (props.
|
|
81
|
-
else rules += '
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
88
|
-
rules += '
|
|
89
|
-
rules += '
|
|
90
|
-
rules += '
|
|
91
|
-
rules += '
|
|
92
|
-
rules += '
|
|
93
|
-
rules += ' _g-enzwzjc';
|
|
94
|
-
rules += ' _g-enzrfpb';
|
|
95
|
-
rules += ' _ga';
|
|
75
|
+
if (props.size === "XL") rules += ' qj';
|
|
76
|
+
else if (props.size === "L") rules += ' qi';
|
|
77
|
+
else if (props.size === "S") rules += ' qh';
|
|
78
|
+
else if (props.size === "XS") rules += ' qg';
|
|
79
|
+
else rules += ' qf';
|
|
80
|
+
if (props.isQuiet) rules += ' __na';
|
|
81
|
+
else rules += ' __n-1s8glxue';
|
|
82
|
+
if (props.size === "XL") rules += ' -usygro_l-____g';
|
|
83
|
+
else if (props.size === "L") rules += ' -usygro_l-___0';
|
|
84
|
+
else if (props.size === "S") rules += ' -usygro_l-___u';
|
|
85
|
+
else rules += ' -usygro_l-___K';
|
|
86
|
+
rules += ' m-rwozxi';
|
|
87
|
+
rules += ' Vc';
|
|
88
|
+
rules += ' _d-bc1l9oh';
|
|
89
|
+
rules += ' _d-1uotwbwg';
|
|
90
|
+
rules += ' _d-eo0c6sf';
|
|
91
|
+
rules += ' _d-enzzrge';
|
|
92
|
+
rules += ' _d-enzykdd';
|
|
93
|
+
rules += ' _d-enzwzjc';
|
|
94
|
+
rules += ' _d-enzrfpb';
|
|
95
|
+
rules += ' _da';
|
|
96
96
|
if (props.size === "XL") {
|
|
97
|
-
rules += '
|
|
98
|
-
rules += '
|
|
97
|
+
rules += ' _ebj';
|
|
98
|
+
rules += ' _ei';
|
|
99
99
|
} else if (props.size === "L") {
|
|
100
|
-
rules += '
|
|
101
|
-
rules += '
|
|
100
|
+
rules += ' _ebh';
|
|
101
|
+
rules += ' _eg';
|
|
102
102
|
} else if (props.size === "S") {
|
|
103
|
-
rules += '
|
|
104
|
-
rules += '
|
|
103
|
+
rules += ' _ebd';
|
|
104
|
+
rules += ' _ec';
|
|
105
105
|
} else if (props.size === "XS") {
|
|
106
|
-
rules += '
|
|
107
|
-
rules += '
|
|
106
|
+
rules += ' _ebb';
|
|
107
|
+
rules += ' _ea';
|
|
108
108
|
} else {
|
|
109
|
-
rules += '
|
|
110
|
-
rules += '
|
|
109
|
+
rules += ' _ebf';
|
|
110
|
+
rules += ' _ee';
|
|
111
111
|
}
|
|
112
|
-
rules += '
|
|
113
|
-
rules += '
|
|
114
|
-
rules += '
|
|
112
|
+
rules += ' _fb';
|
|
113
|
+
rules += ' _g-1x99dlob';
|
|
114
|
+
rules += ' _ga';
|
|
115
115
|
if (props.isDisabled) rules += ' aj';
|
|
116
116
|
else {
|
|
117
117
|
if (props.isPressed) rules += ' ao';
|
|
@@ -119,33 +119,27 @@ 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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
else rules += ' va_____K';
|
|
132
|
-
if (props.isDisabled) rules += ' wa_____O';
|
|
133
|
-
else rules += ' wa_____K';
|
|
122
|
+
rules += ' _0d';
|
|
123
|
+
rules += ' _ka';
|
|
124
|
+
rules += ' waa';
|
|
125
|
+
rules += ' wf';
|
|
126
|
+
if (props.isDisabled) rules += ' ca_____O';
|
|
127
|
+
else rules += ' ca_____K';
|
|
128
|
+
rules += ' _wh';
|
|
129
|
+
rules += ' _xh';
|
|
130
|
+
rules += ' _yh';
|
|
134
131
|
rules += ' _zh';
|
|
135
|
-
rules += '
|
|
136
|
-
rules += '
|
|
137
|
-
rules += '
|
|
138
|
-
rules += '
|
|
139
|
-
rules += ' j-375top';
|
|
132
|
+
rules += ' _2c';
|
|
133
|
+
rules += ' k-375toq';
|
|
134
|
+
rules += ' _Pa';
|
|
135
|
+
rules += ' _R-375x7f';
|
|
140
136
|
rules += ' _Sa';
|
|
141
|
-
rules += ' _U-375x7f';
|
|
142
|
-
rules += ' _Va';
|
|
143
137
|
if (props.isQuiet) {
|
|
144
|
-
rules += '
|
|
145
|
-
rules += '
|
|
146
|
-
} else rules += '
|
|
147
|
-
rules += '
|
|
148
|
-
rules += '
|
|
138
|
+
rules += ' jbH';
|
|
139
|
+
rules += ' jG';
|
|
140
|
+
} else rules += ' jF';
|
|
141
|
+
rules += ' C-375tnm';
|
|
142
|
+
rules += ' D-375tnn';
|
|
149
143
|
if (props.isQuiet) rules += ' ba';
|
|
150
144
|
else if (props.isDisabled) rules += ' bg';
|
|
151
145
|
else if (props.isOpen) rules += ' bh';
|
|
@@ -155,115 +149,103 @@ const $b9c30139cd63c62a$var$inputButton = function anonymous(props) {
|
|
|
155
149
|
else if (props.isHovered) rules += ' bh';
|
|
156
150
|
else rules += ' bg';
|
|
157
151
|
}
|
|
158
|
-
if (props.isQuiet) rules += '
|
|
159
|
-
rules += '
|
|
160
|
-
if (props.isQuiet) rules += ' -
|
|
161
|
-
else rules += ' -
|
|
162
|
-
if (props.isQuiet) rules += ' -
|
|
163
|
-
else rules += ' -
|
|
164
|
-
if (props.size === "XL") rules += ' -
|
|
165
|
-
else if (props.size === "L") rules += ' -
|
|
166
|
-
else if (props.size === "S") rules += ' -
|
|
167
|
-
else if (props.size === "XS") rules += ' -
|
|
168
|
-
else rules += ' -
|
|
152
|
+
if (props.isQuiet) rules += ' rd';
|
|
153
|
+
rules += ' __S-yksgrp';
|
|
154
|
+
if (props.isQuiet) rules += ' -_375tnm_C-a';
|
|
155
|
+
else rules += ' -_375tnm_C-I';
|
|
156
|
+
if (props.isQuiet) rules += ' -_375tnn_D-a';
|
|
157
|
+
else rules += ' -_375tnn_D-I';
|
|
158
|
+
if (props.size === "XL") rules += ' -_375toq_k-j';
|
|
159
|
+
else if (props.size === "L") rules += ' -_375toq_k-i';
|
|
160
|
+
else if (props.size === "S") rules += ' -_375toq_k-h';
|
|
161
|
+
else if (props.size === "XS") rules += ' -_375toq_k-g';
|
|
162
|
+
else rules += ' -_375toq_k-f';
|
|
169
163
|
return rules;
|
|
170
164
|
};
|
|
171
|
-
const $b9c30139cd63c62a$var$quietFocusLine = "
|
|
165
|
+
const $b9c30139cd63c62a$var$quietFocusLine = " lb k-375zlr Va _aa _wf _xf _yf _zf bx ba_____M";
|
|
172
166
|
let $b9c30139cd63c62a$export$b1e5508a851be14d = function anonymous(props) {
|
|
173
167
|
let rules = " .";
|
|
174
|
-
rules += '
|
|
175
|
-
rules += '
|
|
176
|
-
rules += '
|
|
177
|
-
if (props.size === "XL") rules += '
|
|
178
|
-
else if (props.size === "L") rules += '
|
|
179
|
-
else if (props.size === "M") rules += '
|
|
180
|
-
else if (props.size === "S") rules += '
|
|
181
|
-
rules += '
|
|
182
|
-
rules += '
|
|
183
|
-
rules += '
|
|
184
|
-
rules += '
|
|
185
|
-
rules += '
|
|
186
|
-
rules += ' Id';
|
|
168
|
+
rules += ' _Ma';
|
|
169
|
+
rules += ' _0f';
|
|
170
|
+
rules += ' lb';
|
|
171
|
+
if (props.size === "XL") rules += ' __i-14g31og';
|
|
172
|
+
else if (props.size === "L") rules += ' __i-1pqbi84';
|
|
173
|
+
else if (props.size === "M") rules += ' __i-n6rb9a';
|
|
174
|
+
else if (props.size === "S") rules += ' __i-iov3cy';
|
|
175
|
+
rules += ' __oa';
|
|
176
|
+
rules += ' p-17zqamw';
|
|
177
|
+
rules += ' __wa';
|
|
178
|
+
rules += ' __xa';
|
|
179
|
+
rules += ' Ed';
|
|
187
180
|
rules += ' Fd';
|
|
188
|
-
rules += '
|
|
189
|
-
rules += '
|
|
190
|
-
rules += '
|
|
191
|
-
rules += '
|
|
192
|
-
rules += '
|
|
193
|
-
rules += '
|
|
194
|
-
rules += '
|
|
195
|
-
rules += '
|
|
196
|
-
rules += '
|
|
181
|
+
rules += ' Cd';
|
|
182
|
+
rules += ' Dd';
|
|
183
|
+
rules += ' _d-bc1l9oh';
|
|
184
|
+
rules += ' _d-1uotwbwg';
|
|
185
|
+
rules += ' _d-eo0c6sf';
|
|
186
|
+
rules += ' _d-enzzrge';
|
|
187
|
+
rules += ' _d-enzykdd';
|
|
188
|
+
rules += ' _d-enzwzjc';
|
|
189
|
+
rules += ' _d-enzrfpb';
|
|
190
|
+
rules += ' _da';
|
|
197
191
|
if (props.size === "XL") {
|
|
198
|
-
rules += '
|
|
199
|
-
rules += '
|
|
192
|
+
rules += ' _ebj';
|
|
193
|
+
rules += ' _ei';
|
|
200
194
|
} else if (props.size === "L") {
|
|
201
|
-
rules += '
|
|
202
|
-
rules += '
|
|
195
|
+
rules += ' _ebh';
|
|
196
|
+
rules += ' _eg';
|
|
203
197
|
} else if (props.size === "S") {
|
|
204
|
-
rules += '
|
|
205
|
-
rules += '
|
|
198
|
+
rules += ' _ebd';
|
|
199
|
+
rules += ' _ec';
|
|
206
200
|
} else if (props.size === "XS") {
|
|
207
|
-
rules += '
|
|
208
|
-
rules += '
|
|
201
|
+
rules += ' _ebb';
|
|
202
|
+
rules += ' _ea';
|
|
209
203
|
} else {
|
|
210
|
-
rules += '
|
|
211
|
-
rules += '
|
|
204
|
+
rules += ' _ebf';
|
|
205
|
+
rules += ' _ee';
|
|
212
206
|
}
|
|
213
|
-
rules += '
|
|
207
|
+
rules += ' __g-zexzcl';
|
|
214
208
|
return rules;
|
|
215
209
|
};
|
|
216
210
|
const $b9c30139cd63c62a$var$invalidBorder = function anonymous(props) {
|
|
217
211
|
let rules = " .";
|
|
212
|
+
rules += ' Va';
|
|
218
213
|
rules += ' Ya';
|
|
214
|
+
rules += ' Za';
|
|
215
|
+
rules += ' _aa';
|
|
219
216
|
rules += ' _ba';
|
|
220
|
-
rules += '
|
|
221
|
-
rules += '
|
|
222
|
-
rules += '
|
|
223
|
-
rules += '
|
|
217
|
+
rules += ' __Ca';
|
|
218
|
+
rules += ' _wh';
|
|
219
|
+
rules += ' _xh';
|
|
220
|
+
rules += ' _yh';
|
|
224
221
|
rules += ' _zh';
|
|
225
|
-
rules += '
|
|
226
|
-
rules += ' _Bh';
|
|
227
|
-
rules += ' _Ch';
|
|
228
|
-
rules += ' za';
|
|
229
|
-
rules += ' tc';
|
|
222
|
+
rules += ' wa';
|
|
230
223
|
rules += ' uc';
|
|
231
|
-
rules += '
|
|
224
|
+
rules += ' vc';
|
|
232
225
|
rules += ' sc';
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
else if (props.
|
|
236
|
-
else rules += '
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
else rules += ' yO';
|
|
241
|
-
if (props.isPressed) rules += ' vQ';
|
|
242
|
-
else if (props.isFocusVisible) rules += ' vP';
|
|
243
|
-
else if (props.isHovered) rules += ' vP';
|
|
244
|
-
else rules += ' vO';
|
|
245
|
-
if (props.isPressed) rules += ' wQ';
|
|
246
|
-
else if (props.isFocusVisible) rules += ' wP';
|
|
247
|
-
else if (props.isHovered) rules += ' wP';
|
|
248
|
-
else rules += ' wO';
|
|
226
|
+
rules += ' tc';
|
|
227
|
+
if (props.isPressed) rules += ' cQ';
|
|
228
|
+
else if (props.isFocusVisible) rules += ' cP';
|
|
229
|
+
else if (props.isHovered) rules += ' cP';
|
|
230
|
+
else rules += ' cO';
|
|
231
|
+
rules += ' _Pa';
|
|
232
|
+
rules += ' _R-375x7f';
|
|
249
233
|
rules += ' _Sa';
|
|
250
|
-
rules += ' _U-375x7f';
|
|
251
|
-
rules += ' _Va';
|
|
252
234
|
return rules;
|
|
253
235
|
};
|
|
254
236
|
const $b9c30139cd63c62a$var$valueStyles = function anonymous(props) {
|
|
255
237
|
let rules = " .";
|
|
256
|
-
if (props.isQuiet) rules += '
|
|
257
|
-
else rules += '
|
|
258
|
-
rules += '
|
|
259
|
-
rules += '
|
|
260
|
-
rules += '
|
|
261
|
-
rules += '
|
|
262
|
-
rules += '
|
|
263
|
-
rules += '
|
|
238
|
+
if (props.isQuiet) rules += ' __a-3t1x';
|
|
239
|
+
else rules += ' __a-3t1y';
|
|
240
|
+
rules += ' __wb';
|
|
241
|
+
rules += ' __xb';
|
|
242
|
+
rules += ' _na';
|
|
243
|
+
rules += ' _qb';
|
|
244
|
+
rules += ' _0d';
|
|
245
|
+
rules += ' _2c';
|
|
264
246
|
return rules;
|
|
265
247
|
};
|
|
266
|
-
const $b9c30139cd63c62a$var$iconStyles = "
|
|
248
|
+
const $b9c30139cd63c62a$var$iconStyles = " _9-3t1x R-3hn0u -rwx0fg_e-b";
|
|
267
249
|
let $b9c30139cd63c62a$var$InternalPickerContext = /*#__PURE__*/ (0, $ceqeb$react.createContext)({
|
|
268
250
|
size: 'M'
|
|
269
251
|
});
|
|
@@ -287,59 +269,59 @@ const $b9c30139cd63c62a$export$ba25329847403e11 = /*#__PURE__*/ (0, $ceqeb$react
|
|
|
287
269
|
style: UNSAFE_style,
|
|
288
270
|
className: UNSAFE_className + function anonymous(props, overrides) {
|
|
289
271
|
let rules = " .";
|
|
290
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
272
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r)[^\s]+/g) || [];
|
|
291
273
|
rules += matches.join('');
|
|
292
|
-
let $
|
|
293
|
-
let $
|
|
274
|
+
let $__b = false;
|
|
275
|
+
let $__c = false;
|
|
294
276
|
for (let p of matches){
|
|
295
|
-
if (/^\s*
|
|
296
|
-
if (/^\s*
|
|
277
|
+
if (/^\s*__b/.test(p)) $__b = true;
|
|
278
|
+
if (/^\s*__c/.test(p)) $__c = true;
|
|
297
279
|
}
|
|
298
|
-
rules += '
|
|
299
|
-
if (!$
|
|
300
|
-
if (props.isInForm) rules += '
|
|
280
|
+
rules += ' _0f';
|
|
281
|
+
if (!$__b) {
|
|
282
|
+
if (props.isInForm) rules += ' __b-3t1y';
|
|
301
283
|
}
|
|
302
|
-
if (!$
|
|
284
|
+
if (!$__c) {
|
|
303
285
|
if (props.isInForm) {
|
|
304
|
-
if (props.labelPosition === "side") rules += '
|
|
286
|
+
if (props.labelPosition === "side") rules += ' __c-yqnebx';
|
|
305
287
|
}
|
|
306
288
|
}
|
|
307
|
-
if (props.isInForm) rules += '
|
|
289
|
+
if (props.isInForm) rules += ' __i-1a97rzt';
|
|
308
290
|
else {
|
|
309
|
-
if (props.labelPosition === "side") rules += '
|
|
310
|
-
else if (props.labelPosition === "top") rules += '
|
|
291
|
+
if (props.labelPosition === "side") rules += ' __i-ar5vcf';
|
|
292
|
+
else if (props.labelPosition === "top") rules += ' __i-2wzs0i';
|
|
311
293
|
}
|
|
312
|
-
if (props.labelPosition === "side") rules += '
|
|
313
|
-
else if (props.labelPosition === "top") rules += '
|
|
314
|
-
if (props.labelPosition === "side") rules += '
|
|
315
|
-
else if (props.labelPosition === "top") rules += '
|
|
294
|
+
if (props.labelPosition === "side") rules += ' __j-ar5vcf';
|
|
295
|
+
else if (props.labelPosition === "top") rules += ' __j-1a6w430';
|
|
296
|
+
if (props.labelPosition === "side") rules += ' __k-18h2yqz';
|
|
297
|
+
else if (props.labelPosition === "top") rules += ' __k-1srn173';
|
|
316
298
|
if (props.size === "XL") {
|
|
317
|
-
rules += '
|
|
318
|
-
rules += '
|
|
299
|
+
rules += ' _ebj';
|
|
300
|
+
rules += ' _ei';
|
|
319
301
|
} else if (props.size === "L") {
|
|
320
|
-
rules += '
|
|
321
|
-
rules += '
|
|
302
|
+
rules += ' _ebh';
|
|
303
|
+
rules += ' _eg';
|
|
322
304
|
} else if (props.size === "S") {
|
|
323
|
-
rules += '
|
|
324
|
-
rules += '
|
|
305
|
+
rules += ' _ebd';
|
|
306
|
+
rules += ' _ec';
|
|
325
307
|
} else if (props.size === "XS") {
|
|
326
|
-
rules += '
|
|
327
|
-
rules += '
|
|
308
|
+
rules += ' _ebb';
|
|
309
|
+
rules += ' _ea';
|
|
328
310
|
} else {
|
|
329
|
-
rules += '
|
|
330
|
-
rules += '
|
|
311
|
+
rules += ' _ebf';
|
|
312
|
+
rules += ' _ee';
|
|
331
313
|
}
|
|
332
|
-
rules += '
|
|
333
|
-
rules += '
|
|
334
|
-
rules += '
|
|
335
|
-
if (props.size === "XL") rules += ' -
|
|
336
|
-
else if (props.size === "L") rules += ' -
|
|
337
|
-
else if (props.size === "S") rules += ' -
|
|
338
|
-
else if (props.size === "XS") rules += ' -
|
|
339
|
-
else rules += ' -
|
|
340
|
-
rules += ' -
|
|
341
|
-
rules += '
|
|
342
|
-
rules += '
|
|
314
|
+
rules += ' _2d';
|
|
315
|
+
rules += ' _g-1x99dlob';
|
|
316
|
+
rules += ' _ga';
|
|
317
|
+
if (props.size === "XL") rules += ' -aqrvqh_k-j';
|
|
318
|
+
else if (props.size === "L") rules += ' -aqrvqh_k-i';
|
|
319
|
+
else if (props.size === "S") rules += ' -aqrvqh_k-h';
|
|
320
|
+
else if (props.size === "XS") rules += ' -aqrvqh_k-g';
|
|
321
|
+
else rules += ' -aqrvqh_k-f';
|
|
322
|
+
rules += ' -_1inj1bc_i--prjw07';
|
|
323
|
+
rules += ' je';
|
|
324
|
+
rules += ' __S-yksgrp';
|
|
343
325
|
return rules;
|
|
344
326
|
}({
|
|
345
327
|
isInForm: !!formContext,
|
|
@@ -404,7 +386,7 @@ const $b9c30139cd63c62a$export$ba25329847403e11 = /*#__PURE__*/ (0, $ceqeb$react
|
|
|
404
386
|
slots: {
|
|
405
387
|
description: {},
|
|
406
388
|
label: {
|
|
407
|
-
styles: "
|
|
389
|
+
styles: " _0a __a-3t1y __wb __xb _na _qb"
|
|
408
390
|
}
|
|
409
391
|
}
|
|
410
392
|
}
|
|
@@ -455,12 +437,12 @@ const $b9c30139cd63c62a$export$ba25329847403e11 = /*#__PURE__*/ (0, $ceqeb$react
|
|
|
455
437
|
},
|
|
456
438
|
styles: function anonymous(props) {
|
|
457
439
|
let rules = " .";
|
|
458
|
-
rules += '
|
|
459
|
-
if (props.isQuiet) rules += '
|
|
460
|
-
else rules += '
|
|
461
|
-
if (props.isQuiet) rules += '
|
|
462
|
-
else rules += '
|
|
463
|
-
if (props.isQuiet) rules += ' -
|
|
440
|
+
rules += ' y-375tp4';
|
|
441
|
+
if (props.isQuiet) rules += ' q___u';
|
|
442
|
+
else rules += ' q-1utmx2y';
|
|
443
|
+
if (props.isQuiet) rules += ' l-13f72lm';
|
|
444
|
+
else rules += ' l-1utmx2y';
|
|
445
|
+
if (props.isQuiet) rules += ' -_375tp4_y-M';
|
|
464
446
|
return rules;
|
|
465
447
|
}(props1),
|
|
466
448
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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 width: 'full',\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 gridAutoRows: 'min-content'\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBX,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,QAC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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 width: 'full',\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 gridAutoRows: 'min-content'\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"}
|