ngx-strata 0.4.2 → 0.4.3-beta.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.
Files changed (34) hide show
  1. package/assets/styles/base.scss +24 -4
  2. package/assets/styles/components/accordion.scss +76 -17
  3. package/assets/styles/components/action-menu.scss +12 -7
  4. package/assets/styles/components/alert.scss +8 -7
  5. package/assets/styles/components/button.scss +14 -2
  6. package/assets/styles/components/card.scss +32 -37
  7. package/assets/styles/components/checkbox.scss +5 -6
  8. package/assets/styles/components/file-upload.scss +5 -2
  9. package/assets/styles/components/input-field.scss +7 -1
  10. package/assets/styles/components/item.scss +3 -1
  11. package/assets/styles/components/modal.scss +7 -4
  12. package/assets/styles/components/notification.scss +8 -14
  13. package/assets/styles/components/otp.scss +1 -1
  14. package/assets/styles/components/pagination.scss +1 -1
  15. package/assets/styles/components/progress.scss +4 -2
  16. package/assets/styles/components/radio.scss +4 -4
  17. package/assets/styles/components/segmented-control.scss +8 -4
  18. package/assets/styles/components/select.scss +31 -11
  19. package/assets/styles/components/sidemenu.scss +4 -6
  20. package/assets/styles/components/slider.scss +3 -3
  21. package/assets/styles/components/table.scss +5 -0
  22. package/assets/styles/components/tabs.scss +7 -4
  23. package/assets/styles/components/tag.scss +8 -6
  24. package/assets/styles/components/toggle.scss +5 -6
  25. package/assets/styles/components/tooltip.scss +3 -7
  26. package/assets/styles/focus-outline.scss +1 -1
  27. package/assets/styles/scrollbar.scss +3 -3
  28. package/assets/styles/shadows.scss +11 -3
  29. package/assets/styles/typography.scss +4 -0
  30. package/dist/strata/strata.css +1 -1
  31. package/fesm2022/ngx-strata.mjs +36 -8
  32. package/fesm2022/ngx-strata.mjs.map +1 -1
  33. package/package.json +1 -1
  34. package/types/ngx-strata.d.ts +11 -3
@@ -541,7 +541,15 @@ class StrataAccordionItemComponent {
541
541
  ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
542
542
  open = model(false, /* @ts-ignore */
543
543
  ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
544
+ variant = input('standalone', /* @ts-ignore */
545
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
544
546
  toggled = output();
547
+ get isFlush() {
548
+ return this.variant() === 'flush';
549
+ }
550
+ get isStandalone() {
551
+ return this.variant() === 'standalone';
552
+ }
545
553
  constructor() {
546
554
  let firstRun = true;
547
555
  effect(() => {
@@ -560,12 +568,18 @@ class StrataAccordionItemComponent {
560
568
  return this.open();
561
569
  }
562
570
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
563
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataAccordionItemComponent, isStandalone: true, selector: "st-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", toggled: "toggled" }, host: { properties: { "attr.open": "this.isOpen" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"accordion-header\"\n [id]=\"headerId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"toggle()\"\n>\n <span>{{ title() }}</span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z\"\n ></path>\n </svg>\n</button>\n\n<div\n class=\"accordion-content\"\n [id]=\"contentId\"\n role=\"region\"\n [attr.aria-labelledby]=\"headerId\"\n>\n <ng-content></ng-content>\n</div>\n" });
571
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: StrataAccordionItemComponent, isStandalone: true, selector: "st-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", toggled: "toggled" }, host: { properties: { "class.flush": "this.isFlush", "class.standalone": "this.isStandalone", "attr.open": "this.isOpen" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"accordion-header\"\n [id]=\"headerId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"toggle()\"\n>\n <span>{{ title() }}</span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z\"\n ></path>\n </svg>\n</button>\n\n<div\n class=\"accordion-content\"\n [id]=\"contentId\"\n role=\"region\"\n [attr.aria-labelledby]=\"headerId\"\n>\n <ng-content></ng-content>\n</div>\n" });
564
572
  }
565
573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionItemComponent, decorators: [{
566
574
  type: Component,
567
575
  args: [{ selector: 'st-accordion-item', imports: [], template: "<button\n type=\"button\"\n class=\"accordion-header\"\n [id]=\"headerId\"\n [attr.aria-expanded]=\"open()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"toggle()\"\n>\n <span>{{ title() }}</span>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z\"\n ></path>\n </svg>\n</button>\n\n<div\n class=\"accordion-content\"\n [id]=\"contentId\"\n role=\"region\"\n [attr.aria-labelledby]=\"headerId\"\n>\n <ng-content></ng-content>\n</div>\n" }]
568
- }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], toggled: [{ type: i0.Output, args: ["toggled"] }], isOpen: [{
576
+ }], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], toggled: [{ type: i0.Output, args: ["toggled"] }], isFlush: [{
577
+ type: HostBinding,
578
+ args: ['class.flush']
579
+ }], isStandalone: [{
580
+ type: HostBinding,
581
+ args: ['class.standalone']
582
+ }], isOpen: [{
569
583
  type: HostBinding,
570
584
  args: ['attr.open']
571
585
  }] } });
