@economic/taco 0.0.33-alpha.0 → 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.
Files changed (57) hide show
  1. package/dist/components/Listbox/useMultiListbox.d.ts +1 -1
  2. package/dist/components/Select/useSelect.d.ts +13 -8
  3. package/dist/esm/components/Banner/Banner.js +7 -5
  4. package/dist/esm/components/Banner/Banner.js.map +1 -1
  5. package/dist/esm/components/Checkbox/Checkbox.js +15 -18
  6. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  7. package/dist/esm/components/Datepicker/Datepicker.js +48 -52
  8. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  9. package/dist/esm/components/Dialog/Dialog.js +39 -58
  10. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  11. package/dist/esm/components/Field/Field.js +10 -12
  12. package/dist/esm/components/Field/Field.js.map +1 -1
  13. package/dist/esm/components/Form/Form.js +6 -8
  14. package/dist/esm/components/Form/Form.js.map +1 -1
  15. package/dist/esm/components/Group/Group.js +6 -8
  16. package/dist/esm/components/Group/Group.js.map +1 -1
  17. package/dist/esm/components/Hanger/Hanger.js +25 -33
  18. package/dist/esm/components/Hanger/Hanger.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 +26 -24
  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/Listbox/useListbox.js +1 -1
  28. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  29. package/dist/esm/components/Listbox/useMultiListbox.js +1 -0
  30. package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
  31. package/dist/esm/components/Listbox/util.js +4 -7
  32. package/dist/esm/components/Listbox/util.js.map +1 -1
  33. package/dist/esm/components/Menu/Menu.js +20 -43
  34. package/dist/esm/components/Menu/Menu.js.map +1 -1
  35. package/dist/esm/components/Navigation/Navigation.js +35 -44
  36. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  37. package/dist/esm/components/Pagination/Pagination.js +39 -56
  38. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  39. package/dist/esm/components/Popover/Popover.js +29 -34
  40. package/dist/esm/components/Popover/Popover.js.map +1 -1
  41. package/dist/esm/components/Progress/Progress.js +11 -15
  42. package/dist/esm/components/Progress/Progress.js.map +1 -1
  43. package/dist/esm/components/Provider/Provider.js +13 -18
  44. package/dist/esm/components/Provider/Provider.js.map +1 -1
  45. package/dist/esm/components/RadioGroup/RadioGroup.js +45 -57
  46. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  47. package/dist/esm/components/SearchInput/SearchInput.js +10 -11
  48. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  49. package/dist/esm/components/Select/Select.js +30 -31
  50. package/dist/esm/components/Select/Select.js.map +1 -1
  51. package/dist/esm/components/Select/useSelect.js +48 -30
  52. package/dist/esm/components/Select/useSelect.js.map +1 -1
  53. package/dist/taco.cjs.development.js +570 -667
  54. package/dist/taco.cjs.development.js.map +1 -1
  55. package/dist/taco.cjs.production.min.js +1 -1
  56. package/dist/taco.cjs.production.min.js.map +1 -1
  57. package/package.json +2 -2
@@ -3122,17 +3122,17 @@ const icons = {
3122
3122
  zoom: Zoom
3123
3123
  };
3124
3124
 
3125
- var _excluded = ["name"];
3126
- var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3125
+ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3127
3126
  var _props$className;
3128
3127
 
3129
- var name = props.name,
3130
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3131
-
3132
- var Component = icons[name];
3128
+ const {
3129
+ name,
3130
+ ...otherProps
3131
+ } = props;
3132
+ const Component = icons[name];
3133
3133
  /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
3134
3134
 
3135
- var className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {
3135
+ const className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {
3136
3136
  'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
3137
3137
  });
3138
3138
  return Component ? React__default.createElement(Component, Object.assign({}, otherProps, {
@@ -3144,7 +3144,7 @@ var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3144
3144
  })) : null;
3145
3145
  });
3146
3146
 
3147
- var _excluded$1 = ["id"],
3147
+ var _excluded = ["id"],
3148
3148
  _excluded2 = ["id", "defaultId", "onChange", "as"];
3149
3149
  var AccordionContext = /*#__PURE__*/React__default.createContext({
3150
3150
  as: 'h2'
@@ -3182,7 +3182,7 @@ var Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(p
3182
3182
 
3183
3183
  var Item = function Item(props) {
3184
3184
  var id = props.id,
3185
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3185
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3186
3186
 
3187
3187
  return React__default.createElement(AccordionPrimitive.Item, Object.assign({}, otherProps, {
3188
3188
  value: id
@@ -3283,7 +3283,7 @@ const getOutlineClasses = state => {
3283
3283
  }
3284
3284
  };
3285
3285
 
3286
- var _excluded$2 = ["children", "compact", "outline", "state"];
3286
+ var _excluded$1 = ["children", "compact", "outline", "state"];
3287
3287
  var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3288
3288
  var _cn;
3289
3289
 
@@ -3293,7 +3293,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3293
3293
  _props$outline = props.outline,
3294
3294
  outline = _props$outline === void 0 ? false : _props$outline,
3295
3295
  state = props.state,
3296
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3296
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3297
3297
 
3298
3298
  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-[0.354rem]'] = !compact, _cn), props.className);
3299
3299
  return React.createElement("span", Object.assign({}, otherProps, {
@@ -3453,14 +3453,13 @@ const createButton = (props, className, ref) => {
3453
3453
  return button;
3454
3454
  };
3455
3455
 
3456
- var _excluded$3 = ["icon", "rounded"];
3457
- var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3458
- var icon = props.icon,
3459
- _props$rounded = props.rounded,
3460
- rounded = _props$rounded === void 0 ? false : _props$rounded,
3461
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
3462
-
3463
- var className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3456
+ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3457
+ const {
3458
+ icon,
3459
+ rounded = false,
3460
+ ...otherProps
3461
+ } = props;
3462
+ const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3464
3463
  'rounded-full': rounded,
3465
3464
  rounded: !rounded,
3466
3465
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3471,20 +3470,22 @@ var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3471
3470
  return null;
3472
3471
  }
3473
3472
 
3474
- return createButton(_extends({}, otherProps, {
3473
+ return createButton({ ...otherProps,
3475
3474
  children: React.createElement(Icon, {
3476
3475
  name: icon,
3477
3476
  className: "m-0 p-0"
3478
3477
  }),
3479
3478
  'data-taco': 'icon-button'
3480
- }), className, ref);
3479
+ }, className, ref);
3481
3480
  });
3482
3481
 
3483
- var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3484
- var children = props.children,
3485
- state = props.state,
3486
- onClose = props.onClose;
3487
- 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);
3488
3489
  return React.createElement("div", {
3489
3490
  className: className,
3490
3491
  "data-taco": "banner",
@@ -3497,10 +3498,10 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3497
3498
  }) : null);
3498
3499
  });
3499
3500
 
3500
- var _excluded$4 = ["fluid"];
3501
+ var _excluded$2 = ["fluid"];
3501
3502
  var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3502
3503
  var fluid = props.fluid,
3503
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
3504
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3504
3505
 
3505
3506
  var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3506
3507
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3878,7 +3879,7 @@ const ToastProvider = ({
3878
3879
  };
3879
3880
  const useToast = () => React.useContext(ToastContext);
3880
3881
 
3881
- var defaultLocalisationTexts = {
3882
+ const defaultLocalisationTexts = {
3882
3883
  calendar: {
3883
3884
  months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
3884
3885
  weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
@@ -3953,67 +3954,62 @@ var defaultLocalisationTexts = {
3953
3954
  inputLabel: 'Search...'
3954
3955
  }
3955
3956
  };
3956
- var defaultLocalizationContext = {
3957
+ const defaultLocalizationContext = {
3957
3958
  locale: 'en-GB',
3958
3959
  texts: defaultLocalisationTexts,
3959
3960
  formatting: {
3960
3961
  date: 'dd.mm.yy'
3961
3962
  }
3962
3963
  };
3963
- var Context = /*#__PURE__*/React.createContext({
3964
+ const Context = /*#__PURE__*/React.createContext({
3964
3965
  localization: defaultLocalizationContext
3965
3966
  });
3966
- var Provider = function Provider(props) {
3967
- var children = props.children,
3968
- _props$localization = props.localization,
3969
- localization = _props$localization === void 0 ? defaultLocalizationContext : _props$localization;
3970
- var value = React.useMemo(function () {
3971
- return {
3972
- localization: localization
3973
- };
3974
- }, [localization]);
3967
+ const Provider = props => {
3968
+ const {
3969
+ children,
3970
+ localization = defaultLocalizationContext
3971
+ } = props;
3972
+ const value = React.useMemo(() => ({
3973
+ localization
3974
+ }), [localization]);
3975
3975
  return React.createElement(Context.Provider, {
3976
3976
  value: value
3977
3977
  }, React.createElement(ToastProvider, null, children));
3978
3978
  };
3979
- var useTaco = function useTaco() {
3980
- return React.useContext(Context);
3981
- };
3982
- var useLocalization = function useLocalization() {
3983
- return useTaco().localization;
3984
- };
3979
+ const useTaco = () => React.useContext(Context);
3980
+ const useLocalization = () => useTaco().localization;
3985
3981
 
3986
- var _excluded$5 = ["onChange", "value"];
3982
+ const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
3983
+ className: "dot"
3984
+ }) : day.getDate();
3987
3985
 
3988
- var renderDay = function renderDay(day, modifiers) {
3989
- return modifiers.disabled ? React.createElement("span", {
3990
- className: "dot"
3991
- }) : day.getDate();
3992
- };
3993
-
3994
- var thisYear = /*#__PURE__*/new Date().getFullYear();
3995
- var years = [];
3986
+ const thisYear = /*#__PURE__*/new Date().getFullYear();
3987
+ const years = [];
3996
3988
 
3997
- for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
3989
+ for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
3998
3990
  years.push(i);
3999
3991
  }
4000
3992
 
4001
- var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4002
- var onMonthChange = _ref.onMonthChange,
4003
- onNextClick = _ref.onNextClick,
4004
- onPreviousClick = _ref.onPreviousClick,
4005
- _ref$value = _ref.value,
4006
- 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();
4007
4007
 
4008
- var _useLocalization = useLocalization(),
4009
- _useLocalization$text = _useLocalization.texts.calendar,
4010
- actions = _useLocalization$text.actions,
4011
- months = _useLocalization$text.months;
4012
-
4013
- var handleChange = function handleChange(event) {
4014
- var _event$target$form = event.target.form,
4015
- year = _event$target$form.year,
4016
- month = _event$target$form.month;
4008
+ const handleChange = function handleChange(event) {
4009
+ const {
4010
+ year,
4011
+ month
4012
+ } = event.target.form;
4017
4013
  onMonthChange(new Date(year.value, month.value));
4018
4014
  };
4019
4015
 
@@ -4026,59 +4022,49 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4026
4022
  name: "month",
4027
4023
  onChange: handleChange,
4028
4024
  value: value.getMonth()
4029
- }, months.map(function (month, i) {
4030
- return React.createElement("option", {
4031
- key: month,
4032
- value: i
4033
- }, month);
4034
- })), React.createElement("select", {
4025
+ }, months.map((month, i) => React.createElement("option", {
4026
+ key: month,
4027
+ value: i
4028
+ }, month))), React.createElement("select", {
4035
4029
  className: "h-8 px-2",
4036
4030
  name: "year",
4037
4031
  onChange: handleChange,
4038
4032
  value: value.getFullYear()
4039
- }, years.map(function (year) {
4040
- return React.createElement("option", {
4041
- key: year,
4042
- value: year
4043
- }, String(year));
4044
- }))), 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, {
4045
4037
  appearance: "discrete",
4046
4038
  icon: "chevron-left",
4047
4039
  "aria-label": actions.previousMonth,
4048
- onClick: function onClick() {
4049
- return onPreviousClick();
4050
- },
4040
+ onClick: () => onPreviousClick(),
4051
4041
  rounded: true
4052
4042
  }), React.createElement(IconButton, {
4053
4043
  appearance: "discrete",
4054
4044
  icon: "chevron-right",
4055
4045
  "aria-label": actions.nextMonth,
4056
- onClick: function onClick() {
4057
- return onNextClick();
4058
- },
4046
+ onClick: () => onNextClick(),
4059
4047
  rounded: true
4060
4048
  })));
4061
4049
  });
