@guardian/stand 0.0.70 → 0.0.72
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/Table.cjs +10 -0
- package/dist/Table.d.cts +5 -0
- package/dist/Table.d.ts +5 -0
- package/dist/Table.js +3 -0
- package/dist/ToggleSwitch.cjs +5 -0
- package/dist/ToggleSwitch.d.cts +5 -0
- package/dist/ToggleSwitch.d.ts +5 -0
- package/dist/ToggleSwitch.js +3 -0
- package/dist/components/Table/Table.cjs +80 -0
- package/dist/components/Table/Table.d.cts +10 -0
- package/dist/components/Table/Table.d.ts +10 -0
- package/dist/components/Table/Table.js +75 -0
- package/dist/components/Table/styles.cjs +133 -0
- package/dist/components/Table/styles.d.cts +8 -0
- package/dist/components/Table/styles.d.ts +8 -0
- package/dist/components/Table/styles.js +126 -0
- package/dist/components/Table/types.d.cts +27 -0
- package/dist/components/Table/types.d.ts +27 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.cjs +41 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.cts +5 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +5 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.js +41 -0
- package/dist/components/ToggleSwitch/styles.cjs +70 -0
- package/dist/components/ToggleSwitch/styles.d.cts +10 -0
- package/dist/components/ToggleSwitch/styles.d.ts +10 -0
- package/dist/components/ToggleSwitch/styles.js +64 -0
- package/dist/components/ToggleSwitch/types.d.cts +17 -0
- package/dist/components/ToggleSwitch/types.d.ts +17 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/styleD/build/css/component/checkbox.css +1 -1
- package/dist/styleD/build/css/component/radioGroup.css +1 -1
- package/dist/styleD/build/css/component/sidebarStepperNavigation.css +1 -1
- package/dist/styleD/build/css/component/table.css +33 -0
- package/dist/styleD/build/css/component/toggleSwitch.css +55 -0
- package/dist/styleD/build/css/semantic/colors.css +15 -3
- package/dist/styleD/build/css/semantic/sizing.css +1 -0
- package/dist/styleD/build/typescript/component/checkbox.cjs +1 -1
- package/dist/styleD/build/typescript/component/checkbox.js +1 -1
- package/dist/styleD/build/typescript/component/radioGroup.cjs +1 -1
- package/dist/styleD/build/typescript/component/radioGroup.js +1 -1
- package/dist/styleD/build/typescript/component/sidebarStepperNavigation.cjs +1 -1
- package/dist/styleD/build/typescript/component/sidebarStepperNavigation.js +1 -1
- package/dist/styleD/build/typescript/component/table.cjs +51 -0
- package/dist/styleD/build/typescript/component/table.d.cts +54 -0
- package/dist/styleD/build/typescript/component/table.d.ts +54 -0
- package/dist/styleD/build/typescript/component/table.js +51 -0
- package/dist/styleD/build/typescript/component/toggleSwitch.cjs +86 -0
- package/dist/styleD/build/typescript/component/toggleSwitch.d.cts +93 -0
- package/dist/styleD/build/typescript/component/toggleSwitch.d.ts +93 -0
- package/dist/styleD/build/typescript/component/toggleSwitch.js +86 -0
- package/dist/styleD/build/typescript/semantic/colors.cjs +16 -4
- package/dist/styleD/build/typescript/semantic/colors.d.cts +15 -3
- package/dist/styleD/build/typescript/semantic/colors.d.ts +15 -3
- package/dist/styleD/build/typescript/semantic/colors.js +16 -4
- package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.d.cts +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.d.ts +1 -0
- package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
- package/package.json +29 -1
package/dist/Table.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_table = require("./styleD/build/typescript/component/table.cjs");
|
|
3
|
+
const require_Table = require("./components/Table/Table.cjs");
|
|
4
|
+
exports.Table = require_Table.Table;
|
|
5
|
+
exports.TableBody = require_Table.TableBody;
|
|
6
|
+
exports.TableCell = require_Table.TableCell;
|
|
7
|
+
exports.TableColumnHeader = require_Table.TableColumnHeader;
|
|
8
|
+
exports.TableHeader = require_Table.TableHeader;
|
|
9
|
+
exports.TableRow = require_Table.TableRow;
|
|
10
|
+
exports.componentTable = require_table.componentTable;
|
package/dist/Table.d.cts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentTable, componentTable } from "./styleD/build/typescript/component/table.cjs";
|
|
2
|
+
import { PartialTableTheme } from "./components/Table/styles.cjs";
|
|
3
|
+
import { ResponsiveTableValue, TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeaderProps, TableProps, TableRowProps } from "./components/Table/types.cjs";
|
|
4
|
+
import { Table, TableBody, TableCell, TableColumnHeader, TableHeader, TableRow } from "./components/Table/Table.cjs";
|
|
5
|
+
export { type ComponentTable, type ResponsiveTableValue, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumnHeader, type TableColumnHeaderProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, type PartialTableTheme as TableTheme, componentTable };
|
package/dist/Table.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentTable, componentTable } from "./styleD/build/typescript/component/table.js";
|
|
2
|
+
import { PartialTableTheme } from "./components/Table/styles.js";
|
|
3
|
+
import { ResponsiveTableValue, TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeaderProps, TableProps, TableRowProps } from "./components/Table/types.js";
|
|
4
|
+
import { Table, TableBody, TableCell, TableColumnHeader, TableHeader, TableRow } from "./components/Table/Table.js";
|
|
5
|
+
export { type ComponentTable, type ResponsiveTableValue, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumnHeader, type TableColumnHeaderProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, type PartialTableTheme as TableTheme, componentTable };
|
package/dist/Table.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { componentTable } from "./styleD/build/typescript/component/table.js";
|
|
2
|
+
import { Table, TableBody, TableCell, TableColumnHeader, TableHeader, TableRow } from "./components/Table/Table.js";
|
|
3
|
+
export { Table, TableBody, TableCell, TableColumnHeader, TableHeader, TableRow, componentTable };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_toggleSwitch = require("./styleD/build/typescript/component/toggleSwitch.cjs");
|
|
3
|
+
const require_ToggleSwitch = require("./components/ToggleSwitch/ToggleSwitch.cjs");
|
|
4
|
+
exports.ToggleSwitch = require_ToggleSwitch.ToggleSwitch;
|
|
5
|
+
exports.componentToggleSwitch = require_toggleSwitch.componentToggleSwitch;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentToggleSwitch, componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.cjs";
|
|
2
|
+
import { PartialToggleSwitchTheme } from "./components/ToggleSwitch/styles.cjs";
|
|
3
|
+
import { ToggleSwitchProps } from "./components/ToggleSwitch/types.cjs";
|
|
4
|
+
import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.cjs";
|
|
5
|
+
export { type ComponentToggleSwitch, ToggleSwitch, type ToggleSwitchProps, type PartialToggleSwitchTheme as ToggleSwitchTheme, componentToggleSwitch };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentToggleSwitch, componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.js";
|
|
2
|
+
import { PartialToggleSwitchTheme } from "./components/ToggleSwitch/styles.js";
|
|
3
|
+
import { ToggleSwitchProps } from "./components/ToggleSwitch/types.js";
|
|
4
|
+
import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
|
|
5
|
+
export { type ComponentToggleSwitch, ToggleSwitch, type ToggleSwitchProps, type PartialToggleSwitchTheme as ToggleSwitchTheme, componentToggleSwitch };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const require_mergeDeep = require("../../util/mergeDeep.cjs");
|
|
2
|
+
const require_styles = require("./styles.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
5
|
+
let react_aria_components = require("react-aria-components");
|
|
6
|
+
//#region src/components/Table/Table.tsx
|
|
7
|
+
const TableContext = (0, react.createContext)({
|
|
8
|
+
columns: { sm: "minmax(0, 1fr)" },
|
|
9
|
+
headerVisibleFrom: "lg",
|
|
10
|
+
theme: require_styles.defaultTableTheme
|
|
11
|
+
});
|
|
12
|
+
function Table({ columns, headerVisibleFrom = "lg", theme = {}, cssOverrides, children, ...props }) {
|
|
13
|
+
const mergedTheme = require_mergeDeep.mergeDeep(require_styles.defaultTableTheme, theme);
|
|
14
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(TableContext.Provider, {
|
|
15
|
+
value: {
|
|
16
|
+
columns,
|
|
17
|
+
headerVisibleFrom,
|
|
18
|
+
theme: mergedTheme
|
|
19
|
+
},
|
|
20
|
+
children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Table, {
|
|
21
|
+
css: [require_styles.tableStyles(mergedTheme), cssOverrides],
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function TableHeader({ theme = {}, cssOverrides, children, ...props }) {
|
|
28
|
+
const context = (0, react.useContext)(TableContext);
|
|
29
|
+
const mergedTheme = require_mergeDeep.mergeDeep(context.theme, theme);
|
|
30
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.TableHeader, {
|
|
31
|
+
css: [require_styles.tableHeaderStyles(mergedTheme, context.columns, context.headerVisibleFrom), cssOverrides],
|
|
32
|
+
...props,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function TableBody({ cssOverrides, children, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.TableBody, {
|
|
38
|
+
css: [require_styles.tableBodyStyles, cssOverrides],
|
|
39
|
+
...props,
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function TableRow({ theme = {}, cssOverrides, children, ...props }) {
|
|
44
|
+
const context = (0, react.useContext)(TableContext);
|
|
45
|
+
const mergedTheme = require_mergeDeep.mergeDeep(context.theme, theme);
|
|
46
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Row, {
|
|
47
|
+
css: [require_styles.tableRowStyles(mergedTheme, context.columns), cssOverrides],
|
|
48
|
+
...props,
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function TableColumnHeader({ theme = {}, cssOverrides, children, ...props }) {
|
|
53
|
+
const context = (0, react.useContext)(TableContext);
|
|
54
|
+
const mergedTheme = require_mergeDeep.mergeDeep(context.theme, theme);
|
|
55
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Column, {
|
|
56
|
+
css: [require_styles.tableColumnHeaderStyles(mergedTheme), cssOverrides],
|
|
57
|
+
...props,
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function TableCell({ compactLabel, gridColumn, gridRow, theme = {}, cssOverrides, children, ...props }) {
|
|
62
|
+
const context = (0, react.useContext)(TableContext);
|
|
63
|
+
const mergedTheme = require_mergeDeep.mergeDeep(context.theme, theme);
|
|
64
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Cell, {
|
|
65
|
+
css: [require_styles.tableCellStyles(mergedTheme, gridColumn, gridRow), cssOverrides],
|
|
66
|
+
...props,
|
|
67
|
+
children: (0, react_aria_components.composeRenderProps)(children, (children) => /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [compactLabel && /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", {
|
|
68
|
+
css: require_styles.compactLabelStyles(mergedTheme, context.headerVisibleFrom),
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
children: compactLabel
|
|
71
|
+
}), children] }))
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
exports.Table = Table;
|
|
76
|
+
exports.TableBody = TableBody;
|
|
77
|
+
exports.TableCell = TableCell;
|
|
78
|
+
exports.TableColumnHeader = TableColumnHeader;
|
|
79
|
+
exports.TableHeader = TableHeader;
|
|
80
|
+
exports.TableRow = TableRow;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeaderProps, TableProps, TableRowProps } from "./types.cjs";
|
|
2
|
+
//#region src/components/Table/Table.d.ts
|
|
3
|
+
declare function Table({ columns, headerVisibleFrom, theme, cssOverrides, children, ...props }: TableProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TableHeader<T extends object = object>({ theme, cssOverrides, children, ...props }: TableHeaderProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TableBody<T extends object = object>({ cssOverrides, children, ...props }: TableBodyProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableRow<T extends object = object>({ theme, cssOverrides, children, ...props }: TableRowProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function TableColumnHeader({ theme, cssOverrides, children, ...props }: TableColumnHeaderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TableCell({ compactLabel, gridColumn, gridRow, theme, cssOverrides, children, ...props }: TableCellProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Table, TableBody, TableCell, TableColumnHeader, TableHeader, TableRow };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeaderProps, TableProps, TableRowProps } from "./types.js";
|
|
2
|
+
//#region src/components/Table/Table.d.ts
|
|
3
|
+
declare function Table({ columns, headerVisibleFrom, theme, cssOverrides, children, ...props }: TableProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TableHeader<T extends object = object>({ theme, cssOverrides, children, ...props }: TableHeaderProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TableBody<T extends object = object>({ cssOverrides, children, ...props }: TableBodyProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableRow<T extends object = object>({ theme, cssOverrides, children, ...props }: TableRowProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function TableColumnHeader({ theme, cssOverrides, children, ...props }: TableColumnHeaderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TableCell({ compactLabel, gridColumn, gridRow, theme, cssOverrides, children, ...props }: TableCellProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Table, TableBody, TableCell, TableColumnHeader, TableHeader, TableRow };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { mergeDeep } from "../../util/mergeDeep.js";
|
|
2
|
+
import { compactLabelStyles, defaultTableTheme, tableBodyStyles, tableCellStyles, tableColumnHeaderStyles, tableHeaderStyles, tableRowStyles, tableStyles } from "./styles.js";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
5
|
+
import { Cell, Column, Row, Table, TableBody, TableHeader, composeRenderProps } from "react-aria-components";
|
|
6
|
+
//#region src/components/Table/Table.tsx
|
|
7
|
+
const TableContext = createContext({
|
|
8
|
+
columns: { sm: "minmax(0, 1fr)" },
|
|
9
|
+
headerVisibleFrom: "lg",
|
|
10
|
+
theme: defaultTableTheme
|
|
11
|
+
});
|
|
12
|
+
function Table$1({ columns, headerVisibleFrom = "lg", theme = {}, cssOverrides, children, ...props }) {
|
|
13
|
+
const mergedTheme = mergeDeep(defaultTableTheme, theme);
|
|
14
|
+
return /* @__PURE__ */ jsx(TableContext.Provider, {
|
|
15
|
+
value: {
|
|
16
|
+
columns,
|
|
17
|
+
headerVisibleFrom,
|
|
18
|
+
theme: mergedTheme
|
|
19
|
+
},
|
|
20
|
+
children: /* @__PURE__ */ jsx(Table, {
|
|
21
|
+
css: [tableStyles(mergedTheme), cssOverrides],
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function TableHeader$1({ theme = {}, cssOverrides, children, ...props }) {
|
|
28
|
+
const context = useContext(TableContext);
|
|
29
|
+
const mergedTheme = mergeDeep(context.theme, theme);
|
|
30
|
+
return /* @__PURE__ */ jsx(TableHeader, {
|
|
31
|
+
css: [tableHeaderStyles(mergedTheme, context.columns, context.headerVisibleFrom), cssOverrides],
|
|
32
|
+
...props,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function TableBody$1({ cssOverrides, children, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(TableBody, {
|
|
38
|
+
css: [tableBodyStyles, cssOverrides],
|
|
39
|
+
...props,
|
|
40
|
+
children
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function TableRow({ theme = {}, cssOverrides, children, ...props }) {
|
|
44
|
+
const context = useContext(TableContext);
|
|
45
|
+
const mergedTheme = mergeDeep(context.theme, theme);
|
|
46
|
+
return /* @__PURE__ */ jsx(Row, {
|
|
47
|
+
css: [tableRowStyles(mergedTheme, context.columns), cssOverrides],
|
|
48
|
+
...props,
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function TableColumnHeader({ theme = {}, cssOverrides, children, ...props }) {
|
|
53
|
+
const context = useContext(TableContext);
|
|
54
|
+
const mergedTheme = mergeDeep(context.theme, theme);
|
|
55
|
+
return /* @__PURE__ */ jsx(Column, {
|
|
56
|
+
css: [tableColumnHeaderStyles(mergedTheme), cssOverrides],
|
|
57
|
+
...props,
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function TableCell({ compactLabel, gridColumn, gridRow, theme = {}, cssOverrides, children, ...props }) {
|
|
62
|
+
const context = useContext(TableContext);
|
|
63
|
+
const mergedTheme = mergeDeep(context.theme, theme);
|
|
64
|
+
return /* @__PURE__ */ jsx(Cell, {
|
|
65
|
+
css: [tableCellStyles(mergedTheme, gridColumn, gridRow), cssOverrides],
|
|
66
|
+
...props,
|
|
67
|
+
children: composeRenderProps(children, (children) => /* @__PURE__ */ jsxs(Fragment, { children: [compactLabel && /* @__PURE__ */ jsx("span", {
|
|
68
|
+
css: compactLabelStyles(mergedTheme, context.headerVisibleFrom),
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
children: compactLabel
|
|
71
|
+
}), children] }))
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Table$1 as Table, TableBody$1 as TableBody, TableCell, TableColumnHeader, TableHeader$1 as TableHeader, TableRow };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
const require_typography = require("../../styleD/utils/semantic/typography.cjs");
|
|
2
|
+
const require_mq = require("../../styleD/utils/semantic/mq.cjs");
|
|
3
|
+
const require_table = require("../../styleD/build/typescript/component/table.cjs");
|
|
4
|
+
let _emotion_react = require("@emotion/react");
|
|
5
|
+
//#region src/components/Table/styles.ts
|
|
6
|
+
const defaultTableTheme = require_table.componentTable;
|
|
7
|
+
const responsiveValue = (value, breakpoint) => {
|
|
8
|
+
if (breakpoint === "lg") return value.lg ?? value.md ?? value.sm;
|
|
9
|
+
if (breakpoint === "md") return value.md ?? value.sm;
|
|
10
|
+
return value.sm;
|
|
11
|
+
};
|
|
12
|
+
const gridTemplateStyles = (columns) => _emotion_react.css`
|
|
13
|
+
grid-template-columns: ${responsiveValue(columns, "sm") ?? "minmax(0, 1fr)"};
|
|
14
|
+
|
|
15
|
+
${require_mq.from.md} {
|
|
16
|
+
grid-template-columns: ${responsiveValue(columns, "md") ?? "minmax(0, 1fr)"};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
${require_mq.from.lg} {
|
|
20
|
+
grid-template-columns: ${responsiveValue(columns, "lg") ?? "minmax(0, 1fr)"};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const visuallyHiddenStyles = _emotion_react.css`
|
|
24
|
+
position: absolute;
|
|
25
|
+
width: 1px;
|
|
26
|
+
height: 1px;
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: -1px;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
clip: rect(0, 0, 0, 0);
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
border: 0;
|
|
33
|
+
`;
|
|
34
|
+
const tableStyles = (theme) => _emotion_react.css`
|
|
35
|
+
display: block;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
width: ${theme.table.width};
|
|
38
|
+
border: ${theme.table.border};
|
|
39
|
+
border-radius: ${theme.table.borderRadius};
|
|
40
|
+
border-collapse: collapse;
|
|
41
|
+
border-spacing: 0;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
background-color: ${theme.table.backgroundColor};
|
|
44
|
+
color: ${theme.table.color};
|
|
45
|
+
`;
|
|
46
|
+
const tableHeaderStyles = (theme, columns, headerVisibleFrom) => _emotion_react.css`
|
|
47
|
+
display: block;
|
|
48
|
+
background-color: ${theme.header.backgroundColor};
|
|
49
|
+
border-bottom: ${theme.header.border};
|
|
50
|
+
|
|
51
|
+
& > tr {
|
|
52
|
+
display: grid;
|
|
53
|
+
${gridTemplateStyles(columns)}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${headerVisibleFrom === "sm" ? "" : _emotion_react.css`
|
|
57
|
+
${require_mq.until[headerVisibleFrom]} {
|
|
58
|
+
${visuallyHiddenStyles}
|
|
59
|
+
}
|
|
60
|
+
`}
|
|
61
|
+
`;
|
|
62
|
+
const tableBodyStyles = _emotion_react.css`
|
|
63
|
+
display: block;
|
|
64
|
+
`;
|
|
65
|
+
const tableRowStyles = (theme, columns) => _emotion_react.css`
|
|
66
|
+
display: grid;
|
|
67
|
+
${gridTemplateStyles(columns)}
|
|
68
|
+
align-items: center;
|
|
69
|
+
background-color: ${theme.row.backgroundColor};
|
|
70
|
+
border-bottom: ${theme.row.border};
|
|
71
|
+
outline: none;
|
|
72
|
+
|
|
73
|
+
&:last-child {
|
|
74
|
+
border-bottom: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[data-hovered] {
|
|
78
|
+
background-color: ${theme.row.hoverBackgroundColor};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[data-focus-visible] {
|
|
82
|
+
outline: ${theme.row.focusVisible.outline};
|
|
83
|
+
outline-offset: ${theme.row.focusVisible.outlineOffset};
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
const tableColumnHeaderStyles = (theme) => _emotion_react.css`
|
|
87
|
+
min-width: 0;
|
|
88
|
+
padding: ${theme.cell.paddingBlock} ${theme.cell.paddingInline};
|
|
89
|
+
${require_typography.convertTypographyToEmotionStringStyle(theme.columnHeader.typography)}
|
|
90
|
+
|
|
91
|
+
text-align: left;
|
|
92
|
+
`;
|
|
93
|
+
const responsivePlacementStyles = (gridColumn, gridRow) => _emotion_react.css`
|
|
94
|
+
${gridColumn?.sm ? `grid-column: ${gridColumn.sm};` : ""}
|
|
95
|
+
${gridRow?.sm ? `grid-row: ${gridRow.sm};` : ""}
|
|
96
|
+
|
|
97
|
+
${require_mq.from.md} {
|
|
98
|
+
${responsiveValue(gridColumn ?? {}, "md") ? `grid-column: ${responsiveValue(gridColumn ?? {}, "md")};` : ""}
|
|
99
|
+
${responsiveValue(gridRow ?? {}, "md") ? `grid-row: ${responsiveValue(gridRow ?? {}, "md")};` : ""}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
${require_mq.from.lg} {
|
|
103
|
+
${responsiveValue(gridColumn ?? {}, "lg") ? `grid-column: ${responsiveValue(gridColumn ?? {}, "lg")};` : ""}
|
|
104
|
+
${responsiveValue(gridRow ?? {}, "lg") ? `grid-row: ${responsiveValue(gridRow ?? {}, "lg")};` : ""}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
const tableCellStyles = (theme, gridColumn, gridRow) => _emotion_react.css`
|
|
108
|
+
min-width: 0;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
overflow-wrap: anywhere;
|
|
111
|
+
padding: ${theme.cell.paddingBlock} ${theme.cell.paddingInline};
|
|
112
|
+
${require_typography.convertTypographyToEmotionStringStyle(theme.cell.typography)}
|
|
113
|
+
${responsivePlacementStyles(gridColumn, gridRow)}
|
|
114
|
+
`;
|
|
115
|
+
const compactLabelStyles = (theme, headerVisibleFrom) => _emotion_react.css`
|
|
116
|
+
display: inline;
|
|
117
|
+
margin-right: ${theme.compactLabel.gap};
|
|
118
|
+
color: ${theme.compactLabel.color};
|
|
119
|
+
${require_typography.convertTypographyToEmotionStringStyle(theme.compactLabel.typography)}
|
|
120
|
+
|
|
121
|
+
${require_mq.from[headerVisibleFrom]} {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
`;
|
|
125
|
+
//#endregion
|
|
126
|
+
exports.compactLabelStyles = compactLabelStyles;
|
|
127
|
+
exports.defaultTableTheme = defaultTableTheme;
|
|
128
|
+
exports.tableBodyStyles = tableBodyStyles;
|
|
129
|
+
exports.tableCellStyles = tableCellStyles;
|
|
130
|
+
exports.tableColumnHeaderStyles = tableColumnHeaderStyles;
|
|
131
|
+
exports.tableHeaderStyles = tableHeaderStyles;
|
|
132
|
+
exports.tableRowStyles = tableRowStyles;
|
|
133
|
+
exports.tableStyles = tableStyles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DeepPartial, Prettify } from "../../util/types.cjs";
|
|
2
|
+
import { ComponentTable } from "../../styleD/build/typescript/component/table.cjs";
|
|
3
|
+
import { SerializedStyles } from "@emotion/react";
|
|
4
|
+
//#region src/components/Table/styles.d.ts
|
|
5
|
+
type TableTheme = Prettify<ComponentTable>;
|
|
6
|
+
type PartialTableTheme = Prettify<DeepPartial<TableTheme>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { PartialTableTheme, TableTheme };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DeepPartial, Prettify } from "../../util/types.js";
|
|
2
|
+
import { ComponentTable } from "../../styleD/build/typescript/component/table.js";
|
|
3
|
+
import { SerializedStyles } from "@emotion/react";
|
|
4
|
+
//#region src/components/Table/styles.d.ts
|
|
5
|
+
type TableTheme = Prettify<ComponentTable>;
|
|
6
|
+
type PartialTableTheme = Prettify<DeepPartial<TableTheme>>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { PartialTableTheme, TableTheme };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { convertTypographyToEmotionStringStyle } from "../../styleD/utils/semantic/typography.js";
|
|
2
|
+
import { from, until } from "../../styleD/utils/semantic/mq.js";
|
|
3
|
+
import { componentTable } from "../../styleD/build/typescript/component/table.js";
|
|
4
|
+
import { css } from "@emotion/react";
|
|
5
|
+
//#region src/components/Table/styles.ts
|
|
6
|
+
const defaultTableTheme = componentTable;
|
|
7
|
+
const responsiveValue = (value, breakpoint) => {
|
|
8
|
+
if (breakpoint === "lg") return value.lg ?? value.md ?? value.sm;
|
|
9
|
+
if (breakpoint === "md") return value.md ?? value.sm;
|
|
10
|
+
return value.sm;
|
|
11
|
+
};
|
|
12
|
+
const gridTemplateStyles = (columns) => css`
|
|
13
|
+
grid-template-columns: ${responsiveValue(columns, "sm") ?? "minmax(0, 1fr)"};
|
|
14
|
+
|
|
15
|
+
${from.md} {
|
|
16
|
+
grid-template-columns: ${responsiveValue(columns, "md") ?? "minmax(0, 1fr)"};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
${from.lg} {
|
|
20
|
+
grid-template-columns: ${responsiveValue(columns, "lg") ?? "minmax(0, 1fr)"};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const visuallyHiddenStyles = css`
|
|
24
|
+
position: absolute;
|
|
25
|
+
width: 1px;
|
|
26
|
+
height: 1px;
|
|
27
|
+
padding: 0;
|
|
28
|
+
margin: -1px;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
clip: rect(0, 0, 0, 0);
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
border: 0;
|
|
33
|
+
`;
|
|
34
|
+
const tableStyles = (theme) => css`
|
|
35
|
+
display: block;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
width: ${theme.table.width};
|
|
38
|
+
border: ${theme.table.border};
|
|
39
|
+
border-radius: ${theme.table.borderRadius};
|
|
40
|
+
border-collapse: collapse;
|
|
41
|
+
border-spacing: 0;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
background-color: ${theme.table.backgroundColor};
|
|
44
|
+
color: ${theme.table.color};
|
|
45
|
+
`;
|
|
46
|
+
const tableHeaderStyles = (theme, columns, headerVisibleFrom) => css`
|
|
47
|
+
display: block;
|
|
48
|
+
background-color: ${theme.header.backgroundColor};
|
|
49
|
+
border-bottom: ${theme.header.border};
|
|
50
|
+
|
|
51
|
+
& > tr {
|
|
52
|
+
display: grid;
|
|
53
|
+
${gridTemplateStyles(columns)}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${headerVisibleFrom === "sm" ? "" : css`
|
|
57
|
+
${until[headerVisibleFrom]} {
|
|
58
|
+
${visuallyHiddenStyles}
|
|
59
|
+
}
|
|
60
|
+
`}
|
|
61
|
+
`;
|
|
62
|
+
const tableBodyStyles = css`
|
|
63
|
+
display: block;
|
|
64
|
+
`;
|
|
65
|
+
const tableRowStyles = (theme, columns) => css`
|
|
66
|
+
display: grid;
|
|
67
|
+
${gridTemplateStyles(columns)}
|
|
68
|
+
align-items: center;
|
|
69
|
+
background-color: ${theme.row.backgroundColor};
|
|
70
|
+
border-bottom: ${theme.row.border};
|
|
71
|
+
outline: none;
|
|
72
|
+
|
|
73
|
+
&:last-child {
|
|
74
|
+
border-bottom: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[data-hovered] {
|
|
78
|
+
background-color: ${theme.row.hoverBackgroundColor};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[data-focus-visible] {
|
|
82
|
+
outline: ${theme.row.focusVisible.outline};
|
|
83
|
+
outline-offset: ${theme.row.focusVisible.outlineOffset};
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
const tableColumnHeaderStyles = (theme) => css`
|
|
87
|
+
min-width: 0;
|
|
88
|
+
padding: ${theme.cell.paddingBlock} ${theme.cell.paddingInline};
|
|
89
|
+
${convertTypographyToEmotionStringStyle(theme.columnHeader.typography)}
|
|
90
|
+
|
|
91
|
+
text-align: left;
|
|
92
|
+
`;
|
|
93
|
+
const responsivePlacementStyles = (gridColumn, gridRow) => css`
|
|
94
|
+
${gridColumn?.sm ? `grid-column: ${gridColumn.sm};` : ""}
|
|
95
|
+
${gridRow?.sm ? `grid-row: ${gridRow.sm};` : ""}
|
|
96
|
+
|
|
97
|
+
${from.md} {
|
|
98
|
+
${responsiveValue(gridColumn ?? {}, "md") ? `grid-column: ${responsiveValue(gridColumn ?? {}, "md")};` : ""}
|
|
99
|
+
${responsiveValue(gridRow ?? {}, "md") ? `grid-row: ${responsiveValue(gridRow ?? {}, "md")};` : ""}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
${from.lg} {
|
|
103
|
+
${responsiveValue(gridColumn ?? {}, "lg") ? `grid-column: ${responsiveValue(gridColumn ?? {}, "lg")};` : ""}
|
|
104
|
+
${responsiveValue(gridRow ?? {}, "lg") ? `grid-row: ${responsiveValue(gridRow ?? {}, "lg")};` : ""}
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
const tableCellStyles = (theme, gridColumn, gridRow) => css`
|
|
108
|
+
min-width: 0;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
overflow-wrap: anywhere;
|
|
111
|
+
padding: ${theme.cell.paddingBlock} ${theme.cell.paddingInline};
|
|
112
|
+
${convertTypographyToEmotionStringStyle(theme.cell.typography)}
|
|
113
|
+
${responsivePlacementStyles(gridColumn, gridRow)}
|
|
114
|
+
`;
|
|
115
|
+
const compactLabelStyles = (theme, headerVisibleFrom) => css`
|
|
116
|
+
display: inline;
|
|
117
|
+
margin-right: ${theme.compactLabel.gap};
|
|
118
|
+
color: ${theme.compactLabel.color};
|
|
119
|
+
${convertTypographyToEmotionStringStyle(theme.compactLabel.typography)}
|
|
120
|
+
|
|
121
|
+
${from[headerVisibleFrom]} {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
`;
|
|
125
|
+
//#endregion
|
|
126
|
+
export { compactLabelStyles, defaultTableTheme, tableBodyStyles, tableCellStyles, tableColumnHeaderStyles, tableHeaderStyles, tableRowStyles, tableStyles };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DefaultPropsWithChildren } from "../../util/types.cjs";
|
|
2
|
+
import { Breakpoint } from "../../styleD/utils/semantic/mq.cjs";
|
|
3
|
+
import { TableTheme } from "./styles.cjs";
|
|
4
|
+
import { CellProps, ColumnProps, RowProps, TableBodyProps, TableHeaderProps, TableProps } from "react-aria-components";
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
|
+
//#region src/components/Table/types.d.ts
|
|
7
|
+
type ResponsiveTableValue<T> = Partial<Record<Breakpoint, T>>;
|
|
8
|
+
interface TableProps$1 extends DefaultPropsWithChildren<TableTheme>, Omit<TableProps, 'children' | 'className'> {
|
|
9
|
+
/** CSS grid tracks for each responsive breakpoint. Values cascade upward. */
|
|
10
|
+
columns: ResponsiveTableValue<string>;
|
|
11
|
+
/** Breakpoint at which the visible column header is restored. */
|
|
12
|
+
headerVisibleFrom?: Breakpoint;
|
|
13
|
+
}
|
|
14
|
+
interface TableHeaderProps$1<T extends object = object> extends DefaultPropsWithChildren<TableTheme, undefined, TableHeaderProps<T>['children']>, Omit<TableHeaderProps<T>, 'children' | 'className'> {}
|
|
15
|
+
interface TableBodyProps$1<T extends object = object> extends Omit<DefaultPropsWithChildren<TableTheme, undefined, TableBodyProps<T>['children']>, 'theme'>, Omit<TableBodyProps<T>, 'children' | 'className'> {}
|
|
16
|
+
interface TableRowProps<T extends object = object> extends DefaultPropsWithChildren<TableTheme, undefined, RowProps<T>['children']>, Omit<RowProps<T>, 'children' | 'className'> {}
|
|
17
|
+
interface TableColumnHeaderProps extends DefaultPropsWithChildren<TableTheme, undefined, ColumnProps['children']>, Omit<ColumnProps, 'children' | 'className'> {}
|
|
18
|
+
interface TableCellProps extends DefaultPropsWithChildren<TableTheme, undefined, CellProps['children']>, Omit<CellProps, 'children' | 'className'> {
|
|
19
|
+
/** Visual label shown while the column header is visually hidden. */
|
|
20
|
+
compactLabel?: ReactNode;
|
|
21
|
+
/** Responsive CSS `grid-column` placement. */
|
|
22
|
+
gridColumn?: ResponsiveTableValue<string>;
|
|
23
|
+
/** Responsive CSS `grid-row` placement. */
|
|
24
|
+
gridRow?: ResponsiveTableValue<string>;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ResponsiveTableValue, TableBodyProps$1 as TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeaderProps$1 as TableHeaderProps, TableProps$1 as TableProps, TableRowProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DefaultPropsWithChildren } from "../../util/types.js";
|
|
2
|
+
import { Breakpoint } from "../../styleD/utils/semantic/mq.js";
|
|
3
|
+
import { TableTheme } from "./styles.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
import { CellProps, ColumnProps, RowProps, TableBodyProps, TableHeaderProps, TableProps } from "react-aria-components";
|
|
6
|
+
//#region src/components/Table/types.d.ts
|
|
7
|
+
type ResponsiveTableValue<T> = Partial<Record<Breakpoint, T>>;
|
|
8
|
+
interface TableProps$1 extends DefaultPropsWithChildren<TableTheme>, Omit<TableProps, 'children' | 'className'> {
|
|
9
|
+
/** CSS grid tracks for each responsive breakpoint. Values cascade upward. */
|
|
10
|
+
columns: ResponsiveTableValue<string>;
|
|
11
|
+
/** Breakpoint at which the visible column header is restored. */
|
|
12
|
+
headerVisibleFrom?: Breakpoint;
|
|
13
|
+
}
|
|
14
|
+
interface TableHeaderProps$1<T extends object = object> extends DefaultPropsWithChildren<TableTheme, undefined, TableHeaderProps<T>['children']>, Omit<TableHeaderProps<T>, 'children' | 'className'> {}
|
|
15
|
+
interface TableBodyProps$1<T extends object = object> extends Omit<DefaultPropsWithChildren<TableTheme, undefined, TableBodyProps<T>['children']>, 'theme'>, Omit<TableBodyProps<T>, 'children' | 'className'> {}
|
|
16
|
+
interface TableRowProps<T extends object = object> extends DefaultPropsWithChildren<TableTheme, undefined, RowProps<T>['children']>, Omit<RowProps<T>, 'children' | 'className'> {}
|
|
17
|
+
interface TableColumnHeaderProps extends DefaultPropsWithChildren<TableTheme, undefined, ColumnProps['children']>, Omit<ColumnProps, 'children' | 'className'> {}
|
|
18
|
+
interface TableCellProps extends DefaultPropsWithChildren<TableTheme, undefined, CellProps['children']>, Omit<CellProps, 'children' | 'className'> {
|
|
19
|
+
/** Visual label shown while the column header is visually hidden. */
|
|
20
|
+
compactLabel?: ReactNode;
|
|
21
|
+
/** Responsive CSS `grid-column` placement. */
|
|
22
|
+
gridColumn?: ResponsiveTableValue<string>;
|
|
23
|
+
/** Responsive CSS `grid-row` placement. */
|
|
24
|
+
gridRow?: ResponsiveTableValue<string>;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { ResponsiveTableValue, TableBodyProps$1 as TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeaderProps$1 as TableHeaderProps, TableProps$1 as TableProps, TableRowProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_mergeDeep = require("../../util/mergeDeep.cjs");
|
|
2
|
+
const require_Icon = require("../Icon/Icon.cjs");
|
|
3
|
+
const require_styles = require("./styles.cjs");
|
|
4
|
+
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
5
|
+
let react_aria_components = require("react-aria-components");
|
|
6
|
+
//#region src/components/ToggleSwitch/ToggleSwitch.tsx
|
|
7
|
+
function ToggleSwitch({ children, description, size = "md", theme = {}, cssOverrides, ...props }) {
|
|
8
|
+
const mergedTheme = require_mergeDeep.mergeDeep(require_styles.defaultToggleSwitchTheme, theme);
|
|
9
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Switch, {
|
|
10
|
+
css: [require_styles.toggleSwitchStyles(mergedTheme, { size }), cssOverrides],
|
|
11
|
+
...props,
|
|
12
|
+
children: ({ isSelected, isDisabled, isFocusVisible }) => /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
13
|
+
css: require_styles.toggleSwitchTrackStyles(mergedTheme, {
|
|
14
|
+
size,
|
|
15
|
+
isSelected,
|
|
16
|
+
isDisabled,
|
|
17
|
+
isFocusVisible
|
|
18
|
+
}),
|
|
19
|
+
children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
20
|
+
css: require_styles.toggleSwitchThumbStyles(mergedTheme, {
|
|
21
|
+
size,
|
|
22
|
+
isSelected,
|
|
23
|
+
isDisabled
|
|
24
|
+
}),
|
|
25
|
+
children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
26
|
+
symbol: "check",
|
|
27
|
+
size: size === "sm" ? "sm" : "md",
|
|
28
|
+
cssOverrides: require_styles.toggleSwitchIconStyles(isSelected)
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
}), children && /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("span", {
|
|
32
|
+
css: require_styles.toggleSwitchLabelStyles(mergedTheme),
|
|
33
|
+
children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", { children }), description && /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", {
|
|
34
|
+
css: require_styles.toggleSwitchDescriptionStyles(mergedTheme),
|
|
35
|
+
children: description
|
|
36
|
+
})]
|
|
37
|
+
})] })
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
exports.ToggleSwitch = ToggleSwitch;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToggleSwitchProps } from "./types.cjs";
|
|
2
|
+
//#region src/components/ToggleSwitch/ToggleSwitch.d.ts
|
|
3
|
+
declare function ToggleSwitch({ children, description, size, theme, cssOverrides, ...props }: ToggleSwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ToggleSwitch };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ToggleSwitchProps } from "./types.js";
|
|
2
|
+
//#region src/components/ToggleSwitch/ToggleSwitch.d.ts
|
|
3
|
+
declare function ToggleSwitch({ children, description, size, theme, cssOverrides, ...props }: ToggleSwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ToggleSwitch };
|