@giddaa-housing/ui 0.1.0 → 1.1.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/README.md +18 -6
- package/css/base.css +37 -0
- package/css/components.css +135 -0
- package/css/generated/shared.css +1 -0
- package/css/giddaa.css +402 -0
- package/css/preset.css +77 -0
- package/css/styles.css +2 -0
- package/css/theme.css +255 -0
- package/dist/accordion.d.ts +9 -10
- package/dist/accordion.js +41 -117
- package/dist/activity-timeline.d.ts +29 -0
- package/dist/activity-timeline.js +97 -0
- package/dist/alert.d.ts +8 -9
- package/dist/alert.js +53 -141
- package/dist/auth-layout.d.ts +23 -0
- package/dist/auth-layout.js +153 -0
- package/dist/avatar.d.ts +6 -6
- package/dist/avatar.js +40 -142
- package/dist/badge.d.ts +12 -13
- package/dist/badge.js +66 -114
- package/dist/bar-chart.d.ts +136 -114
- package/dist/bar-chart.js +244 -297
- package/dist/breadcrumb.d.ts +5 -5
- package/dist/breadcrumb.js +56 -148
- package/dist/bullet-chart.d.ts +33 -33
- package/dist/bullet-chart.js +123 -183
- package/dist/button-BZIeyUw6.d.ts +17 -0
- package/dist/button-group.d.ts +13 -16
- package/dist/button-group.js +38 -163
- package/dist/button.d.ts +2 -19
- package/dist/button.js +90 -142
- package/dist/calendar.d.ts +6 -6
- package/dist/calendar.js +134 -288
- package/dist/card.d.ts +14 -16
- package/dist/card.js +58 -174
- package/dist/carousel.d.ts +34 -35
- package/dist/carousel.js +319 -378
- package/dist/chart.d.ts +58 -59
- package/dist/chart.js +350 -466
- package/dist/checkbox.d.ts +10 -12
- package/dist/checkbox.js +84 -84
- package/dist/cn-BI_4DMBf.js +23 -0
- package/dist/collapsible.d.ts +7 -8
- package/dist/collapsible.js +23 -77
- package/dist/combobox.d.ts +10 -10
- package/dist/combobox.js +220 -696
- package/dist/cta.d.ts +64 -0
- package/dist/cta.js +192 -0
- package/dist/currency-selector.d.ts +41 -0
- package/dist/currency-selector.js +114 -0
- package/dist/data-table.d.ts +164 -0
- package/dist/data-table.js +673 -0
- package/dist/date-picker.d.ts +27 -20
- package/dist/date-picker.js +122 -520
- package/dist/details-card.d.ts +19 -0
- package/dist/details-card.js +118 -0
- package/dist/dialog.d.ts +13 -14
- package/dist/dialog.js +117 -320
- package/dist/dropdown-menu.d.ts +14 -14
- package/dist/dropdown-menu.js +170 -365
- package/dist/dropzone.d.ts +55 -55
- package/dist/dropzone.js +328 -467
- package/dist/editorial-card.d.ts +27 -0
- package/dist/editorial-card.js +144 -0
- package/dist/empty-state.d.ts +8 -9
- package/dist/empty-state.js +48 -135
- package/dist/field.d.ts +23 -25
- package/dist/field.js +111 -327
- package/dist/filter.d.ts +118 -0
- package/dist/filter.js +775 -0
- package/dist/footer.d.ts +40 -0
- package/dist/footer.js +227 -0
- package/dist/funnel-chart.d.ts +38 -41
- package/dist/funnel-chart.js +168 -563
- package/dist/gallery-indicator.d.ts +17 -0
- package/dist/gallery-indicator.js +75 -0
- package/dist/heatmap-chart.d.ts +95 -0
- package/dist/heatmap-chart.js +197 -0
- package/dist/infotip.d.ts +10 -0
- package/dist/infotip.js +40 -0
- package/dist/input-CfoEJ8A6.d.ts +12 -0
- package/dist/input-group.d.ts +16 -19
- package/dist/input-group.js +92 -372
- package/dist/input-size-context-C-SFx9sx.d.ts +10 -0
- package/dist/input-size-context.d.ts +2 -11
- package/dist/input-size-context.js +14 -20
- package/dist/input.d.ts +2 -13
- package/dist/input.js +23 -79
- package/dist/item.d.ts +7 -8
- package/dist/item.js +22 -89
- package/dist/kpi-card.d.ts +18 -20
- package/dist/kpi-card.js +84 -232
- package/dist/label.d.ts +6 -6
- package/dist/label.js +39 -66
- package/dist/line-chart.d.ts +88 -89
- package/dist/line-chart.js +143 -262
- package/dist/logo.d.ts +4 -4
- package/dist/logo.js +87 -141
- package/dist/map-indicator.d.ts +13 -0
- package/dist/map-indicator.js +83 -0
- package/dist/match.d.ts +15 -0
- package/dist/match.js +68 -0
- package/dist/media-gallery-hero.d.ts +58 -0
- package/dist/media-gallery-hero.js +201 -0
- package/dist/media-player.d.ts +60 -0
- package/dist/media-player.js +919 -0
- package/dist/multi-step-form.d.ts +56 -0
- package/dist/multi-step-form.js +342 -0
- package/dist/number-input.d.ts +34 -34
- package/dist/number-input.js +62 -413
- package/dist/page-header.d.ts +10 -11
- package/dist/page-header.js +34 -107
- package/dist/pagination.d.ts +17 -20
- package/dist/pagination.js +132 -341
- package/dist/password-input.d.ts +5 -12
- package/dist/password-input.js +32 -354
- package/dist/phone-input.d.ts +19 -19
- package/dist/phone-input.js +232 -561
- package/dist/photo-gallery.d.ts +20 -20
- package/dist/photo-gallery.js +314 -746
- package/dist/picker-lzgmsNfG.js +32 -0
- package/dist/pie-chart.d.ts +60 -60
- package/dist/pie-chart.js +141 -184
- package/dist/popover.d.ts +9 -9
- package/dist/popover.js +60 -156
- package/dist/price-tag.d.ts +34 -0
- package/dist/price-tag.js +118 -0
- package/dist/progress.d.ts +18 -16
- package/dist/progress.js +156 -300
- package/dist/property-listing-card.d.ts +29 -0
- package/dist/property-listing-card.js +117 -0
- package/dist/radar-chart.d.ts +108 -0
- package/dist/radar-chart.js +172 -0
- package/dist/radio-group.d.ts +11 -13
- package/dist/radio-group.js +47 -96
- package/dist/review-block.d.ts +18 -0
- package/dist/review-block.js +154 -0
- package/dist/rich-text-editor.d.ts +30 -14
- package/dist/rich-text-editor.js +594 -979
- package/dist/scatter-chart.d.ts +140 -0
- package/dist/scatter-chart.js +248 -0
- package/dist/search-input.d.ts +8 -15
- package/dist/search-input.js +58 -408
- package/dist/select.d.ts +8 -8
- package/dist/select.js +131 -291
- package/dist/separator.d.ts +8 -9
- package/dist/separator.js +31 -70
- package/dist/sheet.d.ts +11 -11
- package/dist/sheet.js +84 -262
- package/dist/sidebar.d.ts +32 -37
- package/dist/sidebar.js +380 -1055
- package/dist/size-context-D4mYvcg8.d.ts +10 -0
- package/dist/size-context.d.ts +2 -11
- package/dist/size-context.js +14 -18
- package/dist/skeleton.d.ts +4 -5
- package/dist/skeleton.js +9 -45
- package/dist/slider.d.ts +27 -0
- package/dist/slider.js +81 -0
- package/dist/sparkline.d.ts +43 -46
- package/dist/sparkline.js +223 -561
- package/dist/stepper.d.ts +23 -24
- package/dist/stepper.js +149 -276
- package/dist/styles.css +9995 -2
- package/dist/switch.d.ts +10 -12
- package/dist/switch.js +49 -106
- package/dist/table-card.d.ts +35 -0
- package/dist/table-card.js +125 -0
- package/dist/table.d.ts +18 -14
- package/dist/table.js +114 -182
- package/dist/tabs.d.ts +23 -15
- package/dist/tabs.js +62 -149
- package/dist/tag.d.ts +22 -23
- package/dist/tag.js +104 -156
- package/dist/testimonial-block.d.ts +33 -0
- package/dist/testimonial-block.js +208 -0
- package/dist/textarea-IS_D8pXf.d.ts +11 -0
- package/dist/textarea.d.ts +2 -12
- package/dist/textarea.js +20 -74
- package/dist/time-picker.d.ts +11 -11
- package/dist/time-picker.js +247 -464
- package/dist/toast.d.ts +16 -18
- package/dist/toast.js +154 -310
- package/dist/tooltip.d.ts +9 -10
- package/dist/tooltip.js +33 -91
- package/dist/tree-map.d.ts +54 -57
- package/dist/tree-map.js +231 -646
- package/dist/use-uncontrolled-CLfM1XbB.js +21 -0
- package/dist/waterfall-chart.d.ts +126 -0
- package/dist/waterfall-chart.js +480 -0
- package/package.json +123 -34
- package/dist/accordion.js.map +0 -1
- package/dist/alert.js.map +0 -1
- package/dist/avatar.js.map +0 -1
- package/dist/badge.js.map +0 -1
- package/dist/bar-chart.js.map +0 -1
- package/dist/base.css +0 -32
- package/dist/breadcrumb.js.map +0 -1
- package/dist/bullet-chart.js.map +0 -1
- package/dist/button-group.js.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/calendar.js.map +0 -1
- package/dist/card.js.map +0 -1
- package/dist/carousel.js.map +0 -1
- package/dist/chart.js.map +0 -1
- package/dist/checkbox.js.map +0 -1
- package/dist/collapsible.js.map +0 -1
- package/dist/combobox.js.map +0 -1
- package/dist/date-picker.js.map +0 -1
- package/dist/dialog.js.map +0 -1
- package/dist/dropdown-menu.js.map +0 -1
- package/dist/dropzone.js.map +0 -1
- package/dist/empty-state.js.map +0 -1
- package/dist/field.js.map +0 -1
- package/dist/files/red-hat-display-latin-300-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-300-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-300-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-300-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-400-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-400-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-400-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-400-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-500-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-500-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-500-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-500-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-600-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-600-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-600-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-600-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-700-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-700-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-700-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-700-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-800-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-800-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-800-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-800-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-900-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-900-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-900-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-900-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-300-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-300-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-300-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-400-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-400-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-400-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-500-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-500-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-500-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-600-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-600-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-600-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-700-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-700-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-700-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-800-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-800-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-800-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-800-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-900-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-900-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-900-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-900-normal.woff2 +0 -0
- package/dist/funnel-chart.js.map +0 -1
- package/dist/index.d.ts +0 -87
- package/dist/index.js +0 -10448
- package/dist/index.js.map +0 -1
- package/dist/input-group.js.map +0 -1
- package/dist/input-size-context.js.map +0 -1
- package/dist/input.js.map +0 -1
- package/dist/item.js.map +0 -1
- package/dist/kpi-card.js.map +0 -1
- package/dist/label.js.map +0 -1
- package/dist/line-chart.js.map +0 -1
- package/dist/logo.js.map +0 -1
- package/dist/number-input.js.map +0 -1
- package/dist/page-header.js.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/password-input.js.map +0 -1
- package/dist/phone-input.js.map +0 -1
- package/dist/photo-gallery.js.map +0 -1
- package/dist/pie-chart.js.map +0 -1
- package/dist/popover.js.map +0 -1
- package/dist/progress.js.map +0 -1
- package/dist/radio-group.js.map +0 -1
- package/dist/red-hat-display.css +0 -2
- package/dist/rich-text-editor.js.map +0 -1
- package/dist/search-input.js.map +0 -1
- package/dist/select.js.map +0 -1
- package/dist/separator.js.map +0 -1
- package/dist/sheet.js.map +0 -1
- package/dist/sidebar.js.map +0 -1
- package/dist/size-context.js.map +0 -1
- package/dist/skeleton.js.map +0 -1
- package/dist/sparkline.js.map +0 -1
- package/dist/stepper.js.map +0 -1
- package/dist/switch.js.map +0 -1
- package/dist/tab-list.d.ts +0 -38
- package/dist/tab-list.js +0 -394
- package/dist/tab-list.js.map +0 -1
- package/dist/table.js.map +0 -1
- package/dist/tabs.js.map +0 -1
- package/dist/tag.js.map +0 -1
- package/dist/textarea.js.map +0 -1
- package/dist/theme/giddaa.css +0 -2
- package/dist/time-picker.js.map +0 -1
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.js.map +0 -1
- package/dist/tree-map.js.map +0 -1
package/dist/cta.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { n as ButtonLink, t as Button } from "./button-BZIeyUw6.js";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
//#region src/cta.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* CTA is a composable marketing panel: a text column (title, description,
|
|
8
|
+
* checklist) paired with an optional grid of feature cards and an action
|
|
9
|
+
* row. Compose only the pieces you need — every part is a standalone
|
|
10
|
+
* primitive, not a fixed layout.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <CTA variant="subtle">
|
|
14
|
+
* <CTAContent>
|
|
15
|
+
* <CTATag>Your Next Step</CTATag>
|
|
16
|
+
* <CTATitle>Own your first home sooner</CTATitle>
|
|
17
|
+
* <CTADescription>
|
|
18
|
+
* Shari'ah-compliant financing built around how you actually get paid.
|
|
19
|
+
* </CTADescription>
|
|
20
|
+
* <CTAList>
|
|
21
|
+
* <CTAListItem>No interest, ever</CTAListItem>
|
|
22
|
+
* <CTAListItem>Approval in 48 hours</CTAListItem>
|
|
23
|
+
* </CTAList>
|
|
24
|
+
* </CTAContent>
|
|
25
|
+
* <CTACard variant="brand">
|
|
26
|
+
* <CTACardIcon variant="surface"><ShieldCheck /></CTACardIcon>
|
|
27
|
+
* <CTACardTitle>Backed by NAICOM</CTACardTitle>
|
|
28
|
+
* <CTACardDescription>Every plan is insured end to end.</CTACardDescription>
|
|
29
|
+
* <CTAButton>Get started</CTAButton>
|
|
30
|
+
* </CTACard>
|
|
31
|
+
* </CTA>
|
|
32
|
+
*/
|
|
33
|
+
declare const ctaVariants: (props?: ({
|
|
34
|
+
variant?: "default" | "subtle" | null | undefined;
|
|
35
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
36
|
+
type CTAProps = useRender.ComponentProps<"section"> & VariantProps<typeof ctaVariants>;
|
|
37
|
+
declare function CTA({ className, render, variant, ...props }: CTAProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
38
|
+
declare function CTAContent({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
39
|
+
declare function CTATag({ className, render, ...props }: useRender.ComponentProps<"span">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
40
|
+
declare function CTATitle({ className, render, ...props }: useRender.ComponentProps<"h2">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
41
|
+
declare function CTADescription({ className, render, ...props }: useRender.ComponentProps<"p">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
42
|
+
declare function CTAList({ className, render, ...props }: useRender.ComponentProps<"ul">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
43
|
+
type CTAListItemProps = useRender.ComponentProps<"li"> & {
|
|
44
|
+
icon?: React.ReactNode;
|
|
45
|
+
};
|
|
46
|
+
declare function CTAListItem({ children, className, icon, render, ...props }: CTAListItemProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
47
|
+
declare function CTACard({ className, render, variant, ...props }: useRender.ComponentProps<"div"> & {
|
|
48
|
+
variant?: "default" | "brand";
|
|
49
|
+
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
50
|
+
declare function CTACardIcon({ className, render, variant, ...props }: useRender.ComponentProps<"span"> & {
|
|
51
|
+
variant?: "subtle-brand" | "subtle-accent" | "surface";
|
|
52
|
+
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
53
|
+
declare function CTACardTitle({ className, render, ...props }: useRender.ComponentProps<"h3">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
54
|
+
declare function CTACardDescription({ className, render, ...props }: useRender.ComponentProps<"p">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
55
|
+
/**
|
|
56
|
+
* CTAButton wraps `Button` with defaults tuned for a CTA's action row: it
|
|
57
|
+
* stays legible on every `tone`, so a `tone="brand"` panel automatically
|
|
58
|
+
* gets a canvas-colored button instead of an invisible brand-on-brand one.
|
|
59
|
+
* Every `Button` prop (variant, size, isLoading, render, …) still works.
|
|
60
|
+
*/
|
|
61
|
+
declare function CTAButton({ className, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
62
|
+
declare function CTAButtonLink({ className, ...props }: React.ComponentProps<typeof ButtonLink>): React.JSX.Element;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { CTA, CTAButton, CTAButtonLink, CTACard, CTACardDescription, CTACardIcon, CTACardTitle, CTAContent, CTADescription, CTAList, CTAListItem, type CTAListItemProps, type CTAProps, CTATag, CTATitle, ctaVariants };
|
package/dist/cta.js
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
2
|
+
import { Button, ButtonLink } from "./button.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
//#region src/cta.tsx
|
|
8
|
+
/**
|
|
9
|
+
* CTA is a composable marketing panel: a text column (title, description,
|
|
10
|
+
* checklist) paired with an optional grid of feature cards and an action
|
|
11
|
+
* row. Compose only the pieces you need — every part is a standalone
|
|
12
|
+
* primitive, not a fixed layout.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <CTA variant="subtle">
|
|
16
|
+
* <CTAContent>
|
|
17
|
+
* <CTATag>Your Next Step</CTATag>
|
|
18
|
+
* <CTATitle>Own your first home sooner</CTATitle>
|
|
19
|
+
* <CTADescription>
|
|
20
|
+
* Shari'ah-compliant financing built around how you actually get paid.
|
|
21
|
+
* </CTADescription>
|
|
22
|
+
* <CTAList>
|
|
23
|
+
* <CTAListItem>No interest, ever</CTAListItem>
|
|
24
|
+
* <CTAListItem>Approval in 48 hours</CTAListItem>
|
|
25
|
+
* </CTAList>
|
|
26
|
+
* </CTAContent>
|
|
27
|
+
* <CTACard variant="brand">
|
|
28
|
+
* <CTACardIcon variant="surface"><ShieldCheck /></CTACardIcon>
|
|
29
|
+
* <CTACardTitle>Backed by NAICOM</CTACardTitle>
|
|
30
|
+
* <CTACardDescription>Every plan is insured end to end.</CTACardDescription>
|
|
31
|
+
* <CTAButton>Get started</CTAButton>
|
|
32
|
+
* </CTACard>
|
|
33
|
+
* </CTA>
|
|
34
|
+
*/
|
|
35
|
+
const ctaVariants = cva("group/cta relative flex w-full min-w-0 flex-col overflow-hidden rounded-2xl text-fg-primary transition-[background-color,border-color,box-shadow] py-10 px-5 md:px-10 xl:py-16 xl:px-16 md:gap-10 gap-6", {
|
|
36
|
+
variants: { variant: {
|
|
37
|
+
default: "bg-surface",
|
|
38
|
+
subtle: "bg-surface-brand-subtle"
|
|
39
|
+
} },
|
|
40
|
+
defaultVariants: { variant: "default" }
|
|
41
|
+
});
|
|
42
|
+
function CTA({ className, render, variant = "default", ...props }) {
|
|
43
|
+
return useRender({
|
|
44
|
+
defaultTagName: "section",
|
|
45
|
+
props: mergeProps({ className: cn(ctaVariants({ variant }), className) }, props),
|
|
46
|
+
render,
|
|
47
|
+
state: { slot: "cta" }
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function CTAContent({ className, render, ...props }) {
|
|
51
|
+
return useRender({
|
|
52
|
+
defaultTagName: "div",
|
|
53
|
+
props: mergeProps({ className: cn("flex min-w-0 flex-1 flex-col gap-2.5", className) }, props),
|
|
54
|
+
render,
|
|
55
|
+
state: { slot: "cta-content" }
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function CTATag({ className, render, ...props }) {
|
|
59
|
+
return useRender({
|
|
60
|
+
defaultTagName: "span",
|
|
61
|
+
props: mergeProps({ className: cn("text-fg-brand text-gdt-capitalized uppercase font-semibold", className) }, props),
|
|
62
|
+
render,
|
|
63
|
+
state: { slot: "cta-title" }
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function CTATitle({ className, render, ...props }) {
|
|
67
|
+
return useRender({
|
|
68
|
+
defaultTagName: "h2",
|
|
69
|
+
props: mergeProps({ className: cn("text-fg-primary text-gdt-h3 lg:text-gdt-h2 font-extrabold", className) }, props),
|
|
70
|
+
render,
|
|
71
|
+
state: { slot: "cta-title" }
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function CTADescription({ className, render, ...props }) {
|
|
75
|
+
return useRender({
|
|
76
|
+
defaultTagName: "p",
|
|
77
|
+
props: mergeProps({ className: cn("text-fg-secondary text-gdt-sm md:text-gdt-md", className) }, props),
|
|
78
|
+
render,
|
|
79
|
+
state: { slot: "cta-description" }
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function CTAList({ className, render, ...props }) {
|
|
83
|
+
return useRender({
|
|
84
|
+
defaultTagName: "ul",
|
|
85
|
+
props: mergeProps({ className: cn("flex min-w-0 pt-8 flex-col gap-2.5", className) }, props),
|
|
86
|
+
render,
|
|
87
|
+
state: { slot: "cta-list" }
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const CircleCheck = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
91
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
92
|
+
width: 22,
|
|
93
|
+
height: 22,
|
|
94
|
+
fill: "none",
|
|
95
|
+
viewBox: "0 0 22 22",
|
|
96
|
+
"aria-hidden": "true",
|
|
97
|
+
...props,
|
|
98
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
99
|
+
width: 22,
|
|
100
|
+
height: 22,
|
|
101
|
+
fill: "var(--color-surface-brand)",
|
|
102
|
+
rx: 11
|
|
103
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
104
|
+
stroke: "var(--color-fg-on-brand)",
|
|
105
|
+
strokeLinecap: "round",
|
|
106
|
+
strokeLinejoin: "round",
|
|
107
|
+
strokeWidth: 2,
|
|
108
|
+
d: "m7.36 11.26 2.6 2.6 4.68-5.72"
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
function CTAListItem({ children, className, icon, render, ...props }) {
|
|
112
|
+
return useRender({
|
|
113
|
+
defaultTagName: "li",
|
|
114
|
+
props: mergeProps({
|
|
115
|
+
className: cn("flex min-w-0 items-start gap-2 text-gdt-sm text-fg-primary", "group-data-[tone=brand]/cta:text-fg-on-brand", className),
|
|
116
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
117
|
+
"aria-hidden": "true",
|
|
118
|
+
className: cn("inline-flex shrink-0 items-center justify-center [&_svg]:size-4 [&_svg]:shrink-0"),
|
|
119
|
+
children: /* @__PURE__ */ jsx(CircleCheck, {})
|
|
120
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
121
|
+
className: "min-w-0",
|
|
122
|
+
children
|
|
123
|
+
})] })
|
|
124
|
+
}, props),
|
|
125
|
+
render,
|
|
126
|
+
state: { slot: "cta-list-item" }
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function CTACard({ className, render, variant = "default", ...props }) {
|
|
130
|
+
return useRender({
|
|
131
|
+
defaultTagName: "div",
|
|
132
|
+
props: mergeProps({ className: cn("group/cta-card min-w-0 flex flex-col gap-3.5 py-6.5 px-6 rounded-2xl text", { "bg-canvas border shadow-1": variant === "default" }, { "bg-surface-brand shadow-2": variant === "brand" }) }, props),
|
|
133
|
+
render,
|
|
134
|
+
state: {
|
|
135
|
+
slot: "cta-card",
|
|
136
|
+
variant
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function CTACardIcon({ className, render, variant = "subtle-brand", ...props }) {
|
|
141
|
+
return useRender({
|
|
142
|
+
defaultTagName: "span",
|
|
143
|
+
props: mergeProps({
|
|
144
|
+
"aria-hidden": true,
|
|
145
|
+
className: cn("flex size-13.5 shrink-0 items-center justify-center rounded-full [&_svg:not([class*='size-'])]:size-6", {
|
|
146
|
+
"bg-surface-brand-subtle text-action-primary": variant === "subtle-brand",
|
|
147
|
+
"bg-surface-accent-subtle text-fg-info": variant === "subtle-accent",
|
|
148
|
+
"bg-surface-overlay text-fg-brand": variant === "surface"
|
|
149
|
+
}, className)
|
|
150
|
+
}, props),
|
|
151
|
+
render,
|
|
152
|
+
state: { slot: "cta-card-icon" }
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function CTACardTitle({ className, render, ...props }) {
|
|
156
|
+
return useRender({
|
|
157
|
+
defaultTagName: "h3",
|
|
158
|
+
props: mergeProps({ className: cn("text-gdt-md font-bold text-fg-primary group-data-[variant=brand]/cta-card:text-fg-on-brand", className) }, props),
|
|
159
|
+
render,
|
|
160
|
+
state: { slot: "cta-card-title" }
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function CTACardDescription({ className, render, ...props }) {
|
|
164
|
+
return useRender({
|
|
165
|
+
defaultTagName: "p",
|
|
166
|
+
props: mergeProps({ className: cn("text-gdt-sm text-fg-secondary flex-1 group-data-[variant=brand]/cta-card:text-fg-on-brand", className) }, props),
|
|
167
|
+
render,
|
|
168
|
+
state: { slot: "cta-card-description" }
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* CTAButton wraps `Button` with defaults tuned for a CTA's action row: it
|
|
173
|
+
* stays legible on every `tone`, so a `tone="brand"` panel automatically
|
|
174
|
+
* gets a canvas-colored button instead of an invisible brand-on-brand one.
|
|
175
|
+
* Every `Button` prop (variant, size, isLoading, render, …) still works.
|
|
176
|
+
*/
|
|
177
|
+
function CTAButton({ className, ...props }) {
|
|
178
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
179
|
+
"data-slot": "cta-button",
|
|
180
|
+
className: cn("relative", "group-data-[variant=brand]/cta-card:bg-canvas group-data-[variant=brand]/cta-card:text-fg-brand", "group-data-[variant=brand]/cta-card:hover:bg-surface group-data-[variant=brand]/cta-card:active:bg-surface-raised", className),
|
|
181
|
+
...props
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function CTAButtonLink({ className, ...props }) {
|
|
185
|
+
return /* @__PURE__ */ jsx(ButtonLink, {
|
|
186
|
+
"data-slot": "cta-button",
|
|
187
|
+
className: cn("relative", "group-data-[variant=brand]/cta-card:bg-canvas group-data-[variant=brand]/cta-card:text-fg-brand", "group-data-[variant=brand]/cta-card:hover:bg-surface group-data-[variant=brand]/cta-card:active:bg-surface-raised", className),
|
|
188
|
+
...props
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { CTA, CTAButton, CTAButtonLink, CTACard, CTACardDescription, CTACardIcon, CTACardTitle, CTAContent, CTADescription, CTAList, CTAListItem, CTATag, CTATitle, ctaVariants };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/currency-selector.d.ts
|
|
4
|
+
type CurrencyFlagStripe = {
|
|
5
|
+
color: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
};
|
|
8
|
+
type CurrencySelectorOption = {
|
|
9
|
+
code: string;
|
|
10
|
+
label: string;
|
|
11
|
+
countryCode?: string;
|
|
12
|
+
flag?: readonly CurrencyFlagStripe[];
|
|
13
|
+
};
|
|
14
|
+
type CurrencySelectorSize = NonNullable<VariantProps<typeof currencySelectorTriggerVariants>["size"]>;
|
|
15
|
+
type CurrencySelectorProps = Omit<React.ComponentProps<"button">, "children" | "defaultValue" | "onChange" | "value"> & {
|
|
16
|
+
options: readonly CurrencySelectorOption[];
|
|
17
|
+
value?: string;
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
onValueChange?: (value: string, option: CurrencySelectorOption) => void;
|
|
20
|
+
open?: boolean;
|
|
21
|
+
defaultOpen?: boolean;
|
|
22
|
+
onOpenChange?: (open: boolean) => void;
|
|
23
|
+
size?: CurrencySelectorSize;
|
|
24
|
+
withBackground?: boolean;
|
|
25
|
+
showFlag?: boolean;
|
|
26
|
+
showOptionFlags?: boolean;
|
|
27
|
+
contentClassName?: string;
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const currencySelectorTriggerVariants: (props?: ({
|
|
31
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
32
|
+
withBackground?: boolean | null | undefined;
|
|
33
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
34
|
+
declare function CurrencyFlag({ flag, label, className }: {
|
|
35
|
+
flag?: readonly CurrencyFlagStripe[];
|
|
36
|
+
label?: string;
|
|
37
|
+
className?: string;
|
|
38
|
+
}): React.JSX.Element;
|
|
39
|
+
declare function CurrencySelector({ options, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, size, withBackground, showFlag, showOptionFlags, contentClassName, className, placeholder, type, ...props }: CurrencySelectorProps): React.JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { CurrencyFlag, type CurrencyFlagStripe, CurrencySelector, type CurrencySelectorOption, type CurrencySelectorProps, type CurrencySelectorSize, currencySelectorTriggerVariants };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
|
+
import { t as useUncontrolled } from "./use-uncontrolled-CLfM1XbB.js";
|
|
4
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
|
|
5
|
+
import { CheckIcon } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
//#region src/currency-selector.tsx
|
|
9
|
+
const DEFAULT_FLAG = [
|
|
10
|
+
{ color: "#1f8f55" },
|
|
11
|
+
{ color: "#ffffff" },
|
|
12
|
+
{ color: "#1f8f55" }
|
|
13
|
+
];
|
|
14
|
+
const currencySelectorTriggerVariants = cva("group/currency-selector inline-flex w-fit shrink-0 items-center rounded-full border-0 font-bold whitespace-nowrap outline-none transition-[background-color,color,box-shadow] focus-visible:shadow-[0_0_0_2px_var(--color-line-focus)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60 data-popup-open:text-fg-primary [&_svg]:size-3.5 [&_svg]:shrink-0 [&_svg]:text-current", {
|
|
15
|
+
variants: {
|
|
16
|
+
size: {
|
|
17
|
+
sm: "h-8 gap-1.5 px-3 text-gdt-xs",
|
|
18
|
+
md: "h-11 gap-2 px-4 text-gdt-sm",
|
|
19
|
+
lg: "h-12 gap-2.5 px-5 text-gdt-md"
|
|
20
|
+
},
|
|
21
|
+
withBackground: {
|
|
22
|
+
true: "bg-action-tertiary text-fg-primary hover:bg-action-tertiary-hover active:bg-action-tertiary-pressed data-popup-open:bg-action-tertiary-hover",
|
|
23
|
+
false: "bg-transparent px-0 text-fg-primary hover:text-fg-brand active:text-fg-brand data-popup-open:bg-transparent"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
size: "md",
|
|
28
|
+
withBackground: true
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
function findOption(options, value) {
|
|
32
|
+
return options.find((option) => option.code === value);
|
|
33
|
+
}
|
|
34
|
+
function CurrencyFlag({ flag = DEFAULT_FLAG, label, className }) {
|
|
35
|
+
const total = flag.reduce((sum, stripe) => sum + (stripe.size ?? 1), 0);
|
|
36
|
+
let cursor = 0;
|
|
37
|
+
const stops = flag.flatMap((stripe) => {
|
|
38
|
+
const start = cursor;
|
|
39
|
+
cursor += (stripe.size ?? 1) / total * 100;
|
|
40
|
+
return [`${stripe.color} ${start.toFixed(2)}%`, `${stripe.color} ${cursor.toFixed(2)}%`];
|
|
41
|
+
});
|
|
42
|
+
return /* @__PURE__ */ jsx("span", {
|
|
43
|
+
role: "img",
|
|
44
|
+
"aria-label": label ?? "Currency flag",
|
|
45
|
+
"data-slot": "currency-flag",
|
|
46
|
+
className: cn("inline-block h-4 w-6 shrink-0 overflow-hidden rounded-[3px] bg-cover shadow-[inset_0_0_0_1px_rgb(0_0_0/0.04)]", className),
|
|
47
|
+
style: { backgroundImage: `linear-gradient(90deg, ${stops.join(", ")})` }
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function CurrencySelector({ options, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, size = "md", withBackground = true, showFlag = true, showOptionFlags = true, contentClassName, className, placeholder = "Select currency", type = "button", ...props }) {
|
|
51
|
+
const fallbackValue = options[0]?.code;
|
|
52
|
+
const [selectedValue, setSelectedValue] = useUncontrolled({
|
|
53
|
+
value,
|
|
54
|
+
defaultValue,
|
|
55
|
+
finalValue: fallbackValue,
|
|
56
|
+
onChange: (nextValue) => {
|
|
57
|
+
const nextOption = findOption(options, nextValue);
|
|
58
|
+
if (nextOption) onValueChange?.(nextValue, nextOption);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const selectedOption = findOption(options, selectedValue);
|
|
62
|
+
const handleValueChange = (nextValue) => {
|
|
63
|
+
if (nextValue) setSelectedValue(nextValue);
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ jsxs(Select, {
|
|
66
|
+
value: selectedValue,
|
|
67
|
+
onValueChange: handleValueChange,
|
|
68
|
+
open,
|
|
69
|
+
defaultOpen,
|
|
70
|
+
onOpenChange,
|
|
71
|
+
size,
|
|
72
|
+
children: [/* @__PURE__ */ jsxs(SelectTrigger, {
|
|
73
|
+
type,
|
|
74
|
+
unstyled: true,
|
|
75
|
+
className: cn(currencySelectorTriggerVariants({
|
|
76
|
+
size,
|
|
77
|
+
withBackground
|
|
78
|
+
}), className),
|
|
79
|
+
...props,
|
|
80
|
+
children: [showFlag && selectedOption ? /* @__PURE__ */ jsx(CurrencyFlag, {
|
|
81
|
+
flag: selectedOption.flag,
|
|
82
|
+
label: `${selectedOption.countryCode ?? selectedOption.code} flag`
|
|
83
|
+
}) : null, /* @__PURE__ */ jsx(SelectValue, {
|
|
84
|
+
placeholder,
|
|
85
|
+
children: selectedOption?.code ?? placeholder
|
|
86
|
+
})]
|
|
87
|
+
}), /* @__PURE__ */ jsx(SelectContent, {
|
|
88
|
+
align: "start",
|
|
89
|
+
sideOffset: 8,
|
|
90
|
+
className: cn("w-65 rounded-[18px] border-line-subtle bg-surface-overlay p-2 shadow-3", contentClassName),
|
|
91
|
+
children: options.map((option) => /* @__PURE__ */ jsxs(SelectItem, {
|
|
92
|
+
value: option.code,
|
|
93
|
+
className: "min-h-12 rounded-lg px-3 text-gdt-sm data-selected:bg-surface-brand-subtle data-selected:font-normal data-selected:text-fg-brand data-highlighted:bg-surface-brand-subtle",
|
|
94
|
+
children: [
|
|
95
|
+
showOptionFlags ? /* @__PURE__ */ jsx(CurrencyFlag, {
|
|
96
|
+
flag: option.flag,
|
|
97
|
+
label: `${option.countryCode ?? option.code} flag`
|
|
98
|
+
}) : null,
|
|
99
|
+
/* @__PURE__ */ jsxs("span", {
|
|
100
|
+
className: "min-w-0 flex-1 truncate",
|
|
101
|
+
children: [
|
|
102
|
+
option.code,
|
|
103
|
+
" - ",
|
|
104
|
+
option.label
|
|
105
|
+
]
|
|
106
|
+
}),
|
|
107
|
+
option.code === selectedValue ? /* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto size-4 text-fg-brand" }) : null
|
|
108
|
+
]
|
|
109
|
+
}, option.code))
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { CurrencyFlag, CurrencySelector, currencySelectorTriggerVariants };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { t as Button } from "./button-BZIeyUw6.js";
|
|
2
|
+
import { Empty } from "./empty-state.js";
|
|
3
|
+
import { FilterApplyButtonProps, FilterContentProps, FilterProps, FilterResetButtonProps } from "./filter.js";
|
|
4
|
+
import { Pagination } from "./pagination.js";
|
|
5
|
+
import { PopoverBody, PopoverContent, PopoverFooter, PopoverHeader } from "./popover.js";
|
|
6
|
+
import { Table as Table$1 } from "./table.js";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { ColumnDef, Row, Table, TableOptions } from "@tanstack/react-table";
|
|
9
|
+
//#region src/data-table.d.ts
|
|
10
|
+
declare module "@tanstack/react-table" {
|
|
11
|
+
interface ColumnMeta<TData, TValue> extends DataTableColumnMeta {}
|
|
12
|
+
}
|
|
13
|
+
type DataTableColumnMeta = {
|
|
14
|
+
cardLabel?: React.ReactNode;
|
|
15
|
+
hideInCard?: boolean;
|
|
16
|
+
isPinned?: boolean;
|
|
17
|
+
pinPosition?: "left" | "right";
|
|
18
|
+
skeletonType?: "default" | "image-description";
|
|
19
|
+
useAsCardBadge?: boolean;
|
|
20
|
+
useAsCardSubtitle?: boolean;
|
|
21
|
+
useAsCardTitle?: boolean;
|
|
22
|
+
};
|
|
23
|
+
type DataTableColumnDef<TData, TValue = unknown> = ColumnDef<TData, TValue>;
|
|
24
|
+
type DataTableRow<TData> = Row<TData>;
|
|
25
|
+
type DataTableInstance<TData> = Table<TData>;
|
|
26
|
+
type DataTableContextValue<TData> = {
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
onRowClick?: (row: Row<TData>) => void;
|
|
29
|
+
table: Table<TData>;
|
|
30
|
+
};
|
|
31
|
+
declare function useDataTableContext<TData>(): DataTableContextValue<TData>;
|
|
32
|
+
type UseDataTableOptions<TData, TValue = unknown> = Omit<TableOptions<TData>, "columns" | "data" | "enableRowSelection" | "getCoreRowModel"> & {
|
|
33
|
+
columns: ColumnDef<TData, TValue>[];
|
|
34
|
+
data: TData[];
|
|
35
|
+
enableRowSelection?: boolean;
|
|
36
|
+
};
|
|
37
|
+
declare function useDataTable<TData, TValue = unknown>({ columns, data, enableRowSelection, initialState, getSortedRowModel: getSortedRowModelOption, ...options }: UseDataTableOptions<TData, TValue>): Table<TData>;
|
|
38
|
+
type DataTableRootProps<TData> = React.ComponentProps<"div"> & {
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
onRowClick?: (row: Row<TData>) => void;
|
|
41
|
+
table: Table<TData>;
|
|
42
|
+
};
|
|
43
|
+
declare function DataTableRoot<TData>({ children, className, isLoading, onRowClick, table, ...props }: DataTableRootProps<TData>): React.JSX.Element;
|
|
44
|
+
type DataTableToolbarProps = React.ComponentProps<"div">;
|
|
45
|
+
declare function DataTableToolbar({ className, ...props }: DataTableToolbarProps): React.JSX.Element;
|
|
46
|
+
type DataTableFilterProps = Omit<FilterProps, "children"> & {
|
|
47
|
+
applyButtonProps?: FilterApplyButtonProps;
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
closeOnApply?: boolean;
|
|
50
|
+
closeOnReset?: boolean;
|
|
51
|
+
contentProps?: FilterContentProps;
|
|
52
|
+
defaultOpen?: boolean;
|
|
53
|
+
footer?: React.ReactNode;
|
|
54
|
+
onOpenChange?: (open: boolean) => void;
|
|
55
|
+
open?: boolean;
|
|
56
|
+
popoverBodyProps?: React.ComponentProps<typeof PopoverBody>;
|
|
57
|
+
popoverContentProps?: Omit<React.ComponentProps<typeof PopoverContent>, "children">;
|
|
58
|
+
popoverFooterProps?: React.ComponentProps<typeof PopoverFooter>;
|
|
59
|
+
popoverHeaderProps?: React.ComponentProps<typeof PopoverHeader>;
|
|
60
|
+
resetButtonProps?: FilterResetButtonProps;
|
|
61
|
+
title?: React.ReactNode;
|
|
62
|
+
trigger?: React.ReactElement;
|
|
63
|
+
triggerButtonProps?: Omit<React.ComponentProps<typeof Button>, "children">;
|
|
64
|
+
triggerCountClassName?: string;
|
|
65
|
+
triggerHideCountWhenZero?: boolean;
|
|
66
|
+
triggerLabel?: React.ReactNode;
|
|
67
|
+
};
|
|
68
|
+
declare function DataTableFilter({ applyButtonProps, children, closeOnApply, closeOnReset, contentProps, defaultJoin, defaultOpen, defaultValue, fields, footer, onApply, onOpenChange, open, popoverBodyProps, popoverContentProps, popoverFooterProps, popoverHeaderProps, resetButtonProps, title, trigger, triggerButtonProps, triggerCountClassName, triggerHideCountWhenZero, triggerLabel }: DataTableFilterProps): React.JSX.Element;
|
|
69
|
+
type DataTableTableProps<TData> = Omit<React.ComponentProps<typeof Table$1>, "children"> & {
|
|
70
|
+
emptyState?: React.ReactNode;
|
|
71
|
+
interactiveColumnIds?: string[];
|
|
72
|
+
isLoading?: boolean;
|
|
73
|
+
loadingRowCount?: number;
|
|
74
|
+
onRowClick?: (row: Row<TData>) => void;
|
|
75
|
+
table?: Table<TData>;
|
|
76
|
+
};
|
|
77
|
+
declare function DataTable<TData>({ containerClassName, emptyState, interactiveColumnIds, isLoading: isLoadingProp, loadingRowCount, onRowClick: onRowClickProp, table: tableProp, ...props }: DataTableTableProps<TData>): string | number | bigint | true | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined>;
|
|
78
|
+
type DataTableCardGridProps<TData> = React.ComponentProps<"div"> & {
|
|
79
|
+
actionsColumnId?: string;
|
|
80
|
+
badgeColumnId?: string;
|
|
81
|
+
detailColumnIds?: string[];
|
|
82
|
+
emptyState?: React.ReactNode;
|
|
83
|
+
isLoading?: boolean;
|
|
84
|
+
loadingCardCount?: number;
|
|
85
|
+
onCardClick?: (row: Row<TData>) => void;
|
|
86
|
+
renderActions?: (row: Row<TData>) => React.ReactNode;
|
|
87
|
+
renderCard?: (row: Row<TData>, args: DataTableCardGridRenderArgs<TData>) => React.ReactNode;
|
|
88
|
+
subtitleColumnId?: string;
|
|
89
|
+
table?: Table<TData>;
|
|
90
|
+
titleColumnId?: string;
|
|
91
|
+
};
|
|
92
|
+
type DataTableCardGridRenderArgs<TData> = {
|
|
93
|
+
action: React.ReactNode;
|
|
94
|
+
actions: React.ReactNode;
|
|
95
|
+
row: Row<TData>;
|
|
96
|
+
selection: React.ReactNode;
|
|
97
|
+
table: Table<TData>;
|
|
98
|
+
};
|
|
99
|
+
declare function DataTableCardGrid<TData>({ actionsColumnId, badgeColumnId, className, detailColumnIds, emptyState, isLoading: isLoadingProp, loadingCardCount, onCardClick, renderActions, renderCard, subtitleColumnId, table: tableProp, titleColumnId, ...props }: DataTableCardGridProps<TData>): string | number | bigint | true | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined>;
|
|
100
|
+
type DataTableBulkActionsRenderArgs<TData> = {
|
|
101
|
+
data: TData[];
|
|
102
|
+
rows: Row<TData>[];
|
|
103
|
+
table: Table<TData>;
|
|
104
|
+
};
|
|
105
|
+
type DataTableBulkActionsProps<TData> = Omit<React.ComponentProps<"div">, "children"> & {
|
|
106
|
+
children: React.ReactNode | ((args: DataTableBulkActionsRenderArgs<TData>) => React.ReactNode);
|
|
107
|
+
table?: Table<TData>;
|
|
108
|
+
};
|
|
109
|
+
declare function DataTableBulkActions<TData>({ children, className, style, table: tableProp, ...props }: DataTableBulkActionsProps<TData>): React.JSX.Element | null;
|
|
110
|
+
type DataTablePaginationProps<TData> = React.ComponentProps<typeof Pagination> & {
|
|
111
|
+
controlAppearance?: "control" | "icon";
|
|
112
|
+
getSummaryLabel?: (args: {
|
|
113
|
+
end: number;
|
|
114
|
+
page: number;
|
|
115
|
+
pageSize: number;
|
|
116
|
+
start: number;
|
|
117
|
+
totalEntries: number;
|
|
118
|
+
}) => React.ReactNode;
|
|
119
|
+
/**
|
|
120
|
+
* Called with the next 1-based page when a control is activated. Provide
|
|
121
|
+
* this (together with `page` and `pageCount`) to drive pagination from API
|
|
122
|
+
* state instead of the TanStack table instance.
|
|
123
|
+
*/
|
|
124
|
+
onPageChange?: (page: number) => void;
|
|
125
|
+
/** Current 1-based page. Overrides the table's pagination state when set. */
|
|
126
|
+
page?: number;
|
|
127
|
+
/** Total number of pages. Overrides `table.getPageCount()` when set. */
|
|
128
|
+
pageCount?: number;
|
|
129
|
+
/** Current page size. Used for API-driven summaries and page count fallback. */
|
|
130
|
+
pageSize?: number;
|
|
131
|
+
showControls?: boolean;
|
|
132
|
+
showJumpToPage?: boolean;
|
|
133
|
+
showPreviousNext?: boolean;
|
|
134
|
+
showSummary?: boolean;
|
|
135
|
+
jumpToPageLabel?: React.ReactNode;
|
|
136
|
+
nextLabel?: React.ReactNode;
|
|
137
|
+
previousLabel?: React.ReactNode;
|
|
138
|
+
siblingCount?: number;
|
|
139
|
+
table?: Table<TData>;
|
|
140
|
+
totalEntries?: number;
|
|
141
|
+
};
|
|
142
|
+
declare function DataTablePagination<TData>({ className, controlAppearance, getSummaryLabel, jumpToPageLabel, nextLabel, onPageChange, page, pageCount: pageCountProp, pageSize: pageSizeProp, previousLabel, showControls, showJumpToPage, showPreviousNext, showSummary, siblingCount, table: tableProp, totalEntries: totalEntriesProp, ...props }: DataTablePaginationProps<TData>): React.JSX.Element | null;
|
|
143
|
+
type DataTablePageSizeSelectProps<TData> = {
|
|
144
|
+
className?: string;
|
|
145
|
+
label?: (pageSize: number) => React.ReactNode;
|
|
146
|
+
/**
|
|
147
|
+
* Called with the next page size. Provide this (together with `pageSize`) to
|
|
148
|
+
* drive the control from API state instead of the TanStack table instance.
|
|
149
|
+
*/
|
|
150
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
151
|
+
/** Current page size. Overrides the table's pagination state when set. */
|
|
152
|
+
pageSize?: number;
|
|
153
|
+
pageSizeOptions?: number[];
|
|
154
|
+
table?: Table<TData>;
|
|
155
|
+
};
|
|
156
|
+
declare function DataTablePageSizeSelect<TData>({ className, label, onPageSizeChange, pageSize: pageSizeProp, pageSizeOptions, table: tableProp }: DataTablePageSizeSelectProps<TData>): React.JSX.Element;
|
|
157
|
+
type DataTableEmptyStateProps = {
|
|
158
|
+
action?: React.ReactNode;
|
|
159
|
+
description?: React.ReactNode;
|
|
160
|
+
title?: React.ReactNode;
|
|
161
|
+
} & React.ComponentProps<typeof Empty>;
|
|
162
|
+
declare function DataTableEmptyState({ action, className, description, title, ...props }: DataTableEmptyStateProps): React.JSX.Element;
|
|
163
|
+
//#endregion
|
|
164
|
+
export { DataTable, DataTableBulkActions, type DataTableBulkActionsProps, DataTableCardGrid, type DataTableCardGridProps, type DataTableCardGridRenderArgs, type DataTableColumnDef, type DataTableColumnMeta, DataTableEmptyState, DataTableFilter, type DataTableFilterProps, type DataTableInstance, DataTablePageSizeSelect, DataTablePagination, type DataTablePaginationProps, DataTableRoot, type DataTableRootProps, type DataTableRow, type DataTableTableProps, DataTableToolbar, type DataTableToolbarProps, type UseDataTableOptions, useDataTable, useDataTableContext };
|