@teamturing/react-kit 2.53.8 → 2.55.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.
Files changed (31) hide show
  1. package/dist/core/CheckboxGroup/CheckboxGroupOption.d.ts +44 -0
  2. package/dist/core/CheckboxGroup/index.d.ts +48 -0
  3. package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlCaption.d.ts +5 -0
  4. package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlErrorMessage.d.ts +5 -0
  5. package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlLabel.d.ts +8 -0
  6. package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlSuccessMessage.d.ts +5 -0
  7. package/dist/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlTooltipIcon.d.ts +7 -0
  8. package/dist/core/CheckboxOrRadioGroupFormControl/index.d.ts +61 -0
  9. package/dist/core/RadioGroup/RadioGroupOption.d.ts +44 -0
  10. package/dist/core/RadioGroup/index.d.ts +48 -0
  11. package/dist/core/Spinner/index.d.ts +7 -484
  12. package/dist/index.d.ts +6 -0
  13. package/dist/index.js +3675 -3168
  14. package/dist/theme/index.d.ts +15 -0
  15. package/dist/utils/createSafeContext.d.ts +6 -0
  16. package/esm/core/CheckboxGroup/CheckboxGroupOption.js +56 -0
  17. package/esm/core/CheckboxGroup/index.js +54 -0
  18. package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlCaption.js +21 -0
  19. package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlErrorMessage.js +34 -0
  20. package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlLabel.js +92 -0
  21. package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlSuccessMessage.js +34 -0
  22. package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlTooltipIcon.js +25 -0
  23. package/esm/core/CheckboxOrRadioGroupFormControl/index.js +98 -0
  24. package/esm/core/FormControl/index.js +2 -2
  25. package/esm/core/RadioGroup/RadioGroupOption.js +54 -0
  26. package/esm/core/RadioGroup/index.js +54 -0
  27. package/esm/core/Spinner/index.js +30 -7
  28. package/esm/index.js +3 -0
  29. package/esm/theme/index.js +18 -3
  30. package/esm/utils/createSafeContext.js +25 -0
  31. package/package.json +2 -2
