@pie-lib/icons 4.0.2 → 4.0.3-next.0

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 (65) hide show
  1. package/dist/correct-icon.d.ts +78 -0
  2. package/dist/correct-icon.js +59 -0
  3. package/dist/correct-response-icon.d.ts +24 -0
  4. package/dist/correct-response-icon.js +96 -0
  5. package/dist/icon-base.d.ts +78 -0
  6. package/dist/icon-base.js +40 -0
  7. package/dist/icon-root.d.ts +71 -0
  8. package/dist/icon-root.js +57 -0
  9. package/dist/incorrect-icon.d.ts +78 -0
  10. package/dist/incorrect-icon.js +71 -0
  11. package/dist/index.d.ts +17 -0
  12. package/dist/index.js +9 -0
  13. package/dist/instructions-icon.d.ts +13 -0
  14. package/dist/instructions-icon.js +179 -0
  15. package/dist/learn-more-icon.d.ts +18 -0
  16. package/dist/learn-more-icon.js +82 -0
  17. package/dist/nothing-submitted-icon.d.ts +14 -0
  18. package/dist/nothing-submitted-icon.js +92 -0
  19. package/dist/partially-correct-icon.d.ts +78 -0
  20. package/dist/partially-correct-icon.js +64 -0
  21. package/dist/show-rationale-icon.d.ts +13 -0
  22. package/dist/show-rationale-icon.js +136 -0
  23. package/dist/sized.d.ts +22 -0
  24. package/dist/sized.js +19 -0
  25. package/package.json +25 -21
  26. package/CHANGELOG.json +0 -1
  27. package/CHANGELOG.md +0 -573
  28. package/LICENSE.md +0 -5
  29. package/lib/correct-icon.js +0 -79
  30. package/lib/correct-icon.js.map +0 -1
  31. package/lib/correct-response-icon.js +0 -125
  32. package/lib/correct-response-icon.js.map +0 -1
  33. package/lib/icon-base.js +0 -93
  34. package/lib/icon-base.js.map +0 -1
  35. package/lib/icon-root.js +0 -106
  36. package/lib/icon-root.js.map +0 -1
  37. package/lib/incorrect-icon.js +0 -88
  38. package/lib/incorrect-icon.js.map +0 -1
  39. package/lib/index.js +0 -63
  40. package/lib/index.js.map +0 -1
  41. package/lib/instructions-icon.js +0 -205
  42. package/lib/instructions-icon.js.map +0 -1
  43. package/lib/learn-more-icon.js +0 -104
  44. package/lib/learn-more-icon.js.map +0 -1
  45. package/lib/nothing-submitted-icon.js +0 -175
  46. package/lib/nothing-submitted-icon.js.map +0 -1
  47. package/lib/partially-correct-icon.js +0 -81
  48. package/lib/partially-correct-icon.js.map +0 -1
  49. package/lib/show-rationale-icon.js +0 -187
  50. package/lib/show-rationale-icon.js.map +0 -1
  51. package/lib/sized.js +0 -32
  52. package/lib/sized.js.map +0 -1
  53. package/src/__tests__/index.test.js +0 -305
  54. package/src/correct-icon.jsx +0 -54
  55. package/src/correct-response-icon.jsx +0 -106
  56. package/src/icon-base.jsx +0 -55
  57. package/src/icon-root.jsx +0 -53
  58. package/src/incorrect-icon.jsx +0 -67
  59. package/src/index.js +0 -19
  60. package/src/instructions-icon.jsx +0 -189
  61. package/src/learn-more-icon.jsx +0 -94
  62. package/src/nothing-submitted-icon.jsx +0 -136
  63. package/src/partially-correct-icon.jsx +0 -56
  64. package/src/show-rationale-icon.jsx +0 -145
  65. package/src/sized.jsx +0 -25
