jcicl 0.0.52 → 0.0.54
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/base/Flex/Flex.d.ts +1 -0
- package/composite/ErrorBoundary/ErrorBoundary.d.ts +21 -0
- package/composite/ErrorBoundary/ErrorBoundary.js +49 -0
- package/composite/ErrorBoundary/index.d.ts +1 -0
- package/composite/ErrorBoundary/index.js +4 -0
- package/composite/WithLabel/WithLabel.d.ts +1 -0
- package/composite/WithLabel/WithLabel.js +10 -10
- package/composite/index.d.ts +1 -0
- package/composite/index.js +12 -10
- package/index.d.ts +1 -1
- package/index.js +24 -22
- package/package.json +1 -1
package/base/Flex/Flex.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ErrorBoundaryProps {
|
|
3
|
+
title: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
showDetails?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface ErrorBoundaryState {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
error: any;
|
|
10
|
+
errorInfo: any;
|
|
11
|
+
}
|
|
12
|
+
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
13
|
+
constructor(props: ErrorBoundaryProps);
|
|
14
|
+
static getDerivedStateFromError(error: any): {
|
|
15
|
+
hasError: boolean;
|
|
16
|
+
error: any;
|
|
17
|
+
};
|
|
18
|
+
componentDidCatch(error: any, errorInfo: any): void;
|
|
19
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
20
|
+
}
|
|
21
|
+
export default ErrorBoundary;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { n as a } from "../../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
import i from "../../base/Flex/Flex.js";
|
|
5
|
+
import s from "../../theme.js";
|
|
6
|
+
const h = a(i)`
|
|
7
|
+
width: 100%;
|
|
8
|
+
font-size: 24px;
|
|
9
|
+
color: ${s.colors.maroon};
|
|
10
|
+
background-color: ${s.colors.lightRed}aa;
|
|
11
|
+
padding: 16px;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
box-shadow: 0 0 13px -3px ${s.colors.maroon} inset;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
p {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
`, u = a("p")`
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
margin: 0 0 0 32px !important;
|
|
21
|
+
`;
|
|
22
|
+
class D extends m.Component {
|
|
23
|
+
constructor(r) {
|
|
24
|
+
super(r), this.state = { hasError: !1, error: null, errorInfo: null };
|
|
25
|
+
}
|
|
26
|
+
static getDerivedStateFromError(r) {
|
|
27
|
+
return { hasError: !0, error: r };
|
|
28
|
+
}
|
|
29
|
+
componentDidCatch(r, t) {
|
|
30
|
+
console.error("Error:", r), this.setState({ ...this.state, errorInfo: t });
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
const { title: r, children: t, showDetails: l = !0 } = this.props;
|
|
34
|
+
if (this.state.hasError) {
|
|
35
|
+
const { error: p, errorInfo: o } = this.state;
|
|
36
|
+
return /* @__PURE__ */ n(i, { column: !0, width: "100%", alignItems: "center", gap: "32px", padding: "16px 64px", children: [
|
|
37
|
+
/* @__PURE__ */ e("h1", { children: r }),
|
|
38
|
+
l && /* @__PURE__ */ n(h, { children: [
|
|
39
|
+
/* @__PURE__ */ e("p", { children: `${p}` }),
|
|
40
|
+
o == null ? void 0 : o.componentStack.split("at").map((c, d) => d > 0 && /* @__PURE__ */ e(u, { children: `at ${c}` }))
|
|
41
|
+
] })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
D as default
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type ErrorBoundaryProps } from './ErrorBoundary';
|
|
@@ -2,6 +2,7 @@ import { FlexProps } from '../../../../../../../../../src/components/base/Flex/F
|
|
|
2
2
|
export interface WithLabelProps extends Omit<FlexProps, 'children'> {
|
|
3
3
|
label: string;
|
|
4
4
|
fontSize?: string;
|
|
5
|
+
gap?: string;
|
|
5
6
|
component: JSX.Element;
|
|
6
7
|
}
|
|
7
8
|
declare const WithLabel: React.FC<WithLabelProps>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../base/Flex/Flex.js";
|
|
3
|
+
const c = ({
|
|
4
4
|
label: r,
|
|
5
|
-
component:
|
|
6
|
-
fontSize:
|
|
7
|
-
styles:
|
|
8
|
-
...
|
|
9
|
-
}) => /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */ e(
|
|
5
|
+
component: i,
|
|
6
|
+
fontSize: n = "inherit",
|
|
7
|
+
styles: s,
|
|
8
|
+
...l
|
|
9
|
+
}) => /* @__PURE__ */ m(t, { gap: "0.5rem", alignItems: "center", styles: { ...s, fontSize: n }, ...l, children: [
|
|
10
|
+
/* @__PURE__ */ e(t, { id: r, children: i }),
|
|
11
11
|
/* @__PURE__ */ e("label", { htmlFor: r, children: r })
|
|
12
12
|
] });
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
c as default
|
|
15
15
|
};
|
package/composite/index.d.ts
CHANGED
package/composite/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { default as d } from "./
|
|
4
|
-
import { default as l } from "./
|
|
5
|
-
import { default as s } from "./
|
|
1
|
+
import { default as a } from "./ErrorBoundary/ErrorBoundary.js";
|
|
2
|
+
import { InfoCard as e } from "./InfoCard/InfoCard.js";
|
|
3
|
+
import { default as d } from "./List/List.js";
|
|
4
|
+
import { default as l } from "./LogoLoop/LogoLoop.js";
|
|
5
|
+
import { default as s } from "./WithLabel/WithLabel.js";
|
|
6
|
+
import { default as x } from "./WithLoading/WithLoading.js";
|
|
6
7
|
export {
|
|
7
|
-
a as
|
|
8
|
-
e as
|
|
9
|
-
d as
|
|
10
|
-
l as
|
|
11
|
-
s as
|
|
8
|
+
a as ErrorBoundary,
|
|
9
|
+
e as InfoCard,
|
|
10
|
+
d as List,
|
|
11
|
+
l as LogoLoop,
|
|
12
|
+
s as WithLabel,
|
|
13
|
+
x as WithLoading
|
|
12
14
|
};
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ZoomEntrance } from './animation';
|
|
2
2
|
export { Avatar, AvatarWithImage, Button, Divider, Flex, Grid, Icon, Input, LabeledValue, ListButton, Loading, ScrollContainer, } from './base';
|
|
3
|
-
export { InfoCard, List, LogoLoop, WithLabel, WithLoading } from './composite';
|
|
3
|
+
export { ErrorBoundary, InfoCard, List, LogoLoop, WithLabel, WithLoading } from './composite';
|
|
4
4
|
export { AppHeader, Nav } from './supercomposite';
|
|
5
5
|
export { AppContainer } from './templates';
|
package/index.js
CHANGED
|
@@ -8,37 +8,39 @@ import { Grid as i } from "./base/Grid/Grid.js";
|
|
|
8
8
|
import { default as g } from "./base/Icon/Icon.js";
|
|
9
9
|
import { Input as A } from "./base/Input/Input.js";
|
|
10
10
|
import { LabeledValue as c } from "./base/LabeledValue/LabeledValue.js";
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
11
|
+
import { default as B } from "./base/ListButton/ListButton.js";
|
|
12
|
+
import { default as W } from "./base/Loading/Loading.js";
|
|
13
|
+
import { default as E } from "./base/ScrollContainer/ScrollContainer.js";
|
|
14
|
+
import { default as D } from "./composite/ErrorBoundary/ErrorBoundary.js";
|
|
15
|
+
import { InfoCard as G } from "./composite/InfoCard/InfoCard.js";
|
|
16
|
+
import { default as N } from "./composite/List/List.js";
|
|
17
|
+
import { default as V } from "./composite/LogoLoop/LogoLoop.js";
|
|
18
|
+
import { default as j } from "./composite/WithLabel/WithLabel.js";
|
|
19
|
+
import { default as q } from "./composite/WithLoading/WithLoading.js";
|
|
20
|
+
import { default as z } from "./supercomposite/AppHeader/AppHeader.js";
|
|
21
|
+
import { Nav as K } from "./supercomposite/Nav/Nav.js";
|
|
22
|
+
import { default as O } from "./templates/AppContainer/AppContainer.js";
|
|
22
23
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
O as AppContainer,
|
|
25
|
+
z as AppHeader,
|
|
25
26
|
a as Avatar,
|
|
26
27
|
p as AvatarWithImage,
|
|
27
28
|
x as Button,
|
|
28
29
|
l as Divider,
|
|
30
|
+
D as ErrorBoundary,
|
|
29
31
|
s as Flex,
|
|
30
32
|
i as Grid,
|
|
31
33
|
g as Icon,
|
|
32
|
-
|
|
34
|
+
G as InfoCard,
|
|
33
35
|
A as Input,
|
|
34
36
|
c as LabeledValue,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
N as List,
|
|
38
|
+
B as ListButton,
|
|
39
|
+
W as Loading,
|
|
40
|
+
V as LogoLoop,
|
|
41
|
+
K as Nav,
|
|
42
|
+
E as ScrollContainer,
|
|
43
|
+
j as WithLabel,
|
|
44
|
+
q as WithLoading,
|
|
43
45
|
t as ZoomEntrance
|
|
44
46
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.54",
|
|
5
5
|
"description": "Component library for the websites of Johnson County Iowa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_git/JCComponentLibrary?path=%2FREADME.md&version=GBmaster",
|