@zenkigen-inc/component-ui 1.1.3 → 1.3.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/button/button.d.ts +2 -3
- package/dist/dropdown/dropdown-item.d.ts +2 -3
- package/dist/dropdown/dropdown-menu.d.ts +2 -3
- package/dist/dropdown/dropdown.d.ts +2 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +117 -149
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +126 -152
- package/dist/index.js.map +1 -1
- package/dist/modal/modal-body.d.ts +2 -0
- package/dist/modal/modal-context.d.ts +0 -1
- package/dist/modal/modal-footer.d.ts +6 -0
- package/dist/modal/modal-header.d.ts +2 -3
- package/dist/modal/modal.d.ts +7 -11
- package/dist/select/select-list.d.ts +2 -3
- package/dist/select/select.d.ts +2 -3
- package/dist/select-sort/select-item.d.ts +2 -3
- package/dist/table/index.d.ts +1 -1
- package/dist/text-input/index.d.ts +1 -0
- package/dist/text-input/text-input.d.ts +9 -0
- package/dist/tooltip/tooltip.d.ts +2 -3
- package/package.json +3 -3
- package/dist/modal/modal-button-tab.d.ts +0 -25
- package/dist/modal/modal-tab.d.ts +0 -11
package/dist/button/button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
type Size = 'small' | 'medium' | 'large';
|
|
3
3
|
type Variant = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
4
4
|
type Props = {
|
|
@@ -8,7 +8,6 @@ type Props = {
|
|
|
8
8
|
variant?: Variant;
|
|
9
9
|
before?: ReactNode;
|
|
10
10
|
after?: ReactNode;
|
|
11
|
-
children: ReactNode;
|
|
12
11
|
} & ({
|
|
13
12
|
isAnchor: true;
|
|
14
13
|
href: string;
|
|
@@ -17,5 +16,5 @@ type Props = {
|
|
|
17
16
|
isAnchor?: false;
|
|
18
17
|
onClick?: () => void;
|
|
19
18
|
});
|
|
20
|
-
export declare function Button({ size, variant, ...props }: Props): import("react").JSX.Element;
|
|
19
|
+
export declare function Button({ size, variant, ...props }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
21
20
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { MouseEvent,
|
|
1
|
+
import { MouseEvent, PropsWithChildren } from 'react';
|
|
2
2
|
type Props = {
|
|
3
|
-
children: ReactNode;
|
|
4
3
|
color?: 'gray' | 'red';
|
|
5
4
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
6
5
|
};
|
|
7
|
-
export declare function DropdownItem({ children, color, onClick }: Props): import("react").JSX.Element;
|
|
6
|
+
export declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { CSSProperties,
|
|
1
|
+
import { CSSProperties, PropsWithChildren } from 'react';
|
|
2
2
|
import { DropdownHorizontalAlign, DropdownVerticalPosition } from './type';
|
|
3
3
|
type Props = {
|
|
4
|
-
children: ReactNode;
|
|
5
4
|
maxHeight?: CSSProperties['height'];
|
|
6
5
|
isNoPadding?: boolean;
|
|
7
6
|
verticalPosition?: DropdownVerticalPosition;
|
|
8
7
|
horizontalAlign?: DropdownHorizontalAlign;
|
|
9
8
|
};
|
|
10
|
-
export declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: Props): false | import("react").JSX.Element;
|
|
9
|
+
export declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props>): false | import("react").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
1
|
import { IconName } from '@zenkigen-inc/component-icons';
|
|
2
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
3
3
|
import { DropdownItem } from './dropdown-item';
|
|
4
4
|
import { DropdownMenu } from './dropdown-menu';
|
|
5
5
|
type Props = {
|
|
@@ -8,7 +8,6 @@ type Props = {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
isArrowHidden?: boolean;
|
|
11
|
-
children: ReactNode;
|
|
12
11
|
} & ({
|
|
13
12
|
target: ReactElement;
|
|
14
13
|
label?: never;
|
|
@@ -18,7 +17,7 @@ type Props = {
|
|
|
18
17
|
label: string;
|
|
19
18
|
icon?: IconName;
|
|
20
19
|
});
|
|
21
|
-
export declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, }: Props): import("react").JSX.Element;
|
|
20
|
+
export declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
22
21
|
export declare namespace Dropdown {
|
|
23
22
|
var Menu: typeof DropdownMenu;
|
|
24
23
|
var Item: typeof DropdownItem;
|
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -4,6 +4,20 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
4
4
|
import aa, { useState, useCallback, useEffect, createContext, useContext, useRef, forwardRef } from 'react';
|
|
5
5
|
import { iconElements } from '@zenkigen-inc/component-icons';
|
|
6
6
|
|
|
7
|
+
function _extends() {
|
|
8
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
9
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
10
|
+
var source = arguments[i];
|
|
11
|
+
for (var key in source) {
|
|
12
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
13
|
+
target[key] = source[key];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
return _extends.apply(this, arguments);
|
|
20
|
+
}
|
|
7
21
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
8
22
|
if (source == null) return {};
|
|
9
23
|
var target = {};
|
|
@@ -17,7 +31,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
17
31
|
return target;
|
|
18
32
|
}
|
|
19
33
|
|
|
20
|
-
var _excluded$
|
|
34
|
+
var _excluded$6 = ["size"];
|
|
21
35
|
var isAsciiString = function isAsciiString(str) {
|
|
22
36
|
return str.charCodeAt(0) < 256;
|
|
23
37
|
};
|
|
@@ -25,7 +39,7 @@ function Avatar(_ref) {
|
|
|
25
39
|
var _clsx;
|
|
26
40
|
var _ref$size = _ref.size,
|
|
27
41
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
28
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
42
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
29
43
|
var classes = clsx('text-text-textOnColor', 'rounded-full', 'flex items-center justify-center', props.isDisabled ? 'bg-disabled-disabled01' : props.userId ? userColors[props.userId % userColors.length] : 'bg-icon-icon01', (_clsx = {}, _clsx["w-16 h-16 " + typography.label.label1regular] = size === 'x-large', _clsx["w-12 h-12 " + typography.label.label2regular] = size === 'large', _clsx["w-10 h-10 " + typography.label.label2regular] = size === 'medium', _clsx["w-8 h-8 " + typography.label.label4regular] = size === 'small', _clsx["w-6 h-6 " + typography.label.label4regular] = size === 'x-small', _clsx));
|
|
30
44
|
var trimmedFirstName = props.firstName.trim();
|
|
31
45
|
var trimmedLastName = props.lastName.trim();
|
|
@@ -56,13 +70,13 @@ function Breadcrumb(_ref) {
|
|
|
56
70
|
}
|
|
57
71
|
Breadcrumb.Item = BreadcrumbItem;
|
|
58
72
|
|
|
59
|
-
var _excluded$
|
|
73
|
+
var _excluded$5 = ["size", "variant"];
|
|
60
74
|
function Button(_ref) {
|
|
61
75
|
var _ref$size = _ref.size,
|
|
62
76
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
63
77
|
_ref$variant = _ref.variant,
|
|
64
78
|
variant = _ref$variant === void 0 ? 'fill' : _ref$variant,
|
|
65
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
79
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
66
80
|
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
81
|
'h-6 px-2.5': size === 'small'
|
|
68
82
|
}, {
|
|
@@ -215,12 +229,12 @@ var useOutsideClick = function useOutsideClick(ref, handler, enabled) {
|
|
|
215
229
|
}, [ref, enabled, handler]);
|
|
216
230
|
};
|
|
217
231
|
|
|
218
|
-
var _excluded$
|
|
232
|
+
var _excluded$4 = ["size"];
|
|
219
233
|
var Icon = function Icon(_ref) {
|
|
220
234
|
var _ref2;
|
|
221
235
|
var _ref$size = _ref.size,
|
|
222
236
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
223
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
237
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
224
238
|
return /*#__PURE__*/jsx("span", {
|
|
225
239
|
className: clsx('inline-block', 'shrink-0', props.isDisabled ? 'fill-disabled-disabled01' : (_ref2 = {}, _ref2[iconColors.icon01] = props.color === 'icon01', _ref2[iconColors.icon01Dark] = props.color === 'icon01Dark', _ref2[iconColors.icon02] = props.color === 'icon02', _ref2[iconColors.icon02Dark] = props.color === 'icon02Dark', _ref2[iconColors.icon03] = props.color === 'icon03', _ref2[iconColors.icon03Dark] = props.color === 'icon03Dark', _ref2[iconColors.iconOnColor] = props.color === 'iconOnColor', _ref2), {
|
|
226
240
|
'w-3 h-3': size === 'x-small',
|
|
@@ -459,13 +473,13 @@ function Heading(props) {
|
|
|
459
473
|
});
|
|
460
474
|
}
|
|
461
475
|
|
|
462
|
-
var _excluded$
|
|
476
|
+
var _excluded$3 = ["size", "variant"];
|
|
463
477
|
function IconButton(_ref) {
|
|
464
478
|
var _ref$size = _ref.size,
|
|
465
479
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
466
480
|
_ref$variant = _ref.variant,
|
|
467
481
|
variant = _ref$variant === void 0 ? 'outline' : _ref$variant,
|
|
468
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
482
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
469
483
|
var baseClasses = clsx('rounded', 'flex', 'gap-1', 'items-center', 'justify-center', buttonColors[variant].base, buttonColors[variant].hover, buttonColors[variant].active, buttonColors[variant].disabled, focusVisible.normal, typography.label.label1regular, {
|
|
470
484
|
'h-6 w-6': size === 'small' && !props.isNoPadding
|
|
471
485
|
}, {
|
|
@@ -31428,85 +31442,29 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
31428
31442
|
}
|
|
31429
31443
|
});
|
|
31430
31444
|
|
|
31445
|
+
function ModalBody(_ref) {
|
|
31446
|
+
var children = _ref.children;
|
|
31447
|
+
return /*#__PURE__*/jsx("div", {
|
|
31448
|
+
className: "overflow-y-auto",
|
|
31449
|
+
children: children
|
|
31450
|
+
});
|
|
31451
|
+
}
|
|
31452
|
+
|
|
31431
31453
|
var ModalContext = /*#__PURE__*/createContext({
|
|
31432
|
-
width: 480,
|
|
31433
31454
|
setIsOpen: function setIsOpen() {
|
|
31434
31455
|
return false;
|
|
31435
31456
|
}
|
|
31436
31457
|
});
|
|
31437
31458
|
|
|
31438
|
-
|
|
31439
|
-
|
|
31440
|
-
|
|
31441
|
-
secondaryButtonLabel = _ref.secondaryButtonLabel,
|
|
31442
|
-
onClickPrimaryButton = _ref.onClickPrimaryButton,
|
|
31443
|
-
onClickSecondaryButton = _ref.onClickSecondaryButton,
|
|
31444
|
-
isDanger = _ref.isDanger,
|
|
31445
|
-
isNoBorder = _ref.isNoBorder,
|
|
31446
|
-
isWithCheckbox = _ref.isWithCheckbox,
|
|
31447
|
-
checkboxLabel = _ref.checkboxLabel,
|
|
31448
|
-
isChecked = _ref.isChecked,
|
|
31449
|
-
onChange = _ref.onChange,
|
|
31450
|
-
subButtonLabel = _ref.subButtonLabel,
|
|
31451
|
-
onClickSubButton = _ref.onClickSubButton;
|
|
31452
|
-
var _useContext = useContext(ModalContext),
|
|
31453
|
-
width = _useContext.width,
|
|
31454
|
-
setIsOpen = _useContext.setIsOpen;
|
|
31455
|
-
var handleClickPrimaryButton = useCallback(function () {
|
|
31456
|
-
onClickPrimaryButton();
|
|
31457
|
-
setIsOpen(false);
|
|
31458
|
-
}, [onClickPrimaryButton, setIsOpen]);
|
|
31459
|
-
var handleClickSecondaryButton = useCallback(function () {
|
|
31460
|
-
onClickSecondaryButton();
|
|
31461
|
-
setIsOpen(false);
|
|
31462
|
-
}, [onClickSecondaryButton, setIsOpen]);
|
|
31463
|
-
var handleClickSubButton = useCallback(function () {
|
|
31464
|
-
onClickSubButton == null || onClickSubButton();
|
|
31465
|
-
}, [onClickSubButton]);
|
|
31459
|
+
function ModalFooter(_ref) {
|
|
31460
|
+
var children = _ref.children,
|
|
31461
|
+
isNoBorder = _ref.isNoBorder;
|
|
31466
31462
|
var wrapperClasses = clsx$1('flex', 'shrink-0', 'items-center', 'w-full', 'rounded-b-lg', 'py-4', 'px-6', {
|
|
31467
|
-
'
|
|
31468
|
-
'justify-end': !isWithCheckbox || !subButtonLabel,
|
|
31469
|
-
'justify-center': subButtonLabel && width < sizeSmallLimit,
|
|
31470
|
-
'border-t-[1px] border-border-uiBorder01': !isNoBorder,
|
|
31471
|
-
'gap-y-4': width < sizeSmallLimit,
|
|
31472
|
-
'flex-wrap': width < sizeSmallLimit && isWithCheckbox,
|
|
31473
|
-
'flex-wrap-reverse': width < sizeSmallLimit && subButtonLabel
|
|
31463
|
+
'border-t-[1px] border-border-uiBorder01': !isNoBorder
|
|
31474
31464
|
});
|
|
31475
|
-
|
|
31476
|
-
'w-full justify-center': width < sizeSmallLimit,
|
|
31477
|
-
'gap-x-2': width < sizeSmallLimit,
|
|
31478
|
-
'gap-x-4': sizeSmallLimit <= width
|
|
31479
|
-
});
|
|
31480
|
-
return /*#__PURE__*/jsxs("div", {
|
|
31465
|
+
return /*#__PURE__*/jsx("div", {
|
|
31481
31466
|
className: wrapperClasses,
|
|
31482
|
-
children:
|
|
31483
|
-
children: /*#__PURE__*/jsx(Checkbox, {
|
|
31484
|
-
id: "modal-checkbox",
|
|
31485
|
-
label: checkboxLabel,
|
|
31486
|
-
isChecked: isChecked,
|
|
31487
|
-
onChange: onChange
|
|
31488
|
-
})
|
|
31489
|
-
}) : subButtonLabel && onClickSubButton ? /*#__PURE__*/jsx(Button, {
|
|
31490
|
-
variant: "text",
|
|
31491
|
-
size: "large",
|
|
31492
|
-
onClick: handleClickSubButton,
|
|
31493
|
-
children: subButtonLabel
|
|
31494
|
-
}, "0") : null, /*#__PURE__*/jsxs("div", {
|
|
31495
|
-
className: buttonContainerClasses,
|
|
31496
|
-
children: [/*#__PURE__*/jsx(Button, {
|
|
31497
|
-
variant: "outline",
|
|
31498
|
-
size: "large",
|
|
31499
|
-
width: width < sizeSmallLimit ? 132 : 'auto',
|
|
31500
|
-
onClick: handleClickSecondaryButton,
|
|
31501
|
-
children: secondaryButtonLabel
|
|
31502
|
-
}, "1"), /*#__PURE__*/jsx(Button, {
|
|
31503
|
-
variant: isDanger ? 'fillDanger' : 'fill',
|
|
31504
|
-
size: "large",
|
|
31505
|
-
width: width < sizeSmallLimit ? 132 : 'auto',
|
|
31506
|
-
onClick: handleClickPrimaryButton,
|
|
31507
|
-
children: primaryButtonLabel
|
|
31508
|
-
}, "2")]
|
|
31509
|
-
})]
|
|
31467
|
+
children: children
|
|
31510
31468
|
});
|
|
31511
31469
|
}
|
|
31512
31470
|
|
|
@@ -31523,7 +31481,9 @@ function ModalHeader(_ref) {
|
|
|
31523
31481
|
});
|
|
31524
31482
|
return /*#__PURE__*/jsxs("div", {
|
|
31525
31483
|
className: headerClasses,
|
|
31526
|
-
children: [
|
|
31484
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
31485
|
+
children: children
|
|
31486
|
+
}), !isNoCloseButton && /*#__PURE__*/jsx(IconButton, {
|
|
31527
31487
|
icon: "close",
|
|
31528
31488
|
size: "small",
|
|
31529
31489
|
variant: "text",
|
|
@@ -31534,52 +31494,8 @@ function ModalHeader(_ref) {
|
|
|
31534
31494
|
});
|
|
31535
31495
|
}
|
|
31536
31496
|
|
|
31537
|
-
var
|
|
31538
|
-
|
|
31539
|
-
var 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', (_clsx = {}, _clsx["" + typography.label.label2regular] = !props.isSelected, _clsx['text-interactive-interactive02 hover:before:bg-border-uiBorder02Dark'] = !props.isSelected, _clsx["" + typography.label.label2bold] = props.isSelected, _clsx['before:bg-interactive-interactive01 hover:before:bg-interactive-interactive01 pointer-events-none'] = props.isSelected, _clsx));
|
|
31540
|
-
return /*#__PURE__*/jsx("button", {
|
|
31541
|
-
type: "button",
|
|
31542
|
-
role: "tab",
|
|
31543
|
-
"aria-selected": props.isSelected,
|
|
31544
|
-
className: classes,
|
|
31545
|
-
disabled: props.isDisabled,
|
|
31546
|
-
onClick: function onClick() {
|
|
31547
|
-
return props.onClick(props.id);
|
|
31548
|
-
},
|
|
31549
|
-
children: props.children
|
|
31550
|
-
});
|
|
31551
|
-
};
|
|
31552
|
-
|
|
31553
|
-
function Tab(_ref) {
|
|
31554
|
-
var children = _ref.children;
|
|
31555
|
-
var 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', {});
|
|
31556
|
-
return /*#__PURE__*/jsx("div", {
|
|
31557
|
-
role: "tablist",
|
|
31558
|
-
className: classes,
|
|
31559
|
-
children: children
|
|
31560
|
-
});
|
|
31561
|
-
}
|
|
31562
|
-
Tab.Item = TabItem;
|
|
31563
|
-
|
|
31564
|
-
function ModalTab(_ref) {
|
|
31565
|
-
var tabItems = _ref.tabItems,
|
|
31566
|
-
selectedTab = _ref.selectedTab,
|
|
31567
|
-
setSelectedTab = _ref.setSelectedTab;
|
|
31568
|
-
return /*#__PURE__*/jsx("div", {
|
|
31569
|
-
className: "mt-2 w-full",
|
|
31570
|
-
children: /*#__PURE__*/jsx(Tab, {
|
|
31571
|
-
children: tabItems.map(function (item) {
|
|
31572
|
-
return /*#__PURE__*/jsx(TabItem, {
|
|
31573
|
-
id: item.id,
|
|
31574
|
-
isSelected: selectedTab === item.id,
|
|
31575
|
-
onClick: setSelectedTab,
|
|
31576
|
-
children: item.label
|
|
31577
|
-
}, item.id);
|
|
31578
|
-
})
|
|
31579
|
-
})
|
|
31580
|
-
});
|
|
31581
|
-
}
|
|
31582
|
-
|
|
31497
|
+
var LIMIT_WIDTH = 320;
|
|
31498
|
+
var LIMIT_HEIGHT = 184;
|
|
31583
31499
|
function Modal(_ref) {
|
|
31584
31500
|
var children = _ref.children,
|
|
31585
31501
|
_ref$width = _ref.width,
|
|
@@ -31587,45 +31503,37 @@ function Modal(_ref) {
|
|
|
31587
31503
|
height = _ref.height,
|
|
31588
31504
|
isOpen = _ref.isOpen,
|
|
31589
31505
|
setIsOpen = _ref.setIsOpen,
|
|
31590
|
-
portalTargetRef = _ref.portalTargetRef
|
|
31591
|
-
|
|
31592
|
-
|
|
31593
|
-
buttonTabElement = _ref.buttonTabElement;
|
|
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';
|
|
31506
|
+
portalTargetRef = _ref.portalTargetRef;
|
|
31507
|
+
var renderWidth = typeof width === 'number' ? Math.max(width, LIMIT_WIDTH) : width;
|
|
31508
|
+
var renderHeight = typeof height === 'number' ? Math.max(height, LIMIT_HEIGHT) : height;
|
|
31597
31509
|
return /*#__PURE__*/reactDom.createPortal(isOpen && /*#__PURE__*/jsx(ModalContext.Provider, {
|
|
31598
31510
|
value: {
|
|
31599
|
-
width: width,
|
|
31600
31511
|
setIsOpen: setIsOpen
|
|
31601
31512
|
},
|
|
31602
31513
|
children: /*#__PURE__*/jsx("div", {
|
|
31603
|
-
className:
|
|
31604
|
-
children: /*#__PURE__*/
|
|
31605
|
-
className:
|
|
31514
|
+
className: "fixed left-0 top-0 z-overlay flex h-full w-full items-center justify-center bg-background-backgroundOverlayBlack",
|
|
31515
|
+
children: /*#__PURE__*/jsx("div", {
|
|
31516
|
+
className: "flex shrink-0 flex-col rounded-lg bg-background-uiBackground01 shadow-modalShadow",
|
|
31606
31517
|
style: {
|
|
31607
|
-
width:
|
|
31608
|
-
height:
|
|
31518
|
+
width: renderWidth,
|
|
31519
|
+
height: renderHeight
|
|
31609
31520
|
},
|
|
31610
|
-
children:
|
|
31611
|
-
className: contentClasses,
|
|
31612
|
-
children: children
|
|
31613
|
-
}), buttonTabElement]
|
|
31521
|
+
children: children
|
|
31614
31522
|
})
|
|
31615
31523
|
})
|
|
31616
31524
|
}), !portalTargetRef || (portalTargetRef == null ? void 0 : portalTargetRef.current) === null ? document.body : portalTargetRef.current);
|
|
31617
31525
|
}
|
|
31526
|
+
Modal.Body = ModalBody;
|
|
31618
31527
|
Modal.Header = ModalHeader;
|
|
31619
|
-
Modal.
|
|
31620
|
-
Modal.ButtonTab = ModalButtonTab;
|
|
31528
|
+
Modal.Footer = ModalFooter;
|
|
31621
31529
|
|
|
31622
|
-
var _excluded$
|
|
31530
|
+
var _excluded$2 = ["state", "size"];
|
|
31623
31531
|
function NotificationInline(_ref) {
|
|
31624
31532
|
var _ref$state = _ref.state,
|
|
31625
31533
|
state = _ref$state === void 0 ? 'default' : _ref$state,
|
|
31626
31534
|
_ref$size = _ref.size,
|
|
31627
31535
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
31628
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
31536
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
31629
31537
|
var wrapperClasses = clsx('rounded', 'text-text-text01', 'flex', 'gap-1', 'items-center', typography.body.body2regular, {
|
|
31630
31538
|
'bg-background-uiBackgroundError': state === 'attention',
|
|
31631
31539
|
'bg-background-uiBackgroundWarning': state === 'warning',
|
|
@@ -31997,14 +31905,14 @@ function Radio(_ref) {
|
|
|
31997
31905
|
});
|
|
31998
31906
|
}
|
|
31999
31907
|
|
|
32000
|
-
var _excluded = ["width", "size"];
|
|
31908
|
+
var _excluded$1 = ["width", "size"];
|
|
32001
31909
|
var Search = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
32002
31910
|
var _clsx;
|
|
32003
31911
|
var _ref$width = _ref.width,
|
|
32004
31912
|
width = _ref$width === void 0 ? '100%' : _ref$width,
|
|
32005
31913
|
_ref$size = _ref.size,
|
|
32006
31914
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
32007
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31915
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
32008
31916
|
var classes = clsx('flex', 'items-center', 'rounded-full', 'border', 'border-border-uiBorder02', 'focus-within:border-active-activeInput', {
|
|
32009
31917
|
'h-8 px-3': size === 'medium'
|
|
32010
31918
|
}, {
|
|
@@ -32184,6 +32092,33 @@ function SelectSort(_ref) {
|
|
|
32184
32092
|
});
|
|
32185
32093
|
}
|
|
32186
32094
|
|
|
32095
|
+
var TabItem = function TabItem(props) {
|
|
32096
|
+
var _clsx;
|
|
32097
|
+
var 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', (_clsx = {}, _clsx["" + typography.label.label2regular] = !props.isSelected, _clsx['text-interactive-interactive02 hover:before:bg-border-uiBorder02Dark'] = !props.isSelected, _clsx["" + typography.label.label2bold] = props.isSelected, _clsx['before:bg-interactive-interactive01 hover:before:bg-interactive-interactive01 pointer-events-none'] = props.isSelected, _clsx));
|
|
32098
|
+
return /*#__PURE__*/jsx("button", {
|
|
32099
|
+
type: "button",
|
|
32100
|
+
role: "tab",
|
|
32101
|
+
"aria-selected": props.isSelected,
|
|
32102
|
+
className: classes,
|
|
32103
|
+
disabled: props.isDisabled,
|
|
32104
|
+
onClick: function onClick() {
|
|
32105
|
+
return props.onClick(props.id);
|
|
32106
|
+
},
|
|
32107
|
+
children: props.children
|
|
32108
|
+
});
|
|
32109
|
+
};
|
|
32110
|
+
|
|
32111
|
+
function Tab(_ref) {
|
|
32112
|
+
var children = _ref.children;
|
|
32113
|
+
var 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', {});
|
|
32114
|
+
return /*#__PURE__*/jsx("div", {
|
|
32115
|
+
role: "tablist",
|
|
32116
|
+
className: classes,
|
|
32117
|
+
children: children
|
|
32118
|
+
});
|
|
32119
|
+
}
|
|
32120
|
+
Tab.Item = TabItem;
|
|
32121
|
+
|
|
32187
32122
|
function TableCell(_ref) {
|
|
32188
32123
|
var children = _ref.children,
|
|
32189
32124
|
className = _ref.className;
|
|
@@ -32272,6 +32207,39 @@ function Tag(_ref) {
|
|
|
32272
32207
|
});
|
|
32273
32208
|
}
|
|
32274
32209
|
|
|
32210
|
+
var _excluded = ["size"];
|
|
32211
|
+
var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
32212
|
+
var _clsx;
|
|
32213
|
+
var _ref$size = _ref.size,
|
|
32214
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
32215
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
32216
|
+
var inputWrapClasses = clsx('flex items-center gap-2 overflow-hidden rounded border pl-2 pr-3', {
|
|
32217
|
+
'border-border-uiBorder01': !props.isError,
|
|
32218
|
+
'border-support-supportError': props.isError && !props.disabled,
|
|
32219
|
+
'hover:border-hover-hoverInput': !props.disabled && !props.isError,
|
|
32220
|
+
'hover:focus-within:border-active-activeInput': !props.isError,
|
|
32221
|
+
'focus-within:border-active-activeInput': !props.isError,
|
|
32222
|
+
'bg-disabled-disabled02 border-disabled-disabled02': props.disabled
|
|
32223
|
+
});
|
|
32224
|
+
var inputClasses = clsx('flex-1 outline-0 placeholder:text-text-textPlaceholder disabled:text-text-text03', (_clsx = {}, _clsx[typography.label.label2regular + " pt-1.5 pb-2"] = size === 'medium', _clsx[typography.label.label1regular + " py-2.5"] = size === 'large', _clsx['text-text-text01'] = !props.isError, _clsx['text-support-supportError'] = props.isError, _clsx));
|
|
32225
|
+
return /*#__PURE__*/jsxs("div", {
|
|
32226
|
+
className: inputWrapClasses,
|
|
32227
|
+
children: [/*#__PURE__*/jsx("input", _extends({
|
|
32228
|
+
ref: ref,
|
|
32229
|
+
size: 1,
|
|
32230
|
+
className: inputClasses,
|
|
32231
|
+
onChange: props.onChange
|
|
32232
|
+
}, props)), props.onClickClearButton && props.value && props.value.length !== 0 && !props.disabled && /*#__PURE__*/jsx(IconButton, {
|
|
32233
|
+
variant: "text",
|
|
32234
|
+
icon: "close",
|
|
32235
|
+
size: "small",
|
|
32236
|
+
isNoPadding: true,
|
|
32237
|
+
onClick: props.onClickClearButton
|
|
32238
|
+
})]
|
|
32239
|
+
});
|
|
32240
|
+
});
|
|
32241
|
+
TextInput.displayName = 'TextInput';
|
|
32242
|
+
|
|
32275
32243
|
var CLOSE_TIME_MSEC = 5000;
|
|
32276
32244
|
function Toast(_ref) {
|
|
32277
32245
|
var _clsx;
|
|
@@ -32549,5 +32517,5 @@ function Tooltip(_ref) {
|
|
|
32549
32517
|
});
|
|
32550
32518
|
}
|
|
32551
32519
|
|
|
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 };
|
|
32520
|
+
export { Avatar, Breadcrumb, Button, Checkbox, Dropdown, EvaluationStar, Heading, Icon, IconButton, Loading, Modal, NotificationInline, PaginationSelect, Radio, Search, Select, SelectSort, Tab, TabItem, Table, TableCell, TableRow, Tag, TextInput, Toast, ToastProvider, Toggle, Tooltip, useToast };
|
|
32553
32521
|
//# sourceMappingURL=index.esm.js.map
|