hr-design-system-handlebars 1.101.2 → 1.101.3

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,16 @@
1
+ # v1.101.3 (Tue Sep 24 2024)
2
+
3
+ #### ⚠️ Pushed to `main`
4
+
5
+ - Merge branch 'main' of https://github.com/mumprod/hr-design-system-handlebars into main ([@vascoeduardo](https://github.com/vascoeduardo))
6
+ - ✨ DPE-3290 Dropdown ([@vascoeduardo](https://github.com/vascoeduardo))
7
+
8
+ #### Authors: 1
9
+
10
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
11
+
12
+ ---
13
+
1
14
  # v1.101.2 (Mon Sep 23 2024)
2
15
 
3
16
  #### 🐛 Bug Fix
@@ -426,7 +426,7 @@ video {
426
426
  font-stretch: condensed;
427
427
  }
428
428
 
429
- .-translate-x-1\/2, .-translate-x-2\/4, .-translate-y-1\/2, .translate-x-0, .translate-y-0, .translate-y-12, .translate-y-8, .-rotate-45, .rotate-180, .rotate-45, .scale-50, .scale-75, .scale-y-100, .scale-y-90, .transform, .is-loading::after, .hover\:scale-105, .active\:scale-95, .peer-placeholder-shown\:translate-x-0, .peer-placeholder-shown\:translate-y-3, .peer-placeholder-shown\:scale-100, .peer-focus\:translate-x-0, .peer-focus\:scale-75 {
429
+ .-translate-x-1\/2, .-translate-x-2\/4, .-translate-y-1\/2, .translate-x-0, .translate-y-0, .translate-y-12, .translate-y-3, .translate-y-8, .-rotate-45, .rotate-180, .rotate-45, .scale-100, .scale-50, .scale-75, .scale-y-100, .scale-y-90, .transform, .is-loading::after, label, .hover\:scale-105, .active\:scale-95, .peer-placeholder-shown\:translate-x-0, .peer-placeholder-shown\:translate-y-3, .peer-placeholder-shown\:scale-100, .peer-focus\:translate-x-0, .peer-focus\:translate-y-0, .peer-focus\:scale-75 {
430
430
  --tw-translate-x: 0;
431
431
  --tw-translate-y: 0;
432
432
  --tw-rotate: 0;
@@ -1136,6 +1136,9 @@ article.indexTextDS .indexTextHighlighted .link {
1136
1136
  .right-0 {
1137
1137
  right: 0px;
1138
1138
  }
1139
+ .right-3 {
1140
+ right: 0.75rem;
1141
+ }
1139
1142
  .right-4 {
1140
1143
  right: 1rem;
1141
1144
  }
@@ -1922,6 +1925,10 @@ article.indexTextDS .indexTextHighlighted .link {
1922
1925
  --tw-translate-y: 3rem;
1923
1926
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1924
1927
  }
1928
+ .translate-y-3 {
1929
+ --tw-translate-y: 0.75rem;
1930
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1931
+ }
1925
1932
  .translate-y-8 {
1926
1933
  --tw-translate-y: 2rem;
1927
1934
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1938,6 +1945,11 @@ article.indexTextDS .indexTextHighlighted .link {
1938
1945
  --tw-rotate: 45deg;
1939
1946
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1940
1947
  }
1948
+ .scale-100 {
1949
+ --tw-scale-x: 1;
1950
+ --tw-scale-y: 1;
1951
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1952
+ }
1941
1953
  .scale-50 {
1942
1954
  --tw-scale-x: .5;
1943
1955
  --tw-scale-y: .5;
@@ -3454,7 +3466,7 @@ article.indexTextDS .indexTextHighlighted .link {
3454
3466
  border-bottom-color: var(--color-secondary-ds);
3455
3467
  }
3456
3468
  .counter-reset {
3457
- counter-reset: cnt1727102904220;
3469
+ counter-reset: cnt1727163839066;
3458
3470
  }
3459
3471
  .hyphens-auto {
3460
3472
  -webkit-hyphens: auto;
@@ -3862,7 +3874,7 @@ article.indexTextDS .indexTextHighlighted .link {
3862
3874
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3863
3875
  }
3864
3876
  .-ordered {
3865
- counter-increment: cnt1727102904220 1;
3877
+ counter-increment: cnt1727163839066 1;
3866
3878
  }
3867
3879
  .-ordered::before {
3868
3880
  position: absolute;
@@ -3878,7 +3890,7 @@ article.indexTextDS .indexTextHighlighted .link {
3878
3890
  letter-spacing: .0125em;
3879
3891
  --tw-text-opacity: 1;
3880
3892
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3881
- content: counter(cnt1727102904220);
3893
+ content: counter(cnt1727163839066);
3882
3894
  }
3883
3895
  /*! ****************************/
3884
3896
  /*! DataPolicy stuff */
@@ -3977,6 +3989,24 @@ article.indexTextDS .indexTextHighlighted .link {
3977
3989
  ul.restrictedToTwo li:nth-of-type(1n + 2) .timelineBorder {
3978
3990
  display: none;
3979
3991
  }
3992
+ /*! ****************************/
3993
+ /*! FORMULAR SELECT */
3994
+ /*! ****************************/
3995
+ /* Custom CSS to style the label when the first empty option is selected */
3996
+ select[\:has\(option\:checked\:not\(\[value\%3D\%22\%22\]\)\)] + label {
3997
+ top: 1px;
3998
+ --tw-translate-y: 0px;
3999
+ --tw-scale-x: .75;
4000
+ --tw-scale-y: .75;
4001
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
4002
+ }
4003
+ select:has(option:checked:not([value=""])) + label {
4004
+ top: 1px;
4005
+ --tw-translate-y: 0px;
4006
+ --tw-scale-x: .75;
4007
+ --tw-scale-y: .75;
4008
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
4009
+ }
3980
4010
  .\[-T\:\+Z\] {
3981
4011
  --t: +Z;
3982
4012
  }
@@ -5939,6 +5969,9 @@ ul.restrictedToTwo li:nth-of-type(1n + 2) .timelineBorder {
5939
5969
  --tw-scale-y: 1;
5940
5970
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
5941
5971
  }
5972
+ .peer:focus ~ .peer-focus\:top-px {
5973
+ top: 1px;
5974
+ }
5942
5975
  .peer:focus ~ .peer-focus\:-translate-y-0 {
5943
5976
  --tw-translate-y: -0px;
5944
5977
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -5947,6 +5980,10 @@ ul.restrictedToTwo li:nth-of-type(1n + 2) .timelineBorder {
5947
5980
  --tw-translate-x: 0px;
5948
5981
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
5949
5982
  }
5983
+ .peer:focus ~ .peer-focus\:translate-y-0 {
5984
+ --tw-translate-y: 0px;
5985
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
5986
+ }
5950
5987
  .peer:focus ~ .peer-focus\:scale-75 {
5951
5988
  --tw-scale-x: .75;
5952
5989
  --tw-scale-y: .75;
@@ -47,7 +47,7 @@
47
47
  _errorEmail="Bitte geben Sie eine gültige E-Mail-Adresse ein."
48
48
  }}
49
49
  {{else if this.type.isSelect}}
50
- {{~> modules/forms/select
50
+ {{~> components/forms/select
51
51
  _name=this.name
52
52
  _label=this.label
53
53
  _labelClass="hide"
@@ -0,0 +1,30 @@
1
+ <div class="relative flex flex-col w-full mb-5 " ax-load=""
2
+ x-data="inputHandler('select9339','Bitte wählen Sie eine Option aus', false, '')">
3
+ <select
4
+ class="relative w-full h-12 pt-4 pl-4 text-gray-800 border-blue-500 appearance-none bg- pr-9 peer border-y focus:border-y-2 border-t-transparent focus:outline-none"
5
+ :class="{'border-blue-500': hideError(),'border-red-700': hideDescription() }" x-model="select9339"
6
+ id="select9339" name="options" title="Wählen Sie eine Option" aria-label="Wählen Sie eine Option" >
7
+ <option value="" selected></option>
8
+ <option value="1">Option 1</option>
9
+ <option value="2">Option 2</option>
10
+ <option value="3">Option 3</option>
11
+ </select>
12
+ <label for="select9339"
13
+ class="absolute pointer-events-none left-[16px] top-0 translate-y-3 translate-x-0 scale-100 text-gray-500
14
+
15
+ peer-focus:text-blue-500 peer-focus:scale-75 peer-focus:translate-y-0 peer-focus:top-px
16
+
17
+
18
+
19
+ origin-top-left transform transition-transform
20
+ ">
21
+
22
+ Wen möchten Sie erreichen?*
23
+ </label>
24
+ <!-- Optional custom dropdown arrow icon -->
25
+ <div class="absolute transform -translate-y-1/2 pointer-events-none right-3 top-1/2">
26
+ <svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
27
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
28
+ </svg>
29
+ </div>
30
+ </div>
@@ -47,7 +47,7 @@
47
47
  _errorEmail="Bitte geben Sie eine gültige E-Mail-Adresse ein."
48
48
  }}
49
49
  {{else if this.type.isSelect}}
50
- {{~> modules/forms/select
50
+ {{~> components/forms/select
51
51
  _name=this.name
52
52
  _label=this.label
53
53
  _labelClass="hide"
@@ -0,0 +1,30 @@
1
+ <div class="relative flex flex-col w-full mb-5 " ax-load=""
2
+ x-data="inputHandler('select9339','Bitte wählen Sie eine Option aus', false, '')">
3
+ <select
4
+ class="relative w-full h-12 pt-4 pl-4 text-gray-800 border-blue-500 appearance-none bg- pr-9 peer border-y focus:border-y-2 border-t-transparent focus:outline-none"
5
+ :class="{'border-blue-500': hideError(),'border-red-700': hideDescription() }" x-model="select9339"
6
+ id="select9339" name="options" title="Wählen Sie eine Option" aria-label="Wählen Sie eine Option" >
7
+ <option value="" selected></option>
8
+ <option value="1">Option 1</option>
9
+ <option value="2">Option 2</option>
10
+ <option value="3">Option 3</option>
11
+ </select>
12
+ <label for="select9339"
13
+ class="absolute pointer-events-none left-[16px] top-0 translate-y-3 translate-x-0 scale-100 text-gray-500
14
+
15
+ peer-focus:text-blue-500 peer-focus:scale-75 peer-focus:translate-y-0 peer-focus:top-px
16
+
17
+
18
+
19
+ origin-top-left transform transition-transform
20
+ ">
21
+
22
+ Wen möchten Sie erreichen?*
23
+ </label>
24
+ <!-- Optional custom dropdown arrow icon -->
25
+ <div class="absolute transform -translate-y-1/2 pointer-events-none right-3 top-1/2">
26
+ <svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
27
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
28
+ </svg>
29
+ </div>
30
+ </div>
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.101.2",
9
+ "version": "1.101.3",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -446,4 +446,12 @@
446
446
  ul.restrictedToTwo li:nth-of-type(1n + 2) .timelineBorder {
447
447
  display: none;
448
448
  }
449
+ /*! ****************************/
450
+ /*! FORMULAR SELECT */
451
+ /*! ****************************/
452
+ /* Custom CSS to style the label when the first empty option is selected */
453
+ select:has(option:checked:not([value=""])) + label{
454
+ @apply top-px scale-75 translate-y-0
455
+ }
456
+
449
457
  }
@@ -86,5 +86,19 @@
86
86
  "columns":"30",
87
87
  "rows":"10",
88
88
  "counter":true
89
- }
89
+ },
90
+ "select":
91
+ {
92
+ "type":{
93
+ "isSelect":true,
94
+ "asString":"select"
95
+ },
96
+ "name":"Select Name",
97
+ "label":"Select Label",
98
+ "description":"Das ist der Beschreibungstext von Select",
99
+ "defaultValue":"",
100
+ "isHidden":false,
101
+ "isRequired":false
102
+
103
+ }
90
104
  }
@@ -0,0 +1,8 @@
1
+ {
2
+ "fields":[
3
+ {
4
+ "@->jsoninclude": "forms/form_fields.inc.json",
5
+ "@->contentpath": "select"
6
+ }
7
+ ]
8
+ }
@@ -47,7 +47,7 @@
47
47
  _errorEmail="Bitte geben Sie eine gültige E-Mail-Adresse ein."
48
48
  }}
49
49
  {{else if this.type.isSelect}}
50
- {{~> modules/forms/select
50
+ {{~> components/forms/select
51
51
  _name=this.name
52
52
  _label=this.label
53
53
  _labelClass="hide"
@@ -0,0 +1 @@
1
+ {"fields":[{"type":{"isSelect":true,"asString":"select"},"name":"Select Name","label":"Select Label","description":"Das ist der Beschreibungstext von Select","defaultValue":"","isHidden":false,"isRequired":false}]}
@@ -4,6 +4,8 @@ import inputMandatoryJson from './fixtures/form_input_mandatory.json'
4
4
  import inputPrefilledJson from './fixtures/form_input_prefilled.json'
5
5
  import textareaJson from './fixtures/form_textarea.json'
6
6
  import emailJson from './fixtures/form_email.json'
7
+ import selectJson from './fixtures/form_select.json'
8
+
7
9
 
8
10
  const handlebars = require('hrHandlebars')
9
11
 
@@ -66,4 +68,9 @@ export const Textarea = {
66
68
  render: Template.bind({}),
67
69
  name: 'Textarea',
68
70
  args: textareaJson,
69
- }
71
+ }
72
+ export const Select = {
73
+ render: Template.bind({}),
74
+ name: 'Select',
75
+ args: selectJson,
76
+ }
@@ -0,0 +1,30 @@
1
+ <div class="relative flex flex-col w-full mb-5 " ax-load=""
2
+ x-data="inputHandler('select9339','Bitte wählen Sie eine Option aus', false, '')">
3
+ <select
4
+ class="relative w-full h-12 pt-4 pl-4 text-gray-800 border-blue-500 appearance-none bg- pr-9 peer border-y focus:border-y-2 border-t-transparent focus:outline-none"
5
+ :class="{'border-blue-500': hideError(),'border-red-700': hideDescription() }" x-model="select9339"
6
+ id="select9339" name="options" title="Wählen Sie eine Option" aria-label="Wählen Sie eine Option" >
7
+ <option value="" selected></option>
8
+ <option value="1">Option 1</option>
9
+ <option value="2">Option 2</option>
10
+ <option value="3">Option 3</option>
11
+ </select>
12
+ <label for="select9339"
13
+ class="absolute pointer-events-none left-[16px] top-0 translate-y-3 translate-x-0 scale-100 text-gray-500
14
+
15
+ peer-focus:text-blue-500 peer-focus:scale-75 peer-focus:translate-y-0 peer-focus:top-px
16
+
17
+
18
+
19
+ origin-top-left transform transition-transform
20
+ ">
21
+
22
+ Wen möchten Sie erreichen?*
23
+ </label>
24
+ <!-- Optional custom dropdown arrow icon -->
25
+ <div class="absolute transform -translate-y-1/2 pointer-events-none right-3 top-1/2">
26
+ <svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
27
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
28
+ </svg>
29
+ </div>
30
+ </div>