@umami/react-zen 0.93.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.css +21 -18
- package/dist/index.d.ts +9 -12
- package/dist/index.js +66 -36
- package/dist/index.mjs +66 -36
- package/package.json +1 -1
- package/styles.css +21 -18
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
**zen** is a modern, minimalist React component library.
|
|
4
4
|
|
|
5
|
+
- Beautifully-designed components
|
|
5
6
|
- Built on top of [React Aria](https://react-spectrum.adobe.com/react-aria/) primitives.
|
|
6
7
|
- No Tailwind, pure CSS.
|
|
7
|
-
- Out-of-the-box accessibility.
|
|
8
8
|
|
|
9
9
|
[Learn more](https://zen.umami.is/)
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
13
|
```shell
|
|
14
|
-
|
|
14
|
+
npm install @umami/react-zen
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
package/dist/index.css
CHANGED
|
@@ -3714,56 +3714,59 @@ body a.Button_button__NDYwM {
|
|
|
3714
3714
|
}
|
|
3715
3715
|
|
|
3716
3716
|
/* virtual-css:css:eedba9fc7e3d8030bbd07387da49f358 */
|
|
3717
|
-
.
|
|
3717
|
+
.Table_table__MjczZ {
|
|
3718
3718
|
font-size: var(--font-size);
|
|
3719
3719
|
color: var(--font-color);
|
|
3720
3720
|
border-collapse: collapse;
|
|
3721
3721
|
width: 100%;
|
|
3722
3722
|
position: relative;
|
|
3723
3723
|
}
|
|
3724
|
-
.
|
|
3725
|
-
.
|
|
3724
|
+
.Table_table__MjczZ th,
|
|
3725
|
+
.Table_table__MjczZ td {
|
|
3726
3726
|
min-width: 0;
|
|
3727
3727
|
}
|
|
3728
|
-
.
|
|
3729
|
-
.
|
|
3728
|
+
.Table_header__YjU3M,
|
|
3729
|
+
.Table_body__MzgxM {
|
|
3730
3730
|
display: contents;
|
|
3731
3731
|
}
|
|
3732
|
-
.
|
|
3733
|
-
display:
|
|
3732
|
+
.Table_header__YjU3M {
|
|
3733
|
+
display: grid;
|
|
3734
3734
|
border-bottom: 1px solid var(--border-color);
|
|
3735
3735
|
}
|
|
3736
|
-
.
|
|
3737
|
-
display:
|
|
3736
|
+
.Table_header__YjU3M tr {
|
|
3737
|
+
display: contents;
|
|
3738
|
+
}
|
|
3739
|
+
.Table_row__MTdmZ {
|
|
3740
|
+
display: grid;
|
|
3738
3741
|
border-bottom: 1px solid color-mix(in srgb, var(--border-color), 50% transparent);
|
|
3739
3742
|
}
|
|
3740
|
-
.
|
|
3741
|
-
.
|
|
3743
|
+
.Table_header__YjU3M .Table_column__ZDFlM:first-child,
|
|
3744
|
+
.Table_row__MTdmZ .Table_cell__NzhiM:first-child {
|
|
3742
3745
|
padding-left: 0;
|
|
3743
3746
|
}
|
|
3744
|
-
.
|
|
3745
|
-
.
|
|
3747
|
+
.Table_header__YjU3M .Table_column__ZDFlM:last-child,
|
|
3748
|
+
.Table_row__MTdmZ .Table_cell__NzhiM:last-child {
|
|
3746
3749
|
padding-right: 0;
|
|
3747
3750
|
}
|
|
3748
|
-
.
|
|
3751
|
+
.Table_column__ZDFlM {
|
|
3749
3752
|
display: flex;
|
|
3750
3753
|
padding: var(--padding);
|
|
3751
3754
|
text-align: left;
|
|
3752
3755
|
font-weight: 700;
|
|
3753
3756
|
flex: 1;
|
|
3754
3757
|
}
|
|
3755
|
-
.
|
|
3758
|
+
.Table_cell__NzhiM {
|
|
3756
3759
|
display: flex;
|
|
3757
3760
|
padding: var(--padding);
|
|
3758
3761
|
flex: 1;
|
|
3759
3762
|
}
|
|
3760
|
-
.
|
|
3763
|
+
.Table_start__ODJiN {
|
|
3761
3764
|
justify-content: flex-start;
|
|
3762
3765
|
}
|
|
3763
|
-
.
|
|
3766
|
+
.Table_center__MTI5M {
|
|
3764
3767
|
justify-content: center;
|
|
3765
3768
|
}
|
|
3766
|
-
.
|
|
3769
|
+
.Table_end__MjE3N {
|
|
3767
3770
|
justify-content: flex-end;
|
|
3768
3771
|
}
|
|
3769
3772
|
|
package/dist/index.d.ts
CHANGED
|
@@ -109,16 +109,14 @@ declare module '@umami/react-zen/forms/FormButtons' {
|
|
|
109
109
|
declare module '@umami/react-zen/forms/FormField' {
|
|
110
110
|
import { HTMLAttributes } from 'react';
|
|
111
111
|
import { RegisterOptions, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
112
|
-
interface FormFieldProps extends HTMLAttributes<HTMLDivElement>, Partial<UseFormReturn> {
|
|
112
|
+
export interface FormFieldProps extends HTMLAttributes<HTMLDivElement>, Partial<UseFormReturn> {
|
|
113
113
|
name: string;
|
|
114
114
|
description?: string;
|
|
115
115
|
label?: string;
|
|
116
116
|
rules?: RegisterOptions<FieldValues, string>;
|
|
117
117
|
children: any;
|
|
118
118
|
}
|
|
119
|
-
const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<any>>;
|
|
120
|
-
export { FormField };
|
|
121
|
-
export type { FormFieldProps };
|
|
119
|
+
export const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<any>>;
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
declare module '@umami/react-zen/forms/FormResetButton' {
|
|
@@ -437,20 +435,18 @@ declare module '@umami/react-zen/Dialog' {
|
|
|
437
435
|
declare module '@umami/react-zen/DataTable' {
|
|
438
436
|
import { ReactNode } from 'react';
|
|
439
437
|
import { ColumnProps, TableProps } from 'react-aria-components';
|
|
440
|
-
interface DataTableProps extends TableProps {
|
|
438
|
+
export interface DataTableProps extends TableProps {
|
|
441
439
|
data?: any[];
|
|
442
440
|
}
|
|
443
|
-
function DataTable({ data, className, children, ...props }: DataTableProps): import("react").JSX.Element;
|
|
444
|
-
interface DataColumnProps extends ColumnProps {
|
|
441
|
+
export function DataTable({ data, className, children, ...props }: DataTableProps): import("react").JSX.Element;
|
|
442
|
+
export interface DataColumnProps extends ColumnProps {
|
|
445
443
|
id: string;
|
|
446
444
|
label?: ReactNode;
|
|
447
445
|
align?: 'start' | 'center' | 'end';
|
|
448
446
|
as?: string;
|
|
449
447
|
hidden?: boolean;
|
|
450
448
|
}
|
|
451
|
-
function DataColumn(props: DataColumnProps): null;
|
|
452
|
-
export { DataTable, DataColumn };
|
|
453
|
-
export type { DataTableProps, DataColumnProps };
|
|
449
|
+
export function DataColumn(props: DataColumnProps): null;
|
|
454
450
|
}
|
|
455
451
|
|
|
456
452
|
declare module '@umami/react-zen/Dots' {
|
|
@@ -776,6 +772,7 @@ declare module '@umami/react-zen/Select' {
|
|
|
776
772
|
interface SelectProps extends AriaSelectProps<HTMLSelectElement> {
|
|
777
773
|
items?: any[];
|
|
778
774
|
value?: string;
|
|
775
|
+
defaultValue?: string;
|
|
779
776
|
label?: string;
|
|
780
777
|
isLoading?: boolean;
|
|
781
778
|
allowSearch?: boolean;
|
|
@@ -887,9 +884,9 @@ declare module '@umami/react-zen/Table' {
|
|
|
887
884
|
align?: 'start' | 'center' | 'end';
|
|
888
885
|
}
|
|
889
886
|
function Table({ children, className, ...props }: TableProps): import("react").JSX.Element;
|
|
890
|
-
function TableHeader({ children, className, ...props }: TableHeaderProps<any>): import("react").JSX.Element;
|
|
887
|
+
function TableHeader({ children, className, style, ...props }: TableHeaderProps<any>): import("react").JSX.Element;
|
|
891
888
|
function TableBody({ children, className, ...props }: TableBodyProps<any>): import("react").JSX.Element;
|
|
892
|
-
function TableRow({ children, className, ...props }: RowProps<any>): import("react").JSX.Element;
|
|
889
|
+
function TableRow({ children, className, style, ...props }: RowProps<any>): import("react").JSX.Element;
|
|
893
890
|
function TableColumn({ children, className, align, ...props }: TableColumnProps): import("react").JSX.Element;
|
|
894
891
|
function TableCell({ children, className, align, ...props }: TableCellProps): import("react").JSX.Element;
|
|
895
892
|
export { Table, TableHeader, TableBody, TableRow, TableColumn, TableCell };
|
package/dist/index.js
CHANGED
|
@@ -30290,21 +30290,38 @@ var import_react179 = require("react");
|
|
|
30290
30290
|
var import_classnames23 = __toESM(require_classnames());
|
|
30291
30291
|
|
|
30292
30292
|
// css-modules:E:\dev\umami-react-zen\src\components\Table.module.css
|
|
30293
|
-
var Table_default = { "table": "
|
|
30293
|
+
var Table_default = { "table": "Table_table__MjczZ", "header": "Table_header__YjU3M", "body": "Table_body__MzgxM", "row": "Table_row__MTdmZ", "column": "Table_column__ZDFlM", "cell": "Table_cell__NzhiM", "start": "Table_start__ODJiN", "center": "Table_center__MTI5M", "end": "Table_end__MjE3N" };
|
|
30294
30294
|
|
|
30295
30295
|
// src/components/Table.tsx
|
|
30296
30296
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
30297
|
+
var gridTemplateColumns = "repeat(auto-fit, minmax(140px, 1fr))";
|
|
30297
30298
|
function Table2({ children, className, ...props }) {
|
|
30298
30299
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)($1910c06f0ca9905e$export$54ec01a60f47d33d, { ...props, className: (0, import_classnames23.default)(Table_default.table, className), "aria-label": "Table", children });
|
|
30299
30300
|
}
|
|
30300
|
-
function TableHeader({ children, className, ...props }) {
|
|
30301
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
30301
|
+
function TableHeader({ children, className, style, ...props }) {
|
|
30302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
30303
|
+
$1910c06f0ca9905e$export$f850895b287ef28e,
|
|
30304
|
+
{
|
|
30305
|
+
...props,
|
|
30306
|
+
className: (0, import_classnames23.default)(Table_default.header, className),
|
|
30307
|
+
style: { gridTemplateColumns, ...style },
|
|
30308
|
+
children
|
|
30309
|
+
}
|
|
30310
|
+
);
|
|
30302
30311
|
}
|
|
30303
30312
|
function TableBody({ children, className, ...props }) {
|
|
30304
30313
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)($1910c06f0ca9905e$export$76ccd210b9029917, { ...props, className: (0, import_classnames23.default)(Table_default.body, className), children });
|
|
30305
30314
|
}
|
|
30306
|
-
function TableRow({ children, className, ...props }) {
|
|
30307
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
30315
|
+
function TableRow({ children, className, style, ...props }) {
|
|
30316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
30317
|
+
$1910c06f0ca9905e$export$b59bdbef9ce70de2,
|
|
30318
|
+
{
|
|
30319
|
+
...props,
|
|
30320
|
+
className: (0, import_classnames23.default)(Table_default.row, className),
|
|
30321
|
+
style: { gridTemplateColumns, ...style },
|
|
30322
|
+
children
|
|
30323
|
+
}
|
|
30324
|
+
);
|
|
30308
30325
|
}
|
|
30309
30326
|
function TableColumn({ children, className, align, ...props }) {
|
|
30310
30327
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
@@ -30332,15 +30349,16 @@ function DataTable({ data = [], className, children, ...props }) {
|
|
|
30332
30349
|
const columns = import_react179.Children.map(children, (child) => {
|
|
30333
30350
|
return { ...child.props };
|
|
30334
30351
|
});
|
|
30352
|
+
const gridTemplateColumns2 = columns.map(({ width }) => width || "1fr").join(" ");
|
|
30335
30353
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Table2, { ...props, className: (0, import_classnames24.default)(DataTable_default.datatable, className), children: [
|
|
30336
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHeader, { children: columns.filter((n) => n).map(({ id, label, as, hidden, ...columnProps }) => {
|
|
30354
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns.filter((n) => n).map(({ id, label, as, hidden, ...columnProps }) => {
|
|
30337
30355
|
if (hidden) {
|
|
30338
30356
|
return null;
|
|
30339
30357
|
}
|
|
30340
30358
|
return /* @__PURE__ */ (0, import_react180.createElement)(TableColumn, { ...columnProps, key: id, id }, label);
|
|
30341
30359
|
}) }),
|
|
30342
30360
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableBody, { items, children: (row) => {
|
|
30343
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableRow, { children: columns.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
30361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableRow, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
30344
30362
|
const value = typeof children2 === "function" ? children2(row) : children2 || row[id];
|
|
30345
30363
|
return /* @__PURE__ */ (0, import_react180.createElement)(
|
|
30346
30364
|
TableCell,
|
|
@@ -31027,6 +31045,7 @@ var Select2 = (0, import_react189.forwardRef)(
|
|
|
31027
31045
|
({
|
|
31028
31046
|
items = [],
|
|
31029
31047
|
value,
|
|
31048
|
+
defaultValue,
|
|
31030
31049
|
label,
|
|
31031
31050
|
isLoading,
|
|
31032
31051
|
allowSearch,
|
|
@@ -31052,35 +31071,46 @@ var Select2 = (0, import_react189.forwardRef)(
|
|
|
31052
31071
|
setSearch(value2);
|
|
31053
31072
|
onSearch?.(value2);
|
|
31054
31073
|
};
|
|
31055
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
31056
|
-
|
|
31057
|
-
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
|
|
31061
|
-
|
|
31062
|
-
|
|
31063
|
-
|
|
31064
|
-
|
|
31065
|
-
|
|
31066
|
-
|
|
31067
|
-
|
|
31068
|
-
|
|
31069
|
-
|
|
31070
|
-
|
|
31071
|
-
|
|
31072
|
-
|
|
31073
|
-
|
|
31074
|
-
|
|
31075
|
-
|
|
31076
|
-
|
|
31077
|
-
|
|
31078
|
-
|
|
31079
|
-
|
|
31080
|
-
|
|
31081
|
-
|
|
31082
|
-
|
|
31083
|
-
|
|
31074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
31075
|
+
$82d7e5349645de74$export$ef9b1a59e592288f,
|
|
31076
|
+
{
|
|
31077
|
+
"aria-label": "Select",
|
|
31078
|
+
...props,
|
|
31079
|
+
ref,
|
|
31080
|
+
selectedKey: value,
|
|
31081
|
+
defaultSelectedKey: defaultValue,
|
|
31082
|
+
onSelectionChange: handleChange,
|
|
31083
|
+
children: [
|
|
31084
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Label2, { children: label }),
|
|
31085
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Button2, { variant: "outline", ...buttonProps, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Row, { justifyContent: "space-between", gap: "3", children: [
|
|
31086
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)($82d7e5349645de74$export$e288731fd71264f0, { children: renderValue }),
|
|
31087
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icons.Chevron, {}) }) })
|
|
31088
|
+
] }) }),
|
|
31089
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Popover2, { ...popoverProps, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Column, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Box, { padding: "2", border: true, borderRadius: true, backgroundColor: true, shadow: "3", children: [
|
|
31090
|
+
allowSearch && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Box, { marginBottom: "2", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
31091
|
+
SearchField2,
|
|
31092
|
+
{
|
|
31093
|
+
value: search,
|
|
31094
|
+
onSearch: handleSearch,
|
|
31095
|
+
delay: searchDelay,
|
|
31096
|
+
defaultValue: searchValue,
|
|
31097
|
+
autoFocus: true
|
|
31098
|
+
}
|
|
31099
|
+
) }),
|
|
31100
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Loading, { icon: "dots", position: "center", size: "sm" }),
|
|
31101
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
31102
|
+
List,
|
|
31103
|
+
{
|
|
31104
|
+
...listProps,
|
|
31105
|
+
items,
|
|
31106
|
+
style: { ...listProps?.style, display: isLoading ? "none" : void 0 },
|
|
31107
|
+
children
|
|
31108
|
+
}
|
|
31109
|
+
)
|
|
31110
|
+
] }) }) })
|
|
31111
|
+
]
|
|
31112
|
+
}
|
|
31113
|
+
);
|
|
31084
31114
|
}
|
|
31085
31115
|
);
|
|
31086
31116
|
|
package/dist/index.mjs
CHANGED
|
@@ -30179,21 +30179,38 @@ import { Children as Children2, createElement as createElement5 } from "react";
|
|
|
30179
30179
|
var import_classnames23 = __toESM(require_classnames());
|
|
30180
30180
|
|
|
30181
30181
|
// css-modules:E:\dev\umami-react-zen\src\components\Table.module.css
|
|
30182
|
-
var Table_default = { "table": "
|
|
30182
|
+
var Table_default = { "table": "Table_table__MjczZ", "header": "Table_header__YjU3M", "body": "Table_body__MzgxM", "row": "Table_row__MTdmZ", "column": "Table_column__ZDFlM", "cell": "Table_cell__NzhiM", "start": "Table_start__ODJiN", "center": "Table_center__MTI5M", "end": "Table_end__MjE3N" };
|
|
30183
30183
|
|
|
30184
30184
|
// src/components/Table.tsx
|
|
30185
30185
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
30186
|
+
var gridTemplateColumns = "repeat(auto-fit, minmax(140px, 1fr))";
|
|
30186
30187
|
function Table2({ children, className, ...props }) {
|
|
30187
30188
|
return /* @__PURE__ */ jsx32($1910c06f0ca9905e$export$54ec01a60f47d33d, { ...props, className: (0, import_classnames23.default)(Table_default.table, className), "aria-label": "Table", children });
|
|
30188
30189
|
}
|
|
30189
|
-
function TableHeader({ children, className, ...props }) {
|
|
30190
|
-
return /* @__PURE__ */ jsx32(
|
|
30190
|
+
function TableHeader({ children, className, style, ...props }) {
|
|
30191
|
+
return /* @__PURE__ */ jsx32(
|
|
30192
|
+
$1910c06f0ca9905e$export$f850895b287ef28e,
|
|
30193
|
+
{
|
|
30194
|
+
...props,
|
|
30195
|
+
className: (0, import_classnames23.default)(Table_default.header, className),
|
|
30196
|
+
style: { gridTemplateColumns, ...style },
|
|
30197
|
+
children
|
|
30198
|
+
}
|
|
30199
|
+
);
|
|
30191
30200
|
}
|
|
30192
30201
|
function TableBody({ children, className, ...props }) {
|
|
30193
30202
|
return /* @__PURE__ */ jsx32($1910c06f0ca9905e$export$76ccd210b9029917, { ...props, className: (0, import_classnames23.default)(Table_default.body, className), children });
|
|
30194
30203
|
}
|
|
30195
|
-
function TableRow({ children, className, ...props }) {
|
|
30196
|
-
return /* @__PURE__ */ jsx32(
|
|
30204
|
+
function TableRow({ children, className, style, ...props }) {
|
|
30205
|
+
return /* @__PURE__ */ jsx32(
|
|
30206
|
+
$1910c06f0ca9905e$export$b59bdbef9ce70de2,
|
|
30207
|
+
{
|
|
30208
|
+
...props,
|
|
30209
|
+
className: (0, import_classnames23.default)(Table_default.row, className),
|
|
30210
|
+
style: { gridTemplateColumns, ...style },
|
|
30211
|
+
children
|
|
30212
|
+
}
|
|
30213
|
+
);
|
|
30197
30214
|
}
|
|
30198
30215
|
function TableColumn({ children, className, align, ...props }) {
|
|
30199
30216
|
return /* @__PURE__ */ jsx32(
|
|
@@ -30221,15 +30238,16 @@ function DataTable({ data = [], className, children, ...props }) {
|
|
|
30221
30238
|
const columns = Children2.map(children, (child) => {
|
|
30222
30239
|
return { ...child.props };
|
|
30223
30240
|
});
|
|
30241
|
+
const gridTemplateColumns2 = columns.map(({ width }) => width || "1fr").join(" ");
|
|
30224
30242
|
return /* @__PURE__ */ jsxs16(Table2, { ...props, className: (0, import_classnames24.default)(DataTable_default.datatable, className), children: [
|
|
30225
|
-
/* @__PURE__ */ jsx33(TableHeader, { children: columns.filter((n) => n).map(({ id, label, as, hidden, ...columnProps }) => {
|
|
30243
|
+
/* @__PURE__ */ jsx33(TableHeader, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns.filter((n) => n).map(({ id, label, as, hidden, ...columnProps }) => {
|
|
30226
30244
|
if (hidden) {
|
|
30227
30245
|
return null;
|
|
30228
30246
|
}
|
|
30229
30247
|
return /* @__PURE__ */ createElement6(TableColumn, { ...columnProps, key: id, id }, label);
|
|
30230
30248
|
}) }),
|
|
30231
30249
|
/* @__PURE__ */ jsx33(TableBody, { items, children: (row) => {
|
|
30232
|
-
return /* @__PURE__ */ jsx33(TableRow, { children: columns.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
30250
|
+
return /* @__PURE__ */ jsx33(TableRow, { style: { gridTemplateColumns: gridTemplateColumns2 }, children: columns.map(({ id, as, hidden, className: className2, children: children2, ...cellProps }) => {
|
|
30233
30251
|
const value = typeof children2 === "function" ? children2(row) : children2 || row[id];
|
|
30234
30252
|
return /* @__PURE__ */ createElement6(
|
|
30235
30253
|
TableCell,
|
|
@@ -30920,6 +30938,7 @@ var Select2 = forwardRef9(
|
|
|
30920
30938
|
({
|
|
30921
30939
|
items = [],
|
|
30922
30940
|
value,
|
|
30941
|
+
defaultValue,
|
|
30923
30942
|
label,
|
|
30924
30943
|
isLoading,
|
|
30925
30944
|
allowSearch,
|
|
@@ -30945,35 +30964,46 @@ var Select2 = forwardRef9(
|
|
|
30945
30964
|
setSearch(value2);
|
|
30946
30965
|
onSearch?.(value2);
|
|
30947
30966
|
};
|
|
30948
|
-
return /* @__PURE__ */ jsxs30(
|
|
30949
|
-
|
|
30950
|
-
|
|
30951
|
-
|
|
30952
|
-
|
|
30953
|
-
|
|
30954
|
-
|
|
30955
|
-
|
|
30956
|
-
|
|
30957
|
-
|
|
30958
|
-
|
|
30959
|
-
|
|
30960
|
-
|
|
30961
|
-
|
|
30962
|
-
|
|
30963
|
-
|
|
30964
|
-
|
|
30965
|
-
|
|
30966
|
-
|
|
30967
|
-
|
|
30968
|
-
|
|
30969
|
-
|
|
30970
|
-
|
|
30971
|
-
|
|
30972
|
-
|
|
30973
|
-
|
|
30974
|
-
|
|
30975
|
-
|
|
30976
|
-
|
|
30967
|
+
return /* @__PURE__ */ jsxs30(
|
|
30968
|
+
$82d7e5349645de74$export$ef9b1a59e592288f,
|
|
30969
|
+
{
|
|
30970
|
+
"aria-label": "Select",
|
|
30971
|
+
...props,
|
|
30972
|
+
ref,
|
|
30973
|
+
selectedKey: value,
|
|
30974
|
+
defaultSelectedKey: defaultValue,
|
|
30975
|
+
onSelectionChange: handleChange,
|
|
30976
|
+
children: [
|
|
30977
|
+
label && /* @__PURE__ */ jsx53(Label2, { children: label }),
|
|
30978
|
+
/* @__PURE__ */ jsx53(Button2, { variant: "outline", ...buttonProps, children: /* @__PURE__ */ jsxs30(Row, { justifyContent: "space-between", gap: "3", children: [
|
|
30979
|
+
/* @__PURE__ */ jsx53($82d7e5349645de74$export$e288731fd71264f0, { children: renderValue }),
|
|
30980
|
+
/* @__PURE__ */ jsx53("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx53(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ jsx53(Icons.Chevron, {}) }) })
|
|
30981
|
+
] }) }),
|
|
30982
|
+
/* @__PURE__ */ jsx53(Popover2, { ...popoverProps, children: /* @__PURE__ */ jsx53(Column, { children: /* @__PURE__ */ jsxs30(Box, { padding: "2", border: true, borderRadius: true, backgroundColor: true, shadow: "3", children: [
|
|
30983
|
+
allowSearch && /* @__PURE__ */ jsx53(Box, { marginBottom: "2", children: /* @__PURE__ */ jsx53(
|
|
30984
|
+
SearchField2,
|
|
30985
|
+
{
|
|
30986
|
+
value: search,
|
|
30987
|
+
onSearch: handleSearch,
|
|
30988
|
+
delay: searchDelay,
|
|
30989
|
+
defaultValue: searchValue,
|
|
30990
|
+
autoFocus: true
|
|
30991
|
+
}
|
|
30992
|
+
) }),
|
|
30993
|
+
isLoading && /* @__PURE__ */ jsx53(Loading, { icon: "dots", position: "center", size: "sm" }),
|
|
30994
|
+
/* @__PURE__ */ jsx53(
|
|
30995
|
+
List,
|
|
30996
|
+
{
|
|
30997
|
+
...listProps,
|
|
30998
|
+
items,
|
|
30999
|
+
style: { ...listProps?.style, display: isLoading ? "none" : void 0 },
|
|
31000
|
+
children
|
|
31001
|
+
}
|
|
31002
|
+
)
|
|
31003
|
+
] }) }) })
|
|
31004
|
+
]
|
|
31005
|
+
}
|
|
31006
|
+
);
|
|
30977
31007
|
}
|
|
30978
31008
|
);
|
|
30979
31009
|
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -4030,56 +4030,59 @@ body a.Button_button__NDYwM {
|
|
|
4030
4030
|
}
|
|
4031
4031
|
|
|
4032
4032
|
/* virtual-css:css:eedba9fc7e3d8030bbd07387da49f358 */
|
|
4033
|
-
.
|
|
4033
|
+
.Table_table__MjczZ {
|
|
4034
4034
|
font-size: var(--font-size);
|
|
4035
4035
|
color: var(--font-color);
|
|
4036
4036
|
border-collapse: collapse;
|
|
4037
4037
|
width: 100%;
|
|
4038
4038
|
position: relative;
|
|
4039
4039
|
}
|
|
4040
|
-
.
|
|
4041
|
-
.
|
|
4040
|
+
.Table_table__MjczZ th,
|
|
4041
|
+
.Table_table__MjczZ td {
|
|
4042
4042
|
min-width: 0;
|
|
4043
4043
|
}
|
|
4044
|
-
.
|
|
4045
|
-
.
|
|
4044
|
+
.Table_header__YjU3M,
|
|
4045
|
+
.Table_body__MzgxM {
|
|
4046
4046
|
display: contents;
|
|
4047
4047
|
}
|
|
4048
|
-
.
|
|
4049
|
-
display:
|
|
4048
|
+
.Table_header__YjU3M {
|
|
4049
|
+
display: grid;
|
|
4050
4050
|
border-bottom: 1px solid var(--border-color);
|
|
4051
4051
|
}
|
|
4052
|
-
.
|
|
4053
|
-
display:
|
|
4052
|
+
.Table_header__YjU3M tr {
|
|
4053
|
+
display: contents;
|
|
4054
|
+
}
|
|
4055
|
+
.Table_row__MTdmZ {
|
|
4056
|
+
display: grid;
|
|
4054
4057
|
border-bottom: 1px solid color-mix(in srgb, var(--border-color), 50% transparent);
|
|
4055
4058
|
}
|
|
4056
|
-
.
|
|
4057
|
-
.
|
|
4059
|
+
.Table_header__YjU3M .Table_column__ZDFlM:first-child,
|
|
4060
|
+
.Table_row__MTdmZ .Table_cell__NzhiM:first-child {
|
|
4058
4061
|
padding-left: 0;
|
|
4059
4062
|
}
|
|
4060
|
-
.
|
|
4061
|
-
.
|
|
4063
|
+
.Table_header__YjU3M .Table_column__ZDFlM:last-child,
|
|
4064
|
+
.Table_row__MTdmZ .Table_cell__NzhiM:last-child {
|
|
4062
4065
|
padding-right: 0;
|
|
4063
4066
|
}
|
|
4064
|
-
.
|
|
4067
|
+
.Table_column__ZDFlM {
|
|
4065
4068
|
display: flex;
|
|
4066
4069
|
padding: var(--padding);
|
|
4067
4070
|
text-align: left;
|
|
4068
4071
|
font-weight: 700;
|
|
4069
4072
|
flex: 1;
|
|
4070
4073
|
}
|
|
4071
|
-
.
|
|
4074
|
+
.Table_cell__NzhiM {
|
|
4072
4075
|
display: flex;
|
|
4073
4076
|
padding: var(--padding);
|
|
4074
4077
|
flex: 1;
|
|
4075
4078
|
}
|
|
4076
|
-
.
|
|
4079
|
+
.Table_start__ODJiN {
|
|
4077
4080
|
justify-content: flex-start;
|
|
4078
4081
|
}
|
|
4079
|
-
.
|
|
4082
|
+
.Table_center__MTI5M {
|
|
4080
4083
|
justify-content: center;
|
|
4081
4084
|
}
|
|
4082
|
-
.
|
|
4085
|
+
.Table_end__MjE3N {
|
|
4083
4086
|
justify-content: flex-end;
|
|
4084
4087
|
}
|
|
4085
4088
|
|