@ultraviolet/icons 1.0.0 → 1.0.2

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.
@@ -0,0 +1,62 @@
1
+ import _styled from '@emotion/styled/base';
2
+ import { PRODUCT_ICONS } from './Icons.js';
3
+ import { jsx } from '@emotion/react/jsx-runtime';
4
+
5
+ const SIZES = {
6
+ small: 32,
7
+ medium: 40,
8
+ large: 48,
9
+ xlarge: 64
10
+ };
11
+ const StyledIcon = /*#__PURE__*/_styled('svg', {
12
+ shouldForwardProp: prop => !['variant', 'disabled'].includes(prop),
13
+ target: "euby9wl0"
14
+ })("&{width:", _ref => {
15
+ let {
16
+ size
17
+ } = _ref;
18
+ return `${SIZES[size]}px`;
19
+ }, ";height:", _ref2 => {
20
+ let {
21
+ size
22
+ } = _ref2;
23
+ return `${SIZES[size]}px`;
24
+ }, ";}.fill,.fill>*{fill:", _ref3 => {
25
+ let {
26
+ theme,
27
+ variant,
28
+ disabled
29
+ } = _ref3;
30
+ return `${theme.colors.other.icon.product[variant][disabled ? 'fillDisabled' : 'fill']}`;
31
+ }, ";}.fillStrong,.fillStrong>*{fill:", _ref4 => {
32
+ let {
33
+ theme,
34
+ variant,
35
+ disabled
36
+ } = _ref4;
37
+ return `${theme.colors.other.icon.product[variant][disabled ? 'fillStrongDisabled' : 'fillStrong']}`;
38
+ }, ";}.fillWeak,.fillWeak>*{fill:", _ref5 => {
39
+ let {
40
+ theme,
41
+ variant,
42
+ disabled
43
+ } = _ref5;
44
+ return `${theme.colors.other.icon.product[variant][disabled ? 'fillWeakDisabled' : 'fillWeak']}`;
45
+ }, ";}");
46
+ const ProductIcon = _ref6 => {
47
+ let {
48
+ name,
49
+ variant = 'primary',
50
+ disabled,
51
+ size = 'small'
52
+ } = _ref6;
53
+ return jsx(StyledIcon, {
54
+ variant: variant,
55
+ disabled: disabled,
56
+ size: size,
57
+ viewBox: "0 0 64 64",
58
+ children: PRODUCT_ICONS[name]
59
+ });
60
+ };
61
+
62
+ export { ProductIcon };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { SVGProps } from 'react';
3
3
  import { theme } from '@ultraviolet/ui';
4
+ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
4
5
 
5
6
  type Color = Extract<keyof typeof theme.colors, 'primary' | 'neutral' | 'success' | 'danger' | 'warning' | 'info'>;
