@ztwoint/z-ui 0.1.46 → 0.1.47

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.
Files changed (59) hide show
  1. package/dist/components/assets/icons/check.d.ts +8 -0
  2. package/dist/components/assets/icons/check.js +17 -0
  3. package/dist/components/assets/icons/x-mark.d.ts +8 -0
  4. package/dist/components/assets/icons/x-mark.js +17 -0
  5. package/dist/components/table/components/cell/avatar-cell.d.ts +15 -0
  6. package/dist/components/table/components/cell/avatar-cell.js +74 -0
  7. package/dist/components/table/components/cell/boolean-cell.d.ts +1 -2
  8. package/dist/components/table/components/cell/boolean-cell.js +5 -5
  9. package/dist/components/table/components/cell/description-cell.d.ts +7 -0
  10. package/dist/components/table/components/cell/description-cell.js +16 -0
  11. package/dist/components/table/components/cell/index.d.ts +10 -1
  12. package/dist/components/table/components/cell/label-cell.d.ts +10 -0
  13. package/dist/components/table/components/cell/label-cell.js +47 -0
  14. package/dist/components/table/components/cell/link-cell.d.ts +10 -0
  15. package/dist/components/table/components/cell/link-cell.js +35 -0
  16. package/dist/components/table/components/cell/number-cell.d.ts +5 -3
  17. package/dist/components/table/components/cell/number-cell.js +40 -3
  18. package/dist/components/table/components/index.d.ts +1 -1
  19. package/dist/components/table/components/table-cell.d.ts +1 -1
  20. package/dist/components/table/components/table-cell.js +41 -32
  21. package/dist/components/table/components/table-filter/filters/boolean.js +52 -44
  22. package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.utils.js +16 -16
  23. package/dist/components/table/components/table-filter/table-filter-button.js +59 -49
  24. package/dist/components/table/components/table-filter/table-filter-column-button.js +42 -41
  25. package/dist/components/table/components/table-header/stories/basic-header.d.ts +1 -1
  26. package/dist/components/table/components/table-header/table-header.js +10 -10
  27. package/dist/components/table/index.d.ts +1 -1
  28. package/dist/components/table/table-provider.js +37 -8
  29. package/dist/components/table/table.const.d.ts +10 -8
  30. package/dist/components/table/table.const.js +10 -8
  31. package/dist/components/table/table.js +1 -7
  32. package/dist/components/table/table.type.d.ts +36 -5
  33. package/dist/components/table/table.utils.d.ts +1 -1
  34. package/dist/components/table/table.utils.js +5 -3
  35. package/dist/components/table-card/table-card.js +116 -89
  36. package/dist/css/styles/tailwind.css +1 -1
  37. package/dist/index.js +62 -64
  38. package/dist/types/components/assets/icons/check.d.ts +8 -0
  39. package/dist/types/components/assets/icons/x-mark.d.ts +8 -0
  40. package/dist/types/components/table/components/cell/avatar-cell.d.ts +15 -0
  41. package/dist/types/components/table/components/cell/boolean-cell.d.ts +1 -2
  42. package/dist/types/components/table/components/cell/description-cell.d.ts +7 -0
  43. package/dist/types/components/table/components/cell/index.d.ts +10 -1
  44. package/dist/types/components/table/components/cell/label-cell.d.ts +10 -0
  45. package/dist/types/components/table/components/cell/link-cell.d.ts +10 -0
  46. package/dist/types/components/table/components/cell/number-cell.d.ts +5 -3
  47. package/dist/types/components/table/components/index.d.ts +1 -1
  48. package/dist/types/components/table/components/table-cell.d.ts +1 -1
  49. package/dist/types/components/table/components/table-header/stories/basic-header.d.ts +1 -1
  50. package/dist/types/components/table/index.d.ts +1 -1
  51. package/dist/types/components/table/table.const.d.ts +10 -8
  52. package/dist/types/components/table/table.type.d.ts +36 -5
  53. package/dist/types/components/table/table.utils.d.ts +1 -1
  54. package/package.json +1 -1
  55. package/dist/components/table/components/cell/text-cell.d.ts +0 -7
  56. package/dist/components/table/components/cell/text-cell.js +0 -5
  57. package/dist/node_modules/@heroicons/react/24/solid/esm/CheckCircleIcon.js +0 -26
  58. package/dist/node_modules/@heroicons/react/24/solid/esm/XCircleIcon.js +0 -26
  59. package/dist/types/components/table/components/cell/text-cell.d.ts +0 -7
