@protonradio/proton-ui 0.3.2 → 0.3.3-beta1
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/proton-ui.es.d.ts +6 -6
- package/dist/proton-ui.es.js +14 -27
- package/dist/proton-ui.es.js.map +1 -1
- package/dist/proton-ui.umd.js +4 -4
- package/dist/proton-ui.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/proton-ui.es.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const BadgeVariants: {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export declare const Banner: {
|
|
49
|
-
({ variant,
|
|
49
|
+
({ variant, children, ...props }: BannerProps): JSX_2.Element;
|
|
50
50
|
Title: ({ children, ...props }: BannerProps) => JSX_2.Element;
|
|
51
51
|
Content: ({ children, ...props }: BannerProps) => JSX_2.Element;
|
|
52
52
|
Colors: Record<BannerVariant, {
|
|
@@ -62,10 +62,6 @@ declare interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
62
62
|
* The banners visual aesthetic.
|
|
63
63
|
*/
|
|
64
64
|
variant?: BannerVariant;
|
|
65
|
-
/**
|
|
66
|
-
* The icon to display in the banner.
|
|
67
|
-
*/
|
|
68
|
-
icon?: ReactNode;
|
|
69
65
|
/**
|
|
70
66
|
* The content to display within the banner.
|
|
71
67
|
*/
|
|
@@ -124,7 +120,7 @@ declare interface ButtonProps {
|
|
|
124
120
|
/**
|
|
125
121
|
* The button's visual aesthetic.
|
|
126
122
|
*/
|
|
127
|
-
variant?: "primary" | "secondary" | "danger";
|
|
123
|
+
variant?: "primary" | "secondary" | "danger" | "translucent";
|
|
128
124
|
/**
|
|
129
125
|
* Should the button be non-interactive?
|
|
130
126
|
*/
|
|
@@ -133,6 +129,10 @@ declare interface ButtonProps {
|
|
|
133
129
|
* The URL that the button should link to. Turns the element into an `a` tag.
|
|
134
130
|
*/
|
|
135
131
|
href?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Should the button show an external link icon?
|
|
134
|
+
*/
|
|
135
|
+
external?: boolean;
|
|
136
136
|
/**
|
|
137
137
|
* Called when the button is pressed (on release, not keydown).
|
|
138
138
|
*/
|
package/dist/proton-ui.es.js
CHANGED
|
@@ -7283,7 +7283,7 @@ function Qf({ variant: t = "primary", ...e }) {
|
|
|
7283
7283
|
"data-testid": e["data-testid"],
|
|
7284
7284
|
children: [
|
|
7285
7285
|
u,
|
|
7286
|
-
e.href && /* @__PURE__ */ B.jsx("svg", { viewBox: "0 0 512 512", width: "0.
|
|
7286
|
+
e.href && e.external && /* @__PURE__ */ B.jsx("svg", { viewBox: "0 0 512 512", width: "0.8em", height: "0.8em", children: /* @__PURE__ */ B.jsx(
|
|
7287
7287
|
"path",
|
|
7288
7288
|
{
|
|
7289
7289
|
d: "M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",
|
|
@@ -9297,12 +9297,7 @@ const Gf = {
|
|
|
9297
9297
|
content: Rt.MEDIUM,
|
|
9298
9298
|
icon: Rt.LIGHT
|
|
9299
9299
|
}
|
|
9300
|
-
}, yr = Ee(void 0), xr = ({
|
|
9301
|
-
variant: t = "default",
|
|
9302
|
-
icon: e,
|
|
9303
|
-
children: n,
|
|
9304
|
-
...r
|
|
9305
|
-
}) => /* @__PURE__ */ B.jsx(yr.Provider, { value: t, children: /* @__PURE__ */ B.jsx(
|
|
9300
|
+
}, yr = Ee(void 0), xr = ({ variant: t = "default", children: e, ...n }) => /* @__PURE__ */ B.jsx(yr.Provider, { value: t, children: /* @__PURE__ */ B.jsx(
|
|
9306
9301
|
"div",
|
|
9307
9302
|
{
|
|
9308
9303
|
role: "status",
|
|
@@ -9310,23 +9305,10 @@ const Gf = {
|
|
|
9310
9305
|
className: oe(
|
|
9311
9306
|
"proton-Banner",
|
|
9312
9307
|
`proton-Banner--${t}`,
|
|
9313
|
-
|
|
9308
|
+
n.className
|
|
9314
9309
|
),
|
|
9315
|
-
"data-testid":
|
|
9316
|
-
children: /* @__PURE__ */ B.
|
|
9317
|
-
e && /* @__PURE__ */ B.jsx(
|
|
9318
|
-
"span",
|
|
9319
|
-
{
|
|
9320
|
-
"aria-hidden": "true",
|
|
9321
|
-
className: oe(
|
|
9322
|
-
"proton-Banner__icon",
|
|
9323
|
-
`proton-Banner--${t}__icon`
|
|
9324
|
-
),
|
|
9325
|
-
children: e
|
|
9326
|
-
}
|
|
9327
|
-
),
|
|
9328
|
-
/* @__PURE__ */ B.jsx("div", { className: "proton-Banner__wrapper", children: n })
|
|
9329
|
-
] })
|
|
9310
|
+
"data-testid": n["data-testid"],
|
|
9311
|
+
children: /* @__PURE__ */ B.jsx("div", { className: "proton-Banner__wrapper", children: e })
|
|
9330
9312
|
}
|
|
9331
9313
|
) }), Yf = ({ children: t, ...e }) => {
|
|
9332
9314
|
const n = ne(yr);
|
|
@@ -9338,9 +9320,10 @@ const Gf = {
|
|
|
9338
9320
|
className: oe(
|
|
9339
9321
|
"proton-Banner",
|
|
9340
9322
|
"proton-Banner__title",
|
|
9341
|
-
`proton-Banner--${n}__title
|
|
9323
|
+
`proton-Banner--${n}__title`,
|
|
9324
|
+
e.className
|
|
9342
9325
|
),
|
|
9343
|
-
|
|
9326
|
+
"data-testid": e["data-testid"],
|
|
9344
9327
|
children: t
|
|
9345
9328
|
}
|
|
9346
9329
|
);
|
|
@@ -9351,8 +9334,12 @@ const Gf = {
|
|
|
9351
9334
|
return /* @__PURE__ */ B.jsx(
|
|
9352
9335
|
"p",
|
|
9353
9336
|
{
|
|
9354
|
-
className: oe(
|
|
9355
|
-
|
|
9337
|
+
className: oe(
|
|
9338
|
+
"proton-Banner",
|
|
9339
|
+
`proton-Banner--${n}__content`,
|
|
9340
|
+
e.className
|
|
9341
|
+
),
|
|
9342
|
+
"data-testid": e["data-testid"],
|
|
9356
9343
|
children: t
|
|
9357
9344
|
}
|
|
9358
9345
|
);
|