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