@veeqo/ui 14.3.0-beta-10 → 14.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.
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.cjs +2 -2
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.js +2 -2
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.js.map +1 -1
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.cjs +5 -2
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.js +5 -2
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.js.map +1 -1
- package/dist/components/DataGrid/types/RowTheme.d.ts +4 -0
- package/package.json +8 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ___$insertStyle = require('../../../../../_virtual/____insertStyle.cjs');
|
|
4
4
|
|
|
5
|
-
___$insertStyle(".
|
|
6
|
-
var styles = {"row":"
|
|
5
|
+
___$insertStyle("._row_1fu2n_1:not(._selected_1fu2n_1)._striped_1fu2n_1:nth-of-type(odd) td, ._row_1fu2n_1:not(._selected_1fu2n_1)._striped_1fu2n_1:nth-of-type(odd) th {\n background-color: var(--colors-neutral-grey-lightest);\n}\n._row_1fu2n_1:not(._selected_1fu2n_1):hover td, ._row_1fu2n_1:not(._selected_1fu2n_1):hover th, ._row_1fu2n_1:not(._selected_1fu2n_1):hover._striped_1fu2n_1 td, ._row_1fu2n_1:not(._selected_1fu2n_1):hover._striped_1fu2n_1 th {\n background-color: #f2f8fc;\n}\n._row_1fu2n_1._selected_1fu2n_1 td, ._row_1fu2n_1._selected_1fu2n_1 th {\n background-color: var(--colors-brand-blue-lightest);\n}\n._row_1fu2n_1 + ._row_1fu2n_1 td, ._row_1fu2n_1 + ._row_1fu2n_1 th {\n border-top: 1px solid var(--colors-neutral-grey-base);\n}\n\n._accentColor_1fu2n_14 > td:first-of-type::before, ._accentColor_1fu2n_14 > th:first-of-type::before {\n content: \"\";\n position: absolute;\n top: var(--sizes-none);\n bottom: var(--sizes-none);\n left: var(--sizes-none);\n width: var(--sizes-1);\n background-color: var(--accent-color);\n}\n\n._backgroundColor_1fu2n_24 > td, ._backgroundColor_1fu2n_24 > th {\n background-color: var(--background-color) !important;\n}");
|
|
6
|
+
var styles = {"row":"_row_1fu2n_1","selected":"_selected_1fu2n_1","striped":"_striped_1fu2n_1","accentColor":"_accentColor_1fu2n_14","backgroundColor":"_backgroundColor_1fu2n_24"};
|
|
7
7
|
|
|
8
8
|
module.exports = styles;
|
|
9
9
|
//# sourceMappingURL=Row.module.scss.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.module.scss.cjs","sources":["../../../../../../src/components/DataGrid/components/Body/Row/Row.module.scss"],"sourcesContent":[".row {\n &:not(.selected) {\n // Striping styles\n &.striped:nth-of-type(odd) {\n td, th {\n background-color: var(--colors-neutral-grey-lightest);\n }\n }\n\n // Hover styles\n &:hover, &:hover.striped {\n td, th {\n background-color: #f2f8fc;\n }\n }\n }\n\n // Selected row cell styles\n &.selected {\n td, th {\n background-color: var(--colors-brand-blue-lightest);\n }\n }\n\n // Row borders\n & + .row {\n td, th {\n border-top: 1px solid var(--colors-neutral-grey-base);\n }\n }\n}\n\n.accentColor {\n & > td:first-of-type,\n & > th:first-of-type {\n &::before {\n content: '';\n\n position: absolute;\n top: var(--sizes-none);\n bottom: var(--sizes-none);\n left: var(--sizes-none);\n width: var(--sizes-1);\n\n background-color: var(--accent-color);\n }\n }\n}\n"],"names":[],"mappings":";;;;AAKQ,eAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"Row.module.scss.cjs","sources":["../../../../../../src/components/DataGrid/components/Body/Row/Row.module.scss"],"sourcesContent":[".row {\n &:not(.selected) {\n // Striping styles\n &.striped:nth-of-type(odd) {\n td, th {\n background-color: var(--colors-neutral-grey-lightest);\n }\n }\n\n // Hover styles\n &:hover, &:hover.striped {\n td, th {\n background-color: #f2f8fc;\n }\n }\n }\n\n // Selected row cell styles\n &.selected {\n td, th {\n background-color: var(--colors-brand-blue-lightest);\n }\n }\n\n // Row borders\n & + .row {\n td, th {\n border-top: 1px solid var(--colors-neutral-grey-base);\n }\n }\n}\n\n.accentColor {\n & > td:first-of-type,\n & > th:first-of-type {\n &::before {\n content: '';\n\n position: absolute;\n top: var(--sizes-none);\n bottom: var(--sizes-none);\n left: var(--sizes-none);\n width: var(--sizes-1);\n\n background-color: var(--accent-color);\n }\n }\n}\n\n.backgroundColor {\n & > td,\n & > th {\n // !important as we need to override striped/hovered/selected colors\n background-color: var(--background-color) !important;\n }\n}\n"],"names":[],"mappings":";;;;AAKQ,eAAA,CAAA,qpCAAA;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import insertStyle from '../../../../../_virtual/____insertStyle.js';
|
|
2
2
|
|
|
3
|
-
insertStyle(".
|
|
4
|
-
var styles = {"row":"
|
|
3
|
+
insertStyle("._row_1fu2n_1:not(._selected_1fu2n_1)._striped_1fu2n_1:nth-of-type(odd) td, ._row_1fu2n_1:not(._selected_1fu2n_1)._striped_1fu2n_1:nth-of-type(odd) th {\n background-color: var(--colors-neutral-grey-lightest);\n}\n._row_1fu2n_1:not(._selected_1fu2n_1):hover td, ._row_1fu2n_1:not(._selected_1fu2n_1):hover th, ._row_1fu2n_1:not(._selected_1fu2n_1):hover._striped_1fu2n_1 td, ._row_1fu2n_1:not(._selected_1fu2n_1):hover._striped_1fu2n_1 th {\n background-color: #f2f8fc;\n}\n._row_1fu2n_1._selected_1fu2n_1 td, ._row_1fu2n_1._selected_1fu2n_1 th {\n background-color: var(--colors-brand-blue-lightest);\n}\n._row_1fu2n_1 + ._row_1fu2n_1 td, ._row_1fu2n_1 + ._row_1fu2n_1 th {\n border-top: 1px solid var(--colors-neutral-grey-base);\n}\n\n._accentColor_1fu2n_14 > td:first-of-type::before, ._accentColor_1fu2n_14 > th:first-of-type::before {\n content: \"\";\n position: absolute;\n top: var(--sizes-none);\n bottom: var(--sizes-none);\n left: var(--sizes-none);\n width: var(--sizes-1);\n background-color: var(--accent-color);\n}\n\n._backgroundColor_1fu2n_24 > td, ._backgroundColor_1fu2n_24 > th {\n background-color: var(--background-color) !important;\n}");
|
|
4
|
+
var styles = {"row":"_row_1fu2n_1","selected":"_selected_1fu2n_1","striped":"_striped_1fu2n_1","accentColor":"_accentColor_1fu2n_14","backgroundColor":"_backgroundColor_1fu2n_24"};
|
|
5
5
|
|
|
6
6
|
export { styles as default };
|
|
7
7
|
//# sourceMappingURL=Row.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.module.scss.js","sources":["../../../../../../src/components/DataGrid/components/Body/Row/Row.module.scss"],"sourcesContent":[".row {\n &:not(.selected) {\n // Striping styles\n &.striped:nth-of-type(odd) {\n td, th {\n background-color: var(--colors-neutral-grey-lightest);\n }\n }\n\n // Hover styles\n &:hover, &:hover.striped {\n td, th {\n background-color: #f2f8fc;\n }\n }\n }\n\n // Selected row cell styles\n &.selected {\n td, th {\n background-color: var(--colors-brand-blue-lightest);\n }\n }\n\n // Row borders\n & + .row {\n td, th {\n border-top: 1px solid var(--colors-neutral-grey-base);\n }\n }\n}\n\n.accentColor {\n & > td:first-of-type,\n & > th:first-of-type {\n &::before {\n content: '';\n\n position: absolute;\n top: var(--sizes-none);\n bottom: var(--sizes-none);\n left: var(--sizes-none);\n width: var(--sizes-1);\n\n background-color: var(--accent-color);\n }\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AAKQA,WAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"Row.module.scss.js","sources":["../../../../../../src/components/DataGrid/components/Body/Row/Row.module.scss"],"sourcesContent":[".row {\n &:not(.selected) {\n // Striping styles\n &.striped:nth-of-type(odd) {\n td, th {\n background-color: var(--colors-neutral-grey-lightest);\n }\n }\n\n // Hover styles\n &:hover, &:hover.striped {\n td, th {\n background-color: #f2f8fc;\n }\n }\n }\n\n // Selected row cell styles\n &.selected {\n td, th {\n background-color: var(--colors-brand-blue-lightest);\n }\n }\n\n // Row borders\n & + .row {\n td, th {\n border-top: 1px solid var(--colors-neutral-grey-base);\n }\n }\n}\n\n.accentColor {\n & > td:first-of-type,\n & > th:first-of-type {\n &::before {\n content: '';\n\n position: absolute;\n top: var(--sizes-none);\n bottom: var(--sizes-none);\n left: var(--sizes-none);\n width: var(--sizes-1);\n\n background-color: var(--accent-color);\n }\n }\n}\n\n.backgroundColor {\n & > td,\n & > th {\n // !important as we need to override striped/hovered/selected colors\n background-color: var(--background-color) !important;\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AAKQA,WAAA,CAAA,qpCAAA;;;;;"}
|
|
@@ -9,13 +9,16 @@ var Row_module = require('../Row.module.scss.cjs');
|
|
|
9
9
|
* Hook to generate theming variables and classes for a given row theme.
|
|
10
10
|
*/
|
|
11
11
|
const useRowTheme = ({ rowTheme }) => {
|
|
12
|
-
if (!(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.accentColor) && !(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.density)) {
|
|
12
|
+
if (!(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.accentColor) && !(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.density) && !(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.backgroundColor)) {
|
|
13
13
|
return {
|
|
14
14
|
themeVars: {},
|
|
15
15
|
themeClasses: undefined,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
const themeClasses = buildClassnames.buildClassnames([
|
|
18
|
+
const themeClasses = buildClassnames.buildClassnames([
|
|
19
|
+
(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.accentColor) ? Row_module.accentColor : undefined,
|
|
20
|
+
(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.backgroundColor) ? Row_module.backgroundColor : undefined,
|
|
21
|
+
]);
|
|
19
22
|
return {
|
|
20
23
|
themeVars: assignCssVars.assignCssVars(rowTheme || {}),
|
|
21
24
|
themeClasses,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRowTheme.cjs","sources":["../../../../../../../src/components/DataGrid/components/Body/Row/hooks/useRowTheme.ts"],"sourcesContent":["import { RowTheme } from '../../../../types';\nimport { buildClassnames, assignCssVars } from '../../../../../../utils';\n\nimport styles from '../Row.module.scss';\n\ntype UseRowThemeProps = {\n rowTheme?: RowTheme;\n};\n\n/**\n * Hook to generate theming variables and classes for a given row theme.\n */\nexport const useRowTheme = ({ rowTheme }: UseRowThemeProps) => {\n if (!rowTheme?.accentColor && !rowTheme?.density) {\n return {\n themeVars: {},\n themeClasses: undefined,\n };\n }\n\n const themeClasses = buildClassnames([rowTheme?.accentColor ? styles.accentColor : undefined]);\n return {\n themeVars: assignCssVars(rowTheme || {}),\n themeClasses,\n };\n};\n"],"names":["buildClassnames","styles","assignCssVars"],"mappings":";;;;;;;AASA;;AAEG;MACU,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAoB,KAAI;
|
|
1
|
+
{"version":3,"file":"useRowTheme.cjs","sources":["../../../../../../../src/components/DataGrid/components/Body/Row/hooks/useRowTheme.ts"],"sourcesContent":["import { RowTheme } from '../../../../types';\nimport { buildClassnames, assignCssVars } from '../../../../../../utils';\n\nimport styles from '../Row.module.scss';\n\ntype UseRowThemeProps = {\n rowTheme?: RowTheme;\n};\n\n/**\n * Hook to generate theming variables and classes for a given row theme.\n */\nexport const useRowTheme = ({ rowTheme }: UseRowThemeProps) => {\n if (!rowTheme?.accentColor && !rowTheme?.density && !rowTheme?.backgroundColor) {\n return {\n themeVars: {},\n themeClasses: undefined,\n };\n }\n\n const themeClasses = buildClassnames([\n rowTheme?.accentColor ? styles.accentColor : undefined,\n rowTheme?.backgroundColor ? styles.backgroundColor : undefined,\n ]);\n return {\n themeVars: assignCssVars(rowTheme || {}),\n themeClasses,\n };\n};\n"],"names":["buildClassnames","styles","assignCssVars"],"mappings":";;;;;;;AASA;;AAEG;MACU,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAoB,KAAI;AAC5D,IAAA,IAAI,EAAC,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,WAAW,CAAA,IAAI,EAAC,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,OAAO,CAAA,IAAI,EAAC,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,eAAe,CAAA,EAAE;QAC9E,OAAO;AACL,YAAA,SAAS,EAAE,EAAE;AACb,YAAA,YAAY,EAAE,SAAS;SACxB;AACF,IAAA;IAED,MAAM,YAAY,GAAGA,+BAAe,CAAC;AACnC,QAAA,CAAA,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,WAAW,IAAGC,UAAM,CAAC,WAAW,GAAG,SAAS;AACtD,QAAA,CAAA,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,eAAe,IAAGA,UAAM,CAAC,eAAe,GAAG,SAAS;AAC/D,KAAA,CAAC;IACF,OAAO;AACL,QAAA,SAAS,EAAEC,2BAAa,CAAC,QAAQ,IAAI,EAAE,CAAC;QACxC,YAAY;KACb;AACH;;;;"}
|
|
@@ -7,13 +7,16 @@ import styles from '../Row.module.scss.js';
|
|
|
7
7
|
* Hook to generate theming variables and classes for a given row theme.
|
|
8
8
|
*/
|
|
9
9
|
const useRowTheme = ({ rowTheme }) => {
|
|
10
|
-
if (!(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.accentColor) && !(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.density)) {
|
|
10
|
+
if (!(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.accentColor) && !(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.density) && !(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.backgroundColor)) {
|
|
11
11
|
return {
|
|
12
12
|
themeVars: {},
|
|
13
13
|
themeClasses: undefined,
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
const themeClasses = buildClassnames([
|
|
16
|
+
const themeClasses = buildClassnames([
|
|
17
|
+
(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.accentColor) ? styles.accentColor : undefined,
|
|
18
|
+
(rowTheme === null || rowTheme === void 0 ? void 0 : rowTheme.backgroundColor) ? styles.backgroundColor : undefined,
|
|
19
|
+
]);
|
|
17
20
|
return {
|
|
18
21
|
themeVars: assignCssVars(rowTheme || {}),
|
|
19
22
|
themeClasses,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRowTheme.js","sources":["../../../../../../../src/components/DataGrid/components/Body/Row/hooks/useRowTheme.ts"],"sourcesContent":["import { RowTheme } from '../../../../types';\nimport { buildClassnames, assignCssVars } from '../../../../../../utils';\n\nimport styles from '../Row.module.scss';\n\ntype UseRowThemeProps = {\n rowTheme?: RowTheme;\n};\n\n/**\n * Hook to generate theming variables and classes for a given row theme.\n */\nexport const useRowTheme = ({ rowTheme }: UseRowThemeProps) => {\n if (!rowTheme?.accentColor && !rowTheme?.density) {\n return {\n themeVars: {},\n themeClasses: undefined,\n };\n }\n\n const themeClasses = buildClassnames([rowTheme?.accentColor ? styles.accentColor : undefined]);\n return {\n themeVars: assignCssVars(rowTheme || {}),\n themeClasses,\n };\n};\n"],"names":[],"mappings":";;;;;AASA;;AAEG;MACU,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAoB,KAAI;
|
|
1
|
+
{"version":3,"file":"useRowTheme.js","sources":["../../../../../../../src/components/DataGrid/components/Body/Row/hooks/useRowTheme.ts"],"sourcesContent":["import { RowTheme } from '../../../../types';\nimport { buildClassnames, assignCssVars } from '../../../../../../utils';\n\nimport styles from '../Row.module.scss';\n\ntype UseRowThemeProps = {\n rowTheme?: RowTheme;\n};\n\n/**\n * Hook to generate theming variables and classes for a given row theme.\n */\nexport const useRowTheme = ({ rowTheme }: UseRowThemeProps) => {\n if (!rowTheme?.accentColor && !rowTheme?.density && !rowTheme?.backgroundColor) {\n return {\n themeVars: {},\n themeClasses: undefined,\n };\n }\n\n const themeClasses = buildClassnames([\n rowTheme?.accentColor ? styles.accentColor : undefined,\n rowTheme?.backgroundColor ? styles.backgroundColor : undefined,\n ]);\n return {\n themeVars: assignCssVars(rowTheme || {}),\n themeClasses,\n };\n};\n"],"names":[],"mappings":";;;;;AASA;;AAEG;MACU,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAoB,KAAI;AAC5D,IAAA,IAAI,EAAC,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,WAAW,CAAA,IAAI,EAAC,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,OAAO,CAAA,IAAI,EAAC,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,eAAe,CAAA,EAAE;QAC9E,OAAO;AACL,YAAA,SAAS,EAAE,EAAE;AACb,YAAA,YAAY,EAAE,SAAS;SACxB;AACF,IAAA;IAED,MAAM,YAAY,GAAG,eAAe,CAAC;AACnC,QAAA,CAAA,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,WAAW,IAAG,MAAM,CAAC,WAAW,GAAG,SAAS;AACtD,QAAA,CAAA,QAAQ,KAAA,IAAA,IAAR,QAAQ,KAAA,MAAA,GAAA,MAAA,GAAR,QAAQ,CAAE,eAAe,IAAG,MAAM,CAAC,eAAe,GAAG,SAAS;AAC/D,KAAA,CAAC;IACF,OAAO;AACL,QAAA,SAAS,EAAE,aAAa,CAAC,QAAQ,IAAI,EAAE,CAAC;QACxC,YAAY;KACb;AACH;;;;"}
|
|
@@ -6,6 +6,10 @@ export type RowTheme = {
|
|
|
6
6
|
* The accent color for the row.
|
|
7
7
|
*/
|
|
8
8
|
accentColor?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The background color for the row.
|
|
11
|
+
*/
|
|
12
|
+
backgroundColor?: string;
|
|
9
13
|
/**
|
|
10
14
|
* The density for the row. Can be a theme density key or a custom CSS value (e.g., '0.75rem').
|
|
11
15
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veeqo/ui",
|
|
3
|
-
"version": "14.3.0
|
|
3
|
+
"version": "14.3.0",
|
|
4
4
|
"description": "New optimised component library for Veeqo.",
|
|
5
5
|
"author": "Robert Wealthall",
|
|
6
6
|
"license": "ISC",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@figma-export/cli": "^6.2.2",
|
|
58
58
|
"@figma-export/output-components-as-svg": "^6.2.2",
|
|
59
59
|
"@figma-export/transform-svg-with-svgo": "^6.2.2",
|
|
60
|
+
"@figma/code-connect": "^1.4.4",
|
|
60
61
|
"@popperjs/core": "^2.11.8",
|
|
61
62
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
62
63
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
@@ -157,6 +158,12 @@
|
|
|
157
158
|
},
|
|
158
159
|
"auto-changelog": {
|
|
159
160
|
"handlebars": "4.7.9"
|
|
161
|
+
},
|
|
162
|
+
"jest-environment-jsdom": {
|
|
163
|
+
"nwsapi": "2.2.7"
|
|
164
|
+
},
|
|
165
|
+
"@figma/code-connect": {
|
|
166
|
+
"typescript": "$typescript"
|
|
160
167
|
}
|
|
161
168
|
}
|
|
162
169
|
}
|