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

Content and form page style refactor with utrecht components #268

Merged
merged 39 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5f5d121
feat(form): refactored the form with utrecht components
dutchcelt Sep 20, 2022
6bca743
fix: renaming content file
dutchcelt Sep 20, 2022
ec5e9dc
fix: removed unused layout attribute
dutchcelt Sep 20, 2022
485e26a
style: link styling
dutchcelt Sep 20, 2022
2d2e3e7
style: created mixins for the nl demo page class
dutchcelt Sep 21, 2022
949c39b
style: added tokens for utrecht lists
dutchcelt Sep 21, 2022
0409288
style: utrecht class for small paragraph
dutchcelt Sep 21, 2022
fc5954a
style: removes main rvo list class
dutchcelt Sep 21, 2022
021b369
style: added rvo list tokens
dutchcelt Sep 21, 2022
f9341cf
style: missing heading and icon
dutchcelt Sep 21, 2022
b01d62f
style: missing distanced on paragraph
dutchcelt Sep 21, 2022
d1ab35b
fix: `npmrun-all` blocking tokens being built during watch
dutchcelt Sep 22, 2022
18bbf8c
style: breadcrumbs
dutchcelt Sep 22, 2022
4e535f2
style: Using Utrecht CSS for `strong` text.
dutchcelt Sep 26, 2022
e6016c8
chore: remove unecessary import of CSS component library
Robbert Oct 3, 2022
d3e3dae
refactor: use Icon component everywhere
Robbert Oct 3, 2022
f251959
refactor: use `utrecht-icon`
Robbert Oct 3, 2022
cfbcc8c
fix: missing token for description
dutchcelt Oct 3, 2022
ea70fdc
fix: list initial indent
dutchcelt Oct 3, 2022
5b6dc4d
refactor: use utrecht-button mixin for tertiary/quaternary
Robbert Oct 3, 2022
b7074f4
chore: remove `::before` and `::after` selectors for icons
Robbert Oct 3, 2022
3ad7fb4
refactor: switch to utrecht-blockquote
Robbert Oct 3, 2022
125cb7a
style: textarea tokens
Robbert Oct 3, 2022
87d84d7
chore: use the Button component in more places
Robbert Oct 3, 2022
936f14b
fix: bad merge
dutchcelt Oct 4, 2022
67bca3d
style: split out the description
dutchcelt Oct 4, 2022
65e4aad
fix: style alignment bug for icons
dutchcelt Oct 4, 2022
75d0989
Remove nested ternaries for readability
Oct 4, 2022
1f206ee
Fix lint issue with key prop (quick fix for now)
Oct 4, 2022
7714d79
Fix another key prop lint issue
Oct 4, 2022
3e39386
Add hideFields option to fielset (for UXPin)
Oct 4, 2022
a6efd21
Remove nested ternary in Table
Oct 4, 2022
690b100
ci: add TypeScript checks as lint step
Robbert Oct 5, 2022
b774532
chore: fix TypeScript warnings
Robbert Oct 5, 2022
cf46a5d
fix: `children` should allow more than one child node
Robbert Oct 5, 2022
34291e3
fix: removed mixins and only using rvo styles and component patches
dutchcelt Oct 6, 2022
cba1ebf
ci: build before lint for TypeScript
Robbert Oct 6, 2022
c757b77
ci: ignore `dist` for HTML linting to fix build
Robbert Oct 7, 2022
b7a6125
fix: lint issues introduced by cf18d4a
Robbert Oct 8, 2022
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
8 changes: 4 additions & 4 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
npm ci
npm ls

- name: "Continuous Integration: lint"
run: |
npm run lint --if-present

- name: "Continuous Integration: build"
run: |
npm run build --if-present

- name: "Continuous Integration: lint"
run: |
npm run lint --if-present

- name: "Continuous Integration: test"
run: |
npm run test --if-present
Expand Down
11 changes: 9 additions & 2 deletions components/alert/css/alert.examples.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import frameworkDecorator from "@nl-rvo/storybook/frameworkDecorator";
import { Canvas, Meta, Story } from "@storybook/addon-docs";
import { Button } from "../../button/css/template";
import { AllAlertKinds, argTypes, defaultArgs } from "./template";
import "./index.scss";

Expand Down Expand Up @@ -29,8 +30,14 @@ import "./index.scss";
name="With button"
args={{
defaultArgs,
content:
'<div class="rvo-layout-column rvo-layout-gap--md"><div>This is an example of an alert with button</div><button class="utrecht-button utrecht-button--primary-action rvo-button--sm">Button</button></div>',
content: (
<div className="rvo-layout-column rvo-layout-gap--md">
<div>This is an example of an alert with button</div>
<Button kind="primary" size="sm">
Button
</Button>
</div>
),
}}
>
{AllAlertKinds.bind({})}
Expand Down
4 changes: 2 additions & 2 deletions components/alert/css/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @license EUPL-1.2
* Copyright (c) 2022 Community for NL Design System
*/
import '@utrecht/component-library-css';
import clsx from 'clsx';
import React from 'react';
import * as ReactDOMServer from 'react-dom/server';
import { Icon } from '../../icon/css/template';
import { Link } from '../../link/css/template';
import { StatusIcon } from '../../status-icon/css/template';
import validateHTML from '../../utils/validateHTML';
Expand Down Expand Up @@ -79,7 +79,7 @@ export const Alert: React.FC<IAlertProps> = ({
</div>
{closable && (
<button className="utrecht-button rvo-button--close">
<div className="rvo-icon rvo-icon-kruis rvo-icon--md rvo-icon--zwart"></div>
<Icon color="zwart" icon="kruis" size="md" />
</button>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/breadcrumbs/css/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
import clsx from 'clsx';
import React from 'react';
import { Icon } from '../../icon/css/template';

interface IBreadcrumbItem {
label: string;
Expand Down Expand Up @@ -44,7 +45,7 @@ export const Breadcrumbs: React.FC<IBreadcrumbProps> = ({ items = defaultArgs.it
{items.map((item, index) => {
// Parse divider markup
let dividerMarkup = index > 0 && index < items.length && (
<div className={clsx('rvo-icon', 'rvo-icon-delta-naar-rechts', `rvo-icon--xs`, 'rvo-icon--hemelblauw')}></div>
<Icon color="hemelblauw" icon="delta-naar-rechts" size="xs" />
);

// Parse item markup
Expand Down
6 changes: 2 additions & 4 deletions components/button-group/css/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
* @license EUPL-1.2
* Copyright (c) 2022 Community for NL Design System
*/
import '@utrecht/component-library-css';
import React from 'react';
import React, { PropsWithChildren } from 'react';
import { Button, IButtonProps } from '../../button/css/template';

interface IButtonGroupProps {
buttonsLeft: IButtonProps[];
buttonsRight: IButtonProps[];
children?: React.ReactNode;
}

const defaultButtonsLeft = [
Expand Down Expand Up @@ -48,7 +46,7 @@ export const defaultArgs: IButtonGroupProps = {
buttonsRight: defaultButtonsRight,
};

export const ButtonGroup: React.FC<IButtonGroupProps> = ({
export const ButtonGroup: React.FC<PropsWithChildren<IButtonGroupProps>> = ({
buttonsLeft = defaultArgs.buttonsLeft,
buttonsRight = defaultArgs.buttonsRight,
children,
Expand Down
14 changes: 7 additions & 7 deletions components/button/css/button.kinds.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import frameworkDecorator from "@nl-rvo/storybook/frameworkDecorator";
import { Canvas, Meta, Story } from "@storybook/addon-docs";
import { argTypes, Button } from "./template";
import { argTypes, Button, exampleArgs } from "./template";
import "./index.scss";

<Meta
Expand All @@ -19,12 +19,7 @@ import "./index.scss";
## Primary

<Canvas>
<Story
name="Primary"
args={{
kind: "primary",
}}
>
<Story name="Primary" args={{ ...exampleArgs, kind: "primary" }}>
{Button.bind({})}
</Story>
</Canvas>
Expand All @@ -35,6 +30,7 @@ import "./index.scss";
<Story
name="Secondary"
args={{
...exampleArgs,
kind: "secondary",
}}
>
Expand All @@ -48,6 +44,7 @@ import "./index.scss";
<Story
name="Tertiary"
args={{
...exampleArgs,
kind: "tertiary",
}}
>
Expand All @@ -61,6 +58,7 @@ import "./index.scss";
<Story
name="Quaternary"
args={{
...exampleArgs,
kind: "quaternary",
}}
>
Expand All @@ -74,6 +72,7 @@ import "./index.scss";
<Story
name="Warning subtle"
args={{
...exampleArgs,
kind: "warning-subtle",
}}
>
Expand All @@ -87,6 +86,7 @@ import "./index.scss";
<Story
name="Warning"
args={{
...exampleArgs,
kind: "warning",
}}
>
Expand Down
16 changes: 15 additions & 1 deletion components/button/css/button.sizes.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,28 @@ import "./index.scss";

# Button sizes

### Extra small

<Canvas>
<Story
name="Extra small"
args={{
kind: "primary",
size: "xs",
}}
>
{AllButtonKinds.bind({})}
</Story>
</Canvas>

### Small

<Canvas>
<Story
name="Small"
args={{
kind: "primary",
size: "small",
size: "sm",
}}
>
{AllButtonKinds.bind({})}
Expand Down
4 changes: 2 additions & 2 deletions components/button/css/button.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import frameworkDecorator from "@nl-rvo/storybook/frameworkDecorator";
import { ArgsTable, Canvas, Meta, Story } from "@storybook/addon-docs";
import { argTypes, Button, defaultArgs } from "./template";
import { argTypes, Button, exampleArgs } from "./template";
import "./index.scss";

<Meta
Expand All @@ -17,7 +17,7 @@ import "./index.scss";
# Button

<Canvas>
<Story name="Button" args={defaultArgs}>
<Story name="Button" args={exampleArgs}>
{Button.bind({})}
</Story>
</Canvas>
Expand Down
Loading