@marigold/components 6.7.0 → 6.8.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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +25 -21
- package/dist/index.mjs +35 -31
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -179,6 +179,7 @@ interface HelpTextProps {
|
|
|
179
179
|
size?: string;
|
|
180
180
|
description?: ReactNode;
|
|
181
181
|
error?: boolean;
|
|
182
|
+
isInvalid?: ValidationResult['isInvalid'];
|
|
182
183
|
errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
|
|
183
184
|
}
|
|
184
185
|
|
|
@@ -311,7 +312,7 @@ interface FooterProps extends Omit<HtmlProps<'footer'>, 'className'> {
|
|
|
311
312
|
}
|
|
312
313
|
declare const Footer: ({ children, variant, size, ...props }: FooterProps) => react_jsx_runtime.JSX.Element;
|
|
313
314
|
|
|
314
|
-
interface HeaderProps extends Omit<RAC.HeadingProps, 'children'
|
|
315
|
+
interface HeaderProps extends Omit<RAC.HeadingProps, 'children'> {
|
|
315
316
|
children?: ReactNode;
|
|
316
317
|
variant?: string;
|
|
317
318
|
size?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ interface HelpTextProps {
|
|
|
179
179
|
size?: string;
|
|
180
180
|
description?: ReactNode;
|
|
181
181
|
error?: boolean;
|
|
182
|
+
isInvalid?: ValidationResult['isInvalid'];
|
|
182
183
|
errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
|
|
183
184
|
}
|
|
184
185
|
|
|
@@ -311,7 +312,7 @@ interface FooterProps extends Omit<HtmlProps<'footer'>, 'className'> {
|
|
|
311
312
|
}
|
|
312
313
|
declare const Footer: ({ children, variant, size, ...props }: FooterProps) => react_jsx_runtime.JSX.Element;
|
|
313
314
|
|
|
314
|
-
interface HeaderProps extends Omit<RAC.HeadingProps, 'children'
|
|
315
|
+
interface HeaderProps extends Omit<RAC.HeadingProps, 'children'> {
|
|
315
316
|
children?: ReactNode;
|
|
316
317
|
variant?: string;
|
|
317
318
|
size?: string;
|
package/dist/index.js
CHANGED
|
@@ -1387,6 +1387,7 @@ var HelpText2 = ({
|
|
|
1387
1387
|
description,
|
|
1388
1388
|
error,
|
|
1389
1389
|
errorMessage,
|
|
1390
|
+
isInvalid,
|
|
1390
1391
|
...props
|
|
1391
1392
|
}) => {
|
|
1392
1393
|
const hasErrorMessage = errorMessage && error;
|
|
@@ -1398,27 +1399,29 @@ var HelpText2 = ({
|
|
|
1398
1399
|
if (!description && !errorMessage) {
|
|
1399
1400
|
return null;
|
|
1400
1401
|
}
|
|
1401
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_system23.cn)(classNames2.container), children: [
|
|
1403
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1404
|
+
import_react_aria_components4.FieldError,
|
|
1405
|
+
{
|
|
1406
|
+
...props,
|
|
1407
|
+
className: "grid grid-flow-col items-center justify-start gap-1",
|
|
1408
|
+
children: [
|
|
1409
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1410
|
+
"svg",
|
|
1411
|
+
{
|
|
1412
|
+
className: (0, import_system23.cn)("h-4 w-4", classNames2.icon),
|
|
1413
|
+
viewBox: "0 0 24 24",
|
|
1414
|
+
role: "presentation",
|
|
1415
|
+
fill: "currentColor",
|
|
1416
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
1417
|
+
}
|
|
1418
|
+
),
|
|
1419
|
+
errorMessage
|
|
1420
|
+
]
|
|
1421
|
+
}
|
|
1422
|
+
),
|
|
1423
|
+
!hasErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_aria_components4.Text, { slot: "description", children: description })
|
|
1424
|
+
] });
|
|
1422
1425
|
};
|
|
1423
1426
|
|
|
1424
1427
|
// src/FieldBase/_FieldBase.tsx
|
|
@@ -1447,6 +1450,7 @@ var _FieldBase = (props, ref) => {
|
|
|
1447
1450
|
{
|
|
1448
1451
|
ref,
|
|
1449
1452
|
className: (0, import_system24.cn)("group/field", import_system24.width[width], classNames2, className),
|
|
1453
|
+
"data-required": props.isRequired ? true : void 0,
|
|
1450
1454
|
...rest,
|
|
1451
1455
|
children: [
|
|
1452
1456
|
label ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(_Label, { variant, size, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { "aria-hidden": "true" }),
|
package/dist/index.mjs
CHANGED
|
@@ -1304,15 +1304,16 @@ import { forwardRef as forwardRef10 } from "react";
|
|
|
1304
1304
|
import { cn as cn17, width as twWidth2, useClassNames as useClassNames15 } from "@marigold/system";
|
|
1305
1305
|
|
|
1306
1306
|
// src/HelpText/_HelpText.tsx
|
|
1307
|
-
import { Text } from "react-aria-components";
|
|
1307
|
+
import { FieldError, Text } from "react-aria-components";
|
|
1308
1308
|
import { cn as cn16, useClassNames as useClassNames14 } from "@marigold/system";
|
|
1309
|
-
import {
|
|
1309
|
+
import { jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1310
1310
|
var HelpText2 = ({
|
|
1311
1311
|
variant,
|
|
1312
1312
|
size,
|
|
1313
1313
|
description,
|
|
1314
1314
|
error,
|
|
1315
1315
|
errorMessage,
|
|
1316
|
+
isInvalid,
|
|
1316
1317
|
...props
|
|
1317
1318
|
}) => {
|
|
1318
1319
|
const hasErrorMessage = errorMessage && error;
|
|
@@ -1324,27 +1325,29 @@ var HelpText2 = ({
|
|
|
1324
1325
|
if (!description && !errorMessage) {
|
|
1325
1326
|
return null;
|
|
1326
1327
|
}
|
|
1327
|
-
return /* @__PURE__ */
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1328
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn16(classNames2.container), children: [
|
|
1329
|
+
/* @__PURE__ */ jsxs14(
|
|
1330
|
+
FieldError,
|
|
1331
|
+
{
|
|
1332
|
+
...props,
|
|
1333
|
+
className: "grid grid-flow-col items-center justify-start gap-1",
|
|
1334
|
+
children: [
|
|
1335
|
+
/* @__PURE__ */ jsx30(
|
|
1336
|
+
"svg",
|
|
1337
|
+
{
|
|
1338
|
+
className: cn16("h-4 w-4", classNames2.icon),
|
|
1339
|
+
viewBox: "0 0 24 24",
|
|
1340
|
+
role: "presentation",
|
|
1341
|
+
fill: "currentColor",
|
|
1342
|
+
children: /* @__PURE__ */ jsx30("path", { d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z" })
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
errorMessage
|
|
1346
|
+
]
|
|
1347
|
+
}
|
|
1348
|
+
),
|
|
1349
|
+
!hasErrorMessage && /* @__PURE__ */ jsx30(Text, { slot: "description", children: description })
|
|
1350
|
+
] });
|
|
1348
1351
|
};
|
|
1349
1352
|
|
|
1350
1353
|
// src/FieldBase/_FieldBase.tsx
|
|
@@ -1373,6 +1376,7 @@ var _FieldBase = (props, ref) => {
|
|
|
1373
1376
|
{
|
|
1374
1377
|
ref,
|
|
1375
1378
|
className: cn17("group/field", twWidth2[width], classNames2, className),
|
|
1379
|
+
"data-required": props.isRequired ? true : void 0,
|
|
1376
1380
|
...rest,
|
|
1377
1381
|
children: [
|
|
1378
1382
|
label ? /* @__PURE__ */ jsx31(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx31("span", { "aria-hidden": "true" }),
|
|
@@ -2175,7 +2179,7 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
|
|
|
2175
2179
|
var YearDropdown_default = YearDropdown;
|
|
2176
2180
|
|
|
2177
2181
|
// src/Calendar/Calendar.tsx
|
|
2178
|
-
import { Fragment as
|
|
2182
|
+
import { Fragment as Fragment5, jsx as jsx50, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2179
2183
|
var buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
|
|
2180
2184
|
var Calendar = ({
|
|
2181
2185
|
disabled,
|
|
@@ -2255,7 +2259,7 @@ var Calendar = ({
|
|
|
2255
2259
|
setSelectedDropdown,
|
|
2256
2260
|
state
|
|
2257
2261
|
}
|
|
2258
|
-
) : /* @__PURE__ */ jsxs21(
|
|
2262
|
+
) : /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
2259
2263
|
/* @__PURE__ */ jsxs21("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2260
2264
|
/* @__PURE__ */ jsxs21("div", { className: "flex w-full gap-4", children: [
|
|
2261
2265
|
/* @__PURE__ */ jsxs21(
|
|
@@ -2311,7 +2315,7 @@ import { useDatePicker } from "@react-aria/datepicker";
|
|
|
2311
2315
|
import { mergeProps as mergeProps9 } from "@react-aria/utils";
|
|
2312
2316
|
import { useDatePickerState } from "@react-stately/datepicker";
|
|
2313
2317
|
import { useClassNames as useClassNames26, useStateProps as useStateProps8 } from "@marigold/system";
|
|
2314
|
-
import { Fragment as
|
|
2318
|
+
import { Fragment as Fragment6, jsx as jsx51, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2315
2319
|
var DatePicker = ({
|
|
2316
2320
|
disabled,
|
|
2317
2321
|
required,
|
|
@@ -2350,7 +2354,7 @@ var DatePicker = ({
|
|
|
2350
2354
|
size,
|
|
2351
2355
|
variant
|
|
2352
2356
|
});
|
|
2353
|
-
return /* @__PURE__ */ jsxs22(
|
|
2357
|
+
return /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
2354
2358
|
/* @__PURE__ */ jsx51("div", { className: "flex w-full min-w-[300px]", ...groupProps, children: /* @__PURE__ */ jsx51(
|
|
2355
2359
|
DateField,
|
|
2356
2360
|
{
|
|
@@ -2517,14 +2521,14 @@ var MenuItem = ({
|
|
|
2517
2521
|
// src/Menu/MenuSection.tsx
|
|
2518
2522
|
import { useMenuSection } from "@react-aria/menu";
|
|
2519
2523
|
import { useClassNames as useClassNames29 } from "@marigold/system";
|
|
2520
|
-
import { Fragment as
|
|
2524
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2521
2525
|
var MenuSection = ({ onAction, item, state }) => {
|
|
2522
2526
|
let { itemProps, headingProps, groupProps } = useMenuSection({
|
|
2523
2527
|
heading: item.rendered,
|
|
2524
2528
|
"aria-label": item["aria-label"]
|
|
2525
2529
|
});
|
|
2526
2530
|
const className = useClassNames29({ component: "Menu" });
|
|
2527
|
-
return /* @__PURE__ */ jsxs23(
|
|
2531
|
+
return /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
2528
2532
|
item.key !== state.collection.getFirstKey() && /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(_Divider, { variant: "section" }) }),
|
|
2529
2533
|
/* @__PURE__ */ jsxs23("li", { ...itemProps, children: [
|
|
2530
2534
|
item.rendered && /* @__PURE__ */ jsx57("span", { ...headingProps, className: className.section, children: item.rendered }),
|
|
@@ -2992,7 +2996,7 @@ var _RadioGroup = ({
|
|
|
2992
2996
|
};
|
|
2993
2997
|
|
|
2994
2998
|
// src/Radio/Radio.tsx
|
|
2995
|
-
import { Fragment as
|
|
2999
|
+
import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2996
3000
|
var Dot = () => /* @__PURE__ */ jsx66("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx66("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
|
|
2997
3001
|
var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx66(
|
|
2998
3002
|
"div",
|
|
@@ -3027,7 +3031,7 @@ var _Radio = forwardRef13(
|
|
|
3027
3031
|
value,
|
|
3028
3032
|
isDisabled: disabled,
|
|
3029
3033
|
...props,
|
|
3030
|
-
children: ({ isSelected }) => /* @__PURE__ */ jsxs28(
|
|
3034
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3031
3035
|
/* @__PURE__ */ jsx66(
|
|
3032
3036
|
Icon2,
|
|
3033
3037
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marigold/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "Components for the Marigold Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@react-types/table": "3.9.1",
|
|
86
86
|
"@react-types/tooltip": "3.4.6",
|
|
87
87
|
"react-aria-components": "1.0.0-rc.0",
|
|
88
|
-
"@marigold/icons": "1.2.
|
|
89
|
-
"@marigold/system": "6.
|
|
88
|
+
"@marigold/icons": "1.2.27",
|
|
89
|
+
"@marigold/system": "6.8.0",
|
|
90
90
|
"@marigold/types": "1.1.0"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|