Skip to content

Core v2.7.0 #160

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 54 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d7160a3
chore(pkg): Update packages in htwoo-core to latest versions
StfBauer Nov 20, 2024
8e1206c
fix(CSS): fixes #157 - Upate style for error oand descriptuon
StfBauer Nov 20, 2024
2bd69cc
chore(release): 2.7.0
StfBauer Nov 20, 2024
1c05c75
chore: Update package solutin to use last samples
StfBauer Nov 21, 2024
0353bfc
feat(HTML): Facility management - New Form
StfBauer Nov 21, 2024
2928577
feat(Core): Handlebars `dynamicPartial` funtion added to core functio…
StfBauer Nov 21, 2024
46e4ad3
feat(fieldset): HTML fieldset support added - style modifier includes…
StfBauer Nov 21, 2024
53c70d4
feat(HTML): HTML legend element support added
StfBauer Nov 21, 2024
c45c026
chore(data): Data update for fieldsets, legend and fields
StfBauer Nov 21, 2024
afbfc17
styles(fieldset): Fieldset, legend and field styles
StfBauer Nov 21, 2024
dc58c5d
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 21, 2024
6ab621e
fix(CSS): Prevent input fields in hoo-field to grow 100%;
StfBauer Nov 21, 2024
9f65de5
refact(HBS): html-props to all input fields added to allow passing in…
StfBauer Nov 21, 2024
99e195a
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 21, 2024
29c9d7f
chore: fixed issue description
StfBauer Nov 21, 2024
447498f
chore: fixes minor issue with {{ html-props }}
StfBauer Nov 21, 2024
4073aaa
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 21, 2024
6f0ae5d
chore: new form update
StfBauer Nov 22, 2024
ba3d5f0
fix(HTML): Added dynamic types to prefix and suffixed inputs
StfBauer Nov 22, 2024
e53d155
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 22, 2024
1579f6d
chore: updated type
StfBauer Nov 22, 2024
82b7a37
fix(CSS): Fixes padding jumping on focus within on number fields
StfBauer Nov 22, 2024
38f5a30
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 22, 2024
3980657
fix(CSS): Refactoring specificity on input styles
StfBauer Nov 22, 2024
9ffe545
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 22, 2024
c8b72ab
fix: padding issues
StfBauer Nov 22, 2024
b2946b7
new form issue resolution
StfBauer Nov 22, 2024
709a7aa
refact(CSS): Input description has now a max-width of 65ch, line-heig…
StfBauer Nov 22, 2024
f76ced9
feat(CSS): Readonly styles added for input fields
StfBauer Nov 22, 2024
4c1e061
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 22, 2024
b3d6a21
feat(CSS): readonly styles for .hoo-input-time and .hoo-input-date
StfBauer Nov 22, 2024
0b480da
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 22, 2024
1754879
Update form Issue
StfBauer Nov 22, 2024
68a16b5
udpate form flow
StfBauer Nov 22, 2024
6db61b8
fix(JS): Fixing open menu issue on hoo-select drop downs
StfBauer Nov 22, 2024
7b57f6a
feat(demo): Select mentu with grouped entries
StfBauer Nov 22, 2024
95a6188
fix(JS): Fixes removal of empty groups from drop down
StfBauer Nov 22, 2024
0f01af3
chore: solved merge conflict
StfBauer Nov 22, 2024
9e2dc70
Updated form sample
StfBauer Nov 22, 2024
e073137
Update form
StfBauer Nov 24, 2024
ba04156
fix(HTML): Allow to pass HTML code to the label of radio Buttons and …
StfBauer Nov 24, 2024
76464c4
Merge branch 'core-v2.7.0' into demo-forms
StfBauer Nov 24, 2024
4c13121
update form
StfBauer Nov 24, 2024
2b244b5
fix(HTML): Allow to pass html markup into field description
StfBauer Nov 24, 2024
346c8cd
fix: refactoring of form
StfBauer Nov 24, 2024
ab272b0
fix: refactoring of form
StfBauer Nov 24, 2024
0d4fddb
fixed all overview
StfBauer Nov 24, 2024
4c6d74d
chore: Update react framework
StfBauer Nov 26, 2024
aa73ab2
chore: Init Filepicker
StfBauer Nov 26, 2024
789124d
chore: file upload
StfBauer Nov 26, 2024
dc38bec
chore fileupload
StfBauer Nov 26, 2024
146f96a
feat(HTML): input[type="file"] support added, inclusive drag and drop…
StfBauer Nov 28, 2024
aca0231
chore: style update
StfBauer Nov 28, 2024
57e1469
chore: Update form-samples
StfBauer Nov 28, 2024
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
155 changes: 155 additions & 0 deletions htwoo-core/CHANGELOG.md

