tintora 0.21.1 → 0.22.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.
@@ -0,0 +1,40 @@
1
+ import { type MouseEvent, type ReactElement, type ReactNode } from 'react';
2
+ import { type Placement } from '../utils/placement';
3
+ import './Popover.css';
4
+ export type PopoverPlacement = Placement;
5
+ export interface PopoverProps {
6
+ /** Controlled: the parent owns whether it is open. */
7
+ open: boolean;
8
+ /**
9
+ * Called with `false` on Esc, an outside press and the trigger toggling,
10
+ * and with `true` when the trigger is pressed while closed.
11
+ */
12
+ onOpenChange: (open: boolean) => void;
13
+ /**
14
+ * Exactly one focusable element. It gets `aria-expanded`, `aria-controls`
15
+ * and `aria-haspopup="dialog"`, so it must pass unknown props on to a DOM
16
+ * element. Focus returns to it when the popover closes.
17
+ */
18
+ trigger: ReactElement<Record<string, unknown> & {
19
+ onClick?: (event: MouseEvent) => void;
20
+ }>;
21
+ /** Names the panel for assistive tech. Required: it has no visible label of its own. */
22
+ title: string;
23
+ /** The panel's content: a short task, such as a choice or a confirmation. */
24
+ children: ReactNode;
25
+ /**
26
+ * `alertdialog` is for confirmations: focus starts on the safe action.
27
+ * @default 'dialog'
28
+ */
29
+ role?: 'dialog' | 'alertdialog';
30
+ /** The side of the trigger it opens on; flips when there is no room. @default 'bottom' */
31
+ placement?: PopoverPlacement;
32
+ /**
33
+ * `md` is a 300px panel (radius 22, padding 18); `sm` is compact, sized by
34
+ * its content (radius 20, padding 16).
35
+ * @default 'md'
36
+ */
37
+ size?: 'md' | 'sm';
38
+ className?: string;
39
+ }
40
+ export declare function Popover({ open, onOpenChange, trigger, title, children, role, size, placement, className, }: PopoverProps): import("react").JSX.Element;
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)})}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({checked:t,defaultChecked:n=!1,onCheckedChange:r}){let[i,a]=(0,e.useState)(n),o=t!==void 0;return{checked:o?t:i,onChange:e=>{o||a(e.target.checked),r?.(e.target.checked)}}}function f({checked:n,defaultChecked:i,onCheckedChange:a,indeterminate:o=!1,className:s,...c}){let l=(0,e.useRef)(null),u=d({checked:n,defaultChecked:i,onCheckedChange:a});return(0,e.useLayoutEffect)(()=>{l.current&&(l.current.indeterminate=o)}),(0,t.jsxs)(`span`,{className:r(`tintora-checkbox`,s),children:[(0,t.jsx)(`input`,{...c,ref:l,type:`checkbox`,className:`tintora-checkbox__input`,checked:u.checked,onChange:u.onChange}),(0,t.jsxs)(`span`,{className:`tintora-checkbox__box`,"aria-hidden":`true`,children:[(0,t.jsx)(`svg`,{className:`tintora-checkbox__check`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,strokeWidth:`3.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`M5 12.5l4.5 4.5L19 7.5`})}),(0,t.jsx)(`svg`,{className:`tintora-checkbox__dash`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,strokeWidth:`3.2`,strokeLinecap:`round`,children:(0,t.jsx)(`path`,{d:`M6 12h12`})})]})]})}function p({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 m({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 h={round:`secondary`,field:`secondary`,nav:`ghost`};function g({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:h[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})})}var _=()=>(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,children:(0,t.jsx)(`path`,{d:`M18 6L6 18M6 6l12 12`})});function v({open:n,onClose:i,title:a,description:o,icon:s,status:c=`info`,actions:l,size:u=`md`,align:d=`start`,role:f=`dialog`,closeButton:p=!0,className:m,children:h,...v}){let y=(0,e.useRef)(null),b=(0,e.useId)(),x=(0,e.useId)();return(0,e.useEffect)(()=>{let e=y.current;e&&(n&&!e.open?(e.showModal(),e.querySelector(`[data-autofocus]`)?.focus()):!n&&e.open&&e.close())},[n]),(0,t.jsxs)(`dialog`,{...v,ref:y,role:f,"aria-labelledby":b,"aria-describedby":o?x:void 0,className:r(`tintora-modal`,`tintora-modal--${u}`,d===`center`&&`tintora-modal--center`,m),onCancel:e=>{e.preventDefault(),i()},onClick:e=>{f===`dialog`&&e.target===e.currentTarget&&i()},children:[s&&(0,t.jsx)(`span`,{className:r(`tintora-modal__icon`,`tintora-modal__icon--${c}`),"aria-hidden":`true`,children:s}),(0,t.jsxs)(`div`,{className:`tintora-modal__text`,children:[(0,t.jsx)(`h2`,{id:b,className:`tintora-modal__title`,children:a}),o&&(0,t.jsx)(`p`,{id:x,className:`tintora-modal__description`,children:o})]}),p&&(0,t.jsx)(g,{className:`tintora-modal__close`,size:`medium`,"aria-label":`Close`,icon:(0,t.jsx)(_,{}),onClick:i}),h,l&&(0,t.jsx)(`div`,{className:`tintora-modal__actions`,children:l})]})}function y({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}%`}})})]})}var b=(0,e.createContext)(null);function x(){let t=(0,e.useContext)(b);if(!t)throw Error(`Radio must be rendered inside a RadioGroup`);return t}function S({value:e,className:n,disabled:i,...a}){let o=x();return(0,t.jsxs)(`span`,{className:r(`tintora-radio`,n),children:[(0,t.jsx)(`input`,{...a,type:`radio`,className:`tintora-radio__input`,name:o.name,value:e,checked:o.value===e,disabled:i||o.disabled,onChange:()=>o.select(e)}),(0,t.jsx)(`span`,{className:`tintora-radio__circle`,"aria-hidden":`true`})]})}function C({value:n,defaultValue:i,onValueChange:a,disabled:o=!1,name:s,className:c,...l}){let u=(0,e.useId)(),[d,f]=(0,e.useState)(i??null),p=n!==void 0,m=p?n:d;return(0,t.jsx)(b.Provider,{value:{name:s??u,value:m,select:e=>{e!==m&&(p||f(e),a?.(e))},disabled:o},children:(0,t.jsx)(`div`,{...l,role:`radiogroup`,className:r(`tintora-radio-group`,c)})})}function w({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`})]})}function T(t){let n=(0,e.useRef)(t);return(0,e.useEffect)(()=>{n.current=t},[t]),n}function E(t,n,r){let i=T(r);(0,e.useEffect)(()=>{if(!t)return;let e=e=>{n.current?.contains(e.target)||i.current()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[t,n,i])}function D(t,n,r,i){let[a,o]=(0,e.useState)(null);return(0,e.useLayoutEffect)(()=>{let e=n.current;if(!t||!e){o(null);return}e.showPopover();let i=()=>o(r()),a=t=>{e.contains(t.target)||i()};return i(),window.addEventListener(`scroll`,a,!0),window.addEventListener(`resize`,i),()=>{window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,i)}},[t,n,...i]),a}var O=(0,e.createContext)(null),k=()=>{let t=(0,e.useContext)(O);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function A({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=k();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 j=4;function M({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)(),_=(0,e.useRef)(null),v=(0,e.useRef)(null),y=(0,e.useRef)(null),[b,x]=(0,e.useState)(n??null),[S,C]=(0,e.useState)(!1),[w,T]=(0,e.useState)(-1),k=o!==void 0,M=k?o:b,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=()=>{T(N>=0&&P(N)?N:F()),C(!0)},B=()=>C(!1),V=e=>{let t=R(e);t<0||!P(t)||(B(),e!==M&&(k||x(e),c?.(e)))},H=e=>{if(f?.(e),e.defaultPrevented)return;let{key:t}=e;if(t===`Tab`)return B();if(!S){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(t)&&(e.preventDefault(),z());return}let n={ArrowDown:()=>w<0?F():I(w,1),ArrowUp:()=>w<0?F():I(w,-1),Home:F,End:L};t in n?(e.preventDefault(),T(n[t]())):t===`Enter`||t===` `?(e.preventDefault(),w>=0?V(i[w].value):B()):t===`Escape`&&(e.preventDefault(),B())},U=e=>{p?.(e),e.key===` `&&e.preventDefault()},W=D(S,y,()=>{let e=y.current,t=v.current;if(!e||!t)return null;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+j+r<=window.innerHeight,a=n.top-j-r>=0;return{top:i||!a?n.bottom+j:n.top-j-r,left:n.left,minWidth:n.width}},[]),G=e=>{d?.(e),!e.defaultPrevented&&(S?B():z())};E(S,_,B),(0,e.useEffect)(()=>{S&&w>=0&&y.current?.children.item(w)?.scrollIntoView?.({block:`nearest`})},[S,w]);let K=e=>`${g}-option-${R(e)}`,q=S?i[w]?.value??null:null,J=i[N]?.label;return(0,t.jsx)(O.Provider,{value:{value:M,activeValue:q,select:V,optionId:K,activate:e=>T(R(e))},children:(0,t.jsxs)(`div`,{ref:_,className:`tintora-select`,children:[(0,t.jsxs)(`button`,{...h,ref:v,type:`button`,role:`combobox`,"aria-label":m,"aria-haspopup":`listbox`,"aria-expanded":S,"aria-controls":S?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`})})]}),S&&(0,t.jsx)(`div`,{ref:y,id:g,role:`listbox`,"aria-label":m,popover:`manual`,className:`tintora-select__menu`,style:W??{},onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(A,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:M??``,disabled:a})]})})}function N({width:e,height:n,className:i,style:a,...o}){let s={...e!==void 0&&{width:e},...n!==void 0&&{height:n}};return(0,t.jsx)(`span`,{...o,"aria-hidden":`true`,className:r(`tintora-skeleton`,i),style:{...s,...a}})}function P({checked:e,defaultChecked:n,onCheckedChange:i,className:a,...o}){let s=d({checked:e,defaultChecked:n,onCheckedChange:i});return(0,t.jsxs)(`span`,{className:r(`tintora-switch`,a),children:[(0,t.jsx)(`input`,{...o,type:`checkbox`,role:`switch`,className:`tintora-switch__input`,checked:s.checked,onChange:s.onChange}),(0,t.jsx)(`span`,{className:`tintora-switch__track`,"aria-hidden":`true`})]})}function F({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 I({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})]})}function L(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-success)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM8 12.5l2.7 2.7L16 9.8`})})}function R(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-error)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM15 9l-6 6M9 9l6 6`})})}function z(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-info)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 16v-4M12 8h.01`})})}function B(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-warning)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01`})})}function V(){return(0,t.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M18 6L6 18M6 6l12 12`})})}var H={success:(0,t.jsx)(L,{}),error:(0,t.jsx)(R,{}),info:(0,t.jsx)(z,{}),warning:(0,t.jsx)(B,{})};function U({status:n,children:i,action:a,onDismiss:o,duration:s=5e3,timerBar:c=!1,className:l,...u}){let[d,f]=(0,e.useState)(!1),[p,m]=(0,e.useState)(!1),h=d||p,g=T(o),_=(0,e.useRef)(s);(0,e.useEffect)(()=>{_.current=s},[s]),(0,e.useEffect)(()=>{if(s<=0||h)return;let e=Date.now(),t=setTimeout(()=>g.current(),_.current);return()=>{clearTimeout(t),_.current-=Date.now()-e}},[s,h,g]);let v=c&&s>0,y={"--tintora-toast-animation-duration":`${s}ms`};return(0,t.jsxs)(`div`,{...u,role:`status`,className:r(`tintora-toast`,v&&`tintora-toast--timer`,h&&`tintora-toast--paused`,l),onMouseEnter:e=>{u.onMouseEnter?.(e),f(!0)},onMouseLeave:e=>{u.onMouseLeave?.(e),f(!1)},onFocus:e=>{u.onFocus?.(e),m(!0)},onBlur:e=>{u.onBlur?.(e),e.currentTarget.contains(e.relatedTarget)||m(!1)},children:[n&&H[n],(0,t.jsx)(`span`,{className:`tintora-toast__message`,children:i}),a&&(0,t.jsx)(`button`,{type:`button`,className:`tintora-toast__action`,onClick:a.onClick,children:a.label}),(0,t.jsx)(`button`,{type:`button`,className:`tintora-toast__close`,"aria-label":`Dismiss`,onClick:o,children:(0,t.jsx)(V,{})}),v&&(0,t.jsx)(`span`,{className:`tintora-toast__progress`,style:y})]})}var W=(0,e.createContext)(null);function G(){let t=(0,e.useContext)(W);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function K({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 q({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=G(),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})}var J={gap:10,margin:8,arrowInset:12},Y={top:`bottom`,bottom:`top`,left:`right`,right:`left`},X=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n));function Z(e,t,n,r,{gap:i,margin:a}){let o=t=>{switch(t){case`top`:return e.top;case`bottom`:return r.height-e.bottom;case`left`:return e.left;case`right`:return r.width-e.right}},s=(n===`top`||n===`bottom`?t.height:t.width)+i+a,c=o(n);return c>=s||o(Y[n])<=c?n:Y[n]}function Q(e,t,n,r={width:window.innerWidth,height:window.innerHeight},i={}){let a={...J,...i},{gap:o,margin:s,arrowInset:c}=a,l=Z(e,t,n,r,a),u=l===`top`||l===`bottom`,d,f;switch(l){case`top`:d=e.y-t.height-o,f=e.x+e.width/2-t.width/2;break;case`bottom`:d=e.y+e.height+o,f=e.x+e.width/2-t.width/2;break;case`left`:d=e.y+e.height/2-t.height/2,f=e.x-t.width-o;break;case`right`:d=e.y+e.height/2-t.height/2,f=e.x+e.width+o}u?f=X(f,s,r.width-t.width-s):d=X(d,s,r.height-t.height-s);let p=u?e.x+e.width/2-f:e.y+e.height/2-d,m=u?t.width:t.height;return{top:d,left:f,placement:l,arrowOffset:X(p,c,m-c)}}function $(t,n){let r=T(n);(0,e.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&r.current()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,r])}var ee=100;function te({title:n,content:i,shortcut:a,children:o,className:s,placement:c=`top`}){let l=(0,e.useId)(),[u,d]=(0,e.useState)(!1),f=(0,e.useRef)(null),p=(0,e.useRef)(null),m=(0,e.useRef)(void 0),h=()=>{window.clearTimeout(m.current),d(!0)},g=()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>d(!1),ee)},_=D(u,p,()=>{let e=p.current,t=f.current?.firstElementChild;return!e||!t?null:Q(t.getBoundingClientRect(),{width:e.offsetWidth,height:e.offsetHeight},c)},[c,n,i,a]);$(u,()=>d(!1)),(0,e.useEffect)(()=>()=>window.clearTimeout(m.current),[]);let v=_?{top:_.top,left:_.left,"--tintora-tooltip-arrow-offset":`${_.arrowOffset}px`}:{visibility:`hidden`};return(0,t.jsxs)(`span`,{ref:f,className:`tintora-tooltip`,onMouseEnter:h,onMouseLeave:g,onFocus:h,onBlur:g,children:[(0,e.cloneElement)(o,{"aria-describedby":r(o.props[`aria-describedby`],u&&l)||void 0}),u&&(0,t.jsxs)(`div`,{id:l,ref:p,role:`tooltip`,popover:`manual`,style:v,className:r(`tintora-tooltip__content`,`tintora-tooltip__content--${_?.placement??c}`,n&&`tintora-tooltip__content--rich`,s),children:[n&&(0,t.jsx)(`span`,{className:`tintora-tooltip__title`,children:n}),(0,t.jsx)(`span`,{className:`tintora-tooltip__text`,children:i}),a&&(0,t.jsx)(`kbd`,{className:`tintora-tooltip__shortcut`,children:a})]})]})}exports.Avatar=a,exports.Button=c,exports.Card=l,exports.Checkbox=f,exports.Chip=p,exports.Dot=m,exports.IconButton=g,exports.Modal=v,exports.ProgressBar=y,exports.Radio=S,exports.RadioGroup=C,exports.SearchInput=w,exports.Select=M,exports.SelectableCard=u,exports.Skeleton=N,exports.Spinner=s,exports.Switch=P,exports.Tag=F,exports.TextField=I,exports.Toast=U,exports.Toggle=K,exports.ToggleItem=q,exports.Tooltip=te;
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({checked:t,defaultChecked:n=!1,onCheckedChange:r}){let[i,a]=(0,e.useState)(n),o=t!==void 0;return{checked:o?t:i,onChange:e=>{o||a(e.target.checked),r?.(e.target.checked)}}}function f({checked:n,defaultChecked:i,onCheckedChange:a,indeterminate:o=!1,className:s,...c}){let l=(0,e.useRef)(null),u=d({checked:n,defaultChecked:i,onCheckedChange:a});return(0,e.useLayoutEffect)(()=>{l.current&&(l.current.indeterminate=o)}),(0,t.jsxs)(`span`,{className:r(`tintora-checkbox`,s),children:[(0,t.jsx)(`input`,{...c,ref:l,type:`checkbox`,className:`tintora-checkbox__input`,checked:u.checked,onChange:u.onChange}),(0,t.jsxs)(`span`,{className:`tintora-checkbox__box`,"aria-hidden":`true`,children:[(0,t.jsx)(`svg`,{className:`tintora-checkbox__check`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,strokeWidth:`3.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,t.jsx)(`path`,{d:`M5 12.5l4.5 4.5L19 7.5`})}),(0,t.jsx)(`svg`,{className:`tintora-checkbox__dash`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,strokeWidth:`3.2`,strokeLinecap:`round`,children:(0,t.jsx)(`path`,{d:`M6 12h12`})})]})]})}function p({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 m({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 h={round:`secondary`,field:`secondary`,nav:`ghost`};function g({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:h[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})})}var _=()=>(0,t.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,children:(0,t.jsx)(`path`,{d:`M18 6L6 18M6 6l12 12`})});function v({open:n,onClose:i,title:a,description:o,icon:s,status:c=`info`,actions:l,size:u=`md`,align:d=`start`,role:f=`dialog`,closeButton:p=!0,className:m,children:h,...v}){let y=(0,e.useRef)(null),b=(0,e.useId)(),x=(0,e.useId)();return(0,e.useEffect)(()=>{let e=y.current;e&&(n&&!e.open?(e.showModal(),e.querySelector(`[data-autofocus]`)?.focus()):!n&&e.open&&e.close())},[n]),(0,t.jsxs)(`dialog`,{...v,ref:y,role:f,"aria-labelledby":b,"aria-describedby":o?x:void 0,className:r(`tintora-modal`,`tintora-modal--${u}`,d===`center`&&`tintora-modal--center`,m),onCancel:e=>{e.preventDefault(),i()},onClick:e=>{f===`dialog`&&e.target===e.currentTarget&&i()},children:[s&&(0,t.jsx)(`span`,{className:r(`tintora-modal__icon`,`tintora-modal__icon--${c}`),"aria-hidden":`true`,children:s}),(0,t.jsxs)(`div`,{className:`tintora-modal__text`,children:[(0,t.jsx)(`h2`,{id:b,className:`tintora-modal__title`,children:a}),o&&(0,t.jsx)(`p`,{id:x,className:`tintora-modal__description`,children:o})]}),p&&(0,t.jsx)(g,{className:`tintora-modal__close`,size:`medium`,"aria-label":`Close`,icon:(0,t.jsx)(_,{}),onClick:i}),h,l&&(0,t.jsx)(`div`,{className:`tintora-modal__actions`,children:l})]})}function y(t){let n=(0,e.useRef)(t);return(0,e.useEffect)(()=>{n.current=t},[t]),n}function b(t,n){let r=y(n);(0,e.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&r.current()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,r])}function x(t,n,r){let i=y(r);(0,e.useEffect)(()=>{if(!t)return;let e=e=>{n.current?.contains(e.target)||i.current()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[t,n,i])}function S(t,n,r,i){let[a,o]=(0,e.useState)(null);return(0,e.useLayoutEffect)(()=>{let e=n.current;if(!t||!e){o(null);return}e.showPopover();let i=()=>o(r()),a=t=>{e.contains(t.target)||i()};return i(),window.addEventListener(`scroll`,a,!0),window.addEventListener(`resize`,i),()=>{window.removeEventListener(`scroll`,a,!0),window.removeEventListener(`resize`,i)}},[t,n,...i]),a}var C={gap:10,margin:8,arrowInset:12},w={top:`bottom`,bottom:`top`,left:`right`,right:`left`},T=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n));function E(e,t,n,r,{gap:i,margin:a}){let o=t=>{switch(t){case`top`:return e.top;case`bottom`:return r.height-e.bottom;case`left`:return e.left;case`right`:return r.width-e.right}},s=(n===`top`||n===`bottom`?t.height:t.width)+i+a,c=o(n);return c>=s||o(w[n])<=c?n:w[n]}function D(e,t,n,r={width:window.innerWidth,height:window.innerHeight},i={}){let a={...C,...i},{gap:o,margin:s,arrowInset:c}=a,l=E(e,t,n,r,a),u=l===`top`||l===`bottom`,d,f;switch(l){case`top`:d=e.y-t.height-o,f=e.x+e.width/2-t.width/2;break;case`bottom`:d=e.y+e.height+o,f=e.x+e.width/2-t.width/2;break;case`left`:d=e.y+e.height/2-t.height/2,f=e.x-t.width-o;break;case`right`:d=e.y+e.height/2-t.height/2,f=e.x+e.width+o}u?f=T(f,s,r.width-t.width-s):d=T(d,s,r.height-t.height-s);let p=u?e.x+e.width/2-f:e.y+e.height/2-d,m=u?t.width:t.height;return{top:d,left:f,placement:l,arrowOffset:T(p,c,m-c)}}var O=[`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `);function k({open:n,onOpenChange:i,trigger:a,title:o,children:s,role:c=`dialog`,size:l=`md`,placement:u=`bottom`,className:d}){let f=(0,e.useId)(),p=(0,e.useRef)(null),m=(0,e.useRef)(null),h=(0,e.useRef)(!1),g=()=>i(!1);b(n,g),x(n,p,g);let _=e=>{a.props.onClick?.(e),e.defaultPrevented||i(!n)},v=S(n,m,()=>{let e=m.current,t=p.current?.firstElementChild;return!e||!t?null:D(t.getBoundingClientRect(),{width:e.offsetWidth,height:e.offsetHeight},u,void 0,{gap:12})},[u,o,s]),y=v?{top:v.top,left:v.left,"--tintora-popover-arrow-offset":`${v.arrowOffset}px`}:{visibility:`hidden`},C=v!==null;return(0,e.useLayoutEffect)(()=>{let e=m.current;n&&C&&e&&(e.querySelector(`[data-autofocus]`)??e.querySelector(O)??e).focus()},[n,C]),(0,e.useEffect)(()=>{if(h.current&&!n){let e=document.activeElement;(!e||e===document.body)&&p.current?.querySelector(`*`)?.focus()}h.current=n},[n]),(0,t.jsxs)(`span`,{ref:p,className:`tintora-popover-root`,children:[(0,e.cloneElement)(a,{"aria-haspopup":`dialog`,"aria-expanded":n,"aria-controls":n?f:void 0,onClick:_}),n&&(0,t.jsx)(`div`,{id:f,ref:m,role:c,"aria-label":o,popover:`manual`,tabIndex:-1,className:r(`tintora-popover`,`tintora-popover--${l}`,`tintora-popover--${v?.placement??u}`,d),style:y,children:s})]})}function A({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}%`}})})]})}var j=(0,e.createContext)(null);function M(){let t=(0,e.useContext)(j);if(!t)throw Error(`Radio must be rendered inside a RadioGroup`);return t}function N({value:e,className:n,disabled:i,...a}){let o=M();return(0,t.jsxs)(`span`,{className:r(`tintora-radio`,n),children:[(0,t.jsx)(`input`,{...a,type:`radio`,className:`tintora-radio__input`,name:o.name,value:e,checked:o.value===e,disabled:i||o.disabled,onChange:()=>o.select(e)}),(0,t.jsx)(`span`,{className:`tintora-radio__circle`,"aria-hidden":`true`})]})}function P({value:n,defaultValue:i,onValueChange:a,disabled:o=!1,name:s,className:c,...l}){let u=(0,e.useId)(),[d,f]=(0,e.useState)(i??null),p=n!==void 0,m=p?n:d;return(0,t.jsx)(j.Provider,{value:{name:s??u,value:m,select:e=>{e!==m&&(p||f(e),a?.(e))},disabled:o},children:(0,t.jsx)(`div`,{...l,role:`radiogroup`,className:r(`tintora-radio-group`,c)})})}function F({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 I=(0,e.createContext)(null),L=()=>{let t=(0,e.useContext)(I);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function R({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=L();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 z=4;function B({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)(),_=(0,e.useRef)(null),v=(0,e.useRef)(null),y=(0,e.useRef)(null),[b,C]=(0,e.useState)(n??null),[w,T]=(0,e.useState)(!1),[E,D]=(0,e.useState)(-1),O=o!==void 0,k=O?o:b,A=i.findIndex(e=>e.value===k),j=e=>i[e]?.disabled!==!0,M=()=>i.findIndex((e,t)=>j(t)),N=(e,t)=>{for(let n=e+t;n>=0&&n<i.length;n+=t)if(j(n))return n;return e},P=()=>{let e=N(i.length,-1);return e===i.length?-1:e},F=e=>i.findIndex(t=>t.value===e),L=()=>{D(A>=0&&j(A)?A:M()),T(!0)},B=()=>T(!1),V=e=>{let t=F(e);t<0||!j(t)||(B(),e!==k&&(O||C(e),c?.(e)))},H=e=>{if(f?.(e),e.defaultPrevented)return;let{key:t}=e;if(t===`Tab`)return B();if(!w){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(t)&&(e.preventDefault(),L());return}let n={ArrowDown:()=>E<0?M():N(E,1),ArrowUp:()=>E<0?M():N(E,-1),Home:M,End:P};t in n?(e.preventDefault(),D(n[t]())):t===`Enter`||t===` `?(e.preventDefault(),E>=0?V(i[E].value):B()):t===`Escape`&&(e.preventDefault(),B())},U=e=>{p?.(e),e.key===` `&&e.preventDefault()},W=S(w,y,()=>{let e=y.current,t=v.current;if(!e||!t)return null;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+z+r<=window.innerHeight,a=n.top-z-r>=0;return{top:i||!a?n.bottom+z:n.top-z-r,left:n.left,minWidth:n.width}},[]),G=e=>{d?.(e),!e.defaultPrevented&&(w?B():L())};x(w,_,B),(0,e.useEffect)(()=>{w&&E>=0&&y.current?.children.item(E)?.scrollIntoView?.({block:`nearest`})},[w,E]);let K=e=>`${g}-option-${F(e)}`,q=w?i[E]?.value??null:null,J=i[A]?.label;return(0,t.jsx)(I.Provider,{value:{value:k,activeValue:q,select:V,optionId:K,activate:e=>D(F(e))},children:(0,t.jsxs)(`div`,{ref:_,className:`tintora-select`,children:[(0,t.jsxs)(`button`,{...h,ref:v,type:`button`,role:`combobox`,"aria-label":m,"aria-haspopup":`listbox`,"aria-expanded":w,"aria-controls":w?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`})})]}),w&&(0,t.jsx)(`div`,{ref:y,id:g,role:`listbox`,"aria-label":m,popover:`manual`,className:`tintora-select__menu`,style:W??{},onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(R,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:k??``,disabled:a})]})})}function V({width:e,height:n,className:i,style:a,...o}){let s={...e!==void 0&&{width:e},...n!==void 0&&{height:n}};return(0,t.jsx)(`span`,{...o,"aria-hidden":`true`,className:r(`tintora-skeleton`,i),style:{...s,...a}})}function H({checked:e,defaultChecked:n,onCheckedChange:i,className:a,...o}){let s=d({checked:e,defaultChecked:n,onCheckedChange:i});return(0,t.jsxs)(`span`,{className:r(`tintora-switch`,a),children:[(0,t.jsx)(`input`,{...o,type:`checkbox`,role:`switch`,className:`tintora-switch__input`,checked:s.checked,onChange:s.onChange}),(0,t.jsx)(`span`,{className:`tintora-switch__track`,"aria-hidden":`true`})]})}function U({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 W({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})]})}function G(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-success)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM8 12.5l2.7 2.7L16 9.8`})})}function K(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-error)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM15 9l-6 6M9 9l6 6`})})}function q(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-info)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 16v-4M12 8h.01`})})}function J(){return(0,t.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--tintora-toast-icon-warning)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{flex:`0 0 auto`},children:(0,t.jsx)(`path`,{d:`M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01`})})}function Y(){return(0,t.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M18 6L6 18M6 6l12 12`})})}var X={success:(0,t.jsx)(G,{}),error:(0,t.jsx)(K,{}),info:(0,t.jsx)(q,{}),warning:(0,t.jsx)(J,{})};function Z({status:n,children:i,action:a,onDismiss:o,duration:s=5e3,timerBar:c=!1,className:l,...u}){let[d,f]=(0,e.useState)(!1),[p,m]=(0,e.useState)(!1),h=d||p,g=y(o),_=(0,e.useRef)(s);(0,e.useEffect)(()=>{_.current=s},[s]),(0,e.useEffect)(()=>{if(s<=0||h)return;let e=Date.now(),t=setTimeout(()=>g.current(),_.current);return()=>{clearTimeout(t),_.current-=Date.now()-e}},[s,h,g]);let v=c&&s>0,b={"--tintora-toast-animation-duration":`${s}ms`};return(0,t.jsxs)(`div`,{...u,role:`status`,className:r(`tintora-toast`,v&&`tintora-toast--timer`,h&&`tintora-toast--paused`,l),onMouseEnter:e=>{u.onMouseEnter?.(e),f(!0)},onMouseLeave:e=>{u.onMouseLeave?.(e),f(!1)},onFocus:e=>{u.onFocus?.(e),m(!0)},onBlur:e=>{u.onBlur?.(e),e.currentTarget.contains(e.relatedTarget)||m(!1)},children:[n&&X[n],(0,t.jsx)(`span`,{className:`tintora-toast__message`,children:i}),a&&(0,t.jsx)(`button`,{type:`button`,className:`tintora-toast__action`,onClick:a.onClick,children:a.label}),(0,t.jsx)(`button`,{type:`button`,className:`tintora-toast__close`,"aria-label":`Dismiss`,onClick:o,children:(0,t.jsx)(Y,{})}),v&&(0,t.jsx)(`span`,{className:`tintora-toast__progress`,style:b})]})}var Q=(0,e.createContext)(null);function $(){let t=(0,e.useContext)(Q);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function ee({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)(Q.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 te({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=$(),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})}var ne=100;function re({title:n,content:i,shortcut:a,children:o,className:s,placement:c=`top`}){let l=(0,e.useId)(),[u,d]=(0,e.useState)(!1),f=(0,e.useRef)(null),p=(0,e.useRef)(null),m=(0,e.useRef)(void 0),h=()=>{window.clearTimeout(m.current),d(!0)},g=()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>d(!1),ne)},_=S(u,p,()=>{let e=p.current,t=f.current?.firstElementChild;return!e||!t?null:D(t.getBoundingClientRect(),{width:e.offsetWidth,height:e.offsetHeight},c)},[c,n,i,a]);b(u,()=>d(!1)),(0,e.useEffect)(()=>()=>window.clearTimeout(m.current),[]);let v=_?{top:_.top,left:_.left,"--tintora-tooltip-arrow-offset":`${_.arrowOffset}px`}:{visibility:`hidden`};return(0,t.jsxs)(`span`,{ref:f,className:`tintora-tooltip`,onMouseEnter:h,onMouseLeave:g,onFocus:h,onBlur:g,children:[(0,e.cloneElement)(o,{"aria-describedby":r(o.props[`aria-describedby`],u&&l)||void 0}),u&&(0,t.jsxs)(`div`,{id:l,ref:p,role:`tooltip`,popover:`manual`,style:v,className:r(`tintora-tooltip__content`,`tintora-tooltip__content--${_?.placement??c}`,n&&`tintora-tooltip__content--rich`,s),children:[n&&(0,t.jsx)(`span`,{className:`tintora-tooltip__title`,children:n}),(0,t.jsx)(`span`,{className:`tintora-tooltip__text`,children:i}),a&&(0,t.jsx)(`kbd`,{className:`tintora-tooltip__shortcut`,children:a})]})]})}exports.Avatar=a,exports.Button=c,exports.Card=l,exports.Checkbox=f,exports.Chip=p,exports.Dot=m,exports.IconButton=g,exports.Modal=v,exports.Popover=k,exports.ProgressBar=A,exports.Radio=N,exports.RadioGroup=P,exports.SearchInput=F,exports.Select=B,exports.SelectableCard=u,exports.Skeleton=V,exports.Spinner=s,exports.Switch=H,exports.Tag=U,exports.TextField=W,exports.Toast=Z,exports.Toggle=ee,exports.ToggleItem=te,exports.Tooltip=re;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { Chip } from './Chip/Chip';
7
7
  export { Dot } from './Dot/Dot';