@@ -575,6 +589,14 @@ class StrataAccordionGroupComponent {
575
589
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
576
590
  allowMultipleOpen = input(false, /* @ts-ignore */
577
591
  ...(ngDevMode ? [{ debugName: "allowMultipleOpen" }] : /* istanbul ignore next */ []));
592
+ variant = input('standalone', /* @ts-ignore */
593
+ ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
594
+ get isFlush() {
595
+ return this.variant() === 'flush';
596
+ }
597
+ get isStandalone() {
598
+ return this.variant() === 'standalone';
599
+ }
578
600
  constructor() {
579
601
  effect((onCleanup) => {
580
602
  const subs = this.items().map((item) => item.toggled.subscribe((open) => {
@@ -595,12 +617,18 @@ class StrataAccordionGroupComponent {
595
617
  });
596
618
  }
597
619
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
598
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataAccordionGroupComponent, isStandalone: true, selector: "st-accordion-group", inputs: { allowMultipleOpen: { classPropertyName: "allowMultipleOpen", publicName: "allowMultipleOpen", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "items", predicate: StrataAccordionItemComponent, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n" });
620
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataAccordionGroupComponent, isStandalone: true, selector: "st-accordion-group", inputs: { allowMultipleOpen: { classPropertyName: "allowMultipleOpen", publicName: "allowMultipleOpen", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.flush": "this.isFlush", "class.standalone": "this.isStandalone" } }, queries: [{ propertyName: "items", predicate: StrataAccordionItemComponent, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n" });
599
621
  }
600
622
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataAccordionGroupComponent, decorators: [{
601
623
  type: Component,
602
624
  args: [{ selector: 'st-accordion-group', imports: [], template: "<ng-content></ng-content>\n" }]
603
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataAccordionItemComponent), { isSignal: true }] }], allowMultipleOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowMultipleOpen", required: false }] }] } });
625
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => StrataAccordionItemComponent), { isSignal: true }] }], allowMultipleOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowMultipleOpen", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], isFlush: [{
626
+ type: HostBinding,
627
+ args: ['class.flush']
628
+ }], isStandalone: [{
629
+ type: HostBinding,
630
+ args: ['class.standalone']
631
+ }] } });
604
632
 
605
633
  let nextUniqueId = 0;
606
634
  class StrataCheckboxComponent {
@@ -774,11 +802,11 @@ class StrataActionMenuItemComponent {
774
802
  this.toggle()?.nativeElement.click();
775
803
  }
776
804
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
777
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataActionMenuItemComponent, isStandalone: true, selector: "st-action-menu-item", inputs: { closeMenuOnClick: { classPropertyName: "closeMenuOnClick", publicName: "closeMenuOnClick", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClicked: "menuItemClicked" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.active": "this.isActive" } }, queries: [{ propertyName: "checkbox", first: true, predicate: StrataCheckboxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "toggle", first: true, predicate: StrataToggleComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{height:48px}\n"] });
805
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: StrataActionMenuItemComponent, isStandalone: true, selector: "st-action-menu-item", inputs: { closeMenuOnClick: { classPropertyName: "closeMenuOnClick", publicName: "closeMenuOnClick", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClicked: "menuItemClicked" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class.active": "this.isActive" } }, queries: [{ propertyName: "checkbox", first: true, predicate: StrataCheckboxComponent, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "toggle", first: true, predicate: StrataToggleComponent, descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{min-height:var(--st-interactive-element-height-md);height:fit-content}\n"] });
778
806
  }
