@muraldevkit/ui-toolkit 2.2.0 → 2.3.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.
Files changed (36) hide show
  1. package/dist/components/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -1
  2. package/dist/components/button/MrlButton/MrlButton.d.ts +1 -1
  3. package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +1 -1
  4. package/dist/components/index.d.ts +1 -0
  5. package/dist/components/table/MrlSmartTable/MrlSmartTable.d.ts +112 -0
  6. package/dist/components/table/MrlSmartTable/index.d.ts +1 -0
  7. package/dist/components/table/MrlTable/MrlTable.d.ts +17 -0
  8. package/dist/components/table/MrlTable/index.d.ts +1 -0
  9. package/dist/components/table/MrlTableBody/MrlTableBody.d.ts +17 -0
  10. package/dist/components/table/MrlTableBody/index.d.ts +1 -0
  11. package/dist/components/table/MrlTableCell/MrlTableCell.d.ts +17 -0
  12. package/dist/components/table/MrlTableCell/index.d.ts +1 -0
  13. package/dist/components/table/MrlTableColumn/MrlTableColumn.d.ts +17 -0
  14. package/dist/components/table/MrlTableColumn/index.d.ts +1 -0
  15. package/dist/components/table/MrlTableEmptyState/MrlTableEmptyState.d.ts +15 -0
  16. package/dist/components/table/MrlTableEmptyState/index.d.ts +1 -0
  17. package/dist/components/table/MrlTableHeader/MrlTableHeader.d.ts +17 -0
  18. package/dist/components/table/MrlTableHeader/index.d.ts +1 -0
  19. package/dist/components/table/MrlTableRow/MrlTableRow.d.ts +17 -0
  20. package/dist/components/table/MrlTableRow/index.d.ts +1 -0
  21. package/dist/components/table/constants.d.ts +17 -0
  22. package/dist/components/table/fixtures.d.ts +27 -0
  23. package/dist/components/table/index.d.ts +9 -0
  24. package/dist/components/table/utils.d.ts +43 -0
  25. package/dist/index.js +1 -1
  26. package/dist/styles/MrlSmartTable/module.scss +24 -0
  27. package/dist/styles/MrlTable/module.scss +10 -0
  28. package/dist/styles/MrlTableBody/module.scss +8 -0
  29. package/dist/styles/MrlTableCell/module.scss +11 -0
  30. package/dist/styles/MrlTableColumn/module.scss +27 -0
  31. package/dist/styles/MrlTableEmptyState/module.scss +18 -0
  32. package/dist/styles/MrlTableHeader/module.scss +12 -0
  33. package/dist/styles/MrlTableRow/module.scss +18 -0
  34. package/dist/styles/table/global.scss +22 -0
  35. package/dist/styles/table/variables.scss +33 -0
  36. package/package.json +2 -1
