@sitecore/sc-contenthub-blok 0.0.12 → 0.0.14
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/BlokTheme.js +35 -39
- package/dist/BlokTheme.js.map +1 -1
- package/dist/Components/BlokAlert/BlokAlert.d.ts +27 -0
- package/dist/Components/BlokAlert/BlokAlert.js +26 -0
- package/dist/Components/BlokAlert/BlokAlert.js.map +1 -0
- package/dist/Components/BlokAlert/BlokAlert.spec.d.ts +1 -0
- package/dist/Components/BlokAlert/BlokAlert.spec.js +57 -0
- package/dist/Components/BlokAlert/BlokAlert.spec.js.map +1 -0
- package/dist/Components/BlokAlert/BlokAlert.stories.d.ts +9 -0
- package/dist/Components/BlokAlert/BlokAlert.stories.js +48 -0
- package/dist/Components/BlokAlert/BlokAlert.stories.js.map +1 -0
- package/dist/Components/BlokBadge/BlokBadge.js +2 -2
- package/dist/Components/BlokBadge/BlokBadge.js.map +1 -1
- package/dist/Components/BlokBadge/BlokBadge.stories.d.ts +3 -2
- package/dist/Components/BlokBadge/BlokBadge.stories.js.map +1 -1
- package/dist/Components/BlokButton/BlokButton.js +1 -1
- package/dist/Components/BlokButton/BlokButton.js.map +1 -1
- package/dist/Components/BlokButton/BlokButton.stories.d.ts +3 -2
- package/dist/Components/BlokButton/BlokButton.stories.js.map +1 -1
- package/dist/Components/BlokIcon/BlokIcon.d.ts +2 -2
- package/dist/Components/BlokIcon/BlokIcon.stories.d.ts +3 -2
- package/dist/Components/BlokIcon/BlokIcon.stories.js +1 -1
- package/dist/Components/BlokIcon/BlokIcon.stories.js.map +1 -1
- package/dist/Components/BlokIconButton/BlokIconButton.stories.d.ts +3 -2
- package/dist/Components/BlokIconButton/BlokIconButton.stories.js.map +1 -1
- package/dist/Components/BlokLabeledIcon/BlokLabeledIcon.d.ts +2 -1
- package/dist/Components/BlokLabeledIcon/BlokLabeledIcon.js +14 -3
- package/dist/Components/BlokLabeledIcon/BlokLabeledIcon.js.map +1 -1
- package/dist/Components/BlokLabeledIcon/BlokLabeledIcon.stories.d.ts +3 -2
- package/dist/Components/BlokLabeledIcon/BlokLabeledIcon.stories.js +1 -1
- package/dist/Components/BlokLabeledIcon/BlokLabeledIcon.stories.js.map +1 -1
- package/dist/Components/BlokLink/BlokLink.stories.d.ts +3 -2
- package/dist/Components/BlokLink/BlokLink.stories.js.map +1 -1
- package/dist/Components/BlokTag/BlokTag.stories.d.ts +3 -2
- package/dist/Components/BlokTag/BlokTag.stories.js.map +1 -1
- package/dist/Components/CoreComponents.d.ts +1 -0
- package/dist/Components/index.d.ts +2 -0
- package/dist/Components/index.js +2 -0
- package/dist/Components/index.js.map +1 -1
- package/dist/Foundations/Foundations.stories.d.ts +1 -1
- package/esm/BlokTheme.js +35 -39
- package/esm/BlokTheme.js.map +1 -1
- package/esm/Components/BlokAlert/BlokAlert.js +22 -0
- package/esm/Components/BlokAlert/BlokAlert.js.map +1 -0
- package/esm/Components/BlokBadge/BlokBadge.js +2 -2
- package/esm/Components/BlokBadge/BlokBadge.js.map +1 -1
- package/esm/Components/BlokButton/BlokButton.js +1 -1
- package/esm/Components/BlokButton/BlokButton.js.map +1 -1
- package/esm/Components/BlokLabeledIcon/BlokLabeledIcon.js +15 -4
- package/esm/Components/BlokLabeledIcon/BlokLabeledIcon.js.map +1 -1
- package/esm/Components/index.js +2 -0
- package/esm/Components/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { css, cx } from "@emotion/css";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import { borderRadiusBase, colorMap, fontSizeSmall, fontWeightBold, } from "../../Foundations";
|
|
4
|
+
import { borderRadiusBase, borderRadiusFull, colorMap, fontSizeSmall, fontWeightBold, } from "../../Foundations";
|
|
5
5
|
import { BlokIcon } from "../BlokIcon/BlokIcon";
|
|
6
6
|
const classes = {
|
|
7
7
|
labeledIcon: css({
|
|
@@ -20,14 +20,25 @@ const classes = {
|
|
|
20
20
|
}),
|
|
21
21
|
labeledIconBackground: css({
|
|
22
22
|
padding: "0.25rem",
|
|
23
|
+
justifyContent: "center",
|
|
24
|
+
}),
|
|
25
|
+
round: css({
|
|
26
|
+
borderRadius: borderRadiusFull,
|
|
27
|
+
minWidth: "32px",
|
|
28
|
+
minHeight: "32px",
|
|
29
|
+
".m-icon": {
|
|
30
|
+
fontSize: "1.2rem",
|
|
31
|
+
},
|
|
23
32
|
}),
|
|
24
33
|
};
|
|
25
|
-
export const BlokLabeledIcon = ({ iconName, children, colorTarget = "foreground", colorScheme = "neutral", fontSize = fontSizeSmall, className, ...extraProps }) => {
|
|
34
|
+
export const BlokLabeledIcon = ({ iconName, children, colorTarget = "foreground", colorScheme = "neutral", fontSize = fontSizeSmall, isRound = false, className, ...extraProps }) => {
|
|
26
35
|
const styles = useMemo(() => {
|
|
27
36
|
if (colorTarget === "background") {
|
|
28
37
|
return {
|
|
29
38
|
backgroundColor: colorMap[colorScheme]?.[100],
|
|
30
|
-
color:
|
|
39
|
+
color: isRound
|
|
40
|
+
? colorMap[colorScheme]?.[500]
|
|
41
|
+
: colorMap[colorScheme]?.[300],
|
|
31
42
|
fontSize,
|
|
32
43
|
};
|
|
33
44
|
}
|
|
@@ -40,6 +51,6 @@ export const BlokLabeledIcon = ({ iconName, children, colorTarget = "foreground"
|
|
|
40
51
|
}, [children, colorScheme, colorTarget, fontSize]);
|
|
41
52
|
return (_jsxs("span", { style: styles, className: cx(classes.labeledIcon, colorTarget === "background"
|
|
42
53
|
? classes.labeledIconBackground
|
|
43
|
-
: undefined, className), ...extraProps, children: [iconName && _jsx(BlokIcon, { icon: iconName }), children] }));
|
|
54
|
+
: undefined, isRound ? classes.round : undefined, className), ...extraProps, children: [iconName && _jsx(BlokIcon, { icon: iconName }), children] }));
|
|
44
55
|
};
|
|
45
56
|
//# sourceMappingURL=BlokLabeledIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlokLabeledIcon.js","sourceRoot":"","sources":["../../../src/Components/BlokLabeledIcon/BlokLabeledIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAyB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EACL,gBAAgB,EAChB,QAAQ,EAER,aAAa,EACb,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"BlokLabeledIcon.js","sourceRoot":"","sources":["../../../src/Components/BlokLabeledIcon/BlokLabeledIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAyB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EAER,aAAa,EACb,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAiB,MAAM,sBAAsB,CAAC;AAE/D,MAAM,OAAO,GAAG;IACd,WAAW,EAAE,GAAG,CAAC;QACf,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;QACN,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,UAAU;QACxB,QAAQ,EAAE,aAAa;QACvB,UAAU,EAAE,cAAc;QAC1B,YAAY,EAAE,gBAAgB;QAE9B,SAAS,EAAE;YACT,QAAQ,EAAE,OAAO;SAClB;KACF,CAAC;IACF,qBAAqB,EAAE,GAAG,CAAC;QACzB,OAAO,EAAE,SAAS;QAClB,cAAc,EAAE,QAAQ;KACzB,CAAC;IACF,KAAK,EAAE,GAAG,CAAC;QACT,YAAY,EAAE,gBAAgB;QAC9B,QAAQ,EAAE,M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ACG,UAAU,aAEb,QAAQ,IAAI,KAAC,QAAQ,IAAC,IAAI,EAAE,QAAQ,GAAI,EACxC,QAAQ,IACJ,CACR,CAAC;AACJ,CAAC,CAAC"}
|
package/esm/Components/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
export * from "./BlokAlert/BlokAlert";
|
|
1
2
|
export * from "./BlokBadge/BlokBadge";
|
|
2
3
|
export * from "./BlokButton/BlokButton";
|
|
3
4
|
export * from "./BlokIcon/BlokIcon";
|
|
4
5
|
export * from "./BlokIcon/BlokIconContext";
|
|
5
6
|
export * from "./BlokIconButton/BlokIconButton";
|
|
7
|
+
export * from "./BlokLabeledIcon/BlokLabeledIcon";
|
|
6
8
|
export * from "./BlokLink/BlokLink";
|
|
7
9
|
export * from "./BlokTag/BlokTag";
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
|