@economic/taco 1.0.6 → 1.0.7

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.
Files changed (38) hide show
  1. package/dist/esm/components/Checkbox/Checkbox.js +15 -18
  2. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  3. package/dist/esm/components/Combobox/Combobox.js +23 -25
  4. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  5. package/dist/esm/components/Datepicker/Datepicker.js +48 -52
  6. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  7. package/dist/esm/components/Dialog/Dialog.js +39 -58
  8. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  9. package/dist/esm/components/Field/Field.js +10 -12
  10. package/dist/esm/components/Field/Field.js.map +1 -1
  11. package/dist/esm/components/Form/Form.js +6 -8
  12. package/dist/esm/components/Form/Form.js.map +1 -1
  13. package/dist/esm/components/Group/Group.js +6 -8
  14. package/dist/esm/components/Group/Group.js.map +1 -1
  15. package/dist/esm/components/Hanger/Hanger.js +27 -35
  16. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  17. package/dist/esm/components/HoverCard/HoverCard.js +8 -9
  18. package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
  19. package/dist/esm/components/Icon/Icon.js +7 -8
  20. package/dist/esm/components/Icon/Icon.js.map +1 -1
  21. package/dist/esm/components/IconButton/IconButton.js +9 -11
  22. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  23. package/dist/esm/components/Input/Input.js +25 -25
  24. package/dist/esm/components/Input/Input.js.map +1 -1
  25. package/dist/esm/components/Listbox/Listbox.js +24 -25
  26. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  27. package/dist/esm/components/Menu/Menu.js +20 -43
  28. package/dist/esm/components/Menu/Menu.js.map +1 -1
  29. package/dist/esm/components/RadioGroup/RadioGroup.js +6 -5
  30. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  31. package/dist/esm/components/SearchInput/SearchInput.js +10 -11
  32. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  33. package/dist/taco.cjs.development.js +291 -346
  34. package/dist/taco.cjs.development.js.map +1 -1
  35. package/dist/taco.cjs.production.min.js +1 -1
  36. package/dist/taco.cjs.production.min.js.map +1 -1
  37. package/dist/utils/tailwind.d.ts +1 -1
  38. package/package.json +3 -3
@@ -3139,17 +3139,17 @@ const icons = {
3139
3139
  zoom: Zoom
3140
3140
  };
3141
3141
 
3142
- var _excluded = ["name"];
3143
- var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3142
+ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3144
3143
  var _props$className;
3145
3144
 
3146
- var name = props.name,
3147
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3148
-
3149
- var Component = icons[name];
3145
+ const {
3146
+ name,
3147
+ ...otherProps
3148
+ } = props;
3149
+ const Component = icons[name];
3150
3150
  /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
3151
3151
 
3152
- var className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
3152
+ const className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {
3153
3153
  'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
3154
3154
  });
3155
3155
  return Component ? React__default.createElement(Component, Object.assign({}, otherProps, {
@@ -3161,7 +3161,7 @@ var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3161
3161
  })) : null;
3162
3162
  });
3163
3163
 
3164
- var _excluded$1 = ["id"],
3164
+ var _excluded = ["id"],
3165
3165
  _excluded2 = ["id", "defaultId", "onChange", "as"];