4062
- var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4063
- var handleChange = props.onChange,
4064
- value = props.value,
4065
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
4066
-
4067
- var _useLocalization2 = useLocalization(),
4068
- locale = _useLocalization2.locale,
4069
- texts = _useLocalization2.texts;
4070
-
4071
- var _React$useState = React.useState(value !== null && value !== void 0 ? value : new Date()),
4072
- visibleMonth = _React$useState[0],
4073
- setVisibleMonth = _React$useState[1];
4074
-
4075
- 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(() => {
4076
4062
  if (visibleMonth !== value) {
4077
4063
  setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
4078
4064
  }
4079
4065
  }, [value]);
4080
4066
 
4081
- var handleDayClick = function handleDayClick(date, modifiers, event) {
4067
+ const handleDayClick = (date, modifiers, event) => {
4082
4068
  if (modifiers.outside || modifiers.disabled) {
4083
4069
  return;
4084
4070
  }
@@ -4086,8 +4072,8 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4086
4072
  handleChange(date, event);
4087
4073
  };
4088
4074
 
4089
- var handleCalendarClickToday = function handleCalendarClickToday() {
4090
- 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
4091
4077
 
4092
4078
  today.setHours(12);
4093
4079
  today.setMinutes(0);
@@ -4095,7 +4081,7 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4095
4081
  handleChange(today);
4096
4082
  };
4097
4083
 
4098
- 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);
4099
4085
  return React.createElement("div", {
4100
4086
  "data-taco": "calendar"
4101
4087
  }, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
@@ -4106,18 +4092,14 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4106
4092
  firstDayOfWeek: 1,
4107
4093
  months: texts.calendar.months,
4108
4094
  weekdaysShort: texts.calendar.weekdaysShort,
4109
- navbarElement: function navbarElement(navProps) {
4110
- return React.createElement(Navbar, Object.assign({}, navProps, {
4111
- onMonthChange: setVisibleMonth,
4112
- value: visibleMonth
4113
- }));
4114
- },
4095
+ navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
4096
+ onMonthChange: setVisibleMonth,
4097
+ value: visibleMonth
4098
+ })),
4115
4099
  onDayClick: handleDayClick,
4116
4100
  onMonthChange: setVisibleMonth,
4117
4101
  onTodayButtonClick: handleCalendarClickToday,
4118
- captionElement: function captionElement() {
4119
- return null;
4120
- },
4102
+ captionElement: () => null,
4121
4103
  todayButton: texts.calendar.actions.today,
4122
4104
  showOutsideDays: true,
4123
4105
  renderDay: renderDay,
@@ -4126,32 +4108,30 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4126
4108
  })));
4127
4109
  });
4128
4110
 
4129
- var _excluded$6 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4130
- var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4131
- var checked = props.checked,
4132
- highlighted = props.highlighted,
4133
- indeterminate = props.indeterminate,
4134
- invalid = props.invalid,
4135
- label = props.label,
4136
- onChange = props.onChange,
4137
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
4138
-
4139
- 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]', {
4140
4122
  'mr-2': !!label,
4141
4123
  'border-grey-dark text-blue focus:border-blue focus:yt-focus': !props.disabled && !invalid,
4142
4124
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4143
4125
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4144
4126
  'border-red text-red focus:border-red focus:yt-focus-red': invalid && !props.disabled
4145
4127
  });
4146
- var handleChange;
4128
+ let handleChange;
4147
4129
 
4148
4130
  if (onChange) {
4149
- handleChange = function handleChange(checked) {
4150
- return onChange(checked === 'indeterminate' ? false : checked);
4151
- };
4131
+ handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4152
4132
  }
4153
4133
 
4154
- var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4134
+ const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4155
4135
  "data-taco": "checkbox",
4156
4136
  checked: indeterminate ? 'indeterminate' : checked,
4157
4137
  className: className,
@@ -4165,7 +4145,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4165
4145
  })));
4166
4146
 
