hr-design-system-handlebars 1.113.16 → 1.113.18

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 CHANGED
@@ -1,3 +1,27 @@
1
+ # v1.113.18 (Mon Nov 04 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - add important rule [#1145](https://github.com/mumprod/hr-design-system-handlebars/pull/1145) ([@hanswurstsalat](https://github.com/hanswurstsalat))
6
+
7
+ #### Authors: 1
8
+
9
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
10
+
11
+ ---
12
+
13
+ # v1.113.17 (Mon Nov 04 2024)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - add multiple-choice voting [#1144](https://github.com/mumprod/hr-design-system-handlebars/pull/1144) ([@hanswurstsalat](https://github.com/hanswurstsalat))
18
+
19
+ #### Authors: 1
20
+
21
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
22
+
23
+ ---
24
+
1
25
  # v1.113.16 (Mon Nov 04 2024)
2
26
 
3
27
  #### 🐛 Bug Fix
@@ -2050,6 +2050,9 @@ article.indexTextDS .indexTextHighlighted .link {
2050
2050
  .animate-spin {
2051
2051
  animation: spin 1s linear infinite;
2052
2052
  }
2053
+ .\!cursor-not-allowed {
2054
+ cursor: not-allowed !important;
2055
+ }
2053
2056
  .cursor-default {
2054
2057
  cursor: default;
2055
2058
  }
@@ -2845,6 +2848,9 @@ article.indexTextDS .indexTextHighlighted .link {
2845
2848
  .p-2 {
2846
2849
  padding: 0.5rem;
2847
2850
  }
2851
+ .p-3 {
2852
+ padding: 0.75rem;
2853
+ }
2848
2854
  .p-4 {
2849
2855
  padding: 1rem;
2850
2856
  }
@@ -3658,7 +3664,7 @@ article.indexTextDS .indexTextHighlighted .link {
3658
3664
  border-bottom-color: var(--color-secondary-ds);
3659
3665
  }
3660
3666
  .counter-reset {
3661
- counter-reset: cnt1730727988086;
3667
+ counter-reset: cnt1730744193495;
3662
3668
  }
3663
3669
  .placeholder-text-xs::-webkit-input-placeholder {
3664
3670
  font-size: 0.75rem;
@@ -4072,7 +4078,7 @@ article.indexTextDS .indexTextHighlighted .link {
4072
4078
  --tw-ring-color: rgba(255, 255, 255, 0.5);
4073
4079
  }
4074
4080
  .-ordered {
4075
- counter-increment: cnt1730727988086 1;
4081
+ counter-increment: cnt1730744193495 1;
4076
4082
  }
4077
4083
  .-ordered::before {
4078
4084
  position: absolute;
@@ -4090,7 +4096,7 @@ article.indexTextDS .indexTextHighlighted .link {
4090
4096
  --tw-text-opacity: 1;
4091
4097
  color: rgba(0, 0, 0, 1);
4092
4098
  color: rgba(0, 0, 0, var(--tw-text-opacity));
4093
- content: counter(cnt1730727988086);
4099
+ content: counter(cnt1730744193495);
4094
4100
  }
4095
4101
  /*! ****************************/
4096
4102
  /*! DataPolicy stuff */
@@ -6326,6 +6332,9 @@ select:has(option:checked[value='']) {
6326
6332
  .has-\[input\:disabled\]\:cursor-not-allowed:has(input:disabled) {
6327
6333
  cursor: not-allowed;
6328
6334
  }
6335
+ .has-\[input\:disabled\]\:opacity-50:has(input:disabled) {
6336
+ opacity: 0.5;
6337
+ }
6329
6338
  .has-\[input\:disabled\]\:opacity-75:has(input:disabled) {
6330
6339
  opacity: 0.75;
6331
6340
  }
@@ -6814,6 +6823,10 @@ select:has(option:checked[value='']) {
6814
6823
  background-color: transparent;
6815
6824
  }
6816
6825
 
6826
+ .sm\:p-4 {
6827
+ padding: 1rem;
6828
+ }
6829
+
6817
6830
  .sm\:p-5 {
6818
6831
  padding: 1.25rem;
6819
6832
  }
@@ -155,6 +155,7 @@ const VotingValidator = (context) => {
155
155
  let label = hr$('label[for=' + uncheckedOptions.id + ']')
156
156
  label = label.item(0)
157
157
  label.classList.add('-inactive')
158
+ label.classList.add('!cursor-not-allowed')
158
159
  }
159
160
  })
160
161
  }
@@ -168,6 +169,7 @@ const VotingValidator = (context) => {
168
169
  let label = hr$('label[for=' + disabledCheckboxes.id + ']')
169
170
  label = label.item(0)
170
171
  label.classList.remove('-inactive')
172
+ label.classList.remove('!cursor-not-allowed')
171
173
  })
172
174
  }
