Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {colors, layout, type, motion} from '@pluralsight/ps-design-system-core'
import { widths as iconWidths } from '@pluralsight/ps-design-system-icon'
import { names as themeNames } from '@pluralsight/ps-design-system-theme'
import { transparentize } from '@pluralsight/ps-design-system-util'
import * as vars from '../vars/index.js'
const dayDimensions = {
height: '32px',
width: '32px',
margin: `0 2px ${layout.spacingXSmall} 0`,
border: '3px solid transparent'
}
export default {
'.psds-date-picker': {
display: 'inline-block'
},
'.psds-date-picker--disabled': {
opacity: 0.5
},
// __field
'.psds-date-picker__field': {
display: 'none'
},
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingTop: layout.spacingXSmall
},
[`.psds-text-input__sub-label.psds-theme--${themeNames.light}`]: {
color: colors.gray03
},
// __error
'.psds-text-input__error': {
position: 'absolute',
right: `calc(-1 * (${iconWidths.medium} + ${layout.spacingXSmall}))`,
display: 'flex',
alignItems: 'center',
color: colors.red,
marginLeft: layout.spacingXSmall
}
}
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingTop: layout.spacingXSmall
},
[`.psds-date-picker__sub-label.psds-theme--${themeNames.light}`]: {
color: colors.gray03
},
// __error
'.psds-date-picker__error': {
position: 'absolute',
right: `calc(-1 * (${iconWidths.medium} + ${layout.spacingXSmall}))`,
display: 'flex',
alignItems: 'center',
color: colors.red,
marginLeft: layout.spacingXSmall
},
// __calendar-container
'.psds-date-picker__calendar-container': {
position: 'absolute',
zIndex: '1',
marginTop: layout.spacingXXSmall
},
'@keyframes psds-date-picker__calendar__keyframes__slide': {
'100%': {
transform: 'translateY(0)',
opacity: 1
}
},
// __sub-label
'.psds-text-input__sub-label': {
color: colors.gray02,
fontSize: type.fontSizeXSmall,
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingTop: layout.spacingXSmall
},
[`.psds-text-input__sub-label.psds-theme--${themeNames.light}`]: {
color: colors.gray03
},
// __error
'.psds-text-input__error': {
position: 'absolute',
right: `calc(-1 * (${iconWidths.medium} + ${layout.spacingXSmall}))`,
display: 'flex',
alignItems: 'center',
color: colors.red,
marginLeft: layout.spacingXSmall
}
}
},
// __search
'.psds-error-page__search': {
position: 'relative',
display: 'inline-flex',
alignItems: 'center',
color: colors.gray02
},
[`.psds-error-page__search.psds-theme--${themeNames.light}`]: {
background: colors.white,
color: colors.gray03
},
'.psds-error-page__search__icon': {
position: 'absolute',
left: layout.spacingXSmall,
width: iconWidths.medium,
height: iconWidths.medium,
fill: colors.gray02
},
'.psds-error-page__search__input': {
position: 'relative',
height: '40px',
padding: `0 ${layout.spacingXSmall} 0 calc(${layout.spacingXSmall} + ${iconWidths.medium} + ${layout.spacingXSmall})`,
color: colors.gray02,
fontSize: type.fontSizeSmall,
lineHeight: type.lineHeightStandard,
background: 'none',
border: `1px solid ${colors.gray03}`,
borderRadius: '2px'
},
[`.psds-error-page__search__input.psds-theme--${themeNames.light}`]: {
// __icon
'.psds-text-input__icon': {
position: 'absolute',
left: layout.spacingXSmall,
top: '50%',
transform: 'translateY(-50%)',
display: 'flex',
alignItems: 'center',
color: colors.gray03
},
[`.psds-text-input__icon.psds-theme--${themeNames.light}`]: {
color: colors.gray02
},
[`.psds-text-input__icon--icon-align-${vars.iconAligns.right}`]: {
left: 'auto',
right: layout.spacingXSmall
},
[`.psds-text-input__icon--appearance-${vars.appearances.subtle}`]: {
color: colors.gray02
},
// __label
'.psds-text-input__label': {
color: colors.bone,
fontSize: type.fontSizeSmall,
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingBottom: layout.spacingXSmall
},
[`.psds-text-input__label.psds-theme--${themeNames.light}`]: {
color: colors.gray05
},
fontSize: type.fontSizeSmall,
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingBottom: layout.spacingXSmall
},
[`.psds-text-input__label.psds-theme--${themeNames.light}`]: {
color: colors.gray05
},
// __sub-label
'.psds-text-input__sub-label': {
color: colors.gray02,
fontSize: type.fontSizeXSmall,
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingTop: layout.spacingXSmall
},
[`.psds-text-input__sub-label.psds-theme--${themeNames.light}`]: {
color: colors.gray03
},
// __error
'.psds-text-input__error': {
position: 'absolute',
right: `calc(-1 * (${iconWidths.medium} + ${layout.spacingXSmall}))`,
display: 'flex',
alignItems: 'center',
color: colors.red,
marginLeft: layout.spacingXSmall
}
}
}
},
[`.psds-text-input__field--error.psds-theme--${themeNames.light}`]: {
border: '1px solid transparent'
},
[`.psds-text-input__field--appearance-${vars.appearances.subtle}`]: {
color: colors.gray01,
background: colors.gray06,
border: `1px solid ${colors.gray03}`
},
[`.psds-text-input__field--appearance-${vars.appearances.subtle}.psds-theme--${themeNames.light}`]: {
color: colors.gray05
},
[`.psds-text-input__field--icon-align-${vars.iconAligns.left}`]: {
padding: `0 ${layout.spacingMedium} 0 calc(${layout.spacingXSmall} + ${iconWidths.medium} + ${layout.spacingXSmall})`
},
[`.psds-text-input__field--icon-align-${vars.iconAligns.right}`]: {
padding: `0 calc(${layout.spacingXSmall} + ${iconWidths.medium} + ${layout.spacingXSmall}) 0 ${layout.spacingMedium}`
},
[`.psds-text-input__field--icon-align-${vars.iconAligns.left}.psds-text-input--small`]: {
padding: `0 ${layout.spacingXSmall} 0 ${parseInt(
layout.spacingMedium,
10
) + parseInt(iconWidths.medium, 10)}px`
},
[`.psds-text-input__field--icon-align-${vars.iconAligns.right}.psds-text-input--small`]: {
padding: `0 ${parseInt(layout.spacingMedium, 10) +
parseInt(iconWidths.medium, 10)}px 0 ${layout.spacingXSmall}`
},
// __field-container
lineHeight: '16px',
fontWeight: type.fontWeightMedium,
paddingTop: layout.spacingXSmall
},
[`.psds-text-area__sub-label.psds-theme--${themeNames.light}`]: {
color: colors.gray03
},
'.psds-text-area__error': {
position: 'absolute',
right: `calc(-1 * (${iconWidths.medium} + ${layout.spacingXSmall}))`,
display: 'flex',
alignItems: 'flex-start',
height: '100%',
paddingTop: layout.spacingXSmall,
marginLeft: layout.spacingXSmall,
color: colors.red
}
}