@@ -0,0 +1,8 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ secondaryfill?: string;
4
+ strokewidth?: number;
5
+ title?: string;
6
+ };
7
+ export declare function Check({ title, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
8
+ export default Check;
@@ -0,0 +1,17 @@
1
+ import { jsxs as e, jsx as l } from "react/jsx-runtime";
2
+ function s({ title: r = "badge 13", ...t }) {
3
+ return /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
4
+ /* @__PURE__ */ l("title", { children: r }),
5
+ /* @__PURE__ */ l("g", { fill: "currentColor", children: /* @__PURE__ */ l(
6
+ "path",
7
+ {
8
+ d: "M16,0C7.163,0,0,7.163,0,16s7.163,16,16,16,16-7.163,16-16C31.974,7.174,24.826,.026,16,0Zm7.707,11.707l-10,10c-.195,.195-.451,.293-.707,.293s-.512-.098-.707-.293l-4-4c-.391-.391-.391-1.023,0-1.414s1.023-.391,1.414,0l3.293,3.293,9.293-9.293c.391-.391,1.023-.391,1.414,0s.391,1.023,0,1.414Z",
9
+ fill: "currentColor"
10
+ }
11
+ ) })
12
+ ] });
13
+ }
14
+ export {
15
+ s as Check,
16
+ s as default
17
+ };
@@ -0,0 +1,8 @@
1
+ import { SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ secondaryfill?: string;
4
+ strokewidth?: number;
5
+ title?: string;
6
+ };
7
+ export declare function XMark({ title, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
8
+ export default XMark;
@@ -0,0 +1,17 @@
1
+ import { jsxs as s, jsx as l } from "react/jsx-runtime";
2
+ function i({ title: r = "badge 13", ...t }) {
3
+ return /* @__PURE__ */ s("svg", { height: "48", width: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
4
+ /* @__PURE__ */ l("title", { children: r }),
5
+ /* @__PURE__ */ l("g", { fill: "currentColor", children: /* @__PURE__ */ l(
6
+ "path",
7
+ {
8
+ d: "M24,1C11.3,1,1,11.3,1,24s10.3,23,23,23s23-10.3,23-23S36.7,1,24,1z M32.7,31.3c0.4,0.4,0.4,1,0,1.4 C32.5,32.9,32.3,33,32,33s-0.5-0.1-0.7-0.3L24,25.4l-7.3,7.3C16.5,32.9,16.3,33,16,33s-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4 l7.3-7.3l-7.3-7.3c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l7.3,7.3l7.3-7.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4L25.4,24L32.7,31.3z",
9
+ fill: "currentColor"
10
+ }
11
+ ) })
12
+ ] });
13
+ }
14
+ export {
15
+ i as XMark,
16
+ i as default
17
+ };
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { RootProps, LabelProps } from '../../../avatar/avatar';
3
+ import { CellValue } from '../../table.type';
4
+ export interface AvatarCellProps {
5
+ avatar: {
6
+ label: LabelProps['label'];
7
+ color: RootProps['color'];
8
+ };
9
+ value: CellValue;
10
+ rightIcon?: React.ReactNode;
11
+ className?: string;
12
+ helperText?: string;
13
+ description?: string;
14
+ }
15
+ export declare const AvatarCell: FC<AvatarCellProps>;
@@ -0,0 +1,74 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ /* empty css */
3
+ import "react";
4
+ import { cn as r } from "../../../../lib/utils.js";
5
+ import "../../../alert/alert.const.js";
6
+ import "../../../button/button.js";
7
+ import "../../../collapsible-side-nav-bar/side-nav-bar-provider.js";
8
+ import "../../../collapsible-side-nav-bar/side-nav-bar.js";
9
+ import "../../../collapsible-side-nav-bar/side-nav-bar-header.js";
10
+ import "../../../collapsible-side-nav-bar/side-nav-bar-content.js";
11
+ import "../../../collapsible-side-nav-bar/side-nav-bar-footer.js";
12
+ import "../../../collapsible-side-nav-bar/side-nav-bar-group.js";
13
+ import "../../../collapsible-side-nav-bar/side-nav-bar-item.js";
14
+ import "../../../collapsible-side-nav-bar/side-nav-bar-separator.js";
15
+ import "../../../collapsible-side-nav-bar/context.js";
16
+ import "../../../collapsible-side-nav-bar/popover/popover.js";
17
+ import "react-country-flag";
18
+ import "classnames";
19
+ import "@radix-ui/react-dialog";
20
+ import "../../../dropdown/z2-dropdown.js";
21
+ import "@radix-ui/react-dropdown-menu";
22
+ import "lucide-react";
23
+ import "../../../input/input.js";
24
+ import "../../../nav-header/nav-header.js";
25
+ import "../../../nav-header/nav-item/nav-item.js";
26
+ import "@radix-ui/react-select";
27
+ import "../../../stepper/stepper.js";
28
+ import "../../../stepper-item/stepper-item.js";
29
+ import "@radix-ui/react-tabs";
30
+ import "../../table-provider.js";
31
+ import { Avatar as p } from "../../../avatar/avatar.js";
32
+ import "../../table.context.js";
33
+ import "../../../tooltip/tooltip.js";
34
+ import "../../../badge/badge.js";
35
+ const V = ({
36
+ avatar: m,
37
+ value: a,
38
+ rightIcon: e,
39
+ className: s,
40
+ helperText: o,
41
+ description: l
42
+ }) => /* @__PURE__ */ i(
43
+ "div",
44
+ {
45
+ className: r(
46
+ "flex flex-col gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
47
+ s
48
+ ),
49
+ children: [
50
+ /* @__PURE__ */ i(
51
+ "div",
52
+ {
53
+ className: r(
54
+ "text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
55
+ ),
56
+ children: [
57
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2 h-full", children: [
58
+ /* @__PURE__ */ t(p.Root, { size: "xxs", color: m.color, children: /* @__PURE__ */ t(p.Label, { label: m.label }) }),
59
+ a
60
+ ] }),
61
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2.5", children: [
62
+ o && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: o }),
63
+ e && /* @__PURE__ */ t("span", { className: r("min-h-max min-w-max"), children: e })
64
+ ] })
65
+ ]
66
+ }
67
+ ),
68
+ l && /* @__PURE__ */ t("div", { className: "text-text-neutral-secondary w-full", children: l })
69
+ ]
70
+ }
71
+ );
72
+ export {
73
+ V as AvatarCell
74
+ };
@@ -1,7 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { CellValue } from '../../table.type';
3
- interface BooleanCellProps {
3
+ export interface BooleanCellProps {
4
4
  value: CellValue;
5
5
  }
6
6
  export declare const BooleanCell: FC<BooleanCellProps>;
7
- export {};
@@ -1,7 +1,7 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import o from "../../../../node_modules/@heroicons/react/24/solid/esm/CheckCircleIcon.js";
3
- import t from "../../../../node_modules/@heroicons/react/24/solid/esm/XCircleIcon.js";
4
- const l = ({ value: r }) => r == null ? null : r ? /* @__PURE__ */ e(o, { className: "text-green-500 w-4 h-4" }) : /* @__PURE__ */ e(t, { className: "text-red-500 w-4 h-4" });
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Check as t } from "../../../assets/icons/check.js";
3
+ import { XMark as l } from "../../../assets/icons/x-mark.js";
4
+ const s = ({ value: e }) => e == null ? null : /* @__PURE__ */ r("div", { className: "flex items-center p-3 h-full", children: e ? /* @__PURE__ */ r(t, { className: "text-green-500 w-3.5 h-3.5" }) : /* @__PURE__ */ r(l, { className: "text-red-500 w-3.5 h-3.5" }) });
5
5
  export {
6
- l as BooleanCell
6
+ s as BooleanCell
7
7
  };
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { CellValue } from '../../table.type';
3
+ export interface DescriptionCellProps {
4
+ value: CellValue;
5
+ className?: string;
6
+ }
7
+ export declare const DescriptionCell: FC<DescriptionCellProps>;
@@ -0,0 +1,16 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cn as l } from "../../../../lib/utils.js";
3
+ const i = ({ value: e, className: t }) => /* @__PURE__ */ r(
4
+ "div",
5
+ {
6
+ className: l(
7
+ "text-text-neutral-secondary p-3 w-full h-full items-center flex hover:bg-background-neutral-light",
8
+ "leading-[24px] text-[14px]",
9
+ t
10
+ ),
11
+ children: e
12
+ }
13
+ );
14
+ export {
15
+ i as DescriptionCell
16
+ };
@@ -1,3 +1,12 @@
1
- export { TextCell } from './text-cell';
2
1
  export { NumberCell } from './number-cell';