8
8
  export { IconButton } from './IconButton/IconButton';
9
9
  export { Modal, type ModalProps } from './Modal/Modal';
10
+ export { Popover, type PopoverProps } from './Popover/Popover';
10
11
  export { ProgressBar, type ProgressBarProps } from './ProgressBar/ProgressBar';
11
12
  export { Radio, type RadioProps } from './Radio/Radio';
12
13
  export { RadioGroup, type RadioGroupProps } from './Radio/RadioGroup';
package/dist/index.js CHANGED
@@ -299,8 +299,179 @@ function E({ open: e, onClose: t, title: n, description: a, icon: s, status: u =
299
299
  });
300
300
  }
301
301
  //#endregion
302
+ //#region src/hooks/useLatest.ts
303
+ function D(e) {
304
+ let t = o(e);
305
+ return r(() => {
306
+ t.current = e;
307
+ }, [e]), t;
308
+ }
309
+ //#endregion
310
+ //#region src/hooks/useEscapeKey.ts
311
+ function O(e, t) {
312
+ let n = D(t);
313
+ r(() => {
314
+ if (!e) return;
315
+ let t = (e) => {
316
+ e.key === "Escape" && n.current();
317
+ };
318
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
319
+ }, [e, n]);
320
+ }
321
+ //#endregion
322
+ //#region src/hooks/useOutsidePress.ts
323
+ function k(e, t, n) {
324
+ let i = D(n);
325
+ r(() => {
326
+ if (!e) return;
327
+ let n = (e) => {
328
+ t.current?.contains(e.target) || i.current();
329
+ };
330
+ return document.addEventListener("pointerdown", n), () => document.removeEventListener("pointerdown", n);
331
+ }, [
332
+ e,
333
+ t,
334
+ i
335
+ ]);
336
+ }
337
+ //#endregion
338
+ //#region src/hooks/useTopLayerPosition.ts
339
+ function A(e, t, n, r) {
340
+ let [i, o] = s(null);
341
+ return a(() => {
342
+ let r = t.current;
343
+ if (!e || !r) {
344
+ o(null);
345
+ return;
346
+ }
347
+ r.showPopover();
348
+ let i = () => o(n()), a = (e) => {
349
+ r.contains(e.target) || i();
350
+ };
351
+ return i(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", i), () => {
352
+ window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", i);
353
+ };
354
+ }, [
355
+ e,
356
+ t,
357
+ ...r
358
+ ]), i;
359
+ }
360
+ //#endregion
361
+ //#region src/utils/placement.ts
362
+ var j = {
363
+ gap: 10,
364
+ margin: 8,
365
+ arrowInset: 12
366
+ }, M = {
367
+ top: "bottom",
368
+ bottom: "top",
369
+ left: "right",
370
+ right: "left"
371
+ }, N = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n));
372
+ function P(e, t, n, r, { gap: i, margin: a }) {
373
+ let o = (t) => {
374
+ switch (t) {
375
+ case "top": return e.top;
376
+ case "bottom": return r.height - e.bottom;
377
+ case "left": return e.left;
378
+ case "right": return r.width - e.right;
379
+ }
380
+ }, s = (n === "top" || n === "bottom" ? t.height : t.width) + i + a, c = o(n);
381
+ return c >= s || o(M[n]) <= c ? n : M[n];
382
+ }
383
+ function F(e, t, n, r = {
384
+ width: window.innerWidth,
385
+ height: window.innerHeight
386
+ }, i = {}) {
387
+ let a = {
388
+ ...j,
389
+ ...i
390
+ }, { gap: o, margin: s, arrowInset: c } = a, l = P(e, t, n, r, a), u = l === "top" || l === "bottom", d, f;
391
+ switch (l) {
392
+ case "top":
393
+ d = e.y - t.height - o, f = e.x + e.width / 2 - t.width / 2;
394
+ break;
395
+ case "bottom":
396
+ d = e.y + e.height + o, f = e.x + e.width / 2 - t.width / 2;
397
+ break;
398
+ case "left":
399
+ d = e.y + e.height / 2 - t.height / 2, f = e.x - t.width - o;
400
+ break;
401
+ case "right": d = e.y + e.height / 2 - t.height / 2, f = e.x + e.width + o;
402
+ }
403
+ u ? f = N(f, s, r.width - t.width - s) : d = N(d, s, r.height - t.height - s);
404
+ let p = u ? e.x + e.width / 2 - f : e.y + e.height / 2 - d, m = u ? t.width : t.height;
405
+ return {
406
+ top: d,
407
+ left: f,
408
+ placement: l,
409
+ arrowOffset: N(p, c, m - c)
410
+ };
411
+ }
412
+ //#endregion
413
+ //#region src/Popover/Popover.tsx
414
+ var I = [
415
+ "button:not([disabled])",
416
+ "[href]",
417
+ "input:not([disabled])",
418
+ "select:not([disabled])",
419
+ "textarea:not([disabled])",
420
+ "[tabindex]:not([tabindex=\"-1\"])"
421
+ ].join(", ");
422
+ function L({ open: t, onOpenChange: n, trigger: s, title: u, children: f, role: p = "dialog", size: m = "md", placement: h = "bottom", className: g }) {
423
+ let _ = i(), v = o(null), y = o(null), b = o(!1), x = () => n(!1);
424
+ O(t, x), k(t, v, x);
425
+ let S = (e) => {
426
+ s.props.onClick?.(e), e.defaultPrevented || n(!t);
427
+ }, C = A(t, y, () => {
428
+ let e = y.current, t = v.current?.firstElementChild;
429
+ return !e || !t ? null : F(t.getBoundingClientRect(), {
430
+ width: e.offsetWidth,
431
+ height: e.offsetHeight
432
+ }, h, void 0, { gap: 12 });
433
+ }, [
434
+ h,
435
+ u,
436
+ f
437
+ ]), w = C ? {
438
+ top: C.top,
439
+ left: C.left,
440
+ "--tintora-popover-arrow-offset": `${C.arrowOffset}px`
441
+ } : { visibility: "hidden" }, T = C !== null;
442
+ return a(() => {
443
+ let e = y.current;
444
+ t && T && e && (e.querySelector("[data-autofocus]") ?? e.querySelector(I) ?? e).focus();
445
+ }, [t, T]), r(() => {
446
+ if (b.current && !t) {
447
+ let e = document.activeElement;
448
+ (!e || e === document.body) && v.current?.querySelector("*")?.focus();
449
+ }
450
+ b.current = t;
451
+ }, [t]), /* @__PURE__ */ l("span", {
452
+ ref: v,
453
+ className: "tintora-popover-root",
454
+ children: [e(s, {
455
+ "aria-haspopup": "dialog",
456
+ "aria-expanded": t,
457
+ "aria-controls": t ? _ : void 0,
458
+ onClick: S
459
+ }), t && /* @__PURE__ */ c("div", {
460
+ id: _,
461
+ ref: y,
462
+ role: p,
463
+ "aria-label": u,
464
+ popover: "manual",
465
+ tabIndex: -1,
466
+ className: d("tintora-popover", `tintora-popover--${m}`, `tintora-popover--${C?.placement ?? h}`, g),
467
+ style: w,
468
+ children: f
469
+ })]
470
+ });
471
+ }
472
+ //#endregion
302
473
  //#region src/ProgressBar/ProgressBar.tsx
