@economic/taco 0.0.30-alpha.0 → 0.0.31-alpha.0

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 (30) hide show
  1. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +1 -19
  2. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
  3. package/dist/esm/components/Badge/Badge.js +14 -14
  4. package/dist/esm/components/Badge/Badge.js.map +1 -1
  5. package/dist/esm/components/Banner/Banner.js +7 -5
  6. package/dist/esm/components/Banner/Banner.js.map +1 -1
  7. package/dist/esm/components/Button/Button.js +12 -13
  8. package/dist/esm/components/Button/Button.js.map +1 -1
  9. package/dist/esm/components/Button/util.js +1 -1
  10. package/dist/esm/components/Button/util.js.map +1 -1
  11. package/dist/esm/components/Calendar/Calendar.js +56 -71
  12. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  13. package/dist/esm/components/Checkbox/Checkbox.js +15 -18
  14. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  15. package/dist/esm/components/Combobox/Combobox.js +23 -25
  16. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  17. package/dist/esm/components/Dialog/Dialog.js +39 -58
  18. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  19. package/dist/esm/components/Field/Field.js +10 -12
  20. package/dist/esm/components/Field/Field.js.map +1 -1
  21. package/dist/esm/components/Menu/components/Item.js +5 -5
  22. package/dist/esm/components/Menu/components/Item.js.map +1 -1
  23. package/dist/esm/index.css +8 -5
  24. package/dist/index.css +8 -5
  25. package/dist/taco.cjs.development.js +213 -281
  26. package/dist/taco.cjs.development.js.map +1 -1
  27. package/dist/taco.cjs.production.min.js +1 -1
  28. package/dist/taco.cjs.production.min.js.map +1 -1
  29. package/dist/utils/tailwind.d.ts +1 -1
  30. package/package.json +2 -2
@@ -36,39 +36,6 @@ var PrimitiveSwitch = require('@radix-ui/react-switch');
36
36
  var Joyride = require('react-joyride');
37
37
  var Joyride__default = _interopDefault(Joyride);
38
38
 
39
- function _extends() {
40
- _extends = Object.assign || function (target) {
41
- for (var i = 1; i < arguments.length; i++) {
42
- var source = arguments[i];
43
-
44
- for (var key in source) {
45
- if (Object.prototype.hasOwnProperty.call(source, key)) {
46
- target[key] = source[key];
47
- }
48
- }
49
- }
50
-
51
- return target;
52
- };
53
-
54
- return _extends.apply(this, arguments);
55
- }
56
-
57
- function _objectWithoutPropertiesLoose(source, excluded) {
58
- if (source == null) return {};
59
- var target = {};
60
- var sourceKeys = Object.keys(source);
61
- var key, i;
62
-
63
- for (i = 0; i < sourceKeys.length; i++) {
64
- key = sourceKeys[i];
65
- if (excluded.indexOf(key) >= 0) continue;
66
- target[key] = source[key];
67
- }
68
-
69
- return target;
70
- }
71
-
72
39
  function IconAccountPreview(props, svgRef) {
73
40
  return React.createElement("svg", Object.assign({
74
41
  xmlns: "http://www.w3.org/2000/svg",
@@ -3144,14 +3111,12 @@ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3144
3111
  })) : null;
3145
3112
  });
3146
3113
 
