@oiz/stzh-components 2.2.0 → 2.3.0-alpha
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-b6d82414.js → app-globals-13e786d3.js} +1 -1
- package/dist/cjs/{arrow-3c3b0ae5.js → arrow-cd521f34.js} +468 -478
- package/dist/cjs/axios-7ec96df7.js +3167 -0
- package/dist/cjs/{dom-9deb26c8.js → dom-be1edfde.js} +1 -1
- package/dist/cjs/{focus-trap.esm-1cb6bb2e.js → focus-trap.esm-34a1a0d0.js} +188 -278
- package/dist/cjs/{index-9fcb4305.js → index-83d427ee.js} +113 -3
- package/dist/cjs/loader.cjs.js +5 -4
- package/dist/cjs/{shadow-css-bf3843d2.js → shadow-css-54f5c2d9.js} +1 -1
- package/dist/cjs/stzh-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-accordion.cjs.entry.js +1 -1
- package/dist/cjs/stzh-actions.cjs.entry.js +1 -1
- package/dist/cjs/stzh-actionset.cjs.entry.js +15 -5
- package/dist/cjs/stzh-anchornav.cjs.entry.js +2 -2
- package/dist/cjs/stzh-appnav.cjs.entry.js +1 -1
- package/dist/cjs/stzh-appointments.cjs.entry.js +1 -1
- package/dist/cjs/stzh-audio.cjs.entry.js +1 -1
- package/dist/cjs/stzh-badge_3.cjs.entry.js +2 -2
- package/dist/cjs/stzh-calendar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-card_3.cjs.entry.js +20 -15
- package/dist/cjs/stzh-cell.cjs.entry.js +1 -1
- package/dist/cjs/stzh-chart.cjs.entry.js +1471 -404
- package/dist/cjs/stzh-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/stzh-checkboxgroup.cjs.entry.js +2 -2
- package/dist/cjs/stzh-chip_2.cjs.entry.js +132 -0
- package/dist/cjs/stzh-components.cjs.js +27 -5
- package/dist/cjs/stzh-contact.cjs.entry.js +91 -0
- package/dist/cjs/stzh-container.cjs.entry.js +3 -2
- package/dist/cjs/stzh-cspace.cjs.entry.js +2 -2
- package/dist/cjs/stzh-datalist_2.cjs.entry.js +33 -13
- package/dist/cjs/stzh-datamessagelist-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datamessagelist.cjs.entry.js +1 -1
- package/dist/cjs/stzh-datatable.cjs.entry.js +32 -31
- package/dist/cjs/stzh-datepicker_3.cjs.entry.js +2 -2
- package/dist/cjs/stzh-details.cjs.entry.js +1 -1
- package/dist/cjs/stzh-dialog.cjs.entry.js +2 -2
- package/dist/cjs/stzh-dropdown.cjs.entry.js +1056 -425
- package/dist/cjs/stzh-fieldset.cjs.entry.js +2 -2
- package/dist/cjs/stzh-figure.cjs.entry.js +5 -3
- package/dist/cjs/stzh-flyingfocus.cjs.entry.js +1 -1
- package/dist/cjs/stzh-footer.cjs.entry.js +2 -2
- package/dist/cjs/stzh-ghettobox_2.cjs.entry.js +3 -3
- package/dist/cjs/stzh-header.cjs.entry.js +6 -5
- package/dist/cjs/stzh-heading.cjs.entry.js +1 -1
- package/dist/cjs/stzh-hr.cjs.entry.js +1 -1
- package/dist/cjs/stzh-hspace.cjs.entry.js +4 -3
- package/dist/cjs/stzh-icon-sprite.cjs.entry.js +1 -1
- package/dist/cjs/{stzh-input-description-4326b0d9.js → stzh-input-description-2edc5cac.js} +1 -1
- package/dist/cjs/stzh-input.cjs.entry.js +2 -2
- package/dist/cjs/stzh-invert.cjs.entry.js +23 -0
- package/dist/cjs/stzh-langnav.cjs.entry.js +1 -1
- package/dist/cjs/stzh-link.cjs.entry.js +1 -1
- package/dist/cjs/stzh-list-item.cjs.entry.js +1 -1
- package/dist/cjs/stzh-list.cjs.entry.js +1 -1
- package/dist/cjs/stzh-loader.cjs.entry.js +1 -1
- package/dist/cjs/stzh-loadingbar.cjs.entry.js +1 -1
- package/dist/cjs/stzh-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/stzh-message.cjs.entry.js +1 -1
- package/dist/cjs/stzh-metanav.cjs.entry.js +1 -1
- package/dist/cjs/stzh-microsite-teaserlist.cjs.entry.js +3 -3
- package/dist/cjs/stzh-olmap.cjs.entry.js +1 -1
- package/dist/cjs/stzh-overlay.cjs.entry.js +2 -2
- package/dist/cjs/stzh-page-skiplinks.cjs.entry.js +1 -1
- package/dist/cjs/stzh-pagebottom.cjs.entry.js +5 -2
- package/dist/cjs/stzh-pagetitle-hero.cjs.entry.js +2 -2
- package/dist/cjs/stzh-pagetitle.cjs.entry.js +9 -1
- package/dist/cjs/stzh-popover.cjs.entry.js +5 -5
- package/dist/cjs/stzh-portal-mitwirken.cjs.entry.js +2 -2
- package/dist/cjs/stzh-progressbar-item.cjs.entry.js +6 -4
- package/dist/cjs/stzh-progressbar.cjs.entry.js +2 -2
- package/dist/cjs/stzh-ratio.cjs.entry.js +26 -0
- package/dist/cjs/stzh-readspeaker.cjs.entry.js +1 -1
- package/dist/cjs/stzh-row.cjs.entry.js +1 -1
- package/dist/cjs/stzh-saptcha.cjs.entry.js +1 -1
- package/dist/cjs/stzh-section.cjs.entry.js +1 -1
- package/dist/cjs/stzh-share.cjs.entry.js +1 -1
- package/dist/cjs/stzh-show.cjs.entry.js +41 -0
- package/dist/cjs/stzh-sitemap.cjs.entry.js +2 -2
- package/dist/cjs/stzh-skiplink.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sortable.cjs.entry.js +10 -66
- package/dist/cjs/stzh-space.cjs.entry.js +34 -0
- package/dist/cjs/stzh-status.cjs.entry.js +1 -1
- package/dist/cjs/stzh-sticky.cjs.entry.js +5 -3
- package/dist/cjs/stzh-table.cjs.entry.js +3 -2
- package/dist/cjs/stzh-text.cjs.entry.js +2 -2
- package/dist/cjs/stzh-textandimage.cjs.entry.js +1 -1
- package/dist/cjs/stzh-toggle.cjs.entry.js +2 -2
- package/dist/cjs/stzh-tooltip.cjs.entry.js +5 -5
- package/dist/cjs/stzh-upload.cjs.entry.js +5 -2
- package/dist/cjs/stzh-vbz-linechip.cjs.entry.js +782 -690
- package/dist/cjs/stzh-vbz-majorticker.cjs.entry.js +7 -7
- package/dist/cjs/stzh-vbz-ticker.cjs.entry.js +3 -3
- package/dist/cjs/stzh-visuallyhidden.cjs.entry.js +1 -1
- package/dist/cjs/stzh-vspace.cjs.entry.js +4 -3
- package/dist/collection/assets/i18n/de.json +1 -1
- package/dist/collection/assets/i18n/en.json +1 -1
- package/dist/collection/collection-manifest.json +7 -3
- package/dist/collection/components/stzh-actionset/stzh-actionset.css +11 -0
- package/dist/collection/components/stzh-actionset/stzh-actionset.js +18 -8
- package/dist/collection/components/stzh-actionset/stzh-actionset.stories.js +5 -5
- package/dist/collection/components/stzh-anchornav/stzh-anchornav.css +1 -3
- package/dist/collection/components/stzh-button/stzh-button.css +12 -4
- package/dist/collection/components/stzh-button/stzh-button.stories.js +10 -6
- package/dist/collection/components/stzh-card/stzh-card.css +0 -18
- package/dist/collection/components/stzh-card/stzh-card.stories.js +1 -1
- package/dist/collection/components/stzh-chart/stzh-chart.css +55 -37
- package/dist/collection/components/stzh-chip/stzh-chip.css +16 -2
- package/dist/collection/components/stzh-chip/stzh-chip.js +32 -3
- package/dist/collection/components/stzh-chip/stzh-chip.stories.js +7 -0
- package/dist/collection/components/stzh-chip-select/stzh-chip-select.css +6 -0
- package/dist/collection/components/stzh-chip-select/stzh-chip-select.js +21 -11
- package/dist/collection/components/stzh-clamp/stzh-clamp.css +5 -0
- package/dist/collection/components/{stzh-contactaddress/stzh-contactaddress.css → stzh-contact/stzh-contact.css} +22 -22
- package/dist/collection/components/{stzh-contactaddress/stzh-contactaddress.js → stzh-contact/stzh-contact.js} +25 -25
- package/dist/collection/components/{stzh-contactaddress/stzh-contactaddress.stories.js → stzh-contact/stzh-contact.stories.js} +10 -9
- package/dist/collection/components/stzh-container/stzh-container.css +11 -1
- package/dist/collection/components/stzh-container/stzh-container.js +26 -1
- package/dist/collection/components/stzh-container/stzh-container.stories.js +6 -1
- package/dist/collection/components/stzh-cspace/stzh-cspace.css +136 -43
- package/dist/collection/components/stzh-datalist/stzh-datalist.css +12 -0
- package/dist/collection/components/stzh-datalist/stzh-datalist.js +19 -0
- package/dist/collection/components/stzh-datalist/stzh-datalist.stories.js +2 -1
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.css +28 -13
- package/dist/collection/components/stzh-datalist-item/stzh-datalist-item.js +35 -13
- package/dist/collection/components/stzh-datatable/stzh-datatable.css +3 -0
- package/dist/collection/components/stzh-datatable/stzh-datatable.js +20 -1
- package/dist/collection/components/stzh-dropdown/stzh-dropdown.js +9 -8
- package/dist/collection/components/stzh-fieldset/stzh-fieldset.css +1 -0
- package/dist/collection/components/stzh-figure/stzh-figure.css +8 -5
- package/dist/collection/components/stzh-figure/stzh-figure.js +21 -1
- package/dist/collection/components/stzh-footer/stzh-footer.css +1 -0
- package/dist/collection/components/stzh-ghettobox/stzh-ghettobox.css +12 -1
- package/dist/collection/components/stzh-header/stzh-header.css +5 -1
- package/dist/collection/components/stzh-header/stzh-header.js +4 -3
- package/dist/collection/components/stzh-header/stzh-header.stories.js +46 -38
- package/dist/collection/components/stzh-hspace/stzh-hspace.css +166 -138
- package/dist/collection/components/stzh-hspace/stzh-hspace.js +30 -6
- package/dist/collection/components/stzh-invert/stzh-invert.css +158 -0
- package/dist/collection/components/stzh-invert/stzh-invert.js +25 -0
- package/dist/collection/components/stzh-invert/stzh-invert.stories.js +55 -0
- package/dist/collection/components/stzh-link/stzh-link.stories.js +11 -19
- package/dist/collection/components/stzh-pagebottom/stzh-pagebottom.js +4 -1
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.js +8 -0
- package/dist/collection/components/stzh-pagetitle/stzh-pagetitle.stories.js +6 -6
- package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.css +14 -1
- package/dist/collection/components/stzh-pagetitle-hero/stzh-pagetitle-hero.stories.js +4 -6
- package/dist/collection/components/stzh-popover/stzh-popover.css +1 -1
- package/dist/collection/components/stzh-popover/stzh-popover.js +1 -1
- package/dist/collection/components/stzh-popover/stzh-popover.stories.js +5 -7
- package/dist/collection/components/stzh-portal-mitwirken/stzh-portal-mitwirken.css +34 -9
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.js +2 -2
- package/dist/collection/components/stzh-progressbar/stzh-progressbar.stories.js +2 -1
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.css +40 -4
- package/dist/collection/components/stzh-progressbar-item/stzh-progressbar-item.js +22 -2
- package/dist/collection/components/stzh-ratio/stzh-ratio.css +172 -0
- package/dist/collection/components/stzh-ratio/stzh-ratio.js +88 -0
- package/dist/collection/components/stzh-ratio/stzh-ratio.stories.js +35 -0
- package/dist/collection/components/stzh-richtext/stzh-richtext.css +10 -5
- package/dist/collection/components/stzh-show/stzh-show.css +165 -0
- package/dist/collection/components/stzh-show/stzh-show.js +158 -0
- package/dist/collection/components/stzh-show/stzh-show.stories.js +52 -0
- package/dist/collection/components/stzh-sitemap/stzh-sitemap.css +1 -1
- package/dist/collection/components/stzh-sortable/stzh-sortable.js +6 -3
- package/dist/collection/components/stzh-space/stzh-space.css +842 -0
- package/dist/collection/components/stzh-space/stzh-space.js +262 -0
- package/dist/collection/components/stzh-space/stzh-space.stories.js +76 -0
- package/dist/collection/components/stzh-sticky/stzh-sticky.css +9 -0
- package/dist/collection/components/stzh-sticky/stzh-sticky.js +21 -1
- package/dist/collection/components/stzh-sticky/stzh-sticky.stories.js +3 -1
- package/dist/collection/components/stzh-table/stzh-table.css +3 -0
- package/dist/collection/components/stzh-table/stzh-table.js +19 -0
- package/dist/collection/components/stzh-text/stzh-text.css +2 -2
- package/dist/collection/components/stzh-tooltip/stzh-tooltip.js +2 -2
- package/dist/collection/components/stzh-upload/stzh-upload.js +3 -0
- package/dist/collection/components/stzh-vspace/stzh-vspace.css +157 -129
- package/dist/collection/components/stzh-vspace/stzh-vspace.js +30 -6
- package/dist/collection/pages/egov.stories.js +190 -182
- package/dist/collection/pages/meinkonto.stories.js +367 -511
- package/dist/collection/pages/microsite.stories.js +235 -0
- package/dist/collection/pages/website.stories.js +139 -0
- package/dist/collection/patterns/appointments.stories.js +2 -2
- package/dist/collection/patterns/contact.stories.js +20 -20
- package/dist/collection/patterns/contactform.stories.js +2 -2
- package/dist/collection/patterns/jobdetails.stories.js +151 -0
- package/dist/collection/patterns/subpages.stories.js +1 -1
- package/dist/collection/patterns/twocolumns.stories.js +46 -0
- package/dist/components/arrow.js +468 -478
- package/dist/components/axios.js +3165 -0
- package/dist/components/date-utils.js +159 -0
- package/dist/components/focus-trap.esm.js +188 -278
- package/dist/components/index.d.ts +14 -1
- package/dist/components/index.js +7 -3
- package/dist/components/stzh-actionset2.js +16 -6
- package/dist/components/stzh-anchornav.js +1 -1
- package/dist/components/stzh-appointments.js +2 -1
- package/dist/components/stzh-button2.js +1 -1
- package/dist/components/stzh-calendar2.js +2 -159
- package/dist/components/stzh-card2.js +1 -1
- package/dist/components/stzh-chart.js +1470 -403
- package/dist/components/stzh-chip-select2.js +27 -15
- package/dist/components/stzh-chip2.js +23 -5
- package/dist/components/stzh-clamp2.js +1 -1
- package/dist/components/{stzh-contactaddress.d.ts → stzh-contact.d.ts} +4 -4
- package/dist/components/stzh-contact.js +157 -0
- package/dist/components/stzh-container.js +5 -2
- package/dist/components/stzh-cspace.js +1 -1
- package/dist/components/stzh-datalist-item2.js +30 -11
- package/dist/components/stzh-datalist2.js +3 -1
- package/dist/components/stzh-datatable.js +32 -30
- package/dist/components/stzh-datepicker2.js +2 -1
- package/dist/components/stzh-dropdown2.js +1054 -423
- package/dist/components/stzh-fieldset.js +1 -1
- package/dist/components/stzh-figure.js +6 -3
- package/dist/components/stzh-footer.js +1 -1
- package/dist/components/stzh-ghettobox2.js +1 -1
- package/dist/components/stzh-header.js +5 -4
- package/dist/components/stzh-hspace.js +8 -5
- package/dist/components/stzh-invert.d.ts +11 -0
- package/dist/components/stzh-invert.js +36 -0
- package/dist/components/stzh-microsite-teaserlist.js +1 -1
- package/dist/components/stzh-pagebottom.js +4 -1
- package/dist/components/stzh-pagetitle-hero.js +1 -1
- package/dist/components/stzh-pagetitle.js +8 -0
- package/dist/components/stzh-popover2.js +2 -2
- package/dist/components/stzh-portal-mitwirken.js +1 -1
- package/dist/components/stzh-progressbar-item2.js +6 -3
- package/dist/components/stzh-progressbar.js +1 -1
- package/dist/components/stzh-ratio.d.ts +11 -0
- package/dist/components/stzh-ratio.js +43 -0
- package/dist/components/stzh-richtext2.js +1 -1
- package/dist/components/stzh-show.d.ts +11 -0
- package/dist/components/stzh-show.js +62 -0
- package/dist/components/stzh-sitemap.js +1 -1
- package/dist/components/stzh-sortable2.js +9 -65
- package/dist/components/stzh-space.d.ts +11 -0
- package/dist/components/stzh-space.js +59 -0
- package/dist/components/stzh-sticky.js +5 -2
- package/dist/components/stzh-table.js +3 -1
- package/dist/components/stzh-text2.js +1 -1
- package/dist/components/stzh-tooltip2.js +2 -2
- package/dist/components/stzh-upload.js +3 -0
- package/dist/components/stzh-vbz-linechip2.js +772 -680
- package/dist/components/stzh-vbz-majorticker.js +1 -1
- package/dist/components/stzh-vbz-ticker.js +1 -1
- package/dist/components/stzh-vspace.js +8 -5
- package/dist/esm/{app-globals-ff581b69.js → app-globals-2e508622.js} +1 -1
- package/dist/esm/{arrow-86a679c7.js → arrow-480bc86f.js} +468 -478
- package/dist/esm/axios-e2b39666.js +3165 -0
- package/dist/esm/{dom-6be6f662.js → dom-c525f6e4.js} +1 -1
- package/dist/esm/{focus-trap.esm-074705a3.js → focus-trap.esm-82634dec.js} +188 -278
- package/dist/esm/{index-011c84fe.js → index-319b7c49.js} +112 -4
- package/dist/esm/loader.js +5 -4
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{shadow-css-ed4599f8.js → shadow-css-abbdeef8.js} +1 -1
- package/dist/esm/stzh-accordion-item.entry.js +1 -1
- package/dist/esm/stzh-accordion.entry.js +1 -1
- package/dist/esm/stzh-actions.entry.js +1 -1
- package/dist/esm/stzh-actionset.entry.js +16 -6
- package/dist/esm/stzh-anchornav.entry.js +2 -2
- package/dist/esm/stzh-appnav.entry.js +1 -1
- package/dist/esm/stzh-appointments.entry.js +1 -1
- package/dist/esm/stzh-audio.entry.js +1 -1
- package/dist/esm/stzh-badge_3.entry.js +2 -2
- package/dist/esm/stzh-calendar.entry.js +1 -1
- package/dist/esm/stzh-card_3.entry.js +20 -15
- package/dist/esm/stzh-cell.entry.js +1 -1
- package/dist/esm/stzh-chart.entry.js +1471 -404
- package/dist/esm/stzh-checkbox.entry.js +2 -2
- package/dist/esm/stzh-checkboxgroup.entry.js +2 -2
- package/dist/esm/stzh-chip_2.entry.js +127 -0
- package/dist/esm/stzh-components.js +24 -5
- package/dist/esm/stzh-contact.entry.js +87 -0
- package/dist/esm/stzh-container.entry.js +3 -2
- package/dist/esm/stzh-cspace.entry.js +2 -2
- package/dist/esm/stzh-datalist_2.entry.js +33 -13
- package/dist/esm/stzh-datamessagelist-item.entry.js +1 -1
- package/dist/esm/stzh-datamessagelist.entry.js +1 -1
- package/dist/esm/stzh-datatable.entry.js +32 -31
- package/dist/esm/stzh-datepicker_3.entry.js +2 -2
- package/dist/esm/stzh-details.entry.js +1 -1
- package/dist/esm/stzh-dialog.entry.js +2 -2
- package/dist/esm/stzh-dropdown.entry.js +1056 -425
- package/dist/esm/stzh-fieldset.entry.js +2 -2
- package/dist/esm/stzh-figure.entry.js +5 -3
- package/dist/esm/stzh-flyingfocus.entry.js +1 -1
- package/dist/esm/stzh-footer.entry.js +2 -2
- package/dist/esm/stzh-ghettobox_2.entry.js +3 -3
- package/dist/esm/stzh-header.entry.js +6 -5
- package/dist/esm/stzh-heading.entry.js +1 -1
- package/dist/esm/stzh-hr.entry.js +1 -1
- package/dist/esm/stzh-hspace.entry.js +4 -3
- package/dist/esm/stzh-icon-sprite.entry.js +1 -1
- package/dist/esm/{stzh-input-description-bdd1e340.js → stzh-input-description-cc38e214.js} +1 -1
- package/dist/esm/stzh-input.entry.js +2 -2
- package/dist/esm/stzh-invert.entry.js +19 -0
- package/dist/esm/stzh-langnav.entry.js +1 -1
- package/dist/esm/stzh-link.entry.js +1 -1
- package/dist/esm/stzh-list-item.entry.js +1 -1
- package/dist/esm/stzh-list.entry.js +1 -1
- package/dist/esm/stzh-loader.entry.js +1 -1
- package/dist/esm/stzh-loadingbar.entry.js +1 -1
- package/dist/esm/stzh-menu_2.entry.js +1 -1
- package/dist/esm/stzh-message.entry.js +1 -1
- package/dist/esm/stzh-metanav.entry.js +1 -1
- package/dist/esm/stzh-microsite-teaserlist.entry.js +2 -2
- package/dist/esm/stzh-olmap.entry.js +1 -1
- package/dist/esm/stzh-overlay.entry.js +2 -2
- package/dist/esm/stzh-page-skiplinks.entry.js +1 -1
- package/dist/esm/stzh-pagebottom.entry.js +5 -2
- package/dist/esm/stzh-pagetitle-hero.entry.js +2 -2
- package/dist/esm/stzh-pagetitle.entry.js +9 -1
- package/dist/esm/stzh-popover.entry.js +5 -5
- package/dist/esm/stzh-portal-mitwirken.entry.js +2 -2
- package/dist/esm/stzh-progressbar-item.entry.js +6 -4
- package/dist/esm/stzh-progressbar.entry.js +2 -2
- package/dist/esm/stzh-ratio.entry.js +22 -0
- package/dist/esm/stzh-readspeaker.entry.js +1 -1
- package/dist/esm/stzh-row.entry.js +1 -1
- package/dist/esm/stzh-saptcha.entry.js +1 -1
- package/dist/esm/stzh-section.entry.js +1 -1
- package/dist/esm/stzh-share.entry.js +1 -1
- package/dist/esm/stzh-show.entry.js +37 -0
- package/dist/esm/stzh-sitemap.entry.js +2 -2
- package/dist/esm/stzh-skiplink.entry.js +1 -1
- package/dist/esm/stzh-sortable.entry.js +10 -66
- package/dist/esm/stzh-space.entry.js +30 -0
- package/dist/esm/stzh-status.entry.js +1 -1
- package/dist/esm/stzh-sticky.entry.js +5 -3
- package/dist/esm/stzh-table.entry.js +3 -2
- package/dist/esm/stzh-text.entry.js +2 -2
- package/dist/esm/stzh-textandimage.entry.js +1 -1
- package/dist/esm/stzh-toggle.entry.js +2 -2
- package/dist/esm/stzh-tooltip.entry.js +5 -5
- package/dist/esm/stzh-upload.entry.js +5 -2
- package/dist/esm/stzh-vbz-linechip.entry.js +783 -691
- package/dist/esm/stzh-vbz-majorticker.entry.js +2 -2
- package/dist/esm/stzh-vbz-ticker.entry.js +2 -2
- package/dist/esm/stzh-visuallyhidden.entry.js +1 -1
- package/dist/esm/stzh-vspace.entry.js +4 -3
- package/dist/esm-es5/app-globals-2e508622.js +1 -0
- package/dist/esm-es5/arrow-480bc86f.js +1 -0
- package/dist/esm-es5/axios-e2b39666.js +1 -0
- package/dist/esm-es5/{dom-6be6f662.js → dom-c525f6e4.js} +0 -0
- package/dist/esm-es5/focus-trap.esm-82634dec.js +9 -0
- package/dist/esm-es5/index-319b7c49.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{shadow-css-ed4599f8.js → shadow-css-abbdeef8.js} +0 -0
- package/dist/esm-es5/stzh-accordion-item.entry.js +1 -1
- package/dist/esm-es5/stzh-accordion.entry.js +1 -1
- package/dist/esm-es5/stzh-actions.entry.js +1 -1
- package/dist/esm-es5/stzh-actionset.entry.js +1 -1
- package/dist/esm-es5/stzh-anchornav.entry.js +1 -1
- package/dist/esm-es5/stzh-appnav.entry.js +1 -1
- package/dist/esm-es5/stzh-appointments.entry.js +1 -1
- package/dist/esm-es5/stzh-audio.entry.js +1 -1
- package/dist/esm-es5/stzh-badge_3.entry.js +1 -1
- package/dist/esm-es5/stzh-calendar.entry.js +1 -1
- package/dist/esm-es5/stzh-card_3.entry.js +1 -1
- package/dist/esm-es5/stzh-cell.entry.js +1 -1
- package/dist/esm-es5/stzh-chart.entry.js +3 -3
- package/dist/esm-es5/stzh-checkbox.entry.js +1 -1
- package/dist/esm-es5/stzh-checkboxgroup.entry.js +1 -1
- package/dist/esm-es5/stzh-chip_2.entry.js +1 -0
- package/dist/esm-es5/stzh-components.js +1 -1
- package/dist/esm-es5/stzh-contact.entry.js +1 -0
- package/dist/esm-es5/stzh-container.entry.js +1 -1
- package/dist/esm-es5/stzh-cspace.entry.js +1 -1
- package/dist/esm-es5/stzh-datalist_2.entry.js +1 -1
- package/dist/esm-es5/stzh-datamessagelist-item.entry.js +1 -1
- package/dist/esm-es5/stzh-datamessagelist.entry.js +1 -1
- package/dist/esm-es5/stzh-datatable.entry.js +4 -4
- package/dist/esm-es5/stzh-datepicker_3.entry.js +1 -1
- package/dist/esm-es5/stzh-details.entry.js +1 -1
- package/dist/esm-es5/stzh-dialog.entry.js +1 -1
- package/dist/esm-es5/stzh-dropdown.entry.js +9 -1
- package/dist/esm-es5/stzh-fieldset.entry.js +1 -1
- package/dist/esm-es5/stzh-figure.entry.js +1 -1
- package/dist/esm-es5/stzh-flyingfocus.entry.js +1 -1
- package/dist/esm-es5/stzh-footer.entry.js +1 -1
- package/dist/esm-es5/stzh-ghettobox_2.entry.js +1 -1
- package/dist/esm-es5/stzh-header.entry.js +1 -1
- package/dist/esm-es5/stzh-heading.entry.js +1 -1
- package/dist/esm-es5/stzh-hr.entry.js +1 -1
- package/dist/esm-es5/stzh-hspace.entry.js +1 -1
- package/dist/esm-es5/stzh-icon-sprite.entry.js +1 -1
- package/dist/esm-es5/{stzh-input-description-bdd1e340.js → stzh-input-description-cc38e214.js} +1 -1
- package/dist/esm-es5/stzh-input.entry.js +1 -1
- package/dist/esm-es5/stzh-invert.entry.js +1 -0
- package/dist/esm-es5/stzh-langnav.entry.js +1 -1
- package/dist/esm-es5/stzh-link.entry.js +1 -1
- package/dist/esm-es5/stzh-list-item.entry.js +1 -1
- package/dist/esm-es5/stzh-list.entry.js +1 -1
- package/dist/esm-es5/stzh-loader.entry.js +1 -1
- package/dist/esm-es5/stzh-loadingbar.entry.js +1 -1
- package/dist/esm-es5/stzh-menu_2.entry.js +1 -1
- package/dist/esm-es5/stzh-message.entry.js +1 -1
- package/dist/esm-es5/stzh-metanav.entry.js +1 -1
- package/dist/esm-es5/stzh-microsite-teaserlist.entry.js +1 -1
- package/dist/esm-es5/stzh-olmap.entry.js +1 -1
- package/dist/esm-es5/stzh-overlay.entry.js +1 -1
- package/dist/esm-es5/stzh-page-skiplinks.entry.js +1 -1
- package/dist/esm-es5/stzh-pagebottom.entry.js +1 -1
- package/dist/esm-es5/stzh-pagetitle-hero.entry.js +1 -1
- package/dist/esm-es5/stzh-pagetitle.entry.js +1 -1
- package/dist/esm-es5/stzh-popover.entry.js +1 -1
- package/dist/esm-es5/stzh-portal-mitwirken.entry.js +1 -1
- package/dist/esm-es5/stzh-progressbar-item.entry.js +1 -1
- package/dist/esm-es5/stzh-progressbar.entry.js +1 -1
- package/dist/esm-es5/stzh-ratio.entry.js +1 -0
- package/dist/esm-es5/stzh-readspeaker.entry.js +1 -1
- package/dist/esm-es5/stzh-row.entry.js +1 -1
- package/dist/esm-es5/stzh-saptcha.entry.js +1 -1
- package/dist/esm-es5/stzh-section.entry.js +1 -1
- package/dist/esm-es5/stzh-share.entry.js +1 -1
- package/dist/esm-es5/stzh-show.entry.js +1 -0
- package/dist/esm-es5/stzh-sitemap.entry.js +1 -1
- package/dist/esm-es5/stzh-skiplink.entry.js +1 -1
- package/dist/esm-es5/stzh-sortable.entry.js +2 -2
- package/dist/esm-es5/stzh-space.entry.js +1 -0
- package/dist/esm-es5/stzh-status.entry.js +1 -1
- package/dist/esm-es5/stzh-sticky.entry.js +1 -1
- package/dist/esm-es5/stzh-table.entry.js +1 -1
- package/dist/esm-es5/stzh-text.entry.js +1 -1
- package/dist/esm-es5/stzh-textandimage.entry.js +1 -1
- package/dist/esm-es5/stzh-toggle.entry.js +1 -1
- package/dist/esm-es5/stzh-tooltip.entry.js +1 -1
- package/dist/esm-es5/stzh-upload.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-linechip.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-majorticker.entry.js +1 -1
- package/dist/esm-es5/stzh-vbz-ticker.entry.js +1 -1
- package/dist/esm-es5/stzh-visuallyhidden.entry.js +1 -1
- package/dist/esm-es5/stzh-vspace.entry.js +1 -1
- package/dist/esm-es5/translation-utils-2623783f.js +1 -1
- package/dist/stzh-components/assets/i18n/de.json +1 -1
- package/dist/stzh-components/assets/i18n/en.json +1 -1
- package/dist/stzh-components/p-00c4c8c0.system.entry.js +1 -0
- package/dist/stzh-components/p-013d269a.system.entry.js +1 -0
- package/dist/stzh-components/p-0447b178.system.entry.js +1 -0
- package/dist/stzh-components/{p-2bec3c77.entry.js → p-04d390eb.entry.js} +1 -1
- package/dist/stzh-components/p-06f5abab.system.entry.js +1 -0
- package/dist/stzh-components/{p-9176246f.entry.js → p-0930004d.entry.js} +1 -1
- package/dist/stzh-components/p-09f582cd.entry.js +1 -0
- package/dist/stzh-components/p-0a2de4e8.entry.js +1 -0
- package/dist/stzh-components/p-0ada0b0a.system.entry.js +1 -0
- package/dist/stzh-components/p-0af8a184.system.entry.js +1 -0
- package/dist/stzh-components/p-0afba769.entry.js +1 -0
- package/dist/stzh-components/p-0ce8b383.system.js +1 -0
- package/dist/stzh-components/p-0f882e26.system.entry.js +1 -0
- package/dist/stzh-components/{p-fbf2f4ed.system.entry.js → p-101f9b11.system.entry.js} +1 -1
- package/dist/stzh-components/{p-cff8376e.entry.js → p-12564ee4.entry.js} +1 -1
- package/dist/stzh-components/p-125a8244.entry.js +1 -0
- package/dist/stzh-components/{p-bee6eef5.entry.js → p-126a0f14.entry.js} +1 -1
- package/dist/stzh-components/p-12e03b78.system.entry.js +1 -0
- package/dist/stzh-components/{p-30ae5c00.system.entry.js → p-16b3d4ee.system.entry.js} +1 -1
- package/dist/stzh-components/p-1783b15a.js +12 -0
- package/dist/stzh-components/p-1c2c9ca8.entry.js +1 -0
- package/dist/stzh-components/p-1f925e84.system.entry.js +1 -0
- package/dist/stzh-components/p-20bd79d0.entry.js +1 -0
- package/dist/stzh-components/p-246cd179.js +1 -0
- package/dist/stzh-components/p-26889a91.entry.js +9 -0
- package/dist/stzh-components/p-2ad73c0c.system.entry.js +1 -0
- package/dist/stzh-components/p-2b67b0b3.system.entry.js +9 -0
- package/dist/stzh-components/p-2ba88798.entry.js +1 -0
- package/dist/stzh-components/{p-60274e67.system.entry.js → p-2c490268.system.entry.js} +1 -1
- package/dist/stzh-components/{p-912706bb.entry.js → p-2e6ef670.entry.js} +1 -1
- package/dist/stzh-components/p-2f4448c9.system.entry.js +1 -0
- package/dist/stzh-components/{p-376946bc.entry.js → p-2f4c5e18.entry.js} +1 -1
- package/dist/stzh-components/p-3238b0bf.entry.js +1 -0
- package/dist/stzh-components/p-36e72c1d.system.js +2 -0
- package/dist/stzh-components/{p-fd265f3a.entry.js → p-38e7645a.entry.js} +1 -1
- package/dist/stzh-components/{p-ed6adb96.entry.js → p-3b00d8b8.entry.js} +1 -1
- package/dist/stzh-components/p-3e433996.entry.js +1 -0
- package/dist/stzh-components/p-3f676d99.system.entry.js +1 -0
- package/dist/stzh-components/{p-0c8427bc.entry.js → p-40798ed2.entry.js} +1 -1
- package/dist/stzh-components/p-418e04f7.system.entry.js +1 -0
- package/dist/stzh-components/{p-7704b10b.entry.js → p-41fa7e81.entry.js} +1 -1
- package/dist/stzh-components/p-4370efe7.entry.js +1 -0
- package/dist/stzh-components/p-444b2baf.entry.js +1 -0
- package/dist/stzh-components/p-44b03dbb.js +10 -0
- package/dist/stzh-components/{p-2577ca1e.system.entry.js → p-44d10402.system.entry.js} +1 -1
- package/dist/stzh-components/{p-ed0d51b6.entry.js → p-46d07ed7.entry.js} +1 -1
- package/dist/stzh-components/p-470182bb.system.entry.js +1 -0
- package/dist/stzh-components/{p-669896ec.entry.js → p-48dee587.entry.js} +1 -1
- package/dist/stzh-components/p-48e835cf.system.js +1 -0
- package/dist/stzh-components/{p-55b7cda7.system.entry.js → p-4a298117.system.entry.js} +1 -1
- package/dist/stzh-components/p-4a60b27f.entry.js +1 -0
- package/dist/stzh-components/p-4d8c81b2.system.entry.js +1 -0
- package/dist/stzh-components/{p-f027e569.system.entry.js → p-512c38b3.system.entry.js} +1 -1
- package/dist/stzh-components/p-51b3a560.system.entry.js +1 -0
- package/dist/stzh-components/p-537adcfe.system.entry.js +3 -0
- package/dist/stzh-components/{p-13051e1c.js → p-538882c8.js} +0 -0
- package/dist/stzh-components/p-55752bd5.system.entry.js +1 -0
- package/dist/stzh-components/p-563b1abc.system.entry.js +1 -0
- package/dist/stzh-components/p-59793ef8.system.entry.js +1 -0
- package/dist/stzh-components/{p-6a0a76b3.entry.js → p-5b162e4f.entry.js} +1 -1
- package/dist/stzh-components/{p-0409bf6b.system.entry.js → p-5c717080.system.entry.js} +1 -1
- package/dist/stzh-components/p-5cb1cd93.system.entry.js +1 -0
- package/dist/stzh-components/p-5f9b58fb.system.entry.js +1 -0
- package/dist/stzh-components/{p-e7cf6c45.system.entry.js → p-617ece76.system.entry.js} +1 -1
- package/dist/stzh-components/{p-104df3a8.system.entry.js → p-6414454e.system.entry.js} +1 -1
- package/dist/stzh-components/p-6496df0a.system.entry.js +9 -0
- package/dist/stzh-components/p-64cdef2f.entry.js +1 -0
- package/dist/stzh-components/p-64e27ac1.entry.js +1 -0
- package/dist/stzh-components/p-655e3c46.system.entry.js +1 -0
- package/dist/stzh-components/{p-b0d8866d.entry.js → p-65ea23f6.entry.js} +1 -1
- package/dist/stzh-components/p-668b4025.system.entry.js +1 -0
- package/dist/stzh-components/{p-f03ce92d.system.entry.js → p-6722e89a.system.entry.js} +1 -1
- package/dist/stzh-components/p-67ae4994.entry.js +1 -0
- package/dist/stzh-components/{p-f39f347c.system.js → p-6845b6ac.system.js} +0 -0
- package/dist/stzh-components/p-6adc5f0c.system.entry.js +1 -0
- package/dist/stzh-components/p-6c80b920.system.entry.js +1 -0
- package/dist/stzh-components/p-6dbf976b.entry.js +1 -0
- package/dist/stzh-components/{p-eade9f77.entry.js → p-6e3231ce.entry.js} +1 -1
- package/dist/stzh-components/{p-ef3da23b.entry.js → p-705aa56d.entry.js} +1 -1
- package/dist/stzh-components/{p-288ee536.system.entry.js → p-70f85be3.system.entry.js} +1 -1
- package/dist/stzh-components/{p-62a2684d.entry.js → p-7185f634.entry.js} +1 -1
- package/dist/stzh-components/{p-11d7b426.system.entry.js → p-74d6e349.system.entry.js} +1 -1
- package/dist/stzh-components/p-77d0a54b.system.entry.js +1 -0
- package/dist/stzh-components/p-7b0c04b3.system.entry.js +1 -0
- package/dist/stzh-components/{p-0cc8bbd7.system.entry.js → p-7e4261ce.system.entry.js} +1 -1
- package/dist/stzh-components/{p-fee6a938.entry.js → p-7e94b787.entry.js} +1 -1
- package/dist/stzh-components/{p-df5f49b4.js → p-7f0fb35c.js} +1 -1
- package/dist/stzh-components/{p-44e0b101.system.entry.js → p-7f1b7b44.system.entry.js} +1 -1
- package/dist/stzh-components/{p-97e16665.system.entry.js → p-80f497d8.system.entry.js} +1 -1
- package/dist/stzh-components/p-81b4b0e6.system.entry.js +1 -0
- package/dist/stzh-components/{p-8cc119d3.system.entry.js → p-8361c9d8.system.entry.js} +1 -1
- package/dist/stzh-components/{p-cc720d2d.entry.js → p-838b0542.entry.js} +1 -1
- package/dist/stzh-components/p-862e7723.system.entry.js +1 -0
- package/dist/stzh-components/{p-49b292df.entry.js → p-86336227.entry.js} +1 -1
- package/dist/stzh-components/{p-586a8b3f.entry.js → p-8715198b.entry.js} +1 -1
- package/dist/stzh-components/p-8972cf20.entry.js +1 -0
- package/dist/stzh-components/p-8c5a6832.system.entry.js +1 -0
- package/dist/stzh-components/p-8caafed2.system.entry.js +1 -0
- package/dist/stzh-components/p-8ccefd49.system.entry.js +1 -0
- package/dist/stzh-components/p-8ee705ed.entry.js +1 -0
- package/dist/stzh-components/p-906caf97.js +1 -0
- package/dist/stzh-components/{p-9e4e0cc9.entry.js → p-923dffc7.entry.js} +1 -1
- package/dist/stzh-components/p-9380fb85.entry.js +1 -0
- package/dist/stzh-components/p-97e4272b.system.entry.js +1 -0
- package/dist/stzh-components/p-990f395b.entry.js +1 -0
- package/dist/stzh-components/p-99a3742a.js +2 -0
- package/dist/stzh-components/p-99aacd74.entry.js +1 -0
- package/dist/stzh-components/p-99b82949.entry.js +1 -0
- package/dist/stzh-components/p-99e27f57.system.js +1 -0
- package/dist/stzh-components/{p-576e1345.entry.js → p-99e43fb0.entry.js} +1 -1
- package/dist/stzh-components/p-9be29697.entry.js +1 -0
- package/dist/stzh-components/{p-eb6d3e6c.entry.js → p-9c35c9cd.entry.js} +1 -1
- package/dist/stzh-components/{p-33f80cd2.system.entry.js → p-9d5c70ee.system.entry.js} +1 -1
- package/dist/stzh-components/p-9e30ee4a.system.js +10 -0
- package/dist/stzh-components/{p-94830f96.system.entry.js → p-a0a033bd.system.entry.js} +1 -1
- package/dist/stzh-components/{p-d5cb80ad.system.entry.js → p-a11ef2d6.system.entry.js} +1 -1
- package/dist/stzh-components/p-a2b2cfac.system.entry.js +1 -0
- package/dist/stzh-components/p-a3c7aa63.entry.js +9 -0
- package/dist/stzh-components/p-a408bfba.system.js +1 -1
- package/dist/stzh-components/{p-aae4655f.entry.js → p-a44527f8.entry.js} +1 -1
- package/dist/stzh-components/{p-8bbaed3a.entry.js → p-a4dd5ba3.entry.js} +1 -1
- package/dist/stzh-components/{p-c30600d0.system.entry.js → p-a51dd210.system.entry.js} +1 -1
- package/dist/stzh-components/{p-4b0f473e.entry.js → p-a693ab41.entry.js} +1 -1
- package/dist/stzh-components/p-a6be6aca.system.entry.js +1 -0
- package/dist/stzh-components/p-ac3e3b2a.system.entry.js +1 -0
- package/dist/stzh-components/{p-72389069.entry.js → p-ad816fd9.entry.js} +1 -1
- package/dist/stzh-components/p-af67ea5e.entry.js +7 -0
- package/dist/stzh-components/p-b050c1f4.entry.js +1 -0
- package/dist/stzh-components/{p-be79497f.system.entry.js → p-b1ffc2a9.system.entry.js} +1 -1
- package/dist/stzh-components/p-b395bed5.system.entry.js +1 -0
- package/dist/stzh-components/{p-30ba96a3.entry.js → p-b689b882.entry.js} +1 -1
- package/dist/stzh-components/{p-b3dc4913.entry.js → p-b6e6f847.entry.js} +1 -1
- package/dist/stzh-components/p-b92734db.entry.js +1 -0
- package/dist/stzh-components/{p-57a0f895.entry.js → p-b9427914.entry.js} +1 -1
- package/dist/stzh-components/p-bada7caa.system.entry.js +1 -0
- package/dist/stzh-components/p-bb82fa2d.system.entry.js +1 -0
- package/dist/stzh-components/{p-557f07b5.system.entry.js → p-bc36fda4.system.entry.js} +1 -1
- package/dist/stzh-components/{p-1d8272a5.entry.js → p-be68b323.entry.js} +1 -1
- package/dist/stzh-components/p-bf071e77.system.js +1 -0
- package/dist/stzh-components/{p-84965eac.entry.js → p-c0ec905d.entry.js} +1 -1
- package/dist/stzh-components/p-c2f909c1.system.entry.js +1 -0
- package/dist/stzh-components/{p-ea9ca52b.entry.js → p-c33b7d23.entry.js} +1 -1
- package/dist/stzh-components/p-c646c712.entry.js +1 -0
- package/dist/stzh-components/p-c8cc2563.system.entry.js +1 -0
- package/dist/stzh-components/p-c9c7d88a.entry.js +1 -0
- package/dist/stzh-components/p-cbe6d2ea.entry.js +1 -0
- package/dist/stzh-components/{p-2732d8c8.system.js → p-cbfae706.system.js} +0 -0
- package/dist/stzh-components/p-ccf023da.entry.js +3 -0
- package/dist/stzh-components/p-d04bbc19.js +1 -0
- package/dist/stzh-components/p-d32965be.system.entry.js +1 -0
- package/dist/stzh-components/p-d54ff4d4.system.entry.js +1 -0
- package/dist/stzh-components/p-d5644c25.entry.js +8 -0
- package/dist/stzh-components/p-d6a11daa.entry.js +1 -0
- package/dist/stzh-components/p-d943e02c.system.entry.js +1 -0
- package/dist/stzh-components/{p-a474826c.system.entry.js → p-da85cf73.system.entry.js} +1 -1
- package/dist/stzh-components/p-da98a8bb.system.entry.js +7 -0
- package/dist/stzh-components/p-db306e24.entry.js +1 -0
- package/dist/stzh-components/{p-d2f6fb1b.system.js → p-db339680.system.js} +1 -1
- package/dist/stzh-components/{p-f5fdc88c.entry.js → p-dbe5320f.entry.js} +3 -3
- package/dist/stzh-components/p-dd1bb919.entry.js +1 -0
- package/dist/stzh-components/p-dd5f29aa.entry.js +1 -0
- package/dist/stzh-components/p-de9edaf2.entry.js +1 -0
- package/dist/stzh-components/p-e3afc8f7.entry.js +1 -0
- package/dist/stzh-components/p-e54ef44f.system.entry.js +1 -0
- package/dist/stzh-components/p-e78fe899.system.entry.js +1 -0
- package/dist/stzh-components/{p-60d9bf98.system.entry.js → p-e7909de9.system.entry.js} +1 -1
- package/dist/stzh-components/{p-58af0855.system.entry.js → p-e7e9b295.system.entry.js} +1 -1
- package/dist/stzh-components/p-e8feb92e.system.entry.js +1 -0
- package/dist/stzh-components/p-eb7773f3.entry.js +1 -0
- package/dist/stzh-components/p-ed58b644.system.entry.js +1 -0
- package/dist/stzh-components/p-ee4b939a.entry.js +1 -0
- package/dist/stzh-components/{p-28d8aa31.entry.js → p-f0e2a32d.entry.js} +1 -1
- package/dist/stzh-components/{p-0cff4e01.entry.js → p-f2deda0a.entry.js} +1 -1
- package/dist/stzh-components/p-f3d69226.system.entry.js +1 -0
- package/dist/stzh-components/p-f433e62a.system.entry.js +1 -0
- package/dist/stzh-components/p-f5b2c12e.entry.js +1 -0
- package/dist/stzh-components/{p-4226dec6.system.entry.js → p-f7bb76d8.system.entry.js} +1 -1
- package/dist/stzh-components/{p-e0f063ac.entry.js → p-f8feb07b.entry.js} +1 -1
- package/dist/stzh-components/p-f9ab0433.entry.js +1 -0
- package/dist/stzh-components/p-fa615b51.system.entry.js +1 -0
- package/dist/stzh-components/{p-e016ceb9.entry.js → p-fd15cc86.entry.js} +1 -1
- package/dist/stzh-components/p-fd3acd16.system.entry.js +1 -0
- package/dist/stzh-components/p-fe5d5fc8.entry.js +1 -0
- package/dist/stzh-components/p-fe9acc68.system.entry.js +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.js +1 -1
- package/dist/types/components/stzh-actionset/stzh-actionset.localization.d.ts +1 -1
- package/dist/types/components/stzh-appointments/stzh-appointments.localization.d.ts +1 -1
- package/dist/types/components/stzh-audio/stzh-audio.localization.d.ts +1 -1
- package/dist/types/components/stzh-calendar/stzh-calendar-day.d.ts +1 -1
- package/dist/types/components/stzh-calendar/stzh-calendar-month.d.ts +1 -1
- package/dist/types/components/stzh-calendar/stzh-calendar.localization.d.ts +1 -1
- package/dist/types/components/stzh-card/stzh-card.localization.d.ts +1 -1
- package/dist/types/components/stzh-card-list/stzh-card-list.localization.d.ts +1 -1
- package/dist/types/components/stzh-container/stzh-container.d.ts +2 -0
- package/dist/types/components/stzh-datamessagelist-item/stzh-datamessagelist-item.localization.d.ts +1 -1
- package/dist/types/components/stzh-datatable/stzh-datatable.localization.d.ts +1 -1
- package/dist/types/components/stzh-datepicker/stzh-datepicker.localization.d.ts +1 -1
- package/dist/types/components/stzh-dialog/stzh-dialog.localization.d.ts +1 -1
- package/dist/types/components/stzh-dropdown/stzh-dropdown.localization.d.ts +1 -1
- package/dist/types/components/stzh-footer/stzh-footer.localization.d.ts +1 -1
- package/dist/types/components/stzh-ghettobox/stzh-ghettobox.localization.d.ts +1 -1
- package/dist/types/components/stzh-hspace/stzh-hspace.d.ts +3 -1
- package/dist/types/components/stzh-input/stzh-input-description.d.ts +1 -1
- package/dist/types/components/stzh-message/stzh-message.localization.d.ts +1 -1
- package/dist/types/components/stzh-microsite-teaserlist/stzh-microsite-teaserlist.localization.d.ts +1 -1
- package/dist/types/components/stzh-olmap/stzh-olmap.localization.d.ts +1 -1
- package/dist/types/components/stzh-popover/stzh-popover.localization.d.ts +1 -1
- package/dist/types/components/stzh-progressbar-item/stzh-progressbar-item.d.ts +1 -0
- package/dist/types/components/stzh-saptcha/stzh-saptcha.localization.d.ts +1 -1
- package/dist/types/components/stzh-share/stzh-share.localization.d.ts +1 -1
- package/dist/types/components/stzh-sortable/stzh-sortable.localization.d.ts +1 -1
- package/dist/types/components/stzh-space/stzh-space.d.ts +27 -0
- package/dist/types/components/stzh-tooltip/stzh-tooltip.localization.d.ts +1 -1
- package/dist/types/components/stzh-upload/stzh-upload.localization.d.ts +1 -1
- package/dist/types/components/stzh-vbz-majorticker/stzh-vbz-majorticker.localization.d.ts +1 -1
- package/dist/types/components/stzh-vbz-ticker/stzh-vbz-ticker.localization.d.ts +1 -1
- package/dist/types/components/stzh-vspace/stzh-vspace.d.ts +3 -1
- package/dist/types/components.d.ts +390 -20
- package/dist/types/index.d.ts +135 -133
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/dist/types/utils/date-adapter.d.ts +2 -2
- package/dist/types/utils/h.d.ts +3 -3
- package/dist/types/utils/test-utils.d.ts +2 -2
- package/dist/types/utils/translation-utils.d.ts +5 -5
- package/dist/vscode-data.json +563 -4
- package/loader/index.d.ts +9 -0
- package/package.json +11 -11
- package/dist/cjs/index-8bd1552a.js +0 -2019
- package/dist/cjs/stzh-chip.cjs.entry.js +0 -100
- package/dist/cjs/stzh-clamp.cjs.entry.js +0 -27
- package/dist/cjs/stzh-contactaddress.cjs.entry.js +0 -91
- package/dist/collection/pages/example.stories.js +0 -170
- package/dist/components/index3.js +0 -2017
- package/dist/components/stzh-contactaddress.js +0 -157
- package/dist/esm/index-545902f4.js +0 -2017
- package/dist/esm/stzh-chip.entry.js +0 -96
- package/dist/esm/stzh-clamp.entry.js +0 -23
- package/dist/esm/stzh-contactaddress.entry.js +0 -87
- package/dist/esm-es5/app-globals-ff581b69.js +0 -1
- package/dist/esm-es5/arrow-86a679c7.js +0 -1
- package/dist/esm-es5/focus-trap.esm-074705a3.js +0 -9
- package/dist/esm-es5/index-011c84fe.js +0 -2
- package/dist/esm-es5/index-545902f4.js +0 -1
- package/dist/esm-es5/stzh-chip.entry.js +0 -1
- package/dist/esm-es5/stzh-clamp.entry.js +0 -1
- package/dist/esm-es5/stzh-contactaddress.entry.js +0 -1
- package/dist/stzh-components/p-006751fc.system.entry.js +0 -1
- package/dist/stzh-components/p-025c9c5b.entry.js +0 -1
- package/dist/stzh-components/p-06d9b884.system.entry.js +0 -1
- package/dist/stzh-components/p-0743d7fa.entry.js +0 -1
- package/dist/stzh-components/p-0850a2e1.system.entry.js +0 -1
- package/dist/stzh-components/p-09da70d8.entry.js +0 -1
- package/dist/stzh-components/p-0a647396.entry.js +0 -1
- package/dist/stzh-components/p-10c046fc.system.entry.js +0 -1
- package/dist/stzh-components/p-12a2afe9.entry.js +0 -1
- package/dist/stzh-components/p-17645237.entry.js +0 -1
- package/dist/stzh-components/p-18cb06e2.entry.js +0 -1
- package/dist/stzh-components/p-19ab7e34.system.entry.js +0 -1
- package/dist/stzh-components/p-1ae4d600.system.entry.js +0 -1
- package/dist/stzh-components/p-1e4b4d71.system.js +0 -1
- package/dist/stzh-components/p-21cad060.system.entry.js +0 -1
- package/dist/stzh-components/p-22b06793.entry.js +0 -1
- package/dist/stzh-components/p-23829f75.system.entry.js +0 -1
- package/dist/stzh-components/p-2bdc71ae.system.entry.js +0 -1
- package/dist/stzh-components/p-2d340222.system.entry.js +0 -1
- package/dist/stzh-components/p-31c3469c.entry.js +0 -1
- package/dist/stzh-components/p-3200f52a.system.entry.js +0 -1
- package/dist/stzh-components/p-385dda6c.system.entry.js +0 -1
- package/dist/stzh-components/p-391e6b90.entry.js +0 -1
- package/dist/stzh-components/p-3a1ff759.entry.js +0 -1
- package/dist/stzh-components/p-3ad67331.entry.js +0 -1
- package/dist/stzh-components/p-3e850dce.entry.js +0 -1
- package/dist/stzh-components/p-40a19ce6.js +0 -10
- package/dist/stzh-components/p-441ea784.entry.js +0 -1
- package/dist/stzh-components/p-4704588f.system.entry.js +0 -1
- package/dist/stzh-components/p-49bb09a5.entry.js +0 -1
- package/dist/stzh-components/p-4b369bac.entry.js +0 -1
- package/dist/stzh-components/p-51be647d.entry.js +0 -1
- package/dist/stzh-components/p-53934cfd.js +0 -1
- package/dist/stzh-components/p-57237509.system.entry.js +0 -1
- package/dist/stzh-components/p-5790eb4f.system.entry.js +0 -1
- package/dist/stzh-components/p-57f8596f.system.entry.js +0 -1
- package/dist/stzh-components/p-5b1c1cf7.entry.js +0 -1
- package/dist/stzh-components/p-5ddf8258.system.entry.js +0 -1
- package/dist/stzh-components/p-5fd9ae99.system.entry.js +0 -1
- package/dist/stzh-components/p-60ec90b2.system.entry.js +0 -1
- package/dist/stzh-components/p-63d94a57.system.entry.js +0 -1
- package/dist/stzh-components/p-64422176.entry.js +0 -9
- package/dist/stzh-components/p-661831da.entry.js +0 -1
- package/dist/stzh-components/p-67c6f0f2.entry.js +0 -1
- package/dist/stzh-components/p-6d009f56.system.entry.js +0 -1
- package/dist/stzh-components/p-71c07419.system.entry.js +0 -1
- package/dist/stzh-components/p-75068cd7.system.entry.js +0 -1
- package/dist/stzh-components/p-76165227.entry.js +0 -1
- package/dist/stzh-components/p-7941cf38.js +0 -1
- package/dist/stzh-components/p-7adc28a4.system.entry.js +0 -7
- package/dist/stzh-components/p-7b86c022.entry.js +0 -1
- package/dist/stzh-components/p-7c26f80f.system.entry.js +0 -1
- package/dist/stzh-components/p-7ce59988.system.entry.js +0 -1
- package/dist/stzh-components/p-7e94dde2.entry.js +0 -1
- package/dist/stzh-components/p-812ea5e9.system.entry.js +0 -1
- package/dist/stzh-components/p-8364475f.js +0 -12
- package/dist/stzh-components/p-84b9f66f.system.entry.js +0 -1
- package/dist/stzh-components/p-853a1f92.entry.js +0 -1
- package/dist/stzh-components/p-88a31179.system.entry.js +0 -1
- package/dist/stzh-components/p-8991d3bc.entry.js +0 -1
- package/dist/stzh-components/p-8a1d00fe.entry.js +0 -3
- package/dist/stzh-components/p-8fa2fb95.system.entry.js +0 -1
- package/dist/stzh-components/p-9072a490.system.entry.js +0 -1
- package/dist/stzh-components/p-92afa8df.entry.js +0 -1
- package/dist/stzh-components/p-95b490ec.system.entry.js +0 -1
- package/dist/stzh-components/p-9743f558.system.entry.js +0 -1
- package/dist/stzh-components/p-996579d0.entry.js +0 -1
- package/dist/stzh-components/p-9a5ebb1f.js +0 -2
- package/dist/stzh-components/p-9dac46e2.system.entry.js +0 -1
- package/dist/stzh-components/p-9e38b823.system.entry.js +0 -1
- package/dist/stzh-components/p-a16dc363.entry.js +0 -1
- package/dist/stzh-components/p-a53c0a98.entry.js +0 -1
- package/dist/stzh-components/p-a8101552.entry.js +0 -8
- package/dist/stzh-components/p-a934dd4d.entry.js +0 -1
- package/dist/stzh-components/p-aacf685b.system.entry.js +0 -3
- package/dist/stzh-components/p-ac1a6085.system.entry.js +0 -1
- package/dist/stzh-components/p-ac3aa560.system.entry.js +0 -1
- package/dist/stzh-components/p-afedafa6.system.entry.js +0 -1
- package/dist/stzh-components/p-b2145753.system.entry.js +0 -1
- package/dist/stzh-components/p-b436a18d.system.entry.js +0 -1
- package/dist/stzh-components/p-b908d228.system.entry.js +0 -1
- package/dist/stzh-components/p-b937ae70.system.js +0 -1
- package/dist/stzh-components/p-ba0b93c4.system.entry.js +0 -9
- package/dist/stzh-components/p-bfcfbfbb.system.entry.js +0 -1
- package/dist/stzh-components/p-c0fef3d1.entry.js +0 -1
- package/dist/stzh-components/p-c3a543a6.entry.js +0 -1
- package/dist/stzh-components/p-c63aecaa.system.entry.js +0 -1
- package/dist/stzh-components/p-c87e12de.system.entry.js +0 -1
- package/dist/stzh-components/p-cf6003d6.js +0 -1
- package/dist/stzh-components/p-cfd22a5e.system.entry.js +0 -1
- package/dist/stzh-components/p-d240494d.entry.js +0 -1
- package/dist/stzh-components/p-d5c0801b.entry.js +0 -1
- package/dist/stzh-components/p-d6ec20c8.system.entry.js +0 -1
- package/dist/stzh-components/p-d9bf09b1.system.entry.js +0 -1
- package/dist/stzh-components/p-db1692fb.entry.js +0 -1
- package/dist/stzh-components/p-dbdc01c7.system.js +0 -2
- package/dist/stzh-components/p-ded16c0e.system.js +0 -1
- package/dist/stzh-components/p-e20369c8.system.js +0 -10
- package/dist/stzh-components/p-e32bc982.system.js +0 -1
- package/dist/stzh-components/p-e46d82b9.system.entry.js +0 -1
- package/dist/stzh-components/p-e76a3647.entry.js +0 -1
- package/dist/stzh-components/p-ec3a472a.system.entry.js +0 -1
- package/dist/stzh-components/p-ec7b6ce8.entry.js +0 -7
- package/dist/stzh-components/p-f133eba2.entry.js +0 -1
- package/dist/stzh-components/p-f3107fc7.system.entry.js +0 -1
- package/dist/stzh-components/p-fcec6003.system.entry.js +0 -1
- package/dist/stzh-components/p-fdb906b9.system.entry.js +0 -1
|
@@ -1,313 +1,370 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { c as createCommonjsModule } from './_commonjsHelpers-f9dc4873.js';
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, c as Host, g as getElement } from './index-319b7c49.js';
|
|
2
|
+
import { c as createCommonjsModule, b as commonjsGlobal } from './_commonjsHelpers-f9dc4873.js';
|
|
3
3
|
|
|
4
|
-
var tinycolor = createCommonjsModule(function (module) {
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var tinycolor = createCommonjsModule(function (module, exports) {
|
|
5
|
+
// This file is autogenerated. It's used to publish CJS to npm.
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
module.exports = factory() ;
|
|
8
|
+
})(commonjsGlobal, (function () {
|
|
9
|
+
// https://github.com/bgrins/TinyColor
|
|
10
|
+
// Brian Grinstead, MIT License
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
const trimLeft = /^\s+/;
|
|
13
|
+
const trimRight = /\s+$/;
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
mathRound = Math.round,
|
|
15
|
-
mathMin = Math.min,
|
|
16
|
-
mathMax = Math.max,
|
|
17
|
-
mathRandom = Math.random;
|
|
18
|
-
|
|
19
|
-
function tinycolor (color, opts) {
|
|
20
|
-
|
|
21
|
-
color = (color) ? color : '';
|
|
22
|
-
opts = opts || { };
|
|
15
|
+
function tinycolor(color, opts) {
|
|
16
|
+
color = color ? color : "";
|
|
17
|
+
opts = opts || {};
|
|
23
18
|
|
|
24
19
|
// If input is already a tinycolor, return itself
|
|
25
20
|
if (color instanceof tinycolor) {
|
|
26
|
-
|
|
21
|
+
return color;
|
|
27
22
|
}
|
|
28
23
|
// If we are called as a function, call using new instead
|
|
29
24
|
if (!(this instanceof tinycolor)) {
|
|
30
|
-
|
|
25
|
+
return new tinycolor(color, opts);
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
var rgb = inputToRGB(color);
|
|
34
|
-
this._originalInput = color,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
(this._originalInput = color),
|
|
30
|
+
(this._r = rgb.r),
|
|
31
|
+
(this._g = rgb.g),
|
|
32
|
+
(this._b = rgb.b),
|
|
33
|
+
(this._a = rgb.a),
|
|
34
|
+
(this._roundA = Math.round(100 * this._a) / 100),
|
|
35
|
+
(this._format = opts.format || rgb.format);
|
|
41
36
|
this._gradientType = opts.gradientType;
|
|
42
37
|
|
|
43
38
|
// Don't let the range of [0,255] come back in [0,1].
|
|
44
39
|
// Potentially lose a little bit of precision here, but will fix issues where
|
|
45
40
|
// .5 gets interpreted as half of the total, instead of half of 1
|
|
46
41
|
// If it was supposed to be 128, this was already taken care of by `inputToRgb`
|
|
47
|
-
if (this._r < 1)
|
|
48
|
-
if (this._g < 1)
|
|
49
|
-
if (this._b < 1)
|
|
42
|
+
if (this._r < 1) this._r = Math.round(this._r);
|
|
43
|
+
if (this._g < 1) this._g = Math.round(this._g);
|
|
44
|
+
if (this._b < 1) this._b = Math.round(this._b);
|
|
50
45
|
|
|
51
46
|
this._ok = rgb.ok;
|
|
52
|
-
|
|
53
|
-
}
|
|
47
|
+
}
|
|
54
48
|
|
|
55
|
-
tinycolor.prototype = {
|
|
56
|
-
isDark: function() {
|
|
57
|
-
|
|
49
|
+
tinycolor.prototype = {
|
|
50
|
+
isDark: function () {
|
|
51
|
+
return this.getBrightness() < 128;
|
|
58
52
|
},
|
|
59
|
-
isLight: function() {
|
|
60
|
-
|
|
53
|
+
isLight: function () {
|
|
54
|
+
return !this.isDark();
|
|
61
55
|
},
|
|
62
|
-
isValid: function() {
|
|
63
|
-
|
|
56
|
+
isValid: function () {
|
|
57
|
+
return this._ok;
|
|
64
58
|
},
|
|
65
|
-
getOriginalInput: function() {
|
|
59
|
+
getOriginalInput: function () {
|
|
66
60
|
return this._originalInput;
|
|
67
61
|
},
|
|
68
|
-
getFormat: function() {
|
|
69
|
-
|
|
62
|
+
getFormat: function () {
|
|
63
|
+
return this._format;
|
|
70
64
|
},
|
|
71
|
-
getAlpha: function() {
|
|
72
|
-
|
|
65
|
+
getAlpha: function () {
|
|
66
|
+
return this._a;
|
|
73
67
|
},
|
|
74
|
-
getBrightness: function() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
getBrightness: function () {
|
|
69
|
+
//http://www.w3.org/TR/AERT#color-contrast
|
|
70
|
+
var rgb = this.toRgb();
|
|
71
|
+
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
|
|
78
72
|
},
|
|
79
|
-
getLuminance: function() {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
73
|
+
getLuminance: function () {
|
|
74
|
+
//http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
75
|
+
var rgb = this.toRgb();
|
|
76
|
+
var RsRGB, GsRGB, BsRGB, R, G, B;
|
|
77
|
+
RsRGB = rgb.r / 255;
|
|
78
|
+
GsRGB = rgb.g / 255;
|
|
79
|
+
BsRGB = rgb.b / 255;
|
|
80
|
+
|
|
81
|
+
if (RsRGB <= 0.03928) R = RsRGB / 12.92;
|
|
82
|
+
else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
|
|
83
|
+
if (GsRGB <= 0.03928) G = GsRGB / 12.92;
|
|
84
|
+
else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
|
|
85
|
+
if (BsRGB <= 0.03928) B = BsRGB / 12.92;
|
|
86
|
+
else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
|
|
87
|
+
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
91
88
|
},
|
|
92
|
-
setAlpha: function(value) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
setAlpha: function (value) {
|
|
90
|
+
this._a = boundAlpha(value);
|
|
91
|
+
this._roundA = Math.round(100 * this._a) / 100;
|
|
92
|
+
return this;
|
|
96
93
|
},
|
|
97
|
-
toHsv: function() {
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
toHsv: function () {
|
|
95
|
+
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
96
|
+
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
|
|
100
97
|
},
|
|
101
|
-
toHsvString: function() {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
toHsvString: function () {
|
|
99
|
+
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
100
|
+
var h = Math.round(hsv.h * 360),
|
|
101
|
+
s = Math.round(hsv.s * 100),
|
|
102
|
+
v = Math.round(hsv.v * 100);
|
|
103
|
+
return this._a == 1
|
|
104
|
+
? "hsv(" + h + ", " + s + "%, " + v + "%)"
|
|
105
|
+
: "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
|
|
107
106
|
},
|
|
108
|
-
toHsl: function() {
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
toHsl: function () {
|
|
108
|
+
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
109
|
+
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
|
|
111
110
|
},
|
|
112
|
-
toHslString: function() {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
toHslString: function () {
|
|
112
|
+
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
113
|
+
var h = Math.round(hsl.h * 360),
|
|
114
|
+
s = Math.round(hsl.s * 100),
|
|
115
|
+
l = Math.round(hsl.l * 100);
|
|
116
|
+
return this._a == 1
|
|
117
|
+
? "hsl(" + h + ", " + s + "%, " + l + "%)"
|
|
118
|
+
: "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
|
|
118
119
|
},
|
|
119
|
-
toHex: function(allow3Char) {
|
|
120
|
-
|
|
120
|
+
toHex: function (allow3Char) {
|
|
121
|
+
return rgbToHex(this._r, this._g, this._b, allow3Char);
|
|
121
122
|
},
|
|
122
|
-
toHexString: function(allow3Char) {
|
|
123
|
-
|
|
123
|
+
toHexString: function (allow3Char) {
|
|
124
|
+
return "#" + this.toHex(allow3Char);
|
|
124
125
|
},
|
|
125
|
-
toHex8: function(allow4Char) {
|
|
126
|
-
|
|
126
|
+
toHex8: function (allow4Char) {
|
|
127
|
+
return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
|
|
127
128
|
},
|
|
128
|
-
toHex8String: function(allow4Char) {
|
|
129
|
-
|
|
129
|
+
toHex8String: function (allow4Char) {
|
|
130
|
+
return "#" + this.toHex8(allow4Char);
|
|
130
131
|
},
|
|
131
|
-
toRgb: function() {
|
|
132
|
-
|
|
132
|
+
toRgb: function () {
|
|
133
|
+
return {
|
|
134
|
+
r: Math.round(this._r),
|
|
135
|
+
g: Math.round(this._g),
|
|
136
|
+
b: Math.round(this._b),
|
|
137
|
+
a: this._a,
|
|
138
|
+
};
|
|
133
139
|
},
|
|
134
|
-
toRgbString: function() {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
toRgbString: function () {
|
|
141
|
+
return this._a == 1
|
|
142
|
+
? "rgb(" +
|
|
143
|
+
Math.round(this._r) +
|
|
144
|
+
", " +
|
|
145
|
+
Math.round(this._g) +
|
|
146
|
+
", " +
|
|
147
|
+
Math.round(this._b) +
|
|
148
|
+
")"
|
|
149
|
+
: "rgba(" +
|
|
150
|
+
Math.round(this._r) +
|
|
151
|
+
", " +
|
|
152
|
+
Math.round(this._g) +
|
|
153
|
+
", " +
|
|
154
|
+
Math.round(this._b) +
|
|
155
|
+
", " +
|
|
156
|
+
this._roundA +
|
|
157
|
+
")";
|
|
138
158
|
},
|
|
139
|
-
toPercentageRgb: function() {
|
|
140
|
-
|
|
159
|
+
toPercentageRgb: function () {
|
|
160
|
+
return {
|
|
161
|
+
r: Math.round(bound01(this._r, 255) * 100) + "%",
|
|
162
|
+
g: Math.round(bound01(this._g, 255) * 100) + "%",
|
|
163
|
+
b: Math.round(bound01(this._b, 255) * 100) + "%",
|
|
164
|
+
a: this._a,
|
|
165
|
+
};
|
|
141
166
|
},
|
|
142
|
-
toPercentageRgbString: function() {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
167
|
+
toPercentageRgbString: function () {
|
|
168
|
+
return this._a == 1
|
|
169
|
+
? "rgb(" +
|
|
170
|
+
Math.round(bound01(this._r, 255) * 100) +
|
|
171
|
+
"%, " +
|
|
172
|
+
Math.round(bound01(this._g, 255) * 100) +
|
|
173
|
+
"%, " +
|
|
174
|
+
Math.round(bound01(this._b, 255) * 100) +
|
|
175
|
+
"%)"
|
|
176
|
+
: "rgba(" +
|
|
177
|
+
Math.round(bound01(this._r, 255) * 100) +
|
|
178
|
+
"%, " +
|
|
179
|
+
Math.round(bound01(this._g, 255) * 100) +
|
|
180
|
+
"%, " +
|
|
181
|
+
Math.round(bound01(this._b, 255) * 100) +
|
|
182
|
+
"%, " +
|
|
183
|
+
this._roundA +
|
|
184
|
+
")";
|
|
146
185
|
},
|
|
147
|
-
toName: function() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
186
|
+
toName: function () {
|
|
187
|
+
if (this._a === 0) {
|
|
188
|
+
return "transparent";
|
|
189
|
+
}
|
|
151
190
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
191
|
+
if (this._a < 1) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
155
194
|
|
|
156
|
-
|
|
195
|
+
return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
|
|
157
196
|
},
|
|
158
|
-
toFilter: function(secondColor) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
197
|
+
toFilter: function (secondColor) {
|
|
198
|
+
var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
|
|
199
|
+
var secondHex8String = hex8String;
|
|
200
|
+
var gradientType = this._gradientType ? "GradientType = 1, " : "";
|
|
201
|
+
|
|
202
|
+
if (secondColor) {
|
|
203
|
+
var s = tinycolor(secondColor);
|
|
204
|
+
secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
"progid:DXImageTransform.Microsoft.gradient(" +
|
|
209
|
+
gradientType +
|
|
210
|
+
"startColorstr=" +
|
|
211
|
+
hex8String +
|
|
212
|
+
",endColorstr=" +
|
|
213
|
+
secondHex8String +
|
|
214
|
+
")"
|
|
215
|
+
);
|
|
169
216
|
},
|
|
170
|
-
toString: function(format) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (format === "
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
if (format === "hex" || format === "hex6") {
|
|
193
|
-
formattedString = this.toHexString();
|
|
194
|
-
}
|
|
195
|
-
if (format === "hex3") {
|
|
196
|
-
formattedString = this.toHexString(true);
|
|
197
|
-
}
|
|
198
|
-
if (format === "hex4") {
|
|
199
|
-
formattedString = this.toHex8String(true);
|
|
200
|
-
}
|
|
201
|
-
if (format === "hex8") {
|
|
202
|
-
formattedString = this.toHex8String();
|
|
203
|
-
}
|
|
204
|
-
if (format === "name") {
|
|
205
|
-
formattedString = this.toName();
|
|
217
|
+
toString: function (format) {
|
|
218
|
+
var formatSet = !!format;
|
|
219
|
+
format = format || this._format;
|
|
220
|
+
|
|
221
|
+
var formattedString = false;
|
|
222
|
+
var hasAlpha = this._a < 1 && this._a >= 0;
|
|
223
|
+
var needsAlphaFormat =
|
|
224
|
+
!formatSet &&
|
|
225
|
+
hasAlpha &&
|
|
226
|
+
(format === "hex" ||
|
|
227
|
+
format === "hex6" ||
|
|
228
|
+
format === "hex3" ||
|
|
229
|
+
format === "hex4" ||
|
|
230
|
+
format === "hex8" ||
|
|
231
|
+
format === "name");
|
|
232
|
+
|
|
233
|
+
if (needsAlphaFormat) {
|
|
234
|
+
// Special case for "transparent", all other non-alpha formats
|
|
235
|
+
// will return rgba when there is transparency.
|
|
236
|
+
if (format === "name" && this._a === 0) {
|
|
237
|
+
return this.toName();
|
|
206
238
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
239
|
+
return this.toRgbString();
|
|
240
|
+
}
|
|
241
|
+
if (format === "rgb") {
|
|
242
|
+
formattedString = this.toRgbString();
|
|
243
|
+
}
|
|
244
|
+
if (format === "prgb") {
|
|
245
|
+
formattedString = this.toPercentageRgbString();
|
|
246
|
+
}
|
|
247
|
+
if (format === "hex" || format === "hex6") {
|
|
248
|
+
formattedString = this.toHexString();
|
|
249
|
+
}
|
|
250
|
+
if (format === "hex3") {
|
|
251
|
+
formattedString = this.toHexString(true);
|
|
252
|
+
}
|
|
253
|
+
if (format === "hex4") {
|
|
254
|
+
formattedString = this.toHex8String(true);
|
|
255
|
+
}
|
|
256
|
+
if (format === "hex8") {
|
|
257
|
+
formattedString = this.toHex8String();
|
|
258
|
+
}
|
|
259
|
+
if (format === "name") {
|
|
260
|
+
formattedString = this.toName();
|
|
261
|
+
}
|
|
262
|
+
if (format === "hsl") {
|
|
263
|
+
formattedString = this.toHslString();
|
|
264
|
+
}
|
|
265
|
+
if (format === "hsv") {
|
|
266
|
+
formattedString = this.toHsvString();
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return formattedString || this.toHexString();
|
|
215
270
|
},
|
|
216
|
-
clone: function() {
|
|
217
|
-
|
|
271
|
+
clone: function () {
|
|
272
|
+
return tinycolor(this.toString());
|
|
218
273
|
},
|
|
219
274
|
|
|
220
|
-
_applyModification: function(fn, args) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
275
|
+
_applyModification: function (fn, args) {
|
|
276
|
+
var color = fn.apply(null, [this].concat([].slice.call(args)));
|
|
277
|
+
this._r = color._r;
|
|
278
|
+
this._g = color._g;
|
|
279
|
+
this._b = color._b;
|
|
280
|
+
this.setAlpha(color._a);
|
|
281
|
+
return this;
|
|
227
282
|
},
|
|
228
|
-
lighten: function() {
|
|
229
|
-
|
|
283
|
+
lighten: function () {
|
|
284
|
+
return this._applyModification(lighten, arguments);
|
|
230
285
|
},
|
|
231
|
-
brighten: function() {
|
|
232
|
-
|
|
286
|
+
brighten: function () {
|
|
287
|
+
return this._applyModification(brighten, arguments);
|
|
233
288
|
},
|
|
234
|
-
darken: function() {
|
|
235
|
-
|
|
289
|
+
darken: function () {
|
|
290
|
+
return this._applyModification(darken, arguments);
|
|
236
291
|
},
|
|
237
|
-
desaturate: function() {
|
|
238
|
-
|
|
292
|
+
desaturate: function () {
|
|
293
|
+
return this._applyModification(desaturate, arguments);
|
|
239
294
|
},
|
|
240
|
-
saturate: function() {
|
|
241
|
-
|
|
295
|
+
saturate: function () {
|
|
296
|
+
return this._applyModification(saturate, arguments);
|
|
242
297
|
},
|
|
243
|
-
greyscale: function() {
|
|
244
|
-
|
|
298
|
+
greyscale: function () {
|
|
299
|
+
return this._applyModification(greyscale, arguments);
|
|
245
300
|
},
|
|
246
|
-
spin: function() {
|
|
247
|
-
|
|
301
|
+
spin: function () {
|
|
302
|
+
return this._applyModification(spin, arguments);
|
|
248
303
|
},
|
|
249
304
|
|
|
250
|
-
_applyCombination: function(fn, args) {
|
|
251
|
-
|
|
305
|
+
_applyCombination: function (fn, args) {
|
|
306
|
+
return fn.apply(null, [this].concat([].slice.call(args)));
|
|
252
307
|
},
|
|
253
|
-
analogous: function() {
|
|
254
|
-
|
|
308
|
+
analogous: function () {
|
|
309
|
+
return this._applyCombination(analogous, arguments);
|
|
255
310
|
},
|
|
256
|
-
complement: function() {
|
|
257
|
-
|
|
311
|
+
complement: function () {
|
|
312
|
+
return this._applyCombination(complement, arguments);
|
|
258
313
|
},
|
|
259
|
-
monochromatic: function() {
|
|
260
|
-
|
|
314
|
+
monochromatic: function () {
|
|
315
|
+
return this._applyCombination(monochromatic, arguments);
|
|
261
316
|
},
|
|
262
|
-
splitcomplement: function() {
|
|
263
|
-
|
|
317
|
+
splitcomplement: function () {
|
|
318
|
+
return this._applyCombination(splitcomplement, arguments);
|
|
264
319
|
},
|
|
265
|
-
|
|
266
|
-
|
|
320
|
+
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
321
|
+
// polyad: function (number) {
|
|
322
|
+
// return this._applyCombination(polyad, [number]);
|
|
323
|
+
// },
|
|
324
|
+
triad: function () {
|
|
325
|
+
return this._applyCombination(polyad, [3]);
|
|
267
326
|
},
|
|
268
|
-
tetrad: function() {
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
};
|
|
327
|
+
tetrad: function () {
|
|
328
|
+
return this._applyCombination(polyad, [4]);
|
|
329
|
+
},
|
|
330
|
+
};
|
|
272
331
|
|
|
273
|
-
// If input is an object, force 1 into "1.0" to handle ratios properly
|
|
274
|
-
// String input requires "1.0" as input, so 1 will be treated as 1
|
|
275
|
-
tinycolor.fromRatio = function(color, opts) {
|
|
332
|
+
// If input is an object, force 1 into "1.0" to handle ratios properly
|
|
333
|
+
// String input requires "1.0" as input, so 1 will be treated as 1
|
|
334
|
+
tinycolor.fromRatio = function (color, opts) {
|
|
276
335
|
if (typeof color == "object") {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
}
|
|
336
|
+
var newColor = {};
|
|
337
|
+
for (var i in color) {
|
|
338
|
+
if (color.hasOwnProperty(i)) {
|
|
339
|
+
if (i === "a") {
|
|
340
|
+
newColor[i] = color[i];
|
|
341
|
+
} else {
|
|
342
|
+
newColor[i] = convertToPercentage(color[i]);
|
|
343
|
+
}
|
|
287
344
|
}
|
|
288
|
-
|
|
345
|
+
}
|
|
346
|
+
color = newColor;
|
|
289
347
|
}
|
|
290
348
|
|
|
291
349
|
return tinycolor(color, opts);
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
// Given a string or object, convert that input to RGB
|
|
295
|
-
// Possible string inputs:
|
|
296
|
-
//
|
|
297
|
-
// "red"
|
|
298
|
-
// "#f00" or "f00"
|
|
299
|
-
// "#ff0000" or "ff0000"
|
|
300
|
-
// "#ff000000" or "ff000000"
|
|
301
|
-
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
|
302
|
-
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
|
303
|
-
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
|
304
|
-
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
|
305
|
-
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
|
306
|
-
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
|
307
|
-
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
|
308
|
-
//
|
|
309
|
-
function inputToRGB(color) {
|
|
310
|
-
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
// Given a string or object, convert that input to RGB
|
|
353
|
+
// Possible string inputs:
|
|
354
|
+
//
|
|
355
|
+
// "red"
|
|
356
|
+
// "#f00" or "f00"
|
|
357
|
+
// "#ff0000" or "ff0000"
|
|
358
|
+
// "#ff000000" or "ff000000"
|
|
359
|
+
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
|
360
|
+
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
|
361
|
+
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
|
362
|
+
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
|
363
|
+
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
|
364
|
+
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
|
365
|
+
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
|
366
|
+
//
|
|
367
|
+
function inputToRGB(color) {
|
|
311
368
|
var rgb = { r: 0, g: 0, b: 0 };
|
|
312
369
|
var a = 1;
|
|
313
370
|
var s = null;
|
|
@@ -317,103 +374,119 @@ function inputToRGB(color) {
|
|
|
317
374
|
var format = false;
|
|
318
375
|
|
|
319
376
|
if (typeof color == "string") {
|
|
320
|
-
|
|
377
|
+
color = stringInputToObject(color);
|
|
321
378
|
}
|
|
322
379
|
|
|
323
380
|
if (typeof color == "object") {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
381
|
+
if (
|
|
382
|
+
isValidCSSUnit(color.r) &&
|
|
383
|
+
isValidCSSUnit(color.g) &&
|
|
384
|
+
isValidCSSUnit(color.b)
|
|
385
|
+
) {
|
|
386
|
+
rgb = rgbToRgb(color.r, color.g, color.b);
|
|
387
|
+
ok = true;
|
|
388
|
+
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
|
389
|
+
} else if (
|
|
390
|
+
isValidCSSUnit(color.h) &&
|
|
391
|
+
isValidCSSUnit(color.s) &&
|
|
392
|
+
isValidCSSUnit(color.v)
|
|
393
|
+
) {
|
|
394
|
+
s = convertToPercentage(color.s);
|
|
395
|
+
v = convertToPercentage(color.v);
|
|
396
|
+
rgb = hsvToRgb(color.h, s, v);
|
|
397
|
+
ok = true;
|
|
398
|
+
format = "hsv";
|
|
399
|
+
} else if (
|
|
400
|
+
isValidCSSUnit(color.h) &&
|
|
401
|
+
isValidCSSUnit(color.s) &&
|
|
402
|
+
isValidCSSUnit(color.l)
|
|
403
|
+
) {
|
|
404
|
+
s = convertToPercentage(color.s);
|
|
405
|
+
l = convertToPercentage(color.l);
|
|
406
|
+
rgb = hslToRgb(color.h, s, l);
|
|
407
|
+
ok = true;
|
|
408
|
+
format = "hsl";
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
if (color.hasOwnProperty("a")) {
|
|
412
|
+
a = color.a;
|
|
413
|
+
}
|
|
347
414
|
}
|
|
348
415
|
|
|
349
416
|
a = boundAlpha(a);
|
|
350
417
|
|
|
351
418
|
return {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
419
|
+
ok: ok,
|
|
420
|
+
format: color.format || format,
|
|
421
|
+
r: Math.min(255, Math.max(rgb.r, 0)),
|
|
422
|
+
g: Math.min(255, Math.max(rgb.g, 0)),
|
|
423
|
+
b: Math.min(255, Math.max(rgb.b, 0)),
|
|
424
|
+
a: a,
|
|
358
425
|
};
|
|
359
|
-
}
|
|
360
|
-
|
|
426
|
+
}
|
|
361
427
|
|
|
362
|
-
// Conversion Functions
|
|
363
|
-
// --------------------
|
|
428
|
+
// Conversion Functions
|
|
429
|
+
// --------------------
|
|
364
430
|
|
|
365
|
-
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
|
366
|
-
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
|
431
|
+
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
|
432
|
+
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
|
367
433
|
|
|
368
|
-
// `rgbToRgb`
|
|
369
|
-
// Handle bounds / percentage checking to conform to CSS color spec
|
|
370
|
-
// <http://www.w3.org/TR/css3-color/>
|
|
371
|
-
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
|
372
|
-
// *Returns:* { r, g, b } in [0, 255]
|
|
373
|
-
function rgbToRgb(r, g, b){
|
|
434
|
+
// `rgbToRgb`
|
|
435
|
+
// Handle bounds / percentage checking to conform to CSS color spec
|
|
436
|
+
// <http://www.w3.org/TR/css3-color/>
|
|
437
|
+
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
|
438
|
+
// *Returns:* { r, g, b } in [0, 255]
|
|
439
|
+
function rgbToRgb(r, g, b) {
|
|
374
440
|
return {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
441
|
+
r: bound01(r, 255) * 255,
|
|
442
|
+
g: bound01(g, 255) * 255,
|
|
443
|
+
b: bound01(b, 255) * 255,
|
|
378
444
|
};
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// `rgbToHsl`
|
|
382
|
-
// Converts an RGB color value to HSL.
|
|
383
|
-
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
|
384
|
-
// *Returns:* { h, s, l } in [0,1]
|
|
385
|
-
function rgbToHsl(r, g, b) {
|
|
445
|
+
}
|
|
386
446
|
|
|
447
|
+
// `rgbToHsl`
|
|
448
|
+
// Converts an RGB color value to HSL.
|
|
449
|
+
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
|
450
|
+
// *Returns:* { h, s, l } in [0,1]
|
|
451
|
+
function rgbToHsl(r, g, b) {
|
|
387
452
|
r = bound01(r, 255);
|
|
388
453
|
g = bound01(g, 255);
|
|
389
454
|
b = bound01(b, 255);
|
|
390
455
|
|
|
391
|
-
var max =
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
456
|
+
var max = Math.max(r, g, b),
|
|
457
|
+
min = Math.min(r, g, b);
|
|
458
|
+
var h,
|
|
459
|
+
s,
|
|
460
|
+
l = (max + min) / 2;
|
|
461
|
+
|
|
462
|
+
if (max == min) {
|
|
463
|
+
h = s = 0; // achromatic
|
|
464
|
+
} else {
|
|
465
|
+
var d = max - min;
|
|
466
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
467
|
+
switch (max) {
|
|
468
|
+
case r:
|
|
469
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
470
|
+
break;
|
|
471
|
+
case g:
|
|
472
|
+
h = (b - r) / d + 2;
|
|
473
|
+
break;
|
|
474
|
+
case b:
|
|
475
|
+
h = (r - g) / d + 4;
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
h /= 6;
|
|
407
480
|
}
|
|
408
481
|
|
|
409
482
|
return { h: h, s: s, l: l };
|
|
410
|
-
}
|
|
483
|
+
}
|
|
411
484
|
|
|
412
|
-
// `hslToRgb`
|
|
413
|
-
// Converts an HSL color value to RGB.
|
|
414
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
|
415
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
416
|
-
function hslToRgb(h, s, l) {
|
|
485
|
+
// `hslToRgb`
|
|
486
|
+
// Converts an HSL color value to RGB.
|
|
487
|
+
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
|
488
|
+
// *Returns:* { r, g, b } in the set [0, 255]
|
|
489
|
+
function hslToRgb(h, s, l) {
|
|
417
490
|
var r, g, b;
|
|
418
491
|
|
|
419
492
|
h = bound01(h, 360);
|
|
@@ -421,255 +494,262 @@ function hslToRgb(h, s, l) {
|
|
|
421
494
|
l = bound01(l, 100);
|
|
422
495
|
|
|
423
496
|
function hue2rgb(p, q, t) {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
497
|
+
if (t < 0) t += 1;
|
|
498
|
+
if (t > 1) t -= 1;
|
|
499
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
500
|
+
if (t < 1 / 2) return q;
|
|
501
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
502
|
+
return p;
|
|
430
503
|
}
|
|
431
504
|
|
|
432
|
-
if(s === 0) {
|
|
433
|
-
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
b = hue2rgb(p, q, h - 1/3);
|
|
505
|
+
if (s === 0) {
|
|
506
|
+
r = g = b = l; // achromatic
|
|
507
|
+
} else {
|
|
508
|
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
509
|
+
var p = 2 * l - q;
|
|
510
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
511
|
+
g = hue2rgb(p, q, h);
|
|
512
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
441
513
|
}
|
|
442
514
|
|
|
443
515
|
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
// `rgbToHsv`
|
|
447
|
-
// Converts an RGB color value to HSV
|
|
448
|
-
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
449
|
-
// *Returns:* { h, s, v } in [0,1]
|
|
450
|
-
function rgbToHsv(r, g, b) {
|
|
516
|
+
}
|
|
451
517
|
|
|
518
|
+
// `rgbToHsv`
|
|
519
|
+
// Converts an RGB color value to HSV
|
|
520
|
+
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
521
|
+
// *Returns:* { h, s, v } in [0,1]
|
|
522
|
+
function rgbToHsv(r, g, b) {
|
|
452
523
|
r = bound01(r, 255);
|
|
453
524
|
g = bound01(g, 255);
|
|
454
525
|
b = bound01(b, 255);
|
|
455
526
|
|
|
456
|
-
var max =
|
|
457
|
-
|
|
527
|
+
var max = Math.max(r, g, b),
|
|
528
|
+
min = Math.min(r, g, b);
|
|
529
|
+
var h,
|
|
530
|
+
s,
|
|
531
|
+
v = max;
|
|
458
532
|
|
|
459
533
|
var d = max - min;
|
|
460
534
|
s = max === 0 ? 0 : d / max;
|
|
461
535
|
|
|
462
|
-
if(max == min) {
|
|
463
|
-
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
536
|
+
if (max == min) {
|
|
537
|
+
h = 0; // achromatic
|
|
538
|
+
} else {
|
|
539
|
+
switch (max) {
|
|
540
|
+
case r:
|
|
541
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
542
|
+
break;
|
|
543
|
+
case g:
|
|
544
|
+
h = (b - r) / d + 2;
|
|
545
|
+
break;
|
|
546
|
+
case b:
|
|
547
|
+
h = (r - g) / d + 4;
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
h /= 6;
|
|
472
551
|
}
|
|
473
552
|
return { h: h, s: s, v: v };
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
// `hsvToRgb`
|
|
477
|
-
// Converts an HSV color value to RGB.
|
|
478
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
479
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
480
|
-
function hsvToRgb(h, s, v) {
|
|
553
|
+
}
|
|
481
554
|
|
|
555
|
+
// `hsvToRgb`
|
|
556
|
+
// Converts an HSV color value to RGB.
|
|
557
|
+
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
558
|
+
// *Returns:* { r, g, b } in the set [0, 255]
|
|
559
|
+
function hsvToRgb(h, s, v) {
|
|
482
560
|
h = bound01(h, 360) * 6;
|
|
483
561
|
s = bound01(s, 100);
|
|
484
562
|
v = bound01(v, 100);
|
|
485
563
|
|
|
486
564
|
var i = Math.floor(h),
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
565
|
+
f = h - i,
|
|
566
|
+
p = v * (1 - s),
|
|
567
|
+
q = v * (1 - f * s),
|
|
568
|
+
t = v * (1 - (1 - f) * s),
|
|
569
|
+
mod = i % 6,
|
|
570
|
+
r = [v, q, p, p, t, v][mod],
|
|
571
|
+
g = [t, v, v, q, p, p][mod],
|
|
572
|
+
b = [p, p, t, v, v, q][mod];
|
|
495
573
|
|
|
496
574
|
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
// `rgbToHex`
|
|
500
|
-
// Converts an RGB color to hex
|
|
501
|
-
// Assumes r, g, and b are contained in the set [0, 255]
|
|
502
|
-
// Returns a 3 or 6 character hex
|
|
503
|
-
function rgbToHex(r, g, b, allow3Char) {
|
|
575
|
+
}
|
|
504
576
|
|
|
577
|
+
// `rgbToHex`
|
|
578
|
+
// Converts an RGB color to hex
|
|
579
|
+
// Assumes r, g, and b are contained in the set [0, 255]
|
|
580
|
+
// Returns a 3 or 6 character hex
|
|
581
|
+
function rgbToHex(r, g, b, allow3Char) {
|
|
505
582
|
var hex = [
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
583
|
+
pad2(Math.round(r).toString(16)),
|
|
584
|
+
pad2(Math.round(g).toString(16)),
|
|
585
|
+
pad2(Math.round(b).toString(16)),
|
|
509
586
|
];
|
|
510
587
|
|
|
511
588
|
// Return a 3 character hex if possible
|
|
512
|
-
if (
|
|
513
|
-
|
|
589
|
+
if (
|
|
590
|
+
allow3Char &&
|
|
591
|
+
hex[0].charAt(0) == hex[0].charAt(1) &&
|
|
592
|
+
hex[1].charAt(0) == hex[1].charAt(1) &&
|
|
593
|
+
hex[2].charAt(0) == hex[2].charAt(1)
|
|
594
|
+
) {
|
|
595
|
+
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
|
514
596
|
}
|
|
515
597
|
|
|
516
598
|
return hex.join("");
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
// `rgbaToHex`
|
|
520
|
-
// Converts an RGBA color plus alpha transparency to hex
|
|
521
|
-
// Assumes r, g, b are contained in the set [0, 255] and
|
|
522
|
-
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
523
|
-
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
599
|
+
}
|
|
524
600
|
|
|
601
|
+
// `rgbaToHex`
|
|
602
|
+
// Converts an RGBA color plus alpha transparency to hex
|
|
603
|
+
// Assumes r, g, b are contained in the set [0, 255] and
|
|
604
|
+
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
605
|
+
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
525
606
|
var hex = [
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
607
|
+
pad2(Math.round(r).toString(16)),
|
|
608
|
+
pad2(Math.round(g).toString(16)),
|
|
609
|
+
pad2(Math.round(b).toString(16)),
|
|
610
|
+
pad2(convertDecimalToHex(a)),
|
|
530
611
|
];
|
|
531
612
|
|
|
532
613
|
// Return a 4 character hex if possible
|
|
533
|
-
if (
|
|
534
|
-
|
|
614
|
+
if (
|
|
615
|
+
allow4Char &&
|
|
616
|
+
hex[0].charAt(0) == hex[0].charAt(1) &&
|
|
617
|
+
hex[1].charAt(0) == hex[1].charAt(1) &&
|
|
618
|
+
hex[2].charAt(0) == hex[2].charAt(1) &&
|
|
619
|
+
hex[3].charAt(0) == hex[3].charAt(1)
|
|
620
|
+
) {
|
|
621
|
+
return (
|
|
622
|
+
hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0)
|
|
623
|
+
);
|
|
535
624
|
}
|
|
536
625
|
|
|
537
626
|
return hex.join("");
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
// `rgbaToArgbHex`
|
|
541
|
-
// Converts an RGBA color to an ARGB Hex8 string
|
|
542
|
-
// Rarely used, but required for "toFilter()"
|
|
543
|
-
function rgbaToArgbHex(r, g, b, a) {
|
|
627
|
+
}
|
|
544
628
|
|
|
629
|
+
// `rgbaToArgbHex`
|
|
630
|
+
// Converts an RGBA color to an ARGB Hex8 string
|
|
631
|
+
// Rarely used, but required for "toFilter()"
|
|
632
|
+
function rgbaToArgbHex(r, g, b, a) {
|
|
545
633
|
var hex = [
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
634
|
+
pad2(convertDecimalToHex(a)),
|
|
635
|
+
pad2(Math.round(r).toString(16)),
|
|
636
|
+
pad2(Math.round(g).toString(16)),
|
|
637
|
+
pad2(Math.round(b).toString(16)),
|
|
550
638
|
];
|
|
551
639
|
|
|
552
640
|
return hex.join("");
|
|
553
|
-
}
|
|
641
|
+
}
|
|
554
642
|
|
|
555
|
-
// `equals`
|
|
556
|
-
// Can be called with any tinycolor input
|
|
557
|
-
tinycolor.equals = function (color1, color2) {
|
|
558
|
-
if (!color1 || !color2)
|
|
643
|
+
// `equals`
|
|
644
|
+
// Can be called with any tinycolor input
|
|
645
|
+
tinycolor.equals = function (color1, color2) {
|
|
646
|
+
if (!color1 || !color2) return false;
|
|
559
647
|
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
|
|
560
|
-
};
|
|
648
|
+
};
|
|
561
649
|
|
|
562
|
-
tinycolor.random = function() {
|
|
650
|
+
tinycolor.random = function () {
|
|
563
651
|
return tinycolor.fromRatio({
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
652
|
+
r: Math.random(),
|
|
653
|
+
g: Math.random(),
|
|
654
|
+
b: Math.random(),
|
|
567
655
|
});
|
|
568
|
-
};
|
|
656
|
+
};
|
|
569
657
|
|
|
658
|
+
// Modification Functions
|
|
659
|
+
// ----------------------
|
|
660
|
+
// Thanks to less.js for some of the basics here
|
|
661
|
+
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
|
570
662
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
// Thanks to less.js for some of the basics here
|
|
574
|
-
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
|
575
|
-
|
|
576
|
-
function desaturate(color, amount) {
|
|
577
|
-
amount = (amount === 0) ? 0 : (amount || 10);
|
|
663
|
+
function desaturate(color, amount) {
|
|
664
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
578
665
|
var hsl = tinycolor(color).toHsl();
|
|
579
666
|
hsl.s -= amount / 100;
|
|
580
667
|
hsl.s = clamp01(hsl.s);
|
|
581
668
|
return tinycolor(hsl);
|
|
582
|
-
}
|
|
669
|
+
}
|
|
583
670
|
|
|
584
|
-
function saturate(color, amount) {
|
|
585
|
-
amount =
|
|
671
|
+
function saturate(color, amount) {
|
|
672
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
586
673
|
var hsl = tinycolor(color).toHsl();
|
|
587
674
|
hsl.s += amount / 100;
|
|
588
675
|
hsl.s = clamp01(hsl.s);
|
|
589
676
|
return tinycolor(hsl);
|
|
590
|
-
}
|
|
677
|
+
}
|
|
591
678
|
|
|
592
|
-
function greyscale(color) {
|
|
679
|
+
function greyscale(color) {
|
|
593
680
|
return tinycolor(color).desaturate(100);
|
|
594
|
-
}
|
|
681
|
+
}
|
|
595
682
|
|
|
596
|
-
function lighten
|
|
597
|
-
amount =
|
|
683
|
+
function lighten(color, amount) {
|
|
684
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
598
685
|
var hsl = tinycolor(color).toHsl();
|
|
599
686
|
hsl.l += amount / 100;
|
|
600
687
|
hsl.l = clamp01(hsl.l);
|
|
601
688
|
return tinycolor(hsl);
|
|
602
|
-
}
|
|
689
|
+
}
|
|
603
690
|
|
|
604
|
-
function brighten(color, amount) {
|
|
605
|
-
amount =
|
|
691
|
+
function brighten(color, amount) {
|
|
692
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
606
693
|
var rgb = tinycolor(color).toRgb();
|
|
607
|
-
rgb.r =
|
|
608
|
-
rgb.g =
|
|
609
|
-
rgb.b =
|
|
694
|
+
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
|
|
695
|
+
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
|
|
696
|
+
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
|
|
610
697
|
return tinycolor(rgb);
|
|
611
|
-
}
|
|
698
|
+
}
|
|
612
699
|
|
|
613
|
-
function darken
|
|
614
|
-
amount =
|
|
700
|
+
function darken(color, amount) {
|
|
701
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
615
702
|
var hsl = tinycolor(color).toHsl();
|
|
616
703
|
hsl.l -= amount / 100;
|
|
617
704
|
hsl.l = clamp01(hsl.l);
|
|
618
705
|
return tinycolor(hsl);
|
|
619
|
-
}
|
|
706
|
+
}
|
|
620
707
|
|
|
621
|
-
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
622
|
-
// Values outside of this range will be wrapped into this range.
|
|
623
|
-
function spin(color, amount) {
|
|
708
|
+
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
709
|
+
// Values outside of this range will be wrapped into this range.
|
|
710
|
+
function spin(color, amount) {
|
|
624
711
|
var hsl = tinycolor(color).toHsl();
|
|
625
712
|
var hue = (hsl.h + amount) % 360;
|
|
626
713
|
hsl.h = hue < 0 ? 360 + hue : hue;
|
|
627
714
|
return tinycolor(hsl);
|
|
628
|
-
}
|
|
715
|
+
}
|
|
629
716
|
|
|
630
|
-
// Combination Functions
|
|
631
|
-
// ---------------------
|
|
632
|
-
// Thanks to jQuery xColor for some of the ideas behind these
|
|
633
|
-
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
|
717
|
+
// Combination Functions
|
|
718
|
+
// ---------------------
|
|
719
|
+
// Thanks to jQuery xColor for some of the ideas behind these
|
|
720
|
+
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
|
634
721
|
|
|
635
|
-
function complement(color) {
|
|
722
|
+
function complement(color) {
|
|
636
723
|
var hsl = tinycolor(color).toHsl();
|
|
637
724
|
hsl.h = (hsl.h + 180) % 360;
|
|
638
725
|
return tinycolor(hsl);
|
|
639
|
-
}
|
|
726
|
+
}
|
|
640
727
|
|
|
641
|
-
function
|
|
728
|
+
function polyad(color, number) {
|
|
729
|
+
if (isNaN(number) || number <= 0) {
|
|
730
|
+
throw new Error("Argument to polyad must be a positive number");
|
|
731
|
+
}
|
|
642
732
|
var hsl = tinycolor(color).toHsl();
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
];
|
|
649
|
-
}
|
|
733
|
+
var result = [tinycolor(color)];
|
|
734
|
+
var step = 360 / number;
|
|
735
|
+
for (var i = 1; i < number; i++) {
|
|
736
|
+
result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l }));
|
|
737
|
+
}
|
|
650
738
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
var h = hsl.h;
|
|
654
|
-
return [
|
|
655
|
-
tinycolor(color),
|
|
656
|
-
tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
|
|
657
|
-
tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
|
|
658
|
-
tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
|
|
659
|
-
];
|
|
660
|
-
}
|
|
739
|
+
return result;
|
|
740
|
+
}
|
|
661
741
|
|
|
662
|
-
function splitcomplement(color) {
|
|
742
|
+
function splitcomplement(color) {
|
|
663
743
|
var hsl = tinycolor(color).toHsl();
|
|
664
744
|
var h = hsl.h;
|
|
665
745
|
return [
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
746
|
+
tinycolor(color),
|
|
747
|
+
tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
|
|
748
|
+
tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),
|
|
669
749
|
];
|
|
670
|
-
}
|
|
750
|
+
}
|
|
671
751
|
|
|
672
|
-
function analogous(color, results, slices) {
|
|
752
|
+
function analogous(color, results, slices) {
|
|
673
753
|
results = results || 6;
|
|
674
754
|
slices = slices || 30;
|
|
675
755
|
|
|
@@ -677,33 +757,35 @@ function analogous(color, results, slices) {
|
|
|
677
757
|
var part = 360 / slices;
|
|
678
758
|
var ret = [tinycolor(color)];
|
|
679
759
|
|
|
680
|
-
for (hsl.h = (
|
|
681
|
-
|
|
682
|
-
|
|
760
|
+
for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {
|
|
761
|
+
hsl.h = (hsl.h + part) % 360;
|
|
762
|
+
ret.push(tinycolor(hsl));
|
|
683
763
|
}
|
|
684
764
|
return ret;
|
|
685
|
-
}
|
|
765
|
+
}
|
|
686
766
|
|
|
687
|
-
function monochromatic(color, results) {
|
|
767
|
+
function monochromatic(color, results) {
|
|
688
768
|
results = results || 6;
|
|
689
769
|
var hsv = tinycolor(color).toHsv();
|
|
690
|
-
var h = hsv.h,
|
|
770
|
+
var h = hsv.h,
|
|
771
|
+
s = hsv.s,
|
|
772
|
+
v = hsv.v;
|
|
691
773
|
var ret = [];
|
|
692
774
|
var modification = 1 / results;
|
|
693
775
|
|
|
694
776
|
while (results--) {
|
|
695
|
-
|
|
696
|
-
|
|
777
|
+
ret.push(tinycolor({ h: h, s: s, v: v }));
|
|
778
|
+
v = (v + modification) % 1;
|
|
697
779
|
}
|
|
698
780
|
|
|
699
781
|
return ret;
|
|
700
|
-
}
|
|
782
|
+
}
|
|
701
783
|
|
|
702
|
-
// Utility Functions
|
|
703
|
-
// ---------------------
|
|
784
|
+
// Utility Functions
|
|
785
|
+
// ---------------------
|
|
704
786
|
|
|
705
|
-
tinycolor.mix = function(color1, color2, amount) {
|
|
706
|
-
amount =
|
|
787
|
+
tinycolor.mix = function (color1, color2, amount) {
|
|
788
|
+
amount = amount === 0 ? 0 : amount || 50;
|
|
707
789
|
|
|
708
790
|
var rgb1 = tinycolor(color1).toRgb();
|
|
709
791
|
var rgb2 = tinycolor(color2).toRgb();
|
|
@@ -711,39 +793,41 @@ tinycolor.mix = function(color1, color2, amount) {
|
|
|
711
793
|
var p = amount / 100;
|
|
712
794
|
|
|
713
795
|
var rgba = {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
796
|
+
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
797
|
+
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
798
|
+
b: (rgb2.b - rgb1.b) * p + rgb1.b,
|
|
799
|
+
a: (rgb2.a - rgb1.a) * p + rgb1.a,
|
|
718
800
|
};
|
|
719
801
|
|
|
720
802
|
return tinycolor(rgba);
|
|
721
|
-
};
|
|
722
|
-
|
|
803
|
+
};
|
|
723
804
|
|
|
724
|
-
// Readability Functions
|
|
725
|
-
// ---------------------
|
|
726
|
-
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
805
|
+
// Readability Functions
|
|
806
|
+
// ---------------------
|
|
807
|
+
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
727
808
|
|
|
728
|
-
// `contrast`
|
|
729
|
-
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
730
|
-
tinycolor.readability = function(color1, color2) {
|
|
809
|
+
// `contrast`
|
|
810
|
+
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
811
|
+
tinycolor.readability = function (color1, color2) {
|
|
731
812
|
var c1 = tinycolor(color1);
|
|
732
813
|
var c2 = tinycolor(color2);
|
|
733
|
-
return (
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
//
|
|
740
|
-
//
|
|
741
|
-
//
|
|
742
|
-
|
|
743
|
-
//
|
|
744
|
-
//
|
|
745
|
-
|
|
746
|
-
|
|
814
|
+
return (
|
|
815
|
+
(Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) /
|
|
816
|
+
(Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05)
|
|
817
|
+
);
|
|
818
|
+
};
|
|
819
|
+
|
|
820
|
+
// `isReadable`
|
|
821
|
+
// Ensure that foreground and background color combinations meet WCAG2 guidelines.
|
|
822
|
+
// The third argument is an optional Object.
|
|
823
|
+
// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
|
|
824
|
+
// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
|
|
825
|
+
// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
|
|
826
|
+
|
|
827
|
+
// *Example*
|
|
828
|
+
// tinycolor.isReadable("#000", "#111") => false
|
|
829
|
+
// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
|
|
830
|
+
tinycolor.isReadable = function (color1, color2, wcag2) {
|
|
747
831
|
var readability = tinycolor.readability(color1, color2);
|
|
748
832
|
var wcag2Parms, out;
|
|
749
833
|
|
|
@@ -751,62 +835,65 @@ tinycolor.isReadable = function(color1, color2, wcag2) {
|
|
|
751
835
|
|
|
752
836
|
wcag2Parms = validateWCAG2Parms(wcag2);
|
|
753
837
|
switch (wcag2Parms.level + wcag2Parms.size) {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
838
|
+
case "AAsmall":
|
|
839
|
+
case "AAAlarge":
|
|
840
|
+
out = readability >= 4.5;
|
|
841
|
+
break;
|
|
842
|
+
case "AAlarge":
|
|
843
|
+
out = readability >= 3;
|
|
844
|
+
break;
|
|
845
|
+
case "AAAsmall":
|
|
846
|
+
out = readability >= 7;
|
|
847
|
+
break;
|
|
764
848
|
}
|
|
765
849
|
return out;
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
//
|
|
770
|
-
//
|
|
771
|
-
//
|
|
772
|
-
//
|
|
773
|
-
//
|
|
774
|
-
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:
|
|
775
|
-
// tinycolor.mostReadable(
|
|
776
|
-
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"
|
|
777
|
-
|
|
778
|
-
tinycolor.mostReadable = function(baseColor, colorList, args) {
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
// `mostReadable`
|
|
853
|
+
// Given a base color and a list of possible foreground or background
|
|
854
|
+
// colors for that base, returns the most readable color.
|
|
855
|
+
// Optionally returns Black or White if the most readable color is unreadable.
|
|
856
|
+
// *Example*
|
|
857
|
+
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
|
|
858
|
+
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
|
|
859
|
+
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
|
|
860
|
+
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
|
|
861
|
+
tinycolor.mostReadable = function (baseColor, colorList, args) {
|
|
779
862
|
var bestColor = null;
|
|
780
863
|
var bestScore = 0;
|
|
781
864
|
var readability;
|
|
782
|
-
var includeFallbackColors, level, size
|
|
865
|
+
var includeFallbackColors, level, size;
|
|
783
866
|
args = args || {};
|
|
784
|
-
includeFallbackColors = args.includeFallbackColors
|
|
867
|
+
includeFallbackColors = args.includeFallbackColors;
|
|
785
868
|
level = args.level;
|
|
786
869
|
size = args.size;
|
|
787
870
|
|
|
788
|
-
for (var i= 0; i < colorList.length
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
871
|
+
for (var i = 0; i < colorList.length; i++) {
|
|
872
|
+
readability = tinycolor.readability(baseColor, colorList[i]);
|
|
873
|
+
if (readability > bestScore) {
|
|
874
|
+
bestScore = readability;
|
|
875
|
+
bestColor = tinycolor(colorList[i]);
|
|
876
|
+
}
|
|
794
877
|
}
|
|
795
878
|
|
|
796
|
-
if (
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
879
|
+
if (
|
|
880
|
+
tinycolor.isReadable(baseColor, bestColor, {
|
|
881
|
+
level: level,
|
|
882
|
+
size: size,
|
|
883
|
+
}) ||
|
|
884
|
+
!includeFallbackColors
|
|
885
|
+
) {
|
|
886
|
+
return bestColor;
|
|
887
|
+
} else {
|
|
888
|
+
args.includeFallbackColors = false;
|
|
889
|
+
return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
|
|
802
890
|
}
|
|
803
|
-
};
|
|
804
|
-
|
|
891
|
+
};
|
|
805
892
|
|
|
806
|
-
// Big List of Colors
|
|
807
|
-
// ------------------
|
|
808
|
-
// <
|
|
809
|
-
var names = tinycolor.names = {
|
|
893
|
+
// Big List of Colors
|
|
894
|
+
// ------------------
|
|
895
|
+
// <https://www.w3.org/TR/css-color-4/#named-colors>
|
|
896
|
+
var names = (tinycolor.names = {
|
|
810
897
|
aliceblue: "f0f8ff",
|
|
811
898
|
antiquewhite: "faebd7",
|
|
812
899
|
aqua: "0ff",
|
|
@@ -955,105 +1042,103 @@ var names = tinycolor.names = {
|
|
|
955
1042
|
white: "fff",
|
|
956
1043
|
whitesmoke: "f5f5f5",
|
|
957
1044
|
yellow: "ff0",
|
|
958
|
-
yellowgreen: "9acd32"
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
// Make it easy to access colors via `hexNames[hex]`
|
|
962
|
-
var hexNames = tinycolor.hexNames = flip(names);
|
|
1045
|
+
yellowgreen: "9acd32",
|
|
1046
|
+
});
|
|
963
1047
|
|
|
1048
|
+
// Make it easy to access colors via `hexNames[hex]`
|
|
1049
|
+
var hexNames = (tinycolor.hexNames = flip(names));
|
|
964
1050
|
|
|
965
|
-
// Utilities
|
|
966
|
-
// ---------
|
|
1051
|
+
// Utilities
|
|
1052
|
+
// ---------
|
|
967
1053
|
|
|
968
|
-
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
|
969
|
-
function flip(o) {
|
|
970
|
-
var flipped = {
|
|
1054
|
+
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
|
1055
|
+
function flip(o) {
|
|
1056
|
+
var flipped = {};
|
|
971
1057
|
for (var i in o) {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1058
|
+
if (o.hasOwnProperty(i)) {
|
|
1059
|
+
flipped[o[i]] = i;
|
|
1060
|
+
}
|
|
975
1061
|
}
|
|
976
1062
|
return flipped;
|
|
977
|
-
}
|
|
1063
|
+
}
|
|
978
1064
|
|
|
979
|
-
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
|
980
|
-
function boundAlpha(a) {
|
|
1065
|
+
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
|
1066
|
+
function boundAlpha(a) {
|
|
981
1067
|
a = parseFloat(a);
|
|
982
1068
|
|
|
983
1069
|
if (isNaN(a) || a < 0 || a > 1) {
|
|
984
|
-
|
|
1070
|
+
a = 1;
|
|
985
1071
|
}
|
|
986
1072
|
|
|
987
1073
|
return a;
|
|
988
|
-
}
|
|
1074
|
+
}
|
|
989
1075
|
|
|
990
|
-
// Take input from [0, n] and return it as [0, 1]
|
|
991
|
-
function bound01(n, max) {
|
|
992
|
-
if (isOnePointZero(n))
|
|
1076
|
+
// Take input from [0, n] and return it as [0, 1]
|
|
1077
|
+
function bound01(n, max) {
|
|
1078
|
+
if (isOnePointZero(n)) n = "100%";
|
|
993
1079
|
|
|
994
1080
|
var processPercent = isPercentage(n);
|
|
995
|
-
n =
|
|
1081
|
+
n = Math.min(max, Math.max(0, parseFloat(n)));
|
|
996
1082
|
|
|
997
1083
|
// Automatically convert percentage into number
|
|
998
1084
|
if (processPercent) {
|
|
999
|
-
|
|
1085
|
+
n = parseInt(n * max, 10) / 100;
|
|
1000
1086
|
}
|
|
1001
1087
|
|
|
1002
1088
|
// Handle floating point rounding errors
|
|
1003
|
-
if (
|
|
1004
|
-
|
|
1089
|
+
if (Math.abs(n - max) < 0.000001) {
|
|
1090
|
+
return 1;
|
|
1005
1091
|
}
|
|
1006
1092
|
|
|
1007
1093
|
// Convert into [0, 1] range if it isn't already
|
|
1008
1094
|
return (n % max) / parseFloat(max);
|
|
1009
|
-
}
|
|
1095
|
+
}
|
|
1010
1096
|
|
|
1011
|
-
// Force a number between 0 and 1
|
|
1012
|
-
function clamp01(val) {
|
|
1013
|
-
return
|
|
1014
|
-
}
|
|
1097
|
+
// Force a number between 0 and 1
|
|
1098
|
+
function clamp01(val) {
|
|
1099
|
+
return Math.min(1, Math.max(0, val));
|
|
1100
|
+
}
|
|
1015
1101
|
|
|
1016
|
-
// Parse a base-16 hex value into a base-10 integer
|
|
1017
|
-
function parseIntFromHex(val) {
|
|
1102
|
+
// Parse a base-16 hex value into a base-10 integer
|
|
1103
|
+
function parseIntFromHex(val) {
|
|
1018
1104
|
return parseInt(val, 16);
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
1022
|
-
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
1023
|
-
function isOnePointZero(n) {
|
|
1024
|
-
return typeof n == "string" && n.indexOf(
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
// Check to see if string passed in is a percentage
|
|
1028
|
-
function isPercentage(n) {
|
|
1029
|
-
return typeof n === "string" && n.indexOf(
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
// Force a hex value to have 2 characters
|
|
1033
|
-
function pad2(c) {
|
|
1034
|
-
return c.length == 1 ?
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// Replace a decimal with it's percentage value
|
|
1038
|
-
function convertToPercentage(n) {
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
1108
|
+
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
1109
|
+
function isOnePointZero(n) {
|
|
1110
|
+
return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// Check to see if string passed in is a percentage
|
|
1114
|
+
function isPercentage(n) {
|
|
1115
|
+
return typeof n === "string" && n.indexOf("%") != -1;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
// Force a hex value to have 2 characters
|
|
1119
|
+
function pad2(c) {
|
|
1120
|
+
return c.length == 1 ? "0" + c : "" + c;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
// Replace a decimal with it's percentage value
|
|
1124
|
+
function convertToPercentage(n) {
|
|
1039
1125
|
if (n <= 1) {
|
|
1040
|
-
|
|
1126
|
+
n = n * 100 + "%";
|
|
1041
1127
|
}
|
|
1042
1128
|
|
|
1043
1129
|
return n;
|
|
1044
|
-
}
|
|
1130
|
+
}
|
|
1045
1131
|
|
|
1046
|
-
// Converts a decimal to a hex value
|
|
1047
|
-
function convertDecimalToHex(d) {
|
|
1132
|
+
// Converts a decimal to a hex value
|
|
1133
|
+
function convertDecimalToHex(d) {
|
|
1048
1134
|
return Math.round(parseFloat(d) * 255).toString(16);
|
|
1049
|
-
}
|
|
1050
|
-
// Converts a hex value to a decimal
|
|
1051
|
-
function convertHexToDecimal(h) {
|
|
1052
|
-
return
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
var matchers = (function() {
|
|
1135
|
+
}
|
|
1136
|
+
// Converts a hex value to a decimal
|
|
1137
|
+
function convertHexToDecimal(h) {
|
|
1138
|
+
return parseIntFromHex(h) / 255;
|
|
1139
|
+
}
|
|
1056
1140
|
|
|
1141
|
+
var matchers = (function () {
|
|
1057
1142
|
// <http://www.w3.org/TR/css3-values/#integers>
|
|
1058
1143
|
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
|
1059
1144
|
|
|
@@ -1066,44 +1151,58 @@ var matchers = (function() {
|
|
|
1066
1151
|
// Actual matching.
|
|
1067
1152
|
// Parentheses and commas are optional, but not required.
|
|
1068
1153
|
// Whitespace can take the place of commas or opening paren
|
|
1069
|
-
var PERMISSIVE_MATCH3 =
|
|
1070
|
-
|
|
1154
|
+
var PERMISSIVE_MATCH3 =
|
|
1155
|
+
"[\\s|\\(]+(" +
|
|
1156
|
+
CSS_UNIT +
|
|
1157
|
+
")[,|\\s]+(" +
|
|
1158
|
+
CSS_UNIT +
|
|
1159
|
+
")[,|\\s]+(" +
|
|
1160
|
+
CSS_UNIT +
|
|
1161
|
+
")\\s*\\)?";
|
|
1162
|
+
var PERMISSIVE_MATCH4 =
|
|
1163
|
+
"[\\s|\\(]+(" +
|
|
1164
|
+
CSS_UNIT +
|
|
1165
|
+
")[,|\\s]+(" +
|
|
1166
|
+
CSS_UNIT +
|
|
1167
|
+
")[,|\\s]+(" +
|
|
1168
|
+
CSS_UNIT +
|
|
1169
|
+
")[,|\\s]+(" +
|
|
1170
|
+
CSS_UNIT +
|
|
1171
|
+
")\\s*\\)?";
|
|
1071
1172
|
|
|
1072
1173
|
return {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1174
|
+
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
1175
|
+
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
|
1176
|
+
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
|
1177
|
+
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
|
1178
|
+
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
|
1179
|
+
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
|
1180
|
+
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
|
1181
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1182
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1183
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1184
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1084
1185
|
};
|
|
1085
|
-
})();
|
|
1186
|
+
})();
|
|
1086
1187
|
|
|
1087
|
-
// `isValidCSSUnit`
|
|
1088
|
-
// Take in a single string / number and check to see if it looks like a CSS unit
|
|
1089
|
-
// (see `matchers` above for definition).
|
|
1090
|
-
function isValidCSSUnit(color) {
|
|
1188
|
+
// `isValidCSSUnit`
|
|
1189
|
+
// Take in a single string / number and check to see if it looks like a CSS unit
|
|
1190
|
+
// (see `matchers` above for definition).
|
|
1191
|
+
function isValidCSSUnit(color) {
|
|
1091
1192
|
return !!matchers.CSS_UNIT.exec(color);
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
// `stringInputToObject`
|
|
1095
|
-
// Permissive string parsing. Take in a number of formats, and output an object
|
|
1096
|
-
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
|
1097
|
-
function stringInputToObject(color) {
|
|
1193
|
+
}
|
|
1098
1194
|
|
|
1099
|
-
|
|
1195
|
+
// `stringInputToObject`
|
|
1196
|
+
// Permissive string parsing. Take in a number of formats, and output an object
|
|
1197
|
+
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
|
1198
|
+
function stringInputToObject(color) {
|
|
1199
|
+
color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
|
|
1100
1200
|
var named = false;
|
|
1101
1201
|
if (names[color]) {
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1202
|
+
color = names[color];
|
|
1203
|
+
named = true;
|
|
1204
|
+
} else if (color == "transparent") {
|
|
1205
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1107
1206
|
}
|
|
1108
1207
|
|
|
1109
1208
|
// Try to match string input using regular expressions.
|
|
@@ -1112,87 +1211,80 @@ function stringInputToObject(color) {
|
|
|
1112
1211
|
// This way the result will be the same whether the tinycolor is initialized with string or object.
|
|
1113
1212
|
var match;
|
|
1114
1213
|
if ((match = matchers.rgb.exec(color))) {
|
|
1115
|
-
|
|
1214
|
+
return { r: match[1], g: match[2], b: match[3] };
|
|
1116
1215
|
}
|
|
1117
1216
|
if ((match = matchers.rgba.exec(color))) {
|
|
1118
|
-
|
|
1217
|
+
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
|
1119
1218
|
}
|
|
1120
1219
|
if ((match = matchers.hsl.exec(color))) {
|
|
1121
|
-
|
|
1220
|
+
return { h: match[1], s: match[2], l: match[3] };
|
|
1122
1221
|
}
|
|
1123
1222
|
if ((match = matchers.hsla.exec(color))) {
|
|
1124
|
-
|
|
1223
|
+
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
|
1125
1224
|
}
|
|
1126
1225
|
if ((match = matchers.hsv.exec(color))) {
|
|
1127
|
-
|
|
1226
|
+
return { h: match[1], s: match[2], v: match[3] };
|
|
1128
1227
|
}
|
|
1129
1228
|
if ((match = matchers.hsva.exec(color))) {
|
|
1130
|
-
|
|
1229
|
+
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
|
1131
1230
|
}
|
|
1132
1231
|
if ((match = matchers.hex8.exec(color))) {
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1232
|
+
return {
|
|
1233
|
+
r: parseIntFromHex(match[1]),
|
|
1234
|
+
g: parseIntFromHex(match[2]),
|
|
1235
|
+
b: parseIntFromHex(match[3]),
|
|
1236
|
+
a: convertHexToDecimal(match[4]),
|
|
1237
|
+
format: named ? "name" : "hex8",
|
|
1238
|
+
};
|
|
1140
1239
|
}
|
|
1141
1240
|
if ((match = matchers.hex6.exec(color))) {
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1241
|
+
return {
|
|
1242
|
+
r: parseIntFromHex(match[1]),
|
|
1243
|
+
g: parseIntFromHex(match[2]),
|
|
1244
|
+
b: parseIntFromHex(match[3]),
|
|
1245
|
+
format: named ? "name" : "hex",
|
|
1246
|
+
};
|
|
1148
1247
|
}
|
|
1149
1248
|
if ((match = matchers.hex4.exec(color))) {
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1249
|
+
return {
|
|
1250
|
+
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1251
|
+
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1252
|
+
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1253
|
+
a: convertHexToDecimal(match[4] + "" + match[4]),
|
|
1254
|
+
format: named ? "name" : "hex8",
|
|
1255
|
+
};
|
|
1157
1256
|
}
|
|
1158
1257
|
if ((match = matchers.hex3.exec(color))) {
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1258
|
+
return {
|
|
1259
|
+
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1260
|
+
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1261
|
+
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1262
|
+
format: named ? "name" : "hex",
|
|
1263
|
+
};
|
|
1165
1264
|
}
|
|
1166
1265
|
|
|
1167
1266
|
return false;
|
|
1168
|
-
}
|
|
1267
|
+
}
|
|
1169
1268
|
|
|
1170
|
-
function validateWCAG2Parms(parms) {
|
|
1269
|
+
function validateWCAG2Parms(parms) {
|
|
1171
1270
|
// return valid WCAG2 parms for isReadable.
|
|
1172
1271
|
// If input parms are invalid, return {"level":"AA", "size":"small"}
|
|
1173
1272
|
var level, size;
|
|
1174
|
-
parms = parms || {
|
|
1273
|
+
parms = parms || { level: "AA", size: "small" };
|
|
1175
1274
|
level = (parms.level || "AA").toUpperCase();
|
|
1176
1275
|
size = (parms.size || "small").toLowerCase();
|
|
1177
1276
|
if (level !== "AA" && level !== "AAA") {
|
|
1178
|
-
|
|
1277
|
+
level = "AA";
|
|
1179
1278
|
}
|
|
1180
1279
|
if (size !== "small" && size !== "large") {
|
|
1181
|
-
|
|
1280
|
+
size = "small";
|
|
1182
1281
|
}
|
|
1183
|
-
return {
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
// AMD/requirejs: Define the module
|
|
1191
|
-
else {
|
|
1192
|
-
window.tinycolor = tinycolor;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
})(Math);
|
|
1282
|
+
return { level: level, size: size };
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
return tinycolor;
|
|
1286
|
+
|
|
1287
|
+
}));
|
|
1196
1288
|
});
|
|
1197
1289
|
|
|
1198
1290
|
const E = {
|