@primer/react 36.3.0 → 36.3.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.
|
@@ -53,14 +53,14 @@ const textInputBasePadding = '12px';
|
|
|
53
53
|
const textInputHorizPadding = textInputBasePadding;
|
|
54
54
|
const renderFocusStyles = (hasTrailingAction, isInputFocused) => {
|
|
55
55
|
if (hasTrailingAction) {
|
|
56
|
-
return isInputFocused && styled.css(["border-color:", ";outline:
|
|
56
|
+
return isInputFocused && styled.css(["border-color:", ";outline:none;box-shadow:inset 0 0 0 1px ", ";"], constants.get('colors.accent.fg'), constants.get('colors.accent.fg'));
|
|
57
57
|
}
|
|
58
|
-
return styled.css(["&:focus-within{border-color:", ";outline:
|
|
58
|
+
return styled.css(["&:focus-within{border-color:", ";outline:none;box-shadow:inset 0 0 0 1px ", ";}"], constants.get('colors.accent.fg'), constants.get('colors.accent.fg'));
|
|
59
59
|
};
|
|
60
60
|
const TextInputBaseWrapper = styled__default.default.span.withConfig({
|
|
61
61
|
displayName: "TextInputWrapper__TextInputBaseWrapper",
|
|
62
62
|
componentId: "sc-1mqhpbi-0"
|
|
63
|
-
})(["font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-color:", ";border:1px solid var(--control-borderColor-rest,", ");border-radius:", ";outline:none;box-shadow:", ";display:inline-flex;align-items:stretch;min-height:32px;
|
|
63
|
+
})(["font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-color:", ";border:1px solid var(--control-borderColor-rest,", ");border-radius:", ";outline:none;box-shadow:", ";display:inline-flex;align-items:stretch;min-height:32px;input,textarea{cursor:text;}select{cursor:pointer;}&::placeholder{color:", ";}", " > textarea{padding:", ";}", " ", " ", " ", " ", " ", " @media (min-width:", "){font-size:", ";}", " ", " ", " ", " ", " ", ";"], constants.get('fontSizes.1'), constants.get('colors.fg.default'), constants.get('colors.canvas.default'), constants.get('colors.border.default'), constants.get('radii.2'), constants.get('shadows.primer.shadow.inset'), constants.get('colors.fg.subtle'), props => renderFocusStyles(Boolean(props.hasTrailingAction), Boolean(props.isInputFocused)), textInputBasePadding, props => props.contrast && styled.css(["background-color:", ";"], constants.get('colors.canvas.inset')), props => props.disabled && styled.css(["color:", ";background-color:", ";border-color:", ";input,textarea,select{cursor:not-allowed;}"], constants.get('colors.primer.fg.disabled'), constants.get('colors.input.disabledBg'), constants.get('colors.border.default')), props => props.monospace && styled.css(["font-family:", ";"], constants.get('fonts.mono')), props => props.validationStatus === 'error' && styled.css(["border-color:", ";", ""], constants.get('colors.danger.emphasis'), renderFocusStyles(Boolean(props.hasTrailingAction), Boolean(props.isInputFocused))), props => props.validationStatus === 'success' && styled.css(["border-color:", ";"], constants.get('colors.success.emphasis')), props => props.block && styled.css(["width:100%;display:flex;align-self:stretch;"]), constants.get('breakpoints.1'), constants.get('fontSizes.1'), styledSystem.width, styledSystem.minWidth, styledSystem.maxWidth, sizeDeprecatedVariants, sizeVariants, sx.default);
|
|
64
64
|
const TextInputWrapper = styled__default.default(TextInputBaseWrapper).withConfig({
|
|
65
65
|
displayName: "TextInputWrapper",
|
|
66
66
|
componentId: "sc-1mqhpbi-1"
|
|
@@ -45,14 +45,14 @@ const textInputBasePadding = '12px';
|
|
|
45
45
|
const textInputHorizPadding = textInputBasePadding;
|
|
46
46
|
const renderFocusStyles = (hasTrailingAction, isInputFocused) => {
|
|
47
47
|
if (hasTrailingAction) {
|
|
48
|
-
return isInputFocused && css(["border-color:", ";outline:
|
|
48
|
+
return isInputFocused && css(["border-color:", ";outline:none;box-shadow:inset 0 0 0 1px ", ";"], get('colors.accent.fg'), get('colors.accent.fg'));
|
|
49
49
|
}
|
|
50
|
-
return css(["&:focus-within{border-color:", ";outline:
|
|
50
|
+
return css(["&:focus-within{border-color:", ";outline:none;box-shadow:inset 0 0 0 1px ", ";}"], get('colors.accent.fg'), get('colors.accent.fg'));
|
|
51
51
|
};
|
|
52
52
|
const TextInputBaseWrapper = styled.span.withConfig({
|
|
53
53
|
displayName: "TextInputWrapper__TextInputBaseWrapper",
|
|
54
54
|
componentId: "sc-1mqhpbi-0"
|
|
55
|
-
})(["font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-color:", ";border:1px solid var(--control-borderColor-rest,", ");border-radius:", ";outline:none;box-shadow:", ";display:inline-flex;align-items:stretch;min-height:32px;
|
|
55
|
+
})(["font-size:", ";line-height:20px;color:", ";vertical-align:middle;background-color:", ";border:1px solid var(--control-borderColor-rest,", ");border-radius:", ";outline:none;box-shadow:", ";display:inline-flex;align-items:stretch;min-height:32px;input,textarea{cursor:text;}select{cursor:pointer;}&::placeholder{color:", ";}", " > textarea{padding:", ";}", " ", " ", " ", " ", " ", " @media (min-width:", "){font-size:", ";}", " ", " ", " ", " ", " ", ";"], get('fontSizes.1'), get('colors.fg.default'), get('colors.canvas.default'), get('colors.border.default'), get('radii.2'), get('shadows.primer.shadow.inset'), get('colors.fg.subtle'), props => renderFocusStyles(Boolean(props.hasTrailingAction), Boolean(props.isInputFocused)), textInputBasePadding, props => props.contrast && css(["background-color:", ";"], get('colors.canvas.inset')), props => props.disabled && css(["color:", ";background-color:", ";border-color:", ";input,textarea,select{cursor:not-allowed;}"], get('colors.primer.fg.disabled'), get('colors.input.disabledBg'), get('colors.border.default')), props => props.monospace && css(["font-family:", ";"], get('fonts.mono')), props => props.validationStatus === 'error' && css(["border-color:", ";", ""], get('colors.danger.emphasis'), renderFocusStyles(Boolean(props.hasTrailingAction), Boolean(props.isInputFocused))), props => props.validationStatus === 'success' && css(["border-color:", ";"], get('colors.success.emphasis')), props => props.block && css(["width:100%;display:flex;align-self:stretch;"]), get('breakpoints.1'), get('fontSizes.1'), width, minWidth, maxWidth, sizeDeprecatedVariants, sizeVariants, sx);
|
|
56
56
|
const TextInputWrapper = styled(TextInputBaseWrapper).withConfig({
|
|
57
57
|
displayName: "TextInputWrapper",
|
|
58
58
|
componentId: "sc-1mqhpbi-1"
|