@zendeskgarden/react-dropdowns 9.0.0-next.4 → 9.0.0-next.6

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/README.md CHANGED
@@ -28,7 +28,7 @@ import { Field, Label, Combobox, Option } from '@zendeskgarden/react-dropdowns';
28
28
  */
29
29
  <ThemeProvider>
30
30
  <Field>
31
- <Label>Combobox</Label>
31
+ <Field.Label>Label</Field.Label>
32
32
  <Combobox>
33
33
  <Option value="One" />
34
34
  <Option value="Two" />
package/dist/index.cjs.js CHANGED
@@ -97,9 +97,9 @@ const useFieldContext = () => {
97
97
  };
98
98
 
99
99
  const COMPONENT_ID$v = 'dropdowns.combobox.label';
100
- const StyledLabel = styled__default.default(reactForms.Label).attrs({
100
+ const StyledLabel = styled__default.default(reactForms.Field.Label).attrs({
101
101
  'data-garden-id': COMPONENT_ID$v,
102
- 'data-garden-version': '9.0.0-next.4'
102
+ 'data-garden-version': '9.0.0-next.6'
103
103
  }).withConfig({
104
104
  displayName: "StyledLabel",
105
105
  componentId: "sc-az6now-0"
@@ -109,9 +109,9 @@ StyledLabel.defaultProps = {
109
109
  };
110
110
 
111
111
  const COMPONENT_ID$u = 'dropdowns.combobox.hint';
112
- const StyledHint = styled__default.default(reactForms.Hint).attrs({
112
+ const StyledHint = styled__default.default(reactForms.Field.Hint).attrs({
113
113
  'data-garden-id': COMPONENT_ID$u,
114
- 'data-garden-version': '9.0.0-next.4'
114
+ 'data-garden-version': '9.0.0-next.6'
115
115
  }).withConfig({
116
116
  displayName: "StyledHint",
117
117
  componentId: "sc-106qvqx-0"
@@ -121,9 +121,9 @@ StyledHint.defaultProps = {
121
121
  };
122
122
 
123
123
  const COMPONENT_ID$t = 'dropdowns.combobox.message';
124
- const StyledMessage = styled__default.default(reactForms.Message).attrs({
124
+ const StyledMessage = styled__default.default(reactForms.Field.Message).attrs({
125
125
  'data-garden-id': COMPONENT_ID$t,
126
- 'data-garden-version': '9.0.0-next.4'
126
+ 'data-garden-version': '9.0.0-next.6'
127
127
  }).withConfig({
128
128
  displayName: "StyledMessage",
129
129
  componentId: "sc-jux8m5-0"
@@ -140,7 +140,7 @@ const sizeStyles$a = props => {
140
140
  };
141
141
  const StyledCombobox = styled__default.default.div.attrs({
142
142
  'data-garden-id': COMPONENT_ID$s,
143
- 'data-garden-version': '9.0.0-next.4'
143
+ 'data-garden-version': '9.0.0-next.6'
144
144
  }).withConfig({
145
145
  displayName: "StyledCombobox",
146
146
  componentId: "sc-13eybg8-0"
@@ -152,7 +152,7 @@ StyledCombobox.defaultProps = {
152
152
  const COMPONENT_ID$r = 'dropdowns.combobox.container';
153
153
  const StyledContainer = styled__default.default.div.attrs({
154
154
  'data-garden-id': COMPONENT_ID$r,
155
- 'data-garden-version': '9.0.0-next.4'
155
+ 'data-garden-version': '9.0.0-next.6'
156
156
  }).withConfig({
157
157
  displayName: "StyledContainer",
158
158
  componentId: "sc-14i9jid-0"
@@ -164,7 +164,7 @@ StyledContainer.defaultProps = {
164
164
  const COMPONENT_ID$q = 'dropdowns.combobox.field';
165
165
  const StyledField = styled__default.default.div.attrs({
166
166
  'data-garden-id': COMPONENT_ID$q,
167
- 'data-garden-version': '9.0.0-next.4'
167
+ 'data-garden-version': '9.0.0-next.6'
168
168
  }).withConfig({
169
169
  displayName: "StyledField",
170
170
  componentId: "sc-zc57xl-0"
@@ -176,7 +176,7 @@ StyledField.defaultProps = {
176
176
  const COMPONENT_ID$p = 'dropdowns.combobox.floating';
177
177
  const StyledFloatingListbox = styled__default.default.div.attrs({
178
178
  'data-garden-id': COMPONENT_ID$p,
179
- 'data-garden-version': '9.0.0-next.4'
179
+ 'data-garden-version': '9.0.0-next.6'
180
180
  }).withConfig({
181
181
  displayName: "StyledFloatingListbox",
182
182
  componentId: "sc-1cp6spf-0"
@@ -192,7 +192,7 @@ StyledFloatingListbox.defaultProps = {
192
192
 
193
193
  const COMPONENT_ID$o = 'dropdowns.combobox.input';
194
194
  const colorStyles$8 = props => {
195
- const placeholderColor = reactTheming.getColor('neutralHue', 400, props.theme);
195
+ const placeholderColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
196
196
  return styled.css(["background-color:inherit;color:inherit;&::placeholder{opacity:1;color:", ";}"], placeholderColor);
197
197
  };
198
198
  const getHeight = props => {
@@ -211,7 +211,7 @@ const sizeStyles$9 = props => {
211
211
  };
212
212
  const StyledInput = styled__default.default.input.attrs({
213
213
  'data-garden-id': COMPONENT_ID$o,
214
- 'data-garden-version': '9.0.0-next.4'
214
+ 'data-garden-version': '9.0.0-next.6'
215
215
  }).withConfig({
216
216
  displayName: "StyledInput",
217
217
  componentId: "sc-1lkqdg-0"
@@ -227,7 +227,7 @@ const sizeStyles$8 = props => {
227
227
  };
228
228
  const StyledInputGroup = styled__default.default.div.attrs({
229
229
  'data-garden-id': COMPONENT_ID$n,
230
- 'data-garden-version': '9.0.0-next.4'
230
+ 'data-garden-version': '9.0.0-next.6'
231
231
  }).withConfig({
232
232
  displayName: "StyledInputGroup",
233
233
  componentId: "sc-yx3q7u-0"
@@ -247,33 +247,33 @@ const colorStyles$7 = props => {
247
247
  } else if (props.validation === 'error') {
248
248
  hue = 'dangerHue';
249
249
  }
250
- const backgroundColor = props.isBare ? 'transparent' : props.theme.colors.background;
250
+ const backgroundColor = props.isBare ? 'transparent' : reactTheming.getColorV8('background', 600 , props.theme);
251
251
  let borderColor;
252
252
  let hoverBorderColor;
253
253
  let focusBorderColor;
254
254
  let focusShade;
255
255
  if (props.validation) {
256
- borderColor = reactTheming.getColor(hue, SHADE, props.theme);
256
+ borderColor = reactTheming.getColorV8(hue, SHADE, props.theme);
257
257
  hoverBorderColor = borderColor;
258
258
  if (props.validation === 'warning') {
259
- focusBorderColor = reactTheming.getColor(hue, SHADE + 100, props.theme);
259
+ focusBorderColor = reactTheming.getColorV8(hue, SHADE + 100, props.theme);
260
260
  focusShade = SHADE + 100;
261
261
  } else {
262
262
  focusBorderColor = borderColor;
263
263
  }
264
264
  } else {
265
- borderColor = reactTheming.getColor('neutralHue', SHADE - 300, props.theme);
266
- hoverBorderColor = reactTheming.getColor('primaryHue', SHADE, props.theme);
265
+ borderColor = reactTheming.getColorV8('neutralHue', SHADE - 300, props.theme);
266
+ hoverBorderColor = reactTheming.getColorV8('primaryHue', SHADE, props.theme);
267
267
  focusBorderColor = hoverBorderColor;
268
268
  }
269
- const disabledBackgroundColor = props.isBare ? undefined : reactTheming.getColor('neutralHue', SHADE - 500, props.theme);
270
- const disabledBorderColor = reactTheming.getColor('neutralHue', SHADE - 400, props.theme);
271
- const disabledForegroundColor = reactTheming.getColor('neutralHue', SHADE - 200, props.theme);
269
+ const disabledBackgroundColor = props.isBare ? undefined : reactTheming.getColorV8('neutralHue', SHADE - 500, props.theme);
270
+ const disabledBorderColor = reactTheming.getColorV8('neutralHue', SHADE - 400, props.theme);
271
+ const disabledForegroundColor = reactTheming.getColorV8('neutralHue', SHADE - 200, props.theme);
272
272
  const focusSelector = `
273
273
  &:focus-within:not([aria-disabled='true']),
274
274
  &:focus-visible
275
275
  `;
276
- return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], props.isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, props.theme.colors.foreground, hoverBorderColor, reactTheming.focusStyles({
276
+ return styled.css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], props.isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, reactTheming.getColorV8('foreground', 600 , props.theme), hoverBorderColor, reactTheming.focusStyles({
277
277
  theme: props.theme,
278
278
  inset: props.focusInset,
279
279
  hue: focusBorderColor,
@@ -307,7 +307,7 @@ const sizeStyles$7 = props => {
307
307
  };
308
308
  const StyledTrigger = styled__default.default.div.attrs({
309
309
  'data-garden-id': COMPONENT_ID$m,
310
- 'data-garden-version': '9.0.0-next.4'
310
+ 'data-garden-version': '9.0.0-next.6'
311
311
  }).withConfig({
312
312
  displayName: "StyledTrigger",
313
313
  componentId: "sc-116nftk-0"
@@ -318,9 +318,9 @@ StyledTrigger.defaultProps = {
318
318
 
319
319
  const COMPONENT_ID$l = 'dropdowns.combobox.input_icon';
320
320
  const colorStyles$6 = props => {
321
- const color = reactTheming.getColor('neutralHue', 600, props.theme);
322
- const focusColor = reactTheming.getColor('neutralHue', 700, props.theme);
323
- const disabledColor = reactTheming.getColor('neutralHue', 400, props.theme);
321
+ const color = reactTheming.getColorV8('neutralHue', 600, props.theme);
322
+ const focusColor = reactTheming.getColorV8('neutralHue', 700, props.theme);
323
+ const disabledColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
324
324
  return styled.css(["color:", ";", ":hover &,", ":focus-within &,", ":focus &,", "[data-garden-focus-visible='true'] &{color:", ";}", "[aria-disabled='true'] &{color:", ";}"], props.isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
325
325
  };
326
326
  const sizeStyles$6 = props => {
@@ -349,7 +349,7 @@ const StyledInputIcon = styled__default.default(_ref => {
349
349
  return React.cloneElement(React.Children.only(children), props);
350
350
  }).attrs({
351
351
  'data-garden-id': COMPONENT_ID$l,
352
- 'data-garden-version': '9.0.0-next.4'
352
+ 'data-garden-version': '9.0.0-next.6'
353
353
  }).withConfig({
354
354
  displayName: "StyledInputIcon",
355
355
  componentId: "sc-gqbs1s-0"
@@ -364,15 +364,15 @@ const colorStyles$5 = props => {
364
364
  let boxShadow;
365
365
  if (props.isActive && props.$type !== 'group' && props.$type !== 'header') {
366
366
  const hue = props.$type === 'danger' ? 'dangerHue' : 'primaryHue';
367
- backgroundColor = reactTheming.getColor(hue, 600, props.theme, 0.08);
368
- boxShadow = `inset ${props.theme.rtl ? `-${props.theme.shadowWidths.md}` : props.theme.shadowWidths.md} 0 ${reactTheming.getColor(hue, 600, props.theme)}`;
367
+ backgroundColor = reactTheming.getColorV8(hue, 600, props.theme, 0.08);
368
+ boxShadow = `inset ${props.theme.rtl ? `-${props.theme.shadowWidths.md}` : props.theme.shadowWidths.md} 0 ${reactTheming.getColorV8(hue, 600, props.theme)}`;
369
369
  }
370
- const disabledForegroundColor = reactTheming.getColor('neutralHue', 400, props.theme);
371
- let foregroundColor = props.theme.colors.foreground;
370
+ const disabledForegroundColor = reactTheming.getColorV8('neutralHue', 400, props.theme);
371
+ let foregroundColor = reactTheming.getColorV8('foreground', 600 , props.theme);
372
372
  if (props.$type === 'add') {
373
- foregroundColor = reactTheming.getColor('primaryHue', 600, props.theme);
373
+ foregroundColor = reactTheming.getColorV8('primaryHue', 600, props.theme);
374
374
  } else if (props.$type === 'danger') {
375
- foregroundColor = reactTheming.getColor('dangerHue', 600, props.theme);
375
+ foregroundColor = reactTheming.getColorV8('dangerHue', 600, props.theme);
376
376
  }
377
377
  return styled.css(["box-shadow:", ";background-color:", ";color:", ";&[aria-disabled='true']{background-color:transparent;color:", ";}"], boxShadow, backgroundColor, foregroundColor, disabledForegroundColor);
378
378
  };
@@ -386,7 +386,7 @@ const sizeStyles$5 = props => {
386
386
  };
387
387
  const StyledOption = styled__default.default.li.attrs({
388
388
  'data-garden-id': COMPONENT_ID$k,
389
- 'data-garden-version': '9.0.0-next.4'
389
+ 'data-garden-version': '9.0.0-next.6'
390
390
  }).withConfig({
391
391
  displayName: "StyledOption",
392
392
  componentId: "sc-jl4wn6-0"
@@ -398,7 +398,7 @@ StyledOption.defaultProps = {
398
398
  const COMPONENT_ID$j = 'dropdowns.combobox.option.content';
399
399
  const StyledOptionContent = styled__default.default.div.attrs({
400
400
  'data-garden-id': COMPONENT_ID$j,
401
- 'data-garden-version': '9.0.0-next.4'
401
+ 'data-garden-version': '9.0.0-next.6'
402
402
  }).withConfig({
403
403
  displayName: "StyledOptionContent",
404
404
  componentId: "sc-121ujpu-0"
@@ -410,7 +410,7 @@ StyledOptionContent.defaultProps = {
410
410
  const COMPONENT_ID$i = 'dropdowns.combobox.optgroup';
411
411
  const StyledOptGroup = styled__default.default.ul.attrs({
412
412
  'data-garden-id': COMPONENT_ID$i,
413
- 'data-garden-version': '9.0.0-next.4'
413
+ 'data-garden-version': '9.0.0-next.6'
414
414
  }).withConfig({
415
415
  displayName: "StyledOptGroup",
416
416
  componentId: "sc-1kavqsx-0"
@@ -421,7 +421,7 @@ StyledOptGroup.defaultProps = {
421
421
 
422
422
  const COMPONENT_ID$h = 'dropdowns.combobox.separator';
423
423
  const colorStyles$4 = props => {
424
- const backgroundColor = reactTheming.getColor('neutralHue', 200, props.theme);
424
+ const backgroundColor = reactTheming.getColorV8('neutralHue', 200, props.theme);
425
425
  return styled.css(["background-color:", ";"], backgroundColor);
426
426
  };
427
427
  const sizeStyles$4 = props => {
@@ -431,7 +431,7 @@ const sizeStyles$4 = props => {
431
431
  };
432
432
  const StyledListboxSeparator = styled__default.default.li.attrs({
433
433
  'data-garden-id': COMPONENT_ID$h,
434
- 'data-garden-version': '9.0.0-next.4'
434
+ 'data-garden-version': '9.0.0-next.6'
435
435
  }).withConfig({
436
436
  displayName: "StyledListboxSeparator",
437
437
  componentId: "sc-1p6toh2-0"
@@ -448,7 +448,7 @@ const sizeStyles$3 = props => {
448
448
  };
449
449
  const StyledListbox = styled__default.default.ul.attrs({
450
450
  'data-garden-id': COMPONENT_ID$g,
451
- 'data-garden-version': '9.0.0-next.4'
451
+ 'data-garden-version': '9.0.0-next.6'
452
452
  }).withConfig({
453
453
  displayName: "StyledListbox",
454
454
  componentId: "sc-1k13ba7-0"
@@ -473,7 +473,7 @@ const StyledOptionIcon = styled__default.default(_ref => {
473
473
  return React.cloneElement(React.Children.only(children), props);
474
474
  }).attrs({
475
475
  'data-garden-id': COMPONENT_ID$f,
476
- 'data-garden-version': '9.0.0-next.4'
476
+ 'data-garden-version': '9.0.0-next.6'
477
477
  }).withConfig({
478
478
  displayName: "StyledOptionIcon",
479
479
  componentId: "sc-qsab3y-0"
@@ -484,7 +484,7 @@ StyledOptionIcon.defaultProps = {
484
484
 
485
485
  const COMPONENT_ID$e = 'dropdowns.combobox.option.meta';
486
486
  const colorStyles$3 = props => {
487
- const color = reactTheming.getColor('neutralHue', props.isDisabled ? 400 : 600, props.theme);
487
+ const color = reactTheming.getColorV8('neutralHue', props.isDisabled ? 400 : 600, props.theme);
488
488
  return styled.css(["color:", ";"], color);
489
489
  };
490
490
  const sizeStyles$1 = props => {
@@ -494,7 +494,7 @@ const sizeStyles$1 = props => {
494
494
  };
495
495
  const StyledOptionMeta = styled__default.default.div.attrs({
496
496
  'data-garden-id': COMPONENT_ID$e,
497
- 'data-garden-version': '9.0.0-next.4'
497
+ 'data-garden-version': '9.0.0-next.6'
498
498
  }).withConfig({
499
499
  displayName: "StyledOptionMeta",
500
500
  componentId: "sc-j6pu10-0"
@@ -510,9 +510,9 @@ const colorStyles$2 = props => {
510
510
  if (props.type === 'add' || props.type === 'danger') {
511
511
  color = 'inherit';
512
512
  } else if (props.type === 'header' || props.type === 'next' || props.type === 'previous') {
513
- color = reactTheming.getColor('neutralHue', 600, props.theme);
513
+ color = reactTheming.getColorV8('neutralHue', 600, props.theme);
514
514
  } else {
515
- color = reactTheming.getColor('primaryHue', 600, props.theme);
515
+ color = reactTheming.getColorV8('primaryHue', 600, props.theme);
516
516
  }
517
517
  return styled.css(["opacity:", ";color:", ";", "[aria-selected='true'] > &{opacity:1;}", "[aria-disabled='true'] > &{color:inherit;}"], opacity, color, StyledOption, StyledOption);
518
518
  };
@@ -539,7 +539,7 @@ const StyledOptionTypeIcon = styled__default.default(_ref => {
539
539
  return React.cloneElement(React.Children.only(children), props);
540
540
  }).attrs({
541
541
  'data-garden-id': COMPONENT_ID$d,
542
- 'data-garden-version': '9.0.0-next.4'
542
+ 'data-garden-version': '9.0.0-next.6'
543
543
  }).withConfig({
544
544
  displayName: "StyledOptionTypeIcon",
545
545
  componentId: "sc-xpink2-0"
@@ -551,23 +551,23 @@ StyledOptionTypeIcon.defaultProps = {
551
551
  const COMPONENT_ID$c = 'dropdowns.combobox.tag';
552
552
  const StyledTag = styled__default.default(reactTags.Tag).attrs({
553
553
  'data-garden-id': COMPONENT_ID$c,
554
- 'data-garden-version': '9.0.0-next.4'
554
+ 'data-garden-version': '9.0.0-next.6'
555
555
  }).withConfig({
556
556
  displayName: "StyledTag",
557
557
  componentId: "sc-1alam0r-0"
558
- })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : reactTheming.getColor('neutralHue', 400, props.theme), polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
558
+ })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : reactTheming.getColorV8('neutralHue', 400, props.theme), polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
559
559
  StyledTag.defaultProps = {
560
560
  theme: reactTheming.DEFAULT_THEME
561
561
  };
562
562
 
563
563
  const COMPONENT_ID$b = 'dropdowns.combobox.value';
564
564
  const colorStyles$1 = props => {
565
- const foregroundColor = props.isPlaceholder && reactTheming.getColor('neutralHue', 400, props.theme);
565
+ const foregroundColor = props.isPlaceholder && reactTheming.getColorV8('neutralHue', 400, props.theme);
566
566
  return styled.css(["color:", ";"], foregroundColor);
567
567
  };
568
568
  const StyledValue = styled__default.default.div.attrs({
569
569
  'data-garden-id': COMPONENT_ID$b,
570
- 'data-garden-version': '9.0.0-next.4'
570
+ 'data-garden-version': '9.0.0-next.6'
571
571
  }).withConfig({
572
572
  displayName: "StyledValue",
573
573
  componentId: "sc-t719sx-0"
@@ -583,13 +583,13 @@ StyledValue.defaultProps = {
583
583
 
584
584
  const COMPONENT_ID$a = 'dropdowns.combobox.tags_button';
585
585
  const colorStyles = props => {
586
- const color = reactTheming.getColor('primaryHue', 600, props.theme);
586
+ const color = reactTheming.getColorV8('primaryHue', 600, props.theme);
587
587
  return styled.css(["color:", ";&:disabled{color:inherit;}"], color);
588
588
  };
589
589
  const StyledTagsButton = styled__default.default(StyledValue).attrs({
590
590
  as: 'button',
591
591
  'data-garden-id': COMPONENT_ID$a,
592
- 'data-garden-version': '9.0.0-next.4'
592
+ 'data-garden-version': '9.0.0-next.6'
593
593
  }).withConfig({
594
594
  displayName: "StyledTagsButton",
595
595
  componentId: "sc-6q5w33-0"
@@ -601,7 +601,7 @@ StyledTagsButton.defaultProps = {
601
601
  const COMPONENT_ID$9 = 'dropdowns.menu';
602
602
  const StyledMenu = styled__default.default(StyledListbox).attrs({
603
603
  'data-garden-id': COMPONENT_ID$9,
604
- 'data-garden-version': '9.0.0-next.4'
604
+ 'data-garden-version': '9.0.0-next.6'
605
605
  }).withConfig({
606
606
  displayName: "StyledMenu",
607
607
  componentId: "sc-f77ntu-0"
@@ -617,7 +617,7 @@ StyledMenu.defaultProps = {
617
617
  const COMPONENT_ID$8 = 'dropdowns.menu.floating';
618
618
  const StyledFloatingMenu = styled__default.default(StyledFloatingListbox).attrs({
619
619
  'data-garden-id': COMPONENT_ID$8,
620
- 'data-garden-version': '9.0.0-next.4'
620
+ 'data-garden-version': '9.0.0-next.6'
621
621
  }).withConfig({
622
622
  displayName: "StyledFloatingMenu",
623
623
  componentId: "sc-1rc7ahb-0"
@@ -629,7 +629,7 @@ StyledFloatingMenu.defaultProps = {
629
629
  const COMPONENT_ID$7 = 'dropdowns.menu.item';
630
630
  const StyledItem = styled__default.default(StyledOption).attrs({
631
631
  'data-garden-id': COMPONENT_ID$7,
632
- 'data-garden-version': '9.0.0-next.4'
632
+ 'data-garden-version': '9.0.0-next.6'
633
633
  }).withConfig({
634
634
  displayName: "StyledItem",
635
635
  componentId: "sc-1jp99dq-0"
@@ -641,7 +641,7 @@ StyledItem.defaultProps = {
641
641
  const COMPONENT_ID$6 = 'dropdowns.menu.item.content';
642
642
  const StyledItemContent = styled__default.default(StyledOptionContent).attrs({
643
643
  'data-garden-id': COMPONENT_ID$6,
644
- 'data-garden-version': '9.0.0-next.4'
644
+ 'data-garden-version': '9.0.0-next.6'
645
645
  }).withConfig({
646
646
  displayName: "StyledItemContent",
647
647
  componentId: "sc-1opglsb-0"
@@ -653,7 +653,7 @@ StyledItemContent.defaultProps = {
653
653
  const COMPONENT_ID$5 = 'dropdowns.menu.item_group';
654
654
  const StyledItemGroup = styled__default.default(StyledOptGroup).attrs({
655
655
  'data-garden-id': COMPONENT_ID$5,
656
- 'data-garden-version': '9.0.0-next.4'
656
+ 'data-garden-version': '9.0.0-next.6'
657
657
  }).withConfig({
658
658
  displayName: "StyledItemGroup",
659
659
  componentId: "sc-1umk3cg-0"
@@ -665,7 +665,7 @@ StyledItemGroup.defaultProps = {
665
665
  const COMPONENT_ID$4 = 'dropdowns.menu.item.icon';
666
666
  const StyledItemIcon = styled__default.default(StyledOptionIcon).attrs({
667
667
  'data-garden-id': COMPONENT_ID$4,
668
- 'data-garden-version': '9.0.0-next.4'
668
+ 'data-garden-version': '9.0.0-next.6'
669
669
  }).withConfig({
670
670
  displayName: "StyledItemIcon",
671
671
  componentId: "sc-w9orqb-0"
@@ -677,7 +677,7 @@ StyledItemIcon.defaultProps = {
677
677
  const COMPONENT_ID$3 = 'dropdowns.menu.item.meta';
678
678
  const StyledItemMeta = styled__default.default(StyledOptionMeta).attrs({
679
679
  'data-garden-id': COMPONENT_ID$3,
680
- 'data-garden-version': '9.0.0-next.4'
680
+ 'data-garden-version': '9.0.0-next.6'
681
681
  }).withConfig({
682
682
  displayName: "StyledItemMeta",
683
683
  componentId: "sc-1unw3x1-0"
@@ -689,7 +689,7 @@ StyledItemMeta.defaultProps = {
689
689
  const COMPONENT_ID$2 = 'dropdowns.menu.item.type_icon';
690
690
  const StyledItemTypeIcon = styled__default.default(StyledOptionTypeIcon).attrs({
691
691
  'data-garden-id': COMPONENT_ID$2,
692
- 'data-garden-version': '9.0.0-next.4'
692
+ 'data-garden-version': '9.0.0-next.6'
693
693
  }).withConfig({
694
694
  displayName: "StyledItemTypeIcon",
695
695
  componentId: "sc-1pll3nu-0"
@@ -701,7 +701,7 @@ StyledItemTypeIcon.defaultProps = {
701
701
  const COMPONENT_ID$1 = 'dropdowns.menu.button';
702
702
  const StyledButton = styled__default.default(reactButtons.Button).attrs({
703
703
  'data-garden-id': COMPONENT_ID$1,
704
- 'data-garden-version': '9.0.0-next.4'
704
+ 'data-garden-version': '9.0.0-next.6'
705
705
  }).withConfig({
706
706
  displayName: "StyledButton",
707
707
  componentId: "sc-5hs2jg-0"
@@ -713,7 +713,7 @@ StyledButton.defaultProps = {
713
713
  const COMPONENT_ID = 'dropdowns.menu.separator';
714
714
  const StyledSeparator = styled__default.default(StyledListboxSeparator).attrs({
715
715
  'data-garden-id': COMPONENT_ID,
716
- 'data-garden-version': '9.0.0-next.4'
716
+ 'data-garden-version': '9.0.0-next.6'
717
717
  }).withConfig({
718
718
  displayName: "StyledSeparator",
719
719
  componentId: "sc-8kqwen-0"
@@ -1217,32 +1217,6 @@ Combobox.defaultProps = {
1217
1217
  maxTags: MAX_TAGS
1218
1218
  };
1219
1219
 
1220
- const Field = React.forwardRef((props, ref) => {
1221
- const [labelProps, setLabelProps] = React.useState(undefined);
1222
- const [hintProps, setHintProps] = React.useState(undefined);
1223
- const [messageProps, setMessageProps] = React.useState(undefined);
1224
- const [hasHint, setHasHint] = React.useState(false);
1225
- const [hasMessage, setHasMessage] = React.useState(false);
1226
- const contextValue = React.useMemo(() => ({
1227
- labelProps,
1228
- setLabelProps,
1229
- hasHint,
1230
- setHasHint,
1231
- hintProps,
1232
- setHintProps,
1233
- hasMessage,
1234
- setHasMessage,
1235
- messageProps,
1236
- setMessageProps
1237
- }), [labelProps, setLabelProps, hasHint, setHasHint, hintProps, setHintProps, hasMessage, setHasMessage, messageProps, setMessageProps]);
1238
- return React__namespace.default.createElement(FieldContext.Provider, {
1239
- value: contextValue
1240
- }, React__namespace.default.createElement(StyledField, _extends$5({}, props, {
1241
- ref: ref
1242
- })));
1243
- });
1244
- Field.displayName = 'Field';
1245
-
1246
1220
  const Hint = React.forwardRef((props, ref) => {
1247
1221
  const {
1248
1222
  hintProps,
@@ -1301,6 +1275,36 @@ Message.propTypes = {
1301
1275
  validationLabel: PropTypes__default.default.string
1302
1276
  };
1303
1277
 
1278
+ const FieldComponent = React.forwardRef((props, ref) => {
1279
+ const [labelProps, setLabelProps] = React.useState(undefined);
1280
+ const [hintProps, setHintProps] = React.useState(undefined);
1281
+ const [messageProps, setMessageProps] = React.useState(undefined);
1282
+ const [hasHint, setHasHint] = React.useState(false);
1283
+ const [hasMessage, setHasMessage] = React.useState(false);
1284
+ const contextValue = React.useMemo(() => ({
1285
+ labelProps,
1286
+ setLabelProps,
1287
+ hasHint,
1288
+ setHasHint,
1289
+ hintProps,
1290
+ setHintProps,
1291
+ hasMessage,
1292
+ setHasMessage,
1293
+ messageProps,
1294
+ setMessageProps
1295
+ }), [labelProps, setLabelProps, hasHint, setHasHint, hintProps, setHintProps, hasMessage, setHasMessage, messageProps, setMessageProps]);
1296
+ return React__namespace.default.createElement(FieldContext.Provider, {
1297
+ value: contextValue
1298
+ }, React__namespace.default.createElement(StyledField, _extends$5({}, props, {
1299
+ ref: ref
1300
+ })));
1301
+ });
1302
+ FieldComponent.displayName = 'Field';
1303
+ const Field = FieldComponent;
1304
+ Field.Hint = Hint;
1305
+ Field.Label = Label;
1306
+ Field.Message = Message;
1307
+
1304
1308
  var _path$3;
1305
1309
  function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
1306
1310
  var SvgPlusStroke = function SvgPlusStroke(props) {
package/dist/index.esm.js CHANGED
@@ -10,8 +10,8 @@ import React__default, { createContext, useContext, cloneElement, Children, forw
10
10
  import PropTypes from 'prop-types';
11
11
  import styled, { css, ThemeContext } from 'styled-components';
12
12
  import { useCombobox } from '@zendeskgarden/container-combobox';
13
- import { retrieveComponentStyles, DEFAULT_THEME, menuStyles, getColor, getLineHeight, focusStyles, arrowStyles, useText, useDocument, useWindow, PLACEMENT as PLACEMENT$1, getFloatingPlacements, getMenuPosition, getArrowPosition } from '@zendeskgarden/react-theming';
14
- import { Label as Label$1, Hint as Hint$1, Message as Message$1, VALIDATION } from '@zendeskgarden/react-forms';
13
+ import { retrieveComponentStyles, DEFAULT_THEME, menuStyles, getColorV8, getLineHeight, focusStyles, arrowStyles, useText, useDocument, useWindow, PLACEMENT as PLACEMENT$1, getFloatingPlacements, getMenuPosition, getArrowPosition } from '@zendeskgarden/react-theming';
14
+ import { Field as Field$1, VALIDATION } from '@zendeskgarden/react-forms';
15
15
  export { VALIDATION } from '@zendeskgarden/react-forms';
16
16
  import { hideVisually, math } from 'polished';
17
17
  import { Tag as Tag$1 } from '@zendeskgarden/react-tags';
@@ -73,9 +73,9 @@ const useFieldContext = () => {
73
73
  };
74
74
 
75
75
  const COMPONENT_ID$v = 'dropdowns.combobox.label';
76
- const StyledLabel = styled(Label$1).attrs({
76
+ const StyledLabel = styled(Field$1.Label).attrs({
77
77
  'data-garden-id': COMPONENT_ID$v,
78
- 'data-garden-version': '9.0.0-next.4'
78
+ 'data-garden-version': '9.0.0-next.6'
79
79
  }).withConfig({
80
80
  displayName: "StyledLabel",
81
81
  componentId: "sc-az6now-0"
@@ -85,9 +85,9 @@ StyledLabel.defaultProps = {
85
85
  };
86
86
 
87
87
  const COMPONENT_ID$u = 'dropdowns.combobox.hint';
88
- const StyledHint = styled(Hint$1).attrs({
88
+ const StyledHint = styled(Field$1.Hint).attrs({
89
89
  'data-garden-id': COMPONENT_ID$u,
90
- 'data-garden-version': '9.0.0-next.4'
90
+ 'data-garden-version': '9.0.0-next.6'
91
91
  }).withConfig({
92
92
  displayName: "StyledHint",
93
93
  componentId: "sc-106qvqx-0"
@@ -97,9 +97,9 @@ StyledHint.defaultProps = {
97
97
  };
98
98
 
99
99
  const COMPONENT_ID$t = 'dropdowns.combobox.message';
100
- const StyledMessage = styled(Message$1).attrs({
100
+ const StyledMessage = styled(Field$1.Message).attrs({
101
101
  'data-garden-id': COMPONENT_ID$t,
102
- 'data-garden-version': '9.0.0-next.4'
102
+ 'data-garden-version': '9.0.0-next.6'
103
103
  }).withConfig({
104
104
  displayName: "StyledMessage",
105
105
  componentId: "sc-jux8m5-0"
@@ -116,7 +116,7 @@ const sizeStyles$a = props => {
116
116
  };
117
117
  const StyledCombobox = styled.div.attrs({
118
118
  'data-garden-id': COMPONENT_ID$s,
119
- 'data-garden-version': '9.0.0-next.4'
119
+ 'data-garden-version': '9.0.0-next.6'
120
120
  }).withConfig({
121
121
  displayName: "StyledCombobox",
122
122
  componentId: "sc-13eybg8-0"
@@ -128,7 +128,7 @@ StyledCombobox.defaultProps = {
128
128
  const COMPONENT_ID$r = 'dropdowns.combobox.container';
129
129
  const StyledContainer = styled.div.attrs({
130
130
  'data-garden-id': COMPONENT_ID$r,
131
- 'data-garden-version': '9.0.0-next.4'
131
+ 'data-garden-version': '9.0.0-next.6'
132
132
  }).withConfig({
133
133
  displayName: "StyledContainer",
134
134
  componentId: "sc-14i9jid-0"
@@ -140,7 +140,7 @@ StyledContainer.defaultProps = {
140
140
  const COMPONENT_ID$q = 'dropdowns.combobox.field';
141
141
  const StyledField = styled.div.attrs({
142
142
  'data-garden-id': COMPONENT_ID$q,
143
- 'data-garden-version': '9.0.0-next.4'
143
+ 'data-garden-version': '9.0.0-next.6'
144
144
  }).withConfig({
145
145
  displayName: "StyledField",
146
146
  componentId: "sc-zc57xl-0"
@@ -152,7 +152,7 @@ StyledField.defaultProps = {
152
152
  const COMPONENT_ID$p = 'dropdowns.combobox.floating';
153
153
  const StyledFloatingListbox = styled.div.attrs({
154
154
  'data-garden-id': COMPONENT_ID$p,
155
- 'data-garden-version': '9.0.0-next.4'
155
+ 'data-garden-version': '9.0.0-next.6'
156
156
  }).withConfig({
157
157
  displayName: "StyledFloatingListbox",
158
158
  componentId: "sc-1cp6spf-0"
@@ -168,7 +168,7 @@ StyledFloatingListbox.defaultProps = {
168
168
 
169
169
  const COMPONENT_ID$o = 'dropdowns.combobox.input';
170
170
  const colorStyles$8 = props => {
171
- const placeholderColor = getColor('neutralHue', 400, props.theme);
171
+ const placeholderColor = getColorV8('neutralHue', 400, props.theme);
172
172
  return css(["background-color:inherit;color:inherit;&::placeholder{opacity:1;color:", ";}"], placeholderColor);
173
173
  };
174
174
  const getHeight = props => {
@@ -187,7 +187,7 @@ const sizeStyles$9 = props => {
187
187
  };
188
188
  const StyledInput = styled.input.attrs({
189
189
  'data-garden-id': COMPONENT_ID$o,
190
- 'data-garden-version': '9.0.0-next.4'
190
+ 'data-garden-version': '9.0.0-next.6'
191
191
  }).withConfig({
192
192
  displayName: "StyledInput",
193
193
  componentId: "sc-1lkqdg-0"
@@ -203,7 +203,7 @@ const sizeStyles$8 = props => {
203
203
  };
204
204
  const StyledInputGroup = styled.div.attrs({
205
205
  'data-garden-id': COMPONENT_ID$n,
206
- 'data-garden-version': '9.0.0-next.4'
206
+ 'data-garden-version': '9.0.0-next.6'
207
207
  }).withConfig({
208
208
  displayName: "StyledInputGroup",
209
209
  componentId: "sc-yx3q7u-0"
@@ -223,33 +223,33 @@ const colorStyles$7 = props => {
223
223
  } else if (props.validation === 'error') {
224
224
  hue = 'dangerHue';
225
225
  }
226
- const backgroundColor = props.isBare ? 'transparent' : props.theme.colors.background;
226
+ const backgroundColor = props.isBare ? 'transparent' : getColorV8('background', 600 , props.theme);
227
227
  let borderColor;
228
228
  let hoverBorderColor;
229
229
  let focusBorderColor;
230
230
  let focusShade;
231
231
  if (props.validation) {
232
- borderColor = getColor(hue, SHADE, props.theme);
232
+ borderColor = getColorV8(hue, SHADE, props.theme);
233
233
  hoverBorderColor = borderColor;
234
234
  if (props.validation === 'warning') {
235
- focusBorderColor = getColor(hue, SHADE + 100, props.theme);
235
+ focusBorderColor = getColorV8(hue, SHADE + 100, props.theme);
236
236
  focusShade = SHADE + 100;
237
237
  } else {
238
238
  focusBorderColor = borderColor;
239
239
  }
240
240
  } else {
241
- borderColor = getColor('neutralHue', SHADE - 300, props.theme);
242
- hoverBorderColor = getColor('primaryHue', SHADE, props.theme);
241
+ borderColor = getColorV8('neutralHue', SHADE - 300, props.theme);
242
+ hoverBorderColor = getColorV8('primaryHue', SHADE, props.theme);
243
243
  focusBorderColor = hoverBorderColor;
244
244
  }
245
- const disabledBackgroundColor = props.isBare ? undefined : getColor('neutralHue', SHADE - 500, props.theme);
246
- const disabledBorderColor = getColor('neutralHue', SHADE - 400, props.theme);
247
- const disabledForegroundColor = getColor('neutralHue', SHADE - 200, props.theme);
245
+ const disabledBackgroundColor = props.isBare ? undefined : getColorV8('neutralHue', SHADE - 500, props.theme);
246
+ const disabledBorderColor = getColorV8('neutralHue', SHADE - 400, props.theme);
247
+ const disabledForegroundColor = getColorV8('neutralHue', SHADE - 200, props.theme);
248
248
  const focusSelector = `
249
249
  &:focus-within:not([aria-disabled='true']),
250
250
  &:focus-visible
251
251
  `;
252
- return css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], props.isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, props.theme.colors.foreground, hoverBorderColor, focusStyles({
252
+ return css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";}", " &[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], props.isLabelHovered ? hoverBorderColor : borderColor, backgroundColor, getColorV8('foreground', 600 , props.theme), hoverBorderColor, focusStyles({
253
253
  theme: props.theme,
254
254
  inset: props.focusInset,
255
255
  hue: focusBorderColor,
@@ -283,7 +283,7 @@ const sizeStyles$7 = props => {
283
283
  };
284
284
  const StyledTrigger = styled.div.attrs({
285
285
  'data-garden-id': COMPONENT_ID$m,
286
- 'data-garden-version': '9.0.0-next.4'
286
+ 'data-garden-version': '9.0.0-next.6'
287
287
  }).withConfig({
288
288
  displayName: "StyledTrigger",
289
289
  componentId: "sc-116nftk-0"
@@ -294,9 +294,9 @@ StyledTrigger.defaultProps = {
294
294
 
295
295
  const COMPONENT_ID$l = 'dropdowns.combobox.input_icon';
296
296
  const colorStyles$6 = props => {
297
- const color = getColor('neutralHue', 600, props.theme);
298
- const focusColor = getColor('neutralHue', 700, props.theme);
299
- const disabledColor = getColor('neutralHue', 400, props.theme);
297
+ const color = getColorV8('neutralHue', 600, props.theme);
298
+ const focusColor = getColorV8('neutralHue', 700, props.theme);
299
+ const disabledColor = getColorV8('neutralHue', 400, props.theme);
300
300
  return css(["color:", ";", ":hover &,", ":focus-within &,", ":focus &,", "[data-garden-focus-visible='true'] &{color:", ";}", "[aria-disabled='true'] &{color:", ";}"], props.isLabelHovered ? focusColor : color, StyledTrigger, StyledTrigger, StyledTrigger, StyledTrigger, focusColor, StyledTrigger, disabledColor);
301
301
  };
302
302
  const sizeStyles$6 = props => {
@@ -325,7 +325,7 @@ const StyledInputIcon = styled(_ref => {
325
325
  return cloneElement(Children.only(children), props);
326
326
  }).attrs({
327
327
  'data-garden-id': COMPONENT_ID$l,
328
- 'data-garden-version': '9.0.0-next.4'
328
+ 'data-garden-version': '9.0.0-next.6'
329
329
  }).withConfig({
330
330
  displayName: "StyledInputIcon",
331
331
  componentId: "sc-gqbs1s-0"
@@ -340,15 +340,15 @@ const colorStyles$5 = props => {
340
340
  let boxShadow;
341
341
  if (props.isActive && props.$type !== 'group' && props.$type !== 'header') {
342
342
  const hue = props.$type === 'danger' ? 'dangerHue' : 'primaryHue';
343
- backgroundColor = getColor(hue, 600, props.theme, 0.08);
344
- boxShadow = `inset ${props.theme.rtl ? `-${props.theme.shadowWidths.md}` : props.theme.shadowWidths.md} 0 ${getColor(hue, 600, props.theme)}`;
343
+ backgroundColor = getColorV8(hue, 600, props.theme, 0.08);
344
+ boxShadow = `inset ${props.theme.rtl ? `-${props.theme.shadowWidths.md}` : props.theme.shadowWidths.md} 0 ${getColorV8(hue, 600, props.theme)}`;
345
345
  }
346
- const disabledForegroundColor = getColor('neutralHue', 400, props.theme);
347
- let foregroundColor = props.theme.colors.foreground;
346
+ const disabledForegroundColor = getColorV8('neutralHue', 400, props.theme);
347
+ let foregroundColor = getColorV8('foreground', 600 , props.theme);
348
348
  if (props.$type === 'add') {
349
- foregroundColor = getColor('primaryHue', 600, props.theme);
349
+ foregroundColor = getColorV8('primaryHue', 600, props.theme);
350
350
  } else if (props.$type === 'danger') {
351
- foregroundColor = getColor('dangerHue', 600, props.theme);
351
+ foregroundColor = getColorV8('dangerHue', 600, props.theme);
352
352
  }
353
353
  return css(["box-shadow:", ";background-color:", ";color:", ";&[aria-disabled='true']{background-color:transparent;color:", ";}"], boxShadow, backgroundColor, foregroundColor, disabledForegroundColor);
354
354
  };
@@ -362,7 +362,7 @@ const sizeStyles$5 = props => {
362
362
  };
363
363
  const StyledOption = styled.li.attrs({
364
364
  'data-garden-id': COMPONENT_ID$k,
365
- 'data-garden-version': '9.0.0-next.4'
365
+ 'data-garden-version': '9.0.0-next.6'
366
366
  }).withConfig({
367
367
  displayName: "StyledOption",
368
368
  componentId: "sc-jl4wn6-0"
@@ -374,7 +374,7 @@ StyledOption.defaultProps = {
374
374
  const COMPONENT_ID$j = 'dropdowns.combobox.option.content';
375
375
  const StyledOptionContent = styled.div.attrs({
376
376
  'data-garden-id': COMPONENT_ID$j,
377
- 'data-garden-version': '9.0.0-next.4'
377
+ 'data-garden-version': '9.0.0-next.6'
378
378
  }).withConfig({
379
379
  displayName: "StyledOptionContent",
380
380
  componentId: "sc-121ujpu-0"
@@ -386,7 +386,7 @@ StyledOptionContent.defaultProps = {
386
386
  const COMPONENT_ID$i = 'dropdowns.combobox.optgroup';
387
387
  const StyledOptGroup = styled.ul.attrs({
388
388
  'data-garden-id': COMPONENT_ID$i,
389
- 'data-garden-version': '9.0.0-next.4'
389
+ 'data-garden-version': '9.0.0-next.6'
390
390
  }).withConfig({
391
391
  displayName: "StyledOptGroup",
392
392
  componentId: "sc-1kavqsx-0"
@@ -397,7 +397,7 @@ StyledOptGroup.defaultProps = {
397
397
 
398
398
  const COMPONENT_ID$h = 'dropdowns.combobox.separator';
399
399
  const colorStyles$4 = props => {
400
- const backgroundColor = getColor('neutralHue', 200, props.theme);
400
+ const backgroundColor = getColorV8('neutralHue', 200, props.theme);
401
401
  return css(["background-color:", ";"], backgroundColor);
402
402
  };
403
403
  const sizeStyles$4 = props => {
@@ -407,7 +407,7 @@ const sizeStyles$4 = props => {
407
407
  };
408
408
  const StyledListboxSeparator = styled.li.attrs({
409
409
  'data-garden-id': COMPONENT_ID$h,
410
- 'data-garden-version': '9.0.0-next.4'
410
+ 'data-garden-version': '9.0.0-next.6'
411
411
  }).withConfig({
412
412
  displayName: "StyledListboxSeparator",
413
413
  componentId: "sc-1p6toh2-0"
@@ -424,7 +424,7 @@ const sizeStyles$3 = props => {
424
424
  };
425
425
  const StyledListbox = styled.ul.attrs({
426
426
  'data-garden-id': COMPONENT_ID$g,
427
- 'data-garden-version': '9.0.0-next.4'
427
+ 'data-garden-version': '9.0.0-next.6'
428
428
  }).withConfig({
429
429
  displayName: "StyledListbox",
430
430
  componentId: "sc-1k13ba7-0"
@@ -449,7 +449,7 @@ const StyledOptionIcon = styled(_ref => {
449
449
  return cloneElement(Children.only(children), props);
450
450
  }).attrs({
451
451
  'data-garden-id': COMPONENT_ID$f,
452
- 'data-garden-version': '9.0.0-next.4'
452
+ 'data-garden-version': '9.0.0-next.6'
453
453
  }).withConfig({
454
454
  displayName: "StyledOptionIcon",
455
455
  componentId: "sc-qsab3y-0"
@@ -460,7 +460,7 @@ StyledOptionIcon.defaultProps = {
460
460
 
461
461
  const COMPONENT_ID$e = 'dropdowns.combobox.option.meta';
462
462
  const colorStyles$3 = props => {
463
- const color = getColor('neutralHue', props.isDisabled ? 400 : 600, props.theme);
463
+ const color = getColorV8('neutralHue', props.isDisabled ? 400 : 600, props.theme);
464
464
  return css(["color:", ";"], color);
465
465
  };
466
466
  const sizeStyles$1 = props => {
@@ -470,7 +470,7 @@ const sizeStyles$1 = props => {
470
470
  };
471
471
  const StyledOptionMeta = styled.div.attrs({
472
472
  'data-garden-id': COMPONENT_ID$e,
473
- 'data-garden-version': '9.0.0-next.4'
473
+ 'data-garden-version': '9.0.0-next.6'
474
474
  }).withConfig({
475
475
  displayName: "StyledOptionMeta",
476
476
  componentId: "sc-j6pu10-0"
@@ -486,9 +486,9 @@ const colorStyles$2 = props => {
486
486
  if (props.type === 'add' || props.type === 'danger') {
487
487
  color = 'inherit';
488
488
  } else if (props.type === 'header' || props.type === 'next' || props.type === 'previous') {
489
- color = getColor('neutralHue', 600, props.theme);
489
+ color = getColorV8('neutralHue', 600, props.theme);
490
490
  } else {
491
- color = getColor('primaryHue', 600, props.theme);
491
+ color = getColorV8('primaryHue', 600, props.theme);
492
492
  }
493
493
  return css(["opacity:", ";color:", ";", "[aria-selected='true'] > &{opacity:1;}", "[aria-disabled='true'] > &{color:inherit;}"], opacity, color, StyledOption, StyledOption);
494
494
  };
@@ -515,7 +515,7 @@ const StyledOptionTypeIcon = styled(_ref => {
515
515
  return cloneElement(Children.only(children), props);
516
516
  }).attrs({
517
517
  'data-garden-id': COMPONENT_ID$d,
518
- 'data-garden-version': '9.0.0-next.4'
518
+ 'data-garden-version': '9.0.0-next.6'
519
519
  }).withConfig({
520
520
  displayName: "StyledOptionTypeIcon",
521
521
  componentId: "sc-xpink2-0"
@@ -527,23 +527,23 @@ StyledOptionTypeIcon.defaultProps = {
527
527
  const COMPONENT_ID$c = 'dropdowns.combobox.tag';
528
528
  const StyledTag = styled(Tag$1).attrs({
529
529
  'data-garden-id': COMPONENT_ID$c,
530
- 'data-garden-version': '9.0.0-next.4'
530
+ 'data-garden-version': '9.0.0-next.6'
531
531
  }).withConfig({
532
532
  displayName: "StyledTag",
533
533
  componentId: "sc-1alam0r-0"
534
- })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : getColor('neutralHue', 400, props.theme), hideVisually(), props => retrieveComponentStyles(COMPONENT_ID$c, props));
534
+ })(["&[aria-disabled='true']{color:", ";}&[hidden]{display:revert;", "}", ";"], props => props.hue ? undefined : getColorV8('neutralHue', 400, props.theme), hideVisually(), props => retrieveComponentStyles(COMPONENT_ID$c, props));
535
535
  StyledTag.defaultProps = {
536
536
  theme: DEFAULT_THEME
537
537
  };
538
538
 
539
539
  const COMPONENT_ID$b = 'dropdowns.combobox.value';
540
540
  const colorStyles$1 = props => {
541
- const foregroundColor = props.isPlaceholder && getColor('neutralHue', 400, props.theme);
541
+ const foregroundColor = props.isPlaceholder && getColorV8('neutralHue', 400, props.theme);
542
542
  return css(["color:", ";"], foregroundColor);
543
543
  };
544
544
  const StyledValue = styled.div.attrs({
545
545
  'data-garden-id': COMPONENT_ID$b,
546
- 'data-garden-version': '9.0.0-next.4'
546
+ 'data-garden-version': '9.0.0-next.6'
547
547
  }).withConfig({
548
548
  displayName: "StyledValue",
549
549
  componentId: "sc-t719sx-0"
@@ -559,13 +559,13 @@ StyledValue.defaultProps = {
559
559
 
560
560
  const COMPONENT_ID$a = 'dropdowns.combobox.tags_button';
561
561
  const colorStyles = props => {
562
- const color = getColor('primaryHue', 600, props.theme);
562
+ const color = getColorV8('primaryHue', 600, props.theme);
563
563
  return css(["color:", ";&:disabled{color:inherit;}"], color);
564
564
  };
565
565
  const StyledTagsButton = styled(StyledValue).attrs({
566
566
  as: 'button',
567
567
  'data-garden-id': COMPONENT_ID$a,
568
- 'data-garden-version': '9.0.0-next.4'
568
+ 'data-garden-version': '9.0.0-next.6'
569
569
  }).withConfig({
570
570
  displayName: "StyledTagsButton",
571
571
  componentId: "sc-6q5w33-0"
@@ -577,7 +577,7 @@ StyledTagsButton.defaultProps = {
577
577
  const COMPONENT_ID$9 = 'dropdowns.menu';
578
578
  const StyledMenu = styled(StyledListbox).attrs({
579
579
  'data-garden-id': COMPONENT_ID$9,
580
- 'data-garden-version': '9.0.0-next.4'
580
+ 'data-garden-version': '9.0.0-next.6'
581
581
  }).withConfig({
582
582
  displayName: "StyledMenu",
583
583
  componentId: "sc-f77ntu-0"
@@ -593,7 +593,7 @@ StyledMenu.defaultProps = {
593
593
  const COMPONENT_ID$8 = 'dropdowns.menu.floating';
594
594
  const StyledFloatingMenu = styled(StyledFloatingListbox).attrs({
595
595
  'data-garden-id': COMPONENT_ID$8,
596
- 'data-garden-version': '9.0.0-next.4'
596
+ 'data-garden-version': '9.0.0-next.6'
597
597
  }).withConfig({
598
598
  displayName: "StyledFloatingMenu",
599
599
  componentId: "sc-1rc7ahb-0"
@@ -605,7 +605,7 @@ StyledFloatingMenu.defaultProps = {
605
605
  const COMPONENT_ID$7 = 'dropdowns.menu.item';
606
606
  const StyledItem = styled(StyledOption).attrs({
607
607
  'data-garden-id': COMPONENT_ID$7,
608
- 'data-garden-version': '9.0.0-next.4'
608
+ 'data-garden-version': '9.0.0-next.6'
609
609
  }).withConfig({
610
610
  displayName: "StyledItem",
611
611
  componentId: "sc-1jp99dq-0"
@@ -617,7 +617,7 @@ StyledItem.defaultProps = {
617
617
  const COMPONENT_ID$6 = 'dropdowns.menu.item.content';
618
618
  const StyledItemContent = styled(StyledOptionContent).attrs({
619
619
  'data-garden-id': COMPONENT_ID$6,
620
- 'data-garden-version': '9.0.0-next.4'
620
+ 'data-garden-version': '9.0.0-next.6'
621
621
  }).withConfig({
622
622
  displayName: "StyledItemContent",
623
623
  componentId: "sc-1opglsb-0"
@@ -629,7 +629,7 @@ StyledItemContent.defaultProps = {
629
629
  const COMPONENT_ID$5 = 'dropdowns.menu.item_group';
630
630
  const StyledItemGroup = styled(StyledOptGroup).attrs({
631
631
  'data-garden-id': COMPONENT_ID$5,
632
- 'data-garden-version': '9.0.0-next.4'
632
+ 'data-garden-version': '9.0.0-next.6'
633
633
  }).withConfig({
634
634
  displayName: "StyledItemGroup",
635
635
  componentId: "sc-1umk3cg-0"
@@ -641,7 +641,7 @@ StyledItemGroup.defaultProps = {
641
641
  const COMPONENT_ID$4 = 'dropdowns.menu.item.icon';
642
642
  const StyledItemIcon = styled(StyledOptionIcon).attrs({
643
643
  'data-garden-id': COMPONENT_ID$4,
644
- 'data-garden-version': '9.0.0-next.4'
644
+ 'data-garden-version': '9.0.0-next.6'
645
645
  }).withConfig({
646
646
  displayName: "StyledItemIcon",
647
647
  componentId: "sc-w9orqb-0"
@@ -653,7 +653,7 @@ StyledItemIcon.defaultProps = {
653
653
  const COMPONENT_ID$3 = 'dropdowns.menu.item.meta';
654
654
  const StyledItemMeta = styled(StyledOptionMeta).attrs({
655
655
  'data-garden-id': COMPONENT_ID$3,
656
- 'data-garden-version': '9.0.0-next.4'
656
+ 'data-garden-version': '9.0.0-next.6'
657
657
  }).withConfig({
658
658
  displayName: "StyledItemMeta",
659
659
  componentId: "sc-1unw3x1-0"
@@ -665,7 +665,7 @@ StyledItemMeta.defaultProps = {
665
665
  const COMPONENT_ID$2 = 'dropdowns.menu.item.type_icon';
666
666
  const StyledItemTypeIcon = styled(StyledOptionTypeIcon).attrs({
667
667
  'data-garden-id': COMPONENT_ID$2,
668
- 'data-garden-version': '9.0.0-next.4'
668
+ 'data-garden-version': '9.0.0-next.6'
669
669
  }).withConfig({
670
670
  displayName: "StyledItemTypeIcon",
671
671
  componentId: "sc-1pll3nu-0"
@@ -677,7 +677,7 @@ StyledItemTypeIcon.defaultProps = {
677
677
  const COMPONENT_ID$1 = 'dropdowns.menu.button';
678
678
  const StyledButton = styled(Button).attrs({
679
679
  'data-garden-id': COMPONENT_ID$1,
680
- 'data-garden-version': '9.0.0-next.4'
680
+ 'data-garden-version': '9.0.0-next.6'
681
681
  }).withConfig({
682
682
  displayName: "StyledButton",
683
683
  componentId: "sc-5hs2jg-0"
@@ -689,7 +689,7 @@ StyledButton.defaultProps = {
689
689
  const COMPONENT_ID = 'dropdowns.menu.separator';
690
690
  const StyledSeparator = styled(StyledListboxSeparator).attrs({
691
691
  'data-garden-id': COMPONENT_ID,
692
- 'data-garden-version': '9.0.0-next.4'
692
+ 'data-garden-version': '9.0.0-next.6'
693
693
  }).withConfig({
694
694
  displayName: "StyledSeparator",
695
695
  componentId: "sc-8kqwen-0"
@@ -1193,32 +1193,6 @@ Combobox.defaultProps = {
1193
1193
  maxTags: MAX_TAGS
1194
1194
  };
1195
1195
 
1196
- const Field = forwardRef((props, ref) => {
1197
- const [labelProps, setLabelProps] = useState(undefined);
1198
- const [hintProps, setHintProps] = useState(undefined);
1199
- const [messageProps, setMessageProps] = useState(undefined);
1200
- const [hasHint, setHasHint] = useState(false);
1201
- const [hasMessage, setHasMessage] = useState(false);
1202
- const contextValue = useMemo(() => ({
1203
- labelProps,
1204
- setLabelProps,
1205
- hasHint,
1206
- setHasHint,
1207
- hintProps,
1208
- setHintProps,
1209
- hasMessage,
1210
- setHasMessage,
1211
- messageProps,
1212
- setMessageProps
1213
- }), [labelProps, setLabelProps, hasHint, setHasHint, hintProps, setHintProps, hasMessage, setHasMessage, messageProps, setMessageProps]);
1214
- return React__default.createElement(FieldContext.Provider, {
1215
- value: contextValue
1216
- }, React__default.createElement(StyledField, _extends$5({}, props, {
1217
- ref: ref
1218
- })));
1219
- });
1220
- Field.displayName = 'Field';
1221
-
1222
1196
  const Hint = forwardRef((props, ref) => {
1223
1197
  const {
1224
1198
  hintProps,
@@ -1277,6 +1251,36 @@ Message.propTypes = {
1277
1251
  validationLabel: PropTypes.string
1278
1252
  };
1279
1253
 
1254
+ const FieldComponent = forwardRef((props, ref) => {
1255
+ const [labelProps, setLabelProps] = useState(undefined);
1256
+ const [hintProps, setHintProps] = useState(undefined);
1257
+ const [messageProps, setMessageProps] = useState(undefined);
1258
+ const [hasHint, setHasHint] = useState(false);
1259
+ const [hasMessage, setHasMessage] = useState(false);
1260
+ const contextValue = useMemo(() => ({
1261
+ labelProps,
1262
+ setLabelProps,
1263
+ hasHint,
1264
+ setHasHint,
1265
+ hintProps,
1266
+ setHintProps,
1267
+ hasMessage,
1268
+ setHasMessage,
1269
+ messageProps,
1270
+ setMessageProps
1271
+ }), [labelProps, setLabelProps, hasHint, setHasHint, hintProps, setHintProps, hasMessage, setHasMessage, messageProps, setMessageProps]);
1272
+ return React__default.createElement(FieldContext.Provider, {
1273
+ value: contextValue
1274
+ }, React__default.createElement(StyledField, _extends$5({}, props, {
1275
+ ref: ref
1276
+ })));
1277
+ });
1278
+ FieldComponent.displayName = 'Field';
1279
+ const Field = FieldComponent;
1280
+ Field.Hint = Hint;
1281
+ Field.Label = Label;
1282
+ Field.Message = Message;
1283
+
1280
1284
  var _path$3;
1281
1285
  function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
1282
1286
  var SvgPlusStroke = function SvgPlusStroke(props) {
@@ -5,7 +5,14 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import React from 'react';
8
+ import { Hint } from './Hint';
9
+ import { Label } from './Label';
10
+ import { Message } from './Message';
8
11
  /**
9
12
  * @extends HTMLAttributes<HTMLDivElement>
10
13
  */
11
- export declare const Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>> & {
15
+ Hint: typeof Hint;
16
+ Label: typeof Label;
17
+ Message: typeof Message;
18
+ };
@@ -6,6 +6,8 @@
6
6
  */
7
7
  import React from 'react';
8
8
  /**
9
+ * @deprecated use `Field.Hint` instead
10
+ *
9
11
  * @extends HTMLAttributes<HTMLDivElement>
10
12
  */
11
13
  export declare const Hint: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -7,6 +7,8 @@
7
7
  import React from 'react';
8
8
  import { ILabelProps } from '../../types';
9
9
  /**
10
+ * @deprecated use `Field.Label` instead
11
+ *
10
12
  * @extends LabelHTMLAttributes<HTMLLabelElement>
11
13
  */
12
14
  export declare const Label: React.ForwardRefExoticComponent<ILabelProps & React.RefAttributes<HTMLLabelElement>>;
@@ -7,6 +7,8 @@
7
7
  import React from 'react';
8
8
  import { IMessageProps } from '../../types';
9
9
  /**
10
+ * @deprecated use `Field.Message` instead
11
+ *
10
12
  * @extends HTMLAttributes<HTMLDivElement>
11
13
  */
12
14
  export declare const Message: React.ForwardRefExoticComponent<IMessageProps & React.RefAttributes<HTMLDivElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-dropdowns",
3
- "version": "9.0.0-next.4",
3
+ "version": "9.0.0-next.6",
4
4
  "description": "Components related to dropdowns in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -25,10 +25,10 @@
25
25
  "@zendeskgarden/container-combobox": "^1.1.4",
26
26
  "@zendeskgarden/container-menu": "^0.3.0",
27
27
  "@zendeskgarden/container-utilities": "^2.0.0",
28
- "@zendeskgarden/react-buttons": "^9.0.0-next.4",
29
- "@zendeskgarden/react-forms": "^9.0.0-next.4",
30
- "@zendeskgarden/react-tags": "^9.0.0-next.4",
31
- "@zendeskgarden/react-tooltips": "^9.0.0-next.4",
28
+ "@zendeskgarden/react-buttons": "^9.0.0-next.6",
29
+ "@zendeskgarden/react-forms": "^9.0.0-next.6",
30
+ "@zendeskgarden/react-tags": "^9.0.0-next.6",
31
+ "@zendeskgarden/react-tooltips": "^9.0.0-next.6",
32
32
  "polished": "^4.0.0",
33
33
  "prop-types": "^15.7.2",
34
34
  "react-merge-refs": "^2.0.0"
@@ -37,10 +37,10 @@
37
37
  "@zendeskgarden/react-theming": "^8.67.0",
38
38
  "react": ">=16.8.0",
39
39
  "react-dom": ">=16.8.0",
40
- "styled-components": "^5.1.0"
40
+ "styled-components": "^5.3.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@zendeskgarden/react-theming": "^9.0.0-next.4",
43
+ "@zendeskgarden/react-theming": "^9.0.0-next.6",
44
44
  "@zendeskgarden/svg-icons": "7.0.0"
45
45
  },
46
46
  "keywords": [
@@ -54,5 +54,5 @@
54
54
  "access": "public"
55
55
  },
56
56
  "zendeskgarden:src": "src/index.ts",
57
- "gitHead": "749220247e3a22d2d502dcb3691d81e6a3d52b02"
57
+ "gitHead": "45c56ad1c73af40afba8e5415f529a2c9601c83f"
58
58
  }