Skip to content

Commit f9e3d6e

Browse files
authored
Merge pull request #19 from make-software/bugfix/corrected-a11y-contrast-issues
Corrected a11y contrast issues and small bugfixes
2 parents 563dba9 + 883a03d commit f9e3d6e

7 files changed

Lines changed: 23 additions & 10 deletions

File tree

dist/cspr-design.es.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,12 @@ const ei = S("span").withConfig({
163163
...c && {
164164
cursor: "pointer"
165165
}
166-
})), jn = ge.forwardRef((e, t) => /* @__PURE__ */ h(dl, { ref: t, ...e })), J = ge.forwardRef((e, t) => /* @__PURE__ */ h(jn, { ref: t, direction: "row", ...e })), Ee = ge.forwardRef((e, t) => /* @__PURE__ */ h(jn, { ref: t, direction: "column", ...e }));
166+
})), jn = ge.forwardRef((e, t) => {
167+
const {
168+
tag: n = "div"
169+
} = e, r = ["div", "span"].includes(n) ? n : "div";
170+
return /* @__PURE__ */ h(dl, { ref: t, ...e, as: r });
171+
}), J = ge.forwardRef((e, t) => /* @__PURE__ */ h(jn, { ref: t, direction: "row", ...e })), Ee = ge.forwardRef((e, t) => /* @__PURE__ */ h(jn, { ref: t, direction: "column", ...e }));
167172
var fl = (e) => typeof e != "string" ? {} : e.split(/ ?; ?/).reduce((t, n) => {
168173
const [r, i] = n.split(/ ?: ?/).map((o, s) => s === 0 ? o.replace(/\s+/g, "") : o.trim());
169174
if (r && i) {
@@ -13006,7 +13011,7 @@ function dC({
1300613011
}, e);
1300713012
(t == null || t < 0 || t > 100) && (t = 0);
1300813013
const s = o - i / 2, a = s * 2 * Math.PI, l = a - t / 100 * a, c = t.toPrecision(3), u = qf(t);
13009-
return /* @__PURE__ */ z(J, { align: "center", children: [
13014+
return /* @__PURE__ */ z(J, { align: "center", tag: "span", children: [
1301013015
/* @__PURE__ */ z("svg", { height: o * 2, width: o * 2, children: [
1301113016
/* @__PURE__ */ h("title", { children: r }),
1301213017
/* @__PURE__ */ h("circle", { stroke: u, fill: "transparent", strokeWidth: i, strokeDasharray: a + " " + a, style: {
@@ -20612,7 +20617,7 @@ const wa = new RegExp(`(${Object.values(Qr).join("|")})(?=[0-9a-fA-F])`, "i"), I
2061220617
fillBlueGradient: "linear-gradient(89.56deg, #0021A5 0%, #2C53EF 75.01%)",
2061320618
fillLoadingInTable: "linear-gradient(90deg, #F2F3F5 0%, rgba(255, 255, 255, 0) 100%)",
2061420619
contentPrimary: "#1A1919",
20615-
contentSecondary: "#84868C",
20620+
contentSecondary: "#72737A",
2061620621
contentTertiary: "#BABBBF",
2061720622
contentQuaternary: "#D2D3D9",
2061820623
contentOnFill: "#FFFFFF",

dist/cspr-design.umd.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/components/flex-box/flex-box.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface FlexBoxProps extends BaseProps {
1111
grow?: React.CSSProperties['flexGrow'];
1212
shrink?: React.CSSProperties['flexShrink'];
1313
basis?: React.CSSProperties['flexBasis'];
14+
tag?: 'div' | 'span';
1415
}
1516
export declare const FlexBox: React.ForwardRefExoticComponent<FlexBoxProps & React.RefAttributes<HTMLDivElement>>;
1617
export default FlexBox;

dist/lib/components/flex-box/flex-box.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/circular-indicator/circular-indicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function CircularIndicator({
138138
const color = calculatePerfomanceGradientColor(progress);
139139

140140
return (
141-
<FlexRow align="center">
141+
<FlexRow align="center" tag={"span"}>
142142
<svg height={radius * 2} width={radius * 2}>
143143
<title>{title}</title>
144144
<circle

src/lib/components/flex-box/flex-box.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface FlexBoxProps extends BaseProps {
1616
grow?: React.CSSProperties['flexGrow'];
1717
shrink?: React.CSSProperties['flexShrink'];
1818
basis?: React.CSSProperties['flexBasis'];
19+
tag?: 'div' | 'span';
1920
}
2021

2122
const StyledFlexBox = styled('div')<FlexBoxProps>(
@@ -55,7 +56,13 @@ const StyledFlexBox = styled('div')<FlexBoxProps>(
5556
);
5657

5758
export const FlexBox = React.forwardRef<HTMLDivElement, FlexBoxProps>(
58-
(props, ref) => <StyledFlexBox ref={ref} {...props} />
59+
(props, ref) => {
60+
const {tag = 'div'} = props;
61+
const validTag = ['div', 'span'].includes(tag) ? tag : 'div';
62+
return (
63+
<StyledFlexBox ref={ref} {...props} as={validTag}/>
64+
)
65+
}
5966
);
6067

6168
export default FlexBox;

src/lib/theme-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export const themeConfig: ThemeConfigType = {
242242
fillLoadingInTable:
243243
'linear-gradient(90deg, #F2F3F5 0%, rgba(255, 255, 255, 0) 100%)',
244244
contentPrimary: '#1A1919',
245-
contentSecondary: '#84868C',
245+
contentSecondary: '#72737A',
246246
contentTertiary: '#BABBBF',
247247
contentQuaternary: '#D2D3D9',
248248
contentOnFill: '#FFFFFF',

0 commit comments

Comments
 (0)