3147
- var _excluded = ["id"],
3148
- _excluded2 = ["id", "defaultId", "onChange", "as"];
3149
- var AccordionContext = /*#__PURE__*/React__default.createContext({
3114
+ const AccordionContext = /*#__PURE__*/React__default.createContext({
3150
3115
  as: 'h2'
3151
3116
  });
3152
- var StyledTrigger = /*#__PURE__*/React__default.forwardRef(function AccordionStyledTrigger(props, ref) {
3153
- var isExpanded = !!props['aria-expanded'];
3154
- var className = cn('w-full inline-flex justify-between items-center align-middle', 'focus:rounded-sm focus:border-blue focus:yt-focus', props.className);
3117
+ const StyledTrigger = /*#__PURE__*/React__default.forwardRef(function AccordionStyledTrigger(props, ref) {
3118
+ const isExpanded = !!props['aria-expanded'];
3119
+ const className = cn('w-full inline-flex justify-between items-center align-middle', 'focus:rounded-sm focus:border-blue focus:yt-focus', props.className);
3155
3120
  return React__default.createElement("button", Object.assign({}, props, {
3156
3121
  ref: ref,
3157
3122
  className: className
@@ -3159,12 +3124,13 @@ var StyledTrigger = /*#__PURE__*/React__default.forwardRef(function AccordionSty
3159
3124
  name: isExpanded ? 'chevron-up' : 'chevron-down'
3160
3125
  }));
3161
3126
  });
3162
- var Trigger = /*#__PURE__*/React__default.forwardRef(function AccordionTrigger(props, ref) {
3163
- var children = props.children;
3164
-
3165
- var _React$useContext = React__default.useContext(AccordionContext),
3166
- Heading = _React$useContext.as;
3167
-
3127
+ const Trigger = /*#__PURE__*/React__default.forwardRef(function AccordionTrigger(props, ref) {
3128
+ const {
3129
+ children
3130
+ } = props;
3131
+ const {
3132
+ as: Heading
3133
+ } = React__default.useContext(AccordionContext);
3168
3134
  return React__default.createElement(AccordionPrimitive.Header, {
3169
3135
  asChild: true
3170
3136
  }, React__default.createElement(Heading, {
@@ -3174,35 +3140,34 @@ var Trigger = /*#__PURE__*/React__default.forwardRef(function AccordionTrigger(p
3174
3140
  asChild: true
3175
3141
  }, React__default.createElement(StyledTrigger, null, children))));
3176
3142
  });
3177
- var Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(props, ref) {
3143
+ const Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(props, ref) {
3178
3144
  return React__default.createElement(AccordionPrimitive.Content, Object.assign({}, props, {
3179
3145
  ref: ref
3180
3146
  }));
3181
3147
  });
3182
3148
 
3183
- var Item = function Item(props) {
3184
- var id = props.id,
3185
- otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3186
-
3149
+ const Item = props => {
3150
+ const {
3151
+ id,
3152
+ ...otherProps
3153
+ } = props;
3187
3154
  return React__default.createElement(AccordionPrimitive.Item, Object.assign({}, otherProps, {
3188
3155
  value: id
3189
3156
  }));
3190
3157
  };
3191
3158
 
3192
- var Accordion = function Accordion(props) {
3193
- var id = props.id,
3194
- defaultId = props.defaultId,
3195
- onChange = props.onChange,
3196
- _props$as = props.as,
3197
- as = _props$as === void 0 ? 'h2' : _props$as,
3198
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2);
3199
-
3200
- var context = React__default.useMemo(function () {
3201
- return {
3202
- as: as
3203
- };
3204
- }, [as]);
3205
- var valueProps;
3159
+ const Accordion = props => {
3160
+ const {
3161
+ id,
3162
+ defaultId,
3163
+ onChange,
3164
+ as = 'h2',
3165
+ ...otherProps
3166
+ } = props;
3167
+ const context = React__default.useMemo(() => ({
3168
+ as
3169
+ }), [as]);
3170
+ let valueProps;
3206
3171
 
3207
3172
  if (defaultId) {
3208
3173
  valueProps = {
@@ -3215,8 +3180,8 @@ var Accordion = function Accordion(props) {
3215
3180
  };
3216
3181
  }
3217
3182
 
3218
- var type = Array.isArray(valueProps.defaultValue) || Array.isArray(valueProps.value) ? 'multiple' : 'single';
3219
- var className = cn('divide-y divide-grey', props.className);
3183
+ const type = Array.isArray(valueProps.defaultValue) || Array.isArray(valueProps.value) ? 'multiple' : 'single';
3184
+ const className = cn('divide-y divide-grey', props.className);
3220
3185
  return React__default.createElement(AccordionContext.Provider, {
3221
3186
  value: context
3222
3187
  }, React__default.createElement(AccordionPrimitive.Root, Object.assign({}, otherProps, valueProps, {
@@ -3283,19 +3248,20 @@ const getOutlineClasses = state => {
3283
3248
  }
3284
3249
  };
3285
3250
 
3286
- var _excluded$1 = ["children", "compact", "outline", "state"];
3287
- var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3288
- var _cn;
3289
-
3290
- var children = props.children,
3291
- _props$compact = props.compact,
3292
- compact = _props$compact === void 0 ? false : _props$compact,
3293
- _props$outline = props.outline,
3294
- outline = _props$outline === void 0 ? false : _props$outline,
3295
- state = props.state,
3296
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3297
-
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);
3251
+ const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3252
+ const {
3253
+ children,
3254
+ compact = false,
3255
+ outline = false,
3256
+ state,
3257
+ ...otherProps
3258
+ } = props;
3259
+ const className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5', {
3260
+ [getOutlineClasses(state)]: outline,
3261
+ [`border-transparent ${getStateClasses(state)}`]: !outline,
3262
+ 'h-2 w-2 min-w-0': compact,
3263
+ 'h-5 py-0 px-[0.354rem]': !compact
3264
+ }, props.className);
3299
3265
  return React.createElement("span", Object.assign({}, otherProps, {
3300
3266
  "aria-atomic": "true",
3301
3267
  "aria-live": "polite",
@@ -3383,7 +3349,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3383
3349
  });
3384
3350
 
3385
3351
  const getButtonClasses = () => {
3386
- return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] h-max leading-6 inline-flex items-center justify-center border';
3352
+ return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] h-max inline-flex items-center justify-center border';
3387
3353
  };
3388
3354
  const getAppearanceClasses = (value, icon = false) => {
3389
3355
  switch (value) {
@@ -3479,11 +3445,13 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref)
3479
3445
  }, className, ref);
3480
3446
  });
3481
3447
 
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);
3448
+ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3449
+ const {
3450
+ children,
3451
+ state,
3452
+ onClose
3453
+ } = props;
3454
+ const className = cn('bg-white relative flex items-center px-4 h-12 shadow-lg z-10', props.className);
3487
3455
  return React.createElement("div", {
3488
3456
  className: className,
3489
3457
  "data-taco": "banner",
@@ -3496,32 +3464,32 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3496
3464
  }) : null);
3497
3465
  });
3498
3466
 
3499
- var _excluded$2 = ["fluid"];
3500
- var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3501
- var fluid = props.fluid,
3502
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3503
-
3504
- var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3467
+ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3468
+ const {
3469
+ fluid,
3470
+ ...otherProps
3471
+ } = props;
3472
+ const className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3505
3473
  'cursor-not-allowed opacity-50': props.disabled,
3506
3474
  'focus:yt-focus active:focus:yt-focus': !props.disabled,
3507
3475
  'w-full': fluid
3508
3476
  }, props.className);
3509
- var children = otherProps.children; // add a chevron icon to menu buttons
3477
+ let children = otherProps.children; // add a chevron icon to menu buttons
3510
3478
 
3511
3479
  if (typeof otherProps.menu === 'function') {
3512
- children = Array.isArray(children) ? [].concat(children, [React.createElement(Icon, {
3480
+ children = Array.isArray(children) ? [...children, React.createElement(Icon, {
3513
3481
  key: "chevron-down",
3514
3482
  name: "chevron-down"
3515
- })]) : [children, React.createElement(Icon, {
3483
+ })] : [children, React.createElement(Icon, {
3516
3484
  key: "chevron-down",
3517
3485
  name: "chevron-down"
3518
3486
  })];
3519
3487
  }
3520
3488
 
3521
- return createButton(_extends({}, otherProps, {
3522
- children: children,
3489
+ return createButton({ ...otherProps,
3490
+ children,
3523
3491
  'data-taco': 'button'
3524
- }), className, ref);
3492
+ }, className, ref);
3525
3493
  });
3526
3494
 
3527
3495
  function useTimer(duration = 0, callback) {
@@ -3977,37 +3945,37 @@ const Provider = props => {
3977
3945
  const useTaco = () => React.useContext(Context);
3978
3946
  const useLocalization = () => useTaco().localization;
3979
3947
 
3980
- var _excluded$3 = ["onChange", "value"];
3948
+ const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
3949
+ className: "dot"
3950
+ }) : day.getDate();
3981
3951
 
3982
- var renderDay = function renderDay(day, modifiers) {
3983
- return modifiers.disabled ? React.createElement("span", {
3984
- className: "dot"
3985
- }) : day.getDate();
3986
- };
3987
-
3988
- var thisYear = /*#__PURE__*/new Date().getFullYear();
3989
- var years = [];
3952
+ const thisYear = /*#__PURE__*/new Date().getFullYear();
3953
+ const years = [];
3990
3954
 
3991
- for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
3955
+ for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
3992
3956
  years.push(i);
3993
3957
  }
3994
3958
 
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;
4001
-
4002
- var _useLocalization = useLocalization(),
4003
- _useLocalization$text = _useLocalization.texts.calendar,
4004
- actions = _useLocalization$text.actions,
4005
- months = _useLocalization$text.months;
3959
+ const Navbar = /*#__PURE__*/React.memo(({
3960
+ onMonthChange,
3961
+ onNextClick,
3962
+ onPreviousClick,
3963
+ value = new Date()
3964
+ }) => {
3965
+ const {
3966
+ texts: {
3967
+ calendar: {
3968
+ actions,
3969
+ months
3970
+ }
3971
+ }
3972
+ } = useLocalization();
4006
3973
 
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;
3974
+ const handleChange = function handleChange(event) {
3975
+ const {
3976
+ year,
3977
+ month
3978
+ } = event.target.form;
4011
3979
  onMonthChange(new Date(year.value, month.value));
4012
3980
  };
4013
3981
 
@@ -4020,59 +3988,49 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4020
3988
  name: "month",
4021
3989
  onChange: handleChange,
4022
3990
  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", {
3991
+ }, months.map((month, i) => React.createElement("option", {
3992
+ key: month,
3993
+ value: i
3994
+ }, month))), React.createElement("select", {
4029
3995
  className: "h-8 px-2",
4030
3996
  name: "year",
4031
3997
  onChange: handleChange,
4032
3998
  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, {
3999
+ }, years.map(year => React.createElement("option", {
4000
+ key: year,
4001
+ value: year
4002
+ }, String(year))))), React.createElement("div", null, React.createElement(IconButton, {
4039
4003
  appearance: "discrete",
4040
4004
  icon: "chevron-left",
4041
4005
  "aria-label": actions.previousMonth,
4042
- onClick: function onClick() {
4043
- return onPreviousClick();
4044
- },
4006
+ onClick: () => onPreviousClick(),
4045
4007
  rounded: true
4046
4008
  }), React.createElement(IconButton, {
4047
4009
  appearance: "discrete",
4048
4010
  icon: "chevron-right",
4049
4011
  "aria-label": actions.nextMonth,
4050
- onClick: function onClick() {
4051
- return onNextClick();
4052
- },
4012
+ onClick: () => onNextClick(),
4053
4013
  rounded: true
4054
4014
  })));
