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