4167
4147
  if (label) {
4168
- var labelClassName = cn('flex items-center cursor-pointer', {
4148
+ const labelClassName = cn('flex items-center cursor-pointer', {
4169
4149
  'cursor-not-allowed text-grey-dark': props.disabled
4170
4150
  }, props.className);
4171
4151
  return React.createElement("label", {
@@ -4208,21 +4188,22 @@ const getButtonStateClasses = invalid => {
4208
4188
  return '!border-grey-dark focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
4209
4189
  };
4210
4190
 
4211
- var _excluded$7 = ["button", "icon", "highlighted", "invalid", "onKeyDown", "autoFocus"];
4212
- var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4213
- var button = props.button,
4214
- icon = props.icon,
4215
- invalid = props.invalid,
4216
- onKeyDown = props.onKeyDown,
4217
- autoFocus = props.autoFocus,
4218
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
4219
-
4220
- var inputRef = useProxiedRef(ref);
4221
- var hasContainer = button || icon;
4222
- var className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
4191
+ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4192
+ const {
4193
+ button,
4194
+ icon,
4195
+ highlighted,
4196
+ invalid,
4197
+ onKeyDown,
4198
+ autoFocus,
4199
+ ...otherProps
4200
+ } = props;
4201
+ const inputRef = useProxiedRef(ref);
4202
+ const hasContainer = button || icon;
4203
+ const className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
4223
4204
  'pr-8': !!hasContainer
4224
4205
  }, !hasContainer && otherProps.className);
4225
- React.useEffect(function () {
4206
+ React.useEffect(() => {
4226
4207
  if (autoFocus && inputRef.current) {
4227
4208
  inputRef.current.focus();
4228
4209
  }
@@ -4230,10 +4211,10 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4230
4211
  // if it has scroll height then the browser reverts to native scrolling behaviour only
4231
4212
  // so we manually override it to ensure _our_ desired behaviour remains intact
4232
4213
 
4233
- var handleKeyDown = function handleKeyDown(event) {
4214
+ const handleKeyDown = event => {
4234
4215
  if (event.key === 'Home' || event.key === 'End') {
4235
4216
  event.preventDefault();
4236
- var position = event.key === 'End' ? event.currentTarget.value.length : 0;
4217
+ const position = event.key === 'End' ? event.currentTarget.value.length : 0;
4237
4218
  event.currentTarget.setSelectionRange(position, position);
4238
4219
  }
4239
4220
 
@@ -4242,7 +4223,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4242
4223
  }
4243
4224
  };
4244
4225
 
4245
- var input = React.createElement("input", Object.assign({}, otherProps, {
4226
+ const input = React.createElement("input", Object.assign({}, otherProps, {
4246
4227
  className: className,
4247
4228
  "data-taco": "input",
4248
4229
  onKeyDown: handleKeyDown,
@@ -4250,19 +4231,21 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4250
4231
  }));
4251
4232
 
4252
4233
  if (hasContainer) {
4253
- var extra;
4234
+ let extra;
4254
4235
 
4255
4236
  if (button) {
4256
- var _button$props$disable, _cn;
4237
+ var _button$props$disable;
4257
4238
 
4258
- var disabled = (_button$props$disable = button.props.disabled) !== null && _button$props$disable !== void 0 ? _button$props$disable : otherProps.disabled;
4259
- 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);
4239
+ const disabled = (_button$props$disable = button.props.disabled) !== null && _button$props$disable !== void 0 ? _button$props$disable : otherProps.disabled;
4240
+ const buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', {
4241
+ [getButtonStateClasses(invalid)]: !props.disabled
4242
+ }, button.props.className);
4260
4243
  extra = React.cloneElement(button, {
4261
4244
  className: buttonClassName,
4262
- disabled: disabled
4245
+ disabled
4263
4246
  });
4264
4247
  } else if (icon) {
4265
- 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', {
4248
+ 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', {
4266
4249
  'text-grey-dark': props.disabled,
4267
4250
  'text-grey-darkest': !props.disabled
4268
4251
  });
@@ -4274,7 +4257,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4274
4257
  });
4275
4258
  }
4276
4259
 
4277
- var containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4260
+ const containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4278
4261
  return React.createElement("div", {
4279
4262
  className: containerClassName,
4280
4263
  "data-taco": "input-container"
@@ -4582,12 +4565,11 @@ const setInputValueByRef = (input, value, event = 'change') => {
4582
4565
  input.dispatchEvent(createCustomEvent(event));
4583
4566
  };
4584
4567
 
4568
+ const getValue = value => String(value !== null && value !== void 0 ? value : '');
4569
+
4585
4570
  const setInputValueByRef$1 = (input, value, event = 'change') => {
4586
- setInputValueByRef(input, value !== undefined && value !== null ? String(value) : '', event);
4571
+ setInputValueByRef(input, getValue(value), event);
4587
4572
  };
4588
-
4589
- const getValue = value => value === undefined || value === null ? '' : String(value);
4590
-
4591
4573
  const getIndexFromValue = (data, value) => {
4592
4574
  const index = data.findIndex(option => getValue(option.value) === getValue(value));
4593
4575
  return index > -1 ? index : undefined;
@@ -4612,9 +4594,7 @@ const searchForString = (child, value, strategy = 'includes') => {
4612
4594
 
4613
4595
  return searchForString((_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.children, value, strategy);
4614
4596
  } else {
4615
- var _String;
4616
-
4617
- return child.toString().toLowerCase()[strategy]((_String = String(value)) === null || _String === void 0 ? void 0 : _String.toLowerCase());
4597
+ return child.toString().toLowerCase()[strategy](String(value).toLowerCase());
4618
4598
  }
4619
4599
  } catch {
4620
4600
  return false;
@@ -5048,12 +5028,12 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5048
5028
  return dimensions;
5049
5029
  };
5050
5030
 
5051
- var _excluded$8 = ["className", "dialog", "style"];
5031
+ var _excluded$3 = ["className", "dialog", "style"];
5052
5032
  var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5053
5033
  var externalClassName = props.className,
5054
5034
  dialog = props.dialog,
5055
5035
  style = props.style,
5056
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5036
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
5057
5037
 
5058
5038
  var _useCombobox = useCombobox(otherProps, ref),
5059
5039
  combobox = _useCombobox.combobox,
@@ -5345,19 +5325,18 @@ function mergeRefs(refs) {
5345
5325
  };
5346
5326
  }
5347
5327
 
5348
- var _excluded$9 = ["children", "trigger"];
5349
- var PopoverContext = /*#__PURE__*/React.createContext({
5328
+ const PopoverContext = /*#__PURE__*/React.createContext({
5350
5329
  props: {},
5351
5330
  ref: null
5352
5331
  });
5353
- var Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
5332
+ const Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
5354
5333
  var _props$children;
5355
5334
 
5356
- var context = React.useContext(PopoverContext);
5357
- var children = props.children;
5335
+ const context = React.useContext(PopoverContext);
5336
+ let children = props.children;
5358
5337
 
5359
5338
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5360
- console.warn("Popover.Trigger 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");
5339
+ console.warn(`Popover.Trigger 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`);
5361
5340
  children = React.createElement("span", null, props.children);
5362
5341
  }
5363
5342
 
@@ -5367,22 +5346,22 @@ var Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref
5367
5346
  asChild: true
5368
5347
  }));
5369
5348
  });
5370
- var RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper(_ref, ref) {
5371
- var children = _ref.children,
5372
- onClick = _ref.onClick;
5373
-
5374
- var close = function close() {
5349
+ const RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper({
5350
+ children,
5351
+ onClick
5352
+ }, ref) {
5353
+ const close = () => {
5375
5354
  onClick(new CustomEvent('hide'));
5376
5355
  };
5377
5356
 
5378
5357
  return children({
5379
- close: close,
5380
- ref: ref
5358
+ close,
5359
+ ref
5381
5360
  });
5382
5361
  });
5383
- var Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
5384
- var className = cn('bg-white focus:border-blue-light', props.className);
5385
- var output;
5362
+ const Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
5363
+ const className = cn('bg-white focus:border-blue-light', props.className);
5364
+ let output;
5386
5365
 
5387
5366
  if (typeof props.children === 'function') {
5388
5367
  output = React.createElement(PopoverPrimitive.Close, {
@@ -5400,23 +5379,20 @@ var Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref
5400
5379
  className: "text-white"
5401
5380
  }));
5402
5381
  });
5403
- var Close$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
5404
- return React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
5405
- ref: ref,
5406
- asChild: true
5407
- }));
5408
- });
5409
- var Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
5410
- var children = props.children,
5411
- trigger = props.trigger,
5412
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
5413
-
5414
- var context = React.useMemo(function () {
5415
- return {
5416
- props: otherProps,
5417
- ref: ref
5418
- };
5419
- }, [otherProps]);
5382
+ const Close$1 = /*#__PURE__*/React.forwardRef((props, ref) => React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
5383
+ ref: ref,
5384
+ asChild: true
5385
+ })));
5386
+ const Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
5387
+ const {
5388
+ children,
5389
+ trigger,
5390
+ ...otherProps
5391
+ } = props;
5392
+ const context = React.useMemo(() => ({
5393
+ props: otherProps,
5394
+ ref
5395
+ }), [otherProps]);
5420
5396
  return React.createElement(PopoverContext.Provider, {
5421
5397
  value: context
5422
5398
  }, React.createElement(PopoverPrimitive.Root, null, trigger && React.createElement(Trigger$1, null, trigger), children));
@@ -5425,25 +5401,25 @@ Popover.Trigger = Trigger$1;
5425
5401
  Popover.Content = Content$1;
5426
5402
  Popover.Close = Close$1;
5427
5403
 
5428
- var _excluded$a = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5429
- var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5404
+ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5430
5405
  var _input$disabled;
5431
5406
 
5432
- var externalClassName = props.className,
5433
- handleReset = props.onReset,
5434
- style = props.style,
5435
- shortcuts = props.shortcuts,
5436
- shortcutsText = props.shortcutsText,
5437
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
5438
-
5439
- var _useDatepicker = useDatepicker(otherProps, ref),
5440
- calendar = _useDatepicker.calendar,
5441
- input = _useDatepicker.input;
5442
-
5443
- var _useLocalization = useLocalization(),
5444
- texts = _useLocalization.texts;
5445
-
5446
- 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);
5447
5423
  return React.createElement("span", {
5448
5424
  className: className,
5449
5425
  "data-taco": "datepicker",
@@ -5453,40 +5429,37 @@ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5453
5429
  "aria-label": texts.datepicker.expand,
5454
5430
  disabled: (_input$disabled = input.disabled) !== null && _input$disabled !== void 0 ? _input$disabled : input.readOnly,
5455
5431
  icon: "calendar"
5456
- })), React.createElement(Popover.Content, null, function (_ref) {
5457
- var close = _ref.close;
5458
- return React.createElement("div", {
5459
- className: "flex -m-3"
5460
- }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5461
- onChange: function onChange(date, event) {
5462
- calendar.onChange(date, event);
5463
- close();
5464
- },
5465
- tabIndex: -1
5466
- })), shortcuts && React.createElement("div", {
5467
- className: "border-l border-grey-dark flex flex-col"
5468
- }, React.createElement("span", {
5469
- className: "font-semibold text-xs m-4 flex items-center h-8 w-32 mb-3"
5470
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map(function (shortcut, i) {
5471
- return React.createElement("li", {
5472
- key: i
5473
- }, React.createElement("button", {
5474
- className: "w-full px-4 py-1 flex items-start hover:bg-grey-light text-xs",
5475
- onClick: function onClick(event) {
5476
- event.persist();
5477
- shortcut.onClick(event);
5478
- close();
5479
- }
5480
- }, shortcut.text));
5481
- })), handleReset && React.createElement("button", {
5482
- className: "text-blue hover:text-blue-light inline-flex border-none bg-transparent text-xs cursor-pointer mt-auto my-4 mx-auto",
5483
- onClick: function onClick(event) {
5484
- event.persist();
5485
- handleReset(event);
5486
- close();
5487
- }
5488
- }, texts.datepicker.clear)));
5489
- }))
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)))))
5490
5463
  })));
