@rededor/cura 0.3.2 → 0.3.4-alpha.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/dist/cjs/{app-globals-0f70160b.js → app-globals-a41d7f40.js} +40 -17
- package/dist/cjs/app-globals-a41d7f40.js.map +1 -0
- package/dist/cjs/css-shim-83cf0349.js +8 -0
- package/dist/cjs/css-shim-83cf0349.js.map +1 -0
- package/dist/cjs/{cura-display_4.cjs.entry.js → cura-button_6.cjs.entry.js} +115 -50
- package/dist/cjs/cura-button_6.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-icons-view.cjs.entry.js +4 -2
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -0
- package/dist/cjs/cura.cjs.js +19 -4
- package/dist/cjs/cura.cjs.js.map +1 -0
- package/dist/cjs/{index-8686299e.js → index-29633529.js} +829 -29
- package/dist/cjs/index-29633529.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +23 -4
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/shadow-css-8baae635.js +391 -0
- package/dist/cjs/shadow-css-8baae635.js.map +1 -0
- package/dist/collection/api/cura-api.js +1 -0
- package/dist/collection/api/cura-api.js.map +1 -0
- package/dist/collection/api/cura-api.type.js +1 -0
- package/dist/collection/api/cura-api.type.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-colors-module.js +1 -0
- package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-fonts-module.js +1 -0
- package/dist/collection/api/modules/cura-theme-fonts-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-module.js +1 -0
- package/dist/collection/api/modules/cura-theme-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-spacing-module.js +1 -0
- package/dist/collection/api/modules/cura-theme-spacing-module.js.map +1 -0
- package/dist/collection/api/theme-presets/static.js +1 -0
- package/dist/collection/api/theme-presets/static.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-default.js +6 -5
- package/dist/collection/api/theme-presets/theme-default.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-maternity.js +8 -0
- package/dist/collection/api/theme-presets/theme-maternity.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-oncology.js +27 -12
- package/dist/collection/api/theme-presets/theme-oncology.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-presets.js +1 -0
- package/dist/collection/api/theme-presets/theme-presets.js.map +1 -0
- package/dist/collection/assets/icons/iconset-default-list.js +1 -0
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -0
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/buttons/cura-button/cura-button.css +70 -0
- package/dist/collection/components/buttons/cura-button/cura-button.js +255 -0
- package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -0
- package/dist/collection/components/cura-icon/cura-icon.js +6 -4
- package/dist/collection/components/cura-icon/cura-icon.js.map +1 -0
- package/dist/collection/components/cura-icons-view/cura-icons-view.js +2 -1
- package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -0
- package/dist/collection/components/cura-page-template/cura-page-template.css +6 -24
- package/dist/collection/components/cura-page-template/cura-page-template.js +1 -0
- package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.js +1 -16
- package/dist/collection/components/text/cura-display/cura-display.js.map +1 -0
- package/dist/collection/components/text/cura-heading/cura-heading.js +1 -20
- package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -0
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -12
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/rededor-cura-start.js +1 -0
- package/dist/collection/rededor-cura-start.js.map +1 -0
- package/dist/collection/utils/utils.js +1 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +16 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/components/cura-button.d.ts +11 -0
- package/dist/components/cura-button.js +97 -0
- package/dist/components/cura-button.js.map +1 -0
- package/dist/components/cura-display.js +3 -17
- package/dist/components/cura-display.js.map +1 -0
- package/dist/components/cura-heading.js +3 -21
- package/dist/components/cura-heading.js.map +1 -0
- package/dist/components/cura-icon.js +2 -0
- package/dist/components/cura-icon.js.map +1 -0
- package/dist/components/cura-icon2.js +8 -5
- package/dist/components/cura-icon2.js.map +1 -0
- package/dist/components/cura-icons-view.js +4 -2
- package/dist/components/cura-icons-view.js.map +1 -0
- package/dist/components/cura-page-template.js +4 -2
- package/dist/components/cura-page-template.js.map +1 -0
- package/dist/components/cura-paragraph.js +3 -13
- package/dist/components/cura-paragraph.js.map +1 -0
- package/dist/components/index.d.ts +21 -9
- package/dist/components/index.js +67 -24
- package/dist/components/index.js.map +1 -0
- package/dist/cura/cura.esm.js +2 -1
- package/dist/cura/cura.esm.js.map +1 -0
- package/dist/cura/cura.js +3 -1
- package/dist/cura/index.esm.js +2 -0
- package/dist/cura/index.esm.js.map +1 -0
- package/dist/cura/p-118112e5.system.js +14 -0
- package/dist/cura/p-118112e5.system.js.map +1 -0
- package/dist/cura/p-183305c3.js +2 -0
- package/dist/cura/p-183305c3.js.map +1 -0
- package/dist/cura/p-3f6aaefc.system.js +2 -0
- package/dist/cura/p-3f6aaefc.system.js.map +1 -0
- package/dist/cura/p-4c60d085.entry.js +2 -0
- package/dist/cura/p-4c60d085.entry.js.map +1 -0
- package/dist/cura/p-4fc49972.system.js +2 -0
- package/dist/cura/p-4fc49972.system.js.map +1 -0
- package/dist/cura/p-50ea2036.system.js +2 -1
- package/dist/cura/p-50ea2036.system.js.map +1 -0
- package/dist/cura/p-61953b75.system.js +2 -0
- package/dist/cura/p-61953b75.system.js.map +1 -0
- package/dist/cura/p-731abb13.entry.js +2 -0
- package/dist/cura/p-731abb13.entry.js.map +1 -0
- package/dist/cura/{p-5b5cf2e4.system.entry.js → p-958c8695.system.entry.js} +2 -1
- package/dist/cura/p-958c8695.system.entry.js.map +1 -0
- package/dist/cura/p-b5872ed0.system.entry.js +2 -0
- package/dist/cura/p-b5872ed0.system.entry.js.map +1 -0
- package/dist/cura/p-bac0b4ab.js +2 -0
- package/dist/cura/p-bac0b4ab.js.map +1 -0
- package/dist/cura/p-beab48cd.js +13 -0
- package/dist/cura/p-beab48cd.js.map +1 -0
- package/dist/cura/p-c30e14d5.system.js +3 -0
- package/dist/cura/p-c30e14d5.system.js.map +1 -0
- package/dist/cura/p-d5990392.js +3 -0
- package/dist/cura/p-d5990392.js.map +1 -0
- package/dist/dist/loader/index.d.ts +9 -0
- package/dist/esm/{app-globals-cb45bff3.js → app-globals-8ed931e6.js} +40 -17
- package/dist/esm/app-globals-8ed931e6.js.map +1 -0
- package/dist/esm/css-shim-d13f0738.js +6 -0
- package/dist/esm/css-shim-d13f0738.js.map +1 -0
- package/dist/esm/{cura-display_4.entry.js → cura-button_6.entry.js} +114 -51
- package/dist/esm/cura-button_6.entry.js.map +1 -0
- package/dist/esm/cura-icons-view.entry.js +4 -2
- package/dist/esm/cura-icons-view.entry.js.map +1 -0
- package/dist/esm/cura.js +16 -4
- package/dist/esm/cura.js.map +1 -0
- package/dist/esm/{index-c3d31886.js → index-e11775ce.js} +826 -30
- package/dist/esm/index-e11775ce.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +23 -4
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/shadow-css-07b0c8c8.js +389 -0
- package/dist/esm/shadow-css-07b0c8c8.js.map +1 -0
- package/dist/esm-es5/app-globals-8ed931e6.js +2 -0
- package/dist/esm-es5/app-globals-8ed931e6.js.map +1 -0
- package/dist/esm-es5/css-shim-d13f0738.js +2 -0
- package/dist/esm-es5/css-shim-d13f0738.js.map +1 -0
- package/dist/esm-es5/cura-button_6.entry.js +2 -0
- package/dist/esm-es5/cura-button_6.entry.js.map +1 -0
- package/dist/esm-es5/cura-icons-view.entry.js +2 -1
- package/dist/esm-es5/cura-icons-view.entry.js.map +1 -0
- package/dist/esm-es5/cura.js +2 -1
- package/dist/esm-es5/cura.js.map +1 -0
- package/dist/esm-es5/index-e11775ce.js +3 -0
- package/dist/esm-es5/index-e11775ce.js.map +1 -0
- package/dist/esm-es5/index.js +2 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/loader.js +2 -1
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/shadow-css-07b0c8c8.js +13 -0
- package/dist/esm-es5/shadow-css-07b0c8c8.js.map +1 -0
- package/dist/types/api/theme-presets/theme-maternity.d.ts +7 -0
- package/dist/types/api/theme-presets/theme-oncology.d.ts +5 -5
- package/dist/types/api/theme-presets/theme-presets.d.ts +12 -5
- package/dist/types/components/buttons/cura-button/cura-button.d.ts +49 -0
- package/dist/types/components.d.ts +93 -0
- package/dist/types/stencil-public-runtime.d.ts +77 -15
- package/package.json +7 -7
- package/dist/cjs/cura-icon.cjs.entry.js +0 -59
- package/dist/cura/p-22290742.entry.js +0 -1
- package/dist/cura/p-32769783.system.js +0 -1
- package/dist/cura/p-84b2ad25.entry.js +0 -1
- package/dist/cura/p-8b416bc6.system.js +0 -1
- package/dist/cura/p-a50716bc.js +0 -2
- package/dist/cura/p-aca36c98.js +0 -1
- package/dist/cura/p-e3facf6a.system.entry.js +0 -1
- package/dist/cura/p-e447016d.system.js +0 -2
- package/dist/cura/p-e8fadcfa.system.entry.js +0 -1
- package/dist/cura/p-fbcea891.entry.js +0 -1
- package/dist/esm/cura-icon.entry.js +0 -55
- package/dist/esm-es5/app-globals-cb45bff3.js +0 -1
- package/dist/esm-es5/cura-display_4.entry.js +0 -1
- package/dist/esm-es5/cura-icon.entry.js +0 -1
- package/dist/esm-es5/index-c3d31886.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["safeSelector","selector","placeholders","index","replace","_","keep","replaceBy","concat","push","content","pseudo","exp","ss","restoreSafeSelector","_polyfillHost","_polyfillSlotted","_polyfillHostContext","_parenSuffix","_cssColonHostRe","RegExp","_cssColonHostContextRe","_cssColonSlottedRe","_polyfillHostNoCombinator","_polyfillHostNoCombinatorRe","_shadowDOMSelectorsRe","_selectorReSuffix","_polyfillHostRe","_colonHostRe","_colonSlottedRe","_colonHostContextRe","_commentRe","stripComments","input","_commentWithHashRe","extractCommentsWithHash","match","_ruleRe","_curlyRe","_selectorPartsRe","OPEN_CURLY","CLOSE_CURLY","BLOCK_PLACEHOLDER","processRules","ruleCallback","inputWithEscapedBlocks","escapeBlocks","nextBlockIndex","escapedString","m","_i","arguments","length","suffix","contentPrefix","startsWith","blocks","substring","cssRule","rule","inputParts","split","resultParts","escapedBlocks","bracketCount","currentBlockParts","partIndex","part","join","strEscapedBlocks","insertPolyfillHostInCssText","convertColonRule","cssText","regExp","partReplacer","parts","r","i","p","trim","colonHostPartReplacer","host","convertColonHost","colonHostContextPartReplacer","indexOf","convertColonSlotted","slotScopeId","slotClass","selectors","compound","slottedSelector","prefixSelector","char","orgSelector","addedSelector","trimRight","updatedSelector","convertColonHostContext","convertShadowDOMSelectors","reduce","result","pattern","makeScopeMatcher","scopeSelector","lre","rre","selectorNeedsScoping","re","test","injectScopingSelector","scopingSelector","before","_colonGroup","colon","after","applySimpleSelectorScope","hostSelector","lastIndex","replaceBy_1","applyStrictSelectorScope","isRe","className","_scopeSelectorPart","scopedP","t","safeContent","scopedSelector","startIndex","res","sep","hasHost","shouldScope","exec","separator","part_1","slice","scopedPart","scopeSelectorText","slotSelector","map","shallowPart","scopeSelectors","commentOriginalSelector","scopeCssText","scopeId","hostScopeId","slotted","slottedSelectors","scopeCss","commentsWithHash","orgSelectors","processCommentedSelector_1","placeholder","comment","scoped","__spreadArray","forEach","_a"],"sources":["node_modules/@stencil/core/internal/client/shadow-css.js"],"sourcesContent":["/*\n Stencil Client Platform v3.3.0 | MIT Licensed | https://stenciljs.com\n */\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n *\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts\n */\nconst safeSelector = (selector) => {\n const placeholders = [];\n let index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, (_, keep) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(keep);\n index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n const content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(exp);\n index++;\n return pseudo + replaceBy;\n });\n const ss = {\n content,\n placeholders,\n };\n return ss;\n};\nconst restoreSafeSelector = (placeholders, content) => {\n return content.replace(/__ph-(\\d+)__/g, (_, index) => placeholders[+index]);\n};\nconst _polyfillHost = '-shadowcsshost';\nconst _polyfillSlotted = '-shadowcssslotted';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = ')(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];\nconst _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonSlottedRe = /::slotted/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nconst stripComments = (input) => {\n return input.replace(_commentRe, '');\n};\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nconst extractCommentsWithHash = (input) => {\n return input.match(_commentWithHashRe) || [];\n};\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _curlyRe = /([{}])/g;\nconst _selectorPartsRe = /(^.*?[^\\\\])??((:+)(.*)|$)/;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst processRules = (input, ruleCallback) => {\n const inputWithEscapedBlocks = escapeBlocks(input);\n let nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const cssRule = {\n selector,\n content,\n };\n const rule = ruleCallback(cssRule);\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n};\nconst escapeBlocks = (input) => {\n const inputParts = input.split(_curlyRe);\n const resultParts = [];\n const escapedBlocks = [];\n let bracketCount = 0;\n let currentBlockParts = [];\n for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {\n const part = inputParts[partIndex];\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n const strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks,\n };\n return strEscapedBlocks;\n};\nconst insertPolyfillHostInCssText = (selector) => {\n selector = selector\n .replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost)\n .replace(_colonSlottedRe, _polyfillSlotted);\n return selector;\n};\nconst convertColonRule = (cssText, regExp, partReplacer) => {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, (...m) => {\n if (m[2]) {\n const parts = m[2].split(',');\n const r = [];\n for (let i = 0; i < parts.length; i++) {\n const p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\nconst colonHostPartReplacer = (host, part, suffix) => {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\nconst convertColonHost = (cssText) => {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\nconst colonHostContextPartReplacer = (host, part, suffix) => {\n if (part.indexOf(_polyfillHost) > -1) {\n return colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\nconst convertColonSlotted = (cssText, slotScopeId) => {\n const slotClass = '.' + slotScopeId + ' > ';\n const selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, (...m) => {\n if (m[2]) {\n const compound = m[2].trim();\n const suffix = m[3];\n const slottedSelector = slotClass + compound + suffix;\n let prefixSelector = '';\n for (let i = m[4] - 1; i >= 0; i--) {\n const char = m[5][i];\n if (char === '}' || char === ',') {\n break;\n }\n prefixSelector = char + prefixSelector;\n }\n const orgSelector = prefixSelector + slottedSelector;\n const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;\n if (orgSelector.trim() !== addedSelector.trim()) {\n const updatedSelector = `${addedSelector}, ${orgSelector}`;\n selectors.push({\n orgSelector,\n updatedSelector,\n });\n }\n return slottedSelector;\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors,\n cssText,\n };\n};\nconst convertColonHostContext = (cssText) => {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\nconst convertShadowDOMSelectors = (cssText) => {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n};\nconst makeScopeMatcher = (scopeSelector) => {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\nconst selectorNeedsScoping = (selector, scopeSelector) => {\n const re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\nconst injectScopingSelector = (selector, scopingSelector) => {\n return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {\n return before + scopingSelector + colon + after;\n });\n};\nconst applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = `.${hostSelector}`;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n};\nconst applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const className = '.' + scopeSelector;\n const _scopeSelectorPart = (p) => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n scopedP = injectScopingSelector(t, className);\n }\n }\n return scopedP;\n };\n const safeContent = safeSelector(selector);\n selector = safeContent.content;\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\nconst scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {\n return selector\n .split(',')\n .map((shallowPart) => {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {\n return shallowPart.trim();\n }\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n }\n else {\n return shallowPart.trim();\n }\n })\n .join(', ');\n};\nconst scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {\n return processRules(cssText, (rule) => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n }\n else if (rule.selector.startsWith('@media') ||\n rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') ||\n rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n const cssRule = {\n selector: selector.replace(/\\s{2,}/g, ' ').trim(),\n content,\n };\n return cssRule;\n });\n};\nconst scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n const slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);\n cssText = cssText.replace(/>\\s*\\*\\s+([^{, ]+)/gm, ' $1 ');\n return {\n cssText: cssText.trim(),\n slottedSelectors: slotted.selectors,\n };\n};\nconst scopeCss = (cssText, scopeId, commentOriginalSelector) => {\n const hostScopeId = scopeId + '-h';\n const slotScopeId = scopeId + '-s';\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n const orgSelectors = [];\n if (commentOriginalSelector) {\n const processCommentedSelector = (rule) => {\n const placeholder = `/*!@___${orgSelectors.length}___*/`;\n const comment = `/*!@${rule.selector}*/`;\n orgSelectors.push({ placeholder, comment });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n cssText = processRules(cssText, (rule) => {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector(rule);\n }\n else if (rule.selector.startsWith('@media') ||\n rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') ||\n rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector);\n return rule;\n }\n return rule;\n });\n }\n const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = [scoped.cssText, ...commentsWithHash].join('\\n');\n if (commentOriginalSelector) {\n orgSelectors.forEach(({ placeholder, comment }) => {\n cssText = cssText.replace(placeholder, comment);\n });\n }\n scoped.slottedSelectors.forEach((slottedSelector) => {\n cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);\n });\n return cssText;\n};\n\nexport { scopeCss };\n"],"mappings":";;;;;;;;;;;GAcA,IAAMA,aAAe,SAACC,GAClB,IAAMC,EAAe,GACrB,IAAIC,EAAQ,EAGZF,EAAWA,EAASG,QAAQ,iBAAiB,SAACC,EAAGC,GAC7C,IAAMC,EAAY,QAAAC,OAAQL,EAAK,MAC/BD,EAAaO,KAAKH,GAClBH,IACA,OAAOI,CACf,IAGI,IAAMG,EAAUT,EAASG,QAAQ,6BAA6B,SAACC,EAAGM,EAAQC,GACtE,IAAML,EAAY,QAAAC,OAAQL,EAAK,MAC/BD,EAAaO,KAAKG,GAClBT,IACA,OAAOQ,EAASJ,CACxB,IACI,IAAMM,EAAK,CACPH,QAAOA,EACPR,aAAYA,GAEhB,OAAOW,CACX,EACA,IAAMC,oBAAsB,SAACZ,EAAcQ,GACvC,OA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BI,EAAK1D,SAASsD,WAAW,aAAc,CACvCI,EAAKjD,QAAUiC,aAAagB,EAAKjD,QAAS6I,GAC1C,OAAO5F,C,CAEX,OAAOA,CACnB,G,CAEI,IAAM+F,EAASX,aAAavE,EAASwE,EAASC,EAAa3D,GAC3Dd,EAAUmF,cAAA,CAACD,EAAOlF,SAAY6E,EAAgB,MAAEjF,KAAK,MACrD,GAAI0E,EAAyB,CACzBQ,EAAaM,SAAQ,SAACC,G,IAAEL,EAAWK,EAAAL,YAAEC,EAAOI,EAAAJ,QACxCjF,EAAUA,EAAQpE,QAAQoJ,EAAaC,EACnD,G,CAEIC,EAAOP,iBAAiBS,SAAQ,SAAClE,GAC7BlB,EAAUA,EAAQpE,QAAQsF,EAAgBG,YAAaH,EAAgBM,gBAC/E,IACI,OAAOxB,CACX,S"}
|
|
@@ -14,14 +14,14 @@ export declare const ThemeOncology: {
|
|
|
14
14
|
'700': string;
|
|
15
15
|
'900': string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
accent: {
|
|
18
18
|
'100': string;
|
|
19
19
|
'300': string;
|
|
20
20
|
'500': string;
|
|
21
21
|
'700': string;
|
|
22
22
|
'900': string;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
aux: {
|
|
25
25
|
'100': string;
|
|
26
26
|
'300': string;
|
|
27
27
|
'500': string;
|
|
@@ -29,9 +29,6 @@ export declare const ThemeOncology: {
|
|
|
29
29
|
'900': string;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
spacing: {
|
|
33
|
-
base: number;
|
|
34
|
-
};
|
|
35
32
|
font: {
|
|
36
33
|
size: string;
|
|
37
34
|
color: string;
|
|
@@ -47,4 +44,7 @@ export declare const ThemeOncology: {
|
|
|
47
44
|
black: number;
|
|
48
45
|
};
|
|
49
46
|
};
|
|
47
|
+
spacing: {
|
|
48
|
+
base: number;
|
|
49
|
+
};
|
|
50
50
|
};
|
|
@@ -58,6 +58,13 @@ export declare const ThemePresets: {
|
|
|
58
58
|
'700': string;
|
|
59
59
|
'900': string;
|
|
60
60
|
};
|
|
61
|
+
accent: {
|
|
62
|
+
'100': string;
|
|
63
|
+
'300': string;
|
|
64
|
+
'500': string;
|
|
65
|
+
'700': string;
|
|
66
|
+
'900': string;
|
|
67
|
+
};
|
|
61
68
|
};
|
|
62
69
|
spacing: {
|
|
63
70
|
base: number;
|
|
@@ -94,14 +101,14 @@ export declare const ThemePresets: {
|
|
|
94
101
|
'700': string;
|
|
95
102
|
'900': string;
|
|
96
103
|
};
|
|
97
|
-
|
|
104
|
+
accent: {
|
|
98
105
|
'100': string;
|
|
99
106
|
'300': string;
|
|
100
107
|
'500': string;
|
|
101
108
|
'700': string;
|
|
102
109
|
'900': string;
|
|
103
110
|
};
|
|
104
|
-
|
|
111
|
+
aux: {
|
|
105
112
|
'100': string;
|
|
106
113
|
'300': string;
|
|
107
114
|
'500': string;
|
|
@@ -109,9 +116,6 @@ export declare const ThemePresets: {
|
|
|
109
116
|
'900': string;
|
|
110
117
|
};
|
|
111
118
|
};
|
|
112
|
-
spacing: {
|
|
113
|
-
base: number;
|
|
114
|
-
};
|
|
115
119
|
font: {
|
|
116
120
|
size: string;
|
|
117
121
|
color: string;
|
|
@@ -127,5 +131,8 @@ export declare const ThemePresets: {
|
|
|
127
131
|
black: number;
|
|
128
132
|
};
|
|
129
133
|
};
|
|
134
|
+
spacing: {
|
|
135
|
+
base: number;
|
|
136
|
+
};
|
|
130
137
|
};
|
|
131
138
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare class CuraButton {
|
|
2
|
+
/**
|
|
3
|
+
* Button type: primary (default) | outline | transparent | icon.
|
|
4
|
+
*/
|
|
5
|
+
type: string;
|
|
6
|
+
/**
|
|
7
|
+
* Button size: small | medium | large (default)
|
|
8
|
+
*/
|
|
9
|
+
size: string;
|
|
10
|
+
/**
|
|
11
|
+
* Disabled state. Boolean.
|
|
12
|
+
*/
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Loading state. Boolean.
|
|
16
|
+
*/
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Name of the icon to be used from iconset.
|
|
20
|
+
*/
|
|
21
|
+
iconName: string;
|
|
22
|
+
/**
|
|
23
|
+
* Custom iconset if needed.
|
|
24
|
+
*/
|
|
25
|
+
iconset: string;
|
|
26
|
+
/**
|
|
27
|
+
* Icon position: left (default) | right.
|
|
28
|
+
*/
|
|
29
|
+
iconPosition: string;
|
|
30
|
+
/**
|
|
31
|
+
* Property href switch button to link.
|
|
32
|
+
*/
|
|
33
|
+
href: string;
|
|
34
|
+
/**
|
|
35
|
+
* Set target if link.
|
|
36
|
+
*/
|
|
37
|
+
target: string;
|
|
38
|
+
/**
|
|
39
|
+
* Color base from color scheme. Default: accent
|
|
40
|
+
*/
|
|
41
|
+
color: string;
|
|
42
|
+
handleChangeColor(): void;
|
|
43
|
+
styles: {};
|
|
44
|
+
connectedCallback(): void;
|
|
45
|
+
getClasses(): {};
|
|
46
|
+
setColors(): void;
|
|
47
|
+
getIcon(): any;
|
|
48
|
+
render(): any;
|
|
49
|
+
}
|
|
@@ -6,6 +6,48 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
|
+
interface CuraButton {
|
|
10
|
+
/**
|
|
11
|
+
* Color base from color scheme. Default: accent
|
|
12
|
+
*/
|
|
13
|
+
"color": string;
|
|
14
|
+
/**
|
|
15
|
+
* Disabled state. Boolean.
|
|
16
|
+
*/
|
|
17
|
+
"disabled": boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Property href switch button to link.
|
|
20
|
+
*/
|
|
21
|
+
"href": string;
|
|
22
|
+
/**
|
|
23
|
+
* Name of the icon to be used from iconset.
|
|
24
|
+
*/
|
|
25
|
+
"iconName": string;
|
|
26
|
+
/**
|
|
27
|
+
* Icon position: left (default) | right.
|
|
28
|
+
*/
|
|
29
|
+
"iconPosition": string;
|
|
30
|
+
/**
|
|
31
|
+
* Custom iconset if needed.
|
|
32
|
+
*/
|
|
33
|
+
"iconset": string;
|
|
34
|
+
/**
|
|
35
|
+
* Loading state. Boolean.
|
|
36
|
+
*/
|
|
37
|
+
"isLoading": boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Button size: small | medium | large (default)
|
|
40
|
+
*/
|
|
41
|
+
"size": string;
|
|
42
|
+
/**
|
|
43
|
+
* Set target if link.
|
|
44
|
+
*/
|
|
45
|
+
"target": string;
|
|
46
|
+
/**
|
|
47
|
+
* Button type: primary (default) | outline | transparent | icon.
|
|
48
|
+
*/
|
|
49
|
+
"type": string;
|
|
50
|
+
}
|
|
9
51
|
interface CuraDisplay {
|
|
10
52
|
/**
|
|
11
53
|
* Apply light color to text in dark background. Values: boolean.
|
|
@@ -74,6 +116,12 @@ export namespace Components {
|
|
|
74
116
|
}
|
|
75
117
|
}
|
|
76
118
|
declare global {
|
|
119
|
+
interface HTMLCuraButtonElement extends Components.CuraButton, HTMLStencilElement {
|
|
120
|
+
}
|
|
121
|
+
var HTMLCuraButtonElement: {
|
|
122
|
+
prototype: HTMLCuraButtonElement;
|
|
123
|
+
new (): HTMLCuraButtonElement;
|
|
124
|
+
};
|
|
77
125
|
interface HTMLCuraDisplayElement extends Components.CuraDisplay, HTMLStencilElement {
|
|
78
126
|
}
|
|
79
127
|
var HTMLCuraDisplayElement: {
|
|
@@ -111,6 +159,7 @@ declare global {
|
|
|
111
159
|
new (): HTMLCuraParagraphElement;
|
|
112
160
|
};
|
|
113
161
|
interface HTMLElementTagNameMap {
|
|
162
|
+
"cura-button": HTMLCuraButtonElement;
|
|
114
163
|
"cura-display": HTMLCuraDisplayElement;
|
|
115
164
|
"cura-heading": HTMLCuraHeadingElement;
|
|
116
165
|
"cura-icon": HTMLCuraIconElement;
|
|
@@ -120,6 +169,48 @@ declare global {
|
|
|
120
169
|
}
|
|
121
170
|
}
|
|
122
171
|
declare namespace LocalJSX {
|
|
172
|
+
interface CuraButton {
|
|
173
|
+
/**
|
|
174
|
+
* Color base from color scheme. Default: accent
|
|
175
|
+
*/
|
|
176
|
+
"color"?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Disabled state. Boolean.
|
|
179
|
+
*/
|
|
180
|
+
"disabled"?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Property href switch button to link.
|
|
183
|
+
*/
|
|
184
|
+
"href"?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Name of the icon to be used from iconset.
|
|
187
|
+
*/
|
|
188
|
+
"iconName"?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Icon position: left (default) | right.
|
|
191
|
+
*/
|
|
192
|
+
"iconPosition"?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Custom iconset if needed.
|
|
195
|
+
*/
|
|
196
|
+
"iconset"?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Loading state. Boolean.
|
|
199
|
+
*/
|
|
200
|
+
"isLoading"?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Button size: small | medium | large (default)
|
|
203
|
+
*/
|
|
204
|
+
"size"?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Set target if link.
|
|
207
|
+
*/
|
|
208
|
+
"target"?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Button type: primary (default) | outline | transparent | icon.
|
|
211
|
+
*/
|
|
212
|
+
"type"?: string;
|
|
213
|
+
}
|
|
123
214
|
interface CuraDisplay {
|
|
124
215
|
/**
|
|
125
216
|
* Apply light color to text in dark background. Values: boolean.
|
|
@@ -187,6 +278,7 @@ declare namespace LocalJSX {
|
|
|
187
278
|
"spotColor"?: string;
|
|
188
279
|
}
|
|
189
280
|
interface IntrinsicElements {
|
|
281
|
+
"cura-button": CuraButton;
|
|
190
282
|
"cura-display": CuraDisplay;
|
|
191
283
|
"cura-heading": CuraHeading;
|
|
192
284
|
"cura-icon": CuraIcon;
|
|
@@ -199,6 +291,7 @@ export { LocalJSX as JSX };
|
|
|
199
291
|
declare module "@stencil/core" {
|
|
200
292
|
export namespace JSX {
|
|
201
293
|
interface IntrinsicElements {
|
|
294
|
+
"cura-button": LocalJSX.CuraButton & JSXBase.HTMLAttributes<HTMLCuraButtonElement>;
|
|
202
295
|
"cura-display": LocalJSX.CuraDisplay & JSXBase.HTMLAttributes<HTMLCuraDisplayElement>;
|
|
203
296
|
"cura-heading": LocalJSX.CuraHeading & JSXBase.HTMLAttributes<HTMLCuraHeadingElement>;
|
|
204
297
|
"cura-icon": LocalJSX.CuraIcon & JSXBase.HTMLAttributes<HTMLCuraIconElement>;
|
|
@@ -133,7 +133,7 @@ export interface ListenOptions {
|
|
|
133
133
|
*/
|
|
134
134
|
passive?: boolean;
|
|
135
135
|
}
|
|
136
|
-
export
|
|
136
|
+
export type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
137
137
|
export interface StateDecorator {
|
|
138
138
|
(): PropertyDecorator;
|
|
139
139
|
}
|
|
@@ -214,8 +214,8 @@ export declare const State: StateDecorator;
|
|
|
214
214
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
215
215
|
*/
|
|
216
216
|
export declare const Watch: WatchDecorator;
|
|
217
|
-
export
|
|
218
|
-
export
|
|
217
|
+
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
218
|
+
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
219
219
|
/**
|
|
220
220
|
* `setMode()` is used for libraries which provide multiple "modes" for styles.
|
|
221
221
|
*/
|
|
@@ -223,6 +223,7 @@ export declare const setMode: (handler: ResolutionHandler) => void;
|
|
|
223
223
|
/**
|
|
224
224
|
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
225
|
* @param ref a reference to the node to get styles for
|
|
226
|
+
* @returns the current mode or undefined, if not found
|
|
226
227
|
*/
|
|
227
228
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
228
229
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -237,6 +238,7 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
237
238
|
* if the path needs to be customized.
|
|
238
239
|
* @param path the path to use in calculating the asset path. this value will be
|
|
239
240
|
* used in conjunction with the base asset path
|
|
241
|
+
* @returns the base path
|
|
240
242
|
*/
|
|
241
243
|
export declare function getAssetPath(path: string): string;
|
|
242
244
|
/**
|
|
@@ -252,11 +254,22 @@ export declare function getAssetPath(path: string): string;
|
|
|
252
254
|
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
253
255
|
* will have to ensure the static assets are copied to its build directory.
|
|
254
256
|
* @param path the asset path to set
|
|
257
|
+
* @returns the set path
|
|
255
258
|
*/
|
|
256
259
|
export declare function setAssetPath(path: string): string;
|
|
260
|
+
/**
|
|
261
|
+
* Used to specify a nonce value that corresponds with an application's
|
|
262
|
+
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
263
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
264
|
+
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
265
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
266
|
+
* @param nonce The value to be used for the nonce attribute.
|
|
267
|
+
*/
|
|
268
|
+
export declare function setNonce(nonce: string): void;
|
|
257
269
|
/**
|
|
258
270
|
* Retrieve a Stencil element for a given reference
|
|
259
271
|
* @param ref the ref to get the Stencil element for
|
|
272
|
+
* @returns a reference to the element
|
|
260
273
|
*/
|
|
261
274
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
262
275
|
/**
|
|
@@ -269,6 +282,7 @@ export declare function getElement(ref: any): HTMLStencilElement;
|
|
|
269
282
|
export declare function forceUpdate(ref: any): void;
|
|
270
283
|
/**
|
|
271
284
|
* getRenderingRef
|
|
285
|
+
* @returns the rendering ref
|
|
272
286
|
*/
|
|
273
287
|
export declare function getRenderingRef(): any;
|
|
274
288
|
export interface HTMLStencilElement extends HTMLElement {
|
|
@@ -428,13 +442,57 @@ interface HostAttributes {
|
|
|
428
442
|
ref?: (el: HTMLElement | null) => void;
|
|
429
443
|
[prop: string]: any;
|
|
430
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Utilities for working with functional Stencil components. An object
|
|
447
|
+
* conforming to this interface is passed by the Stencil runtime as the third
|
|
448
|
+
* argument to a functional component, allowing component authors to work with
|
|
449
|
+
* features like children.
|
|
450
|
+
*
|
|
451
|
+
* The children of a functional component will be passed as the second
|
|
452
|
+
* argument, so a functional component which uses these utils to transform its
|
|
453
|
+
* children might look like the following:
|
|
454
|
+
*
|
|
455
|
+
* ```ts
|
|
456
|
+
* export const AddClass: FunctionalComponent = (_, children, utils) => (
|
|
457
|
+
* utils.map(children, child => ({
|
|
458
|
+
* ...child,
|
|
459
|
+
* vattrs: {
|
|
460
|
+
* ...child.vattrs,
|
|
461
|
+
* class: `${child.vattrs.class} add-class`
|
|
462
|
+
* }
|
|
463
|
+
* }))
|
|
464
|
+
* );
|
|
465
|
+
* ```
|
|
466
|
+
*
|
|
467
|
+
* For more see the Stencil documentation, here:
|
|
468
|
+
* https://stenciljs.com/docs/functional-components
|
|
469
|
+
*/
|
|
431
470
|
export interface FunctionalUtilities {
|
|
471
|
+
/**
|
|
472
|
+
* Utility for reading the children of a functional component at runtime.
|
|
473
|
+
* Since the Stencil runtime uses a different interface for children it is
|
|
474
|
+
* not recommendeded to read the children directly, and is preferable to use
|
|
475
|
+
* this utility to, for instance, perform a side effect for each child.
|
|
476
|
+
*/
|
|
432
477
|
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
|
|
478
|
+
/**
|
|
479
|
+
* Utility for transforming the children of a functional component. Given an
|
|
480
|
+
* array of children and a callback this will return a list of the results of
|
|
481
|
+
* passing each child to the supplied callback.
|
|
482
|
+
*/
|
|
433
483
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
434
484
|
}
|
|
435
485
|
export interface FunctionalComponent<T = {}> {
|
|
436
486
|
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
437
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* A Child VDOM node
|
|
490
|
+
*
|
|
491
|
+
* This has most of the same properties as {@link VNode} but friendlier names
|
|
492
|
+
* (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
|
|
493
|
+
* order to provide a friendlier public interface for users of the
|
|
494
|
+
* {@link FunctionalUtilities}).
|
|
495
|
+
*/
|
|
438
496
|
export interface ChildNode {
|
|
439
497
|
vtag?: string | number | Function;
|
|
440
498
|
vkey?: string | number;
|
|
@@ -481,6 +539,9 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
|
|
|
481
539
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
482
540
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
483
541
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
542
|
+
/**
|
|
543
|
+
* A virtual DOM node
|
|
544
|
+
*/
|
|
484
545
|
export interface VNode {
|
|
485
546
|
$flags$: number;
|
|
486
547
|
$tag$: string | number | Function;
|
|
@@ -751,6 +812,7 @@ export declare namespace JSXBase {
|
|
|
751
812
|
datetime?: string;
|
|
752
813
|
}
|
|
753
814
|
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
815
|
+
onCancel?: (event: Event) => void;
|
|
754
816
|
onClose?: (event: Event) => void;
|
|
755
817
|
open?: boolean;
|
|
756
818
|
returnValue?: string;
|
|
@@ -831,8 +893,8 @@ export declare namespace JSXBase {
|
|
|
831
893
|
accept?: string;
|
|
832
894
|
allowdirs?: boolean;
|
|
833
895
|
alt?: string;
|
|
834
|
-
autoCapitalize?:
|
|
835
|
-
autocapitalize?:
|
|
896
|
+
autoCapitalize?: string;
|
|
897
|
+
autocapitalize?: string;
|
|
836
898
|
autoComplete?: string;
|
|
837
899
|
autocomplete?: string;
|
|
838
900
|
autoFocus?: boolean;
|
|
@@ -1156,8 +1218,8 @@ export declare namespace JSXBase {
|
|
|
1156
1218
|
resource?: string;
|
|
1157
1219
|
typeof?: string;
|
|
1158
1220
|
vocab?: string;
|
|
1159
|
-
autoCapitalize?:
|
|
1160
|
-
autocapitalize?:
|
|
1221
|
+
autoCapitalize?: string;
|
|
1222
|
+
autocapitalize?: string;
|
|
1161
1223
|
autoCorrect?: string;
|
|
1162
1224
|
autocorrect?: string;
|
|
1163
1225
|
autoSave?: string;
|
|
@@ -1448,12 +1510,12 @@ export declare namespace JSXBase {
|
|
|
1448
1510
|
onCutCapture?: (event: ClipboardEvent) => void;
|
|
1449
1511
|
onPaste?: (event: ClipboardEvent) => void;
|
|
1450
1512
|
onPasteCapture?: (event: ClipboardEvent) => void;
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1513
|
+
onCompositionend?: (event: CompositionEvent) => void;
|
|
1514
|
+
onCompositionendCapture?: (event: CompositionEvent) => void;
|
|
1515
|
+
onCompositionstart?: (event: CompositionEvent) => void;
|
|
1516
|
+
onCompositionstartCapture?: (event: CompositionEvent) => void;
|
|
1517
|
+
onCompositionupdate?: (event: CompositionEvent) => void;
|
|
1518
|
+
onCompositionupdateCapture?: (event: CompositionEvent) => void;
|
|
1457
1519
|
onFocus?: (event: FocusEvent) => void;
|
|
1458
1520
|
onFocusCapture?: (event: FocusEvent) => void;
|
|
1459
1521
|
onFocusin?: (event: FocusEvent) => void;
|
|
@@ -1464,8 +1526,8 @@ export declare namespace JSXBase {
|
|
|
1464
1526
|
onBlurCapture?: (event: FocusEvent) => void;
|
|
1465
1527
|
onChange?: (event: Event) => void;
|
|
1466
1528
|
onChangeCapture?: (event: Event) => void;
|
|
1467
|
-
onInput?: (event:
|
|
1468
|
-
onInputCapture?: (event:
|
|
1529
|
+
onInput?: (event: InputEvent) => void;
|
|
1530
|
+
onInputCapture?: (event: InputEvent) => void;
|
|
1469
1531
|
onReset?: (event: Event) => void;
|
|
1470
1532
|
onResetCapture?: (event: Event) => void;
|
|
1471
1533
|
onSubmit?: (event: Event) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rededor/cura",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4-alpha.0",
|
|
4
4
|
"description": "Cura Design System",
|
|
5
5
|
"author": "Rede D`Or São Luiz",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"build:iconset": "node ./node/iconset-builder.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@stencil/core": "^
|
|
28
|
+
"@stencil/core": "^3.3.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@stencil/angular-output-target": "^0.
|
|
32
|
-
"@stencil/react-output-target": "^0.
|
|
33
|
-
"@stencil/sass": "^
|
|
34
|
-
"@stencil/vue-output-target": "^0.
|
|
31
|
+
"@stencil/angular-output-target": "^0.5.0",
|
|
32
|
+
"@stencil/react-output-target": "^0.4.0",
|
|
33
|
+
"@stencil/sass": "^2.0.3",
|
|
34
|
+
"@stencil/vue-output-target": "^0.7.0",
|
|
35
35
|
"@types/jest": "^27.0.3",
|
|
36
36
|
"jest": "^27.4.5",
|
|
37
37
|
"jest-cli": "^27.4.5",
|
|
38
38
|
"puppeteer": "^10.0.0",
|
|
39
39
|
"svgo": "^3.0.1"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "9fec75ddff29c689224bbef366663b8fcd515db6"
|
|
42
42
|
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-8686299e.js');
|
|
6
|
-
|
|
7
|
-
const curaIconCss = ":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";
|
|
8
|
-
|
|
9
|
-
const CuraIcon = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.name = '';
|
|
13
|
-
this.color = 'neutral-base';
|
|
14
|
-
this.iconset = 'default';
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.sizes = {
|
|
17
|
-
"128": { size: 128, stroke: 5.25 },
|
|
18
|
-
"72": { size: 72, stroke: 3.5 },
|
|
19
|
-
"64": { size: 64, stroke: 3.25 },
|
|
20
|
-
"48": { size: 48, stroke: 2.75 },
|
|
21
|
-
"40": { size: 40, stroke: 2.5 },
|
|
22
|
-
"32": { size: 32, stroke: 2.25 },
|
|
23
|
-
"24": { size: 24, stroke: 2 },
|
|
24
|
-
"20": { size: 20, stroke: 1.75 },
|
|
25
|
-
"16": { size: 16, stroke: 1.5 },
|
|
26
|
-
"default": { size: 24, stroke: 2 }
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
sizeHandler(size) {
|
|
30
|
-
const scaledStroke = (iconSize) => {
|
|
31
|
-
return `${this.sizes[iconSize].stroke * (this.sizes.default.size / this.sizes[iconSize].size)}px`;
|
|
32
|
-
};
|
|
33
|
-
this.setHostProperty('--size', this.sizes[`${size}`] ? `${this.sizes[size].size}px` : `${this.sizes.default.size}px`);
|
|
34
|
-
this.setHostProperty('--stroke', this.sizes[`${size}`] ? scaledStroke(size) : scaledStroke("default"));
|
|
35
|
-
}
|
|
36
|
-
colorHandler() {
|
|
37
|
-
this.setHostProperty('--color', window.CuraAPI.theme.colors.getColor(this.disabled ? 'neutral-light' : this.color));
|
|
38
|
-
}
|
|
39
|
-
connectedCallback() {
|
|
40
|
-
this.assetsPath = window.CuraAPI.localAssetsPath;
|
|
41
|
-
this.sizeHandler(this.size);
|
|
42
|
-
this.colorHandler();
|
|
43
|
-
}
|
|
44
|
-
setHostProperty(prop, value) {
|
|
45
|
-
this.host.style.setProperty(prop, value);
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
return (index.h(index.Host, null, index.h("svg", { version: "1.1", viewBox: "0 0 24 24", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg" }, index.h("use", { xlinkHref: `${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}` }))));
|
|
49
|
-
}
|
|
50
|
-
get host() { return index.getElement(this); }
|
|
51
|
-
static get watchers() { return {
|
|
52
|
-
"size": ["sizeHandler"],
|
|
53
|
-
"color": ["colorHandler"],
|
|
54
|
-
"disabled": ["colorHandler"]
|
|
55
|
-
}; }
|
|
56
|
-
};
|
|
57
|
-
CuraIcon.style = curaIconCss;
|
|
58
|
-
|
|
59
|
-
exports.cura_icon = CuraIcon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,h as t,H as e,g as i}from"./p-a50716bc.js";const r=class{constructor(t){s(this,t),this.name="",this.color="neutral-base",this.iconset="default",this.disabled=!1,this.sizes={128:{size:128,stroke:5.25},72:{size:72,stroke:3.5},64:{size:64,stroke:3.25},48:{size:48,stroke:2.75},40:{size:40,stroke:2.5},32:{size:32,stroke:2.25},24:{size:24,stroke:2},20:{size:20,stroke:1.75},16:{size:16,stroke:1.5},default:{size:24,stroke:2}}}sizeHandler(s){this.setHostProperty("--size",this.sizes[`${s}`]?`${this.sizes[s].size}px`:`${this.sizes.default.size}px`),this.setHostProperty("--stroke",(s=>this.sizes[s].stroke*(this.sizes.default.size/this.sizes[s].size)+"px")(this.sizes[`${s}`]?s:"default"))}colorHandler(){this.setHostProperty("--color",window.CuraAPI.theme.colors.getColor(this.disabled?"neutral-light":this.color))}connectedCallback(){this.assetsPath=window.CuraAPI.localAssetsPath,this.sizeHandler(this.size),this.colorHandler()}setHostProperty(s,t){this.host.style.setProperty(s,t)}render(){return t(e,null,t("svg",{version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},t("use",{xlinkHref:`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`})))}get host(){return i(this)}static get watchers(){return{size:["sizeHandler"],color:["colorHandler"],disabled:["colorHandler"]}}};r.style=":host{width:var(--size);height:var(--size)}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";export{r as cura_icon}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register([],(function(t){"use strict";return{execute:function(){var e={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#F9E8D5",300:"#E4A04F",500:"#DF8D2C",700:"#955E1D",900:"#2D1C09"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}};var r=Object.assign(Object.assign({},e),{color:{primary:{100:"#FCEFF6",300:"#FFBFE5",500:"#CD4D9A",700:"#99126C",900:"#00133B"},secondary:{100:"#EDF3FF",300:"#BDD2FF",500:"#189AB4",700:"#001C58",900:"#430E31"}}});var o=Object.assign(Object.assign({},e),{color:{primary:{100:"#99CFFF",300:"#47A9FF",500:"#0083F5",700:"#006DCC",900:"#0058A4"},secondary:{100:"#CDD7E3",300:"#9BAFC7",500:"#6886AB",700:"#365E8F",900:"#043673"},aux1:{100:"#AABEE1",300:"#557EC4",500:"#003DA6",700:"#00296F",900:"#000C21"},aux2:{100:"#DAF2EF",300:"#84D4CA",500:"#47BFB0",700:"#2F7F75",900:"#0E2623"}}});var i={default:e,maternidade:r,oncologia:o};var n={color:{success:{lighter:"#DFF6E9",light:"#94E1B5",base:"#5FD290",dark:"#3F8C60",darker:"#132A1D",depth100:"#DFF6E9",depth300:"#94E1B5",depth500:"#5FD290",depth700:"#3F8C60",depth900:"#132A1D"},info:{lighter:"#CFE2FF",light:"#95BFFF",base:"#6EA8FF",dark:"#517BBB",darker:"#253855",depth100:"#CFE2FF",depth300:"#95BFFF",depth500:"#6EA8FF",depth700:"#517BBB",depth900:"#253855"},error:{lighter:"#FBDDDD",light:"#F28F8F",base:"#EB5757",dark:"#9D3A3A",darker:"#2F1111",depth100:"#FBDDDD",depth300:"#F28F8F",depth500:"#EB5757",depth700:"#9D3A3A",depth900:"#2F1111"},warning:{lighter:"#FCFAC4",light:"#F8F489",base:"#F5EF4E",dark:"#A39F34",darker:"#313010",depth100:"#FCFAC4",depth300:"#F8F489",depth500:"#F5EF4E",depth700:"#A39F34",depth900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}}};var a=function(){function t(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"};this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}t.prototype.getColor=function(t){if(t===void 0){t="primary-base"}var e=this.splitColorDepth(t),r=e.color,o=e.depth;var i=this.getStatic(r,o);if(i)return i;return this.getDynamic(r,o)};t.prototype.getStatic=function(t,e){var r,o;return((r=n.color[t])===null||r===void 0?void 0:r[e])||((o=n.color[t])===null||o===void 0?void 0:o[this.NeutralDepthAlias[e]])||null};t.prototype.getDynamic=function(t,e){var r=this.ColorDepthAlias[e]?"--cura-color-".concat(t,"-").concat(this.ColorDepthAlias[e]):"--cura-color-".concat(t,"-").concat(e);return getComputedStyle(document.body).getPropertyValue(r)?"var(".concat(r,")"):"var(--cura-color-primary-500)"};t.prototype.splitColorDepth=function(t){var e=t.toLowerCase().split(/-(.*)/),r=e[0],o=e[1];return{color:r!==null&&r!==void 0?r:"primary",depth:o!==null&&o!==void 0?o:"base"}};return t}();var s=function(){function t(){this.curaSpacing="--cura-spacing-base"}t.prototype.getSpacing=function(){if(getComputedStyle(document.body).getPropertyValue(this.curaSpacing)){return"var(".concat(this.curaSpacing,")")}return"4"};return t}();var c=function(){function t(){this.getSize=function(){return"var(--cura-font-size)"};this.getColor=function(){return"var(--cura-font-color)"}}t.prototype.getFamily=function(t){if(t===void 0){t="body"}var e="--cura-font-".concat(t.toLowerCase());return getComputedStyle(document.body).getPropertyValue(e)?"var(".concat(e,")"):"var(--cura-font-body)"};t.prototype.getWeights=function(){var t={};Object.keys(e.font.weights).forEach((function(e){return t[e]="var(--cura-font-weights-".concat(e,")")}));return t};return t}();var u=function(){function t(){var t=this;this.prefix="--cura";this.colors=new a;this.spacing=new s;this.fonts=new c;this.setCssVar=function(e,r){var o=t.groupPath(r,e[0]);t.body.style.setProperty(o,e[1])};this.groupPath=function(t,e){return"".concat(t,"-").concat(e)};this.isObject=function(t){return t&&typeof t==="object"&&!Array.isArray(t)};this.mergeObject=function(e,r){var o=Object.entries(e);for(var i=0,n=o;i<n.length;i++){var a=n[i];if(t.isObject(a[1])){t.mergeObject(a[1],r[a[0]])}else{r[a[0]]=a[1]}}};this.buildCssVars=function(e,r){var o=Object.entries(r);for(var i=0,n=o;i<n.length;i++){var a=n[i];if(t.isObject(a[1])){t.buildCssVars(t.groupPath(e,a[0]),a[1])}else{t.setCssVar(a,e)}}};this.body=window.document.documentElement.querySelector("body")}t.prototype.load=function(t){if(t===void 0){t="default"}var e=i[t]?i[t]:i.default;this.buildCssVars(this.prefix,e)};t.prototype.setCustom=function(t){var e=t.name;if(e in i){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e);this.load("default")}else{var r=t.fromPreset&&t.fromPreset in i?i[t.fromPreset]:i.default;var o=Object.assign({},JSON.parse(JSON.stringify(r)));this.mergeObject(t.definitions,o);i[e]=o;this.load(e)}};return t}();var l=function(){function t(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";var e=new u;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t){return e.colors.getColor(t)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}},spacing:{getSpacing:function(){return e.spacing.getSpacing()}}};if(t&&t.customTheme){this.theme.setCustom(t.customTheme)}else{var r=t&&t.theme?t.theme:"default";this.theme.load(r)}}return t}();function h(){var t=window.CuraInit;window.CuraAPI=t?new l(t):new l;var e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}var d=t("g",h)}}}));
|