@coveord/plasma-mantine 56.8.1 → 56.10.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 +115 -108
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/InfoToken/InfoToken.d.ts +62 -2
- package/dist/cjs/components/InfoToken/InfoToken.d.ts.map +1 -1
- package/dist/cjs/components/InfoToken/InfoToken.js +5 -0
- package/dist/cjs/components/InfoToken/InfoToken.js.map +1 -1
- package/dist/cjs/components/StatusToken/StatusToken.d.ts +31 -0
- package/dist/cjs/components/StatusToken/StatusToken.d.ts.map +1 -0
- package/dist/cjs/components/StatusToken/StatusToken.js +128 -0
- package/dist/cjs/components/StatusToken/StatusToken.js.map +1 -0
- package/dist/cjs/components/StatusToken/StatusToken.module.css +42 -0
- package/dist/cjs/components/StatusToken/icons/circle.svg +3 -0
- package/dist/cjs/components/StatusToken/icons/info.svg +5 -0
- package/dist/cjs/components/StatusToken/icons/ring.svg +3 -0
- package/dist/cjs/components/StatusToken/icons/square.svg +3 -0
- package/dist/cjs/components/StatusToken/icons/triangle.svg +3 -0
- package/dist/cjs/components/Table/Table.d.ts +2 -12
- package/dist/cjs/components/Table/Table.d.ts.map +1 -1
- package/dist/cjs/components/Table/Table.js +0 -3
- package/dist/cjs/components/Table/Table.js.map +1 -1
- package/dist/cjs/components/Table/table-column/TableActionsColumn.d.ts +15 -0
- package/dist/cjs/components/Table/table-column/TableActionsColumn.d.ts.map +1 -1
- package/dist/cjs/components/Table/table-column/TableActionsColumn.js +14 -1
- package/dist/cjs/components/Table/table-column/TableActionsColumn.js.map +1 -1
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.d.ts +11 -32
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.d.ts.map +1 -1
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.js +101 -97
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.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 +5 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/svg-raw/index.d.js +3 -0
- package/dist/cjs/types/svg-raw/index.d.js.map +1 -0
- package/dist/esm/components/InfoToken/InfoToken.d.ts +62 -2
- package/dist/esm/components/InfoToken/InfoToken.d.ts.map +1 -1
- package/dist/esm/components/InfoToken/InfoToken.js +5 -0
- package/dist/esm/components/InfoToken/InfoToken.js.map +1 -1
- package/dist/esm/components/StatusToken/StatusToken.d.ts +31 -0
- package/dist/esm/components/StatusToken/StatusToken.d.ts.map +1 -0
- package/dist/esm/components/StatusToken/StatusToken.js +103 -0
- package/dist/esm/components/StatusToken/StatusToken.js.map +1 -0
- package/dist/esm/components/StatusToken/StatusToken.module.css +42 -0
- package/dist/esm/components/StatusToken/icons/circle.svg +3 -0
- package/dist/esm/components/StatusToken/icons/info.svg +5 -0
- package/dist/esm/components/StatusToken/icons/ring.svg +3 -0
- package/dist/esm/components/StatusToken/icons/square.svg +3 -0
- package/dist/esm/components/StatusToken/icons/triangle.svg +3 -0
- package/dist/esm/components/Table/Table.d.ts +2 -12
- package/dist/esm/components/Table/Table.d.ts.map +1 -1
- package/dist/esm/components/Table/Table.js +0 -3
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Table/table-column/TableActionsColumn.d.ts +15 -0
- package/dist/esm/components/Table/table-column/TableActionsColumn.d.ts.map +1 -1
- package/dist/esm/components/Table/table-column/TableActionsColumn.js +12 -1
- package/dist/esm/components/Table/table-column/TableActionsColumn.js.map +1 -1
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.d.ts +11 -32
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.d.ts.map +1 -1
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.js +94 -84
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.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 +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/svg-raw/index.d.js +2 -0
- package/dist/esm/types/svg-raw/index.d.js.map +1 -0
- package/package.json +3 -3
- package/src/components/InfoToken/InfoToken.tsx +39 -36
- package/src/components/StatusToken/StatusToken.module.css +42 -0
- package/src/components/StatusToken/StatusToken.tsx +152 -0
- package/src/components/StatusToken/__tests__/StatusToken.component.spec.tsx +28 -0
- package/src/components/StatusToken/icons/circle.svg +3 -0
- package/src/components/StatusToken/icons/info.svg +5 -0
- package/src/components/StatusToken/icons/ring.svg +3 -0
- package/src/components/StatusToken/icons/square.svg +3 -0
- package/src/components/StatusToken/icons/triangle.svg +3 -0
- package/src/components/Table/Table.tsx +4 -9
- package/src/components/Table/__tests__/TableColumnsSelectorHeader.spec.tsx +325 -0
- package/src/components/Table/table-column/TableActionsColumn.tsx +28 -1
- package/src/components/Table/table-columns-selector/TableColumnsSelector.tsx +96 -125
- package/src/index.ts +4 -0
- package/src/types/svg-raw/index.d.ts +4 -0
- package/src/components/Table/__tests__/TableColumnsSelector.spec.tsx +0 -352
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["noop","Pagination","Accordion","ActionIcon","Alert","Badge","Button","Chip","enhanceWithCollectionProps","Header","Menu","Modal","RadioCard","PasswordInput","Select","flexRender","renderTableCell","Table","TableComponentsOrder","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAA4BA,IAAI,QAAO,gBAAgB;AAIvD,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SAAQC,UAAU,QAAO,gBAAgB;AAEzC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AAEvC,cAAc,uBAAuB;AAErC,wBAAwB;AACxB,YAAY;AACZ,SAAQC,SAAS,QAAO,sCAAsC;AAE9D,4CAA4C;AAC5C,SAAQC,UAAU,QAA6B,wCAAwC;AAEvF,iCAAiC;AACjC,SAAQC,KAAK,QAAO,8BAA8B;AAElD,iCAAiC;AACjC,SACIC,KAAK,QAIF,8BAA8B;AAErC,cAAc;AACd,cAAc,wCAAwC;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD;AAE9D,mCAAmC;AACnC,SAAQC,MAAM,QAAyB,gCAAgC;AAGvE,WAAW;AACX,cAAc,4CAA4C;AAE1D,aAAa;AACb,cAAc,sCAAsC;AAEpD,+BAA+B;AAC/B,SAAQC,IAAI,QAAO,4BAA4B;AAE/C,cAAc;AACd,cAAc,wCAAwC;AAEtD,aAAa;AACb,cAAc,wCAAwC;AACtD,SAAQC,0BAA0B,QAAO,wDAAwD;AAEjG,oBAAoB;AACpB,cAAc,kDAAkD;AAEhE,oBAAoB;AACpB,cAAc,kDAAkD;AAChE,cAAc,gEAAgE;AAC9E,cAAc,iEAAiE;AAC/E,cAAc,8DAA8D;AAE5E,yBAAyB;AACzB,cAAc,0DAA0D;AAExE,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,gDAAgD;AAChD,SACIC,MAAM,QAQH,gCAAgC;AAEvC,aAAa;AACb,cAAc,sCAAsC;AAEpD,iBAAiB;AACjB,cAAc,8CAA8C;AAC5D,cAAc,qDAAqD;AAEnE,eAAe;AACf,cAAc,0CAA0C;AAExD,SAAS;AACT,cAAc,4CAA4C;AAE1D,+BAA+B;AAC/B,SAAQC,IAAI,QAA2B,4BAA4B;AAEnE,iCAAiC;AACjC,SAAQC,KAAK,QAA2C,8BAA8B;AACtF,cAAc,oCAAoC;AAElD,SAAS;AACT,cAAc,gCAAgC;AAE9C,yCAAyC;AACzC,SAAQC,SAAS,QAA4B,sCAAsC;AAEnF,wDAAwD;AACxD,SAAQC,aAAa,QAAO,8CAA8C;AAC1E,SAAQC,MAAM,QAAO,gCAAgC;AAErD,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,iCAAiC;AACjC,SAAQC,cAAcC,eAAe,QAAO,wBAAwB;
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Status Token\nexport * from './components/StatusToken/StatusToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {TableActionsColumn} from './components/Table/table-column/TableActionsColumn.js';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["noop","Pagination","Accordion","ActionIcon","Alert","Badge","Button","Chip","enhanceWithCollectionProps","Header","Menu","Modal","RadioCard","PasswordInput","Select","flexRender","renderTableCell","TableActionsColumn","Table","TableComponentsOrder","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAA4BA,IAAI,QAAO,gBAAgB;AAIvD,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SAAQC,UAAU,QAAO,gBAAgB;AAEzC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AAEvC,cAAc,uBAAuB;AAErC,wBAAwB;AACxB,YAAY;AACZ,SAAQC,SAAS,QAAO,sCAAsC;AAE9D,4CAA4C;AAC5C,SAAQC,UAAU,QAA6B,wCAAwC;AAEvF,iCAAiC;AACjC,SAAQC,KAAK,QAAO,8BAA8B;AAElD,iCAAiC;AACjC,SACIC,KAAK,QAIF,8BAA8B;AAErC,cAAc;AACd,cAAc,wCAAwC;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD;AAE9D,mCAAmC;AACnC,SAAQC,MAAM,QAAyB,gCAAgC;AAGvE,WAAW;AACX,cAAc,4CAA4C;AAE1D,aAAa;AACb,cAAc,sCAAsC;AAEpD,+BAA+B;AAC/B,SAAQC,IAAI,QAAO,4BAA4B;AAE/C,cAAc;AACd,cAAc,wCAAwC;AAEtD,aAAa;AACb,cAAc,wCAAwC;AACtD,SAAQC,0BAA0B,QAAO,wDAAwD;AAEjG,oBAAoB;AACpB,cAAc,kDAAkD;AAEhE,oBAAoB;AACpB,cAAc,kDAAkD;AAChE,cAAc,gEAAgE;AAC9E,cAAc,iEAAiE;AAC/E,cAAc,8DAA8D;AAE5E,yBAAyB;AACzB,cAAc,0DAA0D;AAExE,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,gDAAgD;AAChD,SACIC,MAAM,QAQH,gCAAgC;AAEvC,aAAa;AACb,cAAc,sCAAsC;AAEpD,eAAe;AACf,cAAc,0CAA0C;AAExD,iBAAiB;AACjB,cAAc,8CAA8C;AAC5D,cAAc,qDAAqD;AAEnE,eAAe;AACf,cAAc,0CAA0C;AAExD,SAAS;AACT,cAAc,4CAA4C;AAE1D,+BAA+B;AAC/B,SAAQC,IAAI,QAA2B,4BAA4B;AAEnE,iCAAiC;AACjC,SAAQC,KAAK,QAA2C,8BAA8B;AACtF,cAAc,oCAAoC;AAElD,SAAS;AACT,cAAc,gCAAgC;AAE9C,yCAAyC;AACzC,SAAQC,SAAS,QAA4B,sCAAsC;AAEnF,wDAAwD;AACxD,SAAQC,aAAa,QAAO,8CAA8C;AAC1E,SAAQC,MAAM,QAAO,gCAAgC;AAErD,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,iCAAiC;AACjC,SAAQC,cAAcC,eAAe,QAAO,wBAAwB;AACpE,SAAQC,kBAAkB,QAAO,wDAAwD;AAEzF,SAAQC,KAAK,EAAEC,oBAAoB,QAAgC,8BAA8B;AAOjG,SAAQC,eAAe,QAAO,qCAAqC;AACnE,SAAQC,QAAQ,QAA+D,kCAAkC;AACjH,SAAQC,iBAAiB,QAA6D,kCAAkC;AAExH,SAAQtB,IAAI,GAAE;AAEd,QAAQ;AACR,cAAc,wCAAwC;AACtD,cAAc,yBAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/types/svg-raw/index.d.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "56.
|
|
3
|
+
"version": "56.10.0",
|
|
4
4
|
"description": "A Plasma flavoured Mantine theme",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plasma",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"fast-deep-equal": "3.1.3",
|
|
82
82
|
"lodash.defaultsdeep": "4.6.1",
|
|
83
83
|
"monaco-editor": "0.55.1",
|
|
84
|
-
"@coveord/plasma-
|
|
85
|
-
"@coveord/plasma-
|
|
84
|
+
"@coveord/plasma-react-icons": "56.8.1",
|
|
85
|
+
"@coveord/plasma-tokens": "56.8.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@mantine/carousel": "8.3.10",
|
|
@@ -120,53 +120,56 @@ const varsResolver = createVarsResolver<InfoTokenFactory>((_theme, {variant}) =>
|
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
-
export const InfoToken
|
|
124
|
-
(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
);
|
|
123
|
+
export const InfoToken = polymorphicFactory<InfoTokenFactory>((_props, ref) => {
|
|
124
|
+
const props = useProps('InfoToken', defaultProps, _props);
|
|
125
|
+
const {variant, vars, className, style, unstyled, styles, classNames, size, ...others} = props;
|
|
126
|
+
const getStyles = useStyles<InfoTokenFactory>({
|
|
127
|
+
name: 'InfoToken',
|
|
128
|
+
classes,
|
|
129
|
+
className,
|
|
130
|
+
props,
|
|
131
|
+
style,
|
|
132
|
+
styles,
|
|
133
|
+
unstyled,
|
|
134
|
+
vars,
|
|
135
|
+
varsResolver,
|
|
136
|
+
});
|
|
137
|
+
const IconComponent = iconResolver(variant);
|
|
138
|
+
return (
|
|
139
|
+
<Box
|
|
140
|
+
ref={ref}
|
|
141
|
+
variant={variant}
|
|
142
|
+
role="img"
|
|
143
|
+
aria-label={variant}
|
|
144
|
+
size={size}
|
|
145
|
+
{...getStyles('root', {
|
|
146
|
+
className,
|
|
147
|
+
style,
|
|
148
|
+
styles,
|
|
149
|
+
classNames,
|
|
150
|
+
})}
|
|
151
|
+
{...others}
|
|
152
|
+
>
|
|
153
|
+
<IconComponent size={sizeResolver(size)} />
|
|
154
|
+
</Box>
|
|
155
|
+
);
|
|
156
|
+
});
|
|
159
157
|
|
|
160
158
|
const TokenInformation = InfoToken.withProps({
|
|
161
159
|
variant: 'information',
|
|
162
160
|
});
|
|
161
|
+
(TokenInformation as typeof InfoToken).displayName = 'InfoToken.Information';
|
|
163
162
|
const TokenInformationOutline = InfoToken.withProps({
|
|
164
163
|
variant: 'information-outline',
|
|
165
164
|
});
|
|
166
165
|
const TokenAdvice = InfoToken.withProps({variant: 'advice'});
|
|
166
|
+
(TokenAdvice as typeof InfoToken).displayName = 'InfoToken.Advice';
|
|
167
167
|
const TokenWarning = InfoToken.withProps({variant: 'warning'});
|
|
168
|
+
(TokenWarning as typeof InfoToken).displayName = 'InfoToken.Warning';
|
|
168
169
|
const TokenError = InfoToken.withProps({variant: 'error'});
|
|
170
|
+
(TokenError as typeof InfoToken).displayName = 'InfoToken.Error';
|
|
169
171
|
const TokenQuestion = InfoToken.withProps({variant: 'question'});
|
|
172
|
+
(TokenQuestion as typeof InfoToken).displayName = 'InfoToken.Question';
|
|
170
173
|
|
|
171
174
|
InfoToken.Information = TokenInformation;
|
|
172
175
|
InfoToken.InformationOutline = TokenInformationOutline;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
--status-token-color: var(--mantine-primary-color-filled);
|
|
3
|
+
--status-token-size: 12px;
|
|
4
|
+
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
flex-shrink: 0;
|
|
7
|
+
align-items: center;
|
|
8
|
+
width: var(--status-token-size);
|
|
9
|
+
height: var(--status-token-size);
|
|
10
|
+
color: var(--status-token-color);
|
|
11
|
+
|
|
12
|
+
&:where([data-variant='waiting']) {
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
&::before {
|
|
16
|
+
position: absolute;
|
|
17
|
+
z-index: -1;
|
|
18
|
+
background-color: var(--status-token-color);
|
|
19
|
+
border-radius: 100%;
|
|
20
|
+
animation: pulse 1000ms linear infinite;
|
|
21
|
+
content: '';
|
|
22
|
+
inset: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
svg {
|
|
27
|
+
width: var(--status-token-size);
|
|
28
|
+
height: var(--status-token-size);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes pulse {
|
|
33
|
+
0% {
|
|
34
|
+
transform: scale(0);
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
100% {
|
|
39
|
+
transform: scale(2.8);
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
BoxProps,
|
|
4
|
+
createVarsResolver,
|
|
5
|
+
Factory,
|
|
6
|
+
getSize,
|
|
7
|
+
MantineSize,
|
|
8
|
+
MantineTheme,
|
|
9
|
+
polymorphicFactory,
|
|
10
|
+
StylesApiProps,
|
|
11
|
+
useProps,
|
|
12
|
+
useStyles,
|
|
13
|
+
} from '@mantine/core';
|
|
14
|
+
|
|
15
|
+
import Circle from './icons/circle.svg?raw';
|
|
16
|
+
import Ring from './icons/ring.svg?raw';
|
|
17
|
+
import Square from './icons/square.svg?raw';
|
|
18
|
+
import Triangle from './icons/triangle.svg?raw';
|
|
19
|
+
import Info from './icons/info.svg?raw';
|
|
20
|
+
import classes from './StatusToken.module.css';
|
|
21
|
+
|
|
22
|
+
export type StatusTokenFactory = Factory<{
|
|
23
|
+
props: StatusTokenProps;
|
|
24
|
+
defaultRef: HTMLDivElement;
|
|
25
|
+
defaultComponent: 'div';
|
|
26
|
+
stylesNames: StatusTokenComponentStylesNames;
|
|
27
|
+
vars: StatusTokenCssVariables;
|
|
28
|
+
variant: StatusTokenVariant;
|
|
29
|
+
}>;
|
|
30
|
+
export type StatusTokenComponentStylesNames = 'root';
|
|
31
|
+
export type StatusTokenVariant = 'info' | 'success' | 'caution' | 'error' | 'disabled' | 'waiting' | 'edited' | 'new';
|
|
32
|
+
export type StatusTokenSize = Extract<MantineSize, 'sm' | 'lg'>;
|
|
33
|
+
export type StatusTokenCssVariables = {
|
|
34
|
+
root: '--status-token-color' | '--status-token-size';
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export interface StatusTokenProps extends BoxProps, StylesApiProps<StatusTokenFactory> {
|
|
38
|
+
/**
|
|
39
|
+
* The size of the token.
|
|
40
|
+
*
|
|
41
|
+
* @default 'lg'
|
|
42
|
+
*/
|
|
43
|
+
size?: StatusTokenSize;
|
|
44
|
+
/**
|
|
45
|
+
* The variant of the token.
|
|
46
|
+
*
|
|
47
|
+
* @default 'info'
|
|
48
|
+
*/
|
|
49
|
+
variant?: StatusTokenVariant;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const defaultProps: Partial<StatusTokenProps> = {size: 'lg', variant: 'info'};
|
|
53
|
+
|
|
54
|
+
const resolveThemeColorFromVariant = (variant: StatusTokenVariant, theme: MantineTheme): string => {
|
|
55
|
+
switch (variant) {
|
|
56
|
+
case 'success':
|
|
57
|
+
return theme.colors.green[4];
|
|
58
|
+
case 'caution':
|
|
59
|
+
return theme.colors.yellow[4];
|
|
60
|
+
case 'error':
|
|
61
|
+
return theme.colors.red[5];
|
|
62
|
+
case 'disabled':
|
|
63
|
+
case 'waiting':
|
|
64
|
+
return theme.colors.gray[5];
|
|
65
|
+
case 'edited':
|
|
66
|
+
case 'new':
|
|
67
|
+
return 'var(--mantine-primary-color-filled)';
|
|
68
|
+
case 'info':
|
|
69
|
+
return theme.colors.gray[3];
|
|
70
|
+
default:
|
|
71
|
+
return theme.colors.navy[5];
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const resolveSize = (size: StatusTokenSize): number => (size === 'sm' ? 8 : 12);
|
|
75
|
+
|
|
76
|
+
const resolveIconSrcFromVariant = (variant: StatusTokenVariant): string => {
|
|
77
|
+
switch (variant) {
|
|
78
|
+
case 'caution':
|
|
79
|
+
return Triangle;
|
|
80
|
+
case 'error':
|
|
81
|
+
return Square;
|
|
82
|
+
case 'disabled':
|
|
83
|
+
return Ring;
|
|
84
|
+
case 'info':
|
|
85
|
+
return Info;
|
|
86
|
+
case 'success':
|
|
87
|
+
case 'waiting':
|
|
88
|
+
case 'edited':
|
|
89
|
+
case 'new':
|
|
90
|
+
default:
|
|
91
|
+
return Circle;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const varsResolver = createVarsResolver<StatusTokenFactory>((theme, {variant, size}) => {
|
|
96
|
+
const color = resolveThemeColorFromVariant(variant, theme);
|
|
97
|
+
return {
|
|
98
|
+
root: {
|
|
99
|
+
'--status-token-color': color,
|
|
100
|
+
'--status-token-size': getSize(resolveSize(size), 'status-token-size'),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const statusTokenLabels: Record<StatusTokenVariant, string> = {
|
|
106
|
+
info: 'Info',
|
|
107
|
+
success: 'Success',
|
|
108
|
+
caution: 'Caution',
|
|
109
|
+
error: 'Error',
|
|
110
|
+
disabled: 'Disabled',
|
|
111
|
+
waiting: 'Waiting',
|
|
112
|
+
edited: 'Edited',
|
|
113
|
+
new: 'New',
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const StatusToken: ReturnType<typeof polymorphicFactory<StatusTokenFactory>> =
|
|
117
|
+
polymorphicFactory<StatusTokenFactory>((props, ref) => {
|
|
118
|
+
const {variant, vars, size, className, style, unstyled, styles, classNames, ...others} = useProps(
|
|
119
|
+
'StatusToken',
|
|
120
|
+
defaultProps,
|
|
121
|
+
props,
|
|
122
|
+
);
|
|
123
|
+
const getStyles = useStyles<StatusTokenFactory>({
|
|
124
|
+
name: 'StatusToken',
|
|
125
|
+
classes,
|
|
126
|
+
className,
|
|
127
|
+
props,
|
|
128
|
+
style,
|
|
129
|
+
styles,
|
|
130
|
+
unstyled,
|
|
131
|
+
vars,
|
|
132
|
+
varsResolver,
|
|
133
|
+
});
|
|
134
|
+
return (
|
|
135
|
+
<Box
|
|
136
|
+
ref={ref}
|
|
137
|
+
variant={variant}
|
|
138
|
+
role="img"
|
|
139
|
+
aria-label={statusTokenLabels[variant]}
|
|
140
|
+
{...getStyles('root', {
|
|
141
|
+
className,
|
|
142
|
+
style,
|
|
143
|
+
styles,
|
|
144
|
+
classNames,
|
|
145
|
+
})}
|
|
146
|
+
dangerouslySetInnerHTML={{__html: resolveIconSrcFromVariant(variant)}}
|
|
147
|
+
{...others}
|
|
148
|
+
/>
|
|
149
|
+
);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
StatusToken.displayName = 'StatusToken';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {render, screen} from '@test-utils';
|
|
2
|
+
import {StatusToken, type StatusTokenVariant} from '../StatusToken.js';
|
|
3
|
+
|
|
4
|
+
describe('StatusToken', () => {
|
|
5
|
+
it('renders with default props', () => {
|
|
6
|
+
render(<StatusToken data-testid="status-token" />);
|
|
7
|
+
expect(screen.getByTestId('status-token')).toHaveAttribute('data-variant', 'info');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('renders with custom size and variant', () => {
|
|
11
|
+
render(<StatusToken size="sm" data-testid="status-token" variant="success" />);
|
|
12
|
+
expect(screen.getByTestId('status-token')).toHaveAttribute('data-variant', 'success');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it.each<{variant: StatusTokenVariant; expected: string}>([
|
|
16
|
+
{variant: 'info', expected: 'Info'},
|
|
17
|
+
{variant: 'success', expected: 'Success'},
|
|
18
|
+
{variant: 'caution', expected: 'Caution'},
|
|
19
|
+
{variant: 'error', expected: 'Error'},
|
|
20
|
+
{variant: 'disabled', expected: 'Disabled'},
|
|
21
|
+
{variant: 'waiting', expected: 'Waiting'},
|
|
22
|
+
{variant: 'edited', expected: 'Edited'},
|
|
23
|
+
{variant: 'new', expected: 'New'},
|
|
24
|
+
])('is accessible for the $variant variant', ({variant, expected}) => {
|
|
25
|
+
render(<StatusToken variant={variant} />);
|
|
26
|
+
expect(screen.getByRole('img', {name: expected})).toBeVisible();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
d="M6 0.125C9.3138 0.125 12 2.81014 12 6.12263C12.0012 7.69729 11.3829 9.20927 10.2785 10.3321C9.17415 11.455 7.67229 12.0987 6.09721 12.1242C4.52214 12.1497 3.0002 11.555 1.86 10.4685C0.719794 9.38199 0.0527931 7.89082 0.00300007 6.31695L0 6.12263L0.00239997 5.95469C0.0912 2.72017 2.742 0.125 6 0.125ZM6 5.52286H5.4L5.3298 5.52706C5.18397 5.5444 5.04957 5.6146 4.95205 5.72436C4.85453 5.83413 4.80067 5.97583 4.80067 6.12263C4.80067 6.26943 4.85453 6.41113 4.95205 6.52089C5.04957 6.63065 5.18397 6.70085 5.3298 6.71819L5.4 6.72239V8.52168L5.4042 8.59185C5.41999 8.72573 5.48045 8.85038 5.57581 8.9457C5.67117 9.04103 5.79587 9.10145 5.9298 9.11724L6 9.12144H6.6L6.6702 9.11724C6.80413 9.10145 6.92883 9.04103 7.02419 8.9457C7.11955 8.85038 7.18 8.72573 7.1958 8.59185L7.2 8.52168L7.1958 8.45151C7.18146 8.32914 7.12976 8.21416 7.04774 8.1222C6.96573 8.03023 6.85737 7.96575 6.7374 7.93751L6.6702 7.92551L6.6 7.92192V6.12263L6.5958 6.05246C6.58 5.91858 6.51955 5.79392 6.42419 5.6986C6.32883 5.60328 6.20413 5.54285 6.0702 5.52706L6 5.52286ZM6.006 3.72358L5.9298 3.72777C5.78397 3.74511 5.64957 3.81531 5.55205 3.92508C5.45453 4.03484 5.40067 4.17654 5.40067 4.32334C5.40067 4.47014 5.45453 4.61184 5.55205 4.7216C5.64957 4.83136 5.78397 4.90156 5.9298 4.9189L6 4.9231L6.0762 4.9189C6.22203 4.90156 6.35643 4.83136 6.45395 4.7216C6.55147 4.61184 6.60533 4.47014 6.60533 4.32334C6.60533 4.17654 6.55147 4.03484 6.45395 3.92508C6.35643 3.81531 6.22203 3.74511 6.0762 3.72777L6.006 3.72358Z"
|
|
4
|
+
fill="currentColor" />
|
|
5
|
+
</svg>
|
|
@@ -2,10 +2,10 @@ import {Box, Center, Factory, Loader, useProps, useStyles} from '@mantine/core';
|
|
|
2
2
|
import {useClickOutside, useMergedRef} from '@mantine/hooks';
|
|
3
3
|
import {
|
|
4
4
|
ColumnDef,
|
|
5
|
-
Row,
|
|
6
|
-
RowSelectionState,
|
|
7
5
|
defaultColumnSizing,
|
|
8
6
|
getCoreRowModel,
|
|
7
|
+
Row,
|
|
8
|
+
RowSelectionState,
|
|
9
9
|
useReactTable,
|
|
10
10
|
} from '@tanstack/react-table';
|
|
11
11
|
import isEqual from 'fast-deep-equal';
|
|
@@ -16,8 +16,8 @@ import {TableLayout, TableProps} from './Table.types.js';
|
|
|
16
16
|
import {TableProvider} from './TableContext.js';
|
|
17
17
|
import {TableLayouts} from './layouts/TableLayouts.js';
|
|
18
18
|
import {TableActionItem, TableActionItemStylesNames} from './table-actions/TableActionItem.js';
|
|
19
|
-
import {TableHeaderActionsStylesNames} from './table-actions/TableHeaderActions.js';
|
|
20
19
|
import {TableActionsListStylesNames} from './table-actions/TableActionsList.js';
|
|
20
|
+
import {TableHeaderActionsStylesNames} from './table-actions/TableHeaderActions.js';
|
|
21
21
|
import {TableActionsColumn} from './table-column/TableActionsColumn.js';
|
|
22
22
|
import {
|
|
23
23
|
TableAccordionColumn,
|
|
@@ -25,7 +25,6 @@ import {
|
|
|
25
25
|
TableCollapsibleColumnStylesNames,
|
|
26
26
|
} from './table-column/TableCollapsibleColumn.js';
|
|
27
27
|
import {TableSelectableColumn} from './table-column/TableSelectableColumn.js';
|
|
28
|
-
import {TableColumnsSelector, TableColumnsSelectorStylesNames} from './table-columns-selector/TableColumnsSelector.js';
|
|
29
28
|
import {TableDateRangePicker, TableDateRangePickerStylesNames} from './table-date-range-picker/TableDateRangePicker.js';
|
|
30
29
|
import {TableFilter, TableFilterStylesNames} from './table-filter/TableFilter.js';
|
|
31
30
|
import {TableFooter} from './table-footer/TableFooter.js';
|
|
@@ -53,8 +52,7 @@ type TableStylesNames =
|
|
|
53
52
|
| TableHeaderStylesNames
|
|
54
53
|
| TableThStylesNames
|
|
55
54
|
| TableLastUpdatedStylesNames
|
|
56
|
-
| TablePredicateStylesNames
|
|
57
|
-
| TableColumnsSelectorStylesNames;
|
|
55
|
+
| TablePredicateStylesNames;
|
|
58
56
|
|
|
59
57
|
export type PlasmaTableFactory = Factory<{
|
|
60
58
|
props: TableProps<unknown>;
|
|
@@ -65,7 +63,6 @@ export type PlasmaTableFactory = Factory<{
|
|
|
65
63
|
ActionsColumn: typeof TableActionsColumn;
|
|
66
64
|
ActionItem: typeof TableActionItem;
|
|
67
65
|
CollapsibleColumn: typeof TableCollapsibleColumn;
|
|
68
|
-
ColumnsSelector: typeof TableColumnsSelector;
|
|
69
66
|
DateRangePicker: typeof TableDateRangePicker;
|
|
70
67
|
Filter: typeof TableFilter;
|
|
71
68
|
Footer: typeof TableFooter;
|
|
@@ -297,7 +294,6 @@ export const TableComponentsOrder = {
|
|
|
297
294
|
Predicate: 5,
|
|
298
295
|
Filter: 4,
|
|
299
296
|
DateRangePicker: 3,
|
|
300
|
-
ColumnsSelector: 2,
|
|
301
297
|
LayoutControl: 1,
|
|
302
298
|
};
|
|
303
299
|
|
|
@@ -305,7 +301,6 @@ Table.AccordionColumn = TableAccordionColumn;
|
|
|
305
301
|
Table.ActionsColumn = TableActionsColumn;
|
|
306
302
|
Table.ActionItem = TableActionItem;
|
|
307
303
|
Table.CollapsibleColumn = TableCollapsibleColumn;
|
|
308
|
-
Table.ColumnsSelector = TableColumnsSelector;
|
|
309
304
|
Table.DateRangePicker = TableDateRangePicker;
|
|
310
305
|
Table.Filter = TableFilter;
|
|
311
306
|
Table.Footer = TableFooter;
|