Skip to content

Commit

Permalink
Adding our style updates (#914)
Browse files Browse the repository at this point in the history
* feat: Updated Group Checkbox State Colors (#854)

Co-authored-by: Farhan Abdul <farhan.abdul@selectquote.com>

* SSR-163: SQForms: Masked Read Only Field - Update component (#856)

* feat: 🎸 Update SQForm Masked TextField (#866)

* feat: 🎸 Update SQForm Masked TextField

Updated font size and font weight

BREAKING CHANGE: 🧨 no

✅ Closes: #865

* feat: 🎸 Update SQForm masked TextField

Updated font weight and size

BREAKING CHANGE: 🧨 No

✅ Closes: #865

---------

Co-authored-by: Mudassar Raza <mudasarraza049@gmail.com>

* feat: SSR-161 SQFormsDropdown - Update component (#867)

* feat: SQFormsDropdown - Update component

* feat: move fontweight into classes

* feat: 🎸 Update Component Multi-Select (#869)

* feat: 🎸 Update Component Multi-Select

Updated font weight and font size

BREAKING CHANGE: 🧨 No

✅ Closes: #868

* fix: 🐛 Variant property into Form Control

Positioned field title to the left as it was too far to the right side

BREAKING CHANGE: 🧨 n

✅ Closes: #868

---------

Co-authored-by: Mudassar Raza <mudasarraza049@gmail.com>

* 874 sqforms readonlyfield update component (#875)

* feat: 🎸 ReadOnlyField-Update Component

Removed underline and updated font weight

BREAKING CHANGE: 🧨 n

✅ Closes: #874

* feat: 🎸 ReadOnlyField-Update Component

Removed underline and updated font weight

BREAKING CHANGE: 🧨 n

✅ Closes: #874

* feat: 🎸 ReadOnlyField-Update Component

Removed underline and updated font weight

BREAKING CHANGE: 🧨 No

✅ Closes: #874

* feat: 🎸 ReadOnlyField-Update Component

Make field label not look actionable

BREAKING CHANGE: 🧨 No

✅ Closes: #874

---------

Co-authored-by: Mudassar Raza <mudasarraza049@gmail.com>

* style: 💄 SQForms: MultiValue - Update component (#878)

* style: 💄 SQForms: MultiValue - Update component

✅ Closes: SSR-166

* style: 💄 Adding Variable for Input Size

✅ Closes: SSR-166

* style: 💄 Updating Code and Move some general Code in scplus-sha

✅ Closes: SSR-166

---------

Co-authored-by: Farhan Abdul <farhan.abdul@selectquote.com>

* chore: 🤖 Update to latest SCPlus Shared Components

Updating to the latest version of SCPlus Shared Components

* chore: 🤖 Remove redundant story name

Since the name of the story is already 'Default' setting the story name
to the same is unnecessary

---------

Co-authored-by: Malik Abdul Farhan <malikfarhan183@gmail.com>
Co-authored-by: Farhan Abdul <farhan.abdul@selectquote.com>
Co-authored-by: asim-sqfe <71133344+asim-sqfe@users.noreply.github.com>
Co-authored-by: Mudassar-Raza <126600957+Mudassar-Raza@users.noreply.github.com>
Co-authored-by: Mudassar Raza <mudasarraza049@gmail.com>
Co-authored-by: Laurel Bean <laurel.bean@selectquote.com>
  • Loading branch information
7 people authored Jul 21, 2023
1 parent 4a97486 commit 89a0758
Show file tree
Hide file tree
Showing 11 changed files with 3,887 additions and 13,702 deletions.
17,534 changes: 3,837 additions & 13,697 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"react-textarea-autosize": "^8.4.0",
"react-weekly-schedule": "0.0.0-development",
"rimraf": "^3.0.2",
"scplus-shared-components": "https://npm-public.selectquotelabs.com/scplus-shared-components/12.0.1",
"scplus-shared-components": "https://npm-public.selectquotelabs.com/scplus-shared-components/12.1.0",
"semantic-release": "^17.4.2",
"storybook-addon-material-ui5": "^1.0.0",
"ts-essentials": "^9.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ function SQFormCheckboxGroupItem({
return (
<FormControlLabel
sx={(theme) => ({
mb: theme.spacing(1.5),
mb: theme.spacing(2),
mr: isRowDisplay ? theme.spacing(3.75) : undefined,
'& .MuiCheckbox-root.Mui-disabled': {
color: 'var(--color-stone)',
},
'& .MuiCheckbox-root:not(.Mui-disabled)': {
color: 'var(--color-darkTeal)',
},
})}
label={label}
control={
Expand Down
2 changes: 2 additions & 0 deletions src/components/fields/SQFormDropdown/SQFormDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const classes = {
'& .MuiSelect-selectMenu': {
height: '1.1876em',
},
fontWeight: 600,
},
};

Expand Down Expand Up @@ -153,6 +154,7 @@ function SQFormDropdown({
key={`${name}_${option.value}`}
disabled={option.isDisabled}
value={option.value}
sx={{fontWeight: 600}}
>
{option.label}
</MenuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ function SQFormMaskedReadOnlyField({
...InputProps,
placeholder,
inputComponent: TextFieldMask,
sx: {
fontWeight: 600,
},
}}
inputProps={{
...inputProps,
Expand Down
3 changes: 3 additions & 0 deletions src/components/fields/SQFormMasked/SQFormMaskedTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ function SQFormMaskedTextField({
InputProps={{
...InputProps,
inputComponent: TextFieldMask,
sx: {
fontWeight: 'var(--font-weight-semibold)',
},
}}
inputProps={{
...inputProps,
Expand Down
2 changes: 2 additions & 0 deletions src/components/fields/SQFormMultiSelect/SQFormMultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const classes = {
'& .MuiSelect-selectMenu': {
height: '1.1876em',
},
fontWeight: 'var(--font-weight-semibold)',
},
paperList: {
maxHeight: ITEM_HEIGHT * 4.5 + ITEM_PADDING_TOP,
Expand Down Expand Up @@ -319,6 +320,7 @@ function SQFormMultiSelect({
disabled={isDisabled}
required={isFieldRequired}
fullWidth={true}
variant="standard"
>
<InputLabel id={labelID}>{label}</InputLabel>
<Tooltip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function SQFormMultiValue({
...params.InputLabelProps,
shrink: true,
}}
error={isFieldError}
inputProps={{
...params.inputProps,
disabled: isDisabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ export type SQFormReadOnlyFieldProps = BaseFieldProps & {
inputProps?: TextFieldProps['inputProps'];
};

const readOnlyInputProps = {
disableUnderline: true,
readOnly: true,
};

const styles = {
'& .MuiInput-input': {
fontWeight: 'var(--font-weight-semibold)',
},
'& .MuiInputLabel-root.Mui-focused': {
color: 'var(--color-jetBlack)',
},
};

function SQFormReadOnlyField({
label,
name,
Expand Down Expand Up @@ -41,10 +55,11 @@ function SQFormReadOnlyField({
InputLabelProps={{shrink: true}}
InputProps={{
...InputProps,
readOnly: true,
...readOnlyInputProps,
}}
inputProps={inputProps}
style={{marginBottom: 21}}
sx={styles}
{...muiFieldProps}
/>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function useForm<TValue, TChangeEvent>({
if (isFulfilled) {
return (
<VerifiedIcon
sx={{color: 'var(--color-palmLeaf)', ...SUCCESS_ICON_STYLES}}
sx={{color: 'var(--color-textSuccessGreen)', ...SUCCESS_ICON_STYLES}}
/>
);
}
Expand Down
15 changes: 14 additions & 1 deletion stories/SQFormDropdown.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import * as Yup from 'yup';
import * as markdown from '../notes/SQFormDropdown.md';
import getSizeProp from './utils/getSizeProp';
import {createDocsPage} from './utils/createDocsPage';
Expand Down Expand Up @@ -56,6 +57,10 @@ const defaultArgs = {
},
};

const validationSchema = Yup.object({
[defaultArgs.name]: Yup.string().required('Required'),
});

const Template: DropdownStoryType = (args) => {
const {sqFormProps, schema, size, ...dropdownProps} = args;
return (
Expand All @@ -73,6 +78,14 @@ const Template: DropdownStoryType = (args) => {

export const Default = Template.bind({});
Default.args = defaultArgs;
Default.storyName = 'SQFormDropdown';

export const WithValidation = Template.bind({});
WithValidation.args = {
...defaultArgs,
schema: validationSchema,
};
WithValidation.parameters = {
controls: {exclude: 'schema'},
};

export default meta;

0 comments on commit 89a0758

Please sign in to comment.