lapikit 0.1.12 → 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.
@@ -49,9 +49,9 @@
49
49
  border-radius: var(--shape, var(--accordion-radius, var(--kit-radius-md)));
50
50
  color: var(--on, var(--accordion-color, var(--kit-on-container)));
51
51
  background-color: var(--base, var(--accordion-background, var(--kit-container)));
52
- transition:
52
+ /* transition:
53
53
  color 0.5s,
54
- background-color 0.5s;
54
+ background-color 0.5s; */
55
55
  }
56
56
 
57
57
  .kit-accordion .kit-accordion-item > button,
@@ -15,9 +15,9 @@
15
15
  color: var(--alert-color);
16
16
  background-color: var(--alert-background);
17
17
  border-radius: var(--alert-radius);
18
- transition:
18
+ /* transition:
19
19
  color 0.5s,
20
- background-color 0.5s;
20
+ background-color 0.5s; */
21
21
  }
22
22
 
23
23
  .kit-alert .kit-alert--underlay {
@@ -15,10 +15,10 @@
15
15
  color: var(--appbar-color);
16
16
  background-color: var(--appbar-background);
17
17
  border-color: var(--appbar-background);
18
- transition:
18
+ /* transition:
19
19
  color 0.5s,
20
20
  border-color 0.5s,
21
- background-color 0.5s;
21
+ background-color 0.5s; */
22
22
  }
23
23
 
24
24
  /* wrapper */
@@ -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)}
@@ -11,9 +11,9 @@
11
11
  flex-direction: column;
12
12
  text-align: start;
13
13
  overflow: hidden;
14
- transition:
14
+ /* transition:
15
15
  color 0.5s,
16
- background-color 0.5s;
16
+ background-color 0.5s; */
17
17
  padding-top: var(--card-spacing-x);
18
18
  padding-bottom: var(--card-spacing-x);
19
19
  padding-right: var(--card-spacing-y);
@@ -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)}
@@ -11,9 +11,9 @@
11
11
  width: auto;
12
12
  opacity: 1;
13
13
  transition-property: opacity, transform;
14
- transition:
14
+ /* transition:
15
15
  color 0.5s,
16
- background-color 0.5s;
16
+ background-color 0.5s; */
17
17
 
18
18
  /* theme */
19
19
  background-color: var(--dropdown-background);
@@ -4,7 +4,7 @@
4
4
  display: inline-flex;
5
5
  align-items: center;
6
6
  justify-content: center;
7
- transition: color 0.5s;
7
+ /* transition: color 0.5s; */
8
8
  text-indent: 0;
9
9
  font-size: calc(
10
10
  var(--icon-multiplier-parent-size, var(--icon-multiplier-size)) * var(--kit-spacing)
@@ -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}
@@ -11,9 +11,9 @@
11
11
  width: auto;
12
12
  opacity: 1;
13
13
  transition-property: opacity, transform;
14
- transition:
14
+ /* transition:
15
15
  color 0.5s,
16
- background-color 0.5s;
16
+ background-color 0.5s; */
17
17
 
18
18
  /* theme */
19
19
  background-color: var(--popover-background);
@@ -9,7 +9,7 @@
9
9
  opacity: var(--separator-opacity);
10
10
  transition: inherit;
11
11
  border-color: var(--separator-color);
12
- transition: border-color 0.5s;
12
+ /* transition: border-color 0.5s; */
13
13
  border-style: solid;
14
14
  }
15
15
 
@@ -7,10 +7,10 @@
7
7
  align-items: center;
8
8
  min-width: max-content;
9
9
  border-style: solid;
10
- transition:
10
+ /* transition:
11
11
  color 0.5s,
12
12
  border-color 0.5s,
13
- background-color 0.5s;
13
+ background-color 0.5s; */
14
14
 
15
15
  border-width: 1px;
16
16
  border-style: solid;
@@ -19,10 +19,10 @@
19
19
  width: auto;
20
20
  pointer-events: none;
21
21
  overflow-wrap: break-word;
22
- transition:
22
+ /* transition:
23
23
  color 0.5s,
24
24
  border-color 0.5s,
25
- background-color 0.5s;
25
+ background-color 0.5s; */
26
26
  box-shadow: 0px 16px 29px -10px color-mix(in oklab, var(--kit-scrim) 60%, transparent);
27
27
  }
28
28
 
@@ -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.12",
3
+ "version": "0.1.14",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"