@planningcenter/tapestry 1.5.1-rc.0 → 1.5.1-rc.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.
- package/dist/unstable.js +0 -2
- package/dist/unstable.js.map +1 -1
- package/dist/utilities/Icon.d.ts.map +1 -1
- package/dist/utilities/Icon.js +9 -4
- package/dist/utilities/Icon.js.map +1 -1
- package/dist/webComponents.css +527 -527
- package/dist/webComponents.css.map +1 -1
- package/package.json +2 -2
package/dist/unstable.js
CHANGED
|
@@ -2,9 +2,7 @@ export { Banner } from './components/Banner/Banner.js';
|
|
|
2
2
|
import './components/page-header/index.js';
|
|
3
3
|
import './components/sidenav/index.js';
|
|
4
4
|
import './components/button/Button.js';
|
|
5
|
-
import '@planningcenter/icons/paths/general';
|
|
6
5
|
import 'classnames';
|
|
7
|
-
import 'lodash';
|
|
8
6
|
import 'react';
|
|
9
7
|
import './components/button/BaseButton.js';
|
|
10
8
|
import './components/button/IconButton.js';
|
package/dist/unstable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unstable.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unstable.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/utilities/Icon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/utilities/Icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAmB7C,iBAAS,IAAI,CAAC,EACZ,MAAM,EAAE,CAAC,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAAC,aAAa,CAAC,qBAgBpD;AAED,eAAe,IAAI,CAAA"}
|
package/dist/utilities/Icon.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import * as general from '@planningcenter/icons/paths/general';
|
|
2
1
|
import classNames from 'classnames';
|
|
3
|
-
import { camelCase } from 'lodash';
|
|
4
2
|
import React from 'react';
|
|
5
3
|
|
|
6
|
-
const icons = {
|
|
4
|
+
const icons = {
|
|
5
|
+
general: {
|
|
6
|
+
"check-circle": "M8,0c2.1217,0 4.1566,0.84286 5.6569,2.34315c1.5002,1.50029 2.3431,3.53512 2.3431,5.65685c0,1.58225 -0.4692,3.129 -1.3482,4.4446c-0.8791,1.3156 -2.1285,2.3409 -3.5903,2.9464c-1.46184,0.6055 -3.07037,0.764 -4.62222,0.4553c-1.55185,-0.3087 -2.97731,-1.0706 -4.09613,-2.1894c-1.11882,-1.1189 -1.88075,-2.5443 -2.18943,-4.09618c-0.30868,-1.55185 -0.15025,-3.16038 0.45525,-4.62219c0.6055,-1.46181 1.63088,-2.71124 2.94647,-3.59029c1.31559,-0.87905 2.86231,-1.34824 4.44456,-1.34824zM12.57,6.07l-1.14,-1.14l-4.43,4.44l-2.43,-2.44l-1.14,1.14l3.57,3.56z",
|
|
7
|
+
"down-caret": "M13,6l-5,5l-5,-5z",
|
|
8
|
+
"exclamation-triangle": "M15.7713,14.0548c0.0002,0.133 -0.0347,0.2638 -0.1011,0.3791c-0.0664,0.1153 -0.162,0.211 -0.2772,0.2776c-0.1152,0.0665 -0.246,0.1015 -0.379,0.1015h-14.02801c-0.13305,0 -0.26377,-0.035 -0.37898,-0.1015c-0.11521,-0.0666 -0.21084,-0.1623 -0.27725,-0.2776c-0.06642,-0.1153 -0.10127,-0.2461 -0.10106,-0.3791c0.00022,-0.1331 0.0355,-0.2637 0.10229,-0.3788l7.014,-12.11501c0.06631,-0.11506 0.16176,-0.21062 0.27675,-0.27707c0.11498,-0.06644 0.24544,-0.10142 0.37825,-0.10142c0.1328,0 0.26326,0.03498 0.37824,0.10142c0.11499,0.06645 0.21044,0.16201 0.27676,0.27707l7.01401,12.11501c0.0668,0.1151 0.1021,0.2457 0.1023,0.3788zM8.75699,11.028h-1.514v1.514h1.514zM8.75699,6.48499h-1.514v3.029h1.514z",
|
|
9
|
+
"info-circle": "M8.8,4h-1.6v1.6h1.6zM8.8,7.2h-1.6v4.8h1.6zM8,0c2.1217,0 4.1566,0.84286 5.6569,2.34315c1.5002,1.50029 2.3431,3.53512 2.3431,5.65685c0,1.58225 -0.4692,3.129 -1.3482,4.4446c-0.8791,1.3156 -2.1285,2.3409 -3.5903,2.9464c-1.46184,0.6055 -3.07037,0.764 -4.62222,0.4553c-1.55185,-0.3087 -2.97731,-1.0706 -4.09613,-2.1894c-1.11882,-1.1189 -1.88075,-2.5443 -2.18943,-4.09618c-0.30868,-1.55185 -0.15025,-3.16038 0.45525,-4.62219c0.6055,-1.46181 1.63088,-2.71124 2.94647,-3.59029c1.31559,-0.87905 2.86231,-1.34824 4.44456,-1.34824z",
|
|
10
|
+
},
|
|
11
|
+
};
|
|
7
12
|
// ATTENTION: This is a temporary solution to load the icons.
|
|
8
13
|
// This should use the Symbol component from @planningcenter/icons/symbol
|
|
9
14
|
// once we have a way to load the SVGs in a way that doesn't break in
|
|
@@ -13,7 +18,7 @@ function Icon({ symbol: s, className, ...props }) {
|
|
|
13
18
|
if (!isValidCollection(collection)) {
|
|
14
19
|
throw new Error(`Unknown icon collection: ${collection}`);
|
|
15
20
|
}
|
|
16
|
-
const fullPath = icons[collection][
|
|
21
|
+
const fullPath = icons[collection][symbol];
|
|
17
22
|
return (React.createElement("svg", { role: "img", className: classNames("symbol", className), ...props },
|
|
18
23
|
React.createElement("path", { d: fullPath })));
|
|
19
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../src/utilities/Icon.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../src/utilities/Icon.tsx"],"sourcesContent":["import classNames from \"classnames\"\nimport React, { HTMLAttributes } from \"react\"\n\nconst icons = {\n general: {\n \"check-circle\":\n \"M8,0c2.1217,0 4.1566,0.84286 5.6569,2.34315c1.5002,1.50029 2.3431,3.53512 2.3431,5.65685c0,1.58225 -0.4692,3.129 -1.3482,4.4446c-0.8791,1.3156 -2.1285,2.3409 -3.5903,2.9464c-1.46184,0.6055 -3.07037,0.764 -4.62222,0.4553c-1.55185,-0.3087 -2.97731,-1.0706 -4.09613,-2.1894c-1.11882,-1.1189 -1.88075,-2.5443 -2.18943,-4.09618c-0.30868,-1.55185 -0.15025,-3.16038 0.45525,-4.62219c0.6055,-1.46181 1.63088,-2.71124 2.94647,-3.59029c1.31559,-0.87905 2.86231,-1.34824 4.44456,-1.34824zM12.57,6.07l-1.14,-1.14l-4.43,4.44l-2.43,-2.44l-1.14,1.14l3.57,3.56z\",\n \"down-caret\": \"M13,6l-5,5l-5,-5z\",\n \"exclamation-triangle\":\n \"M15.7713,14.0548c0.0002,0.133 -0.0347,0.2638 -0.1011,0.3791c-0.0664,0.1153 -0.162,0.211 -0.2772,0.2776c-0.1152,0.0665 -0.246,0.1015 -0.379,0.1015h-14.02801c-0.13305,0 -0.26377,-0.035 -0.37898,-0.1015c-0.11521,-0.0666 -0.21084,-0.1623 -0.27725,-0.2776c-0.06642,-0.1153 -0.10127,-0.2461 -0.10106,-0.3791c0.00022,-0.1331 0.0355,-0.2637 0.10229,-0.3788l7.014,-12.11501c0.06631,-0.11506 0.16176,-0.21062 0.27675,-0.27707c0.11498,-0.06644 0.24544,-0.10142 0.37825,-0.10142c0.1328,0 0.26326,0.03498 0.37824,0.10142c0.11499,0.06645 0.21044,0.16201 0.27676,0.27707l7.01401,12.11501c0.0668,0.1151 0.1021,0.2457 0.1023,0.3788zM8.75699,11.028h-1.514v1.514h1.514zM8.75699,6.48499h-1.514v3.029h1.514z\",\n \"info-circle\":\n \"M8.8,4h-1.6v1.6h1.6zM8.8,7.2h-1.6v4.8h1.6zM8,0c2.1217,0 4.1566,0.84286 5.6569,2.34315c1.5002,1.50029 2.3431,3.53512 2.3431,5.65685c0,1.58225 -0.4692,3.129 -1.3482,4.4446c-0.8791,1.3156 -2.1285,2.3409 -3.5903,2.9464c-1.46184,0.6055 -3.07037,0.764 -4.62222,0.4553c-1.55185,-0.3087 -2.97731,-1.0706 -4.09613,-2.1894c-1.11882,-1.1189 -1.88075,-2.5443 -2.18943,-4.09618c-0.30868,-1.55185 -0.15025,-3.16038 0.45525,-4.62219c0.6055,-1.46181 1.63088,-2.71124 2.94647,-3.59029c1.31559,-0.87905 2.86231,-1.34824 4.44456,-1.34824z\",\n },\n}\n\n// ATTENTION: This is a temporary solution to load the icons.\n// This should use the Symbol component from @planningcenter/icons/symbol\n// once we have a way to load the SVGs in a way that doesn't break in\n// other projects.\n\nfunction Icon({\n symbol: s,\n className,\n ...props\n}: { symbol: string } & HTMLAttributes<SVGSVGElement>) {\n const [collection, symbol] = s.split(\"#\") as [\n keyof typeof icons,\n keyof typeof icons.general,\n ]\n if (!isValidCollection(collection)) {\n throw new Error(`Unknown icon collection: ${collection}`)\n }\n\n const fullPath = icons[collection][symbol]\n\n return (\n <svg role=\"img\" className={classNames(\"symbol\", className)} {...props}>\n <path d={fullPath} />\n </svg>\n )\n}\n\nexport default Icon\n\nfunction isValidCollection(\n collection: string\n): collection is keyof typeof icons {\n return collection in icons\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,KAAK,GAAG;AACZ,IAAA,OAAO,EAAE;AACP,QAAA,cAAc,EACZ,miBAAmiB;AACriB,QAAA,YAAY,EAAE,mBAAmB;AACjC,QAAA,sBAAsB,EACpB,grBAAgrB;AAClrB,QAAA,aAAa,EACX,ygBAAygB;AAC5gB,KAAA;CACF,CAAA;AAED;AACA;AACA;AACA;AAEA,SAAS,IAAI,CAAC,EACZ,MAAM,EAAE,CAAC,EACT,SAAS,EACT,GAAG,KAAK,EAC2C,EAAA;AACnD,IAAA,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAGvC,CAAA;AACD,IAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE;AAClC,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,UAAU,CAAA,CAAE,CAAC,CAAA;KAC1D;IAED,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1C,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAC,KAAK,EAAC,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAM,KAAK,EAAA;AACnE,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAE,QAAQ,EAAI,CAAA,CACjB,EACP;AACH,CAAC;AAID,SAAS,iBAAiB,CACxB,UAAkB,EAAA;IAElB,OAAO,UAAU,IAAI,KAAK,CAAA;AAC5B;;;;"}
|