@@ -0,0 +1,24 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ // IMPORTANT!
7
+ // Please DO NOT add visual styling to the MrlSmartTable component. As
8
+ // a smart component, it should only compose other existing components and handle
9
+ // data and interactivity concerns. By adding styling unique to the smart component,
10
+ // it tightly couples the composed component to the smart component and makes it
11
+ // much more likely to have styling regressions.
12
+ // IMPORTANT!
13
+
14
+ .MrlSortToggleWrapperButton {
15
+ // Because sorting is performed by clicking the table header, which itself
16
+ // is not meant to be an interactive element, the sort controls are wrapped
17
+ // in a visually hidden button to allow for accessible interaction.
18
+ all: unset;
19
+ cursor: pointer;
20
+
21
+ &:focus {
22
+ outline: revert;
23
+ }
24
+ }
@@ -0,0 +1,10 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '../table.variables.scss';
7
+
8
+ .MrlTable {
9
+ width: 100%;
10
+ }
@@ -0,0 +1,8 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '../table.variables.scss';
7
+
8
+ // .MrlTableBody {}
@@ -0,0 +1,11 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '../table.variables.scss';
7
+ @use '../table.global.scss' as *;
8
+
9
+ .MrlTableCell {
10
+ @include mrl-cell-layout;
11
+ }
@@ -0,0 +1,27 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '../table.variables.scss';
7
+ @use '../table.global.scss' as *;
8
+
9
+ .MrlTableColumn {
10
+ @include mrl-cell-layout;
11
+
12
+ color: var(--mrl-color-text);
13
+ font-size: var(--mrl-type-size-text);
14
+ font-weight: var(--mrl-type-weight-title);
15
+
16
+ &.clickable:hover {
17
+ background-color: var(--mrl-table-column-background-hover);
18
+ cursor: pointer;
19
+ user-select: none;
20
+ }
21
+
22
+ // This ensures alignment of the sort indicator icons in the
23
+ // table header. Please suggest/replace if there are better solutions!
24
+ :global(.MrlSvgContainer.header-sort-indicator) {
25
+ vertical-align: text-top;
26
+ }
27
+ }
@@ -0,0 +1,18 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '../table.variables.scss';
7
+
8
+ .MrlTableEmptyState {
9
+ align-items: center;
10
+ color: var(--mrl-color-text-secondary);
11
+ display: flex;
12
+ font-size: var(--mrl-type-size-text);
13
+ font-weight: var(--mrl-type-weight-text);
14
+ justify-content: center;
15
+ min-height: var(--mrl-table-empty-state-min-height);
16
+ padding-block: var(--mrl-table-empty-state-padding-block);
17
+ padding-inline: var(--mrl-table-empty-state-padding-block);
18
+ }
@@ -0,0 +1,12 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '~@muraldevkit/ds-foundation/src/styles/contextual-variables/z-index' as *;
7
+ @use '../table.variables.scss';
8
+
9
+ .MrlTableHeader {
10
+ background-color: var(--mrl-color-background);
11
+ border-bottom: var(--mrl-table-header-row-border-bottom);
12
+ }
@@ -0,0 +1,18 @@
1
+ ////
2
+ /// Table component styles
3
+ /// @group Table
4
+ ////
5
+
6
+ @use '../table.variables.scss';
7
+
8
+ .MrlTableRow {
9
+ border-bottom: var(--mrl-table-row-border-bottom);
10
+ font-size: var(--mrl-type-size-text-small);
11
+ font-weight: var(--mrl-type-weight-text);
12
+ height: var(--mrl-table-row-height);
13
+ outline: none;
14
+
15
+ &:hover {
16
+ background-color: var(--mrl-table-row-background-hover);
17
+ }
18
+ }
@@ -0,0 +1,22 @@
1
+ ////
2
+ /// Table shared styles
3
+ /// @group Table
4
+ ////
5
+
6
+ /// Shared between MrlTableColumn and MrlTableCell
7
+ /// which are functionally very similar.
8
+ ///
9
+ /// @example @include mrl-cell-layout;
10
+ @mixin mrl-cell-layout {
11
+ height: var(--mrl-table-column-height);
12
+ padding-inline: var(--mrl-table-default-padding-inline);
13
+ text-align: left;
14
+ vertical-align: middle;
15
+
16
+ &:global(.selection) {
17
+ max-width: var(--mrl-table-selection-width);
18
+ padding: unset;
19
+ text-align: center;
20
+ width: var(--mrl-table-selection-width);
21
+ }
22
+ }
@@ -0,0 +1,33 @@
1
+ ////
2
+ /// Table component style variables
3
+ /// @group Table
4
+ ////
5
+
6
+ // Design System Reference:
7
+ // https: //www.figma.com/file/bd6vLvk4eTVGJcxXDaFeHT/DS-Hana-%7C-Core-Library?node-id=24264%3A44378&mode=dev
8
+
9
+ .MrlTable {
10
+ --mrl-table-default-width: calc(100% - 10px);
11
+ --mrl-table-max-width: 1280px;
12
+ --mrl-table-header-row-border-bottom: 2px solid rgba(var(--mrl-gray-30), 1);
13
+ --mrl-table-column-background-hover: var(--mrl-color-background-highlight-hover);
14
+ --mrl-table-column-height: 48px;
15
+ --mrl-table-row-height: 48px;
16
+ --mrl-table-row-border-bottom: 1px solid rgba(var(--mrl-gray-30), 1);
17
+ --mrl-table-row-background-hover: var(--mrl-color-background-highlight-hover);
18
+ --mrl-table-cell-height: 48px;
19
+ --mrl-table-cell-padding-block: 6px;
20
+ --mrl-table-cell-padding-inline: 6px;
21
+ --mrl-table-default-padding-inline: 6px;
22
+ --mrl-table-selection-width: 48px;
23
+ --mrl-table-default-min-width: 198px;
24
+ --mrl-table-status-width: 192px;
25
+ --mrl-table-call-to-action-width: 92px;
26
+ --mrl-table-action-width: 48px;
27
+ }
28
+
29
+ .MrlTableEmptyState {
30
+ --mrl-table-empty-state-padding-block: 64px;
31
+ --mrl-table-empty-state-padding-inline: 48px;
32
+ --mrl-table-empty-state-min-height: 104px;
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muraldevkit/ui-toolkit",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Mural's UI Toolkit",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -56,6 +56,7 @@
56
56
  "@babel/preset-typescript": "7.21.4",
57
57
  "@muraldevkit/ds-foundation": "2.0.2",
58
58
  "@storybook/addon-a11y": "7.0.26",
59
+ "@storybook/addon-docs": "7.0.26",
59
60
  "@storybook/addon-essentials": "7.0.26",
60
61
  "@storybook/addon-interactions": "7.0.26",
61
62
  "@storybook/addon-links": "7.0.26",