@caspeco/casper-ui-library 7.11.1 → 8.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/components/table/index.d.ts +4 -0
- package/dist/components/table/index.d.ts.map +1 -1
- package/dist/components/table/table-content.d.ts +5 -0
- package/dist/components/table/table-content.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-actions.d.ts +17 -0
- package/dist/components/table/table-toolbar-actions.d.ts.map +1 -0
- package/dist/components/table/table-toolbar-actions.js +25 -0
- package/dist/components/table/table-toolbar-add-button.d.ts +13 -0
- package/dist/components/table/table-toolbar-add-button.d.ts.map +1 -0
- package/dist/components/table/table-toolbar-add-button.js +13 -0
- package/dist/components/table/table-toolbar-search.d.ts +11 -0
- package/dist/components/table/table-toolbar-search.d.ts.map +1 -0
- package/dist/components/table/table-toolbar-search.js +19 -0
- package/dist/components/table/table-toolbar-settings.d.ts +7 -0
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -0
- package/dist/components/table/table-toolbar-settings.js +59 -0
- package/dist/components/table/table-toolbar.d.ts +11 -19
- package/dist/components/table/table-toolbar.d.ts.map +1 -1
- package/dist/components/table/table-toolbar.js +49 -143
- package/dist/components/table/table-toolbar.spec.d.ts +2 -0
- package/dist/components/table/table-toolbar.spec.d.ts.map +1 -0
- package/dist/components/table/table.composition.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +5 -0
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/types.d.ts +4 -1
- package/dist/components/table/types.d.ts.map +1 -1
- package/dist/index.js +63 -55
- package/package.json +1 -1
|
@@ -4,5 +4,9 @@ export { TableContent } from './table-content.js';
|
|
|
4
4
|
export { useTableContext } from './table-context.js';
|
|
5
5
|
export { TableFilter } from './table-filter.js';
|
|
6
6
|
export { TableToolbar } from './table-toolbar.js';
|
|
7
|
+
export { TableToolbarSearch } from './table-toolbar-search.js';
|
|
8
|
+
export { TableToolbarSettings } from './table-toolbar-settings.js';
|
|
9
|
+
export { TableToolbarActions } from './table-toolbar-actions.js';
|
|
10
|
+
export { TableToolbarAddButton } from './table-toolbar-add-button.js';
|
|
7
11
|
export type { CellContext, ColumnDef, ExpandedState, Row, RowSelectionState, TableContentProps, TableProps, TableRow, TableToolbarProps, VisibilityState, } from './types.js';
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,YAAY,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,GAAG,EACH,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,eAAe,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -49,6 +49,11 @@ export interface TableContentProps<TData extends TableData = TableData> {
|
|
|
49
49
|
portalContainerRef?: React.RefObject<HTMLElement | null>;
|
|
50
50
|
}
|
|
51
51
|
declare const TableContentInner: <TData extends TableData>({ onClickRow, onRowClickIndication, hideTableHeaderDropdown, showRowHoverStyle, stickyHeaders, virtualization, portalContainerRef, ...props }: TableContentProps<TData> & ThemeStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
/**
|
|
53
|
+
* Renders table rows and columns with support for row interactions, nested data, and virtualization.
|
|
54
|
+
*
|
|
55
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table
|
|
56
|
+
*/
|
|
52
57
|
export declare const TableContent: typeof TableContentInner;
|
|
53
58
|
export {};
|
|
54
59
|
//# sourceMappingURL=table-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-content.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnE,UAAU,qBAAqB;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB,CAAC,KAAK,SAAS,SAAS,GAAG,SAAS;IACrE;;OAEG;IACH,UAAU,CAAC,EAAE,CACZ,GAAG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xB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,KACnF,IAAI,CAAC;IAEV;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC;;OAEG;IACH,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CACzD;AAED,QAAA,MAAM,iBAAiB,GAAI,KAAK,SAAS,SAAS,EAAE,+IASjD,iBAAiB,CAAC,KAAK,CAAC,GAAG,eAAe,4CAuJ5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAA8B,OAAO,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MenuList } from '../menu/index.js';
|
|
2
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
3
|
+
export type TableToolbarActionsProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The MenuList content to render in the actions menu
|
|
6
|
+
*/
|
|
7
|
+
children: ReactElement<ComponentProps<typeof MenuList>, typeof MenuList>;
|
|
8
|
+
};
|
|
9
|
+
declare const TableToolbarActionsInner: ({ children }: TableToolbarActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Custom action menu for table operations. Accepts MenuList as children. Use inside TableToolbar.
|
|
12
|
+
*
|
|
13
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table#table-toolbar
|
|
14
|
+
*/
|
|
15
|
+
export declare const TableToolbarActions: typeof TableToolbarActionsInner;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=table-toolbar-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar-actions.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-actions.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIrE,MAAM,MAAM,wBAAwB,GAAG;IACtC;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,OAAO,QAAQ,CAAC,CAAC;CACzE,CAAC;AAEF,QAAA,MAAM,wBAAwB,GAAI,cAAc,wBAAwB,4CAevE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAqC,OAAO,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as i } from "react";
|
|
3
|
+
import { useTableContext as e } from "./table-context.js";
|
|
4
|
+
import { translations as m } from "./translations.js";
|
|
5
|
+
import { Menu as s } from "../menu/menu.js";
|
|
6
|
+
import { MenuIconButton as l } from "../menu/menu-icon-button.js";
|
|
7
|
+
import { Icons as c } from "../icon/types.js";
|
|
8
|
+
const b = ({ children: o }) => {
|
|
9
|
+
const t = e(), r = m[t.localeString];
|
|
10
|
+
return /* @__PURE__ */ n(s, { children: [
|
|
11
|
+
/* @__PURE__ */ a(
|
|
12
|
+
l,
|
|
13
|
+
{
|
|
14
|
+
icon: c.MoreVertical,
|
|
15
|
+
variant: "ghost",
|
|
16
|
+
size: "md",
|
|
17
|
+
"aria-label": r.toolbarActions
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
o
|
|
21
|
+
] });
|
|
22
|
+
}, M = i(b);
|
|
23
|
+
export {
|
|
24
|
+
M as TableToolbarActions
|
|
25
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IconButtonProps } from '../icon-button/index.js';
|
|
2
|
+
export type TableToolbarAddButtonProps = Omit<IconButtonProps, "icon" | "aria-label"> & {
|
|
3
|
+
"aria-label"?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const TableToolbarAddButtonInner: (props: TableToolbarAddButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
/**
|
|
7
|
+
* Add button with icon for creating new items. Use inside TableToolbar.
|
|
8
|
+
*
|
|
9
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table#table-toolbar
|
|
10
|
+
*/
|
|
11
|
+
export declare const TableToolbarAddButton: typeof TableToolbarAddButtonInner;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=table-toolbar-add-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar-add-button.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-add-button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAK5E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,YAAY,CAAC,GAAG;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,QAAA,MAAM,0BAA0B,GAAI,OAAO,0BAA0B,4CAMpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAuC,OAAO,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as e } from "react";
|
|
3
|
+
import { useTableContext as l } from "./table-context.js";
|
|
4
|
+
import { translations as i } from "./translations.js";
|
|
5
|
+
import { IconButton as m } from "../icon-button/icon-button.js";
|
|
6
|
+
import { Icons as s } from "../icon/types.js";
|
|
7
|
+
const c = (o) => {
|
|
8
|
+
const t = l(), a = i[t.localeString], r = o["aria-label"] ?? a.new;
|
|
9
|
+
return /* @__PURE__ */ n(m, { "aria-label": r, icon: s.Increase, variant: "secondary", ...o });
|
|
10
|
+
}, I = e(c);
|
|
11
|
+
export {
|
|
12
|
+
I as TableToolbarAddButton
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputProps } from '../input/index.js';
|
|
2
|
+
export type TableToolbarSearchProps = InputProps;
|
|
3
|
+
declare const TableToolbarSearchInner: ({ ...props }: TableToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* Search input with icon for filtering table data. Use inside TableToolbar.
|
|
6
|
+
*
|
|
7
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table#table-toolbar
|
|
8
|
+
*/
|
|
9
|
+
export declare const TableToolbarSearch: typeof TableToolbarSearchInner;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=table-toolbar-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar-search.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-search.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAG5D,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAEjD,QAAA,MAAM,uBAAuB,GAAI,cAAc,uBAAuB,4CAWrE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAoC,OAAO,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as e } from "react";
|
|
3
|
+
import { Input as t } from "../input/input.js";
|
|
4
|
+
import { Icon as m } from "../icon/icon.js";
|
|
5
|
+
import { Icons as a } from "../icon/types.js";
|
|
6
|
+
const n = ({ ...r }) => /* @__PURE__ */ o(
|
|
7
|
+
t,
|
|
8
|
+
{
|
|
9
|
+
leftElement: /* @__PURE__ */ o(m, { icon: a.Search }),
|
|
10
|
+
size: "md",
|
|
11
|
+
type: "search",
|
|
12
|
+
w: { base: "100%", md: "170px" },
|
|
13
|
+
"data-testid": "filterInput",
|
|
14
|
+
...r
|
|
15
|
+
}
|
|
16
|
+
), l = e(n);
|
|
17
|
+
export {
|
|
18
|
+
l as TableToolbarSearch
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings menu for column visibility and breaking content. Use inside TableToolbar.
|
|
3
|
+
*
|
|
4
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table#column-visibility-and-how-to-store-it
|
|
5
|
+
*/
|
|
6
|
+
export declare const TableToolbarSettings: import('react').MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
//# sourceMappingURL=table-toolbar-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar-settings.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar-settings.tsx"],"names":[],"mappings":"AA8EA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,oFAAkC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as t, jsxs as r, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { Flex as p, Portal as C, Box as d } from "@chakra-ui/react";
|
|
3
|
+
import { memo as u, useCallback as a } from "react";
|
|
4
|
+
import { useTableContext as f } from "./table-context.js";
|
|
5
|
+
import { translations as k } from "./translations.js";
|
|
6
|
+
import { Menu as S } from "../menu/menu.js";
|
|
7
|
+
import { MenuButton as x } from "../menu/menu-button.js";
|
|
8
|
+
import { Icon as T } from "../icon/icon.js";
|
|
9
|
+
import { Icons as s } from "../icon/types.js";
|
|
10
|
+
import { MenuList as I } from "../menu/menu-list.js";
|
|
11
|
+
import { Text as M } from "../text/text.js";
|
|
12
|
+
import { MenuItem as m } from "../menu/menu-item.js";
|
|
13
|
+
import { Checkbox as B } from "../checkbox/checkbox.js";
|
|
14
|
+
import { MenuDivider as w } from "../menu/menu-divider.js";
|
|
15
|
+
import { Switch as y } from "../switch/switch.js";
|
|
16
|
+
import { ThemeIconSizeVariable as V, ThemeSpaceVariable as c, ThemeColorVariable as j } from "../../theme/theme-types.js";
|
|
17
|
+
const v = () => {
|
|
18
|
+
const e = f(), l = k[e.localeString], h = a(() => e.table.getAllColumns().length === Object.keys(e.breakingContentState).length && !Object.values(e.breakingContentState).includes(!1), [e.breakingContentState, e.table]), b = a(
|
|
19
|
+
(n) => {
|
|
20
|
+
const o = {};
|
|
21
|
+
e.table.getAllColumns().forEach((i) => {
|
|
22
|
+
o[i.id] = n.target.checked;
|
|
23
|
+
}), e.setBreakingContentState(o), e.onBreakingContentChange?.(o);
|
|
24
|
+
},
|
|
25
|
+
[e]
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ t(p, { children: /* @__PURE__ */ r(S, { closeOnSelect: !1, isLazy: !0, children: [
|
|
28
|
+
/* @__PURE__ */ t(x, { "aria-label": l.presets, variant: "ghost", p: "unset", w: "40px", h: "40px", children: /* @__PURE__ */ t(T, { icon: s.Sliders, size: V.Medium }) }),
|
|
29
|
+
/* @__PURE__ */ t(C, { children: /* @__PURE__ */ r(I, { children: [
|
|
30
|
+
/* @__PURE__ */ t(
|
|
31
|
+
M,
|
|
32
|
+
{
|
|
33
|
+
color: j.OnSurfaceSubdued,
|
|
34
|
+
py: c.Small,
|
|
35
|
+
px: c.Medium,
|
|
36
|
+
children: l.showColumns
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ t(d, { maxHeight: "320px", overflowY: "auto", children: e.table.getAllLeafColumns().filter((n) => n.getCanHide()).map((n) => /* @__PURE__ */ r(m, { itemType: "checkbox", leftIcon: s.GripMore, children: [
|
|
40
|
+
/* @__PURE__ */ t(g, { children: n.columnDef.header }),
|
|
41
|
+
/* @__PURE__ */ t(
|
|
42
|
+
B,
|
|
43
|
+
{
|
|
44
|
+
isChecked: n.getIsVisible(),
|
|
45
|
+
onChange: n.getToggleVisibilityHandler()
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] }, n.id)) }),
|
|
49
|
+
/* @__PURE__ */ t(w, {}),
|
|
50
|
+
/* @__PURE__ */ r(m, { itemType: "switch", children: [
|
|
51
|
+
l.breakingContent,
|
|
52
|
+
/* @__PURE__ */ t(y, { onChange: b, isChecked: h() })
|
|
53
|
+
] })
|
|
54
|
+
] }) })
|
|
55
|
+
] }) });
|
|
56
|
+
}, R = u(v);
|
|
57
|
+
export {
|
|
58
|
+
R as TableToolbarSettings
|
|
59
|
+
};
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import { MenuList } from '../menu/index.js';
|
|
2
1
|
import { ThemeStyleProps } from '../../theme/index.js';
|
|
3
|
-
import {
|
|
2
|
+
import { ReactNode } from 'react';
|
|
4
3
|
export type TableToolbarProps = {
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* Optional title for the header above the table
|
|
7
6
|
*/
|
|
8
|
-
|
|
7
|
+
title?: string;
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
9
|
+
* Toolbar subcomponents (TableToolbarSearch, TableToolbarSettings, TableToolbarActions, TableToolbarAddButton)
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* DefaultValue for the search input, e.g. if you have a persisted filter state you want to hydrate after refresh or routing.
|
|
15
|
-
*/
|
|
16
|
-
defaultValue?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Use this to add a new item. Optional.
|
|
19
|
-
*/
|
|
20
|
-
onAddNewItem?: () => void;
|
|
21
|
-
/**
|
|
22
|
-
* Use this to add a action menu. Needs a [MenuList](https://caspeco.github.io/casper-ui-library/components/menu/) to render correctly. Optional.
|
|
23
|
-
*/
|
|
24
|
-
actionMenu?: React.ReactElement<ComponentProps<typeof MenuList>, typeof MenuList>;
|
|
11
|
+
children?: ReactNode;
|
|
25
12
|
};
|
|
26
|
-
declare const TableToolbarInner: ({
|
|
13
|
+
declare const TableToolbarInner: ({ title, children, ...props }: TableToolbarProps & ThemeStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Composable toolbar for tables. Accepts title prop and renders subcomponents in a responsive layout.
|
|
16
|
+
*
|
|
17
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table#table-toolbar
|
|
18
|
+
*/
|
|
27
19
|
export declare const TableToolbar: typeof TableToolbarInner;
|
|
28
20
|
export {};
|
|
29
21
|
//# sourceMappingURL=table-toolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-toolbar.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-toolbar.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAKN,KAAK,eAAe,EACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOnF,MAAM,MAAM,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,iBAAiB,GAAI,+BAA+B,iBAAiB,GAAG,eAAe,4CAqF5F,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAA8B,OAAO,iBAAiB,CAAC"}
|
|
@@ -1,151 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMediaQuery as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { useTableContext as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
), s = l(
|
|
37
|
-
() => /* @__PURE__ */ e(
|
|
38
|
-
P,
|
|
39
|
-
{
|
|
40
|
-
leftElement: /* @__PURE__ */ e(I, { icon: c.Search }),
|
|
41
|
-
onChange: (n) => f?.(n),
|
|
42
|
-
defaultValue: C,
|
|
43
|
-
size: "md",
|
|
44
|
-
type: "search",
|
|
45
|
-
w: { base: "100%", md: "170px" },
|
|
46
|
-
"data-testid": "filterInput"
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
[f, C]
|
|
50
|
-
), m = l(
|
|
51
|
-
() => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ o(w, { closeOnSelect: !1, isLazy: !0, children: [
|
|
52
|
-
/* @__PURE__ */ e(Q, { "aria-label": r.presets, variant: "ghost", p: "unset", w: "40px", h: "40px", children: /* @__PURE__ */ e(I, { icon: c.Sliders, size: R.Medium }) }),
|
|
53
|
-
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ o(W, { children: [
|
|
54
|
-
/* @__PURE__ */ e(
|
|
55
|
-
B,
|
|
56
|
-
{
|
|
57
|
-
color: L.OnSurfaceSubdued,
|
|
58
|
-
py: i.Small,
|
|
59
|
-
px: i.Medium,
|
|
60
|
-
children: r.showColumns
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ e(x, { maxHeight: "320px", overflowY: "auto", children: t.table.getAllLeafColumns().filter((n) => n.getCanHide()).map((n) => /* @__PURE__ */ o(F, { itemType: "checkbox", leftIcon: c.GripMore, children: [
|
|
64
|
-
/* @__PURE__ */ e(A, { children: n.columnDef.header }),
|
|
65
|
-
/* @__PURE__ */ e(
|
|
66
|
-
X,
|
|
67
|
-
{
|
|
68
|
-
isChecked: n.getIsVisible(),
|
|
69
|
-
onChange: n.getToggleVisibilityHandler()
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
] }, n.id)) }),
|
|
73
|
-
/* @__PURE__ */ e(Y, {}),
|
|
74
|
-
/* @__PURE__ */ o(F, { itemType: "switch", children: [
|
|
75
|
-
r.breakingContent,
|
|
76
|
-
/* @__PURE__ */ e(q, { onChange: T, isChecked: S() })
|
|
77
|
-
] })
|
|
78
|
-
] }) })
|
|
79
|
-
] }) }),
|
|
80
|
-
[
|
|
81
|
-
S,
|
|
82
|
-
T,
|
|
83
|
-
t.table,
|
|
84
|
-
r.breakingContent,
|
|
85
|
-
r.presets,
|
|
86
|
-
r.showColumns
|
|
87
|
-
]
|
|
88
|
-
), d = l(
|
|
89
|
-
() => /* @__PURE__ */ e(
|
|
90
|
-
J,
|
|
91
|
-
{
|
|
92
|
-
"aria-label": r.new,
|
|
93
|
-
icon: c.Increase,
|
|
94
|
-
onClick: k,
|
|
95
|
-
variant: "secondary"
|
|
96
|
-
}
|
|
97
|
-
),
|
|
98
|
-
[k, r.new]
|
|
99
|
-
), h = l(() => p ? /* @__PURE__ */ o(w, { children: [
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
K,
|
|
102
|
-
{
|
|
103
|
-
icon: c.MoreVertical,
|
|
104
|
-
variant: "ghost",
|
|
105
|
-
size: "md",
|
|
106
|
-
"aria-label": r.toolbarActions
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
p
|
|
110
|
-
] }) : null, [p, r.toolbarActions]), u = l(
|
|
111
|
-
() => /* @__PURE__ */ e(
|
|
112
|
-
B,
|
|
113
|
-
{
|
|
114
|
-
fontSize: Z.X2Large,
|
|
115
|
-
color: L.OnBackgroundHeader,
|
|
116
|
-
fontWeight: "bold",
|
|
117
|
-
fontFamily: U.Header,
|
|
118
|
-
children: g
|
|
119
|
-
}
|
|
120
|
-
),
|
|
121
|
-
[g]
|
|
122
|
-
), V = y(
|
|
123
|
-
() => /* @__PURE__ */ e(a, { direction: "column", gap: i.Medium, mb: i.Medium, children: /* @__PURE__ */ o(a, { justifyContent: "space-between", alignItems: "center", children: [
|
|
124
|
-
u(),
|
|
125
|
-
/* @__PURE__ */ o(a, { gap: i.Medium, children: [
|
|
126
|
-
s(),
|
|
127
|
-
m(),
|
|
128
|
-
h(),
|
|
129
|
-
d()
|
|
1
|
+
import { jsx as s, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMediaQuery as M, Flex as o, Box as S } from "@chakra-ui/react";
|
|
3
|
+
import { memo as C, useMemo as l, Children as j } from "react";
|
|
4
|
+
import { useTableContext as B } from "./table-context.js";
|
|
5
|
+
import { TableToolbarActions as L } from "./table-toolbar-actions.js";
|
|
6
|
+
import { TableToolbarAddButton as w } from "./table-toolbar-add-button.js";
|
|
7
|
+
import { TableToolbarSearch as F } from "./table-toolbar-search.js";
|
|
8
|
+
import { TableToolbarSettings as V } from "./table-toolbar-settings.js";
|
|
9
|
+
import { Text as I } from "../text/text.js";
|
|
10
|
+
import { ThemeFontVariable as z, ThemeColorVariable as A, ThemeFontSizeVariable as H, ThemeSpaceVariable as r } from "../../theme/theme-types.js";
|
|
11
|
+
const k = ({ title: m, children: c, ...T }) => {
|
|
12
|
+
const d = B(), [h] = M("(min-width: 48em)"), g = d.id ? `${d.id}-toolbar` : void 0, e = l(() => {
|
|
13
|
+
let u = null, b = null, p = null, f = null;
|
|
14
|
+
return j.forEach(c, (a) => {
|
|
15
|
+
if (!a || typeof a != "object" || !("type" in a)) return;
|
|
16
|
+
const t = a;
|
|
17
|
+
t.type === F ? u = t : t.type === V ? b = t : t.type === L ? p = t : t.type === w && (f = t);
|
|
18
|
+
}), { search: u, settings: b, actions: p, addButton: f };
|
|
19
|
+
}, [c]), i = l(() => m ? /* @__PURE__ */ s(
|
|
20
|
+
I,
|
|
21
|
+
{
|
|
22
|
+
fontSize: H.X2Large,
|
|
23
|
+
color: A.OnBackgroundHeader,
|
|
24
|
+
fontWeight: "bold",
|
|
25
|
+
fontFamily: z.Header,
|
|
26
|
+
children: m
|
|
27
|
+
}
|
|
28
|
+
) : null, [m]), y = l(
|
|
29
|
+
() => /* @__PURE__ */ s(o, { direction: "column", gap: r.Medium, mb: r.Medium, children: /* @__PURE__ */ n(o, { justifyContent: "space-between", alignItems: "center", children: [
|
|
30
|
+
i,
|
|
31
|
+
/* @__PURE__ */ n(o, { gap: r.Medium, children: [
|
|
32
|
+
e.search,
|
|
33
|
+
e.settings,
|
|
34
|
+
e.actions,
|
|
35
|
+
e.addButton
|
|
130
36
|
] })
|
|
131
37
|
] }) }),
|
|
132
|
-
[
|
|
133
|
-
),
|
|
134
|
-
() => /* @__PURE__ */ o
|
|
135
|
-
/* @__PURE__ */ o
|
|
136
|
-
|
|
137
|
-
|
|
38
|
+
[i, e]
|
|
39
|
+
), x = l(
|
|
40
|
+
() => /* @__PURE__ */ n(o, { direction: "column", gap: r.Medium, mb: r.Medium, children: [
|
|
41
|
+
/* @__PURE__ */ n(o, { justifyContent: "space-between", children: [
|
|
42
|
+
i,
|
|
43
|
+
e.addButton
|
|
138
44
|
] }),
|
|
139
|
-
/* @__PURE__ */ o
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
45
|
+
/* @__PURE__ */ n(o, { justifyContent: "space-between", gap: r.Medium, children: [
|
|
46
|
+
e.search,
|
|
47
|
+
e.actions,
|
|
48
|
+
e.settings
|
|
143
49
|
] })
|
|
144
50
|
] }),
|
|
145
|
-
[
|
|
51
|
+
[i, e]
|
|
146
52
|
);
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
},
|
|
53
|
+
return /* @__PURE__ */ s(S, { id: g, ...T, children: h ? y : x });
|
|
54
|
+
}, J = C(k);
|
|
149
55
|
export {
|
|
150
|
-
|
|
56
|
+
J as TableToolbar
|
|
151
57
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar.spec.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table-toolbar.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.composition.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table.composition.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.composition.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AA8GH,eAAO,MAAM,UAAU,+CAoEtB,CAAC;AAEF,eAAO,MAAM,WAAW,+CAyDvB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAqBD,eAAO,MAAM,aAAa,+CAqEzB,CAAC;AAEF,eAAO,MAAM,sBAAsB,+CAmElC,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { TableData, TableProps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Provides context for table components. Wrap TableToolbar and TableContent with this component.
|
|
4
|
+
*
|
|
5
|
+
* @see Docs https://caspeco.github.io/casper-ui-library/components/table
|
|
6
|
+
*/
|
|
2
7
|
export declare function Table<TData extends TableData>({ columns, data, localeString, expandedState, initialExpandedState, initialBreakingContentState, initialColumnVisibilityState, columnVisibilityState, onColumnVisibilityChange, onExpandedChange, onBreakingContentChange, getRowId, getRowActions, id, customRowIndication, onSortingChange, initialSortingState, sortingState, onSelectionChange, initialSelectionState, selectionState, selectionActions, disableSelectionCheckbox, children, }: TableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
3
8
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,KAAK,CAAC,KAAK,SAAS,SAAS,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,oBAAyB,EACzB,2BAAgC,EAChC,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,QAAQ,EACR,aAAa,EACb,EAAE,EACF,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,wBAAwB,EACxB,QAAQ,GACR,EAAE,UAAU,CAAC,KAAK,CAAC,2CA8BnB"}
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../lib/components/table/table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,KAAK,SAAS,SAAS,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,aAAa,EACb,oBAAyB,EACzB,2BAAgC,EAChC,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,QAAQ,EACR,aAAa,EACb,EAAE,EACF,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,wBAAwB,EACxB,QAAQ,GACR,EAAE,UAAU,CAAC,KAAK,CAAC,2CA8BnB"}
|
|
@@ -2,9 +2,12 @@ import { CellContext, ColumnDef, ExpandedState, Row, RowData, RowSelectionState,
|
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { MenuList } from '../menu/index.js';
|
|
4
4
|
import { TableContentProps } from './table-content.js';
|
|
5
|
+
import { TableToolbarActionsProps } from './table-toolbar-actions.js';
|
|
6
|
+
import { TableToolbarAddButtonProps } from './table-toolbar-add-button.js';
|
|
5
7
|
import { TableToolbarProps } from './table-toolbar.js';
|
|
8
|
+
import { TableToolbarSearchProps } from './table-toolbar-search.js';
|
|
6
9
|
import { Locales } from './translations.js';
|
|
7
|
-
export type { CellContext, ColumnDef, ExpandedState, Row, RowSelectionState, TableContentProps, TableToolbarProps, VisibilityState, };
|
|
10
|
+
export type { CellContext, ColumnDef, ExpandedState, Row, RowSelectionState, TableContentProps, TableToolbarProps, TableToolbarSearchProps, TableToolbarActionsProps, TableToolbarAddButtonProps, VisibilityState, };
|
|
8
11
|
interface BaseRow<TData extends TableData> {
|
|
9
12
|
subRows?: TableRow<TData>[];
|
|
10
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/table/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,GAAG,EACH,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,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AAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAEvG,MAAM,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,OAAO,QAAQ,uBAAuB,CAAC;IACtC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QACjD,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB,WAAW,CAAC,EAAE,KAAK,CAAC;QAEpB,YAAY,CAAC,EAAE,MAAM,CAAC;KACtB;IACD,UAAU,SAAS,CAAC,KAAK,SAAS,OAAO;QACxC,KAAK,CAAC,EAAE,KAAK,CAAC;KACd;CACD"}
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { useColorMode as e, useDisclosure as t, useRadioGroup as m } from "@chak
|
|
|
2
2
|
import { isTouchScreenDevice as x } from "./theme/theme-helper.js";
|
|
3
3
|
import { ThemeColorModeScript as a, ThemeProvider as i } from "./theme/theme-provider.js";
|
|
4
4
|
import { ThemeProviderContext as l } from "./theme/theme-context.js";
|
|
5
|
-
import { ThemeBorderVariable as
|
|
6
|
-
import { Accordion as
|
|
5
|
+
import { ThemeBorderVariable as d, ThemeBreakPointVariable as b, ThemeColorVariable as u, ThemeFontSizeVariable as c, ThemeFontVariable as s, ThemeIconSizeVariable as h, ThemeRadiusVariable as g, ThemeShadowVariable as M, ThemeSpaceVariable as B } from "./theme/theme-types.js";
|
|
6
|
+
import { Accordion as C } from "./components/accordion/accordion.js";
|
|
7
7
|
import { AccordionItem as k } from "./components/accordion/accordion-item.js";
|
|
8
8
|
import { AccordionPanel as P } from "./components/accordion/accordion-panel.js";
|
|
9
9
|
import { Alert as V } from "./components/alert/alert.js";
|
|
10
|
-
import { Badge as
|
|
11
|
-
import { Box as
|
|
10
|
+
import { Badge as A } from "./components/badge/badge.js";
|
|
11
|
+
import { Box as R } from "./components/box/box.js";
|
|
12
12
|
import { Breadcrumbs as H } from "./components/breadcrumbs/breadcrumbs.js";
|
|
13
13
|
import { Button as N } from "./components/button/button.js";
|
|
14
14
|
import { Checkbox as z } from "./components/checkbox/checkbox.js";
|
|
@@ -25,16 +25,16 @@ import { FormErrorMessage as po } from "./components/form-control/form-error-mes
|
|
|
25
25
|
import { FormHelperText as fo } from "./components/form-control/form-helper-text.js";
|
|
26
26
|
import { FormLabel as io } from "./components/form-control/form-label.js";
|
|
27
27
|
import { Grid as lo } from "./components/grid/grid.js";
|
|
28
|
-
import { GridItem as
|
|
29
|
-
import { Heading as
|
|
28
|
+
import { GridItem as bo } from "./components/grid/grid-item.js";
|
|
29
|
+
import { Heading as co } from "./components/heading/heading.js";
|
|
30
30
|
import { Highlight as ho } from "./components/highlight/highlight.js";
|
|
31
31
|
import { Icon as Mo } from "./components/icon/icon.js";
|
|
32
|
-
import { Icons as
|
|
32
|
+
import { Icons as So } from "./components/icon/types.js";
|
|
33
33
|
import { IconButton as Io } from "./components/icon-button/icon-button.js";
|
|
34
34
|
import { Image as Lo } from "./components/image/image.js";
|
|
35
35
|
import { ImageUpload as Fo } from "./components/image-upload/image-upload.js";
|
|
36
36
|
import { ImageUploadAspectRatio as vo } from "./components/image-upload/types.js";
|
|
37
|
-
import { Input as
|
|
37
|
+
import { Input as Do } from "./components/input/input.js";
|
|
38
38
|
import { Link as Go } from "./components/link/link.js";
|
|
39
39
|
import { List as wo } from "./components/list/list.js";
|
|
40
40
|
import { ListItem as yo } from "./components/list/list-item.js";
|
|
@@ -51,17 +51,17 @@ import { Modal as mr } from "./components/modal/modal.js";
|
|
|
51
51
|
import { ModalBody as xr } from "./components/modal/modal-body.js";
|
|
52
52
|
import { ModalCloseButton as ar } from "./components/modal/modal-close-button.js";
|
|
53
53
|
import { ModalFooter as nr } from "./components/modal/modal-footer.js";
|
|
54
|
-
import { ModalHeader as
|
|
55
|
-
import { NavigationList as
|
|
56
|
-
import { NavigationListButton as
|
|
54
|
+
import { ModalHeader as Tr } from "./components/modal/modal-header.js";
|
|
55
|
+
import { NavigationList as br } from "./components/navigation-list/navigation-list.js";
|
|
56
|
+
import { NavigationListButton as cr, NavigationListLink as sr } from "./components/navigation-list/navigation-list-item.js";
|
|
57
57
|
import { Paginator as gr } from "./components/paginator/paginator.js";
|
|
58
58
|
import { QuantityButton as Br } from "./components/quantity-button/quantity-button.js";
|
|
59
|
-
import { Radio as
|
|
59
|
+
import { Radio as Cr } from "./components/radio/radio.js";
|
|
60
60
|
import { RadioAddon as kr } from "./components/radio/radio-addon.js";
|
|
61
61
|
import { RadioCard as Pr } from "./components/radio/radio-card.js";
|
|
62
62
|
import { RadioGroup as Vr } from "./components/radio-group/radio-group.js";
|
|
63
|
-
import { SegmentedControl as
|
|
64
|
-
import { Select as
|
|
63
|
+
import { SegmentedControl as Ar } from "./components/segmented-control/segmented-control.js";
|
|
64
|
+
import { Select as Rr } from "./components/select/select.js";
|
|
65
65
|
import { Skeleton as Hr } from "./components/skeleton/skeleton.js";
|
|
66
66
|
import { SkeletonText as Nr } from "./components/skeleton/skeleton-text.js";
|
|
67
67
|
import { Stack as zr } from "./components/stack/stack.js";
|
|
@@ -74,24 +74,28 @@ import { TableContent as Zr } from "./components/table/table-content.js";
|
|
|
74
74
|
import { useTableContext as $r } from "./components/table/table-context.js";
|
|
75
75
|
import { TableFilter as re } from "./components/table/table-filter.js";
|
|
76
76
|
import { TableToolbar as te } from "./components/table/table-toolbar.js";
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
77
|
+
import { TableToolbarSearch as pe } from "./components/table/table-toolbar-search.js";
|
|
78
|
+
import { TableToolbarSettings as fe } from "./components/table/table-toolbar-settings.js";
|
|
79
|
+
import { TableToolbarActions as ie } from "./components/table/table-toolbar-actions.js";
|
|
80
|
+
import { TableToolbarAddButton as le } from "./components/table/table-toolbar-add-button.js";
|
|
81
|
+
import { Tab as de } from "./components/tabs/tab.js";
|
|
82
|
+
import { TabList as ue } from "./components/tabs/tab-list.js";
|
|
83
|
+
import { TabPanel as se } from "./components/tabs/tab-panel.js";
|
|
84
|
+
import { TabPanels as ge } from "./components/tabs/tab-panels.js";
|
|
85
|
+
import { Tabs as Be } from "./components/tabs/tabs.js";
|
|
86
|
+
import { Tag as Ce } from "./components/tag/tag.js";
|
|
87
|
+
import { Text as ke } from "./components/text/text.js";
|
|
88
|
+
import { Textarea as Pe } from "./components/textarea/textarea.js";
|
|
89
|
+
import { useToast as Ve } from "./components/toast/toast.js";
|
|
90
|
+
import { ToggleButton as Ae } from "./components/toggle-button/toggle-button.js";
|
|
91
|
+
import { Tooltip as Re } from "./components/tooltip/tooltip.js";
|
|
88
92
|
export {
|
|
89
|
-
|
|
93
|
+
C as Accordion,
|
|
90
94
|
k as AccordionItem,
|
|
91
95
|
P as AccordionPanel,
|
|
92
96
|
V as Alert,
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
A as Badge,
|
|
98
|
+
R as Box,
|
|
95
99
|
H as Breadcrumbs,
|
|
96
100
|
N as Button,
|
|
97
101
|
z as Checkbox,
|
|
@@ -109,16 +113,16 @@ export {
|
|
|
109
113
|
fo as FormHelperText,
|
|
110
114
|
io as FormLabel,
|
|
111
115
|
lo as Grid,
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
bo as GridItem,
|
|
117
|
+
co as Heading,
|
|
114
118
|
ho as Highlight,
|
|
115
119
|
Mo as Icon,
|
|
116
120
|
Io as IconButton,
|
|
117
|
-
|
|
121
|
+
So as Icons,
|
|
118
122
|
Lo as Image,
|
|
119
123
|
Fo as ImageUpload,
|
|
120
124
|
vo as ImageUploadAspectRatio,
|
|
121
|
-
|
|
125
|
+
Do as Input,
|
|
122
126
|
Go as Link,
|
|
123
127
|
wo as List,
|
|
124
128
|
yo as ListItem,
|
|
@@ -135,54 +139,58 @@ export {
|
|
|
135
139
|
xr as ModalBody,
|
|
136
140
|
ar as ModalCloseButton,
|
|
137
141
|
nr as ModalFooter,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
Tr as ModalHeader,
|
|
143
|
+
br as NavigationList,
|
|
144
|
+
cr as NavigationListButton,
|
|
145
|
+
sr as NavigationListLink,
|
|
142
146
|
gr as Paginator,
|
|
143
147
|
Br as QuantityButton,
|
|
144
|
-
|
|
148
|
+
Cr as Radio,
|
|
145
149
|
kr as RadioAddon,
|
|
146
150
|
Pr as RadioCard,
|
|
147
151
|
Vr as RadioGroup,
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
Ar as SegmentedControl,
|
|
153
|
+
Rr as Select,
|
|
150
154
|
Hr as Skeleton,
|
|
151
155
|
Nr as SkeletonText,
|
|
152
156
|
zr as Stack,
|
|
153
157
|
Er as StepContext,
|
|
154
158
|
Wr as Stepper,
|
|
155
159
|
qr as Switch,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
de as Tab,
|
|
161
|
+
ue as TabList,
|
|
162
|
+
se as TabPanel,
|
|
163
|
+
ge as TabPanels,
|
|
160
164
|
Xr as Table,
|
|
161
165
|
Zr as TableContent,
|
|
162
166
|
re as TableFilter,
|
|
163
167
|
te as TableToolbar,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
ie as TableToolbarActions,
|
|
169
|
+
le as TableToolbarAddButton,
|
|
170
|
+
pe as TableToolbarSearch,
|
|
171
|
+
fe as TableToolbarSettings,
|
|
172
|
+
Be as Tabs,
|
|
173
|
+
Ce as Tag,
|
|
174
|
+
ke as Text,
|
|
175
|
+
Pe as Textarea,
|
|
176
|
+
d as ThemeBorderVariable,
|
|
177
|
+
b as ThemeBreakPointVariable,
|
|
178
|
+
u as ThemeColorVariable,
|
|
179
|
+
c as ThemeFontSizeVariable,
|
|
180
|
+
s as ThemeFontVariable,
|
|
173
181
|
h as ThemeIconSizeVariable,
|
|
174
182
|
i as ThemeProvider,
|
|
175
183
|
l as ThemeProviderContext,
|
|
176
184
|
g as ThemeRadiusVariable,
|
|
177
185
|
M as ThemeShadowVariable,
|
|
178
186
|
B as ThemeSpaceVariable,
|
|
179
|
-
|
|
180
|
-
|
|
187
|
+
Ae as ToggleButton,
|
|
188
|
+
Re as Tooltip,
|
|
181
189
|
Kr as createColumnHelper,
|
|
182
190
|
x as isTouchScreenDevice,
|
|
183
191
|
e as useColorMode,
|
|
184
192
|
t as useDisclosure,
|
|
185
193
|
m as useRadioGroup,
|
|
186
194
|
$r as useTableContext,
|
|
187
|
-
|
|
195
|
+
Ve as useToast
|
|
188
196
|
};
|