@local-civics/hub-ui 0.1.60 → 0.1.62
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/index.d.ts +1 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useCallback } from 'react';
|
|
3
|
+
import 'external-svg-loader';
|
|
3
4
|
import LinkifyIt from 'linkify-it';
|
|
4
5
|
import reactStringReplace from 'react-string-replace';
|
|
5
6
|
|
|
@@ -3012,7 +3013,8 @@ const BadgeEmblem = (props) => {
|
|
|
3012
3013
|
return ["h-max w-32", "w-16 h-16"];
|
|
3013
3014
|
}
|
|
3014
3015
|
})();
|
|
3015
|
-
|
|
3016
|
+
const hasIcon = !!props.icon || !!props.iconURL;
|
|
3017
|
+
return /* @__PURE__ */ React.createElement("div", { className: `relative overflow-hidden ${size[0]}` }, !hasIcon && /* @__PURE__ */ React.createElement("img", { className: "w-full h-full object-cover", alt: props.alt, src: props.imageURL }), hasIcon && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3016
3018
|
"svg",
|
|
3017
3019
|
{
|
|
3018
3020
|
className: "h-full w-full drop-shadow-[inherit]",
|
|
@@ -3048,7 +3050,7 @@ const BadgeEmblem = (props) => {
|
|
|
3048
3050
|
strokeWidth: "44"
|
|
3049
3051
|
}
|
|
3050
3052
|
)
|
|
3051
|
-
), /* @__PURE__ */ React.createElement("div", { className: `absolute overflow-hidden left-0 right-0 top-0 bottom-0 m-auto text-dark-blue-400 ${size[1]}` }, /* @__PURE__ */ React.createElement(Icon, { name: props.icon }))));
|
|
3053
|
+
), /* @__PURE__ */ React.createElement("div", { className: `absolute overflow-hidden left-0 right-0 top-0 bottom-0 m-auto text-dark-blue-400 ${size[1]}` }, !props.iconURL && !!props.icon && /* @__PURE__ */ React.createElement(Icon, { name: props.icon }), props.iconURL && /* @__PURE__ */ React.createElement("svg", { className: "w-full h-full drop-shadow-[inherit]", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React.createElement("svg", { "data-cache": "disabled", "data-src": props.iconURL, width: "32", height: "32" })))));
|
|
3052
3054
|
};
|
|
3053
3055
|
|
|
3054
3056
|
const ordNumber$1 = (n) => {
|
|
@@ -3078,6 +3080,7 @@ const BadgeButton = (props) => {
|
|
|
3078
3080
|
BadgeEmblem,
|
|
3079
3081
|
{
|
|
3080
3082
|
icon: props.icon,
|
|
3083
|
+
iconURL: props.iconURL,
|
|
3081
3084
|
imageURL: props.imageURL,
|
|
3082
3085
|
alt: props.displayName,
|
|
3083
3086
|
level: props.level,
|