173
175
 
@@ -10,7 +10,7 @@
10
10
  {{/unless}}
11
11
  >
12
12
  <div class="flex flex-row items-center w-full cursor-pointer{{#if _addClass}} {{_addClass}}{{/if}}">
13
- <input class="relative self-start flex-shrink-0 w-6 h-6 bg-white dark:bg-black border appearance-none cursor-pointer border-form-highlight dark:border-form-highlight-dark {{~inline-switch _type '["checkbox","radio"]' '[" checked:bg-form-highlight checked:border-form-highlight form-checkbox"," checked:bg-white checked:border-form-highlight rounded-full form-radio",""]'}}"
13
+ <input class="relative self-start flex-shrink-0 w-6 h-6 bg-white dark:bg-black border appearance-none cursor-pointer disabled:cursor-not-allowed border-form-highlight dark:border-form-highlight-dark {{~inline-switch _type '["checkbox","radio"]' '[" checked:bg-form-highlight checked:border-form-highlight form-checkbox"," checked:bg-white checked:border-form-highlight rounded-full form-radio",""]'}}"
14
14
  {{#if _required}}
15
15
  :class="{' border-form-highlight dark:border-form-highlight-dark': hideError(),'border-error dark:border-error-dark': hideDescription() }"
16
16
  {{/if}}
@@ -42,7 +42,7 @@
42
42
  {{/if}}
43
43
  <span class="block float-right w-8 js-voting-counter">(0/{{../this.maxAnswerCount}})</span>
44
44
  </div>
45
- {{> components/forms/components/fields _multipleChoice=../this.isMultipleChoice _addClassGroup="!flex-col mt-5" _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex bg-white p-4" _addClassLabel="!text-base sm:!text-lg md:!text-lg"}}
45
+ {{> components/forms/components/fields _multipleChoice=../this.isMultipleChoice _addClassGroup="!flex-col mt-5" _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex bg-white p-3 sm:p-4 has-[input:disabled]:opacity-50 has-[input:disabled]:cursor-not-allowed" _addClassLabel="!text-base sm:!text-lg md:!text-lg"}}
46
46
  {{> components/voting/components/voting_submit _label="Abstimmen" _addClass="-inactive js-voting-submit-button"}}
47
47
  </div>
48
48
  </form>
@@ -10,7 +10,7 @@
10
10
  {{/unless}}
11
11
  >
12
12
  <div class="flex flex-row items-center w-full cursor-pointer{{#if _addClass}} {{_addClass}}{{/if}}">
13
- <input class="relative self-start flex-shrink-0 w-6 h-6 bg-white dark:bg-black border appearance-none cursor-pointer border-form-highlight dark:border-form-highlight-dark {{~inline-switch _type '["checkbox","radio"]' '[" checked:bg-form-highlight checked:border-form-highlight form-checkbox"," checked:bg-white checked:border-form-highlight rounded-full form-radio",""]'}}"
13
+ <input class="relative self-start flex-shrink-0 w-6 h-6 bg-white dark:bg-black border appearance-none cursor-pointer disabled:cursor-not-allowed border-form-highlight dark:border-form-highlight-dark {{~inline-switch _type '["checkbox","radio"]' '[" checked:bg-form-highlight checked:border-form-highlight form-checkbox"," checked:bg-white checked:border-form-highlight rounded-full form-radio",""]'}}"
14
14
  {{#if _required}}
15
15
  :class="{' border-form-highlight dark:border-form-highlight-dark': hideError(),'border-error dark:border-error-dark': hideDescription() }"
16
16
  {{/if}}
@@ -42,7 +42,7 @@
42
42
  {{/if}}
43
43
  <span class="block float-right w-8 js-voting-counter">(0/{{../this.maxAnswerCount}})</span>
44
44
  </div>
45
- {{> components/forms/components/fields _multipleChoice=../this.isMultipleChoice _addClassGroup="!flex-col mt-5" _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex bg-white p-4" _addClassLabel="!text-base sm:!text-lg md:!text-lg"}}
45
+ {{> components/forms/components/fields _multipleChoice=../this.isMultipleChoice _addClassGroup="!flex-col mt-5" _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex bg-white p-3 sm:p-4 has-[input:disabled]:opacity-50 has-[input:disabled]:cursor-not-allowed" _addClassLabel="!text-base sm:!text-lg md:!text-lg"}}
46
46
  {{> components/voting/components/voting_submit _label="Abstimmen" _addClass="-inactive js-voting-submit-button"}}
47
47
  </div>
48
48
  </form>
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "repository": "https://github.com/szuelch/hr-design-system-handlebars",
9
- "version": "1.113.16",
9
+ "version": "1.113.18",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -0,0 +1,18 @@
1
+ {
2
+ "@->jsoninclude": "voting/voting.inc.json",
3
+ "@->contentpath": "multivote-1",
4
+ "@->overrides": [
5
+ {
6
+ "@->contentpath": "isMultipleChoice",
7
+ "@->value": true
8
+ },
9
+ {
10
+ "@->contentpath": "maxAnswerCount",
11
+ "@->value": 3
12
+ },
13
+ {
14
+ "@->contentpath": "form.fields.0.type.asString",
15
+ "@->value": "checkbox"
16
+ }
17
+ ]
18
+ }
@@ -10,7 +10,7 @@
10
10
  {{/unless}}
11
11
  >
12
12
  <div class="flex flex-row items-center w-full cursor-pointer{{#if _addClass}} {{_addClass}}{{/if}}">
13
- <input class="relative self-start flex-shrink-0 w-6 h-6 bg-white dark:bg-black border appearance-none cursor-pointer border-form-highlight dark:border-form-highlight-dark {{~inline-switch _type '["checkbox","radio"]' '[" checked:bg-form-highlight checked:border-form-highlight form-checkbox"," checked:bg-white checked:border-form-highlight rounded-full form-radio",""]'}}"
13
+ <input class="relative self-start flex-shrink-0 w-6 h-6 bg-white dark:bg-black border appearance-none cursor-pointer disabled:cursor-not-allowed border-form-highlight dark:border-form-highlight-dark {{~inline-switch _type '["checkbox","radio"]' '[" checked:bg-form-highlight checked:border-form-highlight form-checkbox"," checked:bg-white checked:border-form-highlight rounded-full form-radio",""]'}}"
14
14
  {{#if _required}}
15
15
  :class="{' border-form-highlight dark:border-form-highlight-dark': hideError(),'border-error dark:border-error-dark': hideDescription() }"
16
16
  {{/if}}
@@ -0,0 +1 @@
1
+ {"teasersize":100,"realTeasersize":100,"topline":"Voting-Topline","toplineSize":"h3","title":"Wie finden Sie hessenschau.de?","backlink":"backlink-url","uuid":"UUID","headingSize":"h2","isVoting":true,"isMultiVote":true,"hasRedirect":true,"isMultipleChoice":true,"maxAnswerCount":3,"votingSuccessText":{"richtext":"Danke für Ihre Abstimmung!"},"isSimpleSecured":true,"cookieLifetime":"12","sophoraId":"Sophora-Id","hasBarchart":true,"showAbsoluteResult":false,"showVoteResult":true,"summarizedResult":"666","votingResult":[{"label":"Gut, beste website ever","count":"27","percentageCount":"4,1","roundedPercentageCount":"4.0"},{"label":"Super, allerbeste website ever","count":"117","percentageCount":"17,6","roundedPercentageCount":"18.0"},{"label":"Mega, allerallerbeste website ever","count":"242","percentageCount":"36,3","roundedPercentageCount":"36.0"},{"label":"Hammer, allerallerbesteste website ever","count":"280","percentageCount":"42,0","roundedPercentageCount":"42.0","isWinner":true}],"form":{"shorttext":"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.","isVotingOver":false,"is2FSecured":true,"jsonUrl":"json-url","errorMessages":"Error-Messages","isSimpleSecured":true,"url":"action-url","isHorizontalLayout":false,"hideVotingResult":true,"sophoraId":"Sophora-Id","fields":[{"type":{"isGroup":false,"isChoice":true,"asString":"checkbox"},"name":"multivoting","isGrouped":true,"isRequired":false,"options":[{"value":"1","label":"Gut, beste website ever","title":"Voting-Answer 1","mediaItem":{"isImage":true,"showFullSize":{"isTrue":false},"showPortrait":{"isTrue":false},"caption":"Zum Glück ragt Hessens höchster Berg, die Wasserkuppe, gelegentlich aus der derzeitigen Nebelsuppe heraus, und so gelang mit dem Sternenteleskop ein Blick auf den magischen Rosetten-Nebel, einer Himmelsregion, in der gerade neue Sterne geboren werden. - Diese spektakuläre Momentaufnahme hat uns hessenschau.de-Nutzer Michael Keusgen zukommen lassen","copyrightWithLinks":"Karsten Hufer","imageJson":"Beispiel JSON","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"images/rueckkehr-nach-abschiebung-102_v-16to9__medium.jpg","sources":[{"sizes":"(min-width: 1024px) 960px, (min-width: 640px) calc(100vw - 4rem), 100vw","srcset":"images/rueckkehr-nach-abschiebung-102_v-16to9__small.jpg 320w, images/rueckkehr-nach-abschiebung-102_v-16to9__medium.jpg 480w, images/rueckkehr-nach-abschiebung-102_v-16to9__medium__extended.jpg 640w, images/rueckkehr-nach-abschiebung-102_v-16to9.jpg 960w, images/rueckkehr-nach-abschiebung-102_v-16to9__retina.jpg 1920w"}]}}},{"value":"2","label":"Super, allerbeste website ever","title":"Voting-Answer 2","mediaItem":{"isImage":true,"showFullSize":{"isTrue":false},"showPortrait":{"isTrue":false},"caption":"Zum Glück ragt Hessens höchster Berg, die Wasserkuppe, gelegentlich aus der derzeitigen Nebelsuppe heraus, und so gelang mit dem Sternenteleskop ein Blick auf den magischen Rosetten-Nebel, einer Himmelsregion, in der gerade neue Sterne geboren werden. - Diese spektakuläre Momentaufnahme hat uns hessenschau.de-Nutzer Michael Keusgen zukommen lassen","copyrightWithLinks":"Karsten Hufer","imageJson":"Beispiel JSON","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"images/buchmesse-fahnen-102_v-16to9__medium.jpg","sources":[{"sizes":"(min-width: 1024px) 960px, (min-width: 640px) calc(100vw - 4rem), 100vw","srcset":"images/buchmesse-fahnen-102_v-16to9__small.jpg 320w, images/buchmesse-fahnen-102_v-16to9__medium.jpg 480w, images/buchmesse-fahnen-102_v-16to9__medium__extended.jpg 640w, images/buchmesse-fahnen-102_v-16to9.jpg 960w, images/buchmesse-fahnen-102_v-16to9__retina.jpg 1920w"}]}}},{"value":"3","label":"Mega, allerallerbeste website ever","title":"Voting-Answer 3","mediaItem":{"isImage":true,"showFullSize":{"isTrue":false},"showPortrait":{"isTrue":false},"caption":"Zum Glück ragt Hessens höchster Berg, die Wasserkuppe, gelegentlich aus der derzeitigen Nebelsuppe heraus, und so gelang mit dem Sternenteleskop ein Blick auf den magischen Rosetten-Nebel, einer Himmelsregion, in der gerade neue Sterne geboren werden. - Diese spektakuläre Momentaufnahme hat uns hessenschau.de-Nutzer Michael Keusgen zukommen lassen","copyrightWithLinks":"Karsten Hufer","imageJson":"Beispiel JSON","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"images/lehrerin-ukraine-104_v-16to9__medium.jpg","sources":[{"sizes":"(min-width: 1024px) 960px, (min-width: 640px) calc(100vw - 4rem), 100vw","srcset":"images/lehrerin-ukraine-104_v-16to9__small.jpg 320w, images/lehrerin-ukraine-104_v-16to9__medium.jpg 480w, images/lehrerin-ukraine-104_v-16to9__medium__extended.jpg 640w, images/lehrerin-ukraine-104_v-16to9.jpg 960w, images/lehrerin-ukraine-104_v-16to9__retina.jpg 1920w"}]}}},{"value":"4","label":"Hammer, allerallerbesteste website ever","title":"Voting-Answer 4","mediaItem":{"isImage":true,"showFullSize":{"isTrue":false},"showPortrait":{"isTrue":false},"caption":"Zum Glück ragt Hessens höchster Berg, die Wasserkuppe, gelegentlich aus der derzeitigen Nebelsuppe heraus, und so gelang mit dem Sternenteleskop ein Blick auf den magischen Rosetten-Nebel, einer Himmelsregion, in der gerade neue Sterne geboren werden. - Diese spektakuläre Momentaufnahme hat uns hessenschau.de-Nutzer Michael Keusgen zukommen lassen","copyrightWithLinks":"Karsten Hufer","imageJson":"Beispiel JSON","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"images/connichi-106_v-16to9__medium.jpg","sources":[{"sizes":"(min-width: 1024px) 960px, (min-width: 640px) calc(100vw - 4rem), 100vw","srcset":"images/connichi-106_v-16to9__small.jpg 320w, images/connichi-106_v-16to9__medium.jpg 480w, images/connichi-106_v-16to9__medium__extended.jpg 640w, images/connichi-106_v-16to9.jpg 960w, images/connichi-106_v-16to9__retina.jpg 1920w"}]}}}]}]}}
@@ -155,6 +155,7 @@ const VotingValidator = (context) => {
155
155
  let label = hr$('label[for=' + uncheckedOptions.id + ']')
156
156
  label = label.item(0)
157
157
  label.classList.add('-inactive')
158
+ label.classList.add('!cursor-not-allowed')
158
159
  }
159
160
  })
160
161
  }
@@ -168,6 +169,7 @@ const VotingValidator = (context) => {
168
169
  let label = hr$('label[for=' + disabledCheckboxes.id + ']')
169
170
  label = label.item(0)
170
171
  label.classList.remove('-inactive')
172
+ label.classList.remove('!cursor-not-allowed')
171
173
  })
172
174
  }
173
175
 
@@ -42,7 +42,7 @@
42
42
  {{/if}}
43
43
  <span class="block float-right w-8 js-voting-counter">(0/{{../this.maxAnswerCount}})</span>
44
44
  </div>
45
- {{> components/forms/components/fields _multipleChoice=../this.isMultipleChoice _addClassGroup="!flex-col mt-5" _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex bg-white p-4" _addClassLabel="!text-base sm:!text-lg md:!text-lg"}}
45
+ {{> components/forms/components/fields _multipleChoice=../this.isMultipleChoice _addClassGroup="!flex-col mt-5" _addClassChoice="has-[input:checked]:outline outline-2 outline-blue-science-hex bg-white p-3 sm:p-4 has-[input:disabled]:opacity-50 has-[input:disabled]:cursor-not-allowed" _addClassLabel="!text-base sm:!text-lg md:!text-lg"}}
46
46
  {{> components/voting/components/voting_submit _label="Abstimmen" _addClass="-inactive js-voting-submit-button"}}
47
47
  </div>
48
48
  </form>
@@ -1,5 +1,6 @@
1
1
  import votingJson from './fixtures/voting.json'
2
2
  import votingOverJson from './fixtures/voting_over.json'
3
+ import votingMultipleChoiceJson from './fixtures/voting_multiple_choice.json'
3
4
 
4
5
  const handlebars = require('hrHandlebars')
5
6
 
@@ -30,6 +31,12 @@ export const Default = {
30
31
  args: votingJson,
31
32
  }
32
33
 
34
+ export const Voting_Multiple_Choice = {
35
+ render: Template.bind({}),
36
+ name: 'Mehrfachauswahl',
37
+ args: votingMultipleChoiceJson,
38
+ }
39
+
33
40
  export const Voting_Over = {
34
41
  render: Template.bind({}),
35
42
  name: 'Beeendet',