@teamturing/react-kit 2.45.1 → 2.45.3
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/HorizontalDivider/index.d.ts +3 -2
- package/dist/core/StyledIcon/index.d.ts +2 -2
- package/dist/core/TextInput/index.d.ts +4 -3
- package/dist/index.js +42 -6
- package/esm/core/ActionList/ActionListItem.js +8 -0
- package/esm/core/ActionList/ActionListSectionDivider.js +1 -0
- package/esm/core/ActionList/ActionListSectionHeader.js +1 -0
- package/esm/core/ActionList/index.js +1 -0
- package/esm/core/Button/index.js +6 -1
- package/esm/core/Chip/index.js +5 -1
- package/esm/core/HorizontalDivider/index.js +2 -0
- package/esm/core/Pill/index.js +10 -3
- package/esm/core/TextInput/index.js +9 -1
- package/package.json +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ColorKey, SurfaceElevationKey } from '@teamturing/token-studio';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
2
3
|
import { BorderColorProps, BorderProps, Theme } from 'styled-system';
|
|
3
4
|
import { SxProp } from '../../utils/styled-system';
|
|
4
5
|
type Props = {
|
|
5
6
|
width?: BorderProps['borderBottomWidth'];
|
|
6
7
|
color?: BorderColorProps<Theme, ColorKey | SurfaceElevationKey>['borderBottomColor'];
|
|
7
8
|
variant?: BorderProps['borderBottomStyle'];
|
|
8
|
-
} & SxProp
|
|
9
|
-
declare const HorizontalDivider: ({ width, color, variant, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
} & SxProp & Pick<HTMLAttributes<HTMLHRElement>, 'className'>;
|
|
10
|
+
declare const HorizontalDivider: ({ className, width, color, variant, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default HorizontalDivider;
|
|
11
12
|
export type { Props as HorizontalDividerProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ComponentType, SVGProps } from 'react';
|
|
1
|
+
import { ComponentType, HTMLAttributes, SVGProps } from 'react';
|
|
2
2
|
import { ViewProps } from '../View';
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
5
5
|
* @teamturing/icons와 함께 사용
|
|
6
6
|
*/
|
|
7
7
|
icon: ComponentType<SVGProps<SVGSVGElement>>;
|
|
8
|
-
} & Pick<ViewProps, 'size' | 'color' | 'sx'>;
|
|
8
|
+
} & Pick<ViewProps, 'size' | 'color' | 'sx'> & Pick<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
9
9
|
declare const StyledIcon: ({ icon: Icon, sx, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default StyledIcon;
|
|
11
11
|
export type { Props as StyledIconProps };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementType, HTMLProps, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { SxProp } from '../../utils/styled-system';
|
|
2
3
|
type Props = {
|
|
3
4
|
/**
|
|
4
5
|
* TODO asdf
|
|
@@ -16,7 +17,7 @@ type Props = {
|
|
|
16
17
|
* 입력 창 뒤에 사용작용할 요소를 정의합니다.
|
|
17
18
|
*/
|
|
18
19
|
trailingAction?: React.ReactElement<HTMLProps<HTMLButtonElement>>;
|
|
19
|
-
} & InputHTMLAttributes<HTMLInputElement
|
|
20
|
+
} & InputHTMLAttributes<HTMLInputElement> & SxProp;
|
|
20
21
|
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
21
22
|
/**
|
|
22
23
|
* TODO asdf
|
|
@@ -34,10 +35,10 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
34
35
|
* 입력 창 뒤에 사용작용할 요소를 정의합니다.
|
|
35
36
|
*/
|
|
36
37
|
trailingAction?: import("react").ReactElement<HTMLProps<HTMLButtonElement>, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
37
|
-
} & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>> & {
|
|
38
|
+
} & InputHTMLAttributes<HTMLInputElement> & SxProp & import("react").RefAttributes<HTMLInputElement>> & {
|
|
38
39
|
TrailingAction: import("react").ForwardRefExoticComponent<{
|
|
39
40
|
icon: import("react").ComponentType<import("react").SVGProps<SVGSVGElement>>;
|
|
40
|
-
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> &
|
|
41
|
+
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & SxProp & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
42
|
};
|
|
42
43
|
export default _default;
|
|
43
44
|
export type { Props as TextInputProps };
|
package/dist/index.js
CHANGED
|
@@ -7074,6 +7074,7 @@ const ActionListItem = ({
|
|
|
7074
7074
|
onFocus: onFocus,
|
|
7075
7075
|
onBlur: onBlur,
|
|
7076
7076
|
children: [!isNullable(selectionVariant) ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
7077
|
+
className: 'action_list_item__selection_wrapper',
|
|
7077
7078
|
display: 'inline-flex',
|
|
7078
7079
|
minWidth: 20,
|
|
7079
7080
|
sx: {
|
|
@@ -7083,9 +7084,11 @@ const ActionListItem = ({
|
|
|
7083
7084
|
}
|
|
7084
7085
|
},
|
|
7085
7086
|
children: selectionVariant === 'single' ? selected ? /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
|
|
7087
|
+
className: 'action_list_item__selection_wrapper_single',
|
|
7086
7088
|
icon: SvgCheck,
|
|
7087
7089
|
size: 20
|
|
7088
7090
|
}) : null : selectionVariant === 'multiple' ? /*#__PURE__*/jsxRuntimeExports.jsx(FakeCheckbox, {
|
|
7091
|
+
className: 'action_list_item__selection_wrapper_multiple',
|
|
7089
7092
|
"aria-checked": selected,
|
|
7090
7093
|
checked: selected,
|
|
7091
7094
|
onChange: noop$2,
|
|
@@ -7093,6 +7096,7 @@ const ActionListItem = ({
|
|
|
7093
7096
|
disabled: disabled
|
|
7094
7097
|
}) : null
|
|
7095
7098
|
}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(VisualWrapper, {
|
|
7099
|
+
className: 'action_list_item__leading_visual',
|
|
7096
7100
|
display: 'inline-flex',
|
|
7097
7101
|
flexShrink: 0,
|
|
7098
7102
|
sx: {
|
|
@@ -7102,18 +7106,21 @@ const ActionListItem = ({
|
|
|
7102
7106
|
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
7103
7107
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
7104
7108
|
flex: 1,
|
|
7109
|
+
className: 'action_list_item__content',
|
|
7105
7110
|
children: /*#__PURE__*/jsxRuntimeExports.jsxs(Grid$1, {
|
|
7106
7111
|
gapX: 2,
|
|
7107
7112
|
gapY: 0.5,
|
|
7108
7113
|
wrap: true,
|
|
7109
7114
|
alignItems: 'center',
|
|
7110
7115
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Grid$1.Unit, {
|
|
7116
|
+
className: 'action_list__content__children',
|
|
7111
7117
|
size: descriptionLayout === 'inline' ? 'min' : 1,
|
|
7112
7118
|
sx: {
|
|
7113
7119
|
fontWeight: description && descriptionLayout === 'block' ? 'bold' : 'medium'
|
|
7114
7120
|
},
|
|
7115
7121
|
children: children
|
|
7116
7122
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(Grid$1.Unit, {
|
|
7123
|
+
className: 'action_list_item__content__description',
|
|
7117
7124
|
size: descriptionLayout === 'inline' ? 'max' : 1,
|
|
7118
7125
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(Text, {
|
|
7119
7126
|
typography: 'xxs/regular',
|
|
@@ -7123,6 +7130,7 @@ const ActionListItem = ({
|
|
|
7123
7130
|
})]
|
|
7124
7131
|
})
|
|
7125
7132
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(VisualWrapper, {
|
|
7133
|
+
className: 'action_list_item__content__trailing_visual',
|
|
7126
7134
|
display: 'inline-flex',
|
|
7127
7135
|
flexShrink: 0,
|
|
7128
7136
|
sx: {
|
|
@@ -7307,11 +7315,13 @@ const FakeCheckbox = styled__default.default.div`
|
|
|
7307
7315
|
`;
|
|
7308
7316
|
|
|
7309
7317
|
const HorizontalDivider = ({
|
|
7318
|
+
className,
|
|
7310
7319
|
width = 1,
|
|
7311
7320
|
color = 'border/neutral',
|
|
7312
7321
|
variant = 'solid',
|
|
7313
7322
|
...props
|
|
7314
7323
|
}) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseHorizontalDivider, {
|
|
7324
|
+
className: className,
|
|
7315
7325
|
borderBottomWidth: width,
|
|
7316
7326
|
borderBottomStyle: variant,
|
|
7317
7327
|
borderBottomColor: color,
|
|
@@ -7335,6 +7345,7 @@ const ActionListSectionDivider = ({
|
|
|
7335
7345
|
width = 1,
|
|
7336
7346
|
sx
|
|
7337
7347
|
}) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseActionListSectionDivider, {
|
|
7348
|
+
className: 'action_list_section_divider',
|
|
7338
7349
|
color: color,
|
|
7339
7350
|
variant: variant,
|
|
7340
7351
|
width: width,
|
|
@@ -7349,6 +7360,7 @@ const ActionListSectionHeader = ({
|
|
|
7349
7360
|
...props
|
|
7350
7361
|
}) => {
|
|
7351
7362
|
return /*#__PURE__*/jsxRuntimeExports.jsx(BaseActionListSectionHeader, {
|
|
7363
|
+
className: 'action_list_setion_header',
|
|
7352
7364
|
role: 'presentation',
|
|
7353
7365
|
...props
|
|
7354
7366
|
});
|
|
@@ -7388,6 +7400,7 @@ const ActionList = ({
|
|
|
7388
7400
|
onSelect
|
|
7389
7401
|
},
|
|
7390
7402
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseActionList, {
|
|
7403
|
+
className: 'action_list',
|
|
7391
7404
|
role: 'menu',
|
|
7392
7405
|
...props
|
|
7393
7406
|
})
|
|
@@ -17173,7 +17186,11 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
17173
17186
|
columnGap: 1,
|
|
17174
17187
|
visibility: !loading ? 'initial' : 'hidden'
|
|
17175
17188
|
},
|
|
17176
|
-
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
17189
|
+
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
17190
|
+
className: 'button__leading_icon'
|
|
17191
|
+
}) : null, children, TrailingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingIcon, {
|
|
17192
|
+
className: 'button__trailing_icon'
|
|
17193
|
+
}) : null]
|
|
17177
17194
|
}), loading ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
17178
17195
|
sx: {
|
|
17179
17196
|
position: 'absolute',
|
|
@@ -17186,6 +17203,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
17186
17203
|
justifyContent: 'center'
|
|
17187
17204
|
},
|
|
17188
17205
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseSpinner, {
|
|
17206
|
+
className: 'button__spinner',
|
|
17189
17207
|
size: size,
|
|
17190
17208
|
variant: variant
|
|
17191
17209
|
})
|
|
@@ -17681,7 +17699,11 @@ const Chip = ({
|
|
|
17681
17699
|
variant: variant,
|
|
17682
17700
|
leadingIcon: LeadingIcon,
|
|
17683
17701
|
trailingIcon: TrailingIcon,
|
|
17684
|
-
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
17702
|
+
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
17703
|
+
className: 'chip__leading_icon'
|
|
17704
|
+
}) : null, children, TrailingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingIcon, {
|
|
17705
|
+
className: 'chip__trailing_icon'
|
|
17706
|
+
}) : null]
|
|
17685
17707
|
});
|
|
17686
17708
|
const BaseChip = styled__default.default.span(({
|
|
17687
17709
|
theme
|
|
@@ -35271,6 +35293,7 @@ const TextInput = ({
|
|
|
35271
35293
|
leadingVisual: LeadingVisual,
|
|
35272
35294
|
trailingVisual: TrailingVisual,
|
|
35273
35295
|
trailingAction,
|
|
35296
|
+
sx,
|
|
35274
35297
|
...props
|
|
35275
35298
|
}, ref) => {
|
|
35276
35299
|
const theme = styled.useTheme();
|
|
@@ -35285,6 +35308,7 @@ const TextInput = ({
|
|
|
35285
35308
|
hasTrailingVisual: !isNullable(TrailingVisual),
|
|
35286
35309
|
hasTrailingAction: !isNullable(trailingAction),
|
|
35287
35310
|
validationStatus: validationStatus,
|
|
35311
|
+
sx: sx,
|
|
35288
35312
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
35289
35313
|
sx: {
|
|
35290
35314
|
'flexShrink': 0,
|
|
@@ -35298,8 +35322,10 @@ const TextInput = ({
|
|
|
35298
35322
|
color: theme.colors['icon/neutral/bold']
|
|
35299
35323
|
}
|
|
35300
35324
|
},
|
|
35325
|
+
className: 'text_input__leading_visual',
|
|
35301
35326
|
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
35302
35327
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput$1, {
|
|
35328
|
+
className: 'text_input__base_input',
|
|
35303
35329
|
ref: e => {
|
|
35304
35330
|
isFunction$1(ref) ? ref(e) : null;
|
|
35305
35331
|
inputRef.current = e;
|
|
@@ -35323,8 +35349,9 @@ const TextInput = ({
|
|
|
35323
35349
|
color: theme.colors['icon/neutral/bold']
|
|
35324
35350
|
}
|
|
35325
35351
|
},
|
|
35352
|
+
className: 'text_input__trailing_visual',
|
|
35326
35353
|
children: [typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, trailingAction ? /*#__PURE__*/React.cloneElement(trailingAction, {
|
|
35327
|
-
disabled: disabled
|
|
35354
|
+
disabled: trailingAction.props.disabled || disabled
|
|
35328
35355
|
}) : null]
|
|
35329
35356
|
})]
|
|
35330
35357
|
});
|
|
@@ -35448,6 +35475,8 @@ const TextInputWrapper$1 = styled__default.default.div`
|
|
|
35448
35475
|
&:after {
|
|
35449
35476
|
transition: border-color 100ms;
|
|
35450
35477
|
}
|
|
35478
|
+
|
|
35479
|
+
${sx}
|
|
35451
35480
|
`;
|
|
35452
35481
|
const UnstyledInput$1 = styled__default.default.input`
|
|
35453
35482
|
font-size: inherit;
|
|
@@ -37942,9 +37971,14 @@ const Pill = ({
|
|
|
37942
37971
|
disabled: disabled,
|
|
37943
37972
|
...props,
|
|
37944
37973
|
type: 'button',
|
|
37945
|
-
children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {
|
|
37974
|
+
children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {
|
|
37975
|
+
className: 'pill__leading_visual'
|
|
37976
|
+
}) : LeadingVisual, /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
37946
37977
|
children: children
|
|
37947
|
-
}), typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {
|
|
37978
|
+
}), typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {
|
|
37979
|
+
className: 'pill__trailing_visual'
|
|
37980
|
+
}) : TrailingVisual, propOnRemove ? /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
37981
|
+
className: 'pill__remove_button',
|
|
37948
37982
|
onClick: e => {
|
|
37949
37983
|
e.preventDefault();
|
|
37950
37984
|
handleRemoveClick(e);
|
|
@@ -37962,7 +37996,9 @@ const Pill = ({
|
|
|
37962
37996
|
role: 'button',
|
|
37963
37997
|
"aria-disabled": disabled,
|
|
37964
37998
|
tabIndex: disabled ? -1 : 0,
|
|
37965
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(RemoveIcon, {
|
|
37999
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(RemoveIcon, {
|
|
38000
|
+
className: 'pill__remove_button__icon'
|
|
38001
|
+
})
|
|
37966
38002
|
}) : null]
|
|
37967
38003
|
});
|
|
37968
38004
|
};
|
|
@@ -63,6 +63,7 @@ const ActionListItem = ({
|
|
|
63
63
|
onFocus: onFocus,
|
|
64
64
|
onBlur: onBlur,
|
|
65
65
|
children: [!isNullable(selectionVariant) ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
66
|
+
className: 'action_list_item__selection_wrapper',
|
|
66
67
|
display: 'inline-flex',
|
|
67
68
|
minWidth: 20,
|
|
68
69
|
sx: {
|
|
@@ -72,9 +73,11 @@ const ActionListItem = ({
|
|
|
72
73
|
}
|
|
73
74
|
},
|
|
74
75
|
children: selectionVariant === 'single' ? selected ? /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
|
|
76
|
+
className: 'action_list_item__selection_wrapper_single',
|
|
75
77
|
icon: SvgCheck,
|
|
76
78
|
size: 20
|
|
77
79
|
}) : null : selectionVariant === 'multiple' ? /*#__PURE__*/jsxRuntimeExports.jsx(FakeCheckbox, {
|
|
80
|
+
className: 'action_list_item__selection_wrapper_multiple',
|
|
78
81
|
"aria-checked": selected,
|
|
79
82
|
checked: selected,
|
|
80
83
|
onChange: noop,
|
|
@@ -82,6 +85,7 @@ const ActionListItem = ({
|
|
|
82
85
|
disabled: disabled
|
|
83
86
|
}) : null
|
|
84
87
|
}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(VisualWrapper, {
|
|
88
|
+
className: 'action_list_item__leading_visual',
|
|
85
89
|
display: 'inline-flex',
|
|
86
90
|
flexShrink: 0,
|
|
87
91
|
sx: {
|
|
@@ -91,18 +95,21 @@ const ActionListItem = ({
|
|
|
91
95
|
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
92
96
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
93
97
|
flex: 1,
|
|
98
|
+
className: 'action_list_item__content',
|
|
94
99
|
children: /*#__PURE__*/jsxRuntimeExports.jsxs(Grid, {
|
|
95
100
|
gapX: 2,
|
|
96
101
|
gapY: 0.5,
|
|
97
102
|
wrap: true,
|
|
98
103
|
alignItems: 'center',
|
|
99
104
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Grid.Unit, {
|
|
105
|
+
className: 'action_list__content__children',
|
|
100
106
|
size: descriptionLayout === 'inline' ? 'min' : 1,
|
|
101
107
|
sx: {
|
|
102
108
|
fontWeight: description && descriptionLayout === 'block' ? 'bold' : 'medium'
|
|
103
109
|
},
|
|
104
110
|
children: children
|
|
105
111
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(Grid.Unit, {
|
|
112
|
+
className: 'action_list_item__content__description',
|
|
106
113
|
size: descriptionLayout === 'inline' ? 'max' : 1,
|
|
107
114
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(Text, {
|
|
108
115
|
typography: 'xxs/regular',
|
|
@@ -112,6 +119,7 @@ const ActionListItem = ({
|
|
|
112
119
|
})]
|
|
113
120
|
})
|
|
114
121
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(VisualWrapper, {
|
|
122
|
+
className: 'action_list_item__content__trailing_visual',
|
|
115
123
|
display: 'inline-flex',
|
|
116
124
|
flexShrink: 0,
|
|
117
125
|
sx: {
|
package/esm/core/Button/index.js
CHANGED
|
@@ -40,7 +40,11 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
40
40
|
columnGap: 1,
|
|
41
41
|
visibility: !loading ? 'initial' : 'hidden'
|
|
42
42
|
},
|
|
43
|
-
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
43
|
+
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
44
|
+
className: 'button__leading_icon'
|
|
45
|
+
}) : null, children, TrailingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingIcon, {
|
|
46
|
+
className: 'button__trailing_icon'
|
|
47
|
+
}) : null]
|
|
44
48
|
}), loading ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
45
49
|
sx: {
|
|
46
50
|
position: 'absolute',
|
|
@@ -53,6 +57,7 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
53
57
|
justifyContent: 'center'
|
|
54
58
|
},
|
|
55
59
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseSpinner, {
|
|
60
|
+
className: 'button__spinner',
|
|
56
61
|
size: size,
|
|
57
62
|
variant: variant
|
|
58
63
|
})
|
package/esm/core/Chip/index.js
CHANGED
|
@@ -17,7 +17,11 @@ const Chip = ({
|
|
|
17
17
|
variant: variant,
|
|
18
18
|
leadingIcon: LeadingIcon,
|
|
19
19
|
trailingIcon: TrailingIcon,
|
|
20
|
-
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
20
|
+
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {
|
|
21
|
+
className: 'chip__leading_icon'
|
|
22
|
+
}) : null, children, TrailingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingIcon, {
|
|
23
|
+
className: 'chip__trailing_icon'
|
|
24
|
+
}) : null]
|
|
21
25
|
});
|
|
22
26
|
const BaseChip = styled.span(({
|
|
23
27
|
theme
|
|
@@ -5,11 +5,13 @@ import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js'
|
|
|
5
5
|
import { border } from '../../node_modules/@styled-system/border/dist/index.esm.js';
|
|
6
6
|
|
|
7
7
|
const HorizontalDivider = ({
|
|
8
|
+
className,
|
|
8
9
|
width = 1,
|
|
9
10
|
color = 'border/neutral',
|
|
10
11
|
variant = 'solid',
|
|
11
12
|
...props
|
|
12
13
|
}) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseHorizontalDivider, {
|
|
14
|
+
className: className,
|
|
13
15
|
borderBottomWidth: width,
|
|
14
16
|
borderBottomStyle: variant,
|
|
15
17
|
borderBottomColor: color,
|
package/esm/core/Pill/index.js
CHANGED
|
@@ -43,9 +43,14 @@ const Pill = ({
|
|
|
43
43
|
disabled: disabled,
|
|
44
44
|
...props,
|
|
45
45
|
type: 'button',
|
|
46
|
-
children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {
|
|
46
|
+
children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {
|
|
47
|
+
className: 'pill__leading_visual'
|
|
48
|
+
}) : LeadingVisual, /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
47
49
|
children: children
|
|
48
|
-
}), typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {
|
|
50
|
+
}), typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {
|
|
51
|
+
className: 'pill__trailing_visual'
|
|
52
|
+
}) : TrailingVisual, propOnRemove ? /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
53
|
+
className: 'pill__remove_button',
|
|
49
54
|
onClick: e => {
|
|
50
55
|
e.preventDefault();
|
|
51
56
|
handleRemoveClick(e);
|
|
@@ -63,7 +68,9 @@ const Pill = ({
|
|
|
63
68
|
role: 'button',
|
|
64
69
|
"aria-disabled": disabled,
|
|
65
70
|
tabIndex: disabled ? -1 : 0,
|
|
66
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(RemoveIcon, {
|
|
71
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(RemoveIcon, {
|
|
72
|
+
className: 'pill__remove_button__icon'
|
|
73
|
+
})
|
|
67
74
|
}) : null]
|
|
68
75
|
});
|
|
69
76
|
};
|
|
@@ -5,6 +5,7 @@ import { forwardRef, cloneElement } from 'react';
|
|
|
5
5
|
import { r as reactIsExports } from '../../node_modules/react-is/index.js';
|
|
6
6
|
import styled, { css, useTheme } from 'styled-components';
|
|
7
7
|
import useProvidedOrCreatedRef from '../../hook/useProvidedOrCreatedRef.js';
|
|
8
|
+
import { sx } from '../../utils/styled-system/index.js';
|
|
8
9
|
import View from '../View/index.js';
|
|
9
10
|
import TextInputTrailingAction from './TextInputTrailingAction.js';
|
|
10
11
|
import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
|
|
@@ -16,6 +17,7 @@ const TextInput = ({
|
|
|
16
17
|
leadingVisual: LeadingVisual,
|
|
17
18
|
trailingVisual: TrailingVisual,
|
|
18
19
|
trailingAction,
|
|
20
|
+
sx,
|
|
19
21
|
...props
|
|
20
22
|
}, ref) => {
|
|
21
23
|
const theme = useTheme();
|
|
@@ -30,6 +32,7 @@ const TextInput = ({
|
|
|
30
32
|
hasTrailingVisual: !isNullable(TrailingVisual),
|
|
31
33
|
hasTrailingAction: !isNullable(trailingAction),
|
|
32
34
|
validationStatus: validationStatus,
|
|
35
|
+
sx: sx,
|
|
33
36
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
34
37
|
sx: {
|
|
35
38
|
'flexShrink': 0,
|
|
@@ -43,8 +46,10 @@ const TextInput = ({
|
|
|
43
46
|
color: theme.colors['icon/neutral/bold']
|
|
44
47
|
}
|
|
45
48
|
},
|
|
49
|
+
className: 'text_input__leading_visual',
|
|
46
50
|
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
47
51
|
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput, {
|
|
52
|
+
className: 'text_input__base_input',
|
|
48
53
|
ref: e => {
|
|
49
54
|
isFunction(ref) ? ref(e) : null;
|
|
50
55
|
inputRef.current = e;
|
|
@@ -68,8 +73,9 @@ const TextInput = ({
|
|
|
68
73
|
color: theme.colors['icon/neutral/bold']
|
|
69
74
|
}
|
|
70
75
|
},
|
|
76
|
+
className: 'text_input__trailing_visual',
|
|
71
77
|
children: [typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, trailingAction ? /*#__PURE__*/cloneElement(trailingAction, {
|
|
72
|
-
disabled: disabled
|
|
78
|
+
disabled: trailingAction.props.disabled || disabled
|
|
73
79
|
}) : null]
|
|
74
80
|
})]
|
|
75
81
|
});
|
|
@@ -193,6 +199,8 @@ const TextInputWrapper = styled.div`
|
|
|
193
199
|
&:after {
|
|
194
200
|
transition: border-color 100ms;
|
|
195
201
|
}
|
|
202
|
+
|
|
203
|
+
${sx}
|
|
196
204
|
`;
|
|
197
205
|
const UnstyledInput = styled.input`
|
|
198
206
|
font-size: inherit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.45.
|
|
3
|
+
"version": "2.45.3",
|
|
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",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "9ac3ab3d90fc93dfdd8124b7d2ba4d5c403896b4"
|
|
70
70
|
}
|