@candor-ui/react 2.3.0 → 2.5.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 (52) hide show
  1. package/README.md +3 -3
  2. package/dist/blocks/copy-field.js +4 -1
  3. package/dist/blocks/degraded-panel.js +4 -0
  4. package/dist/blocks/locked.js +29 -3
  5. package/dist/blocks/relative-time.js +1 -1
  6. package/dist/blocks/status-dot.js +9 -2
  7. package/dist/blocks/step-list.js +16 -3
  8. package/dist/blocks/streaming-text.js +4 -0
  9. package/dist/chat/attachment-preview.d.ts +6 -1
  10. package/dist/chat/attachment-preview.js +5 -2
  11. package/dist/chat/card-registry.js +7 -3
  12. package/dist/chat/citation.d.ts +3 -0
  13. package/dist/chat/citation.js +5 -2
  14. package/dist/chat/composer.js +17 -4
  15. package/dist/chat/context-meter.d.ts +5 -0
  16. package/dist/chat/context-meter.js +13 -2
  17. package/dist/chat/entity-chip.d.ts +6 -1
  18. package/dist/chat/entity-chip.js +5 -2
  19. package/dist/chat/folded-turns.js +4 -0
  20. package/dist/chat/message-actions.js +4 -1
  21. package/dist/chat/message.js +8 -1
  22. package/dist/chat/payload.d.ts +3 -0
  23. package/dist/chat/payload.js +3 -0
  24. package/dist/chat/permission-prompt.d.ts +5 -0
  25. package/dist/chat/permission-prompt.js +31 -2
  26. package/dist/chat/prompt-suggestions.js +4 -1
  27. package/dist/chat/reasoning.js +8 -0
  28. package/dist/chat/thread.js +32 -5
  29. package/dist/chat/tool-call.js +8 -1
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.js +1 -0
  32. package/dist/lib/motion.d.ts +16 -1
  33. package/dist/lib/motion.js +33 -3
  34. package/dist/lib/sound.d.ts +44 -0
  35. package/dist/lib/sound.js +63 -0
  36. package/dist/styles.css +19 -1
  37. package/dist/ui/accordion.d.ts +2 -2
  38. package/dist/ui/accordion.js +2 -2
  39. package/dist/ui/alert.d.ts +2 -1
  40. package/dist/ui/alert.js +17 -10
  41. package/dist/ui/button.js +4 -0
  42. package/dist/ui/collapsible.js +5 -0
  43. package/dist/ui/popover.js +4 -0
  44. package/dist/ui/progress.d.ts +1 -1
  45. package/dist/ui/progress.js +1 -1
  46. package/dist/ui/skeleton.js +4 -1
  47. package/dist/ui/slider.d.ts +1 -1
  48. package/dist/ui/slider.js +1 -1
  49. package/dist/ui/switch.d.ts +1 -1
  50. package/dist/ui/switch.js +1 -1
  51. package/dist/ui/tooltip.js +4 -0
  52. package/package.json +2 -3
@@ -1,7 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { motion } from "../lib/motion.js";
4
- /** Pulses while the content it stands in for is being fetched; still at level 0 and under calm. */
4
+ /**
5
+ * @motion live:loading The placeholder pulses softly for as long as it is on screen, which should be only while the
6
+ * content it stands in for is being fetched. Under reduced motion it is still.
7
+ */
5
8
  const loadingMotion = motion("skeleton", "loading", "live", { dur: 2000 });
