@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.
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 +102 -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 +291 -281
  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
  }>;
@@ -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("@stitches/react/types/styled-component").CssComponent<never, {
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("@stitches/react/types/css-util").CSS<{
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: 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;
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: string;
277
- sm: string;
278
- md: string;
279
- lg: string;
280
- xl: string;
281
- "2xl": string;
282
- "3xl": string;
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: string;
286
- medium: string;
287
- bold: string;
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: string;
291
- 2: string;
292
- 3: string;
293
- 4: string;
294
- 6: string;
295
- 8: string;
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: string;
299
- sm: string;
300
- md: string;
301
- lg: string;
302
- overlayCard: string;
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: string;
306
- sm: string;
307
- md: string;
308
- mdmd: string;
309
- full: string;
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("@stitches/react/types/config").DefaultThemeMap, {}>>;
323
+ }, 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 {}