@semantic-components/ui 0.6.0 → 0.8.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.
package/README.md CHANGED
@@ -1,13 +1 @@
1
- # ui
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Running unit tests
6
-
7
- Run `nx test ui` to execute the unit tests.
8
-
9
- ## components
10
-
11
- ### dropdown
12
-
13
- https://medium.com/codeshakeio/build-a-dropdown-component-using-angular-cdk-fa45455e6a73
1
+ # @semantic-components/ui
@@ -10605,26 +10605,38 @@ 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
+ scChecked = input(false, {
10609
+ transform: booleanAttribute,
10610
+ });
10611
+ scTriggered = output();
10608
10612
  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.1.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 } }, host: { properties: { "class": "classes()" } }, hostDirectives: [{ directive: i1$5.CdkMenuItemCheckbox }], ngImport: i0, template: `
10610
- <span class="absolute left-2 flex size-3.5 items-center justify-center">
10611
- <svg-check-icon class="size-4" />
10612
- </span>
10613
-
10613
+ 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 }, scChecked: { classPropertyName: "scChecked", publicName: "scChecked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { scTriggered: "scTriggered" }, host: { properties: { "class": "classes()" } }, hostDirectives: [{ directive: i1$5.CdkMenuItemCheckbox, inputs: ["cdkMenuItemChecked", "scChecked"], outputs: ["cdkMenuItemTriggered", "scTriggered"] }], ngImport: i0, template: `
10614
+ @if (scChecked()) {
10615
+ <span class="absolute left-2 flex size-3.5 items-center justify-center">
10616
+ <svg-check-icon class="size-4" />
10617
+ </span>
10618
+ }
10614
10619
  <ng-content />
10615
10620
  `, isInline: true, styles: [""], dependencies: [{ kind: "component", type: SvgCheckIcon, selector: "svg-check-icon", inputs: ["class", "svgClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
10616
10621
  }
10617
10622
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ScMenuCheckboxItem, decorators: [{
10618
10623
  type: Component,
10619
10624
  args: [{ selector: 'button[sc-menu-checkbox-item]', imports: [SvgCheckIcon], template: `
10620
- <span class="absolute left-2 flex size-3.5 items-center justify-center">
10621
- <svg-check-icon class="size-4" />
10622
- </span>
10623
-
10625
+ @if (scChecked()) {
10626
+ <span class="absolute left-2 flex size-3.5 items-center justify-center">
10627
+ <svg-check-icon class="size-4" />
10628
+ </span>
10629
+ }
10624
10630
  <ng-content />
10625
10631
  `, host: {
10626
10632
  '[class]': 'classes()',
10627
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [CdkMenuItemCheckbox] }]
10633
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
10634
+ {
10635
+ directive: CdkMenuItemCheckbox,
10636
+ inputs: ['cdkMenuItemChecked: scChecked'],
10637
+ outputs: ['cdkMenuItemTriggered: scTriggered'],
10638
+ },
10639
+ ] }]
10628
10640
  }] });
10629
10641
 
10630
10642
  class ScMenuRadioGroup {