@teamturing/react-kit 2.62.2 → 2.63.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/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlLabel.d.ts +1 -1
- package/dist/core/CheckboxOrRadioGroupFormControl/index.d.ts +1 -1
- package/dist/core/Pagination/index.d.ts +5 -2
- package/dist/core/_UnstyledButton.d.ts +1 -1
- package/dist/index.js +49 -31
- package/dist/theme/index.d.ts +48 -0
- package/esm/core/CheckboxOrRadioGroupFormControl/CheckboxOrRadioGroupFormControlLabel.js +4 -3
- package/esm/core/CheckboxOrRadioGroupFormControl/index.js +1 -1
- package/esm/core/FormControl/FormControlLabel.js +3 -2
- package/esm/core/Pagination/index.js +14 -11
- package/esm/core/Select/index.js +4 -2
- package/esm/core/Textarea/index.js +1 -1
- package/esm/core/UploadInput/index.js +5 -3
- package/esm/core/_UnstyledButton.js +5 -13
- package/esm/theme/index.js +16 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SxProp } from '@teamturing/react-kit';
|
|
2
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { SxProp } from '../../utils/styled-system';
|
|
3
3
|
import { CheckboxOrRadioGroupFormControlCaptionProps } from './CheckboxOrRadioGroupFormControlCaption';
|
|
4
4
|
import { CheckboxOrRadioGroupFormControlErrorMessageProps } from './CheckboxOrRadioGroupFormControlErrorMessage';
|
|
5
5
|
import { CheckboxOrRadioGroupFormControlLabelProps } from './CheckboxOrRadioGroupFormControlLabel';
|
|
@@ -31,8 +31,11 @@ type PaginationPageProps = {
|
|
|
31
31
|
type PaginationPageDirectionProps = Pick<UnstyledButtonProps, 'onClick' | 'disabled' | 'type'>;
|
|
32
32
|
declare const _default: (<T extends {
|
|
33
33
|
label: string;
|
|
34
|
-
}>({ pages: propPages, currentPageIndex, aroundPageCount, edgePageCount, type, sx, onPageClick, onPreviousClick, onNextClick, renderPage, renderPageWrapper, renderPreviousPageDirection, renderNextPageDirection, renderTruncationIndicator, }: Props<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
35
|
-
Page: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<
|
|
34
|
+
}>({ pages: propPages, currentPageIndex, aroundPageCount, edgePageCount, type, sx, onPageClick, onPreviousClick, onNextClick, renderPage, renderPageWrapper, renderPreviousPageDirection: propRenderPreviousPageDirection, renderNextPageDirection: propRenderNextPageDirection, renderTruncationIndicator, }: Props<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
35
|
+
Page: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<{
|
|
36
|
+
ref?: import("react").LegacyRef<HTMLButtonElement> | undefined;
|
|
37
|
+
key?: import("react").Key | null | undefined;
|
|
38
|
+
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & SxProp, "ref"> & {
|
|
36
39
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
37
40
|
}, PaginationPageProps>>;
|
|
38
41
|
PageDirection: import("styled-components").IStyledComponent<"web", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { SxProp } from '../utils/styled-system';
|
|
3
3
|
type Props = {} & ButtonHTMLAttributes<HTMLButtonElement> & SxProp;
|
|
4
|
-
declare const UnstyledButton: import("
|
|
4
|
+
declare const UnstyledButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Props>>;
|
|
5
5
|
export default UnstyledButton;
|
|
6
6
|
export type { Props as UnstyledButtonProps };
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,6 @@ var react = require('@floating-ui/react');
|
|
|
12
12
|
var behaviors = require('@primer/behaviors');
|
|
13
13
|
var debounce = require('lodash.debounce');
|
|
14
14
|
var ReactTextareaAutosize = require('react-textarea-autosize');
|
|
15
|
-
var reactKit = require('@teamturing/react-kit');
|
|
16
15
|
var throttle = require('lodash.throttle');
|
|
17
16
|
var tokenStudio = require('@teamturing/token-studio');
|
|
18
17
|
|
|
@@ -2098,19 +2097,13 @@ const Space = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2098
2097
|
componentId: "sc-4g4g8r-0"
|
|
2099
2098
|
})(["width:inherit;", ";", ""], space, sx);
|
|
2100
2099
|
|
|
2101
|
-
const
|
|
2102
|
-
displayName: "
|
|
2100
|
+
const UnstyledButton = /*#__PURE__*/styled__default.default.button.withConfig({
|
|
2101
|
+
displayName: "_UnstyledButton__UnstyledButton",
|
|
2103
2102
|
componentId: "sc-j96ib-0"
|
|
2104
2103
|
})(["background:none;border:0;padding:0;outline:none;cursor:pointer;", ""], sx);
|
|
2105
|
-
|
|
2106
|
-
type
|
|
2107
|
-
|
|
2108
|
-
}, ref) => /*#__PURE__*/jsxRuntime.jsx(BaseButton$1, {
|
|
2109
|
-
ref: ref,
|
|
2110
|
-
type: type,
|
|
2111
|
-
...props
|
|
2112
|
-
}));
|
|
2113
|
-
UnstyledButton.displayName = 'UnstyledButton';
|
|
2104
|
+
UnstyledButton.defaultProps = {
|
|
2105
|
+
type: 'button'
|
|
2106
|
+
};
|
|
2114
2107
|
|
|
2115
2108
|
function useTooltip({
|
|
2116
2109
|
initialOpen = false,
|
|
@@ -3708,9 +3701,11 @@ const Select = ({
|
|
|
3708
3701
|
validationStatus,
|
|
3709
3702
|
disabledPlaceholderOption = false,
|
|
3710
3703
|
leadingVisual: LeadingVisual,
|
|
3711
|
-
placeholder
|
|
3704
|
+
placeholder: propPlaceholder,
|
|
3712
3705
|
...props
|
|
3713
3706
|
}, ref) => {
|
|
3707
|
+
const theme = styled.useTheme();
|
|
3708
|
+
const placeholder = propPlaceholder ?? theme.locales?.Select?.placeholder ?? '옵션 선택';
|
|
3714
3709
|
const PLACEHOLDER_VALUE = '';
|
|
3715
3710
|
const selectRef = useProvidedOrCreatedRef(ref);
|
|
3716
3711
|
const [isValueEmpty, setIsValueEmpty] = React.useState(utils.isNullable(props.value) || props.value === PLACEHOLDER_VALUE);
|
|
@@ -3907,7 +3902,7 @@ var Switch$1 = /*#__PURE__*/React.forwardRef(Switch);
|
|
|
3907
3902
|
const Textarea = /*#__PURE__*/React.forwardRef(({
|
|
3908
3903
|
validationStatus,
|
|
3909
3904
|
disabled,
|
|
3910
|
-
renderCount = count => `${utils.commaizeNumber(count)}
|
|
3905
|
+
renderCount = count => `${utils.commaizeNumber(count)}`,
|
|
3911
3906
|
...props
|
|
3912
3907
|
}, ref) => {
|
|
3913
3908
|
const inputRef = useProvidedOrCreatedRef(ref);
|
|
@@ -4087,6 +4082,7 @@ const FormControlLabel = ({
|
|
|
4087
4082
|
disabled,
|
|
4088
4083
|
required
|
|
4089
4084
|
} = React.useContext(FormControlContext);
|
|
4085
|
+
const theme = styled.useTheme();
|
|
4090
4086
|
return /*#__PURE__*/jsxRuntime.jsx(VisuallyHidden$1, {
|
|
4091
4087
|
as: 'label',
|
|
4092
4088
|
htmlFor: id,
|
|
@@ -4102,7 +4098,7 @@ const FormControlLabel = ({
|
|
|
4102
4098
|
as: 'span',
|
|
4103
4099
|
className: 'form_control_label__required__false',
|
|
4104
4100
|
"aria-hidden": "true",
|
|
4105
|
-
children: ' (선택)'
|
|
4101
|
+
children: theme.locales?.FormControl?.optionalLabel ?? ' (선택)'
|
|
4106
4102
|
}) : null]
|
|
4107
4103
|
})
|
|
4108
4104
|
});
|
|
@@ -4531,6 +4527,7 @@ const CheckboxOrRadioGroupFormControlLabel = ({
|
|
|
4531
4527
|
disabled,
|
|
4532
4528
|
required
|
|
4533
4529
|
} = React.useContext(CheckboxOrRadioGroupFormControlContext);
|
|
4530
|
+
const theme = styled.useTheme();
|
|
4534
4531
|
return /*#__PURE__*/jsxRuntime.jsx(VisuallyHidden, {
|
|
4535
4532
|
as: 'label',
|
|
4536
4533
|
htmlFor: id,
|
|
@@ -4546,7 +4543,7 @@ const CheckboxOrRadioGroupFormControlLabel = ({
|
|
|
4546
4543
|
as: 'span',
|
|
4547
4544
|
className: 'checkbox_or_radio_group_form_control_label__required__false',
|
|
4548
4545
|
"aria-hidden": "true",
|
|
4549
|
-
children: ' (선택)'
|
|
4546
|
+
children: theme.locales?.FormControl?.optionalLabel ?? ' (선택)'
|
|
4550
4547
|
}) : null]
|
|
4551
4548
|
})
|
|
4552
4549
|
});
|
|
@@ -4558,7 +4555,7 @@ const VisuallyHidden = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
4558
4555
|
isVisible = false
|
|
4559
4556
|
}) => {
|
|
4560
4557
|
if (isVisible) {
|
|
4561
|
-
return
|
|
4558
|
+
return sx;
|
|
4562
4559
|
}
|
|
4563
4560
|
return `
|
|
4564
4561
|
position: absolute;
|
|
@@ -4587,7 +4584,7 @@ const LabelWrapper = /*#__PURE__*/styled__default.default(View).withConfig({
|
|
|
4587
4584
|
disabled
|
|
4588
4585
|
}) => disabled ? 'not-allowed' : 'pointer', ({
|
|
4589
4586
|
theme
|
|
4590
|
-
}) => theme.colors['text/neutral/subtlest'],
|
|
4587
|
+
}) => theme.colors['text/neutral/subtlest'], sx);
|
|
4591
4588
|
|
|
4592
4589
|
const CheckboxOrRadioGroupFormControlSuccessMessage = ({
|
|
4593
4590
|
children
|
|
@@ -4666,7 +4663,7 @@ const CheckboxOrRadioGroupFormControl = ({
|
|
|
4666
4663
|
sx,
|
|
4667
4664
|
...props
|
|
4668
4665
|
}, ref) => {
|
|
4669
|
-
const [relocatableComponentsObject, restComponents] =
|
|
4666
|
+
const [relocatableComponentsObject, restComponents] = useRelocation({
|
|
4670
4667
|
children: propChildren,
|
|
4671
4668
|
config: {
|
|
4672
4669
|
label: CheckboxOrRadioGroupFormControlLabel,
|
|
@@ -6590,22 +6587,25 @@ const Pagination = ({
|
|
|
6590
6587
|
}, i) => /*#__PURE__*/jsxRuntime.jsx(React.Fragment, {
|
|
6591
6588
|
children: children
|
|
6592
6589
|
}, [label, i].join('-')),
|
|
6593
|
-
renderPreviousPageDirection
|
|
6590
|
+
renderPreviousPageDirection: propRenderPreviousPageDirection,
|
|
6591
|
+
renderNextPageDirection: propRenderNextPageDirection,
|
|
6592
|
+
renderTruncationIndicator = () => /*#__PURE__*/jsxRuntime.jsx(PaginationTruncationIndicator, {
|
|
6593
|
+
children: "\u2026"
|
|
6594
|
+
})
|
|
6595
|
+
}) => {
|
|
6596
|
+
const theme = styled.useTheme();
|
|
6597
|
+
const renderPreviousPageDirection = propRenderPreviousPageDirection ?? (({
|
|
6594
6598
|
previousPageDirectionProps
|
|
6595
6599
|
}) => /*#__PURE__*/jsxRuntime.jsxs(PaginationPageDirection, {
|
|
6596
6600
|
...previousPageDirectionProps,
|
|
6597
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeftIcon, {}),
|
|
6598
|
-
})
|
|
6599
|
-
renderNextPageDirection = ({
|
|
6601
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeftIcon, {}), theme.locales?.Pagination?.previous ?? '이전']
|
|
6602
|
+
}));
|
|
6603
|
+
const renderNextPageDirection = propRenderNextPageDirection ?? (({
|
|
6600
6604
|
nextPageDirectionProps
|
|
6601
6605
|
}) => /*#__PURE__*/jsxRuntime.jsxs(PaginationPageDirection, {
|
|
6602
6606
|
...nextPageDirectionProps,
|
|
6603
|
-
children: [
|
|
6604
|
-
})
|
|
6605
|
-
renderTruncationIndicator = () => /*#__PURE__*/jsxRuntime.jsx(PaginationTruncationIndicator, {
|
|
6606
|
-
children: "\u2026"
|
|
6607
|
-
})
|
|
6608
|
-
}) => {
|
|
6607
|
+
children: [theme.locales?.Pagination?.next ?? '다음', /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRightIcon, {})]
|
|
6608
|
+
}));
|
|
6609
6609
|
const CURRENT_PAGE_COUNT = 1;
|
|
6610
6610
|
const totalVisiblePageCount = CURRENT_PAGE_COUNT + 2 * aroundPageCount + 2 * edgePageCount;
|
|
6611
6611
|
const pages = propPages.map((page, i) => ({
|
|
@@ -7369,6 +7369,22 @@ const theme = {
|
|
|
7369
7369
|
spinner: {
|
|
7370
7370
|
defaultVariant: 'progress-gradient'
|
|
7371
7371
|
}
|
|
7372
|
+
},
|
|
7373
|
+
locales: {
|
|
7374
|
+
FormControl: {
|
|
7375
|
+
optionalLabel: ' (선택)'
|
|
7376
|
+
},
|
|
7377
|
+
Pagination: {
|
|
7378
|
+
previous: '이전',
|
|
7379
|
+
next: '다음'
|
|
7380
|
+
},
|
|
7381
|
+
Select: {
|
|
7382
|
+
placeholder: '옵션 선택'
|
|
7383
|
+
},
|
|
7384
|
+
UploadInput: {
|
|
7385
|
+
placeholder: '파일을 끌어다 놓으세요',
|
|
7386
|
+
selectFile: '파일 선택'
|
|
7387
|
+
}
|
|
7372
7388
|
}
|
|
7373
7389
|
};
|
|
7374
7390
|
const gpaiLightTheme = {
|
|
@@ -7473,13 +7489,15 @@ const BaseToast = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
7473
7489
|
|
|
7474
7490
|
const UploadInput = ({
|
|
7475
7491
|
buttonProps: propsButtonProps,
|
|
7476
|
-
placeholder
|
|
7492
|
+
placeholder: propPlaceholder,
|
|
7477
7493
|
accept,
|
|
7478
7494
|
disabled,
|
|
7479
7495
|
...props
|
|
7480
7496
|
}, ref) => {
|
|
7497
|
+
const theme = styled.useTheme();
|
|
7498
|
+
const placeholder = propPlaceholder ?? theme.locales?.UploadInput?.placeholder ?? '파일을 끌어다 놓으세요';
|
|
7481
7499
|
const defaultButtonProps = {
|
|
7482
|
-
children: '파일 선택',
|
|
7500
|
+
children: theme.locales?.UploadInput?.selectFile ?? '파일 선택',
|
|
7483
7501
|
size: 's',
|
|
7484
7502
|
variant: 'neutral'
|
|
7485
7503
|
};
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -310,6 +310,22 @@ declare const theme: {
|
|
|
310
310
|
defaultVariant: "progress-gradient";
|
|
311
311
|
};
|
|
312
312
|
};
|
|
313
|
+
locales: {
|
|
314
|
+
FormControl: {
|
|
315
|
+
optionalLabel: string;
|
|
316
|
+
};
|
|
317
|
+
Pagination: {
|
|
318
|
+
previous: string;
|
|
319
|
+
next: string;
|
|
320
|
+
};
|
|
321
|
+
Select: {
|
|
322
|
+
placeholder: string;
|
|
323
|
+
};
|
|
324
|
+
UploadInput: {
|
|
325
|
+
placeholder: string;
|
|
326
|
+
selectFile: string;
|
|
327
|
+
};
|
|
328
|
+
};
|
|
313
329
|
};
|
|
314
330
|
declare const gpaiLightTheme: {
|
|
315
331
|
colors: {
|
|
@@ -623,6 +639,22 @@ declare const gpaiLightTheme: {
|
|
|
623
639
|
opacity: {
|
|
624
640
|
readonly disabled: number;
|
|
625
641
|
};
|
|
642
|
+
locales: {
|
|
643
|
+
FormControl: {
|
|
644
|
+
optionalLabel: string;
|
|
645
|
+
};
|
|
646
|
+
Pagination: {
|
|
647
|
+
previous: string;
|
|
648
|
+
next: string;
|
|
649
|
+
};
|
|
650
|
+
Select: {
|
|
651
|
+
placeholder: string;
|
|
652
|
+
};
|
|
653
|
+
UploadInput: {
|
|
654
|
+
placeholder: string;
|
|
655
|
+
selectFile: string;
|
|
656
|
+
};
|
|
657
|
+
};
|
|
626
658
|
};
|
|
627
659
|
declare const gpaiDarkTheme: {
|
|
628
660
|
colors: {
|
|
@@ -936,6 +968,22 @@ declare const gpaiDarkTheme: {
|
|
|
936
968
|
opacity: {
|
|
937
969
|
readonly disabled: number;
|
|
938
970
|
};
|
|
971
|
+
locales: {
|
|
972
|
+
FormControl: {
|
|
973
|
+
optionalLabel: string;
|
|
974
|
+
};
|
|
975
|
+
Pagination: {
|
|
976
|
+
previous: string;
|
|
977
|
+
next: string;
|
|
978
|
+
};
|
|
979
|
+
Select: {
|
|
980
|
+
placeholder: string;
|
|
981
|
+
};
|
|
982
|
+
UploadInput: {
|
|
983
|
+
placeholder: string;
|
|
984
|
+
selectFile: string;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
939
987
|
};
|
|
940
988
|
export default theme;
|
|
941
989
|
export { gpaiLightTheme, gpaiDarkTheme };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { sx } from '@teamturing/react-kit';
|
|
2
1
|
import { forcePixelValue } from '@teamturing/utils';
|
|
3
2
|
import { useContext } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
3
|
+
import styled, { useTheme } from 'styled-components';
|
|
4
|
+
import { sx } from '../../utils/styled-system/index.js';
|
|
5
5
|
import View from '../View/index.js';
|
|
6
6
|
import { CheckboxOrRadioGroupFormControlContext } from './index.js';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -16,6 +16,7 @@ const CheckboxOrRadioGroupFormControlLabel = ({
|
|
|
16
16
|
disabled,
|
|
17
17
|
required
|
|
18
18
|
} = useContext(CheckboxOrRadioGroupFormControlContext);
|
|
19
|
+
const theme = useTheme();
|
|
19
20
|
return /*#__PURE__*/jsx(VisuallyHidden, {
|
|
20
21
|
as: 'label',
|
|
21
22
|
htmlFor: id,
|
|
@@ -31,7 +32,7 @@ const CheckboxOrRadioGroupFormControlLabel = ({
|
|
|
31
32
|
as: 'span',
|
|
32
33
|
className: 'checkbox_or_radio_group_form_control_label__required__false',
|
|
33
34
|
"aria-hidden": "true",
|
|
34
|
-
children: ' (선택)'
|
|
35
|
+
children: theme.locales?.FormControl?.optionalLabel ?? ' (선택)'
|
|
35
36
|
}) : null]
|
|
36
37
|
})
|
|
37
38
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useRelocation } from '@teamturing/react-kit';
|
|
2
1
|
import { forwardRef, createContext, isValidElement, cloneElement } from 'react';
|
|
2
|
+
import useRelocation from '../../hook/useRelocation.js';
|
|
3
3
|
import CheckboxGroup from '../CheckboxGroup/index.js';
|
|
4
4
|
import RadioGroup from '../RadioGroup/index.js';
|
|
5
5
|
import View from '../View/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { forcePixelValue } from '@teamturing/utils';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
3
|
+
import styled, { useTheme } from 'styled-components';
|
|
4
4
|
import { sx } from '../../utils/styled-system/index.js';
|
|
5
5
|
import View from '../View/index.js';
|
|
6
6
|
import { FormControlContext } from './index.js';
|
|
@@ -16,6 +16,7 @@ const FormControlLabel = ({
|
|
|
16
16
|
disabled,
|
|
17
17
|
required
|
|
18
18
|
} = useContext(FormControlContext);
|
|
19
|
+
const theme = useTheme();
|
|
19
20
|
return /*#__PURE__*/jsx(VisuallyHidden, {
|
|
20
21
|
as: 'label',
|
|
21
22
|
htmlFor: id,
|
|
@@ -31,7 +32,7 @@ const FormControlLabel = ({
|
|
|
31
32
|
as: 'span',
|
|
32
33
|
className: 'form_control_label__required__false',
|
|
33
34
|
"aria-hidden": "true",
|
|
34
|
-
children: ' (선택)'
|
|
35
|
+
children: theme.locales?.FormControl?.optionalLabel ?? ' (선택)'
|
|
35
36
|
}) : null]
|
|
36
37
|
})
|
|
37
38
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChevronLeftIcon, ChevronRightIcon } from '@teamturing/icons';
|
|
2
2
|
import { forcePixelValue, noop } from '@teamturing/utils';
|
|
3
3
|
import { useCallback, Fragment } from 'react';
|
|
4
|
-
import styled, { css } from 'styled-components';
|
|
4
|
+
import styled, { css, useTheme } from 'styled-components';
|
|
5
5
|
import '../../node_modules/styled-system/dist/index.esm.js';
|
|
6
6
|
import { sx } from '../../utils/styled-system/index.js';
|
|
7
7
|
import UnstyledButton from '../_UnstyledButton.js';
|
|
@@ -29,22 +29,25 @@ const Pagination = ({
|
|
|
29
29
|
}, i) => /*#__PURE__*/jsx(Fragment, {
|
|
30
30
|
children: children
|
|
31
31
|
}, [label, i].join('-')),
|
|
32
|
-
renderPreviousPageDirection
|
|
32
|
+
renderPreviousPageDirection: propRenderPreviousPageDirection,
|
|
33
|
+
renderNextPageDirection: propRenderNextPageDirection,
|
|
34
|
+
renderTruncationIndicator = () => /*#__PURE__*/jsx(PaginationTruncationIndicator, {
|
|
35
|
+
children: "\u2026"
|
|
36
|
+
})
|
|
37
|
+
}) => {
|
|
38
|
+
const theme = useTheme();
|
|
39
|
+
const renderPreviousPageDirection = propRenderPreviousPageDirection ?? (({
|
|
33
40
|
previousPageDirectionProps
|
|
34
41
|
}) => /*#__PURE__*/jsxs(PaginationPageDirection, {
|
|
35
42
|
...previousPageDirectionProps,
|
|
36
|
-
children: [/*#__PURE__*/jsx(ChevronLeftIcon, {}),
|
|
37
|
-
})
|
|
38
|
-
renderNextPageDirection = ({
|
|
43
|
+
children: [/*#__PURE__*/jsx(ChevronLeftIcon, {}), theme.locales?.Pagination?.previous ?? '이전']
|
|
44
|
+
}));
|
|
45
|
+
const renderNextPageDirection = propRenderNextPageDirection ?? (({
|
|
39
46
|
nextPageDirectionProps
|
|
40
47
|
}) => /*#__PURE__*/jsxs(PaginationPageDirection, {
|
|
41
48
|
...nextPageDirectionProps,
|
|
42
|
-
children: [
|
|
43
|
-
})
|
|
44
|
-
renderTruncationIndicator = () => /*#__PURE__*/jsx(PaginationTruncationIndicator, {
|
|
45
|
-
children: "\u2026"
|
|
46
|
-
})
|
|
47
|
-
}) => {
|
|
49
|
+
children: [theme.locales?.Pagination?.next ?? '다음', /*#__PURE__*/jsx(ChevronRightIcon, {})]
|
|
50
|
+
}));
|
|
48
51
|
const CURRENT_PAGE_COUNT = 1;
|
|
49
52
|
const totalVisiblePageCount = CURRENT_PAGE_COUNT + 2 * aroundPageCount + 2 * edgePageCount;
|
|
50
53
|
const pages = propPages.map((page, i) => ({
|
package/esm/core/Select/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { ChevronDownIcon } from '@teamturing/icons';
|
|
|
2
2
|
import { forcePixelValue, isNullable, isFunction } from '@teamturing/utils';
|
|
3
3
|
import { forwardRef, useState, useEffect } from 'react';
|
|
4
4
|
import { isValidElementType } from 'react-is';
|
|
5
|
-
import styled, { css } from 'styled-components';
|
|
5
|
+
import styled, { css, useTheme } from 'styled-components';
|
|
6
6
|
import useProvidedOrCreatedRef from '../../hook/useProvidedOrCreatedRef.js';
|
|
7
7
|
import StyledIcon from '../StyledIcon/index.js';
|
|
8
8
|
import View from '../View/index.js';
|
|
@@ -15,9 +15,11 @@ const Select = ({
|
|
|
15
15
|
validationStatus,
|
|
16
16
|
disabledPlaceholderOption = false,
|
|
17
17
|
leadingVisual: LeadingVisual,
|
|
18
|
-
placeholder
|
|
18
|
+
placeholder: propPlaceholder,
|
|
19
19
|
...props
|
|
20
20
|
}, ref) => {
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const placeholder = propPlaceholder ?? theme.locales?.Select?.placeholder ?? '옵션 선택';
|
|
21
23
|
const PLACEHOLDER_VALUE = '';
|
|
22
24
|
const selectRef = useProvidedOrCreatedRef(ref);
|
|
23
25
|
const [isValueEmpty, setIsValueEmpty] = useState(isNullable(props.value) || props.value === PLACEHOLDER_VALUE);
|
|
@@ -8,7 +8,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
8
8
|
const Textarea = /*#__PURE__*/forwardRef(({
|
|
9
9
|
validationStatus,
|
|
10
10
|
disabled,
|
|
11
|
-
renderCount = count => `${commaizeNumber(count)}
|
|
11
|
+
renderCount = count => `${commaizeNumber(count)}`,
|
|
12
12
|
...props
|
|
13
13
|
}, ref) => {
|
|
14
14
|
const inputRef = useProvidedOrCreatedRef(ref);
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { ShareIcon } from '@teamturing/icons';
|
|
2
2
|
import { forcePixelValue } from '@teamturing/utils';
|
|
3
3
|
import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
4
|
+
import styled, { useTheme } from 'styled-components';
|
|
5
5
|
import Button from '../Button/index.js';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
const UploadInput = ({
|
|
9
9
|
buttonProps: propsButtonProps,
|
|
10
|
-
placeholder
|
|
10
|
+
placeholder: propPlaceholder,
|
|
11
11
|
accept,
|
|
12
12
|
disabled,
|
|
13
13
|
...props
|
|
14
14
|
}, ref) => {
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
const placeholder = propPlaceholder ?? theme.locales?.UploadInput?.placeholder ?? '파일을 끌어다 놓으세요';
|
|
15
17
|
const defaultButtonProps = {
|
|
16
|
-
children: '파일 선택',
|
|
18
|
+
children: theme.locales?.UploadInput?.selectFile ?? '파일 선택',
|
|
17
19
|
size: 's',
|
|
18
20
|
variant: 'neutral'
|
|
19
21
|
};
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
1
|
import styled from 'styled-components';
|
|
3
2
|
import { sx } from '../utils/styled-system/index.js';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
3
|
|
|
6
|
-
const
|
|
7
|
-
displayName: "
|
|
4
|
+
const UnstyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
5
|
+
displayName: "_UnstyledButton__UnstyledButton",
|
|
8
6
|
componentId: "sc-j96ib-0"
|
|
9
7
|
})(["background:none;border:0;padding:0;outline:none;cursor:pointer;", ""], sx);
|
|
10
|
-
|
|
11
|
-
type
|
|
12
|
-
|
|
13
|
-
}, ref) => /*#__PURE__*/jsx(BaseButton, {
|
|
14
|
-
ref: ref,
|
|
15
|
-
type: type,
|
|
16
|
-
...props
|
|
17
|
-
}));
|
|
18
|
-
UnstyledButton.displayName = 'UnstyledButton';
|
|
8
|
+
UnstyledButton.defaultProps = {
|
|
9
|
+
type: 'button'
|
|
10
|
+
};
|
|
19
11
|
|
|
20
12
|
export { UnstyledButton as default };
|
package/esm/theme/index.js
CHANGED
|
@@ -15,6 +15,22 @@ const theme = {
|
|
|
15
15
|
spinner: {
|
|
16
16
|
defaultVariant: 'progress-gradient'
|
|
17
17
|
}
|
|
18
|
+
},
|
|
19
|
+
locales: {
|
|
20
|
+
FormControl: {
|
|
21
|
+
optionalLabel: ' (선택)'
|
|
22
|
+
},
|
|
23
|
+
Pagination: {
|
|
24
|
+
previous: '이전',
|
|
25
|
+
next: '다음'
|
|
26
|
+
},
|
|
27
|
+
Select: {
|
|
28
|
+
placeholder: '옵션 선택'
|
|
29
|
+
},
|
|
30
|
+
UploadInput: {
|
|
31
|
+
placeholder: '파일을 끌어다 놓으세요',
|
|
32
|
+
selectFile: '파일 선택'
|
|
33
|
+
}
|
|
18
34
|
}
|
|
19
35
|
};
|
|
20
36
|
const gpaiLightTheme = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.63.0",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react-textarea-autosize": "^8.5.3",
|
|
66
66
|
"styled-system": "^5.1.5"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "23cd76c438448e0bd53514ef150933a1866207aa"
|
|
69
69
|
}
|