@contractspec/lib.ui-kit-web 1.61.0 → 1.62.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 (111) hide show
  1. package/dist/browser/ui/alert-dialog.js +9 -4
  2. package/dist/browser/ui/atoms/Pagination/Pagination.js +9 -4
  3. package/dist/browser/ui/atoms/Pagination/index.js +9 -4
  4. package/dist/browser/ui/atoms/SearchInput/SearchInput.js +9 -4
  5. package/dist/browser/ui/atoms/SearchInput/index.js +9 -4
  6. package/dist/browser/ui/button.js +9 -4
  7. package/dist/browser/ui/calendar.js +12 -7
  8. package/dist/browser/ui/carousel.js +20 -15
  9. package/dist/browser/ui/confirm-dialog.js +9 -4
  10. package/dist/browser/ui/context-menu.js +178 -85
  11. package/dist/browser/ui/cta.js +13 -9
  12. package/dist/browser/ui/date-picker.js +17 -12
  13. package/dist/browser/ui/date-range-picker.js +14 -9
  14. package/dist/browser/ui/datetime-picker.js +21 -16
  15. package/dist/browser/ui/empty-state.js +32 -10
  16. package/dist/browser/ui/input-group.js +9 -4
  17. package/dist/browser/ui/input-otp.js +37 -18
  18. package/dist/browser/ui/link.js +6 -4
  19. package/dist/browser/ui/loading-button.js +41 -14
  20. package/dist/browser/ui/marketing/Hero.js +9 -4
  21. package/dist/browser/ui/marketing/PricingTable.js +9 -4
  22. package/dist/browser/ui/marketing/index.js +9 -4
  23. package/dist/browser/ui/molecules/Autocomplete/index.js +15 -10
  24. package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +9 -4
  25. package/dist/browser/ui/molecules/SearchAndFilter/index.js +9 -4
  26. package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +12 -7
  27. package/dist/browser/ui/organisms/ErrorBoundary/index.js +12 -7
  28. package/dist/browser/ui/organisms/ListPage/ListPage.js +41 -14
  29. package/dist/browser/ui/organisms/ListPage/index.js +41 -14
  30. package/dist/browser/ui/page-header.js +32 -10
  31. package/dist/browser/ui/pagination.js +98 -79
  32. package/dist/browser/ui/resizable.js +6 -9
  33. package/dist/browser/ui/section.js +12 -4
  34. package/dist/browser/ui/sidebar.js +22 -17
  35. package/dist/browser/ui/stack.js +32 -10
  36. package/dist/browser/ui/stat-card-group.js +32 -10
  37. package/dist/browser/ui/stepper.js +32 -10
  38. package/dist/browser/ui/time-picker.js +13 -8
  39. package/dist/browser/ui/toast.js +57 -29
  40. package/dist/browser/ui/toaster.js +60 -32
  41. package/dist/browser/ui/usecases/UseCaseCard.js +41 -14
  42. package/dist/browser/ui/usecases/UserStoryCard.js +32 -10
  43. package/dist/browser/ui/usecases/index.js +41 -14
  44. package/dist/browser/ui/visually-hidden.js +8 -4
  45. package/dist/ui/alert-dialog.js +9 -4
  46. package/dist/ui/atoms/Pagination/Pagination.js +9 -4
  47. package/dist/ui/atoms/Pagination/index.js +9 -4
  48. package/dist/ui/atoms/SearchInput/SearchInput.js +9 -4
  49. package/dist/ui/atoms/SearchInput/index.js +9 -4
  50. package/dist/ui/button.d.ts +2 -6
  51. package/dist/ui/button.d.ts.map +1 -1
  52. package/dist/ui/button.js +9 -4
  53. package/dist/ui/calendar.js +12 -7
  54. package/dist/ui/carousel.js +20 -15
  55. package/dist/ui/confirm-dialog.js +9 -4
  56. package/dist/ui/context-menu.d.ts +26 -22
  57. package/dist/ui/context-menu.d.ts.map +1 -1
  58. package/dist/ui/context-menu.js +178 -85
  59. package/dist/ui/cta.d.ts +2 -8
  60. package/dist/ui/cta.d.ts.map +1 -1
  61. package/dist/ui/cta.js +13 -9
  62. package/dist/ui/date-picker.js +17 -12
  63. package/dist/ui/date-range-picker.js +14 -9
  64. package/dist/ui/datetime-picker.js +21 -16
  65. package/dist/ui/empty-state.js +32 -10
  66. package/dist/ui/input-group.js +9 -4
  67. package/dist/ui/input-otp.d.ts +13 -31
  68. package/dist/ui/input-otp.d.ts.map +1 -1
  69. package/dist/ui/input-otp.js +37 -18
  70. package/dist/ui/link.d.ts +4 -2
  71. package/dist/ui/link.d.ts.map +1 -1
  72. package/dist/ui/link.js +6 -4
  73. package/dist/ui/loading-button.js +41 -14
  74. package/dist/ui/marketing/Hero.js +9 -4
  75. package/dist/ui/marketing/PricingTable.js +9 -4
  76. package/dist/ui/marketing/index.js +9 -4
  77. package/dist/ui/molecules/Autocomplete/index.js +15 -10
  78. package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +9 -4
  79. package/dist/ui/molecules/SearchAndFilter/index.js +9 -4
  80. package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +12 -7
  81. package/dist/ui/organisms/ErrorBoundary/index.js +12 -7
  82. package/dist/ui/organisms/ListPage/ListPage.js +41 -14
  83. package/dist/ui/organisms/ListPage/index.js +41 -14
  84. package/dist/ui/page-header.js +32 -10
  85. package/dist/ui/pagination.d.ts +11 -22
  86. package/dist/ui/pagination.d.ts.map +1 -1
  87. package/dist/ui/pagination.js +98 -79
  88. package/dist/ui/resizable.d.ts +5 -20
  89. package/dist/ui/resizable.d.ts.map +1 -1
  90. package/dist/ui/resizable.js +6 -9
  91. package/dist/ui/section.d.ts +2 -9
  92. package/dist/ui/section.d.ts.map +1 -1
  93. package/dist/ui/section.js +12 -4
  94. package/dist/ui/sidebar.js +22 -17
  95. package/dist/ui/stack.d.ts +15 -23
  96. package/dist/ui/stack.d.ts.map +1 -1
  97. package/dist/ui/stack.js +32 -10
  98. package/dist/ui/stat-card-group.js +32 -10
  99. package/dist/ui/stepper.js +32 -10
  100. package/dist/ui/time-picker.js +13 -8
  101. package/dist/ui/toast.d.ts +20 -7
  102. package/dist/ui/toast.d.ts.map +1 -1
  103. package/dist/ui/toast.js +57 -29
  104. package/dist/ui/toaster.js +60 -32
  105. package/dist/ui/usecases/UseCaseCard.js +41 -14
  106. package/dist/ui/usecases/UserStoryCard.js +32 -10
  107. package/dist/ui/usecases/index.js +41 -14
  108. package/dist/ui/visually-hidden.d.ts +4 -2
  109. package/dist/ui/visually-hidden.d.ts.map +1 -1
  110. package/dist/ui/visually-hidden.js +8 -4
  111. package/package.json +11 -10
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/alert-dialog.tsx
54
59
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
55
60
  import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/select.tsx
