@economic/taco 0.0.33-alpha.4 → 0.0.33-alpha.6
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.
- package/dist/components/Listbox/useMultiListbox.d.ts +1 -1
- package/dist/esm/components/Banner/Banner.js +7 -5
- package/dist/esm/components/Banner/Banner.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +15 -18
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Datepicker/Datepicker.js +48 -52
- package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +39 -58
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Field/Field.js +10 -12
- package/dist/esm/components/Field/Field.js.map +1 -1
- package/dist/esm/components/Form/Form.js +6 -8
- package/dist/esm/components/Form/Form.js.map +1 -1
- package/dist/esm/components/Listbox/useMultiListbox.js +1 -0
- package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
- package/dist/esm/components/Select/useSelect.js +1 -1
- package/dist/esm/components/Select/useSelect.js.map +1 -1
- package/dist/taco.cjs.development.js +179 -214
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/utils/tailwind.d.ts +1 -1
- package/package.json +2 -2
@@ -3479,11 +3479,13 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref)
|
|
3479
3479
|
}, className, ref);
|
3480
3480
|
});
|
3481
3481
|
|
3482
|
-
|
3483
|
-
|
3484
|
-
|
3485
|
-
|
3486
|
-
|
3482
|
+
const Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
|
3483
|
+
const {
|
3484
|
+
children,
|
3485
|
+
state,
|
3486
|
+
onClose
|
3487
|
+
} = props;
|
3488
|
+
const className = cn('bg-white relative flex items-center px-4 h-12 shadow-lg z-10', props.className);
|
3487
3489
|
return React.createElement("div", {
|
3488
3490
|
className: className,
|
3489
3491
|
"data-taco": "banner",
|
@@ -3977,37 +3979,37 @@ const Provider = props => {
|
|
3977
3979
|
const useTaco = () => React.useContext(Context);
|
3978
3980
|
const useLocalization = () => useTaco().localization;
|
3979
3981
|
|
3980
|
-
|
3982
|
+
const renderDay = (day, modifiers) => modifiers.disabled ? React.createElement("span", {
|
3983
|
+
className: "dot"
|
3984
|
+
}) : day.getDate();
|
3981
3985
|
|
3982
|
-
|
3983
|
-
|
3984
|
-
className: "dot"
|
3985
|
-
}) : day.getDate();
|
3986
|
-
};
|
3986
|
+
const thisYear = /*#__PURE__*/new Date().getFullYear();
|
3987
|
+
const years = [];
|
3987
3988
|
|
3988
|
-
|
3989
|
-
var years = [];
|
3990
|
-
|
3991
|
-
for (var i = thisYear - 10; i <= thisYear + 10; i += 1) {
|
3989
|
+
for (let i = thisYear - 10; i <= thisYear + 10; i += 1) {
|
3992
3990
|
years.push(i);
|
3993
3991
|
}
|
3994
3992
|
|
3995
|
-
|
3996
|
-
|
3997
|
-
|
3998
|
-
|
3999
|
-
|
4000
|
-
|
3993
|
+
const Navbar = /*#__PURE__*/React.memo(({
|
3994
|
+
onMonthChange,
|
3995
|
+
onNextClick,
|
3996
|
+
onPreviousClick,
|
3997
|
+
value = new Date()
|
3998
|
+
}) => {
|
3999
|
+
const {
|
4000
|
+
texts: {
|
4001
|
+
calendar: {
|
4002
|
+
actions,
|
4003
|
+
months
|
4004
|
+
}
|
4005
|
+
}
|
4006
|
+
} = useLocalization();
|
4001
4007
|
|
4002
|
-
|
4003
|
-
|
4004
|
-
|
4005
|
-
|
4006
|
-
|
4007
|
-
var handleChange = function handleChange(event) {
|
4008
|
-
var _event$target$form = event.target.form,
|
4009
|
-
year = _event$target$form.year,
|
4010
|
-
month = _event$target$form.month;
|
4008
|
+
const handleChange = function handleChange(event) {
|
4009
|
+
const {
|
4010
|
+
year,
|
4011
|
+
month
|
4012
|
+
} = event.target.form;
|
4011
4013
|
onMonthChange(new Date(year.value, month.value));
|
4012
4014
|
};
|
4013
4015
|
|
@@ -4020,59 +4022,49 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
|
|
4020
4022
|
name: "month",
|
4021
4023
|
onChange: handleChange,
|
4022
4024
|
value: value.getMonth()
|
4023
|
-
}, months.map(
|
4024
|
-
|
4025
|
-
|
4026
|
-
|
4027
|
-
}, month);
|
4028
|
-
})), React.createElement("select", {
|
4025
|
+
}, months.map((month, i) => React.createElement("option", {
|
4026
|
+
key: month,
|
4027
|
+
value: i
|
4028
|
+
}, month))), React.createElement("select", {
|
4029
4029
|
className: "h-8 px-2",
|
4030
4030
|
name: "year",
|
4031
4031
|
onChange: handleChange,
|
4032
4032
|
value: value.getFullYear()
|
4033
|
-
}, years.map(
|
4034
|
-
|
4035
|
-
|
4036
|
-
|
4037
|
-
}, String(year));
|
4038
|
-
}))), React.createElement("div", null, React.createElement(IconButton, {
|
4033
|
+
}, years.map(year => React.createElement("option", {
|
4034
|
+
key: year,
|
4035
|
+
value: year
|
4036
|
+
}, String(year))))), React.createElement("div", null, React.createElement(IconButton, {
|
4039
4037
|
appearance: "discrete",
|
4040
4038
|
icon: "chevron-left",
|
4041
4039
|
"aria-label": actions.previousMonth,
|
4042
|
-
onClick:
|
4043
|
-
return onPreviousClick();
|
4044
|
-
},
|
4040
|
+
onClick: () => onPreviousClick(),
|
4045
4041
|
rounded: true
|
4046
4042
|
}), React.createElement(IconButton, {
|
4047
4043
|
appearance: "discrete",
|
4048
4044
|
icon: "chevron-right",
|
4049
4045
|
"aria-label": actions.nextMonth,
|
4050
|
-
onClick:
|
4051
|
-
return onNextClick();
|
4052
|
-
},
|
4046
|
+
onClick: () => onNextClick(),
|
4053
4047
|
rounded: true
|
4054
4048
|
})));
|
4055
4049
|
});
|
4056
|
-
|
4057
|
-
|
4058
|
-
|
4059
|
-
|
4060
|
-
|
4061
|
-
|
4062
|
-
|
4063
|
-
|
4064
|
-
|
4065
|
-
|
4066
|
-
|
4067
|
-
|
4068
|
-
|
4069
|
-
React.useEffect(function () {
|
4050
|
+
const Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
4051
|
+
const {
|
4052
|
+
onChange: handleChange,
|
4053
|
+
value,
|
4054
|
+
...otherProps
|
4055
|
+
} = props;
|
4056
|
+
const {
|
4057
|
+
locale,
|
4058
|
+
texts
|
4059
|
+
} = useLocalization();
|
4060
|
+
const [visibleMonth, setVisibleMonth] = React.useState(value !== null && value !== void 0 ? value : new Date());
|
4061
|
+
React.useEffect(() => {
|
4070
4062
|
if (visibleMonth !== value) {
|
4071
4063
|
setVisibleMonth(value !== null && value !== void 0 ? value : new Date());
|
4072
4064
|
}
|
4073
4065
|
}, [value]);
|
4074
4066
|
|
4075
|
-
|
4067
|
+
const handleDayClick = (date, modifiers, event) => {
|
4076
4068
|
if (modifiers.outside || modifiers.disabled) {
|
4077
4069
|
return;
|
4078
4070
|
}
|
@@ -4080,8 +4072,8 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
|
4080
4072
|
handleChange(date, event);
|
4081
4073
|
};
|
4082
4074
|
|
4083
|
-
|
4084
|
-
|
4075
|
+
const handleCalendarClickToday = () => {
|
4076
|
+
const today = new Date(); // set to midday to avoid UTC offset causing dates to be mismatched server side
|
4085
4077
|
|
4086
4078
|
today.setHours(12);
|
4087
4079
|
today.setMinutes(0);
|
@@ -4089,7 +4081,7 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
|
4089
4081
|
handleChange(today);
|
4090
4082
|
};
|
4091
4083
|
|
4092
|
-
|
4084
|
+
const className = cn('flex bg-white text-xs p-4', otherProps.className);
|
4093
4085
|
return React.createElement("div", {
|
4094
4086
|
"data-taco": "calendar"
|
4095
4087
|
}, React.createElement(ReactDayPicker, Object.assign({}, otherProps, {
|
@@ -4100,18 +4092,14 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
|
4100
4092
|
firstDayOfWeek: 1,
|
4101
4093
|
months: texts.calendar.months,
|
4102
4094
|
weekdaysShort: texts.calendar.weekdaysShort,
|
4103
|
-
navbarElement:
|
4104
|
-
|
4105
|
-
|
4106
|
-
|
4107
|
-
}));
|
4108
|
-
},
|
4095
|
+
navbarElement: navProps => React.createElement(Navbar, Object.assign({}, navProps, {
|
4096
|
+
onMonthChange: setVisibleMonth,
|
4097
|
+
value: visibleMonth
|
4098
|
+
})),
|
4109
4099
|
onDayClick: handleDayClick,
|
4110
4100
|
onMonthChange: setVisibleMonth,
|
4111
4101
|
onTodayButtonClick: handleCalendarClickToday,
|
4112
|
-
captionElement:
|
4113
|
-
return null;
|
4114
|
-
},
|
4102
|
+
captionElement: () => null,
|
4115
4103
|
todayButton: texts.calendar.actions.today,
|
4116
4104
|
showOutsideDays: true,
|
4117
4105
|
renderDay: renderDay,
|
@@ -4120,32 +4108,30 @@ var Calendar$1 = /*#__PURE__*/React.forwardRef(function Calendar(props, ref) {
|
|
4120
4108
|
})));
|
4121
4109
|
});
|
4122
4110
|
|
4123
|
-
|
4124
|
-
|
4125
|
-
|
4126
|
-
|
4127
|
-
|
4128
|
-
|
4129
|
-
|
4130
|
-
|
4131
|
-
|
4132
|
-
|
4133
|
-
|
4111
|
+
const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
4112
|
+
const {
|
4113
|
+
checked,
|
4114
|
+
highlighted,
|
4115
|
+
indeterminate,
|
4116
|
+
invalid,
|
4117
|
+
label,
|
4118
|
+
onChange,
|
4119
|
+
...otherProps
|
4120
|
+
} = props;
|
4121
|
+
const className = cn('bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem]', {
|
4134
4122
|
'mr-2': !!label,
|
4135
4123
|
'border-grey-dark text-blue focus:border-blue focus:yt-focus': !props.disabled && !invalid,
|
4136
4124
|
'border-grey text-blue-light cursor-not-allowed': props.disabled,
|
4137
4125
|
'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
|
4138
4126
|
'border-red text-red focus:border-red focus:yt-focus-red': invalid && !props.disabled
|
4139
4127
|
});
|
4140
|
-
|
4128
|
+
let handleChange;
|
4141
4129
|
|
4142
4130
|
if (onChange) {
|
4143
|
-
handleChange =
|
4144
|
-
return onChange(checked === 'indeterminate' ? false : checked);
|
4145
|
-
};
|
4131
|
+
handleChange = checked => onChange(checked === 'indeterminate' ? false : checked);
|
4146
4132
|
}
|
4147
4133
|
|
4148
|
-
|
4134
|
+
const element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
|
4149
4135
|
"data-taco": "checkbox",
|
4150
4136
|
checked: indeterminate ? 'indeterminate' : checked,
|
4151
4137
|
className: className,
|
@@ -4159,7 +4145,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
|
|
4159
4145
|
})));
|
4160
4146
|
|
4161
4147
|
if (label) {
|
4162
|
-
|
4148
|
+
const labelClassName = cn('flex items-center cursor-pointer', {
|
4163
4149
|
'cursor-not-allowed text-grey-dark': props.disabled
|
4164
4150
|
}, props.className);
|
4165
4151
|
return React.createElement("label", {
|
@@ -5042,12 +5028,12 @@ var useBoundingClientRectListener = function useBoundingClientRectListener(ref)
|
|
5042
5028
|
return dimensions;
|
5043
5029
|
};
|
5044
5030
|
|
5045
|
-
var _excluded$
|
5031
|
+
var _excluded$3 = ["className", "dialog", "style"];
|
5046
5032
|
var Combobox = /*#__PURE__*/React.forwardRef(function Combobox(props, ref) {
|
5047
5033
|
var externalClassName = props.className,
|
5048
5034
|
dialog = props.dialog,
|
5049
5035
|
style = props.style,
|
5050
|
-
otherProps = _objectWithoutPropertiesLoose(props, _excluded$
|
5036
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$3);
|
5051
5037
|
|
5052
5038
|
var _useCombobox = useCombobox(otherProps, ref),
|
5053
5039
|
combobox = _useCombobox.combobox,
|
@@ -5415,25 +5401,25 @@ Popover.Trigger = Trigger$1;
|
|
5415
5401
|
Popover.Content = Content$1;
|
5416
5402
|
Popover.Close = Close$1;
|
5417
5403
|
|
5418
|
-
|
5419
|
-
var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
|
5404
|
+
const Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
|
5420
5405
|
var _input$disabled;
|
5421
5406
|
|
5422
|
-
|
5423
|
-
|
5424
|
-
|
5425
|
-
|
5426
|
-
|
5427
|
-
|
5428
|
-
|
5429
|
-
|
5430
|
-
|
5431
|
-
|
5432
|
-
|
5433
|
-
|
5434
|
-
|
5435
|
-
|
5436
|
-
|
5407
|
+
const {
|
5408
|
+
className: externalClassName,
|
5409
|
+
onReset: handleReset,
|
5410
|
+
style,
|
5411
|
+
shortcuts,
|
5412
|
+
shortcutsText,
|
5413
|
+
...otherProps
|
5414
|
+
} = props;
|
5415
|
+
const {
|
5416
|
+
calendar,
|
5417
|
+
input
|
5418
|
+
} = useDatepicker(otherProps, ref);
|
5419
|
+
const {
|
5420
|
+
texts
|
5421
|
+
} = useLocalization();
|
5422
|
+
const className = cn('inline-flex w-full text-black font-normal', externalClassName);
|
5437
5423
|
return React.createElement("span", {
|
5438
5424
|
className: className,
|
5439
5425
|
"data-taco": "datepicker",
|
@@ -5443,40 +5429,37 @@ var Datepicker = /*#__PURE__*/React.forwardRef(function Datepicker(props, ref) {
|
|
5443
5429
|
"aria-label": texts.datepicker.expand,
|
5444
5430
|
disabled: (_input$disabled = input.disabled) !== null && _input$disabled !== void 0 ? _input$disabled : input.readOnly,
|
5445
5431
|
icon: "calendar"
|
5446
|
-
})), React.createElement(Popover.Content, null,
|
5447
|
-
|
5448
|
-
|
5449
|
-
|
5450
|
-
|
5451
|
-
|
5452
|
-
|
5453
|
-
|
5454
|
-
|
5455
|
-
|
5456
|
-
|
5457
|
-
|
5458
|
-
|
5459
|
-
|
5460
|
-
|
5461
|
-
|
5462
|
-
|
5463
|
-
|
5464
|
-
|
5465
|
-
|
5466
|
-
|
5467
|
-
|
5468
|
-
|
5469
|
-
|
5470
|
-
|
5471
|
-
|
5472
|
-
|
5473
|
-
|
5474
|
-
|
5475
|
-
|
5476
|
-
|
5477
|
-
}
|
5478
|
-
}, texts.datepicker.clear)));
|
5479
|
-
}))
|
5432
|
+
})), React.createElement(Popover.Content, null, ({
|
5433
|
+
close
|
5434
|
+
}) => React.createElement("div", {
|
5435
|
+
className: "flex -m-3"
|
5436
|
+
}, React.createElement(Calendar$1, Object.assign({}, calendar, {
|
5437
|
+
onChange: (date, event) => {
|
5438
|
+
calendar.onChange(date, event);
|
5439
|
+
close();
|
5440
|
+
},
|
5441
|
+
tabIndex: -1
|
5442
|
+
})), shortcuts && React.createElement("div", {
|
5443
|
+
className: "border-l border-grey-dark flex flex-col"
|
5444
|
+
}, React.createElement("span", {
|
5445
|
+
className: "font-semibold text-xs m-4 flex items-center h-8 w-32 mb-3"
|
5446
|
+
}, shortcutsText !== null && shortcutsText !== void 0 ? shortcutsText : texts.datepicker.shortcuts), React.createElement("ul", null, shortcuts.map((shortcut, i) => React.createElement("li", {
|
5447
|
+
key: i
|
5448
|
+
}, React.createElement("button", {
|
5449
|
+
className: "w-full px-4 py-1 flex items-start hover:bg-grey-light text-xs",
|
5450
|
+
onClick: event => {
|
5451
|
+
event.persist();
|
5452
|
+
shortcut.onClick(event);
|
5453
|
+
close();
|
5454
|
+
}
|
5455
|
+
}, shortcut.text)))), handleReset && React.createElement("button", {
|
5456
|
+
className: "text-blue hover:text-blue-light inline-flex border-none bg-transparent text-xs cursor-pointer mt-auto my-4 mx-auto",
|
5457
|
+
onClick: event => {
|
5458
|
+
event.persist();
|
5459
|
+
handleReset(event);
|
5460
|
+
close();
|
5461
|
+
}
|
5462
|
+
}, texts.datepicker.clear)))))
|
5480
5463
|
})));
|
5481
5464
|
});
|
5482
5465
|
|
@@ -5719,14 +5702,12 @@ const Extra = /*#__PURE__*/React.forwardRef(function DialogExtra(props, ref) {
|
|
5719
5702
|
});
|
5720
5703
|
Extra.displayName = 'DialogExtra';
|
5721
5704
|
|
5722
|
-
|
5723
|
-
|
5724
|
-
|
5725
|
-
|
5726
|
-
|
5727
|
-
|
5728
|
-
var extra;
|
5729
|
-
React.Children.toArray(initialChildren).forEach(function (child) {
|
5705
|
+
const useSeparatedChildren = initialChildren => {
|
5706
|
+
return React.useMemo(() => {
|
5707
|
+
const children = [];
|
5708
|
+
let drawer;
|
5709
|
+
let extra;
|
5710
|
+
React.Children.toArray(initialChildren).forEach(child => {
|
5730
5711
|
var _child$type, _child$type2;
|
5731
5712
|
|
5732
5713
|
if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
|
@@ -5741,55 +5722,39 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
|
|
5741
5722
|
}, [initialChildren]);
|
5742
5723
|
};
|
5743
5724
|
|
5744
|
-
|
5745
|
-
|
5746
|
-
|
5747
|
-
|
5748
|
-
|
5749
|
-
|
5750
|
-
|
5751
|
-
|
5752
|
-
|
5753
|
-
|
5754
|
-
|
5755
|
-
|
5756
|
-
|
5757
|
-
|
5758
|
-
|
5759
|
-
|
5760
|
-
|
5761
|
-
|
5762
|
-
|
5763
|
-
|
5764
|
-
|
5765
|
-
|
5766
|
-
|
5767
|
-
|
5768
|
-
|
5769
|
-
|
5770
|
-
|
5771
|
-
|
5772
|
-
|
5773
|
-
|
5774
|
-
|
5775
|
-
|
5776
|
-
|
5777
|
-
return setDrawerOpen(function (isDrawerOpen) {
|
5778
|
-
return !isDrawerOpen;
|
5779
|
-
});
|
5780
|
-
}
|
5781
|
-
},
|
5782
|
-
elements: {
|
5783
|
-
drawer: drawer,
|
5784
|
-
extra: extra
|
5785
|
-
},
|
5786
|
-
onClose: onClose,
|
5787
|
-
props: otherProps,
|
5788
|
-
showCloseButton: showCloseButton,
|
5789
|
-
size: size,
|
5790
|
-
ref: ref
|
5791
|
-
};
|
5792
|
-
}, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
|
5725
|
+
const Dialog = /*#__PURE__*/React.forwardRef(function Dialog(props, ref) {
|
5726
|
+
const {
|
5727
|
+
children: initialChildren,
|
5728
|
+
closeOnEscape = true,
|
5729
|
+
defaultOpen,
|
5730
|
+
draggable = false,
|
5731
|
+
onChange,
|
5732
|
+
onClose,
|
5733
|
+
open,
|
5734
|
+
showCloseButton = true,
|
5735
|
+
size = 'sm',
|
5736
|
+
trigger,
|
5737
|
+
...otherProps
|
5738
|
+
} = props;
|
5739
|
+
const [children, drawer, extra] = useSeparatedChildren(initialChildren);
|
5740
|
+
const [drawerOpen, setDrawerOpen] = React.useState(false);
|
5741
|
+
const context = React.useMemo(() => ({
|
5742
|
+
closeOnEscape,
|
5743
|
+
draggable,
|
5744
|
+
drawer: {
|
5745
|
+
open: drawerOpen,
|
5746
|
+
toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
|
5747
|
+
},
|
5748
|
+
elements: {
|
5749
|
+
drawer,
|
5750
|
+
extra
|
5751
|
+
},
|
5752
|
+
onClose,
|
5753
|
+
props: otherProps,
|
5754
|
+
showCloseButton,
|
5755
|
+
size,
|
5756
|
+
ref
|
5757
|
+
}), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
|
5793
5758
|
return React.createElement(DialogContext.Provider, {
|
5794
5759
|
value: context
|
5795
5760
|
}, React.createElement(DialogPrimitive.Root, {
|
@@ -5806,19 +5771,18 @@ Dialog.Extra = Extra;
|
|
5806
5771
|
Dialog.Drawer = Drawer;
|
5807
5772
|
Dialog.Close = Close$2;
|
5808
5773
|
|
5809
|
-
|
5810
|
-
|
5811
|
-
|
5812
|
-
|
5813
|
-
|
5814
|
-
|
5815
|
-
|
5816
|
-
|
5817
|
-
|
5818
|
-
var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
5774
|
+
const Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
|
5775
|
+
const {
|
5776
|
+
disabled,
|
5777
|
+
children,
|
5778
|
+
invalid = false,
|
5779
|
+
message,
|
5780
|
+
...otherProps
|
5781
|
+
} = props;
|
5782
|
+
const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
5819
5783
|
'text-grey-dark': disabled
|
5820
5784
|
}, props.className);
|
5821
|
-
|
5785
|
+
const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
|
5822
5786
|
'text-grey-darkest': !invalid,
|
5823
5787
|
'text-red': invalid,
|
5824
5788
|
'opacity-50': disabled
|
@@ -6102,6 +6066,7 @@ const useMultiListbox = ({
|
|
6102
6066
|
data: externalData = [],
|
6103
6067
|
defaultValue,
|
6104
6068
|
disabled,
|
6069
|
+
emptyValue: _,
|
6105
6070
|
id: nativeId,
|
6106
6071
|
name,
|
6107
6072
|
onClick,
|
@@ -7128,7 +7093,7 @@ const useSelect = ({
|
|
7128
7093
|
}
|
7129
7094
|
}
|
7130
7095
|
} else {
|
7131
|
-
if (!findByValue(flattenedData, value)) {
|
7096
|
+
if (!multiselect && !findByValue(flattenedData, value)) {
|
7132
7097
|
if (emptyValue !== undefined) {
|
7133
7098
|
setInputValueByRef$1(inputRef.current, emptyValue);
|
7134
7099
|
} else if (data.length > 0) {
|