3166
3166
  var AccordionContext = /*#__PURE__*/React__default.createContext({
3167
3167
  as: 'h2'
@@ -3199,7 +3199,7 @@ var Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(p
3199
3199
 
3200
3200
  var Item = function Item(props) {
3201
3201
  var id = props.id,
3202
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3202
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3203
3203
 
3204
3204
  return React__default.createElement(AccordionPrimitive.Item, Object.assign({}, otherProps, {
3205
3205
  value: id
@@ -3300,7 +3300,7 @@ const getOutlineClasses = state => {
3300
3300
  }
3301
3301
  };
3302
3302
 
3303
- var _excluded$2 = ["children", "compact", "outline", "state"];
3303
+ var _excluded$1 = ["children", "compact", "outline", "state"];
3304
3304
  var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3305
3305
  var _cn;
3306
3306
 
@@ -3310,7 +3310,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3310
3310
  _props$outline = props.outline,
3311
3311
  outline = _props$outline === void 0 ? false : _props$outline,
3312
3312
  state = props.state,
3313
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3313
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3314
3314
 
3315
3315
  var className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5', (_cn = {}, _cn[getOutlineClasses(state)] = outline, _cn["border-transparent " + getStateClasses(state)] = !outline, _cn['h-2 w-2 min-w-0'] = compact, _cn['h-5 py-0 px-1.5'] = !compact, _cn), props.className);
3316
3316
  return React.createElement("span", Object.assign({}, otherProps, {
@@ -3470,14 +3470,13 @@ const createButton = (props, className, ref) => {
3470
3470
  return button;
3471
3471
  };
3472
3472
 
3473
- var _excluded$3 = ["icon", "rounded"];
3474
- var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3475
- var icon = props.icon,
3476
- _props$rounded = props.rounded,
3477
- rounded = _props$rounded === void 0 ? false : _props$rounded,
3478
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
3479
-
3480
- var className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3473
+ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3474
+ const {
3475
+ icon,
3476
+ rounded = false,
3477
+ ...otherProps
3478
+ } = props;
3479
+ const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3481
3480
  'rounded-full': rounded,
3482
3481
  rounded: !rounded,
3483
3482
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3488,13 +3487,13 @@ var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3488
3487
  return null;
3489
3488
  }
3490
3489
 
3491
- return createButton(_extends({}, otherProps, {
3490
+ return createButton({ ...otherProps,
3492
3491
  children: React.createElement(Icon, {
3493
3492
  name: icon,
3494
3493
  className: "m-0 p-0"
3495
3494
  }),
3496
3495
  'data-taco': 'icon-button'
3497
- }), className, ref);
3496
+ }, className, ref);
3498
3497
  });
3499
3498
 
3500
3499
  var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
@@ -3514,10 +3513,10 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3514
3513
  }) : null);
3515
3514
  });
3516
3515
 
3517
- var _excluded$4 = ["fluid"];
3516
+ var _excluded$2 = ["fluid"];
3518
3517
  var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3519
3518
  var fluid = props.fluid,
3520
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
3519
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3521
3520
 
3522
3521
  var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3523
3522
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3995,7 +3994,7 @@ const Provider = props => {
3995
3994
  const useTaco = () => React.useContext(Context);
3996
3995
  const useLocalization = () => useTaco().localization;
3997
3996
 
3998
- var _excluded$5 = ["onChange", "value"];
3997
+ var _excluded$3 = ["onChange", "value"];
3999
3998
 
4000
3999
  var renderDay = function renderDay(day, modifiers) {
4001
4000
  return modifiers.disabled ? React.createElement("span", {
@@ -4074,7 +4073,7 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4074
4073
  var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4075
4074
  var handleChange = props.onChange,
4076
4075
  value = props.value,
4077
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
4076
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
4078
4077
 
4079
4078
  var _useLocalization2 = useLocalization(),
4080
4079
  locale = _useLocalization2.locale,
@@ -4138,32 +4137,30 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4138
4137
  })));
4139
4138
  });
4140
4139
 
4141
- var _excluded$6 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4142
- var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4143
- var checked = props.checked,
4144
- highlighted = props.highlighted,
4145
- indeterminate = props.indeterminate,
4146
- invalid = props.invalid,
4147
- label = props.label,
4148
- onChange = props.onChange,
4149
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
4150
-
4151
- var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4140
+ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4141
+ const {
4142
+ checked,
4143
+ highlighted,
4144
+ indeterminate,
4145
+ invalid,
4146
+ label,
4147
+ onChange,
4148
+ ...otherProps
4149
+ } = props;
4150
+ const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4152
4151
  props.className, {
4153
4152
  'border-grey-dark text-blue hover:text-blue-light focus:border-blue focus:hover:border-blue-light': !props.disabled && !invalid,
4154
4153
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4155
4154
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4156
4155
  'border-red text-red hover:text-red-light hover:border-red-light focus:border-red focus:hover:border-red-light': invalid && !props.disabled
4157
4156
  });
4158
- var handleChange;
4157
+ let handleChange;
4159
4158
 
4160
4159
  if (onChange) {
4161
- handleChange = function handleChange(checked) {
4162
- return onChange(checked === 'indeterminate' ? false : checked);
4163
- };
4160
+ handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4164
4161
  }
4165
4162
 
4166
- var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4163
+ const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4167
4164
  "data-taco": "checkbox",
4168
4165
  checked: indeterminate ? 'indeterminate' : checked,
4169
4166
  className: className,
@@ -4177,7 +4174,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4177
4174
  })));
4178
4175
 
