tintora 0.10.0 → 0.12.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/Avatar/Avatar.d.ts +13 -0
- package/dist/Avatar/utils.d.ts +1 -0
- package/dist/Select/Select.d.ts +25 -0
- package/dist/Select/SelectContext.d.ts +12 -0
- package/dist/Select/SelectOption.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -98
- package/dist/tintora.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import './Avatar.css';
|
|
3
|
+
type AvatarSize = 'small' | 'medium' | 'large';
|
|
4
|
+
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
/** Full name. Used for the initials fallback and as the accessible name. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Image URL. When missing or failing to load, the initials are shown. */
|
|
8
|
+
src?: string;
|
|
9
|
+
/** @default 'medium' */
|
|
10
|
+
size?: AvatarSize;
|
|
11
|
+
}
|
|
12
|
+
export declare function Avatar({ name, src, size, className, ...props }: AvatarProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCapitalFirstLetters(name: string): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import './Select.css';
|
|
3
|
+
import { SelectOption } from './SelectOption';
|
|
4
|
+
interface SelectBaseProps<T extends string> extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'defaultValue' | 'onChange' | 'children' | 'type' | 'role'> {
|
|
5
|
+
options: readonly SelectOption<T>[];
|
|
6
|
+
/** The trigger shows only the value, so it needs a name. */
|
|
7
|
+
'aria-label': string;
|
|
8
|
+
/** Shown when nothing is selected. */
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
/** Adds a hidden input so the value submits with a <form>. */
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
interface ControlledProps<T extends string> {
|
|
14
|
+
value: T | null;
|
|
15
|
+
onValueChange: (value: T) => void;
|
|
16
|
+
defaultValue?: never;
|
|
17
|
+
}
|
|
18
|
+
interface UncontrolledProps<T extends string> {
|
|
19
|
+
value?: never;
|
|
20
|
+
onValueChange?: (value: T) => void;
|
|
21
|
+
defaultValue: T | null;
|
|
22
|
+
}
|
|
23
|
+
export type SelectProps<T extends string = string> = SelectBaseProps<T> & (ControlledProps<T> | UncontrolledProps<T>);
|
|
24
|
+
export declare function Select<T extends string>({ defaultValue, options, disabled, value, placeholder, onValueChange, name, className, onClick, onKeyDown, onKeyUp, 'aria-label': ariaLabel, ...props }: SelectProps<T>): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface SelectContextValue {
|
|
2
|
+
/** The selected value, or null when nothing is selected. */
|
|
3
|
+
value: string | null;
|
|
4
|
+
/** The option the keyboard or pointer is on (aria-activedescendant). */
|
|
5
|
+
activeValue: string | null;
|
|
6
|
+
select: (value: string) => void;
|
|
7
|
+
activate: (value: string) => void;
|
|
8
|
+
optionId: (value: string) => string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SelectContext: import("react").Context<SelectContextValue | null>;
|
|
11
|
+
export declare const useSelectContext: () => SelectContextValue;
|
|
12
|
+
export {};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r)}return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}function i(e){if(!e.length)return``;let t=e.trim().split(/\s+/).map(e=>e.match(/\p{L}\p{M}*/u)?.[0]).filter(e=>!!e);return`${t[0]??``}${t.length>1?t.at(-1)??``:``}`.toLocaleUpperCase()}function a({name:n,src:a,size:o=`medium`,className:s,...c}){let[l,u]=(0,e.useState)(),d=!!a&&a!==l;return(0,t.jsx)(`span`,{role:`img`,"aria-label":n,...c,className:r(`tintora-avatar`,`tintora-avatar--${o}`,s),children:d?(0,t.jsx)(`img`,{src:a,alt:``,onError:()=>u(a)}):i(n)})}function o({children:e,className:n,variant:i,size:a=`medium`,leadingIcon:o,trailingIcon:s,type:c=`button`,...l}){return(0,t.jsxs)(`button`,{type:c,className:r(`tintora-button`,`tintora-button--${i}`,`tintora-button--${a}`,{"tintora-button--leading-icon":!!o,"tintora-button--trailing-icon":!!s},n),...l,children:[o&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:o}),e,s&&(0,t.jsx)(`span`,{className:`tintora-button__icon`,"aria-hidden":`true`,children:s})]})}function s({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 c({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 l={round:`secondary`,field:`secondary`,nav:`ghost`};function u({icon:e,variant:n=`round`,size:i,selected:a,className:s,...c}){let u=n===`round`?i??`large`:void 0;return(0,t.jsx)(o,{...c,variant:l[n],"aria-current":a?`page`:void 0,className:r(`tintora-icon-button`,`tintora-icon-button--${n}`,u&&`tintora-icon-button--${u}`,s),...u&&{size:u},children:(0,t.jsx)(`span`,{className:`tintora-icon-button__icon`,"aria-hidden":`true`,children:e})})}function d({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 f=(0,e.createContext)(null),p=()=>{let t=(0,e.useContext)(f);if(!t)throw Error(`SelectOption must be rendered inside a Select`);return t};function m({label:e,value:n,disabled:i}){let{select:a,activate:o,optionId:s,value:c,activeValue:l}=p();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 h=4;function g({defaultValue:n,options:i,disabled:a,value:o,placeholder:s,onValueChange:c,name:l,className:u,onClick:d,onKeyDown:p,onKeyUp:g,"aria-label":_,...v}){let y=(0,e.useId)(),b=(0,e.useRef)(null),x=(0,e.useRef)(null),S=(0,e.useRef)(null),[C,w]=(0,e.useState)(n??null),[T,E]=(0,e.useState)(!1),[D,O]=(0,e.useState)(-1),[k,A]=(0,e.useState)({}),j=o!==void 0,M=j?o:C,N=i.findIndex(e=>e.value===M),P=e=>i[e]?.disabled!==!0,F=()=>i.findIndex((e,t)=>P(t)),I=(e,t)=>{for(let n=e+t;n>=0&&n<i.length;n+=t)if(P(n))return n;return e},L=()=>{let e=I(i.length,-1);return e===i.length?-1:e},R=e=>i.findIndex(t=>t.value===e),z=()=>{O(N>=0&&P(N)?N:F()),E(!0)},B=()=>E(!1),V=e=>{let t=R(e);t<0||!P(t)||(B(),e!==M&&(j||w(e),c?.(e)))},H=e=>{if(p?.(e),e.defaultPrevented)return;let{key:t}=e;if(t===`Tab`)return B();if(!T){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(t)&&(e.preventDefault(),z());return}let n={ArrowDown:()=>D<0?F():I(D,1),ArrowUp:()=>D<0?F():I(D,-1),Home:F,End:L};t in n?(e.preventDefault(),O(n[t]())):t===`Enter`||t===` `?(e.preventDefault(),D>=0?V(i[D].value):B()):t===`Escape`&&(e.preventDefault(),B())},U=e=>{g?.(e),e.key===` `&&e.preventDefault()},W=()=>{let e=S.current,t=x.current;if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.offsetHeight,i=n.bottom+h+r<=window.innerHeight,a=n.top-h-r>=0;A({top:i||!a?n.bottom+h:n.top-h-r,left:n.left,minWidth:n.width})},G=e=>{d?.(e),!e.defaultPrevented&&(T?B():z())};(0,e.useLayoutEffect)(()=>{T&&(S.current?.showPopover(),W())},[T]),(0,e.useEffect)(()=>{if(!T)return;let e=e=>{b.current?.contains(e.target)||B()},t=e=>{S.current?.contains(e.target)||W()};return document.addEventListener(`pointerdown`,e),window.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,W),()=>{document.removeEventListener(`pointerdown`,e),window.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,W)}},[T]),(0,e.useEffect)(()=>{T&&D>=0&&S.current?.children.item(D)?.scrollIntoView?.({block:`nearest`})},[T,D]);let K=e=>`${y}-option-${R(e)}`,q=T?i[D]?.value??null:null,J=i[N]?.label;return(0,t.jsx)(f.Provider,{value:{value:M,activeValue:q,select:V,optionId:K,activate:e=>O(R(e))},children:(0,t.jsxs)(`div`,{ref:b,className:`tintora-select`,children:[(0,t.jsxs)(`button`,{...v,ref:x,type:`button`,role:`combobox`,"aria-label":_,"aria-haspopup":`listbox`,"aria-expanded":T,"aria-controls":T?y:void 0,"aria-activedescendant":q===null?void 0:K(q),disabled:a,className:r(`tintora-select__trigger`,u),onClick:G,onKeyDown:H,onKeyUp:U,children:[(0,t.jsx)(`span`,{className:r(`tintora-select__value`,J===void 0&&`tintora-select__value--placeholder`),children:J??s}),(0,t.jsx)(`svg`,{className:`tintora-select__chevron`,width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,t.jsx)(`path`,{d:`M6 9l6 6 6-6`})})]}),T&&(0,t.jsx)(`div`,{ref:S,id:y,role:`listbox`,"aria-label":_,popover:`manual`,className:`tintora-select__menu`,style:k,onMouseDown:e=>e.preventDefault(),children:i.map(e=>(0,t.jsx)(m,{...e},e.value))}),l&&(0,t.jsx)(`input`,{type:`hidden`,name:l,value:M??``,disabled:a})]})})}function _({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 v({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 y=(0,e.createContext)(null);function b(){let t=(0,e.useContext)(y);if(!t)throw Error(`ToggleItem must be rendered inside a Toggle`);return t}function x({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)(y.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 S({value:e,children:n,className:i,disabled:a,onClick:o,...s}){let c=b(),l=t=>{o?.(t),t.defaultPrevented||c.select(e)};return(0,t.jsx)(`button`,{...s,type:`button`,className:r(`tintora-toggle__item`,i),"aria-pressed":c.value===e,disabled:a||c.disabled,onClick:l,children:n})}exports.Avatar=a,exports.Button=o,exports.Chip=s,exports.Dot=c,exports.IconButton=u,exports.SearchInput=d,exports.Select=g,exports.Tag=_,exports.TextField=v,exports.Toggle=x,exports.ToggleItem=S;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import './tokens.css';
|
|
2
|
+
export { Avatar } from './Avatar/Avatar';
|
|
2
3
|
export { Button } from './Button/Button';
|
|
3
4
|
export { Chip } from './Chip/Chip';
|
|
4
5
|
export { Dot } from './Dot/Dot';
|
|
5
6
|
export { IconButton } from './IconButton/IconButton';
|
|
6
7
|
export { SearchInput } from './SearchInput/SearchInput';
|
|
8
|
+
export { Select } from './Select/Select';
|
|
7
9
|
export { Tag } from './Tag/Tag';
|
|
8
10
|
export { TextField } from './TextField/TextField';
|
|
9
11
|
export { Toggle, type ToggleProps } from './Toggle/Toggle';
|
package/dist/index.js
CHANGED
|
@@ -1,96 +1,119 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { createContext as e, useContext as t, useEffect as n, useId as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
2
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
//#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
4
|
-
function
|
|
4
|
+
function l(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 = l(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 u() {
|
|
16
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = l(e)) && (r && (r += " "), r += t);
|
|
17
17
|
return r;
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
+
//#region src/Avatar/utils.ts
|
|
21
|
+
function d(e) {
|
|
22
|
+
if (!e.length) return "";
|
|
23
|
+
let t = e.trim().split(/\s+/).map((e) => e.match(/\p{L}\p{M}*/u)?.[0]).filter((e) => !!e);
|
|
24
|
+
return `${t[0] ?? ""}${t.length > 1 ? t.at(-1) ?? "" : ""}`.toLocaleUpperCase();
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/Avatar/Avatar.tsx
|
|
28
|
+
function f({ name: e, src: t, size: n = "medium", className: r, ...i }) {
|
|
29
|
+
let [a, c] = o(), l = !!t && t !== a;
|
|
30
|
+
return /* @__PURE__ */ s("span", {
|
|
31
|
+
role: "img",
|
|
32
|
+
"aria-label": e,
|
|
33
|
+
...i,
|
|
34
|
+
className: u("tintora-avatar", `tintora-avatar--${n}`, r),
|
|
35
|
+
children: l ? /* @__PURE__ */ s("img", {
|
|
36
|
+
src: t,
|
|
37
|
+
alt: "",
|
|
38
|
+
onError: () => c(t)
|
|
39
|
+
}) : d(e)
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
20
43
|
//#region src/Button/Button.tsx
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
type:
|
|
24
|
-
className:
|
|
25
|
-
"tintora-button--leading-icon": !!
|
|
26
|
-
"tintora-button--trailing-icon": !!
|
|
27
|
-
},
|
|
28
|
-
...
|
|
44
|
+
function p({ children: e, className: t, variant: n, size: r = "medium", leadingIcon: i, trailingIcon: a, type: o = "button", ...l }) {
|
|
45
|
+
return /* @__PURE__ */ c("button", {
|
|
46
|
+
type: o,
|
|
47
|
+
className: u("tintora-button", `tintora-button--${n}`, `tintora-button--${r}`, {
|
|
48
|
+
"tintora-button--leading-icon": !!i,
|
|
49
|
+
"tintora-button--trailing-icon": !!a
|
|
50
|
+
}, t),
|
|
51
|
+
...l,
|
|
29
52
|
children: [
|
|
30
|
-
|
|
53
|
+
i && /* @__PURE__ */ s("span", {
|
|
31
54
|
className: "tintora-button__icon",
|
|
32
55
|
"aria-hidden": "true",
|
|
33
|
-
children:
|
|
56
|
+
children: i
|
|
34
57
|
}),
|
|
35
|
-
|
|
36
|
-
|
|
58
|
+
e,
|
|
59
|
+
a && /* @__PURE__ */ s("span", {
|
|
37
60
|
className: "tintora-button__icon",
|
|
38
61
|
"aria-hidden": "true",
|
|
39
|
-
children:
|
|
62
|
+
children: a
|
|
40
63
|
})
|
|
41
64
|
]
|
|
42
65
|
});
|
|
43
66
|
}
|
|
44
67
|
//#endregion
|
|
45
68
|
//#region src/Chip/Chip.tsx
|
|
46
|
-
function
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
...
|
|
69
|
+
function m({ children: e, selected: t, className: n, "aria-pressed": r, ...i }) {
|
|
70
|
+
return /* @__PURE__ */ s("button", {
|
|
71
|
+
...i,
|
|
49
72
|
type: "button",
|
|
50
|
-
className:
|
|
51
|
-
"aria-pressed":
|
|
52
|
-
children:
|
|
73
|
+
className: u("tintora-chip", n),
|
|
74
|
+
"aria-pressed": t ?? r,
|
|
75
|
+
children: e
|
|
53
76
|
});
|
|
54
77
|
}
|
|
55
78
|
//#endregion
|
|
56
79
|
//#region src/Dot/Dot.tsx
|
|
57
|
-
function
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
...
|
|
60
|
-
className:
|
|
61
|
-
role:
|
|
62
|
-
"aria-label":
|
|
63
|
-
"aria-hidden": !
|
|
80
|
+
function h({ variant: e = "unread", label: t, className: n, ...r }) {
|
|
81
|
+
return /* @__PURE__ */ s("span", {
|
|
82
|
+
...r,
|
|
83
|
+
className: u("tintora-dot", `tintora-dot--${e}`, n),
|
|
84
|
+
role: t ? "img" : void 0,
|
|
85
|
+
"aria-label": t,
|
|
86
|
+
"aria-hidden": !t || void 0
|
|
64
87
|
});
|
|
65
88
|
}
|
|
66
89
|
//#endregion
|
|
67
90
|
//#region src/IconButton/IconButton.tsx
|
|
68
|
-
var
|
|
91
|
+
var g = {
|
|
69
92
|
round: "secondary",
|
|
70
93
|
field: "secondary",
|
|
71
94
|
nav: "ghost"
|
|
72
95
|
};
|
|
73
|
-
function
|
|
74
|
-
let
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
...
|
|
77
|
-
variant:
|
|
78
|
-
"aria-current":
|
|
79
|
-
className:
|
|
80
|
-
...
|
|
81
|
-
children: /* @__PURE__ */
|
|
96
|
+
function _({ icon: e, variant: t = "round", size: n, selected: r, className: i, ...a }) {
|
|
97
|
+
let o = t === "round" ? n ?? "large" : void 0;
|
|
98
|
+
return /* @__PURE__ */ s(p, {
|
|
99
|
+
...a,
|
|
100
|
+
variant: g[t],
|
|
101
|
+
"aria-current": r ? "page" : void 0,
|
|
102
|
+
className: u("tintora-icon-button", `tintora-icon-button--${t}`, o && `tintora-icon-button--${o}`, i),
|
|
103
|
+
...o && { size: o },
|
|
104
|
+
children: /* @__PURE__ */ s("span", {
|
|
82
105
|
className: "tintora-icon-button__icon",
|
|
83
106
|
"aria-hidden": "true",
|
|
84
|
-
children:
|
|
107
|
+
children: e
|
|
85
108
|
})
|
|
86
109
|
});
|
|
87
110
|
}
|
|
88
111
|
//#endregion
|
|
89
112
|
//#region src/SearchInput/SearchInput.tsx
|
|
90
|
-
function
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
-
className:
|
|
93
|
-
children: [/* @__PURE__ */
|
|
113
|
+
function v({ className: e, disabled: t, ...n }) {
|
|
114
|
+
return /* @__PURE__ */ c("label", {
|
|
115
|
+
className: u("tintora-search-input", t && "tintora-search-input--disabled", e),
|
|
116
|
+
children: [/* @__PURE__ */ c("svg", {
|
|
94
117
|
className: "tintora-search-input__icon",
|
|
95
118
|
viewBox: "0 0 24 24",
|
|
96
119
|
fill: "none",
|
|
@@ -98,51 +121,203 @@ function h({ className: n, disabled: r, ...i }) {
|
|
|
98
121
|
strokeWidth: "2",
|
|
99
122
|
strokeLinecap: "round",
|
|
100
123
|
"aria-hidden": "true",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ s("circle", {
|
|
102
125
|
cx: "11",
|
|
103
126
|
cy: "11",
|
|
104
127
|
r: "7"
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
}), /* @__PURE__ */
|
|
107
|
-
...
|
|
128
|
+
}), /* @__PURE__ */ s("path", { d: "M20 20l-3.5-3.5" })]
|
|
129
|
+
}), /* @__PURE__ */ s("input", {
|
|
130
|
+
...n,
|
|
108
131
|
type: "search",
|
|
109
|
-
disabled:
|
|
132
|
+
disabled: t,
|
|
110
133
|
className: "tintora-search-input__input"
|
|
111
134
|
})]
|
|
112
135
|
});
|
|
113
136
|
}
|
|
114
137
|
//#endregion
|
|
138
|
+
//#region src/Select/SelectContext.ts
|
|
139
|
+
var y = e(null), b = () => {
|
|
140
|
+
let e = t(y);
|
|
141
|
+
if (!e) throw Error("SelectOption must be rendered inside a Select");
|
|
142
|
+
return e;
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/Select/SelectOption.tsx
|
|
146
|
+
function x({ label: e, value: t, disabled: n }) {
|
|
147
|
+
let { select: r, activate: i, optionId: a, value: o, activeValue: c } = b();
|
|
148
|
+
return /* @__PURE__ */ s("div", {
|
|
149
|
+
id: a(t),
|
|
150
|
+
role: "option",
|
|
151
|
+
"aria-selected": o === t,
|
|
152
|
+
"aria-disabled": n || void 0,
|
|
153
|
+
className: u("tintora-select__option", c === t && "tintora-select__option--active"),
|
|
154
|
+
onClick: () => r(t),
|
|
155
|
+
onMouseMove: () => !n && i(t),
|
|
156
|
+
children: e
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/Select/Select.tsx
|
|
161
|
+
var S = 4;
|
|
162
|
+
function C({ defaultValue: e, options: t, disabled: l, value: d, placeholder: f, onValueChange: p, name: m, className: h, onClick: g, onKeyDown: _, onKeyUp: v, "aria-label": b, ...C }) {
|
|
163
|
+
let w = r(), T = a(null), E = a(null), D = a(null), [O, k] = o(e ?? null), [A, j] = o(!1), [M, N] = o(-1), [P, F] = o({}), I = d !== void 0, L = I ? d : O, R = t.findIndex((e) => e.value === L), z = (e) => t[e]?.disabled !== !0, B = () => t.findIndex((e, t) => z(t)), V = (e, n) => {
|
|
164
|
+
for (let r = e + n; r >= 0 && r < t.length; r += n) if (z(r)) return r;
|
|
165
|
+
return e;
|
|
166
|
+
}, H = () => {
|
|
167
|
+
let e = V(t.length, -1);
|
|
168
|
+
return e === t.length ? -1 : e;
|
|
169
|
+
}, U = (e) => t.findIndex((t) => t.value === e), W = () => {
|
|
170
|
+
N(R >= 0 && z(R) ? R : B()), j(!0);
|
|
171
|
+
}, G = () => j(!1), K = (e) => {
|
|
172
|
+
let t = U(e);
|
|
173
|
+
t < 0 || !z(t) || (G(), e !== L && (I || k(e), p?.(e)));
|
|
174
|
+
}, q = (e) => {
|
|
175
|
+
if (_?.(e), e.defaultPrevented) return;
|
|
176
|
+
let { key: n } = e;
|
|
177
|
+
if (n === "Tab") return G();
|
|
178
|
+
if (!A) {
|
|
179
|
+
[
|
|
180
|
+
"Enter",
|
|
181
|
+
" ",
|
|
182
|
+
"ArrowDown",
|
|
183
|
+
"ArrowUp"
|
|
184
|
+
].includes(n) && (e.preventDefault(), W());
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
let r = {
|
|
188
|
+
ArrowDown: () => M < 0 ? B() : V(M, 1),
|
|
189
|
+
ArrowUp: () => M < 0 ? B() : V(M, -1),
|
|
190
|
+
Home: B,
|
|
191
|
+
End: H
|
|
192
|
+
};
|
|
193
|
+
n in r ? (e.preventDefault(), N(r[n]())) : n === "Enter" || n === " " ? (e.preventDefault(), M >= 0 ? K(t[M].value) : G()) : n === "Escape" && (e.preventDefault(), G());
|
|
194
|
+
}, J = (e) => {
|
|
195
|
+
v?.(e), e.key === " " && e.preventDefault();
|
|
196
|
+
}, Y = () => {
|
|
197
|
+
let e = D.current, t = E.current;
|
|
198
|
+
if (!e || !t) return;
|
|
199
|
+
let n = t.getBoundingClientRect(), r = e.offsetHeight, i = n.bottom + S + r <= window.innerHeight, a = n.top - S - r >= 0;
|
|
200
|
+
F({
|
|
201
|
+
top: i || !a ? n.bottom + S : n.top - S - r,
|
|
202
|
+
left: n.left,
|
|
203
|
+
minWidth: n.width
|
|
204
|
+
});
|
|
205
|
+
}, X = (e) => {
|
|
206
|
+
g?.(e), !e.defaultPrevented && (A ? G() : W());
|
|
207
|
+
};
|
|
208
|
+
i(() => {
|
|
209
|
+
A && (D.current?.showPopover(), Y());
|
|
210
|
+
}, [A]), n(() => {
|
|
211
|
+
if (!A) return;
|
|
212
|
+
let e = (e) => {
|
|
213
|
+
T.current?.contains(e.target) || G();
|
|
214
|
+
}, t = (e) => {
|
|
215
|
+
D.current?.contains(e.target) || Y();
|
|
216
|
+
};
|
|
217
|
+
return document.addEventListener("pointerdown", e), window.addEventListener("scroll", t, !0), window.addEventListener("resize", Y), () => {
|
|
218
|
+
document.removeEventListener("pointerdown", e), window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", Y);
|
|
219
|
+
};
|
|
220
|
+
}, [A]), n(() => {
|
|
221
|
+
A && M >= 0 && D.current?.children.item(M)?.scrollIntoView?.({ block: "nearest" });
|
|
222
|
+
}, [A, M]);
|
|
223
|
+
let Z = (e) => `${w}-option-${U(e)}`, Q = A ? t[M]?.value ?? null : null, $ = t[R]?.label;
|
|
224
|
+
return /* @__PURE__ */ s(y.Provider, {
|
|
225
|
+
value: {
|
|
226
|
+
value: L,
|
|
227
|
+
activeValue: Q,
|
|
228
|
+
select: K,
|
|
229
|
+
optionId: Z,
|
|
230
|
+
activate: (e) => N(U(e))
|
|
231
|
+
},
|
|
232
|
+
children: /* @__PURE__ */ c("div", {
|
|
233
|
+
ref: T,
|
|
234
|
+
className: "tintora-select",
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ c("button", {
|
|
237
|
+
...C,
|
|
238
|
+
ref: E,
|
|
239
|
+
type: "button",
|
|
240
|
+
role: "combobox",
|
|
241
|
+
"aria-label": b,
|
|
242
|
+
"aria-haspopup": "listbox",
|
|
243
|
+
"aria-expanded": A,
|
|
244
|
+
"aria-controls": A ? w : void 0,
|
|
245
|
+
"aria-activedescendant": Q === null ? void 0 : Z(Q),
|
|
246
|
+
disabled: l,
|
|
247
|
+
className: u("tintora-select__trigger", h),
|
|
248
|
+
onClick: X,
|
|
249
|
+
onKeyDown: q,
|
|
250
|
+
onKeyUp: J,
|
|
251
|
+
children: [/* @__PURE__ */ s("span", {
|
|
252
|
+
className: u("tintora-select__value", $ === void 0 && "tintora-select__value--placeholder"),
|
|
253
|
+
children: $ ?? f
|
|
254
|
+
}), /* @__PURE__ */ s("svg", {
|
|
255
|
+
className: "tintora-select__chevron",
|
|
256
|
+
width: "10",
|
|
257
|
+
height: "10",
|
|
258
|
+
viewBox: "0 0 24 24",
|
|
259
|
+
fill: "none",
|
|
260
|
+
stroke: "currentColor",
|
|
261
|
+
strokeWidth: "3",
|
|
262
|
+
strokeLinecap: "round",
|
|
263
|
+
strokeLinejoin: "round",
|
|
264
|
+
"aria-hidden": "true",
|
|
265
|
+
children: /* @__PURE__ */ s("path", { d: "M6 9l6 6 6-6" })
|
|
266
|
+
})]
|
|
267
|
+
}),
|
|
268
|
+
A && /* @__PURE__ */ s("div", {
|
|
269
|
+
ref: D,
|
|
270
|
+
id: w,
|
|
271
|
+
role: "listbox",
|
|
272
|
+
"aria-label": b,
|
|
273
|
+
popover: "manual",
|
|
274
|
+
className: "tintora-select__menu",
|
|
275
|
+
style: P,
|
|
276
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
277
|
+
children: t.map((e) => /* @__PURE__ */ s(x, { ...e }, e.value))
|
|
278
|
+
}),
|
|
279
|
+
m && /* @__PURE__ */ s("input", {
|
|
280
|
+
type: "hidden",
|
|
281
|
+
name: m,
|
|
282
|
+
value: L ?? "",
|
|
283
|
+
disabled: l
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
})
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
//#endregion
|
|
115
290
|
//#region src/Tag/Tag.tsx
|
|
116
|
-
function
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
...
|
|
119
|
-
className:
|
|
120
|
-
children:
|
|
291
|
+
function w({ children: e, className: t, variant: n = "neutral", size: r = "medium", ...i }) {
|
|
292
|
+
return /* @__PURE__ */ s("span", {
|
|
293
|
+
...i,
|
|
294
|
+
className: u("tintora-tag", `tintora-tag--${n}`, `tintora-tag--${r}`, t),
|
|
295
|
+
children: e
|
|
121
296
|
});
|
|
122
297
|
}
|
|
123
298
|
//#endregion
|
|
124
299
|
//#region src/TextField/TextField.tsx
|
|
125
|
-
function
|
|
126
|
-
let p =
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
className:
|
|
300
|
+
function T({ label: e, hint: t, error: n, id: i, className: a, disabled: o, "aria-describedby": l, "aria-invalid": d, ...f }) {
|
|
301
|
+
let p = r(), m = i ?? p, h = `${m}-message`, g = n ?? t;
|
|
302
|
+
return /* @__PURE__ */ c("div", {
|
|
303
|
+
className: u("tintora-textfield", o && "tintora-textfield--disabled", a),
|
|
129
304
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ s("label", {
|
|
131
306
|
htmlFor: m,
|
|
132
307
|
className: "tintora-textfield__label",
|
|
133
|
-
children:
|
|
308
|
+
children: e
|
|
134
309
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ s("input", {
|
|
136
311
|
...f,
|
|
137
312
|
id: m,
|
|
138
|
-
disabled:
|
|
313
|
+
disabled: o,
|
|
139
314
|
className: "tintora-textfield__input",
|
|
140
|
-
"aria-invalid":
|
|
141
|
-
"aria-describedby":
|
|
315
|
+
"aria-invalid": n ? !0 : d,
|
|
316
|
+
"aria-describedby": u(g && h, l) || void 0
|
|
142
317
|
}),
|
|
143
|
-
g && /* @__PURE__ */
|
|
318
|
+
g && /* @__PURE__ */ s("span", {
|
|
144
319
|
id: h,
|
|
145
|
-
className:
|
|
320
|
+
className: u("tintora-textfield__hint", n && "tintora-textfield__hint--error"),
|
|
146
321
|
children: g
|
|
147
322
|
})
|
|
148
323
|
]
|
|
@@ -150,21 +325,21 @@ function _({ label: n, hint: r, error: a, id: o, className: s, disabled: c, "ari
|
|
|
150
325
|
}
|
|
151
326
|
//#endregion
|
|
152
327
|
//#region src/Toggle/ToggleContext.ts
|
|
153
|
-
var
|
|
154
|
-
function
|
|
155
|
-
let e =
|
|
328
|
+
var E = e(null);
|
|
329
|
+
function D() {
|
|
330
|
+
let e = t(E);
|
|
156
331
|
if (!e) throw Error("ToggleItem must be rendered inside a Toggle");
|
|
157
332
|
return e;
|
|
158
333
|
}
|
|
159
334
|
//#endregion
|
|
160
335
|
//#region src/Toggle/Toggle.tsx
|
|
161
|
-
function
|
|
162
|
-
let [p, m] =
|
|
336
|
+
function O({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: l = !1, className: d, ...f }) {
|
|
337
|
+
let [p, m] = o(n), h = t !== void 0, g = h ? t : p, _ = e.findIndex((e) => e.props.value === g), v = a(null), [y, b] = o({
|
|
163
338
|
x: 0,
|
|
164
339
|
width: 0
|
|
165
340
|
});
|
|
166
|
-
|
|
167
|
-
let e =
|
|
341
|
+
i(() => {
|
|
342
|
+
let e = v.current;
|
|
168
343
|
if (!e) return;
|
|
169
344
|
let t = () => {
|
|
170
345
|
let t = e.children.item(_);
|
|
@@ -173,7 +348,7 @@ function b({ children: n, value: r, defaultValue: i, onValueChange: c, disabled:
|
|
|
173
348
|
x: t.offsetLeft,
|
|
174
349
|
width: t.offsetWidth
|
|
175
350
|
};
|
|
176
|
-
|
|
351
|
+
b((e) => e.x === n.x && e.width === n.width ? e : n);
|
|
177
352
|
};
|
|
178
353
|
t();
|
|
179
354
|
let n = new ResizeObserver(t);
|
|
@@ -181,46 +356,46 @@ function b({ children: n, value: r, defaultValue: i, onValueChange: c, disabled:
|
|
|
181
356
|
n.disconnect();
|
|
182
357
|
};
|
|
183
358
|
}, [_]);
|
|
184
|
-
let
|
|
185
|
-
"--tintora-toggle-thumb-x": `${
|
|
186
|
-
"--tintora-toggle-thumb-width": `${
|
|
359
|
+
let x = {
|
|
360
|
+
"--tintora-toggle-thumb-x": `${y.x}px`,
|
|
361
|
+
"--tintora-toggle-thumb-width": `${y.width}px`
|
|
187
362
|
};
|
|
188
|
-
return /* @__PURE__ */
|
|
363
|
+
return /* @__PURE__ */ s(E.Provider, {
|
|
189
364
|
value: {
|
|
190
365
|
value: g,
|
|
191
366
|
select: (e) => {
|
|
192
|
-
e !== g && (h || m(e),
|
|
367
|
+
e !== g && (h || m(e), r?.(e));
|
|
193
368
|
},
|
|
194
|
-
disabled:
|
|
369
|
+
disabled: l
|
|
195
370
|
},
|
|
196
|
-
children: /* @__PURE__ */
|
|
371
|
+
children: /* @__PURE__ */ c("div", {
|
|
197
372
|
...f,
|
|
198
373
|
role: "group",
|
|
199
|
-
ref:
|
|
200
|
-
className:
|
|
201
|
-
children: [
|
|
374
|
+
ref: v,
|
|
375
|
+
className: u("tintora-toggle", l && "tintora-toggle--disabled", d),
|
|
376
|
+
children: [e, /* @__PURE__ */ s("span", {
|
|
202
377
|
"aria-hidden": "true",
|
|
203
378
|
className: "tintora-toggle__thumb",
|
|
204
|
-
style:
|
|
379
|
+
style: x
|
|
205
380
|
})]
|
|
206
381
|
})
|
|
207
382
|
});
|
|
208
383
|
}
|
|
209
384
|
//#endregion
|
|
210
385
|
//#region src/Toggle/ToggleItem.tsx
|
|
211
|
-
function
|
|
212
|
-
let
|
|
213
|
-
|
|
386
|
+
function k({ value: e, children: t, className: n, disabled: r, onClick: i, ...a }) {
|
|
387
|
+
let o = D(), c = (t) => {
|
|
388
|
+
i?.(t), t.defaultPrevented || o.select(e);
|
|
214
389
|
};
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
...
|
|
390
|
+
return /* @__PURE__ */ s("button", {
|
|
391
|
+
...a,
|
|
217
392
|
type: "button",
|
|
218
|
-
className:
|
|
219
|
-
"aria-pressed":
|
|
220
|
-
disabled:
|
|
393
|
+
className: u("tintora-toggle__item", n),
|
|
394
|
+
"aria-pressed": o.value === e,
|
|
395
|
+
disabled: r || o.disabled,
|
|
221
396
|
onClick: c,
|
|
222
|
-
children:
|
|
397
|
+
children: t
|
|
223
398
|
});
|
|
224
399
|
}
|
|
225
400
|
//#endregion
|
|
226
|
-
export {
|
|
401
|
+
export { f as Avatar, p as Button, m as Chip, h as Dot, _ as IconButton, v as SearchInput, C as Select, w as Tag, T as TextField, O as Toggle, k as ToggleItem };
|
package/dist/tintora.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:root{--tintora-color-accent:#ee6b25;--tintora-color-accent-deep:#c94e0c;--tintora-color-success:#4cc56b;--tintora-color-planned:#f2698c;--tintora-color-heart:#c42a56;--tintora-color-steps:#1f7a38;--tintora-color-sleep:#2f4fc4;--tintora-color-ink:#1d1c1c;--tintora-color-on-accent:#1d0e04;--tintora-color-on-accent-deep:#fff;--tintora-color-on-success:#0d200f;--tintora-color-on-planned:#260a13;--tintora-color-on-heart:#fff;--tintora-color-on-steps:#fff;--tintora-color-on-sleep:#fff;--tintora-text-on-card-muted:#55524f;--tintora-chip-fg:#3c3a38;--tintora-chip-bg:#efedeb;--tintora-chip-bg-hover:#e4e1de;--tintora-chip-selected-fg:#8f3604;--tintora-chip-selected-bg:#fff;--tintora-tint-accent:#fdeadd;--tintora-tint-heart:#fbe0e8;--tintora-tint-steps:#dcf3e1;--tintora-tint-sleep:#e0e7fb;--tintora-font-family:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--tintora-font-weight-regular:400;--tintora-font-weight-medium:500;--tintora-font-weight-semibold:600;--tintora-font-weight-bold:700;--tintora-font-weight-extrabold:800;--tintora-line-height-tight:1.2;--tintora-font-display:700 1.625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-title:700 1.125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-heading:700 .9375rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-label:700 .78125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-body:500 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-caption:400 .6875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-stat-value:800 1.5625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-radius-8:8px;--tintora-radius-12:12px;--tintora-radius-14:14px;--tintora-radius-16:16px;--tintora-radius-18:18px;--tintora-radius-20:20px;--tintora-radius-26:26px;--tintora-radius-32:32px;--tintora-radius-40:40px;--tintora-radius-pill:9999px;--tintora-radius-card:var(--tintora-radius-20);--tintora-radius-panel:var(--tintora-radius-32);--tintora-shadow-selected:0 14px 30px #c94e0c73;--tintora-shadow-primary:0 8px 20px #c94e0c59;--tintora-shadow-accent:0 8px 20px #ee6b2566;--tintora-shadow-focus-ring:0 0 0 3px #ee6b2547;--tintora-opacity-disabled:.45}:root,[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--tintora-bg:linear-gradient(180deg, #3e3b3a, #222020);--tintora-surface-glass:linear-gradient(180deg, #3e3b3acc, #222020e6);--tintora-surface-card:#fbfaf9;--tintora-surface-row:#ffffff0f;--tintora-surface-field:#100f0f9e;--tintora-surface-menu:#1e1c1cf7;--tintora-text:#fff;--tintora-text-muted:#ffffffb8;--tintora-text-faint:#ffffffa6;--tintora-text-nav-idle:#ffffffc7;--tintora-text-day:#ffffffd1;--tintora-text-error:#ff9a8a;--tintora-border-glass:#ffffff14;--tintora-border-card:transparent;--tintora-border-row:#ffffff0f;--tintora-border-field:#ffffff14;--tintora-border-field-hover:#ffffff52;--tintora-line:#ffffff1a;--tintora-line-strong:#ffffff52;--tintora-fill-subtle:#ffffff1a;--tintora-fill-subtle-hover:#fff3;--tintora-fill-subtle-pressed:#ffffff47;--tintora-fill-ghost-hover:#ffffff1f;--tintora-fill-day-hover:#ffffff24;--tintora-tag-bg:#ffffff24;--tintora-tag-fg:#fff;--tintora-focus:#ee6b25;--tintora-ring:#fff;--tintora-shadow-glass:0 30px 60px #00000059;--tintora-shadow-card:0 10px 24px #0000002e;--tintora-shadow-card-hover:0 18px 36px #00000052}[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:#1d1c1c;--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:#b3261e;--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:#1d1c1c;--tintora-focus:#c94e0c;--tintora-ring:#1d1c1c;--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033}@media (prefers-color-scheme:light){:root:not([data-theme]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:#1d1c1c;--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:#b3261e;--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:#1d1c1c;--tintora-focus:#c94e0c;--tintora-ring:#1d1c1c;--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033}}.tintora-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-chip{border-radius:var(--tintora-radius-12);background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg);font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);cursor:pointer;outline-offset:2px;border:0;outline:none;align-items:center;padding:6px 12px;display:inline-flex}.tintora-chip:enabled:hover:not([aria-pressed=true]){background-color:var(--tintora-chip-bg-hover)}.tintora-chip[aria-pressed=true]{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-chip:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-chip:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-dot{box-sizing:border-box;forced-color-adjust:none;flex-shrink:0;display:inline-block}.tintora-dot--unread{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);width:8px;height:8px}.tintora-dot--read{border-radius:var(--tintora-radius-pill);border:1.5px solid var(--tintora-text-faint);width:8px;height:8px}.tintora-dot--tick{background-color:var(--tintora-color-accent);border-radius:2px;width:3px;height:15px}.tintora-button.tintora-icon-button{--tintora-button-padding-x:0px}.tintora-icon-button{width:var(--tintora-button-height);flex-shrink:0}.tintora-icon-button__icon{display:inline-flex}.tintora-icon-button__icon svg{width:var(--tintora-icon-button-icon-size);height:var(--tintora-icon-button-icon-size)}.tintora-icon-button.tintora-icon-button--small{--tintora-button-height:32px;--tintora-icon-button-icon-size:14px}.tintora-icon-button.tintora-icon-button--medium{--tintora-button-height:36px;--tintora-icon-button-icon-size:15px}.tintora-icon-button.tintora-icon-button--large{--tintora-button-height:44px;--tintora-icon-button-icon-size:18px}.tintora-icon-button.tintora-icon-button--round{--tintora-button-border-radius:var(--tintora-radius-pill)}.tintora-icon-button.tintora-icon-button--field{--tintora-button-height:48px;--tintora-button-border-radius:var(--tintora-radius-pill);--tintora-button-border:1px solid var(--tintora-border-field);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-surface-field);--tintora-button-bg-hover:var(--tintora-surface-field);--tintora-button-bg-pressed:var(--tintora-fill-subtle);--tintora-icon-button-icon-size:18px}.tintora-icon-button--field:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-icon-button--field:enabled:active{border-color:var(--tintora-border-field)}.tintora-icon-button.tintora-icon-button--nav{--tintora-button-height:44px;--tintora-button-border-radius:var(--tintora-radius-14);--tintora-button-fg:var(--tintora-text-nav-idle);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-ghost-hover);--tintora-icon-button-icon-size:20px}.tintora-icon-button.tintora-icon-button--nav[aria-current=page]{--tintora-button-fg:#fff;--tintora-button-fg-hover:#fff;--tintora-button-fg-pressed:#fff;--tintora-button-bg:var(--tintora-color-accent);--tintora-button-bg-hover:var(--tintora-color-accent);--tintora-button-bg-pressed:var(--tintora-color-accent);--tintora-button-shadow:var(--tintora-shadow-accent)}.tintora-search-input{--tintora-search-input-font-size:.8125rem;--tintora-search-input-clear-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-pill);height:48px;color:var(--tintora-text-muted);background-color:var(--tintora-surface-field);align-items:center;gap:10px;padding:0 18px;display:flex}.tintora-search-input--disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-search-input__icon{flex-shrink:0;width:16px;height:16px}.tintora-search-input__input{min-width:0;font-family:inherit;font-size:var(--tintora-search-input-font-size);color:var(--tintora-text);background:0 0;border:0;outline:0;flex:1;padding:0}.tintora-search-input__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-search-input__input:disabled{cursor:not-allowed}.tintora-search-input__input::-webkit-search-decoration{display:none}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input:not(.tintora-search-input--disabled):hover{border-color:var(--tintora-border-field-hover)}.tintora-search-input:focus-within{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input__input::-webkit-search-cancel-button:hover{background-color:var(--tintora-focus)}.tintora-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-on-accent:#1d0e04;--tintora-color-on-accent-deep:#fff;--tintora-color-on-success:#0d200f;--tintora-color-on-planned:#260a13;--tintora-color-on-heart:#fff;--tintora-color-on-steps:#fff;--tintora-color-on-sleep:#fff;--tintora-text-on-card-muted:#55524f;--tintora-chip-fg:#3c3a38;--tintora-chip-bg:#efedeb;--tintora-chip-bg-hover:#e4e1de;--tintora-chip-selected-fg:#8f3604;--tintora-chip-selected-bg:#fff;--tintora-tint-accent:#fdeadd;--tintora-tint-heart:#fbe0e8;--tintora-tint-steps:#dcf3e1;--tintora-tint-sleep:#e0e7fb;--tintora-menu-bg:#fff;--tintora-menu-border:#1d1c1c1a;--tintora-menu-shadow:0 16px 32px #00000038;--tintora-menu-item-hover:#1d1c1c12;--tintora-menu-item-destructive:#b3261e;--tintora-font-family:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;--tintora-font-weight-regular:400;--tintora-font-weight-medium:500;--tintora-font-weight-semibold:600;--tintora-font-weight-bold:700;--tintora-font-weight-extrabold:800;--tintora-line-height-tight:1.2;--tintora-font-display:700 1.625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-title:700 1.125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-heading:700 .9375rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-label:700 .78125rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-body:500 .75rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-caption:400 .6875rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-font-stat-value:800 1.5625rem/var(--tintora-line-height-tight) var(--tintora-font-family);--tintora-radius-8:8px;--tintora-radius-12:12px;--tintora-radius-14:14px;--tintora-radius-16:16px;--tintora-radius-18:18px;--tintora-radius-20:20px;--tintora-radius-26:26px;--tintora-radius-32:32px;--tintora-radius-40:40px;--tintora-radius-pill:9999px;--tintora-radius-card:var(--tintora-radius-20);--tintora-radius-panel:var(--tintora-radius-32);--tintora-shadow-selected:0 14px 30px #c94e0c73;--tintora-shadow-primary:0 8px 20px #c94e0c59;--tintora-shadow-accent:0 8px 20px #ee6b2566;--tintora-shadow-focus-ring:0 0 0 3px #ee6b2547;--tintora-opacity-disabled:.45}:root,[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--tintora-bg:linear-gradient(180deg, #3e3b3a, #222020);--tintora-surface-glass:linear-gradient(180deg, #3e3b3acc, #222020e6);--tintora-surface-card:#fbfaf9;--tintora-surface-row:#ffffff0f;--tintora-surface-field:#100f0f9e;--tintora-surface-menu:#1e1c1cf7;--tintora-text:#fff;--tintora-text-muted:#ffffffb8;--tintora-text-faint:#ffffffa6;--tintora-text-nav-idle:#ffffffc7;--tintora-text-day:#ffffffd1;--tintora-text-error:#ff9a8a;--tintora-border-glass:#ffffff14;--tintora-border-card:transparent;--tintora-border-row:#ffffff0f;--tintora-border-field:#ffffff14;--tintora-border-field-hover:#ffffff52;--tintora-line:#ffffff1a;--tintora-line-strong:#ffffff52;--tintora-fill-subtle:#ffffff1a;--tintora-fill-subtle-hover:#fff3;--tintora-fill-subtle-pressed:#ffffff47;--tintora-fill-ghost-hover:#ffffff1f;--tintora-fill-day-hover:#ffffff24;--tintora-tag-bg:#ffffff24;--tintora-tag-fg:#fff;--tintora-focus:#ee6b25;--tintora-ring:#fff;--tintora-shadow-glass:0 30px 60px #00000059;--tintora-shadow-card:0 10px 24px #0000002e;--tintora-shadow-card-hover:0 18px 36px #00000052}[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:#1d1c1c;--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:#b3261e;--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:#1d1c1c;--tintora-focus:#c94e0c;--tintora-ring:#1d1c1c;--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033}@media (prefers-color-scheme:light){:root:not([data-theme]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--tintora-bg:linear-gradient(180deg, #fcfaf7, #f2ebe4);--tintora-surface-glass:linear-gradient(180deg, #ffffffb3, #ffffff80);--tintora-surface-card:#fff;--tintora-surface-row:#ffffffd9;--tintora-surface-field:#ffffffd9;--tintora-surface-menu:#2a2827;--tintora-text:#1d1c1c;--tintora-text-muted:#5a5754;--tintora-text-faint:#5a5754;--tintora-text-nav-idle:#4a4745;--tintora-text-day:#2b2927;--tintora-text-error:#b3261e;--tintora-border-glass:#ffffffd9;--tintora-border-card:#1d1c1c0d;--tintora-border-row:#1d1c1c0f;--tintora-border-field:#1d1c1c14;--tintora-border-field-hover:#1d1c1c4d;--tintora-line:#1d1c1c1a;--tintora-line-strong:#1d1c1c4d;--tintora-fill-subtle:#1d1c1c12;--tintora-fill-subtle-hover:#1d1c1c24;--tintora-fill-subtle-pressed:#1d1c1c33;--tintora-fill-ghost-hover:#1d1c1c14;--tintora-fill-day-hover:#1d1c1c1a;--tintora-tag-bg:#1d1c1c12;--tintora-tag-fg:#1d1c1c;--tintora-focus:#c94e0c;--tintora-ring:#1d1c1c;--tintora-shadow-glass:0 30px 60px #60402024;--tintora-shadow-card:0 10px 24px #6040201a;--tintora-shadow-card-hover:0 18px 36px #60402033}}.tintora-avatar{border-radius:var(--tintora-radius-pill);color:var(--tintora-color-ink);font:var(--tintora-font-body);font-size:var(--tintora-avatar-font-size);font-weight:var(--tintora-font-weight-bold);background:linear-gradient(135deg,#f1d9bf,#c9a07a);flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tintora-avatar>img{object-fit:cover;width:100%;height:100%}.tintora-avatar--small{--tintora-avatar-font-size:.6875rem;width:32px;height:32px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--medium{--tintora-avatar-font-size:.8125rem;width:40px;height:40px;font-weight:var(--tintora-font-weight-bold)}.tintora-avatar--large{--tintora-avatar-font-size:.875rem;width:44px;height:44px;font-weight:var(--tintora-font-weight-bold)}.tintora-button{--tintora-button-border:1px solid transparent;box-sizing:border-box;cursor:pointer;outline-offset:2px;height:var(--tintora-button-height);padding:0 var(--tintora-button-padding-x);border:var(--tintora-button-border);border-radius:var(--tintora-button-border-radius);font-family:inherit;font-size:var(--tintora-button-font-size);font-weight:var(--tintora-button-font-weight);color:var(--tintora-button-fg);background-color:var(--tintora-button-bg);box-shadow:var(--tintora-button-shadow,none);outline:none;justify-content:center;align-items:center;gap:8px;display:inline-flex}.tintora-button--small{--tintora-button-height:32px;--tintora-button-padding-x:14px;--tintora-button-border-radius:16px;--tintora-button-font-size:12px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--medium{--tintora-button-height:40px;--tintora-button-padding-x:18px;--tintora-button-border-radius:20px;--tintora-button-font-size:13px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button--large{--tintora-button-height:48px;--tintora-button-padding-x:24px;--tintora-button-border-radius:24px;--tintora-button-font-size:14px;--tintora-button-font-weight:var(--tintora-font-weight-bold)}.tintora-button__icon{flex-shrink:0;display:inline-flex}.tintora-button--leading-icon{padding-inline-start:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--trailing-icon{padding-inline-end:calc(var(--tintora-button-padding-x) - 4px)}.tintora-button--primary{--tintora-button-fg:var(--tintora-color-on-accent-deep);--tintora-button-bg:var(--tintora-color-accent-deep);--tintora-button-shadow:var(--tintora-shadow-primary);--tintora-button-filter-hover:brightness(1.14);--tintora-button-filter-pressed:brightness(.9)}.tintora-button--secondary{--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-fill-subtle);--tintora-button-bg-hover:var(--tintora-fill-subtle-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle-pressed)}.tintora-button--outline{--tintora-button-border:1px solid var(--tintora-line-strong);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button--ghost{--tintora-button-fg:var(--tintora-text-muted);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-subtle)}.tintora-button:enabled:hover{color:var(--tintora-button-fg-hover,var(--tintora-button-fg));background-color:var(--tintora-button-bg-hover,var(--tintora-button-bg));filter:var(--tintora-button-filter-hover,none)}.tintora-button:enabled:active{color:var(--tintora-button-fg-pressed,var(--tintora-button-fg));background-color:var(--tintora-button-bg-pressed,var(--tintora-button-bg));filter:var(--tintora-button-filter-pressed,none);transform:translateY(1px)}.tintora-button:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-button:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed;box-shadow:none}.tintora-chip{border-radius:var(--tintora-radius-12);background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg);font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);cursor:pointer;outline-offset:2px;border:0;outline:none;align-items:center;padding:6px 12px;display:inline-flex}.tintora-chip:enabled:hover:not([aria-pressed=true]){background-color:var(--tintora-chip-bg-hover)}.tintora-chip[aria-pressed=true]{background-color:var(--tintora-chip-selected-bg);color:var(--tintora-chip-selected-fg);font-weight:var(--tintora-font-weight-bold)}.tintora-chip:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-chip:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-dot{box-sizing:border-box;forced-color-adjust:none;flex-shrink:0;display:inline-block}.tintora-dot--unread{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);width:8px;height:8px}.tintora-dot--read{border-radius:var(--tintora-radius-pill);border:1.5px solid var(--tintora-text-faint);width:8px;height:8px}.tintora-dot--tick{background-color:var(--tintora-color-accent);border-radius:2px;width:3px;height:15px}.tintora-button.tintora-icon-button{--tintora-button-padding-x:0px}.tintora-icon-button{width:var(--tintora-button-height);flex-shrink:0}.tintora-icon-button__icon{display:inline-flex}.tintora-icon-button__icon svg{width:var(--tintora-icon-button-icon-size);height:var(--tintora-icon-button-icon-size)}.tintora-icon-button.tintora-icon-button--small{--tintora-button-height:32px;--tintora-icon-button-icon-size:14px}.tintora-icon-button.tintora-icon-button--medium{--tintora-button-height:36px;--tintora-icon-button-icon-size:15px}.tintora-icon-button.tintora-icon-button--large{--tintora-button-height:44px;--tintora-icon-button-icon-size:18px}.tintora-icon-button.tintora-icon-button--round{--tintora-button-border-radius:var(--tintora-radius-pill)}.tintora-icon-button.tintora-icon-button--field{--tintora-button-height:48px;--tintora-button-border-radius:var(--tintora-radius-pill);--tintora-button-border:1px solid var(--tintora-border-field);--tintora-button-fg:var(--tintora-text);--tintora-button-bg:var(--tintora-surface-field);--tintora-button-bg-hover:var(--tintora-surface-field);--tintora-button-bg-pressed:var(--tintora-fill-subtle);--tintora-icon-button-icon-size:18px}.tintora-icon-button--field:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-icon-button--field:enabled:active{border-color:var(--tintora-border-field)}.tintora-icon-button.tintora-icon-button--nav{--tintora-button-height:44px;--tintora-button-border-radius:var(--tintora-radius-14);--tintora-button-fg:var(--tintora-text-nav-idle);--tintora-button-fg-hover:var(--tintora-text);--tintora-button-fg-pressed:var(--tintora-text);--tintora-button-bg:transparent;--tintora-button-bg-hover:var(--tintora-fill-ghost-hover);--tintora-button-bg-pressed:var(--tintora-fill-ghost-hover);--tintora-icon-button-icon-size:20px}.tintora-icon-button.tintora-icon-button--nav[aria-current=page]{--tintora-button-fg:#fff;--tintora-button-fg-hover:#fff;--tintora-button-fg-pressed:#fff;--tintora-button-bg:var(--tintora-color-accent);--tintora-button-bg-hover:var(--tintora-color-accent);--tintora-button-bg-pressed:var(--tintora-color-accent);--tintora-button-shadow:var(--tintora-shadow-accent)}.tintora-search-input{--tintora-search-input-font-size:.8125rem;--tintora-search-input-clear-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-pill);height:48px;color:var(--tintora-text-muted);background-color:var(--tintora-surface-field);align-items:center;gap:10px;padding:0 18px;display:flex}.tintora-search-input--disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-search-input__icon{flex-shrink:0;width:16px;height:16px}.tintora-search-input__input{min-width:0;font-family:inherit;font-size:var(--tintora-search-input-font-size);color:var(--tintora-text);background:0 0;border:0;outline:0;flex:1;padding:0}.tintora-search-input__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-search-input__input:disabled{cursor:not-allowed}.tintora-search-input__input::-webkit-search-decoration{display:none}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input:not(.tintora-search-input--disabled):hover{border-color:var(--tintora-border-field-hover)}.tintora-search-input:focus-within{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-search-input__input::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--tintora-text-muted);width:16px;height:16px;-webkit-mask:var(--tintora-search-input-clear-icon) center / contain no-repeat;mask:var(--tintora-search-input-clear-icon) center / contain no-repeat}.tintora-search-input__input::-webkit-search-cancel-button:hover{background-color:var(--tintora-focus)}.tintora-select{--tintora-select-font-size:.71875rem;display:inline-block;position:relative}.tintora-select__trigger{box-sizing:border-box;border-radius:var(--tintora-radius-14);height:28px;font-family:inherit;font-size:var(--tintora-select-font-size);font-weight:var(--tintora-font-weight-medium);color:var(--tintora-chip-fg);background-color:var(--tintora-chip-bg);cursor:pointer;border:0;align-items:center;gap:6px;padding:0 12px;display:inline-flex}.tintora-select__trigger:enabled:hover,.tintora-select__trigger[aria-expanded=true]{background-color:var(--tintora-chip-bg-hover)}.tintora-select__trigger:focus-visible{box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-select__trigger:disabled{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}.tintora-select__value--placeholder{color:var(--tintora-text-on-card-muted)}.tintora-select__chevron{flex-shrink:0}.tintora-select__trigger[aria-expanded=true] .tintora-select__chevron{transform:rotate(180deg)}.tintora-select__menu{box-sizing:border-box;border:1px solid var(--tintora-menu-border);border-radius:var(--tintora-radius-14);max-height:50vh;color:var(--tintora-color-ink);background:var(--tintora-menu-bg);box-shadow:var(--tintora-menu-shadow);flex-direction:column;gap:2px;margin:0;padding:6px;display:flex;inset:auto;overflow-y:auto}.tintora-select__option{box-sizing:border-box;border-radius:var(--tintora-radius-12);min-height:32px;font:var(--tintora-font-body);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;padding:0 10px;display:flex}.tintora-select__option--active{background:var(--tintora-menu-item-hover)}.tintora-select__option[aria-selected=true]{font-weight:var(--tintora-font-weight-bold);color:var(--tintora-color-accent-deep);background:var(--tintora-tint-accent)}.tintora-select__option[aria-disabled=true]{opacity:var(--tintora-opacity-disabled);cursor:not-allowed}@media (pointer:coarse){.tintora-select__option{min-height:44px}}@media (forced-colors:active){.tintora-select__option--active{outline-offset:-2px;outline:2px solid highlight}}.tintora-tag{white-space:nowrap;font:var(--tintora-font-caption);font-weight:var(--tintora-font-weight-semibold);display:inline-block}.tintora-tag--neutral{background-color:var(--tintora-tag-bg);color:var(--tintora-tag-fg)}.tintora-tag--success{background-color:var(--tintora-color-success);color:var(--tintora-color-on-success)}.tintora-tag--accent{background-color:var(--tintora-color-accent-deep);color:var(--tintora-color-on-accent-deep);font-weight:var(--tintora-font-weight-bold)}.tintora-tag--card{background-color:var(--tintora-chip-bg);color:var(--tintora-chip-fg)}.tintora-tag--small{border-radius:var(--tintora-radius-8);padding:2px 8px}.tintora-tag--medium{border-radius:var(--tintora-radius-8);padding:3px 9px}.tintora-tag--large{border-radius:var(--tintora-radius-12);padding:5px 12px}.tintora-textfield{--tintora-textfield-font-size:.8125rem;flex-direction:column;gap:8px;display:inline-flex}.tintora-textfield--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-textfield__label{font:var(--tintora-font-body);font-weight:var(--tintora-font-weight-semibold);color:var(--tintora-text)}.tintora-textfield__input{box-sizing:border-box;border:1px solid var(--tintora-border-field);border-radius:var(--tintora-radius-16);height:48px;font-family:inherit;font-size:var(--tintora-textfield-font-size);color:var(--tintora-text);background-color:var(--tintora-surface-field);padding:0 16px}.tintora-textfield__input::placeholder{color:var(--tintora-text-muted);opacity:1}.tintora-textfield__input:enabled:hover{border-color:var(--tintora-border-field-hover)}.tintora-textfield__input:focus-visible{border-color:var(--tintora-focus);box-shadow:var(--tintora-shadow-focus-ring);outline-offset:2px;outline:2px solid #0000}.tintora-textfield__input[aria-invalid=true]{border-color:var(--tintora-text-error)}.tintora-textfield__input:disabled{cursor:not-allowed}.tintora-textfield__hint{font:var(--tintora-font-caption);color:var(--tintora-text-faint)}.tintora-textfield__hint--error{color:var(--tintora-text-error)}.tintora-toggle{border-radius:var(--tintora-radius-pill);background-color:var(--tintora-fill-subtle);gap:4px;padding:5px;display:inline-flex;position:relative}.tintora-toggle--disabled{opacity:var(--tintora-opacity-disabled)}.tintora-toggle__item{box-sizing:border-box;border-radius:var(--tintora-radius-pill);min-width:34px;height:34px;color:var(--tintora-text-nav-idle);font:var(--tintora-font-label);cursor:pointer;outline-offset:2px;z-index:1;background:0 0;border:0;outline:none;justify-content:center;align-items:center;padding:0 8px;transition:color .2s;display:inline-flex}.tintora-toggle__item[aria-pressed=true]{color:#fff}.tintora-toggle__thumb{width:var(--tintora-toggle-thumb-width);border-radius:var(--tintora-radius-pill);background-color:var(--tintora-color-accent);transform:translateX(var(--tintora-toggle-thumb-x));pointer-events:none;transition:transform .2s;position:absolute;inset-block:5px;inset-inline-start:0}@media (prefers-reduced-motion:reduce){.tintora-toggle__thumb,.tintora-toggle__item{transition:none}}.tintora-toggle__item:focus-visible{outline:2px solid var(--tintora-focus)}.tintora-toggle__item:disabled{cursor:not-allowed}.tintora-toggle:not(.tintora-toggle--disabled) .tintora-toggle__item:disabled{opacity:var(--tintora-opacity-disabled)}
|
|
2
2
|
/*$vite$:1*/
|