@zohodesk/icons 1.3.10 → 1.3.12
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/README.md +9 -0
- package/assets/fonts/zd-gcFonts.svg +2 -0
- package/assets/fonts/zd-gcFonts.woff +0 -0
- package/assets/fonts/zd-gcFonts.woff2 +0 -0
- package/assets/fonts/zd-rGeneral.svg +1 -0
- package/assets/fonts/zd-rGeneral.woff +0 -0
- package/assets/fonts/zd-rGeneral.woff2 +0 -0
- package/assets/fonts/zd-rIM.svg +2 -0
- package/assets/fonts/zd-rIM.woff +0 -0
- package/assets/fonts/zd-rIM.woff2 +0 -0
- package/assets/react/zd-font-rAI.module.css +29 -25
- package/assets/react/zd-font-rAccessibility.module.css +46 -42
- package/assets/react/zd-font-rAnalyticsColor.module.css +199 -195
- package/assets/react/zd-font-rAutomation.module.css +322 -318
- package/assets/react/zd-font-rCallBar.module.css +35 -31
- package/assets/react/zd-font-rChannels.module.css +203 -199
- package/assets/react/zd-font-rCustomize.module.css +132 -128
- package/assets/react/zd-font-rDeveloperSpace.module.css +13 -9
- package/assets/react/zd-font-rExportFiles.module.css +731 -727
- package/assets/react/zd-font-rGeneral.module.css +630 -623
- package/assets/react/zd-font-rIM.module.css +52 -38
- package/assets/react/zd-font-rIntegrations.module.css +211 -207
- package/assets/react/zd-font-rLhs.module.css +380 -376
- package/assets/react/zd-font-rMarketplace.module.css +153 -149
- package/assets/react/zd-font-rReports.module.css +226 -222
- package/assets/react/zd-font-rSetup.module.css +151 -147
- package/assets/react/zd-font-rTickets.module.css +302 -298
- package/assets/react/zd-font-rTopband.module.css +122 -118
- package/assets/react/zd-font-rTwotone.module.css +1270 -1266
- package/assets/react/zd-font-rUpdates.module.css +17 -13
- package/assets/react/zd-font-react-addforms.module.css +439 -435
- package/assets/react/zd-font-react-automate.module.css +43 -39
- package/assets/react/zd-font-react-channels.module.css +433 -429
- package/assets/react/zd-font-react-channels.plain.css +433 -429
- package/assets/react/zd-font-react-common.module.css +771 -767
- package/assets/react/zd-font-react-common.plain.css +771 -767
- package/assets/react/zd-font-react-community.module.css +215 -211
- package/assets/react/zd-font-react-customers.module.css +21 -17
- package/assets/react/zd-font-react-customize.module.css +608 -604
- package/assets/react/zd-font-react-gamescope.module.css +85 -81
- package/assets/react/zd-font-react-gcFonts.module.css +1475 -1462
- package/assets/react/zd-font-react-gettingstarted.module.css +305 -301
- package/assets/react/zd-font-react-integrations.module.css +43 -39
- package/assets/react/zd-font-react-kb.module.css +4419 -4415
- package/assets/react/zd-font-react-logo.module.css +20 -16
- package/assets/react/zd-font-react-organization.module.css +51 -47
- package/assets/react/zd-font-react-organization.plain.css +51 -47
- package/assets/react/zd-font-react-others.module.css +281 -277
- package/assets/react/zd-font-react-reports.module.css +448 -444
- package/assets/react/zd-font-react-setup.module.css +785 -781
- package/assets/react/zd-font-react-setup.plain.css +785 -781
- package/assets/react/zd-font-react-social.module.css +456 -452
- package/assets/react/zd-font-react-ticket-channels.module.css +252 -248
- package/assets/react/zd-font-react-tickets.module.css +884 -880
- package/assets/react/zd-font-react-tickets.plain.css +884 -880
- package/assets/react/zd-font-react-topband.module.css +550 -546
- package/assets/react/zd-font-react-topband.plain.css +550 -546
- package/cbt.config.js +3 -3
- package/es/Context/__tests__/__snapshots__/IconContext.spec.js.snap +12 -12
- package/es/Icon/FontFactory.js +6 -3
- package/es/Icon/FontIcon.js +3 -2
- package/es/Icon/SvgIcon.js +2 -1
- package/es/Icon/__tests__/Icon.spec.js +15 -0
- package/es/Icon/__tests__/__snapshots__/FontIcon.spec.js.snap +22 -22
- package/es/Icon/__tests__/__snapshots__/Icon.spec.js.snap +37876 -0
- package/es/Icon/__tests__/__snapshots__/SvgIcon.spec.js.snap +13 -13
- package/lib/Context/__tests__/__snapshots__/IconContext.spec.js.snap +12 -12
- package/lib/Icon/FontFactory.js +4 -3
- package/lib/Icon/FontIcon.js +4 -2
- package/lib/Icon/SvgIcon.js +3 -1
- package/lib/Icon/__tests__/Icon.spec.js +38 -0
- package/lib/Icon/__tests__/__snapshots__/FontIcon.spec.js.snap +22 -22
- package/lib/Icon/__tests__/__snapshots__/Icon.spec.js.snap +37876 -0
- package/lib/Icon/__tests__/__snapshots__/SvgIcon.spec.js.snap +13 -13
- package/package.json +19 -12
- package/ut.config.js +106 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
3
|
exports[`SvgIcon - rendering the "default" props 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<svg
|
|
6
6
|
aria-hidden="true"
|
|
7
|
-
class="svgIcon
|
|
7
|
+
class="svgIcon"
|
|
8
8
|
data-id="fontIcon"
|
|
9
9
|
data-selector-id="fontIcon"
|
|
10
10
|
data-test-id="fontIcon"
|
|
@@ -20,7 +20,7 @@ exports[`SvgIcon - rendering with "ariaHidden" false 1`] = `
|
|
|
20
20
|
<DocumentFragment>
|
|
21
21
|
<svg
|
|
22
22
|
aria-hidden="false"
|
|
23
|
-
class="svgIcon
|
|
23
|
+
class="svgIcon"
|
|
24
24
|
data-id="fontIcon"
|
|
25
25
|
data-selector-id="fontIcon"
|
|
26
26
|
data-test-id="fontIcon"
|
|
@@ -36,7 +36,7 @@ exports[`SvgIcon - rendering with "iconClass" 1`] = `
|
|
|
36
36
|
<DocumentFragment>
|
|
37
37
|
<svg
|
|
38
38
|
aria-hidden="true"
|
|
39
|
-
class="svgIcon
|
|
39
|
+
class="svgIcon myIconClass"
|
|
40
40
|
data-id="fontIcon"
|
|
41
41
|
data-selector-id="fontIcon"
|
|
42
42
|
data-test-id="fontIcon"
|
|
@@ -52,7 +52,7 @@ exports[`SvgIcon - rendering with "name" and "svgPrefix" 1`] = `
|
|
|
52
52
|
<DocumentFragment>
|
|
53
53
|
<svg
|
|
54
54
|
aria-hidden="true"
|
|
55
|
-
class="svgIcon
|
|
55
|
+
class="svgIcon"
|
|
56
56
|
data-id="fontIcon"
|
|
57
57
|
data-selector-id="fontIcon"
|
|
58
58
|
data-test-id="fontIcon"
|
|
@@ -68,7 +68,7 @@ exports[`SvgIcon - rendering with "size" 1`] = `
|
|
|
68
68
|
<DocumentFragment>
|
|
69
69
|
<svg
|
|
70
70
|
aria-hidden="true"
|
|
71
|
-
class="svgIcon
|
|
71
|
+
class="svgIcon"
|
|
72
72
|
data-id="fontIcon"
|
|
73
73
|
data-selector-id="fontIcon"
|
|
74
74
|
data-test-id="fontIcon"
|
|
@@ -85,7 +85,7 @@ exports[`SvgIcon - rendering with "tagAttributes" 1`] = `
|
|
|
85
85
|
<DocumentFragment>
|
|
86
86
|
<svg
|
|
87
87
|
aria-hidden="true"
|
|
88
|
-
class="svgIcon
|
|
88
|
+
class="svgIcon"
|
|
89
89
|
data-custom-attr="true"
|
|
90
90
|
data-id="fontIcon"
|
|
91
91
|
data-selector-id="fontIcon"
|
|
@@ -102,7 +102,7 @@ exports[`SvgIcon - rendering with "title" 1`] = `
|
|
|
102
102
|
<DocumentFragment>
|
|
103
103
|
<svg
|
|
104
104
|
aria-hidden="true"
|
|
105
|
-
class="svgIcon
|
|
105
|
+
class="svgIcon"
|
|
106
106
|
data-id="fontIcon"
|
|
107
107
|
data-selector-id="fontIcon"
|
|
108
108
|
data-test-id="fontIcon"
|
|
@@ -119,7 +119,7 @@ exports[`SvgIcon - rendering with "titlePosition" - bottom 1`] = `
|
|
|
119
119
|
<DocumentFragment>
|
|
120
120
|
<svg
|
|
121
121
|
aria-hidden="true"
|
|
122
|
-
class="svgIcon
|
|
122
|
+
class="svgIcon"
|
|
123
123
|
data-id="fontIcon"
|
|
124
124
|
data-selector-id="fontIcon"
|
|
125
125
|
data-test-id="fontIcon"
|
|
@@ -136,7 +136,7 @@ exports[`SvgIcon - rendering with "titlePosition" - left 1`] = `
|
|
|
136
136
|
<DocumentFragment>
|
|
137
137
|
<svg
|
|
138
138
|
aria-hidden="true"
|
|
139
|
-
class="svgIcon
|
|
139
|
+
class="svgIcon"
|
|
140
140
|
data-id="fontIcon"
|
|
141
141
|
data-selector-id="fontIcon"
|
|
142
142
|
data-test-id="fontIcon"
|
|
@@ -153,7 +153,7 @@ exports[`SvgIcon - rendering with "titlePosition" - right 1`] = `
|
|
|
153
153
|
<DocumentFragment>
|
|
154
154
|
<svg
|
|
155
155
|
aria-hidden="true"
|
|
156
|
-
class="svgIcon
|
|
156
|
+
class="svgIcon"
|
|
157
157
|
data-id="fontIcon"
|
|
158
158
|
data-selector-id="fontIcon"
|
|
159
159
|
data-test-id="fontIcon"
|
|
@@ -170,7 +170,7 @@ exports[`SvgIcon - rendering with "titlePosition" - top 1`] = `
|
|
|
170
170
|
<DocumentFragment>
|
|
171
171
|
<svg
|
|
172
172
|
aria-hidden="true"
|
|
173
|
-
class="svgIcon
|
|
173
|
+
class="svgIcon"
|
|
174
174
|
data-id="fontIcon"
|
|
175
175
|
data-selector-id="fontIcon"
|
|
176
176
|
data-test-id="fontIcon"
|
|
@@ -187,7 +187,7 @@ exports[`SvgIcon - rendering with external sprite "svgPrefix" 1`] = `
|
|
|
187
187
|
<DocumentFragment>
|
|
188
188
|
<svg
|
|
189
189
|
aria-hidden="true"
|
|
190
|
-
class="svgIcon
|
|
190
|
+
class="svgIcon"
|
|
191
191
|
data-id="fontIcon"
|
|
192
192
|
data-selector-id="fontIcon"
|
|
193
193
|
data-test-id="fontIcon"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/icons",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.12",
|
|
4
4
|
"description": "DOT - Icons",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -18,23 +18,27 @@
|
|
|
18
18
|
"LIBRARY"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"clean": "
|
|
21
|
+
"clean": "cdt clean lib es coverage test-slices assets",
|
|
22
22
|
"build": "npm run build:lib && npm run build:es",
|
|
23
|
-
"build:lib": "cbt build:lib src
|
|
24
|
-
"build:es": "cbt build:es src
|
|
23
|
+
"build:lib": "cbt build:lib src lib",
|
|
24
|
+
"build:es": "cbt build:es src es",
|
|
25
25
|
"build:es:watch": "cbt build:es src es",
|
|
26
26
|
"build:watch": "npm run build:es:watch --module:mode=dev -- -w",
|
|
27
27
|
"init": "npm run clean && cd ../assets && npm run clean && npm install --legacy-peer-deps && npm run iconsassets",
|
|
28
28
|
"init_": "npm run clean && cd ../assets && npm run iconsassets_temp",
|
|
29
|
-
"lint": "react-cli lint",
|
|
30
29
|
"prepare": "npm run init && npm run css:build",
|
|
31
30
|
"prepublishOnly": "node ../prePublish.js && npm run test",
|
|
32
31
|
"postpublish": "node ../postPublish.js",
|
|
33
|
-
"download": "
|
|
32
|
+
"download": "cdt clean ./node_modules ./package-lock.json && npm install --legacy-peer-deps ",
|
|
34
33
|
"expublish": "node ../publish.js -- exp",
|
|
35
34
|
"common_package_build": "cd ../common && npm run build && cd ../components",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
35
|
+
"__test": "ZDTestingFramework unit-test",
|
|
36
|
+
"test:changed": "ZDTestingFramework unit-test --onlyChanged",
|
|
37
|
+
"snap-update": "npm run test-clean && ZDTestingFramework unit-test -u",
|
|
38
|
+
"unit:report": "ZDTestingFramework ut-report",
|
|
39
|
+
"coverage": "ZDTestingFramework unit-test --coverage",
|
|
40
|
+
"customTest": "node ./__testUtils__/runTest.js",
|
|
41
|
+
"test-clean": "cdt clean ./coverage ./test-slices ./unittest ./es ./lib ./package-lock.json ./result.json ",
|
|
38
42
|
"css:layer_config_generate": "npx z-node-plugins css:scan ./src ./assets css_layer_config.json",
|
|
39
43
|
"css:layer_wrap_es": "npx z-node-plugins css:layer_wrap ./es ./assets css_layer_config.json --rewrite=src=es --rewrite=assets=assets --skip-existing-layer",
|
|
40
44
|
"css:layer_wrap_lib": "npx z-node-plugins css:layer_wrap ./lib ./assets css_layer_config.json --rewrite=src=lib --rewrite=assets=assets --skip-existing-layer",
|
|
@@ -59,12 +63,15 @@
|
|
|
59
63
|
"@zohodesk/react-cli": "1.1.27",
|
|
60
64
|
"@zohodesk/client_build_tool": "0.0.23",
|
|
61
65
|
"@zohodesk/jsx_attribute_wrapper": "1.0.0",
|
|
62
|
-
"@dot-system/css-utility": "0.1.
|
|
63
|
-
"@zohodesk/dotkit": "1.0.10"
|
|
66
|
+
"@dot-system/css-utility": "0.1.2",
|
|
67
|
+
"@zohodesk/dotkit": "1.0.10",
|
|
68
|
+
"@zohodesk-private/client_deployment_tool": "0.0.7",
|
|
69
|
+
"@babel/preset-react": "7.29.7",
|
|
70
|
+
"@zohodesk/testinglibrary": "4.1.10"
|
|
64
71
|
},
|
|
65
72
|
"peerDependencies": {
|
|
66
73
|
"@zohodesk/variables": "1.3.2",
|
|
67
|
-
"@dot-system/css-utility": "0.1.
|
|
74
|
+
"@dot-system/css-utility": "0.1.2",
|
|
68
75
|
"@zohodesk/dotkit": "1.0.10"
|
|
69
76
|
}
|
|
70
|
-
}
|
|
77
|
+
}
|
package/ut.config.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
// Notes for future maintainers:
|
|
4
|
+
// - @zohodesk/unit-testing-framework runs `JSON.stringify(config)` before
|
|
5
|
+
// handing this to Jest, so every value here must be JSON-serializable
|
|
6
|
+
// (no functions, no live RegExp objects — patterns are strings).
|
|
7
|
+
// - The framework REPLACES its default config with this file when present
|
|
8
|
+
// (despite the "Merging..." log line in config-loader.js), so this file
|
|
9
|
+
// must be self-contained.
|
|
10
|
+
|
|
11
|
+
// `@zohodesk/unit-testing-framework/package.json` isn't in its exports map,
|
|
12
|
+
// so resolve via the main entry (points to build/index.js) and step up.
|
|
13
|
+
const FRAMEWORK_BUILD = path.dirname(
|
|
14
|
+
require.resolve('@zohodesk/unit-testing-framework')
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
// Pin Jest 30's jsdom env — bare "jsdom" can resolve to Jest 26/27 copies
|
|
18
|
+
// pulled in by react-cli / react-scripts, which crash under Jest 30.
|
|
19
|
+
const JEST_JSDOM_ENV = require.resolve('jest-environment-jsdom', {
|
|
20
|
+
paths: [require.resolve('@zohodesk/unit-testing-framework')]
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
rootDir: __dirname,
|
|
25
|
+
roots: ['<rootDir>/src'],
|
|
26
|
+
|
|
27
|
+
testEnvironment: JEST_JSDOM_ENV,
|
|
28
|
+
|
|
29
|
+
testMatch: [
|
|
30
|
+
'<rootDir>/src/**/__tests__/**/*.(spec|test).[jt]s?(x)',
|
|
31
|
+
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)'
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
testPathIgnorePatterns: [
|
|
35
|
+
'/node_modules/',
|
|
36
|
+
'/build/',
|
|
37
|
+
'/lib/',
|
|
38
|
+
'/es/',
|
|
39
|
+
'/dist/',
|
|
40
|
+
'/coverage/',
|
|
41
|
+
'/unittest/'
|
|
42
|
+
],
|
|
43
|
+
|
|
44
|
+
moduleFileExtensions: ['js', 'jsx', 'mjs', 'cjs', 'json', 'ts', 'tsx', 'node'],
|
|
45
|
+
|
|
46
|
+
transform: {
|
|
47
|
+
// Absolute paths — the framework JSON.stringifies this config before Jest
|
|
48
|
+
// resolves transforms, so bare package names can point at a missing nested
|
|
49
|
+
// copy under unit-testing-framework/node_modules.
|
|
50
|
+
'^.+\\.[jt]sx?$': [
|
|
51
|
+
require.resolve('babel-jest'),
|
|
52
|
+
{
|
|
53
|
+
presets: [
|
|
54
|
+
[require.resolve('@babel/preset-env'), { targets: { node: 'current' } }],
|
|
55
|
+
[require.resolve('@babel/preset-react'), { runtime: 'classic' }]
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
'^.+\\.(svg|png|jpg|jpeg|gif|webp|woff2?|ttf|eot|otf|mp4|webm)$':
|
|
60
|
+
'<rootDir>/__testUtils__/fileTransform.js',
|
|
61
|
+
// Enumerable class-name map (not identity-obj-proxy) — mergeStyle spreads
|
|
62
|
+
// the style object, which yields {} for a non-enumerable Proxy.
|
|
63
|
+
'^.+\\.(css|less|scss|sass)$':
|
|
64
|
+
'<rootDir>/__testUtils__/cssModulesTransform.js'
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// @zohodesk/* and @dot-system/* ship untranspiled ESM in some places, so
|
|
68
|
+
// let babel-jest transform them.
|
|
69
|
+
transformIgnorePatterns: [
|
|
70
|
+
'/node_modules/(?!(@zohodesk|@zohodesk-private|@dot-system)/)'
|
|
71
|
+
],
|
|
72
|
+
|
|
73
|
+
moduleNameMapper: {
|
|
74
|
+
// Prefer the ES build for @zohodesk libraries (mirrors react-cli's libAlias).
|
|
75
|
+
'^@zohodesk/(components|dot|icons|svg|variables|virtualizer|hooks|utils|a11y|layout|dotkit)/lib(.*)$':
|
|
76
|
+
'@zohodesk/$1/es$2'
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
// Injects `jest` on globalThis so tests that don't `import { jest }` from
|
|
80
|
+
// '@jest/globals' still work under the framework's runner. before run
|
|
81
|
+
setupFiles: [
|
|
82
|
+
path.join(FRAMEWORK_BUILD, 'src', 'environment', 'globals-inject.js')
|
|
83
|
+
],
|
|
84
|
+
|
|
85
|
+
// Existing test bootstrap: @testing-library/react configure, ResizeObserver
|
|
86
|
+
// mock, requestAnimationFrame shim, className `cn` wrapper on React.createElement.
|
|
87
|
+
setupFilesAfterEnv: [
|
|
88
|
+
'<rootDir>/__testUtils__/globals.js',
|
|
89
|
+
'@testing-library/jest-dom'
|
|
90
|
+
],
|
|
91
|
+
|
|
92
|
+
clearMocks: true,
|
|
93
|
+
passWithNoTests: true,
|
|
94
|
+
testTimeout: 20000,
|
|
95
|
+
|
|
96
|
+
// Coverage tuning (used only when `--coverage` is passed).
|
|
97
|
+
collectCoverageFrom: [
|
|
98
|
+
'src/**/*.{js,jsx,ts,tsx}',
|
|
99
|
+
'!src/**/__tests__/**',
|
|
100
|
+
'!src/**/*.spec.{js,jsx,ts,tsx}',
|
|
101
|
+
'!src/**/*.test.{js,jsx,ts,tsx}',
|
|
102
|
+
'!src/**/index.js'
|
|
103
|
+
],
|
|
104
|
+
coverageDirectory: 'coverage',
|
|
105
|
+
coverageReporters: ['json', 'json-summary', 'text', 'html']
|
|
106
|
+
};
|