3
2
  export { BooleanCell } from './boolean-cell';
3
+ export { LinkCell } from './link-cell';
4
+ export { DescriptionCell } from './description-cell';
5
+ export { AvatarCell } from './avatar-cell';
6
+ export { LabelCell } from './label-cell';
7
+ export type { NumberCellProps } from './number-cell';
8
+ export type { BooleanCellProps } from './boolean-cell';
9
+ export type { LinkCellProps } from './link-cell';
10
+ export type { AvatarCellProps } from './avatar-cell';
11
+ export type { LabelCellProps } from './label-cell';
12
+ export type { DescriptionCellProps } from './description-cell';
@@ -0,0 +1,10 @@
1
+ import { CellValue } from '../../table.type';
2
+ export interface LabelCellProps {
3
+ value: CellValue;
4
+ rightIcon?: React.ReactNode;
5
+ leftIcon?: React.ReactNode;
6
+ className?: string;
7
+ helperText?: string;
8
+ description?: string;
9
+ }
10
+ export declare const LabelCell: React.FC<LabelCellProps>;
@@ -0,0 +1,47 @@
1
+ import { jsxs as e, jsx as l } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as a } from "../../../../lib/utils.js";
4
+ const u = ({
5
+ value: i,
6
+ leftIcon: n,
7
+ rightIcon: t,
8
+ className: c,
9
+ helperText: m,
10
+ description: s
11
+ }) => {
12
+ const r = "min-h-max min-w-max";
13
+ return /* @__PURE__ */ e(
14
+ "div",
15
+ {
16
+ className: a(
17
+ "flex flex-row gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
18
+ s && "flex-col",
19
+ c
20
+ ),
21
+ children: [
22
+ /* @__PURE__ */ e(
23
+ "div",
24
+ {
25
+ className: a(
26
+ "text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
27
+ ),
28
+ children: [
29
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2.5 h-full", children: [
30
+ n && /* @__PURE__ */ l("span", { className: a(r), children: n }),
31
+ i
32
+ ] }),
33
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2.5", children: [
34
+ m && /* @__PURE__ */ l("span", { className: "text-text-neutral-secondary", children: m }),
35
+ t && /* @__PURE__ */ l("span", { className: a(r), children: t })
36
+ ] })
37
+ ]
38
+ }
39
+ ),
40
+ s && /* @__PURE__ */ l("div", { className: "text-text-neutral-secondary w-full", children: s })
41
+ ]
42
+ }
43
+ );
44
+ };
45
+ export {
46
+ u as LabelCell
47
+ };
@@ -0,0 +1,10 @@
1
+ import { CellValue } from '../../table.type';
2
+ export interface LinkCellProps {
3
+ value: CellValue;
4
+ href: string;
5
+ target?: '_blank' | '_self' | '_parent' | '_top';
6
+ rightIcon?: React.ReactNode;
7
+ leftIcon?: React.ReactNode;
8
+ className?: string;
9
+ }
10
+ export declare const LinkCell: React.FC<LinkCellProps>;
@@ -0,0 +1,35 @@
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as e } from "../../../../lib/utils.js";
4
+ const p = ({
5
+ value: i,
6
+ href: m,
7
+ target: t = "_self",
8
+ leftIcon: n,
9
+ rightIcon: r,
10
+ className: o
11
+ }) => {
12
+ const l = "min-h-max min-w-max";
13
+ return /* @__PURE__ */ s(
14
+ "a",
15
+ {
16
+ href: m,
17
+ target: t,
18
+ rel: "noopener noreferrer",
19
+ className: e(
20
+ "text-text-brand-secondary p-3 leading-none-medium-sm flex flex-row justify-between hover:bg-background-neutral-light gap-2.5 min-w-full min-h-full items-center",
21
+ o
22
+ ),
23
+ children: [
24
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2.5 h-full", children: [
25
+ n && /* @__PURE__ */ a("span", { className: e(l), children: n }),
26
+ i
27
+ ] }),
28
+ r && /* @__PURE__ */ a("span", { className: e(l), children: r })
29
+ ]
30
+ }
31
+ );
32
+ };
33
+ export {
34
+ p as LinkCell
35
+ };
@@ -1,7 +1,9 @@
1
1
  import { CellValue } from '../../table.type';