@@ -0,0 +1,136 @@
1
+ import { normalizeSize as e } from "./sized.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/show-rationale-icon.tsx
6
+ var a = ({ fill: e }) => /* @__PURE__ */ i("g", { children: [/* @__PURE__ */ r("rect", {
7
+ x: "-115",
8
+ y: "136.7",
9
+ width: "3",
10
+ height: "3",
11
+ fill: e
12
+ }), /* @__PURE__ */ r("polygon", {
13
+ points: "-112,147.7 -112,141.7 -115.8,141.7 -115.8,143.7 -114,143.7 -114,147.7 -116.2,147.7 -116.2,149.7 -109.8,149.7 -109.8,147.7",
14
+ fill: e
15
+ })] });
16
+ a.propTypes = { fill: n.string.isRequired };
17
+ var o = ({ fill: e }) => /* @__PURE__ */ r("path", {
18
+ d: "M-113,158.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105,158.5-113,158.5z\n M-113,130.5c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-105.6,130.5-113,130.5z",
19
+ fill: e
20
+ });
21
+ o.propTypes = { fill: n.string.isRequired };
22
+ var s = ({ fill: e = "#FFFFFF" }) => /* @__PURE__ */ i("g", { children: [
23
+ /* @__PURE__ */ r("path", {
24
+ style: {
25
+ fill: "#D0CAC5",
26
+ stroke: "#E6E3E0",
27
+ strokeWidth: .75,
28
+ strokeMiterlimit: 10
29
+ },
30
+ d: "M-111.7,160.9c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5C-96.2,154-103.1,160.9-111.7,160.9z"
31
+ }),
32
+ /* @__PURE__ */ r("path", {
33
+ style: {
34
+ fill: "#B3ABA4",
35
+ stroke: "#CDC7C2",
36
+ strokeWidth: .5,
37
+ strokeMiterlimit: 10
38
+ },
39
+ d: "M-112,159.5c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-104,159.5-112,159.5z"
40
+ }),
41
+ /* @__PURE__ */ r("circle", {
42
+ cx: "-113",
43
+ cy: "144",
44
+ r: "14",
45
+ fill: e
46
+ })
47
+ ] });
48
+ s.propTypes = { fill: n.string };
49
+ var c = ({ children: t, size: n }) => {
50
+ let i = e(n);
51
+ return /* @__PURE__ */ r("div", {
52
+ style: {
53
+ height: i,
54
+ width: i,
55
+ display: "inline-block",
56
+ position: "relative"
57
+ },
58
+ children: /* @__PURE__ */ r("svg", {
59
+ preserveAspectRatio: "xMinYMin meet",
60
+ viewBox: "-129 128 34 34",
61
+ children: t
62
+ })
63
+ });
64
+ };
65
+ c.propTypes = {
66
+ children: n.oneOfType([n.arrayOf(n.node), n.node]).isRequired,
67
+ size: n.oneOfType([n.string, n.number])
68
+ };
69
+ var l = class extends t.Component {
70
+ render() {
71
+ let { iconSet: e, open: t, fg: n = "#1a9cff", bg: l = "#bce2ff", border: u = "#bbe3fd" } = this.props, d = /* @__PURE__ */ r(a, { fill: n }), f = {
72
+ check: /* @__PURE__ */ i(c, {
73
+ size: this.props.size,
74
+ children: [
75
+ /* @__PURE__ */ r(s, {}),
76
+ d,
77
+ /* @__PURE__ */ r(o, { fill: u })
78
+ ]
79
+ }),
80
+ emoji: /* @__PURE__ */ i(c, {
81
+ size: this.props.size,
82
+ children: [
83
+ /* @__PURE__ */ r(s, {}),
84
+ d,
85
+ /* @__PURE__ */ r(o, { fill: u })
86
+ ]
87
+ }),
88
+ open: {
89
+ check: /* @__PURE__ */ i(c, {
90
+ size: this.props.size,
91
+ children: [
92
+ /* @__PURE__ */ r("circle", {
93
+ cx: "-113",
94
+ cy: "144",
95
+ r: "14",
96
+ fill: "#FFFFFF"
97
+ }),
98
+ /* @__PURE__ */ r(a, { fill: l }),
99
+ /* @__PURE__ */ r(o, { fill: "#FFFFFF" })
100
+ ]
101
+ }),
102
+ emoji: /* @__PURE__ */ i(c, {
103
+ size: this.props.size,
104
+ children: [
105
+ /* @__PURE__ */ r("circle", {
106
+ cx: "-113",
107
+ cy: "144",
108
+ r: "14",
109
+ fill: "#FFFFFF"
110
+ }),
111
+ /* @__PURE__ */ r(a, { fill: l }),
112
+ /* @__PURE__ */ r(o, { fill: u })
113
+ ]
114
+ })
115
+ }
116
+ };
117
+ return t === !0 ? f.open[e] : f[e];
118
+ }
119
+ };
120
+ l.propTypes = {
121
+ iconSet: n.oneOf(["emoji", "check"]),
122
+ open: n.bool,
123
+ fg: n.string,
124
+ bg: n.string,
125
+ border: n.string,
126
+ size: n.oneOfType([n.string, n.number])
127
+ }, l.defaultProps = {
128
+ iconSet: "check",
129
+ open: !1,
130
+ fg: "#1a9cff",
131
+ bg: "#bce2ff",
132
+ border: "#bbe3fd",
133
+ size: 30
134
+ };
135
+ //#endregion
136
+ export { l as default };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/icons/src/sized.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare const normalizeSize: (size: any) => string;
12
+ declare const Sized: {
13
+ ({ size, children }: {
14
+ size: any;
15
+ children: any;
16
+ }): React.JSX.Element;
17
+ propTypes: {
18
+ size: PropTypes.Requireable<number>;
19
+ children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
20
+ };
21
+ };
22
+ export default Sized;
package/dist/sized.js ADDED
@@ -0,0 +1,19 @@
1
+ import "react";
2
+ import e from "prop-types";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/sized.tsx
5
+ var n = (e) => typeof e == "string" ? e : typeof e == "number" ? `${e}px` : "30px", r = ({ size: e, children: r }) => (e = n(e), /* @__PURE__ */ t("div", {
6
+ style: {
7
+ height: e,
8
+ width: e,
9
+ display: "inline-block",
10
+ position: "relative"
11
+ },
12
+ children: r
13
+ }));
14
+ r.propTypes = {
15
+ size: e.number,
16
+ children: e.oneOfType([e.arrayOf(e.node), e.node]).isRequired
17
+ };
18
+ //#endregion
19
+ export { r as default, n as normalizeSize };
package/package.json CHANGED
@@ -1,34 +1,38 @@
1
1
  {
2
2
  "name": "@pie-lib/icons",
3
- "version": "4.0.2",
3
+ "version": "4.0.3-next.0",
4
4
  "description": "Some simple icons",
5
- "main": "lib/index.js",
6
- "module": "src/index.js",
7
- "keywords": [
8
- "pie",
9
- "react",
10
- "mui"
11
- ],
12
- "scripts": {},
13
- "author": "",
14
- "license": "ISC",
15
- "repository": "pie-framework/pie-lib",
16
5
  "dependencies": {
17
6
  "@emotion/react": "^11.14.0",
18
7
  "@emotion/style": "^0.8.0",
19
8
  "@mui/icons-material": "^7.3.4",
20
9
  "@mui/material": "^7.3.4",
21
- "prop-types": "^15.6.2"
22
- },
23
- "peerDependencies": {
24
- "@mui/material": "^7.3.4",
10
+ "prop-types": "^15.6.2",
25
11
  "react": "^18.2.0"
26
12
  },
27
- "devDependencies": {
28
- "@pie-lib/test-utils": "^2.0.2"
13
+ "type": "module",
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ }
29
21
  },
30
- "publishConfig": {
31
- "access": "public"
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "sideEffects": false,
26
+ "scripts": {
27
+ "build": "bun x vite build && bun x tsc --emitDeclarationOnly",
28
+ "dev": "bun x vite",
29
+ "test": "bun x vitest run"
32
30
  },
33
- "gitHead": "a09f84cac337a93082ba823f0798a00da2d0d623"
31
+ "devDependencies": {
32
+ "vite": "^8.0.1",
33
+ "typescript": "^5.9.3",
34
+ "@vitejs/plugin-react": "^6.0.1",
35
+ "@types/react": "^18.2.0",
36
+ "@types/react-dom": "^18.2.0"
37
+ }
34
38
  }
package/CHANGELOG.json DELETED
@@ -1 +0,0 @@
1
- []