@economic/taco 1.1.9-alpha.0 → 1.1.9-alpha.1

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 (33) hide show
  1. package/dist/components/Tour/Tour.d.ts +2 -0
  2. package/dist/esm/components/Badge/Badge.js +14 -14
  3. package/dist/esm/components/Badge/Badge.js.map +1 -1
  4. package/dist/esm/components/Calendar/Calendar.js +71 -56
  5. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  6. package/dist/esm/components/Card/Card.js +12 -13
  7. package/dist/esm/components/Card/Card.js.map +1 -1
  8. package/dist/esm/components/Checkbox/Checkbox.js +18 -15
  9. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  10. package/dist/esm/components/Combobox/Combobox.js +25 -23
  11. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  12. package/dist/esm/components/Datepicker/Datepicker.js +52 -48
  13. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  14. package/dist/esm/components/Dialog/Dialog.js +58 -39
  15. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  16. package/dist/esm/components/Field/Field.js +12 -10
  17. package/dist/esm/components/Field/Field.js.map +1 -1
  18. package/dist/esm/components/Form/Form.js +8 -6
  19. package/dist/esm/components/Form/Form.js.map +1 -1
  20. package/dist/esm/components/Group/Group.js +8 -6
  21. package/dist/esm/components/Group/Group.js.map +1 -1
  22. package/dist/esm/components/Hanger/Hanger.js +35 -27
  23. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  24. package/dist/esm/components/Tour/Tour.js +2 -0
  25. package/dist/esm/components/Tour/Tour.js.map +1 -1
  26. package/dist/taco.cjs.development.js +306 -259
  27. package/dist/taco.cjs.development.js.map +1 -1
  28. package/dist/taco.cjs.production.min.js +1 -1
  29. package/dist/taco.cjs.production.min.js.map +1 -1
  30. package/dist/utils/tailwind.d.ts +1 -1
  31. package/package.json +2 -2
  32. package/tailwind.config.js +1 -1
  33. package/types.json +7 -1
@@ -3349,20 +3349,19 @@ const getOutlineClasses = state => {
3349
3349
  }
3350
3350
  };
3351
3351
 
3352
- const Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3353
- const {
3354
- children,
3355
- compact = false,
3356
- outline = false,
3357
- state,
3358
- ...otherProps
3359
- } = props;
3360
- const className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5', {
3361
- [getOutlineClasses(state)]: outline,
3362
- [`border-transparent ${getStateClasses(state)}`]: !outline,
3363
- 'h-2 w-2 min-w-0': compact,
3364
- 'h-5 py-0 px-1.5': !compact
3365
- }, props.className);
3352
+ var _excluded$1 = ["children", "compact", "outline", "state"];
3353
+ var Badge = /*#__PURE__*/React.forwardRef(function Badge(props, ref) {
3354
+ var _cn;
3355
+
3356
+ var children = props.children,
3357
+ _props$compact = props.compact,
3358
+ compact = _props$compact === void 0 ? false : _props$compact,
3359
+ _props$outline = props.outline,
3360
+ outline = _props$outline === void 0 ? false : _props$outline,
3361
+ state = props.state,
3362
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3363
+
3364
+ var className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5', (_cn = {}, _cn[getOutlineClasses(state)] = outline, _cn["border-transparent " + getStateClasses(state)] = !outline, _cn['h-2 w-2 min-w-0'] = compact, _cn['h-5 py-0 px-1.5'] = !compact, _cn), props.className);
3366
3365
  return React.createElement("span", Object.assign({}, otherProps, {
3367
3366
  "aria-atomic": "true",
3368
3367
  "aria-live": "polite",
@@ -3563,10 +3562,10 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3563
3562
  }) : null);
3564
3563
  });
3565
3564
 
3566
- var _excluded$1 = ["fluid"];
3565
+ var _excluded$2 = ["fluid"];
3567
3566
  var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3568
3567
  var fluid = props.fluid,
3569
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3568
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$2);
3570
3569
 
3571
3570
  var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3572
3571
  'cursor-not-allowed opacity-50': props.disabled,
