hr-design-system-handlebars 1.70.3 → 1.70.4

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,15 @@
1
+ # v1.70.4 (Wed Jun 12 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - better positioning and handling of copymessage [#941](https://github.com/mumprod/hr-design-system-handlebars/pull/941) ([@StefanVesper](https://github.com/StefanVesper))
6
+
7
+ #### Authors: 1
8
+
9
+ - SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
10
+
11
+ ---
12
+
1
13
  # v1.70.3 (Tue Jun 11 2024)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -1317,6 +1317,9 @@ article.indexTextDS .indexTextHighlighted .link {
1317
1317
  .-mt-6 {
1318
1318
  margin-top: -1.5rem;
1319
1319
  }
1320
+ .-mt-8 {
1321
+ margin-top: -2rem;
1322
+ }
1320
1323
  .-mt-\[18px\] {
1321
1324
  margin-top: -18px;
1322
1325
  }
@@ -1362,6 +1365,12 @@ article.indexTextDS .indexTextHighlighted .link {
1362
1365
  .mb-8 {
1363
1366
  margin-bottom: 2rem;
1364
1367
  }
1368
+ .ml-0 {
1369
+ margin-left: 0px;
1370
+ }
1371
+ .ml-0\.5 {
1372
+ margin-left: 0.125rem;
1373
+ }
1365
1374
  .ml-1 {
1366
1375
  margin-left: 0.25rem;
1367
1376
  }
@@ -3350,7 +3359,7 @@ article.indexTextDS .indexTextHighlighted .link {
3350
3359
  border-bottom-color: var(--color-secondary-ds);
3351
3360
  }
3352
3361
  .counter-reset {
3353
- counter-reset: cnt1718128408094;
3362
+ counter-reset: cnt1718191247598;
3354
3363
  }
3355
3364
  .hyphens-auto {
3356
3365
  -webkit-hyphens: auto;
@@ -3729,7 +3738,7 @@ article.indexTextDS .indexTextHighlighted .link {
3729
3738
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3730
3739
  }
3731
3740
  .-ordered {
3732
- counter-increment: cnt1718128408094 1;
3741
+ counter-increment: cnt1718191247598 1;
3733
3742
  }
3734
3743
  .-ordered::before {
3735
3744
  position: absolute;
@@ -3745,7 +3754,7 @@ article.indexTextDS .indexTextHighlighted .link {
3745
3754
  letter-spacing: .0125em;
3746
3755
  --tw-text-opacity: 1;
3747
3756
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3748
- content: counter(cnt1718128408094);
3757
+ content: counter(cnt1718191247598);
3749
3758
  }
3750
3759
  /*! ****************************/
3751
3760
  /*! DataPolicy stuff */
@@ -11,7 +11,7 @@
11
11
  <div :class="{ 'flex justify-start col-full sm:col-main relative': $store.sharingIsVisible == false }">
12
12
  <div :style="($store.footerIsVisible && !$screen('lg')) && {bottom:$store.sharingBottomPos.current}"
13
13
  :class="{ 'bottom-[19px] flex-col absolute mt-3 rounded-md': $store.sharingIsVisible == false && $store.footerIsVisible == false,
14
- 'flex-col absolute mt-3' : $store.footerIsVisible == true }"
14
+ 'flex-col absolute mt-3' : !$screen('lg') && $store.footerIsVisible == true && window.innerHeight > document.querySelector('#content').offsetHeight + document.querySelector('.sb-main-navigation').offsetHeight + (window.innerHeight - document.querySelector('footer').offsetTop) - document.querySelector('footer').offsetHeight}"
15
15
  class="flex self-center gap-3 bg-white left-5">
16
16
  <button
17
17
  class="order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group"
@@ -70,17 +70,17 @@
70
70
  >
71
71
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="copy-ds" _iconmap="icons" ~}}
72
72
  </a>
73
+ <div class="absolute flex flex-row items-center justify-start hidden w-auto h-8 -mt-8 ml-0.5 text-xs bg-white whitespace-nowrap js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
74
+ {{~> components/base/image/icon _addClass="w-7 h-7 text-green-600 mr-2" _icon="status-done" _iconmap="icons" ~}}
75
+ {{loca "share_copy_message" }}
76
+ </div>
73
77
  </li>
74
- <div class="absolute flex flex-row items-center justify-end hidden w-full h-8 text-xs bg-white js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
75
- {{~> components/base/image/icon _addClass="w-6 h-6 text-green-600 mr-2" _icon="status-done" _iconmap="icons" ~}}
76
- {{loca "share_copy_message" }}
77
- </div>
78
-
79
78
  <script>
