@coveord/plasma-mantine 53.0.0 → 53.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +30 -30
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.d.ts +2 -4
- package/dist/cjs/components/inline-confirm/InlineConfirm.d.ts.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.js +2 -2
- package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/cjs/components/table/Table.module.css +1 -2
- package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.d.ts.map +1 -1
- package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.js +2 -1
- package/dist/cjs/components/table/layouts/row-layout/RowLayoutHeader.js.map +1 -1
- package/dist/cjs/components/table/table-column/TableCollapsibleColumn.js +1 -1
- package/dist/cjs/components/table/table-column/TableCollapsibleColumn.js.map +1 -1
- package/dist/cjs/components/table/table-header/TableHeader.d.ts.map +1 -1
- package/dist/cjs/components/table/table-header/TableHeader.js +0 -2
- package/dist/cjs/components/table/table-header/TableHeader.js.map +1 -1
- package/dist/cjs/components/table/table-per-page/TablePerPage.d.ts.map +1 -1
- package/dist/cjs/components/table/table-per-page/TablePerPage.js +0 -1
- package/dist/cjs/components/table/table-per-page/TablePerPage.js.map +1 -1
- package/dist/cjs/styles/Alert.module.css +31 -1
- package/dist/cjs/styles/Pagination.module.css +27 -0
- package/dist/cjs/styles/SegmentedControl.module.css +32 -0
- package/dist/cjs/theme/Theme.d.ts.map +1 -1
- package/dist/cjs/theme/Theme.js +19 -8
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.d.ts +2 -4
- package/dist/esm/components/inline-confirm/InlineConfirm.d.ts.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.js +3 -3
- package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/esm/components/table/Table.module.css +1 -2
- package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.d.ts.map +1 -1
- package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.js +1 -1
- package/dist/esm/components/table/layouts/row-layout/RowLayoutHeader.js.map +1 -1
- package/dist/esm/components/table/table-column/TableCollapsibleColumn.js +1 -1
- package/dist/esm/components/table/table-column/TableCollapsibleColumn.js.map +1 -1
- package/dist/esm/components/table/table-header/TableHeader.d.ts.map +1 -1
- package/dist/esm/components/table/table-header/TableHeader.js +0 -2
- package/dist/esm/components/table/table-header/TableHeader.js.map +1 -1
- package/dist/esm/components/table/table-per-page/TablePerPage.d.ts.map +1 -1
- package/dist/esm/components/table/table-per-page/TablePerPage.js +0 -1
- package/dist/esm/components/table/table-per-page/TablePerPage.js.map +1 -1
- package/dist/esm/styles/Alert.module.css +31 -1
- package/dist/esm/styles/Pagination.module.css +27 -0
- package/dist/esm/styles/SegmentedControl.module.css +32 -0
- package/dist/esm/theme/Theme.d.ts.map +1 -1
- package/dist/esm/theme/Theme.js +19 -10
- package/dist/esm/theme/Theme.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inline-confirm/InlineConfirm.tsx +4 -6
- package/src/components/inline-confirm/__tests__/InlineConfirm.spec.tsx +2 -2
- package/src/components/table/Table.module.css +1 -2
- package/src/components/table/layouts/row-layout/RowLayoutHeader.tsx +2 -5
- package/src/components/table/table-column/TableCollapsibleColumn.tsx +1 -1
- package/src/components/table/table-header/TableHeader.tsx +1 -7
- package/src/components/table/table-per-page/TablePerPage.tsx +0 -1
- package/src/styles/Alert.module.css +31 -1
- package/src/styles/Pagination.module.css +27 -0
- package/src/styles/SegmentedControl.module.css +32 -0
- package/src/theme/Theme.tsx +22 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Factory, StylesApiProps } from '@mantine/core';
|
|
2
|
+
import { MantineComponent } from '@mantine/core/lib/core/factory/factory';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
import { InlineConfirmPrompt } from './InlineConfirmPrompt';
|
|
4
5
|
import { InlineConfirmTarget } from './InlineConfirmTarget';
|
|
5
|
-
export type InlineConfirmStyleNames = 'root';
|
|
6
6
|
export interface InlineConfirmProps extends StylesApiProps<InlineConfirmFactory> {
|
|
7
7
|
/**
|
|
8
8
|
* The content of the component. Should contain at least one `InlineConfirm.Target` and one `InlineConfirm.Prompt` with matching ids
|
|
@@ -12,16 +12,14 @@ export interface InlineConfirmProps extends StylesApiProps<InlineConfirmFactory>
|
|
|
12
12
|
export type InlineConfirmFactory = Factory<{
|
|
13
13
|
props: InlineConfirmProps;
|
|
14
14
|
ref: never;
|
|
15
|
-
stylesNames: InlineConfirmStyleNames;
|
|
16
15
|
staticComponents: {
|
|
17
16
|
Prompt: typeof InlineConfirmPrompt;
|
|
18
17
|
Target: typeof InlineConfirmTarget;
|
|
19
18
|
};
|
|
20
19
|
}>;
|
|
21
|
-
export declare const InlineConfirm:
|
|
20
|
+
export declare const InlineConfirm: MantineComponent<{
|
|
22
21
|
props: InlineConfirmProps;
|
|
23
22
|
ref: never;
|
|
24
|
-
stylesNames: InlineConfirmStyleNames;
|
|
25
23
|
staticComponents: {
|
|
26
24
|
Prompt: typeof InlineConfirmPrompt;
|
|
27
25
|
Target: typeof InlineConfirmTarget;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,cAAc,EAAW,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAyB,SAAS,EAAW,MAAM,OAAO,CAAC;AAElE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,oBAAoB,CAAC;IAC5E;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;IACvC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,KAAK,CAAC;IACX,gBAAgB,EAAE;QACd,MAAM,EAAE,OAAO,mBAAmB,CAAC;QACnC,MAAM,EAAE,OAAO,mBAAmB,CAAC;KACtC,CAAC;CACL,CAAC,CAAC;AAIH,eAAO,MAAM,aAAa;WAVf,kBAAkB;SACpB,KAAK;sBACQ;QACd,MAAM,EAAE,0BAA0B,CAAC;QACnC,MAAM,EAAE,0BAA0B,CAAC;KACtC;EAoBuC,CAAC"}
|
|
@@ -16,7 +16,7 @@ var _InlineConfirmContext = require("./InlineConfirmContext");
|
|
|
16
16
|
var _InlineConfirmPrompt = require("./InlineConfirmPrompt");
|
|
17
17
|
var _InlineConfirmTarget = require("./InlineConfirmTarget");
|
|
18
18
|
var defaultProps = {};
|
|
19
|
-
var InlineConfirm =
|
|
19
|
+
var InlineConfirm = function(_props) {
|
|
20
20
|
var children = (0, _core.useProps)("InlineConfirm", defaultProps, _props).children;
|
|
21
21
|
var _useState = _sliced_to_array._((0, _react.useState)(null), 2), confirmingId = _useState[0], setConfirmingId = _useState[1];
|
|
22
22
|
var convertedChildren = _react.Children.toArray(children);
|
|
@@ -34,7 +34,7 @@ var InlineConfirm = (0, _core.factory)(function(_props) {
|
|
|
34
34
|
},
|
|
35
35
|
children: prompt !== null && prompt !== void 0 ? prompt : children
|
|
36
36
|
});
|
|
37
|
-
}
|
|
37
|
+
};
|
|
38
38
|
InlineConfirm.Prompt = _InlineConfirmPrompt.InlineConfirmPrompt;
|
|
39
39
|
InlineConfirm.Target = _InlineConfirmTarget.InlineConfirmTarget;
|
|
40
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Factory, StylesApiProps, useProps} from '@mantine/core';\nimport {MantineComponent} from '@mantine/core/lib/core/factory/factory';\nimport {Children, ReactElement, ReactNode, useState} from 'react';\nimport {InlineConfirmProvider} from './InlineConfirmContext';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\nimport {InlineConfirmTarget} from './InlineConfirmTarget';\n\nexport interface InlineConfirmProps extends StylesApiProps<InlineConfirmFactory> {\n /**\n * The content of the component. Should contain at least one `InlineConfirm.Target` and one `InlineConfirm.Prompt` with matching ids\n */\n children: ReactNode;\n}\n\nexport type InlineConfirmFactory = Factory<{\n props: InlineConfirmProps;\n ref: never;\n staticComponents: {\n Prompt: typeof InlineConfirmPrompt;\n Target: typeof InlineConfirmTarget;\n };\n}>;\n\nconst defaultProps: Partial<InlineConfirmProps> = {};\n\nexport const InlineConfirm = ((_props) => {\n const {children} = useProps('InlineConfirm', defaultProps, _props);\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId,\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmProvider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmProvider>\n );\n}) as MantineComponent<InlineConfirmFactory>;\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Target = InlineConfirmTarget;\n"],"names":["InlineConfirm","defaultProps","_props","children","useProps","useState","confirmingId","setConfirmingId","convertedChildren","Children","toArray","prompt","find","child","type","InlineConfirmPrompt","props","id","clearConfirm","InlineConfirmProvider","value","Prompt","Target","InlineConfirmTarget"],"mappings":";;;;+BA0BaA;;;eAAAA;;;;;oBA1BmC;qBAEU;oCACtB;mCACF;mCAEA;AAkBlC,IAAMC,eAA4C,CAAC;AAE5C,IAAMD,gBAAiB,SAACE;IAC3B,IAAM,AAACC,WAAYC,IAAAA,cAAQ,EAAC,iBAAiBH,cAAcC,QAApDC;IACP,IAAwCE,+BAAAA,IAAAA,eAAQ,EAAgB,WAAzDC,eAAiCD,cAAnBE,kBAAmBF;IAExC,IAAMG,oBAAoBC,eAAQ,CAACC,OAAO,CAACP;IAC3C,IAAMQ,SAASH,kBAAkBI,IAAI,CACjC,SAACC;eAAUA,MAAMC,IAAI,KAAKC,wCAAmB,IAAIF,MAAMG,KAAK,CAACC,EAAE,KAAKX;;IAExE,IAAMY,eAAe;eAAMX,gBAAgB;;IAE3C,qBACI,qBAACY,2CAAqB;QAACC,OAAO;YAACd,cAAAA;YAAcC,iBAAAA;YAAiBW,cAAAA;QAAY;kBACrEP,mBAAAA,oBAAAA,SAAUR;;AAGvB;AAEAH,cAAcqB,MAAM,GAAGN,wCAAmB;AAC1Cf,cAAcsB,MAAM,GAAGC,wCAAmB"}
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
.headerRoot {
|
|
36
36
|
border-bottom: 1px solid var(--mantine-color-gray-3);
|
|
37
37
|
background-color: var(--mantine-color-gray-1);
|
|
38
|
-
padding
|
|
39
|
-
padding-right: var(--mantine-spacing-lg);
|
|
38
|
+
padding: var(--mantine-spacing-sm) var(--mantine-spacing-xl);
|
|
40
39
|
position: relative;
|
|
41
40
|
}
|
|
42
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowLayoutHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAoB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,sBA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qBAAqB,OAAO,CAAC;aAC/B,mBAAmB;qBACX,yBAAyB;kBAC5B,IAAI;;CAyBjB,CAAC"}
|
|
@@ -20,10 +20,11 @@ var _RowLayoutContext = require("./RowLayoutContext");
|
|
|
20
20
|
var defaultProps = {};
|
|
21
21
|
var RowLayoutHeader = function(props) {
|
|
22
22
|
var ctx = (0, _RowLayoutContext.useRowLayout)();
|
|
23
|
-
var _useProps = (0, _core.useProps)("RowLayoutHeader", defaultProps, props), table = _useProps.table, getExpandChildren = _useProps.getExpandChildren, loading = _useProps.loading, className = _useProps.className, style = _useProps.style, classNames = _useProps.classNames, styles = _useProps.styles, others = _object_without_properties._(_useProps, [
|
|
23
|
+
var _useProps = (0, _core.useProps)("RowLayoutHeader", defaultProps, props), table = _useProps.table, getExpandChildren = _useProps.getExpandChildren, loading = _useProps.loading, doubleClickAction = _useProps.doubleClickAction, className = _useProps.className, style = _useProps.style, classNames = _useProps.classNames, styles = _useProps.styles, others = _object_without_properties._(_useProps, [
|
|
24
24
|
"table",
|
|
25
25
|
"getExpandChildren",
|
|
26
26
|
"loading",
|
|
27
|
+
"doubleClickAction",
|
|
27
28
|
"className",
|
|
28
29
|
"style",
|
|
29
30
|
"classNames",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"sourcesContent":["import {BoxProps, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ForwardedRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils';\nimport {Th} from '../../table-header/Th';\nimport {useTable} from '../../TableContext';\nimport {type TableLayoutProps} from '../TableLayouts';\nimport {RowLayoutBodyFactory} from './RowLayoutBody';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutHeaderStyleNames = 'headerRow';\n\nexport interface RowLayoutHeaderProps<T>\n extends BoxProps,\n TableLayoutProps<T>,\n CompoundStylesApiProps<RowLayoutBodyFactory> {}\n\ntype RowLayoutHeaderFactory = Factory<{\n props: RowLayoutHeaderProps<unknown>;\n ref: HTMLTableRowElement;\n stylesNames: RowLayoutHeaderStyleNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutHeaderProps<unknown>> = {};\n\nexport const RowLayoutHeader = <T,>(props: RowLayoutHeaderProps<T> & {ref?: ForwardedRef<HTMLTableRowElement>}) => {\n const ctx = useRowLayout();\n const {table, getExpandChildren, loading, className, style, classNames, styles, ...others}
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"sourcesContent":["import {BoxProps, Factory, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ForwardedRef} from 'react';\nimport {CustomComponentThemeExtend, identity} from '../../../../utils';\nimport {Th} from '../../table-header/Th';\nimport {useTable} from '../../TableContext';\nimport {type TableLayoutProps} from '../TableLayouts';\nimport {RowLayoutBodyFactory} from './RowLayoutBody';\nimport {useRowLayout} from './RowLayoutContext';\n\nexport type RowLayoutHeaderStyleNames = 'headerRow';\n\nexport interface RowLayoutHeaderProps<T>\n extends BoxProps,\n TableLayoutProps<T>,\n CompoundStylesApiProps<RowLayoutBodyFactory> {}\n\ntype RowLayoutHeaderFactory = Factory<{\n props: RowLayoutHeaderProps<unknown>;\n ref: HTMLTableRowElement;\n stylesNames: RowLayoutHeaderStyleNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<RowLayoutHeaderProps<unknown>> = {};\n\nexport const RowLayoutHeader = <T,>(props: RowLayoutHeaderProps<T> & {ref?: ForwardedRef<HTMLTableRowElement>}) => {\n const ctx = useRowLayout();\n const {table, getExpandChildren, loading, doubleClickAction, className, style, classNames, styles, ...others} =\n useProps('RowLayoutHeader', defaultProps as RowLayoutHeaderProps<T>, props);\n const {multiRowSelectionEnabled, disableRowSelection} = useTable();\n\n const headers = table.getHeaderGroups().map((headerGroup) => (\n <tr\n key={headerGroup.id}\n data-selectable={!disableRowSelection}\n data-multi-selection={multiRowSelectionEnabled}\n {...ctx.getStyles('headerRow', {className, classNames, styles, style})}\n {...others}\n >\n {headerGroup.headers.map((columnHeader) => (\n <Th key={columnHeader.id} header={columnHeader} />\n ))}\n </tr>\n ));\n return <>{headers}</>;\n};\nRowLayoutHeader.extend = identity as CustomComponentThemeExtend<RowLayoutHeaderFactory>;\n"],"names":["RowLayoutHeader","defaultProps","props","ctx","useRowLayout","useProps","table","getExpandChildren","loading","doubleClickAction","className","style","classNames","styles","others","useTable","multiRowSelectionEnabled","disableRowSelection","headers","getHeaderGroups","map","headerGroup","tr","data-selectable","data-multi-selection","getStyles","columnHeader","Th","header","id","extend","identity"],"mappings":";;;;+BA0BaA;;;eAAAA;;;;;;;oBA1B6B;qBAGS;kBAClC;4BACM;gCAGI;AAgB3B,IAAMC,eAAuD,CAAC;AAEvD,IAAMD,kBAAkB,SAAKE;IAChC,IAAMC,MAAMC,IAAAA,8BAAY;IACxB,IACIC,YAAAA,IAAAA,cAAQ,EAAC,mBAAmBJ,cAAyCC,QADlEI,QACHD,UADGC,OAAOC,oBACVF,UADUE,mBAAmBC,UAC7BH,UAD6BG,SAASC,oBACtCJ,UADsCI,mBAAmBC,YACzDL,UADyDK,WAAWC,QACpEN,UADoEM,OAAOC,aAC3EP,UAD2EO,YAAYC,SACvFR,UADuFQ,QAAWC,sCAClGT;QADGC;QAAOC;QAAmBC;QAASC;QAAmBC;QAAWC;QAAOC;QAAYC;;IAE3F,IAAwDE,YAAAA,IAAAA,sBAAQ,KAAzDC,2BAAiDD,UAAjDC,0BAA0BC,sBAAuBF,UAAvBE;IAEjC,IAAMC,UAAUZ,MAAMa,eAAe,GAAGC,GAAG,CAAC,SAACC;6BACzC,qBAACC;YAEGC,mBAAiB,CAACN;YAClBO,wBAAsBR;WAClBb,IAAIsB,SAAS,CAAC,aAAa;YAACf,WAAAA;YAAWE,YAAAA;YAAYC,QAAAA;YAAQF,OAAAA;QAAK,IAChEG;sBAEHO,YAAYH,OAAO,CAACE,GAAG,CAAC,SAACM;qCACtB,qBAACC,MAAE;oBAAuBC,QAAQF;mBAAzBA,aAAaG,EAAE;;YAPvBR,YAAYQ,EAAE;;IAW3B,qBAAO;kBAAGX;;AACd;AACAlB,gBAAgB8B,MAAM,GAAGC,eAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/table/table-column/TableCollapsibleColumn.tsx"],"sourcesContent":["import {ArrowHeadDownSize16Px, ArrowHeadUpSize16Px} from '@coveord/plasma-react-icons';\nimport {Factory, factory, useProps} from '@mantine/core';\nimport {CellContext, ColumnDef} from '@tanstack/table-core';\nimport {MouseEvent as ReactMouseEvent, ReactNode} from 'react';\nimport {ActionIcon, ActionIconProps} from '../../action-icon';\nimport {useTableStyles} from '../TableContext';\n\nexport type TableCollapsibleColumnStylesNames = 'collapsibleIcon';\n\nconst sharedProps: ColumnDef<unknown> = {\n id: 'collapsible',\n enableSorting: false,\n header: '',\n size:
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/table/table-column/TableCollapsibleColumn.tsx"],"sourcesContent":["import {ArrowHeadDownSize16Px, ArrowHeadUpSize16Px} from '@coveord/plasma-react-icons';\nimport {Factory, factory, useProps} from '@mantine/core';\nimport {CellContext, ColumnDef} from '@tanstack/table-core';\nimport {MouseEvent as ReactMouseEvent, ReactNode} from 'react';\nimport {ActionIcon, ActionIconProps} from '../../action-icon';\nimport {useTableStyles} from '../TableContext';\n\nexport type TableCollapsibleColumnStylesNames = 'collapsibleIcon';\n\nconst sharedProps: ColumnDef<unknown> = {\n id: 'collapsible',\n enableSorting: false,\n header: '',\n size: 84, // 16px padding left + 28px ActionIcon + 40px padding right\n};\n\n/**\n * Generic column to use when your table needs collapsible rows\n */\nexport const TableCollapsibleColumn: ColumnDef<unknown> = {\n ...sharedProps,\n cell: (info) => <CollapsibleIcon info={info} />,\n};\n\n/**\n * Generic column to use when your table needs an accordion (collapsible rows, but only one open at the time)\n */\nexport const TableAccordionColumn: ColumnDef<unknown> = {\n ...sharedProps,\n cell: (info) => {\n const onToggle = () => {\n // close all other rows when the current row not is expanded\n if (!info.row.getIsExpanded()) {\n info.table.toggleAllRowsExpanded(false);\n }\n };\n\n return <CollapsibleIcon onToggle={onToggle} info={info} />;\n },\n};\n\ninterface CollapsibleIconProps extends ActionIconProps {\n info: CellContext<unknown, unknown>;\n onToggle?: (e: ReactMouseEvent<HTMLButtonElement>) => void;\n iconExpanded?: ReactNode;\n iconCollapsed?: ReactNode;\n}\n\ntype TableCollapsibleColumnFactory = Factory<{\n props: CollapsibleIconProps;\n ref: HTMLButtonElement;\n stylesNames: TableCollapsibleColumnStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<CollapsibleIconProps> = {\n iconExpanded: <ArrowHeadUpSize16Px height={16} />,\n iconCollapsed: <ArrowHeadDownSize16Px height={16} />,\n};\n\nconst CollapsibleIcon = factory<TableCollapsibleColumnFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {info, onToggle, iconExpanded, iconCollapsed, classNames, className, style, styles, ...others} = useProps(\n 'PlasmaTableCollapsibleColumn',\n defaultProps,\n props,\n );\n const handler = info.row.getToggleExpandedHandler();\n const onClick = (e: ReactMouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n onToggle?.(e);\n handler();\n };\n return info.row.getCanExpand() ? (\n <ActionIcon\n ref={ref}\n onClick={onClick}\n variant=\"subtle\"\n color=\"gray\"\n radius=\"sm\"\n {...ctx.getStyles('collapsibleIcon', {className, classNames, styles, style})}\n {...others}\n >\n {info.row.getIsExpanded() ? iconExpanded : iconCollapsed}\n </ActionIcon>\n ) : null;\n});\n"],"names":["TableCollapsibleColumn","TableAccordionColumn","sharedProps","id","enableSorting","header","size","cell","info","CollapsibleIcon","onToggle","row","getIsExpanded","table","toggleAllRowsExpanded","defaultProps","iconExpanded","ArrowHeadUpSize16Px","height","iconCollapsed","ArrowHeadDownSize16Px","factory","props","ref","ctx","useTableStyles","useProps","classNames","className","style","styles","others","handler","getToggleExpandedHandler","onClick","e","stopPropagation","getCanExpand","ActionIcon","variant","color","radius","getStyles"],"mappings":";;;;;;;;;;;IAmBaA,sBAAsB;eAAtBA;;IAQAC,oBAAoB;eAApBA;;;;;;;gCA3B4C;oBAChB;0BAGC;4BACb;AAI7B,IAAMC,cAAkC;IACpCC,IAAI;IACJC,eAAe;IACfC,QAAQ;IACRC,MAAM;AACV;AAKO,IAAMN,yBAA6C,4CACnDE;IACHK,MAAM,SAACC;6BAAS,qBAACC;YAAgBD,MAAMA;;;;AAMpC,IAAMP,uBAA2C,4CACjDC;IACHK,MAAM,SAACC;QACH,IAAME,WAAW;YACb,4DAA4D;YAC5D,IAAI,CAACF,KAAKG,GAAG,CAACC,aAAa,IAAI;gBAC3BJ,KAAKK,KAAK,CAACC,qBAAqB,CAAC;YACrC;QACJ;QAEA,qBAAO,qBAACL;YAAgBC,UAAUA;YAAUF,MAAMA;;IACtD;;AAiBJ,IAAMO,eAA8C;IAChDC,4BAAc,qBAACC,qCAAmB;QAACC,QAAQ;;IAC3CC,6BAAe,qBAACC,uCAAqB;QAACF,QAAQ;;AAClD;AAEA,IAAMT,kBAAkBY,IAAAA,aAAO,EAAgC,SAACC,OAAOC;IACnE,IAAMC,MAAMC,IAAAA,4BAAc;IAC1B,IAAuGC,YAAAA,IAAAA,cAAQ,EAC3G,gCACAX,cACAO,QAHGd,OAAgGkB,UAAhGlB,MAAME,WAA0FgB,UAA1FhB,UAAUM,eAAgFU,UAAhFV,cAAcG,gBAAkEO,UAAlEP,eAAeQ,aAAmDD,UAAnDC,YAAYC,YAAuCF,UAAvCE,WAAWC,QAA4BH,UAA5BG,OAAOC,SAAqBJ,UAArBI,QAAWC,sCAAUL;QAAhGlB;QAAME;QAAUM;QAAcG;QAAeQ;QAAYC;QAAWC;QAAOC;;IAKlF,IAAME,UAAUxB,KAAKG,GAAG,CAACsB,wBAAwB;IACjD,IAAMC,UAAU,SAACC;YAEbzB;QADAyB,EAAEC,eAAe;SACjB1B,YAAAA,sBAAAA,gCAAAA,UAAWyB;QACXH;IACJ;IACA,OAAOxB,KAAKG,GAAG,CAAC0B,YAAY,mBACxB,qBAACC,sBAAU;QACPf,KAAKA;QACLW,SAASA;QACTK,SAAQ;QACRC,OAAM;QACNC,QAAO;OACHjB,IAAIkB,SAAS,CAAC,mBAAmB;QAACd,WAAAA;QAAWD,YAAAA;QAAYG,QAAAA;QAAQD,OAAAA;IAAK,IACtEE;kBAEHvB,KAAKG,GAAG,CAACC,aAAa,KAAKI,eAAeG;UAE/C;AACR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-header/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,QAAQ,EAAW,OAAO,EAA0B,MAAM,eAAe,CAAC;AACvF,OAAO,EAAC,sBAAsB,EAAC,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAOhC,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,YAAY,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC,EACpD,sBAAsB,CAAC,kBAAkB,CAAC;IAE9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,sBAAsB,CAAC;IACpC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAOH,eAAO,MAAM,WAAW;WAXb,gBAAgB;SAClB,cAAc;iBACN,sBAAsB;cACzB,IAAI;
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-header/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,QAAQ,EAAW,OAAO,EAA0B,MAAM,eAAe,CAAC;AACvF,OAAO,EAAC,sBAAsB,EAAC,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAOhC,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,YAAY,GAAG,iBAAiB,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC,EACpD,sBAAsB,CAAC,kBAAkB,CAAC;IAE9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,sBAAsB,CAAC;IACpC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAOH,eAAO,MAAM,WAAW;WAXb,gBAAgB;SAClB,cAAc;iBACN,sBAAsB;cACzB,IAAI;EAkDhB,CAAC"}
|
|
@@ -45,8 +45,6 @@ var TableHeader = (0, _core.factory)(function(props, ref) {
|
|
|
45
45
|
var innerStyles = ctx.getStyles("headerGridInner", stylesApiProps);
|
|
46
46
|
var gridStyles = ctx.getStyles("headerGrid", stylesApiProps);
|
|
47
47
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Box, _object_spread_props._(_object_spread._({
|
|
48
|
-
py: "sm",
|
|
49
|
-
px: "lg",
|
|
50
48
|
ref: ref
|
|
51
49
|
}, ctx.getStyles("headerRoot", _object_spread._({
|
|
52
50
|
className: className,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/table/table-header/TableHeader.tsx"],"sourcesContent":["import {CrossSize16Px} from '@coveord/plasma-react-icons';\nimport {Box, BoxProps, factory, Factory, Grid, Tooltip, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ReactNode} from 'react';\n\nimport {Button} from '../../button';\nimport {TableLayoutControl} from '../layouts/TableLayoutControl';\nimport {TableComponentsOrder} from '../Table';\nimport {useTable, useTableStyles} from '../TableContext';\n\nexport type TableHeaderStylesNames = 'headerRoot' | 'headerGrid' | 'headerGridInner' | 'headerCol';\n\nexport interface TableHeaderProps\n extends Omit<BoxProps, 'classNames' | 'styles' | 'vars'>,\n CompoundStylesApiProps<TableHeaderFactory> {\n /* Children of header (ie: actions, datepicker, etc.) */\n children?: ReactNode;\n unselectAllLabel?: string;\n selectedCountLabel?: (count: number) => string;\n}\n\nexport type TableHeaderFactory = Factory<{\n props: TableHeaderProps;\n ref: HTMLDivElement;\n stylesNames: TableHeaderStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableHeaderProps> = {\n unselectAllLabel: 'Unselect all',\n selectedCountLabel: (count) => `${count} selected`,\n};\n\nexport const TableHeader = factory<TableHeaderFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {unselectAllLabel, selectedCountLabel, children, classNames, className, styles, style, vars, ...others} =\n useProps('PlasmaTableHeader', defaultProps, props);\n const {getSelectedRows, multiRowSelectionEnabled, clearSelection, disableRowSelection} = useTable();\n const selectedRows = getSelectedRows();\n\n const stylesApiProps = {classNames, styles};\n const innerStyles = ctx.getStyles('headerGridInner', stylesApiProps);\n const gridStyles = ctx.getStyles('headerGrid', stylesApiProps);\n\n return (\n <Box
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/table/table-header/TableHeader.tsx"],"sourcesContent":["import {CrossSize16Px} from '@coveord/plasma-react-icons';\nimport {Box, BoxProps, factory, Factory, Grid, Tooltip, useProps} from '@mantine/core';\nimport {CompoundStylesApiProps} from '@mantine/core/lib/core/styles-api/styles-api.types';\nimport {ReactNode} from 'react';\n\nimport {Button} from '../../button';\nimport {TableLayoutControl} from '../layouts/TableLayoutControl';\nimport {TableComponentsOrder} from '../Table';\nimport {useTable, useTableStyles} from '../TableContext';\n\nexport type TableHeaderStylesNames = 'headerRoot' | 'headerGrid' | 'headerGridInner' | 'headerCol';\n\nexport interface TableHeaderProps\n extends Omit<BoxProps, 'classNames' | 'styles' | 'vars'>,\n CompoundStylesApiProps<TableHeaderFactory> {\n /* Children of header (ie: actions, datepicker, etc.) */\n children?: ReactNode;\n unselectAllLabel?: string;\n selectedCountLabel?: (count: number) => string;\n}\n\nexport type TableHeaderFactory = Factory<{\n props: TableHeaderProps;\n ref: HTMLDivElement;\n stylesNames: TableHeaderStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TableHeaderProps> = {\n unselectAllLabel: 'Unselect all',\n selectedCountLabel: (count) => `${count} selected`,\n};\n\nexport const TableHeader = factory<TableHeaderFactory>((props, ref) => {\n const ctx = useTableStyles();\n const {unselectAllLabel, selectedCountLabel, children, classNames, className, styles, style, vars, ...others} =\n useProps('PlasmaTableHeader', defaultProps, props);\n const {getSelectedRows, multiRowSelectionEnabled, clearSelection, disableRowSelection} = useTable();\n const selectedRows = getSelectedRows();\n\n const stylesApiProps = {classNames, styles};\n const innerStyles = ctx.getStyles('headerGridInner', stylesApiProps);\n const gridStyles = ctx.getStyles('headerGrid', stylesApiProps);\n\n return (\n <Box ref={ref} {...ctx.getStyles('headerRoot', {className, style, ...stylesApiProps})} {...others}>\n <Grid\n justify=\"flex-start\"\n align=\"center\"\n classNames={{inner: innerStyles.className, root: gridStyles.className}}\n styles={{inner: innerStyles.style, root: gridStyles.style}}\n >\n {multiRowSelectionEnabled && selectedRows.length > 0 ? (\n <Grid.Col\n span=\"auto\"\n {...ctx.getStyles('headerCol', stylesApiProps)}\n order={TableComponentsOrder.MultiSelectInfo}\n >\n <Tooltip label={unselectAllLabel}>\n <Button\n onClick={clearSelection}\n variant=\"subtle\"\n disabled={disableRowSelection}\n leftSection={<CrossSize16Px height={16} />}\n >\n {selectedCountLabel(selectedRows.length)}\n </Button>\n </Tooltip>\n </Grid.Col>\n ) : null}\n {children}\n <TableLayoutControl />\n </Grid>\n </Box>\n );\n});\n"],"names":["TableHeader","defaultProps","unselectAllLabel","selectedCountLabel","count","factory","props","ref","ctx","useTableStyles","useProps","children","classNames","className","styles","style","vars","others","useTable","getSelectedRows","multiRowSelectionEnabled","clearSelection","disableRowSelection","selectedRows","stylesApiProps","innerStyles","getStyles","gridStyles","Box","Grid","justify","align","inner","root","length","Col","span","order","TableComponentsOrder","MultiSelectInfo","Tooltip","label","Button","onClick","variant","disabled","leftSection","CrossSize16Px","height","TableLayoutControl"],"mappings":";;;;+BAiCaA;;;eAAAA;;;;;;;gCAjCe;oBAC2C;sBAIlD;kCACY;qBACE;4BACI;AAoBvC,IAAMC,eAA0C;IAC5CC,kBAAkB;IAClBC,oBAAoB,SAACC;eAAU,AAAC,GAAQ,OAANA,OAAM;;AAC5C;AAEO,IAAMJ,cAAcK,IAAAA,aAAO,EAAqB,SAACC,OAAOC;IAC3D,IAAMC,MAAMC,IAAAA,4BAAc;IAC1B,IACIC,YAAAA,IAAAA,cAAQ,EAAC,qBAAqBT,cAAcK,QADzCJ,mBACHQ,UADGR,kBAAkBC,qBACrBO,UADqBP,oBAAoBQ,WACzCD,UADyCC,UAAUC,aACnDF,UADmDE,YAAYC,YAC/DH,UAD+DG,WAAWC,SAC1EJ,UAD0EI,QAAQC,QAClFL,UADkFK,OAAOC,OACzFN,UADyFM,MAASC,sCAClGP;QADGR;QAAkBC;QAAoBQ;QAAUC;QAAYC;QAAWC;QAAQC;QAAOC;;IAE7F,IAAyFE,YAAAA,IAAAA,sBAAQ,KAA1FC,kBAAkFD,UAAlFC,iBAAiBC,2BAAiEF,UAAjEE,0BAA0BC,iBAAuCH,UAAvCG,gBAAgBC,sBAAuBJ,UAAvBI;IAClE,IAAMC,eAAeJ;IAErB,IAAMK,iBAAiB;QAACZ,YAAAA;QAAYE,QAAAA;IAAM;IAC1C,IAAMW,cAAcjB,IAAIkB,SAAS,CAAC,mBAAmBF;IACrD,IAAMG,aAAanB,IAAIkB,SAAS,CAAC,cAAcF;IAE/C,qBACI,qBAACI,SAAG;QAACrB,KAAKA;OAASC,IAAIkB,SAAS,CAAC,cAAc;QAACb,WAAAA;QAAWE,OAAAA;OAAUS,kBAAsBP;kBACvF,cAAA,sBAACY,UAAI;YACDC,SAAQ;YACRC,OAAM;YACNnB,YAAY;gBAACoB,OAAOP,YAAYZ,SAAS;gBAAEoB,MAAMN,WAAWd,SAAS;YAAA;YACrEC,QAAQ;gBAACkB,OAAOP,YAAYV,KAAK;gBAAEkB,MAAMN,WAAWZ,KAAK;YAAA;;gBAExDK,4BAA4BG,aAAaW,MAAM,GAAG,kBAC/C,qBAACL,UAAI,CAACM,GAAG;oBACLC,MAAK;mBACD5B,IAAIkB,SAAS,CAAC,aAAaF;oBAC/Ba,OAAOC,2BAAoB,CAACC,eAAe;8BAE3C,cAAA,qBAACC,aAAO;wBAACC,OAAOvC;kCACZ,cAAA,qBAACwC,cAAM;4BACHC,SAAStB;4BACTuB,SAAQ;4BACRC,UAAUvB;4BACVwB,2BAAa,qBAACC,+BAAa;gCAACC,QAAQ;;sCAEnC7C,mBAAmBoB,aAAaW,MAAM;;;sBAInD;gBACHvB;8BACD,qBAACsC,sCAAkB;;;;AAInC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePerPage.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-per-page/TablePerPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;IAAC,YAAY,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"TablePerPage.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-per-page/TablePerPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;IAAC,YAAY,EAAE,MAAM,CAAA;CA0BtF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/table/table-per-page/TablePerPage.tsx"],"sourcesContent":["import {Group, SegmentedControl, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {useTable} from '../TableContext';\nimport {TablePerPageProps} from './TablePerPage.types';\n\nexport const TablePerPage: FunctionComponent<TablePerPageProps> & {DEFAULT_SIZE: number} = ({\n label = 'Results per page',\n values = [25, 50, 100],\n onPerPageChange,\n}) => {\n const {state, setState, getPageCount} = useTable();\n\n const updatePerPage = (newPerPage: string) => {\n onPerPageChange?.(Number(newPerPage));\n setState((prevState) => ({\n ...prevState,\n pagination: {pageIndex: 0, pageSize: parseInt(newPerPage, 10)},\n }));\n };\n\n return getPageCount() > 0 ? (\n <Group gap=\"sm\">\n <Text fw={500}>{label}</Text>\n <SegmentedControl\n value={state.pagination.pageSize.toString() ?? values?.[1].toString()}\n onChange={updatePerPage}\n data={values.map((value) => value.toString())}\n
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/table/table-per-page/TablePerPage.tsx"],"sourcesContent":["import {Group, SegmentedControl, Text} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {useTable} from '../TableContext';\nimport {TablePerPageProps} from './TablePerPage.types';\n\nexport const TablePerPage: FunctionComponent<TablePerPageProps> & {DEFAULT_SIZE: number} = ({\n label = 'Results per page',\n values = [25, 50, 100],\n onPerPageChange,\n}) => {\n const {state, setState, getPageCount} = useTable();\n\n const updatePerPage = (newPerPage: string) => {\n onPerPageChange?.(Number(newPerPage));\n setState((prevState) => ({\n ...prevState,\n pagination: {pageIndex: 0, pageSize: parseInt(newPerPage, 10)},\n }));\n };\n\n return getPageCount() > 0 ? (\n <Group gap=\"sm\">\n <Text fw={500}>{label}</Text>\n <SegmentedControl\n value={state.pagination.pageSize.toString() ?? values?.[1].toString()}\n onChange={updatePerPage}\n data={values.map((value) => value.toString())}\n size=\"sm\"\n />\n </Group>\n ) : null;\n};\n\nTablePerPage.DEFAULT_SIZE = 50;\n"],"names":["TablePerPage","label","values","onPerPageChange","useTable","state","setState","getPageCount","updatePerPage","newPerPage","Number","prevState","pagination","pageIndex","pageSize","parseInt","Group","gap","Text","fw","SegmentedControl","value","toString","onChange","data","map","size","DEFAULT_SIZE"],"mappings":";;;;+BAMaA;;;eAAAA;;;;;;oBAN+B;4BAGrB;AAGhB,IAAMA,eAA8E;6BACvFC,OAAAA,kCAAQ,yDACRC,QAAAA,oCAAS;QAAC;QAAI;QAAI;KAAI,kBACtBC,wBAAAA;QAgB2DD;IAd3D,IAAwCE,YAAAA,IAAAA,sBAAQ,KAAzCC,QAAiCD,UAAjCC,OAAOC,WAA0BF,UAA1BE,UAAUC,eAAgBH,UAAhBG;IAExB,IAAMC,gBAAgB,SAACC;YACnBN;SAAAA,mBAAAA,6BAAAA,uCAAAA,iBAAkBO,OAAOD;QACzBH,SAAS,SAACK;mBAAe,4CAClBA;gBACHC,YAAY;oBAACC,WAAW;oBAAGC,UAAUC,SAASN,YAAY;gBAAG;;;IAErE;QAMmBJ;IAJnB,OAAOE,iBAAiB,kBACpB,sBAACS,WAAK;QAACC,KAAI;;0BACP,qBAACC,UAAI;gBAACC,IAAI;0BAAMlB;;0BAChB,qBAACmB,sBAAgB;gBACbC,OAAOhB,CAAAA,sCAAAA,MAAMO,UAAU,CAACE,QAAQ,CAACQ,QAAQ,gBAAlCjB,iDAAAA,uCAAwCH,UAAAA,oBAAAA,8BAAAA,OAAQ,CAAC,EAAE,CAACoB,QAAQ;gBACnEC,UAAUf;gBACVgB,MAAMtB,OAAOuB,GAAG,CAAC,SAACJ;2BAAUA,MAAMC,QAAQ;;gBAC1CI,MAAK;;;SAGb;AACR;AAEA1B,aAAa2B,YAAY,GAAG"}
|
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
padding: var(--mantine-spacing-sm);
|
|
3
|
+
&:not(&[data-variant]) {
|
|
4
|
+
border-color: color-mix(in srgb, var(--alert-color), var(--alert-bg) 85%);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.wrapper {
|
|
9
|
+
gap: var(--mantine-spacing-sm);
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
.title {
|
|
2
|
-
font-weight:
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon {
|
|
17
|
+
width: 16px;
|
|
18
|
+
height: 16px;
|
|
19
|
+
margin-right: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.message {
|
|
23
|
+
@mixin light {
|
|
24
|
+
color: var(--mantine-color-gray-7);
|
|
25
|
+
&:where([data-variant='filled']) {
|
|
26
|
+
color: var(--alert-color);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:where([data-variant='white']) {
|
|
31
|
+
color: var(--mantine-color-black);
|
|
32
|
+
}
|
|
3
33
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
--pagination-control-fz: var(--mantine-font-size-sm);
|
|
3
|
+
color: var(--mantine-color-gray-6);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.control {
|
|
7
|
+
color: var(--mantine-color-gray-6);
|
|
8
|
+
|
|
9
|
+
@mixin light {
|
|
10
|
+
border-color: var(--mantine-color-gray-3);
|
|
11
|
+
@mixin hover {
|
|
12
|
+
&:where(:not(:disabled, [data-disabled])) {
|
|
13
|
+
background-color: var(--mantine-primary-color-1);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&:where([data-active]) {
|
|
19
|
+
@mixin light {
|
|
20
|
+
border-color: var(--pagination-active-bg);
|
|
21
|
+
color: var(--pagination-active-color, var(--mantine-color-white));
|
|
22
|
+
@mixin hover {
|
|
23
|
+
background-color: var(--pagination-active-bg);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,3 +1,35 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
background-color: var(--mantine-color-gray-2);
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
.indicator {
|
|
6
|
+
border-radius: var(--sc-radius, var(--mantine-radius-sm));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.label {
|
|
10
|
+
font-weight: 300;
|
|
11
|
+
|
|
12
|
+
@mixin light {
|
|
13
|
+
color: var(--mantine-color-gray-6);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:where([data-disabled]) {
|
|
17
|
+
@mixin light {
|
|
18
|
+
color: var(--mantine-color-gray-5);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:where([data-active]) {
|
|
23
|
+
@mixin light {
|
|
24
|
+
color: var(--sc-label-color, var(--mantine-color-black));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:where(:not([data-disabled], [data-active], [data-read-only])) {
|
|
29
|
+
@mixin hover {
|
|
30
|
+
@mixin light {
|
|
31
|
+
color: var(--mantine-color-black);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAUA,OAAO,EAiBH,oBAAoB,EAoBvB,MAAM,eAAe,CAAC;AA+BvB,eAAO,MAAM,WAAW,EAAE,oBAwNxB,CAAC"}
|
package/dist/cjs/theme/Theme.js
CHANGED
|
@@ -29,6 +29,7 @@ var _Listmodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles
|
|
|
29
29
|
var _Modalmodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/Modal.module.css"));
|
|
30
30
|
var _NavLinkmodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/NavLink.module.css"));
|
|
31
31
|
var _Notificationmodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/Notification.module.css"));
|
|
32
|
+
var _Paginationmodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/Pagination.module.css"));
|
|
32
33
|
var _Radiomodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/Radio.module.css"));
|
|
33
34
|
var _ScrollAreamodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/ScrollArea.module.css"));
|
|
34
35
|
var _SegmentedControlmodulecss = /*#__PURE__*/ _interop_require_default._(require("../styles/SegmentedControl.module.css"));
|
|
@@ -110,14 +111,12 @@ var plasmaTheme = (0, _core.createTheme)({
|
|
|
110
111
|
}),
|
|
111
112
|
Alert: _core.Alert.extend({
|
|
112
113
|
defaultProps: {
|
|
113
|
-
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.
|
|
114
|
-
height:
|
|
114
|
+
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.InfoSize16Px, {
|
|
115
|
+
height: 16
|
|
115
116
|
}),
|
|
116
117
|
color: "navy"
|
|
117
118
|
},
|
|
118
|
-
classNames:
|
|
119
|
-
title: _Alertmodulecss.default.title
|
|
120
|
-
}
|
|
119
|
+
classNames: _Alertmodulecss.default
|
|
121
120
|
}),
|
|
122
121
|
Anchor: _core.Anchor.extend({
|
|
123
122
|
defaultProps: {
|
|
@@ -250,6 +249,20 @@ var plasmaTheme = (0, _core.createTheme)({
|
|
|
250
249
|
},
|
|
251
250
|
vars: _Notificationvars.NotificationVars
|
|
252
251
|
}),
|
|
252
|
+
Pagination: _core.Pagination.extend({
|
|
253
|
+
classNames: _Paginationmodulecss.default,
|
|
254
|
+
vars: function() {
|
|
255
|
+
return {
|
|
256
|
+
root: {
|
|
257
|
+
"--pagination-control-fz": "var(--mantine-font-size-sm)"
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
defaultProps: {
|
|
262
|
+
nextIcon: _plasmareacticons.ArrowHeadRightSize16Px,
|
|
263
|
+
previousIcon: _plasmareacticons.ArrowHeadLeftSize16Px
|
|
264
|
+
}
|
|
265
|
+
}),
|
|
253
266
|
Popover: _core.Popover.extend({
|
|
254
267
|
defaultProps: {
|
|
255
268
|
shadow: "md",
|
|
@@ -267,9 +280,7 @@ var plasmaTheme = (0, _core.createTheme)({
|
|
|
267
280
|
}
|
|
268
281
|
}),
|
|
269
282
|
SegmentedControl: _core.SegmentedControl.extend({
|
|
270
|
-
classNames:
|
|
271
|
-
root: _SegmentedControlmodulecss.default.root
|
|
272
|
-
}
|
|
283
|
+
classNames: _SegmentedControlmodulecss.default
|
|
273
284
|
}),
|
|
274
285
|
Select: _core.Select.extend({
|
|
275
286
|
defaultProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {CheckSize16Px, CrossSize16Px, FilterSize16Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {\n ActionIcon,\n Alert,\n Anchor,\n AppShellNavbar,\n Badge,\n Button,\n Checkbox,\n CloseButton,\n ColorSwatch,\n Combobox,\n ComboboxSearch,\n Divider,\n Input,\n InputWrapper,\n List,\n Loader,\n MantineThemeOverride,\n MenuItem,\n Modal,\n MultiSelect,\n NavLink,\n Notification,\n Popover,\n Radio,\n ScrollArea,\n SegmentedControl,\n Select,\n Skeleton,\n Stepper,\n Tabs,\n Text,\n TextInput,\n Title,\n Tooltip,\n createTheme,\n} from '@mantine/core';\nimport {DatePicker} from '@mantine/dates';\nimport ActionIconClasses from '../styles/ActionIcon.module.css';\nimport AlertClasses from '../styles/Alert.module.css';\nimport AnchorClasses from '../styles/Anchor.module.css';\nimport AppShellNavBarClasses from '../styles/AppShellNavBar.module.css';\nimport BadgeClasses from '../styles/Badge.module.css';\nimport ButtonClasses from '../styles/Button.module.css';\nimport CheckboxClasses from '../styles/Checkbox.module.css';\nimport ComboboxClasses from '../styles/Combobox.module.css';\nimport DatePickerClasses from '../styles/DatePicker.module.css';\nimport InputClasses from '../styles/Input.module.css';\nimport InputWrapperClasses from '../styles/InputWrapper.module.css';\nimport ListClasses from '../styles/List.module.css';\nimport ModalClasses from '../styles/Modal.module.css';\nimport NavLinkClasses from '../styles/NavLink.module.css';\nimport NotificationClasses from '../styles/Notification.module.css';\nimport RadioClasses from '../styles/Radio.module.css';\nimport ScrollAreaClasses from '../styles/ScrollArea.module.css';\nimport SegmentedControlClasses from '../styles/SegmentedControl.module.css';\nimport SelectClasses from '../styles/Select.module.css';\nimport SkeletonClasses from '../styles/Skeleton.module.css';\nimport StepperClasses from '../styles/Stepper.module.css';\nimport TabsClasses from '../styles/Tabs.module.css';\nimport TextClasses from '../styles/Text.module.css';\nimport TitleClasses from '../styles/Title.module.css';\nimport {NotificationVars} from '../vars/Notification.vars';\nimport {TextVars} from '../vars/Text.vars';\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = createTheme({\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/core/src/core/MantineProvider/default-theme.ts\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n lineHeights: {md: '1.5'},\n fontSmoothing: false,\n spacing: {\n xs: '8px',\n sm: '16px',\n md: '24px',\n lg: '32px',\n xl: '40px',\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: '500',\n sizes: {\n h1: {fontSize: '48px', lineHeight: '1.5', fontWeight: '300'},\n h2: {fontSize: '32px', lineHeight: '1.5', fontWeight: '500'},\n h3: {fontSize: '24px', lineHeight: '1.5', fontWeight: '500'},\n h4: {fontSize: '18px', lineHeight: '1.5', fontWeight: '300'},\n h5: {fontSize: '14px', lineHeight: '1.5', fontWeight: '500'},\n h6: {fontSize: '12px', lineHeight: '1.5', fontWeight: '500'},\n },\n },\n shadows: {\n xs: '0px 1px 0px rgba(4, 8, 31, 0.08)',\n sm: '0px 2px 4px rgba(4, 8, 31, 0.12)',\n md: '0px 4px 8px rgba(4, 8, 31, 0.08)',\n lg: '0px 8px 16px rgba(7, 12, 41, 0.06)',\n xl: '0px 16px 24px rgba(4, 8, 31, 0.06)',\n },\n colors: PlasmaColors,\n components: {\n ActionIcon: ActionIcon.extend({\n classNames: {root: ActionIconClasses.root},\n }),\n Alert: Alert.extend({\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'navy',\n },\n classNames: {title: AlertClasses.title},\n }),\n Anchor: Anchor.extend({\n defaultProps: {\n color: 'action.6',\n },\n classNames: {root: AnchorClasses.root},\n }),\n AppShellNavbar: AppShellNavbar.extend({\n classNames: {navbar: AppShellNavBarClasses.navbar},\n }),\n Badge: Badge.extend({\n classNames: {root: BadgeClasses.root},\n defaultProps: {\n variant: 'light',\n },\n }),\n Button: Button.extend({\n classNames: ButtonClasses,\n }),\n Checkbox: Checkbox.extend({\n defaultProps: {\n radius: 'sm',\n },\n classNames: {label: CheckboxClasses.label, input: CheckboxClasses.input},\n }),\n CloseButton: CloseButton.extend({\n defaultProps: {\n icon: <CrossSize16Px height={16} aria-label=\"close\" />,\n },\n }),\n ColorSwatch: ColorSwatch.extend({\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n }),\n Combobox: Combobox.extend({\n classNames: {option: SelectClasses.option, search: ComboboxClasses.search},\n }),\n ComboboxSearch: ComboboxSearch.extend({\n defaultProps: {\n placeholder: 'Search',\n rightSection: <FilterSize16Px height={16} color=\"gray.5\" />,\n },\n }),\n DatePicker: DatePicker.extend({\n classNames: {monthCell: DatePickerClasses.monthCell},\n }),\n Divider: Divider.extend({\n defaultProps: {\n color: 'gray.3',\n },\n }),\n Input: Input.extend({\n classNames: InputClasses,\n }),\n InputWrapper: InputWrapper.extend({\n classNames: InputWrapperClasses,\n }),\n Loader: Loader.extend({\n defaultProps: {\n type: 'dots',\n color: 'action',\n role: 'presentation',\n },\n }),\n List: List.extend({\n classNames: {root: ListClasses.root},\n }),\n MenuItem: MenuItem.extend({\n defaultProps: {\n fw: 300,\n },\n }),\n Modal: Modal.extend({\n classNames: ModalClasses,\n }),\n ModalOverlay: Modal.Overlay.extend({\n defaultProps: {\n color: color.primary.navy[9],\n backgroundOpacity: 0.9,\n },\n }),\n ModalRoot: Modal.Root.extend({\n defaultProps: {\n padding: 'lg',\n },\n }),\n MultiSelect: MultiSelect.extend({defaultProps: {hidePickedOptions: true}}),\n NavLink: NavLink.extend({classNames: NavLinkClasses}),\n Notification: Notification.extend({\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'info',\n },\n classNames: {\n root: NotificationClasses.root,\n icon: NotificationClasses.icon,\n closeButton: NotificationClasses.closeButton,\n },\n vars: NotificationVars,\n }),\n Popover: Popover.extend({\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n }),\n Radio: Radio.extend({\n classNames: {labelWrapper: RadioClasses.labelWrapper},\n }),\n ScrollArea: ScrollArea.extend({\n classNames: {viewport: ScrollAreaClasses.viewport},\n }),\n SegmentedControl: SegmentedControl.extend({\n classNames: {root: SegmentedControlClasses.root},\n }),\n Select: Select.extend({\n defaultProps: {withCheckIcon: false, allowDeselect: false},\n classNames: {input: SelectClasses.input, option: SelectClasses.option},\n }),\n Skeleton: Skeleton.extend({\n classNames: {root: SkeletonClasses.root},\n }),\n Stepper: Stepper.extend({\n defaultProps: {\n size: 'xs',\n completedIcon: <CheckSize16Px />,\n },\n classNames: {\n step: StepperClasses.step,\n stepIcon: StepperClasses.stepIcon,\n stepCompletedIcon: StepperClasses.stepCompletedIcon,\n stepDescription: StepperClasses.stepDescription,\n separator: StepperClasses.separator,\n verticalSeparator: StepperClasses.verticalSeparator,\n },\n }),\n Tabs: Tabs.extend({\n classNames: {list: TabsClasses.list, tab: TabsClasses.tab},\n }),\n Text: Text.extend({\n classNames: TextClasses,\n vars: TextVars,\n }),\n TextInput: TextInput.extend({\n defaultProps: {\n radius: 8,\n },\n }),\n Title: Title.extend({\n classNames: {root: TitleClasses.root},\n }),\n Tooltip: Tooltip.extend({\n defaultProps: {\n color: 'navy',\n maw: 300,\n multiline: true,\n withArrow: true,\n zIndex: 10000,\n },\n }),\n },\n});\n"],"names":["plasmaTheme","createTheme","fontFamily","black","color","primary","gray","defaultRadius","lineHeights","md","fontSmoothing","spacing","xs","sm","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","ActionIcon","extend","classNames","root","ActionIconClasses","Alert","defaultProps","icon","InfoSize24Px","height","title","AlertClasses","Anchor","AnchorClasses","AppShellNavbar","navbar","AppShellNavBarClasses","Badge","BadgeClasses","variant","Button","ButtonClasses","Checkbox","radius","label","CheckboxClasses","input","CloseButton","CrossSize16Px","aria-label","ColorSwatch","size","withShadow","Combobox","option","SelectClasses","search","ComboboxClasses","ComboboxSearch","placeholder","rightSection","FilterSize16Px","DatePicker","monthCell","DatePickerClasses","Divider","Input","InputClasses","InputWrapper","InputWrapperClasses","Loader","type","role","List","ListClasses","MenuItem","fw","Modal","ModalClasses","ModalOverlay","Overlay","navy","backgroundOpacity","ModalRoot","Root","padding","MultiSelect","hidePickedOptions","NavLink","NavLinkClasses","Notification","NotificationClasses","closeButton","vars","NotificationVars","Popover","shadow","withArrow","Radio","labelWrapper","RadioClasses","ScrollArea","viewport","ScrollAreaClasses","SegmentedControl","SegmentedControlClasses","Select","withCheckIcon","allowDeselect","Skeleton","SkeletonClasses","Stepper","completedIcon","CheckSize16Px","step","StepperClasses","stepIcon","stepCompletedIcon","stepDescription","separator","verticalSeparator","Tabs","list","TabsClasses","tab","Text","TextClasses","TextVars","TextInput","Title","TitleClasses","Tooltip","maw","multiline","zIndex"],"mappings":";;;;+BAoEaA;;;eAAAA;;;;;gCApE4D;4BACrD;oBAqCb;qBACkB;4EACK;uEACL;wEACC;gFACQ;uEACT;wEACC;0EACE;0EACA;4EACE;uEACL;8EACO;sEACR;uEACC;yEACE;8EACK;uEACP;4EACK;kFACM;wEACV;0EACE;yEACD;sEACH;sEACA;uEACC;gCACM;wBACR;4BACI;AAEpB,IAAMA,cAAoCC,IAAAA,iBAAW,EAAC;IACzD,gJAAgJ;IAChJC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,aAAa;QAACC,IAAI;IAAK;IACvBC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJJ,IAAI;QACJK,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNf,YAAY;QACZgB,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DK,IAAI;gBAACF,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DM,IAAI;gBAACH,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DO,IAAI;gBAACJ,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DQ,IAAI;gBAACL,UAA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pBK,cAAc;gBACVyB,MAAM;gBACN6D,6BAAe,qBAACC,+BAAa;YACjC;YACA3F,YAAY;gBACR4F,MAAMC,yBAAc,CAACD,IAAI;gBACzBE,UAAUD,yBAAc,CAACC,QAAQ;gBACjCC,mBAAmBF,yBAAc,CAACE,iBAAiB;gBACnDC,iBAAiBH,yBAAc,CAACG,eAAe;gBAC/CC,WAAWJ,yBAAc,CAACI,SAAS;gBACnCC,mBAAmBL,yBAAc,CAACK,iBAAiB;YACvD;QACJ;QACAC,MAAMA,UAAI,CAACpG,MAAM,CAAC;YACdC,YAAY;gBAACoG,MAAMC,sBAAW,CAACD,IAAI;gBAAEE,KAAKD,sBAAW,CAACC,GAAG;YAAA;QAC7D;QACAC,MAAMA,UAAI,CAACxG,MAAM,CAAC;YACdC,YAAYwG,sBAAW;YACvBjC,MAAMkC,kBAAQ;QAClB;QACAC,WAAWA,eAAS,CAAC3G,MAAM,CAAC;YACxBK,cAAc;gBACViB,QAAQ;YACZ;QACJ;QACAsF,OAAOA,WAAK,CAAC5G,MAAM,CAAC;YAChBC,YAAY;gBAACC,MAAM2G,uBAAY,CAAC3G,IAAI;YAAA;QACxC;QACA4G,SAASA,aAAO,CAAC9G,MAAM,CAAC;YACpBK,cAAc;gBACVlC,OAAO;gBACP4I,KAAK;gBACLC,WAAW;gBACXpC,WAAW;gBACXqC,QAAQ;YACZ;QACJ;IACJ;AACJ"}
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {\n ArrowHeadLeftSize16Px,\n ArrowHeadRightSize16Px,\n CheckSize16Px,\n CrossSize16Px,\n FilterSize16Px,\n InfoSize16Px,\n InfoSize24Px,\n} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {\n ActionIcon,\n Alert,\n Anchor,\n AppShellNavbar,\n Badge,\n Button,\n Checkbox,\n CloseButton,\n ColorSwatch,\n Combobox,\n ComboboxSearch,\n Divider,\n Input,\n InputWrapper,\n List,\n Loader,\n MantineThemeOverride,\n MenuItem,\n Modal,\n MultiSelect,\n NavLink,\n Notification,\n Pagination,\n Popover,\n Radio,\n ScrollArea,\n SegmentedControl,\n Select,\n Skeleton,\n Stepper,\n Tabs,\n Text,\n TextInput,\n Title,\n Tooltip,\n createTheme,\n} from '@mantine/core';\nimport {DatePicker} from '@mantine/dates';\nimport ActionIconClasses from '../styles/ActionIcon.module.css';\nimport AlertClasses from '../styles/Alert.module.css';\nimport AnchorClasses from '../styles/Anchor.module.css';\nimport AppShellNavBarClasses from '../styles/AppShellNavBar.module.css';\nimport BadgeClasses from '../styles/Badge.module.css';\nimport ButtonClasses from '../styles/Button.module.css';\nimport CheckboxClasses from '../styles/Checkbox.module.css';\nimport ComboboxClasses from '../styles/Combobox.module.css';\nimport DatePickerClasses from '../styles/DatePicker.module.css';\nimport InputClasses from '../styles/Input.module.css';\nimport InputWrapperClasses from '../styles/InputWrapper.module.css';\nimport ListClasses from '../styles/List.module.css';\nimport ModalClasses from '../styles/Modal.module.css';\nimport NavLinkClasses from '../styles/NavLink.module.css';\nimport NotificationClasses from '../styles/Notification.module.css';\nimport PaginationClasses from '../styles/Pagination.module.css';\nimport RadioClasses from '../styles/Radio.module.css';\nimport ScrollAreaClasses from '../styles/ScrollArea.module.css';\nimport SegmentedControlClasses from '../styles/SegmentedControl.module.css';\nimport SelectClasses from '../styles/Select.module.css';\nimport SkeletonClasses from '../styles/Skeleton.module.css';\nimport StepperClasses from '../styles/Stepper.module.css';\nimport TabsClasses from '../styles/Tabs.module.css';\nimport TextClasses from '../styles/Text.module.css';\nimport TitleClasses from '../styles/Title.module.css';\nimport {NotificationVars} from '../vars/Notification.vars';\nimport {TextVars} from '../vars/Text.vars';\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = createTheme({\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/core/src/core/MantineProvider/default-theme.ts\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n lineHeights: {md: '1.5'},\n fontSmoothing: false,\n spacing: {\n xs: '8px',\n sm: '16px',\n md: '24px',\n lg: '32px',\n xl: '40px',\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: '500',\n sizes: {\n h1: {fontSize: '48px', lineHeight: '1.5', fontWeight: '300'},\n h2: {fontSize: '32px', lineHeight: '1.5', fontWeight: '500'},\n h3: {fontSize: '24px', lineHeight: '1.5', fontWeight: '500'},\n h4: {fontSize: '18px', lineHeight: '1.5', fontWeight: '300'},\n h5: {fontSize: '14px', lineHeight: '1.5', fontWeight: '500'},\n h6: {fontSize: '12px', lineHeight: '1.5', fontWeight: '500'},\n },\n },\n shadows: {\n xs: '0px 1px 0px rgba(4, 8, 31, 0.08)',\n sm: '0px 2px 4px rgba(4, 8, 31, 0.12)',\n md: '0px 4px 8px rgba(4, 8, 31, 0.08)',\n lg: '0px 8px 16px rgba(7, 12, 41, 0.06)',\n xl: '0px 16px 24px rgba(4, 8, 31, 0.06)',\n },\n colors: PlasmaColors,\n components: {\n ActionIcon: ActionIcon.extend({\n classNames: {root: ActionIconClasses.root},\n }),\n Alert: Alert.extend({\n defaultProps: {\n icon: <InfoSize16Px height={16} />,\n color: 'navy',\n },\n classNames: AlertClasses,\n }),\n Anchor: Anchor.extend({\n defaultProps: {\n color: 'action.6',\n },\n classNames: {root: AnchorClasses.root},\n }),\n AppShellNavbar: AppShellNavbar.extend({\n classNames: {navbar: AppShellNavBarClasses.navbar},\n }),\n Badge: Badge.extend({\n classNames: {root: BadgeClasses.root},\n defaultProps: {\n variant: 'light',\n },\n }),\n Button: Button.extend({\n classNames: ButtonClasses,\n }),\n Checkbox: Checkbox.extend({\n defaultProps: {\n radius: 'sm',\n },\n classNames: {label: CheckboxClasses.label, input: CheckboxClasses.input},\n }),\n CloseButton: CloseButton.extend({\n defaultProps: {\n icon: <CrossSize16Px height={16} aria-label=\"close\" />,\n },\n }),\n ColorSwatch: ColorSwatch.extend({\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n }),\n Combobox: Combobox.extend({\n classNames: {option: SelectClasses.option, search: ComboboxClasses.search},\n }),\n ComboboxSearch: ComboboxSearch.extend({\n defaultProps: {\n placeholder: 'Search',\n rightSection: <FilterSize16Px height={16} color=\"gray.5\" />,\n },\n }),\n DatePicker: DatePicker.extend({\n classNames: {monthCell: DatePickerClasses.monthCell},\n }),\n Divider: Divider.extend({\n defaultProps: {\n color: 'gray.3',\n },\n }),\n Input: Input.extend({\n classNames: InputClasses,\n }),\n InputWrapper: InputWrapper.extend({\n classNames: InputWrapperClasses,\n }),\n Loader: Loader.extend({\n defaultProps: {\n type: 'dots',\n color: 'action',\n role: 'presentation',\n },\n }),\n List: List.extend({\n classNames: {root: ListClasses.root},\n }),\n MenuItem: MenuItem.extend({\n defaultProps: {\n fw: 300,\n },\n }),\n Modal: Modal.extend({\n classNames: ModalClasses,\n }),\n ModalOverlay: Modal.Overlay.extend({\n defaultProps: {\n color: color.primary.navy[9],\n backgroundOpacity: 0.9,\n },\n }),\n ModalRoot: Modal.Root.extend({\n defaultProps: {\n padding: 'lg',\n },\n }),\n MultiSelect: MultiSelect.extend({defaultProps: {hidePickedOptions: true}}),\n NavLink: NavLink.extend({classNames: NavLinkClasses}),\n Notification: Notification.extend({\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'info',\n },\n classNames: {\n root: NotificationClasses.root,\n icon: NotificationClasses.icon,\n closeButton: NotificationClasses.closeButton,\n },\n vars: NotificationVars,\n }),\n Pagination: Pagination.extend({\n classNames: PaginationClasses,\n vars: () => ({root: {'--pagination-control-fz': 'var(--mantine-font-size-sm)'}}),\n defaultProps: {\n nextIcon: ArrowHeadRightSize16Px,\n previousIcon: ArrowHeadLeftSize16Px,\n },\n }),\n Popover: Popover.extend({\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n }),\n Radio: Radio.extend({\n classNames: {labelWrapper: RadioClasses.labelWrapper},\n }),\n ScrollArea: ScrollArea.extend({\n classNames: {viewport: ScrollAreaClasses.viewport},\n }),\n SegmentedControl: SegmentedControl.extend({\n classNames: SegmentedControlClasses,\n }),\n Select: Select.extend({\n defaultProps: {withCheckIcon: false, allowDeselect: false},\n classNames: {input: SelectClasses.input, option: SelectClasses.option},\n }),\n Skeleton: Skeleton.extend({\n classNames: {root: SkeletonClasses.root},\n }),\n Stepper: Stepper.extend({\n defaultProps: {\n size: 'xs',\n completedIcon: <CheckSize16Px />,\n },\n classNames: {\n step: StepperClasses.step,\n stepIcon: StepperClasses.stepIcon,\n stepCompletedIcon: StepperClasses.stepCompletedIcon,\n stepDescription: StepperClasses.stepDescription,\n separator: StepperClasses.separator,\n verticalSeparator: StepperClasses.verticalSeparator,\n },\n }),\n Tabs: Tabs.extend({\n classNames: {list: TabsClasses.list, tab: TabsClasses.tab},\n }),\n Text: Text.extend({\n classNames: TextClasses,\n vars: TextVars,\n }),\n TextInput: TextInput.extend({\n defaultProps: {\n radius: 8,\n },\n }),\n Title: Title.extend({\n classNames: {root: TitleClasses.root},\n }),\n Tooltip: Tooltip.extend({\n defaultProps: {\n color: 'navy',\n maw: 300,\n multiline: true,\n withArrow: true,\n zIndex: 10000,\n },\n }),\n },\n});\n"],"names":["plasmaTheme","createTheme","fontFamily","black","color","primary","gray","defaultRadius","lineHeights","md","fontSmoothing","spacing","xs","sm","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","ActionIcon","extend","classNames","root","ActionIconClasses","Alert","defaultProps","icon","InfoSize16Px","height","AlertClasses","Anchor","AnchorClasses","AppShellNavbar","navbar","AppShellNavBarClasses","Badge","BadgeClasses","variant","Button","ButtonClasses","Checkbox","radius","label","CheckboxClasses","input","CloseButton","CrossSize16Px","aria-label","ColorSwatch","size","withShadow","Combobox","option","SelectClasses","search","ComboboxClasses","ComboboxSearch","placeholder","rightSection","FilterSize16Px","DatePicker","monthCell","DatePickerClasses","Divider","Input","InputClasses","InputWrapper","InputWrapperClasses","Loader","type","role","List","ListClasses","MenuItem","fw","Modal","ModalClasses","ModalOverlay","Overlay","navy","backgroundOpacity","ModalRoot","Root","padding","MultiSelect","hidePickedOptions","NavLink","NavLinkClasses","Notification","InfoSize24Px","NotificationClasses","closeButton","vars","NotificationVars","Pagination","PaginationClasses","nextIcon","ArrowHeadRightSize16Px","previousIcon","ArrowHeadLeftSize16Px","Popover","shadow","withArrow","Radio","labelWrapper","RadioClasses","ScrollArea","viewport","ScrollAreaClasses","SegmentedControl","SegmentedControlClasses","Select","withCheckIcon","allowDeselect","Skeleton","SkeletonClasses","Stepper","completedIcon","CheckSize16Px","step","StepperClasses","stepIcon","stepCompletedIcon","stepDescription","separator","verticalSeparator","Tabs","list","TabsClasses","tab","Text","TextClasses","TextVars","TextInput","Title","TitleClasses","Tooltip","maw","multiline","zIndex"],"mappings":";;;;+BA8EaA;;;eAAAA;;;;;gCAtEN;4BACa;oBAsCb;qBACkB;4EACK;uEACL;wEACC;gFACQ;uEACT;wEACC;0EACE;0EACA;4EACE;uEACL;8EACO;sEACR;uEACC;yEACE;8EACK;4EACF;uEACL;4EACK;kFACM;wEACV;0EACE;yEACD;sEACH;sEACA;uEACC;gCACM;wBACR;4BACI;AAEpB,IAAMA,cAAoCC,IAAAA,iBAAW,EAAC;IACzD,gJAAgJ;IAChJC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,aAAa;QAACC,IAAI;IAAK;IACvBC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJJ,IAAI;QACJK,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNf,YAAY;QACZgB,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DK,IAAI;gBAACF,UAAU;gBAAQC,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|
|
1
1
|
import { Factory, StylesApiProps } from '@mantine/core';
|
|
2
|
+
import { MantineComponent } from '@mantine/core/lib/core/factory/factory';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
import { InlineConfirmPrompt } from './InlineConfirmPrompt';
|
|
4
5
|
import { InlineConfirmTarget } from './InlineConfirmTarget';
|
|
5
|
-
export type InlineConfirmStyleNames = 'root';
|
|
6
6
|
export interface InlineConfirmProps extends StylesApiProps<InlineConfirmFactory> {
|
|
7
7
|
/**
|
|
8
8
|
* The content of the component. Should contain at least one `InlineConfirm.Target` and one `InlineConfirm.Prompt` with matching ids
|
|
@@ -12,16 +12,14 @@ export interface InlineConfirmProps extends StylesApiProps<InlineConfirmFactory>
|
|
|
12
12
|
export type InlineConfirmFactory = Factory<{
|
|
13
13
|
props: InlineConfirmProps;
|
|
14
14
|
ref: never;
|
|
15
|
-
stylesNames: InlineConfirmStyleNames;
|
|
16
15
|
staticComponents: {
|
|
17
16
|
Prompt: typeof InlineConfirmPrompt;
|
|
18
17
|
Target: typeof InlineConfirmTarget;
|
|
19
18
|
};
|
|
20
19
|
}>;
|
|
21
|
-
export declare const InlineConfirm:
|
|
20
|
+
export declare const InlineConfirm: MantineComponent<{
|
|
22
21
|
props: InlineConfirmProps;
|
|
23
22
|
ref: never;
|
|
24
|
-
stylesNames: InlineConfirmStyleNames;
|
|
25
23
|
staticComponents: {
|
|
26
24
|
Prompt: typeof InlineConfirmPrompt;
|
|
27
25
|
Target: typeof InlineConfirmTarget;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,cAAc,EAAW,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAyB,SAAS,EAAW,MAAM,OAAO,CAAC;AAElE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,oBAAoB,CAAC;IAC5E;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC;IACvC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,KAAK,CAAC;IACX,gBAAgB,EAAE;QACd,MAAM,EAAE,OAAO,mBAAmB,CAAC;QACnC,MAAM,EAAE,OAAO,mBAAmB,CAAC;KACtC,CAAC;CACL,CAAC,CAAC;AAIH,eAAO,MAAM,aAAa;WAVf,kBAAkB;SACpB,KAAK;sBACQ;QACd,MAAM,EAAE,0BAA0B,CAAC;QACnC,MAAM,EAAE,0BAA0B,CAAC;KACtC;EAoBuC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useProps } from '@mantine/core';
|
|
3
3
|
import { Children, useState } from 'react';
|
|
4
4
|
import { InlineConfirmProvider } from './InlineConfirmContext';
|
|
5
5
|
import { InlineConfirmPrompt } from './InlineConfirmPrompt';
|
|
6
6
|
import { InlineConfirmTarget } from './InlineConfirmTarget';
|
|
7
7
|
const defaultProps = {};
|
|
8
|
-
export const InlineConfirm =
|
|
8
|
+
export const InlineConfirm = (_props)=>{
|
|
9
9
|
const { children } = useProps('InlineConfirm', defaultProps, _props);
|
|
10
10
|
const [confirmingId, setConfirmingId] = useState(null);
|
|
11
11
|
const convertedChildren = Children.toArray(children);
|
|
@@ -19,7 +19,7 @@ export const InlineConfirm = factory((_props)=>{
|
|
|
19
19
|
},
|
|
20
20
|
children: prompt ?? children
|
|
21
21
|
});
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
InlineConfirm.Prompt = InlineConfirmPrompt;
|
|
24
24
|
InlineConfirm.Target = InlineConfirmTarget;
|
|
25
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Factory, StylesApiProps, useProps} from '@mantine/core';\nimport {MantineComponent} from '@mantine/core/lib/core/factory/factory';\nimport {Children, ReactElement, ReactNode, useState} from 'react';\nimport {InlineConfirmProvider} from './InlineConfirmContext';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\nimport {InlineConfirmTarget} from './InlineConfirmTarget';\n\nexport interface InlineConfirmProps extends StylesApiProps<InlineConfirmFactory> {\n /**\n * The content of the component. Should contain at least one `InlineConfirm.Target` and one `InlineConfirm.Prompt` with matching ids\n */\n children: ReactNode;\n}\n\nexport type InlineConfirmFactory = Factory<{\n props: InlineConfirmProps;\n ref: never;\n staticComponents: {\n Prompt: typeof InlineConfirmPrompt;\n Target: typeof InlineConfirmTarget;\n };\n}>;\n\nconst defaultProps: Partial<InlineConfirmProps> = {};\n\nexport const InlineConfirm = ((_props) => {\n const {children} = useProps('InlineConfirm', defaultProps, _props);\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId,\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmProvider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmProvider>\n );\n}) as MantineComponent<InlineConfirmFactory>;\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Target = InlineConfirmTarget;\n"],"names":["useProps","Children","useState","InlineConfirmProvider","InlineConfirmPrompt","InlineConfirmTarget","defaultProps","InlineConfirm","_props","children","confirmingId","setConfirmingId","convertedChildren","toArray","prompt","find","child","type","props","id","clearConfirm","value","Prompt","Target"],"mappings":";AAAA,SAAiCA,QAAQ,QAAO,gBAAgB;AAEhE,SAAQC,QAAQ,EAA2BC,QAAQ,QAAO,QAAQ;AAClE,SAAQC,qBAAqB,QAAO,yBAAyB;AAC7D,SAAQC,mBAAmB,QAAO,wBAAwB;AAE1D,SAAQC,mBAAmB,QAAO,wBAAwB;AAkB1D,MAAMC,eAA4C,CAAC;AAEnD,OAAO,MAAMC,gBAAiB,CAACC;IAC3B,MAAM,EAACC,QAAQ,EAAC,GAAGT,SAAS,iBAAiBM,cAAcE;IAC3D,MAAM,CAACE,cAAcC,gBAAgB,GAAGT,SAAwB;IAEhE,MAAMU,oBAAoBX,SAASY,OAAO,CAACJ;IAC3C,MAAMK,SAASF,kBAAkBG,IAAI,CACjC,CAACC,QAAUA,MAAMC,IAAI,KAAKb,uBAAuBY,MAAME,KAAK,CAACC,EAAE,KAAKT;IAExE,MAAMU,eAAe,IAAMT,gBAAgB;IAE3C,qBACI,KAACR;QAAsBkB,OAAO;YAACX;YAAcC;YAAiBS;QAAY;kBACrEN,UAAUL;;AAGvB,EAA6C;AAE7CF,cAAce,MAAM,GAAGlB;AACvBG,cAAcgB,MAAM,GAAGlB"}
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
.headerRoot {
|
|
36
36
|
border-bottom: 1px solid var(--mantine-color-gray-3);
|
|
37
37
|
background-color: var(--mantine-color-gray-1);
|
|
38
|
-
padding
|
|
39
|
-
padding-right: var(--mantine-spacing-lg);
|
|
38
|
+
padding: var(--mantine-spacing-sm) var(--mantine-spacing-xl);
|
|
40
39
|
position: relative;
|
|
41
40
|
}
|
|
42
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowLayoutHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAoB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,sBAAsB,EAAC,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,0BAA0B,EAAW,MAAM,mBAAmB,CAAC;AAGvE,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,oBAAoB,CAAC,CAAC,CACnC,SAAQ,QAAQ,EACZ,gBAAgB,CAAC,CAAC,CAAC,EACnB,sBAAsB,CAAC,oBAAoB,CAAC;CAAG;AAWvD,eAAO,MAAM,eAAe;;cAAgD,aAAa,mBAAmB,CAAC;;;eARlG,qBAAqB,OAAO,CAAC;aAC/B,mBAAmB;qBACX,yBAAyB;kBAC5B,IAAI;;
|
|
1
|
+
{"version":3,"file":"RowLayoutHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/table/layouts/row-layout/RowLayoutHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAoB,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAC,sBAAsB,EAAC,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,0BAA0B,EAAW,MAAM,mBAAmB,CAAC;AAGvE,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,oBAAoB,CAAC,CAAC,CACnC,SAAQ,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