@protonradio/proton-ui 0.11.2 → 0.11.4
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 +2 -42
- package/dist/Button-D5vY_uZz.js.map +1 -1
- package/dist/Button-R07nvJbw.mjs.map +1 -1
- package/dist/color2k-CpDB_dpw.mjs +168 -0
- package/dist/color2k-CpDB_dpw.mjs.map +1 -0
- package/dist/color2k-DCgwXUem.js +2 -0
- package/dist/color2k-DCgwXUem.js.map +1 -0
- package/dist/{colors.es.js → colors-CWaj9dFz.mjs} +7 -7
- package/dist/colors-CWaj9dFz.mjs.map +1 -0
- package/dist/colors-CebzFjpe.js +2 -0
- package/dist/colors-CebzFjpe.js.map +1 -0
- package/dist/colors-Ceyo4oCJ.mjs +34 -0
- package/dist/colors-Ceyo4oCJ.mjs.map +1 -0
- package/dist/colors-CmSJBHaf.js +2 -0
- package/dist/colors-CmSJBHaf.js.map +1 -0
- package/dist/colors-DL1dYffC.js +2 -0
- package/dist/colors-DL1dYffC.js.map +1 -0
- package/dist/colors-DMkDnu4U.mjs +34 -0
- package/dist/colors-DMkDnu4U.mjs.map +1 -0
- package/dist/constants.cjs.js +1 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.d.ts +0 -12
- package/dist/constants.es.js +0 -3
- package/dist/constants.es.js.map +1 -1
- package/dist/dark.d.ts +87 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.cjs.js.map +1 -1
- package/dist/hooks.es.js +12 -11
- package/dist/hooks.es.js.map +1 -1
- package/dist/image-CUSfY1_T.js +2 -0
- package/dist/image-CUSfY1_T.js.map +1 -0
- package/dist/{image-GZPhSCuF.mjs → image-DFyN0Kd9.mjs} +47 -45
- package/dist/image-DFyN0Kd9.mjs.map +1 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.es.js +66 -63
- package/dist/index.es.js.map +1 -1
- package/dist/light.d.ts +78 -0
- package/dist/theme/dark.cjs.js +2 -0
- package/dist/theme/dark.cjs.js.map +1 -0
- package/dist/theme/dark.d.ts +2 -0
- package/dist/theme/dark.es.js +58 -0
- package/dist/theme/dark.es.js.map +1 -0
- package/dist/theme/light.cjs.js +2 -0
- package/dist/theme/light.cjs.js.map +1 -0
- package/dist/theme/light.d.ts +2 -0
- package/dist/theme/light.es.js +58 -0
- package/dist/theme/light.es.js.map +1 -0
- package/dist/theme.cjs.js +1 -1
- package/dist/theme.cjs.js.map +1 -1
- package/dist/theme.d.ts +12 -33
- package/dist/theme.es.js +16 -20
- package/dist/theme.es.js.map +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +21 -16
- package/dist/colors.cjs.js +0 -2
- package/dist/colors.cjs.js.map +0 -1
- package/dist/colors.d.ts +0 -42
- package/dist/colors.es.js.map +0 -1
- package/dist/image-C7s3ABus.js +0 -2
- package/dist/image-C7s3ABus.js.map +0 -1
- package/dist/image-GZPhSCuF.mjs.map +0 -1
- package/dist/index-CMjT6Imo.js +0 -2
- package/dist/index-CMjT6Imo.js.map +0 -1
- package/dist/index-Clgyr6Mk.mjs +0 -317
- package/dist/index-Clgyr6Mk.mjs.map +0 -1
- package/dist/theme-DQsfWeLo.mjs +0 -12
- package/dist/theme-DQsfWeLo.mjs.map +0 -1
- package/dist/theme-Dc0Ahjq9.js +0 -2
- package/dist/theme-Dc0Ahjq9.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -807,6 +807,8 @@ declare interface ProtonStyleSheet {
|
|
|
807
807
|
"--proton-color__white": string;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
+
declare type ProtonTheme = (typeof THEMES)[keyof typeof THEMES];
|
|
811
|
+
|
|
810
812
|
/**
|
|
811
813
|
* Base Overlay component for creating modal-like backgrounds.
|
|
812
814
|
*
|
|
@@ -1132,10 +1134,8 @@ declare interface TextEmphasisProps extends React.HTMLAttributes<HTMLSpanElement
|
|
|
1132
1134
|
"data-testid"?: string;
|
|
1133
1135
|
}
|
|
1134
1136
|
|
|
1135
|
-
declare type Theme = (typeof THEMES)[keyof typeof THEMES];
|
|
1136
|
-
|
|
1137
1137
|
declare interface ThemeContextType {
|
|
1138
|
-
theme:
|
|
1138
|
+
theme: ProtonTheme;
|
|
1139
1139
|
className: string;
|
|
1140
1140
|
style: ProtonStyleSheet;
|
|
1141
1141
|
palette: ProtonPalette;
|
|
@@ -1145,7 +1145,7 @@ declare interface ThemeContextType {
|
|
|
1145
1145
|
export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
|
|
1146
1146
|
|
|
1147
1147
|
declare interface ThemeProviderProps {
|
|
1148
|
-
theme:
|
|
1148
|
+
theme: ProtonTheme;
|
|
1149
1149
|
children: ReactNode;
|
|
1150
1150
|
palette?: ProtonPalette;
|
|
1151
1151
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { j as p, B as dt } from "./Button-R07nvJbw.mjs";
|
|
2
|
-
import { b as
|
|
2
|
+
import { b as pf, a as vf } from "./Button-R07nvJbw.mjs";
|
|
3
3
|
import * as oe from "react";
|
|
4
4
|
import K, { useRef as _, useCallback as re, useState as W, useMemo as R, useEffect as H, useContext as j, createContext as G, forwardRef as ye, createElement as Zr, isValidElement as ot, cloneElement as ys, Children as yt } from "react";
|
|
5
5
|
import { useLayoutEffect as J, useEffectEvent as se, isFocusable as Jr, getOwnerWindow as Ee, focusWithoutScrolling as Pe, isIOS as En, getOwnerDocument as Y, runAfterTransition as Qr, useGlobalListeners as Bt, nodeContains as Q, getEventTarget as U, isVirtualPointerEvent as bs, isVirtualClick as sn, mergeProps as z, useSyncRef as ei, chain as Xe, isMac as Pn, openLink as an, getActiveElement as ae, useObjectRef as ft, useDescription as ms, isWebKit as ti, clamp as un, useResizeObserver as Yn, createShadowTreeWalker as $s, isAndroid as xs, isChrome as Ss, isTabbable as Es, useId as De, getScrollParent as ni, useLabels as ri, isAppleDevice as Ps, useRouter as wn, useEvent as bt, FOCUS_EVENT as ws, useUpdateLayoutEffect as qn, CLEAR_FOCUS_EVENT as Cs, scrollIntoView as Ts, scrollIntoViewport as Xn, isCtrlKeyPressed as ze, isScrollable as Zn, filterDOMProps as ue, useSlotId as Ie, useLinkProps as ii, useFormReset as Cn, mergeRefs as li, useExitAnimation as oi, useEnterAnimation as si } from "@react-aria/utils";
|
|
6
6
|
import ai, { flushSync as ui, createPortal as Ks } from "react-dom";
|
|
7
7
|
import { u as Ds, a as ci, b as Tn } from "./useBreakpoint-CjRyGKN-.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { L as Ms } from "./colors-DMkDnu4U.mjs";
|
|
9
|
+
import { THEMES as ks, THEME_CLASSES as Is } from "./theme.es.js";
|
|
10
|
+
import { LIGHT_STYLESHEET as Ns } from "./theme/light.es.js";
|
|
11
|
+
import { DARK_STYLESHEET as _s } from "./theme/dark.es.js";
|
|
10
12
|
import { c as V, i as di, h as fi } from "./navigation-DsfDNfej.mjs";
|
|
11
|
-
import { useButton as
|
|
12
|
-
import { useOverlayTriggerState as
|
|
13
|
+
import { useButton as As, useFocusRing as Fs, useHover as pi, useId as Jn, mergeProps as Kn, useLocale as Ls, usePopover as Bs, DismissButton as Qn, Overlay as er, useSubmenuTrigger as Rs, useMenu as Os, FocusScope as js, useMenuSection as Vs, useMenuItem as Hs, useTooltipTrigger as Ws, OverlayContainer as zs, useOverlayPosition as Us, useTooltip as Gs, Focusable as Ys } from "react-aria";
|
|
14
|
+
import { useOverlayTriggerState as qs, useSubmenuTriggerState as Xs, useTreeState as Zs, useMenuTriggerState as Js, useTooltipTriggerState as vi } from "react-stately";
|
|
13
15
|
import { B as Dn } from "./breakpoint-9y1_8U_b.mjs";
|
|
16
|
+
import { j as tt, m as tr, t as nr, p as Qs } from "./color2k-CpDB_dpw.mjs";
|
|
14
17
|
import { c as hi } from "./copy-qSgElu2b.mjs";
|
|
15
18
|
var gi = {};
|
|
16
19
|
gi = {
|
|
@@ -4258,7 +4261,7 @@ function Gu() {
|
|
|
4258
4261
|
process.env.NODE_ENV === "production" ? mn.exports = Uu() : mn.exports = Gu();
|
|
4259
4262
|
var Yu = mn.exports;
|
|
4260
4263
|
const qu = (t, e) => {
|
|
4261
|
-
const n = e ===
|
|
4264
|
+
const n = e === ks.DARK ? _s : Ns;
|
|
4262
4265
|
if (t) {
|
|
4263
4266
|
const r = Xu(t);
|
|
4264
4267
|
return {
|
|
@@ -4283,9 +4286,9 @@ const qu = (t, e) => {
|
|
|
4283
4286
|
}, Zu = ({
|
|
4284
4287
|
theme: t,
|
|
4285
4288
|
children: e,
|
|
4286
|
-
palette: n =
|
|
4289
|
+
palette: n = Ms
|
|
4287
4290
|
}) => {
|
|
4288
|
-
const r = _(null), i =
|
|
4291
|
+
const r = _(null), i = Is[t], l = R(
|
|
4289
4292
|
() => qu(n, t),
|
|
4290
4293
|
[n, t]
|
|
4291
4294
|
);
|
|
@@ -4570,14 +4573,14 @@ const xo = ({
|
|
|
4570
4573
|
] }),
|
|
4571
4574
|
n && /* @__PURE__ */ p.jsx(Ht, { id: "chevron-right", size: 16 })
|
|
4572
4575
|
);
|
|
4573
|
-
},
|
|
4576
|
+
}, Xd = {
|
|
4574
4577
|
primary: "primary",
|
|
4575
4578
|
secondary: "secondary",
|
|
4576
4579
|
transparent: "transparent",
|
|
4577
4580
|
success: "success",
|
|
4578
4581
|
warning: "warning",
|
|
4579
4582
|
danger: "danger"
|
|
4580
|
-
},
|
|
4583
|
+
}, Zd = ({ variant: t, children: e, ...n }) => /* @__PURE__ */ p.jsx(
|
|
4581
4584
|
"div",
|
|
4582
4585
|
{
|
|
4583
4586
|
role: "status",
|
|
@@ -4602,7 +4605,7 @@ const xo = ({
|
|
|
4602
4605
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"
|
|
4603
4606
|
}
|
|
4604
4607
|
) })
|
|
4605
|
-
},
|
|
4608
|
+
}, Jd = {
|
|
4606
4609
|
default: "default",
|
|
4607
4610
|
success: "success",
|
|
4608
4611
|
warning: "warning",
|
|
@@ -5783,7 +5786,7 @@ const Tc = /* @__PURE__ */ new Set([
|
|
|
5783
5786
|
"value"
|
|
5784
5787
|
]), Kc = /* @__PURE__ */ G({}), Dc = /* @__PURE__ */ gc(function(e, n) {
|
|
5785
5788
|
[e, n] = Ae(e, n, Kc), e = Mc(e);
|
|
5786
|
-
let r = e, { isPending: i } = r, { buttonProps: l, isPressed: o } =
|
|
5789
|
+
let r = e, { isPending: i } = r, { buttonProps: l, isPressed: o } = As(e, n), { focusProps: s, isFocused: a, isFocusVisible: u } = Fs(e), { hoverProps: c, isHovered: d } = pi({
|
|
5787
5790
|
...e,
|
|
5788
5791
|
isDisabled: e.isDisabled || i
|
|
5789
5792
|
}), f = {
|
|
@@ -5797,7 +5800,7 @@ const Tc = /* @__PURE__ */ new Set([
|
|
|
5797
5800
|
...e,
|
|
5798
5801
|
values: f,
|
|
5799
5802
|
defaultClassName: "react-aria-Button"
|
|
5800
|
-
}), g =
|
|
5803
|
+
}), g = Jn(l.id), b = Jn(), m = l["aria-labelledby"];
|
|
5801
5804
|
i && (m ? m = `${m} ${b}` : l["aria-label"] && (m = `${g} ${b}`));
|
|
5802
5805
|
let x = _(i);
|
|
5803
5806
|
return H(() => {
|
|
@@ -6041,7 +6044,7 @@ const Go = /* @__PURE__ */ G({}), Bc = /* @__PURE__ */ Vo("header", function(e,
|
|
|
6041
6044
|
});
|
|
6042
6045
|
}), Yo = /* @__PURE__ */ G(null), Ur = /* @__PURE__ */ G(null), qo = /* @__PURE__ */ ye(function(e, n) {
|
|
6043
6046
|
[e, n] = Ae(e, n, Yo);
|
|
6044
|
-
let r = j(es), i =
|
|
6047
|
+
let r = j(es), i = qs(e), l = e.isOpen != null || e.defaultOpen != null || !r ? i : r, o = oi(n, l.isOpen) || e.isExiting || !1, s = yc(), { direction: a } = Ls();
|
|
6045
6048
|
if (s) {
|
|
6046
6049
|
let u = e.children;
|
|
6047
6050
|
return typeof u == "function" && (u = u({
|
|
@@ -6070,7 +6073,7 @@ function jc({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
6070
6073
|
i
|
|
6071
6074
|
]);
|
|
6072
6075
|
var c;
|
|
6073
|
-
let { popoverProps: d, underlayProps: f, arrowProps: v, placement: g } =
|
|
6076
|
+
let { popoverProps: d, underlayProps: f, arrowProps: v, placement: g } = Bs({
|
|
6074
6077
|
...r,
|
|
6075
6078
|
offset: (c = r.offset) !== null && c !== void 0 ? c : 8,
|
|
6076
6079
|
arrowSize: l,
|
|
@@ -6116,7 +6119,7 @@ function jc({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
6116
6119
|
"data-placement": g,
|
|
6117
6120
|
"data-entering": m || void 0,
|
|
6118
6121
|
"data-exiting": e || void 0
|
|
6119
|
-
}, !r.isNonModal && /* @__PURE__ */ K.createElement(
|
|
6122
|
+
}, !r.isNonModal && /* @__PURE__ */ K.createElement(Qn, {
|
|
6120
6123
|
onDismiss: t.close
|
|
6121
6124
|
}), /* @__PURE__ */ K.createElement(Wn.Provider, {
|
|
6122
6125
|
value: {
|
|
@@ -6124,10 +6127,10 @@ function jc({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
6124
6127
|
placement: g,
|
|
6125
6128
|
ref: i
|
|
6126
6129
|
}
|
|
6127
|
-
}, x.children), /* @__PURE__ */ K.createElement(
|
|
6130
|
+
}, x.children), /* @__PURE__ */ K.createElement(Qn, {
|
|
6128
6131
|
onDismiss: t.close
|
|
6129
6132
|
}));
|
|
6130
|
-
if (!u) return /* @__PURE__ */ K.createElement(
|
|
6133
|
+
if (!u) return /* @__PURE__ */ K.createElement(er, {
|
|
6131
6134
|
...r,
|
|
6132
6135
|
shouldContainFocus: S,
|
|
6133
6136
|
isExiting: e,
|
|
@@ -6148,7 +6151,7 @@ function jc({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
6148
6151
|
value: s
|
|
6149
6152
|
}, E)));
|
|
6150
6153
|
var k;
|
|
6151
|
-
return /* @__PURE__ */ K.createElement(
|
|
6154
|
+
return /* @__PURE__ */ K.createElement(er, {
|
|
6152
6155
|
...r,
|
|
6153
6156
|
shouldContainFocus: S,
|
|
6154
6157
|
isExiting: e,
|
|
@@ -6156,9 +6159,9 @@ function jc({ state: t, isExiting: e, UNSTABLE_portalContainer: n, ...r }) {
|
|
|
6156
6159
|
}, E);
|
|
6157
6160
|
}
|
|
6158
6161
|
const Vc = /* @__PURE__ */ G({}), Xo = /* @__PURE__ */ G(null), zt = /* @__PURE__ */ G(null), Sn = /* @__PURE__ */ G(null), Ft = /* @__PURE__ */ G(null), Zo = /* @__PURE__ */ G(null), Hc = /* @__PURE__ */ Ho("submenutrigger", (t, e, n) => {
|
|
6159
|
-
let { CollectionBranch: r } = j(Hn), i = j(zt), l = j(Sn), o =
|
|
6162
|
+
let { CollectionBranch: r } = j(Hn), i = j(zt), l = j(Sn), o = Xs({
|
|
6160
6163
|
triggerKey: n.key
|
|
6161
|
-
}, l), s = _(null), a = ft(e), { parentMenuRef: u, shouldUseVirtualFocus: c } = j(Zo), { submenuTriggerProps: d, submenuProps: f, popoverProps: v } =
|
|
6164
|
+
}, l), s = _(null), a = ft(e), { parentMenuRef: u, shouldUseVirtualFocus: c } = j(Zo), { submenuTriggerProps: d, submenuProps: f, popoverProps: v } = Rs({
|
|
6162
6165
|
parentMenuRef: u,
|
|
6163
6166
|
submenuRef: s,
|
|
6164
6167
|
delay: t.delay,
|
|
@@ -6216,11 +6219,11 @@ function Wc({ props: t, collection: e, menuRef: n }) {
|
|
|
6216
6219
|
let o = R(() => r ? e.UNSTABLE_filter(r) : e, [
|
|
6217
6220
|
e,
|
|
6218
6221
|
r
|
|
6219
|
-
]), s =
|
|
6222
|
+
]), s = Zs({
|
|
6220
6223
|
...t,
|
|
6221
6224
|
collection: o,
|
|
6222
6225
|
children: void 0
|
|
6223
|
-
}), a = j(Sn), { isVirtualized: u, CollectionRoot: c } = j(Hn), { menuProps: d } =
|
|
6226
|
+
}), a = j(Sn), { isVirtualized: u, CollectionRoot: c } = j(Hn), { menuProps: d } = Os({
|
|
6224
6227
|
...t,
|
|
6225
6228
|
...i,
|
|
6226
6229
|
isVirtualized: u,
|
|
@@ -6238,7 +6241,7 @@ function Wc({ props: t, collection: e, menuRef: n }) {
|
|
|
6238
6241
|
style: {
|
|
6239
6242
|
display: "contents"
|
|
6240
6243
|
}
|
|
6241
|
-
}, t.renderEmptyState())), /* @__PURE__ */ K.createElement(
|
|
6244
|
+
}, t.renderEmptyState())), /* @__PURE__ */ K.createElement(js, null, /* @__PURE__ */ K.createElement("div", {
|
|
6242
6245
|
...ue(t),
|
|
6243
6246
|
...d,
|
|
6244
6247
|
...f,
|
|
@@ -6289,7 +6292,7 @@ function Wc({ props: t, collection: e, menuRef: n }) {
|
|
|
6289
6292
|
/* eslint-disable-next-line react-hooks/rules-of-hooks */
|
|
6290
6293
|
[
|
|
6291
6294
|
Sn,
|
|
6292
|
-
a ??
|
|
6295
|
+
a ?? Js({})
|
|
6293
6296
|
]
|
|
6294
6297
|
]
|
|
6295
6298
|
}, /* @__PURE__ */ K.createElement(c, {
|
|
@@ -6322,7 +6325,7 @@ function Qo(t, e, n, r = "react-aria-MenuSection") {
|
|
|
6322
6325
|
var i, l;
|
|
6323
6326
|
let o = j(zt), { CollectionBranch: s } = j(Hn), [a, u] = pc();
|
|
6324
6327
|
var c;
|
|
6325
|
-
let { headingProps: d, groupProps: f } =
|
|
6328
|
+
let { headingProps: d, groupProps: f } = Vs({
|
|
6326
6329
|
heading: u,
|
|
6327
6330
|
"aria-label": (c = n.props["aria-label"]) !== null && c !== void 0 ? c : void 0
|
|
6328
6331
|
}), v = je({
|
|
@@ -6358,7 +6361,7 @@ function Qo(t, e, n, r = "react-aria-MenuSection") {
|
|
|
6358
6361
|
const Uc = /* @__PURE__ */ Ho("section", Qo), Lt = /* @__PURE__ */ G(null), Gc = /* @__PURE__ */ Vo("item", function(e, n, r) {
|
|
6359
6362
|
var i;
|
|
6360
6363
|
[e, n] = Ae(e, n, Lt);
|
|
6361
|
-
let l = (i = Lo(Lt)) === null || i === void 0 ? void 0 : i.id, o = j(zt), s = ft(n), a = j(Ft), { menuItemProps: u, labelProps: c, descriptionProps: d, keyboardShortcutProps: f, ...v } =
|
|
6364
|
+
let l = (i = Lo(Lt)) === null || i === void 0 ? void 0 : i.id, o = j(zt), s = ft(n), a = j(Ft), { menuItemProps: u, labelProps: c, descriptionProps: d, keyboardShortcutProps: f, ...v } = Hs({
|
|
6362
6365
|
...e,
|
|
6363
6366
|
id: l,
|
|
6364
6367
|
key: r.key,
|
|
@@ -6413,7 +6416,7 @@ const Uc = /* @__PURE__ */ Ho("section", Qo), Lt = /* @__PURE__ */ G(null), Gc =
|
|
|
6413
6416
|
}, m.children));
|
|
6414
6417
|
}), es = /* @__PURE__ */ G(null), zn = /* @__PURE__ */ G(null), ts = /* @__PURE__ */ G(null);
|
|
6415
6418
|
function Yc(t) {
|
|
6416
|
-
let e = vi(t), n = _(null), { triggerProps: r, tooltipProps: i } =
|
|
6419
|
+
let e = vi(t), n = _(null), { triggerProps: r, tooltipProps: i } = Ws(t, e, n);
|
|
6417
6420
|
return /* @__PURE__ */ K.createElement(ht, {
|
|
6418
6421
|
values: [
|
|
6419
6422
|
[
|
|
@@ -6436,7 +6439,7 @@ function Yc(t) {
|
|
|
6436
6439
|
const qc = /* @__PURE__ */ ye(function({ UNSTABLE_portalContainer: e, ...n }, r) {
|
|
6437
6440
|
[n, r] = Ae(n, r, ts);
|
|
6438
6441
|
let i = j(zn), l = vi(n), o = n.isOpen != null || n.defaultOpen != null || !i ? l : i, s = oi(r, o.isOpen) || n.isExiting || !1;
|
|
6439
|
-
return !o.isOpen && !s ? null : /* @__PURE__ */ K.createElement(
|
|
6442
|
+
return !o.isOpen && !s ? null : /* @__PURE__ */ K.createElement(zs, {
|
|
6440
6443
|
portalContainer: e
|
|
6441
6444
|
}, /* @__PURE__ */ K.createElement(Xc, {
|
|
6442
6445
|
...n,
|
|
@@ -6452,7 +6455,7 @@ function Xc(t) {
|
|
|
6452
6455
|
e.isOpen,
|
|
6453
6456
|
n
|
|
6454
6457
|
]);
|
|
6455
|
-
let { overlayProps: l, arrowProps: o, placement: s } =
|
|
6458
|
+
let { overlayProps: l, arrowProps: o, placement: s } = Us({
|
|
6456
6459
|
placement: t.placement || "top",
|
|
6457
6460
|
targetRef: t.triggerRef,
|
|
6458
6461
|
overlayRef: t.tooltipRef,
|
|
@@ -6474,7 +6477,7 @@ function Xc(t) {
|
|
|
6474
6477
|
}
|
|
6475
6478
|
});
|
|
6476
6479
|
t = Kn(t, l);
|
|
6477
|
-
let { tooltipProps: c } =
|
|
6480
|
+
let { tooltipProps: c } = Gs(t, e);
|
|
6478
6481
|
return /* @__PURE__ */ K.createElement("div", {
|
|
6479
6482
|
...c,
|
|
6480
6483
|
ref: t.tooltipRef,
|
|
@@ -6993,7 +6996,7 @@ const id = ({ children: t, name: e }) => {
|
|
|
6993
6996
|
let s = o, a = tt(o, 0.01);
|
|
6994
6997
|
if (r && (s = tt(o, 0.1), a = tt(o, 0.12), e)) {
|
|
6995
6998
|
const u = tt(i.PRIMARY.MEDIUM_LIGHT, 0.88), c = tt(i.PRIMARY.LIGHT, 0.84);
|
|
6996
|
-
s =
|
|
6999
|
+
s = tr(s, u, 0.15), a = tr(a, c, 0.15);
|
|
6997
7000
|
}
|
|
6998
7001
|
return /* @__PURE__ */ p.jsx(
|
|
6999
7002
|
"div",
|
|
@@ -7015,8 +7018,8 @@ const id = ({ children: t, name: e }) => {
|
|
|
7015
7018
|
}) => {
|
|
7016
7019
|
const { hasPalette: r, palette: i } = we(), l = {
|
|
7017
7020
|
"--tombstone-custom-background": i.PRIMARY.MEDIUM,
|
|
7018
|
-
"--tombstone-custom-primary":
|
|
7019
|
-
"--tombstone-custom-secondary":
|
|
7021
|
+
"--tombstone-custom-primary": nr(i.PRIMARY.DARK, 0.9),
|
|
7022
|
+
"--tombstone-custom-secondary": nr(i.SECONDARY.DARK, 0.7)
|
|
7020
7023
|
};
|
|
7021
7024
|
return /* @__PURE__ */ p.jsx(
|
|
7022
7025
|
"div",
|
|
@@ -7034,7 +7037,7 @@ const id = ({ children: t, name: e }) => {
|
|
|
7034
7037
|
}
|
|
7035
7038
|
);
|
|
7036
7039
|
};
|
|
7037
|
-
function
|
|
7040
|
+
function Qd(t) {
|
|
7038
7041
|
const {
|
|
7039
7042
|
columns: e,
|
|
7040
7043
|
data: n = [],
|
|
@@ -7196,7 +7199,7 @@ function cs(t, e) {
|
|
|
7196
7199
|
}
|
|
7197
7200
|
};
|
|
7198
7201
|
}
|
|
7199
|
-
function
|
|
7202
|
+
function ef({ title: t, children: e, ...n }) {
|
|
7200
7203
|
let r = _(null), { dialogProps: i, titleProps: l } = cs(n, r);
|
|
7201
7204
|
return /* @__PURE__ */ p.jsxs("div", { ...i, ref: r, className: "proton-Dialog", children: [
|
|
7202
7205
|
t && /* @__PURE__ */ p.jsx("h3", { ...l, className: "proton-Dialog__header", children: t }),
|
|
@@ -7211,12 +7214,12 @@ const sd = (t) => {
|
|
|
7211
7214
|
}
|
|
7212
7215
|
return "";
|
|
7213
7216
|
};
|
|
7214
|
-
function
|
|
7217
|
+
function tf({
|
|
7215
7218
|
image: t,
|
|
7216
7219
|
imageUrl: e = "",
|
|
7217
7220
|
onLoad: n
|
|
7218
7221
|
}) {
|
|
7219
|
-
const { palette: r } = we(), i =
|
|
7222
|
+
const { palette: r } = we(), i = Qs(r.BASE_COLOR), l = sd(i);
|
|
7220
7223
|
return /* @__PURE__ */ p.jsxs(
|
|
7221
7224
|
"div",
|
|
7222
7225
|
{
|
|
@@ -7422,7 +7425,7 @@ const Un = ye(
|
|
|
7422
7425
|
}
|
|
7423
7426
|
);
|
|
7424
7427
|
Un.displayName = "ProtonUIInput";
|
|
7425
|
-
function
|
|
7428
|
+
function nf({
|
|
7426
7429
|
name: t,
|
|
7427
7430
|
value: e,
|
|
7428
7431
|
isDisabled: n,
|
|
@@ -7494,7 +7497,7 @@ const ad = ({ isCopied: t, onClick: e }) => /* @__PURE__ */ p.jsx("div", { class
|
|
|
7494
7497
|
)
|
|
7495
7498
|
]
|
|
7496
7499
|
}
|
|
7497
|
-
) }),
|
|
7500
|
+
) }), rf = ({
|
|
7498
7501
|
name: t = "search",
|
|
7499
7502
|
placeholder: e = "Search...",
|
|
7500
7503
|
autoComplete: n,
|
|
@@ -7722,7 +7725,7 @@ const ds = ({ children: t }) => /* @__PURE__ */ p.jsx("h2", { className: "proton
|
|
|
7722
7725
|
}
|
|
7723
7726
|
);
|
|
7724
7727
|
return o || d ? /* @__PURE__ */ p.jsx(Rn, { fadeIn: !0, ref: a, onClose: c, children: f }) : f;
|
|
7725
|
-
},
|
|
7728
|
+
}, lf = Object.assign(fd, {
|
|
7726
7729
|
/**
|
|
7727
7730
|
* Renders a h2 styled title
|
|
7728
7731
|
* */
|
|
@@ -7745,7 +7748,7 @@ const ds = ({ children: t }) => /* @__PURE__ */ p.jsx("h2", { className: "proton
|
|
|
7745
7748
|
* */
|
|
7746
7749
|
Actions: cd
|
|
7747
7750
|
});
|
|
7748
|
-
function
|
|
7751
|
+
function of(t) {
|
|
7749
7752
|
const e = _(null), n = Ut(t || {}), { triggerProps: r, overlayProps: i } = $l(
|
|
7750
7753
|
{ type: "dialog" },
|
|
7751
7754
|
n,
|
|
@@ -8376,7 +8379,7 @@ function Cd(t = {}) {
|
|
|
8376
8379
|
toggle: l
|
|
8377
8380
|
};
|
|
8378
8381
|
}
|
|
8379
|
-
function
|
|
8382
|
+
function sf(t) {
|
|
8380
8383
|
let e = {
|
|
8381
8384
|
...t,
|
|
8382
8385
|
isSelected: t.isOn,
|
|
@@ -8405,7 +8408,7 @@ function rf(t) {
|
|
|
8405
8408
|
}
|
|
8406
8409
|
);
|
|
8407
8410
|
}
|
|
8408
|
-
const
|
|
8411
|
+
const af = ({
|
|
8409
8412
|
children: t,
|
|
8410
8413
|
maxWidth: e,
|
|
8411
8414
|
singleLine: n = !0,
|
|
@@ -8469,7 +8472,7 @@ function Kd({
|
|
|
8469
8472
|
v && !d.current && (f.current = !0), l && l(v), d.current || c(v), d.current = !1;
|
|
8470
8473
|
},
|
|
8471
8474
|
children: [
|
|
8472
|
-
o ? /* @__PURE__ */ p.jsx("span", { className: "proton__TooltipTrigger", "aria-label": "Show tooltip", children: t }) : /* @__PURE__ */ p.jsx(
|
|
8475
|
+
o ? /* @__PURE__ */ p.jsx("span", { className: "proton__TooltipTrigger", "aria-label": "Show tooltip", children: t }) : /* @__PURE__ */ p.jsx(Ys, { children: /* @__PURE__ */ p.jsx(
|
|
8473
8476
|
"div",
|
|
8474
8477
|
{
|
|
8475
8478
|
role: "button",
|
|
@@ -8493,7 +8496,7 @@ function Kd({
|
|
|
8493
8496
|
}
|
|
8494
8497
|
);
|
|
8495
8498
|
}
|
|
8496
|
-
const
|
|
8499
|
+
const uf = ({
|
|
8497
8500
|
to: t,
|
|
8498
8501
|
children: e,
|
|
8499
8502
|
tooltipProps: n,
|
|
@@ -8606,7 +8609,7 @@ function Dd({
|
|
|
8606
8609
|
);
|
|
8607
8610
|
}
|
|
8608
8611
|
const Md = _d(100);
|
|
8609
|
-
function
|
|
8612
|
+
function cf({
|
|
8610
8613
|
data: t,
|
|
8611
8614
|
resolution: e = 2,
|
|
8612
8615
|
startDuration: n,
|
|
@@ -8761,37 +8764,37 @@ function _d(t) {
|
|
|
8761
8764
|
export {
|
|
8762
8765
|
xo as ActionMenu,
|
|
8763
8766
|
ec as BANNER_ICONS,
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
+
Jd as BANNER_VARIANTS,
|
|
8768
|
+
Zd as Badge,
|
|
8769
|
+
Xd as BadgeVariants,
|
|
8767
8770
|
Oe as Banner,
|
|
8768
8771
|
dt as Button,
|
|
8769
8772
|
Ao as ButtonGroup,
|
|
8770
|
-
|
|
8771
|
-
|
|
8773
|
+
pf as ButtonSizes,
|
|
8774
|
+
vf as ButtonVariants,
|
|
8772
8775
|
td as ButtonWithSelect,
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
+
nf as CopyInput,
|
|
8777
|
+
Qd as DataTable,
|
|
8778
|
+
ef as Dialog,
|
|
8776
8779
|
ld as Elevation,
|
|
8777
8780
|
Ht as Icon,
|
|
8778
|
-
|
|
8781
|
+
tf as ImageBackground,
|
|
8779
8782
|
Un as Input,
|
|
8780
8783
|
Qc as MenuTrigger,
|
|
8781
|
-
|
|
8784
|
+
lf as Modal,
|
|
8782
8785
|
pd as Popover,
|
|
8783
8786
|
Rn as ScreenOverlay,
|
|
8784
|
-
|
|
8787
|
+
rf as SearchInput,
|
|
8785
8788
|
Ed as Select,
|
|
8786
|
-
|
|
8789
|
+
sf as Switch,
|
|
8787
8790
|
le as Table,
|
|
8788
|
-
|
|
8789
|
-
|
|
8791
|
+
af as TextEllipsis,
|
|
8792
|
+
uf as TextEmphasis,
|
|
8790
8793
|
Zu as ThemeProvider,
|
|
8791
8794
|
od as Tombstone,
|
|
8792
8795
|
Kd as TooltipTrigger,
|
|
8793
|
-
|
|
8794
|
-
|
|
8796
|
+
cf as Waveform,
|
|
8797
|
+
of as usePopoverTrigger,
|
|
8795
8798
|
rd as useTableCollection,
|
|
8796
8799
|
we as useTheme
|
|
8797
8800
|
};
|