@canonical/maas-react-components 1.0.0 → 1.1.0
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/README.md +15 -3
- package/dist/@canonical/maas-react-components.es.js +189 -0
- package/dist/@canonical/maas-react-components.umd.js +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/src/lib/elements/ExternalLink/ExternalLink.d.ts +7 -0
- package/dist/src/lib/elements/ExternalLink/ExternalLink.stories.d.ts +10 -0
- package/dist/src/lib/elements/ExternalLink/ExternalLink.test.d.ts +1 -0
- package/dist/src/lib/elements/ExternalLink/index.d.ts +1 -0
- package/dist/src/lib/elements/Meter/Meter.d.ts +40 -0
- package/dist/src/lib/elements/Meter/Meter.stories.d.ts +17 -0
- package/dist/src/lib/elements/Meter/Meter.test.d.ts +1 -0
- package/dist/src/lib/elements/Meter/index.d.ts +1 -0
- package/dist/src/lib/elements/index.d.ts +2 -0
- package/dist/src/lib/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/vitest-setup.d.ts +0 -0
- package/package.json +22 -2
- package/dist/canonical-maas-react-components-1.0.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# MAAS React Components
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<br />
|
|
6
|
+
<img src="https://assets.ubuntu.com/v1/142ae045-Canonical%20MAAS.png" alt="Canonical MAAS" width="180" />
|
|
7
|
+
|
|
8
|
+
<br />
|
|
9
|
+
<br />
|
|
10
|
+
|
|
11
|
+
Library of React components for use in MAAS UI projects.
|
|
4
12
|
|
|
5
|
-
It contains components that are either specific to, or only used in MAAS. General purpose components should be added to
|
|
13
|
+
It contains components that are either specific to, or only used in MAAS. <br /> General purpose components should be added to
|
|
6
14
|
[@canonical/react-components](https://github.com/canonical/react-components) instead.
|
|
7
15
|
|
|
8
|
-
|
|
16
|
+
**[Storybook](https://canonical.github.io/maas-react-components/)** | **[Philosophy and guidelines](GUIDELINES.md)**
|
|
17
|
+
|
|
18
|
+
<hr />
|
|
19
|
+
|
|
20
|
+
</div>
|
|
9
21
|
|
|
10
22
|
## Getting started
|
|
11
23
|
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { jsxs as _, jsx as d, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as E, useState as j, useEffect as O, useCallback as B } from "react";
|
|
3
|
+
import { useListener as M, Link as D } from "@canonical/react-components";
|
|
4
|
+
function L(e) {
|
|
5
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
+
}
|
|
7
|
+
var y = { exports: {} };
|
|
8
|
+
/*!
|
|
9
|
+
Copyright (c) 2018 Jed Watson.
|
|
10
|
+
Licensed under the MIT License (MIT), see
|
|
11
|
+
http://jedwatson.github.io/classnames
|
|
12
|
+
*/
|
|
13
|
+
(function(e) {
|
|
14
|
+
(function() {
|
|
15
|
+
var r = {}.hasOwnProperty;
|
|
16
|
+
function s() {
|
|
17
|
+
for (var n = [], o = 0; o < arguments.length; o++) {
|
|
18
|
+
var t = arguments[o];
|
|
19
|
+
if (t) {
|
|
20
|
+
var l = typeof t;
|
|
21
|
+
if (l === "string" || l === "number")
|
|
22
|
+
n.push(t);
|
|
23
|
+
else if (Array.isArray(t)) {
|
|
24
|
+
if (t.length) {
|
|
25
|
+
var i = s.apply(null, t);
|
|
26
|
+
i && n.push(i);
|
|
27
|
+
}
|
|
28
|
+
} else if (l === "object") {
|
|
29
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) {
|
|
30
|
+
n.push(t.toString());
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
for (var u in t)
|
|
34
|
+
r.call(t, u) && t[u] && n.push(u);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return n.join(" ");
|
|
39
|
+
}
|
|
40
|
+
e.exports ? (s.default = s, e.exports = s) : window.classNames = s;
|
|
41
|
+
})();
|
|
42
|
+
})(y);
|
|
43
|
+
var W = y.exports;
|
|
44
|
+
const k = /* @__PURE__ */ L(W);
|
|
45
|
+
const f = {
|
|
46
|
+
caution: "#F99B11",
|
|
47
|
+
light: "#F7F7F7",
|
|
48
|
+
linkFaded: "#D3E4ED",
|
|
49
|
+
link: "#0066CC",
|
|
50
|
+
negative: "#C7162B",
|
|
51
|
+
positiveFaded: "#B7CCB9",
|
|
52
|
+
positiveMid: "#4DAB4D",
|
|
53
|
+
positive: "#0E8420"
|
|
54
|
+
}, J = [
|
|
55
|
+
f.link,
|
|
56
|
+
f.positive,
|
|
57
|
+
f.negative,
|
|
58
|
+
f.caution
|
|
59
|
+
], A = f.linkFaded, R = f.caution, z = f.light, C = 2, w = 1, S = (e, r, s) => {
|
|
60
|
+
var t, l;
|
|
61
|
+
const n = ((l = (t = e == null ? void 0 : e.current) == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : l.width) || 0, o = n > r * C ? n / r : C;
|
|
62
|
+
s(o);
|
|
63
|
+
}, p = {
|
|
64
|
+
bar: "meter-bar",
|
|
65
|
+
container: "meter-container",
|
|
66
|
+
filled: "meter-filled",
|
|
67
|
+
label: "meter-label",
|
|
68
|
+
meteroverflow: "meter-overflow",
|
|
69
|
+
segments: "meter-segments"
|
|
70
|
+
}, I = ({
|
|
71
|
+
data: e,
|
|
72
|
+
datumWidths: r,
|
|
73
|
+
maximum: s,
|
|
74
|
+
overColor: n,
|
|
75
|
+
segmentWidth: o,
|
|
76
|
+
separatorColor: t
|
|
77
|
+
}) => {
|
|
78
|
+
const l = () => e.reduce((m, a) => m + a.value, 0) > s, i = (m, a) => ({
|
|
79
|
+
backgroundColor: m.color,
|
|
80
|
+
left: `${r.reduce(
|
|
81
|
+
(v, c, h) => a > h ? v + c : v,
|
|
82
|
+
0
|
|
83
|
+
)}%`,
|
|
84
|
+
width: `${r[a]}%`
|
|
85
|
+
}), u = () => ({
|
|
86
|
+
background: `repeating-linear-gradient(
|
|
87
|
+
to right,
|
|
88
|
+
transparent 0,
|
|
89
|
+
transparent ${o - w}px,
|
|
90
|
+
${t} ${o - w}px,
|
|
91
|
+
${t} ${o}px
|
|
92
|
+
)`
|
|
93
|
+
});
|
|
94
|
+
return /* @__PURE__ */ _($, { children: [
|
|
95
|
+
l() ? /* @__PURE__ */ d(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: "p-meter__filled",
|
|
99
|
+
"data-testid": p.meteroverflow,
|
|
100
|
+
style: { backgroundColor: n, width: "100%" }
|
|
101
|
+
}
|
|
102
|
+
) : e.map((m, a) => /* @__PURE__ */ d(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
className: "p-meter__filled",
|
|
106
|
+
"data-testid": p.filled,
|
|
107
|
+
style: i(m, a)
|
|
108
|
+
},
|
|
109
|
+
`meter-${a}`
|
|
110
|
+
)),
|
|
111
|
+
o > 0 && /* @__PURE__ */ d(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
className: "p-meter__separators",
|
|
115
|
+
"data-testid": p.segments,
|
|
116
|
+
style: u()
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] });
|
|
120
|
+
}, P = ({
|
|
121
|
+
labelClassName: e,
|
|
122
|
+
label: r
|
|
123
|
+
}) => /* @__PURE__ */ d(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
className: k("p-meter__label", e),
|
|
127
|
+
"data-testid": p.label,
|
|
128
|
+
children: r
|
|
129
|
+
}
|
|
130
|
+
), K = ({
|
|
131
|
+
className: e,
|
|
132
|
+
data: r,
|
|
133
|
+
emptyColor: s = A,
|
|
134
|
+
label: n,
|
|
135
|
+
labelClassName: o,
|
|
136
|
+
max: t,
|
|
137
|
+
overColor: l = R,
|
|
138
|
+
segmented: i = !1,
|
|
139
|
+
separatorColor: u = z,
|
|
140
|
+
small: m = !1
|
|
141
|
+
}) => {
|
|
142
|
+
const a = E(null), v = r.reduce((g, N) => g + N.value, 0), c = t || v, h = r.map((g) => g.value / c * 100), [F, b] = j(0);
|
|
143
|
+
O(() => {
|
|
144
|
+
i && S(a, c, b);
|
|
145
|
+
}, [c, i]);
|
|
146
|
+
const x = B(() => {
|
|
147
|
+
S(a, c, b);
|
|
148
|
+
}, [a, c, b]);
|
|
149
|
+
return M(window, x, "resize", !0, i), /* @__PURE__ */ _(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
className: k("p-meter", { "p-meter--small": m }, e),
|
|
153
|
+
"data-testid": p.container,
|
|
154
|
+
ref: a,
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ d(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
className: "p-meter__bar",
|
|
160
|
+
"data-testid": p.bar,
|
|
161
|
+
style: { backgroundColor: s },
|
|
162
|
+
children: /* @__PURE__ */ d(
|
|
163
|
+
I,
|
|
164
|
+
{
|
|
165
|
+
data: r,
|
|
166
|
+
datumWidths: h,
|
|
167
|
+
maximum: c,
|
|
168
|
+
overColor: l,
|
|
169
|
+
segmentWidth: F,
|
|
170
|
+
separatorColor: u
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
n && /* @__PURE__ */ d(P, { label: n, labelClassName: o })
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}, Q = ({ children: e, to: r, ...s }) => /* @__PURE__ */ d(D, { ...s, href: r, rel: "noreferrer noopener", target: "_blank", children: e });
|
|
180
|
+
export {
|
|
181
|
+
Q as ExternalLink,
|
|
182
|
+
K as Meter,
|
|
183
|
+
A as defaultEmptyColor,
|
|
184
|
+
J as defaultFilledColors,
|
|
185
|
+
R as defaultOverColor,
|
|
186
|
+
z as defaultSeparatorColor,
|
|
187
|
+
f as meterColor,
|
|
188
|
+
p as testIds
|
|
189
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(n,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("@canonical/react-components")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","@canonical/react-components"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n["@canonical/maas-react-components"]={},n["react/jsx-runtime"],n.React,n["@canonical/react-components"]))})(this,function(n,r,h,S){"use strict";function $(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w={exports:{}};/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/(function(e){(function(){var s={}.hasOwnProperty;function o(){for(var a=[],l=0;l<arguments.length;l++){var t=arguments[l];if(t){var c=typeof t;if(c==="string"||c==="number")a.push(t);else if(Array.isArray(t)){if(t.length){var u=o.apply(null,t);u&&a.push(u)}}else if(c==="object"){if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]")){a.push(t.toString());continue}for(var m in t)s.call(t,m)&&t[m]&&a.push(m)}}}return a.join(" ")}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(w);var M=w.exports;const _=$(M),I="",d={caution:"#F99B11",light:"#F7F7F7",linkFaded:"#D3E4ED",link:"#0066CC",negative:"#C7162B",positiveFaded:"#B7CCB9",positiveMid:"#4DAB4D",positive:"#0E8420"},B=[d.link,d.positive,d.negative,d.caution],k=d.linkFaded,F=d.caution,j=d.light,E=2,N=1,O=(e,s,o)=>{var t,c;const a=((c=(t=e==null?void 0:e.current)==null?void 0:t.getBoundingClientRect())==null?void 0:c.width)||0,l=a>s*E?a/s:E;o(l)},p={bar:"meter-bar",container:"meter-container",filled:"meter-filled",label:"meter-label",meteroverflow:"meter-overflow",segments:"meter-segments"},x=({data:e,datumWidths:s,maximum:o,overColor:a,segmentWidth:l,separatorColor:t})=>{const c=()=>e.reduce((v,i)=>v+i.value,0)>o,u=(v,i)=>({backgroundColor:v.color,left:`${s.reduce((b,f,C)=>i>C?b+f:b,0)}%`,width:`${s[i]}%`}),m=()=>({background:`repeating-linear-gradient(
|
|
6
|
+
to right,
|
|
7
|
+
transparent 0,
|
|
8
|
+
transparent ${l-N}px,
|
|
9
|
+
${t} ${l-N}px,
|
|
10
|
+
${t} ${l}px
|
|
11
|
+
)`});return r.jsxs(r.Fragment,{children:[c()?r.jsx("div",{className:"p-meter__filled","data-testid":p.meteroverflow,style:{backgroundColor:a,width:"100%"}}):e.map((v,i)=>r.jsx("div",{className:"p-meter__filled","data-testid":p.filled,style:u(v,i)},`meter-${i}`)),l>0&&r.jsx("div",{className:"p-meter__separators","data-testid":p.segments,style:m()})]})},D=({labelClassName:e,label:s})=>r.jsx("div",{className:_("p-meter__label",e),"data-testid":p.label,children:s}),L=({className:e,data:s,emptyColor:o=k,label:a,labelClassName:l,max:t,overColor:c=F,segmented:u=!1,separatorColor:m=j,small:v=!1})=>{const i=h.useRef(null),b=s.reduce((y,z)=>y+z.value,0),f=t||b,C=s.map(y=>y.value/f*100),[q,g]=h.useState(0);h.useEffect(()=>{u&&O(i,f,g)},[f,u]);const A=h.useCallback(()=>{O(i,f,g)},[i,f,g]);return S.useListener(window,A,"resize",!0,u),r.jsxs("div",{className:_("p-meter",{"p-meter--small":v},e),"data-testid":p.container,ref:i,children:[r.jsx("div",{className:"p-meter__bar","data-testid":p.bar,style:{backgroundColor:o},children:r.jsx(x,{data:s,datumWidths:C,maximum:f,overColor:c,segmentWidth:q,separatorColor:m})}),a&&r.jsx(D,{label:a,labelClassName:l})]})},W=({children:e,to:s,...o})=>r.jsx(S.Link,{...o,href:s,rel:"noreferrer noopener",target:"_blank",children:e});n.ExternalLink=W,n.Meter=L,n.defaultEmptyColor=k,n.defaultFilledColors=B,n.defaultOverColor=F,n.defaultSeparatorColor=j,n.meterColor=d,n.testIds=p,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/lib/index'
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LinkProps } from "@canonical/react-components";
|
|
2
|
+
import type { LinkProps as RouterLinkProps } from "react-router-dom";
|
|
3
|
+
type ExternalLinkProps = Pick<LinkProps, "children"> & Omit<RouterLinkProps, "children"> & {
|
|
4
|
+
to: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const ExternalLink: ({ children, to, ...props }: ExternalLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ExternalLink";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const meterColor: {
|
|
2
|
+
readonly caution: "#F99B11";
|
|
3
|
+
readonly light: "#F7F7F7";
|
|
4
|
+
readonly linkFaded: "#D3E4ED";
|
|
5
|
+
readonly link: "#0066CC";
|
|
6
|
+
readonly negative: "#C7162B";
|
|
7
|
+
readonly positiveFaded: "#B7CCB9";
|
|
8
|
+
readonly positiveMid: "#4DAB4D";
|
|
9
|
+
readonly positive: "#0E8420";
|
|
10
|
+
};
|
|
11
|
+
export declare const defaultFilledColors: ("#F99B11" | "#0066CC" | "#C7162B" | "#0E8420")[];
|
|
12
|
+
export declare const defaultEmptyColor: "#D3E4ED";
|
|
13
|
+
export declare const defaultOverColor: "#F99B11";
|
|
14
|
+
export declare const defaultSeparatorColor: "#F7F7F7";
|
|
15
|
+
type MeterDatum = {
|
|
16
|
+
color?: string;
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
type Props = {
|
|
20
|
+
className?: string;
|
|
21
|
+
data: MeterDatum[];
|
|
22
|
+
emptyColor?: string;
|
|
23
|
+
label?: string | JSX.Element;
|
|
24
|
+
labelClassName?: string;
|
|
25
|
+
max?: number;
|
|
26
|
+
overColor?: string;
|
|
27
|
+
segmented?: boolean;
|
|
28
|
+
separatorColor?: string;
|
|
29
|
+
small?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const testIds: {
|
|
32
|
+
bar: string;
|
|
33
|
+
container: string;
|
|
34
|
+
filled: string;
|
|
35
|
+
label: string;
|
|
36
|
+
meteroverflow: string;
|
|
37
|
+
segments: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const Meter: ({ className, data, emptyColor, label, labelClassName, max, overColor, segmented, separatorColor, small, }: Props) => JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react";
|
|
2
|
+
import { Meter } from ".";
|
|
3
|
+
declare const meta: Meta<typeof Meter>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const Example: {
|
|
6
|
+
args: {
|
|
7
|
+
data: {
|
|
8
|
+
value: number;
|
|
9
|
+
color: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const NoItems: {
|
|
14
|
+
args: {
|
|
15
|
+
data: never[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Meter";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./elements";
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.p-meter{margin-bottom:.75rem;padding-top:.375rem}.p-meter__bar{border-radius:.875rem;height:.875rem;overflow:hidden;position:relative;width:100%;border:1px solid #999}.p-meter__label{display:flex;justify-content:space-between;margin-bottom:-.125rem;padding-top:.25rem}.p-meter__filled{height:100%;position:absolute;width:0%}.p-meter__separators{height:100%;position:absolute;width:100%;z-index:1}.p-meter--small{margin-bottom:.875rem;padding-top:.375rem}.p-meter--small .p-meter__bar{border-radius:.75rem;height:.75rem;margin-bottom:.375rem}.p-meter--small .p-meter__label{margin-bottom:0;padding-top:0}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/maas-react-components",
|
|
3
3
|
"description": "React components for use in MAAS UI projects.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/canonical/maas-react-components.git"
|
|
@@ -39,13 +39,25 @@
|
|
|
39
39
|
"test:ui": "vitest --ui",
|
|
40
40
|
"test:watch": "vitest",
|
|
41
41
|
"semantic-release": "semantic-release",
|
|
42
|
-
"semantic-release-dry-run": "semantic-release --dry-run --no-ci"
|
|
42
|
+
"semantic-release-dry-run": "semantic-release --dry-run --no-ci",
|
|
43
|
+
"storybook": "storybook dev -p 6006",
|
|
44
|
+
"build-storybook": "storybook build"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@commitlint/cli": "^17.7.1",
|
|
46
48
|
"@commitlint/config-conventional": "^17.7.0",
|
|
49
|
+
"@etchteam/storybook-addon-status": "^4.2.4",
|
|
47
50
|
"@semantic-release/changelog": "^6.0.3",
|
|
48
51
|
"@semantic-release/git": "^10.0.1",
|
|
52
|
+
"@storybook/addon-a11y": "^7.4.6",
|
|
53
|
+
"@storybook/addon-essentials": "^7.4.6",
|
|
54
|
+
"@storybook/addon-interactions": "^7.4.6",
|
|
55
|
+
"@storybook/addon-links": "^7.4.6",
|
|
56
|
+
"@storybook/addon-onboarding": "^1.0.8",
|
|
57
|
+
"@storybook/blocks": "^7.4.6",
|
|
58
|
+
"@storybook/react": "^7.4.6",
|
|
59
|
+
"@storybook/react-vite": "^7.4.6",
|
|
60
|
+
"@storybook/testing-library": "^0.2.2",
|
|
49
61
|
"@testing-library/jest-dom": "^6.1.3",
|
|
50
62
|
"@testing-library/react": "^14.0.0",
|
|
51
63
|
"@testing-library/user-event": "^14.5.1",
|
|
@@ -62,11 +74,17 @@
|
|
|
62
74
|
"eslint-plugin-prettier": "^5.0.0",
|
|
63
75
|
"eslint-plugin-react": "^7.33.2",
|
|
64
76
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
77
|
+
"eslint-plugin-storybook": "^0.6.14",
|
|
65
78
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
66
79
|
"husky": "8.0.0",
|
|
80
|
+
"jsdom": "^22.1.0",
|
|
67
81
|
"prettier": "^3.0.3",
|
|
82
|
+
"prop-types": "^15.8.1",
|
|
68
83
|
"sass": "^1.68.0",
|
|
84
|
+
"sb-addon-permutation-table": "^1.0.21",
|
|
69
85
|
"semantic-release": "^22.0.5",
|
|
86
|
+
"storybook": "^7.4.6",
|
|
87
|
+
"storybook-addon-tags": "^0.0.1",
|
|
70
88
|
"vite": "^4.4.9",
|
|
71
89
|
"vite-plugin-dts": "^3.6.0",
|
|
72
90
|
"vitest": "^0.34.5"
|
|
@@ -76,11 +94,13 @@
|
|
|
76
94
|
"@types/react-dom": "18.2.6"
|
|
77
95
|
},
|
|
78
96
|
"peerDependencies": {
|
|
97
|
+
"classnames": "^2.3.2",
|
|
79
98
|
"@canonical/react-components": "^0.47.0",
|
|
80
99
|
"@types/react": "^17.0.2 || ^18.0.0",
|
|
81
100
|
"@types/react-dom": "^17.0.2 || ^18.0.0",
|
|
82
101
|
"react": "18.2.0",
|
|
83
102
|
"react-dom": "18.2.0",
|
|
103
|
+
"react-router-dom": "^6.0.0",
|
|
84
104
|
"vanilla-framework": "^4.3.0"
|
|
85
105
|
}
|
|
86
106
|
}
|
|
Binary file
|