@oiz/stzh-components 3.3.0-beta2 → 3.3.0-beta5
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/dist/cjs/{app-globals-a46f6656.js → app-globals-95815145.js} +2 -2
- package/dist/cjs/{app-globals-a46f6656.js.map → app-globals-95815145.js.map} +1 -1
- package/dist/cjs/{arrow-16638ece.js → arrow-6135123b.js} +116 -49
- package/dist/cjs/arrow-6135123b.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stzh-app-nav.cjs.entry.js +9 -1
- package/dist/cjs/stzh-app-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +1 -1
- package/dist/cjs/stzh-popover_2.cjs.entry.js +21 -9
- package/dist/cjs/stzh-popover_2.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-tooltip.cjs.entry.js +20 -8
- package/dist/cjs/stzh-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js +1 -1
- package/dist/cjs/stzh-upload.cjs.entry.js.map +1 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.js +32 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.js.map +1 -1
- package/dist/collection/components/stzh-app-nav/stzh-app-nav.stories.js +1 -1
- package/dist/collection/components/stzh-header/stzh-header.stories.js +2 -2
- package/dist/collection/components/stzh-popover/stzh-popover.js +20 -8
- package/dist/collection/components/stzh-popover/stzh-popover.js.map +1 -1
- package/dist/collection/components/stzh-row/stzh-row.css +240 -184
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +19 -7
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js.map +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js +1 -1
- package/dist/collection/components/stzh-upload/stzh-upload.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/arrow.js +115 -48
- package/dist/components/arrow.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-app-nav2.js +10 -2
- package/dist/components/stzh-app-nav2.js.map +1 -1
- package/dist/components/stzh-popover2.js +20 -8
- package/dist/components/stzh-popover2.js.map +1 -1
- package/dist/components/stzh-row.js +1 -1
- package/dist/components/stzh-row.js.map +1 -1
- package/dist/components/stzh-tooltip2.js +19 -7
- package/dist/components/stzh-tooltip2.js.map +1 -1
- package/dist/components/stzh-upload.js +1 -1
- package/dist/components/stzh-upload.js.map +1 -1
- package/dist/esm/{app-globals-93cc928b.js → app-globals-10ef946d.js} +2 -2
- package/dist/esm/{app-globals-93cc928b.js.map → app-globals-10ef946d.js.map} +1 -1
- package/dist/esm/{arrow-fc956b24.js → arrow-8f47d7ea.js} +116 -49
- package/dist/esm/arrow-8f47d7ea.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stzh-app-nav.entry.js +10 -2
- package/dist/esm/stzh-app-nav.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +1 -1
- package/dist/esm/stzh-popover_2.entry.js +21 -9
- package/dist/esm/stzh-popover_2.entry.js.map +1 -1
- package/dist/esm/stzh-row.entry.js +1 -1
- package/dist/esm/stzh-row.entry.js.map +1 -1
- package/dist/esm/stzh-tooltip.entry.js +20 -8
- package/dist/esm/stzh-tooltip.entry.js.map +1 -1
- package/dist/esm/stzh-upload.entry.js +1 -1
- package/dist/esm/stzh-upload.entry.js.map +1 -1
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-097bf2c2.js → p-45be0b3e.js} +2 -2
- package/dist/stzh-components/p-7423c6c2.js +2 -0
- package/dist/stzh-components/p-7423c6c2.js.map +1 -0
- package/dist/stzh-components/{p-d1aa8602.entry.js → p-8202e541.entry.js} +2 -2
- package/dist/stzh-components/p-8202e541.entry.js.map +1 -0
- package/dist/stzh-components/p-ab6cc68f.entry.js +2 -0
- package/dist/stzh-components/p-ab6cc68f.entry.js.map +1 -0
- package/dist/stzh-components/p-b047262a.entry.js +2 -0
- package/dist/stzh-components/p-b047262a.entry.js.map +1 -0
- package/dist/stzh-components/{p-288fd6f7.entry.js → p-bb4dea97.entry.js} +2 -2
- package/dist/stzh-components/{p-288fd6f7.entry.js.map → p-bb4dea97.entry.js.map} +1 -1
- package/dist/stzh-components/p-dc4f385d.entry.js +2 -0
- package/dist/stzh-components/p-dc4f385d.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/types/components/stzh-app-nav/stzh-app-nav.d.ts +5 -1
- package/dist/types/components/stzh-popover/stzh-popover.d.ts +3 -0
- package/dist/types/components/stzh-tooltip/stzh-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/index.d.ts +5 -0
- package/package.json +2 -2
- package/dist/cjs/arrow-16638ece.js.map +0 -1
- package/dist/esm/arrow-fc956b24.js.map +0 -1
- package/dist/stzh-components/p-6a1d65ce.entry.js +0 -2
- package/dist/stzh-components/p-6a1d65ce.entry.js.map +0 -1
- package/dist/stzh-components/p-a2da1df4.js +0 -2
- package/dist/stzh-components/p-a2da1df4.js.map +0 -1
- package/dist/stzh-components/p-d1aa8602.entry.js.map +0 -1
- package/dist/stzh-components/p-e9933daa.entry.js +0 -2
- package/dist/stzh-components/p-e9933daa.entry.js.map +0 -1
- package/dist/stzh-components/p-f42f6787.entry.js +0 -2
- package/dist/stzh-components/p-f42f6787.entry.js.map +0 -1
- /package/dist/stzh-components/{p-097bf2c2.js.map → p-45be0b3e.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index2.js","mappings":"AAAA;AACA;AACA;IAwwDiB,IAoMhB;AApMD,WAAiB,GAAG;EACL,oBAAgB,GAAG,QAAQ,CAAC;EAE5B,kBAAc,GAAG,QAAQ,CAAC;EAC1B,2BAAuB,GAAG,sBAAsB,CAAC;EAEjD,sBAAkB,GAAG,YAAY,CAAC;EAClC,2BAAuB,GAAG,GAAG,CAAC;EAC9B,4BAAwB,GAAG,GAAG,CAAC;EAC/B,sBAAkB,GAAG,GAAG,CAAC;EACzB,qBAAiB,GAAG,GAAG,CAAC;EACxB,mBAAe,GAAG,GAAG,CAAC;AAyLrC,CAAC,EApMgB,GAAG,KAAH,GAAG;;;;","names":[],"sources":["src/index.ts"],"sourcesContent":["// ---\n// Global window types\n// ---\n\nimport { StzhLocaleAdapter } from \"./utils/date-adapter\";\n\nimport {\n StzhLocaleComponent,\n StzhLocaleFormats,\n StzhLocaleGlobals,\n} from \"./utils/translation-utils\";\n\nexport type WindowStzhComponents = {\n version: string;\n supportedLocales: string[];\n defaultLocale: string;\n translations: null | StzhLocaleComponent;\n translationsLoading: Promise<StzhLocaleComponent>;\n pathMedia: string;\n pathTranslations: string;\n pathVendors: string;\n cacheTranslations: boolean;\n formats: StzhLocaleFormats;\n fixAutofocus: boolean;\n fixHashfocus: boolean;\n utils: {\n getLocale: (element: HTMLElement) => string;\n fetchTranslations: (\n host: HTMLElement,\n component: string\n ) => Promise<StzhLocaleComponent & any>;\n\n format: (date: Date, type: string) => string;\n parse: (string: string, type: string) => Date;\n formatSpan: (\n date: Date | string,\n date2: Date | string,\n type: string\n ) => string;\n parseSpan: (string: string, type: string) => [Date, Date, string];\n createFormatParseAdapter: (\n formats: StzhLocaleFormats,\n globals: StzhLocaleGlobals\n ) => StzhLocaleAdapter;\n };\n};\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents;\n // global third party library\n pannellum: any;\n Dropzone: any;\n proj4: any;\n // readspeaker lib APIs\n readpage: any;\n ReadSpeaker: any;\n rsConf: any;\n rspkr: any;\n }\n}\n\n// ---\n// Event Types\n// ---\n\n/* Sortable */\n\nexport type StzhSortableUpdateEvent = {\n component: \"stzh-sortable\";\n data: string[];\n item: HTMLElement;\n newIndex: number;\n oldIndex: number;\n};\n\nexport type StzhSortableDisableEvent = {\n component: \"stzh-sortable\";\n disabled: boolean;\n};\n\n/* Panorama */\n\nexport type PanoramaScene = {\n sceneId: string;\n imageSrc: string;\n imageTitle: string;\n\n imageAuthor?: string;\n imageType?: \"equirectangular\" | \"cubemap\" | \"multires\";\n caption?: string;\n copyright?: string;\n\n pitch?: number;\n yaw?: number;\n hfov?: number;\n\n hotspots: PanoramaSceneHotSpot[];\n};\n\nexport type PanoramaScenesLibrary = {\n [sceneKey: string]: {\n title?: string;\n author?: string;\n panorama: string;\n type?: \"equirectangular\" | \"cubemap\" | \"multires\";\n\n pitch?: number;\n yaw?: number;\n hfov?: number;\n\n hotSpots: PanoramaSceneHotSpot[];\n };\n};\n\nexport type PanoramaSceneHotSpot = {\n pitch: number;\n yaw: number;\n type: string;\n text: string;\n url?: string;\n id?: string;\n sceneId?: string;\n targetPitch?: number;\n targetYaw?: number;\n\n cssClass?: string;\n createTooltipFunc?: Function;\n createTooltipArgs?: any;\n};\n\nexport type StzhPanoramaLoadEvent = {\n component: \"stzh-panorama\";\n};\n\nexport type StzhPanoramaChangeEvent = {\n component: \"stzh-panorama\";\n value: { pitch: number; yaw: number; hfov: number };\n};\n\nexport type StzhPanoramaFullscreenChangeEvent = {\n component: \"stzh-panorama\";\n value: boolean;\n};\n\nexport type StzhPanoramaSceneChangeEvent = {\n component: \"stzh-panorama\";\n value: string;\n};\n\nexport type StzhPanoramaZoomChangeEvent = {\n component: \"stzh-panorama\";\n value: number;\n};\n\n/* Iframe */\n\nexport type StzhIframeView = \"iframe\" | \"cookiewall\" | \"preview\";\n\nexport type StzhIframeViewChangeEvent = {\n component: \"stzh-iframe\";\n value: StzhIframeView;\n};\n\nexport type StzhIframePreviewSkipEvent = {\n component: \"stzh-iframe\";\n};\n\n/* Olmap */\n\nexport type OlmapLayer = {\n title?: string;\n thumbnailUrl: string;\n options: {\n url: string;\n layer: string;\n matrixSet: string;\n origin: number[];\n extent: number[];\n };\n};\n\nexport type StzhOlmapInitializedEvent = {\n component: \"stzh-olmap\";\n};\n\nexport type StzhOlmapPostRenderEvent = {\n component: \"stzh-olmap\";\n};\n\nexport type StzhOlmapMoveStartEvent = {\n component: \"stzh-olmap\";\n};\n\nexport type StzhOlmapMoveEndEvent = {\n component: \"stzh-olmap\";\n};\n\n/* Sticky */\n\nexport type StzhStickyStuckTopEvent = {\n component: \"stzh-sticky\";\n sticky: boolean;\n};\n\nexport type StzhStickyStuckBottomEvent = {\n component: \"stzh-sticky\";\n sticky: boolean;\n};\n\n/* Table */\n\nexport type StzhDatatableCellData = {\n value: string | number;\n isHeader?: boolean;\n align?: \"left\" | \"right\" | \"center\";\n valign?: \"auto\" | \"middle\" | \"bottom\" | \"top\";\n colspan?: number;\n rowspan?: number;\n id?: string;\n};\n\nexport type StzhDatatableRowData = {\n [key: string]: StzhDatatableCellData;\n};\n\nexport type StzhDatatableInputRowData = {\n [key: string]: StzhDatatableCellData | string | number;\n};\n\nexport type StzhDatatableColumnData = {\n key: string;\n text?: string;\n align?: \"left\" | \"right\" | \"center\";\n valign?: \"auto\" | \"middle\" | \"bottom\" | \"top\";\n sort?:\n | boolean\n | {\n type?: \"numerical\" | \"text\";\n field?: string;\n };\n fixed?: \"left\" | \"right\";\n isHeader?: boolean;\n colspan?: number;\n rowspan?: number;\n hideColumnHeading?: boolean;\n analyticsId?: string;\n style?: {\n [key: string]: string;\n };\n};\n\nexport type StzhDatatableRowClickEvent = {\n component: \"stzh-datatable\";\n row: any;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableCellClickEvent = {\n component: \"stzh-datatable\";\n row: any;\n column: any;\n cellIndex: number;\n rowIndex: number;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableHeadingCellClickEvent = {\n component: \"stzh-datatable\";\n column: any;\n index: number;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableSortClickEvent = {\n component: \"stzh-datatable\";\n column: any;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableSortByChangeEvent = {\n component: \"stzh-datatable\";\n value: string;\n oldValue: string;\n};\n\nexport type StzhDatatableSortDirectionChangeEvent = {\n component: \"stzh-datatable\";\n value: \"asc\" | \"desc\";\n oldValue: \"asc\" | \"desc\";\n};\n\n/* Archivelist */\n\nexport type StzhArchivelistItem = {\n label: string;\n labelClamp?: any; // attributes of HTMLStzhClampElement\n href: string;\n dateline?: string;\n description?: string;\n descriptionClamp?: any; // attributes of HTMLStzhClampElement\n};\n\nexport type StzhArchivelistItemClickEvent = {\n component: \"stzh-archivelist\";\n item: StzhArchivelistItem;\n originalEvent: MouseEvent;\n};\n\n/* Anchornav */\n\nexport type StzhAnchornavItem = {\n label: string;\n href?: string;\n icon?: string;\n};\n\nexport type StzhAnchornavItemClickEvent = {\n component: \"stzh-anchornav\";\n item: StzhAnchornavItem;\n originalEvent: MouseEvent;\n};\n\n/* TopnewsMostsearchedSection */\n\nexport type StzhTopnewsItem = {\n subtitle?: string;\n label: string;\n href?: string;\n isHighlighted?: boolean;\n};\n\nexport type StzhMostsearchedItem = {\n label: string;\n href: string;\n};\n\n/* VBZ Quicklinks */\n\nexport type StzhVbzQuicklink = {\n label: string;\n href: string;\n};\n\n/* Status */\n\nexport type StzhStatusType =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\";\n\n/* Badge */\n\nexport type StzhBadgeType =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\";\n\n/* Actionset */\n\nexport type StzhActionsetItem = {\n id: string;\n label?: string;\n icon?: string;\n iconPosition?: \"left\" | \"right\";\n iconOnly?: boolean;\n badge?: string;\n badgeEmpty?: boolean;\n badgeType?: StzhBadgeType;\n variant?: StzhButtonVariant;\n size?: StzhButtonSize;\n badgePosition?: \"icon\" | \"button\";\n tooltipContent?: string;\n};\n\nexport type StzhActionsetItemClickEvent = {\n component: \"stzh-actionset\";\n action: StzhActionsetItem;\n originalEvent: MouseEvent;\n};\n\n/* Audio */\n\nexport type StzhAudioPlayEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioPlayingEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioPauseEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioReplayEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioEndEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioEndedEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioErrorEvent = {\n component: \"stzh-audio\";\n originalEvent: ErrorEvent;\n};\n\n/* Share */\n\nexport type ShareService =\n | \"facebook\"\n | \"twitter\"\n | \"linkedin\"\n | \"xing\"\n | \"mail\";\n\n/* Footer Editor */\n\nexport type StzhEditorLink = {\n label: string;\n href?: string;\n icon?: string;\n rel?: string;\n target?: string;\n};\n\n/* Header */\n\nexport type StzhHeaderMenuItem = {\n label: string;\n href?: string;\n items?: StzhHeaderMenuItem[];\n id?: string;\n};\n\nexport type StzhHeaderMetanavItem = {\n label: string;\n labelShort?: string;\n labelHidden?: boolean;\n stay?: boolean;\n stayAndShowInMobileMenu?: boolean;\n variant?: \"default\" | \"secondary\"; // used for menu-item and popover\n size?: \"default\" | \"large\"; // used for menu-item and popover\n important?: boolean;\n importantSubmenu?: boolean;\n badgeEmpty?: boolean;\n badgeType?: StzhBadgeType;\n badge?: string;\n icon?: string;\n iconOpen?: string;\n href?: string;\n target?: string;\n id?: string;\n items?: StzhHeaderMetanavItemChild[];\n itemButton?: StzhHeaderMetanavItemButton;\n cssOrder?: boolean;\n};\n\nexport type StzhHeaderMetanavItemChild = {\n label: string;\n href?: string;\n target?: string;\n id?: string;\n icon?: string;\n counter?: number;\n badge?: string;\n badgeType?: StzhBadgeType;\n};\n\nexport type StzhHeaderMetanavItemButton = {\n label: string;\n href?: string;\n target?: string;\n size?: StzhButtonSize;\n id?: string;\n};\n\nexport type StzhHeaderMetanavItemClickEvent = {\n component: \"stzh-header\";\n item: StzhHeaderMetanavItem;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderMetanavItemChildClickEvent = {\n component: \"stzh-header\";\n itemChild: StzhHeaderMetanavItemChild;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderMetanavItemButtonClickEvent = {\n component: \"stzh-header\";\n itemButton: StzhHeaderMetanavItemButton;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderMenuItemClickEvent = {\n component: \"stzh-header\";\n item: StzhHeaderMenuItem;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderLanguageChangeEvent = {\n component: \"stzh-header\";\n value: string;\n};\n\nexport type StzhHeaderSearchChangeEvent = {\n component: \"stzh-header\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\nexport type StzhHeaderSearchChangedEvent = {\n component: \"stzh-header\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\n/* App Nav */\nexport type StzhAppNavItem = {\n text: string;\n href: string;\n badge: string;\n badgeType: StzhBadgeType;\n icon: string;\n active: boolean;\n a11yCurrent: string;\n};\n\n/* PI Pagetitle */\n\nexport type StzhPiPagetitleMenuItem = {\n label: string;\n href?: string;\n active?: boolean;\n items?: StzhPiPagetitleMenuItem[];\n id?: string;\n};\n\n/* Search */\n\nexport type StzhSearchOverlayCloseClickEvent = {\n component: \"stzh-search\";\n originalEvent: MouseEvent;\n};\n\n/* Breadcrumb */\n\nexport type StzhBreadcrumbItem = {\n label: string;\n href: string;\n};\n\nexport type StzhBreadcrumbItemClickEvent = {\n component: \"stzh-breadcrumb\";\n item: StzhBreadcrumbItem;\n originalEvent: MouseEvent;\n};\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string;\n label?: string;\n icon?: string;\n badge?: string;\n badgeEmpty?: boolean;\n badgeType?: StzhBadgeType;\n};\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\";\n originalEvent: MouseEvent;\n};\n\nexport type StzhCardCollapseEvent = {\n component: \"stzh-card\";\n collapsed: boolean;\n};\n\nexport type StzhCardClickEvent = {\n component: \"stzh-card\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\";\n starred: boolean;\n originalEvent: MouseEvent;\n};\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\";\n action: StzhCardHeaderAction;\n originalEvent: MouseEvent;\n};\n\n/* Card Navigation */\n\nexport type StzhCardNavigationClickEvent = {\n component: \"stzh-card-navigation\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhPiCardNavigationClickEvent = {\n component: \"stzh-pi-content-navigation\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Pi Teaser */\n\nexport type StzhPiTeaserClickEvent = {\n component: \"stzh-pi-teaser\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Card Superteaser */\n\nexport type StzhCardSuperteaserClickEvent = {\n component: \"stzh-card-superteaser\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Card Searchresult */\n\nexport type StzhCardSearchresultClickEvent = {\n component: \"stzh-card-searchresult\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Search */\n\nexport type StzhSearchResult = {\n html?: string;\n href?: string;\n heading?: string;\n dateline?: string;\n description?: string;\n image?: string;\n imagePosition?: \"default\" | \"right\";\n tag?: string;\n topic?: string;\n service?: string;\n serviceColor?: string;\n serviceBackgroundColor?: string;\n meta?: string[];\n breadcrumbItems?: StzhBreadcrumbItem[];\n eventDateStart?: string;\n eventDateEnd?: string;\n eventLocation?: string;\n download?: string;\n downloadHeading?: string;\n downloadMeta?: string[];\n};\n\nexport type StzhSearchChipsResult = {\n label: string;\n value: string;\n amount?: number;\n options?: { text: string; value: string }[];\n};\n\n/* Microsite Teaserlist */\n\nexport type StzhMicrositeTeaserlistTag = {\n id: string;\n name: string;\n};\n\nexport type StzhMicrositeTeaserlistItem = {\n title?: string;\n description?: string;\n image?: string;\n link: string;\n tags: string[];\n teaserid: string;\n};\n\n/* Cardlist */\n\nexport type StzhCardlistCollapseAllEvent = {\n component: \"stzh-cardlist\";\n allCollapsed: boolean;\n};\n\n/* Calendar */\n\nexport type StzhCalendarChangeEvent = {\n component: \"stzh-calendar\";\n valueAsDate: Date;\n value: string;\n};\n\n/* Datepicker */\n\nexport type StzhDatepickerChangeEvent = {\n component: \"stzh-datepicker\";\n value: string;\n valueAsDate: Date;\n};\n\n/* Pagination */\n\nexport type StzhPaginationChangeEvent = {\n component: \"stzh-pagination\";\n page: number;\n};\n\n/* Timepicker */\n\nexport type StzhTimepickerChangeEvent = {\n component: \"stzh-timepicker\";\n value: string;\n};\n\n/* Monthyearpicker */\n\nexport type StzhMonthyearpickerChangeEvent = {\n component: \"stzh-monthyearpicker\";\n value: string;\n valueMonth: string;\n valueYear: string;\n};\n\n/* Amount */\n\nexport type StzhAmountChangeEvent = {\n component: \"stzh-amount\";\n value: string;\n};\n\n/* Appointments */\n\nexport type StzhAppointmentsChangeEvent = {\n component: \"stzh-appointments\";\n value: string;\n};\n\n/* Skiplink */\n\nexport type StzhSkiplinkFocusEvent = {\n component: \"stzh-skiplink\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhSkiplinkBlurEvent = {\n component: \"stzh-skiplink\";\n originalEvent: FocusEvent;\n};\n\n/* Checkbox */\n\nexport type StzhCheckboxChangeEvent = {\n component: \"stzh-checkbox\";\n originalEvent: InputEvent | Event;\n value: string;\n checked: boolean;\n};\n\nexport type StzhCheckboxFocusEvent = {\n component: \"stzh-checkbox\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCheckboxBlurEvent = {\n component: \"stzh-checkbox\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCheckboxgroupChangeEvent = {\n component: \"stzh-checkboxgroup\";\n value: string[];\n};\n\n/* Toggle */\n\nexport type StzhToggleChangeEvent = {\n component: \"stzh-toggle\";\n originalEvent: InputEvent;\n value: string;\n checked: boolean;\n};\n\nexport type StzhToggleFocusEvent = {\n component: \"stzh-toggle\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhToggleBlurEvent = {\n component: \"stzh-toggle\";\n originalEvent: FocusEvent;\n};\n\n/* Button */\n\nexport type StzhButtonVariant =\n | \"default\"\n | \"secondary\"\n | \"tertiary\"\n | \"tertiary-plain\";\nexport type StzhButtonSize = \"default\" | \"small\" | \"tiny\";\n\nexport type StzhButtonFocusEvent = {\n component: \"stzh-button\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhButtonClickEvent = {\n component: \"stzh-button\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhButtonChangeEvent = {\n component: \"stzh-button\";\n originalEvent: InputEvent;\n value: string;\n checked: boolean;\n};\n\n/* Link */\n\nexport type StzhLinkSize = \"default\" | \"small\" | \"inherit\";\n\nexport type StzhLinkFocusEvent = {\n component: \"stzh-link\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhLinkClickEvent = {\n component: \"stzh-link\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Menu (Item) */\n\nexport type StzhMenuVariant = \"default\" | \"secondary\";\nexport type StzhMenuSize = \"default\" | \"large\";\n\nexport type StzhMenuItemFocusEvent = {\n component: \"stzh-menu-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhMenuItemBlurEvent = {\n component: \"stzh-menu-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhMenuItemClickEvent = {\n component: \"stzh-menu-item\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Carousel */\n\nexport type StzhCarouselSlideStartEvent = {\n component: \"stzh-carousel\";\n index: number;\n};\n\nexport type StzhCarouselSlidePassedEvent = {\n component: \"stzh-carousel\";\n index: number;\n};\n\nexport type StzhCarouselSlideEndEvent = {\n component: \"stzh-carousel\";\n index: number;\n};\n\n/* Chipselect */\n\nexport type StzhChipselectItem = {\n label: string;\n value: string;\n disabled?: boolean;\n variant?: StzhChipVariant;\n type?: StzhChipType;\n inverted?: boolean;\n counter?: string;\n icon?: string;\n size?: StzhChipSize;\n};\n\nexport type StzhChipselectChangeEvent = {\n component: \"stzh-chipselect\";\n value: string[] | string;\n};\n\n/* Gallery */\n\nexport type StzhGalleryItem = {\n width: number;\n height: number;\n src: string;\n srcLightbox?: string;\n srcsetLightbox?: string;\n alt?: string;\n copyright?: string;\n heading?: string;\n headingLightbox?: string;\n caption?: string;\n captionLightbox?: string;\n lightboxHtml?: string;\n hideCounter?: boolean;\n};\n\n/* Datalist */\n\nexport type StzhDatalistItemEntry = {\n value: string;\n leadingIcon?: string;\n label?: string;\n meta?: string;\n icon?: string;\n iconLabel?: string;\n iconTooltip?: string;\n statusLabel?: string;\n statusType?: StzhStatusType;\n href?: string;\n rel?: string;\n target?: string;\n items?: StzhDatalistItemEntry[];\n};\n\nexport type StzhDatalistVariant = \"default\" | \"table\";\nexport type StzhDatalistDirection = \"vertical\" | \"horizontal\";\n\nexport type StzhDatalistVariantChangeEvent = {\n component: \"stzh-datalist\";\n value: StzhDatalistVariant;\n};\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\";\n value: \"vertical\" | \"horizontal\";\n};\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\";\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatalistItemClickEvent = {\n component: \"stzh-datalist-item\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Datamessagelist */\n\nexport type StzhDatamessagelistItemEntryMeta = {\n label: string;\n value: string;\n};\n\nexport type StzhDatamessagelistItemEntryAction = {\n id: string | number;\n icon: string;\n label: string;\n badge?: string;\n};\n\nexport type StzhDatamessagelistItemEntryTag = {\n icon: string;\n label: string;\n type?: StzhChipType;\n inverted?: boolean;\n};\n\nexport type StzhDatamessagelistItemEntryLoadingStatus = {\n percent: number;\n label: string;\n type: \"default\" | \"success\" | \"warning\" | \"error\";\n};\n\nexport type StzhDatamessagelistItemClickEvent = {\n component: \"stzh-datamessagelist-item\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\";\n action: StzhDatamessagelistItemEntryAction;\n originalEvent: MouseEvent;\n};\n\n/* Cta */\n\nexport type StzhCtaFocusEvent = {\n component: \"stzh-cta\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCtaBlurEvent = {\n component: \"stzh-cta\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCtaClickEvent = {\n component: \"stzh-cta\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Tag */\n\nexport type StzhTagSize = \"default\" | \"large\";\nexport type StzhTagType = \"default\" | \"secondary\";\n\nexport type StzhTagClickEvent = {\n component: \"stzh-tag\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhTagFocusEvent = {\n component: \"stzh-tag\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhTagBlurEvent = {\n component: \"stzh-tag\";\n originalEvent: FocusEvent;\n};\n\n/* Chip */\n\nexport type StzhChipVariant = \"tag\" | \"filter\" | \"input\";\nexport type StzhChipSize = \"default\" | \"small\" | \"large\";\nexport type StzhChipType = \"default\" | \"success\" | \"warning\" | \"error\" | \"info\";\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhChipRemoveEvent = {\n component: \"stzh-chip\";\n originalEvent: MouseEvent;\n};\n\nexport type StzhChipFocusEvent = {\n component: \"stzh-chip\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhChipBlurEvent = {\n component: \"stzh-chip\";\n originalEvent: FocusEvent;\n};\n\n/* VBZ Major Ticker */\n\nexport type StzhVbzMajortickerDisturbance = {\n id: string;\n head: string;\n text: string;\n startDate: Date;\n endDate: Date;\n altStart: string;\n altEnd: string;\n infoUrl?: VbzTickerInfoUrl;\n};\n\nexport type StzhVbzMajortickerDisturbanceFetchedEvent = {\n component: \"stzh-vbz-majorticker\";\n disturbance: StzhVbzMajortickerDisturbance | null;\n};\n\n/* VBZ Ticker */\n\nexport type VbzTickerInfoUrl = {\n name: string;\n url: string;\n};\n\nexport type VbzTickerDisturbance = {\n id: string;\n head: string;\n startDate: Date;\n endDate: Date;\n altStart: string;\n altEnd: string;\n baseType?: string;\n infoUrl?: VbzTickerInfoUrl;\n category:\n | typeof VBZ.DISTURBANCE_INFORMATION\n | typeof VBZ.DISTURBANCE_CONSTRUCTION\n | typeof VBZ.DISTURBANCE_NORMAL\n | typeof VBZ.DISTURBANCE_EVENT\n | typeof VBZ.DISTURBANCE_BUS;\n};\n\nexport type VbzTickerLine = {\n line: VBZ.Lines;\n name: string;\n disturbances: VbzTickerDisturbance[];\n // whether normal or big disturbance for this line exist\n alert: boolean;\n // 2 = Fernverkehr / 16 = Schiff / 32 = S-Bahn/Reg / 64 = Bus / 128 = Bergbahn / 256 = Nachtnetz / 512 = Tram\n category: \"2\" | \"16\" | \"32\" | \"64\" | \"128\" | \"256\" | \"512\";\n};\n\n/* VBZ Line Chip */\n\nexport type StzhVbzLinechipLine = {\n color: string;\n background: string;\n comment?: string;\n};\n\nexport type StzhVbzLinechipFocusEvent = {\n component: \"stzh-vbz-linechip\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhVbzLinechipBlurEvent = {\n component: \"stzh-vbz-linechip\";\n originalEvent: FocusEvent;\n};\n\n/* Clamp */\n\nexport type StzhClampClampEvent = {\n component: \"stzh-clamp\";\n clamped: boolean;\n};\n\nexport type StzhClampExpandEvent = {\n component: \"stzh-clamp\";\n expanded: boolean;\n};\n\n/* Image Comparison */\n\nexport type StzhImagecomparisonChangeEvent = {\n component: \"stzh-imagecomparison\";\n originalEvent: InputEvent;\n value: number;\n};\n\n/* Dialog */\n\nexport type StzhDialogOpenEvent = {\n component: \"stzh-dialog\";\n};\n\nexport type StzhDialogCloseEvent = {\n component: \"stzh-dialog\";\n};\n\n/* Contact */\n\nexport type ContactEmail = {\n label: string;\n text: string;\n href?: string;\n analyticsId?: string;\n};\n\nexport type ContactNumber = {\n type: \"tel\" | \"fax\";\n label: string;\n number: string;\n analyticsId?: string;\n};\n\nexport type StzhContactAvailabilityItem = {\n weekday: string;\n hours: string[];\n};\n\n/* Eventinfo */\n\nexport type StzhEventinfoItemInput = {\n calendarUrl?: string;\n calendarLabel?: string;\n start: string | Date;\n end: string | Date;\n};\n\nexport type StzhEventinfoItem = {\n calendarUrl?: string;\n calendarLabel?: string;\n start: Date;\n end: Date;\n};\n\nexport type StzhEventinfoMonth = {\n name: string;\n events: StzhEventinfoItem[];\n};\n\n/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\";\n};\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\";\n};\n\n/* Banner */\n\nexport type StzhBannerOpenEvent = {\n component: \"stzh-banner\";\n};\n\nexport type StzhBannerCloseEvent = {\n component: \"stzh-banner\";\n};\n\n/* Message */\n\nexport type StzhMessageOpenEvent = {\n component: \"stzh-message\";\n};\n\nexport type StzhMessageCloseEvent = {\n component: \"stzh-message\";\n};\n\n/* Toastbar */\n\nexport type StzhToastbarInitialToast = {\n label: string;\n type?: StzhToastType;\n link?:\n | HTMLStzhLinkElement\n | {\n href: string;\n label: string;\n };\n cookie?: string;\n cookieExpires?: number;\n};\n\n/* Disturber */\n\nexport type StzhDisturberOpenEvent = {\n component: \"stzh-disturber\";\n};\n\nexport type StzhDisturberCloseEvent = {\n component: \"stzh-disturber\";\n};\n\nexport type StzhDisturberOpenedEvent = {\n component: \"stzh-disturber\";\n};\n\nexport type StzhDisturberClosedEvent = {\n component: \"stzh-disturber\";\n};\n\n/* Toast */\n\nexport type StzhToastType = \"info\" | \"success\" | \"warning\" | \"error\";\n\nexport type StzhToastOpenEvent = {\n component: \"stzh-toast\";\n};\n\nexport type StzhToastCloseEvent = {\n component: \"stzh-toast\";\n};\n\nexport type StzhToastOpenedEvent = {\n component: \"stzh-toast\";\n};\n\nexport type StzhToastClosedEvent = {\n component: \"stzh-toast\";\n};\n\n/* Ghettobox */\n\nexport type StzhGhettoboxOpenEvent = {\n component: \"stzh-ghettobox\";\n};\n\nexport type StzhGhettoboxCloseEvent = {\n component: \"stzh-ghettobox\";\n};\n\n/* Input */\n\nexport type StzhInputChangeEvent = {\n component: \"stzh-input\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\nexport type StzhInputChangedEvent = {\n component: \"stzh-input\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\nexport type StzhInputFocusEvent = {\n component: \"stzh-input\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhInputBlurEvent = {\n component: \"stzh-input\";\n originalEvent: FocusEvent;\n};\n\n/* Popover */\n\nexport type StzhPopoverOpenEvent = {\n component: \"stzh-popover\";\n};\n\nexport type StzhPopoverOpenedEvent = {\n component: \"stzh-popover\";\n};\n\nexport type StzhPopoverCloseEvent = {\n component: \"stzh-popover\";\n};\n\nexport type StzhPopoverClosedEvent = {\n component: \"stzh-popover\";\n};\n\n/* Timeline */\n\nexport type StzhTimelineFoldableChangeEvent = {\n component: \"stzh-timeline\";\n value: boolean;\n};\n\n/* TimelineItem */\n\nexport type StzhTimelineItemOpenEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemOpenedEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemCloseEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemClosedEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemFocusEvent = {\n component: \"stzh-timeline-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhTimelineItemBlurEvent = {\n component: \"stzh-timeline-item\";\n originalEvent: FocusEvent;\n};\n\n/* Accordion */\n\nexport type StzhAccordionVariant = \"default\" | \"title\" | \"table\" | \"menu\";\n\nexport type StzhAccordionVariantChangeEvent = {\n component: \"stzh-accordion\";\n value: StzhAccordionVariant;\n};\n\nexport type StzhAccordionItemOpenEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemOpenedEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemCloseEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemClosedEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemFocusEvent = {\n component: \"stzh-accordion-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhAccordionItemBlurEvent = {\n component: \"stzh-accordion-item\";\n originalEvent: FocusEvent;\n};\n\n/* Pi Menu */\n\nexport type StzhPiMenuOpenEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuOpenedEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuCloseEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuClosedEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuItemClickEvent = {\n component: \"stzh-pi-menu\";\n originalEvent: MouseEvent;\n};\n\n/* Tooltip */\n\nexport type StzhTooltipOpenEvent = {\n component: \"stzh-tooltip\";\n};\n\nexport type StzhTooltipOpenedEvent = {\n component: \"stzh-tooltip\";\n};\n\nexport type StzhTooltipCloseEvent = {\n component: \"stzh-tooltip\";\n};\n\nexport type StzhTooltipClosedEvent = {\n component: \"stzh-tooltip\";\n};\n\n/* Radio */\n\nexport type StzhRadioChangeEvent = {\n component: \"stzh-radio\";\n originalEvent: InputEvent;\n value: string;\n checked: boolean;\n};\n\nexport type StzhRadioFocusEvent = {\n component: \"stzh-radio\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhRadioBlurEvent = {\n component: \"stzh-radio\";\n originalEvent: FocusEvent;\n};\n\n/* Daterange */\n\nexport type StzhDaterangeRanges = \"today\" | \"tomorrow\" | \"next7days\";\n\n/* Dropdown */\n\nexport type StzhDropdownSize = \"default\" | \"small\" | \"tiny\" | StzhChipSize;\n\nexport type StzhDropdownOption = {\n text: string;\n value: string;\n disabled?: boolean;\n};\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\";\n value: string | string[];\n};\n\nexport type StzhDropdownItemAddEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownItemRemoveEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownOptionAddEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownOptionRemoveEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownOpenEvent = {\n component: \"stzh-dropdown\";\n};\n\nexport type StzhDropdowCloseEvent = {\n component: \"stzh-dropdown\";\n};\n\nexport type StzhDropdownFocusEvent = {\n component: \"stzh-dropdown\";\n originalEvent: {\n target: Element;\n };\n};\n\nexport type StzhDropdownBlurEvent = {\n component: \"stzh-dropdown\";\n};\n\nexport type StzhDropdowInitEvent = {\n component: \"stzh-dropdown\";\n};\n\n/** Progressbar */\n\nexport type StzhProgressbarDataItem = {\n label: string;\n icon?: string;\n disabled?: boolean;\n analyticsId?: string;\n};\n\n/* Progressbar Item */\n\nexport type StzhProgressbarItemClickEvent = {\n component: \"stzh-progressbar-item\";\n originalEvent: MouseEvent;\n index: number;\n};\n\nexport type StzhProgressbarItemDottedClickEvent = {\n component: \"stzh-progressbar-item\";\n originalEvent: MouseEvent;\n index: number;\n};\n\n/* Upload */\n\nexport type StzhUploadFilesItem = {\n name: string;\n size: number;\n [key: string]: any;\n};\n\nexport type StzhUploadFile = File & {\n xhr: XMLHttpRequest;\n status: string;\n upload: any;\n accepted: boolean;\n previewElement: HTMLElement;\n};\n\nexport type StzhUploadFileAddedEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadFilesAddedEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\nexport type StzhUploadFileRemoveEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadFileRemovedEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n force: boolean;\n};\n\nexport type StzhUploadSendingEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n xhr: XMLHttpRequest;\n formData: FormData;\n};\n\nexport type StzhUploadSendingMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n xhr: XMLHttpRequest;\n formData: FormData;\n};\n\nexport type StzhUploadProcessingEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadProcessingMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\nexport type StzhUploadProgressEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n progress: number;\n bytesSent: number;\n};\n\nexport type StzhUploadProgressTotalEvent = {\n component: \"stzh-upload\";\n totalUploadProgress: number;\n totalBytes: number;\n totalBytesSent: number;\n};\n\nexport type StzhUploadErrorEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n message: string;\n xhr: XMLHttpRequest;\n};\n\nexport type StzhUploadErrorMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n message: string;\n xhr: XMLHttpRequest;\n};\n\nexport type StzhUploadSuccessEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n responseText: string;\n event: ProgressEvent;\n};\n\nexport type StzhUploadSuccessMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n responseText: string;\n event: ProgressEvent;\n};\n\nexport type StzhUploadCanceledEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadCanceledMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\nexport type StzhUploadCompleteEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadCompleteMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\n// Merged Types\n\nexport type StzhFocusEvent =\n | StzhAccordionItemFocusEvent\n | StzhButtonFocusEvent\n | StzhCheckboxFocusEvent\n | StzhChipFocusEvent\n | StzhDropdownFocusEvent\n | StzhInputFocusEvent\n | StzhLinkFocusEvent\n | StzhMenuItemFocusEvent\n | StzhRadioFocusEvent\n | StzhToggleFocusEvent\n | StzhVbzLinechipFocusEvent\n | StzhSkiplinkFocusEvent;\n\n// ---\n// Prop Types\n// ---\n\nexport type StzhCalendarDateDisabledPredicate = (date: Date) => boolean;\n\nexport namespace Layout {\n export type Ratio = \"16:9\" | \"1:1\" | \"5:4\" | \"4:3\" | \"3:2\" | \"2:1\" | \"21:9\";\n\n export type Justify =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\n export type Items = \"start\" | \"end\" | \"center\" | \"baseline\" | \"stretch\";\n\n export type JustifySelf = \"auto\" | Justify;\n\n export type AlignSelf = \"auto\" | Items;\n}\n\nexport namespace Space {\n export type Sizes =\n | \"xxxsmall\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\"\n | \"xxxxlarge\"\n | \"big\"\n | \"xbig\"\n | \"huge\"\n | \"xhuge\"\n | \"none\"\n | \"inherit\";\n\n export type Curves =\n | \"tiny\"\n | \"small\"\n | \"regular\"\n | \"medium\"\n | \"large\"\n | \"big\"\n | \"huge\"\n | \"none\";\n}\n\nexport namespace Font {\n export type Fonts = \"light\" | \"regular\" | \"medium\" | \"heavy\" | \"default\";\n\n export type Sizes =\n | \"pico\"\n | \"nano\"\n | \"micro\"\n | \"milli\"\n | \"centi\"\n | \"deci\"\n | \"regular\"\n | \"deca\"\n | \"hecto\"\n | \"kilo\"\n | \"mega\"\n | \"giga\"\n | \"hero\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"lead\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\n | \"h1home\"\n | \"default\"\n | \"none\";\n}\n\nexport namespace VBZ {\n export const BASE_TYPE_GLOBAL = \"GLOBAL\";\n\n export const CHANNEL_TICKER = \"ticker\";\n export const CHANNEL_INFO_URL_FILTER = \"stadt-zuerich.ch/vbz\";\n\n export const DISTURBANCE_GLOBAL = \"__global__\";\n export const DISTURBANCE_INFORMATION = \"0\";\n export const DISTURBANCE_CONSTRUCTION = \"1\";\n export const DISTURBANCE_NORMAL = \"2\";\n export const DISTURBANCE_EVENT = \"4\";\n export const DISTURBANCE_BUS = \"5\";\n\n export type Lines =\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | \"13\"\n | \"14\"\n | \"15\"\n | \"16\"\n | \"17\"\n | \"19\"\n | \"20\"\n | \"21\"\n | \"23\"\n | \"24\"\n | \"25\"\n | \"29\"\n | \"31\"\n | \"32\"\n | \"33\"\n | \"34\"\n | \"35\"\n | \"36\"\n | \"37\"\n | \"38\"\n | \"39\"\n | \"40\"\n | \"45\"\n | \"46\"\n | \"54\"\n | \"61\"\n | \"62\"\n | \"63\"\n | \"64\"\n | \"66\"\n | \"67\"\n | \"69\"\n | \"70\"\n | \"72\"\n | \"73\"\n | \"75\"\n | \"76\"\n | \"77\"\n | \"78\"\n | \"79\"\n | \"80\"\n | \"83\"\n | \"89\"\n | \"91\"\n | \"94\"\n | \"95\"\n | \"99\"\n | \"151\"\n | \"152\"\n | \"153\"\n | \"156\"\n | \"161\"\n | \"162\"\n | \"163\"\n | \"165\"\n | \"184\"\n | \"185\"\n | \"200\"\n | \"201\"\n | \"215\"\n | \"220\"\n | \"235\"\n | \"236\"\n | \"245\"\n | \"301\"\n | \"302\"\n | \"303\"\n | \"304\"\n | \"305\"\n | \"306\"\n | \"307\"\n | \"308\"\n | \"309\"\n | \"311\"\n | \"314\"\n | \"315\"\n | \"317\"\n | \"321\"\n | \"323\"\n | \"325\"\n | \"350\"\n | \"444\"\n | \"445\"\n | \"701\"\n | \"702\"\n | \"703\"\n | \"704\"\n | \"705\"\n | \"720\"\n | \"721\"\n | \"725\"\n | \"726\"\n | \"727\"\n | \"742\"\n | \"743\"\n | \"744\"\n | \"745\"\n | \"747\"\n | \"748\"\n | \"751\"\n | \"752\"\n | \"753\"\n | \"754\"\n | \"759\"\n | \"760\"\n | \"765\"\n | \"768\"\n | \"781\"\n | \"786\"\n | \"787\"\n | \"910\"\n | \"912\"\n | \"916\"\n | \"917\"\n | \"918\"\n | \"919\"\n | \"E\"\n | \"N\"\n | \"N1\"\n | \"N2\"\n | \"N4\"\n | \"N5\"\n | \"N6\"\n | \"N7\"\n | \"N8\"\n | \"N9\"\n | \"N10\"\n | \"N11\"\n | \"N12\"\n | \"N13\"\n | \"N14\"\n | \"N15\"\n | \"N16\"\n | \"N17\"\n | \"N18\"\n | \"N19\"\n | \"N30\"\n | \"N31\"\n | \"N32\"\n | \"N33\"\n | \"N34\"\n | \"N45\"\n | \"N72\"\n | \"N78\"\n | \"SN1\"\n | \"SN4\"\n | \"SN5\"\n | \"SN6\"\n | \"SN7\"\n | \"SN8\"\n | \"SN9\"\n | \"S2\"\n | \"S3\"\n | \"S4\"\n | \"S5\"\n | \"S6\"\n | \"S7\"\n | \"S8\"\n | \"S9\"\n | \"S10\"\n | \"S11\"\n | \"S14\"\n | \"S15\"\n | \"S16\"\n | \"S18\"\n | \"S19\"\n | \"S20\"\n | \"S21\"\n | \"S23\"\n | \"S24\"\n | \"S25\";\n}\n\n// ---\n// Stencil component types\n// ---\n\nexport * from \"./components\";\n"],"version":3}
|
|
1
|
+
{"file":"index2.js","mappings":"AAAA;AACA;AACA;IA8wDiB,IAoMhB;AApMD,WAAiB,GAAG;EACL,oBAAgB,GAAG,QAAQ,CAAC;EAE5B,kBAAc,GAAG,QAAQ,CAAC;EAC1B,2BAAuB,GAAG,sBAAsB,CAAC;EAEjD,sBAAkB,GAAG,YAAY,CAAC;EAClC,2BAAuB,GAAG,GAAG,CAAC;EAC9B,4BAAwB,GAAG,GAAG,CAAC;EAC/B,sBAAkB,GAAG,GAAG,CAAC;EACzB,qBAAiB,GAAG,GAAG,CAAC;EACxB,mBAAe,GAAG,GAAG,CAAC;AAyLrC,CAAC,EApMgB,GAAG,KAAH,GAAG;;;;","names":[],"sources":["src/index.ts"],"sourcesContent":["// ---\n// Global window types\n// ---\n\nimport { StzhLocaleAdapter } from \"./utils/date-adapter\";\n\nimport {\n StzhLocaleComponent,\n StzhLocaleFormats,\n StzhLocaleGlobals,\n} from \"./utils/translation-utils\";\n\nexport type WindowStzhComponents = {\n version: string;\n supportedLocales: string[];\n defaultLocale: string;\n translations: null | StzhLocaleComponent;\n translationsLoading: Promise<StzhLocaleComponent>;\n pathMedia: string;\n pathTranslations: string;\n pathVendors: string;\n cacheTranslations: boolean;\n formats: StzhLocaleFormats;\n fixAutofocus: boolean;\n fixHashfocus: boolean;\n utils: {\n getLocale: (element: HTMLElement) => string;\n fetchTranslations: (\n host: HTMLElement,\n component: string\n ) => Promise<StzhLocaleComponent & any>;\n\n format: (date: Date, type: string) => string;\n parse: (string: string, type: string) => Date;\n formatSpan: (\n date: Date | string,\n date2: Date | string,\n type: string\n ) => string;\n parseSpan: (string: string, type: string) => [Date, Date, string];\n createFormatParseAdapter: (\n formats: StzhLocaleFormats,\n globals: StzhLocaleGlobals\n ) => StzhLocaleAdapter;\n };\n};\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents;\n // global third party library\n pannellum: any;\n Dropzone: any;\n proj4: any;\n // readspeaker lib APIs\n readpage: any;\n ReadSpeaker: any;\n rsConf: any;\n rspkr: any;\n }\n}\n\n// ---\n// Event Types\n// ---\n\n/* Sortable */\n\nexport type StzhSortableUpdateEvent = {\n component: \"stzh-sortable\";\n data: string[];\n item: HTMLElement;\n newIndex: number;\n oldIndex: number;\n};\n\nexport type StzhSortableDisableEvent = {\n component: \"stzh-sortable\";\n disabled: boolean;\n};\n\n/* Panorama */\n\nexport type PanoramaScene = {\n sceneId: string;\n imageSrc: string;\n imageTitle: string;\n\n imageAuthor?: string;\n imageType?: \"equirectangular\" | \"cubemap\" | \"multires\";\n caption?: string;\n copyright?: string;\n\n pitch?: number;\n yaw?: number;\n hfov?: number;\n\n hotspots: PanoramaSceneHotSpot[];\n};\n\nexport type PanoramaScenesLibrary = {\n [sceneKey: string]: {\n title?: string;\n author?: string;\n panorama: string;\n type?: \"equirectangular\" | \"cubemap\" | \"multires\";\n\n pitch?: number;\n yaw?: number;\n hfov?: number;\n\n hotSpots: PanoramaSceneHotSpot[];\n };\n};\n\nexport type PanoramaSceneHotSpot = {\n pitch: number;\n yaw: number;\n type: string;\n text: string;\n url?: string;\n id?: string;\n sceneId?: string;\n targetPitch?: number;\n targetYaw?: number;\n\n cssClass?: string;\n createTooltipFunc?: Function;\n createTooltipArgs?: any;\n};\n\nexport type StzhPanoramaLoadEvent = {\n component: \"stzh-panorama\";\n};\n\nexport type StzhPanoramaChangeEvent = {\n component: \"stzh-panorama\";\n value: { pitch: number; yaw: number; hfov: number };\n};\n\nexport type StzhPanoramaFullscreenChangeEvent = {\n component: \"stzh-panorama\";\n value: boolean;\n};\n\nexport type StzhPanoramaSceneChangeEvent = {\n component: \"stzh-panorama\";\n value: string;\n};\n\nexport type StzhPanoramaZoomChangeEvent = {\n component: \"stzh-panorama\";\n value: number;\n};\n\n/* Iframe */\n\nexport type StzhIframeView = \"iframe\" | \"cookiewall\" | \"preview\";\n\nexport type StzhIframeViewChangeEvent = {\n component: \"stzh-iframe\";\n value: StzhIframeView;\n};\n\nexport type StzhIframePreviewSkipEvent = {\n component: \"stzh-iframe\";\n};\n\n/* Olmap */\n\nexport type OlmapLayer = {\n title?: string;\n thumbnailUrl: string;\n options: {\n url: string;\n layer: string;\n matrixSet: string;\n origin: number[];\n extent: number[];\n };\n};\n\nexport type StzhOlmapInitializedEvent = {\n component: \"stzh-olmap\";\n};\n\nexport type StzhOlmapPostRenderEvent = {\n component: \"stzh-olmap\";\n};\n\nexport type StzhOlmapMoveStartEvent = {\n component: \"stzh-olmap\";\n};\n\nexport type StzhOlmapMoveEndEvent = {\n component: \"stzh-olmap\";\n};\n\n/* Sticky */\n\nexport type StzhStickyStuckTopEvent = {\n component: \"stzh-sticky\";\n sticky: boolean;\n};\n\nexport type StzhStickyStuckBottomEvent = {\n component: \"stzh-sticky\";\n sticky: boolean;\n};\n\n/* Table */\n\nexport type StzhDatatableCellData = {\n value: string | number;\n isHeader?: boolean;\n align?: \"left\" | \"right\" | \"center\";\n valign?: \"auto\" | \"middle\" | \"bottom\" | \"top\";\n colspan?: number;\n rowspan?: number;\n id?: string;\n};\n\nexport type StzhDatatableRowData = {\n [key: string]: StzhDatatableCellData;\n};\n\nexport type StzhDatatableInputRowData = {\n [key: string]: StzhDatatableCellData | string | number;\n};\n\nexport type StzhDatatableColumnData = {\n key: string;\n text?: string;\n align?: \"left\" | \"right\" | \"center\";\n valign?: \"auto\" | \"middle\" | \"bottom\" | \"top\";\n sort?:\n | boolean\n | {\n type?: \"numerical\" | \"text\";\n field?: string;\n };\n fixed?: \"left\" | \"right\";\n isHeader?: boolean;\n colspan?: number;\n rowspan?: number;\n hideColumnHeading?: boolean;\n analyticsId?: string;\n style?: {\n [key: string]: string;\n };\n};\n\nexport type StzhDatatableRowClickEvent = {\n component: \"stzh-datatable\";\n row: any;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableCellClickEvent = {\n component: \"stzh-datatable\";\n row: any;\n column: any;\n cellIndex: number;\n rowIndex: number;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableHeadingCellClickEvent = {\n component: \"stzh-datatable\";\n column: any;\n index: number;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableSortClickEvent = {\n component: \"stzh-datatable\";\n column: any;\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatatableSortByChangeEvent = {\n component: \"stzh-datatable\";\n value: string;\n oldValue: string;\n};\n\nexport type StzhDatatableSortDirectionChangeEvent = {\n component: \"stzh-datatable\";\n value: \"asc\" | \"desc\";\n oldValue: \"asc\" | \"desc\";\n};\n\n/* Archivelist */\n\nexport type StzhArchivelistItem = {\n label: string;\n labelClamp?: any; // attributes of HTMLStzhClampElement\n href: string;\n dateline?: string;\n description?: string;\n descriptionClamp?: any; // attributes of HTMLStzhClampElement\n};\n\nexport type StzhArchivelistItemClickEvent = {\n component: \"stzh-archivelist\";\n item: StzhArchivelistItem;\n originalEvent: MouseEvent;\n};\n\n/* Anchornav */\n\nexport type StzhAnchornavItem = {\n label: string;\n href?: string;\n icon?: string;\n};\n\nexport type StzhAnchornavItemClickEvent = {\n component: \"stzh-anchornav\";\n item: StzhAnchornavItem;\n originalEvent: MouseEvent;\n};\n\n/* TopnewsMostsearchedSection */\n\nexport type StzhTopnewsItem = {\n subtitle?: string;\n label: string;\n href?: string;\n isHighlighted?: boolean;\n};\n\nexport type StzhMostsearchedItem = {\n label: string;\n href: string;\n};\n\n/* VBZ Quicklinks */\n\nexport type StzhVbzQuicklink = {\n label: string;\n href: string;\n};\n\n/* Status */\n\nexport type StzhStatusType =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\";\n\n/* Badge */\n\nexport type StzhBadgeType =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"error\"\n | \"info\";\n\n/* Actionset */\n\nexport type StzhActionsetItem = {\n id: string;\n label?: string;\n icon?: string;\n iconPosition?: \"left\" | \"right\";\n iconOnly?: boolean;\n badge?: string;\n badgeEmpty?: boolean;\n badgeType?: StzhBadgeType;\n variant?: StzhButtonVariant;\n size?: StzhButtonSize;\n badgePosition?: \"icon\" | \"button\";\n tooltipContent?: string;\n};\n\nexport type StzhActionsetItemClickEvent = {\n component: \"stzh-actionset\";\n action: StzhActionsetItem;\n originalEvent: MouseEvent;\n};\n\n/* Audio */\n\nexport type StzhAudioPlayEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioPlayingEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioPauseEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioReplayEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioEndEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioEndedEvent = {\n component: \"stzh-audio\";\n};\n\nexport type StzhAudioErrorEvent = {\n component: \"stzh-audio\";\n originalEvent: ErrorEvent;\n};\n\n/* Share */\n\nexport type ShareService =\n | \"facebook\"\n | \"twitter\"\n | \"linkedin\"\n | \"xing\"\n | \"mail\";\n\n/* Footer Editor */\n\nexport type StzhEditorLink = {\n label: string;\n href?: string;\n icon?: string;\n rel?: string;\n target?: string;\n};\n\n/* Header */\n\nexport type StzhHeaderMenuItem = {\n label: string;\n href?: string;\n items?: StzhHeaderMenuItem[];\n id?: string;\n};\n\nexport type StzhHeaderMetanavItem = {\n label: string;\n labelShort?: string;\n labelHidden?: boolean;\n stay?: boolean;\n stayAndShowInMobileMenu?: boolean;\n variant?: \"default\" | \"secondary\"; // used for menu-item and popover\n size?: \"default\" | \"large\"; // used for menu-item and popover\n important?: boolean;\n importantSubmenu?: boolean;\n badgeEmpty?: boolean;\n badgeType?: StzhBadgeType;\n badge?: string;\n icon?: string;\n iconOpen?: string;\n href?: string;\n target?: string;\n id?: string;\n items?: StzhHeaderMetanavItemChild[];\n itemButton?: StzhHeaderMetanavItemButton;\n cssOrder?: boolean;\n};\n\nexport type StzhHeaderMetanavItemChild = {\n label: string;\n href?: string;\n target?: string;\n id?: string;\n icon?: string;\n counter?: number;\n badge?: string;\n badgeType?: StzhBadgeType;\n};\n\nexport type StzhHeaderMetanavItemButton = {\n label: string;\n href?: string;\n target?: string;\n size?: StzhButtonSize;\n id?: string;\n};\n\nexport type StzhHeaderMetanavItemClickEvent = {\n component: \"stzh-header\";\n item: StzhHeaderMetanavItem;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderMetanavItemChildClickEvent = {\n component: \"stzh-header\";\n itemChild: StzhHeaderMetanavItemChild;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderMetanavItemButtonClickEvent = {\n component: \"stzh-header\";\n itemButton: StzhHeaderMetanavItemButton;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderMenuItemClickEvent = {\n component: \"stzh-header\";\n item: StzhHeaderMenuItem;\n originalEvent: MouseEvent;\n};\n\nexport type StzhHeaderLanguageChangeEvent = {\n component: \"stzh-header\";\n value: string;\n};\n\nexport type StzhHeaderSearchChangeEvent = {\n component: \"stzh-header\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\nexport type StzhHeaderSearchChangedEvent = {\n component: \"stzh-header\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\n/* App Nav */\nexport type StzhAppNavItem = {\n text: string;\n href: string;\n badge: string;\n badgeType: StzhBadgeType;\n icon: string;\n active: boolean;\n a11yCurrent: string;\n};\n\nexport type StzhAppNavItemClickEvent = {\n component: \"stzh-app-nav\";\n item: StzhAppNavItem;\n originalEvent: MouseEvent;\n};\n\n/* PI Pagetitle */\n\nexport type StzhPiPagetitleMenuItem = {\n label: string;\n href?: string;\n active?: boolean;\n items?: StzhPiPagetitleMenuItem[];\n id?: string;\n};\n\n/* Search */\n\nexport type StzhSearchOverlayCloseClickEvent = {\n component: \"stzh-search\";\n originalEvent: MouseEvent;\n};\n\n/* Breadcrumb */\n\nexport type StzhBreadcrumbItem = {\n label: string;\n href: string;\n};\n\nexport type StzhBreadcrumbItemClickEvent = {\n component: \"stzh-breadcrumb\";\n item: StzhBreadcrumbItem;\n originalEvent: MouseEvent;\n};\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string;\n label?: string;\n icon?: string;\n badge?: string;\n badgeEmpty?: boolean;\n badgeType?: StzhBadgeType;\n};\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\";\n originalEvent: MouseEvent;\n};\n\nexport type StzhCardCollapseEvent = {\n component: \"stzh-card\";\n collapsed: boolean;\n};\n\nexport type StzhCardClickEvent = {\n component: \"stzh-card\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\";\n starred: boolean;\n originalEvent: MouseEvent;\n};\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\";\n action: StzhCardHeaderAction;\n originalEvent: MouseEvent;\n};\n\n/* Card Navigation */\n\nexport type StzhCardNavigationClickEvent = {\n component: \"stzh-card-navigation\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhPiCardNavigationClickEvent = {\n component: \"stzh-pi-content-navigation\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Pi Teaser */\n\nexport type StzhPiTeaserClickEvent = {\n component: \"stzh-pi-teaser\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Card Superteaser */\n\nexport type StzhCardSuperteaserClickEvent = {\n component: \"stzh-card-superteaser\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Card Searchresult */\n\nexport type StzhCardSearchresultClickEvent = {\n component: \"stzh-card-searchresult\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Search */\n\nexport type StzhSearchResult = {\n html?: string;\n href?: string;\n heading?: string;\n dateline?: string;\n description?: string;\n image?: string;\n imagePosition?: \"default\" | \"right\";\n tag?: string;\n topic?: string;\n service?: string;\n serviceColor?: string;\n serviceBackgroundColor?: string;\n meta?: string[];\n breadcrumbItems?: StzhBreadcrumbItem[];\n eventDateStart?: string;\n eventDateEnd?: string;\n eventLocation?: string;\n download?: string;\n downloadHeading?: string;\n downloadMeta?: string[];\n};\n\nexport type StzhSearchChipsResult = {\n label: string;\n value: string;\n amount?: number;\n options?: { text: string; value: string }[];\n};\n\n/* Microsite Teaserlist */\n\nexport type StzhMicrositeTeaserlistTag = {\n id: string;\n name: string;\n};\n\nexport type StzhMicrositeTeaserlistItem = {\n title?: string;\n description?: string;\n image?: string;\n link: string;\n tags: string[];\n teaserid: string;\n};\n\n/* Cardlist */\n\nexport type StzhCardlistCollapseAllEvent = {\n component: \"stzh-cardlist\";\n allCollapsed: boolean;\n};\n\n/* Calendar */\n\nexport type StzhCalendarChangeEvent = {\n component: \"stzh-calendar\";\n valueAsDate: Date;\n value: string;\n};\n\n/* Datepicker */\n\nexport type StzhDatepickerChangeEvent = {\n component: \"stzh-datepicker\";\n value: string;\n valueAsDate: Date;\n};\n\n/* Pagination */\n\nexport type StzhPaginationChangeEvent = {\n component: \"stzh-pagination\";\n page: number;\n};\n\n/* Timepicker */\n\nexport type StzhTimepickerChangeEvent = {\n component: \"stzh-timepicker\";\n value: string;\n};\n\n/* Monthyearpicker */\n\nexport type StzhMonthyearpickerChangeEvent = {\n component: \"stzh-monthyearpicker\";\n value: string;\n valueMonth: string;\n valueYear: string;\n};\n\n/* Amount */\n\nexport type StzhAmountChangeEvent = {\n component: \"stzh-amount\";\n value: string;\n};\n\n/* Appointments */\n\nexport type StzhAppointmentsChangeEvent = {\n component: \"stzh-appointments\";\n value: string;\n};\n\n/* Skiplink */\n\nexport type StzhSkiplinkFocusEvent = {\n component: \"stzh-skiplink\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhSkiplinkBlurEvent = {\n component: \"stzh-skiplink\";\n originalEvent: FocusEvent;\n};\n\n/* Checkbox */\n\nexport type StzhCheckboxChangeEvent = {\n component: \"stzh-checkbox\";\n originalEvent: InputEvent | Event;\n value: string;\n checked: boolean;\n};\n\nexport type StzhCheckboxFocusEvent = {\n component: \"stzh-checkbox\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCheckboxBlurEvent = {\n component: \"stzh-checkbox\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCheckboxgroupChangeEvent = {\n component: \"stzh-checkboxgroup\";\n value: string[];\n};\n\n/* Toggle */\n\nexport type StzhToggleChangeEvent = {\n component: \"stzh-toggle\";\n originalEvent: InputEvent;\n value: string;\n checked: boolean;\n};\n\nexport type StzhToggleFocusEvent = {\n component: \"stzh-toggle\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhToggleBlurEvent = {\n component: \"stzh-toggle\";\n originalEvent: FocusEvent;\n};\n\n/* Button */\n\nexport type StzhButtonVariant =\n | \"default\"\n | \"secondary\"\n | \"tertiary\"\n | \"tertiary-plain\";\nexport type StzhButtonSize = \"default\" | \"small\" | \"tiny\";\n\nexport type StzhButtonFocusEvent = {\n component: \"stzh-button\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhButtonClickEvent = {\n component: \"stzh-button\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhButtonChangeEvent = {\n component: \"stzh-button\";\n originalEvent: InputEvent;\n value: string;\n checked: boolean;\n};\n\n/* Link */\n\nexport type StzhLinkSize = \"default\" | \"small\" | \"inherit\";\n\nexport type StzhLinkFocusEvent = {\n component: \"stzh-link\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhLinkClickEvent = {\n component: \"stzh-link\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Menu (Item) */\n\nexport type StzhMenuVariant = \"default\" | \"secondary\";\nexport type StzhMenuSize = \"default\" | \"large\";\n\nexport type StzhMenuItemFocusEvent = {\n component: \"stzh-menu-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhMenuItemBlurEvent = {\n component: \"stzh-menu-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhMenuItemClickEvent = {\n component: \"stzh-menu-item\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Carousel */\n\nexport type StzhCarouselSlideStartEvent = {\n component: \"stzh-carousel\";\n index: number;\n};\n\nexport type StzhCarouselSlidePassedEvent = {\n component: \"stzh-carousel\";\n index: number;\n};\n\nexport type StzhCarouselSlideEndEvent = {\n component: \"stzh-carousel\";\n index: number;\n};\n\n/* Chipselect */\n\nexport type StzhChipselectItem = {\n label: string;\n value: string;\n disabled?: boolean;\n variant?: StzhChipVariant;\n type?: StzhChipType;\n inverted?: boolean;\n counter?: string;\n icon?: string;\n size?: StzhChipSize;\n};\n\nexport type StzhChipselectChangeEvent = {\n component: \"stzh-chipselect\";\n value: string[] | string;\n};\n\n/* Gallery */\n\nexport type StzhGalleryItem = {\n width: number;\n height: number;\n src: string;\n srcLightbox?: string;\n srcsetLightbox?: string;\n alt?: string;\n copyright?: string;\n heading?: string;\n headingLightbox?: string;\n caption?: string;\n captionLightbox?: string;\n lightboxHtml?: string;\n hideCounter?: boolean;\n};\n\n/* Datalist */\n\nexport type StzhDatalistItemEntry = {\n value: string;\n leadingIcon?: string;\n label?: string;\n meta?: string;\n icon?: string;\n iconLabel?: string;\n iconTooltip?: string;\n statusLabel?: string;\n statusType?: StzhStatusType;\n href?: string;\n rel?: string;\n target?: string;\n items?: StzhDatalistItemEntry[];\n};\n\nexport type StzhDatalistVariant = \"default\" | \"table\";\nexport type StzhDatalistDirection = \"vertical\" | \"horizontal\";\n\nexport type StzhDatalistVariantChangeEvent = {\n component: \"stzh-datalist\";\n value: StzhDatalistVariant;\n};\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\";\n value: \"vertical\" | \"horizontal\";\n};\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\";\n originalEvent: MouseEvent;\n};\n\nexport type StzhDatalistItemClickEvent = {\n component: \"stzh-datalist-item\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Datamessagelist */\n\nexport type StzhDatamessagelistItemEntryMeta = {\n label: string;\n value: string;\n};\n\nexport type StzhDatamessagelistItemEntryAction = {\n id: string | number;\n icon: string;\n label: string;\n badge?: string;\n};\n\nexport type StzhDatamessagelistItemEntryTag = {\n icon: string;\n label: string;\n type?: StzhChipType;\n inverted?: boolean;\n};\n\nexport type StzhDatamessagelistItemEntryLoadingStatus = {\n percent: number;\n label: string;\n type: \"default\" | \"success\" | \"warning\" | \"error\";\n};\n\nexport type StzhDatamessagelistItemClickEvent = {\n component: \"stzh-datamessagelist-item\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\";\n action: StzhDatamessagelistItemEntryAction;\n originalEvent: MouseEvent;\n};\n\n/* Cta */\n\nexport type StzhCtaFocusEvent = {\n component: \"stzh-cta\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCtaBlurEvent = {\n component: \"stzh-cta\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhCtaClickEvent = {\n component: \"stzh-cta\";\n originalEvent: MouseEvent;\n href: string;\n};\n\n/* Tag */\n\nexport type StzhTagSize = \"default\" | \"large\";\nexport type StzhTagType = \"default\" | \"secondary\";\n\nexport type StzhTagClickEvent = {\n component: \"stzh-tag\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhTagFocusEvent = {\n component: \"stzh-tag\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhTagBlurEvent = {\n component: \"stzh-tag\";\n originalEvent: FocusEvent;\n};\n\n/* Chip */\n\nexport type StzhChipVariant = \"tag\" | \"filter\" | \"input\";\nexport type StzhChipSize = \"default\" | \"small\" | \"large\";\nexport type StzhChipType = \"default\" | \"success\" | \"warning\" | \"error\" | \"info\";\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\";\n originalEvent: MouseEvent;\n href: string;\n};\n\nexport type StzhChipRemoveEvent = {\n component: \"stzh-chip\";\n originalEvent: MouseEvent;\n};\n\nexport type StzhChipFocusEvent = {\n component: \"stzh-chip\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhChipBlurEvent = {\n component: \"stzh-chip\";\n originalEvent: FocusEvent;\n};\n\n/* VBZ Major Ticker */\n\nexport type StzhVbzMajortickerDisturbance = {\n id: string;\n head: string;\n text: string;\n startDate: Date;\n endDate: Date;\n altStart: string;\n altEnd: string;\n infoUrl?: VbzTickerInfoUrl;\n};\n\nexport type StzhVbzMajortickerDisturbanceFetchedEvent = {\n component: \"stzh-vbz-majorticker\";\n disturbance: StzhVbzMajortickerDisturbance | null;\n};\n\n/* VBZ Ticker */\n\nexport type VbzTickerInfoUrl = {\n name: string;\n url: string;\n};\n\nexport type VbzTickerDisturbance = {\n id: string;\n head: string;\n startDate: Date;\n endDate: Date;\n altStart: string;\n altEnd: string;\n baseType?: string;\n infoUrl?: VbzTickerInfoUrl;\n category:\n | typeof VBZ.DISTURBANCE_INFORMATION\n | typeof VBZ.DISTURBANCE_CONSTRUCTION\n | typeof VBZ.DISTURBANCE_NORMAL\n | typeof VBZ.DISTURBANCE_EVENT\n | typeof VBZ.DISTURBANCE_BUS;\n};\n\nexport type VbzTickerLine = {\n line: VBZ.Lines;\n name: string;\n disturbances: VbzTickerDisturbance[];\n // whether normal or big disturbance for this line exist\n alert: boolean;\n // 2 = Fernverkehr / 16 = Schiff / 32 = S-Bahn/Reg / 64 = Bus / 128 = Bergbahn / 256 = Nachtnetz / 512 = Tram\n category: \"2\" | \"16\" | \"32\" | \"64\" | \"128\" | \"256\" | \"512\";\n};\n\n/* VBZ Line Chip */\n\nexport type StzhVbzLinechipLine = {\n color: string;\n background: string;\n comment?: string;\n};\n\nexport type StzhVbzLinechipFocusEvent = {\n component: \"stzh-vbz-linechip\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhVbzLinechipBlurEvent = {\n component: \"stzh-vbz-linechip\";\n originalEvent: FocusEvent;\n};\n\n/* Clamp */\n\nexport type StzhClampClampEvent = {\n component: \"stzh-clamp\";\n clamped: boolean;\n};\n\nexport type StzhClampExpandEvent = {\n component: \"stzh-clamp\";\n expanded: boolean;\n};\n\n/* Image Comparison */\n\nexport type StzhImagecomparisonChangeEvent = {\n component: \"stzh-imagecomparison\";\n originalEvent: InputEvent;\n value: number;\n};\n\n/* Dialog */\n\nexport type StzhDialogOpenEvent = {\n component: \"stzh-dialog\";\n};\n\nexport type StzhDialogCloseEvent = {\n component: \"stzh-dialog\";\n};\n\n/* Contact */\n\nexport type ContactEmail = {\n label: string;\n text: string;\n href?: string;\n analyticsId?: string;\n};\n\nexport type ContactNumber = {\n type: \"tel\" | \"fax\";\n label: string;\n number: string;\n analyticsId?: string;\n};\n\nexport type StzhContactAvailabilityItem = {\n weekday: string;\n hours: string[];\n};\n\n/* Eventinfo */\n\nexport type StzhEventinfoItemInput = {\n calendarUrl?: string;\n calendarLabel?: string;\n start: string | Date;\n end: string | Date;\n};\n\nexport type StzhEventinfoItem = {\n calendarUrl?: string;\n calendarLabel?: string;\n start: Date;\n end: Date;\n};\n\nexport type StzhEventinfoMonth = {\n name: string;\n events: StzhEventinfoItem[];\n};\n\n/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\";\n};\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\";\n};\n\n/* Banner */\n\nexport type StzhBannerOpenEvent = {\n component: \"stzh-banner\";\n};\n\nexport type StzhBannerCloseEvent = {\n component: \"stzh-banner\";\n};\n\n/* Message */\n\nexport type StzhMessageOpenEvent = {\n component: \"stzh-message\";\n};\n\nexport type StzhMessageCloseEvent = {\n component: \"stzh-message\";\n};\n\n/* Toastbar */\n\nexport type StzhToastbarInitialToast = {\n label: string;\n type?: StzhToastType;\n link?:\n | HTMLStzhLinkElement\n | {\n href: string;\n label: string;\n };\n cookie?: string;\n cookieExpires?: number;\n};\n\n/* Disturber */\n\nexport type StzhDisturberOpenEvent = {\n component: \"stzh-disturber\";\n};\n\nexport type StzhDisturberCloseEvent = {\n component: \"stzh-disturber\";\n};\n\nexport type StzhDisturberOpenedEvent = {\n component: \"stzh-disturber\";\n};\n\nexport type StzhDisturberClosedEvent = {\n component: \"stzh-disturber\";\n};\n\n/* Toast */\n\nexport type StzhToastType = \"info\" | \"success\" | \"warning\" | \"error\";\n\nexport type StzhToastOpenEvent = {\n component: \"stzh-toast\";\n};\n\nexport type StzhToastCloseEvent = {\n component: \"stzh-toast\";\n};\n\nexport type StzhToastOpenedEvent = {\n component: \"stzh-toast\";\n};\n\nexport type StzhToastClosedEvent = {\n component: \"stzh-toast\";\n};\n\n/* Ghettobox */\n\nexport type StzhGhettoboxOpenEvent = {\n component: \"stzh-ghettobox\";\n};\n\nexport type StzhGhettoboxCloseEvent = {\n component: \"stzh-ghettobox\";\n};\n\n/* Input */\n\nexport type StzhInputChangeEvent = {\n component: \"stzh-input\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\nexport type StzhInputChangedEvent = {\n component: \"stzh-input\";\n originalEvent: InputEvent | MouseEvent;\n value: string;\n};\n\nexport type StzhInputFocusEvent = {\n component: \"stzh-input\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhInputBlurEvent = {\n component: \"stzh-input\";\n originalEvent: FocusEvent;\n};\n\n/* Popover */\n\nexport type StzhPopoverOpenEvent = {\n component: \"stzh-popover\";\n};\n\nexport type StzhPopoverOpenedEvent = {\n component: \"stzh-popover\";\n};\n\nexport type StzhPopoverCloseEvent = {\n component: \"stzh-popover\";\n};\n\nexport type StzhPopoverClosedEvent = {\n component: \"stzh-popover\";\n};\n\n/* Timeline */\n\nexport type StzhTimelineFoldableChangeEvent = {\n component: \"stzh-timeline\";\n value: boolean;\n};\n\n/* TimelineItem */\n\nexport type StzhTimelineItemOpenEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemOpenedEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemCloseEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemClosedEvent = {\n component: \"stzh-timeline-item\";\n};\n\nexport type StzhTimelineItemFocusEvent = {\n component: \"stzh-timeline-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhTimelineItemBlurEvent = {\n component: \"stzh-timeline-item\";\n originalEvent: FocusEvent;\n};\n\n/* Accordion */\n\nexport type StzhAccordionVariant = \"default\" | \"title\" | \"table\" | \"menu\";\n\nexport type StzhAccordionVariantChangeEvent = {\n component: \"stzh-accordion\";\n value: StzhAccordionVariant;\n};\n\nexport type StzhAccordionItemOpenEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemOpenedEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemCloseEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemClosedEvent = {\n component: \"stzh-accordion-item\";\n};\n\nexport type StzhAccordionItemFocusEvent = {\n component: \"stzh-accordion-item\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhAccordionItemBlurEvent = {\n component: \"stzh-accordion-item\";\n originalEvent: FocusEvent;\n};\n\n/* Pi Menu */\n\nexport type StzhPiMenuOpenEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuOpenedEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuCloseEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuClosedEvent = {\n component: \"stzh-pi-menu\";\n};\n\nexport type StzhPiMenuItemClickEvent = {\n component: \"stzh-pi-menu\";\n originalEvent: MouseEvent;\n};\n\n/* Tooltip */\n\nexport type StzhTooltipOpenEvent = {\n component: \"stzh-tooltip\";\n};\n\nexport type StzhTooltipOpenedEvent = {\n component: \"stzh-tooltip\";\n};\n\nexport type StzhTooltipCloseEvent = {\n component: \"stzh-tooltip\";\n};\n\nexport type StzhTooltipClosedEvent = {\n component: \"stzh-tooltip\";\n};\n\n/* Radio */\n\nexport type StzhRadioChangeEvent = {\n component: \"stzh-radio\";\n originalEvent: InputEvent;\n value: string;\n checked: boolean;\n};\n\nexport type StzhRadioFocusEvent = {\n component: \"stzh-radio\";\n originalEvent: FocusEvent;\n};\n\nexport type StzhRadioBlurEvent = {\n component: \"stzh-radio\";\n originalEvent: FocusEvent;\n};\n\n/* Daterange */\n\nexport type StzhDaterangeRanges = \"today\" | \"tomorrow\" | \"next7days\";\n\n/* Dropdown */\n\nexport type StzhDropdownSize = \"default\" | \"small\" | \"tiny\" | StzhChipSize;\n\nexport type StzhDropdownOption = {\n text: string;\n value: string;\n disabled?: boolean;\n};\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\";\n value: string | string[];\n};\n\nexport type StzhDropdownItemAddEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownItemRemoveEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownOptionAddEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownOptionRemoveEvent = {\n component: \"stzh-dropdown\";\n value: string;\n};\n\nexport type StzhDropdownOpenEvent = {\n component: \"stzh-dropdown\";\n};\n\nexport type StzhDropdowCloseEvent = {\n component: \"stzh-dropdown\";\n};\n\nexport type StzhDropdownFocusEvent = {\n component: \"stzh-dropdown\";\n originalEvent: {\n target: Element;\n };\n};\n\nexport type StzhDropdownBlurEvent = {\n component: \"stzh-dropdown\";\n};\n\nexport type StzhDropdowInitEvent = {\n component: \"stzh-dropdown\";\n};\n\n/** Progressbar */\n\nexport type StzhProgressbarDataItem = {\n label: string;\n icon?: string;\n disabled?: boolean;\n analyticsId?: string;\n};\n\n/* Progressbar Item */\n\nexport type StzhProgressbarItemClickEvent = {\n component: \"stzh-progressbar-item\";\n originalEvent: MouseEvent;\n index: number;\n};\n\nexport type StzhProgressbarItemDottedClickEvent = {\n component: \"stzh-progressbar-item\";\n originalEvent: MouseEvent;\n index: number;\n};\n\n/* Upload */\n\nexport type StzhUploadFilesItem = {\n name: string;\n size: number;\n [key: string]: any;\n};\n\nexport type StzhUploadFile = File & {\n xhr: XMLHttpRequest;\n status: string;\n upload: any;\n accepted: boolean;\n previewElement: HTMLElement;\n};\n\nexport type StzhUploadFileAddedEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadFilesAddedEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\nexport type StzhUploadFileRemoveEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadFileRemovedEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n force: boolean;\n};\n\nexport type StzhUploadSendingEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n xhr: XMLHttpRequest;\n formData: FormData;\n};\n\nexport type StzhUploadSendingMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n xhr: XMLHttpRequest;\n formData: FormData;\n};\n\nexport type StzhUploadProcessingEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadProcessingMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\nexport type StzhUploadProgressEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n progress: number;\n bytesSent: number;\n};\n\nexport type StzhUploadProgressTotalEvent = {\n component: \"stzh-upload\";\n totalUploadProgress: number;\n totalBytes: number;\n totalBytesSent: number;\n};\n\nexport type StzhUploadErrorEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n message: string;\n xhr: XMLHttpRequest;\n};\n\nexport type StzhUploadErrorMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n message: string;\n xhr: XMLHttpRequest;\n};\n\nexport type StzhUploadSuccessEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n responseText: string;\n event: ProgressEvent;\n};\n\nexport type StzhUploadSuccessMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n responseText: string;\n event: ProgressEvent;\n};\n\nexport type StzhUploadCanceledEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadCanceledMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\nexport type StzhUploadCompleteEvent = {\n component: \"stzh-upload\";\n file: StzhUploadFile;\n};\n\nexport type StzhUploadCompleteMultipleEvent = {\n component: \"stzh-upload\";\n files: StzhUploadFile[];\n};\n\n// Merged Types\n\nexport type StzhFocusEvent =\n | StzhAccordionItemFocusEvent\n | StzhButtonFocusEvent\n | StzhCheckboxFocusEvent\n | StzhChipFocusEvent\n | StzhDropdownFocusEvent\n | StzhInputFocusEvent\n | StzhLinkFocusEvent\n | StzhMenuItemFocusEvent\n | StzhRadioFocusEvent\n | StzhToggleFocusEvent\n | StzhVbzLinechipFocusEvent\n | StzhSkiplinkFocusEvent;\n\n// ---\n// Prop Types\n// ---\n\nexport type StzhCalendarDateDisabledPredicate = (date: Date) => boolean;\n\nexport namespace Layout {\n export type Ratio = \"16:9\" | \"1:1\" | \"5:4\" | \"4:3\" | \"3:2\" | \"2:1\" | \"21:9\";\n\n export type Justify =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\n export type Items = \"start\" | \"end\" | \"center\" | \"baseline\" | \"stretch\";\n\n export type JustifySelf = \"auto\" | Justify;\n\n export type AlignSelf = \"auto\" | Items;\n}\n\nexport namespace Space {\n export type Sizes =\n | \"xxxsmall\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\"\n | \"xxxxlarge\"\n | \"big\"\n | \"xbig\"\n | \"huge\"\n | \"xhuge\"\n | \"none\"\n | \"inherit\";\n\n export type Curves =\n | \"tiny\"\n | \"small\"\n | \"regular\"\n | \"medium\"\n | \"large\"\n | \"big\"\n | \"huge\"\n | \"none\";\n}\n\nexport namespace Font {\n export type Fonts = \"light\" | \"regular\" | \"medium\" | \"heavy\" | \"default\";\n\n export type Sizes =\n | \"pico\"\n | \"nano\"\n | \"micro\"\n | \"milli\"\n | \"centi\"\n | \"deci\"\n | \"regular\"\n | \"deca\"\n | \"hecto\"\n | \"kilo\"\n | \"mega\"\n | \"giga\"\n | \"hero\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"lead\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\n | \"h1home\"\n | \"default\"\n | \"none\";\n}\n\nexport namespace VBZ {\n export const BASE_TYPE_GLOBAL = \"GLOBAL\";\n\n export const CHANNEL_TICKER = \"ticker\";\n export const CHANNEL_INFO_URL_FILTER = \"stadt-zuerich.ch/vbz\";\n\n export const DISTURBANCE_GLOBAL = \"__global__\";\n export const DISTURBANCE_INFORMATION = \"0\";\n export const DISTURBANCE_CONSTRUCTION = \"1\";\n export const DISTURBANCE_NORMAL = \"2\";\n export const DISTURBANCE_EVENT = \"4\";\n export const DISTURBANCE_BUS = \"5\";\n\n export type Lines =\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | \"13\"\n | \"14\"\n | \"15\"\n | \"16\"\n | \"17\"\n | \"19\"\n | \"20\"\n | \"21\"\n | \"23\"\n | \"24\"\n | \"25\"\n | \"29\"\n | \"31\"\n | \"32\"\n | \"33\"\n | \"34\"\n | \"35\"\n | \"36\"\n | \"37\"\n | \"38\"\n | \"39\"\n | \"40\"\n | \"45\"\n | \"46\"\n | \"54\"\n | \"61\"\n | \"62\"\n | \"63\"\n | \"64\"\n | \"66\"\n | \"67\"\n | \"69\"\n | \"70\"\n | \"72\"\n | \"73\"\n | \"75\"\n | \"76\"\n | \"77\"\n | \"78\"\n | \"79\"\n | \"80\"\n | \"83\"\n | \"89\"\n | \"91\"\n | \"94\"\n | \"95\"\n | \"99\"\n | \"151\"\n | \"152\"\n | \"153\"\n | \"156\"\n | \"161\"\n | \"162\"\n | \"163\"\n | \"165\"\n | \"184\"\n | \"185\"\n | \"200\"\n | \"201\"\n | \"215\"\n | \"220\"\n | \"235\"\n | \"236\"\n | \"245\"\n | \"301\"\n | \"302\"\n | \"303\"\n | \"304\"\n | \"305\"\n | \"306\"\n | \"307\"\n | \"308\"\n | \"309\"\n | \"311\"\n | \"314\"\n | \"315\"\n | \"317\"\n | \"321\"\n | \"323\"\n | \"325\"\n | \"350\"\n | \"444\"\n | \"445\"\n | \"701\"\n | \"702\"\n | \"703\"\n | \"704\"\n | \"705\"\n | \"720\"\n | \"721\"\n | \"725\"\n | \"726\"\n | \"727\"\n | \"742\"\n | \"743\"\n | \"744\"\n | \"745\"\n | \"747\"\n | \"748\"\n | \"751\"\n | \"752\"\n | \"753\"\n | \"754\"\n | \"759\"\n | \"760\"\n | \"765\"\n | \"768\"\n | \"781\"\n | \"786\"\n | \"787\"\n | \"910\"\n | \"912\"\n | \"916\"\n | \"917\"\n | \"918\"\n | \"919\"\n | \"E\"\n | \"N\"\n | \"N1\"\n | \"N2\"\n | \"N4\"\n | \"N5\"\n | \"N6\"\n | \"N7\"\n | \"N8\"\n | \"N9\"\n | \"N10\"\n | \"N11\"\n | \"N12\"\n | \"N13\"\n | \"N14\"\n | \"N15\"\n | \"N16\"\n | \"N17\"\n | \"N18\"\n | \"N19\"\n | \"N30\"\n | \"N31\"\n | \"N32\"\n | \"N33\"\n | \"N34\"\n | \"N45\"\n | \"N72\"\n | \"N78\"\n | \"SN1\"\n | \"SN4\"\n | \"SN5\"\n | \"SN6\"\n | \"SN7\"\n | \"SN8\"\n | \"SN9\"\n | \"S2\"\n | \"S3\"\n | \"S4\"\n | \"S5\"\n | \"S6\"\n | \"S7\"\n | \"S8\"\n | \"S9\"\n | \"S10\"\n | \"S11\"\n | \"S14\"\n | \"S15\"\n | \"S16\"\n | \"S18\"\n | \"S19\"\n | \"S20\"\n | \"S21\"\n | \"S23\"\n | \"S24\"\n | \"S25\";\n}\n\n// ---\n// Stencil component types\n// ---\n\nexport * from \"./components\";\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$3 } from './stzh-badge2.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './stzh-icon2.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './stzh-link2.js';
|
|
@@ -10,6 +10,14 @@ const StzhAppNav = /*@__PURE__*/ proxyCustomElement(class StzhAppNav extends HTM
|
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
this.__attachShadow();
|
|
13
|
+
this.stzhAppNavItemClick = createEvent(this, "stzhAppNavItemClick", 7);
|
|
14
|
+
this.handleAppNavItemClick = (event, item) => {
|
|
15
|
+
this.stzhAppNavItemClick.emit({
|
|
16
|
+
component: "stzh-app-nav",
|
|
17
|
+
item,
|
|
18
|
+
originalEvent: event,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
13
21
|
this.localization = undefined;
|
|
14
22
|
this.items = [];
|
|
15
23
|
}
|
|
@@ -22,7 +30,7 @@ const StzhAppNav = /*@__PURE__*/ proxyCustomElement(class StzhAppNav extends HTM
|
|
|
22
30
|
const classes = {
|
|
23
31
|
"stzh-app-nav": true,
|
|
24
32
|
};
|
|
25
|
-
return (h(Host, null, h("nav", { role: "navigation", class: classes, "aria-label": this.localization.title }, h("div", { class: "stzh-app-nav__links", role: "list" }, this.items.map((item) => (h("stzh-link", { class: "stzh-app-nav__link", active: item.active, role: "listitem", "a11y-current": item.a11yCurrent, href: item.href, badge: item.badge, badgeType: item.badgeType, icon: item.icon }, item.text)))))));
|
|
33
|
+
return (h(Host, null, h("nav", { role: "navigation", class: classes, "aria-label": this.localization.title }, h("div", { class: "stzh-app-nav__links", role: "list" }, this.items.map((item) => (h("stzh-link", { class: "stzh-app-nav__link", active: item.active, role: "listitem", "a11y-current": item.a11yCurrent, href: item.href, badge: item.badge, badgeType: item.badgeType, icon: item.icon, onClick: (e) => { this.handleAppNavItemClick(e, item); } }, item.text)))))));
|
|
26
34
|
}
|
|
27
35
|
get element() { return this; }
|
|
28
36
|
static get style() { return stzhAppNavCss; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stz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AAA,EAAE,IACjE,IAAI,CAAC,IAAI,CACD,CACb,CAAC,CACI,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-app-nav/stzh-app-nav.scss?tag=stzh-app-nav&encapsulation=shadow","src/components/stzh-app-nav/stzh-app-nav.tsx"],"sourcesContent":["/**\n * @prop --stzh-app-nav-background-color: Background color of app nav links.\n * @prop --stzh-app-nav-color: Text and icon color of app nav links.\n * @prop --stzh-app-nav-color-active: Text and icon color of active app nav links.\n */\n\n:host {\n --stzh-app-nav-background-color: var(--stzh-color-coolgrey10);\n --stzh-app-nav-color: var(--stzh-color-coolgrey90);\n --stzh-app-nav-color-active: var(--stzh-color-primary70);\n}\n\n.stzh-app-nav {\n background-color: var(--stzh-app-nav-background-color);\n\n &__links {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: space('medium') space('large') space('xlarge');\n\n @include mq($from: medium) {\n padding: 0;\n align-items: center;\n }\n }\n\n &__link {\n --text-decoration-line: none;\n --hover-text-decoration-line: none;\n --color: var(--stzh-app-nav-color);\n\n @include mq($from: medium) {\n margin-right: space('xlarge');\n }\n\n &::last-child {\n margin-right: 0;\n }\n }\n\n .stzh-link--is-active {\n text-decoration: none;\n --color: var(--stzh-app-nav-color-active);\n\n @include mq($from: medium) {\n @include font('heavy');\n }\n }\n\n .stzh-link__inner {\n flex-direction: column;\n\n @include mq($from: medium) {\n flex-direction: row;\n }\n }\n\n .stzh-link__text {\n @include font('medium');\n @include fontSize('pico');\n\n @include mq($from: medium) {\n @include fontSize('milli');\n font-weight: var(--stzh-font-weight-medium);\n }\n }\n\n .stzh-link__icon-wrapper.sc-stzh-link:not(:empty) + .stzh-link__text.sc-stzh-link:not(:empty), .stzh-link__text.sc-stzh-link:not(:empty) + .stzh-link__icon-wrapper.sc-stzh-link:not(:empty) {\n margin-top: space('xxsmall');\n margin-left: 0;\n\n @include mq($from: medium) {\n margin-left: space('xsmall');\n margin-top: 0;\n }\n }\n}\n","import {Component, Prop, h, Host, Element, Event, EventEmitter} from \"@stencil/core\";\n\nimport { StzhAppNavLocalizedText } from \"./stzh-app-nav.localization\";\n\nimport {StzhAppNavItem, StzhAppNavItemClickEvent} from \"../../index\";\n\n@Component({\n tag: \"stzh-app-nav\",\n styleUrl: \"stzh-app-nav.scss\",\n shadow: true,\n})\n\nexport class StzhAppNav {\n /** Translation strings */\n @Prop() localization: StzhAppNavLocalizedText;\n\n /** App-nav items */\n @Prop() items: StzhAppNavItem[] = [];\n\n @Element() element: HTMLStzhAppNavElement;\n\n /** AppNav item click event */\n @Event() stzhAppNavItemClick: EventEmitter<StzhAppNavItemClickEvent>;\n\n async componentWillLoad() {\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"appnav\");\n }\n }\n\n private handleAppNavItemClick = (event: MouseEvent, item: StzhAppNavItem) => {\n this.stzhAppNavItemClick.emit({\n component: \"stzh-app-nav\",\n item,\n originalEvent: event,\n });\n };\n\n render() {\n const classes = {\n \"stzh-app-nav\": true,\n };\n\n return (\n <Host>\n <nav role=\"navigation\" class={classes} aria-label={this.localization.title}>\n <div class=\"stzh-app-nav__links\" role=\"list\">\n {this.items.map((item) => (\n <stzh-link\n class=\"stzh-app-nav__link\"\n active={item.active}\n role=\"listitem\"\n a11y-current={item.a11yCurrent}\n href={item.href}\n badge={item.badge}\n badgeType={item.badgeType}\n icon={item.icon}\n onClick={(e: MouseEvent) => { this.handleAppNavItemClick(e, item) }}\n >{item.text}\n </stzh-link>\n ))}\n </div>\n </nav>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -171,6 +171,7 @@ const StzhPopover = /*@__PURE__*/ proxyCustomElement(class StzhPopover extends H
|
|
|
171
171
|
trigger.addEventListener("click", this.onClickTrigger);
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
+
this.initializedPopover = false;
|
|
174
175
|
this.open = false;
|
|
175
176
|
this.placement = "bottom";
|
|
176
177
|
this.fullwidth = "";
|
|
@@ -347,9 +348,7 @@ const StzhPopover = /*@__PURE__*/ proxyCustomElement(class StzhPopover extends H
|
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
350
|
componentDidRender() {
|
|
350
|
-
this.computePosition();
|
|
351
351
|
this.mediaChangeHandler();
|
|
352
|
-
this.open ? this.popoverShown() : this.popoverHidden();
|
|
353
352
|
const isStzh = isStzhElement(this.triggerFirstElement);
|
|
354
353
|
if ((isStzh && !this.triggerFirstElement.getAttribute("a11y-describedby")) ||
|
|
355
354
|
(!isStzh && !this.triggerFirstElement.getAttribute("aria-describedby"))) {
|
|
@@ -365,19 +364,32 @@ const StzhPopover = /*@__PURE__*/ proxyCustomElement(class StzhPopover extends H
|
|
|
365
364
|
}
|
|
366
365
|
}
|
|
367
366
|
componentDidUpdate() {
|
|
368
|
-
this.
|
|
367
|
+
if (this.open && !this.initializedPopover) {
|
|
368
|
+
this.initializeAutoUpdate();
|
|
369
|
+
this.initializeFocusTrap();
|
|
370
|
+
this.popoverShown();
|
|
371
|
+
this.initializedPopover = true;
|
|
372
|
+
}
|
|
373
|
+
if (this.initializedPopover) {
|
|
374
|
+
this.computePosition();
|
|
375
|
+
if (this.trap) {
|
|
376
|
+
this.trap.updateContainerElements(this.dialogElement);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
369
379
|
}
|
|
370
|
-
|
|
380
|
+
initializeAutoUpdate() {
|
|
371
381
|
this.autoUpdateCleanup = autoUpdate(this.triggerFirstElement, this.dialogElement, this.computePosition);
|
|
372
|
-
|
|
382
|
+
}
|
|
383
|
+
initializeFocusTrap() {
|
|
373
384
|
this.trap = createFocusTrap(this.dialogElement, {
|
|
374
385
|
fallbackFocus: this.dialogElement,
|
|
375
386
|
clickOutsideDeactivates: true,
|
|
376
387
|
returnFocusOnDeactivate: true,
|
|
377
388
|
});
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
389
|
+
}
|
|
390
|
+
componentDidLoad() {
|
|
391
|
+
this.contentWrapperElement.hidden = !this.open;
|
|
392
|
+
this.open ? this.popoverShown() : this.popoverHidden();
|
|
381
393
|
}
|
|
382
394
|
connectedCallback() {
|
|
383
395
|
addMediaChangeListener(this.mediaChangeHandler);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"stzh-popover2.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,ihVAAihV;;ACqBxiV,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAC1C,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAE1C,SAAS,2BAA2B;EAClC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;EACvC,OAAO;IACL,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC/C,OAAO,EAAE;MACP,QAAQ,EAAE,OAAO,GAAG,6BAA6B,GAAG,uBAAuB;MAC3E,MAAM,EAAE,QAAQ;KACjB;GACF,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B;EAClC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;EACvC,OAAO;IACL,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC/C,OAAO,EAAE;MACP,QAAQ,EAAE,OAAO,GAAG,6BAA6B,GAAG,uBAAuB;MAC3E,MAAM,EAAE,QAAQ;KACjB;GACF,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB;EAC1B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;EACvC,OAAO;IACL,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,kBAAkB,GAAG,kBAAkB,EAAE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IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,oBAAoB,GAAa,EAC/D,YAAM,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,YAAY,CAAC,KAAK,CAAQ,CAC7D,CACL,EACN,WAAK,KAAK,EAAC,oCAAoC,IAC7C,WAAK,KAAK,EAAC,4BAA4B,IACrC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,EACN,WAAK,KAAK,EAAC,2BAA2B,IACpC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACF,CACF,CACF,CACF,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-popover/stzh-popover.scss?tag=stzh-popover&encapsulation=scoped","src/components/stzh-popover/stzh-popover.tsx"],"sourcesContent":["/**\n * @prop --width: Width of popover above small breakpoint\n * @prop --min-width: Minimum width of popover above small breakpoint\n * @prop --max-width: Maximum width of popover above small breakpoint\n * @prop --padding: Padding of popover\n * @prop --content-padding: Padding of popover content\n * @prop --border-radius: Border radius of popover\n * @prop --backdrop-opacity: Opacity of popover backdrop (used on mikro breakpoint)\n *\n * @prop --stzh-popover-width: **Global**: Width of popover above small breakpoint (default `223px`)\n * @prop --stzh-popover-min-width: **Global**: Minimum width of popover above small breakpoint (default `initial`)\n * @prop --stzh-popover-max-width: **Global**: Maximum width of popover above small breakpoint (default `initial`)\n * @prop --stzh-popover-padding: **Global**: Padding of popover (default `0px`)\n * @prop --stzh-popover-content-padding: **Global**: Padding of popover content (default `8px 0px`)\n * @prop --stzh-popover-border-radius: **Global**: Border radius of popover above small breakpoint (default `3px`)\n *\n * @prop --stzh-dialog-backdrop-opacity: **Global**: Opacity of backdrops\n * @prop --stzh-dialog-backdrop-background-color: **Global**: Background color of backdrops\n */\n\n:host {\n display: contents;\n\n --color: #{$colorBlack};\n --width: #{$popoverWidth};\n --min-width: #{$popoverMinWidth};\n --max-width: #{$popoverMaxWidth};\n --height: auto;\n --min-height: initial;\n --max-height: initial;\n --padding: #{$popoverPadding};\n --content-padding: #{$popoverContentPadding};\n --border-radius: #{$popoverBorderRadius};\n --background-color: #{$popoverBackgroundColor};\n --backdrop-opacity: #{$dialogBackdropOpacity};\n --backdrop-background-color: #{$dialogBackdropBackgroundColor};\n\n &[size=\"large\"] {\n --content-padding: #{$popoverLargeContentPadding};\n }\n\n &[variant=\"secondary\"] {\n --background-color: #{$colorSecondary20};\n }\n\n &[variant=\"tooltip\"] {\n --width: #{$tooltipWidth};\n --min-width: #{$tooltipMinWidth};\n --max-width: #{$tooltipMaxWidth};\n --content-padding: #{space('small')} #{space('large')};\n --border-radius: #{$tooltipBorderRadius};\n\n @include mq($from: small) {\n --content-padding: #{$tooltipPadding};\n --color: #{$colorWhite};\n --link-color: #{$colorWhite};\n --hover-link-color: #{$colorWhite70op};\n --background-color: #{$colorCoolgrey60};\n }\n }\n}\n\n.stzh-popover {\n @include tooltip-arrow;\n display: contents;\n\n &__trigger {\n display: contents;\n }\n\n &__content-wrapper {\n // position: absolute;\n // width: 100%;\n // height: 100%;\n // pointer-events: none;\n display: contents;\n\n @include mq($to: small) {\n z-index: $zIndexDialog;\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: stretch;\n justify-content: stretch;\n }\n }\n\n &__backdrop {\n display: contents;\n\n @include mq($to: small) {\n z-index: 1;\n position: absolute;\n display: block;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n text-align: center;\n background-color: var(--backdrop-background-color);\n opacity: var(--backdrop-opacity);\n }\n }\n\n &__content {\n // pointer-events: all;\n display: contents;\n\n @include mq($to: small) {\n z-index: 2;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n overflow: auto;\n }\n }\n\n &__dialog {\n margin-top: auto;\n width: 100%;\n overflow: visible;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n background-color: var(--background-color);\n touch-action: none;\n outline: none;\n border-bottom: 2px solid $colorOldGrey13;\n color: var(--color);\n\n --stzh-base-color: var(--color);\n --stzh-link-color: var(--link-color);\n // TODO: check with designer\n --stzh-link-hover-color: var(--hover-link-color);\n\n @include mq($from: small) {\n z-index: $zIndexPopover;\n position: absolute;\n display: flex;\n width: var(--width);\n min-width: var(--min-width);\n max-width: var(--max-width);\n // max-width: calc(100vw - var(--stzh-scrollbar-width) - #{space('small')});\n height: var(--height);\n min-height: var(--min-height);\n max-height: var(--max-height);\n left: auto;\n right: auto;\n bottom: auto;\n border-radius: var(--border-radius);\n box-shadow: $boxShadowPopover;\n border: none;\n }\n }\n\n &__content-inner,\n &__content-slot-wrapper {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n &__content-slot-wrapper {\n padding: var(--padding);\n }\n\n &__content-slot {\n overflow-y: auto;\n overflow-x: hidden;\n overflow-scrolling: touch;\n padding: var(--content-padding);\n }\n\n &__action-slot {\n display: flex;\n flex-direction: column;\n\n // &:not(:empty) {\n // margin: space('xsmall') space('small');\n // margin-bottom: space('medium');\n // }\n }\n\n &__label-wrapper {\n display: flex;\n align-items: center;\n padding: space('small') space('large');\n padding-right: space('medium');\n border-bottom: 1px solid $baseBorderColor;\n color: $colorOldGrey70;\n\n @include mq($from: small) {\n padding: 0;\n border-bottom: 0;\n }\n }\n\n &__label {\n @include font('heavy');\n @include fontCurve('p2');\n margin: 0;\n margin-right: space('small');\n\n @include mq($from: small) {\n @include visuallyhidden;\n }\n }\n\n &__close {\n visibility: $popoverCloseVisibility;\n cursor: pointer;\n display: flex;\n appearance: none;\n font-family: inherit;\n border: none;\n background-color: transparent;\n padding: 0;\n margin-left: auto;\n border-radius: 50%;\n color: $baseLeadColor;\n padding: space('xxsmall');\n }\n\n &__icon {\n --size: #{iconSize('xsmall')};\n }\n\n &__arrow {\n position: absolute;\n display: none;\n\n @include mq($from: small) {\n display: flex;\n }\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n /* Only non tooltip variants */\n\n &--default &__close,\n &--secondary &__close {\n &:focus {\n box-shadow: 0 0 0 1px $colorPrimary;\n }\n\n @include mq($from: small) {\n @include visuallyhiddenFocusable;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(30%, -30%);\n background-color: $colorOldGrey5;\n }\n }\n\n /* Tooltip variant */\n\n &--tooltip &__content-inner {\n @include mq($from: small) {\n flex-direction: row-reverse;\n align-items: flex-start;\n }\n }\n\n &--tooltip &__close {\n visibility: visible;\n\n @include mq($from: small) {\n @include tooltip__close;\n }\n }\n\n &--tooltip &__icon {\n @include mq($from: small) {\n @include tooltip__icon;\n }\n }\n\n &--tooltip &__dialog {\n @include mq($from: small) {\n @include tooltip-dropshadow;\n }\n }\n\n &--tooltip &__content-slot {\n @include mq($from: small) {\n @include tooltip-fontsize;\n }\n }\n\n /* Has fullwidth popover */\n\n &--popover-fullwidth-horizontal &__dialog {\n @include mq($from: small) {\n left: 0 !important;\n right: 0 !important;\n width: 100%;\n }\n }\n\n &--popover-fullwidth-vertical &__dialog {\n @include mq($from: small) {\n top: 0 !important;\n bottom: 0 !important;\n height: 100%;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport {\n StzhPopoverClosedEvent,\n StzhPopoverCloseEvent,\n StzhPopoverOpenedEvent,\n StzhPopoverOpenEvent,\n} from \"../../index\";\n\nimport { arrow, autoUpdate, computePosition, flip, offset, Placement, shift } from \"@floating-ui/dom\";\n\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\nimport { isStzhElement } from \"../../utils/utils\";\nimport { addMediaChangeListener, media, removeMediaChangeListener } from \"../../utils/media-utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, stopAnimations } from \"../../utils/animation-utils\";\n\nimport { StzhPopoverLocalizedText } from \"./stzh-popover.localization\";\n\nimport Arrow from \"../stzh-tooltip/assets/arrow.svg\";\n\nconst ANIMATION_SHOW_DURATION = 200;\nconst ANIMATION_HIDE_DURATION = 300;\nconst ANIMATION_SHOW_DURATION_SMALL = 100;\nconst ANIMATION_HIDE_DURATION_SMALL = 200;\n\nfunction animationContentWrapperShow() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ opacity: \"0\" }, { opacity: \"1\" }],\n options: {\n duration: isSmall ? ANIMATION_SHOW_DURATION_SMALL : ANIMATION_SHOW_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nfunction animationContentWrapperHide() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ opacity: \"1\" }, { opacity: \"0\" }],\n options: {\n duration: isSmall ? ANIMATION_HIDE_DURATION_SMALL : ANIMATION_HIDE_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nfunction animationDialogShow() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ transform: isSmall ? \"translateY(-8px)\" : \"translateY(100%)\" }, { transform: \"translateY(0px)\" }],\n options: {\n duration: isSmall ? ANIMATION_SHOW_DURATION_SMALL : ANIMATION_SHOW_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nfunction animationDialogHide() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ transform: \"translateY(0px)\" }, { transform: isSmall ? \"translateY(-8px)\" : \"translateY(100%)\" }],\n options: {\n duration: isSmall ? ANIMATION_HIDE_DURATION_SMALL : ANIMATION_HIDE_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nconst keyCode = {\n ESC: 27,\n};\n\nconst CLASS_BODY_OPEN = \"stzh-popover-open\";\n\nlet popoverCounter = 0;\n\n/**\n * @slot - Trigger element for popover\n * @slot content - Any element used as popover content\n * @slot action - `stzh-button` element\n * @slot label - Label for mobile view (alternative for label property)\n */\n@Component({\n tag: \"stzh-popover\",\n styleUrl: \"stzh-popover.scss\",\n scoped: true,\n})\nexport class StzhPopover {\n /** Whether popover should be open */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /** Default placement of popover relative to trigger element */\n @Prop({ reflect: true }) placement: Placement = \"bottom\";\n\n /** Whether to stretch popover to fullwith of parent */\n @Prop({ reflect: true }) fullwidth: \"horizontal\" | \"vertical\" | \"\" = \"\";\n\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" | \"tooltip\" = \"default\";\n\n /** Size */\n @Prop({ reflect: true }) size: \"default\" | \"large\" = \"default\";\n\n /** Shifting of popover content */\n @Prop() skidding: number = 0;\n\n /** Distance from popover content to trigger. \"8\" when default variant, \"16\" when tooltip variant, arrow height (8px) + spacing (4px) = 12. */\n @Prop() distance: number;\n\n /** Label for mobile view (use label slot as alternative) */\n @Prop() label: string = \"\";\n\n /** Position strategy */\n @Prop() strategy: \"absolute\" | \"fixed\" = \"absolute\";\n\n /** Translation strings. */\n @Prop() localization: StzhPopoverLocalizedText;\n\n @Element() element: HTMLStzhPopoverElement;\n\n /** Popover open event */\n @Event() stzhOpen: EventEmitter<StzhPopoverOpenEvent>;\n\n /** Popover opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhPopoverOpenedEvent>;\n\n /** Popover close event */\n @Event() stzhClose: EventEmitter<StzhPopoverCloseEvent>;\n\n /** Popover closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhPopoverClosedEvent>;\n\n private parentNode: Node;\n\n /** Show popover content */\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.mediaChangeHandler();\n if (this.isHeaderStuckAndViewportMicro) {\n this.branchOutToBody();\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n /** Hide popover content */\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n\n await waitForEvent(this.element, \"stzhClosed\");\n\n this.mediaChangeHandler();\n if (this.isHeaderStuckAndViewportMicro) {\n this.branchInFromBody();\n }\n\n return true;\n }\n\n /** Toggle popover content */\n @Method()\n async toggle() {\n if (this.open) {\n return await this.hide();\n } else {\n return await this.show();\n }\n }\n\n @Method()\n async update() {\n return await this.computePosition();\n }\n\n @Listen(\"click\", { target: \"document\", capture: true })\n handleOutsideClick(event: MouseEvent) {\n if (!this.open) {\n return;\n }\n\n const isClickOutside =\n event.target !== this.dialogElement && this.dialogElement.contains(event.target as HTMLElement) === false;\n\n const isClickTrigger =\n event.target === this.triggerElement || this.triggerElement.contains(event.target as HTMLElement);\n\n if (isClickOutside && !isClickTrigger) {\n this.hide();\n }\n }\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.dialogElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-popover\",\n });\n }\n\n const animationShow = animationContentWrapperShow();\n const animationShowDialog = animationDialogShow();\n\n await Promise.all([\n stopAnimations(this.contentWrapperElement),\n stopAnimations(this.contentElement),\n stopAnimations(this.dialogElement),\n ]);\n\n // safari seems to need will-change,\n // otherwise it has problems animating the element with the drop shadow\n this.dialogElement.style.willChange = \"transform, opacity, position, top, left, bottom, right\";\n this.contentWrapperElement.hidden = false;\n\n await Promise.all([\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentWrapperElement,\n animationShow.keyframes,\n animationShow.options\n ),\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentElement,\n animationShowDialog.keyframes,\n animationShowDialog.options\n ),\n ]);\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-popover\",\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-popover\",\n });\n }\n\n const animationHide = animationContentWrapperHide();\n const animationHideDialog = animationDialogHide();\n\n await Promise.all([\n stopAnimations(this.contentWrapperElement),\n stopAnimations(this.contentElement),\n stopAnimations(this.dialogElement),\n ]);\n\n await Promise.all([\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentWrapperElement,\n animationHide.keyframes,\n animationHide.options\n ),\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentElement,\n animationHideDialog.keyframes,\n animationHideDialog.options\n ),\n ]);\n\n this.contentWrapperElement.hidden = true;\n this.dialogElement.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-popover\",\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Watch(\"distance\")\n distanceWatcher(newValue: number) {\n if (typeof newValue === \"number\") {\n this.distance = newValue;\n } else {\n this.distance = this.variant === \"tooltip\" ? 12 : 8;\n }\n }\n\n @State() computedPlacement: Placement;\n @State() isHeaderStuckAndViewportMicro: boolean;\n @State() isBranchedOutToBody: boolean;\n @State() hasStzhHeaderParent: boolean;\n\n private observer: MutationObserver;\n\n private contentWrapperElement: HTMLElement;\n private contentElement: HTMLElement;\n private arrowElement: HTMLElement;\n private rootElement: HTMLElement;\n private triggerElement: HTMLElement;\n private triggerFirstElement: HTMLElement;\n private dialogElement: HTMLElement;\n private autoUpdateCleanup: Function;\n\n private initialTouchX: number = null;\n private initialTouchY: number = null;\n\n private id: string;\n private trap: FocusTrap;\n private toggledByMethod: boolean;\n\n private setStzhHeaderParent(): boolean {\n let parent = this.element.parentElement;\n while (parent) {\n if (parent.tagName && parent.tagName.toLowerCase() === \"stzh-header\") {\n return true;\n }\n parent = parent.parentElement;\n }\n return false;\n }\n\n private mediaChangeHandler = () => {\n const isStzhHeaderStuck = document.documentElement.style.getPropertyValue(\"--stzh-header-is-stuck\");\n this.isHeaderStuckAndViewportMicro =\n !media(\"small\").matches && isStzhHeaderStuck === \"1\" && this.hasStzhHeaderParent;\n\n if (this.open && this.isBranchedOutToBody && !this.isHeaderStuckAndViewportMicro) {\n this.branchInFromBody();\n }\n };\n\n private branchOutToBody() {\n document.body.append(this.element);\n this.parentNode.appendChild(this.triggerElement);\n this.isBranchedOutToBody = true;\n }\n\n private branchInFromBody() {\n this.parentNode.appendChild(this.element);\n this.rootElement.prepend(this.triggerElement);\n this.isBranchedOutToBody = false;\n }\n\n private handleKeydown = (event: KeyboardEvent) => {\n if (event.keyCode === keyCode.ESC) {\n this.hide();\n }\n };\n\n private onClickTrigger = () => {\n this.toggle();\n };\n\n private computePosition = async () => {\n if (media(\"small\").matches) {\n const middleware = [\n offset({\n mainAxis: this.distance,\n crossAxis: this.skidding,\n }),\n flip({\n padding: 5,\n }),\n shift({\n padding: 5,\n }),\n ];\n\n if (this.variant === \"tooltip\") {\n middleware.push(\n arrow({\n element: this.arrowElement,\n padding: 5,\n })\n );\n }\n\n const {\n x = 0,\n y = 0,\n strategy = \"absolute\",\n placement,\n middlewareData,\n } = await computePosition(this.triggerFirstElement, this.dialogElement, {\n strategy: this.strategy,\n placement: this.placement,\n middleware,\n });\n\n this.computedPlacement = placement;\n\n Object.assign(this.dialogElement.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (this.variant === \"tooltip\") {\n Object.assign(this.arrowElement.style, {\n left: x != null ? `${middlewareData.arrow.x}px` : \"\",\n top: y != null ? `${middlewareData.arrow.y}px` : \"\",\n });\n }\n } else {\n Object.assign(this.dialogElement.style, {\n position: null,\n left: null,\n top: null,\n });\n\n if (this.variant === \"tooltip\") {\n Object.assign(this.arrowElement.style, {\n left: null,\n top: null,\n });\n }\n }\n };\n\n private handleTouchStart = (event: TouchEvent) => {\n const touch = event.changedTouches[0];\n this.initialTouchX = touch.pageX;\n this.initialTouchY = touch.pageY;\n };\n\n // private handleTouchMove = (event: TouchEvent) => {\n // event.preventDefault()\n // }\n\n private handleTouchEnd = (event: TouchEvent) => {\n const touch = event.changedTouches[0];\n const distX = touch.pageX - this.initialTouchX; // get horizontal dist traveled\n const distY = touch.pageY - this.initialTouchY; // get vertical dist traveled\n const threshold = 70;\n\n const isYSwipe = Math.abs(distY) >= threshold && Math.abs(distX) <= threshold;\n\n if (isYSwipe) {\n const isInDropdown = (event.target as HTMLElement).closest('.stzh-dropdown') !== null;\n if (!isInDropdown){\n this.hide();\n }\n }\n\n this.initialTouchY = null;\n this.initialTouchX = null;\n };\n\n private init = () => {\n let trigger = this.triggerElement?.firstElementChild as HTMLElement;\n\n if (!trigger) {\n const defaultSlot = Array.from(this.element.children).find(child => !child.hasAttribute(\"slot\")) as HTMLElement;\n\n trigger = defaultSlot;\n }\n\n if (trigger) {\n this.triggerFirstElement = trigger;\n trigger.addEventListener(\"click\", this.onClickTrigger);\n }\n };\n\n async componentWillLoad() {\n this.id = `stzh-popover-${popoverCounter++}`;\n this.parentNode = this.element.parentNode;\n this.hasStzhHeaderParent = this.setStzhHeaderParent();\n\n this.distanceWatcher(this.distance);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"popover\");\n }\n }\n\n private popoverShown() {\n document.body.classList.add(CLASS_BODY_OPEN);\n\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-expanded\" : \"aria-expanded\", \"true\");\n\n if (this.trap) {\n this.trap.activate();\n }\n }\n\n private popoverHidden() {\n document.body.classList.remove(CLASS_BODY_OPEN);\n\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-expanded\" : \"aria-expanded\", \"false\");\n\n if (this.trap) {\n this.trap.deactivate();\n }\n }\n\n componentDidRender() {\n this.computePosition();\n this.mediaChangeHandler();\n this.open ? this.popoverShown() : this.popoverHidden();\n\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-describedby\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-describedby\"))\n ) {\n this.triggerFirstElement.setAttribute(\n isStzh ? \"a11y-describedby\" : \"aria-describedby\",\n `${this.id}-trigger-description`\n );\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-label\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-label\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", this.label);\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"analytics-id\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"s-object-id\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", this.label);\n }\n }\n\n componentDidUpdate() {\n this.trap.updateContainerElements(this.dialogElement);\n }\n\n componentDidLoad() {\n this.autoUpdateCleanup = autoUpdate(this.triggerFirstElement, this.dialogElement, this.computePosition);\n\n this.contentWrapperElement.hidden = !this.open;\n\n this.trap = createFocusTrap(this.dialogElement, {\n fallbackFocus: this.dialogElement,\n clickOutsideDeactivates: true,\n returnFocusOnDeactivate: true,\n });\n\n if (this.open) {\n this.popoverShown();\n }\n }\n\n connectedCallback() {\n addMediaChangeListener(this.mediaChangeHandler);\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.mediaChangeHandler);\n if (this.observer) {\n this.observer.disconnect();\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n }\n\n if (this.triggerFirstElement) {\n this.triggerFirstElement.removeEventListener(\"click\", this.onClickTrigger);\n }\n }\n\n render() {\n const classes = {\n \"stzh-popover\": true,\n [`stzh-popover--open`]: this.open,\n [`stzh-popover--placement-${this.computedPlacement}`]: !!this.computedPlacement,\n [`stzh-popover--fullwidth-${this.fullwidth}`]: !!this.fullwidth,\n [`stzh-popover--${this.size}`]: !!this.size,\n [`stzh-popover--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host>\n <div\n class={classes}\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n ref={el => (this.rootElement = el as HTMLDivElement)}\n >\n <div ref={el => (this.triggerElement = el as HTMLDivElement)} class=\"stzh-popover__trigger\">\n <slot></slot>\n </div>\n <div class=\"stzh-popover__vhidden\" id={`${this.id}-trigger-description`}>\n {this.localization.open}\n </div>\n <div ref={el => (this.contentWrapperElement = el as HTMLDivElement)} class=\"stzh-popover__content-wrapper\">\n <div class=\"stzh-popover__backdrop\"></div>\n <div ref={el => (this.contentElement = el as HTMLDivElement)} class=\"stzh-popover__content\">\n <div\n ref={el => (this.dialogElement = el as HTMLDivElement)}\n class=\"stzh-popover__dialog\"\n role=\"dialog\"\n tabindex=\"-1\"\n aria-modal=\"true\"\n aria-labelledby={this.label ? `${this.id}-label` : null}\n aria-hidden={this.open ? \"false\" : \"true\"}\n onKeyDown={this.handleKeydown}\n >\n {this.variant === \"tooltip\" && (\n <div\n class=\"stzh-popover__arrow\"\n ref={el => (this.arrowElement = el as HTMLDivElement)}\n innerHTML={Arrow}\n ></div>\n )}\n <div class=\"stzh-popover__content-inner\">\n <div class=\"stzh-popover__label-wrapper\">\n <h2 id={`${this.id}-label`} class=\"stzh-popover__label\">\n {this.label ? this.label : <slot name=\"label\"></slot>}\n </h2>\n <button class=\"stzh-popover__close\" onClick={() => this.hide()} type=\"button\">\n <stzh-icon name=\"close\" class=\"stzh-popover__icon\"></stzh-icon>\n <span class=\"stzh-popover__vhidden\">{this.localization.close}</span>\n </button>\n </div>\n <div class=\"stzh-popover__content-slot-wrapper\">\n <div class=\"stzh-popover__content-slot\">\n <slot name=\"content\"></slot>\n </div>\n <div class=\"stzh-popover__action-slot\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"stzh-popover2.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,ihVAAihV;;ACqBxiV,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAC1C,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAE1C,SAAS,2BAA2B;EAClC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAA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,KAAK,EAAC,4BAA4B,IACrC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,EACN,WAAK,KAAK,EAAC,2BAA2B,IACpC,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACF,CACF,CACF,CACF,CACF,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/stzh-popover/stzh-popover.scss?tag=stzh-popover&encapsulation=scoped","src/components/stzh-popover/stzh-popover.tsx"],"sourcesContent":["/**\n * @prop --width: Width of popover above small breakpoint\n * @prop --min-width: Minimum width of popover above small breakpoint\n * @prop --max-width: Maximum width of popover above small breakpoint\n * @prop --padding: Padding of popover\n * @prop --content-padding: Padding of popover content\n * @prop --border-radius: Border radius of popover\n * @prop --backdrop-opacity: Opacity of popover backdrop (used on mikro breakpoint)\n *\n * @prop --stzh-popover-width: **Global**: Width of popover above small breakpoint (default `223px`)\n * @prop --stzh-popover-min-width: **Global**: Minimum width of popover above small breakpoint (default `initial`)\n * @prop --stzh-popover-max-width: **Global**: Maximum width of popover above small breakpoint (default `initial`)\n * @prop --stzh-popover-padding: **Global**: Padding of popover (default `0px`)\n * @prop --stzh-popover-content-padding: **Global**: Padding of popover content (default `8px 0px`)\n * @prop --stzh-popover-border-radius: **Global**: Border radius of popover above small breakpoint (default `3px`)\n *\n * @prop --stzh-dialog-backdrop-opacity: **Global**: Opacity of backdrops\n * @prop --stzh-dialog-backdrop-background-color: **Global**: Background color of backdrops\n */\n\n:host {\n display: contents;\n\n --color: #{$colorBlack};\n --width: #{$popoverWidth};\n --min-width: #{$popoverMinWidth};\n --max-width: #{$popoverMaxWidth};\n --height: auto;\n --min-height: initial;\n --max-height: initial;\n --padding: #{$popoverPadding};\n --content-padding: #{$popoverContentPadding};\n --border-radius: #{$popoverBorderRadius};\n --background-color: #{$popoverBackgroundColor};\n --backdrop-opacity: #{$dialogBackdropOpacity};\n --backdrop-background-color: #{$dialogBackdropBackgroundColor};\n\n &[size=\"large\"] {\n --content-padding: #{$popoverLargeContentPadding};\n }\n\n &[variant=\"secondary\"] {\n --background-color: #{$colorSecondary20};\n }\n\n &[variant=\"tooltip\"] {\n --width: #{$tooltipWidth};\n --min-width: #{$tooltipMinWidth};\n --max-width: #{$tooltipMaxWidth};\n --content-padding: #{space('small')} #{space('large')};\n --border-radius: #{$tooltipBorderRadius};\n\n @include mq($from: small) {\n --content-padding: #{$tooltipPadding};\n --color: #{$colorWhite};\n --link-color: #{$colorWhite};\n --hover-link-color: #{$colorWhite70op};\n --background-color: #{$colorCoolgrey60};\n }\n }\n}\n\n.stzh-popover {\n @include tooltip-arrow;\n display: contents;\n\n &__trigger {\n display: contents;\n }\n\n &__content-wrapper {\n // position: absolute;\n // width: 100%;\n // height: 100%;\n // pointer-events: none;\n display: contents;\n\n @include mq($to: small) {\n z-index: $zIndexDialog;\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: stretch;\n justify-content: stretch;\n }\n }\n\n &__backdrop {\n display: contents;\n\n @include mq($to: small) {\n z-index: 1;\n position: absolute;\n display: block;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n text-align: center;\n background-color: var(--backdrop-background-color);\n opacity: var(--backdrop-opacity);\n }\n }\n\n &__content {\n // pointer-events: all;\n display: contents;\n\n @include mq($to: small) {\n z-index: 2;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n flex-grow: 1;\n overflow: auto;\n }\n }\n\n &__dialog {\n margin-top: auto;\n width: 100%;\n overflow: visible;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n background-color: var(--background-color);\n touch-action: none;\n outline: none;\n border-bottom: 2px solid $colorOldGrey13;\n color: var(--color);\n\n --stzh-base-color: var(--color);\n --stzh-link-color: var(--link-color);\n // TODO: check with designer\n --stzh-link-hover-color: var(--hover-link-color);\n\n @include mq($from: small) {\n z-index: $zIndexPopover;\n position: absolute;\n display: flex;\n width: var(--width);\n min-width: var(--min-width);\n max-width: var(--max-width);\n // max-width: calc(100vw - var(--stzh-scrollbar-width) - #{space('small')});\n height: var(--height);\n min-height: var(--min-height);\n max-height: var(--max-height);\n left: auto;\n right: auto;\n bottom: auto;\n border-radius: var(--border-radius);\n box-shadow: $boxShadowPopover;\n border: none;\n }\n }\n\n &__content-inner,\n &__content-slot-wrapper {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n\n &__content-slot-wrapper {\n padding: var(--padding);\n }\n\n &__content-slot {\n overflow-y: auto;\n overflow-x: hidden;\n overflow-scrolling: touch;\n padding: var(--content-padding);\n }\n\n &__action-slot {\n display: flex;\n flex-direction: column;\n\n // &:not(:empty) {\n // margin: space('xsmall') space('small');\n // margin-bottom: space('medium');\n // }\n }\n\n &__label-wrapper {\n display: flex;\n align-items: center;\n padding: space('small') space('large');\n padding-right: space('medium');\n border-bottom: 1px solid $baseBorderColor;\n color: $colorOldGrey70;\n\n @include mq($from: small) {\n padding: 0;\n border-bottom: 0;\n }\n }\n\n &__label {\n @include font('heavy');\n @include fontCurve('p2');\n margin: 0;\n margin-right: space('small');\n\n @include mq($from: small) {\n @include visuallyhidden;\n }\n }\n\n &__close {\n visibility: $popoverCloseVisibility;\n cursor: pointer;\n display: flex;\n appearance: none;\n font-family: inherit;\n border: none;\n background-color: transparent;\n padding: 0;\n margin-left: auto;\n border-radius: 50%;\n color: $baseLeadColor;\n padding: space('xxsmall');\n }\n\n &__icon {\n --size: #{iconSize('xsmall')};\n }\n\n &__arrow {\n position: absolute;\n display: none;\n\n @include mq($from: small) {\n display: flex;\n }\n }\n\n &__vhidden {\n @include visuallyhidden;\n }\n\n /* Only non tooltip variants */\n\n &--default &__close,\n &--secondary &__close {\n &:focus {\n box-shadow: 0 0 0 1px $colorPrimary;\n }\n\n @include mq($from: small) {\n @include visuallyhiddenFocusable;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(30%, -30%);\n background-color: $colorOldGrey5;\n }\n }\n\n /* Tooltip variant */\n\n &--tooltip &__content-inner {\n @include mq($from: small) {\n flex-direction: row-reverse;\n align-items: flex-start;\n }\n }\n\n &--tooltip &__close {\n visibility: visible;\n\n @include mq($from: small) {\n @include tooltip__close;\n }\n }\n\n &--tooltip &__icon {\n @include mq($from: small) {\n @include tooltip__icon;\n }\n }\n\n &--tooltip &__dialog {\n @include mq($from: small) {\n @include tooltip-dropshadow;\n }\n }\n\n &--tooltip &__content-slot {\n @include mq($from: small) {\n @include tooltip-fontsize;\n }\n }\n\n /* Has fullwidth popover */\n\n &--popover-fullwidth-horizontal &__dialog {\n @include mq($from: small) {\n left: 0 !important;\n right: 0 !important;\n width: 100%;\n }\n }\n\n &--popover-fullwidth-vertical &__dialog {\n @include mq($from: small) {\n top: 0 !important;\n bottom: 0 !important;\n height: 100%;\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\";\n\nimport {\n StzhPopoverClosedEvent,\n StzhPopoverCloseEvent,\n StzhPopoverOpenedEvent,\n StzhPopoverOpenEvent,\n} from \"../../index\";\n\nimport { arrow, autoUpdate, computePosition, flip, offset, Placement, shift } from \"@floating-ui/dom\";\n\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\nimport { isStzhElement } from \"../../utils/utils\";\nimport { addMediaChangeListener, media, removeMediaChangeListener } from \"../../utils/media-utils\";\nimport { waitForEvent } from \"../../utils/event-utils\";\nimport { animateTo, stopAnimations } from \"../../utils/animation-utils\";\n\nimport { StzhPopoverLocalizedText } from \"./stzh-popover.localization\";\n\nimport Arrow from \"../stzh-tooltip/assets/arrow.svg\";\n\nconst ANIMATION_SHOW_DURATION = 200;\nconst ANIMATION_HIDE_DURATION = 300;\nconst ANIMATION_SHOW_DURATION_SMALL = 100;\nconst ANIMATION_HIDE_DURATION_SMALL = 200;\n\nfunction animationContentWrapperShow() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ opacity: \"0\" }, { opacity: \"1\" }],\n options: {\n duration: isSmall ? ANIMATION_SHOW_DURATION_SMALL : ANIMATION_SHOW_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nfunction animationContentWrapperHide() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ opacity: \"1\" }, { opacity: \"0\" }],\n options: {\n duration: isSmall ? ANIMATION_HIDE_DURATION_SMALL : ANIMATION_HIDE_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nfunction animationDialogShow() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ transform: isSmall ? \"translateY(-8px)\" : \"translateY(100%)\" }, { transform: \"translateY(0px)\" }],\n options: {\n duration: isSmall ? ANIMATION_SHOW_DURATION_SMALL : ANIMATION_SHOW_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nfunction animationDialogHide() {\n const isSmall = media(\"small\").matches;\n return {\n keyframes: [{ transform: \"translateY(0px)\" }, { transform: isSmall ? \"translateY(-8px)\" : \"translateY(100%)\" }],\n options: {\n duration: isSmall ? ANIMATION_HIDE_DURATION_SMALL : ANIMATION_HIDE_DURATION,\n easing: \"linear\",\n },\n };\n}\n\nconst keyCode = {\n ESC: 27,\n};\n\nconst CLASS_BODY_OPEN = \"stzh-popover-open\";\n\nlet popoverCounter = 0;\n\n/**\n * @slot - Trigger element for popover\n * @slot content - Any element used as popover content\n * @slot action - `stzh-button` element\n * @slot label - Label for mobile view (alternative for label property)\n */\n@Component({\n tag: \"stzh-popover\",\n styleUrl: \"stzh-popover.scss\",\n scoped: true,\n})\nexport class StzhPopover {\n /** Whether popover should be open */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n\n /** Default placement of popover relative to trigger element */\n @Prop({ reflect: true }) placement: Placement = \"bottom\";\n\n /** Whether to stretch popover to fullwith of parent */\n @Prop({ reflect: true }) fullwidth: \"horizontal\" | \"vertical\" | \"\" = \"\";\n\n /** Variant */\n @Prop({ reflect: true }) variant: \"default\" | \"secondary\" | \"tooltip\" = \"default\";\n\n /** Size */\n @Prop({ reflect: true }) size: \"default\" | \"large\" = \"default\";\n\n /** Shifting of popover content */\n @Prop() skidding: number = 0;\n\n /** Distance from popover content to trigger. \"8\" when default variant, \"16\" when tooltip variant, arrow height (8px) + spacing (4px) = 12. */\n @Prop() distance: number;\n\n /** Label for mobile view (use label slot as alternative) */\n @Prop() label: string = \"\";\n\n /** Position strategy */\n @Prop() strategy: \"absolute\" | \"fixed\" = \"absolute\";\n\n /** Translation strings. */\n @Prop() localization: StzhPopoverLocalizedText;\n\n @Element() element: HTMLStzhPopoverElement;\n\n /** Popover open event */\n @Event() stzhOpen: EventEmitter<StzhPopoverOpenEvent>;\n\n /** Popover opened event (after animation) */\n @Event() stzhOpened: EventEmitter<StzhPopoverOpenedEvent>;\n\n /** Popover close event */\n @Event() stzhClose: EventEmitter<StzhPopoverCloseEvent>;\n\n /** Popover closed event (after animation) */\n @Event() stzhClosed: EventEmitter<StzhPopoverClosedEvent>;\n\n private parentNode: Node;\n\n /** Show popover content */\n @Method()\n async show() {\n if (this.open) {\n return;\n }\n\n this.mediaChangeHandler();\n if (this.isHeaderStuckAndViewportMicro) {\n this.branchOutToBody();\n }\n\n this.toggledByMethod = true;\n this.open = true;\n return waitForEvent(this.element, \"stzhOpened\");\n }\n\n /** Hide popover content */\n @Method()\n async hide() {\n if (!this.open) {\n return;\n }\n\n this.toggledByMethod = true;\n this.open = false;\n\n await waitForEvent(this.element, \"stzhClosed\");\n\n this.mediaChangeHandler();\n if (this.isHeaderStuckAndViewportMicro) {\n this.branchInFromBody();\n }\n\n return true;\n }\n\n /** Toggle popover content */\n @Method()\n async toggle() {\n if (this.open) {\n return await this.hide();\n } else {\n return await this.show();\n }\n }\n\n @Method()\n async update() {\n return await this.computePosition();\n }\n\n @Listen(\"click\", { target: \"document\", capture: true })\n handleOutsideClick(event: MouseEvent) {\n if (!this.open) {\n return;\n }\n\n const isClickOutside =\n event.target !== this.dialogElement && this.dialogElement.contains(event.target as HTMLElement) === false;\n\n const isClickTrigger =\n event.target === this.triggerElement || this.triggerElement.contains(event.target as HTMLElement);\n\n if (isClickOutside && !isClickTrigger) {\n this.hide();\n }\n }\n\n @Watch(\"open\")\n async openWatcher(newValue: boolean) {\n if (!this.dialogElement) {\n return;\n }\n\n if (newValue) {\n if (this.toggledByMethod) {\n this.stzhOpen.emit({\n component: \"stzh-popover\",\n });\n }\n\n const animationShow = animationContentWrapperShow();\n const animationShowDialog = animationDialogShow();\n\n await Promise.all([\n stopAnimations(this.contentWrapperElement),\n stopAnimations(this.contentElement),\n stopAnimations(this.dialogElement),\n ]);\n\n // safari seems to need will-change,\n // otherwise it has problems animating the element with the drop shadow\n this.dialogElement.style.willChange = \"transform, opacity, position, top, left, bottom, right\";\n this.contentWrapperElement.hidden = false;\n\n await Promise.all([\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentWrapperElement,\n animationShow.keyframes,\n animationShow.options\n ),\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentElement,\n animationShowDialog.keyframes,\n animationShowDialog.options\n ),\n ]);\n\n if (this.toggledByMethod) {\n this.stzhOpened.emit({\n component: \"stzh-popover\",\n });\n }\n } else {\n if (this.toggledByMethod) {\n this.stzhClose.emit({\n component: \"stzh-popover\",\n });\n }\n\n const animationHide = animationContentWrapperHide();\n const animationHideDialog = animationDialogHide();\n\n await Promise.all([\n stopAnimations(this.contentWrapperElement),\n stopAnimations(this.contentElement),\n stopAnimations(this.dialogElement),\n ]);\n\n await Promise.all([\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentWrapperElement,\n animationHide.keyframes,\n animationHide.options\n ),\n animateTo(\n media(\"small\").matches ? this.dialogElement : this.contentElement,\n animationHideDialog.keyframes,\n animationHideDialog.options\n ),\n ]);\n\n this.contentWrapperElement.hidden = true;\n this.dialogElement.style.willChange = \"auto\";\n\n if (this.toggledByMethod) {\n this.stzhClosed.emit({\n component: \"stzh-popover\",\n });\n }\n }\n\n this.toggledByMethod = false;\n }\n\n @Watch(\"distance\")\n distanceWatcher(newValue: number) {\n if (typeof newValue === \"number\") {\n this.distance = newValue;\n } else {\n this.distance = this.variant === \"tooltip\" ? 12 : 8;\n }\n }\n\n @State() computedPlacement: Placement;\n @State() isHeaderStuckAndViewportMicro: boolean;\n @State() isBranchedOutToBody: boolean;\n @State() hasStzhHeaderParent: boolean;\n\n private observer: MutationObserver;\n\n private contentWrapperElement: HTMLElement;\n private contentElement: HTMLElement;\n private arrowElement: HTMLElement;\n private rootElement: HTMLElement;\n private triggerElement: HTMLElement;\n private triggerFirstElement: HTMLElement;\n private dialogElement: HTMLElement;\n private autoUpdateCleanup: Function;\n\n private initialTouchX: number = null;\n private initialTouchY: number = null;\n\n private id: string;\n private trap: FocusTrap;\n private toggledByMethod: boolean;\n\n private setStzhHeaderParent(): boolean {\n let parent = this.element.parentElement;\n while (parent) {\n if (parent.tagName && parent.tagName.toLowerCase() === \"stzh-header\") {\n return true;\n }\n parent = parent.parentElement;\n }\n return false;\n }\n\n private mediaChangeHandler = () => {\n const isStzhHeaderStuck = document.documentElement.style.getPropertyValue(\"--stzh-header-is-stuck\");\n this.isHeaderStuckAndViewportMicro =\n !media(\"small\").matches && isStzhHeaderStuck === \"1\" && this.hasStzhHeaderParent;\n\n if (this.open && this.isBranchedOutToBody && !this.isHeaderStuckAndViewportMicro) {\n this.branchInFromBody();\n }\n };\n\n private branchOutToBody() {\n document.body.append(this.element);\n this.parentNode.appendChild(this.triggerElement);\n this.isBranchedOutToBody = true;\n }\n\n private branchInFromBody() {\n this.parentNode.appendChild(this.element);\n this.rootElement.prepend(this.triggerElement);\n this.isBranchedOutToBody = false;\n }\n\n private handleKeydown = (event: KeyboardEvent) => {\n if (event.keyCode === keyCode.ESC) {\n this.hide();\n }\n };\n\n private onClickTrigger = () => {\n this.toggle();\n };\n\n private computePosition = async () => {\n if (media(\"small\").matches) {\n const middleware = [\n offset({\n mainAxis: this.distance,\n crossAxis: this.skidding,\n }),\n flip({\n padding: 5,\n }),\n shift({\n padding: 5,\n }),\n ];\n\n if (this.variant === \"tooltip\") {\n middleware.push(\n arrow({\n element: this.arrowElement,\n padding: 5,\n })\n );\n }\n\n const {\n x = 0,\n y = 0,\n strategy = \"absolute\",\n placement,\n middlewareData,\n } = await computePosition(this.triggerFirstElement, this.dialogElement, {\n strategy: this.strategy,\n placement: this.placement,\n middleware,\n });\n\n this.computedPlacement = placement;\n\n Object.assign(this.dialogElement.style, {\n position: strategy,\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (this.variant === \"tooltip\") {\n Object.assign(this.arrowElement.style, {\n left: x != null ? `${middlewareData.arrow.x}px` : \"\",\n top: y != null ? `${middlewareData.arrow.y}px` : \"\",\n });\n }\n } else {\n Object.assign(this.dialogElement.style, {\n position: null,\n left: null,\n top: null,\n });\n\n if (this.variant === \"tooltip\") {\n Object.assign(this.arrowElement.style, {\n left: null,\n top: null,\n });\n }\n }\n };\n\n private handleTouchStart = (event: TouchEvent) => {\n const touch = event.changedTouches[0];\n this.initialTouchX = touch.pageX;\n this.initialTouchY = touch.pageY;\n };\n\n // private handleTouchMove = (event: TouchEvent) => {\n // event.preventDefault()\n // }\n\n private handleTouchEnd = (event: TouchEvent) => {\n const touch = event.changedTouches[0];\n const distX = touch.pageX - this.initialTouchX; // get horizontal dist traveled\n const distY = touch.pageY - this.initialTouchY; // get vertical dist traveled\n const threshold = 70;\n\n const isYSwipe = Math.abs(distY) >= threshold && Math.abs(distX) <= threshold;\n\n if (isYSwipe) {\n const isInDropdown = (event.target as HTMLElement).closest('.stzh-dropdown') !== null;\n if (!isInDropdown){\n this.hide();\n }\n }\n\n this.initialTouchY = null;\n this.initialTouchX = null;\n };\n\n private init = () => {\n let trigger = this.triggerElement?.firstElementChild as HTMLElement;\n\n if (!trigger) {\n const defaultSlot = Array.from(this.element.children).find(child => !child.hasAttribute(\"slot\")) as HTMLElement;\n\n trigger = defaultSlot;\n }\n\n if (trigger) {\n this.triggerFirstElement = trigger;\n trigger.addEventListener(\"click\", this.onClickTrigger);\n }\n };\n\n async componentWillLoad() {\n this.id = `stzh-popover-${popoverCounter++}`;\n this.parentNode = this.element.parentNode;\n this.hasStzhHeaderParent = this.setStzhHeaderParent();\n\n this.distanceWatcher(this.distance);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"popover\");\n }\n }\n\n private popoverShown() {\n document.body.classList.add(CLASS_BODY_OPEN);\n\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-expanded\" : \"aria-expanded\", \"true\");\n\n if (this.trap) {\n this.trap.activate();\n }\n }\n\n private popoverHidden() {\n document.body.classList.remove(CLASS_BODY_OPEN);\n\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-expanded\" : \"aria-expanded\", \"false\");\n\n if (this.trap) {\n this.trap.deactivate();\n }\n }\n\n componentDidRender() {\n this.mediaChangeHandler();\n const isStzh = isStzhElement(this.triggerFirstElement);\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-describedby\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-describedby\"))\n ) {\n this.triggerFirstElement.setAttribute(\n isStzh ? \"a11y-describedby\" : \"aria-describedby\",\n `${this.id}-trigger-description`\n );\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"a11y-label\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"aria-label\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"a11y-label\" : \"aria-label\", this.label);\n }\n\n if (\n (isStzh && !this.triggerFirstElement.getAttribute(\"analytics-id\")) ||\n (!isStzh && !this.triggerFirstElement.getAttribute(\"s-object-id\"))\n ) {\n this.triggerFirstElement.setAttribute(isStzh ? \"analytics-id\" : \"s-object-id\", this.label);\n }\n }\n\n private initializedPopover = false\n\n componentDidUpdate() {\n if (this.open && !this.initializedPopover) {\n this.initializeAutoUpdate();\n this.initializeFocusTrap();\n this.popoverShown();\n this.initializedPopover = true\n }\n\n if (this.initializedPopover) {\n this.computePosition();\n if (this.trap) {\n this.trap.updateContainerElements(this.dialogElement);\n }\n }\n }\n\n initializeAutoUpdate() {\n this.autoUpdateCleanup = autoUpdate(this.triggerFirstElement, this.dialogElement, this.computePosition);\n }\n\n initializeFocusTrap() {\n this.trap = createFocusTrap(this.dialogElement, {\n fallbackFocus: this.dialogElement,\n clickOutsideDeactivates: true,\n returnFocusOnDeactivate: true,\n });\n }\n\n componentDidLoad() {\n this.contentWrapperElement.hidden = !this.open;\n this.open ? this.popoverShown() : this.popoverHidden();\n }\n\n connectedCallback() {\n addMediaChangeListener(this.mediaChangeHandler);\n this.init();\n\n this.observer = new MutationObserver(this.init);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true,\n });\n }\n\n disconnectedCallback() {\n removeMediaChangeListener(this.mediaChangeHandler);\n if (this.observer) {\n this.observer.disconnect();\n }\n\n if (this.autoUpdateCleanup) {\n this.autoUpdateCleanup();\n }\n\n if (this.triggerFirstElement) {\n this.triggerFirstElement.removeEventListener(\"click\", this.onClickTrigger);\n }\n }\n\n render() {\n const classes = {\n \"stzh-popover\": true,\n [`stzh-popover--open`]: this.open,\n [`stzh-popover--placement-${this.computedPlacement}`]: !!this.computedPlacement,\n [`stzh-popover--fullwidth-${this.fullwidth}`]: !!this.fullwidth,\n [`stzh-popover--${this.size}`]: !!this.size,\n [`stzh-popover--${this.variant}`]: !!this.variant,\n };\n\n return (\n <Host>\n <div\n class={classes}\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n ref={el => (this.rootElement = el as HTMLDivElement)}\n >\n <div ref={el => (this.triggerElement = el as HTMLDivElement)} class=\"stzh-popover__trigger\">\n <slot></slot>\n </div>\n <div class=\"stzh-popover__vhidden\" id={`${this.id}-trigger-description`}>\n {this.localization.open}\n </div>\n <div ref={el => (this.contentWrapperElement = el as HTMLDivElement)} class=\"stzh-popover__content-wrapper\">\n <div class=\"stzh-popover__backdrop\"></div>\n <div ref={el => (this.contentElement = el as HTMLDivElement)} class=\"stzh-popover__content\">\n <div\n ref={el => (this.dialogElement = el as HTMLDivElement)}\n class=\"stzh-popover__dialog\"\n role=\"dialog\"\n tabindex=\"-1\"\n aria-modal=\"true\"\n aria-labelledby={this.label ? `${this.id}-label` : null}\n aria-hidden={this.open ? \"false\" : \"true\"}\n onKeyDown={this.handleKeydown}\n >\n {this.variant === \"tooltip\" && (\n <div\n class=\"stzh-popover__arrow\"\n ref={el => (this.arrowElement = el as HTMLDivElement)}\n innerHTML={Arrow}\n ></div>\n )}\n <div class=\"stzh-popover__content-inner\">\n <div class=\"stzh-popover__label-wrapper\">\n <h2 id={`${this.id}-label`} class=\"stzh-popover__label\">\n {this.label ? this.label : <slot name=\"label\"></slot>}\n </h2>\n <button class=\"stzh-popover__close\" onClick={() => this.hide()} type=\"button\">\n <stzh-icon name=\"close\" class=\"stzh-popover__icon\"></stzh-icon>\n <span class=\"stzh-popover__vhidden\">{this.localization.close}</span>\n </button>\n </div>\n <div class=\"stzh-popover__content-slot-wrapper\">\n <div class=\"stzh-popover__content-slot\">\n <slot name=\"content\"></slot>\n </div>\n <div class=\"stzh-popover__action-slot\">\n <slot name=\"action\"></slot>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|