Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(806) container queries and storybook #877

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a162a43
feat(806): implement #400 container queries
LukeFinch Apr 24, 2023
1608c53
feat(806): define queries on rules object
LukeFinch Apr 27, 2023
98504da
feat(806): extend MQ to allow CQ rules
LukeFinch Apr 27, 2023
53d1307
feat(806): wip
LukeFinch May 2, 2023
1478cea
feat(806): update tests
LukeFinch May 2, 2023
2341ccc
feat(806): handle responsive props container rules
LukeFinch May 3, 2023
4d78efe
feat(806): typescript fixes
LukeFinch May 4, 2023
8f1d77e
feat(806): fix types update test
LukeFinch May 5, 2023
d16da5a
fix(806): fix emotion package versions
LukeFinch May 5, 2023
754c35c
feat(806): fix type for getAreasList
LukeFinch May 5, 2023
6afb330
feat(806): merge main
LukeFinch May 5, 2023
c1ede9e
feat(806): change types for get typography from theme
LukeFinch May 5, 2023
e2f5585
feat(806): update examples, add block story
LukeFinch May 5, 2023
99a49f3
Merge branch 'main' into feat/806-container-queries-storybook
LukeFinch May 5, 2023
2a3befd
feat(806): update snapshots
LukeFinch May 5, 2023
d69a9f1
feat(806): update snapshots
LukeFinch May 5, 2023
71aeceb
feat(806): address comments
LukeFinch May 5, 2023
1507631
feat(806): test coverage
LukeFinch May 9, 2023
3088f7c
Merge branch 'main' into feat/806-container-queries-storybook
LukeFinch May 9, 2023
44b882f
feat(806): move container props to own function
LukeFinch May 10, 2023
667e4dd
feat(806): move container props to own function
LukeFinch May 10, 2023
4a1fcd6
feat(806): address comments
LukeFinch May 10, 2023
db0ddfe
feat(806): remove a test
LukeFinch May 10, 2023
a3becab
Merge branch 'main' into feat/806-container-queries-storybook
LukeFinch May 11, 2023
f316a46
feat(806): remove unused code
LukeFinch May 12, 2023
80110a6
feat(806): move props out of overrides
LukeFinch May 16, 2023
b2425fb
feat(806): move props out of overrides
LukeFinch May 16, 2023
43900b8
Merge branch 'main' into feat/806-container-queries-storybook
LukeFinch May 17, 2023
ba253fc
feat(806): test coverage, peer deps versions
LukeFinch May 19, 2023
5c0e7b7
feat(806): container props tests
LukeFinch May 19, 2023
04ad044
feat(806): merge main
LukeFinch May 19, 2023
48cb5c5
feat(806): update package json snapshot
LukeFinch May 19, 2023
49d001b
feat(806): fix merge conflicts
LukeFinch May 19, 2023
3f5ca77
Merge branch 'main' into feat/806-container-queries-storybook
mutebg Jul 7, 2023
faedeb3
Merge branch 'main' into feat/806-container-queries-storybook
mutebg Jul 17, 2023
8a1aff9
Merge branch 'main' into feat/806-container-queries-storybook
mutebg Aug 15, 2023
3afbf60
Merge branch 'main' into feat/806-container-queries-storybook
mutebg Oct 2, 2023
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
Prev Previous commit
Next Next commit
feat(806): remove unused code
  • Loading branch information
LukeFinch committed May 12, 2023
commit f316a467511b66a0ec0d39749a6872a9f2225ccf
12 changes: 0 additions & 12 deletions src/grid-layout/__tests__/stories/grid-layout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ const BigRedBlock = styled(Block)`
background: red;
`;

const QueryContainerSmall = styled(Block)`
width: 200px;
container-type: inline-size;
container-name: grid-container;
`;

const QueryContainerLarge = styled(Block)`
width: 400px;
container-type: inline-size;
container-name: grid-container;
`;

export const StoryResponsiveExample = () => (
<>
<StorybookSubHeading>Responsive grid with mixed sizing</StorybookSubHeading>
Expand Down
3 changes: 1 addition & 2 deletions src/grid-layout/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export type GridLayoutItemProps = BlockProps & {
alignSelf?: MQ<string>;
column?: MQ<string>;
row?: MQ<string>;
} & ContainerQueryProps &
React.HTMLAttributes<HTMLElement>;
} & React.HTMLAttributes<HTMLElement>;

export type AreasMap = {
[componentName: string]: React.FC<GridLayoutItemProps>;
Expand Down
21 changes: 0 additions & 21 deletions src/utils/__tests__/is-valid-css-size.test.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/utils/responsive-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,3 @@ export const isResponsive = (
typeof prop === 'object' &&
(Object.keys(breakpoints).some(bp => prop && hasOwnProperty(prop, bp)) ||
hasOwnProperty(prop, 'rules'));

// export const getContainerQuery = (
// minWidth?: string,
// maxWidth?: string,
// ): string => {
// const queries = [];
// if (minWidth) {
// queries.push(`(min-width: ${minWidth})`);
// }
// if (maxWidth) {
// queries.push(`(max-width: ${maxWidth})`);
// }
// return `@container ${queries.join(' AND ')}`;
// };
5 changes: 0 additions & 5 deletions src/utils/style/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,6 @@ export const isValidUnit = (themeKey: string, value: any) => {
);
};

export const isValidCSSSizeUnit = (value: string) => {
const regex = new RegExp(`^\\d+(\\.\\d+)?(${CSSUnits.join('|')})$`);
return regex.test(value);
};

export const isArrayLikeObject = (value: string | object) =>
typeof value === 'object' && '0' in value;

Expand Down