@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
package/dist/ui/pagination.d.ts
CHANGED
|
@@ -1,29 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ButtonProps } from './button';
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
declare
|
|
8
|
-
|
|
3
|
+
declare function Pagination({ className, ...props }: React.ComponentPropsWithoutRef<'nav'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function PaginationContent({ className, ref, ...props }: React.ComponentPropsWithoutRef<'ul'> & {
|
|
5
|
+
ref?: React.Ref<HTMLUListElement>;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function PaginationItem({ className, ref, ...props }: React.ComponentPropsWithoutRef<'li'> & {
|
|
8
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
type PaginationLinkProps = {
|
|
10
11
|
isActive?: boolean;
|
|
11
12
|
} & Pick<ButtonProps, 'size'> & React.ComponentPropsWithoutRef<'a'>;
|
|
12
|
-
declare
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
declare const PaginationPrevious: {
|
|
17
|
-
({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
declare const PaginationNext: {
|
|
21
|
-
({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
displayName: string;
|
|
23
|
-
};
|
|
24
|
-
declare const PaginationEllipsis: {
|
|
25
|
-
({ className, ...props }: React.ComponentPropsWithoutRef<"span">): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
displayName: string;
|
|
27
|
-
};
|
|
13
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
28
17
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
|
|
29
|
-
//# sourceMappingURL=pagination.d.ts.map
|
package/dist/ui/pagination.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,103 +49,116 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/pagination.tsx
|
|
49
|
-
import * as React2 from "react";
|
|
50
54
|
import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
|
|
51
55
|
import { cn as cn2 } from "@contractspec/lib.ui-kit-core/utils";
|
|
52
56
|
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
53
|
-
|
|
57
|
+
function Pagination({
|
|
54
58
|
className,
|
|
55
59
|
...props
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsxDEV2("nav", {
|
|
62
|
+
role: "navigation",
|
|
63
|
+
"aria-label": "pagination",
|
|
64
|
+
className: cn2("mx-auto flex w-full justify-center", className),
|
|
65
|
+
...props
|
|
66
|
+
}, undefined, false, undefined, this);
|
|
67
|
+
}
|
|
68
|
+
function PaginationContent({
|
|
69
|
+
className,
|
|
64
70
|
ref,
|
|
65
|
-
className: cn2("flex flex-row items-center gap-1", className),
|
|
66
71
|
...props
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
}) {
|
|
73
|
+
return /* @__PURE__ */ jsxDEV2("ul", {
|
|
74
|
+
ref,
|
|
75
|
+
className: cn2("flex flex-row items-center gap-1", className),
|
|
76
|
+
...props
|
|
77
|
+
}, undefined, false, undefined, this);
|
|
78
|
+
}
|
|
79
|
+
function PaginationItem({
|
|
80
|
+
className,
|
|
70
81
|
ref,
|
|
71
|
-
className: cn2("", className),
|
|
72
82
|
...props
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */ jsxDEV2("li", {
|
|
85
|
+
ref,
|
|
86
|
+
className: cn2("", className),
|
|
87
|
+
...props
|
|
88
|
+
}, undefined, false, undefined, this);
|
|
89
|
+
}
|
|
90
|
+
function PaginationLink({
|
|
76
91
|
className,
|
|
77
92
|
isActive,
|
|
78
93
|
size = "icon",
|
|
79
94
|
...props
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */ jsxDEV2("a", {
|
|
97
|
+
"aria-current": isActive ? "page" : undefined,
|
|
98
|
+
className: cn2(buttonVariants({
|
|
99
|
+
variant: isActive ? "outline" : "ghost",
|
|
100
|
+
size
|
|
101
|
+
}), className),
|
|
102
|
+
...props
|
|
103
|
+
}, undefined, false, undefined, this);
|
|
104
|
+
}
|
|
105
|
+
function PaginationPrevious({
|
|
90
106
|
className,
|
|
91
107
|
...props
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
}) {
|
|
109
|
+
return /* @__PURE__ */ jsxDEV2(PaginationLink, {
|
|
110
|
+
"aria-label": "Go to previous page",
|
|
111
|
+
size: "default",
|
|
112
|
+
className: cn2("gap-1 pl-2.5", className),
|
|
113
|
+
...props,
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsxDEV2(ChevronLeft, {
|
|
116
|
+
className: "h-4 w-4"
|
|
117
|
+
}, undefined, false, undefined, this),
|
|
118
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
119
|
+
children: "Previous"
|
|
120
|
+
}, undefined, false, undefined, this)
|
|
121
|
+
]
|
|
122
|
+
}, undefined, true, undefined, this);
|
|
123
|
+
}
|
|
124
|
+
function PaginationNext({
|
|
108
125
|
className,
|
|
109
126
|
...props
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsxDEV2(PaginationLink, {
|
|
129
|
+
"aria-label": "Go to next page",
|
|
130
|
+
size: "default",
|
|
131
|
+
className: cn2("gap-1 pr-2.5", className),
|
|
132
|
+
...props,
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
135
|
+
children: "Next"
|
|
136
|
+
}, undefined, false, undefined, this),
|
|
137
|
+
/* @__PURE__ */ jsxDEV2(ChevronRight, {
|
|
138
|
+
className: "h-4 w-4"
|
|
139
|
+
}, undefined, false, undefined, this)
|
|
140
|
+
]
|
|
141
|
+
}, undefined, true, undefined, this);
|
|
142
|
+
}
|
|
143
|
+
function PaginationEllipsis({
|
|
126
144
|
className,
|
|
127
145
|
...props
|
|
128
|
-
})
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
146
|
+
}) {
|
|
147
|
+
return /* @__PURE__ */ jsxDEV2("span", {
|
|
148
|
+
"aria-hidden": true,
|
|
149
|
+
className: cn2("flex h-9 w-9 items-center justify-center", className),
|
|
150
|
+
...props,
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ jsxDEV2(MoreHorizontal, {
|
|
153
|
+
className: "h-4 w-4"
|
|
154
|
+
}, undefined, false, undefined, this),
|
|
155
|
+
/* @__PURE__ */ jsxDEV2("span", {
|
|
156
|
+
className: "sr-only",
|
|
157
|
+
children: "More pages"
|
|
158
|
+
}, undefined, false, undefined, this)
|
|
159
|
+
]
|
|
160
|
+
}, undefined, true, undefined, this);
|
|
161
|
+
}
|
|
143
162
|
export {
|
|
144
163
|
PaginationPrevious,
|
|
145
164
|
PaginationNext,
|
package/dist/ui/popover.d.ts
CHANGED
|
@@ -5,4 +5,3 @@ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof Popove
|
|
|
5
5
|
declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
8
|
-
//# sourceMappingURL=popover.d.ts.map
|
package/dist/ui/progress.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ import * as React from 'react';
|
|
|
2
2
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
3
|
declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Progress };
|
|
5
|
-
//# sourceMappingURL=progress.d.ts.map
|
package/dist/ui/radio-group.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
|
3
3
|
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export { RadioGroup, RadioGroupItem };
|
|
6
|
-
//# sourceMappingURL=radio-group.d.ts.map
|
package/dist/ui/resizable.d.ts
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
collapsible?: boolean | undefined;
|
|
7
|
-
defaultSize?: number | undefined;
|
|
8
|
-
id?: string;
|
|
9
|
-
maxSize?: number | undefined;
|
|
10
|
-
minSize?: number | undefined;
|
|
11
|
-
onCollapse?: ResizablePrimitive.PanelOnCollapse;
|
|
12
|
-
onExpand?: ResizablePrimitive.PanelOnExpand;
|
|
13
|
-
onResize?: ResizablePrimitive.PanelOnResize;
|
|
14
|
-
order?: number;
|
|
15
|
-
style?: object;
|
|
16
|
-
tagName?: keyof HTMLElementTagNameMap | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
children?: import("react").ReactNode | undefined;
|
|
19
|
-
} & import("react").RefAttributes<ResizablePrimitive.ImperativePanelHandle>>;
|
|
20
|
-
declare const ResizableHandle: ({ withHandle, className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
1
|
+
import { Panel } from 'react-resizable-panels';
|
|
2
|
+
import type { GroupProps, SeparatorProps } from 'react-resizable-panels';
|
|
3
|
+
declare const ResizablePanelGroup: ({ className, ...props }: GroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const ResizablePanel: typeof Panel;
|
|
5
|
+
declare const ResizableHandle: ({ withHandle, className, ...props }: SeparatorProps & {
|
|
21
6
|
withHandle?: boolean;
|
|
22
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
23
8
|
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
24
|
-
//# sourceMappingURL=resizable.d.ts.map
|
package/dist/ui/resizable.js
CHANGED
|
@@ -3,24 +3,21 @@ var __require = import.meta.require;
|
|
|
3
3
|
|
|
4
4
|
// ui/resizable.tsx
|
|
5
5
|
import { GripVertical } from "lucide-react";
|
|
6
|
-
import
|
|
6
|
+
import { Group, Panel, Separator } from "react-resizable-panels";
|
|
7
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
8
8
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
9
9
|
"use client";
|
|
10
|
-
var ResizablePanelGroup = ({
|
|
11
|
-
className,
|
|
12
|
-
...props
|
|
13
|
-
}) => /* @__PURE__ */ jsxDEV(ResizablePrimitive.PanelGroup, {
|
|
14
|
-
className: cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className),
|
|
10
|
+
var ResizablePanelGroup = ({ className, ...props }) => /* @__PURE__ */ jsxDEV(Group, {
|
|
11
|
+
className: cn("flex h-full w-full", className),
|
|
15
12
|
...props
|
|
16
13
|
}, undefined, false, undefined, this);
|
|
17
|
-
var ResizablePanel =
|
|
14
|
+
var ResizablePanel = Panel;
|
|
18
15
|
var ResizableHandle = ({
|
|
19
16
|
withHandle,
|
|
20
17
|
className,
|
|
21
18
|
...props
|
|
22
|
-
}) => /* @__PURE__ */ jsxDEV(
|
|
23
|
-
className: cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden
|
|
19
|
+
}) => /* @__PURE__ */ jsxDEV(Separator, {
|
|
20
|
+
className: cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=vertical]:h-px aria-[orientation=vertical]:w-full aria-[orientation=vertical]:after:left-0 aria-[orientation=vertical]:after:h-1 aria-[orientation=vertical]:after:w-full aria-[orientation=vertical]:after:translate-x-0 aria-[orientation=vertical]:after:-translate-y-1/2 [&[aria-orientation=vertical]>div]:rotate-90", className),
|
|
24
21
|
...props,
|
|
25
22
|
children: withHandle && /* @__PURE__ */ jsxDEV("div", {
|
|
26
23
|
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
package/dist/ui/scroll-area.d.ts
CHANGED
|
@@ -3,4 +3,3 @@ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
|
3
3
|
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export { ScrollArea, ScrollBar };
|
|
6
|
-
//# sourceMappingURL=scroll-area.d.ts.map
|
package/dist/ui/section.d.ts
CHANGED
|
@@ -9,15 +9,7 @@ declare const sectionVariants: (props?: ({
|
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export type SectionProps = React.HTMLAttributes<HTMLElement> & VariantProps<typeof sectionVariants> & {
|
|
11
11
|
as?: 'section' | 'div' | 'main' | 'header' | 'footer' | 'aside' | 'article' | 'nav';
|
|
12
|
+
ref?: React.Ref<HTMLElement>;
|
|
12
13
|
};
|
|
13
|
-
export declare
|
|
14
|
-
width?: "container" | "narrow" | "wide" | "fluid" | null | undefined;
|
|
15
|
-
px?: "none" | "sm" | "lg" | "md" | null | undefined;
|
|
16
|
-
py?: "none" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
17
|
-
tone?: "plain" | "tint" | "subtle" | null | undefined;
|
|
18
|
-
text?: "base" | "lg" | null | undefined;
|
|
19
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
20
|
-
as?: "section" | "div" | "main" | "header" | "footer" | "aside" | "article" | "nav";
|
|
21
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
14
|
+
export declare function Section({ as, className, width, px, py, tone, text, ref, ...props }: SectionProps): import("react/jsx-runtime").JSX.Element;
|
|
22
15
|
export { sectionVariants };
|
|
23
|
-
//# sourceMappingURL=section.d.ts.map
|
package/dist/ui/section.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/section.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { cva } from "class-variance-authority";
|
|
7
6
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
8
7
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
@@ -45,15 +44,24 @@ var sectionVariants = cva("", {
|
|
|
45
44
|
text: "lg"
|
|
46
45
|
}
|
|
47
46
|
});
|
|
48
|
-
|
|
47
|
+
function Section({
|
|
48
|
+
as = "section",
|
|
49
|
+
className,
|
|
50
|
+
width,
|
|
51
|
+
px,
|
|
52
|
+
py,
|
|
53
|
+
tone,
|
|
54
|
+
text,
|
|
55
|
+
ref,
|
|
56
|
+
...props
|
|
57
|
+
}) {
|
|
49
58
|
const Comp = as;
|
|
50
59
|
return /* @__PURE__ */ jsxDEV(Comp, {
|
|
51
60
|
ref,
|
|
52
61
|
className: cn(sectionVariants({ width, px, py, tone, text }), className),
|
|
53
62
|
...props
|
|
54
63
|
}, undefined, false, undefined, this);
|
|
55
|
-
}
|
|
56
|
-
Section.displayName = "Section";
|
|
64
|
+
}
|
|
57
65
|
export {
|
|
58
66
|
sectionVariants,
|
|
59
67
|
Section
|
package/dist/ui/select.d.ts
CHANGED
|
@@ -13,4 +13,3 @@ declare function SelectSeparator({ className, ...props }: React.ComponentProps<t
|
|
|
13
13
|
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
16
|
-
//# sourceMappingURL=select.d.ts.map
|
package/dist/ui/separator.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ import * as React from 'react';
|
|
|
2
2
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
3
|
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Separator };
|
|
5
|
-
//# sourceMappingURL=separator.d.ts.map
|
package/dist/ui/sheet.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ declare function SheetFooter({ className, ...props }: React.ComponentPropsWithou
|
|
|
11
11
|
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
14
|
-
//# sourceMappingURL=sheet.d.ts.map
|
package/dist/ui/sidebar.d.ts
CHANGED
|
@@ -67,4 +67,3 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
|
|
|
67
67
|
isActive?: boolean;
|
|
68
68
|
}): import("react/jsx-runtime").JSX.Element;
|
|
69
69
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
70
|
-
//# sourceMappingURL=sidebar.d.ts.map
|
package/dist/ui/sidebar.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// ui/button.tsx
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
6
|
import { cva } from "class-variance-authority";
|
|
8
7
|
import { cn } from "@contractspec/lib.ui-kit-core/utils";
|
|
@@ -29,7 +28,14 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
|
|
|
29
28
|
size: "default"
|
|
30
29
|
}
|
|
31
30
|
});
|
|
32
|
-
|
|
31
|
+
function Button({
|
|
32
|
+
className,
|
|
33
|
+
variant,
|
|
34
|
+
size,
|
|
35
|
+
asChild = false,
|
|
36
|
+
ref,
|
|
37
|
+
...props
|
|
38
|
+
}) {
|
|
33
39
|
if (asChild) {
|
|
34
40
|
return /* @__PURE__ */ jsxDEV(Slot, {
|
|
35
41
|
"data-slot": "button",
|
|
@@ -43,8 +49,7 @@ var Button = React.forwardRef(({ className, variant, size, asChild = false, ...p
|
|
|
43
49
|
className: cn(buttonVariants({ variant, size, className })),
|
|
44
50
|
...props
|
|
45
51
|
}, undefined, false, undefined, this);
|
|
46
|
-
}
|
|
47
|
-
Button.displayName = "Button";
|
|
52
|
+
}
|
|
48
53
|
// ui/utils.ts
|
|
49
54
|
import { clsx } from "clsx";
|
|
50
55
|
import { twMerge } from "tailwind-merge";
|
|
@@ -213,11 +218,11 @@ function SheetDescription({
|
|
|
213
218
|
}, undefined, false, undefined, this);
|
|
214
219
|
}
|
|
215
220
|
// ui/use-mobile.tsx
|
|
216
|
-
import * as
|
|
221
|
+
import * as React from "react";
|
|
217
222
|
var MOBILE_BREAKPOINT = 640;
|
|
218
223
|
function useIsMobile() {
|
|
219
|
-
const [isMobile, setIsMobile] =
|
|
220
|
-
|
|
224
|
+
const [isMobile, setIsMobile] = React.useState(undefined);
|
|
225
|
+
React.useEffect(() => {
|
|
221
226
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
222
227
|
const onChange = () => {
|
|
223
228
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -284,7 +289,7 @@ function TooltipContent({
|
|
|
284
289
|
}, undefined, false, undefined, this);
|
|
285
290
|
}
|
|
286
291
|
// ui/sidebar.tsx
|
|
287
|
-
import * as
|
|
292
|
+
import * as React2 from "react";
|
|
288
293
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
289
294
|
import { cva as cva2 } from "class-variance-authority";
|
|
290
295
|
import { PanelLeftIcon } from "lucide-react";
|
|
@@ -297,9 +302,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
297
302
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
298
303
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
299
304
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
300
|
-
var SidebarContext =
|
|
305
|
+
var SidebarContext = React2.createContext(null);
|
|
301
306
|
function useSidebar() {
|
|
302
|
-
const context =
|
|
307
|
+
const context = React2.useContext(SidebarContext);
|
|
303
308
|
if (!context) {
|
|
304
309
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
305
310
|
}
|
|
@@ -315,10 +320,10 @@ function SidebarProvider({
|
|
|
315
320
|
...props
|
|
316
321
|
}) {
|
|
317
322
|
const isMobile = useIsMobile();
|
|
318
|
-
const [openMobile, setOpenMobile] =
|
|
319
|
-
const [_open, _setOpen] =
|
|
323
|
+
const [openMobile, setOpenMobile] = React2.useState(false);
|
|
324
|
+
const [_open, _setOpen] = React2.useState(defaultOpen);
|
|
320
325
|
const open = openProp ?? _open;
|
|
321
|
-
const setOpen =
|
|
326
|
+
const setOpen = React2.useCallback((value) => {
|
|
322
327
|
const openState = typeof value === "function" ? value(open) : value;
|
|
323
328
|
if (setOpenProp) {
|
|
324
329
|
setOpenProp(openState);
|
|
@@ -327,10 +332,10 @@ function SidebarProvider({
|
|
|
327
332
|
}
|
|
328
333
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
329
334
|
}, [setOpenProp, open]);
|
|
330
|
-
const toggleSidebar =
|
|
335
|
+
const toggleSidebar = React2.useCallback(() => {
|
|
331
336
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
332
337
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
333
|
-
|
|
338
|
+
React2.useEffect(() => {
|
|
334
339
|
const handleKeyDown = (event) => {
|
|
335
340
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
336
341
|
event.preventDefault();
|
|
@@ -341,7 +346,7 @@ function SidebarProvider({
|
|
|
341
346
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
342
347
|
}, [toggleSidebar]);
|
|
343
348
|
const state = open ? "expanded" : "collapsed";
|
|
344
|
-
const contextValue =
|
|
349
|
+
const contextValue = React2.useMemo(() => ({
|
|
345
350
|
state,
|
|
346
351
|
open,
|
|
347
352
|
setOpen,
|
|
@@ -711,7 +716,7 @@ function SidebarMenuSkeleton({
|
|
|
711
716
|
showIcon = false,
|
|
712
717
|
...props
|
|
713
718
|
}) {
|
|
714
|
-
const width =
|
|
719
|
+
const width = React2.useMemo(() => {
|
|
715
720
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
716
721
|
}, []);
|
|
717
722
|
return /* @__PURE__ */ jsxDEV7("div", {
|
package/dist/ui/skeleton.d.ts
CHANGED
package/dist/ui/skip-link.d.ts
CHANGED
package/dist/ui/slider.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ import * as React from 'react';
|
|
|
2
2
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
3
|
declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Slider };
|
|
5
|
-
//# sourceMappingURL=slider.d.ts.map
|
package/dist/ui/sonner.d.ts
CHANGED