lapikit 0.0.0-insiders.5d0a372 → 0.0.0-insiders.617f112
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.
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
text-decoration: none;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.kit-chip:not(div):not(span) {
|
|
23
|
+
.kit-chip:not(div):not(span):not(.kit-chip--readonly) {
|
|
24
24
|
cursor: pointer;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
border-radius: inherit;
|
|
51
51
|
}
|
|
52
|
-
.kit-chip:not(div):not(span):hover::after {
|
|
52
|
+
.kit-chip:not(div):not(span):not(.kit-chip--readonly):hover::after {
|
|
53
53
|
opacity: 0.08;
|
|
54
54
|
}
|
|
55
|
-
.kit-chip:not(div):not(span):active::after {
|
|
55
|
+
.kit-chip:not(div):not(span):not(.kit-chip--readonly):active::after {
|
|
56
56
|
opacity: 0.12;
|
|
57
57
|
}
|
|
58
|
-
.kit-chip:not(div):not(span):focus-visible::after {
|
|
58
|
+
.kit-chip:not(div):not(span):not(.kit-chip--readonly):focus-visible::after {
|
|
59
59
|
opacity: 0.12;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
rounded,
|
|
38
38
|
closable,
|
|
39
39
|
noRipple,
|
|
40
|
+
readonly = false,
|
|
40
41
|
...rest
|
|
41
42
|
}: ChipProps = $props();
|
|
42
43
|
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
|
|
45
46
|
$effect(() => {
|
|
46
47
|
const refProps = { ...rest };
|
|
47
|
-
if (refProps?.onclick) is = 'button';
|
|
48
|
+
if (refProps?.onclick && !readonly) is = 'button';
|
|
48
49
|
});
|
|
49
50
|
</script>
|
|
50
51
|
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
disabled && 'kit-chip--disabled',
|
|
69
70
|
active && 'kit-chip--active',
|
|
70
71
|
loading && 'kit-chip--loading',
|
|
72
|
+
readonly && 'kit-chip--readonly',
|
|
71
73
|
rest.class
|
|
72
74
|
]}
|
|
73
75
|
tabindex={href && disabled ? -1 : 0}
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
type={href ? undefined : type}
|
|
78
80
|
use:ripple={{
|
|
79
81
|
component: 'chip',
|
|
80
|
-
disabled: noRipple || disabled || is === 'div' || is === 'span'
|
|
82
|
+
disabled: noRipple || readonly || disabled || is === 'div' || is === 'span'
|
|
81
83
|
}}
|
|
82
84
|
style:--base={assets.color(background)}
|
|
83
85
|
style:--on={assets.color(color)}
|
|
@@ -109,7 +111,7 @@
|
|
|
109
111
|
</div>
|
|
110
112
|
{/if}
|
|
111
113
|
|
|
112
|
-
{#if closable}
|
|
114
|
+
{#if closable && !readonly}
|
|
113
115
|
<button
|
|
114
116
|
class="kit-chip--close"
|
|
115
117
|
type="button"
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
max-height: calc(100% - 3rem);
|
|
50
50
|
height: fit-content;
|
|
51
51
|
margin: 0 auto;
|
|
52
|
-
top: 50%;
|
|
53
52
|
left: 50%;
|
|
54
53
|
bottom: initial;
|
|
55
54
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
@@ -60,7 +59,6 @@
|
|
|
60
59
|
max-height: calc(100% - 3rem);
|
|
61
60
|
height: fit-content;
|
|
62
61
|
margin: 0 auto;
|
|
63
|
-
top: 50%;
|
|
64
62
|
left: 50%;
|
|
65
63
|
bottom: initial;
|
|
66
64
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
@@ -71,7 +69,6 @@
|
|
|
71
69
|
max-height: calc(100% - 3rem);
|
|
72
70
|
height: fit-content;
|
|
73
71
|
margin: 0 auto;
|
|
74
|
-
top: 50%;
|
|
75
72
|
left: 50%;
|
|
76
73
|
bottom: initial;
|
|
77
74
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
@@ -82,7 +79,6 @@
|
|
|
82
79
|
max-height: calc(100% - 3rem);
|
|
83
80
|
height: fit-content;
|
|
84
81
|
margin: 0 auto;
|
|
85
|
-
top: 50%;
|
|
86
82
|
left: 50%;
|
|
87
83
|
bottom: initial;
|
|
88
84
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
@@ -93,7 +89,6 @@
|
|
|
93
89
|
max-height: calc(100% - 3rem);
|
|
94
90
|
height: fit-content;
|
|
95
91
|
margin: 0 auto;
|
|
96
|
-
top: 50%;
|
|
97
92
|
left: 50%;
|
|
98
93
|
bottom: initial;
|
|
99
94
|
translate: var(--modal-translate-x) var(--modal-translate-y);
|
|
@@ -130,15 +125,21 @@
|
|
|
130
125
|
/* position */
|
|
131
126
|
.kit-modal [breakpoint]kit-modal-container--position-bottom {
|
|
132
127
|
--modal-translate-y: 0;
|
|
133
|
-
|
|
128
|
+
margin: auto;
|
|
134
129
|
top: initial;
|
|
130
|
+
bottom: 0;
|
|
135
131
|
}
|
|
136
132
|
|
|
137
133
|
.kit-modal [breakpoint]kit-modal-container--position-top {
|
|
138
134
|
--modal-translate-y: 0;
|
|
135
|
+
margin: auto;
|
|
139
136
|
top: 0;
|
|
137
|
+
bottom: initial;
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
.kit-modal [breakpoint]kit-modal-container--position-center {
|
|
141
|
+
--modal-translate-y: -50%;
|
|
143
142
|
margin: auto;
|
|
143
|
+
top: 50%;
|
|
144
|
+
bottom: initial;
|
|
144
145
|
}
|