@teamturing/react-kit 2.62.3 → 2.63.1
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 +1 -1
- package/dist/index.js +44 -20
- 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/theme/index.js +16 -0
- package/package.json +3 -3
|
@@ -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,7 +31,7 @@ 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) & {
|
|
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
35
|
Page: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<{
|
|
36
36
|
ref?: import("react").LegacyRef<HTMLButtonElement> | undefined;
|
|
37
37
|
key?: import("react").Key | null | undefined;
|
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
|
|
|
@@ -3702,9 +3701,11 @@ const Select = ({
|
|
|
3702
3701
|
validationStatus,
|
|
3703
3702
|
disabledPlaceholderOption = false,
|
|
3704
3703
|
leadingVisual: LeadingVisual,
|
|
3705
|
-
placeholder
|
|
3704
|
+
placeholder: propPlaceholder,
|
|
3706
3705
|
...props
|
|
3707
3706
|
}, ref) => {
|
|
3707
|
+
const theme = styled.useTheme();
|
|
3708
|
+
const placeholder = propPlaceholder ?? theme.locales?.Select?.placeholder ?? '옵션 선택';
|
|
3708
3709
|
const PLACEHOLDER_VALUE = '';
|
|
3709
3710
|
const selectRef = useProvidedOrCreatedRef(ref);
|
|
3710
3711
|
const [isValueEmpty, setIsValueEmpty] = React.useState(utils.isNullable(props.value) || props.value === PLACEHOLDER_VALUE);
|
|
@@ -3901,7 +3902,7 @@ var Switch$1 = /*#__PURE__*/React.forwardRef(Switch);
|
|
|
3901
3902
|
const Textarea = /*#__PURE__*/React.forwardRef(({
|
|
3902
3903
|
validationStatus,
|
|
3903
3904
|
disabled,
|
|
3904
|
-
renderCount = count => `${utils.commaizeNumber(count)}
|
|
3905
|
+
renderCount = count => `${utils.commaizeNumber(count)}`,
|
|
3905
3906
|
...props
|
|
3906
3907
|
}, ref) => {
|
|
3907
3908
|
const inputRef = useProvidedOrCreatedRef(ref);
|
|
@@ -4081,6 +4082,7 @@ const FormControlLabel = ({
|
|
|
4081
4082
|
disabled,
|
|
4082
4083
|
required
|
|
4083
4084
|
} = React.useContext(FormControlContext);
|
|
4085
|
+
const theme = styled.useTheme();
|
|
4084
4086
|
return /*#__PURE__*/jsxRuntime.jsx(VisuallyHidden$1, {
|
|
4085
4087
|
as: 'label',
|
|
4086
4088
|
htmlFor: id,
|
|
@@ -4096,7 +4098,7 @@ const FormControlLabel = ({
|
|
|
4096
4098
|
as: 'span',
|
|
4097
4099
|
className: 'form_control_label__required__false',
|
|
4098
4100
|
"aria-hidden": "true",
|
|
4099
|
-
children: ' (선택)'
|
|
4101
|
+
children: theme.locales?.FormControl?.optionalLabel ?? ' (선택)'
|
|
4100
4102
|
}) : null]
|
|
4101
4103
|
})
|
|
4102
4104
|
});
|
|
@@ -4525,6 +4527,7 @@ const CheckboxOrRadioGroupFormControlLabel = ({
|
|
|
4525
4527
|
disabled,
|
|
4526
4528
|
required
|
|
4527
4529
|
} = React.useContext(CheckboxOrRadioGroupFormControlContext);
|
|
4530
|
+
const theme = styled.useTheme();
|
|
4528
4531
|
return /*#__PURE__*/jsxRuntime.jsx(VisuallyHidden, {
|
|
4529
4532
|
as: 'label',
|
|
4530
4533
|
htmlFor: id,
|
|
@@ -4540,7 +4543,7 @@ const CheckboxOrRadioGroupFormControlLabel = ({
|
|
|
4540
4543
|
as: 'span',
|
|
4541
4544
|
className: 'checkbox_or_radio_group_form_control_label__required__false',
|
|
4542
4545
|
"aria-hidden": "true",
|
|
4543
|
-
children: ' (선택)'
|
|
4546
|
+
children: theme.locales?.FormControl?.optionalLabel ?? ' (선택)'
|
|
4544
4547
|
}) : null]
|
|
4545
4548
|
})
|
|
4546
4549
|
});
|
|
@@ -4552,7 +4555,7 @@ const VisuallyHidden = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
4552
4555
|
isVisible = false
|
|
4553
4556
|
}) => {
|
|
4554
4557
|
if (isVisible) {
|
|
4555
|
-
return
|
|
4558
|
+
return sx;
|
|
4556
4559
|
}
|
|
4557
4560
|
return `
|
|
4558
4561
|
position: absolute;
|
|
@@ -4581,7 +4584,7 @@ const LabelWrapper = /*#__PURE__*/styled__default.default(View).withConfig({
|
|
|
4581
4584
|
disabled
|
|
4582
4585
|
}) => disabled ? 'not-allowed' : 'pointer', ({
|
|
4583
4586
|
theme
|
|
4584
|
-
}) => theme.colors['text/neutral/subtlest'],
|
|
4587
|
+
}) => theme.colors['text/neutral/subtlest'], sx);
|
|
4585
4588
|
|
|
4586
4589
|
const CheckboxOrRadioGroupFormControlSuccessMessage = ({
|
|
4587
4590
|
children
|
|
@@ -4660,7 +4663,7 @@ const CheckboxOrRadioGroupFormControl = ({
|
|
|
4660
4663
|
sx,
|
|
4661
4664
|
...props
|
|
4662
4665
|
}, ref) => {
|
|
4663
|
-
const [relocatableComponentsObject, restComponents] =
|
|
4666
|
+
const [relocatableComponentsObject, restComponents] = useRelocation({
|
|
4664
4667
|
children: propChildren,
|
|
4665
4668
|
config: {
|
|
4666
4669
|
label: CheckboxOrRadioGroupFormControlLabel,
|
|
@@ -6584,22 +6587,25 @@ const Pagination = ({
|
|
|
6584
6587
|
}, i) => /*#__PURE__*/jsxRuntime.jsx(React.Fragment, {
|
|
6585
6588
|
children: children
|
|
6586
6589
|
}, [label, i].join('-')),
|
|
6587
|
-
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 ?? (({
|
|
6588
6598
|
previousPageDirectionProps
|
|
6589
6599
|
}) => /*#__PURE__*/jsxRuntime.jsxs(PaginationPageDirection, {
|
|
6590
6600
|
...previousPageDirectionProps,
|
|
6591
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeftIcon, {}),
|
|
6592
|
-
})
|
|
6593
|
-
renderNextPageDirection = ({
|
|
6601
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(icons.ChevronLeftIcon, {}), theme.locales?.Pagination?.previous ?? '이전']
|
|
6602
|
+
}));
|
|
6603
|
+
const renderNextPageDirection = propRenderNextPageDirection ?? (({
|
|
6594
6604
|
nextPageDirectionProps
|
|
6595
6605
|
}) => /*#__PURE__*/jsxRuntime.jsxs(PaginationPageDirection, {
|
|
6596
6606
|
...nextPageDirectionProps,
|
|
6597
|
-
children: [
|
|
6598
|
-
})
|
|
6599
|
-
renderTruncationIndicator = () => /*#__PURE__*/jsxRuntime.jsx(PaginationTruncationIndicator, {
|
|
6600
|
-
children: "\u2026"
|
|
6601
|
-
})
|
|
6602
|
-
}) => {
|
|
6607
|
+
children: [theme.locales?.Pagination?.next ?? '다음', /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRightIcon, {})]
|
|
6608
|
+
}));
|
|
6603
6609
|
const CURRENT_PAGE_COUNT = 1;
|
|
6604
6610
|
const totalVisiblePageCount = CURRENT_PAGE_COUNT + 2 * aroundPageCount + 2 * edgePageCount;
|
|
6605
6611
|
const pages = propPages.map((page, i) => ({
|
|
@@ -7363,6 +7369,22 @@ const theme = {
|
|
|
7363
7369
|
spinner: {
|
|
7364
7370
|
defaultVariant: 'progress-gradient'
|
|
7365
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
|
+
}
|
|
7366
7388
|
}
|
|
7367
7389
|
};
|
|
7368
7390
|
const gpaiLightTheme = {
|
|
@@ -7467,13 +7489,15 @@ const BaseToast = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
7467
7489
|
|
|
7468
7490
|
const UploadInput = ({
|
|
7469
7491
|
buttonProps: propsButtonProps,
|
|
7470
|
-
placeholder
|
|
7492
|
+
placeholder: propPlaceholder,
|
|
7471
7493
|
accept,
|
|
7472
7494
|
disabled,
|
|
7473
7495
|
...props
|
|
7474
7496
|
}, ref) => {
|
|
7497
|
+
const theme = styled.useTheme();
|
|
7498
|
+
const placeholder = propPlaceholder ?? theme.locales?.UploadInput?.placeholder ?? '파일을 끌어다 놓으세요';
|
|
7475
7499
|
const defaultButtonProps = {
|
|
7476
|
-
children: '파일 선택',
|
|
7500
|
+
children: theme.locales?.UploadInput?.selectFile ?? '파일 선택',
|
|
7477
7501
|
size: 's',
|
|
7478
7502
|
variant: 'neutral'
|
|
7479
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
|
};
|
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.1",
|
|
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@floating-ui/react": "^0.27.16",
|
|
57
57
|
"@primer/behaviors": "^1.3.6",
|
|
58
|
-
"@teamturing/icons": "^1.
|
|
58
|
+
"@teamturing/icons": "^1.67.0",
|
|
59
59
|
"@teamturing/token-studio": "^1.16.4",
|
|
60
60
|
"@teamturing/utils": "^1.6.1",
|
|
61
61
|
"framer-motion": "^10.16.4",
|
|
@@ -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": "dce27efe7df72edb19fe6c70094e3aa0f9421c81"
|
|
69
69
|
}
|