@economic/taco 0.0.33-alpha.4 → 0.0.33-alpha.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.
@@ -3479,11 +3479,13 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref)
3479
3479
  }, className, ref);
3480
3480
  });
3481
3481
 
3482
- var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3483
- var children = props.children,
3484
- state = props.state,
3485
- onClose = props.onClose;
3486
- var className = cn('bg-white relative flex items-center px-4 h-12 shadow-lg z-10', props.className);
3482
+ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3483
+ const {
3484
+ children,
3485
+ state,
3486
+ onClose
3487
+ } = props;
3488
+ const className = cn('bg-white relative flex items-center px-4 h-12 shadow-lg z-10', props.className);
3487
3489
  return React.createElement("div", {
3488
3490
  className: className,
3489
3491
  "data-taco": "banner",
@@ -3977,37 +3979,37 @@ const Provider = props => {
3977
3979
  const useTaco = () => React.useContext(Context);
3978
3980
  const useLocalization = () => useTaco().localization;
3979
3981
 
3980
- var _excluded$3 = ["onChange", "value"];
3982
+ const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
3983
+ className: "dot"
3984
+ }) : day.getDate();
3981
3985
 
3982
- var renderDay = function renderDay(day, modifiers) {
3983
- return modifiers.disabled ? React.createElement("span", {
3984
- className: "dot"
3985
- }) : day.getDate();
3986
- };
3986
+ const thisYear = /*#__PURE__*/new Date().getFullYear();
3987
+ const years = [];
3987
3988
 
3988
- var thisYear = /*#__PURE__*/new Date().getFullYear();
3989
- var years = [];
3990
-
3991
- for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
3989
+ for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
3992
3990
  years.push(i);
3993
3991
  }
3994
3992
 
3995
- var Navbar = /*#__PURE__*/React.memo(function (_ref) {
3996
- var onMonthChange = _ref.onMonthChange,
3997
- onNextClick = _ref.onNextClick,
3998
- onPreviousClick = _ref.onPreviousClick,
3999
- _ref$value = _ref.value,
4000
- value = _ref$value === void 0 ? new Date() : _ref$value;
3993
+ const Navbar = /*#__PURE__*/React.memo(({
3994
+ onMonthChange,
3995
+ onNextClick,
3996
+ onPreviousClick,
3997
+ value = new Date()
3998
+ }) => {
3999
+ const {
4000
+ texts: {
4001
+ calendar: {
4002
+ actions,
4003
+ months
4004
+ }
4005
+ }
4006
+ } = useLocalization();
4001
4007
 
4002
- var _useLocalization = useLocalization(),
4003
- _useLocalization$text = _useLocalization.texts.calendar,
4004
- actions = _useLocalization$text.actions,
4005
- months = _useLocalization$text.months;
4006
-
4007
- var handleChange = function handleChange(event) {
4008
- var _event$target$form = event.target.form,
4009
- year = _event$target$form.year,
4010
- month = _event$target$form.month;
4008
+ const handleChange = function handleChange(event) {
4009
+ const {
4010
+ year,
4011
+ month
4012
+ } = event.target.form;
4011
4013
  onMonthChange(new Date(year.value, month.value));
4012
4014
  };
4013
4015
 
@@ -4020,59 +4022,49 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4020
4022
  name: "month",
4021
4023
  onChange: handleChange,
4022
4024
  value: value.getMonth()
4023
- }, months.map(function (month, i) {
4024
- return React.createElement("option", {
4025
- key: month,
4026
- value: i
4027
- }, month);
4028
- })), React.createElement("select", {
4025
+ }, months.map((month, i) => React.createElement("option", {
4026
+ key: month,
4027
+ value: i
4028
+ }, month))), React.createElement("select", {
4029
4029
  className: "h-8 px-2",
4030
4030
  name: "year",
4031
4031
  onChange: handleChange,
4032
4032
  value: value.getFullYear()
4033
- }, years.map(function (year) {
4034
- return React.createElement("option", {
4035
- key: year,
4036
- value: year
4037
- }, String(year));
4038
- }))), React.createElement("div", null, React.createElement(IconButton, {
4033
+ }, years.map(year => React.createElement("option", {
4034
+ key: year,
4035
+ value: year
4036
+ }, String(year))))), React.createElement("div", null, React.createElement(IconButton, {
4039
4037
  appearance: "discrete",
4040
4038
  icon: "chevron-left",
4041
4039
  "aria-label": actions.previousMonth,
4042
- onClick: function onClick() {
4043
- return onPreviousClick();
4044
- },
4040
+ onClick: () => onPreviousClick(),
4045
4041
  rounded: true
4046
4042
  }), React.createElement(IconButton, {
4047
4043
  appearance: "discrete",
4048
4044
  icon: "chevron-right",
4049
4045
  "aria-label": actions.nextMonth,
4050
- onClick: function onClick() {
4051
- return onNextClick();
4052
- },
4046
+ onClick: () => onNextClick(),
4053
4047
  rounded: true
4054
4048
  })));
4055
4049
  });
4056
- var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4057
- var handleChange = props.onChange,
4058
- value = props.value,
4059
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
4060
-
4061
- var _useLocalization2 = useLocalization(),
4062
- locale = _useLocalization2.locale,
4063
- texts = _useLocalization2.texts;
4064
-
4065
- var _React$useState = React.useState(value !== null && value !== void 0 ? value : new Date()),
4066
- visibleMonth = _React$useState[0],
4067
- setVisibleMonth = _React$useState[1];
4068
-
4069
- React.useEffect(function () {
4050
+ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4051
+ const {
4052
+ onChange: handleChange,
4053
+ value,
4054
+ ...otherProps
4055
+ } = props;
4056
+ const {
4057
+ locale,
4058
+ texts
4059
+ } = useLocalization();
4060
+ const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
4061
+ React.useEffect(() => {
4070
4062
  if (visibleMonth !== value) {
4071
4063
  setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
4072
4064
  }
4073
4065
  }, [value]);
4074
4066
 
4075
- var handleDayClick = function handleDayClick(date, modifiers, event) {
4067
+ const handleDayClick = (date, modifiers, event) => {
4076
4068
  if (modifiers.outside || modifiers.disabled) {
4077
4069
  return;
4078
4070
  }
@@ -4080,8 +4072,8 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4080
4072
  handleChange(date, event);
4081
4073
  };
4082
4074
 
4083
- var handleCalendarClickToday = function handleCalendarClickToday() {
4084
- var today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4075
+ const handleCalendarClickToday = () => {
4076
+ const today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4085
4077
 
4086
4078
  today.setHours(12);
4087
4079
  today.setMinutes(0);
@@ -4089,7 +4081,7 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4089
4081
  handleChange(today);
4090
4082
  };
4091
4083
 
4092
- var className = cn('flex bg-white text-xs p-4', otherProps.className);
4084
+ const className = cn('flex bg-white text-xs p-4', otherProps.className);
4093
4085
  return React.createElement("div", {
4094
4086
  "data-taco": "calendar"
4095
4087
  }, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
@@ -4100,18 +4092,14 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4100
4092
  firstDayOfWeek: 1,
4101
4093
  months: texts.calendar.months,
4102
4094
  weekdaysShort: texts.calendar.weekdaysShort,
4103
- navbarElement: function navbarElement(navProps) {
4104
- return React.createElement(Navbar, Object.assign({}, navProps, {
4105
- onMonthChange: setVisibleMonth,
4106
- value: visibleMonth
4107
- }));
4108
- },
4095
+ navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
4096
+ onMonthChange: setVisibleMonth,
4097
+ value: visibleMonth
4098
+ })),
4109
4099
  onDayClick: handleDayClick,
4110
4100
  onMonthChange: setVisibleMonth,
4111
4101
  onTodayButtonClick: handleCalendarClickToday,
4112
- captionElement: function captionElement() {
4113
- return null;
4114
- },
4102
+ captionElement: () => null,
4115
4103
  todayButton: texts.calendar.actions.today,
4116
4104
  showOutsideDays: true,
4117
4105
  renderDay: renderDay,
@@ -4120,32 +4108,30 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4120
4108
  })));
4121
4109
  });
4122
4110
 
4123
- var _excluded$4 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4124
- var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4125
- var checked = props.checked,
4126
- highlighted = props.highlighted,
4127
- indeterminate = props.indeterminate,
4128
- invalid = props.invalid,
4129
- label = props.label,
4130
- onChange = props.onChange,
4131
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
4132
-
4133
- var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem]', {
4111
+ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4112
+ const {
4113
+ checked,
4114
+ highlighted,
4115
+ indeterminate,
4116
+ invalid,
4117
+ label,
4118
+ onChange,
4119
+ ...otherProps
4120
+ } = props;
4121
+ const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem]', {
4134
4122
  'mr-2': !!label,
4135
4123
  'border-grey-dark text-blue focus:border-blue focus:yt-focus': !props.disabled && !invalid,
4136
4124
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4137
4125
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4138
4126
  'border-red text-red focus:border-red focus:yt-focus-red': invalid && !props.disabled
4139
4127
  });
4140
- var handleChange;
4128
+ let handleChange;
4141
4129
 
4142
4130
  if (onChange) {
4143
- handleChange = function handleChange(checked) {
4144
- return onChange(checked === 'indeterminate' ? false : checked);
4145
- };
4131
+ handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4146
4132
  }
4147
4133
 
4148
- var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4134
+ const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4149
4135
  "data-taco": "checkbox",
4150
4136
  checked: indeterminate ? 'indeterminate' : checked,
4151
4137
  className: className,
@@ -4159,7 +4145,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4159
4145
  })));
4160
4146
 
4161
4147
  if (label) {
4162
- var labelClassName = cn('flex items-center cursor-pointer', {
4148
+ const labelClassName = cn('flex items-center cursor-pointer', {
4163
4149
  'cursor-not-allowed text-grey-dark': props.disabled
4164
4150
  }, props.className);
4165
4151
  return React.createElement("label", {
@@ -5042,12 +5028,12 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5042
5028
  return dimensions;
5043
5029
  };
5044
5030
 
5045
- var _excluded$5 = ["className", "dialog", "style"];
5031
+ var _excluded$3 = ["className", "dialog", "style"];
5046
5032
  var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5047
5033
  var externalClassName = props.className,
5048
5034
  dialog = props.dialog,
5049
5035
  style = props.style,
5050
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
5036
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
5051
5037
 
5052
5038
  var _useCombobox = useCombobox(otherProps, ref),
5053
5039
  combobox = _useCombobox.combobox,
@@ -5415,25 +5401,25 @@ Popover.Trigger = Trigger$1;
5415
5401
  Popover.Content = Content$1;
5416
5402
  Popover.Close = Close$1;
5417
5403
 
5418
- var _excluded$6 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5419
- var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5404
+ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5420
5405
  var _input$disabled;
5421
5406
 
5422
- var externalClassName = props.className,
5423
- handleReset = props.onReset,
5424
- style = props.style,
5425
- shortcuts = props.shortcuts,
5426
- shortcutsText = props.shortcutsText,
5427
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
5428
-
5429
- var _useDatepicker = useDatepicker(otherProps, ref),
5430
- calendar = _useDatepicker.calendar,
5431
- input = _useDatepicker.input;
5432
-
5433
- var _useLocalization = useLocalization(),
5434
- texts = _useLocalization.texts;
5435
-
5436
- var className = cn('inline-flex w-full text-black font-normal', externalClassName);
5407
+ const {
5408
+ className: externalClassName,
5409
+ onReset: handleReset,
5410
+ style,
5411
+ shortcuts,
5412
+ shortcutsText,
5413
+ ...otherProps
5414
+ } = props;
5415
+ const {
5416
+ calendar,
5417
+ input
5418
+ } = useDatepicker(otherProps, ref);
5419
+ const {
5420
+ texts
5421
+ } = useLocalization();
5422
+ const className = cn('inline-flex w-full text-black font-normal', externalClassName);
5437
5423
  return React.createElement("span", {
5438
5424
  className: className,
5439
5425
  "data-taco": "datepicker",
@@ -5443,40 +5429,37 @@ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5443
5429
  "aria-label": texts.datepicker.expand,
5444
5430
  disabled: (_input$disabled = input.disabled) !== null && _input$disabled !== void 0 ? _input$disabled : input.readOnly,
5445
5431
  icon: "calendar"
5446
- })), React.createElement(Popover.Content, null, function (_ref) {
5447
- var close = _ref.close;
5448
- return React.createElement("div", {
5449
- className: "flex -m-3"
5450
- }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5451
- onChange: function onChange(date, event) {
5452
- calendar.onChange(date, event);
5453
- close();
5454
- },
5455
- tabIndex: -1
5456
- })), shortcuts && React.createElement("div", {
5457
- className: "border-l border-grey-dark flex flex-col"
5458
- }, React.createElement("span", {
5459
- className: "font-semibold text-xs m-4 flex items-center h-8 w-32 mb-3"
5460
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map(function (shortcut, i) {
5461
- return React.createElement("li", {
5462
- key: i
5463
- }, React.createElement("button", {
5464
- className: "w-full px-4 py-1 flex items-start hover:bg-grey-light text-xs",
5465
- onClick: function onClick(event) {
5466
- event.persist();
5467
- shortcut.onClick(event);
5468
- close();
5469
- }
5470
- }, shortcut.text));
5471
- })), handleReset && React.createElement("button", {
5472
- className: "text-blue hover:text-blue-light inline-flex border-none bg-transparent text-xs cursor-pointer mt-auto my-4 mx-auto",
5473
- onClick: function onClick(event) {
5474
- event.persist();
5475
- handleReset(event);
5476
- close();
5477
- }
5478
- }, texts.datepicker.clear)));
5479
- }))
5432
+ })), React.createElement(Popover.Content, null, ({
5433
+ close
5434
+ }) => React.createElement("div", {
5435
+ className: "flex -m-3"
5436
+ }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5437
+ onChange: (date, event) => {
5438
+ calendar.onChange(date, event);
5439
+ close();
5440
+ },
5441
+ tabIndex: -1
5442
+ })), shortcuts && React.createElement("div", {
5443
+ className: "border-l border-grey-dark flex flex-col"
5444
+ }, React.createElement("span", {
5445
+ className: "font-semibold text-xs m-4 flex items-center h-8 w-32 mb-3"
5446
+ }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map((shortcut, i) => React.createElement("li", {
5447
+ key: i
5448
+ }, React.createElement("button", {
5449
+ className: "w-full px-4 py-1 flex items-start hover:bg-grey-light text-xs",
5450
+ onClick: event => {
5451
+ event.persist();
5452
+ shortcut.onClick(event);
5453
+ close();
5454
+ }
5455
+ }, shortcut.text)))), handleReset && React.createElement("button", {
5456
+ className: "text-blue hover:text-blue-light inline-flex border-none bg-transparent text-xs cursor-pointer mt-auto my-4 mx-auto",
5457
+ onClick: event => {
5458
+ event.persist();
5459
+ handleReset(event);
5460
+ close();
5461
+ }
5462
+ }, texts.datepicker.clear)))))
5480
5463
  })));
