@arkitektbedriftene/fe-lib 0.3.12 → 0.3.14

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 (74) hide show
  1. package/dist/{Badge-3f33be41.js → Badge-5eab3787.js} +4 -3
  2. package/dist/colors.d.ts +1 -1
  3. package/dist/hooks.d.ts +1 -1
  4. package/dist/icons.d.ts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/oidc.d.ts +1 -1
  7. package/dist/{lib/rich-text → rich-text}/Editor.d.ts +1 -1
  8. package/dist/rich-text.d.ts +1 -1
  9. package/dist/rich-text.es.js +4 -4
  10. package/dist/{lib/ui → ui}/stitches.config.d.ts +1 -0
  11. package/dist/ui.css.d.ts +1 -1
  12. package/dist/ui.d.ts +1 -1
  13. package/dist/ui.es.js +2 -2
  14. package/package.json +16 -9
  15. package/.github/workflows/auto-publish.yaml +0 -20
  16. package/dist/lib/index.d.ts +0 -1
  17. package/index.html +0 -13
  18. package/src/App.css +0 -42
  19. package/src/App.tsx +0 -44
  20. package/src/assets/react.svg +0 -1
  21. package/src/index.css +0 -69
  22. package/src/lib/colors/colors.ts +0 -19
  23. package/src/lib/hooks/hooks.ts +0 -3
  24. package/src/lib/icons/README.md +0 -1
  25. package/src/lib/icons/icons.tsx +0 -51
  26. package/src/lib/index.ts +0 -1
  27. package/src/lib/oidc/README.md +0 -28
  28. package/src/lib/oidc/firmAccess.ts +0 -36
  29. package/src/lib/oidc/impersonate.tsx +0 -104
  30. package/src/lib/oidc/oidc.tsx +0 -248
  31. package/src/lib/rich-text/Editor.tsx +0 -137
  32. package/src/lib/rich-text/config.ts +0 -16
  33. package/src/lib/rich-text/editorContext.ts +0 -34
  34. package/src/lib/rich-text/rich-text.ts +0 -4
  35. package/src/lib/rich-text/state.ts +0 -62
  36. package/src/lib/rich-text/theme.ts +0 -41
  37. package/src/lib/rich-text/trim.ts +0 -79
  38. package/src/lib/ui/components/Alert.tsx +0 -63
  39. package/src/lib/ui/components/Badge.tsx +0 -42
  40. package/src/lib/ui/components/Box.tsx +0 -3
  41. package/src/lib/ui/components/Button.tsx +0 -195
  42. package/src/lib/ui/components/OverlayCard.tsx +0 -50
  43. package/src/lib/ui/components/Popover.tsx +0 -164
  44. package/src/lib/ui/components/Spinner.tsx +0 -102
  45. package/src/lib/ui/components/Tooltip.tsx +0 -34
  46. package/src/lib/ui/stitches.config.ts +0 -144
  47. package/src/lib/ui/ui.css +0 -11
  48. package/src/lib/ui/ui.ts +0 -10
  49. package/src/main.tsx +0 -10
  50. package/src/vite-env.d.ts +0 -1
  51. package/tsconfig.json +0 -21
  52. package/tsconfig.node.json +0 -9
  53. package/vite.config.ts +0 -45
  54. /package/dist/{lib/colors → colors}/colors.d.ts +0 -0
  55. /package/dist/{lib/hooks → hooks}/hooks.d.ts +0 -0
  56. /package/dist/{lib/icons → icons}/icons.d.ts +0 -0
  57. /package/dist/{lib/oidc → oidc}/firmAccess.d.ts +0 -0
  58. /package/dist/{lib/oidc → oidc}/impersonate.d.ts +0 -0
  59. /package/dist/{lib/oidc → oidc}/oidc.d.ts +0 -0
  60. /package/dist/{lib/rich-text → rich-text}/config.d.ts +0 -0
  61. /package/dist/{lib/rich-text → rich-text}/editorContext.d.ts +0 -0
  62. /package/dist/{lib/rich-text → rich-text}/rich-text.d.ts +0 -0
  63. /package/dist/{lib/rich-text → rich-text}/state.d.ts +0 -0
  64. /package/dist/{lib/rich-text → rich-text}/theme.d.ts +0 -0
  65. /package/dist/{lib/rich-text → rich-text}/trim.d.ts +0 -0
  66. /package/dist/{lib/ui → ui}/components/Alert.d.ts +0 -0
  67. /package/dist/{lib/ui → ui}/components/Badge.d.ts +0 -0
  68. /package/dist/{lib/ui → ui}/components/Box.d.ts +0 -0
  69. /package/dist/{lib/ui → ui}/components/Button.d.ts +0 -0
  70. /package/dist/{lib/ui → ui}/components/OverlayCard.d.ts +0 -0
  71. /package/dist/{lib/ui → ui}/components/Popover.d.ts +0 -0
  72. /package/dist/{lib/ui → ui}/components/Spinner.d.ts +0 -0
  73. /package/dist/{lib/ui → ui}/components/Tooltip.d.ts +0 -0
  74. /package/dist/{lib/ui → ui}/ui.d.ts +0 -0