54
59
  import * as SelectPrimitive from "@radix-ui/react-select";
55
60
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/select.tsx
54
59
  import * as SelectPrimitive from "@radix-ui/react-select";
55
60
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/input.tsx
54
59
  import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
55
60
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/input.tsx
54
59
  import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
55
60
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  export {
54
59
  buttonVariants,
55
60
  Button
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,10 +54,9 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/calendar.tsx
54
- import * as React2 from "react";
59
+ import * as React from "react";
55
60
  import {
56
61
  ChevronDownIcon,
57
62
  ChevronLeftIcon,
@@ -157,8 +162,8 @@ function CalendarDayButton({
157
162
  ...props
158
163
  }) {
159
164
  const defaultClassNames = getDefaultClassNames();
160
- const ref = React2.useRef(null);
161
- React2.useEffect(() => {
165
+ const ref = React.useRef(null);
166
+ React.useEffect(() => {
162
167
  if (modifiers.focused)
163
168
  ref.current?.focus();
164
169
  }, [modifiers.focused]);
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/utils.ts
54
59
  import { clsx } from "clsx";
55
60
  import { twMerge } from "tailwind-merge";
@@ -58,14 +63,14 @@ function cn2(...inputs) {
58
63
  }
59
64
 
60
65
  // ui/carousel.tsx
61
- import * as React2 from "react";
66
+ import * as React from "react";
62
67
  import useEmblaCarousel from "embla-carousel-react";
63
68
  import { ArrowLeft, ArrowRight } from "lucide-react";
64
69
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
65
70
  "use client";
66
- var CarouselContext = React2.createContext(null);
71
+ var CarouselContext = React.createContext(null);
67
72
  function useCarousel() {
68
- const context = React2.useContext(CarouselContext);
73
+ const context = React.useContext(CarouselContext);
69
74
  if (!context) {
70
75
  throw new Error("useCarousel must be used within a <Carousel />");
71
76
  }
@@ -84,21 +89,21 @@ function Carousel({
84
89
  ...opts,
85
90
  axis: orientation === "horizontal" ? "x" : "y"
86
91
  }, plugins);
87
- const [canScrollPrev, setCanScrollPrev] = React2.useState(false);
88
- const [canScrollNext, setCanScrollNext] = React2.useState(false);
89
- const onSelect = React2.useCallback((api2) => {
92
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
93
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
94
+ const onSelect = React.useCallback((api2) => {
90
95
  if (!api2)
91
96
  return;
92
97
  setCanScrollPrev(api2.canScrollPrev());
93
98
  setCanScrollNext(api2.canScrollNext());
94
99
  }, []);
95
- const scrollPrev = React2.useCallback(() => {
100
+ const scrollPrev = React.useCallback(() => {
96
101
  api?.scrollPrev();
97
102
  }, [api]);
98
- const scrollNext = React2.useCallback(() => {
103
+ const scrollNext = React.useCallback(() => {
99
104
  api?.scrollNext();
100
105
  }, [api]);
101
- const handleKeyDown = React2.useCallback((event) => {
106
+ const handleKeyDown = React.useCallback((event) => {
102
107
  if (event.key === "ArrowLeft") {
103
108
  event.preventDefault();
104
109
  scrollPrev();
@@ -107,12 +112,12 @@ function Carousel({
107
112
  scrollNext();
108
113
  }
109
114
  }, [scrollPrev, scrollNext]);
110
- React2.useEffect(() => {
115
+ React.useEffect(() => {
111
116
  if (!api || !setApi)
112
117
  return;
113
118
  setApi(api);
114
119
  }, [api, setApi]);
115
- React2.useEffect(() => {
120
+ React.useEffect(() => {
116
121
  if (!api)
117
122
  return;
118
123
  onSelect(api);
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
7
7
  });
8
8
 
9
9
  // ui/button.tsx
10
- import * as React from "react";
11
10
  import { Slot } from "@radix-ui/react-slot";
12
11
  import { cva } from "class-variance-authority";
13
12
  import { cn } from "@contractspec/lib.ui-kit-core/utils";
@@ -34,7 +33,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
34
33
  size: "default"
35
34
  }
36
35
  });
37
- var Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
36
+ function Button({
37
+ className,
38
+ variant,
39
+ size,
40
+ asChild = false,
41
+ ref,
42
+ ...props
43
+ }) {
38
44
  if (asChild) {
39
45
  return /* @__PURE__ */ jsxDEV(Slot, {
40
46
  "data-slot": "button",
@@ -48,8 +54,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
48
54
  className: cn(buttonVariants({ variant, size, className })),
49
55
  ...props
50
56
  }, undefined, false, undefined, this);
51
- });
52
- Button.displayName = "Button";
57
+ }
53
58
  // ui/alert-dialog.tsx
54
59
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
55
60
  import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";