80
79
  function copyHandler(){
81
80
  return {
82
81
  copyToClipboard(event) {
83
- const messageDiv = document.querySelector('.js-copyMessage')
82
+ const clickedContainer = event.currentTarget.parentNode
83
+ const messageDiv = clickedContainer.querySelector('.js-copyMessage')
84
84
  const el = document.createElement('textarea')
85
85
  el.value = window.location.href
86
86
  el.setAttribute('readonly', '')
@@ -11,7 +11,7 @@
11
11
  <div :class="{ 'flex justify-start col-full sm:col-main relative': $store.sharingIsVisible == false }">
12
12
  <div :style="($store.footerIsVisible && !$screen('lg')) && {bottom:$store.sharingBottomPos.current}"
13
13
  :class="{ 'bottom-[19px] flex-col absolute mt-3 rounded-md': $store.sharingIsVisible == false && $store.footerIsVisible == false,
14
- 'flex-col absolute mt-3' : $store.footerIsVisible == true }"
14
+ 'flex-col absolute mt-3' : !$screen('lg') && $store.footerIsVisible == true && window.innerHeight > document.querySelector('#content').offsetHeight + document.querySelector('.sb-main-navigation').offsetHeight + (window.innerHeight - document.querySelector('footer').offsetTop) - document.querySelector('footer').offsetHeight}"
15
15
  class="flex self-center gap-3 bg-white left-5">
16
16
  <button
17
17
  class="order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group"
@@ -70,17 +70,17 @@
70
70
  >
71
71
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="copy-ds" _iconmap="icons" ~}}
72
72
  </a>
73
+ <div class="absolute flex flex-row items-center justify-start hidden w-auto h-8 -mt-8 ml-0.5 text-xs bg-white whitespace-nowrap js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
74
+ {{~> components/base/image/icon _addClass="w-7 h-7 text-green-600 mr-2" _icon="status-done" _iconmap="icons" ~}}
75
+ {{loca "share_copy_message" }}
76
+ </div>
73
77
  </li>
74
- <div class="absolute flex flex-row items-center justify-end hidden w-full h-8 text-xs bg-white js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
75
- {{~> components/base/image/icon _addClass="w-6 h-6 text-green-600 mr-2" _icon="status-done" _iconmap="icons" ~}}
76
- {{loca "share_copy_message" }}
77
- </div>
78
-
79
78
  <script>
80
79
  function copyHandler(){
81
80
  return {
82
81
  copyToClipboard(event) {
83
- const messageDiv = document.querySelector('.js-copyMessage')
82
+ const clickedContainer = event.currentTarget.parentNode
83
+ const messageDiv = clickedContainer.querySelector('.js-copyMessage')
84
84
  const el = document.createElement('textarea')
85
85
  el.value = window.location.href
86
86
  el.setAttribute('readonly', '')
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.70.3",
9
+ "version": "1.70.4",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -11,7 +11,7 @@
11
11
  <div :class="{ 'flex justify-start col-full sm:col-main relative': $store.sharingIsVisible == false }">
12
12
  <div :style="($store.footerIsVisible && !$screen('lg')) && {bottom:$store.sharingBottomPos.current}"
13
13
  :class="{ 'bottom-[19px] flex-col absolute mt-3 rounded-md': $store.sharingIsVisible == false && $store.footerIsVisible == false,
14
- 'flex-col absolute mt-3' : $store.footerIsVisible == true }"
14
+ 'flex-col absolute mt-3' : !$screen('lg') && $store.footerIsVisible == true && window.innerHeight > document.querySelector('#content').offsetHeight + document.querySelector('.sb-main-navigation').offsetHeight + (window.innerHeight - document.querySelector('footer').offsetTop) - document.querySelector('footer').offsetHeight}"
15
15
  class="flex self-center gap-3 bg-white left-5">
16
16
  <button
17
17
  class="order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group"
@@ -70,17 +70,17 @@
70
70
  >
71
71
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="copy-ds" _iconmap="icons" ~}}
72
72
  </a>
73
+ <div class="absolute flex flex-row items-center justify-start hidden w-auto h-8 -mt-8 ml-0.5 text-xs bg-white whitespace-nowrap js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
74
+ {{~> components/base/image/icon _addClass="w-7 h-7 text-green-600 mr-2" _icon="status-done" _iconmap="icons" ~}}
75
+ {{loca "share_copy_message" }}
76
+ </div>
73
77
  </li>
74
- <div class="absolute flex flex-row items-center justify-end hidden w-full h-8 text-xs bg-white js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
75
- {{~> components/base/image/icon _addClass="w-6 h-6 text-green-600 mr-2" _icon="status-done" _iconmap="icons" ~}}
76
- {{loca "share_copy_message" }}
77
- </div>
78
-
79
78
  <script>
80
79
  function copyHandler(){
81
80
  return {
82
81
  copyToClipboard(event) {
83
- const messageDiv = document.querySelector('.js-copyMessage')
82
+ const clickedContainer = event.currentTarget.parentNode
83
+ const messageDiv = clickedContainer.querySelector('.js-copyMessage')
84
84
  const el = document.createElement('textarea')
85
85
  el.value = window.location.href
86
86
  el.setAttribute('readonly', '')