@stoa-dev/kit 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +2 -2
  2. package/dist/i18n/locales/at.json.js +9 -3
  3. package/dist/i18n/locales/at.json.js.map +1 -1
  4. package/dist/i18n/locales/de.json.js +12 -6
  5. package/dist/i18n/locales/de.json.js.map +1 -1
  6. package/dist/i18n/locales/en.json.js +16 -10
  7. package/dist/i18n/locales/en.json.js.map +1 -1
  8. package/dist/i18n/locales/it.json.js +9 -3
  9. package/dist/i18n/locales/it.json.js.map +1 -1
  10. package/dist/kit.css +1 -1
  11. package/dist/shell/ScrollToTop/index.js +80 -0
  12. package/dist/shell/ScrollToTop/index.js.map +1 -0
  13. package/dist/shell/index.js +34 -32
  14. package/dist/shell/index.js.map +1 -1
  15. package/dist/types/i18n/index.d.ts +128 -0
  16. package/dist/types/i18n/index.d.ts.map +1 -1
  17. package/dist/types/shell/ScrollToTop/index.d.ts +17 -0
  18. package/dist/types/shell/ScrollToTop/index.d.ts.map +1 -0
  19. package/dist/types/shell/index.d.ts +1 -0
  20. package/dist/types/shell/index.d.ts.map +1 -1
  21. package/dist/types/ui/audio-player/index.d.ts +30 -0
  22. package/dist/types/ui/audio-player/index.d.ts.map +1 -0
  23. package/dist/types/ui/combobox/index.d.ts +41 -0
  24. package/dist/types/ui/combobox/index.d.ts.map +1 -0
  25. package/dist/types/ui/file-viewer/index.d.ts +31 -0
  26. package/dist/types/ui/file-viewer/index.d.ts.map +1 -0
  27. package/dist/types/ui/index.d.ts +3 -0
  28. package/dist/types/ui/index.d.ts.map +1 -1
  29. package/dist/types/ui/input/index.d.ts.map +1 -1
  30. package/dist/ui/audio-player/AudioPlayer.module.scss.js +60 -0
  31. package/dist/ui/audio-player/AudioPlayer.module.scss.js.map +1 -0
  32. package/dist/ui/audio-player/index.js +323 -0
  33. package/dist/ui/audio-player/index.js.map +1 -0
  34. package/dist/ui/combobox/index.js +178 -0
  35. package/dist/ui/combobox/index.js.map +1 -0
  36. package/dist/ui/file-viewer/FileViewer.module.scss.js +56 -0
  37. package/dist/ui/file-viewer/FileViewer.module.scss.js.map +1 -0
  38. package/dist/ui/file-viewer/index.js +251 -0
  39. package/dist/ui/file-viewer/index.js.map +1 -0
  40. package/dist/ui/index.js +124 -115
  41. package/dist/ui/index.js.map +1 -1
  42. package/dist/ui/input/index.js +22 -21
  43. package/dist/ui/input/index.js.map +1 -1
  44. package/dist/ui/textarea/index.js +1 -1
  45. package/dist/ui/textarea/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/styles/instrument.css +40 -2
