@qhealth-design-system/core 1.0.38
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/.babelrc +15 -0
- package/.browserslistrc +5 -0
- package/.editorconfig +19 -0
- package/.eslintignore +1 -0
- package/.eslintrc +25 -0
- package/.gitattributes +2 -0
- package/.github/workflows/release_package.yml +103 -0
- package/CHANGELOG.md +14 -0
- package/README.md +534 -0
- package/dist/api/service_finder/schemas.json +1 -0
- package/dist/component-abstract.html +884 -0
- package/dist/component-accordion.html +1157 -0
- package/dist/component-banner.html +928 -0
- package/dist/component-banner_advanced.html +1524 -0
- package/dist/component-banner_basic.html +1189 -0
- package/dist/component-banner_intermediate.html +1288 -0
- package/dist/component-body.html +919 -0
- package/dist/component-breadcrumbs.html +881 -0
- package/dist/component-btn.html +829 -0
- package/dist/component-callout.html +964 -0
- package/dist/component-card_feature.html +1805 -0
- package/dist/component-card_multi_action.html +1965 -0
- package/dist/component-card_no_action.html +1632 -0
- package/dist/component-card_single_action.html +1772 -0
- package/dist/component-code.html +928 -0
- package/dist/component-footer.html +1131 -0
- package/dist/component-forms.html +1297 -0
- package/dist/component-global-elements.html +1243 -0
- package/dist/component-global_alert.html +891 -0
- package/dist/component-header.html +1155 -0
- package/dist/component-in_page_navigation.html +920 -0
- package/dist/component-internal_navigation.html +1097 -0
- package/dist/component-left_hand_navigation.html +995 -0
- package/dist/component-main_navigation.html +999 -0
- package/dist/component-mega_main_navigation.html +1145 -0
- package/dist/component-multi_column.html +1116 -0
- package/dist/component-page_alert.html +911 -0
- package/dist/component-pagination.html +971 -0
- package/dist/component-tag_list.html +979 -0
- package/dist/component-updated_date.html +778 -0
- package/dist/component-widgets.html +851 -0
- package/dist/components/_global/import.xml +95 -0
- package/dist/components/_global/manifest.json +11 -0
- package/dist/components/_global/presentation.js +50 -0
- package/dist/components/_global/static.html +30 -0
- package/dist/components/_template/import.xml +299 -0
- package/dist/components/_template/manifest.json +40 -0
- package/dist/components/_template/presentation.js +12 -0
- package/dist/components/_template/static.html +4 -0
- package/dist/components/abstract/import.xml +231 -0
- package/dist/components/abstract/manifest.json +29 -0
- package/dist/components/abstract/presentation.js +33 -0
- package/dist/components/abstract/static.html +9 -0
- package/dist/components/accordion/import.xml +1929 -0
- package/dist/components/accordion/manifest.json +427 -0
- package/dist/components/accordion/presentation.js +112 -0
- package/dist/components/accordion/static.html +56 -0
- package/dist/components/banner/import.xml +95 -0
- package/dist/components/banner/manifest.json +11 -0
- package/dist/components/banner/presentation.js +138 -0
- package/dist/components/banner/static.html +39 -0
- package/dist/components/banner_advanced/import.xml +1969 -0
- package/dist/components/banner_advanced/manifest.json +1450 -0
- package/dist/components/banner_advanced/presentation.js +564 -0
- package/dist/components/banner_advanced/static.html +159 -0
- package/dist/components/banner_basic/import.xml +907 -0
- package/dist/components/banner_basic/manifest.json +151 -0
- package/dist/components/banner_basic/presentation.js +325 -0
- package/dist/components/banner_basic/static.html +86 -0
- package/dist/components/banner_intermediate/import.xml +1473 -0
- package/dist/components/banner_intermediate/manifest.json +248 -0
- package/dist/components/banner_intermediate/presentation.js +410 -0
- package/dist/components/banner_intermediate/static.html +102 -0
- package/dist/components/body/import.xml +343 -0
- package/dist/components/body/manifest.json +46 -0
- package/dist/components/body/presentation.js +37 -0
- package/dist/components/body/static.html +5 -0
- package/dist/components/breadcrumbs/import.xml +95 -0
- package/dist/components/breadcrumbs/manifest.json +9 -0
- package/dist/components/breadcrumbs/presentation.js +99 -0
- package/dist/components/breadcrumbs/static.html +21 -0
- package/dist/components/callout/import.xml +953 -0
- package/dist/components/callout/manifest.json +121 -0
- package/dist/components/callout/presentation.js +103 -0
- package/dist/components/callout/static.html +10 -0
- package/dist/components/card_feature/import.xml +2355 -0
- package/dist/components/card_feature/manifest.json +1390 -0
- package/dist/components/card_feature/presentation.js +365 -0
- package/dist/components/card_feature/static.html +80 -0
- package/dist/components/card_multi_action/import.xml +1539 -0
- package/dist/components/card_multi_action/manifest.json +1314 -0
- package/dist/components/card_multi_action/presentation.js +638 -0
- package/dist/components/card_multi_action/static.html +120 -0
- package/dist/components/card_no_action/import.xml +1449 -0
- package/dist/components/card_no_action/manifest.json +1264 -0
- package/dist/components/card_no_action/presentation.js +454 -0
- package/dist/components/card_no_action/static.html +94 -0
- package/dist/components/card_single_action/import.xml +1539 -0
- package/dist/components/card_single_action/manifest.json +1273 -0
- package/dist/components/card_single_action/presentation.js +498 -0
- package/dist/components/card_single_action/static.html +103 -0
- package/dist/components/code/import.xml +569 -0
- package/dist/components/code/manifest.json +112 -0
- package/dist/components/code/presentation.js +124 -0
- package/dist/components/code/static.html +15 -0
- package/dist/components/footer/import.xml +95 -0
- package/dist/components/footer/manifest.json +9 -0
- package/dist/components/footer/presentation.js +409 -0
- package/dist/components/footer/static.html +146 -0
- package/dist/components/global_alert/import.xml +95 -0
- package/dist/components/global_alert/manifest.json +9 -0
- package/dist/components/global_alert/presentation.js +81 -0
- package/dist/components/global_alert/static.html +26 -0
- package/dist/components/header/import.xml +95 -0
- package/dist/components/header/manifest.json +11 -0
- package/dist/components/header/presentation.js +190 -0
- package/dist/components/header/static.html +158 -0
- package/dist/components/horizontal_rule/import.xml +547 -0
- package/dist/components/horizontal_rule/manifest.json +69 -0
- package/dist/components/horizontal_rule/presentation.js +50 -0
- package/dist/components/horizontal_rule/static.html +4 -0
- package/dist/components/in_page_navigation/import.xml +253 -0
- package/dist/components/in_page_navigation/manifest.json +35 -0
- package/dist/components/in_page_navigation/presentation.js +14 -0
- package/dist/components/in_page_navigation/static.html +13 -0
- package/dist/components/internal_navigation/import.xml +95 -0
- package/dist/components/internal_navigation/manifest.json +11 -0
- package/dist/components/internal_navigation/presentation.js +165 -0
- package/dist/components/internal_navigation/static.html +130 -0
- package/dist/components/left_hand_navigation/import.xml +299 -0
- package/dist/components/left_hand_navigation/manifest.json +40 -0
- package/dist/components/left_hand_navigation/presentation.js +178 -0
- package/dist/components/left_hand_navigation/static.html +64 -0
- package/dist/components/main_navigation/import.xml +95 -0
- package/dist/components/main_navigation/manifest.json +11 -0
- package/dist/components/main_navigation/presentation.js +150 -0
- package/dist/components/main_navigation/static.html +80 -0
- package/dist/components/mega_main_navigation/import.xml +95 -0
- package/dist/components/mega_main_navigation/manifest.json +9 -0
- package/dist/components/mega_main_navigation/presentation.js +380 -0
- package/dist/components/mega_main_navigation/static.html +153 -0
- package/dist/components/multi_column/import.xml +1631 -0
- package/dist/components/multi_column/manifest.json +233 -0
- package/dist/components/multi_column/presentation.js +249 -0
- package/dist/components/multi_column/static.html +36 -0
- package/dist/components/page_alert/import.xml +479 -0
- package/dist/components/page_alert/manifest.json +63 -0
- package/dist/components/page_alert/presentation.js +67 -0
- package/dist/components/page_alert/static.html +8 -0
- package/dist/components/pagination/import.xml +95 -0
- package/dist/components/pagination/manifest.json +42 -0
- package/dist/components/pagination/presentation.js +84 -0
- package/dist/components/pagination/static.html +5 -0
- package/dist/components/updated_date/import.xml +95 -0
- package/dist/components/updated_date/manifest.json +9 -0
- package/dist/components/updated_date/presentation.js +34 -0
- package/dist/components/updated_date/static.html +6 -0
- package/dist/components/widgets/import.xml +95 -0
- package/dist/components/widgets/manifest.json +9 -0
- package/dist/components/widgets/presentation.js +40 -0
- package/dist/components/widgets/static.html +0 -0
- package/dist/components.html +790 -0
- package/dist/externals/componentPreview.js +101 -0
- package/dist/externals/dsComponentLoader.js +410 -0
- package/dist/externals/esri-leaflet-vector.js +5 -0
- package/dist/externals/esri-leaflet.js +12 -0
- package/dist/externals/fb-handlebars.min.js +29 -0
- package/dist/externals/fb-typeahead.bundle.min.js +6 -0
- package/dist/externals/funnelback.autocompletion-2.6.0.js +678 -0
- package/dist/externals/getPagination.js +62 -0
- package/dist/externals/handlebars.min-v4.7.6.js +29 -0
- package/dist/externals/leaflet.js +6 -0
- package/dist/externals/populateDatastoreSim.js +381 -0
- package/dist/externals/tinymce_classes.css +62 -0
- package/dist/home.html +694 -0
- package/dist/index.html +710 -0
- package/dist/inner-with-nav.html +1853 -0
- package/dist/inner.html +671 -0
- package/dist/js/helpers.js +892 -0
- package/dist/js/main.js +55 -0
- package/dist/js/main.js.map +1 -0
- package/dist/js/runtime.js +2 -0
- package/dist/js/runtime.js.map +1 -0
- package/dist/main.css +918 -0
- package/dist/main.css.map +1 -0
- package/dist/mysource_files/ajax-loader.gif +0 -0
- package/dist/mysource_files/favicons/favicon.ico +0 -0
- package/dist/mysource_files/img/100x100.jpg +0 -0
- package/dist/mysource_files/img/600x260.jpg +0 -0
- package/dist/mysource_files/img/Heart-Pattern-Dark.png +0 -0
- package/dist/mysource_files/img/Heart-Pattern.png +0 -0
- package/dist/mysource_files/img/banner-background--desktop.png +0 -0
- package/dist/mysource_files/img/banner-background--mobile.png +0 -0
- package/dist/mysource_files/img/banner-bg.png +0 -0
- package/dist/mysource_files/img/banner.png +0 -0
- package/dist/mysource_files/img/card--brand.png +0 -0
- package/dist/mysource_files/img/card--components.png +0 -0
- package/dist/mysource_files/img/card--content.png +0 -0
- package/dist/mysource_files/img/header-logo-agov.png +0 -0
- package/dist/mysource_files/img/header-logo-qgov--dark.svg +63 -0
- package/dist/mysource_files/img/header-logo-qgov--light.svg +56 -0
- package/dist/mysource_files/img/header-logo-qgov--pre-dark.svg +56 -0
- package/dist/mysource_files/img/header-search.svg +3 -0
- package/dist/mysource_files/img/layers-2x.png +0 -0
- package/dist/mysource_files/img/layers.png +0 -0
- package/dist/mysource_files/img/marker-icon.png +0 -0
- package/dist/mysource_files/img/svg-icons.svg +155 -0
- package/dist/mysource_files/img/video-play.svg +3 -0
- package/dist/mysource_files/slick.eot +0 -0
- package/dist/mysource_files/slick.svg +14 -0
- package/dist/mysource_files/slick.ttf +0 -0
- package/dist/mysource_files/slick.woff +0 -0
- package/package-lock.json +14276 -0
- package/package.json +79 -0
- package/scripts/add_component.sh +109 -0
- package/src/assets/favicons/favicon.ico +0 -0
- package/src/assets/img/100x100.jpg +0 -0
- package/src/assets/img/600x260.jpg +0 -0
- package/src/assets/img/Heart-Pattern-Dark.png +0 -0
- package/src/assets/img/Heart-Pattern.png +0 -0
- package/src/assets/img/banner-background--desktop.png +0 -0
- package/src/assets/img/banner-background--mobile.png +0 -0
- package/src/assets/img/banner-bg.png +0 -0
- package/src/assets/img/banner.png +0 -0
- package/src/assets/img/card--brand.png +0 -0
- package/src/assets/img/card--components.png +0 -0
- package/src/assets/img/card--content.png +0 -0
- package/src/assets/img/header-logo-agov.png +0 -0
- package/src/assets/img/header-logo-qgov--dark.svg +63 -0
- package/src/assets/img/header-logo-qgov--light.svg +56 -0
- package/src/assets/img/header-logo-qgov--pre-dark.svg +56 -0
- package/src/assets/img/header-search.svg +3 -0
- package/src/assets/img/layers-2x.png +0 -0
- package/src/assets/img/layers.png +0 -0
- package/src/assets/img/marker-icon.png +0 -0
- package/src/assets/img/svg-icons.svg +155 -0
- package/src/assets/img/video-play.svg +3 -0
- package/src/components/_global/css/admin/component.scss +71 -0
- package/src/components/_global/css/body/component.scss +897 -0
- package/src/components/_global/css/btn/component.scss +564 -0
- package/src/components/_global/css/cta_links/component.scss +121 -0
- package/src/components/_global/css/direction_links/component.scss +196 -0
- package/src/components/_global/css/example/component.scss +54 -0
- package/src/components/_global/css/forms/control_inputs/component.scss +349 -0
- package/src/components/_global/css/forms/general/component.scss +298 -0
- package/src/components/_global/css/forms/select/component.scss +230 -0
- package/src/components/_global/css/forms/text/component.scss +402 -0
- package/src/components/_global/css/global.scss +42 -0
- package/src/components/_global/css/grid-12/component.scss +331 -0
- package/src/components/_global/css/headings/component.scss +172 -0
- package/src/components/_global/css/icons/component.scss +29 -0
- package/src/components/_global/css/link_columns/component.scss +194 -0
- package/src/components/_global/css/link_list/component.scss +37 -0
- package/src/components/_global/css/modal/component.scss +182 -0
- package/src/components/_global/css/slick/component.scss +25 -0
- package/src/components/_global/css/table/component.scss +211 -0
- package/src/components/_global/css/tabs/component.scss +43 -0
- package/src/components/_global/css/tags/component.scss +272 -0
- package/src/components/_global/css/user_location/component.scss +38 -0
- package/src/components/_global/css/version/component.scss +47 -0
- package/src/components/_global/html/component.hbs +108 -0
- package/src/components/_global/html/ds_component.hbs +30 -0
- package/src/components/_global/html/head.html +63 -0
- package/src/components/_global/html/scripts.html +58 -0
- package/src/components/_global/js/_polyfills/global.js +18 -0
- package/src/components/_global/js/animate/global.js +324 -0
- package/src/components/_global/js/forms/global.js +182 -0
- package/src/components/_global/js/global.js +302 -0
- package/src/components/_global/js/manifest.json +11 -0
- package/src/components/_global/js/modal/global.js +236 -0
- package/src/components/_global/js/slick/global.js +153 -0
- package/src/components/_global/js/tabs/global.js +305 -0
- package/src/components/_global/js/user_location/global.js +116 -0
- package/src/components/_template/css/component.scss +22 -0
- package/src/components/_template/html/component-page.html +85 -0
- package/src/components/_template/html/component.hbs +4 -0
- package/src/components/_template/js/global.js +6 -0
- package/src/components/_template/js/manifest.json +40 -0
- package/src/components/abstract/css/component.scss +91 -0
- package/src/components/abstract/html/component.hbs +9 -0
- package/src/components/abstract/js/manifest.json +29 -0
- package/src/components/accordion/css/component.scss +329 -0
- package/src/components/accordion/html/accordion-group.html +157 -0
- package/src/components/accordion/html/component.hbs +46 -0
- package/src/components/accordion/html/default.html +92 -0
- package/src/components/accordion/js/global.js +413 -0
- package/src/components/accordion/js/manifest.json +427 -0
- package/src/components/banner/css/component.scss +664 -0
- package/src/components/banner/html/component.hbs +52 -0
- package/src/components/banner/js/manifest.json +11 -0
- package/src/components/banner_advanced/css/component.scss +7 -0
- package/src/components/banner_advanced/html/component.hbs +213 -0
- package/src/components/banner_advanced/js/global.js +6 -0
- package/src/components/banner_advanced/js/manifest.json +1450 -0
- package/src/components/banner_basic/css/component.scss +52 -0
- package/src/components/banner_basic/html/component.hbs +130 -0
- package/src/components/banner_basic/js/global.js +6 -0
- package/src/components/banner_basic/js/manifest.json +151 -0
- package/src/components/banner_intermediate/css/component.scss +276 -0
- package/src/components/banner_intermediate/html/component.hbs +165 -0
- package/src/components/banner_intermediate/js/global.js +6 -0
- package/src/components/banner_intermediate/js/manifest.json +248 -0
- package/src/components/body/css/component.scss +16 -0
- package/src/components/body/html/component.hbs +5 -0
- package/src/components/body/js/manifest.json +46 -0
- package/src/components/breadcrumbs/css/component.scss +236 -0
- package/src/components/breadcrumbs/html/component.hbs +29 -0
- package/src/components/breadcrumbs/js/manifest.json +9 -0
- package/src/components/callout/css/component.scss +146 -0
- package/src/components/callout/html/component.hbs +28 -0
- package/src/components/callout/js/manifest.json +121 -0
- package/src/components/card_feature/css/component.scss +224 -0
- package/src/components/card_feature/html/component.hbs +129 -0
- package/src/components/card_feature/js/manifest.json +1390 -0
- package/src/components/card_multi_action/css/component.scss +229 -0
- package/src/components/card_multi_action/html/component.hbs +192 -0
- package/src/components/card_multi_action/js/manifest.json +1314 -0
- package/src/components/card_no_action/css/component.scss +551 -0
- package/src/components/card_no_action/html/component.hbs +127 -0
- package/src/components/card_no_action/js/global.js +6 -0
- package/src/components/card_no_action/js/manifest.json +1264 -0
- package/src/components/card_single_action/css/component.scss +164 -0
- package/src/components/card_single_action/html/component.hbs +161 -0
- package/src/components/card_single_action/js/manifest.json +1273 -0
- package/src/components/code/css/component.scss +355 -0
- package/src/components/code/html/component.hbs +84 -0
- package/src/components/code/js/global.js +160 -0
- package/src/components/code/js/manifest.json +112 -0
- package/src/components/footer/css/component.scss +437 -0
- package/src/components/footer/html/component.hbs +177 -0
- package/src/components/footer/js/manifest.json +9 -0
- package/src/components/global_alert/css/component.scss +169 -0
- package/src/components/global_alert/html/component.hbs +38 -0
- package/src/components/global_alert/js/global.js +39 -0
- package/src/components/global_alert/js/manifest.json +9 -0
- package/src/components/header/css/component.scss +697 -0
- package/src/components/header/html/component.hbs +186 -0
- package/src/components/header/js/global.js +188 -0
- package/src/components/header/js/manifest.json +11 -0
- package/src/components/horizontal_rule/css/component.scss +37 -0
- package/src/components/horizontal_rule/html/component.hbs +6 -0
- package/src/components/horizontal_rule/js/manifest.json +69 -0
- package/src/components/in_page_navigation/css/component.scss +54 -0
- package/src/components/in_page_navigation/html/component.hbs +17 -0
- package/src/components/in_page_navigation/js/global.js +51 -0
- package/src/components/in_page_navigation/js/manifest.json +35 -0
- package/src/components/internal_navigation/css/component.scss +437 -0
- package/src/components/internal_navigation/html/component.hbs +57 -0
- package/src/components/internal_navigation/js/manifest.json +11 -0
- package/src/components/left_hand_navigation/css/component.scss +280 -0
- package/src/components/left_hand_navigation/html/component.hbs +77 -0
- package/src/components/left_hand_navigation/js/global.js +36 -0
- package/src/components/left_hand_navigation/js/manifest.json +40 -0
- package/src/components/main_navigation/css/component.scss +706 -0
- package/src/components/main_navigation/html/component.hbs +87 -0
- package/src/components/main_navigation/js/global.js +373 -0
- package/src/components/main_navigation/js/manifest.json +11 -0
- package/src/components/mega_main_navigation/css/component.scss +535 -0
- package/src/components/mega_main_navigation/html/component.hbs +157 -0
- package/src/components/mega_main_navigation/js/global.js +170 -0
- package/src/components/mega_main_navigation/js/manifest.json +9 -0
- package/src/components/multi_column/css/component.scss +11 -0
- package/src/components/multi_column/html/component.hbs +98 -0
- package/src/components/multi_column/js/manifest.json +233 -0
- package/src/components/page_alert/css/component.scss +132 -0
- package/src/components/page_alert/html/component.hbs +26 -0
- package/src/components/page_alert/js/manifest.json +63 -0
- package/src/components/pagination/css/component.scss +196 -0
- package/src/components/pagination/html/component.hbs +41 -0
- package/src/components/pagination/html/default.html +30 -0
- package/src/components/pagination/js/manifest.json +42 -0
- package/src/components/search_box/css/component.scss +48 -0
- package/src/components/search_box/html/component.html +11 -0
- package/src/components/search_box/js/manifest.json +73 -0
- package/src/components/updated_date/css/component.scss +0 -0
- package/src/components/updated_date/html/component.hbs +31 -0
- package/src/components/updated_date/js/manifest.json +9 -0
- package/src/components/widgets/css/component.scss +82 -0
- package/src/components/widgets/html/component.hbs +19 -0
- package/src/components/widgets/html/default.html +4 -0
- package/src/components/widgets/js/current.json +483 -0
- package/src/components/widgets/js/manifest.json +9 -0
- package/src/components/widgets/js/site.json +358 -0
- package/src/data/current.json +522 -0
- package/src/data/current_admin.json +305 -0
- package/src/data/model_component.js +14 -0
- package/src/data/site.json +762 -0
- package/src/externals/componentPreview.js +101 -0
- package/src/externals/dsComponentLoader.js +410 -0
- package/src/externals/esri-leaflet-vector.js +5 -0
- package/src/externals/esri-leaflet.js +12 -0
- package/src/externals/fb-handlebars.min.js +29 -0
- package/src/externals/fb-typeahead.bundle.min.js +6 -0
- package/src/externals/funnelback.autocompletion-2.6.0.js +678 -0
- package/src/externals/getPagination.js +62 -0
- package/src/externals/handlebars.min-v4.7.6.js +29 -0
- package/src/externals/leaflet.js +6 -0
- package/src/externals/populateDatastoreSim.js +381 -0
- package/src/externals/tinymce_classes.css +62 -0
- package/src/helpers/Handlebars/appendIf.js +6 -0
- package/src/helpers/Handlebars/arrayLength.js +3 -0
- package/src/helpers/Handlebars/arrayWith.js +13 -0
- package/src/helpers/Handlebars/capitaliseFirst.js +8 -0
- package/src/helpers/Handlebars/charMax.js +8 -0
- package/src/helpers/Handlebars/checkIf.js +20 -0
- package/src/helpers/Handlebars/columnWidth.js +39 -0
- package/src/helpers/Handlebars/contains.js +7 -0
- package/src/helpers/Handlebars/createMap.js +19 -0
- package/src/helpers/Handlebars/dsMapFromID.js +8 -0
- package/src/helpers/Handlebars/dsMapFromProp.js +8 -0
- package/src/helpers/Handlebars/eachByName.js +18 -0
- package/src/helpers/Handlebars/eachDS.js +7 -0
- package/src/helpers/Handlebars/eachFrom.js +13 -0
- package/src/helpers/Handlebars/eachUpTo.js +8 -0
- package/src/helpers/Handlebars/eachWhen.js +33 -0
- package/src/helpers/Handlebars/formatDate.js +62 -0
- package/src/helpers/Handlebars/generateDates.js +74 -0
- package/src/helpers/Handlebars/getDistance.js +40 -0
- package/src/helpers/Handlebars/getObject.js +3 -0
- package/src/helpers/Handlebars/getParamaterByName.js +11 -0
- package/src/helpers/Handlebars/getPossibleValues.js +13 -0
- package/src/helpers/Handlebars/getProp.js +3 -0
- package/src/helpers/Handlebars/getTags.js +20 -0
- package/src/helpers/Handlebars/getTitle.js +4 -0
- package/src/helpers/Handlebars/ifAny.js +9 -0
- package/src/helpers/Handlebars/ifArray.js +3 -0
- package/src/helpers/Handlebars/ifCond.js +31 -0
- package/src/helpers/Handlebars/ifEqualsOrChained.js +12 -0
- package/src/helpers/Handlebars/ifProp.js +3 -0
- package/src/helpers/Handlebars/if_eq.js +9 -0
- package/src/helpers/Handlebars/inArray.js +8 -0
- package/src/helpers/Handlebars/isPage.js +7 -0
- package/src/helpers/Handlebars/itemAt.js +11 -0
- package/src/helpers/Handlebars/jsonParse.js +8 -0
- package/src/helpers/Handlebars/jsonStringify.js +3 -0
- package/src/helpers/Handlebars/listAZ.js +51 -0
- package/src/helpers/Handlebars/listAZOptions.js +34 -0
- package/src/helpers/Handlebars/listByClosest.js +60 -0
- package/src/helpers/Handlebars/listByClosestWithOffset.js +63 -0
- package/src/helpers/Handlebars/math.js +11 -0
- package/src/helpers/Handlebars/newLineToBreak.js +6 -0
- package/src/helpers/Handlebars/nonBreakingSpaces.js +6 -0
- package/src/helpers/Handlebars/objectFromSelect.js +21 -0
- package/src/helpers/Handlebars/partialReplace.js +9 -0
- package/src/helpers/Handlebars/printAccordion.js +24 -0
- package/src/helpers/Handlebars/replace.js +8 -0
- package/src/helpers/Handlebars/replaceMany.js +5 -0
- package/src/helpers/Handlebars/sizeFormat.js +11 -0
- package/src/helpers/Handlebars/split.js +6 -0
- package/src/helpers/Handlebars/toUpperCase.js +7 -0
- package/src/helpers/Handlebars/urldecode.js +3 -0
- package/src/helpers/Handlebars/urlencode.js +3 -0
- package/src/helpers/Handlebars/withinObject.js +13 -0
- package/src/html/component-abstract.html +86 -0
- package/src/html/component-accordion.html +87 -0
- package/src/html/component-banner.html +84 -0
- package/src/html/component-banner_advanced.html +97 -0
- package/src/html/component-banner_basic.html +163 -0
- package/src/html/component-banner_intermediate.html +91 -0
- package/src/html/component-body.html +116 -0
- package/src/html/component-breadcrumbs.html +88 -0
- package/src/html/component-btn.html +117 -0
- package/src/html/component-callout.html +86 -0
- package/src/html/component-card_feature.html +631 -0
- package/src/html/component-card_multi_action.html +793 -0
- package/src/html/component-card_no_action.html +521 -0
- package/src/html/component-card_single_action.html +631 -0
- package/src/html/component-code.html +84 -0
- package/src/html/component-footer.html +87 -0
- package/src/html/component-forms.html +585 -0
- package/src/html/component-global-elements.html +531 -0
- package/src/html/component-global_alert.html +87 -0
- package/src/html/component-header.html +88 -0
- package/src/html/component-in_page_navigation.html +109 -0
- package/src/html/component-internal_navigation.html +87 -0
- package/src/html/component-left_hand_navigation.html +85 -0
- package/src/html/component-main_navigation.html +87 -0
- package/src/html/component-mega_main_navigation.html +88 -0
- package/src/html/component-multi_column.html +86 -0
- package/src/html/component-page_alert.html +86 -0
- package/src/html/component-pagination.html +86 -0
- package/src/html/component-tag_list.html +340 -0
- package/src/html/component-updated_date.html +88 -0
- package/src/html/component-widgets.html +90 -0
- package/src/html/components.html +136 -0
- package/src/html/home.html +126 -0
- package/src/html/index.html +142 -0
- package/src/html/inner-with-nav.html +1126 -0
- package/src/html/inner.html +107 -0
- package/src/index.js +12 -0
- package/src/styles/global.scss +120 -0
- package/src/styles/imports/figma.scss +0 -0
- package/src/styles/imports/functions.scss +519 -0
- package/src/styles/imports/mixins.scss +658 -0
- package/src/styles/imports/placeholders.scss +68 -0
- package/src/styles/imports/utilities.scss +185 -0
- package/src/styles/imports/variables.scss +484 -0
- package/src/styles/postcss.config.js +4 -0
- package/webpack/JsonMergePlugin.js +35 -0
- package/webpack/PrecompilePlugin.js +369 -0
- package/webpack/webpack.common.js +151 -0
- package/webpack/webpack.dev.js +54 -0
- package/webpack/webpack.prod.js +70 -0
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
// REM font sizing with pixel fall back
|
|
2
|
+
// This technique will allow external font sizes to be set for html and respected
|
|
3
|
+
// if REMs are supported (everything but IE8 and older).
|
|
4
|
+
@mixin sq-font-size($sizeValue: 1) {
|
|
5
|
+
@include sq-rem-attr(font-size, $sizeValue);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Express the value of an attribute using rems falling back to pixels
|
|
9
|
+
@mixin sq-rem-attr($attr, $sizeValue: 1){
|
|
10
|
+
#{$attr}: ($sizeValue * $base-font-pixel) + px;
|
|
11
|
+
#{$attr}: $sizeValue + rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Transition shortcut
|
|
15
|
+
@mixin sq-transition($params...) {
|
|
16
|
+
-webkit-transition: $params;
|
|
17
|
+
-moz-transition: $params;
|
|
18
|
+
transition: $params;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Apply a prefixed transformation
|
|
22
|
+
@mixin sq-transform($params) {
|
|
23
|
+
-webkit-transform: $params; // Chrome, Safari 3.1+
|
|
24
|
+
//-moz-transform: $params; // Firefox 3.5-15
|
|
25
|
+
-ms-transform: $params; // IE 9
|
|
26
|
+
transform: $params;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 2D rotation with IE support
|
|
30
|
+
@mixin sq-rotate($deg) {
|
|
31
|
+
$msRotVal: (((360 + $deg) % 360) / 90); // Modulo lets us handle negative values.
|
|
32
|
+
|
|
33
|
+
@include sq-transform(rotate($deg + deg));
|
|
34
|
+
filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$msRotVal}); /* stylelint-disable-line */
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin sq-border-box() {
|
|
38
|
+
-webkit-box-sizing: border-box;
|
|
39
|
+
-moz-box-sizing: border-box;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin sq-reset-box-sizing() {
|
|
44
|
+
-webkit-box-sizing: content-box;
|
|
45
|
+
-moz-box-sizing: content-box;
|
|
46
|
+
box-sizing: content-box;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@mixin sq-box-shadow($params) {
|
|
50
|
+
-webkit-box-shadow: $params;
|
|
51
|
+
-moz-box-shadow: $params;
|
|
52
|
+
box-shadow: $params;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Glow effect taken from foundation
|
|
56
|
+
@mixin sq-block-glowing-effect($selector:focus, $fade-time:300ms, $glowing-effect-color:blue) {
|
|
57
|
+
-webkit-transition: -webkit-box-shadow $fade-time, border-color $fade-time ease-in-out;
|
|
58
|
+
-moz-transition: -moz-box-shadow $fade-time, border-color $fade-time ease-in-out;
|
|
59
|
+
transition: box-shadow $fade-time, border-color $fade-time ease-in-out;
|
|
60
|
+
|
|
61
|
+
&:#{$selector} {
|
|
62
|
+
@include sq-box-shadow(0 0 5px $glowing-effect-color);
|
|
63
|
+
border-color: $glowing-effect-color;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Legacy border radius helper
|
|
68
|
+
@mixin sq-border-radius($radius: 4px) {
|
|
69
|
+
-webkit-border-radius: $radius;
|
|
70
|
+
-moz-border-radius: $radius;
|
|
71
|
+
border-radius: $radius;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Opacity with IE filter fallback
|
|
75
|
+
// Value should be expressed as a number between 0 and 100
|
|
76
|
+
// with 0 being transparent and 100 being opaque
|
|
77
|
+
@mixin sq-opacity($value) {
|
|
78
|
+
$decimal-value: $value/100;
|
|
79
|
+
-webkit-opacity: $decimal-value;
|
|
80
|
+
-moz-opacity: $decimal-value;
|
|
81
|
+
opacity: $decimal-value;
|
|
82
|
+
-ms-filter: #{"alpha(opacity=" + $value + ")"};
|
|
83
|
+
filter: alpha(opacity=$value);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Individual border radius rule helper.
|
|
87
|
+
@mixin sq-rounded($vert, $horz, $radius: 10px) {
|
|
88
|
+
-webkit-border-#{$vert}-#{$horz}-radius: $radius;
|
|
89
|
+
-moz-border-radius-#{$vert}#{$horz}: $radius;
|
|
90
|
+
border-#{$vert}-#{$horz}-radius: $radius;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Use an SVG background image (for perfect Retina-rendering) with a PNG fallback.
|
|
94
|
+
@mixin sq-svg-background($suffixless-url) {
|
|
95
|
+
background-image: url($suffixless-url + ".svg");
|
|
96
|
+
.no-svg & {
|
|
97
|
+
background-image: url($suffixless-url + ".png");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@mixin sq-flex-box() {
|
|
102
|
+
.no-js &,
|
|
103
|
+
.no-flexbox & {
|
|
104
|
+
display: table;
|
|
105
|
+
}
|
|
106
|
+
.flexbox & {
|
|
107
|
+
display: -webkit-box;
|
|
108
|
+
display: -moz-box;
|
|
109
|
+
display: -ms-flexbox;
|
|
110
|
+
display: -webkit-flex;
|
|
111
|
+
display: flex;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Apply flex to an element
|
|
116
|
+
@mixin sq-flex($values) {
|
|
117
|
+
// Table cell is a fallback to no flexbox support
|
|
118
|
+
.flexbox & {
|
|
119
|
+
-webkit-box-flex: $values;
|
|
120
|
+
-moz-box-flex: $values;
|
|
121
|
+
-webkit-flex: $values;
|
|
122
|
+
-ms-flex: $values;
|
|
123
|
+
flex: $values;
|
|
124
|
+
}
|
|
125
|
+
.no-js &,
|
|
126
|
+
.no-flexbox & {
|
|
127
|
+
display: table-cell;
|
|
128
|
+
// Vertical align is needed to prevent auto vertical centering by some browsers
|
|
129
|
+
vertical-align: top;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Em calculator based on James' in Squiz Map issue #4906
|
|
134
|
+
@mixin sq-calc-ems($prop, $numerator, $denominator) {
|
|
135
|
+
$tmp: ($numerator/$denominator);
|
|
136
|
+
#{$prop}: #{$tmp}em;
|
|
137
|
+
#{$prop}: calc(#{$numerator}em / #{$denominator});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// CSS arrow helper
|
|
141
|
+
// $direction: top, left, right, bottom
|
|
142
|
+
@mixin sq-arrow($direction: top, $color: #000, $size: 5px, $height: 0) {
|
|
143
|
+
$_height: $size+$height;
|
|
144
|
+
|
|
145
|
+
height: 0;
|
|
146
|
+
width: 0;
|
|
147
|
+
content: ' ';
|
|
148
|
+
border-style: solid;
|
|
149
|
+
|
|
150
|
+
@if $direction == 'top' {
|
|
151
|
+
border-width: $size $size $_height $size;
|
|
152
|
+
border-color: transparent transparent $color transparent;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@else if $direction == 'right' {
|
|
156
|
+
border-width: $size $size $size $_height;
|
|
157
|
+
border-color: transparent transparent transparent $color;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@else if $direction == 'bottom' {
|
|
161
|
+
border-width: $_height $size $size $size;
|
|
162
|
+
border-color: $color transparent transparent transparent;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@else if $direction == 'left' {
|
|
166
|
+
border-width: $size $_height $size $size;
|
|
167
|
+
border-color: transparent $color transparent transparent;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@mixin sq-inline-block() {
|
|
172
|
+
display: inline-block;
|
|
173
|
+
*display: inline;
|
|
174
|
+
zoom: 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@mixin sq-list-reset() {
|
|
178
|
+
margin: 0;
|
|
179
|
+
padding: 0;
|
|
180
|
+
list-style: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// "Quantity queries" - a.k.a. "One of n siblings"
|
|
184
|
+
// From this codepen: http://codepen.io/long-lazuli/pen/PwBbmo
|
|
185
|
+
// http://alistapart.com/article/quantity-queries-for-css
|
|
186
|
+
@mixin sq-one-of-n-siblings( $countArg... ){
|
|
187
|
+
&:nth-last-child(#{$countArg}):first-child,
|
|
188
|
+
&:nth-last-child(#{$countArg}):first-child ~ & {
|
|
189
|
+
@content;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@mixin sq-keyframes($name) {
|
|
194
|
+
@-webkit-keyframes #{$name} {
|
|
195
|
+
@content;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@-moz-keyframes #{$name} {
|
|
199
|
+
@content;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@-ms-keyframes #{$name} {
|
|
203
|
+
@content;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@keyframes #{$name} {
|
|
207
|
+
@content;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@mixin sq-skew($deg){
|
|
212
|
+
-webkit-transform: skew($deg); // Safari
|
|
213
|
+
-ms-transform: skew($deg); // IE 9
|
|
214
|
+
transform: skew($deg);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Font face
|
|
218
|
+
@mixin font-face($name, $path, $weight: null, $style: null, $exts: eot woff2 woff ttf svg) {
|
|
219
|
+
$src: null;
|
|
220
|
+
|
|
221
|
+
$extmods: (
|
|
222
|
+
eot: "?",
|
|
223
|
+
svg: "#" + str-replace($name, " ", "_")
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
$formats: (
|
|
227
|
+
otf: "opentype",
|
|
228
|
+
ttf: "truetype"
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
@each $ext in $exts {
|
|
232
|
+
$extmod: if(map-has-key($extmods, $ext), $ext + map-get($extmods, $ext), $ext);
|
|
233
|
+
$format: if(map-has-key($formats, $ext), map-get($formats, $ext), $ext);
|
|
234
|
+
$src: append($src, url(quote($path + "." + $extmod)) format(quote($format)), comma);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@font-face {
|
|
238
|
+
font-family: quote($name);
|
|
239
|
+
font-style: $style;
|
|
240
|
+
font-weight: $weight;
|
|
241
|
+
src: $src;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
246
|
+
// GLOBAL MIXINS
|
|
247
|
+
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
248
|
+
/**
|
|
249
|
+
* QLD-space - Mixin for setting a properties value to snap to the grid, with a fallback for REM.
|
|
250
|
+
*
|
|
251
|
+
* @param {string} $property - The css property to apply the spacing ( padding, margin )
|
|
252
|
+
* @param {number} $values - The values of the property ( 0, 20px, 1unit, 5% )
|
|
253
|
+
*
|
|
254
|
+
* @return {number} - The space in px and rems
|
|
255
|
+
*/
|
|
256
|
+
@mixin QLD-space( $property, $values, $pixelfallback: $QLD-pixelfallback ) {
|
|
257
|
+
$unit: $QLD-unit; // The grid unit to use
|
|
258
|
+
$output: ();
|
|
259
|
+
$fallback: ();
|
|
260
|
+
$has_fallback: false;
|
|
261
|
+
|
|
262
|
+
@if type-of( $property ) != 'string' {
|
|
263
|
+
@error "I’m sorry Dave, I can’t do that; the QLD-space function only takes a string as first argument!";
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Loop through the $values list
|
|
267
|
+
@each $value in $values {
|
|
268
|
+
// This is a pixel on unitless unit. Let’s convert it to rems
|
|
269
|
+
@if type-of( $value ) == 'number' and unit( $value ) == 'unit' {
|
|
270
|
+
$value: $value / 1unit; // This is to remove the unit value
|
|
271
|
+
$rem: $value / ( ( $value / $unit ) * 0 + 1 );
|
|
272
|
+
|
|
273
|
+
$fallback: join( $fallback, round( $value * ( $unit * $unit ) ) + 0px );
|
|
274
|
+
$output: join( $output, #{ $rem }rem );
|
|
275
|
+
|
|
276
|
+
$has_fallback: true;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// We don’t know what this is so we don’t change it.
|
|
280
|
+
@else {
|
|
281
|
+
$fallback: join( $fallback, $value );
|
|
282
|
+
$output: join( $output, $value );
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@if( $has_fallback and $pixelfallback ) {
|
|
287
|
+
#{ $property }: $fallback;
|
|
288
|
+
#{ $property }: $output;
|
|
289
|
+
}
|
|
290
|
+
@else {
|
|
291
|
+
#{ $property }: $output;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* QLD-standard-space - Mixin for setting a properties value to snap to the grid, with a fallback for REM.
|
|
297
|
+
*
|
|
298
|
+
* @param {string} $property - The css property to apply the spacing ( padding, margin )
|
|
299
|
+
* @param {number} $values - The values of the property ( 0, 20px, 1unit, 5% )
|
|
300
|
+
*
|
|
301
|
+
* @return {number} - The space in px and rems
|
|
302
|
+
*/
|
|
303
|
+
@mixin QLD-standard-space( $property, $values) {
|
|
304
|
+
$output: ();
|
|
305
|
+
$fallback: ();
|
|
306
|
+
$has_fallback: false;
|
|
307
|
+
|
|
308
|
+
@if type-of( $property ) != 'string' {
|
|
309
|
+
@error "I’m sorry Dave, I can’t do that; the QLD-space function only takes a string as first argument!";
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Loop through the $values list
|
|
313
|
+
@each $value in $values {
|
|
314
|
+
// This is a pixel on unitless unit. Let’s convert it to rems
|
|
315
|
+
@if type-of( $value ) == 'number' {
|
|
316
|
+
//Map number input to the space map
|
|
317
|
+
$value: map-get( $QLD-space-map, $value );
|
|
318
|
+
|
|
319
|
+
// Get the value from supplied key for pixel and calculate the rem value
|
|
320
|
+
$rem: $value / $QLD-rem;
|
|
321
|
+
|
|
322
|
+
$fallback: join( $fallback, $value + 0px );
|
|
323
|
+
$output: join( $output, #{ $rem }rem );
|
|
324
|
+
|
|
325
|
+
$has_fallback: true;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// We don’t know what this is so we don’t change it.
|
|
329
|
+
@else {
|
|
330
|
+
$fallback: join( $fallback, $value );
|
|
331
|
+
$output: join( $output, $value );
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@if( $has_fallback) {
|
|
336
|
+
#{ $property }: $fallback;
|
|
337
|
+
#{ $property }: $output;
|
|
338
|
+
}
|
|
339
|
+
@else {
|
|
340
|
+
#{ $property }: $output;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* QLD-clearfix - Clearing floats
|
|
346
|
+
*/
|
|
347
|
+
@mixin QLD-clearfix() {
|
|
348
|
+
&:before,
|
|
349
|
+
&:after {
|
|
350
|
+
content: " ";
|
|
351
|
+
display: table;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
&:after {
|
|
355
|
+
clear: both;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* QLD-media - Create media queries and wraps the @content code inside of it
|
|
362
|
+
*
|
|
363
|
+
* @param {keywords} $breakpoint - Either one of the following keywords: sm, md, lg, xl, xxl
|
|
364
|
+
*
|
|
365
|
+
* @return {string} - The code passed in via @content wrapped inside a media query
|
|
366
|
+
*/
|
|
367
|
+
@mixin QLD-media($size, $direction: 'up') {
|
|
368
|
+
$property: if($direction=='up',min-width,max-width);
|
|
369
|
+
$adjustment: if($direction=='up',0,-1);
|
|
370
|
+
|
|
371
|
+
@if $size==sm {
|
|
372
|
+
@media ($property: $QLD-media-sm + $adjustment) {
|
|
373
|
+
@content;
|
|
374
|
+
}
|
|
375
|
+
} @else if $size==md {
|
|
376
|
+
@media ($property: $QLD-media-md + $adjustment) {
|
|
377
|
+
@content;
|
|
378
|
+
}
|
|
379
|
+
} @else if $size==lg {
|
|
380
|
+
@media ($property: $QLD-media-lg + $adjustment) {
|
|
381
|
+
@content;
|
|
382
|
+
}
|
|
383
|
+
} @else if $size==xl {
|
|
384
|
+
@media ($property: $QLD-media-xl + $adjustment) {
|
|
385
|
+
@content;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* QLD-sronly - Hide an element from the screen but not a screen reader
|
|
393
|
+
*/
|
|
394
|
+
@mixin QLD-sronly() {
|
|
395
|
+
position: absolute;
|
|
396
|
+
width: 1px;
|
|
397
|
+
height: 1px;
|
|
398
|
+
padding: 0;
|
|
399
|
+
margin: -1px;
|
|
400
|
+
overflow: hidden;
|
|
401
|
+
clip: rect( 0, 0, 0, 0 );
|
|
402
|
+
border: 0;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* QLD-outline - Create outline based on the theme the user is using.
|
|
408
|
+
*
|
|
409
|
+
* @param {keywords} $theme - `dark` or default ( `light` )
|
|
410
|
+
*
|
|
411
|
+
* @return {string} - The code
|
|
412
|
+
*/
|
|
413
|
+
@mixin QLD-outline( $theme: 'light' ) {
|
|
414
|
+
@if $theme == 'dark' {
|
|
415
|
+
outline: 2px solid var(--QLD-color-dark-focus);
|
|
416
|
+
}
|
|
417
|
+
@else {
|
|
418
|
+
outline: 2px solid var(--QLD-color-light-focus);
|
|
419
|
+
|
|
420
|
+
// Only add the offset if it's the default style
|
|
421
|
+
outline-offset: 2px;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* QLD-focus - Add the outline to focus
|
|
428
|
+
*/
|
|
429
|
+
@mixin QLD-focus( $theme: 'light' ) {
|
|
430
|
+
&:focus {
|
|
431
|
+
@include QLD-outline( $theme );
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// Remove Modzilla inner HTML dotted line. github.com/necolas/normalize.css/blob/master/normalize.css#L285
|
|
435
|
+
&::-moz-focus-inner {
|
|
436
|
+
border: 0;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* QLD-fontgrid Mixin for setting font-size and line-height that snaps to the grid.
|
|
443
|
+
*
|
|
444
|
+
* @param {keywords} $fontsize-key - Either one of the following keywords: xs, sm, md, lg, xl, xxl, xxxl
|
|
445
|
+
* @param {keywords} $lineheight-key - Either one of the following keywords: heading, nospace, default
|
|
446
|
+
*
|
|
447
|
+
* @return {string} - The code; fontsize in REM, with PX fallback, and unitless line-height which matches vertical grid
|
|
448
|
+
*/
|
|
449
|
+
@mixin QLD-fontgrid( $fontsize-key, $lineheight-key: 'default' ) {
|
|
450
|
+
|
|
451
|
+
@if type-of( $fontsize-key ) != 'string' {
|
|
452
|
+
@error "Going somewhere, Solo?; the QLD-fontgrid mixin fontsize key takes a string!";
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@if type-of( $lineheight-key ) != 'string' {
|
|
456
|
+
@error "Tell Jabba I've got his money; the QLD-fontgrid mixin lineheight key takes a string!";
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
@if not map-has-key( $QLD-fontsize-map, $fontsize-key ) {
|
|
460
|
+
@error "You shall not pass; the QLD-fontgrid mixin only takes the following fontsize keys strings: " + map-keys( $QLD-fontsize-map );
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
@if not map-has-key( $QLD-lineheight-map, $lineheight-key ) {
|
|
464
|
+
@error "There's a snake in my boot; the QLD-fontgrid mixin only takes the following lineheight keys strings: " + map-keys( $QLD-lineheight-map );
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// Get the value from supplied key for pixel and calculate the rem value
|
|
468
|
+
$fontsize-px: map-get( $QLD-fontsize-map, $fontsize-key );
|
|
469
|
+
$fontsize-rem: $fontsize-px / $QLD-rem;
|
|
470
|
+
|
|
471
|
+
// Change the lineheight if it doesn't hit a QLD-unit e.g. 40px font size with 1.5 lineheight = 50px should be 52px
|
|
472
|
+
$lineheight-pixel: round( ( map-get( $QLD-lineheight-map, $lineheight-key ) * $fontsize-px ) / $QLD-unit ) * $QLD-unit;
|
|
473
|
+
$lineheight: $lineheight-pixel / $fontsize-px;
|
|
474
|
+
|
|
475
|
+
// Mixin output
|
|
476
|
+
font-size: $fontsize-px + 0px; // Pixel fallback for non-rem support
|
|
477
|
+
font-size: $fontsize-rem + 0rem; // REM size
|
|
478
|
+
line-height: $lineheight;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* QLD-container-padding - Select which level of padding
|
|
483
|
+
*
|
|
484
|
+
* @param {keywords} $values - Either one of the following 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
|
485
|
+
* @param {keywords} $verHoz - vertical option sets top and bottom padding. horizontal option sets left and right padding
|
|
486
|
+
* @param {keywords} $option - Extra option for !important
|
|
487
|
+
*
|
|
488
|
+
*/
|
|
489
|
+
@mixin QLD-container-padding($values, $verHoz: 'vertical', $option: '') {
|
|
490
|
+
$output: ();
|
|
491
|
+
// Loop through the $values list
|
|
492
|
+
@each $value in $values {
|
|
493
|
+
// This is a pixel on unitless unit. Let’s convert it to rems
|
|
494
|
+
@if type-of( $value ) == 'number' {
|
|
495
|
+
// Get the value from supplied key for pixel and calculate the rem value
|
|
496
|
+
$padding-px: map-get( $QLD-space-map, $value );
|
|
497
|
+
$padding-rem: $padding-px / $QLD-rem;
|
|
498
|
+
|
|
499
|
+
@if $verHoz == 'vertical'{
|
|
500
|
+
padding-top: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
501
|
+
padding-top: $padding-rem + rem + $option; // REM size
|
|
502
|
+
padding-bottom: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
503
|
+
padding-bottom: $padding-rem + rem + $option; // REM size
|
|
504
|
+
|
|
505
|
+
} @else if $verHoz == 'horizontal'{
|
|
506
|
+
padding-left: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
507
|
+
padding-left: $padding-rem + rem + $option; // REM size
|
|
508
|
+
padding-right: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
509
|
+
padding-right: $padding-rem + rem + $option; // REM size
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
$output: join( $output, $value );
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
// Mixin output
|
|
517
|
+
$output:$output;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* QLD-container-margin - Select which level of margins
|
|
522
|
+
*
|
|
523
|
+
* @param {keywords} $values - Either one of the following 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
|
|
524
|
+
* @param {keywords} $posNeg - pos option sets positive values, neg option sets negitive values
|
|
525
|
+
* @param {keywords} $verHoz - vertical option sets top and bottom margin. horizontal option sets left and right margin
|
|
526
|
+
* @param {keywords} $option - Extra option for !important
|
|
527
|
+
*
|
|
528
|
+
*/
|
|
529
|
+
@mixin QLD-container-margin($values,$posNeg, $verHoz: 'vertical', $option: '') {
|
|
530
|
+
$output: ();
|
|
531
|
+
|
|
532
|
+
// Loop through the $values list
|
|
533
|
+
@each $value in $values {
|
|
534
|
+
// This is a pixel on unitless unit. Let’s convert it to rems
|
|
535
|
+
@if type-of( $value ) == 'number' {
|
|
536
|
+
// Get the value from supplied key for pixel and calculate the rem value
|
|
537
|
+
$padding-px: map-get( $QLD-space-map, $value );
|
|
538
|
+
$padding-rem: $padding-px / $QLD-rem;
|
|
539
|
+
|
|
540
|
+
@if $posNeg == 'pos'{
|
|
541
|
+
$padding-px:($padding-px);
|
|
542
|
+
$padding-rem:($padding-rem);
|
|
543
|
+
} @else if $posNeg == 'neg'{
|
|
544
|
+
$padding-px:(-#{$padding-px});
|
|
545
|
+
$padding-rem:(-#{$padding-rem});
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
@if $verHoz == 'vertical'{
|
|
549
|
+
margin-top: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
550
|
+
margin-top: $padding-rem + rem + $option; // REM size
|
|
551
|
+
margin-bottom: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
552
|
+
margin-bottom: $padding-rem + rem + $option; // REM size
|
|
553
|
+
|
|
554
|
+
} @else if $verHoz == 'horizontal'{
|
|
555
|
+
margin-left: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
556
|
+
margin-left: $padding-rem + rem + $option; // REM size
|
|
557
|
+
margin-right: $padding-px + px + $option; // Pixel fallback for non-rem support
|
|
558
|
+
margin-right: $padding-rem + rem + $option; // REM size
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
$output: join( $output, $value );
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
// Mixin output
|
|
565
|
+
$output:$output;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* QLD-getControlShape Mixin for setting a background image SVG for a control input
|
|
570
|
+
*
|
|
571
|
+
* @param {keywords} $kind - Either one of the following keywords: checkbox, radio
|
|
572
|
+
* @param {keywords} $part - Either one of the following keywords: foreground, background
|
|
573
|
+
* @param {string} $color1 - String representing the hex code of the first fill color
|
|
574
|
+
* @param {string} $color2 - String representing the hex code of the second fill color
|
|
575
|
+
*
|
|
576
|
+
* @return {string} - The code; background image containing the encoded SVG
|
|
577
|
+
*/
|
|
578
|
+
@mixin QLD-getControlShape( $kind, $part, $color1: transparent, $color2: transparent ) {
|
|
579
|
+
$start: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">';
|
|
580
|
+
$end: '</svg>';
|
|
581
|
+
|
|
582
|
+
$checkbox-background: '<path fill="#{ $color1 }" d="M0,0h32v32H0V0z"/><path fill="#{ $color2 }" d="M2,2h28v28H2V2z"/>';
|
|
583
|
+
$checkbox-foreground: '<path fill="#{ $color1 }" d="M25.6,11.4c0.2-0.2,0.2-0.5,0-0.7l-2.3-2.3c-0.2-0.2-0.5-0.2-0.7,0L14,17l-3.6-3.6c-0.2-0.2-0.5-0.2-0.7,0l-2.3,2.3 c-0.2,0.2-0.2,0.5,0,0.7l6.3,6.3c0.2,0.2,0.5,0.2,0.7,0L25.6,11.4L25.6,11.4z"/>';
|
|
584
|
+
|
|
585
|
+
$radio-background: '<circle fill="#{ $color1 }" cx="16" cy="16" r="16"/><circle fill="#{ $color2 }" cx="16" cy="16" r="14"/>';
|
|
586
|
+
$radio-foreground: '<circle fill="#{ $color1 }" cx="16" cy="16" r="12"/>';
|
|
587
|
+
|
|
588
|
+
@if( $kind == 'checkbox' and $part == 'background' ) {
|
|
589
|
+
background-image: QLD-svguri( $start + $checkbox-background + $end );
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
@if( $kind == 'checkbox' and $part == 'foreground' ) {
|
|
593
|
+
background-image: QLD-svguri( $start + $checkbox-foreground + $end );
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@if( $kind == 'radio' and $part == 'background' ) {
|
|
597
|
+
background-image: QLD-svguri( $start + $radio-background + $end );
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
@if( $kind == 'radio' and $part == 'foreground' ) {
|
|
601
|
+
background-image: QLD-svguri( $start + $radio-foreground + $end );
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* QLD-side-nav-indent - Mixin for creating indent based off depth
|
|
608
|
+
*
|
|
609
|
+
* @param {number} $depth - How deep the menu goes
|
|
610
|
+
* @param {string} $element - The element to add the ul in front of
|
|
611
|
+
* @param {number} $indent-size - Size of the indent in units
|
|
612
|
+
*
|
|
613
|
+
* @return {number} - The indented menu items
|
|
614
|
+
*/
|
|
615
|
+
@mixin QLD-side-nav-indent(
|
|
616
|
+
$depth: $QLD-side-nav-depth,
|
|
617
|
+
$element: "a",
|
|
618
|
+
$indent-size: 1
|
|
619
|
+
) {
|
|
620
|
+
$chain: $element;
|
|
621
|
+
@for $i from 1 to $depth + 1 {
|
|
622
|
+
$chain: "ul " + $chain;
|
|
623
|
+
$indent: if(
|
|
624
|
+
$i < 2,
|
|
625
|
+
($indent-size * $i + 1) * 1unit,
|
|
626
|
+
($indent-size * $i + 1) * 1.25unit
|
|
627
|
+
);
|
|
628
|
+
|
|
629
|
+
& #{$chain} {
|
|
630
|
+
@include QLD-space(padding-left, $indent);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* QLD-box-shadow - Select which level of box shadow
|
|
638
|
+
*
|
|
639
|
+
* @param {keywords} $level - Either one of the following 1, 2, 3
|
|
640
|
+
*
|
|
641
|
+
* @return {string} - Returns different box-shadow variables
|
|
642
|
+
*/
|
|
643
|
+
@mixin QLD-box-shadow($level) {
|
|
644
|
+
@if $level==1 {
|
|
645
|
+
box-shadow: $QLD-box-shaddow-level-one;
|
|
646
|
+
} @else if $level==2 {
|
|
647
|
+
box-shadow: $QLD-box-shaddow-level-two;
|
|
648
|
+
} @else if $level==3 {
|
|
649
|
+
box-shadow: $QLD-box-shaddow-level-three;
|
|
650
|
+
} @else if $level==4 {
|
|
651
|
+
box-shadow: $QLD-box-shaddow-level-four;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
|