@scglab/admin-ui 0.1.4 → 0.1.6
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 +100 -0
- package/dist/index.cjs +52 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +57 -30
- package/dist/index.d.ts +57 -30
- package/dist/index.js +52 -30
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +55 -40
- package/package.json +20 -8
package/dist/index.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ declare const alignSelfs: {
|
|
|
109
109
|
readonly end: "self-end";
|
|
110
110
|
readonly stretch: "self-stretch";
|
|
111
111
|
};
|
|
112
|
-
type ButtonVariantType =
|
|
112
|
+
type ButtonVariantType = 'primary' | 'secondary' | 'lower' | 'neutral' | 'neutralGray' | 'danger' | 'blue' | 'orange' | 'green';
|
|
113
113
|
type ColorType = keyof typeof colors;
|
|
114
114
|
type FontSizeType = keyof typeof fontSize;
|
|
115
115
|
type FontWeightType = keyof typeof fontWeight;
|
|
@@ -128,7 +128,7 @@ interface TextProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
|
128
128
|
fontWeight?: FontWeightType;
|
|
129
129
|
justify?: JustifyType;
|
|
130
130
|
align?: AlignType;
|
|
131
|
-
textDecoration?:
|
|
131
|
+
textDecoration?: 'none' | 'underline' | 'line-through';
|
|
132
132
|
style?: React__default.CSSProperties;
|
|
133
133
|
}
|
|
134
134
|
declare function Text({ id, children, size, color, justify, align, className, fontWeight: fontWeightProp, textDecoration, style, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
@@ -145,7 +145,7 @@ interface BorderRadiusBoxProps {
|
|
|
145
145
|
bgColor?: ColorType;
|
|
146
146
|
borderColor?: ColorType;
|
|
147
147
|
}
|
|
148
|
-
declare function BorderRadiusBox({ active, paddingX, paddingY, radius, children, onClick, className, fullWidth, bgColor, borderColor
|
|
148
|
+
declare function BorderRadiusBox({ active, paddingX, paddingY, radius, children, onClick, className, fullWidth, bgColor, borderColor }: BorderRadiusBoxProps): react_jsx_runtime.JSX.Element;
|
|
149
149
|
|
|
150
150
|
interface BulletTextProps {
|
|
151
151
|
label?: string | React.ReactNode;
|
|
@@ -155,26 +155,26 @@ interface BulletTextProps {
|
|
|
155
155
|
textSize?: FontSizeType;
|
|
156
156
|
fontWeight?: FontWeightType;
|
|
157
157
|
}
|
|
158
|
-
declare const BulletText: ({ label, bulletColor, tooltip, textColor, textSize, fontWeight
|
|
158
|
+
declare const BulletText: ({ label, bulletColor, tooltip, textColor, textSize, fontWeight }: BulletTextProps) => react_jsx_runtime.JSX.Element;
|
|
159
159
|
|
|
160
160
|
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
161
161
|
variant?: ButtonVariantType;
|
|
162
162
|
alignSelf?: AlignSelfType;
|
|
163
163
|
justifySelf?: JustifySelfType;
|
|
164
|
-
cornerStyle?:
|
|
165
|
-
size?:
|
|
166
|
-
fontWeight?:
|
|
164
|
+
cornerStyle?: 'square' | 'round';
|
|
165
|
+
size?: 'small' | 'medium' | 'large';
|
|
166
|
+
fontWeight?: 'bold' | 'semibold' | 'normal';
|
|
167
167
|
isLoading?: boolean;
|
|
168
168
|
icon?: string | React__default.ReactNode;
|
|
169
|
-
iconPosition?:
|
|
170
|
-
type?:
|
|
169
|
+
iconPosition?: 'left' | 'right';
|
|
170
|
+
type?: 'button' | 'submit' | 'reset';
|
|
171
171
|
customWidth?: number;
|
|
172
172
|
wFull?: boolean;
|
|
173
173
|
}
|
|
174
174
|
declare const Button: React__default.FC<ButtonProps>;
|
|
175
175
|
|
|
176
176
|
interface CheckboxProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
177
|
-
type?:
|
|
177
|
+
type?: 'filled' | 'outline';
|
|
178
178
|
label?: string;
|
|
179
179
|
error?: string;
|
|
180
180
|
className?: string;
|
|
@@ -185,11 +185,11 @@ declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps &
|
|
|
185
185
|
|
|
186
186
|
interface DividerProps {
|
|
187
187
|
className?: string;
|
|
188
|
-
orientation?:
|
|
189
|
-
variant?:
|
|
188
|
+
orientation?: 'horizontal' | 'vertical';
|
|
189
|
+
variant?: 'solid' | 'dashed' | 'dotted';
|
|
190
190
|
width?: number;
|
|
191
191
|
}
|
|
192
|
-
declare function Divider({ className, orientation, variant, width
|
|
192
|
+
declare function Divider({ className, orientation, variant, width }: DividerProps): react_jsx_runtime.JSX.Element;
|
|
193
193
|
|
|
194
194
|
interface EmailInputProps {
|
|
195
195
|
value: string;
|
|
@@ -208,7 +208,27 @@ interface EmailInputProps {
|
|
|
208
208
|
}
|
|
209
209
|
declare const EmailInput: React__default.FC<EmailInputProps>;
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
interface SelectOption$1 {
|
|
212
|
+
value: string | number | null;
|
|
213
|
+
label: string;
|
|
214
|
+
disabled?: boolean;
|
|
215
|
+
icon?: React.ReactNode;
|
|
216
|
+
description?: string;
|
|
217
|
+
divider?: boolean;
|
|
218
|
+
}
|
|
219
|
+
interface Paging$1 {
|
|
220
|
+
totalCount: number;
|
|
221
|
+
pageNo: number;
|
|
222
|
+
fetchCount: number;
|
|
223
|
+
totalPageCount: number;
|
|
224
|
+
}
|
|
225
|
+
interface OriginalObject {
|
|
226
|
+
id: string | number | null;
|
|
227
|
+
name: string;
|
|
228
|
+
partnerName?: string;
|
|
229
|
+
[key: string]: unknown;
|
|
230
|
+
}
|
|
231
|
+
type Direction = 'row' | 'col' | 'grid';
|
|
212
232
|
interface CommonFormDataProps {
|
|
213
233
|
isDot?: boolean;
|
|
214
234
|
label?: string;
|
|
@@ -226,11 +246,18 @@ interface CommonFormDataProps {
|
|
|
226
246
|
error?: string;
|
|
227
247
|
tooltip?: string | React.ReactNode;
|
|
228
248
|
}
|
|
249
|
+
interface TreeData {
|
|
250
|
+
id: number;
|
|
251
|
+
children?: TreeData[];
|
|
252
|
+
name: string;
|
|
253
|
+
seq: number;
|
|
254
|
+
level: number;
|
|
255
|
+
}
|
|
229
256
|
|
|
230
257
|
interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement>, CommonFormDataProps {
|
|
231
258
|
type?: string;
|
|
232
259
|
originRef?: React__default.LegacyRef<HTMLInputElement> | undefined;
|
|
233
|
-
textAlign?:
|
|
260
|
+
textAlign?: 'left' | 'right' | 'center';
|
|
234
261
|
value?: string | number | undefined;
|
|
235
262
|
description?: string;
|
|
236
263
|
onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -250,9 +277,9 @@ interface LabelProps {
|
|
|
250
277
|
labelHidden?: boolean;
|
|
251
278
|
subText?: string | React.ReactNode;
|
|
252
279
|
fontWeight?: FontWeightType;
|
|
253
|
-
align?:
|
|
280
|
+
align?: 'start' | 'center' | 'end';
|
|
254
281
|
}
|
|
255
|
-
declare const Label: ({ isDot, label, required, inputId, width, tooltip, labelHidden, subText, fontWeight, align
|
|
282
|
+
declare const Label: ({ isDot, label, required, inputId, width, tooltip, labelHidden, subText, fontWeight, align }: LabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
256
283
|
|
|
257
284
|
interface MultiSelectOption {
|
|
258
285
|
value: string | number;
|
|
@@ -279,7 +306,7 @@ interface PagingProps {
|
|
|
279
306
|
limit: number;
|
|
280
307
|
onPageChange: (page: number) => void;
|
|
281
308
|
}
|
|
282
|
-
declare function Paging({ page, total, limit, onPageChange
|
|
309
|
+
declare function Paging({ page, total, limit, onPageChange }: PagingProps): react_jsx_runtime.JSX.Element;
|
|
283
310
|
|
|
284
311
|
interface RadioProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
285
312
|
label?: string;
|
|
@@ -328,8 +355,8 @@ interface StackProps {
|
|
|
328
355
|
}
|
|
329
356
|
declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
330
357
|
|
|
331
|
-
type ColumnType =
|
|
332
|
-
type ColumnAlign =
|
|
358
|
+
type ColumnType = 'text' | 'date' | 'dateTime' | 'amount' | 'percent' | 'input' | 'checkbox' | 'link' | 'custom';
|
|
359
|
+
type ColumnAlign = 'left' | 'center' | 'right';
|
|
333
360
|
type ColumnDef<T = unknown> = {
|
|
334
361
|
key: string;
|
|
335
362
|
header: React__default.ReactNode;
|
|
@@ -370,12 +397,12 @@ interface TableProps<T> {
|
|
|
370
397
|
onRadioOption?: (selectedId: string) => void;
|
|
371
398
|
onMoveUp?: (id: string) => void;
|
|
372
399
|
onMoveDown?: (id: string) => void;
|
|
373
|
-
onSort?: (key: string, direction:
|
|
400
|
+
onSort?: (key: string, direction: 'asc' | 'desc' | 'none') => void;
|
|
374
401
|
}
|
|
375
|
-
declare function Table<T extends Record<string, unknown>>({ columns, datas, footers, isRadioOption, isCheckboxOption, isModify, overWidth, emptyMessage, disabledCheckboxCondition, onButtonClick, onLinkClick, onChangeInput, onChangeCheckbox, onChangeToggle, onCheckboxOption, onRadioOption, onMoveUp, onMoveDown, onSort
|
|
402
|
+
declare function Table<T extends Record<string, unknown>>({ columns, datas, footers, isRadioOption, isCheckboxOption, isModify, overWidth, emptyMessage, disabledCheckboxCondition, onButtonClick, onLinkClick, onChangeInput, onChangeCheckbox, onChangeToggle, onCheckboxOption, onRadioOption, onMoveUp, onMoveDown, onSort }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
376
403
|
|
|
377
404
|
interface TableTopProps {
|
|
378
|
-
type?:
|
|
405
|
+
type?: 'search' | 'option';
|
|
379
406
|
count?: number;
|
|
380
407
|
pageSize?: number;
|
|
381
408
|
countText?: string;
|
|
@@ -398,7 +425,7 @@ interface TableTopProps {
|
|
|
398
425
|
onSelectExcelDownload?: () => void;
|
|
399
426
|
handleRegist?: () => void;
|
|
400
427
|
}
|
|
401
|
-
declare function TableTop({ type, count, pageSize, countText, leftButtons, rightButtons, registText, sortOptionValue, sortOptions, useDivider, isPageCount, useCountOption, deleteText, onChangeSort, onChangePageSize, onDelete, onExcelDownload, onSelectExcelDownload, handleRegist
|
|
428
|
+
declare function TableTop({ type, count, pageSize, countText, leftButtons, rightButtons, registText, sortOptionValue, sortOptions, useDivider, isPageCount, useCountOption, deleteText, onChangeSort, onChangePageSize, onDelete, onExcelDownload, onSelectExcelDownload, handleRegist }: TableTopProps): react_jsx_runtime.JSX.Element;
|
|
402
429
|
|
|
403
430
|
interface CommonTableProps {
|
|
404
431
|
tableTop?: React.ReactNode;
|
|
@@ -415,7 +442,7 @@ interface TagProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
|
415
442
|
size?: FontSizeType;
|
|
416
443
|
fontWeight?: FontWeightType;
|
|
417
444
|
className?: string;
|
|
418
|
-
variant?:
|
|
445
|
+
variant?: 'filled' | 'outlined';
|
|
419
446
|
style?: React__default.CSSProperties;
|
|
420
447
|
}
|
|
421
448
|
declare function Tag({ id, children, color, bgColor, size, fontWeight: fontWeightProp, className, variant, style, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
@@ -449,17 +476,17 @@ interface TextButtonProps {
|
|
|
449
476
|
isOpen?: boolean;
|
|
450
477
|
onClick?: () => void;
|
|
451
478
|
color?: ColorType;
|
|
452
|
-
type?:
|
|
479
|
+
type?: 'none' | 'arrow' | 'underline';
|
|
453
480
|
size?: FontSizeType;
|
|
454
481
|
}
|
|
455
|
-
declare function TextButton({ text, isOpen, onClick, color, type, size
|
|
482
|
+
declare function TextButton({ text, isOpen, onClick, color, type, size }: TextButtonProps): react_jsx_runtime.JSX.Element;
|
|
456
483
|
|
|
457
484
|
interface ToggleProps {
|
|
458
485
|
checked?: boolean;
|
|
459
486
|
onChange?: (checked: boolean) => void;
|
|
460
487
|
label?: string;
|
|
461
488
|
disabled?: boolean;
|
|
462
|
-
size?:
|
|
489
|
+
size?: 'small' | 'medium' | 'large';
|
|
463
490
|
textToggleSize?: number;
|
|
464
491
|
className?: string;
|
|
465
492
|
id?: string;
|
|
@@ -475,7 +502,7 @@ declare const Toggle: React__default.ForwardRefExoticComponent<ToggleProps & Rea
|
|
|
475
502
|
|
|
476
503
|
interface TooltipProps {
|
|
477
504
|
tooltipInfo: React.ReactNode;
|
|
478
|
-
position?:
|
|
505
|
+
position?: 'bottom' | 'right';
|
|
479
506
|
}
|
|
480
507
|
declare function Tooltip({ tooltipInfo, position }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
481
508
|
|
|
@@ -497,4 +524,4 @@ interface WarningBoxProps extends React__default.HTMLAttributes<HTMLDivElement>
|
|
|
497
524
|
}
|
|
498
525
|
declare const WarningBox: React__default.FC<WarningBoxProps>;
|
|
499
526
|
|
|
500
|
-
export { type AlignSelfType, type AlignType, BorderRadiusBox, type BorderRadiusBoxProps, BulletText, type BulletTextProps, Button, type ButtonProps, type ButtonVariantType, Checkbox, type CheckboxProps, type ColorType, type ColumnAlign, type ColumnDef, type ColumnType, CommonTable, type CommonTableProps, type DirectionType, Divider, type DividerProps, EmailInput, type EmailInputProps, type FontSizeType, type FontWeightType, Input, type InputProps, type JustifySelfType, type JustifyType, Label, type LabelProps, MultiSelectCheckbox, type MultiSelectCheckboxProps, Paging, type PagingProps, Radio, type RadioProps, RequiredDot, SelectBox, type SelectBoxProps, Stack, type StackProps, Table, type TableProps, TableTop, type TableTopProps, Tag, TagInput, type TagProps, Text, TextArea, type TextAreaProps, TextButton, type TextButtonProps, type TextProps, Toggle, type ToggleProps, ToolTipBox, type ToolTipBoxProps, Tooltip, TooltipInfo, type TooltipInfoProps, type TooltipProps, WarningBox, type WarningBoxProps, alignSelfs, aligns, colors, directions, fontSize, fontWeight, justifies, justifySelfs, lineHeightSize };
|
|
527
|
+
export { type AlignSelfType, type AlignType, BorderRadiusBox, type BorderRadiusBoxProps, BulletText, type BulletTextProps, Button, type ButtonProps, type ButtonVariantType, Checkbox, type CheckboxProps, type ColorType, type ColumnAlign, type ColumnDef, type ColumnType, type CommonFormDataProps, CommonTable, type CommonTableProps, type Direction, type DirectionType, Divider, type DividerProps, EmailInput, type EmailInputProps, type FontSizeType, type FontWeightType, Input, type InputProps, type JustifySelfType, type JustifyType, Label, type LabelProps, MultiSelectCheckbox, type MultiSelectCheckboxProps, type OriginalObject, Paging, type PagingProps, type Paging$1 as PagingType, Radio, type RadioProps, RequiredDot, SelectBox, type SelectBoxProps, type SelectOption$1 as SelectOption, Stack, type StackProps, Table, type TableProps, TableTop, type TableTopProps, Tag, TagInput, type TagProps, Text, TextArea, type TextAreaProps, TextButton, type TextButtonProps, type TextProps, Toggle, type ToggleProps, ToolTipBox, type ToolTipBoxProps, Tooltip, TooltipInfo, type TooltipInfoProps, type TooltipProps, type TreeData, WarningBox, type WarningBoxProps, alignSelfs, aligns, colors, directions, fontSize, fontWeight, justifies, justifySelfs, lineHeightSize };
|
package/dist/index.js
CHANGED
|
@@ -316,10 +316,17 @@ function Tooltip({ tooltipInfo, position = "right" }) {
|
|
|
316
316
|
},
|
|
317
317
|
children: [
|
|
318
318
|
tooltipInfo,
|
|
319
|
-
/* @__PURE__ */ jsx5(
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
319
|
+
/* @__PURE__ */ jsx5(
|
|
320
|
+
"span",
|
|
321
|
+
{
|
|
322
|
+
className: "absolute top-10 right-10 cursor-pointer",
|
|
323
|
+
onClick: (e) => {
|
|
324
|
+
e.stopPropagation();
|
|
325
|
+
setIsOpen(false);
|
|
326
|
+
},
|
|
327
|
+
children: /* @__PURE__ */ jsx5(ColorIcTagClose_default, { width: 10, height: 10, color: "text" })
|
|
328
|
+
}
|
|
329
|
+
)
|
|
323
330
|
]
|
|
324
331
|
}
|
|
325
332
|
)
|
|
@@ -650,10 +657,12 @@ var Checkbox = forwardRef(
|
|
|
650
657
|
...props
|
|
651
658
|
}
|
|
652
659
|
),
|
|
653
|
-
disabled ? /* @__PURE__ */ jsx9(ColorIcCheckDim_default, { width: 18, height: 18 }) :
|
|
654
|
-
"
|
|
655
|
-
|
|
656
|
-
|
|
660
|
+
disabled ? /* @__PURE__ */ jsx9(ColorIcCheckDim_default, { width: 18, height: 18 }) : (
|
|
661
|
+
// <img src={IcCheckMarkDim} alt="check-dim" className="w-18 h-18" />
|
|
662
|
+
/* @__PURE__ */ jsx9(
|
|
663
|
+
"div",
|
|
664
|
+
{
|
|
665
|
+
className: `
|
|
657
666
|
h-18 w-18
|
|
658
667
|
${getTypeNoneCheckedClass()}
|
|
659
668
|
transition-all duration-200
|
|
@@ -662,27 +671,34 @@ var Checkbox = forwardRef(
|
|
|
662
671
|
${error ? "border-red" : ""}
|
|
663
672
|
${className}
|
|
664
673
|
`,
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
674
|
+
onClick: handleCheckboxClick,
|
|
675
|
+
children: /* @__PURE__ */ jsx9(
|
|
676
|
+
"span",
|
|
677
|
+
{
|
|
678
|
+
className: `${getTypeCheckedIconClass()} flex items-center justify-center`,
|
|
679
|
+
children: /* @__PURE__ */ jsx9(
|
|
680
|
+
"svg",
|
|
681
|
+
{
|
|
682
|
+
width: "18",
|
|
683
|
+
height: "18",
|
|
684
|
+
viewBox: "0 0 20 20",
|
|
685
|
+
fill: "none",
|
|
686
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
687
|
+
children: /* @__PURE__ */ jsx9(
|
|
688
|
+
"path",
|
|
689
|
+
{
|
|
690
|
+
d: "M15.292 5.93848C15.5167 5.687 15.8864 5.68757 16.1104 5.94043L16.1172 5.94727L16.123 5.95508C16.2977 6.1856 16.3012 6.54196 16.0713 6.77832L16.0723 6.7793L9.55078 13.9229L9.55176 13.9238C9.36406 14.1357 9.1186 14.25 8.84668 14.25C8.59606 14.25 8.33167 14.1383 8.1416 13.9238V13.9229L4.90918 10.373L4.90625 10.3701C4.69767 10.1343 4.69773 9.77005 4.90625 9.53418C5.12992 9.2815 5.49974 9.28064 5.72461 9.53125L8.86426 12.9795L15.292 5.9375V5.93848Z",
|
|
691
|
+
fill: "currentColor",
|
|
692
|
+
stroke: "currentColor",
|
|
693
|
+
strokeWidth: "0.5"
|
|
694
|
+
}
|
|
695
|
+
)
|
|
696
|
+
}
|
|
697
|
+
)
|
|
698
|
+
}
|
|
699
|
+
)
|
|
700
|
+
}
|
|
701
|
+
)
|
|
686
702
|
)
|
|
687
703
|
] }),
|
|
688
704
|
label && /* @__PURE__ */ jsx9("div", { className: `text-sm ${type === "outline" ? "ml-4" : "ml-8"}`, children: /* @__PURE__ */ jsx9(
|
|
@@ -3283,7 +3299,13 @@ function ToolTipBox({ title, children }) {
|
|
|
3283
3299
|
/* @__PURE__ */ jsx32(ColorIcTooltipBlue_default, { width: 14, height: 14 }),
|
|
3284
3300
|
/* @__PURE__ */ jsx32(Text, { size: "body14", fontWeight: "bold", color: "primary", children: title })
|
|
3285
3301
|
] }),
|
|
3286
|
-
/* @__PURE__ */ jsx32(
|
|
3302
|
+
/* @__PURE__ */ jsx32(
|
|
3303
|
+
"span",
|
|
3304
|
+
{
|
|
3305
|
+
className: `w-16 h-16 cursor-pointer transition-transform duration-300 ${isOpen ? "" : "rotate-180"}`,
|
|
3306
|
+
children: /* @__PURE__ */ jsx32(ColorIcTooltipArrow_default, { width: 14, height: 14, color: "primary" })
|
|
3307
|
+
}
|
|
3308
|
+
)
|
|
3287
3309
|
]
|
|
3288
3310
|
}
|
|
3289
3311
|
),
|