@divayth/brick-ui 0.3.1 → 0.4.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/app/Provider.d.ts +15 -3
- package/dist/app/Provider.d.ts.map +1 -1
- package/dist/app/Provider.js +11 -11
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -81
- package/dist/lib/dates.d.ts +3 -3
- package/dist/lib/dates.d.ts.map +1 -1
- package/dist/lib/index.d.ts +5 -5
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/locale.d.ts +13 -1
- package/dist/lib/locale.d.ts.map +1 -1
- package/dist/lib/locale.js +14 -2
- package/dist/lib/sizes.d.ts +1 -1
- package/dist/lib/themes.d.ts +31 -31
- package/dist/lib/themes.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui/Accordion/Accordion.d.ts +2 -2
- package/dist/ui/Accordion/Accordion.d.ts.map +1 -1
- package/dist/ui/Alert/Alert.d.ts +2 -2
- package/dist/ui/Alert/Alert.d.ts.map +1 -1
- package/dist/ui/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/ui/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/ui/Button/Button.d.ts +8 -8
- package/dist/ui/Button/Button.d.ts.map +1 -1
- package/dist/ui/Card/Card.d.ts.map +1 -1
- package/dist/ui/Checkbox/Checkbox.d.ts +2 -2
- package/dist/ui/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/ui/Chip/Chip.d.ts +5 -5
- package/dist/ui/Chip/Chip.d.ts.map +1 -1
- package/dist/ui/CircularLoading/CircularLoading.d.ts.map +1 -1
- package/dist/ui/Date/DateInput.d.ts +6 -6
- package/dist/ui/Date/DateInput.d.ts.map +1 -1
- package/dist/ui/Date/DateInput.js +15 -15
- package/dist/ui/DateText/DateText.d.ts +2 -2
- package/dist/ui/DateText/DateText.d.ts.map +1 -1
- package/dist/ui/DateText/DateText.js +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +3 -3
- package/dist/ui/FeedList/FeedList.d.ts +3 -3
- package/dist/ui/FeedList/FeedList.d.ts.map +1 -1
- package/dist/ui/Field/Field.d.ts +10 -10
- package/dist/ui/Field/Field.d.ts.map +1 -1
- package/dist/ui/Flex/Flex.d.ts +3 -3
- package/dist/ui/Flex/Flex.d.ts.map +1 -1
- package/dist/ui/Flex/constants.d.ts +1 -1
- package/dist/ui/Flex/constants.d.ts.map +1 -1
- package/dist/ui/Grid/Grid.d.ts +1 -1
- package/dist/ui/Grid/Grid.types.d.ts +9 -9
- package/dist/ui/Grid/Grid.types.d.ts.map +1 -1
- package/dist/ui/Grid/GridItem.d.ts +1 -1
- package/dist/ui/Grid/GridItem.d.ts.map +1 -1
- package/dist/ui/Grid/GridRoot.d.ts +1 -1
- package/dist/ui/Grid/GridRoot.js +1 -1
- package/dist/ui/Grid/utils.d.ts +2 -2
- package/dist/ui/Grid/utils.d.ts.map +1 -1
- package/dist/ui/IconButton/IconButton.d.ts +8 -8
- package/dist/ui/IconButton/IconButton.d.ts.map +1 -1
- package/dist/ui/Input/Input.d.ts +4 -4
- package/dist/ui/Input/Input.d.ts.map +1 -1
- package/dist/ui/List/List.d.ts +7 -7
- package/dist/ui/List/List.d.ts.map +1 -1
- package/dist/ui/List/List.js +5 -5
- package/dist/ui/Modal/Modal.d.ts +4 -4
- package/dist/ui/Modal/Modal.d.ts.map +1 -1
- package/dist/ui/Modal/Modal.js +19 -19
- package/dist/ui/Modal/ModalContext.d.ts +1 -1
- package/dist/ui/Modal/ModalContext.js +2 -2
- package/dist/ui/Modal/ModalProvider.d.ts +1 -1
- package/dist/ui/MultipleChip/MultipleChip.d.ts +2 -2
- package/dist/ui/MultipleChip/MultipleChip.d.ts.map +1 -1
- package/dist/ui/MultipleChip/MultipleChip.js +8 -8
- package/dist/ui/NoData/NoData.d.ts +3 -3
- package/dist/ui/NoData/NoData.d.ts.map +1 -1
- package/dist/ui/NoData/NoData.js +4 -4
- package/dist/ui/NoData/NoDataIcon.d.ts +1 -1
- package/dist/ui/Popover/Popover.d.ts +4 -4
- package/dist/ui/Popover/Popover.d.ts.map +1 -1
- package/dist/ui/Portal/Portal.d.ts +1 -1
- package/dist/ui/Select/Select.d.ts +2 -2
- package/dist/ui/Select/Select.d.ts.map +1 -1
- package/dist/ui/Select/Select.types.d.ts +5 -5
- package/dist/ui/Select/Select.types.d.ts.map +1 -1
- package/dist/ui/Select/SelectControl.d.ts +1 -1
- package/dist/ui/Select/SelectControl.d.ts.map +1 -1
- package/dist/ui/Select/SelectControl.js +8 -8
- package/dist/ui/Select/SelectOption.d.ts +1 -1
- package/dist/ui/Select/SelectOption.d.ts.map +1 -1
- package/dist/ui/Select/SelectOption.js +6 -6
- package/dist/ui/Select/SelectOptions.d.ts +1 -1
- package/dist/ui/Select/SelectOptions.d.ts.map +1 -1
- package/dist/ui/Select/SelectSearch.d.ts +1 -1
- package/dist/ui/Select/SelectSearch.d.ts.map +1 -1
- package/dist/ui/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/ui/Sticky/Sticky.d.ts +1 -1
- package/dist/ui/Sticky/Sticky.d.ts.map +1 -1
- package/dist/ui/Tabs/Tab.d.ts +3 -3
- package/dist/ui/Tabs/Tab.d.ts.map +1 -1
- package/dist/ui/Tabs/Tabs.d.ts +4 -4
- package/dist/ui/Tabs/Tabs.d.ts.map +1 -1
- package/dist/ui/Tabs/Tabs.js +3 -3
- package/dist/ui/Tabs/TabsList.d.ts +1 -1
- package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
- package/dist/ui/Tabs/TabsPanel.d.ts +2 -2
- package/dist/ui/Tabs/TabsPanel.d.ts.map +1 -1
- package/dist/ui/Tabs/context.d.ts +1 -1
- package/dist/ui/Text/Text.d.ts +6 -6
- package/dist/ui/Text/Text.d.ts.map +1 -1
- package/dist/ui/Textarea/Textarea.d.ts +3 -3
- package/dist/ui/Textarea/Textarea.d.ts.map +1 -1
- package/dist/ui/Tooltip/Tooltip.d.ts +3 -3
- package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/ui/Tooltip/Tooltip.js +4 -4
- package/dist/ui/index.d.ts +36 -34
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/table/Table.context.d.ts +10 -0
- package/dist/ui/table/Table.context.d.ts.map +1 -0
- package/dist/ui/table/Table.context.js +26 -0
- package/dist/ui/table/Table.d.ts +3 -0
- package/dist/ui/table/Table.d.ts.map +1 -0
- package/dist/ui/table/Table.js +17 -0
- package/dist/ui/table/Table.types.d.ts +76 -0
- package/dist/ui/table/Table.types.d.ts.map +1 -0
- package/dist/ui/table/Table.types.js +4 -0
- package/dist/ui/table/components/content/TableContent.d.ts +9 -0
- package/dist/ui/table/components/content/TableContent.d.ts.map +1 -0
- package/dist/ui/table/components/content/TableContent.js +67 -0
- package/dist/ui/table/components/content/TableContent.module.css.js +9 -0
- package/dist/ui/table/components/content/cell/Cell.d.ts +7 -0
- package/dist/ui/table/components/content/cell/Cell.d.ts.map +1 -0
- package/dist/ui/table/components/content/cell/Cell.js +29 -0
- package/dist/ui/table/components/content/cell/Cell.module.css.js +11 -0
- package/dist/ui/table/components/content/cellcheckbox/CellCheckbox.d.ts +8 -0
- package/dist/ui/table/components/content/cellcheckbox/CellCheckbox.d.ts.map +1 -0
- package/dist/ui/table/components/content/cellcheckbox/CellCheckbox.js +26 -0
- package/dist/ui/table/components/content/datarow/DataRow.d.ts +11 -0
- package/dist/ui/table/components/content/datarow/DataRow.d.ts.map +1 -0
- package/dist/ui/table/components/content/datarow/DataRow.js +23 -0
- package/dist/ui/table/components/content/head/TableHead.d.ts +6 -0
- package/dist/ui/table/components/content/head/TableHead.d.ts.map +1 -0
- package/dist/ui/table/components/content/head/TableHead.js +7 -0
- package/dist/ui/table/components/content/head/TableHead.module.css.js +9 -0
- package/dist/ui/table/components/content/headercell/HeaderCell.d.ts +8 -0
- package/dist/ui/table/components/content/headercell/HeaderCell.d.ts.map +1 -0
- package/dist/ui/table/components/content/headercell/HeaderCell.js +51 -0
- package/dist/ui/table/components/content/headercell/HeaderCell.module.css.js +15 -0
- package/dist/ui/table/components/content/headercellcheckbox/HeaderCellCheckbox.d.ts +8 -0
- package/dist/ui/table/components/content/headercellcheckbox/HeaderCellCheckbox.d.ts.map +1 -0
- package/dist/ui/table/components/content/headercellcheckbox/HeaderCellCheckbox.js +29 -0
- package/dist/ui/table/components/content/tablebody/TableBody.d.ts +7 -0
- package/dist/ui/table/components/content/tablebody/TableBody.d.ts.map +1 -0
- package/dist/ui/table/components/content/tablebody/TableBody.js +28 -0
- package/dist/ui/table/components/pagination/TablePagination.d.ts +6 -0
- package/dist/ui/table/components/pagination/TablePagination.d.ts.map +1 -0
- package/dist/ui/table/components/pagination/TablePagination.js +73 -0
- package/dist/ui/table/components/root/TableRoot.d.ts +7 -0
- package/dist/ui/table/components/root/TableRoot.d.ts.map +1 -0
- package/dist/ui/table/components/root/TableRoot.js +28 -0
- package/dist/ui/table/components/root/TableRoot.module.css.js +9 -0
- package/dist/ui/table/hooks/useSelected.d.ts +2 -0
- package/dist/ui/table/hooks/useSelected.d.ts.map +1 -0
- package/dist/ui/table/hooks/useSelected.js +6 -0
- package/dist/ui/table/index.d.ts +5 -0
- package/dist/ui/table/index.d.ts.map +1 -0
- package/package.json +18 -5
|
@@ -4,12 +4,12 @@ import { useId as G, useRef as H, useState as k } from "react";
|
|
|
4
4
|
import { clsx as A } from "clsx";
|
|
5
5
|
import { ChevronDown as J, X as K } from "lucide-react";
|
|
6
6
|
import { useProvider as M } from "../../app/Provider.js";
|
|
7
|
-
import { SelectSearch as Q } from "./SelectSearch.js";
|
|
8
|
-
import { SelectOptions as U } from "./SelectOptions.js";
|
|
9
7
|
import { Field as v } from "../Field/Field.js";
|
|
10
|
-
import { Flex as
|
|
11
|
-
import { IconButton as
|
|
8
|
+
import { Flex as Q } from "../Flex/Flex.js";
|
|
9
|
+
import { IconButton as U } from "../IconButton/IconButton.js";
|
|
12
10
|
import { Popover as R } from "../Popover/Popover.js";
|
|
11
|
+
import { SelectOptions as V } from "./SelectOptions.js";
|
|
12
|
+
import { SelectSearch as W } from "./SelectSearch.js";
|
|
13
13
|
import r from "./Select.module.css.js";
|
|
14
14
|
const Y = { sm: 16, md: 20, lg: 24 }, z = { sm: "xs", md: "sm", lg: "md" }, de = ({
|
|
15
15
|
value: l,
|
|
@@ -59,7 +59,7 @@ const Y = { sm: 16, md: 20, lg: 24 }, z = { sm: "xs", md: "sm", lg: "md" }, de =
|
|
|
59
59
|
return /* @__PURE__ */ o(R.Root, { open: s && !c, onOpenChange: d, children: /* @__PURE__ */ N(v.Root, { className: B, children: [
|
|
60
60
|
h && /* @__PURE__ */ o(v.Label, { htmlFor: a, label: h }),
|
|
61
61
|
/* @__PURE__ */ o(v.Control, { size: g, children: /* @__PURE__ */ o(R.Anchor, { children: /* @__PURE__ */ N(
|
|
62
|
-
|
|
62
|
+
Q,
|
|
63
63
|
{
|
|
64
64
|
ref: y,
|
|
65
65
|
gap: "sm",
|
|
@@ -71,7 +71,7 @@ const Y = { sm: 16, md: 20, lg: 24 }, z = { sm: "xs", md: "sm", lg: "md" }, de =
|
|
|
71
71
|
}),
|
|
72
72
|
children: [
|
|
73
73
|
x ? /* @__PURE__ */ o(
|
|
74
|
-
|
|
74
|
+
W,
|
|
75
75
|
{
|
|
76
76
|
size: g,
|
|
77
77
|
value: s ? b : F,
|
|
@@ -109,7 +109,7 @@ const Y = { sm: 16, md: 20, lg: 24 }, z = { sm: "xs", md: "sm", lg: "md" }, de =
|
|
|
109
109
|
)
|
|
110
110
|
] }) }),
|
|
111
111
|
S && (x || t.length > 0) && /* @__PURE__ */ o(
|
|
112
|
-
|
|
112
|
+
U,
|
|
113
113
|
{
|
|
114
114
|
size: z[g],
|
|
115
115
|
color: "secondary",
|
|
@@ -124,7 +124,7 @@ const Y = { sm: 16, md: 20, lg: 24 }, z = { sm: "xs", md: "sm", lg: "md" }, de =
|
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ o(
|
|
127
|
-
|
|
127
|
+
V,
|
|
128
128
|
{
|
|
129
129
|
id: `${a}-options`,
|
|
130
130
|
"aria-label": h ?? p,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SelectOptionProps, SelectValue } from
|
|
1
|
+
import type { SelectOptionProps, SelectValue } from './Select.types.js';
|
|
2
2
|
export declare const SelectOption: <T extends SelectValue>({ item, checked, multiple, onSelect, }: SelectOptionProps<T>) => import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=SelectOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectOption.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectOption.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIxE,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,WAAW,EAAE,wCAKjD,iBAAiB,CAAC,CAAC,CAAC,gCAoBtB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s, jsxs as e } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import c from "
|
|
3
|
+
import i from "clsx";
|
|
4
|
+
import { Checkbox as p } from "../Checkbox/Checkbox.js";
|
|
5
|
+
import { Flex as c } from "../Flex/Flex.js";
|
|
6
6
|
import a from "./SelectOption.module.css.js";
|
|
7
7
|
const g = ({
|
|
8
8
|
item: o,
|
|
@@ -15,10 +15,10 @@ const g = ({
|
|
|
15
15
|
role: "option",
|
|
16
16
|
"aria-selected": r,
|
|
17
17
|
type: n ? void 0 : "button",
|
|
18
|
-
className:
|
|
18
|
+
className: i(a.option, r && a.active),
|
|
19
19
|
onClick: n ? void 0 : () => t(o),
|
|
20
|
-
children: /* @__PURE__ */ e(
|
|
21
|
-
n && /* @__PURE__ */ s(
|
|
20
|
+
children: /* @__PURE__ */ e(c, { alignItems: "center", gap: "sm", children: [
|
|
21
|
+
n && /* @__PURE__ */ s(p, { checked: r, onChange: () => t(o) }),
|
|
22
22
|
o.icon,
|
|
23
23
|
o.label ?? String(o.value ?? "")
|
|
24
24
|
] })
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SelectOptionsProps, SelectValue } from
|
|
1
|
+
import type { SelectOptionsProps, SelectValue } from './Select.types.js';
|
|
2
2
|
export declare const SelectOptions: <T extends SelectValue>({ options, values, search, filterOptions, isLoading, multiple, searchable, anchorRef, onSelect, ...props }: SelectOptionsProps<T>) => import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=SelectOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOptions.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectOptions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectOptions.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectOptions.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKzE,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,EAAE,4GAWlD,kBAAkB,CAAC,CAAC,CAAC,gCA2DvB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SelectSearchProps } from
|
|
1
|
+
import type { SelectSearchProps } from './Select.types.js';
|
|
2
2
|
export declare const SelectSearch: ({ id, open, displayValue, className, ...props }: SelectSearchProps) => import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=SelectSearch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectSearch.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectSearch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectSearch.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/SelectSearch.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,eAAO,MAAM,YAAY,GAAI,iDAM1B,iBAAiB,gCA4BnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/ui/Skeleton/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/ui/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,GAAI,6CAKtB,aAAa,gCAcf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sticky.d.ts","sourceRoot":"","sources":["../../../src/ui/Sticky/Sticky.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Sticky.d.ts","sourceRoot":"","sources":["../../../src/ui/Sticky/Sticky.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,GAAI,4EAUpB,WAAW,gCAUb,CAAC"}
|
package/dist/ui/Tabs/Tab.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ComponentProps } from
|
|
2
|
-
export interface TabProps extends Omit<ComponentProps<
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface TabProps extends Omit<ComponentProps<'button'>, 'value'> {
|
|
3
3
|
value: string;
|
|
4
|
-
color?:
|
|
4
|
+
color?: 'primary' | 'secondary';
|
|
5
5
|
}
|
|
6
6
|
export declare const Tab: ({ value, color, children, className, onClick, ...props }: TabProps) => import("react").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=Tab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/Tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/Tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAO5C,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACjC;AAED,eAAO,MAAM,GAAG,GAAI,0DAOjB,QAAQ,gCAyBV,CAAC"}
|
package/dist/ui/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { type
|
|
3
|
-
export { type
|
|
4
|
-
export { type TabsPanelProps } from
|
|
1
|
+
export { type TabsRootProps, useTabs } from './context.js';
|
|
2
|
+
export { type TabProps } from './Tab.js';
|
|
3
|
+
export { type TabsListProps } from './TabsList.js';
|
|
4
|
+
export { type TabsPanelProps } from './TabsPanel.js';
|
|
5
5
|
export declare const Tabs: {
|
|
6
6
|
Root: ({ children, defaultValue, value, onChange, }: import("./context.js").TabsRootProps) => import("react").JSX.Element;
|
|
7
7
|
List: ({ children, direction, className, ...props }: import("./TabsList.js").TabsListProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/Tabs.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/Tabs.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,eAAO,MAAM,IAAI;;;;;CAA4D,CAAC"}
|
package/dist/ui/Tabs/Tabs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { TabsRoot as o } from "./context.js";
|
|
3
3
|
import { useTabs as f } from "./context.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Tab as r } from "./Tab.js";
|
|
5
|
+
import { TabsList as t } from "./TabsList.js";
|
|
6
6
|
import { TabsPanel as m } from "./TabsPanel.js";
|
|
7
|
-
const p = { Root: o, List:
|
|
7
|
+
const p = { Root: o, List: t, Tab: r, Panel: m };
|
|
8
8
|
export {
|
|
9
9
|
p as Tabs,
|
|
10
10
|
f as useTabs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FlexProps } from
|
|
1
|
+
import { type FlexProps } from '../Flex/Flex.js';
|
|
2
2
|
export type TabsListProps = FlexProps;
|
|
3
3
|
export declare const TabsList: ({ children, direction, className, ...props }: TabsListProps) => import("react").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=TabsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/TabsList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/TabsList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ,GAAI,8CAKtB,aAAa,gCAef,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps } from
|
|
2
|
-
export interface TabsPanelProps extends ComponentProps<
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export interface TabsPanelProps extends ComponentProps<'div'> {
|
|
3
3
|
value: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const TabsPanel: ({ value, children, ...props }: TabsPanelProps) => import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsPanel.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/TabsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TabsPanel.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/TabsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,SAAS,GAAI,+BAA+B,cAAc,uCAStE,CAAC"}
|
package/dist/ui/Text/Text.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps } from
|
|
2
|
-
import { type ResponsiveSize } from
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { type ResponsiveSize } from '../../lib/getResponsiveSize.js';
|
|
3
3
|
declare const WEIGHTS_MAP: {
|
|
4
4
|
readonly thin: "font-thin";
|
|
5
5
|
readonly extralight: "font-extralight";
|
|
@@ -17,13 +17,13 @@ declare const FONT_SIZES: {
|
|
|
17
17
|
readonly md: "text-base";
|
|
18
18
|
readonly lg: "text-lg";
|
|
19
19
|
readonly xl: "text-xl";
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
20
|
+
readonly '2xl': "text-2xl";
|
|
21
|
+
readonly '3xl': "text-3xl";
|
|
22
|
+
readonly '4xl': "text-4xl";
|
|
23
23
|
readonly inherit: "";
|
|
24
24
|
};
|
|
25
25
|
type TextSize = keyof typeof FONT_SIZES;
|
|
26
|
-
export interface TextProps extends ComponentProps<
|
|
26
|
+
export interface TextProps extends ComponentProps<'span'> {
|
|
27
27
|
size?: ResponsiveSize<TextSize>;
|
|
28
28
|
weight?: keyof typeof WEIGHTS_MAP;
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/ui/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/ui/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAEnC,QAAA,MAAM,WAAW;;;;;;;;;;CAUP,CAAC;AAEX,QAAA,MAAM,UAAU;;;;;;;;;;CAUN,CAAC;AAEX,KAAK,QAAQ,GAAG,MAAM,OAAO,UAAU,CAAC;AAExC,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,MAAM,CAAC;IACvD,IAAI,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;CACnC;AAED,eAAO,MAAM,IAAI,GAAI,iDAMlB,SAAS,gCAgBX,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ComponentProps } from
|
|
2
|
-
import type { InputControlProps } from
|
|
3
|
-
export type TextareaProps = InputControlProps & Omit<ComponentProps<
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import type { InputControlProps } from '../Input/Input.js';
|
|
3
|
+
export type TextareaProps = InputControlProps & Omit<ComponentProps<'textarea'>, 'size'> & {
|
|
4
4
|
minRows?: number;
|
|
5
5
|
maxRows?: number;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/ui/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/ui/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAkC,MAAM,OAAO,CAAC;AAM5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,MAAM,MAAM,aAAa,GAAG,iBAAiB,GACzC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,GAAG;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAqBJ,eAAO,MAAM,QAAQ,GAAI,kKAiBtB,aAAa,gCAqDf,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ComponentProps, type PropsWithChildren } from
|
|
2
|
-
import { Tooltip as Primitive } from
|
|
3
|
-
type Side = NonNullable<ComponentProps<typeof Primitive.Content>[
|
|
1
|
+
import { type ComponentProps, type PropsWithChildren } from 'react';
|
|
2
|
+
import { Tooltip as Primitive } from 'radix-ui';
|
|
3
|
+
type Side = NonNullable<ComponentProps<typeof Primitive.Content>['side']>;
|
|
4
4
|
type Placement = Side | `${Side}-start` | `${Side}-end`;
|
|
5
5
|
export interface TooltipRootProps extends PropsWithChildren {
|
|
6
6
|
placement?: Placement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/ui/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/ui/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAOhD,KAAK,IAAI,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1E,KAAK,SAAS,GAAG,IAAI,GAAG,GAAG,IAAI,QAAQ,GAAG,GAAG,IAAI,MAAM,CAAC;AAExD,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAmCD,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;AAS3E,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;AAmC3E,eAAO,MAAM,OAAO;sDAhEjB,gBAAgB;iCAsBiB,mBAAmB;+EAepD,mBAAmB;CA2B2B,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
3
|
-
import { useContext as d, useState as p, useMemo as
|
|
4
|
-
import { Tooltip as s } from "radix-ui";
|
|
3
|
+
import { createContext as u, useContext as d, useState as p, useMemo as h } from "react";
|
|
5
4
|
import { useComposedRefs as C } from "@radix-ui/react-compose-refs";
|
|
5
|
+
import { Tooltip as s } from "radix-ui";
|
|
6
6
|
import { twMerge as T } from "tailwind-merge";
|
|
7
7
|
import { Portal as x } from "../Portal/Portal.js";
|
|
8
8
|
import R from "./Tooltip.module.css.js";
|
|
9
|
-
const m =
|
|
9
|
+
const m = u({}), v = ({
|
|
10
10
|
children: t,
|
|
11
11
|
placement: e = "top",
|
|
12
12
|
delay: r = 250,
|
|
13
13
|
disabled: n = !1
|
|
14
14
|
}) => {
|
|
15
|
-
const [c, l] = p(!1), [i, a] = p(null), g =
|
|
15
|
+
const [c, l] = p(!1), [i, a] = p(null), g = h(
|
|
16
16
|
() => ({ placement: e, trigger: i, setTrigger: a }),
|
|
17
17
|
[e, i]
|
|
18
18
|
);
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
1
|
+
export { Accordion, type AccordionProps } from './Accordion/Accordion.js';
|
|
2
|
+
export { Alert, type AlertProps } from './Alert/Alert.js';
|
|
3
|
+
export { Autocomplete, type AutocompleteProps, } from './Autocomplete/Autocomplete.js';
|
|
4
|
+
export { Button, type ButtonProps } from './Button/Button.js';
|
|
5
|
+
export { Card, type CardProps } from './Card/Card.js';
|
|
6
|
+
export { Checkbox, type CheckboxProps } from './Checkbox/Checkbox.js';
|
|
7
|
+
export { Chip, type ChipColor, type ChipProps, type ChipVariant, } from './Chip/Chip.js';
|
|
8
|
+
export { CircularLoading, type CircularLoadingProps, } from './CircularLoading/CircularLoading.js';
|
|
9
|
+
export { DateInput, type DateInputProps } from './Date/DateInput.js';
|
|
10
|
+
export { type DateProps, DateText } from './DateText/DateText.js';
|
|
11
|
+
export { Drawer, type DrawerPosition, type DrawerProps, type DrawerSize, } from './Drawer/Drawer.js';
|
|
12
|
+
export { FeedList, type FeedListProps } from './FeedList/FeedList.js';
|
|
13
|
+
export { type ControlSize, Field, type FieldControlProps, type FieldErrorProps, type FieldIconProps, type FieldLabelProps, } from './Field/Field.js';
|
|
14
|
+
export { Flex, type FlexProps } from './Flex/Flex.js';
|
|
15
|
+
export { Grid, type GridGap, type GridItemProps, type GridItemSize, type GridRootProps, type ResponsiveValue, } from './Grid/Grid.js';
|
|
16
|
+
export { IconButton, type IconButtonColor, type IconButtonProps, type IconButtonVariant, } from './IconButton/IconButton.js';
|
|
17
|
+
export { Input, type InputControlProps, type InputProps, } from './Input/Input.js';
|
|
18
|
+
export { List, type ListItemProps, type ListProps } from './List/List.js';
|
|
19
|
+
export { Modal, MODAL_SIZE, type ModalRootProps, type ModalSize, } from './Modal/Modal.js';
|
|
20
|
+
export { type ModalActions, useModal } from './Modal/ModalContext.js';
|
|
21
|
+
export { ModalProvider } from './Modal/ModalProvider.js';
|
|
22
|
+
export { MultipleChip, type MultipleChipOption, type MultipleChipProps, } from './MultipleChip/MultipleChip.js';
|
|
23
|
+
export { NoData, type NoDataProps } from './NoData/NoData.js';
|
|
24
|
+
export { Popover, type PopoverContentProps, type PopoverRootProps, type PopoverTriggerProps, } from './Popover/Popover.js';
|
|
25
|
+
export { Portal, type PortalProps } from './Portal/Portal.js';
|
|
26
|
+
export { ProgressBar, type ProgressBarProps, } from './ProgressBar/ProgressBar.js';
|
|
27
|
+
export { Select } from './Select/Select.js';
|
|
28
|
+
export { type SelectCommonProps, type SelectControlProps, type SelectOption, type SelectProps, type SelectValue, } from './Select/Select.types.js';
|
|
29
|
+
export { Skeleton, type SkeletonProps } from './Skeleton/Skeleton.js';
|
|
30
|
+
export { Sticky, type StickyProps } from './Sticky/Sticky.js';
|
|
31
|
+
export { TablePagination, type TablePaginationProps, } from './table/components/pagination/TablePagination.js';
|
|
32
|
+
export { type IColumn, SortOrder, type SortParams, Table, type TableBodyProps, type TableContextProps, type TableEmptyConfig, type TablePaginationConfig, type TablePaginationState, type TableParams, type TableProps, type TableSelectionState, type TableSortingState, useSelected, } from './table/index.js';
|
|
33
|
+
export { type TabProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, useTabs, } from './Tabs/Tabs.js';
|
|
34
|
+
export { Text, type TextProps } from './Text/Text.js';
|
|
35
|
+
export { Textarea, type TextareaProps } from './Textarea/Textarea.js';
|
|
36
|
+
export { Tooltip, type TooltipContentProps, type TooltipRootProps, type TooltipTriggerProps, } from './Tooltip/Tooltip.js';
|
|
35
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { TableContextProps } from './Table.types.js';
|
|
3
|
+
export declare const TableContext: import("react").Context<TableContextProps<unknown>>;
|
|
4
|
+
interface TableProviderProps<TSelected> {
|
|
5
|
+
selected?: TSelected[];
|
|
6
|
+
onSelectedChange?: (selected: TSelected[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TableProvider: <TSelected>({ children, selected: controlledSelected, onSelectedChange, }: PropsWithChildren<TableProviderProps<TSelected>>) => import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Table.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.context.d.ts","sourceRoot":"","sources":["../../../src/ui/table/Table.context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,eAAO,MAAM,YAAY,qDAExB,CAAC;AAEF,UAAU,kBAAkB,CAAC,SAAS;IACpC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,EAAG,+DAIvC,iBAAiB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,gCAuBlD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { useState as m, useCallback as x, useMemo as p, createContext as v } from "react";
|
|
4
|
+
const b = v(
|
|
5
|
+
{}
|
|
6
|
+
), C = ({
|
|
7
|
+
children: n,
|
|
8
|
+
selected: t,
|
|
9
|
+
onSelectedChange: o
|
|
10
|
+
}) => {
|
|
11
|
+
const [a, u] = m([]), e = t ?? a, r = x(
|
|
12
|
+
(s) => {
|
|
13
|
+
const c = typeof s == "function" ? s(e) : s;
|
|
14
|
+
t === void 0 && u(c), o?.(c);
|
|
15
|
+
},
|
|
16
|
+
[t, o, e]
|
|
17
|
+
), f = p(
|
|
18
|
+
() => ({ selected: e, setSelected: r }),
|
|
19
|
+
[e, r]
|
|
20
|
+
);
|
|
21
|
+
return /* @__PURE__ */ i(b.Provider, { value: f, children: n });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
b as TableContext,
|
|
25
|
+
C as TableProvider
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/ui/table/Table.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,SAAS,GAAG,OAAO,EAAE,yBAG3C,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,gCAW1B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { TableRoot as o } from "./components/root/TableRoot.js";
|
|
3
|
+
import { TableProvider as d } from "./Table.context.js";
|
|
4
|
+
const n = ({
|
|
5
|
+
selection: e,
|
|
6
|
+
...t
|
|
7
|
+
}) => e ? /* @__PURE__ */ r(
|
|
8
|
+
d,
|
|
9
|
+
{
|
|
10
|
+
selected: e.selected,
|
|
11
|
+
onSelectedChange: e.onSelectedChange,
|
|
12
|
+
children: /* @__PURE__ */ r(o, { selectedKey: e.key, ...t })
|
|
13
|
+
}
|
|
14
|
+
) : /* @__PURE__ */ r(o, { ...t });
|
|
15
|
+
export {
|
|
16
|
+
n as Table
|
|
17
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { CSSProperties, Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
export declare enum SortOrder {
|
|
3
|
+
ASC = "asc",
|
|
4
|
+
DESC = "desc"
|
|
5
|
+
}
|
|
6
|
+
export interface SortParams {
|
|
7
|
+
name: string;
|
|
8
|
+
order: SortOrder;
|
|
9
|
+
}
|
|
10
|
+
export interface TableParams {
|
|
11
|
+
page: number;
|
|
12
|
+
size: number;
|
|
13
|
+
sort?: SortParams;
|
|
14
|
+
}
|
|
15
|
+
type TableCellAlign = 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
16
|
+
export interface CellParamsProps {
|
|
17
|
+
sortKey?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
align?: TableCellAlign;
|
|
20
|
+
}
|
|
21
|
+
interface ColumnParams<T, K extends keyof T = keyof T> extends CellParamsProps {
|
|
22
|
+
label: string;
|
|
23
|
+
key: K;
|
|
24
|
+
render?: (value: T[K], data: T) => ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export type IColumn<T> = {
|
|
27
|
+
[K in keyof T]-?: ColumnParams<T, K>;
|
|
28
|
+
}[keyof T];
|
|
29
|
+
export interface TableSelectionState<T, TSelected = unknown> {
|
|
30
|
+
key: keyof T;
|
|
31
|
+
selected?: TSelected[];
|
|
32
|
+
onSelectedChange?: (selected: TSelected[]) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface TableContextProps<TSelected = unknown> {
|
|
35
|
+
selected: TSelected[];
|
|
36
|
+
setSelected: Dispatch<SetStateAction<TSelected[]>>;
|
|
37
|
+
}
|
|
38
|
+
export interface TablePaginationConfig {
|
|
39
|
+
page: number;
|
|
40
|
+
size: number;
|
|
41
|
+
onPageChange: (page: number) => void;
|
|
42
|
+
onPageSizeChange: (size: number) => void;
|
|
43
|
+
}
|
|
44
|
+
export interface TablePaginationState extends TablePaginationConfig {
|
|
45
|
+
total: number;
|
|
46
|
+
pageSizeOptions?: number[];
|
|
47
|
+
render?: (params: TablePaginationConfig) => ReactNode;
|
|
48
|
+
}
|
|
49
|
+
export interface TableSortingState {
|
|
50
|
+
sort?: SortParams;
|
|
51
|
+
onSortChange?: (sortKey: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export interface TableEmptyConfig {
|
|
54
|
+
title?: ReactNode;
|
|
55
|
+
description?: ReactNode;
|
|
56
|
+
icon?: ReactNode;
|
|
57
|
+
}
|
|
58
|
+
export interface TableBodyProps<T> {
|
|
59
|
+
withHeader?: boolean;
|
|
60
|
+
columns: IColumn<T>[];
|
|
61
|
+
data: T[];
|
|
62
|
+
keyExtractor?: keyof T;
|
|
63
|
+
isLoading: boolean;
|
|
64
|
+
emptyConfig?: TableEmptyConfig;
|
|
65
|
+
onClickRow?: (row: T, index: number) => void;
|
|
66
|
+
sorting?: TableSortingState;
|
|
67
|
+
}
|
|
68
|
+
export type TableProps<T, TSelected = unknown> = TableBodyProps<T> & {
|
|
69
|
+
withBorder?: boolean;
|
|
70
|
+
maxHeight?: string | number;
|
|
71
|
+
sticky?: boolean;
|
|
72
|
+
pagination?: TablePaginationState;
|
|
73
|
+
selection?: TableSelectionState<T, TSelected>;
|
|
74
|
+
};
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=Table.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.types.d.ts","sourceRoot":"","sources":["../../../src/ui/table/Table.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TableBodyProps } from '../../Table.types.js';
|
|
2
|
+
interface TableContentProps<T> extends TableBodyProps<T> {
|
|
3
|
+
scrollable?: boolean;
|
|
4
|
+
sticky?: boolean;
|
|
5
|
+
selectedKey?: keyof T;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableContent: <T>({ scrollable, sticky, withHeader, columns, sorting, selectedKey, ...rest }: TableContentProps<T>) => import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=TableContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableContent.d.ts","sourceRoot":"","sources":["../../../../../src/ui/table/components/content/TableContent.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAS3D,UAAU,iBAAiB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,EAAG,4EAQ9B,iBAAiB,CAAC,CAAC,CAAC,gCA4EtB,CAAC"}
|