@mgdis/mg-components 3.1.0
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/LICENSE +29 -0
- package/dist/cjs/css-shim-a22512c4.js +6 -0
- package/dist/cjs/index-85a4a0b6.js +1674 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +35 -0
- package/dist/cjs/mg-badge_20.cjs.entry.js +4661 -0
- package/dist/cjs/mg-components.cjs.js +23 -0
- package/dist/cjs/shadow-css-8940f82d.js +390 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +4 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +99 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +148 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.stories.js +27 -0
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +4 -0
- package/dist/collection/components/atoms/mg-button/mg-button.css +134 -0
- package/dist/collection/components/atoms/mg-button/mg-button.js +236 -0
- package/dist/collection/components/atoms/mg-button/mg-button.stories.js +38 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.css +3 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +133 -0
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.stories.js +15 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +54 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +57 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +155 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.stories.js +34 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.css +12 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +95 -0
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.stories.js +21 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.conf.js +4 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +73 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +94 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.stories.js +25 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +44 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +225 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.stories.js +26 -0
- package/dist/collection/components/molecules/inputs/MgInput.conf.js +7 -0
- package/dist/collection/components/molecules/inputs/MgInput.js +130 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +156 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +444 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.js +57 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.conf.js +7 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +171 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +467 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.stories.js +46 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.js +11 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +199 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +633 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.js +68 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +195 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +401 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.stories.js +43 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +156 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +443 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.js +65 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +201 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +532 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.stories.js +70 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +222 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +589 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.stories.js +115 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +217 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +553 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.js +52 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +213 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +457 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.js +73 -0
- package/dist/collection/components/molecules/mg-message/mg-message.conf.js +4 -0
- package/dist/collection/components/molecules/mg-message/mg-message.css +94 -0
- package/dist/collection/components/molecules/mg-message/mg-message.js +285 -0
- package/dist/collection/components/molecules/mg-message/mg-message.stories.js +43 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.conf.js +5 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +39 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +218 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.stories.js +23 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +59 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +249 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.stories.js +36 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +1 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +30 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +212 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.stories.js +40 -0
- package/dist/collection/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/collection/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/locales/index.js +4 -0
- package/dist/collection/stories/buttons.stories.js +43 -0
- package/dist/collection/stories/grids.stories.js +50 -0
- package/dist/collection/stories/icons.stories.js +20 -0
- package/dist/collection/stories/messages.stories.js +44 -0
- package/dist/collection/stories/tags.stories.js +13 -0
- package/dist/collection/stories/typography.stories.js +28 -0
- package/dist/collection/utils/components.utils.js +67 -0
- package/dist/collection/utils/locale.utils.js +32 -0
- package/dist/collection/utils/test.utils.js +26 -0
- package/dist/collection/variables.css +177 -0
- package/dist/collection/variables.scss +177 -0
- package/dist/components/MgInput.js +140 -0
- package/dist/components/components.utils.js +69 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +54 -0
- package/dist/components/locale.utils.js +35 -0
- package/dist/components/mg-badge.d.ts +11 -0
- package/dist/components/mg-badge.js +6 -0
- package/dist/components/mg-badge2.js +82 -0
- package/dist/components/mg-button.d.ts +11 -0
- package/dist/components/mg-button.js +6 -0
- package/dist/components/mg-button2.js +148 -0
- package/dist/components/mg-character-left.d.ts +11 -0
- package/dist/components/mg-character-left.js +6 -0
- package/dist/components/mg-character-left2.js +77 -0
- package/dist/components/mg-icon.d.ts +11 -0
- package/dist/components/mg-icon.js +6 -0
- package/dist/components/mg-icon2.js +147 -0
- package/dist/components/mg-input-checkbox.d.ts +11 -0
- package/dist/components/mg-input-checkbox.js +222 -0
- package/dist/components/mg-input-date.d.ts +11 -0
- package/dist/components/mg-input-date.js +245 -0
- package/dist/components/mg-input-numeric.d.ts +11 -0
- package/dist/components/mg-input-numeric.js +324 -0
- package/dist/components/mg-input-password.d.ts +11 -0
- package/dist/components/mg-input-password.js +171 -0
- package/dist/components/mg-input-radio.d.ts +11 -0
- package/dist/components/mg-input-radio.js +211 -0
- package/dist/components/mg-input-select.d.ts +11 -0
- package/dist/components/mg-input-select.js +6 -0
- package/dist/components/mg-input-select2.js +243 -0
- package/dist/components/mg-input-text.d.ts +11 -0
- package/dist/components/mg-input-text.js +242 -0
- package/dist/components/mg-input-textarea.d.ts +11 -0
- package/dist/components/mg-input-textarea.js +224 -0
- package/dist/components/mg-input-title.d.ts +11 -0
- package/dist/components/mg-input-title.js +6 -0
- package/dist/components/mg-input-title2.js +55 -0
- package/dist/components/mg-input-toggle.d.ts +11 -0
- package/dist/components/mg-input-toggle.js +247 -0
- package/dist/components/mg-message.d.ts +11 -0
- package/dist/components/mg-message.js +183 -0
- package/dist/components/mg-pagination.d.ts +11 -0
- package/dist/components/mg-pagination.js +175 -0
- package/dist/components/mg-popover.d.ts +11 -0
- package/dist/components/mg-popover.js +183 -0
- package/dist/components/mg-tabs.d.ts +11 -0
- package/dist/components/mg-tabs.js +160 -0
- package/dist/components/mg-tag.d.ts +11 -0
- package/dist/components/mg-tag.js +76 -0
- package/dist/components/mg-tooltip.d.ts +11 -0
- package/dist/components/mg-tooltip.js +6 -0
- package/dist/components/mg-tooltip2.js +150 -0
- package/dist/components/popper.js +1784 -0
- package/dist/esm/css-shim-7c240feb.js +4 -0
- package/dist/esm/index-e3e84606.js +1643 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +31 -0
- package/dist/esm/mg-badge_20.entry.js +4638 -0
- package/dist/esm/mg-components.js +21 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/shadow-css-5d2d01ce.js +388 -0
- package/dist/esm-es5/css-shim-7c240feb.js +1 -0
- package/dist/esm-es5/index-e3e84606.js +1 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/mg-badge_20.entry.js +2 -0
- package/dist/esm-es5/mg-components.js +1 -0
- package/dist/esm-es5/shadow-css-5d2d01ce.js +12 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mg-components/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/mg-components/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
- package/dist/mg-components/index.esm.js +0 -0
- package/dist/mg-components/mg-components.css +1 -0
- package/dist/mg-components/mg-components.esm.js +1 -0
- package/dist/mg-components/mg-components.js +132 -0
- package/dist/mg-components/p-1cd24462.system.js +1 -0
- package/dist/mg-components/p-2e2f6b27.system.entry.js +2 -0
- package/dist/mg-components/p-366a224e.js +1 -0
- package/dist/mg-components/p-422c429b.system.js +1 -0
- package/dist/mg-components/p-50ea2036.system.js +1 -0
- package/dist/mg-components/p-62fa3797.js +1 -0
- package/dist/mg-components/p-71d57b8b.system.js +13 -0
- package/dist/mg-components/p-9a215712.system.js +1 -0
- package/dist/mg-components/p-cbf0464b.entry.js +1 -0
- package/dist/mg-components/p-f6455ab3.js +12 -0
- package/dist/mg-components/variables.css +177 -0
- package/dist/mg-components/variables.scss +177 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.conf.d.ts +8 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +36 -0
- package/dist/types/components/atoms/mg-badge/mg-badge.stories.d.ts +19 -0
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +4 -0
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +67 -0
- package/dist/types/components/atoms/mg-button/mg-button.stories.d.ts +16 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +39 -0
- package/dist/types/components/atoms/mg-character-left/mg-character-left.stories.d.ts +7 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +12 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +36 -0
- package/dist/types/components/atoms/mg-icon/mg-icon.stories.d.ts +26 -0
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +24 -0
- package/dist/types/components/atoms/mg-input-title/mg-input-title.stories.d.ts +6 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +4 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +25 -0
- package/dist/types/components/atoms/mg-tag/mg-tag.stories.d.ts +14 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +56 -0
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +11 -0
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +10 -0
- package/dist/types/components/molecules/inputs/MgInput.d.ts +35 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +19 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +120 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.stories.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.conf.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +128 -0
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.stories.d.ts +7 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.conf.d.ts +10 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +173 -0
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.stories.d.ts +21 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +111 -0
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.stories.d.ts +9 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +9 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +121 -0
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.stories.d.ts +15 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +18 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +133 -0
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.stories.d.ts +14 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +160 -0
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.stories.d.ts +26 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +150 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.stories.d.ts +6 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +117 -0
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.stories.d.ts +7 -0
- package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +4 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +76 -0
- package/dist/types/components/molecules/mg-message/mg-message.stories.d.ts +16 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.conf.d.ts +4 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +53 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.stories.d.ts +6 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +62 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.stories.d.ts +12 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +10 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +63 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.stories.d.ts +7 -0
- package/dist/types/components.d.ts +1987 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/locales/index.d.ts +44 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/stories/buttons.stories.d.ts +13 -0
- package/dist/types/stories/grids.stories.d.ts +5 -0
- package/dist/types/stories/icons.stories.d.ts +13 -0
- package/dist/types/stories/messages.stories.d.ts +13 -0
- package/dist/types/stories/tags.stories.d.ts +5 -0
- package/dist/types/stories/typography.stories.d.ts +5 -0
- package/dist/types/utils/components.utils.d.ts +43 -0
- package/dist/types/utils/locale.utils.d.ts +22 -0
- package/dist/types/utils/test.utils.d.ts +5 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +86 -0
- package/readme.md +159 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-85a4a0b6.js');
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v2.14.1 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
const patchBrowser = () => {
|
|
9
|
+
{
|
|
10
|
+
// shim css vars
|
|
11
|
+
index.plt.$cssShim$ = index.win.__cssshim;
|
|
12
|
+
}
|
|
13
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mg-components.cjs.js', document.baseURI).href));
|
|
14
|
+
const opts = {};
|
|
15
|
+
if (importMeta !== '') {
|
|
16
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
17
|
+
}
|
|
18
|
+
return index.promiseResolve(opts);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
patchBrowser().then(options => {
|
|
22
|
+
return index.bootstrapLazy([["mg-badge_20.cjs",[[1,"mg-pagination",{"identifier":[1],"label":[1],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"width":[8],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayValue":[32]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"width":[8],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"width":[8],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"characterLeftTemplate":[1,"character-left-template"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"width":[8],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"characterLeftTemplate":[1,"character-left-template"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[4,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[6,"mg-popover",{"identifier":[1],"placement":[1],"closeButton":[4,"close-button"],"display":[1028],"disabled":[1028]}],[6,"mg-tabs",{"identifier":[1],"label":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-tag",{"variant":[1],"outline":[4],"classList":[32]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"width":[8],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32]}],[1,"mg-badge",{"value":[1032],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[6,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"template":[1],"characters":[1],"maxlength":[2]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[6,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[1028]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"spin":[4],"classList":[32]}]]]], options);
|
|
23
|
+
});
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Stencil Client Platform v2.14.1 | MIT Licensed | https://stenciljs.com
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
9
|
+
*
|
|
10
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12
|
+
*
|
|
13
|
+
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
|
14
|
+
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
15
|
+
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
|
16
|
+
*/
|
|
17
|
+
const safeSelector = (selector) => {
|
|
18
|
+
const placeholders = [];
|
|
19
|
+
let index = 0;
|
|
20
|
+
let content;
|
|
21
|
+
// Replaces attribute selectors with placeholders.
|
|
22
|
+
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
|
23
|
+
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
|
24
|
+
const replaceBy = `__ph-${index}__`;
|
|
25
|
+
placeholders.push(keep);
|
|
26
|
+
index++;
|
|
27
|
+
return replaceBy;
|
|
28
|
+
});
|
|
29
|
+
// Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
|
|
30
|
+
// WS and "+" would otherwise be interpreted as selector separators.
|
|
31
|
+
content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
|
32
|
+
const replaceBy = `__ph-${index}__`;
|
|
33
|
+
placeholders.push(exp);
|
|
34
|
+
index++;
|
|
35
|
+
return pseudo + replaceBy;
|
|
36
|
+
});
|
|
37
|
+
const ss = {
|
|
38
|
+
content,
|
|
39
|
+
placeholders,
|
|
40
|
+
};
|
|
41
|
+
return ss;
|
|
42
|
+
};
|
|
43
|
+
const restoreSafeSelector = (placeholders, content) => {
|
|
44
|
+
return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
|
|
45
|
+
};
|
|
46
|
+
const _polyfillHost = '-shadowcsshost';
|
|
47
|
+
const _polyfillSlotted = '-shadowcssslotted';
|
|
48
|
+
// note: :host-context pre-processed to -shadowcsshostcontext.
|
|
49
|
+
const _polyfillHostContext = '-shadowcsscontext';
|
|
50
|
+
const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
|
|
51
|
+
const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
|
|
52
|
+
const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
|
|
53
|
+
const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
|
|
54
|
+
const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
|
|
55
|
+
const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
56
|
+
const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
|
57
|
+
const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
|
|
58
|
+
const _polyfillHostRe = /-shadowcsshost/gim;
|
|
59
|
+
const _colonHostRe = /:host/gim;
|
|
60
|
+
const _colonSlottedRe = /::slotted/gim;
|
|
61
|
+
const _colonHostContextRe = /:host-context/gim;
|
|
62
|
+
const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
|
63
|
+
const stripComments = (input) => {
|
|
64
|
+
return input.replace(_commentRe, '');
|
|
65
|
+
};
|
|
66
|
+
const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
|
67
|
+
const extractCommentsWithHash = (input) => {
|
|
68
|
+
return input.match(_commentWithHashRe) || [];
|
|
69
|
+
};
|
|
70
|
+
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
71
|
+
const _curlyRe = /([{}])/g;
|
|
72
|
+
const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
|
|
73
|
+
const OPEN_CURLY = '{';
|
|
74
|
+
const CLOSE_CURLY = '}';
|
|
75
|
+
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
|
76
|
+
const processRules = (input, ruleCallback) => {
|
|
77
|
+
const inputWithEscapedBlocks = escapeBlocks(input);
|
|
78
|
+
let nextBlockIndex = 0;
|
|
79
|
+
return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
|
|
80
|
+
const selector = m[2];
|
|
81
|
+
let content = '';
|
|
82
|
+
let suffix = m[4];
|
|
83
|
+
let contentPrefix = '';
|
|
84
|
+
if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
|
|
85
|
+
content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
|
|
86
|
+
suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
|
|
87
|
+
contentPrefix = '{';
|
|
88
|
+
}
|
|
89
|
+
const cssRule = {
|
|
90
|
+
selector,
|
|
91
|
+
content,
|
|
92
|
+
};
|
|
93
|
+
const rule = ruleCallback(cssRule);
|
|
94
|
+
return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const escapeBlocks = (input) => {
|
|
98
|
+
const inputParts = input.split(_curlyRe);
|
|
99
|
+
const resultParts = [];
|
|
100
|
+
const escapedBlocks = [];
|
|
101
|
+
let bracketCount = 0;
|
|
102
|
+
let currentBlockParts = [];
|
|
103
|
+
for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
|
|
104
|
+
const part = inputParts[partIndex];
|
|
105
|
+
if (part === CLOSE_CURLY) {
|
|
106
|
+
bracketCount--;
|
|
107
|
+
}
|
|
108
|
+
if (bracketCount > 0) {
|
|
109
|
+
currentBlockParts.push(part);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
if (currentBlockParts.length > 0) {
|
|
113
|
+
escapedBlocks.push(currentBlockParts.join(''));
|
|
114
|
+
resultParts.push(BLOCK_PLACEHOLDER);
|
|
115
|
+
currentBlockParts = [];
|
|
116
|
+
}
|
|
117
|
+
resultParts.push(part);
|
|
118
|
+
}
|
|
119
|
+
if (part === OPEN_CURLY) {
|
|
120
|
+
bracketCount++;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (currentBlockParts.length > 0) {
|
|
124
|
+
escapedBlocks.push(currentBlockParts.join(''));
|
|
125
|
+
resultParts.push(BLOCK_PLACEHOLDER);
|
|
126
|
+
}
|
|
127
|
+
const strEscapedBlocks = {
|
|
128
|
+
escapedString: resultParts.join(''),
|
|
129
|
+
blocks: escapedBlocks,
|
|
130
|
+
};
|
|
131
|
+
return strEscapedBlocks;
|
|
132
|
+
};
|
|
133
|
+
const insertPolyfillHostInCssText = (selector) => {
|
|
134
|
+
selector = selector
|
|
135
|
+
.replace(_colonHostContextRe, _polyfillHostContext)
|
|
136
|
+
.replace(_colonHostRe, _polyfillHost)
|
|
137
|
+
.replace(_colonSlottedRe, _polyfillSlotted);
|
|
138
|
+
return selector;
|
|
139
|
+
};
|
|
140
|
+
const convertColonRule = (cssText, regExp, partReplacer) => {
|
|
141
|
+
// m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
|
|
142
|
+
return cssText.replace(regExp, (...m) => {
|
|
143
|
+
if (m[2]) {
|
|
144
|
+
const parts = m[2].split(',');
|
|
145
|
+
const r = [];
|
|
146
|
+
for (let i = 0; i < parts.length; i++) {
|
|
147
|
+
const p = parts[i].trim();
|
|
148
|
+
if (!p)
|
|
149
|
+
break;
|
|
150
|
+
r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
|
|
151
|
+
}
|
|
152
|
+
return r.join(',');
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
return _polyfillHostNoCombinator + m[3];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
const colonHostPartReplacer = (host, part, suffix) => {
|
|
160
|
+
return host + part.replace(_polyfillHost, '') + suffix;
|
|
161
|
+
};
|
|
162
|
+
const convertColonHost = (cssText) => {
|
|
163
|
+
return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
|
|
164
|
+
};
|
|
165
|
+
const colonHostContextPartReplacer = (host, part, suffix) => {
|
|
166
|
+
if (part.indexOf(_polyfillHost) > -1) {
|
|
167
|
+
return colonHostPartReplacer(host, part, suffix);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return host + part + suffix + ', ' + part + ' ' + host + suffix;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const convertColonSlotted = (cssText, slotScopeId) => {
|
|
174
|
+
const slotClass = '.' + slotScopeId + ' > ';
|
|
175
|
+
const selectors = [];
|
|
176
|
+
cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
|
|
177
|
+
if (m[2]) {
|
|
178
|
+
const compound = m[2].trim();
|
|
179
|
+
const suffix = m[3];
|
|
180
|
+
const slottedSelector = slotClass + compound + suffix;
|
|
181
|
+
let prefixSelector = '';
|
|
182
|
+
for (let i = m[4] - 1; i >= 0; i--) {
|
|
183
|
+
const char = m[5][i];
|
|
184
|
+
if (char === '}' || char === ',') {
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
prefixSelector = char + prefixSelector;
|
|
188
|
+
}
|
|
189
|
+
const orgSelector = prefixSelector + slottedSelector;
|
|
190
|
+
const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
|
|
191
|
+
if (orgSelector.trim() !== addedSelector.trim()) {
|
|
192
|
+
const updatedSelector = `${addedSelector}, ${orgSelector}`;
|
|
193
|
+
selectors.push({
|
|
194
|
+
orgSelector,
|
|
195
|
+
updatedSelector,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return slottedSelector;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
return _polyfillHostNoCombinator + m[3];
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
return {
|
|
205
|
+
selectors,
|
|
206
|
+
cssText,
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
const convertColonHostContext = (cssText) => {
|
|
210
|
+
return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
|
|
211
|
+
};
|
|
212
|
+
const convertShadowDOMSelectors = (cssText) => {
|
|
213
|
+
return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
|
|
214
|
+
};
|
|
215
|
+
const makeScopeMatcher = (scopeSelector) => {
|
|
216
|
+
const lre = /\[/g;
|
|
217
|
+
const rre = /\]/g;
|
|
218
|
+
scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
|
|
219
|
+
return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
|
|
220
|
+
};
|
|
221
|
+
const selectorNeedsScoping = (selector, scopeSelector) => {
|
|
222
|
+
const re = makeScopeMatcher(scopeSelector);
|
|
223
|
+
return !re.test(selector);
|
|
224
|
+
};
|
|
225
|
+
const injectScopingSelector = (selector, scopingSelector) => {
|
|
226
|
+
return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
|
|
227
|
+
return before + scopingSelector + colon + after;
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
231
|
+
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
|
232
|
+
_polyfillHostRe.lastIndex = 0;
|
|
233
|
+
if (_polyfillHostRe.test(selector)) {
|
|
234
|
+
const replaceBy = `.${hostSelector}`;
|
|
235
|
+
return selector
|
|
236
|
+
.replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
|
|
237
|
+
.replace(_polyfillHostRe, replaceBy + ' ');
|
|
238
|
+
}
|
|
239
|
+
return scopeSelector + ' ' + selector;
|
|
240
|
+
};
|
|
241
|
+
const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
|
|
242
|
+
const isRe = /\[is=([^\]]*)\]/g;
|
|
243
|
+
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
|
244
|
+
const className = '.' + scopeSelector;
|
|
245
|
+
const _scopeSelectorPart = (p) => {
|
|
246
|
+
let scopedP = p.trim();
|
|
247
|
+
if (!scopedP) {
|
|
248
|
+
return '';
|
|
249
|
+
}
|
|
250
|
+
if (p.indexOf(_polyfillHostNoCombinator) > -1) {
|
|
251
|
+
scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
// remove :host since it should be unnecessary
|
|
255
|
+
const t = p.replace(_polyfillHostRe, '');
|
|
256
|
+
if (t.length > 0) {
|
|
257
|
+
scopedP = injectScopingSelector(t, className);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return scopedP;
|
|
261
|
+
};
|
|
262
|
+
const safeContent = safeSelector(selector);
|
|
263
|
+
selector = safeContent.content;
|
|
264
|
+
let scopedSelector = '';
|
|
265
|
+
let startIndex = 0;
|
|
266
|
+
let res;
|
|
267
|
+
const sep = /( |>|\+|~(?!=))\s*/g;
|
|
268
|
+
// If a selector appears before :host it should not be shimmed as it
|
|
269
|
+
// matches on ancestor elements and not on elements in the host's shadow
|
|
270
|
+
// `:host-context(div)` is transformed to
|
|
271
|
+
// `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
|
|
272
|
+
// the `div` is not part of the component in the 2nd selectors and should not be scoped.
|
|
273
|
+
// Historically `component-tag:host` was matching the component so we also want to preserve
|
|
274
|
+
// this behavior to avoid breaking legacy apps (it should not match).
|
|
275
|
+
// The behavior should be:
|
|
276
|
+
// - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
|
|
277
|
+
// - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
|
|
278
|
+
// `:host-context(tag)`)
|
|
279
|
+
const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
|
280
|
+
// Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
|
|
281
|
+
let shouldScope = !hasHost;
|
|
282
|
+
while ((res = sep.exec(selector)) !== null) {
|
|
283
|
+
const separator = res[1];
|
|
284
|
+
const part = selector.slice(startIndex, res.index).trim();
|
|
285
|
+
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
|
286
|
+
const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
|
|
287
|
+
scopedSelector += `${scopedPart} ${separator} `;
|
|
288
|
+
startIndex = sep.lastIndex;
|
|
289
|
+
}
|
|
290
|
+
const part = selector.substring(startIndex);
|
|
291
|
+
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
|
292
|
+
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
|
293
|
+
// replace the placeholders with their original values
|
|
294
|
+
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
|
295
|
+
};
|
|
296
|
+
const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
|
|
297
|
+
return selector
|
|
298
|
+
.split(',')
|
|
299
|
+
.map((shallowPart) => {
|
|
300
|
+
if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
|
|
301
|
+
return shallowPart.trim();
|
|
302
|
+
}
|
|
303
|
+
if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
|
|
304
|
+
return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
return shallowPart.trim();
|
|
308
|
+
}
|
|
309
|
+
})
|
|
310
|
+
.join(', ');
|
|
311
|
+
};
|
|
312
|
+
const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
|
313
|
+
return processRules(cssText, (rule) => {
|
|
314
|
+
let selector = rule.selector;
|
|
315
|
+
let content = rule.content;
|
|
316
|
+
if (rule.selector[0] !== '@') {
|
|
317
|
+
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
|
318
|
+
}
|
|
319
|
+
else if (rule.selector.startsWith('@media') ||
|
|
320
|
+
rule.selector.startsWith('@supports') ||
|
|
321
|
+
rule.selector.startsWith('@page') ||
|
|
322
|
+
rule.selector.startsWith('@document')) {
|
|
323
|
+
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
|
324
|
+
}
|
|
325
|
+
const cssRule = {
|
|
326
|
+
selector: selector.replace(/\s{2,}/g, ' ').trim(),
|
|
327
|
+
content,
|
|
328
|
+
};
|
|
329
|
+
return cssRule;
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
|
|
333
|
+
cssText = insertPolyfillHostInCssText(cssText);
|
|
334
|
+
cssText = convertColonHost(cssText);
|
|
335
|
+
cssText = convertColonHostContext(cssText);
|
|
336
|
+
const slotted = convertColonSlotted(cssText, slotScopeId);
|
|
337
|
+
cssText = slotted.cssText;
|
|
338
|
+
cssText = convertShadowDOMSelectors(cssText);
|
|
339
|
+
if (scopeId) {
|
|
340
|
+
cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
|
|
341
|
+
}
|
|
342
|
+
cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
|
|
343
|
+
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
|
|
344
|
+
return {
|
|
345
|
+
cssText: cssText.trim(),
|
|
346
|
+
slottedSelectors: slotted.selectors,
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
350
|
+
const hostScopeId = scopeId + '-h';
|
|
351
|
+
const slotScopeId = scopeId + '-s';
|
|
352
|
+
const commentsWithHash = extractCommentsWithHash(cssText);
|
|
353
|
+
cssText = stripComments(cssText);
|
|
354
|
+
const orgSelectors = [];
|
|
355
|
+
if (commentOriginalSelector) {
|
|
356
|
+
const processCommentedSelector = (rule) => {
|
|
357
|
+
const placeholder = `/*!@___${orgSelectors.length}___*/`;
|
|
358
|
+
const comment = `/*!@${rule.selector}*/`;
|
|
359
|
+
orgSelectors.push({ placeholder, comment });
|
|
360
|
+
rule.selector = placeholder + rule.selector;
|
|
361
|
+
return rule;
|
|
362
|
+
};
|
|
363
|
+
cssText = processRules(cssText, (rule) => {
|
|
364
|
+
if (rule.selector[0] !== '@') {
|
|
365
|
+
return processCommentedSelector(rule);
|
|
366
|
+
}
|
|
367
|
+
else if (rule.selector.startsWith('@media') ||
|
|
368
|
+
rule.selector.startsWith('@supports') ||
|
|
369
|
+
rule.selector.startsWith('@page') ||
|
|
370
|
+
rule.selector.startsWith('@document')) {
|
|
371
|
+
rule.content = processRules(rule.content, processCommentedSelector);
|
|
372
|
+
return rule;
|
|
373
|
+
}
|
|
374
|
+
return rule;
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
|
|
378
|
+
cssText = [scoped.cssText, ...commentsWithHash].join('\n');
|
|
379
|
+
if (commentOriginalSelector) {
|
|
380
|
+
orgSelectors.forEach(({ placeholder, comment }) => {
|
|
381
|
+
cssText = cssText.replace(placeholder, comment);
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
scoped.slottedSelectors.forEach((slottedSelector) => {
|
|
385
|
+
cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
|
|
386
|
+
});
|
|
387
|
+
return cssText;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
exports.scopeCss = scopeCss;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entries": [
|
|
3
|
+
"./components/atoms/mg-badge/mg-badge.js",
|
|
4
|
+
"./components/atoms/mg-button/mg-button.js",
|
|
5
|
+
"./components/atoms/mg-character-left/mg-character-left.js",
|
|
6
|
+
"./components/atoms/mg-icon/mg-icon.js",
|
|
7
|
+
"./components/atoms/mg-input-title/mg-input-title.js",
|
|
8
|
+
"./components/atoms/mg-tag/mg-tag.js",
|
|
9
|
+
"./components/atoms/mg-tooltip/mg-tooltip.js",
|
|
10
|
+
"./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js",
|
|
11
|
+
"./components/molecules/inputs/mg-input-date/mg-input-date.js",
|
|
12
|
+
"./components/molecules/inputs/mg-input-numeric/mg-input-numeric.js",
|
|
13
|
+
"./components/molecules/inputs/mg-input-password/mg-input-password.js",
|
|
14
|
+
"./components/molecules/inputs/mg-input-radio/mg-input-radio.js",
|
|
15
|
+
"./components/molecules/inputs/mg-input-select/mg-input-select.js",
|
|
16
|
+
"./components/molecules/inputs/mg-input-text/mg-input-text.js",
|
|
17
|
+
"./components/molecules/inputs/mg-input-textarea/mg-input-textarea.js",
|
|
18
|
+
"./components/molecules/inputs/mg-input-toggle/mg-input-toggle.js",
|
|
19
|
+
"./components/molecules/mg-message/mg-message.js",
|
|
20
|
+
"./components/molecules/mg-pagination/mg-pagination.js",
|
|
21
|
+
"./components/molecules/mg-popover/mg-popover.js",
|
|
22
|
+
"./components/molecules/mg-tabs/mg-tabs.js"
|
|
23
|
+
],
|
|
24
|
+
"compiler": {
|
|
25
|
+
"name": "@stencil/core",
|
|
26
|
+
"version": "2.14.1",
|
|
27
|
+
"typescriptVersion": "4.5.4"
|
|
28
|
+
},
|
|
29
|
+
"collections": [],
|
|
30
|
+
"bundles": []
|
|
31
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A11Y
|
|
3
|
+
*/
|
|
4
|
+
.sr-only {
|
|
5
|
+
border: 0 !important;
|
|
6
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
7
|
+
-webkit-clip-path: inset(50%) !important;
|
|
8
|
+
clip-path: inset(50%) !important;
|
|
9
|
+
height: 1px !important;
|
|
10
|
+
margin: -1px !important;
|
|
11
|
+
overflow: hidden !important;
|
|
12
|
+
padding: 0 !important;
|
|
13
|
+
position: absolute !important;
|
|
14
|
+
width: 1px !important;
|
|
15
|
+
white-space: nowrap !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
*:focus:not(:focus-visible) {
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Variables */
|
|
23
|
+
/* Mixins */
|
|
24
|
+
/* Styles */
|
|
25
|
+
.mg-badge {
|
|
26
|
+
padding: 0 0.4rem;
|
|
27
|
+
height: var(--mg-badge-size);
|
|
28
|
+
min-width: var(--mg-badge-size);
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
border: 0.1rem solid;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
/* IE FIX */
|
|
33
|
+
border-radius: calc(var(--mg-badge-size) / 2);
|
|
34
|
+
font-size: var(--mg-badge-font-size);
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
text-align: center;
|
|
37
|
+
line-height: var(--mg-badge-size);
|
|
38
|
+
}
|
|
39
|
+
.mg-badge.mg-badge--primary {
|
|
40
|
+
background-color: hsl(var(--color-dark));
|
|
41
|
+
border-color: hsl(var(--color-dark));
|
|
42
|
+
color: hsl(var(--color-light));
|
|
43
|
+
}
|
|
44
|
+
.mg-badge.mg-badge--primary.mg-badge--outline {
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
color: hsl(var(--color-dark));
|
|
47
|
+
}
|
|
48
|
+
.mg-badge.mg-badge--secondary {
|
|
49
|
+
background-color: hsl(var(--color-light));
|
|
50
|
+
border-color: hsl(var(--color-light));
|
|
51
|
+
color: hsl(var(--color-dark));
|
|
52
|
+
}
|
|
53
|
+
.mg-badge.mg-badge--secondary.mg-badge--outline {
|
|
54
|
+
background-color: transparent;
|
|
55
|
+
color: hsl(var(--color-light));
|
|
56
|
+
}
|
|
57
|
+
.mg-badge.mg-badge--success {
|
|
58
|
+
background-color: hsl(var(--color-success));
|
|
59
|
+
border-color: hsl(var(--color-success));
|
|
60
|
+
color: hsl(var(--color-dark));
|
|
61
|
+
}
|
|
62
|
+
.mg-badge.mg-badge--success.mg-badge--outline {
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
color: hsl(var(--color-success));
|
|
65
|
+
}
|
|
66
|
+
.mg-badge.mg-badge--warning {
|
|
67
|
+
background-color: hsl(var(--color-warning));
|
|
68
|
+
border-color: hsl(var(--color-warning));
|
|
69
|
+
color: hsl(var(--color-dark));
|
|
70
|
+
}
|
|
71
|
+
.mg-badge.mg-badge--warning.mg-badge--outline {
|
|
72
|
+
background-color: transparent;
|
|
73
|
+
color: hsl(var(--color-warning));
|
|
74
|
+
}
|
|
75
|
+
.mg-badge.mg-badge--danger {
|
|
76
|
+
background-color: hsl(var(--color-danger));
|
|
77
|
+
border-color: hsl(var(--color-danger));
|
|
78
|
+
color: hsl(var(--color-light));
|
|
79
|
+
}
|
|
80
|
+
.mg-badge.mg-badge--danger.mg-badge--outline {
|
|
81
|
+
background-color: transparent;
|
|
82
|
+
color: hsl(var(--color-danger));
|
|
83
|
+
}
|
|
84
|
+
.mg-badge.mg-badge--info {
|
|
85
|
+
background-color: hsl(var(--color-info));
|
|
86
|
+
border-color: hsl(var(--color-info));
|
|
87
|
+
color: hsl(var(--color-light));
|
|
88
|
+
}
|
|
89
|
+
.mg-badge.mg-badge--info.mg-badge--outline {
|
|
90
|
+
background-color: transparent;
|
|
91
|
+
color: hsl(var(--color-info));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.mg-badge,
|
|
95
|
+
mg-badge {
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
}
|