779
807
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataActionMenuItemComponent, decorators: [{
780
808
  type: Component,
781
- args: [{ selector: 'st-action-menu-item', imports: [], template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{height:48px}\n"] }]
809
+ args: [{ selector: 'st-action-menu-item', imports: [], template: "<span class=\"item-start\">\n <ng-content select=\"[area='start']\"></ng-content\n></span>\n<span class=\"item-default\"> <ng-content></ng-content></span>\n<span class=\"item-end\">\n <ng-content select=\"[area='end']\"></ng-content>\n</span>\n", styles: [":host{min-height:var(--st-interactive-element-height-md);height:fit-content}\n"] }]
782
810
  }], propDecorators: { checkbox: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataCheckboxComponent), { ...{ read: ElementRef }, isSignal: true }] }], toggle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StrataToggleComponent), { ...{ read: ElementRef }, isSignal: true }] }], closeMenuOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeMenuOnClick", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], isActive: [{
783
811
  type: HostBinding,
784
812
  args: ['class.active']
@@ -2290,11 +2318,11 @@ class StrataKbdComponent {
2290
2318
  }, /* @ts-ignore */
2291
2319
  ...(ngDevMode ? [{ debugName: "resolvedKeys" }] : /* istanbul ignore next */ []));
2292
2320
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataKbdComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2293
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataKbdComponent, isStandalone: true, selector: "st-kbd", inputs: { keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@for (key of resolvedKeys(); track key) {\n<kbd class=\"st-kbd-key st-mono-s\">{{ key }}</kbd>\n}", styles: [":host{--st-kbd-bg: transparent;--st-kbd-border: var(--st-color-text-secondary);--st-kbd-text: var(--st-color-text-secondary);display:inline-flex;align-items:center;gap:4px}:host .st-kbd-key{font-style:normal;line-height:1;padding:3px 6px;border-radius:var(--st-border-radius-sm);background:var(--st-kbd-bg);border:1px solid var(--st-kbd-border);color:var(--st-kbd-text);white-space:nowrap;-webkit-user-select:none;user-select:none}\n"] });
2321
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: StrataKbdComponent, isStandalone: true, selector: "st-kbd", inputs: { keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@for (key of resolvedKeys(); track key) {\n<kbd class=\"st-kbd-key st-mono-s\">{{ key }}</kbd>\n}", styles: [":host{--st-kbd-bg: transparent;--st-kbd-border: var(--st-color-text-secondary);--st-kbd-text: var(--st-color-text-secondary);--st-kbd-border-radius: var(--st-border-radius-sm);display:inline-flex;align-items:center;gap:4px}:host .st-kbd-key{font-style:normal;line-height:1;padding:3px 6px;border-radius:var(--st-kbd-border-radius);background:var(--st-kbd-bg);border:1px solid var(--st-kbd-border);color:var(--st-kbd-text);white-space:nowrap;-webkit-user-select:none;user-select:none}\n"] });
2294
2322
  }
2295
2323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: StrataKbdComponent, decorators: [{
2296
2324
  type: Component,
2297
- args: [{ selector: 'st-kbd', imports: [], template: "@for (key of resolvedKeys(); track key) {\n<kbd class=\"st-kbd-key st-mono-s\">{{ key }}</kbd>\n}", styles: [":host{--st-kbd-bg: transparent;--st-kbd-border: var(--st-color-text-secondary);--st-kbd-text: var(--st-color-text-secondary);display:inline-flex;align-items:center;gap:4px}:host .st-kbd-key{font-style:normal;line-height:1;padding:3px 6px;border-radius:var(--st-border-radius-sm);background:var(--st-kbd-bg);border:1px solid var(--st-kbd-border);color:var(--st-kbd-text);white-space:nowrap;-webkit-user-select:none;user-select:none}\n"] }]
2325
+ args: [{ selector: 'st-kbd', imports: [], template: "@for (key of resolvedKeys(); track key) {\n<kbd class=\"st-kbd-key st-mono-s\">{{ key }}</kbd>\n}", styles: [":host{--st-kbd-bg: transparent;--st-kbd-border: var(--st-color-text-secondary);--st-kbd-text: var(--st-color-text-secondary);--st-kbd-border-radius: var(--st-border-radius-sm);display:inline-flex;align-items:center;gap:4px}:host .st-kbd-key{font-style:normal;line-height:1;padding:3px 6px;border-radius:var(--st-kbd-border-radius);background:var(--st-kbd-bg);border:1px solid var(--st-kbd-border);color:var(--st-kbd-text);white-space:nowrap;-webkit-user-select:none;user-select:none}\n"] }]
2298
2326
  }], propDecorators: { keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }] } });
2299
2327
 
2300
2328
  class StrataThemeDirective {