hr-design-system-handlebars 1.114.111 → 1.114.113

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/build/handlebars/helpers/handlebar-helpers.js +1 -1
  3. package/dist/assets/brand/hessenschau/conf/locatags.merged.json +5 -1
  4. package/dist/assets/brand/hr/conf/locatags.merged.json +5 -1
  5. package/dist/assets/brand/hr-bigband/conf/locatags.merged.json +5 -1
  6. package/dist/assets/brand/hr-fernsehen/conf/locatags.merged.json +5 -1
  7. package/dist/assets/brand/hr-inforadio/conf/locatags.merged.json +5 -1
  8. package/dist/assets/brand/hr-rundfunkrat/conf/locatags.merged.json +5 -1
  9. package/dist/assets/brand/hr-sinfonieorchester/conf/locatags.merged.json +5 -1
  10. package/dist/assets/brand/hr-werbung/conf/locatags.merged.json +5 -1
  11. package/dist/assets/brand/hr1/conf/locatags.merged.json +5 -1
  12. package/dist/assets/brand/hr2/conf/locatags.merged.json +5 -1
  13. package/dist/assets/brand/hr3/conf/locatags.merged.json +5 -1
  14. package/dist/assets/brand/hr4/conf/locatags.merged.json +5 -1
  15. package/dist/assets/brand/you-fm/conf/locatags.merged.json +5 -1
  16. package/dist/assets/index.css +14 -7
  17. package/dist/views/components/page/search/search_form.hbs +140 -37
  18. package/dist/views/components/voting/voting.hbs +35 -27
  19. package/dist/views_static/components/page/search/search_form.hbs +140 -37
  20. package/dist/views_static/components/voting/voting.hbs +35 -27
  21. package/package.json +1 -1
  22. package/src/assets/brand/_default/conf/locatags.json +3 -0
  23. package/src/assets/brand/hessenschau/conf/locatags.json +2 -1
  24. package/src/assets/brand/hessenschau/conf/locatags.merged.json +5 -1
  25. package/src/assets/brand/hr/conf/locatags.json +2 -1
  26. package/src/assets/brand/hr/conf/locatags.merged.json +5 -1
  27. package/src/assets/brand/hr-bigband/conf/locatags.json +2 -1
  28. package/src/assets/brand/hr-bigband/conf/locatags.merged.json +5 -1
  29. package/src/assets/brand/hr-fernsehen/conf/locatags.json +2 -1
  30. package/src/assets/brand/hr-fernsehen/conf/locatags.merged.json +5 -1
  31. package/src/assets/brand/hr-inforadio/conf/locatags.json +2 -1
  32. package/src/assets/brand/hr-inforadio/conf/locatags.merged.json +5 -1
  33. package/src/assets/brand/hr-rundfunkrat/conf/locatags.json +2 -1
  34. package/src/assets/brand/hr-rundfunkrat/conf/locatags.merged.json +5 -1
  35. package/src/assets/brand/hr-sinfonieorchester/conf/locatags.json +2 -1
  36. package/src/assets/brand/hr-sinfonieorchester/conf/locatags.merged.json +5 -1
  37. package/src/assets/brand/hr-werbung/conf/locatags.json +2 -1
  38. package/src/assets/brand/hr-werbung/conf/locatags.merged.json +5 -1
  39. package/src/assets/brand/hr1/conf/locatags.json +2 -1
  40. package/src/assets/brand/hr1/conf/locatags.merged.json +5 -1
  41. package/src/assets/brand/hr2/conf/locatags.json +2 -1
  42. package/src/assets/brand/hr2/conf/locatags.merged.json +5 -1
  43. package/src/assets/brand/hr3/conf/locatags.json +2 -1
  44. package/src/assets/brand/hr3/conf/locatags.merged.json +5 -1
  45. package/src/assets/brand/hr4/conf/locatags.json +2 -1
  46. package/src/assets/brand/hr4/conf/locatags.merged.json +5 -1
  47. package/src/assets/brand/you-fm/conf/locatags.json +2 -1
  48. package/src/assets/brand/you-fm/conf/locatags.merged.json +5 -1
  49. package/src/stories/views/components/page/search/search_form.hbs +140 -37
  50. package/src/stories/views/components/page/search/search_form.stories.js +31 -0
  51. package/src/stories/views/components/voting/voting.hbs +35 -27
