@kirbydesign/designsystem 9.6.0 → 9.7.1
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/accordion/accordion-item.component.d.ts +2 -1
- package/button/button.component.d.ts +1 -1
- package/checkbox/checkbox.component.d.ts +11 -4
- package/esm2022/accordion/accordion-item.component.mjs +6 -3
- package/esm2022/button/button.component.mjs +3 -3
- package/esm2022/calendar/calendar.component.mjs +2 -2
- package/esm2022/card/card-as-button/card-as-button.directive.mjs +3 -1
- package/esm2022/card/card.component.mjs +2 -2
- package/esm2022/checkbox/checkbox.component.mjs +36 -10
- package/esm2022/dropdown/dropdown.component.mjs +1 -1
- package/esm2022/icon/kirby-icon-settings.mjs +120 -113
- package/esm2022/item/item.component.mjs +17 -4
- package/esm2022/list/list-item/list-item.component.mjs +2 -2
- package/esm2022/list/list.component.mjs +2 -2
- package/esm2022/menu/menu.component.mjs +2 -2
- package/esm2022/modal/modal/action-sheet/action-sheet.component.mjs +2 -2
- package/esm2022/modal/modal/alert/alert.component.mjs +2 -2
- package/esm2022/modal/modal/footer/modal-footer.component.mjs +3 -3
- package/esm2022/modal/modal-wrapper/modal-wrapper.component.mjs +2 -2
- package/esm2022/modal/v2/footer/footer.component.mjs +2 -2
- package/esm2022/modal/v2/modal/modal.component.mjs +2 -2
- package/esm2022/modal/v2/wrapper/wrapper.component.mjs +2 -2
- package/esm2022/page/page-footer/page-footer.component.mjs +2 -2
- package/esm2022/page/page.component.mjs +2 -2
- package/esm2022/radio/radio.component.mjs +35 -9
- package/esm2022/range/range.component.mjs +3 -3
- package/esm2022/router-outlet/router-outlet.component.mjs +1 -1
- package/esm2022/router-outlet/router-outlet.module.mjs +2 -2
- package/esm2022/shared/controls/label-helpers.mjs +23 -0
- package/esm2022/shared/public_api.mjs +2 -1
- package/esm2022/slide/slides.component.mjs +1 -1
- package/esm2022/tabs/tab-button/tab-button.component.mjs +2 -2
- package/esm2022/toggle/toggle.component.mjs +20 -7
- package/fesm2022/kirbydesign-designsystem-accordion.mjs +5 -2
- package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-button.mjs +2 -2
- package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +1 -1
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +4 -2
- package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +35 -9
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +1 -1
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-icon.mjs +119 -112
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item.mjs +16 -3
- package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-list.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-menu.mjs +1 -1
- package/fesm2022/kirbydesign-designsystem-menu.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-modal-v2.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-modal-v2.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-modal.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-radio.mjs +34 -8
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +2 -2
- package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +2 -2
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared.mjs +24 -1
- package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +2 -2
- package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +18 -5
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/icons/svg/basket.svg +1 -0
- package/icons/svg/contract.svg +1 -0
- package/icons/svg/drag-drop.svg +1 -0
- package/icons/svg/expand.svg +1 -0
- package/icons/svg/flower.svg +1 -0
- package/icons/svg/house.svg +1 -0
- package/icons/svg/tractor.svg +1 -0
- package/item/item.component.d.ts +4 -1
- package/package.json +2 -2
- package/radio/radio.component.d.ts +11 -4
- package/scss/base/_design-tokens.scss +1 -0
- package/scss/themes/design-tokens.scss +1 -0
- package/shared/controls/label-helpers.d.ts +3 -0
- package/shared/public_api.d.ts +1 -0
- package/toggle/toggle.component.d.ts +8 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-slide.mjs","sources":["../../slide/src/slide.directive.ts","../../slide/src/slides.component.ts","../../slide/src/slides.component.html","../../slide/src/slide-stretch-height.directive.ts","../../slide/src/slide.module.ts","../../slide/src/kirbydesign-designsystem-slide.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[kirbySlide]',\n})\nexport class SlideDirective {}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { Swiper, SwiperOptions } from 'swiper';\nimport { register } from 'swiper/element/bundle';\nimport {\n DesignTokenHelper,\n PlatformService,\n UniqueIdGenerator,\n} from '@kirbydesign/designsystem/helpers';\nimport { SlideDirective } from './slide.directive';\n\n// Swiper is not an Angular library,\n// so we need to use their web components and register them manually.\n// https://swiperjs.com/element\nregister();\n\nexport type SelectedSlide = {\n slide: any;\n index: number;\n};\n\nexport type KirbySwiperOptions = SwiperOptions;\ntype SwiperContainer = HTMLElement & { initialize: () => void; swiper: Swiper };\n\n@Component({\n selector: 'kirby-slides',\n templateUrl: './slides.component.html',\n styleUrls: ['./slides.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SlidesComponent implements OnInit, AfterViewInit, OnChanges {\n constructor(private platform: PlatformService, private cdr: ChangeDetectorRef) {}\n\n @ViewChild('swiperContainer') swiperContainer: ElementRef<SwiperContainer>;\n @ContentChild(SlideDirective, { static: true, read: TemplateRef })\n public slideTemplate: TemplateRef<SlideDirective>;\n\n @Input() slidesOptions?: KirbySwiperOptions;\n @Input() title: string;\n @Input() slides: unknown[];\n\n @Input() showNavigation: boolean = true;\n\n @Output() slideChange = new EventEmitter<SelectedSlide>();\n\n _paginationId = UniqueIdGenerator.scopedTo('pagination').next();\n _prevButtonId = UniqueIdGenerator.scopedTo('swiper-button-prev').next();\n _nextButtonId = UniqueIdGenerator.scopedTo('swiper-button-next').next();\n _isTouch: boolean;\n\n ngOnInit() {\n this._isTouch = this.platform.isTouch();\n }\n\n ngAfterViewInit() {\n const defaultConfig = this.showNavigation\n ? this.getDefaultConfig()\n : this.getNoControlsConfig();\n\n const config = { ...defaultConfig, ...this.slidesOptions };\n\n Object.assign(this.swiperContainer.nativeElement, config);\n\n this.swiperContainer.nativeElement.initialize();\n }\n\n public slideTo(index: number) {\n this.swiperContainer.nativeElement.swiper.slideTo(index);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.slides?.firstChange === false) {\n this.cdr.detectChanges();\n this.swiperContainer.nativeElement.swiper.updateSlides();\n }\n }\n\n private getDefaultConfig(): KirbySwiperOptions {\n const desktopBreakpoint = parseInt(DesignTokenHelper.breakpoints.medium);\n const spaceBetween = parseInt(DesignTokenHelper.size('s'));\n const transitionDuration = parseInt(DesignTokenHelper.transitionDuration('long'));\n return {\n centeredSlides: true,\n centeredSlidesBounds: true,\n slidesPerView: 1.2,\n slidesPerGroup: 1,\n breakpoints: {\n [desktopBreakpoint]: {\n centeredSlides: false,\n slidesPerView: 3,\n slidesPerGroup: 3,\n },\n },\n spaceBetween: spaceBetween,\n speed: transitionDuration,\n pagination: {\n el: `.${this._paginationId}`,\n type: 'bullets',\n },\n navigation: {\n nextEl: `.${this._nextButtonId}`,\n prevEl: `.${this._prevButtonId}`,\n },\n on: {\n slideChange: (swiper) => {\n this.slideChange.emit({\n slide: this.slides[swiper.activeIndex],\n index: swiper.activeIndex,\n });\n },\n },\n };\n }\n\n private getNoControlsConfig(): KirbySwiperOptions {\n return { ...this.getDefaultConfig(), pagination: false, navigation: false };\n }\n}\n","<div class=\"navigation\" *ngIf=\"showNavigation || title !== undefined\">\n <span class=\"kirby-text-medium\">{{ title }}</span>\n\n <div\n class=\"navigation-inner\"\n *ngIf=\"\n showNavigation &&\n (!slidesOptions ||\n slidesOptions?.navigation === undefined ||\n slidesOptions?.pagination === undefined)\n \"\n >\n <div\n class=\"pagination\"\n [ngClass]=\"_paginationId\"\n *ngIf=\"!slidesOptions || slidesOptions?.pagination === undefined\"\n ></div>\n <div\n class=\"buttons\"\n *ngIf=\"!_isTouch && (!slidesOptions || slidesOptions?.navigation === undefined)\"\n >\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-prev swiper-button-prev\"\n [ngClass]=\"_prevButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-back\"></kirby-icon>\n </button>\n\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-next swiper-button-next\"\n [ngClass]=\"_nextButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-more\"></kirby-icon>\n </button>\n\n <ng-content select=\"button[kirby-button]\"></ng-content>\n </div>\n </div>\n</div>\n\n<!-- We need to prevent Swiper from initialization by setting init=\"false\" until we pass all required parameters\n https://swiperjs.com/element#parameters-as-props -->\n<swiper-container init=\"false\" #swiperContainer>\n <swiper-slide *ngFor=\"let slide of slides; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"slideTemplate; context: { $implicit: slide, index: i }\"\n ></ng-container>\n </swiper-slide>\n</swiper-container>\n","import { Directive, ElementRef, Renderer2 } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[slideStretchHeight]',\n})\nexport class SlideStretchHeightDirective {\n constructor(private elementRef: ElementRef, private renderer: Renderer2) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'height', '100%');\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\n\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { SlidesComponent } from './slides.component';\nimport { SlideDirective } from './slide.directive';\nimport { SlideStretchHeightDirective } from './slide-stretch-height.directive';\n\nconst declarations = [SlidesComponent, SlideDirective, SlideStretchHeightDirective];\n\n@NgModule({\n declarations: [...declarations],\n imports: [CommonModule, ButtonComponent, IconModule],\n exports: [...declarations],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class SlideModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAKa,cAAc,CAAA;kIAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;sHAAd,cAAc,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,E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AA2B,CAAC,CAAC;MAQvE,WAAW,CAAA;kIAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAX,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,iBARF,eAAe,EAAE,cAAc,EAAE,2BAA2B,CAItE,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,eAAe,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CAJ/B,eAAe,EAAE,cAAc,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;AAQrE,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAJZ,OAAA,EAAA,CAAA,YAAY,EAAE,eAAe,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAIxC,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,UAAU,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,GAAG,YAAY,CAAC;oBAC1B,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-slide.mjs","sources":["../../slide/src/slide.directive.ts","../../slide/src/slides.component.ts","../../slide/src/slides.component.html","../../slide/src/slide-stretch-height.directive.ts","../../slide/src/slide.module.ts","../../slide/src/kirbydesign-designsystem-slide.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[kirbySlide]',\n})\nexport class SlideDirective {}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport { Swiper, SwiperOptions } from 'swiper';\nimport { register } from 'swiper/element/bundle';\nimport {\n DesignTokenHelper,\n PlatformService,\n UniqueIdGenerator,\n} from '@kirbydesign/designsystem/helpers';\nimport { SlideDirective } from './slide.directive';\n\n// Swiper is not an Angular library,\n// so we need to use their web components and register them manually.\n// https://swiperjs.com/element\nregister();\n\nexport type SelectedSlide = {\n slide: any;\n index: number;\n};\n\nexport type KirbySwiperOptions = SwiperOptions;\ntype SwiperContainer = HTMLElement & { initialize: () => void; swiper: Swiper };\n\n@Component({\n selector: 'kirby-slides',\n templateUrl: './slides.component.html',\n styleUrls: ['./slides.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SlidesComponent implements OnInit, AfterViewInit, OnChanges {\n constructor(private platform: PlatformService, private cdr: ChangeDetectorRef) {}\n\n @ViewChild('swiperContainer') swiperContainer: ElementRef<SwiperContainer>;\n @ContentChild(SlideDirective, { static: true, read: TemplateRef })\n public slideTemplate: TemplateRef<SlideDirective>;\n\n @Input() slidesOptions?: KirbySwiperOptions;\n @Input() title: string;\n @Input() slides: unknown[];\n\n @Input() showNavigation: boolean = true;\n\n @Output() slideChange = new EventEmitter<SelectedSlide>();\n\n _paginationId = UniqueIdGenerator.scopedTo('pagination').next();\n _prevButtonId = UniqueIdGenerator.scopedTo('swiper-button-prev').next();\n _nextButtonId = UniqueIdGenerator.scopedTo('swiper-button-next').next();\n _isTouch: boolean;\n\n ngOnInit() {\n this._isTouch = this.platform.isTouch();\n }\n\n ngAfterViewInit() {\n const defaultConfig = this.showNavigation\n ? this.getDefaultConfig()\n : this.getNoControlsConfig();\n\n const config = { ...defaultConfig, ...this.slidesOptions };\n\n Object.assign(this.swiperContainer.nativeElement, config);\n\n this.swiperContainer.nativeElement.initialize();\n }\n\n public slideTo(index: number) {\n this.swiperContainer.nativeElement.swiper.slideTo(index);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.slides?.firstChange === false) {\n this.cdr.detectChanges();\n this.swiperContainer.nativeElement.swiper.updateSlides();\n }\n }\n\n private getDefaultConfig(): KirbySwiperOptions {\n const desktopBreakpoint = parseInt(DesignTokenHelper.breakpoints.medium);\n const spaceBetween = parseInt(DesignTokenHelper.size('s'));\n const transitionDuration = parseInt(DesignTokenHelper.transitionDuration('long'));\n return {\n centeredSlides: true,\n centeredSlidesBounds: true,\n slidesPerView: 1.2,\n slidesPerGroup: 1,\n breakpoints: {\n [desktopBreakpoint]: {\n centeredSlides: false,\n slidesPerView: 3,\n slidesPerGroup: 3,\n },\n },\n spaceBetween: spaceBetween,\n speed: transitionDuration,\n pagination: {\n el: `.${this._paginationId}`,\n type: 'bullets',\n },\n navigation: {\n nextEl: `.${this._nextButtonId}`,\n prevEl: `.${this._prevButtonId}`,\n },\n on: {\n slideChange: (swiper) => {\n this.slideChange.emit({\n slide: this.slides[swiper.activeIndex],\n index: swiper.activeIndex,\n });\n },\n },\n };\n }\n\n private getNoControlsConfig(): KirbySwiperOptions {\n return { ...this.getDefaultConfig(), pagination: false, navigation: false };\n }\n}\n","<div class=\"navigation\" *ngIf=\"showNavigation || title !== undefined\">\n <span class=\"kirby-text-medium\">{{ title }}</span>\n\n <div\n class=\"navigation-inner\"\n *ngIf=\"\n showNavigation &&\n (!slidesOptions ||\n slidesOptions?.navigation === undefined ||\n slidesOptions?.pagination === undefined)\n \"\n >\n <div\n class=\"pagination\"\n [ngClass]=\"_paginationId\"\n *ngIf=\"!slidesOptions || slidesOptions?.pagination === undefined\"\n ></div>\n <div\n class=\"buttons\"\n *ngIf=\"!_isTouch && (!slidesOptions || slidesOptions?.navigation === undefined)\"\n >\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-prev swiper-button-prev\"\n [ngClass]=\"_prevButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-back\"></kirby-icon>\n </button>\n\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-next swiper-button-next\"\n [ngClass]=\"_nextButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-more\"></kirby-icon>\n </button>\n\n <ng-content select=\"button[kirby-button]\"></ng-content>\n </div>\n </div>\n</div>\n\n<!-- We need to prevent Swiper from initialization by setting init=\"false\" until we pass all required parameters\n https://swiperjs.com/element#parameters-as-props -->\n<swiper-container init=\"false\" #swiperContainer>\n <swiper-slide *ngFor=\"let slide of slides; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"slideTemplate; context: { $implicit: slide, index: i }\"\n ></ng-container>\n </swiper-slide>\n</swiper-container>\n","import { Directive, ElementRef, Renderer2 } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[slideStretchHeight]',\n})\nexport class SlideStretchHeightDirective {\n constructor(private elementRef: ElementRef, private renderer: Renderer2) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'height', '100%');\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';\n\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { SlidesComponent } from './slides.component';\nimport { SlideDirective } from './slide.directive';\nimport { SlideStretchHeightDirective } from './slide-stretch-height.directive';\n\nconst declarations = [SlidesComponent, SlideDirective, SlideStretchHeightDirective];\n\n@NgModule({\n declarations: [...declarations],\n imports: [CommonModule, ButtonComponent, IconModule],\n exports: [...declarations],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class SlideModule {}\n","/**\n * Generated b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D,oBAAA,OAAO,EAAE,CAAC,GAAG,YAAY,CAAC;oBAC1B,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -68,11 +68,11 @@ class TabButtonComponent {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
71
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TabButtonComponent, selector: "kirby-tab-button", inputs: { routerLink: "routerLink", tab: "tab" }, outputs: { click: "click" }, queries: [{ propertyName: "icons", predicate: IconComponent }], ngImport: i0, template: "<ion-tab-button\n #ionTabButton\n [tab]=\"routerLink || tab\"\n (click)=\"onClick($event, ionTabButton.selected)\"\n tabindex=\"0\"\n>\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon:not([selected-tab])\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n</ion-tab-button>\n", styles: [":host{display:contents}ion-tab-button{transition:background-color 80ms linear 0ms;height:100%;flex:1 1 0%;max-width:168px;font-weight:500;font-size:12px;line-height:16px;--color: var(--kirby-text-color-semi-dark);--color-selected: var(--kirby-black);--padding-start: 0;--padding-end: 0;--kirby-badge-position: absolute;--kirby-badge-top: .55em;--kirby-badge-left: calc(50% + .4em) }@media (hover: hover) and (pointer: fine){ion-tab-button.ion-focused{--background:
|
|
71
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TabButtonComponent, selector: "kirby-tab-button", inputs: { routerLink: "routerLink", tab: "tab" }, outputs: { click: "click" }, queries: [{ propertyName: "icons", predicate: IconComponent }], ngImport: i0, template: "<ion-tab-button\n #ionTabButton\n [tab]=\"routerLink || tab\"\n (click)=\"onClick($event, ionTabButton.selected)\"\n tabindex=\"0\"\n>\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon:not([selected-tab])\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n</ion-tab-button>\n", styles: [":host{display:contents}ion-tab-button{transition:background-color 80ms linear 0ms;height:100%;flex:1 1 0%;max-width:168px;font-weight:500;font-size:12px;line-height:16px;--color: var(--kirby-text-color-semi-dark);--color-selected: var(--kirby-black);--padding-start: 0;--padding-end: 0;--kirby-badge-position: absolute;--kirby-badge-top: .55em;--kirby-badge-left: calc(50% + .4em) }@media (hover: hover) and (pointer: fine){ion-tab-button.ion-focused{--background: rgb(244.8, 244.8, 244.8);--background-focused-opacity: 0}ion-tab-button.ion-focused:focus-visible{box-shadow:none;--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black)}}@media (hover: hover){ion-tab-button:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--background: rgb(244.8, 244.8, 244.8)}}ion-tab-button:active,ion-tab-button.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--background: rgb(234.6, 234.6, 234.6)}ion-tab-button ::ng-deep>kirby-badge.md{--kirby-badge-top: .3em;--kirby-badge-left: calc(50% + .2em) }@media (min-width: 768px){ion-tab-button{flex:none;flex-direction:row;font-size:14px;line-height:20px;--padding-start: 24px;--padding-end: 24px;--kirby-badge-position: absolute;--kirby-badge-top: calc(50% - 1.35em) ;--kirby-badge-left: 1.6em}ion-tab-button ::ng-deep>kirby-badge.md{--kirby-badge-position: relative;--kirby-badge-top: 0;--kirby-badge-left: 0;margin-left:2px;margin-bottom:1px}ion-tab-button ::ng-deep>kirby-icon{--kirby-icon-margin-right: 8px}}@media (min-width: 992px) and (hover: hover) and (pointer: fine){ion-tab-button{--padding-start: 12px;--padding-end: 12px}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IonTabButton, selector: "ion-tab-button", inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] }] }); }
|
|
72
72
|
}
|
|
73
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabButtonComponent, decorators: [{
|
|
74
74
|
type: Component,
|
|
75
|
-
args: [{ selector: 'kirby-tab-button', template: "<ion-tab-button\n #ionTabButton\n [tab]=\"routerLink || tab\"\n (click)=\"onClick($event, ionTabButton.selected)\"\n tabindex=\"0\"\n>\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon:not([selected-tab])\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n</ion-tab-button>\n", styles: [":host{display:contents}ion-tab-button{transition:background-color 80ms linear 0ms;height:100%;flex:1 1 0%;max-width:168px;font-weight:500;font-size:12px;line-height:16px;--color: var(--kirby-text-color-semi-dark);--color-selected: var(--kirby-black);--padding-start: 0;--padding-end: 0;--kirby-badge-position: absolute;--kirby-badge-top: .55em;--kirby-badge-left: calc(50% + .4em) }@media (hover: hover) and (pointer: fine){ion-tab-button.ion-focused{--background:
|
|
75
|
+
args: [{ selector: 'kirby-tab-button', template: "<ion-tab-button\n #ionTabButton\n [tab]=\"routerLink || tab\"\n (click)=\"onClick($event, ionTabButton.selected)\"\n tabindex=\"0\"\n>\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon:not([selected-tab])\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n</ion-tab-button>\n", styles: [":host{display:contents}ion-tab-button{transition:background-color 80ms linear 0ms;height:100%;flex:1 1 0%;max-width:168px;font-weight:500;font-size:12px;line-height:16px;--color: var(--kirby-text-color-semi-dark);--color-selected: var(--kirby-black);--padding-start: 0;--padding-end: 0;--kirby-badge-position: absolute;--kirby-badge-top: .55em;--kirby-badge-left: calc(50% + .4em) }@media (hover: hover) and (pointer: fine){ion-tab-button.ion-focused{--background: rgb(244.8, 244.8, 244.8);--background-focused-opacity: 0}ion-tab-button.ion-focused:focus-visible{box-shadow:none;--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black)}}@media (hover: hover){ion-tab-button:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--background: rgb(244.8, 244.8, 244.8)}}ion-tab-button:active,ion-tab-button.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--background: rgb(234.6, 234.6, 234.6)}ion-tab-button ::ng-deep>kirby-badge.md{--kirby-badge-top: .3em;--kirby-badge-left: calc(50% + .2em) }@media (min-width: 768px){ion-tab-button{flex:none;flex-direction:row;font-size:14px;line-height:20px;--padding-start: 24px;--padding-end: 24px;--kirby-badge-position: absolute;--kirby-badge-top: calc(50% - 1.35em) ;--kirby-badge-left: 1.6em}ion-tab-button ::ng-deep>kirby-badge.md{--kirby-badge-position: relative;--kirby-badge-top: 0;--kirby-badge-left: 0;margin-left:2px;margin-bottom:1px}ion-tab-button ::ng-deep>kirby-icon{--kirby-icon-margin-right: 8px}}@media (min-width: 992px) and (hover: hover) and (pointer: fine){ion-tab-button{--padding-start: 12px;--padding-end: 12px}}\n"] }]
|
|
76
76
|
}], propDecorators: { routerLink: [{
|
|
77
77
|
type: Input
|
|
78
78
|
}], tab: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-tabs.mjs","sources":["../../tabs/src/tabs.service.ts","../../tabs/src/tabs.component.ts","../../tabs/src/tabs.component.html","../../tabs/src/tab-button/tab-button.events.ts","../../tabs/src/tab-button/tab-button.component.ts","../../tabs/src/tab-button/tab-button.component.html","../../tabs/src/tabs.module.ts","../../tabs/src/kirbydesign-designsystem-tabs.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { IonRouterOutlet } from '@ionic/angular/standalone';\nimport { ReplaySubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TabsService {\n private outletSubject$: ReplaySubject<IonRouterOutlet> = new ReplaySubject(1);\n public outlet$ = this.outletSubject$.asObservable();\n\n public setOutlet(outlet: IonRouterOutlet) {\n this.outletSubject$.next(outlet);\n }\n\n public resetOutlet() {\n this.outletSubject$.next(null);\n }\n}\n\nexport { IonRouterOutlet };\n","import { AfterViewInit, Component, HostBinding, OnDestroy, ViewChild } from '@angular/core';\nimport { IonTabs } from '@ionic/angular/standalone';\n\nimport { TabsService } from './tabs.service';\n\n@Component({\n selector: 'kirby-tab-bar',\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss'],\n})\nexport class TabsComponent implements AfterViewInit, OnDestroy {\n @HostBinding('class.tab-bar-bottom-hidden')\n tabBarBottomHidden = false;\n @ViewChild(IonTabs, { static: true }) tabs: IonTabs;\n\n constructor(private tabsService: TabsService) {}\n\n ngAfterViewInit() {\n this.tabsService.setOutlet(this.tabs.outlet);\n }\n\n ngOnDestroy() {\n this.tabsService.resetOutlet();\n }\n}\n","<ion-tabs>\n <ion-tab-bar [class.bottom-hidden]=\"tabBarBottomHidden\">\n <ng-content></ng-content>\n </ion-tab-bar>\n</ion-tabs>\n","export const selectedTabClickEvent = 'kirbySelectedTabClick';\n","import { Component, ContentChildren, EventEmitter, Input, Output, QueryList } from '@angular/core';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\nimport { selectedTabClickEvent } from './tab-button.events';\n\n@Component({\n selector: 'kirby-tab-button',\n templateUrl: './tab-button.component.html',\n styleUrls: ['./tab-button.component.scss'],\n})\nexport class TabButtonComponent {\n /**\n * @deprecated Using routerLink for defining routes for kirby-tab-button is deprecated,\n * as it clashes with Angulars builtin routerLink directive and causes unexpected behavior in Angular 16\n * and above, causing the tab stack to not be preserved. Use the tab input instead, as a direct replacement.\n */\n @Input() routerLink: string;\n @Input() tab: string;\n @Output() click = new EventEmitter<Event>();\n @ContentChildren(IconComponent) icons: QueryList<IconComponent>;\n\n onClick(event: Event, isSelected: boolean) {\n this.click.emit(event);\n\n if (isSelected) {\n const clickEvent = new CustomEvent(selectedTabClickEvent);\n dispatchEvent(clickEvent);\n }\n }\n}\n","<ion-tab-button\n #ionTabButton\n [tab]=\"routerLink || tab\"\n (click)=\"onClick($event, ionTabButton.selected)\"\n tabindex=\"0\"\n>\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon:not([selected-tab])\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n</ion-tab-button>\n","import { CommonModule } from '@angular/common';\n\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { NgModule } from '@angular/core';\nimport { IonTabBar, IonTabButton, IonTabs } from '@ionic/angular/standalone';\nimport { TabButtonComponent } from './tab-button/tab-button.component';\nimport { TabsService } from './tabs.service';\nimport { TabsComponent } from './tabs.component';\n\n@NgModule({\n imports: [IconModule, CommonModule, IonTabs, IonTabBar, IonTabButton],\n providers: [TabsService],\n declarations: [TabsComponent, TabButtonComponent],\n exports: [TabsComponent, TabButtonComponent],\n})\nexport class TabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.TabsService"],"mappings":";;;;;;;;;;MAOa,WAAW,CAAA;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A;IARC,OAAO,CAAC,KAAY,EAAE,UAAmB,EAAA;AACvC,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAEvB,QAAA,IAAI,UAAU,EAAE;AACd,YAAA,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,qBAAqB,CAAC,CAAC;YAC1D,aAAa,CAAC,UAAU,CAAC,CAAC;AAC3B,SAAA;KACF;kIAlBU,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;sHAAlB,kBAAkB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,GAAA,EAAA,KAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,SAAA,EASZ,aAAa,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBhC,+dAcA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-tabs.mjs","sources":["../../tabs/src/tabs.service.ts","../../tabs/src/tabs.component.ts","../../tabs/src/tabs.component.html","../../tabs/src/tab-button/tab-button.events.ts","../../tabs/src/tab-button/tab-button.component.ts","../../tabs/src/tab-button/tab-button.component.html","../../tabs/src/tabs.module.ts","../../tabs/src/kirbydesign-designsystem-tabs.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { IonRouterOutlet } from '@ionic/angular/standalone';\nimport { ReplaySubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TabsService {\n private outletSubject$: ReplaySubject<IonRouterOutlet> = new ReplaySubject(1);\n public outlet$ = this.outletSubject$.asObservable();\n\n public setOutlet(outlet: IonRouterOutlet) {\n this.outletSubject$.next(outlet);\n }\n\n public resetOutlet() {\n this.outletSubject$.next(null);\n }\n}\n\nexport { IonRouterOutlet };\n","import { AfterViewInit, Component, HostBinding, OnDestroy, ViewChild } from '@angular/core';\nimport { IonTabs } from '@ionic/angular/standalone';\n\nimport { TabsService } from './tabs.service';\n\n@Component({\n selector: 'kirby-tab-bar',\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss'],\n})\nexport class TabsComponent implements AfterViewInit, OnDestroy {\n @HostBinding('class.tab-bar-bottom-hidden')\n tabBarBottomHidden = false;\n @ViewChild(IonTabs, { static: true }) tabs: IonTabs;\n\n constructor(private tabsService: TabsService) {}\n\n ngAfterViewInit() {\n this.tabsService.setOutlet(this.tabs.outlet);\n }\n\n ngOnDestroy() {\n this.tabsService.resetOutlet();\n }\n}\n","<ion-tabs>\n <ion-tab-bar [class.bottom-hidden]=\"tabBarBottomHidden\">\n <ng-content></ng-content>\n </ion-tab-bar>\n</ion-tabs>\n","export const selectedTabClickEvent = 'kirbySelectedTabClick';\n","import { Component, ContentChildren, EventEmitter, Input, Output, QueryList } from '@angular/core';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\nimport { selectedTabClickEvent } from './tab-button.events';\n\n@Component({\n selector: 'kirby-tab-button',\n templateUrl: './tab-button.component.html',\n styleUrls: ['./tab-button.component.scss'],\n})\nexport class TabButtonComponent {\n /**\n * @deprecated Using routerLink for defining routes for kirby-tab-button is deprecated,\n * as it clashes with Angulars builtin routerLink directive and causes unexpected behavior in Angular 16\n * and above, causing the tab stack to not be preserved. Use the tab input instead, as a direct replacement.\n */\n @Input() routerLink: string;\n @Input() tab: string;\n @Output() click = new EventEmitter<Event>();\n @ContentChildren(IconComponent) icons: QueryList<IconComponent>;\n\n onClick(event: Event, isSelected: boolean) {\n this.click.emit(event);\n\n if (isSelected) {\n const clickEvent = new CustomEvent(selectedTabClickEvent);\n dispatchEvent(clickEvent);\n }\n }\n}\n","<ion-tab-button\n #ionTabButton\n [tab]=\"routerLink || tab\"\n (click)=\"onClick($event, ionTabButton.selected)\"\n tabindex=\"0\"\n>\n <ng-content\n *ngIf=\"icons.length === 1 || !ionTabButton.selected\"\n select=\"kirby-icon:not([selected-tab])\"\n ></ng-content>\n <ng-content *ngIf=\"ionTabButton.selected\" select=\"kirby-icon[selected-tab]\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"kirby-badge\"></ng-content>\n</ion-tab-button>\n","import { CommonModule } from '@angular/common';\n\nimport { IconModule } from '@kirbydesign/designsystem/icon';\nimport { NgModule } from '@angular/core';\nimport { IonTabBar, IonTabButton, IonTabs } from '@ionic/angular/standalone';\nimport { TabButtonComponent } from './tab-button/tab-button.component';\nimport { TabsService } from './tabs.service';\nimport { TabsComponent } from './tabs.component';\n\n@NgModule({\n imports: [IconModule, CommonModule, IonTabs, IonTabBar, IonTabButton],\n providers: [TabsService],\n declarations: [TabsComponent, TabButtonComponent],\n exports: [TabsComponent, TabButtonComponent],\n})\nexport class TabsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.TabsService"],"mappings":";;;;;;;;;;MAOa,WAAW,CAAA;AAHxB,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,cAAc,GAAmC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;AACvE,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;AASrD,KAAA;AAPQ,IAAA,SAAS,CAAC,MAAuB,EAAA;AACtC,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAClC;IAEM,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;kIAVU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAX,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,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E,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAFtC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAG1D,EAAA,OAAA,EAAA,CAAA,aAAa,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;AAEhC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAJV,SAAA,EAAA,CAAC,WAAW,CAAC,EADd,OAAA,EAAA,CAAA,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAKzD,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,CAAC;oBACrE,SAAS,EAAE,CAAC,WAAW,CAAC;AACxB,oBAAA,YAAY,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC;AACjD,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC;AAC7C,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -5,8 +5,9 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
|
5
5
|
import { IonToggle } from '@ionic/angular/standalone';
|
|
6
6
|
|
|
7
7
|
class ToggleComponent {
|
|
8
|
-
constructor(cdr) {
|
|
8
|
+
constructor(cdr, elementRef) {
|
|
9
9
|
this.cdr = cdr;
|
|
10
|
+
this.elementRef = elementRef;
|
|
10
11
|
this.checked = false;
|
|
11
12
|
this.disabled = false;
|
|
12
13
|
this.checkedChange = new EventEmitter();
|
|
@@ -17,6 +18,18 @@ class ToggleComponent {
|
|
|
17
18
|
// eslint-disable-next-line no-empty-function
|
|
18
19
|
this._onTouched = () => { };
|
|
19
20
|
}
|
|
21
|
+
ngOnInit() {
|
|
22
|
+
this.inheritAriaAttributes();
|
|
23
|
+
}
|
|
24
|
+
inheritAriaAttributes() {
|
|
25
|
+
const el = this.elementRef.nativeElement;
|
|
26
|
+
const attribute = 'aria-label';
|
|
27
|
+
if (el.hasAttribute(attribute)) {
|
|
28
|
+
const value = el.getAttribute(attribute);
|
|
29
|
+
el.removeAttribute(attribute);
|
|
30
|
+
this._ariaLabel = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
20
33
|
get _isDisabled() {
|
|
21
34
|
return this.disabled ? 'disabled' : null;
|
|
22
35
|
}
|
|
@@ -71,14 +84,14 @@ class ToggleComponent {
|
|
|
71
84
|
this.disabled = isDisabled;
|
|
72
85
|
this.cdr.detectChanges();
|
|
73
86
|
}
|
|
74
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
87
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
75
88
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ToggleComponent, isStandalone: true, selector: "kirby-toggle", inputs: { checked: "checked", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.disabled": "this._isDisabled" } }, providers: [
|
|
76
89
|
{
|
|
77
90
|
provide: NG_VALUE_ACCESSOR,
|
|
78
91
|
useExisting: forwardRef((() => ToggleComponent)),
|
|
79
92
|
multi: true,
|
|
80
93
|
},
|
|
81
|
-
], ngImport: i0, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n></ion-toggle>\n", styles: [":host{display:inline-flex}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04)}@media (hover: hover) and (pointer: fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}@media (hover: hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background:
|
|
94
|
+
], ngImport: i0, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [attr.aria-label]=\"_ariaLabel\"\n>\n <ng-content></ng-content>\n</ion-toggle>\n", styles: [":host{display:inline-flex}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}@media (hover: hover) and (pointer: fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}@media (hover: hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle::part(track){height:32px}ion-toggle.in-item.legacy-toggle{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonToggle, selector: "ion-toggle", inputs: ["checked", "color", "disabled", "enableOnOffLabels", "justify", "labelPlacement", "mode", "name", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
82
95
|
}
|
|
83
96
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ToggleComponent, decorators: [{
|
|
84
97
|
type: Component,
|
|
@@ -88,8 +101,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
88
101
|
useExisting: forwardRef((() => ToggleComponent)),
|
|
89
102
|
multi: true,
|
|
90
103
|
},
|
|
91
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n></ion-toggle>\n", styles: [":host{display:inline-flex}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04)}@media (hover: hover) and (pointer: fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}@media (hover: hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background:
|
|
92
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { checked: [{
|
|
104
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [attr.aria-label]=\"_ariaLabel\"\n>\n <ng-content></ng-content>\n</ion-toggle>\n", styles: [":host{display:inline-flex}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}@media (hover: hover) and (pointer: fine){ion-toggle{overflow:visible;contain:none}ion-toggle:focus-within::part(track){transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}@media (hover: hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle::part(track){height:32px}ion-toggle.in-item.legacy-toggle{padding:0}\n"] }]
|
|
105
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { checked: [{
|
|
93
106
|
type: Input
|
|
94
107
|
}], disabled: [{
|
|
95
108
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-toggle.mjs","sources":["../../toggle/src/toggle.component.ts","../../toggle/src/toggle.component.html","../../toggle/src/kirbydesign-designsystem-toggle.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n forwardRef,\n HostBinding,\n Input,\n Output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IonToggle } from '@ionic/angular/standalone';\n\n@Component({\n standalone: true,\n imports: [CommonModule, IonToggle],\n selector: 'kirby-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent implements ControlValueAccessor {\n constructor(private cdr: ChangeDetectorRef) {}\n\n @Input() checked: boolean = false;\n @Input() disabled: boolean = false;\n @HostBinding('attr.disabled')\n get _isDisabled() {\n return this.disabled ? 'disabled' : null;\n }\n\n @Output() checkedChange = new EventEmitter<boolean>();\n\n _pressed = false;\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this._onChange(this.checked);\n this.checkedChange.emit(this.checked);\n }\n\n _onActive() {\n this._pressed = true;\n }\n\n _onInactive() {\n this._pressed = false;\n this._onTouched();\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private _onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private _onTouched = () => {};\n\n /**\n * Sets the toggle's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n }\n /**\n * Saves a callback function to be invoked when the toggle's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the toggle is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n /**\n * Disables the toggle. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.detectChanges();\n }\n}\n","<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n></ion-toggle>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-toggle.mjs","sources":["../../toggle/src/toggle.component.ts","../../toggle/src/toggle.component.html","../../toggle/src/kirbydesign-designsystem-toggle.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Input,\n OnInit,\n Output,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IonToggle } from '@ionic/angular/standalone';\n\n@Component({\n standalone: true,\n imports: [CommonModule, IonToggle],\n selector: 'kirby-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent implements ControlValueAccessor, OnInit {\n constructor(private cdr: ChangeDetectorRef, private elementRef: ElementRef<HTMLElement>) {}\n\n ngOnInit(): void {\n this.inheritAriaAttributes();\n }\n\n _ariaLabel: string;\n\n private inheritAriaAttributes() {\n const el = this.elementRef.nativeElement;\n const attribute = 'aria-label';\n if (el.hasAttribute(attribute)) {\n const value = el.getAttribute(attribute);\n el.removeAttribute(attribute);\n this._ariaLabel = value;\n }\n }\n\n @Input() checked: boolean = false;\n @Input() disabled: boolean = false;\n @HostBinding('attr.disabled')\n get _isDisabled() {\n return this.disabled ? 'disabled' : null;\n }\n\n @Output() checkedChange = new EventEmitter<boolean>();\n\n _pressed = false;\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this._onChange(this.checked);\n this.checkedChange.emit(this.checked);\n }\n\n _onActive() {\n this._pressed = true;\n }\n\n _onInactive() {\n this._pressed = false;\n this._onTouched();\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private _onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private _onTouched = () => {};\n\n /**\n * Sets the toggle's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n }\n /**\n * Saves a callback function to be invoked when the toggle's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the toggle is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n /**\n * Disables the toggle. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.detectChanges();\n }\n}\n","<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [attr.aria-label]=\"_ariaLabel\"\n>\n <ng-content></ng-content>\n</ion-toggle>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MA+Ba,eAAe,CAAA;IAC1B,WAAoB,CAAA,GAAsB,EAAU,UAAmC,EAAA;QAAnE,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAAU,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QAkB9E,IAAO,CAAA,OAAA,GAAY,KAAK,CAAC;QACzB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAMzB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAW,CAAC;QAEtD,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;;AAmBT,QAAA,IAAA,CAAA,SAAS,GAA6B,MAAK,GAAG,CAAC;;AAE/C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAK,GAAG,CAAC;KAhD6D;IAE3F,QAAQ,GAAA;QACN,IAAI,CAAC,qBAAqB,EAAE,CAAC;KAC9B;IAIO,qBAAqB,GAAA;AAC3B,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACzC,MAAM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A,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAatB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAf3B,SAAS;iCACI,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,SAAS,CAAC,EAAA,QAAA,EACxB,cAAc,EAGb,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,EAAC,qBAAqB,EAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mWAAA,EAAA,MAAA,EAAA,CAAA,w2CAAA,CAAA,EAAA,CAAA;+GAqBtC,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBAEF,WAAW,EAAA,CAAA;sBADd,WAAW;uBAAC,eAAe,CAAA;gBAKlB,aAAa,EAAA,CAAA;sBAAtB,MAAM;;;AEzDT;;AAEG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12.0006,3.5007 C12.0406,3.5007 12.0756,3.5167 12.1136,3.5227 C12.1656,3.5317 12.2196,3.5347 12.2696,3.5547 C12.3156,3.5727 12.3536,3.6037 12.3956,3.6307 C12.4336,3.6557 12.4746,3.6757 12.5076,3.7087 C12.5486,3.7467 12.5756,3.7947 12.6056,3.8417 C12.6266,3.8737 12.6556,3.8967 12.6716,3.9317 L14.6646,8.2547 L19.4996,8.2547 C20.1146,8.2547 20.6866,8.5337 21.0676,9.0207 C21.4496,9.5067 21.5876,10.1327 21.4456,10.7357 L19.5216,18.9477 C19.3096,19.8617 18.5086,20.5007 17.5776,20.5007 L6.4226,20.5007 C5.4916,20.5007 4.6916,19.8617 4.4776,18.9477 L2.5546,10.7357 C2.4136,10.1327 2.5506,9.5067 2.9326,9.0207 C3.3136,8.5337 3.8856,8.2547 4.4996,8.2547 L9.9286,8.2547 L8.2256,4.5617 C8.2236,4.5567 8.2246,4.5527 8.2226,4.5477 C8.2036,4.5047 8.2006,4.4567 8.1896,4.4097 C8.1786,4.3587 8.1606,4.3097 8.1596,4.2587 C8.1596,4.2537 8.1566,4.2507 8.1566,4.2467 C8.1566,4.2097 8.1726,4.1787 8.1776,4.1447 C8.1856,4.0857 8.1896,4.0287 8.2116,3.9737 C8.2286,3.9297 8.2576,3.8947 8.2826,3.8557 C8.3086,3.8137 8.3296,3.7697 8.3636,3.7337 C8.4016,3.6937 8.4486,3.6667 8.4946,3.6367 C8.5256,3.6157 8.5496,3.5857 8.5846,3.5697 C8.5886,3.5677 8.5936,3.5677 8.5976,3.5657 C8.6426,3.5457 8.6926,3.5427 8.7416,3.5317 C8.7896,3.5217 8.8356,3.5027 8.8836,3.5027 C8.8886,3.5027 8.8926,3.5007 8.8966,3.5007 L12.0006,3.5007 Z M19.4996,9.7477 L4.4996,9.7477 C4.2806,9.7477 4.1506,9.8727 4.0926,9.9467 C4.0346,10.0217 3.9436,10.1787 3.9946,10.3937 L5.9166,18.6037 C5.9726,18.8407 6.1806,19.0067 6.4226,19.0067 L17.5776,19.0067 C17.8186,19.0067 18.0266,18.8417 18.0826,18.6047 L20.0066,10.3937 C20.0566,10.1787 19.9666,10.0217 19.9086,9.9467 C19.8496,9.8727 19.7186,9.7477 19.4996,9.7477 Z M9.027,12.8538 C9.435,12.8538 9.766,13.1878 9.766,13.5998 L9.766,16.8008 C9.766,17.2128 9.435,17.5468 9.027,17.5468 C8.618,17.5468 8.287,17.2128 8.287,16.8008 L8.287,13.5998 C8.287,13.1878 8.618,12.8538 9.027,12.8538 Z M12.0919,12.8538 C12.5009,12.8538 12.8319,13.1878 12.8319,13.5998 L12.8319,16.8008 C12.8319,17.2128 12.5009,17.5468 12.0919,17.5468 C11.6839,17.5468 11.3519,17.2128 11.3519,16.8008 L11.3519,13.5998 C11.3519,13.1878 11.6839,12.8538 12.0919,12.8538 Z M15.0992,12.8538 C15.5072,12.8538 15.8382,13.1878 15.8382,13.5998 L15.8382,16.8008 C15.8382,17.2128 15.5072,17.5468 15.0992,17.5468 C14.6912,17.5468 14.3592,17.2128 14.3592,16.8008 L14.3592,13.5998 C14.3592,13.1878 14.6912,12.8538 15.0992,12.8538 Z M12.0919,10.6172 C12.4699,10.6172 12.7769,10.9272 12.7769,11.3092 C12.7769,11.6902 12.4699,12.0002 12.0919,12.0002 C11.7139,12.0002 11.4069,11.6902 11.4069,11.3092 C11.4069,10.9272 11.7139,10.6172 12.0919,10.6172 Z M11.5286,4.9927 L10.0566,4.9927 L11.5616,8.2547 L13.0326,8.2547 L11.5286,4.9927 Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.7127,2.8926 C7.3037,2.8926 6.9717,3.2266 6.9717,3.6386 L6.9717,5.9486 L3.2657,2.2186 C3.1207,2.0726 2.9317,1.9996 2.7417,1.9996 C2.5517,1.9996 2.3627,2.0726 2.2177,2.2186 C1.9277,2.5096 1.9277,2.9816 2.2177,3.2726 L5.9617,7.0406 L3.6567,7.0406 C3.2487,7.0406 2.9167,7.3746 2.9167,7.7866 C2.9167,8.1986 3.2487,8.5326 3.6567,8.5326 L7.7127,8.5326 C8.1217,8.5326 8.4537,8.1986 8.4537,7.7866 L8.4537,3.6386 C8.4537,3.2266 8.1217,2.8926 7.7127,2.8926 M16.2508,8.496 L20.3718,8.496 C20.7808,8.496 21.1128,8.162 21.1128,7.75 C21.1128,7.338 20.7808,7.004 20.3718,7.004 L18.0768,7.004 L21.7828,3.274 C22.0728,2.982 22.0728,2.51 21.7828,2.219 C21.6388,2.074 21.4498,2 21.2598,2 C21.0688,2 20.8808,2.074 20.7348,2.219 L16.9918,5.987 L16.9918,3.668 C16.9918,3.257 16.6598,2.923 16.2508,2.923 C15.8418,2.923 15.5098,3.257 15.5098,3.668 L15.5098,7.75 C15.5098,8.162 15.8418,8.496 16.2508,8.496 M16.28755,21.1063 C16.69655,21.1063 17.02855,20.7723 17.02855,20.3613 L17.02855,18.0503 L20.73555,21.7813 C21.02455,22.0733 21.49355,22.0733 21.78355,21.7813 C22.07255,21.4903 22.07255,21.0183 21.78355,20.7263 L18.03955,16.9593 L20.34455,16.9593 C20.75355,16.9593 21.08555,16.6253 21.08555,16.2133 C21.08555,15.8013 20.75355,15.4673 20.34455,15.4673 L16.28755,15.4673 C15.87855,15.4673 15.54655,15.8013 15.54655,16.2133 L15.54655,20.3613 C15.54655,20.7723 15.87855,21.1063 16.28755,21.1063 M3.26435,21.78145 L7.00835,18.01245 L7.00835,20.33145 C7.00835,20.74345 7.34035,21.07745 7.74835,21.07745 C8.15835,21.07745 8.49035,20.74345 8.49035,20.33145 L8.49035,16.25045 C8.49035,15.83845 8.15835,15.50445 7.74835,15.50445 L3.62735,15.50445 C3.21835,15.50445 2.88735,15.83845 2.88735,16.25045 C2.88735,16.66145 3.21835,16.99545 3.62735,16.99545 L5.92335,16.99545 L2.21635,20.72645 C1.92735,21.01745 1.92735,21.48945 2.21635,21.78145 C2.50635,22.07245 2.97435,22.07245 3.26435,21.78145"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M14 4C15.5187831 4 16.75 5.23121694 16.75 6.75L16.75 12.75C16.75 14.2687831 15.5187831 15.5 14 15.5L5.75 15.5C4.23121694 15.5 3 14.2687831 3 12.75L3 6.75C3 5.23121694 4.23121694 4 5.75 4L14 4ZM14 5.5 5.75 5.5C5.05964406 5.5 4.5 6.05964406 4.5 6.75L4.5 12.75C4.5 13.4403559 5.05964406 14 5.75 14L14 14C14.6903559 14 15.25 13.4403559 15.25 12.75L15.25 6.75C15.25 6.05964406 14.6903559 5.5 14 5.5ZM18.25 8C19.7416194 8 21 9.04865047 21 10.4166667 21 10.8308802 20.6642136 11.1666667 20.25 11.1666667 19.8357864 11.1666667 19.5 10.8308802 19.5 10.4166667 19.5 9.9437337 18.9675196 9.5 18.25 9.5 17.8357864 9.5 17.5 9.16421356 17.5 8.75 17.5 8.33578644 17.8357864 8 18.25 8ZM19.5 12.9166667C19.5 11.9166667 21 11.9166667 21 12.9166667L21 14.5833333C21 15.5416667 19.6223958 15.5815972 19.5075955 14.703125L19.5 14.5833333 19.5 12.9166667ZM20.25 16.3333333C20.6642136 16.3333333 21 16.6691198 21 17.0833333 21 18.4513495 19.7416194 19.5 18.25 19.5 17.8357864 19.5 17.5 19.1642136 17.5 18.75 17.5 18.3357864 17.8357864 18 18.25 18 18.9675196 18 19.5 17.5562663 19.5 17.0833333 19.5 16.6691198 19.8357864 16.3333333 20.25 16.3333333ZM15.5 18C15.9142136 18 16.25 18.3357864 16.25 18.75 16.25 19.1642136 15.9142136 19.5 15.5 19.5L13 19.5C12.5857864 19.5 12.25 19.1642136 12.25 18.75 12.25 18.3357864 12.5857864 18 13 18L15.5 18ZM8.25 16.3333333C8.66421356 16.3333333 9 16.6691198 9 17.0833333 9 17.5562663 9.53248044 18 10.25 18 10.6642136 18 11 18.3357864 11 18.75 11 19.1642136 10.6642136 19.5 10.25 19.5 8.75838057 19.5 7.5 18.4513495 7.5 17.0833333 7.5 16.6691198 7.83578644 16.3333333 8.25 16.3333333Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M2.7412,7.6396 C3.1502,7.6396 3.4822,7.3056 3.4822,6.8936 L3.4822,4.5836 L7.1882,8.3136 C7.3332,8.4596 7.5222,8.5326 7.7122,8.5326 C7.9022,8.5326 8.0912,8.4596 8.2362,8.3136 C8.5262,8.0226 8.5262,7.5506 8.2362,7.2596 L4.4922,3.4916 L6.7972,3.4916 C7.2052,3.4916 7.5372,3.1576 7.5372,2.7456 C7.5372,2.3336 7.2052,1.9996 6.7972,1.9996 L2.7412,1.9996 C2.3322,1.9996 2.0002,2.3336 2.0002,2.7456 L2.0002,6.8936 C2.0002,7.3056 2.3322,7.6396 2.7412,7.6396 M21.2593,2 L17.1383,2 C16.7293,2 16.3973,2.334 16.3973,2.746 C16.3973,3.158 16.7293,3.492 17.1383,3.492 L19.4333,3.492 L15.7273,7.222 C15.4373,7.514 15.4373,7.986 15.7273,8.277 C15.8713,8.422 16.0603,8.496 16.2503,8.496 C16.4413,8.496 16.6293,8.422 16.7753,8.277 L20.5183,4.509 L20.5183,6.828 C20.5183,7.239 20.8503,7.573 21.2593,7.573 C21.6683,7.573 22.0003,7.239 22.0003,6.828 L22.0003,2.746 C22.0003,2.334 21.6683,2 21.2593,2 M21.2593,16.3613 C20.8503,16.3613 20.5183,16.6953 20.5183,17.1063 L20.5183,19.4173 L16.8113,15.6863 C16.5223,15.3943 16.0533,15.3943 15.7633,15.6863 C15.4743,15.9773 15.4743,16.4493 15.7633,16.7413 L19.5073,20.5083 L17.2023,20.5083 C16.7933,20.5083 16.4613,20.8423 16.4613,21.2543 C16.4613,21.6663 16.7933,22.0003 17.2023,22.0003 L21.2593,22.0003 C21.6683,22.0003 22.0003,21.6663 22.0003,21.2543 L22.0003,17.1063 C22.0003,16.6953 21.6683,16.3613 21.2593,16.3613 M7.2256,15.7227 L3.4816,19.4917 L3.4816,17.1727 C3.4816,16.7607 3.1496,16.4267 2.7416,16.4267 C2.3316,16.4267 1.9996,16.7607 1.9996,17.1727 L1.9996,21.2537 C1.9996,21.6657 2.3316,21.9997 2.7416,21.9997 L6.8626,21.9997 C7.2716,21.9997 7.6026,21.6657 7.6026,21.2537 C7.6026,20.8427 7.2716,20.5087 6.8626,20.5087 L4.5666,20.5087 L8.2736,16.7777 C8.5626,16.4867 8.5626,16.0147 8.2736,15.7227 C7.9836,15.4317 7.5156,15.4317 7.2256,15.7227"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19.044,12.3972 C17.656,13.7752 15.417,12.6082 14.624,12.1202 C14.58,11.6262 14.412,11.1712 14.142,10.7912 C14.534,9.9912 15.785,7.8652 17.831,8.1882 C18.468,8.2892 19.068,8.9652 19.359,9.9092 C19.667,10.9052 19.54,11.9052 19.044,12.3972 M16.701,18.8482 C15.878,19.4602 14.912,19.6492 14.303,19.3192 C12.473,18.3292 13.038,15.4692 13.215,14.7442 C13.557,14.5652 13.853,14.3142 14.087,14.0072 C14.754,14.0882 17.445,14.5552 17.814,16.8182 C17.919,17.4712 17.482,18.2682 16.701,18.8482 M10.121,19.3172 C9.514,19.6532 8.547,19.4772 7.717,18.8752 C6.929,18.3042 6.484,17.5132 6.583,16.8572 C6.888,14.8262 9.104,14.2142 10.025,14.0452 C10.329,14.4302 10.731,14.7232 11.195,14.8882 C11.41,15.7942 11.838,18.3612 10.121,19.3172 M4.641,9.9572 C4.932,9.0132 5.532,8.3372 6.169,8.2362 C8.242,7.9032 9.502,10.1032 9.875,10.8732 C9.639,11.2342 9.498,11.6622 9.457,12.1182 C8.756,12.5662 6.406,13.8852 4.957,12.4452 C4.46,11.9522 4.333,10.9522 4.641,9.9572 M9.939,5.5252 C10.217,4.9272 11.02,4.5322 11.983,4.5172 C12.984,4.4842 13.896,4.9142 14.21,5.5452 C15.081,7.2832 13.411,9.1212 12.71,9.7852 C12.495,9.7262 12.273,9.6852 12.041,9.6852 C11.754,9.6852 11.483,9.7442 11.226,9.8322 C10.55,9.1542 9.076,7.3822 9.939,5.5252 M13.173,12.3652 C13.173,13.0062 12.665,13.5272 12.041,13.5272 C11.416,13.5272 10.908,13.0062 10.908,12.3652 C10.908,11.7242 11.416,11.2022 12.041,11.2022 C12.665,11.2022 13.173,11.7242 13.173,12.3652 M20.767,9.4512 C20.299,7.9382 19.262,6.8802 18.057,6.6892 C17.248,6.5602 16.54,6.6762 15.92,6.9242 C15.976,6.2642 15.881,5.5652 15.523,4.8512 C14.947,3.7022 13.579,2.9822 11.961,3.0002 C10.418,3.0242 9.132,3.7412 8.607,4.8712 C8.258,5.6232 8.161,6.3462 8.209,7.0222 C7.559,6.7382 6.808,6.6002 5.944,6.7372 C4.739,6.9282 3.701,7.9862 3.234,9.4982 C2.753,11.0532 3.027,12.6392 3.931,13.5372 C4.571,14.1722 5.289,14.4722 6.009,14.5732 C5.581,15.1112 5.251,15.7792 5.124,16.6262 C4.937,17.8642 5.605,19.2002 6.867,20.1152 C7.67,20.6962 8.572,21.0002 9.404,21.0002 C9.917,21.0002 10.403,20.8852 10.824,20.6502 C11.45,20.3022 11.891,19.8402 12.204,19.3242 C12.524,19.8482 12.974,20.3152 13.614,20.6622 C14.027,20.8852 14.5,20.9942 14.996,20.9942 C15.841,20.9942 16.756,20.6802 17.566,20.0772 C18.817,19.1482 19.469,17.8032 19.269,16.5682 C19.126,15.6892 18.768,15.0032 18.307,14.4602 C18.919,14.3192 19.523,14.0302 20.068,13.4882 C20.973,12.5912 21.247,11.0062 20.767,9.4512"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M18,1.6809581 C18.4142136,1.6809581 18.75,1.92516642 18.75,2.22641265 L18.7499177,4.6809581 L21.6802356,4.6809581 C22.0636787,4.6809581 22.3853709,4.97018387 22.4260111,5.35146727 L22.7457756,8.35146727 C22.793011,8.79462536 22.4456683,9.1809581 22,9.1809581 L21.7499177,9.1809581 L21.75,19 C21.75,19.3796958 21.4678461,19.693491 21.1017706,19.7431534 L21,19.75 L3,19.75 C2.58578644,19.75 2.25,19.4142136 2.25,19 L2.2499177,9.1809581 L2,9.1809581 C1.58861383,9.1809581 1.26100816,8.85177517 1.25019345,8.45257581 L1.25422443,8.35146727 L1.57398886,5.35146727 C1.61462915,4.97018387 1.93632126,4.6809581 2.31976443,4.6809581 L15.2499177,4.6809581 L15.25,2.22641265 C15.25,1.95255244 15.5275095,1.725831 15.8891705,1.68687223 L16,1.6809581 Z M20.2499177,9.1809581 L3.7499177,9.1809581 L3.75,18.2499581 L5.2499177,18.2499581 L5.25,11 C5.25,10.6203042 5.53215388,10.306509 5.89822944,10.2568466 L6,10.25 L10,10.25 C10.4142136,10.25 10.75,10.5857864 10.75,11 L10.7499177,18.2499581 L20.25,18.2499581 L20.2499177,9.1809581 Z M9.25,11.7499581 L6.75,11.7499581 L6.75,18.2499581 L9.25,18.2499581 L9.25,11.7499581 Z M18,10.25 C18.4142136,10.25 18.75,10.5857864 18.75,11 L18.75,16 C18.75,16.4142136 18.4142136,16.75 18,16.75 L13,16.75 C12.5857864,16.75 12.25,16.4142136 12.25,16 L12.25,11 C12.25,10.5857864 12.5857864,10.25 13,10.25 L18,10.25 Z M17.25,11.75 L13.75,11.75 L13.75,15.25 L17.25,15.25 L17.25,11.75 Z M21.005,6.18 L2.994,6.18 L2.834,7.68 L21.165,7.68 L21.005,6.18 Z M17.25,3.18 L16.75,3.18 L16.7499177,4.6809581 L17.2499177,4.6809581 L17.25,3.18 Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M13,3.25 C13.4142136,3.25 13.75,3.58578644 13.75,4 C13.75,4.37969577 13.4678461,4.69349096 13.1017706,4.74315338 L13,4.75 L12.885,4.75 L13.635,9.25 L16.25,9.25 L16.25,7.33333333 C16.25,6.1827401 17.1827401,5.25 18.3333333,5.25 C18.7475469,5.25 19.0833333,5.58578644 19.0833333,6 C19.0833333,6.37969577 18.8011795,6.69349096 18.4351039,6.74315338 L18.3333333,6.75 C18.0433838,6.75 17.8028434,6.96154546 17.7576348,7.23871364 L17.75,7.33333333 L17.75,9.25 L21,9.25 C21.3765225,9.25 21.6888337,9.52762942 21.7420147,9.89026233 L21.7499475,9.99112502 L21.7889737,13.2933309 L21.7891122,16.4114952 C22.377321,16.9158536 22.75,17.6644049 22.75,18.5 C22.75,20.0187831 21.5187831,21.25 20,21.25 C18.4812169,21.25 17.25,20.0187831 17.25,18.5 C17.25,18.2397927 17.2861395,17.9880263 17.353673,17.7494462 L11.5835794,17.7508477 C11.0345747,19.7673357 9.19043477,21.25 7,21.25 C4.37664744,21.25 2.25,19.1233526 2.25,16.5 C2.25,14.9022048 3.03890441,13.4886682 4.24844389,12.6276593 L4.25,10 L4.251,9.977 L4.25396914,9.92294189 L4.78103556,4.82019774 C4.87318511,3.92806057 5.6248906,3.25 6.52177424,3.25 L13,3.25 Z M7,15 C7.82842712,15 8.5,15.6715729 8.5,16.5 C8.5,17.3284271 7.82842712,18 7,18 C6.17157288,18 5.5,17.3284271 5.5,16.5 C5.5,15.6715729 6.17157288,15 7,15 Z M20.259,10.75 L5.75,10.75 L5.75014376,11.9161508 C6.14838678,11.8078193 6.56744118,11.75 7,11.75 C9.53963576,11.75 11.6137624,13.7430814 11.7435557,16.2504201 L18.4190615,16.2495769 C18.8662859,15.9348197 19.4115595,15.75 20,15.75 C20.0975021,15.75 20.1938191,15.7550742 20.2887012,15.7649731 L20.288,14.995 L18,14.9953755 C17.5857864,14.9953755 17.25,14.6595891 17.25,14.2453755 C17.25,13.8656798 17.5321539,13.5518846 17.8982294,13.5022221 L18,13.4953755 L20.289,13.495 L20.2890262,13.3022059 L20.285,12.995 L17,12.9953755 C16.5857864,12.9953755 16.25,12.6595891 16.25,12.2453755 C16.25,11.8656798 16.5321539,11.5518846 16.8982294,11.5022221 L17,11.4953755 L20.268,11.495 L20.259,10.75 Z M11.364,4.75 L6.52177424,4.75 C6.39364801,4.75 6.28626151,4.8468658 6.27309729,4.97431396 L5.831,9.25 L12.114,9.25 L11.364,4.75 Z M19.6195506,17.3089507 L19.597,17.316 L19.5613953,17.3291144 C19.5422291,17.3362971 19.5232863,17.343937 19.5045801,17.3520207 L19.554,17.331 L19.5025137,17.3529159 L19.473,17.366 L19.4495683,17.3774016 L19.406,17.4 L19.396,17.405 L19.393,17.407 L19.394,17.406 L19.3413545,17.4374022 L19.29,17.47 L19.286,17.473 L19.2417277,17.5061757 L19.2339935,17.5121335 L19.193,17.545 L19.168,17.567 L19.1402159,17.5926531 L19.099372,17.6331824 L19.055,17.681 L19.044,17.694 L18.9835687,17.7722595 C18.8365522,17.9772325 18.75,18.2285086 18.75,18.5 C18.75,19.1903559 19.3096441,19.75 20,19.75 C20.6903559,19.75 21.25,19.1903559 21.25,18.5 C21.25,18.1636476 21.1171521,17.8583235 20.9010643,17.6336359 L20.8775046,17.609786 L20.859,17.592 L20.806896,17.5452825 L20.764,17.511 L20.7132124,17.4733038 L20.663,17.44 L20.709,17.47 L20.6640388,17.4407714 C20.6473791,17.4303053 20.6304551,17.4202213 20.6132789,17.4105318 L20.6582376,17.437149 L20.607,17.407 L20.606,17.406 L20.608,17.407 L20.579,17.392 L20.5554129,17.3798624 L20.526,17.366 L20.4970931,17.3527453 L20.444,17.331 L20.439,17.329 L20.436,17.328 L20.3704563,17.3058078 L20.343,17.298 L20.3215626,17.2917495 L20.301,17.286 L20.299,17.286 L20.287,17.283 L20.278,17.281 L20.2161621,17.2686221 C20.189209,17.2639234 20.1619594,17.260088 20.1344426,17.2571455 L20,17.25 L19.8675963,17.2569292 L19.7391835,17.2772502 L19.697,17.287 L19.6787802,17.2916586 L19.6292244,17.3059068 L19.6195506,17.3089507 Z M4.825,14.084 L4.80583272,14.1024474 L4.76257307,14.1427844 L4.739,14.165 L4.72545248,14.1785909 L4.72,14.183 L4.726,14.178 L4.68781142,14.2160809 L4.659,14.245 L4.642,14.263 L4.527,14.391 L4.526,14.392 L4.4830643,14.443747 L4.475,14.453 L4.458,14.475 L4.419,14.525 L4.441,14.496 L4.41342069,14.5319465 L4.409,14.537 L4.39740495,14.5531419 L4.357,14.607 L4.345,14.623 L4.341,14.629 L4.22733671,14.8035779 C3.92455854,15.297389 3.75,15.8783094 3.75,16.5 C3.75,18.2949254 5.20507456,19.75 7,19.75 C8.29977359,19.75 9.42133763,18.9869942 9.94121897,17.8844557 L10.0005213,17.7509517 C10.0508957,17.6302639 10.094201,17.5058889 10.1299197,17.3783439 L10.129,17.377 L10.136,17.353 L10.136,17.352 L10.142,17.331 L10.142,17.33 L10.142,17.329 L10.148,17.309 L10.148,17.308 L10.149,17.305 L10.154,17.285 L10.158,17.268 L10.161,17.257 L10.161,17.256 L10.162,17.25 L10.169,17.22 L10.1770542,17.1879187 L10.183,17.157 L10.185,17.144 L10.196,17.09 L10.204,17.044 L10.2121914,16.9973016 L10.213,16.991 L10.221,16.932 L10.2260576,16.8964913 L10.222,16.921 L10.227,16.887 L10.229,16.866 L10.236,16.798 L10.237,16.785 L10.242,16.717 L10.2470011,16.6408893 C10.2489936,16.5941748 10.25,16.5472049 10.25,16.5 L10.2448552,16.3155761 C10.1492459,14.6064548 8.73303146,13.25 7,13.25 C6.4585275,13.25 5.94798275,13.3824175 5.49898201,13.6166361 L5.4111328,13.6641982 L5.374,13.686 L5.26725777,13.7499364 C5.22086499,13.7792287 5.17526494,13.8096625 5.13049706,13.8411984 L4.99872943,13.9390727 L4.97823867,13.9552402 L4.919,14.003 L4.945,13.981 L4.88075211,14.0359276 L4.853,14.059 L4.825,14.084 Z"/></svg>
|
package/item/item.component.d.ts
CHANGED
|
@@ -12,7 +12,10 @@ export declare class ItemComponent {
|
|
|
12
12
|
reorderable: boolean;
|
|
13
13
|
size: ItemSize | `${ItemSize}`;
|
|
14
14
|
rotateIcon: boolean;
|
|
15
|
+
private checkbox;
|
|
16
|
+
private radio;
|
|
15
17
|
onMouseDown(event: MouseEvent): void;
|
|
18
|
+
get _isIonicButton(): boolean;
|
|
16
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<ItemComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ItemComponent, "kirby-item", never, { "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disclosure": { "alias": "disclosure"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "rotateIcon": { "alias": "rotateIcon"; "required": false; }; }, {},
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ItemComponent, "kirby-item", never, { "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disclosure": { "alias": "disclosure"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "reorderable": { "alias": "reorderable"; "required": false; }; "size": { "alias": "size"; "required": false; }; "rotateIcon": { "alias": "rotateIcon"; "required": false; }; }, {}, ["checkbox", "radio"], ["[slot='outside']", "*"], false, never>;
|
|
18
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirbydesign/designsystem",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"description": "The Kirby Design Angular Components.",
|
|
5
5
|
"author": "kirby@bankdata.dk",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@angular/core": "^17.0.0",
|
|
32
32
|
"@angular/forms": "^17.0.0",
|
|
33
33
|
"@angular/router": "^17.0.0",
|
|
34
|
-
"@ionic/angular": "
|
|
34
|
+
"@ionic/angular": "8.2.7",
|
|
35
35
|
"chart.js": "^3.9.1",
|
|
36
36
|
"chartjs-adapter-date-fns": "^2.0.0",
|
|
37
37
|
"chartjs-plugin-annotation": "^1.0.2",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { IonicElementPartHelper } from '@kirbydesign/designsystem/helpers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class RadioComponent implements AfterViewInit {
|
|
4
|
+
export declare class RadioComponent implements AfterViewInit, OnInit, AfterContentInit {
|
|
5
|
+
private element;
|
|
5
6
|
private ionicElementPartHelper;
|
|
6
7
|
private ionRadioElement?;
|
|
7
8
|
value: any;
|
|
@@ -9,10 +10,16 @@ export declare class RadioComponent implements AfterViewInit {
|
|
|
9
10
|
size: 'xs' | 'sm' | 'md';
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
get _isDisabled(): string;
|
|
13
|
+
_labelText: string;
|
|
12
14
|
get buttonTabIndex(): number;
|
|
13
|
-
|
|
15
|
+
_justify: 'start' | 'end' | 'space-between';
|
|
16
|
+
_labelPlacement: 'end' | 'fixed' | 'stacked' | 'start';
|
|
17
|
+
_hasSlottedContent: boolean;
|
|
18
|
+
constructor(element: ElementRef<HTMLElement>, ionicElementPartHelper: IonicElementPartHelper);
|
|
19
|
+
ngOnInit(): void;
|
|
14
20
|
ngAfterViewInit(): void;
|
|
21
|
+
ngAfterContentInit(): void;
|
|
15
22
|
focus(): void;
|
|
16
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "kirby-radio", never, { "value": { "alias": "value"; "required": false; }; "text": { "alias": "text"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never,
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "kirby-radio", never, { "value": { "alias": "value"; "required": false; }; "text": { "alias": "text"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
18
25
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward "@kirbydesign/core/scss/base/design-tokens";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward "@kirbydesign/core/scss/themes/design-tokens";
|
package/shared/public_api.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ToggleComponent implements ControlValueAccessor {
|
|
4
|
+
export declare class ToggleComponent implements ControlValueAccessor, OnInit {
|
|
5
5
|
private cdr;
|
|
6
|
-
|
|
6
|
+
private elementRef;
|
|
7
|
+
constructor(cdr: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>);
|
|
8
|
+
ngOnInit(): void;
|
|
9
|
+
_ariaLabel: string;
|
|
10
|
+
private inheritAriaAttributes;
|
|
7
11
|
checked: boolean;
|
|
8
12
|
disabled: boolean;
|
|
9
13
|
get _isDisabled(): string;
|
|
@@ -45,5 +49,5 @@ export declare class ToggleComponent implements ControlValueAccessor {
|
|
|
45
49
|
*/
|
|
46
50
|
setDisabledState?(isDisabled: boolean): void;
|
|
47
51
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToggleComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleComponent, "kirby-toggle", never, { "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never,
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToggleComponent, "kirby-toggle", never, { "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, ["*"], true, never>;
|
|
49
53
|
}
|