Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ test.describe("ImageUpload", () => {

await test.step("Confirm review prompt and open modal", async () => {
await story.locators.reviewOkButton.click();
await story.waitForImageEditorCanvas();
await story.snapshot("review-modal", {
fullscreen: true,
});
Expand Down
104 changes: 98 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"peerDependencies": {
"@floating-ui/react": ">=0.26.23 <1.0.0",
"@lifesg/react-design-system": "^4.0.0-alpha.6",
"@lifesg/react-design-system": "^4.0.0-alpha.9",
"@lifesg/react-icons": "^1.9.0",
"react": "^17.0.2 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0"
Expand All @@ -72,7 +72,7 @@
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@floating-ui/react": "^0.26.23",
"@lifesg/react-design-system": "^4.0.0-alpha.6",
"@lifesg/react-design-system": "^4.0.0-alpha.9",
"@lifesg/react-icons": "^1.9.0",
"@lifesg/web-form-builder": "^1.0.0-alpha.4",
"@linaria/babel-preset": "^5.0.4",
Expand Down
30 changes: 1 addition & 29 deletions src/components/fields/checkbox-group/checkbox-group.styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Colour, Spacing } from "@lifesg/react-design-system/theme";
import { Spacing } from "@lifesg/react-design-system/theme";
import { css } from "@linaria/core";

export const label = css`
Expand Down Expand Up @@ -29,18 +29,6 @@ export const toggleWrapper = css`
gap: ${Spacing["spacing-16"]};
`;

export const toggleWrapperHasError = css`
/* No item selected — all items get error border */
&:not(:has(input:checked)) > * {
border-color: ${Colour["border-error"]};
}

/* An item is selected — unselected items revert to normal border */
&:has(input:checked) > *:not(:has(input:checked)) {
border-color: ${Colour.border};
}
`;

export const toggleWrapperVertical = css`
flex-direction: column;
`;
Expand All @@ -51,19 +39,3 @@ export const toggle = css`
padding: 0;
}
`;

export const toggleHasError = css`
Comment thread
ziggyzet marked this conversation as resolved.
&:has(input:checked) {
background: ${Colour["bg-error"]};
border-color: ${Colour["border-error"]};

label,
span {
color: ${Colour["text-error"]};
}

svg {
color: ${Colour["icon-error"]};
}
}
`;
3 changes: 1 addition & 2 deletions src/components/fields/checkbox-group/checkbox-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ export const CheckboxGroup = (props: IGenericFieldProps<TCheckboxGroupSchema>) =
className={clsx(
styles.toggleWrapper,
customOptions.layoutType === "vertical" && styles.toggleWrapperVertical,
error?.message && styles.toggleWrapperHasError,
className ? `${className}-checkbox-container` : undefined
)}
>
Expand All @@ -163,7 +162,7 @@ export const CheckboxGroup = (props: IGenericFieldProps<TCheckboxGroupSchema>) =
type="checkbox"
data-testid={TestHelper.generateId(id, "toggle")}
id={checkboxId}
className={clsx(styles.toggle, className, error?.message && styles.toggleHasError)}
className={clsx(styles.toggle, className)}
disabled={disabled ?? option.disabled}
focusableWhenDisabled={disabled}
name={checkboxId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ export const drawDeleteButtonWrapper = css`
export const drawDeleteButton = css`
padding: 0;
width: 5.4375rem;
height: 2.5rem;
gap: ${Spacing["spacing-4"]};
background-color: ${Colour.bg};
box-shadow: ${Shadow["sm-strong"]};
border-radius: 1.25rem;
border-radius: ${Radius.full};

&:first-child {
margin-bottom: ${Spacing["spacing-16"]};
Expand Down
Comment thread
qroll marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ export const ImageReview = (props: IProps) => {
className={clsx(styles.drawIcon, drawDeleteDisabled && styles.drawIconDisabled)}
/>
}
sizeType="small"
>
<Typography.BodySM
className={clsx(
Expand All @@ -452,6 +453,7 @@ export const ImageReview = (props: IProps) => {
className={clsx(styles.deleteIcon, drawDeleteDisabled && styles.deleteIconDisabled)}
/>
}
sizeType="small"
>
<Typography.BodySM
className={clsx(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const legendIcon = css`
export const closeButton = css`
padding: 0;
background-color: transparent;
min-height: unset;

height: ${Spacing["spacing-20"]};
width: ${Spacing["spacing-20"]};
Expand Down
Loading