@@ -3,5 +3,6 @@
3
3
  "ext_service_datapolicy_text": "An dieser Stelle befindet sich ein von unserer Redaktion empfohlener Inhalt von <b>{0}</b>. Beim Laden des Inhalts werden Daten an den Anbieter und ggf. weitere Dritte übertragen. Nähere Informationen erhältst du in unseren ",
4
4
  "ext_service_datapolicy_no_js_text": "An dieser Stelle befindet sich ein von unserer Redaktion empfohlener Inhalt von <b>{0}</b>. Da du in deinem Browser Javascript deaktiviert hast, kann dieser hier nicht angezeigt werden. Der nachfolgende Link öffnet den Inhalt auf der Seite des Anbieters.",
5
5
  "header_homepage_link_title": "Startseite you-fm . d e",
6
- "meta_application_name": "you-fm.de"
6
+ "meta_application_name": "you-fm.de",
7
+ "website_name_search_button": "you-fm.de"
7
8
  }
@@ -142,6 +142,9 @@
142
142
  "poster_copyright": "Bild &copy; {0}",
143
143
  "search_input_aria_submit": "Suche starten",
144
144
  "search_input_placeholder": "Ort oder Thema suchen",
145
+ "search_form_label_searchTerm": "Suchbegriff",
146
+ "search_form_label_searchType": "Suche in",
147
+ "search_select_all": "allen hr-Webseiten",
145
148
  "share_facebook_linktitle": "Bei Facebook teilen",
146
149
  "share_linktitle": "Artikel teilen",
147
150
  "share_headline": "Teilen",
@@ -240,5 +243,6 @@
240
243
  "form_button_reset": "Zurücksetzen",
241
244
  "form_button_submit": "Absenden",
242
245
  "header_homepage_link_title": "Startseite you-fm . d e",
243
- "meta_application_name": "you-fm.de"
246
+ "meta_application_name": "you-fm.de",
247
+ "website_name_search_button": "you-fm.de"
244
248
  }
@@ -1,40 +1,143 @@
1
1
  <form id="search_form" method="GET" action="#">
