@stoa-dev/kit 1.0.3 → 1.1.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 (67) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/display/BarChart/index.js +147 -31
  3. package/dist/display/BarChart/index.js.map +1 -1
  4. package/dist/i18n/locales/at.json.js +16 -14
  5. package/dist/i18n/locales/at.json.js.map +1 -1
  6. package/dist/i18n/locales/de.json.js +16 -14
  7. package/dist/i18n/locales/de.json.js.map +1 -1
  8. package/dist/i18n/locales/en.json.js +12 -10
  9. package/dist/i18n/locales/en.json.js.map +1 -1
  10. package/dist/i18n/locales/it.json.js +16 -14
  11. package/dist/i18n/locales/it.json.js.map +1 -1
  12. package/dist/kit.css +1 -1
  13. package/dist/shell/NativeSelect/index.js +5 -5
  14. package/dist/shell/NativeSelect/index.js.map +1 -1
  15. package/dist/types/display/BarChart/index.d.ts +26 -2
  16. package/dist/types/display/BarChart/index.d.ts.map +1 -1
  17. package/dist/types/i18n/index.d.ts +56 -0
  18. package/dist/types/i18n/index.d.ts.map +1 -1
  19. package/dist/types/ui/button/index.d.ts +1 -1
  20. package/dist/types/ui/card/index.d.ts +12 -4
  21. package/dist/types/ui/card/index.d.ts.map +1 -1
  22. package/dist/types/ui/color-picker/color.d.ts +13 -0
  23. package/dist/types/ui/color-picker/color.d.ts.map +1 -0
  24. package/dist/types/ui/color-picker/index.d.ts +10 -0
  25. package/dist/types/ui/color-picker/index.d.ts.map +1 -0
  26. package/dist/types/ui/color-picker-toggle/index.d.ts +8 -0
  27. package/dist/types/ui/color-picker-toggle/index.d.ts.map +1 -0
  28. package/dist/types/ui/index.d.ts +4 -0
  29. package/dist/types/ui/index.d.ts.map +1 -1
  30. package/dist/types/ui/input/index.d.ts +13 -3
  31. package/dist/types/ui/input/index.d.ts.map +1 -1
  32. package/dist/types/ui/marked-text/index.d.ts +9 -0
  33. package/dist/types/ui/marked-text/index.d.ts.map +1 -0
  34. package/dist/types/ui/pill/index.d.ts +8 -0
  35. package/dist/types/ui/pill/index.d.ts.map +1 -0
  36. package/dist/types/ui/radio-group/index.d.ts.map +1 -1
  37. package/dist/ui/card/index.js +109 -52
  38. package/dist/ui/card/index.js.map +1 -1
  39. package/dist/ui/color-picker/ColorPicker.module.scss.js +42 -0
  40. package/dist/ui/color-picker/ColorPicker.module.scss.js.map +1 -0
  41. package/dist/ui/color-picker/color.js +60 -0
  42. package/dist/ui/color-picker/color.js.map +1 -0
  43. package/dist/ui/color-picker/index.js +239 -0
  44. package/dist/ui/color-picker/index.js.map +1 -0
  45. package/dist/ui/color-picker-toggle/index.js +66 -0
  46. package/dist/ui/color-picker-toggle/index.js.map +1 -0
  47. package/dist/ui/index.js +113 -105
  48. package/dist/ui/index.js.map +1 -1
  49. package/dist/ui/input/index.js +68 -10
  50. package/dist/ui/input/index.js.map +1 -1
  51. package/dist/ui/input-group/index.js +9 -9
  52. package/dist/ui/input-group/index.js.map +1 -1
  53. package/dist/ui/marked-text/index.js +28 -0
  54. package/dist/ui/marked-text/index.js.map +1 -0
  55. package/dist/ui/pill/index.js +33 -0
  56. package/dist/ui/pill/index.js.map +1 -0
  57. package/dist/ui/radio-group/index.js +17 -15
  58. package/dist/ui/radio-group/index.js.map +1 -1
  59. package/dist/ui/select/index.js +10 -10
  60. package/dist/ui/select/index.js.map +1 -1
  61. package/dist/ui/switch/index.js +10 -10
  62. package/dist/ui/switch/index.js.map +1 -1
  63. package/dist/ui/textarea/index.js +4 -4
  64. package/dist/ui/textarea/index.js.map +1 -1
  65. package/package.json +1 -1
  66. package/styles/instrument.css +17 -17
  67. package/styles/theme.css +134 -1
