@spartan-ng/cli 0.0.1-alpha.703 → 0.0.1-alpha.705
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/README.md +118 -6
- package/package.json +2 -2
- 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 +66 -33
- package/src/generators/ui/style-lyra.css +67 -34
- package/src/generators/ui/style-maia.css +67 -34
- package/src/generators/ui/style-mira.css +67 -34
- package/src/generators/ui/style-nova.css +67 -34
- package/src/generators/ui/style-vega.css +67 -34
- 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/registry/schema.d.ts +33 -33
- package/src/utils/config.d.ts +6 -6
|
@@ -11,7 +11,7 @@ export class HlmComboboxPlaceholder {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
classes(
|
|
13
13
|
() =>
|
|
14
|
-
|
|
14
|
+
'spartan-combobox-placeholder flex items-center data-hidden:hidden [&_ng-icon]:pointer-events-none [&_ng-icon]:shrink-0',
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -5,12 +5,10 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmComboboxSeparator]',
|
|
7
7
|
hostDirectives: [{ directive: BrnComboboxSeparator, inputs: ['orientation'] }],
|
|
8
|
-
host: {
|
|
9
|
-
'data-slot': 'combobox-separator',
|
|
10
|
-
},
|
|
8
|
+
host: { 'data-slot': 'combobox-separator' },
|
|
11
9
|
})
|
|
12
10
|
export class HlmComboboxSeparator {
|
|
13
11
|
constructor() {
|
|
14
|
-
classes(() => '
|
|
12
|
+
classes(() => 'spartan-combobox-separator');
|
|
15
13
|
}
|
|
16
14
|
}
|
|
@@ -5,12 +5,10 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmComboboxStatus],hlm-combobox-status',
|
|
7
7
|
hostDirectives: [BrnComboboxStatus],
|
|
8
|
-
host: {
|
|
9
|
-
'data-slot': 'combobox-status',
|
|
10
|
-
},
|
|
8
|
+
host: { 'data-slot': 'combobox-status' },
|
|
11
9
|
})
|
|
12
10
|
export class HlmComboboxStatus {
|
|
13
11
|
constructor() {
|
|
14
|
-
classes(() => '
|
|
12
|
+
classes(() => 'spartan-combobox-status flex w-full items-center justify-center text-center');
|
|
15
13
|
}
|
|
16
14
|
}
|
|
@@ -32,7 +32,7 @@ import type { ClassValue } from 'clsx';
|
|
|
32
32
|
[variant]="variant()"
|
|
33
33
|
>
|
|
34
34
|
<ng-content />
|
|
35
|
-
<ng-icon name="lucideChevronDown" />
|
|
35
|
+
<ng-icon name="lucideChevronDown" class="spartan-combobox-trigger-icon" />
|
|
36
36
|
</button>
|
|
37
37
|
`,
|
|
38
38
|
})
|
|
@@ -42,7 +42,7 @@ export class HlmComboboxTrigger {
|
|
|
42
42
|
public readonly userClass = input<ClassValue>('', {
|
|
43
43
|
alias: 'class',
|
|
44
44
|
});
|
|
45
|
-
protected readonly _computedClass = computed(() => hlm('
|
|
45
|
+
protected readonly _computedClass = computed(() => hlm('spartan-combobox-trigger', this.userClass()));
|
|
46
46
|
|
|
47
47
|
public readonly buttonId = input<string>(`hlm-combobox-trigger-${HlmComboboxTrigger._id++}`);
|
|
48
48
|
|
|
@@ -5,6 +5,7 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmComboboxValue],hlm-combobox-value',
|
|
7
7
|
hostDirectives: [{ directive: BrnComboboxValue, inputs: ['placeholder'] }],
|
|
8
|
+
host: { 'data-slot': 'combobox-value' },
|
|
8
9
|
})
|
|
9
10
|
export class HlmComboboxValue {
|
|
10
11
|
constructor() {
|
|
@@ -30,9 +30,6 @@ export class HlmSelectContent {
|
|
|
30
30
|
public readonly showScroll = input<boolean, BooleanInput>(false, { transform: booleanAttribute });
|
|
31
31
|
|
|
32
32
|
constructor() {
|
|
33
|
-
classes(
|
|
34
|
-
() =>
|
|
35
|
-
'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 relative isolate flex max-h-72 w-(--brn-select-width) min-w-36 flex-col overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100',
|
|
36
|
-
);
|
|
33
|
+
classes(() => 'spartan-select-content relative flex w-(--brn-select-width) overflow-x-hidden overflow-y-auto');
|
|
37
34
|
}
|
|
38
35
|
}
|
|
@@ -5,12 +5,10 @@ import { classes } from '<%- importAlias %>/utils';
|
|
|
5
5
|
@Directive({
|
|
6
6
|
selector: '[hlmSelectGroup],hlm-select-group',
|
|
7
7
|
hostDirectives: [{ directive: BrnSelectGroup }],
|
|
8
|
-
host: {
|
|
9
|
-
'data-slot': 'select-group',
|
|
10
|
-
},
|
|
8
|
+
host: { 'data-slot': 'select-group' },
|
|
11
9
|
})
|
|
12
10
|
export class HlmSelectGroup {
|
|
13
11
|
constructor() {
|
|
14
|
-
classes(() => '
|
|
12
|
+
classes(() => 'spartan-select-group');
|
|
15
13
|
}
|
|
16
14
|
}
|
|
@@ -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;
|