2
- <div class="relative flex flex-col px-2 pt-6 pb-6 mt-8 mb-8 sm:flex-row sm:px-4 bg-highlight-1 dark:bg-highlight-1-dark sm:pt-6 sm:pb-6 sm:mt-8 article-full-width sm:article-narrow">
3
- <div class="relative h-12 sm:mr-4 basis-full width-full">
4
- {{~> components/forms/components/input
5
- _locaKey="search_form_label_searchTerm"
6
- _name="query"
7
- _label="Suchbegriff"
8
- _labelClass=""
9
- _description=""
10
- _type="text"
11
- _value=this.queryString
12
- _autocompleteOff=true
13
- _autoSuggestFeature=true
14
- }}
15
- </div>
16
- <div class="relative flex h-12 basis-full width-full">
17
- <div class="relative h-12 basis-full">
18
- <select class="relative w-full h-12 pt-4 pl-4 bg-white appearance-none cursor-pointer form-select text-text dark:bg-black dark:text-text-dark pr-9 peer border-y focus:border-y-2 border-t-transparent dark:border-t-transparent focus:outline-none border-form-highlight dark:border-form-highlight-dark" id="select_search" title="" name="all" isFocused="false">
19
- <option class="text-gray-scorpion dark:text-text-dark" value="false" {{#unless this.searchInAllWebsites}} selected{{/unless}}>{{loca
20
- "website_name_search_button"}}</option>
21
- <option class="text-gray-scorpion dark:text-text-dark" value="true" {{#if this.searchInAllWebsites}} selected{{/if}}>{{loca
22
- "search_select_all"}}</option>
23
- </select>
24
- <label for="select_search" class="absolute top-0 truncate transition-transform origin-top-left transform scale-100 translate-x-0 translate-y-3 pointer-events-none left-4 right-11 text-gray-scorpion dark:text-text-dark peer-focus:text-form-highlight peer-focus:dark:text-form-highlight-dark peer-focus:scale-75 peer-focus:translate-y-0 peer-focus:top-px ">
25
- {{loca "search_form_label_searchType"}}
26
- </label>
27
- <div class="absolute bg-white right-0 p-4 py-3 transform border-l peer-focus:border-r peer-focus:border-l-0 pointer-events-none top-1.5 peer-focus:rotate-180">
28
- {{~> components/base/image/icon _icon="arrow-down" _addClass="sb-icon w-3 h-3 fill-form-highlight dark:fill-form-highlight-dark" ~}}
29
- </div>
30
- </div>
31
- <div class="relative">
32
- <button aria-label="{{loca "search_input_aria_submit" }}" type="submit"
33
- class="inline-flex items-center justify-center order-2 w-12 h-12 border rounded-r cursor-pointer ds-button font-heading text-button-inverted bg-button border-button hover:bg-button--dark hover:border-button--dark active:bg-button--dark active:scale-95 min-w-11">
34
- {{> components/base/image/icon _icon="suche" _addClass="sb-icon w-5 h-5 fill-white dark:fill-text-dark"}}
35
- <span class="hide">{{loca "search_button_label"}}</span>
36
- </button>
37
- </div>
2
+ <div class="relative flex flex-col px-2 pt-6 pb-6 mt-8 mb-8 sm:flex-row sm:px-4 bg-highlight-1 dark:bg-highlight-1-dark sm:pt-6 sm:pb-6 sm:mt-8 article-full-width sm:article-narrow">
3
+ <div class="relative h-12 basis-full width-full " x-data="searchSuggest()">
4
+ <div id="search-content"
5
+ @click.away="active=false; cursorIndex=-1"
6
+ @keydown.arrow-down="moveDownList()"
7
+ @keydown.arrow-up="moveUpList()"
8
+ >
9
+ <input
10
+ @input.debounce="getSuggestionsForInput();cursorIndex=-1"
11
+ @click="active=true"
12
+ name="query"
13
+ x-model="query"
14
+ placeholder='{{loca "search_input_placeholder" }}'
15
+ class="relative w-full h-12 pt-4 pl-4 placeholder-transparent bg-white border-r border-r-gray-mercury placeholder:select-none text-text dark:bg-black dark:text-text-dark autofill:shadow-autofill border-form-highlight dark:form-highlight-dark pr-9 peer border-y focus:border-y-2 border-t-transparent dark:border-t-transparent focus:outline-none"
16
+ type="text"
17
+ id="searchInput--{{nextRandom}}"
18
+ autocomplete="off"
19
+ role="combobox"
20
+ aria-haspopup="listbox"
21
+ aria-autocomplete="list"
22
+ x-effect="$el.setAttribute('aria-expanded', (query.length > 1 && active && suggestions.length > 0))"
23
+ title="{{loca 'search_form_label_searchTerm'}}"
24
+ placeholder="{{loca 'search_form_label_searchTerm'}}"
25
+
26
+ >
27
+ <label for="searchInput--{{getRandom}}"
28
+ class="{{_labelClass}} peer-placeholder-shown:whitespace-nowrap {{> components/forms/components/labelClasses }}">
29
+ {{loca "search_form_label_searchTerm" }}
30
+ </label>
31
+ <div
32
+ class="absolute left-0 w-auto min-w-full z-100 top-11.5"
33
+ x-show="query.length > 1 && active && suggestions.length"
34
+ x-cloak
35
+ x-transition:leave="transition ease-in duration-100"
36
+ x-transition:leave-start="opacity-100"
37
+ x-transition:leave-end="opacity-0"
38
+ >
39
+ <ul
40
+ role="listbox"
41
+ id="suggestionlist--{{getRandom}}"
42
+ aria-label="Suche öffnen"
43
+ x-effect="$el.setAttribute('aria-expanded', query.length > 1 && active && suggestions.length > 0);$el.setAttribute('aria-hidden', !(query.length > 1 && active && suggestions.length > 0))"
44
+ class=" w-full mt-1 lg:mt-0.5 bg-white border rounded divide-y shadow-xl"
45
+ x-ref="list"
46
+ >
47
+
48
+ <template x-for="(suggestion, index) in suggestions" :key="index">
49
+ <li class="first-of-type:border-none">
50
+ <a
51
+ x-bind:active="false"
52
+ x-bind:href="'{{resourceUrl "suche/index.nocache"}}?query=' + suggestion"
53
+ x-bind:class="{'py-1.5 px-2 link-focus-inset text-base flex w-full text-secondary rounded hover:bg-primary hover:text-white': true, 'bg-primary text-white':index==cursorIndex }"
54
+ >
55
+ <span x-text="suggestion"></span>
56
+ </a>
57
+ </li>
58
+ </template>
59
+
60
+ </ul>
61
+ </div>
62
+ </div>
63
+ <script type="text/javascript">
64
+
65
+ function searchSuggest() {
66
+
67
+ return {
68
+ active:true,
69
+ cursorIndex: -1,
70
+ query: "",
71
+ suggestions: [],
72
+
73
+ getSuggestionsForInput() {
74
+
75
+ suggestionDataUrl = '{{resourceUrl "suche/index~suggest.jsp"}}' + '?suggestions=' + this.query;
76
+
77
+ fetch(suggestionDataUrl)
78
+
79
+ .then((res) =>{ return res.text()})
80
+
81
+ .then((data) => {
82
+ data = JSON.parse(data.replace(/&quot;/g, '"'))
83
+ data.solrSuggestions = this.filterStartwith(data.solrSuggestions, this.query)
84
+ this.suggestions= this.filterSortbylength(data.solrSuggestions)
85
+ });
86
+
87
+ },
88
+
89
+ filterStartwith(data, query) {
90
+ return data.filter(Suggestion => Suggestion.toLowerCase().startsWith(query.toLowerCase().trim()))
91
+ },
92
+
93
+ filterSortbylength(data) {
94
+ return data.sort((a, b) => a.length - b.length)
95
+ },
96
+
97
+ moveDownList() {
98
+ if (this.suggestions.length > 0 && this.cursorIndex < this.suggestions.length - 1)
99
+ {
100
+ this.cursorIndex++;
101
+ this.query = this.suggestions[this.cursorIndex];
102
+ }
103
+ },
104
+
105
+ moveUpList() {
106
+ if (this.suggestions.length > 0 && this.cursorIndex > 0)
107
+ {
108
+ this.cursorIndex--;
109
+ this.query = this.suggestions[this.cursorIndex];
110
+ }
111
+ },
112
+
113
+ };
114
+
115
+ }
116
+
117
+ </script>
118
+ </div>
119
+ <div class="relative flex h-12 basis-full width-full">
120
+ <div class="relative h-12 basis-full">
121
+ <select class="relative w-full h-12 pt-4 pl-4 bg-white appearance-none cursor-pointer form-select text-text dark:bg-black dark:text-text-dark pr-9 peer border-y focus:border-y-2 border-t-transparent dark:border-t-transparent focus:outline-none border-form-highlight dark:border-form-highlight-dark" id="select_search" title="" name="all" isFocused="false">
122
+ <option class="text-gray-scorpion dark:text-text-dark" value="false" {{#unless this.searchInAllWebsites}} selected{{/unless}}>{{loca
123
+ "website_name_search_button"}}</option>
124
+ <option class="text-gray-scorpion dark:text-text-dark" value="true" {{#if this.searchInAllWebsites}} selected{{/if}}>{{loca
125
+ "search_select_all"}}</option>
126
+ </select>
127
+ <label for="select_search" class="absolute top-0 truncate transition-transform origin-top-left transform scale-100 translate-x-0 translate-y-3 pointer-events-none left-4 right-11 text-gray-scorpion dark:text-text-dark peer-focus:text-form-highlight peer-focus:dark:text-form-highlight-dark peer-focus:scale-75 peer-focus:translate-y-0 peer-focus:top-px ">
128
+ {{loca "search_form_label_searchType"}}
129
+ </label>
130
+ <div class="absolute bg-white right-0 p-4 py-3 transform border-l peer-focus:border-r peer-focus:border-l-0 pointer-events-none top-1.5 peer-focus:rotate-180">
131
+ {{~> components/base/image/icon _icon="arrow-down" _addClass="sb-icon w-3 h-3 fill-form-highlight dark:fill-form-highlight-dark" ~}}
38
132
  </div>
