fictoan-react 2.0.0-beta.18 → 2.0.0-beta.19
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/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +17 -18
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +37 -38
- package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Callout/Callout.js +31 -25
- package/dist/components/Callout/Callout.js.map +1 -1
- package/dist/components/Divider/Divider.js +7 -7
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/Element/Element.d.ts.map +1 -1
- package/dist/components/Element/Element.js +135 -133
- package/dist/components/Element/Element.js.map +1 -1
- package/dist/components/Element/constants.d.ts +21 -21
- package/dist/components/Element/constants.d.ts.map +1 -1
- package/dist/components/Element/constants.js.map +1 -1
- package/dist/components/Form/Checkbox/Switch.d.ts.map +1 -1
- package/dist/components/Form/Checkbox/Switch.js +11 -10
- package/dist/components/Form/Checkbox/Switch.js.map +1 -1
- package/dist/components/Form/FormItemGroup/FormItemGroup.d.ts.map +1 -1
- package/dist/components/Form/FormItemGroup/FormItemGroup.js +17 -17
- package/dist/components/Form/FormItemGroup/FormItemGroup.js.map +1 -1
- package/dist/components/Form/ListBox/ListBox.d.ts +1 -1
- package/dist/components/Form/ListBox/ListBox.d.ts.map +1 -1
- package/dist/components/Form/ListBox/ListBox.js +110 -107
- package/dist/components/Form/ListBox/ListBox.js.map +1 -1
- package/dist/components/Form/RadioButton/RadioTabGroup.d.ts +1 -1
- package/dist/components/Form/RadioButton/RadioTabGroup.js +46 -46
- package/dist/components/Form/RadioButton/RadioTabGroup.js.map +1 -1
- package/dist/components/Form/Select/Select.d.ts +1 -1
- package/dist/components/Form/Select/Select.d.ts.map +1 -1
- package/dist/components/Meter/Meter.d.ts.map +1 -1
- package/dist/components/Meter/Meter.js +54 -59
- package/dist/components/Meter/Meter.js.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +20 -19
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Notification/NotificationsProvider/NotificationsProvider.d.ts.map +1 -1
- package/dist/components/Notification/NotificationsProvider/NotificationsProvider.js +44 -44
- package/dist/components/Notification/NotificationsProvider/NotificationsProvider.js.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +42 -41
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Portion/Portion.d.ts +1 -0
- package/dist/components/Portion/Portion.d.ts.map +1 -1
- package/dist/components/Portion/Portion.js +13 -12
- package/dist/components/Portion/Portion.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +23 -26
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/Row/Row.d.ts +1 -0
- package/dist/components/Row/Row.d.ts.map +1 -1
- package/dist/components/Row/Row.js +22 -22
- package/dist/components/Row/Row.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +25 -27
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Table/Table.d.ts +0 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +21 -34
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +49 -47
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Toast/ToastsProvider/ToastsProvider.d.ts.map +1 -1
- package/dist/components/Toast/ToastsProvider/ToastsProvider.js +22 -22
- package/dist/components/Toast/ToastsProvider/ToastsProvider.js.map +1 -1
- package/dist/components/Typography/Heading.js +11 -11
- package/dist/components/Typography/Heading.js.map +1 -1
- package/dist/components/Typography/Text.js +7 -7
- package/dist/components/Typography/Text.js.map +1 -1
- package/dist/fictoan-schema.json +33 -37
- package/dist/index.css +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +129 -127
- package/dist/index.js.map +1 -1
- package/dist/utils/classNames.d.ts +1 -1
- package/dist/utils/classNames.d.ts.map +1 -1
- package/dist/utils/classNames.js.map +1 -1
- package/dist/utils/propSeparation.js +4 -4
- package/dist/utils/propSeparation.js.map +1 -1
- package/package.json +14 -3
|
@@ -2,55 +2,52 @@
|
|
|
2
2
|
import { jsxs as m, Fragment as b, jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import y from "react";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { Text as
|
|
6
|
-
import { Element as
|
|
5
|
+
import { Text as d } from "../Typography/Text.js";
|
|
6
|
+
import { Element as g } from "../Element/Element.js";
|
|
7
7
|
const B = y.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
label: r,
|
|
10
|
-
value:
|
|
11
|
-
height:
|
|
12
|
-
max:
|
|
13
|
-
shape:
|
|
14
|
-
bgColor:
|
|
10
|
+
value: p,
|
|
11
|
+
height: c,
|
|
12
|
+
max: e = 100,
|
|
13
|
+
shape: l,
|
|
14
|
+
bgColor: u,
|
|
15
15
|
bgColour: f,
|
|
16
|
-
fillColor:
|
|
17
|
-
fillColour:
|
|
18
|
-
...
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
height:
|
|
16
|
+
fillColor: h,
|
|
17
|
+
fillColour: x,
|
|
18
|
+
...a
|
|
19
|
+
}, $) => {
|
|
20
|
+
const o = Math.max(0, Math.min(e, Number(p) || 0)), t = `${o}${a.suffix || ""}`, i = f || u, n = x || h, v = {
|
|
21
|
+
height: c,
|
|
22
22
|
...i && { "--progress-bar-bg": `var(--${i})` },
|
|
23
23
|
...n && { "--progress-bar-fill": `var(--${n})` }
|
|
24
24
|
};
|
|
25
25
|
return /* @__PURE__ */ m(b, { children: [
|
|
26
26
|
r && /* @__PURE__ */ m(
|
|
27
|
-
|
|
27
|
+
g,
|
|
28
28
|
{
|
|
29
29
|
as: "div",
|
|
30
30
|
"data-progress-bar-meta": !0,
|
|
31
31
|
"aria-hidden": "true",
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */ s(
|
|
34
|
-
/* @__PURE__ */ s(
|
|
33
|
+
/* @__PURE__ */ s(d, { children: r }),
|
|
34
|
+
/* @__PURE__ */ s(d, { children: t })
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
38
|
/* @__PURE__ */ s(
|
|
39
|
-
|
|
39
|
+
g,
|
|
40
40
|
{
|
|
41
41
|
as: "progress",
|
|
42
42
|
"data-progress-bar": !0,
|
|
43
|
-
ref:
|
|
44
|
-
value:
|
|
45
|
-
max:
|
|
43
|
+
ref: $,
|
|
44
|
+
value: o,
|
|
45
|
+
max: e,
|
|
46
46
|
"aria-label": r,
|
|
47
|
-
"aria-valuemin": 0,
|
|
48
|
-
"aria-valuemax": a,
|
|
49
|
-
"aria-valuenow": e,
|
|
50
47
|
"aria-valuetext": `${r ? `${r}: ` : ""}${t}`,
|
|
51
|
-
shape:
|
|
52
|
-
...
|
|
53
|
-
style:
|
|
48
|
+
shape: l,
|
|
49
|
+
...a,
|
|
50
|
+
style: v
|
|
54
51
|
}
|
|
55
52
|
)
|
|
56
53
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React from \"react\";\n\n// LOCAL COMPONENTS ====================================================================================================\nimport { CommonAndHTMLProps, ColourPropTypes, ShapeTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// STYLES ==============================================================================================================\nimport \"./progress-bar.css\";\n\n// OTHER ===============================================================================================================\nimport { Text } from \"../Typography/Text\";\n\nexport interface ProgressBarLabelCustomProps {\n suffix ? : string;\n}\n\nexport interface ProgressBarCustomProps {\n label ? : string;\n value ? : number;\n suffix ? : string;\n height ? : string;\n max ? : number;\n shape ? : ShapeTypes;\n bgColor ? : ColourPropTypes;\n bgColour ? : ColourPropTypes;\n fillColor ? : ColourPropTypes;\n fillColour ? : ColourPropTypes;\n}\n\nexport type ProgressBarElementType = HTMLProgressElement;\nexport type ProgressBarProps = Omit<CommonAndHTMLProps<ProgressBarElementType>, keyof ProgressBarCustomProps> &\n ProgressBarCustomProps;\nexport type ProgressBarMetaProps = Omit<CommonAndHTMLProps<HTMLDivElement>, keyof ProgressBarLabelCustomProps> &\n ProgressBarLabelCustomProps;\n\n// COMPONENT ///////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const ProgressBar = React.forwardRef(\n (\n {\n label,\n value,\n height,\n max = 100,\n shape,\n bgColor,\n bgColour,\n fillColor,\n fillColour,\n ...props\n } : ProgressBarProps, ref : React.Ref<ProgressBarElementType>) => {\n const validValue = Math.max(0, Math.min(max, Number(value) || 0));\n const progressText = `${validValue}${props.suffix || \"\"}`;\n\n // Use UK spelling as primary, fall back to US spelling\n const backgroundColour = bgColour || bgColor;\n const progressFillColour = fillColour || fillColor;\n\n // Build CSS custom properties for styling\n const progressBarStyles : React.CSSProperties = {\n height,\n ...(backgroundColour && {\"--progress-bar-bg\" : `var(--${backgroundColour})`}),\n ...(progressFillColour && {\"--progress-bar-fill\" : `var(--${progressFillColour})`}),\n };\n\n return (\n <>\n {label && (\n <Element<HTMLDivElement>\n as=\"div\"\n data-progress-bar-meta\n aria-hidden=\"true\"\n >\n <Text>{label}</Text>\n <Text>\n {progressText}\n </Text>\n </Element>\n )}\n\n <Element<ProgressBarElementType>\n as=\"progress\"\n data-progress-bar\n ref={ref}\n value={validValue}\n max={max}\n aria-label={label}\n aria-
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React from \"react\";\n\n// LOCAL COMPONENTS ====================================================================================================\nimport { CommonAndHTMLProps, ColourPropTypes, ShapeTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// STYLES ==============================================================================================================\nimport \"./progress-bar.css\";\n\n// OTHER ===============================================================================================================\nimport { Text } from \"../Typography/Text\";\n\nexport interface ProgressBarLabelCustomProps {\n suffix ? : string;\n}\n\nexport interface ProgressBarCustomProps {\n label ? : string;\n value ? : number;\n suffix ? : string;\n height ? : string;\n max ? : number;\n shape ? : ShapeTypes;\n bgColor ? : ColourPropTypes;\n bgColour ? : ColourPropTypes;\n fillColor ? : ColourPropTypes;\n fillColour ? : ColourPropTypes;\n}\n\nexport type ProgressBarElementType = HTMLProgressElement;\nexport type ProgressBarProps = Omit<CommonAndHTMLProps<ProgressBarElementType>, keyof ProgressBarCustomProps> &\n ProgressBarCustomProps;\nexport type ProgressBarMetaProps = Omit<CommonAndHTMLProps<HTMLDivElement>, keyof ProgressBarLabelCustomProps> &\n ProgressBarLabelCustomProps;\n\n// COMPONENT ///////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const ProgressBar = React.forwardRef(\n (\n {\n label,\n value,\n height,\n max = 100,\n shape,\n bgColor,\n bgColour,\n fillColor,\n fillColour,\n ...props\n } : ProgressBarProps, ref : React.Ref<ProgressBarElementType>) => {\n const validValue = Math.max(0, Math.min(max, Number(value) || 0));\n const progressText = `${validValue}${props.suffix || \"\"}`;\n\n // Use UK spelling as primary, fall back to US spelling\n const backgroundColour = bgColour || bgColor;\n const progressFillColour = fillColour || fillColor;\n\n // Build CSS custom properties for styling\n const progressBarStyles : React.CSSProperties = {\n height,\n ...(backgroundColour && {\"--progress-bar-bg\" : `var(--${backgroundColour})`}),\n ...(progressFillColour && {\"--progress-bar-fill\" : `var(--${progressFillColour})`}),\n };\n\n return (\n <>\n {label && (\n <Element<HTMLDivElement>\n as=\"div\"\n data-progress-bar-meta\n aria-hidden=\"true\"\n >\n <Text>{label}</Text>\n <Text>\n {progressText}\n </Text>\n </Element>\n )}\n\n <Element<ProgressBarElementType>\n as=\"progress\"\n data-progress-bar\n ref={ref}\n value={validValue}\n max={max}\n aria-label={label}\n aria-valuetext={`${label ? `${label}: ` : \"\"}${progressText}`}\n shape={shape}\n {...props}\n style={progressBarStyles}\n />\n </>\n );\n },\n);\nProgressBar.displayName = \"ProgressBar\";"],"names":["ProgressBar","React","label","value","height","max","shape","bgColor","bgColour","fillColor","fillColour","props","ref","validValue","progressText","backgroundColour","progressFillColour","progressBarStyles","jsxs","Fragment","Element","jsx","Text"],"mappings":";;;;;AAqCO,MAAMA,IAAcC,EAAM;AAAA,EAC7B,CACI;AAAA,IACI,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GACeC,MAA4C;AAClE,UAAMC,IAAa,KAAK,IAAI,GAAG,KAAK,IAAIR,GAAK,OAAOF,CAAK,KAAK,CAAC,CAAC,GAC1DW,IAAe,GAAGD,CAAU,GAAGF,EAAM,UAAU,EAAE,IAGjDI,IAAmBP,KAAYD,GAC/BS,IAAqBN,KAAcD,GAGnCQ,IAA0C;AAAA,MAC5C,QAAAb;AAAA,MACA,GAAIW,KAAoB,EAAC,qBAAsB,SAASA,CAAgB,IAAA;AAAA,MACxE,GAAIC,KAAsB,EAAC,uBAAwB,SAASA,CAAkB,IAAA;AAAA,IAAG;AAGrF,WACI,gBAAAE,EAAAC,GAAA,EACK,UAAA;AAAA,MAAAjB,KACG,gBAAAgB;AAAA,QAACE;AAAA,QAAA;AAAA,UACG,IAAG;AAAA,UACH,0BAAsB;AAAA,UACtB,eAAY;AAAA,UAEZ,UA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Ac,CAAC;AAKvG,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/components/Row/Row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIxE,OAAO,WAAW,CAAC;AAEnB,UAAU,cAAc;IACpB,MAA8B,CAAC,EAAG,MAAM,GAAG,SAAS,CAAC;IACrD,OAA8B,CAAC,EAAG,YAAY,CAAC;IAC/C,6BAA8B,CAAC,EAAG,OAAO,CAAC;IAC1C,4BAA8B,CAAC,EAAG,OAAO,CAAC;IAC1C,oBAA8B,CAAC,EAAG,OAAO,CAAC;IAC1C,kBAA8B,CAAC,EAAG,OAAO,CAAC;IAC1C,cAA8B,CAAC,EAAG,OAAO,CAAC;IAC1C,gBAA8B,CAAC,EAAG,OAAO,CAAC;IAC1C,UAA8B,CAAC,EAAG,MAAM,CAAC;CAC5C;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAC5C,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,MAAM,cAAc,CAAC,GAAG,cAAc,CAAC;AAKvG,eAAO,MAAM,GAAG,wJA0Ef,CAAC"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import h from "react";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { Element as
|
|
6
|
-
const
|
|
5
|
+
import { Element as y } from "../Element/Element.js";
|
|
6
|
+
const b = h.forwardRef(
|
|
7
7
|
({
|
|
8
|
-
layout:
|
|
9
|
-
gutters:
|
|
10
|
-
retainLayoutOnTabletLandscape:
|
|
11
|
-
retainLayoutOnTabletPortrait:
|
|
12
|
-
retainLayoutOnMobile:
|
|
13
|
-
retainLayoutAlways:
|
|
14
|
-
allowUltraWide:
|
|
15
|
-
|
|
8
|
+
layout: r = "grid",
|
|
9
|
+
gutters: o = "medium",
|
|
10
|
+
retainLayoutOnTabletLandscape: l,
|
|
11
|
+
retainLayoutOnTabletPortrait: n,
|
|
12
|
+
retainLayoutOnMobile: s,
|
|
13
|
+
retainLayoutAlways: u,
|
|
14
|
+
allowUltraWide: p,
|
|
15
|
+
equalisePortions: a,
|
|
16
|
+
groupLabel: e,
|
|
16
17
|
...m
|
|
17
|
-
},
|
|
18
|
+
}, f) => {
|
|
18
19
|
let t = [];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
d,
|
|
20
|
+
const i = a ? "flexbox" : r;
|
|
21
|
+
return i && t.push(`layout-${i}`), a && t.push("equalise-portions"), o && t.push(o === "none" ? "no-gutters" : `${o}-gutters`), l && t.push("retain-layout-on-tablet-landscape"), n && t.push("retain-layout-on-tablet-portrait"), s && t.push("retain-layout-on-mobile"), u && (t.push("retain-layout-on-tablet-landscape"), t.push("retain-layout-on-tablet-portrait"), t.push("retain-layout-on-mobile")), p && t.push("allow-ultra-wide"), /* @__PURE__ */ d(
|
|
22
|
+
y,
|
|
23
23
|
{
|
|
24
24
|
as: "div",
|
|
25
25
|
"data-row": !0,
|
|
26
|
-
ref:
|
|
26
|
+
ref: f,
|
|
27
27
|
classNames: [t.join(" ")],
|
|
28
28
|
marginBottom: "tiny",
|
|
29
|
-
role: "
|
|
30
|
-
"aria-label":
|
|
29
|
+
role: e ? "group" : void 0,
|
|
30
|
+
"aria-label": e,
|
|
31
31
|
...m
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
|
-
|
|
36
|
+
b.displayName = "Row";
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
b as Row
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=Row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.js","sources":["../../../src/components/Row/Row.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React from \"react\";\n\n// LOCAL COMPONENTS ====================================================================================================\nimport { CommonAndHTMLProps, SpacingTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// STYLES ==============================================================================================================\nimport \"./row.css\";\n\ninterface RowCustomProps {\n layout ? : \"grid\" | \"flexbox\";\n gutters ? : SpacingTypes;\n retainLayoutOnTabletLandscape ? : boolean;\n retainLayoutOnTabletPortrait ? : boolean;\n retainLayoutOnMobile ? : boolean;\n retainLayoutAlways ? : boolean;\n allowUltraWide ? : boolean;\n groupLabel ? : string;\n}\n\nexport type RowElementType = HTMLDivElement;\nexport type RowProps = Omit<CommonAndHTMLProps<RowElementType>, keyof RowCustomProps> & RowCustomProps;\n\n// TODO: Fix fixed gutter widths\n\n// COMPONENT //////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const Row = React.forwardRef(\n (\n {\n layout = \"grid\",\n gutters = \"medium\",\n retainLayoutOnTabletLandscape,\n retainLayoutOnTabletPortrait,\n retainLayoutOnMobile,\n retainLayoutAlways,\n allowUltraWide,\n groupLabel,\n ...props\n } : RowProps,\n ref : React.Ref<RowElementType>,\n ) => {\n // CLASS NAMES -------------------------------------------------------------------------------------------------\n let classNames = [];\n\n if (
|
|
1
|
+
{"version":3,"file":"Row.js","sources":["../../../src/components/Row/Row.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React from \"react\";\n\n// LOCAL COMPONENTS ====================================================================================================\nimport { CommonAndHTMLProps, SpacingTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// STYLES ==============================================================================================================\nimport \"./row.css\";\n\ninterface RowCustomProps {\n layout ? : \"grid\" | \"flexbox\";\n gutters ? : SpacingTypes;\n retainLayoutOnTabletLandscape ? : boolean;\n retainLayoutOnTabletPortrait ? : boolean;\n retainLayoutOnMobile ? : boolean;\n retainLayoutAlways ? : boolean;\n allowUltraWide ? : boolean;\n equalisePortions ? : boolean;\n groupLabel ? : string;\n}\n\nexport type RowElementType = HTMLDivElement;\nexport type RowProps = Omit<CommonAndHTMLProps<RowElementType>, keyof RowCustomProps> & RowCustomProps;\n\n// TODO: Fix fixed gutter widths\n\n// COMPONENT //////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const Row = React.forwardRef(\n (\n {\n layout = \"grid\",\n gutters = \"medium\",\n retainLayoutOnTabletLandscape,\n retainLayoutOnTabletPortrait,\n retainLayoutOnMobile,\n retainLayoutAlways,\n allowUltraWide,\n equalisePortions,\n groupLabel,\n ...props\n } : RowProps,\n ref : React.Ref<RowElementType>,\n ) => {\n // CLASS NAMES -------------------------------------------------------------------------------------------------\n let classNames = [];\n\n // equalisePortions needs a flex Row, so it forces the flexbox layout\n // regardless of the `layout` prop.\n const resolvedLayout = equalisePortions ? \"flexbox\" : layout;\n\n if (resolvedLayout) {\n classNames.push(`layout-${resolvedLayout}`);\n }\n\n if (equalisePortions) {\n classNames.push(\"equalise-portions\");\n }\n\n if (gutters) {\n classNames.push(gutters === \"none\" ? \"no-gutters\" : `${gutters}-gutters`);\n }\n\n if (retainLayoutOnTabletLandscape) {\n classNames.push(\"retain-layout-on-tablet-landscape\");\n }\n\n if (retainLayoutOnTabletPortrait) {\n classNames.push(\"retain-layout-on-tablet-portrait\");\n }\n\n if (retainLayoutOnMobile) {\n classNames.push(\"retain-layout-on-mobile\");\n }\n\n if (retainLayoutAlways) {\n classNames.push(\"retain-layout-on-tablet-landscape\");\n classNames.push(\"retain-layout-on-tablet-portrait\");\n classNames.push(\"retain-layout-on-mobile\");\n }\n\n if (allowUltraWide) {\n classNames.push(\"allow-ultra-wide\");\n }\n\n // RENDER -----------------------------------------------------------------------------------------------------\n return (\n <Element<RowElementType>\n as=\"div\"\n data-row\n ref={ref}\n classNames={[ classNames.join(\" \") ]}\n marginBottom=\"tiny\"\n // Row is a visual layout primitive, not a data grid — claiming role=\"grid\"\n // demands role=\"row\"/\"gridcell\" children it never has (axe aria-required-children).\n // Expose a named group only when the caller gives it a groupLabel.\n role={groupLabel ? \"group\" : undefined}\n aria-label={groupLabel}\n {...props}\n />\n );\n },\n);\nRow.displayName = \"Row\";\n"],"names":["Row","React","layout","gutters","retainLayoutOnTabletLandscape","retainLayoutOnTabletPortrait","retainLayoutOnMobile","retainLayoutAlways","allowUltraWide","equalisePortions","groupLabel","props","ref","classNames","resolvedLayout","jsx","Element"],"mappings":";;;;AA4BO,MAAMA,IAAMC,EAAM;AAAA,EACrB,CACI;AAAA,IACI,QAAAC,IAAS;AAAA,IACT,SAAAC,IAAU;AAAA,IACV,+BAAAC;AAAA,IACA,8BAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEPC,MACC;AAED,QAAIC,IAAa,CAAA;AAIjB,UAAMC,IAAiBL,IAAmB,YAAYP;AAEtD,WAAIY,KACAD,EAAW,KAAK,UAAUC,CAAc,EAAE,GAG1CL,KACAI,EAAW,KAAK,mBAAmB,GAGnCV,KACAU,EAAW,KAAKV,MAAY,SAAS,eAAe,GAAGA,CAAO,UAAU,GAGxEC,KACAS,EAAW,KAAK,mCAAmC,GAGnDR,KACAQ,EAAW,KAAK,kCAAkC,GAGlDP,KACAO,EAAW,KAAK,yBAAyB,GAGzCN,MACAM,EAAW,KAAK,mCAAmC,GACnDA,EAAW,KAAK,kCAAkC,GAClDA,EAAW,KAAK,yBAAyB,IAGzCL,KACAK,EAAW,KAAK,kBAAkB,GAKlC,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACG,IAAG;AAAA,QACH,YAAQ;AAAA,QACR,KAAAJ;AAAA,QACA,YAAY,CAAEC,EAAW,KAAK,GAAG,CAAE;AAAA,QACnC,cAAa;AAAA,QAIb,MAAMH,IAAa,UAAU;AAAA,QAC7B,cAAYA;AAAA,QACX,GAAGC;AAAA,MAAA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jsx-runtime";
|
|
3
3
|
import d, { useContext as b, createContext as g } from "react";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { Element as
|
|
6
|
-
const
|
|
5
|
+
import { Element as y } from "../Element/Element.js";
|
|
6
|
+
const k = g({
|
|
7
7
|
effect: "wave",
|
|
8
8
|
animate: !0
|
|
9
9
|
}), $ = d.forwardRef(({
|
|
@@ -15,29 +15,27 @@ const x = g({
|
|
|
15
15
|
loadingLabel: f,
|
|
16
16
|
...l
|
|
17
17
|
}, n) => {
|
|
18
|
-
const
|
|
19
|
-
let
|
|
20
|
-
e &&
|
|
21
|
-
const
|
|
22
|
-
width:
|
|
23
|
-
height:
|
|
18
|
+
const c = b(k), i = u || c.effect, a = f || c.loadingLabel || "Loading...";
|
|
19
|
+
let o = [];
|
|
20
|
+
e && o.push(`variant-${e}`), s && o.push(`shape-${s}`), i && o.push(`effect-${i}`);
|
|
21
|
+
const p = t || "100%", v = e === "circle" ? (typeof t == "number" ? `${t}px` : t) || r || "100%" : r, x = {
|
|
22
|
+
width: p,
|
|
23
|
+
height: v,
|
|
24
24
|
aspectRatio: e === "circle" ? "1 / 1" : "auto",
|
|
25
25
|
...l.style
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
27
|
+
return /* @__PURE__ */ m(
|
|
28
|
+
y,
|
|
29
29
|
{
|
|
30
30
|
as: "div",
|
|
31
31
|
"data-skeleton": !0,
|
|
32
32
|
ref: n,
|
|
33
|
-
classNames:
|
|
34
|
-
style:
|
|
33
|
+
classNames: o,
|
|
34
|
+
style: x,
|
|
35
35
|
role: "progressbar",
|
|
36
36
|
"aria-busy": "true",
|
|
37
|
-
"aria-
|
|
38
|
-
"aria-
|
|
39
|
-
"aria-valuetext": o,
|
|
40
|
-
"aria-label": o,
|
|
37
|
+
"aria-valuetext": a,
|
|
38
|
+
"aria-label": a,
|
|
41
39
|
...l
|
|
42
40
|
}
|
|
43
41
|
);
|
|
@@ -52,26 +50,26 @@ const h = d.forwardRef(({
|
|
|
52
50
|
children: f,
|
|
53
51
|
classNames: l = [],
|
|
54
52
|
loadingLabel: n = "Loading content...",
|
|
55
|
-
...
|
|
56
|
-
},
|
|
57
|
-
const
|
|
53
|
+
...c
|
|
54
|
+
}, i) => {
|
|
55
|
+
const a = [
|
|
58
56
|
`direction-${u}`,
|
|
59
57
|
e && `effect-${e}`,
|
|
60
58
|
...l
|
|
61
59
|
];
|
|
62
|
-
return t &&
|
|
63
|
-
|
|
60
|
+
return t && a.push(`spacing-${t}`), /* @__PURE__ */ m(k.Provider, { value: { effect: e, animate: r, loadingLabel: n }, children: /* @__PURE__ */ m(
|
|
61
|
+
y,
|
|
64
62
|
{
|
|
65
63
|
as: "div",
|
|
66
|
-
ref:
|
|
64
|
+
ref: i,
|
|
67
65
|
"data-skeleton-group": !0,
|
|
68
|
-
classNames:
|
|
66
|
+
classNames: a,
|
|
69
67
|
role: "status",
|
|
70
68
|
"aria-busy": "true",
|
|
71
69
|
"aria-label": n,
|
|
72
|
-
...
|
|
73
|
-
children: Array(s).fill(f).map((
|
|
74
|
-
key:
|
|
70
|
+
...c,
|
|
71
|
+
children: Array(s).fill(f).map((o, p) => d.cloneElement(o, {
|
|
72
|
+
key: p
|
|
75
73
|
}))
|
|
76
74
|
}
|
|
77
75
|
) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React, { createContext, useContext } from \"react\";\n\n// ELEMENT =============================================================================================================\nimport { CommonAndHTMLProps, ShapeTypes, SpacingTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// STYLES ==============================================================================================================\nimport \"./skeleton.css\";\n\n// Common skeleton props shared between Skeleton and SkeletonGroup\ninterface CommonSkeletonProps {\n effect ? : \"pulse\" | \"wave\" | \"none\";\n animate ? : boolean;\n loadingLabel ? : string;\n // Accessible label for loading state\n}\n\n// Context to share common properties\nconst SkeletonContext = createContext<CommonSkeletonProps>({\n effect : \"wave\",\n animate : true,\n});\n\n// Props specific to individual Skeleton elements\ninterface SkeletonCustomProps extends CommonSkeletonProps {\n variant ? : \"line\" | \"circle\" | \"block\";\n width ? : string | number;\n height ? : string | number;\n shape ? : ShapeTypes;\n}\n\n// Props specific to SkeletonGroup\ninterface SkeletonGroupCustomProps extends CommonSkeletonProps {\n repeat ? : number;\n direction ? : \"vertical\" | \"horizontal\";\n spacing ? : SpacingTypes;\n}\n\nexport type SkeletonElementType = HTMLDivElement;\nexport type SkeletonProps =\n Omit<CommonAndHTMLProps<SkeletonElementType>, keyof SkeletonCustomProps>\n & SkeletonCustomProps;\nexport type SkeletonGroupProps =\n Omit<CommonAndHTMLProps<SkeletonElementType>, keyof SkeletonGroupCustomProps>\n & SkeletonGroupCustomProps;\n\n// COMPONENTS //////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const Skeleton = React.forwardRef((\n {\n variant = \"line\",\n width,\n height,\n shape,\n effect: localEffect,\n loadingLabel,\n ...props\n }: SkeletonProps, ref: React.Ref<SkeletonElementType>) => {\n // Get shared properties from group context\n const groupContext = useContext(SkeletonContext);\n\n const effectiveEffect = localEffect || groupContext.effect;\n const effectiveLabel = loadingLabel || groupContext.loadingLabel || \"Loading...\";\n\n let classNames = [];\n\n if (variant) {\n classNames.push(`variant-${variant}`);\n }\n\n if (shape) {\n classNames.push(`shape-${shape}`);\n }\n\n if (effectiveEffect) {\n classNames.push(`effect-${effectiveEffect}`);\n }\n\n // Handle circle variant dimensions\n const computedWidth = width || \"100%\";\n const computedHeight = variant === \"circle\"\n ? (typeof width === \"number\" ? `${width}px` : width) || height || \"100%\"\n : height;\n\n const style = {\n width: computedWidth,\n height: computedHeight,\n aspectRatio: variant === \"circle\" ? \"1 / 1\" : \"auto\",\n ...props.style,\n };\n\n return (\n <Element\n as=\"div\"\n data-skeleton\n ref={ref}\n classNames={classNames}\n style={style}\n role=\"progressbar\"\n aria-busy=\"true\"\n aria-
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["// REACT CORE ==========================================================================================================\nimport React, { createContext, useContext } from \"react\";\n\n// ELEMENT =============================================================================================================\nimport { CommonAndHTMLProps, ShapeTypes, SpacingTypes } from \"../Element/constants\";\nimport { Element } from \"$element\";\n\n// STYLES ==============================================================================================================\nimport \"./skeleton.css\";\n\n// Common skeleton props shared between Skeleton and SkeletonGroup\ninterface CommonSkeletonProps {\n effect ? : \"pulse\" | \"wave\" | \"none\";\n animate ? : boolean;\n loadingLabel ? : string;\n // Accessible label for loading state\n}\n\n// Context to share common properties\nconst SkeletonContext = createContext<CommonSkeletonProps>({\n effect : \"wave\",\n animate : true,\n});\n\n// Props specific to individual Skeleton elements\ninterface SkeletonCustomProps extends CommonSkeletonProps {\n variant ? : \"line\" | \"circle\" | \"block\";\n width ? : string | number;\n height ? : string | number;\n shape ? : ShapeTypes;\n}\n\n// Props specific to SkeletonGroup\ninterface SkeletonGroupCustomProps extends CommonSkeletonProps {\n repeat ? : number;\n direction ? : \"vertical\" | \"horizontal\";\n spacing ? : SpacingTypes;\n}\n\nexport type SkeletonElementType = HTMLDivElement;\nexport type SkeletonProps =\n Omit<CommonAndHTMLProps<SkeletonElementType>, keyof SkeletonCustomProps>\n & SkeletonCustomProps;\nexport type SkeletonGroupProps =\n Omit<CommonAndHTMLProps<SkeletonElementType>, keyof SkeletonGroupCustomProps>\n & SkeletonGroupCustomProps;\n\n// COMPONENTS //////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const Skeleton = React.forwardRef((\n {\n variant = \"line\",\n width,\n height,\n shape,\n effect: localEffect,\n loadingLabel,\n ...props\n }: SkeletonProps, ref: React.Ref<SkeletonElementType>) => {\n // Get shared properties from group context\n const groupContext = useContext(SkeletonContext);\n\n const effectiveEffect = localEffect || groupContext.effect;\n const effectiveLabel = loadingLabel || groupContext.loadingLabel || \"Loading...\";\n\n let classNames = [];\n\n if (variant) {\n classNames.push(`variant-${variant}`);\n }\n\n if (shape) {\n classNames.push(`shape-${shape}`);\n }\n\n if (effectiveEffect) {\n classNames.push(`effect-${effectiveEffect}`);\n }\n\n // Handle circle variant dimensions\n const computedWidth = width || \"100%\";\n const computedHeight = variant === \"circle\"\n ? (typeof width === \"number\" ? `${width}px` : width) || height || \"100%\"\n : height;\n\n const style = {\n width: computedWidth,\n height: computedHeight,\n aspectRatio: variant === \"circle\" ? \"1 / 1\" : \"auto\",\n ...props.style,\n };\n\n return (\n <Element\n as=\"div\"\n data-skeleton\n ref={ref}\n classNames={classNames}\n style={style}\n role=\"progressbar\"\n aria-busy=\"true\"\n aria-valuetext={effectiveLabel}\n aria-label={effectiveLabel}\n {...props}\n />\n );\n});\nSkeleton.displayName = \"Skeleton\";\n\nexport const SkeletonGroup = React.forwardRef((\n {\n effect = \"wave\",\n spacing = \"small\",\n animate = true,\n repeat = 1,\n direction = \"vertical\",\n children,\n classNames = [],\n loadingLabel = \"Loading content...\",\n ...props\n }: SkeletonGroupProps, ref: React.Ref<SkeletonElementType>) => {\n\n const groupClassNames = [\n `direction-${direction}`,\n effect && `effect-${effect}`,\n ...classNames,\n ];\n\n if (spacing) {\n groupClassNames.push(`spacing-${spacing}`);\n }\n\n return (\n <SkeletonContext.Provider value={{ effect, animate, loadingLabel }}>\n <Element\n as=\"div\"\n ref={ref}\n data-skeleton-group\n classNames={groupClassNames}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={loadingLabel}\n {...props}\n >\n {Array(repeat).fill(children).map((child, index) => (\n React.cloneElement(child as React.ReactElement, {\n key: index\n })\n ))}\n </Element>\n </SkeletonContext.Provider>\n );\n});\nSkeletonGroup.displayName = \"SkeletonGroup\";\n"],"names":["SkeletonContext","createContext","Skeleton","React","variant","width","height","shape","localEffect","loadingLabel","props","ref","groupContext","useContext","effectiveEffect","effectiveLabel","classNames","computedWidth","computedHeight","style","jsx","Element","SkeletonGroup","effect","spacing","animate","repeat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AAS;AAAA,EACT,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,YAAAZ,IAAa,CAAA;AAAA,EACb,cAAAP,IAAe;AAAA,EACf,GAAGC;AACP,GAAuBC,MAAwC;AAE/D,QAAMkB,IAAkB;AAAA,IACpB,aAAaF,CAAS;AAAA,IACtBJ,KAAU,UAAUA,CAAM;AAAA,IAC1B,GAAGP;AAAA,EAAA;AAGP,SAAIQ,KACAK,EAAgB,KAAK,WAAWL,CAAO,EAAE,GAIzC,gBAAAJ,EAACpB,EAAgB,UAAhB,EAAyB,OAAO,EAAE,QAAAuB,GAAQ,SAAAE,GAAS,cAAAhB,KAChD,UAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,IAAG;AAAA,MACH,KAAAV;AAAA,MACA,uBAAmB;AAAA,MACnB,YAAYkB;AAAA,MACZ,MAAK;AAAA,MACL,aAAU;AAAA,MACV,cAAYpB;AAAA,MACX,GAAGC;AAAA,MAEH,UAAA,MAAMgB,CAAM,EAAE,KAAKE,CAAQ,EAAE,IAAI,CAACE,GAAOC,MACtC5B,EAAM,aAAa2B,GAA6B;AAAA,QAC5C,KAAKC;AAAA,MAAA,CACR,CACJ;AAAA,IAAA;AAAA,EAAA,GAET;AAER,CAAC;AACDT,EAAc,cAAc;"}
|
|
@@ -9,7 +9,6 @@ export interface TableCustomProps {
|
|
|
9
9
|
isFullWidth?: boolean;
|
|
10
10
|
caption?: string;
|
|
11
11
|
summary?: string;
|
|
12
|
-
hasColSpan?: boolean;
|
|
13
12
|
}
|
|
14
13
|
export type TableElementType = HTMLTableElement;
|
|
15
14
|
export type TableProps = Omit<CommonAndHTMLProps<TableElementType>, keyof TableCustomProps> & TableCustomProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,aAAa,CAAC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|
-
import { jsxs as
|
|
3
|
-
import
|
|
2
|
+
import { jsxs as h, jsx as d } from "react/jsx-runtime";
|
|
3
|
+
import u from "react";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { Element as b } from "../Element/Element.js";
|
|
6
|
-
const
|
|
6
|
+
const c = u.forwardRef(
|
|
7
7
|
({
|
|
8
|
-
bordersFor:
|
|
9
|
-
isStriped:
|
|
10
|
-
highlightRowOnHover:
|
|
11
|
-
isFullWidth:
|
|
12
|
-
alignText:
|
|
13
|
-
caption:
|
|
8
|
+
bordersFor: r,
|
|
9
|
+
isStriped: l,
|
|
10
|
+
highlightRowOnHover: s,
|
|
11
|
+
isFullWidth: a,
|
|
12
|
+
alignText: t,
|
|
13
|
+
caption: i,
|
|
14
14
|
summary: p,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
e && o.push(`bordered-${e}`), a && o.push("striped"), u && o.push("hoverable"), f && o.push("full-width"), i && o.push(`align-text-${i}`);
|
|
21
|
-
const h = t.Children.count(r);
|
|
22
|
-
return /* @__PURE__ */ C(
|
|
15
|
+
children: f,
|
|
16
|
+
...o
|
|
17
|
+
}, m) => {
|
|
18
|
+
let e = [];
|
|
19
|
+
return r && e.push(`bordered-${r}`), l && e.push("striped"), s && e.push("hoverable"), a && e.push("full-width"), t && e.push(`align-text-${t}`), /* @__PURE__ */ h(
|
|
23
20
|
b,
|
|
24
21
|
{
|
|
25
22
|
as: "table",
|
|
26
|
-
classNames:
|
|
27
|
-
ref:
|
|
23
|
+
classNames: e,
|
|
24
|
+
ref: m,
|
|
28
25
|
role: "table",
|
|
29
|
-
"aria-rowcount": h || void 0,
|
|
30
|
-
"aria-colcount": d ? void 0 : (() => {
|
|
31
|
-
if (!r || !t.isValidElement(r)) return;
|
|
32
|
-
const s = t.Children.toArray(r)[0];
|
|
33
|
-
if (t.isValidElement(s)) {
|
|
34
|
-
const l = s.props;
|
|
35
|
-
if (l.children)
|
|
36
|
-
return t.Children.count(l.children);
|
|
37
|
-
}
|
|
38
|
-
})(),
|
|
39
26
|
summary: p,
|
|
40
|
-
...
|
|
27
|
+
...o,
|
|
41
28
|
children: [
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
i && /* @__PURE__ */ d("caption", { children: i }),
|
|
30
|
+
f
|
|
44
31
|
]
|
|
45
32
|
}
|
|
46
33
|
);
|
|
47
34
|
}
|
|
48
35
|
);
|
|
49
|
-
|
|
36
|
+
c.displayName = "Table";
|
|
50
37
|
export {
|
|
51
|
-
|
|
38
|
+
c as Table
|
|
52
39
|
};
|
|
53
40
|
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["// FRAMEWORK ===========================================================================================================\nimport React from \"react\";\n\n// FICTOAN =============================================================================================================\nimport { Element } from \"../Element\";\n\n// STYLES ==============================================================================================================\nimport \"./table.css\";\n\n// TYPES ===============================================================================================================\nimport { CommonAndHTMLProps } from \"../Element/constants\";\n\n// prettier-ignore\nexport interface TableCustomProps {\n bordersFor ? : \"rows\" | \"columns\" | \"both\";\n alignText ? : \"left\" | \"right\" | \"centre\" | \"center\";\n isStriped ? : boolean;\n highlightRowOnHover ? : boolean;\n isFullWidth ? : boolean;\n caption ? : string; // Accessible table caption\n summary ? : string; // Description of table structure for complex tables\n
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["// FRAMEWORK ===========================================================================================================\nimport React from \"react\";\n\n// FICTOAN =============================================================================================================\nimport { Element } from \"../Element\";\n\n// STYLES ==============================================================================================================\nimport \"./table.css\";\n\n// TYPES ===============================================================================================================\nimport { CommonAndHTMLProps } from \"../Element/constants\";\n\n// prettier-ignore\nexport interface TableCustomProps {\n bordersFor ? : \"rows\" | \"columns\" | \"both\";\n alignText ? : \"left\" | \"right\" | \"centre\" | \"center\";\n isStriped ? : boolean;\n highlightRowOnHover ? : boolean;\n isFullWidth ? : boolean;\n caption ? : string; // Accessible table caption\n summary ? : string; // Description of table structure for complex tables\n}\n\nexport type TableElementType = HTMLTableElement;\nexport type TableProps = Omit<CommonAndHTMLProps<TableElementType>, keyof TableCustomProps> & TableCustomProps;\n\n// COMPONENT ///////////////////////////////////////////////////////////////////////////////////////////////////////////\nexport const Table = React.forwardRef(\n (\n {\n bordersFor,\n isStriped,\n highlightRowOnHover,\n isFullWidth,\n alignText,\n caption,\n summary,\n children,\n ...props\n }: TableProps,\n ref: React.Ref<TableElementType>\n ) => {\n let classNames = [];\n\n if (bordersFor) {\n classNames.push(`bordered-${bordersFor}`);\n }\n\n if (isStriped) {\n classNames.push(\"striped\");\n }\n\n if (highlightRowOnHover) {\n classNames.push(\"hoverable\");\n }\n\n if (isFullWidth) {\n classNames.push(\"full-width\");\n }\n\n if (alignText) {\n classNames.push(`align-text-${alignText}`);\n }\n\n // No aria-rowcount / aria-colcount: those are for virtualised/paginated tables where the\n // DOM holds only a subset of rows. This Table renders all children, so the native <table>\n // semantics convey the counts — deriving them from arbitrary children was wrong anyway\n // (counted thead+tbody as 2 rows; colcount was dead for any multi-section table).\n return (\n <Element<TableElementType>\n as=\"table\"\n classNames={classNames}\n ref={ref}\n role=\"table\"\n summary={summary}\n {...props}\n >\n {caption && <caption>{caption}</caption>}\n {children}\n </Element>\n );\n }\n);\nTable.displayName = \"Table\";\n"],"names":["Table","React","bordersFor","isStriped","highlightRowOnHover","isFullWidth","alignText","caption","summary","children","props","ref","classNames","jsxs","Element","jsx"],"mappings":";;;;AA2BO,MAAMA,IAAQC,EAAM;AAAA,EACvB,CACI;AAAA,IACI,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEPC,MACC;AACD,QAAIC,IAAa,CA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