6
7
  declare const Icon: react.ForwardRefExoticComponent<{
@@ -12,4 +13,135 @@ declare const Icon: react.ForwardRefExoticComponent<{
12
13
  disabled?: boolean | undefined;
13
14
  } & Pick<SVGProps<SVGSVGElement>, "className" | "cursor" | "stroke" | "strokeWidth"> & react.RefAttributes<SVGSVGElement>>;
14
15
 
15
- export { Icon };
16
+ declare const CATEGORY_ICONS: {
17
+ readonly baremetal: _emotion_react_jsx_runtime.JSX.Element;
18
+ readonly webHosting: _emotion_react_jsx_runtime.JSX.Element;
19
+ readonly vpc: _emotion_react_jsx_runtime.JSX.Element;
20
+ readonly useCase: _emotion_react_jsx_runtime.JSX.Element;
21
+ readonly toolsServices: _emotion_react_jsx_runtime.JSX.Element;
22
+ readonly storage: _emotion_react_jsx_runtime.JSX.Element;
23
+ readonly serverless: _emotion_react_jsx_runtime.JSX.Element;
24
+ readonly security: _emotion_react_jsx_runtime.JSX.Element;
25
+ readonly observability: _emotion_react_jsx_runtime.JSX.Element;
26
+ readonly network: _emotion_react_jsx_runtime.JSX.Element;
27
+ readonly managedServices: _emotion_react_jsx_runtime.JSX.Element;
28
+ readonly iot: _emotion_react_jsx_runtime.JSX.Element;
29
+ readonly documentation: _emotion_react_jsx_runtime.JSX.Element;
30
+ readonly dedicatedServer: _emotion_react_jsx_runtime.JSX.Element;
31
+ readonly datacenter: _emotion_react_jsx_runtime.JSX.Element;
32
+ readonly database: _emotion_react_jsx_runtime.JSX.Element;
33
+ readonly containers: _emotion_react_jsx_runtime.JSX.Element;
34
+ readonly console: _emotion_react_jsx_runtime.JSX.Element;
35
+ readonly compute: _emotion_react_jsx_runtime.JSX.Element;
36
+ readonly billing: _emotion_react_jsx_runtime.JSX.Element;
37
+ readonly ai: _emotion_react_jsx_runtime.JSX.Element;
38
+ readonly labs: _emotion_react_jsx_runtime.JSX.Element;
39
+ readonly devTools: _emotion_react_jsx_runtime.JSX.Element;
40
+ };
41
+
42
+ type CategoryIconProps = {
43
+ name: keyof typeof CATEGORY_ICONS;
44
+ };
45
+ declare const CategoryIcon: ({ name }: CategoryIconProps) => _emotion_react_jsx_runtime.JSX.Element;
46
+
47
+ declare const PRODUCT_ICONS: {
48
+ readonly macMiniM2: _emotion_react_jsx_runtime.JSX.Element;
49
+ readonly appleSilicon: _emotion_react_jsx_runtime.JSX.Element;
50
+ readonly ipFailover: _emotion_react_jsx_runtime.JSX.Element;
51
+ readonly elasticMetal: _emotion_react_jsx_runtime.JSX.Element;
52
+ readonly dedicatedServer: _emotion_react_jsx_runtime.JSX.Element;
53
+ readonly volume: _emotion_react_jsx_runtime.JSX.Element;
54
+ readonly snapshots: _emotion_react_jsx_runtime.JSX.Element;
55
+ readonly securityGroup: _emotion_react_jsx_runtime.JSX.Element;
56
+ readonly placementGroup: _emotion_react_jsx_runtime.JSX.Element;
57
+ readonly instance: _emotion_react_jsx_runtime.JSX.Element;
58
+ readonly instanceGpu: _emotion_react_jsx_runtime.JSX.Element;
59
+ readonly instanceEnterprise: _emotion_react_jsx_runtime.JSX.Element;
60
+ readonly images: _emotion_react_jsx_runtime.JSX.Element;
61
+ readonly flexibleIp: _emotion_react_jsx_runtime.JSX.Element;
62
+ readonly dedibox: _emotion_react_jsx_runtime.JSX.Element;
63
+ readonly blockStorage: _emotion_react_jsx_runtime.JSX.Element;
64
+ readonly pool: _emotion_react_jsx_runtime.JSX.Element;
65
+ readonly k8sKosmos: _emotion_react_jsx_runtime.JSX.Element;
66
+ readonly kubernetes: _emotion_react_jsx_runtime.JSX.Element;
67
+ readonly registry: _emotion_react_jsx_runtime.JSX.Element;
68
+ readonly applicationLibrary: _emotion_react_jsx_runtime.JSX.Element;
69
+ readonly verifyCard: _emotion_react_jsx_runtime.JSX.Element;
70
+ readonly tutorial: _emotion_react_jsx_runtime.JSX.Element;
71
+ readonly terraform: _emotion_react_jsx_runtime.JSX.Element;
72
+ readonly smtp: _emotion_react_jsx_runtime.JSX.Element;
73
+ readonly sms: _emotion_react_jsx_runtime.JSX.Element;
74
+ readonly sepa: _emotion_react_jsx_runtime.JSX.Element;
75
+ readonly documentation: _emotion_react_jsx_runtime.JSX.Element;
76
+ readonly console: _emotion_react_jsx_runtime.JSX.Element;
77
+ readonly cli: _emotion_react_jsx_runtime.JSX.Element;
78
+ readonly changelog: _emotion_react_jsx_runtime.JSX.Element;
79
+ readonly cb: _emotion_react_jsx_runtime.JSX.Element;
80
+ readonly billing: _emotion_react_jsx_runtime.JSX.Element;
81
+ readonly advancedSettings: _emotion_react_jsx_runtime.JSX.Element;
82
+ readonly user: _emotion_react_jsx_runtime.JSX.Element;
83
+ readonly policy: _emotion_react_jsx_runtime.JSX.Element;
84
+ readonly multiUser: _emotion_react_jsx_runtime.JSX.Element;
85
+ readonly iam: _emotion_react_jsx_runtime.JSX.Element;
86
+ readonly application: _emotion_react_jsx_runtime.JSX.Element;
87
+ readonly redis: _emotion_react_jsx_runtime.JSX.Element;
88
+ readonly postgreSqlAndMySql: _emotion_react_jsx_runtime.JSX.Element;
89
+ readonly rdb: _emotion_react_jsx_runtime.JSX.Element;
90
+ readonly ipfs: _emotion_react_jsx_runtime.JSX.Element;
91
+ readonly webhosting: _emotion_react_jsx_runtime.JSX.Element;
92
+ readonly transactionalEmail: _emotion_react_jsx_runtime.JSX.Element;
93
+ readonly iot: _emotion_react_jsx_runtime.JSX.Element;
94
+ readonly iotEdge: _emotion_react_jsx_runtime.JSX.Element;
95
+ readonly hubNetworks: _emotion_react_jsx_runtime.JSX.Element;
96
+ readonly hubRoutes: _emotion_react_jsx_runtime.JSX.Element;
97
+ readonly devices: _emotion_react_jsx_runtime.JSX.Element;
98
+ readonly apiGateway: _emotion_react_jsx_runtime.JSX.Element;
99
+ readonly zone: _emotion_react_jsx_runtime.JSX.Element;
100
+ readonly vpc: _emotion_react_jsx_runtime.JSX.Element;
101
+ readonly sslCertificates: _emotion_react_jsx_runtime.JSX.Element;
102
+ readonly publicGateway: _emotion_react_jsx_runtime.JSX.Element;
103
+ readonly privateNetwork: _emotion_react_jsx_runtime.JSX.Element;
104
+ readonly lb: _emotion_react_jsx_runtime.JSX.Element;
105
+ readonly frontends: _emotion_react_jsx_runtime.JSX.Element;
106
+ readonly domains: _emotion_react_jsx_runtime.JSX.Element;
107
+ readonly dns: _emotion_react_jsx_runtime.JSX.Element;
108
+ readonly directConnect: _emotion_react_jsx_runtime.JSX.Element;
109
+ readonly cdn: _emotion_react_jsx_runtime.JSX.Element;
110
+ readonly backends: _emotion_react_jsx_runtime.JSX.Element;
111
+ readonly cockpit: _emotion_react_jsx_runtime.JSX.Element;
112
+ readonly functions: _emotion_react_jsx_runtime.JSX.Element;
113
+ readonly containers: _emotion_react_jsx_runtime.JSX.Element;
114
+ readonly messaging: _emotion_react_jsx_runtime.JSX.Element;
115
+ readonly queueing: _emotion_react_jsx_runtime.JSX.Element;
116
+ readonly objectStorage: _emotion_react_jsx_runtime.JSX.Element;
117
+ readonly support: _emotion_react_jsx_runtime.JSX.Element;
118
+ readonly silverSupport: _emotion_react_jsx_runtime.JSX.Element;
119
+ readonly platinumSupport: _emotion_react_jsx_runtime.JSX.Element;
120
+ readonly goldSupport: _emotion_react_jsx_runtime.JSX.Element;
121
+ readonly basicSupport: _emotion_react_jsx_runtime.JSX.Element;
122
+ readonly abuse: _emotion_react_jsx_runtime.JSX.Element;
123
+ readonly secretManager: _emotion_react_jsx_runtime.JSX.Element;
124
+ readonly lifeCycleRules: _emotion_react_jsx_runtime.JSX.Element;
125
+ readonly packer: _emotion_react_jsx_runtime.JSX.Element;
126
+ readonly serverlessJobs: _emotion_react_jsx_runtime.JSX.Element;
127
+ readonly server: _emotion_react_jsx_runtime.JSX.Element;
128
+ readonly serverlessDB: _emotion_react_jsx_runtime.JSX.Element;
129
+ readonly SqsSns: _emotion_react_jsx_runtime.JSX.Element;
130
+ };
131
+
132
+ type Variants = 'primary' | 'danger' | 'warning';
133
+ declare const SIZES: {
134
+ small: number;
135
+ medium: number;
136
+ large: number;
137
+ xlarge: number;
138
+ };
139
+ type ProductIconProps = {
140
+ name: keyof typeof PRODUCT_ICONS;
141
+ variant?: Variants;
142
+ disabled?: boolean;
143
+ size?: keyof typeof SIZES;
144
+ };
145
+ declare const ProductIcon: ({ name, variant, disabled, size, }: ProductIconProps) => _emotion_react_jsx_runtime.JSX.Element;
146
+
147
+ export { CategoryIcon, Icon, ProductIcon };
package/dist/index.js CHANGED
@@ -1 +1,3 @@
1
1
  export { Icon } from './components/Icon/index.js';
2
+ export { CategoryIcon } from './components/CategoryIcon/index.js';
3
+ export { ProductIcon } from './components/ProductIcon/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/icons",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Ultraviolet Icons",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {