@zenkigen-inc/component-ui 1.14.4 → 1.14.5
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/README.md +0 -5
- package/dist/hooks/use-outside-click.d.ts +1 -1
- package/dist/index.esm.js +14 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
18
18
|
if (null == r) return {};
|
|
19
19
|
var t = {};
|
|
20
20
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
21
|
-
if (e.
|
|
21
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
22
22
|
t[n] = r[n];
|
|
23
23
|
}
|
|
24
24
|
return t;
|
|
@@ -679,7 +679,7 @@ function Modal({
|
|
|
679
679
|
useEffect(() => {
|
|
680
680
|
setIsMounted(true);
|
|
681
681
|
}, []);
|
|
682
|
-
return isMounted && isOpen ? /*#__PURE__*/createPortal(
|
|
682
|
+
return isMounted && isOpen ? /*#__PURE__*/createPortal(/*#__PURE__*/jsx(ModalContext.Provider, {
|
|
683
683
|
value: {
|
|
684
684
|
onClose
|
|
685
685
|
},
|
|
@@ -1552,19 +1552,23 @@ const TextInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1552
1552
|
onClickClearButton
|
|
1553
1553
|
} = _ref,
|
|
1554
1554
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1555
|
+
const isShowClearButton = !!onClickClearButton && props.value.length !== 0 && !disabled;
|
|
1555
1556
|
const inputWrapClasses = clsx('relative flex items-center gap-2 overflow-hidden rounded border', {
|
|
1556
1557
|
'border-uiBorder02': !isError && !disabled,
|
|
1557
1558
|
'border-supportError': isError && !disabled,
|
|
1558
1559
|
'hover:border-hoverInput': !disabled && !isError,
|
|
1559
1560
|
'hover:focus-within:border-activeInput': !isError,
|
|
1560
1561
|
'focus-within:border-activeInput': !isError,
|
|
1561
|
-
'bg-disabled02 border-disabled01': disabled
|
|
1562
|
+
'bg-disabled02 border-disabled01': disabled,
|
|
1563
|
+
'pr-2': size === 'medium' && isShowClearButton,
|
|
1564
|
+
'pr-3': size === 'large' && isShowClearButton
|
|
1562
1565
|
});
|
|
1563
|
-
const inputClasses = clsx('flex-1
|
|
1564
|
-
['typography-label14regular min-h-8']: size === 'medium',
|
|
1565
|
-
['typography-label16regular min-h-10']: size === 'large',
|
|
1566
|
+
const inputClasses = clsx('flex-1 outline-0 placeholder:text-textPlaceholder disabled:text-textPlaceholder', {
|
|
1567
|
+
['typography-label14regular min-h-8 px-2']: size === 'medium',
|
|
1568
|
+
['typography-label16regular min-h-10 px-3']: size === 'large',
|
|
1566
1569
|
'text-text01': !isError,
|
|
1567
|
-
'text-supportError': isError
|
|
1570
|
+
'text-supportError': isError,
|
|
1571
|
+
'pr-0': isShowClearButton
|
|
1568
1572
|
});
|
|
1569
1573
|
return /*#__PURE__*/jsxs("div", {
|
|
1570
1574
|
className: inputWrapClasses,
|
|
@@ -1574,15 +1578,11 @@ const TextInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1574
1578
|
className: inputClasses,
|
|
1575
1579
|
disabled: disabled,
|
|
1576
1580
|
onChange: props.onChange
|
|
1577
|
-
}, props)),
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
size: "small",
|
|
1583
|
-
isNoPadding: true,
|
|
1584
|
-
onClick: onClickClearButton
|
|
1585
|
-
})
|
|
1581
|
+
}, props)), isShowClearButton && /*#__PURE__*/jsx(IconButton, {
|
|
1582
|
+
variant: "text",
|
|
1583
|
+
icon: "close",
|
|
1584
|
+
size: "small",
|
|
1585
|
+
onClick: onClickClearButton
|
|
1586
1586
|
})]
|
|
1587
1587
|
});
|
|
1588
1588
|
});
|
|
@@ -1685,7 +1685,7 @@ const ToastProvider = ({
|
|
|
1685
1685
|
addToast,
|
|
1686
1686
|
removeToast
|
|
1687
1687
|
},
|
|
1688
|
-
children: [children, isClientRender && /*#__PURE__*/createPortal(
|
|
1688
|
+
children: [children, isClientRender && /*#__PURE__*/createPortal(/*#__PURE__*/jsx("div", {
|
|
1689
1689
|
className: "pointer-events-none fixed bottom-0 left-0 z-toast mb-4 ml-4 flex w-full flex-col-reverse gap-[16px]",
|
|
1690
1690
|
children: toasts.map(({
|
|
1691
1691
|
id,
|
|
@@ -1961,7 +1961,7 @@ function Tooltip({
|
|
|
1961
1961
|
verticalPosition: verticalPosition,
|
|
1962
1962
|
horizontalAlign: horizontalAlign,
|
|
1963
1963
|
tooltipPosition: tooltipPosition
|
|
1964
|
-
}) : (
|
|
1964
|
+
}) : (/*#__PURE__*/createPortal(/*#__PURE__*/jsx(TooltipContent, {
|
|
1965
1965
|
isPortal: true,
|
|
1966
1966
|
content: content,
|
|
1967
1967
|
size: size,
|