@zenkigen-inc/component-ui 1.0.1 → 1.1.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.
- package/dist/breadcrumb/breadcrumb-item.d.ts +2 -7
- package/dist/breadcrumb/breadcrumb.d.ts +7 -6
- package/dist/index.esm.js +116 -93
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +119 -94
- package/dist/index.js.map +1 -1
- package/dist/search/search.d.ts +3 -2
- package/dist/tab/tab.d.ts +9 -0
- package/dist/table/index.d.ts +2 -2
- package/dist/table/{table-row-container.d.ts → table-row.d.ts} +1 -1
- package/dist/table/table.d.ts +14 -0
- package/package.json +4 -4
- package/dist/table/table-container.d.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -43,37 +43,26 @@ function Avatar(_ref) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const BreadcrumbItem = ({
|
|
46
|
-
children
|
|
47
|
-
isLast
|
|
46
|
+
children
|
|
48
47
|
}) => {
|
|
49
|
-
return /*#__PURE__*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
children: children
|
|
53
|
-
}), !isLast && /*#__PURE__*/jsx("li", {
|
|
54
|
-
"aria-hidden": "true",
|
|
55
|
-
className: "text-interactive-interactive02",
|
|
56
|
-
children: "/"
|
|
57
|
-
})]
|
|
48
|
+
return /*#__PURE__*/jsx("li", {
|
|
49
|
+
className: "flex gap-2 after:content-['/'] last:after:content-none [&_a]:text-interactive-interactive02 [&_a]:hover:underline",
|
|
50
|
+
children: children
|
|
58
51
|
});
|
|
59
52
|
};
|
|
60
53
|
|
|
61
|
-
|
|
54
|
+
function Breadcrumb({
|
|
62
55
|
children
|
|
63
|
-
})
|
|
56
|
+
}) {
|
|
64
57
|
return /*#__PURE__*/jsx("nav", {
|
|
65
58
|
"aria-label": "breadcrumb",
|
|
66
59
|
children: /*#__PURE__*/jsx("ul", {
|
|
67
|
-
className:
|
|
68
|
-
children: children
|
|
69
|
-
return /*#__PURE__*/jsx(BreadcrumbItem, {
|
|
70
|
-
isLast: i === children.length - 1,
|
|
71
|
-
children: child
|
|
72
|
-
}, i);
|
|
73
|
-
})
|
|
60
|
+
className: `${typography.label.label2regular} flex flex-wrap gap-2 whitespace-nowrap text-text-text01`,
|
|
61
|
+
children: children
|
|
74
62
|
})
|
|
75
63
|
});
|
|
76
|
-
}
|
|
64
|
+
}
|
|
65
|
+
Breadcrumb.Item = BreadcrumbItem;
|
|
77
66
|
|
|
78
67
|
const _excluded$4 = ["size", "variant"];
|
|
79
68
|
function Button(_ref) {
|
|
@@ -304,7 +293,7 @@ function DropdownMenu({
|
|
|
304
293
|
} = useContext(DropdownContext);
|
|
305
294
|
const wrapperClasses = clsx$1('z-dropdown', 'absolute', 'w-max', 'bg-background-uiBackground01', 'rounded', 'shadow-floatingShadow', 'overflow-y-auto', horizontalAlign === 'left' ? 'left-0' : horizontalAlign === 'right' ? 'right-0' : 'left-auto', {
|
|
306
295
|
'border-solid border border-border-uiBorder01': variant === 'outline',
|
|
307
|
-
'py-
|
|
296
|
+
'py-1': !isNoPadding
|
|
308
297
|
});
|
|
309
298
|
return isVisible && !isDisabled && /*#__PURE__*/jsx("ul", {
|
|
310
299
|
className: wrapperClasses,
|
|
@@ -437,7 +426,7 @@ function EvaluationStar({
|
|
|
437
426
|
});
|
|
438
427
|
const ratingStars = [];
|
|
439
428
|
for (let i = 1; i < maxRating + 1; i++) {
|
|
440
|
-
const color = i <= currentRating ? 'fill-
|
|
429
|
+
const color = i <= currentRating ? 'fill-yellow-yellow50' : 'fill-icon-icon03';
|
|
441
430
|
ratingStars.push( /*#__PURE__*/jsx("button", {
|
|
442
431
|
type: "button",
|
|
443
432
|
onClick: () => handleChangeRating(i),
|
|
@@ -454,7 +443,7 @@ function EvaluationStar({
|
|
|
454
443
|
|
|
455
444
|
function Heading(props) {
|
|
456
445
|
const TagName = `h${props.level}`;
|
|
457
|
-
const classes = clsx('flex', 'items-center', typography.heading[TagName], {
|
|
446
|
+
const classes = clsx('flex', 'items-center', 'text-text-text01', typography.heading[TagName], {
|
|
458
447
|
'gap-2': props.level === 1
|
|
459
448
|
}, {
|
|
460
449
|
'gap-1': props.level > 1
|
|
@@ -521,36 +510,54 @@ function Loading({
|
|
|
521
510
|
}) {
|
|
522
511
|
const wrapperClasses = clsx$1(position, 'top-0', 'left-0', 'z-20', 'flex', 'items-center', 'justify-center', 'w-full');
|
|
523
512
|
const svgClasses = clsx$1(size === 'small' && 'h-4 w-4', size === 'medium' && 'h-8 w-8', size === 'large' && 'h-16 w-16');
|
|
524
|
-
return /*#__PURE__*/jsx(
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
513
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
514
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
515
|
+
className: wrapperClasses,
|
|
516
|
+
style: {
|
|
517
|
+
height
|
|
518
|
+
},
|
|
519
|
+
children: [size === 'small' && /*#__PURE__*/jsx("svg", {
|
|
520
|
+
className: svgClasses,
|
|
521
|
+
viewBox: "0 0 16 16",
|
|
522
|
+
fill: "none",
|
|
523
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
524
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
525
|
+
className: "origin-center animate-circular-small-move stroke-interactive-interactive01",
|
|
526
|
+
cx: "8",
|
|
527
|
+
cy: "8",
|
|
528
|
+
r: "7",
|
|
529
|
+
stroke: "currentColor",
|
|
530
|
+
strokeWidth: "1.5",
|
|
531
|
+
fill: "none"
|
|
532
|
+
})
|
|
533
|
+
}), size === 'medium' && /*#__PURE__*/jsx("svg", {
|
|
534
|
+
className: svgClasses,
|
|
535
|
+
viewBox: "0 0 32 32",
|
|
536
|
+
fill: "none",
|
|
537
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
538
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
539
|
+
className: "origin-center animate-circular-medium-move stroke-interactive-interactive01",
|
|
540
|
+
cx: "16",
|
|
541
|
+
cy: "16",
|
|
542
|
+
r: "15",
|
|
543
|
+
stroke: "currentColor",
|
|
544
|
+
strokeWidth: "2",
|
|
545
|
+
fill: "none"
|
|
546
|
+
})
|
|
547
|
+
}), size === 'large' && /*#__PURE__*/jsx("svg", {
|
|
548
|
+
className: svgClasses,
|
|
549
|
+
viewBox: "0 0 64 64",
|
|
550
|
+
fill: "none",
|
|
551
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
552
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
553
|
+
className: "origin-center animate-circular-large-move stroke-interactive-interactive01",
|
|
554
|
+
cx: "32",
|
|
555
|
+
cy: "32",
|
|
556
|
+
r: "30",
|
|
557
|
+
stroke: "currentColor",
|
|
558
|
+
strokeWidth: "3",
|
|
559
|
+
fill: "none"
|
|
560
|
+
})
|
|
554
561
|
})]
|
|
555
562
|
})
|
|
556
563
|
});
|
|
@@ -31446,7 +31453,7 @@ function ModalButtonTab({
|
|
|
31446
31453
|
setIsOpen(false);
|
|
31447
31454
|
}, [onClickSecondaryButton, setIsOpen]);
|
|
31448
31455
|
const handleClickSubButton = useCallback(() => {
|
|
31449
|
-
onClickSubButton == null
|
|
31456
|
+
onClickSubButton == null || onClickSubButton();
|
|
31450
31457
|
}, [onClickSubButton]);
|
|
31451
31458
|
const wrapperClasses = clsx$1('flex', 'shrink-0', 'items-center', 'w-full', 'rounded-b-lg', 'py-4', 'px-6', {
|
|
31452
31459
|
'justify-between': isWithCheckbox || subButtonLabel && size !== 'small',
|
|
@@ -31518,17 +31525,6 @@ function ModalHeader({
|
|
|
31518
31525
|
});
|
|
31519
31526
|
}
|
|
31520
31527
|
|
|
31521
|
-
function Tab({
|
|
31522
|
-
children
|
|
31523
|
-
}) {
|
|
31524
|
-
const classes = clsx('flex', 'px-6', 'gap-4', 'relative', 'before:bg-border-uiBorder01', 'before:h-px', 'before:bottom-0', 'before:left-0', 'before:right-0', 'before:absolute', {});
|
|
31525
|
-
return /*#__PURE__*/jsx("div", {
|
|
31526
|
-
role: "tablist",
|
|
31527
|
-
className: classes,
|
|
31528
|
-
children: children
|
|
31529
|
-
});
|
|
31530
|
-
}
|
|
31531
|
-
|
|
31532
31528
|
const TabItem = props => {
|
|
31533
31529
|
const classes = clsx('relative', 'flex', 'z-0', 'py-2', 'leading-[24px]', 'before:h-px', 'before:absolute', 'before:left-0', 'before:right-0', 'before:bottom-0', 'hover:text-text-text01', 'disabled:text-disabled-disabled01', 'disabled:pointer-events-none', {
|
|
31534
31530
|
[`${typography.label.label2regular}`]: !props.isSelected,
|
|
@@ -31547,6 +31543,18 @@ const TabItem = props => {
|
|
|
31547
31543
|
});
|
|
31548
31544
|
};
|
|
31549
31545
|
|
|
31546
|
+
function Tab({
|
|
31547
|
+
children
|
|
31548
|
+
}) {
|
|
31549
|
+
const classes = clsx('flex', 'px-6', 'gap-4', 'relative', 'before:bg-border-uiBorder01', 'before:h-px', 'before:bottom-0', 'before:left-0', 'before:right-0', 'before:absolute', {});
|
|
31550
|
+
return /*#__PURE__*/jsx("div", {
|
|
31551
|
+
role: "tablist",
|
|
31552
|
+
className: classes,
|
|
31553
|
+
children: children
|
|
31554
|
+
});
|
|
31555
|
+
}
|
|
31556
|
+
Tab.Item = TabItem;
|
|
31557
|
+
|
|
31550
31558
|
function ModalTab({
|
|
31551
31559
|
tabItems,
|
|
31552
31560
|
selectedTab,
|
|
@@ -31679,7 +31687,7 @@ function Radio({
|
|
|
31679
31687
|
setIsMouseOver(false);
|
|
31680
31688
|
}, []);
|
|
31681
31689
|
const handleChange = useCallback(e => !isDisabled && (onChange == null ? void 0 : onChange(e)), [isDisabled, onChange]);
|
|
31682
|
-
const inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', {
|
|
31690
|
+
const inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', 'h-6', 'w-6', {
|
|
31683
31691
|
'cursor-not-allowed': isDisabled,
|
|
31684
31692
|
'cursor-pointer': !isDisabled
|
|
31685
31693
|
});
|
|
@@ -31735,34 +31743,49 @@ function Radio({
|
|
|
31735
31743
|
});
|
|
31736
31744
|
}
|
|
31737
31745
|
|
|
31738
|
-
const _excluded = ["width", "
|
|
31746
|
+
const _excluded = ["width", "size"];
|
|
31739
31747
|
const Search = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
31740
31748
|
let {
|
|
31741
31749
|
width = '100%',
|
|
31742
|
-
|
|
31750
|
+
size = 'medium'
|
|
31743
31751
|
} = _ref,
|
|
31744
31752
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31753
|
+
const classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
|
|
31754
|
+
'h-8 px-3': size === 'medium'
|
|
31755
|
+
}, {
|
|
31756
|
+
'h-10 px-4': size === 'large'
|
|
31757
|
+
});
|
|
31758
|
+
const inputClasses = clsx('ml-2.5', 'mr-2.5', 'h-full', 'flex-1', 'outline-0', 'text-text-text01', 'placeholder:text-text-textPlaceholder', {
|
|
31759
|
+
[`${typography.label.label2regular}`]: size === 'medium',
|
|
31760
|
+
[`${typography.label.label1regular}`]: size === 'large'
|
|
31761
|
+
});
|
|
31745
31762
|
return /*#__PURE__*/jsx("div", {
|
|
31746
31763
|
className: "relative",
|
|
31747
31764
|
ref: ref,
|
|
31748
31765
|
children: /*#__PURE__*/jsx("form", {
|
|
31749
31766
|
onSubmit: props.onSubmit,
|
|
31750
31767
|
children: /*#__PURE__*/jsxs("div", {
|
|
31751
|
-
className:
|
|
31768
|
+
className: classes,
|
|
31752
31769
|
style: {
|
|
31753
31770
|
width
|
|
31754
31771
|
},
|
|
31755
31772
|
children: [/*#__PURE__*/jsx(Icon, {
|
|
31756
31773
|
name: "search",
|
|
31757
31774
|
color: "icon01",
|
|
31758
|
-
size: "
|
|
31775
|
+
size: "medium"
|
|
31759
31776
|
}), /*#__PURE__*/jsx("input", {
|
|
31760
31777
|
type: "text",
|
|
31761
31778
|
size: 1,
|
|
31762
|
-
value: value,
|
|
31763
|
-
className:
|
|
31779
|
+
value: props.value,
|
|
31780
|
+
className: inputClasses,
|
|
31764
31781
|
placeholder: props.placeholder,
|
|
31765
31782
|
onChange: props.onChange
|
|
31783
|
+
}), props.onClickClearButton && props.value && props.value.length !== 0 && /*#__PURE__*/jsx(IconButton, {
|
|
31784
|
+
variant: "text",
|
|
31785
|
+
icon: "close",
|
|
31786
|
+
size: size === 'medium' ? 'small' : 'medium',
|
|
31787
|
+
isNoPadding: true,
|
|
31788
|
+
onClick: props.onClickClearButton
|
|
31766
31789
|
})]
|
|
31767
31790
|
})
|
|
31768
31791
|
})
|
|
@@ -31785,7 +31808,7 @@ function SelectItem$1({
|
|
|
31785
31808
|
onChange
|
|
31786
31809
|
} = useContext(SelectContext);
|
|
31787
31810
|
const handleClickItem = option => {
|
|
31788
|
-
onChange == null
|
|
31811
|
+
onChange == null || onChange(option);
|
|
31789
31812
|
setIsOptionListOpen(false);
|
|
31790
31813
|
};
|
|
31791
31814
|
const listItemClasses = clsx$1('flex w-full items-center');
|
|
@@ -31829,7 +31852,7 @@ function SelectList$1({
|
|
|
31829
31852
|
onChange
|
|
31830
31853
|
} = useContext(SelectContext);
|
|
31831
31854
|
const handleClickDeselect = () => {
|
|
31832
|
-
onChange == null
|
|
31855
|
+
onChange == null || onChange(null);
|
|
31833
31856
|
setIsOptionListOpen(false);
|
|
31834
31857
|
};
|
|
31835
31858
|
const listClasses = clsx$1('z-dropdown', 'absolute', 'w-max', 'py-2', 'overflow-y-auto', 'bg-background-uiBackground01', 'rounded', 'shadow-floatingShadow', {
|
|
@@ -32015,7 +32038,7 @@ function SelectSort({
|
|
|
32015
32038
|
useOutsideClick(targetRef, () => setIsOptionListOpen(false));
|
|
32016
32039
|
const handleClickToggle = () => setIsOptionListOpen(prev => !prev);
|
|
32017
32040
|
const handleClickItem = useCallback(value => {
|
|
32018
|
-
onChange == null
|
|
32041
|
+
onChange == null || onChange(value);
|
|
32019
32042
|
setIsOptionListOpen(false);
|
|
32020
32043
|
}, [onChange]);
|
|
32021
32044
|
const wrapperClasses = clsx$1('relative', 'flex', 'shrink-0', 'gap-1', 'items-center', 'rounded', {
|
|
@@ -32064,24 +32087,18 @@ function SelectSort({
|
|
|
32064
32087
|
});
|
|
32065
32088
|
}
|
|
32066
32089
|
|
|
32067
|
-
function
|
|
32068
|
-
|
|
32069
|
-
|
|
32070
|
-
columns,
|
|
32071
|
-
children
|
|
32090
|
+
function TableCell({
|
|
32091
|
+
children,
|
|
32092
|
+
className
|
|
32072
32093
|
}) {
|
|
32094
|
+
const cellClasses = clsx$1('border-b-[1px] border-border-uiBorder01');
|
|
32073
32095
|
return /*#__PURE__*/jsx("div", {
|
|
32074
|
-
className:
|
|
32075
|
-
style: {
|
|
32076
|
-
width,
|
|
32077
|
-
gridTemplateRows: rows,
|
|
32078
|
-
gridTemplateColumns: columns
|
|
32079
|
-
},
|
|
32096
|
+
className: clsx$1(cellClasses, className),
|
|
32080
32097
|
children: children
|
|
32081
32098
|
});
|
|
32082
32099
|
}
|
|
32083
32100
|
|
|
32084
|
-
function
|
|
32101
|
+
function TableRow({
|
|
32085
32102
|
children,
|
|
32086
32103
|
isHoverBackgroundVisible
|
|
32087
32104
|
}) {
|
|
@@ -32092,16 +32109,24 @@ function TableRowContainer({
|
|
|
32092
32109
|
});
|
|
32093
32110
|
}
|
|
32094
32111
|
|
|
32095
|
-
function
|
|
32096
|
-
|
|
32097
|
-
|
|
32112
|
+
function Table({
|
|
32113
|
+
width,
|
|
32114
|
+
rows,
|
|
32115
|
+
columns,
|
|
32116
|
+
children
|
|
32098
32117
|
}) {
|
|
32099
|
-
const cellClasses = clsx$1('border-b-[1px] border-border-uiBorder01');
|
|
32100
32118
|
return /*#__PURE__*/jsx("div", {
|
|
32101
|
-
className:
|
|
32119
|
+
className: "grid",
|
|
32120
|
+
style: {
|
|
32121
|
+
width,
|
|
32122
|
+
gridTemplateRows: rows,
|
|
32123
|
+
gridTemplateColumns: columns
|
|
32124
|
+
},
|
|
32102
32125
|
children: children
|
|
32103
32126
|
});
|
|
32104
32127
|
}
|
|
32128
|
+
Table.Row = TableRow;
|
|
32129
|
+
Table.Cell = TableCell;
|
|
32105
32130
|
|
|
32106
32131
|
const DeleteIcon = ({
|
|
32107
32132
|
color,
|
|
@@ -32416,5 +32441,5 @@ function Tooltip({
|
|
|
32416
32441
|
});
|
|
32417
32442
|
}
|
|
32418
32443
|
|
|
32419
|
-
export { Avatar, Breadcrumb, Button, Checkbox, Dropdown, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Radio, Search, Select, SelectSort, Tab, TabItem,
|
|
32444
|
+
export { Avatar, Breadcrumb, Button, Checkbox, Dropdown, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, Radio, Search, Select, SelectSort, Tab, TabItem, Table, TableCell, TableRow, Tag, Toast, ToastProvider, Toggle, Tooltip, useToast };
|
|
32420
32445
|
//# sourceMappingURL=index.js.map
|