@salt-ds/countries 0.0.0-snapshot-20230516135848 → 0.0.0-snapshot-20230705144029
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.
|
@@ -20,9 +20,9 @@ const CountrySymbol = react.forwardRef(
|
|
|
20
20
|
style: styleProp,
|
|
21
21
|
...rest
|
|
22
22
|
}, ref) {
|
|
23
|
-
const
|
|
23
|
+
const targetWindow = window.useWindow();
|
|
24
24
|
styles.useComponentCssInjection({
|
|
25
|
-
|
|
25
|
+
testId: "salt-country-symbol",
|
|
26
26
|
css: CountrySymbol$1,
|
|
27
27
|
window: targetWindow
|
|
28
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CountrySymbol.js","sources":["../src/country-symbol/CountrySymbol.tsx"],"sourcesContent":["import { forwardRef, SVGAttributes } from \"react\";\nimport { clsx } from \"clsx\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport countrySymbolCss from \"./CountrySymbol.css\";\n// Duplicate from core/util to avoid circular dependency\nexport const makePrefixer =\n (prefix: string): ((...names: string[]) => string) =>\n (...names: string[]): string =>\n [prefix, ...names].join(\"-\");\n\nconst withBaseName = makePrefixer(\"saltCountrySymbol\");\n\nexport interface CountrySymbolProps extends SVGAttributes<SVGSVGElement> {\n /**\n * Multiplier for the base Country Symbol size. Should be a positive integer to conform to the rest of the design system.\n */\n size?: number;\n}\n\nexport const DEFAULT_COUNTRY_SYMBOL_SIZE = 1;\n\nexport const CountrySymbol = forwardRef<SVGSVGElement, CountrySymbolProps>(\n function CountrySymbol(\n {\n children,\n className,\n size = DEFAULT_COUNTRY_SYMBOL_SIZE,\n style: styleProp,\n ...rest\n },\n ref\n ) {\n const
|
|
1
|
+
{"version":3,"file":"CountrySymbol.js","sources":["../src/country-symbol/CountrySymbol.tsx"],"sourcesContent":["import { forwardRef, SVGAttributes } from \"react\";\nimport { clsx } from \"clsx\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport countrySymbolCss from \"./CountrySymbol.css\";\n// Duplicate from core/util to avoid circular dependency\nexport const makePrefixer =\n (prefix: string): ((...names: string[]) => string) =>\n (...names: string[]): string =>\n [prefix, ...names].join(\"-\");\n\nconst withBaseName = makePrefixer(\"saltCountrySymbol\");\n\nexport interface CountrySymbolProps extends SVGAttributes<SVGSVGElement> {\n /**\n * Multiplier for the base Country Symbol size. Should be a positive integer to conform to the rest of the design system.\n */\n size?: number;\n}\n\nexport const DEFAULT_COUNTRY_SYMBOL_SIZE = 1;\n\nexport const CountrySymbol = forwardRef<SVGSVGElement, CountrySymbolProps>(\n function CountrySymbol(\n {\n children,\n className,\n size = DEFAULT_COUNTRY_SYMBOL_SIZE,\n style: styleProp,\n ...rest\n },\n ref\n ) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-country-symbol\",\n css: countrySymbolCss,\n window: targetWindow,\n });\n\n const style = {\n ...styleProp,\n \"--saltCountrySymbol-size-multiplier\": `${size}`,\n };\n\n return (\n <svg\n className={clsx(withBaseName(), className)}\n style={style}\n role=\"img\"\n {...rest}\n ref={ref}\n >\n <g aria-hidden>{children}</g>\n </svg>\n );\n }\n);\n"],"names":["forwardRef","CountrySymbol","useWindow","useComponentCssInjection","countrySymbolCss","jsx","clsx"],"mappings":";;;;;;;;;;;AAQa,MAAA,YAAA,GACX,CAAC,MAAA,KACD,CAAI,GAAA,KAAA,KACF,CAAC,MAAA,EAAQ,GAAG,KAAK,CAAE,CAAA,IAAA,CAAK,GAAG,EAAA;AAE/B,MAAM,YAAA,GAAe,aAAa,mBAAmB,CAAA,CAAA;AAS9C,MAAM,2BAA8B,GAAA,EAAA;AAEpC,MAAM,aAAgB,GAAAA,gBAAA;AAAA,EAC3B,SAASC,cACP,CAAA;AAAA,IACE,QAAA;AAAA,IACA,SAAA;AAAA,IACA,IAAO,GAAA,2BAAA;AAAA,IACP,KAAO,EAAA,SAAA;AAAA,IACJ,GAAA,IAAA;AAAA,KAEL,GACA,EAAA;AACA,IAAA,MAAM,eAAeC,gBAAU,EAAA,CAAA;AAC/B,IAAyBC,+BAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,qBAAA;AAAA,MACR,GAAK,EAAAC,eAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,MAAM,KAAQ,GAAA;AAAA,MACZ,GAAG,SAAA;AAAA,MACH,uCAAuC,CAAG,EAAA,IAAA,CAAA,CAAA;AAAA,KAC5C,CAAA;AAEA,IAAA,uBACGC,cAAA,CAAA,KAAA,EAAA;AAAA,MACC,SAAW,EAAAC,SAAA,CAAK,YAAa,EAAA,EAAG,SAAS,CAAA;AAAA,MACzC,KAAA;AAAA,MACA,IAAK,EAAA,KAAA;AAAA,MACJ,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MAEA,QAAC,kBAAAD,cAAA,CAAA,GAAA,EAAA;AAAA,QAAE,aAAW,EAAA,IAAA;AAAA,QAAE,QAAA;AAAA,OAAS,CAAA;AAAA,KAC3B,CAAA,CAAA;AAAA,GAEJ;AACF;;;;;;"}
|
|
@@ -16,9 +16,9 @@ const CountrySymbol = forwardRef(
|
|
|
16
16
|
style: styleProp,
|
|
17
17
|
...rest
|
|
18
18
|
}, ref) {
|
|
19
|
-
const
|
|
19
|
+
const targetWindow = useWindow();
|
|
20
20
|
useComponentCssInjection({
|
|
21
|
-
|
|
21
|
+
testId: "salt-country-symbol",
|
|
22
22
|
css: css_248z,
|
|
23
23
|
window: targetWindow
|
|
24
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CountrySymbol.js","sources":["../src/country-symbol/CountrySymbol.tsx"],"sourcesContent":["import { forwardRef, SVGAttributes } from \"react\";\nimport { clsx } from \"clsx\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport countrySymbolCss from \"./CountrySymbol.css\";\n// Duplicate from core/util to avoid circular dependency\nexport const makePrefixer =\n (prefix: string): ((...names: string[]) => string) =>\n (...names: string[]): string =>\n [prefix, ...names].join(\"-\");\n\nconst withBaseName = makePrefixer(\"saltCountrySymbol\");\n\nexport interface CountrySymbolProps extends SVGAttributes<SVGSVGElement> {\n /**\n * Multiplier for the base Country Symbol size. Should be a positive integer to conform to the rest of the design system.\n */\n size?: number;\n}\n\nexport const DEFAULT_COUNTRY_SYMBOL_SIZE = 1;\n\nexport const CountrySymbol = forwardRef<SVGSVGElement, CountrySymbolProps>(\n function CountrySymbol(\n {\n children,\n className,\n size = DEFAULT_COUNTRY_SYMBOL_SIZE,\n style: styleProp,\n ...rest\n },\n ref\n ) {\n const
|
|
1
|
+
{"version":3,"file":"CountrySymbol.js","sources":["../src/country-symbol/CountrySymbol.tsx"],"sourcesContent":["import { forwardRef, SVGAttributes } from \"react\";\nimport { clsx } from \"clsx\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport countrySymbolCss from \"./CountrySymbol.css\";\n// Duplicate from core/util to avoid circular dependency\nexport const makePrefixer =\n (prefix: string): ((...names: string[]) => string) =>\n (...names: string[]): string =>\n [prefix, ...names].join(\"-\");\n\nconst withBaseName = makePrefixer(\"saltCountrySymbol\");\n\nexport interface CountrySymbolProps extends SVGAttributes<SVGSVGElement> {\n /**\n * Multiplier for the base Country Symbol size. Should be a positive integer to conform to the rest of the design system.\n */\n size?: number;\n}\n\nexport const DEFAULT_COUNTRY_SYMBOL_SIZE = 1;\n\nexport const CountrySymbol = forwardRef<SVGSVGElement, CountrySymbolProps>(\n function CountrySymbol(\n {\n children,\n className,\n size = DEFAULT_COUNTRY_SYMBOL_SIZE,\n style: styleProp,\n ...rest\n },\n ref\n ) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-country-symbol\",\n css: countrySymbolCss,\n window: targetWindow,\n });\n\n const style = {\n ...styleProp,\n \"--saltCountrySymbol-size-multiplier\": `${size}`,\n };\n\n return (\n <svg\n className={clsx(withBaseName(), className)}\n style={style}\n role=\"img\"\n {...rest}\n ref={ref}\n >\n <g aria-hidden>{children}</g>\n </svg>\n );\n }\n);\n"],"names":["CountrySymbol","countrySymbolCss"],"mappings":";;;;;;;AAQa,MAAA,YAAA,GACX,CAAC,MAAA,KACD,CAAI,GAAA,KAAA,KACF,CAAC,MAAA,EAAQ,GAAG,KAAK,CAAE,CAAA,IAAA,CAAK,GAAG,EAAA;AAE/B,MAAM,YAAA,GAAe,aAAa,mBAAmB,CAAA,CAAA;AAS9C,MAAM,2BAA8B,GAAA,EAAA;AAEpC,MAAM,aAAgB,GAAA,UAAA;AAAA,EAC3B,SAASA,cACP,CAAA;AAAA,IACE,QAAA;AAAA,IACA,SAAA;AAAA,IACA,IAAO,GAAA,2BAAA;AAAA,IACP,KAAO,EAAA,SAAA;AAAA,IACJ,GAAA,IAAA;AAAA,KAEL,GACA,EAAA;AACA,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,qBAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,MAAM,KAAQ,GAAA;AAAA,MACZ,GAAG,SAAA;AAAA,MACH,uCAAuC,CAAG,EAAA,IAAA,CAAA,CAAA;AAAA,KAC5C,CAAA;AAEA,IAAA,uBACG,GAAA,CAAA,KAAA,EAAA;AAAA,MACC,SAAW,EAAA,IAAA,CAAK,YAAa,EAAA,EAAG,SAAS,CAAA;AAAA,MACzC,KAAA;AAAA,MACA,IAAK,EAAA,KAAA;AAAA,MACJ,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MAEA,QAAC,kBAAA,GAAA,CAAA,GAAA,EAAA;AAAA,QAAE,aAAW,EAAA,IAAA;AAAA,QAAE,QAAA;AAAA,OAAS,CAAA;AAAA,KAC3B,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salt-ds/countries",
|
|
3
|
-
"version": "0.0.0-snapshot-
|
|
3
|
+
"version": "0.0.0-snapshot-20230705144029",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist-cjs/index.js",
|
|
6
6
|
"modular": {
|
|
7
7
|
"type": "package"
|
|
8
8
|
},
|
|
9
|
-
"sideEffects":
|
|
10
|
-
"**/*.css",
|
|
11
|
-
"**/*.css.js"
|
|
12
|
-
],
|
|
9
|
+
"sideEffects": false,
|
|
13
10
|
"scripts": {
|
|
14
11
|
"build": "yarn clean && node ./scripts/generateCountrySymbol.mjs '*.svg'",
|
|
15
12
|
"clean": "rimraf ./src/components"
|
|
@@ -31,14 +28,15 @@
|
|
|
31
28
|
"svgo": "^3.0.0"
|
|
32
29
|
},
|
|
33
30
|
"publishConfig": {
|
|
34
|
-
"directory": "../../dist/salt-ds-countries"
|
|
31
|
+
"directory": "../../dist/salt-ds-countries",
|
|
32
|
+
"provenance": true
|
|
35
33
|
},
|
|
36
34
|
"module": "dist-es/index.js",
|
|
37
35
|
"typings": "dist-types/index.d.ts",
|
|
38
36
|
"dependencies": {
|
|
39
37
|
"clsx": "^1.2.1",
|
|
40
|
-
"@salt-ds/window": "0.0.0-snapshot-
|
|
41
|
-
"@salt-ds/styles": "0.0.0-snapshot-
|
|
38
|
+
"@salt-ds/window": "^0.0.0-snapshot-20230705144029",
|
|
39
|
+
"@salt-ds/styles": "^0.0.0-snapshot-20230705144029"
|
|
42
40
|
},
|
|
43
41
|
"files": [
|
|
44
42
|
"dist-cjs",
|