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

style: setup new pages for form demo #356

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a9e649b
style: setup new pages for form demo
dutchcelt Nov 10, 2022
b0bb846
feat: corrected fieldset division
dutchcelt Nov 11, 2022
4787998
style: improved mockup layout
dutchcelt Nov 11, 2022
5c18b85
fix: using utrecht buttons
dutchcelt Nov 23, 2022
df1e5a2
style: flex layout system for forms
dutchcelt Nov 24, 2022
7adc2a5
style: consistent spacing in fields and fieldsets
dutchcelt Nov 24, 2022
b0e0201
style: refactored flex to grid
dutchcelt Nov 24, 2022
99c467d
style: allowing rules to be called on rvo theme
dutchcelt Nov 25, 2022
60dfcc3
style: added missing tokens
dutchcelt Nov 25, 2022
dadb6b6
style: align and patch styles with rvo and utrecht
dutchcelt Nov 25, 2022
f318d00
style: allow fields and fieldset to have different gaps
dutchcelt Nov 25, 2022
3c8d4b4
style: allow fields to jump to a new line
dutchcelt Nov 28, 2022
cdd5cad
style: added class for thirds
dutchcelt Nov 28, 2022
9250c41
style: moved grid to fieldsets and fields
dutchcelt Nov 29, 2022
b52f6cd
style: added sections to fieldsets
dutchcelt Nov 29, 2022
bb33bf8
style: align content token
dutchcelt Nov 29, 2022
170704d
fix: setting active and checked radio styles
dutchcelt Nov 30, 2022
8635497
fix: more row space for labels and inputs for rvo
dutchcelt Nov 30, 2022
1a361bb
feat: added section styling
dutchcelt Nov 30, 2022
81b1e08
feat: added aria-describedby attributes
dutchcelt Nov 30, 2022
b5a6aa2
fix: restructured patches and form styling
dutchcelt Nov 30, 2022
eb574c4
style: nested fieldsets
dutchcelt Nov 30, 2022
0fa051c
style: work-a-round for legends in safari
dutchcelt Nov 30, 2022
11d7a30
style: fix for nested fieldsets in basiselementen
dutchcelt Nov 30, 2022
c44e7b9
style: using the new utrecht fieldset setup
dutchcelt Nov 30, 2022
1a4da95
fix(style): based on the new utrecht fieldset setup
dutchcelt Nov 30, 2022
7c5fa47
style: responsive layout
dutchcelt Dec 1, 2022
6aededb
fix: regression with new fieldsets
dutchcelt Dec 1, 2022
34821ae
fix: reinstated explicit grid modifier class
dutchcelt Dec 2, 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
6 changes: 5 additions & 1 deletion components/form-field/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
* Copyright (c) 2021 Community for NL Design System
*/

.rvo-form-field {
clear: both;
}

.rvo-form-field__label-text {
font-weight: var(--rvo-form-field-label-font-weight);
font-weight: var(--utrecht-form-label-font-weight);
}
423 changes: 216 additions & 207 deletions documentation/demopages/algemeen/Filters.tsx

Large diffs are not rendered by default.

49 changes: 26 additions & 23 deletions documentation/demopages/algemeen/SearchInNav.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Button } from '@nl-rvo/components/button/css/template';
import { TextInputField } from '@nl-rvo/components/form-field-textinput/css/template';
import { Fieldset } from '@nl-rvo/components/form-fieldset/css/template';
import { Header } from '@nl-rvo/components/header/css/template';
import { LayoutColumnRow } from '@nl-rvo/components/layout-column-row/css/template';
import { MaxWidthLayout } from '@nl-rvo/components/max-width-layout/css/template';
import { MenuBar } from '@nl-rvo/components/menubar/css/template';
import '../common/style.scss';