@@ -2,12 +2,12 @@ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
2
  import { CheckIcon as c, ChevronDownIcon as l, ChevronUpIcon as u } from "lucide-react";
3
3
  import { Select as r } from "radix-ui";
4
4
  import { cn as o } from "../../utils/cn.js";
5
- function b({
5
+ function x({
6
6
  ...e
7
7
  }) {
8
8
  return /* @__PURE__ */ t(r.Root, { "data-slot": "select", ...e });
9
9
  }
10
- function x({
10
+ function b({
11
11
  className: e,
12
12
  ...a
13
13
  }) {
@@ -37,7 +37,7 @@ function w({
37
37
  "data-slot": "select-trigger",
38
38
  "data-size": a,
39
39
  className: o(
40
- "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-background/70 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-12 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-background/40 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
40
+ "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-12 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41
41
  e
42
42
  ),
43
43
  ...s,
@@ -81,7 +81,7 @@ function S({
81
81
  children: a
82
82
  }
83
83
  ),
84
- /* @__PURE__ */ t(g, {})
84
+ /* @__PURE__ */ t(m, {})
85
85
  ]
86
86
  }
87
87
  ) });
@@ -120,7 +120,7 @@ function N({
120
120
  }
121
121
  );
122
122
  }
123
- function k({
123
+ function I({
124
124
  className: e,
125
125
  ...a
126
126
  }) {
@@ -150,7 +150,7 @@ function p({
150
150
  }
151
151
  );
152
152
  }
153
- function g({
153
+ function m({
154
154
  className: e,
155
155
  ...a
156
156
  }) {
@@ -168,14 +168,14 @@ function g({
168
168
  );
169
169
  }
170
170
  export {
171
- b as Select,
171
+ x as Select,
172
172
  S as SelectContent,
173
- x as SelectGroup,
173
+ b as SelectGroup,
174
174
  N as SelectItem,
175
175
  y as SelectLabel,
176
- g as SelectScrollDownButton,
176
+ m as SelectScrollDownButton,
177
177
  p as SelectScrollUpButton,
178
- k as SelectSeparator,
178
+ I as SelectSeparator,
179
179
  w as SelectTrigger,
180
180
  z as SelectValue
181
181
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/ui/select/index.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\nimport type * as React from 'react'\nimport { cn } from '../../utils/cn'\n\nfunction Select({\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n\treturn <SelectPrimitive.Root data-slot='select' {...props} />\n}\n\nfunction SelectGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n\treturn (\n\t\t<SelectPrimitive.Group\n\t\t\tdata-slot='select-group'\n\t\t\tclassName={cn('scroll-my-1 p-1', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectValue({\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n\treturn <SelectPrimitive.Value data-slot='select-value' {...props} />\n}\n\nfunction SelectTrigger({\n\tclassName,\n\tsize = 'default',\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n\tsize?: 'sm' | 'default'\n}) {\n\treturn (\n\t\t<SelectPrimitive.Trigger\n\t\t\tdata-slot='select-trigger'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-background/70 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-12 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-background/40 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SelectPrimitive.Icon asChild>\n\t\t\t\t<ChevronDownIcon className='pointer-events-none size-4 text-muted-foreground' />\n\t\t\t</SelectPrimitive.Icon>\n\t\t</SelectPrimitive.Trigger>\n\t)\n}\n\nfunction SelectContent({\n\tclassName,\n\tchildren,\n\tposition = 'item-aligned',\n\talign = 'center',\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n\treturn (\n\t\t<SelectPrimitive.Portal>\n\t\t\t<SelectPrimitive.Content\n\t\t\t\tdata-slot='select-content'\n\t\t\t\tdata-align-trigger={position === 'item-aligned'}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n\t\t\t\t\tposition === 'popper' &&\n\t\t\t\t\t\t'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tposition={position}\n\t\t\t\talign={align}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SelectScrollUpButton />\n\t\t\t\t<SelectPrimitive.Viewport\n\t\t\t\t\tdata-position={position}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)',\n\t\t\t\t\t\tposition === 'popper' && '',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SelectPrimitive.Viewport>\n\t\t\t\t<SelectScrollDownButton />\n\t\t\t</SelectPrimitive.Content>\n\t\t</SelectPrimitive.Portal>\n\t)\n}\n\nfunction SelectLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n\treturn (\n\t\t<SelectPrimitive.Label\n\t\t\tdata-slot='select-label'\n\t\t\tclassName={cn('px-1.5 py-1 text-xs text-muted-foreground', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n\treturn (\n\t\t<SelectPrimitive.Item\n\t\t\tdata-slot='select-item'\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute right-2 flex size-4 items-center justify-center'>\n\t\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className='pointer-events-none' />\n\t\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t\t</SelectPrimitive.Item>\n\t)\n}\n\nfunction SelectSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n\treturn (\n\t\t<SelectPrimitive.Separator\n\t\t\tdata-slot='select-separator'\n\t\t\tclassName={cn('pointer-events-none -mx-1 my-2 h-px bg-border', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectScrollUpButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollUpButton\n\t\t\tdata-slot='select-scroll-up-button'\n\t\t\tclassName={cn(\n\t\t\t\t\"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronUpIcon />\n\t\t</SelectPrimitive.ScrollUpButton>\n\t)\n}\n\nfunction SelectScrollDownButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollDownButton\n\t\t\tdata-slot='select-scroll-down-button'\n\t\t\tclassName={cn(\n\t\t\t\t\"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronDownIcon />\n\t\t</SelectPrimitive.ScrollDownButton>\n\t)\n}\n\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectScrollDownButton,\n\tSelectScrollUpButton,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n}\n"],"names":["Select","props","SelectPrimitive","SelectGroup","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AAKA,SAASA,EAAO;AAAA,EACf,GAAGC;AACJ,GAAsD;AACrD,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC5D;AAEA,SAASE,EAAY;AAAA,EACpB,WAAAC;AAAA,EACA,GAAGH;AACJ,GAAuD;AACtD,SACC,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,WAAWI,EAAG,mBAAmBF,CAAS;AAAA,MACzC,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASM,EAAY;AAAA,EACpB,GAAGN;AACJ,GAAuD;AACtD,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACnE;AAEA,SAASO,EAAc;AAAA,EACtB,WAAAJ;AAAA,EACA,MAAAK,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,GAAGT;AACJ,GAEG;AACF,SACC,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,M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AA;AAAA,MAEA,GAAGH;AAAA,MAEJ,4BAACW,GAAA,CAAA,CAAgB;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/select/index.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\nimport type * as React from 'react'\nimport { cn } from '../../utils/cn'\n\nfunction Select({\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n\treturn <SelectPrimitive.Root data-slot='select' {...props} />\n}\n\nfunction SelectGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n\treturn (\n\t\t<SelectPrimitive.Group\n\t\t\tdata-slot='select-group'\n\t\t\tclassName={cn('scroll-my-1 p-1', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectValue({\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n\treturn <SelectPrimitive.Value data-slot='select-value' {...props} />\n}\n\nfunction SelectTrigger({\n\tclassName,\n\tsize = 'default',\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n\tsize?: 'sm' | 'default'\n}) {\n\treturn (\n\t\t<SelectPrimitive.Trigger\n\t\t\tdata-slot='select-trigger'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none 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 data-placeholder:text-muted-foreground data-[size=default]:h-12 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SelectPrimitive.Icon asChild>\n\t\t\t\t<ChevronDownIcon className='pointer-events-none size-4 text-muted-foreground' />\n\t\t\t</SelectPrimitive.Icon>\n\t\t</SelectPrimitive.Trigger>\n\t)\n}\n\nfunction SelectContent({\n\tclassName,\n\tchildren,\n\tposition = 'item-aligned',\n\talign = 'center',\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n\treturn (\n\t\t<SelectPrimitive.Portal>\n\t\t\t<SelectPrimitive.Content\n\t\t\t\tdata-slot='select-content'\n\t\t\t\tdata-align-trigger={position === 'item-aligned'}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n\t\t\t\t\tposition === 'popper' &&\n\t\t\t\t\t\t'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tposition={position}\n\t\t\t\talign={align}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SelectScrollUpButton />\n\t\t\t\t<SelectPrimitive.Viewport\n\t\t\t\t\tdata-position={position}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)',\n\t\t\t\t\t\tposition === 'popper' && '',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SelectPrimitive.Viewport>\n\t\t\t\t<SelectScrollDownButton />\n\t\t\t</SelectPrimitive.Content>\n\t\t</SelectPrimitive.Portal>\n\t)\n}\n\nfunction SelectLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n\treturn (\n\t\t<SelectPrimitive.Label\n\t\t\tdata-slot='select-label'\n\t\t\tclassName={cn('px-1.5 py-1 text-xs text-muted-foreground', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n\treturn (\n\t\t<SelectPrimitive.Item\n\t\t\tdata-slot='select-item'\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute right-2 flex size-4 items-center justify-center'>\n\t\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className='pointer-events-none' />\n\t\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t\t</SelectPrimitive.Item>\n\t)\n}\n\nfunction SelectSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n\treturn (\n\t\t<SelectPrimitive.Separator\n\t\t\tdata-slot='select-separator'\n\t\t\tclassName={cn('pointer-events-none -mx-1 my-2 h-px bg-border', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectScrollUpButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollUpButton\n\t\t\tdata-slot='select-scroll-up-button'\n\t\t\tclassName={cn(\n\t\t\t\t\"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronUpIcon />\n\t\t</SelectPrimitive.ScrollUpButton>\n\t)\n}\n\nfunction SelectScrollDownButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollDownButton\n\t\t\tdata-slot='select-scroll-down-button'\n\t\t\tclassName={cn(\n\t\t\t\t\"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronDownIcon />\n\t\t</SelectPrimitive.ScrollDownButton>\n\t)\n}\n\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectScrollDownButton,\n\tSelectScrollUpButton,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n}\n"],"names":["Select","props","SelectPrimitive","SelectGroup","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"m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EACA,GAAGH;AACJ,GAA2D;AAC1D,SACC,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,WAAWI,EAAG,iDAAiDF,CAAS;AAAA,MACvE,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASe,EAAqB;AAAA,EAC7B,WAAAZ;AAAA,EACA,GAAGH;AACJ,GAAgE;AAC/D,SACC,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,WAAWI;AAAA,QACV;AAAA,QACAF;AAAA,MAAA;AAAA,MAEA,GAAGH;AAAA,MAEJ,4BAACqB,GAAA,CAAA,CAAc;AAAA,IAAA;AAAA,EAAA;AAGlB;AAEA,SAASL,EAAuB;AAAA,EAC/B,WAAAb;AAAA,EACA,GAAGH;AACJ,GAAkE;AACjE,SACC,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,WAAWI;AAAA,QACV;AAAA,QACAF;AAAA,MAAA;AAAA,MAEA,GAAGH;AAAA,MAEJ,4BAACW,GAAA,CAAA,CAAgB;AAAA,IAAA;AAAA,EAAA;AAGpB;"}
@@ -1,32 +1,32 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { Switch as t } from "radix-ui";
2
+ import { Switch as i } from "radix-ui";
3
3
  import { cn as d } from "../../utils/cn.js";
4
- function o({
4
+ function c({
5
5
  className: e,
6
- size: i = "default",
7
- ...r
6
+ size: r = "default",
7
+ ...t
8
8
  }) {
9
9
  return /* @__PURE__ */ a(
10
- t.Root,
10
+ i.Root,
11
11
  {
12
12
  "data-slot": "switch",
13
- "data-size": i,
13
+ "data-size": r,
14
14
  className: d(
15
15
  "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[size=lg]:h-[23.5px] data-[size=lg]:w-[41px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
16
16
  e
17
17
  ),
18
- ...r,
18
+ ...t,
19
19
  children: /* @__PURE__ */ a(
20
- t.Thumb,
20
+ i.Thumb,
21
21
  {
22
22
  "data-slot": "switch-thumb",
23
- className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=lg]/switch:size-5 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=lg]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
23
+ className: "pointer-events-none block rounded-full bg-background ring-0 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=lg]/switch:size-5 dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground"
24
24
  }
25
25
  )
26
26
  }
27
27
  );
28
28
  }
29
29
  export {
30
- o as Switch
30
+ c as Switch
31
31
  };
32
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/ui/switch/index.tsx"],"sourcesContent":["'use client'\n\nimport { Switch as SwitchPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Switch({\n\tclassName,\n\tsize = 'default',\n\t...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n\tsize?: 'sm' | 'lg' | 'default'\n}) {\n\treturn (\n\t\t<SwitchPrimitive.Root\n\t\t\tdata-slot='switch'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t'peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[size=lg]:h-[23.5px] data-[size=lg]:w-[41px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SwitchPrimitive.Thumb\n\t\t\t\tdata-slot='switch-thumb'\n\t\t\t\tclassName='pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=lg]/switch:size-5 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=lg]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground'\n\t\t\t/>\n\t\t</SwitchPrimitive.Root>\n\t)\n}\n\nexport { Switch }\n"],"names":["Switch","className","size","props","jsx","SwitchPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAAO;AAAA,EACf,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACJ,GAEG;AACF,SACC,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,aAAWH;AAAA,MACX,WAAWI;AAAA,QACV;AAAA,QACAL;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAgB;AAAA,QAAhB;AAAA,UACA,aAAU;AAAA,UACV,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGH;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/switch/index.tsx"],"sourcesContent":["'use client'\n\nimport { Switch as SwitchPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Switch({\n\tclassName,\n\tsize = 'default',\n\t...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n\tsize?: 'sm' | 'lg' | 'default'\n}) {\n\treturn (\n\t\t<SwitchPrimitive.Root\n\t\t\tdata-slot='switch'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t'peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[size=lg]:h-[23.5px] data-[size=lg]:w-[41px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SwitchPrimitive.Thumb\n\t\t\t\tdata-slot='switch-thumb'\n\t\t\t\tclassName='pointer-events-none block rounded-full bg-background ring-0 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=lg]/switch:size-5 dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground'\n\t\t\t/>\n\t\t</SwitchPrimitive.Root>\n\t)\n}\n\nexport { Switch }\n"],"names":["Switch","className","size","props","jsx","SwitchPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAAO;AAAA,EACf,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACJ,GAEG;AACF,SACC,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,aAAWH;AAAA,MACX,WAAWI;AAAA,QACV;AAAA,QACAL;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAgB;AAAA,QAAhB;AAAA,UACA,aAAU;AAAA,UACV,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGH;"}
@@ -1,15 +1,15 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { cn as a } from "../../utils/cn.js";
3
- function n({ className: i, ...r }) {
3
+ function n({ className: r, ...i }) {
4
4
  return /* @__PURE__ */ e(
5
5
  "textarea",
6
6
  {
7
7
  "data-slot": "textarea",
8
8
  className: a(
9
- "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background/70 px-3 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-background/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
10
- i
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",
10
+ r
11
11
  ),
12
- ...r
12
+ ...i
13
13
  }
14
14
  );
15
15
  }
@@ -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 border-input bg-background/70 px-3 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-background/40 dark:disabled:bg-input/80 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-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;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoa-dev/kit",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Shared React components, hooks, utilities, licensing UI and theme for STOA desktop apps",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -201,14 +201,30 @@
201
201
  ) {
202
202
  border: var(--stroke) solid var(--input);
203
203
  border-radius: 0.875rem;
204
- background-color: color-mix(in srgb, var(--paper) 50%, transparent);
205
204
  box-shadow: none;
206
205
  }
207
206
 
207
+ .stoa-instrument :is([data-slot="input-group"], [data-slot="tag-input"]) {
208
+ background-color: color-mix(in srgb, var(--paper) 50%, transparent);
209
+ }
210
+
208
211
  .stoa-instrument :is([data-slot="input"], [data-slot="native-select"], [data-slot="select-trigger"]) {
209
212
  padding-inline: 0.875rem;
210
213
  }
211
214
 
215
+ .stoa-instrument :is([data-slot="input"], [data-slot="textarea"], [data-slot="input-group"]) {
216
+ --stoa-input-frame-color: color-mix(in srgb, var(--input), var(--foreground) 20%);
217
+ border-color: var(--stoa-input-frame-color);
218
+ }
219
+
220
+ .stoa-instrument [data-slot="input"] {
221
+ --stoa-input-line-inset: 1rem;
222
+ }
223
+
224
+ .stoa-instrument [data-slot="input"][data-has-icon] {
225
+ padding-right: 2.5rem;
226
+ }
227
+
212
228
  .stoa-instrument :is(
213
229
  [data-slot="input"],
214
230
  [data-slot="textarea"],
@@ -292,10 +308,6 @@
292
308
  background: transparent;
293
309
  }
294
310
 
295
- .stoa-instrument :is([data-slot="input"], [data-slot="textarea"])::placeholder {
296
- color: color-mix(in srgb, var(--muted-foreground) 80%, transparent);
297
- }
298
-
299
311
  /* ── Surfaces ───────────────────────────────────────────────────────────── */
300
312
 
301
313
  .stoa-instrument [data-slot="card"] {
@@ -512,18 +524,6 @@
512
524
  .stoa-instrument [data-slot="switch-thumb"] {
513
525
  width: var(--switch-thumb);
514
526
  height: var(--switch-thumb);
515
- translate: 0 0;
516
- transition: translate 0.18s ease, background-color 0.18s ease;
517
- }
518
-
519
- .stoa-instrument [data-slot="switch"][data-state="checked"] [data-slot="switch-thumb"] {
520
- translate: var(--switch-travel) 0;
521
- }
522
-
523
- @media (prefers-reduced-motion: reduce) {
524
- .stoa-instrument [data-slot="switch-thumb"] {
525
- transition: none;
526
- }
527
527
  }
528
528
 
529
529
  .stoa-instrument [data-slot="switch"][data-state="checked"] {
package/styles/theme.css CHANGED
@@ -182,9 +182,142 @@
182
182
  .border-r { border-right-width: var(--ui-border-width); }
183
183
  }
184
184
 
185
+ [data-slot="card"][data-clickable="true"] {
186
+ cursor: pointer;
187
+
188
+ &:has(> [data-slot="card-trigger"]:focus-visible) {
189
+ outline: 2px solid var(--ring);
190
+ outline-offset: -2px;
191
+ }
192
+
193
+ @media (prefers-reduced-motion: no-preference) {
194
+ transition: background-color 160ms ease;
195
+ }
196
+ @media (hover: hover) {
197
+ &:hover {
198
+ background-color: color-mix(in srgb, var(--card), var(--foreground) 7%);
199
+ }
200
+
201
+ &:not(:hover, :has(:focus-visible)) > [data-slot="card-action-icon"][data-visibility="hoverOnly"] {
202
+ opacity: 0;
203
+ }
204
+ }
205
+ }
206
+
207
+ [data-slot="input"][data-transition-style="default"] {
208
+ @media (prefers-reduced-motion: no-preference) {
209
+ transition: border-color 200ms ease-out;
210
+ }
211
+
212
+ @media (hover: hover) and (forced-colors: none) {
213
+ &:enabled:hover:not(:focus-visible, [aria-invalid="true"], [data-field-state]) {
214
+ border-color: color-mix(in srgb, var(--foreground) 70%, transparent);
215
+ }
216
+ }
217
+ }
218
+
219
+ @media (hover: hover) {
220
+ [data-slot="radio-group-item"]:enabled:hover [data-slot="radio-group-indicator"][data-state="unchecked"] {
221
+ visibility: visible;
222
+
223
+ > span {
224
+ background-color: color-mix(in srgb, var(--foreground) 35%, transparent);
225
+ }
226
+ }
227
+ }
228
+
229
+ [data-slot="input"][data-inline-label="hidden"]::placeholder {
230
+ opacity: 0;
231
+ }
232
+
233
+ @media (prefers-reduced-motion: no-preference) {
234
+ [data-slot="input"][data-inline-label]::placeholder {
235
+ transition: opacity 65ms ease-out;
236
+ }
237
+ }
238
+
239
+ @property --stoa-input-frame-collapse {
240
+ syntax: "<number>";
241
+ inherits: false;
242
+ initial-value: 0;
243
+ }
244
+
245
+ @media (forced-colors: none) {
246
+ [data-slot="input"][data-transition-style="fancy"]:enabled:is(
247
+ :not([type]), [type="text"], [type="search"], [type="email"],
248
+ [type="password"], [type="url"], [type="tel"], [type="number"]
249
+ ):not([aria-invalid="true"], [data-field-state]) {
250
+ --input-frame-color: var(--stoa-input-frame-color, color-mix(in oklab, var(--foreground) 35%, transparent));
251
+ --input-line-start: var(--stoa-input-line-inset, 0.875rem);
252
+ --input-line-end: var(--input-line-start);
253
+ --input-line-trim: clamp(0, (var(--stoa-input-frame-collapse) - 0.8) * 5, 1);
254
+ --input-line-width: calc(100% - (var(--input-line-start) + var(--input-line-end)) * var(--input-line-trim));
255
+ --input-line-position: calc(var(--input-line-start) * var(--input-line-trim));
256
+
257
+ background-origin: border-box;
258
+ background-repeat: no-repeat;
259
+
260
+ /* Keep an inset underline on engines without border-area clipping. */
261
+ --input-line-color: color-mix(in oklab, var(--input-frame-color) calc(var(--stoa-input-frame-collapse) * 100%), transparent);
262
+ border-color: color-mix(in oklab, transparent calc(var(--stoa-input-frame-collapse) * 100%), var(--input-frame-color));
263
+ background-image: linear-gradient(var(--input-line-color), var(--input-line-color));
264
+ background-size: var(--input-line-width) var(--ui-border-width);
265
+ background-position: var(--input-line-position) bottom;
266
+
267
+ &[data-has-icon] { --input-line-end: 2.625rem; }
268
+
269
+ @media (hover: hover) {
270
+ &:hover { --stoa-input-frame-collapse: 1; }
271
+ }
272
+
273
+ &:focus {
274
+ --stoa-input-frame-collapse: 1;
275
+ --input-frame-color: var(--foreground);
276
+ box-shadow: none;
277
+ }
278
+
279
+ @media (prefers-reduced-motion: no-preference) {
280
+ transition: --stoa-input-frame-collapse 240ms ease-in-out;
281
+ }
282
+
283
+ @supports (background-clip: border-area) {
284
+ /* Open the frame at the top, sweep down the sides, then inset the bottom stroke. */
285
+ --input-frame-angle: min(90deg, var(--stoa-input-frame-collapse) * 112.5deg);
286
+ border-color: transparent;
287
+ background-clip: border-area, border-box;
288
+ background-image: conic-gradient(
289
+ at center calc(100% - var(--ui-border-width)),
290
+ transparent 0deg var(--input-frame-angle),
291
+ var(--input-frame-color) var(--input-frame-angle) calc(360deg - var(--input-frame-angle)),
292
+ transparent calc(360deg - var(--input-frame-angle)) 360deg
293
+ ), none;
294
+ background-size: var(--input-line-width) 100%;
295
+ }
296
+ }
297
+ }
298
+
299
+ @property --stoa-switch-progress {
300
+ syntax: "<number>";
301
+ inherits: false;
302
+ initial-value: 0;
303
+ }
304
+
305
+ [data-slot="switch-thumb"] {
306
+ --stoa-switch-progress: 0;
307
+ translate: calc(var(--switch-travel, calc(100% - 2px)) * var(--stoa-switch-progress)) 0;
308
+ /* Stretch at mid-travel and return to full roundness at either end. */
309
+ scale: calc(1 + 0.64 * var(--stoa-switch-progress) * (1 - var(--stoa-switch-progress))) 1;
310
+ transition: --stoa-switch-progress 180ms ease, background-color 180ms ease;
311
+ }
312
+
313
+ [data-slot="switch-thumb"][data-state="checked"] {
314
+ --stoa-switch-progress: 1;
315
+ }
316
+
185
317
  @media (prefers-reduced-motion: reduce) {
186
318
  [data-slot="button"], [data-slot="input"], [data-slot="textarea"],
187
- [data-slot="native-select"], [data-slot="select-trigger"], [data-slot="toggle"] {
319
+ [data-slot="native-select"], [data-slot="select-trigger"], [data-slot="toggle"],
320
+ [data-slot="switch"], [data-slot="switch-thumb"] {
188
321
  transition: none;
189
322
  }
190
323
  }