@economic/taco 0.0.18-alpha.0 → 0.0.19-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/components/Dialog/components/Drawer.d.ts +2 -1
  2. package/dist/components/Dialog/components/Extra.d.ts +2 -1
  3. package/dist/esm/components/Backdrop/Backdrop.js +1 -1
  4. package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
  5. package/dist/esm/components/Dialog/Dialog.js +3 -3
  6. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  7. package/dist/esm/components/Dialog/components/Content.js +1 -1
  8. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  9. package/dist/esm/components/Dialog/components/Drawer.js +1 -0
  10. package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
  11. package/dist/esm/components/Dialog/components/Extra.js +1 -0
  12. package/dist/esm/components/Dialog/components/Extra.js.map +1 -1
  13. package/dist/esm/components/Popover/Popover.js +29 -34
  14. package/dist/esm/components/Popover/Popover.js.map +1 -1
  15. package/dist/esm/components/Popover/Primitives.js +1 -4
  16. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  17. package/dist/esm/components/Progress/Progress.js +11 -15
  18. package/dist/esm/components/Progress/Progress.js.map +1 -1
  19. package/dist/esm/components/Provider/Provider.js +13 -18
  20. package/dist/esm/components/Provider/Provider.js.map +1 -1
  21. package/dist/esm/components/RadioGroup/RadioGroup.js +45 -57
  22. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  23. package/dist/esm/components/Select/Select.js +30 -31
  24. package/dist/esm/components/Select/Select.js.map +1 -1
  25. package/dist/esm/components/Spinner/Spinner.js +12 -19
  26. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  27. package/dist/esm/components/Switch/Switch.js +9 -10
  28. package/dist/esm/components/Switch/Switch.js.map +1 -1
  29. package/dist/esm/components/Tabs/Tabs.js +25 -27
  30. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  31. package/dist/esm/components/Textarea/Textarea.js +11 -9
  32. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  33. package/dist/esm/components/Toast/Toaster.js +88 -118
  34. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  35. package/dist/esm/components/Tooltip/Tooltip.js +7 -8
  36. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  37. package/dist/esm/components/Tour/Tour.js +44 -50
  38. package/dist/esm/components/Tour/Tour.js.map +1 -1
  39. package/dist/esm/components/Treeview/Treeview.js +26 -36
  40. package/dist/esm/components/Treeview/Treeview.js.map +1 -1
  41. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
  42. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  43. package/dist/taco.cjs.development.js +432 -519
  44. package/dist/taco.cjs.development.js.map +1 -1
  45. package/dist/taco.cjs.production.min.js +1 -1
  46. package/dist/taco.cjs.production.min.js.map +1 -1
  47. package/dist/utils/tailwind.d.ts +1 -1
  48. package/package.json +2 -2
@@ -3192,14 +3192,14 @@ Accordion.Trigger = Trigger;
3192
3192
  Accordion.Content = Content;
3193
3193
 
3194
3194
  var Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
3195
- var className = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] aria-hidden:hidden', props.className);
3195
+ var className = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] aria-hidden:hidden z-[996]', props.className);
3196
3196
  return React.createElement("div", Object.assign({}, props, {
3197
3197
  className: className,
3198
3198
  ref: ref
3199
3199
  }));
3200
3200
  });
3201
3201
 
3202
- var VisuallyHidden = /*#__PURE__*/React.forwardRef(function VisuallyHidden(props, ref) {
3202
+ const VisuallyHidden = /*#__PURE__*/React.forwardRef(function VisuallyHidden(props, ref) {
3203
3203
  return React.createElement("span", Object.assign({}, props, {
3204
3204
  className: "sr-only",
3205
3205
  ref: ref
@@ -3317,13 +3317,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3317
3317
  }), React.Children.count(props.children) > 1 ? React.Children.map(props.children, child => typeof child === 'string' ? React.createElement("span", null, child) : child) : props.children);
3318
3318
  });
3319
3319
 
3320
- var _excluded$3 = ["title", "children", "placement"];
3321
- var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3322
- var title = props.title,
3323
- children = props.children,
3324
- placement = props.placement,
3325
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
3326
-
3320
+ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3321
+ const {
3322
+ title,
3323
+ children,
3324
+ placement,
3325
+ ...otherProps
3326
+ } = props;
3327
3327
  return React.createElement(TooltipPrimitive.Root, {
3328
3328
  delayDuration: 50
3329
3329
  }, React.createElement(TooltipPrimitive.Trigger, {
@@ -3414,13 +3414,13 @@ const createButton = (props, className, ref) => {
3414
3414
  return button;
3415
3415
  };
3416
3416
 
3417
- var _excluded$4 = ["appearance", "icon", "rounded"];
3417
+ var _excluded$3 = ["appearance", "icon", "rounded"];
3418
3418
  var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3419
3419
  var appearance = props.appearance,
3420
3420
  icon = props.icon,
3421
3421
  _props$rounded = props.rounded,
3422
3422
  rounded = _props$rounded === void 0 ? false : _props$rounded,
3423
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
3423
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
3424
3424
 
3425
3425
  var className = cn(getButtonClasses(), getAppearanceClasses(appearance, true), {
3426
3426
  'rounded-full': rounded,
@@ -3459,11 +3459,11 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3459
3459
  }) : null);
3460
3460
  });
3461
3461
 
3462
- var _excluded$5 = ["appearance", "fluid"];
3462
+ var _excluded$4 = ["appearance", "fluid"];
3463
3463
  var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3464
3464
  var appearance = props.appearance,
3465
3465
  fluid = props.fluid,
3466
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
3466
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
3467
3467
 
3468
3468
  var className = cn(getButtonClasses(), getAppearanceClasses(appearance), 'rounded px-3', {
3469
3469
  'cursor-not-allowed opacity-50': props.disabled,
@@ -3534,27 +3534,21 @@ function useTimer(duration = 0, callback) {
3534
3534
  };
3535
3535
  }
3536
3536
 
3537
- var _excluded$6 = ["delay", "label"];
3538
- var Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, ref) {
3539
- var _props$delay = props.delay,
3540
- delay = _props$delay === void 0 ? 500 : _props$delay,
3541
- label = props.label,
3542
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
3543
-
3544
- var _React$useState = React__default.useState(!delay),
3545
- visible = _React$useState[0],
3546
- setVisibility = _React$useState[1];
3547
-
3548
- React__default.useEffect(function () {
3549
- var timeout;
3537
+ const Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, ref) {
3538
+ const {
3539
+ delay = 500,
3540
+ label,
3541
+ ...otherProps
3542
+ } = props;
3543
+ const [visible, setVisibility] = React__default.useState(!delay);
3544
+ React__default.useEffect(() => {
3545
+ let timeout;
3550
3546
 
3551
3547
  if (delay) {
3552
- timeout = window.setTimeout(function () {
3553
- return setVisibility(true);
3554
- }, delay);
3548
+ timeout = window.setTimeout(() => setVisibility(true), delay);
3555
3549
  }
3556
3550
 
3557
- return function () {
3551
+ return () => {
3558
3552
  if (timeout) {
3559
3553
  clearTimeout(timeout);
3560
3554
  }
@@ -3565,7 +3559,7 @@ var Spinner$1 = /*#__PURE__*/React__default.forwardRef(function Spinner(props, r
3565
3559
  return null;
3566
3560
  }
3567
3561
 
3568
- var className = cn('inline-flex flex-col relative items-center', otherProps.className);
3562
+ const className = cn('inline-flex flex-col relative items-center', otherProps.className);
3569
3563
  return React__default.createElement("div", Object.assign({}, otherProps, {
3570
3564
  className: className,
3571
3565
  "data-taco": "spinner",
@@ -3691,62 +3685,49 @@ const Toast = ({
3691
3685
  }));
3692
3686
  };
3693
3687
 
3694
- var _excluded$7 = ["children"];
3695
- var DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
3696
- var ToastContext = /*#__PURE__*/React.createContext({});
3688
+ const DEFAULT_AUTO_CLOSE_TIMEOUT = 7500;
3689
+ const ToastContext = /*#__PURE__*/React.createContext({});
3697
3690
 
3698
- var insertToastWithoutDuplicates = function insertToastWithoutDuplicates(currentToasts, id, content, options, close) {
3699
- var nextToasts = [].concat(currentToasts);
3700
- var existingToastIndex = currentToasts.findIndex(function (toast) {
3701
- return JSON.stringify(toast.content) === JSON.stringify(content);
3702
- });
3691
+ const insertToastWithoutDuplicates = (currentToasts, id, content, options, close) => {
3692
+ const nextToasts = [...currentToasts];
3693
+ const existingToastIndex = currentToasts.findIndex(toast => JSON.stringify(toast.content) === JSON.stringify(content));
3703
3694
 
3704
3695
  if (existingToastIndex > -1) {
3705
3696
  nextToasts[existingToastIndex].lastDuplicateId = id;
3706
3697
  nextToasts[existingToastIndex].lastUpdated = Date.now();
3707
3698
  } else {
3708
3699
  nextToasts.push({
3709
- id: id,
3700
+ id,
3710
3701
  content: typeof content === 'function' ? content(close) : content,
3711
- options: options
3702
+ options
3712
3703
  });
3713
3704
  }
3714
3705
 
3715
3706
  return nextToasts;
3716
3707
  };
3717
3708
 
3718
- var ToastProvider = function ToastProvider(_ref) {
3719
- var children = _ref.children,
3720
- props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
3721
-
3722
- var _React$useState = React.useState([]),
3723
- toasts = _React$useState[0],
3724
- setToasts = _React$useState[1];
3709
+ const ToastProvider = ({
3710
+ children,
3711
+ ...props
3712
+ }) => {
3713
+ const [toasts, setToasts] = React.useState([]);
3725
3714
 
3726
- var handleClose = function handleClose(id) {
3727
- setToasts(function (currentToasts) {
3728
- return currentToasts.filter(function (toast) {
3729
- return toast.id !== id;
3730
- });
3731
- });
3715
+ const handleClose = id => {
3716
+ setToasts(currentToasts => currentToasts.filter(toast => toast.id !== id));
3732
3717
  }; // memoize (useCallback) this function,
3733
3718
  // it is the value of the context provider and we don't want it to trigger state tree re-renders on provider children
3734
3719
 
3735
3720
 
3736
- var toaster = React.useCallback(function (content, options) {
3737
- var id = uuid.v4();
3721
+ const toaster = React.useCallback((content, options) => {
3722
+ const id = uuid.v4();
3738
3723
 
3739
- var close = function close() {
3740
- return handleClose(id);
3741
- };
3724
+ const close = () => handleClose(id);
3742
3725
 
3743
- setToasts(function (currentToasts) {
3744
- return insertToastWithoutDuplicates(currentToasts, id, content, options, close);
3745
- });
3726
+ setToasts(currentToasts => insertToastWithoutDuplicates(currentToasts, id, content, options, close));
3746
3727
 
3747
- var update = function update(content, options) {
3748
- setToasts(function (currentToasts) {
3749
- var nextToasts = currentToasts.filter(function (toast) {
3728
+ const update = (content, options) => {
3729
+ setToasts(currentToasts => {
3730
+ const nextToasts = currentToasts.filter(toast => {
3750
3731
  if (toast.lastDuplicateId) {
3751
3732
  return toast.lastDuplicateId !== id;
3752
3733
  }
@@ -3757,80 +3738,70 @@ var ToastProvider = function ToastProvider(_ref) {
3757
3738
  });
3758
3739
  };
3759
3740
 
3760
- var success = function success(content, options) {
3761
- update(content, _extends({
3762
- autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT
3763
- }, options, {
3741
+ const success = (content, options) => {
3742
+ update(content, {
3743
+ autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
3744
+ ...options,
3764
3745
  type: 'success'
3765
- }));
3746
+ });
3766
3747
  };
3767
3748
 
3768
- var error = function error(content, options) {
3769
- update(content, _extends({}, options, {
3749
+ const error = (content, options) => {
3750
+ update(content, { ...options,
3770
3751
  type: 'error'
3771
- }));
3752
+ });
3772
3753
  };
3773
3754
 
3774
- var warning = function warning(content, options) {
3775
- update(content, _extends({}, options, {
3755
+ const warning = (content, options) => {
3756
+ update(content, { ...options,
3776
3757
  type: 'warning'
3777
- }));
3758
+ });
3778
3759
  };
3779
3760
 
3780
- var information = function information(content, options) {
3781
- update(content, _extends({}, options, {
3761
+ const information = (content, options) => {
3762
+ update(content, { ...options,
3782
3763
  type: 'information'
3783
- }));
3764
+ });
3784
3765
  };
3785
3766
 
3786
- var loading = function loading(content, options) {
3787
- update(content, _extends({}, options, {
3767
+ const loading = (content, options) => {
3768
+ update(content, { ...options,
3788
3769
  type: 'loading'
3789
- }));
3770
+ });
3790
3771
  };
3791
3772
 
3792
3773
  return {
3793
- success: success,
3794
- error: error,
3795
- warning: warning,
3796
- information: information,
3797
- loading: loading,
3798
- close: close
3774
+ success,
3775
+ error,
3776
+ warning,
3777
+ information,
3778
+ loading,
3779
+ close
3799
3780
  };
3800
3781
  }, []); // no need to rebind these every render, do them once in an effect
3801
3782
 
3802
- React.useEffect(function () {
3803
- toaster.success = function (content, options) {
3804
- return toaster(content, _extends({
3805
- autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT
3806
- }, options, {
3807
- type: 'success'
3808
- }));
3809
- };
3783
+ React.useEffect(() => {
3784
+ toaster.success = (content, options) => toaster(content, {
3785
+ autoClose: DEFAULT_AUTO_CLOSE_TIMEOUT,
3786
+ ...options,
3787
+ type: 'success'
3788
+ });
3810
3789
 
3811
- toaster.error = function (content, options) {
3812
- return toaster(content, _extends({}, options, {
3813
- type: 'error'
3814
- }));
3815
- };
3790
+ toaster.error = (content, options) => toaster(content, { ...options,
3791
+ type: 'error'
3792
+ });
3816
3793
 
3817
- toaster.warning = function (content, options) {
3818
- return toaster(content, _extends({}, options, {
3819
- type: 'warning'
3820
- }));
3821
- };
3794
+ toaster.warning = (content, options) => toaster(content, { ...options,
3795
+ type: 'warning'
3796
+ });
3822
3797
 
3823
- toaster.information = function (content, options) {
3824
- return toaster(content, _extends({}, options, {
3825
- type: 'information'
3826
- }));
3827
- };
3798
+ toaster.information = (content, options) => toaster(content, { ...options,
3799
+ type: 'information'
3800
+ });
3828
3801
 
3829
- toaster.loading = function (content, options) {
3830
- return toaster(content, _extends({}, options, {
3831
- type: 'loading'
3832
- }));
3833
- };
3802
+ toaster.loading = (content, options) => toaster(content, { ...options,
3803
+ type: 'loading'
3804
+ });
3834
3805
  }, []);
3835
3806
  return React.createElement(ToastContext.Provider, Object.assign({}, props, {
3836
3807
  value: toaster
@@ -3840,43 +3811,37 @@ var ToastProvider = function ToastProvider(_ref) {
3840
3811
  role: "log"
3841
3812
  }, React.createElement(framerMotion.AnimatePresence, {
3842
3813
  initial: false
3843
- }, toasts.map(function (toast) {
3844
- return React.createElement(framerMotion.motion.div, {
3845
- key: toast.id,
3814
+ }, toasts.map(toast => React.createElement(framerMotion.motion.div, {
3815
+ key: toast.id,
3816
+ transition: {
3817
+ type: 'spring',
3818
+ damping: 20,
3819
+ stiffness: 300
3820
+ },
3821
+ initial: {
3822
+ opacity: 0,
3823
+ y: 10,
3824
+ scale: 0.5
3825
+ },
3826
+ animate: {
3827
+ opacity: 1,
3828
+ y: 0,
3829
+ scale: 1
3830
+ },
3831
+ exit: {
3832
+ opacity: 0,
3833
+ scale: 0.5,
3846
3834
  transition: {
3847
- type: 'spring',
3848
- damping: 20,
3849
- stiffness: 300
3850
- },
3851
- initial: {
3852
- opacity: 0,
3853
- y: 10,
3854
- scale: 0.5
3855
- },
3856
- animate: {
3857
- opacity: 1,
3858
- y: 0,
3859
- scale: 1
3860
- },
3861
- exit: {
3862
- opacity: 0,
3863
- scale: 0.5,
3864
- transition: {
3865
- duration: 0.2
3866
- }
3835
+ duration: 0.2
3867
3836
  }
3868
- }, React.createElement(Toast, Object.assign({}, toast, {
3869
- onClose: function onClose() {
3870
- return handleClose(toast.id);
3871
- }
3872
- })));
3873
- }))));
3874
- };
3875
- var useToast = function useToast() {
3876
- return React.useContext(ToastContext);
3837
+ }
3838
+ }, React.createElement(Toast, Object.assign({}, toast, {
3839
+ onClose: () => handleClose(toast.id)
3840
+ })))))));
3877
3841
  };
3842
+ const useToast = () => React.useContext(ToastContext);
3878
3843
 
3879
- var defaultLocalisationTexts = {
3844
+ const defaultLocalisationTexts = {
3880
3845
  calendar: {
3881
3846
  months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
3882
3847
  weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
@@ -3948,37 +3913,32 @@ var defaultLocalisationTexts = {
3948
3913
  inputLabel: 'Search...'
3949
3914
  }
3950
3915
  };
3951
- var defaultLocalizationContext = {
3916
+ const defaultLocalizationContext = {
3952
3917
  locale: 'en-GB',
3953
3918
  texts: defaultLocalisationTexts,
3954
3919
  formatting: {
3955
3920
  date: 'dd.mm.yy'
3956
3921
  }
3957
3922
  };
3958
- var Context = /*#__PURE__*/React.createContext({
3923
+ const Context = /*#__PURE__*/React.createContext({
3959
3924
  localization: defaultLocalizationContext
3960
3925
  });
3961
- var Provider = function Provider(props) {
3962
- var children = props.children,
3963
- _props$localization = props.localization,
3964
- localization = _props$localization === void 0 ? defaultLocalizationContext : _props$localization;
3965
- var value = React.useMemo(function () {
3966
- return {
3967
- localization: localization
3968
- };
3969
- }, [localization]);
3926
+ const Provider = props => {
3927
+ const {
3928
+ children,
3929
+ localization = defaultLocalizationContext
3930
+ } = props;
3931
+ const value = React.useMemo(() => ({
3932
+ localization
3933
+ }), [localization]);
3970
3934
  return React.createElement(Context.Provider, {
3971
3935
  value: value
3972
3936
  }, React.createElement(ToastProvider, null, children));
3973
3937
  };
3974
- var useTaco = function useTaco() {
3975
- return React.useContext(Context);
3976
- };
3977
- var useLocalization = function useLocalization() {
3978
- return useTaco().localization;
3979
- };
3938
+ const useTaco = () => React.useContext(Context);
3939
+ const useLocalization = () => useTaco().localization;
3980
3940
 
3981
- var _excluded$8 = ["onChange", "value"];
3941
+ var _excluded$5 = ["onChange", "value"];
3982
3942
 
3983
3943
  var renderDay = function renderDay(day, modifiers) {
3984
3944
  return modifiers.disabled ? React.createElement("span", {
@@ -4057,7 +4017,7 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4057
4017
  var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4058
4018
  var handleChange = props.onChange,
4059
4019
  value = props.value,
4060
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
4020
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
4061
4021
 
4062
4022
  var _useLocalization2 = useLocalization(),
4063
4023
  locale = _useLocalization2.locale,
@@ -4121,7 +4081,7 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4121
4081
  })));
4122
4082
  });
4123
4083
 
4124
- var _excluded$9 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4084
+ var _excluded$6 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4125
4085
  var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4126
4086
  var checked = props.checked,
4127
4087
  highlighted = props.highlighted,
@@ -4129,7 +4089,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4129
4089
  invalid = props.invalid,
4130
4090
  label = props.label,
4131
4091
  onChange = props.onChange,
4132
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
4092
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
4133
4093
 
4134
4094
  var className = cn('h-5 w-5 border rounded text-sm', {
4135
4095
  'mr-2': !!label,
@@ -4231,14 +4191,14 @@ const getButtonStateClasses = value => {
4231
4191
  }
4232
4192
  };
4233
4193
 
4234
- var _excluded$a = ["button", "icon", "highlighted", "onKeyDown", "state", "autoFocus"];
4194
+ var _excluded$7 = ["button", "icon", "highlighted", "onKeyDown", "state", "autoFocus"];
4235
4195
  var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4236
4196
  var button = props.button,
4237
4197
  icon = props.icon,
4238
4198
  onKeyDown = props.onKeyDown,
4239
4199
  state = props.state,
4240
4200
  autoFocus = props.autoFocus,
4241
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
4201
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
4242
4202
 
4243
4203
  var inputRef = useProxiedRef(ref);
4244
4204
  var hasContainer = button || icon;
@@ -5045,11 +5005,11 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5045
5005
  return dimensions;
5046
5006
  };
5047
5007
 
5048
- var _excluded$b = ["className", "style"];
5008
+ var _excluded$8 = ["className", "style"];
5049
5009
  var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5050
5010
  var externalClassName = props.className,
5051
5011
  style = props.style,
5052
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5012
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5053
5013
 
5054
5014
  var _useCombobox = useCombobox(otherProps, ref),
5055
5015
  combobox = _useCombobox.combobox,
@@ -5298,14 +5258,11 @@ const UnstyledContent = /*#__PURE__*/React.forwardRef(function PopoverContent(pr
5298
5258
  placement: side,
5299
5259
  ...otherProps
5300
5260
  } = props;
5301
- const className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group ', props.className);
5261
+ const className = cn('border border-transparent rounded p-3 yt-shadow focus:yt-focus outline-none group z-[996]', props.className);
5302
5262
  return React.createElement(PopoverPrimitive.Content, Object.assign({}, otherProps, {
5303
5263
  className: className,
5304
5264
  side: side,
5305
5265
  sideOffset: 1,
5306
- style: { ...props.style,
5307
- zIndex: 996
5308
- },
5309
5266
  ref: ref
5310
5267
  }));
5311
5268
  });
@@ -5322,19 +5279,18 @@ function mergeRefs(refs) {
5322
5279
  };
5323
5280
  }
5324
5281
 
5325
- var _excluded$c = ["children", "trigger"];
5326
- var PopoverContext = /*#__PURE__*/React.createContext({
5282
+ const PopoverContext = /*#__PURE__*/React.createContext({
5327
5283
  props: {},
5328
5284
  ref: null
5329
5285
  });
5330
- var Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
5286
+ const Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref) {
5331
5287
  var _props$children;
5332
5288
 
5333
- var context = React.useContext(PopoverContext);
5334
- var children = props.children;
5289
+ const context = React.useContext(PopoverContext);
5290
+ let children = props.children;
5335
5291
 
5336
5292
  if (React.isValidElement(props.children) && typeof ((_props$children = props.children) === null || _props$children === void 0 ? void 0 : _props$children.type) === 'function') {
5337
- 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");
5293
+ 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`);
5338
5294
  children = React.createElement("span", null, props.children);
5339
5295
  }
5340
5296
 
@@ -5344,22 +5300,22 @@ var Trigger$1 = /*#__PURE__*/React.forwardRef(function PopoverTrigger(props, ref
5344
5300
  asChild: true
5345
5301
  }));
5346
5302
  });
5347
- var RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper(_ref, ref) {
5348
- var children = _ref.children,
5349
- onClick = _ref.onClick;
5350
-
5351
- var close = function close() {
5303
+ const RenderPropWrapper = /*#__PURE__*/React.forwardRef(function RenderPropWrapper({
5304
+ children,
5305
+ onClick
5306
+ }, ref) {
5307
+ const close = () => {
5352
5308
  onClick(new CustomEvent('hide'));
5353
5309
  };
5354
5310
 
5355
5311
  return children({
5356
- close: close,
5357
- ref: ref
5312
+ close,
5313
+ ref
5358
5314
  });
5359
5315
  });
5360
- var Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
5361
- var className = cn('bg-white focus:border-blue-light', props.className);
5362
- var output;
5316
+ const Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref) {
5317
+ const className = cn('bg-white focus:border-blue-light', props.className);
5318
+ let output;
5363
5319
 
5364
5320
  if (typeof props.children === 'function') {
5365
5321
  output = React.createElement(PopoverPrimitive.Close, {
@@ -5377,23 +5333,20 @@ var Content$1 = /*#__PURE__*/React.forwardRef(function PopoverContent(props, ref
5377
5333
  className: "text-white"
5378
5334
  }));
5379
5335
  });
5380
- var Close$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
5381
- return React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
5382
- ref: ref,
5383
- asChild: true
5384
- }));
5385
- });
5386
- var Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
5387
- var children = props.children,
5388
- trigger = props.trigger,
5389
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
5390
-
5391
- var context = React.useMemo(function () {
5392
- return {
5393
- props: otherProps,
5394
- ref: ref
5395
- };
5396
- }, [otherProps]);
5336
+ const Close$1 = /*#__PURE__*/React.forwardRef((props, ref) => React.createElement(PopoverPrimitive.Close, Object.assign({}, props, {
5337
+ ref: ref,
5338
+ asChild: true
5339
+ })));
5340
+ const Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {
5341
+ const {
5342
+ children,
5343
+ trigger,
5344
+ ...otherProps
5345
+ } = props;
5346
+ const context = React.useMemo(() => ({
5347
+ props: otherProps,
5348
+ ref
5349
+ }), [otherProps]);
5397
5350
  return React.createElement(PopoverContext.Provider, {
5398
5351
  value: context
5399
5352
  }, React.createElement(PopoverPrimitive.Root, null, trigger && React.createElement(Trigger$1, null, trigger), children));
@@ -5402,7 +5355,7 @@ Popover.Trigger = Trigger$1;
5402
5355
  Popover.Content = Content$1;
5403
5356
  Popover.Close = Close$1;
5404
5357
 
5405
- var _excluded$d = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5358
+ var _excluded$9 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5406
5359
  var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5407
5360
  var _input$disabled;
5408
5361
 
@@ -5411,7 +5364,7 @@ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5411
5364
  style = props.style,
5412
5365
  shortcuts = props.shortcuts,
5413
5366
  shortcutsText = props.shortcutsText,
5414
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
5367
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
5415
5368
 
5416
5369
  var _useDatepicker = useDatepicker(otherProps, ref),
5417
5370
  calendar = _useDatepicker.calendar,
@@ -5593,7 +5546,7 @@ const Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
5593
5546
  handleCloseAutoFocus = () => menu.close();
5594
5547
  }
5595
5548
 
5596
- const className = cn('bg-white rounded relative mt-16 mx-auto animate-[fade-in_150ms]', {
5549
+ const className = cn('bg-white rounded relative mt-16 mx-auto animate-[fade-in_150ms] z-[997]', {
5597
5550
  'w-128 text-center justify-center': dialog.size === 'dialog',
5598
5551
  'w-xs': dialog.size === 'xs',
5599
5552
  'w-sm': dialog.size === 'sm',
@@ -5691,6 +5644,7 @@ const Drawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props, ref) {
5691
5644
  ref: ref
5692
5645
  }));
5693
5646
  });
5647
+ Drawer.displayName = 'DialogDrawer';
5694
5648
 
5695
5649
  const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5696
5650
  const className = cn('bg-grey-light yt-shadow-inset absolute top-full left-0 -mt-px w-full rounded-t-none rounded-b p-6 text-left', props.className);
@@ -5700,20 +5654,21 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5700
5654
  ref: ref
5701
5655
  }));
5702
5656
  });
5657
+ Extra.displayName = 'DialogExtra';
5703
5658
 
5704
- var _excluded$e = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5659
+ var _excluded$a = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5705
5660
 
5706
5661
  var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5707
5662
  return React.useMemo(function () {
5708
5663
  var children = [];
5709
5664
  var drawer;
5710
5665
  var extra;
5711
- React.Children.forEach(initialChildren, function (child) {
5666
+ React.Children.toArray(initialChildren).forEach(function (child) {
5712
5667
  var _child$type, _child$type2;
5713
5668
 
5714
- if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'Drawer') {
5669
+ if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
5715
5670
  drawer = child;
5716
- } else if (((_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.displayName) === 'Extra') {
5671
+ } else if (((_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.displayName) === Extra.displayName) {
5717
5672
  extra = child;
5718
5673
  } else {
5719
5674
  children.push(child);
@@ -5738,7 +5693,7 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5738
5693
  _props$size = props.size,
5739
5694
  size = _props$size === void 0 ? 'sm' : _props$size,
5740
5695
  trigger = props.trigger,
5741
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$e);
5696
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$a);
5742
5697
 
5743
5698
  var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5744
5699
  children = _useSeparatedChildren[0],
@@ -5788,13 +5743,13 @@ Dialog.Extra = Extra;
5788
5743
  Dialog.Drawer = Drawer;
5789
5744
  Dialog.Close = Close$2;
5790
5745
 
5791
- var _excluded$f = ["disabled", "children", "message", "state"];
5746
+ var _excluded$b = ["disabled", "children", "message", "state"];
5792
5747
  var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5793
5748
  var disabled = props.disabled,
5794
5749
  children = props.children,
5795
5750
  message = props.message,
5796
5751
  state = props.state,
5797
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$f);
5752
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$b);
5798
5753
 
5799
5754
  var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5800
5755
  'text-grey-dark': disabled
@@ -5817,11 +5772,11 @@ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5817
5772
  }, message));
5818
5773
  });
5819
5774
 
5820
- var _excluded$g = ["horizontal"];
5775
+ var _excluded$c = ["horizontal"];
5821
5776
  var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5822
5777
  var _props$horizontal = props.horizontal,
5823
5778
  horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5824
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$g);
5779
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
5825
5780
 
5826
5781
  var className = cn('yt-form', {
5827
5782
  'yt-form--horizontal flex flex-wrap': horizontal
@@ -5833,11 +5788,11 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5833
5788
  }));
5834
5789
  });
5835
5790
 
5836
- var _excluded$h = ["as"];
5791
+ var _excluded$d = ["as"];
5837
5792
  var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5838
5793
  var _props$as = props.as,
5839
5794
  Tag = _props$as === void 0 ? 'span' : _props$as,
5840
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$h);
5795
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
5841
5796
 
5842
5797
  var className = cn('flex ', props.className);
5843
5798
  return React.createElement(Tag, Object.assign({}, otherProps, {
@@ -5847,7 +5802,7 @@ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5847
5802
  }));
5848
5803
  });
5849
5804
 
5850
- var _excluded$i = ["anchor", "children"];
5805
+ var _excluded$e = ["anchor", "children"];
5851
5806
  var HangerContext = /*#__PURE__*/React.createContext({
5852
5807
  props: {},
5853
5808
  ref: null
@@ -5900,7 +5855,7 @@ var Content$3 = /*#__PURE__*/React.forwardRef(function HangerContent(props, ref)
5900
5855
  var Hanger = /*#__PURE__*/React.forwardRef(function Hanger(props, ref) {
5901
5856
  var anchor = props.anchor,
5902
5857
  children = props.children,
5903
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$i);
5858
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$e);
5904
5859
 
5905
5860
  var context = React.useMemo(function () {
5906
5861
  return {
@@ -6259,11 +6214,11 @@ const useMultiListbox = ({
6259
6214
  };
6260
6215
  };
6261
6216
 
6262
- var _excluded$j = ["className"],
6217
+ var _excluded$f = ["className"],
6263
6218
  _excluded2$1 = ["className"];
6264
6219
  var Listbox = /*#__PURE__*/React.forwardRef(function Listbox(props, ref) {
6265
6220
  var externalClassName = props.className,
6266
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$j);
6221
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$f);
6267
6222
 
6268
6223
  var _useListbox = useListbox(otherProps, ref),
6269
6224
  list = _useListbox.list,
@@ -6564,34 +6519,26 @@ const Checkbox$1 = props => {
6564
6519
  })), children);
6565
6520
  };
6566
6521
 
6567
- var _excluded$k = ["children", "value"],
6568
- _excluded2$2 = ["children", "defaultValue", "disabled", "invalid", "onChange", "orientation", "value"];
6569
- var getRadioGroupItemValueAsString = function getRadioGroupItemValueAsString(value) {
6570
- return value === null ? '' : String(value);
6571
- };
6572
- var findByValue$1 = function findByValue(values, valueAsString) {
6573
- return values.find(function (value) {
6574
- return getRadioGroupItemValueAsString(value) === valueAsString;
6575
- });
6576
- };
6577
- var RadioGroupContext = /*#__PURE__*/React.createContext({
6522
+ const getRadioGroupItemValueAsString = value => value === null ? '' : String(value);
6523
+ const findByValue$1 = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
6524
+ const RadioGroupContext = /*#__PURE__*/React.createContext({
6578
6525
  disabled: false,
6579
6526
  invalid: false
6580
6527
  });
6581
- var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
6582
- var context = React.useContext(RadioGroupContext);
6583
-
6584
- var children = props.children,
6585
- value = props.value,
6586
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$k);
6587
-
6588
- var disabled = context.disabled || props.disabled;
6589
- var className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {
6528
+ const RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props, ref) {
6529
+ const context = React.useContext(RadioGroupContext);
6530
+ const {
6531
+ children,
6532
+ value,
6533
+ ...otherProps
6534
+ } = props;
6535
+ const disabled = context.disabled || props.disabled;
6536
+ const className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {
6590
6537
  'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue': !disabled && !context.invalid,
6591
6538
  'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,
6592
6539
  'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !disabled
6593
6540
  });
6594
- var labelClassName = cn('flex items-center cursor-pointer', {
6541
+ const labelClassName = cn('flex items-center cursor-pointer', {
6595
6542
  'cursor-not-allowed text-grey-dark': disabled
6596
6543
  });
6597
6544
  return React.createElement("label", {
@@ -6605,38 +6552,34 @@ var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props
6605
6552
  className: "h-2 w-2 rounded-full bg-white"
6606
6553
  })), children);
6607
6554
  });
6608
- var useRadioGroup = function useRadioGroup(props) {
6609
- var children = props.children,
6610
- defaultValue = props.defaultValue,
6611
- disabled = props.disabled,
6612
- invalid = props.invalid,
6613
- onChange = props.onChange,
6614
- _props$orientation = props.orientation,
6615
- orientation = _props$orientation === void 0 ? 'vertical' : _props$orientation,
6616
- value = props.value,
6617
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$2);
6618
-
6619
- var values = React.useMemo(function () {
6620
- var radioGroupItemValues = [];
6621
- React.Children.forEach(children, function (child) {
6555
+ const useRadioGroup = props => {
6556
+ const {
6557
+ children,
6558
+ defaultValue,
6559
+ disabled,
6560
+ invalid,
6561
+ onChange,
6562
+ orientation = 'vertical',
6563
+ value,
6564
+ ...otherProps
6565
+ } = props;
6566
+ const values = React.useMemo(() => {
6567
+ const radioGroupItemValues = [];
6568
+ React.Children.forEach(children, child => {
6622
6569
  if (React.isValidElement(child)) {
6623
6570
  radioGroupItemValues.push(child.props.value);
6624
6571
  }
6625
6572
  });
6626
6573
  return radioGroupItemValues;
6627
6574
  }, [children]);
6628
- var context = React.useMemo(function () {
6629
- return {
6630
- disabled: disabled !== null && disabled !== void 0 ? disabled : false,
6631
- invalid: invalid !== null && invalid !== void 0 ? invalid : false
6632
- };
6633
- }, [disabled, invalid]);
6634
- var valueProps;
6575
+ const context = React.useMemo(() => ({
6576
+ disabled: disabled !== null && disabled !== void 0 ? disabled : false,
6577
+ invalid: invalid !== null && invalid !== void 0 ? invalid : false
6578
+ }), [disabled, invalid]);
6579
+ let valueProps;
6635
6580
 
6636
6581
  if (onChange !== undefined) {
6637
- var handleChange = function handleChange(value) {
6638
- return onChange(findByValue$1(values, value));
6639
- };
6582
+ const handleChange = value => onChange(findByValue$1(values, value));
6640
6583
 
6641
6584
  valueProps = {
6642
6585
  onValueChange: handleChange,
@@ -6649,19 +6592,20 @@ var useRadioGroup = function useRadioGroup(props) {
6649
6592
  }
6650
6593
 
6651
6594
  return {
6652
- context: context,
6653
- props: _extends({}, otherProps, valueProps, {
6654
- children: children,
6655
- orientation: orientation
6656
- })
6595
+ context,
6596
+ props: { ...otherProps,
6597
+ ...valueProps,
6598
+ children,
6599
+ orientation
6600
+ }
6657
6601
  };
6658
6602
  };
6659
- var RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
6660
- var _useRadioGroup = useRadioGroup(props),
6661
- context = _useRadioGroup.context,
6662
- otherProps = _useRadioGroup.props;
6663
-
6664
- var className = cn('flex items-start', {
6603
+ const RadioGroup = /*#__PURE__*/React.forwardRef(function RadioGroup(props, ref) {
6604
+ const {
6605
+ context,
6606
+ props: otherProps
6607
+ } = useRadioGroup(props);
6608
+ const className = cn('flex items-start', {
6665
6609
  'flex-wrap space-x-4': otherProps.orientation === 'horizontal',
6666
6610
  'flex-col space-y-2': otherProps.orientation === 'vertical'
6667
6611
  }, otherProps.className);
@@ -6774,11 +6718,11 @@ const Header = props => {
6774
6718
  }));
6775
6719
  };
6776
6720
 
6777
- var _excluded$l = ["children", "trigger"];
6721
+ var _excluded$g = ["children", "trigger"];
6778
6722
  var Menu = function Menu(externalProps) {
6779
6723
  var children = externalProps.children,
6780
6724
  trigger = externalProps.trigger,
6781
- props = _objectWithoutPropertiesLoose(externalProps, _excluded$l);
6725
+ props = _objectWithoutPropertiesLoose(externalProps, _excluded$g);
6782
6726
 
6783
6727
  var _React$useState = React.useState(false),
6784
6728
  open = _React$useState[0],
@@ -6831,44 +6775,39 @@ Menu.Separator = Separator;
6831
6775
  Menu.Header = Header;
6832
6776
  Menu.RadioGroup = RadioGroup$1;
6833
6777
 
6834
- var _excluded$m = ["children", "className", "expanded", "title", "fixed", "onClick"];
6835
- var TreeviewItem = /*#__PURE__*/React__default.forwardRef(function TreeviewItem(props, ref) {
6778
+ const TreeviewItem = /*#__PURE__*/React__default.forwardRef(function TreeviewItem(props, ref) {
6836
6779
  return React__default.createElement("a", Object.assign({}, props, {
6837
6780
  ref: ref
6838
6781
  }));
6839
6782
  });
6840
- var TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGroup(props, ref) {
6841
- var children = props.children,
6842
- externalClassName = props.className,
6843
- _props$expanded = props.expanded,
6844
- initialExpanded = _props$expanded === void 0 ? false : _props$expanded,
6845
- title = props.title,
6846
- fixed = props.fixed,
6847
- onClick = props.onClick,
6848
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$m);
6849
-
6850
- var _React$useState = React__default.useState(fixed || initialExpanded),
6851
- expanded = _React$useState[0],
6852
- setExpanded = _React$useState[1];
6853
-
6854
- React__default.useEffect(function () {
6783
+ const TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGroup(props, ref) {
6784
+ const {
6785
+ children,
6786
+ className: externalClassName,
6787
+ expanded: initialExpanded = false,
6788
+ title,
6789
+ fixed,
6790
+ onClick,
6791
+ ...otherProps
6792
+ } = props;
6793
+ const [expanded, setExpanded] = React__default.useState(fixed || initialExpanded);
6794
+ React__default.useEffect(() => {
6855
6795
  if (!fixed) {
6856
6796
  setExpanded(fixed || initialExpanded);
6857
6797
  }
6858
6798
  }, [fixed, initialExpanded]);
6859
- var listClassName = cn('flex-col mb-0', {
6799
+ const listClassName = cn('flex-col mb-0', {
6860
6800
  flex: expanded,
6861
6801
  hidden: !expanded
6862
6802
  });
6863
-
6864
- var itemProps = _extends({}, otherProps, {
6803
+ const itemProps = { ...otherProps,
6865
6804
  'aria-expanded': expanded,
6866
6805
  role: 'treeitem',
6867
6806
  tabIndex: -1
6868
- });
6807
+ };
6869
6808
 
6870
- var handleClick = function handleClick(event) {
6871
- var nextState = !expanded;
6809
+ const handleClick = event => {
6810
+ const nextState = !expanded;
6872
6811
 
6873
6812
  if (!fixed) {
6874
6813
  setExpanded(nextState);
@@ -6879,7 +6818,7 @@ var TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGrou
6879
6818
  }
6880
6819
  };
6881
6820
 
6882
- var className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;
6821
+ const className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;
6883
6822
  return React__default.createElement("div", Object.assign({}, itemProps, {
6884
6823
  className: className,
6885
6824
  ref: ref
@@ -6888,18 +6827,14 @@ var TreeviewGroup = /*#__PURE__*/React__default.forwardRef(function TreeviewGrou
6888
6827
  }, typeof title === 'function' ? title(expanded) : title), React__default.createElement("ul", {
6889
6828
  role: "group",
6890
6829
  className: listClassName
6891
- }, React__default.Children.toArray(children).filter(function (item) {
6892
- return !!item;
6893
- }).map(function (item, i) {
6894
- return React__default.createElement("li", {
6895
- key: i,
6896
- role: "none"
6897
- }, React__default.cloneElement(item, {
6898
- role: 'treeitem'
6899
- }));
6900
- })));
6830
+ }, React__default.Children.toArray(children).filter(item => !!item).map((item, i) => React__default.createElement("li", {
6831
+ key: i,
6832
+ role: "none"
6833
+ }, React__default.cloneElement(item, {
6834
+ role: 'treeitem'
6835
+ })))));
6901
6836
  });
6902
- var Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, ref) {
6837
+ const Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props, ref) {
6903
6838
  return React__default.createElement("div", Object.assign({}, props, {
6904
6839
  ref: ref,
6905
6840
  role: "tree"
@@ -6942,8 +6877,8 @@ const useDropTarget = onDrop => {
6942
6877
  return [isDraggedOver, props];
6943
6878
  };
6944
6879
 
6945
- var _excluded$n = ["active", "children", "onDrop", "postfix", "prefix", "role"],
6946
- _excluded2$3 = ["children"];
6880
+ var _excluded$h = ["active", "children", "onDrop", "postfix", "prefix", "role"],
6881
+ _excluded2$2 = ["children"];
6947
6882
  var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
6948
6883
  var active = props.active,
6949
6884
  children = props.children,
@@ -6951,7 +6886,7 @@ var Item$2 = /*#__PURE__*/React__default.forwardRef(function Item(props, ref) {
6951
6886
  postfix = props.postfix,
6952
6887
  prefix = props.prefix,
6953
6888
  role = props.role,
6954
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$n);
6889
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$h);
6955
6890
 
6956
6891
  var proxyRef = useProxiedRef(ref);
6957
6892
 
@@ -7053,7 +6988,7 @@ var Menu$1 = /*#__PURE__*/React__default.forwardRef(function Menu(props, ref) {
7053
6988
  Menu$1.Group = MenuGroup;
7054
6989
  var Navigation = /*#__PURE__*/React__default.forwardRef(function Navigation(props, ref) {
7055
6990
  var children = props.children,
7056
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$3);
6991
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded2$2);
7057
6992
 
7058
6993
  var className = cn('h-full flex flex-col bg-grey-light divide-y-2 divide-grey-light', props.className);
7059
6994
  return React__default.createElement("div", Object.assign({}, otherProps, {
@@ -7289,53 +7224,51 @@ const useSelect = ({
7289
7224
  };
7290
7225
  };
7291
7226
 
7292
- var _excluded$o = ["autoFocus", "className", "highlighted", "style"],
7293
- _excluded2$4 = ["editable"];
7294
- var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7295
- var autoFocus = props.autoFocus,
7296
- externalClassName = props.className,
7297
- style = props.style,
7298
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$o);
7299
-
7300
- var _useSelect = useSelect(otherProps, ref),
7301
- button = _useSelect.button,
7302
- listbox = _useSelect.listbox,
7303
- popover = _useSelect.popover,
7304
- input = _useSelect.input,
7305
- text = _useSelect.text,
7306
- _useSelect$more = _useSelect.more,
7307
- more = _useSelect$more === void 0 ? 0 : _useSelect$more;
7308
-
7309
- var internalRef = React.useRef(null);
7310
- var selectDimensions = useBoundingClientRectListener(internalRef);
7311
- var className = cn('inline-flex relative w-full', {
7227
+ const BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7228
+ const {
7229
+ autoFocus,
7230
+ className: externalClassName,
7231
+ highlighted,
7232
+ style,
7233
+ ...otherProps
7234
+ } = props;
7235
+ const {
7236
+ button,
7237
+ listbox,
7238
+ popover,
7239
+ input,
7240
+ text,
7241
+ more = 0
7242
+ } = useSelect(otherProps, ref);
7243
+ const internalRef = React.useRef(null);
7244
+ const selectDimensions = useBoundingClientRectListener(internalRef);
7245
+ const className = cn('inline-flex relative w-full', {
7312
7246
  'yt-select--readonly': props.readOnly
7313
7247
  }, externalClassName);
7314
- var inputClassname = cn(getInputClasses(props), 'text-left pr-0', {
7248
+ const inputClassname = cn(getInputClasses(props), 'text-left pr-0', {
7315
7249
  'border-blue': popover.open
7316
7250
  });
7317
- React.useEffect(function () {
7251
+ React.useEffect(() => {
7318
7252
  if (autoFocus && internalRef.current) {
7319
7253
  internalRef.current.focus();
7320
7254
  }
7321
7255
  }, []);
7322
7256
 
7323
- var renderMultiSelection = function renderMultiSelection() {
7257
+ const renderMultiSelection = () => {
7324
7258
  return React.createElement(React.Fragment, null, React.createElement("span", {
7325
7259
  className: "flex-grow truncate text-left"
7326
7260
  }, text), more > 0 && React.createElement(Badge, {
7327
7261
  className: "ml-2"
7328
- }, "+" + more));
7262
+ }, `+${more}`));
7329
7263
  };
7330
7264
 
7331
- var commonListboxProps = _extends({}, listbox, {
7265
+ const commonListboxProps = { ...listbox,
7332
7266
  className: 'w-auto',
7333
7267
  style: {
7334
7268
  minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
7335
7269
  },
7336
7270
  tabIndex: popover.open ? 0 : -1
7337
- });
7338
-
7271
+ };
7339
7272
  return React.createElement("span", {
7340
7273
  className: className,
7341
7274
  "data-taco": "select",
@@ -7358,9 +7291,11 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7358
7291
  type: "text"
7359
7292
  }))));
7360
7293
  });
7361
- var Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
7362
- var editable = props.editable,
7363
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$4);
7294
+ const Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {
7295
+ const {
7296
+ editable,
7297
+ ...otherProps
7298
+ } = props;
7364
7299
 
7365
7300
  if (editable) {
7366
7301
  return React.createElement(Combobox, Object.assign({}, otherProps, {
@@ -7430,47 +7365,41 @@ const usePagination = (initialPageIndex = 0, initialPageSize = 10) => {
7430
7365
  };
7431
7366
  };
7432
7367
 
7433
- var _excluded$p = ["length", "pageIndex", "pageSize", "pageSizes", "setPageIndex", "setPageSize", "showPageControls", "showPageNumbers", "showPageSize", "dangerouslyHijackGlobalKeyboardNavigation"];
7434
-
7435
- var getShowingLabel = function getShowingLabel(length, pageIndex, pageSize, texts) {
7436
- var minItemIndex = pageIndex * pageSize + 1;
7437
- var maxItemIndex = (pageIndex + 1) * pageSize;
7368
+ const getShowingLabel = (length, pageIndex, pageSize, texts) => {
7369
+ const minItemIndex = pageIndex * pageSize + 1;
7370
+ const maxItemIndex = (pageIndex + 1) * pageSize;
7438
7371
  return texts.pagination.showingXofYofTotal.replace('[X]', length === 0 ? '0' : String(minItemIndex)).replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex)).replace('[total]', String(length));
7439
7372
  };
7440
7373
 
7441
- var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7442
- var length = props.length,
7443
- pageIndex = props.pageIndex,
7444
- pageSize = props.pageSize,
7445
- _props$pageSizes = props.pageSizes,
7446
- pageSizes = _props$pageSizes === void 0 ? [10, 25, 50, 100, 500] : _props$pageSizes,
7447
- setPageIndex = props.setPageIndex,
7448
- setPageSize = props.setPageSize,
7449
- _props$showPageContro = props.showPageControls,
7450
- showPageControls = _props$showPageContro === void 0 ? true : _props$showPageContro,
7451
- _props$showPageNumber = props.showPageNumbers,
7452
- showPageNumbers = _props$showPageNumber === void 0 ? true : _props$showPageNumber,
7453
- _props$showPageSize = props.showPageSize,
7454
- showPageSize = _props$showPageSize === void 0 ? true : _props$showPageSize,
7455
- _props$dangerouslyHij = props.dangerouslyHijackGlobalKeyboardNavigation,
7456
- dangerouslyHijackGlobalKeyboardNavigation = _props$dangerouslyHij === void 0 ? false : _props$dangerouslyHij,
7457
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$p);
7458
-
7459
- var _useLocalization = useLocalization(),
7460
- texts = _useLocalization.texts;
7461
-
7462
- var maxPageIndex = Math.ceil(length / pageSize) - 1;
7463
- var showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
7374
+ const Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7375
+ const {
7376
+ length,
7377
+ pageIndex,
7378
+ pageSize,
7379
+ pageSizes = [10, 25, 50, 100, 500],
7380
+ setPageIndex,
7381
+ setPageSize,
7382
+ showPageControls = true,
7383
+ showPageNumbers = true,
7384
+ showPageSize = true,
7385
+ dangerouslyHijackGlobalKeyboardNavigation = false,
7386
+ ...otherProps
7387
+ } = props;
7388
+ const {
7389
+ texts
7390
+ } = useLocalization();
7391
+ const maxPageIndex = Math.ceil(length / pageSize) - 1;
7392
+ const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;
7464
7393
  usePaginationShortcuts({
7465
- setPageIndex: setPageIndex,
7466
- maxPageIndex: maxPageIndex,
7467
- pageIndex: pageIndex,
7468
- dangerouslyHijackGlobalKeyboardNavigation: dangerouslyHijackGlobalKeyboardNavigation
7394
+ setPageIndex,
7395
+ maxPageIndex,
7396
+ pageIndex,
7397
+ dangerouslyHijackGlobalKeyboardNavigation
7469
7398
  });
7470
- var pageCount = Math.ceil(length / pageSize);
7471
- var canPreviousPage = pageIndex > 0;
7472
- var canNextPage = pageIndex < pageCount - 1;
7473
- var className = cn('inline-flex relative justify-between items-center', props.className);
7399
+ const pageCount = Math.ceil(length / pageSize);
7400
+ const canPreviousPage = pageIndex > 0;
7401
+ const canNextPage = pageIndex < pageCount - 1;
7402
+ const className = cn('inline-flex relative justify-between items-center', props.className);
7474
7403
  return React.createElement("div", Object.assign({}, otherProps, {
7475
7404
  className: className,
7476
7405
  "data-taco": "pagination",
@@ -7480,13 +7409,11 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7480
7409
  }, getShowingLabel(length, pageIndex, pageSize, texts), React.createElement(Select, {
7481
7410
  "aria-label": texts.pagination.pageSize,
7482
7411
  className: "ml-4 !w-20",
7483
- data: pageSizes.map(function (pageSize) {
7484
- return {
7485
- text: String(pageSize),
7486
- value: pageSize
7487
- };
7488
- }),
7489
- onChange: function onChange(event) {
7412
+ data: pageSizes.map(pageSize => ({
7413
+ text: String(pageSize),
7414
+ value: pageSize
7415
+ })),
7416
+ onChange: event => {
7490
7417
  setPageIndex(0);
7491
7418
  setPageSize(Number(event.target.value));
7492
7419
  },
@@ -7498,18 +7425,14 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7498
7425
  appearance: "default",
7499
7426
  disabled: !canPreviousPage,
7500
7427
  icon: "arrow-start",
7501
- onClick: function onClick() {
7502
- return setPageIndex(0);
7503
- },
7428
+ onClick: () => setPageIndex(0),
7504
7429
  "aria-label": showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage,
7505
7430
  tooltip: showShortcutTexts ? texts.pagination.actions.firstPageWithShortcut : texts.pagination.actions.firstPage
7506
7431
  }), React.createElement(IconButton, {
7507
7432
  appearance: "default",
7508
7433
  disabled: !canPreviousPage,
7509
7434
  icon: "arrow-left",
7510
- onClick: function onClick() {
7511
- return setPageIndex(pageIndex - 1);
7512
- },
7435
+ onClick: () => setPageIndex(pageIndex - 1),
7513
7436
  "aria-label": showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage,
7514
7437
  tooltip: showShortcutTexts ? texts.pagination.actions.previousPageWithShortcut : texts.pagination.actions.previousPage
7515
7438
  }), showPageNumbers && pageCount > 0 && React.createElement(PageNumbers, {
@@ -7520,43 +7443,36 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
7520
7443
  appearance: "default",
7521
7444
  disabled: !canNextPage,
7522
7445
  icon: "arrow-right",
7523
- onClick: function onClick() {
7524
- return setPageIndex(pageIndex + 1);
7525
- },
7446
+ onClick: () => setPageIndex(pageIndex + 1),
7526
7447
  "aria-label": showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage,
7527
7448
  tooltip: showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage
7528
7449
  }), React.createElement(IconButton, {
7529
7450
  appearance: "default",
7530
7451
  disabled: !canNextPage,
7531
7452
  icon: "arrow-end",
7532
- onClick: function onClick() {
7533
- return setPageIndex(pageCount - 1);
7534
- },
7453
+ onClick: () => setPageIndex(pageCount - 1),
7535
7454
  "aria-label": showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage,
7536
7455
  tooltip: showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage
7537
7456
  })));
7538
7457
  });
7539
7458
 
7540
- var _excluded$q = ["duration"];
7541
- var Progress = function Progress(_ref) {
7542
- var _cn;
7543
-
7544
- var _ref$duration = _ref.duration,
7545
- duration = _ref$duration === void 0 ? undefined : _ref$duration,
7546
- props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
7547
-
7548
- var style;
7459
+ const Progress = ({
7460
+ duration = undefined,
7461
+ ...props
7462
+ }) => {
7463
+ let style;
7549
7464
 
7550
7465
  if (duration) {
7551
7466
  style = {
7552
- animationDuration: duration + "ms"
7467
+ animationDuration: `${duration}ms`
7553
7468
  };
7554
7469
  }
7555
7470
 
7556
- var className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
7557
- var progressClassName = cn('yt-progress__bar block h-1', (_cn = {
7558
- "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
7559
- }, _cn["w-0 bg-grey-dark animate-[progress_linear]"] = duration, _cn));
7471
+ const className = cn('bg-grey-light rounded block h-1 overflow-hidden w-full', props.className);
7472
+ const progressClassName = cn('yt-progress__bar block h-1', {
7473
+ "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,
7474
+ [`w-0 bg-grey-dark animate-[progress_linear]`]: duration
7475
+ });
7560
7476
  return React__default.createElement("span", Object.assign({}, props, {
7561
7477
  "data-taco": "progress",
7562
7478
  className: className
@@ -9166,19 +9082,16 @@ const useTableRowCreation = (data, tableRef) => {
9166
9082
  };
9167
9083
  };
9168
9084
 
9169
- var _excluded$r = ["id", "defaultId", "children", "onChange", "orientation"],
9170
- _excluded2$5 = ["id", "disabled"],
9171
- _excluded3 = ["id"];
9172
- var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
9173
- var id = props.id,
9174
- defaultId = props.defaultId,
9175
- children = props.children,
9176
- onChange = props.onChange,
9177
- _props$orientation = props.orientation,
9178
- orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
9179
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$r);
9180
-
9181
- var className = cn('yt-tabs', "yt-tabs--" + orientation, {
9085
+ const Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
9086
+ const {
9087
+ id,
9088
+ defaultId,
9089
+ children,
9090
+ onChange,
9091
+ orientation = 'horizontal',
9092
+ ...otherProps
9093
+ } = props;
9094
+ const className = cn('yt-tabs', `yt-tabs--${orientation}`, {
9182
9095
  'flex w-full': orientation === 'vertical'
9183
9096
  }, props.className);
9184
9097
  return React.createElement(TabsPrimitive.Root, Object.assign({}, otherProps, {
@@ -9192,19 +9105,20 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {
9192
9105
  value: id
9193
9106
  }), children);
9194
9107
  });
9195
- var TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9196
- var className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);
9108
+ const TabList = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9109
+ const className = cn('yt-tab__list border-b border-grey-light flex flex-row m-0 mb-4', props.className);
9197
9110
  return React.createElement(TabsPrimitive.List, Object.assign({}, props, {
9198
9111
  className: className,
9199
9112
  ref: ref
9200
9113
  }));
9201
9114
  });
9202
- var TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9203
- var id = props.id,
9204
- disabled = props.disabled,
9205
- otherProps = _objectWithoutPropertiesLoose(props, _excluded2$5);
9206
-
9207
- 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);
9115
+ const TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9116
+ const {
9117
+ id,
9118
+ disabled,
9119
+ ...otherProps
9120
+ } = props;
9121
+ 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);
9208
9122
  return React.createElement(TabsPrimitive.Trigger, Object.assign({}, otherProps, {
9209
9123
  className: className,
9210
9124
  disabled: disabled,
@@ -9215,11 +9129,12 @@ var TabTrigger = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9215
9129
  value: id
9216
9130
  }));
9217
9131
  });
9218
- var TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9219
- var id = props.id,
9220
- otherProps = _objectWithoutPropertiesLoose(props, _excluded3);
9221
-
9222
- var className = cn('yt-tab__panel outline-none', props.className);
9132
+ const TabContent = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
9133
+ const {
9134
+ id,
9135
+ ...otherProps
9136
+ } = props;
9137
+ const className = cn('yt-tab__panel outline-none', props.className);
9223
9138
  return React.createElement(TabsPrimitive.Content, Object.assign({}, otherProps, {
9224
9139
  className: className,
9225
9140
  ref: ref,
@@ -9230,19 +9145,22 @@ Tabs.List = TabList;
9230
9145
  Tabs.Trigger = TabTrigger;
9231
9146
  Tabs.Content = TabContent;
9232
9147
 
9233
- var _excluded$s = ["defaultValue", "highlighted", "onKeyDown", "state"];
9234
- var Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9235
- var onKeyDown = props.onKeyDown,
9236
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$s);
9237
-
9238
- 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
9148
+ const Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9149
+ const {
9150
+ defaultValue: _,
9151
+ highlighted,
9152
+ onKeyDown,
9153
+ state,
9154
+ ...otherProps
9155
+ } = props;
9156
+ 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
9239
9157
  // if it has scroll height then the browser reverts to native scrolling behaviour only
9240
9158
  // so we manually override it to ensure _our_ desired behaviour remains intact
9241
9159
 
9242
- var handleKeyDown = function handleKeyDown(event) {
9160
+ const handleKeyDown = event => {
9243
9161
  if (event.key === 'Home' || event.key === 'End') {
9244
9162
  event.preventDefault();
9245
- var position = event.key === 'End' ? event.currentTarget.value.length : 0;
9163
+ const position = event.key === 'End' ? event.currentTarget.value.length : 0;
9246
9164
  event.currentTarget.setSelectionRange(position, position);
9247
9165
  event.currentTarget.scrollTop = event.key === 'End' ? event.currentTarget.scrollHeight : 0;
9248
9166
  }
@@ -9259,18 +9177,18 @@ var Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9259
9177
  }));
9260
9178
  });
9261
9179
 
9262
- var _excluded$t = ["label", "onChange"];
9263
- var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9264
- var label = props.label,
9265
- onChange = props.onChange,
9266
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$t);
9267
-
9268
- var className = cn('group h-6 w-10 flex rounded-full inline-flex', {
9180
+ const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9181
+ const {
9182
+ label,
9183
+ onChange,
9184
+ ...otherProps
9185
+ } = props;
9186
+ const className = cn('group h-6 w-10 flex rounded-full inline-flex', {
9269
9187
  'mr-2': !!label,
9270
9188
  'bg-grey-darker aria-checked:bg-blue focus:yt-focus': !props.disabled,
9271
9189
  'bg-grey-light cursor-not-allowed aria-checked:bg-blue-light': props.disabled
9272
9190
  }, props.className);
9273
- var element = React.createElement(PrimitiveSwitch.Root, Object.assign({}, otherProps, {
9191
+ const element = React.createElement(PrimitiveSwitch.Root, Object.assign({}, otherProps, {
9274
9192
  className: className,
9275
9193
  onCheckedChange: onChange,
9276
9194
  ref: ref
@@ -9279,7 +9197,7 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9279
9197
  }));
9280
9198
 
9281
9199
  if (label) {
9282
- var labelClassName = cn('flex items-center cursor-pointer', {
9200
+ const labelClassName = cn('flex items-center cursor-pointer', {
9283
9201
  'cursor-not-allowed text-grey-dark': props.disabled
9284
9202
  });
9285
9203
  return React.createElement("label", {
@@ -9290,23 +9208,22 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9290
9208
  return element;
9291
9209
  });
9292
9210
 
9293
- var _excluded$u = ["autoStart", "onComplete", "onClose", "onReady", "spotlightClicks", "disableCloseOnEsc", "disableScrollParentFix"];
9294
-
9295
- var Tooltip$1 = function Tooltip(_ref) {
9296
- var continuous = _ref.continuous,
9297
- index = _ref.index,
9298
- isLastStep = _ref.isLastStep,
9299
- step = _ref.step,
9300
- backProps = _ref.backProps,
9301
- primaryProps = _ref.primaryProps,
9302
- skipProps = _ref.skipProps,
9303
- tooltipProps = _ref.tooltipProps,
9304
- size = _ref.size,
9305
- locale = _ref.locale,
9306
- disableTourSkipOnEsc = _ref.disableTourSkipOnEsc;
9307
- var skipButtonRef = React.useRef(null);
9308
- React.useEffect(function () {
9309
- var onWindowKeyDown = function onWindowKeyDown(event) {
9211
+ const Tooltip$1 = ({
9212
+ continuous,
9213
+ index,
9214
+ isLastStep,
9215
+ step,
9216
+ backProps,
9217
+ primaryProps,
9218
+ skipProps,
9219
+ tooltipProps,
9220
+ size,
9221
+ locale,
9222
+ disableTourSkipOnEsc
9223
+ }) => {
9224
+ const skipButtonRef = React.useRef(null);
9225
+ React.useEffect(() => {
9226
+ const onWindowKeyDown = event => {
9310
9227
  if (!disableTourSkipOnEsc) {
9311
9228
  if (event.keyCode === keycode('esc') && skipButtonRef.current !== null) {
9312
9229
  event.preventDefault();
@@ -9317,7 +9234,7 @@ var Tooltip$1 = function Tooltip(_ref) {
9317
9234
  };
9318
9235
 
9319
9236
  window.addEventListener('keydown', onWindowKeyDown);
9320
- return function () {
9237
+ return () => {
9321
9238
  window.removeEventListener('keydown', onWindowKeyDown);
9322
9239
  };
9323
9240
  }, []);
@@ -9336,30 +9253,30 @@ var Tooltip$1 = function Tooltip(_ref) {
9336
9253
  appearance: "discrete"
9337
9254
  }), locale.back), React.createElement(Button$1, Object.assign({}, primaryProps, {
9338
9255
  appearance: "primary"
9339
- }), continuous ? isLastStep ? locale.last + " (" + (index + 1) + "/" + size + ")" : locale.next + " (" + (index + 1) + "/" + size + ")" : locale.close)));
9256
+ }), continuous ? isLastStep ? `${locale.last} (${index + 1}/${size})` : `${locale.next} (${index + 1}/${size})` : locale.close)));
9340
9257
  }; // eslint-disable-next-line @typescript-eslint/no-unused-vars
9341
9258
 
9342
9259
 
9343
- var TourStep = function TourStep(_props) {
9344
- return null;
9345
- };
9346
- var Tour = function Tour(props) {
9347
- var _useLocalization = useLocalization(),
9348
- tour = _useLocalization.texts.tour;
9349
-
9350
- var run = props.autoStart,
9351
- onComplete = props.onComplete,
9352
- onClose = props.onClose,
9353
- onReady = props.onReady,
9354
- spotlightClicks = props.spotlightClicks,
9355
- disableTourSkipOnEsc = props.disableCloseOnEsc,
9356
- _props$disableScrollP = props.disableScrollParentFix,
9357
- disableScrollParentFix = _props$disableScrollP === void 0 ? false : _props$disableScrollP,
9358
- rest = _objectWithoutPropertiesLoose(props, _excluded$u);
9359
-
9360
- var steps = React.useMemo(function () {
9361
- return React.Children.map(props.children, function (child) {
9362
- var step = {
9260
+ const TourStep = _props => null;
9261
+ const Tour = props => {
9262
+ const {
9263
+ texts: {
9264
+ tour
9265
+ }
9266
+ } = useLocalization();
9267
+ const {
9268
+ autoStart: run,
9269
+ onComplete,
9270
+ onClose,
9271
+ onReady,
9272
+ spotlightClicks,
9273
+ disableCloseOnEsc: disableTourSkipOnEsc,
9274
+ disableScrollParentFix = false,
9275
+ ...rest
9276
+ } = props;
9277
+ const steps = React.useMemo(() => {
9278
+ return React.Children.map(props.children, child => {
9279
+ const step = {
9363
9280
  disableBeacon: !child.props.showBeacon,
9364
9281
  target: child.props.selector,
9365
9282
  placement: child.props.position,
@@ -9369,12 +9286,10 @@ var Tour = function Tour(props) {
9369
9286
  return step;
9370
9287
  });
9371
9288
  }, [props.children]);
9372
- var getStep = React.useCallback(function (selector) {
9289
+ const getStep = React.useCallback(selector => {
9373
9290
  var _props$children$find;
9374
9291
 
9375
- return (_props$children$find = props.children.find(function (child) {
9376
- return child.props.selector === selector;
9377
- })) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
9292
+ return (_props$children$find = props.children.find(child => child.props.selector === selector)) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
9378
9293
  }, [props.children]);
9379
9294
 
9380
9295
  function callback(state) {
@@ -9404,12 +9319,10 @@ var Tour = function Tour(props) {
9404
9319
  floaterProps: {
9405
9320
  disableAnimation: true
9406
9321
  },
9407
- tooltipComponent: function tooltipComponent(tooltipProps) {
9408
- return React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
9409
- locale: tour,
9410
- disableTourSkipOnEsc: disableTourSkipOnEsc
9411
- }));
9412
- },
9322
+ tooltipComponent: tooltipProps => React.createElement(Tooltip$1, Object.assign({}, tooltipProps, {
9323
+ locale: tour,
9324
+ disableTourSkipOnEsc: disableTourSkipOnEsc
9325
+ })),
9413
9326
  locale: tour,
9414
9327
  spotlightPadding: 8,
9415
9328
  spotlightClicks: spotlightClicks,
@@ -9450,10 +9363,10 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9450
9363
  }, [ref, callback]);
9451
9364
  };
9452
9365
 
9453
- var _excluded$v = ["onSearch"];
9366
+ var _excluded$i = ["onSearch"];
9454
9367
  var SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput(_ref, ref) {
9455
9368
  var onSearch = _ref.onSearch,
9456
- props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
9369
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
9457
9370
 
9458
9371
  var _useLocalization = useLocalization(),
9459
9372
  texts = _useLocalization.texts;