@zenkigen-inc/component-ui 1.0.0 → 1.0.2
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 +4 -4
- package/dist/index.esm.js +74 -43
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +75 -42
- package/dist/index.js.map +1 -1
- package/dist/search/search.d.ts +3 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# @zenkigen-inc/
|
|
1
|
+
# @zenkigen-inc/component-ui
|
|
2
2
|
|
|
3
3
|
## インストール
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
yarn add @zenkigen-inc/
|
|
6
|
+
yarn add @zenkigen-inc/component-ui
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## 利用方法
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
|
-
import { Button } from 'zenkigen-component';
|
|
12
|
+
import { Button } from '@zenkigen-inc/component-ui';
|
|
13
13
|
|
|
14
14
|
const Component = () => {
|
|
15
15
|
return <Button>ボタン</Button>;
|
|
@@ -37,4 +37,4 @@ https://www.notion.so/zenkigen/5d4ebd0d93b74124a533cf167b852ec0
|
|
|
37
37
|
|
|
38
38
|
## ライセンス
|
|
39
39
|
|
|
40
|
-
@zenkigen-inc/
|
|
40
|
+
@zenkigen-inc/component-ui は MIT ライセンスに基づいています。
|
package/dist/index.esm.js
CHANGED
|
@@ -41,7 +41,7 @@ var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
|
41
41
|
isLast = _ref.isLast;
|
|
42
42
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
43
43
|
children: [/*#__PURE__*/jsx("li", {
|
|
44
|
-
className: clsx$1('[&_a]:text-interactive-interactive02'),
|
|
44
|
+
className: clsx$1('[&_a]:text-interactive-interactive02', '[&_a]:hover:underline'),
|
|
45
45
|
children: children
|
|
46
46
|
}), !isLast && /*#__PURE__*/jsx("li", {
|
|
47
47
|
"aria-hidden": "true",
|
|
@@ -56,7 +56,7 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
56
56
|
return /*#__PURE__*/jsx("nav", {
|
|
57
57
|
"aria-label": "breadcrumb",
|
|
58
58
|
children: /*#__PURE__*/jsx("ul", {
|
|
59
|
-
className: clsx$1(typography.label.label2regular, 'flex flex-wrap gap-2 whitespace-nowrap'),
|
|
59
|
+
className: clsx$1(typography.label.label2regular, 'flex flex-wrap gap-2 whitespace-nowrap text-text-text01'),
|
|
60
60
|
children: children.map(function (child, i) {
|
|
61
61
|
return /*#__PURE__*/jsx(BreadcrumbItem, {
|
|
62
62
|
isLast: i === children.length - 1,
|
|
@@ -299,7 +299,7 @@ function DropdownMenu(_ref) {
|
|
|
299
299
|
variant = _useContext.variant;
|
|
300
300
|
var 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', {
|
|
301
301
|
'border-solid border border-border-uiBorder01': variant === 'outline',
|
|
302
|
-
'py-
|
|
302
|
+
'py-1': !isNoPadding
|
|
303
303
|
});
|
|
304
304
|
return isVisible && !isDisabled && /*#__PURE__*/jsx("ul", {
|
|
305
305
|
className: wrapperClasses,
|
|
@@ -444,7 +444,7 @@ function EvaluationStar(_ref) {
|
|
|
444
444
|
});
|
|
445
445
|
var ratingStars = [];
|
|
446
446
|
var _loop = function _loop(i) {
|
|
447
|
-
var color = i <= currentRating ? 'fill-
|
|
447
|
+
var color = i <= currentRating ? 'fill-yellow-yellow50' : 'fill-icon-icon03';
|
|
448
448
|
ratingStars.push( /*#__PURE__*/jsx("button", {
|
|
449
449
|
type: "button",
|
|
450
450
|
onClick: function onClick() {
|
|
@@ -466,7 +466,7 @@ function EvaluationStar(_ref) {
|
|
|
466
466
|
|
|
467
467
|
function Heading(props) {
|
|
468
468
|
var TagName = "h" + props.level;
|
|
469
|
-
var classes = clsx('flex', 'items-center', typography.heading[TagName], {
|
|
469
|
+
var classes = clsx('flex', 'items-center', 'text-text-text01', typography.heading[TagName], {
|
|
470
470
|
'gap-2': props.level === 1
|
|
471
471
|
}, {
|
|
472
472
|
'gap-1': props.level > 1
|
|
@@ -535,36 +535,54 @@ function Loading(_ref) {
|
|
|
535
535
|
height = _ref$height === void 0 ? '100%' : _ref$height;
|
|
536
536
|
var wrapperClasses = clsx$1(position, 'top-0', 'left-0', 'z-20', 'flex', 'items-center', 'justify-center', 'w-full');
|
|
537
537
|
var svgClasses = clsx$1(size === 'small' && 'h-4 w-4', size === 'medium' && 'h-8 w-8', size === 'large' && 'h-16 w-16');
|
|
538
|
-
return /*#__PURE__*/jsx(
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
538
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
539
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
540
|
+
className: wrapperClasses,
|
|
541
|
+
style: {
|
|
542
|
+
height: height
|
|
543
|
+
},
|
|
544
|
+
children: [size === 'small' && /*#__PURE__*/jsx("svg", {
|
|
545
|
+
className: svgClasses,
|
|
546
|
+
viewBox: "0 0 16 16",
|
|
547
|
+
fill: "none",
|
|
548
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
549
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
550
|
+
className: "origin-center animate-circular-small-move stroke-interactive-interactive01",
|
|
551
|
+
cx: "8",
|
|
552
|
+
cy: "8",
|
|
553
|
+
r: "7",
|
|
554
|
+
stroke: "currentColor",
|
|
555
|
+
strokeWidth: "1.5",
|
|
556
|
+
fill: "none"
|
|
557
|
+
})
|
|
558
|
+
}), size === 'medium' && /*#__PURE__*/jsx("svg", {
|
|
559
|
+
className: svgClasses,
|
|
560
|
+
viewBox: "0 0 32 32",
|
|
561
|
+
fill: "none",
|
|
562
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
563
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
564
|
+
className: "origin-center animate-circular-medium-move stroke-interactive-interactive01",
|
|
565
|
+
cx: "16",
|
|
566
|
+
cy: "16",
|
|
567
|
+
r: "15",
|
|
568
|
+
stroke: "currentColor",
|
|
569
|
+
strokeWidth: "2",
|
|
570
|
+
fill: "none"
|
|
571
|
+
})
|
|
572
|
+
}), size === 'large' && /*#__PURE__*/jsx("svg", {
|
|
573
|
+
className: svgClasses,
|
|
574
|
+
viewBox: "0 0 64 64",
|
|
575
|
+
fill: "none",
|
|
576
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
577
|
+
children: /*#__PURE__*/jsx("circle", {
|
|
578
|
+
className: "origin-center animate-circular-large-move stroke-interactive-interactive01",
|
|
579
|
+
cx: "32",
|
|
580
|
+
cy: "32",
|
|
581
|
+
r: "30",
|
|
582
|
+
stroke: "currentColor",
|
|
583
|
+
strokeWidth: "3",
|
|
584
|
+
fill: "none"
|
|
585
|
+
})
|
|
568
586
|
})]
|
|
569
587
|
})
|
|
570
588
|
});
|
|
@@ -31696,7 +31714,7 @@ function Radio(_ref) {
|
|
|
31696
31714
|
var handleChange = useCallback(function (e) {
|
|
31697
31715
|
return !isDisabled && (onChange == null ? void 0 : onChange(e));
|
|
31698
31716
|
}, [isDisabled, onChange]);
|
|
31699
|
-
var inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', {
|
|
31717
|
+
var inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', 'h-6', 'w-6', {
|
|
31700
31718
|
'cursor-not-allowed': isDisabled,
|
|
31701
31719
|
'cursor-pointer': !isDisabled
|
|
31702
31720
|
});
|
|
@@ -31752,34 +31770,47 @@ function Radio(_ref) {
|
|
|
31752
31770
|
});
|
|
31753
31771
|
}
|
|
31754
31772
|
|
|
31755
|
-
var _excluded = ["width", "
|
|
31773
|
+
var _excluded = ["width", "size"];
|
|
31756
31774
|
var Search = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31775
|
+
var _clsx;
|
|
31757
31776
|
var _ref$width = _ref.width,
|
|
31758
31777
|
width = _ref$width === void 0 ? '100%' : _ref$width,
|
|
31759
|
-
_ref$
|
|
31760
|
-
|
|
31778
|
+
_ref$size = _ref.size,
|
|
31779
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
31761
31780
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31781
|
+
var classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
|
|
31782
|
+
'h-8 px-3': size === 'medium'
|
|
31783
|
+
}, {
|
|
31784
|
+
'h-10 px-4': size === 'large'
|
|
31785
|
+
});
|
|
31786
|
+
var inputClasses = clsx('ml-2.5', 'mr-2.5', 'h-full', 'flex-1', 'outline-0', 'text-text-text01', 'placeholder:text-text-textPlaceholder', (_clsx = {}, _clsx["" + typography.label.label2regular] = size === 'medium', _clsx["" + typography.label.label1regular] = size === 'large', _clsx));
|
|
31762
31787
|
return /*#__PURE__*/jsx("div", {
|
|
31763
31788
|
className: "relative",
|
|
31764
31789
|
ref: ref,
|
|
31765
31790
|
children: /*#__PURE__*/jsx("form", {
|
|
31766
31791
|
onSubmit: props.onSubmit,
|
|
31767
31792
|
children: /*#__PURE__*/jsxs("div", {
|
|
31768
|
-
className:
|
|
31793
|
+
className: classes,
|
|
31769
31794
|
style: {
|
|
31770
31795
|
width: width
|
|
31771
31796
|
},
|
|
31772
31797
|
children: [/*#__PURE__*/jsx(Icon, {
|
|
31773
31798
|
name: "search",
|
|
31774
31799
|
color: "icon01",
|
|
31775
|
-
size: "
|
|
31800
|
+
size: "medium"
|
|
31776
31801
|
}), /*#__PURE__*/jsx("input", {
|
|
31777
31802
|
type: "text",
|
|
31778
31803
|
size: 1,
|
|
31779
|
-
value: value,
|
|
31780
|
-
className:
|
|
31804
|
+
value: props.value,
|
|
31805
|
+
className: inputClasses,
|
|
31781
31806
|
placeholder: props.placeholder,
|
|
31782
31807
|
onChange: props.onChange
|
|
31808
|
+
}), props.value && props.value.length !== 0 && /*#__PURE__*/jsx(IconButton, {
|
|
31809
|
+
variant: "text",
|
|
31810
|
+
icon: "close",
|
|
31811
|
+
size: size === 'medium' ? 'small' : 'medium',
|
|
31812
|
+
isNoPadding: true,
|
|
31813
|
+
onClick: props.onClickClearButton
|
|
31783
31814
|
})]
|
|
31784
31815
|
})
|
|
31785
31816
|
})
|