4055
4015
  });
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 () {
4016
+ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4017
+ const {
4018
+ onChange: handleChange,
4019
+ value,
4020
+ ...otherProps
4021
+ } = props;
4022
+ const {
4023
+ locale,
4024
+ texts
4025
+ } = useLocalization();
4026
+ const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
4027
+ React.useEffect(() => {
4070
4028
  if (visibleMonth !== value) {
4071
4029
  setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
4072
4030
  }
4073
4031
  }, [value]);
4074
4032
 
4075
- var handleDayClick = function handleDayClick(date, modifiers, event) {
4033
+ const handleDayClick = (date, modifiers, event) => {
4076
4034
  if (modifiers.outside || modifiers.disabled) {
4077
4035
  return;
4078
4036
  }
@@ -4080,8 +4038,8 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4080
4038
  handleChange(date, event);
4081
4039
  };
4082
4040
 
4083
- var handleCalendarClickToday = function handleCalendarClickToday() {
4084
- var today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4041
+ const handleCalendarClickToday = () => {
4042
+ const today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4085
4043
 
4086
4044
  today.setHours(12);
4087
4045
  today.setMinutes(0);
@@ -4089,7 +4047,7 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4089
4047
  handleChange(today);
4090
4048
  };
4091
4049
 
4092
- var className = cn('flex bg-white text-xs p-4', otherProps.className);
4050
+ const className = cn('flex bg-white text-xs p-4', otherProps.className);
4093
4051
  return React.createElement("div", {
4094
4052
  "data-taco": "calendar"
4095
4053
  }, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
@@ -4100,18 +4058,14 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4100
4058
  firstDayOfWeek: 1,
4101
4059
  months: texts.calendar.months,
4102
4060
  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
- },
4061
+ navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
4062
+ onMonthChange: setVisibleMonth,
4063
+ value: visibleMonth
4064
+ })),
4109
4065
  onDayClick: handleDayClick,
