@ada-cx/lovelace 1.13.0 → 1.15.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.
Files changed (90) hide show
  1. package/dist/components/AttachmentChip/AttachmentChip.css.js.map +1 -1
  2. package/dist/components/Banner/Banner.css.d.ts +19 -1
  3. package/dist/components/Banner/Banner.css.js +12 -2
  4. package/dist/components/Banner/Banner.css.js.map +1 -1
  5. package/dist/components/Banner/Banner.d.ts +22 -40
  6. package/dist/components/Banner/Banner.js +22 -19
  7. package/dist/components/Banner/Banner.js.map +1 -1
  8. package/dist/components/Banner/BannerContainer.d.ts +35 -0
  9. package/dist/components/Banner/BannerContainer.js +38 -0
  10. package/dist/components/Banner/BannerContainer.js.map +1 -0
  11. package/dist/components/Banner/BannerContainerSlide.d.ts +15 -0
  12. package/dist/components/Banner/BannerContainerSlide.js +26 -0
  13. package/dist/components/Banner/BannerContainerSlide.js.map +1 -0
  14. package/dist/components/Banner/index.d.ts +2 -1
  15. package/dist/components/Button/Button.css.js.map +1 -1
  16. package/dist/components/Checkbox/Checkbox.css.js.map +1 -1
  17. package/dist/components/Chip/Chip.css.js.map +1 -1
  18. package/dist/components/Dialog/Dialog.css.js.map +1 -1
  19. package/dist/components/Divider/Divider.css.js.map +1 -1
  20. package/dist/components/DropZone/DropZone.css.js.map +1 -1
  21. package/dist/components/Header/Header.css.js.map +1 -1
  22. package/dist/components/Header/HeaderTitle.d.ts +13 -4
  23. package/dist/components/Header/HeaderTitle.js +9 -7
  24. package/dist/components/Header/HeaderTitle.js.map +1 -1
  25. package/dist/components/Icon/icons/CheckmarkCircle.d.ts +2 -0
  26. package/dist/components/Icon/icons/CheckmarkCircle.js +14 -0
  27. package/dist/components/Icon/icons/CheckmarkCircle.js.map +1 -0
  28. package/dist/components/Icon/icons/index.d.ts +1 -0
  29. package/dist/components/Input/Input.css.js.map +1 -1
  30. package/dist/components/Link/Link.css.js.map +1 -1
  31. package/dist/components/MessageError/MessageError.css.js.map +1 -1
  32. package/dist/components/PillButton/PillButton.css.js.map +1 -1
  33. package/dist/components/ProactiveMessage/ProactiveMessage.css.js.map +1 -1
  34. package/dist/components/Radio/Radio.css.js.map +1 -1
  35. package/dist/components/ScrollMarker/ScrollMarker.css.js.map +1 -1
  36. package/dist/components/Sheet/Sheet.css.js.map +1 -1
  37. package/dist/components/Survey/SurveyRating/SurveyRating.css.js.map +1 -1
  38. package/dist/components/Text/Text.css.d.ts +13 -0
  39. package/dist/components/Text/Text.css.js +28 -0
  40. package/dist/components/Text/Text.css.js.map +1 -0
  41. package/dist/components/Text/Text.d.ts +30 -0
  42. package/dist/components/Text/Text.js +17 -0
  43. package/dist/components/Text/Text.js.map +1 -0
  44. package/dist/components/Text/index.d.ts +3 -0
  45. package/dist/components/ThinkingShimmer/ThinkingShimmer.css.js.map +1 -1
  46. package/dist/components/Toast/Toast.css.d.ts +36 -0
  47. package/dist/components/Toast/Toast.css.js +19 -0
  48. package/dist/components/Toast/Toast.css.js.map +1 -0
  49. package/dist/components/Toast/Toast.d.ts +52 -0
  50. package/dist/components/Toast/Toast.js +59 -0
  51. package/dist/components/Toast/Toast.js.map +1 -0
  52. package/dist/components/Toast/ToastContainer.d.ts +48 -0
  53. package/dist/components/Toast/ToastContainer.js +104 -0
  54. package/dist/components/Toast/ToastContainer.js.map +1 -0
  55. package/dist/components/{ToastRegion/ToastContent.d.ts → Toast/ToastItem.d.ts} +7 -2
  56. package/dist/components/Toast/index.d.ts +6 -0
  57. package/dist/components/{ToastRegion → Toast}/index.js +2 -1
  58. package/dist/components/Tooltip/Tooltip.css.js.map +1 -1
  59. package/dist/hooks/index.d.ts +1 -1
  60. package/dist/index.d.ts +2 -2
  61. package/dist/index.js +70 -67
  62. package/dist/style.css +1 -1
  63. package/dist/styles/typography.d.ts +32 -0
  64. package/dist/utils/animation.d.ts +0 -16
  65. package/dist/utils/animation.js +24 -50
  66. package/dist/utils/animation.js.map +1 -1
  67. package/package.json +2 -2
  68. package/dist/components/Banner/BannerSurface.d.ts +0 -17
  69. package/dist/components/Banner/BannerSurface.js +0 -65
  70. package/dist/components/Banner/BannerSurface.js.map +0 -1
  71. package/dist/components/ToastNotification/ToastNotification.css.d.ts +0 -17
  72. package/dist/components/ToastNotification/ToastNotification.css.js +0 -17
  73. package/dist/components/ToastNotification/ToastNotification.css.js.map +0 -1
  74. package/dist/components/ToastNotification/ToastNotification.d.ts +0 -55
  75. package/dist/components/ToastNotification/ToastNotification.js +0 -42
  76. package/dist/components/ToastNotification/ToastNotification.js.map +0 -1
  77. package/dist/components/ToastNotification/index.d.ts +0 -2
  78. package/dist/components/ToastRegion/ToastRegion.css.d.ts +0 -2
  79. package/dist/components/ToastRegion/ToastRegion.css.js +0 -7
  80. package/dist/components/ToastRegion/ToastRegion.css.js.map +0 -1
  81. package/dist/components/ToastRegion/ToastRegion.d.ts +0 -45
  82. package/dist/components/ToastRegion/ToastRegion.js +0 -38
  83. package/dist/components/ToastRegion/ToastRegion.js.map +0 -1
  84. package/dist/components/ToastRegion/ToastRegionItem.d.ts +0 -13
  85. package/dist/components/ToastRegion/ToastRegionItem.js +0 -49
  86. package/dist/components/ToastRegion/ToastRegionItem.js.map +0 -1
  87. package/dist/components/ToastRegion/ToastRegionLandmark.d.ts +0 -15
  88. package/dist/components/ToastRegion/ToastRegionLandmark.js +0 -62
  89. package/dist/components/ToastRegion/ToastRegionLandmark.js.map +0 -1
  90. package/dist/components/ToastRegion/index.d.ts +0 -4
@@ -1,16 +1,18 @@
1
1
  import { cx as e } from "../../utils/cx.js";
2
2
  import { headerTitle as t } from "./Header.css.js";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
+ import { Heading as r } from "react-aria-components";
4
5
  //#region src/components/Header/HeaderTitle.tsx
