noph-ui 0.22.0 → 0.22.2
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/badge/Badge.svelte
CHANGED
package/dist/tabs/Tab.svelte
CHANGED
|
@@ -122,7 +122,12 @@
|
|
|
122
122
|
role="tab"
|
|
123
123
|
bind:this={element}
|
|
124
124
|
{href}
|
|
125
|
-
class={[
|
|
125
|
+
class={[
|
|
126
|
+
'np-tab',
|
|
127
|
+
isActive && 'np-tab-content-active',
|
|
128
|
+
variant === 'primary' ? 'primary' : 'secondary',
|
|
129
|
+
attributes.class,
|
|
130
|
+
]}
|
|
126
131
|
onclick={onClick}
|
|
127
132
|
onkeydown={onKeyDown}
|
|
128
133
|
>
|
|
@@ -135,7 +140,12 @@
|
|
|
135
140
|
tabindex={isActive ? 0 : -1}
|
|
136
141
|
role="tab"
|
|
137
142
|
bind:this={element}
|
|
138
|
-
class={[
|
|
143
|
+
class={[
|
|
144
|
+
'np-tab',
|
|
145
|
+
isActive && 'np-tab-content-active',
|
|
146
|
+
variant === 'primary' ? 'primary' : 'secondary',
|
|
147
|
+
attributes.class,
|
|
148
|
+
]}
|
|
139
149
|
onclick={onClick}
|
|
140
150
|
onkeydown={onKeyDown}
|
|
141
151
|
>
|
|
@@ -157,11 +167,17 @@
|
|
|
157
167
|
padding: 0 1rem;
|
|
158
168
|
color: var(--np-color-on-surface-variant);
|
|
159
169
|
height: 3rem;
|
|
170
|
+
transition: color 0.3s ease;
|
|
160
171
|
}
|
|
161
172
|
.np-tab-content-active {
|
|
162
|
-
color: var(--np-color-primary);
|
|
163
173
|
--_focus-bottom: 4px;
|
|
164
174
|
}
|
|
175
|
+
.np-tab-content-active.primary {
|
|
176
|
+
color: var(--np-color-primary);
|
|
177
|
+
}
|
|
178
|
+
.np-tab-content-active.secondary {
|
|
179
|
+
color: var(--np-color-on-surface);
|
|
180
|
+
}
|
|
165
181
|
.np-tab-content {
|
|
166
182
|
height: 100%;
|
|
167
183
|
}
|
package/dist/tabs/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface TabProps extends HTMLAttributes<HTMLElement> {
|
|
|
7
7
|
href?: string;
|
|
8
8
|
icon?: Snippet;
|
|
9
9
|
badge?: boolean;
|
|
10
|
-
badgeLabel?: string;
|
|
10
|
+
badgeLabel?: string | number;
|
|
11
11
|
}
|
|
12
12
|
export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
13
13
|
value: string | number;
|