-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/Amsterdam/design-system …
…into feature/DES-654-table-of-content
- Loading branch information
Showing
55 changed files
with
761 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- @license CC0-1.0 --> | ||
|
||
# Field Set | ||
|
||
A component to group related form inputs. | ||
|
||
## Guidelines | ||
|
||
- Use Field Set when you need to show a relationship between multiple form inputs. For example, you may need to group a set of text inputs into a single Field Set when asking for an address. | ||
|
||
## Relevant WCAG Requirements | ||
|
||
- [WCAG 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html): Field Set labels the purpose of a group of inputs. | ||
|
||
## References | ||
|
||
- [Providing a description for groups of form controls using fieldset and legend elements](https://www.w3.org/WAI/WCAG22/Techniques/html/H71) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* @license EUPL-1.2+ | ||
* Copyright Gemeente Amsterdam | ||
*/ | ||
|
||
@import "../../common/hyphenation"; | ||
@import "../../common/text-rendering"; | ||
|
||
@mixin reset { | ||
border: 0; | ||
margin-inline: 0; | ||
padding-block: 0; | ||
padding-inline: 0; | ||
} | ||
|
||
.ams-field-set { | ||
break-inside: avoid; | ||
|
||
@include reset; | ||
} | ||
|
||
.ams-field-set--invalid { | ||
border-inline-start: var(--ams-field-set-invalid-border-inline-start); | ||
padding-inline-start: var(--ams-field-set-invalid-padding-inline-start); | ||
} | ||
|
||
@mixin reset-legend { | ||
float: left; // [1] | ||
padding-inline: 0; | ||
width: 100%; // [1] | ||
} | ||
|
||
// [1] This combination allows the fieldset border to go around the legend, instead of through it. | ||
|
||
.ams-field-set__legend { | ||
color: var(--ams-field-set-legend-color); | ||
font-family: var(--ams-field-set-legend-font-family); | ||
font-size: var(--ams-field-set-legend-font-size); | ||
font-weight: var(--ams-field-set-legend-font-weight); | ||
line-height: var(--ams-field-set-legend-line-height); | ||
margin-block-end: var( | ||
--ams-field-set-legend-margin-block-end | ||
); /* Because of a bug in Chrome we can’t use display grid or flex for this gap */ | ||
|
||
@include hyphenation; | ||
@include text-rendering; | ||
@include reset-legend; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- @license CC0-1.0 --> | ||
|
||
# File Input | ||
|
||
Allows the user to upload one or more files from their device. | ||
|
||
## Visual considerations | ||
|
||
The filename label and button are displayed in the language of the browser and can vary between browsers and operating systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* @license EUPL-1.2+ | ||
* Copyright Gemeente Amsterdam | ||
*/ | ||
|
||
@import "../../common/text-rendering"; | ||
|
||
@mixin reset-button { | ||
border: 0; | ||
border-radius: 0; // Reset rounded borders on iOS devices | ||
box-sizing: border-box; | ||
} | ||
|
||
.ams-file-input { | ||
background-color: var(--ams-file-input-background-color); | ||
border: var(--ams-file-input-border); | ||
color: var(--ams-file-input-color); | ||
cursor: var(--ams-file-input-cursor); | ||
font-family: var(--ams-file-input-font-family); | ||
font-size: var(--ams-file-input-font-size); | ||
font-weight: var(--ams-file-input-font-weight); | ||
line-height: var(--ams-file-input-line-height); | ||
max-inline-size: calc(100% - var(--ams-file-input-padding-inline) * 2); | ||
outline-offset: 0.25rem; // Double the default focus outline offset to compensate for the dashed border | ||
padding-block: var(--ams-file-input-padding-block); | ||
padding-inline: var(--ams-file-input-padding-inline); | ||
touch-action: manipulation; | ||
|
||
@include text-rendering; | ||
} | ||
|
||
.ams-file-input:disabled { | ||
color: var(--ams-file-input-disabled-color); | ||
cursor: var(--ams-file-input-disabled-cursor); | ||
} | ||
|
||
.ams-file-input::file-selector-button { | ||
appearance: none; // Reset default appearance on iOS devices | ||
background-color: var(--ams-file-input-file-selector-button-background-color); | ||
box-shadow: var(--ams-file-input-file-selector-button-box-shadow); | ||
color: var(--ams-file-input-file-selector-button-color); | ||
cursor: var(--ams-file-input-file-selector-button-cursor); | ||
font-family: inherit; | ||
font-size: inherit; // iOS specific fix | ||
font-weight: inherit; | ||
margin-inline-end: var(--ams-file-input-file-selector-button-margin-inline-end); | ||
padding-block: var(--ams-file-input-file-selector-button-padding-block); | ||
padding-inline: var(--ams-file-input-file-selector-button-padding-inline); | ||
|
||
@media screen and (-ms-high-contrast: active), screen and (forced-colors: active) { | ||
border: var( | ||
--ams-file-input-file-selector-button-forced-color-mode-border | ||
); // add border because forced colors changes box-shadow to none | ||
} | ||
|
||
@include reset-button; | ||
} | ||
|
||
.ams-file-input:disabled::file-selector-button { | ||
box-shadow: var(--ams-file-input-file-selector-button-disabled-box-shadow); | ||
color: var(--ams-file-input-disabled-color); | ||
cursor: var(--ams-file-input-file-selector-button-disabled-cursor); | ||
} | ||
|
||
.ams-file-input:not(:disabled):hover::file-selector-button { | ||
box-shadow: var(--ams-file-input-file-selector-button-hover-box-shadow); | ||
color: var(--ams-file-input-file-selector-button-hover-color); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.