tintora 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Modal/Modal.d.ts +34 -0
- package/dist/Tooltip/Tooltip.d.ts +40 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +344 -175
- package/dist/tintora.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type DialogHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import './Modal.css';
|
|
3
|
+
type ModalStatus = 'success' | 'error' | 'info' | 'warning';
|
|
4
|
+
export interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialogElement>, 'open' | 'title' | 'onClose' | 'role'> {
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Called on Esc, the close button and (for `dialog`) a scrim click. */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** Shown in a tinted circle above the title. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Tints the icon circle. @default 'info' */
|
|
13
|
+
status?: ModalStatus;
|
|
14
|
+
/** The buttons, laid out right-aligned (stacked when centred). */
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
/** Max width: 400 / 520 / 640. @default 'md' */
|
|
17
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
/** @default 'start' */
|
|
19
|
+
align?: 'start' | 'center';
|
|
20
|
+
/**
|
|
21
|
+
* `alertdialog` is for confirmations: the scrim does not dismiss it.
|
|
22
|
+
* @default 'dialog'
|
|
23
|
+
*/
|
|
24
|
+
role?: 'dialog' | 'alertdialog';
|
|
25
|
+
/** Show the corner close button. @default true */
|
|
26
|
+
closeButton?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A modal over a native `<dialog>`: the browser traps focus, makes the page
|
|
30
|
+
* inert, and returns focus to the trigger on close. Initial focus goes to the
|
|
31
|
+
* first focusable element, or to the one marked `data-autofocus`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function Modal({ open, onClose, title, description, icon, status, actions, size, align, role, closeButton, className, children, ...props }: ModalProps): import("react").JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import './Tooltip.css';
|
|
3
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
/** The text. Required, and what a screen reader announces. */
|
|
6
|
+
content: string;
|
|
7
|
+
/** Rich variant: a bold title above `content`, max 220px wide, wraps. */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Shortcut rendered as a <kbd> chip, e.g. "Ctrl K". */
|
|
10
|
+
shortcut?: string;
|
|
11
|
+
/** Default 'top'. */
|
|
12
|
+
placement?: TooltipPlacement;
|
|
13
|
+
/** Exactly one focusable element: the trigger. It must pass unknown props (like aria-describedby) on to a DOM element. */
|
|
14
|
+
children: ReactElement<{
|
|
15
|
+
'aria-describedby'?: string;
|
|
16
|
+
}>;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
interface Size {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
}
|
|
23
|
+
interface Position {
|
|
24
|
+
top: number;
|
|
25
|
+
left: number;
|
|
26
|
+
/** The side it really opens on: the requested one, or the opposite if flipped. */
|
|
27
|
+
placement: TooltipPlacement;
|
|
28
|
+
/** Distance in px from the tooltip's start edge to the arrow's centre. */
|
|
29
|
+
arrowOffset: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Viewport coordinates for the tooltip's top-left corner, given the trigger's
|
|
33
|
+
* rect, the tooltip's own size, the side it should open on and the viewport.
|
|
34
|
+
* It flips to the opposite side when there is no room, and is kept inside the
|
|
35
|
+
* viewport along the other axis (the arrow then moves to keep pointing at the
|
|
36
|
+
* trigger).
|
|
37
|
+
*/
|
|
38
|
+
export declare function getPosition(anchor: DOMRect, tooltip: Size, requested: TooltipPlacement, viewport?: Size): Position;
|
|
39
|
+
export declare function Tooltip({ title, content, shortcut, children, className, placement, }: TooltipProps): import("react").JSX.Element;
|
|
40
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r)}return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}function i(e){if(!e.length)return``;let t=e.trim().split(/\s+/).map(e=>e.match(/\p{L}\p{M}*/u)?.[0]).filter(e=>!!e);return`${t[0]??``}${t.length>1?t.at(-1)??``:``}`.toLocaleUpperCase()}function a({name:n,src:a,size:o=`medium`,className:s,...c}){let[l,u]=(0,e.useState)(),d=!!a&&a!==l;return(0,t.jsx)(`span`,{role:`img`,"aria-label":n,...c,className:r(`tintora-avatar`,`tintora-avatar--${o}`,s),children:d?(0,t.jsx)(`img`,{src:a,alt:``,onError:()=>u(a)}):i(n)})}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})})}function _({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 v=(0,e.createContext)(null);function y(){let t=(0,e.useContext)(v);if(!t)throw Error(`Radio must be rendered inside a RadioGroup`);return t}function b({value:e,className:n,disabled:i,...a}){let o=y();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 x({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)(v.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 S({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 C=(0,e.createContext)(null),w=()=>{let t=(0,e.useContext)(C);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function T({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=w();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 E=4;function D({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,w]=(0,e.useState)(!1),[D,O]=(0,e.useState)(-1),[k,A]=(0,e.useState)({}),j=o!==void 0,M=j?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=()=>{O(N>=0&&P(N)?N:F()),w(!0)},B=()=>w(!1),V=e=>{let t=R(e);t<0||!P(t)||(B(),e!==M&&(j||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:()=>D<0?F():I(D,1),ArrowUp:()=>D<0?F():I(D,-1),Home:F,End:L};t in n?(e.preventDefault(),O(n[t]())):t===`Enter`||t===` `?(e.preventDefault(),D>=0?V(i[D].value):B()):t===`Escape`&&(e.preventDefault(),B())},U=e=>{p?.(e),e.key===` `&&e.preventDefault()},W=()=>{let e=y.current,t=v.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+E+r<=window.innerHeight,a=n.top-E-r>=0;A({top:i||!a?n.bottom+E:n.top-E-r,left:n.left,minWidth:n.width})},G=e=>{d?.(e),!e.defaultPrevented&&(S?B():z())};(0,e.useLayoutEffect)(()=>{S&&(y.current?.showPopover(),W())},[S]),(0,e.useEffect)(()=>{if(!S)return;let e=e=>{_.current?.contains(e.target)||B()},t=e=>{y.current?.contains(e.target)||W()};return document.addEventListener(`pointerdown`,e),window.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,W),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,W)}},[S]),(0,e.useEffect)(()=>{S&&D>=0&&y.current?.children.item(D)?.scrollIntoView?.({block:`nearest`})},[S,D]);let K=e=>`${g}-option-${R(e)}`,q=S?i[D]?.value??null:null,J=i[N]?.label;return(0,t.jsx)(C.Provider,{value:{value:M,activeValue:q,select:V,optionId:K,activate:e=>O(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:k,onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(T,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:M??``,disabled:a})]})})}function O({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 k({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 A({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 j({label:n,hint:i,error:a,id:o,className:s,disabled:c,"aria-describedby":l,"aria-invalid":u,...d}){let f=(0,e.useId)(),p=o??f,m=`${p}-message`,h=a??i;return(0,t.jsxs)(`div`,{className:r(`tintora-textfield`,c&&`tintora-textfield--disabled`,s),children:[(0,t.jsx)(`label`,{htmlFor:p,className:`tintora-textfield__label`,children:n}),(0,t.jsx)(`input`,{...d,id:p,disabled:c,className:`tintora-textfield__input`,"aria-invalid":a?!0:u,"aria-describedby":r(h&&m,l)||void 0}),h&&(0,t.jsx)(`span`,{id:m,className:r(`tintora-textfield__hint`,a&&`tintora-textfield__hint--error`),children:h})]})}var M=(0,e.createContext)(null);function N(){let t=(0,e.useContext)(M);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function P({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)(M.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 F({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=N(),l=t=>{o?.(t),t.defaultPrevented||c.select(e)};return(0,t.jsx)(`button`,{...s,type:`button`,className:r(`tintora-toggle__item`,i),"aria-pressed":c.value===e,disabled:a||c.disabled,onClick:l,children:n})}exports.Avatar=a,exports.Button=c,exports.Card=l,exports.Checkbox=f,exports.Chip=p,exports.Dot=m,exports.IconButton=g,exports.ProgressBar=_,exports.Radio=b,exports.RadioGroup=x,exports.SearchInput=S,exports.Select=D,exports.SelectableCard=u,exports.Skeleton=O,exports.Spinner=s,exports.Switch=k,exports.Tag=A,exports.TextField=j,exports.Toggle=P,exports.ToggleItem=F;
|
|
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`})]})}var T=(0,e.createContext)(null),E=()=>{let t=(0,e.useContext)(T);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function D({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=E();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 O=4;function k({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,E]=(0,e.useState)(-1),[k,A]=(0,e.useState)({}),j=o!==void 0,M=j?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=()=>{E(N>=0&&P(N)?N:F()),C(!0)},B=()=>C(!1),V=e=>{let t=R(e);t<0||!P(t)||(B(),e!==M&&(j||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(),E(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=()=>{let e=y.current,t=v.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+O+r<=window.innerHeight,a=n.top-O-r>=0;A({top:i||!a?n.bottom+O:n.top-O-r,left:n.left,minWidth:n.width})},G=e=>{d?.(e),!e.defaultPrevented&&(S?B():z())};(0,e.useLayoutEffect)(()=>{S&&(y.current?.showPopover(),W())},[S]),(0,e.useEffect)(()=>{if(!S)return;let e=e=>{_.current?.contains(e.target)||B()},t=e=>{y.current?.contains(e.target)||W()};return document.addEventListener(`pointerdown`,e),window.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,W),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,W)}},[S]),(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)(T.Provider,{value:{value:M,activeValue:q,select:V,optionId:K,activate:e=>E(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:k,onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(D,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:M??``,disabled:a})]})})}function A({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 j({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 M({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 N({label:n,hint:i,error:a,id:o,className:s,disabled:c,"aria-describedby":l,"aria-invalid":u,...d}){let f=(0,e.useId)(),p=o??f,m=`${p}-message`,h=a??i;return(0,t.jsxs)(`div`,{className:r(`tintora-textfield`,c&&`tintora-textfield--disabled`,s),children:[(0,t.jsx)(`label`,{htmlFor:p,className:`tintora-textfield__label`,children:n}),(0,t.jsx)(`input`,{...d,id:p,disabled:c,className:`tintora-textfield__input`,"aria-invalid":a?!0:u,"aria-describedby":r(h&&m,l)||void 0}),h&&(0,t.jsx)(`span`,{id:m,className:r(`tintora-textfield__hint`,a&&`tintora-textfield__hint--error`),children:h})]})}var P=(0,e.createContext)(null);function F(){let t=(0,e.useContext)(P);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function I({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)(P.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 L({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=F(),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 R=10,z=100,B=8,V=12,H={top:`bottom`,bottom:`top`,left:`right`,right:`left`},U=(e,t,n)=>Math.min(Math.max(e,t),Math.max(t,n));function W(e,t,n,r){let i=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}},a=(n===`top`||n===`bottom`?t.height:t.width)+R+B,o=i(n);return o>=a||i(H[n])<=o?n:H[n]}function G(e,t,n,r={width:window.innerWidth,height:window.innerHeight}){let i=W(e,t,n,r),a=i===`top`||i===`bottom`,o,s;switch(i){case`top`:o=e.y-t.height-R,s=e.x+e.width/2-t.width/2;break;case`bottom`:o=e.y+e.height+R,s=e.x+e.width/2-t.width/2;break;case`left`:o=e.y+e.height/2-t.height/2,s=e.x-t.width-R;break;case`right`:o=e.y+e.height/2-t.height/2,s=e.x+e.width+R}a?s=U(s,B,r.width-t.width-B):o=U(o,B,r.height-t.height-B);let c=a?e.x+e.width/2-s:e.y+e.height/2-o,l=a?t.width:t.height;return{top:o,left:s,placement:i,arrowOffset:U(c,V,l-V)}}function K({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,p]=(0,e.useState)(null),m=(0,e.useRef)(null),h=(0,e.useRef)(null),g=(0,e.useRef)(void 0),_=()=>{window.clearTimeout(g.current),d(!0)},v=()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>d(!1),z)};(0,e.useLayoutEffect)(()=>{let e=h.current,t=m.current?.firstElementChild;!u||!e||!t?p(null):(e.showPopover(),p(G(t.getBoundingClientRect(),{width:e.offsetWidth,height:e.offsetHeight},c)))},[u,c,n,i,a]),(0,e.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u]),(0,e.useEffect)(()=>()=>window.clearTimeout(g.current),[]);let y=f?{top:f.top,left:f.left,"--tintora-tooltip-arrow-offset":`${f.arrowOffset}px`}:{visibility:`hidden`};return(0,t.jsxs)(`span`,{ref:m,className:`tintora-tooltip`,onMouseEnter:_,onMouseLeave:v,onFocus:_,onBlur:v,children:[(0,e.cloneElement)(o,{"aria-describedby":r(o.props[`aria-describedby`],u&&l)||void 0}),u&&(0,t.jsxs)(`div`,{id:l,ref:h,role:`tooltip`,popover:`manual`,style:y,className:r(`tintora-tooltip__content`,`tintora-tooltip__content--${f?.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=k,exports.SelectableCard=u,exports.Skeleton=A,exports.Spinner=s,exports.Switch=j,exports.Tag=M,exports.TextField=N,exports.Toggle=I,exports.ToggleItem=L,exports.Tooltip=K;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Checkbox, type CheckboxProps } from './Checkbox/Checkbox';
|
|
|
6
6
|
export { Chip } from './Chip/Chip';
|
|
7
7
|
export { Dot } from './Dot/Dot';
|
|
8
8
|
export { IconButton } from './IconButton/IconButton';
|
|
9
|
+
export { Modal, type ModalProps } from './Modal/Modal';
|
|
9
10
|
export { ProgressBar, type ProgressBarProps } from './ProgressBar/ProgressBar';
|
|
10
11
|
export { Radio, type RadioProps } from './Radio/Radio';
|
|
11
12
|
export { RadioGroup, type RadioGroupProps } from './Radio/RadioGroup';
|
|
@@ -18,3 +19,4 @@ export { Tag } from './Tag/Tag';
|
|
|
18
19
|
export { TextField } from './TextField/TextField';
|
|
19
20
|
export { Toggle, type ToggleProps } from './Toggle/Toggle';
|
|
20
21
|
export { ToggleItem, type ToggleItemProps } from './Toggle/ToggleItem';
|
|
22
|
+
export { Tooltip } from './Tooltip/Tooltip';
|
package/dist/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as
|
|
1
|
+
import { cloneElement as e, createContext as t, useContext as n, useEffect as r, useId as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
|
|
2
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
3
3
|
//#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
4
|
-
function
|
|
4
|
+
function u(e) {
|
|
5
5
|
var t, n, r = "";
|
|
6
6
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
7
7
|
else if (typeof e == "object") {
|
|
8
8
|
if (Array.isArray(e)) {
|
|
9
9
|
var i = e.length;
|
|
10
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
10
|
+
for (t = 0; t < i; t++) e[t] && (n = u(e[t])) && (r && (r += " "), r += n);
|
|
11
11
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
12
12
|
}
|
|
13
13
|
return r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
15
|
+
function d() {
|
|
16
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = u(e)) && (r && (r += " "), r += t);
|
|
17
17
|
return r;
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/Avatar/utils.ts
|
|
21
|
-
function
|
|
21
|
+
function f(e) {
|
|
22
22
|
if (!e.length) return "";
|
|
23
23
|
let t = e.trim().split(/\s+/).map((e) => e.match(/\p{L}\p{M}*/u)?.[0]).filter((e) => !!e);
|
|
24
24
|
return `${t[0] ?? ""}${t.length > 1 ? t.at(-1) ?? "" : ""}`.toLocaleUpperCase();
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/Avatar/Avatar.tsx
|
|
28
|
-
function
|
|
29
|
-
let [a,
|
|
30
|
-
return /* @__PURE__ */
|
|
28
|
+
function p({ name: e, src: t, size: n = "medium", className: r, ...i }) {
|
|
29
|
+
let [a, o] = s(), l = !!t && t !== a;
|
|
30
|
+
return /* @__PURE__ */ c("span", {
|
|
31
31
|
role: "img",
|
|
32
32
|
"aria-label": e,
|
|
33
33
|
...i,
|
|
34
|
-
className:
|
|
35
|
-
children: l ? /* @__PURE__ */
|
|
34
|
+
className: d("tintora-avatar", `tintora-avatar--${n}`, r),
|
|
35
|
+
children: l ? /* @__PURE__ */ c("img", {
|
|
36
36
|
src: t,
|
|
37
37
|
alt: "",
|
|
38
|
-
onError: () =>
|
|
39
|
-
}) :
|
|
38
|
+
onError: () => o(t)
|
|
39
|
+
}) : f(e)
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/Spinner/Spinner.tsx
|
|
44
|
-
var
|
|
44
|
+
var m = {
|
|
45
45
|
small: {
|
|
46
46
|
width: 16,
|
|
47
47
|
height: 16,
|
|
@@ -58,9 +58,9 @@ var p = {
|
|
|
58
58
|
strokeWidth: 2.4
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
function
|
|
62
|
-
let { width: n, height: r, strokeWidth: i } =
|
|
63
|
-
return /* @__PURE__ */
|
|
61
|
+
function h({ size: e = "medium", color: t = "accent" }) {
|
|
62
|
+
let { width: n, height: r, strokeWidth: i } = m[e];
|
|
63
|
+
return /* @__PURE__ */ l("svg", {
|
|
64
64
|
className: "tintora-spinner",
|
|
65
65
|
width: n,
|
|
66
66
|
height: r,
|
|
@@ -68,14 +68,14 @@ function m({ size: e = "medium", color: t = "accent" }) {
|
|
|
68
68
|
fill: "none",
|
|
69
69
|
role: "img",
|
|
70
70
|
"aria-label": "Loading",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ c("circle", {
|
|
72
72
|
cx: "12",
|
|
73
73
|
cy: "12",
|
|
74
74
|
r: "9",
|
|
75
75
|
stroke: "currentColor",
|
|
76
76
|
strokeOpacity: t === "accent" ? .25 : .35,
|
|
77
77
|
strokeWidth: i
|
|
78
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ c("path", {
|
|
79
79
|
d: "M21 12a9 9 0 0 0-9-9",
|
|
80
80
|
stroke: t === "accent" ? "var(--tintora-control-fill)" : "currentColor",
|
|
81
81
|
strokeWidth: i,
|
|
@@ -85,33 +85,33 @@ function m({ size: e = "medium", color: t = "accent" }) {
|
|
|
85
85
|
}
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/Button/Button.tsx
|
|
88
|
-
function
|
|
89
|
-
return /* @__PURE__ */
|
|
88
|
+
function g({ children: e, className: t, variant: n, size: r = "medium", leadingIcon: i, trailingIcon: a, type: o = "button", loading: s = !1, disabled: u, ...f }) {
|
|
89
|
+
return /* @__PURE__ */ l("button", {
|
|
90
90
|
type: o,
|
|
91
|
-
className:
|
|
92
|
-
"tintora-button--leading-icon": !!i ||
|
|
93
|
-
"tintora-button--loading":
|
|
91
|
+
className: d("tintora-button", `tintora-button--${n}`, `tintora-button--${r}`, {
|
|
92
|
+
"tintora-button--leading-icon": !!i || s,
|
|
93
|
+
"tintora-button--loading": s,
|
|
94
94
|
"tintora-button--trailing-icon": !!a
|
|
95
95
|
}, t),
|
|
96
|
-
disabled:
|
|
97
|
-
"aria-busy":
|
|
96
|
+
disabled: u || s,
|
|
97
|
+
"aria-busy": s || void 0,
|
|
98
98
|
...f,
|
|
99
99
|
children: [
|
|
100
|
-
|
|
100
|
+
s && /* @__PURE__ */ c("span", {
|
|
101
101
|
className: "tintora-button__icon",
|
|
102
102
|
"aria-hidden": "true",
|
|
103
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ c(h, {
|
|
104
104
|
size: "small",
|
|
105
105
|
color: "current"
|
|
106
106
|
})
|
|
107
107
|
}),
|
|
108
|
-
!
|
|
108
|
+
!s && i && /* @__PURE__ */ c("span", {
|
|
109
109
|
className: "tintora-button__icon",
|
|
110
110
|
"aria-hidden": "true",
|
|
111
111
|
children: i
|
|
112
112
|
}),
|
|
113
113
|
e,
|
|
114
|
-
a && /* @__PURE__ */
|
|
114
|
+
a && /* @__PURE__ */ c("span", {
|
|
115
115
|
className: "tintora-button__icon",
|
|
116
116
|
"aria-hidden": "true",
|
|
117
117
|
children: a
|
|
@@ -121,24 +121,24 @@ function h({ children: e, className: t, variant: n, size: r = "medium", leadingI
|
|
|
121
121
|
}
|
|
122
122
|
//#endregion
|
|
123
123
|
//#region src/Card/Card.tsx
|
|
124
|
-
function
|
|
125
|
-
return /* @__PURE__ */
|
|
124
|
+
function _({ as: e = "article", variant: t = "surface", className: n, ...r }) {
|
|
125
|
+
return /* @__PURE__ */ c(e, {
|
|
126
126
|
...r,
|
|
127
|
-
className:
|
|
127
|
+
className: d("tintora-card", `tintora-card--${t}`, n)
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
return /* @__PURE__ */
|
|
130
|
+
function v({ selected: e = !1, className: t, ...n }) {
|
|
131
|
+
return /* @__PURE__ */ c("button", {
|
|
132
132
|
...n,
|
|
133
133
|
type: "button",
|
|
134
134
|
"aria-pressed": e,
|
|
135
|
-
className:
|
|
135
|
+
className: d("tintora-card", "tintora-card--surface", "tintora-card--selectable", e && "tintora-card--selected", t)
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region src/useCheckedState.ts
|
|
140
|
-
function
|
|
141
|
-
let [r, i] =
|
|
140
|
+
function y({ checked: e, defaultChecked: t = !1, onCheckedChange: n }) {
|
|
141
|
+
let [r, i] = s(t), a = e !== void 0;
|
|
142
142
|
return {
|
|
143
143
|
checked: a ? e : r,
|
|
144
144
|
onChange: (e) => {
|
|
@@ -148,27 +148,27 @@ function v({ checked: e, defaultChecked: t = !1, onCheckedChange: n }) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/Checkbox/Checkbox.tsx
|
|
151
|
-
function
|
|
152
|
-
let
|
|
151
|
+
function b({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r = !1, className: i, ...s }) {
|
|
152
|
+
let u = o(null), f = y({
|
|
153
153
|
checked: e,
|
|
154
154
|
defaultChecked: t,
|
|
155
155
|
onCheckedChange: n
|
|
156
156
|
});
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
}), /* @__PURE__ */
|
|
160
|
-
className:
|
|
161
|
-
children: [/* @__PURE__ */
|
|
162
|
-
...
|
|
163
|
-
ref:
|
|
157
|
+
return a(() => {
|
|
158
|
+
u.current && (u.current.indeterminate = r);
|
|
159
|
+
}), /* @__PURE__ */ l("span", {
|
|
160
|
+
className: d("tintora-checkbox", i),
|
|
161
|
+
children: [/* @__PURE__ */ c("input", {
|
|
162
|
+
...s,
|
|
163
|
+
ref: u,
|
|
164
164
|
type: "checkbox",
|
|
165
165
|
className: "tintora-checkbox__input",
|
|
166
166
|
checked: f.checked,
|
|
167
167
|
onChange: f.onChange
|
|
168
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ l("span", {
|
|
169
169
|
className: "tintora-checkbox__box",
|
|
170
170
|
"aria-hidden": "true",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ c("svg", {
|
|
172
172
|
className: "tintora-checkbox__check",
|
|
173
173
|
width: "14",
|
|
174
174
|
height: "14",
|
|
@@ -177,8 +177,8 @@ function y({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r
|
|
|
177
177
|
strokeWidth: "3.2",
|
|
178
178
|
strokeLinecap: "round",
|
|
179
179
|
strokeLinejoin: "round",
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
}), /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ c("path", { d: "M5 12.5l4.5 4.5L19 7.5" })
|
|
181
|
+
}), /* @__PURE__ */ c("svg", {
|
|
182
182
|
className: "tintora-checkbox__dash",
|
|
183
183
|
width: "14",
|
|
184
184
|
height: "14",
|
|
@@ -186,28 +186,28 @@ function y({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r
|
|
|
186
186
|
fill: "none",
|
|
187
187
|
strokeWidth: "3.2",
|
|
188
188
|
strokeLinecap: "round",
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ c("path", { d: "M6 12h12" })
|
|
190
190
|
})]
|
|
191
191
|
})]
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
//#endregion
|
|
195
195
|
//#region src/Chip/Chip.tsx
|
|
196
|
-
function
|
|
197
|
-
return /* @__PURE__ */
|
|
196
|
+
function x({ children: e, selected: t, className: n, "aria-pressed": r, ...i }) {
|
|
197
|
+
return /* @__PURE__ */ c("button", {
|
|
198
198
|
...i,
|
|
199
199
|
type: "button",
|
|
200
|
-
className:
|
|
200
|
+
className: d("tintora-chip", n),
|
|
201
201
|
"aria-pressed": t ?? r,
|
|
202
202
|
children: e
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
//#endregion
|
|
206
206
|
//#region src/Dot/Dot.tsx
|
|
207
|
-
function
|
|
208
|
-
return /* @__PURE__ */
|
|
207
|
+
function S({ variant: e = "unread", label: t, className: n, ...r }) {
|
|
208
|
+
return /* @__PURE__ */ c("span", {
|
|
209
209
|
...r,
|
|
210
|
-
className:
|
|
210
|
+
className: d("tintora-dot", `tintora-dot--${e}`, n),
|
|
211
211
|
role: t ? "img" : void 0,
|
|
212
212
|
"aria-label": t,
|
|
213
213
|
"aria-hidden": !t || void 0
|
|
@@ -215,20 +215,20 @@ function x({ variant: e = "unread", label: t, className: n, ...r }) {
|
|
|
215
215
|
}
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/IconButton/IconButton.tsx
|
|
218
|
-
var
|
|
218
|
+
var C = {
|
|
219
219
|
round: "secondary",
|
|
220
220
|
field: "secondary",
|
|
221
221
|
nav: "ghost"
|
|
222
222
|
};
|
|
223
|
-
function
|
|
223
|
+
function w({ icon: e, variant: t = "round", size: n, selected: r, className: i, ...a }) {
|
|
224
224
|
let o = t === "round" ? n ?? "large" : void 0;
|
|
225
|
-
return /* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ c(g, {
|
|
226
226
|
...a,
|
|
227
|
-
variant:
|
|
227
|
+
variant: C[t],
|
|
228
228
|
"aria-current": r ? "page" : void 0,
|
|
229
|
-
className:
|
|
229
|
+
className: d("tintora-icon-button", `tintora-icon-button--${t}`, o && `tintora-icon-button--${o}`, i),
|
|
230
230
|
...o && { size: o },
|
|
231
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ c("span", {
|
|
232
232
|
className: "tintora-icon-button__icon",
|
|
233
233
|
"aria-hidden": "true",
|
|
234
234
|
children: e
|
|
@@ -236,54 +236,117 @@ function C({ icon: e, variant: t = "round", size: n, selected: r, className: i,
|
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
238
|
//#endregion
|
|
239
|
+
//#region src/Modal/Modal.tsx
|
|
240
|
+
var T = () => /* @__PURE__ */ c("svg", {
|
|
241
|
+
width: "16",
|
|
242
|
+
height: "16",
|
|
243
|
+
viewBox: "0 0 24 24",
|
|
244
|
+
fill: "none",
|
|
245
|
+
stroke: "currentColor",
|
|
246
|
+
strokeWidth: "2",
|
|
247
|
+
strokeLinecap: "round",
|
|
248
|
+
children: /* @__PURE__ */ c("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
249
|
+
});
|
|
250
|
+
function E({ open: e, onClose: t, title: n, description: a, icon: s, status: u = "info", actions: f, size: p = "md", align: m = "start", role: h = "dialog", closeButton: g = !0, className: _, children: v, ...y }) {
|
|
251
|
+
let b = o(null), x = i(), S = i();
|
|
252
|
+
return r(() => {
|
|
253
|
+
let t = b.current;
|
|
254
|
+
t && (e && !t.open ? (t.showModal(), t.querySelector("[data-autofocus]")?.focus()) : !e && t.open && t.close());
|
|
255
|
+
}, [e]), /* @__PURE__ */ l("dialog", {
|
|
256
|
+
...y,
|
|
257
|
+
ref: b,
|
|
258
|
+
role: h,
|
|
259
|
+
"aria-labelledby": x,
|
|
260
|
+
"aria-describedby": a ? S : void 0,
|
|
261
|
+
className: d("tintora-modal", `tintora-modal--${p}`, m === "center" && "tintora-modal--center", _),
|
|
262
|
+
onCancel: (e) => {
|
|
263
|
+
e.preventDefault(), t();
|
|
264
|
+
},
|
|
265
|
+
onClick: (e) => {
|
|
266
|
+
h === "dialog" && e.target === e.currentTarget && t();
|
|
267
|
+
},
|
|
268
|
+
children: [
|
|
269
|
+
s && /* @__PURE__ */ c("span", {
|
|
270
|
+
className: d("tintora-modal__icon", `tintora-modal__icon--${u}`),
|
|
271
|
+
"aria-hidden": "true",
|
|
272
|
+
children: s
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ l("div", {
|
|
275
|
+
className: "tintora-modal__text",
|
|
276
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
277
|
+
id: x,
|
|
278
|
+
className: "tintora-modal__title",
|
|
279
|
+
children: n
|
|
280
|
+
}), a && /* @__PURE__ */ c("p", {
|
|
281
|
+
id: S,
|
|
282
|
+
className: "tintora-modal__description",
|
|
283
|
+
children: a
|
|
284
|
+
})]
|
|
285
|
+
}),
|
|
286
|
+
g && /* @__PURE__ */ c(w, {
|
|
287
|
+
className: "tintora-modal__close",
|
|
288
|
+
size: "medium",
|
|
289
|
+
"aria-label": "Close",
|
|
290
|
+
icon: /* @__PURE__ */ c(T, {}),
|
|
291
|
+
onClick: t
|
|
292
|
+
}),
|
|
293
|
+
v,
|
|
294
|
+
f && /* @__PURE__ */ c("div", {
|
|
295
|
+
className: "tintora-modal__actions",
|
|
296
|
+
children: f
|
|
297
|
+
})
|
|
298
|
+
]
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
239
302
|
//#region src/ProgressBar/ProgressBar.tsx
|
|
240
|
-
function
|
|
241
|
-
let
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
className:
|
|
244
|
-
children: [e && /* @__PURE__ */
|
|
303
|
+
function D({ title: e, progress: t, indeterminate: n, valueLabel: r, className: a, "aria-label": o }) {
|
|
304
|
+
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
|
+
return /* @__PURE__ */ l("div", {
|
|
306
|
+
className: d("tintora-progress-bar", a),
|
|
307
|
+
children: [e && /* @__PURE__ */ l("div", {
|
|
245
308
|
className: "tintora-progress-bar__header",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
247
|
-
id:
|
|
309
|
+
children: [/* @__PURE__ */ c("span", {
|
|
310
|
+
id: s,
|
|
248
311
|
children: e
|
|
249
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ c("span", {
|
|
250
313
|
className: "tintora-progress-bar__value",
|
|
251
314
|
children: p
|
|
252
315
|
})]
|
|
253
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ c("div", {
|
|
254
317
|
role: "progressbar",
|
|
255
318
|
"aria-label": o,
|
|
256
|
-
"aria-labelledby": e ?
|
|
319
|
+
"aria-labelledby": e ? s : void 0,
|
|
257
320
|
"aria-valuemin": n ? void 0 : 0,
|
|
258
321
|
"aria-valuemax": n ? void 0 : 100,
|
|
259
|
-
"aria-valuenow":
|
|
260
|
-
"aria-valuetext":
|
|
322
|
+
"aria-valuenow": u,
|
|
323
|
+
"aria-valuetext": r,
|
|
261
324
|
className: "tintora-progress-bar__track",
|
|
262
|
-
children: /* @__PURE__ */
|
|
263
|
-
className:
|
|
325
|
+
children: /* @__PURE__ */ c("div", {
|
|
326
|
+
className: d("tintora-progress-bar__fill", {
|
|
264
327
|
"tintora-progress-bar__fill--indeterminate": n,
|
|
265
328
|
"tintora-progress-bar__fill--complete": f
|
|
266
329
|
}),
|
|
267
|
-
style:
|
|
330
|
+
style: u === void 0 ? void 0 : { width: `${u}%` }
|
|
268
331
|
})
|
|
269
332
|
})]
|
|
270
333
|
});
|
|
271
334
|
}
|
|
272
335
|
//#endregion
|
|
273
336
|
//#region src/Radio/RadioContext.ts
|
|
274
|
-
var
|
|
275
|
-
function
|
|
276
|
-
let e =
|
|
337
|
+
var O = t(null);
|
|
338
|
+
function k() {
|
|
339
|
+
let e = n(O);
|
|
277
340
|
if (!e) throw Error("Radio must be rendered inside a RadioGroup");
|
|
278
341
|
return e;
|
|
279
342
|
}
|
|
280
343
|
//#endregion
|
|
281
344
|
//#region src/Radio/Radio.tsx
|
|
282
|
-
function
|
|
283
|
-
let i =
|
|
284
|
-
return /* @__PURE__ */
|
|
285
|
-
className:
|
|
286
|
-
children: [/* @__PURE__ */
|
|
345
|
+
function A({ value: e, className: t, disabled: n, ...r }) {
|
|
346
|
+
let i = k();
|
|
347
|
+
return /* @__PURE__ */ l("span", {
|
|
348
|
+
className: d("tintora-radio", t),
|
|
349
|
+
children: [/* @__PURE__ */ c("input", {
|
|
287
350
|
...r,
|
|
288
351
|
type: "radio",
|
|
289
352
|
className: "tintora-radio__input",
|
|
@@ -292,7 +355,7 @@ function D({ value: e, className: t, disabled: n, ...r }) {
|
|
|
292
355
|
checked: i.value === e,
|
|
293
356
|
disabled: n || i.disabled,
|
|
294
357
|
onChange: () => i.select(e)
|
|
295
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ c("span", {
|
|
296
359
|
className: "tintora-radio__circle",
|
|
297
360
|
"aria-hidden": "true"
|
|
298
361
|
})]
|
|
@@ -300,30 +363,30 @@ function D({ value: e, className: t, disabled: n, ...r }) {
|
|
|
300
363
|
}
|
|
301
364
|
//#endregion
|
|
302
365
|
//#region src/Radio/RadioGroup.tsx
|
|
303
|
-
function
|
|
304
|
-
let
|
|
305
|
-
return /* @__PURE__ */
|
|
366
|
+
function j({ value: e, defaultValue: t, onValueChange: n, disabled: r = !1, name: a, className: o, ...l }) {
|
|
367
|
+
let u = i(), [f, p] = s(t ?? null), m = e !== void 0, h = m ? e : f;
|
|
368
|
+
return /* @__PURE__ */ c(O.Provider, {
|
|
306
369
|
value: {
|
|
307
|
-
name: a ??
|
|
370
|
+
name: a ?? u,
|
|
308
371
|
value: h,
|
|
309
372
|
select: (e) => {
|
|
310
373
|
e !== h && (m || p(e), n?.(e));
|
|
311
374
|
},
|
|
312
|
-
disabled:
|
|
375
|
+
disabled: r
|
|
313
376
|
},
|
|
314
|
-
children: /* @__PURE__ */
|
|
377
|
+
children: /* @__PURE__ */ c("div", {
|
|
315
378
|
...l,
|
|
316
379
|
role: "radiogroup",
|
|
317
|
-
className:
|
|
380
|
+
className: d("tintora-radio-group", o)
|
|
318
381
|
})
|
|
319
382
|
});
|
|
320
383
|
}
|
|
321
384
|
//#endregion
|
|
322
385
|
//#region src/SearchInput/SearchInput.tsx
|
|
323
|
-
function
|
|
324
|
-
return /* @__PURE__ */
|
|
325
|
-
className:
|
|
326
|
-
children: [/* @__PURE__ */
|
|
386
|
+
function M({ className: e, disabled: t, ...n }) {
|
|
387
|
+
return /* @__PURE__ */ l("label", {
|
|
388
|
+
className: d("tintora-search-input", t && "tintora-search-input--disabled", e),
|
|
389
|
+
children: [/* @__PURE__ */ l("svg", {
|
|
327
390
|
className: "tintora-search-input__icon",
|
|
328
391
|
viewBox: "0 0 24 24",
|
|
329
392
|
fill: "none",
|
|
@@ -331,12 +394,12 @@ function k({ className: e, disabled: t, ...n }) {
|
|
|
331
394
|
strokeWidth: "2",
|
|
332
395
|
strokeLinecap: "round",
|
|
333
396
|
"aria-hidden": "true",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ c("circle", {
|
|
335
398
|
cx: "11",
|
|
336
399
|
cy: "11",
|
|
337
400
|
r: "7"
|
|
338
|
-
}), /* @__PURE__ */
|
|
339
|
-
}), /* @__PURE__ */
|
|
401
|
+
}), /* @__PURE__ */ c("path", { d: "M20 20l-3.5-3.5" })]
|
|
402
|
+
}), /* @__PURE__ */ c("input", {
|
|
340
403
|
...n,
|
|
341
404
|
type: "search",
|
|
342
405
|
disabled: t,
|
|
@@ -346,21 +409,21 @@ function k({ className: e, disabled: t, ...n }) {
|
|
|
346
409
|
}
|
|
347
410
|
//#endregion
|
|
348
411
|
//#region src/Select/SelectContext.ts
|
|
349
|
-
var
|
|
350
|
-
let e =
|
|
412
|
+
var N = t(null), P = () => {
|
|
413
|
+
let e = n(N);
|
|
351
414
|
if (!e) throw Error("SelectOption must be rendered inside a Select");
|
|
352
415
|
return e;
|
|
353
416
|
};
|
|
354
417
|
//#endregion
|
|
355
418
|
//#region src/Select/SelectOption.tsx
|
|
356
|
-
function
|
|
357
|
-
let { select: r, activate: i, optionId: a, value: o, activeValue:
|
|
358
|
-
return /* @__PURE__ */
|
|
419
|
+
function F({ label: e, value: t, disabled: n }) {
|
|
420
|
+
let { select: r, activate: i, optionId: a, value: o, activeValue: s } = P();
|
|
421
|
+
return /* @__PURE__ */ c("div", {
|
|
359
422
|
id: a(t),
|
|
360
423
|
role: "option",
|
|
361
424
|
"aria-selected": o === t,
|
|
362
425
|
"aria-disabled": n || void 0,
|
|
363
|
-
className:
|
|
426
|
+
className: d("tintora-select__option", s === t && "tintora-select__option--active"),
|
|
364
427
|
onClick: () => r(t),
|
|
365
428
|
onMouseMove: () => !n && i(t),
|
|
366
429
|
children: e
|
|
@@ -368,19 +431,19 @@ function M({ label: e, value: t, disabled: n }) {
|
|
|
368
431
|
}
|
|
369
432
|
//#endregion
|
|
370
433
|
//#region src/Select/Select.tsx
|
|
371
|
-
var
|
|
372
|
-
function
|
|
373
|
-
let x =
|
|
434
|
+
var I = 4;
|
|
435
|
+
function L({ defaultValue: e, options: t, disabled: n, value: u, placeholder: f, onValueChange: p, name: m, className: h, onClick: g, onKeyDown: _, onKeyUp: v, "aria-label": y, ...b }) {
|
|
436
|
+
let x = i(), S = o(null), C = o(null), w = o(null), [T, E] = s(e ?? null), [D, O] = s(!1), [k, A] = s(-1), [j, M] = s({}), P = u !== void 0, L = P ? u : T, R = t.findIndex((e) => e.value === L), z = (e) => t[e]?.disabled !== !0, B = () => t.findIndex((e, t) => z(t)), V = (e, n) => {
|
|
374
437
|
for (let r = e + n; r >= 0 && r < t.length; r += n) if (z(r)) return r;
|
|
375
438
|
return e;
|
|
376
439
|
}, H = () => {
|
|
377
440
|
let e = V(t.length, -1);
|
|
378
441
|
return e === t.length ? -1 : e;
|
|
379
442
|
}, U = (e) => t.findIndex((t) => t.value === e), W = () => {
|
|
380
|
-
|
|
443
|
+
A(R >= 0 && z(R) ? R : B()), O(!0);
|
|
381
444
|
}, G = () => O(!1), K = (e) => {
|
|
382
445
|
let t = U(e);
|
|
383
|
-
t < 0 || !z(t) || (G(), e !== L && (
|
|
446
|
+
t < 0 || !z(t) || (G(), e !== L && (P || E(e), p?.(e)));
|
|
384
447
|
}, q = (e) => {
|
|
385
448
|
if (_?.(e), e.defaultPrevented) return;
|
|
386
449
|
let { key: n } = e;
|
|
@@ -400,24 +463,24 @@ function P({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
400
463
|
Home: B,
|
|
401
464
|
End: H
|
|
402
465
|
};
|
|
403
|
-
n in r ? (e.preventDefault(),
|
|
466
|
+
n in r ? (e.preventDefault(), A(r[n]())) : n === "Enter" || n === " " ? (e.preventDefault(), k >= 0 ? K(t[k].value) : G()) : n === "Escape" && (e.preventDefault(), G());
|
|
404
467
|
}, J = (e) => {
|
|
405
468
|
v?.(e), e.key === " " && e.preventDefault();
|
|
406
469
|
}, Y = () => {
|
|
407
470
|
let e = w.current, t = C.current;
|
|
408
471
|
if (!e || !t) return;
|
|
409
|
-
let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom +
|
|
410
|
-
|
|
411
|
-
top: i || !a ? n.bottom +
|
|
472
|
+
let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom + I + r <= window.innerHeight, a = n.top - I - r >= 0;
|
|
473
|
+
M({
|
|
474
|
+
top: i || !a ? n.bottom + I : n.top - I - r,
|
|
412
475
|
left: n.left,
|
|
413
476
|
minWidth: n.width
|
|
414
477
|
});
|
|
415
478
|
}, X = (e) => {
|
|
416
479
|
g?.(e), !e.defaultPrevented && (D ? G() : W());
|
|
417
480
|
};
|
|
418
|
-
|
|
481
|
+
a(() => {
|
|
419
482
|
D && (w.current?.showPopover(), Y());
|
|
420
|
-
}, [D]),
|
|
483
|
+
}, [D]), r(() => {
|
|
421
484
|
if (!D) return;
|
|
422
485
|
let e = (e) => {
|
|
423
486
|
S.current?.contains(e.target) || G();
|
|
@@ -427,23 +490,23 @@ function P({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
427
490
|
return document.addEventListener("pointerdown", e), window.addEventListener("scroll", t, !0), window.addEventListener("resize", Y), () => {
|
|
428
491
|
document.removeEventListener("pointerdown", e), window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", Y);
|
|
429
492
|
};
|
|
430
|
-
}, [D]),
|
|
493
|
+
}, [D]), r(() => {
|
|
431
494
|
D && k >= 0 && w.current?.children.item(k)?.scrollIntoView?.({ block: "nearest" });
|
|
432
495
|
}, [D, k]);
|
|
433
496
|
let Z = (e) => `${x}-option-${U(e)}`, Q = D ? t[k]?.value ?? null : null, $ = t[R]?.label;
|
|
434
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ c(N.Provider, {
|
|
435
498
|
value: {
|
|
436
499
|
value: L,
|
|
437
500
|
activeValue: Q,
|
|
438
501
|
select: K,
|
|
439
502
|
optionId: Z,
|
|
440
|
-
activate: (e) =>
|
|
503
|
+
activate: (e) => A(U(e))
|
|
441
504
|
},
|
|
442
|
-
children: /* @__PURE__ */
|
|
505
|
+
children: /* @__PURE__ */ l("div", {
|
|
443
506
|
ref: S,
|
|
444
507
|
className: "tintora-select",
|
|
445
508
|
children: [
|
|
446
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ l("button", {
|
|
447
510
|
...b,
|
|
448
511
|
ref: C,
|
|
449
512
|
type: "button",
|
|
@@ -453,15 +516,15 @@ function P({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
453
516
|
"aria-expanded": D,
|
|
454
517
|
"aria-controls": D ? x : void 0,
|
|
455
518
|
"aria-activedescendant": Q === null ? void 0 : Z(Q),
|
|
456
|
-
disabled:
|
|
457
|
-
className:
|
|
519
|
+
disabled: n,
|
|
520
|
+
className: d("tintora-select__trigger", h),
|
|
458
521
|
onClick: X,
|
|
459
522
|
onKeyDown: q,
|
|
460
523
|
onKeyUp: J,
|
|
461
|
-
children: [/* @__PURE__ */
|
|
462
|
-
className:
|
|
524
|
+
children: [/* @__PURE__ */ c("span", {
|
|
525
|
+
className: d("tintora-select__value", $ === void 0 && "tintora-select__value--placeholder"),
|
|
463
526
|
children: $ ?? f
|
|
464
|
-
}), /* @__PURE__ */
|
|
527
|
+
}), /* @__PURE__ */ c("svg", {
|
|
465
528
|
className: "tintora-select__chevron",
|
|
466
529
|
width: "10",
|
|
467
530
|
height: "10",
|
|
@@ -472,25 +535,25 @@ function P({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
472
535
|
strokeLinecap: "round",
|
|
473
536
|
strokeLinejoin: "round",
|
|
474
537
|
"aria-hidden": "true",
|
|
475
|
-
children: /* @__PURE__ */
|
|
538
|
+
children: /* @__PURE__ */ c("path", { d: "M6 9l6 6 6-6" })
|
|
476
539
|
})]
|
|
477
540
|
}),
|
|
478
|
-
D && /* @__PURE__ */
|
|
541
|
+
D && /* @__PURE__ */ c("div", {
|
|
479
542
|
ref: w,
|
|
480
543
|
id: x,
|
|
481
544
|
role: "listbox",
|
|
482
545
|
"aria-label": y,
|
|
483
546
|
popover: "manual",
|
|
484
547
|
className: "tintora-select__menu",
|
|
485
|
-
style:
|
|
548
|
+
style: j,
|
|
486
549
|
onMouseDown: (e) => e.preventDefault(),
|
|
487
|
-
children: t.map((e) => /* @__PURE__ */
|
|
550
|
+
children: t.map((e) => /* @__PURE__ */ c(F, { ...e }, e.value))
|
|
488
551
|
}),
|
|
489
|
-
m && /* @__PURE__ */
|
|
552
|
+
m && /* @__PURE__ */ c("input", {
|
|
490
553
|
type: "hidden",
|
|
491
554
|
name: m,
|
|
492
555
|
value: L ?? "",
|
|
493
|
-
disabled:
|
|
556
|
+
disabled: n
|
|
494
557
|
})
|
|
495
558
|
]
|
|
496
559
|
})
|
|
@@ -498,15 +561,15 @@ function P({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f,
|
|
|
498
561
|
}
|
|
499
562
|
//#endregion
|
|
500
563
|
//#region src/Skeleton/Skeleton.tsx
|
|
501
|
-
function
|
|
564
|
+
function R({ width: e, height: t, className: n, style: r, ...i }) {
|
|
502
565
|
let a = {
|
|
503
566
|
...e !== void 0 && { width: e },
|
|
504
567
|
...t !== void 0 && { height: t }
|
|
505
568
|
};
|
|
506
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ c("span", {
|
|
507
570
|
...i,
|
|
508
571
|
"aria-hidden": "true",
|
|
509
|
-
className:
|
|
572
|
+
className: d("tintora-skeleton", n),
|
|
510
573
|
style: {
|
|
511
574
|
...a,
|
|
512
575
|
...r
|
|
@@ -515,22 +578,22 @@ function F({ width: e, height: t, className: n, style: r, ...i }) {
|
|
|
515
578
|
}
|
|
516
579
|
//#endregion
|
|
517
580
|
//#region src/Switch/Switch.tsx
|
|
518
|
-
function
|
|
519
|
-
let a =
|
|
581
|
+
function z({ checked: e, defaultChecked: t, onCheckedChange: n, className: r, ...i }) {
|
|
582
|
+
let a = y({
|
|
520
583
|
checked: e,
|
|
521
584
|
defaultChecked: t,
|
|
522
585
|
onCheckedChange: n
|
|
523
586
|
});
|
|
524
|
-
return /* @__PURE__ */
|
|
525
|
-
className:
|
|
526
|
-
children: [/* @__PURE__ */
|
|
587
|
+
return /* @__PURE__ */ l("span", {
|
|
588
|
+
className: d("tintora-switch", r),
|
|
589
|
+
children: [/* @__PURE__ */ c("input", {
|
|
527
590
|
...i,
|
|
528
591
|
type: "checkbox",
|
|
529
592
|
role: "switch",
|
|
530
593
|
className: "tintora-switch__input",
|
|
531
594
|
checked: a.checked,
|
|
532
595
|
onChange: a.onChange
|
|
533
|
-
}), /* @__PURE__ */
|
|
596
|
+
}), /* @__PURE__ */ c("span", {
|
|
534
597
|
className: "tintora-switch__track",
|
|
535
598
|
"aria-hidden": "true"
|
|
536
599
|
})]
|
|
@@ -538,36 +601,36 @@ function I({ checked: e, defaultChecked: t, onCheckedChange: n, className: r, ..
|
|
|
538
601
|
}
|
|
539
602
|
//#endregion
|
|
540
603
|
//#region src/Tag/Tag.tsx
|
|
541
|
-
function
|
|
542
|
-
return /* @__PURE__ */
|
|
604
|
+
function B({ children: e, className: t, variant: n = "neutral", size: r = "medium", ...i }) {
|
|
605
|
+
return /* @__PURE__ */ c("span", {
|
|
543
606
|
...i,
|
|
544
|
-
className:
|
|
607
|
+
className: d("tintora-tag", `tintora-tag--${n}`, `tintora-tag--${r}`, t),
|
|
545
608
|
children: e
|
|
546
609
|
});
|
|
547
610
|
}
|
|
548
611
|
//#endregion
|
|
549
612
|
//#region src/TextField/TextField.tsx
|
|
550
|
-
function
|
|
551
|
-
let p =
|
|
552
|
-
return /* @__PURE__ */
|
|
553
|
-
className:
|
|
613
|
+
function V({ label: e, hint: t, error: n, id: r, className: a, disabled: o, "aria-describedby": s, "aria-invalid": u, ...f }) {
|
|
614
|
+
let p = i(), m = r ?? p, h = `${m}-message`, g = n ?? t;
|
|
615
|
+
return /* @__PURE__ */ l("div", {
|
|
616
|
+
className: d("tintora-textfield", o && "tintora-textfield--disabled", a),
|
|
554
617
|
children: [
|
|
555
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ c("label", {
|
|
556
619
|
htmlFor: m,
|
|
557
620
|
className: "tintora-textfield__label",
|
|
558
621
|
children: e
|
|
559
622
|
}),
|
|
560
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ c("input", {
|
|
561
624
|
...f,
|
|
562
625
|
id: m,
|
|
563
626
|
disabled: o,
|
|
564
627
|
className: "tintora-textfield__input",
|
|
565
|
-
"aria-invalid": n ? !0 :
|
|
566
|
-
"aria-describedby":
|
|
628
|
+
"aria-invalid": n ? !0 : u,
|
|
629
|
+
"aria-describedby": d(g && h, s) || void 0
|
|
567
630
|
}),
|
|
568
|
-
g && /* @__PURE__ */
|
|
631
|
+
g && /* @__PURE__ */ c("span", {
|
|
569
632
|
id: h,
|
|
570
|
-
className:
|
|
633
|
+
className: d("tintora-textfield__hint", n && "tintora-textfield__hint--error"),
|
|
571
634
|
children: g
|
|
572
635
|
})
|
|
573
636
|
]
|
|
@@ -575,20 +638,20 @@ function R({ label: e, hint: t, error: n, id: i, className: a, disabled: o, "ari
|
|
|
575
638
|
}
|
|
576
639
|
//#endregion
|
|
577
640
|
//#region src/Toggle/ToggleContext.ts
|
|
578
|
-
var
|
|
579
|
-
function
|
|
580
|
-
let e =
|
|
641
|
+
var H = t(null);
|
|
642
|
+
function U() {
|
|
643
|
+
let e = n(H);
|
|
581
644
|
if (!e) throw Error("ToggleItem must be rendered inside a Toggle");
|
|
582
645
|
return e;
|
|
583
646
|
}
|
|
584
647
|
//#endregion
|
|
585
648
|
//#region src/Toggle/Toggle.tsx
|
|
586
|
-
function
|
|
587
|
-
let [p, m] =
|
|
649
|
+
function W({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: i = !1, className: u, ...f }) {
|
|
650
|
+
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({
|
|
588
651
|
x: 0,
|
|
589
652
|
width: 0
|
|
590
653
|
});
|
|
591
|
-
|
|
654
|
+
a(() => {
|
|
592
655
|
let e = v.current;
|
|
593
656
|
if (!e) return;
|
|
594
657
|
let t = () => {
|
|
@@ -610,20 +673,20 @@ function V({ children: e, value: t, defaultValue: n, onValueChange: r, disabled:
|
|
|
610
673
|
"--tintora-toggle-thumb-x": `${y.x}px`,
|
|
611
674
|
"--tintora-toggle-thumb-width": `${y.width}px`
|
|
612
675
|
};
|
|
613
|
-
return /* @__PURE__ */
|
|
676
|
+
return /* @__PURE__ */ c(H.Provider, {
|
|
614
677
|
value: {
|
|
615
678
|
value: g,
|
|
616
679
|
select: (e) => {
|
|
617
680
|
e !== g && (h || m(e), r?.(e));
|
|
618
681
|
},
|
|
619
|
-
disabled:
|
|
682
|
+
disabled: i
|
|
620
683
|
},
|
|
621
|
-
children: /* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ l("div", {
|
|
622
685
|
...f,
|
|
623
686
|
role: "group",
|
|
624
687
|
ref: v,
|
|
625
|
-
className:
|
|
626
|
-
children: [e, /* @__PURE__ */
|
|
688
|
+
className: d("tintora-toggle", i && "tintora-toggle--disabled", u),
|
|
689
|
+
children: [e, /* @__PURE__ */ c("span", {
|
|
627
690
|
"aria-hidden": "true",
|
|
628
691
|
className: "tintora-toggle__thumb",
|
|
629
692
|
style: x
|
|
@@ -633,19 +696,125 @@ function V({ children: e, value: t, defaultValue: n, onValueChange: r, disabled:
|
|
|
633
696
|
}
|
|
634
697
|
//#endregion
|
|
635
698
|
//#region src/Toggle/ToggleItem.tsx
|
|
636
|
-
function
|
|
637
|
-
let o =
|
|
699
|
+
function G({ value: e, children: t, className: n, disabled: r, onClick: i, ...a }) {
|
|
700
|
+
let o = U(), s = (t) => {
|
|
638
701
|
i?.(t), t.defaultPrevented || o.select(e);
|
|
639
702
|
};
|
|
640
|
-
return /* @__PURE__ */
|
|
703
|
+
return /* @__PURE__ */ c("button", {
|
|
641
704
|
...a,
|
|
642
705
|
type: "button",
|
|
643
|
-
className:
|
|
706
|
+
className: d("tintora-toggle__item", n),
|
|
644
707
|
"aria-pressed": o.value === e,
|
|
645
708
|
disabled: r || o.disabled,
|
|
646
|
-
onClick:
|
|
709
|
+
onClick: s,
|
|
647
710
|
children: t
|
|
648
711
|
});
|
|
649
712
|
}
|
|
650
713
|
//#endregion
|
|
651
|
-
|
|
714
|
+
//#region src/Tooltip/Tooltip.tsx
|
|
715
|
+
var K = 10, q = 100, J = 8, Y = 12, X = {
|
|
716
|
+
top: "bottom",
|
|
717
|
+
bottom: "top",
|
|
718
|
+
left: "right",
|
|
719
|
+
right: "left"
|
|
720
|
+
}, Z = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n));
|
|
721
|
+
function Q(e, t, n, r) {
|
|
722
|
+
let i = (t) => {
|
|
723
|
+
switch (t) {
|
|
724
|
+
case "top": return e.top;
|
|
725
|
+
case "bottom": return r.height - e.bottom;
|
|
726
|
+
case "left": return e.left;
|
|
727
|
+
case "right": return r.width - e.right;
|
|
728
|
+
}
|
|
729
|
+
}, a = (n === "top" || n === "bottom" ? t.height : t.width) + K + J, o = i(n);
|
|
730
|
+
return o >= a || i(X[n]) <= o ? n : X[n];
|
|
731
|
+
}
|
|
732
|
+
function $(e, t, n, r = {
|
|
733
|
+
width: window.innerWidth,
|
|
734
|
+
height: window.innerHeight
|
|
735
|
+
}) {
|
|
736
|
+
let i = Q(e, t, n, r), a = i === "top" || i === "bottom", o, s;
|
|
737
|
+
switch (i) {
|
|
738
|
+
case "top":
|
|
739
|
+
o = e.y - t.height - K, s = e.x + e.width / 2 - t.width / 2;
|
|
740
|
+
break;
|
|
741
|
+
case "bottom":
|
|
742
|
+
o = e.y + e.height + K, s = e.x + e.width / 2 - t.width / 2;
|
|
743
|
+
break;
|
|
744
|
+
case "left":
|
|
745
|
+
o = e.y + e.height / 2 - t.height / 2, s = e.x - t.width - K;
|
|
746
|
+
break;
|
|
747
|
+
case "right": o = e.y + e.height / 2 - t.height / 2, s = e.x + e.width + K;
|
|
748
|
+
}
|
|
749
|
+
a ? s = Z(s, J, r.width - t.width - J) : o = Z(o, J, r.height - t.height - J);
|
|
750
|
+
let c = a ? e.x + e.width / 2 - s : e.y + e.height / 2 - o, l = a ? t.width : t.height;
|
|
751
|
+
return {
|
|
752
|
+
top: o,
|
|
753
|
+
left: s,
|
|
754
|
+
placement: i,
|
|
755
|
+
arrowOffset: Z(c, Y, l - Y)
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
function ee({ title: t, content: n, shortcut: u, children: f, className: p, placement: m = "top" }) {
|
|
759
|
+
let h = i(), [g, _] = s(!1), [v, y] = s(null), b = o(null), x = o(null), S = o(void 0), C = () => {
|
|
760
|
+
window.clearTimeout(S.current), _(!0);
|
|
761
|
+
}, w = () => {
|
|
762
|
+
window.clearTimeout(S.current), S.current = window.setTimeout(() => _(!1), q);
|
|
763
|
+
};
|
|
764
|
+
a(() => {
|
|
765
|
+
let e = x.current, t = b.current?.firstElementChild;
|
|
766
|
+
!g || !e || !t ? y(null) : (e.showPopover(), y($(t.getBoundingClientRect(), {
|
|
767
|
+
width: e.offsetWidth,
|
|
768
|
+
height: e.offsetHeight
|
|
769
|
+
}, m)));
|
|
770
|
+
}, [
|
|
771
|
+
g,
|
|
772
|
+
m,
|
|
773
|
+
t,
|
|
774
|
+
n,
|
|
775
|
+
u
|
|
776
|
+
]), r(() => {
|
|
777
|
+
if (!g) return;
|
|
778
|
+
let e = (e) => {
|
|
779
|
+
e.key === "Escape" && _(!1);
|
|
780
|
+
};
|
|
781
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
782
|
+
}, [g]), r(() => () => window.clearTimeout(S.current), []);
|
|
783
|
+
let T = v ? {
|
|
784
|
+
top: v.top,
|
|
785
|
+
left: v.left,
|
|
786
|
+
"--tintora-tooltip-arrow-offset": `${v.arrowOffset}px`
|
|
787
|
+
} : { visibility: "hidden" };
|
|
788
|
+
return /* @__PURE__ */ l("span", {
|
|
789
|
+
ref: b,
|
|
790
|
+
className: "tintora-tooltip",
|
|
791
|
+
onMouseEnter: C,
|
|
792
|
+
onMouseLeave: w,
|
|
793
|
+
onFocus: C,
|
|
794
|
+
onBlur: w,
|
|
795
|
+
children: [e(f, { "aria-describedby": d(f.props["aria-describedby"], g && h) || void 0 }), g && /* @__PURE__ */ l("div", {
|
|
796
|
+
id: h,
|
|
797
|
+
ref: x,
|
|
798
|
+
role: "tooltip",
|
|
799
|
+
popover: "manual",
|
|
800
|
+
style: T,
|
|
801
|
+
className: d("tintora-tooltip__content", `tintora-tooltip__content--${v?.placement ?? m}`, t && "tintora-tooltip__content--rich", p),
|
|
802
|
+
children: [
|
|
803
|
+
t && /* @__PURE__ */ c("span", {
|
|
804
|
+
className: "tintora-tooltip__title",
|
|
805
|
+
children: t
|
|
806
|
+
}),
|
|
807
|
+
/* @__PURE__ */ c("span", {
|
|
808
|
+
className: "tintora-tooltip__text",
|
|
809
|
+
children: n
|
|
810
|
+
}),
|
|
811
|
+
u && /* @__PURE__ */ c("kbd", {
|
|
812
|
+
className: "tintora-tooltip__shortcut",
|
|
813
|
+
children: u
|
|
814
|
+
})
|
|
815
|
+
]
|
|
816
|
+
})]
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
//#endregion
|
|
820
|
+
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, L as Select, v as SelectableCard, R as Skeleton, h as Spinner, z as Switch, B as Tag, V as TextField, W as Toggle, G as ToggleItem, ee 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-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-toggle{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-fill-subtle);gap:4px;padding:5px;display:inline-flex;position:relative}.tintora-toggle--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-toggle__item{box-sizing:border-box;border-radius:var(--tintora-radius-pill);min-width:34px;height:34px;color:var(--tintora-text-nav-idle);font:var(--tintora-font-label);cursor:pointer;outline-offset:2px;z-index:1;background:0 0;border:0;outline:none;justify-content:center;align-items:center;padding:0 8px;transition:color .2s;display:inline-flex}.tintora-toggle__item[aria-pressed=true]{color:#fff}.tintora-toggle__thumb{width:var(--tintora-toggle-thumb-width);border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);transform:translateX(var(--tintora-toggle-thumb-x));pointer-events:none;transition:transform .2s;position:absolute;inset-block:5px;inset-inline-start:0}@media (prefers-reduced-motion:reduce){.tintora-toggle__thumb,.tintora-toggle__item{transition:none}}.tintora-toggle__item:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-toggle__item:disabled{cursor:not-allowed}.tintora-toggle:not(.tintora-toggle--disabled) .tintora-toggle__item:disabled{opacity:var(--tintora-opacity-disabled)}
|
|
1
|
+
:root{--tintora-color-accent:#ee6b25;--tintora-color-accent-deep:#c94e0c;--tintora-color-success:#4cc56b;--tintora-color-planned:#f2698c;--tintora-color-heart:#c42a56;--tintora-color-steps:#1f7a38;--tintora-color-sleep:#2f4fc4;--tintora-color-ink:#1d1c1c;--tintora-color-white:#fff;--tintora-color-destructive:#b3261e;--tintora-color-on-accent:#1d0e04;--tintora-color-on-accent-deep:var(--tintora-color-white);--tintora-color-on-success:#0d200f;--tintora-color-on-planned:#260a13;--tintora-color-on-heart:var(--tintora-color-white);--tintora-color-on-steps:var(--tintora-color-white);--tintora-color-on-sleep:var(--tintora-color-white);--tintora-color-on-destructive:var(--tintora-color-white);--tintora-text-on-card-muted:#55524f;--tintora-chip-fg:#3c3a38;--tintora-chip-bg:#efedeb;--tintora-chip-bg-hover:#e4e1de;--tintora-chip-selected-fg:#8f3604;--tintora-chip-selected-bg:var(--tintora-color-white);--tintora-tint-accent:#fdeadd;--tintora-tint-heart:#fbe0e8;--tintora-tint-steps:#dcf3e1;--tintora-tint-sleep:#e0e7fb;--tintora-menu-bg:var(--tintora-color-white);--tintora-menu-border:#1d1c1c1a;--tintora-menu-shadow:0 16px 32px #00000038;--tintora-menu-item-hover:#1d1c1c12;--tintora-menu-item-destructive:var(--tintora-color-destructive);--tintora-chart-grid:#ece9e6;--tintora-chart-axis:#6f6b68;--tintora-chart-track:#e6e4e2;--tintora-surface-menu-row:#ffffff0d;--tintora-font-family:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--tintora-font-weight-regular:400;--tintora-font-weight-medium:500;--tintora-font-weight-semibold:600;--tintora-font-weight-bold:700;--tintora-font-weight-extrabold:800;--tintora-line-height-tight:1.2;--tintora-font-display:700 1.625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-title:700 1.125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-heading:700 .9375rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-label:700 .78125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-body:500 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-caption:400 .6875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-stat-value:800 1.5625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-subtitle:700 .875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-button:700 .8125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-button-sm:700 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-tracking-tight:-.02em;--tintora-tracking-snug:-.01em;--tintora-tracking-wide:.04em;--tintora-radius-2:2px;--tintora-radius-4:4px;--tintora-radius-6:6px;--tintora-radius-7:7px;--tintora-radius-8:8px;--tintora-radius-9:9px;--tintora-radius-10:10px;--tintora-radius-12:12px;--tintora-radius-14:14px;--tintora-radius-16:16px;--tintora-radius-18:18px;--tintora-radius-20:20px;--tintora-radius-22:22px;--tintora-radius-26:26px;--tintora-radius-28:28px;--tintora-radius-30:30px;--tintora-radius-32:32px;--tintora-radius-34:34px;--tintora-radius-38:38px;--tintora-radius-40:40px;--tintora-radius-pill:9999px;--tintora-radius-card:var(--tintora-radius-20);--tintora-radius-panel:var(--tintora-radius-32);--tintora-shadow-selected:0 14px 30px #c94e0c73;--tintora-shadow-primary:0 8px 20px #c94e0c59;--tintora-shadow-accent:0 8px 20px #ee6b2566;--tintora-shadow-focus-ring:0 0 0 3px #ee6b2547;--tintora-shadow-menu:0 16px 32px #00000073;--tintora-shadow-tooltip:0 8px 20px #00000040;--tintora-shadow-knob:0 2px 4px #0000004d;--tintora-shadow-sheet:0 -16px 40px #00000059;--tintora-blur-glass:28px;--tintora-duration-fast:.15s;--tintora-duration-base:.2s;--tintora-opacity-disabled:.45}:root,[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--tintora-bg:linear-gradient(180deg, #3e3b3a, #222020);--tintora-surface-glass:linear-gradient(180deg, #3e3b3acc, #222020e6);--tintora-surface-card:#fbfaf9;--tintora-surface-row:#ffffff0f;--tintora-surface-field:#100f0f9e;--tintora-surface-menu:#1e1c1cf7;--tintora-text:var(--tintora-color-white);--tintora-text-muted:#ffffffb8;--tintora-text-faint:#ffffffa6;--tintora-text-nav-idle:#ffffffc7;--tintora-text-day:#ffffffd1;--tintora-text-error:#ff9a8a;--tintora-border-glass:#ffffff14;--tintora-border-card:transparent;--tintora-border-row:#ffffff0f;--tintora-border-field:#ffffff14;--tintora-border-field-hover:#ffffff52;--tintora-line:#ffffff1a;--tintora-line-strong:#ffffff52;--tintora-fill-subtle:#ffffff1a;--tintora-fill-subtle-hover:#fff3;--tintora-fill-subtle-pressed:#ffffff47;--tintora-fill-ghost-hover:#ffffff1f;--tintora-fill-day-hover:#ffffff24;--tintora-tag-bg:#ffffff24;--tintora-tag-fg:var(--tintora-color-white);--tintora-focus:var(--tintora-color-accent);--tintora-ring:var(--tintora-color-white);--tintora-shadow-glass:0 30px 60px #00000059;--tintora-shadow-card:0 10px 24px #0000002e;--tintora-shadow-card-hover:0 18px 36px #00000052;--tintora-bg-glow:radial-gradient(60% 50% at 6% 8%, #deccb080, transparent 62%), radial-gradient(50% 45% at 96% 10%, #846a5680, transparent 62%);--tintora-text-placeholder:#ffffff9e;--tintora-scrim:#0a090999;--tintora-surface-modal:linear-gradient(180deg, #403c3b, #2a2726);--tintora-border-modal:#ffffff1f;--tintora-shadow-modal:0 40px 80px #00000080;--tintora-surface-popover:#2b2928;--tintora-border-popover:#ffffff24;--tintora-shadow-popover:0 24px 48px #00000073;--tintora-surface-tooltip:#fbfaf9;--tintora-text-on-tooltip:var(--tintora-color-ink);--tintora-text-on-tooltip-muted:#5a5754;--tintora-tooltip-kbd-bg:#1d1c1c1a;--tintora-surface-toast:#fbfaf9;--tintora-text-on-toast:var(--tintora-color-ink);--tintora-text-on-toast-muted:#5a5754;--tintora-toast-action:var(--tintora-color-accent-deep);--tintora-shadow-toast:0 16px 36px #0006;--tintora-toast-icon-success:var(--tintora-color-steps);--tintora-toast-icon-error:var(--tintora-color-destructive);--tintora-toast-icon-info:var(--tintora-color-sleep);--tintora-toast-icon-warning:#8a5600;--tintora-status-info-bg:#7896ff24;--tintora-status-info-border:#96afff61;--tintora-status-info-fg:#a9bcff;--tintora-status-success-bg:#4cc56b24;--tintora-status-success-border:#4cc56b66;--tintora-status-success-fg:#6ddb8b;--tintora-status-warning-bg:#f2a33a26;--tintora-status-warning-border:#f2a33a6b;--tintora-status-warning-fg:#f5b45a;--tintora-status-error-bg:#ff826e26;--tintora-status-error-border:#ff8c786b;--tintora-status-error-fg:var(--tintora-text-error);--tintora-control-fill:var(--tintora-color-accent);--tintora-control-on-fill:var(--tintora-color-on-accent);--tintora-control-border:#fff9;--tintora-control-hover-tint:#ee6b2529;--tintora-switch-track:#ffffff4d;--tintora-switch-track-hover:#fff6;--tintora-shimmer:linear-gradient(90deg, #ffffff14 0%, #fff3 50%, #ffffff14 100%)}[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:var(--tintora-color-ink);--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:var(--tintora-color-destructive);--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:var(--tintora-color-ink);--tintora-focus:var(--tintora-color-accent-deep);--tintora-ring:var(--tintora-color-ink);--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033;--tintora-bg-glow:radial-gradient(60% 50% at 6% 8%, #ffd6ace6, transparent 62%), radial-gradient(50% 45% at 96% 10%, #ffeed6f2, transparent 62%);--tintora-text-placeholder:#5f5b58;--tintora-scrim:#1d1c1c73;--tintora-surface-modal:#fff;--tintora-border-modal:#1d1c1c0f;--tintora-shadow-modal:0 40px 80px #3c281459;--tintora-surface-popover:#fff;--tintora-border-popover:#1d1c1c1a;--tintora-shadow-popover:0 24px 48px #3c281438;--tintora-surface-tooltip:#2a2827;--tintora-text-on-tooltip:var(--tintora-color-white);--tintora-text-on-tooltip-muted:#ffffffc7;--tintora-tooltip-kbd-bg:#ffffff2e;--tintora-surface-toast:#2a2827;--tintora-text-on-toast:var(--tintora-color-white);--tintora-text-on-toast-muted:#ffffffbf;--tintora-toast-action:#ff9a5c;--tintora-shadow-toast:0 16px 36px #3c281459;--tintora-toast-icon-success:var(--tintora-color-success);--tintora-toast-icon-error:#ff9a8a;--tintora-toast-icon-info:#9db4ff;--tintora-toast-icon-warning:#f2a33a;--tintora-status-info-bg:#2f4fc414;--tintora-status-info-border:#2f4fc447;--tintora-status-info-fg:var(--tintora-color-sleep);--tintora-status-success-bg:#1f7a3817;--tintora-status-success-border:#1f7a384d;--tintora-status-success-fg:var(--tintora-color-steps);--tintora-status-warning-bg:#a86a0a1a;--tintora-status-warning-border:#a86a0a52;--tintora-status-warning-fg:#8a5600;--tintora-status-error-bg:#b3261e14;--tintora-status-error-border:#b3261e47;--tintora-status-error-fg:var(--tintora-text-error);--tintora-control-fill:var(--tintora-color-accent-deep);--tintora-control-on-fill:var(--tintora-color-white);--tintora-control-border:#1d1c1c8c;--tintora-control-hover-tint:#ee6b2529;--tintora-switch-track:#1d1c1c61;--tintora-switch-track-hover:#1d1c1c80;--tintora-shimmer:linear-gradient(90deg, #1d1c1c12 0%, #1d1c1c29 50%, #1d1c1c12 100%)}@media (prefers-color-scheme:light){:root:not([data-theme]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:var(--tintora-color-ink);--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:var(--tintora-color-destructive);--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:var(--tintora-color-ink);--tintora-focus:var(--tintora-color-accent-deep);--tintora-ring:var(--tintora-color-ink);--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033;--tintora-bg-glow:radial-gradient(60% 50% at 6% 8%, #ffd6ace6, transparent 62%), radial-gradient(50% 45% at 96% 10%, #ffeed6f2, transparent 62%);--tintora-text-placeholder:#5f5b58;--tintora-scrim:#1d1c1c73;--tintora-surface-modal:#fff;--tintora-border-modal:#1d1c1c0f;--tintora-shadow-modal:0 40px 80px #3c281459;--tintora-surface-popover:#fff;--tintora-border-popover:#1d1c1c1a;--tintora-shadow-popover:0 24px 48px #3c281438;--tintora-surface-tooltip:#2a2827;--tintora-text-on-tooltip:var(--tintora-color-white);--tintora-text-on-tooltip-muted:#ffffffc7;--tintora-tooltip-kbd-bg:#ffffff2e;--tintora-surface-toast:#2a2827;--tintora-text-on-toast:var(--tintora-color-white);--tintora-text-on-toast-muted:#ffffffbf;--tintora-toast-action:#ff9a5c;--tintora-shadow-toast:0 16px 36px #3c281459;--tintora-toast-icon-success:var(--tintora-color-success);--tintora-toast-icon-error:#ff9a8a;--tintora-toast-icon-info:#9db4ff;--tintora-toast-icon-warning:#f2a33a;--tintora-status-info-bg:#2f4fc414;--tintora-status-info-border:#2f4fc447;--tintora-status-info-fg:var(--tintora-color-sleep);--tintora-status-success-bg:#1f7a3817;--tintora-status-success-border:#1f7a384d;--tintora-status-success-fg:var(--tintora-color-steps);--tintora-status-warning-bg:#a86a0a1a;--tintora-status-warning-border:#a86a0a52;--tintora-status-warning-fg:#8a5600;--tintora-status-error-bg:#b3261e14;--tintora-status-error-border:#b3261e47;--tintora-status-error-fg:var(--tintora-text-error);--tintora-control-fill:var(--tintora-color-accent-deep);--tintora-control-on-fill:var(--tintora-color-white);--tintora-control-border:#1d1c1c8c;--tintora-control-hover-tint:#ee6b2529;--tintora-switch-track:#1d1c1c61;--tintora-switch-track-hover:#1d1c1c80;--tintora-shimmer:linear-gradient(90deg, #1d1c1c12 0%, #1d1c1c29 50%, #1d1c1c12 100%)}}.tintora-avatar{border-radius:var(--tintora-radius-pill);color:var(--tintora-color-ink);font:var(--tintora-font-body);font-size:var(--tintora-avatar-font-size);font-weight:var(--tintora-font-weight-bold);background:linear-gradient(135deg,#f1d9bf,#c9a07a);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tintora-avatar>img{object-fit:cover;width:100%;height:100%}.tintora-avatar--small{--tintora-avatar-font-size:.6875rem;width:32px;height:32px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--medium{--tintora-avatar-font-size:.8125rem;width:40px;height:40px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--large{--tintora-avatar-font-size:.875rem;width:44px;height:44px;font-weight:var(--tintora-font-weight-bold)}.tintora-spinner{flex-shrink:0;animation:.9s linear infinite tintora-spin}@keyframes tintora-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.tintora-spinner{animation:none}}.tintora-button{--tintora-button-border:1px solid transparent;box-sizing:border-box;cursor:pointer;outline-offset:2px;height:var(--tintora-button-height);padding:0 var(--tintora-button-padding-x);border:var(--tintora-button-border);border-radius:var(--tintora-button-border-radius);font-family:inherit;font-size:var(--tintora-button-font-size);font-weight:var(--tintora-button-font-weight);color:var(--tintora-button-fg);background-color:var(--tintora-button-bg);box-shadow:var(--tintora-button-shadow,none);outline:none;justify-content:center;align-items:center;gap:8px;display:inline-flex}.tintora-button--small{--tintora-button-height:32px;--tintora-button-padding-x:14px;--tintora-button-border-radius:16px;--tintora-button-font-size:12px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--medium{--tintora-button-height:40px;--tintora-button-padding-x:18px;--tintora-button-border-radius:20px;--tintora-button-font-size:13px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--large{--tintora-button-height:48px;--tintora-button-padding-x:24px;--tintora-button-border-radius:24px;--tintora-button-font-size:14px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button__icon{flex-shrink:0;display:inline-flex}.tintora-button--leading-icon{padding-inline-start:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--trailing-icon{padding-inline-end:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--primary{--tintora-button-fg:var(--tintora-color-on-accent-deep);--tintora-button-bg:var(--tintora-color-accent-deep);--tintora-button-shadow:var(--tintora-shadow-primary);--tintora-button-filter-hover:brightness(1.14);--tintora-button-filter-pressed:brightness(.9)}.tintora-button--secondary{--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-fill-subtle);--tintora-button-bg-hover:var(--tintora-fill-subtle-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle-pressed)}.tintora-button--outline{--tintora-button-border:1px solid var(--tintora-line-strong);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button--ghost{--tintora-button-fg:var(--tintora-text-muted);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button:enabled:hover{color:var(--tintora-button-fg-hover,var(--tintora-button-fg));background-color:var(--tintora-button-bg-hover,var(--tintora-button-bg));filter:var(--tintora-button-filter-hover,none)}.tintora-button:enabled:active{color:var(--tintora-button-fg-pressed,var(--tintora-button-fg));background-color:var(--tintora-button-bg-pressed,var(--tintora-button-bg));filter:var(--tintora-button-filter-pressed,none);transform:translateY(1px)}.tintora-button:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-button:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed;box-shadow:none}.tintora-button--loading:disabled{opacity:.85;cursor:progress}.tintora-card{box-sizing:border-box;font:inherit;text-align:start;border:1px solid #0000;justify-content:space-between;align-items:center;gap:12px;margin:0;display:flex}.tintora-card--surface{border-color:var(--tintora-border-card);border-radius:var(--tintora-radius-card);background:var(--tintora-surface-card);box-shadow:var(--tintora-shadow-card);color:var(--tintora-color-ink);--tintora-card-text-muted:var(--tintora-text-on-card-muted);padding:18px 18px 18px 20px}.tintora-card--row{border-color:var(--tintora-border-row);border-radius:var(--tintora-radius-18);background:var(--tintora-surface-row);color:var(--tintora-text);--tintora-card-text-muted:var(--tintora-text-faint);justify-content:flex-start;padding:10px 6px 10px 10px}.tintora-card--selectable{cursor:pointer;width:100%}@media (prefers-reduced-motion:no-preference){.tintora-card--selectable{transition:transform .15s,box-shadow .15s,background-color .15s}}.tintora-card--selectable:not(.tintora-card--selected):hover{box-shadow:var(--tintora-shadow-card-hover);transform:translateY(-3px)}.tintora-card--selectable:focus-visible{outline:2px solid var(--tintora-focus);outline-offset:2px}.tintora-card--selectable:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-card--selected{background:var(--tintora-color-accent-deep);box-shadow:var(--tintora-shadow-selected);color:var(--tintora-color-on-accent-deep);--tintora-card-text-muted:var(--tintora-color-on-accent-deep);border-color:#0000}.tintora-card--selected .tintora-tag--card{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-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-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*/
|