@oiz/stzh-components 3.0.0-beta3 → 3.0.0-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-0cbebaa1.js → app-globals-5897b76e.js} +39 -14
- package/dist/cjs/app-globals-5897b76e.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stzh-appointments.cjs.entry.js +11 -8
- package/dist/cjs/stzh-appointments.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-card_3.cjs.entry.js +16 -19
- package/dist/cjs/stzh-card_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-chip.cjs.entry.js +2 -2
- package/dist/cjs/stzh-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-components.cjs.js +2 -2
- package/dist/cjs/stzh-content.cjs.entry.js +1 -1
- package/dist/cjs/stzh-content.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cspace.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js +1 -1
- package/dist/cjs/stzh-cta.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +9 -4
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datamessagelist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datamessagelist.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-dropdown.cjs.entry.js +8 -2
- package/dist/cjs/stzh-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-header.cjs.entry.js +15 -5
- package/dist/cjs/stzh-header.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-iframe.cjs.entry.js +11 -3
- package/dist/cjs/stzh-iframe.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js +2 -2
- package/dist/cjs/stzh-imagecomparison.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-search.cjs.entry.js +20 -3
- package/dist/cjs/stzh-search.cjs.entry.js.map +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js +1 -1
- package/dist/cjs/stzh-skin-portal-mitwirken.cjs.entry.js.map +1 -1
- package/dist/collection/assets/i18n/de.json +2 -2
- package/dist/collection/assets/i18n/en.json +2 -2
- package/dist/collection/components/stzh-appointments/stzh-appointments.css +99 -19
- package/dist/collection/components/stzh-appointments/stzh-appointments.js +9 -7
- package/dist/collection/components/stzh-appointments/stzh-appointments.js.map +1 -1
- package/dist/collection/components/stzh-appointments/stzh-appointments.stories.js +7 -1
- package/dist/collection/components/stzh-button/stzh-button.css +10 -10
- package/dist/collection/components/stzh-calendar/stzh-calendar.css +0 -2
- package/dist/collection/components/stzh-card/stzh-card.css +0 -27
- package/dist/collection/components/stzh-card/stzh-card.js +12 -94
- package/dist/collection/components/stzh-card/stzh-card.js.map +1 -1
- package/dist/collection/components/stzh-card/stzh-card.stories.js +0 -17
- package/dist/collection/components/stzh-chip/stzh-chip.css +22 -10
- package/dist/collection/components/stzh-chip/stzh-chip.js +2 -2
- package/dist/collection/components/stzh-chip/stzh-chip.js.map +1 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js +3 -1
- package/dist/collection/components/stzh-chipselect/stzh-chipselect.js.map +1 -1
- package/dist/collection/components/stzh-content/stzh-content.css +3 -3
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +36 -0
- package/dist/collection/components/stzh-cta/stzh-cta.css +22 -36
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.css +0 -5
- package/dist/collection/components/stzh-datamessagelist/stzh-datamessagelist.stories.js +26 -0
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.css +26 -16
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js +26 -3
- package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js.map +1 -1
- package/dist/collection/components/stzh-datepicker/stzh-datepicker.css +18 -3
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.css +288 -40
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +108 -4
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js.map +1 -1
- package/dist/collection/components/stzh-header/stzh-header.css +15 -13
- package/dist/collection/components/stzh-header/stzh-header.js +19 -6
- package/dist/collection/components/stzh-header/stzh-header.js.map +1 -1
- package/dist/collection/components/stzh-iframe/stzh-iframe.js +160 -3
- package/dist/collection/components/stzh-iframe/stzh-iframe.js.map +1 -1
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.css +12 -17
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.js +1 -1
- package/dist/collection/components/stzh-imagecomparison/stzh-imagecomparison.js.map +1 -1
- package/dist/collection/components/stzh-link/stzh-link.js +19 -19
- package/dist/collection/components/stzh-link/stzh-link.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.css +70 -0
- package/dist/collection/components/stzh-search/stzh-search.js +72 -3
- package/dist/collection/components/stzh-search/stzh-search.js.map +1 -1
- package/dist/collection/components/stzh-search/stzh-search.stories.js +3 -0
- package/dist/collection/components/stzh-skin-portal-mitwirken/stzh-skin-portal-mitwirken.css +7 -7
- package/dist/collection/global/js/helpers/autofocus.js +36 -11
- package/dist/collection/global/js/script.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +38 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/stzh-appointments.js +11 -9
- package/dist/components/stzh-appointments.js.map +1 -1
- package/dist/components/stzh-button2.js +1 -1
- package/dist/components/stzh-button2.js.map +1 -1
- package/dist/components/stzh-calendar2.js +1 -1
- package/dist/components/stzh-calendar2.js.map +1 -1
- package/dist/components/stzh-card2.js +13 -22
- package/dist/components/stzh-card2.js.map +1 -1
- package/dist/components/stzh-chip2.js +3 -3
- package/dist/components/stzh-chip2.js.map +1 -1
- package/dist/components/stzh-chipselect2.js +3 -1
- package/dist/components/stzh-chipselect2.js.map +1 -1
- package/dist/components/stzh-content.js +1 -1
- package/dist/components/stzh-content.js.map +1 -1
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-cspace.js.map +1 -1
- package/dist/components/stzh-cta.js +1 -1
- package/dist/components/stzh-cta.js.map +1 -1
- package/dist/components/stzh-datamessagelist-item.js +10 -4
- package/dist/components/stzh-datamessagelist-item.js.map +1 -1
- package/dist/components/stzh-datamessagelist.js +1 -1
- package/dist/components/stzh-datamessagelist.js.map +1 -1
- package/dist/components/stzh-datepicker2.js +1 -1
- package/dist/components/stzh-datepicker2.js.map +1 -1
- package/dist/components/stzh-dropdown2.js +12 -2
- package/dist/components/stzh-dropdown2.js.map +1 -1
- package/dist/components/stzh-header.js +17 -5
- package/dist/components/stzh-header.js.map +1 -1
- package/dist/components/stzh-iframe2.js +19 -3
- package/dist/components/stzh-iframe2.js.map +1 -1
- package/dist/components/stzh-imagecomparison.js +2 -2
- package/dist/components/stzh-imagecomparison.js.map +1 -1
- package/dist/components/stzh-link2.js +2 -2
- package/dist/components/stzh-link2.js.map +1 -1
- package/dist/components/stzh-search.js +49 -16
- package/dist/components/stzh-search.js.map +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js +1 -1
- package/dist/components/stzh-skin-portal-mitwirken.js.map +1 -1
- package/dist/esm/{app-globals-3c171b79.js → app-globals-6a7ed0f4.js} +39 -14
- package/dist/esm/app-globals-6a7ed0f4.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stzh-appointments.entry.js +11 -8
- package/dist/esm/stzh-appointments.entry.js.map +1 -1
- package/dist/esm/stzh-badge_3.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js.map +1 -1
- package/dist/esm/stzh-calendar.entry.js +1 -1
- package/dist/esm/stzh-calendar.entry.js.map +1 -1
- package/dist/esm/stzh-card_3.entry.js +16 -19
- package/dist/esm/stzh-card_3.entry.js.map +1 -1
- package/dist/esm/stzh-chip.entry.js +3 -3
- package/dist/esm/stzh-chip.entry.js.map +1 -1
- package/dist/esm/stzh-components.js +2 -2
- package/dist/esm/stzh-content.entry.js +1 -1
- package/dist/esm/stzh-content.entry.js.map +1 -1
- package/dist/esm/stzh-cspace.entry.js +1 -1
- package/dist/esm/stzh-cspace.entry.js.map +1 -1
- package/dist/esm/stzh-cta.entry.js +1 -1
- package/dist/esm/stzh-cta.entry.js.map +1 -1
- package/dist/esm/stzh-datamessagelist-item.entry.js +9 -4
- package/dist/esm/stzh-datamessagelist-item.entry.js.map +1 -1
- package/dist/esm/stzh-datamessagelist.entry.js +1 -1
- package/dist/esm/stzh-datamessagelist.entry.js.map +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm/stzh-datepicker_3.entry.js.map +1 -1
- package/dist/esm/stzh-dropdown.entry.js +8 -2
- package/dist/esm/stzh-dropdown.entry.js.map +1 -1
- package/dist/esm/stzh-header.entry.js +15 -5
- package/dist/esm/stzh-header.entry.js.map +1 -1
- package/dist/esm/stzh-iframe.entry.js +11 -3
- package/dist/esm/stzh-iframe.entry.js.map +1 -1
- package/dist/esm/stzh-imagecomparison.entry.js +2 -2
- package/dist/esm/stzh-imagecomparison.entry.js.map +1 -1
- package/dist/esm/stzh-link.entry.js +1 -1
- package/dist/esm/stzh-link.entry.js.map +1 -1
- package/dist/esm/stzh-search.entry.js +20 -3
- package/dist/esm/stzh-search.entry.js.map +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js +1 -1
- package/dist/esm/stzh-skin-portal-mitwirken.entry.js.map +1 -1
- package/dist/stzh-components/assets/i18n/de.json +2 -2
- package/dist/stzh-components/assets/i18n/en.json +2 -2
- package/dist/stzh-components/index.esm.js.map +1 -1
- package/dist/stzh-components/{p-3ca4f71a.entry.js → p-069e181f.entry.js} +2 -2
- package/dist/stzh-components/p-069e181f.entry.js.map +1 -0
- package/dist/stzh-components/p-1b78f602.entry.js +2 -0
- package/dist/stzh-components/p-1b78f602.entry.js.map +1 -0
- package/dist/stzh-components/p-295c8995.entry.js +2 -0
- package/dist/stzh-components/p-295c8995.entry.js.map +1 -0
- package/dist/stzh-components/p-2bbbc217.entry.js +9 -0
- package/dist/stzh-components/{p-b4ce8e10.entry.js.map → p-2bbbc217.entry.js.map} +1 -1
- package/dist/stzh-components/p-2d57953a.entry.js +2 -0
- package/dist/stzh-components/{p-1252aa01.entry.js.map → p-2d57953a.entry.js.map} +1 -1
- package/dist/stzh-components/p-2eb8f323.entry.js +2 -0
- package/dist/stzh-components/{p-62b88844.entry.js.map → p-2eb8f323.entry.js.map} +1 -1
- package/dist/stzh-components/p-45392fe0.entry.js +2 -0
- package/dist/stzh-components/p-45392fe0.entry.js.map +1 -0
- package/dist/stzh-components/{p-bd494b47.entry.js → p-523c0bb1.entry.js} +2 -2
- package/dist/stzh-components/p-523c0bb1.entry.js.map +1 -0
- package/dist/stzh-components/{p-e63dfe12.entry.js → p-5b9b2425.entry.js} +2 -2
- package/dist/stzh-components/{p-e63dfe12.entry.js.map → p-5b9b2425.entry.js.map} +1 -1
- package/dist/stzh-components/{p-bb87a6e2.entry.js → p-75fec3cd.entry.js} +2 -2
- package/dist/stzh-components/{p-bb87a6e2.entry.js.map → p-75fec3cd.entry.js.map} +1 -1
- package/dist/stzh-components/p-78eaea8d.js +2 -0
- package/dist/stzh-components/p-78eaea8d.js.map +1 -0
- package/dist/stzh-components/p-8ab62796.entry.js +2 -0
- package/dist/stzh-components/p-8ab62796.entry.js.map +1 -0
- package/dist/stzh-components/p-b0626969.entry.js +2 -0
- package/dist/stzh-components/p-b0626969.entry.js.map +1 -0
- package/dist/stzh-components/p-b34a4e7c.entry.js +2 -0
- package/dist/stzh-components/p-b34a4e7c.entry.js.map +1 -0
- package/dist/stzh-components/p-b5224e53.entry.js +2 -0
- package/dist/stzh-components/p-b5224e53.entry.js.map +1 -0
- package/dist/stzh-components/p-d1e6afe2.entry.js +2 -0
- package/dist/stzh-components/p-d1e6afe2.entry.js.map +1 -0
- package/dist/stzh-components/p-ddfb8df0.entry.js +2 -0
- package/dist/stzh-components/p-ddfb8df0.entry.js.map +1 -0
- package/dist/stzh-components/p-eb79f3ed.entry.js +2 -0
- package/dist/stzh-components/p-eb79f3ed.entry.js.map +1 -0
- package/dist/stzh-components/p-f50e0102.entry.js +2 -0
- package/dist/stzh-components/p-f50e0102.entry.js.map +1 -0
- package/dist/stzh-components/stzh-components.css +1 -1
- package/dist/stzh-components/stzh-components.esm.js +1 -1
- package/dist/stzh-components/stzh-components.esm.js.map +1 -1
- package/dist/types/components/stzh-card/stzh-card.d.ts +1 -5
- package/dist/types/components/stzh-datamessagelist-item/stzh-datamessagelist-item.d.ts +2 -0
- package/dist/types/components/stzh-dropdown/stzh-dropdown.d.ts +10 -2
- package/dist/types/components/stzh-header/stzh-header.d.ts +2 -2
- package/dist/types/components/stzh-iframe/stzh-iframe.d.ts +29 -1
- package/dist/types/components/stzh-link/stzh-link.d.ts +2 -2
- package/dist/types/components/stzh-search/stzh-search.d.ts +10 -0
- package/dist/types/components.d.ts +156 -38
- package/dist/types/index.d.ts +3 -0
- package/dist/vscode-data.json +140 -12
- package/package.json +1 -1
- package/dist/cjs/app-globals-0cbebaa1.js.map +0 -1
- package/dist/collection/patterns/appointments/appointments.e2e.js +0 -18
- package/dist/collection/patterns/appointments/appointments.e2e.js.map +0 -1
- package/dist/esm/app-globals-3c171b79.js.map +0 -1
- package/dist/stzh-components/p-1252aa01.entry.js +0 -2
- package/dist/stzh-components/p-18015613.entry.js +0 -2
- package/dist/stzh-components/p-18015613.entry.js.map +0 -1
- package/dist/stzh-components/p-38d64313.entry.js +0 -2
- package/dist/stzh-components/p-38d64313.entry.js.map +0 -1
- package/dist/stzh-components/p-39fa126d.js +0 -2
- package/dist/stzh-components/p-39fa126d.js.map +0 -1
- package/dist/stzh-components/p-3ca4f71a.entry.js.map +0 -1
- package/dist/stzh-components/p-4cff0c86.entry.js +0 -2
- package/dist/stzh-components/p-4cff0c86.entry.js.map +0 -1
- package/dist/stzh-components/p-5e48450d.entry.js +0 -2
- package/dist/stzh-components/p-5e48450d.entry.js.map +0 -1
- package/dist/stzh-components/p-62b88844.entry.js +0 -2
- package/dist/stzh-components/p-69c1826d.entry.js +0 -2
- package/dist/stzh-components/p-69c1826d.entry.js.map +0 -1
- package/dist/stzh-components/p-7091d652.entry.js +0 -2
- package/dist/stzh-components/p-7091d652.entry.js.map +0 -1
- package/dist/stzh-components/p-76902b7c.entry.js +0 -2
- package/dist/stzh-components/p-76902b7c.entry.js.map +0 -1
- package/dist/stzh-components/p-92285350.entry.js +0 -2
- package/dist/stzh-components/p-92285350.entry.js.map +0 -1
- package/dist/stzh-components/p-93e0ff47.entry.js +0 -2
- package/dist/stzh-components/p-93e0ff47.entry.js.map +0 -1
- package/dist/stzh-components/p-b4ce8e10.entry.js +0 -9
- package/dist/stzh-components/p-bd494b47.entry.js.map +0 -1
- package/dist/stzh-components/p-e6785bb1.entry.js +0 -2
- package/dist/stzh-components/p-e6785bb1.entry.js.map +0 -1
- package/dist/stzh-components/p-fb1d20da.entry.js +0 -2
- package/dist/stzh-components/p-fb1d20da.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-chip.js","sourceRoot":"","sources":["../../../../src/components/stzh-chip/stzh-chip.tsx"],"names":[],"mappings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\nimport {\n StzhChipVariant,\n StzhChipSize,\n StzhChipType,\n StzhChipClickEvent,\n StzhChipRemoveEvent,\n StzhChipFocusEvent,\n StzhChipBlurEvent\n} from \"../../index\";\n\n/**\n * @slot - Slot for label\n * @slot icon - Slot for icon\n */\n@Component({\n tag: \"stzh-chip\",\n styleUrl: \"stzh-chip.scss\",\n scoped: true\n})\nexport class StzhChip {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string;\n\n /** `href` if the chip should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Whether chip is not interactive */\n @Prop({ reflect: true }) nonInteractive: boolean = false;\n\n /** Whether remove button should be shown */\n @Prop({ reflect: true }) removable: boolean = false;\n\n /** Whether inverted style is shown (only available for `tag` variant) */\n @Prop({ reflect: true }) inverted: boolean = false;\n\n /** Variant */\n @Prop({ reflect: true }) variant: StzhChipVariant = \"tag\";\n\n /** Size */\n @Prop({ reflect: true }) size: StzhChipSize = \"default\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhChipType = \"default\";\n\n /** Counter */\n @Prop() counter: string = \"\";\n\n /** Label of remove button for screenreaders */\n @Prop() removeLabel: string = \"\";\n\n /** Active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the link/button */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the remove button element.\n * Default value will be taken from `removeLabel` prop.\n */\n @Prop() removeAnalyticsId: string;\n\n @Element() element: HTMLStzhChipElement;\n\n /** Chip click event */\n @Event() stzhClick: EventEmitter<StzhChipClickEvent>;\n\n /** Chip remove event */\n @Event() stzhRemove: EventEmitter<StzhChipRemoveEvent>;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhChipFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhChipBlurEvent>;\n\n private chip: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLElement;\n private focusedByInput: boolean = false;\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.chip?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(): DocumentFragment {\n return (\n <Fragment>\n <div class=\"stzh-chip__icon-wrapper\">\n {this.icon || (typeof this.icon === \"undefined\" && this.variant === \"tag\" && this.type !== \"default\") ?\n <stzh-icon class=\"stzh-chip__icon\" name={\n this.icon\n || this.type === \"info\" && \"info-help\"\n || this.type === \"warning\" && \"important-warning\"\n || this.type === \"error\" && \"warning\"\n || this.type === \"success\" && \"checkmark-circle\"\n }></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n </div>\n\n <stzh-clamp\n lines={1}\n class=\"stzh-chip__label\"\n ref={(el) => (this.text = el as HTMLElement)}\n >\n {this.label ? this.label : <slot></slot>}\n {this.counter &&\n <span class=\"stzh-chip__vhidden\">\n ({this.counter})\n </span>\n }\n </stzh-clamp>\n\n {this.counter &&\n <div class=\"stzh-chip__counter\" aria-hidden=\"true\">\n {this.counter}\n </div>\n }\n </Fragment>\n );\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.chip.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onRemoveClick = (event: MouseEvent) => {\n this.stzhRemove.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n render() {\n const classes = {\n \"stzh-chip\": true,\n \"stzh-chip--is-active\": this.active,\n \"stzh-chip--is-disabled\": this.disabled,\n \"stzh-chip--is-removable\": this.removable,\n \"stzh-chip--is-inverted\": this.inverted,\n \"stzh-chip--has-counter\": !!this.counter,\n [`stzh-chip--type-${this.type}`]: !!this.type,\n [`stzh-chip--size-${this.size}`]: !!this.size,\n [`stzh-chip--${this.variant}`]: !!this.variant\n };\n\n const Chip = this.nonInteractive ? \"div\" :\n this.href ? \"a\" : \"button\";\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n {this.removable &&\n <button\n class=\"stzh-chip__remove\"\n onClick={this.onRemoveClick}\n disabled={this.disabled}\n aria-label={this.removeLabel}\n type=\"button\"\n s-object-id={this.removeAnalyticsId || this.removeLabel}\n >\n <stzh-icon class=\"stzh-chip__remove-icon\" name=\"close-big\"></stzh-icon>\n </button>\n }\n\n {this.href ?\n <Chip\n ref={(el) => (this.chip = el as HTMLAnchorElement)}\n class={{\n \"stzh-chip__button\": true,\n \"is-button\": !this.nonInteractive && !this.href,\n \"is-link\": !this.nonInteractive && !!this.href\n }}\n href={this.disabled ? null : this.href}\n target={this.target}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner()}\n </Chip>\n :\n <Chip\n ref={(el) => (this.chip = el as HTMLButtonElement)}\n class={{\n \"stzh-chip__button\": true,\n \"is-button\": !this.nonInteractive && !this.href,\n \"is-link\": !this.nonInteractive && !!this.href\n }}\n disabled={this.disabled}\n type=\"button\"\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner()}\n </Chip>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-chip.js","sourceRoot":"","sources":["../../../../src/components/stzh-chip/stzh-chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EAEL,OAAO,EACR,MAAM,eAAe,CAAC;AAYvB;;;GAGG;AAMH,MAAM,OAAO,QAAQ;;IAkFX,mBAAc,GAAY,KAAK,CAAC;IA+ChC,gBAAW,GAAG,GAAG,EAAE;MACzB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;OACnB;MAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAA;IAEO,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;MACtC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;MAE3B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE;QACzC,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;OAClB,CAAC,CAAC;MAEH,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;MACvC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAClB,SAAS,EAAE,WAAW;QACtB,aAAa,EAAE,KAAK;OACrB,CAAC,CAAC;IACL,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element\n} from \"@stencil/core\";\n\nimport {\n StzhChipVariant,\n StzhChipSize,\n StzhChipType,\n StzhChipClickEvent,\n StzhChipRemoveEvent,\n StzhChipFocusEvent,\n StzhChipBlurEvent\n} from \"../../index\";\n\n/**\n * @slot - Slot for label\n * @slot icon - Slot for icon\n */\n@Component({\n tag: \"stzh-chip\",\n styleUrl: \"stzh-chip.scss\",\n scoped: true\n})\nexport class StzhChip {\n /** Label */\n @Prop() label: string = \"\";\n\n /** Icon (use instead of icon slot) */\n @Prop() icon: string;\n\n /** `href` if the chip should be used as link */\n @Prop() href: string = \"\";\n\n /** Target if the button is used as link (if `href` used) */\n @Prop() target: string = \"\";\n\n /** Whether chip is not interactive */\n @Prop({ reflect: true }) nonInteractive: boolean = false;\n\n /** Whether remove button should be shown */\n @Prop({ reflect: true }) removable: boolean = false;\n\n /** Whether inverted style is shown (only available for `tag` variant) */\n @Prop({ reflect: true }) inverted: boolean = false;\n\n /** Variant */\n @Prop({ reflect: true }) variant: StzhChipVariant = \"tag\";\n\n /** Size */\n @Prop({ reflect: true }) size: StzhChipSize = \"default\";\n\n /** Type */\n @Prop({ reflect: true }) type: StzhChipType = \"default\";\n\n /** Counter */\n @Prop() counter: string = \"\";\n\n /** Label of remove button for screenreaders */\n @Prop() removeLabel: string = \"\";\n\n /** Active */\n @Prop({ reflect: true }) active: boolean = false;\n\n /** Disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Tabindex of link/button */\n @Prop({ attribute: \"a11y-tabindex\" }) a11yTabindex: string;\n\n /** Accessible label for screen readers to replace visible text */\n @Prop({ attribute: \"a11y-label\" }) a11yLabel: string;\n\n /** Id for element which describes the link/button */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link/button element.\n * Default value will be taken from `label` prop or default slot.\n */\n @Prop() analyticsId: string;\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the remove button element.\n * Default value will be taken from `removeLabel` prop.\n */\n @Prop() removeAnalyticsId: string;\n\n @Element() element: HTMLStzhChipElement;\n\n /** Chip click event */\n @Event() stzhClick: EventEmitter<StzhChipClickEvent>;\n\n /** Chip remove event */\n @Event() stzhRemove: EventEmitter<StzhChipRemoveEvent>;\n\n /** Focus event */\n @Event() stzhFocus: EventEmitter<StzhChipFocusEvent>;\n\n /** Input blur event */\n @Event() stzhBlur: EventEmitter<StzhChipBlurEvent>;\n\n private chip: HTMLButtonElement | HTMLAnchorElement;\n private text: HTMLElement;\n private focusedByInput: boolean = false;\n\n componentDidRender() {\n requestAnimationFrame(() => {\n this.chip?.setAttribute(\"s-object-id\", this.analyticsId || this.text.innerText);\n });\n }\n\n private renderInner(): DocumentFragment {\n return (\n <div class=\"stzh-chip__button-inner\">\n <div class=\"stzh-chip__icon-wrapper\">\n {this.icon || (typeof this.icon === \"undefined\" && this.variant === \"tag\" && this.type !== \"default\") ?\n <stzh-icon class=\"stzh-chip__icon\" name={\n this.icon\n || this.type === \"info\" && \"info-help\"\n || this.type === \"warning\" && \"important-warning\"\n || this.type === \"error\" && \"warning\"\n || this.type === \"success\" && \"checkmark-circle\"\n }></stzh-icon>\n :\n <slot name=\"icon\"></slot>\n }\n </div>\n\n <stzh-clamp\n lines={1}\n class=\"stzh-chip__label\"\n ref={(el) => (this.text = el as HTMLElement)}\n >\n {this.label ? this.label : <slot></slot>}\n {this.counter &&\n <span class=\"stzh-chip__vhidden\">\n ({this.counter})\n </span>\n }\n </stzh-clamp>\n\n {this.counter &&\n <div class=\"stzh-chip__counter\" aria-hidden=\"true\">\n {this.counter}\n </div>\n }\n </div>\n );\n }\n\n private onRootFocus = () => {\n if (!this.focusedByInput) {\n this.chip.focus();\n }\n\n this.focusedByInput = false;\n }\n\n private onFocus = (event: FocusEvent) => {\n this.focusedByInput = true;\n\n const focusEvent = new FocusEvent(\"focus\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(focusEvent);\n this.stzhFocus.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onBlur = (event: FocusEvent) => {\n const blurEvent = new FocusEvent(\"blur\", {\n view: window,\n bubbles: false,\n cancelable: false\n });\n\n this.element.dispatchEvent(blurEvent);\n this.stzhBlur.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onClick = (event: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n private onRemoveClick = (event: MouseEvent) => {\n this.stzhRemove.emit({\n component: \"stzh-chip\",\n originalEvent: event\n });\n }\n\n render() {\n const classes = {\n \"stzh-chip\": true,\n \"stzh-chip--is-active\": this.active,\n \"stzh-chip--is-disabled\": this.disabled,\n \"stzh-chip--is-removable\": this.removable,\n \"stzh-chip--is-inverted\": this.inverted,\n \"stzh-chip--has-counter\": !!this.counter,\n [`stzh-chip--type-${this.type}`]: !!this.type,\n [`stzh-chip--size-${this.size}`]: !!this.size,\n [`stzh-chip--${this.variant}`]: !!this.variant\n };\n\n const Chip = this.nonInteractive ? \"div\" :\n this.href ? \"a\" : \"button\";\n\n return (\n <Host tabindex={this.disabled ? null : \"-1\"} onFocus={this.onRootFocus}>\n <div class={classes}>\n {this.removable &&\n <button\n class=\"stzh-chip__remove\"\n onClick={this.onRemoveClick}\n disabled={this.disabled}\n aria-label={this.removeLabel}\n type=\"button\"\n s-object-id={this.removeAnalyticsId || this.removeLabel}\n >\n <stzh-icon class=\"stzh-chip__remove-icon\" name=\"close-big\"></stzh-icon>\n </button>\n }\n\n {this.href ?\n <Chip\n ref={(el) => (this.chip = el as HTMLAnchorElement)}\n class={{\n \"stzh-chip__button\": true,\n \"is-button\": !this.nonInteractive && !this.href,\n \"is-link\": !this.nonInteractive && !!this.href\n }}\n href={this.disabled ? null : this.href}\n target={this.target}\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner()}\n </Chip>\n :\n <Chip\n ref={(el) => (this.chip = el as HTMLButtonElement)}\n class={{\n \"stzh-chip__button\": true,\n \"is-button\": !this.nonInteractive && !this.href,\n \"is-link\": !this.nonInteractive && !!this.href\n }}\n disabled={this.disabled}\n type=\"button\"\n tabindex={this.a11yTabindex}\n aria-label={this.a11yLabel || null}\n aria-describedby={this.a11yDescribedby || null}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n >\n {this.renderInner()}\n </Chip>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -99,7 +99,9 @@ export class StzhChipselect {
|
|
|
99
99
|
}
|
|
100
100
|
this._dataDropdown = this._data.map((data) => {
|
|
101
101
|
return {
|
|
102
|
-
text:
|
|
102
|
+
text: data.counter
|
|
103
|
+
? `${data.label} (${data.counter})`
|
|
104
|
+
: data.label,
|
|
103
105
|
value: data.value
|
|
104
106
|
};
|
|
105
107
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-chipselect.js","sourceRoot":"","sources":["../../../../src/components/stzh-chipselect/stzh-chipselect.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form ot hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n this._dataDropdown = this._data.map((data) => {\n return {\n text: `${data.label} (${data.counter})`,\n value: data.value\n }\n });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n this.value = data.value;\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n })\n }\n\n private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n this.activeFocusOptionIndex = this._data.findIndex(data => {\n return data.value === this.value;\n });\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n })\n }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n this.value = this._data[activeOptionIndex].value;\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n defaultValue={this.defaultValue}\n />\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable=\"false\"\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size}\n disabled={this.disabled || data.disabled}\n active={this.value === data.value}\n aria-selected={this.value === data.value ? \"true\" : \"false\"}\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown>\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
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AAC,YAAY,EAC/B,YAAY,EAAE,IAAI,CAAC,oBAAoB,GACxB,CACR,CAET,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Host,\n h,\n Element,\n Prop,\n Watch,\n Event,\n EventEmitter,\n State,\n Fragment,\n Listen,\n} from \"@stencil/core\";\n\nimport {\n StzhChipselectItem,\n StzhChipselectChangeEvent,\n StzhDropdownChangeEvent\n} from \"../../index\";\n\nimport { StzhInputDescription } from \"../stzh-input/stzh-input-description\";\n\n// import { hasSlot } from \"../../utils/utils\";\nimport { StzhLocaleComponent } from \"../../utils/translation-utils\";\n\nlet chipselectCounter = 0;\n\n/**\n * @slot - Slot for `stzh-checkbox` elements\n * @slot description - Slot for description\n * @slot description-long - Slot for long description (in popover)\n * @slot description-long-title - Slot for long description title (in popover) / instead of descriptionLongTitle or description property\n * @slot error - Slot for error\n */\n@Component({\n tag: \"stzh-chipselect\",\n styleUrl: \"stzh-chipselect.scss\",\n scoped: true\n})\nexport class StzhChipselect {\n /** Translation strings */\n @Prop() localization: StzhLocaleComponent;\n\n /** The list of chips */\n @Prop() data: string | StzhChipselectItem[] = [];\n private _data: StzhChipselectItem[] = [];\n private _dataDropdown: any[] = [];\n\n /** The name of the input element */\n @Prop({ reflect: true }) name: string;\n\n /** Label */\n @Prop() label: string = \"\";\n\n /** Value */\n @Prop({ mutable: true }) value: string = \"\";\n\n /** Default value (used by reset) */\n @Prop({ mutable: true }) defaultValue: string = \"\";\n\n /** Description message (use description slot as alternative) */\n @Prop() description: string;\n\n /** Long description message appearing in a popover (use description-long slot as alternative) */\n @Prop() descriptionLong: string;\n\n /** Long description title appearing in a popover (use description-long-title slot as or description property alternative) */\n @Prop() descriptionLongTitle: string;\n\n /** One or multiple error message (use error slot as alternative) */\n @Prop() error: string | string[];\n private _error: string[];\n\n /** Invalid status */\n @Prop({ reflect: true }) invalid: boolean = false;\n\n /** Required status */\n @Prop({ reflect: true }) required: boolean = false;\n\n /** Whether all chips are disabled or not */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Hide `(optional)` label (or use `required` inside form ot hide it) */\n @Prop({ reflect: true }) hideOptional: boolean = false;\n\n /** Id for element which describes the input (this will be overwritten if description prop or slot is used, used by stzh-radiogroup) */\n @Prop({ attribute: \"a11y-describedby\" }) a11yDescribedby: string = \"\";\n\n @State() activeFocusOptionIndex: number = 0;\n\n @Element() element: HTMLStzhChipselectElement;\n\n /** Change event */\n @Event() stzhChange: EventEmitter<StzhChipselectChangeEvent>;\n\n @Listen(\"reset\", { target: \"document\" })\n resetListener(event: Event) {\n if ((event.target as HTMLElement).contains(this.element)) {\n requestAnimationFrame(() => {\n this.handleReset();\n });\n }\n }\n\n @Watch(\"data\")\n dataWatcher(newValue: StzhChipselectItem[] | string) {\n if (typeof newValue === \"string\") {\n this._data = JSON.parse(newValue);\n } else {\n this._data = newValue;\n }\n\n this._dataDropdown = this._data.map((data) => {\n return {\n text: data.counter\n ? `${data.label} (${data.counter})`\n : data.label,\n value: data.value\n }\n });\n }\n\n @Watch(\"error\")\n errorWatcher(newValue: string | string[]) {\n if (typeof newValue === \"string\") {\n try {\n this._error = JSON.parse(newValue);\n } catch (e) {\n if (newValue) {\n this._error = [newValue];\n } else {\n this._error = [];\n }\n }\n } else if (newValue) {\n this._error = newValue;\n } else {\n this._error = [];\n }\n }\n\n private id: string;\n private renderPromiseResolve: (value?: unknown) => void;\n\n private waitForNextRender() {\n return new Promise(resolve => this.renderPromiseResolve = resolve);\n }\n\n private handleReset = async () => {\n this.value = this.defaultValue;\n\n // this.stzhChange.emit({\n // component: \"stzh-chipselect\",\n // value: this.value\n // });\n }\n\n private handleChipClick = async (data: StzhChipselectItem, index: number) => {\n this.value = data.value;\n this.activeFocusOptionIndex = index;\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n })\n }\n\n private handleDropdownChange = async (event: CustomEvent<StzhDropdownChangeEvent>) => {\n this.value = Array.isArray(event.detail.value) ? event.detail.value[0] : event.detail.value;\n\n this.activeFocusOptionIndex = this._data.findIndex(data => {\n return data.value === this.value;\n });\n\n await this.waitForNextRender();\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n })\n }\n\n private handleKeydown = (event: KeyboardEvent) => {\n let newActiveIndex: number = null;\n const activeOptionIndex = this.activeFocusOptionIndex;\n\n if (event.key === \"ArrowUp\" || event.key === \"ArrowLeft\") {\n event.preventDefault();\n\n if (activeOptionIndex > 0) {\n newActiveIndex = activeOptionIndex - 1;\n }\n } else if (event.key === \"ArrowDown\" || event.key === \"ArrowRight\") {\n event.preventDefault();\n\n if (activeOptionIndex < this._data.length - 1) {\n newActiveIndex = activeOptionIndex + 1;\n }\n } else if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n this.value = this._data[activeOptionIndex].value;\n\n this.stzhChange.emit({\n component: \"stzh-chipselect\",\n value: this.value\n });\n }\n\n if (newActiveIndex !== null) {\n this.activeFocusOptionIndex = newActiveIndex;\n }\n }\n\n componentDidRender() {\n if (this.renderPromiseResolve) {\n this.renderPromiseResolve();\n }\n }\n\n async componentWillLoad() {\n this.id = `stzh-chipselect-${chipselectCounter++}`;\n\n this.dataWatcher(this.data);\n this.errorWatcher(this.error);\n\n this.defaultValue = this.defaultValue || this.value;\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"chipselect\");\n }\n }\n\n render() {\n const descriptionUsed = !!this.description;\n const descriptionLongUsed = !!this.descriptionLong;\n const errorUsed = !!this.error;\n\n const classes = {\n \"stzh-chipselect\": true,\n \"stzh-chipselect--has-description\": descriptionUsed,\n \"stzh-chipselect--has-description-long\": descriptionLongUsed,\n \"stzh-chipselect--has-error\": errorUsed,\n \"stzh-chipselect--is-invalid\": this.invalid || errorUsed,\n \"stzh-chipselect--is-disabled\": this.disabled,\n \"stzh-chipselect--is-required\": this.required\n };\n\n return (\n <Host is-invalid={this.invalid || errorUsed}>\n <div class={classes}>\n <input\n type=\"hidden\"\n name={this.name}\n value={this.value}\n defaultValue={this.defaultValue}\n />\n\n {this._data.length > 0 &&\n <Fragment>\n <div\n class=\"stzh-chipselect__chips\"\n role=\"listbox\"\n tabindex=\"0\"\n aria-multiselectable=\"false\"\n aria-activedescendant={`${this.id}-option-${this.activeFocusOptionIndex}`}\n aria-describedby={`${this.id}-description ${this.a11yDescribedby}`}\n onKeyDown={this.handleKeydown}\n >\n {this._data.map((data, index) => (\n <stzh-chip\n role=\"option\"\n class={{\n \"stzh-chipselect__chip\": true,\n \"is-focused\": this.activeFocusOptionIndex === index\n }}\n label={data.label}\n counter={data.counter}\n icon={data.icon}\n type={data.type}\n inverted={data.inverted}\n variant={data.variant}\n size={data.size}\n disabled={this.disabled || data.disabled}\n active={this.value === data.value}\n aria-selected={this.value === data.value ? \"true\" : \"false\"}\n id={`${this.id}-option-${index}`}\n a11yTabindex=\"-1\"\n onClick={() => this.handleChipClick(data, index)}\n ></stzh-chip>\n ))}\n </div>\n\n <StzhInputDescription\n classPrefix=\"stzh-chipselect\"\n id={`${this.id}-description`}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n descriptionLongTitle={this.descriptionLongTitle}\n descriptionLongUsed={descriptionLongUsed}\n moreInfoButtonLabel={this.localization.$globals.moreInfoButtonLabel}\n />\n\n <stzh-dropdown\n class=\"stzh-chipselect__dropdown\"\n disabled={this.disabled}\n error={this._error}\n description={this.description}\n descriptionLong={this.descriptionLong}\n required={this.required}\n invalid={this.invalid}\n items={[this.value]}\n label={this.label}\n options={this._dataDropdown}\n hideOptional={this.hideOptional}\n onStzhChange={this.handleDropdownChange}\n ></stzh-dropdown>\n </Fragment>\n }\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -167,9 +167,6 @@
|
|
|
167
167
|
@media screen and (min-width: 1260px) {
|
|
168
168
|
:host {
|
|
169
169
|
--grid-template-areas: var(--stzh-content-grid-template-areas, "aside-left aside-left content content content content content content content content aside-right aside-right");
|
|
170
|
-
--stzh-content-grid-template-areas: "content content content content content content content content content content content content";
|
|
171
|
-
--stzh-content-shifted-grid-template-areas: "content content content content content content content content content content content content";
|
|
172
|
-
--stzh-content-full-grid-template-areas: "content content content content content content content content content content content content";
|
|
173
170
|
}
|
|
174
171
|
}
|
|
175
172
|
@media screen and (min-width: 1260px) {
|
|
@@ -389,6 +386,9 @@
|
|
|
389
386
|
}
|
|
390
387
|
|
|
391
388
|
.stzh-content {
|
|
389
|
+
--stzh-content-grid-template-areas: "content content content content content content content content content content content content";
|
|
390
|
+
--stzh-content-shifted-grid-template-areas: "content content content content content content content content content content content content";
|
|
391
|
+
--stzh-content-full-grid-template-areas: "content content content content content content content content content content content content";
|
|
392
392
|
-moz-column-gap: var(--stzh-grid-gutter);
|
|
393
393
|
column-gap: var(--stzh-grid-gutter);
|
|
394
394
|
display: grid;
|
|
@@ -724,6 +724,42 @@ stzh-cspace > .stzh-cspace > .section > stzh-card, stzh-cspace > .stzh-cspace >
|
|
|
724
724
|
margin-bottom: var(--stzh-space-xxlarge);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments, stzh-cspace > .stzh-cspace > stzh-appointments {
|
|
728
|
+
margin-bottom: var(--stzh-space-xxlarge);
|
|
729
|
+
}
|
|
730
|
+
@media screen and (min-width: 600px) {
|
|
731
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments, stzh-cspace > .stzh-cspace > stzh-appointments {
|
|
732
|
+
margin-bottom: var(--stzh-space-xxxxlarge);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
@media screen and (min-width: 900px) {
|
|
736
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments, stzh-cspace > .stzh-cspace > stzh-appointments {
|
|
737
|
+
margin-bottom: var(--stzh-space-xxxxlarge);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
@media screen and (min-width: 1260px) {
|
|
741
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments, stzh-cspace > .stzh-cspace > stzh-appointments {
|
|
742
|
+
margin-bottom: var(--stzh-space-xbig);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments[has-heading], stzh-cspace > .stzh-cspace > stzh-appointments[has-heading] {
|
|
746
|
+
margin-top: var(--stzh-space-medium);
|
|
747
|
+
}
|
|
748
|
+
@media screen and (min-width: 600px) {
|
|
749
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments[has-heading], stzh-cspace > .stzh-cspace > stzh-appointments[has-heading] {
|
|
750
|
+
margin-top: var(--stzh-space-large);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
@media screen and (min-width: 900px) {
|
|
754
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments[has-heading], stzh-cspace > .stzh-cspace > stzh-appointments[has-heading] {
|
|
755
|
+
margin-top: var(--stzh-space-xlarge);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
@media screen and (min-width: 1260px) {
|
|
759
|
+
stzh-cspace > .stzh-cspace > .section > stzh-appointments[has-heading], stzh-cspace > .stzh-cspace > stzh-appointments[has-heading] {
|
|
760
|
+
margin-top: var(--stzh-space-xxlarge);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
727
763
|
stzh-cspace > .stzh-cspace > .section > stzh-table, stzh-cspace > .stzh-cspace > stzh-table, stzh-cspace > .stzh-cspace > .section > stzh-datatable, stzh-cspace > .stzh-cspace > stzh-datatable {
|
|
728
764
|
margin-top: var(--stzh-space-medium);
|
|
729
765
|
margin-bottom: var(--stzh-space-xxlarge);
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
--stzh-flyingfocus-color: var(--stzh-color-white);
|
|
161
161
|
--background-color: var(--stzh-cta-background-color);
|
|
162
162
|
--heading-color: var(--stzh-color-primary70);
|
|
163
|
-
--lead-color: var(--stzh-color-
|
|
163
|
+
--lead-color: var(--stzh-color-primary70);
|
|
164
164
|
--sticky-background-color: var(--background-color);
|
|
165
165
|
--button-color: var(--stzh-color-white);
|
|
166
166
|
--button-background-color: var(--stzh-color-primary70);
|
|
@@ -370,49 +370,29 @@
|
|
|
370
370
|
color: var(--stuck-heading-color);
|
|
371
371
|
}
|
|
372
372
|
.stzh-cta__lead {
|
|
373
|
-
font-size: var(--stzh-font-curve-
|
|
374
|
-
line-height: var(--stzh-font-curve-
|
|
373
|
+
font-size: var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));
|
|
374
|
+
line-height: var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));
|
|
375
|
+
letter-spacing: var(--stzh-font-curve-p1-default-text-letter-spacing);
|
|
375
376
|
color: var(--lead-color);
|
|
376
377
|
}
|
|
377
378
|
@media screen and (min-width: 900px) {
|
|
378
379
|
.stzh-cta__lead {
|
|
379
|
-
font-size: var(--stzh-font-curve-
|
|
380
|
-
line-height: var(--stzh-font-curve-
|
|
381
|
-
letter-spacing: var(--stzh-font-curve-
|
|
380
|
+
font-size: var(--stzh-font-curve-p1-medium-font-size, var(--stzh-font-centi-font-size));
|
|
381
|
+
line-height: var(--stzh-font-curve-p1-medium-text-line-height, var(--stzh-font-centi-text-line-height));
|
|
382
|
+
letter-spacing: var(--stzh-font-curve-p1-medium-text-letter-spacing);
|
|
382
383
|
}
|
|
383
384
|
}
|
|
384
385
|
.stzh-cta__lead:not(:empty) {
|
|
385
|
-
padding-top: var(--stzh-space-
|
|
386
|
-
padding-bottom: var(--stzh-space-medium);
|
|
387
|
-
}
|
|
388
|
-
@media screen and (min-width: 600px) {
|
|
389
|
-
.stzh-cta__lead:not(:empty) {
|
|
390
|
-
padding-top: var(--stzh-space-large);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
@media screen and (min-width: 900px) {
|
|
394
|
-
.stzh-cta__lead:not(:empty) {
|
|
395
|
-
padding-top: var(--stzh-space-xlarge);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
@media screen and (min-width: 1260px) {
|
|
399
|
-
.stzh-cta__lead:not(:empty) {
|
|
400
|
-
padding-top: var(--stzh-space-xxlarge);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
@media screen and (min-width: 600px) {
|
|
404
|
-
.stzh-cta__lead:not(:empty) {
|
|
405
|
-
padding-bottom: var(--stzh-space-large);
|
|
406
|
-
}
|
|
386
|
+
padding-top: var(--stzh-space-small);
|
|
407
387
|
}
|
|
408
388
|
@media screen and (min-width: 900px) {
|
|
409
389
|
.stzh-cta__lead:not(:empty) {
|
|
410
|
-
padding-
|
|
390
|
+
padding-top: var(--stzh-space-medium);
|
|
411
391
|
}
|
|
412
392
|
}
|
|
413
393
|
@media screen and (min-width: 1260px) {
|
|
414
394
|
.stzh-cta__lead:not(:empty) {
|
|
415
|
-
padding-
|
|
395
|
+
padding-top: var(--stzh-space-large);
|
|
416
396
|
}
|
|
417
397
|
}
|
|
418
398
|
.stzh-cta__wrapper:has(.stzh-cta__sticky[is-stuck]:not([is-stuck=false])) .stzh-cta__lead {
|
|
@@ -510,25 +490,31 @@
|
|
|
510
490
|
margin-bottom: 0;
|
|
511
491
|
}
|
|
512
492
|
.stzh-cta--size-default .stzh-cta__wrapper {
|
|
513
|
-
padding-top: var(--stzh-space-
|
|
514
|
-
padding-bottom: var(--stzh-space-
|
|
493
|
+
padding-top: var(--stzh-space-large);
|
|
494
|
+
padding-bottom: var(--stzh-space-large);
|
|
515
495
|
}
|
|
516
|
-
@media screen and (min-width:
|
|
496
|
+
@media screen and (min-width: 600px) {
|
|
497
|
+
.stzh-cta--size-default .stzh-cta__wrapper {
|
|
498
|
+
padding-top: var(--stzh-space-xxlarge);
|
|
499
|
+
padding-bottom: var(--stzh-space-xxlarge);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
@media screen and (min-width: 600px) and (min-width: 900px) {
|
|
517
503
|
.stzh-cta--size-default .stzh-cta__wrapper {
|
|
518
504
|
padding-top: var(--stzh-space-xxxlarge);
|
|
519
505
|
}
|
|
520
506
|
}
|
|
521
|
-
@media screen and (min-width: 1260px) {
|
|
507
|
+
@media screen and (min-width: 600px) and (min-width: 1260px) {
|
|
522
508
|
.stzh-cta--size-default .stzh-cta__wrapper {
|
|
523
509
|
padding-top: var(--stzh-space-xxxxlarge);
|
|
524
510
|
}
|
|
525
511
|
}
|
|
526
|
-
@media screen and (min-width: 900px) {
|
|
512
|
+
@media screen and (min-width: 600px) and (min-width: 900px) {
|
|
527
513
|
.stzh-cta--size-default .stzh-cta__wrapper {
|
|
528
514
|
padding-bottom: var(--stzh-space-xxxlarge);
|
|
529
515
|
}
|
|
530
516
|
}
|
|
531
|
-
@media screen and (min-width: 1260px) {
|
|
517
|
+
@media screen and (min-width: 600px) and (min-width: 1260px) {
|
|
532
518
|
.stzh-cta--size-default .stzh-cta__wrapper {
|
|
533
519
|
padding-bottom: var(--stzh-space-xxxxlarge);
|
|
534
520
|
}
|
|
@@ -165,9 +165,4 @@
|
|
|
165
165
|
margin-left: calc((100vw - 100% - var(--stzh-scrollbar-width, 0px)) / -2);
|
|
166
166
|
margin-right: calc((100vw - 100% - var(--stzh-scrollbar-width, 0px)) / -2);
|
|
167
167
|
}
|
|
168
|
-
}
|
|
169
|
-
@media screen and (min-width: 600px) {
|
|
170
|
-
.stzh-datamessagelist {
|
|
171
|
-
border: 0.0625rem solid var(--stzh-base-border-color);
|
|
172
|
-
}
|
|
173
168
|
}
|
|
@@ -70,6 +70,32 @@ const TEMPLATE = `
|
|
|
70
70
|
]'
|
|
71
71
|
></stzh-datamessagelist-item>
|
|
72
72
|
|
|
73
|
+
<stzh-datamessagelist-item
|
|
74
|
+
non-interactive
|
|
75
|
+
heading="Lorem ipsum dolor (non interactive)"
|
|
76
|
+
description="Laboris laborum aute id laboris culpa esse aliquip nisi anim velit. Minim sunt eiusmod do laborum amet ut magna. Labore dolore id nostrud enim Lorem pariatur ad dolore id eiusmod adipisicing laboris laborum minim."
|
|
77
|
+
meta='[
|
|
78
|
+
{
|
|
79
|
+
"label": "Publish Date",
|
|
80
|
+
"value": "17.02.2022"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"label": "Creator",
|
|
84
|
+
"value": "John Smith"
|
|
85
|
+
}
|
|
86
|
+
]'
|
|
87
|
+
tags='[
|
|
88
|
+
{
|
|
89
|
+
"icon": "lock",
|
|
90
|
+
"label": "Protected"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"icon": "paper-clip",
|
|
94
|
+
"label": "2 Attachments"
|
|
95
|
+
}
|
|
96
|
+
]'
|
|
97
|
+
></stzh-datamessagelist-item>
|
|
98
|
+
|
|
73
99
|
<stzh-datamessagelist-item
|
|
74
100
|
heading="Lorem ipsum dolor"
|
|
75
101
|
href="#message3"
|
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
position: relative;
|
|
164
164
|
padding: var(--stzh-space-medium);
|
|
165
165
|
background-color: var(--stzh-color-white);
|
|
166
|
+
/* Is interactive variant */
|
|
166
167
|
/* Unread variant */
|
|
167
168
|
}
|
|
168
169
|
@media screen and (min-width: 900px) {
|
|
@@ -190,12 +191,6 @@
|
|
|
190
191
|
padding-right: var(--stzh-space-xxlarge);
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
|
-
.stzh-datamessagelist-item:hover .stzh-datamessagelist-item__action.is-non-interactive {
|
|
194
|
-
color: var(--stzh-color-primary-hover);
|
|
195
|
-
}
|
|
196
|
-
.stzh-datamessagelist-item:hover .stzh-datamessagelist-item__action-popover-button {
|
|
197
|
-
--color: var(--stzh-color-primary-hover);
|
|
198
|
-
}
|
|
199
194
|
.stzh-datamessagelist-item__vhidden {
|
|
200
195
|
border: 0;
|
|
201
196
|
clip: rect(0 0 0 0);
|
|
@@ -253,14 +248,20 @@
|
|
|
253
248
|
}
|
|
254
249
|
}
|
|
255
250
|
.stzh-datamessagelist-item__heading-link {
|
|
251
|
+
font-family: inherit;
|
|
252
|
+
font-size: inherit;
|
|
253
|
+
font-weight: inherit;
|
|
256
254
|
color: inherit;
|
|
257
255
|
-webkit-text-decoration-line: none;
|
|
258
256
|
text-decoration-line: none;
|
|
259
257
|
transition: color var(--stzh-base-transition-animation-speed);
|
|
260
258
|
border-radius: var(--stzh-button-border-radius);
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
color:
|
|
259
|
+
padding: 0;
|
|
260
|
+
border: none;
|
|
261
|
+
background-color: transparent;
|
|
262
|
+
-webkit-appearance: none;
|
|
263
|
+
-moz-appearance: none;
|
|
264
|
+
appearance: none;
|
|
264
265
|
}
|
|
265
266
|
.stzh-datamessagelist-item__heading-link::before, .stzh-datamessagelist-item__heading-link::after {
|
|
266
267
|
content: "";
|
|
@@ -277,9 +278,6 @@
|
|
|
277
278
|
.stzh-datamessagelist-item__heading-link::after {
|
|
278
279
|
z-index: 1;
|
|
279
280
|
}
|
|
280
|
-
.stzh-datamessagelist-item__heading-link:hover::before, .stzh-datamessagelist-item__heading-link:focus::before {
|
|
281
|
-
background-color: var(--stzh-color-old-primary4);
|
|
282
|
-
}
|
|
283
281
|
.stzh-datamessagelist-item__description {
|
|
284
282
|
font-size: var(--stzh-font-curve-p1-default-font-size, var(--stzh-font-milli-font-size));
|
|
285
283
|
line-height: var(--stzh-font-curve-p1-default-text-line-height, var(--stzh-font-milli-text-line-height));
|
|
@@ -411,15 +409,27 @@
|
|
|
411
409
|
position: relative;
|
|
412
410
|
z-index: 2;
|
|
413
411
|
}
|
|
414
|
-
.stzh-datamessagelist-item--is-
|
|
415
|
-
color: var(--stzh-color-primary);
|
|
412
|
+
.stzh-datamessagelist-item--is-interactive:hover .stzh-datamessagelist-item__action.is-non-interactive {
|
|
413
|
+
color: var(--stzh-color-primary-hover);
|
|
414
|
+
}
|
|
415
|
+
.stzh-datamessagelist-item--is-interactive:hover .stzh-datamessagelist-item__action-popover-button {
|
|
416
|
+
--color: var(--stzh-color-primary-hover);
|
|
416
417
|
}
|
|
417
|
-
.stzh-datamessagelist-item--is-
|
|
418
|
+
.stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:hover, .stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:focus {
|
|
418
419
|
color: var(--stzh-color-primary-hover);
|
|
419
420
|
}
|
|
421
|
+
.stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:hover::before, .stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:focus::before {
|
|
422
|
+
background-color: var(--stzh-color-old-primary4);
|
|
423
|
+
}
|
|
424
|
+
.stzh-datamessagelist-item--is-unread .stzh-datamessagelist-item__heading-link {
|
|
425
|
+
color: var(--stzh-color-primary);
|
|
426
|
+
}
|
|
420
427
|
.stzh-datamessagelist-item--is-unread .stzh-datamessagelist-item__heading-link::before {
|
|
421
428
|
border-left: 0.3125rem solid var(--stzh-color-primary);
|
|
422
429
|
}
|
|
423
|
-
.stzh-datamessagelist-item--is-unread .stzh-datamessagelist-item__heading-link:hover
|
|
430
|
+
.stzh-datamessagelist-item--is-unread.stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:hover, .stzh-datamessagelist-item--is-unread.stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:focus {
|
|
431
|
+
color: var(--stzh-color-primary-hover);
|
|
432
|
+
}
|
|
433
|
+
.stzh-datamessagelist-item--is-unread.stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:hover::before, .stzh-datamessagelist-item--is-unread.stzh-datamessagelist-item--is-interactive .stzh-datamessagelist-item__heading-link:focus::before {
|
|
424
434
|
border-left-color: var(--stzh-color-primary-hover);
|
|
425
435
|
}
|
|
@@ -24,6 +24,7 @@ export class StzhDatamessagelistItem {
|
|
|
24
24
|
this.target = undefined;
|
|
25
25
|
this.description = "";
|
|
26
26
|
this.icon = undefined;
|
|
27
|
+
this.nonInteractive = false;
|
|
27
28
|
this.loadingStatus = undefined;
|
|
28
29
|
this.meta = undefined;
|
|
29
30
|
this.actions = undefined;
|
|
@@ -79,9 +80,12 @@ export class StzhDatamessagelistItem {
|
|
|
79
80
|
render() {
|
|
80
81
|
const classes = {
|
|
81
82
|
"stzh-datamessagelist-item": true,
|
|
82
|
-
"stzh-datamessagelist-item--is-unread": this.unread
|
|
83
|
+
"stzh-datamessagelist-item--is-unread": this.unread,
|
|
84
|
+
"stzh-datamessagelist-item--is-interactive": !this.nonInteractive,
|
|
83
85
|
};
|
|
84
|
-
|
|
86
|
+
const HeadingLink = this.nonInteractive ? "div" :
|
|
87
|
+
this.href ? "a" : "button";
|
|
88
|
+
return (h(Host, { role: "listitem" }, h("article", { class: classes }, h("div", { class: "stzh-datamessagelist-item__content" }, h("div", { class: "stzh-datamessagelist-item__text" }, h("h3", { class: "stzh-datamessagelist-item__heading" }, h(HeadingLink, { class: "stzh-datamessagelist-item__heading-link", href: this.href, rel: this.rel, target: this.target, onClick: this.itemClick, "s-object-id": this.analyticsId || this.heading }, this.unread &&
|
|
85
89
|
h("span", { class: "stzh-datamessagelist-item__vhidden" }, this.localization.unread, ","), this.heading)), this.description &&
|
|
86
90
|
h("div", { class: "stzh-datamessagelist-item__description" }, h("stzh-clamp", { lines: 2, linesMedium: 1 }, this.description)), this._meta && this._meta.length > 0 &&
|
|
87
91
|
h("div", { class: "stzh-datamessagelist-item__meta-wrapper" }, h("ul", { class: "stzh-datamessagelist-item__meta" }, this._meta.map((meta) => h("li", { class: "stzh-datamessagelist-item__meta-item" }, h("span", { class: "stzh-datamessagelist-item__meta-item-label" }, meta.label), h("span", { class: "stzh-datamessagelist-item__meta-item-value" }, meta.value)))))), this._loadingStatus &&
|
|
@@ -89,7 +93,8 @@ export class StzhDatamessagelistItem {
|
|
|
89
93
|
h("div", { class: "stzh-datamessagelist-item__tags-wrapper" }, h("div", { class: "stzh-datamessagelist-item__tags" }, this._tags.map((tag) => h("stzh-chip", { class: "stzh-datamessagelist-item__tag", variant: "tag", size: "small", nonInteractive: true, inverted: tag.inverted, type: tag.type, icon: tag.icon, label: tag.label }))))), h("div", { class: "stzh-datamessagelist-item__actions" }, (this._actions && this._actions.length > 0) ?
|
|
90
94
|
h("stzh-popover", { label: this.localization.actionsPopoverLabel, placement: "bottom-end", class: "stzh-datamessagelist-item__action-popover" }, h("stzh-button", { class: "stzh-datamessagelist-item__action-popover-button", variant: "tertiary", size: "tiny", icon: "more-horizontal", iconOnly: true }), h("stzh-menu", { slot: "content" }, this._actions.map((action) => h("stzh-menu-item", { icon: action.icon, badge: action.badge, onClick: (event) => { this.actionClick(action, event); } }, action.label))))
|
|
91
95
|
:
|
|
92
|
-
|
|
96
|
+
(!this.nonInteractive &&
|
|
97
|
+
h("div", { class: "stzh-datamessagelist-item__action is-non-interactive" }, h("stzh-icon", { class: "stzh-datamessagelist-item__action-icon", name: this.icon ? this.icon : (this.external ? "external-link" : "arrow-right") })))))));
|
|
93
98
|
}
|
|
94
99
|
static get is() { return "stzh-datamessagelist-item"; }
|
|
95
100
|
static get encapsulation() { return "scoped"; }
|
|
@@ -249,6 +254,24 @@ export class StzhDatamessagelistItem {
|
|
|
249
254
|
"attribute": "icon",
|
|
250
255
|
"reflect": false
|
|
251
256
|
},
|
|
257
|
+
"nonInteractive": {
|
|
258
|
+
"type": "boolean",
|
|
259
|
+
"mutable": false,
|
|
260
|
+
"complexType": {
|
|
261
|
+
"original": "boolean",
|
|
262
|
+
"resolved": "boolean",
|
|
263
|
+
"references": {}
|
|
264
|
+
},
|
|
265
|
+
"required": false,
|
|
266
|
+
"optional": false,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [],
|
|
269
|
+
"text": "Whether item is not interactive (arrow icon and hover effect will disappear)"
|
|
270
|
+
},
|
|
271
|
+
"attribute": "non-interactive",
|
|
272
|
+
"reflect": true,
|
|
273
|
+
"defaultValue": "false"
|
|
274
|
+
},
|
|
252
275
|
"loadingStatus": {
|
|
253
276
|
"type": "string",
|
|
254
277
|
"mutable": false,
|
package/dist/collection/components/stzh-datamessagelist-item/stzh-datamessagelist-item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stzh-datamessagelist-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-datamessagelist-item/stzh-datamessagelist-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EAEL,KAAK,EACN,MAAM,eAAe,CAAC;AAavB;GACG;AAMH,MAAM,OAAO,uBAAuB;;IAoG1B,gBAAW,GAAG,CAAC,MAA0C,EAAE,aAAyB,EAAE,EAAE;MAC9F,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,SAAS,EAAE,2BAA2B;QACtC,MAAM;QACN,aAAa;OACd,CAAC,CAAC;IACL,CAAC,CAAA;IAEO,cAAS,GAAG,CAAC,aAAyB,EAAE,EAAE;MAChD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAClB,SAAS,EAAE,2BAA2B;QACtC,aAAa;OACd,CAAC,CAAC;IACL,CAAC,CAAA;;mBA5GyB,EAAE;kBAGF,KAAK;gBAGR,EAAE;;;uBASK,EAAE;;;;;;;oBA6BH,KAAK;;EAWlC,eAAe;IACb,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAA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,iBAAW,IAAI,EAAC,SAAS,IACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC5B,sBACE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA,CAAC,CAAC,IAEtD,MAAM,CAAC,KAAK,CACE,CAClB,CACS,CACC;UACf,CAAC;YACD,WAAK,KAAK,EAAC,sDAAsD;cAC/D,iBAAW,KAAK,EAAC,wCAAwC,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,GAAc,CACnJ,CAEJ,CAEE,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 State\n} from \"@stencil/core\";\n\nimport {\n StzhDatamessagelistItemEntryLoadingStatus,\n StzhDatamessagelistItemEntryMeta,\n StzhDatamessagelistItemEntryAction,\n StzhDatamessagelistItemEntryTag,\n StzhDatamessagelistItemClickEvent,\n StzhDatamessagelistItemActionClickEvent\n} from \"../../index\";\n\nimport { StzhDatamessagelistItemLocalizedText } from './stzh-datamessagelist-item.localization';\n\n/**\n */\n@Component({\n tag: \"stzh-datamessagelist-item\",\n styleUrl: \"stzh-datamessagelist-item.scss\",\n scoped: true\n})\nexport class StzhDatamessagelistItem {\n /** Translation strings */\n @Prop() localization: StzhDatamessagelistItemLocalizedText;\n\n /** Heading */\n @Prop() heading: string = \"\";\n\n /** Whether item should be displayed in unread state */\n @Prop() unread: boolean = false;\n\n /** URL the item should link to */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** Target (if href is used) */\n @Prop() target: string;\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Icon (`arrow-right` by default or `external-link` if rel=\"*external*\" is used) */\n @Prop() icon: string;\n\n /** Loading status */\n @Prop() loadingStatus: StzhDatamessagelistItemEntryLoadingStatus | string;\n private _loadingStatus: StzhDatamessagelistItemEntryLoadingStatus;\n\n /** Meta */\n @Prop() meta: StzhDatamessagelistItemEntryMeta[] | string;\n private _meta: StzhDatamessagelistItemEntryMeta[];\n\n /** Actions */\n @Prop() actions: StzhDatamessagelistItemEntryAction[] | string;\n private _actions: StzhDatamessagelistItemEntryAction[];\n\n /** Tags */\n @Prop() tags: StzhDatamessagelistItemEntryTag[] | string;\n private _tags: StzhDatamessagelistItemEntryTag[];\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link element.\n * Default value will be taken from `heading` prop.\n */\n @Prop() analyticsId: string;\n\n /** Whether rel contains external */\n @State() external: boolean = false;\n\n @Element() element: HTMLStzhDatamessagelistItemElement;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhDatamessagelistItemClickEvent>;\n\n /** Action click event */\n @Event() stzhActionClick: EventEmitter<StzhDatamessagelistItemActionClickEvent>;\n\n @Watch(\"rel\")\n externalWatcher() {\n this.external = this.rel && this.rel.includes(\"external\");\n }\n\n @Watch(\"loadingStatus\")\n loadingStatusWatcher(newValue: StzhDatamessagelistItemEntryLoadingStatus | string) {\n if (typeof newValue === \"string\") {\n this._loadingStatus = JSON.parse(newValue);\n } else {\n this._loadingStatus = newValue;\n }\n }\n\n @Watch(\"meta\")\n metaWatcher(newValue: StzhDatamessagelistItemEntryMeta[] | string) {\n if (typeof newValue === \"string\") {\n this._meta = JSON.parse(newValue);\n } else {\n this._meta = newValue;\n }\n }\n\n @Watch(\"actions\")\n actionsWatcher(newValue: StzhDatamessagelistItemEntryAction[] | string) {\n if (typeof newValue === \"string\") {\n this._actions = JSON.parse(newValue);\n } else {\n this._actions = newValue;\n }\n }\n\n @Watch(\"tags\")\n tagsWatcher(newValue: StzhDatamessagelistItemEntryTag[] | string) {\n if (typeof newValue === \"string\") {\n this._tags = JSON.parse(newValue);\n } else {\n this._tags = newValue;\n }\n }\n\n private actionClick = (action: StzhDatamessagelistItemEntryAction, originalEvent: MouseEvent) => {\n this.stzhActionClick.emit({\n component: \"stzh-datamessagelist-item\",\n action,\n originalEvent\n });\n }\n\n private itemClick = (originalEvent: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-datamessagelist-item\",\n originalEvent\n });\n }\n\n async componentWillLoad() {\n this.loadingStatusWatcher(this.loadingStatus);\n this.metaWatcher(this.meta);\n this.actionsWatcher(this.actions);\n this.tagsWatcher(this.tags);\n this.externalWatcher();\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"datamessagelist-item\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-datamessagelist-item\": true,\n \"stzh-datamessagelist-item--is-unread\": this.unread\n };\n\n return (\n <Host role=\"listitem\">\n <article class={classes}>\n <div class=\"stzh-datamessagelist-item__content\">\n <div class=\"stzh-datamessagelist-item__text\">\n <h3 class=\"stzh-datamessagelist-item__heading\">\n <a\n class=\"stzh-datamessagelist-item__heading-link\"\n href={this.href}\n rel={this.rel}\n target={this.target}\n onClick={this.itemClick}\n s-object-id={this.analyticsId || this.heading}\n >\n {this.unread &&\n <span class=\"stzh-datamessagelist-item__vhidden\">\n {this.localization.unread},\n </span>\n }\n {this.heading}\n </a>\n </h3>\n\n {this.description &&\n <div class=\"stzh-datamessagelist-item__description\">\n <stzh-clamp lines={2} linesMedium={1}>\n {this.description}\n </stzh-clamp>\n </div>\n }\n\n {this._meta && this._meta.length > 0 &&\n <div class=\"stzh-datamessagelist-item__meta-wrapper\">\n <ul class=\"stzh-datamessagelist-item__meta\">\n {this._meta.map((meta) =>\n <li class=\"stzh-datamessagelist-item__meta-item\">\n <span class=\"stzh-datamessagelist-item__meta-item-label\">{meta.label}</span>\n <span class=\"stzh-datamessagelist-item__meta-item-value\">{meta.value}</span>\n </li>\n )}\n </ul>\n </div>\n }\n </div>\n\n {this._loadingStatus &&\n <stzh-status\n class=\"stzh-datamessagelist-item__status\"\n label={this._loadingStatus.label}\n percent={this._loadingStatus.percent}\n type={this._loadingStatus.type}\n withLoadingbar={true}\n ></stzh-status>\n }\n\n {this._tags && this._tags.length > 0 &&\n <div class=\"stzh-datamessagelist-item__tags-wrapper\">\n <div class=\"stzh-datamessagelist-item__tags\">\n {this._tags.map((tag) =>\n <stzh-chip\n class=\"stzh-datamessagelist-item__tag\"\n variant=\"tag\"\n size=\"small\"\n nonInteractive={true}\n inverted={tag.inverted}\n type={tag.type}\n icon={tag.icon}\n label={tag.label}\n ></stzh-chip>\n )}\n </div>\n </div>\n }\n </div>\n\n <div class=\"stzh-datamessagelist-item__actions\">\n {(this._actions && this._actions.length > 0) ?\n <stzh-popover\n label={this.localization.actionsPopoverLabel}\n placement=\"bottom-end\"\n class=\"stzh-datamessagelist-item__action-popover\"\n >\n <stzh-button\n class=\"stzh-datamessagelist-item__action-popover-button\"\n variant=\"tertiary\"\n size=\"tiny\"\n icon=\"more-horizontal\"\n iconOnly={true}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this._actions.map((action) =>\n <stzh-menu-item\n icon={action.icon}\n badge={action.badge}\n onClick={(event) => { this.actionClick(action, event) }}\n >\n {action.label}\n </stzh-menu-item>\n )}\n </stzh-menu>\n </stzh-popover>\n :\n <div class=\"stzh-datamessagelist-item__action is-non-interactive\">\n <stzh-icon class=\"stzh-datamessagelist-item__action-icon\" name={this.icon ? this.icon : (this.external ? \"external-link\" : \"arrow-right\")}></stzh-icon>\n </div>\n }\n </div>\n\n </article>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"stzh-datamessagelist-item.js","sourceRoot":"","sources":["../../../../src/components/stzh-datamessagelist-item/stzh-datamessagelist-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EAEL,KAAK,EACN,MAAM,eAAe,CAAC;AAavB;GACG;AAMH,MAAM,OAAO,uBAAuB;;IAuG1B,gBAAW,GAAG,CAAC,MAA0C,EAAE,aAAyB,EAAE,EAAE;MAC9F,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACxB,SAAS,EAAE,2BAA2B;QACtC,MAAM;QACN,aAAa;OACd,CAAC,CAAC;IACL,CAAC,CAAA;IAEO,cAAS,GAAG,CAAC,aAAyB,EAAE,EAAE;MAChD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;QAClB,SAAS,EAAE,2BAA2B;QACtC,aAAa;OACd,CAAC,CAAC;IACL,CAAC,CAAA;;mBA/GyB,EAAE;kBAGF,KAAK;gBAGR,EAAE;;;uBASK,EAAE;;0BAMmB,KAAK;;;;;;oBA0B3B,KAAK;;EAWlC,eAAe;IACb,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;EAC5D,CAAC;EAGD,oBAAoB,CAAC,QAA4D;IAC/E,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;MAChC,IAAI,CAAC,cAAc,GA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n EventEmitter,\n State\n} from \"@stencil/core\";\n\nimport {\n StzhDatamessagelistItemEntryLoadingStatus,\n StzhDatamessagelistItemEntryMeta,\n StzhDatamessagelistItemEntryAction,\n StzhDatamessagelistItemEntryTag,\n StzhDatamessagelistItemClickEvent,\n StzhDatamessagelistItemActionClickEvent\n} from \"../../index\";\n\nimport { StzhDatamessagelistItemLocalizedText } from './stzh-datamessagelist-item.localization';\n\n/**\n */\n@Component({\n tag: \"stzh-datamessagelist-item\",\n styleUrl: \"stzh-datamessagelist-item.scss\",\n scoped: true\n})\nexport class StzhDatamessagelistItem {\n /** Translation strings */\n @Prop() localization: StzhDatamessagelistItemLocalizedText;\n\n /** Heading */\n @Prop() heading: string = \"\";\n\n /** Whether item should be displayed in unread state */\n @Prop() unread: boolean = false;\n\n /** URL the item should link to */\n @Prop() href: string = \"\";\n\n /** Rel (if href is used) */\n @Prop() rel: string;\n\n /** Target (if href is used) */\n @Prop() target: string;\n\n /** Description */\n @Prop() description: string = \"\";\n\n /** Icon (`arrow-right` by default or `external-link` if rel=\"*external*\" is used) */\n @Prop() icon: string;\n\n /** Whether item is not interactive (arrow icon and hover effect will disappear) */\n @Prop({ reflect: true }) nonInteractive: boolean = false;\n\n /** Loading status */\n @Prop() loadingStatus: StzhDatamessagelistItemEntryLoadingStatus | string;\n private _loadingStatus: StzhDatamessagelistItemEntryLoadingStatus;\n\n /** Meta */\n @Prop() meta: StzhDatamessagelistItemEntryMeta[] | string;\n private _meta: StzhDatamessagelistItemEntryMeta[];\n\n /** Actions */\n @Prop() actions: StzhDatamessagelistItemEntryAction[] | string;\n private _actions: StzhDatamessagelistItemEntryAction[];\n\n /** Tags */\n @Prop() tags: StzhDatamessagelistItemEntryTag[] | string;\n private _tags: StzhDatamessagelistItemEntryTag[];\n\n /**\n * For Adobe Analytics.\n * Will be rendered as value of `s-object-id` attribute to the link element.\n * Default value will be taken from `heading` prop.\n */\n @Prop() analyticsId: string;\n\n /** Whether rel contains external */\n @State() external: boolean = false;\n\n @Element() element: HTMLStzhDatamessagelistItemElement;\n\n /** Click event */\n @Event() stzhClick: EventEmitter<StzhDatamessagelistItemClickEvent>;\n\n /** Action click event */\n @Event() stzhActionClick: EventEmitter<StzhDatamessagelistItemActionClickEvent>;\n\n @Watch(\"rel\")\n externalWatcher() {\n this.external = this.rel && this.rel.includes(\"external\");\n }\n\n @Watch(\"loadingStatus\")\n loadingStatusWatcher(newValue: StzhDatamessagelistItemEntryLoadingStatus | string) {\n if (typeof newValue === \"string\") {\n this._loadingStatus = JSON.parse(newValue);\n } else {\n this._loadingStatus = newValue;\n }\n }\n\n @Watch(\"meta\")\n metaWatcher(newValue: StzhDatamessagelistItemEntryMeta[] | string) {\n if (typeof newValue === \"string\") {\n this._meta = JSON.parse(newValue);\n } else {\n this._meta = newValue;\n }\n }\n\n @Watch(\"actions\")\n actionsWatcher(newValue: StzhDatamessagelistItemEntryAction[] | string) {\n if (typeof newValue === \"string\") {\n this._actions = JSON.parse(newValue);\n } else {\n this._actions = newValue;\n }\n }\n\n @Watch(\"tags\")\n tagsWatcher(newValue: StzhDatamessagelistItemEntryTag[] | string) {\n if (typeof newValue === \"string\") {\n this._tags = JSON.parse(newValue);\n } else {\n this._tags = newValue;\n }\n }\n\n private actionClick = (action: StzhDatamessagelistItemEntryAction, originalEvent: MouseEvent) => {\n this.stzhActionClick.emit({\n component: \"stzh-datamessagelist-item\",\n action,\n originalEvent\n });\n }\n\n private itemClick = (originalEvent: MouseEvent) => {\n this.stzhClick.emit({\n component: \"stzh-datamessagelist-item\",\n originalEvent\n });\n }\n\n async componentWillLoad() {\n this.loadingStatusWatcher(this.loadingStatus);\n this.metaWatcher(this.meta);\n this.actionsWatcher(this.actions);\n this.tagsWatcher(this.tags);\n this.externalWatcher();\n\n if (!this.localization) {\n this.localization = await window.stzhComponents.utils.fetchTranslations(this.element, \"datamessagelist-item\");\n }\n }\n\n render() {\n const classes = {\n \"stzh-datamessagelist-item\": true,\n \"stzh-datamessagelist-item--is-unread\": this.unread,\n \"stzh-datamessagelist-item--is-interactive\": !this.nonInteractive,\n };\n\n const HeadingLink = this.nonInteractive ? \"div\" :\n this.href ? \"a\" : \"button\";\n\n return (\n <Host role=\"listitem\">\n <article class={classes}>\n <div class=\"stzh-datamessagelist-item__content\">\n <div class=\"stzh-datamessagelist-item__text\">\n <h3 class=\"stzh-datamessagelist-item__heading\">\n <HeadingLink\n class=\"stzh-datamessagelist-item__heading-link\"\n href={this.href}\n rel={this.rel}\n target={this.target}\n onClick={this.itemClick}\n s-object-id={this.analyticsId || this.heading}\n >\n {this.unread &&\n <span class=\"stzh-datamessagelist-item__vhidden\">\n {this.localization.unread},\n </span>\n }\n {this.heading}\n </HeadingLink>\n </h3>\n\n {this.description &&\n <div class=\"stzh-datamessagelist-item__description\">\n <stzh-clamp lines={2} linesMedium={1}>\n {this.description}\n </stzh-clamp>\n </div>\n }\n\n {this._meta && this._meta.length > 0 &&\n <div class=\"stzh-datamessagelist-item__meta-wrapper\">\n <ul class=\"stzh-datamessagelist-item__meta\">\n {this._meta.map((meta) =>\n <li class=\"stzh-datamessagelist-item__meta-item\">\n <span class=\"stzh-datamessagelist-item__meta-item-label\">{meta.label}</span>\n <span class=\"stzh-datamessagelist-item__meta-item-value\">{meta.value}</span>\n </li>\n )}\n </ul>\n </div>\n }\n </div>\n\n {this._loadingStatus &&\n <stzh-status\n class=\"stzh-datamessagelist-item__status\"\n label={this._loadingStatus.label}\n percent={this._loadingStatus.percent}\n type={this._loadingStatus.type}\n withLoadingbar={true}\n ></stzh-status>\n }\n\n {this._tags && this._tags.length > 0 &&\n <div class=\"stzh-datamessagelist-item__tags-wrapper\">\n <div class=\"stzh-datamessagelist-item__tags\">\n {this._tags.map((tag) =>\n <stzh-chip\n class=\"stzh-datamessagelist-item__tag\"\n variant=\"tag\"\n size=\"small\"\n nonInteractive={true}\n inverted={tag.inverted}\n type={tag.type}\n icon={tag.icon}\n label={tag.label}\n ></stzh-chip>\n )}\n </div>\n </div>\n }\n </div>\n\n <div class=\"stzh-datamessagelist-item__actions\">\n {(this._actions && this._actions.length > 0) ?\n <stzh-popover\n label={this.localization.actionsPopoverLabel}\n placement=\"bottom-end\"\n class=\"stzh-datamessagelist-item__action-popover\"\n >\n <stzh-button\n class=\"stzh-datamessagelist-item__action-popover-button\"\n variant=\"tertiary\"\n size=\"tiny\"\n icon=\"more-horizontal\"\n iconOnly={true}\n ></stzh-button>\n <stzh-menu slot=\"content\">\n {this._actions.map((action) =>\n <stzh-menu-item\n icon={action.icon}\n badge={action.badge}\n onClick={(event) => { this.actionClick(action, event) }}\n >\n {action.label}\n </stzh-menu-item>\n )}\n </stzh-menu>\n </stzh-popover>\n :\n (\n !this.nonInteractive &&\n <div class=\"stzh-datamessagelist-item__action is-non-interactive\">\n <stzh-icon class=\"stzh-datamessagelist-item__action-icon\" name={this.icon ? this.icon : (this.external ? \"external-link\" : \"arrow-right\")}></stzh-icon>\n </div>\n )\n }\n </div>\n\n </article>\n </Host>\n );\n }\n}\n"]}
|