@@ -4044,37 +4043,37 @@ const Provider = props => {
4044
4043
  const useTaco = () => React.useContext(Context);
4045
4044
  const useLocalization = () => useTaco().localization;
4046
4045
 
4047
- const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
4048
- className: "dot"
4049
- }) : day.getDate();
4046
+ var _excluded$3 = ["onChange", "value"];
4047
+
4048
+ var renderDay = function renderDay(day, modifiers) {
4049
+ return modifiers.disabled ? React.createElement("span", {
4050
+ className: "dot"
4051
+ }) : day.getDate();
4052
+ };
4050
4053
 
4051
- const thisYear = /*#__PURE__*/new Date().getFullYear();
4052
- const years = [];
4054
+ var thisYear = /*#__PURE__*/new Date().getFullYear();
4055
+ var years = [];
4053
4056
 
4054
- for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
4057
+ for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
4055
4058
  years.push(i);
4056
4059
  }
4057
4060
 
4058
- const Navbar = /*#__PURE__*/React.memo(({
4059
- onMonthChange,
4060
- onNextClick,
4061
- onPreviousClick,
4062
- value = new Date()
4063
- }) => {
4064
- const {
4065
- texts: {
4066
- calendar: {
4067
- actions,
4068
- months
4069
- }
4070
- }
4071
- } = useLocalization();
4061
+ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4062
+ var onMonthChange = _ref.onMonthChange,
4063
+ onNextClick = _ref.onNextClick,
4064
+ onPreviousClick = _ref.onPreviousClick,
4065
+ _ref$value = _ref.value,
4066
+ value = _ref$value === void 0 ? new Date() : _ref$value;
4072
4067
 
4073
- const handleChange = function handleChange(event) {
4074
- const {
4075
- year,
4076
- month
4077
- } = event.target.form;
4068
+ var _useLocalization = useLocalization(),
4069
+ _useLocalization$text = _useLocalization.texts.calendar,
4070
+ actions = _useLocalization$text.actions,
4071
+ months = _useLocalization$text.months;
4072
+
4073
+ var handleChange = function handleChange(event) {
4074
+ var _event$target$form = event.target.form,
4075
+ year = _event$target$form.year,
4076
+ month = _event$target$form.month;
4078
4077
  onMonthChange(new Date(year.value, month.value));
4079
4078
  };
4080
4079
 
@@ -4087,49 +4086,59 @@ const Navbar = /*#__PURE__*/React.memo(({
4087
4086
  name: "month",
4088
4087
  onChange: handleChange,
4089
4088
  value: value.getMonth()
4090
- }, months.map((month, i) => React.createElement("option", {
4091
- key: month,
4092
- value: i
4093
- }, month))), React.createElement("select", {
4089
+ }, months.map(function (month, i) {
4090
+ return React.createElement("option", {
4091
+ key: month,
4092
+ value: i
4093
+ }, month);
4094
+ })), React.createElement("select", {
4094
4095
  className: "h-8 px-2",
4095
4096
  name: "year",
4096
4097
  onChange: handleChange,
4097
4098
  value: value.getFullYear()
4098
- }, years.map(year => React.createElement("option", {
4099
- key: year,
4100
- value: year
4101
- }, String(year))))), React.createElement("div", null, React.createElement(IconButton, {
4099
+ }, years.map(function (year) {
4100
+ return React.createElement("option", {
4101
+ key: year,
4102
+ value: year
4103
+ }, String(year));
4104
+ }))), React.createElement("div", null, React.createElement(IconButton, {
4102
4105
  appearance: "discrete",
4103
4106
  icon: "chevron-left",
4104
4107
  "aria-label": actions.previousMonth,
4105
- onClick: () => onPreviousClick(),
4108
+ onClick: function onClick() {
4109
+ return onPreviousClick();
4110
+ },
4106
4111
  rounded: true
4107
4112
  }), React.createElement(IconButton, {
4108
4113
  appearance: "discrete",
4109
4114
  icon: "chevron-right",
4110
4115
  "aria-label": actions.nextMonth,
4111
- onClick: () => onNextClick(),
4116
+ onClick: function onClick() {
4117
+ return onNextClick();
4118
+ },
4112
4119
  rounded: true
4113
4120
  })));
4114
4121
  });