6
9
  function Skeleton({ className, style, ...props }) {
7
10
  return (_jsx("div", { "data-slot": "skeleton", style: { ...loadingMotion, ...style }, className: cn("cd-live-pulse rounded-md bg-accent", className), ...props }));
@@ -9,7 +9,7 @@ import { type RenderProp } from "../lib/render-prop.js";
9
9
  *
10
10
  * @motion clock:drag The thumb and the filled range follow the pointer exactly, with no easing: what moves is the
11
11
  * person's hand, not an animation.
12
- * @motion tint:focus The thumb's ring grows in on hover and keyboard focus.
12
+ * @motion tint:tint The thumb's ring fades in when the pointer is over it and when it takes keyboard focus.
13
13
  */
14
14
  declare function Slider(allProps: SliderProps): React.JSX.Element;
15
15
  type SliderProps = React.ComponentProps<typeof SliderPrimitive.Root> & RenderProp & {
package/dist/ui/slider.js CHANGED
@@ -14,7 +14,7 @@ const lockedKeys = new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "
14
14
  *
15
15
  * @motion clock:drag The thumb and the filled range follow the pointer exactly, with no easing: what moves is the
16
16
  * person's hand, not an animation.
17
- * @motion tint:focus The thumb's ring grows in on hover and keyboard focus.
17
+ * @motion tint:tint The thumb's ring fades in when the pointer is over it and when it takes keyboard focus.
18
18
  */
19
19
  function Slider(allProps) {
20
20
  const { className, locked, thumbLabels, value, defaultValue, min = 0, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, onPointerDownCapture, onKeyDownCapture, render, nativeButton: _nativeButton, children, ...props } = allProps;
@@ -7,7 +7,7 @@ import { type RenderProp } from "../lib/render-prop.js";
7
7
  * stays focusable, says why, and doesn't flip. Use a switch for a setting that takes effect at once; a choice the
8
8
  * person confirms belongs in a `Checkbox` or `RadioGroup` with a button.
9
9
  *
10
- * @motion move:thumb The thumb slides to the other end when the state changes, in the quick duration. It follows the
10
+ * @motion move:thumb The thumb slides to the other end when the state changes, over the move family's 200 ms. It follows the
11
11
  * reading direction, so it slides the other way in right-to-left text.
12
12
  */
13
13
  declare function Switch(allProps: React.ComponentProps<typeof SwitchPrimitive.Root> & RenderProp): React.JSX.Element;
package/dist/ui/switch.js CHANGED
@@ -12,7 +12,7 @@ const thumbMotion = motion("switch", "thumb", "move");
12
12
  * stays focusable, says why, and doesn't flip. Use a switch for a setting that takes effect at once; a choice the
13
13
  * person confirms belongs in a `Checkbox` or `RadioGroup` with a button.
14
14
  *
15
- * @motion move:thumb The thumb slides to the other end when the state changes, in the quick duration. It follows the
15
+ * @motion move:thumb The thumb slides to the other end when the state changes, over the move family's 200 ms. It follows the
16
16
  * reading direction, so it slides the other way in right-to-left text.
17
17
  */
18
18
  function Switch(allProps) {
@@ -5,6 +5,10 @@ import { cn } from "../lib/utils.js";
5
5
  import { Tooltip as TooltipPrimitive } from "radix-ui";
6
6
  import { withRender } from "../lib/render-prop.js";
7
7
  import { motion } from "../lib/motion.js";
8
+ /**
9
+ * @motion overlay:open The tooltip fades in and scales up a little from the control it describes once the delay has
10
+ * passed, and fades out when the pointer or focus leaves. Under reduced motion it is a short fade.
11
+ */
8
12
  const openMotion = motion("tooltip", "open", "overlay");
9
13
  // Whether a TooltipProvider is above, so a lone Tooltip can supply its own.
10
14
  const HasProvider = React.createContext(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candor-ui/react",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Candor UI's free tier as an npm package: React components for agents that do real work, on shadcn/ui and Tailwind 4.",
5
5
  "license": "MIT",
6
6
  "author": "Methodic LLC",
@@ -50,8 +50,7 @@
50
50
  "clsx": "^2.1.1",
51
51
  "lucide-react": "^1.67.0",
52
52
  "radix-ui": "^1.8.1",
53
- "tailwind-merge": "^3.7.0",
54
- "tw-animate-css": "^1.4.0"
53
+ "tailwind-merge": "^3.7.0"
55
54
  },
56
55
  "peerDependencies": {
57
56
  "@ag-ui/client": "^1.0.3",