@react-spectrum/s2 3.0.0-nightly-e4497fdb6-250110 → 3.0.0-nightly-101d0772b-250112

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.
@@ -88,8 +88,9 @@ export interface PickerProps<T extends object> extends
88
88
  density: 'compact' | 'regular',
89
89
  /**
90
90
  * If the tab picker should only display icon and no text for the button label.
91
+ * @default 'show
91
92
  */
92
- isIconOnly?: boolean
93
+ labelBehavior?: 'show' | 'hide'
93
94
  }
94
95
 
95
96
  export const PickerContext = createContext<ContextValue<Partial<PickerProps<any>>, FocusableRefValue<HTMLButtonElement>>>(null);
@@ -162,7 +163,9 @@ const iconCenterWrapper = style({
162
163
  display: 'flex',
163
164
  gridArea: 'icon',
164
165
  paddingStart: {
165
- isIconOnly: size(6)
166
+ labelBehavior: {
167
+ hide: size(6)
168
+ }
166
169
  }
167
170
  });
168
171
 
@@ -181,7 +184,7 @@ function Picker<T extends object>(props: PickerProps<T>, ref: FocusableRef<HTMLB
181
184
  items,
182
185
  placeholder = stringFormatter.format('picker.placeholder'),
183
186
  density,
184
- isIconOnly,
187
+ labelBehavior = 'show',
185
188
  ...pickerProps
186
189
  } = props;
187
190
  let isQuiet = true;
@@ -217,7 +220,7 @@ function Picker<T extends object>(props: PickerProps<T>, ref: FocusableRef<HTMLB
217
220
  [IconContext, {
218
221
  slots: {
219
222
  icon: {
220
- render: centerBaseline({slot: 'icon', styles: iconCenterWrapper({isIconOnly})}),
223
+ render: centerBaseline({slot: 'icon', styles: iconCenterWrapper({labelBehavior})}),
221
224
  styles: icon
222
225
  }
223
226
  }
@@ -228,11 +231,13 @@ function Picker<T extends object>(props: PickerProps<T>, ref: FocusableRef<HTMLB
228
231
  [DEFAULT_SLOT]: {styles: style({
229
232
  display: {
230
233
  default: 'block',
231
- isIconOnly: 'none'
234
+ labelBehavior: {
235
+ hide: 'none'
236
+ }
232
237
  },
233
238
  flexGrow: 1,
234
239
  truncate: true
235
- })({isIconOnly})}
240
+ })({labelBehavior})}
236
241
  }
237
242
  }],
238
243
  [InsideSelectValueContext, true]