@xfers/design-system 4.5.0-dev.9b4ee84bdd → 4.5.0-dev.f5d95e3f41
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.
|
@@ -20,6 +20,6 @@ function getBaseInputStyle(theme, size, error, disabledAddon) {
|
|
|
20
20
|
if (size === void 0) { size = 'large'; }
|
|
21
21
|
var _a = exports.SIZE_CONFIG[size], height = _a.height, borderRadius = _a.borderRadius, padding = _a.padding;
|
|
22
22
|
var borderColor = error ? theme.color.status.critical : theme.color.base.line;
|
|
23
|
-
return "\n -webkit-font-smoothing: antialiased;\n\n /* Shared font/sizing for all .ant-input elements */\n & .ant-input, &.ant-input, &.ant-input-password {\n padding: ".concat(padding, ";\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-size: ").concat(TypographyStyles_1.FONT_SIZE.P1, ";\n color: ").concat(theme.color.base.onNeutral, ";\n line-height: 17px;\n height: ").concat(height, ";\n box-sizing: border-box;\n &::placeholder {\n color: ").concat(theme.color.component.placeholderInput, ";\n font-weight: 400;\n }\n }\n\n /* Case 1: Standalone input \u2014 class directly on .ant-input */\n &.ant-input, &.ant-input-password {\n border-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n\n /* Case 2: Input with addon \u2014 class on .ant-input-group-wrapper */\n /* addonBefore: input is after addon \u2014 flat left, rounded right */\n & .ant-input-group > .ant-input:last-child {\n border-radius: 0 ").concat(borderRadius, " ").concat(borderRadius, " 0 !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n /* addonAfter: input is before addon \u2014 rounded left, flat right */\n & .ant-input-group > .ant-input:first-child {\n border-radius: ").concat(borderRadius, " 0 0 ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n\n /* Case 3: Input with prefix (e.g. Search without addon) \u2014 class on .ant-input-affix-wrapper */\n &.ant-input-affix-wrapper {\n border-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n & .ant-input {\n height: auto;\n padding: 0;\n border: none;\n border-radius: 0 !important;\n }\n }\n &.ant-input-affix-wrapper-focused {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n }\n\n /* Case 4: addon + prefix
|
|
23
|
+
return "\n -webkit-font-smoothing: antialiased;\n\n /* Shared font/sizing for all .ant-input elements */\n & .ant-input, &.ant-input, &.ant-input-password {\n padding: ".concat(padding, ";\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-size: ").concat(TypographyStyles_1.FONT_SIZE.P1, ";\n color: ").concat(theme.color.base.onNeutral, ";\n line-height: 17px;\n height: ").concat(height, ";\n box-sizing: border-box;\n &::placeholder {\n color: ").concat(theme.color.component.placeholderInput, ";\n font-weight: 400;\n }\n }\n\n /* Case 1: Standalone input \u2014 class directly on .ant-input */\n &.ant-input, &.ant-input-password {\n border-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n\n /* Case 2: Input with addon \u2014 class on .ant-input-group-wrapper */\n /* addonBefore: input is after addon \u2014 flat left, rounded right */\n & .ant-input-group > .ant-input:last-child {\n border-radius: 0 ").concat(borderRadius, " ").concat(borderRadius, " 0 !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n /* addonAfter: input is before addon \u2014 rounded left, flat right */\n & .ant-input-group > .ant-input:first-child {\n border-radius: ").concat(borderRadius, " 0 0 ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n\n /* Case 3: Input with prefix (e.g. Search without addon) \u2014 class on .ant-input-affix-wrapper */\n &.ant-input-affix-wrapper {\n border-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n & .ant-input {\n height: auto;\n padding: 0;\n border: none;\n border-radius: 0 !important;\n }\n }\n &.ant-input-affix-wrapper-focused {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n }\n\n /* Case 4: addon + prefix \u2014 class on .ant-input-group-wrapper */\n & .ant-input-group > .ant-input-affix-wrapper:last-child,\n & .ant-input-group > .ant-input-affix-wrapper:first-child {\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &.ant-input-affix-wrapper-focused {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n }\n & .ant-input {\n height: auto;\n padding: 0;\n border: none;\n border-radius: 0 !important;\n box-shadow: none;\n &:hover, &:focus { border: none; box-shadow: none; }\n }\n }\n /* addonBefore + prefix \u2014 rounded right */\n & .ant-input-group > .ant-input-affix-wrapper:last-child {\n border-radius: 0 ").concat(borderRadius, " ").concat(borderRadius, " 0 !important;\n padding-left: 8px;\n }\n /* prefix + addonAfter \u2014 rounded left */\n & .ant-input-group > .ant-input-affix-wrapper:first-child {\n border-radius: ").concat(borderRadius, " 0 0 ").concat(borderRadius, " !important;\n }\n\n /* Disabled states */\n &.ant-input-disabled, & .ant-input-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n border-color: ").concat(theme.color.base.line, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n &:hover { border-color: ").concat(theme.color.base.line, "; }\n }\n &.ant-input-affix-wrapper-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n border-color: ").concat(theme.color.base.line, ";\n & .ant-input-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n }\n &:hover { border-color: ").concat(theme.color.base.line, "; }\n }\n\n /* Addon containers */\n & .ant-input-group-addon:not(:last-child) {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n color: ").concat(theme.color.base.onNeutral, ";\n background-color: ").concat(theme.color.surface.secondaryNeutral, ";\n border-top-left-radius: ").concat(borderRadius, " !important;\n border-bottom-left-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(theme.color.base.line, ";\n border-right: 0;\n padding-left: 12px;\n padding-right: 8px;\n &:has(.ant-select) {\n padding: 0;\n .ant-select-focused .ant-select-selector {\n border-color: transparent !important;\n box-shadow: none !important;\n }\n .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n background: transparent !important;\n height: 100%;\n }\n }\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.neutral, ";\n padding-left: 12px;\n padding-right: 8px;\n }\n + .ant-input-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n border-color: ").concat(theme.color.base.line, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n &:hover { border-color: ").concat(theme.color.base.line, "; }\n }\n }\n & .ant-input-group-addon:last-child {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n color: ").concat(theme.color.base.onNeutral, ";\n background-color: ").concat(theme.color.surface.secondaryNeutral, ";\n border-top-right-radius: ").concat(borderRadius, " !important;\n border-bottom-right-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(theme.color.base.line, ";\n border-left: 0;\n padding-left: 16px;\n padding-right: 16px;\n &:has(.ant-select) {\n padding: 0;\n .ant-select-focused .ant-select-selector {\n border-color: transparent !important;\n box-shadow: none !important;\n }\n .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n background: transparent !important;\n height: 100%;\n }\n }\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.neutral, ";\n padding-left: 8px;\n padding-right: 12px;\n }\n }\n ").concat(disabledAddon ? "\n & .ant-input-group-addon:last-child {\n background-color: ".concat(theme.color.surface.disabledSurface, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n pointer-events: none;\n cursor: not-allowed;\n border-color: ").concat(theme.color.base.line, ";\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n }\n }\n & .ant-input-group-addon:not(:last-child) {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n pointer-events: none;\n cursor: not-allowed;\n border-color: ").concat(theme.color.base.line, ";\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n }\n }\n ") : '', "\n ");
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=inputStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputStyles.js","sourceRoot":"","sources":["../../../src/components/Input/inputStyles.ts"],"names":[],"mappings":";;;AAkBA,
|
|
1
|
+
{"version":3,"file":"inputStyles.js","sourceRoot":"","sources":["../../../src/components/Input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