@dynamic-labs-sdk/droplet 1.49.1 → 1.51.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/components/copy-button/copy-button.d.ts +3 -1
- package/dist/components/copy-button/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button/copy-button.stories.d.ts +1 -1
- package/dist/components/empty-state/empty-state.d.ts +3 -3
- package/dist/components/empty-state/empty-state.d.ts.map +1 -1
- package/dist/components/migration/field/field.d.ts.map +1 -1
- package/dist/components/status-badge/status-badge.d.ts.map +1 -1
- package/dist/components/tab-navigation/tab-navigation.d.ts.map +1 -1
- package/dist/components/toggle-card/toggle-card.d.ts +10 -0
- package/dist/components/toggle-card/toggle-card.d.ts.map +1 -1
- package/dist/components/toggle-card/toggle-card.stories.d.ts +5 -0
- package/dist/components/toggle-card/toggle-card.stories.d.ts.map +1 -1
- package/dist/components/toggle-row/toggle-row.d.ts +22 -1
- package/dist/components/toggle-row/toggle-row.d.ts.map +1 -1
- package/dist/components/toggle-row/toggle-row.stories.d.ts +10 -6
- package/dist/components/toggle-row/toggle-row.stories.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +54 -12
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.stories.d.ts +12 -1
- package/dist/components/ui/combobox/combobox.stories.d.ts.map +1 -1
- package/dist/components/ui/data-table/create-column-helper.d.ts +20 -0
- package/dist/components/ui/data-table/create-column-helper.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-active-filters.d.ts +37 -0
- package/dist/components/ui/data-table/data-table-active-filters.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-column-filter.d.ts +48 -0
- package/dist/components/ui/data-table/data-table-column-filter.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-column-visibility.d.ts +37 -0
- package/dist/components/ui/data-table/data-table-column-visibility.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-content.d.ts +43 -0
- package/dist/components/ui/data-table/data-table-content.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-context.d.ts +13 -0
- package/dist/components/ui/data-table/data-table-context.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-pagination.d.ts +38 -0
- package/dist/components/ui/data-table/data-table-pagination.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts +21 -0
- package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-rows.d.ts +22 -0
- package/dist/components/ui/data-table/data-table-rows.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table-search.d.ts +40 -0
- package/dist/components/ui/data-table/data-table-search.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table.d.ts +56 -0
- package/dist/components/ui/data-table/data-table.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table.stories.d.ts +32 -0
- package/dist/components/ui/data-table/data-table.stories.d.ts.map +1 -0
- package/dist/components/ui/data-table/data-table.types.d.ts +189 -0
- package/dist/components/ui/data-table/data-table.types.d.ts.map +1 -0
- package/dist/components/ui/data-table/expand-chevron.d.ts +7 -0
- package/dist/components/ui/data-table/expand-chevron.d.ts.map +1 -0
- package/dist/components/ui/data-table/get-column-label.d.ts +7 -0
- package/dist/components/ui/data-table/get-column-label.d.ts.map +1 -0
- package/dist/components/ui/data-table/get-pinned-cell-props.d.ts +15 -0
- package/dist/components/ui/data-table/get-pinned-cell-props.d.ts.map +1 -0
- package/dist/components/ui/data-table/selection-column.d.ts +24 -0
- package/dist/components/ui/data-table/selection-column.d.ts.map +1 -0
- package/dist/components/ui/data-table/use-data-table.d.ts +157 -0
- package/dist/components/ui/data-table/use-data-table.d.ts.map +1 -0
- package/dist/components/ui/field/field-control-context.d.ts +20 -0
- package/dist/components/ui/field/field-control-context.d.ts.map +1 -0
- package/dist/components/ui/field/field.d.ts +20 -4
- package/dist/components/ui/field/field.d.ts.map +1 -1
- package/dist/components/ui/field/field.stories.d.ts +18 -6
- package/dist/components/ui/field/field.stories.d.ts.map +1 -1
- package/dist/components/ui/label/label.d.ts +15 -0
- package/dist/components/ui/label/label.d.ts.map +1 -1
- package/dist/components/ui/pagination/pagination.d.ts +2 -2
- package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/select/select.stories.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts +7 -3
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/table/table.stories.d.ts +3 -1
- package/dist/components/ui/table/table.stories.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts +3 -1
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/index.cjs +1722 -247
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1714 -251
- package/dist/index.esm.js.map +1 -1
- package/dist/migration.cjs +1 -1
- package/dist/migration.cjs.map +1 -1
- package/dist/migration.esm.js +1 -1
- package/dist/migration.esm.js.map +1 -1
- package/dist/{toggle-row-PqelNVXI.esm.js → toggle-row-CeiCy3Aa.esm.js} +33 -8
- package/dist/toggle-row-CeiCy3Aa.esm.js.map +1 -0
- package/dist/{toggle-row-BBTk7_bT.cjs → toggle-row-DcV81G3w.cjs} +33 -8
- package/dist/toggle-row-DcV81G3w.cjs.map +1 -0
- package/package.json +3 -1
- package/src/styles/globals.css +54 -15
- package/dist/toggle-row-BBTk7_bT.cjs.map +0 -1
- package/dist/toggle-row-PqelNVXI.esm.js.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
export type CopyButtonProps = {
|
|
3
|
+
/** Names an icon-only button for screen readers while idle, without showing text. Defaults to `label`, then "Copy to clipboard". */
|
|
4
|
+
ariaLabel?: string;
|
|
3
5
|
className?: string;
|
|
4
6
|
label?: string;
|
|
5
7
|
size?: 'default' | 'sm' | 'xs' | 'icon' | 'icon-xs' | 'icon-sm';
|
|
@@ -7,5 +9,5 @@ export type CopyButtonProps = {
|
|
|
7
9
|
variant?: 'default' | 'outline' | 'ghost' | 'secondary';
|
|
8
10
|
};
|
|
9
11
|
/** Copies a value and presents stable, accessible success or failure feedback. */
|
|
10
|
-
export declare const CopyButton: ({ value, label, variant, size, className, }: CopyButtonProps) => ReactElement;
|
|
12
|
+
export declare const CopyButton: ({ value, ariaLabel: idleAriaLabel, label, variant, size, className, }: CopyButtonProps) => ReactElement;
|
|
11
13
|
//# sourceMappingURL=copy-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../../src/components/copy-button/copy-button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../../src/components/copy-button/copy-button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,OAAO,CAAC;AA0FvE,MAAM,MAAM,eAAe,GAAG;IAC5B,oIAAoI;IACpI,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;CACzD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,0EAOpB,eAAe,KAAG,YAsJpB,CAAC"}
|
|
@@ -21,7 +21,7 @@ declare const meta: {
|
|
|
21
21
|
options: string[];
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
component: ({ value, label, variant, size, className, }: import("./copy-button").CopyButtonProps) => import("react").ReactElement;
|
|
24
|
+
component: ({ value, ariaLabel: idleAriaLabel, label, variant, size, className, }: import("./copy-button").CopyButtonProps) => import("react").ReactElement;
|
|
25
25
|
tags: string[];
|
|
26
26
|
title: string;
|
|
27
27
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type ComponentType, type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type EmptyStateProps = {
|
|
3
3
|
action?: ReactNode;
|
|
4
4
|
className?: string;
|
|
5
|
-
description
|
|
5
|
+
description?: string;
|
|
6
6
|
icon: ComponentType<{
|
|
7
7
|
className?: string;
|
|
8
8
|
size?: number;
|
|
9
9
|
}>;
|
|
10
10
|
title: string;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
export declare const EmptyState: ({ icon: Icon, title, description, action, className, }: EmptyStateProps) => ReactElement;
|
|
13
13
|
//# sourceMappingURL=empty-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E,MAAM,
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../src/components/empty-state/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,UAAU,2DAMpB,eAAe,KAAG,YAoBpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/migration/field/field.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAMtF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,GAAG;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,6EAQf,UAAU,KAAG,
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/migration/field/field.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAMtF,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,GAAG;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,6EAQf,UAAU,KAAG,YA+Cf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../../src/components/status-badge/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../../src/components/status-badge/status-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,KAAK,UAAU,GACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,SAAS,GACT,MAAM,GACN,SAAS,GACT,YAAY,CAAC;AAwBjB,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,kCAIrB,gBAAgB,KAAG,YASrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-navigation.d.ts","sourceRoot":"","sources":["../../../src/components/tab-navigation/tab-navigation.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"tab-navigation.d.ts","sourceRoot":"","sources":["../../../src/components/tab-navigation/tab-navigation.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,IAAI,EAAyB,MAAM,YAAY,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,aAAa,CAAC,GAAG;IAC3E,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,QAAA,MAAM,aAAa,iFAQhB,kBAAkB,KAAG,YA2FvB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -108,6 +108,16 @@ export type ToggleCardProps = {
|
|
|
108
108
|
/** Controlled accordion value. */
|
|
109
109
|
value?: string;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* DEPRECATED. Never use in new code. Use `FlushCardStack` with a `ToggleRow`
|
|
113
|
+
* header instead; put sub-options in the item's reveal.
|
|
114
|
+
*
|
|
115
|
+
* Kept so existing callers keep rendering while they migrate.
|
|
116
|
+
*
|
|
117
|
+
* @deprecated Use `FlushCardStack` + `ToggleRow`.
|
|
118
|
+
* @see FlushCardStack
|
|
119
|
+
* @see ToggleRow
|
|
120
|
+
*/
|
|
111
121
|
export declare const ToggleCard: FC<ToggleCardProps>;
|
|
112
122
|
export {};
|
|
113
123
|
//# sourceMappingURL=toggle-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-card.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-card/toggle-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAc5F,KAAK,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU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AC,EAAE,SAAS,CAAC;IACrB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oEAAoE;IACpE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uDAAuD;IACvD,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;IAC9C,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,sCAAsC;IACtC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA0FF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA6L1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-card.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-card/toggle-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"toggle-card.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-card/toggle-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAkB7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAuBtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAqB/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwBxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA6B5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAuB1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAmBxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAmB3B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAmBtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAqBhC,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
export interface ToggleRowProps {
|
|
3
|
+
/** Status next to the label. Pass droplet `Badge` elements only, never hand-made chips. */
|
|
3
4
|
badge?: ReactNode;
|
|
4
5
|
checked: boolean;
|
|
6
|
+
/** Content rendered under the row. For sub-options, prefer a `FlushCardStack.Item` reveal. */
|
|
5
7
|
children?: ReactNode;
|
|
6
8
|
className?: string;
|
|
7
9
|
description?: string;
|
|
@@ -9,8 +11,27 @@ export interface ToggleRowProps {
|
|
|
9
11
|
icon?: ReactNode;
|
|
10
12
|
label: string;
|
|
11
13
|
onCheckedChange: (checked: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Only rendered with `switchPosition='right'`, which is deprecated.
|
|
16
|
+
* Put settings in a `FlushCardStack.Item` reveal instead.
|
|
17
|
+
*/
|
|
12
18
|
onSettings?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated The switch always sits on the left. `'right'` still renders for
|
|
21
|
+
* existing callers but must not be used in new code.
|
|
22
|
+
*/
|
|
13
23
|
switchPosition?: 'left' | 'right';
|
|
14
24
|
}
|
|
15
|
-
|
|
25
|
+
/**
|
|
26
|
+
* A single on/off setting: switch on the left, then label, description and
|
|
27
|
+
* optional `Badge`. It has no surface of its own.
|
|
28
|
+
*
|
|
29
|
+
* Use it as the `header` of a `FlushCardStack.Item`, or on its own inside a
|
|
30
|
+
* `Card`. Never put a `Well` under it directly; sub-options go in the
|
|
31
|
+
* `FlushCardStack.Item` reveal.
|
|
32
|
+
*
|
|
33
|
+
* @see FlushCardStack
|
|
34
|
+
* @see Switch
|
|
35
|
+
*/
|
|
36
|
+
export declare const ToggleRow: (props: ToggleRowProps) => ReactElement;
|
|
16
37
|
//# sourceMappingURL=toggle-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-row.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-row/toggle-row.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAQjE,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"toggle-row.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-row/toggle-row.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAQjE,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AAYD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,SAAS,UAAW,cAAc,KAAG,YA0HjD,CAAC"}
|
|
@@ -6,18 +6,23 @@ declare const meta: {
|
|
|
6
6
|
description: string;
|
|
7
7
|
label: string;
|
|
8
8
|
onCheckedChange: any;
|
|
9
|
-
switchPosition: "left";
|
|
10
9
|
};
|
|
11
10
|
argTypes: {
|
|
12
11
|
disabled: {
|
|
13
12
|
control: "boolean";
|
|
14
13
|
};
|
|
14
|
+
onSettings: {
|
|
15
|
+
table: {
|
|
16
|
+
disable: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
15
19
|
switchPosition: {
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
table: {
|
|
21
|
+
disable: true;
|
|
22
|
+
};
|
|
18
23
|
};
|
|
19
24
|
};
|
|
20
|
-
component: (
|
|
25
|
+
component: (props: import("./toggle-row").ToggleRowProps) => React.ReactElement;
|
|
21
26
|
parameters: {
|
|
22
27
|
layout: string;
|
|
23
28
|
};
|
|
@@ -28,7 +33,6 @@ export default meta;
|
|
|
28
33
|
type Story = StoryObj<typeof meta>;
|
|
29
34
|
export declare const Default: Story;
|
|
30
35
|
export declare const WithBadges: Story;
|
|
31
|
-
export declare const
|
|
36
|
+
export declare const InFlushCardStack: Story;
|
|
32
37
|
export declare const Disabled: Story;
|
|
33
|
-
export declare const RightSwitch: Story;
|
|
34
38
|
//# sourceMappingURL=toggle-row.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-row.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-row/toggle-row.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"toggle-row.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-row/toggle-row.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAS5D,QAAA,MAAM,IAAI;;;;;yBAKwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAYH,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwBxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAyD9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAI9D,QAAA,MAAM,QAAQ,4BAGX,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAG,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/checkbox/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAI9D,QAAA,MAAM,QAAQ,4BAGX,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,KAAG,YA0ClD,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactElement } from 'react';
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
2
|
/** A single selectable option rendered inside the Combobox dropdown. */
|
|
3
3
|
type ComboboxOption = {
|
|
4
4
|
/** The human-readable label shown in the trigger and list. */
|
|
@@ -6,32 +6,65 @@ type ComboboxOption = {
|
|
|
6
6
|
/** The machine-readable value passed to `onValueChange`. */
|
|
7
7
|
value: string;
|
|
8
8
|
};
|
|
9
|
-
/** Props
|
|
10
|
-
type
|
|
9
|
+
/** Props shared by the single- and multi-select `Combobox`. */
|
|
10
|
+
type ComboboxBaseProps = {
|
|
11
11
|
/** Additional class names forwarded to the trigger button. */
|
|
12
12
|
className?: string;
|
|
13
13
|
/** When true the trigger is rendered in a disabled state and the popover cannot open. */
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
/** Text shown when the search query matches no options. Defaults to "No results." */
|
|
16
16
|
emptyText?: string;
|
|
17
|
-
/** Called with the newly selected option's value when the user picks an item. */
|
|
18
|
-
onValueChange: (value: string) => void;
|
|
19
17
|
/** The list of options to search and select from. */
|
|
20
18
|
options: ComboboxOption[];
|
|
21
19
|
/** Text shown in the trigger when no option is selected. Defaults to "Select…". */
|
|
22
20
|
placeholder?: string;
|
|
23
21
|
/** Placeholder text shown inside the search input. Defaults to "Search…". */
|
|
24
22
|
searchPlaceholder?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Props for the single-select `Combobox` (the default). */
|
|
25
|
+
type ComboboxSingleProps = ComboboxBaseProps & {
|
|
26
|
+
/** Omit or pass `false` for single-select. */
|
|
27
|
+
multiple?: false;
|
|
28
|
+
/** Called with the newly selected option's value when the user picks an item. */
|
|
29
|
+
onValueChange: (value: string) => void;
|
|
25
30
|
/** The currently selected value. Pass `undefined` to show the placeholder. */
|
|
26
31
|
value?: string;
|
|
27
32
|
};
|
|
33
|
+
/** Props for the multi-select `Combobox`. Options render a `Checkbox`. */
|
|
34
|
+
type ComboboxMultipleProps = ComboboxBaseProps & {
|
|
35
|
+
/**
|
|
36
|
+
* Formats the trigger text from the selected labels, in option order. Only
|
|
37
|
+
* called when at least one option is selected. Defaults to joining them
|
|
38
|
+
* with ", ". Use it to switch to a count, e.g. "3 chains", once the list
|
|
39
|
+
* would get cut off.
|
|
40
|
+
*/
|
|
41
|
+
formatSelected?: (labels: string[]) => ReactNode;
|
|
42
|
+
/** Turns on multi-select: the list stays open and each option toggles. */
|
|
43
|
+
multiple: true;
|
|
44
|
+
/** Called with the full list of selected values after each toggle. */
|
|
45
|
+
onValueChange: (value: string[]) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Label for an optional row above the options that selects or clears all
|
|
48
|
+
* of them. Its checkbox is indeterminate while only some are selected.
|
|
49
|
+
* Hidden while the user is searching. Omit to leave the row out.
|
|
50
|
+
*/
|
|
51
|
+
selectAllLabel?: string;
|
|
52
|
+
/** The currently selected values, in any order. */
|
|
53
|
+
value: string[];
|
|
54
|
+
};
|
|
55
|
+
/** Props for the controlled `Combobox` component. */
|
|
56
|
+
type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;
|
|
28
57
|
/**
|
|
29
|
-
* Searchable single-select
|
|
58
|
+
* Searchable Combobox, single-select by default or multi-select with `multiple`.
|
|
59
|
+
*
|
|
60
|
+
* Composes `Popover`, `Command` and `Checkbox` from the droplet design system.
|
|
61
|
+
* The trigger is styled like `SelectTrigger` with a rotating chevron that
|
|
62
|
+
* signals open/closed state.
|
|
30
63
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
64
|
+
* - Single-select: picking an item closes the popover, fires `onValueChange`
|
|
65
|
+
* and shows a check mark next to the active selection.
|
|
66
|
+
* - Multi-select: each option shows a `Checkbox`, picking an item toggles it
|
|
67
|
+
* and keeps the popover open, and the trigger lists the selected labels.
|
|
35
68
|
*
|
|
36
69
|
* @example
|
|
37
70
|
* ```tsx
|
|
@@ -42,9 +75,18 @@ type ComboboxProps = {
|
|
|
42
75
|
* onValueChange={setChain}
|
|
43
76
|
* placeholder="Select a chain"
|
|
44
77
|
* />
|
|
78
|
+
*
|
|
79
|
+
* const [chains, setChains] = useState<string[]>([]);
|
|
80
|
+
* <Combobox
|
|
81
|
+
* multiple
|
|
82
|
+
* options={[{ value: 'eth', label: 'Ethereum' }, { value: 'sol', label: 'Solana' }]}
|
|
83
|
+
* value={chains}
|
|
84
|
+
* onValueChange={setChains}
|
|
85
|
+
* selectAllLabel="All chains"
|
|
86
|
+
* />
|
|
45
87
|
* ```
|
|
46
88
|
*/
|
|
47
|
-
declare const Combobox: (
|
|
89
|
+
declare const Combobox: (props: ComboboxProps) => ReactElement;
|
|
48
90
|
export { Combobox };
|
|
49
|
-
export type { ComboboxOption, ComboboxProps };
|
|
91
|
+
export type { ComboboxMultipleProps, ComboboxOption, ComboboxProps, ComboboxSingleProps, };
|
|
50
92
|
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/combobox/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/combobox/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAkBpE,wEAAwE;AACxE,KAAK,cAAc,GAAG;IACpB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,+DAA+D;AAC/D,KAAK,iBAAiB,GAAG;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yFAAyF;IACzF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,4DAA4D;AAC5D,KAAK,mBAAmB,GAAG,iBAAiB,GAAG;IAC7C,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,iFAAiF;IACjF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,0EAA0E;AAC1E,KAAK,qBAAqB,GAAG,iBAAiB,GAAG;IAC/C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,SAAS,CAAC;IACjD,0EAA0E;IAC1E,QAAQ,EAAE,IAAI,CAAC;IACf,sEAAsE;IACtE,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,qDAAqD;AACrD,KAAK,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AA0CjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,QAAA,MAAM,QAAQ,UAAW,aAAa,KAAG,YAgLxC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,mBAAmB,GACpB,CAAC"}
|
|
@@ -9,7 +9,7 @@ declare const meta: {
|
|
|
9
9
|
}[];
|
|
10
10
|
value: string;
|
|
11
11
|
};
|
|
12
|
-
component: (
|
|
12
|
+
component: (props: import("./combobox").ComboboxProps) => ReactElement;
|
|
13
13
|
parameters: {
|
|
14
14
|
layout: string;
|
|
15
15
|
};
|
|
@@ -22,4 +22,15 @@ type Story = StoryObj<typeof meta>;
|
|
|
22
22
|
export declare const Default: Story;
|
|
23
23
|
/** Shows the trigger label and check mark when a value is already selected. */
|
|
24
24
|
export declare const Preselected: Story;
|
|
25
|
+
/**
|
|
26
|
+
* Multi-select. Each option shows a `Checkbox`; clicking anywhere on the row
|
|
27
|
+
* (or Enter on the highlighted row) toggles it and the list stays open.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Multiple: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Multi-select with a select-all row. Its checkbox is indeterminate while only
|
|
32
|
+
* some options are selected. The row hides while searching. `formatSelected`
|
|
33
|
+
* switches the trigger to a count past two picks.
|
|
34
|
+
*/
|
|
35
|
+
export declare const MultipleWithSelectAll: Story;
|
|
25
36
|
//# sourceMappingURL=combobox.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/combobox/combobox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAc5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;CAOuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmBnC,qEAAqE;AACrE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAiBF,+EAA+E;AAC/E,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"combobox.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/combobox/combobox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAY,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAc5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;CAOuB,CAAC;AAElC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAmBnC,qEAAqE;AACrE,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAiBF,+EAA+E;AAC/E,eAAO,MAAM,WAAW,EAAE,KAEzB,CAAC;AAoBF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwBF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAEnC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createColumnHelper as createTanStackColumnHelper } from '@tanstack/react-table';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a helper that builds typed column definitions for rows of type `TData`. Its `accessor`, `display` and `group` methods infer each column's value type.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const columnHelper = createColumnHelper<User>();
|
|
8
|
+
*
|
|
9
|
+
* const columns = [
|
|
10
|
+
* columnHelper.accessor('name', { header: 'Name' }),
|
|
11
|
+
* columnHelper.accessor('email', { header: 'Email' }),
|
|
12
|
+
* ];
|
|
13
|
+
* ```
|
|
14
|
+
* @returns A column helper for rows of type `TData`.
|
|
15
|
+
* @see ColumnDef
|
|
16
|
+
* @see useDataTable
|
|
17
|
+
*/
|
|
18
|
+
declare const createColumnHelper: typeof createTanStackColumnHelper;
|
|
19
|
+
export { createColumnHelper };
|
|
20
|
+
//# sourceMappingURL=create-column-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-column-helper.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/create-column-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,IAAI,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEzF;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,kBAAkB,EAAE,OAAO,0BACL,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link DataTableActiveFilters}.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const props: DataTableActiveFiltersProps = { className: 'px-4' };
|
|
8
|
+
* ```
|
|
9
|
+
* @see DataTableActiveFilters
|
|
10
|
+
* @see DataTableColumnFilter
|
|
11
|
+
*/
|
|
12
|
+
type DataTableActiveFiltersProps = {
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* One chip per active filter, each with a button that removes it, plus a button that clears them all.
|
|
17
|
+
* The search text gets a chip too. Renders nothing while no filter is active.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <DataTable table={dataTable}>
|
|
22
|
+
* <DataTableToolbar>
|
|
23
|
+
* <DataTableSearch />
|
|
24
|
+
* </DataTableToolbar>
|
|
25
|
+
* <DataTableActiveFilters />
|
|
26
|
+
* <DataTableContent />
|
|
27
|
+
* </DataTable>
|
|
28
|
+
* ```
|
|
29
|
+
* @returns The rendered filter chips, or nothing when no filter is active.
|
|
30
|
+
* @see DataTableColumnFilter
|
|
31
|
+
* @see DataTableSearch
|
|
32
|
+
* @see useDataTable
|
|
33
|
+
*/
|
|
34
|
+
declare const DataTableActiveFilters: ({ className, }: DataTableActiveFiltersProps) => ReactElement | null;
|
|
35
|
+
export { DataTableActiveFilters };
|
|
36
|
+
export type { DataTableActiveFiltersProps };
|
|
37
|
+
//# sourceMappingURL=data-table-active-filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-active-filters.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/data-table-active-filters.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAyF1C;;;;;;;;;GASG;AACH,KAAK,2BAA2B,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,sBAAsB,mBAEzB,2BAA2B,KAAG,YAAY,GAAG,IAkD/C,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,YAAY,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Column } from '@tanstack/react-table';
|
|
2
|
+
import { type ReactElement } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link DataTableColumnFilter}.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const props: DataTableColumnFilterProps<User> = { column: header.column };
|
|
9
|
+
* ```
|
|
10
|
+
* @see DataTableColumnFilter
|
|
11
|
+
* @see DataTableActiveFilters
|
|
12
|
+
*/
|
|
13
|
+
type DataTableColumnFilterProps<TData> = {
|
|
14
|
+
className?: string;
|
|
15
|
+
/** The column to filter. It needs `meta.filter`, and `filtering` turned on in `useDataTable`. */
|
|
16
|
+
column: Column<TData, unknown>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A filter button that opens a column's filter: a text field for `meta.filter: 'text'`, or a checklist for `meta.filter: 'values'`.
|
|
20
|
+
* `DataTableContent` already adds it to each filterable header; render it yourself only in a header you build without `DataTableContent`.
|
|
21
|
+
* The checklist offers `meta.filterOptions`, else the values in the data. With manual filtering and no `filterOptions`,
|
|
22
|
+
* it can only offer the values in the rows currently loaded, so pass `filterOptions` when the server holds more.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* const columns: ColumnDef<User>[] = [
|
|
27
|
+
* { accessorKey: 'role', header: 'Role', meta: { filter: 'values' } },
|
|
28
|
+
* ];
|
|
29
|
+
*
|
|
30
|
+
* // In a header row you render yourself:
|
|
31
|
+
* <th>
|
|
32
|
+
* Role
|
|
33
|
+
* <DataTableColumnFilter column={header.column} />
|
|
34
|
+
* </th>
|
|
35
|
+
* ```
|
|
36
|
+
* @returns The rendered filter button and its popover.
|
|
37
|
+
* @see DataTableContent
|
|
38
|
+
* @see DataTableActiveFilters
|
|
39
|
+
* @see DataTableSearch
|
|
40
|
+
*/
|
|
41
|
+
declare const DataTableColumnFilter: <TData>({ className, column, }: DataTableColumnFilterProps<TData>) => ReactElement;
|
|
42
|
+
/** The body of a column's filter popover, shared by the header filter button and the active-filter chips. */
|
|
43
|
+
declare const DataTableColumnFilterContent: <TData>({ column, }: {
|
|
44
|
+
column: Column<TData, unknown>;
|
|
45
|
+
}) => ReactElement;
|
|
46
|
+
export { DataTableColumnFilter, DataTableColumnFilterContent };
|
|
47
|
+
export type { DataTableColumnFilterProps };
|
|
48
|
+
//# sourceMappingURL=data-table-column-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-column-filter.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/data-table-column-filter.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAS,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAqF1C;;;;;;;;;GASG;AACH,KAAK,0BAA0B,CAAC,KAAK,IAAI;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,qBAAqB,GAAI,KAAK,0BAGjC,0BAA0B,CAAC,KAAK,CAAC,KAAG,YA0BtC,CAAC;AAEF,6GAA6G;AAC7G,QAAA,MAAM,4BAA4B,GAAI,KAAK,eAExC;IACD,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CAChC,KAAG,YA6BH,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,CAAC;AAC/D,YAAY,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link DataTableColumnVisibility}.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const props: DataTableColumnVisibilityProps = { label: 'Fields' };
|
|
8
|
+
* ```
|
|
9
|
+
* @see DataTableColumnVisibility
|
|
10
|
+
* @see useDataTable
|
|
11
|
+
*/
|
|
12
|
+
type DataTableColumnVisibilityProps = {
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Menu trigger text. */
|
|
15
|
+
label?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Lets people choose which columns are shown, from a menu with a checkbox per column.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <DataTable table={dataTable}>
|
|
23
|
+
* <DataTableToolbar>
|
|
24
|
+
* <DataTableColumnVisibility label="Columns" />
|
|
25
|
+
* </DataTableToolbar>
|
|
26
|
+
* <DataTableContent />
|
|
27
|
+
* </DataTable>
|
|
28
|
+
* ```
|
|
29
|
+
* @returns The rendered column picker menu.
|
|
30
|
+
* @see DataTable
|
|
31
|
+
* @see DataTableToolbar
|
|
32
|
+
* @see useDataTable
|
|
33
|
+
*/
|
|
34
|
+
declare const DataTableColumnVisibility: ({ className, label, }: DataTableColumnVisibilityProps) => ReactElement;
|
|
35
|
+
export { DataTableColumnVisibility };
|
|
36
|
+
export type { DataTableColumnVisibilityProps };
|
|
37
|
+
//# sourceMappingURL=data-table-column-visibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-column-visibility.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/data-table-column-visibility.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAa1C;;;;;;;;;GASG;AACH,KAAK,8BAA8B,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,yBAAyB,0BAG5B,8BAA8B,KAAG,YAmDnC,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactElement } from 'react';
|
|
2
|
+
import type { EmptyStateProps } from '../../empty-state/empty-state';
|
|
3
|
+
import { Table } from '../table/table';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link DataTableContent}: the empty and loading states, plus the props of the underlying table element.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const props: DataTableContentProps = { emptyTitle: 'No users yet' };
|
|
10
|
+
* ```
|
|
11
|
+
* @see DataTableContent
|
|
12
|
+
* @see DataTable
|
|
13
|
+
*/
|
|
14
|
+
type DataTableContentProps = Omit<ComponentProps<typeof Table>, 'children' | 'fill' | 'stickyFirstColumn' | 'viewportRef'> & {
|
|
15
|
+
/** Title for the empty state when filters or search hide every row. It comes with a button that clears them. */
|
|
16
|
+
emptyFilteredTitle?: string;
|
|
17
|
+
/** Icon for the empty state. Defaults to a table icon. */
|
|
18
|
+
emptyIcon?: EmptyStateProps['icon'];
|
|
19
|
+
/** Title for the empty state. */
|
|
20
|
+
emptyTitle?: string;
|
|
21
|
+
/** How many skeleton rows to show while loading. */
|
|
22
|
+
loadingRowCount?: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The table itself: headers, rows, and the loading and empty states.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const dataTable = useDataTable({ columns, data, sorting: { mode: 'client' } });
|
|
30
|
+
*
|
|
31
|
+
* <DataTable table={dataTable}>
|
|
32
|
+
* <DataTableContent emptyTitle="No users yet" />
|
|
33
|
+
* </DataTable>
|
|
34
|
+
* ```
|
|
35
|
+
* @returns The rendered table element.
|
|
36
|
+
* @see DataTable
|
|
37
|
+
* @see useDataTable
|
|
38
|
+
* @see DataTablePagination
|
|
39
|
+
*/
|
|
40
|
+
declare const DataTableContent: ({ className, emptyFilteredTitle, emptyIcon, emptyTitle, loadingRowCount, style, ...props }: DataTableContentProps) => ReactElement;
|
|
41
|
+
export { DataTableContent };
|
|
42
|
+
export type { DataTableContentProps };
|
|
43
|
+
//# sourceMappingURL=data-table-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-content.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/data-table-content.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAsB,KAAK,YAAY,EAAuC,MAAM,OAAO,CAAC;AAGxH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,KAAK,EAA+C,MAAM,gBAAgB,CAAC;AAqJpF;;;;;;;;;GASG;AACH,KAAK,qBAAqB,GAAG,IAAI,CAC/B,cAAc,CAAC,OAAO,KAAK,CAAC,EAC5B,UAAU,GAAG,MAAM,GAAG,mBAAmB,GAAG,aAAa,CAC1D,GAAG;IACF,gHAAgH;IAChH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,iCAAiC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,gBAAgB,+FAQnB,qBAAqB,KAAG,YA2H1B,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DataTableInstance } from './use-data-table';
|
|
2
|
+
type DataTableContextValue = DataTableInstance<any> & {
|
|
3
|
+
fill: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const DataTableContext: import("react").Context<DataTableContextValue | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Read the state of the nearest `DataTable`, for building custom table parts.
|
|
8
|
+
* Throws when called outside a `DataTable`.
|
|
9
|
+
*/
|
|
10
|
+
declare const useDataTableContext: () => DataTableContextValue;
|
|
11
|
+
export { DataTableContext, useDataTableContext };
|
|
12
|
+
export type { DataTableContextValue };
|
|
13
|
+
//# sourceMappingURL=data-table-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-table-context.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/data-table-context.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI1D,KAAK,qBAAqB,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAExE,QAAA,MAAM,gBAAgB,uDAAoD,CAAC;AAE3E;;;GAGG;AACH,QAAA,MAAM,mBAAmB,QAAO,qBAO/B,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;AACjD,YAAY,EAAE,qBAAqB,EAAE,CAAC"}
|