@zenkigen-inc/component-ui 1.1.1 → 1.1.3
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/index.d.ts +1 -0
- package/dist/index.esm.js +219 -160
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +207 -156
- package/dist/index.js.map +1 -1
- package/dist/modal/modal-context.d.ts +1 -1
- package/dist/modal/modal.d.ts +2 -2
- package/dist/pagination-select/index.d.ts +1 -0
- package/dist/pagination-select/pagination-select.d.ts +23 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { userColors, typography, buttonColors, focusVisible, iconColors, tagColors, tagLightColors } from '@zenkigen-inc/component-theme';
|
|
2
2
|
import clsx$1, { clsx } from 'clsx';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import aa, { useState, useCallback, useEffect, createContext, useContext, useRef,
|
|
4
|
+
import aa, { useState, useCallback, useEffect, createContext, useContext, useRef, forwardRef } from 'react';
|
|
5
5
|
import { iconElements } from '@zenkigen-inc/component-icons';
|
|
6
6
|
|
|
7
7
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -63,7 +63,7 @@ function Button(_ref) {
|
|
|
63
63
|
_ref$variant = _ref.variant,
|
|
64
64
|
variant = _ref$variant === void 0 ? 'fill' : _ref$variant,
|
|
65
65
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
66
|
-
var baseClasses = clsx('rounded', 'flex', 'shrink-0', 'gap-1', 'items-center', 'justify-center', buttonColors[variant].base, buttonColors[variant].hover, buttonColors[variant].active, buttonColors[variant].disabled, focusVisible.normal, size === 'large' ? typography.label.label1regular : typography.label.label2regular, {
|
|
66
|
+
var baseClasses = clsx('rounded-button', 'flex', 'shrink-0', 'gap-1', 'items-center', 'justify-center', buttonColors[variant].base, buttonColors[variant].hover, buttonColors[variant].active, buttonColors[variant].disabled, focusVisible.normal, size === 'large' ? typography.label.label1regular : typography.label.label2regular, {
|
|
67
67
|
'h-6 px-2.5': size === 'small'
|
|
68
68
|
}, {
|
|
69
69
|
'h-8 px-3': size === 'medium'
|
|
@@ -345,11 +345,7 @@ function Dropdown(_ref) {
|
|
|
345
345
|
}
|
|
346
346
|
}, [isVisible]);
|
|
347
347
|
var wrapperClasses = clsx$1('relative', 'flex shrink-0 items-center gap-1', 'rounded', isDisabled && 'cursor-not-allowed');
|
|
348
|
-
var childrenButtonClasses = clsx$1('flex items-center justify-center', 'rounded', 'hover:bg-hover-hover02', 'active:bg-active-active02', focusVisible.normal, isDisabled && 'pointer-events-none', {
|
|
349
|
-
'h-6 w-6': size === 'x-small',
|
|
350
|
-
'h-8 w-8': size === 'small',
|
|
351
|
-
'h-10 w-10': size === 'medium',
|
|
352
|
-
'h-12 w-12': size === 'large',
|
|
348
|
+
var childrenButtonClasses = clsx$1('flex items-center justify-center', 'rounded', 'hover:bg-hover-hover02', 'active:bg-active-active02', focusVisible.normal, isDisabled && 'pointer-events-none', 'p-1', {
|
|
353
349
|
'border border-border-uiBorder02': variant === 'outline'
|
|
354
350
|
});
|
|
355
351
|
var buttonClasses = clsx$1('flex items-center', 'rounded', buttonColors[variant].base, buttonColors[variant].hover, buttonColors[variant].active, buttonColors[variant].disabled, focusVisible.normal, isDisabled && 'pointer-events-none', {
|
|
@@ -358,9 +354,6 @@ function Dropdown(_ref) {
|
|
|
358
354
|
'h-10 px-4': size === 'large'
|
|
359
355
|
});
|
|
360
356
|
var labelClasses = clsx$1('flex', 'items-center', !isArrowHidden ? size === 'x-small' ? 'mr-1' : 'mr-2' : null, typography.label[size === 'x-small' ? 'label3regular' : size === 'small' || size === 'medium' ? 'label2regular' : 'label1regular']);
|
|
361
|
-
var targetWithProps = target && /*#__PURE__*/cloneElement(target, {
|
|
362
|
-
isDisabled: isDisabled
|
|
363
|
-
});
|
|
364
357
|
return /*#__PURE__*/jsx(DropdownContext.Provider, {
|
|
365
358
|
value: {
|
|
366
359
|
isVisible: isVisible,
|
|
@@ -378,7 +371,7 @@ function Dropdown(_ref) {
|
|
|
378
371
|
className: childrenButtonClasses,
|
|
379
372
|
onClick: handleToggle,
|
|
380
373
|
disabled: isDisabled,
|
|
381
|
-
children:
|
|
374
|
+
children: target
|
|
382
375
|
}) : /*#__PURE__*/jsxs("button", {
|
|
383
376
|
type: "button",
|
|
384
377
|
title: title,
|
|
@@ -31436,12 +31429,13 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
31436
31429
|
});
|
|
31437
31430
|
|
|
31438
31431
|
var ModalContext = /*#__PURE__*/createContext({
|
|
31439
|
-
|
|
31432
|
+
width: 480,
|
|
31440
31433
|
setIsOpen: function setIsOpen() {
|
|
31441
31434
|
return false;
|
|
31442
31435
|
}
|
|
31443
31436
|
});
|
|
31444
31437
|
|
|
31438
|
+
var sizeSmallLimit = 420;
|
|
31445
31439
|
function ModalButtonTab(_ref) {
|
|
31446
31440
|
var primaryButtonLabel = _ref.primaryButtonLabel,
|
|
31447
31441
|
secondaryButtonLabel = _ref.secondaryButtonLabel,
|
|
@@ -31456,7 +31450,7 @@ function ModalButtonTab(_ref) {
|
|
|
31456
31450
|
subButtonLabel = _ref.subButtonLabel,
|
|
31457
31451
|
onClickSubButton = _ref.onClickSubButton;
|
|
31458
31452
|
var _useContext = useContext(ModalContext),
|
|
31459
|
-
|
|
31453
|
+
width = _useContext.width,
|
|
31460
31454
|
setIsOpen = _useContext.setIsOpen;
|
|
31461
31455
|
var handleClickPrimaryButton = useCallback(function () {
|
|
31462
31456
|
onClickPrimaryButton();
|
|
@@ -31470,17 +31464,18 @@ function ModalButtonTab(_ref) {
|
|
|
31470
31464
|
onClickSubButton == null || onClickSubButton();
|
|
31471
31465
|
}, [onClickSubButton]);
|
|
31472
31466
|
var wrapperClasses = clsx$1('flex', 'shrink-0', 'items-center', 'w-full', 'rounded-b-lg', 'py-4', 'px-6', {
|
|
31473
|
-
'justify-between': isWithCheckbox || subButtonLabel &&
|
|
31467
|
+
'justify-between': isWithCheckbox || subButtonLabel && sizeSmallLimit <= width,
|
|
31474
31468
|
'justify-end': !isWithCheckbox || !subButtonLabel,
|
|
31475
|
-
'justify-center': subButtonLabel &&
|
|
31469
|
+
'justify-center': subButtonLabel && width < sizeSmallLimit,
|
|
31476
31470
|
'border-t-[1px] border-border-uiBorder01': !isNoBorder,
|
|
31477
|
-
'gap-y-4':
|
|
31478
|
-
'flex-wrap':
|
|
31479
|
-
'flex-wrap-reverse':
|
|
31471
|
+
'gap-y-4': width < sizeSmallLimit,
|
|
31472
|
+
'flex-wrap': width < sizeSmallLimit && isWithCheckbox,
|
|
31473
|
+
'flex-wrap-reverse': width < sizeSmallLimit && subButtonLabel
|
|
31480
31474
|
});
|
|
31481
31475
|
var buttonContainerClasses = clsx$1('flex', 'items-center', {
|
|
31482
|
-
'
|
|
31483
|
-
'gap-x-
|
|
31476
|
+
'w-full justify-center': width < sizeSmallLimit,
|
|
31477
|
+
'gap-x-2': width < sizeSmallLimit,
|
|
31478
|
+
'gap-x-4': sizeSmallLimit <= width
|
|
31484
31479
|
});
|
|
31485
31480
|
return /*#__PURE__*/jsxs("div", {
|
|
31486
31481
|
className: wrapperClasses,
|
|
@@ -31501,13 +31496,13 @@ function ModalButtonTab(_ref) {
|
|
|
31501
31496
|
children: [/*#__PURE__*/jsx(Button, {
|
|
31502
31497
|
variant: "outline",
|
|
31503
31498
|
size: "large",
|
|
31504
|
-
width:
|
|
31499
|
+
width: width < sizeSmallLimit ? 132 : 'auto',
|
|
31505
31500
|
onClick: handleClickSecondaryButton,
|
|
31506
31501
|
children: secondaryButtonLabel
|
|
31507
31502
|
}, "1"), /*#__PURE__*/jsx(Button, {
|
|
31508
31503
|
variant: isDanger ? 'fillDanger' : 'fill',
|
|
31509
31504
|
size: "large",
|
|
31510
|
-
width:
|
|
31505
|
+
width: width < sizeSmallLimit ? 132 : 'auto',
|
|
31511
31506
|
onClick: handleClickPrimaryButton,
|
|
31512
31507
|
children: primaryButtonLabel
|
|
31513
31508
|
}, "2")]
|
|
@@ -31587,8 +31582,8 @@ function ModalTab(_ref) {
|
|
|
31587
31582
|
|
|
31588
31583
|
function Modal(_ref) {
|
|
31589
31584
|
var children = _ref.children,
|
|
31590
|
-
_ref$
|
|
31591
|
-
|
|
31585
|
+
_ref$width = _ref.width,
|
|
31586
|
+
width = _ref$width === void 0 ? 480 : _ref$width,
|
|
31592
31587
|
height = _ref.height,
|
|
31593
31588
|
isOpen = _ref.isOpen,
|
|
31594
31589
|
setIsOpen = _ref.setIsOpen,
|
|
@@ -31596,17 +31591,12 @@ function Modal(_ref) {
|
|
|
31596
31591
|
headerElement = _ref.headerElement,
|
|
31597
31592
|
tabElement = _ref.tabElement,
|
|
31598
31593
|
buttonTabElement = _ref.buttonTabElement;
|
|
31599
|
-
var wrapperClasses =
|
|
31600
|
-
var modalBaseClasses =
|
|
31601
|
-
|
|
31602
|
-
'w-[480px]': size === 'medium',
|
|
31603
|
-
'w-[640px]': size === 'large',
|
|
31604
|
-
'w-[720px]': size === 'x-large'
|
|
31605
|
-
});
|
|
31606
|
-
var contentClasses = clsx$1('flex', 'items-center', 'justify-center', 'overflow-y-auto');
|
|
31594
|
+
var wrapperClasses = 'flex items-center justify-center z-overlay bg-background-backgroundOverlayBlack fixed left-0 top-0 h-full w-full';
|
|
31595
|
+
var modalBaseClasses = 'flex shrink-0 flex-col bg-background-uiBackground01 rounded-lg shadow-modalShadow';
|
|
31596
|
+
var contentClasses = 'flex items-center justify-center overflow-y-auto';
|
|
31607
31597
|
return /*#__PURE__*/reactDom.createPortal(isOpen && /*#__PURE__*/jsx(ModalContext.Provider, {
|
|
31608
31598
|
value: {
|
|
31609
|
-
|
|
31599
|
+
width: width,
|
|
31610
31600
|
setIsOpen: setIsOpen
|
|
31611
31601
|
},
|
|
31612
31602
|
children: /*#__PURE__*/jsx("div", {
|
|
@@ -31614,6 +31604,7 @@ function Modal(_ref) {
|
|
|
31614
31604
|
children: /*#__PURE__*/jsxs("div", {
|
|
31615
31605
|
className: modalBaseClasses,
|
|
31616
31606
|
style: {
|
|
31607
|
+
width: width,
|
|
31617
31608
|
height: height
|
|
31618
31609
|
},
|
|
31619
31610
|
children: [headerElement, tabElement, /*#__PURE__*/jsx("div", {
|
|
@@ -31682,132 +31673,6 @@ function NotificationInline(_ref) {
|
|
|
31682
31673
|
});
|
|
31683
31674
|
}
|
|
31684
31675
|
|
|
31685
|
-
function Radio(_ref) {
|
|
31686
|
-
var name = _ref.name,
|
|
31687
|
-
value = _ref.value,
|
|
31688
|
-
id = _ref.id,
|
|
31689
|
-
label = _ref.label,
|
|
31690
|
-
_ref$isChecked = _ref.isChecked,
|
|
31691
|
-
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
31692
|
-
_ref$isDisabled = _ref.isDisabled,
|
|
31693
|
-
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
31694
|
-
onChange = _ref.onChange;
|
|
31695
|
-
var _useState = useState(false),
|
|
31696
|
-
isMouseOver = _useState[0],
|
|
31697
|
-
setIsMouseOver = _useState[1];
|
|
31698
|
-
var handleMouseOverInput = useCallback(function () {
|
|
31699
|
-
setIsMouseOver(true);
|
|
31700
|
-
}, []);
|
|
31701
|
-
var handleMouseOutInput = useCallback(function () {
|
|
31702
|
-
setIsMouseOver(false);
|
|
31703
|
-
}, []);
|
|
31704
|
-
var handleChange = useCallback(function (e) {
|
|
31705
|
-
return !isDisabled && (onChange == null ? void 0 : onChange(e));
|
|
31706
|
-
}, [isDisabled, onChange]);
|
|
31707
|
-
var inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', 'h-6', 'w-6', {
|
|
31708
|
-
'cursor-not-allowed': isDisabled,
|
|
31709
|
-
'cursor-pointer': !isDisabled
|
|
31710
|
-
});
|
|
31711
|
-
var boxClasses = clsx$1('inline-flex', 'items-center', 'justify-center', 'h-5', 'w-5', 'bg-white', 'border', 'border-solid', 'rounded-full', focusVisible.normalPeer, {
|
|
31712
|
-
'border-disabled-disabled01 hover:border-disabled-disabled01': isDisabled && !isMouseOver,
|
|
31713
|
-
'border-hover-hoverUiBorder': !isDisabled && isMouseOver,
|
|
31714
|
-
'border-border-uiBorder03': !isDisabled,
|
|
31715
|
-
'cursor-not-allowed': isDisabled,
|
|
31716
|
-
'cursor-pointer': !isDisabled
|
|
31717
|
-
});
|
|
31718
|
-
var afterClasses = clsx$1('h-3', 'w-3', 'absolute', 'top-0', 'right-0', 'bottom-0', 'left-0', 'block', 'm-auto', 'rounded-full', {
|
|
31719
|
-
'bg-disabled-disabled01': isDisabled && isChecked,
|
|
31720
|
-
'bg-active-activeSelectedUi': !isDisabled && isChecked,
|
|
31721
|
-
'scale-0': !isChecked,
|
|
31722
|
-
'scale-100': isChecked
|
|
31723
|
-
});
|
|
31724
|
-
var hoverIndicatorClasses = clsx$1('w-3', 'h-3', 'inline-block', 'rounded-full', !isDisabled && !isChecked && isMouseOver && 'bg-hover-hoverUi');
|
|
31725
|
-
var labelClasses = clsx$1('flex-[1_0_0]', 'ml-2', typography.label.label2regular, 'break-all', 'select-none', {
|
|
31726
|
-
'pointer-events-none cursor-not-allowed text-disabled-disabled01': isDisabled,
|
|
31727
|
-
'cursor-pointer text-text-text01': !isDisabled
|
|
31728
|
-
});
|
|
31729
|
-
return /*#__PURE__*/jsxs("div", {
|
|
31730
|
-
className: "flex items-center",
|
|
31731
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
31732
|
-
className: "flex h-6 w-6 items-center justify-center",
|
|
31733
|
-
children: [/*#__PURE__*/jsx("input", {
|
|
31734
|
-
type: "checkbox",
|
|
31735
|
-
value: value,
|
|
31736
|
-
name: name,
|
|
31737
|
-
id: id,
|
|
31738
|
-
checked: isChecked,
|
|
31739
|
-
disabled: isDisabled,
|
|
31740
|
-
onChange: handleChange,
|
|
31741
|
-
onMouseOver: handleMouseOverInput,
|
|
31742
|
-
onMouseLeave: handleMouseOutInput,
|
|
31743
|
-
className: inputClasses
|
|
31744
|
-
}), /*#__PURE__*/jsx("div", {
|
|
31745
|
-
className: boxClasses,
|
|
31746
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
31747
|
-
className: "relative flex h-5 w-5 flex-[0_0_auto] items-center justify-center",
|
|
31748
|
-
children: [/*#__PURE__*/jsx("span", {
|
|
31749
|
-
className: afterClasses
|
|
31750
|
-
}), /*#__PURE__*/jsx("span", {
|
|
31751
|
-
className: hoverIndicatorClasses
|
|
31752
|
-
})]
|
|
31753
|
-
})
|
|
31754
|
-
})]
|
|
31755
|
-
}), /*#__PURE__*/jsx("label", {
|
|
31756
|
-
htmlFor: id,
|
|
31757
|
-
className: labelClasses,
|
|
31758
|
-
children: label
|
|
31759
|
-
})]
|
|
31760
|
-
});
|
|
31761
|
-
}
|
|
31762
|
-
|
|
31763
|
-
var _excluded = ["width", "size"];
|
|
31764
|
-
var Search = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31765
|
-
var _clsx;
|
|
31766
|
-
var _ref$width = _ref.width,
|
|
31767
|
-
width = _ref$width === void 0 ? '100%' : _ref$width,
|
|
31768
|
-
_ref$size = _ref.size,
|
|
31769
|
-
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
31770
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31771
|
-
var classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
|
|
31772
|
-
'h-8 px-3': size === 'medium'
|
|
31773
|
-
}, {
|
|
31774
|
-
'h-10 px-4': size === 'large'
|
|
31775
|
-
});
|
|
31776
|
-
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));
|
|
31777
|
-
return /*#__PURE__*/jsx("div", {
|
|
31778
|
-
className: "relative",
|
|
31779
|
-
ref: ref,
|
|
31780
|
-
children: /*#__PURE__*/jsx("form", {
|
|
31781
|
-
onSubmit: props.onSubmit,
|
|
31782
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
31783
|
-
className: classes,
|
|
31784
|
-
style: {
|
|
31785
|
-
width: width
|
|
31786
|
-
},
|
|
31787
|
-
children: [/*#__PURE__*/jsx(Icon, {
|
|
31788
|
-
name: "search",
|
|
31789
|
-
color: "icon01",
|
|
31790
|
-
size: "medium"
|
|
31791
|
-
}), /*#__PURE__*/jsx("input", {
|
|
31792
|
-
type: "text",
|
|
31793
|
-
size: 1,
|
|
31794
|
-
value: props.value,
|
|
31795
|
-
className: inputClasses,
|
|
31796
|
-
placeholder: props.placeholder,
|
|
31797
|
-
onChange: props.onChange
|
|
31798
|
-
}), props.onClickClearButton && props.value && props.value.length !== 0 && /*#__PURE__*/jsx(IconButton, {
|
|
31799
|
-
variant: "text",
|
|
31800
|
-
icon: "close",
|
|
31801
|
-
size: size === 'medium' ? 'small' : 'medium',
|
|
31802
|
-
isNoPadding: true,
|
|
31803
|
-
onClick: props.onClickClearButton
|
|
31804
|
-
})]
|
|
31805
|
-
})
|
|
31806
|
-
})
|
|
31807
|
-
});
|
|
31808
|
-
});
|
|
31809
|
-
Search.displayName = 'Search';
|
|
31810
|
-
|
|
31811
31676
|
var SelectContext = /*#__PURE__*/createContext({
|
|
31812
31677
|
size: 'medium',
|
|
31813
31678
|
setIsOptionListOpen: function setIsOptionListOpen() {
|
|
@@ -31986,6 +31851,200 @@ function Select(_ref) {
|
|
|
31986
31851
|
}
|
|
31987
31852
|
Select.Option = SelectItem$1;
|
|
31988
31853
|
|
|
31854
|
+
function PaginationSelect(_ref) {
|
|
31855
|
+
var totalSize = _ref.totalSize,
|
|
31856
|
+
currentPage = _ref.currentPage,
|
|
31857
|
+
sizePerPage = _ref.sizePerPage,
|
|
31858
|
+
_ref$countLabel = _ref.countLabel,
|
|
31859
|
+
countLabel = _ref$countLabel === void 0 ? '件' : _ref$countLabel,
|
|
31860
|
+
_ref$pageLabel = _ref.pageLabel,
|
|
31861
|
+
pageLabel = _ref$pageLabel === void 0 ? 'ページ' : _ref$pageLabel,
|
|
31862
|
+
_ref$optionListMaxHei = _ref.optionListMaxHeight,
|
|
31863
|
+
optionListMaxHeight = _ref$optionListMaxHei === void 0 ? 190 : _ref$optionListMaxHei,
|
|
31864
|
+
onClickPrevButton = _ref.onClickPrevButton,
|
|
31865
|
+
onClickNextButton = _ref.onClickNextButton,
|
|
31866
|
+
_onChange = _ref.onChange;
|
|
31867
|
+
var pageMax = Math.ceil(totalSize / sizePerPage);
|
|
31868
|
+
var optionsList = [].concat(Array(pageMax)).map(function (_, index) {
|
|
31869
|
+
var value = (index + 1).toString();
|
|
31870
|
+
return {
|
|
31871
|
+
id: value,
|
|
31872
|
+
value: value,
|
|
31873
|
+
label: value
|
|
31874
|
+
};
|
|
31875
|
+
});
|
|
31876
|
+
return /*#__PURE__*/jsxs("nav", {
|
|
31877
|
+
"aria-label": "pagination",
|
|
31878
|
+
className: "flex items-center gap-x-1",
|
|
31879
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
31880
|
+
className: "flex items-center gap-x-2",
|
|
31881
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
31882
|
+
className: clsx$1('text-text-text01', typography.label.label2regular),
|
|
31883
|
+
children: [(currentPage - 1) * sizePerPage + 1, " -", ' ', currentPage * sizePerPage > totalSize ? totalSize : currentPage * sizePerPage, countLabel]
|
|
31884
|
+
}), /*#__PURE__*/jsx(Select, {
|
|
31885
|
+
size: "medium",
|
|
31886
|
+
variant: "outline",
|
|
31887
|
+
selectedOption: optionsList.find(function (option) {
|
|
31888
|
+
return option.value === currentPage.toString();
|
|
31889
|
+
}),
|
|
31890
|
+
optionListMaxHeight: optionListMaxHeight,
|
|
31891
|
+
onChange: function onChange(option) {
|
|
31892
|
+
return option && _onChange(Number(option.value));
|
|
31893
|
+
},
|
|
31894
|
+
children: optionsList && optionsList.map(function (option) {
|
|
31895
|
+
return /*#__PURE__*/jsx(Select.Option, {
|
|
31896
|
+
option: option
|
|
31897
|
+
}, option.id);
|
|
31898
|
+
})
|
|
31899
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
31900
|
+
className: clsx$1('text-text-text03', typography.label.label2regular),
|
|
31901
|
+
children: ["/ ", pageMax, pageLabel]
|
|
31902
|
+
})]
|
|
31903
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
31904
|
+
className: "flex items-center",
|
|
31905
|
+
children: [/*#__PURE__*/jsx(IconButton, {
|
|
31906
|
+
variant: "text",
|
|
31907
|
+
icon: "angle-left",
|
|
31908
|
+
size: "small",
|
|
31909
|
+
isDisabled: currentPage === 1,
|
|
31910
|
+
onClick: onClickPrevButton
|
|
31911
|
+
}), /*#__PURE__*/jsx(IconButton, {
|
|
31912
|
+
variant: "text",
|
|
31913
|
+
icon: "angle-right",
|
|
31914
|
+
size: "small",
|
|
31915
|
+
isDisabled: currentPage === pageMax,
|
|
31916
|
+
onClick: onClickNextButton
|
|
31917
|
+
})]
|
|
31918
|
+
})]
|
|
31919
|
+
});
|
|
31920
|
+
}
|
|
31921
|
+
|
|
31922
|
+
function Radio(_ref) {
|
|
31923
|
+
var name = _ref.name,
|
|
31924
|
+
value = _ref.value,
|
|
31925
|
+
id = _ref.id,
|
|
31926
|
+
label = _ref.label,
|
|
31927
|
+
_ref$isChecked = _ref.isChecked,
|
|
31928
|
+
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
31929
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
31930
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
31931
|
+
onChange = _ref.onChange;
|
|
31932
|
+
var _useState = useState(false),
|
|
31933
|
+
isMouseOver = _useState[0],
|
|
31934
|
+
setIsMouseOver = _useState[1];
|
|
31935
|
+
var handleMouseOverInput = useCallback(function () {
|
|
31936
|
+
setIsMouseOver(true);
|
|
31937
|
+
}, []);
|
|
31938
|
+
var handleMouseOutInput = useCallback(function () {
|
|
31939
|
+
setIsMouseOver(false);
|
|
31940
|
+
}, []);
|
|
31941
|
+
var handleChange = useCallback(function (e) {
|
|
31942
|
+
return !isDisabled && (onChange == null ? void 0 : onChange(e));
|
|
31943
|
+
}, [isDisabled, onChange]);
|
|
31944
|
+
var inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', 'h-6', 'w-6', {
|
|
31945
|
+
'cursor-not-allowed': isDisabled,
|
|
31946
|
+
'cursor-pointer': !isDisabled
|
|
31947
|
+
});
|
|
31948
|
+
var boxClasses = clsx$1('inline-flex', 'items-center', 'justify-center', 'h-5', 'w-5', 'bg-white', 'border', 'border-solid', 'rounded-full', focusVisible.normalPeer, {
|
|
31949
|
+
'border-disabled-disabled01 hover:border-disabled-disabled01': isDisabled && !isMouseOver,
|
|
31950
|
+
'border-hover-hoverUiBorder': !isDisabled && isMouseOver,
|
|
31951
|
+
'border-border-uiBorder03': !isDisabled,
|
|
31952
|
+
'cursor-not-allowed': isDisabled,
|
|
31953
|
+
'cursor-pointer': !isDisabled
|
|
31954
|
+
});
|
|
31955
|
+
var afterClasses = clsx$1('h-3', 'w-3', 'absolute', 'top-0', 'right-0', 'bottom-0', 'left-0', 'block', 'm-auto', 'rounded-full', {
|
|
31956
|
+
'bg-disabled-disabled01': isDisabled && isChecked,
|
|
31957
|
+
'bg-active-activeSelectedUi': !isDisabled && isChecked,
|
|
31958
|
+
'scale-0': !isChecked,
|
|
31959
|
+
'scale-100': isChecked
|
|
31960
|
+
});
|
|
31961
|
+
var hoverIndicatorClasses = clsx$1('w-3', 'h-3', 'inline-block', 'rounded-full', !isDisabled && !isChecked && isMouseOver && 'bg-hover-hoverUi');
|
|
31962
|
+
var labelClasses = clsx$1('flex-[1_0_0]', 'ml-2', typography.label.label2regular, 'break-all', 'select-none', {
|
|
31963
|
+
'pointer-events-none cursor-not-allowed text-disabled-disabled01': isDisabled,
|
|
31964
|
+
'cursor-pointer text-text-text01': !isDisabled
|
|
31965
|
+
});
|
|
31966
|
+
return /*#__PURE__*/jsxs("div", {
|
|
31967
|
+
className: "flex items-center",
|
|
31968
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
31969
|
+
className: "flex h-6 w-6 items-center justify-center",
|
|
31970
|
+
children: [/*#__PURE__*/jsx("input", {
|
|
31971
|
+
type: "checkbox",
|
|
31972
|
+
value: value,
|
|
31973
|
+
name: name,
|
|
31974
|
+
id: id,
|
|
31975
|
+
checked: isChecked,
|
|
31976
|
+
disabled: isDisabled,
|
|
31977
|
+
onChange: handleChange,
|
|
31978
|
+
onMouseOver: handleMouseOverInput,
|
|
31979
|
+
onMouseLeave: handleMouseOutInput,
|
|
31980
|
+
className: inputClasses
|
|
31981
|
+
}), /*#__PURE__*/jsx("div", {
|
|
31982
|
+
className: boxClasses,
|
|
31983
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
31984
|
+
className: "relative flex h-5 w-5 flex-[0_0_auto] items-center justify-center",
|
|
31985
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
31986
|
+
className: afterClasses
|
|
31987
|
+
}), /*#__PURE__*/jsx("span", {
|
|
31988
|
+
className: hoverIndicatorClasses
|
|
31989
|
+
})]
|
|
31990
|
+
})
|
|
31991
|
+
})]
|
|
31992
|
+
}), /*#__PURE__*/jsx("label", {
|
|
31993
|
+
htmlFor: id,
|
|
31994
|
+
className: labelClasses,
|
|
31995
|
+
children: label
|
|
31996
|
+
})]
|
|
31997
|
+
});
|
|
31998
|
+
}
|
|
31999
|
+
|
|
32000
|
+
var _excluded = ["width", "size"];
|
|
32001
|
+
var Search = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
32002
|
+
var _clsx;
|
|
32003
|
+
var _ref$width = _ref.width,
|
|
32004
|
+
width = _ref$width === void 0 ? '100%' : _ref$width,
|
|
32005
|
+
_ref$size = _ref.size,
|
|
32006
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
32007
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
32008
|
+
var classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
|
|
32009
|
+
'h-8 px-3': size === 'medium'
|
|
32010
|
+
}, {
|
|
32011
|
+
'h-10 px-4': size === 'large'
|
|
32012
|
+
});
|
|
32013
|
+
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));
|
|
32014
|
+
return /*#__PURE__*/jsx("div", {
|
|
32015
|
+
className: "relative",
|
|
32016
|
+
ref: ref,
|
|
32017
|
+
children: /*#__PURE__*/jsx("form", {
|
|
32018
|
+
onSubmit: props.onSubmit,
|
|
32019
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
32020
|
+
className: classes,
|
|
32021
|
+
style: {
|
|
32022
|
+
width: width
|
|
32023
|
+
},
|
|
32024
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
32025
|
+
name: "search",
|
|
32026
|
+
color: "icon01",
|
|
32027
|
+
size: "medium"
|
|
32028
|
+
}), /*#__PURE__*/jsx("input", {
|
|
32029
|
+
type: "text",
|
|
32030
|
+
size: 1,
|
|
32031
|
+
value: props.value,
|
|
32032
|
+
className: inputClasses,
|
|
32033
|
+
placeholder: props.placeholder,
|
|
32034
|
+
onChange: props.onChange
|
|
32035
|
+
}), props.onClickClearButton && props.value && props.value.length !== 0 && /*#__PURE__*/jsx(IconButton, {
|
|
32036
|
+
variant: "text",
|
|
32037
|
+
icon: "close",
|
|
32038
|
+
size: size === 'medium' ? 'small' : 'medium',
|
|
32039
|
+
isNoPadding: true,
|
|
32040
|
+
onClick: props.onClickClearButton
|
|
32041
|
+
})]
|
|
32042
|
+
})
|
|
32043
|
+
})
|
|
32044
|
+
});
|
|
32045
|
+
});
|
|
32046
|
+
Search.displayName = 'Search';
|
|
32047
|
+
|
|
31989
32048
|
function SelectItem(_ref) {
|
|
31990
32049
|
var children = _ref.children,
|
|
31991
32050
|
isSortKey = _ref.isSortKey,
|
|
@@ -32490,5 +32549,5 @@ function Tooltip(_ref) {
|
|
|
32490
32549
|
});
|
|
32491
32550
|
}
|
|
32492
32551
|
|
|
32493
|
-
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 };
|
|
32552
|
+
export { Avatar, Breadcrumb, Button, Checkbox, Dropdown, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, PaginationSelect, Radio, Search, Select, SelectSort, Tab, TabItem, Table, TableCell, TableRow, Tag, Toast, ToastProvider, Toggle, Tooltip, useToast };
|
|
32494
32553
|
//# sourceMappingURL=index.esm.js.map
|