@teamturing/react-kit 2.19.14 → 2.19.16
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/Dialog/index.d.ts +3 -1
- package/dist/core/FormControl/index.d.ts +1 -1
- package/dist/core/Pagination/index.d.ts +1 -1
- package/dist/core/{OverlaySelectInput → SearchSelectInput}/index.d.ts +20 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +431 -336
- package/esm/core/Dialog/index.js +2 -1
- package/esm/core/FormControl/index.js +2 -2
- package/esm/core/OverlayPopper/index.js +7 -0
- package/esm/core/Pagination/index.js +3 -0
- package/esm/core/Pill/index.js +1 -0
- package/esm/core/{OverlaySelectInput → SearchSelectInput}/index.js +127 -40
- package/esm/core/Tab/TabItem.js +1 -0
- package/esm/index.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18869,6 +18869,7 @@ const Dialog = ({
|
|
|
18869
18869
|
isOpen,
|
|
18870
18870
|
onDismiss,
|
|
18871
18871
|
size = 'm',
|
|
18872
|
+
initialFocusRef,
|
|
18872
18873
|
sx
|
|
18873
18874
|
}, ref) => {
|
|
18874
18875
|
const handleDismiss = React.useCallback(() => onDismiss?.(), [onDismiss]);
|
|
@@ -18891,7 +18892,7 @@ const Dialog = ({
|
|
|
18891
18892
|
}, [handleDismiss]);
|
|
18892
18893
|
useFocusTrap({
|
|
18893
18894
|
containerRef: dialogRef,
|
|
18894
|
-
initialFocusRef: closeButtonRef,
|
|
18895
|
+
initialFocusRef: initialFocusRef || closeButtonRef,
|
|
18895
18896
|
disabled: !isOpen
|
|
18896
18897
|
});
|
|
18897
18898
|
React.useEffect(() => {
|
|
@@ -20880,6 +20881,13 @@ const OverlayPopper = ({
|
|
|
20880
20881
|
};
|
|
20881
20882
|
const defaultPopperProps = {
|
|
20882
20883
|
onClick: handleOverlayToggle,
|
|
20884
|
+
onKeyDown: e => {
|
|
20885
|
+
if (['ArrowUp', 'ArrowDown'].includes(e.key)) {
|
|
20886
|
+
e.preventDefault();
|
|
20887
|
+
openOverlay();
|
|
20888
|
+
}
|
|
20889
|
+
e.stopPropagation();
|
|
20890
|
+
},
|
|
20883
20891
|
tabIndex: 0,
|
|
20884
20892
|
...{
|
|
20885
20893
|
ref: refs.setReference
|
|
@@ -20922,116 +20930,118 @@ const OverlayPopper = ({
|
|
|
20922
20930
|
});
|
|
20923
20931
|
};
|
|
20924
20932
|
|
|
20925
|
-
const
|
|
20933
|
+
const TextInputTrailingAction = ({
|
|
20934
|
+
icon: Icon,
|
|
20935
|
+
disabled,
|
|
20936
|
+
...props
|
|
20937
|
+
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextInputTrailingAction, {
|
|
20938
|
+
ref: ref,
|
|
20939
|
+
...props,
|
|
20940
|
+
disabled: disabled,
|
|
20941
|
+
"aria-disabled": disabled,
|
|
20942
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
|
|
20943
|
+
});
|
|
20944
|
+
const BaseTextInputTrailingAction = styled__default.default(UnstyledButton)`
|
|
20945
|
+
display: inline-flex;
|
|
20946
|
+
padding: ${({
|
|
20947
|
+
theme
|
|
20948
|
+
}) => forcePixelValue(theme.space[2])};
|
|
20949
|
+
background-color: ${({
|
|
20950
|
+
theme
|
|
20951
|
+
}) => theme.colors['bg/neutral/subtler']};
|
|
20952
|
+
border-radius: ${({
|
|
20953
|
+
theme
|
|
20954
|
+
}) => forcePixelValue(theme.radii.full)};
|
|
20955
|
+
|
|
20956
|
+
& svg {
|
|
20957
|
+
width: ${forcePixelValue(16)};
|
|
20958
|
+
height: ${forcePixelValue(16)};
|
|
20959
|
+
color: ${({
|
|
20960
|
+
theme
|
|
20961
|
+
}) => theme.colors['icon/neutral/bolder']};
|
|
20962
|
+
}
|
|
20963
|
+
|
|
20964
|
+
&:hover {
|
|
20965
|
+
background-color: ${({
|
|
20966
|
+
theme
|
|
20967
|
+
}) => theme.colors['bg/neutral/subtler/hovered']};
|
|
20968
|
+
}
|
|
20969
|
+
|
|
20970
|
+
&[aria-disabled='true'] {
|
|
20971
|
+
cursor: not-allowed;
|
|
20972
|
+
& svg {
|
|
20973
|
+
color: ${({
|
|
20974
|
+
theme
|
|
20975
|
+
}) => theme.colors['icon/disabled']};
|
|
20976
|
+
}
|
|
20977
|
+
}
|
|
20978
|
+
|
|
20979
|
+
${sx}
|
|
20980
|
+
`;
|
|
20981
|
+
var TextInputTrailingAction$1 = /*#__PURE__*/React.forwardRef(TextInputTrailingAction);
|
|
20982
|
+
|
|
20983
|
+
const TextInput = ({
|
|
20984
|
+
type = 'text',
|
|
20985
|
+
disabled,
|
|
20926
20986
|
validationStatus,
|
|
20927
20987
|
leadingVisual: LeadingVisual,
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
focusTrapSettings,
|
|
20931
|
-
focusZoneSettings,
|
|
20932
|
-
onOpen,
|
|
20933
|
-
onClose,
|
|
20988
|
+
trailingVisual: TrailingVisual,
|
|
20989
|
+
trailingAction,
|
|
20934
20990
|
...props
|
|
20935
20991
|
}, ref) => {
|
|
20936
|
-
const
|
|
20937
|
-
const labelInputRef = React.useRef(null);
|
|
20992
|
+
const inputRef = useProvidedOrCreatedRef(ref);
|
|
20938
20993
|
const focusInput = () => {
|
|
20939
|
-
|
|
20940
|
-
};
|
|
20941
|
-
const {
|
|
20942
|
-
id,
|
|
20943
|
-
disabled,
|
|
20944
|
-
placeholder
|
|
20945
|
-
} = props;
|
|
20946
|
-
const handleSelect = item => {
|
|
20947
|
-
if (labelInputRef.current && valueInputRef.current) {
|
|
20948
|
-
labelInputRef.current.setAttribute('value', item.label);
|
|
20949
|
-
|
|
20950
|
-
/**
|
|
20951
|
-
* ! valueInput의 native onChange를 trigger하려고 했으나 작동하지 않음.
|
|
20952
|
-
* ! 일단 Custom onChange를 만들어서 해결.
|
|
20953
|
-
*/
|
|
20954
|
-
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value')?.set;
|
|
20955
|
-
nativeInputValueSetter?.call(valueInputRef.current, item.value.toString());
|
|
20956
|
-
onChange?.(item);
|
|
20957
|
-
}
|
|
20994
|
+
inputRef.current?.focus();
|
|
20958
20995
|
};
|
|
20959
|
-
return /*#__PURE__*/jsxRuntimeExports.
|
|
20960
|
-
|
|
20961
|
-
|
|
20962
|
-
|
|
20963
|
-
|
|
20964
|
-
|
|
20965
|
-
|
|
20966
|
-
|
|
20967
|
-
|
|
20968
|
-
|
|
20969
|
-
|
|
20970
|
-
|
|
20996
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(TextInputWrapper$1, {
|
|
20997
|
+
disabled: disabled,
|
|
20998
|
+
onClick: focusInput,
|
|
20999
|
+
hasLeadingVisual: !isNullable(LeadingVisual),
|
|
21000
|
+
hasTrailingVisual: !isNullable(TrailingVisual),
|
|
21001
|
+
hasTrailingAction: !isNullable(trailingAction),
|
|
21002
|
+
validationStatus: validationStatus,
|
|
21003
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21004
|
+
sx: {
|
|
21005
|
+
'flexShrink': 0,
|
|
21006
|
+
'fontSize': 'xxs',
|
|
21007
|
+
'fontWeight': 'medium',
|
|
21008
|
+
'color': color$1['text/neutral'],
|
|
21009
|
+
'& > svg': {
|
|
21010
|
+
display: 'block',
|
|
21011
|
+
width: 16,
|
|
21012
|
+
height: 16,
|
|
21013
|
+
color: color$1['icon/neutral/bold']
|
|
21014
|
+
}
|
|
20971
21015
|
},
|
|
20972
|
-
children:
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
|
|
20979
|
-
...popperProps,
|
|
20980
|
-
tabIndex: disabled ? -1 : 0,
|
|
21016
|
+
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
21017
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput$1, {
|
|
21018
|
+
ref: e => {
|
|
21019
|
+
isFunction(ref) ? ref(e) : null;
|
|
21020
|
+
inputRef.current = e;
|
|
21021
|
+
},
|
|
21022
|
+
type: type,
|
|
20981
21023
|
disabled: disabled,
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
21024
|
+
...props
|
|
21025
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
21026
|
+
sx: {
|
|
21027
|
+
'display': 'flex',
|
|
21028
|
+
'alignItems': 'center',
|
|
21029
|
+
'columnGap': 2,
|
|
21030
|
+
'flexShrink': 0,
|
|
21031
|
+
'fontSize': 'xxs',
|
|
21032
|
+
'fontWeight': 'medium',
|
|
21033
|
+
'color': color$1['text/neutral'],
|
|
21034
|
+
'& > svg': {
|
|
21035
|
+
display: 'block',
|
|
21036
|
+
width: 16,
|
|
21037
|
+
height: 16,
|
|
21038
|
+
color: color$1['icon/neutral/bold']
|
|
20989
21039
|
}
|
|
20990
21040
|
},
|
|
20991
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(
|
|
20992
|
-
|
|
20993
|
-
|
|
20994
|
-
|
|
20995
|
-
'fontWeight': 'medium',
|
|
20996
|
-
'color': 'text/neutral',
|
|
20997
|
-
'& > svg': {
|
|
20998
|
-
display: 'block',
|
|
20999
|
-
width: 16,
|
|
21000
|
-
height: 16,
|
|
21001
|
-
color: 'icon/neutral/bold'
|
|
21002
|
-
}
|
|
21003
|
-
},
|
|
21004
|
-
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
21005
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput$1, {
|
|
21006
|
-
id: id,
|
|
21007
|
-
ref: labelInputRef,
|
|
21008
|
-
onChange: noop$2,
|
|
21009
|
-
autoComplete: 'off',
|
|
21010
|
-
tabIndex: -1,
|
|
21011
|
-
onClick: e => {
|
|
21012
|
-
popperProps.onClick?.(e);
|
|
21013
|
-
props.onClick?.(e);
|
|
21014
|
-
},
|
|
21015
|
-
placeholder: placeholder
|
|
21016
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
|
|
21017
|
-
sx: {
|
|
21018
|
-
position: 'absolute',
|
|
21019
|
-
top: '50%',
|
|
21020
|
-
transform: 'translateY(-50%)',
|
|
21021
|
-
right: 4,
|
|
21022
|
-
pointerEvents: 'none'
|
|
21023
|
-
},
|
|
21024
|
-
icon: SvgChevronDown,
|
|
21025
|
-
color: disabled ? 'icon/disabled' : 'icon/neutral/bolder',
|
|
21026
|
-
size: 16
|
|
21027
|
-
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput$1, {
|
|
21028
|
-
ref: e => {
|
|
21029
|
-
isFunction(ref) ? ref(e) : null;
|
|
21030
|
-
valueInputRef.current = e;
|
|
21031
|
-
},
|
|
21032
|
-
type: 'hidden'
|
|
21033
|
-
})]
|
|
21034
|
-
})
|
|
21041
|
+
children: [typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, trailingAction ? /*#__PURE__*/React.cloneElement(trailingAction, {
|
|
21042
|
+
disabled: disabled
|
|
21043
|
+
}) : null]
|
|
21044
|
+
})]
|
|
21035
21045
|
});
|
|
21036
21046
|
};
|
|
21037
21047
|
const TextInputWrapper$1 = styled__default.default.div`
|
|
@@ -21048,10 +21058,7 @@ const TextInputWrapper$1 = styled__default.default.div`
|
|
|
21048
21058
|
background-color: ${({
|
|
21049
21059
|
theme
|
|
21050
21060
|
}) => theme.colors['bg/input']};
|
|
21051
|
-
cursor:
|
|
21052
|
-
input {
|
|
21053
|
-
cursor: default;
|
|
21054
|
-
}
|
|
21061
|
+
cursor: text;
|
|
21055
21062
|
display: inline-flex;
|
|
21056
21063
|
align-items: center;
|
|
21057
21064
|
|
|
@@ -21106,7 +21113,7 @@ const TextInputWrapper$1 = styled__default.default.div`
|
|
|
21106
21113
|
}
|
|
21107
21114
|
`}
|
|
21108
21115
|
|
|
21109
|
-
${props => props.validationStatus !== 'error' &&
|
|
21116
|
+
${props => props.validationStatus !== 'error' && styled.css`
|
|
21110
21117
|
&:focus-within {
|
|
21111
21118
|
&:after {
|
|
21112
21119
|
border-color: ${({
|
|
@@ -21137,6 +21144,21 @@ const TextInputWrapper$1 = styled__default.default.div`
|
|
|
21137
21144
|
}
|
|
21138
21145
|
`}
|
|
21139
21146
|
|
|
21147
|
+
${props => props.hasTrailingVisual && styled.css`
|
|
21148
|
+
padding-right: ${forcePixelValue(props.theme.space[4])};
|
|
21149
|
+
`}
|
|
21150
|
+
|
|
21151
|
+
${props => props.hasTrailingAction && styled.css`
|
|
21152
|
+
padding-right: ${forcePixelValue(props.theme.space[2])};
|
|
21153
|
+
`}
|
|
21154
|
+
|
|
21155
|
+
${props => (props.hasTrailingVisual || props.hasTrailingAction) && styled.css`
|
|
21156
|
+
input {
|
|
21157
|
+
padding-right: ${forcePixelValue(props.theme.space[2])};
|
|
21158
|
+
}
|
|
21159
|
+
`}
|
|
21160
|
+
|
|
21161
|
+
|
|
21140
21162
|
transition: color 100ms, background-color 100ms;
|
|
21141
21163
|
&:after {
|
|
21142
21164
|
transition: border-color 100ms;
|
|
@@ -21164,102 +21186,226 @@ const BaseInput$1 = styled__default.default(UnstyledInput$1)`
|
|
|
21164
21186
|
}) => forcePixelValue(theme.space[3])};
|
|
21165
21187
|
padding-right: ${({
|
|
21166
21188
|
theme
|
|
21167
|
-
}) => forcePixelValue(theme.space[
|
|
21189
|
+
}) => forcePixelValue(theme.space[4])};
|
|
21168
21190
|
padding-bottom: ${({
|
|
21169
21191
|
theme
|
|
21170
21192
|
}) => forcePixelValue(theme.space[3])};
|
|
21171
21193
|
padding-left: ${({
|
|
21172
21194
|
theme
|
|
21173
21195
|
}) => forcePixelValue(theme.space[4])};
|
|
21174
|
-
|
|
21175
|
-
white-space: pre;
|
|
21176
|
-
text-overflow: ellipsis;
|
|
21177
21196
|
`;
|
|
21178
|
-
var
|
|
21179
|
-
|
|
21180
|
-
|
|
21181
|
-
children: propChildren,
|
|
21182
|
-
...props
|
|
21183
|
-
}) => {
|
|
21184
|
-
const children = isNullable(propChildren) ? props.label : propChildren;
|
|
21185
|
-
return /*#__PURE__*/jsxRuntimeExports.jsx(BaseSelectOption, {
|
|
21186
|
-
...props,
|
|
21187
|
-
children: children
|
|
21188
|
-
});
|
|
21189
|
-
};
|
|
21190
|
-
const BaseSelectOption = styled__default.default.option``;
|
|
21197
|
+
var TextInput$1 = Object.assign( /*#__PURE__*/React.forwardRef(TextInput), {
|
|
21198
|
+
TrailingAction: TextInputTrailingAction$1
|
|
21199
|
+
});
|
|
21191
21200
|
|
|
21192
|
-
const
|
|
21193
|
-
children,
|
|
21194
|
-
disabled,
|
|
21201
|
+
const SearchSelectInput = ({
|
|
21195
21202
|
validationStatus,
|
|
21196
21203
|
leadingVisual: LeadingVisual,
|
|
21197
|
-
|
|
21204
|
+
children,
|
|
21205
|
+
onChange,
|
|
21206
|
+
focusTrapSettings,
|
|
21207
|
+
focusZoneSettings,
|
|
21208
|
+
onOpen,
|
|
21209
|
+
onClose,
|
|
21210
|
+
searchInputProps,
|
|
21211
|
+
value,
|
|
21212
|
+
renderValue = value => value?.toString(),
|
|
21198
21213
|
...props
|
|
21199
21214
|
}, ref) => {
|
|
21200
|
-
const
|
|
21201
|
-
const
|
|
21202
|
-
const
|
|
21203
|
-
const
|
|
21204
|
-
|
|
21215
|
+
const theme = styled.useTheme();
|
|
21216
|
+
const hasLeadingVisual = !isNullable(LeadingVisual);
|
|
21217
|
+
const valueInputRef = useProvidedOrCreatedRef(ref);
|
|
21218
|
+
const labelInputRef = React.useRef(null);
|
|
21219
|
+
const focusInput = () => {
|
|
21220
|
+
labelInputRef.current?.focus();
|
|
21205
21221
|
};
|
|
21206
|
-
|
|
21207
|
-
|
|
21208
|
-
|
|
21209
|
-
|
|
21210
|
-
|
|
21211
|
-
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21222
|
+
const {
|
|
21223
|
+
id,
|
|
21224
|
+
disabled,
|
|
21225
|
+
placeholder
|
|
21226
|
+
} = props;
|
|
21227
|
+
const handleSelect = item => {
|
|
21228
|
+
if (labelInputRef.current && valueInputRef.current) {
|
|
21229
|
+
/**
|
|
21230
|
+
* ! valueInput의 native onChange를 trigger하려고 했으나 작동하지 않음.
|
|
21231
|
+
* ! 일단 Custom onChange를 만들어서 해결.
|
|
21232
|
+
*/
|
|
21233
|
+
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value')?.set;
|
|
21234
|
+
nativeInputValueSetter?.call(valueInputRef.current, item.value.toString());
|
|
21235
|
+
onChange?.(item);
|
|
21236
|
+
}
|
|
21237
|
+
};
|
|
21238
|
+
const listContainerRef = React.useRef(null);
|
|
21239
|
+
const searchInputRef = React.useRef(null);
|
|
21240
|
+
const activeDescendantRef = React.useRef();
|
|
21241
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(OverlayPopper, {
|
|
21242
|
+
focusTrapSettings: {
|
|
21243
|
+
initialFocusRef: searchInputRef,
|
|
21244
|
+
restoreFocusOnCleanUp: true,
|
|
21245
|
+
...focusTrapSettings
|
|
21246
|
+
},
|
|
21247
|
+
focusZoneSettings: {
|
|
21248
|
+
containerRef: listContainerRef,
|
|
21249
|
+
activeDescendantFocus: searchInputRef,
|
|
21250
|
+
focusOutBehavior: 'stop',
|
|
21251
|
+
onActiveDescendantChanged: (current, previous) => {
|
|
21252
|
+
activeDescendantRef.current = current;
|
|
21253
|
+
if (current && listContainerRef.current) {
|
|
21254
|
+
current.style.backgroundColor = theme.colors['bg/selected/subtle'];
|
|
21255
|
+
scrollIntoView({
|
|
21256
|
+
childrenRef: current,
|
|
21257
|
+
scrollContainerRef: listContainerRef.current,
|
|
21258
|
+
options: {
|
|
21259
|
+
behavior: 'auto',
|
|
21260
|
+
direction: 'vertical',
|
|
21261
|
+
offset: 0
|
|
21262
|
+
}
|
|
21263
|
+
});
|
|
21264
|
+
}
|
|
21265
|
+
if (previous && current !== previous) {
|
|
21266
|
+
previous.style.backgroundColor = '';
|
|
21223
21267
|
}
|
|
21224
21268
|
},
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
ref: e => {
|
|
21228
|
-
isFunction(ref) ? ref(e) : null;
|
|
21229
|
-
selectRef.current = e;
|
|
21269
|
+
focusableElementFilter: elem => {
|
|
21270
|
+
return elem instanceof HTMLElement;
|
|
21230
21271
|
},
|
|
21231
|
-
|
|
21272
|
+
...focusZoneSettings
|
|
21273
|
+
},
|
|
21274
|
+
onOpen: onOpen,
|
|
21275
|
+
onClose: onClose,
|
|
21276
|
+
renderOverlay: (overlayProps, overlayHandler, {
|
|
21277
|
+
elements
|
|
21278
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsxs(Overlay$1, {
|
|
21279
|
+
...overlayProps,
|
|
21280
|
+
maxHeight: 200,
|
|
21281
|
+
sx: {
|
|
21282
|
+
display: 'flex',
|
|
21283
|
+
flexDirection: 'column'
|
|
21284
|
+
},
|
|
21285
|
+
style: {
|
|
21286
|
+
...overlayProps.style,
|
|
21287
|
+
width: elements?.reference?.getBoundingClientRect().width
|
|
21288
|
+
},
|
|
21289
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Space, {
|
|
21290
|
+
p: 2,
|
|
21291
|
+
sx: {
|
|
21292
|
+
flexGrow: 0,
|
|
21293
|
+
flexShrink: 0,
|
|
21294
|
+
flexBasis: 'auto'
|
|
21295
|
+
},
|
|
21296
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(TextInput$1, {
|
|
21297
|
+
ref: searchInputRef,
|
|
21298
|
+
leadingVisual: SvgSearch,
|
|
21299
|
+
onKeyDown: e => {
|
|
21300
|
+
if (e.code === 'Enter' && activeDescendantRef.current) {
|
|
21301
|
+
const activeDescendantEvent = new KeyboardEvent(e.type, e.nativeEvent);
|
|
21302
|
+
activeDescendantRef.current?.dispatchEvent(activeDescendantEvent);
|
|
21303
|
+
}
|
|
21304
|
+
},
|
|
21305
|
+
...searchInputProps
|
|
21306
|
+
})
|
|
21307
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(HorizontalDivider, {}), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21308
|
+
ref: listContainerRef,
|
|
21309
|
+
sx: {
|
|
21310
|
+
flexGrow: 1,
|
|
21311
|
+
flexShrink: 1,
|
|
21312
|
+
flexBasis: 'auto',
|
|
21313
|
+
overflowY: 'auto'
|
|
21314
|
+
},
|
|
21315
|
+
children: children?.({
|
|
21316
|
+
handleSelect
|
|
21317
|
+
}, overlayHandler)
|
|
21318
|
+
})]
|
|
21319
|
+
}),
|
|
21320
|
+
children: (popperProps, {
|
|
21321
|
+
openOverlay
|
|
21322
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsxs(TextInputWrapper, {
|
|
21323
|
+
...popperProps,
|
|
21324
|
+
tabIndex: disabled ? -1 : 0,
|
|
21232
21325
|
disabled: disabled,
|
|
21233
|
-
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
setIsValueEmpty(false);
|
|
21241
|
-
}
|
|
21326
|
+
onClick: focusInput,
|
|
21327
|
+
hasLeadingVisual: hasLeadingVisual,
|
|
21328
|
+
validationStatus: validationStatus,
|
|
21329
|
+
onKeyDown: e => {
|
|
21330
|
+
if (['ArrowUp', 'ArrowDown'].includes(e.key)) {
|
|
21331
|
+
e.preventDefault();
|
|
21332
|
+
openOverlay();
|
|
21242
21333
|
}
|
|
21334
|
+
e.stopPropagation();
|
|
21243
21335
|
},
|
|
21244
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21248
|
-
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
|
|
21254
|
-
|
|
21255
|
-
|
|
21256
|
-
|
|
21257
|
-
|
|
21258
|
-
|
|
21259
|
-
|
|
21336
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21337
|
+
sx: {
|
|
21338
|
+
'flexShrink': 0,
|
|
21339
|
+
'fontSize': 'xxs',
|
|
21340
|
+
'fontWeight': 'medium',
|
|
21341
|
+
'color': 'text/neutral',
|
|
21342
|
+
'& > svg': {
|
|
21343
|
+
display: 'block',
|
|
21344
|
+
width: 16,
|
|
21345
|
+
height: 16,
|
|
21346
|
+
color: 'icon/neutral/bold'
|
|
21347
|
+
}
|
|
21348
|
+
},
|
|
21349
|
+
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
21350
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
21351
|
+
sx: {
|
|
21352
|
+
display: 'flex',
|
|
21353
|
+
alignItems: 'center',
|
|
21354
|
+
paddingTop: 3,
|
|
21355
|
+
paddingRight: 10,
|
|
21356
|
+
paddingBottom: 3,
|
|
21357
|
+
paddingLeft: hasLeadingVisual ? 2 : 4,
|
|
21358
|
+
whiteSpace: 'pre',
|
|
21359
|
+
textOverflow: 'ellipsis',
|
|
21360
|
+
width: '100%'
|
|
21361
|
+
},
|
|
21362
|
+
onClick: e => {
|
|
21363
|
+
popperProps.onClick?.(e);
|
|
21364
|
+
},
|
|
21365
|
+
children: [!isNullable(renderValue(value)) ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21366
|
+
sx: {
|
|
21367
|
+
flex: '0 1 auto',
|
|
21368
|
+
maxWidth: '100%',
|
|
21369
|
+
textOverflow: 'ellipsis',
|
|
21370
|
+
whiteSpace: 'pre',
|
|
21371
|
+
overflow: 'hidden'
|
|
21372
|
+
},
|
|
21373
|
+
children: renderValue(value)
|
|
21374
|
+
}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput, {
|
|
21375
|
+
id: id,
|
|
21376
|
+
ref: labelInputRef,
|
|
21377
|
+
readOnly: true,
|
|
21378
|
+
onChange: noop$2,
|
|
21379
|
+
autoComplete: 'off',
|
|
21380
|
+
tabIndex: -1,
|
|
21381
|
+
onClick: e => {
|
|
21382
|
+
props.onClick?.(e);
|
|
21383
|
+
},
|
|
21384
|
+
placeholder: !isNullable(renderValue(value)) ? '' : placeholder
|
|
21385
|
+
})]
|
|
21386
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
|
|
21387
|
+
sx: {
|
|
21388
|
+
position: 'absolute',
|
|
21389
|
+
top: '50%',
|
|
21390
|
+
transform: 'translateY(-50%)',
|
|
21391
|
+
right: 4,
|
|
21392
|
+
pointerEvents: 'none'
|
|
21393
|
+
},
|
|
21394
|
+
icon: SvgChevronDown,
|
|
21395
|
+
color: disabled ? 'icon/disabled' : 'icon/neutral/bolder',
|
|
21396
|
+
size: 16
|
|
21397
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput, {
|
|
21398
|
+
ref: e => {
|
|
21399
|
+
isFunction(ref) ? ref(e) : null;
|
|
21400
|
+
valueInputRef.current = e;
|
|
21401
|
+
},
|
|
21402
|
+
type: 'hidden',
|
|
21403
|
+
defaultValue: value
|
|
21404
|
+
})]
|
|
21405
|
+
})
|
|
21260
21406
|
});
|
|
21261
21407
|
};
|
|
21262
|
-
const
|
|
21408
|
+
const TextInputWrapper = styled__default.default.div`
|
|
21263
21409
|
position: relative;
|
|
21264
21410
|
width: ${forcePixelValue('100%')};
|
|
21265
21411
|
border-width: ${forcePixelValue(1)};
|
|
@@ -21273,6 +21419,12 @@ const SelectWrapper = styled__default.default.div`
|
|
|
21273
21419
|
background-color: ${({
|
|
21274
21420
|
theme
|
|
21275
21421
|
}) => theme.colors['bg/input']};
|
|
21422
|
+
cursor: default;
|
|
21423
|
+
input {
|
|
21424
|
+
cursor: default;
|
|
21425
|
+
|
|
21426
|
+
flex: 1;
|
|
21427
|
+
}
|
|
21276
21428
|
display: inline-flex;
|
|
21277
21429
|
align-items: center;
|
|
21278
21430
|
|
|
@@ -21288,16 +21440,11 @@ const SelectWrapper = styled__default.default.div`
|
|
|
21288
21440
|
color: ${({
|
|
21289
21441
|
theme
|
|
21290
21442
|
}) => theme.colors['text/neutral']};
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
theme,
|
|
21297
|
-
isValueEmpty
|
|
21298
|
-
}) => isValueEmpty ? styled.css`
|
|
21299
|
-
color: ${theme.colors['text/neutral/subtlest']};
|
|
21300
|
-
` : null}
|
|
21443
|
+
input::placeholder {
|
|
21444
|
+
color: ${({
|
|
21445
|
+
theme
|
|
21446
|
+
}) => theme.colors['text/neutral/subtlest']};
|
|
21447
|
+
}
|
|
21301
21448
|
|
|
21302
21449
|
&:after {
|
|
21303
21450
|
content: '';
|
|
@@ -21332,7 +21479,7 @@ const SelectWrapper = styled__default.default.div`
|
|
|
21332
21479
|
}
|
|
21333
21480
|
`}
|
|
21334
21481
|
|
|
21335
|
-
${props => props.validationStatus !== 'error' && styled.css`
|
|
21482
|
+
${props => props.validationStatus !== 'error' && !props.disabled && styled.css`
|
|
21336
21483
|
&:focus-within {
|
|
21337
21484
|
&:after {
|
|
21338
21485
|
border-color: ${({
|
|
@@ -21347,28 +21494,25 @@ const SelectWrapper = styled__default.default.div`
|
|
|
21347
21494
|
background-color: ${props.theme.colors['bg/disabled']};
|
|
21348
21495
|
color: ${props.theme.colors['text/disabled']};
|
|
21349
21496
|
|
|
21350
|
-
|
|
21497
|
+
input::placeholder {
|
|
21351
21498
|
color: ${props.theme.colors['text/disabled']};
|
|
21352
21499
|
}
|
|
21353
21500
|
|
|
21354
|
-
|
|
21501
|
+
input {
|
|
21355
21502
|
cursor: not-allowed;
|
|
21356
21503
|
}
|
|
21357
21504
|
`};
|
|
21358
21505
|
|
|
21359
21506
|
${props => props.hasLeadingVisual && styled.css`
|
|
21360
21507
|
padding-left: ${forcePixelValue(props.theme.space[4])};
|
|
21361
|
-
select {
|
|
21362
|
-
padding-left: ${forcePixelValue(props.theme.space[2])};
|
|
21363
|
-
}
|
|
21364
21508
|
`}
|
|
21365
21509
|
|
|
21366
|
-
transition: background-color 100ms;
|
|
21510
|
+
transition: color 100ms, background-color 100ms;
|
|
21367
21511
|
&:after {
|
|
21368
21512
|
transition: border-color 100ms;
|
|
21369
21513
|
}
|
|
21370
21514
|
`;
|
|
21371
|
-
const
|
|
21515
|
+
const UnstyledInput = styled__default.default.input`
|
|
21372
21516
|
font-size: inherit;
|
|
21373
21517
|
font-weight: inherit;
|
|
21374
21518
|
line-height: inherit;
|
|
@@ -21376,154 +21520,104 @@ const UnstyledSelect = styled__default.default.select`
|
|
|
21376
21520
|
border-radius: inherit;
|
|
21377
21521
|
color: inherit;
|
|
21378
21522
|
transition: inherit;
|
|
21523
|
+
width: 100%;
|
|
21379
21524
|
|
|
21380
21525
|
border: 0;
|
|
21526
|
+
padding: 0;
|
|
21381
21527
|
background-color: transparent;
|
|
21382
|
-
width: 100%;
|
|
21383
21528
|
&:focus {
|
|
21384
21529
|
outline: 0;
|
|
21385
21530
|
}
|
|
21386
|
-
|
|
21387
|
-
appearance: none;
|
|
21388
|
-
-webkit-appearance: none;
|
|
21389
|
-
-moz-appearance: none;
|
|
21390
21531
|
`;
|
|
21391
|
-
const
|
|
21392
|
-
padding-top: ${({
|
|
21393
|
-
theme
|
|
21394
|
-
}) => forcePixelValue(theme.space[3])};
|
|
21395
|
-
padding-right: ${({
|
|
21396
|
-
theme
|
|
21397
|
-
}) => forcePixelValue(theme.space[10])};
|
|
21398
|
-
padding-bottom: ${({
|
|
21399
|
-
theme
|
|
21400
|
-
}) => forcePixelValue(theme.space[3])};
|
|
21401
|
-
padding-left: ${({
|
|
21402
|
-
theme
|
|
21403
|
-
}) => forcePixelValue(theme.space[4])};
|
|
21404
|
-
|
|
21532
|
+
const BaseInput = styled__default.default(UnstyledInput)`
|
|
21405
21533
|
white-space: pre;
|
|
21406
21534
|
text-overflow: ellipsis;
|
|
21407
21535
|
`;
|
|
21408
|
-
var
|
|
21409
|
-
Option: SelectOption
|
|
21410
|
-
});
|
|
21536
|
+
var SearchSelectInput$1 = /*#__PURE__*/React.forwardRef(SearchSelectInput);
|
|
21411
21537
|
|
|
21412
|
-
const
|
|
21413
|
-
|
|
21414
|
-
disabled,
|
|
21538
|
+
const SelectOption = ({
|
|
21539
|
+
children: propChildren,
|
|
21415
21540
|
...props
|
|
21416
|
-
}
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
}
|
|
21423
|
-
const
|
|
21424
|
-
display: inline-flex;
|
|
21425
|
-
padding: ${({
|
|
21426
|
-
theme
|
|
21427
|
-
}) => forcePixelValue(theme.space[2])};
|
|
21428
|
-
background-color: ${({
|
|
21429
|
-
theme
|
|
21430
|
-
}) => theme.colors['bg/neutral/subtler']};
|
|
21431
|
-
border-radius: ${({
|
|
21432
|
-
theme
|
|
21433
|
-
}) => forcePixelValue(theme.radii.full)};
|
|
21434
|
-
|
|
21435
|
-
& svg {
|
|
21436
|
-
width: ${forcePixelValue(16)};
|
|
21437
|
-
height: ${forcePixelValue(16)};
|
|
21438
|
-
color: ${({
|
|
21439
|
-
theme
|
|
21440
|
-
}) => theme.colors['icon/neutral/bolder']};
|
|
21441
|
-
}
|
|
21442
|
-
|
|
21443
|
-
&:hover {
|
|
21444
|
-
background-color: ${({
|
|
21445
|
-
theme
|
|
21446
|
-
}) => theme.colors['bg/neutral/subtler/hovered']};
|
|
21447
|
-
}
|
|
21448
|
-
|
|
21449
|
-
&[aria-disabled='true'] {
|
|
21450
|
-
cursor: not-allowed;
|
|
21451
|
-
& svg {
|
|
21452
|
-
color: ${({
|
|
21453
|
-
theme
|
|
21454
|
-
}) => theme.colors['icon/disabled']};
|
|
21455
|
-
}
|
|
21456
|
-
}
|
|
21457
|
-
|
|
21458
|
-
${sx}
|
|
21459
|
-
`;
|
|
21460
|
-
var TextInputTrailingAction$1 = /*#__PURE__*/React.forwardRef(TextInputTrailingAction);
|
|
21541
|
+
}) => {
|
|
21542
|
+
const children = isNullable(propChildren) ? props.label : propChildren;
|
|
21543
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(BaseSelectOption, {
|
|
21544
|
+
...props,
|
|
21545
|
+
children: children
|
|
21546
|
+
});
|
|
21547
|
+
};
|
|
21548
|
+
const BaseSelectOption = styled__default.default.option``;
|
|
21461
21549
|
|
|
21462
|
-
const
|
|
21463
|
-
|
|
21550
|
+
const Select = ({
|
|
21551
|
+
children,
|
|
21464
21552
|
disabled,
|
|
21465
21553
|
validationStatus,
|
|
21466
21554
|
leadingVisual: LeadingVisual,
|
|
21467
|
-
|
|
21468
|
-
trailingAction,
|
|
21555
|
+
placeholder = '옵션 선택',
|
|
21469
21556
|
...props
|
|
21470
21557
|
}, ref) => {
|
|
21471
|
-
const
|
|
21472
|
-
const
|
|
21473
|
-
|
|
21558
|
+
const PLACEHOLDER_VALUE = '';
|
|
21559
|
+
const selectRef = useProvidedOrCreatedRef(ref);
|
|
21560
|
+
const [isValueEmpty, setIsValueEmpty] = React.useState(isNullable(props.value) || props.value === PLACEHOLDER_VALUE);
|
|
21561
|
+
const focusSelect = () => {
|
|
21562
|
+
selectRef.current?.focus();
|
|
21474
21563
|
};
|
|
21475
|
-
return /*#__PURE__*/jsxRuntimeExports.jsxs(
|
|
21564
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(SelectWrapper, {
|
|
21476
21565
|
disabled: disabled,
|
|
21477
|
-
onClick:
|
|
21566
|
+
onClick: focusSelect,
|
|
21478
21567
|
hasLeadingVisual: !isNullable(LeadingVisual),
|
|
21479
|
-
hasTrailingVisual: !isNullable(TrailingVisual),
|
|
21480
|
-
hasTrailingAction: !isNullable(trailingAction),
|
|
21481
21568
|
validationStatus: validationStatus,
|
|
21569
|
+
isValueEmpty: isValueEmpty,
|
|
21482
21570
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
21483
21571
|
sx: {
|
|
21484
21572
|
'flexShrink': 0,
|
|
21485
21573
|
'fontSize': 'xxs',
|
|
21486
21574
|
'fontWeight': 'medium',
|
|
21487
|
-
'color':
|
|
21575
|
+
'color': 'text/neutral',
|
|
21488
21576
|
'& > svg': {
|
|
21489
21577
|
display: 'block',
|
|
21490
21578
|
width: 16,
|
|
21491
21579
|
height: 16,
|
|
21492
|
-
color:
|
|
21580
|
+
color: 'icon/neutral/bold'
|
|
21493
21581
|
}
|
|
21494
21582
|
},
|
|
21495
21583
|
children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
|
|
21496
|
-
}), /*#__PURE__*/jsxRuntimeExports.
|
|
21584
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsxs(BaseSelect, {
|
|
21497
21585
|
ref: e => {
|
|
21498
21586
|
isFunction(ref) ? ref(e) : null;
|
|
21499
|
-
|
|
21587
|
+
selectRef.current = e;
|
|
21500
21588
|
},
|
|
21501
|
-
|
|
21589
|
+
placeholder: placeholder,
|
|
21502
21590
|
disabled: disabled,
|
|
21503
|
-
...props
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
'color': color$1['text/neutral'],
|
|
21513
|
-
'& > svg': {
|
|
21514
|
-
display: 'block',
|
|
21515
|
-
width: 16,
|
|
21516
|
-
height: 16,
|
|
21517
|
-
color: color$1['icon/neutral/bold']
|
|
21591
|
+
...props,
|
|
21592
|
+
onChange: e => {
|
|
21593
|
+
props.onChange?.(e);
|
|
21594
|
+
if (!e.defaultPrevented) {
|
|
21595
|
+
if (e.target.value === PLACEHOLDER_VALUE) {
|
|
21596
|
+
setIsValueEmpty(true);
|
|
21597
|
+
} else {
|
|
21598
|
+
setIsValueEmpty(false);
|
|
21599
|
+
}
|
|
21518
21600
|
}
|
|
21519
21601
|
},
|
|
21520
|
-
children: [
|
|
21521
|
-
|
|
21522
|
-
|
|
21602
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(SelectOption, {
|
|
21603
|
+
label: placeholder,
|
|
21604
|
+
value: PLACEHOLDER_VALUE
|
|
21605
|
+
}), children]
|
|
21606
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
|
|
21607
|
+
sx: {
|
|
21608
|
+
position: 'absolute',
|
|
21609
|
+
top: '50%',
|
|
21610
|
+
transform: 'translateY(-50%)',
|
|
21611
|
+
right: 4,
|
|
21612
|
+
pointerEvents: 'none'
|
|
21613
|
+
},
|
|
21614
|
+
icon: SvgChevronDown,
|
|
21615
|
+
color: disabled ? 'icon/disabled' : 'icon/neutral/bolder',
|
|
21616
|
+
size: 16
|
|
21523
21617
|
})]
|
|
21524
21618
|
});
|
|
21525
21619
|
};
|
|
21526
|
-
const
|
|
21620
|
+
const SelectWrapper = styled__default.default.div`
|
|
21527
21621
|
position: relative;
|
|
21528
21622
|
width: ${forcePixelValue('100%')};
|
|
21529
21623
|
border-width: ${forcePixelValue(1)};
|
|
@@ -21537,7 +21631,6 @@ const TextInputWrapper = styled__default.default.div`
|
|
|
21537
21631
|
background-color: ${({
|
|
21538
21632
|
theme
|
|
21539
21633
|
}) => theme.colors['bg/input']};
|
|
21540
|
-
cursor: text;
|
|
21541
21634
|
display: inline-flex;
|
|
21542
21635
|
align-items: center;
|
|
21543
21636
|
|
|
@@ -21553,11 +21646,16 @@ const TextInputWrapper = styled__default.default.div`
|
|
|
21553
21646
|
color: ${({
|
|
21554
21647
|
theme
|
|
21555
21648
|
}) => theme.colors['text/neutral']};
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
21559
|
-
|
|
21560
|
-
|
|
21649
|
+
|
|
21650
|
+
/**
|
|
21651
|
+
* placeholder style
|
|
21652
|
+
*/
|
|
21653
|
+
${({
|
|
21654
|
+
theme,
|
|
21655
|
+
isValueEmpty
|
|
21656
|
+
}) => isValueEmpty ? styled.css`
|
|
21657
|
+
color: ${theme.colors['text/neutral/subtlest']};
|
|
21658
|
+
` : null}
|
|
21561
21659
|
|
|
21562
21660
|
&:after {
|
|
21563
21661
|
content: '';
|
|
@@ -21607,43 +21705,28 @@ const TextInputWrapper = styled__default.default.div`
|
|
|
21607
21705
|
background-color: ${props.theme.colors['bg/disabled']};
|
|
21608
21706
|
color: ${props.theme.colors['text/disabled']};
|
|
21609
21707
|
|
|
21610
|
-
|
|
21708
|
+
select::placeholder {
|
|
21611
21709
|
color: ${props.theme.colors['text/disabled']};
|
|
21612
21710
|
}
|
|
21613
21711
|
|
|
21614
|
-
|
|
21712
|
+
select {
|
|
21615
21713
|
cursor: not-allowed;
|
|
21616
21714
|
}
|
|
21617
21715
|
`};
|
|
21618
21716
|
|
|
21619
21717
|
${props => props.hasLeadingVisual && styled.css`
|
|
21620
21718
|
padding-left: ${forcePixelValue(props.theme.space[4])};
|
|
21621
|
-
|
|
21719
|
+
select {
|
|
21622
21720
|
padding-left: ${forcePixelValue(props.theme.space[2])};
|
|
21623
21721
|
}
|
|
21624
21722
|
`}
|
|
21625
21723
|
|
|
21626
|
-
|
|
21627
|
-
padding-right: ${forcePixelValue(props.theme.space[4])};
|
|
21628
|
-
`}
|
|
21629
|
-
|
|
21630
|
-
${props => props.hasTrailingAction && styled.css`
|
|
21631
|
-
padding-right: ${forcePixelValue(props.theme.space[2])};
|
|
21632
|
-
`}
|
|
21633
|
-
|
|
21634
|
-
${props => (props.hasTrailingVisual || props.hasTrailingAction) && styled.css`
|
|
21635
|
-
input {
|
|
21636
|
-
padding-right: ${forcePixelValue(props.theme.space[2])};
|
|
21637
|
-
}
|
|
21638
|
-
`}
|
|
21639
|
-
|
|
21640
|
-
|
|
21641
|
-
transition: color 100ms, background-color 100ms;
|
|
21724
|
+
transition: background-color 100ms;
|
|
21642
21725
|
&:after {
|
|
21643
21726
|
transition: border-color 100ms;
|
|
21644
21727
|
}
|
|
21645
21728
|
`;
|
|
21646
|
-
const
|
|
21729
|
+
const UnstyledSelect = styled__default.default.select`
|
|
21647
21730
|
font-size: inherit;
|
|
21648
21731
|
font-weight: inherit;
|
|
21649
21732
|
line-height: inherit;
|
|
@@ -21658,23 +21741,30 @@ const UnstyledInput = styled__default.default.input`
|
|
|
21658
21741
|
&:focus {
|
|
21659
21742
|
outline: 0;
|
|
21660
21743
|
}
|
|
21744
|
+
|
|
21745
|
+
appearance: none;
|
|
21746
|
+
-webkit-appearance: none;
|
|
21747
|
+
-moz-appearance: none;
|
|
21661
21748
|
`;
|
|
21662
|
-
const
|
|
21749
|
+
const BaseSelect = styled__default.default(UnstyledSelect)`
|
|
21663
21750
|
padding-top: ${({
|
|
21664
21751
|
theme
|
|
21665
21752
|
}) => forcePixelValue(theme.space[3])};
|
|
21666
21753
|
padding-right: ${({
|
|
21667
21754
|
theme
|
|
21668
|
-
}) => forcePixelValue(theme.space[
|
|
21755
|
+
}) => forcePixelValue(theme.space[10])};
|
|
21669
21756
|
padding-bottom: ${({
|
|
21670
21757
|
theme
|
|
21671
21758
|
}) => forcePixelValue(theme.space[3])};
|
|
21672
21759
|
padding-left: ${({
|
|
21673
21760
|
theme
|
|
21674
21761
|
}) => forcePixelValue(theme.space[4])};
|
|
21762
|
+
|
|
21763
|
+
white-space: pre;
|
|
21764
|
+
text-overflow: ellipsis;
|
|
21675
21765
|
`;
|
|
21676
|
-
var
|
|
21677
|
-
|
|
21766
|
+
var Select$1 = Object.assign( /*#__PURE__*/React.forwardRef(Select), {
|
|
21767
|
+
Option: SelectOption
|
|
21678
21768
|
});
|
|
21679
21769
|
|
|
21680
21770
|
const FormControlCaption = ({
|
|
@@ -21833,7 +21923,7 @@ const FormControl = ({
|
|
|
21833
21923
|
successMessage: FormControlSuccessMessage
|
|
21834
21924
|
}
|
|
21835
21925
|
});
|
|
21836
|
-
const inputComponentCandidates = [TextInput$1, Select$1,
|
|
21926
|
+
const inputComponentCandidates = [TextInput$1, Select$1, SearchSelectInput$1, Checkbox$1, ...additionalInputComponentCandidates];
|
|
21837
21927
|
const InputComponent = restComponents.find(component => inputComponentCandidates.some(candidate => /*#__PURE__*/React.isValidElement(component) && component.type === candidate));
|
|
21838
21928
|
const isHorizontalLayoutNeeded = /*#__PURE__*/React.isValidElement(InputComponent) && InputComponent.type === Checkbox$1;
|
|
21839
21929
|
return /*#__PURE__*/jsxRuntimeExports.jsx(FormControlContext.Provider, {
|
|
@@ -22008,6 +22098,7 @@ const Pagination = ({
|
|
|
22008
22098
|
onPreviousClick = noop$2,
|
|
22009
22099
|
onNextClick = noop$2,
|
|
22010
22100
|
renderPage = (page, i) => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationPage, {
|
|
22101
|
+
type: 'button',
|
|
22011
22102
|
onClick: () => onPageClick(page, i),
|
|
22012
22103
|
selected: i === currentPageIndex,
|
|
22013
22104
|
children: page.label
|
|
@@ -22049,6 +22140,7 @@ const Pagination = ({
|
|
|
22049
22140
|
sx: sx,
|
|
22050
22141
|
children: [renderPreviousPageDirection({
|
|
22051
22142
|
previousPageDirectionProps: {
|
|
22143
|
+
type: 'button',
|
|
22052
22144
|
onClick: () => onPreviousClick(currentPageIndex),
|
|
22053
22145
|
disabled: currentPageIndex === 0
|
|
22054
22146
|
}
|
|
@@ -22086,6 +22178,7 @@ const Pagination = ({
|
|
|
22086
22178
|
originalIndex
|
|
22087
22179
|
}) => renderPaginationPage(page, originalIndex))], renderNextPageDirection({
|
|
22088
22180
|
nextPageDirectionProps: {
|
|
22181
|
+
type: 'button',
|
|
22089
22182
|
onClick: () => onNextClick(currentPageIndex),
|
|
22090
22183
|
disabled: currentPageIndex === totalPageCount - 1
|
|
22091
22184
|
}
|
|
@@ -22293,6 +22386,7 @@ const Pill = ({
|
|
|
22293
22386
|
hasRemoveButton: !isNullable(propOnRemove),
|
|
22294
22387
|
disabled: disabled,
|
|
22295
22388
|
...props,
|
|
22389
|
+
type: 'button',
|
|
22296
22390
|
children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual, /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
22297
22391
|
title: children?.toString(),
|
|
22298
22392
|
children: children
|
|
@@ -23325,6 +23419,7 @@ const TabItem = ({
|
|
|
23325
23419
|
onClick?.(e);
|
|
23326
23420
|
};
|
|
23327
23421
|
return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTabItem, {
|
|
23422
|
+
type: 'button',
|
|
23328
23423
|
role: 'tab',
|
|
23329
23424
|
ref: ref,
|
|
23330
23425
|
variant: variant,
|
|
@@ -24237,9 +24332,9 @@ exports.ItemList = ItemList;
|
|
|
24237
24332
|
exports.MotionView = MotionView;
|
|
24238
24333
|
exports.Overlay = Overlay$1;
|
|
24239
24334
|
exports.OverlayPopper = OverlayPopper;
|
|
24240
|
-
exports.OverlaySelectInput = OverlaySelectInput$1;
|
|
24241
24335
|
exports.Pagination = index$3;
|
|
24242
24336
|
exports.Pill = index$2;
|
|
24337
|
+
exports.SearchSelectInput = SearchSelectInput$1;
|
|
24243
24338
|
exports.Select = Select$1;
|
|
24244
24339
|
exports.Space = Space;
|
|
24245
24340
|
exports.Spinner = Spinner;
|