@semcore/flags 3.4.26 → 4.0.0-beta.1

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 (44) hide show
  1. package/CHANGELOG.md +10 -3
  2. package/generate.ts +16 -16
  3. package/lib/cjs/Flags.js +6 -8
  4. package/lib/cjs/Flags.js.map +1 -1
  5. package/lib/cjs/countries.json +0 -18
  6. package/lib/cjs/index.d.js.map +1 -1
  7. package/lib/es6/Flags.js +4 -5
  8. package/lib/es6/Flags.js.map +1 -1
  9. package/lib/es6/countries.json +0 -18
  10. package/lib/es6/index.d.js.map +1 -1
  11. package/lib/sprites/sprite@1x.css +257 -299
  12. package/lib/sprites/sprite@1x.png +0 -0
  13. package/lib/sprites/sprite@2x.css +258 -297
  14. package/lib/sprites/sprite@2x.png +0 -0
  15. package/lib/types/index.d.ts +11 -7
  16. package/libs.d.ts +7 -0
  17. package/package.json +5 -4
  18. package/png/1x/Abkhazia.png +0 -0
  19. package/png/1x/Basque-Country.png +0 -0
  20. package/png/1x/British-Antarctic-Territory.png +0 -0
  21. package/png/1x/Canary-Islands.png +0 -0
  22. package/png/1x/Common-Wealth.png +0 -0
  23. package/png/1x/England.png +0 -0
  24. package/png/1x/Mars.png +0 -0
  25. package/png/1x/NATO.png +0 -0
  26. package/png/1x/Nagorno-Karabakh.png +0 -0
  27. package/png/1x/Northern-Cyprus.png +0 -0
  28. package/png/1x/Scotland.png +0 -0
  29. package/png/1x/Somaliland.png +0 -0
  30. package/png/1x/South-Ossetia.png +0 -0
  31. package/png/1x/Wales.png +0 -0
  32. package/png/2x/Abkhazia.png +0 -0
  33. package/png/2x/Basque-Country.png +0 -0
  34. package/png/2x/British-Antarctic-Territory.png +0 -0
  35. package/png/2x/Canary-Islands.png +0 -0
  36. package/png/2x/Common-Wealth.png +0 -0
  37. package/png/2x/England.png +0 -0
  38. package/png/2x/Mars.png +0 -0
  39. package/png/2x/NATO.png +0 -0
  40. package/png/2x/Nagorno-Karabakh.png +0 -0
  41. package/png/2x/Northern-Cyprus.png +0 -0
  42. package/png/2x/Somaliland.png +0 -0
  43. package/png/2x/South-Ossetia.png +0 -0
  44. package/png/2x/Wales.png +0 -0
Binary file
@@ -1,5 +1,5 @@
1
- import { IBoxProps } from '@semcore/flex-box';
2
- import { ReturnEl } from '@semcore/core';
1
+ import { BoxProps } from '@semcore/flex-box';
2
+ import { UnknownProperties, Intergalactic } from '@semcore/core';
3
3
 
4
4
  export declare const iso2Name: {
5
5
  AF: string;
@@ -1279,6 +1279,7 @@ export declare const iso3iso2: {
1279
1279
  * Northern Cyprus,
1280
1280
  * Northern Ireland,
1281
1281
  * Scotland,
1282
+ * Somaliland,
1282
1283
  * South Ossetia,
1283
1284
  * United Nations,
1284
1285
  * Wales.
@@ -1297,6 +1298,7 @@ export declare const nameWithoutIso: {
1297
1298
  northern_cyprus: string;
1298
1299
  northern_ireland: string;
1299
1300
  scotland: string;
1301
+ somaliland: string;
1300
1302
  south_ossetia: string;
1301
1303
  united_nations: string;
1302
1304
  wales: string;
@@ -1313,6 +1315,7 @@ export declare const nameWithoutIso: {
1313
1315
  NORTHERN_CYPRUS: string;
1314
1316
  NORTHERN_IRELAND: string;
1315
1317
  SCOTLAND: string;
1318
+ SOMALILAND: string;
1316
1319
  SOUTH_OSSETIA: string;
1317
1320
  UNITED_NATIONS: string;
1318
1321
  WALES: string;
@@ -1320,9 +1323,10 @@ export declare const nameWithoutIso: {
1320
1323
 
1321
1324
  type iso2 = keyof typeof iso2Name;
1322
1325
  type iso3 = keyof typeof iso3Name;
1323
- type name = keyof typeof nameWithoutIso;
1324
1326
 
1325
- export interface IFlagsProps extends IBoxProps {
1327
+ /** @deprecated */
1328
+ export interface IFlagsProps extends FlagsProps, UnknownProperties {}
1329
+ export type FlagsProps = BoxProps & {
1326
1330
  /** URL before css file with a sprite
1327
1331
  * @default `//static.semrush.com/ui-kit/flags/${version package}`
1328
1332
  */
@@ -1332,9 +1336,9 @@ export interface IFlagsProps extends IBoxProps {
1332
1336
  /** Country code in three-letter format */
1333
1337
  iso3?: iso3;
1334
1338
  /** Country code in two-letter or three-letter format or country/union of countries without ISO code */
1335
- name?: name | iso2 | iso3;
1336
- }
1339
+ name?: iso2 | iso3;
1340
+ };
1337
1341
 
1338
- declare const Flags: <T>(props: IFlagsProps & T) => ReturnEl;
1342
+ declare const Flags: Intergalactic.Component<'div', FlagsProps>;
1339
1343
 
1340
1344
  export default Flags;
package/libs.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ declare module 'imagemin' {
2
+ const imagemin: any
3
+ export default imagemin;
4
+ }
5
+ declare module 'pngjs' {
6
+ export const PNG: any
7
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/flags",
3
3
  "description": "Semrush Flags Component",
4
- "version": "3.4.26",
4
+ "version": "4.0.0-beta.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,12 +9,12 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/flex-box": "^4",
13
- "@semcore/utils": "^3.15",
12
+ "@semcore/flex-box": "5.0.0-beta.1",
13
+ "@semcore/utils": "4.0.0-beta.1",
14
14
  "classnames": "2.2.6"
15
15
  },
16
16
  "peerDependencies": {
17
- "@semcore/core": "^1.11",
17
+ "@semcore/core": "2.0.0-beta.1",
18
18
  "react": "16.8 - 18",
19
19
  "react-dom": "16.8 - 18"
20
20
  },
@@ -25,6 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@semcore/testing-utils": "1.0.0",
28
+ "@types/classnames": "2.2.6",
28
29
  "@types/react": "18.0.21",
29
30
  "imagemin": "8.0.1",
30
31
  "imagemin-pngquant": "9.0.2",
Binary file
Binary file
Binary file
Binary file
Binary file
package/png/1x/Mars.png DELETED
Binary file
package/png/1x/NATO.png DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/png/1x/Wales.png DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/png/2x/Mars.png DELETED
Binary file
package/png/2x/NATO.png DELETED
Binary file
Binary file
Binary file
Binary file
Binary file
package/png/2x/Wales.png DELETED
Binary file