@kiva/kv-components 3.13.0 → 3.13.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 CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.13.2](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.13.1...@kiva/kv-components@3.13.2) (2023-04-14)
7
+
8
+ **Note:** Version bump only for package @kiva/kv-components
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.13.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.13.0...@kiva/kv-components@3.13.1) (2023-04-05)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * check for button ref before adding ripple ([#233](https://github.com/kiva/kv-ui-elements/issues/233)) ([5371a88](https://github.com/kiva/kv-ui-elements/commit/5371a8816caefede244ca20b933b9cece025b0bb))
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.13.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.12.0...@kiva/kv-components@3.13.0) (2023-03-01)
7
26
 
8
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-components",
3
- "version": "3.13.0",
3
+ "version": "3.13.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -50,7 +50,7 @@
50
50
  "test": "npm run lint"
51
51
  },
52
52
  "dependencies": {
53
- "@kiva/kv-tokens": "^2.4.1",
53
+ "@kiva/kv-tokens": "^2.5.0",
54
54
  "@mdi/js": "^5.9.55",
55
55
  "@vueuse/integrations": "^7.6.0",
56
56
  "aria-hidden": "^1.1.3",
@@ -69,5 +69,5 @@
69
69
  "optional": true
70
70
  }
71
71
  },
72
- "gitHead": "ed1b307da3dda2636febbb5ddbf9230972a4e5e1"
72
+ "gitHead": "4c0fd566bb167fb765adf4bd92dccb4bb0814059"
73
73
  }
package/vue/KvButton.vue CHANGED
@@ -227,27 +227,30 @@ export default {
227
227
  // position the blip where the pointer click is or center it if keyboard
228
228
  const fromClick = event.detail !== 0; // determine if click came from pointer or keyboard
229
229
  const { clientX, clientY } = event;
230
- const {
231
- offsetLeft, offsetTop, offsetWidth, offsetHeight,
232
- } = buttonRef.value;
233
- let blipX;
234
- let blipY;
235
- if (fromClick) {
236
- blipX = `${clientX - offsetLeft}px`;
237
- blipY = `${clientY - offsetTop}px`;
238
- } else {
239
- blipX = `${offsetWidth / 2}px`;
240
- blipY = `${offsetHeight / 2}px`;
241
- }
242
- blipEl.style.setProperty('left', blipX);
243
- blipEl.style.setProperty('top', blipY);
244
230
 
245
- // append the blip to the button, remove it when the animation is done
246
- buttonInnerRef.value.appendChild(blipEl);
247
- blipEl.addEventListener('animationend', function animationComplete() {
248
- buttonInnerRef.value.removeChild(blipEl);
249
- blipEl.removeEventListener('animationend', animationComplete);
250
- });
231
+ if (buttonRef.value) {
232
+ const {
233
+ offsetLeft, offsetTop, offsetWidth, offsetHeight,
234
+ } = buttonRef.value;
235
+ let blipX;
236
+ let blipY;
237
+ if (fromClick) {
238
+ blipX = `${clientX - offsetLeft}px`;
239
+ blipY = `${clientY - offsetTop}px`;
240
+ } else {
241
+ blipX = `${offsetWidth / 2}px`;
242
+ blipY = `${offsetHeight / 2}px`;
243
+ }
244
+ blipEl.style.setProperty('left', blipX);
245
+ blipEl.style.setProperty('top', blipY);
246
+
247
+ // append the blip to the button, remove it when the animation is done
248
+ buttonInnerRef.value.appendChild(blipEl);
249
+ blipEl.addEventListener('animationend', function animationComplete() {
250
+ buttonInnerRef.value.removeChild(blipEl);
251
+ blipEl.removeEventListener('animationend', animationComplete);
252
+ });
253
+ }
251
254
  };
252
255
 
253
256
  const onClick = (event) => {
@@ -435,7 +435,17 @@ export const Primitives = (args, { argTypes }) => ({
435
435
  return name;
436
436
  },
437
437
  isStaticColor(colorName) {
438
- const staticColors = ['transparent', 'current', 'brand', 'black', 'white'];
438
+ const staticColors = [
439
+ 'transparent',
440
+ 'current',
441
+ 'brand',
442
+ 'black',
443
+ 'white',
444
+ 'eco-green',
445
+ 'marigold',
446
+ 'desert-rose',
447
+ 'stone',
448
+ ];
439
449
  const isStatic = staticColors.some((staticColor) => colorName[0].includes(staticColor));
440
450
  return isStatic;
441
451
  },