@contractspec/lib.ui-kit-web 1.61.0 → 2.0.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.
- package/dist/browser/ui/alert-dialog.js +9 -4
- package/dist/browser/ui/atoms/Pagination/Pagination.js +9 -4
- package/dist/browser/ui/atoms/Pagination/index.js +9 -4
- package/dist/browser/ui/atoms/SearchInput/SearchInput.js +9 -4
- package/dist/browser/ui/atoms/SearchInput/index.js +9 -4
- package/dist/browser/ui/button.js +9 -4
- package/dist/browser/ui/calendar.js +12 -7
- package/dist/browser/ui/carousel.js +20 -15
- package/dist/browser/ui/confirm-dialog.js +9 -4
- package/dist/browser/ui/context-menu.js +178 -85
- package/dist/browser/ui/cta.js +13 -9
- package/dist/browser/ui/date-picker.js +17 -12
- package/dist/browser/ui/date-range-picker.js +14 -9
- package/dist/browser/ui/datetime-picker.js +21 -16
- package/dist/browser/ui/empty-state.js +32 -10
- package/dist/browser/ui/input-group.js +9 -4
- package/dist/browser/ui/input-otp.js +37 -18
- package/dist/browser/ui/link.js +6 -4
- package/dist/browser/ui/loading-button.js +41 -14
- package/dist/browser/ui/marketing/Hero.js +9 -4
- package/dist/browser/ui/marketing/PricingTable.js +9 -4
- package/dist/browser/ui/marketing/index.js +9 -4
- package/dist/browser/ui/molecules/Autocomplete/index.js +15 -10
- package/dist/browser/ui/molecules/SearchAndFilter/SearchAndFilter.js +9 -4
- package/dist/browser/ui/molecules/SearchAndFilter/index.js +9 -4
- package/dist/browser/ui/organisms/ErrorBoundary/ErrorBoundary.js +12 -7
- package/dist/browser/ui/organisms/ErrorBoundary/index.js +12 -7
- package/dist/browser/ui/organisms/ListPage/ListPage.js +41 -14
- package/dist/browser/ui/organisms/ListPage/index.js +41 -14
- package/dist/browser/ui/page-header.js +32 -10
- package/dist/browser/ui/pagination.js +98 -79
- package/dist/browser/ui/resizable.js +6 -9
- package/dist/browser/ui/section.js +12 -4
- package/dist/browser/ui/sidebar.js +22 -17
- package/dist/browser/ui/stack.js +32 -10
- package/dist/browser/ui/stat-card-group.js +32 -10
- package/dist/browser/ui/stepper.js +32 -10
- package/dist/browser/ui/time-picker.js +13 -8
- package/dist/browser/ui/toast.js +57 -29
- package/dist/browser/ui/toaster.js +60 -32
- package/dist/browser/ui/usecases/UseCaseCard.js +41 -14
- package/dist/browser/ui/usecases/UserStoryCard.js +32 -10
- package/dist/browser/ui/usecases/index.js +41 -14
- package/dist/browser/ui/visually-hidden.js +8 -4
- package/dist/index.d.ts +0 -1
- package/dist/ui/accordion.d.ts +0 -1
- package/dist/ui/alert-dialog.d.ts +0 -1
- package/dist/ui/alert-dialog.js +9 -4
- package/dist/ui/alert.d.ts +0 -1
- package/dist/ui/aspect-ratio.d.ts +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts +0 -1
- package/dist/ui/atoms/FilterSelect/index.d.ts +0 -1
- package/dist/ui/atoms/FilterSelect/types.d.ts +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts +0 -1
- package/dist/ui/atoms/LoadingSpinner/index.d.ts +0 -1
- package/dist/ui/atoms/Pagination/Pagination.d.ts +0 -1
- package/dist/ui/atoms/Pagination/Pagination.js +9 -4
- package/dist/ui/atoms/Pagination/index.d.ts +0 -1
- package/dist/ui/atoms/Pagination/index.js +9 -4
- package/dist/ui/atoms/Pagination/types.d.ts +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.js +9 -4
- package/dist/ui/atoms/SearchInput/index.d.ts +0 -1
- package/dist/ui/atoms/SearchInput/index.js +9 -4
- package/dist/ui/atoms/SearchInput/types.d.ts +0 -1
- package/dist/ui/avatar.d.ts +0 -1
- package/dist/ui/badge.d.ts +0 -1
- package/dist/ui/breadcrumb.d.ts +0 -1
- package/dist/ui/button.d.ts +2 -7
- package/dist/ui/button.js +9 -4
- package/dist/ui/calendar.d.ts +0 -1
- package/dist/ui/calendar.js +12 -7
- package/dist/ui/card.d.ts +0 -1
- package/dist/ui/carousel.d.ts +0 -1
- package/dist/ui/carousel.js +20 -15
- package/dist/ui/checkbox.d.ts +0 -1
- package/dist/ui/collapsible.d.ts +0 -1
- package/dist/ui/command.d.ts +0 -1
- package/dist/ui/confirm-dialog.d.ts +0 -1
- package/dist/ui/confirm-dialog.js +9 -4
- package/dist/ui/context-menu.d.ts +26 -23
- package/dist/ui/context-menu.js +178 -85
- package/dist/ui/cta.d.ts +2 -9
- package/dist/ui/cta.js +13 -9
- package/dist/ui/date-picker.d.ts +0 -1
- package/dist/ui/date-picker.js +17 -12
- package/dist/ui/date-range-picker.d.ts +0 -1
- package/dist/ui/date-range-picker.js +14 -9
- package/dist/ui/datetime-picker.d.ts +0 -1
- package/dist/ui/datetime-picker.js +21 -16
- package/dist/ui/dialog.d.ts +0 -1
- package/dist/ui/drawer.d.ts +0 -1
- package/dist/ui/dropdown-menu.d.ts +0 -1
- package/dist/ui/empty-state.d.ts +0 -1
- package/dist/ui/empty-state.js +32 -10
- package/dist/ui/empty.d.ts +0 -1
- package/dist/ui/field.d.ts +0 -1
- package/dist/ui/focus-on-route-change.d.ts +0 -1
- package/dist/ui/form.d.ts +0 -1
- package/dist/ui/hover-card.d.ts +0 -1
- package/dist/ui/input-group.d.ts +0 -1
- package/dist/ui/input-group.js +9 -4
- package/dist/ui/input-otp.d.ts +13 -32
- package/dist/ui/input-otp.js +37 -18
- package/dist/ui/input.d.ts +0 -1
- package/dist/ui/label.d.ts +0 -1
- package/dist/ui/link.d.ts +4 -3
- package/dist/ui/link.js +6 -4
- package/dist/ui/live-region.d.ts +0 -1
- package/dist/ui/loading-button.d.ts +0 -1
- package/dist/ui/loading-button.js +41 -14
- package/dist/ui/map/MapBase.d.ts +0 -1
- package/dist/ui/map/MapGeoJsonOverlay.d.ts +0 -1
- package/dist/ui/map/MapHeatmapH3.d.ts +0 -1
- package/dist/ui/map/MapMarkers.d.ts +0 -1
- package/dist/ui/map/index.d.ts +0 -1
- package/dist/ui/marketing/FeatureGrid.d.ts +0 -1
- package/dist/ui/marketing/Hero.d.ts +0 -1
- package/dist/ui/marketing/Hero.js +9 -4
- package/dist/ui/marketing/PricingTable.d.ts +0 -1
- package/dist/ui/marketing/PricingTable.js +9 -4
- package/dist/ui/marketing/index.d.ts +0 -1
- package/dist/ui/marketing/index.js +9 -4
- package/dist/ui/menubar.d.ts +0 -1
- package/dist/ui/molecules/Autocomplete/index.d.ts +0 -1
- package/dist/ui/molecules/Autocomplete/index.js +15 -10
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.js +9 -4
- package/dist/ui/molecules/SearchAndFilter/index.d.ts +0 -1
- package/dist/ui/molecules/SearchAndFilter/index.js +9 -4
- package/dist/ui/molecules/SearchAndFilter/types.d.ts +0 -1
- package/dist/ui/molecules/SkeletonList.d.ts +0 -1
- package/dist/ui/nav-layout.d.ts +0 -1
- package/dist/ui/navigation-menu.d.ts +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.js +12 -7
- package/dist/ui/organisms/ErrorBoundary/index.d.ts +0 -1
- package/dist/ui/organisms/ErrorBoundary/index.js +12 -7
- package/dist/ui/organisms/ListPage/ListPage.d.ts +0 -1
- package/dist/ui/organisms/ListPage/ListPage.js +41 -14
- package/dist/ui/organisms/ListPage/index.d.ts +0 -1
- package/dist/ui/organisms/ListPage/index.js +41 -14
- package/dist/ui/organisms/ListPage/types.d.ts +0 -1
- package/dist/ui/page-header.d.ts +0 -1
- package/dist/ui/page-header.js +32 -10
- package/dist/ui/pagination.d.ts +11 -23
- package/dist/ui/pagination.js +98 -79
- package/dist/ui/popover.d.ts +0 -1
- package/dist/ui/progress.d.ts +0 -1
- package/dist/ui/radio-group.d.ts +0 -1
- package/dist/ui/resizable.d.ts +5 -21
- package/dist/ui/resizable.js +6 -9
- package/dist/ui/route-announcer.d.ts +0 -1
- package/dist/ui/scroll-area.d.ts +0 -1
- package/dist/ui/section.d.ts +2 -10
- package/dist/ui/section.js +12 -4
- package/dist/ui/select.d.ts +0 -1
- package/dist/ui/separator.d.ts +0 -1
- package/dist/ui/sheet.d.ts +0 -1
- package/dist/ui/sidebar.d.ts +0 -1
- package/dist/ui/sidebar.js +22 -17
- package/dist/ui/skeleton.d.ts +0 -1
- package/dist/ui/skip-link.d.ts +0 -1
- package/dist/ui/slider.d.ts +0 -1
- package/dist/ui/sonner.d.ts +0 -1
- package/dist/ui/stack.d.ts +15 -24
- package/dist/ui/stack.js +32 -10
- package/dist/ui/stat-card-group.d.ts +0 -1
- package/dist/ui/stat-card-group.js +32 -10
- package/dist/ui/stepper.d.ts +0 -1
- package/dist/ui/stepper.js +32 -10
- package/dist/ui/switch.d.ts +0 -1
- package/dist/ui/table.d.ts +0 -1
- package/dist/ui/tabs.d.ts +0 -1
- package/dist/ui/text.d.ts +0 -1
- package/dist/ui/textarea.d.ts +0 -1
- package/dist/ui/time-picker.d.ts +0 -1
- package/dist/ui/time-picker.js +13 -8
- package/dist/ui/toast.d.ts +20 -8
- package/dist/ui/toast.js +57 -29
- package/dist/ui/toaster.d.ts +0 -1
- package/dist/ui/toaster.js +60 -32
- package/dist/ui/toggle-group.d.ts +0 -1
- package/dist/ui/toggle.d.ts +0 -1
- package/dist/ui/tooltip.d.ts +0 -1
- package/dist/ui/typography.d.ts +0 -1
- package/dist/ui/use-media-query.d.ts +0 -1
- package/dist/ui/use-mobile.d.ts +0 -1
- package/dist/ui/use-reduced-motion.d.ts +0 -1
- package/dist/ui/use-toast.d.ts +0 -1
- package/dist/ui/useListState.d.ts +0 -1
- package/dist/ui/usecases/UseCaseCard.d.ts +0 -1
- package/dist/ui/usecases/UseCaseCard.js +41 -14
- package/dist/ui/usecases/UserStoryCard.d.ts +0 -1
- package/dist/ui/usecases/UserStoryCard.js +32 -10
- package/dist/ui/usecases/index.d.ts +0 -1
- package/dist/ui/usecases/index.js +41 -14
- package/dist/ui/utils.d.ts +0 -1
- package/dist/ui/visually-hidden.d.ts +4 -3
- package/dist/ui/visually-hidden.js +8 -4
- package/package.json +13 -12
- package/dist/index.d.ts.map +0 -1
- package/dist/ui/accordion.d.ts.map +0 -1
- package/dist/ui/alert-dialog.d.ts.map +0 -1
- package/dist/ui/alert.d.ts.map +0 -1
- package/dist/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/ui/atoms/FilterSelect/FilterSelect.d.ts.map +0 -1
- package/dist/ui/atoms/FilterSelect/index.d.ts.map +0 -1
- package/dist/ui/atoms/FilterSelect/types.d.ts.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +0 -1
- package/dist/ui/atoms/LoadingSpinner/index.d.ts.map +0 -1
- package/dist/ui/atoms/Pagination/Pagination.d.ts.map +0 -1
- package/dist/ui/atoms/Pagination/index.d.ts.map +0 -1
- package/dist/ui/atoms/Pagination/types.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/SearchInput.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/index.d.ts.map +0 -1
- package/dist/ui/atoms/SearchInput/types.d.ts.map +0 -1
- package/dist/ui/avatar.d.ts.map +0 -1
- package/dist/ui/badge.d.ts.map +0 -1
- package/dist/ui/breadcrumb.d.ts.map +0 -1
- package/dist/ui/button.d.ts.map +0 -1
- package/dist/ui/calendar.d.ts.map +0 -1
- package/dist/ui/card.d.ts.map +0 -1
- package/dist/ui/carousel.d.ts.map +0 -1
- package/dist/ui/checkbox.d.ts.map +0 -1
- package/dist/ui/collapsible.d.ts.map +0 -1
- package/dist/ui/command.d.ts.map +0 -1
- package/dist/ui/confirm-dialog.d.ts.map +0 -1
- package/dist/ui/context-menu.d.ts.map +0 -1
- package/dist/ui/cta.d.ts.map +0 -1
- package/dist/ui/date-picker.d.ts.map +0 -1
- package/dist/ui/date-range-picker.d.ts.map +0 -1
- package/dist/ui/datetime-picker.d.ts.map +0 -1
- package/dist/ui/dialog.d.ts.map +0 -1
- package/dist/ui/drawer.d.ts.map +0 -1
- package/dist/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/ui/empty-state.d.ts.map +0 -1
- package/dist/ui/empty.d.ts.map +0 -1
- package/dist/ui/field.d.ts.map +0 -1
- package/dist/ui/focus-on-route-change.d.ts.map +0 -1
- package/dist/ui/form.d.ts.map +0 -1
- package/dist/ui/hover-card.d.ts.map +0 -1
- package/dist/ui/input-group.d.ts.map +0 -1
- package/dist/ui/input-otp.d.ts.map +0 -1
- package/dist/ui/input.d.ts.map +0 -1
- package/dist/ui/label.d.ts.map +0 -1
- package/dist/ui/link.d.ts.map +0 -1
- package/dist/ui/live-region.d.ts.map +0 -1
- package/dist/ui/loading-button.d.ts.map +0 -1
- package/dist/ui/map/MapBase.d.ts.map +0 -1
- package/dist/ui/map/MapGeoJsonOverlay.d.ts.map +0 -1
- package/dist/ui/map/MapHeatmapH3.d.ts.map +0 -1
- package/dist/ui/map/MapMarkers.d.ts.map +0 -1
- package/dist/ui/map/index.d.ts.map +0 -1
- package/dist/ui/marketing/FeatureGrid.d.ts.map +0 -1
- package/dist/ui/marketing/Hero.d.ts.map +0 -1
- package/dist/ui/marketing/PricingTable.d.ts.map +0 -1
- package/dist/ui/marketing/index.d.ts.map +0 -1
- package/dist/ui/menubar.d.ts.map +0 -1
- package/dist/ui/molecules/Autocomplete/index.d.ts.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/SearchAndFilter.d.ts.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/index.d.ts.map +0 -1
- package/dist/ui/molecules/SearchAndFilter/types.d.ts.map +0 -1
- package/dist/ui/molecules/SkeletonList.d.ts.map +0 -1
- package/dist/ui/nav-layout.d.ts.map +0 -1
- package/dist/ui/navigation-menu.d.ts.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
- package/dist/ui/organisms/ErrorBoundary/index.d.ts.map +0 -1
- package/dist/ui/organisms/ListPage/ListPage.d.ts.map +0 -1
- package/dist/ui/organisms/ListPage/index.d.ts.map +0 -1
- package/dist/ui/organisms/ListPage/types.d.ts.map +0 -1
- package/dist/ui/page-header.d.ts.map +0 -1
- package/dist/ui/pagination.d.ts.map +0 -1
- package/dist/ui/popover.d.ts.map +0 -1
- package/dist/ui/progress.d.ts.map +0 -1
- package/dist/ui/radio-group.d.ts.map +0 -1
- package/dist/ui/resizable.d.ts.map +0 -1
- package/dist/ui/route-announcer.d.ts.map +0 -1
- package/dist/ui/scroll-area.d.ts.map +0 -1
- package/dist/ui/section.d.ts.map +0 -1
- package/dist/ui/select.d.ts.map +0 -1
- package/dist/ui/separator.d.ts.map +0 -1
- package/dist/ui/sheet.d.ts.map +0 -1
- package/dist/ui/sidebar.d.ts.map +0 -1
- package/dist/ui/skeleton.d.ts.map +0 -1
- package/dist/ui/skip-link.d.ts.map +0 -1
- package/dist/ui/slider.d.ts.map +0 -1
- package/dist/ui/sonner.d.ts.map +0 -1
- package/dist/ui/stack.d.ts.map +0 -1
- package/dist/ui/stat-card-group.d.ts.map +0 -1
- package/dist/ui/stepper.d.ts.map +0 -1
- package/dist/ui/switch.d.ts.map +0 -1
- package/dist/ui/table.d.ts.map +0 -1
- package/dist/ui/tabs.d.ts.map +0 -1
- package/dist/ui/text.d.ts.map +0 -1
- package/dist/ui/textarea.d.ts.map +0 -1
- package/dist/ui/time-picker.d.ts.map +0 -1
- package/dist/ui/toast.d.ts.map +0 -1
- package/dist/ui/toaster.d.ts.map +0 -1
- package/dist/ui/toggle-group.d.ts.map +0 -1
- package/dist/ui/toggle.d.ts.map +0 -1
- package/dist/ui/tooltip.d.ts.map +0 -1
- package/dist/ui/typography.d.ts.map +0 -1
- package/dist/ui/use-media-query.d.ts.map +0 -1
- package/dist/ui/use-mobile.d.ts.map +0 -1
- package/dist/ui/use-reduced-motion.d.ts.map +0 -1
- package/dist/ui/use-toast.d.ts.map +0 -1
- package/dist/ui/useListState.d.ts.map +0 -1
- package/dist/ui/usecases/UseCaseCard.d.ts.map +0 -1
- package/dist/ui/usecases/UserStoryCard.d.ts.map +0 -1
- package/dist/ui/usecases/index.d.ts.map +0 -1
- package/dist/ui/utils.d.ts.map +0 -1
- package/dist/ui/visually-hidden.d.ts.map +0 -1
|
@@ -7,7 +7,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/stack.tsx
|
|
10
|
-
import * as React from "react";
|
|
11
10
|
import { cva } from "class-variance-authority";
|
|
12
11
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
13
12
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
@@ -43,15 +42,22 @@ var vStackVariants = cva("flex flex-col", {
|
|
|
43
42
|
justify: "start"
|
|
44
43
|
}
|
|
45
44
|
});
|
|
46
|
-
|
|
45
|
+
function VStack({
|
|
46
|
+
className,
|
|
47
|
+
gap,
|
|
48
|
+
align,
|
|
49
|
+
justify,
|
|
50
|
+
as = "div",
|
|
51
|
+
ref,
|
|
52
|
+
...props
|
|
53
|
+
}) {
|
|
47
54
|
const Comp = as;
|
|
48
55
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
49
56
|
ref,
|
|
50
57
|
className: cn(vStackVariants({ gap, align, justify }), className),
|
|
51
58
|
...props
|
|
52
59
|
}, undefined, false, undefined, this);
|
|
53
|
-
}
|
|
54
|
-
VStack.displayName = "VStack";
|
|
60
|
+
}
|
|
55
61
|
var hStackVariants = cva("flex flex-row", {
|
|
56
62
|
variants: {
|
|
57
63
|
gap: {
|
|
@@ -91,15 +97,23 @@ var hStackVariants = cva("flex flex-row", {
|
|
|
91
97
|
wrap: "wrap"
|
|
92
98
|
}
|
|
93
99
|
});
|
|
94
|
-
|
|
100
|
+
function HStack({
|
|
101
|
+
className,
|
|
102
|
+
gap,
|
|
103
|
+
align,
|
|
104
|
+
justify,
|
|
105
|
+
wrap,
|
|
106
|
+
as = "div",
|
|
107
|
+
ref,
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
95
110
|
const Comp = as;
|
|
96
111
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
97
112
|
ref,
|
|
98
113
|
className: cn(hStackVariants({ gap, align, justify, wrap }), className),
|
|
99
114
|
...props
|
|
100
115
|
}, undefined, false, undefined, this);
|
|
101
|
-
}
|
|
102
|
-
HStack.displayName = "HStack";
|
|
116
|
+
}
|
|
103
117
|
var boxVariants = cva("flex flex-row", {
|
|
104
118
|
variants: {
|
|
105
119
|
gap: {
|
|
@@ -139,15 +153,23 @@ var boxVariants = cva("flex flex-row", {
|
|
|
139
153
|
wrap: "nowrap"
|
|
140
154
|
}
|
|
141
155
|
});
|
|
142
|
-
|
|
156
|
+
function Box({
|
|
157
|
+
className,
|
|
158
|
+
gap,
|
|
159
|
+
align,
|
|
160
|
+
justify,
|
|
161
|
+
wrap,
|
|
162
|
+
as = "div",
|
|
163
|
+
ref,
|
|
164
|
+
...props
|
|
165
|
+
}) {
|
|
143
166
|
const Comp = as;
|
|
144
167
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
145
168
|
ref,
|
|
146
169
|
className: cn(boxVariants({ gap, align, justify, wrap }), className),
|
|
147
170
|
...props
|
|
148
171
|
}, undefined, false, undefined, this);
|
|
149
|
-
}
|
|
150
|
-
Box.displayName = "Box";
|
|
172
|
+
}
|
|
151
173
|
// ui/empty-state.tsx
|
|
152
174
|
import { cva as cva2 } from "class-variance-authority";
|
|
153
175
|
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
|
-
|
|
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";
|
|
@@ -13,20 +13,36 @@ import { Dot } from "lucide-react";
|
|
|
13
13
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
14
14
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
15
15
|
"use client";
|
|
16
|
-
|
|
16
|
+
function InputOTP({
|
|
17
|
+
className,
|
|
18
|
+
containerClassName,
|
|
17
19
|
ref,
|
|
18
|
-
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
19
|
-
className: cn("disabled:cursor-not-allowed", className),
|
|
20
20
|
...props
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ jsxDEV(OTPInput, {
|
|
23
|
+
ref,
|
|
24
|
+
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
25
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
26
|
+
...props
|
|
27
|
+
}, undefined, false, undefined, this);
|
|
28
|
+
}
|
|
29
|
+
function InputOTPGroup({
|
|
30
|
+
className,
|
|
31
|
+
ref,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("flex items-center", className),
|
|
37
|
+
...props
|
|
38
|
+
}, undefined, false, undefined, this);
|
|
39
|
+
}
|
|
40
|
+
function InputOTPSlot({
|
|
41
|
+
index,
|
|
42
|
+
className,
|
|
24
43
|
ref,
|
|
25
|
-
className: cn("flex items-center", className),
|
|
26
44
|
...props
|
|
27
|
-
}
|
|
28
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
29
|
-
var InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
45
|
+
}) {
|
|
30
46
|
const inputOTPContext = React.useContext(OTPInputContext);
|
|
31
47
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] || {};
|
|
32
48
|
return /* @__PURE__ */ jsxDEV("div", {
|
|
@@ -43,15 +59,18 @@ var InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
43
59
|
}, undefined, false, undefined, this)
|
|
44
60
|
]
|
|
45
61
|
}, undefined, true, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var InputOTPSeparator = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxDEV("div", {
|
|
62
|
+
}
|
|
63
|
+
function InputOTPSeparator({
|
|
49
64
|
ref,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
...props
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
68
|
+
ref,
|
|
69
|
+
role: "separator",
|
|
70
|
+
...props,
|
|
71
|
+
children: /* @__PURE__ */ jsxDEV(Dot, {}, undefined, false, undefined, this)
|
|
72
|
+
}, undefined, false, undefined, this);
|
|
73
|
+
}
|
|
55
74
|
export {
|
|
56
75
|
InputOTPSlot,
|
|
57
76
|
InputOTPSeparator,
|
package/dist/browser/ui/link.js
CHANGED
|
@@ -7,18 +7,20 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
// ui/link.tsx
|
|
10
|
-
import { forwardRef } from "react";
|
|
11
10
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
12
11
|
import NextLink from "next/link";
|
|
13
12
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
14
|
-
|
|
13
|
+
function Link({
|
|
14
|
+
className,
|
|
15
|
+
ref,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
15
18
|
return /* @__PURE__ */ jsxDEV(NextLink, {
|
|
16
19
|
ref,
|
|
17
20
|
className: cn('className="text-primary underline"', className),
|
|
18
21
|
...props
|
|
19
22
|
}, undefined, false, undefined, this);
|
|
20
|
-
}
|
|
21
|
-
Link.displayName = "Link";
|
|
23
|
+
}
|
|
22
24
|
export {
|
|
23
25
|
Link
|
|
24
26
|
};
|
|
@@ -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
|
-
|
|
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,8 @@ 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/stack.tsx
|
|
54
|
-
import * as React2 from "react";
|
|
55
59
|
import { cva as cva2 } from "class-variance-authority";
|
|
56
60
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
57
61
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
@@ -87,15 +91,22 @@ var vStackVariants = cva2("flex flex-col", {
|
|
|
87
91
|
justify: "start"
|
|
88
92
|
}
|
|
89
93
|
});
|
|
90
|
-
|
|
94
|
+
function VStack({
|
|
95
|
+
className,
|
|
96
|
+
gap,
|
|
97
|
+
align,
|
|
98
|
+
justify,
|
|
99
|
+
as = "div",
|
|
100
|
+
ref,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
91
103
|
const Comp = as;
|
|
92
104
|
return /* @__PURE__ */ jsxDEV2(Comp, {
|
|
93
105
|
ref,
|
|
94
106
|
className: cn2(vStackVariants({ gap, align, justify }), className),
|
|
95
107
|
...props
|
|
96
108
|
}, undefined, false, undefined, this);
|
|
97
|
-
}
|
|
98
|
-
VStack.displayName = "VStack";
|
|
109
|
+
}
|
|
99
110
|
var hStackVariants = cva2("flex flex-row", {
|
|
100
111
|
variants: {
|
|
101
112
|
gap: {
|
|
@@ -135,15 +146,23 @@ var hStackVariants = cva2("flex flex-row", {
|
|
|
135
146
|
wrap: "wrap"
|
|
136
147
|
}
|
|
137
148
|
});
|
|
138
|
-
|
|
149
|
+
function HStack({
|
|
150
|
+
className,
|
|
151
|
+
gap,
|
|
152
|
+
align,
|
|
153
|
+
justify,
|
|
154
|
+
wrap,
|
|
155
|
+
as = "div",
|
|
156
|
+
ref,
|
|
157
|
+
...props
|
|
158
|
+
}) {
|
|
139
159
|
const Comp = as;
|
|
140
160
|
return /* @__PURE__ */ jsxDEV2(Comp, {
|
|
141
161
|
ref,
|
|
142
162
|
className: cn2(hStackVariants({ gap, align, justify, wrap }), className),
|
|
143
163
|
...props
|
|
144
164
|
}, undefined, false, undefined, this);
|
|
145
|
-
}
|
|
146
|
-
HStack.displayName = "HStack";
|
|
165
|
+
}
|
|
147
166
|
var boxVariants = cva2("flex flex-row", {
|
|
148
167
|
variants: {
|
|
149
168
|
gap: {
|
|
@@ -183,15 +202,23 @@ var boxVariants = cva2("flex flex-row", {
|
|
|
183
202
|
wrap: "nowrap"
|
|
184
203
|
}
|
|
185
204
|
});
|
|
186
|
-
|
|
205
|
+
function Box({
|
|
206
|
+
className,
|
|
207
|
+
gap,
|
|
208
|
+
align,
|
|
209
|
+
justify,
|
|
210
|
+
wrap,
|
|
211
|
+
as = "div",
|
|
212
|
+
ref,
|
|
213
|
+
...props
|
|
214
|
+
}) {
|
|
187
215
|
const Comp = as;
|
|
188
216
|
return /* @__PURE__ */ jsxDEV2(Comp, {
|
|
189
217
|
ref,
|
|
190
218
|
className: cn2(boxVariants({ gap, align, justify, wrap }), className),
|
|
191
219
|
...props
|
|
192
220
|
}, undefined, false, undefined, this);
|
|
193
|
-
}
|
|
194
|
-
Box.displayName = "Box";
|
|
221
|
+
}
|
|
195
222
|
// ui/text.tsx
|
|
196
223
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
197
224
|
import { cn as cn3 } 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
|
-
|
|
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";
|
|
@@ -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
|
-
|
|
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";
|
|
@@ -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
|
-
|
|
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";
|
|
@@ -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
|
-
|
|
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/dialog.tsx
|
|
54
59
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
55
60
|
import { XIcon } from "lucide-react";
|
|
@@ -453,10 +458,10 @@ function DrawerDescription({
|
|
|
453
458
|
}, undefined, false, undefined, this);
|
|
454
459
|
}
|
|
455
460
|
// ui/use-media-query.ts
|
|
456
|
-
import * as
|
|
461
|
+
import * as React from "react";
|
|
457
462
|
function useMediaQuery(query) {
|
|
458
|
-
const [value, setValue] =
|
|
459
|
-
|
|
463
|
+
const [value, setValue] = React.useState(false);
|
|
464
|
+
React.useEffect(() => {
|
|
460
465
|
function onChange(event) {
|
|
461
466
|
setValue(event.matches);
|
|
462
467
|
}
|
|
@@ -469,7 +474,7 @@ function useMediaQuery(query) {
|
|
|
469
474
|
}
|
|
470
475
|
|
|
471
476
|
// ui/molecules/Autocomplete/index.tsx
|
|
472
|
-
import * as
|
|
477
|
+
import * as React2 from "react";
|
|
473
478
|
import { jsxDEV as jsxDEV6, Fragment } from "react/jsx-dev-runtime";
|
|
474
479
|
"use client";
|
|
475
480
|
var statuses = [
|
|
@@ -491,9 +496,9 @@ var statuses = [
|
|
|
491
496
|
}
|
|
492
497
|
];
|
|
493
498
|
function ComboBoxResponsive() {
|
|
494
|
-
const [open, setOpen] =
|
|
499
|
+
const [open, setOpen] = React2.useState(false);
|
|
495
500
|
const isDesktop = useMediaQuery("(min-width: 768px)");
|
|
496
|
-
const [selectedStatus, setSelectedStatus] =
|
|
501
|
+
const [selectedStatus, setSelectedStatus] = React2.useState(null);
|
|
497
502
|
if (isDesktop) {
|
|
498
503
|
return /* @__PURE__ */ jsxDEV6(Popover, {
|
|
499
504
|
open,
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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/organisms/ErrorBoundary/ErrorBoundary.tsx
|
|
54
|
-
import
|
|
59
|
+
import React from "react";
|
|
55
60
|
import { AlertTriangle, RefreshCw, Home } from "lucide-react";
|
|
56
61
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
57
62
|
"use client";
|
|
@@ -138,7 +143,7 @@ var DefaultErrorFallback = ({
|
|
|
138
143
|
}, undefined, false, undefined, this);
|
|
139
144
|
};
|
|
140
145
|
|
|
141
|
-
class ErrorBoundary extends
|
|
146
|
+
class ErrorBoundary extends React.Component {
|
|
142
147
|
constructor(props) {
|
|
143
148
|
super(props);
|
|
144
149
|
this.state = {
|
|
@@ -181,7 +186,7 @@ class ErrorBoundary extends React2.Component {
|
|
|
181
186
|
}
|
|
182
187
|
}
|
|
183
188
|
var useErrorHandler = () => {
|
|
184
|
-
return
|
|
189
|
+
return React.useCallback((error) => {
|
|
185
190
|
throw error;
|
|
186
191
|
}, []);
|
|
187
192
|
};
|
|
@@ -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
|
-
|
|
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/organisms/ErrorBoundary/ErrorBoundary.tsx
|
|
54
|
-
import
|
|
59
|
+
import React from "react";
|
|
55
60
|
import { AlertTriangle, RefreshCw, Home } from "lucide-react";
|
|
56
61
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
57
62
|
"use client";
|
|
@@ -138,7 +143,7 @@ var DefaultErrorFallback = ({
|
|
|
138
143
|
}, undefined, false, undefined, this);
|
|
139
144
|
};
|
|
140
145
|
|
|
141
|
-
class ErrorBoundary extends
|
|
146
|
+
class ErrorBoundary extends React.Component {
|
|
142
147
|
constructor(props) {
|
|
143
148
|
super(props);
|
|
144
149
|
this.state = {
|
|
@@ -181,7 +186,7 @@ class ErrorBoundary extends React2.Component {
|
|
|
181
186
|
}
|
|
182
187
|
}
|
|
183
188
|
var useErrorHandler = () => {
|
|
184
|
-
return
|
|
189
|
+
return React.useCallback((error) => {
|
|
185
190
|
throw error;
|
|
186
191
|
}, []);
|
|
187
192
|
};
|