@primitiv-ui/icons 0.1.38 → 0.1.39

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 (162) hide show
  1. package/dist/IconBase.d.ts +14 -0
  2. package/dist/IconBase.js +9 -0
  3. package/dist/icons/ArrowLeft.d.ts +14 -0
  4. package/dist/icons/ArrowLeft.js +14 -0
  5. package/dist/icons/ArrowRight.d.ts +14 -0
  6. package/dist/icons/ArrowRight.js +14 -0
  7. package/dist/icons/Bell.d.ts +14 -0
  8. package/dist/icons/Bell.js +14 -0
  9. package/dist/icons/Bold.d.ts +14 -0
  10. package/dist/icons/Bold.js +14 -0
  11. package/dist/icons/Calendar.d.ts +14 -0
  12. package/dist/icons/Calendar.js +14 -0
  13. package/dist/icons/Check.d.ts +14 -0
  14. package/dist/icons/Check.js +14 -0
  15. package/dist/icons/ChevronDown.d.ts +14 -0
  16. package/dist/icons/ChevronDown.js +14 -0
  17. package/dist/icons/ChevronLeft.d.ts +14 -0
  18. package/dist/icons/ChevronLeft.js +14 -0
  19. package/dist/icons/ChevronRight.d.ts +14 -0
  20. package/dist/icons/ChevronRight.js +14 -0
  21. package/dist/icons/ChevronUp.d.ts +14 -0
  22. package/dist/icons/ChevronUp.js +14 -0
  23. package/dist/icons/Close.d.ts +14 -0
  24. package/dist/icons/Close.js +14 -0
  25. package/dist/icons/Copy.d.ts +14 -0
  26. package/dist/icons/Copy.js +14 -0
  27. package/dist/icons/Delete.d.ts +14 -0
  28. package/dist/icons/Delete.js +14 -0
  29. package/dist/icons/Download.d.ts +14 -0
  30. package/dist/icons/Download.js +14 -0
  31. package/dist/icons/Edit.d.ts +14 -0
  32. package/dist/icons/Edit.js +14 -0
  33. package/dist/icons/Error.d.ts +14 -0
  34. package/dist/icons/Error.js +14 -0
  35. package/dist/icons/ExternalLink.d.ts +14 -0
  36. package/dist/icons/ExternalLink.js +14 -0
  37. package/dist/icons/Eye.d.ts +14 -0
  38. package/dist/icons/Eye.js +14 -0
  39. package/dist/icons/EyeOff.d.ts +14 -0
  40. package/dist/icons/EyeOff.js +14 -0
  41. package/dist/icons/Eyedropper.d.ts +14 -0
  42. package/dist/icons/Eyedropper.js +14 -0
  43. package/dist/icons/File.d.ts +14 -0
  44. package/dist/icons/File.js +14 -0
  45. package/dist/icons/Filter.d.ts +14 -0
  46. package/dist/icons/Filter.js +14 -0
  47. package/dist/icons/Folder.d.ts +14 -0
  48. package/dist/icons/Folder.js +14 -0
  49. package/dist/icons/GridIcon.d.ts +14 -0
  50. package/dist/icons/GridIcon.js +14 -0
  51. package/dist/icons/Home.d.ts +14 -0
  52. package/dist/icons/Home.js +14 -0
  53. package/dist/icons/Image.d.ts +14 -0
  54. package/dist/icons/Image.js +14 -0
  55. package/dist/icons/Info.d.ts +14 -0
  56. package/dist/icons/Info.js +14 -0
  57. package/dist/icons/Italic.d.ts +14 -0
  58. package/dist/icons/Italic.js +14 -0
  59. package/dist/icons/Link.d.ts +14 -0
  60. package/dist/icons/Link.js +14 -0
  61. package/dist/icons/List.d.ts +14 -0
  62. package/dist/icons/List.js +14 -0
  63. package/dist/icons/Mail.d.ts +14 -0
  64. package/dist/icons/Mail.js +14 -0
  65. package/dist/icons/Maximize.d.ts +14 -0
  66. package/dist/icons/Maximize.js +14 -0
  67. package/dist/icons/Menu.d.ts +14 -0
  68. package/dist/icons/Menu.js +14 -0
  69. package/dist/icons/Minimize.d.ts +14 -0
  70. package/dist/icons/Minimize.js +14 -0
  71. package/dist/icons/Minus.d.ts +14 -0
  72. package/dist/icons/Minus.js +14 -0
  73. package/dist/icons/Moon.d.ts +14 -0
  74. package/dist/icons/Moon.js +14 -0
  75. package/dist/icons/Pause.d.ts +14 -0
  76. package/dist/icons/Pause.js +14 -0
  77. package/dist/icons/Play.d.ts +14 -0
  78. package/dist/icons/Play.js +14 -0
  79. package/dist/icons/Plus.d.ts +14 -0
  80. package/dist/icons/Plus.js +14 -0
  81. package/dist/icons/Search.d.ts +14 -0
  82. package/dist/icons/Search.js +14 -0
  83. package/dist/icons/Settings.d.ts +14 -0
  84. package/dist/icons/Settings.js +14 -0
  85. package/dist/icons/Share.d.ts +14 -0
  86. package/dist/icons/Share.js +14 -0
  87. package/dist/icons/Sort.d.ts +14 -0
  88. package/dist/icons/Sort.js +14 -0
  89. package/dist/icons/Success.d.ts +14 -0
  90. package/dist/icons/Success.js +14 -0
  91. package/dist/icons/Sun.d.ts +14 -0
  92. package/dist/icons/Sun.js +14 -0
  93. package/dist/icons/Underline.d.ts +14 -0
  94. package/dist/icons/Underline.js +14 -0
  95. package/dist/icons/Upload.d.ts +14 -0
  96. package/dist/icons/Upload.js +14 -0
  97. package/dist/icons/User.d.ts +14 -0
  98. package/dist/icons/User.js +14 -0
  99. package/dist/icons/Warning.d.ts +14 -0
  100. package/dist/icons/Warning.js +14 -0
  101. package/dist/icons/index.d.ts +49 -0
  102. package/dist/icons/index.js +49 -0
  103. package/dist/index.d.ts +3 -0
  104. package/dist/index.js +2 -0
  105. package/{src/types.ts → dist/types.d.ts} +6 -7
  106. package/dist/types.js +1 -0
  107. package/package.json +7 -6
  108. package/src/IconBase.test.tsx +0 -81
  109. package/src/IconBase.tsx +0 -33
  110. package/src/icons/ArrowLeft.tsx +0 -20
  111. package/src/icons/ArrowRight.tsx +0 -20
  112. package/src/icons/Bell.tsx +0 -20
  113. package/src/icons/Bold.tsx +0 -20
  114. package/src/icons/Calendar.tsx +0 -20
  115. package/src/icons/Check.test.tsx +0 -27
  116. package/src/icons/Check.tsx +0 -20
  117. package/src/icons/ChevronDown.tsx +0 -20
  118. package/src/icons/ChevronLeft.tsx +0 -20
  119. package/src/icons/ChevronRight.tsx +0 -20
  120. package/src/icons/ChevronUp.tsx +0 -20
  121. package/src/icons/Close.tsx +0 -20
  122. package/src/icons/Copy.tsx +0 -20
  123. package/src/icons/Delete.tsx +0 -20
  124. package/src/icons/Download.tsx +0 -20
  125. package/src/icons/Edit.tsx +0 -20
  126. package/src/icons/Error.tsx +0 -20
  127. package/src/icons/ExternalLink.tsx +0 -20
  128. package/src/icons/Eye.tsx +0 -20
  129. package/src/icons/EyeOff.tsx +0 -20
  130. package/src/icons/Eyedropper.tsx +0 -20
  131. package/src/icons/File.tsx +0 -20
  132. package/src/icons/Filter.tsx +0 -20
  133. package/src/icons/Folder.tsx +0 -20
  134. package/src/icons/GridIcon.tsx +0 -20
  135. package/src/icons/Home.tsx +0 -20
  136. package/src/icons/Image.tsx +0 -20
  137. package/src/icons/Info.tsx +0 -20
  138. package/src/icons/Italic.tsx +0 -20
  139. package/src/icons/Link.tsx +0 -20
  140. package/src/icons/List.tsx +0 -20
  141. package/src/icons/Mail.tsx +0 -20
  142. package/src/icons/Maximize.tsx +0 -20
  143. package/src/icons/Menu.tsx +0 -20
  144. package/src/icons/Minimize.tsx +0 -20
  145. package/src/icons/Minus.tsx +0 -20
  146. package/src/icons/Moon.tsx +0 -20
  147. package/src/icons/Pause.tsx +0 -20
  148. package/src/icons/Play.tsx +0 -20
  149. package/src/icons/Plus.tsx +0 -20
  150. package/src/icons/Search.tsx +0 -20
  151. package/src/icons/Settings.tsx +0 -20
  152. package/src/icons/Share.tsx +0 -20
  153. package/src/icons/Sort.tsx +0 -20
  154. package/src/icons/Success.tsx +0 -20
  155. package/src/icons/Sun.tsx +0 -20
  156. package/src/icons/Underline.tsx +0 -20
  157. package/src/icons/Upload.tsx +0 -20
  158. package/src/icons/User.tsx +0 -20
  159. package/src/icons/Warning.tsx +0 -20
  160. package/src/icons/icons.test.tsx +0 -20
  161. package/src/icons/index.ts +0 -49
  162. package/src/index.ts +0 -3
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Settings icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Settings size={20} aria-label="Settings" />
12
+ * ```
13
+ */
14
+ export declare const Settings: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Settings icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Settings size={20} aria-label="Settings" />
12
+ * ```
13
+ */
14
+ export const Settings = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M14.25 12a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.5 0a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0" }), _jsx("path", { d: "m13.335 3.993 2-.999 1.129 2.256h2.286v2.286l2.256 1.129-1 2L22.676 12l-2.67 1.335 1 2-2.256 1.128v2.287h-2.286l-1.129 2.256-2-1L12 22.676l-1.336-2.67-1.999 1-1.129-2.256H5.25v-2.287l-2.256-1.128 1-2L1.323 12l2.67-1.336-1-1.999L5.25 7.536V5.25h2.286l1.129-2.256 2 1L12 1.323zm-2 2.013-2-1-.871 1.744H6.75v1.714l-1.744.871 1 2-1.33.665 1.33.665-1 2 1.329.664.415.207v1.714h1.714l.871 1.743 2-.999.665 1.33.665-1.33 2 1 .664-1.329.207-.415h1.714v-1.714l.415-.207 1.328-.665-.999-1.999 1.33-.665-1.33-.665 1-2-1.744-.871V6.75h-1.714l-.207-.415-.665-1.33-1.999 1L12 4.678z" })] }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Share icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Share size={20} aria-label="Share" />
12
+ * ```
13
+ */
14
+ export declare const Share: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Share icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Share size={20} aria-label="Share" />
12
+ * ```
13
+ */
14
+ export const Share = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M8.25 12a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.5 0a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0m10.5-6a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.5 0a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0m-1.5 12a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.5 0a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0" }), _jsx("path", { d: "m15.91 7.335-7.414 4.17-.596-1.34 7.414-4.17zm0 9.33-.596 1.34-7.414-4.17.596-1.34z" })] }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Sort icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Sort size={20} aria-label="Sort" />
12
+ * ```
13
+ */
14
+ export declare const Sort: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Sort icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Sort size={20} aria-label="Sort" />
12
+ * ```
13
+ */
14
+ export const Sort = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M5.25 4.25h1.5v16.5h-1.5z" }), _jsx("path", { d: "M10.06 7 9 8.06l-3-3-3 3L1.94 7 6 2.94zm7.19-3.75h1.5v16.5h-1.5z" }), _jsx("path", { d: "M22.06 17 18 21.06 13.94 17 15 15.94l3 3 3-3z" })] }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Success icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Success size={20} aria-label="Success" />
12
+ * ```
13
+ */
14
+ export declare const Success: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Success icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Success size={20} aria-label="Success" />
12
+ * ```
13
+ */
14
+ export const Success = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M20.25 12a8.25 8.25 0 1 0-16.5 0 8.25 8.25 0 0 0 16.5 0m1.5 0c0 5.385-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12 6.615 2.25 12 2.25s9.75 4.365 9.75 9.75" }), _jsx("path", { d: "m18.058 8.919-7.016 8.183L5.939 12 7 10.94l3.957 3.957 5.962-6.955z" })] }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Sun icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Sun size={20} aria-label="Sun" />
12
+ * ```
13
+ */
14
+ export declare const Sun: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Sun icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Sun size={20} aria-label="Sun" />
12
+ * ```
13
+ */
14
+ export const Sun = (props) => (_jsx(IconBase, { ...props, children: _jsx("path", { fillRule: "evenodd", d: "M12.75 21.5h-1.5v-3h1.5zm-4.82-4.37-2.12 2.12-1.06-1.06 2.12-2.12zm11.32 1.06-1.06 1.06-2.12-2.12 1.06-1.06zM12 7.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6m-6.5 3.75h-3v-1.5h3zm16 0h-3v-1.5h3zM7.93 6.87 6.87 7.93 4.75 5.81l1.06-1.06zm11.32-1.06-2.12 2.12-1.06-1.06 2.12-2.12zm-6.5-.31h-1.5v-3h1.5z", clipRule: "evenodd" }) }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Underline icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Underline size={20} aria-label="Underline" />
12
+ * ```
13
+ */
14
+ export declare const Underline: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Underline icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Underline size={20} aria-label="Underline" />
12
+ * ```
13
+ */
14
+ export const Underline = (props) => (_jsx(IconBase, { ...props, children: _jsx("path", { d: "M18.5 21.25h-13v-1.5h13zM7.75 11.5c0 2.615 1.893 4.5 4.25 4.5s4.25-1.885 4.25-4.5v-8h1.5v8c0 3.385-2.507 6-5.75 6s-5.75-2.615-5.75-6v-8h1.5z" }) }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Upload icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Upload size={20} aria-label="Upload" />
12
+ * ```
13
+ */
14
+ export declare const Upload: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Upload icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Upload size={20} aria-label="Upload" />
12
+ * ```
13
+ */
14
+ export const Upload = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M12.5 17.81H11v-13h1.5z" }), _jsx("path", { d: "M4.69 10.06 11.75 3l7.06 7.06-1.06 1.061-6-6-6 6zM20.5 19v1.5H3V19z" })] }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The User icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <User size={20} aria-label="User" />
12
+ * ```
13
+ */
14
+ export declare const User: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The User icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <User size={20} aria-label="User" />
12
+ * ```
13
+ */
14
+ export const User = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M15.25 8a3.25 3.25 0 1 0-6.5 0 3.25 3.25 0 0 0 6.5 0m1.5 0a4.75 4.75 0 1 1-9.5 0 4.75 4.75 0 0 1 9.5 0" }), _jsx("path", { d: "M19.25 21c0-4.526-3.601-7.25-7.25-7.25S4.75 16.474 4.75 21v.75h-1.5V21c0-5.474 4.399-8.75 8.75-8.75s8.75 3.276 8.75 8.75v.75h-1.5z" })] }));
@@ -0,0 +1,14 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { IconProps } from '../types.js';
3
+ /**
4
+ * The Warning icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Warning size={20} aria-label="Warning" />
12
+ * ```
13
+ */
14
+ export declare const Warning: (props: IconProps) => ReactElement;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconBase } from '../IconBase.js';
3
+ /**
4
+ * The Warning icon.
5
+ *
6
+ * A fill-based SVG that inherits `currentColor` and scales via the
7
+ * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Warning size={20} aria-label="Warning" />
12
+ * ```
13
+ */
14
+ export const Warning = (props) => (_jsxs(IconBase, { ...props, children: [_jsx("path", { d: "M23.311 20.75H.688L12 1.52zm-20-1.5H20.69L12 4.479z" }), _jsx("path", { d: "M11.25 8.25h1.5v6.5h-1.5zm0 7.5h1.5v2.5h-1.5z" })] }));
@@ -0,0 +1,49 @@
1
+ export { ArrowLeft } from './ArrowLeft.js';
2
+ export { ArrowRight } from './ArrowRight.js';
3
+ export { Bell } from './Bell.js';
4
+ export { Bold } from './Bold.js';
5
+ export { Calendar } from './Calendar.js';
6
+ export { Check } from './Check.js';
7
+ export { ChevronDown } from './ChevronDown.js';
8
+ export { ChevronLeft } from './ChevronLeft.js';
9
+ export { ChevronRight } from './ChevronRight.js';
10
+ export { ChevronUp } from './ChevronUp.js';
11
+ export { Close } from './Close.js';
12
+ export { Copy } from './Copy.js';
13
+ export { Delete } from './Delete.js';
14
+ export { Download } from './Download.js';
15
+ export { Edit } from './Edit.js';
16
+ export { Error } from './Error.js';
17
+ export { ExternalLink } from './ExternalLink.js';
18
+ export { EyeOff } from './EyeOff.js';
19
+ export { Eye } from './Eye.js';
20
+ export { Eyedropper } from './Eyedropper.js';
21
+ export { File } from './File.js';
22
+ export { Filter } from './Filter.js';
23
+ export { Folder } from './Folder.js';
24
+ export { GridIcon } from './GridIcon.js';
25
+ export { Home } from './Home.js';
26
+ export { Image } from './Image.js';
27
+ export { Info } from './Info.js';
28
+ export { Italic } from './Italic.js';
29
+ export { Link } from './Link.js';
30
+ export { List } from './List.js';
31
+ export { Mail } from './Mail.js';
32
+ export { Maximize } from './Maximize.js';
33
+ export { Menu } from './Menu.js';
34
+ export { Minimize } from './Minimize.js';
35
+ export { Minus } from './Minus.js';
36
+ export { Moon } from './Moon.js';
37
+ export { Pause } from './Pause.js';
38
+ export { Play } from './Play.js';
39
+ export { Plus } from './Plus.js';
40
+ export { Search } from './Search.js';
41
+ export { Settings } from './Settings.js';
42
+ export { Share } from './Share.js';
43
+ export { Sort } from './Sort.js';
44
+ export { Success } from './Success.js';
45
+ export { Sun } from './Sun.js';
46
+ export { Underline } from './Underline.js';
47
+ export { Upload } from './Upload.js';
48
+ export { User } from './User.js';
49
+ export { Warning } from './Warning.js';
@@ -0,0 +1,49 @@
1
+ export { ArrowLeft } from './ArrowLeft.js';
2
+ export { ArrowRight } from './ArrowRight.js';
3
+ export { Bell } from './Bell.js';
4
+ export { Bold } from './Bold.js';
5
+ export { Calendar } from './Calendar.js';
6
+ export { Check } from './Check.js';
7
+ export { ChevronDown } from './ChevronDown.js';
8
+ export { ChevronLeft } from './ChevronLeft.js';
9
+ export { ChevronRight } from './ChevronRight.js';
10
+ export { ChevronUp } from './ChevronUp.js';
11
+ export { Close } from './Close.js';
12
+ export { Copy } from './Copy.js';
13
+ export { Delete } from './Delete.js';
14
+ export { Download } from './Download.js';
15
+ export { Edit } from './Edit.js';
16
+ export { Error } from './Error.js';
17
+ export { ExternalLink } from './ExternalLink.js';
18
+ export { EyeOff } from './EyeOff.js';
19
+ export { Eye } from './Eye.js';
20
+ export { Eyedropper } from './Eyedropper.js';
21
+ export { File } from './File.js';
22
+ export { Filter } from './Filter.js';
23
+ export { Folder } from './Folder.js';
24
+ export { GridIcon } from './GridIcon.js';
25
+ export { Home } from './Home.js';
26
+ export { Image } from './Image.js';
27
+ export { Info } from './Info.js';
28
+ export { Italic } from './Italic.js';
29
+ export { Link } from './Link.js';
30
+ export { List } from './List.js';
31
+ export { Mail } from './Mail.js';
32
+ export { Maximize } from './Maximize.js';
33
+ export { Menu } from './Menu.js';
34
+ export { Minimize } from './Minimize.js';
35
+ export { Minus } from './Minus.js';
36
+ export { Moon } from './Moon.js';
37
+ export { Pause } from './Pause.js';
38
+ export { Play } from './Play.js';
39
+ export { Plus } from './Plus.js';
40
+ export { Search } from './Search.js';
41
+ export { Settings } from './Settings.js';
42
+ export { Share } from './Share.js';
43
+ export { Sort } from './Sort.js';
44
+ export { Success } from './Success.js';
45
+ export { Sun } from './Sun.js';
46
+ export { Underline } from './Underline.js';
47
+ export { Upload } from './Upload.js';
48
+ export { User } from './User.js';
49
+ export { Warning } from './Warning.js';
@@ -0,0 +1,3 @@
1
+ export type { IconProps } from './types.js';
2
+ export { IconBase } from './IconBase.js';
3
+ export * from './icons/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { IconBase } from './IconBase.js';
2
+ export * from './icons/index.js';
@@ -1,14 +1,13 @@
1
- import type { SVGProps } from 'react'
2
-
1
+ import type { SVGProps } from 'react';
3
2
  /**
4
3
  * Props accepted by every Primitiv icon. Extends all native `<svg>`
5
4
  * attributes, so `className`, `style`, `onClick`, `aria-*`, etc. pass
6
5
  * straight through to the rendered element.
7
6
  */
8
7
  export interface IconProps extends SVGProps<SVGSVGElement> {
9
- /**
10
- * Width and height of the icon, in pixels (number) or any CSS length
11
- * (string). Defaults to `24`.
12
- */
13
- size?: number | string
8
+ /**
9
+ * Width and height of the icon, in pixels (number) or any CSS length
10
+ * (string). Defaults to `24`.
11
+ */
12
+ size?: number | string;
14
13
  }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@primitiv-ui/icons",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "Fill-based SVG icon library for the Primitiv ecosystem. Icons inherit currentColor, scale via a size prop, accept all native SVG attributes, and tree-shake cleanly.",
5
5
  "type": "module",
6
- "main": "./src/index.ts",
7
- "types": "./src/index.ts",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./src/index.ts",
11
- "default": "./src/index.ts"
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
12
  }
13
13
  },
14
14
  "sideEffects": false,
15
15
  "files": [
16
- "src"
16
+ "dist"
17
17
  ],
18
18
  "repository": {
19
19
  "type": "git",
@@ -42,6 +42,7 @@
42
42
  "access": "public"
43
43
  },
44
44
  "scripts": {
45
+ "build": "rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/finalize-dist.mjs dist",
45
46
  "generate": "tsx scripts/generate.ts",
46
47
  "qa": "pnpm qa:units",
47
48
  "qa:units": "vitest run --coverage",
@@ -1,81 +0,0 @@
1
- import { render, screen } from '@testing-library/react'
2
- import { createRef } from 'react'
3
- import { describe, expect, it } from 'vitest'
4
- import { IconBase } from './IconBase'
5
-
6
- describe('IconBase defaults', () => {
7
- it('renders an svg element', () => {
8
- render(<IconBase data-testid="icon" />)
9
- expect(screen.getByTestId('icon').tagName).toBe('svg')
10
- })
11
-
12
- it('defaults width and height to 24', () => {
13
- render(<IconBase data-testid="icon" />)
14
- const svg = screen.getByTestId('icon')
15
- expect(svg).toHaveAttribute('width', '24')
16
- expect(svg).toHaveAttribute('height', '24')
17
- })
18
-
19
- it('has viewBox of 0 0 24 24', () => {
20
- render(<IconBase data-testid="icon" />)
21
- expect(screen.getByTestId('icon')).toHaveAttribute('viewBox', '0 0 24 24')
22
- })
23
-
24
- it('has fill set to currentColor', () => {
25
- render(<IconBase data-testid="icon" />)
26
- expect(screen.getByTestId('icon')).toHaveAttribute('fill', 'currentColor')
27
- })
28
-
29
- it('is aria-hidden by default', () => {
30
- render(<IconBase data-testid="icon" />)
31
- expect(screen.getByTestId('icon')).toHaveAttribute('aria-hidden', 'true')
32
- })
33
- })
34
-
35
- describe('IconBase props', () => {
36
- it('applies a numeric size to width and height', () => {
37
- render(<IconBase data-testid="icon" size={16} />)
38
- const svg = screen.getByTestId('icon')
39
- expect(svg).toHaveAttribute('width', '16')
40
- expect(svg).toHaveAttribute('height', '16')
41
- })
42
-
43
- it('applies a string size to width and height', () => {
44
- render(<IconBase data-testid="icon" size="1rem" />)
45
- const svg = screen.getByTestId('icon')
46
- expect(svg).toHaveAttribute('width', '1rem')
47
- expect(svg).toHaveAttribute('height', '1rem')
48
- })
49
-
50
- it('applies className to the svg element', () => {
51
- render(<IconBase data-testid="icon" className="my-class" />)
52
- expect(screen.getByTestId('icon')).toHaveClass('my-class')
53
- })
54
-
55
- it('allows overriding fill', () => {
56
- render(<IconBase data-testid="icon" fill="red" />)
57
- expect(screen.getByTestId('icon')).toHaveAttribute('fill', 'red')
58
- })
59
-
60
- it('removes aria-hidden when aria-label is provided', () => {
61
- render(<IconBase data-testid="icon" aria-label="Search" />)
62
- expect(screen.getByTestId('icon')).not.toHaveAttribute('aria-hidden')
63
- })
64
-
65
- it('renders children inside the svg', () => {
66
- render(
67
- <IconBase data-testid="icon">
68
- <path data-testid="path" d="M0 0" />
69
- </IconBase>
70
- )
71
- expect(screen.getByTestId('path')).toBeInTheDocument()
72
- })
73
- })
74
-
75
- describe('IconBase ref', () => {
76
- it('forwards ref to the underlying svg element', () => {
77
- const ref = createRef<SVGSVGElement>()
78
- render(<IconBase ref={ref} data-testid="icon" />)
79
- expect(ref.current).toBe(screen.getByTestId('icon'))
80
- })
81
- })
package/src/IconBase.tsx DELETED
@@ -1,33 +0,0 @@
1
- import type { Ref, ReactElement } from 'react'
2
- import type { IconProps } from './types.ts'
3
-
4
- interface IconBaseProps extends IconProps {
5
- ref?: Ref<SVGSVGElement>
6
- }
7
-
8
- /**
9
- * The shared SVG wrapper every Primitiv icon renders through. Sets up the
10
- * `viewBox`, `currentColor` fill, and `size`-driven width/height, forwards
11
- * a ref to the `<svg>`, and marks the icon `aria-hidden` unless an
12
- * `aria-label` is provided. Generated icon components pass their paths as
13
- * `children`; you rarely render this directly.
14
- */
15
- export const IconBase = ({
16
- size = 24,
17
- ref,
18
- children,
19
- ...props
20
- }: IconBaseProps): ReactElement => (
21
- <svg
22
- xmlns="http://www.w3.org/2000/svg"
23
- width={size}
24
- height={size}
25
- viewBox="0 0 24 24"
26
- fill="currentColor"
27
- aria-hidden={props['aria-label'] === undefined ? true : undefined}
28
- ref={ref}
29
- {...props}
30
- >
31
- {children}
32
- </svg>
33
- )
@@ -1,20 +0,0 @@
1
- import type { ReactElement } from 'react'
2
- import type { IconProps } from '../types.ts'
3
- import { IconBase } from '../IconBase.tsx'
4
-
5
- /**
6
- * The ArrowLeft icon.
7
- *
8
- * A fill-based SVG that inherits `currentColor` and scales via the
9
- * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
10
- *
11
- * @example
12
- * ```tsx
13
- * <ArrowLeft size={20} aria-label="ArrowLeft" />
14
- * ```
15
- */
16
- export const ArrowLeft = (props: IconProps): ReactElement => (
17
- <IconBase {...props}>
18
- <path d="M20.75 11.25v1.5H3.908v-1.5z"/><path d="m12.06 5-7 7 7 7L11 20.06 2.94 12 11 3.94z"/>
19
- </IconBase>
20
- )
@@ -1,20 +0,0 @@
1
- import type { ReactElement } from 'react'
2
- import type { IconProps } from '../types.ts'
3
- import { IconBase } from '../IconBase.tsx'
4
-
5
- /**
6
- * The ArrowRight icon.
7
- *
8
- * A fill-based SVG that inherits `currentColor` and scales via the
9
- * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
10
- *
11
- * @example
12
- * ```tsx
13
- * <ArrowRight size={20} aria-label="ArrowRight" />
14
- * ```
15
- */
16
- export const ArrowRight = (props: IconProps): ReactElement => (
17
- <IconBase {...props}>
18
- <path d="M19.75 11.25v1.5H3.25v-1.5z"/><path d="M21.06 12 13 20.06 11.94 19l7-7-7-7L13 3.94z"/>
19
- </IconBase>
20
- )
@@ -1,20 +0,0 @@
1
- import type { ReactElement } from 'react'
2
- import type { IconProps } from '../types.ts'
3
- import { IconBase } from '../IconBase.tsx'
4
-
5
- /**
6
- * The Bell icon.
7
- *
8
- * A fill-based SVG that inherits `currentColor` and scales via the
9
- * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
10
- *
11
- * @example
12
- * ```tsx
13
- * <Bell size={20} aria-label="Bell" />
14
- * ```
15
- */
16
- export const Bell = (props: IconProps): ReactElement => (
17
- <IconBase {...props}>
18
- <path d="M17.25 11c0-3.662-2.737-6.25-5.25-6.25S6.75 7.338 6.75 11v5.31l-.94.94h12.38l-.94-.94zm1.5 4.69 3.06 3.06H2.19l3.06-3.06V11c0-4.338 3.263-7.75 6.75-7.75s6.75 3.412 6.75 7.75zm-4 4.56v1.5h-5.5v-1.5z"/>
19
- </IconBase>
20
- )
@@ -1,20 +0,0 @@
1
- import type { ReactElement } from 'react'
2
- import type { IconProps } from '../types.ts'
3
- import { IconBase } from '../IconBase.tsx'
4
-
5
- /**
6
- * The Bold icon.
7
- *
8
- * A fill-based SVG that inherits `currentColor` and scales via the
9
- * `size` prop. Accepts all native `<svg>` attributes (see {@link IconProps}).
10
- *
11
- * @example
12
- * ```tsx
13
- * <Bold size={20} aria-label="Bold" />
14
- * ```
15
- */
16
- export const Bold = (props: IconProps): ReactElement => (
17
- <IconBase {...props}>
18
- <path fillRule="evenodd" d="M12.5 2.875c1.667 0 3.132.49 4.198 1.411 1.077.93 1.677 2.243 1.677 3.714 0 1.399-.544 2.634-1.528 3.531q.57.297 1.047.701A4.89 4.89 0 0 1 19.625 16c0 1.483-.623 2.803-1.746 3.73-1.108.915-2.63 1.395-4.379 1.395H5.375V2.875zm-4.875 16H13.5c1.35 0 2.329-.37 2.946-.88.602-.497.929-1.179.929-1.995 0-.821-.332-1.533-.943-2.057-.622-.531-1.597-.918-2.932-.918H7.625zm0-8.1H12.5c1.25 0 2.163-.344 2.742-.827.562-.468.883-1.123.883-1.948 0-.83-.325-1.516-.898-2.01-.583-.505-1.494-.865-2.727-.865H7.625z" clipRule="evenodd"/>
19
- </IconBase>
20
- )