39
133
  </div>
40
- </form>
134
+ <div class="relative">
135
+ <button aria-label="{{loca "search_input_aria_submit" }}" type="submit"
136
+ class="inline-flex items-center justify-center order-2 w-12 h-12 border rounded-r cursor-pointer ds-button font-heading text-button-inverted bg-button border-button hover:bg-button--dark hover:border-button--dark active:bg-button--dark active:scale-95 min-w-11">
137
+ {{> components/base/image/icon _icon="suche-ds" _addClass="sb-icon w-7 h-7 fill-white dark:fill-text-dark"}}
138
+ <span class="sr-only">{{loca "search_input_aria_submit" }}</span>
139
+ </button>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ </form>
@@ -0,0 +1,31 @@
1
+ const handlebars = require('hrHandlebars')
2
+ const hbsTemplates = []
3
+ hbsTemplates['default'] = handlebars.compile(`
4
+ {{> components/page/search/search_form }}
5
+ `)
6
+
7
+ const Template = (args) => {
8
+ return hbsTemplates['default']({ ...args })
9
+ }
10
+
11
+ export default {
12
+ title: 'Komponenten/SearchForm',
13
+ argTypes: {},
14
+
15
+ parameters: {
16
+ layout: 'fullscreen',
17
+
18
+ docs: {
19
+ inlineStories: false,
20
+ iframeHeight: 400,
21
+ },
22
+ chromatic: {
23
+ disableSnapshot: false
24
+ },
25
+ },
26
+ }
27
+
28
+ export const searchForm = {
29
+ render: Template.bind({}),
30
+ name: 'Suchformular',
31
+ }
@@ -30,34 +30,36 @@
30
30
  >
