@spartan-ng/cli 0.0.1-alpha.702 → 0.0.1-alpha.704
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/package.json +1 -1
- package/src/generators/base/lib/styles/transform-style-map.js +8 -3
- package/src/generators/base/lib/styles/transform-style-map.js.map +1 -1
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-content.ts.template +1 -2
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-empty.ts.template +2 -7
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-group.ts.template +1 -3
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-input.ts.template +4 -0
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-item.ts.template +3 -9
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-label.ts.template +2 -4
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-list.ts.template +2 -7
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-search.ts.template +1 -3
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-separator.ts.template +2 -4
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-status.ts.template +2 -4
- package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete.ts.template +1 -3
- package/src/generators/ui/libs/button/files/lib/hlm-button.ts.template +1 -3
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-chip-input.ts.template +2 -4
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-chip-remove.ts.template +2 -4
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-chip.ts.template +2 -4
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-chips.ts.template +7 -10
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-content.ts.template +1 -3
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-empty.ts.template +2 -7
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-group.ts.template +1 -3
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-input.ts.template +2 -0
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-item.ts.template +3 -9
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-label.ts.template +2 -4
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-list.ts.template +2 -7
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-multiple.ts.template +1 -3
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-placeholder.ts.template +1 -1
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-separator.ts.template +2 -4
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-status.ts.template +2 -4
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-trigger.ts.template +2 -2
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-value.ts.template +1 -0
- package/src/generators/ui/libs/combobox/files/lib/hlm-combobox.ts.template +1 -3
- package/src/generators/ui/libs/select/files/lib/hlm-select-content.ts.template +1 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-group.ts.template +2 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-item.ts.template +3 -5
- package/src/generators/ui/libs/select/files/lib/hlm-select-label.ts.template +2 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-multiple.ts.template +1 -3
- package/src/generators/ui/libs/select/files/lib/hlm-select-placeholder.ts.template +1 -1
- package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-down.ts.template +1 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-scroll-up.ts.template +1 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-separator.ts.template +2 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-trigger.ts.template +8 -4
- package/src/generators/ui/libs/select/files/lib/hlm-select-values-content.ts.template +1 -1
- package/src/generators/ui/libs/select/files/lib/hlm-select.ts.template +1 -3
- package/src/generators/ui/style-luma.css +67 -34
- package/src/generators/ui/style-lyra.css +68 -35
- package/src/generators/ui/style-maia.css +68 -35
- package/src/generators/ui/style-mira.css +68 -35
- package/src/generators/ui/style-nova.css +68 -35
- package/src/generators/ui/style-vega.css +70 -37
- package/src/generators/ui/supported-ui-libraries.json +40 -40
- package/src/index.d.ts +2 -0
- package/src/index.js +9 -0
- package/src/index.js.map +1 -1
- package/src/utils/config.d.ts +6 -6
|
@@ -10,13 +10,11 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
10
10
|
providers: [provideIcons({ lucideCheck })],
|
|
11
11
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
12
|
hostDirectives: [{ directive: BrnSelectItem, inputs: ['id', 'disabled', 'value'] }],
|
|
13
|
-
host: {
|
|
14
|
-
'data-slot': 'select-item',
|
|
15
|
-
},
|
|
13
|
+
host: { 'data-slot': 'select-item' },
|
|
16
14
|
template: `
|
|
17
15
|
<ng-content />
|
|
18
16
|
@if (_active()) {
|
|
19
|
-
<ng-icon name="lucideCheck" class="
|
|
17
|
+
<ng-icon name="lucideCheck" class="spartan-select-item-indicator" aria-hidden="true" />
|
|
20
18
|
}
|
|
21
19
|
`,
|
|
22
20
|
})
|
|
@@ -28,7 +26,7 @@ export class HlmSelectItem {
|
|
|
28
26
|
constructor() {
|
|
29
27
|
classes(
|
|
30
28
|
() =>
|
|
31
|
-
|
|
29
|
+
'spartan-select-item relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0',
|
|
32
30
|
);
|
|
33
31
|
}
|
|
34
32
|
}
|
|
@@ -5,12 +5,10 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmSelectLabel],hlm-select-label',
|
|
7
7
|
hostDirectives: [{ directive: BrnSelectLabel, inputs: ['id'] }],
|
|
8
|
-
host: {
|
|
9
|
-
'data-slot': 'select-label',
|
|
10
|
-
},
|
|
8
|
+
host: { 'data-slot': 'select-label' },
|
|
11
9
|
})
|
|
12
10
|
export class HlmSelectLabel {
|
|
13
11
|
constructor() {
|
|
14
|
-
classes(() => '
|
|
12
|
+
classes(() => 'spartan-select-label flex');
|
|
15
13
|
}
|
|
16
14
|
}
|
|
@@ -11,7 +11,7 @@ export class HlmSelectPlaceholder {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
classes(
|
|
13
13
|
() =>
|
|
14
|
-
|
|
14
|
+
'spartan-select-placeholder flex items-center data-hidden:hidden [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0',
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -16,9 +16,6 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
16
16
|
})
|
|
17
17
|
export class HlmSelectScrollDown {
|
|
18
18
|
constructor() {
|
|
19
|
-
classes(
|
|
20
|
-
() =>
|
|
21
|
-
"bg-popover sticky bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 data-hidden:hidden [&_ng-icon:not([class*='text-'])]:text-base",
|
|
22
|
-
);
|
|
19
|
+
classes(() => 'spartan-select-scroll-down-button sticky bottom-0 w-full data-hidden:hidden');
|
|
23
20
|
}
|
|
24
21
|
}
|
|
@@ -16,9 +16,6 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
16
16
|
})
|
|
17
17
|
export class HlmSelectScrollUp {
|
|
18
18
|
constructor() {
|
|
19
|
-
classes(
|
|
20
|
-
() =>
|
|
21
|
-
"bg-popover sticky top-0 z-10 flex w-full cursor-default items-center justify-center py-1 data-hidden:hidden [&_ng-icon:not([class*='text-'])]:text-base",
|
|
22
|
-
);
|
|
19
|
+
classes(() => 'spartan-select-scroll-up-button sticky top-0 w-full data-hidden:hidden');
|
|
23
20
|
}
|
|
24
21
|
}
|
|
@@ -5,12 +5,10 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmSelectSeparator],hlm-select-separator',
|
|
7
7
|
hostDirectives: [{ directive: BrnSelectSeparator, inputs: ['orientation'] }],
|
|
8
|
-
host: {
|
|
9
|
-
'data-slot': 'select-separator',
|
|
10
|
-
},
|
|
8
|
+
host: { 'data-slot': 'select-separator' },
|
|
11
9
|
})
|
|
12
10
|
export class HlmSelectSeparator {
|
|
13
11
|
constructor() {
|
|
14
|
-
classes(() => '
|
|
12
|
+
classes(() => 'spartan-select-separator pointer-events-none');
|
|
15
13
|
}
|
|
16
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BooleanInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
|
|
2
3
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
3
4
|
import { lucideChevronDown } from '@ng-icons/lucide';
|
|
4
5
|
import { BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';
|
|
@@ -15,13 +16,14 @@ import type { ClassValue } from 'clsx';
|
|
|
15
16
|
<button
|
|
16
17
|
brnSelectTrigger
|
|
17
18
|
brnFieldControlDescribedBy
|
|
19
|
+
[forceInvalid]="forceInvalid()"
|
|
18
20
|
[id]="buttonId()"
|
|
19
21
|
[class]="_computedClass()"
|
|
20
22
|
[attr.data-size]="size()"
|
|
21
23
|
data-slot="select-trigger"
|
|
22
24
|
>
|
|
23
25
|
<ng-content />
|
|
24
|
-
<ng-icon name="lucideChevronDown" class="
|
|
26
|
+
<ng-icon name="lucideChevronDown" class="spartan-select-trigger-icon ms-auto" />
|
|
25
27
|
</button>
|
|
26
28
|
`,
|
|
27
29
|
})
|
|
@@ -31,8 +33,7 @@ export class HlmSelectTrigger {
|
|
|
31
33
|
public readonly userClass = input<ClassValue>('', { alias: 'class' });
|
|
32
34
|
protected readonly _computedClass = computed(() =>
|
|
33
35
|
hlm(
|
|
34
|
-
|
|
35
|
-
'data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 data-[matches-spartan-invalid=true]:ring-3',
|
|
36
|
+
'spartan-select-trigger flex w-fit justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0',
|
|
36
37
|
this.userClass(),
|
|
37
38
|
),
|
|
38
39
|
);
|
|
@@ -40,4 +41,7 @@ export class HlmSelectTrigger {
|
|
|
40
41
|
public readonly buttonId = input<string>(`hlm-select-trigger-${HlmSelectTrigger._id++}`);
|
|
41
42
|
|
|
42
43
|
public readonly size = input<'default' | 'sm'>('default');
|
|
44
|
+
|
|
45
|
+
/** Whether to force the trigger into an invalid state. */
|
|
46
|
+
public readonly forceInvalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
43
47
|
}
|
|
@@ -4,6 +4,6 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
4
4
|
@Directive({ selector: '[hlmSelectValuesContent],hlm-select-values-content' })
|
|
5
5
|
export class HlmSelectValuesContent {
|
|
6
6
|
constructor() {
|
|
7
|
-
classes(() => 'flex
|
|
7
|
+
classes(() => 'spartan-select-values-content flex');
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -170,23 +170,15 @@
|
|
|
170
170
|
|
|
171
171
|
/* MARK: Select */
|
|
172
172
|
.spartan-select-trigger {
|
|
173
|
-
@apply bg-input/50 data-placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/30 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 gap-1.5 rounded-3xl border border-transparent px-3 py-2 text-sm transition-[color,box-shadow,background-color] focus-visible:ring-3 data-[matches-spartan-invalid=true]:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.spartan-select-value {
|
|
177
|
-
@apply flex flex-1 text-start;
|
|
173
|
+
@apply bg-input/50 data-placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/30 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 gap-1.5 rounded-3xl border border-transparent px-3 py-2 text-sm transition-[color,box-shadow,background-color] focus-visible:ring-3 data-[matches-spartan-invalid=true]:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:gap-1.5;
|
|
178
174
|
}
|
|
179
175
|
|
|
180
176
|
.spartan-select-trigger-icon {
|
|
181
|
-
@apply text-muted-foreground
|
|
177
|
+
@apply text-muted-foreground text-[calc(var(--spacing)*4)];
|
|
182
178
|
}
|
|
183
179
|
|
|
184
180
|
.spartan-select-content {
|
|
185
|
-
@apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.spartan-select-content-logical {
|
|
189
|
-
@apply data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2;
|
|
181
|
+
@apply bg-popover no-scrollbar text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/5 dark:ring-foreground/10 max-h-72 min-w-36 flex-col rounded-3xl shadow-lg ring-1 duration-100;
|
|
190
182
|
}
|
|
191
183
|
|
|
192
184
|
.spartan-select-label {
|
|
@@ -194,21 +186,17 @@
|
|
|
194
186
|
}
|
|
195
187
|
|
|
196
188
|
.spartan-select-item {
|
|
197
|
-
@apply
|
|
189
|
+
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2.5 rounded-2xl py-2 ps-3 pe-8 text-sm font-medium *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2;
|
|
198
190
|
}
|
|
199
191
|
|
|
200
192
|
.spartan-select-item-indicator {
|
|
201
|
-
@apply
|
|
193
|
+
@apply absolute end-2 flex items-center justify-center text-[calc(var(--spacing)*4)];
|
|
202
194
|
}
|
|
203
195
|
|
|
204
196
|
.spartan-select-group {
|
|
205
197
|
@apply scroll-my-1.5 p-1.5;
|
|
206
198
|
}
|
|
207
199
|
|
|
208
|
-
.spartan-select-item-text {
|
|
209
|
-
@apply flex flex-1 gap-2;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
200
|
.spartan-select-separator {
|
|
213
201
|
@apply bg-border -mx-1.5 my-1.5 h-px;
|
|
214
202
|
}
|
|
@@ -221,6 +209,14 @@
|
|
|
221
209
|
@apply bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_ng-icon:not([class*='text-'])]:text-[calc(var(--spacing)*4)];
|
|
222
210
|
}
|
|
223
211
|
|
|
212
|
+
.spartan-select-placeholder {
|
|
213
|
+
@apply gap-2 [&_ng-icon:not([class*='text-'])]:text-[calc(var(--spacing)*4)];
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.spartan-select-values-content {
|
|
217
|
+
@apply gap-2;
|
|
218
|
+
}
|
|
219
|
+
|
|
224
220
|
/* MARK: Native Select */
|
|
225
221
|
.spartan-native-select {
|
|
226
222
|
@apply bg-input/50 placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground focus-visible:border-ring focus-visible:ring-ring/30 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 h-9 w-full min-w-0 appearance-none rounded-3xl border border-transparent py-1 ps-3 pe-8 text-sm transition-[color,box-shadow,background-color] select-none focus-visible:ring-3 data-[matches-spartan-invalid=true]:ring-3 data-[size=sm]:h-8;
|
|
@@ -232,11 +228,7 @@
|
|
|
232
228
|
|
|
233
229
|
/* MARK: Combobox */
|
|
234
230
|
.spartan-combobox-content {
|
|
235
|
-
@apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/5 dark:ring-foreground/10
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.spartan-combobox-content-logical {
|
|
239
|
-
@apply data-[side=inline-start]:slide-in-from-end-2 data-[side=inline-end]:slide-in-from-start-2;
|
|
231
|
+
@apply bg-popover text-popover-foreground data-open:animate-in **:has-[[data-slot=input-group-control]:focus-visible]:border-input data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/5 dark:ring-foreground/10 **:data-[slot=input-group]:bg-input/50 **:data-[slot=input-group]:border-input/30 max-h-72 min-w-36 overflow-hidden rounded-3xl shadow-lg ring-1 duration-100 **:has-[[data-slot=input-group-control]:focus-visible]:ring-0 **:data-[slot=input-group]:m-1.5 **:data-[slot=input-group]:mb-0 **:data-[slot=input-group]:h-8 **:data-[slot=input-group]:shadow-none;
|
|
240
232
|
}
|
|
241
233
|
|
|
242
234
|
.spartan-combobox-label {
|
|
@@ -244,23 +236,19 @@
|
|
|
244
236
|
}
|
|
245
237
|
|
|
246
238
|
.spartan-combobox-item {
|
|
247
|
-
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2.5 rounded-2xl py-2 ps-3 pe-8 text-sm font-medium
|
|
239
|
+
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2.5 rounded-2xl py-2 ps-3 pe-8 text-sm font-medium;
|
|
248
240
|
}
|
|
249
241
|
|
|
250
242
|
.spartan-combobox-item-indicator {
|
|
251
|
-
@apply pointer-events-none absolute end-2 flex
|
|
243
|
+
@apply pointer-events-none absolute end-2 flex items-center justify-center text-[calc(var(--spacing)*4)];
|
|
252
244
|
}
|
|
253
245
|
|
|
254
246
|
.spartan-combobox-empty {
|
|
255
|
-
@apply text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex;
|
|
247
|
+
@apply text-muted-foreground hidden w-full items-center justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex;
|
|
256
248
|
}
|
|
257
249
|
|
|
258
250
|
.spartan-combobox-list {
|
|
259
|
-
@apply no-scrollbar max-h-[
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.spartan-combobox-item-text {
|
|
263
|
-
@apply flex flex-1 gap-2;
|
|
251
|
+
@apply no-scrollbar max-h-[calc(--spacing(72)---spacing(9))] scroll-py-1.5 overflow-y-auto p-1.5 data-empty:p-0;
|
|
264
252
|
}
|
|
265
253
|
|
|
266
254
|
.spartan-combobox-separator {
|
|
@@ -268,11 +256,11 @@
|
|
|
268
256
|
}
|
|
269
257
|
|
|
270
258
|
.spartan-combobox-trigger {
|
|
271
|
-
@apply
|
|
259
|
+
@apply data-placeholder:text-muted-foreground;
|
|
272
260
|
}
|
|
273
261
|
|
|
274
262
|
.spartan-combobox-trigger-icon {
|
|
275
|
-
@apply text-muted-foreground
|
|
263
|
+
@apply text-muted-foreground text-[calc(var(--spacing)*4)];
|
|
276
264
|
}
|
|
277
265
|
|
|
278
266
|
.spartan-combobox-chips {
|
|
@@ -284,7 +272,19 @@
|
|
|
284
272
|
}
|
|
285
273
|
|
|
286
274
|
.spartan-combobox-chip-remove {
|
|
287
|
-
@apply -
|
|
275
|
+
@apply -ms-1 opacity-50 hover:opacity-100;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.spartan-combobox-chip-input {
|
|
279
|
+
@apply placeholder:text-muted-foreground;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.spartan-combobox-placeholder {
|
|
283
|
+
@apply gap-2 [&_ng-icon:not([class*='text-'])]:text-[calc(var(--spacing)*4)];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.spartan-combobox-status {
|
|
287
|
+
@apply text-muted-foreground gap-2 py-2 text-sm;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
/* MARK: Input Group */
|
|
@@ -498,6 +498,39 @@
|
|
|
498
498
|
@apply absolute end-3 top-2.5;
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
+
/* MARK: Autocomplete */
|
|
502
|
+
.spartan-autocomplete-content {
|
|
503
|
+
@apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/5 dark:ring-foreground/10 max-h-72 min-w-36 overflow-hidden rounded-3xl shadow-lg ring-1 duration-100;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.spartan-autocomplete-label {
|
|
507
|
+
@apply text-muted-foreground px-3 py-2.5 text-xs;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.spartan-autocomplete-item {
|
|
511
|
+
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2.5 rounded-2xl py-2 ps-3 pe-8 text-sm font-medium;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.spartan-autocomplete-item-indicator {
|
|
515
|
+
@apply absolute end-2 flex items-center justify-center text-[calc(var(--spacing)*4)];
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.spartan-autocomplete-empty {
|
|
519
|
+
@apply text-muted-foreground hidden w-full items-center justify-center py-2 text-center text-sm group-data-empty/autocomplete-content:flex;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.spartan-autocomplete-list {
|
|
523
|
+
@apply no-scrollbar max-h-[calc(--spacing(72)---spacing(9))] scroll-py-1.5 p-1.5 data-empty:p-0;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.spartan-autocomplete-separator {
|
|
527
|
+
@apply bg-border -mx-1.5 my-1.5 h-px;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.spartan-autocomplete-status {
|
|
531
|
+
@apply text-muted-foreground gap-2 py-2 text-sm;
|
|
532
|
+
}
|
|
533
|
+
|
|
501
534
|
/* MARK: Avatar */
|
|
502
535
|
.spartan-avatar {
|
|
503
536
|
@apply size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6;
|
|
@@ -1054,7 +1087,7 @@
|
|
|
1054
1087
|
}
|
|
1055
1088
|
|
|
1056
1089
|
.spartan-sidebar-menu-button-variant-outline {
|
|
1057
|
-
@apply bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[
|
|
1090
|
+
@apply bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)];
|
|
1058
1091
|
}
|
|
1059
1092
|
|
|
1060
1093
|
.spartan-sidebar-menu-button-size-default {
|
|
@@ -70,6 +70,39 @@
|
|
|
70
70
|
@apply text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
/* MARK: Autocomplete */
|
|
74
|
+
.spartan-autocomplete-content {
|
|
75
|
+
@apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 max-h-72 min-w-36 overflow-hidden rounded-none shadow-md ring-1 duration-100;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.spartan-autocomplete-label {
|
|
79
|
+
@apply text-muted-foreground px-2 py-2 text-xs;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.spartan-autocomplete-item {
|
|
83
|
+
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-none py-2 ps-2 pe-8 text-xs;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.spartan-autocomplete-item-indicator {
|
|
87
|
+
@apply absolute end-2 flex items-center justify-center text-[calc(var(--spacing)*4)];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.spartan-autocomplete-empty {
|
|
91
|
+
@apply text-muted-foreground hidden w-full items-center justify-center py-2 text-center text-xs group-data-empty/autocomplete-content:flex;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.spartan-autocomplete-list {
|
|
95
|
+
@apply no-scrollbar max-h-[calc(--spacing(72)---spacing(9))] scroll-py-1 data-empty:p-0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.spartan-autocomplete-separator {
|
|
99
|
+
@apply bg-border -mx-1 h-px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.spartan-autocomplete-status {
|
|
103
|
+
@apply text-muted-foreground gap-2 py-2 text-xs;
|
|
104
|
+
}
|
|
105
|
+
|
|
73
106
|
/* MARK: Avatar */
|
|
74
107
|
.spartan-avatar {
|
|
75
108
|
@apply size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6;
|
|
@@ -273,11 +306,7 @@
|
|
|
273
306
|
|
|
274
307
|
/* MARK: Combobox */
|
|
275
308
|
.spartan-combobox-content {
|
|
276
|
-
@apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.spartan-combobox-content-logical {
|
|
280
|
-
@apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
|
|
309
|
+
@apply bg-popover text-popover-foreground data-open:animate-in **:has-[[data-slot=input-group-control]:focus-visible]:border-input data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 **:data-[slot=input-group]:bg-input/30 **:data-[slot=input-group]:border-input/30 max-h-72 min-w-36 overflow-hidden rounded-none shadow-md ring-1 duration-100 **:has-[[data-slot=input-group-control]:focus-visible]:ring-0 **:data-[slot=input-group]:m-1 **:data-[slot=input-group]:mb-0 **:data-[slot=input-group]:h-8 **:data-[slot=input-group]:shadow-none;
|
|
281
310
|
}
|
|
282
311
|
|
|
283
312
|
.spartan-combobox-label {
|
|
@@ -285,23 +314,19 @@
|
|
|
285
314
|
}
|
|
286
315
|
|
|
287
316
|
.spartan-combobox-item {
|
|
288
|
-
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-none py-2 ps-2 pe-8 text-xs
|
|
317
|
+
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-none py-2 ps-2 pe-8 text-xs;
|
|
289
318
|
}
|
|
290
319
|
|
|
291
320
|
.spartan-combobox-item-indicator {
|
|
292
|
-
@apply pointer-events-none absolute end-2 flex
|
|
321
|
+
@apply pointer-events-none absolute end-2 flex items-center justify-center text-[calc(var(--spacing)*4)];
|
|
293
322
|
}
|
|
294
323
|
|
|
295
324
|
.spartan-combobox-empty {
|
|
296
|
-
@apply text-muted-foreground hidden w-full justify-center py-2 text-center text-xs group-data-empty/combobox-content:flex;
|
|
325
|
+
@apply text-muted-foreground hidden w-full items-center justify-center py-2 text-center text-xs group-data-empty/combobox-content:flex;
|
|
297
326
|
}
|
|
298
327
|
|
|
299
328
|
.spartan-combobox-list {
|
|
300
|
-
@apply no-scrollbar max-h-[
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.spartan-combobox-item-text {
|
|
304
|
-
@apply flex flex-1 gap-2;
|
|
329
|
+
@apply no-scrollbar max-h-[calc(--spacing(72)---spacing(9))] scroll-py-1 overflow-y-auto data-empty:p-0;
|
|
305
330
|
}
|
|
306
331
|
|
|
307
332
|
.spartan-combobox-separator {
|
|
@@ -309,15 +334,15 @@
|
|
|
309
334
|
}
|
|
310
335
|
|
|
311
336
|
.spartan-combobox-trigger {
|
|
312
|
-
@apply
|
|
337
|
+
@apply data-placeholder:text-muted-foreground;
|
|
313
338
|
}
|
|
314
339
|
|
|
315
340
|
.spartan-combobox-trigger-icon {
|
|
316
|
-
@apply text-muted-foreground
|
|
341
|
+
@apply text-muted-foreground text-[calc(var(--spacing)*4)];
|
|
317
342
|
}
|
|
318
343
|
|
|
319
344
|
.spartan-combobox-chips {
|
|
320
|
-
@apply dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 flex min-h-8 flex-wrap items-center gap-1 rounded-none border bg-transparent bg-clip-padding px-2.5 py-1 text-xs transition-
|
|
345
|
+
@apply dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 flex min-h-8 flex-wrap items-center gap-1 rounded-none border bg-transparent bg-clip-padding px-2.5 py-1 text-xs shadow-xs transition-[color,box-shadow] focus-within:ring-1 has-data-[slot=combobox-chip]:px-1 data-[matches-spartan-invalid=true]:ring-1;
|
|
321
346
|
}
|
|
322
347
|
|
|
323
348
|
.spartan-combobox-chip {
|
|
@@ -325,7 +350,19 @@
|
|
|
325
350
|
}
|
|
326
351
|
|
|
327
352
|
.spartan-combobox-chip-remove {
|
|
328
|
-
@apply -
|
|
353
|
+
@apply -ms-1 opacity-50 hover:opacity-100;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.spartan-combobox-chip-input {
|
|
357
|
+
@apply placeholder:text-muted-foreground;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.spartan-combobox-placeholder {
|
|
361
|
+
@apply gap-2 [&_ng-icon:not([class*='text-'])]:text-[calc(var(--spacing)*4)];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.spartan-combobox-status {
|
|
365
|
+
@apply text-muted-foreground gap-2 py-2 text-xs;
|
|
329
366
|
}
|
|
330
367
|
|
|
331
368
|
/* MARK: Command */
|
|
@@ -936,23 +973,15 @@
|
|
|
936
973
|
|
|
937
974
|
/* MARK: Select */
|
|
938
975
|
.spartan-select-trigger {
|
|
939
|
-
@apply border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 ps-2.5 pe-2 text-xs transition-colors
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
.spartan-select-value {
|
|
943
|
-
@apply flex flex-1 text-start;
|
|
976
|
+
@apply border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 data-[matches-spartan-invalid=true]:ring-destructive/20 dark:data-[matches-spartan-invalid=true]:ring-destructive/40 data-[matches-spartan-invalid=true]:border-destructive dark:data-[matches-spartan-invalid=true]:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 ps-2.5 pe-2 text-xs transition-colors focus-visible:ring-1 data-[matches-spartan-invalid=true]:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:gap-1.5;
|
|
944
977
|
}
|
|
945
978
|
|
|
946
979
|
.spartan-select-trigger-icon {
|
|
947
|
-
@apply text-muted-foreground
|
|
980
|
+
@apply text-muted-foreground text-[calc(var(--spacing)*4)];
|
|
948
981
|
}
|
|
949
982
|
|
|
950
983
|
.spartan-select-content {
|
|
951
|
-
@apply bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
.spartan-select-content-logical {
|
|
955
|
-
@apply data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2;
|
|
984
|
+
@apply bg-popover no-scrollbar text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 max-h-72 min-w-36 flex-col rounded-none shadow-md ring-1 duration-100;
|
|
956
985
|
}
|
|
957
986
|
|
|
958
987
|
.spartan-select-label {
|
|
@@ -960,21 +989,17 @@
|
|
|
960
989
|
}
|
|
961
990
|
|
|
962
991
|
.spartan-select-item {
|
|
963
|
-
@apply
|
|
992
|
+
@apply data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-none py-2 ps-2 pe-8 text-xs *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2;
|
|
964
993
|
}
|
|
965
994
|
|
|
966
995
|
.spartan-select-item-indicator {
|
|
967
|
-
@apply
|
|
996
|
+
@apply absolute end-2 flex items-center justify-center text-[calc(var(--spacing)*4)];
|
|
968
997
|
}
|
|
969
998
|
|
|
970
999
|
.spartan-select-group {
|
|
971
1000
|
@apply scroll-my-1;
|
|
972
1001
|
}
|
|
973
1002
|
|
|
974
|
-
.spartan-select-item-text {
|
|
975
|
-
@apply flex flex-1 gap-2;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
1003
|
.spartan-select-separator {
|
|
979
1004
|
@apply bg-border -mx-1 h-px;
|
|
980
1005
|
}
|
|
@@ -987,6 +1012,14 @@
|
|
|
987
1012
|
@apply bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_ng-icon:not([class*='text-'])]:text-[calc(var(--spacing)*4)];
|
|
988
1013
|
}
|
|
989
1014
|
|
|
1015
|
+
.spartan-select-placeholder {
|
|
1016
|
+
@apply gap-2 [&_ng-icon:not([class*='text-'])]:text-[calc(var(--spacing)*4)];
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.spartan-select-values-content {
|
|
1020
|
+
@apply gap-2;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
990
1023
|
/* MARK: Separator */
|
|
991
1024
|
.spartan-separator {
|
|
992
1025
|
@apply bg-border shrink-0;
|
|
@@ -1095,7 +1128,7 @@
|
|
|
1095
1128
|
}
|
|
1096
1129
|
|
|
1097
1130
|
.spartan-sidebar-menu-button-variant-outline {
|
|
1098
|
-
@apply bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[
|
|
1131
|
+
@apply bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)];
|
|
1099
1132
|
}
|
|
1100
1133
|
|
|
1101
1134
|
.spartan-sidebar-menu-button-size-default {
|