@eyesee/ui-components 0.15.0 → 0.15.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.
@@ -1,13 +1,124 @@
1
1
  /**
2
- * SVG edit image icon.
2
+ * @callback EditImageIconClickHandler
3
+ * @returns {void}
4
+ */
5
+ /**
6
+ * Shared {@link IconProps} for this icon. All optional.
7
+ *
8
+ * @typedef {object} EditImageIconProps
9
+ *
10
+ * @property {import('./constants').IconSize} [iconSize='m']
11
+ * T-shirt size token. Controls `width`/`height` and stroke width. Default `'m'`.
12
+ * @property {EditImageIconClickHandler} [onClick=null]
13
+ * Click handler. When set the icon is clickable. Default `null`.
14
+ * @property {string} [fill='none']
15
+ * SVG fill colour. Default `'none'`.
16
+ * @property {string} [strokeColor='currentColor']
17
+ * SVG stroke colour. Accepts any valid CSS colour. Default `'currentColor'`.
18
+ * @property {string} [strokeColorOnHover]
19
+ * Stroke colour applied on hover.
20
+ * @property {string} [fillOnHover]
21
+ * Fill colour applied on hover.
22
+ * @property {boolean} [disabled]
23
+ * Applies disabled colour tokens and ignores clicks.
24
+ * @property {boolean} [animated=false]
25
+ * When `true`, applies the spinner animation class. Default `false`.
26
+ * @property {number} [viewBoxSize]
27
+ * Custom viewBox size for icons that are not 32×32. Sets `0 0 {n} {n}`.
28
+ *
29
+ * @see {@link IconProps}
30
+ */
31
+ /**
32
+ * SVG edit image icon (framed landscape photo with a pencil badge)
33
+ * used for editing images or other media.
34
+ * Source: Design System Figma `icon-imageedit`, `size=xxl` (32×32) variant.
35
+ *
36
+ * ## Props
37
+ *
38
+ * All optional.
39
+ *
40
+ * **iconSize** `'s' | 'm' | 'l' | 'xl' | 'xxl' | '4xl'` — default `'m'`
41
+ * T-shirt size token. Controls `width`/`height` and stroke width.
42
+ *
43
+ * **onClick** `() => void` — default `null`
44
+ * Click handler. When set the icon is clickable.
45
+ *
46
+ * **fill** `string` — default `'none'`
47
+ * SVG fill colour.
3
48
  *
4
- * @param {object} props
5
- * @param {string} [props.strokeColor='currentColor'] - SVG stroke colour.
6
- * Accepts any valid CSS colour value.
7
- * @param {import('./constants').IconSize} [props.iconSize='m']
8
- * T-shirt size token that controls the rendered `width`/`height` and
9
- * `stroke-width` via {@link iconSizes} and {@link iconStrokeWidths}.
10
- * @param {string} [props.fill='none'] - SVG fill colour.
11
- * @returns {JSX.Element}
49
+ * **strokeColor** `string` — default `'currentColor'`
50
+ * SVG stroke colour. Accepts any valid CSS colour.
51
+ *
52
+ * **strokeColorOnHover** `string` — no default
53
+ * Stroke colour applied on hover.
54
+ *
55
+ * **fillOnHover** `string` — no default
56
+ * Fill colour applied on hover.
57
+ *
58
+ * **disabled** `boolean` — no default
59
+ * Applies disabled colour tokens and ignores clicks.
60
+ *
61
+ * **animated** `boolean` — default `false`
62
+ * When `true`, applies the spinner animation class.
63
+ *
64
+ * **viewBoxSize** `number` — no default
65
+ * Custom viewBox size for icons that are not 32×32. Omit → `0 0 32 32`.
66
+ *
67
+ * @param {EditImageIconProps} props
68
+ * @returns {import('react').ReactElement}
69
+ *
70
+ * @example <caption>Playground</caption>
71
+ * import { EditImageIcon } from '@eyesee/ui-components/icons';
72
+ *
73
+ * <EditImageIcon iconSize="m" strokeColor="#333333" fill="none" />
74
+ *
75
+ * @example <caption>Gallery</caption>
76
+ * import { EditImageIcon } from '@eyesee/ui-components/icons';
77
+ *
78
+ * <EditImageIcon iconSize="s" strokeColor="#333333" fill="none" />
79
+ * <EditImageIcon iconSize="m" strokeColor="#333333" fill="none" />
80
+ * <EditImageIcon iconSize="l" strokeColor="#333333" fill="none" />
12
81
  */