5481
5464
  });
5482
5465
 
@@ -5719,14 +5702,12 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5719
5702
  });
5720
5703
  Extra.displayName = 'DialogExtra';
5721
5704
 
5722
- var _excluded$7 = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5723
-
5724
- var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5725
- return React.useMemo(function () {
5726
- var children = [];
5727
- var drawer;
5728
- var extra;
5729
- React.Children.toArray(initialChildren).forEach(function (child) {
5705
+ const useSeparatedChildren = initialChildren => {
5706
+ return React.useMemo(() => {
5707
+ const children = [];
5708
+ let drawer;
5709
+ let extra;
5710
+ React.Children.toArray(initialChildren).forEach(child => {
5730
5711
  var _child$type, _child$type2;
5731
5712
 
5732
5713
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5741,55 +5722,39 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5741
5722
  }, [initialChildren]);
5742
5723
  };
5743
5724
 
5744
- var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5745
- var initialChildren = props.children,
5746
- _props$closeOnEscape = props.closeOnEscape,
5747
- closeOnEscape = _props$closeOnEscape === void 0 ? true : _props$closeOnEscape,
5748
- defaultOpen = props.defaultOpen,
5749
- _props$draggable = props.draggable,
5750
- draggable = _props$draggable === void 0 ? false : _props$draggable,
5751
- onChange = props.onChange,
5752
- onClose = props.onClose,
5753
- open = props.open,
5754
- _props$showCloseButto = props.showCloseButton,
5755
- showCloseButton = _props$showCloseButto === void 0 ? true : _props$showCloseButto,
5756
- _props$size = props.size,
5757
- size = _props$size === void 0 ? 'sm' : _props$size,
5758
- trigger = props.trigger,
5759
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
5760
-
5761
- var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5762
- children = _useSeparatedChildren[0],
5763
- drawer = _useSeparatedChildren[1],
5764
- extra = _useSeparatedChildren[2];
5765
-
5766
- var _React$useState = React.useState(false),
5767
- drawerOpen = _React$useState[0],
5768
- setDrawerOpen = _React$useState[1];
5769
-
5770
- var context = React.useMemo(function () {
5771
- return {
5772
- closeOnEscape: closeOnEscape,
5773
- draggable: draggable,
5774
- drawer: {
5775
- open: drawerOpen,
5776
- toggle: function toggle() {
5777
- return setDrawerOpen(function (isDrawerOpen) {
5778
- return !isDrawerOpen;
5779
- });
5780
- }
5781
- },
5782
- elements: {
5783
- drawer: drawer,
5784
- extra: extra
5785
- },
5786
- onClose: onClose,
5787
- props: otherProps,
5788
- showCloseButton: showCloseButton,
5789
- size: size,
5790
- ref: ref
5791
- };
5792
- }, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5725
+ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5726
+ const {
5727
+ children: initialChildren,
5728
+ closeOnEscape = true,
5729
+ defaultOpen,
5730
+ draggable = false,
5731
+ onChange,
5732
+ onClose,
5733
+ open,
5734
+ showCloseButton = true,
5735
+ size = 'sm',
5736
+ trigger,
5737
+ ...otherProps
5738
+ } = props;
5739
+ const [children, drawer, extra] = useSeparatedChildren(initialChildren);
5740
+ const [drawerOpen, setDrawerOpen] = React.useState(false);
5741
+ const context = React.useMemo(() => ({
5742
+ closeOnEscape,
5743
+ draggable,
5744
+ drawer: {
5745
+ open: drawerOpen,
5746
+ toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
5747
+ },
5748
+ elements: {
5749
+ drawer,
5750
+ extra
5751
+ },
5752
+ onClose,
5753
+ props: otherProps,
5754
+ showCloseButton,
5755
+ size,
5756
+ ref
5757
+ }), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5793
5758
  return React.createElement(DialogContext.Provider, {
5794
5759
  value: context
5795
5760
  }, React.createElement(DialogPrimitive.Root, {
@@ -5806,19 +5771,18 @@ Dialog.Extra = Extra;
5806
5771
  Dialog.Drawer = Drawer;
5807
5772
  Dialog.Close = Close$2;
5808
5773
 
5809
- var _excluded$8 = ["disabled", "children", "invalid", "message"];
5810
- var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5811
- var disabled = props.disabled,
5812
- children = props.children,
5813
- _props$invalid = props.invalid,
5814
- invalid = _props$invalid === void 0 ? false : _props$invalid,
5815
- message = props.message,
5816
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5817
-
5818
- var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5774
+ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5775
+ const {
5776
+ disabled,
5777
+ children,
5778
+ invalid = false,
5779
+ message,
5780
+ ...otherProps
5781
+ } = props;
5782
+ const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5819
5783
  'text-grey-dark': disabled
5820
5784
  }, props.className);
5821
- var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5785
+ const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5822
5786
  'text-grey-darkest': !invalid,
5823
5787
  'text-red': invalid,
5824
5788
  'opacity-50': disabled
@@ -6102,6 +6066,7 @@ const useMultiListbox = ({
6102
6066
  data: externalData = [],
6103
6067
  defaultValue,
6104
6068
  disabled,
6069
+ emptyValue: _,
6105
6070
  id: nativeId,
6106
6071
  name,
6107
6072
  onClick,
@@ -7128,7 +7093,7 @@ const useSelect = ({
7128
7093
  }
7129
7094
  }
7130
7095
  } else {
7131
- if (!findByValue(flattenedData, value)) {
7096
+ if (!multiselect && !findByValue(flattenedData, value)) {
7132
7097
  if (emptyValue !== undefined) {
7133
7098
  setInputValueByRef$1(inputRef.current, emptyValue);
7134
7099
  } else if (data.length > 0) {