@oiz/stzh-components 2.14.0 → 2.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/cjs/{app-globals-1fca38db.js → app-globals-856f268a.js} +2 -2
  2. package/dist/cjs/{app-globals-1fca38db.js.map → app-globals-856f268a.js.map} +1 -1
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/stzh-actionset_4.cjs.entry.js +15 -27
  6. package/dist/cjs/stzh-actionset_4.cjs.entry.js.map +1 -1
  7. package/dist/cjs/stzh-appnav.cjs.entry.js +1 -1
  8. package/dist/cjs/stzh-appnav.cjs.entry.js.map +1 -1
  9. package/dist/cjs/stzh-components.cjs.js +1 -1
  10. package/dist/cjs/stzh-header.cjs.entry.js +6 -6
  11. package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
  12. package/dist/collection/components/stzh-actionset/stzh-actionset.js +3 -9
  13. package/dist/collection/components/stzh-actionset/stzh-actionset.js.map +1 -1
  14. package/dist/collection/components/stzh-appnav/stzh-appnav.css +0 -3
  15. package/dist/collection/components/stzh-card/stzh-card.css +0 -37
  16. package/dist/collection/components/stzh-card/stzh-card.js +11 -17
  17. package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
  18. package/dist/collection/components/stzh-card/stzh-card.stories.js +1 -2
  19. package/dist/collection/components/stzh-card-list/stzh-card-list.stories.js +0 -2
  20. package/dist/collection/components/stzh-header/stzh-header.js +6 -6
  21. package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
  22. package/dist/collection/index.js.map +1 -1
  23. package/dist/components/index.js +1 -1
  24. package/dist/components/index2.js.map +1 -1
  25. package/dist/components/stzh-actionset2.js +3 -9
  26. package/dist/components/stzh-actionset2.js.map +1 -1
  27. package/dist/components/stzh-appnav.js +1 -1
  28. package/dist/components/stzh-appnav.js.map +1 -1
  29. package/dist/components/stzh-card2.js +12 -18
  30. package/dist/components/stzh-card2.js.map +1 -1
  31. package/dist/components/stzh-header.js +6 -6
  32. package/dist/components/stzh-header.js.map +1 -1
  33. package/dist/esm/{app-globals-327436ba.js → app-globals-8a09d78c.js} +2 -2
  34. package/dist/esm/{app-globals-327436ba.js.map → app-globals-8a09d78c.js.map} +1 -1
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/stzh-actionset_4.entry.js +15 -27
  38. package/dist/esm/stzh-actionset_4.entry.js.map +1 -1
  39. package/dist/esm/stzh-appnav.entry.js +1 -1
  40. package/dist/esm/stzh-appnav.entry.js.map +1 -1
  41. package/dist/esm/stzh-components.js +1 -1
  42. package/dist/esm/stzh-header.entry.js +6 -6
  43. package/dist/esm/stzh-header.entry.js.map +1 -1
  44. package/dist/esm-es5/{app-globals-327436ba.js → app-globals-8a09d78c.js} +2 -2
  45. package/dist/esm-es5/index.js.map +1 -1
  46. package/dist/esm-es5/loader.js +1 -1
  47. package/dist/esm-es5/stzh-actionset_4.entry.js +2 -2
  48. package/dist/esm-es5/stzh-actionset_4.entry.js.map +1 -1
  49. package/dist/esm-es5/stzh-appnav.entry.js +1 -1
  50. package/dist/esm-es5/stzh-appnav.entry.js.map +1 -1
  51. package/dist/esm-es5/stzh-components.js +1 -1
  52. package/dist/esm-es5/stzh-header.entry.js +1 -1
  53. package/dist/esm-es5/stzh-header.entry.js.map +1 -1
  54. package/dist/stzh-components/index.esm.js.map +1 -1
  55. package/dist/stzh-components/p-0bb08043.system.js.map +1 -1
  56. package/dist/stzh-components/{p-b1dbd448.system.entry.js → p-1caa099b.system.entry.js} +2 -2
  57. package/dist/stzh-components/p-1caa099b.system.entry.js.map +1 -0
  58. package/dist/stzh-components/{p-90df75de.system.entry.js → p-5733dcff.system.entry.js} +2 -2
  59. package/dist/stzh-components/p-5733dcff.system.entry.js.map +1 -0
  60. package/dist/stzh-components/{p-fb869e60.system.js → p-6af6b8ac.system.js} +2 -2
  61. package/dist/stzh-components/{p-a9ce16ca.system.js → p-6c7cc671.system.js} +2 -2
  62. package/dist/stzh-components/{p-61cc4013.entry.js → p-6e3396de.entry.js} +2 -2
  63. package/dist/stzh-components/p-6e3396de.entry.js.map +1 -0
  64. package/dist/stzh-components/{p-4926cc0e.entry.js → p-964e87a2.entry.js} +3 -3
  65. package/dist/stzh-components/p-964e87a2.entry.js.map +1 -0
  66. package/dist/stzh-components/{p-6a2947fe.system.entry.js → p-a14e154a.system.entry.js} +3 -3
  67. package/dist/stzh-components/p-a14e154a.system.entry.js.map +1 -0
  68. package/dist/stzh-components/{p-ce92b185.js → p-bd52acfe.js} +2 -2
  69. package/dist/stzh-components/{p-c53ea563.entry.js → p-de184696.entry.js} +2 -2
  70. package/dist/stzh-components/p-de184696.entry.js.map +1 -0
  71. package/dist/stzh-components/stzh-components.esm.js +1 -1
  72. package/dist/stzh-components/stzh-components.js +1 -1
  73. package/dist/types/components/stzh-header/stzh-header.d.ts +2 -2
  74. package/dist/types/index.d.ts +0 -1
  75. package/package.json +1 -1
  76. package/dist/stzh-components/p-4926cc0e.entry.js.map +0 -1
  77. package/dist/stzh-components/p-61cc4013.entry.js.map +0 -1
  78. package/dist/stzh-components/p-6a2947fe.system.entry.js.map +0 -1
  79. package/dist/stzh-components/p-90df75de.system.entry.js.map +0 -1
  80. package/dist/stzh-components/p-b1dbd448.system.entry.js.map +0 -1
  81. package/dist/stzh-components/p-c53ea563.entry.js.map +0 -1
  82. /package/dist/esm-es5/{app-globals-327436ba.js.map → app-globals-8a09d78c.js.map} +0 -0
  83. /package/dist/stzh-components/{p-fb869e60.system.js.map → p-6af6b8ac.system.js.map} +0 -0
  84. /package/dist/stzh-components/{p-a9ce16ca.system.js.map → p-6c7cc671.system.js.map} +0 -0
  85. /package/dist/stzh-components/{p-ce92b185.js.map → p-bd52acfe.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-card.js","sourceRoot":"","sources":["../../../../src/components/stzh-card/stzh-card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AE,IAAI,CAAC,qBAAqB,GAC3B;cAGhB,IAAI,CAAC,SAAS;gBACb,iBACE,KAAK,EAAC,yBAAyB,EAC/B,IAAI,EAAC,kBAAkB,GACZ,CACV,CACH,CACF,CACE,CACL,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n Fragment,\n forceUpdate\n} from \"@stencil/core\";\n\nimport {\n StzhCardHeaderAction,\n StzhActionsetItem,\n StzhCardCollapseEvent,\n StzhCardSubtitleClickEvent,\n StzhCardStarClickEvent,\n StzhCardClickEvent,\n StzhCardHeaderActionClickEvent,\n StzhButtonChangeEvent\n} from \"../../index\";\n\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\nimport { media } from '../../utils/media-utils';\n\nimport { StzhCardLocalizedText } from './stzh-card.localization';\n\n/**\n * @slot heading - Slot for heading\n * @slot image - Slot for optional image element\n * @slot content - Slot for content for any elements\n * @slot meta - Slot for meta elements (status or chip)\n * @slot footer - Slot to replace footer content (`footerActions`, 'withArrow`, and `selectable` button are not shown anymore)\n */\n@Component({\n tag: \"stzh-card\",\n styleUrl: \"stzh-card.scss\",\n scoped: true\n})\nexport class StzhCard {\n /** Translation strings */\n @Prop() localization: StzhCardLocalizedText;\n\n /** Whether card is collapsed or not */\n @Prop({ reflect: true, mutable: true }) collapsed: boolean = false;\n\n /** Whether card was starred */\n @Prop({ reflect: true, mutable: true }) starred: boolean = false;\n\n /**\n * Whether card star is displayed (with tooltip and menu-item in mobile popover).\n * The tooltip / menu-item text can be adjusted in the translations file (`actionAdd` & `actionRemove`).\n */\n @Prop({ reflect: true }) starrable: boolean = false;\n\n /** Whether card is selectable */\n @Prop({ reflect: true }) selectable: boolean = false;\n\n /** Whether card is checked (if card is selectable) */\n @Prop({ reflect: true }) checked: boolean = false;\n\n /** The name of the input element (if card is selectable) */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Href of card */\n @Prop({ reflect: true }) href: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string;\n\n /** The value of the input element (if card is selectable) */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Whether the element is disabled or not (if card is selectable) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether card arrow is shown in footer area */\n @Prop({ reflect: true }) withArrow: boolean = false;\n\n /** Heading (or use heading slot instead) */\n @Prop() heading: string = \"\";\n\n /** Heading level */\n @Prop({ reflect: true }) headingLevel: \"1\" | \"2\" | \"3\" | \"4\" = \"3\";\n\n /** Subtitle */\n @Prop() subtitle: string | string[] = \"\";\n private _subtitles = [];\n\n /** Card header actions */\n @Prop() headerActions: string | StzhCardHeaderAction[] = [];\n private _headerActions: StzhCardHeaderAction[];\n\n /**\n * Card footer actions.\n * The [`stzh-actionset`](?path=/story/components-actionset) component is used internally.\n * You can listen to clicks with the `stzhActionClick` event.\n */\n @Prop() footerActions: string | StzhActionsetItem[] = [];\n private _footerActions: StzhActionsetItem[];\n\n /** Whether subtitle should be rendered as button and event `stzhSubtitleClick` executed on click */\n @Prop() subtitleInteractive: boolean = false;\n\n /**\n * Whether sorting should be disabled.\n * Has no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true.\n */\n @Prop({ reflect: true }) sortableDisabled: boolean = false;\n\n /** Whether card is collapsible */\n @Prop({ reflect: true }) collapsible: boolean = false;\n\n /** Whether to hide header separation border */\n @Prop({ reflect: true }) hideHeaderBorder: boolean = false;\n\n /** Whether to hide footer separation border */\n @Prop({ reflect: true }) hideFooterBorder: boolean = false;\n\n /** Whether card elevation should be hidden */\n @Prop({ reflect: true }) hideElevation: boolean = false;\n\n /**\n * Whether movement menu items should be shown.\n * Has no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true.\n */\n @Prop() hideMovementActions: boolean = false;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link elements.\n * Default value will be taken from `heading` prop/slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhCardElement;\n\n /** Click event (if href is used) */\n @Event() stzhClick: EventEmitter<StzhCardClickEvent>;\n\n /** Collapse event */\n @Event() stzhCollapse: EventEmitter<StzhCardCollapseEvent>;\n\n /** Subtitle click event */\n @Event() stzhSubtitleClick: EventEmitter<StzhCardSubtitleClickEvent>;\n\n /** Star click event */\n @Event() stzhStarClick: EventEmitter<StzhCardStarClickEvent>;\n\n /** Header action click event */\n @Event() stzhHeaderActionClick: EventEmitter<StzhCardHeaderActionClickEvent>;\n\n @Watch(\"subtitle\")\n subtitleWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n if (newValue === \"\") {\n this._subtitles = [];\n } else {\n try {\n this._subtitles = JSON.parse(newValue);\n } catch(err) {\n this._subtitles = [newValue];\n }\n }\n } else {\n this._subtitles = newValue;\n }\n }\n\n @Watch(\"headerActions\")\n headerActionsWatcher(newValue: StzhCardHeaderAction[] | string) {\n if (typeof newValue === \"string\") {\n this._headerActions = JSON.parse(newValue);\n } else {\n this._headerActions = newValue;\n }\n }\n\n @Watch(\"footerActions\")\n footerActionsWatcher(newValue: StzhActionsetItem[] | string) {\n if (typeof newValue === \"string\") {\n this._footerActions = JSON.parse(newValue);\n } else {\n this._footerActions = newValue;\n }\n }\n\n @Watch(\"collapsed\")\n collapsedWatcher() {\n this.handleResize();\n }\n\n private observer: MutationObserver;\n\n private nodeChange = (entries) => {\n let changeInSlot = false;\n\n entries.forEach((entry) => {\n if (entry.target.closest('[slot]') || entry.target.hasAttribute('slot')) {\n changeInSlot = true;\n }\n });\n\n if (changeInSlot) {\n forceUpdate(this.element);\n }\n };\n\n private mainElement: HTMLElement;\n private headerElement: HTMLElement;\n private headerLeftElement: HTMLElement;\n private headerRightElement: HTMLElement;\n private imageLinkElement: HTMLAnchorElement;\n private titleLinkElement: HTMLAnchorElement;\n private headingTextElement: HTMLDivElement;\n private sortable: HTMLStzhSortableElement;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private update = () => {\n if (!this.mainElement) {\n return;\n }\n\n this.mainElement.classList.remove(\"stzh-card--has-collapsed-header\");\n\n if (media('medium').matches) {\n const headerWidth = this.headerElement.clientWidth;\n const leftWidth = this.headerLeftElement.clientWidth;\n const rightWidth = this.headerRightElement.clientWidth;\n\n if (headerWidth - leftWidth <= rightWidth) {\n this.mainElement.classList.add(\"stzh-card--has-collapsed-header\");\n }\n }\n }\n\n private headerClick = (event: MouseEvent) => {\n if (!this.collapsible) {\n return;\n }\n\n const filterTags = [\"stzh-popover\", \"stzh-tooltip\", \"button\", \"a\", \"input\", \"select\", \"textarea\", \"iframe\", \"details\", \"label\", \"area\"];\n const composedPathTags = event.composedPath().map(element => (element as HTMLElement).tagName?.toLowerCase());\n const found = composedPathTags.some(r => filterTags.includes(r))\n\n if (!found) {\n this.collapsed = !this.collapsed;\n\n this.stzhCollapse.emit({\n component: \"stzh-card\",\n collapsed: this.collapsed\n });\n }\n }\n\n private subtitleClick = () => {\n if (this.subtitleInteractive) {\n this.stzhSubtitleClick.emit({\n component: \"stzh-card\"\n });\n }\n }\n\n private starToggleClick = () => {\n this.stzhStarClick.emit({\n component: \"stzh-card\",\n starred: this.starred\n });\n }\n\n private actionClick = (action: StzhCardHeaderAction) => {\n this.stzhHeaderActionClick.emit({\n component: \"stzh-card\",\n action\n });\n }\n\n private arrowUpClick = () => {\n const sortable = this.element.closest(\"stzh-sortable\");\n\n if (sortable) {\n const element = this.findSortableChildElement();\n sortable.moveItem(element, \"up\");\n }\n }\n\n private arrowDownClick = () => {\n const sortable = this.element.closest(\"stzh-sortable\");\n\n if (sortable) {\n const element = this.findSortableChildElement();\n sortable.moveItem(element, \"down\");\n }\n }\n\n private updateElementInsideSortable = () => {\n const currentSortable = this.element.closest(\"stzh-sortable\");\n\n // check if element is still inside sortable\n if (!currentSortable) {\n this.sortable.removeEventListener(\"stzhUpdate\", this.updateElementInsideSortable);\n this.sortable.removeEventListener(\"stzhDisable\", this.updateElementInsideSortable)\n return;\n }\n\n if (this.element) {\n forceUpdate(this.element);\n }\n }\n\n private init = () => {\n const chips = this.element.querySelectorAll(\n 'stzh-chip[slot=\"meta\"], [slot=\"meta\"] stzh-chip'\n );\n\n chips.forEach((chip) => {\n setPropsIfNull(chip, {\n size: \"small\"\n } as HTMLStzhChipElement)\n });\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.update);\n }\n\n private handleMutation = (entries) => {\n this.init();\n this.nodeChange(entries);\n }\n\n private handleSelectionChange = (event: CustomEvent<StzhButtonChangeEvent>) => {\n this.checked = event.detail.checked;\n }\n\n private cardClick = (originalEvent: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-card\",\n originalEvent\n });\n }\n\n private findSortableChildElement(): HTMLElement | undefined {\n const sortable = this.element.closest(\"stzh-sortable\");\n\n if (sortable) {\n let element: HTMLElement = this.element;\n let sortableContainer = null;\n\n if (typeof sortable.container === \"function\") {\n sortableContainer = sortable.container();\n } else {\n sortableContainer = sortable.container;\n }\n\n while (element.parentElement && element.parentElement !== sortableContainer) {\n element = element.parentElement;\n }\n\n return element;\n }\n }\n\n async componentWillLoad() {\n this.subtitleWatcher(this.subtitle);\n this.headerActionsWatcher(this.headerActions);\n this.footerActionsWatcher(this.footerActions);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"card\");\n }\n }\n\n componentDidLoad() {\n this.sortable = this.element.closest(\"stzh-sortable\");\n\n if (this.sortable) {\n this.sortable.addEventListener(\"stzhUpdate\", this.updateElementInsideSortable);\n this.sortable.addEventListener(\"stzhDisable\", this.updateElementInsideSortable)\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n const objectId = this.analyticsId || this.headingTextElement?.innerText;\n\n if (objectId) {\n this.imageLinkElement?.setAttribute(\"s-object-id\", objectId);\n this.titleLinkElement?.setAttribute(\"s-object-id\", objectId);\n }\n });\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.handleMutation);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const imageUsed: boolean = hasSlot(this.element, \"image\");\n const headingUsed: boolean = hasSlot(this.element, \"heading\");\n const footerUsed: boolean = hasSlot(this.element, \"footer\");\n const contentUsed: boolean = hasSlot(this.element, \"content\");\n\n const Heading = `h${this.headingLevel}`;\n const Subtitle = `${this.subtitleInteractive ? 'button' : 'span'}`;\n\n const sortableChildElement = this.findSortableChildElement();\n\n const isFirstItemInSortable = sortableChildElement?.parentElement\n && Array.from(sortableChildElement?.parentElement?.children)\n .indexOf(sortableChildElement) === 0;\n\n const isLastItemInSortable = sortableChildElement?.parentElement\n && Array.from(sortableChildElement?.parentElement?.children)\n .indexOf(sortableChildElement) === sortableChildElement?.parentElement?.children.length - 1;\n\n const sortableEnabled = !this.sortableDisabled && this.sortable && !this.sortable.disabled;\n const sortableActionsEnabled = sortableEnabled && !this.hideMovementActions;\n\n const nonCollapsingTextHeaderActions = this._headerActions.filter(action => !action.onlyCollapseText);\n\n // const headerActions = [\n // ...this._headerActions\n // ];\n\n const hasHeading = !!this.heading || headingUsed;\n\n const hasHeader = hasHeading\n || this._subtitles.length > 0\n || this._headerActions.length > 0\n || nonCollapsingTextHeaderActions.length > 0\n || this.starrable\n || sortableActionsEnabled;\n\n const hasFooter = footerUsed\n || this._footerActions.length > 0\n || this.selectable\n || this.withArrow;\n\n const classes = {\n \"stzh-card\": true,\n \"stzh-card--has-link\": !!this.href,\n \"stzh-card--has-image\": imageUsed,\n \"stzh-card--has-content\": contentUsed,\n \"stzh-card--has-subtitle\": !!this.subtitle,\n \"stzh-card--has-subtitle-interactive\": !!this.subtitle && this.subtitleInteractive,\n \"stzh-card--has-hidden-header-border\": this.hideHeaderBorder,\n \"stzh-card--has-hidden-footer-border\": this.hideFooterBorder,\n \"stzh-card--has-header\": hasHeader,\n \"stzh-card--has-footer\": hasFooter,\n \"stzh-card--is-collapsible\": this.collapsible,\n \"stzh-card--is-collapsed\": this.collapsed,\n \"stzh-card--is-starred\": this.starred,\n \"stzh-card--is-checked\": this.checked,\n \"stzh-card--is-sortable\": sortableEnabled\n };\n\n return (\n <Host role=\"listitem\" aria-label={this.heading} is-sortable={sortableEnabled}>\n <article\n ref={(el) => (this.mainElement = el as HTMLElement)}\n class={classes}\n >\n <a\n ref={(el) => (this.imageLinkElement = el as HTMLAnchorElement)}\n aria-hidden=\"true\"\n tabindex=\"-1\"\n class=\"stzh-card__image-link\"\n href={this.href}\n target={this.target}\n onClick={this.href ? this.cardClick : null}\n >\n <slot name=\"image\"></slot>\n </a>\n <div class=\"stzh-card__content-wrapper\">\n <stzh-icon class=\"stzh-card__dnd\" name=\"drag\"></stzh-icon>\n\n <header\n ref={(el) => (this.headerElement = el as HTMLElement)}\n class=\"stzh-card__header\"\n onClick={this.headerClick}\n >\n <div class=\"stzh-card__header-top\">\n <div\n ref={(el) => (this.headerLeftElement = el as HTMLElement)}\n class=\"stzh-card__header-left\"\n >\n <div class=\"stzh-card__title-area\">\n {hasHeading &&\n <Heading class=\"stzh-card__title\">\n <a\n ref={(el) => (this.titleLinkElement = el as HTMLAnchorElement)}\n class=\"stzh-card__title-link\"\n href={this.href}\n target={this.target}\n onClick={this.href ? this.cardClick : null}\n >\n <div ref={(el) => (this.headingTextElement = el as HTMLDivElement)}>\n {this.heading ? this.heading : <slot name=\"heading\"></slot>}\n </div>\n </a>\n </Heading>\n }\n {this._subtitles.length > 0 &&\n <Subtitle class=\"stzh-card__subtitle\" onClick={this.subtitleClick}>\n {this._subtitles.map(subtitle => (\n <span class=\"stzh-card__subtitle-text\">{subtitle}</span>\n ))}\n </Subtitle>\n }\n </div>\n </div>\n <div\n ref={(el) => (this.headerRightElement = el as HTMLElement)}\n class=\"stzh-card__header-right\"\n >\n <div class=\"stzh-card__card-actions\">\n {this._headerActions.map(action => (\n <stzh-button\n class={{\n \"stzh-card__card-action\": true,\n \"is-button\": true,\n \"show-medium\": !action.onlyCollapseText,\n \"hide-when-collapsed\": !action.onlyCollapseText,\n \"hide-text-when-collapsed\": action.onlyCollapseText\n }}\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n variant=\"tertiary\"\n size=\"tiny\"\n badgePosition=\"icon\"\n onClick={() => { this.actionClick(action) }}\n >\n <span\n class={{\n \"vshow-medium\": action.onlyCollapseText,\n \"vhide-when-collapsed\": action.onlyCollapseText\n }}\n >\n {action.label}\n </span>\n </stzh-button>\n ))}\n\n {this.starrable &&\n <stzh-tooltip>\n <stzh-button\n class=\"stzh-card__card-action is-star\"\n icon={this.starred ? \"star-filled\" : \"star\"}\n variant=\"tertiary\"\n size=\"tiny\"\n iconOnly={true}\n onClick={this.starToggleClick}\n ></stzh-button>\n <div slot=\"content\">\n {this.starred ? this.localization.actionRemove : this.localization.actionAdd}\n </div>\n </stzh-tooltip>\n }\n\n {/* <stzh-actionset actions={headerActions} variant=\"overflow\"></stzh-actionset> */}\n\n {(nonCollapsingTextHeaderActions.length > 0 || this.starrable || sortableActionsEnabled) &&\n <stzh-popover\n label={this.localization.actionsPopoverLabel}\n placement=\"bottom-end\"\n class={{\n \"stzh-card__card-action-popover\": true,\n \"hide-medium show-when-collapsed\": !this.starrable && !sortableActionsEnabled\n }}\n >\n <stzh-button\n class=\"stzh-card__card-action is-further\"\n variant=\"tertiary\"\n size=\"tiny\"\n icon=\"more-vertical\"\n iconOnly={true}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this.starrable &&\n <stzh-menu-item icon={this.starred ? \"star-filled\" : \"star\"} onClick={this.starToggleClick}>\n {this.starred ? this.localization.actionRemove : this.localization.actionAdd}\n </stzh-menu-item>\n }\n\n {nonCollapsingTextHeaderActions.map(action => (\n <stzh-menu-item\n class=\"hide-medium show-when-collapsed\"\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n onClick={() => { this.actionClick(action) }}\n >\n {action.label}\n </stzh-menu-item>\n ))}\n\n {sortableActionsEnabled &&\n <Fragment>\n {!isFirstItemInSortable &&\n <stzh-menu-item icon=\"arrow-up\" onClick={this.arrowUpClick}>\n {this.localization.actionMoveUp}\n </stzh-menu-item>\n }\n {!isLastItemInSortable &&\n <stzh-menu-item icon=\"arrow-down\" onClick={this.arrowDownClick}>\n {this.localization.actionMoveDown}\n </stzh-menu-item>\n }\n </Fragment>\n }\n </stzh-menu>\n </stzh-popover>\n }\n </div>\n </div>\n </div>\n\n <div class=\"stzh-card__header-meta\">\n <slot name=\"meta\"></slot>\n </div>\n </header>\n\n <div class=\"stzh-card__content hide-when-collapsed\">\n <slot name=\"content\"></slot>\n </div>\n\n <div class=\"stzh-card__footer hide-when-collapsed\">\n <slot name=\"footer\">\n {this._footerActions.length > 0 &&\n <stzh-actionset\n class=\"stzh-card__footer-actionset\"\n actions={this._footerActions}\n ></stzh-actionset>\n }\n\n {this.selectable &&\n <stzh-button\n class=\"stzh-card__footer-select-button\"\n fullwidth\n type=\"radio\"\n variant=\"secondary\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n label={this.localization.select}\n onStzhChange={this.handleSelectionChange}\n ></stzh-button>\n }\n\n {this.withArrow &&\n <stzh-icon\n class=\"stzh-card__footer-arrow\"\n name=\"arrow-right-long\"\n ></stzh-icon>}\n </slot>\n </div>\n </div>\n </article>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-card.js","sourceRoot":"","sources":["../../../../src/components/stzh-card/stzh-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EAEL,QAAQ,EACR,WAAW,EACZ,MAAM,eAAe,CAAC;AAavB,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIhD;;;;;;GAMG;AAMH,MAAM,OAAO,QAAQ;;IAgDX,eAAU,GAAG,EAAE,CAAC;IA2GhB,eAAU,GAAG,CAAC,OAAO,EAAE,EAAE;MAC/B,IAAI,YAAY,GAAG,KAAK,CAAC;MAEzB,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;UACvE,YAAY,GAAG,IAAI,CAAC;SACrB;MACH,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n Fragment,\n forceUpdate\n} from \"@stencil/core\";\n\nimport {\n StzhCardHeaderAction,\n StzhActionsetItem,\n StzhCardCollapseEvent,\n StzhCardSubtitleClickEvent,\n StzhCardStarClickEvent,\n StzhCardClickEvent,\n StzhCardHeaderActionClickEvent,\n StzhButtonChangeEvent\n} from \"../../index\";\n\nimport { hasSlot, setPropsIfNull } from \"../../utils/utils\";\nimport { media } from '../../utils/media-utils';\n\nimport { StzhCardLocalizedText } from './stzh-card.localization';\n\n/**\n * @slot heading - Slot for heading\n * @slot image - Slot for optional image element\n * @slot content - Slot for content for any elements\n * @slot meta - Slot for meta elements (status or chip)\n * @slot footer - Slot to replace footer content (`footerActions`, 'withArrow`, and `selectable` button are not shown anymore)\n */\n@Component({\n tag: \"stzh-card\",\n styleUrl: \"stzh-card.scss\",\n scoped: true\n})\nexport class StzhCard {\n /** Translation strings */\n @Prop() localization: StzhCardLocalizedText;\n\n /** Whether card is collapsed or not */\n @Prop({ reflect: true, mutable: true }) collapsed: boolean = false;\n\n /** Whether card was starred */\n @Prop({ reflect: true, mutable: true }) starred: boolean = false;\n\n /**\n * Whether card star is displayed (with tooltip and menu-item in mobile popover).\n * The tooltip / menu-item text can be adjusted in the translations file (`actionAdd` & `actionRemove`).\n */\n @Prop({ reflect: true }) starrable: boolean = false;\n\n /** Whether card is selectable */\n @Prop({ reflect: true }) selectable: boolean = false;\n\n /** Whether card is checked (if card is selectable) */\n @Prop({ reflect: true }) checked: boolean = false;\n\n /** The name of the input element (if card is selectable) */\n @Prop({ reflect: true }) name: string = \"\";\n\n /** Href of card */\n @Prop({ reflect: true }) href: string;\n\n /** target if the button is used as link (if href used) */\n @Prop() target: string;\n\n /** The value of the input element (if card is selectable) */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Whether the element is disabled or not (if card is selectable) */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Whether card arrow is shown in footer area */\n @Prop({ reflect: true }) withArrow: boolean = false;\n\n /** Heading (or use heading slot instead) */\n @Prop() heading: string = \"\";\n\n /** Heading level */\n @Prop({ reflect: true }) headingLevel: \"1\" | \"2\" | \"3\" | \"4\" = \"3\";\n\n /** Subtitle */\n @Prop() subtitle: string | string[] = \"\";\n private _subtitles = [];\n\n /** Card header actions */\n @Prop() headerActions: string | StzhCardHeaderAction[] = [];\n private _headerActions: StzhCardHeaderAction[];\n\n /**\n * Card footer actions.\n * The [`stzh-actionset`](?path=/story/components-actionset) component is used internally.\n * You can listen to clicks with the `stzhActionClick` event.\n */\n @Prop() footerActions: string | StzhActionsetItem[] = [];\n private _footerActions: StzhActionsetItem[];\n\n /** Whether subtitle should be rendered as button and event `stzhSubtitleClick` executed on click */\n @Prop() subtitleInteractive: boolean = false;\n\n /**\n * Whether sorting should be disabled.\n * Has no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true.\n */\n @Prop({ reflect: true }) sortableDisabled: boolean = false;\n\n /** Whether card is collapsible */\n @Prop({ reflect: true }) collapsible: boolean = false;\n\n /** Whether to hide header separation border */\n @Prop({ reflect: true }) hideHeaderBorder: boolean = false;\n\n /** Whether to hide footer separation border */\n @Prop({ reflect: true }) hideFooterBorder: boolean = false;\n\n /** Whether card elevation should be hidden */\n @Prop({ reflect: true }) hideElevation: boolean = false;\n\n /**\n * Whether movement menu items should be shown.\n * Has no effect if card is not inside a `card-list` element, which has `sortableEnabled` property set to true.\n */\n @Prop() hideMovementActions: boolean = false;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link elements.\n * Default value will be taken from `heading` prop/slot.\n */\n @Prop() analyticsId: string;\n\n @Element() element: HTMLStzhCardElement;\n\n /** Click event (if href is used) */\n @Event() stzhClick: EventEmitter<StzhCardClickEvent>;\n\n /** Collapse event */\n @Event() stzhCollapse: EventEmitter<StzhCardCollapseEvent>;\n\n /** Subtitle click event */\n @Event() stzhSubtitleClick: EventEmitter<StzhCardSubtitleClickEvent>;\n\n /** Star click event */\n @Event() stzhStarClick: EventEmitter<StzhCardStarClickEvent>;\n\n /** Header action click event */\n @Event() stzhHeaderActionClick: EventEmitter<StzhCardHeaderActionClickEvent>;\n\n @Watch(\"subtitle\")\n subtitleWatcher(newValue: string[] | string) {\n if (typeof newValue === \"string\") {\n if (newValue === \"\") {\n this._subtitles = [];\n } else {\n try {\n this._subtitles = JSON.parse(newValue);\n } catch(err) {\n this._subtitles = [newValue];\n }\n }\n } else {\n this._subtitles = newValue;\n }\n }\n\n @Watch(\"headerActions\")\n headerActionsWatcher(newValue: StzhCardHeaderAction[] | string) {\n if (typeof newValue === \"string\") {\n this._headerActions = JSON.parse(newValue);\n } else {\n this._headerActions = newValue;\n }\n }\n\n @Watch(\"footerActions\")\n footerActionsWatcher(newValue: StzhActionsetItem[] | string) {\n if (typeof newValue === \"string\") {\n this._footerActions = JSON.parse(newValue);\n } else {\n this._footerActions = newValue;\n }\n }\n\n @Watch(\"collapsed\")\n collapsedWatcher() {\n this.handleResize();\n }\n\n private observer: MutationObserver;\n\n private nodeChange = (entries) => {\n let changeInSlot = false;\n\n entries.forEach((entry) => {\n if (entry.target.closest('[slot]') || entry.target.hasAttribute('slot')) {\n changeInSlot = true;\n }\n });\n\n if (changeInSlot) {\n forceUpdate(this.element);\n }\n };\n\n private mainElement: HTMLElement;\n private headerElement: HTMLElement;\n private headerLeftElement: HTMLElement;\n private headerRightElement: HTMLElement;\n private imageLinkElement: HTMLAnchorElement;\n private titleLinkElement: HTMLAnchorElement;\n private headingTextElement: HTMLDivElement;\n private sortable: HTMLStzhSortableElement;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private update = () => {\n if (!this.mainElement) {\n return;\n }\n\n this.mainElement.classList.remove(\"stzh-card--has-collapsed-header\");\n\n if (media('medium').matches) {\n const headerWidth = this.headerElement.clientWidth;\n const leftWidth = this.headerLeftElement.clientWidth;\n const rightWidth = this.headerRightElement.clientWidth;\n\n if (headerWidth - leftWidth <= rightWidth) {\n this.mainElement.classList.add(\"stzh-card--has-collapsed-header\");\n }\n }\n }\n\n private headerClick = (event: MouseEvent) => {\n if (!this.collapsible) {\n return;\n }\n\n const filterTags = [\"stzh-popover\", \"stzh-tooltip\", \"button\", \"a\", \"input\", \"select\", \"textarea\", \"iframe\", \"details\", \"label\", \"area\"];\n const composedPathTags = event.composedPath().map(element => (element as HTMLElement).tagName?.toLowerCase());\n const found = composedPathTags.some(r => filterTags.includes(r))\n\n if (!found) {\n this.collapsed = !this.collapsed;\n\n this.stzhCollapse.emit({\n component: \"stzh-card\",\n collapsed: this.collapsed\n });\n }\n }\n\n private subtitleClick = () => {\n if (this.subtitleInteractive) {\n this.stzhSubtitleClick.emit({\n component: \"stzh-card\"\n });\n }\n }\n\n private starToggleClick = () => {\n this.stzhStarClick.emit({\n component: \"stzh-card\",\n starred: this.starred\n });\n }\n\n private actionClick = (action: StzhCardHeaderAction) => {\n this.stzhHeaderActionClick.emit({\n component: \"stzh-card\",\n action\n });\n }\n\n private arrowUpClick = () => {\n const sortable = this.element.closest(\"stzh-sortable\");\n\n if (sortable) {\n const element = this.findSortableChildElement();\n sortable.moveItem(element, \"up\");\n }\n }\n\n private arrowDownClick = () => {\n const sortable = this.element.closest(\"stzh-sortable\");\n\n if (sortable) {\n const element = this.findSortableChildElement();\n sortable.moveItem(element, \"down\");\n }\n }\n\n private updateElementInsideSortable = () => {\n const currentSortable = this.element.closest(\"stzh-sortable\");\n\n // check if element is still inside sortable\n if (!currentSortable) {\n this.sortable.removeEventListener(\"stzhUpdate\", this.updateElementInsideSortable);\n this.sortable.removeEventListener(\"stzhDisable\", this.updateElementInsideSortable)\n return;\n }\n\n if (this.element) {\n forceUpdate(this.element);\n }\n }\n\n private init = () => {\n const chips = this.element.querySelectorAll(\n 'stzh-chip[slot=\"meta\"], [slot=\"meta\"] stzh-chip'\n );\n\n chips.forEach((chip) => {\n setPropsIfNull(chip, {\n size: \"small\"\n } as HTMLStzhChipElement)\n });\n }\n\n private handleResize = () => {\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(this.update);\n }\n\n private handleMutation = (entries) => {\n this.init();\n this.nodeChange(entries);\n }\n\n private handleSelectionChange = (event: CustomEvent<StzhButtonChangeEvent>) => {\n this.checked = event.detail.checked;\n }\n\n private cardClick = (originalEvent: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-card\",\n originalEvent\n });\n }\n\n private findSortableChildElement(): HTMLElement | undefined {\n const sortable = this.element.closest(\"stzh-sortable\");\n\n if (sortable) {\n let element: HTMLElement = this.element;\n let sortableContainer = null;\n\n if (typeof sortable.container === \"function\") {\n sortableContainer = sortable.container();\n } else {\n sortableContainer = sortable.container;\n }\n\n while (element.parentElement && element.parentElement !== sortableContainer) {\n element = element.parentElement;\n }\n\n return element;\n }\n }\n\n async componentWillLoad() {\n this.subtitleWatcher(this.subtitle);\n this.headerActionsWatcher(this.headerActions);\n this.footerActionsWatcher(this.footerActions);\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"card\");\n }\n }\n\n componentDidLoad() {\n this.sortable = this.element.closest(\"stzh-sortable\");\n\n if (this.sortable) {\n this.sortable.addEventListener(\"stzhUpdate\", this.updateElementInsideSortable);\n this.sortable.addEventListener(\"stzhDisable\", this.updateElementInsideSortable)\n }\n }\n\n componentDidRender() {\n requestAnimationFrame(() => {\n const objectId = this.analyticsId || this.headingTextElement?.innerText;\n\n if (objectId) {\n this.imageLinkElement?.setAttribute(\"s-object-id\", objectId);\n this.titleLinkElement?.setAttribute(\"s-object-id\", objectId);\n }\n });\n }\n\n connectedCallback() {\n this.init();\n\n this.observer = new MutationObserver(this.handleMutation);\n this.observer.observe(this.element, {\n childList: true,\n subtree: true\n });\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n if (this.observer) {\n this.observer.disconnect();\n }\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const imageUsed: boolean = hasSlot(this.element, \"image\");\n const headingUsed: boolean = hasSlot(this.element, \"heading\");\n const footerUsed: boolean = hasSlot(this.element, \"footer\");\n const contentUsed: boolean = hasSlot(this.element, \"content\");\n\n const Heading = `h${this.headingLevel}`;\n const Subtitle = `${this.subtitleInteractive ? 'button' : 'span'}`;\n\n const sortableChildElement = this.findSortableChildElement();\n\n const isFirstItemInSortable = sortableChildElement?.parentElement\n && Array.from(sortableChildElement?.parentElement?.children)\n .indexOf(sortableChildElement) === 0;\n\n const isLastItemInSortable = sortableChildElement?.parentElement\n && Array.from(sortableChildElement?.parentElement?.children)\n .indexOf(sortableChildElement) === sortableChildElement?.parentElement?.children.length - 1;\n\n const sortableEnabled = !this.sortableDisabled && this.sortable && !this.sortable.disabled;\n const sortableActionsEnabled = sortableEnabled && !this.hideMovementActions;\n\n // const nonCollapsingTextHeaderActions = this._headerActions.filter(action => !action.onlyCollapseText);\n\n // const headerActions = [\n // ...this._headerActions\n // ];\n\n const hasHeading = !!this.heading || headingUsed;\n\n const hasHeader = hasHeading\n || this._subtitles.length > 0\n || this._headerActions.length > 0\n // || nonCollapsingTextHeaderActions.length > 0\n || this.starrable\n || sortableActionsEnabled;\n\n const hasFooter = footerUsed\n || this._footerActions.length > 0\n || this.selectable\n || this.withArrow;\n\n const classes = {\n \"stzh-card\": true,\n \"stzh-card--has-link\": !!this.href,\n \"stzh-card--has-image\": imageUsed,\n \"stzh-card--has-content\": contentUsed,\n \"stzh-card--has-subtitle\": !!this.subtitle,\n \"stzh-card--has-subtitle-interactive\": !!this.subtitle && this.subtitleInteractive,\n \"stzh-card--has-hidden-header-border\": this.hideHeaderBorder,\n \"stzh-card--has-hidden-footer-border\": this.hideFooterBorder,\n \"stzh-card--has-header\": hasHeader,\n \"stzh-card--has-footer\": hasFooter,\n \"stzh-card--is-collapsible\": this.collapsible,\n \"stzh-card--is-collapsed\": this.collapsed,\n \"stzh-card--is-starred\": this.starred,\n \"stzh-card--is-checked\": this.checked,\n \"stzh-card--is-sortable\": sortableEnabled\n };\n\n return (\n <Host role=\"listitem\" aria-label={this.heading} is-sortable={sortableEnabled}>\n <article\n ref={(el) => (this.mainElement = el as HTMLElement)}\n class={classes}\n >\n <a\n ref={(el) => (this.imageLinkElement = el as HTMLAnchorElement)}\n aria-hidden=\"true\"\n tabindex=\"-1\"\n class=\"stzh-card__image-link\"\n href={this.href}\n target={this.target}\n onClick={this.href ? this.cardClick : null}\n >\n <slot name=\"image\"></slot>\n </a>\n <div class=\"stzh-card__content-wrapper\">\n <stzh-icon class=\"stzh-card__dnd\" name=\"drag\"></stzh-icon>\n\n <header\n ref={(el) => (this.headerElement = el as HTMLElement)}\n class=\"stzh-card__header\"\n onClick={this.headerClick}\n >\n <div class=\"stzh-card__header-top\">\n <div\n ref={(el) => (this.headerLeftElement = el as HTMLElement)}\n class=\"stzh-card__header-left\"\n >\n <div class=\"stzh-card__title-area\">\n {hasHeading &&\n <Heading class=\"stzh-card__title\">\n <a\n ref={(el) => (this.titleLinkElement = el as HTMLAnchorElement)}\n class=\"stzh-card__title-link\"\n href={this.href}\n target={this.target}\n onClick={this.href ? this.cardClick : null}\n >\n <div ref={(el) => (this.headingTextElement = el as HTMLDivElement)}>\n {this.heading ? this.heading : <slot name=\"heading\"></slot>}\n </div>\n </a>\n </Heading>\n }\n {this._subtitles.length > 0 &&\n <Subtitle class=\"stzh-card__subtitle\" onClick={this.subtitleClick}>\n {this._subtitles.map(subtitle => (\n <span class=\"stzh-card__subtitle-text\">{subtitle}</span>\n ))}\n </Subtitle>\n }\n </div>\n </div>\n <div\n ref={(el) => (this.headerRightElement = el as HTMLElement)}\n class=\"stzh-card__header-right\"\n >\n <div class=\"stzh-card__card-actions\">\n {/* {this._headerActions.map(action => (\n <stzh-button\n class={{\n \"stzh-card__card-action\": true,\n \"is-button\": true,\n \"show-medium\": !action.onlyCollapseText,\n \"hide-when-collapsed\": !action.onlyCollapseText,\n \"hide-text-when-collapsed\": action.onlyCollapseText\n }}\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n variant=\"tertiary\"\n size=\"tiny\"\n badgePosition=\"icon\"\n onClick={() => { this.actionClick(action) }}\n >\n <span\n class={{\n \"vshow-medium\": action.onlyCollapseText,\n \"vhide-when-collapsed\": action.onlyCollapseText\n }}\n >\n {action.label}\n </span>\n </stzh-button>\n ))} */}\n\n {this.starrable &&\n <stzh-tooltip>\n <stzh-button\n class=\"stzh-card__card-action is-star\"\n icon={this.starred ? \"star-filled\" : \"star\"}\n variant=\"tertiary\"\n size=\"tiny\"\n iconOnly={true}\n onClick={this.starToggleClick}\n ></stzh-button>\n <div slot=\"content\">\n {this.starred ? this.localization.actionRemove : this.localization.actionAdd}\n </div>\n </stzh-tooltip>\n }\n\n {/* <stzh-actionset actions={headerActions} variant=\"overflow\"></stzh-actionset> */}\n {/* {(nonCollapsingTextHeaderActions.length > 0 || this.starrable || sortableActionsEnabled) && */}\n {(this._headerActions.length > 0 || this.starrable || sortableActionsEnabled) &&\n <stzh-popover\n label={this.localization.actionsPopoverLabel}\n placement=\"bottom-end\"\n class={{\n \"stzh-card__card-action-popover\": true,\n // \"hide-medium show-when-collapsed\": !this.starrable && !sortableActionsEnabled\n }}\n >\n <stzh-button\n class=\"stzh-card__card-action is-further\"\n variant=\"tertiary\"\n size=\"tiny\"\n icon=\"more-vertical\"\n iconOnly={true}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {/* {nonCollapsingTextHeaderActions.map(action => ( */}\n {this._headerActions.map(action => (\n <stzh-menu-item\n // class=\"hide-medium show-when-collapsed\"\n icon={action.icon}\n badge={action.badge}\n badgeEmpty={action.badgeEmpty}\n badgeType={action.badgeType}\n onClick={() => { this.actionClick(action) }}\n >\n {action.label}\n </stzh-menu-item>\n ))}\n\n {sortableActionsEnabled &&\n <Fragment>\n {!isFirstItemInSortable &&\n <stzh-menu-item icon=\"arrow-up\" onClick={this.arrowUpClick}>\n {this.localization.actionMoveUp}\n </stzh-menu-item>\n }\n {!isLastItemInSortable &&\n <stzh-menu-item icon=\"arrow-down\" onClick={this.arrowDownClick}>\n {this.localization.actionMoveDown}\n </stzh-menu-item>\n }\n </Fragment>\n }\n\n {this.starrable &&\n <stzh-menu-item icon={this.starred ? \"star-filled\" : \"star\"} onClick={this.starToggleClick}>\n {this.starred ? this.localization.actionRemove : this.localization.actionAdd}\n </stzh-menu-item>\n }\n </stzh-menu>\n </stzh-popover>\n }\n </div>\n </div>\n </div>\n\n <div class=\"stzh-card__header-meta\">\n <slot name=\"meta\"></slot>\n </div>\n </header>\n\n <div class=\"stzh-card__content hide-when-collapsed\">\n <slot name=\"content\"></slot>\n </div>\n\n <div class=\"stzh-card__footer hide-when-collapsed\">\n <slot name=\"footer\">\n {this._footerActions.length > 0 &&\n <stzh-actionset\n class=\"stzh-card__footer-actionset\"\n actions={this._footerActions}\n ></stzh-actionset>\n }\n\n {this.selectable &&\n <stzh-button\n class=\"stzh-card__footer-select-button\"\n fullwidth\n type=\"radio\"\n variant=\"secondary\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n label={this.localization.select}\n onStzhChange={this.handleSelectionChange}\n ></stzh-button>\n }\n\n {this.withArrow &&\n <stzh-icon\n class=\"stzh-card__footer-arrow\"\n name=\"arrow-right-long\"\n ></stzh-icon>}\n </slot>\n </div>\n </div>\n </article>\n </Host>\n );\n }\n}\n"]}
