@scglab/admin-ui 0.1.3 → 0.1.4

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 CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React from 'react';
2
+ import * as React$1 from 'react';
3
+ import React__default from 'react';
3
4
 
4
5
  declare const fontSize: {
5
6
  h1: string;
@@ -118,9 +119,9 @@ type JustifySelfType = keyof typeof justifySelfs;
118
119
  type AlignType = keyof typeof aligns;
119
120
  type AlignSelfType = keyof typeof alignSelfs;
120
121
 
121
- interface TextProps extends React.HTMLAttributes<HTMLDivElement> {
122
+ interface TextProps extends React__default.HTMLAttributes<HTMLDivElement> {
122
123
  id?: string;
123
- children: React.ReactNode;
124
+ children: React__default.ReactNode;
124
125
  size?: FontSizeType;
125
126
  color?: ColorType;
126
127
  className?: string;
@@ -128,8 +129,372 @@ interface TextProps extends React.HTMLAttributes<HTMLDivElement> {
128
129
  justify?: JustifyType;
129
130
  align?: AlignType;
130
131
  textDecoration?: "none" | "underline" | "line-through";
131
- style?: React.CSSProperties;
132
+ style?: React__default.CSSProperties;
132
133
  }
133
134
  declare function Text({ id, children, size, color, justify, align, className, fontWeight: fontWeightProp, textDecoration, style, ...props }: TextProps): react_jsx_runtime.JSX.Element;
134
135
 
135
- export { type AlignSelfType, type AlignType, type ButtonVariantType, type ColorType, type DirectionType, type FontSizeType, type FontWeightType, type JustifySelfType, type JustifyType, Text, type TextProps, alignSelfs, aligns, colors, directions, fontSize, fontWeight, justifies, justifySelfs, lineHeightSize };
136
+ interface BorderRadiusBoxProps {
137
+ active?: boolean;
138
+ paddingX?: number;
139
+ paddingY?: number;
140
+ radius?: number;
141
+ children: React.ReactNode;
142
+ onClick?: () => void;
143
+ className?: string;
144
+ fullWidth?: boolean;
145
+ bgColor?: ColorType;
146
+ borderColor?: ColorType;
147
+ }
148
+ declare function BorderRadiusBox({ active, paddingX, paddingY, radius, children, onClick, className, fullWidth, bgColor, borderColor, }: BorderRadiusBoxProps): react_jsx_runtime.JSX.Element;
149
+
150
+ interface BulletTextProps {
151
+ label?: string | React.ReactNode;
152
+ bulletColor?: ColorType;
153
+ tooltip?: React.ReactNode;
154
+ textColor?: ColorType;
155
+ textSize?: FontSizeType;
156
+ fontWeight?: FontWeightType;
157
+ }
158
+ declare const BulletText: ({ label, bulletColor, tooltip, textColor, textSize, fontWeight, }: BulletTextProps) => react_jsx_runtime.JSX.Element;
159
+
160
+ interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
161
+ variant?: ButtonVariantType;
162
+ alignSelf?: AlignSelfType;
163
+ justifySelf?: JustifySelfType;
164
+ cornerStyle?: "square" | "round";
165
+ size?: "small" | "medium" | "large";
166
+ fontWeight?: "bold" | "semibold" | "normal";
167
+ isLoading?: boolean;
168
+ icon?: string | React__default.ReactNode;
169
+ iconPosition?: "left" | "right";
170
+ type?: "button" | "submit" | "reset";
171
+ customWidth?: number;
172
+ wFull?: boolean;
173
+ }
174
+ declare const Button: React__default.FC<ButtonProps>;
175
+
176
+ interface CheckboxProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
177
+ type?: "filled" | "outline";
178
+ label?: string;
179
+ error?: string;
180
+ className?: string;
181
+ checkboxWidth?: number;
182
+ disabled?: boolean;
183
+ }
184
+ declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
185
+
186
+ interface DividerProps {
187
+ className?: string;
188
+ orientation?: "horizontal" | "vertical";
189
+ variant?: "solid" | "dashed" | "dotted";
190
+ width?: number;
191
+ }
192
+ declare function Divider({ className, orientation, variant, width, }: DividerProps): react_jsx_runtime.JSX.Element;
193
+
194
+ interface EmailInputProps {
195
+ value: string;
196
+ onChange: (value: string) => void;
197
+ error?: string;
198
+ label?: string;
199
+ labelHidden?: boolean;
200
+ placeholder?: string;
201
+ required?: boolean;
202
+ direction?: DirectionType;
203
+ fullWidth?: boolean;
204
+ className?: string;
205
+ customWidth?: number;
206
+ onBlur?: () => void;
207
+ triggerValidation?: () => void;
208
+ }
209
+ declare const EmailInput: React__default.FC<EmailInputProps>;
210
+
211
+ type Direction = "row" | "col" | "grid";
212
+ interface CommonFormDataProps {
213
+ isDot?: boolean;
214
+ label?: string;
215
+ labelHidden?: boolean;
216
+ labelWidth?: number;
217
+ placeholder?: string;
218
+ fullWidth?: boolean;
219
+ className?: string;
220
+ required?: boolean;
221
+ disabled?: boolean;
222
+ customWidth?: number;
223
+ emptyMessage?: string;
224
+ isShowError?: boolean;
225
+ direction?: Direction;
226
+ error?: string;
227
+ tooltip?: string | React.ReactNode;
228
+ }
229
+
230
+ interface InputProps extends React__default.InputHTMLAttributes<HTMLInputElement>, CommonFormDataProps {
231
+ type?: string;
232
+ originRef?: React__default.LegacyRef<HTMLInputElement> | undefined;
233
+ textAlign?: "left" | "right" | "center";
234
+ value?: string | number | undefined;
235
+ description?: string;
236
+ onChange?: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
237
+ onlyData?: boolean;
238
+ rightIcon?: string;
239
+ onRightIconClick?: () => void;
240
+ }
241
+ declare const Input: React__default.FC<InputProps>;
242
+
243
+ interface LabelProps {
244
+ isDot?: boolean;
245
+ label?: string | React.ReactNode;
246
+ required?: boolean;
247
+ inputId?: string;
248
+ width?: number;
249
+ tooltip?: React.ReactNode;
250
+ labelHidden?: boolean;
251
+ subText?: string | React.ReactNode;
252
+ fontWeight?: FontWeightType;
253
+ align?: "start" | "center" | "end";
254
+ }
255
+ declare const Label: ({ isDot, label, required, inputId, width, tooltip, labelHidden, subText, fontWeight, align, }: LabelProps) => react_jsx_runtime.JSX.Element | null;
256
+
257
+ interface MultiSelectOption {
258
+ value: string | number;
259
+ label: string;
260
+ disabled?: boolean;
261
+ color?: string;
262
+ }
263
+ interface MultiSelectCheckboxProps extends CommonFormDataProps {
264
+ options: MultiSelectOption[];
265
+ value?: (string | number)[];
266
+ onChange?: (value: (string | number)[]) => void;
267
+ onConfirm?: (value: (string | number)[]) => void;
268
+ onFocus?: () => void;
269
+ onBlur?: () => void;
270
+ onEmptyClick?: () => void;
271
+ id?: string;
272
+ confirmButtonText?: string;
273
+ }
274
+ declare const MultiSelectCheckbox: React__default.ForwardRefExoticComponent<MultiSelectCheckboxProps & React__default.RefAttributes<HTMLDivElement>>;
275
+
276
+ interface PagingProps {
277
+ page: number;
278
+ total: number;
279
+ limit: number;
280
+ onPageChange: (page: number) => void;
281
+ }
282
+ declare function Paging({ page, total, limit, onPageChange, }: PagingProps): react_jsx_runtime.JSX.Element;
283
+
284
+ interface RadioProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
285
+ label?: string;
286
+ error?: string;
287
+ className?: string;
288
+ radioWidth?: number;
289
+ }
290
+ declare const Radio: React__default.ForwardRefExoticComponent<RadioProps & React__default.RefAttributes<HTMLInputElement>>;
291
+
292
+ declare function RequiredDot(): react_jsx_runtime.JSX.Element;
293
+
294
+ interface SelectOption {
295
+ value: string | number | null;
296
+ label: string;
297
+ disabled?: boolean;
298
+ icon?: React__default.ReactNode;
299
+ description?: string;
300
+ divider?: boolean;
301
+ }
302
+ interface SelectBoxProps extends CommonFormDataProps {
303
+ options: SelectOption[];
304
+ value?: string | number | null;
305
+ onChange?: (value: string | number | null) => void;
306
+ onFocus?: () => void;
307
+ onBlur?: () => void;
308
+ onEmptyClick?: () => void;
309
+ id?: string;
310
+ }
311
+ declare const SelectBox: React__default.ForwardRefExoticComponent<SelectBoxProps & React__default.RefAttributes<HTMLDivElement>>;
312
+
313
+ interface StackProps {
314
+ direction?: Direction;
315
+ justify?: JustifyType;
316
+ align?: AlignType;
317
+ even?: boolean;
318
+ className?: string;
319
+ children: React.ReactNode;
320
+ wFull?: boolean;
321
+ hFull?: boolean;
322
+ gap?: number;
323
+ rowGap?: number;
324
+ columnGap?: number;
325
+ onClick?: () => void;
326
+ childSizes?: (number | string)[];
327
+ flexWrap?: boolean;
328
+ }
329
+ declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLDivElement>>;
330
+
331
+ type ColumnType = "text" | "date" | "dateTime" | "amount" | "percent" | "input" | "checkbox" | "link" | "custom";
332
+ type ColumnAlign = "left" | "center" | "right";
333
+ type ColumnDef<T = unknown> = {
334
+ key: string;
335
+ header: React__default.ReactNode;
336
+ colSpan?: number;
337
+ type?: ColumnType;
338
+ render?: (value: unknown, row: T, rowIndex: number) => React__default.ReactNode;
339
+ align?: ColumnAlign;
340
+ thAlign?: ColumnAlign;
341
+ tdAlign?: ColumnAlign;
342
+ bold?: boolean;
343
+ noWrap?: boolean;
344
+ required?: boolean;
345
+ important?: boolean;
346
+ sortable?: boolean;
347
+ mergeDuplicate?: boolean;
348
+ width?: number;
349
+ className?: string;
350
+ thClassName?: string;
351
+ tdClassName?: string;
352
+ };
353
+
354
+ interface TableProps<T> {
355
+ columns: ColumnDef<T>[];
356
+ datas?: T[];
357
+ footers?: React__default.ReactNode | null;
358
+ isRadioOption?: boolean;
359
+ isCheckboxOption?: boolean;
360
+ isModify?: boolean;
361
+ overWidth?: number;
362
+ emptyMessage?: string;
363
+ disabledCheckboxCondition?: (data: T) => boolean;
364
+ onButtonClick?: (id: number, value: string, key: string) => void;
365
+ onLinkClick?: (id: number, value: string, key: string) => void;
366
+ onChangeInput?: (id: number, value: string, headerKey: string) => void;
367
+ onChangeCheckbox?: (id: number, value: boolean, headerKey: string) => void;
368
+ onChangeToggle?: (id: number, value: boolean, headerKey: string) => void;
369
+ onCheckboxOption?: (selectedIds: string[] | number[]) => void;
370
+ onRadioOption?: (selectedId: string) => void;
371
+ onMoveUp?: (id: string) => void;
372
+ onMoveDown?: (id: string) => void;
373
+ onSort?: (key: string, direction: "asc" | "desc" | "none") => void;
374
+ }
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, }: TableProps<T>): react_jsx_runtime.JSX.Element;
376
+
377
+ interface TableTopProps {
378
+ type?: "search" | "option";
379
+ count?: number;
380
+ pageSize?: number;
381
+ countText?: string;
382
+ leftButtons?: React.ReactNode;
383
+ rightButtons?: React.ReactNode;
384
+ registText?: string;
385
+ sortOptionValue?: string;
386
+ sortOptions?: {
387
+ label: string;
388
+ value: string;
389
+ }[];
390
+ useDivider?: boolean;
391
+ isPageCount?: boolean;
392
+ useCountOption?: boolean;
393
+ deleteText?: string;
394
+ onChangeSort?: (value: string) => void;
395
+ onChangePageSize?: (value: number) => void;
396
+ onDelete?: () => void;
397
+ onExcelDownload?: () => void;
398
+ onSelectExcelDownload?: () => void;
399
+ handleRegist?: () => void;
400
+ }
401
+ 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
+
403
+ interface CommonTableProps {
404
+ tableTop?: React.ReactNode;
405
+ tableBody?: React.ReactNode;
406
+ pagination?: React.ReactNode;
407
+ }
408
+ declare function CommonTable({ tableTop, tableBody, pagination }: CommonTableProps): react_jsx_runtime.JSX.Element;
409
+
410
+ interface TagProps extends React__default.HTMLAttributes<HTMLDivElement> {
411
+ id?: string;
412
+ children: React__default.ReactNode;
413
+ color?: ColorType;
414
+ bgColor?: ColorType;
415
+ size?: FontSizeType;
416
+ fontWeight?: FontWeightType;
417
+ className?: string;
418
+ variant?: "filled" | "outlined";
419
+ style?: React__default.CSSProperties;
420
+ }
421
+ declare function Tag({ id, children, color, bgColor, size, fontWeight: fontWeightProp, className, variant, style, ...props }: TagProps): react_jsx_runtime.JSX.Element;
422
+
423
+ interface TagInputProps {
424
+ label?: string;
425
+ labelHidden?: boolean;
426
+ tags: string[];
427
+ onChange: (tags: string[]) => void;
428
+ placeholder?: string;
429
+ disabled?: boolean;
430
+ className?: string;
431
+ id?: string;
432
+ required?: boolean;
433
+ error?: string;
434
+ tooltip?: string | React__default.ReactNode;
435
+ onlyView?: boolean;
436
+ draggable?: boolean;
437
+ onDuplicateTag?: (tag: string) => void;
438
+ }
439
+ declare const TagInput: React__default.ForwardRefExoticComponent<TagInputProps & React__default.RefAttributes<HTMLInputElement>>;
440
+
441
+ interface TextAreaProps extends React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, CommonFormDataProps {
442
+ areaHeight?: number;
443
+ maxLength?: number;
444
+ }
445
+ declare const TextArea: React__default.FC<TextAreaProps>;
446
+
447
+ interface TextButtonProps {
448
+ text: string;
449
+ isOpen?: boolean;
450
+ onClick?: () => void;
451
+ color?: ColorType;
452
+ type?: "none" | "arrow" | "underline";
453
+ size?: FontSizeType;
454
+ }
455
+ declare function TextButton({ text, isOpen, onClick, color, type, size, }: TextButtonProps): react_jsx_runtime.JSX.Element;
456
+
457
+ interface ToggleProps {
458
+ checked?: boolean;
459
+ onChange?: (checked: boolean) => void;
460
+ label?: string;
461
+ disabled?: boolean;
462
+ size?: "small" | "medium" | "large";
463
+ textToggleSize?: number;
464
+ className?: string;
465
+ id?: string;
466
+ required?: boolean;
467
+ error?: string;
468
+ tooltip?: React__default.ReactNode;
469
+ onText?: string;
470
+ offText?: string;
471
+ labelWidth?: number;
472
+ isDot?: boolean;
473
+ }
474
+ declare const Toggle: React__default.ForwardRefExoticComponent<ToggleProps & React__default.RefAttributes<HTMLButtonElement>>;
475
+
476
+ interface TooltipProps {
477
+ tooltipInfo: React.ReactNode;
478
+ position?: "bottom" | "right";
479
+ }
480
+ declare function Tooltip({ tooltipInfo, position }: TooltipProps): react_jsx_runtime.JSX.Element;
481
+
482
+ interface ToolTipBoxProps {
483
+ title: string;
484
+ children: string[];
485
+ }
486
+ declare function ToolTipBox({ title, children }: ToolTipBoxProps): react_jsx_runtime.JSX.Element;
487
+
488
+ interface TooltipInfoProps {
489
+ title?: string;
490
+ children: string[] | React.ReactNode[];
491
+ }
492
+ declare function TooltipInfo({ title, children }: TooltipInfoProps): react_jsx_runtime.JSX.Element;
493
+
494
+ interface WarningBoxProps extends React__default.HTMLAttributes<HTMLDivElement> {
495
+ color?: string;
496
+ children: React__default.ReactNode;
497
+ }
498
+ declare const WarningBox: React__default.FC<WarningBoxProps>;
499
+
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 };