4179
4176
  if (label) {
4180
- var labelClassName = cn('flex items-center cursor-pointer gap-2', {
4177
+ const labelClassName = cn('flex items-center cursor-pointer gap-2', {
4181
4178
  'cursor-not-allowed text-grey-dark': props.disabled
4182
4179
  }, props.className);
4183
4180
  return React.createElement("label", {
@@ -4220,21 +4217,22 @@ const getButtonStateClasses = invalid => {
4220
4217
  return '!border-grey-dark focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
4221
4218
  };
4222
4219
 
4223
- var _excluded$7 = ["button", "icon", "highlighted", "invalid", "onKeyDown", "autoFocus"];
4224
- var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4225
- var button = props.button,
4226
- icon = props.icon,
4227
- invalid = props.invalid,
4228
- onKeyDown = props.onKeyDown,
4229
- autoFocus = props.autoFocus,
4230
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
4231
-
4232
- var inputRef = useProxiedRef(ref);
4233
- var hasContainer = button || icon;
4234
- var className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
4220
+ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4221
+ const {
4222
+ button,
4223
+ icon,
4224
+ highlighted,
4225
+ invalid,
4226
+ onKeyDown,
4227
+ autoFocus,
4228
+ ...otherProps
4229
+ } = props;
4230
+ const inputRef = useProxiedRef(ref);
4231
+ const hasContainer = button || icon;
4232
+ const className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
4235
4233
  'pr-8': !!hasContainer
4236
4234
  }, !hasContainer && otherProps.className);
4237
- React.useEffect(function () {
4235
+ React.useEffect(() => {
4238
4236
  if (autoFocus && inputRef.current) {
4239
4237
  inputRef.current.focus();
4240
4238
  }
@@ -4242,10 +4240,10 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4242
4240
  // if it has scroll height then the browser reverts to native scrolling behaviour only
4243
4241
  // so we manually override it to ensure _our_ desired behaviour remains intact
4244
4242
 
4245
- var handleKeyDown = function handleKeyDown(event) {
4243
+ const handleKeyDown = event => {
4246
4244
  if (!event.shiftKey && (event.key === 'Home' || event.key === 'End')) {
4247
4245
  event.preventDefault();
4248
- var position = event.key === 'End' ? event.currentTarget.value.length : 0;
4246
+ const position = event.key === 'End' ? event.currentTarget.value.length : 0;
4249
4247
  event.currentTarget.setSelectionRange(position, position);
4250
4248
  }
4251
4249
 
@@ -4254,7 +4252,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4254
4252
  }
4255
4253
  };
4256
4254
 
4257
- var input = React.createElement("input", Object.assign({}, otherProps, {
4255
+ const input = React.createElement("input", Object.assign({}, otherProps, {
4258
4256
  className: className,
4259
4257
  "data-taco": "input",
4260
4258
  onKeyDown: handleKeyDown,
@@ -4262,19 +4260,19 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4262
4260
  }));
4263
4261
 
4264
4262
  if (hasContainer) {
4265
- var extra;
4263
+ let extra;
4266
4264
 
4267
4265
  if (button) {
4268
- var _cn;
4269
-
4270
- var disabled = button.props.disabled || otherProps.disabled;
4271
- var buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', (_cn = {}, _cn[getButtonStateClasses(invalid)] = !props.disabled, _cn), button.props.className);
4266
+ const disabled = button.props.disabled || otherProps.disabled;
4267
+ const buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', {
4268
+ [getButtonStateClasses(invalid)]: !props.disabled
4269
+ }, button.props.className);
4272
4270
  extra = React.cloneElement(button, {
4273
4271
  className: buttonClassName,
4274
- disabled: disabled
4272
+ disabled
4275
4273
  });
4276
4274
  } else if (icon) {
4277
- var iconClassName = cn('items-center flex justify-center absolute pointer-events-none mr-1 p-px right-0 w-5 top-1/2 -translate-y-1/2', {
4275
+ const iconClassName = cn('items-center flex justify-center absolute pointer-events-none mr-1 p-px right-0 w-5 top-1/2 -translate-y-1/2', {
4278
4276
  'text-grey-dark': props.disabled,
4279
4277
  'text-grey-darkest': !props.disabled
4280
4278
  });
@@ -4286,7 +4284,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4286
4284
  });
4287
4285
  }
4288
4286
 
4289
- var containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4287
+ const containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4290
4288
  return React.createElement("div", {
4291
4289
  className: containerClassName,
4292
4290
  "data-taco": "input-container"
@@ -5057,27 +5055,26 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5057
5055
  return dimensions;
5058
5056
  };
5059
5057
 
5060
- var _excluded$8 = ["className", "dialog", "style"];
5061
- var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5062
- var externalClassName = props.className,
5063
- dialog = props.dialog,
5064
- style = props.style,
5065
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5066
-
5067
- var _useCombobox = useCombobox(otherProps, ref),
5068
- combobox = _useCombobox.combobox,
5069
- button = _useCombobox.button,
5070
- input = _useCombobox.input,
5071
- popover = _useCombobox.popover,
5072
- list = _useCombobox.list;
5073
-
5074
- var internalRef = React.useRef(null);
5075
-
5076
- var _useLocalization = useLocalization(),
5077
- texts = _useLocalization.texts;
5078
-
5079
- var selectDimensions = useBoundingClientRectListener(internalRef);
5080
- var className = cn('inline-flex relative', {
5058
+ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5059
+ const {
5060
+ className: externalClassName,
5061
+ dialog,
5062
+ style,
5063
+ ...otherProps
5064
+ } = props;
5065
+ const {
5066
+ combobox,
5067
+ button,
5068
+ input,
5069
+ popover,
5070
+ list
5071
+ } = useCombobox(otherProps, ref);
5072
+ const internalRef = React.useRef(null);
5073
+ const {
5074
+ texts
5075
+ } = useLocalization();
5076
+ const selectDimensions = useBoundingClientRectListener(internalRef);
5077
+ const className = cn('inline-flex relative', {
5081
5078
  'yt-combobox--inline': props.inline
5082
5079
  }, externalClassName);
5083
5080
  return React.createElement("span", {
@@ -5096,7 +5093,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5096
5093
  appearance: "discrete",
5097
5094
  className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
5098
5095
  icon: popover.open ? 'chevron-up' : 'chevron-down',
5099
- onClick: function onClick() {
5096
+ onClick: () => {
5100
5097
  var _input$ref$current;
5101
5098
 
5102
5099
  popover.onOpenChange(true);
@@ -5107,7 +5104,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5107
5104
  icon: "list-search",
5108
5105
  disabled: props.readOnly || props.disabled,
5109
5106
  dialog: dialog,
5110
- onFocus: function onFocus(event) {
5107
+ onFocus: event => {
5111
5108
  var _input$ref$current2;
5112
5109
 
5113
5110
  // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element
@@ -5120,7 +5117,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5120
5117
  }) : undefined
5121
5118
  })))), React.createElement(PopoverPrimitive.Content, {
5122
5119
  align: "start",
5123
- onOpenAutoFocus: function onOpenAutoFocus(event) {
5120
+ onOpenAutoFocus: event => {
5124
5121
  event.preventDefault();
5125
5122
  },
5126
5123
  sideOffset: 4
@@ -5430,23 +5427,23 @@ Popover.Trigger = Trigger$1;
5430
5427
  Popover.Content = Content$1;
5431
5428
  Popover.Close = Close$1;
5432
5429
 
5433
- var _excluded$9 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5434
- var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5435
- var externalClassName = props.className,
5436
- handleReset = props.onReset,
5437
- style = props.style,
5438
- shortcuts = props.shortcuts,
5439
- shortcutsText = props.shortcutsText,
5440
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
5441
-
5442
- var _useDatepicker = useDatepicker(otherProps, ref),
5443
- calendar = _useDatepicker.calendar,
5444
- input = _useDatepicker.input;
5445
-
5446
- var _useLocalization = useLocalization(),
5447
- texts = _useLocalization.texts;
5448
-
5449
- var className = cn('inline-flex w-full text-black font-normal', externalClassName);
5430
+ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5431
+ const {
5432
+ className: externalClassName,
5433
+ onReset: handleReset,
5434
+ style,
5435
+ shortcuts,
5436
+ shortcutsText,
5437
+ ...otherProps
5438
+ } = props;
5439
+ const {
5440
+ calendar,
5441
+ input
5442
+ } = useDatepicker(otherProps, ref);
5443
+ const {
5444
+ texts
5445
+ } = useLocalization();
5446
+ const className = cn('inline-flex w-full text-black font-normal', externalClassName);
5450
5447
  return React.createElement("span", {
5451
5448
  className: className,
5452
5449
  "data-taco": "datepicker",
@@ -5456,40 +5453,37 @@ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5456
5453
  "aria-label": texts.datepicker.expand,
5457
5454
  disabled: input.disabled || input.readOnly,
5458
5455
  icon: "calendar"
5459
- })), React.createElement(Popover.Content, null, function (_ref) {
5460
- var close = _ref.close;
5461
- return React.createElement("div", {
5462
- className: "-m-3 flex"
5463
- }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5464
- onChange: function onChange(date, event) {
5465
- calendar.onChange(date, event);
5466
- close();
5467
- },
5468
- tabIndex: -1
5469
- })), shortcuts && React.createElement("div", {
5470
- className: "border-grey-dark flex flex-col border-l"
5471
- }, React.createElement("span", {
5472
- className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
5473
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map(function (shortcut, i) {
5474
- return React.createElement("li", {
5475
- key: i
5476
- }, React.createElement("button", {
5477
- className: "hover:bg-grey-light flex w-full items-start px-4 py-1 text-xs",
5478
- onClick: function onClick(event) {
5479
- event.persist();
5480
- shortcut.onClick(event);
5481
- close();
5482
- }
5483
- }, shortcut.text));
5484
- })), handleReset && React.createElement("button", {
5485
- className: "text-blue hover:text-blue-light my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs",
5486
- onClick: function onClick(event) {
5487
- event.persist();
5488
- handleReset(event);
5489
- close();
5490
- }
5491
- }, texts.datepicker.clear)));
5492
- }))
5456
+ })), React.createElement(Popover.Content, null, ({
5457
+ close
5458
+ }) => React.createElement("div", {
5459
+ className: "-m-3 flex"
5460
+ }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5461
+ onChange: (date, event) => {
5462
+ calendar.onChange(date, event);
5463
+ close();
5464
+ },
5465
+ tabIndex: -1
5466
+ })), shortcuts && React.createElement("div", {
5467
+ className: "border-grey-dark flex flex-col border-l"
5468
+ }, React.createElement("span", {
5469
+ className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
5470
+ }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map((shortcut, i) => React.createElement("li", {
5471
+ key: i
5472
+ }, React.createElement("button", {
5473
+ className: "hover:bg-grey-light flex w-full items-start px-4 py-1 text-xs",
5474
+ onClick: event => {
5475
+ event.persist();
5476
+ shortcut.onClick(event);
5477
+ close();
5478
+ }
5479
+ }, shortcut.text)))), handleReset && React.createElement("button", {
5480
+ className: "text-blue hover:text-blue-light my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs",
5481
+ onClick: event => {
5482
+ event.persist();
5483
+ handleReset(event);
5484
+ close();
5485
+ }
5486
+ }, texts.datepicker.clear)))))
5493
5487
  })));
