@webority/theme 0.139.4 → 0.140.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/purge-safelist.json +4 -0
- package/dist/runtime.mjs +2 -1
- package/dist/webority-theme.css +1 -1
- package/package.json +3 -2
- package/scss/_bootstrap.generated.scss +1 -1
- package/scss/_tokens.generated.scss +1 -1
- package/scss/wui/_command-palette.scss +15 -0
- package/scss/wui/_sections.scss +91 -0
- package/scss/wui/_shell.scss +3 -1
package/dist/purge-safelist.json
CHANGED
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"avatar-xs",
|
|
101
101
|
"badge",
|
|
102
102
|
"badge-dot",
|
|
103
|
+
"bg-light",
|
|
103
104
|
"bg-primary",
|
|
104
105
|
"blockquote",
|
|
105
106
|
"border",
|
|
@@ -849,6 +850,7 @@
|
|
|
849
850
|
"wui-cmd-search",
|
|
850
851
|
"wui-cmd-search-icon",
|
|
851
852
|
"wui-cmd-spinner",
|
|
853
|
+
"wui-cmd-tabs",
|
|
852
854
|
"wui-cmd-trail",
|
|
853
855
|
"wui-code-bar",
|
|
854
856
|
"wui-code-block",
|
|
@@ -1405,9 +1407,11 @@
|
|
|
1405
1407
|
"wui-search-toggle",
|
|
1406
1408
|
"wui-section",
|
|
1407
1409
|
"wui-section-actions",
|
|
1410
|
+
"wui-section-call-to-action--band",
|
|
1408
1411
|
"wui-section-center",
|
|
1409
1412
|
"wui-section-eyebrow",
|
|
1410
1413
|
"wui-section-eyebrow-pill",
|
|
1414
|
+
"wui-section-faq--split",
|
|
1411
1415
|
"wui-section-faq-body",
|
|
1412
1416
|
"wui-section-feature",
|
|
1413
1417
|
"wui-section-feature-body",
|
package/dist/runtime.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var e=
|
|
1
|
+
var e={palette:`--wui-`,color:`--color-`,effect:`--wui-`,space:`--wui-space-`,radius:`--wui-radius-`,text:`--wui-fs-`,weight:`--wui-fw-`,leading:`--wui-lh-`,"letter-spacing":`--wui-letter-spacing-`,font:`--wui-font-`,shadow:`--wui-shadow-`,motion:`--wui-`,section:`--wui-section-`,size:`--wui-`,z:`--wui-z-`,component:`--wui-`};function t(t,n){let r=e[t];if(r===void 0)throw Error(`webority-tokens: ${t} is not a token group; add it to PREFIX in names.js.`);return`${r}${n}`}var n=`webority-theme-tokens/2`,r=`wui-product-theme`,i=/^--[A-Za-z0-9_-]+$/,a=/[;{}<>\\]|url\s*\(|@import|expression\s*\(/i,o=500;function s(e,t){let n=Object.entries(t).map(([e,t])=>`${e}: ${t};`).join(``);return n?`${e}{${n}}`:``}function c(e,t){if(typeof e!=`object`||Array.isArray(e))throw Error(`its "${t}" section is not a list of values`);for(let[t,n]of Object.entries(e)){if(!i.test(t))throw Error(`"${t}" is not a CSS custom property`);if(typeof n!=`string`||n.length>o||a.test(n))throw Error(`the value of ${t} is not allowed`)}return e}function l(e,t){if(typeof e!=`string`||!/^#[0-9a-fA-F]{6}$/.test(e))throw Error(`the ${t} colour is not a 6-digit hex value`);return[1,3,5].map(t=>parseInt(e.slice(t,t+2),16)).join(`, `)}function u(e,t){let n=e[t]??{};if(typeof n!=`object`||Array.isArray(n))throw Error(`its "${t}" section is not a list of values`);return Object.entries(n)}function d(e,n){let r={};for(let[i,a]of u(e.colors??{},n))r[t(`color`,i)]=a;if(n!==`light`)return r;for(let[n,i]of u(e,`space`))r[t(`space`,n)]=`${i}px`;for(let[n,i]of Object.entries(e.radius??{}))r[t(`radius`,n)]=`${i}px`;for(let[n,i]of Object.entries(e.text??{}))r[t(`text`,n)]=`${i.size}px`;for(let[n,i]of Object.entries(e.fonts??{}))r[t(`font`,n)]=`${i.family.includes(` `)?`"${i.family}"`:i.family}, ${i.fallback}`;for(let[n,i]of Object.entries(e.shadow??{}))r[t(`shadow`,n)]=i;return r}function f(e,t){let n=e.colors?.[t]?.primary,r=e.colors?.[t]?.link;if(!n)throw Error(`it has no primary colour`);if(!r)throw Error(`it has no link colour`);return{"--bs-primary":n,"--bs-primary-rgb":l(n,`primary`),"--bs-link-color-rgb":l(r,`link`)}}function p(e){if(!e||e.format!==n)throw Error(`it is not a ${n} file`);let t=c({...d(e,`light`),...f(e,`light`)},`light`),r=c(d(e,`dark`),`dark`),i=c(f(e,`dark`),`dark`);return[s(`:root`,t),s(`:root[data-theme="dark"],:root[data-bs-theme="dark"]`,r),s(`[data-bs-theme="dark"]`,i)].join(`
|
|
2
|
+
`)}function m(e){let t=p(e),n=document.getElementById(r);return n||(n=document.createElement(`style`),n.id=r,document.head.appendChild(n)),n.textContent=t,document.documentElement.setAttribute(`data-product-theme`,e.source?.brand??`file`),e.source?.brand??`file`}var h=Object.freeze({hover:`wui-force-hover`,focus:`wui-force-focus`,active:`wui-force-active`});export{h as FORCED_STATE_CLASSES,m as applyProductTheme,p as productThemeCss};
|