@@ -0,0 +1,44 @@
1
+ import { ChangeEvent, PropsWithChildren, ReactNode } from 'react';
2
+ import { CheckboxProps } from '../Checkbox';
3
+ type CheckboxGroupOptionProps = {
4
+ /**
5
+ * Checkbox의 값
6
+ */
7
+ value: string | number | boolean;
8
+ /**
9
+ * Label 텍스트 또는 컴포넌트
10
+ * children이 있으면 children이 우선됨
11
+ */
12
+ label?: ReactNode;
13
+ /**
14
+ * 이 옵션만 비활성화 (CheckboxGroup의 disabled와 별개)
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * 개별 onChange 핸들러 (CheckboxGroup의 onChange와 함께 호출됨)
19
+ */
20
+ onChange?: (value: string | number | boolean, e: ChangeEvent<HTMLInputElement>) => void;
21
+ } & PropsWithChildren & Omit<CheckboxProps, 'name' | 'checked' | 'onChange' | 'disabled'>;
22
+ declare const _default: import("react").ForwardRefExoticComponent<{
23
+ /**
24
+ * Checkbox의 값
25
+ */
26
+ value: string | number | boolean;
27
+ /**
28
+ * Label 텍스트 또는 컴포넌트
29
+ * children이 있으면 children이 우선됨
30
+ */
31
+ label?: ReactNode;
32
+ /**
33
+ * 이 옵션만 비활성화 (CheckboxGroup의 disabled와 별개)
34
+ */
35
+ disabled?: boolean | undefined;
36
+ /**
37
+ * 개별 onChange 핸들러 (CheckboxGroup의 onChange와 함께 호출됨)
38
+ */
39
+ onChange?: ((value: string | number | boolean, e: ChangeEvent<HTMLInputElement>) => void) | undefined;
40
+ } & {
41
+ children?: ReactNode;
42
+ } & Omit<CheckboxProps, "onChange" | "checked" | "disabled" | "name"> & import("react").RefAttributes<HTMLInputElement>>;
43
+ export default _default;
44
+ export type { CheckboxGroupOptionProps };
@@ -0,0 +1,48 @@
1
+ import { ChangeEventHandler, PropsWithChildren, ReactNode } from 'react';
2
+ import { CheckboxGroupOptionProps } from './CheckboxGroupOption';
3
+ type CheckboxGroupContextValue = {
4
+ name?: string;
5
+ required?: boolean;
6
+ disabled?: boolean;
7
+ value?: Array<string | number | boolean>;
8
+ onChange?: ChangeEventHandler<HTMLInputElement>;
9
+ };
10
+ declare const useCheckboxGroupContext: () => CheckboxGroupContextValue;
11
+ type CheckboxGroupProps = {
12
+ 'name'?: string;
13
+ 'required'?: boolean;
14
+ 'disabled'?: boolean;
15
+ 'value'?: Array<string | number | boolean>;
16
+ 'onChange'?: ChangeEventHandler<HTMLInputElement>;
17
+ /**
18
+ * CheckboxGroup.Option들을 감싸는 컨테이너 렌더 함수
19
+ * @example (children) => <Grid gapX={3}>{children}</Grid>
20
+ */
21
+ 'renderContainer'?: (children: ReactNode) => ReactNode;
22
+ /**
23
+ * 각 CheckboxGroup.Option을 감싸는 래퍼 렌더 함수
24
+ * @example (children, i) => <Grid.Unit size={1/3} key={i}>{children}</Grid.Unit>
25
+ */
26
+ 'renderItemWrapper'?: (children: ReactNode, index: number) => ReactNode;
27
+ /**
28
+ * aria-label for accessibility
29
+ */
30
+ 'aria-label'?: string;
31
+ /**
32
+ * aria-labelledby for accessibility
33
+ */
34
+ 'aria-labelledby'?: string;
35
+ } & PropsWithChildren;
36
+ export { useCheckboxGroupContext };
37
+ declare const _default: (({ children, name, required, disabled, value, onChange, renderContainer, renderItemWrapper, ...ariaProps }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element) & {
38
+ Option: import("react").ForwardRefExoticComponent<{
39
+ value: string | number | boolean;
40
+ label?: ReactNode;
41
+ disabled?: boolean | undefined;
42
+ onChange?: ((value: string | number | boolean, e: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
43
+ } & {
44
+ children?: ReactNode;
45
+ } & Omit<import("../Checkbox").CheckboxProps, "onChange" | "checked" | "disabled" | "name"> & import("react").RefAttributes<HTMLInputElement>>;
46
+ };
47
+ export default _default;
48
+ export type { CheckboxGroupProps, CheckboxGroupContextValue, CheckboxGroupOptionProps };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type Props = {};
3
+ declare const CheckboxOrRadioGroupFormControlCaption: ({ children }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
4
+ export default CheckboxOrRadioGroupFormControlCaption;
5
+ export type { Props as CheckboxOrRadioGroupFormControlCaptionProps };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type Props = {};
3
+ declare const CheckboxOrRadioGroupFormControlErrorMessage: ({ children }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
4
+ export default CheckboxOrRadioGroupFormControlErrorMessage;
5
+ export type { Props as CheckboxOrRadioGroupFormControlErrorMessageProps };
@@ -0,0 +1,8 @@
1
+ import { SxProp } from '@teamturing/react-kit';
2
+ import { PropsWithChildren } from 'react';
3
+ type Props = {
4
+ visuallyHidden?: boolean;
5
+ } & SxProp;
6
+ declare const CheckboxOrRadioGroupFormControlLabel: ({ children, visuallyHidden, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
7
+ export default CheckboxOrRadioGroupFormControlLabel;
8
+ export type { Props as CheckboxOrRadioGroupFormControlLabelProps };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type Props = {};
3
+ declare const CheckboxOrRadioGroupFormControlSuccessMessage: ({ children }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
4
+ export default CheckboxOrRadioGroupFormControlSuccessMessage;
5
+ export type { Props as CheckboxOrRadioGroupFormControlSuccessMessageProps };
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { StyledIconProps } from '../StyledIcon';
3
+ import { TooltipProps } from '../Tooltip';
4
+ type Props = {} & Partial<StyledIconProps> & Pick<TooltipProps, 'text' | 'direction'>;
5
+ declare const CheckboxOrRadioGroupFormControlTooltipIcon: ({ text, direction, icon, size, color, ...props }: PropsWithChildren<Props>) => import("react/jsx-runtime").JSX.Element;
6
+ export default CheckboxOrRadioGroupFormControlTooltipIcon;
7
+ export type { Props as CheckboxOrRadioGroupFormControlTooltipIconProps };
@@ -0,0 +1,61 @@
1
+ import { SxProp } from '@teamturing/react-kit';
2
+ import { PropsWithChildren } from 'react';
3
+ import { CheckboxOrRadioGroupFormControlCaptionProps } from './CheckboxOrRadioGroupFormControlCaption';
4
+ import { CheckboxOrRadioGroupFormControlErrorMessageProps } from './CheckboxOrRadioGroupFormControlErrorMessage';
5
+ import { CheckboxOrRadioGroupFormControlLabelProps } from './CheckboxOrRadioGroupFormControlLabel';
6
+ import { CheckboxOrRadioGroupFormControlSuccessMessageProps } from './CheckboxOrRadioGroupFormControlSuccessMessage';
7
+ import { CheckboxOrRadioGroupFormControlTooltipIconProps } from './CheckboxOrRadioGroupFormControlTooltipIcon';
8
+ type Props = {
9
+ /**
10
+ * `CheckboxOrRadioGroupFormControl`의 ID입니다. `Label`, `Caption`과 연결짓기 위해 사용합니다.
11
+ */
12
+ id?: string;
13
+ /**
14
+ * 사용자의 입력을 허용할지에 대한 여부입니다.
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * 사용자의 입력을 필요로 하는지에 대한 여부입니다.
19
+ * @default true
20
+ */
21
+ required?: boolean;
22
+ } & SxProp;
23
+ type CheckboxOrRadioGroupFormControlFieldProps = {
24
+ name: string;
25
+ label: string;
26
+ caption?: string;
27
+ };
28
+ type CheckboxOrRadioGroupFormControlContextValue = {} & Props;
29
+ declare const CheckboxOrRadioGroupFormControlContext: import("react").Context<CheckboxOrRadioGroupFormControlContextValue>;
30
+ declare const _default: import("react").ForwardRefExoticComponent<{
31
+ /**
32
+ * `CheckboxOrRadioGroupFormControl`의 ID입니다. `Label`, `Caption`과 연결짓기 위해 사용합니다.
33
+ */
34
+ id?: string | undefined;
35
+ /**
36
+ * 사용자의 입력을 허용할지에 대한 여부입니다.
37
+ */
38
+ disabled?: boolean | undefined;
39
+ /**
40
+ * 사용자의 입력을 필요로 하는지에 대한 여부입니다.
41
+ * @default true
42
+ */
43
+ required?: boolean | undefined;
44
+ } & SxProp & {
45
+ children?: import("react").ReactNode;
46
+ } & import("react").RefAttributes<HTMLDivElement>> & {
47
+ Label: ({ children, visuallyHidden, ...props }: PropsWithChildren<CheckboxOrRadioGroupFormControlLabelProps>) => import("react/jsx-runtime").JSX.Element;
48
+ Caption: ({ children }: {
49
+ children?: import("react").ReactNode;
50
+ }) => import("react/jsx-runtime").JSX.Element;
51
+ ErrorMessage: ({ children }: {
52
+ children?: import("react").ReactNode;
53
+ }) => import("react/jsx-runtime").JSX.Element;
54
+ SuccessMessage: ({ children }: {
55
+ children?: import("react").ReactNode;
56
+ }) => import("react/jsx-runtime").JSX.Element;
57
+ TooltipIcon: ({ text, direction, icon, size, color, ...props }: PropsWithChildren<CheckboxOrRadioGroupFormControlTooltipIconProps>) => import("react/jsx-runtime").JSX.Element;
58
+ };
59
+ export default _default;
60
+ export { CheckboxOrRadioGroupFormControlContext };
61
+ export type { Props as CheckboxOrRadioGroupFormControlProps, CheckboxOrRadioGroupFormControlFieldProps, CheckboxOrRadioGroupFormControlContextValue, CheckboxOrRadioGroupFormControlCaptionProps, CheckboxOrRadioGroupFormControlErrorMessageProps, CheckboxOrRadioGroupFormControlLabelProps, CheckboxOrRadioGroupFormControlSuccessMessageProps, CheckboxOrRadioGroupFormControlTooltipIconProps, };
@@ -0,0 +1,44 @@
1
+ import { ChangeEvent, PropsWithChildren, ReactNode } from 'react';
2
+ import { RadioProps } from '../Radio';
3
+ type RadioGroupOptionProps = {
4
+ /**
5
+ * Radio의 값
6
+ */
7
+ value: string | number | boolean;
8
+ /**
9
+ * Label 텍스트 또는 컴포넌트
10
+ * children이 있으면 children이 우선됨
11
+ */
12
+ label?: ReactNode;
13
+ /**
14
+ * 이 옵션만 비활성화 (RadioGroup의 disabled와 별개)
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * 개별 onChange 핸들러 (RadioGroup의 onChange와 함께 호출됨)
19
+ */
20
+ onChange?: (value: string | number | boolean, e: ChangeEvent<HTMLInputElement>) => void;
21
+ } & PropsWithChildren & Omit<RadioProps, 'name' | 'checked' | 'onChange' | 'disabled'>;
22
+ declare const _default: import("react").ForwardRefExoticComponent<{
23
+ /**
24
+ * Radio의 값
25
+ */
26
+ value: string | number | boolean;
27
+ /**
28
+ * Label 텍스트 또는 컴포넌트
29
+ * children이 있으면 children이 우선됨
30
+ */
31
+ label?: ReactNode;
32
+ /**
33
+ * 이 옵션만 비활성화 (RadioGroup의 disabled와 별개)
34
+ */
35
+ disabled?: boolean | undefined;
36
+ /**
37
+ * 개별 onChange 핸들러 (RadioGroup의 onChange와 함께 호출됨)
38
+ */
39
+ onChange?: ((value: string | number | boolean, e: ChangeEvent<HTMLInputElement>) => void) | undefined;
40
+ } & {
41
+ children?: ReactNode;
42
+ } & Omit<RadioProps, "onChange" | "checked" | "disabled" | "name"> & import("react").RefAttributes<HTMLInputElement>>;
43
+ export default _default;
44
+ export type { RadioGroupOptionProps };
@@ -0,0 +1,48 @@
1
+ import { ChangeEventHandler, PropsWithChildren, ReactNode } from 'react';
2
+ import { RadioGroupOptionProps } from './RadioGroupOption';
3
+ type RadioGroupContextValue = {
4
+ name?: string;
5
+ required?: boolean;
6
+ disabled?: boolean;
7
+ value?: string | number | boolean;
8
+ onChange?: ChangeEventHandler<HTMLInputElement>;
9
+ };
10
+ declare const useRadioGroupContext: () => RadioGroupContextValue;
11
+ type RadioGroupProps = {
12
+ 'name'?: string;
13
+ 'required'?: boolean;
14
+ 'disabled'?: boolean;
15
+ 'value'?: string | number | boolean;
16
+ 'onChange'?: ChangeEventHandler<HTMLInputElement>;
17
+ /**
18
+ * RadioGroup.Option들을 감싸는 컨테이너 렌더 함수
19
+ * @example (children) => <Grid gapX={3}>{children}</Grid>
20
+ */
21
+ 'renderContainer'?: (children: ReactNode) => ReactNode;
22
+ /**
23
+ * 각 RadioGroup.Option을 감싸는 래퍼 렌더 함수
24
+ * @example (children, i) => <Grid.Unit size={1/3} key={i}>{children}</Grid.Unit>
25
+ */
26
+ 'renderItemWrapper'?: (children: ReactNode, index: number) => ReactNode;
27
+ /**
28
+ * aria-label for accessibility
29
+ */
30
+ 'aria-label'?: string;
31
+ /**
32
+ * aria-labelledby for accessibility
33
+ */
34
+ 'aria-labelledby'?: string;
35
+ } & PropsWithChildren;
36
+ export { useRadioGroupContext };
37
+ declare const _default: (({ children, name, required, disabled, value, onChange, renderContainer, renderItemWrapper, ...ariaProps }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element) & {
38
+ Option: import("react").ForwardRefExoticComponent<{
39
+ value: string | number | boolean;
40
+ label?: ReactNode;
41
+ disabled?: boolean | undefined;
42
+ onChange?: ((value: string | number | boolean, e: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
43
+ } & {
44
+ children?: ReactNode;
45
+ } & Omit<import("../Radio").RadioProps, "onChange" | "checked" | "disabled" | "name"> & import("react").RefAttributes<HTMLInputElement>>;
46
+ };
47
+ export default _default;
48
+ export type { RadioGroupProps, RadioGroupContextValue, RadioGroupOptionProps };