hr-design-system-handlebars 1.113.0 → 1.113.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/assets/index.css +50 -8
- package/dist/assets/js/alpine.js +2 -1
- package/dist/assets/js/components/forms/js/contactForm.alpine.js +34 -99
- package/dist/assets/js/components/forms/js/inputHandler.alpine.js +2 -36
- package/dist/views/components/forms/components/controls.hbs +1 -1
- package/dist/views/components/forms/components/input.hbs +1 -1
- package/dist/views/components/forms/components/message.hbs +4 -1
- package/dist/views/components/forms/components/textarea.hbs +1 -2
- package/dist/views/components/forms/webform.hbs +28 -11
- package/dist/views/components/voting/voting_error.hbs +10 -0
- package/dist/views/components/voting/voting_result.hbs +21 -1
- package/dist/views_static/components/forms/components/controls.hbs +1 -1
- package/dist/views_static/components/forms/components/input.hbs +1 -1
- package/dist/views_static/components/forms/components/message.hbs +4 -1
- package/dist/views_static/components/forms/components/textarea.hbs +1 -2
- package/dist/views_static/components/forms/webform.hbs +28 -11
- package/dist/views_static/components/voting/voting_error.hbs +10 -0
- package/dist/views_static/components/voting/voting_result.hbs +21 -1
- package/package.json +1 -1
- package/src/assets/css/custom-utilities.css +1 -1
- package/src/assets/fixtures/content/copytext/copytext_webform.json +6 -1
- package/src/assets/fixtures/content/copytext/copytext_webform_simple.json +32 -0
- package/src/assets/fixtures/forms/error_messages.inc.json +3 -0
- package/src/assets/js/alpine.js +2 -1
- package/src/stories/views/components/content/copytext/copytext-form.stories.js +52 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_webform.json +1 -1
- package/src/stories/views/components/content/copytext/fixtures/copytext_webform_simple.json +1 -0
- package/src/stories/views/components/forms/components/controls.hbs +1 -1
- package/src/stories/views/components/forms/components/input.hbs +1 -1
- package/src/stories/views/components/forms/components/message.hbs +4 -1
- package/src/stories/views/components/forms/components/textarea.hbs +1 -2
- package/src/stories/views/components/forms/js/contactForm.alpine.js +34 -99
- package/src/stories/views/components/forms/js/inputHandler.alpine.js +2 -36
- package/src/stories/views/components/forms/webform.hbs +28 -11
- package/src/stories/views/components/voting/voting_error.hbs +10 -0
- package/src/stories/views/components/voting/voting_error.stories.js +30 -0
- package/src/stories/views/components/voting/voting_result.hbs +21 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
{{~#if _newWebForm ~}}
|
|
2
|
-
{{#>components/forms/components/backgroundBox }}
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
{{#>components/forms/components/backgroundBox }}
|
|
5
3
|
<h3 class="mb-6 text-2xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
6
4
|
{{this.title}}
|
|
7
5
|
</h3>
|
|
@@ -21,20 +19,39 @@
|
|
|
21
19
|
enctype="{{if this.isMultipart 'multipart/form-data' 'application/x-www-form-urlencoded'}}"
|
|
22
20
|
accept-charset="utf-8"
|
|
23
21
|
|
|
22
|
+
>
|
|
23
|
+
<div x-show="!wasPosted"
|
|
24
|
+
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
25
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
26
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
27
|
+
x-transition:leave="transition ease-in duration-75 delay-0"
|
|
28
|
+
x-transition:leave-start="opacity-100 transform scale-100"
|
|
29
|
+
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
30
|
>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{{> components/forms/components/controls }}
|
|
31
|
+
{{> components/forms/components/fields _formId=(joinStrings 'form' (getRandom)) }}
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
{{> components/forms/components/controls }}
|
|
34
|
+
</div>
|
|
35
|
+
<div id="successMessage" x-show="wasPostedWithSuccess"
|
|
36
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
37
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
38
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
39
|
+
x-cloak
|
|
40
|
+
>
|
|
30
41
|
{{> components/forms/components/message _success=true }}
|
|
31
|
-
</
|
|
42
|
+
</div>
|
|
32
43
|
|
|
33
|
-
<
|
|
44
|
+
<div id="errorMessage" x-show="wasPostedWithError"
|
|
45
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
46
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
47
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
48
|
+
x-cloak>
|
|
34
49
|
{{> components/forms/components/message _success=false }}
|
|
35
|
-
</
|
|
36
|
-
|
|
50
|
+
</div>
|
|
51
|
+
|
|
37
52
|
</form>
|
|
53
|
+
|
|
54
|
+
|
|
38
55
|
</div>
|
|
39
56
|
{{/components/forms/components/backgroundBox }}
|
|
40
57
|
{{~else~}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{{> components/voting/voting_result
|
|
2
|
+
_title=this.title
|
|
3
|
+
_topline=this.topline
|
|
4
|
+
_resultBoxMessageTitle=(loca "votingform_title_error")
|
|
5
|
+
_resultBoxMessageText=(loca "votingform_text_error")
|
|
6
|
+
_locaKeyText="votingform_text_error"
|
|
7
|
+
_isInline=_isInline
|
|
8
|
+
_hideVotingResult=true
|
|
9
|
+
_statusDone=false
|
|
10
|
+
}}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import votingJson from './fixtures/voting.json'
|
|
2
|
+
|
|
3
|
+
const handlebars = require('hrHandlebars')
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Komponenten/Voting',
|
|
7
|
+
decorators: [
|
|
8
|
+
(Story) => {
|
|
9
|
+
return `<div class="grid grid-page">
|
|
10
|
+
<div class="grid bg-white grid-article">
|
|
11
|
+
${Story()}
|
|
12
|
+
</div>
|
|
13
|
+
</div>`
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
}
|
|
17
|
+
const Template = (args) => {
|
|
18
|
+
let hbsTemplate = handlebars.compile(`
|
|
19
|
+
{{#>components/forms/components/backgroundBox }}
|
|
20
|
+
{{> components/voting/voting_error }}
|
|
21
|
+
{{/components/forms/components/backgroundBox }}
|
|
22
|
+
`)
|
|
23
|
+
return hbsTemplate({ ...args })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Voting_Error = {
|
|
27
|
+
render: Template.bind({}),
|
|
28
|
+
name: 'Voting Fehlermeldung',
|
|
29
|
+
args: votingJson,
|
|
30
|
+
}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
{{
|
|
1
|
+
{{#unless _isResultOnRedirectPage}}
|
|
2
|
+
{{> components/voting/voting_header _title=_title _topline=_topline}}
|
|
3
|
+
{{/unless}}
|
|
4
|
+
|
|
5
|
+
{{#if _hideVotingResult}}
|
|
6
|
+
{{#if _isVotingOver}}
|
|
7
|
+
<p class="c-teaser__text text__copytext">{{{_resultBoxMessageText}}}</p>
|
|
8
|
+
{{else}}
|
|
9
|
+
{{~> components/base/image/icon _icon=(if _statusDone "status-done" "status-error") _iconmap="icons" _addClass=(if _statusDone "" "float-left w-6 h-6 text-red-thunderbird-hex fill-current mt-6 sm:mt-12")}}
|
|
10
|
+
<p class="mt-6 ml-8 text-base font-bold sm:ml-9 text-red-thunderbird-hex sm:text-lg font-heading sm:mt-12">{{{_resultBoxMessageText}}}</p>
|
|
11
|
+
<div class="mt-6 sm:mt-12">
|
|
12
|
+
{{#> components/button/link_button _size="lg" _css="float-right"}}
|
|
13
|
+
{{> components/button/components/button_label _label=(loca "votingform_form_back")}}
|
|
14
|
+
{{/components/button/link_button}}
|
|
15
|
+
</div>
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{else}}
|
|
18
|
+
|
|
19
|
+
{{/if}}
|
|
2
20
|
|
|
3
21
|
{{#if _isVotingOver}}
|
|
4
22
|
<p class="mt-6 text-base font-bold sm:text-xl font-heading sm:mt-12 dark:text-text-dark">{{loca "votingform_voting_finished"}}</p>
|
|
5
23
|
{{/if}}
|
|
24
|
+
|
|
25
|
+
|