4115
- const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4116
- const {
4117
- onChange: handleChange,
4118
- value,
4119
- ...otherProps
4120
- } = props;
4121
- const {
4122
- locale,
4123
- texts
4124
- } = useLocalization();
4125
- const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
4126
- React.useEffect(() => {
4122
+ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4123
+ var handleChange = props.onChange,
4124
+ value = props.value,
4125
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
4126
+
4127
+ var _useLocalization2 = useLocalization(),
4128
+ locale = _useLocalization2.locale,
4129
+ texts = _useLocalization2.texts;
4130
+
4131
+ var _React$useState = React.useState(value !== null && value !== void 0 ? value : new Date()),
4132
+ visibleMonth = _React$useState[0],
4133
+ setVisibleMonth = _React$useState[1];
4134
+
4135
+ React.useEffect(function () {
4127
4136
  if (visibleMonth !== value) {
4128
4137
  setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
4129
4138
  }
4130
4139
  }, [value]);
4131
4140
 
4132
- const handleDayClick = (date, modifiers, event) => {
4141
+ var handleDayClick = function handleDayClick(date, modifiers, event) {
4133
4142
  if (modifiers.outside || modifiers.disabled) {
4134
4143
  return;
4135
4144
  }
@@ -4137,8 +4146,8 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4137
4146
  handleChange(date, event);
4138
4147
  };
4139
4148
 
4140
- const handleCalendarClickToday = () => {
4141
- const today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4149
+ var handleCalendarClickToday = function handleCalendarClickToday() {
4150
+ var today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4142
4151
 
4143
4152
  today.setHours(12);
4144
4153
  today.setMinutes(0);
@@ -4146,7 +4155,7 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4146
4155
  handleChange(today);
4147
4156
  };
4148
4157
 
4149
- const className = cn('flex bg-white text-xs p-4', otherProps.className);
4158
+ var className = cn('flex bg-white text-xs p-4', otherProps.className);
4150
4159
  return React.createElement("div", {
4151
4160
  "data-taco": "calendar"
4152
4161
  }, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
@@ -4157,14 +4166,18 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4157
4166
  firstDayOfWeek: 1,
4158
4167
  months: texts.calendar.months,
4159
4168
  weekdaysShort: texts.calendar.weekdaysShort,
4160
- navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
4161
- onMonthChange: setVisibleMonth,
4162
- value: visibleMonth
4163
- })),
4169
+ navbarElement: function navbarElement(navProps) {
4170
+ return React.createElement(Navbar, Object.assign({}, navProps, {
4171
+ onMonthChange: setVisibleMonth,
4172
+ value: visibleMonth
4173
+ }));
4174
+ },
4164
4175
  onDayClick: handleDayClick,
4165
4176
  onMonthChange: setVisibleMonth,
4166
4177
  onTodayButtonClick: handleCalendarClickToday,
4167
- captionElement: () => null,
4178
+ captionElement: function captionElement() {
4179
+ return null;
4180
+ },
4168
4181
  todayButton: texts.calendar.actions.today,
4169
4182
  showOutsideDays: true,
4170
4183
  renderDay: renderDay,
@@ -4173,30 +4186,32 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4173
4186
  })));
4174
4187
  });
4175
4188
 
4176
- const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4177
- const {
4178
- checked,
4179
- highlighted,
4180
- indeterminate,
4181
- invalid,
4182
- label,
4183
- onChange,
4184
- ...otherProps
4185
- } = props;
4186
- const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4189
+ var _excluded$4 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4190
+ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4191
+ var checked = props.checked,
4192
+ highlighted = props.highlighted,
4193
+ indeterminate = props.indeterminate,
4194
+ invalid = props.invalid,
4195
+ label = props.label,
4196
+ onChange = props.onChange,
4197
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
4198
+
4199
+ var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4187
4200
  props.className, {
4188
4201
  'border-grey-dark text-blue hover:text-blue-light focus:border-blue focus:hover:border-blue-light': !props.disabled && !invalid,
4189
4202
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4190
4203
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4191
4204
  'border-red text-red hover:text-red-light hover:border-red-light focus:border-red focus:hover:border-red-light': invalid && !props.disabled
4192
4205
  });
4193
- let handleChange;
4206
+ var handleChange;
4194
4207
 
4195
4208
  if (onChange) {
4196
- handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4209
+ handleChange = function handleChange(checked) {
4210
+ return onChange(checked === 'indeterminate' ? false : checked);
4211
+ };
4197
4212
  }
4198
4213
 
4199
- const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4214
+ var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4200
4215
  "data-taco": "checkbox",
4201
4216
  checked: indeterminate ? 'indeterminate' : checked,
4202
4217
  className: className,
@@ -4210,7 +4225,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4210
4225
  })));
4211
4226
 
4212
4227
  if (label) {
4213
- const labelClassName = cn('flex items-center cursor-pointer gap-2', {
4228
+ var labelClassName = cn('flex items-center cursor-pointer gap-2', {
4214
4229
  'cursor-not-allowed text-grey-dark': props.disabled
4215
4230
  }, props.className);
4216
4231
  return React.createElement("label", {
@@ -5091,26 +5106,27 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5091
5106
  return dimensions;
5092
5107
  };
5093
5108
 
5094
- const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5095
- const {
5096
- className: externalClassName,
5097
- dialog,
5098
- style,
5099
- ...otherProps
5100
- } = props;
5101
- const {
5102
- combobox,
5103
- button,
5104
- input,
5105
- popover,
5106
- list
5107
- } = useCombobox(otherProps, ref);
5108
- const internalRef = React.useRef(null);
5109
- const {
5110
- texts
5111
- } = useLocalization();
5112
- const selectDimensions = useBoundingClientRectListener(internalRef);
5113
- const className = cn('inline-flex relative', {
5109
+ var _excluded$5 = ["className", "dialog", "style"];
5110
+ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5111
+ var externalClassName = props.className,
5112
+ dialog = props.dialog,
5113
+ style = props.style,
5114
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
5115
+
5116
+ var _useCombobox = useCombobox(otherProps, ref),
5117
+ combobox = _useCombobox.combobox,
5118
+ button = _useCombobox.button,
5119
+ input = _useCombobox.input,
5120
+ popover = _useCombobox.popover,
5121
+ list = _useCombobox.list;
5122
+
5123
+ var internalRef = React.useRef(null);
5124
+
5125
+ var _useLocalization = useLocalization(),
5126
+ texts = _useLocalization.texts;
5127
+
5128
+ var selectDimensions = useBoundingClientRectListener(internalRef);
5129
+ var className = cn('inline-flex relative', {
5114
5130
  'yt-combobox--inline': props.inline
5115
5131
  }, externalClassName);
5116
5132
  return React.createElement("span", {
@@ -5129,7 +5145,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5129
5145
  appearance: "discrete",
5130
5146
  className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
5131
5147
  icon: popover.open ? 'chevron-up' : 'chevron-down',
5132
- onClick: () => {
5148
+ onClick: function onClick() {
5133
5149
  var _input$ref$current;
5134
5150
 
5135
5151
  popover.onOpenChange(true);
@@ -5140,7 +5156,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5140
5156
  icon: "list-search",
5141
5157
  disabled: props.readOnly || props.disabled,
5142
5158
  dialog: dialog,
5143
- onFocus: event => {
5159
+ onFocus: function onFocus(event) {
5144
5160
  var _input$ref$current2;
5145
5161
 
5146
5162
  // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element
@@ -5153,7 +5169,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5153
5169
  }) : undefined
5154
5170
  })))), React.createElement(PopoverPrimitive.Content, {
5155
5171
  align: "start",
5156
- onOpenAutoFocus: event => {
5172
+ onOpenAutoFocus: function onOpenAutoFocus(event) {
5157
5173
  event.preventDefault();
5158
5174
  },
5159
5175
  sideOffset: 4
@@ -5463,23 +5479,23 @@ Popover.Trigger = Trigger$1;
5463
5479
  Popover.Content = Content$1;
5464
5480
  Popover.Close = Close$1;
5465
5481
 
5466
- const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5467
- const {
5468
- className: externalClassName,
5469
- onReset: handleReset,
5470
- style,
5471
- shortcuts,
5472
- shortcutsText,
5473
- ...otherProps
5474
- } = props;
5475
- const {
5476
- calendar,
5477
- input
5478
- } = useDatepicker(otherProps, ref);
5479
- const {
5480
- texts
5481
- } = useLocalization();
5482
- const className = cn('inline-flex w-full text-black font-normal', externalClassName);
5482
+ var _excluded$6 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5483
+ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5484
+ var externalClassName = props.className,
5485
+ handleReset = props.onReset,
5486
+ style = props.style,
5487
+ shortcuts = props.shortcuts,
5488
+ shortcutsText = props.shortcutsText,
5489
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
5490
+
5491
+ var _useDatepicker = useDatepicker(otherProps, ref),
5492
+ calendar = _useDatepicker.calendar,
5493
+ input = _useDatepicker.input;
5494
+
5495
+ var _useLocalization = useLocalization(),
5496
+ texts = _useLocalization.texts;
5497
+
5498
+ var className = cn('inline-flex w-full text-black font-normal', externalClassName);
5483
5499
  return React.createElement("span", {
5484
5500
  className: className,
5485
5501
  "data-taco": "datepicker",
@@ -5489,37 +5505,40 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
5489
5505
  "aria-label": texts.datepicker.expand,
5490
5506
  disabled: input.disabled || input.readOnly,
5491
5507
  icon: "calendar"
5492
- })), React.createElement(Popover.Content, null, ({
5493
- close
5494
- }) => React.createElement("div", {
5495
- className: "-m-3 flex"
5496
- }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5497
- onChange: (date, event) => {
5498
- calendar.onChange(date, event);
5499
- close();
5500
- },
5501
- tabIndex: -1
5502
- })), shortcuts && React.createElement("div", {
5503
- className: "border-grey-dark flex flex-col border-l"
5504
- }, React.createElement("span", {
5505
- className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
5506
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map((shortcut, i) => React.createElement("li", {
5507
- key: i
5508
- }, React.createElement("button", {
5509
- className: "hover:bg-grey-light flex w-full items-start px-4 py-1 text-xs",
5510
- onClick: event => {
5511
- event.persist();
5512
- shortcut.onClick(event);
5513
- close();
5514
- }
5515
- }, shortcut.text)))), handleReset && React.createElement("button", {
5516
- className: "text-blue hover:text-blue-light my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs",
5517
- onClick: event => {
5518
- event.persist();
5519
- handleReset(event);
5520
- close();
5521
- }
5522
- }, texts.datepicker.clear)))))
5508
+ })), React.createElement(Popover.Content, null, function (_ref) {
5509
+ var close = _ref.close;
5510
+ return React.createElement("div", {
5511
+ className: "-m-3 flex"
5512
+ }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5513
+ onChange: function onChange(date, event) {
5514
+ calendar.onChange(date, event);
5515
+ close();
5516
+ },
5517
+ tabIndex: -1
5518
+ })), shortcuts && React.createElement("div", {
5519
+ className: "border-grey-dark flex flex-col border-l"
5520
+ }, React.createElement("span", {
5521
+ className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
5522
+ }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map(function (shortcut, i) {
5523
+ return React.createElement("li", {
5524
+ key: i
5525
+ }, React.createElement("button", {
5526
+ className: "hover:bg-grey-light flex w-full items-start px-4 py-1 text-xs",
5527
+ onClick: function onClick(event) {
5528
+ event.persist();
5529
+ shortcut.onClick(event);
5530
+ close();
5531
+ }
5532
+ }, shortcut.text));
5533
+ })), handleReset && React.createElement("button", {
5534
+ className: "text-blue hover:text-blue-light my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs",
5535
+ onClick: function onClick(event) {
5536
+ event.persist();
5537
+ handleReset(event);
5538
+ close();
5539
+ }
5540
+ }, texts.datepicker.clear)));
5541
+ }))
5523
5542
  })));
5524
5543
  });
5525
5544
 
@@ -5762,12 +5781,14 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5762
5781
  });
5763
5782
  Extra.displayName = 'DialogExtra';
5764
5783
 
5765
- const useSeparatedChildren = initialChildren => {
5766
- return React.useMemo(() => {
5767
- const children = [];
5768
- let drawer;
5769
- let extra;
5770
- React.Children.toArray(initialChildren).forEach(child => {
5784
+ var _excluded$7 = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5785
+
5786
+ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5787
+ return React.useMemo(function () {
5788
+ var children = [];
5789
+ var drawer;
5790
+ var extra;
5791
+ React.Children.toArray(initialChildren).forEach(function (child) {
5771
5792
  var _child$type, _child$type2;
5772
5793
 
5773
5794
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5782,39 +5803,55 @@ const useSeparatedChildren = initialChildren => {
5782
5803
  }, [initialChildren]);
5783
5804
  };
5784
5805
 
5785
- const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5786
- const {
5787
- children: initialChildren,
5788
- closeOnEscape = true,
5789
- defaultOpen,
5790
- draggable = false,
5791
- onChange,
5792
- onClose,
5793
- open,
5794
- showCloseButton = true,
5795
- size = 'sm',
5796
- trigger,
5797
- ...otherProps
5798
- } = props;
5799
- const [children, drawer, extra] = useSeparatedChildren(initialChildren);
5800
- const [drawerOpen, setDrawerOpen] = React.useState(false);
5801
- const context = React.useMemo(() => ({
5802
- closeOnEscape,
5803
- draggable,
5804
- drawer: {
5805
- open: drawerOpen,
5806
- toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
5807
- },
5808
- elements: {
5809
- drawer,
5810
- extra
5811
- },
5812
- onClose,
5813
- props: otherProps,
5814
- showCloseButton,
5815
- size,
5816
- ref
5817
- }), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5806
+ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5807
+ var initialChildren = props.children,
5808
+ _props$closeOnEscape = props.closeOnEscape,
5809
+ closeOnEscape = _props$closeOnEscape === void 0 ? true : _props$closeOnEscape,
5810
+ defaultOpen = props.defaultOpen,
5811
+ _props$draggable = props.draggable,
5812
+ draggable = _props$draggable === void 0 ? false : _props$draggable,
5813
+ onChange = props.onChange,
5814
+ onClose = props.onClose,
5815
+ open = props.open,
5816
+ _props$showCloseButto = props.showCloseButton,
5817
+ showCloseButton = _props$showCloseButto === void 0 ? true : _props$showCloseButto,
5818
+ _props$size = props.size,
5819
+ size = _props$size === void 0 ? 'sm' : _props$size,
5820
+ trigger = props.trigger,
5821
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
5822
+
5823
+ var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5824
+ children = _useSeparatedChildren[0],
5825
+ drawer = _useSeparatedChildren[1],
5826
+ extra = _useSeparatedChildren[2];
5827
+
5828
+ var _React$useState = React.useState(false),
5829
+ drawerOpen = _React$useState[0],
5830
+ setDrawerOpen = _React$useState[1];
5831
+
5832
+ var context = React.useMemo(function () {
5833
+ return {
5834
+ closeOnEscape: closeOnEscape,
5835
+ draggable: draggable,
5836
+ drawer: {
5837
+ open: drawerOpen,
5838
+ toggle: function toggle() {
5839
+ return setDrawerOpen(function (isDrawerOpen) {
5840
+ return !isDrawerOpen;
5841
+ });
5842
+ }
5843
+ },
5844
+ elements: {
5845
+ drawer: drawer,
5846
+ extra: extra
5847
+ },
5848
+ onClose: onClose,
5849
+ props: otherProps,
5850
+ showCloseButton: showCloseButton,
5851
+ size: size,
5852
+ ref: ref
5853
+ };
5854
+ }, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5818
5855
  return React.createElement(DialogContext.Provider, {
5819
5856
  value: context
5820
5857
  }, React.createElement(DialogPrimitive.Root, {
@@ -5831,18 +5868,19 @@ Dialog.Extra = Extra;
5831
5868
  Dialog.Drawer = Drawer;
5832
5869
  Dialog.Close = Close$2;
5833
5870
 
5834
- const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5835
- const {
5836
- disabled,
5837
- children,
5838
- invalid = false,
5839
- message,
5840
- ...otherProps
5841
- } = props;
5842
- const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5871
+ var _excluded$8 = ["disabled", "children", "invalid", "message"];
5872
+ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5873
+ var disabled = props.disabled,
5874
+ children = props.children,
5875
+ _props$invalid = props.invalid,
5876
+ invalid = _props$invalid === void 0 ? false : _props$invalid,
5877
+ message = props.message,
5878
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5879
+
5880
+ var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5843
5881
  'text-grey-dark': disabled
5844
5882
  }, props.className);
5845
- const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5883
+ var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5846
5884
  'text-grey-darkest': !invalid,
5847
5885
  'text-red': invalid,
5848
5886
  'opacity-50': disabled
@@ -5857,12 +5895,13 @@ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5857
5895
  }, message));
5858
5896
  });
5859
5897
 
5860
- const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5861
- const {
5862
- horizontal = false,
5863
- ...otherProps
5864
- } = props;
5865
- const className = cn('yt-form', {
5898
+ var _excluded$9 = ["horizontal"];
5899
+ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5900
+ var _props$horizontal = props.horizontal,
5901
+ horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5902
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
5903
+
5904
+ var className = cn('yt-form', {
5866
5905
  'yt-form--horizontal flex flex-wrap': horizontal
5867
5906
  }, props.className);
5868
5907
  return React.createElement("form", Object.assign({}, otherProps, {
@@ -5872,12 +5911,13 @@ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5872
5911
  }));
5873
5912
  });
5874
5913
 
5875
- const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5876
- const {
5877
- as: Tag = 'span',
5878
- ...otherProps
5879
- } = props;
5880
- const className = cn('flex ', props.className);
5914
+ var _excluded$a = ["as"];
5915
+ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5916
+ var _props$as = props.as,
5917
+ Tag = _props$as === void 0 ? 'span' : _props$as,
5918
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
5919
+
5920
+ var className = cn('flex ', props.className);
5881
5921
  return React.createElement(Tag, Object.assign({}, otherProps, {
5882
5922
  className: className,
5883
5923
  "data-taco": "group",
@@ -5885,18 +5925,19 @@ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5885
5925
  }));
5886
5926
  });
5887
5927
 
5888
- const HangerContext = /*#__PURE__*/React.createContext({
5928
+ var _excluded$b = ["anchor", "children", "defaultOpen"];
5929
+ var HangerContext = /*#__PURE__*/React.createContext({
5889
5930
  props: {},
5890
5931
  ref: null
5891
5932
  });
5892
- const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5933
+ var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5893
5934
  var _props$children;
5894
5935
 
5895
- const context = React.useContext(HangerContext);
5896
- let children = props.children;
5936
+ var context = React.useContext(HangerContext);
5937
+ var children = props.children;
5897
5938
 
5898
5939
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5899
- 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`);
5940
+ 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");
5900
5941
  children = React.createElement("span", null, props.children);
5901
5942
  }
5902
5943
 
@@ -5906,21 +5947,22 @@ const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5906
5947
  asChild: true
5907
5948
  }));
5908
5949
  });
5909
- const Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
5910
- const className = cn('mb-1 text-base font-bold flex w-full', props.className);
5950
+ var Title$1 = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
5951
+ var className = cn('mb-1 text-base font-bold flex w-full', props.className);
5911
5952
  return React.createElement("span", Object.assign({}, props, {
5912
5953
  className: className,
5913
5954
  ref: ref
5914
5955
  }));
5915
5956
  });
5916
- const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5917
- const context = React.useContext(HangerContext);
5918
- const {
5919
- texts
5920
- } = useLocalization();
5921
- const className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent max-w-sm', props.className);
5957
+ var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5958
+ var context = React.useContext(HangerContext);
5959
+
5960
+ var _useLocalization = useLocalization(),
5961
+ texts = _useLocalization.texts;
5962
+
5963
+ var className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent max-w-sm', props.className);
5922
5964
 
5923
- const handleInteractOutside = event => {
5965
+ var handleInteractOutside = function handleInteractOutside(event) {
5924
5966
  event.preventDefault();
5925
5967
  };
5926
5968
 
@@ -5942,20 +5984,25 @@ const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, re
5942
5984
  onClick: context.props.onClose
5943
5985
  })));
5944
5986
  });
5945
- const Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5946
- const {
5947
- anchor,
5948
- children,
5949
- defaultOpen = true,
5950
- ...otherProps
5951
- } = props;
5952
- const context = React.useMemo(() => ({
5953
- props: otherProps,
5954
- ref
5955
- }), [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5987
+ var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5988
+ var anchor = props.anchor,
5989
+ children = props.children,
5990
+ _props$defaultOpen = props.defaultOpen,
5991
+ defaultOpen = _props$defaultOpen === void 0 ? true : _props$defaultOpen,
5992
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5993
+
5994
+ var context = React.useMemo(function () {
5995
+ return {
5996
+ props: otherProps,
5997
+ ref: ref
5998
+ };
5999
+ }, [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5956
6000
 
5957
- const [open, setOpen] = React.useState(false);
5958
- React.useEffect(() => {
6001
+ var _React$useState = React.useState(false),
6002
+ open = _React$useState[0],
6003
+ setOpen = _React$useState[1];
6004
+
6005
+ React.useEffect(function () {
5959
6006
  if (defaultOpen) {
5960
6007
  setOpen(defaultOpen);
5961
6008
  }
@@ -9318,6 +9365,7 @@ const Tour = props => {
9318
9365
  spotlightClicks,
9319
9366
  disableCloseOnEsc: disableTourSkipOnEsc,
9320
9367
  disableScrollParentFix = false,
9368
+ scrollOffset,
9321
9369
  ...rest
9322
9370
  } = props;
9323
9371
  const steps = React.useMemo(() => {
@@ -9374,6 +9422,7 @@ const Tour = props => {
9374
9422
  spotlightClicks: spotlightClicks,
9375
9423
  disableScrollParentFix: disableScrollParentFix,
9376
9424
  callback: callback,
9425
+ scrollOffset: scrollOffset,
9377
9426
  styles: {
9378
9427
  /** style beacon */
9379
9428
  options: {
@@ -9409,12 +9458,12 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9409
9458
  }, [ref, callback]);
9410
9459
  };
9411
9460
 
9412
- const Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
9413
- const {
9414
- noPadding,
9415
- ...props
9416
- } = externalProps;
9417
- const className = cn('flex-grow overflow-auto', {
9461
+ var _excluded$c = ["noPadding"];
9462
+ var Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
9463
+ var noPadding = externalProps.noPadding,
9464
+ props = _objectWithoutPropertiesLoose(externalProps, _excluded$c);
9465
+
9466
+ var className = cn('flex-grow overflow-auto', {
9418
9467
  'mx-4 mb-4': !noPadding
9419
9468
  }, props.className);
9420
9469
  return React.createElement("div", Object.assign({}, props, {
@@ -9422,13 +9471,11 @@ const Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalPro
9422
9471
  ref: ref
9423
9472
  }));
9424
9473
  });
9425
- const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
9426
- const {
9427
- title,
9428
- menu,
9429
- children
9430
- } = props;
9431
- const className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
9474
+ var Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
9475
+ var title = props.title,
9476
+ menu = props.menu,
9477
+ children = props.children;
9478
+ var className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
9432
9479
  return React.createElement("div", {
9433
9480
  className: className,
9434
9481
  "data-taco": "card",