-
Notifications
You must be signed in to change notification settings - Fork 5
refactor: guidelines 3.0 input style #198
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
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
8387e0b
refactor: remove headline element – is replaced by base/typography st…
annsch 4ab070c
feat: added textfield sizes and label animation
annsch 0c74cda
feat: textfield variants
annsch 10c662c
refactor: updated db-ui/base
annsch ccb12ae
style: guidlenes 3.0
annsch 68996da
docs: added id
annsch 5d92911
Merge branch 'dbux-3' into feat-textfield-updated-foundations
annsch d2d2c23
revert: headline component
annsch 00b6a70
revert: headline component
annsch 9af4b07
Merge branch 'dbux-3' into feat-textfield-updated-foundations
mfranzke 0647806
refactor: remove headline element – is replaced by base/typography st…
annsch 705a1ab
feat: added textfield sizes and label animation
annsch c7107b9
feat: textfield variants
annsch 79acc76
refactor: updated db-ui/base
annsch 051522b
style: guidlenes 3.0
annsch 4209d42
docs: added id
annsch 4a75042
revert: headline component
annsch d2fb206
revert: headline component
annsch 32f805e
style: update latest
annsch 5ae7628
Merge branch 'feat-textfield-updated-foundations' of https://github.c…
annsch 64d525d
refactor: added wrapper element for icon styles
annsch 5ca4830
refactor: input type=search
annsch 8a8c2be
chore: merged with dbux-3
annsch 2b11aeb
style: ability for icons
annsch c086c7b
docs: added backstop urls and migration guide
annsch 9d8a870
chore: merged with dbux-3
annsch 31b18db
Merge branch 'dbux-3' into feat-textfield-updated-foundations
annsch e61b98e
Merge branch 'dbux-3' into feat-textfield-updated-foundations
annsch 98a633d
Merge branch 'dbux-3' into feat-textfield-updated-foundations
annsch bd5d0eb
refactor: remove form-element
annsch a07e58c
Update migrationGuide.adoc
mfranzke ebc7c3c
Merge branch 'dbux-3' into feat-textfield-updated-foundations
mfranzke 829eabb
refactor: ensure unique IDs programatically
mfranzke f65346b
Update migrationGuide.adoc
mfranzke 2b9f0a1
Update migrationGuide.adoc
mfranzke 517acb2
Update input-sizes.json
mfranzke 97a806c
Update input.hbs
mfranzke bc88ba5
Update input.hbs
mfranzke 2b03fbf
docs: added some comment
mfranzke 2efbfda
Merge branch 'feat-textfield-updated-foundations' of https://github.c…
mfranzke 9291c0e
fix: review feedback included
annsch 4db545b
fix: review feedback included
annsch ae5653a
test: remove variations to reduce test cases
annsch 2f9df9e
refactor: form-element placeholder has been deleted
annsch bed18b9
Update input.scss
mfranzke 11bfc92
chore: we shouldn't use optional here
mfranzke db399f5
Update textarea.scss
mfranzke ea78a4e
Update textarea.scss
mfranzke a79d481
chore: those would get adapted later
mfranzke e407dad
chore: those would need to get adapted later
mfranzke 812a03a
chore: reverted removing those testcases
mfranzke 01cef8d
chore: removed this leftover from by previous checkin
mfranzke ccfb890
refactor: use native behaviour with animated opacity
annsch dd0ba29
refactor: inserted review feedback
annsch d5f135f
refactor: merged with origin
annsch 674561a
Merge remote-tracking branch 'origin/dbux-3' into feat-textfield-upda…
annsch d6504fa
Merge branch 'dbux-3' into feat-textfield-updated-foundations
mfranzke 43e6825
chore: update dependencies
annsch 4b183f6
Merge branch 'feat-textfield-updated-foundations' of https://github.c…
annsch 7f92e18
style: corrected description's position
annsch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,18 @@ | ||
/* eslint unicorn/prefer-module: 0, eqeqeq: 0 */ | ||
module.exports = function (Handlebars) { | ||
Handlebars.registerHelper('unique-id', function () { | ||
// Adapted from https://www.codingdeft.com/posts/generate-uuid-javascript/ | ||
const crypto = require('node:crypto'); | ||
|
||
const buf = crypto.randomBytes(16); | ||
|
||
// Convert the buffer to a hexadecimal string | ||
const hex = buf.toString('hex'); | ||
|
||
// Return the hexadecimal string as a UUID | ||
return `id-${hex.slice( | ||
0, | ||
7 | ||
)}-${hex.slice(8, 15)}-${hex.slice(16, 23)}-${hex.slice(24, 31)}`; | ||
}); | ||
}; |
This file contains hidden or 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 @@ | ||
// TODO common styles for formfields adopted from input |
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
source/_patterns/01-elements/_form-elements.variables.scss
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,6 @@ | ||
<dl> | ||
{{#each sizes}} | ||
<dt>{{size}}:</dt> | ||
<dd class="db-ui-{{size}}">{{> elements-input type=../type label=../label placeholder=../placeholder id=(unique-id) }}</dd> | ||
{{/each }} | ||
</dl> |
This file contains hidden or 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,19 @@ | ||
{ | ||
"sizes": [ | ||
{ | ||
"size": "functional", | ||
"label": "Functional" | ||
}, | ||
{ | ||
"size": "regular", | ||
"label": "Regular (default, data-size attribute is optional)" | ||
}, | ||
{ | ||
"size": "expressive", | ||
"label": "Expressive" | ||
} | ||
], | ||
"type": "text", | ||
"placeholder": "e.g. DB User", | ||
"label": "Textlabel" | ||
} |
This file contains hidden or 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,4 @@ | ||
--- | ||
title: Input sizes | ||
order: 1 | ||
--- |
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<dl> | ||
<dl class="db-ui-normal"> | ||
{{#each variations}} | ||
<dt>{{variant}}:</dt> | ||
<dd>{{> elements-input type=../type label=../label placeholder=../placeholder }}</dd> | ||
<dd class="db-ui-functional">{{> elements-input type=../type label=../label placeholder=../placeholder id=(unique-id) }}</dd> | ||
<dt> </dt> | ||
<dd class="db-ui-normal">{{> elements-input type=../type label=../label placeholder=../placeholder id=(unique-id) }}</dd> | ||
<dt> </dt> | ||
<dd class="db-ui-expressive">{{> elements-input type=../type label=../label placeholder=../placeholder id=(unique-id) }}</dd> | ||
{{/each }} | ||
</dl> |
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -1,25 +1,34 @@ | ||
<!-- The aria-labelledby attribute on the input and related id on the label as well as aria-hidden="true" are being set for correct support within assistive tools like screenreaders //--> | ||
<!-- [html-validate-disable-next input-missing-label] --> | ||
<input type="{{ type }}" | ||
class="elm-input {{ styleModifier }}" | ||
placeholder="{{ placeholder }}" | ||
name="{{ id }}" | ||
id="{{ id }}" | ||
{{#if disabled}} disabled{{/if }} | ||
value="{{ value }}" | ||
{{#if describedbyid }} aria-describedby="{{ describedbyid }}"{{/if }} | ||
{{#if aria-invalid }} aria-invalid="{{ aria-invalid }}"{{/if }} | ||
{{{ validation }}} | ||
{{#if datalist }} list="datalist{{ id }}"{{/if }} | ||
aria-labelledby="{{ id }}-label" | ||
{{#if variant}} data-variant="{{variant}}"{{/if }}> | ||
<label class="elm-label" | ||
for="{{ id }}" | ||
aria-hidden="true" | ||
id="{{ id }}-label">{{ label }}</label> | ||
{{#if description }}<p{{#if describedbyid }} id="{{ describedbyid }}"{{/if }} class="description">{{{ description }}}</p>{{/if }} | ||
{{#if datalist }}<datalist id="datalist{{ id }}"> | ||
{{#each datalistItems }} | ||
<option{{#if value }} value="{{ value }}"{{/if }}>{{ text }}</option> | ||
{{/each }} | ||
</datalist>{{/if }} | ||
<div class="elm-input" | ||
{{#if variant}} data-variant="{{variant}}"{{/if }} | ||
{{#if icon-before}} data-icon-before="{{icon-before}}"{{/if}} | ||
{{#if icon-before}} data-icon-after="{{icon-after}}"{{/if}}> | ||
<!-- The aria-labelledby attribute on the input and related id on the label as well as aria-hidden="true" are being set for correct support within assistive tools like screenreaders //--> | ||
<!-- [html-validate-disable-next input-missing-label] --> | ||
<input type="{{ type }}" | ||
{{#if styleModifier }}class="{{ styleModifier }}"{{/if }} | ||
placeholder="{{ placeholder }}" | ||
name="{{ id }}" | ||
id="{{ id }}" | ||
{{#if disabled}} disabled{{/if }} | ||
value="{{ value }}" | ||
{{#if describedbyid }} aria-describedby="{{ describedbyid }}"{{/if }} | ||
{{#if aria-invalid }} aria-invalid="{{ aria-invalid }}"{{/if }} | ||
{{{ validation }}} | ||
{{#if datalist }} list="datalist{{ id }}"{{/if }} | ||
aria-labelledby="{{ id }}-label"> | ||
<label for="{{ id }}" | ||
aria-hidden="true" | ||
id="{{ id }}-label">{{ label }}</label> | ||
|
||
{{#if description }}<p{{#if describedbyid }} id="{{ describedbyid }}"{{/if }} class="description">{{{ description }}}</p>{{/if }} | ||
|
||
{{#if datalist }}<datalist id="datalist-{{ id }}"> | ||
{{#each datalistItems }} | ||
<option{{#if value }} value="{{ value }}"{{/if }}>{{ text }}</option> | ||
{{/each }} | ||
</datalist> | ||
{{/if }} | ||
|
||
{{!-- icon for data-variants like error or success --}} | ||
<span class="elm-state-icon"></span> | ||
mfranzke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.