@marigold/components 9.0.0 → 9.0.1
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/index.d.mts +26 -7
- package/dist/index.d.ts +26 -7
- package/dist/index.js +155 -145
- package/dist/index.mjs +21 -11
- package/package.json +23 -23
package/dist/index.mjs
CHANGED
|
@@ -306,10 +306,9 @@ var Aspect = ({
|
|
|
306
306
|
};
|
|
307
307
|
|
|
308
308
|
// src/Autocomplete/Autocomplete.tsx
|
|
309
|
-
import {
|
|
309
|
+
import React, {
|
|
310
310
|
forwardRef as forwardRef8
|
|
311
311
|
} from "react";
|
|
312
|
-
import React from "react";
|
|
313
312
|
import { ComboBox, ComboBoxStateContext } from "react-aria-components";
|
|
314
313
|
import { cn as cn13, useClassNames as useClassNames9 } from "@marigold/system";
|
|
315
314
|
|
|
@@ -705,7 +704,7 @@ var Underlay = ({
|
|
|
705
704
|
ModalOverlay,
|
|
706
705
|
{
|
|
707
706
|
className: ({ isEntering, isExiting }) => cn11(
|
|
708
|
-
"fixed inset-0 z-40 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur
|
|
707
|
+
"fixed inset-0 z-40 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur",
|
|
709
708
|
isEntering ? "animate-in fade-in duration-300 ease-out" : "",
|
|
710
709
|
isExiting ? "animate-out fade-out duration-200 ease-in" : "",
|
|
711
710
|
classNames2
|
|
@@ -1106,7 +1105,6 @@ var _Checkbox = forwardRef11(
|
|
|
1106
1105
|
};
|
|
1107
1106
|
const { labelWidth } = useFieldGroupContext();
|
|
1108
1107
|
const group = useCheckboxGroupContext();
|
|
1109
|
-
console.log(group);
|
|
1110
1108
|
const classNames2 = useClassNames16({
|
|
1111
1109
|
component: "Checkbox",
|
|
1112
1110
|
variant: variant || (group == null ? void 0 : group.variant),
|
|
@@ -2974,7 +2972,7 @@ var _Switch = forwardRef22(
|
|
|
2974
2972
|
"div",
|
|
2975
2973
|
{
|
|
2976
2974
|
className: cn48(
|
|
2977
|
-
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed
|
|
2975
|
+
"h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed",
|
|
2978
2976
|
classNames2.track
|
|
2979
2977
|
),
|
|
2980
2978
|
children: /* @__PURE__ */ jsx80(
|
|
@@ -3019,8 +3017,20 @@ var useTableContext = () => useContext15(TableContext);
|
|
|
3019
3017
|
// src/Table/TableBody.tsx
|
|
3020
3018
|
import { useTableRowGroup } from "@react-aria/table";
|
|
3021
3019
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
3022
|
-
var TableBody = ({ children }) => {
|
|
3020
|
+
var TableBody = ({ children, emptyState }) => {
|
|
3023
3021
|
const { rowGroupProps } = useTableRowGroup();
|
|
3022
|
+
const { state, classNames: classNames2 } = useTableContext();
|
|
3023
|
+
if (state.collection.size === 0 && emptyState) {
|
|
3024
|
+
return /* @__PURE__ */ jsx81("tr", { className: classNames2 == null ? void 0 : classNames2.row, role: "row", children: /* @__PURE__ */ jsx81(
|
|
3025
|
+
"td",
|
|
3026
|
+
{
|
|
3027
|
+
className: classNames2 == null ? void 0 : classNames2.cell,
|
|
3028
|
+
colSpan: state.collection.size,
|
|
3029
|
+
role: "rowheader",
|
|
3030
|
+
children: emptyState()
|
|
3031
|
+
}
|
|
3032
|
+
) });
|
|
3033
|
+
}
|
|
3024
3034
|
return /* @__PURE__ */ jsx81("tbody", { ...rowGroupProps, children });
|
|
3025
3035
|
};
|
|
3026
3036
|
|
|
@@ -3130,8 +3140,7 @@ import { useHover } from "@react-aria/interactions";
|
|
|
3130
3140
|
import { useTableColumnHeader } from "@react-aria/table";
|
|
3131
3141
|
import { mergeProps as mergeProps5 } from "@react-aria/utils";
|
|
3132
3142
|
import { SortDown, SortUp } from "@marigold/icons";
|
|
3133
|
-
import { cn as cn51, useStateProps as useStateProps4 } from "@marigold/system";
|
|
3134
|
-
import { width as twWidth5 } from "@marigold/system";
|
|
3143
|
+
import { cn as cn51, width as twWidth5, useStateProps as useStateProps4 } from "@marigold/system";
|
|
3135
3144
|
import { jsx as jsx84, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3136
3145
|
var TableColumnHeader = ({
|
|
3137
3146
|
column,
|
|
@@ -3165,7 +3174,7 @@ var TableColumnHeader = ({
|
|
|
3165
3174
|
align,
|
|
3166
3175
|
children: [
|
|
3167
3176
|
column.rendered,
|
|
3168
|
-
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx84(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx84(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx84(SortDown, { className: "inline-block" }))
|
|
3177
|
+
column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx84(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx84(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx84("span", { className: "invisible", children: /* @__PURE__ */ jsx84(SortDown, { className: "inline-block" }) }))
|
|
3169
3178
|
]
|
|
3170
3179
|
}
|
|
3171
3180
|
);
|
|
@@ -3291,7 +3300,7 @@ var TableSelectAllCell = ({
|
|
|
3291
3300
|
"th",
|
|
3292
3301
|
{
|
|
3293
3302
|
ref,
|
|
3294
|
-
className: cn53(twWidth6[width], ["
|
|
3303
|
+
className: cn53(twWidth6[width], ["leading-none"], classNames2 == null ? void 0 : classNames2.header),
|
|
3295
3304
|
...mergeProps7(columnHeaderProps, hoverProps, focusProps),
|
|
3296
3305
|
...stateProps,
|
|
3297
3306
|
align,
|
|
@@ -3309,6 +3318,7 @@ var Table = ({
|
|
|
3309
3318
|
selectionMode = "none",
|
|
3310
3319
|
disableKeyboardNavigation = false,
|
|
3311
3320
|
stickyHeader,
|
|
3321
|
+
emptyState,
|
|
3312
3322
|
...props
|
|
3313
3323
|
}) => {
|
|
3314
3324
|
const interactive = selectionMode !== "none";
|
|
@@ -3367,7 +3377,7 @@ var Table = ({
|
|
|
3367
3377
|
);
|
|
3368
3378
|
}
|
|
3369
3379
|
) }, headerRow.key)) }),
|
|
3370
|
-
/* @__PURE__ */ jsxs34(TableBody, { children: [
|
|
3380
|
+
/* @__PURE__ */ jsxs34(TableBody, { emptyState, children: [
|
|
3371
3381
|
...collection.rows.map(
|
|
3372
3382
|
(row) => row.type === "item" && /* @__PURE__ */ jsx89(TableRow, { row, children: [...collection.getChildren(row.key)].map((cell, index) => {
|
|
3373
3383
|
var _a, _b;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marigold/components",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "Components for the Marigold Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
"directory": "packages/components"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@internationalized/date": "3.5.
|
|
27
|
-
"@react-aria/accordion": "3.0.0-alpha.
|
|
28
|
-
"@react-aria/button": "3.9.
|
|
29
|
-
"@react-aria/calendar": "3.5.
|
|
30
|
-
"@react-aria/focus": "3.
|
|
31
|
-
"@react-aria/i18n": "3.
|
|
32
|
-
"@react-aria/interactions": "3.
|
|
33
|
-
"@react-aria/overlays": "3.
|
|
34
|
-
"@react-aria/selection": "3.
|
|
35
|
-
"@react-aria/ssr": "3.9.
|
|
36
|
-
"@react-aria/table": "3.
|
|
37
|
-
"@react-aria/utils": "3.
|
|
38
|
-
"@react-aria/visually-hidden": "3.8.
|
|
39
|
-
"@react-stately/collections": "3.10.
|
|
40
|
-
"@react-stately/data": "3.11.
|
|
41
|
-
"@react-stately/table": "3.
|
|
42
|
-
"@react-stately/tree": "3.8.
|
|
43
|
-
"@react-types/shared": "3.
|
|
44
|
-
"@react-types/table": "3.
|
|
45
|
-
"react-aria-components": "1.
|
|
46
|
-
"@marigold/icons": "1.2.
|
|
47
|
-
"@marigold/system": "9.0.
|
|
26
|
+
"@internationalized/date": "3.5.5",
|
|
27
|
+
"@react-aria/accordion": "3.0.0-alpha.31",
|
|
28
|
+
"@react-aria/button": "3.9.7",
|
|
29
|
+
"@react-aria/calendar": "3.5.10",
|
|
30
|
+
"@react-aria/focus": "3.18.1",
|
|
31
|
+
"@react-aria/i18n": "3.12.1",
|
|
32
|
+
"@react-aria/interactions": "3.22.1",
|
|
33
|
+
"@react-aria/overlays": "3.23.1",
|
|
34
|
+
"@react-aria/selection": "3.19.1",
|
|
35
|
+
"@react-aria/ssr": "3.9.5",
|
|
36
|
+
"@react-aria/table": "3.15.1",
|
|
37
|
+
"@react-aria/utils": "3.25.1",
|
|
38
|
+
"@react-aria/visually-hidden": "3.8.14",
|
|
39
|
+
"@react-stately/collections": "3.10.9",
|
|
40
|
+
"@react-stately/data": "3.11.6",
|
|
41
|
+
"@react-stately/table": "3.12.1",
|
|
42
|
+
"@react-stately/tree": "3.8.3",
|
|
43
|
+
"@react-types/shared": "3.24.1",
|
|
44
|
+
"@react-types/table": "3.10.1",
|
|
45
|
+
"react-aria-components": "1.3.1",
|
|
46
|
+
"@marigold/icons": "1.2.56",
|
|
47
|
+
"@marigold/system": "9.0.1",
|
|
48
48
|
"@marigold/types": "1.1.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|