lapikit 0.1.13 → 0.1.14

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.
@@ -17,6 +17,7 @@
17
17
  border-radius: var(--button-radius);
18
18
  color: var(--button-color);
19
19
  font-weight: 500;
20
+ text-decoration: none;
20
21
  }
21
22
 
22
23
  .kit-button,
@@ -65,6 +65,7 @@
65
65
  disabled={href ? undefined : disabled}
66
66
  type={href ? undefined : type}
67
67
  use:ripple={{
68
+ component: 'button',
68
69
  disabled: noRipple || disabled
69
70
  }}
70
71
  style:--base={assets.color(background)}
@@ -52,6 +52,7 @@
52
52
  ]}
53
53
  disabled={href ? undefined : disabled}
54
54
  use:ripple={{
55
+ component: 'card',
55
56
  disabled: noRipple || disabled || !isClickable
56
57
  }}
57
58
  style:--base={assets.color(background)}
@@ -17,6 +17,7 @@
17
17
  border-radius: var(--chip-radius);
18
18
  color: var(--chip-color);
19
19
  font-weight: 500;
20
+ text-decoration: none;
20
21
  }
21
22
 
22
23
  .kit-chip:not(div):not(span) {
@@ -76,6 +76,7 @@
76
76
  disabled={href ? undefined : disabled}
77
77
  type={href ? undefined : type}
78
78
  use:ripple={{
79
+ component: 'chip',
79
80
  disabled: noRipple || disabled || is === 'div' || is === 'span'
80
81
  }}
81
82
  style:--base={assets.color(background)}
@@ -29,6 +29,7 @@
29
29
  color: var(--list-item-color);
30
30
  border-radius: var(--list-item-radius);
31
31
  font-weight: 500;
32
+ text-decoration: none;
32
33
  }
33
34
 
34
35
  .kit-list-item:not(div) {
@@ -47,6 +47,7 @@
47
47
  rest.class
48
48
  ]}
49
49
  use:ripple={{
50
+ component: 'list-item',
50
51
  disabled: noRipple || disabled || is === 'div'
51
52
  }}
52
53
  role={is === 'button' ? 'listitem' : undefined}
@@ -1,4 +1,5 @@
1
1
  interface RippleOptions {
2
+ component?: string;
2
3
  center?: boolean;
3
4
  color?: string;
4
5
  duration?: number;
@@ -26,6 +26,9 @@ export function ripple(el, options = {}) {
26
26
  if (options.duration && options.duration < 0) {
27
27
  options.duration = undefined;
28
28
  }
29
+ if (options.component) {
30
+ rippleContainer.style.setProperty('--ripple-radius', `var(--${options.component}-radius)`);
31
+ }
29
32
  if (options.color) {
30
33
  rippleContainer.style.setProperty('--ripple-color', options.color);
31
34
  }
@@ -29,6 +29,7 @@
29
29
  transition: 0.6s;
30
30
  -webkit-animation: lapikit-ripple var(--ripple-duration, 0.4s) cubic-bezier(0.4, 0, 0.2, 1);
31
31
  animation: lapikit-ripple var(--ripple-duration, 0.4s) cubic-bezier(0.4, 0, 0.2, 1);
32
+ border-radius: var(--ripple-radius);
32
33
  }
33
34
 
34
35
  .kit-ripple--center {
@@ -47,6 +48,7 @@
47
48
  background: none;
48
49
  pointer-events: none;
49
50
  z-index: 999;
51
+ border-radius: var(--ripple-radius);
50
52
  }
51
53
 
52
54
  @keyframes lapikit-ripple {
@@ -38,7 +38,7 @@ export const colors = (config) => {
38
38
  }
39
39
  cssVariables += `}\n`;
40
40
  cssVariables += `.${inversed} {\n`;
41
- cssVariables += `color-scheme: ${used};\n`;
41
+ cssVariables += `color-scheme: ${inversed};\n`;
42
42
  for (const [colorName, colorValue] of Object.entries(schemes[inversed])) {
43
43
  cssVariables += `--kit-${colorName}: ${colorValue};\n`;
44
44
  }
@@ -56,7 +56,7 @@ export const colors = (config) => {
56
56
  }
57
57
  cssVariables += `}\n`;
58
58
  cssVariables += `.${inversed} {\n`;
59
- cssVariables += `color-scheme: ${used};\n`;
59
+ cssVariables += `color-scheme: ${inversed};\n`;
60
60
  for (const [colorName, colorValue] of Object.entries(schemes[inversed])) {
61
61
  cssVariables += `--kit-${colorName}: ${colorValue};\n`;
62
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"