@ultraviolet/icons 2.0.1 → 2.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultraviolet Icons
2
2
 
3
- [![npm version](https://badge.fury.io/js/%40scaleway%2Ficons.svg)](https://badge.fury.io/js/%40scaleway%2Ficons)
3
+ [![npm version](https://badge.fury.io/js/%40ultraviolet%2Ficons.svg)](https://badge.fury.io/js/%40ultraviolet%2Ficons)
4
4
 
5
5
  Ultraviolet Icons is a set of SVG icons and components related to icons.
6
6
 
@@ -15,6 +15,10 @@ const StyledIcon = /*#__PURE__*/_styled("svg", {
15
15
  } = _ref2;
16
16
  return theme.colors.other.icon.category.primary.fillStrong;
17
17
  }, ";}");
18
+ /**
19
+ * CategoryIcon component is used to render category icons, those icons are more complex than system icons
20
+ * as they involve multiple colors that changes depending on theme.
21
+ */
18
22
  const CategoryIcon = _ref3 => {
19
23
  let {
20
24
  name
@@ -353,6 +353,9 @@ const StyledIcon = /*#__PURE__*/_styled('svg', {
353
353
  const icon = `icon${definedProminence}${disabled ? 'Disabled' : ''}`;
354
354
  return theme.colors?.[color]?.[icon] || color;
355
355
  }, ";", sizeStyles, ";");
356
+ /**
357
+ * Icon component is our set of system icons in the design system. All of them are SVGs.
358
+ */
356
359
  const Icon = /*#__PURE__*/forwardRef((_ref3, ref) => {
357
360
  let {
358
361
  name = 'alert',
@@ -43,6 +43,11 @@ const StyledIcon = /*#__PURE__*/_styled('svg', {
43
43
  } = _ref5;
44
44
  return `${theme.colors.other.icon.product[variant][disabled ? 'fillWeakDisabled' : 'fillWeak']}`;
45
45
  }, ";}");
46
+
47
+ /**
48
+ * ProductIcon component is used to render a set of icons that are linked to a product or service.
49
+ * Those icons are made of multiple colors that changes automatically based on the current theme.
50
+ */
46
51
  const ProductIcon = _ref6 => {
47
52
  let {
48
53
  name,
package/dist/index.d.ts CHANGED
@@ -4,6 +4,9 @@ import { consoleLightTheme } from '@ultraviolet/themes';
4
4
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
5
5
 
6
6
  type Color = Extract<keyof typeof consoleLightTheme.colors, 'primary' | 'secondary' | 'neutral' | 'success' | 'danger' | 'warning' | 'info'>;
7
+ /**
8
+ * Icon component is our set of system icons in the design system. All of them are SVGs.
9
+ */
7
10
  declare const Icon: react.ForwardRefExoticComponent<{
8
11
  size?: string | number | undefined;
9
12
  name?: "alert" | "anchor" | "arrow-down" | "arrow-left" | "arrow-left-double" | "arrow-right" | "arrow-right-bottom" | "arrow-right-double" | "arrow-up" | "asterisk" | "auto-fix" | "bullhorn" | "burger" | "book-open-outline" | "calculator" | "calendar-range" | "cancel" | "id" | "check" | "checkbox-circle-outline" | "clock-outline" | "close" | "close-circle-outline" | "copy-content" | "credentials" | "credit-card" | "delete" | "detach" | "doc" | "dots-horizontal" | "dots-vertical" | "download" | "drag-variant" | "drag-vertical" | "east" | "email-outline" | "expand" | "eye" | "eye-off" | "filter" | "github" | "help-circle-outline" | "information-outline" | "lock" | "logout" | "members" | "minus" | "moon" | "open-in-new" | "organization" | "pencil" | "play-circle-outline" | "plus" | "privacy" | "profile" | "progress-check" | "ray-end-arrow" | "ray-start-arrow" | "ray-start-end" | "ray-top-arrow" | "reboot" | "restore" | "revoke" | "rocket" | "search" | "send" | "settings" | "sort" | "sun" | "support" | "switch_orga" | "unlock" | "upload" | "view" | "weather-night" | "attach" | "phone" | "earth" | "email-remove-outline" | "expand-more" | "console" | "equal" | "youtube" | "x" | "slack" | "rss" | "linkedIn" | "instagram" | undefined;
@@ -42,6 +45,10 @@ declare const CATEGORY_ICONS: {
42
45
  type CategoryIconProps = {
43
46
  name: keyof typeof CATEGORY_ICONS;
44
47
  };
48
+ /**
49
+ * CategoryIcon component is used to render category icons, those icons are more complex than system icons
50
+ * as they involve multiple colors that changes depending on theme.
51
+ */
45
52
  declare const CategoryIcon: ({ name }: CategoryIconProps) => _emotion_react_jsx_runtime.JSX.Element;
46
53
 
47
54
  declare const PRODUCT_ICONS: {
@@ -147,6 +154,10 @@ type ProductIconProps = {
147
154
  disabled?: boolean;
148
155
  size?: keyof typeof SIZES;
149
156
  };
157
+ /**
158
+ * ProductIcon component is used to render a set of icons that are linked to a product or service.
159
+ * Those icons are made of multiple colors that changes automatically based on the current theme.
160
+ */
150
161
  declare const ProductIcon: ({ name, variant, disabled, size, }: ProductIconProps) => _emotion_react_jsx_runtime.JSX.Element;
151
162
 
152
163
  export { CategoryIcon, Icon, ProductIcon };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/icons",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Ultraviolet Icons",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "react-dom": "18.2.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@babel/core": "7.22.15",
41
+ "@babel/core": "7.22.19",
42
42
  "@emotion/babel-plugin": "11.11.0",
43
43
  "@types/react": "18.2.21",
44
44
  "@types/react-dom": "18.2.7"