Large diffs are not rendered by default.

20 changes: 18 additions & 2 deletions htwoo-core/helpers/hbs/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ module.exports = function (Handlebars) {
});

Handlebars.registerHelper('getLastNumericId', function (value) {
return lastId;
return lastIdClean;
});

Handlebars.registerHelper('seoTitle', function (value) {

if (value) {
Expand Down Expand Up @@ -129,4 +129,20 @@ module.exports = function (Handlebars) {
}
});

Handlebars.registerHelper('dynamicPartial', function(partialName, context) {

// console.debug('🤟🤟', partialName, context);
// console.debug('🤟', Handlebars.partials[partialName]);

const partial = Handlebars.partials[partialName];

if (!partial) {
return `Partial "${partialName}" not found.`;
}

// If the partial is a string, compile it first
const template = typeof partial === "function" ? partial : Handlebars.compile(partial);
return new Handlebars.SafeString(template(context));
});

};
3,123 changes: 2,787 additions & 336 deletions htwoo-core/package-lock.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions htwoo-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"release": "standard-version",
"cl:update": "standard-version --changelog --skip.bump --skip.tag",
"test": "echo \"Error: no test specified\" && exit 1",
"pl:build": "patternlab build --config ./patternlab-config.json",
Expand Down Expand Up @@ -46,7 +47,8 @@
"@pattern-lab/core": "^6.1.0",
"@pattern-lab/engine-handlebars": "^6.1.0",
"@pattern-lab/uikit-workshop": "^6.1.0",
"caniuse-lite": "^1.0.30001677"
"caniuse-lite": "^1.0.30001680",
"standard-version": "^9.5.0"
},
"devDependencies": {
"@rollup/plugin-json": "^6.1.0",
Expand All @@ -61,9 +63,9 @@
"gulp-sourcemaps": "^3.0.0",
"npm-run-all": "^4.1.5",
"plugin-design": "file:helpers/node/plugin-design",
"postcss": "^8.4.47",
"rollup": "^4.24.3",
"sass": "^1.80.6",
"postcss": "^8.4.49",
"rollup": "^4.27.3",
"sass": "^1.81.0",
"sitemap": "^8.0.0",
"yargs": "^17.7.2"
}
Expand Down
598 changes: 598 additions & 0 deletions htwoo-core/src/_data/form-sample.json

Large diffs are not rendered by default.