5
- function r({ className: r, children: i, ref: a, ...o }) {
6
- return /* @__PURE__ */ n("h1", {
7
- ...o,
8
- ref: a,
9
- className: e(t, r),
10
- children: i
6
+ function i({ level: i = 1, className: a, children: o, ref: s, ...c }) {
7
+ return /* @__PURE__ */ n(r, {
8
+ ...c,
9
+ level: i,
10
+ ref: s,
11
+ className: e(t, a),
12
+ children: o
11
13
  });
12
14
  }
13
15
  //#endregion
14
- export { r as HeaderTitle };
16
+ export { i as HeaderTitle };
15
17
 
16
18
  //# sourceMappingURL=HeaderTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderTitle.js","names":[],"sources":["../../../src/components/Header/HeaderTitle.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { headerTitle } from \"./Header.css.js\";\n\nexport interface HeaderTitleProps extends HTMLAttributes<HTMLElement> {\n\tref?: Ref<HTMLHeadingElement>;\n}\n\n/**\n * Header title text, rendered as the surface's top-level `<h1>`. Grows to fill\n * the bar and truncates with an ellipsis when the label is too long; inherits\n * `header-content` from the surrounding Header.\n */\nexport function HeaderTitle({\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: HeaderTitleProps) {\n\treturn (\n\t\t<h1 {...rest} ref={ref} className={cx(headerTitle, className)}>\n\t\t\t{children}\n\t\t</h1>\n\t);\n}\n"],"mappings":";;;;AAaA,SAAgB,EAAY,EAC3B,cACA,aACA,QACA,GAAG,KACiB;AACpB,QACC,kBAAC,MAAD;EAAI,GAAI;EAAW;EAAK,WAAW,EAAG,GAAa,EAAU;EAC3D;EACG,CAAA"}
1
+ {"version":3,"file":"HeaderTitle.js","names":[],"sources":["../../../src/components/Header/HeaderTitle.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { Heading } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { headerTitle } from \"./Header.css.js\";\n\nexport interface HeaderTitleProps extends HTMLAttributes<HTMLElement> {\n\t/**\n\t * Heading level. Defaults to `1` — the surface's top-level heading, and what\n\t * this rendered before it composed RAC. RAC's own default is `3`, so the\n\t * default here is load-bearing, not decoration. A widget embedded in a\n\t * customer's page may need to sit under that page's outline instead.\n\t */\n\tlevel?: number;\n\tref?: Ref<HTMLHeadingElement>;\n}\n\n/**\n * Header title text, the surface's heading. Grows to fill the bar and truncates\n * with an ellipsis when the label is too long; inherits `header-content` from\n * the surrounding Header.\n *\n * Figma draws it at the body tier — a heading by role, not by size.\n */\nexport function HeaderTitle({\n\tlevel = 1,\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: HeaderTitleProps) {\n\treturn (\n\t\t<Heading\n\t\t\t{...rest}\n\t\t\tlevel={level}\n\t\t\tref={ref}\n\t\t\tclassName={cx(headerTitle, className)}\n\t\t>\n\t\t\t{children}\n\t\t</Heading>\n\t);\n}\n"],"mappings":";;;;;AAuBA,SAAgB,EAAY,EAC3B,WAAQ,GACR,cACA,aACA,QACA,GAAG,KACiB;AACpB,QACC,kBAAC,GAAD;EACC,GAAI;EACG;EACF;EACL,WAAW,EAAG,GAAa,EAAU;EAEpC;EACQ,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from "../Icon.js";
2
+ export declare function CheckmarkCircle(props: Omit<IconProps, "children">): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { Icon as e } from "../Icon.js";
2
+ import { Glyph as t } from "./Glyph.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/components/Icon/icons/CheckmarkCircle.tsx
5
+ function i(i) {
6
+ return /* @__PURE__ */ n(e, {
7
+ ...i,
8
+ children: /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" }), /* @__PURE__ */ n("path", { d: "M15.70898 8.32129C16.08392 7.91605 16.71666 7.89096 17.12207 8.26562C17.5273 8.64056 17.5524 9.2733 17.17773 9.67871L10.6543 16.73047C10.46513 16.9347 10.19928 17.05068 9.9209 17.05078C9.64228 17.0508 9.3758 16.93492 9.18652 16.73047L6.46582 13.79004C6.09094 13.38466 6.11619 12.75198 6.52148 12.37695C6.92686 12.00215 7.55957 12.02637 7.93457 12.43164L9.91992 14.57812L15.70898 8.32129Z" })] })
9
+ });
10
+ }
11
+ //#endregion
12
+ export { i as CheckmarkCircle };
13
+
14
+ //# sourceMappingURL=CheckmarkCircle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckmarkCircle.js","names":[],"sources":["../../../../src/components/Icon/icons/CheckmarkCircle.tsx"],"sourcesContent":["import type { IconProps } from \"../Icon.js\";\nimport { Icon } from \"../Icon.js\";\nimport { Glyph } from \"./Glyph.js\";\n\nexport function CheckmarkCircle(props: Omit<IconProps, \"children\">) {\n\treturn (\n\t\t<Icon {...props}>\n\t\t\t<Glyph>\n\t\t\t\t<path d=\"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z\" />\n\t\t\t\t<path d=\"M15.70898 8.32129C16.08392 7.91605 16.71666 7.89096 17.12207 8.26562C17.5273 8.64056 17.5524 9.2733 17.17773 9.67871L10.6543 16.73047C10.46513 16.9347 10.19928 17.05068 9.9209 17.05078C9.64228 17.0508 9.3758 16.93492 9.18652 16.73047L6.46582 13.79004C6.09094 13.38466 6.11619 12.75198 6.52148 12.37695C6.92686 12.00215 7.55957 12.02637 7.93457 12.43164L9.91992 14.57812L15.70898 8.32129Z\" />\n\t\t\t</Glyph>\n\t\t</Icon>\n\t);\n}\n"],"mappings":";;;;AAIA,SAAgB,EAAgB,GAAoC;AACnE,QACC,kBAAC,GAAD;EAAM,GAAI;YACT,kBAAC,GAAD,EAAA,UAAA,CACC,kBAAC,QAAD,EAAM,GAAE,oOAAqO,CAAA,EAC7O,kBAAC,QAAD,EAAM,GAAE,uYAAwY,CAAA,CACzY,EAAA,CAAA;EACF,CAAA"}
@@ -7,6 +7,7 @@ export { ArrowRight } from "./ArrowRight.js";
7
7
  export { Bell } from "./Bell.js";
8
8
  export { BellSlash } from "./BellSlash.js";
9
9
  export { Checkmark } from "./Checkmark.js";
10
+ export { CheckmarkCircle } from "./CheckmarkCircle.js";
10
11
  export { ChevronLeft } from "./ChevronLeft.js";
11
12
  export { ChevronRight } from "./ChevronRight.js";
12
13
  export { CloudUpload } from "./CloudUpload.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Input.css.js","names":[],"sources":["../../../src/components/Input/Input.css.ts"],"sourcesContent":["import type { ComplexStyleRule } from \"@vanilla-extract/css\";\nimport { globalStyle, style } from \"@vanilla-extract/css\";\nimport type { RuntimeFn } from \"@vanilla-extract/recipes\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\n// Shared by the text control and the label so their typography stays in lockstep.\nconst bodyText = {\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n} as const;\n\n// Field and action-button icon glyphs share sizing.\nconst iconSlotSizing = {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n} as const;\n\nexport const inputRoot = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\twidth: \"100%\",\n\tfontFamily: t(\"font-family-body\"),\n});\n\n// Empty style used purely as a stable selector anchor for the globalStyle rules\n// below — a recipe class isn't a usable selector string, so descendant styles\n// hang off this base class instead.\nconst inputFieldBase = style({});\n\n// Composer-variant anchor: composed into the `composer` variant so the control's\n// content/placeholder colors (a descendant, not the field) can be re-themed to\n// the composer-* tokens via globalStyle.\nconst inputFieldComposer = style({});\n\n/**\n * Shares the line below the control with the field's own button rather than\n * taking a line of its own: Figma bottom-aligns the chips and the send action\n * on one line, which `Input.Field`'s `align-items: flex-end` then handles.\n */\nexport const inputAttachments = style({\n\tflex: \"1 1 auto\",\n\tminWidth: 0,\n\tdisplay: \"flex\",\n\tflexWrap: \"wrap\",\n\tgap: t(\"gap-8\"),\n});\n\n// Explicit annotation: the inferred recipe type exceeds tsc's declaration\n// serialization limit (TS7056) under `tsc -p tsconfig.build.json`.\nexport const inputField: RuntimeFn<{\n\tvariant: Record<\"default\" | \"composer\", ComplexStyleRule>;\n}> = recipe({\n\tbase: [\n\t\tinputFieldBase,\n\t\t{\n\t\t\tdisplay: \"flex\",\n\t\t\t// The control takes the whole first line whenever attachments are present\n\t\t\t// (see the `data-has-attachments` rule below), so the chips and the button\n\t\t\t// wrap onto the second. Keep wrapping unconditional because Chrome and\n\t\t\t// Firefox at the floor in `messaging/vite.browser-targets.mjs` lack\n\t\t\t// `:has()`. Without attachments nothing wraps: the control has\n\t\t\t// flex-basis 0, icons and button are 22px.\n\t\t\tflexWrap: \"wrap\",\n\t\t\talignItems: \"flex-end\",\n\t\t\tgap: t(\"gap-8\"),\n\t\t\twidth: \"100%\",\n\t\t\tminHeight: \"40px\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tpaddingInline: t(\"padding-12\"),\n\t\t\tpaddingBlock: t(\"padding-8\"),\n\t\t\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\t\t\tbackgroundColor: t(\"color-background-default\"),\n\t\t\tborderRadius: t(\"border-radius-input\"),\n\t\t\tcursor: \"text\",\n\t\t\tselectors: {\n\t\t\t\t\"&[data-focus-within]\": {\n\t\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t\t},\n\t\t\t\t// After focus-within so an invalid field keeps its destructive border while focused.\n\t\t\t\t\"&[data-invalid]\": {\n\t\t\t\t\tborderColor: t(\"color-border-destructive\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-disabled]\": {\n\t\t\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"@media\": {\n\t\t\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\t\t\ttransitionProperty: \"border-color, box-shadow\",\n\t\t\t\t\ttransitionDuration: t(\"duration-fast\"),\n\t\t\t\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\t\t},\n\t\t\t\t// Token-color focus ring flattens in forced-colors; redraw with a system color.\n\t\t\t\t\"(forced-colors: active)\": {\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-within]\": {\n\t\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\t// Default field styling lives in `base`; this key exists so the variant\n\t\t\t// axis accepts \"default\" as an explicit no-op.\n\t\t\tdefault: {},\n\t\t\tcomposer: [\n\t\t\t\tinputFieldComposer,\n\t\t\t\t{\n\t\t\t\t\tborderRadius: t(\"border-radius-composer\"),\n\t\t\t\t\tborder: `${t(\"border-width-default\")} solid ${t(\"composer-border-default\")}`,\n\t\t\t\t\tbackgroundColor: t(\"composer-background\"),\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-within]\": {\n\t\t\t\t\t\t\tborderColor: t(\"composer-border-active\"),\n\t\t\t\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"composer-border-focus\")}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// Re-declared after focus-within for the same reason the base does:\n\t\t\t\t\t\t// variant styles are emitted after base at equal specificity, so\n\t\t\t\t\t\t// without this the composer's focus colour would win and an invalid\n\t\t\t\t\t\t// composer would lose its destructive border while focused.\n\t\t\t\t\t\t\"&[data-invalid]\": {\n\t\t\t\t\t\t\tborderColor: t(\"color-border-destructive\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t},\n});\n\nexport const inputControl = style({\n\tflex: 1,\n\tminWidth: 0,\n\tmargin: 0,\n\tpadding: 0,\n\tborder: \"none\",\n\tbackgroundColor: \"transparent\",\n\toutline: \"none\",\n\tappearance: \"none\",\n\t...bodyText,\n\tcolor: t(\"color-content-default\"),\n\tselectors: {\n\t\t\"&::placeholder\": {\n\t\t\tcolor: t(\"color-content-secondary\"),\n\t\t\topacity: 1,\n\t\t},\n\t\t\"&[data-disabled]\": {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\tcursor: \"not-allowed\",\n\t\t},\n\t\t\"&[data-disabled]::placeholder\": {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n});\n\n// Same control base as the single-line inputControl (typography, colors,\n// placeholder/disabled states), plus the multi-line-specific box behavior.\nexport const inputTextArea = style([\n\tinputControl,\n\t{\n\t\tdisplay: \"block\",\n\t\twidth: \"100%\",\n\t\tboxSizing: \"border-box\",\n\t\t// Height is driven by the auto-grow logic in InputTextArea; the user never drags it.\n\t\tresize: \"none\",\n\t\toverflowY: \"auto\",\n\t\toverflowWrap: \"anywhere\",\n\t\twordBreak: \"break-word\",\n\t\tscrollbarWidth: \"thin\",\n\t\tscrollbarColor: `${t(\"color-border-default\")} transparent`,\n\t},\n]);\n\nexport const inputButton = style({\n\tposition: \"relative\",\n\tisolation: \"isolate\",\n\tdisplay: \"inline-flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tflexShrink: 0,\n\t// Circular send/action button — 22px square per Figma (matches the field's icon size).\n\twidth: \"22px\",\n\theight: \"22px\",\n\tpadding: 0,\n\tborder: \"none\",\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: t(\"button-primary-background\"),\n\tcolor: t(\"button-primary-content\"),\n\tcursor: \"pointer\",\n\tappearance: \"none\",\n\toutline: \"none\",\n\toverflow: \"hidden\",\n\t\"::after\": {\n\t\tcontent: '\"\"',\n\t\tposition: \"absolute\",\n\t\tinset: 0,\n\t\tborderRadius: \"inherit\",\n\t\tbackgroundColor: \"currentColor\",\n\t\topacity: 0,\n\t\tpointerEvents: \"none\",\n\t\tzIndex: -1,\n\t},\n\tselectors: {\n\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t},\n\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t},\n\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t},\n\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t},\n\t\t\"&[data-disabled]\": {\n\t\t\tcursor: \"not-allowed\",\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\tselectors: {\n\t\t\t\t\"&::after\": {\n\t\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// Token-color focus ring flattens in forced-colors; redraw with a system color.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport const inputLabel = style({\n\t...bodyText,\n\tmarginBottom: t(\"gap-8\"),\n\tcolor: t(\"color-content-default\"),\n});\n\nexport const inputHelperText = style({\n\tmarginTop: t(\"gap-4\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-caption\"),\n\tlineHeight: t(\"line-height-caption\"),\n\tcolor: t(\"color-content-secondary\"),\n\tselectors: {\n\t\t\"&[data-invalid]\": {\n\t\t\tcolor: t(\"color-content-destructive\"),\n\t\t},\n\t},\n});\n\nglobalStyle(`${inputFieldBase} [data-slot='icon']`, iconSlotSizing);\nglobalStyle(`${inputButton} [data-slot='icon']`, iconSlotSizing);\n\n// Direct child only: field-level icons follow content color. The send button's\n// icon is a deeper descendant, so it deliberately has no rule of its own — it\n// inherits the button's paired tokens (button-primary-content over\n// button-primary-background, or the disabled pair). Giving the icon its own\n// background re-pairs an accent foreground with a neutral backdrop, and those\n// two are unrelated tokens: a customer tint near the surface color then renders\n// the arrow at ~1:1.\nglobalStyle(`${inputFieldBase} > [data-slot='icon']`, {\n\tcolor: t(\"color-content-secondary\"),\n});\n\nglobalStyle(`${inputFieldBase}[data-disabled] > [data-slot='icon']`, {\n\tcolor: t(\"color-content-disabled\"),\n});\n\n// Composer variant re-themes the field's content colors to the composer-* tokens.\n// The control (input/textarea) and field-level icons are descendants of the field,\n// so these ride the composer anchor rather than the field recipe.\n/**\n * With attachments in the field the control owns the first line, so the chips\n * and the send button fall onto the second and bottom-align there.\n *\n * Driven by an attribute the caller sets rather than `:has()`, which the iOS 15\n * baseline does not have.\n */\nglobalStyle(`${inputFieldBase}[data-has-attachments] ${inputControl}`, {\n\tflexBasis: \"100%\",\n});\n\n// Figma stacks the text and the chips 20px apart while the send button keeps its\n// 8px from the chips, so the two axes take different gaps.\nglobalStyle(`${inputFieldBase}[data-has-attachments]`, {\n\trowGap: t(\"gap-20\"),\n});\n\nglobalStyle(`${inputFieldComposer} ${inputControl}`, {\n\tcolor: t(\"composer-content-default\"),\n});\n\nglobalStyle(`${inputFieldComposer} ${inputControl}::placeholder`, {\n\tcolor: t(\"composer-content-secondary\"),\n});\n\nglobalStyle(`${inputFieldComposer} > [data-slot='icon']`, {\n\tcolor: t(\"composer-content-secondary\"),\n});\n\n// The composer rules above are descendant selectors, so they tie with the field\n// recipe's [data-disabled] rules on specificity and win on order. Re-assert the\n// disabled colors after them or a disabled control renders as if it were editable.\nglobalStyle(`${inputFieldComposer} ${inputControl}[data-disabled]`, {\n\tcolor: t(\"color-content-disabled\"),\n});\n\nglobalStyle(\n\t`${inputFieldComposer} ${inputControl}[data-disabled]::placeholder`,\n\t{\n\t\tcolor: t(\"color-content-disabled\"),\n\t},\n);\n"],"mappings":""}
1
+ {"version":3,"file":"Input.css.js","names":[],"sources":["../../../src/components/Input/Input.css.ts"],"sourcesContent":["import type { ComplexStyleRule } from \"@vanilla-extract/css\";\nimport { globalStyle, style } from \"@vanilla-extract/css\";\nimport type { RuntimeFn } from \"@vanilla-extract/recipes\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\n// Shared by the text control and the label so their typography stays in lockstep.\nconst bodyText = {\n\t...typography(\"body\", \"regular\"),\n} as const;\n\n// Field and action-button icon glyphs share sizing.\nconst iconSlotSizing = {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n} as const;\n\nexport const inputRoot = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\twidth: \"100%\",\n\tfontFamily: t(\"font-family-body\"),\n});\n\n// Empty style used purely as a stable selector anchor for the globalStyle rules\n// below — a recipe class isn't a usable selector string, so descendant styles\n// hang off this base class instead.\nconst inputFieldBase = style({});\n\n// Composer-variant anchor: composed into the `composer` variant so the control's\n// content/placeholder colors (a descendant, not the field) can be re-themed to\n// the composer-* tokens via globalStyle.\nconst inputFieldComposer = style({});\n\n/**\n * Shares the line below the control with the field's own button rather than\n * taking a line of its own: Figma bottom-aligns the chips and the send action\n * on one line, which `Input.Field`'s `align-items: flex-end` then handles.\n */\nexport const inputAttachments = style({\n\tflex: \"1 1 auto\",\n\tminWidth: 0,\n\tdisplay: \"flex\",\n\tflexWrap: \"wrap\",\n\tgap: t(\"gap-8\"),\n});\n\n// Explicit annotation: the inferred recipe type exceeds tsc's declaration\n// serialization limit (TS7056) under `tsc -p tsconfig.build.json`.\nexport const inputField: RuntimeFn<{\n\tvariant: Record<\"default\" | \"composer\", ComplexStyleRule>;\n}> = recipe({\n\tbase: [\n\t\tinputFieldBase,\n\t\t{\n\t\t\tdisplay: \"flex\",\n\t\t\t// The control takes the whole first line whenever attachments are present\n\t\t\t// (see the `data-has-attachments` rule below), so the chips and the button\n\t\t\t// wrap onto the second. Keep wrapping unconditional because Chrome and\n\t\t\t// Firefox at the floor in `messaging/vite.browser-targets.mjs` lack\n\t\t\t// `:has()`. Without attachments nothing wraps: the control has\n\t\t\t// flex-basis 0, icons and button are 22px.\n\t\t\tflexWrap: \"wrap\",\n\t\t\talignItems: \"flex-end\",\n\t\t\tgap: t(\"gap-8\"),\n\t\t\twidth: \"100%\",\n\t\t\tminHeight: \"40px\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tpaddingInline: t(\"padding-12\"),\n\t\t\tpaddingBlock: t(\"padding-8\"),\n\t\t\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\t\t\tbackgroundColor: t(\"color-background-default\"),\n\t\t\tborderRadius: t(\"border-radius-input\"),\n\t\t\tcursor: \"text\",\n\t\t\tselectors: {\n\t\t\t\t\"&[data-focus-within]\": {\n\t\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t\t},\n\t\t\t\t// After focus-within so an invalid field keeps its destructive border while focused.\n\t\t\t\t\"&[data-invalid]\": {\n\t\t\t\t\tborderColor: t(\"color-border-destructive\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-disabled]\": {\n\t\t\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"@media\": {\n\t\t\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\t\t\ttransitionProperty: \"border-color, box-shadow\",\n\t\t\t\t\ttransitionDuration: t(\"duration-fast\"),\n\t\t\t\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\t\t},\n\t\t\t\t// Token-color focus ring flattens in forced-colors; redraw with a system color.\n\t\t\t\t\"(forced-colors: active)\": {\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-within]\": {\n\t\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tvariants: {\n\t\tvariant: {\n\t\t\t// Default field styling lives in `base`; this key exists so the variant\n\t\t\t// axis accepts \"default\" as an explicit no-op.\n\t\t\tdefault: {},\n\t\t\tcomposer: [\n\t\t\t\tinputFieldComposer,\n\t\t\t\t{\n\t\t\t\t\tborderRadius: t(\"border-radius-composer\"),\n\t\t\t\t\tborder: `${t(\"border-width-default\")} solid ${t(\"composer-border-default\")}`,\n\t\t\t\t\tbackgroundColor: t(\"composer-background\"),\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-within]\": {\n\t\t\t\t\t\t\tborderColor: t(\"composer-border-active\"),\n\t\t\t\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"composer-border-focus\")}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// Re-declared after focus-within for the same reason the base does:\n\t\t\t\t\t\t// variant styles are emitted after base at equal specificity, so\n\t\t\t\t\t\t// without this the composer's focus colour would win and an invalid\n\t\t\t\t\t\t// composer would lose its destructive border while focused.\n\t\t\t\t\t\t\"&[data-invalid]\": {\n\t\t\t\t\t\t\tborderColor: t(\"color-border-destructive\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"default\",\n\t},\n});\n\nexport const inputControl = style({\n\tflex: 1,\n\tminWidth: 0,\n\tmargin: 0,\n\tpadding: 0,\n\tborder: \"none\",\n\tbackgroundColor: \"transparent\",\n\toutline: \"none\",\n\tappearance: \"none\",\n\t...bodyText,\n\tcolor: t(\"color-content-default\"),\n\tselectors: {\n\t\t\"&::placeholder\": {\n\t\t\tcolor: t(\"color-content-secondary\"),\n\t\t\topacity: 1,\n\t\t},\n\t\t\"&[data-disabled]\": {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\tcursor: \"not-allowed\",\n\t\t},\n\t\t\"&[data-disabled]::placeholder\": {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n});\n\n// Same control base as the single-line inputControl (typography, colors,\n// placeholder/disabled states), plus the multi-line-specific box behavior.\nexport const inputTextArea = style([\n\tinputControl,\n\t{\n\t\tdisplay: \"block\",\n\t\twidth: \"100%\",\n\t\tboxSizing: \"border-box\",\n\t\t// Height is driven by the auto-grow logic in InputTextArea; the user never drags it.\n\t\tresize: \"none\",\n\t\toverflowY: \"auto\",\n\t\toverflowWrap: \"anywhere\",\n\t\twordBreak: \"break-word\",\n\t\tscrollbarWidth: \"thin\",\n\t\tscrollbarColor: `${t(\"color-border-default\")} transparent`,\n\t},\n]);\n\nexport const inputButton = style({\n\tposition: \"relative\",\n\tisolation: \"isolate\",\n\tdisplay: \"inline-flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tflexShrink: 0,\n\t// Circular send/action button — 22px square per Figma (matches the field's icon size).\n\twidth: \"22px\",\n\theight: \"22px\",\n\tpadding: 0,\n\tborder: \"none\",\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: t(\"button-primary-background\"),\n\tcolor: t(\"button-primary-content\"),\n\tcursor: \"pointer\",\n\tappearance: \"none\",\n\toutline: \"none\",\n\toverflow: \"hidden\",\n\t\"::after\": {\n\t\tcontent: '\"\"',\n\t\tposition: \"absolute\",\n\t\tinset: 0,\n\t\tborderRadius: \"inherit\",\n\t\tbackgroundColor: \"currentColor\",\n\t\topacity: 0,\n\t\tpointerEvents: \"none\",\n\t\tzIndex: -1,\n\t},\n\tselectors: {\n\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t},\n\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t},\n\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t},\n\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t},\n\t\t\"&[data-disabled]\": {\n\t\t\tcursor: \"not-allowed\",\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\tselectors: {\n\t\t\t\t\"&::after\": {\n\t\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\t// Token-color focus ring flattens in forced-colors; redraw with a system color.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport const inputLabel = style({\n\t...bodyText,\n\tmarginBottom: t(\"gap-8\"),\n\tcolor: t(\"color-content-default\"),\n});\n\nexport const inputHelperText = style({\n\tmarginTop: t(\"gap-4\"),\n\t...typography(\"caption\", \"regular\"),\n\tcolor: t(\"color-content-secondary\"),\n\tselectors: {\n\t\t\"&[data-invalid]\": {\n\t\t\tcolor: t(\"color-content-destructive\"),\n\t\t},\n\t},\n});\n\nglobalStyle(`${inputFieldBase} [data-slot='icon']`, iconSlotSizing);\nglobalStyle(`${inputButton} [data-slot='icon']`, iconSlotSizing);\n\n// Direct child only: field-level icons follow content color. The send button's\n// icon is a deeper descendant, so it deliberately has no rule of its own — it\n// inherits the button's paired tokens (button-primary-content over\n// button-primary-background, or the disabled pair). Giving the icon its own\n// background re-pairs an accent foreground with a neutral backdrop, and those\n// two are unrelated tokens: a customer tint near the surface color then renders\n// the arrow at ~1:1.\nglobalStyle(`${inputFieldBase} > [data-slot='icon']`, {\n\tcolor: t(\"color-content-secondary\"),\n});\n\nglobalStyle(`${inputFieldBase}[data-disabled] > [data-slot='icon']`, {\n\tcolor: t(\"color-content-disabled\"),\n});\n\n// Composer variant re-themes the field's content colors to the composer-* tokens.\n// The control (input/textarea) and field-level icons are descendants of the field,\n// so these ride the composer anchor rather than the field recipe.\n/**\n * With attachments in the field the control owns the first line, so the chips\n * and the send button fall onto the second and bottom-align there.\n *\n * Driven by an attribute the caller sets rather than `:has()`, which the iOS 15\n * baseline does not have.\n */\nglobalStyle(`${inputFieldBase}[data-has-attachments] ${inputControl}`, {\n\tflexBasis: \"100%\",\n});\n\n// Figma stacks the text and the chips 20px apart while the send button keeps its\n// 8px from the chips, so the two axes take different gaps.\nglobalStyle(`${inputFieldBase}[data-has-attachments]`, {\n\trowGap: t(\"gap-20\"),\n});\n\nglobalStyle(`${inputFieldComposer} ${inputControl}`, {\n\tcolor: t(\"composer-content-default\"),\n});\n\nglobalStyle(`${inputFieldComposer} ${inputControl}::placeholder`, {\n\tcolor: t(\"composer-content-secondary\"),\n});\n\nglobalStyle(`${inputFieldComposer} > [data-slot='icon']`, {\n\tcolor: t(\"composer-content-secondary\"),\n});\n\n// The composer rules above are descendant selectors, so they tie with the field\n// recipe's [data-disabled] rules on specificity and win on order. Re-assert the\n// disabled colors after them or a disabled control renders as if it were editable.\nglobalStyle(`${inputFieldComposer} ${inputControl}[data-disabled]`, {\n\tcolor: t(\"color-content-disabled\"),\n});\n\nglobalStyle(\n\t`${inputFieldComposer} ${inputControl}[data-disabled]::placeholder`,\n\t{\n\t\tcolor: t(\"color-content-disabled\"),\n\t},\n);\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Link.css.js","names":[],"sources":["../../../src/components/Link/Link.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\nconst linkBase = style({});\n\nexport const linkRoot = recipe({\n\tbase: [\n\t\tlinkBase,\n\t\t{\n\t\t\tposition: \"relative\",\n\t\t\tisolation: \"isolate\",\n\t\t\tdisplay: \"inline-flex\",\n\t\t\talignItems: \"center\",\n\t\t\tgap: t(\"gap-4\"),\n\t\t\tcolor: t(\"color-content-link\"),\n\t\t\tfontFamily: t(\"font-family-body\"),\n\t\t\tfontWeight: t(\"font-weight-regular\"),\n\t\t\tfontSize: t(\"font-size-body\"),\n\t\t\tlineHeight: t(\"line-height-body\"),\n\t\t\twordBreak: \"break-word\",\n\t\t\ttextDecoration: \"none\",\n\t\t\tcursor: \"pointer\",\n\t\t\toutline: \"none\",\n\t\t\tborderRadius: t(\"border-radius-6\"),\n\t\t\t\"::after\": {\n\t\t\t\tcontent: '\"\"',\n\t\t\t\tposition: \"absolute\",\n\t\t\t\t// Horizontal breathing room lives on the decorative overlay, not the\n\t\t\t\t// element box, so the state layer balances against the icon's trailing\n\t\t\t\t// whitespace without altering the link's inline layout footprint.\n\t\t\t\tinsetBlock: 0,\n\t\t\t\tinsetInline: `calc(-1 * ${t(\"padding-4\")})`,\n\t\t\t\tborderRadius: \"inherit\",\n\t\t\t\tbackgroundColor: \"currentColor\",\n\t\t\t\topacity: 0,\n\t\t\t\tpointerEvents: \"none\",\n\t\t\t\tzIndex: -1,\n\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t},\n\t\t\tselectors: {\n\t\t\t\t// Without the trailing icon, the underline is the only non-color\n\t\t\t\t// signal that this is a link, so it is mandatory when no icon shows.\n\t\t\t\t\"&:not([data-icon])\": {\n\t\t\t\t\ttextDecoration: \"underline\",\n\t\t\t\t},\n\t\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t\t},\n\t\t\t\t\"&[data-disabled]\": {\n\t\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"@media\": {\n\t\t\t\t\"(forced-colors: active)\": {\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tvariants: {\n\t\tunderlined: {\n\t\t\ttrue: { textDecoration: \"underline\" },\n\t\t\tfalse: {},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tunderlined: false,\n\t},\n});\n\nglobalStyle(`${linkBase} [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n\n// The external-link arrow points outward in the reading direction, so it mirrors\n// under RTL. The download glyph is direction-neutral and is left unmirrored.\nglobalStyle(`[dir=\"rtl\"] ${linkBase}:not([data-download]) [data-slot='icon']`, {\n\ttransform: \"scaleX(-1)\",\n});\n"],"mappings":""}
1
+ {"version":3,"file":"Link.css.js","names":[],"sources":["../../../src/components/Link/Link.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\nconst linkBase = style({});\n\nexport const linkRoot = recipe({\n\tbase: [\n\t\tlinkBase,\n\t\t{\n\t\t\tposition: \"relative\",\n\t\t\tisolation: \"isolate\",\n\t\t\tdisplay: \"inline-flex\",\n\t\t\talignItems: \"center\",\n\t\t\tgap: t(\"gap-4\"),\n\t\t\tcolor: t(\"color-content-link\"),\n\t\t\t...typography(\"body\", \"regular\"),\n\t\t\twordBreak: \"break-word\",\n\t\t\ttextDecoration: \"none\",\n\t\t\tcursor: \"pointer\",\n\t\t\toutline: \"none\",\n\t\t\tborderRadius: t(\"border-radius-6\"),\n\t\t\t\"::after\": {\n\t\t\t\tcontent: '\"\"',\n\t\t\t\tposition: \"absolute\",\n\t\t\t\t// Horizontal breathing room lives on the decorative overlay, not the\n\t\t\t\t// element box, so the state layer balances against the icon's trailing\n\t\t\t\t// whitespace without altering the link's inline layout footprint.\n\t\t\t\tinsetBlock: 0,\n\t\t\t\tinsetInline: `calc(-1 * ${t(\"padding-4\")})`,\n\t\t\t\tborderRadius: \"inherit\",\n\t\t\t\tbackgroundColor: \"currentColor\",\n\t\t\t\topacity: 0,\n\t\t\t\tpointerEvents: \"none\",\n\t\t\t\tzIndex: -1,\n\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t},\n\t\t\tselectors: {\n\t\t\t\t// Without the trailing icon, the underline is the only non-color\n\t\t\t\t// signal that this is a link, so it is mandatory when no icon shows.\n\t\t\t\t\"&:not([data-icon])\": {\n\t\t\t\t\ttextDecoration: \"underline\",\n\t\t\t\t},\n\t\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t\t},\n\t\t\t\t\"&[data-disabled]\": {\n\t\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"@media\": {\n\t\t\t\t\"(forced-colors: active)\": {\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tvariants: {\n\t\tunderlined: {\n\t\t\ttrue: { textDecoration: \"underline\" },\n\t\t\tfalse: {},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tunderlined: false,\n\t},\n});\n\nglobalStyle(`${linkBase} [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n\n// The external-link arrow points outward in the reading direction, so it mirrors\n// under RTL. The download glyph is direction-neutral and is left unmirrored.\nglobalStyle(`[dir=\"rtl\"] ${linkBase}:not([data-download]) [data-slot='icon']`, {\n\ttransform: \"scaleX(-1)\",\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageError.css.js","names":[],"sources":["../../../src/components/MessageError/MessageError.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\nexport const messageErrorRoot = style({\n\tdisplay: \"flex\",\n});\n\n// Shared layout for the failed-to-send row — icon + destructive-colored caption.\n// Used both interactively (the retry Button) and statically (no `onRetry`).\nexport const messageErrorContent = style({\n\tdisplay: \"inline-flex\",\n\talignItems: \"center\",\n\t// Sized to the error icon, and reserved even in the static variant that carries\n\t// none, so the row does not change height when a retry becomes available.\n\tminHeight: t(\"icon-size-lg\"),\n\tgap: t(\"gap-4\"),\n\tmargin: 0,\n\tcolor: t(\"color-content-destructive\"),\n});\n\n// The interactive retry control layers button affordances over the shared row.\nexport const messageErrorRetry = style([\n\tmessageErrorContent,\n\t{\n\t\tpadding: 0,\n\t\tborder: \"none\",\n\t\tbackground: \"none\",\n\t\tborderRadius: t(\"border-radius-6\"),\n\t\tcursor: \"pointer\",\n\t\toutline: \"none\",\n\t\tselectors: {\n\t\t\t\"&[data-focus-visible]\": {\n\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t},\n\t\t},\n\t\t\"@media\": {\n\t\t\t\"(forced-colors: active)\": {\n\t\t\t\tselectors: {\n\t\t\t\t\t\"&[data-focus-visible]\": {\n\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n]);\n\n// Carries the announced failure copy as real text (live regions announce\n// rendered text, not `aria-label`), while staying out of the visual layout.\nexport const messageErrorAnnouncement = style({\n\tposition: \"absolute\",\n\twidth: 1,\n\theight: 1,\n\tpadding: 0,\n\tmargin: -1,\n\toverflow: \"hidden\",\n\tclip: \"rect(0, 0, 0, 0)\",\n\twhiteSpace: \"nowrap\",\n\tborder: 0,\n\t// Clipped text is still selectable, so a select-all over the transcript would\n\t// otherwise copy the failure copy twice (EXP-1479).\n\tuserSelect: \"none\",\n\tWebkitUserSelect: \"none\",\n});\n\nexport const messageErrorText = style({\n\tmargin: 0,\n\tcolor: \"inherit\",\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-caption\"),\n\tlineHeight: t(\"line-height-caption\"),\n});\n\n// The exclamation.sync glyph renders at icon-size-lg (24px, Figma), driving\n// `<Icon>`'s 1em box — the same value that sets the row's reserved min-height.\nglobalStyle(`${messageErrorContent} [data-slot='icon']`, {\n\tfontSize: t(\"icon-size-lg\"),\n});\n"],"mappings":""}
1
+ {"version":3,"file":"MessageError.css.js","names":[],"sources":["../../../src/components/MessageError/MessageError.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\nexport const messageErrorRoot = style({\n\tdisplay: \"flex\",\n});\n\n// Shared layout for the failed-to-send row — icon + destructive-colored caption.\n// Used both interactively (the retry Button) and statically (no `onRetry`).\nexport const messageErrorContent = style({\n\tdisplay: \"inline-flex\",\n\talignItems: \"center\",\n\t// Sized to the error icon, and reserved even in the static variant that carries\n\t// none, so the row does not change height when a retry becomes available.\n\tminHeight: t(\"icon-size-lg\"),\n\tgap: t(\"gap-4\"),\n\tmargin: 0,\n\tcolor: t(\"color-content-destructive\"),\n});\n\n// The interactive retry control layers button affordances over the shared row.\nexport const messageErrorRetry = style([\n\tmessageErrorContent,\n\t{\n\t\tpadding: 0,\n\t\tborder: \"none\",\n\t\tbackground: \"none\",\n\t\tborderRadius: t(\"border-radius-6\"),\n\t\tcursor: \"pointer\",\n\t\toutline: \"none\",\n\t\tselectors: {\n\t\t\t\"&[data-focus-visible]\": {\n\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t},\n\t\t},\n\t\t\"@media\": {\n\t\t\t\"(forced-colors: active)\": {\n\t\t\t\tselectors: {\n\t\t\t\t\t\"&[data-focus-visible]\": {\n\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n]);\n\n// Carries the announced failure copy as real text (live regions announce\n// rendered text, not `aria-label`), while staying out of the visual layout.\nexport const messageErrorAnnouncement = style({\n\tposition: \"absolute\",\n\twidth: 1,\n\theight: 1,\n\tpadding: 0,\n\tmargin: -1,\n\toverflow: \"hidden\",\n\tclip: \"rect(0, 0, 0, 0)\",\n\twhiteSpace: \"nowrap\",\n\tborder: 0,\n\t// Clipped text is still selectable, so a select-all over the transcript would\n\t// otherwise copy the failure copy twice (EXP-1479).\n\tuserSelect: \"none\",\n\tWebkitUserSelect: \"none\",\n});\n\nexport const messageErrorText = style({\n\tmargin: 0,\n\tcolor: \"inherit\",\n\t...typography(\"caption\", \"regular\"),\n});\n\n// The exclamation.sync glyph renders at icon-size-lg (24px, Figma), driving\n// `<Icon>`'s 1em box — the same value that sets the row's reserved min-height.\nglobalStyle(`${messageErrorContent} [data-slot='icon']`, {\n\tfontSize: t(\"icon-size-lg\"),\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PillButton.css.js","names":[],"sources":["../../../src/components/PillButton/PillButton.css.ts"],"sourcesContent":["import { globalStyle } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\nexport const pillButtonRoot = recipe({\n\tbase: {\n\t\tposition: \"relative\",\n\t\tisolation: \"isolate\",\n\t\tdisplay: \"inline-flex\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tgap: t(\"gap-8\"),\n\t\tpaddingInline: t(\"padding-12\"),\n\t\tboxSizing: \"border-box\",\n\t\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\t\tborderRadius: t(\"border-radius-pill\"),\n\t\tbackgroundColor: t(\"color-background-default\"),\n\t\tcolor: t(\"pill-content-primary\"),\n\t\tfontFamily: t(\"font-family-body\"),\n\t\tfontWeight: t(\"font-weight-medium\"),\n\t\tfontSize: t(\"font-size-body\"),\n\t\tlineHeight: t(\"line-height-body\"),\n\t\twhiteSpace: \"nowrap\",\n\t\tcursor: \"pointer\",\n\t\tuserSelect: \"none\",\n\t\tappearance: \"none\",\n\t\ttextDecoration: \"none\",\n\t\toutline: \"none\",\n\t\ttransitionProperty: \"background-color, border-color\",\n\t\ttransitionDuration: t(\"duration-fast\"),\n\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\"::after\": {\n\t\t\tcontent: '\"\"',\n\t\t\tposition: \"absolute\",\n\t\t\tinset: 0,\n\t\t\tborderRadius: \"inherit\",\n\t\t\tbackgroundColor: \"currentColor\",\n\t\t\topacity: 0,\n\t\t\tpointerEvents: \"none\",\n\t\t\tzIndex: -1,\n\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t\tselectors: {\n\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t},\n\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t},\n\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t},\n\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t},\n\t\t\t\"&[data-disabled]\": {\n\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\t},\n\t\t},\n\t\t\"@media\": {\n\t\t\t\"(forced-colors: active)\": {\n\t\t\t\tselectors: {\n\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\tvariants: {\n\t\t// Hardcoded heights are correct.\n\t\tsize: {\n\t\t\tmd: { height: \"40px\" },\n\t\t\tsm: { height: \"32px\" },\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\n// Icon children render at the control icon size (not the body text size), so an\n// icon-only pill reads as an icon button rather than a tiny glyph. <Icon> is 1em,\n// so this drives its size; flex-shrink keeps it from collapsing next to text.\nglobalStyle(`[data-slot='pill-button'] [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n"],"mappings":""}
1
+ {"version":3,"file":"PillButton.css.js","names":[],"sources":["../../../src/components/PillButton/PillButton.css.ts"],"sourcesContent":["import { globalStyle } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\nexport const pillButtonRoot = recipe({\n\tbase: {\n\t\tposition: \"relative\",\n\t\tisolation: \"isolate\",\n\t\tdisplay: \"inline-flex\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tgap: t(\"gap-8\"),\n\t\tpaddingInline: t(\"padding-12\"),\n\t\tboxSizing: \"border-box\",\n\t\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\t\tborderRadius: t(\"border-radius-pill\"),\n\t\tbackgroundColor: t(\"color-background-default\"),\n\t\tcolor: t(\"pill-content-primary\"),\n\t\t...typography(\"body\", \"medium\"),\n\t\twhiteSpace: \"nowrap\",\n\t\tcursor: \"pointer\",\n\t\tuserSelect: \"none\",\n\t\tappearance: \"none\",\n\t\ttextDecoration: \"none\",\n\t\toutline: \"none\",\n\t\ttransitionProperty: \"background-color, border-color\",\n\t\ttransitionDuration: t(\"duration-fast\"),\n\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\"::after\": {\n\t\t\tcontent: '\"\"',\n\t\t\tposition: \"absolute\",\n\t\t\tinset: 0,\n\t\t\tborderRadius: \"inherit\",\n\t\t\tbackgroundColor: \"currentColor\",\n\t\t\topacity: 0,\n\t\t\tpointerEvents: \"none\",\n\t\t\tzIndex: -1,\n\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t},\n\t\tselectors: {\n\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t},\n\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t},\n\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t},\n\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t},\n\t\t\t\"&[data-disabled]\": {\n\t\t\t\tcursor: \"not-allowed\",\n\t\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t\t},\n\t\t},\n\t\t\"@media\": {\n\t\t\t\"(forced-colors: active)\": {\n\t\t\t\tselectors: {\n\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\tvariants: {\n\t\t// Hardcoded heights are correct.\n\t\tsize: {\n\t\t\tmd: { height: \"40px\" },\n\t\t\tsm: { height: \"32px\" },\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: \"md\",\n\t},\n});\n\n// Icon children render at the control icon size (not the body text size), so an\n// icon-only pill reads as an icon button rather than a tiny glyph. <Icon> is 1em,\n// so this drives its size; flex-shrink keeps it from collapsing next to text.\nglobalStyle(`[data-slot='pill-button'] [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ProactiveMessage.css.js","names":[],"sources":["../../../src/components/ProactiveMessage/ProactiveMessage.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// Content-hugging, non-interactive message bubble — no variant/size axes, so a\n// plain `style()` rather than a `recipe()`.\nexport const proactiveMessageRoot = style({\n\tboxSizing: \"border-box\",\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"flex-start\",\n\t// Center content against the 48px minimum so short messages keep the pill\n\t// height (matches the Figma bubble's `justify-center`).\n\tjustifyContent: \"center\",\n\t// Hug the content; the surrounding layout constrains the max width to the\n\t// chat column, keeping this bubble in lockstep with the agent/user message\n\t// bubbles rather than baking a column-width literal into this one component.\n\twidth: \"fit-content\",\n\t// Figma pins the bubble to a 48px floor; no control-size token tier exists\n\t// yet (cf. AgentMessage's 24px literal).\n\tminHeight: \"48px\",\n\tpaddingBlock: t(\"padding-8\"),\n\tpaddingInline: t(\"padding-16\"),\n\tborderRadius: t(\"border-radius-message\"),\n\tbackgroundColor: t(\"elevation-3-background\"),\n\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\tboxShadow: t(\"elevation-3\"),\n\tcolor: t(\"color-content-default\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n\t// `start` follows the content's resolved direction (see `dir=\"auto\"` on the\n\t// element), keeping mixed-direction messages aligned to their own edge.\n\ttextAlign: \"start\",\n\t// `anywhere` (not `break-word`) so a single long unbroken token — e.g. a raw\n\t// URL in body text — breaks mid-string instead of overflowing the column.\n\toverflowWrap: \"anywhere\",\n});\n"],"mappings":""}
1
+ {"version":3,"file":"ProactiveMessage.css.js","names":[],"sources":["../../../src/components/ProactiveMessage/ProactiveMessage.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\n// Content-hugging, non-interactive message bubble — no variant/size axes, so a\n// plain `style()` rather than a `recipe()`.\nexport const proactiveMessageRoot = style({\n\tboxSizing: \"border-box\",\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"flex-start\",\n\t// Center content against the 48px minimum so short messages keep the pill\n\t// height (matches the Figma bubble's `justify-center`).\n\tjustifyContent: \"center\",\n\t// Hug the content; the surrounding layout constrains the max width to the\n\t// chat column, keeping this bubble in lockstep with the agent/user message\n\t// bubbles rather than baking a column-width literal into this one component.\n\twidth: \"fit-content\",\n\t// Figma pins the bubble to a 48px floor; no control-size token tier exists\n\t// yet (cf. AgentMessage's 24px literal).\n\tminHeight: \"48px\",\n\tpaddingBlock: t(\"padding-8\"),\n\tpaddingInline: t(\"padding-16\"),\n\tborderRadius: t(\"border-radius-message\"),\n\tbackgroundColor: t(\"elevation-3-background\"),\n\tborder: `${t(\"border-width-default\")} solid ${t(\"color-border-default\")}`,\n\tboxShadow: t(\"elevation-3\"),\n\tcolor: t(\"color-content-default\"),\n\t...typography(\"body\", \"regular\"),\n\t// `start` follows the content's resolved direction (see `dir=\"auto\"` on the\n\t// element), keeping mixed-direction messages aligned to their own edge.\n\ttextAlign: \"start\",\n\t// `anywhere` (not `break-word`) so a single long unbroken token — e.g. a raw\n\t// URL in body text — breaks mid-string instead of overflowing the column.\n\toverflowWrap: \"anywhere\",\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.css.js","names":[],"sources":["../../../src/components/Radio/Radio.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport {\n\tcontrolRowFrame,\n\tcontrolRowSlotRules,\n} from \"../../styles/control-row.js\";\nimport { t } from \"../../tokens/index.js\";\n\n// Figma's `button-size/xs` (24px) has no LovelaceToken; the checked indicator's\n// inset is likewise fixed visual detail Figma renders as a flattened raster with\n// no token (5px inset inside the 1px border → 12px center dot). Both are\n// hardcoded like a fixed frame size.\nconst CONTROL_SIZE = \"24px\";\nconst INDICATOR_INSET = \"5px\";\n\n// Empty handle class: a recipe can't target a descendant, so the row variant's\n// slot rules are attached to a stable class instead (same trick as Button's base).\nconst radioRowBase = style({});\n\nexport const radioGroup = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tgap: t(\"gap-20\"),\n\tselectors: {\n\t\t'&[data-orientation=\"horizontal\"]': {\n\t\t\tflexDirection: \"row\",\n\t\t},\n\t},\n});\n\n/**\n * The RAC `Radio` label. `inline` lays the control out beside its label; `row` is\n * the 40px selectable row Figma draws for a menu item, for a `RadioGroup`\n * rendered as a list of options.\n */\nexport const radioRoot = recipe({\n\tbase: {\n\t\tcursor: \"pointer\",\n\t\tuserSelect: \"none\",\n\t\tselectors: {\n\t\t\t\"&[data-disabled]\": {\n\t\t\t\tcursor: \"not-allowed\",\n\t\t\t},\n\t\t},\n\t},\n\tvariants: {\n\t\tvariant: {\n\t\t\tinline: {\n\t\t\t\tdisplay: \"inline-flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tgap: t(\"gap-12\"),\n\t\t\t},\n\t\t\trow: [radioRowBase, controlRowFrame],\n\t\t},\n\t},\n\tdefaultVariants: { variant: \"inline\" },\n});\n\nglobalStyle(`${radioRowBase} > [data-slot=\"icon\"]`, controlRowSlotRules.icon);\nglobalStyle(`${radioRowBase} > [data-slot=\"label\"]`, controlRowSlotRules.label);\n\n/**\n * The 24px control circle. Selection and interaction state are read from whichever\n * host element carries React Aria's `data-*` — the RAC label, or a `MenuItem` row —\n * so the rules below are child selectors that name no host. Interaction rules\n * additionally require `[data-state-layer]`, which the indicator sets only when it\n * is the sole affordance; inside a row the row paints hover and focus itself.\n */\nexport const radioControl = style({\n\tposition: \"relative\",\n\tboxSizing: \"border-box\",\n\tflexShrink: 0,\n\twidth: CONTROL_SIZE,\n\theight: CONTROL_SIZE,\n\tborderRadius: t(\"border-radius-full\"),\n\tborderStyle: \"solid\",\n\tborderWidth: t(\"border-width-default\"),\n\t// Unchecked resting state; the selected rules below override it.\n\tbackgroundColor: t(\"color-background-default\"),\n\tborderColor: t(\"color-border-default\"),\n\ttransitionProperty: \"background-color, border-color, box-shadow\",\n\ttransitionDuration: t(\"duration-fast\"),\n\ttransitionTimingFunction: t(\"easing-standard\"),\n\tselectors: {\n\t\t// Unchecked — hover darkens the border only (no fill).\n\t\t\"[data-hovered]:not([data-selected]):not([data-disabled]) > &[data-state-layer]\":\n\t\t\t{\n\t\t\t\tborderColor: t(\"color-border-medium\"),\n\t\t\t},\n\t\t// Checked — solid inverse disc; the white ring is drawn by radioDot.\n\t\t\"[data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-inverse\"),\n\t\t\tborderColor: t(\"color-background-inverse\"),\n\t\t},\n\t\t// Focus — outer 2px focus ring for both states (matches Chip's double ring).\n\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t},\n\t\t// Focus (unchecked) — inner accent border completes the double ring.\n\t\t\"[data-focus-visible]:not([data-selected]):not([data-disabled]) > &[data-state-layer]\":\n\t\t\t{\n\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t},\n\t\t// Disabled — unchecked.\n\t\t\"[data-disabled]:not([data-selected]) > &\": {\n\t\t\tbackgroundColor: t(\"color-background-tertiary\"),\n\t\t\tborderColor: t(\"color-border-default\"),\n\t\t},\n\t\t// Disabled — checked disc fades to the disabled background.\n\t\t\"[data-disabled][data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tborderColor: t(\"color-background-disabled\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\n// Solid center dot on the checked disc (dark disc → filled light center circle).\n// Hidden (transparent) until the option is selected.\nexport const radioDot = style({\n\tposition: \"absolute\",\n\tinset: INDICATOR_INSET,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: \"transparent\",\n\tpointerEvents: \"none\",\n\tselectors: {\n\t\t[`[data-selected] > ${radioControl} > &`]: {\n\t\t\tbackgroundColor: t(\"color-background-default\"),\n\t\t},\n\t\t[`[data-selected][data-disabled] > ${radioControl} > &`]: {\n\t\t\tbackgroundColor: t(\"color-background-tertiary\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t// Author background-colors collapse to Canvas in forced-colors mode, so the\n\t\t// disc/dot contrast is lost — redraw the dot with a system color instead.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t[`[data-selected] > ${radioControl} > &`]: {\n\t\t\t\t\tbackgroundColor: \"CanvasText\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport const radioLabel = style({\n\tfontFamily: t(\"font-family-body\"),\n\tfontSize: t(\"font-size-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tlineHeight: t(\"line-height-body\"),\n\tcolor: t(\"color-content-default\"),\n\tselectors: {\n\t\t\"[data-disabled] > &\": {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n});\n"],"mappings":""}
1
+ {"version":3,"file":"Radio.css.js","names":[],"sources":["../../../src/components/Radio/Radio.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport {\n\tcontrolRowFrame,\n\tcontrolRowSlotRules,\n} from \"../../styles/control-row.js\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\n// Figma's `button-size/xs` (24px) has no LovelaceToken; the checked indicator's\n// inset is likewise fixed visual detail Figma renders as a flattened raster with\n// no token (5px inset inside the 1px border → 12px center dot). Both are\n// hardcoded like a fixed frame size.\nconst CONTROL_SIZE = \"24px\";\nconst INDICATOR_INSET = \"5px\";\n\n// Empty handle class: a recipe can't target a descendant, so the row variant's\n// slot rules are attached to a stable class instead (same trick as Button's base).\nconst radioRowBase = style({});\n\nexport const radioGroup = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tgap: t(\"gap-20\"),\n\tselectors: {\n\t\t'&[data-orientation=\"horizontal\"]': {\n\t\t\tflexDirection: \"row\",\n\t\t},\n\t},\n});\n\n/**\n * The RAC `Radio` label. `inline` lays the control out beside its label; `row` is\n * the 40px selectable row Figma draws for a menu item, for a `RadioGroup`\n * rendered as a list of options.\n */\nexport const radioRoot = recipe({\n\tbase: {\n\t\tcursor: \"pointer\",\n\t\tuserSelect: \"none\",\n\t\tselectors: {\n\t\t\t\"&[data-disabled]\": {\n\t\t\t\tcursor: \"not-allowed\",\n\t\t\t},\n\t\t},\n\t},\n\tvariants: {\n\t\tvariant: {\n\t\t\tinline: {\n\t\t\t\tdisplay: \"inline-flex\",\n\t\t\t\talignItems: \"center\",\n\t\t\t\tgap: t(\"gap-12\"),\n\t\t\t},\n\t\t\trow: [radioRowBase, controlRowFrame],\n\t\t},\n\t},\n\tdefaultVariants: { variant: \"inline\" },\n});\n\nglobalStyle(`${radioRowBase} > [data-slot=\"icon\"]`, controlRowSlotRules.icon);\nglobalStyle(`${radioRowBase} > [data-slot=\"label\"]`, controlRowSlotRules.label);\n\n/**\n * The 24px control circle. Selection and interaction state are read from whichever\n * host element carries React Aria's `data-*` — the RAC label, or a `MenuItem` row —\n * so the rules below are child selectors that name no host. Interaction rules\n * additionally require `[data-state-layer]`, which the indicator sets only when it\n * is the sole affordance; inside a row the row paints hover and focus itself.\n */\nexport const radioControl = style({\n\tposition: \"relative\",\n\tboxSizing: \"border-box\",\n\tflexShrink: 0,\n\twidth: CONTROL_SIZE,\n\theight: CONTROL_SIZE,\n\tborderRadius: t(\"border-radius-full\"),\n\tborderStyle: \"solid\",\n\tborderWidth: t(\"border-width-default\"),\n\t// Unchecked resting state; the selected rules below override it.\n\tbackgroundColor: t(\"color-background-default\"),\n\tborderColor: t(\"color-border-default\"),\n\ttransitionProperty: \"background-color, border-color, box-shadow\",\n\ttransitionDuration: t(\"duration-fast\"),\n\ttransitionTimingFunction: t(\"easing-standard\"),\n\tselectors: {\n\t\t// Unchecked — hover darkens the border only (no fill).\n\t\t\"[data-hovered]:not([data-selected]):not([data-disabled]) > &[data-state-layer]\":\n\t\t\t{\n\t\t\t\tborderColor: t(\"color-border-medium\"),\n\t\t\t},\n\t\t// Checked — solid inverse disc; the white ring is drawn by radioDot.\n\t\t\"[data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-inverse\"),\n\t\t\tborderColor: t(\"color-background-inverse\"),\n\t\t},\n\t\t// Focus — outer 2px focus ring for both states (matches Chip's double ring).\n\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\tboxShadow: `0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t},\n\t\t// Focus (unchecked) — inner accent border completes the double ring.\n\t\t\"[data-focus-visible]:not([data-selected]):not([data-disabled]) > &[data-state-layer]\":\n\t\t\t{\n\t\t\t\tborderColor: t(\"color-border-accent\"),\n\t\t\t},\n\t\t// Disabled — unchecked.\n\t\t\"[data-disabled]:not([data-selected]) > &\": {\n\t\t\tbackgroundColor: t(\"color-background-tertiary\"),\n\t\t\tborderColor: t(\"color-border-default\"),\n\t\t},\n\t\t// Disabled — checked disc fades to the disabled background.\n\t\t\"[data-disabled][data-selected] > &\": {\n\t\t\tbackgroundColor: t(\"color-background-disabled\"),\n\t\t\tborderColor: t(\"color-background-disabled\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t\"[data-focus-visible]:not([data-disabled]) > &[data-state-layer]\": {\n\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\n// Solid center dot on the checked disc (dark disc → filled light center circle).\n// Hidden (transparent) until the option is selected.\nexport const radioDot = style({\n\tposition: \"absolute\",\n\tinset: INDICATOR_INSET,\n\tborderRadius: t(\"border-radius-full\"),\n\tbackgroundColor: \"transparent\",\n\tpointerEvents: \"none\",\n\tselectors: {\n\t\t[`[data-selected] > ${radioControl} > &`]: {\n\t\t\tbackgroundColor: t(\"color-background-default\"),\n\t\t},\n\t\t[`[data-selected][data-disabled] > ${radioControl} > &`]: {\n\t\t\tbackgroundColor: t(\"color-background-tertiary\"),\n\t\t},\n\t},\n\t\"@media\": {\n\t\t// Author background-colors collapse to Canvas in forced-colors mode, so the\n\t\t// disc/dot contrast is lost — redraw the dot with a system color instead.\n\t\t\"(forced-colors: active)\": {\n\t\t\tselectors: {\n\t\t\t\t[`[data-selected] > ${radioControl} > &`]: {\n\t\t\t\t\tbackgroundColor: \"CanvasText\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n});\n\nexport const radioLabel = style({\n\t...typography(\"body\", \"regular\"),\n\tcolor: t(\"color-content-default\"),\n\tselectors: {\n\t\t\"[data-disabled] > &\": {\n\t\t\tcolor: t(\"color-content-disabled\"),\n\t\t},\n\t},\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollMarker.css.js","names":[],"sources":["../../../src/components/ScrollMarker/ScrollMarker.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\nconst DROP_SHADOW = t(\"elevation-2\");\n\nconst scrollMarkerBase = style({});\n\nexport const scrollMarkerRoot = recipe({\n\tbase: [\n\t\tscrollMarkerBase,\n\t\t{\n\t\t\tposition: \"relative\",\n\t\t\tisolation: \"isolate\",\n\t\t\tdisplay: \"inline-flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tborder: \"none\",\n\t\t\tborderRadius: t(\"border-radius-full\"),\n\t\t\tboxShadow: DROP_SHADOW,\n\t\t\tfontFamily: t(\"font-family-body\"),\n\t\t\tfontWeight: t(\"font-weight-medium\"),\n\t\t\tfontSize: t(\"font-size-body\"),\n\t\t\tlineHeight: t(\"line-height-body\"),\n\t\t\twhiteSpace: \"nowrap\",\n\t\t\tcursor: \"pointer\",\n\t\t\tuserSelect: \"none\",\n\t\t\tappearance: \"none\",\n\t\t\toutline: \"none\",\n\t\t\ttransitionProperty: \"background-color, box-shadow\",\n\t\t\ttransitionDuration: t(\"duration-fast\"),\n\t\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\t\"::after\": {\n\t\t\t\tcontent: '\"\"',\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tinset: 0,\n\t\t\t\tborderRadius: \"inherit\",\n\t\t\t\tbackgroundColor: \"currentColor\",\n\t\t\t\topacity: 0,\n\t\t\t\tpointerEvents: \"none\",\n\t\t\t\tzIndex: -1,\n\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t},\n\t\t\tselectors: {\n\t\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t\t},\n\t\t\t\t// Focus ring layers on top of the persistent drop shadow.\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\tboxShadow: `${DROP_SHADOW}, 0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"@media\": {\n\t\t\t\t\"(forced-colors: active)\": {\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tvariants: {\n\t\tcolor: {\n\t\t\tdefault: {\n\t\t\t\tbackgroundColor: t(\"scrollmarker-background\"),\n\t\t\t\tcolor: t(\"scrollmarker-content\"),\n\t\t\t},\n\t\t\tbrand: {\n\t\t\t\tbackgroundColor: t(\"color-background-accent\"),\n\t\t\t\tcolor: t(\"color-content-on-accent\"),\n\t\t\t},\n\t\t},\n\t\t// Hardcoded frame dimensions mirror Figma's fixed sizes (icon-only 40px circle,\n\t\t// with-text 38px pill row), which the token set does not expose as spacing values.\n\t\ttype: {\n\t\t\ticonOnly: { width: \"40px\", height: \"40px\", padding: 0 },\n\t\t\twithText: {\n\t\t\t\theight: \"38px\",\n\t\t\t\tpaddingInline: t(\"padding-12\"),\n\t\t\t\tgap: t(\"gap-8\"),\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tcolor: \"default\",\n\t\ttype: \"iconOnly\",\n\t},\n});\n\n// Descendant target must be a global rule; vanilla-extract disallows it inside `selectors`.\nglobalStyle(`${scrollMarkerBase} [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n"],"mappings":""}
1
+ {"version":3,"file":"ScrollMarker.css.js","names":[],"sources":["../../../src/components/ScrollMarker/ScrollMarker.css.ts"],"sourcesContent":["import { globalStyle, style } from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\nconst DROP_SHADOW = t(\"elevation-2\");\n\nconst scrollMarkerBase = style({});\n\nexport const scrollMarkerRoot = recipe({\n\tbase: [\n\t\tscrollMarkerBase,\n\t\t{\n\t\t\tposition: \"relative\",\n\t\t\tisolation: \"isolate\",\n\t\t\tdisplay: \"inline-flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\",\n\t\t\tboxSizing: \"border-box\",\n\t\t\tborder: \"none\",\n\t\t\tborderRadius: t(\"border-radius-full\"),\n\t\t\tboxShadow: DROP_SHADOW,\n\t\t\t...typography(\"body\", \"medium\"),\n\t\t\twhiteSpace: \"nowrap\",\n\t\t\tcursor: \"pointer\",\n\t\t\tuserSelect: \"none\",\n\t\t\tappearance: \"none\",\n\t\t\toutline: \"none\",\n\t\t\ttransitionProperty: \"background-color, box-shadow\",\n\t\t\ttransitionDuration: t(\"duration-fast\"),\n\t\t\ttransitionTimingFunction: t(\"easing-standard\"),\n\t\t\t\"::after\": {\n\t\t\t\tcontent: '\"\"',\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tinset: 0,\n\t\t\t\tborderRadius: \"inherit\",\n\t\t\t\tbackgroundColor: \"currentColor\",\n\t\t\t\topacity: 0,\n\t\t\t\tpointerEvents: \"none\",\n\t\t\t\tzIndex: -1,\n\t\t\t\ttransition: `opacity ${t(\"duration-fast\")} ${t(\"easing-standard\")}`,\n\t\t\t},\n\t\t\tselectors: {\n\t\t\t\t\"&[data-hovered]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-hover\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-focus\"),\n\t\t\t\t},\n\t\t\t\t\"&[data-pressed]:not([data-disabled])::after\": {\n\t\t\t\t\topacity: t(\"opacity-state-pressed\"),\n\t\t\t\t},\n\t\t\t\t// Focus ring layers on top of the persistent drop shadow.\n\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\tboxShadow: `${DROP_SHADOW}, 0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`,\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"@media\": {\n\t\t\t\t\"(forced-colors: active)\": {\n\t\t\t\t\tselectors: {\n\t\t\t\t\t\t\"&[data-focus-visible]:not([data-disabled])\": {\n\t\t\t\t\t\t\toutline: \"2px solid Highlight\",\n\t\t\t\t\t\t\toutlineOffset: \"2px\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t],\n\tvariants: {\n\t\tcolor: {\n\t\t\tdefault: {\n\t\t\t\tbackgroundColor: t(\"scrollmarker-background\"),\n\t\t\t\tcolor: t(\"scrollmarker-content\"),\n\t\t\t},\n\t\t\tbrand: {\n\t\t\t\tbackgroundColor: t(\"color-background-accent\"),\n\t\t\t\tcolor: t(\"color-content-on-accent\"),\n\t\t\t},\n\t\t},\n\t\t// Hardcoded frame dimensions mirror Figma's fixed sizes (icon-only 40px circle,\n\t\t// with-text 38px pill row), which the token set does not expose as spacing values.\n\t\ttype: {\n\t\t\ticonOnly: { width: \"40px\", height: \"40px\", padding: 0 },\n\t\t\twithText: {\n\t\t\t\theight: \"38px\",\n\t\t\t\tpaddingInline: t(\"padding-12\"),\n\t\t\t\tgap: t(\"gap-8\"),\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tcolor: \"default\",\n\t\ttype: \"iconOnly\",\n\t},\n});\n\n// Descendant target must be a global rule; vanilla-extract disallows it inside `selectors`.\nglobalStyle(`${scrollMarkerBase} [data-slot='icon']`, {\n\tflexShrink: 0,\n\tfontSize: t(\"icon-size-control\"),\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.css.js","names":[],"sources":["../../../src/components/Sheet/Sheet.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n/* ── Sheet (bare content surface) ─────────────────────────────────────── */\n\n/* `0 1 auto` hugs content but yields once the parent runs out of room, so an inline\n sheet never pushes its actions past the parent's edge. `1 1 auto` forced every\n inline consumer to override `flex`, and the natural override — `0 0 auto` — quietly\n deleted the shrink the body's scrolling depends on. `overflow-y` is the last\n resort: inert until the actions alone outgrow the sheet, where scrolling the whole\n sheet is the only thing that keeps them reachable. */\nexport const sheetRoot = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tflex: \"0 1 auto\",\n\tminHeight: 0,\n\tmaxHeight: \"100%\",\n\toverflowY: \"auto\",\n\twidth: \"100%\",\n\tboxSizing: \"border-box\",\n\tbackgroundColor: t(\"elevation-2-background\"),\n\tcolor: t(\"color-content-default\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n});\n\n/* ── Sheet.Header ─────────────────────────────────────────────────────── */\n\nexport const sheetHeader = style({\n\tposition: \"relative\",\n\tflexShrink: 0,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\t// Figma: fixed 56px header height.\n\theight: \"56px\",\n\tpaddingInline: t(\"padding-12\"),\n\tboxSizing: \"border-box\",\n});\n\nexport const sheetHeaderTitle = style({\n\tmargin: 0,\n\tcolor: t(\"color-content-default\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-medium\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n\ttextAlign: \"center\",\n});\n\n// Edge buttons are pinned (absolute) so the title stays centered even with a\n// single button present. Logical insets mirror correctly under RTL.\nexport const sheetHeaderStart = style({\n\tposition: \"absolute\",\n\tinsetInlineStart: t(\"padding-12\"),\n\ttop: 0,\n\tbottom: 0,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n});\n\nexport const sheetHeaderEnd = style({\n\tposition: \"absolute\",\n\tinsetInlineEnd: t(\"padding-12\"),\n\ttop: 0,\n\tbottom: 0,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n});\n\n// Back is a reading-direction affordance: the chevron mirrors under RTL.\nexport const sheetBackIcon = style({\n\tselectors: {\n\t\t'[dir=\"rtl\"] &': { transform: \"scaleX(-1)\" },\n\t},\n});\n\n/* ── Sheet.Body ───────────────────────────────────────────────────────── */\n\n// flex:0 1 auto + overflow:auto is the single rule that makes the body scroll\n// when a parent caps the height (floating) and hug content when uncapped\n// (inline) — with no mode flag.\nexport const sheetBody = style({\n\tflex: \"0 1 auto\",\n\t// Floor so a squeezed body keeps one option row rather than collapsing to\n\t// nothing: past this the sheet itself scrolls instead.\n\tminHeight: t(\"spacing-48\"),\n\toverflowY: \"auto\",\n\tpadding: t(\"padding-12\"),\n\tboxSizing: \"border-box\",\n\tscrollbarWidth: \"thin\",\n\tscrollbarColor: `${t(\"color-border-default\")} transparent`,\n});\n\n/* ── Sheet.Actions ────────────────────────────────────────────────────── */\n\nexport const sheetActions = style({\n\tflexShrink: 0,\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"stretch\",\n\tgap: t(\"gap-12\"),\n\tpadding: t(\"padding-12\"),\n\tboxSizing: \"border-box\",\n});\n"],"mappings":""}
1
+ {"version":3,"file":"Sheet.css.js","names":[],"sources":["../../../src/components/Sheet/Sheet.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { typography, typographyVariant } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\n/* ── Sheet (bare content surface) ─────────────────────────────────────── */\n\n/* `0 1 auto` hugs content but yields once the parent runs out of room, so an inline\n sheet never pushes its actions past the parent's edge. `1 1 auto` forced every\n inline consumer to override `flex`, and the natural override — `0 0 auto` — quietly\n deleted the shrink the body's scrolling depends on. `overflow-y` is the last\n resort: inert until the actions alone outgrow the sheet, where scrolling the whole\n sheet is the only thing that keeps them reachable. */\nexport const sheetRoot = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tflex: \"0 1 auto\",\n\tminHeight: 0,\n\tmaxHeight: \"100%\",\n\toverflowY: \"auto\",\n\twidth: \"100%\",\n\tboxSizing: \"border-box\",\n\tbackgroundColor: t(\"elevation-2-background\"),\n\tcolor: t(\"color-content-default\"),\n\t// Inherited weight: the sheet body sets no weight of its own.\n\t...typographyVariant(\"body\"),\n});\n\n/* ── Sheet.Header ─────────────────────────────────────────────────────── */\n\nexport const sheetHeader = style({\n\tposition: \"relative\",\n\tflexShrink: 0,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\t// Figma: fixed 56px header height.\n\theight: \"56px\",\n\tpaddingInline: t(\"padding-12\"),\n\tboxSizing: \"border-box\",\n});\n\nexport const sheetHeaderTitle = style({\n\tmargin: 0,\n\tcolor: t(\"color-content-default\"),\n\t...typography(\"body\", \"medium\"),\n\ttextAlign: \"center\",\n});\n\n// Edge buttons are pinned (absolute) so the title stays centered even with a\n// single button present. Logical insets mirror correctly under RTL.\nexport const sheetHeaderStart = style({\n\tposition: \"absolute\",\n\tinsetInlineStart: t(\"padding-12\"),\n\ttop: 0,\n\tbottom: 0,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n});\n\nexport const sheetHeaderEnd = style({\n\tposition: \"absolute\",\n\tinsetInlineEnd: t(\"padding-12\"),\n\ttop: 0,\n\tbottom: 0,\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n});\n\n// Back is a reading-direction affordance: the chevron mirrors under RTL.\nexport const sheetBackIcon = style({\n\tselectors: {\n\t\t'[dir=\"rtl\"] &': { transform: \"scaleX(-1)\" },\n\t},\n});\n\n/* ── Sheet.Body ───────────────────────────────────────────────────────── */\n\n// flex:0 1 auto + overflow:auto is the single rule that makes the body scroll\n// when a parent caps the height (floating) and hug content when uncapped\n// (inline) — with no mode flag.\nexport const sheetBody = style({\n\tflex: \"0 1 auto\",\n\t// Floor so a squeezed body keeps one option row rather than collapsing to\n\t// nothing: past this the sheet itself scrolls instead.\n\tminHeight: t(\"spacing-48\"),\n\toverflowY: \"auto\",\n\tpadding: t(\"padding-12\"),\n\tboxSizing: \"border-box\",\n\tscrollbarWidth: \"thin\",\n\tscrollbarColor: `${t(\"color-border-default\")} transparent`,\n});\n\n/* ── Sheet.Actions ────────────────────────────────────────────────────── */\n\nexport const sheetActions = style({\n\tflexShrink: 0,\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"stretch\",\n\tgap: t(\"gap-12\"),\n\tpadding: t(\"padding-12\"),\n\tboxSizing: \"border-box\",\n});\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"SurveyRating.css.js","names":[],"sources":["../../../../src/components/Survey/SurveyRating/SurveyRating.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { t } from \"../../../tokens/index.js\";\n\nexport const surveyRatingRoot = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tgap: t(\"gap-8\"),\n\twidth: \"fit-content\",\n});\n\nexport const surveyRatingScale = style({\n\tdisplay: \"flex\",\n\tflexWrap: \"wrap\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tgap: t(\"gap-8\"),\n\twidth: \"100%\",\n});\n\nexport const surveyRatingLabels = style({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-between\",\n\twidth: \"100%\",\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-regular\"),\n\tfontSize: t(\"font-size-caption\"),\n\tlineHeight: t(\"line-height-caption\"),\n\tcolor: t(\"color-content-secondary\"),\n});\n"],"mappings":""}
1
+ {"version":3,"file":"SurveyRating.css.js","names":[],"sources":["../../../../src/components/Survey/SurveyRating/SurveyRating.css.ts"],"sourcesContent":["import { style } from \"@vanilla-extract/css\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { t } from \"../../../tokens/index.js\";\n\nexport const surveyRatingRoot = style({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tgap: t(\"gap-8\"),\n\twidth: \"fit-content\",\n});\n\nexport const surveyRatingScale = style({\n\tdisplay: \"flex\",\n\tflexWrap: \"wrap\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tgap: t(\"gap-8\"),\n\twidth: \"100%\",\n});\n\nexport const surveyRatingLabels = style({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-between\",\n\twidth: \"100%\",\n\t...typography(\"caption\", \"regular\"),\n\tcolor: t(\"color-content-secondary\"),\n});\n"],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export declare const textRoot: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ variant: {
3
+ body: import("@vanilla-extract/css").StyleRule;
4
+ caption: import("@vanilla-extract/css").StyleRule;
5
+ "title-small": import("@vanilla-extract/css").StyleRule;
6
+ "title-large": import("@vanilla-extract/css").StyleRule;
7
+ };
8
+ weight: {
9
+ regular: import("@vanilla-extract/css").StyleRule;
10
+ medium: import("@vanilla-extract/css").StyleRule;
11
+ "semi-bold": import("@vanilla-extract/css").StyleRule;
12
+ };
13
+ }>;
@@ -0,0 +1,28 @@
1
+ import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
+ /* empty css */
3
+ //#region src/components/Text/Text.css.ts
4
+ var t = e({
5
+ defaultClassName: "_17fuu3y0",
6
+ variantClassNames: {
7
+ variant: {
8
+ body: "_17fuu3y1",
9
+ caption: "_17fuu3y2",
10
+ "title-small": "_17fuu3y3",
11
+ "title-large": "_17fuu3y4"
12
+ },
13
+ weight: {
14
+ regular: "_17fuu3y5",
15
+ medium: "_17fuu3y6",
16
+ "semi-bold": "_17fuu3y7"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "body",
21
+ weight: "regular"
22
+ },
23
+ compoundVariants: []
24
+ });
25
+ //#endregion
26
+ export { t as textRoot };
27
+
28
+ //# sourceMappingURL=Text.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.css.js","names":[],"sources":["../../../src/components/Text/Text.css.ts"],"sourcesContent":["import { recipe } from \"@vanilla-extract/recipes\";\nimport {\n\ttypographyVariant,\n\ttypographyWeight,\n} from \"../../styles/typography.js\";\n\nexport const textRoot = recipe({\n\tbase: {\n\t\t// Lovelace ships no global reset, so a consumer's `as=\"p\"` or\n\t\t// `\"h2\"` would otherwise arrive with whichever UA block margin the\n\t\t// embedding document leaves in place. Same reasoning as `messageProse`.\n\t\tmargin: 0,\n\t},\n\tvariants: {\n\t\tvariant: {\n\t\t\tbody: typographyVariant(\"body\"),\n\t\t\tcaption: typographyVariant(\"caption\"),\n\t\t\t\"title-small\": typographyVariant(\"title-small\"),\n\t\t\t\"title-large\": typographyVariant(\"title-large\"),\n\t\t},\n\t\tweight: {\n\t\t\tregular: typographyWeight(\"regular\"),\n\t\t\tmedium: typographyWeight(\"medium\"),\n\t\t\t\"semi-bold\": typographyWeight(\"semi-bold\"),\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: \"body\",\n\t\tweight: \"regular\",\n\t},\n});\n"],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import type { HTMLAttributes, Ref } from "react";
2
+ import type { TextVariant, TextWeight } from "../../styles/typography.js";
3
+ export interface TextProps extends HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * Which semantic type tier to render at. Mirrors the Figma variable names.
6
+ */
7
+ variant?: TextVariant;
8
+ weight?: TextWeight;
9
+ /**
10
+ * The element to render. Defaults to `<span>`.
11
+ *
12
+ * Not for headings: a heading takes its level from its role, so compose RAC's
13
+ * `Heading` there instead, as `Dialog.Title` does.
14
+ */
15
+ as?: keyof HTMLElementTagNameMap;
16
+ ref?: Ref<HTMLElement>;
17
+ }
18
+ /**
19
+ * Text at one of the four semantic type tiers.
20
+ *
21
+ * Tier and weight are independent axes because they are independent in
22
+ * practice: `body` ships at `regular` on seven components and `medium` on
23
+ * seven others.
24
+ *
25
+ * Use this for a piece of text that owns its own element. A component whose
26
+ * type sits on its own root — a `<button>`, a `<label>`, a toast — spreads
27
+ * `typography()` into that root's class instead, rather than nesting a `Text`
28
+ * inside itself.
29
+ */
30
+ export declare function Text({ variant, weight, className, as: Element, ...rest }: TextProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { cx as e } from "../../utils/cx.js";
2
+ import { textRoot as t } from "./Text.css.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/components/Text/Text.tsx
5
+ function r({ variant: r = "body", weight: i = "regular", className: a, as: o = "span", ...s }) {
6
+ return /* @__PURE__ */ n(o, {
7
+ ...s,
8
+ className: e(t({
9
+ variant: r,
10
+ weight: i
11
+ }), a)
12
+ });
13
+ }
14
+ //#endregion
15
+ export { r as Text };
16
+
17
+ //# sourceMappingURL=Text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.js","names":[],"sources":["../../../src/components/Text/Text.tsx"],"sourcesContent":["import type { ElementType, HTMLAttributes, Ref } from \"react\";\nimport type { TextVariant, TextWeight } from \"../../styles/typography.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { textRoot } from \"./Text.css.js\";\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n\t/**\n\t * Which semantic type tier to render at. Mirrors the Figma variable names.\n\t */\n\tvariant?: TextVariant;\n\tweight?: TextWeight;\n\t/**\n\t * The element to render. Defaults to `<span>`.\n\t *\n\t * Not for headings: a heading takes its level from its role, so compose RAC's\n\t * `Heading` there instead, as `Dialog.Title` does.\n\t */\n\tas?: keyof HTMLElementTagNameMap;\n\tref?: Ref<HTMLElement>;\n}\n\n/**\n * Text at one of the four semantic type tiers.\n *\n * Tier and weight are independent axes because they are independent in\n * practice: `body` ships at `regular` on seven components and `medium` on\n * seven others.\n *\n * Use this for a piece of text that owns its own element. A component whose\n * type sits on its own root — a `<button>`, a `<label>`, a toast — spreads\n * `typography()` into that root's class instead, rather than nesting a `Text`\n * inside itself.\n */\nexport function Text({\n\tvariant = \"body\",\n\tweight = \"regular\",\n\tclassName,\n\tas: Element = \"span\",\n\t...rest\n}: TextProps) {\n\tconst Component = Element as ElementType;\n\treturn (\n\t\t<Component\n\t\t\t{...rest}\n\t\t\tclassName={cx(textRoot({ variant, weight }), className)}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;AAiCA,SAAgB,EAAK,EACpB,aAAU,QACV,YAAS,WACT,cACA,IAAI,IAAU,QACd,GAAG,KACU;AAEb,QACC,kBAFiB,GAEjB;EACC,GAAI;EACJ,WAAW,EAAG,EAAS;GAAE;GAAS;GAAQ,CAAC,EAAE,EAAU;EACtD,CAAA"}
@@ -0,0 +1,3 @@
1
+ export type { TextVariant, TextWeight } from "../../styles/typography.js";
2
+ export type { TextProps } from "./Text.js";
3
+ export { Text } from "./Text.js";
@@ -1 +1 @@
1
- {"version":3,"file":"ThinkingShimmer.css.js","names":[],"sources":["../../../src/components/ThinkingShimmer/ThinkingShimmer.css.ts"],"sourcesContent":["import { keyframes, style } from \"@vanilla-extract/css\";\nimport { t } from \"../../tokens/index.js\";\n\n// The base is the *secondary* content token, so the color each glyph shows most of\n// the time — and at rest — reads as a transient status line rather than body text,\n// while a glint sweeps across it (same model as the legacy `ui` shimmer).\n// Secondary is the lightest content-tier token that still clears WCAG AA in both\n// themes (5.05:1 on the light surface, 7.81:1 on dark). Legacy's shimmer is lighter\n// still, but it hardcodes #e8e8e8→#999999 at 1.23:1–2.85:1 with no dark variant;\n// matching it exactly would be a contrast waiver, not a token choice.\nconst shimmerBase = t(\"color-content-secondary\");\n// The glint moves AWAY from the surface rather than toward it — darker than the base in\n// light mode (#181a1e on #ffffff), lighter in dark (#ffffff on #181a1e). Stating it as\n// \"lighter\" or \"darker\" is wrong in one theme or the other; what holds in both is that\n// it is the higher-contrast end, 17.42:1.\n//\n// That direction is forced, not a preference. The gradient is clipped to the text, so\n// every stop is a glyph colour and owes AA, and per the note above\n// `color-content-secondary` is already the lightest neutral content token that clears\n// it — so no lighter glint exists. Enumerated the whole content tier to be sure: the\n// only AA-passing tokens lighter in light mode are `success`/`warning`, status hues and\n// wrong for a neutral status line.\n//\n// This was `color-border-default` — a NON-text token, 1.47:1 light and 1.69:1 dark, i.e.\n// under even the 3:1 non-text floor, which made the mid-sweep glyphs very nearly\n// invisible and was exactly the waiver the note above refuses.\nconst shimmerGlint = t(\"color-content-default\");\nexport const restingColor = t(\"color-content-secondary\");\n\n// Exported so the AA test can read the stops out of the gradient itself rather than a\n// hand-kept list of colours beside it. A stop added as a `t()` token is then checked\n// automatically; one written as a literal is NOT — the scrape only sees `var()` — so a\n// companion test rejects colour literals here rather than letting one ship unchecked.\nexport const shimmerGradient = `linear-gradient(90deg, ${shimmerBase} 0%, ${shimmerBase} 35%, ${shimmerGlint} 50%, ${shimmerBase} 65%, ${shimmerBase} 100%)`;\n\n// One smooth, constant-velocity sweep (linear). The gradient tiles\n// (background-repeat) and each cycle translates by exactly one tile width (200%),\n// so the loop is seamless and the text is always fully covered — no transparent\n// glyphs mid-sweep, no easing pulse.\nconst sweep = keyframes({\n\t\"0%\": { backgroundPositionX: \"200%\" },\n\t\"100%\": { backgroundPositionX: \"0%\" },\n});\n\n// Staggered vertical bounce for the ellipsis, via `vertical-align` — NOT\n// `top`/`transform`, which promote the dot to its own compositing layer and drop it\n// out of the root's `-webkit-background-clip: text`, leaving it invisible.\nconst dotBounce = keyframes({\n\t\"0%, 80%, 100%\": { verticalAlign: \"0\" },\n\t\"40%\": { verticalAlign: \"0.3em\" },\n});\n\nexport const root = style({\n\tdisplay: \"inline-block\",\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-medium\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n\twhiteSpace: \"nowrap\",\n\t// A gradient clipped to the text and swept across it. The dots are plain inline\n\t// descendants covered by this same clip, so one band flows through the whole\n\t// label. Stops reference the tokens directly (currentColor can't express the\n\t// theme-aware stops); in dark mode they invert so the sweep keeps matching the\n\t// surface.\n\tbackgroundImage: shimmerGradient,\n\tbackgroundSize: \"200% 100%\",\n\tbackgroundRepeat: \"repeat\",\n\tbackgroundClip: \"text\",\n\tWebkitBackgroundClip: \"text\",\n\tcolor: \"transparent\",\n\tWebkitTextFillColor: \"transparent\",\n\tanimation: `${sweep} 2s linear infinite`,\n\t\"@media\": {\n\t\t// Reduced motion: hold the shimmer static at a flat, muted resting color —\n\t\t// never signal the loading state with animation alone.\n\t\t\"(prefers-reduced-motion: reduce)\": {\n\t\t\tanimation: \"none\",\n\t\t\tbackgroundImage: \"none\",\n\t\t\tcolor: restingColor,\n\t\t\tWebkitTextFillColor: restingColor,\n\t\t},\n\t},\n});\n\n// Carries the announced status string as real text (live regions announce\n// rendered text, not `aria-label`), while staying out of the visual layout.\nexport const visuallyHidden = style({\n\tposition: \"absolute\",\n\twidth: 1,\n\theight: 1,\n\tpadding: 0,\n\tmargin: -1,\n\toverflow: \"hidden\",\n\tclip: \"rect(0, 0, 0, 0)\",\n\twhiteSpace: \"nowrap\",\n\tborder: 0,\n\t// Clipped text is still selectable, so a select-all over the transcript would\n\t// otherwise copy the announced status alongside the messages (EXP-1479).\n\tuserSelect: \"none\",\n\tWebkitUserSelect: \"none\",\n});\n\nexport const ellipsis = style({\n\tdisplay: \"inline\",\n});\n\nexport const dot = style({\n\t// Plain inline and unpositioned so the dots stay in the root's single text clip;\n\t// color and gradient are inherited, only the bounce (see `dotBounce`) moves them.\n\tdisplay: \"inline\",\n\t// Zero line-height so a bounced dot can't grow the line box and shift the whole\n\t// label; the raise fits within the root's existing line-height headroom.\n\tlineHeight: 0,\n\tanimation: `${dotBounce} 1.4s ease-in-out infinite`,\n\tselectors: {\n\t\t\"&:nth-child(2)\": { animationDelay: \"0.16s\" },\n\t\t\"&:nth-child(3)\": { animationDelay: \"0.32s\" },\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: reduce)\": {\n\t\t\tanimation: \"none\",\n\t\t},\n\t},\n});\n"],"mappings":""}
1
+ {"version":3,"file":"ThinkingShimmer.css.js","names":[],"sources":["../../../src/components/ThinkingShimmer/ThinkingShimmer.css.ts"],"sourcesContent":["import { keyframes, style } from \"@vanilla-extract/css\";\nimport { typography } from \"../../styles/typography.js\";\nimport { t } from \"../../tokens/index.js\";\n\n// The base is the *secondary* content token, so the color each glyph shows most of\n// the time — and at rest — reads as a transient status line rather than body text,\n// while a glint sweeps across it (same model as the legacy `ui` shimmer).\n// Secondary is the lightest content-tier token that still clears WCAG AA in both\n// themes (5.05:1 on the light surface, 7.81:1 on dark). Legacy's shimmer is lighter\n// still, but it hardcodes #e8e8e8→#999999 at 1.23:1–2.85:1 with no dark variant;\n// matching it exactly would be a contrast waiver, not a token choice.\nconst shimmerBase = t(\"color-content-secondary\");\n// The glint moves AWAY from the surface rather than toward it — darker than the base in\n// light mode (#181a1e on #ffffff), lighter in dark (#ffffff on #181a1e). Stating it as\n// \"lighter\" or \"darker\" is wrong in one theme or the other; what holds in both is that\n// it is the higher-contrast end, 17.42:1.\n//\n// That direction is forced, not a preference. The gradient is clipped to the text, so\n// every stop is a glyph colour and owes AA, and per the note above\n// `color-content-secondary` is already the lightest neutral content token that clears\n// it — so no lighter glint exists. Enumerated the whole content tier to be sure: the\n// only AA-passing tokens lighter in light mode are `success`/`warning`, status hues and\n// wrong for a neutral status line.\n//\n// This was `color-border-default` — a NON-text token, 1.47:1 light and 1.69:1 dark, i.e.\n// under even the 3:1 non-text floor, which made the mid-sweep glyphs very nearly\n// invisible and was exactly the waiver the note above refuses.\nconst shimmerGlint = t(\"color-content-default\");\nexport const restingColor = t(\"color-content-secondary\");\n\n// Exported so the AA test can read the stops out of the gradient itself rather than a\n// hand-kept list of colours beside it. A stop added as a `t()` token is then checked\n// automatically; one written as a literal is NOT — the scrape only sees `var()` — so a\n// companion test rejects colour literals here rather than letting one ship unchecked.\nexport const shimmerGradient = `linear-gradient(90deg, ${shimmerBase} 0%, ${shimmerBase} 35%, ${shimmerGlint} 50%, ${shimmerBase} 65%, ${shimmerBase} 100%)`;\n\n// One smooth, constant-velocity sweep (linear). The gradient tiles\n// (background-repeat) and each cycle translates by exactly one tile width (200%),\n// so the loop is seamless and the text is always fully covered — no transparent\n// glyphs mid-sweep, no easing pulse.\nconst sweep = keyframes({\n\t\"0%\": { backgroundPositionX: \"200%\" },\n\t\"100%\": { backgroundPositionX: \"0%\" },\n});\n\n// Staggered vertical bounce for the ellipsis, via `vertical-align` — NOT\n// `top`/`transform`, which promote the dot to its own compositing layer and drop it\n// out of the root's `-webkit-background-clip: text`, leaving it invisible.\nconst dotBounce = keyframes({\n\t\"0%, 80%, 100%\": { verticalAlign: \"0\" },\n\t\"40%\": { verticalAlign: \"0.3em\" },\n});\n\nexport const root = style({\n\tdisplay: \"inline-block\",\n\t...typography(\"body\", \"medium\"),\n\twhiteSpace: \"nowrap\",\n\t// A gradient clipped to the text and swept across it. The dots are plain inline\n\t// descendants covered by this same clip, so one band flows through the whole\n\t// label. Stops reference the tokens directly (currentColor can't express the\n\t// theme-aware stops); in dark mode they invert so the sweep keeps matching the\n\t// surface.\n\tbackgroundImage: shimmerGradient,\n\tbackgroundSize: \"200% 100%\",\n\tbackgroundRepeat: \"repeat\",\n\tbackgroundClip: \"text\",\n\tWebkitBackgroundClip: \"text\",\n\tcolor: \"transparent\",\n\tWebkitTextFillColor: \"transparent\",\n\tanimation: `${sweep} 2s linear infinite`,\n\t\"@media\": {\n\t\t// Reduced motion: hold the shimmer static at a flat, muted resting color —\n\t\t// never signal the loading state with animation alone.\n\t\t\"(prefers-reduced-motion: reduce)\": {\n\t\t\tanimation: \"none\",\n\t\t\tbackgroundImage: \"none\",\n\t\t\tcolor: restingColor,\n\t\t\tWebkitTextFillColor: restingColor,\n\t\t},\n\t},\n});\n\n// Carries the announced status string as real text (live regions announce\n// rendered text, not `aria-label`), while staying out of the visual layout.\nexport const visuallyHidden = style({\n\tposition: \"absolute\",\n\twidth: 1,\n\theight: 1,\n\tpadding: 0,\n\tmargin: -1,\n\toverflow: \"hidden\",\n\tclip: \"rect(0, 0, 0, 0)\",\n\twhiteSpace: \"nowrap\",\n\tborder: 0,\n\t// Clipped text is still selectable, so a select-all over the transcript would\n\t// otherwise copy the announced status alongside the messages (EXP-1479).\n\tuserSelect: \"none\",\n\tWebkitUserSelect: \"none\",\n});\n\nexport const ellipsis = style({\n\tdisplay: \"inline\",\n});\n\nexport const dot = style({\n\t// Plain inline and unpositioned so the dots stay in the root's single text clip;\n\t// color and gradient are inherited, only the bounce (see `dotBounce`) moves them.\n\tdisplay: \"inline\",\n\t// Zero line-height so a bounced dot can't grow the line box and shift the whole\n\t// label; the raise fits within the root's existing line-height headroom.\n\tlineHeight: 0,\n\tanimation: `${dotBounce} 1.4s ease-in-out infinite`,\n\tselectors: {\n\t\t\"&:nth-child(2)\": { animationDelay: \"0.16s\" },\n\t\t\"&:nth-child(3)\": { animationDelay: \"0.32s\" },\n\t},\n\t\"@media\": {\n\t\t\"(prefers-reduced-motion: reduce)\": {\n\t\t\tanimation: \"none\",\n\t\t},\n\t},\n});\n"],"mappings":""}
@@ -0,0 +1,36 @@
1
+ export declare const toast: string;
2
+ export declare const toastIcon: import("@vanilla-extract/recipes").RuntimeFn<{
3
+ status: {
4
+ success: {
5
+ color: "var(--lovelace-color-content-success)";
6
+ fontSize: "var(--lovelace-icon-size-control)";
7
+ };
8
+ warning: {
9
+ color: "var(--lovelace-color-content-warning)";
10
+ fontSize: "var(--lovelace-icon-size-control)";
11
+ };
12
+ error: {
13
+ color: "var(--lovelace-color-content-destructive)";
14
+ fontSize: "var(--lovelace-icon-size-control)";
15
+ };
16
+ custom: {
17
+ color: "var(--lovelace-color-content-secondary)";
18
+ fontSize: "var(--lovelace-icon-size-lg)";
19
+ };
20
+ loading: {
21
+ width: "var(--lovelace-icon-size-lg)";
22
+ height: "var(--lovelace-icon-size-lg)";
23
+ };
24
+ };
25
+ }>;
26
+ export declare const toastMessage: string;
27
+ export declare const toastDismiss: string;
28
+ /**
29
+ * The always-mounted anchor the region portals into. It spans the width its
30
+ * consumer gives it while the cards only hug their content, so it passes the
31
+ * pointer through and each card takes it back.
32
+ */
33
+ export declare const toastAnchor: string;
34
+ export declare const toastRegion: string;
35
+ export declare const toastList: string;
36
+ export declare const toastCard: string;
@@ -0,0 +1,19 @@
1
+ import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
+ /* empty css */
3
+ //#region src/components/Toast/Toast.css.ts
4
+ var t = "_16991601", n = e({
5
+ defaultClassName: "_16991602",
6
+ variantClassNames: { status: {
7
+ success: "_16991603",
8
+ warning: "_16991604",
9
+ error: "_16991605",
10
+ custom: "_16991606",
11
+ loading: "_16991607"
12
+ } },
13
+ defaultVariants: { status: "success" },
14
+ compoundVariants: []
15
+ }), r = "_16991608", i = "_16991609", a = "_1699160a", o = "_1699160b", s = "_1699160c", c = "_1699160d";
16
+ //#endregion
17
+ export { t as toast, a as toastAnchor, c as toastCard, i as toastDismiss, n as toastIcon, s as toastList, r as toastMessage, o as toastRegion };
18
+
19
+ //# sourceMappingURL=Toast.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.css.js","names":[],"sources":["../../../src/components/Toast/Toast.css.ts"],"sourcesContent":["import {\n\tcreateVar,\n\tfallbackVar,\n\tglobalStyle,\n\tstyle,\n} from \"@vanilla-extract/css\";\nimport { recipe } from \"@vanilla-extract/recipes\";\nimport { t } from \"../../tokens/index.js\";\n\n/**\n * The card's border colour, set on the element each theme is declared on.\n *\n * Dark resolves `border-default` and `background-tertiary` to the same\n * neutral-700, so the border paints nothing there. `border-medium` is what\n * separates the card from the canvas: the fill alone is 1.7:1 against\n * `background-default`, the border 3.4:1, which is the 3:1 that non-text\n * boundaries need.\n *\n * It rides the theme element rather than a `[data-theme=\"dark\"] &` descendant\n * selector, which matches any dark ancestor rather than the nearest one. A light\n * provider inside a dark page would take the dark border. The tokens themselves\n * are declared the same way, so the nearest provider wins by inheritance.\n */\nconst cardBorderColor = createVar();\n\nglobalStyle('[data-theme=\"light\"]', {\n\tvars: { [cardBorderColor]: t(\"color-border-default\") },\n});\n\nglobalStyle('[data-theme=\"dark\"]', {\n\tvars: { [cardBorderColor]: t(\"color-border-medium\") },\n});\n\n// Hugs its content rather than filling the row, which is what separates it from\n// the banner surface: a card that floats over the transcript, not a strip that\n// belongs to it. `toastList` below centres it.\nexport const toast = style({\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tjustifyContent: \"flex-start\",\n\tboxSizing: \"border-box\",\n\t// Sized to its own content, the way Figma draws it — the five variants range\n\t// 157-222px wide. Without this the card is a block-level div and fills\n\t// whatever holds it, which is the banner surface's shape, not this one.\n\t// Capped so long copy wraps inside the chat window instead of overflowing it.\n\twidth: \"fit-content\",\n\tmaxWidth: \"100%\",\n\tgap: t(\"gap-8\"),\n\tpaddingInline: t(\"padding-12\"),\n\tpaddingBlock: t(\"padding-8\"),\n\tborderRadius: t(\"border-radius-10\"),\n\tborderWidth: t(\"border-width-default\"),\n\tborderStyle: \"solid\",\n\tborderColor: fallbackVar(cardBorderColor, t(\"color-border-default\")),\n\tbackgroundColor: t(\"color-background-tertiary\"),\n\tboxShadow: t(\"elevation-3\"),\n\t\"@media\": {\n\t\t// The shadow is what lifts the card off the transcript, and forced colors\n\t\t// drops it — so the border has to carry the boundary on its own.\n\t\t\"(forced-colors: active)\": { borderColor: \"CanvasText\" },\n\t},\n});\n\nexport const toastIcon = recipe({\n\tbase: {\n\t\tdisplay: \"flex\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\",\n\t\tflexShrink: 0,\n\t\tlineHeight: 0,\n\t},\n\t// Only the glyph changes between statuses — the card paints identically for\n\t// all five, so there is no variant axis on the card itself.\n\tvariants: {\n\t\tstatus: {\n\t\t\tsuccess: {\n\t\t\t\tcolor: t(\"color-content-success\"),\n\t\t\t\tfontSize: t(\"icon-size-control\"),\n\t\t\t},\n\t\t\twarning: {\n\t\t\t\tcolor: t(\"color-content-warning\"),\n\t\t\t\tfontSize: t(\"icon-size-control\"),\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tcolor: t(\"color-content-destructive\"),\n\t\t\t\tfontSize: t(\"icon-size-control\"),\n\t\t\t},\n\t\t\tcustom: {\n\t\t\t\tcolor: t(\"color-content-secondary\"),\n\t\t\t\tfontSize: t(\"icon-size-lg\"),\n\t\t\t},\n\t\t\t// Figma sizes this slot off line-height/title-small (24px). Spinner ships\n\t\t\t// 16px and 32px with per-size border widths, so the 16px one is centred\n\t\t\t// in a 24px box rather than scaled to a size it was not drawn for.\n\t\t\tloading: {\n\t\t\t\twidth: t(\"icon-size-lg\"),\n\t\t\t\theight: t(\"icon-size-lg\"),\n\t\t\t},\n\t\t},\n\t},\n\tdefaultVariants: { status: \"success\" },\n});\n\nexport const toastMessage = style({\n\tminWidth: 0,\n\tmarginInlineEnd: \"auto\",\n\t// The glyph carries the status, so the copy stays at the default content\n\t// colour rather than tinting with it — unlike the banner surface, where the\n\t// tinted background sets the whole card's tone.\n\tcolor: t(\"color-content-default\"),\n\tfontFamily: t(\"font-family-body\"),\n\tfontWeight: t(\"font-weight-medium\"),\n\tfontSize: t(\"font-size-body\"),\n\tlineHeight: t(\"line-height-body\"),\n\toverflowWrap: \"break-word\",\n});\n\n// IconButton's tertiary intent paints content-default; Figma wants the dismiss\n// glyph quieter. Its state layer is currentColor, so it follows automatically.\nexport const toastDismiss = style({\n\tflexShrink: 0,\n\tcolor: t(\"color-content-secondary\"),\n});\n\nglobalStyle(`${toast} > [data-slot='button'] [data-slot='icon']`, {\n\tfontSize: t(\"icon-size-sm\"),\n});\n\n// Matches the banner surface: the control is taken away only while the card is\n// leaving, which is not a state the reader should read as unavailable.\nglobalStyle(`${toast} > [data-slot='button'][data-disabled]`, {\n\t// Restated rather than inherited: this selector outranks `toastDismiss`, and\n\t// the card sets no colour of its own for `inherit` to land on.\n\tcolor: t(\"color-content-secondary\"),\n\tcursor: \"inherit\",\n});\n\n/**\n * The always-mounted anchor the region portals into. It spans the width its\n * consumer gives it while the cards only hug their content, so it passes the\n * pointer through and each card takes it back.\n */\nexport const toastAnchor = style({\n\tpointerEvents: \"none\",\n});\n\nexport const toastRegion = style({\n\toutline: \"none\",\n});\n\nexport const toastList = style({\n\tlistStyle: \"none\",\n\tmargin: 0,\n\tpadding: 0,\n\tdisplay: \"flex\",\n\t// The queue hands its toasts over newest first, and the newest belongs at the\n\t// bottom of the stack, nearest the composer. Reversing the column here rather\n\t// than reordering the list keeps the DOM order the queue's own, which is what\n\t// react-aria indexes against when it moves focus off a closing toast.\n\tflexDirection: \"column-reverse\",\n\talignItems: \"center\",\n\tgap: t(\"gap-16\"),\n});\n\n// Typed as a plain string for the reason the banner's slide is: `t()` returns a\n// union of every token name, and a multi-property template literal over it\n// explodes past what tsc can represent.\nconst cardTransition: string = `opacity ${t(\"duration-medium\")} ${t(\n\t\"easing-standard\",\n)}, transform ${t(\"duration-medium\")} ${t(\"easing-standard\")}`;\n\nexport const toastCard = style({\n\toutline: \"none\",\n\tpointerEvents: \"auto\",\n\t// Sized against elevation/3's 24px blur: the stack sits in a container the app\n\t// clips, so anything outside this inset is cut.\n\tpaddingInline: t(\"padding-16\"),\n\tselectors: {\n\t\t// Off-screen below the anchored edge: the state the card rises in from and\n\t\t// falls back out to. A transition, not a keyframe, and the same mechanism\n\t\t// as `bannerContainerSlide`. A transition interpolates from the current\n\t\t// computed value, so a card dismissed part-way through its entry reverses\n\t\t// from wherever it stands. A keyframe would restart the exit from its own\n\t\t// first frame and jump the card there first.\n\t\t\"&[data-entering]\": { opacity: 0, transform: \"translateY(100%)\" },\n\t\t// A leaving card must not take a click meant for the transcript under it.\n\t\t// The container sets `inert`, which drops pointer events, but WebKit added\n\t\t// `inert` in 15.5 and the floor in `messaging/vite.browser-targets.mjs` is\n\t\t// 15.4, so the card holds the pointer through its travel there without this.\n\t\t\"&[data-exiting]\": {\n\t\t\topacity: 0,\n\t\t\ttransform: \"translateY(100%)\",\n\t\t\tpointerEvents: \"none\",\n\t\t},\n\t},\n\t\"@media\": {\n\t\t// A reader who asked for no motion gets the end states with no travel to\n\t\t// them, so the card appears and clears with no transition.\n\t\t\"(prefers-reduced-motion: no-preference)\": {\n\t\t\ttransition: cardTransition,\n\t\t},\n\t},\n});\n\n// The ring follows the card, not the row. Restating the elevation is what keeps\n// it: `box-shadow` is one property, so the card's own elevation has to be\n// restated alongside the ring.\nconst FOCUS_RING = `inset 0 0 0 ${t(\"border-width-focus\")} ${t(\"color-border-focus\")}`;\n\nglobalStyle(`${toastCard}[data-focus-visible] ${toast}`, {\n\tboxShadow: `${FOCUS_RING}, ${t(\"elevation-3\")}`,\n});\n\nglobalStyle(`${toastCard}[data-focus-visible] ${toast}`, {\n\t\"@media\": {\n\t\t\"(forced-colors: active)\": {\n\t\t\toutline: \"2px solid Highlight\",\n\t\t\toutlineOffset: \"-2px\",\n\t\t},\n\t},\n});\n"],"mappings":""}
@@ -0,0 +1,52 @@
1
+ import type { CSSProperties, HTMLAttributes, ReactNode, Ref } from "react";
2
+ import type { PressEvent } from "react-aria";
3
+ export type ToastStatus = "success" | "warning" | "error" | "custom" | "loading";
4
+ export interface ToastProps {
5
+ /**
6
+ * The outcome being reported — selects the leading glyph and its colour. Bind
7
+ * it to the result of the action, not the UI. `custom` takes the glyph from
8
+ * `icon`; `loading` shows a spinner and refuses a dismiss control.
9
+ */
10
+ status?: ToastStatus;
11
+ /** The glyph for `status="custom"`. Ignored for every other status. */
12
+ icon?: ReactNode;
13
+ /**
14
+ * Renders a trailing dismiss button and runs this when the user presses it.
15
+ * Ignored while `status="loading"`, whose lifetime belongs to whatever raised
16
+ * it rather than to the reader.
17
+ */
18
+ onDismiss?: (event: PressEvent) => void;
19
+ /** Accessible name for the dismiss button. Localize it. */
20
+ dismissLabel?: string;
21
+ /**
22
+ * Takes the press away while the card is on screen only to finish leaving.
23
+ * WebKit added `inert` in 15.5, after the iOS 15.4 floor in
24
+ * `messaging/vite.browser-targets.mjs`. At that floor, the container's `inert`
25
+ * attribute leaves the button tabbable even though its press no longer acts
26
+ * on anything. Disabling keeps the card's layout still through the travel,
27
+ * which removing the button would not.
28
+ */
29
+ dismissDisabled?: boolean;
30
+ /**
31
+ * Attributes for the message element. A container that owns announcement
32
+ * passes its live-region props through here, so the dismiss button stays
33
+ * outside what gets announced.
34
+ */
35
+ messageProps?: HTMLAttributes<HTMLElement>;
36
+ className?: string;
37
+ style?: CSSProperties;
38
+ ref?: Ref<HTMLDivElement>;
39
+ /** The message to display. Keep it to a single line. */
40
+ children?: ReactNode;
41
+ }
42
+ /**
43
+ * The floating surface for a transient event — a card that sits above the
44
+ * transcript on a neutral background, rather than the tinted full-width strip
45
+ * `Banner` paints for a lasting condition. The two differ on purpose:
46
+ * a card reads as passing through, a strip as part of the page.
47
+ *
48
+ * Purely presentational, and carries no live region of its own, so it can sit
49
+ * inside a container that owns the announcement. Rendering it standalone
50
+ * announces nothing — reach for `ToastContainer`.
51
+ */
52
+ export declare function Toast({ status, icon, onDismiss, dismissLabel, dismissDisabled, messageProps, className, children, ...rest }: ToastProps): import("react/jsx-runtime").JSX.Element;