@dqa-ai-solutions/ui-runtime 0.0.0-stage → 0.2.1
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 +49 -2
- package/dist/_types/ui-kit/index.d.ts +4 -0
- package/dist/_types/ui-kit/lens/action.d.ts +76 -0
- package/dist/_types/ui-kit/lens/cell.d.ts +79 -0
- package/dist/_types/ui-kit/lens/diagnostic.d.ts +49 -0
- package/dist/_types/ui-kit/lens/format.d.ts +32 -0
- package/dist/_types/ui-kit/lens/index.d.ts +12 -0
- package/dist/_types/ui-kit/lens/list.d.ts +223 -0
- package/dist/_types/ui-kit/lens/milestone.d.ts +112 -0
- package/dist/_types/ui-kit/lens/pattern.d.ts +38 -0
- package/dist/_types/ui-kit/lens/queue.d.ts +30 -0
- package/dist/_types/ui-kit/lens/record.d.ts +110 -0
- package/dist/_types/ui-kit/lens/registry.d.ts +9 -0
- package/dist/_types/ui-kit/lens/shape.d.ts +27 -0
- package/dist/_types/ui-kit/lens/timeline.d.ts +36 -0
- package/dist/_types/ui-kit/primitives/action.d.ts +263 -0
- package/dist/_types/ui-kit/primitives/component-css.d.ts +10 -0
- package/dist/_types/ui-kit/primitives/index.d.ts +5 -0
- package/dist/_types/ui-kit/primitives/spec.d.ts +102 -0
- package/dist/_types/ui-kit/primitives/state.d.ts +148 -0
- package/dist/_types/ui-kit/primitives/stylesheet.d.ts +37 -0
- package/dist/_types/ui-kit/shell/index.d.ts +2 -0
- package/dist/_types/ui-kit/shell/nav.d.ts +142 -0
- package/dist/_types/ui-kit/shell/trail.d.ts +85 -0
- package/dist/_types/ui-kit/tokens/emit.d.ts +70 -0
- package/dist/_types/ui-kit/tokens/index.d.ts +6 -0
- package/dist/_types/ui-kit/tokens/oklch.d.ts +53 -0
- package/dist/_types/ui-kit/tokens/resolve.d.ts +4 -0
- package/dist/_types/ui-kit/tokens/scales.d.ts +325 -0
- package/dist/_types/ui-kit/tokens/theme.dqa.d.ts +2 -0
- package/dist/_types/ui-kit/tokens/types.d.ts +252 -0
- package/dist/_types/ui-react/elements/action-bar.d.ts +32 -0
- package/dist/_types/ui-react/elements/action-scope.d.ts +9 -0
- package/dist/_types/ui-react/elements/button.d.ts +42 -0
- package/dist/_types/ui-react/elements/choice.d.ts +40 -0
- package/dist/_types/ui-react/elements/columns.d.ts +82 -0
- package/dist/_types/ui-react/elements/dialog-scope.d.ts +15 -0
- package/dist/_types/ui-react/elements/dialog.d.ts +67 -0
- package/dist/_types/ui-react/elements/disclosure.d.ts +305 -0
- package/dist/_types/ui-react/elements/field-attributes.d.ts +39 -0
- package/dist/_types/ui-react/elements/field.d.ts +628 -0
- package/dist/_types/ui-react/elements/file.d.ts +82 -0
- package/dist/_types/ui-react/elements/filter.d.ts +61 -0
- package/dist/_types/ui-react/elements/link.d.ts +38 -0
- package/dist/_types/ui-react/elements/menu.d.ts +56 -0
- package/dist/_types/ui-react/elements/milestone.d.ts +119 -0
- package/dist/_types/ui-react/elements/nav.d.ts +73 -0
- package/dist/_types/ui-react/elements/pop.d.ts +14 -0
- package/dist/_types/ui-react/elements/record.d.ts +174 -0
- package/dist/_types/ui-react/elements/segmented.d.ts +59 -0
- package/dist/_types/ui-react/elements/suggest.d.ts +11 -0
- package/dist/_types/ui-react/elements/surface.d.ts +354 -0
- package/dist/_types/ui-react/elements/table.d.ts +72 -0
- package/dist/_types/ui-react/elements/toast.d.ts +69 -0
- package/dist/_types/ui-react/index.d.ts +22 -0
- package/dist/_types/ui-react/prefix/index.d.ts +8 -0
- package/dist/chunks/chunk-5NTG4J62.js +11 -0
- package/dist/chunks/chunk-66DQVLFK.js +5 -0
- package/dist/chunks/chunk-7WHYHIUX.js +1 -0
- package/dist/chunks/chunk-JOIDPECM.js +3 -0
- package/dist/chunks/chunk-MS2W22ER.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/kit.css +2291 -0
- package/dist/lens.d.ts +1 -0
- package/dist/lens.js +1 -0
- package/dist/primitives.d.ts +1 -0
- package/dist/primitives.js +1 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +1 -0
- package/dist/shell.d.ts +1 -0
- package/dist/shell.js +1 -0
- package/dist/tokens.css +160 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/tokens.dark.css +98 -0
- package/dist/tokens.generated.css +98 -0
- package/dist/tokens.high.css +98 -0
- package/dist/tokens.js +1 -0
- package/package.json +61 -4
package/dist/lens.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './_types/ui-kit/lens/index.js';
|
package/dist/lens.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"./chunks/chunk-MS2W22ER.js";import"./chunks/chunk-5NTG4J62.js";import"./chunks/chunk-66DQVLFK.js";export{f as ABSENT,r as LONG_TEXT,x as NO_BLOCKS,n as actionButtons,l as actionFacts,j as actionForm,k as availableActions,a as cellOf,b as defectsOf,c as errorsIn,p as fieldsOf,d as formatLensDiagnostics,o as formatter,i as listModel,u as milestoneModel,g as planColumns,w as presentationOf,s as queueModel,m as readValue,y as readersOf,q as recordModel,t as registryOf,h as subjectOf,v as timelineModel,z as undeterminedIn,e as writeValue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './_types/ui-kit/primitives/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u}from"./chunks/chunk-5NTG4J62.js";import"./chunks/chunk-66DQVLFK.js";export{k as SURFACES,l as TEXT_ROLES,b as TIER_PAINT,t as VISIBLE_SECONDARY,a as actionBar,p as actionViews,f as assertNever,d as buttonSpec,q as emitBaseCss,n as emitComponentCss,s as emitLayoutCss,u as emitStylesheet,g as fieldSpec,x as inSightCount,e as matchState,j as menuItemSpec,m as primaryOf,o as skeletonFor,r as surfaceState,h as tabSpec,i as tableSpec,c as textSpec};
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './_types/ui-react/index.js';
|
package/dist/react.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as Ne}from"./chunks/chunk-5NTG4J62.js";import"./chunks/chunk-66DQVLFK.js";var ne="fos";function rt(e){if(!/^[a-z][a-z0-9-]*$/.test(e))throw new Error(`@dqa-ai-solutions/ui-react: prefix "${e}" is not a class stem (a-z, digits, dashes).`);ne=e}var ot=()=>ne,r=e=>`${ne}-${e}`,i=(...e)=>e.filter(Boolean).join(" ")||void 0;import{createElement as ke}from"react";function st({as:e,disabled:t,className:n,href:o,onClick:a,...c}){let l=i(r("link"),n);return t?ke("a",{...c,className:l,"aria-disabled":!0}):ke(e??"a",{...c,className:l,href:o,onClick:a})}import{createElement as re}from"react";var oe=e=>e?{"aria-invalid":!0}:{};function at({className:e,invalid:t,type:n="text",...o}){return re("input",{...o,type:n,className:i(r("field"),e),...oe(t)})}function it({className:e,invalid:t,children:n,...o}){return re("select",{...o,className:i(r("select"),e),...oe(t)},n)}function lt({className:e,invalid:t,...n}){return re("textarea",{...n,className:i(r("textarea"),e),...oe(t)})}var ct=/^(\.[A-Za-z0-9]+|[a-z]+\/(\*|[A-Za-z0-9.+-]+))$/,se=e=>(Array.isArray(e)?e.map(String):typeof e=="string"?e.split(","):[]).map(t=>t.trim()).filter(Boolean);function ut(e,t){let n={};if(!t)return n;if(e==="file")return t.accept?.length&&(n.accept=t.accept.join(",")),t.maxBytes!==void 0&&(n.maxBytes=t.maxBytes),n;if(e==="number"){let o=t.multipleOf;o!==void 0&&(n.step=o);let a=[t.minimum,t.exclusiveMinimum!==void 0?o!==void 0?t.exclusiveMinimum+o:t.exclusiveMinimum:void 0].filter(l=>l!==void 0);a.length&&(n.min=Math.max(...a));let c=[t.maximum,t.exclusiveMaximum!==void 0?o!==void 0?t.exclusiveMaximum-o:t.exclusiveMaximum:void 0].filter(l=>l!==void 0);return c.length&&(n.max=Math.min(...c)),n}if(e==="date"||e==="datetime"){let o=a=>e==="date"?a.slice(0,10):a.length===10?`${a}T00:00`:a.replace(" ","T").slice(0,16);return t.formatMinimum!==void 0&&(n.min=o(t.formatMinimum)),t.formatMaximum!==void 0&&(n.max=o(t.formatMaximum)),n}return e.endsWith("[]")?(t.maxItems!==void 0&&t.maxLength!==void 0&&(n.maxLength=t.maxItems*(t.maxLength+1)-1),n):(t.maxLength!==void 0&&(n.maxLength=t.maxLength),t.minLength!==void 0&&(n.minLength=t.minLength),t.pattern!==void 0&&(n.pattern=t.pattern),n)}import{jsx as P,jsxs as mt}from"react/jsx-runtime";import{useId as dt,useRef as ft,useState as ae}from"react";function we(e,t,n){if(n!==void 0&&e.size>n)return{keyword:"maxBytes",limit:n,file:e};let o=se(t);if(o.length){let a=e.name.toLowerCase(),c=(e.type??"").toLowerCase();if(!o.some(p=>{let m=p.toLowerCase();return m.startsWith(".")?a.endsWith(m):m.endsWith("/*")?c!==""&&c.startsWith(m.slice(0,-1)):c===m}))return{keyword:"accept",limit:o,file:e}}return null}function pt({main:e,chosenMain:t,hint:n,chosenHint:o,clearLabel:a,mark:c,chosenMark:l,onPick:p,maxBytes:m,refused:d,onRefuse:w,invalid:j,className:E,id:u,disabled:b,...N}){let h=dt(),S=u??`file-${h}`,f=ft(null),[s,g]=ae(null),[x,y]=ae(null),[k,v]=ae(!1),T=D=>{y(null),g(D),p?.(D)},O=D=>{let A=we(D,N.accept,m);return A?(f.current&&(f.current.value=""),s&&p?.(null),g(null),y(A),w?.(A),!1):!0},tt=D=>{if(D.preventDefault(),v(!1),b)return;let A=D.dataTransfer?.files?.[0];if(!A||!f.current||!O(A))return;let ve=new DataTransfer;ve.items.add(A),f.current.files=ve.files,T(A)},nt=D=>{D.preventDefault(),D.stopPropagation(),f.current&&(f.current.value=""),T(null)},ye=x&&d?d(x):s?o??n:n;return mt("label",{className:i(r("file"),s&&r("file--has"),k&&r("file--over"),E),htmlFor:S,...j||x?{"aria-invalid":!0}:{},onDragOver:D=>{D.preventDefault(),b||v(!0)},onDragLeave:()=>v(!1),onDrop:tt,children:[P("input",{...N,ref:f,id:S,type:"file",disabled:b,onChange:D=>{let A=D.target.files?.[0]??null;A&&!O(A)||T(A)}}),P("span",{className:r("file-mark"),"aria-hidden":"true",children:s?l??c:c}),P("span",{className:r("file-main"),children:s?t?.(s)??s.name:e}),ye!=null&&P("span",{className:r("file-hint"),...x?{role:"alert"}:{},children:ye}),s&&a!=null&&P("button",{type:"button",className:i(r("btn"),r("btn--normal"),r("file-clear")),onClick:nt,children:a})]})}var xt=e=>e>=1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${Math.ceil(e/1024)} KB`;import{createElement as je}from"react";var Ee=(e,t)=>function({children:o,className:a,...c}){return je("label",{className:i(r(e),a)},je("input",{...c,type:t}),o)},ht=Ee("check","checkbox"),bt=Ee("radio","radio");import{createElement as Ce}from"react";function gt({summary:e,children:t,summaryClassName:n,className:o,...a}){return Ce("details",{...a,className:o},Ce("summary",{className:i(r("disclosure"),n)},e),t)}import{jsx as Z,jsxs as yt}from"react/jsx-runtime";import{createElement as Te}from"react";function vt({tone:e,className:t,children:n,...o}){return n==null||n===!1||n===""?null:Z("div",{...o,className:i(r("notice"),e&&r(`notice--${e}`),t),children:n})}function Nt({compact:e,as:t="div",className:n,children:o,...a}){return Te(t,{...a,className:i(r("empty"),e&&r("empty--compact"),n)},o)}function kt({lines:e=3,label:t,className:n,...o}){return yt("div",{...o,role:"status","aria-live":"polite","aria-busy":"true",className:n,children:[Z("span",{className:r("sr-only"),children:t}),Array.from({length:e},(a,c)=>Z("div",{className:r("skeleton"),"aria-hidden":"true"},c))]})}function wt({label:e,decorative:t,className:n,children:o,...a}){return Z("svg",{...a,className:i(r("icon"),n),...t?{"aria-hidden":!0,focusable:"false"}:{role:"img","aria-label":e},children:o})}var jt=({children:e})=>Te("span",{className:r("sr-only")},e);import{jsx as z,jsxs as Oe}from"react/jsx-runtime";import{useEffect as R,useId as Bt,useRef as ue}from"react";import{jsx as $,jsxs as Se}from"react/jsx-runtime";import{useEffect as Tt,useId as Dt,useSyncExternalStore as Ae}from"react";import{Fragment as Et,jsxs as Ct}from"react/jsx-runtime";import{createElement as De}from"react";function L(e){let{tier:t="normal",type:n="button",icon:o,busy:a,as:c,className:l,children:p,label:m,...d}=e,w=p==null,j=i(r("btn"),r(`btn--${t}`),w&&r("btn--icon"),l),E={...d,className:j,...m?{"aria-label":m,title:d.title??m}:{},...a?{"aria-busy":!0,disabled:!0}:{},children:Ct(Et,{children:[o,p]})};return c?De(c,E):De("button",{...E,type:n})}var St=0,M=[],Q=!1,q=[],le=null,B=new Map,ie=new Set,Me={items:M,top:void 0,labels:le},H=()=>{Me={items:M,top:q[q.length-1],labels:le};for(let e of ie)e()},Le=e=>(ie.add(e),()=>{ie.delete(e)}),X=()=>Me,Ie=e=>{e.ms<=0||Q||(e.since=Date.now(),B.set(e.id,setTimeout(()=>K(e.id),e.left)))};function At(e,t={}){let n=t.tone??"done",o=t.ms??(n==="stop"||n==="warn"?0:5e3),a={id:++St,tone:n,title:e,detail:t.detail,ms:o,left:o,since:0},c=M.find(l=>l.tone===n&&typeof l.title=="string"&&l.title===e);return c&&K(c.id),M=[...M,a],Ie(a),H(),a.id}function K(e){let t=B.get(e);t&&clearTimeout(t),B.delete(e),M.some(n=>n.id===e)&&(M=M.filter(n=>n.id!==e),H())}function Mt(){for(let e of B.values())clearTimeout(e);B.clear(),Q=!1,M.length&&(M=[],H())}var V=e=>{if(Q!==e){Q=e;for(let t of M)if(!(t.ms<=0))if(e){let n=B.get(t.id);n&&(clearTimeout(n),B.delete(t.id),t.left=Math.max(800,t.left-(Date.now()-t.since)))}else Ie(t)}};function _e(){let e=Dt();return Tt(()=>(q.push(e),H(),()=>{let n=q.lastIndexOf(e);n>=0&&q.splice(n,1),H()}),[e]),Ae(Le,X,X).top===e}function Be(){let e=Ae(Le,X,X);if(!e.items.length||!e.labels)return null;let{label:t,closeLabel:n,closeIcon:o}=e.labels;return $("section",{"aria-label":t,className:r("toasts"),onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onFocus:()=>V(!0),onBlur:()=>V(!1),children:e.items.map(a=>Se("div",{role:a.tone==="stop"?"alert":"status",className:i(r("toast"),r(`toast--${a.tone}`)),children:[Se("div",{className:r("toast-body"),children:[$("span",{children:a.title}),a.detail!=null&&$("span",{className:r("hint"),children:a.detail})]}),$(L,{tier:"quiet",icon:o,label:n,onClick:()=>K(a.id)})]},a.id))})}function Lt({label:e,closeLabel:t,closeIcon:n}){return le={label:e,closeLabel:t,closeIcon:n},_e()?$(Be,{}):null}function Fe(){return _e()?$(Be,{}):null}import{createContext as It,useContext as _t}from"react";var ce=It(null),$e=()=>_t(ce);var Ft='input:not([type="hidden"]):not(:disabled), select:not(:disabled), textarea:not(:disabled)';function $t({open:e,onClose:t,onGuard:n,isDirty:o,dirtyWithin:a,autoFocusWithin:c,className:l,children:p,...m}){let d=ue(null),w=ue(!1),j=()=>o?o():w.current,E=()=>{j()&&n?n():t()};return R(()=>{let u=d.current;if(u){if(e&&!u.open){u.showModal();let N=(c?u.querySelector(c):u)?.querySelector(Ft);N?N.focus():u.focus()}!e&&u.open&&u.close(),e&&(w.current=!1)}},[e,c]),R(()=>{let u=d.current;if(!u||!e)return;let b=N=>{let h=N.target;(!a||h?.closest(a))&&(w.current=!0)};return u.addEventListener("input",b),u.addEventListener("change",b),()=>{u.removeEventListener("input",b),u.removeEventListener("change",b)}}),R(()=>{let u=d.current;if(!u)return;let b=N=>{j()&&n&&(N.preventDefault(),n())};return u.addEventListener("cancel",b),()=>u.removeEventListener("cancel",b)}),R(()=>{let u=d.current;if(!u)return;let b=()=>t();return u.addEventListener("close",b),()=>u.removeEventListener("close",b)}),e?z(ce.Provider,{value:{requestClose:E},children:Oe("dialog",{...m,ref:d,tabIndex:-1,className:i(r("dialog"),l),onClick:u=>{u.target===d.current&&E()},children:[typeof p=="function"?p({requestClose:E}):p,z(Fe,{})]})}):null}function Ot({className:e,children:t,...n}){return z("div",{...n,className:i(r("dialog-body"),e),children:t})}function Pt({title:e,closeLabel:t,closeIcon:n,closeDisabled:o,children:a,className:c}){let l=$e(),p=Bt(),m=ue(null);return R(()=>{let d=m.current?.closest("dialog");d&&!d.hasAttribute("aria-labelledby")&&!d.hasAttribute("aria-label")&&d.setAttribute("aria-labelledby",p)}),Oe("header",{ref:m,className:i(r("dialog-head"),c),children:[z("h2",{id:p,className:r("dialog-title"),children:e}),a,z(L,{tier:"quiet",icon:n,label:t,className:r("dialog-close"),disabled:o?!0:void 0,title:o||t,onClick:()=>l?.requestClose()})]})}import{jsx as me,jsxs as qt}from"react/jsx-runtime";import{useId as Ht,useState as Pe}from"react";var qe=e=>e.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/đ/g,"d");function Rt({value:e,onValue:t,options:n,max:o=8,className:a,invalid:c,...l}){let p=Ht(),[m,d]=Pe(!1),[w,j]=Pe(-1),E=qe(e??""),u=(n??[]).filter(f=>f!==e&&qe(f).includes(E)).slice(0,o),b=m&&u.length>0,N=()=>{d(!1),j(-1)},h=f=>{t(f),N()};function S(f){if(l.onKeyDown?.(f),!b){f.key==="ArrowDown"&&u.length&&(f.preventDefault(),d(!0),j(0));return}f.key==="ArrowDown"?(f.preventDefault(),j(s=>(s+1)%u.length)):f.key==="ArrowUp"?(f.preventDefault(),j(s=>(s-1+u.length)%u.length)):f.key==="Enter"&&w>=0?(f.preventDefault(),h(u[w])):f.key==="Escape"&&(f.preventDefault(),f.stopPropagation(),N())}return qt("span",{className:i(r("suggest"),a),children:[me("input",{...l,type:"text",className:r("field"),...c?{"aria-invalid":!0}:{},value:e,onChange:f=>{t(f.target.value),d(!0),j(-1)},onFocus:f=>{l.onFocus?.(f),d(!0)},onBlur:f=>{l.onBlur?.(f),N()},onKeyDown:S,role:"combobox","aria-expanded":b,"aria-controls":b?p:void 0,"aria-activedescendant":w>=0?`${p}-${w}`:void 0,"aria-autocomplete":"list",autoComplete:"off"}),b&&me("ul",{id:p,role:"listbox",className:i(r("menu"),r("menu--pop")),children:u.map((f,s)=>me("li",{id:`${p}-${s}`,role:"option","aria-selected":s===w,className:r("menu-item"),onMouseDown:g=>g.preventDefault(),onClick:()=>h(f),children:f},f))})]})}import{jsx as de,Fragment as zt,jsxs as Ut}from"react/jsx-runtime";import{createElement as He}from"react";var fe=({label:e,className:t,children:n,...o})=>de("ul",{...o,role:"menu","aria-label":e,className:i(r("menu"),t),children:n});function pe({icon:e,current:t,as:n,className:o,children:a,...c}){let l=Ut(zt,{children:[e,a]}),p={...c,role:"menuitem",className:i(r("menu-item"),o),...t?{"aria-current":"page"}:{}};return de("li",{role:"none",children:n?He(n,p,l):He("button",{...p,type:"button"},l)})}var Wt=()=>de("li",{role:"separator"});import{jsx as I,jsxs as U,Fragment as Yt}from"react/jsx-runtime";import{useEffect as Zt,useId as Vt,useRef as ze}from"react";import{createContext as Jt,useContext as Rr}from"react";var Re=Jt(!1);var Je=["key","label","advances","outcome","exits","destroys","primary","busy","disabled","provisional"],Qt=new Set([...Je,"icon","onSelect","as","type","form"]),Ue=e=>Object.fromEntries(Object.entries(e).filter(([t])=>!Qt.has(t))),We=e=>e.disabled?[e.disabled.because,e.disabled.hint].filter(Boolean).join(" \u2014 "):null;function Xt({surface:e,label:t,moreIcon:n,moreLabel:o,actions:a,className:c}){let l=Vt(),p=ze(null),m=ze(!1),d=()=>typeof document>"u"?null:document.getElementById(l),w=a.filter(s=>!!s),j=new Map(w.map(s=>[s.key,s])),E=w.map(s=>{let g={};for(let x of Je)s[x]!==void 0&&(g[x]=s[x]);return s.icon!=null&&(g.icon=s.key),g}),u=Ne(E,{surface:e}),b=e!=="table";Zt(()=>{let s=d();if(!s)return;let g=y=>{if(y.newState!=="open")return;let k=document.querySelector(`[popovertarget="${CSS.escape(l)}"]`)?.getBoundingClientRect();if(!k)return;let v=k.bottom+4+s.offsetHeight<=window.innerHeight;s.style.top=`${v?k.bottom+4:Math.max(8,k.top-4-s.offsetHeight)}px`,s.style.left=`${Math.max(8,k.right-s.offsetWidth)}px`,m.current&&s.querySelector('[role="menuitem"]:not([disabled])')?.focus()},x=y=>{let k=Array.from(s.querySelectorAll('[role="menuitem"]:not([disabled])')),v=k.indexOf(document.activeElement);y.key==="ArrowDown"?(y.preventDefault(),k[(v+1)%k.length]?.focus()):y.key==="ArrowUp"&&(y.preventDefault(),k[(v-1+k.length)%k.length]?.focus())};return s.addEventListener("toggle",g),s.addEventListener("keydown",x),()=>{s.removeEventListener("toggle",g),s.removeEventListener("keydown",x)}},[l,u.menu.length]);let N=u.inline.some(s=>s.primary),h=[],S=u.inline.map(s=>{let g=j.get(s.key),x=We(s),y={...Ue(g),tier:s.tier,busy:s.busy,as:g.as,type:g.type,form:g.form,disabled:x?!0:void 0,title:x??void 0,"aria-describedby":x||s.provisional?`${l}-${s.key}`:void 0,onClick:g.onSelect},k=s.showLabel?I(L,{...y,icon:g.icon,children:s.label},s.key):I(L,{...y,icon:g.icon,label:s.label},s.key),v=x??s.provisional;return v?e==="table"?U("span",{className:r("actions"),children:[k,I("span",{id:`${l}-${s.key}`,className:r("sr-only"),children:v})]},s.key):(h.push({key:s.key,label:s.label,note:v,primary:s.primary}),k):k}),f=h.length>0&&I("ul",{className:r("actions-why"),children:h.map(s=>I("li",{id:`${l}-${s.key}`,className:r("hint"),children:h.length>1?`${s.label} \u2014 ${s.note}`:s.note},s.key))});return I(Re.Provider,{value:!0,children:U("div",{ref:p,role:"group","aria-label":t,className:i(r("actions"),h.length>0&&r("actions--noted"),c),"data-fos-primary":N?"":void 0,"data-fos-card":e==="card"?"":void 0,children:[S,u.menu.length>0&&U(Yt,{children:[I(L,{tier:"quiet",icon:n,...b&&o?{children:o,"aria-label":`${o}: ${t}`}:{label:t,className:r("btn--menu")},"aria-haspopup":"menu",popoverTarget:l,onPointerDown:()=>{m.current=!1},onKeyDown:s=>{["Enter"," ","ArrowDown","ArrowUp"].includes(s.key)&&(m.current=!0)}}),I(fe,{label:t,id:l,popover:"auto",style:{position:"fixed",inset:"auto",margin:0,maxHeight:"60vh",overflowY:"auto"},children:u.menu.map(s=>{let g=j.get(s.key),x=We(s);return U(pe,{...Ue(g),icon:g.icon,as:g.as,disabled:x||s.busy?!0:void 0,title:x??void 0,"data-tier":s.tier,onClick:()=>{d()?.hidePopover?.(),g.onSelect?.()},children:[s.label,x&&U("span",{className:r("hint"),children:[" \xB7 ",x]})]},s.key)})})]}),f]})})}import{jsx as Ze,Fragment as Kt,jsxs as Gt}from"react/jsx-runtime";import{createElement as Ye}from"react";var en=({label:e,className:t,children:n,...o})=>Ze("div",{...o,role:"group","aria-label":e,className:i(r("segmented"),t),children:n});function tn({icon:e,current:t,count:n,as:o,className:a,children:c,...l}){let p=Gt(Kt,{children:[e,c,n!=null&&Ze("span",{className:r("count"),children:n})]}),m=t?{"aria-current":"page"}:{},d=i(r("segmented-item"),a);return o?Ye(o,{...l,className:d,...m},p):Ye("button",{...l,type:"button",className:d,...m},p)}import{jsxs as ee,jsx as W}from"react/jsx-runtime";import{useEffect as nn,useId as rn,useRef as Ve,useState as xe}from"react";function G(e){let t=e?.getBoundingClientRect();return t?{up:window.innerHeight-t.bottom<240&&t.top>240,end:t.left>window.innerWidth/2}:{up:!1,end:!1}}function on({label:e,value:t,options:n,onPick:o,addLabel:a,clearLabel:c,clearIcon:l,className:p}){let[m,d]=xe(!1),[w,j]=xe(!1),[E,u]=xe(!1),b=Ve(null),N=Ve(null),h=rn(),S=n.find(s=>s.value===t&&s.value!=="");nn(()=>{if(!m){j(!1),u(!1);return}let s=G(N.current);j(s.up),u(s.end);let g=v=>{b.current?.contains(v.target)||d(!1)},x=v=>{let T=Array.from(b.current?.querySelectorAll('[role="option"]')??[]);if(!T.length)return;let O=T.indexOf(document.activeElement);if(v.key==="Escape"){d(!1),N.current?.focus();return}v.key==="ArrowDown"?(v.preventDefault(),T[(O+1)%T.length]?.focus()):v.key==="ArrowUp"?(v.preventDefault(),T[(O-1+T.length)%T.length]?.focus()):v.key==="Home"?(v.preventDefault(),T[0]?.focus()):v.key==="End"&&(v.preventDefault(),T[T.length-1]?.focus())},y=b.current?.querySelectorAll('[role="option"]');return(b.current?.querySelector('[aria-selected="true"]')??y?.[0])?.focus(),document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[m]);let f=s=>{d(!1),N.current?.focus(),o(s)};return ee("div",{className:i(r("menu-anchor"),p),ref:b,children:[S?ee("span",{className:r("actions"),children:[ee("button",{ref:N,type:"button",className:i(r("btn"),r("btn--normal")),"aria-haspopup":"listbox","aria-expanded":m,"aria-controls":m?h:void 0,onClick:()=>d(s=>!s),children:[e,": ",S.label]}),W("button",{type:"button",className:i(r("btn"),r("btn--quiet"),r("btn--icon")),"aria-label":c,onClick:()=>o(""),children:l??"\xD7"})]}):W("button",{ref:N,type:"button",className:i(r("btn"),r("btn--quiet")),"aria-haspopup":"listbox","aria-expanded":m,"aria-controls":m?h:void 0,onClick:()=>d(s=>!s),children:a}),m&&W("ul",{id:h,role:"listbox","aria-label":e,className:i(r("menu"),r("menu--pop"),w&&r("menu--pop-up"),E&&r("menu--pop-end")),children:n.map(s=>W("li",{role:"none",children:ee("button",{type:"button",role:"option","aria-selected":s.value===t,className:r("menu-item"),onClick:()=>f(s.value),children:[s.label,s.count!=null&&W("span",{className:r("count"),children:s.count})]})},s.value||"\xB7"))})]})}import{jsx as J,jsxs as te,Fragment as sn}from"react/jsx-runtime";import{useCallback as Qe,useEffect as an,useId as ln,useRef as Xe,useState as he}from"react";function cn({label:e,trigger:t,choices:n,visibility:o,onChange:a,resetLabel:c,customised:l,className:p}){let[m,d]=he(!1),[w,j]=he({up:!1,end:!1}),E=Xe(null),u=Xe(null),b=ln();an(()=>{if(!m){j({up:!1,end:!1});return}j(G(u.current));let h=()=>Array.from(E.current?.querySelectorAll('input[type="checkbox"]:not(:disabled)')??[]);h()[0]?.focus();let S=x=>{E.current?.contains(x.target)||d(!1)},f=x=>{if(x.key==="Escape"){d(!1),u.current?.focus();return}let y=h(),k=y.indexOf(document.activeElement);k<0||(x.key==="ArrowDown"?(x.preventDefault(),y[(k+1)%y.length]?.focus()):x.key==="ArrowUp"?(x.preventDefault(),y[(k-1+y.length)%y.length]?.focus()):x.key==="Home"?(x.preventDefault(),y[0]?.focus()):x.key==="End"&&(x.preventDefault(),y[y.length-1]?.focus()))},s=x=>{let y=x.relatedTarget;y&&!E.current?.contains(y)&&d(!1)},g=E.current;return document.addEventListener("mousedown",S),document.addEventListener("keydown",f),g?.addEventListener("focusout",s),()=>{document.removeEventListener("mousedown",S),document.removeEventListener("keydown",f),g?.removeEventListener("focusout",s)}},[m]);let N=h=>{h.locked||a({...o,[h.key]:!h.shown})};return te("div",{className:i(r("menu-anchor"),p),ref:E,children:[J("button",{ref:u,type:"button",className:i(r("btn"),r("btn--quiet")),"aria-expanded":m,"aria-controls":m?b:void 0,onClick:()=>d(h=>!h),children:t}),m&&te("div",{id:b,role:"group","aria-label":e,className:i(r("menu"),r("menu--pop"),w.up&&r("menu--pop-up"),w.end&&r("menu--pop-end")),children:[n.map(h=>te("label",{className:r("menu-item"),children:[J("input",{type:"checkbox",checked:h.shown||!!h.locked,disabled:h.locked,onChange:()=>N(h)}),h.label,h.hint!=null&&J("span",{className:r("count"),children:h.hint})]},h.key)),l&&c!=null&&te(sn,{children:[J("div",{role:"separator"}),J("button",{type:"button",className:r("menu-item"),onClick:()=>a({}),children:c})]})]})]})}function un(e){let t=Qe(()=>{if(!e)return{};try{let l=JSON.parse(globalThis.localStorage?.getItem(e)??"{}");return!l||typeof l!="object"||Array.isArray(l)?{}:Object.fromEntries(Object.entries(l).filter(([,p])=>typeof p=="boolean"))}catch{return{}}},[e]),[n,o]=he(()=>({key:e,value:t()})),a=n.key===e?n.value:t();n.key!==e&&o({key:e,value:a});let c=Qe(l=>{if(o({key:e,value:l}),!!e)try{Object.keys(l).length?globalThis.localStorage?.setItem(e,JSON.stringify(l)):globalThis.localStorage?.removeItem(e)}catch{}},[e]);return[a,c]}import{jsx as Ke,Fragment as mn,jsxs as dn}from"react/jsx-runtime";import{createElement as be}from"react";var fn=({label:e,className:t,children:n})=>Ke("div",{role:"tablist","aria-label":e,className:t,children:n});function pn({icon:e,current:t,count:n,as:o,className:a,children:c,...l}){let p=dn(mn,{children:[e,c,n!=null&&Ke("span",{className:r("count"),children:n})]}),m={role:"tab","aria-selected":!!t},d=i(r("tab"),a);return o?be(o,{...l,...m,className:d},p):be("button",{...l,...m,type:"button",className:d},p)}function xn({current:e,as:t,dense:n,className:o,children:a,...c}){let l=i(r("rail-item"),n&&r("rail-item--dense")),p=typeof o=="function"?m=>i(l,o(m)):i(l,o);return be(t??"a",{...c,className:p,...e?{"aria-current":"page"}:{}},a)}import{jsx as C,jsxs as hn}from"react/jsx-runtime";import{createContext as bn,useContext as gn}from"react";var Ge=bn(!1);function yn({sticky:e,wrap:t=!0,wrapClassName:n,className:o,children:a,...c}){let l=C("table",{...c,className:i(r("table"),e&&r("table--sticky"),o),children:a});return t?C("div",{className:i(r("table-wrap"),n),children:l}):l}var vn=({children:e,...t})=>C(Ge.Provider,{value:!0,children:C("thead",{...t,children:e})}),Nn=({children:e,...t})=>C("tbody",{...t,children:e}),kn=({selected:e,children:t,...n})=>C("tr",{...n,...e?{"aria-selected":!0}:{},children:t});function wn({numeric:e,className:t,children:n,...o}){let a=gn(Ge);return C("th",{...o,...a?{scope:"col"}:{},className:i(e&&r("num"),t),children:n})}function jn({lead:e,className:t,children:n,...o}){return C("th",{...o,scope:"row",className:t,children:hn("span",{className:r("row-head"),children:[C("span",{className:r("row-head-lead"),children:e}),C("span",{className:r("row-head-text"),children:n})]})})}var En=({numeric:e,className:t,children:n,...o})=>C("td",{...o,className:i(e&&r("num"),t),children:n});function Cn({label:e,cell:t=!0,className:n,...o}){let a=C("label",{className:i(r("pick"),!t&&n),children:C("input",{...o,type:"checkbox","aria-label":e})});return t?C("td",{className:i(r("pick-cell"),n),children:a}):a}var Tn=({open:e,label:t,className:n,children:o,...a})=>C("button",{...a,type:"button","aria-expanded":e,"aria-label":t,className:i(r("tree-toggle"),n),children:o});import{jsx as _,Fragment as Dn,jsxs as Sn}from"react/jsx-runtime";import{createElement as Y}from"react";var ge=e=>function({as:n,className:o,children:a,...c}){return Y(n??"div",{...c,className:i(r(e),o)},a)},An=ge("card"),Mn=ge("card-head"),Ln=ge("card-body");function In({stacked:e,className:t,children:n,...o}){return _("dl",{...o,className:i(r("facts"),e&&r("facts--stacked"),t),children:n})}function _n({name:e,children:t}){return Sn(Dn,{children:[_("dt",{children:e}),_("dd",{children:t})]})}function Bn({tone:e,className:t,children:n,label:o,...a}){let c=n==null||n===""||n===!1;return _("span",{...a,className:i(r("badge"),e&&r(`badge--${e}`),c&&r("badge--bare"),t),...o?{"aria-label":o,title:o}:{},children:n})}function Fn({as:e,className:t,children:n,...o}){return Y(e??"div",{...o,className:i(r("legend"),t)},n)}function $n({as:e,className:t,children:n,...o}){return Y(e??"span",{...o,className:i(r("count"),t)},n)}function On({as:e,className:t,children:n,...o}){return Y(e??"span",{...o,className:i(r("tag"),t)},n)}function Pn({value:e,max:t,tone:n,label:o,className:a,...c}){let l=t>0?Math.max(0,Math.min(1,e/t)):0;return _("div",{...c,className:i(r("meter"),n&&r(`meter--${n}`),a),role:"meter","aria-label":o,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,children:_("span",{style:{width:`${l*100}%`}})})}function qn({src:e,initials:t,label:n,imgProps:o,className:a,...c}){return _("span",{...c,className:i(r("avatar"),a),role:"img","aria-label":n,children:e?_("img",{...o,src:e,alt:""}):t})}function Hn({as:e,className:t,children:n,...o}){return Y(e??"div",{...o,className:i(r("provenance"),t)},n)}import{jsx as F,jsxs as et}from"react/jsx-runtime";function Rn({label:e,className:t,children:n,...o}){return F("div",{...o,className:i(r("milestones"),t),role:"group","aria-label":e,children:n})}function zn({label:e,standing:t,gate:n,awaiting:o,settled:a,who:c,mark:l,className:p,...m}){return et("div",{...m,className:i(r("milestone"),r(`milestone--${t}`),n&&r("milestone--gate"),o&&r("milestone--awaiting"),a&&r(`milestone--${a}`),p),"aria-current":t==="current"?"step":void 0,children:[F("span",{className:r("milestone-dot"),"aria-hidden":"true",children:l}),F("span",{className:r("milestone-label"),children:e}),c&&F("span",{className:r("milestone-who"),children:c})]})}function Un({className:e,children:t,...n}){return F("div",{...n,className:i(r("milestones-foot"),e),children:t})}function Wn({mark:e,className:t,children:n,...o}){return et("p",{...o,className:i(r("milestone-note"),t),children:[F("span",{"aria-hidden":"true",children:e}),F("span",{children:n})]})}export{ct as ACCEPT_ITEM,Xt as ActionBar,qn as Avatar,Bn as Badge,L as Button,An as Card,Ln as CardBody,Mn as CardHead,ht as Check,cn as ColumnPicker,$n as Count,$t as Dialog,Ot as DialogBody,Pt as DialogHead,gt as Disclosure,Nt as Empty,_n as Fact,In as Facts,at as Field,pt as FileField,on as FilterSelect,wt as Icon,Fn as Legend,st as Link,fe as Menu,pe as MenuItem,Wt as MenuSeparator,Pn as Meter,zn as Milestone,Wn as MilestoneNote,Rn as Milestones,Un as MilestonesFoot,vt as Notice,Cn as Pick,Hn as Provenance,bt as Radio,xn as RailItem,jn as RowHeader,en as Segmented,tn as SegmentedItem,it as Select,kt as Skeleton,jt as SrOnly,Rt as Suggest,Nn as TBody,vn as THead,pn as Tab,yn as Table,fn as Tabs,On as Tag,En as Td,lt as Textarea,wn as Th,Lt as Toaster,kn as Tr,Tn as TreeToggle,se as acceptItems,r as cls,i as cx,Mt as dismissAllToasts,K as dismissToast,ut as fieldAttributes,we as fileRefusal,xt as fileSize,ot as prefix,rt as setPrefix,At as toast,un as useColumnVisibility};
|
package/dist/shell.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './_types/ui-kit/shell/index.js';
|
package/dist/shell.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a}from"./chunks/chunk-7WHYHIUX.js";export{t as backOf,o as domainOf,f as emptyTrail,m as moveTrail,r as navModel,a as parseTrail,x as returnOf,e as routesOf,p as titleTrail};
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/* @dqa-ai-solutions/ui-kit — MỘT nguồn sự thật cho màu và nhịp của mọi giao diện FOS.
|
|
2
|
+
*
|
|
3
|
+
* Vì sao gói riêng, không copy-paste: hai app nằm ở hai repo khác nhau. Hai bảng màu chép tay
|
|
4
|
+
* thì chắc chắn lệch nhau, và đã lệch: app thứ nhất `--color-bg #f7f8fa` / `--color-primary #2554eb`;
|
|
5
|
+
* app thứ hai `--bg #f5f6f8` / `--brand #2f3aa3`. Không chỉ khác GIÁ TRỊ mà khác cả CÁCH ĐẶT TÊN,
|
|
6
|
+
* nên không sửa được bằng cách chỉnh vài mã màu.
|
|
7
|
+
*
|
|
8
|
+
* Chiến lược: một bộ tên chuẩn `--fos-*`, cộng ALIAS về tên cũ của từng app. Nhờ vậy giá trị hội tụ
|
|
9
|
+
* NGAY hôm nay mà không phải sửa hàng trăm dòng CSS; tên sẽ hội tụ dần. Alias chỉ được PHÉP NGẮN đi.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
/* ── Nền & bề mặt ─────────────────────────────────────────────────────── */
|
|
14
|
+
--fos-bg: #f5f6f8;
|
|
15
|
+
--fos-surface: #ffffff;
|
|
16
|
+
--fos-surface-2: #fafbfc;
|
|
17
|
+
|
|
18
|
+
/* ── Chữ ──────────────────────────────────────────────────────────────── */
|
|
19
|
+
--fos-ink: #1a1f29; /* chính */
|
|
20
|
+
--fos-ink-2: #565d6b; /* phụ */
|
|
21
|
+
--fos-ink-3: #6b7385; /* mờ — ≥4.5:1 trên nền trắng (WCAG AA cho chữ thường); trước #8a909c ~3.2:1 chưa đạt */
|
|
22
|
+
|
|
23
|
+
/* ── Đường viền ───────────────────────────────────────────────────────── */
|
|
24
|
+
--fos-line: #e3e6eb;
|
|
25
|
+
--fos-line-2: #eef0f4;
|
|
26
|
+
|
|
27
|
+
/* ── Thương hiệu & trạng thái ─────────────────────────────────────────── */
|
|
28
|
+
/* Một primary duy nhất. Trước đây app thứ nhất dùng #2554eb còn app thứ hai #2f3aa3 — hai màu "xanh
|
|
29
|
+
* đáng tin cậy" khác nhau trên hai màn hình mà người dùng nhảy qua lại trong một phiên.
|
|
30
|
+
* Nay hội tụ về THƯƠNG HIỆU DQA: Cobalt #0047AB (tin cậy, chiều sâu công nghệ) là primary;
|
|
31
|
+
* Deep Sky #00BFFF (dòng chảy dữ liệu) và Turquoise #00CED1 (đổi mới) là accent/gradient nhận diện;
|
|
32
|
+
* Steel Blue #1A5392 cho chữ phụ / nhấn thương hiệu. */
|
|
33
|
+
--fos-primary: #0047ab;
|
|
34
|
+
--fos-primary-contrast: #ffffff;
|
|
35
|
+
--fos-primary-bg: #e6eef8;
|
|
36
|
+
|
|
37
|
+
/* Accent thương hiệu (gradient nhận diện Cobalt → Deep Sky → Turquoise) */
|
|
38
|
+
--fos-accent: #00bfff;
|
|
39
|
+
--fos-accent-2: #00ced1;
|
|
40
|
+
--fos-steel: #1a5392;
|
|
41
|
+
--fos-gradient-brand: linear-gradient(135deg, #0047ab 0%, #00bfff 55%, #00ced1 100%);
|
|
42
|
+
|
|
43
|
+
--fos-ok: #107a4d; --fos-ok-bg: #e6f4ec;
|
|
44
|
+
--fos-warn: #a86510; --fos-warn-bg: #fbf0db;
|
|
45
|
+
--fos-bad: #c5372c; --fos-bad-bg: #fbe9e7;
|
|
46
|
+
--fos-info: #0047ab; --fos-info-bg: #e6eef8;
|
|
47
|
+
--fos-muted: #8a909c; --fos-muted-bg: #f0f1f4;
|
|
48
|
+
|
|
49
|
+
/* ── Nhịp (thang 4px) ─────────────────────────────────────────────────── */
|
|
50
|
+
--fos-s1: 4px; --fos-s2: 8px; --fos-s3: 12px; --fos-s4: 16px;
|
|
51
|
+
--fos-s5: 24px; --fos-s6: 32px; --fos-s7: 48px;
|
|
52
|
+
|
|
53
|
+
/* ── Cỡ chữ ───────────────────────────────────────────────────────────── */
|
|
54
|
+
--fos-t-caption: 12px; --fos-t-body: 14px; --fos-t-body-lg: 16px;
|
|
55
|
+
--fos-t-h3: 20px; --fos-t-h2: 24px; --fos-t-h1: 28px;
|
|
56
|
+
|
|
57
|
+
/* ── Bo góc & bóng ────────────────────────────────────────────────────── */
|
|
58
|
+
--fos-r: 8px; --fos-r-sm: 6px;
|
|
59
|
+
--fos-sh-1: 0 1px 2px rgba(19, 23, 34, .04);
|
|
60
|
+
--fos-sh-2: 0 1px 3px rgba(19, 23, 34, .07), 0 1px 2px rgba(19, 23, 34, .04);
|
|
61
|
+
--fos-sh-3: 0 12px 28px -10px rgba(19, 23, 34, .16);
|
|
62
|
+
|
|
63
|
+
/* ── Chuyển động ──────────────────────────────────────────────────────── */
|
|
64
|
+
--fos-dur-fast: 120ms; --fos-dur-base: 180ms;
|
|
65
|
+
--fos-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
66
|
+
--fos-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
67
|
+
|
|
68
|
+
/* ── Vỏ quản trị (sidebar tối) ────────────────────────────────────────── */
|
|
69
|
+
/* Đây là KHUNG CỦA KHU QUẢN TRỊ, dùng chung cho app thứ nhất và cho console quản trị của app thứ hai.
|
|
70
|
+
* Một người của DQA đi qua lại giữa hai màn trong cùng một phiên; hai vỏ khác nhau là hai sản phẩm. */
|
|
71
|
+
/* Vỏ quản trị nhuộm chất thương hiệu: cobalt navy sâu (khớp panel login) thay vì xám gần-đen
|
|
72
|
+
* trung tính. Vẫn là "dark shell" tập trung, nhưng rõ là của DQA. */
|
|
73
|
+
--fos-sidebar-bg: #08213f;
|
|
74
|
+
--fos-sidebar-border: #143a63;
|
|
75
|
+
--fos-sidebar-hover-bg: rgb(255 255 255 / 6%);
|
|
76
|
+
--fos-sidebar-accent: #00bfff;
|
|
77
|
+
--fos-sidebar-accent-contrast: #0b1220;
|
|
78
|
+
--fos-sidebar-active-bg: color-mix(in srgb, var(--fos-sidebar-accent) 16%, transparent);
|
|
79
|
+
--fos-sidebar-text: #b7bac2;
|
|
80
|
+
--fos-sidebar-text-muted: #82868f;
|
|
81
|
+
--fos-sidebar-text-strong: #f5f6f8;
|
|
82
|
+
|
|
83
|
+
/* ── Chữ ──────────────────────────────────────────────────────────────── */
|
|
84
|
+
--fos-font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
85
|
+
--fos-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
86
|
+
|
|
87
|
+
/* ═══════════════════════════════════════════════════════════════════════
|
|
88
|
+
* ALIAS — tên cũ của từng app, trỏ về token chuẩn. Đây là cầu tạm, không phải đích.
|
|
89
|
+
* Xoá dần khi từng app đã dùng thẳng `--fos-*`. Danh sách này chỉ được NGẮN đi.
|
|
90
|
+
* ═══════════════════════════════════════════════════════════════════════ */
|
|
91
|
+
|
|
92
|
+
/* app thứ nhất */
|
|
93
|
+
--bg: var(--fos-bg);
|
|
94
|
+
--surface: var(--fos-surface);
|
|
95
|
+
--surface-2: var(--fos-surface-2);
|
|
96
|
+
--ink: var(--fos-ink);
|
|
97
|
+
--ink2: var(--fos-ink-2);
|
|
98
|
+
--ink3: var(--fos-ink-3);
|
|
99
|
+
--line: var(--fos-line);
|
|
100
|
+
--line-2: var(--fos-line-2);
|
|
101
|
+
--ok: var(--fos-ok); --ok-bg: var(--fos-ok-bg);
|
|
102
|
+
--warn: var(--fos-warn); --warn-bg: var(--fos-warn-bg);
|
|
103
|
+
--bad: var(--fos-bad); --bad-bg: var(--fos-bad-bg);
|
|
104
|
+
--info: var(--fos-info); --info-bg: var(--fos-info-bg);
|
|
105
|
+
--muted: var(--fos-muted); --muted-bg: var(--fos-muted-bg);
|
|
106
|
+
--brand: var(--fos-primary);
|
|
107
|
+
--accent: var(--fos-accent); --accent-2: var(--fos-accent-2); --steel: var(--fos-steel);
|
|
108
|
+
--r: var(--fos-r); --r-sm: var(--fos-r-sm);
|
|
109
|
+
--sh-1: var(--fos-sh-1); --sh-2: var(--fos-sh-3);
|
|
110
|
+
/* `.pipe-act` dùng `var(--warn-fg, #9a6700)` — biến chưa từng tồn tại, chỉ sống nhờ fallback.
|
|
111
|
+
* Khai báo nó ở đây để màu khớp bảng chung thay vì một mã màu lạc lõng trong một dòng CSS. */
|
|
112
|
+
--warn-fg: var(--fos-warn);
|
|
113
|
+
--s1: var(--fos-s1); --s2: var(--fos-s2); --s3: var(--fos-s3); --s4: var(--fos-s4);
|
|
114
|
+
--s5: var(--fos-s5); --s6: var(--fos-s6); --s7: var(--fos-s7);
|
|
115
|
+
--t-caption: var(--fos-t-caption); --t-body: var(--fos-t-body); --t-body-lg: var(--fos-t-body-lg);
|
|
116
|
+
--t-h3: var(--fos-t-h3); --t-h2: var(--fos-t-h2); --t-h1: var(--fos-t-h1);
|
|
117
|
+
|
|
118
|
+
/* app thứ hai */
|
|
119
|
+
--color-bg: var(--fos-bg);
|
|
120
|
+
--color-surface: var(--fos-surface);
|
|
121
|
+
--color-border: var(--fos-line);
|
|
122
|
+
--color-text: var(--fos-ink);
|
|
123
|
+
--color-muted: var(--fos-ink-2);
|
|
124
|
+
--color-primary: var(--fos-primary);
|
|
125
|
+
--color-primary-contrast: var(--fos-primary-contrast);
|
|
126
|
+
--color-accent: var(--fos-accent);
|
|
127
|
+
--color-accent-2: var(--fos-accent-2);
|
|
128
|
+
--color-steel: var(--fos-steel);
|
|
129
|
+
--color-danger: var(--fos-bad);
|
|
130
|
+
--color-success-bg: var(--fos-ok-bg);
|
|
131
|
+
--color-success-fg: var(--fos-ok);
|
|
132
|
+
--color-danger-bg: var(--fos-bad-bg);
|
|
133
|
+
--color-danger-fg: var(--fos-bad);
|
|
134
|
+
--color-warning-bg: var(--fos-warn-bg);
|
|
135
|
+
--color-warning-fg: var(--fos-warn);
|
|
136
|
+
--color-info-bg: var(--fos-info-bg);
|
|
137
|
+
--color-info-fg: var(--fos-info);
|
|
138
|
+
--color-neutral-bg: var(--fos-muted-bg);
|
|
139
|
+
--color-neutral-fg: var(--fos-ink-2);
|
|
140
|
+
--shadow-xs: var(--fos-sh-1);
|
|
141
|
+
--shadow-sm: var(--fos-sh-2);
|
|
142
|
+
--shadow-md: var(--fos-sh-3);
|
|
143
|
+
--dur-fast: var(--fos-dur-fast);
|
|
144
|
+
--dur-base: var(--fos-dur-base);
|
|
145
|
+
--ease-out: var(--fos-ease-out);
|
|
146
|
+
--ease-standard: var(--fos-ease-standard);
|
|
147
|
+
--sidebar-bg: var(--fos-sidebar-bg);
|
|
148
|
+
--sidebar-border: var(--fos-sidebar-border);
|
|
149
|
+
--sidebar-hover-bg: var(--fos-sidebar-hover-bg);
|
|
150
|
+
--sidebar-active-bg: var(--fos-sidebar-active-bg);
|
|
151
|
+
--sidebar-accent: var(--fos-sidebar-accent);
|
|
152
|
+
--sidebar-accent-contrast: var(--fos-sidebar-accent-contrast);
|
|
153
|
+
--sidebar-text: var(--fos-sidebar-text);
|
|
154
|
+
--sidebar-text-muted: var(--fos-sidebar-text-muted);
|
|
155
|
+
--sidebar-text-strong: var(--fos-sidebar-text-strong);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* CHƯA đưa dark-mode vào đây. Một app có `@media (prefers-color-scheme: dark)` ghi đè `--color-*`;
|
|
159
|
+
* app kia thì không. Nhập chung ngay bây giờ là bật dark-mode cho một app chưa từng thiết kế
|
|
160
|
+
* cho nó — đổi hình hài mà không ai duyệt. Nợ ghi rõ, không dọn lén. */
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './_types/ui-kit/tokens/index.js';
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* GENERATED by @dqa-ai-solutions/ui-kit — do not edit.
|
|
2
|
+
* Change the theme declaration and regenerate. Every colour below was computed from
|
|
3
|
+
* a hue and checked for contrast against every ground it can land on. */
|
|
4
|
+
:root[data-theme="dark"] {
|
|
5
|
+
color-scheme: dark;
|
|
6
|
+
|
|
7
|
+
/* ── colour ─────────────────────────────────────────────── */
|
|
8
|
+
--fos-bg: #151617;
|
|
9
|
+
--fos-surface: #202122;
|
|
10
|
+
--fos-surface-2: #1b1c1d;
|
|
11
|
+
--fos-ink: #f0f2f4;
|
|
12
|
+
--fos-ink-2: #bbbec2;
|
|
13
|
+
--fos-ink-3: #9c9fa3;
|
|
14
|
+
--fos-line: #343538;
|
|
15
|
+
--fos-line-2: #292a2c;
|
|
16
|
+
--fos-primary: #5596ff;
|
|
17
|
+
--fos-primary-bg: #292e36;
|
|
18
|
+
--fos-steel: #709de6;
|
|
19
|
+
--fos-focus: #5596ff;
|
|
20
|
+
--fos-primary-contrast: #11161f;
|
|
21
|
+
--fos-accent: #00bfff;
|
|
22
|
+
--fos-accent-2: #01ced1;
|
|
23
|
+
--fos-gradient-brand: linear-gradient(135deg, #5596ff 0%, #00bfff 55%, #01ced1 100%);
|
|
24
|
+
--fos-tone-plain: #bec4d1;
|
|
25
|
+
--fos-tone-plain-bg: #2f3032;
|
|
26
|
+
--fos-muted: #bec4d1;
|
|
27
|
+
--fos-muted-bg: #2f3032;
|
|
28
|
+
--fos-tone-wait: #d6c47b;
|
|
29
|
+
--fos-tone-wait-bg: #323028;
|
|
30
|
+
--fos-tone-doing: #a1c6ff;
|
|
31
|
+
--fos-tone-doing-bg: #28313e;
|
|
32
|
+
--fos-info: #a1c6ff;
|
|
33
|
+
--fos-info-bg: #28313e;
|
|
34
|
+
--fos-tone-done: #7fdba8;
|
|
35
|
+
--fos-tone-done-bg: #29332d;
|
|
36
|
+
--fos-ok: #7fdba8;
|
|
37
|
+
--fos-ok-bg: #29332d;
|
|
38
|
+
--fos-tone-warn: #fbb36a;
|
|
39
|
+
--fos-tone-warn-bg: #382e26;
|
|
40
|
+
--fos-warn: #fbb36a;
|
|
41
|
+
--fos-warn-bg: #382e26;
|
|
42
|
+
--fos-tone-stop: #ffab9e;
|
|
43
|
+
--fos-tone-stop-bg: #3e2b28;
|
|
44
|
+
--fos-bad: #ffab9e;
|
|
45
|
+
--fos-bad-bg: #3e2b28;
|
|
46
|
+
|
|
47
|
+
/* ── rhythm ─────────────────────────────────────────────── */
|
|
48
|
+
--fos-s1: 4px; /* icon to its label; inside a badge */
|
|
49
|
+
--fos-s2: 8px; /* control to its hint; between list rows */
|
|
50
|
+
--fos-s3: 12px; /* inside a chip; tight stack */
|
|
51
|
+
--fos-s4: 16px; /* between fields; dense card padding */
|
|
52
|
+
--fos-s5: 24px; /* card padding; heading to its body */
|
|
53
|
+
--fos-s6: 32px; /* between blocks in one section */
|
|
54
|
+
--fos-s7: 48px; /* between top-level sections */
|
|
55
|
+
|
|
56
|
+
/* ── type — four numbers per step, always together ──────── */
|
|
57
|
+
--fos-t-caption: 12px;
|
|
58
|
+
--fos-t-caption-line: 1.4;
|
|
59
|
+
--fos-t-caption-weight: 400;
|
|
60
|
+
--fos-t-caption-tracking: 0px;
|
|
61
|
+
--fos-t-body: 14px;
|
|
62
|
+
--fos-t-body-line: 1.5;
|
|
63
|
+
--fos-t-body-weight: 400;
|
|
64
|
+
--fos-t-body-tracking: 0px;
|
|
65
|
+
--fos-t-body-lg: 16px;
|
|
66
|
+
--fos-t-body-lg-line: 1.5;
|
|
67
|
+
--fos-t-body-lg-weight: 400;
|
|
68
|
+
--fos-t-body-lg-tracking: -0.05px;
|
|
69
|
+
--fos-t-h3: 20px;
|
|
70
|
+
--fos-t-h3-line: 1.3;
|
|
71
|
+
--fos-t-h3-weight: 600;
|
|
72
|
+
--fos-t-h3-tracking: -0.2px;
|
|
73
|
+
--fos-t-h2: 24px;
|
|
74
|
+
--fos-t-h2-line: 1.25;
|
|
75
|
+
--fos-t-h2-weight: 600;
|
|
76
|
+
--fos-t-h2-tracking: -0.4px;
|
|
77
|
+
--fos-t-h1: 28px;
|
|
78
|
+
--fos-t-h1-line: 1.2;
|
|
79
|
+
--fos-t-h1-weight: 600;
|
|
80
|
+
--fos-t-h1-tracking: -0.6px;
|
|
81
|
+
|
|
82
|
+
/* ── radius ─────────────────────────────────────────────── */
|
|
83
|
+
--fos-r-sm: 6px; /* badge, inline tag */
|
|
84
|
+
--fos-r: 8px; /* button, input, card */
|
|
85
|
+
--fos-r-lg: 12px; /* dialog, sheet, panel */
|
|
86
|
+
--fos-r-pill: 9999px; /* chip, avatar, segmented control */
|
|
87
|
+
|
|
88
|
+
/* ── shadow, motion, type family — passed through ───────── */
|
|
89
|
+
--fos-sh-1: 0 1px 2px rgba(19, 23, 34, .04);
|
|
90
|
+
--fos-sh-2: 0 1px 3px rgba(19, 23, 34, .07), 0 1px 2px rgba(19, 23, 34, .04);
|
|
91
|
+
--fos-sh-3: 0 12px 28px -10px rgba(19, 23, 34, .16);
|
|
92
|
+
--fos-dur-fast: 120ms;
|
|
93
|
+
--fos-dur-base: 180ms;
|
|
94
|
+
--fos-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
95
|
+
--fos-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
|
+
--fos-font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
97
|
+
--fos-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
98
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* GENERATED by @dqa-ai-solutions/ui-kit — do not edit.
|
|
2
|
+
* Change the theme declaration and regenerate. Every colour below was computed from
|
|
3
|
+
* a hue and checked for contrast against every ground it can land on. */
|
|
4
|
+
:root {
|
|
5
|
+
color-scheme: light;
|
|
6
|
+
|
|
7
|
+
/* ── colour ─────────────────────────────────────────────── */
|
|
8
|
+
--fos-bg: #f5f6f8;
|
|
9
|
+
--fos-surface: #ffffff;
|
|
10
|
+
--fos-surface-2: #fafbfc;
|
|
11
|
+
--fos-ink: #191f29;
|
|
12
|
+
--fos-ink-2: #555d6b;
|
|
13
|
+
--fos-ink-3: #667182;
|
|
14
|
+
--fos-line: #e3e6eb;
|
|
15
|
+
--fos-line-2: #eef0f4;
|
|
16
|
+
--fos-primary: #0047ab;
|
|
17
|
+
--fos-primary-bg: #e7eef8;
|
|
18
|
+
--fos-steel: #285193;
|
|
19
|
+
--fos-focus: #0047ab;
|
|
20
|
+
--fos-primary-contrast: #fafcff;
|
|
21
|
+
--fos-accent: #00bfff;
|
|
22
|
+
--fos-accent-2: #01ced1;
|
|
23
|
+
--fos-gradient-brand: linear-gradient(135deg, #0047ab 0%, #00bfff 55%, #01ced1 100%);
|
|
24
|
+
--fos-tone-plain: #626873;
|
|
25
|
+
--fos-tone-plain-bg: #eeeff1;
|
|
26
|
+
--fos-muted: #626873;
|
|
27
|
+
--fos-muted-bg: #eeeff1;
|
|
28
|
+
--fos-tone-wait: #78671a;
|
|
29
|
+
--fos-tone-wait-bg: #f2efe4;
|
|
30
|
+
--fos-tone-doing: #2262c8;
|
|
31
|
+
--fos-tone-doing-bg: #e6f0ff;
|
|
32
|
+
--fos-info: #2262c8;
|
|
33
|
+
--fos-info-bg: #e6f0ff;
|
|
34
|
+
--fos-tone-done: #117b4e;
|
|
35
|
+
--fos-tone-done-bg: #e6f3ea;
|
|
36
|
+
--fos-ok: #117b4e;
|
|
37
|
+
--fos-ok-bg: #e6f3ea;
|
|
38
|
+
--fos-tone-warn: #945700;
|
|
39
|
+
--fos-tone-warn-bg: #f9ede2;
|
|
40
|
+
--fos-warn: #945700;
|
|
41
|
+
--fos-warn-bg: #f9ede2;
|
|
42
|
+
--fos-tone-stop: #b92a21;
|
|
43
|
+
--fos-tone-stop-bg: #ffe9e6;
|
|
44
|
+
--fos-bad: #b92a21;
|
|
45
|
+
--fos-bad-bg: #ffe9e6;
|
|
46
|
+
|
|
47
|
+
/* ── rhythm ─────────────────────────────────────────────── */
|
|
48
|
+
--fos-s1: 4px; /* icon to its label; inside a badge */
|
|
49
|
+
--fos-s2: 8px; /* control to its hint; between list rows */
|
|
50
|
+
--fos-s3: 12px; /* inside a chip; tight stack */
|
|
51
|
+
--fos-s4: 16px; /* between fields; dense card padding */
|
|
52
|
+
--fos-s5: 24px; /* card padding; heading to its body */
|
|
53
|
+
--fos-s6: 32px; /* between blocks in one section */
|
|
54
|
+
--fos-s7: 48px; /* between top-level sections */
|
|
55
|
+
|
|
56
|
+
/* ── type — four numbers per step, always together ──────── */
|
|
57
|
+
--fos-t-caption: 12px;
|
|
58
|
+
--fos-t-caption-line: 1.4;
|
|
59
|
+
--fos-t-caption-weight: 400;
|
|
60
|
+
--fos-t-caption-tracking: 0px;
|
|
61
|
+
--fos-t-body: 14px;
|
|
62
|
+
--fos-t-body-line: 1.5;
|
|
63
|
+
--fos-t-body-weight: 400;
|
|
64
|
+
--fos-t-body-tracking: 0px;
|
|
65
|
+
--fos-t-body-lg: 16px;
|
|
66
|
+
--fos-t-body-lg-line: 1.5;
|
|
67
|
+
--fos-t-body-lg-weight: 400;
|
|
68
|
+
--fos-t-body-lg-tracking: -0.05px;
|
|
69
|
+
--fos-t-h3: 20px;
|
|
70
|
+
--fos-t-h3-line: 1.3;
|
|
71
|
+
--fos-t-h3-weight: 600;
|
|
72
|
+
--fos-t-h3-tracking: -0.2px;
|
|
73
|
+
--fos-t-h2: 24px;
|
|
74
|
+
--fos-t-h2-line: 1.25;
|
|
75
|
+
--fos-t-h2-weight: 600;
|
|
76
|
+
--fos-t-h2-tracking: -0.4px;
|
|
77
|
+
--fos-t-h1: 28px;
|
|
78
|
+
--fos-t-h1-line: 1.2;
|
|
79
|
+
--fos-t-h1-weight: 600;
|
|
80
|
+
--fos-t-h1-tracking: -0.6px;
|
|
81
|
+
|
|
82
|
+
/* ── radius ─────────────────────────────────────────────── */
|
|
83
|
+
--fos-r-sm: 6px; /* badge, inline tag */
|
|
84
|
+
--fos-r: 8px; /* button, input, card */
|
|
85
|
+
--fos-r-lg: 12px; /* dialog, sheet, panel */
|
|
86
|
+
--fos-r-pill: 9999px; /* chip, avatar, segmented control */
|
|
87
|
+
|
|
88
|
+
/* ── shadow, motion, type family — passed through ───────── */
|
|
89
|
+
--fos-sh-1: 0 1px 2px rgba(19, 23, 34, .04);
|
|
90
|
+
--fos-sh-2: 0 1px 3px rgba(19, 23, 34, .07), 0 1px 2px rgba(19, 23, 34, .04);
|
|
91
|
+
--fos-sh-3: 0 12px 28px -10px rgba(19, 23, 34, .16);
|
|
92
|
+
--fos-dur-fast: 120ms;
|
|
93
|
+
--fos-dur-base: 180ms;
|
|
94
|
+
--fos-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
95
|
+
--fos-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
|
+
--fos-font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
97
|
+
--fos-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
98
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* GENERATED by @dqa-ai-solutions/ui-kit — do not edit.
|
|
2
|
+
* Change the theme declaration and regenerate. Every colour below was computed from
|
|
3
|
+
* a hue and checked for contrast against every ground it can land on. */
|
|
4
|
+
:root {
|
|
5
|
+
color-scheme: light;
|
|
6
|
+
|
|
7
|
+
/* ── colour ─────────────────────────────────────────────── */
|
|
8
|
+
--fos-bg: #f5f6f8;
|
|
9
|
+
--fos-surface: #ffffff;
|
|
10
|
+
--fos-surface-2: #fafbfc;
|
|
11
|
+
--fos-ink: #000003;
|
|
12
|
+
--fos-ink-2: #343c48;
|
|
13
|
+
--fos-ink-3: #485363;
|
|
14
|
+
--fos-line: #dfe2e7;
|
|
15
|
+
--fos-line-2: #eceff3;
|
|
16
|
+
--fos-primary: #0047ab;
|
|
17
|
+
--fos-primary-bg: #e7eef8;
|
|
18
|
+
--fos-steel: #285193;
|
|
19
|
+
--fos-focus: #0047ab;
|
|
20
|
+
--fos-primary-contrast: #fafcff;
|
|
21
|
+
--fos-accent: #00bfff;
|
|
22
|
+
--fos-accent-2: #01ced1;
|
|
23
|
+
--fos-gradient-brand: linear-gradient(135deg, #0047ab 0%, #00bfff 55%, #01ced1 100%);
|
|
24
|
+
--fos-tone-plain: #434852;
|
|
25
|
+
--fos-tone-plain-bg: #eeeff1;
|
|
26
|
+
--fos-muted: #434852;
|
|
27
|
+
--fos-muted-bg: #eeeff1;
|
|
28
|
+
--fos-tone-wait: #554700;
|
|
29
|
+
--fos-tone-wait-bg: #f2efe4;
|
|
30
|
+
--fos-tone-doing: #00409c;
|
|
31
|
+
--fos-tone-doing-bg: #e6f0ff;
|
|
32
|
+
--fos-info: #00409c;
|
|
33
|
+
--fos-info-bg: #e6f0ff;
|
|
34
|
+
--fos-tone-done: #005634;
|
|
35
|
+
--fos-tone-done-bg: #e6f3ea;
|
|
36
|
+
--fos-ok: #005634;
|
|
37
|
+
--fos-ok-bg: #e6f3ea;
|
|
38
|
+
--fos-tone-warn: #693b00;
|
|
39
|
+
--fos-tone-warn-bg: #f9ede2;
|
|
40
|
+
--fos-warn: #693b00;
|
|
41
|
+
--fos-warn-bg: #f9ede2;
|
|
42
|
+
--fos-tone-stop: #8b0002;
|
|
43
|
+
--fos-tone-stop-bg: #ffe9e6;
|
|
44
|
+
--fos-bad: #8b0002;
|
|
45
|
+
--fos-bad-bg: #ffe9e6;
|
|
46
|
+
|
|
47
|
+
/* ── rhythm ─────────────────────────────────────────────── */
|
|
48
|
+
--fos-s1: 4px; /* icon to its label; inside a badge */
|
|
49
|
+
--fos-s2: 8px; /* control to its hint; between list rows */
|
|
50
|
+
--fos-s3: 12px; /* inside a chip; tight stack */
|
|
51
|
+
--fos-s4: 16px; /* between fields; dense card padding */
|
|
52
|
+
--fos-s5: 24px; /* card padding; heading to its body */
|
|
53
|
+
--fos-s6: 32px; /* between blocks in one section */
|
|
54
|
+
--fos-s7: 48px; /* between top-level sections */
|
|
55
|
+
|
|
56
|
+
/* ── type — four numbers per step, always together ──────── */
|
|
57
|
+
--fos-t-caption: 12px;
|
|
58
|
+
--fos-t-caption-line: 1.4;
|
|
59
|
+
--fos-t-caption-weight: 400;
|
|
60
|
+
--fos-t-caption-tracking: 0px;
|
|
61
|
+
--fos-t-body: 14px;
|
|
62
|
+
--fos-t-body-line: 1.5;
|
|
63
|
+
--fos-t-body-weight: 400;
|
|
64
|
+
--fos-t-body-tracking: 0px;
|
|
65
|
+
--fos-t-body-lg: 16px;
|
|
66
|
+
--fos-t-body-lg-line: 1.5;
|
|
67
|
+
--fos-t-body-lg-weight: 400;
|
|
68
|
+
--fos-t-body-lg-tracking: -0.05px;
|
|
69
|
+
--fos-t-h3: 20px;
|
|
70
|
+
--fos-t-h3-line: 1.3;
|
|
71
|
+
--fos-t-h3-weight: 600;
|
|
72
|
+
--fos-t-h3-tracking: -0.2px;
|
|
73
|
+
--fos-t-h2: 24px;
|
|
74
|
+
--fos-t-h2-line: 1.25;
|
|
75
|
+
--fos-t-h2-weight: 600;
|
|
76
|
+
--fos-t-h2-tracking: -0.4px;
|
|
77
|
+
--fos-t-h1: 28px;
|
|
78
|
+
--fos-t-h1-line: 1.2;
|
|
79
|
+
--fos-t-h1-weight: 600;
|
|
80
|
+
--fos-t-h1-tracking: -0.6px;
|
|
81
|
+
|
|
82
|
+
/* ── radius ─────────────────────────────────────────────── */
|
|
83
|
+
--fos-r-sm: 6px; /* badge, inline tag */
|
|
84
|
+
--fos-r: 8px; /* button, input, card */
|
|
85
|
+
--fos-r-lg: 12px; /* dialog, sheet, panel */
|
|
86
|
+
--fos-r-pill: 9999px; /* chip, avatar, segmented control */
|
|
87
|
+
|
|
88
|
+
/* ── shadow, motion, type family — passed through ───────── */
|
|
89
|
+
--fos-sh-1: 0 1px 2px rgba(19, 23, 34, .04);
|
|
90
|
+
--fos-sh-2: 0 1px 3px rgba(19, 23, 34, .07), 0 1px 2px rgba(19, 23, 34, .04);
|
|
91
|
+
--fos-sh-3: 0 12px 28px -10px rgba(19, 23, 34, .16);
|
|
92
|
+
--fos-dur-fast: 120ms;
|
|
93
|
+
--fos-dur-base: 180ms;
|
|
94
|
+
--fos-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
95
|
+
--fos-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
|
+
--fos-font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
97
|
+
--fos-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
98
|
+
}
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,b as r,c as e,d as f,e as l,f as n,g as v}from"./chunks/chunk-JOIDPECM.js";import{a as m,b as p,c as t,d as x,e as a,g as b,h as c,j as d,l as g,m as h,n as i,o as j,p as k,u as q,v as s,w as u}from"./chunks/chunk-66DQVLFK.js";export{b as CONTROL,v as DQA_THEME,k as FONT,m as GREY_TINT,p as LADDER,h as RADIUS,i as RADIUS_PURPOSE,a as SPACE,d as SPACE_PURPOSE,j as STATIC,c as TARGET_FLOOR,g as TEXT,x as TONE_ALIAS,t as TONE_HUE,e as contrast,q as emitCss,u as emitTypeUtilities,n as formatThemeDiagnostics,f as fromHex,r as luminance,l as resolveTheme,o as toHex,s as tokenNames};
|
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dqa-ai-solutions/ui-runtime",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "The screen layer: the kit (tokens, primitives, the lens over a view contract, the shell) at the root and its React renderer at ./react. Stands on @dqa-ai-solutions/core-runtime alone; loads in a browser.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/DQASolutions/ui-runtime.git",
|
|
9
|
+
"directory": "ui/ui-runtime"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/DQASolutions/ui-runtime#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/DQASolutions/ui-runtime/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./tokens": {
|
|
24
|
+
"types": "./dist/tokens.d.ts",
|
|
25
|
+
"import": "./dist/tokens.js"
|
|
26
|
+
},
|
|
27
|
+
"./primitives": {
|
|
28
|
+
"types": "./dist/primitives.d.ts",
|
|
29
|
+
"import": "./dist/primitives.js"
|
|
30
|
+
},
|
|
31
|
+
"./lens": {
|
|
32
|
+
"types": "./dist/lens.d.ts",
|
|
33
|
+
"import": "./dist/lens.js"
|
|
34
|
+
},
|
|
35
|
+
"./shell": {
|
|
36
|
+
"types": "./dist/shell.d.ts",
|
|
37
|
+
"import": "./dist/shell.js"
|
|
38
|
+
},
|
|
39
|
+
"./tokens.css": "./dist/tokens.css",
|
|
40
|
+
"./tokens.generated.css": "./dist/tokens.generated.css",
|
|
41
|
+
"./tokens.dark.css": "./dist/tokens.dark.css",
|
|
42
|
+
"./tokens.high.css": "./dist/tokens.high.css",
|
|
43
|
+
"./kit.css": "./dist/kit.css",
|
|
44
|
+
"./react": {
|
|
45
|
+
"types": "./dist/react.d.ts",
|
|
46
|
+
"import": "./dist/react.js"
|
|
47
|
+
},
|
|
48
|
+
"./package.json": "./package.json"
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"dist"
|
|
52
|
+
],
|
|
53
|
+
"dependencies": {},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@dqa-ai-solutions/core-runtime": "^0.2.0",
|
|
56
|
+
"react": ">=18"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"react": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|