@arkitektbedriftene/fe-lib 0.3.11 → 0.3.12
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/{Popover-2318823a.js → Badge-3f33be41.js} +486 -448
- package/dist/lib/ui/components/Badge.d.ts +118 -0
- package/dist/lib/ui/components/Popover.d.ts +120 -1
- package/dist/lib/ui/ui.d.ts +1 -0
- package/dist/rich-text.es.js +1 -1
- package/dist/ui.es.js +15 -14
- package/package.json +1 -1
- package/src/lib/ui/components/Badge.tsx +42 -0
- package/src/lib/ui/components/Popover.tsx +1 -1
- package/src/lib/ui/ui.ts +1 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export declare const Badge: import("@stitches/react/types/styled-component").StyledComponent<"span", {
|
|
2
|
+
color?: "warning" | "danger" | "success" | "primary" | "secondary" | undefined;
|
|
3
|
+
}, {
|
|
4
|
+
lg: "(min-width: 1200px)";
|
|
5
|
+
print: "print";
|
|
6
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
7
|
+
lg: "(min-width: 1200px)";
|
|
8
|
+
print: "print";
|
|
9
|
+
}, {
|
|
10
|
+
colors: {
|
|
11
|
+
gray50: string;
|
|
12
|
+
gray100: string;
|
|
13
|
+
gray200: string;
|
|
14
|
+
gray300: string;
|
|
15
|
+
gray400: string;
|
|
16
|
+
gray500: string;
|
|
17
|
+
gray600: string;
|
|
18
|
+
gray700: string;
|
|
19
|
+
gray800: string;
|
|
20
|
+
gray900: string;
|
|
21
|
+
blue50: string;
|
|
22
|
+
blue100: string;
|
|
23
|
+
blue200: string;
|
|
24
|
+
blue300: string;
|
|
25
|
+
blue400: string;
|
|
26
|
+
blue500: string;
|
|
27
|
+
blue600: string;
|
|
28
|
+
blue700: string;
|
|
29
|
+
blue800: string;
|
|
30
|
+
blue900: string;
|
|
31
|
+
yellow50: string;
|
|
32
|
+
yellow100: string;
|
|
33
|
+
yellow200: string;
|
|
34
|
+
yellow300: string;
|
|
35
|
+
yellow400: string;
|
|
36
|
+
yellow500: string;
|
|
37
|
+
yellow600: string;
|
|
38
|
+
yellow700: string;
|
|
39
|
+
yellow800: string;
|
|
40
|
+
yellow900: string;
|
|
41
|
+
orange500: string;
|
|
42
|
+
red50: string;
|
|
43
|
+
red100: string;
|
|
44
|
+
red200: string;
|
|
45
|
+
red300: string;
|
|
46
|
+
red400: string;
|
|
47
|
+
red500: string;
|
|
48
|
+
red600: string;
|
|
49
|
+
red700: string;
|
|
50
|
+
red800: string;
|
|
51
|
+
red900: string;
|
|
52
|
+
green50: string;
|
|
53
|
+
green100: string;
|
|
54
|
+
green200: string;
|
|
55
|
+
green300: string;
|
|
56
|
+
green400: string;
|
|
57
|
+
green500: string;
|
|
58
|
+
green600: string;
|
|
59
|
+
green700: string;
|
|
60
|
+
green800: string;
|
|
61
|
+
green900: string;
|
|
62
|
+
primaryTextOnLightBg: string;
|
|
63
|
+
primaryBg: string;
|
|
64
|
+
primaryBgHover: string;
|
|
65
|
+
primaryTextOnWhite: string;
|
|
66
|
+
bodyGray: string;
|
|
67
|
+
hoverDarker: string;
|
|
68
|
+
borderDarker: string;
|
|
69
|
+
selectedDarker: string;
|
|
70
|
+
selectedOnBodyGray: string;
|
|
71
|
+
darkGrayBg: string;
|
|
72
|
+
border: string;
|
|
73
|
+
text: string;
|
|
74
|
+
secondaryText: string;
|
|
75
|
+
focusRing: string;
|
|
76
|
+
};
|
|
77
|
+
fontSizes: {
|
|
78
|
+
xs: string;
|
|
79
|
+
sm: string;
|
|
80
|
+
md: string;
|
|
81
|
+
lg: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
"2xl": string;
|
|
84
|
+
"3xl": string;
|
|
85
|
+
};
|
|
86
|
+
fontWeights: {
|
|
87
|
+
normal: string;
|
|
88
|
+
medium: string;
|
|
89
|
+
bold: string;
|
|
90
|
+
};
|
|
91
|
+
space: {
|
|
92
|
+
1: string;
|
|
93
|
+
2: string;
|
|
94
|
+
3: string;
|
|
95
|
+
4: string;
|
|
96
|
+
6: string;
|
|
97
|
+
8: string;
|
|
98
|
+
};
|
|
99
|
+
shadows: {
|
|
100
|
+
xs: string;
|
|
101
|
+
sm: string;
|
|
102
|
+
md: string;
|
|
103
|
+
lg: string;
|
|
104
|
+
overlayCard: string;
|
|
105
|
+
};
|
|
106
|
+
radii: {
|
|
107
|
+
xs: string;
|
|
108
|
+
sm: string;
|
|
109
|
+
md: string;
|
|
110
|
+
mdmd: string;
|
|
111
|
+
full: string;
|
|
112
|
+
};
|
|
113
|
+
zIndices: {
|
|
114
|
+
toast: number;
|
|
115
|
+
overlayCard: number;
|
|
116
|
+
modal: number;
|
|
117
|
+
};
|
|
118
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
@@ -19,5 +19,124 @@ export declare const PopoverTrigger: ({ children }: {
|
|
|
19
19
|
}) => JSX.Element;
|
|
20
20
|
export declare const PopoverContent: ({ children, overlayCardProps }: {
|
|
21
21
|
children: React.ReactNode;
|
|
22
|
-
overlayCardProps
|
|
22
|
+
overlayCardProps?: (Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
23
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
24
|
+
}, "css"> & import("@stitches/react/types/styled-component").TransformProps<{}, {
|
|
25
|
+
lg: "(min-width: 1200px)";
|
|
26
|
+
print: "print";
|
|
27
|
+
}> & {
|
|
28
|
+
css?: import("@stitches/react/types/css-util").CSS<{
|
|
29
|
+
lg: "(min-width: 1200px)";
|
|
30
|
+
print: "print";
|
|
31
|
+
}, {
|
|
32
|
+
colors: {
|
|
33
|
+
gray50: string;
|
|
34
|
+
gray100: string;
|
|
35
|
+
gray200: string;
|
|
36
|
+
gray300: string;
|
|
37
|
+
gray400: string;
|
|
38
|
+
gray500: string;
|
|
39
|
+
gray600: string;
|
|
40
|
+
gray700: string;
|
|
41
|
+
gray800: string;
|
|
42
|
+
gray900: string;
|
|
43
|
+
blue50: string;
|
|
44
|
+
blue100: string;
|
|
45
|
+
blue200: string;
|
|
46
|
+
blue300: string;
|
|
47
|
+
blue400: string;
|
|
48
|
+
blue500: string;
|
|
49
|
+
blue600: string;
|
|
50
|
+
blue700: string;
|
|
51
|
+
blue800: string;
|
|
52
|
+
blue900: string;
|
|
53
|
+
yellow50: string;
|
|
54
|
+
yellow100: string;
|
|
55
|
+
yellow200: string;
|
|
56
|
+
yellow300: string;
|
|
57
|
+
yellow400: string;
|
|
58
|
+
yellow500: string;
|
|
59
|
+
yellow600: string;
|
|
60
|
+
yellow700: string;
|
|
61
|
+
yellow800: string;
|
|
62
|
+
yellow900: string;
|
|
63
|
+
orange500: string;
|
|
64
|
+
red50: string;
|
|
65
|
+
red100: string;
|
|
66
|
+
red200: string;
|
|
67
|
+
red300: string;
|
|
68
|
+
red400: string;
|
|
69
|
+
red500: string;
|
|
70
|
+
red600: string;
|
|
71
|
+
red700: string;
|
|
72
|
+
red800: string;
|
|
73
|
+
red900: string;
|
|
74
|
+
green50: string;
|
|
75
|
+
green100: string;
|
|
76
|
+
green200: string;
|
|
77
|
+
green300: string;
|
|
78
|
+
green400: string;
|
|
79
|
+
green500: string;
|
|
80
|
+
green600: string;
|
|
81
|
+
green700: string;
|
|
82
|
+
green800: string;
|
|
83
|
+
green900: string;
|
|
84
|
+
primaryTextOnLightBg: string;
|
|
85
|
+
primaryBg: string;
|
|
86
|
+
primaryBgHover: string;
|
|
87
|
+
primaryTextOnWhite: string;
|
|
88
|
+
bodyGray: string;
|
|
89
|
+
hoverDarker: string;
|
|
90
|
+
borderDarker: string;
|
|
91
|
+
selectedDarker: string;
|
|
92
|
+
selectedOnBodyGray: string;
|
|
93
|
+
darkGrayBg: string;
|
|
94
|
+
border: string;
|
|
95
|
+
text: string;
|
|
96
|
+
secondaryText: string;
|
|
97
|
+
focusRing: string;
|
|
98
|
+
};
|
|
99
|
+
fontSizes: {
|
|
100
|
+
xs: string;
|
|
101
|
+
sm: string;
|
|
102
|
+
md: string;
|
|
103
|
+
lg: string;
|
|
104
|
+
xl: string;
|
|
105
|
+
"2xl": string;
|
|
106
|
+
"3xl": string;
|
|
107
|
+
};
|
|
108
|
+
fontWeights: {
|
|
109
|
+
normal: string;
|
|
110
|
+
medium: string;
|
|
111
|
+
bold: string;
|
|
112
|
+
};
|
|
113
|
+
space: {
|
|
114
|
+
1: string;
|
|
115
|
+
2: string;
|
|
116
|
+
3: string;
|
|
117
|
+
4: string;
|
|
118
|
+
6: string;
|
|
119
|
+
8: string;
|
|
120
|
+
};
|
|
121
|
+
shadows: {
|
|
122
|
+
xs: string;
|
|
123
|
+
sm: string;
|
|
124
|
+
md: string;
|
|
125
|
+
lg: string;
|
|
126
|
+
overlayCard: string;
|
|
127
|
+
};
|
|
128
|
+
radii: {
|
|
129
|
+
xs: string;
|
|
130
|
+
sm: string;
|
|
131
|
+
md: string;
|
|
132
|
+
mdmd: string;
|
|
133
|
+
full: string;
|
|
134
|
+
};
|
|
135
|
+
zIndices: {
|
|
136
|
+
toast: number;
|
|
137
|
+
overlayCard: number;
|
|
138
|
+
modal: number;
|
|
139
|
+
};
|
|
140
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}> | undefined;
|
|
141
|
+
}) | undefined;
|
|
23
142
|
}) => JSX.Element | null;
|
package/dist/lib/ui/ui.d.ts
CHANGED
package/dist/rich-text.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { HeadingNode as R, QuoteNode as H } from "@lexical/rich-text";
|
|
|
8
8
|
import { TableNode as k, TableRowNode as P, TableCellNode as I } from "@lexical/table";
|
|
9
9
|
import { j as c } from "./jsx-runtime-d0aa4c5b.js";
|
|
10
10
|
import { createContext as M, useState as B, useRef as f, useCallback as h, useContext as q, useMemo as z } from "react";
|
|
11
|
-
import { c as d, s as A, B as x, S as D } from "./
|
|
11
|
+
import { c as d, s as A, B as x, S as D } from "./Badge-3f33be41.js";
|
|
12
12
|
import { LexicalComposer as V } from "@lexical/react/LexicalComposer";
|
|
13
13
|
import { RichTextPlugin as W } from "@lexical/react/LexicalRichTextPlugin";
|
|
14
14
|
import J from "@lexical/react/LexicalErrorBoundary";
|
package/dist/ui.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { P as t, a as n, b as p } from "./
|
|
2
|
-
import { A as v,
|
|
1
|
+
import { P as t, a as n, b as p } from "./Badge-3f33be41.js";
|
|
2
|
+
import { A as v, e as j, B as u, d as C, O as P, S as b, c as h, g as y, k as B, s as O } from "./Badge-3f33be41.js";
|
|
3
3
|
import { j as o } from "./jsx-runtime-d0aa4c5b.js";
|
|
4
4
|
import { useState as i } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
6
|
+
const c = ({ children: s, content: e }) => {
|
|
7
|
+
const [r, a] = i(!1);
|
|
8
8
|
return /* @__PURE__ */ o.jsxs(
|
|
9
9
|
t,
|
|
10
10
|
{
|
|
11
|
-
open:
|
|
11
|
+
open: r,
|
|
12
12
|
onOpenChange: a,
|
|
13
13
|
trigger: "hover",
|
|
14
14
|
placement: "top",
|
|
@@ -23,23 +23,24 @@ const g = ({ children: s, content: r }) => {
|
|
|
23
23
|
fontSize: "$sm",
|
|
24
24
|
padding: "$1 $2"
|
|
25
25
|
}
|
|
26
|
-
}, children:
|
|
26
|
+
}, children: e })
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
32
|
v as Alert,
|
|
33
|
-
j as
|
|
34
|
-
u as
|
|
35
|
-
C as
|
|
33
|
+
j as Badge,
|
|
34
|
+
u as Box,
|
|
35
|
+
C as Button,
|
|
36
|
+
P as OverlayCard,
|
|
36
37
|
t as Popover,
|
|
37
38
|
p as PopoverContent,
|
|
38
39
|
n as PopoverTrigger,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
b as Spinner,
|
|
41
|
+
c as Tooltip,
|
|
42
|
+
h as css,
|
|
43
|
+
y as globalCss,
|
|
44
|
+
B as keyframes,
|
|
44
45
|
O as styled
|
|
45
46
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { styled } from "../stitches.config";
|
|
2
|
+
|
|
3
|
+
export const Badge = styled("span", {
|
|
4
|
+
flex: "0 0 auto",
|
|
5
|
+
display: "inline-flex",
|
|
6
|
+
padding: "$1 $2",
|
|
7
|
+
fontSize: "$xs",
|
|
8
|
+
fontWeight: "$medium",
|
|
9
|
+
lineHeight: "1",
|
|
10
|
+
whiteSpace: "nowrap",
|
|
11
|
+
borderRadius: "$sm",
|
|
12
|
+
overflow: "hidden",
|
|
13
|
+
|
|
14
|
+
variants: {
|
|
15
|
+
color: {
|
|
16
|
+
success: {
|
|
17
|
+
backgroundColor: "$green200",
|
|
18
|
+
color: "$green800",
|
|
19
|
+
},
|
|
20
|
+
warning: {
|
|
21
|
+
backgroundColor: "$yellow100",
|
|
22
|
+
color: "$yellow700",
|
|
23
|
+
},
|
|
24
|
+
danger: {
|
|
25
|
+
backgroundColor: "$red200",
|
|
26
|
+
color: "$red800",
|
|
27
|
+
},
|
|
28
|
+
primary: {
|
|
29
|
+
backgroundColor: "$blue200",
|
|
30
|
+
color: "$blue800",
|
|
31
|
+
},
|
|
32
|
+
secondary: {
|
|
33
|
+
backgroundColor: "$gray200",
|
|
34
|
+
color: "$gray800",
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
color: "primary",
|
|
41
|
+
},
|
|
42
|
+
});
|
|
@@ -134,7 +134,7 @@ export const PopoverTrigger = ({ children }: { children: React.ReactNode }) => {
|
|
|
134
134
|
);
|
|
135
135
|
};
|
|
136
136
|
|
|
137
|
-
export const PopoverContent = ({ children, overlayCardProps }: { children: React.ReactNode, overlayCardProps
|
|
137
|
+
export const PopoverContent = ({ children, overlayCardProps }: { children: React.ReactNode, overlayCardProps?: OverlayCardProps }) => {
|
|
138
138
|
const {
|
|
139
139
|
getFloatingProps,
|
|
140
140
|
isMounted,
|
package/src/lib/ui/ui.ts
CHANGED