@adea-ai/ui 0.129.0 → 0.130.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.
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps, Ref } from 'solid-js';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  export declare const textareaVariants: (props?: ({
4
- variant?: "default" | "composer" | null | undefined;
4
+ variant?: "code" | "default" | "composer" | null | undefined;
5
5
  size?: "default" | "comfortable" | null | undefined;
6
6
  resize?: "none" | "both" | "vertical" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -20,7 +20,8 @@ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> & VariantPr
20
20
  * engine supports it, which is the behaviour a chat composer wants; `rows`
21
21
  * remains the fallback so an unsupported engine still gets a usable height.
22
22
  * `variant="composer"` removes the standalone field surface when nested in a
23
- * composer shell. `size="comfortable"` caps growth at the shared 12rem rung, and
23
+ * composer shell. `variant="code"` keeps the field surface and sets the
24
+ * monospace face, for commands, snippets and other literal text. `size="comfortable"` caps growth at the shared 12rem rung, and
24
25
  * the finite `resize` variants keep browser resize behavior explicit.
25
26
  */
26
27
  export declare function Textarea(props: TextareaProps): import("solid-js").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,eAAO,MAAM,gBAAgB;;;;8EAgC5B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,GAClE,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG;IACtC,qFAAqF;IACrF,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;CAC/B,CAAA;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCAwC5C"}
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/textarea/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,eAAO,MAAM,gBAAgB;;;;8EAiC5B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,GAClE,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG;IACtC,qFAAqF;IACrF,GAAG,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;CAC/B,CAAA;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCAwC5C"}
@@ -17,7 +17,8 @@ var textareaVariants = cva([
17
17
  variants: {
18
18
  variant: {
19
19
  default: "",
20
- composer: "border-0 bg-transparent p-0 shadow-none focus-visible:ring-0"
20
+ composer: "border-0 bg-transparent p-0 shadow-none focus-visible:ring-0",
21
+ code: "font-mono"
21
22
  },
22
23
  size: {
23
24
  default: "min-h-16",
@@ -46,7 +47,8 @@ var textareaVariants = cva([
46
47
  * engine supports it, which is the behaviour a chat composer wants; `rows`
47
48
  * remains the fallback so an unsupported engine still gets a usable height.
48
49
  * `variant="composer"` removes the standalone field surface when nested in a
49
- * composer shell. `size="comfortable"` caps growth at the shared 12rem rung, and
50
+ * composer shell. `variant="code"` keeps the field surface and sets the
51
+ * monospace face, for commands, snippets and other literal text. `size="comfortable"` caps growth at the shared 12rem rung, and
50
52
  * the finite `resize` variants keep browser resize behavior explicit.
51
53
  */
52
54
  function Textarea(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","names":["ComponentProps","Ref","splitProps","cva","VariantProps","useFormFieldControl","cn","textareaVariants","variants","variant","default","composer","size","comfortable","resize","vertical","none","both","defaultVariants","TextareaProps","Omit","ref","HTMLTextAreaElement","Textarea","props","local","rest","field","id","_el$","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","class","_$use","_$mergeProps"],"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["import type { ComponentProps, Ref } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\nexport const textareaVariants = cva(\n [\n 'flex field-sizing-content w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'placeholder:text-muted-foreground',\n 'selection:bg-primary selection:text-primary-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n ],\n {\n variants: {\n variant: {\n default: '',\n composer: 'border-0 bg-transparent p-0 shadow-none focus-visible:ring-0',\n },\n size: {\n default: 'min-h-16',\n comfortable: 'min-h-16 max-h-48',\n },\n resize: {\n vertical: 'resize-y',\n none: 'resize-none',\n both: 'resize',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n resize: 'vertical',\n },\n }\n)\n\nexport type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &\n VariantProps<typeof textareaVariants> & {\n /** Solid's actual textarea element, rather than its containing component or form. */\n ref?: Ref<HTMLTextAreaElement>\n }\n\n/**\n * Textarea.\n *\n * Shares the Input's border, focus and invalid treatment exactly — the two are\n * the same control at different aspect ratios, and a form that mixes them must\n * not show a seam between them.\n *\n * `field-sizing: content` lets the element grow with its content where the\n * engine supports it, which is the behaviour a chat composer wants; `rows`\n * remains the fallback so an unsupported engine still gets a usable height.\n * `variant=\"composer\"` removes the standalone field surface when nested in a\n * composer shell. `size=\"comfortable\"` caps growth at the shared 12rem rung, and\n * the finite `resize` variants keep browser resize behavior explicit.\n */\nexport function Textarea(props: TextareaProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'size',\n 'resize',\n 'ref',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <textarea\n data-slot=\"textarea\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n ref={local.ref}\n class={cn(\n textareaVariants({ variant: local.variant, size: local.size, resize: local.resize }),\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;AAMA,IAAaO,mBAAmBJ,IAC9B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;AAA8E,GAEhF;CACEK,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,UAAU;EACZ;EACAC,MAAM;GACJF,SAAS;GACTG,aAAa;EACf;EACAC,QAAQ;GACNC,UAAU;GACVC,MAAM;GACNC,MAAM;EACR;CACF;CACAC,iBAAiB;EACfT,SAAS;EACTG,MAAM;EACNE,QAAQ;CACV;AACF,CACF;;;;;;;;;;;;;;;AAsBA,SAAgBS,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQxB,WAAWsB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMG,QAAQtB,oBAAoB,WAAW;EAC3CuB,IAAIH,MAAMG;EACV,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAA,IAAAC,QASSN,MAAMJ;EAAG,OAAAU,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAATJ,MAAMJ,MAAGQ;EAAAI,OAAAJ,MAAAK,WAAA;GAAA,IANdN,KAAE;IAAA,OAAED,OAAOC,MAAMH,MAAMG;GAAE;GAAA,KAAA,gBAAA;IAAA,OACbH,MAAM;GAAa;GAAA,KAAA,qBAAA;IAAA,OACdE,QAAQ,sBAAsBF,MAAM;GAAkB;GAAA,KAAA,sBAAA;IAAA,OACrDE,QAAQ,uBAAuBF,MAAM;GAAmB;GAAA,KAAA,kBAAA;IAAA,OAC5DE,QAAQ,mBAAmBF,MAAM;GAAe;GAAA,KAAA,uBAAA;IAAA,OAC3CE,QAAQ,wBAAwBF,MAAM;GAAoB;GAAA,KAAA,WAAA;IAAA,OAEtEnB,GACLC,iBAAiB;KAAEE,SAASgB,MAAMhB;KAASG,MAAMa,MAAMb;KAAME,QAAQW,MAAMX;IAAO,CAAC,GACnFW,MAAMe,KACR;GAAC;EAAA,GACGd,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAG;CAAA,EAAA,CAAA;AAGd"}
1
+ {"version":3,"file":"textarea.js","names":["ComponentProps","Ref","splitProps","cva","VariantProps","useFormFieldControl","cn","textareaVariants","variants","variant","default","composer","code","size","comfortable","resize","vertical","none","both","defaultVariants","TextareaProps","Omit","ref","HTMLTextAreaElement","Textarea","props","local","rest","field","id","_el$","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","aria-label","aria-labelledby","aria-describedby","aria-invalid","aria-errormessage","class","_$use","_$mergeProps"],"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["import type { ComponentProps, Ref } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { useFormFieldControl } from '#lib/form-field'\nimport { cn } from '#lib/utils'\n\nexport const textareaVariants = cva(\n [\n 'flex field-sizing-content w-full rounded-md border border-input bg-transparent px-control-md py-2 text-sm',\n 'transition-[color,box-shadow,border-color] ease-out outline-none',\n 'placeholder:text-muted-foreground',\n 'selection:bg-primary selection:text-primary-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive-subtle',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n ],\n {\n variants: {\n variant: {\n default: '',\n composer: 'border-0 bg-transparent p-0 shadow-none focus-visible:ring-0',\n code: 'font-mono',\n },\n size: {\n default: 'min-h-16',\n comfortable: 'min-h-16 max-h-48',\n },\n resize: {\n vertical: 'resize-y',\n none: 'resize-none',\n both: 'resize',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n resize: 'vertical',\n },\n }\n)\n\nexport type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &\n VariantProps<typeof textareaVariants> & {\n /** Solid's actual textarea element, rather than its containing component or form. */\n ref?: Ref<HTMLTextAreaElement>\n }\n\n/**\n * Textarea.\n *\n * Shares the Input's border, focus and invalid treatment exactly — the two are\n * the same control at different aspect ratios, and a form that mixes them must\n * not show a seam between them.\n *\n * `field-sizing: content` lets the element grow with its content where the\n * engine supports it, which is the behaviour a chat composer wants; `rows`\n * remains the fallback so an unsupported engine still gets a usable height.\n * `variant=\"composer\"` removes the standalone field surface when nested in a\n * composer shell. `variant=\"code\"` keeps the field surface and sets the\n * monospace face, for commands, snippets and other literal text. `size=\"comfortable\"` caps growth at the shared 12rem rung, and\n * the finite `resize` variants keep browser resize behavior explicit.\n */\nexport function Textarea(props: TextareaProps) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'size',\n 'resize',\n 'ref',\n 'id',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-invalid',\n 'aria-errormessage',\n ])\n const field = useFormFieldControl('control', {\n id: local.id,\n 'aria-label': local['aria-label'],\n 'aria-labelledby': local['aria-labelledby'],\n 'aria-describedby': local['aria-describedby'],\n 'aria-invalid': local['aria-invalid'],\n 'aria-errormessage': local['aria-errormessage'],\n })\n\n return (\n <textarea\n data-slot=\"textarea\"\n id={field?.id ?? local.id}\n aria-label={local['aria-label']}\n aria-labelledby={field?.['aria-labelledby'] ?? local['aria-labelledby']}\n aria-describedby={field?.['aria-describedby'] ?? local['aria-describedby']}\n aria-invalid={field?.['aria-invalid'] ?? local['aria-invalid']}\n aria-errormessage={field?.['aria-errormessage'] ?? local['aria-errormessage']}\n ref={local.ref}\n class={cn(\n textareaVariants({ variant: local.variant, size: local.size, resize: local.resize }),\n local.class\n )}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;;;AAMA,IAAaO,mBAAmBJ,IAC9B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;AAA8E,GAEhF;CACEK,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,UAAU;GACVC,MAAM;EACR;EACAC,MAAM;GACJH,SAAS;GACTI,aAAa;EACf;EACAC,QAAQ;GACNC,UAAU;GACVC,MAAM;GACNC,MAAM;EACR;CACF;CACAC,iBAAiB;EACfV,SAAS;EACTI,MAAM;EACNE,QAAQ;CACV;AACF,CACF;;;;;;;;;;;;;;;;AAuBA,SAAgBS,SAASC,OAAsB;CAC7C,MAAM,CAACC,OAAOC,QAAQzB,WAAWuB,OAAO;EACtC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAmB,CACpB;CACD,MAAMG,QAAQvB,oBAAoB,WAAW;EAC3CwB,IAAIH,MAAMG;EACV,cAAcH,MAAM;EACpB,mBAAmBA,MAAM;EACzB,oBAAoBA,MAAM;EAC1B,gBAAgBA,MAAM;EACtB,qBAAqBA,MAAM;CAC7B,CAAC;CAED,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAA,IAAAC,QASSN,MAAMJ;EAAG,OAAAU,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAATJ,MAAMJ,MAAGQ;EAAAI,OAAAJ,MAAAK,WAAA;GAAA,IANdN,KAAE;IAAA,OAAED,OAAOC,MAAMH,MAAMG;GAAE;GAAA,KAAA,gBAAA;IAAA,OACbH,MAAM;GAAa;GAAA,KAAA,qBAAA;IAAA,OACdE,QAAQ,sBAAsBF,MAAM;GAAkB;GAAA,KAAA,sBAAA;IAAA,OACrDE,QAAQ,uBAAuBF,MAAM;GAAmB;GAAA,KAAA,kBAAA;IAAA,OAC5DE,QAAQ,mBAAmBF,MAAM;GAAe;GAAA,KAAA,uBAAA;IAAA,OAC3CE,QAAQ,wBAAwBF,MAAM;GAAoB;GAAA,KAAA,WAAA;IAAA,OAEtEpB,GACLC,iBAAiB;KAAEE,SAASiB,MAAMjB;KAASI,MAAMa,MAAMb;KAAME,QAAQW,MAAMX;IAAO,CAAC,GACnFW,MAAMe,KACR;GAAC;EAAA,GACGd,IAAI,GAAA,OAAA,KAAA;EAAA,OAAAG;CAAA,EAAA,CAAA;AAGd"}
@@ -19,6 +19,7 @@ export const textareaVariants = cva(
19
19
  variant: {
20
20
  default: '',
21
21
  composer: 'border-0 bg-transparent p-0 shadow-none focus-visible:ring-0',
22
+ code: 'font-mono',
22
23
  },
23
24
  size: {
24
25
  default: 'min-h-16',
@@ -55,7 +56,8 @@ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &
55
56
  * engine supports it, which is the behaviour a chat composer wants; `rows`
56
57
  * remains the fallback so an unsupported engine still gets a usable height.
57
58
  * `variant="composer"` removes the standalone field surface when nested in a
58
- * composer shell. `size="comfortable"` caps growth at the shared 12rem rung, and
59
+ * composer shell. `variant="code"` keeps the field surface and sets the
60
+ * monospace face, for commands, snippets and other literal text. `size="comfortable"` caps growth at the shared 12rem rung, and
59
61
  * the finite `resize` variants keep browser resize behavior explicit.
60
62
  */
61
63
  export function Textarea(props: TextareaProps) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adea-ai/ui",
3
- "version": "0.129.0",
3
+ "version": "0.130.0",
4
4
  "description": "The Adea design system: Kobalte-backed Solid components, semantic OKLCH tokens, and the app-shell layout primitives shared by Adea and Cortana.",
5
5
  "keywords": [
6
6
  "adea",
@@ -19,6 +19,7 @@ export const textareaVariants = cva(
19
19
  variant: {
20
20
  default: '',
21
21
  composer: 'border-0 bg-transparent p-0 shadow-none focus-visible:ring-0',
22
+ code: 'font-mono',
22
23
  },
23
24
  size: {
24
25
  default: 'min-h-16',
@@ -55,7 +56,8 @@ export type TextareaProps = Omit<ComponentProps<'textarea'>, 'size'> &
55
56
  * engine supports it, which is the behaviour a chat composer wants; `rows`
56
57
  * remains the fallback so an unsupported engine still gets a usable height.
57
58
  * `variant="composer"` removes the standalone field surface when nested in a
58
- * composer shell. `size="comfortable"` caps growth at the shared 12rem rung, and
59
+ * composer shell. `variant="code"` keeps the field surface and sets the
60
+ * monospace face, for commands, snippets and other literal text. `size="comfortable"` caps growth at the shared 12rem rung, and
59
61
  * the finite `resize` variants keep browser resize behavior explicit.
60
62
  */
61
63
  export function Textarea(props: TextareaProps) {