76 changes: 75 additions & 1 deletion htwoo-core/src/_data/htwoo-field.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,78 @@
{
"legend": {
"text": "Personal Information",
"aria-tags": "",
"html-props": "",
"modified": ""
},
"fieldset": {
"legend": {
"text": "Personal Information",
"aria-tags": "",
"html-props": "",
"modified": ""
},
"fields": [
{
"type": "molecules-field",
"field": {
"input": {
"label": {
"label": "First Name",
"stateStyle": null,
"aria-tags": "",
"for": "firstname"
},
"text": {
"inputPrefix": "https://",
"inputSuffix": ".com",
"placeholder": "A placeholder text",
"aria-tags": "",
"descRef": "firstname-desc",
"errorRef": "firstname-error"
},
"description": {
"descRef": "firstname-desc",
"text": "Please enter your first name with only alphabetic characters"
},
"error": {
"errorRef": "firstname-error",
"text": "This is an error message"
}
}
}
},{
"type": "molecules-field",
"field": {

"input": {
"label": {
"label": "Last Name",
"stateStyle": null,
"aria-tags": "",
"for": "lastname"
},
"text": {
"inputPrefix": "https://",
"inputSuffix": ".com",
"placeholder": "A placeholder text",
"aria-tags": "",
"descRef": "lastname-desc",
"errorRef": "lastname-error"
},
"description": {
"descRef": "lastname-desc",
"text": "Please enter your last name with only alphabetic characters"
},
"error": {
"errorRef": "lastname-error",
"text": "This is an error message"
}
}
}
}
]
},
"field": {
"input": {
"label": {
Expand All @@ -19,7 +93,7 @@
"descRef": "firstname-desc",
"text": "Please enter your first name with only alphabetic characters"
},
"error":{
"error": {
"errorRef": "firstname-error",
"text": "This is an error message"
}
Expand Down
6 changes: 6 additions & 0 deletions htwoo-core/src/_data/htwoo-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@
"error": {
"errorRef": "field-x-error",
"text": "lorem ipsum dolor sit amet, consectetur adipiscing elit"
},
"file-upload": {
"label": "Click or drag and drop files here to upload filed",
"description": "Max file size: 10MB, Types: jpg, png, pdf",
"iconname": "icon-arrow-upload-filled",
"title": "Upload"
}
},
"checkbox-group": {
Expand Down
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/checkbox.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#checkbox}}
<input type="checkbox" name="{{ id }}" id="{{ id }}" value="" class="hoo-checkbox" {{#if disabled }} disabled="{{ disabled }}"
aria-disabled="{{ disabled }}" {{/if}}><label for="{{ id }}">{{ label }}</label>
aria-disabled="{{ disabled }}" {{/if}}><label for="{{ id }}">{{{ label }}}</label>
{{/checkbox}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-color.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<input class="hoo-input-color" type="color" value="#000" hsla>
<input class="hoo-input-color" type="color" value="#000" hsla {{{ html-props }}}>
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-date-month.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.date}}
<input type="month" class="hoo-input-date" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input type="month" class="hoo-input-date" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.date}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-date-week.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.date}}
<input type="week" class="hoo-input-date" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input type="week" class="hoo-input-date" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.date}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-date.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.date}}
<input type="date" class="hoo-input-date" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input type="date" class="hoo-input-date" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.date}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.date}}
<input type="datetime-local" class="hoo-input-date" name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input type="datetime-local" class="hoo-input-date" name="{{ name }}" value="{{ value }}" min="2018-01-01" max="2030-12-31" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.date}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-description.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#input.description}}
<p class="hoo-input-description" {{#if descRef}}id="{{ descRef }}-{{ getLastNumericId }}"{{/if}}>
{{ text }}
{{{ text }}}
</p>
{{/input.description}}
18 changes: 18 additions & 0 deletions htwoo-core/src/_patterns/atoms/input/input-file.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{#input.file-upload}}
<section class="hoo-input-file">
<label class="hoo-infile-label" name="file-upload" tabIndex="-1" for="{{ getId "file-upload" }}" draggable="true">
<div class="hoo-infile-icon">
{{> atoms-icon }}
</div>
<div>
{{label}}
{{#description }}
<p class="hoo-infile-description">{{ this }}
</p>
{{/description }}
</div>
</label>
<input type="file" id="{{ getLastId }}" name="{{name}}" class="hoo-infile-context" multiple aria-describedby="{{ getLastId }}-content" />
<output class="hoo-infile-output" id="{{ getLastNumericId }}-content" aria-live="polite" title="Current selection"></output>
{{/input.file-upload}}
</section>
6 changes: 5 additions & 1 deletion htwoo-core/src/_patterns/atoms/input/input-number.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{#input.number}}
<input class="hoo-input-text" type="number" min="{{ min }}" max="{{ max }}" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input class="hoo-input-text" type="number" min="{{ min }}" max="{{ max }}" {{#if disabled}} disabled="{{ disabled }}"
aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||'
errorRef}}
aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"
{{/ifCond}} {{{ html-props }}}>
{{/input.number}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-text-email.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.email}}
<input class="hoo-input-text" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} type="email" {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input class="hoo-input-text" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} type="email" {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#if disabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.email}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.url}}
<input class="hoo-input-text" type="password" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input class="hoo-input-text" type="password" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.url}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-text-phone.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.phone}}
<input class="hoo-input-text" type="phone" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input class="hoo-input-text" type="phone" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.phone}}
8 changes: 5 additions & 3 deletions htwoo-core/src/_patterns/atoms/input/input-text-prefixed.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{#input.text}}
<div class="hoo-input-group">
<div class="hoo-input-prefix">{{ inputPrefix }}</div>
<input class="hoo-input-text" type="text" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} data-prefix="https://"
placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<div id="suffix-label-{{ getLastId }}" class="hoo-input-prefix">{{ inputPrefix }}</div>
<input class="hoo-input-text" {{#type}}type="{{this}}" {{/type}} {{#if (getLastId)}}id="{{ getLastId }}" {{/if}}
placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-labelledby="suffix-label-{{ getLastId }}"
aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}}
{{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}" {{/ifCond}} {{{ html-props }}}>
</div>
{{/input.text}}
7 changes: 5 additions & 2 deletions htwoo-core/src/_patterns/atoms/input/input-text-suffixed.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{{#input.text}}
<div class="hoo-input-group">
<input class="hoo-input-text" type="text" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} placeholder="{{ placeholder }}" data-suffix="{{inputSuffix}}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<div class="hoo-input-suffix">{{inputSuffix}}</div>
<input class="hoo-input-text" {{#type}}type="{{this}}" {{/type}} {{#if (getLastId)}}id="{{ getLastId }}" {{/if}}
placeholder="{{ placeholder }}" data-suffix="{{inputSuffix}}" {{#ifCond descRef '||' errorRef}}
aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"
{{/ifCond}} aria-labelledby="suffix-label-{{getLastId}}" {{{ html-props }}}>
<div id="suffix-label-{{getLastId}}" class="hoo-input-suffix">{{inputSuffix}}</div>
</div>
{{/input.text}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-text-url.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.url}}
<input class="hoo-input-text" type="url" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input class="hoo-input-text" type="url" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#if diabled}} disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
{{/input.url}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-text.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
disabled="{{ disabled }}" aria-disabled="{{ disabled }}" {{/if}} {{#if readonly}} readonly="{{ readonly }}" {{/if}}
placeholder="{{ placeholder }}" {{#ifCond descRef '||' errorRef}}
aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"
{{/ifCond}}>
{{/ifCond}} {{{ html-props }}}>
{{/input.text}}
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-textarea.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<textarea class="hoo-input-text" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}></textarea>
<textarea class="hoo-input-text" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}></textarea>
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/input-time.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<input type="time" class="hoo-input-time" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="{{ min-value }}" max="{{ max-value }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}}>
<input type="time" class="hoo-input-time" {{#if (getLastId)}}id="{{ getLastId }}" {{/if}} name="{{ name }}" value="{{ value }}" min="{{ min-value }}" max="{{ max-value }}" {{#ifCond descRef '||' errorRef}} aria-describedby="{{#if descRef}}{{descRef}}-{{getLastId}}{{/if}} {{#if errorRef}}{{errorRef}}-{{ getLastId }}{{/if}}"{{/ifCond}} {{{ html-props }}}>
2 changes: 1 addition & 1 deletion htwoo-core/src/_patterns/atoms/input/label.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#input.label}}
<label class="hoo-label {{stateStyle}}" for="{{ getId for }}">{{ label }}</label>
<label class="hoo-label {{stateStyle}}" for="{{ getLastId }}">{{ label }}</label>
{{/input.label}}
5 changes: 5 additions & 0 deletions htwoo-core/src/_patterns/atoms/input/legend.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{#legend }}
<legend class="hoo-legend {{ modifier}}" {{{ html-props }}} {{ aria-tags}}>
{{ text }}
</legend>
{{/legend}}
Loading
Loading