5494
5488
  });
5495
5489
 
@@ -5732,14 +5726,12 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5732
5726
  });
5733
5727
  Extra.displayName = 'DialogExtra';
5734
5728
 
5735
- var _excluded$a = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5736
-
5737
- var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5738
- return React.useMemo(function () {
5739
- var children = [];
5740
- var drawer;
5741
- var extra;
5742
- React.Children.toArray(initialChildren).forEach(function (child) {
5729
+ const useSeparatedChildren = initialChildren => {
5730
+ return React.useMemo(() => {
5731
+ const children = [];
5732
+ let drawer;
5733
+ let extra;
5734
+ React.Children.toArray(initialChildren).forEach(child => {
5743
5735
  var _child$type, _child$type2;
5744
5736
 
5745
5737
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5754,55 +5746,39 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5754
5746
  }, [initialChildren]);
5755
5747
  };
5756
5748
 
5757
- var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5758
- var initialChildren = props.children,
5759
- _props$closeOnEscape = props.closeOnEscape,
5760
- closeOnEscape = _props$closeOnEscape === void 0 ? true : _props$closeOnEscape,
5761
- defaultOpen = props.defaultOpen,
5762
- _props$draggable = props.draggable,
5763
- draggable = _props$draggable === void 0 ? false : _props$draggable,
5764
- onChange = props.onChange,
5765
- onClose = props.onClose,
5766
- open = props.open,
5767
- _props$showCloseButto = props.showCloseButton,
5768
- showCloseButton = _props$showCloseButto === void 0 ? true : _props$showCloseButto,
5769
- _props$size = props.size,
5770
- size = _props$size === void 0 ? 'sm' : _props$size,
5771
- trigger = props.trigger,
5772
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
5773
-
5774
- var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5775
- children = _useSeparatedChildren[0],
5776
- drawer = _useSeparatedChildren[1],
5777
- extra = _useSeparatedChildren[2];
5778
-
5779
- var _React$useState = React.useState(false),
5780
- drawerOpen = _React$useState[0],
5781
- setDrawerOpen = _React$useState[1];
5782
-
5783
- var context = React.useMemo(function () {
5784
- return {
5785
- closeOnEscape: closeOnEscape,
5786
- draggable: draggable,
5787
- drawer: {
5788
- open: drawerOpen,
5789
- toggle: function toggle() {
5790
- return setDrawerOpen(function (isDrawerOpen) {
5791
- return !isDrawerOpen;
5792
- });
5793
- }
5794
- },
5795
- elements: {
5796
- drawer: drawer,
5797
- extra: extra
5798
- },
5799
- onClose: onClose,
5800
- props: otherProps,
5801
- showCloseButton: showCloseButton,
5802
- size: size,
5803
- ref: ref
5804
- };
5805
- }, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5749
+ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5750
+ const {
5751
+ children: initialChildren,
5752
+ closeOnEscape = true,
5753
+ defaultOpen,
5754
+ draggable = false,
5755
+ onChange,
5756
+ onClose,
5757
+ open,
5758
+ showCloseButton = true,
5759
+ size = 'sm',
5760
+ trigger,
5761
+ ...otherProps
5762
+ } = props;
5763
+ const [children, drawer, extra] = useSeparatedChildren(initialChildren);
5764
+ const [drawerOpen, setDrawerOpen] = React.useState(false);
5765
+ const context = React.useMemo(() => ({
5766
+ closeOnEscape,
5767
+ draggable,
5768
+ drawer: {
5769
+ open: drawerOpen,
5770
+ toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
5771
+ },
5772
+ elements: {
5773
+ drawer,
5774
+ extra
5775
+ },
5776
+ onClose,
5777
+ props: otherProps,
5778
+ showCloseButton,
5779
+ size,
5780
+ ref
5781
+ }), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5806
5782
  return React.createElement(DialogContext.Provider, {
5807
5783
  value: context
5808
5784
  }, React.createElement(DialogPrimitive.Root, {
@@ -5819,19 +5795,18 @@ Dialog.Extra = Extra;
5819
5795
  Dialog.Drawer = Drawer;
5820
5796
  Dialog.Close = Close$2;
5821
5797
 
5822
- var _excluded$b = ["disabled", "children", "invalid", "message"];
5823
- var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5824
- var disabled = props.disabled,
5825
- children = props.children,
5826
- _props$invalid = props.invalid,
5827
- invalid = _props$invalid === void 0 ? false : _props$invalid,
5828
- message = props.message,
5829
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5830
-
5831
- var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5798
+ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5799
+ const {
5800
+ disabled,
5801
+ children,
5802
+ invalid = false,
5803
+ message,
5804
+ ...otherProps
5805
+ } = props;
5806
+ const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5832
5807
  'text-grey-dark': disabled
5833
5808
  }, props.className);
5834
- var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5809
+ const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5835
5810
  'text-grey-darkest': !invalid,
5836
5811
  'text-red': invalid,
5837
5812
  'opacity-50': disabled
@@ -5846,13 +5821,12 @@ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5846
5821
  }, message));
5847
5822
  });
5848
5823
 
5849
- var _excluded$c = ["horizontal"];
5850
- var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5851
- var _props$horizontal = props.horizontal,
5852
- horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5853
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
5854
-
5855
- var className = cn('yt-form', {
5824
+ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5825
+ const {
5826
+ horizontal = false,
5827
+ ...otherProps
5828
+ } = props;
5829
+ const className = cn('yt-form', {
5856
5830
  'yt-form--horizontal flex flex-wrap': horizontal
5857
5831
  }, props.className);
5858
5832
  return React.createElement("form", Object.assign({}, otherProps, {
@@ -5862,13 +5836,12 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5862
5836
  }));
5863
5837
  });
5864
5838
 
5865
- var _excluded$d = ["as"];
5866
- var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5867
- var _props$as = props.as,
5868
- Tag = _props$as === void 0 ? 'span' : _props$as,
5869
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
5870
-
5871
- var className = cn('flex ', props.className);
5839
+ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5840
+ const {
5841
+ as: Tag = 'span',
5842
+ ...otherProps
5843
+ } = props;
5844
+ const className = cn('flex ', props.className);
5872
5845
  return React.createElement(Tag, Object.assign({}, otherProps, {
5873
5846
  className: className,
5874
5847
  "data-taco": "group",
@@ -5876,19 +5849,18 @@ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5876
5849
  }));
5877
5850
  });
5878
5851
 
5879
- var _excluded$e = ["anchor", "children", "defaultOpen"];
5880
- var HangerContext = /*#__PURE__*/React.createContext({
5852
+ const HangerContext = /*#__PURE__*/React.createContext({
5881
5853
  props: {},
5882
5854
  ref: null
5883
5855
  });
5884
- var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5856
+ const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5885
5857
  var _props$children;
5886
5858
 
5887
- var context = React.useContext(HangerContext);
5888
- var children = props.children;
5859
+ const context = React.useContext(HangerContext);
5860
+ let children = props.children;
5889
5861
 
5890
5862
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5891
- console.warn("Hanger.Anchor requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '" + props.children.type.name + "' in React.forwardRef()? Taco has wrapped '" + props.children.type.name + "' in a 'span' to maintain functionality, but this may cause unintended behaviour");
5863
+ console.warn(`Hanger.Anchor requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`);
5892
5864
  children = React.createElement("span", null, props.children);
5893
5865
  }
5894
5866
 
@@ -5898,22 +5870,21 @@ var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5898
5870
  asChild: true
5899
5871
  }));
