@aurodesignsystem/auro-formkit 2.0.0-beta.4 → 2.0.0-beta.40
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/.turbo/cache/006be80261b993a5-meta.json +1 -0
- package/.turbo/cache/006be80261b993a5.tar.zst +0 -0
- package/.turbo/cache/03338963f2ae4c89-meta.json +1 -0
- package/.turbo/cache/03338963f2ae4c89.tar.zst +0 -0
- package/.turbo/cache/06dfc9c20aacd0fa-meta.json +1 -0
- package/.turbo/cache/06dfc9c20aacd0fa.tar.zst +0 -0
- package/.turbo/cache/075034ccdb82fbea-meta.json +1 -0
- package/.turbo/cache/075034ccdb82fbea.tar.zst +0 -0
- package/.turbo/cache/0ff927ad868537f6-meta.json +1 -0
- package/.turbo/cache/0ff927ad868537f6.tar.zst +0 -0
- package/.turbo/cache/10b8500a6b0c6655-meta.json +1 -0
- package/.turbo/cache/10b8500a6b0c6655.tar.zst +0 -0
- package/.turbo/cache/138466aaa06fa946-meta.json +1 -0
- package/.turbo/cache/138466aaa06fa946.tar.zst +0 -0
- package/.turbo/cache/1a8525cb6ad91e2a-meta.json +1 -0
- package/.turbo/cache/1a8525cb6ad91e2a.tar.zst +0 -0
- package/.turbo/cache/1c347bdf63624c8a-meta.json +1 -0
- package/.turbo/cache/1c347bdf63624c8a.tar.zst +0 -0
- package/.turbo/cache/1d4e8167ea8e924f-meta.json +1 -0
- package/.turbo/cache/1d4e8167ea8e924f.tar.zst +0 -0
- package/.turbo/cache/2289d12debb3c42c-meta.json +1 -0
- package/.turbo/cache/2289d12debb3c42c.tar.zst +0 -0
- package/.turbo/cache/22fc147c04804f70-meta.json +1 -0
- package/.turbo/cache/22fc147c04804f70.tar.zst +0 -0
- package/.turbo/cache/2d51091c22fc92f5-meta.json +1 -0
- package/.turbo/cache/2d51091c22fc92f5.tar.zst +0 -0
- package/.turbo/cache/3025cdff2ca7afbf-meta.json +1 -0
- package/.turbo/cache/3025cdff2ca7afbf.tar.zst +0 -0
- package/.turbo/cache/3082b3a86c0f9b94-meta.json +1 -0
- package/.turbo/cache/3082b3a86c0f9b94.tar.zst +0 -0
- package/.turbo/cache/366fc19b143f7957-meta.json +1 -0
- package/.turbo/cache/366fc19b143f7957.tar.zst +0 -0
- package/.turbo/cache/3dba2f8fdc7eb1d0-meta.json +1 -0
- package/.turbo/cache/3dba2f8fdc7eb1d0.tar.zst +0 -0
- package/.turbo/cache/43995f6c84a2de33-meta.json +1 -0
- package/.turbo/cache/43995f6c84a2de33.tar.zst +0 -0
- package/.turbo/cache/45d6aea680ecb5ec-meta.json +1 -0
- package/.turbo/cache/45d6aea680ecb5ec.tar.zst +0 -0
- package/.turbo/cache/45ecc27552696bd6-meta.json +1 -0
- package/.turbo/cache/45ecc27552696bd6.tar.zst +0 -0
- package/.turbo/cache/47d63056350252e5-meta.json +1 -0
- package/.turbo/cache/47d63056350252e5.tar.zst +0 -0
- package/.turbo/cache/4aadd7fe6b69cccf-meta.json +1 -0
- package/.turbo/cache/4aadd7fe6b69cccf.tar.zst +0 -0
- package/.turbo/cache/5b3bb164db4c477c-meta.json +1 -0
- package/.turbo/cache/5b3bb164db4c477c.tar.zst +0 -0
- package/.turbo/cache/6bfd7cffad1e6b8a-meta.json +1 -0
- package/.turbo/cache/6bfd7cffad1e6b8a.tar.zst +0 -0
- package/.turbo/cache/6d48e8dc24e08c8c-meta.json +1 -0
- package/.turbo/cache/6d48e8dc24e08c8c.tar.zst +0 -0
- package/.turbo/cache/70e65d2581c9de95-meta.json +1 -0
- package/.turbo/cache/70e65d2581c9de95.tar.zst +0 -0
- package/.turbo/cache/78629f56974cc5d7-meta.json +1 -0
- package/.turbo/cache/78629f56974cc5d7.tar.zst +0 -0
- package/.turbo/cache/7a2e937d0f5acb7c-meta.json +1 -0
- package/.turbo/cache/7a2e937d0f5acb7c.tar.zst +0 -0
- package/.turbo/cache/85f181c5a0ebfdc3-meta.json +1 -0
- package/.turbo/cache/85f181c5a0ebfdc3.tar.zst +0 -0
- package/.turbo/cache/8830b8b624914679-meta.json +1 -0
- package/.turbo/cache/8830b8b624914679.tar.zst +0 -0
- package/.turbo/cache/88d4c5b7339b081b-meta.json +1 -0
- package/.turbo/cache/88d4c5b7339b081b.tar.zst +0 -0
- package/.turbo/cache/8f20a1cd3533e2cb-meta.json +1 -0
- package/.turbo/cache/8f20a1cd3533e2cb.tar.zst +0 -0
- package/.turbo/cache/91de2098a36b6939-meta.json +1 -0
- package/.turbo/cache/91de2098a36b6939.tar.zst +0 -0
- package/.turbo/cache/96edc0764ed4ab77-meta.json +1 -0
- package/.turbo/cache/96edc0764ed4ab77.tar.zst +0 -0
- package/.turbo/cache/a776eb6f87cd7464-meta.json +1 -0
- package/.turbo/cache/a776eb6f87cd7464.tar.zst +0 -0
- package/.turbo/cache/aa2a6d9e7beff7fc-meta.json +1 -0
- package/.turbo/cache/aa2a6d9e7beff7fc.tar.zst +0 -0
- package/.turbo/cache/ac47b2df8381d990-meta.json +1 -0
- package/.turbo/cache/ac47b2df8381d990.tar.zst +0 -0
- package/.turbo/cache/ac98992ca27cd36e-meta.json +1 -0
- package/.turbo/cache/ac98992ca27cd36e.tar.zst +0 -0
- package/.turbo/cache/b323342fa340ccb5-meta.json +1 -0
- package/.turbo/cache/b323342fa340ccb5.tar.zst +0 -0
- package/.turbo/cache/b681d1652a7f2aca-meta.json +1 -0
- package/.turbo/cache/b681d1652a7f2aca.tar.zst +0 -0
- package/.turbo/cache/b99d21002170d86d-meta.json +1 -0
- package/.turbo/cache/b99d21002170d86d.tar.zst +0 -0
- package/.turbo/cache/bff34c0db361f414-meta.json +1 -0
- package/.turbo/cache/bff34c0db361f414.tar.zst +0 -0
- package/.turbo/cache/c1c7334875426ff3-meta.json +1 -0
- package/.turbo/cache/c1c7334875426ff3.tar.zst +0 -0
- package/.turbo/cache/cd12b66dd972aaf7-meta.json +1 -0
- package/.turbo/cache/cd12b66dd972aaf7.tar.zst +0 -0
- package/.turbo/cache/cf74604f39b00f11-meta.json +1 -0
- package/.turbo/cache/cf74604f39b00f11.tar.zst +0 -0
- package/.turbo/cache/d5dbe6fb31ae5667-meta.json +1 -0
- package/.turbo/cache/d5dbe6fb31ae5667.tar.zst +0 -0
- package/.turbo/cache/e2688cc026390fd6-meta.json +1 -0
- package/.turbo/cache/e2688cc026390fd6.tar.zst +0 -0
- package/.turbo/cache/e34579fa4cd85684-meta.json +1 -0
- package/.turbo/cache/e34579fa4cd85684.tar.zst +0 -0
- package/.turbo/cache/e64bd75c16c140f3-meta.json +1 -0
- package/.turbo/cache/e64bd75c16c140f3.tar.zst +0 -0
- package/.turbo/cache/ea92743dea3b7023-meta.json +1 -0
- package/.turbo/cache/ea92743dea3b7023.tar.zst +0 -0
- package/.turbo/cache/f1b0cb8241603223-meta.json +1 -0
- package/.turbo/cache/f1b0cb8241603223.tar.zst +0 -0
- package/.turbo/cache/f22dc2dd55715ba2-meta.json +1 -0
- package/.turbo/cache/f22dc2dd55715ba2.tar.zst +0 -0
- package/.turbo/cache/f8f7a8045f230b79-meta.json +1 -0
- package/.turbo/cache/f8f7a8045f230b79.tar.zst +0 -0
- package/.turbo/cache/f8f99ba69bff8f2c-meta.json +1 -0
- package/.turbo/cache/f8f99ba69bff8f2c.tar.zst +0 -0
- package/.turbo/cache/faafa5cc35d12e06-meta.json +1 -0
- package/.turbo/cache/faafa5cc35d12e06.tar.zst +0 -0
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +360 -0
- package/README.md +59 -59
- package/components/checkbox/.turbo/turbo-build$colon$sass.log +10 -10
- package/components/checkbox/.turbo/turbo-build.log +20 -21
- package/components/checkbox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/checkbox/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/checkbox/README.md +27 -35
- package/components/checkbox/demo/api.md +67 -68
- package/components/checkbox/demo/api.min.js +429 -89
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +429 -89
- package/components/checkbox/dist/auro-checkbox-group.d.ts +40 -16
- package/components/checkbox/dist/auro-checkbox-group.d.ts.map +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +19 -6
- package/components/checkbox/dist/auro-checkbox.d.ts.map +1 -1
- package/components/checkbox/dist/index.js +429 -89
- package/components/checkbox/package.json +6 -5
- package/components/checkbox/src/auro-checkbox-group.js +62 -23
- package/components/checkbox/src/auro-checkbox.js +30 -9
- package/components/checkbox/src/styles/colorGroup-css.js +1 -1
- package/components/checkbox/src/styles/colorGroup.css +0 -8
- package/components/checkbox/src/styles/colorGroup.scss +0 -8
- package/components/checkbox/src/styles/tokens-css.js +1 -1
- package/components/checkbox/src/styles/tokens.css +0 -1
- package/components/checkbox/src/styles/tokens.scss +0 -1
- package/components/combobox/.turbo/turbo-build$colon$sass.log +5 -5
- package/components/combobox/.turbo/turbo-build.log +22 -23
- package/components/combobox/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/combobox/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/combobox/README.md +23 -28
- package/components/combobox/demo/api.md +27 -25
- package/components/combobox/demo/api.min.js +3385 -848
- package/components/combobox/demo/index.md +1 -1
- package/components/combobox/demo/index.min.js +3382 -845
- package/components/combobox/dist/auro-combobox.d.ts +74 -79
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/dropdownVersion.d.ts +3 -0
- package/components/combobox/dist/dropdownVersion.d.ts.map +1 -0
- package/components/combobox/dist/index.js +2733 -510
- package/components/combobox/dist/inputVersion.d.ts +3 -0
- package/components/combobox/dist/inputVersion.d.ts.map +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/.husky/pre-commit +1 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/CHANGELOG.md +863 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/README.md +109 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/README.md +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/_auroElement.scss +45 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.js +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.mjs +38 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials+fv.css +110 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/bundled/essentials.css +106 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/demoWrapper.css +8 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/dist/elementDemoStyles.css +813 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/package.json +134 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/packageScripts/postinstall.mjs +39 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_animation.scss +30 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_blockquote.scss +46 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_breakpoints.scss +155 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_core.scss +25 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_essentials.scss +267 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_focus-visible.scss +36 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_fonts.scss +50 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_grids.scss +395 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_headings.scss +255 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_normalize.scss +663 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_picture.scss +31 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/_utilityClasses.scss +22 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials+fv.scss +19 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/bundled/essentials.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleButton.scss +32 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_anchor-roleTab.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_containedButtons.scss +59 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_table.scss +54 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/componentSupport/_tablist.scss +37 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/README.md +5 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/demoWrapper.scss +18 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/elementDemoStyles/elementDemoStyles.scss +123 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_deprecated.scss +16 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/libSupport/_manageScope.scss +42 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_displayProperties.scss +142 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_fontStyles.scss +151 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_inset.scss +188 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_layoutProperties.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_listProperties.scss +176 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_responsive.scss +249 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityClasses/_typeProperties.scss +49 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_capitalize.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_contains.scss +26 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityFunctions/_map-deep-get.scss +29 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleButton.scss +76 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_anchor-roleTab.scss +86 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_insetUtility.scss +9 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_layoutPropertiesGenerator.scss +75 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityMixins/_spacingUtility.scss +96 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_important.scss +20 -0
- package/components/combobox/node_modules/@aurodesignsystem/webcorestylesheets/src/utilityVariables/_spacing-options.scss +13 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/README.md +293 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/cjs/index.js +1377 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/index.js +1370 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/dist/es/package.json +1 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/package.json +89 -0
- package/components/combobox/node_modules/@rollup/plugin-node-resolve/types/index.d.ts +115 -0
- package/components/combobox/node_modules/chalk/package.json +3 -3
- package/components/combobox/node_modules/chalk/readme.md +25 -53
- package/components/combobox/node_modules/chalk/source/index.d.ts +6 -1
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/browser.js +6 -2
- package/components/combobox/node_modules/chalk/source/vendor/supports-color/index.js +2 -2
- package/components/combobox/package.json +12 -13
- package/components/combobox/src/auro-combobox.js +215 -163
- package/components/combobox/src/dropdownVersion.js +1 -0
- package/components/combobox/src/inputVersion.js +1 -0
- package/components/counter/.turbo/turbo-build$colon$sass.log +210 -7
- package/components/{input → counter}/.turbo/turbo-build$colon$version.log +5 -5
- package/components/counter/.turbo/turbo-build.log +329 -14
- package/components/counter/.turbo/turbo-bundler.log +13 -4
- package/components/counter/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/counter/.turbo/turbo-sass$colon$render.log +45 -3
- package/components/counter/.turbo/turbo-types.log +1 -1
- package/components/counter/README.md +188 -0
- package/components/counter/demo/api.md +107 -1014
- package/components/counter/demo/api.min.js +5203 -36
- package/components/counter/demo/index.js +2 -1
- package/components/counter/demo/index.md +292 -0
- package/components/counter/demo/index.min.js +5231 -19
- package/components/counter/dist/auro-counter-button.d.ts +13 -0
- package/components/counter/dist/auro-counter-button.d.ts.map +1 -0
- package/components/counter/dist/auro-counter-group.d.ts +127 -5
- package/components/counter/dist/auro-counter-group.d.ts.map +1 -1
- package/components/counter/dist/auro-counter-wrapper.d.ts +23 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts.map +1 -0
- package/components/counter/dist/auro-counter.d.ts +91 -0
- package/components/counter/dist/auro-counter.d.ts.map +1 -1
- package/components/counter/dist/dropdownVersion.d.ts +3 -0
- package/components/counter/dist/dropdownVersion.d.ts.map +1 -0
- package/components/counter/dist/iconVersion.d.ts +3 -0
- package/components/counter/dist/iconVersion.d.ts.map +1 -0
- package/components/counter/dist/index.js +5203 -36
- package/components/{input/dist/styles/helpText-css.d.ts → counter/dist/styles/color-css.d.ts} +1 -1
- package/components/counter/dist/styles/color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-button-tokens-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts.map +1 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +3 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts.map +1 -0
- package/components/counter/dist/styles/tokens-css.d.ts +3 -0
- package/components/counter/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/counter/package.json +14 -5
- package/components/counter/src/auro-counter-button.js +42 -0
- package/components/counter/src/auro-counter-group.js +305 -20
- package/components/counter/src/auro-counter-wrapper.js +54 -0
- package/components/counter/src/auro-counter.js +325 -12
- package/components/counter/src/dropdownVersion.js +1 -0
- package/components/counter/src/iconVersion.js +1 -0
- package/components/counter/src/index.js +1 -1
- package/components/counter/src/styles/color-css.js +2 -0
- package/components/counter/src/styles/color.css +29 -0
- package/components/counter/src/styles/color.scss +49 -0
- package/components/counter/src/styles/counter-button-color-css.js +2 -0
- package/components/counter/src/styles/counter-button-color.css +11 -0
- package/components/counter/src/styles/counter-button-color.scss +23 -0
- package/components/counter/src/styles/counter-button-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens-css.js +2 -0
- package/components/counter/src/styles/counter-button-tokens.css +6 -0
- package/components/counter/src/styles/counter-button-tokens.scss +8 -0
- package/components/counter/src/styles/counter-button.css +186 -0
- package/components/counter/src/styles/counter-button.scss +84 -0
- package/components/counter/src/styles/counter-group-css.js +1 -1
- package/components/counter/src/styles/counter-group.css +15 -1
- package/components/counter/src/styles/counter-group.scss +16 -1
- package/components/counter/src/styles/counter-wrapper-color-css.js +2 -0
- package/components/counter/src/styles/counter-wrapper-color.css +4 -0
- package/components/counter/src/styles/counter-wrapper-color.scss +19 -0
- package/components/counter/src/styles/counter-wrapper-css.js +2 -0
- package/components/counter/src/styles/counter-wrapper.css +15 -0
- package/components/counter/src/styles/counter-wrapper.scss +29 -0
- package/components/counter/src/styles/style-css.js +1 -1
- package/components/counter/src/styles/style.css +50 -1
- package/components/counter/src/styles/style.scss +58 -2
- package/components/counter/src/styles/tokens-css.js +2 -0
- package/components/counter/src/styles/tokens.css +12 -0
- package/components/counter/src/styles/tokens.scss +25 -0
- package/components/datepicker/.turbo/turbo-build$colon$sass.log +34 -34
- package/components/datepicker/.turbo/turbo-build.log +52 -53
- package/components/datepicker/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/datepicker/.turbo/turbo-sass$colon$render.log +10 -10
- package/components/datepicker/README.md +23 -28
- package/components/datepicker/demo/api.md +85 -57
- package/components/datepicker/demo/api.min.js +1304 -558
- package/components/datepicker/demo/index.md +1 -1
- package/components/datepicker/demo/index.min.js +1304 -558
- package/components/datepicker/dist/auro-calendar.d.ts +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +101 -73
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +1304 -558
- package/components/datepicker/dist/inputVersion.d.ts +3 -0
- package/components/datepicker/dist/inputVersion.d.ts.map +1 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +2 -2
- package/components/datepicker/package.json +8 -8
- package/components/datepicker/src/auro-calendar.js +1 -1
- package/components/datepicker/src/auro-datepicker.js +170 -89
- package/components/datepicker/src/dropdownVersion.js +1 -0
- package/components/datepicker/src/inputVersion.js +1 -0
- package/components/datepicker/src/styles/color-cell-css.js +1 -1
- package/components/datepicker/src/styles/color-cell.css +1 -1
- package/components/datepicker/src/styles/color-cell.scss +1 -1
- package/components/datepicker/src/styles/style-css.js +1 -1
- package/components/datepicker/src/styles/style.css +55 -35
- package/components/datepicker/src/styles/style.scss +45 -13
- package/components/datepicker/src/utilitiesCalendarRender.js +2 -2
- package/components/dropdown/.turbo/turbo-build$colon$sass.log +8 -8
- package/components/dropdown/.turbo/turbo-build.log +19 -20
- package/components/dropdown/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/dropdown/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/dropdown/README.md +19 -27
- package/components/dropdown/demo/api.md +15 -3
- package/components/dropdown/demo/api.min.js +406 -88
- package/components/dropdown/demo/index.js +0 -3
- package/components/dropdown/demo/index.min.js +406 -91
- package/components/dropdown/dist/auro-dropdown.d.ts +16 -2
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +406 -88
- package/components/dropdown/package.json +6 -5
- package/components/dropdown/src/auro-dropdown.js +102 -11
- package/components/dropdown/src/styles/color-css.js +1 -1
- package/components/dropdown/src/styles/color.css +3 -6
- package/components/dropdown/src/styles/color.scss +3 -6
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +5 -6
- package/components/dropdown/src/styles/style.scss +8 -8
- package/components/dropdown/src/styles/tokens-css.js +1 -1
- package/components/dropdown/src/styles/tokens.css +1 -1
- package/components/dropdown/src/styles/tokens.scss +1 -1
- package/components/form/.turbo/turbo-build$colon$sass.log +6 -6
- package/components/form/.turbo/turbo-build$colon$version.log +1 -1
- package/components/form/.turbo/turbo-build.log +17 -18
- package/components/form/.turbo/turbo-bundler.log +4 -4
- package/components/form/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/form/.turbo/turbo-sass$colon$render.log +2 -2
- package/components/form/.turbo/turbo-types.log +1 -1
- package/components/form/README.md +29 -35
- package/components/form/demo/api.min.js +447 -25
- package/components/form/demo/index.min.js +447 -25
- package/components/form/demo/registerDemoDeps.js +22 -0
- package/components/form/demo/working.html +117 -0
- package/components/form/dist/auro-form.d.ts +178 -2
- package/components/form/dist/auro-form.d.ts.map +1 -1
- package/components/form/dist/index.js +447 -25
- package/components/form/package.json +8 -6
- package/components/form/src/auro-form.js +444 -25
- package/components/form/src/styles/style.css +1 -1
- package/components/helptext/.stylelintrc.json +3 -0
- package/components/helptext/.turbo/turbo-build$colon$sass.log +34 -0
- package/components/helptext/.turbo/turbo-build.log +49 -0
- package/components/helptext/.turbo/turbo-bundler.log +7 -0
- package/components/helptext/.turbo/turbo-postCss$colon$component.log +4 -0
- package/components/helptext/.turbo/turbo-sass$colon$render.log +22 -0
- package/components/helptext/.turbo/turbo-types.log +4 -0
- package/components/helptext/dist/auro-helptext.d.ts +54 -0
- package/components/helptext/dist/auro-helptext.d.ts.map +1 -0
- package/components/helptext/dist/index.d.ts +3 -0
- package/components/helptext/dist/index.d.ts.map +1 -0
- package/components/helptext/dist/index.js +224 -0
- package/components/helptext/dist/styles/color-css.d.ts +3 -0
- package/components/helptext/dist/styles/color-css.d.ts.map +1 -0
- package/components/helptext/dist/styles/style-css.d.ts +3 -0
- package/components/helptext/dist/styles/style-css.d.ts.map +1 -0
- package/components/helptext/dist/styles/tokens-css.d.ts +3 -0
- package/components/helptext/dist/styles/tokens-css.d.ts.map +1 -0
- package/components/helptext/node_modules/chalk/package.json +83 -0
- package/components/helptext/node_modules/chalk/readme.md +297 -0
- package/components/helptext/node_modules/chalk/source/index.d.ts +325 -0
- package/components/helptext/node_modules/chalk/source/index.js +225 -0
- package/components/helptext/node_modules/chalk/source/utilities.js +33 -0
- package/components/helptext/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/components/helptext/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/components/helptext/node_modules/chalk/source/vendor/supports-color/index.js +182 -0
- package/components/helptext/package.json +57 -0
- package/components/helptext/src/auro-helptext.js +127 -0
- package/components/helptext/src/index.js +6 -0
- package/components/helptext/src/styles/color-css.js +2 -0
- package/components/helptext/src/styles/color.css +8 -0
- package/components/helptext/src/styles/color.scss +11 -0
- package/components/helptext/src/styles/style-css.js +2 -0
- package/components/helptext/src/styles/style.css +23 -0
- package/components/helptext/src/styles/style.scss +33 -0
- package/components/helptext/src/styles/tokens-css.js +2 -0
- package/components/helptext/src/styles/tokens.css +3 -0
- package/components/helptext/src/styles/tokens.scss +5 -0
- package/components/input/.turbo/turbo-build$colon$sass.log +22 -32
- package/components/input/.turbo/turbo-build.log +33 -46
- package/components/input/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +9 -15
- package/components/input/README.md +19 -29
- package/components/input/demo/api.md +85 -253
- package/components/input/demo/api.min.js +413 -125
- package/components/input/demo/index.md +9 -59
- package/components/input/demo/index.min.js +413 -125
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +3 -3
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +413 -125
- package/components/input/package.json +6 -5
- package/components/input/src/auro-input.js +18 -10
- package/components/input/src/base-input.js +5 -5
- package/components/input/src/styles/color-css.js +1 -1
- package/components/input/src/styles/color.css +0 -5
- package/components/input/src/styles/color.scss +0 -5
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +2 -2
- package/components/input/src/styles/input.scss +2 -2
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +2 -9
- package/components/input/src/styles/style.scss +0 -1
- package/components/input/src/styles/tokens-css.js +1 -1
- package/components/input/src/styles/tokens.css +0 -1
- package/components/input/src/styles/tokens.scss +0 -1
- package/components/menu/.turbo/turbo-build$colon$sass.log +9 -9
- package/components/menu/.turbo/turbo-build$colon$version.log +1 -1
- package/components/menu/.turbo/turbo-build.log +22 -21
- package/components/menu/.turbo/turbo-bundler.log +4 -4
- package/components/menu/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/menu/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/menu/.turbo/turbo-types.log +1 -1
- package/components/menu/README.md +19 -27
- package/components/menu/demo/api.md +57 -20
- package/components/menu/demo/api.min.js +626 -312
- package/components/menu/demo/index.min.js +624 -310
- package/components/menu/dist/auro-menu-utils.d.ts +43 -0
- package/components/menu/dist/auro-menu-utils.d.ts.map +1 -0
- package/components/menu/dist/auro-menu.d.ts +97 -81
- package/components/menu/dist/auro-menu.d.ts.map +1 -1
- package/components/menu/dist/index.d.ts +1 -0
- package/components/menu/dist/index.js +625 -311
- package/components/menu/package.json +5 -5
- package/components/menu/src/auro-menu-utils.js +131 -0
- package/components/menu/src/auro-menu.js +492 -303
- package/components/menu/src/index.js +7 -0
- package/components/menu/src/styles/color-menuoption-css.js +1 -1
- package/components/menu/src/styles/color-menuoption.css +3 -0
- package/components/menu/src/styles/color-menuoption.scss +4 -0
- package/components/menu/src/styles/style-menu.css +1 -1
- package/components/radio/.turbo/turbo-build$colon$sass.log +13 -13
- package/components/radio/.turbo/turbo-build.log +23 -24
- package/components/radio/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/radio/.turbo/turbo-sass$colon$render.log +6 -6
- package/components/radio/README.md +19 -27
- package/components/radio/demo/api.md +9 -8
- package/components/radio/demo/api.min.js +360 -62
- package/components/radio/demo/index.min.js +360 -62
- package/components/radio/dist/auro-radio-group.d.ts +7 -1
- package/components/radio/dist/auro-radio-group.d.ts.map +1 -1
- package/components/radio/dist/index.js +360 -62
- package/components/radio/package.json +6 -6
- package/components/radio/src/auro-radio-group.js +24 -6
- package/components/radio/src/styles/groupColor-css.js +1 -1
- package/components/radio/src/styles/groupColor.css +0 -8
- package/components/radio/src/styles/groupColor.scss +0 -8
- package/components/radio/src/styles/tokens-css.js +1 -1
- package/components/radio/src/styles/tokens.css +0 -1
- package/components/radio/src/styles/tokens.scss +0 -1
- package/components/select/.turbo/turbo-build$colon$sass.log +12 -12
- package/components/select/.turbo/turbo-build.log +28 -27
- package/components/select/.turbo/turbo-postCss$colon$component.log +1 -2
- package/components/select/.turbo/turbo-sass$colon$render.log +4 -4
- package/components/select/README.md +22 -43
- package/components/select/demo/api.md +52 -15
- package/components/select/demo/api.min.js +2851 -609
- package/components/select/demo/index.md +1 -16
- package/components/select/demo/index.min.js +2849 -607
- package/components/select/dist/auro-select.d.ts +23 -6
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/dropdownVersion.d.ts +3 -0
- package/components/select/dist/dropdownVersion.d.ts.map +1 -0
- package/components/select/dist/index.js +2313 -385
- package/components/select/package.json +7 -7
- package/components/select/src/auro-select.js +77 -32
- package/components/select/src/dropdownVersion.js +1 -0
- package/components/select/src/styles/style-css.js +1 -1
- package/components/select/src/styles/style.css +5 -4
- package/components/select/src/styles/style.scss +11 -4
- package/package.json +27 -23
- package/packages/build-tools/src/docProcessor.mjs +37 -8
- package/packages/build-tools/src/postinstall.mjs +8 -0
- package/packages/form-validation/src/validation.js +79 -20
- package/packages/utils/package.json +12 -0
- package/packages/utils/src/iconUtil.js +25 -0
- package/packages/utils/src/index.js +1 -0
- package/turbo.json +42 -9
- package/.turbo/cache/013a48308b893dac-meta.json +0 -1
- package/.turbo/cache/013a48308b893dac.tar.zst +0 -0
- package/.turbo/cache/02244170c798a2bd-meta.json +0 -1
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/051ff97a20add0e2-meta.json +0 -1
- package/.turbo/cache/051ff97a20add0e2.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +0 -1
- package/.turbo/cache/07ca42419b9f050c.tar.zst +0 -0
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +0 -1
- package/.turbo/cache/0cea4c1f34f3683b.tar.zst +0 -0
- package/.turbo/cache/0ea853339c064fa1-meta.json +0 -1
- package/.turbo/cache/0ea853339c064fa1.tar.zst +0 -0
- package/.turbo/cache/16658beec9f4a809-meta.json +0 -1
- package/.turbo/cache/16658beec9f4a809.tar.zst +0 -0
- package/.turbo/cache/17259cf94d8f8925-meta.json +0 -1
- package/.turbo/cache/17259cf94d8f8925.tar.zst +0 -0
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +0 -1
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +0 -1
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +0 -1
- package/.turbo/cache/1c99a949ec63ab35.tar.zst +0 -0
- package/.turbo/cache/1df4710eef8ed00d-meta.json +0 -1
- package/.turbo/cache/1df4710eef8ed00d.tar.zst +0 -0
- package/.turbo/cache/204b66d1b253e9cc-meta.json +0 -1
- package/.turbo/cache/204b66d1b253e9cc.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +0 -1
- package/.turbo/cache/257a7a26ea72dbc5.tar.zst +0 -0
- package/.turbo/cache/2a5d0939d6fc1052-meta.json +0 -1
- package/.turbo/cache/2a5d0939d6fc1052.tar.zst +0 -0
- package/.turbo/cache/2e3b829fcf75c836-meta.json +0 -1
- package/.turbo/cache/2e3b829fcf75c836.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +0 -1
- package/.turbo/cache/3bf45120d0cc9bd8.tar.zst +0 -0
- package/.turbo/cache/3d380d0d40404cac-meta.json +0 -1
- package/.turbo/cache/3d380d0d40404cac.tar.zst +0 -0
- package/.turbo/cache/3e12285c614db539-meta.json +0 -1
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +0 -1
- package/.turbo/cache/45035bf5c4147ccd.tar.zst +0 -0
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +0 -1
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +0 -1
- package/.turbo/cache/5f304c0f37ef25f3.tar.zst +0 -0
- package/.turbo/cache/64de7a53e02db647-meta.json +0 -1
- package/.turbo/cache/64de7a53e02db647.tar.zst +0 -0
- package/.turbo/cache/691a74627ec57993-meta.json +0 -1
- package/.turbo/cache/691a74627ec57993.tar.zst +0 -0
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +0 -1
- package/.turbo/cache/69aae513b7ec6c7d.tar.zst +0 -0
- package/.turbo/cache/6dd67d179191bda8-meta.json +0 -1
- package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +0 -1
- package/.turbo/cache/6dd7058e6703cb35.tar.zst +0 -0
- package/.turbo/cache/73e9073a5274616d-meta.json +0 -1
- package/.turbo/cache/73e9073a5274616d.tar.zst +0 -0
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +0 -1
- package/.turbo/cache/773edc0f83c8c5a5.tar.zst +0 -0
- package/.turbo/cache/786a822763403879-meta.json +0 -1
- package/.turbo/cache/786a822763403879.tar.zst +0 -0
- package/.turbo/cache/7e1043cffa69f327-meta.json +0 -1
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/7ffd501e81790676-meta.json +0 -1
- package/.turbo/cache/7ffd501e81790676.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +0 -1
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +0 -1
- package/.turbo/cache/80b5d974184a01df.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +0 -1
- package/.turbo/cache/8954c6073396fadd.tar.zst +0 -0
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +0 -1
- package/.turbo/cache/8e79bd5c3a16a72e.tar.zst +0 -0
- package/.turbo/cache/8e9ebc3df0e18de0-meta.json +0 -1
- package/.turbo/cache/8e9ebc3df0e18de0.tar.zst +0 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +0 -1
- package/.turbo/cache/92daa6d7c389d548.tar.zst +0 -0
- package/.turbo/cache/973d0eea26083f4b-meta.json +0 -1
- package/.turbo/cache/973d0eea26083f4b.tar.zst +0 -0
- package/.turbo/cache/9c6ad42729c7b2d8-meta.json +0 -1
- package/.turbo/cache/9c6ad42729c7b2d8.tar.zst +0 -0
- package/.turbo/cache/a77bc920ea508bb8-meta.json +0 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/a9a9d012c83882d8-meta.json +0 -1
- package/.turbo/cache/a9a9d012c83882d8.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +0 -1
- package/.turbo/cache/b54fc4f664a7a5a0.tar.zst +0 -0
- package/.turbo/cache/ba4418918621fbcd-meta.json +0 -1
- package/.turbo/cache/ba4418918621fbcd.tar.zst +0 -0
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +0 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +0 -1
- package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +0 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +0 -1
- package/.turbo/cache/cc81de9c0b452a7c.tar.zst +0 -0
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +0 -1
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +0 -1
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +0 -1
- package/.turbo/cache/dad1301ac69bcb85.tar.zst +0 -0
- package/.turbo/cache/db361cb6578dca84-meta.json +0 -1
- package/.turbo/cache/db361cb6578dca84.tar.zst +0 -0
- package/.turbo/cache/dea5945f55c6aba5-meta.json +0 -1
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +0 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f3ff9040a2196834-meta.json +0 -1
- package/.turbo/cache/f3ff9040a2196834.tar.zst +0 -0
- package/.turbo/cache/f817d89688cefca8-meta.json +0 -1
- package/.turbo/cache/f817d89688cefca8.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +0 -1
- package/.turbo/cache/fa132b5b5f0e75f8.tar.zst +0 -0
- package/.turbo/cache/fc57c17867dcac3d-meta.json +0 -1
- package/.turbo/cache/fc57c17867dcac3d.tar.zst +0 -0
- package/components/checkbox/.turbo/turbo-bundler.log +0 -13
- package/components/checkbox/.turbo/turbo-types.log +0 -4
- package/components/dropdown/.turbo/turbo-build$colon$version.log +0 -7
- package/components/dropdown/.turbo/turbo-bundler.log +0 -13
- package/components/dropdown/.turbo/turbo-types.log +0 -4
- package/components/input/.turbo/turbo-bundler.log +0 -13
- package/components/input/.turbo/turbo-types.log +0 -4
- package/components/input/dist/styles/helpText-css.d.ts.map +0 -1
- package/components/input/src/styles/helpText-css.js +0 -2
- package/components/input/src/styles/helpText.css +0 -6
- package/components/input/src/styles/helpText.scss +0 -9
- package/components/radio/.turbo/turbo-bundler.log +0 -13
- package/components/radio/.turbo/turbo-types.log +0 -4
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import ansiStyles from '#ansi-styles';
|
|
2
|
+
import supportsColor from '#supports-color';
|
|
3
|
+
import { // eslint-disable-line import/order
|
|
4
|
+
stringReplaceAll,
|
|
5
|
+
stringEncaseCRLFWithFirstIndex,
|
|
6
|
+
} from './utilities.js';
|
|
7
|
+
|
|
8
|
+
const {stdout: stdoutColor, stderr: stderrColor} = supportsColor;
|
|
9
|
+
|
|
10
|
+
const GENERATOR = Symbol('GENERATOR');
|
|
11
|
+
const STYLER = Symbol('STYLER');
|
|
12
|
+
const IS_EMPTY = Symbol('IS_EMPTY');
|
|
13
|
+
|
|
14
|
+
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
|
15
|
+
const levelMapping = [
|
|
16
|
+
'ansi',
|
|
17
|
+
'ansi',
|
|
18
|
+
'ansi256',
|
|
19
|
+
'ansi16m',
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const styles = Object.create(null);
|
|
23
|
+
|
|
24
|
+
const applyOptions = (object, options = {}) => {
|
|
25
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
26
|
+
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Detect level if not set manually
|
|
30
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
31
|
+
object.level = options.level === undefined ? colorLevel : options.level;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export class Chalk {
|
|
35
|
+
constructor(options) {
|
|
36
|
+
// eslint-disable-next-line no-constructor-return
|
|
37
|
+
return chalkFactory(options);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const chalkFactory = options => {
|
|
42
|
+
const chalk = (...strings) => strings.join(' ');
|
|
43
|
+
applyOptions(chalk, options);
|
|
44
|
+
|
|
45
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
46
|
+
|
|
47
|
+
return chalk;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
function createChalk(options) {
|
|
51
|
+
return chalkFactory(options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
55
|
+
|
|
56
|
+
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
57
|
+
styles[styleName] = {
|
|
58
|
+
get() {
|
|
59
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
60
|
+
Object.defineProperty(this, styleName, {value: builder});
|
|
61
|
+
return builder;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
styles.visible = {
|
|
67
|
+
get() {
|
|
68
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
69
|
+
Object.defineProperty(this, 'visible', {value: builder});
|
|
70
|
+
return builder;
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
75
|
+
if (model === 'rgb') {
|
|
76
|
+
if (level === 'ansi16m') {
|
|
77
|
+
return ansiStyles[type].ansi16m(...arguments_);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (level === 'ansi256') {
|
|
81
|
+
return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (model === 'hex') {
|
|
88
|
+
return getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return ansiStyles[type][model](...arguments_);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const usedModels = ['rgb', 'hex', 'ansi256'];
|
|
95
|
+
|
|
96
|
+
for (const model of usedModels) {
|
|
97
|
+
styles[model] = {
|
|
98
|
+
get() {
|
|
99
|
+
const {level} = this;
|
|
100
|
+
return function (...arguments_) {
|
|
101
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);
|
|
102
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
|
|
108
|
+
styles[bgModel] = {
|
|
109
|
+
get() {
|
|
110
|
+
const {level} = this;
|
|
111
|
+
return function (...arguments_) {
|
|
112
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
|
|
113
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const proto = Object.defineProperties(() => {}, {
|
|
120
|
+
...styles,
|
|
121
|
+
level: {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get() {
|
|
124
|
+
return this[GENERATOR].level;
|
|
125
|
+
},
|
|
126
|
+
set(level) {
|
|
127
|
+
this[GENERATOR].level = level;
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
const createStyler = (open, close, parent) => {
|
|
133
|
+
let openAll;
|
|
134
|
+
let closeAll;
|
|
135
|
+
if (parent === undefined) {
|
|
136
|
+
openAll = open;
|
|
137
|
+
closeAll = close;
|
|
138
|
+
} else {
|
|
139
|
+
openAll = parent.openAll + open;
|
|
140
|
+
closeAll = close + parent.closeAll;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
open,
|
|
145
|
+
close,
|
|
146
|
+
openAll,
|
|
147
|
+
closeAll,
|
|
148
|
+
parent,
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const createBuilder = (self, _styler, _isEmpty) => {
|
|
153
|
+
// Single argument is hot path, implicit coercion is faster than anything
|
|
154
|
+
// eslint-disable-next-line no-implicit-coercion
|
|
155
|
+
const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
|
|
156
|
+
|
|
157
|
+
// We alter the prototype because we must return a function, but there is
|
|
158
|
+
// no way to create a function with a different prototype
|
|
159
|
+
Object.setPrototypeOf(builder, proto);
|
|
160
|
+
|
|
161
|
+
builder[GENERATOR] = self;
|
|
162
|
+
builder[STYLER] = _styler;
|
|
163
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
164
|
+
|
|
165
|
+
return builder;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const applyStyle = (self, string) => {
|
|
169
|
+
if (self.level <= 0 || !string) {
|
|
170
|
+
return self[IS_EMPTY] ? '' : string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
let styler = self[STYLER];
|
|
174
|
+
|
|
175
|
+
if (styler === undefined) {
|
|
176
|
+
return string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const {openAll, closeAll} = styler;
|
|
180
|
+
if (string.includes('\u001B')) {
|
|
181
|
+
while (styler !== undefined) {
|
|
182
|
+
// Replace any instances already present with a re-opening code
|
|
183
|
+
// otherwise only the part of the string until said closing code
|
|
184
|
+
// will be colored, and the rest will simply be 'plain'.
|
|
185
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
186
|
+
|
|
187
|
+
styler = styler.parent;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// We can move both next actions out of loop, because remaining actions in loop won't have
|
|
192
|
+
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
|
193
|
+
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
|
194
|
+
const lfIndex = string.indexOf('\n');
|
|
195
|
+
if (lfIndex !== -1) {
|
|
196
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return openAll + string + closeAll;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
Object.defineProperties(createChalk.prototype, styles);
|
|
203
|
+
|
|
204
|
+
const chalk = createChalk();
|
|
205
|
+
export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});
|
|
206
|
+
|
|
207
|
+
export {
|
|
208
|
+
modifierNames,
|
|
209
|
+
foregroundColorNames,
|
|
210
|
+
backgroundColorNames,
|
|
211
|
+
colorNames,
|
|
212
|
+
|
|
213
|
+
// TODO: Remove these aliases in the next major version
|
|
214
|
+
modifierNames as modifiers,
|
|
215
|
+
foregroundColorNames as foregroundColors,
|
|
216
|
+
backgroundColorNames as backgroundColors,
|
|
217
|
+
colorNames as colors,
|
|
218
|
+
} from './vendor/ansi-styles/index.js';
|
|
219
|
+
|
|
220
|
+
export {
|
|
221
|
+
stdoutColor as supportsColor,
|
|
222
|
+
stderrColor as supportsColorStderr,
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export default chalk;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
|
|
2
|
+
export function stringReplaceAll(string, substring, replacer) {
|
|
3
|
+
let index = string.indexOf(substring);
|
|
4
|
+
if (index === -1) {
|
|
5
|
+
return string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const substringLength = substring.length;
|
|
9
|
+
let endIndex = 0;
|
|
10
|
+
let returnValue = '';
|
|
11
|
+
do {
|
|
12
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
13
|
+
endIndex = index + substringLength;
|
|
14
|
+
index = string.indexOf(substring, endIndex);
|
|
15
|
+
} while (index !== -1);
|
|
16
|
+
|
|
17
|
+
returnValue += string.slice(endIndex);
|
|
18
|
+
return returnValue;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
22
|
+
let endIndex = 0;
|
|
23
|
+
let returnValue = '';
|
|
24
|
+
do {
|
|
25
|
+
const gotCR = string[index - 1] === '\r';
|
|
26
|
+
returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
|
27
|
+
endIndex = index + 1;
|
|
28
|
+
index = string.indexOf('\n', endIndex);
|
|
29
|
+
} while (index !== -1);
|
|
30
|
+
|
|
31
|
+
returnValue += string.slice(endIndex);
|
|
32
|
+
return returnValue;
|
|
33
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention
|
|
2
|
+
/**
|
|
3
|
+
The ANSI terminal control sequence for starting this style.
|
|
4
|
+
*/
|
|
5
|
+
readonly open: string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
The ANSI terminal control sequence for ending this style.
|
|
9
|
+
*/
|
|
10
|
+
readonly close: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ColorBase {
|
|
14
|
+
/**
|
|
15
|
+
The ANSI terminal control sequence for ending this color.
|
|
16
|
+
*/
|
|
17
|
+
readonly close: string;
|
|
18
|
+
|
|
19
|
+
ansi(code: number): string;
|
|
20
|
+
|
|
21
|
+
ansi256(code: number): string;
|
|
22
|
+
|
|
23
|
+
ansi16m(red: number, green: number, blue: number): string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Modifier {
|
|
27
|
+
/**
|
|
28
|
+
Resets the current color chain.
|
|
29
|
+
*/
|
|
30
|
+
readonly reset: CSPair;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
Make text bold.
|
|
34
|
+
*/
|
|
35
|
+
readonly bold: CSPair;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
Emitting only a small amount of light.
|
|
39
|
+
*/
|
|
40
|
+
readonly dim: CSPair;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
Make text italic. (Not widely supported)
|
|
44
|
+
*/
|
|
45
|
+
readonly italic: CSPair;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
Make text underline. (Not widely supported)
|
|
49
|
+
*/
|
|
50
|
+
readonly underline: CSPair;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
Make text overline.
|
|
54
|
+
|
|
55
|
+
Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
|
|
56
|
+
*/
|
|
57
|
+
readonly overline: CSPair;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
Inverse background and foreground colors.
|
|
61
|
+
*/
|
|
62
|
+
readonly inverse: CSPair;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
Prints the text, but makes it invisible.
|
|
66
|
+
*/
|
|
67
|
+
readonly hidden: CSPair;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
Puts a horizontal line through the center of the text. (Not widely supported)
|
|
71
|
+
*/
|
|
72
|
+
readonly strikethrough: CSPair;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ForegroundColor {
|
|
76
|
+
readonly black: CSPair;
|
|
77
|
+
readonly red: CSPair;
|
|
78
|
+
readonly green: CSPair;
|
|
79
|
+
readonly yellow: CSPair;
|
|
80
|
+
readonly blue: CSPair;
|
|
81
|
+
readonly cyan: CSPair;
|
|
82
|
+
readonly magenta: CSPair;
|
|
83
|
+
readonly white: CSPair;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
Alias for `blackBright`.
|
|
87
|
+
*/
|
|
88
|
+
readonly gray: CSPair;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
Alias for `blackBright`.
|
|
92
|
+
*/
|
|
93
|
+
readonly grey: CSPair;
|
|
94
|
+
|
|
95
|
+
readonly blackBright: CSPair;
|
|
96
|
+
readonly redBright: CSPair;
|
|
97
|
+
readonly greenBright: CSPair;
|
|
98
|
+
readonly yellowBright: CSPair;
|
|
99
|
+
readonly blueBright: CSPair;
|
|
100
|
+
readonly cyanBright: CSPair;
|
|
101
|
+
readonly magentaBright: CSPair;
|
|
102
|
+
readonly whiteBright: CSPair;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface BackgroundColor {
|
|
106
|
+
readonly bgBlack: CSPair;
|
|
107
|
+
readonly bgRed: CSPair;
|
|
108
|
+
readonly bgGreen: CSPair;
|
|
109
|
+
readonly bgYellow: CSPair;
|
|
110
|
+
readonly bgBlue: CSPair;
|
|
111
|
+
readonly bgCyan: CSPair;
|
|
112
|
+
readonly bgMagenta: CSPair;
|
|
113
|
+
readonly bgWhite: CSPair;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
Alias for `bgBlackBright`.
|
|
117
|
+
*/
|
|
118
|
+
readonly bgGray: CSPair;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
Alias for `bgBlackBright`.
|
|
122
|
+
*/
|
|
123
|
+
readonly bgGrey: CSPair;
|
|
124
|
+
|
|
125
|
+
readonly bgBlackBright: CSPair;
|
|
126
|
+
readonly bgRedBright: CSPair;
|
|
127
|
+
readonly bgGreenBright: CSPair;
|
|
128
|
+
readonly bgYellowBright: CSPair;
|
|
129
|
+
readonly bgBlueBright: CSPair;
|
|
130
|
+
readonly bgCyanBright: CSPair;
|
|
131
|
+
readonly bgMagentaBright: CSPair;
|
|
132
|
+
readonly bgWhiteBright: CSPair;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface ConvertColor {
|
|
136
|
+
/**
|
|
137
|
+
Convert from the RGB color space to the ANSI 256 color space.
|
|
138
|
+
|
|
139
|
+
@param red - (`0...255`)
|
|
140
|
+
@param green - (`0...255`)
|
|
141
|
+
@param blue - (`0...255`)
|
|
142
|
+
*/
|
|
143
|
+
rgbToAnsi256(red: number, green: number, blue: number): number;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
Convert from the RGB HEX color space to the RGB color space.
|
|
147
|
+
|
|
148
|
+
@param hex - A hexadecimal string containing RGB data.
|
|
149
|
+
*/
|
|
150
|
+
hexToRgb(hex: string): [red: number, green: number, blue: number];
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
Convert from the RGB HEX color space to the ANSI 256 color space.
|
|
154
|
+
|
|
155
|
+
@param hex - A hexadecimal string containing RGB data.
|
|
156
|
+
*/
|
|
157
|
+
hexToAnsi256(hex: string): number;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
Convert from the ANSI 256 color space to the ANSI 16 color space.
|
|
161
|
+
|
|
162
|
+
@param code - A number representing the ANSI 256 color.
|
|
163
|
+
*/
|
|
164
|
+
ansi256ToAnsi(code: number): number;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
Convert from the RGB color space to the ANSI 16 color space.
|
|
168
|
+
|
|
169
|
+
@param red - (`0...255`)
|
|
170
|
+
@param green - (`0...255`)
|
|
171
|
+
@param blue - (`0...255`)
|
|
172
|
+
*/
|
|
173
|
+
rgbToAnsi(red: number, green: number, blue: number): number;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
Convert from the RGB HEX color space to the ANSI 16 color space.
|
|
177
|
+
|
|
178
|
+
@param hex - A hexadecimal string containing RGB data.
|
|
179
|
+
*/
|
|
180
|
+
hexToAnsi(hex: string): number;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
Basic modifier names.
|
|
185
|
+
*/
|
|
186
|
+
export type ModifierName = keyof Modifier;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
Basic foreground color names.
|
|
190
|
+
|
|
191
|
+
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
192
|
+
*/
|
|
193
|
+
export type ForegroundColorName = keyof ForegroundColor;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
Basic background color names.
|
|
197
|
+
|
|
198
|
+
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
199
|
+
*/
|
|
200
|
+
export type BackgroundColorName = keyof BackgroundColor;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
Basic color names. The combination of foreground and background color names.
|
|
204
|
+
|
|
205
|
+
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
|
|
206
|
+
*/
|
|
207
|
+
export type ColorName = ForegroundColorName | BackgroundColorName;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
Basic modifier names.
|
|
211
|
+
*/
|
|
212
|
+
export const modifierNames: readonly ModifierName[];
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
Basic foreground color names.
|
|
216
|
+
*/
|
|
217
|
+
export const foregroundColorNames: readonly ForegroundColorName[];
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
Basic background color names.
|
|
221
|
+
*/
|
|
222
|
+
export const backgroundColorNames: readonly BackgroundColorName[];
|
|
223
|
+
|
|
224
|
+
/*
|
|
225
|
+
Basic color names. The combination of foreground and background color names.
|
|
226
|
+
*/
|
|
227
|
+
export const colorNames: readonly ColorName[];
|
|
228
|
+
|
|
229
|
+
declare const ansiStyles: {
|
|
230
|
+
readonly modifier: Modifier;
|
|
231
|
+
readonly color: ColorBase & ForegroundColor;
|
|
232
|
+
readonly bgColor: ColorBase & BackgroundColor;
|
|
233
|
+
readonly codes: ReadonlyMap<number, number>;
|
|
234
|
+
} & ForegroundColor & BackgroundColor & Modifier & ConvertColor;
|
|
235
|
+
|
|
236
|
+
export default ansiStyles;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
2
|
+
|
|
3
|
+
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
|
4
|
+
|
|
5
|
+
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
|
6
|
+
|
|
7
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
8
|
+
|
|
9
|
+
const styles = {
|
|
10
|
+
modifier: {
|
|
11
|
+
reset: [0, 0],
|
|
12
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
13
|
+
bold: [1, 22],
|
|
14
|
+
dim: [2, 22],
|
|
15
|
+
italic: [3, 23],
|
|
16
|
+
underline: [4, 24],
|
|
17
|
+
overline: [53, 55],
|
|
18
|
+
inverse: [7, 27],
|
|
19
|
+
hidden: [8, 28],
|
|
20
|
+
strikethrough: [9, 29],
|
|
21
|
+
},
|
|
22
|
+
color: {
|
|
23
|
+
black: [30, 39],
|
|
24
|
+
red: [31, 39],
|
|
25
|
+
green: [32, 39],
|
|
26
|
+
yellow: [33, 39],
|
|
27
|
+
blue: [34, 39],
|
|
28
|
+
magenta: [35, 39],
|
|
29
|
+
cyan: [36, 39],
|
|
30
|
+
white: [37, 39],
|
|
31
|
+
|
|
32
|
+
// Bright color
|
|
33
|
+
blackBright: [90, 39],
|
|
34
|
+
gray: [90, 39], // Alias of `blackBright`
|
|
35
|
+
grey: [90, 39], // Alias of `blackBright`
|
|
36
|
+
redBright: [91, 39],
|
|
37
|
+
greenBright: [92, 39],
|
|
38
|
+
yellowBright: [93, 39],
|
|
39
|
+
blueBright: [94, 39],
|
|
40
|
+
magentaBright: [95, 39],
|
|
41
|
+
cyanBright: [96, 39],
|
|
42
|
+
whiteBright: [97, 39],
|
|
43
|
+
},
|
|
44
|
+
bgColor: {
|
|
45
|
+
bgBlack: [40, 49],
|
|
46
|
+
bgRed: [41, 49],
|
|
47
|
+
bgGreen: [42, 49],
|
|
48
|
+
bgYellow: [43, 49],
|
|
49
|
+
bgBlue: [44, 49],
|
|
50
|
+
bgMagenta: [45, 49],
|
|
51
|
+
bgCyan: [46, 49],
|
|
52
|
+
bgWhite: [47, 49],
|
|
53
|
+
|
|
54
|
+
// Bright color
|
|
55
|
+
bgBlackBright: [100, 49],
|
|
56
|
+
bgGray: [100, 49], // Alias of `bgBlackBright`
|
|
57
|
+
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
|
58
|
+
bgRedBright: [101, 49],
|
|
59
|
+
bgGreenBright: [102, 49],
|
|
60
|
+
bgYellowBright: [103, 49],
|
|
61
|
+
bgBlueBright: [104, 49],
|
|
62
|
+
bgMagentaBright: [105, 49],
|
|
63
|
+
bgCyanBright: [106, 49],
|
|
64
|
+
bgWhiteBright: [107, 49],
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const modifierNames = Object.keys(styles.modifier);
|
|
69
|
+
export const foregroundColorNames = Object.keys(styles.color);
|
|
70
|
+
export const backgroundColorNames = Object.keys(styles.bgColor);
|
|
71
|
+
export const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
72
|
+
|
|
73
|
+
function assembleStyles() {
|
|
74
|
+
const codes = new Map();
|
|
75
|
+
|
|
76
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
77
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
78
|
+
styles[styleName] = {
|
|
79
|
+
open: `\u001B[${style[0]}m`,
|
|
80
|
+
close: `\u001B[${style[1]}m`,
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
group[styleName] = styles[styleName];
|
|
84
|
+
|
|
85
|
+
codes.set(style[0], style[1]);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
Object.defineProperty(styles, groupName, {
|
|
89
|
+
value: group,
|
|
90
|
+
enumerable: false,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
Object.defineProperty(styles, 'codes', {
|
|
95
|
+
value: codes,
|
|
96
|
+
enumerable: false,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
styles.color.close = '\u001B[39m';
|
|
100
|
+
styles.bgColor.close = '\u001B[49m';
|
|
101
|
+
|
|
102
|
+
styles.color.ansi = wrapAnsi16();
|
|
103
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
104
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
105
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
106
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
107
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
108
|
+
|
|
109
|
+
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
110
|
+
Object.defineProperties(styles, {
|
|
111
|
+
rgbToAnsi256: {
|
|
112
|
+
value(red, green, blue) {
|
|
113
|
+
// We use the extended greyscale palette here, with the exception of
|
|
114
|
+
// black and white. normal palette only has 4 greyscale shades.
|
|
115
|
+
if (red === green && green === blue) {
|
|
116
|
+
if (red < 8) {
|
|
117
|
+
return 16;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (red > 248) {
|
|
121
|
+
return 231;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return Math.round(((red - 8) / 247) * 24) + 232;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return 16
|
|
128
|
+
+ (36 * Math.round(red / 255 * 5))
|
|
129
|
+
+ (6 * Math.round(green / 255 * 5))
|
|
130
|
+
+ Math.round(blue / 255 * 5);
|
|
131
|
+
},
|
|
132
|
+
enumerable: false,
|
|
133
|
+
},
|
|
134
|
+
hexToRgb: {
|
|
135
|
+
value(hex) {
|
|
136
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
137
|
+
if (!matches) {
|
|
138
|
+
return [0, 0, 0];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
let [colorString] = matches;
|
|
142
|
+
|
|
143
|
+
if (colorString.length === 3) {
|
|
144
|
+
colorString = [...colorString].map(character => character + character).join('');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const integer = Number.parseInt(colorString, 16);
|
|
148
|
+
|
|
149
|
+
return [
|
|
150
|
+
/* eslint-disable no-bitwise */
|
|
151
|
+
(integer >> 16) & 0xFF,
|
|
152
|
+
(integer >> 8) & 0xFF,
|
|
153
|
+
integer & 0xFF,
|
|
154
|
+
/* eslint-enable no-bitwise */
|
|
155
|
+
];
|
|
156
|
+
},
|
|
157
|
+
enumerable: false,
|
|
158
|
+
},
|
|
159
|
+
hexToAnsi256: {
|
|
160
|
+
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
161
|
+
enumerable: false,
|
|
162
|
+
},
|
|
163
|
+
ansi256ToAnsi: {
|
|
164
|
+
value(code) {
|
|
165
|
+
if (code < 8) {
|
|
166
|
+
return 30 + code;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (code < 16) {
|
|
170
|
+
return 90 + (code - 8);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
let red;
|
|
174
|
+
let green;
|
|
175
|
+
let blue;
|
|
176
|
+
|
|
177
|
+
if (code >= 232) {
|
|
178
|
+
red = (((code - 232) * 10) + 8) / 255;
|
|
179
|
+
green = red;
|
|
180
|
+
blue = red;
|
|
181
|
+
} else {
|
|
182
|
+
code -= 16;
|
|
183
|
+
|
|
184
|
+
const remainder = code % 36;
|
|
185
|
+
|
|
186
|
+
red = Math.floor(code / 36) / 5;
|
|
187
|
+
green = Math.floor(remainder / 6) / 5;
|
|
188
|
+
blue = (remainder % 6) / 5;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const value = Math.max(red, green, blue) * 2;
|
|
192
|
+
|
|
193
|
+
if (value === 0) {
|
|
194
|
+
return 30;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// eslint-disable-next-line no-bitwise
|
|
198
|
+
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
|
199
|
+
|
|
200
|
+
if (value === 2) {
|
|
201
|
+
result += 60;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return result;
|
|
205
|
+
},
|
|
206
|
+
enumerable: false,
|
|
207
|
+
},
|
|
208
|
+
rgbToAnsi: {
|
|
209
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
210
|
+
enumerable: false,
|
|
211
|
+
},
|
|
212
|
+
hexToAnsi: {
|
|
213
|
+
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
214
|
+
enumerable: false,
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
return styles;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const ansiStyles = assembleStyles();
|
|
222
|
+
|
|
223
|
+
export default ansiStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {default} from './index.js';
|