303
- function D({ title: e, progress: t, indeterminate: n, valueLabel: r, className: a, "aria-label": o }) {
474
+ function R({ title: e, progress: t, indeterminate: n, valueLabel: r, className: a, "aria-label": o }) {
304
475
  let s = i(), u = n ? void 0 : Math.min(100, Math.max(0, Number.isFinite(t) ? t : 0)), f = u === 100, p = r ?? (n ? "Indeterminate" : `${u}%`);
305
476
  return /* @__PURE__ */ l("div", {
306
477
  className: d("tintora-progress-bar", a),
@@ -334,16 +505,16 @@ function D({ title: e, progress: t, indeterminate: n, valueLabel: r, className:
334
505
  }
335
506
  //#endregion
336
507
  //#region src/Radio/RadioContext.ts
337
- var O = t(null);
338
- function k() {
339
- let e = n(O);
508
+ var z = t(null);
509
+ function B() {
510
+ let e = n(z);
340
511
  if (!e) throw Error("Radio must be rendered inside a RadioGroup");
341
512
  return e;
342
513
  }
343
514
  //#endregion
344
515
  //#region src/Radio/Radio.tsx
345
- function A({ value: e, className: t, disabled: n, ...r }) {
346
- let i = k();
516
+ function V({ value: e, className: t, disabled: n, ...r }) {
517
+ let i = B();
347
518
  return /* @__PURE__ */ l("span", {
348
519
  className: d("tintora-radio", t),
349
520
  children: [/* @__PURE__ */ c("input", {
@@ -363,9 +534,9 @@ function A({ value: e, className: t, disabled: n, ...r }) {
363
534
  }
364
535
  //#endregion
365
536
  //#region src/Radio/RadioGroup.tsx
366
- function j({ value: e, defaultValue: t, onValueChange: n, disabled: r = !1, name: a, className: o, ...l }) {
537
+ function H({ value: e, defaultValue: t, onValueChange: n, disabled: r = !1, name: a, className: o, ...l }) {
367
538
  let u = i(), [f, p] = s(t ?? null), m = e !== void 0, h = m ? e : f;
368
- return /* @__PURE__ */ c(O.Provider, {
539
+ return /* @__PURE__ */ c(z.Provider, {
369
540
  value: {
370
541
  name: a ?? u,
371
542
  value: h,
@@ -383,7 +554,7 @@ function j({ value: e, defaultValue: t, onValueChange: n, disabled: r = !1, name
383
554
  }
384
555
  //#endregion
385
556
  //#region src/SearchInput/SearchInput.tsx
386
- function M({ className: e, disabled: t, ...n }) {
557
+ function U({ className: e, disabled: t, ...n }) {
387
558
  return /* @__PURE__ */ l("label", {
388
559
  className: d("tintora-search-input", t && "tintora-search-input--disabled", e),
389
560
  children: [/* @__PURE__ */ l("svg", {
@@ -408,63 +579,16 @@ function M({ className: e, disabled: t, ...n }) {
408
579
  });
409
580
  }
410
581
  //#endregion
411
- //#region src/hooks/useLatest.ts
412
- function N(e) {
413
- let t = o(e);
414
- return r(() => {
415
- t.current = e;
416
- }, [e]), t;
417
- }
418
- //#endregion
419
- //#region src/hooks/useOutsidePress.ts
420
- function P(e, t, n) {
421
- let i = N(n);
422
- r(() => {
423
- if (!e) return;
424
- let n = (e) => {
425
- t.current?.contains(e.target) || i.current();
426
- };
427
- return document.addEventListener("pointerdown", n), () => document.removeEventListener("pointerdown", n);
428
- }, [
429
- e,
430
- t,
431
- i
432
- ]);
433
- }
434
- //#endregion
435
- //#region src/hooks/useTopLayerPosition.ts
436
- function F(e, t, n, r) {
437
- let [i, o] = s(null);
438
- return a(() => {
439
- let r = t.current;
440
- if (!e || !r) {
441
- o(null);
442
- return;
443
- }
444
- r.showPopover();
445
- let i = () => o(n()), a = (e) => {
446
- r.contains(e.target) || i();
447
- };
448
- return i(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", i), () => {
449
- window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", i);
450
- };
451
- }, [
452
- e,
453
- t,
454
- ...r
455
- ]), i;
456
- }
457
- //#endregion
458
582
  //#region src/Select/SelectContext.ts
459
- var I = t(null), L = () => {
460
- let e = n(I);
583
+ var W = t(null), G = () => {
584
+ let e = n(W);
461
585
  if (!e) throw Error("SelectOption must be rendered inside a Select");
462
586
  return e;
463
587
  };
464
588
  //#endregion
465
589
  //#region src/Select/SelectOption.tsx
466
590
  function ee({ label: e, value: t, disabled: n }) {
467
- let { select: r, activate: i, optionId: a, value: o, activeValue: s } = L();
591
+ let { select: r, activate: i, optionId: a, value: o, activeValue: s } = G();
468
592
  return /* @__PURE__ */ c("div", {
469
593
  id: a(t),
470
594
  role: "option",
@@ -478,64 +602,64 @@ function ee({ label: e, value: t, disabled: n }) {
478
602
  }
479
603
  //#endregion
480
604
  //#region src/Select/Select.tsx
481
- var R = 4;
482
- function z({ defaultValue: e, options: t, disabled: n, value: a, placeholder: u, onValueChange: f, name: p, className: m, onClick: h, onKeyDown: g, onKeyUp: _, "aria-label": v, ...y }) {
483
- let b = i(), x = o(null), S = o(null), C = o(null), [w, T] = s(e ?? null), [E, D] = s(!1), [O, k] = s(-1), A = a !== void 0, j = A ? a : w, M = t.findIndex((e) => e.value === j), N = (e) => t[e]?.disabled !== !0, L = () => t.findIndex((e, t) => N(t)), z = (e, n) => {
484
- for (let r = e + n; r >= 0 && r < t.length; r += n) if (N(r)) return r;
605
+ var K = 4;
606
+ function q({ defaultValue: e, options: t, disabled: n, value: a, placeholder: u, onValueChange: f, name: p, className: m, onClick: h, onKeyDown: g, onKeyUp: _, "aria-label": v, ...y }) {
607
+ let b = i(), x = o(null), S = o(null), C = o(null), [w, T] = s(e ?? null), [E, D] = s(!1), [O, j] = s(-1), M = a !== void 0, N = M ? a : w, P = t.findIndex((e) => e.value === N), F = (e) => t[e]?.disabled !== !0, I = () => t.findIndex((e, t) => F(t)), L = (e, n) => {
608
+ for (let r = e + n; r >= 0 && r < t.length; r += n) if (F(r)) return r;
485
609
  return e;
486
- }, B = () => {
487
- let e = z(t.length, -1);
610
+ }, R = () => {
611
+ let e = L(t.length, -1);
488
612
  return e === t.length ? -1 : e;
489
- }, V = (e) => t.findIndex((t) => t.value === e), H = () => {
490
- k(M >= 0 && N(M) ? M : L()), D(!0);
491
- }, U = () => D(!1), W = (e) => {
492
- let t = V(e);
493
- t < 0 || !N(t) || (U(), e !== j && (A || T(e), f?.(e)));
494
- }, G = (e) => {
613
+ }, z = (e) => t.findIndex((t) => t.value === e), B = () => {
614
+ j(P >= 0 && F(P) ? P : I()), D(!0);
615
+ }, V = () => D(!1), H = (e) => {
616
+ let t = z(e);
617
+ t < 0 || !F(t) || (V(), e !== N && (M || T(e), f?.(e)));
618
+ }, U = (e) => {
495
619
  if (g?.(e), e.defaultPrevented) return;
496
620
  let { key: n } = e;
497
- if (n === "Tab") return U();
621
+ if (n === "Tab") return V();
498
622
  if (!E) {
499
623
  [
500
624
  "Enter",
501
625
  " ",
502
626
  "ArrowDown",
503
627
  "ArrowUp"
504
- ].includes(n) && (e.preventDefault(), H());
628
+ ].includes(n) && (e.preventDefault(), B());
505
629
  return;
506
630
  }
507
631
  let r = {
508
- ArrowDown: () => O < 0 ? L() : z(O, 1),
509
- ArrowUp: () => O < 0 ? L() : z(O, -1),
510
- Home: L,
511
- End: B
632
+ ArrowDown: () => O < 0 ? I() : L(O, 1),
633
+ ArrowUp: () => O < 0 ? I() : L(O, -1),
634
+ Home: I,
635
+ End: R
512
636
  };
513
- n in r ? (e.preventDefault(), k(r[n]())) : n === "Enter" || n === " " ? (e.preventDefault(), O >= 0 ? W(t[O].value) : U()) : n === "Escape" && (e.preventDefault(), U());
514
- }, K = (e) => {
637
+ n in r ? (e.preventDefault(), j(r[n]())) : n === "Enter" || n === " " ? (e.preventDefault(), O >= 0 ? H(t[O].value) : V()) : n === "Escape" && (e.preventDefault(), V());
638
+ }, G = (e) => {
515
639
  _?.(e), e.key === " " && e.preventDefault();
516
- }, q = F(E, C, () => {
640
+ }, q = A(E, C, () => {
517
641
  let e = C.current, t = S.current;
518
642
  if (!e || !t) return null;
519
- let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom + R + r <= window.innerHeight, a = n.top - R - r >= 0;
643
+ let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom + K + r <= window.innerHeight, a = n.top - K - r >= 0;
520
644
  return {
521
- top: i || !a ? n.bottom + R : n.top - R - r,
645
+ top: i || !a ? n.bottom + K : n.top - K - r,
522
646
  left: n.left,
523
647
  minWidth: n.width
524
648
  };
525
649
  }, []), J = (e) => {
526
- h?.(e), !e.defaultPrevented && (E ? U() : H());
650
+ h?.(e), !e.defaultPrevented && (E ? V() : B());
527
651
  };
528
- P(E, x, U), r(() => {
652
+ k(E, x, V), r(() => {
529
653
  E && O >= 0 && C.current?.children.item(O)?.scrollIntoView?.({ block: "nearest" });
530
654
  }, [E, O]);
531
- let Y = (e) => `${b}-option-${V(e)}`, X = E ? t[O]?.value ?? null : null, Z = t[M]?.label;
532
- return /* @__PURE__ */ c(I.Provider, {
655
+ let Y = (e) => `${b}-option-${z(e)}`, X = E ? t[O]?.value ?? null : null, Z = t[P]?.label;
656
+ return /* @__PURE__ */ c(W.Provider, {
533
657
  value: {
534
- value: j,
658
+ value: N,
535
659
  activeValue: X,
536
- select: W,
660
+ select: H,
537
661
  optionId: Y,
538
- activate: (e) => k(V(e))
662
+ activate: (e) => j(z(e))
539
663
  },
540
664
  children: /* @__PURE__ */ l("div", {
541
665
  ref: x,
@@ -554,8 +678,8 @@ function z({ defaultValue: e, options: t, disabled: n, value: a, placeholder: u,
554
678
  disabled: n,
555
679
  className: d("tintora-select__trigger", m),
556
680
  onClick: J,
557
- onKeyDown: G,
558
- onKeyUp: K,
681
+ onKeyDown: U,
682
+ onKeyUp: G,
559
683
  children: [/* @__PURE__ */ c("span", {
560
684
  className: d("tintora-select__value", Z === void 0 && "tintora-select__value--placeholder"),
561
685
  children: Z ?? u
@@ -587,7 +711,7 @@ function z({ defaultValue: e, options: t, disabled: n, value: a, placeholder: u,
587
711
  p && /* @__PURE__ */ c("input", {
588
712
  type: "hidden",
589
713
  name: p,
590
- value: j ?? "",
714
+ value: N ?? "",
591
715
  disabled: n
592
716
  })
593
717
  ]
@@ -596,7 +720,7 @@ function z({ defaultValue: e, options: t, disabled: n, value: a, placeholder: u,
596
720
  }
597
721
  //#endregion
598
722
  //#region src/Skeleton/Skeleton.tsx
599
- function B({ width: e, height: t, className: n, style: r, ...i }) {
723
+ function J({ width: e, height: t, className: n, style: r, ...i }) {
600
724
  let a = {
601
725
  ...e !== void 0 && { width: e },
602
726
  ...t !== void 0 && { height: t }
@@ -613,7 +737,7 @@ function B({ width: e, height: t, className: n, style: r, ...i }) {
613
737
  }
614
738
  //#endregion
615
739
  //#region src/Switch/Switch.tsx
616
- function V({ checked: e, defaultChecked: t, onCheckedChange: n, className: r, ...i }) {
740
+ function Y({ checked: e, defaultChecked: t, onCheckedChange: n, className: r, ...i }) {
617
741
  let a = y({
618
742
  checked: e,
619
743
  defaultChecked: t,
@@ -636,7 +760,7 @@ function V({ checked: e, defaultChecked: t, onCheckedChange: n, className: r, ..
636
760
  }
637
761
  //#endregion
638
762
  //#region src/Tag/Tag.tsx
639
- function H({ children: e, className: t, variant: n = "neutral", size: r = "medium", ...i }) {
763
+ function X({ children: e, className: t, variant: n = "neutral", size: r = "medium", ...i }) {
640
764
  return /* @__PURE__ */ c("span", {
641
765
  ...i,
642
766
  className: d("tintora-tag", `tintora-tag--${n}`, `tintora-tag--${r}`, t),
@@ -645,7 +769,7 @@ function H({ children: e, className: t, variant: n = "neutral", size: r = "mediu
645
769
  }
646
770
  //#endregion
647
771
  //#region src/TextField/TextField.tsx
648
- function U({ label: e, hint: t, error: n, id: r, className: a, disabled: o, "aria-describedby": s, "aria-invalid": u, ...f }) {
772
+ function Z({ label: e, hint: t, error: n, id: r, className: a, disabled: o, "aria-describedby": s, "aria-invalid": u, ...f }) {
649
773
  let p = i(), m = r ?? p, h = `${m}-message`, g = n ?? t;
650
774
  return /* @__PURE__ */ l("div", {
651
775
  className: d("tintora-textfield", o && "tintora-textfield--disabled", a),
@@ -673,7 +797,7 @@ function U({ label: e, hint: t, error: n, id: r, className: a, disabled: o, "ari
673
797
  }
674
798
  //#endregion
675
799
  //#region src/Toast/ToastIcons.tsx
676
- function W() {
800
+ function te() {
677
801
  return /* @__PURE__ */ c("svg", {
678
802
  width: "20",
679
803
  height: "20",
@@ -688,7 +812,7 @@ function W() {
688
812
  children: /* @__PURE__ */ c("path", { d: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM8 12.5l2.7 2.7L16 9.8" })
689
813
  });
690
814
  }
691
- function G() {
815
+ function ne() {
692
816
  return /* @__PURE__ */ c("svg", {
693
817
  width: "20",
694
818
  height: "20",
@@ -703,7 +827,7 @@ function G() {
703
827
  children: /* @__PURE__ */ c("path", { d: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM15 9l-6 6M9 9l6 6" })
704
828
  });
705
829
  }
706
- function K() {
830
+ function re() {
707
831
  return /* @__PURE__ */ c("svg", {
708
832
  width: "20",
709
833
  height: "20",
@@ -718,7 +842,7 @@ function K() {
718
842
  children: /* @__PURE__ */ c("path", { d: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 16v-4M12 8h.01" })
719
843
  });
720
844
  }
721
- function q() {
845
+ function ie() {
722
846
  return /* @__PURE__ */ c("svg", {
723
847
  width: "20",
724
848
  height: "20",
@@ -733,7 +857,7 @@ function q() {
733
857
  children: /* @__PURE__ */ c("path", { d: "M10.3 3.9L1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01" })
734
858
  });
735
859
  }
736
- function J() {
860
+ function ae() {
737
861
  return /* @__PURE__ */ c("svg", {
738
862
  width: "14",
739
863
  height: "14",
@@ -748,14 +872,14 @@ function J() {
748
872
  }
749
873
  //#endregion
750
874
  //#region src/Toast/Toast.tsx
751
- var Y = {
752
- success: /* @__PURE__ */ c(W, {}),
753
- error: /* @__PURE__ */ c(G, {}),
754
- info: /* @__PURE__ */ c(K, {}),
755
- warning: /* @__PURE__ */ c(q, {})
875
+ var Q = {
876
+ success: /* @__PURE__ */ c(te, {}),
877
+ error: /* @__PURE__ */ c(ne, {}),
878
+ info: /* @__PURE__ */ c(re, {}),
879
+ warning: /* @__PURE__ */ c(ie, {})
756
880
  };
757
- function X({ status: e, children: t, action: n, onDismiss: i, duration: a = 5e3, timerBar: u = !1, className: f, ...p }) {
758
- let [m, h] = s(!1), [g, _] = s(!1), v = m || g, y = N(i), b = o(a);
881
+ function oe({ status: e, children: t, action: n, onDismiss: i, duration: a = 5e3, timerBar: u = !1, className: f, ...p }) {
882
+ let [m, h] = s(!1), [g, _] = s(!1), v = m || g, y = D(i), b = o(a);
759
883
  r(() => {
760
884
  b.current = a;
761
885
  }, [a]), r(() => {
@@ -787,7 +911,7 @@ function X({ status: e, children: t, action: n, onDismiss: i, duration: a = 5e3,
787
911
  p.onBlur?.(e), e.currentTarget.contains(e.relatedTarget) || _(!1);
788
912
  },
789
913
  children: [
790
- e && Y[e],
914
+ e && Q[e],
791
915
  /* @__PURE__ */ c("span", {
792
916
  className: "tintora-toast__message",
793
917
  children: t
@@ -803,7 +927,7 @@ function X({ status: e, children: t, action: n, onDismiss: i, duration: a = 5e3,
803
927
  className: "tintora-toast__close",
804
928
  "aria-label": "Dismiss",
805
929
  onClick: i,
806
- children: /* @__PURE__ */ c(J, {})
930
+ children: /* @__PURE__ */ c(ae, {})
807
931
  }),
808
932
  x && /* @__PURE__ */ c("span", {
809
933
  className: "tintora-toast__progress",
@@ -814,15 +938,15 @@ function X({ status: e, children: t, action: n, onDismiss: i, duration: a = 5e3,
814
938
  }
815
939
  //#endregion
816
940
  //#region src/Toggle/ToggleContext.ts
817
- var Z = t(null);
818
- function te() {
819
- let e = n(Z);
941
+ var $ = t(null);
942
+ function se() {
943
+ let e = n($);
820
944
  if (!e) throw Error("ToggleItem must be rendered inside a Toggle");
821
945
  return e;
822
946
  }
823
947
  //#endregion
824
948
  //#region src/Toggle/Toggle.tsx
825
- function ne({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: i = !1, className: u, ...f }) {
949
+ function ce({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: i = !1, className: u, ...f }) {
826
950
  let [p, m] = s(n), h = t !== void 0, g = h ? t : p, _ = e.findIndex((e) => e.props.value === g), v = o(null), [y, b] = s({
827
951
  x: 0,
828
952
  width: 0
@@ -849,7 +973,7 @@ function ne({ children: e, value: t, defaultValue: n, onValueChange: r, disabled
849
973
  "--tintora-toggle-thumb-x": `${y.x}px`,
850
974
  "--tintora-toggle-thumb-width": `${y.width}px`
851
975
  };
852
- return /* @__PURE__ */ c(Z.Provider, {
976
+ return /* @__PURE__ */ c($.Provider, {
853
977
  value: {
854
978
  value: g,
855
979
  select: (e) => {
@@ -872,8 +996,8 @@ function ne({ children: e, value: t, defaultValue: n, onValueChange: r, disabled
872
996
  }
873
997
  //#endregion
874
998
  //#region src/Toggle/ToggleItem.tsx
875
- function re({ value: e, children: t, className: n, disabled: r, onClick: i, ...a }) {
876
- let o = te(), s = (t) => {
999
+ function le({ value: e, children: t, className: n, disabled: r, onClick: i, ...a }) {
1000
+ let o = se(), s = (t) => {
877
1001
  i?.(t), t.defaultPrevented || o.select(e);
878
1002
  };
879
1003
  return /* @__PURE__ */ c("button", {
@@ -887,80 +1011,16 @@ function re({ value: e, children: t, className: n, disabled: r, onClick: i, ...a
887
1011
  });
888
1012
  }
889
1013
  //#endregion
890
- //#region src/utils/placement.ts
891
- var ie = {
892
- gap: 10,
893
- margin: 8,
894
- arrowInset: 12
895
- }, Q = {
896
- top: "bottom",
897
- bottom: "top",
898
- left: "right",
899
- right: "left"
900
- }, $ = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n));
901
- function ae(e, t, n, r, { gap: i, margin: a }) {
902
- let o = (t) => {
903
- switch (t) {
904
- case "top": return e.top;
905
- case "bottom": return r.height - e.bottom;
906
- case "left": return e.left;
907
- case "right": return r.width - e.right;
908
- }
909
- }, s = (n === "top" || n === "bottom" ? t.height : t.width) + i + a, c = o(n);
910
- return c >= s || o(Q[n]) <= c ? n : Q[n];
911
- }
912
- function oe(e, t, n, r = {
913
- width: window.innerWidth,
914
- height: window.innerHeight
915
- }, i = {}) {
916
- let a = {
917
- ...ie,
918
- ...i
919
- }, { gap: o, margin: s, arrowInset: c } = a, l = ae(e, t, n, r, a), u = l === "top" || l === "bottom", d, f;
920
- switch (l) {
921
- case "top":
922
- d = e.y - t.height - o, f = e.x + e.width / 2 - t.width / 2;
923
- break;
924
- case "bottom":
925
- d = e.y + e.height + o, f = e.x + e.width / 2 - t.width / 2;
926
- break;
927
- case "left":
928
- d = e.y + e.height / 2 - t.height / 2, f = e.x - t.width - o;
929
- break;
930
- case "right": d = e.y + e.height / 2 - t.height / 2, f = e.x + e.width + o;
931
- }
932
- u ? f = $(f, s, r.width - t.width - s) : d = $(d, s, r.height - t.height - s);
933
- let p = u ? e.x + e.width / 2 - f : e.y + e.height / 2 - d, m = u ? t.width : t.height;
934
- return {
935
- top: d,
936
- left: f,
937
- placement: l,
938
- arrowOffset: $(p, c, m - c)
939
- };
940
- }
941
- //#endregion
942
- //#region src/hooks/useEscapeKey.ts
943
- function se(e, t) {
944
- let n = N(t);
945
- r(() => {
946
- if (!e) return;
947
- let t = (e) => {
948
- e.key === "Escape" && n.current();
949
- };
950
- return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
951
- }, [e, n]);
952
- }
953
- //#endregion
954
1014
  //#region src/Tooltip/Tooltip.tsx
955
- var ce = 100;
956
- function le({ title: t, content: n, shortcut: a, children: u, className: f, placement: p = "top" }) {
1015
+ var ue = 100;
1016
+ function de({ title: t, content: n, shortcut: a, children: u, className: f, placement: p = "top" }) {
957
1017
  let m = i(), [h, g] = s(!1), _ = o(null), v = o(null), y = o(void 0), b = () => {
958
1018
  window.clearTimeout(y.current), g(!0);
959
1019
  }, x = () => {
960
- window.clearTimeout(y.current), y.current = window.setTimeout(() => g(!1), ce);
961
- }, S = F(h, v, () => {
1020
+ window.clearTimeout(y.current), y.current = window.setTimeout(() => g(!1), ue);
1021
+ }, S = A(h, v, () => {
962
1022
  let e = v.current, t = _.current?.firstElementChild;
963
- return !e || !t ? null : oe(t.getBoundingClientRect(), {
1023
+ return !e || !t ? null : F(t.getBoundingClientRect(), {
964
1024
  width: e.offsetWidth,
965
1025
  height: e.offsetHeight
966
1026
  }, p);
@@ -970,7 +1030,7 @@ function le({ title: t, content: n, shortcut: a, children: u, className: f, plac
970
1030
  n,
971
1031
  a
972
1032
  ]);
973
- se(h, () => g(!1)), r(() => () => window.clearTimeout(y.current), []);
1033
+ O(h, () => g(!1)), r(() => () => window.clearTimeout(y.current), []);
974
1034
  let C = S ? {
975
1035
  top: S.top,
976
1036
  left: S.left,
@@ -1008,4 +1068,4 @@ function le({ title: t, content: n, shortcut: a, children: u, className: f, plac
1008
1068
  });
1009
1069
  }
1010
1070
  //#endregion
1011
- export { p as Avatar, g as Button, _ as Card, b as Checkbox, x as Chip, S as Dot, w as IconButton, E as Modal, D as ProgressBar, A as Radio, j as RadioGroup, M as SearchInput, z as Select, v as SelectableCard, B as Skeleton, h as Spinner, V as Switch, H as Tag, U as TextField, X as Toast, ne as Toggle, re as ToggleItem, le as Tooltip };
1071
+ export { p as Avatar, g as Button, _ as Card, b as Checkbox, x as Chip, S as Dot, w as IconButton, E as Modal, L as Popover, R as ProgressBar, V as Radio, H as RadioGroup, U as SearchInput, q as Select, v as SelectableCard, J as Skeleton, h as Spinner, Y as Switch, X as Tag, Z as TextField, oe as Toast, ce as Toggle, le as ToggleItem, de as Tooltip };
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-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-checkbox{flex-shrink:0;width:22px;height:22px;display:inline-block;position:relative}.tintora-checkbox__input{opacity:0;cursor:pointer;width:44px;height:44px;margin:0;position:absolute;inset:-11px}.tintora-checkbox__box{box-sizing:border-box;border:2px solid var(--tintora-control-border);border-radius:var(--tintora-radius-7);outline-offset:2px;pointer-events:none;background:0 0;justify-content:center;align-items:center;transition:background .15s,border-color .15s;display:flex;position:absolute;inset:0}.tintora-checkbox__check,.tintora-checkbox__dash{stroke:var(--tintora-control-on-fill);opacity:0;position:absolute}.tintora-checkbox__input:enabled:hover+.tintora-checkbox__box{border-color:var(--tintora-control-fill);background:var(--tintora-control-hover-tint)}.tintora-checkbox__input:checked+.tintora-checkbox__box,.tintora-checkbox__input:indeterminate+.tintora-checkbox__box{border-color:var(--tintora-control-fill);background:var(--tintora-control-fill)}.tintora-checkbox__input:checked+.tintora-checkbox__box .tintora-checkbox__check{opacity:1}.tintora-checkbox__input:indeterminate+.tintora-checkbox__box .tintora-checkbox__check{opacity:0}.tintora-checkbox__input:indeterminate+.tintora-checkbox__box .tintora-checkbox__dash{opacity:1}.tintora-checkbox__input:focus-visible+.tintora-checkbox__box{outline:2px solid var(--tintora-focus)}.tintora-checkbox__input:disabled{cursor:not-allowed}.tintora-checkbox__input:disabled+.tintora-checkbox__box{opacity:var(--tintora-opacity-disabled)}@media (prefers-reduced-motion:reduce){.tintora-checkbox__box{transition:none}}.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-modal{box-sizing:border-box;width:min(var(--tintora-modal-width), calc(100vw - 32px));border:1px solid var(--tintora-border-modal);border-radius:var(--tintora-radius-32);max-width:none;max-height:calc(100vh - 32px);font-family:var(--tintora-font-family);color:var(--tintora-text);background:var(--tintora-surface-modal);box-shadow:var(--tintora-shadow-modal);flex-direction:column;gap:18px;padding:28px;overflow:auto}.tintora-modal[open]{display:flex}.tintora-modal::backdrop{background:var(--tintora-scrim)}@media (prefers-reduced-motion:no-preference){.tintora-modal,.tintora-modal::backdrop{opacity:0;transition:opacity .2s ease, scale .2s ease, overlay .2s allow-discrete, display .2s allow-discrete}.tintora-modal{scale:.96}.tintora-modal[open],.tintora-modal[open]::backdrop{opacity:1}.tintora-modal[open]{scale:1}@starting-style{.tintora-modal[open],.tintora-modal[open]::backdrop{opacity:0}.tintora-modal[open]{scale:.96}}}body:has(.tintora-modal:modal){overflow:hidden}.tintora-modal--sm{--tintora-modal-width:400px}.tintora-modal--md{--tintora-modal-width:520px}.tintora-modal--lg{--tintora-modal-width:640px}.tintora-modal--center{text-align:center;align-items:center}.tintora-modal__close{position:absolute;top:18px;right:18px}.tintora-modal__title{font-size:20px;font-weight:var(--tintora-font-weight-bold);line-height:var(--tintora-line-height-tight);margin:0;padding-inline-end:44px}.tintora-modal--center .tintora-modal__title{padding-inline:0}.tintora-modal__description{color:var(--tintora-text-muted);margin:8px 0 0;font-size:13.5px;line-height:1.55}.tintora-modal__icon{border:1px solid var(--tintora-modal-status-border);border-radius:var(--tintora-radius-pill);width:52px;height:52px;color:var(--tintora-modal-status-fg);background:var(--tintora-modal-status-bg);justify-content:center;align-items:center;display:flex}.tintora-modal--center .tintora-modal__icon{width:64px;height:64px}.tintora-modal__icon svg{width:24px;height:24px}.tintora-modal--center .tintora-modal__icon svg{width:30px;height:30px}.tintora-modal__icon--success{--tintora-modal-status-bg:var(--tintora-status-success-bg);--tintora-modal-status-border:var(--tintora-status-success-border);--tintora-modal-status-fg:var(--tintora-status-success-fg)}.tintora-modal__icon--error{--tintora-modal-status-bg:var(--tintora-status-error-bg);--tintora-modal-status-border:var(--tintora-status-error-border);--tintora-modal-status-fg:var(--tintora-status-error-fg)}.tintora-modal__icon--info{--tintora-modal-status-bg:var(--tintora-status-info-bg);--tintora-modal-status-border:var(--tintora-status-info-border);--tintora-modal-status-fg:var(--tintora-status-info-fg)}.tintora-modal__icon--warning{--tintora-modal-status-bg:var(--tintora-status-warning-bg);--tintora-modal-status-border:var(--tintora-status-warning-border);--tintora-modal-status-fg:var(--tintora-status-warning-fg)}.tintora-modal__actions{justify-content:flex-end;gap:10px;padding-top:6px;display:flex}.tintora-modal--center .tintora-modal__actions{flex-direction:column;align-self:stretch}.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-radio{flex-shrink:0;width:22px;height:22px;display:inline-block;position:relative}.tintora-radio__input{opacity:0;cursor:pointer;width:44px;height:44px;margin:0;position:absolute;inset:-11px}.tintora-radio__circle{box-sizing:border-box;border:2px solid var(--tintora-control-border);border-radius:var(--tintora-radius-pill);outline-offset:2px;pointer-events:none;background:0 0;justify-content:center;align-items:center;transition:background .15s,border-color .15s;display:flex;position:absolute;inset:0}.tintora-radio__circle:after{content:"";border-radius:var(--tintora-radius-pill);background:var(--tintora-control-fill);opacity:0;width:10px;height:10px}.tintora-radio__input:enabled:hover+.tintora-radio__circle{border-color:var(--tintora-control-fill);background:var(--tintora-control-hover-tint)}.tintora-radio__input:checked+.tintora-radio__circle{border-color:var(--tintora-control-fill);background:0 0}.tintora-radio__input:checked+.tintora-radio__circle:after{opacity:1}.tintora-radio__input:focus-visible+.tintora-radio__circle{outline:2px solid var(--tintora-focus)}.tintora-radio__input:disabled{cursor:not-allowed}.tintora-radio__input:disabled+.tintora-radio__circle{opacity:var(--tintora-opacity-disabled)}@media (prefers-reduced-motion:reduce){.tintora-radio__circle{transition: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-skeleton{border-radius:var(--tintora-radius-pill);background:var(--tintora-shimmer);background-size:200% 100%;flex-shrink:0;width:100%;height:14px;animation:1.4s linear infinite tintora-shimmer;display:block}@keyframes tintora-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.tintora-skeleton{animation:none}}.tintora-switch{flex-shrink:0;width:44px;height:26px;display:inline-block;position:relative}.tintora-switch__input{opacity:0;cursor:pointer;width:100%;height:calc(100% + 18px);margin:0;position:absolute;inset:-9px 0}.tintora-switch__track{--tintora-switch-offset:3px;border-radius:var(--tintora-radius-pill);background:var(--tintora-switch-track);outline-offset:2px;pointer-events:none;transition:background .2s;position:absolute;inset:0}.tintora-switch__track:after{content:"";top:var(--tintora-switch-offset);left:var(--tintora-switch-offset);border-radius:var(--tintora-radius-pill);background:var(--tintora-color-white);width:20px;height:20px;box-shadow:var(--tintora-shadow-knob);transition:transform .2s;position:absolute}.tintora-switch__input:hover+.tintora-switch__track{background:var(--tintora-switch-track-hover)}.tintora-switch__input:checked+.tintora-switch__track{background:var(--tintora-control-fill)}.tintora-switch__input:checked+.tintora-switch__track:after{transform:translate(18px)}.tintora-switch__input:focus-visible+.tintora-switch__track{outline:2px solid var(--tintora-focus)}.tintora-switch__input:disabled{cursor:not-allowed}.tintora-switch__input:disabled+.tintora-switch__track{opacity:var(--tintora-opacity-disabled);background:var(--tintora-switch-track)}.tintora-switch__input:disabled:checked+.tintora-switch__track{background:var(--tintora-control-fill)}@media (prefers-reduced-motion:reduce){.tintora-switch__track,.tintora-switch__track:after{transition:none}}.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-toast{box-sizing:border-box;border-radius:var(--tintora-radius-18);background:var(--tintora-surface-toast);min-height:52px;color:var(--tintora-text-on-toast);box-shadow:var(--tintora-shadow-toast);align-items:center;gap:12px;padding:10px 10px 10px 16px;display:flex}.tintora-toast--timer{min-height:56px;padding:10px 10px 14px 16px;position:relative;overflow:hidden}.tintora-toast__message{min-width:0;font:var(--tintora-font-button);font-weight:var(--tintora-font-weight-semibold);flex:1}.tintora-toast__action{border-radius:var(--tintora-radius-pill);height:32px;font-family:inherit;font:var(--tintora-font-button);font-weight:var(--tintora-font-weight-extrabold);color:var(--tintora-toast-action);cursor:pointer;background:0 0;border:0;padding:0 12px;display:inline-block}.tintora-toast__close{border-radius:var(--tintora-radius-pill);width:32px;height:32px;color:var(--tintora-text-on-toast-muted);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;display:flex}.tintora-toast__progress{background:var(--tintora-toast-action);width:100%;height:4px;animation:progress-bar var(--tintora-toast-animation-duration) forwards;position:absolute;bottom:0;left:0}.tintora-toast--paused .tintora-toast__progress{animation-play-state:paused}@keyframes progress-bar{0%{width:100%}to{width:0}}@media (prefers-reduced-motion:reduce){.tintora-toast__progress{display:none}}.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)}.tintora-tooltip{display:contents}.tintora-tooltip__content{box-sizing:border-box;border-radius:var(--tintora-radius-10);width:max-content;font:var(--tintora-font-body);font-weight:var(--tintora-font-weight-semibold);white-space:nowrap;color:var(--tintora-text-on-tooltip);background:var(--tintora-surface-tooltip);box-shadow:var(--tintora-shadow-tooltip);border:0;align-items:center;gap:10px;margin:0;padding:6px 10px;display:inline-flex;inset:auto;overflow:visible}.tintora-tooltip__content:before{content:"";background:inherit;width:8px;height:8px;position:absolute;transform:rotate(45deg)}.tintora-tooltip__content--top:before{bottom:-4px;left:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__content--bottom:before{top:-4px;left:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__content--left:before{right:-4px;top:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__content--right:before{left:-4px;top:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__shortcut{border-radius:var(--tintora-radius-6);font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-bold);background:var(--tintora-tooltip-kbd-bg);margin-right:-2px;padding:2px 6px}.tintora-tooltip__content--rich{border-radius:var(--tintora-radius-12);width:220px;font-weight:var(--tintora-font-weight-medium);white-space:normal;padding:10px 12px;display:block}.tintora-tooltip__title{font:var(--tintora-font-label);display:block}.tintora-tooltip__text{min-width:0}.tintora-tooltip__content--rich .tintora-tooltip__text{color:var(--tintora-text-on-tooltip-muted);margin-top:2px;line-height:1.45;display:block}.tintora-tooltip__content--rich .tintora-tooltip__shortcut{margin-top:8px;display:inline-block}@media (prefers-reduced-motion:no-preference){.tintora-tooltip__content{animation:.12s ease-out tintora-tooltip-in}}@keyframes tintora-tooltip-in{0%{opacity:0}}
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-checkbox{flex-shrink:0;width:22px;height:22px;display:inline-block;position:relative}.tintora-checkbox__input{opacity:0;cursor:pointer;width:44px;height:44px;margin:0;position:absolute;inset:-11px}.tintora-checkbox__box{box-sizing:border-box;border:2px solid var(--tintora-control-border);border-radius:var(--tintora-radius-7);outline-offset:2px;pointer-events:none;background:0 0;justify-content:center;align-items:center;transition:background .15s,border-color .15s;display:flex;position:absolute;inset:0}.tintora-checkbox__check,.tintora-checkbox__dash{stroke:var(--tintora-control-on-fill);opacity:0;position:absolute}.tintora-checkbox__input:enabled:hover+.tintora-checkbox__box{border-color:var(--tintora-control-fill);background:var(--tintora-control-hover-tint)}.tintora-checkbox__input:checked+.tintora-checkbox__box,.tintora-checkbox__input:indeterminate+.tintora-checkbox__box{border-color:var(--tintora-control-fill);background:var(--tintora-control-fill)}.tintora-checkbox__input:checked+.tintora-checkbox__box .tintora-checkbox__check{opacity:1}.tintora-checkbox__input:indeterminate+.tintora-checkbox__box .tintora-checkbox__check{opacity:0}.tintora-checkbox__input:indeterminate+.tintora-checkbox__box .tintora-checkbox__dash{opacity:1}.tintora-checkbox__input:focus-visible+.tintora-checkbox__box{outline:2px solid var(--tintora-focus)}.tintora-checkbox__input:disabled{cursor:not-allowed}.tintora-checkbox__input:disabled+.tintora-checkbox__box{opacity:var(--tintora-opacity-disabled)}@media (prefers-reduced-motion:reduce){.tintora-checkbox__box{transition:none}}.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-modal{box-sizing:border-box;width:min(var(--tintora-modal-width), calc(100vw - 32px));border:1px solid var(--tintora-border-modal);border-radius:var(--tintora-radius-32);max-width:none;max-height:calc(100vh - 32px);font-family:var(--tintora-font-family);color:var(--tintora-text);background:var(--tintora-surface-modal);box-shadow:var(--tintora-shadow-modal);flex-direction:column;gap:18px;padding:28px;overflow:auto}.tintora-modal[open]{display:flex}.tintora-modal::backdrop{background:var(--tintora-scrim)}@media (prefers-reduced-motion:no-preference){.tintora-modal,.tintora-modal::backdrop{opacity:0;transition:opacity .2s ease, scale .2s ease, overlay .2s allow-discrete, display .2s allow-discrete}.tintora-modal{scale:.96}.tintora-modal[open],.tintora-modal[open]::backdrop{opacity:1}.tintora-modal[open]{scale:1}@starting-style{.tintora-modal[open],.tintora-modal[open]::backdrop{opacity:0}.tintora-modal[open]{scale:.96}}}body:has(.tintora-modal:modal){overflow:hidden}.tintora-modal--sm{--tintora-modal-width:400px}.tintora-modal--md{--tintora-modal-width:520px}.tintora-modal--lg{--tintora-modal-width:640px}.tintora-modal--center{text-align:center;align-items:center}.tintora-modal__close{position:absolute;top:18px;right:18px}.tintora-modal__title{font-size:20px;font-weight:var(--tintora-font-weight-bold);line-height:var(--tintora-line-height-tight);margin:0;padding-inline-end:44px}.tintora-modal--center .tintora-modal__title{padding-inline:0}.tintora-modal__description{color:var(--tintora-text-muted);margin:8px 0 0;font-size:13.5px;line-height:1.55}.tintora-modal__icon{border:1px solid var(--tintora-modal-status-border);border-radius:var(--tintora-radius-pill);width:52px;height:52px;color:var(--tintora-modal-status-fg);background:var(--tintora-modal-status-bg);justify-content:center;align-items:center;display:flex}.tintora-modal--center .tintora-modal__icon{width:64px;height:64px}.tintora-modal__icon svg{width:24px;height:24px}.tintora-modal--center .tintora-modal__icon svg{width:30px;height:30px}.tintora-modal__icon--success{--tintora-modal-status-bg:var(--tintora-status-success-bg);--tintora-modal-status-border:var(--tintora-status-success-border);--tintora-modal-status-fg:var(--tintora-status-success-fg)}.tintora-modal__icon--error{--tintora-modal-status-bg:var(--tintora-status-error-bg);--tintora-modal-status-border:var(--tintora-status-error-border);--tintora-modal-status-fg:var(--tintora-status-error-fg)}.tintora-modal__icon--info{--tintora-modal-status-bg:var(--tintora-status-info-bg);--tintora-modal-status-border:var(--tintora-status-info-border);--tintora-modal-status-fg:var(--tintora-status-info-fg)}.tintora-modal__icon--warning{--tintora-modal-status-bg:var(--tintora-status-warning-bg);--tintora-modal-status-border:var(--tintora-status-warning-border);--tintora-modal-status-fg:var(--tintora-status-warning-fg)}.tintora-modal__actions{justify-content:flex-end;gap:10px;padding-top:6px;display:flex}.tintora-modal--center .tintora-modal__actions{flex-direction:column;align-self:stretch}.tintora-popover-root{display:contents}.tintora-popover{box-sizing:border-box;border-radius:var(--tintora-radius-22);background:var(--tintora-surface-popover);border:1px solid var(--tintora-border-popover);box-shadow:var(--tintora-shadow-popover);flex-direction:column;gap:12px;margin:0;padding:18px;display:flex;position:fixed;inset:auto;overflow:visible}.tintora-popover--sm{border-radius:var(--tintora-radius-20);width:fit-content;padding:16px}.tintora-popover--md{width:300px}.tintora-popover:before{content:"";background:var(--tintora-surface-popover);width:12px;height:12px;position:absolute;transform:rotate(45deg)}.tintora-popover--top:before{bottom:-7px;left:calc(var(--tintora-popover-arrow-offset,50%) - 7px);border-right:1px solid var(--tintora-border-popover);border-bottom:1px solid var(--tintora-border-popover)}.tintora-popover--bottom:before{top:-7px;left:calc(var(--tintora-popover-arrow-offset,50%) - 7px);border-top:1px solid var(--tintora-border-popover);border-left:1px solid var(--tintora-border-popover)}.tintora-popover--left:before{right:-7px;top:calc(var(--tintora-popover-arrow-offset,50%) - 7px);border-top:1px solid var(--tintora-border-popover);border-right:1px solid var(--tintora-border-popover)}.tintora-popover--right:before{left:-7px;top:calc(var(--tintora-popover-arrow-offset,50%) - 7px);border-bottom:1px solid var(--tintora-border-popover);border-left:1px solid var(--tintora-border-popover)}.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-radio{flex-shrink:0;width:22px;height:22px;display:inline-block;position:relative}.tintora-radio__input{opacity:0;cursor:pointer;width:44px;height:44px;margin:0;position:absolute;inset:-11px}.tintora-radio__circle{box-sizing:border-box;border:2px solid var(--tintora-control-border);border-radius:var(--tintora-radius-pill);outline-offset:2px;pointer-events:none;background:0 0;justify-content:center;align-items:center;transition:background .15s,border-color .15s;display:flex;position:absolute;inset:0}.tintora-radio__circle:after{content:"";border-radius:var(--tintora-radius-pill);background:var(--tintora-control-fill);opacity:0;width:10px;height:10px}.tintora-radio__input:enabled:hover+.tintora-radio__circle{border-color:var(--tintora-control-fill);background:var(--tintora-control-hover-tint)}.tintora-radio__input:checked+.tintora-radio__circle{border-color:var(--tintora-control-fill);background:0 0}.tintora-radio__input:checked+.tintora-radio__circle:after{opacity:1}.tintora-radio__input:focus-visible+.tintora-radio__circle{outline:2px solid var(--tintora-focus)}.tintora-radio__input:disabled{cursor:not-allowed}.tintora-radio__input:disabled+.tintora-radio__circle{opacity:var(--tintora-opacity-disabled)}@media (prefers-reduced-motion:reduce){.tintora-radio__circle{transition: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-skeleton{border-radius:var(--tintora-radius-pill);background:var(--tintora-shimmer);background-size:200% 100%;flex-shrink:0;width:100%;height:14px;animation:1.4s linear infinite tintora-shimmer;display:block}@keyframes tintora-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.tintora-skeleton{animation:none}}.tintora-switch{flex-shrink:0;width:44px;height:26px;display:inline-block;position:relative}.tintora-switch__input{opacity:0;cursor:pointer;width:100%;height:calc(100% + 18px);margin:0;position:absolute;inset:-9px 0}.tintora-switch__track{--tintora-switch-offset:3px;border-radius:var(--tintora-radius-pill);background:var(--tintora-switch-track);outline-offset:2px;pointer-events:none;transition:background .2s;position:absolute;inset:0}.tintora-switch__track:after{content:"";top:var(--tintora-switch-offset);left:var(--tintora-switch-offset);border-radius:var(--tintora-radius-pill);background:var(--tintora-color-white);width:20px;height:20px;box-shadow:var(--tintora-shadow-knob);transition:transform .2s;position:absolute}.tintora-switch__input:hover+.tintora-switch__track{background:var(--tintora-switch-track-hover)}.tintora-switch__input:checked+.tintora-switch__track{background:var(--tintora-control-fill)}.tintora-switch__input:checked+.tintora-switch__track:after{transform:translate(18px)}.tintora-switch__input:focus-visible+.tintora-switch__track{outline:2px solid var(--tintora-focus)}.tintora-switch__input:disabled{cursor:not-allowed}.tintora-switch__input:disabled+.tintora-switch__track{opacity:var(--tintora-opacity-disabled);background:var(--tintora-switch-track)}.tintora-switch__input:disabled:checked+.tintora-switch__track{background:var(--tintora-control-fill)}@media (prefers-reduced-motion:reduce){.tintora-switch__track,.tintora-switch__track:after{transition:none}}.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-toast{box-sizing:border-box;border-radius:var(--tintora-radius-18);background:var(--tintora-surface-toast);min-height:52px;color:var(--tintora-text-on-toast);box-shadow:var(--tintora-shadow-toast);align-items:center;gap:12px;padding:10px 10px 10px 16px;display:flex}.tintora-toast--timer{min-height:56px;padding:10px 10px 14px 16px;position:relative;overflow:hidden}.tintora-toast__message{min-width:0;font:var(--tintora-font-button);font-weight:var(--tintora-font-weight-semibold);flex:1}.tintora-toast__action{border-radius:var(--tintora-radius-pill);height:32px;font-family:inherit;font:var(--tintora-font-button);font-weight:var(--tintora-font-weight-extrabold);color:var(--tintora-toast-action);cursor:pointer;background:0 0;border:0;padding:0 12px;display:inline-block}.tintora-toast__close{border-radius:var(--tintora-radius-pill);width:32px;height:32px;color:var(--tintora-text-on-toast-muted);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;display:flex}.tintora-toast__progress{background:var(--tintora-toast-action);width:100%;height:4px;animation:progress-bar var(--tintora-toast-animation-duration) forwards;position:absolute;bottom:0;left:0}.tintora-toast--paused .tintora-toast__progress{animation-play-state:paused}@keyframes progress-bar{0%{width:100%}to{width:0}}@media (prefers-reduced-motion:reduce){.tintora-toast__progress{display:none}}.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)}.tintora-tooltip{display:contents}.tintora-tooltip__content{box-sizing:border-box;border-radius:var(--tintora-radius-10);width:max-content;font:var(--tintora-font-body);font-weight:var(--tintora-font-weight-semibold);white-space:nowrap;color:var(--tintora-text-on-tooltip);background:var(--tintora-surface-tooltip);box-shadow:var(--tintora-shadow-tooltip);border:0;align-items:center;gap:10px;margin:0;padding:6px 10px;display:inline-flex;inset:auto;overflow:visible}.tintora-tooltip__content:before{content:"";background:inherit;width:8px;height:8px;position:absolute;transform:rotate(45deg)}.tintora-tooltip__content--top:before{bottom:-4px;left:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__content--bottom:before{top:-4px;left:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__content--left:before{right:-4px;top:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__content--right:before{left:-4px;top:calc(var(--tintora-tooltip-arrow-offset,50%) - 4px)}.tintora-tooltip__shortcut{border-radius:var(--tintora-radius-6);font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-bold);background:var(--tintora-tooltip-kbd-bg);margin-right:-2px;padding:2px 6px}.tintora-tooltip__content--rich{border-radius:var(--tintora-radius-12);width:220px;font-weight:var(--tintora-font-weight-medium);white-space:normal;padding:10px 12px;display:block}.tintora-tooltip__title{font:var(--tintora-font-label);display:block}.tintora-tooltip__text{min-width:0}.tintora-tooltip__content--rich .tintora-tooltip__text{color:var(--tintora-text-on-tooltip-muted);margin-top:2px;line-height:1.45;display:block}.tintora-tooltip__content--rich .tintora-tooltip__shortcut{margin-top:8px;display:inline-block}@media (prefers-reduced-motion:no-preference){.tintora-tooltip__content{animation:.12s ease-out tintora-tooltip-in}}@keyframes tintora-tooltip-in{0%{opacity:0}}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tintora",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {