@economic/taco 0.0.31-alpha.0 → 0.0.31-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 (76) hide show
  1. package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +19 -1
  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 +5 -7
  6. package/dist/esm/components/Banner/Banner.js.map +1 -1
  7. package/dist/esm/components/Button/Button.js +13 -12
  8. package/dist/esm/components/Button/Button.js.map +1 -1
  9. package/dist/esm/components/Calendar/Calendar.js +71 -56
  10. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  11. package/dist/esm/components/Checkbox/Checkbox.js +18 -15
  12. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  13. package/dist/esm/components/Combobox/Combobox.js +25 -23
  14. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  15. package/dist/esm/components/Datepicker/Datepicker.js +52 -48
  16. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  17. package/dist/esm/components/Dialog/Dialog.js +58 -39
  18. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  19. package/dist/esm/components/Field/Field.js +12 -10
  20. package/dist/esm/components/Field/Field.js.map +1 -1
  21. package/dist/esm/components/Form/Form.js +8 -6
  22. package/dist/esm/components/Form/Form.js.map +1 -1
  23. package/dist/esm/components/Group/Group.js +8 -6
  24. package/dist/esm/components/Group/Group.js.map +1 -1
  25. package/dist/esm/components/Hanger/Hanger.js +33 -25
  26. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  27. package/dist/esm/components/Icon/Icon.js +8 -7
  28. package/dist/esm/components/Icon/Icon.js.map +1 -1
  29. package/dist/esm/components/IconButton/IconButton.js +11 -9
  30. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  31. package/dist/esm/components/Input/Input.js +24 -26
  32. package/dist/esm/components/Input/Input.js.map +1 -1
  33. package/dist/esm/components/Listbox/Listbox.js +25 -24
  34. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  35. package/dist/esm/components/Menu/Menu.js +43 -20
  36. package/dist/esm/components/Menu/Menu.js.map +1 -1
  37. package/dist/esm/components/Navigation/Navigation.js +44 -35
  38. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  39. package/dist/esm/components/Pagination/Pagination.js +56 -39
  40. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  41. package/dist/esm/components/Popover/Popover.js +34 -29
  42. package/dist/esm/components/Popover/Popover.js.map +1 -1
  43. package/dist/esm/components/Progress/Progress.js +15 -11
  44. package/dist/esm/components/Progress/Progress.js.map +1 -1
  45. package/dist/esm/components/Provider/Provider.js +18 -13
  46. package/dist/esm/components/Provider/Provider.js.map +1 -1
  47. package/dist/esm/components/RadioGroup/RadioGroup.js +57 -45
  48. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  49. package/dist/esm/components/SearchInput/SearchInput.js +11 -10
  50. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  51. package/dist/esm/components/Select/Select.js +31 -30
  52. package/dist/esm/components/Select/Select.js.map +1 -1
  53. package/dist/esm/components/Spinner/Spinner.js +19 -12
  54. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  55. package/dist/esm/components/Switch/Switch.js +10 -9
  56. package/dist/esm/components/Switch/Switch.js.map +1 -1
  57. package/dist/esm/components/Tabs/Tabs.js +27 -25
  58. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  59. package/dist/esm/components/Textarea/Textarea.js +9 -11
  60. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  61. package/dist/esm/components/Toast/Toaster.js +118 -88
  62. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  63. package/dist/esm/components/Tooltip/Tooltip.js +8 -7
  64. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  65. package/dist/esm/components/Tour/Tour.js +50 -44
  66. package/dist/esm/components/Tour/Tour.js.map +1 -1
  67. package/dist/esm/components/Treeview/Treeview.js +36 -26
  68. package/dist/esm/components/Treeview/Treeview.js.map +1 -1
  69. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
  70. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  71. package/dist/taco.cjs.development.js +1007 -813
  72. package/dist/taco.cjs.development.js.map +1 -1
  73. package/dist/taco.cjs.production.min.js +1 -1
  74. package/dist/taco.cjs.production.min.js.map +1 -1
  75. package/dist/utils/tailwind.d.ts +1 -1
  76. package/package.json +3 -3
@@ -36,6 +36,39 @@ 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
+
39
72
  function IconAccountPreview(props, svgRef) {
40
73
  return React.createElement("svg", Object.assign({
41
74
  xmlns: "http://www.w3.org/2000/svg",
@@ -3089,17 +3122,17 @@ const icons = {
3089
3122
  zoom: Zoom
3090
3123
  };
3091
3124
 
3092
- const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3125
+ var _excluded = ["name"];
3126
+ var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3093
3127
  var _props$className;
3094
3128
 
3095
- const {
3096
- name,
3097
- ...otherProps
3098
- } = props;
3099
- const Component = icons[name];
3129
+ var name = props.name,
3130
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
3131
+
3132
+ var Component = icons[name];
3100
3133
  /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
3101
3134
 
3102
- const className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {
3135
+ var className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {
3103
3136
  'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
3104
3137
  });
3105
3138
  return Component ? React__default.createElement(Component, Object.assign({}, otherProps, {
@@ -3111,12 +3144,14 @@ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
3111
3144
  })) : null;
3112
3145
  });
3113
3146
 
3114
- const AccordionContext = /*#__PURE__*/React__default.createContext({
3147
+ var _excluded$1 = ["id"],
3148
+ _excluded2 = ["id", "defaultId", "onChange", "as"];
3149
+ var AccordionContext = /*#__PURE__*/React__default.createContext({
3115
3150
  as: 'h2'
3116
3151
  });
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);
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);
3120
3155
  return React__default.createElement("button", Object.assign({}, props, {
3121
3156
  ref: ref,
3122
3157
  className: className
@@ -3124,13 +3159,12 @@ const StyledTrigger = /*#__PURE__*/React__default.forwardRef(function AccordionS
3124
3159
  name: isExpanded ? 'chevron-up' : 'chevron-down'
3125
3160
  }));
3126
3161
  });
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);
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
+
3134
3168
  return React__default.createElement(AccordionPrimitive.Header, {
3135
3169
  asChild: true
3136
3170
  }, React__default.createElement(Heading, {
@@ -3140,34 +3174,35 @@ const Trigger = /*#__PURE__*/React__default.forwardRef(function AccordionTrigger
3140
3174
  asChild: true
3141
3175
  }, React__default.createElement(StyledTrigger, null, children))));
3142
3176
  });
3143
- const Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(props, ref) {
3177
+ var Content = /*#__PURE__*/React__default.forwardRef(function AccordionContent(props, ref) {
3144
3178
  return React__default.createElement(AccordionPrimitive.Content, Object.assign({}, props, {
3145
3179
  ref: ref
3146
3180
  }));
3147
3181
  });
3148
3182
 
3149
- const Item = props => {
3150
- const {
3151
- id,
3152
- ...otherProps
3153
- } = props;
3183
+ var Item = function Item(props) {
3184
+ var id = props.id,
3185
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
3186
+
3154
3187
  return React__default.createElement(AccordionPrimitive.Item, Object.assign({}, otherProps, {
3155
3188
  value: id
3156
3189
  }));
3157
3190
  };
3158
3191
 
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;
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;
3171
3206
 
3172
3207
  if (defaultId) {
3173
3208
  valueProps = {
@@ -3180,8 +3215,8 @@ const Accordion = props => {
3180
3215
  };
3181
3216
  }
3182
3217
 
3183
- const type = Array.isArray(valueProps.defaultValue) || Array.isArray(valueProps.value) ? 'multiple' : 'single';
3184
- const className = cn('divide-y divide-grey', props.className);
3218
+ var type = Array.isArray(valueProps.defaultValue) || Array.isArray(valueProps.value) ? 'multiple' : 'single';
3219
+ var className = cn('divide-y divide-grey', props.className);
3185
3220
  return React__default.createElement(AccordionContext.Provider, {
3186
3221
  value: context
3187
3222
  }, React__default.createElement(AccordionPrimitive.Root, Object.assign({}, otherProps, valueProps, {
@@ -3202,7 +3237,7 @@ var Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
3202
3237
  }));
3203
3238
  });
3204
3239
 
3205
- const VisuallyHidden = /*#__PURE__*/React.forwardRef(function VisuallyHidden(props, ref) {
3240
+ var VisuallyHidden = /*#__PURE__*/React.forwardRef(function VisuallyHidden(props, ref) {
3206
3241
  return React.createElement("span", Object.assign({}, props, {
3207
3242
  className: "sr-only",
3208
3243
  ref: ref
@@ -3248,20 +3283,19 @@ const getOutlineClasses = state => {
3248
3283
  }
3249
3284
  };
3250
3285
 
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);
3286
+ var _excluded$2 = ["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$2);
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);
3265
3299
  return React.createElement("span", Object.assign({}, otherProps, {
3266
3300
  "aria-atomic": "true",
3267
3301
  "aria-live": "polite",
@@ -3321,13 +3355,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3321
3355
  }), React.Children.count(props.children) > 1 ? React.Children.map(props.children, child => typeof child === 'string' ? React.createElement("span", null, child) : child) : props.children);
3322
3356
  });
3323
3357
 
3324
- const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3325
- const {
3326
- title,
3327
- children,
3328
- placement,
3329
- ...otherProps
3330
- } = props;
3358
+ var _excluded$3 = ["title", "children", "placement"];
3359
+ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3360
+ var title = props.title,
3361
+ children = props.children,
3362
+ placement = props.placement,
3363
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
3364
+
3331
3365
  return React.createElement(TooltipPrimitive.Root, {
3332
3366
  delayDuration: 50
3333
3367
  }, React.createElement(TooltipPrimitive.Trigger, {
@@ -3419,13 +3453,14 @@ const createButton = (props, className, ref) => {
3419
3453
  return button;
3420
3454
  };
3421
3455
 
3422
- const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3423
- const {
3424
- icon,
3425
- rounded = false,
3426
- ...otherProps
3427
- } = props;
3428
- const className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3456
+ var _excluded$4 = ["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$4);
3462
+
3463
+ var className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
3429
3464
  'rounded-full': rounded,
3430
3465
  rounded: !rounded,
3431
3466
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3436,22 +3471,20 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref)
3436
3471
  return null;
3437
3472
  }
3438
3473
 
3439
- return createButton({ ...otherProps,
3474
+ return createButton(_extends({}, otherProps, {
3440
3475
  children: React.createElement(Icon, {
3441
3476
  name: icon,
3442
3477
  className: "m-0 p-0"
3443
3478
  }),
3444
3479
  'data-taco': 'icon-button'
3445
- }, className, ref);
3480
+ }), className, ref);
3446
3481
  });
3447
3482
 
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);
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);
3455
3488
  return React.createElement("div", {
3456
3489
  className: className,
3457
3490
  "data-taco": "banner",
@@ -3464,32 +3497,32 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3464
3497
  }) : null);
3465
3498
  });
3466
3499
 
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', {
3500
+ var _excluded$5 = ["fluid"];
3501
+ var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3502
+ var fluid = props.fluid,
3503
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
3504
+
3505
+ var className = cn(getButtonClasses(), getAppearanceClasses(otherProps.appearance), 'rounded px-3', {
3473
3506
  'cursor-not-allowed opacity-50': props.disabled,
3474
3507
  'focus:yt-focus active:focus:yt-focus': !props.disabled,
3475
3508
  'w-full': fluid
3476
3509
  }, props.className);
3477
- let children = otherProps.children; // add a chevron icon to menu buttons
3510
+ var children = otherProps.children; // add a chevron icon to menu buttons
3478
3511
 
3479
3512
  if (typeof otherProps.menu === 'function') {
3480
- children = Array.isArray(children) ? [...children, React.createElement(Icon, {
3513
+ children = Array.isArray(children) ? [].concat(children, [React.createElement(Icon, {
3481
3514
  key: "chevron-down",
3482
3515
  name: "chevron-down"
3483
- })] : [children, React.createElement(Icon, {
3516
+ })]) : [children, React.createElement(Icon, {
3484
3517
  key: "chevron-down",
3485
3518
  name: "chevron-down"
3486
3519
  })];
3487
3520
  }
3488
3521
 
3489
- return createButton({ ...otherProps,
3490
- children,
3522
+ return createButton(_extends({}, otherProps, {
3523
+ children: children,
3491
3524
  'data-taco': 'button'
3492
- }, className, ref);
3525
+ }), className, ref);
3493
3526
  });
3494
3527
 
3495
3528
  function useTimer(duration = 0, callback) {
@@ -3538,21 +3571,27 @@ function useTimer(duration = 0, callback) {
3538
3571
  };
3539
3572
  }
3540
3573
 
3541
- const Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, ref) {
3542
- const {
3543
- delay = 500,
3544
- label,
3545
- ...otherProps
3546
- } = props;
3547
- const [visible, setVisibility] = React__default.useState(!delay);
3548
- React__default.useEffect(() => {
3549
- let timeout;
3574
+ var _excluded$6 = ["delay", "label"];
3575
+ var Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, ref) {
3576
+ var _props$delay = props.delay,
3577
+ delay = _props$delay === void 0 ? 500 : _props$delay,
3578
+ label = props.label,
3579
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
3580
+
3581
+ var _React$useState = React__default.useState(!delay),
3582
+ visible = _React$useState[0],
3583
+ setVisibility = _React$useState[1];
3584
+
3585
+ React__default.useEffect(function () {
3586
+ var timeout;
3550
3587
 
3551
3588
  if (delay) {
3552
- timeout = window.setTimeout(() => setVisibility(true), delay);
3589
+ timeout = window.setTimeout(function () {
3590
+ return setVisibility(true);
3591
+ }, delay);
3553
3592
  }
3554
3593
 
3555
- return () => {
3594
+ return function () {
3556
3595
  if (timeout) {
3557
3596
  clearTimeout(timeout);
3558
3597
  }
@@ -3563,7 +3602,7 @@ const Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props,
3563
3602
  return null;
3564
3603
  }
3565
3604
 
3566
- const className = cn('inline-flex flex-col relative items-center', otherProps.className);
3605
+ var className = cn('inline-flex flex-col relative items-center', otherProps.className);
3567
3606
  return React__default.createElement("div", Object.assign({}, otherProps, {
3568
3607
  className: className,
3569
3608
  "data-taco": "spinner",
@@ -3689,49 +3728,62 @@ const Toast = ({
3689
3728
  }));
3690
3729
  };
3691
3730
 
3692
- const DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
3693
- const ToastContext = /*#__PURE__*/React.createContext({});
3731
+ var _excluded$7 = ["children"];
3732
+ var DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
3733
+ var ToastContext = /*#__PURE__*/React.createContext({});
3694
3734
 
3695
- const insertToastWithoutDuplicates = (currentToasts, id, content, options, close) => {
3696
- const nextToasts = [...currentToasts];
3697
- const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));
3735
+ var insertToastWithoutDuplicates = function insertToastWithoutDuplicates(currentToasts, id, content, options, close) {
3736
+ var nextToasts = [].concat(currentToasts);
3737
+ var existingToastIndex = currentToasts.findIndex(function (toast) {
3738
+ return JSON.stringify(toast.content) === JSON.stringify(content);
3739
+ });
3698
3740
 
3699
3741
  if (existingToastIndex > -1) {
3700
3742
  nextToasts[existingToastIndex].lastDuplicateId = id;
3701
3743
  nextToasts[existingToastIndex].lastUpdated = Date.now();
3702
3744
  } else {
3703
3745
  nextToasts.push({
3704
- id,
3746
+ id: id,
3705
3747
  content: typeof content === 'function' ? content(close) : content,
3706
- options
3748
+ options: options
3707
3749
  });
3708
3750
  }
3709
3751
 
3710
3752
  return nextToasts;
3711
3753
  };
3712
3754
 
3713
- const ToastProvider = ({
3714
- children,
3715
- ...props
3716
- }) => {
3717
- const [toasts, setToasts] = React.useState([]);
3755
+ var ToastProvider = function ToastProvider(_ref) {
3756
+ var children = _ref.children,
3757
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
3718
3758
 
3719
- const handleClose = id => {
3720
- setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));
3759
+ var _React$useState = React.useState([]),
3760
+ toasts = _React$useState[0],
3761
+ setToasts = _React$useState[1];
3762
+
3763
+ var handleClose = function handleClose(id) {
3764
+ setToasts(function (currentToasts) {
3765
+ return currentToasts.filter(function (toast) {
3766
+ return toast.id !== id;
3767
+ });
3768
+ });
3721
3769
  }; // memoize (useCallback) this function,
3722
3770
  // it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children
3723
3771
 
3724
3772
 
3725
- const toaster = React.useCallback((content, options) => {
3726
- const id = uuid.v4();
3773
+ var toaster = React.useCallback(function (content, options) {
3774
+ var id = uuid.v4();
3727
3775
 
3728
- const close = () => handleClose(id);
3776
+ var close = function close() {
3777
+ return handleClose(id);
3778
+ };
3729
3779
 
3730
- setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));
3780
+ setToasts(function (currentToasts) {
3781
+ return insertToastWithoutDuplicates(currentToasts, id, content, options, close);
3782
+ });
3731
3783
 
3732
- const update = (content, options) => {
3733
- setToasts(currentToasts => {
3734
- const nextToasts = currentToasts.filter(toast => {
3784
+ var update = function update(content, options) {
3785
+ setToasts(function (currentToasts) {
3786
+ var nextToasts = currentToasts.filter(function (toast) {
3735
3787
  if (toast.lastDuplicateId) {
3736
3788
  return toast.lastDuplicateId !== id;
3737
3789
  }
@@ -3742,70 +3794,80 @@ const ToastProvider = ({
3742
3794
  });
3743
3795
  };
3744
3796
 
3745
- const success = (content, options) => {
3746
- update(content, {
3747
- autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
3748
- ...options,
3797
+ var success = function success(content, options) {
3798
+ update(content, _extends({
3799
+ autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT
3800
+ }, options, {
3749
3801
  type: 'success'
3750
- });
3802
+ }));
3751
3803
  };
3752
3804
 
3753
- const error = (content, options) => {
3754
- update(content, { ...options,
3805
+ var error = function error(content, options) {
3806
+ update(content, _extends({}, options, {
3755
3807
  type: 'error'
3756
- });
3808
+ }));
3757
3809
  };
3758
3810
 
3759
- const warning = (content, options) => {
3760
- update(content, { ...options,
3811
+ var warning = function warning(content, options) {
3812
+ update(content, _extends({}, options, {
3761
3813
  type: 'warning'
3762
- });
3814
+ }));
3763
3815
  };
3764
3816
 
3765
- const information = (content, options) => {
3766
- update(content, { ...options,
3817
+ var information = function information(content, options) {
3818
+ update(content, _extends({}, options, {
3767
3819
  type: 'information'
3768
- });
3820
+ }));
3769
3821
  };
3770
3822
 
3771
- const loading = (content, options) => {
3772
- update(content, { ...options,
3823
+ var loading = function loading(content, options) {
3824
+ update(content, _extends({}, options, {
3773
3825
  type: 'loading'
3774
- });
3826
+ }));
3775
3827
  };
3776
3828
 
3777
3829
  return {
3778
- success,
3779
- error,
3780
- warning,
3781
- information,
3782
- loading,
3783
- close
3830
+ success: success,
3831
+ error: error,
3832
+ warning: warning,
3833
+ information: information,
3834
+ loading: loading,
3835
+ close: close
3784
3836
  };
3785
3837
  }, []); // no need to rebind these every render, do them once in an effect
3786
3838
 
3787
- React.useEffect(() => {
3788
- toaster.success = (content, options) => toaster(content, {
3789
- autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
3790
- ...options,
3791
- type: 'success'
3792
- });
3839
+ React.useEffect(function () {
3840
+ toaster.success = function (content, options) {
3841
+ return toaster(content, _extends({
3842
+ autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT
3843
+ }, options, {
3844
+ type: 'success'
3845
+ }));
3846
+ };
3793
3847
 
3794
- toaster.error = (content, options) => toaster(content, { ...options,
3795
- type: 'error'
3796
- });
3848
+ toaster.error = function (content, options) {
3849
+ return toaster(content, _extends({}, options, {
3850
+ type: 'error'
3851
+ }));
3852
+ };
3797
3853
 
3798
- toaster.warning = (content, options) => toaster(content, { ...options,
3799
- type: 'warning'
3800
- });
3854
+ toaster.warning = function (content, options) {
3855
+ return toaster(content, _extends({}, options, {
3856
+ type: 'warning'
3857
+ }));
3858
+ };
3801
3859
 
3802
- toaster.information = (content, options) => toaster(content, { ...options,
3803
- type: 'information'
3804
- });
3860
+ toaster.information = function (content, options) {
3861
+ return toaster(content, _extends({}, options, {
3862
+ type: 'information'
3863
+ }));
3864
+ };
3805
3865
 
3806
- toaster.loading = (content, options) => toaster(content, { ...options,
3807
- type: 'loading'
3808
- });
3866
+ toaster.loading = function (content, options) {
3867
+ return toaster(content, _extends({}, options, {
3868
+ type: 'loading'
3869
+ }));
3870
+ };
3809
3871
  }, []);
3810
3872
  return React.createElement(ToastContext.Provider, Object.assign({}, props, {
3811
3873
  value: toaster
@@ -3815,37 +3877,43 @@ const ToastProvider = ({
3815
3877
  role: "log"
3816
3878
  }, React.createElement(framerMotion.AnimatePresence, {
3817
3879
  initial: false
3818
- }, toasts.map(toast => React.createElement(framerMotion.motion.div, {
3819
- key: toast.id,
3820
- transition: {
3821
- type: 'spring',
3822
- damping: 20,
3823
- stiffness: 300
3824
- },
3825
- initial: {
3826
- opacity: 0,
3827
- y: 10,
3828
- scale: 0.5
3829
- },
3830
- animate: {
3831
- opacity: 1,
3832
- y: 0,
3833
- scale: 1
3834
- },
3835
- exit: {
3836
- opacity: 0,
3837
- scale: 0.5,
3880
+ }, toasts.map(function (toast) {
3881
+ return React.createElement(framerMotion.motion.div, {
3882
+ key: toast.id,
3838
3883
  transition: {
3839
- duration: 0.2
3884
+ type: 'spring',
3885
+ damping: 20,
3886
+ stiffness: 300
3887
+ },
3888
+ initial: {
3889
+ opacity: 0,
3890
+ y: 10,
3891
+ scale: 0.5
3892
+ },
3893
+ animate: {
3894
+ opacity: 1,
3895
+ y: 0,
3896
+ scale: 1
3897
+ },
3898
+ exit: {
3899
+ opacity: 0,
3900
+ scale: 0.5,
3901
+ transition: {
3902
+ duration: 0.2
3903
+ }
3840
3904
  }
3841
- }
3842
- }, React.createElement(Toast, Object.assign({}, toast, {
3843
- onClose: () => handleClose(toast.id)
3844
- })))))));
3905
+ }, React.createElement(Toast, Object.assign({}, toast, {
3906
+ onClose: function onClose() {
3907
+ return handleClose(toast.id);
3908
+ }
3909
+ })));
3910
+ }))));
3911
+ };
3912
+ var useToast = function useToast() {
3913
+ return React.useContext(ToastContext);
3845
3914
  };
3846
- const useToast = () => React.useContext(ToastContext);
3847
3915
 
3848
- const defaultLocalisationTexts = {
3916
+ var defaultLocalisationTexts = {
3849
3917
  calendar: {
3850
3918
  months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
3851
3919
  weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
@@ -3920,62 +3988,67 @@ const defaultLocalisationTexts = {
3920
3988
  inputLabel: 'Search...'
3921
3989
  }
3922
3990
  };
3923
- const defaultLocalizationContext = {
3991
+ var defaultLocalizationContext = {
3924
3992
  locale: 'en-GB',
3925
3993
  texts: defaultLocalisationTexts,
3926
3994
  formatting: {
3927
3995
  date: 'dd.mm.yy'
3928
3996
  }
3929
3997
  };
3930
- const Context = /*#__PURE__*/React.createContext({
3998
+ var Context = /*#__PURE__*/React.createContext({
3931
3999
  localization: defaultLocalizationContext
3932
4000
  });
3933
- const Provider = props => {
3934
- const {
3935
- children,
3936
- localization = defaultLocalizationContext
3937
- } = props;
3938
- const value = React.useMemo(() => ({
3939
- localization
3940
- }), [localization]);
4001
+ var Provider = function Provider(props) {
4002
+ var children = props.children,
4003
+ _props$localization = props.localization,
4004
+ localization = _props$localization === void 0 ? defaultLocalizationContext : _props$localization;
4005
+ var value = React.useMemo(function () {
4006
+ return {
4007
+ localization: localization
4008
+ };
4009
+ }, [localization]);
3941
4010
  return React.createElement(Context.Provider, {
3942
4011
  value: value
3943
4012
  }, React.createElement(ToastProvider, null, children));
3944
4013
  };
3945
- const useTaco = () => React.useContext(Context);
3946
- const useLocalization = () => useTaco().localization;
4014
+ var useTaco = function useTaco() {
4015
+ return React.useContext(Context);
4016
+ };
4017
+ var useLocalization = function useLocalization() {
4018
+ return useTaco().localization;
4019
+ };
3947
4020
 
3948
- const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
3949
- className: "dot"
3950
- }) : day.getDate();
4021
+ var _excluded$8 = ["onChange", "value"];
3951
4022
 
3952
- const thisYear = /*#__PURE__*/new Date().getFullYear();
3953
- const years = [];
4023
+ var renderDay = function renderDay(day, modifiers) {
4024
+ return modifiers.disabled ? React.createElement("span", {
4025
+ className: "dot"
4026
+ }) : day.getDate();
4027
+ };
4028
+
4029
+ var thisYear = /*#__PURE__*/new Date().getFullYear();
4030
+ var years = [];
3954
4031
 
3955
- for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
4032
+ for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
3956
4033
  years.push(i);
3957
4034
  }
3958
4035
 
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();
4036
+ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4037
+ var onMonthChange = _ref.onMonthChange,
4038
+ onNextClick = _ref.onNextClick,
4039
+ onPreviousClick = _ref.onPreviousClick,
4040
+ _ref$value = _ref.value,
4041
+ value = _ref$value === void 0 ? new Date() : _ref$value;
3973
4042
 
3974
- const handleChange = function handleChange(event) {
3975
- const {
3976
- year,
3977
- month
3978
- } = event.target.form;
4043
+ var _useLocalization = useLocalization(),
4044
+ _useLocalization$text = _useLocalization.texts.calendar,
4045
+ actions = _useLocalization$text.actions,
4046
+ months = _useLocalization$text.months;
4047
+
4048
+ var handleChange = function handleChange(event) {
4049
+ var _event$target$form = event.target.form,
4050
+ year = _event$target$form.year,
4051
+ month = _event$target$form.month;
3979
4052
  onMonthChange(new Date(year.value, month.value));
3980
4053
  };
3981
4054
 
@@ -3988,49 +4061,59 @@ const Navbar = /*#__PURE__*/React.memo(({
3988
4061
  name: "month",
3989
4062
  onChange: handleChange,
3990
4063
  value: value.getMonth()
3991
- }, months.map((month, i) => React.createElement("option", {
3992
- key: month,
3993
- value: i
3994
- }, month))), React.createElement("select", {
4064
+ }, months.map(function (month, i) {
4065
+ return React.createElement("option", {
4066
+ key: month,
4067
+ value: i
4068
+ }, month);
4069
+ })), React.createElement("select", {
3995
4070
  className: "h-8 px-2",
3996
4071
  name: "year",
3997
4072
  onChange: handleChange,
3998
4073
  value: value.getFullYear()
3999
- }, years.map(year => React.createElement("option", {
4000
- key: year,
4001
- value: year
4002
- }, String(year))))), React.createElement("div", null, React.createElement(IconButton, {
4074
+ }, years.map(function (year) {
4075
+ return React.createElement("option", {
4076
+ key: year,
4077
+ value: year
4078
+ }, String(year));
4079
+ }))), React.createElement("div", null, React.createElement(IconButton, {
4003
4080
  appearance: "discrete",
4004
4081
  icon: "chevron-left",
4005
4082
  "aria-label": actions.previousMonth,
4006
- onClick: () => onPreviousClick(),
4083
+ onClick: function onClick() {
4084
+ return onPreviousClick();
4085
+ },
4007
4086
  rounded: true
4008
4087
  }), React.createElement(IconButton, {
4009
4088
  appearance: "discrete",
4010
4089
  icon: "chevron-right",
4011
4090
  "aria-label": actions.nextMonth,
4012
- onClick: () => onNextClick(),
4091
+ onClick: function onClick() {
4092
+ return onNextClick();
4093
+ },
4013
4094
  rounded: true
4014
4095
  })));
4015
4096
  });
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(() => {
4097
+ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4098
+ var handleChange = props.onChange,
4099
+ value = props.value,
4100
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
4101
+
4102
+ var _useLocalization2 = useLocalization(),
4103
+ locale = _useLocalization2.locale,
4104
+ texts = _useLocalization2.texts;
4105
+
4106
+ var _React$useState = React.useState(value !== null && value !== void 0 ? value : new Date()),
4107
+ visibleMonth = _React$useState[0],
4108
+ setVisibleMonth = _React$useState[1];
4109
+
4110
+ React.useEffect(function () {
4028
4111
  if (visibleMonth !== value) {
4029
4112
  setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
4030
4113
  }
4031
4114
  }, [value]);
4032
4115
 
4033
- const handleDayClick = (date, modifiers, event) => {
4116
+ var handleDayClick = function handleDayClick(date, modifiers, event) {
4034
4117
  if (modifiers.outside || modifiers.disabled) {
4035
4118
  return;
4036
4119
  }
@@ -4038,8 +4121,8 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4038
4121
  handleChange(date, event);
4039
4122
  };
4040
4123
 
4041
- const handleCalendarClickToday = () => {
4042
- const today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4124
+ var handleCalendarClickToday = function handleCalendarClickToday() {
4125
+ var today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4043
4126
 
4044
4127
  today.setHours(12);
4045
4128
  today.setMinutes(0);
@@ -4047,7 +4130,7 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4047
4130
  handleChange(today);
4048
4131
  };
4049
4132
 
4050
- const className = cn('flex bg-white text-xs p-4', otherProps.className);
4133
+ var className = cn('flex bg-white text-xs p-4', otherProps.className);
4051
4134
  return React.createElement("div", {
4052
4135
  "data-taco": "calendar"
4053
4136
  }, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
@@ -4058,14 +4141,18 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4058
4141
  firstDayOfWeek: 1,
4059
4142
  months: texts.calendar.months,
4060
4143
  weekdaysShort: texts.calendar.weekdaysShort,
4061
- navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
4062
- onMonthChange: setVisibleMonth,
4063
- value: visibleMonth
4064
- })),
4144
+ navbarElement: function navbarElement(navProps) {
4145
+ return React.createElement(Navbar, Object.assign({}, navProps, {
4146
+ onMonthChange: setVisibleMonth,
4147
+ value: visibleMonth
4148
+ }));
4149
+ },
4065
4150
  onDayClick: handleDayClick,
4066
4151
  onMonthChange: setVisibleMonth,
4067
4152
  onTodayButtonClick: handleCalendarClickToday,
4068
- captionElement: () => null,
4153
+ captionElement: function captionElement() {
4154
+ return null;
4155
+ },
4069
4156
  todayButton: texts.calendar.actions.today,
4070
4157
  showOutsideDays: true,
4071
4158
  renderDay: renderDay,
@@ -4074,30 +4161,32 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4074
4161
  })));
4075
4162
  });
4076
4163
 
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]', {
4164
+ var _excluded$9 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4165
+ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4166
+ var checked = props.checked,
4167
+ highlighted = props.highlighted,
4168
+ indeterminate = props.indeterminate,
4169
+ invalid = props.invalid,
4170
+ label = props.label,
4171
+ onChange = props.onChange,
4172
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
4173
+
4174
+ var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem]', {
4088
4175
  'mr-2': !!label,
4089
4176
  'border-grey-dark text-blue focus:border-blue focus:yt-focus': !props.disabled && !invalid,
4090
4177
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4091
4178
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4092
4179
  'border-red text-red focus:border-red focus:yt-focus-red': invalid && !props.disabled
4093
4180
  });
4094
- let handleChange;
4181
+ var handleChange;
4095
4182
 
4096
4183
  if (onChange) {
4097
- handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4184
+ handleChange = function handleChange(checked) {
4185
+ return onChange(checked === 'indeterminate' ? false : checked);
4186
+ };
4098
4187
  }
4099
4188
 
4100
- const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4189
+ var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4101
4190
  "data-taco": "checkbox",
4102
4191
  checked: indeterminate ? 'indeterminate' : checked,
4103
4192
  className: className,
@@ -4111,7 +4200,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4111
4200
  })));
4112
4201
 
4113
4202
  if (label) {
4114
- const labelClassName = cn('flex items-center cursor-pointer', {
4203
+ var labelClassName = cn('flex items-center cursor-pointer', {
4115
4204
  'cursor-not-allowed text-grey-dark': props.disabled
4116
4205
  }, props.className);
4117
4206
  return React.createElement("label", {
@@ -4154,22 +4243,21 @@ const getButtonStateClasses = invalid => {
4154
4243
  return '!border-grey-dark focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
4155
4244
  };
4156
4245
 
4157
- const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4158
- const {
4159
- button,
4160
- icon,
4161
- highlighted,
4162
- invalid,
4163
- onKeyDown,
4164
- autoFocus,
4165
- ...otherProps
4166
- } = props;
4167
- const inputRef = useProxiedRef(ref);
4168
- const hasContainer = button || icon;
4169
- const className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
4246
+ var _excluded$a = ["button", "icon", "highlighted", "invalid", "onKeyDown", "autoFocus"];
4247
+ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4248
+ var button = props.button,
4249
+ icon = props.icon,
4250
+ invalid = props.invalid,
4251
+ onKeyDown = props.onKeyDown,
4252
+ autoFocus = props.autoFocus,
4253
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
4254
+
4255
+ var inputRef = useProxiedRef(ref);
4256
+ var hasContainer = button || icon;
4257
+ var className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
4170
4258
  'pr-8': !!hasContainer
4171
4259
  }, !hasContainer && otherProps.className);
4172
- React.useEffect(() => {
4260
+ React.useEffect(function () {
4173
4261
  if (autoFocus && inputRef.current) {
4174
4262
  inputRef.current.focus();
4175
4263
  }
@@ -4177,10 +4265,10 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4177
4265
  // if it has scroll height then the browser reverts to native scrolling behaviour only
4178
4266
  // so we manually override it to ensure _our_ desired behaviour remains intact
4179
4267
 
4180
- const handleKeyDown = event => {
4268
+ var handleKeyDown = function handleKeyDown(event) {
4181
4269
  if (event.key === 'Home' || event.key === 'End') {
4182
4270
  event.preventDefault();
4183
- const position = event.key === 'End' ? event.currentTarget.value.length : 0;
4271
+ var position = event.key === 'End' ? event.currentTarget.value.length : 0;
4184
4272
  event.currentTarget.setSelectionRange(position, position);
4185
4273
  }
4186
4274
 
@@ -4189,7 +4277,7 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4189
4277
  }
4190
4278
  };
4191
4279
 
4192
- const input = React.createElement("input", Object.assign({}, otherProps, {
4280
+ var input = React.createElement("input", Object.assign({}, otherProps, {
4193
4281
  className: className,
4194
4282
  "data-taco": "input",
4195
4283
  onKeyDown: handleKeyDown,
@@ -4197,21 +4285,19 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4197
4285
  }));
4198
4286
 
4199
4287
  if (hasContainer) {
4200
- let extra;
4288
+ var extra;
4201
4289
 
4202
4290
  if (button) {
4203
- var _button$props$disable;
4291
+ var _button$props$disable, _cn;
4204
4292
 
4205
- const disabled = (_button$props$disable = button.props.disabled) !== null && _button$props$disable !== void 0 ? _button$props$disable : otherProps.disabled;
4206
- const buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', {
4207
- [getButtonStateClasses(invalid)]: !props.disabled
4208
- }, button.props.className);
4293
+ var disabled = (_button$props$disable = button.props.disabled) !== null && _button$props$disable !== void 0 ? _button$props$disable : otherProps.disabled;
4294
+ 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);
4209
4295
  extra = React.cloneElement(button, {
4210
4296
  className: buttonClassName,
4211
- disabled
4297
+ disabled: disabled
4212
4298
  });
4213
4299
  } else if (icon) {
4214
- 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', {
4300
+ 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', {
4215
4301
  'text-grey-dark': props.disabled,
4216
4302
  'text-grey-darkest': !props.disabled
4217
4303
  });
@@ -4223,7 +4309,7 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4223
4309
  });
4224
4310
  }
4225
4311
 
4226
- const containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4312
+ var containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4227
4313
  return React.createElement("div", {
4228
4314
  className: containerClassName,
4229
4315
  "data-taco": "input-container"
@@ -4997,26 +5083,27 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
4997
5083
  return dimensions;
4998
5084
  };
4999
5085
 
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', {
5086
+ var _excluded$b = ["className", "dialog", "style"];
5087
+ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5088
+ var externalClassName = props.className,
5089
+ dialog = props.dialog,
5090
+ style = props.style,
5091
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5092
+
5093
+ var _useCombobox = useCombobox(otherProps, ref),
5094
+ combobox = _useCombobox.combobox,
5095
+ button = _useCombobox.button,
5096
+ input = _useCombobox.input,
5097
+ popover = _useCombobox.popover,
5098
+ list = _useCombobox.list;
5099
+
5100
+ var internalRef = React.useRef(null);
5101
+
5102
+ var _useLocalization = useLocalization(),
5103
+ texts = _useLocalization.texts;
5104
+
5105
+ var selectDimensions = useBoundingClientRectListener(internalRef);
5106
+ var className = cn('inline-flex relative', {
5020
5107
  'yt-combobox--inline': props.inline
5021
5108
  }, externalClassName);
5022
5109
  return React.createElement("span", {
@@ -5035,7 +5122,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5035
5122
  appearance: "discrete",
5036
5123
  className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
5037
5124
  icon: popover.open ? 'chevron-up' : 'chevron-down',
5038
- onClick: () => {
5125
+ onClick: function onClick() {
5039
5126
  var _input$ref$current;
5040
5127
 
5041
5128
  popover.onOpenChange(true);
@@ -5046,7 +5133,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5046
5133
  icon: "list-search",
5047
5134
  disabled: props.readOnly || props.disabled,
5048
5135
  dialog: dialog,
5049
- onFocus: event => {
5136
+ onFocus: function onFocus(event) {
5050
5137
  var _input$ref$current2;
5051
5138
 
5052
5139
  // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element
@@ -5059,7 +5146,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5059
5146
  }) : undefined
5060
5147
  })))), React.createElement(PopoverPrimitive.Content, {
5061
5148
  align: "start",
5062
- onOpenAutoFocus: event => {
5149
+ onOpenAutoFocus: function onOpenAutoFocus(event) {
5063
5150
  event.preventDefault();
5064
5151
  },
5065
5152
  sideOffset: 4
@@ -5293,18 +5380,19 @@ function mergeRefs(refs) {
5293
5380
  };
5294
5381
  }
5295
5382
 
5296
- const PopoverContext = /*#__PURE__*/React.createContext({
5383
+ var _excluded$c = ["children", "trigger"];
5384
+ var PopoverContext = /*#__PURE__*/React.createContext({
5297
5385
  props: {},
5298
5386
  ref: null
5299
5387
  });
5300
- const Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
5388
+ var Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
5301
5389
  var _props$children;
5302
5390
 
5303
- const context = React.useContext(PopoverContext);
5304
- let children = props.children;
5391
+ var context = React.useContext(PopoverContext);
5392
+ var children = props.children;
5305
5393
 
5306
5394
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5307
- 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`);
5395
+ 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");
5308
5396
  children = React.createElement("span", null, props.children);
5309
5397
  }
5310
5398
 
@@ -5314,22 +5402,22 @@ const Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, r
5314
5402
  asChild: true
5315
5403
  }));
5316
5404
  });
5317
- const RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper({
5318
- children,
5319
- onClick
5320
- }, ref) {
5321
- const close = () => {
5405
+ var RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper(_ref, ref) {
5406
+ var children = _ref.children,
5407
+ onClick = _ref.onClick;
5408
+
5409
+ var close = function close() {
5322
5410
  onClick(new CustomEvent('hide'));
5323
5411
  };
5324
5412
 
5325
5413
  return children({
5326
- close,
5327
- ref
5414
+ close: close,
5415
+ ref: ref
5328
5416
  });
5329
5417
  });
5330
- const Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
5331
- const className = cn('bg-white focus:border-blue-light', props.className);
5332
- let output;
5418
+ var Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
5419
+ var className = cn('bg-white focus:border-blue-light', props.className);
5420
+ var output;
5333
5421
 
5334
5422
  if (typeof props.children === 'function') {
5335
5423
  output = React.createElement(PopoverPrimitive.Close, {
@@ -5347,20 +5435,23 @@ const Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, r
5347
5435
  className: "text-white"
5348
5436
  }));
5349
5437
  });
5350
- const Close$1 = /*#__PURE__*/React.forwardRef((props, ref) => React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
5351
- ref: ref,
5352
- asChild: true
5353
- })));
5354
- const Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
5355
- const {
5356
- children,
5357
- trigger,
5358
- ...otherProps
5359
- } = props;
5360
- const context = React.useMemo(() => ({
5361
- props: otherProps,
5362
- ref
5363
- }), [otherProps]);
5438
+ var Close$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
5439
+ return React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
5440
+ ref: ref,
5441
+ asChild: true
5442
+ }));
5443
+ });
5444
+ var Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
5445
+ var children = props.children,
5446
+ trigger = props.trigger,
5447
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
5448
+
5449
+ var context = React.useMemo(function () {
5450
+ return {
5451
+ props: otherProps,
5452
+ ref: ref
5453
+ };
5454
+ }, [otherProps]);
5364
5455
  return React.createElement(PopoverContext.Provider, {
5365
5456
  value: context
5366
5457
  }, React.createElement(PopoverPrimitive.Root, null, trigger && React.createElement(Trigger$1, null, trigger), children));
@@ -5369,25 +5460,25 @@ Popover.Trigger = Trigger$1;
5369
5460
  Popover.Content = Content$1;
5370
5461
  Popover.Close = Close$1;
5371
5462
 
5372
- const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5463
+ var _excluded$d = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5464
+ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5373
5465
  var _input$disabled;
5374
5466
 
5375
- const {
5376
- className: externalClassName,
5377
- onReset: handleReset,
5378
- style,
5379
- shortcuts,
5380
- shortcutsText,
5381
- ...otherProps
5382
- } = props;
5383
- const {
5384
- calendar,
5385
- input
5386
- } = useDatepicker(otherProps, ref);
5387
- const {
5388
- texts
5389
- } = useLocalization();
5390
- const className = cn('inline-flex w-full text-black font-normal', externalClassName);
5467
+ var externalClassName = props.className,
5468
+ handleReset = props.onReset,
5469
+ style = props.style,
5470
+ shortcuts = props.shortcuts,
5471
+ shortcutsText = props.shortcutsText,
5472
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
5473
+
5474
+ var _useDatepicker = useDatepicker(otherProps, ref),
5475
+ calendar = _useDatepicker.calendar,
5476
+ input = _useDatepicker.input;
5477
+
5478
+ var _useLocalization = useLocalization(),
5479
+ texts = _useLocalization.texts;
5480
+
5481
+ var className = cn('inline-flex w-full text-black font-normal', externalClassName);
5391
5482
  return React.createElement("span", {
5392
5483
  className: className,
5393
5484
  "data-taco": "datepicker",
@@ -5397,37 +5488,40 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
5397
5488
  "aria-label": texts.datepicker.expand,
5398
5489
  disabled: (_input$disabled = input.disabled) !== null && _input$disabled !== void 0 ? _input$disabled : input.readOnly,
5399
5490
  icon: "calendar"
5400
- })), React.createElement(Popover.Content, null, ({
5401
- close
5402
- }) => React.createElement("div", {
5403
- className: "flex -m-3"
5404
- }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5405
- onChange: (date, event) => {
5406
- calendar.onChange(date, event);
5407
- close();
5408
- },
5409
- tabIndex: -1
5410
- })), shortcuts && React.createElement("div", {
5411
- className: "border-l border-grey-dark flex flex-col"
5412
- }, React.createElement("span", {
5413
- className: "font-semibold text-xs m-4 flex items-center h-8 w-32 mb-3"
5414
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map((shortcut, i) => React.createElement("li", {
5415
- key: i
5416
- }, React.createElement("button", {
5417
- className: "w-full px-4 py-1 flex items-start hover:bg-grey-light text-xs",
5418
- onClick: event => {
5419
- event.persist();
5420
- shortcut.onClick(event);
5421
- close();
5422
- }
5423
- }, shortcut.text)))), handleReset && React.createElement("button", {
5424
- className: "text-blue hover:text-blue-light inline-flex border-none bg-transparent text-xs cursor-pointer mt-auto my-4 mx-auto",
5425
- onClick: event => {
5426
- event.persist();
5427
- handleReset(event);
5428
- close();
5429
- }
5430
- }, texts.datepicker.clear)))))
5491
+ })), React.createElement(Popover.Content, null, function (_ref) {
5492
+ var close = _ref.close;
5493
+ return React.createElement("div", {
5494
+ className: "flex -m-3"
5495
+ }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5496
+ onChange: function onChange(date, event) {
5497
+ calendar.onChange(date, event);
5498
+ close();
5499
+ },
5500
+ tabIndex: -1
5501
+ })), shortcuts && React.createElement("div", {
5502
+ className: "border-l border-grey-dark flex flex-col"
5503
+ }, React.createElement("span", {
5504
+ className: "font-semibold text-xs m-4 flex items-center h-8 w-32 mb-3"
5505
+ }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map(function (shortcut, i) {
5506
+ return React.createElement("li", {
5507
+ key: i
5508
+ }, React.createElement("button", {
5509
+ className: "w-full px-4 py-1 flex items-start hover:bg-grey-light text-xs",
5510
+ onClick: function onClick(event) {
5511
+ event.persist();
5512
+ shortcut.onClick(event);
5513
+ close();
5514
+ }
5515
+ }, shortcut.text));
5516
+ })), handleReset && React.createElement("button", {
5517
+ className: "text-blue hover:text-blue-light inline-flex border-none bg-transparent text-xs cursor-pointer mt-auto my-4 mx-auto",
5518
+ onClick: function onClick(event) {
5519
+ event.persist();
5520
+ handleReset(event);
5521
+ close();
5522
+ }
5523
+ }, texts.datepicker.clear)));
5524
+ }))
5431
5525
  })));
5432
5526
  });
5433
5527
 
@@ -5670,12 +5764,14 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5670
5764
  });
5671
5765
  Extra.displayName = 'DialogExtra';
5672
5766
 
5673
- const useSeparatedChildren = initialChildren => {
5674
- return React.useMemo(() => {
5675
- const children = [];
5676
- let drawer;
5677
- let extra;
5678
- React.Children.toArray(initialChildren).forEach(child => {
5767
+ var _excluded$e = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5768
+
5769
+ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5770
+ return React.useMemo(function () {
5771
+ var children = [];
5772
+ var drawer;
5773
+ var extra;
5774
+ React.Children.toArray(initialChildren).forEach(function (child) {
5679
5775
  var _child$type, _child$type2;
5680
5776
 
5681
5777
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5690,39 +5786,55 @@ const useSeparatedChildren = initialChildren => {
5690
5786
  }, [initialChildren]);
5691
5787
  };
5692
5788
 
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]);
5789
+ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5790
+ var initialChildren = props.children,
5791
+ _props$closeOnEscape = props.closeOnEscape,
5792
+ closeOnEscape = _props$closeOnEscape === void 0 ? true : _props$closeOnEscape,
5793
+ defaultOpen = props.defaultOpen,
5794
+ _props$draggable = props.draggable,
5795
+ draggable = _props$draggable === void 0 ? false : _props$draggable,
5796
+ onChange = props.onChange,
5797
+ onClose = props.onClose,
5798
+ open = props.open,
5799
+ _props$showCloseButto = props.showCloseButton,
5800
+ showCloseButton = _props$showCloseButto === void 0 ? true : _props$showCloseButto,
5801
+ _props$size = props.size,
5802
+ size = _props$size === void 0 ? 'sm' : _props$size,
5803
+ trigger = props.trigger,
5804
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$e);
5805
+
5806
+ var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5807
+ children = _useSeparatedChildren[0],
5808
+ drawer = _useSeparatedChildren[1],
5809
+ extra = _useSeparatedChildren[2];
5810
+
5811
+ var _React$useState = React.useState(false),
5812
+ drawerOpen = _React$useState[0],
5813
+ setDrawerOpen = _React$useState[1];
5814
+
5815
+ var context = React.useMemo(function () {
5816
+ return {
5817
+ closeOnEscape: closeOnEscape,
5818
+ draggable: draggable,
5819
+ drawer: {
5820
+ open: drawerOpen,
5821
+ toggle: function toggle() {
5822
+ return setDrawerOpen(function (isDrawerOpen) {
5823
+ return !isDrawerOpen;
5824
+ });
5825
+ }
5826
+ },
5827
+ elements: {
5828
+ drawer: drawer,
5829
+ extra: extra
5830
+ },
5831
+ onClose: onClose,
5832
+ props: otherProps,
5833
+ showCloseButton: showCloseButton,
5834
+ size: size,
5835
+ ref: ref
5836
+ };
5837
+ }, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5726
5838
  return React.createElement(DialogContext.Provider, {
5727
5839
  value: context
5728
5840
  }, React.createElement(DialogPrimitive.Root, {
@@ -5739,18 +5851,19 @@ Dialog.Extra = Extra;
5739
5851
  Dialog.Drawer = Drawer;
5740
5852
  Dialog.Close = Close$2;
5741
5853
 
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)]', {
5854
+ var _excluded$f = ["disabled", "children", "invalid", "message"];
5855
+ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5856
+ var disabled = props.disabled,
5857
+ children = props.children,
5858
+ _props$invalid = props.invalid,
5859
+ invalid = _props$invalid === void 0 ? false : _props$invalid,
5860
+ message = props.message,
5861
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$f);
5862
+
5863
+ var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5751
5864
  'text-grey-dark': disabled
5752
5865
  }, props.className);
5753
- const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5866
+ var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5754
5867
  'text-grey-darkest': !invalid,
5755
5868
  'text-red': invalid,
5756
5869
  'opacity-50': disabled
@@ -5765,12 +5878,13 @@ const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5765
5878
  }, message));
5766
5879
  });
5767
5880
 
5768
- const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5769
- const {
5770
- horizontal = false,
5771
- ...otherProps
5772
- } = props;
5773
- const className = cn('yt-form', {
5881
+ var _excluded$g = ["horizontal"];
5882
+ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5883
+ var _props$horizontal = props.horizontal,
5884
+ horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5885
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$g);
5886
+
5887
+ var className = cn('yt-form', {
5774
5888
  'yt-form--horizontal flex flex-wrap': horizontal
5775
5889
  }, props.className);
5776
5890
  return React.createElement("form", Object.assign({}, otherProps, {
@@ -5780,12 +5894,13 @@ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5780
5894
  }));
5781
5895
  });
5782
5896
 
5783
- const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5784
- const {
5785
- as: Tag = 'span',
5786
- ...otherProps
5787
- } = props;
5788
- const className = cn('flex ', props.className);
5897
+ var _excluded$h = ["as"];
5898
+ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5899
+ var _props$as = props.as,
5900
+ Tag = _props$as === void 0 ? 'span' : _props$as,
5901
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$h);
5902
+
5903
+ var className = cn('flex ', props.className);
5789
5904
  return React.createElement(Tag, Object.assign({}, otherProps, {
5790
5905
  className: className,
5791
5906
  "data-taco": "group",
@@ -5793,18 +5908,19 @@ const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5793
5908
  }));
5794
5909
  });
5795
5910
 
5796
- const HangerContext = /*#__PURE__*/React.createContext({
5911
+ var _excluded$i = ["anchor", "children", "defaultOpen"];
5912
+ var HangerContext = /*#__PURE__*/React.createContext({
5797
5913
  props: {},
5798
5914
  ref: null
5799
5915
  });
5800
- const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5916
+ var Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5801
5917
  var _props$children;
5802
5918
 
5803
- const context = React.useContext(HangerContext);
5804
- let children = props.children;
5919
+ var context = React.useContext(HangerContext);
5920
+ var children = props.children;
5805
5921
 
5806
5922
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5807
- 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`);
5923
+ 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");
5808
5924
  children = React.createElement("span", null, props.children);
5809
5925
  }
5810
5926
 
@@ -5814,14 +5930,15 @@ const Anchor = /*#__PURE__*/React.forwardRef(function HangerAnchor(props, ref) {
5814
5930
  asChild: true
5815
5931
  }));
5816
5932
  });
5817
- const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5818
- const context = React.useContext(HangerContext);
5819
- const {
5820
- texts
5821
- } = useLocalization();
5822
- const className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent', props.className);
5933
+ var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref) {
5934
+ var context = React.useContext(HangerContext);
5935
+
5936
+ var _useLocalization = useLocalization(),
5937
+ texts = _useLocalization.texts;
5823
5938
 
5824
- const handleInteractOutside = event => {
5939
+ var className = cn('wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent', props.className);
5940
+
5941
+ var handleInteractOutside = function handleInteractOutside(event) {
5825
5942
  event.preventDefault();
5826
5943
  };
5827
5944
 
@@ -5843,20 +5960,25 @@ const Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, re
5843
5960
  onClick: context.props.onClose
5844
5961
  })));
5845
5962
  });
5846
- const Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5847
- const {
5848
- anchor,
5849
- children,
5850
- defaultOpen = true,
5851
- ...otherProps
5852
- } = props;
5853
- const context = React.useMemo(() => ({
5854
- props: otherProps,
5855
- ref
5856
- }), [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5963
+ var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5964
+ var anchor = props.anchor,
5965
+ children = props.children,
5966
+ _props$defaultOpen = props.defaultOpen,
5967
+ defaultOpen = _props$defaultOpen === void 0 ? true : _props$defaultOpen,
5968
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$i);
5969
+
5970
+ var context = React.useMemo(function () {
5971
+ return {
5972
+ props: otherProps,
5973
+ ref: ref
5974
+ };
5975
+ }, [otherProps]); // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal
5857
5976
 
5858
- const [open, setOpen] = React.useState(false);
5859
- React.useEffect(() => {
5977
+ var _React$useState = React.useState(false),
5978
+ open = _React$useState[0],
5979
+ setOpen = _React$useState[1];
5980
+
5981
+ React.useEffect(function () {
5860
5982
  if (defaultOpen) {
5861
5983
  setOpen(defaultOpen);
5862
5984
  }
@@ -6215,49 +6337,49 @@ const useMultiListbox = ({
6215
6337
  };
6216
6338
  };
6217
6339
 
6218
- const Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6219
- const {
6220
- className: externalClassName,
6221
- ...otherProps
6222
- } = props;
6223
- const {
6224
- list,
6225
- input
6226
- } = useListbox(otherProps, ref);
6227
- const className = cn('bg-white inline-flex relative w-full', externalClassName);
6340
+ var _excluded$j = ["className"],
6341
+ _excluded2$1 = ["className"];
6342
+ var Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6343
+ var externalClassName = props.className,
6344
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$j);
6345
+
6346
+ var _useListbox = useListbox(otherProps, ref),
6347
+ list = _useListbox.list,
6348
+ input = _useListbox.input;
6349
+
6350
+ var className = cn('bg-white inline-flex relative w-full', externalClassName);
6228
6351
  return React.createElement("span", {
6229
6352
  "data-taco": "listbox",
6230
6353
  className: className
6231
6354
  }, React.createElement(ScrollableList, Object.assign({}, list, {
6232
- style: { ...list.style,
6355
+ style: _extends({}, list.style, {
6233
6356
  maxHeight: 'calc(12rem + 2px)'
6234
6357
  /* (6 * option height) + listbox border */
6235
6358
 
6236
- }
6359
+ })
6237
6360
  })), React.createElement("input", Object.assign({}, input, {
6238
6361
  className: "hidden",
6239
6362
  type: "text"
6240
6363
  })));
6241
6364
  });
6242
- const MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6243
- const {
6244
- className: externalClassName,
6245
- ...otherProps
6246
- } = props;
6247
- const {
6248
- list,
6249
- input
6250
- } = useMultiListbox(otherProps, ref);
6251
- const className = cn('bg-white inline-flex relative w-full', externalClassName);
6365
+ var MultiListbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6366
+ var externalClassName = props.className,
6367
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2$1);
6368
+
6369
+ var _useMultiListbox = useMultiListbox(otherProps, ref),
6370
+ list = _useMultiListbox.list,
6371
+ input = _useMultiListbox.input;
6372
+
6373
+ var className = cn('bg-white inline-flex relative w-full', externalClassName);
6252
6374
  return React.createElement("span", {
6253
6375
  "data-taco": "listbox",
6254
6376
  className: className
6255
6377
  }, React.createElement(ScrollableList, Object.assign({}, list, {
6256
- style: { ...list.style,
6378
+ style: _extends({}, list.style, {
6257
6379
  maxHeight: 'calc(12rem + 2px + 2px)'
6258
6380
  /* (6 * option height) + listbox border + ALL_OPTIONS bottom border */
6259
6381
 
6260
- }
6382
+ })
6261
6383
  })), React.createElement("input", Object.assign({}, input, {
6262
6384
  className: "hidden",
6263
6385
  type: "text"
@@ -6520,26 +6642,34 @@ const Checkbox$1 = props => {
6520
6642
  })), children);
6521
6643
  };
6522
6644
 
6523
- const getRadioGroupItemValueAsString = value => value === null ? '' : String(value);
6524
- const findByValue$1 = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
6525
- const RadioGroupContext = /*#__PURE__*/React.createContext({
6645
+ var _excluded$k = ["children", "value"],
6646
+ _excluded2$2 = ["children", "defaultValue", "disabled", "invalid", "onChange", "orientation", "value"];
6647
+ var getRadioGroupItemValueAsString = function getRadioGroupItemValueAsString(value) {
6648
+ return value === null ? '' : String(value);
6649
+ };
6650
+ var findByValue$1 = function findByValue(values, valueAsString) {
6651
+ return values.find(function (value) {
6652
+ return getRadioGroupItemValueAsString(value) === valueAsString;
6653
+ });
6654
+ };
6655
+ var RadioGroupContext = /*#__PURE__*/React.createContext({
6526
6656
  disabled: false,
6527
6657
  invalid: false
6528
6658
  });
6529
- const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
6530
- const context = React.useContext(RadioGroupContext);
6531
- const {
6532
- children,
6533
- value,
6534
- ...otherProps
6535
- } = props;
6536
- const disabled = context.disabled || props.disabled;
6537
- 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 ', {
6659
+ var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
6660
+ var context = React.useContext(RadioGroupContext);
6661
+
6662
+ var children = props.children,
6663
+ value = props.value,
6664
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$k);
6665
+
6666
+ var disabled = context.disabled || props.disabled;
6667
+ 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 ', {
6538
6668
  'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue': !disabled && !context.invalid,
6539
6669
  'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,
6540
6670
  'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !disabled
6541
6671
  });
6542
- const labelClassName = cn('flex items-center cursor-pointer', {
6672
+ var labelClassName = cn('flex items-center cursor-pointer', {
6543
6673
  'cursor-not-allowed text-grey-dark': disabled
6544
6674
  }, props.className);
6545
6675
  return React.createElement("label", {
@@ -6553,34 +6683,38 @@ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(pro
6553
6683
  className: "h-2 w-2 rounded-full bg-white"
6554
6684
  })), children);
6555
6685
  });
6556
- const useRadioGroup = props => {
6557
- const {
6558
- children,
6559
- defaultValue,
6560
- disabled,
6561
- invalid,
6562
- onChange,
6563
- orientation = 'vertical',
6564
- value,
6565
- ...otherProps
6566
- } = props;
6567
- const values = React.useMemo(() => {
6568
- const radioGroupItemValues = [];
6569
- React.Children.forEach(children, child => {
6686
+ var useRadioGroup = function useRadioGroup(props) {
6687
+ var children = props.children,
6688
+ defaultValue = props.defaultValue,
6689
+ disabled = props.disabled,
6690
+ invalid = props.invalid,
6691
+ onChange = props.onChange,
6692
+ _props$orientation = props.orientation,
6693
+ orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
6694
+ value = props.value,
6695
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2$2);
6696
+
6697
+ var values = React.useMemo(function () {
6698
+ var radioGroupItemValues = [];
6699
+ React.Children.forEach(children, function (child) {
6570
6700
  if (React.isValidElement(child)) {
6571
6701
  radioGroupItemValues.push(child.props.value);
6572
6702
  }
6573
6703
  });
6574
6704
  return radioGroupItemValues;
6575
6705
  }, [children]);
6576
- const context = React.useMemo(() => ({
6577
- disabled: disabled !== null && disabled !== void 0 ? disabled : false,
6578
- invalid: invalid !== null && invalid !== void 0 ? invalid : false
6579
- }), [disabled, invalid]);
6580
- let valueProps;
6706
+ var context = React.useMemo(function () {
6707
+ return {
6708
+ disabled: disabled !== null && disabled !== void 0 ? disabled : false,
6709
+ invalid: invalid !== null && invalid !== void 0 ? invalid : false
6710
+ };
6711
+ }, [disabled, invalid]);
6712
+ var valueProps;
6581
6713
 
6582
6714
  if (onChange !== undefined) {
6583
- const handleChange = value => onChange(findByValue$1(values, value));
6715
+ var handleChange = function handleChange(value) {
6716
+ return onChange(findByValue$1(values, value));
6717
+ };
6584
6718
 
6585
6719
  valueProps = {
6586
6720
  onValueChange: handleChange,
@@ -6593,20 +6727,19 @@ const useRadioGroup = props => {
6593
6727
  }
6594
6728
 
6595
6729
  return {
6596
- context,
6597
- props: { ...otherProps,
6598
- ...valueProps,
6599
- children,
6600
- orientation
6601
- }
6730
+ context: context,
6731
+ props: _extends({}, otherProps, valueProps, {
6732
+ children: children,
6733
+ orientation: orientation
6734
+ })
6602
6735
  };
6603
6736
  };
6604
- const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
6605
- const {
6606
- context,
6607
- props: otherProps
6608
- } = useRadioGroup(props);
6609
- const className = cn('flex items-start', {
6737
+ var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
6738
+ var _useRadioGroup = useRadioGroup(props),
6739
+ context = _useRadioGroup.context,
6740
+ otherProps = _useRadioGroup.props;
6741
+
6742
+ var className = cn('flex items-start', {
6610
6743
  'flex-wrap space-x-4': otherProps.orientation === 'horizontal',
6611
6744
  'flex-col space-y-2': otherProps.orientation === 'vertical'
6612
6745
  }, otherProps.className);
@@ -6719,26 +6852,48 @@ const Header = props => {
6719
6852
  }));
6720
6853
  };
6721
6854
 
6722
- const Menu = externalProps => {
6723
- const {
6724
- appearance: externalAppearance,
6725
- children,
6726
- trigger,
6727
- ...props
6728
- } = externalProps;
6729
- const [open, setOpen] = React.useState(false);
6730
- const [appearance, setAppearance] = React.useState(externalAppearance !== null && externalAppearance !== void 0 ? externalAppearance : 'default');
6731
- const [indented, setIndented] = React.useState(false);
6732
- const [minWidth, setMinWidth] = React.useState(undefined);
6733
- const context = React.useMemo(() => ({
6734
- appearance,
6735
- setAppearance: appearance => setAppearance(appearance),
6736
- indented,
6737
- registerIndentation: () => setIndented(true),
6738
- minWidth,
6739
- setMinWidth: width => setMinWidth(width),
6740
- close: () => setOpen(false)
6741
- }), [indented, minWidth, appearance]);
6855
+ var _excluded$l = ["appearance", "children", "trigger"];
6856
+ var Menu = function Menu(externalProps) {
6857
+ var externalAppearance = externalProps.appearance,
6858
+ children = externalProps.children,
6859
+ trigger = externalProps.trigger,
6860
+ props = _objectWithoutPropertiesLoose(externalProps, _excluded$l);
6861
+
6862
+ var _React$useState = React.useState(false),
6863
+ open = _React$useState[0],
6864
+ setOpen = _React$useState[1];
6865
+
6866
+ var _React$useState2 = React.useState(externalAppearance !== null && externalAppearance !== void 0 ? externalAppearance : 'default'),
6867
+ appearance = _React$useState2[0],
6868
+ _setAppearance = _React$useState2[1];
6869
+
6870
+ var _React$useState3 = React.useState(false),
6871
+ indented = _React$useState3[0],
6872
+ setIndented = _React$useState3[1];
6873
+
6874
+ var _React$useState4 = React.useState(undefined),
6875
+ minWidth = _React$useState4[0],
6876
+ _setMinWidth = _React$useState4[1];
6877
+
6878
+ var context = React.useMemo(function () {
6879
+ return {
6880
+ appearance: appearance,
6881
+ setAppearance: function setAppearance(appearance) {
6882
+ return _setAppearance(appearance);
6883
+ },
6884
+ indented: indented,
6885
+ registerIndentation: function registerIndentation() {
6886
+ return setIndented(true);
6887
+ },
6888
+ minWidth: minWidth,
6889
+ setMinWidth: function setMinWidth(width) {
6890
+ return _setMinWidth(width);
6891
+ },
6892
+ close: function close() {
6893
+ return setOpen(false);
6894
+ }
6895
+ };
6896
+ }, [indented, minWidth, appearance]);
6742
6897
  return React.createElement(MenuContext.Provider, {
6743
6898
  value: context
6744
6899
  }, React.createElement(DropdownMenuPrimitive.Root, Object.assign({}, props, {
@@ -6756,39 +6911,44 @@ Menu.Separator = Separator;
6756
6911
  Menu.Header = Header;
6757
6912
  Menu.RadioGroup = RadioGroup$1;
6758
6913
 
6759
- const TreeviewItem = /*#__PURE__*/React__default.forwardRef(function TreeviewItem(props, ref) {
6914
+ var _excluded$m = ["children", "className", "expanded", "title", "fixed", "onClick"];
6915
+ var TreeviewItem = /*#__PURE__*/React__default.forwardRef(function TreeviewItem(props, ref) {
6760
6916
  return React__default.createElement("a", Object.assign({}, props, {
6761
6917
  ref: ref
6762
6918
  }));
6763
6919
  });
6764
- const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGroup(props, ref) {
6765
- const {
6766
- children,
6767
- className: externalClassName,
6768
- expanded: initialExpanded = false,
6769
- title,
6770
- fixed,
6771
- onClick,
6772
- ...otherProps
6773
- } = props;
6774
- const [expanded, setExpanded] = React__default.useState(fixed || initialExpanded);
6775
- React__default.useEffect(() => {
6920
+ var TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGroup(props, ref) {
6921
+ var children = props.children,
6922
+ externalClassName = props.className,
6923
+ _props$expanded = props.expanded,
6924
+ initialExpanded = _props$expanded === void 0 ? false : _props$expanded,
6925
+ title = props.title,
6926
+ fixed = props.fixed,
6927
+ onClick = props.onClick,
6928
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$m);
6929
+
6930
+ var _React$useState = React__default.useState(fixed || initialExpanded),
6931
+ expanded = _React$useState[0],
6932
+ setExpanded = _React$useState[1];
6933
+
6934
+ React__default.useEffect(function () {
6776
6935
  if (!fixed) {
6777
6936
  setExpanded(fixed || initialExpanded);
6778
6937
  }
6779
6938
  }, [fixed, initialExpanded]);
6780
- const listClassName = cn('flex-col mb-0', {
6939
+ var listClassName = cn('flex-col mb-0', {
6781
6940
  flex: expanded,
6782
6941
  hidden: !expanded
6783
6942
  });
6784
- const itemProps = { ...otherProps,
6943
+
6944
+ var itemProps = _extends({}, otherProps, {
6785
6945
  'aria-expanded': expanded,
6786
6946
  role: 'treeitem',
6787
6947
  tabIndex: -1
6788
- };
6948
+ });
6789
6949
 
6790
- const handleClick = event => {
6791
- const nextState = !expanded;
6950
+ var handleClick = function handleClick(event) {
6951
+ var nextState = !expanded;
6792
6952
 
6793
6953
  if (!fixed) {
6794
6954
  setExpanded(nextState);
@@ -6799,7 +6959,7 @@ const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGr
6799
6959
  }
6800
6960
  };
6801
6961
 
6802
- const className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;
6962
+ var className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;
6803
6963
  return React__default.createElement("div", Object.assign({}, itemProps, {
6804
6964
  className: className,
6805
6965
  ref: ref
@@ -6808,14 +6968,18 @@ const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGr
6808
6968
  }, typeof title === 'function' ? title(expanded) : title), React__default.createElement("ul", {
6809
6969
  role: "group",
6810
6970
  className: listClassName
6811
- }, React__default.Children.toArray(children).filter(item => !!item).map((item, i) => React__default.createElement("li", {
6812
- key: i,
6813
- role: "none"
6814
- }, React__default.cloneElement(item, {
6815
- role: 'treeitem'
6816
- })))));
6971
+ }, React__default.Children.toArray(children).filter(function (item) {
6972
+ return !!item;
6973
+ }).map(function (item, i) {
6974
+ return React__default.createElement("li", {
6975
+ key: i,
6976
+ role: "none"
6977
+ }, React__default.cloneElement(item, {
6978
+ role: 'treeitem'
6979
+ }));
6980
+ })));
6817
6981
  });
6818
- const Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, ref) {
6982
+ var Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, ref) {
6819
6983
  return React__default.createElement("div", Object.assign({}, props, {
6820
6984
  ref: ref,
6821
6985
  role: "tree"
@@ -6858,20 +7022,25 @@ const useDropTarget = onDrop => {
6858
7022
  return [isDraggedOver, props];
6859
7023
  };
6860
7024
 
6861
- const Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
6862
- const {
6863
- active,
6864
- children,
6865
- onDrop,
6866
- postfix,
6867
- prefix,
6868
- role,
6869
- ...otherProps
6870
- } = props;
6871
- const proxyRef = useProxiedRef(ref);
6872
- const [isDraggedOver, dropTargetProps] = useDropTarget(onDrop);
6873
- const isTreeitem = role === 'treeitem';
6874
- const className = cn('yt-navigation__item cursor-pointer', {
7025
+ var _excluded$n = ["active", "children", "onDrop", "postfix", "prefix", "role"],
7026
+ _excluded2$3 = ["children"];
7027
+ var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
7028
+ var active = props.active,
7029
+ children = props.children,
7030
+ onDrop = props.onDrop,
7031
+ postfix = props.postfix,
7032
+ prefix = props.prefix,
7033
+ role = props.role,
7034
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$n);
7035
+
7036
+ var proxyRef = useProxiedRef(ref);
7037
+
7038
+ var _useDropTarget = useDropTarget(onDrop),
7039
+ isDraggedOver = _useDropTarget[0],
7040
+ dropTargetProps = _useDropTarget[1];
7041
+
7042
+ var isTreeitem = role === 'treeitem';
7043
+ var className = cn('yt-navigation__item cursor-pointer', {
6875
7044
  'w-full mb-px py-1 px-3 flex items-center hover:bg-grey-dark': isTreeitem,
6876
7045
  'bg-white w-full h-10 px-3 flex-shrink-0 flex items-center justify-between cursor-pointer': !isTreeitem,
6877
7046
  'yt-navigation__item--active': active && !isDraggedOver,
@@ -6879,7 +7048,7 @@ const Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
6879
7048
  'yt-navigation__item--dropping bg-blue': isDraggedOver
6880
7049
  }, props.className);
6881
7050
 
6882
- const handleClick = event => {
7051
+ var handleClick = function handleClick(event) {
6883
7052
  if (event.target instanceof HTMLAnchorElement || event.target instanceof HTMLButtonElement) {
6884
7053
  return;
6885
7054
  }
@@ -6902,19 +7071,19 @@ const Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref)
6902
7071
  className: "yt-navigation__item__postfix ml-1"
6903
7072
  }, postfix));
6904
7073
  });
6905
- const Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
7074
+ var Panel = /*#__PURE__*/React__default.forwardRef(function Panel(props, ref) {
6906
7075
  return React__default.createElement("div", Object.assign({}, props, {
6907
7076
  className: cn('w-full bg-white p-3', props.className),
6908
7077
  ref: ref
6909
7078
  }));
6910
7079
  });
6911
- const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
6912
- const className = cn('flex-shrink-0 space-y-1 outline-none', {
7080
+ var MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(props, ref) {
7081
+ var className = cn('flex-shrink-0 space-y-1 outline-none', {
6913
7082
  'bg-white pb-2': props.fixed
6914
7083
  }, props.className);
6915
7084
 
6916
- const title = expanded => {
6917
- const className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
7085
+ var title = function title(expanded) {
7086
+ var className = cn('bg-white h-10 pl-3 pr-1 flex items-center justify-between w-full', {
6918
7087
  'mb-1': expanded,
6919
7088
  'cursor-pointer hover:text-blue': !props.fixed
6920
7089
  });
@@ -6931,14 +7100,16 @@ const MenuGroup = /*#__PURE__*/React__default.forwardRef(function MenuGroup(prop
6931
7100
  ref: ref
6932
7101
  }));
6933
7102
  });
6934
- const Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
6935
- const scrollableAreas = React__default.useMemo(() => {
6936
- const scrollableAreas = [];
6937
- React__default.Children.toArray(props.children).filter(child => !!child).map(child => {
7103
+ var Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
7104
+ var scrollableAreas = React__default.useMemo(function () {
7105
+ var scrollableAreas = [];
7106
+ React__default.Children.toArray(props.children).filter(function (child) {
7107
+ return !!child;
7108
+ }).map(function (child) {
6938
7109
  if (child.props.fixed) {
6939
7110
  scrollableAreas.push(child);
6940
7111
  } else {
6941
- const x = scrollableAreas[scrollableAreas.length - 1];
7112
+ var x = scrollableAreas[scrollableAreas.length - 1];
6942
7113
 
6943
7114
  if (Array.isArray(x)) {
6944
7115
  x.push(child);
@@ -6952,18 +7123,19 @@ const Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref)
6952
7123
  return React__default.createElement(Treeview, Object.assign({}, props, {
6953
7124
  className: cn('divide-grey-light flex flex-grow flex-col divide-y-2 overflow-y-auto', props.className),
6954
7125
  ref: ref
6955
- }), scrollableAreas.map((area, i) => Array.isArray(area) ? React__default.createElement("div", {
6956
- className: "divide-grey-light flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
6957
- key: i
6958
- }, area) : area));
7126
+ }), scrollableAreas.map(function (area, i) {
7127
+ return Array.isArray(area) ? React__default.createElement("div", {
7128
+ className: "divide-grey-light flex h-0 flex-auto flex-shrink-0 flex-grow flex-col divide-y-2 overflow-y-auto",
7129
+ key: i
7130
+ }, area) : area;
7131
+ }));
6959
7132
  });
6960
7133
  Menu$1.Group = MenuGroup;
6961
- const Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
6962
- const {
6963
- children,
6964
- ...otherProps
6965
- } = props;
6966
- const className = cn('h-full flex flex-col bg-grey-light divide-y-2 divide-grey-light', props.className);
7134
+ var Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
7135
+ var children = props.children,
7136
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2$3);
7137
+
7138
+ var className = cn('h-full flex flex-col bg-grey-light divide-y-2 divide-grey-light', props.className);
6967
7139
  return React__default.createElement("div", Object.assign({}, otherProps, {
6968
7140
  className: className,
6969
7141
  "data-taco": "navigation",
@@ -7204,52 +7376,54 @@ const useSelect = ({
7204
7376
  };
7205
7377
  };
7206
7378
 
7207
- const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7208
- const {
7209
- autoFocus,
7210
- className: externalClassName,
7211
- highlighted,
7212
- style,
7213
- ...otherProps
7214
- } = props;
7215
- const {
7216
- button,
7217
- listbox,
7218
- popover,
7219
- input,
7220
- text,
7221
- more = 0
7222
- } = useSelect(otherProps, ref);
7223
- const internalRef = React.useRef(null);
7224
- const selectDimensions = useBoundingClientRectListener(internalRef);
7225
- const className = cn('inline-flex relative w-full', {
7379
+ var _excluded$o = ["autoFocus", "className", "highlighted", "style"],
7380
+ _excluded2$4 = ["editable"];
7381
+ var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7382
+ var autoFocus = props.autoFocus,
7383
+ externalClassName = props.className,
7384
+ style = props.style,
7385
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$o);
7386
+
7387
+ var _useSelect = useSelect(otherProps, ref),
7388
+ button = _useSelect.button,
7389
+ listbox = _useSelect.listbox,
7390
+ popover = _useSelect.popover,
7391
+ input = _useSelect.input,
7392
+ text = _useSelect.text,
7393
+ _useSelect$more = _useSelect.more,
7394
+ more = _useSelect$more === void 0 ? 0 : _useSelect$more;
7395
+
7396
+ var internalRef = React.useRef(null);
7397
+ var selectDimensions = useBoundingClientRectListener(internalRef);
7398
+ var className = cn('inline-flex relative w-full', {
7226
7399
  'yt-select--readonly': props.readOnly
7227
7400
  }, externalClassName);
7228
- const inputClassname = cn(getInputClasses(props), 'h-8 text-left pr-0', {
7401
+ var inputClassname = cn(getInputClasses(props), 'h-8 text-left pr-0', {
7229
7402
  'border-blue': popover.open
7230
7403
  });
7231
- React.useEffect(() => {
7404
+ React.useEffect(function () {
7232
7405
  if (autoFocus && internalRef.current) {
7233
7406
  internalRef.current.focus();
7234
7407
  }
7235
7408
  }, []);
7236
7409
 
7237
- const renderMultiSelection = () => {
7410
+ var renderMultiSelection = function renderMultiSelection() {
7238
7411
  return React.createElement(React.Fragment, null, React.createElement("span", {
7239
7412
  className: "flex-grow truncate text-left"
7240
7413
  }, text), more > 0 && React.createElement(Badge, {
7241
7414
  className: "ml-2"
7242
- }, `+${more}`));
7415
+ }, "+" + more));
7243
7416
  };
7244
7417
 
7245
- const commonListboxProps = { ...listbox,
7418
+ var commonListboxProps = _extends({}, listbox, {
7246
7419
  className: 'w-auto',
7247
7420
  invalid: undefined,
7248
7421
  style: {
7249
7422
  minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
7250
7423
  },
7251
7424
  tabIndex: popover.open ? 0 : -1
7252
- };
7425
+ });
7426
+
7253
7427
  return React.createElement("span", {
7254
7428
  className: className,
7255
7429
  "data-taco": "select",
@@ -7272,11 +7446,9 @@ const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref)
7272
7446
  type: "text"
7273
7447
  }))));
7274
7448
  });
7275
- const Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
7276
- const {
7277
- editable,
7278
- ...otherProps
7279
- } = props;
7449
+ var Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
7450
+ var editable = props.editable,
7451
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2$4);
7280
7452
 
7281
7453
  if (editable) {
7282
7454
  return React.createElement(Combobox, Object.assign({}, otherProps, {
@@ -7347,41 +7519,47 @@ const usePagination = (initialPageIndex = 0, initialPageSize = 10) => {
7347
7519
  };
7348
7520
  };
7349
7521
 
7350
- const getShowingLabel = (length, pageIndex, pageSize, texts) => {
7351
- const minItemIndex = pageIndex * pageSize + 1;
7352
- const maxItemIndex = (pageIndex + 1) * pageSize;
7522
+ var _excluded$p = ["length", "pageIndex", "pageSize", "pageSizes", "setPageIndex", "setPageSize", "showPageControls", "showPageNumbers", "showPageSize", "dangerouslyHijackGlobalKeyboardNavigation"];
7523
+
7524
+ var getShowingLabel = function getShowingLabel(length, pageIndex, pageSize, texts) {
7525
+ var minItemIndex = pageIndex * pageSize + 1;
7526
+ var maxItemIndex = (pageIndex + 1) * pageSize;
7353
7527
  return texts.pagination.showingXofYofTotal.replace('[X]', length === 0 ? '0' : String(minItemIndex)).replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex)).replace('[total]', String(length));
7354
7528
  };
7355
7529
 
7356
- const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7357
- const {
7358
- length,
7359
- pageIndex,
7360
- pageSize,
7361
- pageSizes = [10, 25, 50, 100, 500],
7362
- setPageIndex,
7363
- setPageSize,
7364
- showPageControls = true,
7365
- showPageNumbers = true,
7366
- showPageSize = true,
7367
- dangerouslyHijackGlobalKeyboardNavigation = false,
7368
- ...otherProps
7369
- } = props;
7370
- const {
7371
- texts
7372
- } = useLocalization();
7373
- const maxPageIndex = Math.ceil(length / pageSize) - 1;
7374
- const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
7530
+ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7531
+ var length = props.length,
7532
+ pageIndex = props.pageIndex,
7533
+ pageSize = props.pageSize,
7534
+ _props$pageSizes = props.pageSizes,
7535
+ pageSizes = _props$pageSizes === void 0 ? [10, 25, 50, 100, 500] : _props$pageSizes,
7536
+ setPageIndex = props.setPageIndex,
7537
+ setPageSize = props.setPageSize,
7538
+ _props$showPageContro = props.showPageControls,
7539
+ showPageControls = _props$showPageContro === void 0 ? true : _props$showPageContro,
7540
+ _props$showPageNumber = props.showPageNumbers,
7541
+ showPageNumbers = _props$showPageNumber === void 0 ? true : _props$showPageNumber,
7542
+ _props$showPageSize = props.showPageSize,
7543
+ showPageSize = _props$showPageSize === void 0 ? true : _props$showPageSize,
7544
+ _props$dangerouslyHij = props.dangerouslyHijackGlobalKeyboardNavigation,
7545
+ dangerouslyHijackGlobalKeyboardNavigation = _props$dangerouslyHij === void 0 ? false : _props$dangerouslyHij,
7546
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$p);
7547
+
7548
+ var _useLocalization = useLocalization(),
7549
+ texts = _useLocalization.texts;
7550
+
7551
+ var maxPageIndex = Math.ceil(length / pageSize) - 1;
7552
+ var showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
7375
7553
  usePaginationShortcuts({
7376
- setPageIndex,
7377
- maxPageIndex,
7378
- pageIndex,
7379
- dangerouslyHijackGlobalKeyboardNavigation
7554
+ setPageIndex: setPageIndex,
7555
+ maxPageIndex: maxPageIndex,
7556
+ pageIndex: pageIndex,
7557
+ dangerouslyHijackGlobalKeyboardNavigation: dangerouslyHijackGlobalKeyboardNavigation
7380
7558
  });
7381
- const pageCount = Math.ceil(length / pageSize);
7382
- const canPreviousPage = pageIndex > 0;
7383
- const canNextPage = pageIndex < pageCount - 1;
7384
- const className = cn('inline-flex relative justify-between items-center', props.className);
7559
+ var pageCount = Math.ceil(length / pageSize);
7560
+ var canPreviousPage = pageIndex > 0;
7561
+ var canNextPage = pageIndex < pageCount - 1;
7562
+ var className = cn('inline-flex relative justify-between items-center', props.className);
7385
7563
  return React.createElement("div", Object.assign({}, otherProps, {
7386
7564
  className: className,
7387
7565
  "data-taco": "pagination",
@@ -7391,11 +7569,13 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
7391
7569
  }, getShowingLabel(length, pageIndex, pageSize, texts), React.createElement(Select, {
7392
7570
  "aria-label": texts.pagination.pageSize,
7393
7571
  className: "ml-4 !w-20",
7394
- data: pageSizes.map(pageSize => ({
7395
- text: String(pageSize),
7396
- value: pageSize
7397
- })),
7398
- onChange: event => {
7572
+ data: pageSizes.map(function (pageSize) {
7573
+ return {
7574
+ text: String(pageSize),
7575
+ value: pageSize
7576
+ };
7577
+ }),
7578
+ onChange: function onChange(event) {
7399
7579
  setPageIndex(0);
7400
7580
  setPageSize(Number(event.target.value));
7401
7581
  },
@@ -7407,14 +7587,18 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
7407
7587
  appearance: "default",
7408
7588
  disabled: !canPreviousPage,
7409
7589
  icon: "arrow-start",
7410
- onClick: () => setPageIndex(0),
7590
+ onClick: function onClick() {
7591
+ return setPageIndex(0);
7592
+ },
7411
7593
  "aria-label": showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage,
7412
7594
  tooltip: showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage
7413
7595
  }), React.createElement(IconButton, {
7414
7596
  appearance: "default",
7415
7597
  disabled: !canPreviousPage,
7416
7598
  icon: "arrow-left",
7417
- onClick: () => setPageIndex(pageIndex - 1),
7599
+ onClick: function onClick() {
7600
+ return setPageIndex(pageIndex - 1);
7601
+ },
7418
7602
  "aria-label": showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage,
7419
7603
  tooltip: showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage
7420
7604
  }), showPageNumbers && pageCount > 0 && React.createElement(PageNumbers, {
@@ -7425,36 +7609,43 @@ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref)
7425
7609
  appearance: "default",
7426
7610
  disabled: !canNextPage,
7427
7611
  icon: "arrow-right",
7428
- onClick: () => setPageIndex(pageIndex + 1),
7612
+ onClick: function onClick() {
7613
+ return setPageIndex(pageIndex + 1);
7614
+ },
7429
7615
  "aria-label": showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage,
7430
7616
  tooltip: showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage
7431
7617
  }), React.createElement(IconButton, {
7432
7618
  appearance: "default",
7433
7619
  disabled: !canNextPage,
7434
7620
  icon: "arrow-end",
7435
- onClick: () => setPageIndex(pageCount - 1),
7621
+ onClick: function onClick() {
7622
+ return setPageIndex(pageCount - 1);
7623
+ },
7436
7624
  "aria-label": showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage,
7437
7625
  tooltip: showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage
7438
7626
  })));
7439
7627
  });
7440
7628
 
7441
- const Progress = ({
7442
- duration = undefined,
7443
- ...props
7444
- }) => {
7445
- let style;
7629
+ var _excluded$q = ["duration"];
7630
+ var Progress = function Progress(_ref) {
7631
+ var _cn;
7632
+
7633
+ var _ref$duration = _ref.duration,
7634
+ duration = _ref$duration === void 0 ? undefined : _ref$duration,
7635
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
7636
+
7637
+ var style;
7446
7638
 
7447
7639
  if (duration) {
7448
7640
  style = {
7449
- animationDuration: `${duration}ms`
7641
+ animationDuration: duration + "ms"
7450
7642
  };
7451
7643
  }
7452
7644
 
7453
- const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
7454
- const progressClassName = cn('yt-progress__bar block h-1', {
7455
- "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,
7456
- [`w-0 bg-grey-dark animate-[progress_linear]`]: duration
7457
- });
7645
+ var className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
7646
+ var progressClassName = cn('yt-progress__bar block h-1', (_cn = {
7647
+ "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
7648
+ }, _cn["w-0 bg-grey-dark animate-[progress_linear]"] = duration, _cn));
7458
7649
  return React__default.createElement("span", Object.assign({}, props, {
7459
7650
  "data-taco": "progress",
7460
7651
  className: className
@@ -9064,16 +9255,19 @@ const useTableRowCreation = (data, tableRef) => {
9064
9255
  };
9065
9256
  };
9066
9257
 
9067
- const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
9068
- const {
9069
- id,
9070
- defaultId,
9071
- children,
9072
- onChange,
9073
- orientation = 'horizontal',
9074
- ...otherProps
9075
- } = props;
9076
- const className = cn('yt-tabs', `yt-tabs--${orientation}`, {
9258
+ var _excluded$r = ["id", "defaultId", "children", "onChange", "orientation"],
9259
+ _excluded2$5 = ["id", "disabled"],
9260
+ _excluded3 = ["id"];
9261
+ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
9262
+ var id = props.id,
9263
+ defaultId = props.defaultId,
9264
+ children = props.children,
9265
+ onChange = props.onChange,
9266
+ _props$orientation = props.orientation,
9267
+ orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
9268
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$r);
9269
+
9270
+ var className = cn('yt-tabs', "yt-tabs--" + orientation, {
9077
9271
  'flex w-full': orientation === 'vertical'
9078
9272
  }, props.className);
9079
9273
  return React.createElement(TabsPrimitive.Root, Object.assign({}, otherProps, {
@@ -9087,20 +9281,19 @@ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
9087
9281
  value: id
9088
9282
  }), children);
9089
9283
  });
9090
- const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9091
- const className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);
9284
+ var TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9285
+ var className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);
9092
9286
  return React.createElement(TabsPrimitive.List, Object.assign({}, props, {
9093
9287
  className: className,
9094
9288
  ref: ref
9095
9289
  }));
9096
9290
  });
9097
- const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9098
- const {
9099
- id,
9100
- disabled,
9101
- ...otherProps
9102
- } = props;
9103
- const className = cn('yt-tab bg-transparent border-b-2 border-transparent text-grey-darkest m-0 py-2 px-4', disabled ? 'cursor-not-allowed !text-grey' : 'cursor-pointer rounded-t hover:border-grey-light hover:text-black active:yt-focus active:border-blue focus:yt-focus focus:border-blue', props.className);
9291
+ var TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9292
+ var id = props.id,
9293
+ disabled = props.disabled,
9294
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2$5);
9295
+
9296
+ var className = cn('yt-tab bg-transparent border-b-2 border-transparent text-grey-darkest m-0 py-2 px-4', disabled ? 'cursor-not-allowed !text-grey' : 'cursor-pointer rounded-t hover:border-grey-light hover:text-black active:yt-focus active:border-blue focus:yt-focus focus:border-blue', props.className);
9104
9297
  return React.createElement(TabsPrimitive.Trigger, Object.assign({}, otherProps, {
9105
9298
  className: className,
9106
9299
  disabled: disabled,
@@ -9111,12 +9304,11 @@ const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9111
9304
  value: id
9112
9305
  }));
9113
9306
  });
9114
- const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9115
- const {
9116
- id,
9117
- ...otherProps
9118
- } = props;
9119
- const className = cn('yt-tab__panel outline-none', props.className);
9307
+ var TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9308
+ var id = props.id,
9309
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded3);
9310
+
9311
+ var className = cn('yt-tab__panel outline-none', props.className);
9120
9312
  return React.createElement(TabsPrimitive.Content, Object.assign({}, otherProps, {
9121
9313
  className: className,
9122
9314
  ref: ref,
@@ -9127,22 +9319,19 @@ Tabs.List = TabList;
9127
9319
  Tabs.Trigger = TabTrigger;
9128
9320
  Tabs.Content = TabContent;
9129
9321
 
9130
- const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9131
- const {
9132
- defaultValue: _,
9133
- highlighted,
9134
- invalid,
9135
- onKeyDown,
9136
- ...otherProps
9137
- } = props;
9138
- const classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className); // home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll
9322
+ var _excluded$s = ["defaultValue", "highlighted", "invalid", "onKeyDown"];
9323
+ var Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9324
+ var onKeyDown = props.onKeyDown,
9325
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$s);
9326
+
9327
+ var classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className); // home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll
9139
9328
  // if it has scroll height then the browser reverts to native scrolling behaviour only
9140
9329
  // so we manually override it to ensure _our_ desired behaviour remains intact
9141
9330
 
9142
- const handleKeyDown = event => {
9331
+ var handleKeyDown = function handleKeyDown(event) {
9143
9332
  if (event.key === 'Home' || event.key === 'End') {
9144
9333
  event.preventDefault();
9145
- const position = event.key === 'End' ? event.currentTarget.value.length : 0;
9334
+ var position = event.key === 'End' ? event.currentTarget.value.length : 0;
9146
9335
  event.currentTarget.setSelectionRange(position, position);
9147
9336
  event.currentTarget.scrollTop = event.key === 'End' ? event.currentTarget.scrollHeight : 0;
9148
9337
  }
@@ -9160,18 +9349,18 @@ const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9160
9349
  }));
9161
9350
  });
9162
9351
 
9163
- const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9164
- const {
9165
- label,
9166
- onChange,
9167
- ...otherProps
9168
- } = props;
9169
- const className = cn('group h-6 w-10 flex rounded-full inline-flex', {
9352
+ var _excluded$t = ["label", "onChange"];
9353
+ var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9354
+ var label = props.label,
9355
+ onChange = props.onChange,
9356
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$t);
9357
+
9358
+ var className = cn('group h-6 w-10 flex rounded-full inline-flex', {
9170
9359
  'mr-2': !!label,
9171
9360
  'bg-grey-darker aria-checked:bg-blue focus:yt-focus': !props.disabled,
9172
9361
  'bg-grey-light cursor-not-allowed aria-checked:bg-blue-light': props.disabled
9173
9362
  }, props.className);
9174
- const element = React.createElement(PrimitiveSwitch.Root, Object.assign({}, otherProps, {
9363
+ var element = React.createElement(PrimitiveSwitch.Root, Object.assign({}, otherProps, {
9175
9364
  className: className,
9176
9365
  onCheckedChange: onChange,
9177
9366
  ref: ref
@@ -9180,7 +9369,7 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9180
9369
  }));
9181
9370
 
9182
9371
  if (label) {
9183
- const labelClassName = cn('flex items-center cursor-pointer', {
9372
+ var labelClassName = cn('flex items-center cursor-pointer', {
9184
9373
  'cursor-not-allowed text-grey-dark': props.disabled
9185
9374
  });
9186
9375
  return React.createElement("label", {
@@ -9191,22 +9380,23 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9191
9380
  return element;
9192
9381
  });
9193
9382
 
9194
- const Tooltip$1 = ({
9195
- continuous,
9196
- index,
9197
- isLastStep,
9198
- step,
9199
- backProps,
9200
- primaryProps,
9201
- skipProps,
9202
- tooltipProps,
9203
- size,
9204
- locale,
9205
- disableTourSkipOnEsc
9206
- }) => {
9207
- const skipButtonRef = React.useRef(null);
9208
- React.useEffect(() => {
9209
- const onWindowKeyDown = event => {
9383
+ var _excluded$u = ["autoStart", "onComplete", "onClose", "onReady", "spotlightClicks", "disableCloseOnEsc", "disableScrollParentFix"];
9384
+
9385
+ var Tooltip$1 = function Tooltip(_ref) {
9386
+ var continuous = _ref.continuous,
9387
+ index = _ref.index,
9388
+ isLastStep = _ref.isLastStep,
9389
+ step = _ref.step,
9390
+ backProps = _ref.backProps,
9391
+ primaryProps = _ref.primaryProps,
9392
+ skipProps = _ref.skipProps,
9393
+ tooltipProps = _ref.tooltipProps,
9394
+ size = _ref.size,
9395
+ locale = _ref.locale,
9396
+ disableTourSkipOnEsc = _ref.disableTourSkipOnEsc;
9397
+ var skipButtonRef = React.useRef(null);
9398
+ React.useEffect(function () {
9399
+ var onWindowKeyDown = function onWindowKeyDown(event) {
9210
9400
  if (!disableTourSkipOnEsc) {
9211
9401
  if (event.keyCode === keycode('esc') && skipButtonRef.current !== null) {
9212
9402
  event.preventDefault();
@@ -9217,7 +9407,7 @@ const Tooltip$1 = ({
9217
9407
  };
9218
9408
 
9219
9409
  window.addEventListener('keydown', onWindowKeyDown);
9220
- return () => {
9410
+ return function () {
9221
9411
  window.removeEventListener('keydown', onWindowKeyDown);
9222
9412
  };
9223
9413
  }, []);
@@ -9236,30 +9426,30 @@ const Tooltip$1 = ({
9236
9426
  appearance: "discrete"
9237
9427
  }), locale.back), React.createElement(Button$1, Object.assign({}, primaryProps, {
9238
9428
  appearance: "primary"
9239
- }), continuous ? isLastStep ? `${locale.last} (${index + 1}/${size})` : `${locale.next} (${index + 1}/${size})` : locale.close)));
9429
+ }), continuous ? isLastStep ? locale.last + " (" + (index + 1) + "/" + size + ")" : locale.next + " (" + (index + 1) + "/" + size + ")" : locale.close)));
9240
9430
  }; // eslint-disable-next-line @typescript-eslint/no-unused-vars
9241
9431
 
9242
9432
 
9243
- const TourStep = _props => null;
9244
- const Tour = props => {
9245
- const {
9246
- texts: {
9247
- tour
9248
- }
9249
- } = useLocalization();
9250
- const {
9251
- autoStart: run,
9252
- onComplete,
9253
- onClose,
9254
- onReady,
9255
- spotlightClicks,
9256
- disableCloseOnEsc: disableTourSkipOnEsc,
9257
- disableScrollParentFix = false,
9258
- ...rest
9259
- } = props;
9260
- const steps = React.useMemo(() => {
9261
- return React.Children.map(props.children, child => {
9262
- const step = {
9433
+ var TourStep = function TourStep(_props) {
9434
+ return null;
9435
+ };
9436
+ var Tour = function Tour(props) {
9437
+ var _useLocalization = useLocalization(),
9438
+ tour = _useLocalization.texts.tour;
9439
+
9440
+ var run = props.autoStart,
9441
+ onComplete = props.onComplete,
9442
+ onClose = props.onClose,
9443
+ onReady = props.onReady,
9444
+ spotlightClicks = props.spotlightClicks,
9445
+ disableTourSkipOnEsc = props.disableCloseOnEsc,
9446
+ _props$disableScrollP = props.disableScrollParentFix,
9447
+ disableScrollParentFix = _props$disableScrollP === void 0 ? false : _props$disableScrollP,
9448
+ rest = _objectWithoutPropertiesLoose(props, _excluded$u);
9449
+
9450
+ var steps = React.useMemo(function () {
9451
+ return React.Children.map(props.children, function (child) {
9452
+ var step = {
9263
9453
  disableBeacon: !child.props.showBeacon,
9264
9454
  target: child.props.selector,
9265
9455
  placement: child.props.position,
@@ -9269,10 +9459,12 @@ const Tour = props => {
9269
9459
  return step;
9270
9460
  });
9271
9461
  }, [props.children]);
9272
- const getStep = React.useCallback(selector => {
9462
+ var getStep = React.useCallback(function (selector) {
9273
9463
  var _props$children$find;
9274
9464
 
9275
- return (_props$children$find = props.children.find(child => child.props.selector === selector)) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
9465
+ return (_props$children$find = props.children.find(function (child) {
9466
+ return child.props.selector === selector;
9467
+ })) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
9276
9468
  }, [props.children]);
9277
9469
 
9278
9470
  function callback(state) {
@@ -9302,10 +9494,12 @@ const Tour = props => {
9302
9494
  floaterProps: {
9303
9495
  disableAnimation: true
9304
9496
  },
9305
- tooltipComponent: tooltipProps => React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
9306
- locale: tour,
9307
- disableTourSkipOnEsc: disableTourSkipOnEsc
9308
- })),
9497
+ tooltipComponent: function tooltipComponent(tooltipProps) {
9498
+ return React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
9499
+ locale: tour,
9500
+ disableTourSkipOnEsc: disableTourSkipOnEsc
9501
+ }));
9502
+ },
9309
9503
  locale: tour,
9310
9504
  spotlightPadding: 8,
9311
9505
  spotlightClicks: spotlightClicks,
@@ -9346,22 +9540,22 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9346
9540
  }, [ref, callback]);
9347
9541
  };
9348
9542
 
9349
- const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
9350
- onSearch,
9351
- ...props
9352
- }, ref) {
9353
- const {
9354
- texts
9355
- } = useLocalization();
9543
+ var _excluded$v = ["onSearch"];
9544
+ var SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput(_ref, ref) {
9545
+ var onSearch = _ref.onSearch,
9546
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
9547
+
9548
+ var _useLocalization = useLocalization(),
9549
+ texts = _useLocalization.texts;
9356
9550
 
9357
- const handleClick = () => {
9551
+ var handleClick = function handleClick() {
9358
9552
  if (!props.disabled) {
9359
9553
  onSearch === null || onSearch === void 0 ? void 0 : onSearch(props.value);
9360
9554
  }
9361
9555
  };
9362
9556
 
9363
- const handleKeyDown = event => {
9364
- const isEnterKeyPressed = event.keyCode === keycode('enter');
9557
+ var handleKeyDown = function handleKeyDown(event) {
9558
+ var isEnterKeyPressed = event.keyCode === keycode('enter');
9365
9559
 
9366
9560
  if (isEnterKeyPressed) {
9367
9561
  handleClick();