4110
4066
  onMonthChange: setVisibleMonth,
4111
4067
  onTodayButtonClick: handleCalendarClickToday,
4112
- captionElement: function captionElement() {
4113
- return null;
4114
- },
4068
+ captionElement: () => null,
4115
4069
  todayButton: texts.calendar.actions.today,
4116
4070
  showOutsideDays: true,
4117
4071
  renderDay: renderDay,
@@ -4120,32 +4074,30 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4120
4074
  })));
4121
4075
  });
4122
4076
 
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]', {
4077
+ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4078
+ const {
4079
+ checked,
4080
+ highlighted,
4081
+ indeterminate,
4082
+ invalid,
4083
+ label,
4084
+ onChange,
4085
+ ...otherProps
4086
+ } = props;
4087
+ const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem]', {
4134
4088
  'mr-2': !!label,
4135
4089
  'border-grey-dark text-blue focus:border-blue focus:yt-focus': !props.disabled && !invalid,
4136
4090
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4137
4091
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4138
4092
  'border-red text-red focus:border-red focus:yt-focus-red': invalid && !props.disabled
4139
4093
  });
4140
- var handleChange;
4094
+ let handleChange;
4141
4095
 
4142
4096
  if (onChange) {
4143
- handleChange = function handleChange(checked) {
4144
- return onChange(checked === 'indeterminate' ? false : checked);
4145
- };
4097
+ handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4146
4098
  }
