lapikit 0.5.3 → 0.5.5
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/dist/components/accordion/accordion.types.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/list/list.svelte +3 -2
- package/dist/components/list/modules/list-item.svelte +5 -1
- package/dist/components/toolbar/toolbar.svelte +3 -3
- package/dist/components/toolbar/toolbar.types.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/framework.js +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { ModelDropdownProps } from './dropdown/dropdown.types';
|
|
2
|
+
export type { ModelAccordionItemProps } from './accordion/accordion.types';
|
|
2
3
|
export { default as KitApp } from './app/app.svelte';
|
|
3
4
|
export { default as KitAppbar } from './appbar/appbar.svelte';
|
|
4
5
|
export { default as KitBtn } from './btn/btn.svelte';
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
--kit-list-item-px: var(--kit-list-item-px-md);
|
|
119
119
|
--kit-list-item-gap: var(--kit-list-item-gap-md);
|
|
120
120
|
--kit-list-item-font: var(--kit-list-item-font-md);
|
|
121
|
+
--kit-list-density-offset: 0rem;
|
|
121
122
|
|
|
122
123
|
display: flex;
|
|
123
124
|
flex-direction: column;
|
|
@@ -169,11 +170,11 @@
|
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
.kit-list[data-density='compact'] {
|
|
172
|
-
--kit-list-
|
|
173
|
+
--kit-list-density-offset: -0.25rem;
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
.kit-list[data-density='comfortable'] {
|
|
176
|
-
--kit-list-
|
|
177
|
+
--kit-list-density-offset: 0.25rem;
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
.kit-list[data-rounded='0'] {
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
107
107
|
align-items: center;
|
|
108
108
|
gap: var(--kit-list-item-gap, 0.625rem);
|
|
109
|
-
min-height: var(--kit-list-item-h, 2.75rem);
|
|
109
|
+
min-height: calc(var(--kit-list-item-h, 2.75rem) + var(--kit-list-density-offset, 0rem));
|
|
110
110
|
padding-inline: var(--kit-list-item-px, 0.875rem);
|
|
111
111
|
border: 0;
|
|
112
112
|
border-radius: var(--kit-list-item-radius);
|
|
@@ -146,6 +146,10 @@
|
|
|
146
146
|
background: var(--kit-list-item-bg, transparent);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
:global(.kit-list[data-variant='filled']) .kit-list-item[data-active='true'] {
|
|
150
|
+
background: color-mix(in oklab, currentColor 12%, transparent);
|
|
151
|
+
}
|
|
152
|
+
|
|
149
153
|
:global(.kit-list[data-variant='outline']) .kit-list-item::before {
|
|
150
154
|
content: '';
|
|
151
155
|
position: absolute;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
's-class': sClass,
|
|
13
13
|
's-style': sStyle,
|
|
14
14
|
classContent,
|
|
15
|
-
variant = '
|
|
15
|
+
variant = 'filled',
|
|
16
16
|
rounded,
|
|
17
17
|
background,
|
|
18
18
|
color,
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
|
|
25
25
|
let safeVariant = $derived(
|
|
26
26
|
typeof variant === 'string' &&
|
|
27
|
-
(variant === 'outline' || variant === 'text' || variant === 'dash')
|
|
27
|
+
(variant === 'filled' || variant === 'outline' || variant === 'text' || variant === 'dash')
|
|
28
28
|
? variant
|
|
29
|
-
: '
|
|
29
|
+
: 'filled'
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
let safeDensity = $derived(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Component, PropValue, RoundedType } from '../../@types';
|
|
2
|
-
type Variant = 'outline' | 'text' | 'dash';
|
|
2
|
+
type Variant = 'filled' | 'outline' | 'text' | 'dash';
|
|
3
3
|
type Density = 'compact' | 'comfortable' | 'default';
|
|
4
4
|
type Orientation = 'horizontal' | 'vertical';
|
|
5
5
|
type Location = 'top' | 'bottom';
|
package/dist/constants.js
CHANGED
package/dist/framework.js
CHANGED
|
@@ -6,7 +6,8 @@ import { lapikitImportsRef, lapikitImportsLabsRef, lapikitComponents, lapikitLab
|
|
|
6
6
|
* @returns The component name with "Kit" prefix and the first letter capitalized
|
|
7
7
|
*/
|
|
8
8
|
export function componentName(shortName) {
|
|
9
|
-
|
|
9
|
+
const pascal = shortName.replace(/(^|-)([a-z])/g, (_, __, letter) => letter.toUpperCase());
|
|
10
|
+
return 'Kit' + pascal;
|
|
10
11
|
}
|
|
11
12
|
export function liliCore(options) {
|
|
12
13
|
return {
|