@semantic-components/ui 0.7.0 → 0.9.0
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.
|
@@ -10605,26 +10605,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
10605
10605
|
class ScMenuCheckboxItem {
|
|
10606
10606
|
class = input('');
|
|
10607
10607
|
classes = computed(() => cn('relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', this.class()));
|
|
10608
|
+
disabled = input(false, {
|
|
10609
|
+
transform: booleanAttribute,
|
|
10610
|
+
});
|
|
10611
|
+
scChecked = model();
|
|
10612
|
+
scTriggered = output();
|
|
10613
|
+
toggle() {
|
|
10614
|
+
this.scChecked.update((v) => !v);
|
|
10615
|
+
}
|
|
10608
10616
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ScMenuCheckboxItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10609
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
10610
|
-
|
|
10611
|
-
<
|
|
10612
|
-
|
|
10613
|
-
|
|
10617
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: ScMenuCheckboxItem, isStandalone: true, selector: "button[sc-menu-checkbox-item]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, scChecked: { classPropertyName: "scChecked", publicName: "scChecked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { scChecked: "scCheckedChange", scTriggered: "scTriggered" }, host: { listeners: { "click": "toggle()" }, properties: { "class": "classes()" } }, hostDirectives: [{ directive: i1$5.CdkMenuItemCheckbox, inputs: ["cdkMenuItemChecked", "scChecked"], outputs: ["cdkMenuItemTriggered", "scTriggered"] }], ngImport: i0, template: `
|
|
10618
|
+
@if (scChecked()) {
|
|
10619
|
+
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
|
10620
|
+
<svg-check-icon class="size-4" />
|
|
10621
|
+
</span>
|
|
10622
|
+
}
|
|
10614
10623
|
<ng-content />
|
|
10615
10624
|
`, isInline: true, styles: [""], dependencies: [{ kind: "component", type: SvgCheckIcon, selector: "svg-check-icon", inputs: ["class", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
10616
10625
|
}
|
|
10617
10626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ScMenuCheckboxItem, decorators: [{
|
|
10618
10627
|
type: Component,
|
|
10619
10628
|
args: [{ selector: 'button[sc-menu-checkbox-item]', imports: [SvgCheckIcon], template: `
|
|
10620
|
-
|
|
10621
|
-
<
|
|
10622
|
-
|
|
10623
|
-
|
|
10629
|
+
@if (scChecked()) {
|
|
10630
|
+
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
|
10631
|
+
<svg-check-icon class="size-4" />
|
|
10632
|
+
</span>
|
|
10633
|
+
}
|
|
10624
10634
|
<ng-content />
|
|
10625
10635
|
`, host: {
|
|
10626
10636
|
'[class]': 'classes()',
|
|
10627
|
-
|
|
10637
|
+
'(click)': 'toggle()',
|
|
10638
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
10639
|
+
{
|
|
10640
|
+
directive: CdkMenuItemCheckbox,
|
|
10641
|
+
inputs: ['cdkMenuItemChecked: scChecked'],
|
|
10642
|
+
outputs: ['cdkMenuItemTriggered: scTriggered'],
|
|
10643
|
+
},
|
|
10644
|
+
] }]
|
|
10628
10645
|
}] });
|
|
10629
10646
|
|
|
10630
10647
|
class ScMenuRadioGroup {
|