@arkitektbedriftene/fe-lib 4.3.3 → 5.1.1
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/elements/components/CompanyLogo.d.ts +8 -14
- package/dist/elements/elements.d.ts +1 -1
- package/dist/elements.d.ts +1 -0
- package/dist/elements.es.js +23 -23
- package/dist/icons.d.ts +1 -0
- package/dist/icons.es.js +3 -4
- package/dist/{index.esm-fa9e6ea7.js → index.esm-Dzt91gSZ.js} +29 -32
- package/dist/normalize.css.d.ts +1 -1
- package/dist/oidc/impersonate.d.ts +1 -1
- package/dist/oidc/oidc.d.ts +6 -6
- package/dist/oidc.d.ts +1 -0
- package/dist/oidc.es.js +5 -5
- package/dist/rich-text/Editor.d.ts +13 -18
- package/dist/rich-text/Plugins/Image/ImageComponent.d.ts +1 -1
- package/dist/rich-text/Plugins/Image/ImageNode.d.ts +2 -3
- package/dist/rich-text/Plugins/Image/ImagePlugin.d.ts +3 -3
- package/dist/rich-text/Plugins/LinkInsertPlugin.d.ts +3 -3
- package/dist/rich-text/Plugins/LinkTargetNode.d.ts +2 -2
- package/dist/rich-text/Plugins/ParsePlugin.d.ts +2 -2
- package/dist/rich-text/Plugins/RutineLinkNode.d.ts +12 -12
- package/dist/rich-text/Toolbar/Toolbar.d.ts +3 -119
- package/dist/rich-text/config.d.ts +9 -8
- package/dist/rich-text/editorContext.d.ts +7 -7
- package/dist/rich-text/getSelectedNode.d.ts +1 -1
- package/dist/rich-text/state.d.ts +5 -5
- package/dist/rich-text/styles.d.ts +102 -94
- package/dist/rich-text/theme.d.ts +1 -1
- package/dist/rich-text/trim.d.ts +3 -3
- package/dist/rich-text.d.ts +1 -0
- package/dist/rich-text.es.js +291 -281
- package/dist/ui/components/Alert.d.ts +95 -96
- package/dist/ui/components/Avatar.d.ts +97 -215
- package/dist/ui/components/Badge.d.ts +94 -94
- package/dist/ui/components/Box.d.ts +94 -94
- package/dist/ui/components/Button.d.ts +95 -96
- package/dist/ui/components/Card.d.ts +94 -94
- package/dist/ui/components/Dialog.d.ts +284 -400
- package/dist/ui/components/Form/Checkbox.d.ts +97 -216
- package/dist/ui/components/Form/Combobox.d.ts +2 -2
- package/dist/ui/components/Form/ReactSelect.d.ts +4 -2
- package/dist/ui/components/Form/Select.d.ts +3 -3
- package/dist/ui/components/Form/Switch.d.ts +195 -549
- package/dist/ui/components/Form/TextArea.d.ts +96 -97
- package/dist/ui/components/Form/TextInput.d.ts +96 -97
- package/dist/ui/components/Form/text.d.ts +188 -188
- package/dist/ui/components/Menu/DropdownMenu.d.ts +287 -287
- package/dist/ui/components/Menu/Menu.d.ts +281 -281
- package/dist/ui/components/NavBar.d.ts +98 -222
- package/dist/ui/components/OverlayCard.d.ts +94 -95
- package/dist/ui/components/Popover.d.ts +7 -124
- package/dist/ui/components/Spinner.d.ts +95 -96
- package/dist/ui/components/Stack.d.ts +95 -95
- package/dist/ui/components/Toolbar.d.ts +381 -382
- package/dist/ui/stitches.config.d.ts +569 -568
- package/dist/ui.css.d.ts +1 -1
- package/dist/ui.d.ts +1 -0
- package/dist/ui.es.js +54 -55
- package/package.json +5 -17
- package/dist/colors/colors.d.ts +0 -18
- package/dist/colors.d.ts +0 -1
- package/dist/colors.es.js +0 -20
- package/dist/hooks/hooks.d.ts +0 -2
- package/dist/hooks.d.ts +0 -1
- package/dist/hooks.es.js +0 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +0 -4
- /package/dist/{stitches.config-00c23cdb.js → stitches.config-CEYOm13b.js} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
2
|
export type UploadFn = {
|
|
3
3
|
uploadFile: ({ file }: {
|
|
4
4
|
file: File;
|
|
5
5
|
}) => Promise<string>;
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
};
|
|
8
|
-
export declare const richTextContext: import(
|
|
8
|
+
export declare const richTextContext: import('react').Context<{
|
|
9
9
|
hasFocus: boolean;
|
|
10
10
|
editorRef: RefObject<HTMLElement | null>;
|
|
11
|
-
signUrl?: (
|
|
12
|
-
fileUpload?: UploadFn
|
|
11
|
+
signUrl?: (url: string) => Promise<string>;
|
|
12
|
+
fileUpload?: UploadFn;
|
|
13
13
|
}>;
|
|
14
14
|
export declare const useHasFocusWithin: ({ onBlur }: {
|
|
15
|
-
onBlur?: (
|
|
15
|
+
onBlur?: () => void;
|
|
16
16
|
}) => {
|
|
17
17
|
hasFocus: boolean;
|
|
18
18
|
attributes: {
|
|
@@ -23,6 +23,6 @@ export declare const useHasFocusWithin: ({ onBlur }: {
|
|
|
23
23
|
export declare const useRichTextContext: () => {
|
|
24
24
|
hasFocus: boolean;
|
|
25
25
|
editorRef: RefObject<HTMLElement | null>;
|
|
26
|
-
signUrl?: (
|
|
27
|
-
fileUpload?: UploadFn
|
|
26
|
+
signUrl?: (url: string) => Promise<string>;
|
|
27
|
+
fileUpload?: UploadFn;
|
|
28
28
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ElementNode, RangeSelection, TextNode } from 'lexical';
|
|
2
2
|
export declare function getSelectedNode(selection: RangeSelection): TextNode | ElementNode;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EditorState, CreateEditorArgs, SerializedEditorState, LexicalEditor, LexicalNode, Klass } from 'lexical';
|
|
2
2
|
export declare const isJSON: (str: string) => boolean;
|
|
3
3
|
export declare const isEditorState: (state: unknown) => state is EditorState;
|
|
4
4
|
export declare const clearEditorState: (editor: LexicalEditor, tag?: string) => void;
|
|
5
5
|
export declare const setStateFromPlainText: (str: string, editor: LexicalEditor, tag?: string) => void;
|
|
6
6
|
export declare const stateToHTML: (state: SerializedEditorState | string | null | undefined, nodes: CreateEditorArgs["nodes"], options?: {
|
|
7
|
-
maxLines?: number | null
|
|
8
|
-
onlyMainContent?: boolean
|
|
9
|
-
updateFn?: (
|
|
10
|
-
}
|
|
7
|
+
maxLines?: number | null;
|
|
8
|
+
onlyMainContent?: boolean;
|
|
9
|
+
updateFn?: (editor: LexicalEditor) => Promise<void> | void;
|
|
10
|
+
}) => Promise<{
|
|
11
11
|
html: string;
|
|
12
12
|
trimCount: number;
|
|
13
13
|
}>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const richTextStyleObj: {
|
|
2
2
|
fontSize: string;
|
|
3
3
|
lineHeight: string;
|
|
4
|
+
whiteSpace: string;
|
|
5
|
+
wordBreak: string;
|
|
4
6
|
"h1, h2, h3, h4, h5, h6": {
|
|
5
7
|
fontWeight: string;
|
|
6
8
|
lineHeight: string;
|
|
@@ -158,6 +160,12 @@ export declare const richTextStyleObj: {
|
|
|
158
160
|
maxWidth: string;
|
|
159
161
|
height: string;
|
|
160
162
|
};
|
|
163
|
+
hr: {
|
|
164
|
+
height: string;
|
|
165
|
+
border: number;
|
|
166
|
+
backgroundColor: string;
|
|
167
|
+
margin: number;
|
|
168
|
+
};
|
|
161
169
|
variants: {
|
|
162
170
|
size: {
|
|
163
171
|
xs: {
|
|
@@ -196,120 +204,120 @@ export declare const richTextStyleObj: {
|
|
|
196
204
|
size: string;
|
|
197
205
|
};
|
|
198
206
|
};
|
|
199
|
-
export declare const richTextCss: import(
|
|
207
|
+
export declare const richTextCss: import('@stitches/react/types/styled-component').CssComponent<never, {
|
|
200
208
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
201
209
|
}, {
|
|
202
210
|
lg: "(min-width: 1200px)";
|
|
203
211
|
print: "print";
|
|
204
|
-
}, import(
|
|
212
|
+
}, import('@stitches/react/types/css-util').CSS<{
|
|
205
213
|
lg: "(min-width: 1200px)";
|
|
206
214
|
print: "print";
|
|
207
215
|
}, {
|
|
208
216
|
colors: {
|
|
209
|
-
gray50:
|
|
210
|
-
gray100:
|
|
211
|
-
gray200:
|
|
212
|
-
gray300:
|
|
213
|
-
gray400:
|
|
214
|
-
gray500:
|
|
215
|
-
gray600:
|
|
216
|
-
gray700:
|
|
217
|
-
gray800:
|
|
218
|
-
gray900:
|
|
219
|
-
blue50:
|
|
220
|
-
blue100:
|
|
221
|
-
blue200:
|
|
222
|
-
blue300:
|
|
223
|
-
blue400:
|
|
224
|
-
blue500:
|
|
225
|
-
blue600:
|
|
226
|
-
blue700:
|
|
227
|
-
blue800:
|
|
228
|
-
blue900:
|
|
229
|
-
yellow50:
|
|
230
|
-
yellow100:
|
|
231
|
-
yellow200:
|
|
232
|
-
yellow300:
|
|
233
|
-
yellow400:
|
|
234
|
-
yellow500:
|
|
235
|
-
yellow600:
|
|
236
|
-
yellow700:
|
|
237
|
-
yellow800:
|
|
238
|
-
yellow900:
|
|
239
|
-
orange500:
|
|
240
|
-
red50:
|
|
241
|
-
red100:
|
|
242
|
-
red200:
|
|
243
|
-
red300:
|
|
244
|
-
red400:
|
|
245
|
-
red500:
|
|
246
|
-
red600:
|
|
247
|
-
red700:
|
|
248
|
-
red800:
|
|
249
|
-
red900:
|
|
250
|
-
green50:
|
|
251
|
-
green100:
|
|
252
|
-
green200:
|
|
253
|
-
green300:
|
|
254
|
-
green400:
|
|
255
|
-
green500:
|
|
256
|
-
green600:
|
|
257
|
-
green700:
|
|
258
|
-
green800:
|
|
259
|
-
green900:
|
|
260
|
-
primaryTextOnLightBg:
|
|
261
|
-
primaryBg:
|
|
262
|
-
primaryBgHover:
|
|
263
|
-
primaryTextOnWhite:
|
|
264
|
-
bodyGray:
|
|
265
|
-
hoverDarker:
|
|
266
|
-
borderDarker:
|
|
267
|
-
selectedDarker:
|
|
268
|
-
selectedOnBodyGray:
|
|
269
|
-
darkGrayBg:
|
|
270
|
-
border:
|
|
271
|
-
text:
|
|
272
|
-
secondaryText:
|
|
273
|
-
focusRing:
|
|
217
|
+
gray50: "#F9FAFA";
|
|
218
|
+
gray100: "#EBEEEE";
|
|
219
|
+
gray200: "#CFD6D7";
|
|
220
|
+
gray300: "#B3BEC0";
|
|
221
|
+
gray400: "#97A6A8";
|
|
222
|
+
gray500: "#7C8E91";
|
|
223
|
+
gray600: "#627578";
|
|
224
|
+
gray700: "#4F5F61";
|
|
225
|
+
gray800: "#414D4F";
|
|
226
|
+
gray900: "#2C3435";
|
|
227
|
+
blue50: "#F7FBFB";
|
|
228
|
+
blue100: "#E3F0F2";
|
|
229
|
+
blue200: "#BADADF";
|
|
230
|
+
blue300: "#92C5CC";
|
|
231
|
+
blue400: "#67AEB8";
|
|
232
|
+
blue500: "#3C97A3";
|
|
233
|
+
blue600: "#1F7D8A";
|
|
234
|
+
blue700: "#19656F";
|
|
235
|
+
blue800: "#14525B";
|
|
236
|
+
blue900: "#0E383E";
|
|
237
|
+
yellow50: "#FDFAEF";
|
|
238
|
+
yellow100: "#F9EDCA";
|
|
239
|
+
yellow200: "#EFD27A";
|
|
240
|
+
yellow300: "#E5B626";
|
|
241
|
+
yellow400: "#C89E1C";
|
|
242
|
+
yellow500: "#AA8618";
|
|
243
|
+
yellow600: "#8C6E14";
|
|
244
|
+
yellow700: "#715910";
|
|
245
|
+
yellow800: "#5C490D";
|
|
246
|
+
yellow900: "#3E3109";
|
|
247
|
+
orange500: "#D1721C";
|
|
248
|
+
red50: "#FDF9F9";
|
|
249
|
+
red100: "#F7EBEB";
|
|
250
|
+
red200: "#EBCECD";
|
|
251
|
+
red300: "#DFB1B0";
|
|
252
|
+
red400: "#D39392";
|
|
253
|
+
red500: "#C67473";
|
|
254
|
+
red600: "#B85250";
|
|
255
|
+
red700: "#A92F2D";
|
|
256
|
+
red800: "#901F1E";
|
|
257
|
+
red900: "#631614";
|
|
258
|
+
green50: "#F8FAF9";
|
|
259
|
+
green100: "#E7F0EA";
|
|
260
|
+
green200: "#C5D9CB";
|
|
261
|
+
green300: "#A4C4AD";
|
|
262
|
+
green400: "#82AD8D";
|
|
263
|
+
green500: "#60976F";
|
|
264
|
+
green600: "#3C7F4E";
|
|
265
|
+
green700: "#296839";
|
|
266
|
+
green800: "#21552F";
|
|
267
|
+
green900: "#163920";
|
|
268
|
+
primaryTextOnLightBg: "#194b58";
|
|
269
|
+
primaryBg: "$blue600";
|
|
270
|
+
primaryBgHover: "$blue700";
|
|
271
|
+
primaryTextOnWhite: "$blue600";
|
|
272
|
+
bodyGray: "$gray100";
|
|
273
|
+
hoverDarker: "hsla(214deg, 25%, 21%, 0.06)";
|
|
274
|
+
borderDarker: "hsla(214deg, 25%, 21%, 0.1)";
|
|
275
|
+
selectedDarker: "hsla(214deg, 25%, 21%, 0.06)";
|
|
276
|
+
selectedOnBodyGray: "hsl(214deg, 35%, 80%)";
|
|
277
|
+
darkGrayBg: "#1f2937";
|
|
278
|
+
border: "hsl(214deg, 25%, 80%)";
|
|
279
|
+
text: "#1f2937";
|
|
280
|
+
secondaryText: "$gray500";
|
|
281
|
+
focusRing: "hsla(214deg, 15%, 10%, 0.6)";
|
|
274
282
|
};
|
|
275
283
|
fontSizes: {
|
|
276
|
-
xs:
|
|
277
|
-
sm:
|
|
278
|
-
md:
|
|
279
|
-
lg:
|
|
280
|
-
xl:
|
|
281
|
-
"2xl":
|
|
282
|
-
"3xl":
|
|
284
|
+
xs: "0.75rem";
|
|
285
|
+
sm: "0.875rem";
|
|
286
|
+
md: "1rem";
|
|
287
|
+
lg: "1.125rem";
|
|
288
|
+
xl: "1.25rem";
|
|
289
|
+
"2xl": "1.5rem";
|
|
290
|
+
"3xl": "1.875rem";
|
|
283
291
|
};
|
|
284
292
|
fontWeights: {
|
|
285
|
-
normal:
|
|
286
|
-
medium:
|
|
287
|
-
bold:
|
|
293
|
+
normal: "var(--ui-font-weight-normal)";
|
|
294
|
+
medium: "var(--ui-font-weight-semibold)";
|
|
295
|
+
bold: "var(--ui-font-weight-bold)";
|
|
288
296
|
};
|
|
289
297
|
space: {
|
|
290
|
-
1:
|
|
291
|
-
2:
|
|
292
|
-
3:
|
|
293
|
-
4:
|
|
294
|
-
6:
|
|
295
|
-
8:
|
|
298
|
+
1: "0.25rem";
|
|
299
|
+
2: "0.5rem";
|
|
300
|
+
3: "0.75rem";
|
|
301
|
+
4: "1rem";
|
|
302
|
+
6: "1.5rem";
|
|
303
|
+
8: "2rem";
|
|
296
304
|
};
|
|
297
305
|
shadows: {
|
|
298
|
-
xs:
|
|
299
|
-
sm:
|
|
300
|
-
md:
|
|
301
|
-
lg:
|
|
302
|
-
overlayCard:
|
|
306
|
+
xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
|
|
307
|
+
sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
308
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
309
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
310
|
+
overlayCard: "0 5px 50px 0px rgb(0 0 0 / 0.15), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
303
311
|
};
|
|
304
312
|
radii: {
|
|
305
|
-
xs:
|
|
306
|
-
sm:
|
|
307
|
-
md:
|
|
308
|
-
mdmd:
|
|
309
|
-
full:
|
|
313
|
+
xs: "0.125rem";
|
|
314
|
+
sm: "0.25rem";
|
|
315
|
+
md: "0.5rem";
|
|
316
|
+
mdmd: "calc(0.5rem - 0.125rem)";
|
|
317
|
+
full: "9999px";
|
|
310
318
|
};
|
|
311
319
|
zIndices: {
|
|
312
320
|
toast: number;
|
|
313
321
|
overlayCard: number;
|
|
314
322
|
};
|
|
315
|
-
}, import(
|
|
323
|
+
}, import('@stitches/react/types/config').DefaultThemeMap, {}>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EditorThemeClasses } from 'lexical';
|
|
2
2
|
export declare const lexicalTheme: EditorThemeClasses;
|
package/dist/rich-text/trim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LexicalEditor } from 'lexical';
|
|
2
2
|
export declare const trimState: ({ editor, maxChars, maxLines, }: {
|
|
3
3
|
editor: LexicalEditor;
|
|
4
|
-
maxChars?: number | null
|
|
5
|
-
maxLines?: number | null
|
|
4
|
+
maxChars?: number | null;
|
|
5
|
+
maxLines?: number | null;
|
|
6
6
|
}) => number;
|
package/dist/rich-text.d.ts
CHANGED