5900
5872
  });
5901
- var Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
5902
- var className = cn('mb-1 text-base font-bold flex w-full', props.className);
5873
+ const Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
5874
+ const className = cn('mb-1 text-base font-bold flex w-full', props.className);
5903
5875
  return React.createElement("span", Object.assign({}, props, {
5904
5876
  className: className,
5905
5877
  ref: ref
5906
5878
  }));
5907
5879
  });
5908
- var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5909
- var context = React.useContext(HangerContext);
5910
-
5911
- var _useLocalization = useLocalization(),
5912
- texts = _useLocalization.texts;
5913
-
5914
- var className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent max-w-sm', props.className);
5880
+ const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5881
+ const context = React.useContext(HangerContext);
5882
+ const {
5883
+ texts
5884
+ } = useLocalization();
5885
+ const className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent max-w-sm', props.className);
5915
5886
 
5916
- var handleInteractOutside = function handleInteractOutside(event) {
5887
+ const handleInteractOutside = event => {
5917
5888
  event.preventDefault();
5918
5889
  };
5919
5890
 
@@ -5935,25 +5906,20 @@ var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref)
5935
5906
  onClick: context.props.onClose
5936
5907
  })));
5937
5908
  });
5938
- var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5939
- var anchor = props.anchor,
5940
- children = props.children,
5941
- _props$defaultOpen = props.defaultOpen,
5942
- defaultOpen = _props$defaultOpen === void 0 ? true : _props$defaultOpen,
5943
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$e);
5944
-
5945
- var context = React.useMemo(function () {
5946
- return {
5947
- props: otherProps,
5948
- ref: ref
5949
- };
5950
- }, [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5951
-
5952
- var _React$useState = React.useState(false),
5953
- open = _React$useState[0],
5954
- setOpen = _React$useState[1];
5909
+ const Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5910
+ const {
5911
+ anchor,
5912
+ children,
5913
+ defaultOpen = true,
5914
+ ...otherProps
5915
+ } = props;
5916
+ const context = React.useMemo(() => ({
5917
+ props: otherProps,
5918
+ ref
5919
+ }), [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5955
5920
 
5956
- React.useEffect(function () {
5921
+ const [open, setOpen] = React.useState(false);
5922
+ React.useEffect(() => {
5957
5923
  if (defaultOpen) {
5958
5924
  setOpen(defaultOpen);
5959
5925
  }
@@ -5969,25 +5935,25 @@ Hanger.Anchor = Anchor;
5969
5935
  Hanger.Content = Content$3;
5970
5936
  Hanger.Title = Title$1;
5971
5937
 
5972
- var _excluded$f = ["placement"];
5973
- var Trigger$3 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props, ref) {
5938
+ const Trigger$3 = /*#__PURE__*/React.forwardRef(function HoverCardTrigger(props, ref) {
5974
5939
  return React.createElement(HoverCardPrimitive.Trigger, Object.assign({}, props, {
5975
5940
  asChild: true,
5976
5941
  ref: ref
5977
5942
  }));
5978
5943
  });
5979
- var Content$4 = /*#__PURE__*/React.forwardRef(function HoverCardContent(externalProps, ref) {
5980
- var placement = externalProps.placement,
5981
- props = _objectWithoutPropertiesLoose(externalProps, _excluded$f);
5982
-
5983
- var className = cn('bg-white rounded p-3 yt-shadow', props.className);
5944
+ const Content$4 = /*#__PURE__*/React.forwardRef(function HoverCardContent(externalProps, ref) {
5945
+ const {
5946
+ placement,
5947
+ ...props
5948
+ } = externalProps;
5949
+ const className = cn('bg-white rounded p-3 yt-shadow', props.className);
5984
5950
  return React.createElement(HoverCardPrimitive.Content, Object.assign({}, props, {
5985
5951
  className: className,
5986
5952
  ref: ref,
5987
5953
  side: placement
5988
5954
  }));
5989
5955
  });
5990
- var HoverCard = function HoverCard(props) {
5956
+ const HoverCard = props => {
5991
5957
  return React.createElement(HoverCardPrimitive.Root, Object.assign({}, props, {
5992
5958
  openDelay: 300
5993
5959
  }));
@@ -6340,49 +6306,49 @@ const useMultiListbox = ({
6340
6306
  };
6341
6307
  };
6342
6308
 
6343
- var _excluded$g = ["className"],
6344
- _excluded2$1 = ["className"];
6345
- var Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6346
- var externalClassName = props.className,
6347
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$g);
6348
-
6349
- var _useListbox = useListbox(otherProps, ref),
6350
- list = _useListbox.list,
6351
- input = _useListbox.input;
6352
-
6353
- var className = cn('bg-white inline-flex relative w-full', externalClassName);
6309
+ const Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6310
+ const {
6311
+ className: externalClassName,
6312
+ ...otherProps
6313
+ } = props;
6314
+ const {
6315
+ list,
6316
+ input
6317
+ } = useListbox(otherProps, ref);
6318
+ const className = cn('bg-white inline-flex relative w-full', externalClassName);
6354
6319
  return React.createElement("span", {
6355
6320
  "data-taco": "listbox",
6356
6321
  className: className
6357
6322
  }, React.createElement(ScrollableList, Object.assign({}, list, {
6358
- style: _extends({}, list.style, {
6323
+ style: { ...list.style,
6359
6324
  maxHeight: 'calc(12rem + 2px)'
6360
6325
  /* (6 * option height) + listbox border */
6361
6326
 
6362
- })
6327
+ }
6363
6328
  })), React.createElement("input", Object.assign({}, input, {
6364
6329
  className: "hidden",
6365
6330
  type: "text"
6366
6331
  })));
6367
6332
  });
6368
- var MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6369
- var externalClassName = props.className,
6370
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$1);
6371
-
6372
- var _useMultiListbox = useMultiListbox(otherProps, ref),
6373
- list = _useMultiListbox.list,
6374
- input = _useMultiListbox.input;
6375
-
6376
- var className = cn('bg-white inline-flex relative w-full', externalClassName);
6333
+ const MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6334
+ const {
6335
+ className: externalClassName,
6336
+ ...otherProps
6337
+ } = props;
6338
+ const {
6339
+ list,
6340
+ input
6341
+ } = useMultiListbox(otherProps, ref);
6342
+ const className = cn('bg-white inline-flex relative w-full', externalClassName);
6377
6343
  return React.createElement("span", {
6378
6344
  "data-taco": "listbox",
6379
6345
  className: className
6380
6346
  }, React.createElement(ScrollableList, Object.assign({}, list, {
6381
- style: _extends({}, list.style, {
6347
+ style: { ...list.style,
6382
6348
  maxHeight: 'calc(12rem + 2px + 2px)'
6383
6349
  /* (6 * option height) + listbox border + ALL_OPTIONS bottom border */
6384
6350
 
6385
- })
6351
+ }
6386
6352
  })), React.createElement("input", Object.assign({}, input, {
6387
6353
  className: "hidden",
6388
6354
  type: "text"
@@ -6645,7 +6611,7 @@ const Checkbox$1 = props => {
6645
6611
  })), children);
6646
6612
  };
6647
6613
 
6648
- const getRadioGroupItemValueAsString = value => value === null ? '' : String(value);
6614
+ const getRadioGroupItemValueAsString = value => String(value !== null && value !== void 0 ? value : '');
6649
6615
  const findByValue$1 = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
6650
6616
  const RadioGroupContext = /*#__PURE__*/React.createContext({
6651
6617
  disabled: false,
@@ -6659,12 +6625,13 @@ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(pro
6659
6625
  ...otherProps
6660
6626
  } = props;
6661
6627
  const isDisabled = context.disabled || props.disabled;
6662
- const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2 hover:border-4', {
6663
- 'border-grey-dark focus:yt-focus aria-checked:bg-blue aria-checked:border-blue hover:aria-checked:border-blue-light': !isDisabled && !context.invalid,
6628
+ const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mt-[0.2rem] rounded-full bg-white border-2', {
6629
+ 'border-grey-dark hover:border-4 focus:yt-focus aria-checked:bg-blue aria-checked:border-blue hover:aria-checked:border-blue-light': !isDisabled && !context.invalid,
6664
6630
  'border-grey cursor-not-allowed aria-checked:bg-blue-light aria-checked:border-blue-light ': isDisabled,
6665
- 'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !isDisabled
6631
+ 'border-red hover:border-4 text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !isDisabled
6666
6632
  });
6667
- const labelClassName = cn('flex items-center cursor-pointer gap-2', {
6633
+ const labelClassName = cn('flex items-center gap-2', {
6634
+ 'cursor-pointer': !isDisabled,
6668
6635
  'cursor-not-allowed text-grey-dark': isDisabled
6669
6636
  }, props.className);
6670
6637
  return React.createElement("label", {
@@ -6844,48 +6811,26 @@ const Header = props => {
6844
6811
  }));
6845
6812
  };
6846
6813
 
6847
- var _excluded$h = ["appearance", "children", "trigger"];
6848
- var Menu = function Menu(externalProps) {
6849
- var externalAppearance = externalProps.appearance,
6850
- children = externalProps.children,
6851
- trigger = externalProps.trigger,
6852
- props = _objectWithoutPropertiesLoose(externalProps, _excluded$h);
6853
-
6854
- var _React$useState = React.useState(false),
6855
- open = _React$useState[0],
6856
- setOpen = _React$useState[1];
6857
-
6858
- var _React$useState2 = React.useState(externalAppearance !== null && externalAppearance !== void 0 ? externalAppearance : 'default'),
6859
- appearance = _React$useState2[0],
6860
- _setAppearance = _React$useState2[1];
6861
-
6862
- var _React$useState3 = React.useState(false),
6863
- indented = _React$useState3[0],
6864
- setIndented = _React$useState3[1];
6865
-
6866
- var _React$useState4 = React.useState(undefined),
6867
- minWidth = _React$useState4[0],
6868
- _setMinWidth = _React$useState4[1];
6869
-
6870
- var context = React.useMemo(function () {
6871
- return {
6872
- appearance: appearance,
6873
- setAppearance: function setAppearance(appearance) {
6874
- return _setAppearance(appearance);
6875
- },
6876
- indented: indented,
6877
- registerIndentation: function registerIndentation() {
6878
- return setIndented(true);
6879
- },
6880
- minWidth: minWidth,
6881
- setMinWidth: function setMinWidth(width) {
6882
- return _setMinWidth(width);
6883
- },
6884
- close: function close() {
6885
- return setOpen(false);
6886
- }
6887
- };
6888
- }, [indented, minWidth, appearance]);
6814
+ const Menu = externalProps => {
6815
+ const {
6816
+ appearance: externalAppearance,
6817
+ children,
6818
+ trigger,
6819
+ ...props
6820
+ } = externalProps;
6821
+ const [open, setOpen] = React.useState(false);
6822
+ const [appearance, setAppearance] = React.useState(externalAppearance !== null && externalAppearance !== void 0 ? externalAppearance : 'default');
6823
+ const [indented, setIndented] = React.useState(false);
6824
+ const [minWidth, setMinWidth] = React.useState(undefined);
6825
+ const context = React.useMemo(() => ({
6826
+ appearance,
6827
+ setAppearance: appearance => setAppearance(appearance),
6828
+ indented,
6829
+ registerIndentation: () => setIndented(true),
6830
+ minWidth,
6831
+ setMinWidth: width => setMinWidth(width),
6832
+ close: () => setOpen(false)
6833
+ }), [indented, minWidth, appearance]);
6889
6834
  return React.createElement(MenuContext.Provider, {
6890
6835
  value: context
6891
6836
  }, React.createElement(DropdownMenuPrimitive.Root, Object.assign({}, props, {
@@ -9507,24 +9452,24 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9507
9452
  }, [ref, callback]);
9508
9453
  };
9509
9454
 
9510
- var _excluded$i = ["onSearch"];
9511
- var SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput(_ref, ref) {
9512
- var onSearch = _ref.onSearch,
9513
- props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
9514
-
9515
- var _useLocalization = useLocalization(),
9516
- texts = _useLocalization.texts;
9455
+ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
9456
+ onSearch,
9457
+ ...props
9458
+ }, ref) {
9459
+ const {
9460
+ texts
9461
+ } = useLocalization();
9517
9462
 
9518
- var handleClick = function handleClick() {
9463
+ const handleClick = () => {
9519
9464
  if (!props.disabled) {
9520
9465
  onSearch === null || onSearch === void 0 ? void 0 : onSearch(props.value);
9521
9466
  }
9522
9467
  };
9523
9468
 
9524
- var handleKeyDown = function handleKeyDown(event) {
9469
+ const handleKeyDown = event => {
9525
9470
  var _props$onKeyDown;
9526
9471
 
9527
- var isEnterKeyPressed = event.keyCode === keycode('enter');
9472
+ const isEnterKeyPressed = event.keyCode === keycode('enter');
9528
9473
 
9529
9474
  if (isEnterKeyPressed) {
9530
9475
  handleClick();