5491
5464
  });
5492
5465
 
@@ -5729,14 +5702,12 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5729
5702
  });
5730
5703
  Extra.displayName = 'DialogExtra';
5731
5704
 
5732
- var _excluded$b = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5733
-
5734
- var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5735
- return React.useMemo(function () {
5736
- var children = [];
5737
- var drawer;
5738
- var extra;
5739
- 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 => {
5740
5711
  var _child$type, _child$type2;
5741
5712
 
5742
5713
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5751,55 +5722,39 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5751
5722
  }, [initialChildren]);
5752
5723
  };
5753
5724
 
5754
- var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5755
- var initialChildren = props.children,
5756
- _props$closeOnEscape = props.closeOnEscape,
5757
- closeOnEscape = _props$closeOnEscape === void 0 ? true : _props$closeOnEscape,
5758
- defaultOpen = props.defaultOpen,
5759
- _props$draggable = props.draggable,
5760
- draggable = _props$draggable === void 0 ? false : _props$draggable,
5761
- onChange = props.onChange,
5762
- onClose = props.onClose,
5763
- open = props.open,
5764
- _props$showCloseButto = props.showCloseButton,
5765
- showCloseButton = _props$showCloseButto === void 0 ? true : _props$showCloseButto,
5766
- _props$size = props.size,
5767
- size = _props$size === void 0 ? 'sm' : _props$size,
5768
- trigger = props.trigger,
5769
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5770
-
5771
- var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5772
- children = _useSeparatedChildren[0],
5773
- drawer = _useSeparatedChildren[1],
5774
- extra = _useSeparatedChildren[2];
5775
-
5776
- var _React$useState = React.useState(false),
5777
- drawerOpen = _React$useState[0],
5778
- setDrawerOpen = _React$useState[1];
5779
-
5780
- var context = React.useMemo(function () {
5781
- return {
5782
- closeOnEscape: closeOnEscape,
5783
- draggable: draggable,
5784
- drawer: {
5785
- open: drawerOpen,
5786
- toggle: function toggle() {
5787
- return setDrawerOpen(function (isDrawerOpen) {
5788
- return !isDrawerOpen;
5789
- });
5790
- }
5791
- },
5792
- elements: {
5793
- drawer: drawer,
5794
- extra: extra
5795
- },
5796
- onClose: onClose,
5797
- props: otherProps,
5798
- showCloseButton: showCloseButton,
5799
- size: size,
5800
- ref: ref
5801
- };
5802
- }, [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]);
5803
5758
  return React.createElement(DialogContext.Provider, {
5804
5759
  value: context
5805
5760
  }, React.createElement(DialogPrimitive.Root, {
@@ -5816,19 +5771,18 @@ Dialog.Extra = Extra;
5816
5771
  Dialog.Drawer = Drawer;
5817
5772
  Dialog.Close = Close$2;
5818
5773
 
5819
- var _excluded$c = ["disabled", "children", "invalid", "message"];
5820
- var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5821
- var disabled = props.disabled,
5822
- children = props.children,
5823
- _props$invalid = props.invalid,
5824
- invalid = _props$invalid === void 0 ? false : _props$invalid,
5825
- message = props.message,
5826
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
5827
-
5828
- 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)]', {
5829
5783
  'text-grey-dark': disabled
5830
5784
  }, props.className);
5831
- 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', {
5832
5786
  'text-grey-darkest': !invalid,
5833
5787
  'text-red': invalid,
5834
5788
  'opacity-50': disabled
@@ -5843,13 +5797,12 @@ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5843
5797
  }, message));
5844
5798
  });
5845
5799
 
5846
- var _excluded$d = ["horizontal"];
5847
- var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5848
- var _props$horizontal = props.horizontal,
5849
- horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5850
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
5851
-
5852
- var className = cn('yt-form', {
5800
+ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5801
+ const {
5802
+ horizontal = false,
5803
+ ...otherProps
5804
+ } = props;
5805
+ const className = cn('yt-form', {
5853
5806
  'yt-form--horizontal flex flex-wrap': horizontal
5854
5807
  }, props.className);
5855
5808
  return React.createElement("form", Object.assign({}, otherProps, {
@@ -5859,13 +5812,12 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5859
5812
  }));
5860
5813
  });
5861
5814
 
5862
- var _excluded$e = ["as"];
5863
- var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5864
- var _props$as = props.as,
5865
- Tag = _props$as === void 0 ? 'span' : _props$as,
5866
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$e);
5867
-
5868
- var className = cn('flex ', props.className);
5815
+ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5816
+ const {
5817
+ as: Tag = 'span',
5818
+ ...otherProps
5819
+ } = props;
5820
+ const className = cn('flex ', props.className);
5869
5821
  return React.createElement(Tag, Object.assign({}, otherProps, {
5870
5822
  className: className,
5871
5823
  "data-taco": "group",
@@ -5873,19 +5825,18 @@ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5873
5825
  }));
5874
5826
  });
5875
5827
 
5876
- var _excluded$f = ["anchor", "children", "defaultOpen"];
5877
- var HangerContext = /*#__PURE__*/React.createContext({
5828
+ const HangerContext = /*#__PURE__*/React.createContext({
5878
5829
  props: {},
5879
5830
  ref: null
5880
5831
  });
5881
- var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5832
+ const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5882
5833
  var _props$children;
5883
5834
 
5884
- var context = React.useContext(HangerContext);
5885
- var children = props.children;
5835
+ const context = React.useContext(HangerContext);
5836
+ let children = props.children;
5886
5837
 
5887
5838
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5888
- 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");
5839
+ 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`);
5889
5840
  children = React.createElement("span", null, props.children);
5890
5841
  }
5891
5842
 
@@ -5895,15 +5846,14 @@ var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5895
5846
  asChild: true
5896
5847
  }));
5897
5848
  });
5898
- var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5899
- var context = React.useContext(HangerContext);
5900
-
5901
- var _useLocalization = useLocalization(),
5902
- texts = _useLocalization.texts;
5903
-
5904
- var className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent', props.className);
5849
+ const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5850
+ const context = React.useContext(HangerContext);
5851
+ const {
5852
+ texts
5853
+ } = useLocalization();
5854
+ const className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent', props.className);
5905
5855
 
5906
- var handleInteractOutside = function handleInteractOutside(event) {
5856
+ const handleInteractOutside = event => {
5907
5857
  event.preventDefault();
5908
5858
  };
5909
5859
 
@@ -5925,25 +5875,20 @@ var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref)
5925
5875
  onClick: context.props.onClose
5926
5876
  })));
5927
5877
  });
5928
- var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5929
- var anchor = props.anchor,
5930
- children = props.children,
5931
- _props$defaultOpen = props.defaultOpen,
5932
- defaultOpen = _props$defaultOpen === void 0 ? true : _props$defaultOpen,
5933
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$f);
5934
-
5935
- var context = React.useMemo(function () {
5936
- return {
5937
- props: otherProps,
5938
- ref: ref
5939
- };
5940
- }, [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5941
-
5942
- var _React$useState = React.useState(false),
5943
- open = _React$useState[0],
5944
- setOpen = _React$useState[1];
5878
+ const Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5879
+ const {
5880
+ anchor,
5881
+ children,
5882
+ defaultOpen = true,
5883
+ ...otherProps
5884
+ } = props;
5885
+ const context = React.useMemo(() => ({
5886
+ props: otherProps,
5887
+ ref
5888
+ }), [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5945
5889
 
5946
- React.useEffect(function () {
5890
+ const [open, setOpen] = React.useState(false);
5891
+ React.useEffect(() => {
5947
5892
  if (defaultOpen) {
5948
5893
  setOpen(defaultOpen);
5949
5894
  }
@@ -6109,7 +6054,7 @@ const useListbox = ({
6109
6054
  onChange: handleInputChange,
6110
6055
  ref: inputRef,
6111
6056
  tabIndex: -1,
6112
- value: value === undefined || value === null ? '' : value
6057
+ value: value !== null && value !== void 0 ? value : ''
6113
6058
  };
6114
6059
  return {
6115
6060
  list,
@@ -6121,6 +6066,7 @@ const useMultiListbox = ({
6121
6066
  data: externalData = [],
6122
6067
  defaultValue,
6123
6068
  disabled,
6069
+ emptyValue: _,
6124
6070
  id: nativeId,
6125
6071
  name,
6126
6072
  onClick,
@@ -6302,49 +6248,49 @@ const useMultiListbox = ({
6302
6248
  };
6303
6249
  };
6304
6250
 
6305
- var _excluded$g = ["className"],
6306
- _excluded2$1 = ["className"];
6307
- var Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6308
- var externalClassName = props.className,
6309
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$g);
6310
-
6311
- var _useListbox = useListbox(otherProps, ref),
6312
- list = _useListbox.list,
6313
- input = _useListbox.input;
6314
-
6315
- var className = cn('bg-white inline-flex relative w-full', externalClassName);
6251
+ const Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6252
+ const {
6253
+ className: externalClassName,
6254
+ ...otherProps
6255
+ } = props;
6256
+ const {
6257
+ list,
6258
+ input
6259
+ } = useListbox(otherProps, ref);
6260
+ const className = cn('bg-white inline-flex relative w-full', externalClassName);
6316
6261
  return React.createElement("span", {
6317
6262
  "data-taco": "listbox",
6318
6263
  className: className
6319
6264
  }, React.createElement(ScrollableList, Object.assign({}, list, {
6320
- style: _extends({}, list.style, {
6265
+ style: { ...list.style,
6321
6266
  maxHeight: 'calc(12rem + 2px)'
6322
6267
  /* (6 * option height) + listbox border */
6323
6268
 
6324
- })
6269
+ }
6325
6270
  })), React.createElement("input", Object.assign({}, input, {
6326
6271
  className: "hidden",
6327
6272
  type: "text"
6328
6273
  })));
6329
6274
  });
6330
- var MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6331
- var externalClassName = props.className,
6332
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$1);
6333
-
6334
- var _useMultiListbox = useMultiListbox(otherProps, ref),
6335
- list = _useMultiListbox.list,
6336
- input = _useMultiListbox.input;
6337
-
6338
- var className = cn('bg-white inline-flex relative w-full', externalClassName);
6275
+ const MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6276
+ const {
6277
+ className: externalClassName,
6278
+ ...otherProps
6279
+ } = props;
6280
+ const {
6281
+ list,
6282
+ input
6283
+ } = useMultiListbox(otherProps, ref);
6284
+ const className = cn('bg-white inline-flex relative w-full', externalClassName);
6339
6285
  return React.createElement("span", {
6340
6286
  "data-taco": "listbox",
6341
6287
  className: className
6342
6288
  }, React.createElement(ScrollableList, Object.assign({}, list, {
6343
- style: _extends({}, list.style, {
6289
+ style: { ...list.style,
6344
6290
  maxHeight: 'calc(12rem + 2px + 2px)'
6345
6291
  /* (6 * option height) + listbox border + ALL_OPTIONS bottom border */
6346
6292
 
6347
- })
6293
+ }
6348
6294
  })), React.createElement("input", Object.assign({}, input, {
6349
6295
  className: "hidden",
6350
6296
  type: "text"
@@ -6607,34 +6553,26 @@ const Checkbox$1 = props => {
6607
6553
  })), children);
6608
6554
  };
6609
6555
 
6610
- var _excluded$h = ["children", "value"],
6611
- _excluded2$2 = ["children", "defaultValue", "disabled", "invalid", "onChange", "orientation", "value"];
6612
- var getRadioGroupItemValueAsString = function getRadioGroupItemValueAsString(value) {
6613
- return value === null ? '' : String(value);
6614
- };
6615
- var findByValue$1 = function findByValue(values, valueAsString) {
6616
- return values.find(function (value) {
6617
- return getRadioGroupItemValueAsString(value) === valueAsString;
6618
- });
6619
- };
6620
- var RadioGroupContext = /*#__PURE__*/React.createContext({
6556
+ const getRadioGroupItemValueAsString = value => value === null ? '' : String(value);
6557
+ const findByValue$1 = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
6558
+ const RadioGroupContext = /*#__PURE__*/React.createContext({
6621
6559
  disabled: false,
6622
6560
  invalid: false
6623
6561
  });
6624
- var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
6625
- var context = React.useContext(RadioGroupContext);
6626
-
6627
- var children = props.children,
6628
- value = props.value,
6629
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$h);
6630
-
6631
- var disabled = context.disabled || props.disabled;
6632
- var className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mr-2 mt-[0.2rem] rounded-full bg-white border-2 ', {
6562
+ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
6563
+ const context = React.useContext(RadioGroupContext);
6564
+ const {
6565
+ children,
6566
+ value,
6567
+ ...otherProps
6568
+ } = props;
6569
+ const disabled = context.disabled || props.disabled;
6570
+ const className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mr-2 mt-[0.2rem] rounded-full bg-white border-2 ', {
6633
6571
  'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue': !disabled && !context.invalid,
6634
6572
  'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,
6635
6573
  'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !disabled
6636
6574
  });
6637
- var labelClassName = cn('flex items-center cursor-pointer', {
6575
+ const labelClassName = cn('flex items-center cursor-pointer', {
6638
6576
  'cursor-not-allowed text-grey-dark': disabled
6639
6577
  }, props.className);
6640
6578
  return React.createElement("label", {
@@ -6648,38 +6586,34 @@ var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props
6648
6586
  className: "h-2 w-2 rounded-full bg-white"
6649
6587
  })), children);
6650
6588
  });
6651
- var useRadioGroup = function useRadioGroup(props) {
6652
- var children = props.children,
6653
- defaultValue = props.defaultValue,
6654
- disabled = props.disabled,
6655
- invalid = props.invalid,
6656
- onChange = props.onChange,
6657
- _props$orientation = props.orientation,
6658
- orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
6659
- value = props.value,
6660
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$2);
6661
-
6662
- var values = React.useMemo(function () {
6663
- var radioGroupItemValues = [];
6664
- React.Children.forEach(children, function (child) {
6589
+ const useRadioGroup = props => {
6590
+ const {
6591
+ children,
6592
+ defaultValue,
6593
+ disabled,
6594
+ invalid,
6595
+ onChange,
6596
+ orientation = 'vertical',
6597
+ value,
6598
+ ...otherProps
6599
+ } = props;
6600
+ const values = React.useMemo(() => {
6601
+ const radioGroupItemValues = [];
6602
+ React.Children.forEach(children, child => {
6665
6603
  if (React.isValidElement(child)) {
6666
6604
  radioGroupItemValues.push(child.props.value);
6667
6605
  }
6668
6606
  });
6669
6607
  return radioGroupItemValues;
6670
6608
  }, [children]);
6671
- var context = React.useMemo(function () {
6672
- return {
6673
- disabled: disabled !== null && disabled !== void 0 ? disabled : false,
6674
- invalid: invalid !== null && invalid !== void 0 ? invalid : false
6675
- };
6676
- }, [disabled, invalid]);
6677
- var valueProps;
6609
+ const context = React.useMemo(() => ({
6610
+ disabled: disabled !== null && disabled !== void 0 ? disabled : false,
6611
+ invalid: invalid !== null && invalid !== void 0 ? invalid : false
6612
+ }), [disabled, invalid]);
6613
+ let valueProps;
6678
6614
 
6679
6615
  if (onChange !== undefined) {
6680
- var handleChange = function handleChange(value) {
6681
- return onChange(findByValue$1(values, value));
6682
- };
6616
+ const handleChange = value => onChange(findByValue$1(values, value));
6683
6617
 
6684
6618
  valueProps = {
6685
6619
  onValueChange: handleChange,
@@ -6692,19 +6626,20 @@ var useRadioGroup = function useRadioGroup(props) {
6692
6626
  }
6693
6627
 
6694
6628
  return {
6695
- context: context,
6696
- props: _extends({}, otherProps, valueProps, {
6697
- children: children,
6698
- orientation: orientation
6699
- })
6629
+ context,
6630
+ props: { ...otherProps,
6631
+ ...valueProps,
6632
+ children,
6633
+ orientation
6634
+ }
6700
6635
  };
6701
6636
  };
6702
- var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
6703
- var _useRadioGroup = useRadioGroup(props),
6704
- context = _useRadioGroup.context,
6705
- otherProps = _useRadioGroup.props;
6706
-
6707
- var className = cn('flex items-start', {
6637
+ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
6638
+ const {
6639
+ context,
6640
+ props: otherProps
6641
+ } = useRadioGroup(props);
6642
+ const className = cn('flex items-start', {
6708
6643
  'flex-wrap space-x-4': otherProps.orientation === 'horizontal',
6709
6644
  'flex-col space-y-2': otherProps.orientation === 'vertical'
6710
6645
  }, otherProps.className);
@@ -6817,48 +6752,26 @@ const Header = props => {
6817
6752
  }));
6818
6753
  };
6819
6754
 
6820
- var _excluded$i = ["appearance", "children", "trigger"];
6821
- var Menu = function Menu(externalProps) {
6822
- var externalAppearance = externalProps.appearance,
6823
- children = externalProps.children,
6824
- trigger = externalProps.trigger,
6825
- props = _objectWithoutPropertiesLoose(externalProps, _excluded$i);
6826
-
6827
- var _React$useState = React.useState(false),
6828
- open = _React$useState[0],
6829
- setOpen = _React$useState[1];
6830
-
6831
- var _React$useState2 = React.useState(externalAppearance !== null && externalAppearance !== void 0 ? externalAppearance : 'default'),
6832
- appearance = _React$useState2[0],
6833
- _setAppearance = _React$useState2[1];
6834
-
6835
- var _React$useState3 = React.useState(false),
6836
- indented = _React$useState3[0],
6837
- setIndented = _React$useState3[1];
6838
-
6839
- var _React$useState4 = React.useState(undefined),
6840
- minWidth = _React$useState4[0],
6841
- _setMinWidth = _React$useState4[1];
6842
-
6843
- var context = React.useMemo(function () {
6844
- return {
6845
- appearance: appearance,
6846
- setAppearance: function setAppearance(appearance) {
6847
- return _setAppearance(appearance);
6848
- },
6849
- indented: indented,
6850
- registerIndentation: function registerIndentation() {
6851
- return setIndented(true);
6852
- },
6853
- minWidth: minWidth,
6854
- setMinWidth: function setMinWidth(width) {
6855
- return _setMinWidth(width);
6856
- },
6857
- close: function close() {
6858
- return setOpen(false);
6859
- }
6860
- };
6861
- }, [indented, minWidth, appearance]);
6755
+ const Menu = externalProps => {
6756
+ const {
6757
+ appearance: externalAppearance,
6758
+ children,
6759
+ trigger,
6760
+ ...props
6761
+ } = externalProps;
6762
+ const [open, setOpen] = React.useState(false);
6763
+ const [appearance, setAppearance] = React.useState(externalAppearance !== null && externalAppearance !== void 0 ? externalAppearance : 'default');
6764
+ const [indented, setIndented] = React.useState(false);
6765
+ const [minWidth, setMinWidth] = React.useState(undefined);
6766
+ const context = React.useMemo(() => ({
6767
+ appearance,
6768
+ setAppearance: appearance => setAppearance(appearance),
6769
+ indented,
6770
+ registerIndentation: () => setIndented(true),
6771
+ minWidth,
6772
+ setMinWidth: width => setMinWidth(width),
6773
+ close: () => setOpen(false)
6774
+ }), [indented, minWidth, appearance]);
6862
6775
  return React.createElement(MenuContext.Provider, {
6863
6776
  value: context
6864
6777
  }, React.createElement(DropdownMenuPrimitive.Root, Object.assign({}, props, {
@@ -6978,25 +6891,20 @@ const useDropTarget = onDrop => {
6978
6891
  return [isDraggedOver, props];
6979
6892
  };
6980
6893
 
6981
- var _excluded$j = ["active", "children", "onDrop", "postfix", "prefix", "role"],
6982
- _excluded2$3 = ["children"];
6983
- var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
6984
- var active = props.active,
6985
- children = props.children,
6986
- onDrop = props.onDrop,
6987
- postfix = props.postfix,
6988
- prefix = props.prefix,
6989
- role = props.role,
6990
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$j);
6991
-
6992
- var proxyRef = useProxiedRef(ref);
6993
-
6994
- var _useDropTarget = useDropTarget(onDrop),
6995
- isDraggedOver = _useDropTarget[0],
6996
- dropTargetProps = _useDropTarget[1];
6997
-
6998
- var isTreeitem = role === 'treeitem';
6999
- var className = cn('yt-navigation__item cursor-pointer', {
6894
+ const Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
6895
+ const {
6896
+ active,
6897
+ children,
6898
+ onDrop,
6899
+ postfix,
6900
+ prefix,
6901
+ role,
6902
+ ...otherProps
6903
+ } = props;
6904
+ const proxyRef = useProxiedRef(ref);
6905
+ const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
6906
+ const isTreeitem = role === 'treeitem';
6907
+ const className = cn('yt-navigation__item cursor-pointer', {
7000
6908
  'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-dark': isTreeitem,
7001
6909
  'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,
7002
6910
  'yt-navigation__item--active': active && !isDraggedOver,
@@ -7004,7 +6912,7 @@ var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
7004
6912
  'yt-navigation__item--dropping bg-blue': isDraggedOver
7005
6913
  }, props.className);
7006
6914
 
7007
- var handleClick = function handleClick(event) {
6915
+ const handleClick = event => {
7008
6916
  if (event.target instanceof HTMLAnchorElement || event.target instanceof HTMLButtonElement) {
7009
6917
  return;
7010
6918
  }
@@ -7027,19 +6935,19 @@ var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
7027
6935
  className: "yt-navigation__item__postfix ml-1"
7028
6936
  }, postfix));
7029
6937
  });
7030
- var Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
6938
+ const Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
7031
6939
  return React__default.createElement("div", Object.assign({}, props, {
7032
6940
  className: cn('w-full bg-white p-3', props.className),
7033
6941
  ref: ref
7034
6942
  }));
7035
6943
  });
7036
- var MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
7037
- var className = cn('flex-shrink-0 space-y-1 outline-none', {
6944
+ const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
6945
+ const className = cn('flex-shrink-0 space-y-1 outline-none', {
7038
6946
  'bg-white pb-2': props.fixed
7039
6947
  }, props.className);
7040
6948
 
7041
- var title = function title(expanded) {
7042
- var className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
6949
+ const title = expanded => {
6950
+ const className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
7043
6951
  'mb-1': expanded,
7044
6952
  'cursor-pointer hover:text-blue': !props.fixed
7045
6953
  });
@@ -7056,16 +6964,14 @@ var MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props,
7056
6964
  ref: ref
7057
6965
  }));
7058
6966
  });
7059
- var Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
7060
- var scrollableAreas = React__default.useMemo(function () {
7061
- var scrollableAreas = [];
7062
- React__default.Children.toArray(props.children).filter(function (child) {
7063
- return !!child;
7064
- }).map(function (child) {
6967
+ const Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
6968
+ const scrollableAreas = React__default.useMemo(() => {
6969
+ const scrollableAreas = [];
6970
+ React__default.Children.toArray(props.children).filter(child => !!child).map(child => {
7065
6971
  if (child.props.fixed) {
7066
6972
  scrollableAreas.push(child);
7067
6973
  } else {
7068
- var x = scrollableAreas[scrollableAreas.length - 1];
6974
+ const x = scrollableAreas[scrollableAreas.length - 1];
7069
6975
 
7070
6976
  if (Array.isArray(x)) {
7071
6977
  x.push(child);
@@ -7079,19 +6985,18 @@ var Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
7079
6985
  return React__default.createElement(Treeview, Object.assign({}, props, {
7080
6986
  className: cn('divide-grey-light flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className),
7081
6987
  ref: ref
7082
- }), scrollableAreas.map(function (area, i) {
7083
- return Array.isArray(area) ? React__default.createElement("div", {
7084
- className: "divide-grey-light flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
7085
- key: i
7086
- }, area) : area;
7087
- }));
6988
+ }), scrollableAreas.map((area, i) => Array.isArray(area) ? React__default.createElement("div", {
6989
+ className: "divide-grey-light flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
6990
+ key: i
6991
+ }, area) : area));
7088
6992
  });
7089
6993
  Menu$1.Group = MenuGroup;
7090
- var Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
7091
- var children = props.children,
7092
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$3);
7093
-
7094
- var className = cn('h-full flex flex-col bg-grey-light divide-y-2 divide-grey-light', props.className);
6994
+ const Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
6995
+ const {
6996
+ children,
6997
+ ...otherProps
6998
+ } = props;
6999
+ const className = cn('h-full flex flex-col bg-grey-light divide-y-2 divide-grey-light', props.className);
7095
7000
  return React__default.createElement("div", Object.assign({}, otherProps, {
7096
7001
  className: className,
7097
7002
  "data-taco": "navigation",
@@ -7155,20 +7060,21 @@ const useSelect = ({
7155
7060
  emptyValue,
7156
7061
  id: nativeId,
7157
7062
  multiselect,
7063
+ onBlur,
7158
7064
  onClick,
7159
7065
  onChange,
7160
7066
  readOnly,
7161
- value = emptyValue,
7067
+ value,
7162
7068
  ...otherProps
7163
7069
  }, ref) => {
7164
7070
  const {
7165
7071
  texts
7166
7072
  } = useLocalization();
7167
- const searchData = useFlattenedData(data);
7168
- const inputRef = useProxiedRef(ref);
7073
+ const flattenedData = useFlattenedData(data);
7074
+ const listboxInputRef = useProxiedRef(ref);
7169
7075
  const [open, setOpen] = React.useState(false);
7170
7076
  const id = React.useMemo(() => nativeId || `select_${uuid.v4()}`, [nativeId]);
7171
- const internalInputRef = React.useRef(null);
7077
+ const inputRef = React.useRef(null);
7172
7078
  const buttonId = `${id}-button`; // support 'escape' resetting to the value that was set when the listbox opened
7173
7079
 
7174
7080
  const [lastValue, setLastValue] = React.useState(value);
@@ -7176,16 +7082,24 @@ const useSelect = ({
7176
7082
  setLastValue(value);
7177
7083
  }, [open]);
7178
7084
  React.useEffect(() => {
7179
- if (defaultValue !== undefined && value === undefined) {
7180
- setInputValueByRef$1(internalInputRef.current, defaultValue);
7181
- }
7182
- }, [defaultValue]);
7183
- React.useEffect(() => {
7184
- // If emptyValue is defined, then set emptyValue
7185
- if (emptyValue !== undefined && value === emptyValue) {
7186
- setInputValueByRef$1(internalInputRef.current, value);
7187
- } else if (value !== undefined && data.some(option => option.value === value)) {
7188
- setInputValueByRef$1(internalInputRef.current, value);
7085
+ if (value === undefined) {
7086
+ if (defaultValue !== undefined && findByValue(flattenedData, defaultValue)) {
7087
+ setInputValueByRef$1(inputRef.current, defaultValue);
7088
+ } else {
7089
+ if (emptyValue !== undefined) {
7090
+ setInputValueByRef$1(inputRef.current, emptyValue);
7091
+ } else if (data.length > 0) {
7092
+ setInputValueByRef$1(inputRef.current, data[0].value);
7093
+ }
7094
+ }
7095
+ } else {
7096
+ if (!multiselect && !findByValue(flattenedData, value)) {
7097
+ if (emptyValue !== undefined) {
7098
+ setInputValueByRef$1(inputRef.current, emptyValue);
7099
+ } else if (data.length > 0) {
7100
+ setInputValueByRef$1(inputRef.current, data[0].value);
7101
+ }
7102
+ }
7189
7103
  }
7190
7104
  }, []); // event handlers
7191
7105
 
@@ -7203,7 +7117,7 @@ const useSelect = ({
7203
7117
  event.preventDefault();
7204
7118
 
7205
7119
  if (lastValue !== undefined) {
7206
- setInputValueByRef$1(inputRef.current, lastValue);
7120
+ setInputValueByRef$1(listboxInputRef.current, lastValue);
7207
7121
  }
7208
7122
 
7209
7123
  setOpen(false);
@@ -7232,6 +7146,10 @@ const useSelect = ({
7232
7146
 
7233
7147
  if (!multiselect) {
7234
7148
  setOpen(false);
7149
+
7150
+ if (onBlur) {
7151
+ onBlur(createCustomEvent('blur'));
7152
+ }
7235
7153
  }
7236
7154
  };
7237
7155
 
@@ -7242,16 +7160,16 @@ const useSelect = ({
7242
7160
  if (multiselect) {
7243
7161
  const selectedValues = (value === null || value === void 0 ? void 0 : value.toString().split(',')) || [];
7244
7162
 
7245
- if (selectedValues.length === searchData.filter(item => !item.disabled).length) {
7163
+ if (selectedValues.length === flattenedData.filter(item => !item.disabled).length) {
7246
7164
  text = texts.select.allOptionsSelected;
7247
7165
  } else {
7248
7166
  var _findByValue$text, _findByValue;
7249
7167
 
7250
- text = (_findByValue$text = (_findByValue = findByValue(searchData, selectedValues[0])) === null || _findByValue === void 0 ? void 0 : _findByValue.text) !== null && _findByValue$text !== void 0 ? _findByValue$text : '';
7168
+ text = (_findByValue$text = (_findByValue = findByValue(flattenedData, selectedValues[0])) === null || _findByValue === void 0 ? void 0 : _findByValue.text) !== null && _findByValue$text !== void 0 ? _findByValue$text : '';
7251
7169
  more = selectedValues.length > 1 ? selectedValues.length - 1 : 0;
7252
7170
  }
7253
7171
  } else {
7254
- const item = findByValue(searchData, value);
7172
+ const item = findByValue(flattenedData, value);
7255
7173
 
7256
7174
  if (item) {
7257
7175
  text = item.icon ? React.createElement(React.Fragment, null, React.cloneElement(item.icon, {
@@ -7267,7 +7185,7 @@ const useSelect = ({
7267
7185
  if (onChange) {
7268
7186
  var _item$path$split, _item$path;
7269
7187
 
7270
- const item = findByValue(searchData, event.target.value);
7188
+ const item = findByValue(flattenedData, event.target.value);
7271
7189
  event.detail = sanitizeItem(item);
7272
7190
  const indexes = (_item$path$split = item === null || item === void 0 ? void 0 : (_item$path = item.path) === null || _item$path === void 0 ? void 0 : _item$path.split('.')) !== null && _item$path$split !== void 0 ? _item$path$split : [];
7273
7191
 
@@ -7278,7 +7196,7 @@ const useSelect = ({
7278
7196
  let lastPath;
7279
7197
  event.detail.parents = indexes.map(i => {
7280
7198
  lastPath = lastPath ? [lastPath, i].join('.') : i;
7281
- return sanitizeItem(searchData.find(i => i.path === lastPath));
7199
+ return sanitizeItem(flattenedData.find(i => i.path === lastPath));
7282
7200
  });
7283
7201
  }
7284
7202
 
@@ -7301,21 +7219,19 @@ const useSelect = ({
7301
7219
  data,
7302
7220
  disabled,
7303
7221
  emptyValue,
7222
+ onBlur,
7304
7223
  onClick: handleListboxClick,
7305
7224
  onChange: event => {
7306
- var _event$target;
7307
-
7308
- setInputValueByRef$1(internalInputRef.current, (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value);
7225
+ setInputValueByRef$1(inputRef.current, event.target.value);
7309
7226
  },
7310
7227
  onKeyDown: handleListboxKeyDown,
7311
- ref: inputRef,
7312
- value,
7313
- multiselect
7228
+ ref: listboxInputRef,
7229
+ value
7314
7230
  };
7315
7231
  const input = {
7316
7232
  onChange: handleInputChange,
7317
- ref: internalInputRef,
7318
- value: value !== null && value !== void 0 ? value : ''
7233
+ ref: inputRef,
7234
+ value: String(value !== null && value !== void 0 ? value : '')
7319
7235
  };
7320
7236
  return {
7321
7237
  button,
@@ -7323,61 +7239,65 @@ const useSelect = ({
7323
7239
  input,
7324
7240
  popover: {
7325
7241
  open,
7326
- onOpenChange: setOpen
7242
+ onOpenChange: open => {
7243
+ if (!open && onBlur) {
7244
+ onBlur(createCustomEvent('blur'));
7245
+ }
7246
+
7247
+ setOpen(open);
7248
+ }
7327
7249
  },
7328
7250
  text,
7329
7251
  more
7330
7252
  };
7331
7253
  };
7332
7254
 
7333
- var _excluded$k = ["autoFocus", "className", "highlighted", "style"],
7334
- _excluded2$4 = ["editable"];
7335
- var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7336
- var autoFocus = props.autoFocus,
7337
- externalClassName = props.className,
7338
- style = props.style,
7339
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$k);
7340
-
7341
- var _useSelect = useSelect(otherProps, ref),
7342
- button = _useSelect.button,
7343
- listbox = _useSelect.listbox,
7344
- popover = _useSelect.popover,
7345
- input = _useSelect.input,
7346
- text = _useSelect.text,
7347
- _useSelect$more = _useSelect.more,
7348
- more = _useSelect$more === void 0 ? 0 : _useSelect$more;
7349
-
7350
- var internalRef = React.useRef(null);
7351
- var selectDimensions = useBoundingClientRectListener(internalRef);
7352
- var className = cn('inline-flex relative w-full', {
7255
+ const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7256
+ const {
7257
+ autoFocus,
7258
+ className: externalClassName,
7259
+ highlighted,
7260
+ style,
7261
+ ...otherProps
7262
+ } = props;
7263
+ const {
7264
+ button,
7265
+ listbox,
7266
+ popover,
7267
+ input,
7268
+ text,
7269
+ more = 0
7270
+ } = useSelect(otherProps, ref);
7271
+ const internalRef = React.useRef(null);
7272
+ const selectDimensions = useBoundingClientRectListener(internalRef);
7273
+ const className = cn('inline-flex relative w-full', {
7353
7274
  'yt-select--readonly': props.readOnly
7354
7275
  }, externalClassName);
7355
- var inputClassname = cn(getInputClasses(props), 'h-8 text-left pr-0', {
7276
+ const inputClassname = cn(getInputClasses(props), 'h-8 text-left pr-0', {
7356
7277
  'border-blue': popover.open
7357
7278
  });
7358
- React.useEffect(function () {
7279
+ React.useEffect(() => {
7359
7280
  if (autoFocus && internalRef.current) {
7360
7281
  internalRef.current.focus();
7361
7282
  }
7362
7283
  }, []);
7363
7284
 
7364
- var renderMultiSelection = function renderMultiSelection() {
7285
+ const renderMultiSelection = () => {
7365
7286
  return React.createElement(React.Fragment, null, React.createElement("span", {
7366
7287
  className: "flex-grow truncate text-left"
7367
7288
  }, text), more > 0 && React.createElement(Badge, {
7368
7289
  className: "ml-2"
7369
- }, "+" + more));
7290
+ }, `+${more}`));
7370
7291
  };
7371
7292
 
7372
- var commonListboxProps = _extends({}, listbox, {
7293
+ const commonListboxProps = { ...listbox,
7373
7294
  className: 'w-auto',
7374
7295
  invalid: undefined,
7375
7296
  style: {
7376
7297
  minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
7377
7298
  },
7378
7299
  tabIndex: popover.open ? 0 : -1
7379
- });
7380
-
7300
+ };
7381
7301
  return React.createElement("span", {
7382
7302
  className: className,
7383
7303
  "data-taco": "select",
@@ -7400,9 +7320,11 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7400
7320
  type: "text"
7401
7321
  }))));
7402
7322
  });
7403
- var Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
7404
- var editable = props.editable,
7405
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$4);
7323
+ const Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
7324
+ const {
7325
+ editable,
7326
+ ...otherProps
7327
+ } = props;
7406
7328
 
7407
7329
  if (editable) {
7408
7330
  return React.createElement(Combobox, Object.assign({}, otherProps, {
@@ -7473,47 +7395,41 @@ const usePagination = (initialPageIndex = 0, initialPageSize = 10) => {
7473
7395
  };
7474
7396
  };
7475
7397
 
7476
- var _excluded$l = ["length", "pageIndex", "pageSize", "pageSizes", "setPageIndex", "setPageSize", "showPageControls", "showPageNumbers", "showPageSize", "dangerouslyHijackGlobalKeyboardNavigation"];
7477
-
7478
- var getShowingLabel = function getShowingLabel(length, pageIndex, pageSize, texts) {
7479
- var minItemIndex = pageIndex * pageSize + 1;
7480
- var maxItemIndex = (pageIndex + 1) * pageSize;
7398
+ const getShowingLabel = (length, pageIndex, pageSize, texts) => {
7399
+ const minItemIndex = pageIndex * pageSize + 1;
7400
+ const maxItemIndex = (pageIndex + 1) * pageSize;
7481
7401
  return texts.pagination.showingXofYofTotal.replace('[X]', length === 0 ? '0' : String(minItemIndex)).replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex)).replace('[total]', String(length));
7482
7402
  };
7483
7403
 
7484
- var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7485
- var length = props.length,
7486
- pageIndex = props.pageIndex,
7487
- pageSize = props.pageSize,
7488
- _props$pageSizes = props.pageSizes,
7489
- pageSizes = _props$pageSizes === void 0 ? [10, 25, 50, 100, 500] : _props$pageSizes,
7490
- setPageIndex = props.setPageIndex,
7491
- setPageSize = props.setPageSize,
7492
- _props$showPageContro = props.showPageControls,
7493
- showPageControls = _props$showPageContro === void 0 ? true : _props$showPageContro,
7494
- _props$showPageNumber = props.showPageNumbers,
7495
- showPageNumbers = _props$showPageNumber === void 0 ? true : _props$showPageNumber,
7496
- _props$showPageSize = props.showPageSize,
7497
- showPageSize = _props$showPageSize === void 0 ? true : _props$showPageSize,
7498
- _props$dangerouslyHij = props.dangerouslyHijackGlobalKeyboardNavigation,
7499
- dangerouslyHijackGlobalKeyboardNavigation = _props$dangerouslyHij === void 0 ? false : _props$dangerouslyHij,
7500
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$l);
7501
-
7502
- var _useLocalization = useLocalization(),
7503
- texts = _useLocalization.texts;
7504
-
7505
- var maxPageIndex = Math.ceil(length / pageSize) - 1;
7506
- var showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
7404
+ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7405
+ const {
7406
+ length,
7407
+ pageIndex,
7408
+ pageSize,
7409
+ pageSizes = [10, 25, 50, 100, 500],
7410
+ setPageIndex,
7411
+ setPageSize,
7412
+ showPageControls = true,
7413
+ showPageNumbers = true,
7414
+ showPageSize = true,
7415
+ dangerouslyHijackGlobalKeyboardNavigation = false,
7416
+ ...otherProps
7417
+ } = props;
7418
+ const {
7419
+ texts
7420
+ } = useLocalization();
7421
+ const maxPageIndex = Math.ceil(length / pageSize) - 1;
7422
+ const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
7507
7423
  usePaginationShortcuts({
7508
- setPageIndex: setPageIndex,
7509
- maxPageIndex: maxPageIndex,
7510
- pageIndex: pageIndex,
7511
- dangerouslyHijackGlobalKeyboardNavigation: dangerouslyHijackGlobalKeyboardNavigation
7424
+ setPageIndex,
7425
+ maxPageIndex,
7426
+ pageIndex,
7427
+ dangerouslyHijackGlobalKeyboardNavigation
7512
7428
  });
7513
- var pageCount = Math.ceil(length / pageSize);
7514
- var canPreviousPage = pageIndex > 0;
7515
- var canNextPage = pageIndex < pageCount - 1;
7516
- var className = cn('inline-flex relative justify-between items-center', props.className);
7429
+ const pageCount = Math.ceil(length / pageSize);
7430
+ const canPreviousPage = pageIndex > 0;
7431
+ const canNextPage = pageIndex < pageCount - 1;
7432
+ const className = cn('inline-flex relative justify-between items-center', props.className);
7517
7433
  return React.createElement("div", Object.assign({}, otherProps, {
7518
7434
  className: className,
7519
7435
  "data-taco": "pagination",
@@ -7523,13 +7439,11 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7523
7439
  }, getShowingLabel(length, pageIndex, pageSize, texts), React.createElement(Select, {
7524
7440
  "aria-label": texts.pagination.pageSize,
7525
7441
  className: "ml-4 !w-20",
7526
- data: pageSizes.map(function (pageSize) {
7527
- return {
7528
- text: String(pageSize),
7529
- value: pageSize
7530
- };
7531
- }),
7532
- onChange: function onChange(event) {
7442
+ data: pageSizes.map(pageSize => ({
7443
+ text: String(pageSize),
7444
+ value: pageSize
7445
+ })),
7446
+ onChange: event => {
7533
7447
  setPageIndex(0);
7534
7448
  setPageSize(Number(event.target.value));
7535
7449
  },
@@ -7541,18 +7455,14 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7541
7455
  appearance: "default",
7542
7456
  disabled: !canPreviousPage,
7543
7457
  icon: "arrow-start",
7544
- onClick: function onClick() {
7545
- return setPageIndex(0);
7546
- },
7458
+ onClick: () => setPageIndex(0),
7547
7459
  "aria-label": showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage,
7548
7460
  tooltip: showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage
7549
7461
  }), React.createElement(IconButton, {
7550
7462
  appearance: "default",
7551
7463
  disabled: !canPreviousPage,
7552
7464
  icon: "arrow-left",
7553
- onClick: function onClick() {
7554
- return setPageIndex(pageIndex - 1);
7555
- },
7465
+ onClick: () => setPageIndex(pageIndex - 1),
7556
7466
  "aria-label": showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage,
7557
7467
  tooltip: showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage
7558
7468
  }), showPageNumbers && pageCount > 0 && React.createElement(PageNumbers, {
@@ -7563,43 +7473,36 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7563
7473
  appearance: "default",
7564
7474
  disabled: !canNextPage,
7565
7475
  icon: "arrow-right",
7566
- onClick: function onClick() {
7567
- return setPageIndex(pageIndex + 1);
7568
- },
7476
+ onClick: () => setPageIndex(pageIndex + 1),
7569
7477
  "aria-label": showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage,
7570
7478
  tooltip: showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage
7571
7479
  }), React.createElement(IconButton, {
7572
7480
  appearance: "default",
7573
7481
  disabled: !canNextPage,
7574
7482
  icon: "arrow-end",
7575
- onClick: function onClick() {
7576
- return setPageIndex(pageCount - 1);
7577
- },
7483
+ onClick: () => setPageIndex(pageCount - 1),
7578
7484
  "aria-label": showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage,
7579
7485
  tooltip: showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage
7580
7486
  })));
7581
7487
  });
7582
7488
 
7583
- var _excluded$m = ["duration"];
7584
- var Progress = function Progress(_ref) {
7585
- var _cn;
7586
-
7587
- var _ref$duration = _ref.duration,
7588
- duration = _ref$duration === void 0 ? undefined : _ref$duration,
7589
- props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
7590
-
7591
- var style;
7489
+ const Progress = ({
7490
+ duration = undefined,
7491
+ ...props
7492
+ }) => {
7493
+ let style;
7592
7494
 
7593
7495
  if (duration) {
7594
7496
  style = {
7595
- animationDuration: duration + "ms"
7497
+ animationDuration: `${duration}ms`
7596
7498
  };
7597
7499
  }
7598
7500
 
7599
- var className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
7600
- var progressClassName = cn('yt-progress__bar block h-1', (_cn = {
7601
- "w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration
7602
- }, _cn["w-0 bg-grey-dark animate-[progress_linear]"] = duration, _cn));
7501
+ const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
7502
+ const progressClassName = cn('yt-progress__bar block h-1', {
7503
+ "w-full before:h-1 before:bg-grey-dark before:block before:animate-[progress-indeterminate_2s_cubic-bezier(0.4,0,0.2,1)_infinite] before:content-[' ']": !duration,
7504
+ [`w-0 bg-grey-dark animate-[progress_linear]`]: duration
7505
+ });
7603
7506
  return React__default.createElement("span", Object.assign({}, props, {
7604
7507
  "data-taco": "progress",
7605
7508
  className: className
@@ -9491,22 +9394,22 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9491
9394
  }, [ref, callback]);
9492
9395
  };
9493
9396
 
9494
- var _excluded$n = ["onSearch"];
9495
- var SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput(_ref, ref) {
9496
- var onSearch = _ref.onSearch,
9497
- props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
9498
-
9499
- var _useLocalization = useLocalization(),
9500
- texts = _useLocalization.texts;
9397
+ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
9398
+ onSearch,
9399
+ ...props
9400
+ }, ref) {
9401
+ const {
9402
+ texts
9403
+ } = useLocalization();
9501
9404
 
9502
- var handleClick = function handleClick() {
9405
+ const handleClick = () => {
9503
9406
  if (!props.disabled) {
9504
9407
  onSearch === null || onSearch === void 0 ? void 0 : onSearch(props.value);
9505
9408
  }
9506
9409
  };
9507
9410
 
9508
- var handleKeyDown = function handleKeyDown(event) {
9509
- var isEnterKeyPressed = event.keyCode === keycode('enter');
9411
+ const handleKeyDown = event => {
9412
+ const isEnterKeyPressed = event.keyCode === keycode('enter');
9510
9413
 
9511
9414
  if (isEnterKeyPressed) {
9512
9415
  handleClick();