@zenkigen-inc/component-ui 1.1.2 → 1.2.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/index.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, cloneElement, forwardRef } from 'react';
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) {
@@ -341,11 +341,7 @@ function Dropdown({
341
341
  }
342
342
  }, [isVisible]);
343
343
  const wrapperClasses = clsx$1('relative', 'flex shrink-0 items-center gap-1', 'rounded', isDisabled && 'cursor-not-allowed');
344
- const childrenButtonClasses = clsx$1('flex items-center justify-center', 'rounded', 'hover:bg-hover-hover02', 'active:bg-active-active02', focusVisible.normal, isDisabled && 'pointer-events-none', {
345
- 'h-6 w-6': size === 'x-small',
346
- 'h-8 w-8': size === 'small',
347
- 'h-10 w-10': size === 'medium',
348
- 'h-12 w-12': size === 'large',
344
+ const 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', {
349
345
  'border border-border-uiBorder02': variant === 'outline'
350
346
  });
351
347
  const 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', {
@@ -354,9 +350,6 @@ function Dropdown({
354
350
  'h-10 px-4': size === 'large'
355
351
  });
356
352
  const 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']);
357
- const targetWithProps = target && /*#__PURE__*/cloneElement(target, {
358
- isDisabled
359
- });
360
353
  return /*#__PURE__*/jsx(DropdownContext.Provider, {
361
354
  value: {
362
355
  isVisible,
@@ -374,7 +367,7 @@ function Dropdown({
374
367
  className: childrenButtonClasses,
375
368
  onClick: handleToggle,
376
369
  disabled: isDisabled,
377
- children: targetWithProps
370
+ children: target
378
371
  }) : /*#__PURE__*/jsxs("button", {
379
372
  type: "button",
380
373
  title: title,
@@ -31421,85 +31414,29 @@ if (process.env.NODE_ENV === 'production') {
31421
31414
  }
31422
31415
  });
31423
31416
 
31417
+ function ModalBody({
31418
+ children
31419
+ }) {
31420
+ return /*#__PURE__*/jsx("div", {
31421
+ className: "overflow-y-auto",
31422
+ children: children
31423
+ });
31424
+ }
31425
+
31424
31426
  const ModalContext = /*#__PURE__*/createContext({
31425
- width: 480,
31426
31427
  setIsOpen: () => false
31427
31428
  });
31428
31429
 
31429
- const sizeSmallLimit = 420;
31430
- function ModalButtonTab({
31431
- primaryButtonLabel,
31432
- secondaryButtonLabel,
31433
- onClickPrimaryButton,
31434
- onClickSecondaryButton,
31435
- isDanger,
31436
- isNoBorder,
31437
- isWithCheckbox,
31438
- checkboxLabel,
31439
- isChecked,
31440
- onChange,
31441
- subButtonLabel,
31442
- onClickSubButton
31430
+ function ModalFooter({
31431
+ children,
31432
+ isNoBorder
31443
31433
  }) {
31444
- const {
31445
- width,
31446
- setIsOpen
31447
- } = useContext(ModalContext);
31448
- const handleClickPrimaryButton = useCallback(() => {
31449
- onClickPrimaryButton();
31450
- setIsOpen(false);
31451
- }, [onClickPrimaryButton, setIsOpen]);
31452
- const handleClickSecondaryButton = useCallback(() => {
31453
- onClickSecondaryButton();
31454
- setIsOpen(false);
31455
- }, [onClickSecondaryButton, setIsOpen]);
31456
- const handleClickSubButton = useCallback(() => {
31457
- onClickSubButton == null || onClickSubButton();
31458
- }, [onClickSubButton]);
31459
31434
  const wrapperClasses = clsx$1('flex', 'shrink-0', 'items-center', 'w-full', 'rounded-b-lg', 'py-4', 'px-6', {
31460
- 'justify-between': isWithCheckbox || subButtonLabel && sizeSmallLimit <= width,
31461
- 'justify-end': !isWithCheckbox || !subButtonLabel,
31462
- 'justify-center': subButtonLabel && width < sizeSmallLimit,
31463
- 'border-t-[1px] border-border-uiBorder01': !isNoBorder,
31464
- 'gap-y-4': width < sizeSmallLimit,
31465
- 'flex-wrap': width < sizeSmallLimit && isWithCheckbox,
31466
- 'flex-wrap-reverse': width < sizeSmallLimit && subButtonLabel
31435
+ 'border-t-[1px] border-border-uiBorder01': !isNoBorder
31467
31436
  });
31468
- const buttonContainerClasses = clsx$1('flex', 'items-center', {
31469
- 'w-full justify-center': width < sizeSmallLimit,
31470
- 'gap-x-2': width < sizeSmallLimit,
31471
- 'gap-x-4': sizeSmallLimit <= width
31472
- });
31473
- return /*#__PURE__*/jsxs("div", {
31437
+ return /*#__PURE__*/jsx("div", {
31474
31438
  className: wrapperClasses,
31475
- children: [isWithCheckbox ? /*#__PURE__*/jsx("div", {
31476
- children: /*#__PURE__*/jsx(Checkbox, {
31477
- id: "modal-checkbox",
31478
- label: checkboxLabel,
31479
- isChecked: isChecked,
31480
- onChange: onChange
31481
- })
31482
- }) : subButtonLabel && onClickSubButton ? /*#__PURE__*/jsx(Button, {
31483
- variant: "text",
31484
- size: "large",
31485
- onClick: handleClickSubButton,
31486
- children: subButtonLabel
31487
- }, "0") : null, /*#__PURE__*/jsxs("div", {
31488
- className: buttonContainerClasses,
31489
- children: [/*#__PURE__*/jsx(Button, {
31490
- variant: "outline",
31491
- size: "large",
31492
- width: width < sizeSmallLimit ? 132 : 'auto',
31493
- onClick: handleClickSecondaryButton,
31494
- children: secondaryButtonLabel
31495
- }, "1"), /*#__PURE__*/jsx(Button, {
31496
- variant: isDanger ? 'fillDanger' : 'fill',
31497
- size: "large",
31498
- width: width < sizeSmallLimit ? 132 : 'auto',
31499
- onClick: handleClickPrimaryButton,
31500
- children: primaryButtonLabel
31501
- }, "2")]
31502
- })]
31439
+ children: children
31503
31440
  });
31504
31441
  }
31505
31442
 
@@ -31518,7 +31455,9 @@ function ModalHeader({
31518
31455
  });
31519
31456
  return /*#__PURE__*/jsxs("div", {
31520
31457
  className: headerClasses,
31521
- children: [children, !isNoCloseButton && /*#__PURE__*/jsx(IconButton, {
31458
+ children: [/*#__PURE__*/jsx("div", {
31459
+ children: children
31460
+ }), !isNoCloseButton && /*#__PURE__*/jsx(IconButton, {
31522
31461
  icon: "close",
31523
31462
  size: "small",
31524
31463
  variant: "text",
@@ -31527,92 +31466,38 @@ function ModalHeader({
31527
31466
  });
31528
31467
  }
31529
31468
 
31530
- const TabItem = props => {
31531
- 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', {
31532
- [`${typography.label.label2regular}`]: !props.isSelected,
31533
- ['text-interactive-interactive02 hover:before:bg-border-uiBorder02Dark']: !props.isSelected,
31534
- [`${typography.label.label2bold}`]: props.isSelected,
31535
- ['before:bg-interactive-interactive01 hover:before:bg-interactive-interactive01 pointer-events-none']: props.isSelected
31536
- });
31537
- return /*#__PURE__*/jsx("button", {
31538
- type: "button",
31539
- role: "tab",
31540
- "aria-selected": props.isSelected,
31541
- className: classes,
31542
- disabled: props.isDisabled,
31543
- onClick: () => props.onClick(props.id),
31544
- children: props.children
31545
- });
31546
- };
31547
-
31548
- function Tab({
31549
- children
31550
- }) {
31551
- 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', {});
31552
- return /*#__PURE__*/jsx("div", {
31553
- role: "tablist",
31554
- className: classes,
31555
- children: children
31556
- });
31557
- }
31558
- Tab.Item = TabItem;
31559
-
31560
- function ModalTab({
31561
- tabItems,
31562
- selectedTab,
31563
- setSelectedTab
31564
- }) {
31565
- return /*#__PURE__*/jsx("div", {
31566
- className: "mt-2 w-full",
31567
- children: /*#__PURE__*/jsx(Tab, {
31568
- children: tabItems.map(item => /*#__PURE__*/jsx(TabItem, {
31569
- id: item.id,
31570
- isSelected: selectedTab === item.id,
31571
- onClick: setSelectedTab,
31572
- children: item.label
31573
- }, item.id))
31574
- })
31575
- });
31576
- }
31577
-
31469
+ const LIMIT_WIDTH = 320;
31470
+ const LIMIT_HEIGHT = 184;
31578
31471
  function Modal({
31579
31472
  children,
31580
31473
  width = 480,
31581
31474
  height,
31582
31475
  isOpen,
31583
31476
  setIsOpen,
31584
- portalTargetRef,
31585
- headerElement,
31586
- tabElement,
31587
- buttonTabElement
31477
+ portalTargetRef
31588
31478
  }) {
31589
- const wrapperClasses = 'flex items-center justify-center z-overlay bg-background-backgroundOverlayBlack fixed left-0 top-0 h-full w-full';
31590
- const modalBaseClasses = 'flex shrink-0 flex-col bg-background-uiBackground01 rounded-lg shadow-modalShadow';
31591
- const contentClasses = 'flex items-center justify-center overflow-y-auto';
31479
+ const renderWidth = typeof width === 'number' ? Math.max(width, LIMIT_WIDTH) : width;
31480
+ const renderHeight = typeof height === 'number' ? Math.max(height, LIMIT_HEIGHT) : height;
31592
31481
  return /*#__PURE__*/reactDom.createPortal(isOpen && /*#__PURE__*/jsx(ModalContext.Provider, {
31593
31482
  value: {
31594
- width,
31595
31483
  setIsOpen
31596
31484
  },
31597
31485
  children: /*#__PURE__*/jsx("div", {
31598
- className: wrapperClasses,
31599
- children: /*#__PURE__*/jsxs("div", {
31600
- className: modalBaseClasses,
31486
+ className: "fixed left-0 top-0 z-overlay flex h-full w-full items-center justify-center bg-background-backgroundOverlayBlack",
31487
+ children: /*#__PURE__*/jsx("div", {
31488
+ className: "flex shrink-0 flex-col rounded-lg bg-background-uiBackground01 shadow-modalShadow",
31601
31489
  style: {
31602
- width,
31603
- height
31490
+ width: renderWidth,
31491
+ height: renderHeight
31604
31492
  },
31605
- children: [headerElement, tabElement, /*#__PURE__*/jsx("div", {
31606
- className: contentClasses,
31607
- children: children
31608
- }), buttonTabElement]
31493
+ children: children
31609
31494
  })
31610
31495
  })
31611
31496
  }), !portalTargetRef || (portalTargetRef == null ? void 0 : portalTargetRef.current) === null ? document.body : portalTargetRef.current);
31612
31497
  }
31498
+ Modal.Body = ModalBody;
31613
31499
  Modal.Header = ModalHeader;
31614
- Modal.Tab = ModalTab;
31615
- Modal.ButtonTab = ModalButtonTab;
31500
+ Modal.Footer = ModalFooter;
31616
31501
 
31617
31502
  const _excluded$1 = ["state", "size"];
31618
31503
  function NotificationInline(_ref) {
@@ -31668,129 +31553,6 @@ function NotificationInline(_ref) {
31668
31553
  });
31669
31554
  }
31670
31555
 
31671
- function Radio({
31672
- name,
31673
- value,
31674
- id,
31675
- label,
31676
- isChecked = false,
31677
- isDisabled = false,
31678
- onChange
31679
- }) {
31680
- const [isMouseOver, setIsMouseOver] = useState(false);
31681
- const handleMouseOverInput = useCallback(() => {
31682
- setIsMouseOver(true);
31683
- }, []);
31684
- const handleMouseOutInput = useCallback(() => {
31685
- setIsMouseOver(false);
31686
- }, []);
31687
- const handleChange = useCallback(e => !isDisabled && (onChange == null ? void 0 : onChange(e)), [isDisabled, onChange]);
31688
- const inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', 'h-6', 'w-6', {
31689
- 'cursor-not-allowed': isDisabled,
31690
- 'cursor-pointer': !isDisabled
31691
- });
31692
- const boxClasses = clsx$1('inline-flex', 'items-center', 'justify-center', 'h-5', 'w-5', 'bg-white', 'border', 'border-solid', 'rounded-full', focusVisible.normalPeer, {
31693
- 'border-disabled-disabled01 hover:border-disabled-disabled01': isDisabled && !isMouseOver,
31694
- 'border-hover-hoverUiBorder': !isDisabled && isMouseOver,
31695
- 'border-border-uiBorder03': !isDisabled,
31696
- 'cursor-not-allowed': isDisabled,
31697
- 'cursor-pointer': !isDisabled
31698
- });
31699
- const afterClasses = clsx$1('h-3', 'w-3', 'absolute', 'top-0', 'right-0', 'bottom-0', 'left-0', 'block', 'm-auto', 'rounded-full', {
31700
- 'bg-disabled-disabled01': isDisabled && isChecked,
31701
- 'bg-active-activeSelectedUi': !isDisabled && isChecked,
31702
- 'scale-0': !isChecked,
31703
- 'scale-100': isChecked
31704
- });
31705
- const hoverIndicatorClasses = clsx$1('w-3', 'h-3', 'inline-block', 'rounded-full', !isDisabled && !isChecked && isMouseOver && 'bg-hover-hoverUi');
31706
- const labelClasses = clsx$1('flex-[1_0_0]', 'ml-2', typography.label.label2regular, 'break-all', 'select-none', {
31707
- 'pointer-events-none cursor-not-allowed text-disabled-disabled01': isDisabled,
31708
- 'cursor-pointer text-text-text01': !isDisabled
31709
- });
31710
- return /*#__PURE__*/jsxs("div", {
31711
- className: "flex items-center",
31712
- children: [/*#__PURE__*/jsxs("div", {
31713
- className: "flex h-6 w-6 items-center justify-center",
31714
- children: [/*#__PURE__*/jsx("input", {
31715
- type: "checkbox",
31716
- value: value,
31717
- name: name,
31718
- id: id,
31719
- checked: isChecked,
31720
- disabled: isDisabled,
31721
- onChange: handleChange,
31722
- onMouseOver: handleMouseOverInput,
31723
- onMouseLeave: handleMouseOutInput,
31724
- className: inputClasses
31725
- }), /*#__PURE__*/jsx("div", {
31726
- className: boxClasses,
31727
- children: /*#__PURE__*/jsxs("div", {
31728
- className: "relative flex h-5 w-5 flex-[0_0_auto] items-center justify-center",
31729
- children: [/*#__PURE__*/jsx("span", {
31730
- className: afterClasses
31731
- }), /*#__PURE__*/jsx("span", {
31732
- className: hoverIndicatorClasses
31733
- })]
31734
- })
31735
- })]
31736
- }), /*#__PURE__*/jsx("label", {
31737
- htmlFor: id,
31738
- className: labelClasses,
31739
- children: label
31740
- })]
31741
- });
31742
- }
31743
-
31744
- const _excluded = ["width", "size"];
31745
- const Search = /*#__PURE__*/forwardRef((_ref, ref) => {
31746
- let {
31747
- width = '100%',
31748
- size = 'medium'
31749
- } = _ref,
31750
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
31751
- const classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
31752
- 'h-8 px-3': size === 'medium'
31753
- }, {
31754
- 'h-10 px-4': size === 'large'
31755
- });
31756
- const inputClasses = clsx('ml-2.5', 'mr-2.5', 'h-full', 'flex-1', 'outline-0', 'text-text-text01', 'placeholder:text-text-textPlaceholder', {
31757
- [`${typography.label.label2regular}`]: size === 'medium',
31758
- [`${typography.label.label1regular}`]: size === 'large'
31759
- });
31760
- return /*#__PURE__*/jsx("div", {
31761
- className: "relative",
31762
- ref: ref,
31763
- children: /*#__PURE__*/jsx("form", {
31764
- onSubmit: props.onSubmit,
31765
- children: /*#__PURE__*/jsxs("div", {
31766
- className: classes,
31767
- style: {
31768
- width
31769
- },
31770
- children: [/*#__PURE__*/jsx(Icon, {
31771
- name: "search",
31772
- color: "icon01",
31773
- size: "medium"
31774
- }), /*#__PURE__*/jsx("input", {
31775
- type: "text",
31776
- size: 1,
31777
- value: props.value,
31778
- className: inputClasses,
31779
- placeholder: props.placeholder,
31780
- onChange: props.onChange
31781
- }), props.onClickClearButton && props.value && props.value.length !== 0 && /*#__PURE__*/jsx(IconButton, {
31782
- variant: "text",
31783
- icon: "close",
31784
- size: size === 'medium' ? 'small' : 'medium',
31785
- isNoPadding: true,
31786
- onClick: props.onClickClearButton
31787
- })]
31788
- })
31789
- })
31790
- });
31791
- });
31792
- Search.displayName = 'Search';
31793
-
31794
31556
  const SelectContext = /*#__PURE__*/createContext({
31795
31557
  size: 'medium',
31796
31558
  setIsOptionListOpen: () => false,
@@ -31958,6 +31720,189 @@ function Select({
31958
31720
  }
31959
31721
  Select.Option = SelectItem$1;
31960
31722
 
31723
+ function PaginationSelect({
31724
+ totalSize,
31725
+ currentPage,
31726
+ sizePerPage,
31727
+ countLabel = '件',
31728
+ pageLabel = 'ページ',
31729
+ optionListMaxHeight = 190,
31730
+ onClickPrevButton,
31731
+ onClickNextButton,
31732
+ onChange
31733
+ }) {
31734
+ const pageMax = Math.ceil(totalSize / sizePerPage);
31735
+ const optionsList = [...Array(pageMax)].map((_, index) => {
31736
+ const value = (index + 1).toString();
31737
+ return {
31738
+ id: value,
31739
+ value,
31740
+ label: value
31741
+ };
31742
+ });
31743
+ return /*#__PURE__*/jsxs("nav", {
31744
+ "aria-label": "pagination",
31745
+ className: "flex items-center gap-x-1",
31746
+ children: [/*#__PURE__*/jsxs("div", {
31747
+ className: "flex items-center gap-x-2",
31748
+ children: [/*#__PURE__*/jsxs("div", {
31749
+ className: clsx$1('text-text-text01', typography.label.label2regular),
31750
+ children: [(currentPage - 1) * sizePerPage + 1, " -", ' ', currentPage * sizePerPage > totalSize ? totalSize : currentPage * sizePerPage, countLabel]
31751
+ }), /*#__PURE__*/jsx(Select, {
31752
+ size: "medium",
31753
+ variant: "outline",
31754
+ selectedOption: optionsList.find(option => option.value === currentPage.toString()),
31755
+ optionListMaxHeight: optionListMaxHeight,
31756
+ onChange: option => option && onChange(Number(option.value)),
31757
+ children: optionsList && optionsList.map(option => /*#__PURE__*/jsx(Select.Option, {
31758
+ option: option
31759
+ }, option.id))
31760
+ }), /*#__PURE__*/jsxs("div", {
31761
+ className: clsx$1('text-text-text03', typography.label.label2regular),
31762
+ children: ["/ ", pageMax, pageLabel]
31763
+ })]
31764
+ }), /*#__PURE__*/jsxs("div", {
31765
+ className: "flex items-center",
31766
+ children: [/*#__PURE__*/jsx(IconButton, {
31767
+ variant: "text",
31768
+ icon: "angle-left",
31769
+ size: "small",
31770
+ isDisabled: currentPage === 1,
31771
+ onClick: onClickPrevButton
31772
+ }), /*#__PURE__*/jsx(IconButton, {
31773
+ variant: "text",
31774
+ icon: "angle-right",
31775
+ size: "small",
31776
+ isDisabled: currentPage === pageMax,
31777
+ onClick: onClickNextButton
31778
+ })]
31779
+ })]
31780
+ });
31781
+ }
31782
+
31783
+ function Radio({
31784
+ name,
31785
+ value,
31786
+ id,
31787
+ label,
31788
+ isChecked = false,
31789
+ isDisabled = false,
31790
+ onChange
31791
+ }) {
31792
+ const [isMouseOver, setIsMouseOver] = useState(false);
31793
+ const handleMouseOverInput = useCallback(() => {
31794
+ setIsMouseOver(true);
31795
+ }, []);
31796
+ const handleMouseOutInput = useCallback(() => {
31797
+ setIsMouseOver(false);
31798
+ }, []);
31799
+ const handleChange = useCallback(e => !isDisabled && (onChange == null ? void 0 : onChange(e)), [isDisabled, onChange]);
31800
+ const inputClasses = clsx$1('absolute', 'z-[1]', 'opacity-0', 'peer', 'h-6', 'w-6', {
31801
+ 'cursor-not-allowed': isDisabled,
31802
+ 'cursor-pointer': !isDisabled
31803
+ });
31804
+ const boxClasses = clsx$1('inline-flex', 'items-center', 'justify-center', 'h-5', 'w-5', 'bg-white', 'border', 'border-solid', 'rounded-full', focusVisible.normalPeer, {
31805
+ 'border-disabled-disabled01 hover:border-disabled-disabled01': isDisabled && !isMouseOver,
31806
+ 'border-hover-hoverUiBorder': !isDisabled && isMouseOver,
31807
+ 'border-border-uiBorder03': !isDisabled,
31808
+ 'cursor-not-allowed': isDisabled,
31809
+ 'cursor-pointer': !isDisabled
31810
+ });
31811
+ const afterClasses = clsx$1('h-3', 'w-3', 'absolute', 'top-0', 'right-0', 'bottom-0', 'left-0', 'block', 'm-auto', 'rounded-full', {
31812
+ 'bg-disabled-disabled01': isDisabled && isChecked,
31813
+ 'bg-active-activeSelectedUi': !isDisabled && isChecked,
31814
+ 'scale-0': !isChecked,
31815
+ 'scale-100': isChecked
31816
+ });
31817
+ const hoverIndicatorClasses = clsx$1('w-3', 'h-3', 'inline-block', 'rounded-full', !isDisabled && !isChecked && isMouseOver && 'bg-hover-hoverUi');
31818
+ const labelClasses = clsx$1('flex-[1_0_0]', 'ml-2', typography.label.label2regular, 'break-all', 'select-none', {
31819
+ 'pointer-events-none cursor-not-allowed text-disabled-disabled01': isDisabled,
31820
+ 'cursor-pointer text-text-text01': !isDisabled
31821
+ });
31822
+ return /*#__PURE__*/jsxs("div", {
31823
+ className: "flex items-center",
31824
+ children: [/*#__PURE__*/jsxs("div", {
31825
+ className: "flex h-6 w-6 items-center justify-center",
31826
+ children: [/*#__PURE__*/jsx("input", {
31827
+ type: "checkbox",
31828
+ value: value,
31829
+ name: name,
31830
+ id: id,
31831
+ checked: isChecked,
31832
+ disabled: isDisabled,
31833
+ onChange: handleChange,
31834
+ onMouseOver: handleMouseOverInput,
31835
+ onMouseLeave: handleMouseOutInput,
31836
+ className: inputClasses
31837
+ }), /*#__PURE__*/jsx("div", {
31838
+ className: boxClasses,
31839
+ children: /*#__PURE__*/jsxs("div", {
31840
+ className: "relative flex h-5 w-5 flex-[0_0_auto] items-center justify-center",
31841
+ children: [/*#__PURE__*/jsx("span", {
31842
+ className: afterClasses
31843
+ }), /*#__PURE__*/jsx("span", {
31844
+ className: hoverIndicatorClasses
31845
+ })]
31846
+ })
31847
+ })]
31848
+ }), /*#__PURE__*/jsx("label", {
31849
+ htmlFor: id,
31850
+ className: labelClasses,
31851
+ children: label
31852
+ })]
31853
+ });
31854
+ }
31855
+
31856
+ const _excluded = ["width", "size"];
31857
+ const Search = /*#__PURE__*/forwardRef((_ref, ref) => {
31858
+ let {
31859
+ width = '100%',
31860
+ size = 'medium'
31861
+ } = _ref,
31862
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
31863
+ const classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
31864
+ 'h-8 px-3': size === 'medium'
31865
+ }, {
31866
+ 'h-10 px-4': size === 'large'
31867
+ });
31868
+ const inputClasses = clsx('ml-2.5', 'mr-2.5', 'h-full', 'flex-1', 'outline-0', 'text-text-text01', 'placeholder:text-text-textPlaceholder', {
31869
+ [`${typography.label.label2regular}`]: size === 'medium',
31870
+ [`${typography.label.label1regular}`]: size === 'large'
31871
+ });
31872
+ return /*#__PURE__*/jsx("div", {
31873
+ className: "relative",
31874
+ ref: ref,
31875
+ children: /*#__PURE__*/jsx("form", {
31876
+ onSubmit: props.onSubmit,
31877
+ children: /*#__PURE__*/jsxs("div", {
31878
+ className: classes,
31879
+ style: {
31880
+ width
31881
+ },
31882
+ children: [/*#__PURE__*/jsx(Icon, {
31883
+ name: "search",
31884
+ color: "icon01",
31885
+ size: "medium"
31886
+ }), /*#__PURE__*/jsx("input", {
31887
+ type: "text",
31888
+ size: 1,
31889
+ value: props.value,
31890
+ className: inputClasses,
31891
+ placeholder: props.placeholder,
31892
+ onChange: props.onChange
31893
+ }), props.onClickClearButton && props.value && props.value.length !== 0 && /*#__PURE__*/jsx(IconButton, {
31894
+ variant: "text",
31895
+ icon: "close",
31896
+ size: size === 'medium' ? 'small' : 'medium',
31897
+ isNoPadding: true,
31898
+ onClick: props.onClickClearButton
31899
+ })]
31900
+ })
31901
+ })
31902
+ });
31903
+ });
31904
+ Search.displayName = 'Search';
31905
+
31961
31906
  function SelectItem({
31962
31907
  children,
31963
31908
  isSortKey,
@@ -32085,6 +32030,36 @@ function SelectSort({
32085
32030
  });
32086
32031
  }
32087
32032
 
32033
+ const TabItem = props => {
32034
+ 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', {
32035
+ [`${typography.label.label2regular}`]: !props.isSelected,
32036
+ ['text-interactive-interactive02 hover:before:bg-border-uiBorder02Dark']: !props.isSelected,
32037
+ [`${typography.label.label2bold}`]: props.isSelected,
32038
+ ['before:bg-interactive-interactive01 hover:before:bg-interactive-interactive01 pointer-events-none']: props.isSelected
32039
+ });
32040
+ return /*#__PURE__*/jsx("button", {
32041
+ type: "button",
32042
+ role: "tab",
32043
+ "aria-selected": props.isSelected,
32044
+ className: classes,
32045
+ disabled: props.isDisabled,
32046
+ onClick: () => props.onClick(props.id),
32047
+ children: props.children
32048
+ });
32049
+ };
32050
+
32051
+ function Tab({
32052
+ children
32053
+ }) {
32054
+ 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', {});
32055
+ return /*#__PURE__*/jsx("div", {
32056
+ role: "tablist",
32057
+ className: classes,
32058
+ children: children
32059
+ });
32060
+ }
32061
+ Tab.Item = TabItem;
32062
+
32088
32063
  function TableCell({
32089
32064
  children,
32090
32065
  className
@@ -32439,5 +32414,5 @@ function Tooltip({
32439
32414
  });
32440
32415
  }
32441
32416
 
32442
- 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 };
32417
+ 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 };
32443
32418
  //# sourceMappingURL=index.js.map