@@ -69,8 +69,7 @@ const headerActions = [
69
69
  "id": "message",
70
70
  "icon": "mail",
71
71
  "badge": "3",
72
- "label": "Messages",
73
- "onlyCollapseText": true
72
+ "label": "Messages"
74
73
  }
75
74
  ];
76
75
 
@@ -10,7 +10,6 @@ const story = createComponentStory(COMPONENT_NAME);
10
10
  const actions = `[
11
11
  {
12
12
  "id": "message",
13
- "onlyCollapseText": true,
14
13
  "icon": "mail",
15
14
  "badge": "3",
16
15
  "label": "Messages"
@@ -35,7 +34,6 @@ const actions2 = `[
35
34
  },
36
35
  {
37
36
  "id": "message",
38
- "onlyCollapseText": true,
39
37
  "icon": "mail",
40
38
  "badge": "3",
41
39
  "label": "Messages"
@@ -93,9 +93,9 @@ export class StzhHeader {
93
93
  return;
94
94
  }
95
95
  readTask(() => {
96
- this.scrollTop = window.scrollY;
97
- this.scrollingUp = this.lastScrollTop && this.lastScrollTop > this.scrollTop;
98
- this.lastScrollTop = this.scrollTop;
96
+ this.currentScrollY = window.scrollY;
97
+ this.scrollingUp = this.lastScrollY && this.lastScrollY > this.currentScrollY;
98
+ this.lastScrollY = this.currentScrollY;
99
99
  this.innerHeight = this.innerElement ? this.innerElement.offsetHeight : 0;
100
100
  this.mainHeight = this.mainElement ? this.mainElement.offsetHeight : 0;
101
101
  this.logobarHeight = this.sticky
@@ -105,9 +105,9 @@ export class StzhHeader {
105
105
  : this.logobarElement
106
106
  ? this.logobarElement.offsetHeight
107
107
  : 0;
108
- this.belowStayStickyPoint = this.scrollTop > this.logobarHeight;
109
- this.belowStartStickyPoint = this.scrollTop > this.headerHeight;
110
- this.headerOverlap = (this.headerTop - this.scrollTop) / -1;
108
+ this.belowStayStickyPoint = this.currentScrollY > this.logobarHeight;
109
+ this.belowStartStickyPoint = this.currentScrollY > this.headerHeight;
110
+ this.headerOverlap = (this.headerTop - this.currentScrollY) / -1;
111
111
  this.hideLogo = this.isSmallheader && this.headerOverlap > 10;
112
112
  });
113
113
  writeTask(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"stzh-header.js","sourceRoot":"","sources":["../../../../src/components/stzh-header/stzh-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,CAAC,EACD,SAAS,EACT,QAAQ,EACR,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD;;;;;;GAMG;AAMH,MAAM,OAAO,UAAU;;IAuIb,iBAAY,GAAG,GAAG,EAAE;MAC1B,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,OAAO;OACR;MAED,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAClD;MAED,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,GAAG,EAAE;QAC/C,QAAQ,CAAC,GAAG,EAAE;UACZ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;UACtC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC;UAElD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;UACxC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;UAC9C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,aA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Listen,\n Host,\n State,\n h,\n writeTask,\n readTask,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { media } from \"../../utils/media-utils\";\n\n/**\n * @slot logo - Slot for brand logo\n * @slot nav - Slot for `stzh-metanav` element\n * @slot login - Slot for login button\n * @slot appnav - Slot for `stzh-appnav` element\n * @slot langnav - Slot for `stzh-langnav` element\n */\n@Component({\n tag: \"stzh-header\",\n styleUrl: \"stzh-header.scss\",\n scoped: true\n})\nexport class StzhHeader {\n /** Portal link (for logo) */\n @Prop() href: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether grey metabar should stay (on top) on mobile */\n @Prop() metabarStay: boolean = false;\n\n /** Whether sticky behaviour should be disabled */\n @Prop() stickyDisabled: boolean = false;\n\n /**\n * Prevent creating a appnav placeholder element\n * with the size of appnav inside header parent element.\n * This prevents the fixed appnav to overlap\n * content at the end on mikro breakpoint,\n * but could lead to problems with certain layouts.\n */\n @Prop() preventAppnavPlaceholder: boolean = false;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the logo link element.\n * Default value is \"Header Logo\".\n */\n @Prop() logoAnalyticsId: string;\n\n @State() hideLogo: boolean = false;\n @State() paddingTop: number;\n @State() metabarTransform: string;\n @State() sticky: boolean = false;\n @State() stickyClosing: boolean = false;\n @State() stickyMetabar: boolean = false;\n @State() stickyMetabarEnd: boolean = false;\n\n @Element() element: HTMLStzhHeaderElement;\n\n /** Update position / sticky state of header */\n @Method()\n async updatePosition() {\n if (this.stickyDisabled) {\n return;\n }\n\n const removeSticky = () => {\n this.sticky = false;\n this.stickyClosing = false;\n this.paddingTop = 0;\n }\n\n if (this.scrollingUp && this.belowStayStickyPoint) {\n if (!this.sticky && this.belowStartStickyPoint) {\n this.paddingTop = this.headerHeight;\n this.sticky = true;\n }\n\n this.updateMetabarPosition();\n } else {\n if (this.sticky && this.belowStayStickyPoint) {\n const animationEnd = () => {\n removeSticky();\n this.updateMetabarPosition();\n this.innerElement.removeEventListener(\"animationend\", animationEnd);\n };\n\n this.innerElement.addEventListener(\"animationend\", animationEnd);\n this.stickyClosing = true;\n } else {\n removeSticky();\n this.updateMetabarPosition();\n }\n }\n }\n\n @Listen(\"scroll\", { target: \"window\" })\n scrollListener() {\n if (this.stickyDisabled) {\n return;\n }\n\n readTask(() => {\n this.scrollTop = window.scrollY;\n this.scrollingUp = this.lastScrollTop && this.lastScrollTop > this.scrollTop;\n this.lastScrollTop = this.scrollTop;\n\n this.innerHeight = this.innerElement ? this.innerElement.offsetHeight : 0;\n this.mainHeight = this.mainElement ? this.mainElement.offsetHeight : 0;\n\n this.logobarHeight = this.sticky\n ? this.isSmall\n ? this.headerHeight - this.innerHeight\n : this.headerHeight - this.mainHeight\n : this.logobarElement\n ? this.logobarElement.offsetHeight\n : 0;\n\n this.belowStayStickyPoint = this.scrollTop > this.logobarHeight;\n this.belowStartStickyPoint = this.scrollTop > this.headerHeight;\n\n this.headerOverlap = (this.headerTop - this.scrollTop) / -1;\n this.hideLogo = this.isSmallheader && this.headerOverlap > 10;\n });\n\n writeTask(() => {\n this.updatePosition();\n });\n }\n\n private scrollTop: number;\n private lastScrollTop: number;\n private headerOverlap: number;\n private scrollingUp: boolean;\n private belowStayStickyPoint: boolean;\n private belowStartStickyPoint: boolean;\n\n private headerTop: number;\n private headerHeight: number;\n private innerHeight: number;\n private mainHeight: number;\n private metabarHeight: number;\n private logobarHeight: number;\n private appnavHeight: number;\n\n private isSmall: boolean;\n private isSmallheader: boolean;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private innerElement: HTMLDivElement;\n private mainElement: HTMLDivElement;\n private logobarElement: HTMLDivElement;\n private metabarElement: HTMLDivElement;\n private appnavElement: HTMLDivElement;\n private appnavPlaceholderElement: HTMLDivElement;\n\n private handleResize = () => {\n if (this.stickyDisabled) {\n return;\n }\n\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(() => {\n readTask(() => {\n this.isSmall = media(\"small\").matches;\n this.isSmallheader = media(\"smallheader\").matches;\n\n this.headerTop = this.element.offsetTop;\n this.headerHeight = this.element.offsetHeight;\n this.appnavHeight = this.appnavElement ? this.appnavElement.offsetHeight : 0;\n this.metabarHeight = this.metabarElement ? this.metabarElement.offsetHeight : 0;\n });\n\n writeTask(() => {\n document.documentElement.style.setProperty('--stzh-header-height', `${this.headerHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-appnav-height', `${this.appnavHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-metabar-height', `${this.metabarHeight}px`);\n\n if (this.appnavHeight && !this.isSmall && !this.preventAppnavPlaceholder) {\n this.appnavPlaceholderElement.style.height = `${this.appnavHeight}px`;\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', `${this.appnavHeight}px`);\n } else {\n this.appnavPlaceholderElement.style.height = \"0px\";\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', \"0px\");\n }\n });\n\n this.scrollListener();\n });\n }\n\n private updateMetabarPosition() {\n if (!this.metabarElement || this.stickyDisabled) {\n return;\n }\n\n if (CSS && CSS.supports && CSS.supports(\"position\", \"sticky\")) {\n return;\n }\n\n if (this.isSmallheader && this.headerOverlap > 0 && !this.sticky && !this.stickyClosing) {\n if (this.headerOverlap < this.mainHeight - this.metabarHeight) {\n this.stickyMetabar = true;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = true;\n this.metabarTransform = `translateY(${this.logobarHeight}px)`;\n }\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n }\n }\n\n connectedCallback() {\n this.appnavPlaceholderElement = document.createElement(\"div\");\n this.element.parentElement.appendChild(this.appnavPlaceholderElement);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n this.appnavPlaceholderElement.parentElement.removeChild(this.appnavPlaceholderElement);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const navSlotUsed: boolean = hasSlot(this.element, \"nav\");\n const loginSlotUsed: boolean = hasSlot(this.element, \"login\");\n const appnavSlotUsed: boolean = hasSlot(this.element, \"appnav\");\n const langNavSlotUsed = hasSlot(this.element, \"langnav\");\n\n const classes = {\n \"header\": true,\n \"header--is-sticky-disabled\": this.stickyDisabled,\n \"header--sticky\": this.sticky,\n \"header--sticky-closing\": this.stickyClosing,\n \"header--hide-logo\": this.hideLogo,\n \"header--sticky-metabar\": this.stickyMetabar,\n \"header--sticky-metabar-end\": this.stickyMetabarEnd,\n \"header--has-metabar-stay\": this.metabarStay,\n \"header--has-empty-metabar-mobile\": !loginSlotUsed, // check for searchfield and burger slot when implemented\n \"header--has-empty-metabar\": !loginSlotUsed && !langNavSlotUsed && !navSlotUsed,\n \"header--has-appnav\": appnavSlotUsed\n };\n\n return (\n <Host>\n <header style={{paddingTop: `${this.paddingTop}px`}} class={classes}>\n <div\n class=\"header__inner\"\n ref={(el) => (this.innerElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__main\"\n ref={(el) => (this.mainElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__logobar\"\n ref={(el) => (this.logobarElement = el as HTMLDivElement)}\n >\n <div class=\"header__logobar-logo\">\n <a href={this.href} class=\"header__logo-link\" s-object-id={this.logoAnalyticsId || \"Header Logo\"}>\n <slot name=\"logo\"></slot>\n </a>\n </div>\n </div>\n\n <div\n class=\"header__metabar\"\n style={{transform: this.metabarTransform}}\n ref={(el) => (this.metabarElement = el as HTMLDivElement)}\n >\n <div class=\"header__metabar-inner\">\n <div class=\"header__metabar-nav\">\n <slot name=\"nav\"></slot>\n </div>\n <div class=\"header__metabar-login\">\n <slot name=\"login\"></slot>\n </div>\n <div class=\"header__metabar-langnav\">\n <slot name=\"langnav\"></slot>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"header__appnav\"\n ref={(el) => (this.appnavElement = el as HTMLDivElement)}\n >\n <div class=\"header__appnav-inner\">\n <slot name=\"appnav\"></slot>\n </div>\n </div>\n </div>\n </header>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"stzh-header.js","sourceRoot":"","sources":["../../../../src/components/stzh-header/stzh-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,MAAM,EACN,IAAI,EACJ,KAAK,EACL,CAAC,EACD,SAAS,EACT,QAAQ,EACR,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD;;;;;;GAMG;AAMH,MAAM,OAAO,UAAU;;IAuIb,iBAAY,GAAG,GAAG,EAAE;MAC1B,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,OAAO;OACR;MAED,IAAI,IAAI,CAAC,cAAc,EAAE;QACvB,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;OAClD;MAED,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC,GAAG,EAAE;QAC/C,QAAQ,CAAC,GAAG,EAAE;UACZ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;UACtC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC;UAElD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;UACxC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,YA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;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Element,\n Listen,\n Host,\n State,\n h,\n writeTask,\n readTask,\n Method,\n Prop,\n} from \"@stencil/core\";\n\nimport { hasSlot } from \"../../utils/utils\";\nimport { media } from \"../../utils/media-utils\";\n\n/**\n * @slot logo - Slot for brand logo\n * @slot nav - Slot for `stzh-metanav` element\n * @slot login - Slot for login button\n * @slot appnav - Slot for `stzh-appnav` element\n * @slot langnav - Slot for `stzh-langnav` element\n */\n@Component({\n tag: \"stzh-header\",\n styleUrl: \"stzh-header.scss\",\n scoped: true\n})\nexport class StzhHeader {\n /** Portal link (for logo) */\n @Prop() href: string = \"https://www.stadt-zuerich.ch\";\n\n /** Whether grey metabar should stay (on top) on mobile */\n @Prop() metabarStay: boolean = false;\n\n /** Whether sticky behaviour should be disabled */\n @Prop() stickyDisabled: boolean = false;\n\n /**\n * Prevent creating a appnav placeholder element\n * with the size of appnav inside header parent element.\n * This prevents the fixed appnav to overlap\n * content at the end on mikro breakpoint,\n * but could lead to problems with certain layouts.\n */\n @Prop() preventAppnavPlaceholder: boolean = false;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the logo link element.\n * Default value is \"Header Logo\".\n */\n @Prop() logoAnalyticsId: string;\n\n @State() hideLogo: boolean = false;\n @State() paddingTop: number;\n @State() metabarTransform: string;\n @State() sticky: boolean = false;\n @State() stickyClosing: boolean = false;\n @State() stickyMetabar: boolean = false;\n @State() stickyMetabarEnd: boolean = false;\n\n @Element() element: HTMLStzhHeaderElement;\n\n /** Update position / sticky state of header */\n @Method()\n async updatePosition() {\n if (this.stickyDisabled) {\n return;\n }\n\n const removeSticky = () => {\n this.sticky = false;\n this.stickyClosing = false;\n this.paddingTop = 0;\n }\n\n if (this.scrollingUp && this.belowStayStickyPoint) {\n if (!this.sticky && this.belowStartStickyPoint) {\n this.paddingTop = this.headerHeight;\n this.sticky = true;\n }\n\n this.updateMetabarPosition();\n } else {\n if (this.sticky && this.belowStayStickyPoint) {\n const animationEnd = () => {\n removeSticky();\n this.updateMetabarPosition();\n this.innerElement.removeEventListener(\"animationend\", animationEnd);\n };\n\n this.innerElement.addEventListener(\"animationend\", animationEnd);\n this.stickyClosing = true;\n } else {\n removeSticky();\n this.updateMetabarPosition();\n }\n }\n }\n\n @Listen(\"scroll\", { target: \"window\" })\n scrollListener() {\n if (this.stickyDisabled) {\n return;\n }\n\n readTask(() => {\n this.currentScrollY = window.scrollY;\n this.scrollingUp = this.lastScrollY && this.lastScrollY > this.currentScrollY;\n this.lastScrollY = this.currentScrollY;\n\n this.innerHeight = this.innerElement ? this.innerElement.offsetHeight : 0;\n this.mainHeight = this.mainElement ? this.mainElement.offsetHeight : 0;\n\n this.logobarHeight = this.sticky\n ? this.isSmall\n ? this.headerHeight - this.innerHeight\n : this.headerHeight - this.mainHeight\n : this.logobarElement\n ? this.logobarElement.offsetHeight\n : 0;\n\n this.belowStayStickyPoint = this.currentScrollY > this.logobarHeight;\n this.belowStartStickyPoint = this.currentScrollY > this.headerHeight;\n\n this.headerOverlap = (this.headerTop - this.currentScrollY) / -1;\n this.hideLogo = this.isSmallheader && this.headerOverlap > 10;\n });\n\n writeTask(() => {\n this.updatePosition();\n });\n }\n\n private currentScrollY: number;\n private lastScrollY: number;\n private headerOverlap: number;\n private scrollingUp: boolean;\n private belowStayStickyPoint: boolean;\n private belowStartStickyPoint: boolean;\n\n private headerTop: number;\n private headerHeight: number;\n private innerHeight: number;\n private mainHeight: number;\n private metabarHeight: number;\n private logobarHeight: number;\n private appnavHeight: number;\n\n private isSmall: boolean;\n private isSmallheader: boolean;\n\n private debounceResize: number;\n private resizeObserver: ResizeObserver;\n\n private innerElement: HTMLDivElement;\n private mainElement: HTMLDivElement;\n private logobarElement: HTMLDivElement;\n private metabarElement: HTMLDivElement;\n private appnavElement: HTMLDivElement;\n private appnavPlaceholderElement: HTMLDivElement;\n\n private handleResize = () => {\n if (this.stickyDisabled) {\n return;\n }\n\n if (this.debounceResize) {\n window.cancelAnimationFrame(this.debounceResize);\n }\n\n this.debounceResize = requestAnimationFrame(() => {\n readTask(() => {\n this.isSmall = media(\"small\").matches;\n this.isSmallheader = media(\"smallheader\").matches;\n\n this.headerTop = this.element.offsetTop;\n this.headerHeight = this.element.offsetHeight;\n this.appnavHeight = this.appnavElement ? this.appnavElement.offsetHeight : 0;\n this.metabarHeight = this.metabarElement ? this.metabarElement.offsetHeight : 0;\n });\n\n writeTask(() => {\n document.documentElement.style.setProperty('--stzh-header-height', `${this.headerHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-appnav-height', `${this.appnavHeight}px`);\n document.documentElement.style.setProperty('--stzh-header-metabar-height', `${this.metabarHeight}px`);\n\n if (this.appnavHeight && !this.isSmall && !this.preventAppnavPlaceholder) {\n this.appnavPlaceholderElement.style.height = `${this.appnavHeight}px`;\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', `${this.appnavHeight}px`);\n } else {\n this.appnavPlaceholderElement.style.height = \"0px\";\n document.documentElement.style.setProperty('--stzh-header-sticky-appnav-height', \"0px\");\n }\n });\n\n this.scrollListener();\n });\n }\n\n private updateMetabarPosition() {\n if (!this.metabarElement || this.stickyDisabled) {\n return;\n }\n\n if (CSS && CSS.supports && CSS.supports(\"position\", \"sticky\")) {\n return;\n }\n\n if (this.isSmallheader && this.headerOverlap > 0 && !this.sticky && !this.stickyClosing) {\n if (this.headerOverlap < this.mainHeight - this.metabarHeight) {\n this.stickyMetabar = true;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = true;\n this.metabarTransform = `translateY(${this.logobarHeight}px)`;\n }\n } else {\n this.stickyMetabar = false;\n this.stickyMetabarEnd = false;\n this.metabarTransform = \"translateY(0)\";\n }\n }\n\n connectedCallback() {\n this.appnavPlaceholderElement = document.createElement(\"div\");\n this.element.parentElement.appendChild(this.appnavPlaceholderElement);\n\n this.resizeObserver = new ResizeObserver(this.handleResize);\n this.resizeObserver.observe(this.element);\n }\n\n disconnectedCallback() {\n this.appnavPlaceholderElement.parentElement.removeChild(this.appnavPlaceholderElement);\n\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n const navSlotUsed: boolean = hasSlot(this.element, \"nav\");\n const loginSlotUsed: boolean = hasSlot(this.element, \"login\");\n const appnavSlotUsed: boolean = hasSlot(this.element, \"appnav\");\n const langNavSlotUsed = hasSlot(this.element, \"langnav\");\n\n const classes = {\n \"header\": true,\n \"header--is-sticky-disabled\": this.stickyDisabled,\n \"header--sticky\": this.sticky,\n \"header--sticky-closing\": this.stickyClosing,\n \"header--hide-logo\": this.hideLogo,\n \"header--sticky-metabar\": this.stickyMetabar,\n \"header--sticky-metabar-end\": this.stickyMetabarEnd,\n \"header--has-metabar-stay\": this.metabarStay,\n \"header--has-empty-metabar-mobile\": !loginSlotUsed, // check for searchfield and burger slot when implemented\n \"header--has-empty-metabar\": !loginSlotUsed && !langNavSlotUsed && !navSlotUsed,\n \"header--has-appnav\": appnavSlotUsed\n };\n\n return (\n <Host>\n <header style={{paddingTop: `${this.paddingTop}px`}} class={classes}>\n <div\n class=\"header__inner\"\n ref={(el) => (this.innerElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__main\"\n ref={(el) => (this.mainElement = el as HTMLDivElement)}\n >\n <div\n class=\"header__logobar\"\n ref={(el) => (this.logobarElement = el as HTMLDivElement)}\n >\n <div class=\"header__logobar-logo\">\n <a href={this.href} class=\"header__logo-link\" s-object-id={this.logoAnalyticsId || \"Header Logo\"}>\n <slot name=\"logo\"></slot>\n </a>\n </div>\n </div>\n\n <div\n class=\"header__metabar\"\n style={{transform: this.metabarTransform}}\n ref={(el) => (this.metabarElement = el as HTMLDivElement)}\n >\n <div class=\"header__metabar-inner\">\n <div class=\"header__metabar-nav\">\n <slot name=\"nav\"></slot>\n </div>\n <div class=\"header__metabar-login\">\n <slot name=\"login\"></slot>\n </div>\n <div class=\"header__metabar-langnav\">\n <slot name=\"langnav\"></slot>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"header__appnav\"\n ref={(el) => (this.appnavElement = el as HTMLDivElement)}\n >\n <div class=\"header__appnav-inner\">\n <slot name=\"appnav\"></slot>\n </div>\n </div>\n </div>\n </header>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,sBAAsB;AACtB,MAAM;AA0xCN,MAAM,KAAW,GAAG,CAoMnB;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,QAoMnB;AAED,MAAM;AACN,0BAA0B;AAC1B,MAAM;AAEN,cAAc,cAAc,CAAC","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 cacheTranslations: boolean\n formats: StzhLocaleFormats\n labels: \"flyout\" | \"fixed\"\n utils: {\n getLocale: (element: HTMLElement) => string\n fetchTranslations: (host: HTMLElement, component: string) => Promise<StzhLocaleComponent & any>\n\n format: (date: Date, type: string) => string\n parse:(string: string, type: string) => Date\n formatSpan: (date: Date | string, date2: Date | string, type: string) => string\n parseSpan: (string: string, type: string) => [Date, Date, string]\n createFormatParseAdapter: (formats: StzhLocaleFormats, globals: StzhLocaleGlobals) => StzhLocaleAdapter\n }\n}\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents\n pannellum: any\n Dropzone: any\n // readspeaker lib APIs\n ReadSpeaker: any\n rspkr: any\n proj4: 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 =\n | \"iframe\"\n | \"cookiewall\"\n | \"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 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/* 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/* 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?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n variant?: \"default\" | \"secondary\" | \"input\" | \"tertiary\"\n size?: \"default\" | \"small\" | \"tiny\"\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 = \"facebook\" | \"twitter\" | \"linkedin\" | \"xing\" | \"mail\";\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string\n label?: string\n icon?: string\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n onlyCollapseText?: boolean\n}\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\"\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}\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\"\n starred: boolean\n}\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\"\n action: StzhCardHeaderAction\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/* Card List */\n\nexport type StzhCardListCollapseAllEvent = {\n component: \"stzh-card-list\"\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\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\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 StzhButtonFocusEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\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 StzhLinkFocusEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\n/* Menu Item */\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\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/* Chip Select */\n\nexport type StzhChipSelectChangeEvent = {\n component: \"stzh-chip-select\"\n value: 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?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n href?: string\n rel?: string\n target?: string\n items?: StzhDatalistItemEntry[]\n}\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\"\n value: \"vertical\" | \"horizontal\"\n}\n\nexport type StzhDatalistHideBorderChangeEvent = {\n component: \"stzh-datalist\"\n value: boolean\n}\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\"\n originalEvent: MouseEvent\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: \"default\" | \"important\"\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}\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\",\n action: StzhDatamessagelistItemEntryAction,\n originalEvent: MouseEvent\n}\n\n/* Chip */\n\nexport type StzhChipSelectItem = {\n label: string\n value: string\n disabled?: boolean\n variant?: \"tag\" | \"filter\" | \"input\"\n type?: \"default\" | \"secondary\"\n counter?: string\n icon?: string\n size?: \"default\" | \"small\"\n}\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\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 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/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\"\n}\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\"\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?: HTMLStzhLinkElement | {\n href: string,\n label: string\n },\n cookie?: string\n cookieExpires?: number\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 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/* 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/* Langnav */\n\nexport type StzhLangnavChangeEvent = {\n component: \"stzh-langnav\",\n value: string\n}\n\n/* Dropdown */\n\nexport type StzhDropdownOption = {\n text: string,\n value: string\n}\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\",\n value: 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\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 =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"baseline\"\n | \"stretch\";\n\n export type JustifySelf =\n | \"auto\"\n | Justify;\n\n export type AlignSelf =\n | \"auto\"\n | 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 =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"heavy\"\n | \"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 | \"inherit\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM;AACN,sBAAsB;AACtB,MAAM;AAyxCN,MAAM,KAAW,GAAG,CAoMnB;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,QAoMnB;AAED,MAAM;AACN,0BAA0B;AAC1B,MAAM;AAEN,cAAc,cAAc,CAAC","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 cacheTranslations: boolean\n formats: StzhLocaleFormats\n labels: \"flyout\" | \"fixed\"\n utils: {\n getLocale: (element: HTMLElement) => string\n fetchTranslations: (host: HTMLElement, component: string) => Promise<StzhLocaleComponent & any>\n\n format: (date: Date, type: string) => string\n parse:(string: string, type: string) => Date\n formatSpan: (date: Date | string, date2: Date | string, type: string) => string\n parseSpan: (string: string, type: string) => [Date, Date, string]\n createFormatParseAdapter: (formats: StzhLocaleFormats, globals: StzhLocaleGlobals) => StzhLocaleAdapter\n }\n}\n\ndeclare global {\n interface Window {\n stzhComponents: WindowStzhComponents\n pannellum: any\n Dropzone: any\n // readspeaker lib APIs\n ReadSpeaker: any\n rspkr: any\n proj4: 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 =\n | \"iframe\"\n | \"cookiewall\"\n | \"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 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/* 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/* 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?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n variant?: \"default\" | \"secondary\" | \"input\" | \"tertiary\"\n size?: \"default\" | \"small\" | \"tiny\"\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 = \"facebook\" | \"twitter\" | \"linkedin\" | \"xing\" | \"mail\";\n\n/* Card */\n\nexport type StzhCardHeaderAction = {\n id: string\n label?: string\n icon?: string\n badge?: string\n badgeEmpty?: boolean\n badgeType?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n}\n\nexport type StzhCardSubtitleClickEvent = {\n component: \"stzh-card\"\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}\n\nexport type StzhCardStarClickEvent = {\n component: \"stzh-card\"\n starred: boolean\n}\n\nexport type StzhCardHeaderActionClickEvent = {\n component: \"stzh-card\"\n action: StzhCardHeaderAction\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/* Card List */\n\nexport type StzhCardListCollapseAllEvent = {\n component: \"stzh-card-list\"\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\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\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 StzhButtonFocusEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\n}\n\nexport type StzhButtonBlurEvent = {\n component: \"stzh-button\"\n originalEvent: FocusEvent\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 StzhLinkFocusEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\nexport type StzhLinkBlurEvent = {\n component: \"stzh-link\"\n originalEvent: FocusEvent\n}\n\n/* Menu Item */\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\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/* Chip Select */\n\nexport type StzhChipSelectChangeEvent = {\n component: \"stzh-chip-select\"\n value: 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?: \"default\" | \"success\" | \"warning\" | \"error\" | \"info\"\n href?: string\n rel?: string\n target?: string\n items?: StzhDatalistItemEntry[]\n}\n\nexport type StzhDatalistDirectionChangeEvent = {\n component: \"stzh-datalist\"\n value: \"vertical\" | \"horizontal\"\n}\n\nexport type StzhDatalistHideBorderChangeEvent = {\n component: \"stzh-datalist\"\n value: boolean\n}\n\n/* Datalist Item */\n\nexport type StzhDatalistItemActionClickEvent = {\n component: \"stzh-datalist-item\"\n originalEvent: MouseEvent\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: \"default\" | \"important\"\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}\n\nexport type StzhDatamessagelistItemActionClickEvent = {\n component: \"stzh-datamessagelist-item\",\n action: StzhDatamessagelistItemEntryAction,\n originalEvent: MouseEvent\n}\n\n/* Chip */\n\nexport type StzhChipSelectItem = {\n label: string\n value: string\n disabled?: boolean\n variant?: \"tag\" | \"filter\" | \"input\"\n type?: \"default\" | \"secondary\"\n counter?: string\n icon?: string\n size?: \"default\" | \"small\"\n}\n\nexport type StzhChipClickEvent = {\n component: \"stzh-chip\",\n originalEvent: MouseEvent\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 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/* Overlay */\n\nexport type StzhOverlayOpenEvent = {\n component: \"stzh-overlay\"\n}\n\nexport type StzhOverlayCloseEvent = {\n component: \"stzh-overlay\"\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?: HTMLStzhLinkElement | {\n href: string,\n label: string\n },\n cookie?: string\n cookieExpires?: number\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 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/* 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/* Langnav */\n\nexport type StzhLangnavChangeEvent = {\n component: \"stzh-langnav\",\n value: string\n}\n\n/* Dropdown */\n\nexport type StzhDropdownOption = {\n text: string,\n value: string\n}\n\nexport type StzhDropdownChangeEvent = {\n component: \"stzh-dropdown\",\n value: 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\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 =\n | \"start\"\n | \"end\"\n | \"center\"\n | \"baseline\"\n | \"stretch\";\n\n export type JustifySelf =\n | \"auto\"\n | Justify;\n\n export type AlignSelf =\n | \"auto\"\n | 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 =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"heavy\"\n | \"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 | \"inherit\";\n\n export type Curves =\n | \"p1\"\n | \"p2\"\n | \"caption\"\n | \"h4\"\n | \"h3\"\n | \"h2\"\n | \"h1\"\n | \"hero\"\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"]}
@@ -835,7 +835,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
835
835
  })();
836
836
 
837
837
  const name = "@oiz/stzh-components";
838
- const version = "2.14.0";
838
+ const version = "2.14.2";
839
839
 
840
840
  const packageName = name.substring(name.indexOf('/')+1);
841
841