4147
4099
 
4148
- var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4100
+ const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4149
4101
  "data-taco": "checkbox",
4150
4102
  checked: indeterminate ? 'indeterminate' : checked,
4151
4103
  className: className,
@@ -4159,7 +4111,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4159
4111
  })));
4160
4112
 
4161
4113
  if (label) {
4162
- var labelClassName = cn('flex items-center cursor-pointer', {
4114
+ const labelClassName = cn('flex items-center cursor-pointer', {
4163
4115
  'cursor-not-allowed text-grey-dark': props.disabled
4164
4116
  }, props.className);
4165
4117
  return React.createElement("label", {
@@ -5045,27 +4997,26 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5045
4997
  return dimensions;
5046
4998
  };
5047
4999
 
5048
- var _excluded$5 = ["className", "dialog", "style"];
5049
- var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5050
- var externalClassName = props.className,
5051
- dialog = props.dialog,
5052
- style = props.style,
5053
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
5054
-
5055
- var _useCombobox = useCombobox(otherProps, ref),
5056
- combobox = _useCombobox.combobox,
5057
- button = _useCombobox.button,
5058
- input = _useCombobox.input,
5059
- popover = _useCombobox.popover,
5060
- list = _useCombobox.list;
5061
-
5062
- var internalRef = React.useRef(null);
5063
-
5064
- var _useLocalization = useLocalization(),
5065
- texts = _useLocalization.texts;
5066
-
5067
- var selectDimensions = useBoundingClientRectListener(internalRef);
5068
- var className = cn('inline-flex relative', {
5000
+ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5001
+ const {
5002
+ className: externalClassName,
5003
+ dialog,
5004
+ style,
5005
+ ...otherProps
5006
+ } = props;
5007
+ const {
5008
+ combobox,
5009
+ button,
5010
+ input,
5011
+ popover,
5012
+ list
5013
+ } = useCombobox(otherProps, ref);
5014
+ const internalRef = React.useRef(null);
5015
+ const {
5016
+ texts
5017
+ } = useLocalization();
5018
+ const selectDimensions = useBoundingClientRectListener(internalRef);
5019
+ const className = cn('inline-flex relative', {
5069
5020
  'yt-combobox--inline': props.inline
5070
5021
  }, externalClassName);
5071
5022
  return React.createElement("span", {
@@ -5084,7 +5035,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5084
5035
  appearance: "discrete",
5085
5036
  className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
5086
5037
  icon: popover.open ? 'chevron-up' : 'chevron-down',
5087
- onClick: function onClick() {
5038
+ onClick: () => {
5088
5039
  var _input$ref$current;
5089
5040
 
5090
5041
  popover.onOpenChange(true);
@@ -5095,7 +5046,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5095
5046
  icon: "list-search",
5096
5047
  disabled: props.readOnly || props.disabled,
5097
5048
  dialog: dialog,
5098
- onFocus: function onFocus(event) {
5049
+ onFocus: event => {
5099
5050
  var _input$ref$current2;
5100
5051
 
5101
5052
  // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element
@@ -5108,7 +5059,7 @@ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5108
5059
  }) : undefined
5109
5060
  })))), React.createElement(PopoverPrimitive.Content, {
5110
5061
  align: "start",
5111
- onOpenAutoFocus: function onOpenAutoFocus(event) {
5062
+ onOpenAutoFocus: event => {
5112
5063
  event.preventDefault();
5113
5064
  },
5114
5065
  sideOffset: 4
@@ -5719,14 +5670,12 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5719
5670
  });
5720
5671
  Extra.displayName = 'DialogExtra';
5721
5672
 
5722
- var _excluded$6 = ["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) {
5673
+ const useSeparatedChildren = initialChildren => {
5674
+ return React.useMemo(() => {
5675
+ const children = [];
5676
+ let drawer;
5677
+ let extra;
5678
+ React.Children.toArray(initialChildren).forEach(child => {
5730
5679
  var _child$type, _child$type2;
5731
5680
 
5732
5681
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5741,55 +5690,39 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5741
5690
  }, [initialChildren]);
5742
5691
  };
5743
5692
 
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$6);
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]);
5693
+ const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5694
+ const {
5695
+ children: initialChildren,
5696
+ closeOnEscape = true,
5697
+ defaultOpen,
5698
+ draggable = false,
5699
+ onChange,
5700
+ onClose,
5701
+ open,
5702
+ showCloseButton = true,
5703
+ size = 'sm',
5704
+ trigger,
5705
+ ...otherProps
5706
+ } = props;
5707
+ const [children, drawer, extra] = useSeparatedChildren(initialChildren);
5708
+ const [drawerOpen, setDrawerOpen] = React.useState(false);
5709
+ const context = React.useMemo(() => ({
5710
+ closeOnEscape,
5711
+ draggable,
5712
+ drawer: {
5713
+ open: drawerOpen,
5714
+ toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
5715
+ },
5716
+ elements: {
5717
+ drawer,
5718
+ extra
5719
+ },
5720
+ onClose,
5721
+ props: otherProps,
5722
+ showCloseButton,
5723
+ size,
5724
+ ref
5725
+ }), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5793
5726
  return React.createElement(DialogContext.Provider, {
5794
5727
  value: context
5795
5728
  }, React.createElement(DialogPrimitive.Root, {
@@ -5806,19 +5739,18 @@ Dialog.Extra = Extra;
5806
5739
  Dialog.Drawer = Drawer;
5807
5740
  Dialog.Close = Close$2;
5808
5741
 
5809
- var _excluded$7 = ["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$7);
5817
-
5818
- var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5742
+ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5743
+ const {
5744
+ disabled,
5745
+ children,
5746
+ invalid = false,
5747
+ message,
5748
+ ...otherProps
5749
+ } = props;
5750
+ const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5819
5751
  'text-grey-dark': disabled
5820
5752
  }, props.className);
5821
- var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5753
+ const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5822
5754
  'text-grey-darkest': !invalid,
5823
5755
  'text-red': invalid,
5824
5756
  'opacity-50': disabled
@@ -6386,20 +6318,20 @@ const Icon$1 = ({
6386
6318
  const getAppearanceClasses$2 = appearance => {
6387
6319
  switch (appearance) {
6388
6320
  case 'primary':
6389
- return 'wcag-blue aria-disabled:text-blue-dark focus:wcag-blue-light';
6321
+ return 'wcag-blue aria-disabled:text-blue-dark hover:wcag-blue-light focus:wcag-blue-light';
6390
6322
 
6391
6323
  case 'danger':
6392
- return 'wcag-red aria-disabled:text-red-dark focus:wcag-red-light';
6324
+ return 'wcag-red aria-disabled:text-red-dark hover:wcag-red-light focus:wcag-red-light';
6393
6325
 
6394
6326
  case 'ghost':
6395
- return 'text-blue aria-disabled:text-grey focus:wcag-blue';
6327
+ return 'text-blue aria-disabled:text-grey hover:wcag-blue focus:wcag-blue';
6396
6328
 
6397
6329
  case 'discrete':
6398
- return 'text-black aria-disabled:text-grey focus:wcag-blue-lightest';
6330
+ return 'text-black aria-disabled:text-grey hover:wcag-blue-lightest focus:wcag-blue-lightest';
6399
6331
 
6400
6332
  case 'default':
6401
6333
  default:
6402
- return 'wcag-grey-light aria-disabled:text-grey-darker focus:wcag-grey-dark';
6334
+ return 'wcag-grey-light aria-disabled:text-grey-darker hover:wcag-grey-dark focus:wcag-grey-dark';
6403
6335
  }
6404
6336
  };
6405
6337