@zenkigen-inc/component-ui 1.14.3 → 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/button/button.d.ts +3 -1
- package/dist/hooks/use-outside-click.d.ts +1 -1
- package/dist/index.esm.js +25 -24
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/tag/tag.d.ts +2 -1
- package/dist/toggle/toggle.d.ts +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;
|
|
@@ -75,7 +75,7 @@ function Breadcrumb({
|
|
|
75
75
|
}
|
|
76
76
|
Breadcrumb.Item = BreadcrumbItem;
|
|
77
77
|
|
|
78
|
-
const _excluded$7 = ["size", "variant", "isDisabled", "isSelected", "width", "borderRadius", "before", "after", "elementAs", "children"];
|
|
78
|
+
const _excluded$7 = ["size", "variant", "isDisabled", "isSelected", "width", "borderRadius", "justifyContent", "before", "after", "elementAs", "children"];
|
|
79
79
|
const Button = _ref => {
|
|
80
80
|
let {
|
|
81
81
|
size = 'medium',
|
|
@@ -84,13 +84,14 @@ const Button = _ref => {
|
|
|
84
84
|
isSelected = false,
|
|
85
85
|
width,
|
|
86
86
|
borderRadius,
|
|
87
|
+
justifyContent = 'center',
|
|
87
88
|
before,
|
|
88
89
|
after,
|
|
89
90
|
elementAs,
|
|
90
91
|
children
|
|
91
92
|
} = _ref,
|
|
92
93
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
93
|
-
const baseClasses = clsx('flex shrink-0 items-center
|
|
94
|
+
const baseClasses = clsx('flex shrink-0 items-center gap-1', buttonColors[variant].hover, buttonColors[variant].active, buttonColors[variant].disabled, focusVisible.normal, {
|
|
94
95
|
'h-6 px-2.5': size === 'small',
|
|
95
96
|
'h-8 px-3': size === 'medium',
|
|
96
97
|
'h-10 px-4 leading-[24px]': size === 'large',
|
|
@@ -100,6 +101,8 @@ const Button = _ref => {
|
|
|
100
101
|
'hover:text-textOnColor active:text-textOnColor [&:hover>*]:fill-iconOnColor [&:active>*]:fill-iconOnColor': isSelected && variant !== 'outline' && variant !== 'text',
|
|
101
102
|
'pointer-events-none': isDisabled,
|
|
102
103
|
'rounded-button': borderRadius == null,
|
|
104
|
+
'justify-start': justifyContent === 'start',
|
|
105
|
+
'justify-center': justifyContent === 'center',
|
|
103
106
|
'typography-label16regular': size === 'large',
|
|
104
107
|
'typography-label14regular': size !== 'large'
|
|
105
108
|
});
|
|
@@ -255,11 +258,8 @@ const Icon = _ref => {
|
|
|
255
258
|
const classes = clsx('inline-block shrink-0', {
|
|
256
259
|
'fill-disabled01': isDisabled,
|
|
257
260
|
[iconColors.icon01]: !isDisabled && props.color === 'icon01',
|
|
258
|
-
[iconColors.icon01Dark]: !isDisabled && props.color === 'icon01Dark',
|
|
259
261
|
[iconColors.icon02]: !isDisabled && props.color === 'icon02',
|
|
260
|
-
[iconColors.icon02Dark]: !isDisabled && props.color === 'icon02Dark',
|
|
261
262
|
[iconColors.icon03]: !isDisabled && props.color === 'icon03',
|
|
262
|
-
[iconColors.icon03Dark]: !isDisabled && props.color === 'icon03Dark',
|
|
263
263
|
[iconColors.iconOnColor]: !isDisabled && props.color === 'iconOnColor',
|
|
264
264
|
'w-3 h-3': size === 'x-small',
|
|
265
265
|
'w-4 h-4': size === 'small',
|
|
@@ -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
|
},
|
|
@@ -1377,7 +1377,7 @@ const TabItem = _ref => {
|
|
|
1377
1377
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
1378
1378
|
const classes = clsx('relative z-0 flex py-2 leading-[24px] before:absolute before:inset-x-0 before:bottom-0 before:h-px hover:text-text01 disabled:pointer-events-none disabled:text-disabled01', {
|
|
1379
1379
|
'typography-label14regular': !isSelected,
|
|
1380
|
-
'text-interactive02 hover:before:bg-
|
|
1380
|
+
'text-interactive02 hover:before:bg-uiBorder04': !isSelected,
|
|
1381
1381
|
'typography-label14bold': isSelected,
|
|
1382
1382
|
'before:bg-interactive01 hover:before:bg-interactive01 pointer-events-none': isSelected
|
|
1383
1383
|
});
|
|
@@ -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,
|
|
@@ -1721,19 +1721,19 @@ function Toggle({
|
|
|
1721
1721
|
'bg-interactive01 peer-hover:bg-hover01': !isDisabled && isChecked,
|
|
1722
1722
|
'bg-interactive02 peer-hover:bg-hover02Dark': !isDisabled && !isChecked,
|
|
1723
1723
|
'w-8 h-4 px-[3px]': size === 'small',
|
|
1724
|
-
'w-12 h-6 px-1': size === 'medium'
|
|
1724
|
+
'w-12 h-6 px-1': size === 'medium' || size === 'large'
|
|
1725
1725
|
});
|
|
1726
1726
|
const inputClasses = clsx$1('peer absolute inset-0 z-[1] opacity-0', isDisabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1727
1727
|
const indicatorClasses = clsx$1('rounded-full bg-iconOnColor', {
|
|
1728
1728
|
'w-2.5 h-2.5': size === 'small',
|
|
1729
|
-
'w-4 h-4': size === 'medium',
|
|
1729
|
+
'w-4 h-4': size === 'medium' || size === 'large',
|
|
1730
1730
|
'ml-auto': isChecked
|
|
1731
1731
|
});
|
|
1732
1732
|
const labelClasses = clsx$1('break-all', {
|
|
1733
1733
|
'mr-2': labelPosition === 'left',
|
|
1734
1734
|
'ml-2': labelPosition === 'right',
|
|
1735
|
-
'typography-
|
|
1736
|
-
'typography-label16regular': size === '
|
|
1735
|
+
'typography-label14regular': size === 'small' || size === 'medium',
|
|
1736
|
+
'typography-label16regular': size === 'large',
|
|
1737
1737
|
'pointer-events-none cursor-not-allowed text-disabled01': isDisabled,
|
|
1738
1738
|
'cursor-pointer text-text01': !isDisabled
|
|
1739
1739
|
});
|
|
@@ -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,
|