31
31
  {{> components/voting/components/voting_header _isTeaser=../../_isTeaser _title=../this.title _topline=../this.topline}}
32
32
 
33
- <div class="js-voting-form__bottomWrapper">
34
- {{#if this.shorttext}}
35
- <p class="mt-3 text-base font-copy sm:text-lg dark:text-text-dark">{{this.shorttext}}</p>
36
- {{/if}}
37
-
38
- <div class="w-full mt-6 text-xs text-right sm:mt-8 font-headingSerif sm:text-sm text-gray-scorpion dark:text-text-dark">
39
- {{#if ../this.isMultipleChoice}}
40
- {{loca "votingform_open_answers_text" ../this.maxAnswerCount}}
41
- {{else}}
42
- {{loca "votingform_single_answer_text"}}
33
+ <div id="voting_form">
34
+ <div class="js-voting-form__bottomWrapper">
35
+ {{#if this.shorttext}}
36
+ <p class="mt-3 text-base font-copy sm:text-lg dark:text-text-dark">{{this.shorttext}}</p>
43
37
  {{/if}}
44
- <span class="block float-right w-8 js-voting-counter">(0/{{../this.maxAnswerCount}})</span>
45
- </div>
46
- {{> components/forms/components/fields
47
- _multipleChoice=../this.isMultipleChoice
48
- _isHorizontalLayout=this.isHorizontalLayout
49
- _isMultimediaVoting=../this.isMultimediaVoting
50
- _addClassGroup="!flex-col mt-2"
51
- _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex hover:!outline-2 hover:!outline-blue-science-hex bg-white dark:bg-black has-[input:disabled]:opacity-50 has-[input:disabled]:cursor-not-allowed"
52
- _addClassLabel="w-full !pt-[15px] sm:!pt-[18px] !pb-[9px] sm:!pb-3.5 !pr-3 sm:!pr-4"
53
- _addClassLabelForDataPolicy="!pt-0"
54
- _addClassInput="!my-3 sm:!my-4 !ml-3 sm:!ml-4"
55
- }}
56
- <div class="w-full h-12">
57
- {{#if this.is2FSecured}}
58
- <div class="float-left mt-1 text-xs text-gray-scorpion dark:text-text-dark font-headingSerif">{{loca "form_text_required"}}</div>
59
- {{/if}}
60
- {{> components/voting/components/voting_submit _label="Abstimmen" _addClass="js-voting-submit-button"}}
38
+
39
+ <div class="w-full mt-6 text-xs text-right sm:mt-8 font-headingSerif sm:text-sm text-gray-scorpion dark:text-text-dark">
40
+ {{#if ../this.isMultipleChoice}}
41
+ {{loca "votingform_open_answers_text" ../this.maxAnswerCount}}
42
+ {{else}}
43
+ {{loca "votingform_single_answer_text"}}
44
+ {{/if}}
45
+ <span class="block float-right w-8 js-voting-counter">(0/{{../this.maxAnswerCount}})</span>
46
+ </div>
47
+ {{> components/forms/components/fields
48
+ _multipleChoice=../this.isMultipleChoice
49
+ _isHorizontalLayout=this.isHorizontalLayout
50
+ _isMultimediaVoting=../this.isMultimediaVoting
51
+ _addClassGroup="!flex-col mt-2"
52
+ _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex hover:!outline-2 hover:!outline-blue-science-hex bg-white dark:bg-black has-[input:disabled]:opacity-50 has-[input:disabled]:cursor-not-allowed"
53
+ _addClassLabel="w-full !pt-[15px] sm:!pt-[18px] !pb-[9px] sm:!pb-3.5 !pr-3 sm:!pr-4"
54
+ _addClassLabelForDataPolicy="!pt-0"
55
+ _addClassInput="!my-3 sm:!my-4 !ml-3 sm:!ml-4"
56
+ }}
57
+ <div class="w-full h-12">
58
+ {{#if this.is2FSecured}}
59
+ <div class="float-left mt-1 text-xs text-gray-scorpion dark:text-text-dark font-headingSerif">{{loca "form_text_required"}}</div>
60
+ {{/if}}
61
+ {{> components/voting/components/voting_submit _label="Abstimmen" _addClass="js-voting-submit-button"}}
62
+ </div>
61
63
  </div>
62
64
  </div>
63
65
  <script type="text/html" class="js-successMessage">
@@ -110,6 +112,12 @@
110
112
  {{> components/voting/voting_result _hideVotingResult=this.hideVotingResult}}
111
113
  {{/unless}}
112
114
  {{/with}}
115
+ <div id="voting_form_hint">
116
+ <div class="p-4 mt-6 mb-3 text-orange-700 bg-orange-100 border-l-4 border-orange-500" role="alert">
117
+ <p class="font-bold">Hinweis</p>
118
+ <p>Bitte aktivieren Sie JavaScript, um bei einem Voting abstimmen zu können.</p>
119
+ </div>
120
+ </div>
113
121
  {{/components/forms/components/backgroundBox }}
114
122
 
115
123
  {{!--Featured Content--}}