import { Fieldset, FormField } from '@utrecht/component-library-react';
const SearchInNav = () => {
return (
<div className="rvo-demo-page">
Expand All @@ -25,27 +24,31 @@ const SearchInNav = () => {
/>
<LayoutColumnRow size="md">
<div className="search-form">
<Fieldset legend="">
<div className="rvo-form-layout">
<MaxWidthLayout size="sm">
<div className="rvo-inline-form">
<TextInputField label="Zoekterm"></TextInputField>
<Button
kind="primary"
size="md"
label="Zoeken"
active={false}
busy={false}
focus={false}
focusVisible={false}
disabled={false}
hover={false}
showIcon="no"
></Button>
</div>
</MaxWidthLayout>
</div>
</Fieldset>
<div className="rvo-form-layout">
<MaxWidthLayout size="sm">
<div className="rvo-inline-form">
<Fieldset className={'utrecht-form-fieldset--grid'}>
<FormField className="utrecht-form-field--xl">
<TextInputField label="Zoekterm"></TextInputField>
</FormField>
<FormField className="utrecht-form-field--sm">
<Button
kind="primary"
size="md"
label="Zoeken"
active={false}
busy={false}
focus={false}
focusVisible={false}
disabled={false}
hover={false}
showIcon="no"
></Button>
</FormField>
</Fieldset>
</div>
</MaxWidthLayout>
</div>
</div>
<MaxWidthLayout size="sm">
<main>
Expand Down
9 changes: 8 additions & 1 deletion documentation/demopages/common/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
line-height: var(--rvo-line-height-md);
margin-inline-end: auto;
margin-inline-start: auto;
max-width: 580;
max-width: 580px;
padding-inline-end: var(--rvo-space-xl);
padding-inline-start: var(--rvo-space-xl);
}
Expand Down Expand Up @@ -689,6 +689,13 @@

/* @SEARCH IN NAV */

/* stylelint-disable */
.search-form {
background-color: var(--rvo-color-grijs1);
padding-block-end: var(--rvo-space-xl);
}
/* stylelint-enable */

.rvo-topnav__link--search-active {
background-color: var(--rvo-color-grijs1);
color: var(--rvo-color-grijs7);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Canvas, Meta, Story } from "@storybook/addon-docs";
import Form from "./form";

<Meta
title="Pagina's/NL Design System Community/Basiselementen"
parameters={{
layout: "fullscreen",
status: {
type: "WORK IN PROGRESS",
},
docs: {
source: {
state: "closed",
},
},
}}
/>

# Demo

<Canvas>
<Story name="Form">
<Form />
</Story>
</Canvas>
125 changes: 125 additions & 0 deletions documentation/demopages/nl-design-system/basiselementen/form.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
import '../common/style.scss';
import {
Button,
ButtonGroup,
CustomRadioButton,
Fieldset,
FieldsetLegend,
FormField,
FormFieldDescription,
FormLabel,
Heading1,
Textbox,
} from '@utrecht/component-library-react';

const Form = () => {
return (
<div className={'basiselementen-demo-page'}>
<Heading1>Gegevens zonnepanelen invullen</Heading1>
<form className="basiselementen-layout-form">
<Fieldset>
{' '}
<Fieldset className={'utrecht-form-fieldset--subtle'}>
<FormField>
<FormLabel htmlFor={'realname'}>Uw naam</FormLabel>
<Textbox id={'realname'}></Textbox>
</FormField>
</Fieldset>
<Fieldset className={'utrecht-form-fieldset--subtle'}>
<FieldsetLegend className={'utrecht-form-fieldset__legend--label'}>
Staat uw naam op de energierekening
</FieldsetLegend>
<FormField className={'utrecht-form-field--xs utrecht-form-field--start'}>
<FormLabel htmlFor={'realnameA'}>
<CustomRadioButton name={'hasrealname'} id={'realnameA'} />
Ja
</FormLabel>
</FormField>
<FormField className={'utrecht-form-field--xs utrecht-form-field--start'}>
<FormLabel htmlFor={'realnameB'}>
<CustomRadioButton name={'hasrealname'} id={'realnameB'} />
Nee
</FormLabel>
</FormField>
</Fieldset>
</Fieldset>
<Fieldset className={'utrecht-form-fieldset--subtle'}>
<FieldsetLegend className={'utrecht-form-fieldset__legend--label'}>
Staat uw naam op de factuur van de zonnepanelen
</FieldsetLegend>
<FormField className={'utrecht-form-field--xs utrecht-form-field--start'}>
<FormLabel htmlFor={'billingnameA'}>
<CustomRadioButton name={'hasbillingname'} id={'billingnameA'} />
Ja
</FormLabel>
</FormField>
<FormField className={'utrecht-form-field--xs utrecht-form-field--start'}>
<FormLabel htmlFor={'billingnameB'}>
<CustomRadioButton name={'hasbillingname'} id={'billingnameB'} />
Nee
</FormLabel>
</FormField>
</Fieldset>
<Fieldset>
<Fieldset aria-describedby={'billingdatedescription'} className={'utrecht-form-fieldset--subtle'}>
<FieldsetLegend className={'utrecht-form-fieldset__legend--label'}>Factuurdatum</FieldsetLegend>
<FormFieldDescription id={'billingdatedescription'}>
Vul de datum in die op de factuur van de zonnepanelen staat.
</FormFieldDescription>
<FormField className={'utrecht-form-field--xs'}>
<FormLabel htmlFor={'day'}>Dag</FormLabel>
<Textbox id={'day'} invalid={true}></Textbox>
</FormField>
<FormField className={'utrecht-form-field--xs '}>
<FormLabel htmlFor={'month'}>Maand</FormLabel>
<Textbox id={'month'} invalid={true}></Textbox>
</FormField>
<FormField className={'utrecht-form-field--sm '}>
<FormLabel htmlFor={'year'}>Jaar</FormLabel>
<Textbox id={'year'} invalid={true}></Textbox>
</FormField>
<FormFieldDescription invalid={true} id={'invalidbillingdate'}>
Vul een geldige datum in.
</FormFieldDescription>
</Fieldset>
<Fieldset aria-describedby={'billingaddressdescription'} className={'utrecht-form-fieldset--subtle'}>
<FieldsetLegend className={'utrecht-form-fieldset__legend--label'}>Adres zonnepanelen</FieldsetLegend>
<FormFieldDescription id={'billingaddressdescription'}>
Vul het adres in waar de zonnepanelen zijn geplaatst.
</FormFieldDescription>
<FormField className={'utrecht-form-field--lg'}>
<FormLabel htmlFor={'street'}>Straatnaam</FormLabel>
<Textbox id={'street'}></Textbox>
</FormField>
<FormField className={'utrecht-form-field--sm'}>
<FormLabel htmlFor={'housenumber'}>Huisnummer</FormLabel>
<Textbox id={'housenumber'}></Textbox>
</FormField>
<FormField className={'utrecht-form-field--sm'}>
<FormLabel htmlFor={'suffix'}>Toevoeging</FormLabel>
<Textbox id={'suffix'}></Textbox>
</FormField>
<FormField className={'utrecht-form-field--md utrecht-form-field--start'}>
<FormLabel htmlFor={'postcode'}>Postcode</FormLabel>
<Textbox id={'postcode'}></Textbox>
</FormField>
<FormField className={'utrecht-form-field--lg'}>
<FormLabel htmlFor={'city'}>Plaatsnaam</FormLabel>
<Textbox id={'city'}></Textbox>
</FormField>
</Fieldset>
</Fieldset>
<ButtonGroup className="utrecht-button-group--horizontal">
<Button appearance="secondary-action-button" busy={false} disabled={false}>
Vorige
</Button>
<Button appearance="primary-action-button" busy={false} disabled={false}>
Volgende
</Button>
</ButtonGroup>
</form>
</div>
);
};

export default Form;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.basiselementen-theme {
.rvo-nl-demo-page {
background-color: var(--basiselementen-color-wit);
padding-inline: 32px;
form {
background-color: var(--basiselementen-color-lichtblauw-tint2);
margin-block-start: 32px;
margin-inline: auto;
padding-block: 32px;
padding-inline: 32px;
width: min(768px, 100%);
}
}

.basiselementen-demo-page {
background-color: var(--basiselementen-color-lichtblauw-tint2);
padding-block: 9px;
padding-inline: 9px;

form {
margin-block-start: 32px;
margin-inline: auto;
padding-block: 9px;
padding-inline: 9px;
}
.utrecht-form-fieldset {
padding-block: 9px;
padding-inline: 9px;
}
@media (min-width: 768px) {
form {
padding-block: 36px;
padding-inline: 36px;
}
.utrecht-form-fieldset {
padding-block: 36px;
padding-inline: 36px;
}
}
}

@media (min-width: 768px) {
.basiselementen-demo-page {
padding-block: 32px;
padding-inline: 32px;
}
}
}
Loading