2
- import * as React from 'react';
3
- interface NumberCellProps {
2
+ export interface NumberCellProps {
4
3
  value: CellValue;
4
+ rightIcon?: React.ReactNode;
5
+ leftIcon?: React.ReactNode;
6
+ className?: string;
7
+ helperText?: string;
5
8
  }
6
9
  export declare const NumberCell: React.FC<NumberCellProps>;
7
- export {};
@@ -1,5 +1,42 @@
1
- import { jsx as t, Fragment as n } from "react/jsx-runtime";
2
- const o = ({ value: e }) => /* @__PURE__ */ t(n, { children: ((r) => r == null ? "" : typeof r == "number" ? new Intl.NumberFormat().format(r) : String(r))(e) });
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as l } from "../../../../lib/utils.js";
4
+ const u = ({
5
+ value: r,
6
+ leftIcon: s,
7
+ rightIcon: n,
8
+ className: t,
9
+ helperText: i
10
+ }) => {
11
+ const m = "min-h-max min-w-max";
12
+ return /* @__PURE__ */ e(
13
+ "div",
14
+ {
15
+ className: l(
16
+ "flex gap-2.5 items-center hover:bg-background-neutral-light h-full min-w-full leading-none-medium-sm p-3",
17
+ t
18
+ ),
19
+ children: /* @__PURE__ */ a(
20
+ "div",
21
+ {
22
+ className: l(
23
+ "text-text-neutral-primary flex justify-between gap-2.5 min-w-full items-center"
24
+ ),
25
+ children: [
26
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2.5 h-full", children: [
27
+ s && /* @__PURE__ */ e("span", { className: l(m), children: s }),
28
+ i && /* @__PURE__ */ e("span", { className: "text-text-neutral-secondary", children: i })
29
+ ] }),
30
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2.5", children: [
31
+ r,
32
+ n && /* @__PURE__ */ e("span", { className: l(m), children: n })
33
+ ] })
34
+ ]
35
+ }
36
+ )
37
+ }
38
+ );
39
+ };
3
40
  export {
4
- o as NumberCell
41
+ u as NumberCell
5
42
  };
