@planningcenter/icons 15.18.0 → 15.19.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.
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@planningcenter/icons",
3
- "version": "15.18.0",
3
+ "version": "15.19.0",
4
4
  "description": "Planning Center Icons",
5
5
  "scripts": {
6
6
  "test": "jest",
7
7
  "start": "yarn build && parcel index.html --no-cache",
8
- "prebuild": "rm -rf paths sprites",
8
+ "clean": "rm -rf paths sprites symbol",
9
+ "build-symbol": "rollup -c rollup.config.js --bundleConfigAsCjs",
10
+ "prebuild": "yarn clean && yarn build-symbol",
9
11
  "build": "node --experimental-modules ./scripts/cli.mjs build",
10
12
  "storybook": "yarn build && storybook dev -p 6006",
11
13
  "build-storybook": "storybook build -o public",
@@ -27,7 +29,8 @@
27
29
  "js",
28
30
  "paths",
29
31
  "sprites",
30
- "svg"
32
+ "svg",
33
+ "symbol"
31
34
  ],
32
35
  "homepage": "https://github.com/planningcenter/icons#readme",
33
36
  "devDependencies": {
@@ -35,7 +38,9 @@
35
38
  "@babel/plugin-transform-runtime": "^7.24.3",
36
39
  "@babel/preset-env": "^7.24.4",
37
40
  "@babel/preset-react": "^7.24.1",
38
- "@planningcenter/symbol": "^4.0.0-alpha.0",
41
+ "@rollup/plugin-babel": "^6.0.4",
42
+ "@rollup/plugin-commonjs": "^28.0.2",
43
+ "@rollup/plugin-node-resolve": "^16.0.0",
39
44
  "@storybook/addon-actions": "^8.0.8",
40
45
  "@storybook/addon-essentials": "^8.0.8",
41
46
  "@storybook/addon-links": "^8.0.8",
@@ -53,12 +58,14 @@
53
58
  "handlebars": "^4.7.6",
54
59
  "jest": "^29.7.0",
55
60
  "jest-cli": "^29.7.0",
61
+ "lodash.uniqueid": "^4.0.1",
56
62
  "media-typer": "^1.1.0",
57
63
  "minimist": "^1.2.8",
58
64
  "paper": "^0.12.17",
59
65
  "parcel": "^2.12.0",
60
66
  "react": "^18.2.0",
61
67
  "react-dom": "^18.2.0",
68
+ "rollup": "^4.34.8",
62
69
  "storybook": "^8.0.8",
63
70
  "svgo": "^1.3.2"
64
71
  }
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var uniqueId = require('lodash.uniqueid');
5
+
6
+ function _extends() {
7
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
8
+ for (var i = 1; i < arguments.length; i++) {
9
+ var source = arguments[i];
10
+ for (var key in source) {
11
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
12
+ target[key] = source[key];
13
+ }
14
+ }
15
+ }
16
+ return target;
17
+ };
18
+ return _extends.apply(this, arguments);
19
+ }
20
+
21
+ const ForceTitleContext = /*#__PURE__*/React.createContext(false);
22
+ function Symbol(_ref) {
23
+ let {
24
+ className,
25
+ symbol: _symbol,
26
+ title: _title = "",
27
+ description = "",
28
+ role = "img",
29
+ ...platformProps
30
+ } = _ref;
31
+ let useSymbolAsTitle = React.useContext(ForceTitleContext);
32
+ let [path, symbol] = _symbol.replace(".svg", "").split("#");
33
+ let uid = uniqueId(`${symbol}-`);
34
+ let title = _title ? _title : useSymbolAsTitle ? symbol : "";
35
+ let optionalAttrs = title || description ? {
36
+ "aria-labelledby": [title && `title-${uid}`, description && `desc-${uid}`].filter(Boolean).join(" ")
37
+ } : null;
38
+ return /*#__PURE__*/React.createElement("svg", _extends({
39
+ role: role,
40
+ className: ["symbol", className].join(" ").trim()
41
+ }, optionalAttrs, platformProps), title && /*#__PURE__*/React.createElement("title", {
42
+ id: `title-${uid}`
43
+ }, title), description && /*#__PURE__*/React.createElement("desc", {
44
+ id: `desc-${uid}`
45
+ }, description), /*#__PURE__*/React.createElement("use", {
46
+ xlinkHref: `${path}.svg#${symbol}`
47
+ }));
48
+ }
49
+
50
+ exports.ForceTitleContext = ForceTitleContext;
51
+ exports.Symbol = Symbol;
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/symbol.js"],"sourcesContent":["import React from \"react\"\nimport uniqueId from \"lodash.uniqueid\"\n\nexport const ForceTitleContext = React.createContext(false)\n\nexport function Symbol({\n className,\n symbol: _symbol,\n title: _title = \"\",\n description = \"\",\n role = \"img\",\n ...platformProps\n}) {\n let useSymbolAsTitle = React.useContext(ForceTitleContext)\n\n let [path, symbol] = _symbol.replace(\".svg\", \"\").split(\"#\")\n let uid = uniqueId(`${symbol}-`)\n let title = _title ? _title : useSymbolAsTitle ? symbol : \"\"\n let optionalAttrs =\n title || description\n ? {\n \"aria-labelledby\": [\n title && `title-${uid}`,\n description && `desc-${uid}`,\n ]\n .filter(Boolean)\n .join(\" \"),\n }\n : null\n\n return (\n <svg\n role={role}\n className={[\"symbol\", className].join(\" \").trim()}\n {...optionalAttrs}\n {...platformProps}\n >\n {title && <title id={`title-${uid}`}>{title}</title>}\n {description && <desc id={`desc-${uid}`}>{description}</desc>}\n <use xlinkHref={`${path}.svg#${symbol}`} />\n </svg>\n )\n}\n"],"names":["ForceTitleContext","React","createContext","Symbol","_ref","className","symbol","_symbol","title","_title","description","role","platformProps","useSymbolAsTitle","useContext","path","replace","split","uid","uniqueId","optionalAttrs","filter","Boolean","join","createElement","_extends","trim","id","xlinkHref"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,MAAMA,iBAAiB,gBAAGC,KAAK,CAACC,aAAa,CAAC,KAAK;AAEnD,SAASC,MAAMA,CAAAC,IAAA,EAOnB;EAAA,IAPoB;IACrBC,SAAS;AACTC,IAAAA,MAAM,EAAEC,OAAO;IACfC,KAAK,EAAEC,MAAM,GAAG,EAAE;AAClBC,IAAAA,WAAW,GAAG,EAAE;AAChBC,IAAAA,IAAI,GAAG,KAAK;IACZ,GAAGC;AACL,GAAC,GAAAR,IAAA;AACC,EAAA,IAAIS,gBAAgB,GAAGZ,KAAK,CAACa,UAAU,CAACd,iBAAiB,CAAC;AAE1D,EAAA,IAAI,CAACe,IAAI,EAAET,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
+ import uniqueId from 'lodash.uniqueid';
3
+
4
+ function _extends() {
5
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
6
+ for (var i = 1; i < arguments.length; i++) {
7
+ var source = arguments[i];
8
+ for (var key in source) {
9
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
10
+ target[key] = source[key];
11
+ }
12
+ }
13
+ }
14
+ return target;
15
+ };
16
+ return _extends.apply(this, arguments);
17
+ }
18
+
19
+ const ForceTitleContext = /*#__PURE__*/React.createContext(false);
20
+ function Symbol(_ref) {
21
+ let {
22
+ className,
23
+ symbol: _symbol,
24
+ title: _title = "",
25
+ description = "",
26
+ role = "img",
27
+ ...platformProps
28
+ } = _ref;
29
+ let useSymbolAsTitle = React.useContext(ForceTitleContext);
30
+ let [path, symbol] = _symbol.replace(".svg", "").split("#");
31
+ let uid = uniqueId(`${symbol}-`);
32
+ let title = _title ? _title : useSymbolAsTitle ? symbol : "";
33
+ let optionalAttrs = title || description ? {
34
+ "aria-labelledby": [title && `title-${uid}`, description && `desc-${uid}`].filter(Boolean).join(" ")
35
+ } : null;
36
+ return /*#__PURE__*/React.createElement("svg", _extends({
37
+ role: role,
38
+ className: ["symbol", className].join(" ").trim()
39
+ }, optionalAttrs, platformProps), title && /*#__PURE__*/React.createElement("title", {
40
+ id: `title-${uid}`
41
+ }, title), description && /*#__PURE__*/React.createElement("desc", {
42
+ id: `desc-${uid}`
43
+ }, description), /*#__PURE__*/React.createElement("use", {
44
+ xlinkHref: `${path}.svg#${symbol}`
45
+ }));
46
+ }
47
+
48
+ export { ForceTitleContext, Symbol };
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/symbol.js"],"sourcesContent":["import React from \"react\"\nimport uniqueId from \"lodash.uniqueid\"\n\nexport const ForceTitleContext = React.createContext(false)\n\nexport function Symbol({\n className,\n symbol: _symbol,\n title: _title = \"\",\n description = \"\",\n role = \"img\",\n ...platformProps\n}) {\n let useSymbolAsTitle = React.useContext(ForceTitleContext)\n\n let [path, symbol] = _symbol.replace(\".svg\", \"\").split(\"#\")\n let uid = uniqueId(`${symbol}-`)\n let title = _title ? _title : useSymbolAsTitle ? symbol : \"\"\n let optionalAttrs =\n title || description\n ? {\n \"aria-labelledby\": [\n title && `title-${uid}`,\n description && `desc-${uid}`,\n ]\n .filter(Boolean)\n .join(\" \"),\n }\n : null\n\n return (\n <svg\n role={role}\n className={[\"symbol\", className].join(\" \").trim()}\n {...optionalAttrs}\n {...platformProps}\n >\n {title && <title id={`title-${uid}`}>{title}</title>}\n {description && <desc id={`desc-${uid}`}>{description}</desc>}\n <use xlinkHref={`${path}.svg#${symbol}`} />\n </svg>\n )\n}\n"],"names":["ForceTitleContext","React","createContext","Symbol","_ref","className","symbol","_symbol","title","_title","description","role","platformProps","useSymbolAsTitle","useContext","path","replace","split","uid","uniqueId","optionalAttrs","filter","Boolean","join","createElement","_extends","trim","id","xlinkHref"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAMA,iBAAiB,gBAAGC,KAAK,CAACC,aAAa,CAAC,KAAK;AAEnD,SAASC,MAAMA,CAAAC,IAAA,EAOnB;EAAA,IAPoB;IACrBC,SAAS;AACTC,IAAAA,MAAM,EAAEC,OAAO;IACfC,KAAK,EAAEC,MAAM,GAAG,EAAE;AAClBC,IAAAA,WAAW,GAAG,EAAE;AAChBC,IAAAA,IAAI,GAAG,KAAK;IACZ,GAAGC;AACL,GAAC,GAAAR,IAAA;AACC,EAAA,IAAIS,gBAAgB,GAAGZ,KAAK,CAACa,UAAU,CAACd,iBAAiB,CAAC;AAE1D,EAAA,IAAI,CAACe,IAAI,EAAET,MAAM,CAAC,GAAGC,OAAO,CAACS,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;AAC3D,EAAA,IAAIC,GAAG,GAAGC,QAAQ,CAAE,CAAEb,EAAAA,MAAO,GAAE,CAAC;EAChC,IAAIE,KAAK,GAAGC,MAAM,GAAGA,MAAM,GAAGI,gBAAgB,GAAGP,MAAM,GAAG,EAAE;AAC5D,EAAA,IAAIc,aAAa,GACfZ,KAAK,IAAIE,WAAW,GAChB;IACE,iBAAiB,EAAE,CACjBF,KAAK,IAAK,SAAQU,GAAI,CAAA,CAAC,EACvBR,WAAW,IAAK,CAAA,KAAA,EAAOQ,GAAI,CAAC,CAAA,CAC7B,CACEG,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG;AACb,GAAC,GACD,IAAI;AAEV,EAAA,oBACEtB,KAAA,CAAAuB,aAAA,CAAA,KAAA,EAAAC,QAAA,CAAA;AACEd,IAAAA,IAAI,EAAEA,IAAK;AACXN,IAAAA,SAAS,EAAE,CAAC,QAAQ,EAAEA,SAAS,CAAC,CAACkB,IAAI,CAAC,GAAG,CAAC,CAACG,IAAI;GAC3CN,EAAAA,aAAa,EACbR,aAAa,CAAA,EAEhBJ,KAAK,iBAAIP,KAAA,CAAAuB,aAAA,CAAA,OAAA,EAAA;IAAOG,EAAE,EAAG,SAAQT,GAAI,CAAA;AAAE,GAAA,EAAEV,KAAa,CAAC,EACnDE,WAAW,iBAAIT,KAAA,CAAAuB,aAAA,CAAA,MAAA,EAAA;IAAMG,EAAE,EAAG,QAAOT,GAAI,CAAA;AAAE,GAAA,EAAER,WAAkB,CAAC,eAC7DT,KAAA,CAAAuB,aAAA,CAAA,KAAA,EAAA;AAAKI,IAAAA,SAAS,EAAG,CAAA,EAAEb,IAAK,CAAA,KAAA,EAAOT,MAAO,CAAA;AAAE,GAAE,CACvC,CAAC;AAEV;;;;"}
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var uniqueId = require('lodash.uniqueid');
5
+
6
+ function _extends() {
7
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
8
+ for (var i = 1; i < arguments.length; i++) {
9
+ var source = arguments[i];
10
+ for (var key in source) {
11
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
12
+ target[key] = source[key];
13
+ }
14
+ }
15
+ }
16
+ return target;
17
+ };
18
+ return _extends.apply(this, arguments);
19
+ }
20
+
21
+ const ForceTitleContext = /*#__PURE__*/React.createContext(false);
22
+ function Symbol(_ref) {
23
+ let {
24
+ className,
25
+ symbol: _symbol,
26
+ title: _title = "",
27
+ description = "",
28
+ role = "img",
29
+ ...platformProps
30
+ } = _ref;
31
+ let useSymbolAsTitle = React.useContext(ForceTitleContext);
32
+ let [path, symbol] = _symbol.replace(".svg", "").split("#");
33
+ let uid = uniqueId(`${symbol}-`);
34
+ let title = _title ? _title : useSymbolAsTitle ? symbol : "";
35
+ let optionalAttrs = title || description ? {
36
+ "aria-labelledby": [title && `title-${uid}`, description && `desc-${uid}`].filter(Boolean).join(" ")
37
+ } : null;
38
+ return /*#__PURE__*/React.createElement("svg", _extends({
39
+ role: role,
40
+ className: ["symbol", className].join(" ").trim()
41
+ }, optionalAttrs, platformProps), title && /*#__PURE__*/React.createElement("title", {
42
+ id: `title-${uid}`
43
+ }, title), description && /*#__PURE__*/React.createElement("desc", {
44
+ id: `desc-${uid}`
45
+ }, description), /*#__PURE__*/React.createElement("use", {
46
+ xlinkHref: `${path}.svg#${symbol}`
47
+ }));
48
+ }
49
+
50
+ exports.ForceTitleContext = ForceTitleContext;
51
+ exports.Symbol = Symbol;
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/symbol.js"],"sourcesContent":["import React from \"react\"\nimport uniqueId from \"lodash.uniqueid\"\n\nexport const ForceTitleContext = React.createContext(false)\n\nexport function Symbol({\n className,\n symbol: _symbol,\n title: _title = \"\",\n description = \"\",\n role = \"img\",\n ...platformProps\n}) {\n let useSymbolAsTitle = React.useContext(ForceTitleContext)\n\n let [path, symbol] = _symbol.replace(\".svg\", \"\").split(\"#\")\n let uid = uniqueId(`${symbol}-`)\n let title = _title ? _title : useSymbolAsTitle ? symbol : \"\"\n let optionalAttrs =\n title || description\n ? {\n \"aria-labelledby\": [\n title && `title-${uid}`,\n description && `desc-${uid}`,\n ]\n .filter(Boolean)\n .join(\" \"),\n }\n : null\n\n return (\n <svg\n role={role}\n className={[\"symbol\", className].join(\" \").trim()}\n {...optionalAttrs}\n {...platformProps}\n >\n {title && <title id={`title-${uid}`}>{title}</title>}\n {description && <desc id={`desc-${uid}`}>{description}</desc>}\n <use xlinkHref={`${path}.svg#${symbol}`} />\n </svg>\n )\n}\n"],"names":["ForceTitleContext","React","createContext","Symbol","_ref","className","symbol","_symbol","title","_title","description","role","platformProps","useSymbolAsTitle","useContext","path","replace","split","uid","uniqueId","optionalAttrs","filter","Boolean","join","createElement","_extends","trim","id","xlinkHref"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGO,MAAMA,iBAAiB,gBAAGC,KAAK,CAACC,aAAa,CAAC,KAAK;AAEnD,SAASC,MAAMA,CAAAC,IAAA,EAOnB;EAAA,IAPoB;IACrBC,SAAS;AACTC,IAAAA,MAAM,EAAEC,OAAO;IACfC,KAAK,EAAEC,MAAM,GAAG,EAAE;AAClBC,IAAAA,WAAW,GAAG,EAAE;AAChBC,IAAAA,IAAI,GAAG,KAAK;IACZ,GAAGC;AACL,GAAC,GAAAR,IAAA;AACC,EAAA,IAAIS,gBAAgB,GAAGZ,KAAK,CAACa,UAAU,CAACd,iBAAiB,CAAC;AAE1D,EAAA,IAAI,CAACe,IAAI,EAAET,MAAM,CAAC,GAAGC,OAAO,CAACS,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;AAC3D,EAAA,IAAIC,GAAG,GAAGC,QAAQ,CAAE,CAAEb,EAAAA,MAAO,GAAE,CAAC;EAChC,IAAIE,KAAK,GAAGC,MAAM,GAAGA,MAAM,GAAGI,gBAAgB,GAAGP,MAAM,GAAG,EAAE;AAC5D,EAAA,IAAIc,aAAa,GACfZ,KAAK,IAAIE,WAAW,GAChB;IACE,iBAAiB,EAAE,CACjBF,KAAK,IAAK,SA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