13
82
  export const EditImageIcon: (props: IconProps) => import("react").JSX.Element;
83
+ export type EditImageIconClickHandler = () => void;
84
+ /**
85
+ * Shared {@link IconProps} for this icon. All optional.
86
+ */
87
+ export type EditImageIconProps = {
88
+ /**
89
+ * T-shirt size token. Controls `width`/`height` and stroke width. Default `'m'`.
90
+ */
91
+ iconSize?: import("./constants").IconSize;
92
+ /**
93
+ * Click handler. When set the icon is clickable. Default `null`.
94
+ */
95
+ onClick?: EditImageIconClickHandler;
96
+ /**
97
+ * SVG fill colour. Default `'none'`.
98
+ */
99
+ fill?: string;
100
+ /**
101
+ * SVG stroke colour. Accepts any valid CSS colour. Default `'currentColor'`.
102
+ */
103
+ strokeColor?: string;
104
+ /**
105
+ * Stroke colour applied on hover.
106
+ */
107
+ strokeColorOnHover?: string;
108
+ /**
109
+ * Fill colour applied on hover.
110
+ */
111
+ fillOnHover?: string;
112
+ /**
113
+ * Applies disabled colour tokens and ignores clicks.
114
+ */
115
+ disabled?: boolean;
116
+ /**
117
+ * When `true`, applies the spinner animation class. Default `false`.
118
+ */
119
+ animated?: boolean;
120
+ /**
121
+ * Custom viewBox size for icons that are not 32×32. Sets `0 0 {n} {n}`.
122
+ */
123
+ viewBoxSize?: number;
124
+ };
@@ -3,7 +3,7 @@ import { createIcon as t } from "./createIcon.js";
3
3
  const L = t(({ strokeColor: C, strokeWidth: o }) => /* @__PURE__ */ r(
4
4
  "path",
5
5
  {
6
- d: "M20.0002 10.6667H20.0135M14.6668 26.6667H9.3335C8.27263 26.6667 7.25521 26.2453 6.50507 25.4951C5.75492 24.745 5.3335 23.7276 5.3335 22.6667V9.33337C5.3335 8.27251 5.75492 7.25509 6.50507 6.50495C7.25521 5.7548 8.27263 5.33337 9.3335 5.33337H22.6668C23.7277 5.33337 24.7451 5.7548 25.4953 6.50495C26.2454 7.25509 26.6668 8.27251 26.6668 9.33337V14.6667M5.3335 20.0001L10.6668 14.6668C11.9042 13.4761 13.4295 13.4761 14.6668 14.6668L18.6668 18.6668L20.0002 17.3334C20.4135 16.9361 20.8588 16.6708 21.3162 16.5388M24.5602 20.8133C24.8202 20.5533 25.1289 20.3471 25.4686 20.2064C25.8083 20.0656 26.1724 19.9932 26.5402 19.9932C26.9079 19.9932 27.272 20.0656 27.6117 20.2064C27.9515 20.3471 28.2601 20.5533 28.5202 20.8133C28.7802 21.0734 28.9864 21.3821 29.1272 21.7218C29.2679 22.0615 29.3403 22.4256 29.3403 22.7933C29.3403 23.1611 29.2679 23.5252 29.1272 23.8649C28.9864 24.2046 28.7802 24.5133 28.5202 24.7733L24.0002 29.3333H20.0002V25.3333L24.5602 20.8133Z",
6
+ d: "M20 10.6667H20.0133M16.6667 28H8C6.93913 28 5.92172 27.5786 5.17157 26.8284C4.42143 26.0783 4 25.0609 4 24V8C4 6.93913 4.42143 5.92172 5.17157 5.17157C5.92172 4.42143 6.93913 4 8 4H24C25.0609 4 26.0783 4.42143 26.8284 5.17157C27.5786 5.92172 28 6.93913 28 8V16.6667M4 21.3334L10.6667 14.6668C11.904 13.4761 13.4293 13.4761 14.6667 14.6668L20 20.0001M18.6667 18.6666L20 17.3333C20.8933 16.4746 21.9333 16.2346 22.9093 16.6133M25.56 21.8201C25.82 21.5601 26.1287 21.3539 26.4684 21.2131C26.8082 21.0724 27.1723 21 27.54 21C27.9077 21 28.2718 21.0724 28.6116 21.2131C28.9513 21.3539 29.26 21.5601 29.52 21.8201C29.78 22.0802 29.9863 22.3888 30.127 22.7286C30.2677 23.0683 30.3401 23.4324 30.3401 23.8001C30.3401 24.1679 30.2677 24.532 30.127 24.8717C29.9863 25.2114 29.78 25.5201 29.52 25.7801L25 30.3401H21V26.3401L25.56 21.8201Z",
7
7
  stroke: C,
8
8
  strokeWidth: o,
9
9
  strokeLinecap: "round",
@@ -1,15 +1,124 @@
1
+ /**
2
+ * @callback ImageStarIconClickHandler
3
+ * @returns {void}
4
+ */
5
+ /**
6
+ * Shared {@link IconProps} for this icon. All optional.
7
+ *
8
+ * @typedef {object} ImageStarIconProps
9
+ *
10
+ * @property {import('./constants').IconSize} [iconSize='m']
11
+ * T-shirt size token. Controls `width`/`height` and stroke width. Default `'m'`.
12
+ * @property {ImageStarIconClickHandler} [onClick=null]
13
+ * Click handler. When set the icon is clickable. Default `null`.
14
+ * @property {string} [fill='none']
15
+ * SVG fill colour. Default `'none'`.
16
+ * @property {string} [strokeColor='currentColor']
17
+ * SVG stroke colour. Accepts any valid CSS colour. Default `'currentColor'`.
18
+ * @property {string} [strokeColorOnHover]
19
+ * Stroke colour applied on hover.
20
+ * @property {string} [fillOnHover]
21
+ * Fill colour applied on hover.
22
+ * @property {boolean} [disabled]
23
+ * Applies disabled colour tokens and ignores clicks.
24
+ * @property {boolean} [animated=false]
25
+ * When `true`, applies the spinner animation class. Default `false`.
26
+ * @property {number} [viewBoxSize]
27
+ * Custom viewBox size for icons that are not 32×32. Sets `0 0 {n} {n}`.
28
+ *
29
+ * @see {@link IconProps}
30
+ */
1
31
  /**
2
32
  * SVG image-with-star icon (framed photo with a star badge) used for
3
33
  * Visual Brand Alignment and similar media-rating contexts.
34
+ * Source: Design System Figma `icon-imagestar`, `size=xxl` (32×32) variant.
35
+ *
36
+ * ## Props
37
+ *
38
+ * All optional.
39
+ *
40
+ * **iconSize** `'s' | 'm' | 'l' | 'xl' | 'xxl' | '4xl'` — default `'m'`
41
+ * T-shirt size token. Controls `width`/`height` and stroke width.
42
+ *
43
+ * **onClick** `() => void` — default `null`
44
+ * Click handler. When set the icon is clickable.
45
+ *
46
+ * **fill** `string` — default `'none'`
47
+ * SVG fill colour.
4
48
  *
5
- * Source: Design System Figma `IconImagestar` (node 31025:30712).
49
+ * **strokeColor** `string` — default `'currentColor'`
50
+ * SVG stroke colour. Accepts any valid CSS colour.
6
51
  *
7
- * @param {object} props
8
- * @param {import('./constants').IconSize} [props.iconSize='m']
9
- * T-shirt size token that controls the rendered `width`/`height` and
10
- * `stroke-width` via {@link iconSizes} and {@link iconStrokeWidths}.
11
- * @param {string} [props.strokeColor='currentColor'] - SVG stroke colour.
12
- * Accepts any valid CSS colour value.
13
- * @returns {JSX.Element}
52
+ * **strokeColorOnHover** `string` — no default
53
+ * Stroke colour applied on hover.
54
+ *
55
+ * **fillOnHover** `string` — no default
56
+ * Fill colour applied on hover.
57
+ *
58
+ * **disabled** `boolean` — no default
59
+ * Applies disabled colour tokens and ignores clicks.
60
+ *
61
+ * **animated** `boolean` — default `false`
62
+ * When `true`, applies the spinner animation class.
63
+ *
64
+ * **viewBoxSize** `number` — no default
65
+ * Custom viewBox size for icons that are not 32×32. Omit → `0 0 32 32`.
66
+ *
67
+ * @param {ImageStarIconProps} props
68
+ * @returns {import('react').ReactElement}
69
+ *
70
+ * @example <caption>Playground</caption>
71
+ * import { ImageStarIcon } from '@eyesee/ui-components/icons';
72
+ *
73
+ * <ImageStarIcon iconSize="m" strokeColor="#333333" fill="none" />
74
+ *
75
+ * @example <caption>Gallery</caption>
76
+ * import { ImageStarIcon } from '@eyesee/ui-components/icons';
77
+ *
78
+ * <ImageStarIcon iconSize="s" strokeColor="#333333" fill="none" />
79
+ * <ImageStarIcon iconSize="m" strokeColor="#333333" fill="none" />
80
+ * <ImageStarIcon iconSize="l" strokeColor="#333333" fill="none" />
14
81
  */
15
82
  export const ImageStarIcon: (props: IconProps) => import("react").JSX.Element;
83
+ export type ImageStarIconClickHandler = () => void;
84
+ /**
85
+ * Shared {@link IconProps} for this icon. All optional.
86
+ */
87
+ export type ImageStarIconProps = {
88
+ /**
89
+ * T-shirt size token. Controls `width`/`height` and stroke width. Default `'m'`.
90
+ */
91
+ iconSize?: import("./constants").IconSize;
92
+ /**
93
+ * Click handler. When set the icon is clickable. Default `null`.
94
+ */
95
+ onClick?: ImageStarIconClickHandler;
96
+ /**
97
+ * SVG fill colour. Default `'none'`.
98
+ */
99
+ fill?: string;
100
+ /**
101
+ * SVG stroke colour. Accepts any valid CSS colour. Default `'currentColor'`.
102
+ */
103
+ strokeColor?: string;
104
+ /**
105
+ * Stroke colour applied on hover.
106
+ */
107
+ strokeColorOnHover?: string;
108
+ /**
109
+ * Fill colour applied on hover.
110
+ */
111
+ fillOnHover?: string;
112
+ /**
113
+ * Applies disabled colour tokens and ignores clicks.
114
+ */
115
+ disabled?: boolean;
116
+ /**
117
+ * When `true`, applies the spinner animation class. Default `false`.
118
+ */
119
+ animated?: boolean;
120
+ /**
121
+ * Custom viewBox size for icons that are not 32×32. Sets `0 0 {n} {n}`.
122
+ */
123
+ viewBoxSize?: number;
124
+ };
@@ -3,7 +3,7 @@ import { createIcon as r } from "./createIcon.js";
3
3
  const n = r(({ strokeColor: C, strokeWidth: o }) => /* @__PURE__ */ L(
4
4
  "path",
5
5
  {
6
- d: "M19.9024 8.9756H19.918M13.6585 29.2683H5.8537C4.6117 29.2683 3.4206 28.7749 2.5423 27.8967C1.6641 27.0185 1.1707 25.8273 1.1707 24.5854V5.8537C1.1707 4.6117 1.6641 3.4206 2.5423 2.5423C3.4206 1.6641 4.6117 1.1707 5.8537 1.1707H24.5854C25.8273 1.1707 27.0185 1.6641 27.8967 2.5423C28.7749 3.4206 29.2683 4.6117 29.2683 5.8537V14.439M1.1707 21.4636L8.9756 13.6586C10.4242 12.2647 12.21 12.2647 13.6585 13.6586L16.7805 16.7806M24.2735 28.9826L20.883 30.759C20.7825 30.8113 20.6693 30.8347 20.5562 30.8265C20.443 30.8182 20.3344 30.7787 20.2424 30.7124C20.1505 30.646 20.0788 30.5553 20.0353 30.4506C19.9919 30.3458 19.9785 30.2309 19.9964 30.119L20.6442 26.3555L17.9016 23.6909C17.8198 23.6118 17.7619 23.5113 17.7344 23.4007C17.7069 23.2902 17.7111 23.1742 17.7464 23.0659C17.7817 22.9577 17.8468 22.8616 17.934 22.7885C18.0215 22.7155 18.1276 22.6685 18.2403 22.6529L22.0304 22.1034L23.7256 18.6802C23.7763 18.5783 23.8545 18.4924 23.9513 18.4325C24.0481 18.3725 24.1597 18.3407 24.2735 18.3407C24.3874 18.3407 24.499 18.3725 24.5958 18.4325C24.6926 18.4924 24.7708 18.5783 24.8214 18.6802L26.5166 22.1034L30.3067 22.6529C30.4192 22.669 30.5249 22.7164 30.6118 22.7895C30.6988 22.8625 30.7636 22.9585 30.7988 23.0665C30.834 23.1746 30.8383 23.2902 30.8112 23.4006C30.7842 23.5109 30.7267 23.6115 30.6454 23.6909L27.9028 26.3555L28.549 30.1175C28.5685 30.2295 28.556 30.3451 28.5131 30.4504C28.4702 30.5559 28.3987 30.6473 28.3064 30.7141C28.2143 30.7809 28.1052 30.8205 27.9917 30.8285C27.8781 30.8364 27.7646 30.8123 27.6639 30.759L24.2735 28.9826Z",
6
+ d: "M20 10.6667H20.0133M14.6667 28H8C6.93913 28 5.92172 27.5786 5.17157 26.8284C4.42143 26.0783 4 25.0609 4 24V8C4 6.93913 4.42143 5.92172 5.17157 5.17157C5.92172 4.42143 6.93913 4 8 4H24C25.0609 4 26.0783 4.42143 26.8284 5.17157C27.5786 5.92172 28 6.93913 28 8V15.3333M4 21.3334L10.6667 14.6668C11.904 13.4761 13.4293 13.4761 14.6667 14.6668L17.3333 17.3334M23.7336 27.756L20.8377 29.2733C20.7517 29.318 20.655 29.338 20.5584 29.331C20.4618 29.3239 20.369 29.2902 20.2904 29.2335C20.2119 29.1768 20.1506 29.0993 20.1135 29.0098C20.0764 28.9203 20.0649 28.8223 20.0803 28.7266L20.6337 25.512L18.291 23.236C18.2211 23.1684 18.1715 23.0825 18.1481 22.9881C18.1247 22.8937 18.1282 22.7946 18.1584 22.7022C18.1886 22.6097 18.2441 22.5276 18.3187 22.4652C18.3933 22.4028 18.484 22.3626 18.5803 22.3493L21.8177 21.88L23.2656 18.956C23.309 18.8689 23.3757 18.7956 23.4584 18.7444C23.5411 18.6932 23.6364 18.666 23.7336 18.666C23.8309 18.666 23.9262 18.6932 24.0089 18.7444C24.0916 18.7956 24.1583 18.8689 24.2016 18.956L25.6496 21.88L28.887 22.3493C28.983 22.3631 29.0733 22.4035 29.1476 22.466C29.2219 22.5284 29.2772 22.6104 29.3073 22.7027C29.3374 22.7949 29.3411 22.8938 29.3179 22.988C29.2948 23.0823 29.2457 23.1682 29.1763 23.236L26.8336 25.512L27.3856 28.7253C27.4022 28.8211 27.3916 28.9197 27.355 29.0098C27.3183 29.0998 27.2572 29.1778 27.1784 29.2349C27.0997 29.292 27.0065 29.3258 26.9095 29.3326C26.8125 29.3394 26.7156 29.3189 26.6297 29.2733L23.7336 27.756Z",
7
7
  stroke: C,
8
8
  strokeWidth: o,
9
9
  strokeLinecap: "round",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyesee/ui-components",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Shared EyeSee React components and design tokens.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",