tintora 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button/Button.d.ts +2 -1
- package/dist/ProgressBar/ProgressBar.d.ts +25 -0
- package/dist/Spinner/Spinner.d.ts +27 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +134 -45
- package/dist/tintora.css +1 -1
- package/package.json +1 -1
package/dist/Button/Button.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ type ButtonSizes = 'small' | 'medium' | 'large';
|
|
|
5
5
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
6
|
variant: ButtonVariants;
|
|
7
7
|
size?: ButtonSizes;
|
|
8
|
+
loading?: boolean;
|
|
8
9
|
leadingIcon?: ReactNode;
|
|
9
10
|
trailingIcon?: ReactNode;
|
|
10
11
|
}
|
|
11
|
-
export declare function Button({ children, className, variant, size, leadingIcon, trailingIcon, type, ...props }: ButtonProps): import("react").JSX.Element;
|
|
12
|
+
export declare function Button({ children, className, variant, size, leadingIcon, trailingIcon, type, loading, disabled, ...props }: ButtonProps): import("react").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './ProgressBar.css';
|
|
2
|
+
interface ProgressBarDeterminate {
|
|
3
|
+
/** 0-100. Out-of-range values are clamped. */
|
|
4
|
+
progress: number;
|
|
5
|
+
indeterminate?: never;
|
|
6
|
+
}
|
|
7
|
+
interface ProgressBarIndeterminate {
|
|
8
|
+
progress?: never;
|
|
9
|
+
indeterminate: true;
|
|
10
|
+
}
|
|
11
|
+
interface ProgressBarTitled {
|
|
12
|
+
title: string;
|
|
13
|
+
'aria-label'?: never;
|
|
14
|
+
}
|
|
15
|
+
interface ProgressBarLabelled {
|
|
16
|
+
title?: never;
|
|
17
|
+
'aria-label': string;
|
|
18
|
+
}
|
|
19
|
+
export type ProgressBarProps = (ProgressBarDeterminate | ProgressBarIndeterminate) & (ProgressBarTitled | ProgressBarLabelled) & {
|
|
20
|
+
/** Text shown next to the title. Defaults to "80%" or "Indeterminate". */
|
|
21
|
+
valueLabel?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function ProgressBar({ title, progress, indeterminate, valueLabel, className, 'aria-label': ariaLabel, }: ProgressBarProps): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './Spinner.css';
|
|
2
|
+
type SpinnerSizes = 'small' | 'medium' | 'large';
|
|
3
|
+
type SpinnerColors = 'accent' | 'current';
|
|
4
|
+
export interface SpinnerProps {
|
|
5
|
+
size?: SpinnerSizes;
|
|
6
|
+
/** `accent` uses the brand fill; `current` follows the surrounding text colour. */
|
|
7
|
+
color?: SpinnerColors;
|
|
8
|
+
}
|
|
9
|
+
export declare const SPINNER_SIZE_MAP: {
|
|
10
|
+
readonly small: {
|
|
11
|
+
readonly width: 16;
|
|
12
|
+
readonly height: 16;
|
|
13
|
+
readonly strokeWidth: 3.5;
|
|
14
|
+
};
|
|
15
|
+
readonly medium: {
|
|
16
|
+
readonly width: 24;
|
|
17
|
+
readonly height: 24;
|
|
18
|
+
readonly strokeWidth: 3;
|
|
19
|
+
};
|
|
20
|
+
readonly large: {
|
|
21
|
+
readonly width: 40;
|
|
22
|
+
readonly height: 40;
|
|
23
|
+
readonly strokeWidth: 2.4;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare function Spinner({ size, color }: SpinnerProps): import("react").JSX.Element;
|
|
27
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r)}return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}function i(e){if(!e.length)return``;let t=e.trim().split(/\s+/).map(e=>e.match(/\p{L}\p{M}*/u)?.[0]).filter(e=>!!e);return`${t[0]??``}${t.length>1?t.at(-1)??``:``}`.toLocaleUpperCase()}function a({name:n,src:a,size:o=`medium`,className:s,...c}){let[l,u]=(0,e.useState)(),d=!!a&&a!==l;return(0,t.jsx)(`span`,{role:`img`,"aria-label":n,...c,className:r(`tintora-avatar`,`tintora-avatar--${o}`,s),children:d?(0,t.jsx)(`img`,{src:a,alt:``,onError:()=>u(a)}):i(n)})}function o({children:e,className:n,variant:i,size:a=`medium`,leadingIcon:o,trailingIcon:s,type:c=`button`,...l}){return(0,t.jsxs)(`button`,{type:c,className:r(`tintora-button`,`tintora-button--${i}`,`tintora-button--${a}`,{"tintora-button--leading-icon":!!o,"tintora-button--trailing-icon":!!s},n),...l,children:[o&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:o}),e,s&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:s})]})}function s({as:e=`article`,variant:n=`surface`,className:i,...a}){return(0,t.jsx)(e,{...a,className:r(`tintora-card`,`tintora-card--${n}`,i)})}function c({selected:e=!1,className:n,...i}){return(0,t.jsx)(`button`,{...i,type:`button`,"aria-pressed":e,className:r(`tintora-card`,`tintora-card--surface`,`tintora-card--selectable`,e&&`tintora-card--selected`,n)})}function l({children:e,selected:n,className:i,"aria-pressed":a,...o}){return(0,t.jsx)(`button`,{...o,type:`button`,className:r(`tintora-chip`,i),"aria-pressed":n??a,children:e})}function u({variant:e=`unread`,label:n,className:i,...a}){return(0,t.jsx)(`span`,{...a,className:r(`tintora-dot`,`tintora-dot--${e}`,i),role:n?`img`:void 0,"aria-label":n,"aria-hidden":!n||void 0})}var d={round:`secondary`,field:`secondary`,nav:`ghost`};function f({icon:e,variant:n=`round`,size:i,selected:a,className:s,...c}){let l=n===`round`?i??`large`:void 0;return(0,t.jsx)(o,{...c,variant:d[n],"aria-current":a?`page`:void 0,className:r(`tintora-icon-button`,`tintora-icon-button--${n}`,l&&`tintora-icon-button--${l}`,s),...l&&{size:l},children:(0,t.jsx)(`span`,{className:`tintora-icon-button__icon`,"aria-hidden":`true`,children:e})})}function p({className:e,disabled:n,...i}){return(0,t.jsxs)(`label`,{className:r(`tintora-search-input`,n&&`tintora-search-input--disabled`,e),children:[(0,t.jsxs)(`svg`,{className:`tintora-search-input__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,t.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,t.jsx)(`path`,{d:`M20 20l-3.5-3.5`})]}),(0,t.jsx)(`input`,{...i,type:`search`,disabled:n,className:`tintora-search-input__input`})]})}var m=(0,e.createContext)(null),h=()=>{let t=(0,e.useContext)(m);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function g({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=h();return(0,t.jsx)(`div`,{id:s(n),role:`option`,"aria-selected":c===n,"aria-disabled":i||void 0,className:r(`tintora-select__option`,l===n&&`tintora-select__option--active`),onClick:()=>a(n),onMouseMove:()=>!i&&o(n),children:e})}var _=4;function v({defaultValue:n,options:i,disabled:a,value:o,placeholder:s,onValueChange:c,name:l,className:u,onClick:d,onKeyDown:f,onKeyUp:p,"aria-label":h,...v}){let y=(0,e.useId)(),b=(0,e.useRef)(null),x=(0,e.useRef)(null),S=(0,e.useRef)(null),[C,w]=(0,e.useState)(n??null),[T,E]=(0,e.useState)(!1),[D,O]=(0,e.useState)(-1),[k,A]=(0,e.useState)({}),j=o!==void 0,M=j?o:C,N=i.findIndex(e=>e.value===M),P=e=>i[e]?.disabled!==!0,F=()=>i.findIndex((e,t)=>P(t)),I=(e,t)=>{for(let n=e+t;n>=0&&n<i.length;n+=t)if(P(n))return n;return e},L=()=>{let e=I(i.length,-1);return e===i.length?-1:e},R=e=>i.findIndex(t=>t.value===e),z=()=>{O(N>=0&&P(N)?N:F()),E(!0)},B=()=>E(!1),V=e=>{let t=R(e);t<0||!P(t)||(B(),e!==M&&(j||w(e),c?.(e)))},H=e=>{if(f?.(e),e.defaultPrevented)return;let{key:t}=e;if(t===`Tab`)return B();if(!T){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(t)&&(e.preventDefault(),z());return}let n={ArrowDown:()=>D<0?F():I(D,1),ArrowUp:()=>D<0?F():I(D,-1),Home:F,End:L};t in n?(e.preventDefault(),O(n[t]())):t===`Enter`||t===` `?(e.preventDefault(),D>=0?V(i[D].value):B()):t===`Escape`&&(e.preventDefault(),B())},U=e=>{p?.(e),e.key===` `&&e.preventDefault()},W=()=>{let e=S.current,t=x.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+_+r<=window.innerHeight,a=n.top-_-r>=0;A({top:i||!a?n.bottom+_:n.top-_-r,left:n.left,minWidth:n.width})},G=e=>{d?.(e),!e.defaultPrevented&&(T?B():z())};(0,e.useLayoutEffect)(()=>{T&&(S.current?.showPopover(),W())},[T]),(0,e.useEffect)(()=>{if(!T)return;let e=e=>{b.current?.contains(e.target)||B()},t=e=>{S.current?.contains(e.target)||W()};return document.addEventListener(`pointerdown`,e),window.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,W),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,W)}},[T]),(0,e.useEffect)(()=>{T&&D>=0&&S.current?.children.item(D)?.scrollIntoView?.({block:`nearest`})},[T,D]);let K=e=>`${y}-option-${R(e)}`,q=T?i[D]?.value??null:null,J=i[N]?.label;return(0,t.jsx)(m.Provider,{value:{value:M,activeValue:q,select:V,optionId:K,activate:e=>O(R(e))},children:(0,t.jsxs)(`div`,{ref:b,className:`tintora-select`,children:[(0,t.jsxs)(`button`,{...v,ref:x,type:`button`,role:`combobox`,"aria-label":h,"aria-haspopup":`listbox`,"aria-expanded":T,"aria-controls":T?y:void 0,"aria-activedescendant":q===null?void 0:K(q),disabled:a,className:r(`tintora-select__trigger`,u),onClick:G,onKeyDown:H,onKeyUp:U,children:[(0,t.jsx)(`span`,{className:r(`tintora-select__value`,J===void 0&&`tintora-select__value--placeholder`),children:J??s}),(0,t.jsx)(`svg`,{className:`tintora-select__chevron`,width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M6 9l6 6 6-6`})})]}),T&&(0,t.jsx)(`div`,{ref:S,id:y,role:`listbox`,"aria-label":h,popover:`manual`,className:`tintora-select__menu`,style:k,onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(g,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:M??``,disabled:a})]})})}function y({children:e,className:n,variant:i=`neutral`,size:a=`medium`,...o}){return(0,t.jsx)(`span`,{...o,className:r(`tintora-tag`,`tintora-tag--${i}`,`tintora-tag--${a}`,n),children:e})}function b({label:n,hint:i,error:a,id:o,className:s,disabled:c,"aria-describedby":l,"aria-invalid":u,...d}){let f=(0,e.useId)(),p=o??f,m=`${p}-message`,h=a??i;return(0,t.jsxs)(`div`,{className:r(`tintora-textfield`,c&&`tintora-textfield--disabled`,s),children:[(0,t.jsx)(`label`,{htmlFor:p,className:`tintora-textfield__label`,children:n}),(0,t.jsx)(`input`,{...d,id:p,disabled:c,className:`tintora-textfield__input`,"aria-invalid":a?!0:u,"aria-describedby":r(h&&m,l)||void 0}),h&&(0,t.jsx)(`span`,{id:m,className:r(`tintora-textfield__hint`,a&&`tintora-textfield__hint--error`),children:h})]})}var x=(0,e.createContext)(null);function S(){let t=(0,e.useContext)(x);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function C({children:n,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,className:c,...l}){let[u,d]=(0,e.useState)(a),f=i!==void 0,p=f?i:u,m=n.findIndex(e=>e.props.value===p),h=(0,e.useRef)(null),[g,_]=(0,e.useState)({x:0,width:0});(0,e.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=()=>{let t=e.children.item(m);if(!t)return;let n={x:t.offsetLeft,width:t.offsetWidth};_(e=>e.x===n.x&&e.width===n.width?e:n)};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[m]);let v={"--tintora-toggle-thumb-x":`${g.x}px`,"--tintora-toggle-thumb-width":`${g.width}px`};return(0,t.jsx)(x.Provider,{value:{value:p,select:e=>{e!==p&&(f||d(e),o?.(e))},disabled:s},children:(0,t.jsxs)(`div`,{...l,role:`group`,ref:h,className:r(`tintora-toggle`,s&&`tintora-toggle--disabled`,c),children:[n,(0,t.jsx)(`span`,{"aria-hidden":`true`,className:`tintora-toggle__thumb`,style:v})]})})}function w({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=S(),l=t=>{o?.(t),t.defaultPrevented||c.select(e)};return(0,t.jsx)(`button`,{...s,type:`button`,className:r(`tintora-toggle__item`,i),"aria-pressed":c.value===e,disabled:a||c.disabled,onClick:l,children:n})}exports.Avatar=a,exports.Button=o,exports.Card=s,exports.Chip=l,exports.Dot=u,exports.IconButton=f,exports.SearchInput=p,exports.Select=v,exports.SelectableCard=c,exports.Tag=y,exports.TextField=b,exports.Toggle=C,exports.ToggleItem=w;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r)}return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}function i(e){if(!e.length)return``;let t=e.trim().split(/\s+/).map(e=>e.match(/\p{L}\p{M}*/u)?.[0]).filter(e=>!!e);return`${t[0]??``}${t.length>1?t.at(-1)??``:``}`.toLocaleUpperCase()}function a({name:n,src:a,size:o=`medium`,className:s,...c}){let[l,u]=(0,e.useState)(),d=!!a&&a!==l;return(0,t.jsx)(`span`,{role:`img`,"aria-label":n,...c,className:r(`tintora-avatar`,`tintora-avatar--${o}`,s),children:d?(0,t.jsx)(`img`,{src:a,alt:``,onError:()=>u(a)}):i(n)})}var o={small:{width:16,height:16,strokeWidth:3.5},medium:{width:24,height:24,strokeWidth:3},large:{width:40,height:40,strokeWidth:2.4}};function s({size:e=`medium`,color:n=`accent`}){let{width:r,height:i,strokeWidth:a}=o[e];return(0,t.jsxs)(`svg`,{className:`tintora-spinner`,width:r,height:i,viewBox:`0 0 24 24`,fill:`none`,role:`img`,"aria-label":`Loading`,children:[(0,t.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,stroke:`currentColor`,strokeOpacity:n===`accent`?.25:.35,strokeWidth:a}),(0,t.jsx)(`path`,{d:`M21 12a9 9 0 0 0-9-9`,stroke:n===`accent`?`var(--tintora-control-fill)`:`currentColor`,strokeWidth:a,strokeLinecap:`round`})]})}function c({children:e,className:n,variant:i,size:a=`medium`,leadingIcon:o,trailingIcon:c,type:l=`button`,loading:u=!1,disabled:d,...f}){return(0,t.jsxs)(`button`,{type:l,className:r(`tintora-button`,`tintora-button--${i}`,`tintora-button--${a}`,{"tintora-button--leading-icon":!!o||u,"tintora-button--loading":u,"tintora-button--trailing-icon":!!c},n),disabled:d||u,"aria-busy":u||void 0,...f,children:[u&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:(0,t.jsx)(s,{size:`small`,color:`current`})}),!u&&o&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:o}),e,c&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:c})]})}function l({as:e=`article`,variant:n=`surface`,className:i,...a}){return(0,t.jsx)(e,{...a,className:r(`tintora-card`,`tintora-card--${n}`,i)})}function u({selected:e=!1,className:n,...i}){return(0,t.jsx)(`button`,{...i,type:`button`,"aria-pressed":e,className:r(`tintora-card`,`tintora-card--surface`,`tintora-card--selectable`,e&&`tintora-card--selected`,n)})}function d({children:e,selected:n,className:i,"aria-pressed":a,...o}){return(0,t.jsx)(`button`,{...o,type:`button`,className:r(`tintora-chip`,i),"aria-pressed":n??a,children:e})}function f({variant:e=`unread`,label:n,className:i,...a}){return(0,t.jsx)(`span`,{...a,className:r(`tintora-dot`,`tintora-dot--${e}`,i),role:n?`img`:void 0,"aria-label":n,"aria-hidden":!n||void 0})}var p={round:`secondary`,field:`secondary`,nav:`ghost`};function m({icon:e,variant:n=`round`,size:i,selected:a,className:o,...s}){let l=n===`round`?i??`large`:void 0;return(0,t.jsx)(c,{...s,variant:p[n],"aria-current":a?`page`:void 0,className:r(`tintora-icon-button`,`tintora-icon-button--${n}`,l&&`tintora-icon-button--${l}`,o),...l&&{size:l},children:(0,t.jsx)(`span`,{className:`tintora-icon-button__icon`,"aria-hidden":`true`,children:e})})}function h({title:n,progress:i,indeterminate:a,valueLabel:o,className:s,"aria-label":c}){let l=(0,e.useId)(),u=a?void 0:Math.min(100,Math.max(0,Number.isFinite(i)?i:0)),d=u===100,f=o??(a?`Indeterminate`:`${u}%`);return(0,t.jsxs)(`div`,{className:r(`tintora-progress-bar`,s),children:[n&&(0,t.jsxs)(`div`,{className:`tintora-progress-bar__header`,children:[(0,t.jsx)(`span`,{id:l,children:n}),(0,t.jsx)(`span`,{className:`tintora-progress-bar__value`,children:f})]}),(0,t.jsx)(`div`,{role:`progressbar`,"aria-label":c,"aria-labelledby":n?l:void 0,"aria-valuemin":a?void 0:0,"aria-valuemax":a?void 0:100,"aria-valuenow":u,"aria-valuetext":o,className:`tintora-progress-bar__track`,children:(0,t.jsx)(`div`,{className:r(`tintora-progress-bar__fill`,{"tintora-progress-bar__fill--indeterminate":a,"tintora-progress-bar__fill--complete":d}),style:u===void 0?void 0:{width:`${u}%`}})})]})}function g({className:e,disabled:n,...i}){return(0,t.jsxs)(`label`,{className:r(`tintora-search-input`,n&&`tintora-search-input--disabled`,e),children:[(0,t.jsxs)(`svg`,{className:`tintora-search-input__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,t.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,t.jsx)(`path`,{d:`M20 20l-3.5-3.5`})]}),(0,t.jsx)(`input`,{...i,type:`search`,disabled:n,className:`tintora-search-input__input`})]})}var _=(0,e.createContext)(null),v=()=>{let t=(0,e.useContext)(_);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function y({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=v();return(0,t.jsx)(`div`,{id:s(n),role:`option`,"aria-selected":c===n,"aria-disabled":i||void 0,className:r(`tintora-select__option`,l===n&&`tintora-select__option--active`),onClick:()=>a(n),onMouseMove:()=>!i&&o(n),children:e})}var b=4;function x({defaultValue:n,options:i,disabled:a,value:o,placeholder:s,onValueChange:c,name:l,className:u,onClick:d,onKeyDown:f,onKeyUp:p,"aria-label":m,...h}){let g=(0,e.useId)(),v=(0,e.useRef)(null),x=(0,e.useRef)(null),S=(0,e.useRef)(null),[C,w]=(0,e.useState)(n??null),[T,E]=(0,e.useState)(!1),[D,O]=(0,e.useState)(-1),[k,A]=(0,e.useState)({}),j=o!==void 0,M=j?o:C,N=i.findIndex(e=>e.value===M),P=e=>i[e]?.disabled!==!0,F=()=>i.findIndex((e,t)=>P(t)),I=(e,t)=>{for(let n=e+t;n>=0&&n<i.length;n+=t)if(P(n))return n;return e},L=()=>{let e=I(i.length,-1);return e===i.length?-1:e},R=e=>i.findIndex(t=>t.value===e),z=()=>{O(N>=0&&P(N)?N:F()),E(!0)},B=()=>E(!1),V=e=>{let t=R(e);t<0||!P(t)||(B(),e!==M&&(j||w(e),c?.(e)))},H=e=>{if(f?.(e),e.defaultPrevented)return;let{key:t}=e;if(t===`Tab`)return B();if(!T){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(t)&&(e.preventDefault(),z());return}let n={ArrowDown:()=>D<0?F():I(D,1),ArrowUp:()=>D<0?F():I(D,-1),Home:F,End:L};t in n?(e.preventDefault(),O(n[t]())):t===`Enter`||t===` `?(e.preventDefault(),D>=0?V(i[D].value):B()):t===`Escape`&&(e.preventDefault(),B())},U=e=>{p?.(e),e.key===` `&&e.preventDefault()},W=()=>{let e=S.current,t=x.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+b+r<=window.innerHeight,a=n.top-b-r>=0;A({top:i||!a?n.bottom+b:n.top-b-r,left:n.left,minWidth:n.width})},G=e=>{d?.(e),!e.defaultPrevented&&(T?B():z())};(0,e.useLayoutEffect)(()=>{T&&(S.current?.showPopover(),W())},[T]),(0,e.useEffect)(()=>{if(!T)return;let e=e=>{v.current?.contains(e.target)||B()},t=e=>{S.current?.contains(e.target)||W()};return document.addEventListener(`pointerdown`,e),window.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,W),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,W)}},[T]),(0,e.useEffect)(()=>{T&&D>=0&&S.current?.children.item(D)?.scrollIntoView?.({block:`nearest`})},[T,D]);let K=e=>`${g}-option-${R(e)}`,q=T?i[D]?.value??null:null,J=i[N]?.label;return(0,t.jsx)(_.Provider,{value:{value:M,activeValue:q,select:V,optionId:K,activate:e=>O(R(e))},children:(0,t.jsxs)(`div`,{ref:v,className:`tintora-select`,children:[(0,t.jsxs)(`button`,{...h,ref:x,type:`button`,role:`combobox`,"aria-label":m,"aria-haspopup":`listbox`,"aria-expanded":T,"aria-controls":T?g:void 0,"aria-activedescendant":q===null?void 0:K(q),disabled:a,className:r(`tintora-select__trigger`,u),onClick:G,onKeyDown:H,onKeyUp:U,children:[(0,t.jsx)(`span`,{className:r(`tintora-select__value`,J===void 0&&`tintora-select__value--placeholder`),children:J??s}),(0,t.jsx)(`svg`,{className:`tintora-select__chevron`,width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M6 9l6 6 6-6`})})]}),T&&(0,t.jsx)(`div`,{ref:S,id:g,role:`listbox`,"aria-label":m,popover:`manual`,className:`tintora-select__menu`,style:k,onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(y,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:M??``,disabled:a})]})})}function S({children:e,className:n,variant:i=`neutral`,size:a=`medium`,...o}){return(0,t.jsx)(`span`,{...o,className:r(`tintora-tag`,`tintora-tag--${i}`,`tintora-tag--${a}`,n),children:e})}function C({label:n,hint:i,error:a,id:o,className:s,disabled:c,"aria-describedby":l,"aria-invalid":u,...d}){let f=(0,e.useId)(),p=o??f,m=`${p}-message`,h=a??i;return(0,t.jsxs)(`div`,{className:r(`tintora-textfield`,c&&`tintora-textfield--disabled`,s),children:[(0,t.jsx)(`label`,{htmlFor:p,className:`tintora-textfield__label`,children:n}),(0,t.jsx)(`input`,{...d,id:p,disabled:c,className:`tintora-textfield__input`,"aria-invalid":a?!0:u,"aria-describedby":r(h&&m,l)||void 0}),h&&(0,t.jsx)(`span`,{id:m,className:r(`tintora-textfield__hint`,a&&`tintora-textfield__hint--error`),children:h})]})}var w=(0,e.createContext)(null);function T(){let t=(0,e.useContext)(w);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function E({children:n,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,className:c,...l}){let[u,d]=(0,e.useState)(a),f=i!==void 0,p=f?i:u,m=n.findIndex(e=>e.props.value===p),h=(0,e.useRef)(null),[g,_]=(0,e.useState)({x:0,width:0});(0,e.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=()=>{let t=e.children.item(m);if(!t)return;let n={x:t.offsetLeft,width:t.offsetWidth};_(e=>e.x===n.x&&e.width===n.width?e:n)};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[m]);let v={"--tintora-toggle-thumb-x":`${g.x}px`,"--tintora-toggle-thumb-width":`${g.width}px`};return(0,t.jsx)(w.Provider,{value:{value:p,select:e=>{e!==p&&(f||d(e),o?.(e))},disabled:s},children:(0,t.jsxs)(`div`,{...l,role:`group`,ref:h,className:r(`tintora-toggle`,s&&`tintora-toggle--disabled`,c),children:[n,(0,t.jsx)(`span`,{"aria-hidden":`true`,className:`tintora-toggle__thumb`,style:v})]})})}function D({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=T(),l=t=>{o?.(t),t.defaultPrevented||c.select(e)};return(0,t.jsx)(`button`,{...s,type:`button`,className:r(`tintora-toggle__item`,i),"aria-pressed":c.value===e,disabled:a||c.disabled,onClick:l,children:n})}exports.Avatar=a,exports.Button=c,exports.Card=l,exports.Chip=d,exports.Dot=f,exports.IconButton=m,exports.ProgressBar=h,exports.SearchInput=g,exports.Select=x,exports.SelectableCard=u,exports.Spinner=s,exports.Tag=S,exports.TextField=C,exports.Toggle=E,exports.ToggleItem=D;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ export { Card, SelectableCard, type CardProps, type SelectableCardProps, } from
|
|
|
5
5
|
export { Chip } from './Chip/Chip';
|
|
6
6
|
export { Dot } from './Dot/Dot';
|
|
7
7
|
export { IconButton } from './IconButton/IconButton';
|
|
8
|
+
export { ProgressBar, type ProgressBarProps } from './ProgressBar/ProgressBar';
|
|
8
9
|
export { SearchInput } from './SearchInput/SearchInput';
|
|
9
10
|
export { Select } from './Select/Select';
|
|
11
|
+
export { Spinner } from './Spinner/Spinner';
|
|
10
12
|
export { Tag } from './Tag/Tag';
|
|
11
13
|
export { TextField } from './TextField/TextField';
|
|
12
14
|
export { Toggle, type ToggleProps } from './Toggle/Toggle';
|
package/dist/index.js
CHANGED
|
@@ -40,17 +40,72 @@ function f({ name: e, src: t, size: n = "medium", className: r, ...i }) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
+
//#region src/Spinner/Spinner.tsx
|
|
44
|
+
var p = {
|
|
45
|
+
small: {
|
|
46
|
+
width: 16,
|
|
47
|
+
height: 16,
|
|
48
|
+
strokeWidth: 3.5
|
|
49
|
+
},
|
|
50
|
+
medium: {
|
|
51
|
+
width: 24,
|
|
52
|
+
height: 24,
|
|
53
|
+
strokeWidth: 3
|
|
54
|
+
},
|
|
55
|
+
large: {
|
|
56
|
+
width: 40,
|
|
57
|
+
height: 40,
|
|
58
|
+
strokeWidth: 2.4
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
function m({ size: e = "medium", color: t = "accent" }) {
|
|
62
|
+
let { width: n, height: r, strokeWidth: i } = p[e];
|
|
63
|
+
return /* @__PURE__ */ c("svg", {
|
|
64
|
+
className: "tintora-spinner",
|
|
65
|
+
width: n,
|
|
66
|
+
height: r,
|
|
67
|
+
viewBox: "0 0 24 24",
|
|
68
|
+
fill: "none",
|
|
69
|
+
role: "img",
|
|
70
|
+
"aria-label": "Loading",
|
|
71
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
72
|
+
cx: "12",
|
|
73
|
+
cy: "12",
|
|
74
|
+
r: "9",
|
|
75
|
+
stroke: "currentColor",
|
|
76
|
+
strokeOpacity: t === "accent" ? .25 : .35,
|
|
77
|
+
strokeWidth: i
|
|
78
|
+
}), /* @__PURE__ */ s("path", {
|
|
79
|
+
d: "M21 12a9 9 0 0 0-9-9",
|
|
80
|
+
stroke: t === "accent" ? "var(--tintora-control-fill)" : "currentColor",
|
|
81
|
+
strokeWidth: i,
|
|
82
|
+
strokeLinecap: "round"
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
43
87
|
//#region src/Button/Button.tsx
|
|
44
|
-
function
|
|
88
|
+
function h({ children: e, className: t, variant: n, size: r = "medium", leadingIcon: i, trailingIcon: a, type: o = "button", loading: l = !1, disabled: d, ...f }) {
|
|
45
89
|
return /* @__PURE__ */ c("button", {
|
|
46
90
|
type: o,
|
|
47
91
|
className: u("tintora-button", `tintora-button--${n}`, `tintora-button--${r}`, {
|
|
48
|
-
"tintora-button--leading-icon": !!i,
|
|
92
|
+
"tintora-button--leading-icon": !!i || l,
|
|
93
|
+
"tintora-button--loading": l,
|
|
49
94
|
"tintora-button--trailing-icon": !!a
|
|
50
95
|
}, t),
|
|
51
|
-
|
|
96
|
+
disabled: d || l,
|
|
97
|
+
"aria-busy": l || void 0,
|
|
98
|
+
...f,
|
|
52
99
|
children: [
|
|
53
|
-
|
|
100
|
+
l && /* @__PURE__ */ s("span", {
|
|
101
|
+
className: "tintora-button__icon",
|
|
102
|
+
"aria-hidden": "true",
|
|
103
|
+
children: /* @__PURE__ */ s(m, {
|
|
104
|
+
size: "small",
|
|
105
|
+
color: "current"
|
|
106
|
+
})
|
|
107
|
+
}),
|
|
108
|
+
!l && i && /* @__PURE__ */ s("span", {
|
|
54
109
|
className: "tintora-button__icon",
|
|
55
110
|
"aria-hidden": "true",
|
|
56
111
|
children: i
|
|
@@ -66,13 +121,13 @@ function p({ children: e, className: t, variant: n, size: r = "medium", leadingI
|
|
|
66
121
|
}
|
|
67
122
|
//#endregion
|
|
68
123
|
//#region src/Card/Card.tsx
|
|
69
|
-
function
|
|
124
|
+
function g({ as: e = "article", variant: t = "surface", className: n, ...r }) {
|
|
70
125
|
return /* @__PURE__ */ s(e, {
|
|
71
126
|
...r,
|
|
72
127
|
className: u("tintora-card", `tintora-card--${t}`, n)
|
|
73
128
|
});
|
|
74
129
|
}
|
|
75
|
-
function
|
|
130
|
+
function _({ selected: e = !1, className: t, ...n }) {
|
|
76
131
|
return /* @__PURE__ */ s("button", {
|
|
77
132
|
...n,
|
|
78
133
|
type: "button",
|
|
@@ -82,7 +137,7 @@ function h({ selected: e = !1, className: t, ...n }) {
|
|
|
82
137
|
}
|
|
83
138
|
//#endregion
|
|
84
139
|
//#region src/Chip/Chip.tsx
|
|
85
|
-
function
|
|
140
|
+
function v({ children: e, selected: t, className: n, "aria-pressed": r, ...i }) {
|
|
86
141
|
return /* @__PURE__ */ s("button", {
|
|
87
142
|
...i,
|
|
88
143
|
type: "button",
|
|
@@ -93,7 +148,7 @@ function g({ children: e, selected: t, className: n, "aria-pressed": r, ...i })
|
|
|
93
148
|
}
|
|
94
149
|
//#endregion
|
|
95
150
|
//#region src/Dot/Dot.tsx
|
|
96
|
-
function
|
|
151
|
+
function y({ variant: e = "unread", label: t, className: n, ...r }) {
|
|
97
152
|
return /* @__PURE__ */ s("span", {
|
|
98
153
|
...r,
|
|
99
154
|
className: u("tintora-dot", `tintora-dot--${e}`, n),
|
|
@@ -104,16 +159,16 @@ function _({ variant: e = "unread", label: t, className: n, ...r }) {
|
|
|
104
159
|
}
|
|
105
160
|
//#endregion
|
|
106
161
|
//#region src/IconButton/IconButton.tsx
|
|
107
|
-
var
|
|
162
|
+
var b = {
|
|
108
163
|
round: "secondary",
|
|
109
164
|
field: "secondary",
|
|
110
165
|
nav: "ghost"
|
|
111
166
|
};
|
|
112
|
-
function
|
|
167
|
+
function x({ icon: e, variant: t = "round", size: n, selected: r, className: i, ...a }) {
|
|
113
168
|
let o = t === "round" ? n ?? "large" : void 0;
|
|
114
|
-
return /* @__PURE__ */ s(
|
|
169
|
+
return /* @__PURE__ */ s(h, {
|
|
115
170
|
...a,
|
|
116
|
-
variant:
|
|
171
|
+
variant: b[t],
|
|
117
172
|
"aria-current": r ? "page" : void 0,
|
|
118
173
|
className: u("tintora-icon-button", `tintora-icon-button--${t}`, o && `tintora-icon-button--${o}`, i),
|
|
119
174
|
...o && { size: o },
|
|
@@ -125,8 +180,42 @@ function y({ icon: e, variant: t = "round", size: n, selected: r, className: i,
|
|
|
125
180
|
});
|
|
126
181
|
}
|
|
127
182
|
//#endregion
|
|
183
|
+
//#region src/ProgressBar/ProgressBar.tsx
|
|
184
|
+
function S({ title: e, progress: t, indeterminate: n, valueLabel: i, className: a, "aria-label": o }) {
|
|
185
|
+
let l = r(), d = n ? void 0 : Math.min(100, Math.max(0, Number.isFinite(t) ? t : 0)), f = d === 100, p = i ?? (n ? "Indeterminate" : `${d}%`);
|
|
186
|
+
return /* @__PURE__ */ c("div", {
|
|
187
|
+
className: u("tintora-progress-bar", a),
|
|
188
|
+
children: [e && /* @__PURE__ */ c("div", {
|
|
189
|
+
className: "tintora-progress-bar__header",
|
|
190
|
+
children: [/* @__PURE__ */ s("span", {
|
|
191
|
+
id: l,
|
|
192
|
+
children: e
|
|
193
|
+
}), /* @__PURE__ */ s("span", {
|
|
194
|
+
className: "tintora-progress-bar__value",
|
|
195
|
+
children: p
|
|
196
|
+
})]
|
|
197
|
+
}), /* @__PURE__ */ s("div", {
|
|
198
|
+
role: "progressbar",
|
|
199
|
+
"aria-label": o,
|
|
200
|
+
"aria-labelledby": e ? l : void 0,
|
|
201
|
+
"aria-valuemin": n ? void 0 : 0,
|
|
202
|
+
"aria-valuemax": n ? void 0 : 100,
|
|
203
|
+
"aria-valuenow": d,
|
|
204
|
+
"aria-valuetext": i,
|
|
205
|
+
className: "tintora-progress-bar__track",
|
|
206
|
+
children: /* @__PURE__ */ s("div", {
|
|
207
|
+
className: u("tintora-progress-bar__fill", {
|
|
208
|
+
"tintora-progress-bar__fill--indeterminate": n,
|
|
209
|
+
"tintora-progress-bar__fill--complete": f
|
|
210
|
+
}),
|
|
211
|
+
style: d === void 0 ? void 0 : { width: `${d}%` }
|
|
212
|
+
})
|
|
213
|
+
})]
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
128
217
|
//#region src/SearchInput/SearchInput.tsx
|
|
129
|
-
function
|
|
218
|
+
function C({ className: e, disabled: t, ...n }) {
|
|
130
219
|
return /* @__PURE__ */ c("label", {
|
|
131
220
|
className: u("tintora-search-input", t && "tintora-search-input--disabled", e),
|
|
132
221
|
children: [/* @__PURE__ */ c("svg", {
|
|
@@ -152,15 +241,15 @@ function b({ className: e, disabled: t, ...n }) {
|
|
|
152
241
|
}
|
|
153
242
|
//#endregion
|
|
154
243
|
//#region src/Select/SelectContext.ts
|
|
155
|
-
var
|
|
156
|
-
let e = t(
|
|
244
|
+
var w = e(null), T = () => {
|
|
245
|
+
let e = t(w);
|
|
157
246
|
if (!e) throw Error("SelectOption must be rendered inside a Select");
|
|
158
247
|
return e;
|
|
159
248
|
};
|
|
160
249
|
//#endregion
|
|
161
250
|
//#region src/Select/SelectOption.tsx
|
|
162
|
-
function
|
|
163
|
-
let { select: r, activate: i, optionId: a, value: o, activeValue: c } =
|
|
251
|
+
function E({ label: e, value: t, disabled: n }) {
|
|
252
|
+
let { select: r, activate: i, optionId: a, value: o, activeValue: c } = T();
|
|
164
253
|
return /* @__PURE__ */ s("div", {
|
|
165
254
|
id: a(t),
|
|
166
255
|
role: "option",
|
|
@@ -174,9 +263,9 @@ function C({ label: e, value: t, disabled: n }) {
|
|
|
174
263
|
}
|
|
175
264
|
//#endregion
|
|
176
265
|
//#region src/Select/Select.tsx
|
|
177
|
-
var
|
|
178
|
-
function
|
|
179
|
-
let
|
|
266
|
+
var D = 4;
|
|
267
|
+
function O({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f, onValueChange: p, name: m, className: h, onClick: g, onKeyDown: _, onKeyUp: v, "aria-label": y, ...b }) {
|
|
268
|
+
let x = r(), S = a(null), C = a(null), T = a(null), [O, k] = o(e ?? null), [A, j] = o(!1), [M, N] = o(-1), [P, F] = o({}), I = d !== void 0, L = I ? d : O, R = t.findIndex((e) => e.value === L), z = (e) => t[e]?.disabled !== !0, B = () => t.findIndex((e, t) => z(t)), V = (e, n) => {
|
|
180
269
|
for (let r = e + n; r >= 0 && r < t.length; r += n) if (z(r)) return r;
|
|
181
270
|
return e;
|
|
182
271
|
}, H = () => {
|
|
@@ -210,11 +299,11 @@ function T({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
210
299
|
}, J = (e) => {
|
|
211
300
|
v?.(e), e.key === " " && e.preventDefault();
|
|
212
301
|
}, Y = () => {
|
|
213
|
-
let e =
|
|
302
|
+
let e = T.current, t = C.current;
|
|
214
303
|
if (!e || !t) return;
|
|
215
|
-
let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom +
|
|
304
|
+
let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom + D + r <= window.innerHeight, a = n.top - D - r >= 0;
|
|
216
305
|
F({
|
|
217
|
-
top: i || !a ? n.bottom +
|
|
306
|
+
top: i || !a ? n.bottom + D : n.top - D - r,
|
|
218
307
|
left: n.left,
|
|
219
308
|
minWidth: n.width
|
|
220
309
|
});
|
|
@@ -222,22 +311,22 @@ function T({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
222
311
|
g?.(e), !e.defaultPrevented && (A ? G() : W());
|
|
223
312
|
};
|
|
224
313
|
i(() => {
|
|
225
|
-
A && (
|
|
314
|
+
A && (T.current?.showPopover(), Y());
|
|
226
315
|
}, [A]), n(() => {
|
|
227
316
|
if (!A) return;
|
|
228
317
|
let e = (e) => {
|
|
229
|
-
|
|
318
|
+
S.current?.contains(e.target) || G();
|
|
230
319
|
}, t = (e) => {
|
|
231
|
-
|
|
320
|
+
T.current?.contains(e.target) || Y();
|
|
232
321
|
};
|
|
233
322
|
return document.addEventListener("pointerdown", e), window.addEventListener("scroll", t, !0), window.addEventListener("resize", Y), () => {
|
|
234
323
|
document.removeEventListener("pointerdown", e), window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", Y);
|
|
235
324
|
};
|
|
236
325
|
}, [A]), n(() => {
|
|
237
|
-
A && M >= 0 &&
|
|
326
|
+
A && M >= 0 && T.current?.children.item(M)?.scrollIntoView?.({ block: "nearest" });
|
|
238
327
|
}, [A, M]);
|
|
239
|
-
let Z = (e) => `${
|
|
240
|
-
return /* @__PURE__ */ s(
|
|
328
|
+
let Z = (e) => `${x}-option-${U(e)}`, Q = A ? t[M]?.value ?? null : null, $ = t[R]?.label;
|
|
329
|
+
return /* @__PURE__ */ s(w.Provider, {
|
|
241
330
|
value: {
|
|
242
331
|
value: L,
|
|
243
332
|
activeValue: Q,
|
|
@@ -246,18 +335,18 @@ function T({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
246
335
|
activate: (e) => N(U(e))
|
|
247
336
|
},
|
|
248
337
|
children: /* @__PURE__ */ c("div", {
|
|
249
|
-
ref:
|
|
338
|
+
ref: S,
|
|
250
339
|
className: "tintora-select",
|
|
251
340
|
children: [
|
|
252
341
|
/* @__PURE__ */ c("button", {
|
|
253
342
|
...b,
|
|
254
|
-
ref:
|
|
343
|
+
ref: C,
|
|
255
344
|
type: "button",
|
|
256
345
|
role: "combobox",
|
|
257
346
|
"aria-label": y,
|
|
258
347
|
"aria-haspopup": "listbox",
|
|
259
348
|
"aria-expanded": A,
|
|
260
|
-
"aria-controls": A ?
|
|
349
|
+
"aria-controls": A ? x : void 0,
|
|
261
350
|
"aria-activedescendant": Q === null ? void 0 : Z(Q),
|
|
262
351
|
disabled: l,
|
|
263
352
|
className: u("tintora-select__trigger", h),
|
|
@@ -282,15 +371,15 @@ function T({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
282
371
|
})]
|
|
283
372
|
}),
|
|
284
373
|
A && /* @__PURE__ */ s("div", {
|
|
285
|
-
ref:
|
|
286
|
-
id:
|
|
374
|
+
ref: T,
|
|
375
|
+
id: x,
|
|
287
376
|
role: "listbox",
|
|
288
377
|
"aria-label": y,
|
|
289
378
|
popover: "manual",
|
|
290
379
|
className: "tintora-select__menu",
|
|
291
380
|
style: P,
|
|
292
381
|
onMouseDown: (e) => e.preventDefault(),
|
|
293
|
-
children: t.map((e) => /* @__PURE__ */ s(
|
|
382
|
+
children: t.map((e) => /* @__PURE__ */ s(E, { ...e }, e.value))
|
|
294
383
|
}),
|
|
295
384
|
m && /* @__PURE__ */ s("input", {
|
|
296
385
|
type: "hidden",
|
|
@@ -304,7 +393,7 @@ function T({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
304
393
|
}
|
|
305
394
|
//#endregion
|
|
306
395
|
//#region src/Tag/Tag.tsx
|
|
307
|
-
function
|
|
396
|
+
function k({ children: e, className: t, variant: n = "neutral", size: r = "medium", ...i }) {
|
|
308
397
|
return /* @__PURE__ */ s("span", {
|
|
309
398
|
...i,
|
|
310
399
|
className: u("tintora-tag", `tintora-tag--${n}`, `tintora-tag--${r}`, t),
|
|
@@ -313,7 +402,7 @@ function E({ children: e, className: t, variant: n = "neutral", size: r = "mediu
|
|
|
313
402
|
}
|
|
314
403
|
//#endregion
|
|
315
404
|
//#region src/TextField/TextField.tsx
|
|
316
|
-
function
|
|
405
|
+
function A({ label: e, hint: t, error: n, id: i, className: a, disabled: o, "aria-describedby": l, "aria-invalid": d, ...f }) {
|
|
317
406
|
let p = r(), m = i ?? p, h = `${m}-message`, g = n ?? t;
|
|
318
407
|
return /* @__PURE__ */ c("div", {
|
|
319
408
|
className: u("tintora-textfield", o && "tintora-textfield--disabled", a),
|
|
@@ -341,15 +430,15 @@ function D({ label: e, hint: t, error: n, id: i, className: a, disabled: o, "ari
|
|
|
341
430
|
}
|
|
342
431
|
//#endregion
|
|
343
432
|
//#region src/Toggle/ToggleContext.ts
|
|
344
|
-
var
|
|
345
|
-
function
|
|
346
|
-
let e = t(
|
|
433
|
+
var j = e(null);
|
|
434
|
+
function M() {
|
|
435
|
+
let e = t(j);
|
|
347
436
|
if (!e) throw Error("ToggleItem must be rendered inside a Toggle");
|
|
348
437
|
return e;
|
|
349
438
|
}
|
|
350
439
|
//#endregion
|
|
351
440
|
//#region src/Toggle/Toggle.tsx
|
|
352
|
-
function
|
|
441
|
+
function N({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: l = !1, className: d, ...f }) {
|
|
353
442
|
let [p, m] = o(n), h = t !== void 0, g = h ? t : p, _ = e.findIndex((e) => e.props.value === g), v = a(null), [y, b] = o({
|
|
354
443
|
x: 0,
|
|
355
444
|
width: 0
|
|
@@ -376,7 +465,7 @@ function A({ children: e, value: t, defaultValue: n, onValueChange: r, disabled:
|
|
|
376
465
|
"--tintora-toggle-thumb-x": `${y.x}px`,
|
|
377
466
|
"--tintora-toggle-thumb-width": `${y.width}px`
|
|
378
467
|
};
|
|
379
|
-
return /* @__PURE__ */ s(
|
|
468
|
+
return /* @__PURE__ */ s(j.Provider, {
|
|
380
469
|
value: {
|
|
381
470
|
value: g,
|
|
382
471
|
select: (e) => {
|
|
@@ -399,8 +488,8 @@ function A({ children: e, value: t, defaultValue: n, onValueChange: r, disabled:
|
|
|
399
488
|
}
|
|
400
489
|
//#endregion
|
|
401
490
|
//#region src/Toggle/ToggleItem.tsx
|
|
402
|
-
function
|
|
403
|
-
let o =
|
|
491
|
+
function P({ value: e, children: t, className: n, disabled: r, onClick: i, ...a }) {
|
|
492
|
+
let o = M(), c = (t) => {
|
|
404
493
|
i?.(t), t.defaultPrevented || o.select(e);
|
|
405
494
|
};
|
|
406
495
|
return /* @__PURE__ */ s("button", {
|
|
@@ -414,4 +503,4 @@ function j({ value: e, children: t, className: n, disabled: r, onClick: i, ...a
|
|
|
414
503
|
});
|
|
415
504
|
}
|
|
416
505
|
//#endregion
|
|
417
|
-
export { f as Avatar,
|
|
506
|
+
export { f as Avatar, h as Button, g as Card, v as Chip, y as Dot, x as IconButton, S as ProgressBar, C as SearchInput, O as Select, _ as SelectableCard, m as Spinner, k as Tag, A as TextField, N as Toggle, P as ToggleItem };
|
package/dist/tintora.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--tintora-color-accent:#ee6b25;--tintora-color-accent-deep:#c94e0c;--tintora-color-success:#4cc56b;--tintora-color-planned:#f2698c;--tintora-color-heart:#c42a56;--tintora-color-steps:#1f7a38;--tintora-color-sleep:#2f4fc4;--tintora-color-ink:#1d1c1c;--tintora-color-on-accent:#1d0e04;--tintora-color-on-accent-deep:#fff;--tintora-color-on-success:#0d200f;--tintora-color-on-planned:#260a13;--tintora-color-on-heart:#fff;--tintora-color-on-steps:#fff;--tintora-color-on-sleep:#fff;--tintora-text-on-card-muted:#55524f;--tintora-chip-fg:#3c3a38;--tintora-chip-bg:#efedeb;--tintora-chip-bg-hover:#e4e1de;--tintora-chip-selected-fg:#8f3604;--tintora-chip-selected-bg:#fff;--tintora-tint-accent:#fdeadd;--tintora-tint-heart:#fbe0e8;--tintora-tint-steps:#dcf3e1;--tintora-tint-sleep:#e0e7fb;--tintora-menu-bg:#fff;--tintora-menu-border:#1d1c1c1a;--tintora-menu-shadow:0 16px 32px #00000038;--tintora-menu-item-hover:#1d1c1c12;--tintora-menu-item-destructive:#b3261e;--tintora-font-family:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--tintora-font-weight-regular:400;--tintora-font-weight-medium:500;--tintora-font-weight-semibold:600;--tintora-font-weight-bold:700;--tintora-font-weight-extrabold:800;--tintora-line-height-tight:1.2;--tintora-font-display:700 1.625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-title:700 1.125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-heading:700 .9375rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-label:700 .78125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-body:500 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-caption:400 .6875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-stat-value:800 1.5625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-radius-8:8px;--tintora-radius-12:12px;--tintora-radius-14:14px;--tintora-radius-16:16px;--tintora-radius-18:18px;--tintora-radius-20:20px;--tintora-radius-26:26px;--tintora-radius-32:32px;--tintora-radius-40:40px;--tintora-radius-pill:9999px;--tintora-radius-card:var(--tintora-radius-20);--tintora-radius-panel:var(--tintora-radius-32);--tintora-shadow-selected:0 14px 30px #c94e0c73;--tintora-shadow-primary:0 8px 20px #c94e0c59;--tintora-shadow-accent:0 8px 20px #ee6b2566;--tintora-shadow-focus-ring:0 0 0 3px #ee6b2547;--tintora-opacity-disabled:.45}:root,[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--tintora-bg:linear-gradient(180deg, #3e3b3a, #222020);--tintora-surface-glass:linear-gradient(180deg, #3e3b3acc, #222020e6);--tintora-surface-card:#fbfaf9;--tintora-surface-row:#ffffff0f;--tintora-surface-field:#100f0f9e;--tintora-surface-menu:#1e1c1cf7;--tintora-text:#fff;--tintora-text-muted:#ffffffb8;--tintora-text-faint:#ffffffa6;--tintora-text-nav-idle:#ffffffc7;--tintora-text-day:#ffffffd1;--tintora-text-error:#ff9a8a;--tintora-border-glass:#ffffff14;--tintora-border-card:transparent;--tintora-border-row:#ffffff0f;--tintora-border-field:#ffffff14;--tintora-border-field-hover:#ffffff52;--tintora-line:#ffffff1a;--tintora-line-strong:#ffffff52;--tintora-fill-subtle:#ffffff1a;--tintora-fill-subtle-hover:#fff3;--tintora-fill-subtle-pressed:#ffffff47;--tintora-fill-ghost-hover:#ffffff1f;--tintora-fill-day-hover:#ffffff24;--tintora-tag-bg:#ffffff24;--tintora-tag-fg:#fff;--tintora-focus:#ee6b25;--tintora-ring:#fff;--tintora-shadow-glass:0 30px 60px #00000059;--tintora-shadow-card:0 10px 24px #0000002e;--tintora-shadow-card-hover:0 18px 36px #00000052}[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:#1d1c1c;--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:#b3261e;--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:#1d1c1c;--tintora-focus:#c94e0c;--tintora-ring:#1d1c1c;--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033}@media (prefers-color-scheme:light){:root:not([data-theme]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:#1d1c1c;--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:#b3261e;--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:#1d1c1c;--tintora-focus:#c94e0c;--tintora-ring:#1d1c1c;--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033}}.tintora-avatar{border-radius:var(--tintora-radius-pill);color:var(--tintora-color-ink);font:var(--tintora-font-body);font-size:var(--tintora-avatar-font-size);font-weight:var(--tintora-font-weight-bold);background:linear-gradient(135deg,#f1d9bf,#c9a07a);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tintora-avatar>img{object-fit:cover;width:100%;height:100%}.tintora-avatar--small{--tintora-avatar-font-size:.6875rem;width:32px;height:32px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--medium{--tintora-avatar-font-size:.8125rem;width:40px;height:40px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--large{--tintora-avatar-font-size:.875rem;width:44px;height:44px;font-weight:var(--tintora-font-weight-bold)}.tintora-button{--tintora-button-border:1px solid transparent;box-sizing:border-box;cursor:pointer;outline-offset:2px;height:var(--tintora-button-height);padding:0 var(--tintora-button-padding-x);border:var(--tintora-button-border);border-radius:var(--tintora-button-border-radius);font-family:inherit;font-size:var(--tintora-button-font-size);font-weight:var(--tintora-button-font-weight);color:var(--tintora-button-fg);background-color:var(--tintora-button-bg);box-shadow:var(--tintora-button-shadow,none);outline:none;justify-content:center;align-items:center;gap:8px;display:inline-flex}.tintora-button--small{--tintora-button-height:32px;--tintora-button-padding-x:14px;--tintora-button-border-radius:16px;--tintora-button-font-size:12px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--medium{--tintora-button-height:40px;--tintora-button-padding-x:18px;--tintora-button-border-radius:20px;--tintora-button-font-size:13px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--large{--tintora-button-height:48px;--tintora-button-padding-x:24px;--tintora-button-border-radius:24px;--tintora-button-font-size:14px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button__icon{flex-shrink:0;display:inline-flex}.tintora-button--leading-icon{padding-inline-start:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--trailing-icon{padding-inline-end:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--primary{--tintora-button-fg:var(--tintora-color-on-accent-deep);--tintora-button-bg:var(--tintora-color-accent-deep);--tintora-button-shadow:var(--tintora-shadow-primary);--tintora-button-filter-hover:brightness(1.14);--tintora-button-filter-pressed:brightness(.9)}.tintora-button--secondary{--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-fill-subtle);--tintora-button-bg-hover:var(--tintora-fill-subtle-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle-pressed)}.tintora-button--outline{--tintora-button-border:1px solid var(--tintora-line-strong);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button--ghost{--tintora-button-fg:var(--tintora-text-muted);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button:enabled:hover{color:var(--tintora-button-fg-hover,var(--tintora-button-fg));background-color:var(--tintora-button-bg-hover,var(--tintora-button-bg));filter:var(--tintora-button-filter-hover,none)}.tintora-button:enabled:active{color:var(--tintora-button-fg-pressed,var(--tintora-button-fg));background-color:var(--tintora-button-bg-pressed,var(--tintora-button-bg));filter:var(--tintora-button-filter-pressed,none);transform:translateY(1px)}.tintora-button:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-button:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed;box-shadow:none}.tintora-card{box-sizing:border-box;font:inherit;text-align:start;border:1px solid #0000;justify-content:space-between;align-items:center;gap:12px;margin:0;display:flex}.tintora-card--surface{border-color:var(--tintora-border-card);border-radius:var(--tintora-radius-card);background:var(--tintora-surface-card);box-shadow:var(--tintora-shadow-card);color:var(--tintora-color-ink);--tintora-card-text-muted:var(--tintora-text-on-card-muted);padding:18px 18px 18px 20px}.tintora-card--row{border-color:var(--tintora-border-row);border-radius:var(--tintora-radius-18);background:var(--tintora-surface-row);color:var(--tintora-text);--tintora-card-text-muted:var(--tintora-text-faint);justify-content:flex-start;padding:10px 6px 10px 10px}.tintora-card--selectable{cursor:pointer;width:100%}@media (prefers-reduced-motion:no-preference){.tintora-card--selectable{transition:transform .15s,box-shadow .15s,background-color .15s}}.tintora-card--selectable:not(.tintora-card--selected):hover{box-shadow:var(--tintora-shadow-card-hover);transform:translateY(-3px)}.tintora-card--selectable:focus-visible{outline:2px solid var(--tintora-focus);outline-offset:2px}.tintora-card--selectable:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-card--selected{background:var(--tintora-color-accent-deep);box-shadow:var(--tintora-shadow-selected);color:var(--tintora-color-on-accent-deep);--tintora-card-text-muted:var(--tintora-color-on-accent-deep);border-color:#0000}.tintora-card--selected .tintora-tag--card{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-chip{border-radius:var(--tintora-radius-12);background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg);font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);cursor:pointer;outline-offset:2px;border:0;outline:none;align-items:center;padding:6px 12px;display:inline-flex}.tintora-chip:enabled:hover:not([aria-pressed=true]){background-color:var(--tintora-chip-bg-hover)}.tintora-chip[aria-pressed=true]{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-chip:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-chip:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-dot{box-sizing:border-box;forced-color-adjust:none;flex-shrink:0;display:inline-block}.tintora-dot--unread{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);width:8px;height:8px}.tintora-dot--read{border-radius:var(--tintora-radius-pill);border:1.5px solid var(--tintora-text-faint);width:8px;height:8px}.tintora-dot--tick{background-color:var(--tintora-color-accent);border-radius:2px;width:3px;height:15px}.tintora-button.tintora-icon-button{--tintora-button-padding-x:0px}.tintora-icon-button{width:var(--tintora-button-height);flex-shrink:0}.tintora-icon-button__icon{display:inline-flex}.tintora-icon-button__icon svg{width:var(--tintora-icon-button-icon-size);height:var(--tintora-icon-button-icon-size)}.tintora-icon-button.tintora-icon-button--small{--tintora-button-height:32px;--tintora-icon-button-icon-size:14px}.tintora-icon-button.tintora-icon-button--medium{--tintora-button-height:36px;--tintora-icon-button-icon-size:15px}.tintora-icon-button.tintora-icon-button--large{--tintora-button-height:44px;--tintora-icon-button-icon-size:18px}.tintora-icon-button.tintora-icon-button--round{--tintora-button-border-radius:var(--tintora-radius-pill)}.tintora-icon-button.tintora-icon-button--field{--tintora-button-height:48px;--tintora-button-border-radius:var(--tintora-radius-pill);--tintora-button-border:1px solid var(--tintora-border-field);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-surface-field);--tintora-button-bg-hover:var(--tintora-surface-field);--tintora-button-bg-pressed:var(--tintora-fill-subtle);--tintora-icon-button-icon-size:18px}.tintora-icon-button--field:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-icon-button--field:enabled:active{border-color:var(--tintora-border-field)}.tintora-icon-button.tintora-icon-button--nav{--tintora-button-height:44px;--tintora-button-border-radius:var(--tintora-radius-14);--tintora-button-fg:var(--tintora-text-nav-idle);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-ghost-hover);--tintora-icon-button-icon-size:20px}.tintora-icon-button.tintora-icon-button--nav[aria-current=page]{--tintora-button-fg:#fff;--tintora-button-fg-hover:#fff;--tintora-button-fg-pressed:#fff;--tintora-button-bg:var(--tintora-color-accent);--tintora-button-bg-hover:var(--tintora-color-accent);--tintora-button-bg-pressed:var(--tintora-color-accent);--tintora-button-shadow:var(--tintora-shadow-accent)}.tintora-search-input{--tintora-search-input-font-size:.8125rem;--tintora-search-input-clear-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-pill);height:48px;color:var(--tintora-text-muted);background-color:var(--tintora-surface-field);align-items:center;gap:10px;padding:0 18px;display:flex}.tintora-search-input--disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-search-input__icon{flex-shrink:0;width:16px;height:16px}.tintora-search-input__input{min-width:0;font-family:inherit;font-size:var(--tintora-search-input-font-size);color:var(--tintora-text);background:0 0;border:0;outline:0;flex:1;padding:0}.tintora-search-input__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-search-input__input:disabled{cursor:not-allowed}.tintora-search-input__input::-webkit-search-decoration{display:none}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input:not(.tintora-search-input--disabled):hover{border-color:var(--tintora-border-field-hover)}.tintora-search-input:focus-within{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input__input::-webkit-search-cancel-button:hover{background-color:var(--tintora-focus)}.tintora-select{--tintora-select-font-size:.71875rem;display:inline-block;position:relative}.tintora-select__trigger{box-sizing:border-box;border-radius:var(--tintora-radius-14);height:28px;font-family:inherit;font-size:var(--tintora-select-font-size);font-weight:var(--tintora-font-weight-medium);color:var(--tintora-chip-fg);background-color:var(--tintora-chip-bg);cursor:pointer;border:0;align-items:center;gap:6px;padding:0 12px;display:inline-flex}.tintora-select__trigger:enabled:hover,.tintora-select__trigger[aria-expanded=true]{background-color:var(--tintora-chip-bg-hover)}.tintora-select__trigger:focus-visible{box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-select__trigger:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-select__value--placeholder{color:var(--tintora-text-on-card-muted)}.tintora-select__chevron{flex-shrink:0}.tintora-select__trigger[aria-expanded=true] .tintora-select__chevron{transform:rotate(180deg)}.tintora-select__menu{box-sizing:border-box;border:1px solid var(--tintora-menu-border);border-radius:var(--tintora-radius-14);max-height:50vh;color:var(--tintora-color-ink);background:var(--tintora-menu-bg);box-shadow:var(--tintora-menu-shadow);flex-direction:column;gap:2px;margin:0;padding:6px;display:flex;inset:auto;overflow-y:auto}.tintora-select__option{box-sizing:border-box;border-radius:var(--tintora-radius-12);min-height:32px;font:var(--tintora-font-body);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;padding:0 10px;display:flex}.tintora-select__option--active{background:var(--tintora-menu-item-hover)}.tintora-select__option[aria-selected=true]{font-weight:var(--tintora-font-weight-bold);color:var(--tintora-color-accent-deep);background:var(--tintora-tint-accent)}.tintora-select__option[aria-disabled=true]{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}@media (pointer:coarse){.tintora-select__option{min-height:44px}}@media (forced-colors:active){.tintora-select__option--active{outline-offset:-2px;outline:2px solid highlight}}.tintora-tag{white-space:nowrap;font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);display:inline-block}.tintora-tag--neutral{background-color:var(--tintora-tag-bg);color:var(--tintora-tag-fg)}.tintora-tag--success{background-color:var(--tintora-color-success);color:var(--tintora-color-on-success)}.tintora-tag--accent{background-color:var(--tintora-color-accent-deep);color:var(--tintora-color-on-accent-deep);font-weight:var(--tintora-font-weight-bold)}.tintora-tag--card{background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg)}.tintora-tag--small{border-radius:var(--tintora-radius-8);padding:2px 8px}.tintora-tag--medium{border-radius:var(--tintora-radius-8);padding:3px 9px}.tintora-tag--large{border-radius:var(--tintora-radius-12);padding:5px 12px}.tintora-textfield{--tintora-textfield-font-size:.8125rem;flex-direction:column;gap:8px;display:inline-flex}.tintora-textfield--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-textfield__label{font:var(--tintora-font-body);font-weight:var(--tintora-font-weight-semibold);color:var(--tintora-text)}.tintora-textfield__input{box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-16);height:48px;font-family:inherit;font-size:var(--tintora-textfield-font-size);color:var(--tintora-text);background-color:var(--tintora-surface-field);padding:0 16px}.tintora-textfield__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-textfield__input:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-textfield__input:focus-visible{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-textfield__input[aria-invalid=true]{border-color:var(--tintora-text-error)}.tintora-textfield__input:disabled{cursor:not-allowed}.tintora-textfield__hint{font:var(--tintora-font-caption);color:var(--tintora-text-faint)}.tintora-textfield__hint--error{color:var(--tintora-text-error)}.tintora-toggle{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-fill-subtle);gap:4px;padding:5px;display:inline-flex;position:relative}.tintora-toggle--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-toggle__item{box-sizing:border-box;border-radius:var(--tintora-radius-pill);min-width:34px;height:34px;color:var(--tintora-text-nav-idle);font:var(--tintora-font-label);cursor:pointer;outline-offset:2px;z-index:1;background:0 0;border:0;outline:none;justify-content:center;align-items:center;padding:0 8px;transition:color .2s;display:inline-flex}.tintora-toggle__item[aria-pressed=true]{color:#fff}.tintora-toggle__thumb{width:var(--tintora-toggle-thumb-width);border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);transform:translateX(var(--tintora-toggle-thumb-x));pointer-events:none;transition:transform .2s;position:absolute;inset-block:5px;inset-inline-start:0}@media (prefers-reduced-motion:reduce){.tintora-toggle__thumb,.tintora-toggle__item{transition:none}}.tintora-toggle__item:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-toggle__item:disabled{cursor:not-allowed}.tintora-toggle:not(.tintora-toggle--disabled) .tintora-toggle__item:disabled{opacity:var(--tintora-opacity-disabled)}
|
|
1
|
+
:root{--tintora-color-accent:#ee6b25;--tintora-color-accent-deep:#c94e0c;--tintora-color-success:#4cc56b;--tintora-color-planned:#f2698c;--tintora-color-heart:#c42a56;--tintora-color-steps:#1f7a38;--tintora-color-sleep:#2f4fc4;--tintora-color-ink:#1d1c1c;--tintora-color-white:#fff;--tintora-color-destructive:#b3261e;--tintora-color-on-accent:#1d0e04;--tintora-color-on-accent-deep:var(--tintora-color-white);--tintora-color-on-success:#0d200f;--tintora-color-on-planned:#260a13;--tintora-color-on-heart:var(--tintora-color-white);--tintora-color-on-steps:var(--tintora-color-white);--tintora-color-on-sleep:var(--tintora-color-white);--tintora-color-on-destructive:var(--tintora-color-white);--tintora-text-on-card-muted:#55524f;--tintora-chip-fg:#3c3a38;--tintora-chip-bg:#efedeb;--tintora-chip-bg-hover:#e4e1de;--tintora-chip-selected-fg:#8f3604;--tintora-chip-selected-bg:var(--tintora-color-white);--tintora-tint-accent:#fdeadd;--tintora-tint-heart:#fbe0e8;--tintora-tint-steps:#dcf3e1;--tintora-tint-sleep:#e0e7fb;--tintora-menu-bg:var(--tintora-color-white);--tintora-menu-border:#1d1c1c1a;--tintora-menu-shadow:0 16px 32px #00000038;--tintora-menu-item-hover:#1d1c1c12;--tintora-menu-item-destructive:var(--tintora-color-destructive);--tintora-chart-grid:#ece9e6;--tintora-chart-axis:#6f6b68;--tintora-chart-track:#e6e4e2;--tintora-surface-menu-row:#ffffff0d;--tintora-font-family:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--tintora-font-weight-regular:400;--tintora-font-weight-medium:500;--tintora-font-weight-semibold:600;--tintora-font-weight-bold:700;--tintora-font-weight-extrabold:800;--tintora-line-height-tight:1.2;--tintora-font-display:700 1.625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-title:700 1.125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-heading:700 .9375rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-label:700 .78125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-body:500 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-caption:400 .6875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-stat-value:800 1.5625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-subtitle:700 .875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-button:700 .8125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-button-sm:700 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-tracking-tight:-.02em;--tintora-tracking-snug:-.01em;--tintora-tracking-wide:.04em;--tintora-radius-2:2px;--tintora-radius-4:4px;--tintora-radius-6:6px;--tintora-radius-7:7px;--tintora-radius-8:8px;--tintora-radius-9:9px;--tintora-radius-10:10px;--tintora-radius-12:12px;--tintora-radius-14:14px;--tintora-radius-16:16px;--tintora-radius-18:18px;--tintora-radius-20:20px;--tintora-radius-22:22px;--tintora-radius-26:26px;--tintora-radius-28:28px;--tintora-radius-30:30px;--tintora-radius-32:32px;--tintora-radius-34:34px;--tintora-radius-38:38px;--tintora-radius-40:40px;--tintora-radius-pill:9999px;--tintora-radius-card:var(--tintora-radius-20);--tintora-radius-panel:var(--tintora-radius-32);--tintora-shadow-selected:0 14px 30px #c94e0c73;--tintora-shadow-primary:0 8px 20px #c94e0c59;--tintora-shadow-accent:0 8px 20px #ee6b2566;--tintora-shadow-focus-ring:0 0 0 3px #ee6b2547;--tintora-shadow-menu:0 16px 32px #00000073;--tintora-shadow-tooltip:0 8px 20px #00000040;--tintora-shadow-knob:0 2px 4px #0000004d;--tintora-shadow-sheet:0 -16px 40px #00000059;--tintora-blur-glass:28px;--tintora-duration-fast:.15s;--tintora-duration-base:.2s;--tintora-opacity-disabled:.45}:root,[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--tintora-bg:linear-gradient(180deg, #3e3b3a, #222020);--tintora-surface-glass:linear-gradient(180deg, #3e3b3acc, #222020e6);--tintora-surface-card:#fbfaf9;--tintora-surface-row:#ffffff0f;--tintora-surface-field:#100f0f9e;--tintora-surface-menu:#1e1c1cf7;--tintora-text:var(--tintora-color-white);--tintora-text-muted:#ffffffb8;--tintora-text-faint:#ffffffa6;--tintora-text-nav-idle:#ffffffc7;--tintora-text-day:#ffffffd1;--tintora-text-error:#ff9a8a;--tintora-border-glass:#ffffff14;--tintora-border-card:transparent;--tintora-border-row:#ffffff0f;--tintora-border-field:#ffffff14;--tintora-border-field-hover:#ffffff52;--tintora-line:#ffffff1a;--tintora-line-strong:#ffffff52;--tintora-fill-subtle:#ffffff1a;--tintora-fill-subtle-hover:#fff3;--tintora-fill-subtle-pressed:#ffffff47;--tintora-fill-ghost-hover:#ffffff1f;--tintora-fill-day-hover:#ffffff24;--tintora-tag-bg:#ffffff24;--tintora-tag-fg:var(--tintora-color-white);--tintora-focus:var(--tintora-color-accent);--tintora-ring:var(--tintora-color-white);--tintora-shadow-glass:0 30px 60px #00000059;--tintora-shadow-card:0 10px 24px #0000002e;--tintora-shadow-card-hover:0 18px 36px #00000052;--tintora-bg-glow:radial-gradient(60% 50% at 6% 8%, #deccb080, transparent 62%), radial-gradient(50% 45% at 96% 10%, #846a5680, transparent 62%);--tintora-text-placeholder:#ffffff9e;--tintora-scrim:#0a090999;--tintora-surface-modal:linear-gradient(180deg, #403c3b, #2a2726);--tintora-border-modal:#ffffff1f;--tintora-shadow-modal:0 40px 80px #00000080;--tintora-surface-popover:#2b2928;--tintora-border-popover:#ffffff24;--tintora-shadow-popover:0 24px 48px #00000073;--tintora-surface-tooltip:#fbfaf9;--tintora-text-on-tooltip:var(--tintora-color-ink);--tintora-text-on-tooltip-muted:#5a5754;--tintora-tooltip-kbd-bg:#1d1c1c1a;--tintora-surface-toast:#fbfaf9;--tintora-text-on-toast:var(--tintora-color-ink);--tintora-text-on-toast-muted:#5a5754;--tintora-toast-action:var(--tintora-color-accent-deep);--tintora-shadow-toast:0 16px 36px #0006;--tintora-toast-icon-success:var(--tintora-color-steps);--tintora-toast-icon-error:var(--tintora-color-destructive);--tintora-toast-icon-info:var(--tintora-color-sleep);--tintora-toast-icon-warning:#8a5600;--tintora-status-info-bg:#7896ff24;--tintora-status-info-border:#96afff61;--tintora-status-info-fg:#a9bcff;--tintora-status-success-bg:#4cc56b24;--tintora-status-success-border:#4cc56b66;--tintora-status-success-fg:#6ddb8b;--tintora-status-warning-bg:#f2a33a26;--tintora-status-warning-border:#f2a33a6b;--tintora-status-warning-fg:#f5b45a;--tintora-status-error-bg:#ff826e26;--tintora-status-error-border:#ff8c786b;--tintora-status-error-fg:var(--tintora-text-error);--tintora-control-fill:var(--tintora-color-accent);--tintora-control-on-fill:var(--tintora-color-on-accent);--tintora-control-border:#fff9;--tintora-control-hover-tint:#ee6b2529;--tintora-switch-track:#ffffff4d;--tintora-switch-track-hover:#fff6;--tintora-shimmer:linear-gradient(90deg, #ffffff14 0%, #fff3 50%, #ffffff14 100%)}[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:var(--tintora-color-ink);--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:var(--tintora-color-destructive);--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:var(--tintora-color-ink);--tintora-focus:var(--tintora-color-accent-deep);--tintora-ring:var(--tintora-color-ink);--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033;--tintora-bg-glow:radial-gradient(60% 50% at 6% 8%, #ffd6ace6, transparent 62%), radial-gradient(50% 45% at 96% 10%, #ffeed6f2, transparent 62%);--tintora-text-placeholder:#5f5b58;--tintora-scrim:#1d1c1c73;--tintora-surface-modal:#fff;--tintora-border-modal:#1d1c1c0f;--tintora-shadow-modal:0 40px 80px #3c281459;--tintora-surface-popover:#fff;--tintora-border-popover:#1d1c1c1a;--tintora-shadow-popover:0 24px 48px #3c281438;--tintora-surface-tooltip:#2a2827;--tintora-text-on-tooltip:var(--tintora-color-white);--tintora-text-on-tooltip-muted:#ffffffc7;--tintora-tooltip-kbd-bg:#ffffff2e;--tintora-surface-toast:#2a2827;--tintora-text-on-toast:var(--tintora-color-white);--tintora-text-on-toast-muted:#ffffffbf;--tintora-toast-action:#ff9a5c;--tintora-shadow-toast:0 16px 36px #3c281459;--tintora-toast-icon-success:var(--tintora-color-success);--tintora-toast-icon-error:#ff9a8a;--tintora-toast-icon-info:#9db4ff;--tintora-toast-icon-warning:#f2a33a;--tintora-status-info-bg:#2f4fc414;--tintora-status-info-border:#2f4fc447;--tintora-status-info-fg:var(--tintora-color-sleep);--tintora-status-success-bg:#1f7a3817;--tintora-status-success-border:#1f7a384d;--tintora-status-success-fg:var(--tintora-color-steps);--tintora-status-warning-bg:#a86a0a1a;--tintora-status-warning-border:#a86a0a52;--tintora-status-warning-fg:#8a5600;--tintora-status-error-bg:#b3261e14;--tintora-status-error-border:#b3261e47;--tintora-status-error-fg:var(--tintora-text-error);--tintora-control-fill:var(--tintora-color-accent-deep);--tintora-control-on-fill:var(--tintora-color-white);--tintora-control-border:#1d1c1c8c;--tintora-control-hover-tint:#ee6b2529;--tintora-switch-track:#1d1c1c61;--tintora-switch-track-hover:#1d1c1c80;--tintora-shimmer:linear-gradient(90deg, #1d1c1c12 0%, #1d1c1c29 50%, #1d1c1c12 100%)}@media (prefers-color-scheme:light){:root:not([data-theme]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:var(--tintora-color-ink);--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:var(--tintora-color-destructive);--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:var(--tintora-color-ink);--tintora-focus:var(--tintora-color-accent-deep);--tintora-ring:var(--tintora-color-ink);--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033;--tintora-bg-glow:radial-gradient(60% 50% at 6% 8%, #ffd6ace6, transparent 62%), radial-gradient(50% 45% at 96% 10%, #ffeed6f2, transparent 62%);--tintora-text-placeholder:#5f5b58;--tintora-scrim:#1d1c1c73;--tintora-surface-modal:#fff;--tintora-border-modal:#1d1c1c0f;--tintora-shadow-modal:0 40px 80px #3c281459;--tintora-surface-popover:#fff;--tintora-border-popover:#1d1c1c1a;--tintora-shadow-popover:0 24px 48px #3c281438;--tintora-surface-tooltip:#2a2827;--tintora-text-on-tooltip:var(--tintora-color-white);--tintora-text-on-tooltip-muted:#ffffffc7;--tintora-tooltip-kbd-bg:#ffffff2e;--tintora-surface-toast:#2a2827;--tintora-text-on-toast:var(--tintora-color-white);--tintora-text-on-toast-muted:#ffffffbf;--tintora-toast-action:#ff9a5c;--tintora-shadow-toast:0 16px 36px #3c281459;--tintora-toast-icon-success:var(--tintora-color-success);--tintora-toast-icon-error:#ff9a8a;--tintora-toast-icon-info:#9db4ff;--tintora-toast-icon-warning:#f2a33a;--tintora-status-info-bg:#2f4fc414;--tintora-status-info-border:#2f4fc447;--tintora-status-info-fg:var(--tintora-color-sleep);--tintora-status-success-bg:#1f7a3817;--tintora-status-success-border:#1f7a384d;--tintora-status-success-fg:var(--tintora-color-steps);--tintora-status-warning-bg:#a86a0a1a;--tintora-status-warning-border:#a86a0a52;--tintora-status-warning-fg:#8a5600;--tintora-status-error-bg:#b3261e14;--tintora-status-error-border:#b3261e47;--tintora-status-error-fg:var(--tintora-text-error);--tintora-control-fill:var(--tintora-color-accent-deep);--tintora-control-on-fill:var(--tintora-color-white);--tintora-control-border:#1d1c1c8c;--tintora-control-hover-tint:#ee6b2529;--tintora-switch-track:#1d1c1c61;--tintora-switch-track-hover:#1d1c1c80;--tintora-shimmer:linear-gradient(90deg, #1d1c1c12 0%, #1d1c1c29 50%, #1d1c1c12 100%)}}.tintora-avatar{border-radius:var(--tintora-radius-pill);color:var(--tintora-color-ink);font:var(--tintora-font-body);font-size:var(--tintora-avatar-font-size);font-weight:var(--tintora-font-weight-bold);background:linear-gradient(135deg,#f1d9bf,#c9a07a);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tintora-avatar>img{object-fit:cover;width:100%;height:100%}.tintora-avatar--small{--tintora-avatar-font-size:.6875rem;width:32px;height:32px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--medium{--tintora-avatar-font-size:.8125rem;width:40px;height:40px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--large{--tintora-avatar-font-size:.875rem;width:44px;height:44px;font-weight:var(--tintora-font-weight-bold)}.tintora-spinner{flex-shrink:0;animation:.9s linear infinite tintora-spin}@keyframes tintora-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.tintora-spinner{animation:none}}.tintora-button{--tintora-button-border:1px solid transparent;box-sizing:border-box;cursor:pointer;outline-offset:2px;height:var(--tintora-button-height);padding:0 var(--tintora-button-padding-x);border:var(--tintora-button-border);border-radius:var(--tintora-button-border-radius);font-family:inherit;font-size:var(--tintora-button-font-size);font-weight:var(--tintora-button-font-weight);color:var(--tintora-button-fg);background-color:var(--tintora-button-bg);box-shadow:var(--tintora-button-shadow,none);outline:none;justify-content:center;align-items:center;gap:8px;display:inline-flex}.tintora-button--small{--tintora-button-height:32px;--tintora-button-padding-x:14px;--tintora-button-border-radius:16px;--tintora-button-font-size:12px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--medium{--tintora-button-height:40px;--tintora-button-padding-x:18px;--tintora-button-border-radius:20px;--tintora-button-font-size:13px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--large{--tintora-button-height:48px;--tintora-button-padding-x:24px;--tintora-button-border-radius:24px;--tintora-button-font-size:14px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button__icon{flex-shrink:0;display:inline-flex}.tintora-button--leading-icon{padding-inline-start:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--trailing-icon{padding-inline-end:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--primary{--tintora-button-fg:var(--tintora-color-on-accent-deep);--tintora-button-bg:var(--tintora-color-accent-deep);--tintora-button-shadow:var(--tintora-shadow-primary);--tintora-button-filter-hover:brightness(1.14);--tintora-button-filter-pressed:brightness(.9)}.tintora-button--secondary{--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-fill-subtle);--tintora-button-bg-hover:var(--tintora-fill-subtle-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle-pressed)}.tintora-button--outline{--tintora-button-border:1px solid var(--tintora-line-strong);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button--ghost{--tintora-button-fg:var(--tintora-text-muted);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button:enabled:hover{color:var(--tintora-button-fg-hover,var(--tintora-button-fg));background-color:var(--tintora-button-bg-hover,var(--tintora-button-bg));filter:var(--tintora-button-filter-hover,none)}.tintora-button:enabled:active{color:var(--tintora-button-fg-pressed,var(--tintora-button-fg));background-color:var(--tintora-button-bg-pressed,var(--tintora-button-bg));filter:var(--tintora-button-filter-pressed,none);transform:translateY(1px)}.tintora-button:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-button:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed;box-shadow:none}.tintora-button--loading:disabled{opacity:.85;cursor:progress}.tintora-card{box-sizing:border-box;font:inherit;text-align:start;border:1px solid #0000;justify-content:space-between;align-items:center;gap:12px;margin:0;display:flex}.tintora-card--surface{border-color:var(--tintora-border-card);border-radius:var(--tintora-radius-card);background:var(--tintora-surface-card);box-shadow:var(--tintora-shadow-card);color:var(--tintora-color-ink);--tintora-card-text-muted:var(--tintora-text-on-card-muted);padding:18px 18px 18px 20px}.tintora-card--row{border-color:var(--tintora-border-row);border-radius:var(--tintora-radius-18);background:var(--tintora-surface-row);color:var(--tintora-text);--tintora-card-text-muted:var(--tintora-text-faint);justify-content:flex-start;padding:10px 6px 10px 10px}.tintora-card--selectable{cursor:pointer;width:100%}@media (prefers-reduced-motion:no-preference){.tintora-card--selectable{transition:transform .15s,box-shadow .15s,background-color .15s}}.tintora-card--selectable:not(.tintora-card--selected):hover{box-shadow:var(--tintora-shadow-card-hover);transform:translateY(-3px)}.tintora-card--selectable:focus-visible{outline:2px solid var(--tintora-focus);outline-offset:2px}.tintora-card--selectable:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-card--selected{background:var(--tintora-color-accent-deep);box-shadow:var(--tintora-shadow-selected);color:var(--tintora-color-on-accent-deep);--tintora-card-text-muted:var(--tintora-color-on-accent-deep);border-color:#0000}.tintora-card--selected .tintora-tag--card{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-chip{border-radius:var(--tintora-radius-12);background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg);font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);cursor:pointer;outline-offset:2px;border:0;outline:none;align-items:center;padding:6px 12px;display:inline-flex}.tintora-chip:enabled:hover:not([aria-pressed=true]){background-color:var(--tintora-chip-bg-hover)}.tintora-chip[aria-pressed=true]{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-chip:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-chip:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-dot{box-sizing:border-box;forced-color-adjust:none;flex-shrink:0;display:inline-block}.tintora-dot--unread{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);width:8px;height:8px}.tintora-dot--read{border-radius:var(--tintora-radius-pill);border:1.5px solid var(--tintora-text-faint);width:8px;height:8px}.tintora-dot--tick{background-color:var(--tintora-color-accent);border-radius:2px;width:3px;height:15px}.tintora-button.tintora-icon-button{--tintora-button-padding-x:0px}.tintora-icon-button{width:var(--tintora-button-height);flex-shrink:0}.tintora-icon-button__icon{display:inline-flex}.tintora-icon-button__icon svg{width:var(--tintora-icon-button-icon-size);height:var(--tintora-icon-button-icon-size)}.tintora-icon-button.tintora-icon-button--small{--tintora-button-height:32px;--tintora-icon-button-icon-size:14px}.tintora-icon-button.tintora-icon-button--medium{--tintora-button-height:36px;--tintora-icon-button-icon-size:15px}.tintora-icon-button.tintora-icon-button--large{--tintora-button-height:44px;--tintora-icon-button-icon-size:18px}.tintora-icon-button.tintora-icon-button--round{--tintora-button-border-radius:var(--tintora-radius-pill)}.tintora-icon-button.tintora-icon-button--field{--tintora-button-height:48px;--tintora-button-border-radius:var(--tintora-radius-pill);--tintora-button-border:1px solid var(--tintora-border-field);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-surface-field);--tintora-button-bg-hover:var(--tintora-surface-field);--tintora-button-bg-pressed:var(--tintora-fill-subtle);--tintora-icon-button-icon-size:18px}.tintora-icon-button--field:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-icon-button--field:enabled:active{border-color:var(--tintora-border-field)}.tintora-icon-button.tintora-icon-button--nav{--tintora-button-height:44px;--tintora-button-border-radius:var(--tintora-radius-14);--tintora-button-fg:var(--tintora-text-nav-idle);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-ghost-hover);--tintora-icon-button-icon-size:20px}.tintora-icon-button.tintora-icon-button--nav[aria-current=page]{--tintora-button-fg:#fff;--tintora-button-fg-hover:#fff;--tintora-button-fg-pressed:#fff;--tintora-button-bg:var(--tintora-color-accent);--tintora-button-bg-hover:var(--tintora-color-accent);--tintora-button-bg-pressed:var(--tintora-color-accent);--tintora-button-shadow:var(--tintora-shadow-accent)}.tintora-progress-bar{flex-direction:column;gap:6px;display:flex}.tintora-progress-bar__header{font:var(--tintora-font-label);font-weight:var(--tintora-font-weight-semibold);justify-content:space-between;display:flex}.tintora-progress-bar__value{color:var(--tintora-text-muted)}.tintora-progress-bar__track{border-radius:var(--tintora-radius-pill);background:var(--tintora-fill-subtle-hover);height:8px;position:relative;overflow:hidden}.tintora-progress-bar__fill{border-radius:var(--tintora-radius-4);background:var(--tintora-control-fill);height:100%;position:absolute;top:0;left:0}.tintora-progress-bar__fill--complete{background:var(--tintora-status-success-fg)}.tintora-progress-bar__fill--indeterminate{width:40%;animation:1.3s ease-in-out infinite tintora-indeterminate}@keyframes tintora-indeterminate{0%{left:-40%}to{left:100%}}@media (prefers-reduced-motion:reduce){.tintora-progress-bar__fill--indeterminate{animation:none}}.tintora-search-input{--tintora-search-input-font-size:.8125rem;--tintora-search-input-clear-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-pill);height:48px;color:var(--tintora-text-muted);background-color:var(--tintora-surface-field);align-items:center;gap:10px;padding:0 18px;display:flex}.tintora-search-input--disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-search-input__icon{flex-shrink:0;width:16px;height:16px}.tintora-search-input__input{min-width:0;font-family:inherit;font-size:var(--tintora-search-input-font-size);color:var(--tintora-text);background:0 0;border:0;outline:0;flex:1;padding:0}.tintora-search-input__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-search-input__input:disabled{cursor:not-allowed}.tintora-search-input__input::-webkit-search-decoration{display:none}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input:not(.tintora-search-input--disabled):hover{border-color:var(--tintora-border-field-hover)}.tintora-search-input:focus-within{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input__input::-webkit-search-cancel-button:hover{background-color:var(--tintora-focus)}.tintora-select{--tintora-select-font-size:.71875rem;display:inline-block;position:relative}.tintora-select__trigger{box-sizing:border-box;border-radius:var(--tintora-radius-14);height:28px;font-family:inherit;font-size:var(--tintora-select-font-size);font-weight:var(--tintora-font-weight-medium);color:var(--tintora-chip-fg);background-color:var(--tintora-chip-bg);cursor:pointer;border:0;align-items:center;gap:6px;padding:0 12px;display:inline-flex}.tintora-select__trigger:enabled:hover,.tintora-select__trigger[aria-expanded=true]{background-color:var(--tintora-chip-bg-hover)}.tintora-select__trigger:focus-visible{box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-select__trigger:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-select__value--placeholder{color:var(--tintora-text-on-card-muted)}.tintora-select__chevron{flex-shrink:0}.tintora-select__trigger[aria-expanded=true] .tintora-select__chevron{transform:rotate(180deg)}.tintora-select__menu{box-sizing:border-box;border:1px solid var(--tintora-menu-border);border-radius:var(--tintora-radius-14);max-height:50vh;color:var(--tintora-color-ink);background:var(--tintora-menu-bg);box-shadow:var(--tintora-menu-shadow);flex-direction:column;gap:2px;margin:0;padding:6px;display:flex;inset:auto;overflow-y:auto}.tintora-select__option{box-sizing:border-box;border-radius:var(--tintora-radius-12);min-height:32px;font:var(--tintora-font-body);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;padding:0 10px;display:flex}.tintora-select__option--active{background:var(--tintora-menu-item-hover)}.tintora-select__option[aria-selected=true]{font-weight:var(--tintora-font-weight-bold);color:var(--tintora-color-accent-deep);background:var(--tintora-tint-accent)}.tintora-select__option[aria-disabled=true]{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}@media (pointer:coarse){.tintora-select__option{min-height:44px}}@media (forced-colors:active){.tintora-select__option--active{outline-offset:-2px;outline:2px solid highlight}}.tintora-tag{white-space:nowrap;font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);display:inline-block}.tintora-tag--neutral{background-color:var(--tintora-tag-bg);color:var(--tintora-tag-fg)}.tintora-tag--success{background-color:var(--tintora-color-success);color:var(--tintora-color-on-success)}.tintora-tag--accent{background-color:var(--tintora-color-accent-deep);color:var(--tintora-color-on-accent-deep);font-weight:var(--tintora-font-weight-bold)}.tintora-tag--card{background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg)}.tintora-tag--small{border-radius:var(--tintora-radius-8);padding:2px 8px}.tintora-tag--medium{border-radius:var(--tintora-radius-8);padding:3px 9px}.tintora-tag--large{border-radius:var(--tintora-radius-12);padding:5px 12px}.tintora-textfield{--tintora-textfield-font-size:.8125rem;flex-direction:column;gap:8px;display:inline-flex}.tintora-textfield--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-textfield__label{font:var(--tintora-font-body);font-weight:var(--tintora-font-weight-semibold);color:var(--tintora-text)}.tintora-textfield__input{box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-16);height:48px;font-family:inherit;font-size:var(--tintora-textfield-font-size);color:var(--tintora-text);background-color:var(--tintora-surface-field);padding:0 16px}.tintora-textfield__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-textfield__input:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-textfield__input:focus-visible{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-textfield__input[aria-invalid=true]{border-color:var(--tintora-text-error)}.tintora-textfield__input:disabled{cursor:not-allowed}.tintora-textfield__hint{font:var(--tintora-font-caption);color:var(--tintora-text-faint)}.tintora-textfield__hint--error{color:var(--tintora-text-error)}.tintora-toggle{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-fill-subtle);gap:4px;padding:5px;display:inline-flex;position:relative}.tintora-toggle--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-toggle__item{box-sizing:border-box;border-radius:var(--tintora-radius-pill);min-width:34px;height:34px;color:var(--tintora-text-nav-idle);font:var(--tintora-font-label);cursor:pointer;outline-offset:2px;z-index:1;background:0 0;border:0;outline:none;justify-content:center;align-items:center;padding:0 8px;transition:color .2s;display:inline-flex}.tintora-toggle__item[aria-pressed=true]{color:#fff}.tintora-toggle__thumb{width:var(--tintora-toggle-thumb-width);border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);transform:translateX(var(--tintora-toggle-thumb-x));pointer-events:none;transition:transform .2s;position:absolute;inset-block:5px;inset-inline-start:0}@media (prefers-reduced-motion:reduce){.tintora-toggle__thumb,.tintora-toggle__item{transition:none}}.tintora-toggle__item:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-toggle__item:disabled{cursor:not-allowed}.tintora-toggle:not(.tintora-toggle--disabled) .tintora-toggle__item:disabled{opacity:var(--tintora-opacity-disabled)}
|
|
2
2
|
/*$vite$:1*/
|