@@ -1,37 +1,37 @@
1
- import { jsx as o, jsxs as g, Fragment as P } from "react/jsx-runtime";
2
- import { useId as j, useState as k, useRef as N, useEffect as S } from "react";
3
- import { cn as B } from "../../utils/cn.js";
1
+ import { jsx as o, jsxs as g, Fragment as j } from "react/jsx-runtime";
2
+ import { useId as k, useState as N, useRef as S, useEffect as B } from "react";
3
+ import { cn as F } from "../../utils/cn.js";
4
4
  function M({
5
5
  className: p,
6
6
  type: w,
7
7
  label: i,
8
8
  icon: t,
9
9
  transitionStyle: v = "default",
10
- suggestions: d,
10
+ suggestions: s,
11
11
  list: l,
12
12
  placeholder: n,
13
13
  "aria-label": x,
14
14
  onFocus: b,
15
15
  onBlur: T,
16
- ...y
16
+ ...P
17
17
  }) {
18
- const c = j(), u = l === void 0 && !!d?.length, [r, a] = k({
18
+ const c = k(), u = l === void 0 && !!s?.length, [r, a] = N({
19
19
  focused: !1,
20
20
  showingPlaceholder: !1
21
- }), s = N(void 0);
22
- S(() => () => window.clearTimeout(s.current), []);
21
+ }), d = S(void 0);
22
+ B(() => () => window.clearTimeout(d.current), []);
23
23
  function f(e) {
24
- window.clearTimeout(s.current);
25
- const { showingPlaceholder: h } = r;
26
- if (!i || !n || e === h || window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
24
+ window.clearTimeout(d.current);
25
+ const { showingPlaceholder: m } = r;
26
+ if (!i || !n || e === m || window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
27
27
  a({ focused: e, showingPlaceholder: e });
28
28
  return;
29
29
  }
30
- a({ focused: e, showingPlaceholder: h }), s.current = window.setTimeout(() => {
30
+ a({ focused: e, showingPlaceholder: m }), d.current = window.setTimeout(() => {
31
31
  a({ focused: e, showingPlaceholder: e });
32
32
  }, 90);
33
33
  }
34
- const I = i && (n ? r.focused !== r.showingPlaceholder : r.focused), m = /* @__PURE__ */ o(
34
+ const y = i && (n ? r.focused !== r.showingPlaceholder : r.focused), I = !i || r.showingPlaceholder && n, h = /* @__PURE__ */ o(
35
35
  "input",
36
36
  {
37
37
  type: w,
@@ -39,9 +39,10 @@ function M({
39
39
  "data-slot": "input",
40
40
  "data-transition-style": v,
41
41
  "data-has-icon": t ? "" : void 0,
42
- "data-inline-label": i ? I ? "hidden" : "visible" : void 0,
43
- className: B(
44
- "h-12 w-full min-w-0 rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:font-semibold placeholder:text-foreground/75 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
42
+ "data-inline-label": i ? y ? "hidden" : "visible" : void 0,
43
+ "data-placeholder-role": I ? "hint" : "label",
44
+ className: F(
45
+ "h-12 w-full min-w-0 rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:font-semibold placeholder:text-muted-foreground data-[placeholder-role=label]:placeholder:text-foreground/75 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
45
46
  t && "peer pr-10",
46
47
  p
47
48
  ),
@@ -53,12 +54,12 @@ function M({
53
54
  onBlur: (e) => {
54
55
  f(!1), T?.(e);
55
56
  },
56
- ...y
57
+ ...P
57
58
  }
58
59
  );
59
- return /* @__PURE__ */ g(P, { children: [
60
+ return /* @__PURE__ */ g(j, { children: [
60
61
  t ? /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center", children: [
61
- m,
62
+ h,
62
63
  /* @__PURE__ */ o(
63
64
  "span",
64
65
  {
@@ -68,8 +69,8 @@ function M({
68
69
  children: t
69
70
  }
70
71
  )
71
- ] }) : m,
72
- u && /* @__PURE__ */ o("datalist", { id: c, children: Array.from(new Set(d), (e) => /* @__PURE__ */ o("option", { value: e }, e)) })
72
+ ] }) : h,
73
+ u && /* @__PURE__ */ o("datalist", { id: c, children: Array.from(new Set(s), (e) => /* @__PURE__ */ o("option", { value: e }, e)) })
73
74
  ] });
74
75
  }
75
76
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/ui/input/index.tsx"],"sourcesContent":["import {\n\ttype ComponentProps,\n\ttype ReactNode,\n\tuseEffect,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from 'react'\n\nimport { cn } from '../../utils/cn'\n\ntype InputProps = ComponentProps<'input'> & {\n\t/** Accessible field name shown inside the empty input until focus. */\n\tlabel?: string\n\t/** Decorative icon shown inside the right edge of the input. */\n\ticon?: ReactNode\n\t/** Transition used for hover and focus. */\n\ttransitionStyle?: 'default' | 'fancy'\n\t/** Suggested values offered by the native input picker. */\n\tsuggestions?: readonly string[]\n}\n\nfunction Input({\n\tclassName,\n\ttype,\n\tlabel,\n\ticon,\n\ttransitionStyle = 'default',\n\tsuggestions,\n\tlist,\n\tplaceholder,\n\t'aria-label': ariaLabel,\n\tonFocus,\n\tonBlur,\n\t...props\n}: InputProps) {\n\tconst suggestionsId = useId()\n\tconst hasSuggestions = list === undefined && Boolean(suggestions?.length)\n\tconst [inlineText, setInlineText] = useState({\n\t\tfocused: false,\n\t\tshowingPlaceholder: false,\n\t})\n\tconst swapTimer = useRef<number | undefined>(undefined)\n\n\tuseEffect(() => () => window.clearTimeout(swapTimer.current), [])\n\n\tfunction updateInlineText(focused: boolean) {\n\t\twindow.clearTimeout(swapTimer.current)\n\t\tconst { showingPlaceholder } = inlineText\n\t\tif (\n\t\t\t!label ||\n\t\t\t!placeholder ||\n\t\t\tfocused === showingPlaceholder ||\n\t\t\twindow.matchMedia('(prefers-reduced-motion: reduce)').matches\n\t\t) {\n\t\t\tsetInlineText({ focused, showingPlaceholder: focused })\n\t\t\treturn\n\t\t}\n\n\t\tsetInlineText({ focused, showingPlaceholder })\n\t\t// Leave enough time for the outgoing text to fade before swapping it.\n\t\tswapTimer.current = window.setTimeout(() => {\n\t\t\tsetInlineText({ focused, showingPlaceholder: focused })\n\t\t}, 90)\n\t}\n\n\tconst hideInlineText =\n\t\tlabel &&\n\t\t(placeholder\n\t\t\t? inlineText.focused !== inlineText.showingPlaceholder\n\t\t\t: inlineText.focused)\n\n\tconst input = (\n\t\t<input\n\t\t\ttype={type}\n\t\t\tlist={hasSuggestions ? suggestionsId : list}\n\t\t\tdata-slot='input'\n\t\t\tdata-transition-style={transitionStyle}\n\t\t\tdata-has-icon={icon ? '' : undefined}\n\t\t\tdata-inline-label={\n\t\t\t\tlabel ? (hideInlineText ? 'hidden' : 'visible') : undefined\n\t\t\t}\n\t\t\tclassName={cn(\n\t\t\t\t'h-12 w-full min-w-0 rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:font-semibold placeholder:text-foreground/75 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n\t\t\t\ticon && 'peer pr-10',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\taria-label={ariaLabel ?? label}\n\t\t\tplaceholder={\n\t\t\t\tinlineText.showingPlaceholder && placeholder\n\t\t\t\t\t? placeholder\n\t\t\t\t\t: label || placeholder\n\t\t\t}\n\t\t\tonFocus={(event) => {\n\t\t\t\tupdateInlineText(true)\n\t\t\t\tonFocus?.(event)\n\t\t\t}}\n\t\t\tonBlur={(event) => {\n\t\t\t\tupdateInlineText(false)\n\t\t\t\tonBlur?.(event)\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t)\n\n\tconst field = icon ? (\n\t\t<div className='flex min-w-0 items-center'>\n\t\t\t{input}\n\t\t\t<span\n\t\t\t\taria-hidden='true'\n\t\t\t\tdata-slot='input-icon'\n\t\t\t\tclassName='pointer-events-none -ml-10 flex w-10 shrink-0 items-center justify-center text-foreground/75 peer-disabled:opacity-50 [&>svg]:size-[1.125rem]'\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t</div>\n\t) : (\n\t\tinput\n\t)\n\n\treturn (\n\t\t<>\n\t\t\t{field}\n\t\t\t{hasSuggestions && (\n\t\t\t\t<datalist id={suggestionsId}>\n\t\t\t\t\t{Array.from(new Set(suggestions), (value) => (\n\t\t\t\t\t\t<option key={value} value={value} />\n\t\t\t\t\t))}\n\t\t\t\t</datalist>\n\t\t\t)}\n\t\t</>\n\t)\n}\n\nexport { Input, type InputProps }\n"],"names":["Input","className","type","label","icon","transitionStyle","suggestions","list","placeholder","ariaLabel","onFocus","onBlur","props","suggestionsId","useId","hasSuggestions","inlineText","setInlineText","useState","swapTimer","useRef","useEffect","updateInlineText","focused","showingPlaceholder","hideInlineText","input","jsx","cn","event","j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qBACCD,IAASsB,IAAiB,WAAW,YAAa;AAAA,MAEnD,WAAWG;AAAA,QACV;AAAA,QACAxB,KAAQ;AAAA,QACRH;AAAA,MAAA;AAAA,MAED,cAAYQ,KAAaN;AAAA,MACzB,aACCa,EAAW,sBAAsBR,IAC9BA,IACAL,KAASK;AAAA,MAEb,SAAS,CAACqB,MAAU;AACnB,QAAAP,EAAiB,EAAI,GACrBZ,IAAUmB,CAAK;AAAA,MAChB;AAAA,MACA,QAAQ,CAACA,MAAU;AAClB,QAAAP,EAAiB,EAAK,GACtBX,IAASkB,CAAK;AAAA,MACf;AAAA,MACC,GAAGjB;AAAA,IAAA;AAAA,EAAA;AAmBN,SACC,gBAAAkB,EAAAC,GAAA,EACE,UAAA;AAAA,IAjBW3B,IACb,gBAAA0B,EAAC,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,MAAAJ;AAAA,MACD,gBAAAC;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,eAAY;AAAA,UACZ,aAAU;AAAA,UACV,WAAU;AAAA,UAET,UAAAvB;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,EAAA,CACD,IAEAsB;AAAA,IAMEX,KACA,gBAAAY,EAAC,YAAA,EAAS,IAAId,GACZ,UAAA,MAAM,KAAK,IAAI,IAAIP,CAAW,GAAG,CAAC0B,MAClC,gBAAAL,EAAC,YAAmB,OAAAK,EAAA,GAAPA,CAAqB,CAClC,EAAA,CACF;AAAA,EAAA,GAEF;AAEF;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/input/index.tsx"],"sourcesContent":["import {\n\ttype ComponentProps,\n\ttype ReactNode,\n\tuseEffect,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from 'react'\n\nimport { cn } from '../../utils/cn'\n\ntype InputProps = ComponentProps<'input'> & {\n\t/** Accessible field name shown inside the empty input until focus. */\n\tlabel?: string\n\t/** Decorative icon shown inside the right edge of the input. */\n\ticon?: ReactNode\n\t/** Transition used for hover and focus. */\n\ttransitionStyle?: 'default' | 'fancy'\n\t/** Suggested values offered by the native input picker. */\n\tsuggestions?: readonly string[]\n}\n\nfunction Input({\n\tclassName,\n\ttype,\n\tlabel,\n\ticon,\n\ttransitionStyle = 'default',\n\tsuggestions,\n\tlist,\n\tplaceholder,\n\t'aria-label': ariaLabel,\n\tonFocus,\n\tonBlur,\n\t...props\n}: InputProps) {\n\tconst suggestionsId = useId()\n\tconst hasSuggestions = list === undefined && Boolean(suggestions?.length)\n\tconst [inlineText, setInlineText] = useState({\n\t\tfocused: false,\n\t\tshowingPlaceholder: false,\n\t})\n\tconst swapTimer = useRef<number | undefined>(undefined)\n\n\tuseEffect(() => () => window.clearTimeout(swapTimer.current), [])\n\n\tfunction updateInlineText(focused: boolean) {\n\t\twindow.clearTimeout(swapTimer.current)\n\t\tconst { showingPlaceholder } = inlineText\n\t\tif (\n\t\t\t!label ||\n\t\t\t!placeholder ||\n\t\t\tfocused === showingPlaceholder ||\n\t\t\twindow.matchMedia('(prefers-reduced-motion: reduce)').matches\n\t\t) {\n\t\t\tsetInlineText({ focused, showingPlaceholder: focused })\n\t\t\treturn\n\t\t}\n\n\t\tsetInlineText({ focused, showingPlaceholder })\n\t\t// Leave enough time for the outgoing text to fade before swapping it.\n\t\tswapTimer.current = window.setTimeout(() => {\n\t\t\tsetInlineText({ focused, showingPlaceholder: focused })\n\t\t}, 90)\n\t}\n\n\tconst hideInlineText =\n\t\tlabel &&\n\t\t(placeholder\n\t\t\t? inlineText.focused !== inlineText.showingPlaceholder\n\t\t\t: inlineText.focused)\n\n\tconst showsHint = !label || (inlineText.showingPlaceholder && placeholder)\n\n\tconst input = (\n\t\t<input\n\t\t\ttype={type}\n\t\t\tlist={hasSuggestions ? suggestionsId : list}\n\t\t\tdata-slot='input'\n\t\t\tdata-transition-style={transitionStyle}\n\t\t\tdata-has-icon={icon ? '' : undefined}\n\t\t\tdata-inline-label={\n\t\t\t\tlabel ? (hideInlineText ? 'hidden' : 'visible') : undefined\n\t\t\t}\n\t\t\t// The placeholder carries either a hint (grey) or the inline label (dark).\n\t\t\tdata-placeholder-role={showsHint ? 'hint' : 'label'}\n\t\t\tclassName={cn(\n\t\t\t\t'h-12 w-full min-w-0 rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:font-semibold placeholder:text-muted-foreground data-[placeholder-role=label]:placeholder:text-foreground/75 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n\t\t\t\ticon && 'peer pr-10',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\taria-label={ariaLabel ?? label}\n\t\t\tplaceholder={\n\t\t\t\tinlineText.showingPlaceholder && placeholder\n\t\t\t\t\t? placeholder\n\t\t\t\t\t: label || placeholder\n\t\t\t}\n\t\t\tonFocus={(event) => {\n\t\t\t\tupdateInlineText(true)\n\t\t\t\tonFocus?.(event)\n\t\t\t}}\n\t\t\tonBlur={(event) => {\n\t\t\t\tupdateInlineText(false)\n\t\t\t\tonBlur?.(event)\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t)\n\n\tconst field = icon ? (\n\t\t<div className='flex min-w-0 items-center'>\n\t\t\t{input}\n\t\t\t<span\n\t\t\t\taria-hidden='true'\n\t\t\t\tdata-slot='input-icon'\n\t\t\t\tclassName='pointer-events-none -ml-10 flex w-10 shrink-0 items-center justify-center text-foreground/75 peer-disabled:opacity-50 [&>svg]:size-[1.125rem]'\n\t\t\t>\n\t\t\t\t{icon}\n\t\t\t</span>\n\t\t</div>\n\t) : (\n\t\tinput\n\t)\n\n\treturn (\n\t\t<>\n\t\t\t{field}\n\t\t\t{hasSuggestions && (\n\t\t\t\t<datalist id={suggestionsId}>\n\t\t\t\t\t{Array.from(new Set(suggestions), (value) => (\n\t\t\t\t\t\t<option key={value} value={value} />\n\t\t\t\t\t))}\n\t\t\t\t</datalist>\n\t\t\t)}\n\t\t</>\n\t)\n}\n\nexport { Input, type InputProps }\n"],"names":["Input","className","type","label","icon","transitionStyle","suggestions","list","placeholder","ariaLabel","onFocus","onBlur","props","suggestionsId","useId","hasSuggestions","inlineText","setInlineText","useState","swapTimer","useRef","useEffect","updateInlineText","focused","showingPlaceholder","hideInlineText","showsHint","input","jsx","cn","event","jsxs","Fragment","value"],"mappings":";;;AAsBA,SAASA,EAAM;AAAA,EACd,WAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAcC;AAAA,EACd,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,GAAGC;AACJ,GAAe;AACd,QAAMC,IAAgBC,EAAA,GAChBC,IAAiBR,MAAS,UAAa,EAAQD,GAAa,QAC5D,CAACU,GAAYC,CAAa,IAAIC,EAAS;AAAA,IAC5C,SAAS;AAAA,IACT,oBAAoB;AAAA,EAAA,CACpB,GACKC,IAAYC,EAA2B,MAAS;AAEtD,EAAAC,EAAU,MAAM,MAAM,OAAO,aAAaF,EAAU,OAAO,GAAG,EAAE;AAEhE,WAASG,EAAiBC,GAAkB;AAC3C,WAAO,aAAaJ,EAAU,OAAO;AACrC,UAAM,EAAE,oBAAAK,MAAuBR;AAC/B,QACC,CAACb,KACD,CAACK,KACDe,MAAYC,KACZ,OAAO,WAAW,kCAAkC,EAAE,SACrD;AACD,MAAAP,EAAc,EAAE,SAAAM,GAAS,oBAAoBA,EAAA,CAAS;AACtD;AAAA,IACD;AAEA,IAAAN,EAAc,EAAE,SAAAM,GAAS,oBAAAC,GAAoB,GAE7CL,EAAU,UAAU,OAAO,WAAW,MAAM;AAC3C,MAAAF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ClC,gBAAAL,EAAC,YAAmB,OAAAK,EAAA,GAAPA,CAAqB,CAClC,EAAA,CACF;AAAA,EAAA,GAEF;AAEF;"}
@@ -6,7 +6,7 @@ function n({ className: r, ...i }) {
6
6
  {
7
7
  "data-slot": "textarea",
8
8
  className: a(
9
- "flex field-sizing-content min-h-16 w-full rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-2 text-sm transition-colors outline-none placeholder:font-semibold placeholder:text-foreground/75 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
9
+ "flex field-sizing-content min-h-16 w-full rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-2 text-sm transition-colors outline-none placeholder:font-semibold placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
10
10
  r
11
11
  ),
12
12
  ...i
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/ui/textarea/index.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot='textarea'\n\t\t\tclassName={cn(\n\t\t\t\t'flex field-sizing-content min-h-16 w-full rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-2 text-sm transition-colors outline-none placeholder:font-semibold placeholder:text-foreground/75 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Textarea }\n"],"names":["Textarea","className","props","jsx","cn"],"mappings":";;AAIA,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAA2C;AAC5E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/textarea/index.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot='textarea'\n\t\t\tclassName={cn(\n\t\t\t\t'flex field-sizing-content min-h-16 w-full rounded-lg border-[1.5px] border-foreground/35 bg-transparent px-3 py-2 text-sm transition-colors outline-none placeholder:font-semibold placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Textarea }\n"],"names":["Textarea","className","props","jsx","cn"],"mappings":";;AAIA,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAA2C;AAC5E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoa-dev/kit",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "description": "Shared React components, hooks, utilities, licensing UI and theme for STOA desktop apps",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,9 +23,9 @@
23
23
  --paper: #f4f4f2;
24
24
  --background: #dfdfdc;
25
25
  --foreground: var(--ink);
26
- --card: #ebebe8;
26
+ --card: var(--light);
27
27
  --card-foreground: var(--ink);
28
- --popover: var(--paper);
28
+ --popover: var(--light);
29
29
  --popover-foreground: var(--ink);
30
30
  --primary: var(--ink);
31
31
  --primary-foreground: var(--paper);
@@ -200,6 +200,7 @@
200
200
  [data-slot="tag-input"]
201
201
  ) {
202
202
  border: var(--stroke) solid var(--input);
203
+ /* border-radius: .1rem; */
203
204
  border-radius: 0.875rem;
204
205
  box-shadow: none;
205
206
  }
@@ -701,3 +702,40 @@
701
702
  background: var(--ink);
702
703
  color: var(--paper);
703
704
  }
705
+
706
+ /* ── Combobox: same rows as the menus ───────────────────────────────────── */
707
+
708
+ .stoa-instrument [data-slot="combobox-content"] {
709
+ padding: 0.375rem;
710
+ border: 0;
711
+ border-radius: 1rem;
712
+ background: var(--popover);
713
+ box-shadow:
714
+ 0 0 0 1px var(--hairline),
715
+ 0 20px 48px -18px rgb(0 0 0 / 30%);
716
+ }
717
+
718
+ .stoa-instrument [data-slot="combobox-option"] {
719
+ min-height: 2.25rem;
720
+ align-items: center;
721
+ padding: 0.5rem 0.75rem;
722
+ border-radius: 0.625rem;
723
+ font-size: 0.8125rem;
724
+ }
725
+
726
+ .stoa-instrument [data-slot="combobox-option"][data-highlighted] {
727
+ background: var(--ink);
728
+ color: var(--paper);
729
+ }
730
+
731
+ .stoa-instrument [data-slot="combobox-option"][data-highlighted] * {
732
+ color: inherit;
733
+ }
734
+
735
+ .stoa-instrument [data-slot="combobox-hint"] {
736
+ font-family: var(--instrument-mono);
737
+ font-size: 0.625rem;
738
+ letter-spacing: 0.1em;
739
+ text-transform: uppercase;
740
+ }
741
+