@handijitcom/ui 1.1.1 → 2.0.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/README.md +76 -23
- package/build/calendar.css +1 -1
- package/build/charts.css +1 -1
- package/build/chat.css +1 -1
- package/build/components/Avatar/index.cjs.map +1 -1
- package/build/components/Avatar/index.d.cts +3 -2
- package/build/components/Avatar/index.d.ts +3 -2
- package/build/components/Avatar/index.js.map +1 -1
- package/build/components/Avatar/style.css +1 -1
- package/build/components/Badge/index.cjs +1 -1
- package/build/components/Badge/index.cjs.map +1 -1
- package/build/components/Badge/index.d.cts +2 -4
- package/build/components/Badge/index.d.ts +2 -4
- package/build/components/Badge/index.js +1 -1
- package/build/components/Badge/index.js.map +1 -1
- package/build/components/Badge/style.css +1 -1
- package/build/components/Band/index.cjs +2 -0
- package/build/components/Band/index.cjs.map +1 -0
- package/build/components/Band/index.d.cts +45 -0
- package/build/components/Band/index.d.ts +45 -0
- package/build/components/Band/index.js +127 -0
- package/build/components/Band/index.js.map +1 -0
- package/build/components/Band/style.css +1 -0
- package/build/components/BottomSheet/style.css +1 -1
- package/build/components/Breadcrumb/style.css +1 -1
- package/build/components/Button/style.css +1 -1
- package/build/components/Carousel/style.css +1 -1
- package/build/components/Checkbox/style.css +1 -1
- package/build/components/Chip/style.css +1 -1
- package/build/components/Combobox/style.css +1 -1
- package/build/components/CommandPalette/style.css +1 -1
- package/build/components/CopyField/style.css +1 -1
- package/build/components/DataTable/style.css +1 -1
- package/build/components/DateField/style.css +1 -1
- package/build/components/Directory/style.css +1 -1
- package/build/components/Disclosure/style.css +1 -1
- package/build/components/Drawer/style.css +1 -1
- package/build/components/Eyebrow/index.cjs +2 -0
- package/build/components/Eyebrow/index.cjs.map +1 -0
- package/build/components/Eyebrow/index.d.cts +19 -0
- package/build/components/Eyebrow/index.d.ts +19 -0
- package/build/components/Eyebrow/index.js +9 -0
- package/build/components/Eyebrow/index.js.map +1 -0
- package/build/components/Eyebrow/style.css +1 -0
- package/build/components/FileUpload/style.css +1 -1
- package/build/components/IconButton/style.css +1 -1
- package/build/components/Input/style.css +1 -1
- package/build/components/Menu/style.css +1 -1
- package/build/components/Modal/style.css +1 -1
- package/build/components/Pagination/style.css +1 -1
- package/build/components/QuantityStepper/style.css +1 -1
- package/build/components/Radio/style.css +1 -1
- package/build/components/RadioCard/style.css +1 -1
- package/build/components/RatingInput/style.css +1 -1
- package/build/components/ScrollArea/style.css +1 -1
- package/build/components/SegmentedControl/style.css +1 -1
- package/build/components/Select/style.css +1 -1
- package/build/components/StatStrip/index.cjs +2 -0
- package/build/components/StatStrip/index.cjs.map +1 -0
- package/build/components/StatStrip/index.d.cts +25 -0
- package/build/components/StatStrip/index.d.ts +25 -0
- package/build/components/StatStrip/index.js +37 -0
- package/build/components/StatStrip/index.js.map +1 -0
- package/build/components/StatStrip/style.css +1 -0
- package/build/components/Steps/style.css +1 -1
- package/build/components/SummaryCard/style.css +1 -1
- package/build/components/Switch/style.css +1 -1
- package/build/components/TableCheckbox/style.css +1 -1
- package/build/components/Tabs/style.css +1 -1
- package/build/components/TagInput/style.css +1 -1
- package/build/components/TextLink/style.css +1 -1
- package/build/components/Textarea/style.css +1 -1
- package/build/components/Tile/style.css +1 -1
- package/build/components/Toast/style.css +1 -1
- package/build/design/index.cjs +154 -28
- package/build/design/index.cjs.map +1 -1
- package/build/design/index.d.cts +96 -7
- package/build/design/index.d.mts +96 -7
- package/build/design/index.mjs +154 -29
- package/build/design/index.mjs.map +1 -1
- package/build/design/index.umd.cjs +1 -1
- package/build/design/index.umd.cjs.map +1 -1
- package/build/design/tokens.css +57 -28
- package/build/design/tokens.json +136 -28
- package/build/design/tokens.scss +32 -30
- package/build/index.cjs +1 -1
- package/build/index.d.cts +3 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +58 -51
- package/build/index.js.map +1 -1
- package/build/scss/_mixins.scss +1 -6
- package/build/scss/_variables.scss +18 -7
- package/build/styles.css +45 -39
- package/package.json +31 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a((e="undefined"!=typeof globalThis?globalThis:e||self).handijitDesign={})}(this,function(e){"use strict";const a=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i,t=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,f=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,r=(e,t)=>{if("string"!=typeof e||!a.test(e))throw new TypeError(`${t}: expected a hex colour like "#2661fa", received ${(e=>"string"==typeof e?`"${e}"`:typeof e)(e)}`);const f=e.slice(1),r=3===f.length?f.replace(/./g,e=>e+e):f,i=e=>parseInt(r.slice(e,e+2),16)/255;return{r:i(0),g:i(2),b:i(4)}},i=e=>Math.round(255*Math.min(1,Math.max(0,e))).toString(16).padStart(2,"0"),o=({r:e,g:a,b:t})=>`#${i(e)}${i(a)}${i(t)}`,d=({r:e,g:a,b:f})=>.2126*t(e)+.7152*t(a)+.0722*t(f),c=e=>`--hd-${e}`,s=({l:e,c:a,h:t})=>{const r=t*Math.PI/180,i=a*Math.cos(r),o=a*Math.sin(r),d=(e+.3963377774*i+.2158037573*o)**3,c=(e-.1055613458*i-.0638541728*o)**3,s=(e-.0894841775*i-1.291485548*o)**3;return{r:f(4.0767416621*d-3.3077115913*c+.2309699292*s),g:f(-1.2684380046*d+2.6097574011*c-.3413193965*s),b:f(-.0041960863*d-.7034186147*c+1.707614701*s)}},n=e=>e>=-1e-4&&e<=1.0001,l=({r:e,g:a,b:t})=>n(e)&&n(a)&&n(t),h=(e,a,t)=>{let f=0,r=t;for(let t=0;t<24;t+=1){const t=(f+r)/2;l(s({l:e,c:t,h:a}))?f=t:r=t}return f},b=e=>{const a=t(e.r),f=t(e.g),r=t(e.b),i=Math.cbrt(.4122214708*a+.5363325363*f+.0514459929*r),o=Math.cbrt(.2119034982*a+.6806995451*f+.1073969566*r),d=Math.cbrt(.0883024619*a+.2817188376*f+.6299787005*r);return{l:.2104542553*i+.793617785*o-.0040720468*d,a:1.9779984951*i-2.428592205*o+.4505937099*d,b:.0259040371*i+.7827717662*o-.808675766*d}},g=(e,a,t)=>{if("number"!=typeof e||!Number.isFinite(e))throw new TypeError(`${t}: ${a} must be a finite number, received ${String(e)}`)};e.CSS_VARIABLE_PREFIX="hd",e.THEME_ATTRIBUTE="data-theme",e.THEME_BOOT_SCRIPT='(function(){var r=document.documentElement,q=window.matchMedia("(prefers-color-scheme: dark)"),a=function(){var s;try{s=localStorage.getItem("hd-theme")}catch(e){}r.setAttribute("data-theme",s==="light"||s==="dark"?s:q.matches?"dark":"light")};a();q.addEventListener("change",a)})();',e.THEME_BOOT_SCRIPT_HASH="sha256-yBtu0+cpsTaiuo7oykT/pEhxNmKXW7Q0szD6rE70zOM=",e.THEME_STORAGE_KEY="hd-theme",e.breakpoints={sm:640,md:768,lg:1024,xl:1280},e.contrast=(e,a)=>{const t=d(r(e,"contrast")),f=d(r(a,"contrast"));return(Math.max(t,f)+.05)/(Math.min(t,f)+.05)},e.cssVar=(e,a)=>void 0===a?`var(${c(e)})`:`var(${c(e)}, ${a})`,e.cssVarName=c,e.deltaE=(e,a)=>{const t=b(r(e,"deltaE")),f=b(r(a,"deltaE"));return 100*Math.hypot(t.l-f.l,t.a-f.a,t.b-f.b)},e.effectValues={light:{shadow:{color:"#0f173c",alpha:.1},shadows:{1:[{x:0,y:1,blur:2,spread:0,alpha:.1}],2:[{x:0,y:1,blur:2,spread:0,alpha:.1},{x:0,y:12,blur:32,spread:-12,alpha:.2}],3:[{x:0,y:2,blur:4,spread:0,alpha:.1},{x:0,y:24,blur:56,spread:-16,alpha:.3}]},scrim:{color:"#091122",alpha:.48}},dark:{shadow:{color:"#000000",alpha:.45},shadows:{1:[{x:0,y:1,blur:2,spread:0,alpha:.45}],2:[{x:0,y:1,blur:2,spread:0,alpha:.45},{x:0,y:12,blur:32,spread:-12,alpha:.9}],3:[{x:0,y:2,blur:4,spread:0,alpha:.45},{x:0,y:24,blur:56,spread:-16,alpha:.9}]},scrim:{color:"#040813",alpha:.64}}},e.effects={light:{"shadow-color":"15 23 60","shadow-alpha":"0.1","shadow-1":"0 1px 2px rgb(15 23 60 / 0.1)","shadow-2":"0 1px 2px rgb(15 23 60 / 0.1), 0 12px 32px -12px rgb(15 23 60 / 0.2)","shadow-3":"0 2px 4px rgb(15 23 60 / 0.1), 0 24px 56px -16px rgb(15 23 60 / 0.3)",scrim:"rgb(9 17 34 / 0.48)"},dark:{"shadow-color":"0 0 0","shadow-alpha":"0.45","shadow-1":"0 1px 2px rgb(0 0 0 / 0.45)","shadow-2":"0 1px 2px rgb(0 0 0 / 0.45), 0 12px 32px -12px rgb(0 0 0 / 0.9)","shadow-3":"0 2px 4px rgb(0 0 0 / 0.45), 0 24px 56px -16px rgb(0 0 0 / 0.9)",scrim:"rgb(4 8 19 / 0.64)"}},e.fontWeights={regular:400,medium:500,semibold:600,bold:700},e.fonts={display:'Archivo, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',body:'Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'"IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace'},e.hexToOklch=e=>{const{l:a,a:t,b:f}=b(r(e,"hexToOklch")),i=Math.hypot(t,f);return i<1e-4?{l:a,c:0,h:0}:{l:a,c:i,h:(180*Math.atan2(f,t)/Math.PI+360)%360}},e.hues={cobalt:264,coral:33,turquoise:192,success:156,warning:78,danger:14,violet:310,magenta:348},e.layers={base:0,raised:1,sticky:100,dropdown:1e3,overlay:1100,modal:1200,popover:1300,toast:1400,tooltip:1500},e.logos={mark:{viewBox:"0 0 618.034 1000",width:618.034,height:1e3,body:"M40.325 1000 L130.495 1000 L170.82 959.675 L170.82 554.175 L447.214 554.175 L447.214 959.675 L487.539 1000 L577.709 1000 L618.034 959.675 L618.034 439.083 L577.709 398.758 L170.82 398.758 L170.82 40.325 L130.495 0 L40.325 0 L0 40.325 L0 959.675 Z",dot:"M487.539 0 L577.709 0 L618.034 40.325 L618.034 130.495 L577.709 170.82 L487.539 170.82 L447.214 130.495 L447.214 40.325 Z"},horizontal:{viewBox:"0 0 6004.732 1109.971",width:6004.732,height:1109.971,body:"M44.76 1109.971 L144.846 1109.971 L189.605 1065.212 L189.605 615.118 L496.395 615.118 L496.395 1065.212 L541.154 1109.971 L641.24 1109.971 L686 1065.212 L686 487.37 L641.24 442.61 L189.605 442.61 L189.605 44.76 L144.846 0 L44.76 0 L0 44.76 L0 1065.212 Z M949.732 1109.971 1216.732 423.971H1380.732L1648.732 1109.971H1507.732L1452.732 963.971H1138.732L1083.732 1109.971ZM1179.732 853.971H1410.732L1341.732 667.971Q1337.732 657.971 1332.232 642.471Q1326.732 626.971 1320.732 608.471Q1314.732 589.971 1308.732 570.971Q1302.732 551.971 1297.732 536.971H1292.732Q1286.732 556.971 1278.232 582.971Q1269.732 608.971 1261.732 631.971Q1253.732 654.971 1248.732 667.971Z M1859.732 1109.971V423.971H1983.732L2276.732 828.971Q2281.732 834.971 2288.732 845.471Q2295.732 855.971 2301.732 865.971Q2307.732 875.971 2309.732 881.971H2314.732Q2314.732 867.971 2314.732 854.971Q2314.732 841.971 2314.732 828.971V423.971H2439.732V1109.971H2316.732L2022.732 701.971Q2014.732 689.971 2004.232 672.471Q1993.732 654.971 1989.732 647.971H1984.732Q1984.732 660.971 1984.732 674.471Q1984.732 687.971 1984.732 701.971V1109.971Z M3125.732 1109.971V423.971H3390.732Q3496.732 423.971 3571.732 460.471Q3646.732 496.971 3687.232 572.471Q3727.732 647.971 3727.732 766.971Q3727.732 884.971 3687.232 960.971Q3646.732 1036.971 3571.732 1073.471Q3496.732 1109.971 3390.732 1109.971ZM3237.732 1013.971H3389.732Q3442.732 1013.971 3484.232 999.971Q3525.732 985.971 3554.232 956.971Q3582.732 927.971 3597.232 883.471Q3611.732 838.971 3611.732 777.971V756.971Q3611.732 694.971 3597.232 650.471Q3582.732 605.971 3554.232 576.971Q3525.732 547.971 3484.232 533.971Q3442.732 519.971 3389.732 519.971H3237.732Z M3986.732 1109.971V423.971H4098.732V1109.971Z M4013.172 231.971 H4072.292 L4098.732 258.411 V317.532 L4072.292 343.971 H4013.172 L3986.732 317.532 V258.411 Z M4573.732 1121.971Q4500.732 1121.971 4449.732 1098.971Q4398.732 1075.971 4371.732 1031.971Q4344.732 987.971 4344.732 921.971V888.971H4455.732V924.971Q4455.732 973.971 4485.732 1000.471Q4515.732 1026.971 4573.732 1026.971Q4630.732 1026.971 4660.732 988.971Q4690.732 950.971 4690.732 879.971V423.971H4802.732V877.971Q4802.732 958.971 4775.732 1013.471Q4748.732 1067.971 4697.732 1094.971Q4646.732 1121.971 4573.732 1121.971Z M5091.732 1109.971V423.971H5203.732V1109.971Z M5118.172 231.971 H5177.292 L5203.732 258.411 V317.532 L5177.292 343.971 H5118.172 L5091.732 317.532 V258.411 Z M5663.732 1109.971V519.971H5436.732V423.971H6004.732V519.971H5775.732V1109.971Z",dot:"M541.154 0 L641.24 0 L686 44.76 L686 144.846 L641.24 189.605 L541.154 189.605 L496.395 144.846 L496.395 44.76 Z"}},e.maxChroma=(e,a)=>(g(e,"l","maxChroma"),g(a,"h","maxChroma"),h(e,a,.4)),e.motion={duration:{fast:120,base:200,slow:320},easing:{standard:"cubic-bezier(0.2, 0, 0, 1)",enter:"cubic-bezier(0, 0, 0, 1)",exit:"cubic-bezier(0.3, 0, 1, 1)"}},e.oklchToHex=e=>{const{l:a,c:t,h:f}=e??{};g(a,"l","oklchToHex"),g(t,"c","oklchToHex"),g(f,"h","oklchToHex");const r=Math.max(0,t),i={l:a,c:r,h:f},d=s(i);return l(d)?o(d):o(s({...i,c:h(i.l,i.h,r)}))},e.radii={xs:6,sm:10,md:14,lg:20,pill:999},e.scales={cobalt:{50:"#f4f7fd",100:"#e6edfb",200:"#cfddf9",300:"#adc6f7",400:"#82a8f7",500:"#5487fa",600:"#2661fa",700:"#053dea",800:"#0631b2",900:"#05247e",950:"#031650"},coral:{50:"#fdf5f2",100:"#fbe8e3",200:"#fad7cf",300:"#f9bdb0",400:"#f99884",500:"#fb6041",600:"#e03611",700:"#b72e11",800:"#87230f",900:"#5d190c",950:"#380e06"},turquoise:{50:"#edfaf9",100:"#d5f4f2",200:"#aeedea",300:"#7ddfdb",400:"#3acac6",500:"#20aca8",600:"#158e8a",700:"#157371",800:"#135553",900:"#0f3b3a",950:"#082322"},success:{50:"#effaf3",100:"#dbf4e3",200:"#bbedcc",300:"#7de5a7",400:"#3ad184",500:"#20b26d",600:"#159358",700:"#157748",800:"#135835",900:"#0f3d25",950:"#082415"},warning:{50:"#fdf6ea",100:"#fbead1",200:"#faddb1",300:"#f9c97c",400:"#f0af36",500:"#cf931d",600:"#ad7a13",700:"#8e6413",800:"#664811",900:"#46310d",950:"#281c06"},danger:{50:"#fdf4f5",100:"#fbe7e8",200:"#f9d1d3",300:"#f8afb5",400:"#f87e8d",500:"#fa2f61",600:"#d2154c",700:"#a9143c",800:"#81142e",900:"#5c1020",950:"#3a0913"},violet:{50:"#f9f5fd",100:"#f3e8fb",200:"#e8d3f9",300:"#dab4f7",400:"#c988f7",500:"#bb51fa",600:"#a217e4",700:"#8216b7",800:"#63168c",900:"#461263",950:"#2c0b3e"},magenta:{50:"#fdf4f8",100:"#fbe6f0",200:"#f9cee3",300:"#f8abd1",400:"#f874bd",500:"#f220a8",600:"#c71589",700:"#a0146e",800:"#7a1354",900:"#57103b",950:"#370924"},slate:{0:"#ffffff",25:"#fafbfe",50:"#f4f6fb",100:"#ecf0f6",200:"#dee3ed",300:"#cbd1de",400:"#a1a9ba",500:"#677083",600:"#515b6e",700:"#3f495d",800:"#263044",900:"#141e31",950:"#091122"}},e.spacing={0:0,1:4,2:8,3:12,4:16,5:20,6:24,8:32,10:40,12:48,16:64,20:80,24:96},e.themes={light:{"bg-page":"#fafbfe","bg-surface":"#ffffff","bg-raised":"#f4f6fb","bg-inset":"#ecf0f6","bg-overlay":"#ffffff","bg-disabled":"#ecf0f6",border:"#dee3ed","border-strong":"#cbd1de","border-control":"#80899b",text:"#091122","text-2":"#515b6e","text-3":"#677083","text-disabled":"#a1a9ba",primary:"#2661fa","primary-hover":"#053dea","primary-active":"#0631b2","on-primary":"#ffffff","primary-soft":"#f4f7fd","primary-soft-hover":"#e6edfb","primary-line":"#cfddf9","primary-text":"#053dea",accent:"#fb6041","accent-hover":"#f99884","accent-active":"#f05133","on-accent":"#091122","accent-soft":"#fdf5f2","accent-text":"#b72e11",highlight:"#20aca8","on-highlight":"#091122","highlight-soft":"#edfaf9","highlight-text":"#157371",focus:"#5487fa","selection-bg":"#cfddf9","success-bg":"#effaf3","success-fg":"#157748","success-line":"#bbedcc","success-solid":"#159358","success-on-solid":"#091122","warning-bg":"#fdf6ea","warning-fg":"#8e6413","warning-line":"#faddb1","warning-solid":"#ad7a13","warning-on-solid":"#091122","danger-bg":"#fdf4f5","danger-fg":"#a9143c","danger-line":"#f9d1d3","danger-solid":"#d2154c","danger-on-solid":"#ffffff","info-bg":"#f4f7fd","info-fg":"#053dea","info-line":"#cfddf9","info-solid":"#2661fa","info-on-solid":"#ffffff","chart-1":"#2661fa","chart-2":"#e03611","chart-3":"#158e8a","chart-4":"#ad7a13","chart-5":"#c71589","chart-6":"#a217e4","band-bg":"#091b64","band-deep":"#060f3e","band-line":"#213b86","band-line-strong":"#5b7cce","band-text":"#ffffff","band-text-2":"#bfd2f3"},dark:{"bg-page":"#080e1b","bg-surface":"#0f1727","bg-raised":"#172032","bg-inset":"#040813","bg-overlay":"#202a3e","bg-disabled":"#172032",border:"#283145","border-strong":"#414d64","border-control":"#69758d",text:"#f1f3f9","text-2":"#bac1d0","text-3":"#8f99ab","text-disabled":"#4e586d",primary:"#2661fa","primary-hover":"#2e69fe","primary-active":"#053dea","on-primary":"#ffffff","primary-soft":"#11234f","primary-soft-hover":"#172c62","primary-line":"#24418d","primary-text":"#adc6f7",accent:"#fb6041","accent-hover":"#f99884","accent-active":"#f05133","on-accent":"#091122","accent-soft":"#3f1a12","accent-text":"#f9bdb0",highlight:"#3acac6","on-highlight":"#091122","highlight-soft":"#022d2c","highlight-text":"#7ddfdb",focus:"#82a8f7","selection-bg":"#24418d","success-bg":"#0b2b1a","success-fg":"#7de5a7","success-line":"#144f30","success-solid":"#3ad184","success-on-solid":"#091122","warning-bg":"#342305","warning-fg":"#f9c97c","warning-line":"#5e420f","warning-solid":"#f0af36","warning-on-solid":"#091122","danger-bg":"#3e141a","danger-fg":"#f8afb5","danger-line":"#742633","danger-solid":"#d2154c","danger-on-solid":"#ffffff","info-bg":"#11234f","info-fg":"#adc6f7","info-line":"#24418d","info-solid":"#2661fa","info-on-solid":"#ffffff","chart-1":"#82a8f7","chart-2":"#f99884","chart-3":"#3acac6","chart-4":"#f0af36","chart-5":"#f874bd","chart-6":"#c988f7","band-bg":"#091b64","band-deep":"#060f3e","band-line":"#213b86","band-line-strong":"#5b7cce","band-text":"#ffffff","band-text-2":"#bfd2f3"}},e.typography={display:{font:"display",size:56,lineHeight:1.05,weight:700,letterSpacing:-.03,stretch:112},h1:{font:"display",size:40,lineHeight:1.1,weight:700,letterSpacing:-.025,stretch:110},h2:{font:"display",size:30,lineHeight:1.15,weight:700,letterSpacing:-.02,stretch:110},h3:{font:"display",size:22,lineHeight:1.2,weight:650,letterSpacing:-.015,stretch:108},h4:{font:"display",size:18,lineHeight:1.3,weight:650,letterSpacing:-.01,stretch:108},lead:{font:"body",size:17,lineHeight:1.55,weight:400,letterSpacing:0,stretch:100},body:{font:"body",size:15,lineHeight:1.55,weight:400,letterSpacing:0,stretch:100},small:{font:"body",size:13,lineHeight:1.5,weight:400,letterSpacing:0,stretch:100},caption:{font:"body",size:12,lineHeight:1.4,weight:500,letterSpacing:.01,stretch:100},code:{font:"mono",size:13,lineHeight:1.5,weight:400,letterSpacing:0,stretch:100}}});
|
|
1
|
+
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a((e="undefined"!=typeof globalThis?globalThis:e||self).handijitDesign={})}(this,function(e){"use strict";const a=/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i,t=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,f=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,o=(e,t)=>{if("string"!=typeof e||!a.test(e))throw new TypeError(`${t}: expected a hex colour like "#2661fa", received ${(e=>"string"==typeof e?`"${e}"`:typeof e)(e)}`);const f=e.slice(1),o=3===f.length?f.replace(/./g,e=>e+e):f,r=e=>parseInt(o.slice(e,e+2),16)/255;return{r:r(0),g:r(2),b:r(4)}},r=e=>Math.round(255*Math.min(1,Math.max(0,e))).toString(16).padStart(2,"0"),d=({r:e,g:a,b:t})=>`#${r(e)}${r(a)}${r(t)}`,n=({r:e,g:a,b:f})=>.2126*t(e)+.7152*t(a)+.0722*t(f),c=e=>`--hd-${e}`,i=({l:e,c:a,h:t})=>{const o=t*Math.PI/180,r=a*Math.cos(o),d=a*Math.sin(o),n=(e+.3963377774*r+.2158037573*d)**3,c=(e-.1055613458*r-.0638541728*d)**3,i=(e-.0894841775*r-1.291485548*d)**3;return{r:f(4.0767416621*n-3.3077115913*c+.2309699292*i),g:f(-1.2684380046*n+2.6097574011*c-.3413193965*i),b:f(-.0041960863*n-.7034186147*c+1.707614701*i)}},l=e=>e>=-1e-4&&e<=1.0001,s=({r:e,g:a,b:t})=>l(e)&&l(a)&&l(t),b=(e,a,t)=>{let f=0,o=t;for(let t=0;t<24;t+=1){const t=(f+o)/2;s(i({l:e,c:t,h:a}))?f=t:o=t}return f},h=e=>{const a=t(e.r),f=t(e.g),o=t(e.b),r=Math.cbrt(.4122214708*a+.5363325363*f+.0514459929*o),d=Math.cbrt(.2119034982*a+.6806995451*f+.1073969566*o),n=Math.cbrt(.0883024619*a+.2817188376*f+.6299787005*o);return{l:.2104542553*r+.793617785*d-.0040720468*n,a:1.9779984951*r-2.428592205*d+.4505937099*n,b:.0259040371*r+.7827717662*d-.808675766*n}},g=(e,a,t)=>{if("number"!=typeof e||!Number.isFinite(e))throw new TypeError(`${t}: ${a} must be a finite number, received ${String(e)}`)};e.CSS_VARIABLE_PREFIX="hd",e.THEME_ATTRIBUTE="data-theme",e.THEME_BOOT_SCRIPT='(function(){var r=document.documentElement,q=window.matchMedia("(prefers-color-scheme: dark)"),a=function(){var s;try{s=localStorage.getItem("hd-theme")}catch(e){}r.setAttribute("data-theme",s==="light"||s==="dark"?s:q.matches?"dark":"light")};a();q.addEventListener("change",a)})();',e.THEME_BOOT_SCRIPT_HASH="sha256-yBtu0+cpsTaiuo7oykT/pEhxNmKXW7Q0szD6rE70zOM=",e.THEME_STORAGE_KEY="hd-theme",e.band={gradientHold:.55,glowAlpha:.5,dotCell:22,dotRadius:1.6,dotAlpha:.7,blueprintHold:.6,accentGlow:{x:0,y:8,blur:24,spread:-10,alpha:.45}},e.breakpoints={sm:640,md:768,lg:1024,xl:1280},e.contrast=(e,a)=>{const t=n(o(e,"contrast")),f=n(o(a,"contrast"));return(Math.max(t,f)+.05)/(Math.min(t,f)+.05)},e.cssVar=(e,a)=>void 0===a?`var(${c(e)})`:`var(${c(e)}, ${a})`,e.cssVarName=c,e.deltaE=(e,a)=>{const t=h(o(e,"deltaE")),f=h(o(a,"deltaE"));return 100*Math.hypot(t.l-f.l,t.a-f.a,t.b-f.b)},e.effectValues={light:{shadow:{color:"#0f173c",alpha:.1},shadows:{1:[{x:0,y:1,blur:2,spread:0,alpha:.1}],2:[{x:0,y:1,blur:2,spread:0,alpha:.1},{x:0,y:12,blur:32,spread:-12,alpha:.2}],3:[{x:0,y:2,blur:4,spread:0,alpha:.1},{x:0,y:24,blur:56,spread:-16,alpha:.3}]},scrim:{color:"#091122",alpha:.48},band:{gradient:[{offset:0,color:"#091b64"},{offset:.55,color:"#091b64"},{offset:1,color:"#060f3e"}],glow:{color:"#2661fa",alpha:.5},dots:{color:"#5b7cce",alpha:.7,cell:22,radius:1.6},blueprint:{fill:[{offset:0,color:"#213b86"},{offset:.6,color:"#091b64"}],stroke:"#5b7cce"},accentGlow:{color:"#fb6041",layer:{x:0,y:8,blur:24,spread:-10,alpha:.45}}}},dark:{shadow:{color:"#000000",alpha:.45},shadows:{1:[{x:0,y:1,blur:2,spread:0,alpha:.45}],2:[{x:0,y:1,blur:2,spread:0,alpha:.45},{x:0,y:12,blur:32,spread:-12,alpha:.9}],3:[{x:0,y:2,blur:4,spread:0,alpha:.45},{x:0,y:24,blur:56,spread:-16,alpha:.9}]},scrim:{color:"#040813",alpha:.64},band:{gradient:[{offset:0,color:"#091b64"},{offset:.55,color:"#091b64"},{offset:1,color:"#060f3e"}],glow:{color:"#2661fa",alpha:.5},dots:{color:"#5b7cce",alpha:.7,cell:22,radius:1.6},blueprint:{fill:[{offset:0,color:"#213b86"},{offset:.6,color:"#091b64"}],stroke:"#5b7cce"},accentGlow:{color:"#fb6041",layer:{x:0,y:8,blur:24,spread:-10,alpha:.45}}}}},e.effects={light:{"shadow-color":"15 23 60","shadow-alpha":"0.1","shadow-1":"0 1px 2px rgb(15 23 60 / 0.1)","shadow-2":"0 1px 2px rgb(15 23 60 / 0.1), 0 12px 32px -12px rgb(15 23 60 / 0.2)","shadow-3":"0 2px 4px rgb(15 23 60 / 0.1), 0 24px 56px -16px rgb(15 23 60 / 0.3)",scrim:"rgb(9 17 34 / 0.48)","band-gradient-from":"#091b64","band-gradient-to":"#060f3e","band-gradient-hold":"55%","band-glow":"#2661fa","band-glow-alpha":"0.5","band-dot":"#5b7cce","band-dot-alpha":"0.7","band-dot-cell":"22px","band-dot-radius":"1.6px","band-blueprint-from":"#213b86","band-blueprint-to":"#091b64","band-blueprint-hold":"60%","band-blueprint-stroke":"#5b7cce","band-accent-glow":"0 8px 24px -10px rgb(251 96 65 / 0.45)"},dark:{"shadow-color":"0 0 0","shadow-alpha":"0.45","shadow-1":"0 1px 2px rgb(0 0 0 / 0.45)","shadow-2":"0 1px 2px rgb(0 0 0 / 0.45), 0 12px 32px -12px rgb(0 0 0 / 0.9)","shadow-3":"0 2px 4px rgb(0 0 0 / 0.45), 0 24px 56px -16px rgb(0 0 0 / 0.9)",scrim:"rgb(4 8 19 / 0.64)","band-gradient-from":"#091b64","band-gradient-to":"#060f3e","band-gradient-hold":"55%","band-glow":"#2661fa","band-glow-alpha":"0.5","band-dot":"#5b7cce","band-dot-alpha":"0.7","band-dot-cell":"22px","band-dot-radius":"1.6px","band-blueprint-from":"#213b86","band-blueprint-to":"#091b64","band-blueprint-hold":"60%","band-blueprint-stroke":"#5b7cce","band-accent-glow":"0 8px 24px -10px rgb(251 96 65 / 0.45)"}},e.fontWeights={regular:400,medium:500,semibold:600,bold:700},e.fonts={display:'Archivo, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif',body:'Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',mono:'"IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace'},e.hexToOklch=e=>{const{l:a,a:t,b:f}=h(o(e,"hexToOklch")),r=Math.hypot(t,f);return r<1e-4?{l:a,c:0,h:0}:{l:a,c:r,h:(180*Math.atan2(f,t)/Math.PI+360)%360}},e.hues={cobalt:264,coral:33,success:156,warning:78,danger:14,violet:310,magenta:348},e.layers={base:0,raised:1,sticky:100,dropdown:1e3,overlay:1100,modal:1200,popover:1300,toast:1400,tooltip:1500},e.logos={mark:{viewBox:"0 0 618.034 1000",width:618.034,height:1e3,body:"M40.325 1000 L130.495 1000 L170.82 959.675 L170.82 554.175 L447.214 554.175 L447.214 959.675 L487.539 1000 L577.709 1000 L618.034 959.675 L618.034 439.083 L577.709 398.758 L170.82 398.758 L170.82 40.325 L130.495 0 L40.325 0 L0 40.325 L0 959.675 Z",dot:"M487.539 0 L577.709 0 L618.034 40.325 L618.034 130.495 L577.709 170.82 L487.539 170.82 L447.214 130.495 L447.214 40.325 Z"},horizontal:{viewBox:"0 0 6004.732 1109.971",width:6004.732,height:1109.971,body:"M44.76 1109.971 L144.846 1109.971 L189.605 1065.212 L189.605 615.118 L496.395 615.118 L496.395 1065.212 L541.154 1109.971 L641.24 1109.971 L686 1065.212 L686 487.37 L641.24 442.61 L189.605 442.61 L189.605 44.76 L144.846 0 L44.76 0 L0 44.76 L0 1065.212 Z M949.732 1109.971 1216.732 423.971H1380.732L1648.732 1109.971H1507.732L1452.732 963.971H1138.732L1083.732 1109.971ZM1179.732 853.971H1410.732L1341.732 667.971Q1337.732 657.971 1332.232 642.471Q1326.732 626.971 1320.732 608.471Q1314.732 589.971 1308.732 570.971Q1302.732 551.971 1297.732 536.971H1292.732Q1286.732 556.971 1278.232 582.971Q1269.732 608.971 1261.732 631.971Q1253.732 654.971 1248.732 667.971Z M1859.732 1109.971V423.971H1983.732L2276.732 828.971Q2281.732 834.971 2288.732 845.471Q2295.732 855.971 2301.732 865.971Q2307.732 875.971 2309.732 881.971H2314.732Q2314.732 867.971 2314.732 854.971Q2314.732 841.971 2314.732 828.971V423.971H2439.732V1109.971H2316.732L2022.732 701.971Q2014.732 689.971 2004.232 672.471Q1993.732 654.971 1989.732 647.971H1984.732Q1984.732 660.971 1984.732 674.471Q1984.732 687.971 1984.732 701.971V1109.971Z M3125.732 1109.971V423.971H3390.732Q3496.732 423.971 3571.732 460.471Q3646.732 496.971 3687.232 572.471Q3727.732 647.971 3727.732 766.971Q3727.732 884.971 3687.232 960.971Q3646.732 1036.971 3571.732 1073.471Q3496.732 1109.971 3390.732 1109.971ZM3237.732 1013.971H3389.732Q3442.732 1013.971 3484.232 999.971Q3525.732 985.971 3554.232 956.971Q3582.732 927.971 3597.232 883.471Q3611.732 838.971 3611.732 777.971V756.971Q3611.732 694.971 3597.232 650.471Q3582.732 605.971 3554.232 576.971Q3525.732 547.971 3484.232 533.971Q3442.732 519.971 3389.732 519.971H3237.732Z M3986.732 1109.971V423.971H4098.732V1109.971Z M4013.172 231.971 H4072.292 L4098.732 258.411 V317.532 L4072.292 343.971 H4013.172 L3986.732 317.532 V258.411 Z M4573.732 1121.971Q4500.732 1121.971 4449.732 1098.971Q4398.732 1075.971 4371.732 1031.971Q4344.732 987.971 4344.732 921.971V888.971H4455.732V924.971Q4455.732 973.971 4485.732 1000.471Q4515.732 1026.971 4573.732 1026.971Q4630.732 1026.971 4660.732 988.971Q4690.732 950.971 4690.732 879.971V423.971H4802.732V877.971Q4802.732 958.971 4775.732 1013.471Q4748.732 1067.971 4697.732 1094.971Q4646.732 1121.971 4573.732 1121.971Z M5091.732 1109.971V423.971H5203.732V1109.971Z M5118.172 231.971 H5177.292 L5203.732 258.411 V317.532 L5177.292 343.971 H5118.172 L5091.732 317.532 V258.411 Z M5663.732 1109.971V519.971H5436.732V423.971H6004.732V519.971H5775.732V1109.971Z",dot:"M541.154 0 L641.24 0 L686 44.76 L686 144.846 L641.24 189.605 L541.154 189.605 L496.395 144.846 L496.395 44.76 Z"}},e.maxChroma=(e,a)=>(g(e,"l","maxChroma"),g(a,"h","maxChroma"),b(e,a,.4)),e.motion={duration:{fast:120,base:200,slow:320},easing:{standard:"cubic-bezier(0.2, 0, 0, 1)",enter:"cubic-bezier(0, 0, 0, 1)",exit:"cubic-bezier(0.3, 0, 1, 1)"}},e.oklchToHex=e=>{const{l:a,c:t,h:f}=e??{};g(a,"l","oklchToHex"),g(t,"c","oklchToHex"),g(f,"h","oklchToHex");const o=Math.max(0,t),r={l:a,c:o,h:f},n=i(r);return s(n)?d(n):d(i({...r,c:b(r.l,r.h,o)}))},e.radii={xs:6,sm:10,md:14,lg:20,pill:999},e.scales={cobalt:{50:"#f4f7fd",100:"#e6edfb",200:"#cfddf9",300:"#adc6f7",400:"#82a8f7",500:"#5487fa",600:"#2661fa",700:"#053dea",800:"#0631b2",900:"#05247e",950:"#031650"},coral:{50:"#fdf5f2",100:"#fbe8e3",200:"#fad7cf",300:"#f9bdb0",400:"#f99884",500:"#fb6041",600:"#e03611",700:"#b72e11",800:"#87230f",900:"#5d190c",950:"#380e06"},success:{50:"#effaf3",100:"#dbf4e3",200:"#bbedcc",300:"#7de5a7",400:"#3ad184",500:"#20b26d",600:"#159358",700:"#157748",800:"#135835",900:"#0f3d25",950:"#082415"},warning:{50:"#fdf6ea",100:"#fbead1",200:"#faddb1",300:"#f9c97c",400:"#f0af36",500:"#cf931d",600:"#ad7a13",700:"#8e6413",800:"#664811",900:"#46310d",950:"#281c06"},danger:{50:"#fdf4f5",100:"#fbe7e8",200:"#f9d1d3",300:"#f8afb5",400:"#f87e8d",500:"#fa2f61",600:"#d2154c",700:"#a9143c",800:"#81142e",900:"#5c1020",950:"#3a0913"},violet:{50:"#f9f5fd",100:"#f3e8fb",200:"#e8d3f9",300:"#dab4f7",400:"#c988f7",500:"#bb51fa",600:"#a217e4",700:"#8216b7",800:"#63168c",900:"#461263",950:"#2c0b3e"},magenta:{50:"#fdf4f8",100:"#fbe6f0",200:"#f9cee3",300:"#f8abd1",400:"#f874bd",500:"#f220a8",600:"#c71589",700:"#a0146e",800:"#7a1354",900:"#57103b",950:"#370924"},slate:{0:"#ffffff",25:"#fafbfe",50:"#f4f6fb",100:"#ecf0f6",200:"#dee3ed",300:"#cbd1de",400:"#a1a9ba",500:"#677083",600:"#515b6e",700:"#3f495d",800:"#263044",900:"#141e31",950:"#091122"}},e.spacing={0:0,1:4,2:8,3:12,4:16,5:20,6:24,8:32,10:40,12:48,16:64,20:80,24:96},e.themes={light:{"bg-page":"#fafbfe","bg-surface":"#ffffff","bg-raised":"#f4f6fb","bg-inset":"#ecf0f6","bg-overlay":"#ffffff","bg-disabled":"#ecf0f6",border:"#dee3ed","border-strong":"#cbd1de","border-control":"#80899b",text:"#091122","text-2":"#515b6e","text-3":"#677083","text-disabled":"#a1a9ba",primary:"#2661fa","primary-hover":"#053dea","primary-active":"#0631b2","on-primary":"#ffffff","primary-soft":"#f4f7fd","primary-soft-hover":"#e6edfb","primary-line":"#cfddf9","primary-text":"#053dea",accent:"#fb6041","accent-hover":"#f99884","accent-active":"#f05133","on-accent":"#091122","accent-soft":"#fdf5f2","accent-text":"#b72e11",focus:"#5487fa","selection-bg":"#cfddf9","success-bg":"#effaf3","success-fg":"#157748","success-line":"#bbedcc","success-solid":"#159358","success-on-solid":"#091122","warning-bg":"#fdf6ea","warning-fg":"#8e6413","warning-line":"#faddb1","warning-solid":"#ad7a13","warning-on-solid":"#091122","danger-bg":"#fdf4f5","danger-fg":"#a9143c","danger-line":"#f9d1d3","danger-solid":"#d2154c","danger-on-solid":"#ffffff","info-bg":"#f4f7fd","info-fg":"#053dea","info-line":"#cfddf9","info-solid":"#2661fa","info-on-solid":"#ffffff","chart-1":"#2661fa","chart-2":"#e03611","chart-3":"#159358","chart-4":"#ad7a13","chart-5":"#c71589","chart-6":"#a217e4","band-bg":"#091b64","band-deep":"#060f3e","band-line":"#213b86","band-line-strong":"#5b7cce","band-text":"#ffffff","band-text-2":"#bfd2f3","band-focus":"#ffffff","band-edge":"#091b64"},dark:{"bg-page":"#080e1b","bg-surface":"#0f1727","bg-raised":"#172032","bg-inset":"#040813","bg-overlay":"#202a3e","bg-disabled":"#172032",border:"#283145","border-strong":"#414d64","border-control":"#69758d",text:"#f1f3f9","text-2":"#bac1d0","text-3":"#8f99ab","text-disabled":"#4e586d",primary:"#2661fa","primary-hover":"#2e69fe","primary-active":"#053dea","on-primary":"#ffffff","primary-soft":"#11234f","primary-soft-hover":"#172c62","primary-line":"#24418d","primary-text":"#adc6f7",accent:"#fb6041","accent-hover":"#f99884","accent-active":"#f05133","on-accent":"#091122","accent-soft":"#3f1a12","accent-text":"#f9bdb0",focus:"#82a8f7","selection-bg":"#24418d","success-bg":"#0b2b1a","success-fg":"#7de5a7","success-line":"#144f30","success-solid":"#3ad184","success-on-solid":"#091122","warning-bg":"#342305","warning-fg":"#f9c97c","warning-line":"#5e420f","warning-solid":"#f0af36","warning-on-solid":"#091122","danger-bg":"#3e141a","danger-fg":"#f8afb5","danger-line":"#742633","danger-solid":"#d2154c","danger-on-solid":"#ffffff","info-bg":"#11234f","info-fg":"#adc6f7","info-line":"#24418d","info-solid":"#2661fa","info-on-solid":"#ffffff","chart-1":"#82a8f7","chart-2":"#f99884","chart-3":"#3ad184","chart-4":"#f0af36","chart-5":"#f874bd","chart-6":"#c988f7","band-bg":"#091b64","band-deep":"#060f3e","band-line":"#213b86","band-line-strong":"#5b7cce","band-text":"#ffffff","band-text-2":"#bfd2f3","band-focus":"#ffffff","band-edge":"#213b86"}},e.typography={display:{font:"display",size:56,lineHeight:1.05,weight:700,letterSpacing:-.03,stretch:112},h1:{font:"display",size:40,lineHeight:1.1,weight:700,letterSpacing:-.025,stretch:110},h2:{font:"display",size:30,lineHeight:1.15,weight:700,letterSpacing:-.02,stretch:110},h3:{font:"display",size:22,lineHeight:1.2,weight:650,letterSpacing:-.015,stretch:108},h4:{font:"display",size:18,lineHeight:1.3,weight:650,letterSpacing:-.01,stretch:108},lead:{font:"body",size:17,lineHeight:1.55,weight:400,letterSpacing:0,stretch:100},body:{font:"body",size:15,lineHeight:1.55,weight:400,letterSpacing:0,stretch:100},small:{font:"body",size:13,lineHeight:1.5,weight:400,letterSpacing:0,stretch:100},caption:{font:"body",size:12,lineHeight:1.4,weight:500,letterSpacing:.01,stretch:100},code:{font:"mono",size:13,lineHeight:1.5,weight:400,letterSpacing:0,stretch:100}}});
|
|
2
2
|
//# sourceMappingURL=index.umd.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","sources":["../../src/design/helpers/srgb.helper.ts","../../src/design/modules/css-var-name.ts","../../src/design/helpers/oklch.helper.ts","../../src/design/tokens/css-variable-prefix.ts","../../src/design/tokens/theme-attribute.ts","../../src/design/tokens/theme-storage-key.ts","../../src/design/tokens/breakpoints.ts","../../src/design/modules/contrast.ts","../../src/design/modules/css-var.ts","../../src/design/modules/delta-e.ts","../../src/design/tokens/font-weights.ts","../../src/design/tokens/fonts.ts","../../src/design/modules/hex-to-oklch.ts","../../src/design/tokens/hues.ts","../../src/design/tokens/layers.ts","../../src/design/tokens/logos.ts","../../src/design/modules/max-chroma.ts","../../src/design/tokens/motion.ts","../../src/design/modules/oklch-to-hex.ts","../../src/design/tokens/radii.ts","../../src/design/tokens/spacing.ts","../../src/design/tokens/typography.ts"],"sourcesContent":["/** sRGB channels in the 0–1 range (gamma-encoded unless a function says linear). */\ntype Rgb = { r: number; g: number; b: number };\n\nconst HEX_PATTERN = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/** sRGB gamma → linear light. */\nconst toLinear = (channel: number): number =>\n channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;\n\n/** Linear light → sRGB gamma. */\nconst toGamma = (channel: number): number =>\n channel <= 0.0031308 ? channel * 12.92 : 1.055 * channel ** (1 / 2.4) - 0.055;\n\nconst describe = (value: unknown): string =>\n typeof value === 'string' ? `\"${value}\"` : typeof value;\n\n/** `#rgb` / `#rrggbb` → gamma-encoded channels; anything else is a caller error. */\nconst parseHex = (value: unknown, caller: string): Rgb => {\n if (typeof value !== 'string' || !HEX_PATTERN.test(value)) {\n throw new TypeError(\n `${caller}: expected a hex colour like \"#2661fa\", received ${describe(value)}`,\n );\n }\n\n const digits = value.slice(1);\n const full = digits.length === 3 ? digits.replace(/./g, digit => digit + digit) : digits;\n const channel = (start: number): number => parseInt(full.slice(start, start + 2), 16) / 255;\n\n return { r: channel(0), g: channel(2), b: channel(4) };\n};\n\nconst toByte = (channel: number): string =>\n Math.round(Math.min(1, Math.max(0, channel)) * 255)\n .toString(16)\n .padStart(2, '0');\n\n/** Gamma-encoded channels → lowercase `#rrggbb`; out-of-range channels clip. */\nconst formatHex = ({ r, g, b }: Rgb): string => `#${toByte(r)}${toByte(g)}${toByte(b)}`;\n\n/** WCAG 2 relative luminance of gamma-encoded channels. */\nconst relativeLuminance = ({ r, g, b }: Rgb): number =>\n 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);\n\nexport type { Rgb };\nexport { formatHex, parseHex, relativeLuminance, toGamma, toLinear };\n","import CSS_VARIABLE_PREFIX from '../tokens/css-variable-prefix';\nimport type { TokenName } from '../types';\n\n/** The custom property name of a token: `cssVarName(\"bg-page\")` → `--hd-bg-page`. */\nconst cssVarName = <Name extends TokenName>(\n name: Name,\n): `--${typeof CSS_VARIABLE_PREFIX}-${Name}` => `--${CSS_VARIABLE_PREFIX}-${name}`;\n\nexport default cssVarName;\n","import type { Oklch } from '../types';\nimport type { Rgb } from './srgb.helper';\nimport { toGamma, toLinear } from './srgb.helper';\n\ntype Oklab = { l: number; a: number; b: number };\n\n// Rounding noise at the gamut edge must not count as \"out of gamut\".\nconst GAMUT_EPSILON = 0.0001;\n\n// 24 halvings of the widest chroma interval land far below one 8-bit step.\nconst BISECTION_STEPS = 24;\n\n/** OKLCH → gamma-encoded sRGB, without any gamut handling. */\nconst oklchToSrgb = ({ l, c, h }: Oklch): Rgb => {\n const radians = (h * Math.PI) / 180;\n const greenRed = c * Math.cos(radians);\n const blueYellow = c * Math.sin(radians);\n\n const long = (l + 0.3963377774 * greenRed + 0.2158037573 * blueYellow) ** 3;\n const medium = (l - 0.1055613458 * greenRed - 0.0638541728 * blueYellow) ** 3;\n const short = (l - 0.0894841775 * greenRed - 1.291485548 * blueYellow) ** 3;\n\n return {\n r: toGamma(4.0767416621 * long - 3.3077115913 * medium + 0.2309699292 * short),\n g: toGamma(-1.2684380046 * long + 2.6097574011 * medium - 0.3413193965 * short),\n b: toGamma(-0.0041960863 * long - 0.7034186147 * medium + 1.707614701 * short),\n };\n};\n\nconst isChannelInGamut = (channel: number): boolean =>\n channel >= -GAMUT_EPSILON && channel <= 1 + GAMUT_EPSILON;\n\nconst isInGamut = ({ r, g, b }: Rgb): boolean =>\n isChannelInGamut(r) && isChannelInGamut(g) && isChannelInGamut(b);\n\n/** The highest chroma up to `ceiling` that still fits sRGB at this lightness and hue. */\nconst fitChroma = (l: number, h: number, ceiling: number): number => {\n let low = 0;\n let high = ceiling;\n\n for (let step = 0; step < BISECTION_STEPS; step += 1) {\n const middle = (low + high) / 2;\n if (isInGamut(oklchToSrgb({ l, c: middle, h }))) low = middle;\n else high = middle;\n }\n\n return low;\n};\n\n/** Gamma-encoded sRGB → OKLab. */\nconst srgbToOklab = (rgb: Rgb): Oklab => {\n const r = toLinear(rgb.r);\n const g = toLinear(rgb.g);\n const b = toLinear(rgb.b);\n\n const long = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);\n const medium = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);\n const short = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);\n\n return {\n l: 0.2104542553 * long + 0.793617785 * medium - 0.0040720468 * short,\n a: 1.9779984951 * long - 2.428592205 * medium + 0.4505937099 * short,\n b: 0.0259040371 * long + 0.7827717662 * medium - 0.808675766 * short,\n };\n};\n\n/** Rejects `NaN`, `±Infinity` and non-numbers: no colour can be computed from them. */\nconst assertFinite = (value: unknown, name: string, caller: string): void => {\n if (typeof value !== 'number' || !Number.isFinite(value)) {\n throw new TypeError(`${caller}: ${name} must be a finite number, received ${String(value)}`);\n }\n};\n\nexport type { Oklab };\nexport { assertFinite, fitChroma, isInGamut, oklchToSrgb, srgbToOklab };\n","/** Every custom property and Sass variable of the package starts with this. */\nconst CSS_VARIABLE_PREFIX = 'hd' as const;\n\nexport default CSS_VARIABLE_PREFIX;\n","/** The attribute that selects a theme: `<html data-theme=\"dark\">`. */\nconst THEME_ATTRIBUTE = 'data-theme' as const;\n\nexport default THEME_ATTRIBUTE;\n","/**\n * The `localStorage` key holding the user's choice: `\"light\"`, `\"dark\"`, or anything else\n * (including no entry) for \"follow the system\".\n */\nconst THEME_STORAGE_KEY = 'hd-theme' as const;\n\nexport default THEME_STORAGE_KEY;\n","import type { Breakpoints } from '../types';\n\n/** Viewport breakpoints in CSS pixels; each is the lower bound of its range. */\nconst breakpoints: Breakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n};\n\nexport default breakpoints;\n","import { parseHex, relativeLuminance } from '../helpers/srgb.helper';\n\n/** WCAG 2 contrast ratio of two opaque hex colours, from 1 to 21. Order does not matter. */\nconst contrast = (first: string, second: string): number => {\n const one = relativeLuminance(parseHex(first, 'contrast'));\n const other = relativeLuminance(parseHex(second, 'contrast'));\n return (Math.max(one, other) + 0.05) / (Math.min(one, other) + 0.05);\n};\n\nexport default contrast;\n","import type { TokenName } from '../types';\nimport cssVarName from './css-var-name';\n\n/**\n * A `var()` reference to a token: `cssVar(\"bg-page\")` → `var(--hd-bg-page)`.\n * The optional fallback is emitted verbatim: `var(--hd-bg-page, #fff)`.\n */\nconst cssVar = (name: TokenName, fallback?: string): string =>\n fallback === undefined ? `var(${cssVarName(name)})` : `var(${cssVarName(name)}, ${fallback})`;\n\nexport default cssVar;\n","import { srgbToOklab } from '../helpers/oklch.helper';\nimport { parseHex } from '../helpers/srgb.helper';\n\n/**\n * Perceptual distance between two hex colours: Euclidean OKLab distance × 100.\n * Around 2 is a just-noticeable difference; the palette keeps chart colours 10 apart.\n */\nconst deltaE = (first: string, second: string): number => {\n const from = srgbToOklab(parseHex(first, 'deltaE'));\n const to = srgbToOklab(parseHex(second, 'deltaE'));\n return Math.hypot(from.l - to.l, from.a - to.a, from.b - to.b) * 100;\n};\n\nexport default deltaE;\n","import type { FontWeights } from '../types';\n\n/** Named font weights. IBM Plex Mono ships only `regular` and `medium`. */\nconst fontWeights: FontWeights = {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n};\n\nexport default fontWeights;\n","import type { Fonts } from '../types';\n\n/**\n * Font family stacks. The first family of each stack ships in `fonts.css`; the rest are\n * system fonts that hold the layout while the web font loads or when it is missing.\n */\nconst fonts: Fonts = {\n display: 'Archivo, system-ui, -apple-system, \"Segoe UI\", \"Helvetica Neue\", Arial, sans-serif',\n body: 'Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n mono: '\"IBM Plex Mono\", ui-monospace, \"SF Mono\", SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace',\n};\n\nexport default fonts;\n","import { srgbToOklab } from '../helpers/oklch.helper';\nimport { parseHex } from '../helpers/srgb.helper';\nimport type { Oklch } from '../types';\n\n// Below this chroma the hue angle is rounding noise, not information.\nconst ACHROMATIC_CHROMA = 0.0001;\n\n/** Converts `#rgb` / `#rrggbb` to OKLCH. Greys report chroma 0 and hue 0. */\nconst hexToOklch = (hex: string): Oklch => {\n const { l, a, b } = srgbToOklab(parseHex(hex, 'hexToOklch'));\n const c = Math.hypot(a, b);\n if (c < ACHROMATIC_CHROMA) return { l, c: 0, h: 0 };\n\n return { l, c, h: ((Math.atan2(b, a) * 180) / Math.PI + 360) % 360 };\n};\n\nexport default hexToOklch;\n","import type { HueName } from '../types';\n\n/** OKLCH hue angle of every chromatic family. Neutrals lean to the cobalt hue. */\nconst hues: Readonly<Record<HueName, number>> = {\n cobalt: 264,\n coral: 33,\n turquoise: 192,\n success: 156,\n warning: 78,\n danger: 14,\n violet: 310,\n magenta: 348,\n};\n\nexport default hues;\n","import type { Layers } from '../types';\n\n/** `z-index` layers, lowest to highest. The gaps leave room for local stacking. */\nconst layers: Layers = {\n base: 0,\n raised: 1,\n sticky: 100,\n dropdown: 1000,\n overlay: 1100,\n modal: 1200,\n popover: 1300,\n toast: 1400,\n tooltip: 1500,\n};\n\nexport default layers;\n","import type { Logos } from '../types';\n\n/**\n * The Han Dijit logos as path data, so React and Electron code can draw them inline.\n * `body` takes `currentColor`; `dot` is the square dot of the mark and takes the accent.\n */\n// prettier-ignore\nconst logos: Logos = {\n mark: {\n viewBox: \"0 0 618.034 1000\",\n width: 618.034,\n height: 1000,\n body: \"M40.325 1000 L130.495 1000 L170.82 959.675 L170.82 554.175 L447.214 554.175 L447.214 959.675 L487.539 1000 L577.709 1000 L618.034 959.675 L618.034 439.083 L577.709 398.758 L170.82 398.758 L170.82 40.325 L130.495 0 L40.325 0 L0 40.325 L0 959.675 Z\",\n dot: \"M487.539 0 L577.709 0 L618.034 40.325 L618.034 130.495 L577.709 170.82 L487.539 170.82 L447.214 130.495 L447.214 40.325 Z\",\n },\n horizontal: {\n viewBox: \"0 0 6004.732 1109.971\",\n width: 6004.732,\n height: 1109.971,\n body: \"M44.76 1109.971 L144.846 1109.971 L189.605 1065.212 L189.605 615.118 L496.395 615.118 L496.395 1065.212 L541.154 1109.971 L641.24 1109.971 L686 1065.212 L686 487.37 L641.24 442.61 L189.605 442.61 L189.605 44.76 L144.846 0 L44.76 0 L0 44.76 L0 1065.212 Z M949.732 1109.971 1216.732 423.971H1380.732L1648.732 1109.971H1507.732L1452.732 963.971H1138.732L1083.732 1109.971ZM1179.732 853.971H1410.732L1341.732 667.971Q1337.732 657.971 1332.232 642.471Q1326.732 626.971 1320.732 608.471Q1314.732 589.971 1308.732 570.971Q1302.732 551.971 1297.732 536.971H1292.732Q1286.732 556.971 1278.232 582.971Q1269.732 608.971 1261.732 631.971Q1253.732 654.971 1248.732 667.971Z M1859.732 1109.971V423.971H1983.732L2276.732 828.971Q2281.732 834.971 2288.732 845.471Q2295.732 855.971 2301.732 865.971Q2307.732 875.971 2309.732 881.971H2314.732Q2314.732 867.971 2314.732 854.971Q2314.732 841.971 2314.732 828.971V423.971H2439.732V1109.971H2316.732L2022.732 701.971Q2014.732 689.971 2004.232 672.471Q1993.732 654.971 1989.732 647.971H1984.732Q1984.732 660.971 1984.732 674.471Q1984.732 687.971 1984.732 701.971V1109.971Z M3125.732 1109.971V423.971H3390.732Q3496.732 423.971 3571.732 460.471Q3646.732 496.971 3687.232 572.471Q3727.732 647.971 3727.732 766.971Q3727.732 884.971 3687.232 960.971Q3646.732 1036.971 3571.732 1073.471Q3496.732 1109.971 3390.732 1109.971ZM3237.732 1013.971H3389.732Q3442.732 1013.971 3484.232 999.971Q3525.732 985.971 3554.232 956.971Q3582.732 927.971 3597.232 883.471Q3611.732 838.971 3611.732 777.971V756.971Q3611.732 694.971 3597.232 650.471Q3582.732 605.971 3554.232 576.971Q3525.732 547.971 3484.232 533.971Q3442.732 519.971 3389.732 519.971H3237.732Z M3986.732 1109.971V423.971H4098.732V1109.971Z M4013.172 231.971 H4072.292 L4098.732 258.411 V317.532 L4072.292 343.971 H4013.172 L3986.732 317.532 V258.411 Z M4573.732 1121.971Q4500.732 1121.971 4449.732 1098.971Q4398.732 1075.971 4371.732 1031.971Q4344.732 987.971 4344.732 921.971V888.971H4455.732V924.971Q4455.732 973.971 4485.732 1000.471Q4515.732 1026.971 4573.732 1026.971Q4630.732 1026.971 4660.732 988.971Q4690.732 950.971 4690.732 879.971V423.971H4802.732V877.971Q4802.732 958.971 4775.732 1013.471Q4748.732 1067.971 4697.732 1094.971Q4646.732 1121.971 4573.732 1121.971Z M5091.732 1109.971V423.971H5203.732V1109.971Z M5118.172 231.971 H5177.292 L5203.732 258.411 V317.532 L5177.292 343.971 H5118.172 L5091.732 317.532 V258.411 Z M5663.732 1109.971V519.971H5436.732V423.971H6004.732V519.971H5775.732V1109.971Z\",\n dot: \"M541.154 0 L641.24 0 L686 44.76 L686 144.846 L641.24 189.605 L541.154 189.605 L496.395 144.846 L496.395 44.76 Z\",\n },\n};\n\nexport default logos;\n","import { assertFinite, fitChroma } from '../helpers/oklch.helper';\n\n// No sRGB colour reaches this chroma, so the search always starts outside the gamut.\nconst CHROMA_CEILING = 0.4;\n\n/** The highest chroma sRGB can show at the given OKLCH lightness and hue. */\nconst maxChroma = (l: number, h: number): number => {\n assertFinite(l, 'l', 'maxChroma');\n assertFinite(h, 'h', 'maxChroma');\n return fitChroma(l, h, CHROMA_CEILING);\n};\n\nexport default maxChroma;\n","import type { Motion } from '../types';\n\n/**\n * Durations (ms) and easings. `tokens.css` collapses the durations under\n * `prefers-reduced-motion: reduce`; code that animates from JavaScript has to check the\n * media query itself.\n */\nconst motion: Motion = {\n duration: { fast: 120, base: 200, slow: 320 },\n easing: {\n standard: 'cubic-bezier(0.2, 0, 0, 1)',\n enter: 'cubic-bezier(0, 0, 0, 1)',\n exit: 'cubic-bezier(0.3, 0, 1, 1)',\n },\n};\n\nexport default motion;\n","import { assertFinite, fitChroma, isInGamut, oklchToSrgb } from '../helpers/oklch.helper';\nimport { formatHex } from '../helpers/srgb.helper';\nimport type { Oklch } from '../types';\n\n/**\n * Converts an OKLCH colour to `#rrggbb`. A colour outside sRGB keeps its lightness and hue\n * and gives up chroma until it fits; channels are never clipped individually.\n */\nconst oklchToHex = (color: Oklch): string => {\n // Destructuring a missing argument would throw an unhelpful engine error instead.\n const { l, c, h } = (color ?? {}) as Partial<Oklch>;\n assertFinite(l, 'l', 'oklchToHex');\n assertFinite(c, 'c', 'oklchToHex');\n assertFinite(h, 'h', 'oklchToHex');\n\n // Negative chroma is the same colour mirrored through grey; read it as \"no chroma\".\n const chroma = Math.max(0, c as number);\n const requested = { l: l as number, c: chroma, h: h as number };\n const direct = oklchToSrgb(requested);\n if (isInGamut(direct)) return formatHex(direct);\n\n return formatHex(\n oklchToSrgb({\n ...requested,\n c: fitChroma(requested.l, requested.h, chroma),\n }),\n );\n};\n\nexport default oklchToHex;\n","import type { Radii } from '../types';\n\n/** Corner radii in CSS pixels. `pill` is large enough to round any control fully. */\nconst radii: Radii = {\n xs: 6,\n sm: 10,\n md: 14,\n lg: 20,\n pill: 999,\n};\n\nexport default radii;\n","import type { Spacing } from '../types';\n\n/** The spacing scale in CSS pixels: every step is its name × 4px. */\nconst spacing: Spacing = {\n 0: 0,\n 1: 4,\n 2: 8,\n 3: 12,\n 4: 16,\n 5: 20,\n 6: 24,\n 8: 32,\n 10: 40,\n 12: 48,\n 16: 64,\n 20: 80,\n 24: 96,\n};\n\nexport default spacing;\n","import type { Typography } from '../types';\n\n/**\n * The type scale. Sizes are CSS pixels at a 16px root (body is 15px); headings are set in\n * the display family, slightly wide (`stretch` above 100) and tight.\n */\nconst typography: Typography = {\n display: {\n font: 'display',\n size: 56,\n lineHeight: 1.05,\n weight: 700,\n letterSpacing: -0.03,\n stretch: 112,\n },\n h1: {\n font: 'display',\n size: 40,\n lineHeight: 1.1,\n weight: 700,\n letterSpacing: -0.025,\n stretch: 110,\n },\n h2: {\n font: 'display',\n size: 30,\n lineHeight: 1.15,\n weight: 700,\n letterSpacing: -0.02,\n stretch: 110,\n },\n h3: {\n font: 'display',\n size: 22,\n lineHeight: 1.2,\n weight: 650,\n letterSpacing: -0.015,\n stretch: 108,\n },\n h4: {\n font: 'display',\n size: 18,\n lineHeight: 1.3,\n weight: 650,\n letterSpacing: -0.01,\n stretch: 108,\n },\n lead: {\n font: 'body',\n size: 17,\n lineHeight: 1.55,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n body: {\n font: 'body',\n size: 15,\n lineHeight: 1.55,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n small: {\n font: 'body',\n size: 13,\n lineHeight: 1.5,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n caption: {\n font: 'body',\n size: 12,\n lineHeight: 1.4,\n weight: 500,\n letterSpacing: 0.01,\n stretch: 100,\n },\n code: {\n font: 'mono',\n size: 13,\n lineHeight: 1.5,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n};\n\nexport default typography;\n"],"names":["HEX_PATTERN","toLinear","channel","toGamma","parseHex","value","caller","test","TypeError","describe","digits","slice","full","length","replace","digit","start","parseInt","r","g","b","toByte","Math","round","min","max","toString","padStart","formatHex","relativeLuminance","cssVarName","name","oklchToSrgb","l","c","h","radians","PI","greenRed","cos","blueYellow","sin","long","medium","short","isChannelInGamut","isInGamut","fitChroma","ceiling","low","high","step","middle","srgbToOklab","rgb","cbrt","a","assertFinite","Number","isFinite","String","sm","md","lg","xl","first","second","one","other","fallback","undefined","from","to","hypot","regular","semibold","bold","display","body","mono","hex","atan2","cobalt","coral","turquoise","success","warning","danger","violet","magenta","base","raised","sticky","dropdown","overlay","modal","popover","toast","tooltip","mark","viewBox","width","height","dot","horizontal","duration","fast","slow","easing","standard","enter","exit","color","chroma","requested","direct","xs","pill","font","size","lineHeight","weight","letterSpacing","stretch","h1","h2","h3","h4","lead","small","caption","code"],"mappings":"qPAGA,MAAMA,EAAc,kCAGdC,EAAYC,GAChBA,GAAW,OAAUA,EAAU,QAAUA,EAAU,MAAS,QAAU,IAGlEC,EAAWD,GACfA,GAAW,SAAsB,MAAVA,EAAkB,MAAQA,IAAY,EAAI,KAAO,KAMpEE,EAAW,CAACC,EAAgBC,KAChC,GAAqB,iBAAVD,IAAuBL,EAAYO,KAAKF,GACjD,MAAM,IAAIG,UACR,GAAGF,qDAPQ,CAACD,GACC,iBAAVA,EAAqB,IAAIA,YAAkBA,EAMeI,CAASJ,MAI1E,MAAMK,EAASL,EAAMM,MAAM,GACrBC,EAAyB,IAAlBF,EAAOG,OAAeH,EAAOI,QAAQ,KAAMC,GAASA,EAAQA,GAASL,EAC5ER,EAAWc,GAA0BC,SAASL,EAAKD,MAAMK,EAAOA,EAAQ,GAAI,IAAM,IAExF,MAAO,CAAEE,EAAGhB,EAAQ,GAAIiB,EAAGjB,EAAQ,GAAIkB,EAAGlB,EAAQ,KAG9CmB,EAAUnB,GACdoB,KAAKC,MAA0C,IAApCD,KAAKE,IAAI,EAAGF,KAAKG,IAAI,EAAGvB,KAChCwB,SAAS,IACTC,SAAS,EAAG,KAGXC,EAAY,EAAGV,IAAGC,IAAGC,OAAqB,IAAIC,EAAOH,KAAKG,EAAOF,KAAKE,EAAOD,KAG7ES,EAAoB,EAAGX,IAAGC,IAAGC,OACjC,MAASnB,EAASiB,GAAK,MAASjB,EAASkB,GAAK,MAASlB,EAASmB,GCrC5DU,EACJC,GAC8C,QAA4BA,ICOtEC,EAAc,EAAGC,IAAGC,IAAGC,QAC3B,MAAMC,EAAWD,EAAIb,KAAKe,GAAM,IAC1BC,EAAWJ,EAAIZ,KAAKiB,IAAIH,GACxBI,EAAaN,EAAIZ,KAAKmB,IAAIL,GAE1BM,GA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ACFN,KAAM,UACNC,KAAM,GACNC,WAAY,IACZC,OAAQ,IACRC,eAAe,KACfC,QAAS,KAEXE,GAAI,CACFP,KAAM,UACNC,KAAM,GACNC,WAAY,KACZC,OAAQ,IACRC,eAAe,IACfC,QAAS,KAEXG,GAAI,CACFR,KAAM,UACNC,KAAM,GACNC,WAAY,IACZC,OAAQ,IACRC,eAAe,KACfC,QAAS,KAEXI,GAAI,CACFT,KAAM,UACNC,KAAM,GACNC,WAAY,IACZC,OAAQ,IACRC,eAAe,IACfC,QAAS,KAEXK,KAAM,CACJV,KAAM,OACNC,KAAM,GACNC,WAAY,KACZC,OAAQ,IACRC,cAAe,EACfC,QAAS,KAEX7C,KAAM,CACJwC,KAAM,OACNC,KAAM,GACNC,WAAY,KACZC,OAAQ,IACRC,cAAe,EACfC,QAAS,KAEXM,MAAO,CACLX,KAAM,OACNC,KAAM,GACNC,WAAY,IACZC,OAAQ,IACRC,cAAe,EACfC,QAAS,KAEXO,QAAS,CACPZ,KAAM,OACNC,KAAM,GACNC,WAAY,IACZC,OAAQ,IACRC,cAAe,IACfC,QAAS,KAEXQ,KAAM,CACJb,KAAM,OACNC,KAAM,GACNC,WAAY,IACZC,OAAQ,IACRC,cAAe,EACfC,QAAS"}
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","sources":["../../src/design/helpers/srgb.helper.ts","../../src/design/modules/css-var-name.ts","../../src/design/helpers/oklch.helper.ts","../../src/design/tokens/css-variable-prefix.ts","../../src/design/tokens/theme-attribute.ts","../../src/design/tokens/theme-storage-key.ts","../../src/design/tokens/band.ts","../../src/design/tokens/breakpoints.ts","../../src/design/modules/contrast.ts","../../src/design/modules/css-var.ts","../../src/design/modules/delta-e.ts","../../src/design/tokens/font-weights.ts","../../src/design/tokens/fonts.ts","../../src/design/modules/hex-to-oklch.ts","../../src/design/tokens/hues.ts","../../src/design/tokens/layers.ts","../../src/design/tokens/logos.ts","../../src/design/modules/max-chroma.ts","../../src/design/tokens/motion.ts","../../src/design/modules/oklch-to-hex.ts","../../src/design/tokens/radii.ts","../../src/design/tokens/spacing.ts","../../src/design/tokens/typography.ts"],"sourcesContent":["/** sRGB channels in the 0–1 range (gamma-encoded unless a function says linear). */\ntype Rgb = { r: number; g: number; b: number };\n\nconst HEX_PATTERN = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/** sRGB gamma → linear light. */\nconst toLinear = (channel: number): number =>\n channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;\n\n/** Linear light → sRGB gamma. */\nconst toGamma = (channel: number): number =>\n channel <= 0.0031308 ? channel * 12.92 : 1.055 * channel ** (1 / 2.4) - 0.055;\n\nconst describe = (value: unknown): string =>\n typeof value === 'string' ? `\"${value}\"` : typeof value;\n\n/** `#rgb` / `#rrggbb` → gamma-encoded channels; anything else is a caller error. */\nconst parseHex = (value: unknown, caller: string): Rgb => {\n if (typeof value !== 'string' || !HEX_PATTERN.test(value)) {\n throw new TypeError(\n `${caller}: expected a hex colour like \"#2661fa\", received ${describe(value)}`,\n );\n }\n\n const digits = value.slice(1);\n const full = digits.length === 3 ? digits.replace(/./g, digit => digit + digit) : digits;\n const channel = (start: number): number => parseInt(full.slice(start, start + 2), 16) / 255;\n\n return { r: channel(0), g: channel(2), b: channel(4) };\n};\n\nconst toByte = (channel: number): string =>\n Math.round(Math.min(1, Math.max(0, channel)) * 255)\n .toString(16)\n .padStart(2, '0');\n\n/** Gamma-encoded channels → lowercase `#rrggbb`; out-of-range channels clip. */\nconst formatHex = ({ r, g, b }: Rgb): string => `#${toByte(r)}${toByte(g)}${toByte(b)}`;\n\n/** WCAG 2 relative luminance of gamma-encoded channels. */\nconst relativeLuminance = ({ r, g, b }: Rgb): number =>\n 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);\n\nexport type { Rgb };\nexport { formatHex, parseHex, relativeLuminance, toGamma, toLinear };\n","import CSS_VARIABLE_PREFIX from '../tokens/css-variable-prefix';\nimport type { TokenName } from '../types';\n\n/** The custom property name of a token: `cssVarName(\"bg-page\")` → `--hd-bg-page`. */\nconst cssVarName = <Name extends TokenName>(\n name: Name,\n): `--${typeof CSS_VARIABLE_PREFIX}-${Name}` => `--${CSS_VARIABLE_PREFIX}-${name}`;\n\nexport default cssVarName;\n","import type { Oklch } from '../types';\nimport type { Rgb } from './srgb.helper';\nimport { toGamma, toLinear } from './srgb.helper';\n\ntype Oklab = { l: number; a: number; b: number };\n\n// Rounding noise at the gamut edge must not count as \"out of gamut\".\nconst GAMUT_EPSILON = 0.0001;\n\n// 24 halvings of the widest chroma interval land far below one 8-bit step.\nconst BISECTION_STEPS = 24;\n\n/** OKLCH → gamma-encoded sRGB, without any gamut handling. */\nconst oklchToSrgb = ({ l, c, h }: Oklch): Rgb => {\n const radians = (h * Math.PI) / 180;\n const greenRed = c * Math.cos(radians);\n const blueYellow = c * Math.sin(radians);\n\n const long = (l + 0.3963377774 * greenRed + 0.2158037573 * blueYellow) ** 3;\n const medium = (l - 0.1055613458 * greenRed - 0.0638541728 * blueYellow) ** 3;\n const short = (l - 0.0894841775 * greenRed - 1.291485548 * blueYellow) ** 3;\n\n return {\n r: toGamma(4.0767416621 * long - 3.3077115913 * medium + 0.2309699292 * short),\n g: toGamma(-1.2684380046 * long + 2.6097574011 * medium - 0.3413193965 * short),\n b: toGamma(-0.0041960863 * long - 0.7034186147 * medium + 1.707614701 * short),\n };\n};\n\nconst isChannelInGamut = (channel: number): boolean =>\n channel >= -GAMUT_EPSILON && channel <= 1 + GAMUT_EPSILON;\n\nconst isInGamut = ({ r, g, b }: Rgb): boolean =>\n isChannelInGamut(r) && isChannelInGamut(g) && isChannelInGamut(b);\n\n/** The highest chroma up to `ceiling` that still fits sRGB at this lightness and hue. */\nconst fitChroma = (l: number, h: number, ceiling: number): number => {\n let low = 0;\n let high = ceiling;\n\n for (let step = 0; step < BISECTION_STEPS; step += 1) {\n const middle = (low + high) / 2;\n if (isInGamut(oklchToSrgb({ l, c: middle, h }))) low = middle;\n else high = middle;\n }\n\n return low;\n};\n\n/** Gamma-encoded sRGB → OKLab. */\nconst srgbToOklab = (rgb: Rgb): Oklab => {\n const r = toLinear(rgb.r);\n const g = toLinear(rgb.g);\n const b = toLinear(rgb.b);\n\n const long = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);\n const medium = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);\n const short = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);\n\n return {\n l: 0.2104542553 * long + 0.793617785 * medium - 0.0040720468 * short,\n a: 1.9779984951 * long - 2.428592205 * medium + 0.4505937099 * short,\n b: 0.0259040371 * long + 0.7827717662 * medium - 0.808675766 * short,\n };\n};\n\n/** Rejects `NaN`, `±Infinity` and non-numbers: no colour can be computed from them. */\nconst assertFinite = (value: unknown, name: string, caller: string): void => {\n if (typeof value !== 'number' || !Number.isFinite(value)) {\n throw new TypeError(`${caller}: ${name} must be a finite number, received ${String(value)}`);\n }\n};\n\nexport type { Oklab };\nexport { assertFinite, fitChroma, isInGamut, oklchToSrgb, srgbToOklab };\n","/** Every custom property and Sass variable of the package starts with this. */\nconst CSS_VARIABLE_PREFIX = 'hd' as const;\n\nexport default CSS_VARIABLE_PREFIX;\n","/** The attribute that selects a theme: `<html data-theme=\"dark\">`. */\nconst THEME_ATTRIBUTE = 'data-theme' as const;\n\nexport default THEME_ATTRIBUTE;\n","/**\n * The `localStorage` key holding the user's choice: `\"light\"`, `\"dark\"`, or anything else\n * (including no entry) for \"follow the system\".\n */\nconst THEME_STORAGE_KEY = 'hd-theme' as const;\n\nexport default THEME_STORAGE_KEY;\n","import type { BandRecipe } from '../types';\n\n/**\n * The brand band's recipe: the numbers its imagery is drawn with, the same in every theme.\n * The colours are the theme's roles (`band-*`, `primary`, `accent`); `effectValues` and\n * `effects` pair the two. A component that draws the band reads its geometry here, because\n * an SVG attribute (a pattern's cell, a gradient stop's offset) cannot read a custom property.\n */\nconst band: BandRecipe = {\n gradientHold: 0.55,\n // A glow at its centre over `band-bg` keeps `band-text-2` at 5.85:1 (gated).\n glowAlpha: 0.5,\n dotCell: 22,\n dotRadius: 1.6,\n dotAlpha: 0.7,\n blueprintHold: 0.6,\n accentGlow: { x: 0, y: 8, blur: 24, spread: -10, alpha: 0.45 },\n};\n\nexport default band;\n","import type { Breakpoints } from '../types';\n\n/** Viewport breakpoints in CSS pixels; each is the lower bound of its range. */\nconst breakpoints: Breakpoints = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n};\n\nexport default breakpoints;\n","import { parseHex, relativeLuminance } from '../helpers/srgb.helper';\n\n/** WCAG 2 contrast ratio of two opaque hex colours, from 1 to 21. Order does not matter. */\nconst contrast = (first: string, second: string): number => {\n const one = relativeLuminance(parseHex(first, 'contrast'));\n const other = relativeLuminance(parseHex(second, 'contrast'));\n return (Math.max(one, other) + 0.05) / (Math.min(one, other) + 0.05);\n};\n\nexport default contrast;\n","import type { TokenName } from '../types';\nimport cssVarName from './css-var-name';\n\n/**\n * A `var()` reference to a token: `cssVar(\"bg-page\")` → `var(--hd-bg-page)`.\n * The optional fallback is emitted verbatim: `var(--hd-bg-page, #fff)`.\n */\nconst cssVar = (name: TokenName, fallback?: string): string =>\n fallback === undefined ? `var(${cssVarName(name)})` : `var(${cssVarName(name)}, ${fallback})`;\n\nexport default cssVar;\n","import { srgbToOklab } from '../helpers/oklch.helper';\nimport { parseHex } from '../helpers/srgb.helper';\n\n/**\n * Perceptual distance between two hex colours: Euclidean OKLab distance × 100.\n * Around 2 is a just-noticeable difference; the palette keeps chart colours 10 apart.\n */\nconst deltaE = (first: string, second: string): number => {\n const from = srgbToOklab(parseHex(first, 'deltaE'));\n const to = srgbToOklab(parseHex(second, 'deltaE'));\n return Math.hypot(from.l - to.l, from.a - to.a, from.b - to.b) * 100;\n};\n\nexport default deltaE;\n","import type { FontWeights } from '../types';\n\n/** Named font weights. IBM Plex Mono ships only `regular` and `medium`. */\nconst fontWeights: FontWeights = {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n};\n\nexport default fontWeights;\n","import type { Fonts } from '../types';\n\n/**\n * Font family stacks. The first family of each stack ships in `fonts.css`; the rest are\n * system fonts that hold the layout while the web font loads or when it is missing.\n */\nconst fonts: Fonts = {\n display: 'Archivo, system-ui, -apple-system, \"Segoe UI\", \"Helvetica Neue\", Arial, sans-serif',\n body: 'Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n mono: '\"IBM Plex Mono\", ui-monospace, \"SF Mono\", SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace',\n};\n\nexport default fonts;\n","import { srgbToOklab } from '../helpers/oklch.helper';\nimport { parseHex } from '../helpers/srgb.helper';\nimport type { Oklch } from '../types';\n\n// Below this chroma the hue angle is rounding noise, not information.\nconst ACHROMATIC_CHROMA = 0.0001;\n\n/** Converts `#rgb` / `#rrggbb` to OKLCH. Greys report chroma 0 and hue 0. */\nconst hexToOklch = (hex: string): Oklch => {\n const { l, a, b } = srgbToOklab(parseHex(hex, 'hexToOklch'));\n const c = Math.hypot(a, b);\n if (c < ACHROMATIC_CHROMA) return { l, c: 0, h: 0 };\n\n return { l, c, h: ((Math.atan2(b, a) * 180) / Math.PI + 360) % 360 };\n};\n\nexport default hexToOklch;\n","import type { HueName } from '../types';\n\n/** OKLCH hue angle of every chromatic family. Neutrals lean to the cobalt hue. */\nconst hues: Readonly<Record<HueName, number>> = {\n cobalt: 264,\n coral: 33,\n success: 156,\n warning: 78,\n danger: 14,\n violet: 310,\n magenta: 348,\n};\n\nexport default hues;\n","import type { Layers } from '../types';\n\n/** `z-index` layers, lowest to highest. The gaps leave room for local stacking. */\nconst layers: Layers = {\n base: 0,\n raised: 1,\n sticky: 100,\n dropdown: 1000,\n overlay: 1100,\n modal: 1200,\n popover: 1300,\n toast: 1400,\n tooltip: 1500,\n};\n\nexport default layers;\n","import type { Logos } from '../types';\n\n/**\n * The Han Dijit logos as path data, so React and Electron code can draw them inline.\n * `body` takes `currentColor`; `dot` is the square dot of the mark and takes the accent.\n */\n// prettier-ignore\nconst logos: Logos = {\n mark: {\n viewBox: \"0 0 618.034 1000\",\n width: 618.034,\n height: 1000,\n body: \"M40.325 1000 L130.495 1000 L170.82 959.675 L170.82 554.175 L447.214 554.175 L447.214 959.675 L487.539 1000 L577.709 1000 L618.034 959.675 L618.034 439.083 L577.709 398.758 L170.82 398.758 L170.82 40.325 L130.495 0 L40.325 0 L0 40.325 L0 959.675 Z\",\n dot: \"M487.539 0 L577.709 0 L618.034 40.325 L618.034 130.495 L577.709 170.82 L487.539 170.82 L447.214 130.495 L447.214 40.325 Z\",\n },\n horizontal: {\n viewBox: \"0 0 6004.732 1109.971\",\n width: 6004.732,\n height: 1109.971,\n body: \"M44.76 1109.971 L144.846 1109.971 L189.605 1065.212 L189.605 615.118 L496.395 615.118 L496.395 1065.212 L541.154 1109.971 L641.24 1109.971 L686 1065.212 L686 487.37 L641.24 442.61 L189.605 442.61 L189.605 44.76 L144.846 0 L44.76 0 L0 44.76 L0 1065.212 Z M949.732 1109.971 1216.732 423.971H1380.732L1648.732 1109.971H1507.732L1452.732 963.971H1138.732L1083.732 1109.971ZM1179.732 853.971H1410.732L1341.732 667.971Q1337.732 657.971 1332.232 642.471Q1326.732 626.971 1320.732 608.471Q1314.732 589.971 1308.732 570.971Q1302.732 551.971 1297.732 536.971H1292.732Q1286.732 556.971 1278.232 582.971Q1269.732 608.971 1261.732 631.971Q1253.732 654.971 1248.732 667.971Z M1859.732 1109.971V423.971H1983.732L2276.732 828.971Q2281.732 834.971 2288.732 845.471Q2295.732 855.971 2301.732 865.971Q2307.732 875.971 2309.732 881.971H2314.732Q2314.732 867.971 2314.732 854.971Q2314.732 841.971 2314.732 828.971V423.971H2439.732V1109.971H2316.732L2022.732 701.971Q2014.732 689.971 2004.232 672.471Q1993.732 654.971 1989.732 647.971H1984.732Q1984.732 660.971 1984.732 674.471Q1984.732 687.971 1984.732 701.971V1109.971Z M3125.732 1109.971V423.971H3390.732Q3496.732 423.971 3571.732 460.471Q3646.732 496.971 3687.232 572.471Q3727.732 647.971 3727.732 766.971Q3727.732 884.971 3687.232 960.971Q3646.732 1036.971 3571.732 1073.471Q3496.732 1109.971 3390.732 1109.971ZM3237.732 1013.971H3389.732Q3442.732 1013.971 3484.232 999.971Q3525.732 985.971 3554.232 956.971Q3582.732 927.971 3597.232 883.471Q3611.732 838.971 3611.732 777.971V756.971Q3611.732 694.971 3597.232 650.471Q3582.732 605.971 3554.232 576.971Q3525.732 547.971 3484.232 533.971Q3442.732 519.971 3389.732 519.971H3237.732Z M3986.732 1109.971V423.971H4098.732V1109.971Z M4013.172 231.971 H4072.292 L4098.732 258.411 V317.532 L4072.292 343.971 H4013.172 L3986.732 317.532 V258.411 Z M4573.732 1121.971Q4500.732 1121.971 4449.732 1098.971Q4398.732 1075.971 4371.732 1031.971Q4344.732 987.971 4344.732 921.971V888.971H4455.732V924.971Q4455.732 973.971 4485.732 1000.471Q4515.732 1026.971 4573.732 1026.971Q4630.732 1026.971 4660.732 988.971Q4690.732 950.971 4690.732 879.971V423.971H4802.732V877.971Q4802.732 958.971 4775.732 1013.471Q4748.732 1067.971 4697.732 1094.971Q4646.732 1121.971 4573.732 1121.971Z M5091.732 1109.971V423.971H5203.732V1109.971Z M5118.172 231.971 H5177.292 L5203.732 258.411 V317.532 L5177.292 343.971 H5118.172 L5091.732 317.532 V258.411 Z M5663.732 1109.971V519.971H5436.732V423.971H6004.732V519.971H5775.732V1109.971Z\",\n dot: \"M541.154 0 L641.24 0 L686 44.76 L686 144.846 L641.24 189.605 L541.154 189.605 L496.395 144.846 L496.395 44.76 Z\",\n },\n};\n\nexport default logos;\n","import { assertFinite, fitChroma } from '../helpers/oklch.helper';\n\n// No sRGB colour reaches this chroma, so the search always starts outside the gamut.\nconst CHROMA_CEILING = 0.4;\n\n/** The highest chroma sRGB can show at the given OKLCH lightness and hue. */\nconst maxChroma = (l: number, h: number): number => {\n assertFinite(l, 'l', 'maxChroma');\n assertFinite(h, 'h', 'maxChroma');\n return fitChroma(l, h, CHROMA_CEILING);\n};\n\nexport default maxChroma;\n","import type { Motion } from '../types';\n\n/**\n * Durations (ms) and easings. `tokens.css` collapses the durations under\n * `prefers-reduced-motion: reduce`; code that animates from JavaScript has to check the\n * media query itself.\n */\nconst motion: Motion = {\n duration: { fast: 120, base: 200, slow: 320 },\n easing: {\n standard: 'cubic-bezier(0.2, 0, 0, 1)',\n enter: 'cubic-bezier(0, 0, 0, 1)',\n exit: 'cubic-bezier(0.3, 0, 1, 1)',\n },\n};\n\nexport default motion;\n","import { assertFinite, fitChroma, isInGamut, oklchToSrgb } from '../helpers/oklch.helper';\nimport { formatHex } from '../helpers/srgb.helper';\nimport type { Oklch } from '../types';\n\n/**\n * Converts an OKLCH colour to `#rrggbb`. A colour outside sRGB keeps its lightness and hue\n * and gives up chroma until it fits; channels are never clipped individually.\n */\nconst oklchToHex = (color: Oklch): string => {\n // Destructuring a missing argument would throw an unhelpful engine error instead.\n const { l, c, h } = (color ?? {}) as Partial<Oklch>;\n assertFinite(l, 'l', 'oklchToHex');\n assertFinite(c, 'c', 'oklchToHex');\n assertFinite(h, 'h', 'oklchToHex');\n\n // Negative chroma is the same colour mirrored through grey; read it as \"no chroma\".\n const chroma = Math.max(0, c as number);\n const requested = { l: l as number, c: chroma, h: h as number };\n const direct = oklchToSrgb(requested);\n if (isInGamut(direct)) return formatHex(direct);\n\n return formatHex(\n oklchToSrgb({\n ...requested,\n c: fitChroma(requested.l, requested.h, chroma),\n }),\n );\n};\n\nexport default oklchToHex;\n","import type { Radii } from '../types';\n\n/** Corner radii in CSS pixels. `pill` is large enough to round any control fully. */\nconst radii: Radii = {\n xs: 6,\n sm: 10,\n md: 14,\n lg: 20,\n pill: 999,\n};\n\nexport default radii;\n","import type { Spacing } from '../types';\n\n/** The spacing scale in CSS pixels: every step is its name × 4px. */\nconst spacing: Spacing = {\n 0: 0,\n 1: 4,\n 2: 8,\n 3: 12,\n 4: 16,\n 5: 20,\n 6: 24,\n 8: 32,\n 10: 40,\n 12: 48,\n 16: 64,\n 20: 80,\n 24: 96,\n};\n\nexport default spacing;\n","import type { Typography } from '../types';\n\n/**\n * The type scale. Sizes are CSS pixels at a 16px root (body is 15px); headings are set in\n * the display family, slightly wide (`stretch` above 100) and tight.\n */\nconst typography: Typography = {\n display: {\n font: 'display',\n size: 56,\n lineHeight: 1.05,\n weight: 700,\n letterSpacing: -0.03,\n stretch: 112,\n },\n h1: {\n font: 'display',\n size: 40,\n lineHeight: 1.1,\n weight: 700,\n letterSpacing: -0.025,\n stretch: 110,\n },\n h2: {\n font: 'display',\n size: 30,\n lineHeight: 1.15,\n weight: 700,\n letterSpacing: -0.02,\n stretch: 110,\n },\n h3: {\n font: 'display',\n size: 22,\n lineHeight: 1.2,\n weight: 650,\n letterSpacing: -0.015,\n stretch: 108,\n },\n h4: {\n font: 'display',\n size: 18,\n lineHeight: 1.3,\n weight: 650,\n letterSpacing: -0.01,\n stretch: 108,\n },\n lead: {\n font: 'body',\n size: 17,\n lineHeight: 1.55,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n body: {\n font: 'body',\n size: 15,\n lineHeight: 1.55,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n small: {\n font: 'body',\n size: 13,\n lineHeight: 1.5,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n caption: {\n font: 'body',\n size: 12,\n lineHeight: 1.4,\n weight: 500,\n letterSpacing: 0.01,\n stretch: 100,\n },\n code: {\n font: 'mono',\n size: 13,\n lineHeight: 1.5,\n weight: 400,\n letterSpacing: 0,\n stretch: 100,\n },\n};\n\nexport default typography;\n"],"names":["HEX_PATTERN","toLinear","channel","toGamma","parseHex","value","caller","test","TypeError","describe","digits","slice","full","length","replace","digit","start","parseInt","r","g","b","toByte","Math","round","min","max","toString","padStart","formatHex","relativeLuminance","cssVarName","name","oklchToSrgb","l","c","h","radians","PI","greenRed","cos","blueYellow","sin","long","medium","short","isChannelInGamut","isInGamut","fitChroma","ceiling","low","high","step","middle","srgbToOklab","rgb","cbrt","a","assertFinite","Number","isFinite","String","gradientHold","glowAlpha","dotCell","dotRadius","dotAlpha","blueprintHold","accentGlow","x","y","blur","spread","alpha","sm","md","lg","xl","first","second","one","other","fallback","undefined","from","to","hypot","regular","semibold","bold","display","body","mono","hex","atan2","cobalt","coral","success","warning","danger","violet","magenta","base","raised","sticky","dropdown","overlay","modal","popover","toast","tooltip","mark","viewBox","width","height","dot","horizontal","duration","fast","slow","easing","standard","enter","exit","color","chroma","requested","direct","xs","pill","font","size","lineHeight","weight","letterSpacing","stretch","h1","h2","h3","h4","lead","small","caption","code"],"mappings":"qPAGA,MAAMA,EAAc,kCAGdC,EAAYC,GAChBA,GAAW,OAAUA,EAAU,QAAUA,EAAU,MAAS,QAAU,IAGlEC,EAAWD,GACfA,GAAW,SAAsB,MAAVA,EAAkB,MAAQA,IAAY,EAAI,KAAO,KAMpEE,EAAW,CAACC,EAAgBC,KAChC,GAAqB,iBAAVD,IAAuBL,EAAYO,KAAKF,GACjD,MAAM,IAAIG,UACR,GAAGF,qDAPQ,CAACD,GACC,iBAAVA,EAAqB,IAAIA,YAAkBA,EAMeI,CAASJ,MAI1E,MAAMK,EAASL,EAAMM,MAAM,GACrBC,EAAyB,IAAlBF,EAAOG,OAAeH,EAAOI,QAAQ,KAAMC,GAASA,EAAQA,GAASL,EAC5ER,EAAWc,GAA0BC,SAASL,EAAKD,MAAMK,EAAOA,EAAQ,GAAI,IAAM,IAExF,MAAO,CAAEE,EAAGhB,EAAQ,GAAIiB,EAAGjB,EAAQ,GAAIkB,EAAGlB,EAAQ,KAG9CmB,EAAUnB,GACdoB,KAAKC,MAA0C,IAApCD,KAAKE,IAAI,EAAGF,KAAKG,IAAI,EAAGvB,KAChCwB,SAAS,IACTC,SAAS,EAAG,KAGXC,EAAY,EAAGV,IAAGC,IAAGC,OAAqB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e,EACfC,QAAS"}
|
package/build/design/tokens.css
CHANGED
|
@@ -27,19 +27,6 @@
|
|
|
27
27
|
--hd-coral-900: #5d190c;
|
|
28
28
|
--hd-coral-950: #380e06;
|
|
29
29
|
|
|
30
|
-
/* Scale: turquoise */
|
|
31
|
-
--hd-turquoise-50: #edfaf9;
|
|
32
|
-
--hd-turquoise-100: #d5f4f2;
|
|
33
|
-
--hd-turquoise-200: #aeedea;
|
|
34
|
-
--hd-turquoise-300: #7ddfdb;
|
|
35
|
-
--hd-turquoise-400: #3acac6;
|
|
36
|
-
--hd-turquoise-500: #20aca8;
|
|
37
|
-
--hd-turquoise-600: #158e8a;
|
|
38
|
-
--hd-turquoise-700: #157371;
|
|
39
|
-
--hd-turquoise-800: #135553;
|
|
40
|
-
--hd-turquoise-900: #0f3b3a;
|
|
41
|
-
--hd-turquoise-950: #082322;
|
|
42
|
-
|
|
43
30
|
/* Scale: success */
|
|
44
31
|
--hd-success-50: #effaf3;
|
|
45
32
|
--hd-success-100: #dbf4e3;
|
|
@@ -257,10 +244,6 @@
|
|
|
257
244
|
--hd-on-accent: #091122;
|
|
258
245
|
--hd-accent-soft: #fdf5f2;
|
|
259
246
|
--hd-accent-text: #b72e11;
|
|
260
|
-
--hd-highlight: #20aca8;
|
|
261
|
-
--hd-on-highlight: #091122;
|
|
262
|
-
--hd-highlight-soft: #edfaf9;
|
|
263
|
-
--hd-highlight-text: #157371;
|
|
264
247
|
--hd-focus: #5487fa;
|
|
265
248
|
--hd-selection-bg: #cfddf9;
|
|
266
249
|
--hd-success-bg: #effaf3;
|
|
@@ -285,7 +268,7 @@
|
|
|
285
268
|
--hd-info-on-solid: #ffffff;
|
|
286
269
|
--hd-chart-1: #2661fa;
|
|
287
270
|
--hd-chart-2: #e03611;
|
|
288
|
-
--hd-chart-3: #
|
|
271
|
+
--hd-chart-3: #159358;
|
|
289
272
|
--hd-chart-4: #ad7a13;
|
|
290
273
|
--hd-chart-5: #c71589;
|
|
291
274
|
--hd-chart-6: #a217e4;
|
|
@@ -295,6 +278,8 @@
|
|
|
295
278
|
--hd-band-line-strong: #5b7cce;
|
|
296
279
|
--hd-band-text: #ffffff;
|
|
297
280
|
--hd-band-text-2: #bfd2f3;
|
|
281
|
+
--hd-band-focus: #ffffff;
|
|
282
|
+
--hd-band-edge: #091b64;
|
|
298
283
|
|
|
299
284
|
/* Elevation */
|
|
300
285
|
--hd-shadow-color: 15 23 60;
|
|
@@ -303,6 +288,22 @@
|
|
|
303
288
|
--hd-shadow-2: 0 1px 2px rgb(15 23 60 / 0.1), 0 12px 32px -12px rgb(15 23 60 / 0.2);
|
|
304
289
|
--hd-shadow-3: 0 2px 4px rgb(15 23 60 / 0.1), 0 24px 56px -16px rgb(15 23 60 / 0.3);
|
|
305
290
|
--hd-scrim: rgb(9 17 34 / 0.48);
|
|
291
|
+
|
|
292
|
+
/* Brand band imagery */
|
|
293
|
+
--hd-band-gradient-from: #091b64;
|
|
294
|
+
--hd-band-gradient-to: #060f3e;
|
|
295
|
+
--hd-band-gradient-hold: 55%;
|
|
296
|
+
--hd-band-glow: #2661fa;
|
|
297
|
+
--hd-band-glow-alpha: 0.5;
|
|
298
|
+
--hd-band-dot: #5b7cce;
|
|
299
|
+
--hd-band-dot-alpha: 0.7;
|
|
300
|
+
--hd-band-dot-cell: 22px;
|
|
301
|
+
--hd-band-dot-radius: 1.6px;
|
|
302
|
+
--hd-band-blueprint-from: #213b86;
|
|
303
|
+
--hd-band-blueprint-to: #091b64;
|
|
304
|
+
--hd-band-blueprint-hold: 60%;
|
|
305
|
+
--hd-band-blueprint-stroke: #5b7cce;
|
|
306
|
+
--hd-band-accent-glow: 0 8px 24px -10px rgb(251 96 65 / 0.45);
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
/* System mode: no explicit choice on the root element. */
|
|
@@ -339,10 +340,6 @@
|
|
|
339
340
|
--hd-on-accent: #091122;
|
|
340
341
|
--hd-accent-soft: #3f1a12;
|
|
341
342
|
--hd-accent-text: #f9bdb0;
|
|
342
|
-
--hd-highlight: #3acac6;
|
|
343
|
-
--hd-on-highlight: #091122;
|
|
344
|
-
--hd-highlight-soft: #022d2c;
|
|
345
|
-
--hd-highlight-text: #7ddfdb;
|
|
346
343
|
--hd-focus: #82a8f7;
|
|
347
344
|
--hd-selection-bg: #24418d;
|
|
348
345
|
--hd-success-bg: #0b2b1a;
|
|
@@ -367,7 +364,7 @@
|
|
|
367
364
|
--hd-info-on-solid: #ffffff;
|
|
368
365
|
--hd-chart-1: #82a8f7;
|
|
369
366
|
--hd-chart-2: #f99884;
|
|
370
|
-
--hd-chart-3: #
|
|
367
|
+
--hd-chart-3: #3ad184;
|
|
371
368
|
--hd-chart-4: #f0af36;
|
|
372
369
|
--hd-chart-5: #f874bd;
|
|
373
370
|
--hd-chart-6: #c988f7;
|
|
@@ -377,6 +374,8 @@
|
|
|
377
374
|
--hd-band-line-strong: #5b7cce;
|
|
378
375
|
--hd-band-text: #ffffff;
|
|
379
376
|
--hd-band-text-2: #bfd2f3;
|
|
377
|
+
--hd-band-focus: #ffffff;
|
|
378
|
+
--hd-band-edge: #213b86;
|
|
380
379
|
|
|
381
380
|
/* Elevation */
|
|
382
381
|
--hd-shadow-color: 0 0 0;
|
|
@@ -385,6 +384,22 @@
|
|
|
385
384
|
--hd-shadow-2: 0 1px 2px rgb(0 0 0 / 0.45), 0 12px 32px -12px rgb(0 0 0 / 0.9);
|
|
386
385
|
--hd-shadow-3: 0 2px 4px rgb(0 0 0 / 0.45), 0 24px 56px -16px rgb(0 0 0 / 0.9);
|
|
387
386
|
--hd-scrim: rgb(4 8 19 / 0.64);
|
|
387
|
+
|
|
388
|
+
/* Brand band imagery */
|
|
389
|
+
--hd-band-gradient-from: #091b64;
|
|
390
|
+
--hd-band-gradient-to: #060f3e;
|
|
391
|
+
--hd-band-gradient-hold: 55%;
|
|
392
|
+
--hd-band-glow: #2661fa;
|
|
393
|
+
--hd-band-glow-alpha: 0.5;
|
|
394
|
+
--hd-band-dot: #5b7cce;
|
|
395
|
+
--hd-band-dot-alpha: 0.7;
|
|
396
|
+
--hd-band-dot-cell: 22px;
|
|
397
|
+
--hd-band-dot-radius: 1.6px;
|
|
398
|
+
--hd-band-blueprint-from: #213b86;
|
|
399
|
+
--hd-band-blueprint-to: #091b64;
|
|
400
|
+
--hd-band-blueprint-hold: 60%;
|
|
401
|
+
--hd-band-blueprint-stroke: #5b7cce;
|
|
402
|
+
--hd-band-accent-glow: 0 8px 24px -10px rgb(251 96 65 / 0.45);
|
|
388
403
|
}
|
|
389
404
|
}
|
|
390
405
|
|
|
@@ -420,10 +435,6 @@
|
|
|
420
435
|
--hd-on-accent: #091122;
|
|
421
436
|
--hd-accent-soft: #3f1a12;
|
|
422
437
|
--hd-accent-text: #f9bdb0;
|
|
423
|
-
--hd-highlight: #3acac6;
|
|
424
|
-
--hd-on-highlight: #091122;
|
|
425
|
-
--hd-highlight-soft: #022d2c;
|
|
426
|
-
--hd-highlight-text: #7ddfdb;
|
|
427
438
|
--hd-focus: #82a8f7;
|
|
428
439
|
--hd-selection-bg: #24418d;
|
|
429
440
|
--hd-success-bg: #0b2b1a;
|
|
@@ -448,7 +459,7 @@
|
|
|
448
459
|
--hd-info-on-solid: #ffffff;
|
|
449
460
|
--hd-chart-1: #82a8f7;
|
|
450
461
|
--hd-chart-2: #f99884;
|
|
451
|
-
--hd-chart-3: #
|
|
462
|
+
--hd-chart-3: #3ad184;
|
|
452
463
|
--hd-chart-4: #f0af36;
|
|
453
464
|
--hd-chart-5: #f874bd;
|
|
454
465
|
--hd-chart-6: #c988f7;
|
|
@@ -458,6 +469,8 @@
|
|
|
458
469
|
--hd-band-line-strong: #5b7cce;
|
|
459
470
|
--hd-band-text: #ffffff;
|
|
460
471
|
--hd-band-text-2: #bfd2f3;
|
|
472
|
+
--hd-band-focus: #ffffff;
|
|
473
|
+
--hd-band-edge: #213b86;
|
|
461
474
|
|
|
462
475
|
/* Elevation */
|
|
463
476
|
--hd-shadow-color: 0 0 0;
|
|
@@ -466,6 +479,22 @@
|
|
|
466
479
|
--hd-shadow-2: 0 1px 2px rgb(0 0 0 / 0.45), 0 12px 32px -12px rgb(0 0 0 / 0.9);
|
|
467
480
|
--hd-shadow-3: 0 2px 4px rgb(0 0 0 / 0.45), 0 24px 56px -16px rgb(0 0 0 / 0.9);
|
|
468
481
|
--hd-scrim: rgb(4 8 19 / 0.64);
|
|
482
|
+
|
|
483
|
+
/* Brand band imagery */
|
|
484
|
+
--hd-band-gradient-from: #091b64;
|
|
485
|
+
--hd-band-gradient-to: #060f3e;
|
|
486
|
+
--hd-band-gradient-hold: 55%;
|
|
487
|
+
--hd-band-glow: #2661fa;
|
|
488
|
+
--hd-band-glow-alpha: 0.5;
|
|
489
|
+
--hd-band-dot: #5b7cce;
|
|
490
|
+
--hd-band-dot-alpha: 0.7;
|
|
491
|
+
--hd-band-dot-cell: 22px;
|
|
492
|
+
--hd-band-dot-radius: 1.6px;
|
|
493
|
+
--hd-band-blueprint-from: #213b86;
|
|
494
|
+
--hd-band-blueprint-to: #091b64;
|
|
495
|
+
--hd-band-blueprint-hold: 60%;
|
|
496
|
+
--hd-band-blueprint-stroke: #5b7cce;
|
|
497
|
+
--hd-band-accent-glow: 0 8px 24px -10px rgb(251 96 65 / 0.45);
|
|
469
498
|
}
|
|
470
499
|
|
|
471
500
|
@media (prefers-reduced-motion: reduce) {
|
package/build/design/tokens.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"hues": {
|
|
6
6
|
"cobalt": 264,
|
|
7
7
|
"coral": 33,
|
|
8
|
-
"turquoise": 192,
|
|
9
8
|
"success": 156,
|
|
10
9
|
"warning": 78,
|
|
11
10
|
"danger": 14,
|
|
@@ -39,19 +38,6 @@
|
|
|
39
38
|
"900": "#5d190c",
|
|
40
39
|
"950": "#380e06"
|
|
41
40
|
},
|
|
42
|
-
"turquoise": {
|
|
43
|
-
"50": "#edfaf9",
|
|
44
|
-
"100": "#d5f4f2",
|
|
45
|
-
"200": "#aeedea",
|
|
46
|
-
"300": "#7ddfdb",
|
|
47
|
-
"400": "#3acac6",
|
|
48
|
-
"500": "#20aca8",
|
|
49
|
-
"600": "#158e8a",
|
|
50
|
-
"700": "#157371",
|
|
51
|
-
"800": "#135553",
|
|
52
|
-
"900": "#0f3b3a",
|
|
53
|
-
"950": "#082322"
|
|
54
|
-
},
|
|
55
41
|
"success": {
|
|
56
42
|
"50": "#effaf3",
|
|
57
43
|
"100": "#dbf4e3",
|
|
@@ -162,10 +148,6 @@
|
|
|
162
148
|
"on-accent": "#091122",
|
|
163
149
|
"accent-soft": "#fdf5f2",
|
|
164
150
|
"accent-text": "#b72e11",
|
|
165
|
-
"highlight": "#20aca8",
|
|
166
|
-
"on-highlight": "#091122",
|
|
167
|
-
"highlight-soft": "#edfaf9",
|
|
168
|
-
"highlight-text": "#157371",
|
|
169
151
|
"focus": "#5487fa",
|
|
170
152
|
"selection-bg": "#cfddf9",
|
|
171
153
|
"success-bg": "#effaf3",
|
|
@@ -190,7 +172,7 @@
|
|
|
190
172
|
"info-on-solid": "#ffffff",
|
|
191
173
|
"chart-1": "#2661fa",
|
|
192
174
|
"chart-2": "#e03611",
|
|
193
|
-
"chart-3": "#
|
|
175
|
+
"chart-3": "#159358",
|
|
194
176
|
"chart-4": "#ad7a13",
|
|
195
177
|
"chart-5": "#c71589",
|
|
196
178
|
"chart-6": "#a217e4",
|
|
@@ -199,7 +181,9 @@
|
|
|
199
181
|
"band-line": "#213b86",
|
|
200
182
|
"band-line-strong": "#5b7cce",
|
|
201
183
|
"band-text": "#ffffff",
|
|
202
|
-
"band-text-2": "#bfd2f3"
|
|
184
|
+
"band-text-2": "#bfd2f3",
|
|
185
|
+
"band-focus": "#ffffff",
|
|
186
|
+
"band-edge": "#091b64"
|
|
203
187
|
},
|
|
204
188
|
"dark": {
|
|
205
189
|
"bg-page": "#080e1b",
|
|
@@ -229,10 +213,6 @@
|
|
|
229
213
|
"on-accent": "#091122",
|
|
230
214
|
"accent-soft": "#3f1a12",
|
|
231
215
|
"accent-text": "#f9bdb0",
|
|
232
|
-
"highlight": "#3acac6",
|
|
233
|
-
"on-highlight": "#091122",
|
|
234
|
-
"highlight-soft": "#022d2c",
|
|
235
|
-
"highlight-text": "#7ddfdb",
|
|
236
216
|
"focus": "#82a8f7",
|
|
237
217
|
"selection-bg": "#24418d",
|
|
238
218
|
"success-bg": "#0b2b1a",
|
|
@@ -257,7 +237,7 @@
|
|
|
257
237
|
"info-on-solid": "#ffffff",
|
|
258
238
|
"chart-1": "#82a8f7",
|
|
259
239
|
"chart-2": "#f99884",
|
|
260
|
-
"chart-3": "#
|
|
240
|
+
"chart-3": "#3ad184",
|
|
261
241
|
"chart-4": "#f0af36",
|
|
262
242
|
"chart-5": "#f874bd",
|
|
263
243
|
"chart-6": "#c988f7",
|
|
@@ -266,7 +246,9 @@
|
|
|
266
246
|
"band-line": "#213b86",
|
|
267
247
|
"band-line-strong": "#5b7cce",
|
|
268
248
|
"band-text": "#ffffff",
|
|
269
|
-
"band-text-2": "#bfd2f3"
|
|
249
|
+
"band-text-2": "#bfd2f3",
|
|
250
|
+
"band-focus": "#ffffff",
|
|
251
|
+
"band-edge": "#213b86"
|
|
270
252
|
}
|
|
271
253
|
},
|
|
272
254
|
"effects": {
|
|
@@ -276,7 +258,21 @@
|
|
|
276
258
|
"shadow-1": "0 1px 2px rgb(15 23 60 / 0.1)",
|
|
277
259
|
"shadow-2": "0 1px 2px rgb(15 23 60 / 0.1), 0 12px 32px -12px rgb(15 23 60 / 0.2)",
|
|
278
260
|
"shadow-3": "0 2px 4px rgb(15 23 60 / 0.1), 0 24px 56px -16px rgb(15 23 60 / 0.3)",
|
|
279
|
-
"scrim": "rgb(9 17 34 / 0.48)"
|
|
261
|
+
"scrim": "rgb(9 17 34 / 0.48)",
|
|
262
|
+
"band-gradient-from": "#091b64",
|
|
263
|
+
"band-gradient-to": "#060f3e",
|
|
264
|
+
"band-gradient-hold": "55%",
|
|
265
|
+
"band-glow": "#2661fa",
|
|
266
|
+
"band-glow-alpha": "0.5",
|
|
267
|
+
"band-dot": "#5b7cce",
|
|
268
|
+
"band-dot-alpha": "0.7",
|
|
269
|
+
"band-dot-cell": "22px",
|
|
270
|
+
"band-dot-radius": "1.6px",
|
|
271
|
+
"band-blueprint-from": "#213b86",
|
|
272
|
+
"band-blueprint-to": "#091b64",
|
|
273
|
+
"band-blueprint-hold": "60%",
|
|
274
|
+
"band-blueprint-stroke": "#5b7cce",
|
|
275
|
+
"band-accent-glow": "0 8px 24px -10px rgb(251 96 65 / 0.45)"
|
|
280
276
|
},
|
|
281
277
|
"dark": {
|
|
282
278
|
"shadow-color": "0 0 0",
|
|
@@ -284,7 +280,21 @@
|
|
|
284
280
|
"shadow-1": "0 1px 2px rgb(0 0 0 / 0.45)",
|
|
285
281
|
"shadow-2": "0 1px 2px rgb(0 0 0 / 0.45), 0 12px 32px -12px rgb(0 0 0 / 0.9)",
|
|
286
282
|
"shadow-3": "0 2px 4px rgb(0 0 0 / 0.45), 0 24px 56px -16px rgb(0 0 0 / 0.9)",
|
|
287
|
-
"scrim": "rgb(4 8 19 / 0.64)"
|
|
283
|
+
"scrim": "rgb(4 8 19 / 0.64)",
|
|
284
|
+
"band-gradient-from": "#091b64",
|
|
285
|
+
"band-gradient-to": "#060f3e",
|
|
286
|
+
"band-gradient-hold": "55%",
|
|
287
|
+
"band-glow": "#2661fa",
|
|
288
|
+
"band-glow-alpha": "0.5",
|
|
289
|
+
"band-dot": "#5b7cce",
|
|
290
|
+
"band-dot-alpha": "0.7",
|
|
291
|
+
"band-dot-cell": "22px",
|
|
292
|
+
"band-dot-radius": "1.6px",
|
|
293
|
+
"band-blueprint-from": "#213b86",
|
|
294
|
+
"band-blueprint-to": "#091b64",
|
|
295
|
+
"band-blueprint-hold": "60%",
|
|
296
|
+
"band-blueprint-stroke": "#5b7cce",
|
|
297
|
+
"band-accent-glow": "0 8px 24px -10px rgb(251 96 65 / 0.45)"
|
|
288
298
|
}
|
|
289
299
|
},
|
|
290
300
|
"effectValues": {
|
|
@@ -339,6 +349,55 @@
|
|
|
339
349
|
"scrim": {
|
|
340
350
|
"color": "#091122",
|
|
341
351
|
"alpha": 0.48
|
|
352
|
+
},
|
|
353
|
+
"band": {
|
|
354
|
+
"gradient": [
|
|
355
|
+
{
|
|
356
|
+
"offset": 0,
|
|
357
|
+
"color": "#091b64"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"offset": 0.55,
|
|
361
|
+
"color": "#091b64"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"offset": 1,
|
|
365
|
+
"color": "#060f3e"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"glow": {
|
|
369
|
+
"color": "#2661fa",
|
|
370
|
+
"alpha": 0.5
|
|
371
|
+
},
|
|
372
|
+
"dots": {
|
|
373
|
+
"color": "#5b7cce",
|
|
374
|
+
"alpha": 0.7,
|
|
375
|
+
"cell": 22,
|
|
376
|
+
"radius": 1.6
|
|
377
|
+
},
|
|
378
|
+
"blueprint": {
|
|
379
|
+
"fill": [
|
|
380
|
+
{
|
|
381
|
+
"offset": 0,
|
|
382
|
+
"color": "#213b86"
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"offset": 0.6,
|
|
386
|
+
"color": "#091b64"
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"stroke": "#5b7cce"
|
|
390
|
+
},
|
|
391
|
+
"accentGlow": {
|
|
392
|
+
"color": "#fb6041",
|
|
393
|
+
"layer": {
|
|
394
|
+
"x": 0,
|
|
395
|
+
"y": 8,
|
|
396
|
+
"blur": 24,
|
|
397
|
+
"spread": -10,
|
|
398
|
+
"alpha": 0.45
|
|
399
|
+
}
|
|
400
|
+
}
|
|
342
401
|
}
|
|
343
402
|
},
|
|
344
403
|
"dark": {
|
|
@@ -392,6 +451,55 @@
|
|
|
392
451
|
"scrim": {
|
|
393
452
|
"color": "#040813",
|
|
394
453
|
"alpha": 0.64
|
|
454
|
+
},
|
|
455
|
+
"band": {
|
|
456
|
+
"gradient": [
|
|
457
|
+
{
|
|
458
|
+
"offset": 0,
|
|
459
|
+
"color": "#091b64"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"offset": 0.55,
|
|
463
|
+
"color": "#091b64"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"offset": 1,
|
|
467
|
+
"color": "#060f3e"
|
|
468
|
+
}
|
|
469
|
+
],
|
|
470
|
+
"glow": {
|
|
471
|
+
"color": "#2661fa",
|
|
472
|
+
"alpha": 0.5
|
|
473
|
+
},
|
|
474
|
+
"dots": {
|
|
475
|
+
"color": "#5b7cce",
|
|
476
|
+
"alpha": 0.7,
|
|
477
|
+
"cell": 22,
|
|
478
|
+
"radius": 1.6
|
|
479
|
+
},
|
|
480
|
+
"blueprint": {
|
|
481
|
+
"fill": [
|
|
482
|
+
{
|
|
483
|
+
"offset": 0,
|
|
484
|
+
"color": "#213b86"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"offset": 0.6,
|
|
488
|
+
"color": "#091b64"
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
"stroke": "#5b7cce"
|
|
492
|
+
},
|
|
493
|
+
"accentGlow": {
|
|
494
|
+
"color": "#fb6041",
|
|
495
|
+
"layer": {
|
|
496
|
+
"x": 0,
|
|
497
|
+
"y": 8,
|
|
498
|
+
"blur": 24,
|
|
499
|
+
"spread": -10,
|
|
500
|
+
"alpha": 0.45
|
|
501
|
+
}
|
|
502
|
+
}
|
|
395
503
|
}
|
|
396
504
|
}
|
|
397
505
|
},
|