@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
|
@@ -2,316 +2,373 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-83d427ee.js');
|
|
6
6
|
const _commonjsHelpers = require('./_commonjsHelpers-dcc4cf71.js');
|
|
7
7
|
|
|
8
|
-
var tinycolor = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var tinycolor = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
9
|
+
// This file is autogenerated. It's used to publish CJS to npm.
|
|
10
|
+
(function (global, factory) {
|
|
11
|
+
module.exports = factory() ;
|
|
12
|
+
})(_commonjsHelpers.commonjsGlobal, (function () {
|
|
13
|
+
// https://github.com/bgrins/TinyColor
|
|
14
|
+
// Brian Grinstead, MIT License
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
const trimLeft = /^\s+/;
|
|
17
|
+
const trimRight = /\s+$/;
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
mathRound = Math.round,
|
|
19
|
-
mathMin = Math.min,
|
|
20
|
-
mathMax = Math.max,
|
|
21
|
-
mathRandom = Math.random;
|
|
22
|
-
|
|
23
|
-
function tinycolor (color, opts) {
|
|
24
|
-
|
|
25
|
-
color = (color) ? color : '';
|
|
26
|
-
opts = opts || { };
|
|
19
|
+
function tinycolor(color, opts) {
|
|
20
|
+
color = color ? color : "";
|
|
21
|
+
opts = opts || {};
|
|
27
22
|
|
|
28
23
|
// If input is already a tinycolor, return itself
|
|
29
24
|
if (color instanceof tinycolor) {
|
|
30
|
-
|
|
25
|
+
return color;
|
|
31
26
|
}
|
|
32
27
|
// If we are called as a function, call using new instead
|
|
33
28
|
if (!(this instanceof tinycolor)) {
|
|
34
|
-
|
|
29
|
+
return new tinycolor(color, opts);
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
var rgb = inputToRGB(color);
|
|
38
|
-
this._originalInput = color,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
(this._originalInput = color),
|
|
34
|
+
(this._r = rgb.r),
|
|
35
|
+
(this._g = rgb.g),
|
|
36
|
+
(this._b = rgb.b),
|
|
37
|
+
(this._a = rgb.a),
|
|
38
|
+
(this._roundA = Math.round(100 * this._a) / 100),
|
|
39
|
+
(this._format = opts.format || rgb.format);
|
|
45
40
|
this._gradientType = opts.gradientType;
|
|
46
41
|
|
|
47
42
|
// Don't let the range of [0,255] come back in [0,1].
|
|
48
43
|
// Potentially lose a little bit of precision here, but will fix issues where
|
|
49
44
|
// .5 gets interpreted as half of the total, instead of half of 1
|
|
50
45
|
// If it was supposed to be 128, this was already taken care of by `inputToRgb`
|
|
51
|
-
if (this._r < 1)
|
|
52
|
-
if (this._g < 1)
|
|
53
|
-
if (this._b < 1)
|
|
46
|
+
if (this._r < 1) this._r = Math.round(this._r);
|
|
47
|
+
if (this._g < 1) this._g = Math.round(this._g);
|
|
48
|
+
if (this._b < 1) this._b = Math.round(this._b);
|
|
54
49
|
|
|
55
50
|
this._ok = rgb.ok;
|
|
56
|
-
|
|
57
|
-
}
|
|
51
|
+
}
|
|
58
52
|
|
|
59
|
-
tinycolor.prototype = {
|
|
60
|
-
isDark: function() {
|
|
61
|
-
|
|
53
|
+
tinycolor.prototype = {
|
|
54
|
+
isDark: function () {
|
|
55
|
+
return this.getBrightness() < 128;
|
|
62
56
|
},
|
|
63
|
-
isLight: function() {
|
|
64
|
-
|
|
57
|
+
isLight: function () {
|
|
58
|
+
return !this.isDark();
|
|
65
59
|
},
|
|
66
|
-
isValid: function() {
|
|
67
|
-
|
|
60
|
+
isValid: function () {
|
|
61
|
+
return this._ok;
|
|
68
62
|
},
|
|
69
|
-
getOriginalInput: function() {
|
|
63
|
+
getOriginalInput: function () {
|
|
70
64
|
return this._originalInput;
|
|
71
65
|
},
|
|
72
|
-
getFormat: function() {
|
|
73
|
-
|
|
66
|
+
getFormat: function () {
|
|
67
|
+
return this._format;
|
|
74
68
|
},
|
|
75
|
-
getAlpha: function() {
|
|
76
|
-
|
|
69
|
+
getAlpha: function () {
|
|
70
|
+
return this._a;
|
|
77
71
|
},
|
|
78
|
-
getBrightness: function() {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
getBrightness: function () {
|
|
73
|
+
//http://www.w3.org/TR/AERT#color-contrast
|
|
74
|
+
var rgb = this.toRgb();
|
|
75
|
+
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
|
|
82
76
|
},
|
|
83
|
-
getLuminance: function() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
77
|
+
getLuminance: function () {
|
|
78
|
+
//http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
79
|
+
var rgb = this.toRgb();
|
|
80
|
+
var RsRGB, GsRGB, BsRGB, R, G, B;
|
|
81
|
+
RsRGB = rgb.r / 255;
|
|
82
|
+
GsRGB = rgb.g / 255;
|
|
83
|
+
BsRGB = rgb.b / 255;
|
|
84
|
+
|
|
85
|
+
if (RsRGB <= 0.03928) R = RsRGB / 12.92;
|
|
86
|
+
else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
|
|
87
|
+
if (GsRGB <= 0.03928) G = GsRGB / 12.92;
|
|
88
|
+
else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
|
|
89
|
+
if (BsRGB <= 0.03928) B = BsRGB / 12.92;
|
|
90
|
+
else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
|
|
91
|
+
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
95
92
|
},
|
|
96
|
-
setAlpha: function(value) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
setAlpha: function (value) {
|
|
94
|
+
this._a = boundAlpha(value);
|
|
95
|
+
this._roundA = Math.round(100 * this._a) / 100;
|
|
96
|
+
return this;
|
|
100
97
|
},
|
|
101
|
-
toHsv: function() {
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
toHsv: function () {
|
|
99
|
+
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
100
|
+
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
|
|
104
101
|
},
|
|
105
|
-
toHsvString: function() {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
toHsvString: function () {
|
|
103
|
+
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
104
|
+
var h = Math.round(hsv.h * 360),
|
|
105
|
+
s = Math.round(hsv.s * 100),
|
|
106
|
+
v = Math.round(hsv.v * 100);
|
|
107
|
+
return this._a == 1
|
|
108
|
+
? "hsv(" + h + ", " + s + "%, " + v + "%)"
|
|
109
|
+
: "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
|
|
111
110
|
},
|
|
112
|
-
toHsl: function() {
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
toHsl: function () {
|
|
112
|
+
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
113
|
+
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
|
|
115
114
|
},
|
|
116
|
-
toHslString: function() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
115
|
+
toHslString: function () {
|
|
116
|
+
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
117
|
+
var h = Math.round(hsl.h * 360),
|
|
118
|
+
s = Math.round(hsl.s * 100),
|
|
119
|
+
l = Math.round(hsl.l * 100);
|
|
120
|
+
return this._a == 1
|
|
121
|
+
? "hsl(" + h + ", " + s + "%, " + l + "%)"
|
|
122
|
+
: "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
|
|
122
123
|
},
|
|
123
|
-
toHex: function(allow3Char) {
|
|
124
|
-
|
|
124
|
+
toHex: function (allow3Char) {
|
|
125
|
+
return rgbToHex(this._r, this._g, this._b, allow3Char);
|
|
125
126
|
},
|
|
126
|
-
toHexString: function(allow3Char) {
|
|
127
|
-
|
|
127
|
+
toHexString: function (allow3Char) {
|
|
128
|
+
return "#" + this.toHex(allow3Char);
|
|
128
129
|
},
|
|
129
|
-
toHex8: function(allow4Char) {
|
|
130
|
-
|
|
130
|
+
toHex8: function (allow4Char) {
|
|
131
|
+
return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
|
|
131
132
|
},
|
|
132
|
-
toHex8String: function(allow4Char) {
|
|
133
|
-
|
|
133
|
+
toHex8String: function (allow4Char) {
|
|
134
|
+
return "#" + this.toHex8(allow4Char);
|
|
134
135
|
},
|
|
135
|
-
toRgb: function() {
|
|
136
|
-
|
|
136
|
+
toRgb: function () {
|
|
137
|
+
return {
|
|
138
|
+
r: Math.round(this._r),
|
|
139
|
+
g: Math.round(this._g),
|
|
140
|
+
b: Math.round(this._b),
|
|
141
|
+
a: this._a,
|
|
142
|
+
};
|
|
137
143
|
},
|
|
138
|
-
toRgbString: function() {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
toRgbString: function () {
|
|
145
|
+
return this._a == 1
|
|
146
|
+
? "rgb(" +
|
|
147
|
+
Math.round(this._r) +
|
|
148
|
+
", " +
|
|
149
|
+
Math.round(this._g) +
|
|
150
|
+
", " +
|
|
151
|
+
Math.round(this._b) +
|
|
152
|
+
")"
|
|
153
|
+
: "rgba(" +
|
|
154
|
+
Math.round(this._r) +
|
|
155
|
+
", " +
|
|
156
|
+
Math.round(this._g) +
|
|
157
|
+
", " +
|
|
158
|
+
Math.round(this._b) +
|
|
159
|
+
", " +
|
|
160
|
+
this._roundA +
|
|
161
|
+
")";
|
|
142
162
|
},
|
|
143
|
-
toPercentageRgb: function() {
|
|
144
|
-
|
|
163
|
+
toPercentageRgb: function () {
|
|
164
|
+
return {
|
|
165
|
+
r: Math.round(bound01(this._r, 255) * 100) + "%",
|
|
166
|
+
g: Math.round(bound01(this._g, 255) * 100) + "%",
|
|
167
|
+
b: Math.round(bound01(this._b, 255) * 100) + "%",
|
|
168
|
+
a: this._a,
|
|
169
|
+
};
|
|
145
170
|
},
|
|
146
|
-
toPercentageRgbString: function() {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
171
|
+
toPercentageRgbString: function () {
|
|
172
|
+
return this._a == 1
|
|
173
|
+
? "rgb(" +
|
|
174
|
+
Math.round(bound01(this._r, 255) * 100) +
|
|
175
|
+
"%, " +
|
|
176
|
+
Math.round(bound01(this._g, 255) * 100) +
|
|
177
|
+
"%, " +
|
|
178
|
+
Math.round(bound01(this._b, 255) * 100) +
|
|
179
|
+
"%)"
|
|
180
|
+
: "rgba(" +
|
|
181
|
+
Math.round(bound01(this._r, 255) * 100) +
|
|
182
|
+
"%, " +
|
|
183
|
+
Math.round(bound01(this._g, 255) * 100) +
|
|
184
|
+
"%, " +
|
|
185
|
+
Math.round(bound01(this._b, 255) * 100) +
|
|
186
|
+
"%, " +
|
|
187
|
+
this._roundA +
|
|
188
|
+
")";
|
|
150
189
|
},
|
|
151
|
-
toName: function() {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
190
|
+
toName: function () {
|
|
191
|
+
if (this._a === 0) {
|
|
192
|
+
return "transparent";
|
|
193
|
+
}
|
|
155
194
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
195
|
+
if (this._a < 1) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
159
198
|
|
|
160
|
-
|
|
199
|
+
return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
|
|
161
200
|
},
|
|
162
|
-
toFilter: function(secondColor) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
201
|
+
toFilter: function (secondColor) {
|
|
202
|
+
var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
|
|
203
|
+
var secondHex8String = hex8String;
|
|
204
|
+
var gradientType = this._gradientType ? "GradientType = 1, " : "";
|
|
205
|
+
|
|
206
|
+
if (secondColor) {
|
|
207
|
+
var s = tinycolor(secondColor);
|
|
208
|
+
secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
"progid:DXImageTransform.Microsoft.gradient(" +
|
|
213
|
+
gradientType +
|
|
214
|
+
"startColorstr=" +
|
|
215
|
+
hex8String +
|
|
216
|
+
",endColorstr=" +
|
|
217
|
+
secondHex8String +
|
|
218
|
+
")"
|
|
219
|
+
);
|
|
173
220
|
},
|
|
174
|
-
toString: function(format) {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (format === "
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
if (format === "hex" || format === "hex6") {
|
|
197
|
-
formattedString = this.toHexString();
|
|
198
|
-
}
|
|
199
|
-
if (format === "hex3") {
|
|
200
|
-
formattedString = this.toHexString(true);
|
|
201
|
-
}
|
|
202
|
-
if (format === "hex4") {
|
|
203
|
-
formattedString = this.toHex8String(true);
|
|
204
|
-
}
|
|
205
|
-
if (format === "hex8") {
|
|
206
|
-
formattedString = this.toHex8String();
|
|
207
|
-
}
|
|
208
|
-
if (format === "name") {
|
|
209
|
-
formattedString = this.toName();
|
|
221
|
+
toString: function (format) {
|
|
222
|
+
var formatSet = !!format;
|
|
223
|
+
format = format || this._format;
|
|
224
|
+
|
|
225
|
+
var formattedString = false;
|
|
226
|
+
var hasAlpha = this._a < 1 && this._a >= 0;
|
|
227
|
+
var needsAlphaFormat =
|
|
228
|
+
!formatSet &&
|
|
229
|
+
hasAlpha &&
|
|
230
|
+
(format === "hex" ||
|
|
231
|
+
format === "hex6" ||
|
|
232
|
+
format === "hex3" ||
|
|
233
|
+
format === "hex4" ||
|
|
234
|
+
format === "hex8" ||
|
|
235
|
+
format === "name");
|
|
236
|
+
|
|
237
|
+
if (needsAlphaFormat) {
|
|
238
|
+
// Special case for "transparent", all other non-alpha formats
|
|
239
|
+
// will return rgba when there is transparency.
|
|
240
|
+
if (format === "name" && this._a === 0) {
|
|
241
|
+
return this.toName();
|
|
210
242
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
243
|
+
return this.toRgbString();
|
|
244
|
+
}
|
|
245
|
+
if (format === "rgb") {
|
|
246
|
+
formattedString = this.toRgbString();
|
|
247
|
+
}
|
|
248
|
+
if (format === "prgb") {
|
|
249
|
+
formattedString = this.toPercentageRgbString();
|
|
250
|
+
}
|
|
251
|
+
if (format === "hex" || format === "hex6") {
|
|
252
|
+
formattedString = this.toHexString();
|
|
253
|
+
}
|
|
254
|
+
if (format === "hex3") {
|
|
255
|
+
formattedString = this.toHexString(true);
|
|
256
|
+
}
|
|
257
|
+
if (format === "hex4") {
|
|
258
|
+
formattedString = this.toHex8String(true);
|
|
259
|
+
}
|
|
260
|
+
if (format === "hex8") {
|
|
261
|
+
formattedString = this.toHex8String();
|
|
262
|
+
}
|
|
263
|
+
if (format === "name") {
|
|
264
|
+
formattedString = this.toName();
|
|
265
|
+
}
|
|
266
|
+
if (format === "hsl") {
|
|
267
|
+
formattedString = this.toHslString();
|
|
268
|
+
}
|
|
269
|
+
if (format === "hsv") {
|
|
270
|
+
formattedString = this.toHsvString();
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return formattedString || this.toHexString();
|
|
219
274
|
},
|
|
220
|
-
clone: function() {
|
|
221
|
-
|
|
275
|
+
clone: function () {
|
|
276
|
+
return tinycolor(this.toString());
|
|
222
277
|
},
|
|
223
278
|
|
|
224
|
-
_applyModification: function(fn, args) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
279
|
+
_applyModification: function (fn, args) {
|
|
280
|
+
var color = fn.apply(null, [this].concat([].slice.call(args)));
|
|
281
|
+
this._r = color._r;
|
|
282
|
+
this._g = color._g;
|
|
283
|
+
this._b = color._b;
|
|
284
|
+
this.setAlpha(color._a);
|
|
285
|
+
return this;
|
|
231
286
|
},
|
|
232
|
-
lighten: function() {
|
|
233
|
-
|
|
287
|
+
lighten: function () {
|
|
288
|
+
return this._applyModification(lighten, arguments);
|
|
234
289
|
},
|
|
235
|
-
brighten: function() {
|
|
236
|
-
|
|
290
|
+
brighten: function () {
|
|
291
|
+
return this._applyModification(brighten, arguments);
|
|
237
292
|
},
|
|
238
|
-
darken: function() {
|
|
239
|
-
|
|
293
|
+
darken: function () {
|
|
294
|
+
return this._applyModification(darken, arguments);
|
|
240
295
|
},
|
|
241
|
-
desaturate: function() {
|
|
242
|
-
|
|
296
|
+
desaturate: function () {
|
|
297
|
+
return this._applyModification(desaturate, arguments);
|
|
243
298
|
},
|
|
244
|
-
saturate: function() {
|
|
245
|
-
|
|
299
|
+
saturate: function () {
|
|
300
|
+
return this._applyModification(saturate, arguments);
|
|
246
301
|
},
|
|
247
|
-
greyscale: function() {
|
|
248
|
-
|
|
302
|
+
greyscale: function () {
|
|
303
|
+
return this._applyModification(greyscale, arguments);
|
|
249
304
|
},
|
|
250
|
-
spin: function() {
|
|
251
|
-
|
|
305
|
+
spin: function () {
|
|
306
|
+
return this._applyModification(spin, arguments);
|
|
252
307
|
},
|
|
253
308
|
|
|
254
|
-
_applyCombination: function(fn, args) {
|
|
255
|
-
|
|
309
|
+
_applyCombination: function (fn, args) {
|
|
310
|
+
return fn.apply(null, [this].concat([].slice.call(args)));
|
|
256
311
|
},
|
|
257
|
-
analogous: function() {
|
|
258
|
-
|
|
312
|
+
analogous: function () {
|
|
313
|
+
return this._applyCombination(analogous, arguments);
|
|
259
314
|
},
|
|
260
|
-
complement: function() {
|
|
261
|
-
|
|
315
|
+
complement: function () {
|
|
316
|
+
return this._applyCombination(complement, arguments);
|
|
262
317
|
},
|
|
263
|
-
monochromatic: function() {
|
|
264
|
-
|
|
318
|
+
monochromatic: function () {
|
|
319
|
+
return this._applyCombination(monochromatic, arguments);
|
|
265
320
|
},
|
|
266
|
-
splitcomplement: function() {
|
|
267
|
-
|
|
321
|
+
splitcomplement: function () {
|
|
322
|
+
return this._applyCombination(splitcomplement, arguments);
|
|
268
323
|
},
|
|
269
|
-
|
|
270
|
-
|
|
324
|
+
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
325
|
+
// polyad: function (number) {
|
|
326
|
+
// return this._applyCombination(polyad, [number]);
|
|
327
|
+
// },
|
|
328
|
+
triad: function () {
|
|
329
|
+
return this._applyCombination(polyad, [3]);
|
|
271
330
|
},
|
|
272
|
-
tetrad: function() {
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
};
|
|
331
|
+
tetrad: function () {
|
|
332
|
+
return this._applyCombination(polyad, [4]);
|
|
333
|
+
},
|
|
334
|
+
};
|
|
276
335
|
|
|
277
|
-
// If input is an object, force 1 into "1.0" to handle ratios properly
|
|
278
|
-
// String input requires "1.0" as input, so 1 will be treated as 1
|
|
279
|
-
tinycolor.fromRatio = function(color, opts) {
|
|
336
|
+
// If input is an object, force 1 into "1.0" to handle ratios properly
|
|
337
|
+
// String input requires "1.0" as input, so 1 will be treated as 1
|
|
338
|
+
tinycolor.fromRatio = function (color, opts) {
|
|
280
339
|
if (typeof color == "object") {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
}
|
|
340
|
+
var newColor = {};
|
|
341
|
+
for (var i in color) {
|
|
342
|
+
if (color.hasOwnProperty(i)) {
|
|
343
|
+
if (i === "a") {
|
|
344
|
+
newColor[i] = color[i];
|
|
345
|
+
} else {
|
|
346
|
+
newColor[i] = convertToPercentage(color[i]);
|
|
347
|
+
}
|
|
291
348
|
}
|
|
292
|
-
|
|
349
|
+
}
|
|
350
|
+
color = newColor;
|
|
293
351
|
}
|
|
294
352
|
|
|
295
353
|
return tinycolor(color, opts);
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
// Given a string or object, convert that input to RGB
|
|
299
|
-
// Possible string inputs:
|
|
300
|
-
//
|
|
301
|
-
// "red"
|
|
302
|
-
// "#f00" or "f00"
|
|
303
|
-
// "#ff0000" or "ff0000"
|
|
304
|
-
// "#ff000000" or "ff000000"
|
|
305
|
-
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
|
306
|
-
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
|
307
|
-
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
|
308
|
-
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
|
309
|
-
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
|
310
|
-
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
|
311
|
-
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
|
312
|
-
//
|
|
313
|
-
function inputToRGB(color) {
|
|
314
|
-
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// Given a string or object, convert that input to RGB
|
|
357
|
+
// Possible string inputs:
|
|
358
|
+
//
|
|
359
|
+
// "red"
|
|
360
|
+
// "#f00" or "f00"
|
|
361
|
+
// "#ff0000" or "ff0000"
|
|
362
|
+
// "#ff000000" or "ff000000"
|
|
363
|
+
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
|
364
|
+
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
|
365
|
+
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
|
366
|
+
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
|
367
|
+
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
|
368
|
+
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
|
369
|
+
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
|
370
|
+
//
|
|
371
|
+
function inputToRGB(color) {
|
|
315
372
|
var rgb = { r: 0, g: 0, b: 0 };
|
|
316
373
|
var a = 1;
|
|
317
374
|
var s = null;
|
|
@@ -321,103 +378,119 @@ function inputToRGB(color) {
|
|
|
321
378
|
var format = false;
|
|
322
379
|
|
|
323
380
|
if (typeof color == "string") {
|
|
324
|
-
|
|
381
|
+
color = stringInputToObject(color);
|
|
325
382
|
}
|
|
326
383
|
|
|
327
384
|
if (typeof color == "object") {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
385
|
+
if (
|
|
386
|
+
isValidCSSUnit(color.r) &&
|
|
387
|
+
isValidCSSUnit(color.g) &&
|
|
388
|
+
isValidCSSUnit(color.b)
|
|
389
|
+
) {
|
|
390
|
+
rgb = rgbToRgb(color.r, color.g, color.b);
|
|
391
|
+
ok = true;
|
|
392
|
+
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
|
393
|
+
} else if (
|
|
394
|
+
isValidCSSUnit(color.h) &&
|
|
395
|
+
isValidCSSUnit(color.s) &&
|
|
396
|
+
isValidCSSUnit(color.v)
|
|
397
|
+
) {
|
|
398
|
+
s = convertToPercentage(color.s);
|
|
399
|
+
v = convertToPercentage(color.v);
|
|
400
|
+
rgb = hsvToRgb(color.h, s, v);
|
|
401
|
+
ok = true;
|
|
402
|
+
format = "hsv";
|
|
403
|
+
} else if (
|
|
404
|
+
isValidCSSUnit(color.h) &&
|
|
405
|
+
isValidCSSUnit(color.s) &&
|
|
406
|
+
isValidCSSUnit(color.l)
|
|
407
|
+
) {
|
|
408
|
+
s = convertToPercentage(color.s);
|
|
409
|
+
l = convertToPercentage(color.l);
|
|
410
|
+
rgb = hslToRgb(color.h, s, l);
|
|
411
|
+
ok = true;
|
|
412
|
+
format = "hsl";
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (color.hasOwnProperty("a")) {
|
|
416
|
+
a = color.a;
|
|
417
|
+
}
|
|
351
418
|
}
|
|
352
419
|
|
|
353
420
|
a = boundAlpha(a);
|
|
354
421
|
|
|
355
422
|
return {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
423
|
+
ok: ok,
|
|
424
|
+
format: color.format || format,
|
|
425
|
+
r: Math.min(255, Math.max(rgb.r, 0)),
|
|
426
|
+
g: Math.min(255, Math.max(rgb.g, 0)),
|
|
427
|
+
b: Math.min(255, Math.max(rgb.b, 0)),
|
|
428
|
+
a: a,
|
|
362
429
|
};
|
|
363
|
-
}
|
|
364
|
-
|
|
430
|
+
}
|
|
365
431
|
|
|
366
|
-
// Conversion Functions
|
|
367
|
-
// --------------------
|
|
432
|
+
// Conversion Functions
|
|
433
|
+
// --------------------
|
|
368
434
|
|
|
369
|
-
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
|
370
|
-
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
|
435
|
+
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
|
436
|
+
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
|
371
437
|
|
|
372
|
-
// `rgbToRgb`
|
|
373
|
-
// Handle bounds / percentage checking to conform to CSS color spec
|
|
374
|
-
// <http://www.w3.org/TR/css3-color/>
|
|
375
|
-
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
|
376
|
-
// *Returns:* { r, g, b } in [0, 255]
|
|
377
|
-
function rgbToRgb(r, g, b){
|
|
438
|
+
// `rgbToRgb`
|
|
439
|
+
// Handle bounds / percentage checking to conform to CSS color spec
|
|
440
|
+
// <http://www.w3.org/TR/css3-color/>
|
|
441
|
+
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
|
442
|
+
// *Returns:* { r, g, b } in [0, 255]
|
|
443
|
+
function rgbToRgb(r, g, b) {
|
|
378
444
|
return {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
445
|
+
r: bound01(r, 255) * 255,
|
|
446
|
+
g: bound01(g, 255) * 255,
|
|
447
|
+
b: bound01(b, 255) * 255,
|
|
382
448
|
};
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
// `rgbToHsl`
|
|
386
|
-
// Converts an RGB color value to HSL.
|
|
387
|
-
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
|
388
|
-
// *Returns:* { h, s, l } in [0,1]
|
|
389
|
-
function rgbToHsl(r, g, b) {
|
|
449
|
+
}
|
|
390
450
|
|
|
451
|
+
// `rgbToHsl`
|
|
452
|
+
// Converts an RGB color value to HSL.
|
|
453
|
+
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
|
454
|
+
// *Returns:* { h, s, l } in [0,1]
|
|
455
|
+
function rgbToHsl(r, g, b) {
|
|
391
456
|
r = bound01(r, 255);
|
|
392
457
|
g = bound01(g, 255);
|
|
393
458
|
b = bound01(b, 255);
|
|
394
459
|
|
|
395
|
-
var max =
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
460
|
+
var max = Math.max(r, g, b),
|
|
461
|
+
min = Math.min(r, g, b);
|
|
462
|
+
var h,
|
|
463
|
+
s,
|
|
464
|
+
l = (max + min) / 2;
|
|
465
|
+
|
|
466
|
+
if (max == min) {
|
|
467
|
+
h = s = 0; // achromatic
|
|
468
|
+
} else {
|
|
469
|
+
var d = max - min;
|
|
470
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
471
|
+
switch (max) {
|
|
472
|
+
case r:
|
|
473
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
474
|
+
break;
|
|
475
|
+
case g:
|
|
476
|
+
h = (b - r) / d + 2;
|
|
477
|
+
break;
|
|
478
|
+
case b:
|
|
479
|
+
h = (r - g) / d + 4;
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
h /= 6;
|
|
411
484
|
}
|
|
412
485
|
|
|
413
486
|
return { h: h, s: s, l: l };
|
|
414
|
-
}
|
|
487
|
+
}
|
|
415
488
|
|
|
416
|
-
// `hslToRgb`
|
|
417
|
-
// Converts an HSL color value to RGB.
|
|
418
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
|
419
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
420
|
-
function hslToRgb(h, s, l) {
|
|
489
|
+
// `hslToRgb`
|
|
490
|
+
// Converts an HSL color value to RGB.
|
|
491
|
+
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
|
492
|
+
// *Returns:* { r, g, b } in the set [0, 255]
|
|
493
|
+
function hslToRgb(h, s, l) {
|
|
421
494
|
var r, g, b;
|
|
422
495
|
|
|
423
496
|
h = bound01(h, 360);
|
|
@@ -425,255 +498,262 @@ function hslToRgb(h, s, l) {
|
|
|
425
498
|
l = bound01(l, 100);
|
|
426
499
|
|
|
427
500
|
function hue2rgb(p, q, t) {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
501
|
+
if (t < 0) t += 1;
|
|
502
|
+
if (t > 1) t -= 1;
|
|
503
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
504
|
+
if (t < 1 / 2) return q;
|
|
505
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
506
|
+
return p;
|
|
434
507
|
}
|
|
435
508
|
|
|
436
|
-
if(s === 0) {
|
|
437
|
-
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
b = hue2rgb(p, q, h - 1/3);
|
|
509
|
+
if (s === 0) {
|
|
510
|
+
r = g = b = l; // achromatic
|
|
511
|
+
} else {
|
|
512
|
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
513
|
+
var p = 2 * l - q;
|
|
514
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
515
|
+
g = hue2rgb(p, q, h);
|
|
516
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
445
517
|
}
|
|
446
518
|
|
|
447
519
|
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
// `rgbToHsv`
|
|
451
|
-
// Converts an RGB color value to HSV
|
|
452
|
-
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
453
|
-
// *Returns:* { h, s, v } in [0,1]
|
|
454
|
-
function rgbToHsv(r, g, b) {
|
|
520
|
+
}
|
|
455
521
|
|
|
522
|
+
// `rgbToHsv`
|
|
523
|
+
// Converts an RGB color value to HSV
|
|
524
|
+
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
525
|
+
// *Returns:* { h, s, v } in [0,1]
|
|
526
|
+
function rgbToHsv(r, g, b) {
|
|
456
527
|
r = bound01(r, 255);
|
|
457
528
|
g = bound01(g, 255);
|
|
458
529
|
b = bound01(b, 255);
|
|
459
530
|
|
|
460
|
-
var max =
|
|
461
|
-
|
|
531
|
+
var max = Math.max(r, g, b),
|
|
532
|
+
min = Math.min(r, g, b);
|
|
533
|
+
var h,
|
|
534
|
+
s,
|
|
535
|
+
v = max;
|
|
462
536
|
|
|
463
537
|
var d = max - min;
|
|
464
538
|
s = max === 0 ? 0 : d / max;
|
|
465
539
|
|
|
466
|
-
if(max == min) {
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
540
|
+
if (max == min) {
|
|
541
|
+
h = 0; // achromatic
|
|
542
|
+
} else {
|
|
543
|
+
switch (max) {
|
|
544
|
+
case r:
|
|
545
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
546
|
+
break;
|
|
547
|
+
case g:
|
|
548
|
+
h = (b - r) / d + 2;
|
|
549
|
+
break;
|
|
550
|
+
case b:
|
|
551
|
+
h = (r - g) / d + 4;
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
h /= 6;
|
|
476
555
|
}
|
|
477
556
|
return { h: h, s: s, v: v };
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// `hsvToRgb`
|
|
481
|
-
// Converts an HSV color value to RGB.
|
|
482
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
483
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
484
|
-
function hsvToRgb(h, s, v) {
|
|
557
|
+
}
|
|
485
558
|
|
|
559
|
+
// `hsvToRgb`
|
|
560
|
+
// Converts an HSV color value to RGB.
|
|
561
|
+
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
562
|
+
// *Returns:* { r, g, b } in the set [0, 255]
|
|
563
|
+
function hsvToRgb(h, s, v) {
|
|
486
564
|
h = bound01(h, 360) * 6;
|
|
487
565
|
s = bound01(s, 100);
|
|
488
566
|
v = bound01(v, 100);
|
|
489
567
|
|
|
490
568
|
var i = Math.floor(h),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
569
|
+
f = h - i,
|
|
570
|
+
p = v * (1 - s),
|
|
571
|
+
q = v * (1 - f * s),
|
|
572
|
+
t = v * (1 - (1 - f) * s),
|
|
573
|
+
mod = i % 6,
|
|
574
|
+
r = [v, q, p, p, t, v][mod],
|
|
575
|
+
g = [t, v, v, q, p, p][mod],
|
|
576
|
+
b = [p, p, t, v, v, q][mod];
|
|
499
577
|
|
|
500
578
|
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
// `rgbToHex`
|
|
504
|
-
// Converts an RGB color to hex
|
|
505
|
-
// Assumes r, g, and b are contained in the set [0, 255]
|
|
506
|
-
// Returns a 3 or 6 character hex
|
|
507
|
-
function rgbToHex(r, g, b, allow3Char) {
|
|
579
|
+
}
|
|
508
580
|
|
|
581
|
+
// `rgbToHex`
|
|
582
|
+
// Converts an RGB color to hex
|
|
583
|
+
// Assumes r, g, and b are contained in the set [0, 255]
|
|
584
|
+
// Returns a 3 or 6 character hex
|
|
585
|
+
function rgbToHex(r, g, b, allow3Char) {
|
|
509
586
|
var hex = [
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
587
|
+
pad2(Math.round(r).toString(16)),
|
|
588
|
+
pad2(Math.round(g).toString(16)),
|
|
589
|
+
pad2(Math.round(b).toString(16)),
|
|
513
590
|
];
|
|
514
591
|
|
|
515
592
|
// Return a 3 character hex if possible
|
|
516
|
-
if (
|
|
517
|
-
|
|
593
|
+
if (
|
|
594
|
+
allow3Char &&
|
|
595
|
+
hex[0].charAt(0) == hex[0].charAt(1) &&
|
|
596
|
+
hex[1].charAt(0) == hex[1].charAt(1) &&
|
|
597
|
+
hex[2].charAt(0) == hex[2].charAt(1)
|
|
598
|
+
) {
|
|
599
|
+
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
|
518
600
|
}
|
|
519
601
|
|
|
520
602
|
return hex.join("");
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// `rgbaToHex`
|
|
524
|
-
// Converts an RGBA color plus alpha transparency to hex
|
|
525
|
-
// Assumes r, g, b are contained in the set [0, 255] and
|
|
526
|
-
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
527
|
-
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
603
|
+
}
|
|
528
604
|
|
|
605
|
+
// `rgbaToHex`
|
|
606
|
+
// Converts an RGBA color plus alpha transparency to hex
|
|
607
|
+
// Assumes r, g, b are contained in the set [0, 255] and
|
|
608
|
+
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
609
|
+
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
529
610
|
var hex = [
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
611
|
+
pad2(Math.round(r).toString(16)),
|
|
612
|
+
pad2(Math.round(g).toString(16)),
|
|
613
|
+
pad2(Math.round(b).toString(16)),
|
|
614
|
+
pad2(convertDecimalToHex(a)),
|
|
534
615
|
];
|
|
535
616
|
|
|
536
617
|
// Return a 4 character hex if possible
|
|
537
|
-
if (
|
|
538
|
-
|
|
618
|
+
if (
|
|
619
|
+
allow4Char &&
|
|
620
|
+
hex[0].charAt(0) == hex[0].charAt(1) &&
|
|
621
|
+
hex[1].charAt(0) == hex[1].charAt(1) &&
|
|
622
|
+
hex[2].charAt(0) == hex[2].charAt(1) &&
|
|
623
|
+
hex[3].charAt(0) == hex[3].charAt(1)
|
|
624
|
+
) {
|
|
625
|
+
return (
|
|
626
|
+
hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0)
|
|
627
|
+
);
|
|
539
628
|
}
|
|
540
629
|
|
|
541
630
|
return hex.join("");
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
// `rgbaToArgbHex`
|
|
545
|
-
// Converts an RGBA color to an ARGB Hex8 string
|
|
546
|
-
// Rarely used, but required for "toFilter()"
|
|
547
|
-
function rgbaToArgbHex(r, g, b, a) {
|
|
631
|
+
}
|
|
548
632
|
|
|
633
|
+
// `rgbaToArgbHex`
|
|
634
|
+
// Converts an RGBA color to an ARGB Hex8 string
|
|
635
|
+
// Rarely used, but required for "toFilter()"
|
|
636
|
+
function rgbaToArgbHex(r, g, b, a) {
|
|
549
637
|
var hex = [
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
638
|
+
pad2(convertDecimalToHex(a)),
|
|
639
|
+
pad2(Math.round(r).toString(16)),
|
|
640
|
+
pad2(Math.round(g).toString(16)),
|
|
641
|
+
pad2(Math.round(b).toString(16)),
|
|
554
642
|
];
|
|
555
643
|
|
|
556
644
|
return hex.join("");
|
|
557
|
-
}
|
|
645
|
+
}
|
|
558
646
|
|
|
559
|
-
// `equals`
|
|
560
|
-
// Can be called with any tinycolor input
|
|
561
|
-
tinycolor.equals = function (color1, color2) {
|
|
562
|
-
if (!color1 || !color2)
|
|
647
|
+
// `equals`
|
|
648
|
+
// Can be called with any tinycolor input
|
|
649
|
+
tinycolor.equals = function (color1, color2) {
|
|
650
|
+
if (!color1 || !color2) return false;
|
|
563
651
|
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
|
|
564
|
-
};
|
|
652
|
+
};
|
|
565
653
|
|
|
566
|
-
tinycolor.random = function() {
|
|
654
|
+
tinycolor.random = function () {
|
|
567
655
|
return tinycolor.fromRatio({
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
656
|
+
r: Math.random(),
|
|
657
|
+
g: Math.random(),
|
|
658
|
+
b: Math.random(),
|
|
571
659
|
});
|
|
572
|
-
};
|
|
660
|
+
};
|
|
573
661
|
|
|
662
|
+
// Modification Functions
|
|
663
|
+
// ----------------------
|
|
664
|
+
// Thanks to less.js for some of the basics here
|
|
665
|
+
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
|
574
666
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
// Thanks to less.js for some of the basics here
|
|
578
|
-
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
|
579
|
-
|
|
580
|
-
function desaturate(color, amount) {
|
|
581
|
-
amount = (amount === 0) ? 0 : (amount || 10);
|
|
667
|
+
function desaturate(color, amount) {
|
|
668
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
582
669
|
var hsl = tinycolor(color).toHsl();
|
|
583
670
|
hsl.s -= amount / 100;
|
|
584
671
|
hsl.s = clamp01(hsl.s);
|
|
585
672
|
return tinycolor(hsl);
|
|
586
|
-
}
|
|
673
|
+
}
|
|
587
674
|
|
|
588
|
-
function saturate(color, amount) {
|
|
589
|
-
amount =
|
|
675
|
+
function saturate(color, amount) {
|
|
676
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
590
677
|
var hsl = tinycolor(color).toHsl();
|
|
591
678
|
hsl.s += amount / 100;
|
|
592
679
|
hsl.s = clamp01(hsl.s);
|
|
593
680
|
return tinycolor(hsl);
|
|
594
|
-
}
|
|
681
|
+
}
|
|
595
682
|
|
|
596
|
-
function greyscale(color) {
|
|
683
|
+
function greyscale(color) {
|
|
597
684
|
return tinycolor(color).desaturate(100);
|
|
598
|
-
}
|
|
685
|
+
}
|
|
599
686
|
|
|
600
|
-
function lighten
|
|
601
|
-
amount =
|
|
687
|
+
function lighten(color, amount) {
|
|
688
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
602
689
|
var hsl = tinycolor(color).toHsl();
|
|
603
690
|
hsl.l += amount / 100;
|
|
604
691
|
hsl.l = clamp01(hsl.l);
|
|
605
692
|
return tinycolor(hsl);
|
|
606
|
-
}
|
|
693
|
+
}
|
|
607
694
|
|
|
608
|
-
function brighten(color, amount) {
|
|
609
|
-
amount =
|
|
695
|
+
function brighten(color, amount) {
|
|
696
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
610
697
|
var rgb = tinycolor(color).toRgb();
|
|
611
|
-
rgb.r =
|
|
612
|
-
rgb.g =
|
|
613
|
-
rgb.b =
|
|
698
|
+
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
|
|
699
|
+
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
|
|
700
|
+
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
|
|
614
701
|
return tinycolor(rgb);
|
|
615
|
-
}
|
|
702
|
+
}
|
|
616
703
|
|
|
617
|
-
function darken
|
|
618
|
-
amount =
|
|
704
|
+
function darken(color, amount) {
|
|
705
|
+
amount = amount === 0 ? 0 : amount || 10;
|
|
619
706
|
var hsl = tinycolor(color).toHsl();
|
|
620
707
|
hsl.l -= amount / 100;
|
|
621
708
|
hsl.l = clamp01(hsl.l);
|
|
622
709
|
return tinycolor(hsl);
|
|
623
|
-
}
|
|
710
|
+
}
|
|
624
711
|
|
|
625
|
-
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
626
|
-
// Values outside of this range will be wrapped into this range.
|
|
627
|
-
function spin(color, amount) {
|
|
712
|
+
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
713
|
+
// Values outside of this range will be wrapped into this range.
|
|
714
|
+
function spin(color, amount) {
|
|
628
715
|
var hsl = tinycolor(color).toHsl();
|
|
629
716
|
var hue = (hsl.h + amount) % 360;
|
|
630
717
|
hsl.h = hue < 0 ? 360 + hue : hue;
|
|
631
718
|
return tinycolor(hsl);
|
|
632
|
-
}
|
|
719
|
+
}
|
|
633
720
|
|
|
634
|
-
// Combination Functions
|
|
635
|
-
// ---------------------
|
|
636
|
-
// Thanks to jQuery xColor for some of the ideas behind these
|
|
637
|
-
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
|
721
|
+
// Combination Functions
|
|
722
|
+
// ---------------------
|
|
723
|
+
// Thanks to jQuery xColor for some of the ideas behind these
|
|
724
|
+
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
|
638
725
|
|
|
639
|
-
function complement(color) {
|
|
726
|
+
function complement(color) {
|
|
640
727
|
var hsl = tinycolor(color).toHsl();
|
|
641
728
|
hsl.h = (hsl.h + 180) % 360;
|
|
642
729
|
return tinycolor(hsl);
|
|
643
|
-
}
|
|
730
|
+
}
|
|
644
731
|
|
|
645
|
-
function
|
|
732
|
+
function polyad(color, number) {
|
|
733
|
+
if (isNaN(number) || number <= 0) {
|
|
734
|
+
throw new Error("Argument to polyad must be a positive number");
|
|
735
|
+
}
|
|
646
736
|
var hsl = tinycolor(color).toHsl();
|
|
647
|
-
var
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
];
|
|
653
|
-
}
|
|
737
|
+
var result = [tinycolor(color)];
|
|
738
|
+
var step = 360 / number;
|
|
739
|
+
for (var i = 1; i < number; i++) {
|
|
740
|
+
result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l }));
|
|
741
|
+
}
|
|
654
742
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
var h = hsl.h;
|
|
658
|
-
return [
|
|
659
|
-
tinycolor(color),
|
|
660
|
-
tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
|
|
661
|
-
tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
|
|
662
|
-
tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
|
|
663
|
-
];
|
|
664
|
-
}
|
|
743
|
+
return result;
|
|
744
|
+
}
|
|
665
745
|
|
|
666
|
-
function splitcomplement(color) {
|
|
746
|
+
function splitcomplement(color) {
|
|
667
747
|
var hsl = tinycolor(color).toHsl();
|
|
668
748
|
var h = hsl.h;
|
|
669
749
|
return [
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
750
|
+
tinycolor(color),
|
|
751
|
+
tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
|
|
752
|
+
tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),
|
|
673
753
|
];
|
|
674
|
-
}
|
|
754
|
+
}
|
|
675
755
|
|
|
676
|
-
function analogous(color, results, slices) {
|
|
756
|
+
function analogous(color, results, slices) {
|
|
677
757
|
results = results || 6;
|
|
678
758
|
slices = slices || 30;
|
|
679
759
|
|
|
@@ -681,33 +761,35 @@ function analogous(color, results, slices) {
|
|
|
681
761
|
var part = 360 / slices;
|
|
682
762
|
var ret = [tinycolor(color)];
|
|
683
763
|
|
|
684
|
-
for (hsl.h = (
|
|
685
|
-
|
|
686
|
-
|
|
764
|
+
for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {
|
|
765
|
+
hsl.h = (hsl.h + part) % 360;
|
|
766
|
+
ret.push(tinycolor(hsl));
|
|
687
767
|
}
|
|
688
768
|
return ret;
|
|
689
|
-
}
|
|
769
|
+
}
|
|
690
770
|
|
|
691
|
-
function monochromatic(color, results) {
|
|
771
|
+
function monochromatic(color, results) {
|
|
692
772
|
results = results || 6;
|
|
693
773
|
var hsv = tinycolor(color).toHsv();
|
|
694
|
-
var h = hsv.h,
|
|
774
|
+
var h = hsv.h,
|
|
775
|
+
s = hsv.s,
|
|
776
|
+
v = hsv.v;
|
|
695
777
|
var ret = [];
|
|
696
778
|
var modification = 1 / results;
|
|
697
779
|
|
|
698
780
|
while (results--) {
|
|
699
|
-
|
|
700
|
-
|
|
781
|
+
ret.push(tinycolor({ h: h, s: s, v: v }));
|
|
782
|
+
v = (v + modification) % 1;
|
|
701
783
|
}
|
|
702
784
|
|
|
703
785
|
return ret;
|
|
704
|
-
}
|
|
786
|
+
}
|
|
705
787
|
|
|
706
|
-
// Utility Functions
|
|
707
|
-
// ---------------------
|
|
788
|
+
// Utility Functions
|
|
789
|
+
// ---------------------
|
|
708
790
|
|
|
709
|
-
tinycolor.mix = function(color1, color2, amount) {
|
|
710
|
-
amount =
|
|
791
|
+
tinycolor.mix = function (color1, color2, amount) {
|
|
792
|
+
amount = amount === 0 ? 0 : amount || 50;
|
|
711
793
|
|
|
712
794
|
var rgb1 = tinycolor(color1).toRgb();
|
|
713
795
|
var rgb2 = tinycolor(color2).toRgb();
|
|
@@ -715,39 +797,41 @@ tinycolor.mix = function(color1, color2, amount) {
|
|
|
715
797
|
var p = amount / 100;
|
|
716
798
|
|
|
717
799
|
var rgba = {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
800
|
+
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
801
|
+
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
802
|
+
b: (rgb2.b - rgb1.b) * p + rgb1.b,
|
|
803
|
+
a: (rgb2.a - rgb1.a) * p + rgb1.a,
|
|
722
804
|
};
|
|
723
805
|
|
|
724
806
|
return tinycolor(rgba);
|
|
725
|
-
};
|
|
726
|
-
|
|
807
|
+
};
|
|
727
808
|
|
|
728
|
-
// Readability Functions
|
|
729
|
-
// ---------------------
|
|
730
|
-
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
809
|
+
// Readability Functions
|
|
810
|
+
// ---------------------
|
|
811
|
+
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
731
812
|
|
|
732
|
-
// `contrast`
|
|
733
|
-
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
734
|
-
tinycolor.readability = function(color1, color2) {
|
|
813
|
+
// `contrast`
|
|
814
|
+
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
815
|
+
tinycolor.readability = function (color1, color2) {
|
|
735
816
|
var c1 = tinycolor(color1);
|
|
736
817
|
var c2 = tinycolor(color2);
|
|
737
|
-
return (
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
//
|
|
744
|
-
//
|
|
745
|
-
//
|
|
746
|
-
|
|
747
|
-
//
|
|
748
|
-
//
|
|
749
|
-
|
|
750
|
-
|
|
818
|
+
return (
|
|
819
|
+
(Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) /
|
|
820
|
+
(Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05)
|
|
821
|
+
);
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
// `isReadable`
|
|
825
|
+
// Ensure that foreground and background color combinations meet WCAG2 guidelines.
|
|
826
|
+
// The third argument is an optional Object.
|
|
827
|
+
// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
|
|
828
|
+
// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
|
|
829
|
+
// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
|
|
830
|
+
|
|
831
|
+
// *Example*
|
|
832
|
+
// tinycolor.isReadable("#000", "#111") => false
|
|
833
|
+
// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
|
|
834
|
+
tinycolor.isReadable = function (color1, color2, wcag2) {
|
|
751
835
|
var readability = tinycolor.readability(color1, color2);
|
|
752
836
|
var wcag2Parms, out;
|
|
753
837
|
|
|
@@ -755,62 +839,65 @@ tinycolor.isReadable = function(color1, color2, wcag2) {
|
|
|
755
839
|
|
|
756
840
|
wcag2Parms = validateWCAG2Parms(wcag2);
|
|
757
841
|
switch (wcag2Parms.level + wcag2Parms.size) {
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
842
|
+
case "AAsmall":
|
|
843
|
+
case "AAAlarge":
|
|
844
|
+
out = readability >= 4.5;
|
|
845
|
+
break;
|
|
846
|
+
case "AAlarge":
|
|
847
|
+
out = readability >= 3;
|
|
848
|
+
break;
|
|
849
|
+
case "AAAsmall":
|
|
850
|
+
out = readability >= 7;
|
|
851
|
+
break;
|
|
768
852
|
}
|
|
769
853
|
return out;
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
//
|
|
774
|
-
//
|
|
775
|
-
//
|
|
776
|
-
//
|
|
777
|
-
//
|
|
778
|
-
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:
|
|
779
|
-
// tinycolor.mostReadable(
|
|
780
|
-
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"
|
|
781
|
-
|
|
782
|
-
tinycolor.mostReadable = function(baseColor, colorList, args) {
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
// `mostReadable`
|
|
857
|
+
// Given a base color and a list of possible foreground or background
|
|
858
|
+
// colors for that base, returns the most readable color.
|
|
859
|
+
// Optionally returns Black or White if the most readable color is unreadable.
|
|
860
|
+
// *Example*
|
|
861
|
+
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
|
|
862
|
+
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
|
|
863
|
+
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
|
|
864
|
+
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
|
|
865
|
+
tinycolor.mostReadable = function (baseColor, colorList, args) {
|
|
783
866
|
var bestColor = null;
|
|
784
867
|
var bestScore = 0;
|
|
785
868
|
var readability;
|
|
786
|
-
var includeFallbackColors, level, size
|
|
869
|
+
var includeFallbackColors, level, size;
|
|
787
870
|
args = args || {};
|
|
788
|
-
includeFallbackColors = args.includeFallbackColors
|
|
871
|
+
includeFallbackColors = args.includeFallbackColors;
|
|
789
872
|
level = args.level;
|
|
790
873
|
size = args.size;
|
|
791
874
|
|
|
792
|
-
for (var i= 0; i < colorList.length
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
875
|
+
for (var i = 0; i < colorList.length; i++) {
|
|
876
|
+
readability = tinycolor.readability(baseColor, colorList[i]);
|
|
877
|
+
if (readability > bestScore) {
|
|
878
|
+
bestScore = readability;
|
|
879
|
+
bestColor = tinycolor(colorList[i]);
|
|
880
|
+
}
|
|
798
881
|
}
|
|
799
882
|
|
|
800
|
-
if (
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
883
|
+
if (
|
|
884
|
+
tinycolor.isReadable(baseColor, bestColor, {
|
|
885
|
+
level: level,
|
|
886
|
+
size: size,
|
|
887
|
+
}) ||
|
|
888
|
+
!includeFallbackColors
|
|
889
|
+
) {
|
|
890
|
+
return bestColor;
|
|
891
|
+
} else {
|
|
892
|
+
args.includeFallbackColors = false;
|
|
893
|
+
return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
|
|
806
894
|
}
|
|
807
|
-
};
|
|
808
|
-
|
|
895
|
+
};
|
|
809
896
|
|
|
810
|
-
// Big List of Colors
|
|
811
|
-
// ------------------
|
|
812
|
-
// <
|
|
813
|
-
var names = tinycolor.names = {
|
|
897
|
+
// Big List of Colors
|
|
898
|
+
// ------------------
|
|
899
|
+
// <https://www.w3.org/TR/css-color-4/#named-colors>
|
|
900
|
+
var names = (tinycolor.names = {
|
|
814
901
|
aliceblue: "f0f8ff",
|
|
815
902
|
antiquewhite: "faebd7",
|
|
816
903
|
aqua: "0ff",
|
|
@@ -959,105 +1046,103 @@ var names = tinycolor.names = {
|
|
|
959
1046
|
white: "fff",
|
|
960
1047
|
whitesmoke: "f5f5f5",
|
|
961
1048
|
yellow: "ff0",
|
|
962
|
-
yellowgreen: "9acd32"
|
|
963
|
-
};
|
|
964
|
-
|
|
965
|
-
// Make it easy to access colors via `hexNames[hex]`
|
|
966
|
-
var hexNames = tinycolor.hexNames = flip(names);
|
|
1049
|
+
yellowgreen: "9acd32",
|
|
1050
|
+
});
|
|
967
1051
|
|
|
1052
|
+
// Make it easy to access colors via `hexNames[hex]`
|
|
1053
|
+
var hexNames = (tinycolor.hexNames = flip(names));
|
|
968
1054
|
|
|
969
|
-
// Utilities
|
|
970
|
-
// ---------
|
|
1055
|
+
// Utilities
|
|
1056
|
+
// ---------
|
|
971
1057
|
|
|
972
|
-
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
|
973
|
-
function flip(o) {
|
|
974
|
-
var flipped = {
|
|
1058
|
+
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
|
1059
|
+
function flip(o) {
|
|
1060
|
+
var flipped = {};
|
|
975
1061
|
for (var i in o) {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1062
|
+
if (o.hasOwnProperty(i)) {
|
|
1063
|
+
flipped[o[i]] = i;
|
|
1064
|
+
}
|
|
979
1065
|
}
|
|
980
1066
|
return flipped;
|
|
981
|
-
}
|
|
1067
|
+
}
|
|
982
1068
|
|
|
983
|
-
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
|
984
|
-
function boundAlpha(a) {
|
|
1069
|
+
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
|
1070
|
+
function boundAlpha(a) {
|
|
985
1071
|
a = parseFloat(a);
|
|
986
1072
|
|
|
987
1073
|
if (isNaN(a) || a < 0 || a > 1) {
|
|
988
|
-
|
|
1074
|
+
a = 1;
|
|
989
1075
|
}
|
|
990
1076
|
|
|
991
1077
|
return a;
|
|
992
|
-
}
|
|
1078
|
+
}
|
|
993
1079
|
|
|
994
|
-
// Take input from [0, n] and return it as [0, 1]
|
|
995
|
-
function bound01(n, max) {
|
|
996
|
-
if (isOnePointZero(n))
|
|
1080
|
+
// Take input from [0, n] and return it as [0, 1]
|
|
1081
|
+
function bound01(n, max) {
|
|
1082
|
+
if (isOnePointZero(n)) n = "100%";
|
|
997
1083
|
|
|
998
1084
|
var processPercent = isPercentage(n);
|
|
999
|
-
n =
|
|
1085
|
+
n = Math.min(max, Math.max(0, parseFloat(n)));
|
|
1000
1086
|
|
|
1001
1087
|
// Automatically convert percentage into number
|
|
1002
1088
|
if (processPercent) {
|
|
1003
|
-
|
|
1089
|
+
n = parseInt(n * max, 10) / 100;
|
|
1004
1090
|
}
|
|
1005
1091
|
|
|
1006
1092
|
// Handle floating point rounding errors
|
|
1007
|
-
if (
|
|
1008
|
-
|
|
1093
|
+
if (Math.abs(n - max) < 0.000001) {
|
|
1094
|
+
return 1;
|
|
1009
1095
|
}
|
|
1010
1096
|
|
|
1011
1097
|
// Convert into [0, 1] range if it isn't already
|
|
1012
1098
|
return (n % max) / parseFloat(max);
|
|
1013
|
-
}
|
|
1099
|
+
}
|
|
1014
1100
|
|
|
1015
|
-
// Force a number between 0 and 1
|
|
1016
|
-
function clamp01(val) {
|
|
1017
|
-
return
|
|
1018
|
-
}
|
|
1101
|
+
// Force a number between 0 and 1
|
|
1102
|
+
function clamp01(val) {
|
|
1103
|
+
return Math.min(1, Math.max(0, val));
|
|
1104
|
+
}
|
|
1019
1105
|
|
|
1020
|
-
// Parse a base-16 hex value into a base-10 integer
|
|
1021
|
-
function parseIntFromHex(val) {
|
|
1106
|
+
// Parse a base-16 hex value into a base-10 integer
|
|
1107
|
+
function parseIntFromHex(val) {
|
|
1022
1108
|
return parseInt(val, 16);
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
1026
|
-
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
1027
|
-
function isOnePointZero(n) {
|
|
1028
|
-
return typeof n == "string" && n.indexOf(
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
// Check to see if string passed in is a percentage
|
|
1032
|
-
function isPercentage(n) {
|
|
1033
|
-
return typeof n === "string" && n.indexOf(
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// Force a hex value to have 2 characters
|
|
1037
|
-
function pad2(c) {
|
|
1038
|
-
return c.length == 1 ?
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
// Replace a decimal with it's percentage value
|
|
1042
|
-
function convertToPercentage(n) {
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
1112
|
+
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
1113
|
+
function isOnePointZero(n) {
|
|
1114
|
+
return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
// Check to see if string passed in is a percentage
|
|
1118
|
+
function isPercentage(n) {
|
|
1119
|
+
return typeof n === "string" && n.indexOf("%") != -1;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
// Force a hex value to have 2 characters
|
|
1123
|
+
function pad2(c) {
|
|
1124
|
+
return c.length == 1 ? "0" + c : "" + c;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
// Replace a decimal with it's percentage value
|
|
1128
|
+
function convertToPercentage(n) {
|
|
1043
1129
|
if (n <= 1) {
|
|
1044
|
-
|
|
1130
|
+
n = n * 100 + "%";
|
|
1045
1131
|
}
|
|
1046
1132
|
|
|
1047
1133
|
return n;
|
|
1048
|
-
}
|
|
1134
|
+
}
|
|
1049
1135
|
|
|
1050
|
-
// Converts a decimal to a hex value
|
|
1051
|
-
function convertDecimalToHex(d) {
|
|
1136
|
+
// Converts a decimal to a hex value
|
|
1137
|
+
function convertDecimalToHex(d) {
|
|
1052
1138
|
return Math.round(parseFloat(d) * 255).toString(16);
|
|
1053
|
-
}
|
|
1054
|
-
// Converts a hex value to a decimal
|
|
1055
|
-
function convertHexToDecimal(h) {
|
|
1056
|
-
return
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
var matchers = (function() {
|
|
1139
|
+
}
|
|
1140
|
+
// Converts a hex value to a decimal
|
|
1141
|
+
function convertHexToDecimal(h) {
|
|
1142
|
+
return parseIntFromHex(h) / 255;
|
|
1143
|
+
}
|
|
1060
1144
|
|
|
1145
|
+
var matchers = (function () {
|
|
1061
1146
|
// <http://www.w3.org/TR/css3-values/#integers>
|
|
1062
1147
|
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
|
1063
1148
|
|
|
@@ -1070,44 +1155,58 @@ var matchers = (function() {
|
|
|
1070
1155
|
// Actual matching.
|
|
1071
1156
|
// Parentheses and commas are optional, but not required.
|
|
1072
1157
|
// Whitespace can take the place of commas or opening paren
|
|
1073
|
-
var PERMISSIVE_MATCH3 =
|
|
1074
|
-
|
|
1158
|
+
var PERMISSIVE_MATCH3 =
|
|
1159
|
+
"[\\s|\\(]+(" +
|
|
1160
|
+
CSS_UNIT +
|
|
1161
|
+
")[,|\\s]+(" +
|
|
1162
|
+
CSS_UNIT +
|
|
1163
|
+
")[,|\\s]+(" +
|
|
1164
|
+
CSS_UNIT +
|
|
1165
|
+
")\\s*\\)?";
|
|
1166
|
+
var PERMISSIVE_MATCH4 =
|
|
1167
|
+
"[\\s|\\(]+(" +
|
|
1168
|
+
CSS_UNIT +
|
|
1169
|
+
")[,|\\s]+(" +
|
|
1170
|
+
CSS_UNIT +
|
|
1171
|
+
")[,|\\s]+(" +
|
|
1172
|
+
CSS_UNIT +
|
|
1173
|
+
")[,|\\s]+(" +
|
|
1174
|
+
CSS_UNIT +
|
|
1175
|
+
")\\s*\\)?";
|
|
1075
1176
|
|
|
1076
1177
|
return {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1178
|
+
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
1179
|
+
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
|
1180
|
+
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
|
1181
|
+
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
|
1182
|
+
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
|
1183
|
+
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
|
1184
|
+
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
|
1185
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1186
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1187
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1188
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1088
1189
|
};
|
|
1089
|
-
})();
|
|
1190
|
+
})();
|
|
1090
1191
|
|
|
1091
|
-
// `isValidCSSUnit`
|
|
1092
|
-
// Take in a single string / number and check to see if it looks like a CSS unit
|
|
1093
|
-
// (see `matchers` above for definition).
|
|
1094
|
-
function isValidCSSUnit(color) {
|
|
1192
|
+
// `isValidCSSUnit`
|
|
1193
|
+
// Take in a single string / number and check to see if it looks like a CSS unit
|
|
1194
|
+
// (see `matchers` above for definition).
|
|
1195
|
+
function isValidCSSUnit(color) {
|
|
1095
1196
|
return !!matchers.CSS_UNIT.exec(color);
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
// `stringInputToObject`
|
|
1099
|
-
// Permissive string parsing. Take in a number of formats, and output an object
|
|
1100
|
-
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
|
1101
|
-
function stringInputToObject(color) {
|
|
1197
|
+
}
|
|
1102
1198
|
|
|
1103
|
-
|
|
1199
|
+
// `stringInputToObject`
|
|
1200
|
+
// Permissive string parsing. Take in a number of formats, and output an object
|
|
1201
|
+
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
|
1202
|
+
function stringInputToObject(color) {
|
|
1203
|
+
color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
|
|
1104
1204
|
var named = false;
|
|
1105
1205
|
if (names[color]) {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1206
|
+
color = names[color];
|
|
1207
|
+
named = true;
|
|
1208
|
+
} else if (color == "transparent") {
|
|
1209
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1111
1210
|
}
|
|
1112
1211
|
|
|
1113
1212
|
// Try to match string input using regular expressions.
|
|
@@ -1116,87 +1215,80 @@ function stringInputToObject(color) {
|
|
|
1116
1215
|
// This way the result will be the same whether the tinycolor is initialized with string or object.
|
|
1117
1216
|
var match;
|
|
1118
1217
|
if ((match = matchers.rgb.exec(color))) {
|
|
1119
|
-
|
|
1218
|
+
return { r: match[1], g: match[2], b: match[3] };
|
|
1120
1219
|
}
|
|
1121
1220
|
if ((match = matchers.rgba.exec(color))) {
|
|
1122
|
-
|
|
1221
|
+
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
|
1123
1222
|
}
|
|
1124
1223
|
if ((match = matchers.hsl.exec(color))) {
|
|
1125
|
-
|
|
1224
|
+
return { h: match[1], s: match[2], l: match[3] };
|
|
1126
1225
|
}
|
|
1127
1226
|
if ((match = matchers.hsla.exec(color))) {
|
|
1128
|
-
|
|
1227
|
+
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
|
1129
1228
|
}
|
|
1130
1229
|
if ((match = matchers.hsv.exec(color))) {
|
|
1131
|
-
|
|
1230
|
+
return { h: match[1], s: match[2], v: match[3] };
|
|
1132
1231
|
}
|
|
1133
1232
|
if ((match = matchers.hsva.exec(color))) {
|
|
1134
|
-
|
|
1233
|
+
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
|
1135
1234
|
}
|
|
1136
1235
|
if ((match = matchers.hex8.exec(color))) {
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1236
|
+
return {
|
|
1237
|
+
r: parseIntFromHex(match[1]),
|
|
1238
|
+
g: parseIntFromHex(match[2]),
|
|
1239
|
+
b: parseIntFromHex(match[3]),
|
|
1240
|
+
a: convertHexToDecimal(match[4]),
|
|
1241
|
+
format: named ? "name" : "hex8",
|
|
1242
|
+
};
|
|
1144
1243
|
}
|
|
1145
1244
|
if ((match = matchers.hex6.exec(color))) {
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1245
|
+
return {
|
|
1246
|
+
r: parseIntFromHex(match[1]),
|
|
1247
|
+
g: parseIntFromHex(match[2]),
|
|
1248
|
+
b: parseIntFromHex(match[3]),
|
|
1249
|
+
format: named ? "name" : "hex",
|
|
1250
|
+
};
|
|
1152
1251
|
}
|
|
1153
1252
|
if ((match = matchers.hex4.exec(color))) {
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1253
|
+
return {
|
|
1254
|
+
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1255
|
+
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1256
|
+
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1257
|
+
a: convertHexToDecimal(match[4] + "" + match[4]),
|
|
1258
|
+
format: named ? "name" : "hex8",
|
|
1259
|
+
};
|
|
1161
1260
|
}
|
|
1162
1261
|
if ((match = matchers.hex3.exec(color))) {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1262
|
+
return {
|
|
1263
|
+
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1264
|
+
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1265
|
+
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1266
|
+
format: named ? "name" : "hex",
|
|
1267
|
+
};
|
|
1169
1268
|
}
|
|
1170
1269
|
|
|
1171
1270
|
return false;
|
|
1172
|
-
}
|
|
1271
|
+
}
|
|
1173
1272
|
|
|
1174
|
-
function validateWCAG2Parms(parms) {
|
|
1273
|
+
function validateWCAG2Parms(parms) {
|
|
1175
1274
|
// return valid WCAG2 parms for isReadable.
|
|
1176
1275
|
// If input parms are invalid, return {"level":"AA", "size":"small"}
|
|
1177
1276
|
var level, size;
|
|
1178
|
-
parms = parms || {
|
|
1277
|
+
parms = parms || { level: "AA", size: "small" };
|
|
1179
1278
|
level = (parms.level || "AA").toUpperCase();
|
|
1180
1279
|
size = (parms.size || "small").toLowerCase();
|
|
1181
1280
|
if (level !== "AA" && level !== "AAA") {
|
|
1182
|
-
|
|
1281
|
+
level = "AA";
|
|
1183
1282
|
}
|
|
1184
1283
|
if (size !== "small" && size !== "large") {
|
|
1185
|
-
|
|
1284
|
+
size = "small";
|
|
1186
1285
|
}
|
|
1187
|
-
return {
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
}
|
|
1194
|
-
// AMD/requirejs: Define the module
|
|
1195
|
-
else {
|
|
1196
|
-
window.tinycolor = tinycolor;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
})(Math);
|
|
1286
|
+
return { level: level, size: size };
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
return tinycolor;
|
|
1290
|
+
|
|
1291
|
+
}));
|
|
1200
1292
|
});
|
|
1201
1293
|
|
|
1202
1294
|
const E = {
|