@@ -1,5 +1,5 @@
1
1
  export { TableCell } from './table-cell';
2
- export { TextCell, NumberCell, BooleanCell } from './cell';
2
+ export { NumberCell, BooleanCell, AvatarCell, DescriptionCell, LabelCell, LinkCell } from './cell';
3
3
  export { TableHeader } from './table-header';
4
4
  export { TableRow } from './table-row';
5
5
  export { TableEmptyState } from './table-empty-state';
@@ -1,7 +1,7 @@
1
1
  import { CellValue, CellType, CellRenderer, TableProps } from '../table.type';
2
2
  import * as React from 'react';
3
3
  interface TableCellProps {
4
- value: CellValue;
4
+ value: CellValue | Record<string, unknown>;
5
5
  cellType: CellType;
6
6
  cellRenderer?: CellRenderer;
7
7
  customCells?: Record<string, CellRenderer>;
@@ -1,46 +1,55 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { TABLE_CSS_CLASSES as r } from "../table.const.js";
3
- import { TextCell as m } from "./cell/text-cell.js";
4
- import { NumberCell as h } from "./cell/number-cell.js";
5
- import { BooleanCell as b } from "./cell/boolean-cell.js";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { TABLE_CSS_CLASSES as s } from "../table.const.js";
3
+ import { NumberCell as S } from "./cell/number-cell.js";
4
+ import { BooleanCell as C } from "./cell/boolean-cell.js";
5
+ import { LinkCell as d } from "./cell/link-cell.js";
6
+ import { DescriptionCell as h } from "./cell/description-cell.js";
7
+ import { AvatarCell as u } from "./cell/avatar-cell.js";
8
+ import { LabelCell as c } from "./cell/label-cell.js";
6
9
  import "react";
7
- import { cn as S } from "../../../lib/utils.js";
8
- const E = ({
9
- value: t,
10
- cellType: n,
11
- cellRenderer: f,
10
+ import { cn as B } from "../../../lib/utils.js";
11
+ const T = ({
12
+ value: o,
13
+ cellType: m,
14
+ cellRenderer: n,
12
15
  record: i,
13
- index: C,
16
+ index: a,
14
17
  customCells: e,
15
- cell: s
18
+ cell: b
16
19
  }) => {
17
- const p = {
18
- text: m,
19
- number: h,
20
- boolean: b,
21
- checkbox: m
22
- }, a = e == null ? void 0 : e[n];
23
- let o;
24
- if (f)
25
- o = f({ value: t, record: i, index: C });
26
- else if (a)
27
- o = /* @__PURE__ */ l(a, { value: t, record: i, index: C });
20
+ const A = {
21
+ text: c,
22
+ number: S,
23
+ boolean: C,
24
+ checkbox: C,
25
+ link: d,
26
+ avatar: u,
27
+ label: c
28
+ }, f = e == null ? void 0 : e[m];
29
+ let r;
30
+ if (n)
31
+ r = n({ value: o, record: i, index: a });
32
+ else if (f)
33
+ r = /* @__PURE__ */ t(f, { value: o, record: i, index: a });
28
34
  else {
29
- const c = p[n] ?? m;
30
- o = /* @__PURE__ */ l(c, { value: t });
35
+ const l = A[m] ?? h;
36
+ if (typeof o == "object" && o !== null && !Array.isArray(o)) {
37
+ const p = o, L = { value: p.value ?? "", ...p };
38
+ r = /* @__PURE__ */ t(l, { ...L });
39
+ } else
40
+ r = /* @__PURE__ */ t(l, { value: o ?? "" });
31
41
  }
32
- return /* @__PURE__ */ l(
42
+ return /* @__PURE__ */ t(
33
43
  "td",
34
44
  {
35
- className: S(
36
- r.cell.default,
37
- r.cell.cellHeight[s.cellHeight],
38
- r.cell.hasBorder[s.hasBorder ? "true" : "false"]
45
+ className: B(
46
+ s.cell.default,
47
+ s.cell.hasBorder[b.hasBorder ? "true" : "false"]
39
48
  ),
40
- children: o
49
+ children: r
41
50
  }
42
51
  );
43
52
  };
44
53
  export {
45
- E as TableCell
54
+ T as TableCell
46
55
  };
@@ -1,63 +1,71 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { useEffect as i } from "react";
3
- const c = ["equals", "notEqual"], m = ({ value: r, onChange: l }) => {
4
- i(() => {
5
- r.condition || l({ condition: c[0] });
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { useEffect as n } from "react";
3
+ const d = ["equals", "notEqual"], u = ({ value: t, onChange: s }) => {
4
+ n(() => {
5
+ t.condition || s({ condition: d[0] });
6
6
  }, []);
7
- const s = (e, u) => {
8
- l(u ? { value: e } : { value: "" });
9
- }, n = (e) => {
10
- switch (e) {
11
- case "equals":
12
- return "Equals";
13
- case "notEqual":
14
- return "Not equal to";
15
- default:
16
- return e;
17
- }
7
+ const i = (r, a) => {
8
+ s(a ? { value: r } : { value: "" });
18
9
  };
19
- return /* @__PURE__ */ t("div", { className: "flex flex-col", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-2 p-3", children: [
20
- /* @__PURE__ */ a("div", { className: "space-y-2", children: [
21
- /* @__PURE__ */ a("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
22
- /* @__PURE__ */ t(
10
+ return /* @__PURE__ */ e("div", { className: "w-full", children: /* @__PURE__ */ l("div", { className: "p-4 space-y-3", children: [
11
+ /* @__PURE__ */ l("label", { className: "flex items-center p-3 rounded-lg border border-stroke-solid-light hover:border-stroke-solid-medium hover:bg-gray-50 transition-all duration-200 cursor-pointer group", children: [
12
+ /* @__PURE__ */ l("div", { className: "relative", children: [
13
+ /* @__PURE__ */ e(
23
14
  "input",
24
15
  {
25
16
  type: "checkbox",
26
- checked: r.value === "true",
27
- onChange: (e) => s("true", e.target.checked),
28
- className: "rounded border-stroke-solid-medium text-text-neutral-primary focus:ring-2 focus:ring-blue-500"
17
+ checked: t.value === "true",
18
+ onChange: (r) => i("true", r.target.checked),
19
+ className: "w-5 h-5 rounded border-2 border-stroke-solid-medium text-blue-600 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200"
29
20
  }
30
21
  ),
31
- /* @__PURE__ */ t("span", { className: "text-text-neutral-primary text-sm", children: "True" })
22
+ t.value === "true" && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("svg", { className: "w-3 h-3 text-white", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
23
+ "path",
24
+ {
25
+ fillRule: "evenodd",
26
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
27
+ clipRule: "evenodd"
28
+ }
29
+ ) }) })
32
30
  ] }),
33
- /* @__PURE__ */ a("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
34
- /* @__PURE__ */ t(
31
+ /* @__PURE__ */ l("div", { className: "ml-3 flex-1", children: [
32
+ /* @__PURE__ */ l("div", { className: "flex items-center", children: [
33
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-text-neutral-primary", children: "True" }),
34
+ t.value === "true" && /* @__PURE__ */ e("span", { className: "ml-2 inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800", children: "Selected" })
35
+ ] }),
36
+ /* @__PURE__ */ e("p", { className: "text-xs text-text-neutral-secondary mt-0.5", children: "Include records with true values" })
37
+ ] })
38
+ ] }),
39
+ /* @__PURE__ */ l("label", { className: "flex items-center p-3 rounded-lg border border-stroke-solid-light hover:border-stroke-solid-medium hover:bg-gray-50 transition-all duration-200 cursor-pointer group", children: [
40
+ /* @__PURE__ */ l("div", { className: "relative", children: [
41
+ /* @__PURE__ */ e(
35
42
  "input",
36
43
  {
37
44
  type: "checkbox",
38
- checked: r.value === "false",
39
- onChange: (e) => s("false", e.target.checked),
40
- className: "rounded border-stroke-solid-medium text-text-neutral-primary focus:ring-2 focus:ring-blue-500"
45
+ checked: t.value === "false",
46
+ onChange: (r) => i("false", r.target.checked),
47
+ className: "w-5 h-5 rounded border-2 border-stroke-solid-medium text-blue-600 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200"
41
48
  }
42
49
  ),
43
- /* @__PURE__ */ t("span", { className: "text-text-neutral-primary text-sm", children: "False" })
50
+ t.value === "false" && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e("svg", { className: "w-3 h-3 text-white", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ e(
51
+ "path",
52
+ {
53
+ fillRule: "evenodd",
54
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
55
+ clipRule: "evenodd"
56
+ }
57
+ ) }) })
58
+ ] }),
59
+ /* @__PURE__ */ l("div", { className: "ml-3 flex-1", children: [
60
+ /* @__PURE__ */ l("div", { className: "flex items-center", children: [
61
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-text-neutral-primary", children: "False" }),
62
+ t.value === "false" && /* @__PURE__ */ e("span", { className: "ml-2 inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800", children: "Selected" })
63
+ ] }),
64
+ /* @__PURE__ */ e("p", { className: "text-xs text-text-neutral-secondary mt-0.5", children: "Include records with false values" })
44
65
  ] })
45
- ] }),
46
- /* @__PURE__ */ t(
47
- "select",
48
- {
49
- value: r.condition,
50
- onChange: (e) => l({ condition: e.target.value }),
51
- className: "border border-stroke-solid-medium bg-surface-neutral-default text-text-neutral-primary rounded px-2 py-1 text-sm mb-3",
52
- children: c.map((e) => /* @__PURE__ */ t("option", { value: e, children: n(e) }, e))
53
- }
54
- ),
55
- r.value && /* @__PURE__ */ a("div", { className: "mt-3 p-2 bg-surface-neutral-muted rounded text-sm", children: [
56
- /* @__PURE__ */ t("div", { className: "text-text-neutral-muted mb-1", children: "Selected:" }),
57
- /* @__PURE__ */ t("div", { className: "text-text-neutral-primary", children: r.value === "true" ? "True" : "False" })
58
66
  ] })
59
67
  ] }) });
60
68
  };
61
69
  export {
62
- m as default
70
+ u as default
63
71
  };