@coveord/plasma-mantine 56.17.0 → 56.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-test.log +120 -116
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/ActionIcon/ActionIcon.d.ts +1 -1
- package/dist/cjs/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/dist/cjs/components/ActionIcon/ActionIcon.js +10 -0
- package/dist/cjs/components/ActionIcon/ActionIcon.js.map +1 -1
- package/dist/cjs/components/Alert/Alert.d.ts.map +1 -1
- package/dist/cjs/components/Alert/Alert.js +5 -0
- package/dist/cjs/components/Alert/Alert.js.map +1 -1
- package/dist/cjs/components/Button/Button.d.ts.map +1 -1
- package/dist/cjs/components/Button/Button.js +10 -0
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/cjs/components/CodeEditor/CodeEditor.js +1 -0
- package/dist/cjs/components/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/cjs/components/Collection/Collection.d.ts +75 -12
- package/dist/cjs/components/Collection/Collection.d.ts.map +1 -1
- package/dist/cjs/components/Collection/Collection.js +94 -38
- package/dist/cjs/components/Collection/Collection.js.map +1 -1
- package/dist/cjs/components/Collection/Collection.module.css +13 -1
- package/dist/cjs/components/Collection/CollectionAddButton.d.ts +25 -0
- package/dist/cjs/components/Collection/CollectionAddButton.d.ts.map +1 -0
- package/dist/cjs/components/Collection/CollectionAddButton.js +33 -0
- package/dist/cjs/components/Collection/CollectionAddButton.js.map +1 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.d.ts +72 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.d.ts.map +1 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.js +6 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.js.map +1 -0
- package/dist/cjs/components/Collection/CollectionContext.d.ts +5 -0
- package/dist/cjs/components/Collection/CollectionContext.d.ts.map +1 -1
- package/dist/cjs/components/Collection/CollectionContext.js.map +1 -1
- package/dist/cjs/components/Collection/CollectionItem.d.ts +2 -2
- package/dist/cjs/components/Collection/CollectionItem.d.ts.map +1 -1
- package/dist/cjs/components/Collection/CollectionItem.js +18 -38
- package/dist/cjs/components/Collection/CollectionItem.js.map +1 -1
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.d.ts +46 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.js +6 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.d.ts +26 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.js +29 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts +12 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.js +24 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.module.css +37 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts +6 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js +78 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts +6 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js +56 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.d.ts +12 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.js +28 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.d.ts +11 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.js +39 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.d.ts +8 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.js +24 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.d.ts +8 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.js +21 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.d.ts +78 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.js +160 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.d.ts +38 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.js +31 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts +12 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.js +24 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.module.css +35 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts +6 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js +134 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts +10 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js +15 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js.map +1 -0
- package/dist/cjs/components/LastUpdated/LastUpdated.js +1 -0
- package/dist/cjs/components/LastUpdated/LastUpdated.js.map +1 -1
- package/dist/cjs/components/StickyFooter/StickyFooter.d.ts.map +1 -1
- package/dist/cjs/components/StickyFooter/StickyFooter.js +1 -0
- package/dist/cjs/components/StickyFooter/StickyFooter.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/ActionIcon/ActionIcon.d.ts +1 -1
- package/dist/esm/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/dist/esm/components/ActionIcon/ActionIcon.js +10 -0
- package/dist/esm/components/ActionIcon/ActionIcon.js.map +1 -1
- package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
- package/dist/esm/components/Alert/Alert.js +5 -0
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/Button/Button.d.ts.map +1 -1
- package/dist/esm/components/Button/Button.js +10 -0
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/esm/components/CodeEditor/CodeEditor.js +1 -0
- package/dist/esm/components/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/esm/components/Collection/Collection.d.ts +75 -12
- package/dist/esm/components/Collection/Collection.d.ts.map +1 -1
- package/dist/esm/components/Collection/Collection.js +87 -32
- package/dist/esm/components/Collection/Collection.js.map +1 -1
- package/dist/esm/components/Collection/Collection.module.css +13 -1
- package/dist/esm/components/Collection/CollectionAddButton.d.ts +25 -0
- package/dist/esm/components/Collection/CollectionAddButton.d.ts.map +1 -0
- package/dist/esm/components/Collection/CollectionAddButton.js +19 -0
- package/dist/esm/components/Collection/CollectionAddButton.js.map +1 -0
- package/dist/esm/components/Collection/CollectionColumn.types.d.ts +72 -0
- package/dist/esm/components/Collection/CollectionColumn.types.d.ts.map +1 -0
- package/dist/esm/components/Collection/CollectionColumn.types.js +5 -0
- package/dist/esm/components/Collection/CollectionColumn.types.js.map +1 -0
- package/dist/esm/components/Collection/CollectionContext.d.ts +5 -0
- package/dist/esm/components/Collection/CollectionContext.d.ts.map +1 -1
- package/dist/esm/components/Collection/CollectionContext.js.map +1 -1
- package/dist/esm/components/Collection/CollectionItem.d.ts +2 -2
- package/dist/esm/components/Collection/CollectionItem.d.ts.map +1 -1
- package/dist/esm/components/Collection/CollectionItem.js +15 -34
- package/dist/esm/components/Collection/CollectionItem.js.map +1 -1
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.d.ts +46 -0
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.js +6 -0
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.js.map +1 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.d.ts +26 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.js +10 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.js.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts +12 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.js +11 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.js.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.module.css +37 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts +6 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js +49 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts +6 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js +36 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.d.ts +12 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.js +20 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.d.ts +11 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.js +30 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.d.ts +8 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.js +17 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.d.ts +8 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.js +14 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.d.ts +78 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.js +150 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.d.ts +38 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.js +18 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.js.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts +12 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.js +11 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.js.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.module.css +35 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts +6 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js +103 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts +10 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js +6 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js.map +1 -0
- package/dist/esm/components/LastUpdated/LastUpdated.js +1 -0
- package/dist/esm/components/LastUpdated/LastUpdated.js.map +1 -1
- package/dist/esm/components/StickyFooter/StickyFooter.d.ts.map +1 -1
- package/dist/esm/components/StickyFooter/StickyFooter.js +1 -0
- package/dist/esm/components/StickyFooter/StickyFooter.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/ActionIcon/ActionIcon.tsx +15 -4
- package/src/components/Alert/Alert.tsx +7 -0
- package/src/components/Button/Button.tsx +12 -1
- package/src/components/CodeEditor/CodeEditor.tsx +4 -4
- package/src/components/Collection/Collection.module.css +13 -1
- package/src/components/Collection/Collection.tsx +149 -50
- package/src/components/Collection/CollectionAddButton.tsx +42 -0
- package/src/components/Collection/CollectionColumn.types.ts +79 -0
- package/src/components/Collection/CollectionContext.ts +5 -0
- package/src/components/Collection/CollectionItem.tsx +10 -21
- package/src/components/Collection/__tests__/CollectionWithColumns.spec.tsx +560 -0
- package/src/components/Collection/layouts/CollectionLayout.types.ts +56 -0
- package/src/components/Collection/layouts/CollectionLayouts.tsx +15 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayout.module.css +37 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayout.tsx +9 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.tsx +68 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.tsx +33 -0
- package/src/components/Collection/layouts/shared/DragHandle.tsx +22 -0
- package/src/components/Collection/layouts/shared/RemoveButton.tsx +30 -0
- package/src/components/Collection/layouts/shared/columnUtils.ts +20 -0
- package/src/components/Collection/layouts/shared/headerUtils.ts +14 -0
- package/src/components/Collection/layouts/shared/itemRenderer.tsx +242 -0
- package/src/components/Collection/layouts/shared/layoutConstants.ts +51 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayout.module.css +35 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayout.tsx +9 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayoutBody.tsx +120 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.tsx +8 -0
- package/src/components/LastUpdated/LastUpdated.tsx +2 -0
- package/src/components/StickyFooter/StickyFooter.tsx +3 -2
- package/src/index.ts +11 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionIconCssVariables, type ActionIconGroup, type ActionIconProps as MantineActionIconProps
|
|
1
|
+
import { ActionIconCssVariables, ActionIconStylesNames, ActionIconVariant, type ActionIconGroup, type ActionIconProps as MantineActionIconProps } from '@mantine/core';
|
|
2
2
|
import { MouseEventHandler } from 'react';
|
|
3
3
|
import { ButtonWithDisabledTooltipProps } from '../Button/ButtonWithDisabledTooltip.js';
|
|
4
4
|
export interface ActionIconProps extends MantineActionIconProps, ButtonWithDisabledTooltipProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EAIjB,KAAK,eAAe,EACpB,KAAK,eAAe,IAAI,sBAA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;sBACX,QAAQ;iBACb,qBAAqB;UAC5B,sBAAsB;aACnB,iBAAiB;sBACR;QACd,KAAK,EAAE,OAAO,eAAe,CAAC;QAC9B,OAAO,EAAE,OAAO,iBAAiB,CAAC;QAClC,SAAS,EAAE,OAAO,mBAAmB,CAAC;QACtC,QAAQ,EAAE,OAAO,kBAAkB,CAAC;QACpC,UAAU,EAAE,OAAO,oBAAoB,CAAC;QACxC,kBAAkB,EAAE,OAAO,qBAAqB,CAAC;QACjD,oBAAoB,EAAE,OAAO,8BAA8B,CAAC;QAC5D,mBAAmB,EAAE,OAAO,6BAA6B,CAAC;QAC1D,qBAAqB,EAAE,OAAO,+BAA+B,CAAC;KACjE;;WATU,OAAO,eAAe;aACpB,OAAO,iBAAiB;eACtB,OAAO,mBAAmB;cAC3B,OAAO,kBAAkB;gBACvB,OAAO,oBAAoB;wBACnB,OAAO,qBAAqB;0BAC1B,OAAO,8BAA8B;yBACtC,OAAO,6BAA6B;2BAClC,OAAO,+BAA+B;CAyBpE,CAAC;AAEF,QAAA,MAAM,iBAAiB,oHAErB,CAAC;AACH,QAAA,MAAM,mBAAmB,oHAGvB,CAAC;AACH,QAAA,MAAM,kBAAkB,oHAGtB,CAAC;AACH,QAAA,MAAM,oBAAoB,oHAGxB,CAAC;AAEH,QAAA,MAAM,qBAAqB,oHAAiF,CAAC;AAC7G,QAAA,MAAM,8BAA8B,oHAAgF,CAAC;AACrH,QAAA,MAAM,6BAA6B,oHAGjC,CAAC;AACH,QAAA,MAAM,+BAA+B,oHAAiF,CAAC"}
|
|
@@ -85,5 +85,15 @@ ActionIcon.DestructivePrimary = ActionIconDestructive;
|
|
|
85
85
|
ActionIcon.DestructiveSecondary = ActionIconDestructiveSecondary;
|
|
86
86
|
ActionIcon.DestructiveTertiary = ActionIconDestructiveTertiary;
|
|
87
87
|
ActionIcon.DestructiveQuaternary = ActionIconDestructiveQuaternary;
|
|
88
|
+
ActionIcon.displayName = 'ActionIcon';
|
|
89
|
+
ActionIcon.Group.displayName = 'ActionIcon.Group';
|
|
90
|
+
ActionIconPrimary.displayName = 'ActionIcon.Primary';
|
|
91
|
+
ActionIconSecondary.displayName = 'ActionIcon.Secondary';
|
|
92
|
+
ActionIconTertiary.displayName = 'ActionIcon.Tertiary';
|
|
93
|
+
ActionIconQuaternary.displayName = 'ActionIcon.Quaternary';
|
|
94
|
+
ActionIconDestructive.displayName = 'ActionIcon.DestructivePrimary';
|
|
95
|
+
ActionIconDestructiveSecondary.displayName = 'ActionIcon.DestructiveSecondary';
|
|
96
|
+
ActionIconDestructiveTertiary.displayName = 'ActionIcon.DestructiveTertiary';
|
|
97
|
+
ActionIconDestructiveQuaternary.displayName = 'ActionIcon.DestructiveQuaternary';
|
|
88
98
|
|
|
89
99
|
//# sourceMappingURL=ActionIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import {\n ActionIcon as MantineActionIcon,\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import {\n ActionIconCssVariables,\n ActionIconStylesNames,\n ActionIconVariant,\n Factory,\n ActionIcon as MantineActionIcon,\n polymorphicFactory,\n type ActionIconGroup,\n type ActionIconProps as MantineActionIconProps,\n} from '@mantine/core';\nimport {ComponentType, MouseEventHandler} from 'react';\nimport {useClickWithLoading} from '../../hooks/useClickWithLoading.js';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from '../Button/ButtonWithDisabledTooltip.js';\n\nexport interface ActionIconProps extends MantineActionIconProps, ButtonWithDisabledTooltipProps {\n /* Handler executed on click */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\ntype ActionIconOverloadFactory = Factory<{\n props: ActionIconProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: ActionIconStylesNames;\n vars: ActionIconCssVariables;\n variant: ActionIconVariant;\n staticComponents: {\n Group: typeof ActionIconGroup;\n Primary: typeof ActionIconPrimary;\n Secondary: typeof ActionIconSecondary;\n Tertiary: typeof ActionIconTertiary;\n Quaternary: typeof ActionIconQuaternary;\n DestructivePrimary: typeof ActionIconDestructive;\n DestructiveSecondary: typeof ActionIconDestructiveSecondary;\n DestructiveTertiary: typeof ActionIconDestructiveTertiary;\n DestructiveQuaternary: typeof ActionIconDestructiveQuaternary;\n };\n}>;\n\nexport const ActionIcon = polymorphicFactory<ActionIconOverloadFactory>(\n ({disabledTooltip, disabled, disabledTooltipProps, loading, onClick, ...others}, ref) => {\n const {isLoading, handleClick} = useClickWithLoading(onClick);\n return (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n fullWidth={others.fullWidth}\n >\n <MantineActionIcon\n loaderProps={{type: 'oval'}}\n ref={ref}\n loading={isLoading || loading}\n onClick={handleClick}\n disabled={disabled}\n {...others}\n />\n </ButtonWithDisabledTooltip>\n );\n },\n);\n\nconst ActionIconPrimary = ActionIcon.withProps({\n variant: 'filled',\n});\nconst ActionIconSecondary = ActionIcon.withProps({\n variant: 'light',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ActionIconTertiary = ActionIcon.withProps({\n variant: 'default',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ActionIconQuaternary = ActionIcon.withProps({\n variant: 'subtle',\n color: 'var(--coveo-color-text-primary)',\n});\n\nconst ActionIconDestructive = ActionIcon.withProps({variant: 'filled', color: 'var(--mantine-color-error)'});\nconst ActionIconDestructiveSecondary = ActionIcon.withProps({variant: 'light', color: 'var(--mantine-color-error)'});\nconst ActionIconDestructiveTertiary = ActionIcon.withProps({\n variant: 'default',\n vars: () => ({root: {'--ai-color': 'var(--mantine-color-error)'}}),\n});\nconst ActionIconDestructiveQuaternary = ActionIcon.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});\n\nActionIcon.Group = MantineActionIcon.Group;\nActionIcon.Primary = ActionIconPrimary;\nActionIcon.Secondary = ActionIconSecondary;\nActionIcon.Tertiary = ActionIconTertiary;\nActionIcon.Quaternary = ActionIconQuaternary;\nActionIcon.DestructivePrimary = ActionIconDestructive;\nActionIcon.DestructiveSecondary = ActionIconDestructiveSecondary;\nActionIcon.DestructiveTertiary = ActionIconDestructiveTertiary;\nActionIcon.DestructiveQuaternary = ActionIconDestructiveQuaternary;\n\nActionIcon.displayName = 'ActionIcon';\nActionIcon.Group.displayName = 'ActionIcon.Group';\n(ActionIconPrimary as ComponentType).displayName = 'ActionIcon.Primary';\n(ActionIconSecondary as ComponentType).displayName = 'ActionIcon.Secondary';\n(ActionIconTertiary as ComponentType).displayName = 'ActionIcon.Tertiary';\n(ActionIconQuaternary as ComponentType).displayName = 'ActionIcon.Quaternary';\n(ActionIconDestructive as ComponentType).displayName = 'ActionIcon.DestructivePrimary';\n(ActionIconDestructiveSecondary as ComponentType).displayName = 'ActionIcon.DestructiveSecondary';\n(ActionIconDestructiveTertiary as ComponentType).displayName = 'ActionIcon.DestructiveTertiary';\n(ActionIconDestructiveQuaternary as ComponentType).displayName = 'ActionIcon.DestructiveQuaternary';\n"],"names":["ActionIcon","polymorphicFactory","ref","disabledTooltip","disabled","disabledTooltipProps","loading","onClick","others","useClickWithLoading","isLoading","handleClick","ButtonWithDisabledTooltip","fullWidth","MantineActionIcon","loaderProps","type","ActionIconPrimary","withProps","variant","ActionIconSecondary","color","ActionIconTertiary","ActionIconQuaternary","ActionIconDestructive","ActionIconDestructiveSecondary","ActionIconDestructiveTertiary","vars","root","ActionIconDestructiveQuaternary","Group","Primary","Secondary","Tertiary","Quaternary","DestructivePrimary","DestructiveSecondary","DestructiveTertiary","DestructiveQuaternary","displayName"],"mappings":";;;;+BAuCaA;;;eAAAA;;;;;;oBA9BN;mCAE2B;yCACsC;AA2BjE,IAAMA,aAAaC,IAAAA,wBAAkB,EACxC,iBAAiFC;QAA/EC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,8BAAAA,sBAAsBC,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,WAAWmC,kBAAkB,GAAGX;AAChCxB,WAAWoC,oBAAoB,GAAGX;AAClCzB,WAAWqC,mBAAmB,GAAGX;AACjC1B,WAAWsC,qBAAqB,GAAGT;AAEnC7B,WAAWuC,WAAW,GAAG;AACzBvC,WAAW8B,KAAK,CAACS,WAAW,GAAG;AAC9BtB,kBAAoCsB,WAAW,GAAG;AAClDnB,oBAAsCmB,WAAW,GAAG;AACpDjB,mBAAqCiB,WAAW,GAAG;AACnDhB,qBAAuCgB,WAAW,GAAG;AACrDf,sBAAwCe,WAAW,GAAG;AACtDd,+BAAiDc,WAAW,GAAG;AAC/Db,8BAAgDa,WAAW,GAAG;AAC9DV,gCAAkDU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EAIf,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EAIf,MAAM,eAAe,CAAC;AAmBvB,eAAO,MAAM,KAAK;;;;;;;;;WAdP,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;WAXM,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;WAXM,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;iBAJgB,OAAO,gBAAgB;YAC5B,OAAO,WAAW;aACjB,OAAO,YAAY;cAClB,OAAO,aAAa;CAI8E,CAAC;AAGrH,QAAA,MAAM,gBAAgB,4GASpB,CAAC;AAGH,QAAA,MAAM,WAAW,4GAQf,CAAC;AAGH,QAAA,MAAM,YAAY,4GAShB,CAAC;AAGH,QAAA,MAAM,aAAa,4GAQjB,CAAC"}
|
|
@@ -18,6 +18,7 @@ var Alert = (0, _core.polymorphicFactory)(function(props, ref) {
|
|
|
18
18
|
ref: ref
|
|
19
19
|
}));
|
|
20
20
|
});
|
|
21
|
+
Alert.displayName = 'Alert';
|
|
21
22
|
var AlertInformation = Alert.withProps({
|
|
22
23
|
color: 'gray',
|
|
23
24
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken, {
|
|
@@ -32,6 +33,7 @@ var AlertInformation = Alert.withProps({
|
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
});
|
|
36
|
+
AlertInformation.displayName = 'Alert.Information';
|
|
35
37
|
var AlertAdvice = Alert.withProps({
|
|
36
38
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken, {
|
|
37
39
|
variant: "advice"
|
|
@@ -45,6 +47,7 @@ var AlertAdvice = Alert.withProps({
|
|
|
45
47
|
};
|
|
46
48
|
}
|
|
47
49
|
});
|
|
50
|
+
AlertAdvice.displayName = 'Alert.Advice';
|
|
48
51
|
var AlertWarning = Alert.withProps({
|
|
49
52
|
color: 'warning',
|
|
50
53
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken, {
|
|
@@ -59,6 +62,7 @@ var AlertWarning = Alert.withProps({
|
|
|
59
62
|
};
|
|
60
63
|
}
|
|
61
64
|
});
|
|
65
|
+
AlertWarning.displayName = 'Alert.Warning';
|
|
62
66
|
var AlertCritical = Alert.withProps({
|
|
63
67
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoToken.InfoToken, {
|
|
64
68
|
variant: "error"
|
|
@@ -72,6 +76,7 @@ var AlertCritical = Alert.withProps({
|
|
|
72
76
|
};
|
|
73
77
|
}
|
|
74
78
|
});
|
|
79
|
+
AlertCritical.displayName = 'Alert.Critical';
|
|
75
80
|
Alert.Information = AlertInformation;
|
|
76
81
|
Alert.Advice = AlertAdvice;
|
|
77
82
|
Alert.Warning = AlertWarning;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import {\n AlertCssVariables,\n AlertProps,\n AlertStylesNames,\n AlertVariant,\n Factory,\n Alert as MantineAlert,\n polymorphicFactory,\n} from '@mantine/core';\nimport {InfoToken} from '../InfoToken/InfoToken.js';\n\ntype AlertOverloadFactory = Factory<{\n props: AlertProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: AlertStylesNames;\n vars: AlertCssVariables;\n variant: AlertVariant;\n staticComponents: {\n Information: typeof AlertInformation;\n Advice: typeof AlertAdvice;\n Warning: typeof AlertWarning;\n Critical: typeof AlertCritical;\n };\n}>;\n\nexport const Alert = polymorphicFactory<AlertOverloadFactory>((props, ref) => <MantineAlert {...props} ref={ref} />);\n\nconst AlertInformation = Alert.withProps({\n color: 'gray',\n icon: <InfoToken variant=\"information\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-text)',\n '--alert-bg': 'var(--mantine-color-gray-light)',\n },\n }),\n});\n\nconst AlertAdvice = Alert.withProps({\n icon: <InfoToken variant=\"advice\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-primary-color-filled)',\n '--alert-bg': 'var(--mantine-primary-color-light)',\n },\n }),\n});\n\nconst AlertWarning = Alert.withProps({\n color: 'warning',\n icon: <InfoToken variant=\"warning\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-warning-filled)',\n '--alert-bg': 'var(--mantine-color-warning-light)',\n },\n }),\n});\nconst AlertCritical = Alert.withProps({\n icon: <InfoToken variant=\"error\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-error)',\n '--alert-bg': 'var(--mantine-color-red-light)',\n },\n }),\n});\n\nAlert.Information = AlertInformation;\nAlert.Advice = AlertAdvice;\nAlert.Warning = AlertWarning;\nAlert.Critical = AlertCritical;\n"],"names":["Alert","polymorphicFactory","props","ref","MantineAlert","AlertInformation","withProps","color","icon","InfoToken","variant","vars","root","AlertAdvice","AlertWarning","AlertCritical","Information","Advice","Warning","Critical"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import {\n AlertCssVariables,\n AlertProps,\n AlertStylesNames,\n AlertVariant,\n Factory,\n Alert as MantineAlert,\n polymorphicFactory,\n} from '@mantine/core';\nimport {type ComponentType} from 'react';\nimport {InfoToken} from '../InfoToken/InfoToken.js';\n\ntype AlertOverloadFactory = Factory<{\n props: AlertProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: AlertStylesNames;\n vars: AlertCssVariables;\n variant: AlertVariant;\n staticComponents: {\n Information: typeof AlertInformation;\n Advice: typeof AlertAdvice;\n Warning: typeof AlertWarning;\n Critical: typeof AlertCritical;\n };\n}>;\n\nexport const Alert = polymorphicFactory<AlertOverloadFactory>((props, ref) => <MantineAlert {...props} ref={ref} />);\nAlert.displayName = 'Alert';\n\nconst AlertInformation = Alert.withProps({\n color: 'gray',\n icon: <InfoToken variant=\"information\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-text)',\n '--alert-bg': 'var(--mantine-color-gray-light)',\n },\n }),\n});\n(AlertInformation as ComponentType).displayName = 'Alert.Information';\n\nconst AlertAdvice = Alert.withProps({\n icon: <InfoToken variant=\"advice\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-primary-color-filled)',\n '--alert-bg': 'var(--mantine-primary-color-light)',\n },\n }),\n});\n(AlertAdvice as ComponentType).displayName = 'Alert.Advice';\n\nconst AlertWarning = Alert.withProps({\n color: 'warning',\n icon: <InfoToken variant=\"warning\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-warning-filled)',\n '--alert-bg': 'var(--mantine-color-warning-light)',\n },\n }),\n});\n(AlertWarning as ComponentType).displayName = 'Alert.Warning';\n\nconst AlertCritical = Alert.withProps({\n icon: <InfoToken variant=\"error\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-error)',\n '--alert-bg': 'var(--mantine-color-red-light)',\n },\n }),\n});\n(AlertCritical as ComponentType).displayName = 'Alert.Critical';\n\nAlert.Information = AlertInformation;\nAlert.Advice = AlertAdvice;\nAlert.Warning = AlertWarning;\nAlert.Critical = AlertCritical;\n"],"names":["Alert","polymorphicFactory","props","ref","MantineAlert","displayName","AlertInformation","withProps","color","icon","InfoToken","variant","vars","root","AlertAdvice","AlertWarning","AlertCritical","Information","Advice","Warning","Critical"],"mappings":";;;;+BA2BaA;;;eAAAA;;;;;;oBAnBN;yBAEiB;AAiBjB,IAAMA,QAAQC,IAAAA,wBAAkB,EAAuB,SAACC,OAAOC;yBAAQ,qBAACC,WAAY,8CAAKF;QAAOC,KAAKA;;;AAC5GH,MAAMK,WAAW,GAAG;AAEpB,IAAMC,mBAAmBN,MAAMO,SAAS,CAAC;IACrCC,OAAO;IACPC,oBAAM,qBAACC,oBAAS;QAACC,SAAQ;;IACzBC,MAAM;eAAO;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ;;AACJ;AACCP,iBAAmCD,WAAW,GAAG;AAElD,IAAMS,cAAcd,MAAMO,SAAS,CAAC;IAChCE,oBAAM,qBAACC,oBAAS;QAACC,SAAQ;;IACzBC,MAAM;eAAO;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ;;AACJ;AACCC,YAA8BT,WAAW,GAAG;AAE7C,IAAMU,eAAef,MAAMO,SAAS,CAAC;IACjCC,OAAO;IACPC,oBAAM,qBAACC,oBAAS;QAACC,SAAQ;;IACzBC,MAAM;eAAO;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ;;AACJ;AACCE,aAA+BV,WAAW,GAAG;AAE9C,IAAMW,gBAAgBhB,MAAMO,SAAS,CAAC;IAClCE,oBAAM,qBAACC,oBAAS;QAACC,SAAQ;;IACzBC,MAAM;eAAO;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ;;AACJ;AACCG,cAAgCX,WAAW,GAAG;AAE/CL,MAAMiB,WAAW,GAAGX;AACpBN,MAAMkB,MAAM,GAAGJ;AACfd,MAAMmB,OAAO,GAAGJ;AAChBf,MAAMoB,QAAQ,GAAGJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,aAAa,EAGb,WAAW,IAAI,kBAAkB,EAEpC,MAAM,eAAe,CAAC;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,aAAa,EAGb,WAAW,IAAI,kBAAkB,EAEpC,MAAM,eAAe,CAAC;AACvB,OAAO,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QACd,KAAK,EAAE,OAAO,WAAW,CAAC;QAC1B,OAAO,EAAE,OAAO,aAAa,CAAC;QAC9B,SAAS,EAAE,OAAO,eAAe,CAAC;QAClC,QAAQ,EAAE,OAAO,cAAc,CAAC;QAChC,UAAU,EAAE,OAAO,gBAAgB,CAAC;QACpC,kBAAkB,EAAE,OAAO,iBAAiB,CAAC;QAC7C,oBAAoB,EAAE,OAAO,0BAA0B,CAAC;QACxD,mBAAmB,EAAE,OAAO,yBAAyB,CAAC;QACtD,qBAAqB,EAAE,OAAO,2BAA2B,CAAC;KAC7D;;WATU,OAAO,WAAW;aAChB,OAAO,aAAa;eAClB,OAAO,eAAe;cACvB,OAAO,cAAc;gBACnB,OAAO,gBAAgB;wBACf,OAAO,iBAAiB;0BACtB,OAAO,0BAA0B;yBAClC,OAAO,yBAAyB;2BAC9B,OAAO,2BAA2B;CA6BhE,CAAC;AACF,QAAA,MAAM,aAAa,gHAAwC,CAAC;AAC5D,QAAA,MAAM,eAAe,gHAGnB,CAAC;AACH,QAAA,MAAM,cAAc,gHAQlB,CAAC;AACH,QAAA,MAAM,gBAAgB,gHAGpB,CAAC;AAEH,QAAA,MAAM,iBAAiB,gHAA6E,CAAC;AACrG,QAAA,MAAM,0BAA0B,gHAG9B,CAAC;AACH,QAAA,MAAM,yBAAyB,gHAQ7B,CAAC;AACH,QAAA,MAAM,2BAA2B,gHAA6E,CAAC"}
|
|
@@ -89,6 +89,7 @@ var ButtonDestructiveQuaternary = Button.withProps({
|
|
|
89
89
|
color: 'var(--mantine-color-error)'
|
|
90
90
|
});
|
|
91
91
|
Button.Group = _core.Button.Group;
|
|
92
|
+
Button.Group.displayName = 'Button.Group';
|
|
92
93
|
Button.Primary = ButtonPrimary;
|
|
93
94
|
Button.Secondary = ButtonSecondary;
|
|
94
95
|
Button.Tertiary = ButtonTertiary;
|
|
@@ -97,5 +98,14 @@ Button.DestructivePrimary = ButtonDestructive;
|
|
|
97
98
|
Button.DestructiveSecondary = ButtonDestructiveSecondary;
|
|
98
99
|
Button.DestructiveTertiary = ButtonDestructiveTertiary;
|
|
99
100
|
Button.DestructiveQuaternary = ButtonDestructiveQuaternary;
|
|
101
|
+
ButtonPrimary.displayName = 'Button.Primary';
|
|
102
|
+
ButtonSecondary.displayName = 'Button.Secondary';
|
|
103
|
+
ButtonTertiary.displayName = 'Button.Tertiary';
|
|
104
|
+
ButtonQuaternary.displayName = 'Button.Quaternary';
|
|
105
|
+
ButtonDestructive.displayName = 'Button.DestructivePrimary';
|
|
106
|
+
ButtonDestructiveSecondary.displayName = 'Button.DestructiveSecondary';
|
|
107
|
+
ButtonDestructiveTertiary.displayName = 'Button.DestructiveTertiary';
|
|
108
|
+
ButtonDestructiveQuaternary.displayName = 'Button.DestructiveQuaternary';
|
|
109
|
+
Button.displayName = 'Button';
|
|
100
110
|
|
|
101
111
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import {\n ButtonCssVariables,\n type ButtonGroup,\n ButtonStylesNames,\n ButtonVariant,\n Factory,\n Button as MantineButton,\n ButtonProps as MantineButtonProps,\n polymorphicFactory,\n} from '@mantine/core';\nimport {MouseEventHandler} from 'react';\nimport {useClickWithLoading} from '../../hooks/useClickWithLoading.js';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip.js';\n\nexport interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {\n /* Handler executed on click */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\ntype ButtonOverloadFactory = Factory<{\n props: ButtonProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: ButtonStylesNames;\n vars: ButtonCssVariables;\n variant: ButtonVariant;\n staticComponents: {\n Group: typeof ButtonGroup;\n Primary: typeof ButtonPrimary;\n Secondary: typeof ButtonSecondary;\n Tertiary: typeof ButtonTertiary;\n Quaternary: typeof ButtonQuaternary;\n DestructivePrimary: typeof ButtonDestructive;\n DestructiveSecondary: typeof ButtonDestructiveSecondary;\n DestructiveTertiary: typeof ButtonDestructiveTertiary;\n DestructiveQuaternary: typeof ButtonDestructiveQuaternary;\n };\n}>;\n\nexport const Button = polymorphicFactory<ButtonOverloadFactory>(\n (\n {disabledTooltip, disabled, disabledTooltipProps, loading, onClick, 'data-disabled': dataDisabled, ...others},\n ref,\n ) => {\n const {isLoading, handleClick} = useClickWithLoading(onClick);\n return (\n <ButtonWithDisabledTooltip\n disabled={disabled || dataDisabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n fullWidth={others.fullWidth}\n >\n <MantineButton\n loaderProps={{variant: 'oval'}}\n ref={ref}\n loading={isLoading || loading}\n onClick={dataDisabled ? (e) => e.preventDefault() : handleClick}\n disabled={disabled || dataDisabled}\n data-loading={isLoading || loading || undefined}\n {...others}\n />\n </ButtonWithDisabledTooltip>\n );\n },\n);\nconst ButtonPrimary = Button.withProps({variant: 'filled'});\nconst ButtonSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ButtonTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--coveo-color-text-primary)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonQuaternary = Button.withProps({\n variant: 'subtle',\n color: 'var(--coveo-color-text-primary)',\n});\n\nconst ButtonDestructive = Button.withProps({variant: 'filled', color: 'var(--mantine-color-error)'});\nconst ButtonDestructiveSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--mantine-color-error)',\n});\nconst ButtonDestructiveTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--mantine-color-error)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonDestructiveQuaternary = Button.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});\n\nButton.Group = MantineButton.Group;\nButton.Primary = ButtonPrimary;\nButton.Secondary = ButtonSecondary;\nButton.Tertiary = ButtonTertiary;\nButton.Quaternary = ButtonQuaternary;\nButton.DestructivePrimary = ButtonDestructive;\nButton.DestructiveSecondary = ButtonDestructiveSecondary;\nButton.DestructiveTertiary = ButtonDestructiveTertiary;\nButton.DestructiveQuaternary = ButtonDestructiveQuaternary;\n"],"names":["Button","polymorphicFactory","ref","disabledTooltip","disabled","disabledTooltipProps","loading","onClick","dataDisabled","others","useClickWithLoading","isLoading","handleClick","ButtonWithDisabledTooltip","fullWidth","MantineButton","loaderProps","variant","e","preventDefault","data-loading","undefined","ButtonPrimary","withProps","ButtonSecondary","color","ButtonTertiary","vars","theme","root","spacing","sm","ButtonQuaternary","ButtonDestructive","ButtonDestructiveSecondary","ButtonDestructiveTertiary","ButtonDestructiveQuaternary","Group","Primary","Secondary","Tertiary","Quaternary","DestructivePrimary","DestructiveSecondary","DestructiveTertiary","DestructiveQuaternary"],"mappings":";;;;+BAuCaA;;;eAAAA;;;;;;oBA9BN;mCAE2B;yCACsC;AA2BjE,IAAMA,SAASC,IAAAA,wBAAkB,EACpC,iBAEIC;QADCC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,8BAAAA,sBAAsBC,iBAAAA,SAASC,iBAAAA,SAAS,AAAiBC,sBAAjB,kBAAkCC;QAArGN;QAAiBC;QAAUC;QAAsBC;QAASC;QAAS;;IAGpE,IAAiCG,wBAAAA,IAAAA,wCAAmB,EAACH,UAA9CI,YAA0BD,sBAA1BC,WAAWC,cAAeF,sBAAfE;IAClB,qBACI,qBAACC,oDAAyB;QACtBT,UAAUA,YAAYI;QACtBL,iBAAiBA;QACjBE,sBAAsBA;QACtBS,WAAWL,OAAOK,SAAS;kBAE3B,cAAA,qBAACC,YAAa;YACVC,aAAa;gBAACC,SAAS;YAAM;YAC7Bf,KAAKA;YACLI,SAASK,aAAaL;YACtBC,SAASC,eAAe,SAACU;uBAAMA,EAAEC,cAAc;gBAAKP;YACpDR,UAAUA,YAAYI;YACtBY,gBAAcT,aAAaL,WAAWe;WAClCZ;;AAIpB;AAEJ,IAAMa,gBAAgBtB,OAAOuB,SAAS,CAAC;IAACN,SAAS;AAAQ;AACzD,IAAMO,kBAAkBxB,OAAOuB,SAAS,CAAC;IACrCN,SAAS;IACTQ,OAAO;AACX;AACA,IAAMC,iBAAiB1B,OAAOuB,SAAS,CAAC;IACpCN,SAAS;IACTU,MAAM,SAACC;eAAW;YACdC,MAAM;gBACF,kBAAkB;gBAClB,sBAAsBD,MAAME,OAAO,CAACC,EAAE;YAC1C;QACJ;;AACJ;AACA,IAAMC,mBAAmBhC,OAAOuB,SAAS,CAAC;IACtCN,SAAS;IACTQ,OAAO;AACX;AAEA,IAAMQ,oBAAoBjC,OAAOuB,SAAS,CAAC;IAACN,SAAS;IAAUQ,OAAO;AAA4B;AAClG,IAAMS,6BAA6BlC,OAAOuB,SAAS,CAAC;IAChDN,SAAS;IACTQ,OAAO;AACX;AACA,IAAMU,4BAA4BnC,OAAOuB,SAAS,CAAC;IAC/CN,SAAS;IACTU,MAAM,SAACC;eAAW;YACdC,MAAM;gBACF,kBAAkB;gBAClB,sBAAsBD,MAAME,OAAO,CAACC,EAAE;YAC1C;QACJ;;AACJ;AACA,IAAMK,8BAA8BpC,OAAOuB,SAAS,CAAC;IAACN,SAAS;IAAUQ,OAAO;AAA4B;AAE5GzB,OAAOqC,KAAK,GAAGtB,YAAa,CAACsB,KAAK;AAClCrC,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import {\n ButtonCssVariables,\n type ButtonGroup,\n ButtonStylesNames,\n ButtonVariant,\n Factory,\n Button as MantineButton,\n ButtonProps as MantineButtonProps,\n polymorphicFactory,\n} from '@mantine/core';\nimport {ComponentType, MouseEventHandler} from 'react';\nimport {useClickWithLoading} from '../../hooks/useClickWithLoading.js';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip.js';\n\nexport interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {\n /* Handler executed on click */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\ntype ButtonOverloadFactory = Factory<{\n props: ButtonProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: ButtonStylesNames;\n vars: ButtonCssVariables;\n variant: ButtonVariant;\n staticComponents: {\n Group: typeof ButtonGroup;\n Primary: typeof ButtonPrimary;\n Secondary: typeof ButtonSecondary;\n Tertiary: typeof ButtonTertiary;\n Quaternary: typeof ButtonQuaternary;\n DestructivePrimary: typeof ButtonDestructive;\n DestructiveSecondary: typeof ButtonDestructiveSecondary;\n DestructiveTertiary: typeof ButtonDestructiveTertiary;\n DestructiveQuaternary: typeof ButtonDestructiveQuaternary;\n };\n}>;\n\nexport const Button = polymorphicFactory<ButtonOverloadFactory>(\n (\n {disabledTooltip, disabled, disabledTooltipProps, loading, onClick, 'data-disabled': dataDisabled, ...others},\n ref,\n ) => {\n const {isLoading, handleClick} = useClickWithLoading(onClick);\n return (\n <ButtonWithDisabledTooltip\n disabled={disabled || dataDisabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n fullWidth={others.fullWidth}\n >\n <MantineButton\n loaderProps={{variant: 'oval'}}\n ref={ref}\n loading={isLoading || loading}\n onClick={dataDisabled ? (e) => e.preventDefault() : handleClick}\n disabled={disabled || dataDisabled}\n data-loading={isLoading || loading || undefined}\n {...others}\n />\n </ButtonWithDisabledTooltip>\n );\n },\n);\nconst ButtonPrimary = Button.withProps({variant: 'filled'});\nconst ButtonSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ButtonTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--coveo-color-text-primary)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonQuaternary = Button.withProps({\n variant: 'subtle',\n color: 'var(--coveo-color-text-primary)',\n});\n\nconst ButtonDestructive = Button.withProps({variant: 'filled', color: 'var(--mantine-color-error)'});\nconst ButtonDestructiveSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--mantine-color-error)',\n});\nconst ButtonDestructiveTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--mantine-color-error)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonDestructiveQuaternary = Button.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});\n\nButton.Group = MantineButton.Group;\nButton.Group.displayName = 'Button.Group';\nButton.Primary = ButtonPrimary;\nButton.Secondary = ButtonSecondary;\nButton.Tertiary = ButtonTertiary;\nButton.Quaternary = ButtonQuaternary;\nButton.DestructivePrimary = ButtonDestructive;\nButton.DestructiveSecondary = ButtonDestructiveSecondary;\nButton.DestructiveTertiary = ButtonDestructiveTertiary;\nButton.DestructiveQuaternary = ButtonDestructiveQuaternary;\n(ButtonPrimary as ComponentType).displayName = 'Button.Primary';\n(ButtonSecondary as ComponentType).displayName = 'Button.Secondary';\n(ButtonTertiary as ComponentType).displayName = 'Button.Tertiary';\n(ButtonQuaternary as ComponentType).displayName = 'Button.Quaternary';\n(ButtonDestructive as ComponentType).displayName = 'Button.DestructivePrimary';\n(ButtonDestructiveSecondary as ComponentType).displayName = 'Button.DestructiveSecondary';\n(ButtonDestructiveTertiary as ComponentType).displayName = 'Button.DestructiveTertiary';\n(ButtonDestructiveQuaternary as ComponentType).displayName = 'Button.DestructiveQuaternary';\n\nButton.displayName = 'Button';\n"],"names":["Button","polymorphicFactory","ref","disabledTooltip","disabled","disabledTooltipProps","loading","onClick","dataDisabled","others","useClickWithLoading","isLoading","handleClick","ButtonWithDisabledTooltip","fullWidth","MantineButton","loaderProps","variant","e","preventDefault","data-loading","undefined","ButtonPrimary","withProps","ButtonSecondary","color","ButtonTertiary","vars","theme","root","spacing","sm","ButtonQuaternary","ButtonDestructive","ButtonDestructiveSecondary","ButtonDestructiveTertiary","ButtonDestructiveQuaternary","Group","displayName","Primary","Secondary","Tertiary","Quaternary","DestructivePrimary","DestructiveSecondary","DestructiveTertiary","DestructiveQuaternary"],"mappings":";;;;+BAuCaA;;;eAAAA;;;;;;oBA9BN;mCAE2B;yCACsC;AA2BjE,IAAMA,SAASC,IAAAA,wBAAkB,EACpC,iBAEIC;QADCC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,8BAAAA,sBAAsBC,iBAAAA,SAASC,iBAAAA,SAAS,AAAiBC,sBAAjB,kBAAkCC;QAArGN;QAAiBC;QAAUC;QAAsBC;QAASC;QAAS;;IAGpE,IAAiCG,wBAAAA,IAAAA,wCAAmB,EAACH,UAA9CI,YAA0BD,sBAA1BC,WAAWC,cAAeF,sBAAfE;IAClB,qBACI,qBAACC,oDAAyB;QACtBT,UAAUA,YAAYI;QACtBL,iBAAiBA;QACjBE,sBAAsBA;QACtBS,WAAWL,OAAOK,SAAS;kBAE3B,cAAA,qBAACC,YAAa;YACVC,aAAa;gBAACC,SAAS;YAAM;YAC7Bf,KAAKA;YACLI,SAASK,aAAaL;YACtBC,SAASC,eAAe,SAACU;uBAAMA,EAAEC,cAAc;gBAAKP;YACpDR,UAAUA,YAAYI;YACtBY,gBAAcT,aAAaL,WAAWe;WAClCZ;;AAIpB;AAEJ,IAAMa,gBAAgBtB,OAAOuB,SAAS,CAAC;IAACN,SAAS;AAAQ;AACzD,IAAMO,kBAAkBxB,OAAOuB,SAAS,CAAC;IACrCN,SAAS;IACTQ,OAAO;AACX;AACA,IAAMC,iBAAiB1B,OAAOuB,SAAS,CAAC;IACpCN,SAAS;IACTU,MAAM,SAACC;eAAW;YACdC,MAAM;gBACF,kBAAkB;gBAClB,sBAAsBD,MAAME,OAAO,CAACC,EAAE;YAC1C;QACJ;;AACJ;AACA,IAAMC,mBAAmBhC,OAAOuB,SAAS,CAAC;IACtCN,SAAS;IACTQ,OAAO;AACX;AAEA,IAAMQ,oBAAoBjC,OAAOuB,SAAS,CAAC;IA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EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IAC/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,oCAAoC,EAAE,SAAS,CAAC,CAAC;CAChF;AASD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA4LzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n Group,\n Input,\n InputWrapperProps,\n Loader,\n Space,\n Stack,\n StackProps,\n px,\n useMantineColorScheme,\n useMantineTheme,\n useProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {Monaco, loader} from '@monaco-editor/react';\nimport {MarkerSeverity, editor as monacoEditor} from 'monaco-editor';\nimport {FunctionComponent, useEffect, useRef, useState} from 'react';\n\nimport cx from 'clsx';\nimport {useParentHeight} from '../../hooks/useParentHeight.js';\nimport {CopyToClipboard} from '../CopyToClipboard/CopyToClipboard.js';\nimport CodeEditorClasses from './CodeEditor.module.css';\nimport {XML} from './languages/xml.js';\nimport {Search} from './search/Search.js';\ninterface CodeEditorProps\n extends Omit<\n InputWrapperProps,\n 'inputContainer' | 'inputWrapperOrder' | 'classNames' | 'styles' | 'vars' | 'onChange'\n >,\n Omit<StackProps, 'onChange' | 'attributes'> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml' | (string & unknown);\n /** Default value for uncontrolled input */\n defaultValue?: string;\n /** Value for controlled input */\n value?: string;\n /** onChange value for controlled input */\n onChange?(value: string): void;\n /** Called whenever the search icon is clicked */\n onSearch?(): void;\n /** Called whenever the copy icon is clicked */\n onCopy?(): void;\n /** Called whenever the code editor gets the focus */\n onFocus?(): void;\n /** Ref object that provides access to the editor's functionality */\n editorHandle?: React.MutableRefObject<monacoEditor.IStandaloneCodeEditor | null>;\n /**\n * The minimal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height is too short, it will use this value as minimum.\n *\n * @default 300\n */\n minHeight?: number;\n /**\n * The maximal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height would be too high for your liking, you can use this prop to set a maximum.\n */\n maxHeight?: number;\n disabled?: boolean;\n /**\n * Defines how the monaco editor files will be loaded.\n * Note that using `'local'` requires [some additional configuration](https://github.com/suren-atoyan/monaco-react#use-monaco-editor-as-an-npm-package).\n *\n * @default 'local'\n */\n monacoLoader?: 'cdn' | 'local';\n /**\n * Options to pass to the monaco editor.\n * Currently only supporting [`tabSize`](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html#tabSize).\n *\n */\n options?: Pick<monacoEditor.IStandaloneEditorConstructionOptions, 'tabSize'>;\n}\n\nconst defaultProps: Partial<CodeEditorProps> = {\n language: 'plaintext',\n monacoLoader: 'local',\n defaultValue: '',\n minHeight: 300,\n};\n\nexport const CodeEditor: FunctionComponent<CodeEditorProps> = (props) => {\n const {\n language,\n defaultValue,\n onChange,\n onCopy,\n onSearch,\n onFocus,\n value,\n label,\n required,\n labelProps,\n error,\n errorProps,\n description,\n descriptionProps,\n minHeight,\n maxHeight,\n disabled,\n monacoLoader,\n options: {tabSize} = {tabSize: 2},\n editorHandle,\n ...others\n } = useProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const [_value, handleChange] = useUncontrolled<string>({\n value,\n defaultValue,\n onChange,\n finalValue: '',\n });\n const [parentHeight, ref] = useParentHeight();\n const editorRef = useRef(null);\n\n const loadLocalMonaco = async () => {\n const monacoInstance = await import('monaco-editor');\n loader.config({monaco: monacoInstance});\n setLoaded(true);\n };\n\n const registerLanguages = (monaco: Monaco) => {\n if (monaco && language === 'xml') {\n XML.register(monaco);\n }\n };\n\n const registerThemes = (monaco: Monaco) => {\n monaco.editor.defineTheme('light', {\n base: 'vs',\n inherit: true,\n rules: [],\n colors: {\n 'editor.background': theme.colors.gray[0],\n },\n });\n };\n\n const handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n const [hasMonacoError, setHasMonacoError] = useState(false);\n const hasMonacoErrorRef = useRef(false);\n\n hasMonacoErrorRef.current = hasMonacoError;\n\n const hasError = !!error || hasMonacoError;\n const theme = useMantineTheme();\n const {colorScheme} = useMantineColorScheme();\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\n }, []);\n\n const handleValidate = (markers: monacoEditor.IMarker[]) => {\n setHasMonacoError(markers.some((marker) => marker.severity === MarkerSeverity.Error));\n };\n\n const _label = label ? (\n <Input.Label required={required} {...labelProps}>\n {label}\n </Input.Label>\n ) : null;\n\n const _description = description ? (\n <Input.Description {...descriptionProps}>{description}</Input.Description>\n ) : null;\n\n const _error = error ? <Input.Error {...errorProps}>{error}</Input.Error> : <Space h=\"sm\" />;\n\n const _header =\n _label || _description ? (\n <Stack gap=\"xxs\">\n {_label}\n {_description}\n </Stack>\n ) : null;\n\n const _buttons = (\n <Group justify=\"right\" gap=\"xs\">\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n let editorTheme = colorScheme === 'light' ? 'light' : 'vs-dark';\n if (disabled) {\n editorTheme += '-disabled';\n }\n\n const _editor = loaded ? (\n <Box\n p=\"md\"\n pl=\"xs\"\n className={cx(\n CodeEditorClasses.root,\n {[CodeEditorClasses.error]: hasError},\n {[CodeEditorClasses.disabled]: disabled},\n )}\n data-testid=\"editor-wrapper\"\n >\n <Editor\n onValidate={handleValidate}\n defaultLanguage={language}\n theme={editorTheme}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs) as number,\n readOnly: disabled,\n stickyScroll: {enabled: false},\n tabSize,\n }}\n value={_value}\n onChange={handleChange}\n beforeMount={(monaco) => {\n registerLanguages(monaco);\n registerThemes(monaco);\n }}\n onMount={(editor) => {\n editorRef.current = editor;\n if (editorHandle) {\n editorHandle.current = editor;\n }\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n // monaco editor has a timeout of 500ms populating errors, we want to ensure that checking errors happen after that\n setTimeout(async () => {\n if (!hasMonacoErrorRef.current) {\n await editor?.getAction('editor.action.formatDocument')?.run();\n }\n }, 550);\n });\n }}\n />\n </Box>\n ) : (\n <Center className={CodeEditorClasses.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n gap=\"sm\"\n h={Math.max(parentHeight, minHeight)}\n mah={maxHeight}\n ref={ref}\n {...others}\n >\n <Group justify=\"space-between\">\n {_header}\n {_buttons}\n </Group>\n {_editor}\n {_error}\n </Stack>\n );\n};\n"],"names":["CodeEditor","defaultProps","language","monacoLoader","defaultValue","minHeight","props","useProps","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","options","tabSize","editorHandle","others","useState","loaded","setLoaded","useUncontrolled","finalValue","_value","handleChange","useParentHeight","parentHeight","ref","editorRef","useRef","loadLocalMonaco","monacoInstance","loader","config","monaco","registerLanguages","XML","register","registerThemes","editor","defineTheme","base","inherit","rules","colors","theme","gray","handleSearch","current","focus","trigger","hasMonacoError","setHasMonacoError","hasMonacoErrorRef","hasError","useMantineTheme","colorScheme","useMantineColorScheme","useEffect","handleValidate","markers","some","marker","severity","MarkerSeverity","Error","_label","Input","Label","_description","Description","_error","Space","h","_header","Stack","gap","_buttons","Group","justify","Search","CopyToClipboard","editorTheme","_editor","Box","p","pl","className","cx","CodeEditorClasses","root","data-testid","Editor","onValidate","defaultLanguage","minimap","enabled","wordWrap","scrollBeyondLastLine","formatOnPaste","fontSize","px","fontSizes","xs","readOnly","stickyScroll","beforeMount","onMount","onDidFocusEditorText","onDidBlurEditorText","setTimeout","getAction","run","Center","Loader","Math","max","mah"],"mappings":";;;;+BA2FaA;;;eAAAA;;;;;;;;;;;;;oBA7EN;qBACuB;+DACO;4BACgB;sBACQ;6DAE9C;+BACe;+BACA;4EACA;mBACZ;sBACG;AA2DrB,IAAMC,eAAyC;IAC3CC,UAAU;IACVC,cAAc;IACdC,cAAc;IACdC,WAAW;AACf;AAEO,IAAML,aAAiD,SAACM;IAC3D,IAsBIC,YAAAA,IAAAA,cAAQ,EAAC,cAAcN,cAAcK,QArBrCJ,WAqBAK,UArBAL,UACAE,eAoBAG,UApBAH,cACAI,WAmBAD,UAnBAC,UACAC,SAkBAF,UAlBAE,QACAC,WAiBAH,UAjBAG,UACAC,UAgBAJ,UAhBAI,SACAC,QAeAL,UAfAK,OACAC,QAcAN,UAdAM,OACAC,WAaAP,UAbAO,UACAC,aAYAR,UAZAQ,YACAC,QAWAT,UAXAS,OACAC,aAUAV,UAVAU,YACAC,cASAX,UATAW,aACAC,mBAQAZ,UARAY,kBACAd,YAOAE,UAPAF,WACAe,YAMAb,UANAa,WACAC,WAKAd,UALAc,UACAlB,eAIAI,UAJAJ,cACS,MAGTI,UAHAe,SAAS,AAACC,WAAD,iBAAY;QAACA,SAAS;IAAC,IAAvB,KAACA,SACVC,eAEAjB,UAFAiB,cACGC,sCACHlB;QArBAL;QACAE;QACAI;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAd;QACAe;QACAC;QACAlB;QACAmB;QACAE;;IAGJ,IAA4BE,+BAAAA,IAAAA,gBAAQ,EAAC,YAA9BC,SAAqBD,cAAbE,YAAaF;IAC5B,IAA+BG,sCAAAA,IAAAA,sBAAe,EAAS;QACnDjB,OAAAA;QACAR,cAAAA;QACAI,UAAAA;QACAsB,YAAY;IAChB,QALOC,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T,SAAS;gBAAK;gBAC7BjF,SAAAA;YACJ;YACAX,OAAOmB;YACPvB,UAAUwB;YACVkF,aAAa,SAACxE;gBACVC,kBAAkBD;gBAClBI,eAAeJ;YACnB;YACAyE,SAAS,SAACpE;gBACNX,UAAUoB,OAAO,GAAGT;gBACpB,IAAIvB,cAAc;oBACdA,aAAagC,OAAO,GAAGT;gBAC3B;gBACAA,OAAOqE,oBAAoB,CAAC;2BAAMzG,oBAAAA,8BAAAA;;gBAClCoC,OAAOsE,mBAAmB,CAAC;;;4BACvB,mHAAmH;4BACnHC,WAAW;;wCAEGvE;;;;qDADN,CAACc,kBAAkBL,OAAO,EAA1B;;;;gDACA;;oDAAMT,mBAAAA,8BAAAA,oBAAAA,OAAQwE,SAAS,CAAC,6CAAlBxE,wCAAAA,kBAAmDyE,GAAG;;;gDAA5D;;;;;;;;gCAER;+BAAG;;;;;oBACP;;YACJ;;uBAIR,qBAACC,YAAM;QAAC1B,WAAWE,4BAAiB,CAAClD,MAAM;kBACvC,cAAA,qBAAC2E,YAAM;;IAIf,qBACI,sBAACvC,WAAK;QACFI,SAAQ;QACRH,KAAI;QACJH,GAAG0C,KAAKC,GAAG,CAAC1F,cAAc7B;QAC1BwH,KAAKzG;QACLe,KAAKA;OACDV;;0BAEJ,sBAAC6D,WAAK;gBAACC,SAAQ;;oBACVL;oBACAG;;;YAEJM;YACAZ;;;AAGb"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n Group,\n Input,\n InputWrapperProps,\n Loader,\n Space,\n Stack,\n StackProps,\n px,\n useMantineColorScheme,\n useMantineTheme,\n useProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {Monaco, loader} from '@monaco-editor/react';\nimport {MarkerSeverity, editor as monacoEditor} from 'monaco-editor';\nimport {FunctionComponent, useEffect, useRef, useState} from 'react';\n\nimport cx from 'clsx';\nimport {useParentHeight} from '../../hooks/useParentHeight.js';\nimport {CopyToClipboard} from '../CopyToClipboard/CopyToClipboard.js';\nimport CodeEditorClasses from './CodeEditor.module.css';\nimport {XML} from './languages/xml.js';\nimport {Search} from './search/Search.js';\ninterface CodeEditorProps\n extends\n Omit<InputWrapperProps, 'inputContainer' | 'inputWrapperOrder' | 'classNames' | 'styles' | 'vars' | 'onChange'>,\n Omit<StackProps, 'onChange' | 'attributes'> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml' | (string & unknown);\n /** Default value for uncontrolled input */\n defaultValue?: string;\n /** Value for controlled input */\n value?: string;\n /** onChange value for controlled input */\n onChange?(value: string): void;\n /** Called whenever the search icon is clicked */\n onSearch?(): void;\n /** Called whenever the copy icon is clicked */\n onCopy?(): void;\n /** Called whenever the code editor gets the focus */\n onFocus?(): void;\n /** Ref object that provides access to the editor's functionality */\n editorHandle?: React.MutableRefObject<monacoEditor.IStandaloneCodeEditor | null>;\n /**\n * The minimal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height is too short, it will use this value as minimum.\n *\n * @default 300\n */\n minHeight?: number;\n /**\n * The maximal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height would be too high for your liking, you can use this prop to set a maximum.\n */\n maxHeight?: number;\n disabled?: boolean;\n /**\n * Defines how the monaco editor files will be loaded.\n * Note that using `'local'` requires [some additional configuration](https://github.com/suren-atoyan/monaco-react#use-monaco-editor-as-an-npm-package).\n *\n * @default 'local'\n */\n monacoLoader?: 'cdn' | 'local';\n /**\n * Options to pass to the monaco editor.\n * Currently only supporting [`tabSize`](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html#tabSize).\n *\n */\n options?: Pick<monacoEditor.IStandaloneEditorConstructionOptions, 'tabSize'>;\n}\n\nconst defaultProps: Partial<CodeEditorProps> = {\n language: 'plaintext',\n monacoLoader: 'local',\n defaultValue: '',\n minHeight: 300,\n};\n\nexport const CodeEditor: FunctionComponent<CodeEditorProps> = (props) => {\n const {\n language,\n defaultValue,\n onChange,\n onCopy,\n onSearch,\n onFocus,\n value,\n label,\n required,\n labelProps,\n error,\n errorProps,\n description,\n descriptionProps,\n minHeight,\n maxHeight,\n disabled,\n monacoLoader,\n options: {tabSize} = {tabSize: 2},\n editorHandle,\n ...others\n } = useProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const [_value, handleChange] = useUncontrolled<string>({\n value,\n defaultValue,\n onChange,\n finalValue: '',\n });\n const [parentHeight, ref] = useParentHeight();\n const editorRef = useRef(null);\n\n const loadLocalMonaco = async () => {\n const monacoInstance = await import('monaco-editor');\n loader.config({monaco: monacoInstance});\n setLoaded(true);\n };\n\n const registerLanguages = (monaco: Monaco) => {\n if (monaco && language === 'xml') {\n XML.register(monaco);\n }\n };\n\n const registerThemes = (monaco: Monaco) => {\n monaco.editor.defineTheme('light', {\n base: 'vs',\n inherit: true,\n rules: [],\n colors: {\n 'editor.background': theme.colors.gray[0],\n },\n });\n };\n\n const handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n const [hasMonacoError, setHasMonacoError] = useState(false);\n const hasMonacoErrorRef = useRef(false);\n\n hasMonacoErrorRef.current = hasMonacoError;\n\n const hasError = !!error || hasMonacoError;\n const theme = useMantineTheme();\n const {colorScheme} = useMantineColorScheme();\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\n }, []);\n\n const handleValidate = (markers: monacoEditor.IMarker[]) => {\n setHasMonacoError(markers.some((marker) => marker.severity === MarkerSeverity.Error));\n };\n\n const _label = label ? (\n <Input.Label required={required} {...labelProps}>\n {label}\n </Input.Label>\n ) : null;\n\n const _description = description ? (\n <Input.Description {...descriptionProps}>{description}</Input.Description>\n ) : null;\n\n const _error = error ? <Input.Error {...errorProps}>{error}</Input.Error> : <Space h=\"sm\" />;\n\n const _header =\n _label || _description ? (\n <Stack gap=\"xxs\">\n {_label}\n {_description}\n </Stack>\n ) : null;\n\n const _buttons = (\n <Group justify=\"right\" gap=\"xs\">\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n let editorTheme = colorScheme === 'light' ? 'light' : 'vs-dark';\n if (disabled) {\n editorTheme += '-disabled';\n }\n\n const _editor = loaded ? (\n <Box\n p=\"md\"\n pl=\"xs\"\n className={cx(\n CodeEditorClasses.root,\n {[CodeEditorClasses.error]: hasError},\n {[CodeEditorClasses.disabled]: disabled},\n )}\n data-testid=\"editor-wrapper\"\n >\n <Editor\n onValidate={handleValidate}\n defaultLanguage={language}\n theme={editorTheme}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs) as number,\n readOnly: disabled,\n stickyScroll: {enabled: false},\n tabSize,\n }}\n value={_value}\n onChange={handleChange}\n beforeMount={(monaco) => {\n registerLanguages(monaco);\n registerThemes(monaco);\n }}\n onMount={(editor) => {\n editorRef.current = editor;\n if (editorHandle) {\n editorHandle.current = editor;\n }\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n // monaco editor has a timeout of 500ms populating errors, we want to ensure that checking errors happen after that\n setTimeout(async () => {\n if (!hasMonacoErrorRef.current) {\n await editor?.getAction('editor.action.formatDocument')?.run();\n }\n }, 550);\n });\n }}\n />\n </Box>\n ) : (\n <Center className={CodeEditorClasses.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n gap=\"sm\"\n h={Math.max(parentHeight, minHeight)}\n mah={maxHeight}\n ref={ref}\n {...others}\n >\n <Group justify=\"space-between\">\n {_header}\n {_buttons}\n </Group>\n {_editor}\n {_error}\n </Stack>\n );\n};\n\nCodeEditor.displayName = 'CodeEditor';\n"],"names":["CodeEditor","defaultProps","language","monacoLoader","defaultValue","minHeight","props","useProps","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","options","tabSize","editorHandle","others","useState","loaded","setLoaded","useUncontrolled","finalValue","_value","handleChange","useParentHeight","parentHeight","ref","editorRef","useRef","loadLocalMonaco","monacoInstance","loader","config","monaco","registerLanguages","XML","register","registerThemes","editor","defineTheme","base","inherit","rules","colors","theme","gray","handleSearch","current","focus","trigger","hasMonacoError","setHasMonacoError","hasMonacoErrorRef","hasError","useMantineTheme","colorScheme","useMantineColorScheme","useEffect","handleValidate","markers","some","marker","severity","MarkerSeverity","Error","_label","Input","Label","_description","Description","_error","Space","h","_header","Stack","gap","_buttons","Group","justify","Search","CopyToClipboard","editorTheme","_editor","Box","p","pl","className","cx","CodeEditorClasses","root","data-testid","Editor","onValidate","defaultLanguage","minimap","enabled","wordWrap","scrollBeyondLastLine","formatOnPaste","fontSize","px","fontSizes","xs","readOnly","stickyScroll","beforeMount","onMount","onDidFocusEditorText","onDidBlurEditorText","setTimeout","getAction","run","Center","Loader","Math","max","mah","displayName"],"mappings":";;;;+BAyFaA;;;eAAAA;;;;;;;;;;;;;oBA3EN;qBACuB;+DACO;4BACgB;sBACQ;6DAE9C;+BACe;+BACA;4EACA;mBACZ;sBACG;AAyDrB,IAAMC,eAAyC;IAC3CC,UAAU;IACVC,cAAc;IACdC,cAAc;IACdC,WAAW;AACf;AAEO,IAAML,aAAiD,SAACM;IAC3D,IAsBIC,YAAAA,IAAAA,cAAQ,EAAC,cAAcN,cAAcK,QArBrCJ,WAqBAK,UArBAL,UACAE,eAoBAG,UApBAH,cACAI,WAmBAD,UAnBAC,UACAC,SAkBAF,UAlBAE,QACAC,WAiBAH,UAjBAG,UACAC,UAgBAJ,UAhBAI,SACAC,QAeAL,UAfAK,OACAC,QAcAN,UAdAM,OACAC,WAa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AClD,MAAM;kBACvC,cAAA,qBAAC2E,YAAM;;IAIf,qBACI,sBAACvC,WAAK;QACFI,SAAQ;QACRH,KAAI;QACJH,GAAG0C,KAAKC,GAAG,CAAC1F,cAAc7B;QAC1BwH,KAAKzG;QACLe,KAAKA;OACDV;;0BAEJ,sBAAC6D,WAAK;gBAACC,SAAQ;;oBACVL;oBACAG;;;YAEJM;YACAZ;;;AAGb;AAEA/E,WAAW8H,WAAW,GAAG"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { __InputWrapperProps, BoxProps, Factory, MantineSpacing, StylesApiProps } from '@mantine/core';
|
|
2
2
|
import { ForwardedRef, ReactNode } from 'react';
|
|
3
3
|
import { CustomComponentThemeExtend } from '../../utils/createFactoryComponent.js';
|
|
4
|
-
|
|
4
|
+
import { CollectionColumnDef } from './CollectionColumn.types.js';
|
|
5
|
+
import { CollectionLayout } from './layouts/CollectionLayout.types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Base props shared by both column-based and children-based patterns
|
|
8
|
+
*/
|
|
9
|
+
interface BaseCollectionProps<T> extends __InputWrapperProps, BoxProps, StylesApiProps<CollectionFactory> {
|
|
5
10
|
/**
|
|
6
11
|
* The default value each new item should have
|
|
7
12
|
*/
|
|
8
13
|
newItem: T | (() => T);
|
|
9
|
-
/**
|
|
10
|
-
* A render function called for each item passed in the `value` prop.
|
|
11
|
-
*
|
|
12
|
-
* @param item The current item's value
|
|
13
|
-
* @param index The current item's index
|
|
14
|
-
*/
|
|
15
|
-
children: (item: T, index: number) => ReactNode;
|
|
16
14
|
/**
|
|
17
15
|
* The list of items to display inside the collection
|
|
18
16
|
*
|
|
@@ -92,7 +90,7 @@ export interface CollectionProps<T> extends __InputWrapperProps, BoxProps, Style
|
|
|
92
90
|
*
|
|
93
91
|
* @default "Add item"
|
|
94
92
|
*/
|
|
95
|
-
addLabel?:
|
|
93
|
+
addLabel?: ReactNode;
|
|
96
94
|
/**
|
|
97
95
|
* The tooltip text displayed when hovering over the disabled add item button
|
|
98
96
|
*
|
|
@@ -100,9 +98,9 @@ export interface CollectionProps<T> extends __InputWrapperProps, BoxProps, Style
|
|
|
100
98
|
*/
|
|
101
99
|
addDisabledTooltip?: string;
|
|
102
100
|
/**
|
|
103
|
-
* The gap between the
|
|
101
|
+
* The gap between the collection items
|
|
104
102
|
*
|
|
105
|
-
* @default '
|
|
103
|
+
* @default 'md'
|
|
106
104
|
*/
|
|
107
105
|
gap?: MantineSpacing;
|
|
108
106
|
/**
|
|
@@ -112,7 +110,49 @@ export interface CollectionProps<T> extends __InputWrapperProps, BoxProps, Style
|
|
|
112
110
|
*/
|
|
113
111
|
required?: boolean;
|
|
114
112
|
}
|
|
115
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Collection with column-based layout
|
|
115
|
+
*/
|
|
116
|
+
interface CollectionWithColumns<T> extends BaseCollectionProps<T> {
|
|
117
|
+
/**
|
|
118
|
+
* Column definitions for the collection
|
|
119
|
+
*/
|
|
120
|
+
columns: Array<CollectionColumnDef<T>>;
|
|
121
|
+
/**
|
|
122
|
+
* Layout component to use for rendering
|
|
123
|
+
* @default CollectionLayouts.Horizontal
|
|
124
|
+
*/
|
|
125
|
+
layout?: CollectionLayout;
|
|
126
|
+
/**
|
|
127
|
+
* Must not have children when using columns
|
|
128
|
+
*/
|
|
129
|
+
children?: never;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Collection with legacy children render prop
|
|
133
|
+
*/
|
|
134
|
+
interface CollectionWithChildren<T> extends BaseCollectionProps<T> {
|
|
135
|
+
/**
|
|
136
|
+
* A render function called for each item passed in the `value` prop.
|
|
137
|
+
*
|
|
138
|
+
* @param item The current item's value
|
|
139
|
+
* @param index The current item's index
|
|
140
|
+
*/
|
|
141
|
+
children: (item: T, index: number) => ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Must not have columns when using children
|
|
144
|
+
*/
|
|
145
|
+
columns?: never;
|
|
146
|
+
/**
|
|
147
|
+
* Must not have layout when using children
|
|
148
|
+
*/
|
|
149
|
+
layout?: never;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Collection props - either columns OR children, never both
|
|
153
|
+
*/
|
|
154
|
+
export type CollectionProps<T> = CollectionWithColumns<T> | CollectionWithChildren<T>;
|
|
155
|
+
export type CollectionStylesNames = 'root' | 'item' | 'items' | 'itemDragging' | 'dragHandle' | 'removeButton';
|
|
116
156
|
export type CollectionFactory = Factory<{
|
|
117
157
|
props: CollectionProps<unknown>;
|
|
118
158
|
ref: HTMLDivElement;
|
|
@@ -128,5 +168,28 @@ export declare const Collection: {
|
|
|
128
168
|
ref: HTMLDivElement;
|
|
129
169
|
stylesNames: CollectionStylesNames;
|
|
130
170
|
}>;
|
|
171
|
+
Layouts: {
|
|
172
|
+
readonly Horizontal: {
|
|
173
|
+
({ children }: import("./layouts/shared/layoutConstants.js").LayoutProps): import("react/jsx-runtime.js").JSX.Element;
|
|
174
|
+
Body: <T>(props: import("./layouts/shared/layoutConstants.js").LayoutBodyProps<T> & {
|
|
175
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
176
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
177
|
+
Header: (props: import("./layouts/shared/layoutConstants.js").LayoutHeaderProps & {
|
|
178
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
179
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
180
|
+
displayName: string;
|
|
181
|
+
};
|
|
182
|
+
readonly Vertical: {
|
|
183
|
+
({ children }: import("./layouts/shared/layoutConstants.js").LayoutProps): import("react/jsx-runtime.js").JSX.Element;
|
|
184
|
+
Body: <T>(props: import("./layouts/shared/layoutConstants.js").LayoutBodyProps<T> & {
|
|
185
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
186
|
+
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
187
|
+
Header: (_props: import("./layouts/shared/layoutConstants.js").LayoutHeaderProps & {
|
|
188
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
189
|
+
}) => null;
|
|
190
|
+
displayName: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
131
193
|
};
|
|
194
|
+
export {};
|
|
132
195
|
//# sourceMappingURL=Collection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["../../../../src/components/Collection/Collection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["../../../../src/components/Collection/Collection.tsx"],"names":[],"mappings":"AAGA,OAAO,EACH,mBAAmB,EAEnB,QAAQ,EACR,OAAO,EAEP,cAAc,EAEd,cAAc,EAGjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAC,0BAA0B,EAAW,MAAM,uCAAuC,CAAC;AAG3F,OAAO,EAAC,mBAAmB,EAAC,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAGrE;;GAEG;AACH,UAAU,mBAAmB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,EAAE,QAAQ,EAAE,cAAc,CAAC,iBAAiB,CAAC;IACrG;;OAEG;IACH,OAAO,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACvB;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IACZ;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3D;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAChC;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAA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