@@ -1,144 +0,0 @@
1
- import { createStitches } from "@stitches/react";
2
-
3
- let zIndex = 9999;
4
- const createLayerBelow = () => {
5
- zIndex--;
6
- return zIndex;
7
- };
8
-
9
- // Colors from palette: https://accessiblepalette.com/?lightness=98.2,93.9,85,76.2,67,57.8,48,39,31.8,21&A52422=0,0&d6751d=0,0&E4B420=0,0&2e7641=0,0&228997=0,0&6D597A=0,0&6c8184=0,0
10
-
11
- // 900 has enough contrast on 300
12
- // 700 has enough contrast on 200
13
- // 500+ has enough contrast with white
14
- // 300- has enough contrast with black (or gray900)
15
-
16
- export const { styled, css, keyframes, globalCss } = createStitches({
17
- theme: {
18
- colors: {
19
- gray50: "#F9FAFA",
20
- gray100: "#EBEEEE",
21
- gray200: "#CFD6D7",
22
- gray300: "#B3BEC0",
23
- gray400: "#97A6A8",
24
- gray500: "#7C8E91",
25
- gray600: "#627578",
26
- gray700: "#4F5F61",
27
- gray800: "#414D4F",
28
- gray900: "#2C3435",
29
-
30
- blue50: "#F7FBFB",
31
- blue100: "#E3F0F2",
32
- blue200: "#BADADF",
33
- blue300: "#92C5CC",
34
- blue400: "#67AEB8",
35
- blue500: "#3C97A3",
36
- blue600: "#1F7D8A",
37
- blue700: "#19656F",
38
- blue800: "#14525B",
39
- blue900: "#0E383E",
40
-
41
- yellow50: "#FDFAEF",
42
- yellow100: "#F9EDCA",
43
- yellow200: "#EFD27A",
44
- yellow300: "#E5B626",
45
- yellow400: "#C89E1C",
46
- yellow500: "#AA8618",
47
- yellow600: "#8C6E14",
48
- yellow700: "#715910",
49
- yellow800: "#5C490D",
50
- yellow900: "#3E3109",
51
-
52
- orange500: "#D1721C",
53
-
54
- red50: "#FDF9F9",
55
- red100: "#F7EBEB",
56
- red200: "#EBCECD",
57
- red300: "#DFB1B0",
58
- red400: "#D39392",
59
- red500: "#C67473",
60
- red600: "#B85250",
61
- red700: "#A92F2D",
62
- red800: "#901F1E",
63
- red900: "#631614",
64
-
65
- green50: "#F8FAF9",
66
- green100: "#E7F0EA",
67
- green200: "#C5D9CB",
68
- green300: "#A4C4AD",
69
- green400: "#82AD8D",
70
- green500: "#60976F",
71
- green600: "#3C7F4E",
72
- green700: "#296839",
73
- green800: "#21552F",
74
- green900: "#163920",
75
-
76
- // Primary
77
- primaryTextOnLightBg: "#194b58",
78
- primaryBg: "$blue600",
79
- primaryBgHover: "$blue700",
80
- primaryTextOnWhite: "$blue600",
81
-
82
- bodyGray: "$gray100",
83
- hoverDarker: "hsla(214deg, 25%, 21%, 0.06)",
84
- borderDarker: "hsla(214deg, 25%, 21%, 0.1)",
85
- selectedDarker: "hsla(214deg, 25%, 21%, 0.06)",
86
- selectedOnBodyGray: "hsl(214deg, 35%, 80%)",
87
- darkGrayBg: "#1f2937",
88
- border: "hsl(214deg, 25%, 80%)",
89
- text: "#1f2937",
90
- secondaryText: "$gray500",
91
- focusRing: "hsla(214deg, 15%, 10%, 0.6)",
92
- },
93
- fontSizes: {
94
- xs: "0.75rem", // 12px
95
- sm: "0.875rem", // 14px
96
- md: "1rem", // 16px
97
- lg: "1.125rem", // 18px
98
- xl: "1.25rem", // 20px
99
- "2xl": "1.5rem", // 24px
100
- "3xl": "1.875rem", // 30px
101
- },
102
- fontWeights: {
103
- normal: "var(--ui-font-weight-normal)",
104
- medium: "var(--ui-font-weight-semibold)",
105
- bold: "var(--ui-font-weight-bold)",
106
- },
107
- space: {
108
- 1: "0.25rem",
109
- 2: "0.5rem",
110
- 3: "0.75rem",
111
- 4: "1rem",
112
- 6: "1.5rem",
113
- 8: "2rem",
114
- },
115
- shadows: {
116
- xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
117
- sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
118
- md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
119
- lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
120
- overlayCard:
121
- "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)",
122
- },
123
- radii: {
124
- xs: "0.125rem",
125
- sm: "0.25rem",
126
- md: "0.5rem",
127
- mdmd: "calc(0.5rem - 0.125rem)",
128
- full: "9999px",
129
- },
130
- zIndices: {
131
- /**
132
- * By using createLayerBelow() we can order the list of layers.
133
- * Layers higher up will be on top of layers lower down.
134
- */
135
- toast: createLayerBelow(),
136
- overlayCard: createLayerBelow(),
137
- modal: createLayerBelow(),
138
- },
139
- },
140
- media: {
141
- lg: "(min-width: 1200px)",
142
- print: "print",
143
- },
144
- });
package/src/lib/ui/ui.css DELETED
@@ -1,11 +0,0 @@
1
- :root {
2
- --ui-font-family: system-ui, sans-serif;
3
- --ui-font-weight-normal: 400;
4
- --ui-font-weight-semibold: 500;
5
- --ui-font-weight-bold: 700;
6
- }
7
-
8
- body {
9
- font-family: var(--ui-font-family);
10
- font-weight: var(--ui-font-weight-normal);
11
- }
package/src/lib/ui/ui.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from './stitches.config';
2
-
3
- export * from './components/Button';
4
- export * from './components/Spinner';
5
- export * from './components/Alert';
6
- export * from './components/OverlayCard';
7
- export * from './components/Popover';
8
- export * from './components/Box';
9
- export * from './components/Tooltip';
10
- export * from './components/Badge';
package/src/main.tsx DELETED
@@ -1,10 +0,0 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom/client'
3
- import App from './App'
4
- import './index.css'
5
-
6
- ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
7
- <React.StrictMode>
8
- <App />
9
- </React.StrictMode>,
10
- )
package/src/vite-env.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "useDefineForClassFields": true,
5
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
6
- "allowJs": false,
7
- "skipLibCheck": true,
8
- "esModuleInterop": false,
9
- "allowSyntheticDefaultImports": true,
10
- "strict": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "module": "ESNext",
13
- "moduleResolution": "Node",
14
- "resolveJsonModule": true,
15
- "isolatedModules": true,
16
- "noEmit": true,
17
- "jsx": "react-jsx"
18
- },
19
- "include": ["src"],
20
- "references": [{ "path": "./tsconfig.node.json" }]
21
- }
@@ -1,9 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "module": "ESNext",
5
- "moduleResolution": "Node",
6
- "allowSyntheticDefaultImports": true
7
- },
8
- "include": ["vite.config.ts"]
9
- }
package/vite.config.ts DELETED
@@ -1,45 +0,0 @@
1
- import { defineConfig } from "vite";
2
- import react from "@vitejs/plugin-react-swc";
3
- import dts from "vite-plugin-dts";
4
-
5
- // https://vitejs.dev/config/
6
- export default defineConfig({
7
- build: {
8
- cssCodeSplit: true,
9
- lib: {
10
- entry: [
11
- "src/lib/index.ts",
12
- "src/lib/oidc/oidc.tsx",
13
- "src/lib/hooks/hooks.ts",
14
- "src/lib/icons/icons.tsx",
15
- "src/lib/colors/colors.ts",
16
- "src/lib/rich-text/rich-text.ts",
17
- "src/lib/ui/ui.ts",
18
- "src/lib/ui/ui.css",
19
- ],
20
- name: "fe-lib",
21
- formats: ["es"],
22
- fileName: (format, entryname) => `${entryname}.${format}.js`,
23
- },
24
- rollupOptions: {
25
- external: [
26
- "react",
27
- "react-dom",
28
- "lexical",
29
- /^@lexical\/.*/,
30
- ],
31
- output: {
32
- globals: {
33
- react: "React",
34
- "react-dom": "ReactDOM",
35
- },
36
- },
37
- },
38
- },
39
- plugins: [
40
- react(),
41
- dts({
42
- insertTypesEntry: true,
43
- }),
44
- ],
45
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes