@economic/taco 1.1.11 → 1.1.12-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 (40) hide show
  1. package/dist/esm/components/Card/Card.js +3 -0
  2. package/dist/esm/components/Card/Card.js.map +1 -1
  3. package/dist/esm/components/Checkbox/Checkbox.js +18 -15
  4. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  5. package/dist/esm/components/Combobox/Combobox.js +25 -23
  6. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  7. package/dist/esm/components/Datepicker/Datepicker.js +52 -48
  8. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  9. package/dist/esm/components/Dialog/Dialog.js +58 -39
  10. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  11. package/dist/esm/components/Dialog/components/Trigger.js +1 -1
  12. package/dist/esm/components/Dialog/components/Trigger.js.map +1 -1
  13. package/dist/esm/components/Field/Field.js +12 -10
  14. package/dist/esm/components/Field/Field.js.map +1 -1
  15. package/dist/esm/components/Form/Form.js +8 -6
  16. package/dist/esm/components/Form/Form.js.map +1 -1
  17. package/dist/esm/components/Group/Group.js +8 -6
  18. package/dist/esm/components/Group/Group.js.map +1 -1
  19. package/dist/esm/components/Hanger/Hanger.js +1 -1
  20. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  21. package/dist/esm/components/Popover/Popover.js +1 -1
  22. package/dist/esm/components/Popover/Popover.js.map +1 -1
  23. package/dist/esm/components/SearchInput/SearchInput.js +3 -0
  24. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  25. package/dist/esm/index.js +3 -0
  26. package/dist/esm/index.js.map +1 -1
  27. package/dist/esm/utils/hooks/useDropTarget.js +10 -7
  28. package/dist/esm/utils/hooks/useDropTarget.js.map +1 -1
  29. package/dist/esm/utils/hooks/useProxiedRef.js +3 -3
  30. package/dist/esm/utils/hooks/useProxiedRef.js.map +1 -1
  31. package/dist/esm/utils/mergeRefs.js +3 -3
  32. package/dist/esm/utils/mergeRefs.js.map +1 -1
  33. package/dist/index.d.ts +3 -0
  34. package/dist/taco.cjs.development.js +266 -222
  35. package/dist/taco.cjs.development.js.map +1 -1
  36. package/dist/taco.cjs.production.min.js +1 -1
  37. package/dist/taco.cjs.production.min.js.map +1 -1
  38. package/dist/utils/mergeRefs.d.ts +1 -1
  39. package/package.json +130 -131
  40. package/tailwind.config.js +9 -0
@@ -4058,37 +4058,37 @@ const Provider = props => {
4058
4058
  const useTaco = () => React.useContext(Context);
4059
4059
  const useLocalization = () => useTaco().localization;
4060
4060
 
4061
- const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
4062
- className: "dot"
4063
- }) : day.getDate();
4061
+ var _excluded$3 = ["onChange", "value"];
4064
4062
 
4065
- const thisYear = /*#__PURE__*/new Date().getFullYear();
4066
- const years = [];
4063
+ var renderDay = function renderDay(day, modifiers) {
4064
+ return modifiers.disabled ? React.createElement("span", {
4065
+ className: "dot"
4066
+ }) : day.getDate();
4067
+ };
4068
+
4069
+ var thisYear = /*#__PURE__*/new Date().getFullYear();
4070
+ var years = [];
4067
4071
 
4068
- for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
4072
+ for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
4069
4073
  years.push(i);
4070
4074
  }
4071
4075
 
4072
- const Navbar = /*#__PURE__*/React.memo(({
4073
- onMonthChange,
4074
- onNextClick,
4075
- onPreviousClick,
4076
- value = new Date()
4077
- }) => {
4078
- const {
4079
- texts: {
4080
- calendar: {
4081
- actions,
4082
- months
4083
- }
4084
- }
4085
- } = useLocalization();
4076
+ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4077
+ var onMonthChange = _ref.onMonthChange,
4078
+ onNextClick = _ref.onNextClick,
4079
+ onPreviousClick = _ref.onPreviousClick,
4080
+ _ref$value = _ref.value,
4081
+ value = _ref$value === void 0 ? new Date() : _ref$value;
4086
4082
 
4087
- const handleChange = function handleChange(event) {
4088
- const {
4089
- year,
4090
- month
4091
- } = event.target.form;
4083
+ var _useLocalization = useLocalization(),
4084
+ _useLocalization$text = _useLocalization.texts.calendar,
4085
+ actions = _useLocalization$text.actions,
4086
+ months = _useLocalization$text.months;
4087
+
4088
+ var handleChange = function handleChange(event) {
4089
+ var _event$target$form = event.target.form,
4090
+ year = _event$target$form.year,
4091
+ month = _event$target$form.month;
4092
4092
  onMonthChange(new Date(year.value, month.value));
4093
4093
  };
4094
4094
 
@@ -4101,49 +4101,59 @@ const Navbar = /*#__PURE__*/React.memo(({
4101
4101
  name: "month",
4102
4102
  onChange: handleChange,
4103
4103
  value: value.getMonth()
4104
- }, months.map((month, i) => React.createElement("option", {
4105
- key: month,
4106
- value: i
4107
- }, month))), React.createElement("select", {
4104
+ }, months.map(function (month, i) {
4105
+ return React.createElement("option", {
4106
+ key: month,
4107
+ value: i
4108
+ }, month);
4109
+ })), React.createElement("select", {
4108
4110
  className: "h-8 px-2",
4109
4111
  name: "year",
4110
4112
  onChange: handleChange,
4111
4113
  value: value.getFullYear()
4112
- }, years.map(year => React.createElement("option", {
4113
- key: year,
4114
- value: year
4115
- }, String(year))))), React.createElement("div", null, React.createElement(IconButton, {
4114
+ }, years.map(function (year) {
4115
+ return React.createElement("option", {
4116
+ key: year,
4117
+ value: year
4118
+ }, String(year));
4119
+ }))), React.createElement("div", null, React.createElement(IconButton, {
4116
4120
  appearance: "discrete",
4117
4121
  icon: "chevron-left",
4118
4122
  "aria-label": actions.previousMonth,
4119
- onClick: () => onPreviousClick(),
4123
+ onClick: function onClick() {
4124
+ return onPreviousClick();
4125
+ },
4120
4126
  rounded: true
4121
4127
  }), React.createElement(IconButton, {
4122
4128
  appearance: "discrete",
4123
4129
  icon: "chevron-right",
4124
4130
  "aria-label": actions.nextMonth,
4125
- onClick: () => onNextClick(),
4131
+ onClick: function onClick() {
4132
+ return onNextClick();
4133
+ },
4126
4134
  rounded: true
4127
4135
  })));
4128
4136
  });
4129
- const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4130
- const {
4131
- onChange: handleChange,
4132
- value,
4133
- ...otherProps
4134
- } = props;
4135
- const {
4136
- locale,
4137
- texts
4138
- } = useLocalization();
4139
- const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
4140
- React.useEffect(() => {
4137
+ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4138
+ var handleChange = props.onChange,
4139
+ value = props.value,
4140
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
4141
+
4142
+ var _useLocalization2 = useLocalization(),
4143
+ locale = _useLocalization2.locale,
4144
+ texts = _useLocalization2.texts;
4145
+
4146
+ var _React$useState = React.useState(value !== null && value !== void 0 ? value : new Date()),
4147
+ visibleMonth = _React$useState[0],
4148
+ setVisibleMonth = _React$useState[1];
4149
+
4150
+ React.useEffect(function () {
4141
4151
  if (visibleMonth !== value) {
4142
4152
  setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
4143
4153
  }
4144
4154
  }, [value]);
4145
4155
 
4146
- const handleDayClick = (date, modifiers, event) => {
4156
+ var handleDayClick = function handleDayClick(date, modifiers, event) {
4147
4157
  if (modifiers.outside || modifiers.disabled) {
4148
4158
  return;
4149
4159
  }
@@ -4151,8 +4161,8 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4151
4161
  handleChange(date, event);
4152
4162
  };
4153
4163
 
4154
- const handleCalendarClickToday = () => {
4155
- const today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4164
+ var handleCalendarClickToday = function handleCalendarClickToday() {
4165
+ var today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
4156
4166
 
4157
4167
  today.setHours(12);
4158
4168
  today.setMinutes(0);
@@ -4160,7 +4170,7 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4160
4170
  handleChange(today);
4161
4171
  };
4162
4172
 
4163
- const className = cn('flex bg-white text-xs p-4', otherProps.className);
4173
+ var className = cn('flex bg-white text-xs p-4', otherProps.className);
4164
4174
  return React.createElement("div", {
4165
4175
  "data-taco": "calendar"
4166
4176
  }, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
@@ -4171,14 +4181,18 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4171
4181
  firstDayOfWeek: 1,
4172
4182
  months: texts.calendar.months,
4173
4183
  weekdaysShort: texts.calendar.weekdaysShort,
4174
- navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
4175
- onMonthChange: setVisibleMonth,
4176
- value: visibleMonth
4177
- })),
4184
+ navbarElement: function navbarElement(navProps) {
4185
+ return React.createElement(Navbar, Object.assign({}, navProps, {
4186
+ onMonthChange: setVisibleMonth,
4187
+ value: visibleMonth
4188
+ }));
4189
+ },
4178
4190
  onDayClick: handleDayClick,
4179
4191
  onMonthChange: setVisibleMonth,
4180
4192
  onTodayButtonClick: handleCalendarClickToday,
4181
- captionElement: () => null,
4193
+ captionElement: function captionElement() {
4194
+ return null;
4195
+ },
4182
4196
  todayButton: texts.calendar.actions.today,
4183
4197
  showOutsideDays: true,
4184
4198
  renderDay: renderDay,
@@ -4187,30 +4201,32 @@ const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
4187
4201
  })));
4188
4202
  });
4189
4203
 
4190
- const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4191
- const {
4192
- checked,
4193
- highlighted,
4194
- indeterminate,
4195
- invalid,
4196
- label,
4197
- onChange,
4198
- ...otherProps
4199
- } = props;
4200
- const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4204
+ var _excluded$4 = ["checked", "highlighted", "indeterminate", "invalid", "label", "onChange"];
4205
+ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4206
+ var checked = props.checked,
4207
+ highlighted = props.highlighted,
4208
+ indeterminate = props.indeterminate,
4209
+ invalid = props.invalid,
4210
+ label = props.label,
4211
+ onChange = props.onChange,
4212
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$4);
4213
+
4214
+ var className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]
4201
4215
  props.className, {
4202
4216
  'border-grey-dark text-blue hover:text-blue-light focus:border-blue focus:hover:border-blue-light': !props.disabled && !invalid,
4203
4217
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4204
4218
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4205
4219
  'border-red text-red hover:text-red-light hover:border-red-light focus:border-red focus:hover:border-red-light': invalid && !props.disabled
4206
4220
  });
4207
- let handleChange;
4221
+ var handleChange;
4208
4222
 
4209
4223
  if (onChange) {
4210
- handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
4224
+ handleChange = function handleChange(checked) {
4225
+ return onChange(checked === 'indeterminate' ? false : checked);
4226
+ };
4211
4227
  }
4212
4228
 
4213
- const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4229
+ var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4214
4230
  "data-taco": "checkbox",
4215
4231
  checked: indeterminate ? 'indeterminate' : checked,
4216
4232
  className: className,
@@ -4224,7 +4240,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4224
4240
  })));
4225
4241
 
4226
4242
  if (label) {
4227
- const labelClassName = cn('flex items-center cursor-pointer gap-2', {
4243
+ var labelClassName = cn('flex items-center cursor-pointer gap-2', {
4228
4244
  'cursor-not-allowed text-grey-dark': props.disabled
4229
4245
  }, props.className);
4230
4246
  return React.createElement("label", {
@@ -4235,9 +4251,9 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4235
4251
  return element;
4236
4252
  });
4237
4253
 
4238
- const useProxiedRef = ref => {
4239
- const internalRef = React.useRef(null);
4240
- React.useEffect(() => {
4254
+ var useProxiedRef = function useProxiedRef(ref) {
4255
+ var internalRef = React.useRef(null);
4256
+ React.useEffect(function () {
4241
4257
  if (ref) {
4242
4258
  if (typeof ref === 'function') {
4243
4259
  ref(internalRef.current);
@@ -5105,26 +5121,27 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
5105
5121
  return dimensions;
5106
5122
  };
5107
5123
 
5108
- const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5109
- const {
5110
- className: externalClassName,
5111
- dialog,
5112
- style,
5113
- ...otherProps
5114
- } = props;
5115
- const {
5116
- combobox,
5117
- button,
5118
- input,
5119
- popover,
5120
- list
5121
- } = useCombobox(otherProps, ref);
5122
- const internalRef = React.useRef(null);
5123
- const {
5124
- texts
5125
- } = useLocalization();
5126
- const selectDimensions = useBoundingClientRectListener(internalRef);
5127
- const className = cn('inline-flex relative', {
5124
+ var _excluded$5 = ["className", "dialog", "style"];
5125
+ var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5126
+ var externalClassName = props.className,
5127
+ dialog = props.dialog,
5128
+ style = props.style,
5129
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$5);
5130
+
5131
+ var _useCombobox = useCombobox(otherProps, ref),
5132
+ combobox = _useCombobox.combobox,
5133
+ button = _useCombobox.button,
5134
+ input = _useCombobox.input,
5135
+ popover = _useCombobox.popover,
5136
+ list = _useCombobox.list;
5137
+
5138
+ var internalRef = React.useRef(null);
5139
+
5140
+ var _useLocalization = useLocalization(),
5141
+ texts = _useLocalization.texts;
5142
+
5143
+ var selectDimensions = useBoundingClientRectListener(internalRef);
5144
+ var className = cn('inline-flex relative', {
5128
5145
  'yt-combobox--inline': props.inline
5129
5146
  }, externalClassName);
5130
5147
  return React.createElement("span", {
@@ -5143,7 +5160,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5143
5160
  appearance: "discrete",
5144
5161
  className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
5145
5162
  icon: popover.open ? 'chevron-up' : 'chevron-down',
5146
- onClick: () => {
5163
+ onClick: function onClick() {
5147
5164
  var _input$ref$current;
5148
5165
 
5149
5166
  popover.onOpenChange(true);
@@ -5155,7 +5172,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5155
5172
  icon: "list-search",
5156
5173
  disabled: props.readOnly || props.disabled,
5157
5174
  dialog: dialog,
5158
- onFocus: event => {
5175
+ onFocus: function onFocus(event) {
5159
5176
  var _input$ref$current2;
5160
5177
 
5161
5178
  // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element
@@ -5168,7 +5185,7 @@ const Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
5168
5185
  }) : undefined
5169
5186
  })))), React.createElement(PopoverPrimitive.Content, {
5170
5187
  align: "start",
5171
- onOpenAutoFocus: event => {
5188
+ onOpenAutoFocus: function onOpenAutoFocus(event) {
5172
5189
  event.preventDefault();
5173
5190
  },
5174
5191
  sideOffset: 4
@@ -5391,8 +5408,8 @@ const UnstyledContent = /*#__PURE__*/React.forwardRef(function PopoverContent(pr
5391
5408
  });
5392
5409
 
5393
5410
  function mergeRefs(refs) {
5394
- return value => {
5395
- refs.forEach(ref => {
5411
+ return function (value) {
5412
+ refs.forEach(function (ref) {
5396
5413
  if (typeof ref === 'function') {
5397
5414
  ref(value);
5398
5415
  } else if (ref != null) {
@@ -5478,23 +5495,23 @@ Popover.Trigger = Trigger$1;
5478
5495
  Popover.Content = Content$1;
5479
5496
  Popover.Close = Close$1;
5480
5497
 
5481
- const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5482
- const {
5483
- className: externalClassName,
5484
- onReset: handleReset,
5485
- style,
5486
- shortcuts,
5487
- shortcutsText,
5488
- ...otherProps
5489
- } = props;
5490
- const {
5491
- calendar,
5492
- input
5493
- } = useDatepicker(otherProps, ref);
5494
- const {
5495
- texts
5496
- } = useLocalization();
5497
- const className = cn('inline-flex w-full text-black font-normal', externalClassName);
5498
+ var _excluded$6 = ["className", "onReset", "style", "shortcuts", "shortcutsText"];
5499
+ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
5500
+ var externalClassName = props.className,
5501
+ handleReset = props.onReset,
5502
+ style = props.style,
5503
+ shortcuts = props.shortcuts,
5504
+ shortcutsText = props.shortcutsText,
5505
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
5506
+
5507
+ var _useDatepicker = useDatepicker(otherProps, ref),
5508
+ calendar = _useDatepicker.calendar,
5509
+ input = _useDatepicker.input;
5510
+
5511
+ var _useLocalization = useLocalization(),
5512
+ texts = _useLocalization.texts;
5513
+
5514
+ var className = cn('inline-flex w-full text-black font-normal', externalClassName);
5498
5515
  return React.createElement("span", {
5499
5516
  className: className,
5500
5517
  "data-taco": "datepicker",
@@ -5504,37 +5521,40 @@ const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref)
5504
5521
  "aria-label": texts.datepicker.expand,
5505
5522
  disabled: input.disabled || input.readOnly,
5506
5523
  icon: "calendar"
5507
- })), React.createElement(Popover.Content, null, ({
5508
- close
5509
- }) => React.createElement("div", {
5510
- className: "-m-3 flex"
5511
- }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5512
- onChange: (date, event) => {
5513
- calendar.onChange(date, event);
5514
- close();
5515
- },
5516
- tabIndex: -1
5517
- })), shortcuts && React.createElement("div", {
5518
- className: "border-grey-dark flex flex-col border-l"
5519
- }, React.createElement("span", {
5520
- className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
5521
- }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map((shortcut, i) => React.createElement("li", {
5522
- key: i
5523
- }, React.createElement("button", {
5524
- className: "hover:bg-grey-light flex w-full items-start px-4 py-1 text-xs",
5525
- onClick: event => {
5526
- event.persist();
5527
- shortcut.onClick(event);
5528
- close();
5529
- }
5530
- }, shortcut.text)))), handleReset && React.createElement("button", {
5531
- className: "text-blue hover:text-blue-light my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs",
5532
- onClick: event => {
5533
- event.persist();
5534
- handleReset(event);
5535
- close();
5536
- }
5537
- }, texts.datepicker.clear)))))
5524
+ })), React.createElement(Popover.Content, null, function (_ref) {
5525
+ var close = _ref.close;
5526
+ return React.createElement("div", {
5527
+ className: "-m-3 flex"
5528
+ }, React.createElement(Calendar$1, Object.assign({}, calendar, {
5529
+ onChange: function onChange(date, event) {
5530
+ calendar.onChange(date, event);
5531
+ close();
5532
+ },
5533
+ tabIndex: -1
5534
+ })), shortcuts && React.createElement("div", {
5535
+ className: "border-grey-dark flex flex-col border-l"
5536
+ }, React.createElement("span", {
5537
+ className: "m-4 mb-3 flex h-8 w-32 items-center text-xs font-semibold"
5538
+ }, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map(function (shortcut, i) {
5539
+ return React.createElement("li", {
5540
+ key: i
5541
+ }, React.createElement("button", {
5542
+ className: "hover:bg-grey-light flex w-full items-start px-4 py-1 text-xs",
5543
+ onClick: function onClick(event) {
5544
+ event.persist();
5545
+ shortcut.onClick(event);
5546
+ close();
5547
+ }
5548
+ }, shortcut.text));
5549
+ })), handleReset && React.createElement("button", {
5550
+ className: "text-blue hover:text-blue-light my-4 mx-auto mt-auto inline-flex cursor-pointer border-none bg-transparent text-xs",
5551
+ onClick: function onClick(event) {
5552
+ event.persist();
5553
+ handleReset(event);
5554
+ close();
5555
+ }
5556
+ }, texts.datepicker.clear)));
5557
+ }))
5538
5558
  })));
5539
5559
  });
5540
5560
 
@@ -5777,12 +5797,14 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
5777
5797
  });
5778
5798
  Extra.displayName = 'DialogExtra';
5779
5799
 
5780
- const useSeparatedChildren = initialChildren => {
5781
- return React.useMemo(() => {
5782
- const children = [];
5783
- let drawer;
5784
- let extra;
5785
- React.Children.toArray(initialChildren).forEach(child => {
5800
+ var _excluded$7 = ["children", "closeOnEscape", "defaultOpen", "draggable", "onChange", "onClose", "open", "showCloseButton", "size", "trigger"];
5801
+
5802
+ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5803
+ return React.useMemo(function () {
5804
+ var children = [];
5805
+ var drawer;
5806
+ var extra;
5807
+ React.Children.toArray(initialChildren).forEach(function (child) {
5786
5808
  var _child$type, _child$type2;
5787
5809
 
5788
5810
  if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
@@ -5797,39 +5819,55 @@ const useSeparatedChildren = initialChildren => {
5797
5819
  }, [initialChildren]);
5798
5820
  };
5799
5821
 
5800
- const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5801
- const {
5802
- children: initialChildren,
5803
- closeOnEscape = true,
5804
- defaultOpen,
5805
- draggable = false,
5806
- onChange,
5807
- onClose,
5808
- open,
5809
- showCloseButton = true,
5810
- size = 'sm',
5811
- trigger,
5812
- ...otherProps
5813
- } = props;
5814
- const [children, drawer, extra] = useSeparatedChildren(initialChildren);
5815
- const [drawerOpen, setDrawerOpen] = React.useState(false);
5816
- const context = React.useMemo(() => ({
5817
- closeOnEscape,
5818
- draggable,
5819
- drawer: {
5820
- open: drawerOpen,
5821
- toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
5822
- },
5823
- elements: {
5824
- drawer,
5825
- extra
5826
- },
5827
- onClose,
5828
- props: otherProps,
5829
- showCloseButton,
5830
- size,
5831
- ref
5832
- }), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5822
+ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
5823
+ var initialChildren = props.children,
5824
+ _props$closeOnEscape = props.closeOnEscape,
5825
+ closeOnEscape = _props$closeOnEscape === void 0 ? true : _props$closeOnEscape,
5826
+ defaultOpen = props.defaultOpen,
5827
+ _props$draggable = props.draggable,
5828
+ draggable = _props$draggable === void 0 ? false : _props$draggable,
5829
+ onChange = props.onChange,
5830
+ onClose = props.onClose,
5831
+ open = props.open,
5832
+ _props$showCloseButto = props.showCloseButton,
5833
+ showCloseButton = _props$showCloseButto === void 0 ? true : _props$showCloseButto,
5834
+ _props$size = props.size,
5835
+ size = _props$size === void 0 ? 'sm' : _props$size,
5836
+ trigger = props.trigger,
5837
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$7);
5838
+
5839
+ var _useSeparatedChildren = useSeparatedChildren(initialChildren),
5840
+ children = _useSeparatedChildren[0],
5841
+ drawer = _useSeparatedChildren[1],
5842
+ extra = _useSeparatedChildren[2];
5843
+
5844
+ var _React$useState = React.useState(false),
5845
+ drawerOpen = _React$useState[0],
5846
+ setDrawerOpen = _React$useState[1];
5847
+
5848
+ var context = React.useMemo(function () {
5849
+ return {
5850
+ closeOnEscape: closeOnEscape,
5851
+ draggable: draggable,
5852
+ drawer: {
5853
+ open: drawerOpen,
5854
+ toggle: function toggle() {
5855
+ return setDrawerOpen(function (isDrawerOpen) {
5856
+ return !isDrawerOpen;
5857
+ });
5858
+ }
5859
+ },
5860
+ elements: {
5861
+ drawer: drawer,
5862
+ extra: extra
5863
+ },
5864
+ onClose: onClose,
5865
+ props: otherProps,
5866
+ showCloseButton: showCloseButton,
5867
+ size: size,
5868
+ ref: ref
5869
+ };
5870
+ }, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
5833
5871
  return React.createElement(DialogContext.Provider, {
5834
5872
  value: context
5835
5873
  }, React.createElement(DialogPrimitive.Root, {
@@ -5846,18 +5884,19 @@ Dialog.Extra = Extra;
5846
5884
  Dialog.Drawer = Drawer;
5847
5885
  Dialog.Close = Close$2;
5848
5886
 
5849
- const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5850
- const {
5851
- disabled,
5852
- children,
5853
- invalid = false,
5854
- message,
5855
- ...otherProps
5856
- } = props;
5857
- const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5887
+ var _excluded$8 = ["disabled", "children", "invalid", "message"];
5888
+ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5889
+ var disabled = props.disabled,
5890
+ children = props.children,
5891
+ _props$invalid = props.invalid,
5892
+ invalid = _props$invalid === void 0 ? false : _props$invalid,
5893
+ message = props.message,
5894
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$8);
5895
+
5896
+ var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5858
5897
  'text-grey-dark': disabled
5859
5898
  }, props.className);
5860
- const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5899
+ var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5861
5900
  'text-grey-darkest': !invalid,
5862
5901
  'text-red': invalid,
5863
5902
  'opacity-50': disabled
@@ -5887,12 +5926,13 @@ const Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5887
5926
  }));
5888
5927
  });
5889
5928
 
5890
- const Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5891
- const {
5892
- as: Tag = 'span',
5893
- ...otherProps
5894
- } = props;
5895
- const className = cn('flex ', props.className);
5929
+ var _excluded$9 = ["as"];
5930
+ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5931
+ var _props$as = props.as,
5932
+ Tag = _props$as === void 0 ? 'span' : _props$as,
5933
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$9);
5934
+
5935
+ var className = cn('flex ', props.className);
5896
5936
  return React.createElement(Tag, Object.assign({}, otherProps, {
5897
5937
  className: className,
5898
5938
  "data-taco": "group",
@@ -6882,23 +6922,26 @@ const Treeview = /*#__PURE__*/React__default.forwardRef(function Treeview(props,
6882
6922
  Treeview.Group = TreeviewGroup;
6883
6923
  Treeview.Item = TreeviewItem;
6884
6924
 
6885
- const useDropTarget = onDrop => {
6886
- const [isDraggedOver, setDraggedOver] = React__default.useState(false);
6887
- const handleDragEnter = React__default.useCallback(event => {
6925
+ var useDropTarget = function useDropTarget(onDrop) {
6926
+ var _React$useState = React__default.useState(false),
6927
+ isDraggedOver = _React$useState[0],
6928
+ setDraggedOver = _React$useState[1];
6929
+
6930
+ var handleDragEnter = React__default.useCallback(function (event) {
6888
6931
  event.preventDefault();
6889
6932
  setDraggedOver(true);
6890
6933
  }, []);
6891
- const handleDragLeave = React__default.useCallback(event => {
6934
+ var handleDragLeave = React__default.useCallback(function (event) {
6892
6935
  event.preventDefault();
6893
6936
 
6894
6937
  if (event.target === event.currentTarget) {
6895
6938
  setDraggedOver(false);
6896
6939
  }
6897
6940
  }, []);
6898
- const handleDragOver = React__default.useCallback(event => {
6941
+ var handleDragOver = React__default.useCallback(function (event) {
6899
6942
  event.preventDefault();
6900
6943
  }, []);
6901
- const handleDrop = React__default.useCallback(event => {
6944
+ var handleDrop = React__default.useCallback(function (event) {
6902
6945
  event.preventDefault();
6903
6946
  event.persist();
6904
6947
  setDraggedOver(false);
@@ -6907,7 +6950,7 @@ const useDropTarget = onDrop => {
6907
6950
  onDrop(event);
6908
6951
  }
6909
6952
  }, [onDrop]);
6910
- const props = onDrop ? {
6953
+ var props = onDrop ? {
6911
6954
  onDragEnter: handleDragEnter,
6912
6955
  onDragLeave: handleDragLeave,
6913
6956
  onDragOver: handleDragOver,
@@ -9426,12 +9469,12 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
9426
9469
  }, [ref, callback]);
9427
9470
  };
9428
9471
 
9429
- const Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
9430
- const {
9431
- noPadding,
9432
- ...props
9433
- } = externalProps;
9434
- const className = cn('flex-grow overflow-auto', {
9472
+ var _excluded$a = ["noPadding"];
9473
+ var Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalProps, ref) {
9474
+ var noPadding = externalProps.noPadding,
9475
+ props = _objectWithoutPropertiesLoose(externalProps, _excluded$a);
9476
+
9477
+ var className = cn('flex-grow overflow-auto', {
9435
9478
  'mx-4 mb-4': !noPadding
9436
9479
  }, props.className);
9437
9480
  return React.createElement("div", Object.assign({}, props, {
@@ -9439,13 +9482,11 @@ const Content$6 = /*#__PURE__*/React.forwardRef(function CardContent(externalPro
9439
9482
  ref: ref
9440
9483
  }));
9441
9484
  });
9442
- const Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
9443
- const {
9444
- title,
9445
- menu,
9446
- children
9447
- } = props;
9448
- const className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
9485
+ var Card = /*#__PURE__*/React.forwardRef(function Card(props, ref) {
9486
+ var title = props.title,
9487
+ menu = props.menu,
9488
+ children = props.children;
9489
+ var className = cn('bg-white flex flex-col rounded-xl shadow-[0px_0px_1px_rgba(0,0,0,0.1),0px_6px_18px_rgba(47,51,68,0.2)]', props.className);
9449
9490
  return React.createElement("div", {
9450
9491
  className: className,
9451
9492
  "data-taco": "card",
@@ -9517,16 +9558,19 @@ exports.getParentRowIndexPath = getParentRowIndexPath;
9517
9558
  exports.getRadioGroupItemValueAsString = getRadioGroupItemValueAsString;
9518
9559
  exports.icons = icons;
9519
9560
  exports.insertChildTableRow = insertChildTableRow;
9561
+ exports.mergeRefs = mergeRefs;
9520
9562
  exports.parseFromCustomString = parseFromCustomString;
9521
9563
  exports.parseFromISOString = parseFromISOString;
9522
9564
  exports.removeChildTableRow = removeChildTableRow;
9523
9565
  exports.setByRowIndexPath = setByRowIndexPath;
9524
9566
  exports.useBoundingClientRectListener = useBoundingClientRectListener;
9567
+ exports.useDropTarget = useDropTarget;
9525
9568
  exports.useListKeyboardNavigation = useListKeyboardNavigation;
9526
9569
  exports.useListScrollTo = useListScrollTo;
9527
9570
  exports.useLocalization = useLocalization;
9528
9571
  exports.useOnClickOutside = useOnClickOutside;
9529
9572
  exports.usePagination = usePagination;
9573
+ exports.useProxiedRef = useProxiedRef;
9530
9574
  exports.useRadioGroup = useRadioGroup;
9531
9575
  exports.useTableRowCreation = useTableRowCreation;
9532
9576
  exports.useTaco = useTaco;