lapikit 0.2.5 → 0.2.7

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.
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { BROWSER } from 'esm-env';
2
+ const BROWSER = typeof window !== 'undefined';
3
3
  import type { Snippet } from 'svelte';
4
4
  import { useTheme } from '../../actions/use-theme.js';
5
5
  import { modalOpen, setOpenModal } from '../../stores/components.js';
@@ -58,7 +58,7 @@
58
58
  }
59
59
 
60
60
  .kit-card[breakpoint]kit-card--variant-outline {
61
- --card-color: var(--base, var(--kit-label-primary));
61
+ --card-color: var(--card-background, var(--kit-label-primary));
62
62
  background-color: transparent;
63
63
  }
64
64
  .kit-card[breakpoint]kit-card--variant-outline::before {
@@ -71,7 +71,7 @@
71
71
  }
72
72
 
73
73
  .kit-card[breakpoint]kit-card--variant-text {
74
- --card-color: var(--base, var(--kit-label-primary));
74
+ --card-color: var(--card-background, var(--kit-label-primary));
75
75
  background-color: transparent;
76
76
  border: none;
77
77
  }
@@ -20,6 +20,8 @@
20
20
  color,
21
21
  background,
22
22
  noRipple,
23
+ width,
24
+ height,
23
25
  ...rest
24
26
  }: CardProps = $props();
25
27
 
@@ -58,6 +60,8 @@
58
60
  style:--card-background={assets.color(background)}
59
61
  style:--card-color={assets.color(color)}
60
62
  style:--card-shape={assets.shape(rounded)}
63
+ style:width
64
+ style:height
61
65
  >
62
66
  {@render children?.()}
63
67
  </svelte:element>
@@ -14,5 +14,7 @@ export interface CardProps extends Component {
14
14
  rounded?: string;
15
15
  color?: string;
16
16
  background?: string;
17
+ width?: string | number;
18
+ height?: string | number;
17
19
  }
18
20
  export {};
@@ -9,11 +9,11 @@
9
9
  }
10
10
 
11
11
  .kit-icon:before {
12
- color: var(--icon-color, currentColor);
12
+ color: var(--icon-color-state, var(--icon-color, currentColor)) !important;
13
13
  }
14
14
 
15
15
  .kit-icon svg {
16
- color: var(--icon-color, currentColor);
16
+ color: var(--icon-color-state, var(--icon-color, currentColor)) !important;
17
17
  }
18
18
 
19
19
  .kit-icon svg,
@@ -49,16 +49,16 @@
49
49
 
50
50
  /* state */
51
51
  .kit-icon.kit-icon--info {
52
- --base: var(--kit-accent-info);
52
+ --icon-color-state: var(--kit-accent-info);
53
53
  }
54
54
  .kit-icon.kit-icon--success {
55
- --base: var(--kit-accent-successs);
55
+ --icon-color-state: var(--kit-accent-success);
56
56
  }
57
57
  .kit-icon.kit-icon--warning {
58
- --base: var(--kit-accent-warning);
58
+ --icon-color-state: var(--kit-accent-warning);
59
59
  }
60
60
  .kit-icon.kit-icon--error {
61
- --base: var(--kit-accent-destructive);
61
+ --icon-color-state: var(--kit-accent-destructive);
62
62
  }
63
63
 
64
64
  /* disabled */
@@ -5,15 +5,30 @@
5
5
  max-height: 0px;
6
6
  opacity: var(--separator-opacity, 0.12);
7
7
  transition: inherit;
8
- border-color: var(--separator-color, var(--kit-state-shadow));
8
+ border-color: var(--separator-color, var(--kit-label-primary));
9
9
  border-style: solid;
10
10
  }
11
11
 
12
+ .kit-separator--inset:not(.kit-separator--orientation-vertical) {
13
+ max-width: calc(100% - 4.5rem);
14
+ margin-inline-start: 4.5rem;
15
+ }
16
+
17
+ .kit-separator--inset.kit-separator--orientation-vertical {
18
+ margin-bottom: 0.5rem;
19
+ margin-top: 0.5rem;
20
+ max-height: calc(100% - 1rem);
21
+ }
22
+
12
23
  .kit-separator:not(.kit-separator--orientation-vertical) {
24
+ width: 100%;
25
+ }
26
+
27
+ .kit-separator[breakpoint]kit-separator--orientation-horizontal {
13
28
  border-width: var(--separator-top-width, thin) 0 0 0;
14
29
  }
15
30
 
16
- .kit-separator--orientation-vertical {
31
+ .kit-separator[breakpoint]kit-separator--orientation-vertical {
17
32
  align-self: stretch;
18
33
  border-width: 0 thin 0 0;
19
34
  display: inline-flex;
@@ -25,18 +40,3 @@
25
40
  width: 0px;
26
41
  border-width: 0 var(--separator-right-width, thin) 0 0;
27
42
  }
28
-
29
- .kit-separator--inset:not(.kit-separator--orientation-vertical) {
30
- max-width: calc(100% - 4.5rem);
31
- margin-inline-start: 4.5rem;
32
- }
33
-
34
- .kit-separator--inset.kit-separator--orientation-vertical {
35
- margin-bottom: 0.5rem;
36
- margin-top: 0.5rem;
37
- max-height: calc(100% - 1rem);
38
- }
39
-
40
- .kit-separator:not(.kit-separator--orientation-vertical) {
41
- width: 100%;
42
- }
@@ -28,7 +28,7 @@
28
28
  orientation && assets.className('separator', 'orientation', orientation),
29
29
  rest.class
30
30
  ]}
31
- aria-orientation={orientation}
31
+ aria-orientation={typeof orientation === 'string' ? orientation : undefined}
32
32
  role="separator"
33
33
  style:--separator-color={assets.color(color)}
34
34
  style:--separator-opacity={opacity}
@@ -1,4 +1,5 @@
1
1
  import type { Base } from '../../internal/types/index.js';
2
+ type Orientation = 'horizontal' | 'vertical';
2
3
  export interface SeparatorProps extends Base {
3
4
  is?: 'div' | 'hr';
4
5
  light?: boolean;
@@ -7,5 +8,8 @@ export interface SeparatorProps extends Base {
7
8
  thickness?: string;
8
9
  opacity?: string | number;
9
10
  color?: string;
10
- orientation?: 'horizontal' | 'vertical';
11
+ orientation?: Orientation | {
12
+ [key: string]: Orientation;
13
+ };
11
14
  }
15
+ export {};
@@ -1,6 +1,5 @@
1
- import { BROWSER } from 'esm-env';
2
1
  export function disabledScroll(state) {
3
- if (BROWSER) {
2
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
4
3
  document.body.style.overflow = state ? 'hidden' : '';
5
4
  }
6
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"