@arkitektbedriftene/fe-lib 0.3.19 → 0.3.20

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.
@@ -378,7 +378,7 @@ var W = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
378
378
  }))(t), t;
379
379
  };
380
380
  let It = 9999;
381
- const Pt = () => (It--, It), { styled: V, css: mt, keyframes: Be, globalCss: hi } = ar({
381
+ const Pt = () => (It--, It), { styled: H, css: mt, keyframes: Be, globalCss: hi } = ar({
382
382
  theme: {
383
383
  colors: {
384
384
  gray50: "#F9FAFA",
@@ -518,9 +518,9 @@ const Pt = () => (It--, It), { styled: V, css: mt, keyframes: Be, globalCss: hi
518
518
  "100%": {
519
519
  strokeDashoffset: 0
520
520
  }
521
- }), dr = V("svg", {
521
+ }), dr = H("svg", {
522
522
  animation: `${cr} 2s linear infinite`
523
- }), fr = V("circle", {
523
+ }), fr = H("circle", {
524
524
  animation: `${ur} 1.6s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite`,
525
525
  fill: "transparent",
526
526
  stroke: "currentColor",
@@ -529,7 +529,7 @@ const Pt = () => (It--, It), { styled: V, css: mt, keyframes: Be, globalCss: hi
529
529
  strokeLinecap: "round",
530
530
  strokeMiterlimit: 10,
531
531
  strokeWidth: 12
532
- }), mr = V("div", {
532
+ }), mr = H("div", {
533
533
  lineHeight: 0,
534
534
  flexShrink: 0,
535
535
  variants: {
@@ -591,7 +591,7 @@ const Pt = () => (It--, It), { styled: V, css: mt, keyframes: Be, globalCss: hi
591
591
  )
592
592
  }
593
593
  )
594
- ), pr = V("button", {
594
+ ), pr = H("button", {
595
595
  appearance: "none",
596
596
  margin: 0,
597
597
  padding: 0,
@@ -753,7 +753,7 @@ const Pt = () => (It--, It), { styled: V, css: mt, keyframes: Be, globalCss: hi
753
753
  ]
754
754
  }
755
755
  ))
756
- ), br = V("div", {
756
+ ), br = H("div", {
757
757
  padding: "$3",
758
758
  borderRadius: "$md",
759
759
  variants: {
@@ -834,7 +834,7 @@ const Pt = () => (It--, It), { styled: V, css: mt, keyframes: Be, globalCss: hi
834
834
  '&[data-side="bottom"]': { animationName: yr },
835
835
  '&[data-side="left"]': { animationName: vr }
836
836
  }
837
- }), tn = V(
837
+ }), tn = H(
838
838
  "div",
839
839
  $r,
840
840
  Sr
@@ -2657,38 +2657,38 @@ function Jo(e, t) {
2657
2657
  const $ = Se(v), F = "[" + Qe("inert") + "]", K = fe(l).querySelectorAll(F);
2658
2658
  let G = N($) ? $ : null;
2659
2659
  for (; G && !Te(G); ) {
2660
- const H = he(G);
2661
- if (Te(H) || !N(H))
2660
+ const V = he(G);
2661
+ if (Te(V) || !N(V))
2662
2662
  break;
2663
- G = H;
2663
+ G = V;
2664
2664
  }
2665
2665
  if (K.length && N($) && !Ir($) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2666
2666
  !pe($, l) && // If the target root element contains none of the markers, then the
2667
2667
  // element was injected after the floating element rendered.
2668
- Array.from(K).every((H) => !pe(G, H)))
2668
+ Array.from(K).every((V) => !pe(G, V)))
2669
2669
  return;
2670
2670
  if (Z($) && l) {
2671
- const H = $.clientWidth > 0 && $.scrollWidth > $.clientWidth, X = $.clientHeight > 0 && $.scrollHeight > $.clientHeight;
2671
+ const V = $.clientWidth > 0 && $.scrollWidth > $.clientWidth, X = $.clientHeight > 0 && $.scrollHeight > $.clientHeight;
2672
2672
  let ae = X && v.offsetX > $.clientWidth;
2673
- if (X && J($).direction === "rtl" && (ae = v.offsetX <= $.offsetWidth - $.clientWidth), ae || H && v.offsetY > $.clientHeight)
2673
+ if (X && J($).direction === "rtl" && (ae = v.offsetX <= $.offsetWidth - $.clientWidth), ae || V && v.offsetY > $.clientHeight)
2674
2674
  return;
2675
2675
  }
2676
- const ye = x && Ve(x.nodesRef.current, o).some((H) => {
2676
+ const ye = x && Ve(x.nodesRef.current, o).some((V) => {
2677
2677
  var X;
2678
- return tt(v, (X = H.context) == null ? void 0 : X.elements.floating);
2678
+ return tt(v, (X = V.context) == null ? void 0 : X.elements.floating);
2679
2679
  });
2680
2680
  if (tt(v, l) || tt(v, s) || ye)
2681
2681
  return;
2682
2682
  const le = x ? Ve(x.nodesRef.current, o) : [];
2683
2683
  if (le.length > 0) {
2684
- let H = !0;
2684
+ let V = !0;
2685
2685
  if (le.forEach((X) => {
2686
2686
  var ae;
2687
2687
  if ((ae = X.context) != null && ae.open && !X.context.dataRef.current.__outsidePressBubbles) {
2688
- H = !1;
2688
+ V = !1;
2689
2689
  return;
2690
2690
  }
2691
- }), !H)
2691
+ }), !V)
2692
2692
  return;
2693
2693
  }
2694
2694
  r(!1, v, "outside-press");
@@ -3085,7 +3085,7 @@ function li(e) {
3085
3085
  const {
3086
3086
  clientX: C,
3087
3087
  clientY: A
3088
- } = S, T = [C, A], B = Se(S), D = S.type === "mouseleave", L = pe(p.floating, B), M = pe(p.domReference, B), O = p.domReference.getBoundingClientRect(), b = p.floating.getBoundingClientRect(), v = g.split("-")[0], I = f > b.right - b.width / 2, R = u > b.bottom - b.height / 2, $ = si(T, O), F = b.width > O.width, K = b.height > O.height, G = (F ? O : b).left, ye = (F ? O : b).right, le = (K ? O : b).top, H = (K ? O : b).bottom;
3088
+ } = S, T = [C, A], B = Se(S), D = S.type === "mouseleave", L = pe(p.floating, B), M = pe(p.domReference, B), O = p.domReference.getBoundingClientRect(), b = p.floating.getBoundingClientRect(), v = g.split("-")[0], I = f > b.right - b.width / 2, R = u > b.bottom - b.height / 2, $ = si(T, O), F = b.width > O.width, K = b.height > O.height, G = (F ? O : b).left, ye = (F ? O : b).right, le = (K ? O : b).top, V = (K ? O : b).bottom;
3089
3089
  if (L && (i = !0, !D))
3090
3090
  return;
3091
3091
  if (M && (i = !1), M && !D) {
@@ -3110,10 +3110,10 @@ function li(e) {
3110
3110
  X = [[G, b.top + 1], [G, O.bottom - 1], [ye, O.bottom - 1], [ye, b.top + 1]];
3111
3111
  break;
3112
3112
  case "left":
3113
- X = [[b.right - 1, H], [b.right - 1, le], [O.left + 1, le], [O.left + 1, H]];
3113
+ X = [[b.right - 1, V], [b.right - 1, le], [O.left + 1, le], [O.left + 1, V]];
3114
3114
  break;
3115
3115
  case "right":
3116
- X = [[O.right - 1, H], [O.right - 1, le], [b.left + 1, le], [b.left + 1, H]];
3116
+ X = [[O.right - 1, V], [O.right - 1, le], [b.left + 1, le], [b.left + 1, V]];
3117
3117
  break;
3118
3118
  }
3119
3119
  function ae(ce) {
@@ -3153,7 +3153,7 @@ function li(e) {
3153
3153
  blockPointerEvents: n
3154
3154
  }, m;
3155
3155
  }
3156
- const ai = V("div"), wt = kn(
3156
+ const ai = H("div"), wt = kn(
3157
3157
  {}
3158
3158
  ), vi = ({
3159
3159
  children: e,
@@ -3235,7 +3235,7 @@ const ai = V("div"), wt = kn(
3235
3235
  children: /* @__PURE__ */ z(tn, { ...t, style: s, children: e })
3236
3236
  }
3237
3237
  ) }) : null;
3238
- }, $i = V("span", {
3238
+ }, $i = H("span", {
3239
3239
  flex: "0 0 auto",
3240
3240
  display: "inline-flex",
3241
3241
  padding: "$1 $2",
@@ -3272,17 +3272,17 @@ const ai = V("div"), wt = kn(
3272
3272
  defaultVariants: {
3273
3273
  color: "primary"
3274
3274
  }
3275
- }), Si = V(Le.Root, {
3275
+ }), Si = H(Le.Root, {
3276
3276
  backgroundColor: "$gray50",
3277
3277
  display: "flex",
3278
3278
  alignItems: "center",
3279
3279
  padding: "$1",
3280
3280
  gap: "$1"
3281
- }), Ri = V(Le.ToggleGroup, {
3281
+ }), Ri = H(Le.ToggleGroup, {
3282
3282
  display: "flex",
3283
3283
  gap: "$1",
3284
3284
  alignItems: "center"
3285
- }), Ei = V(Le.Separator, {
3285
+ }), Ei = H(Le.Separator, {
3286
3286
  width: "1px",
3287
3287
  height: "1.5rem",
3288
3288
  my: "$1",
@@ -3344,7 +3344,32 @@ const ai = V("div"), wt = kn(
3344
3344
  }
3345
3345
  )
3346
3346
  }
3347
- )), ci = V(tn, {
3347
+ )), Ti = H("div", {
3348
+ color: "$$cardText",
3349
+ backgroundColor: "$$cardBackground",
3350
+ borderRadius: "$md",
3351
+ padding: "$4",
3352
+ variants: {
3353
+ variant: {
3354
+ primary: {
3355
+ $$cardBackground: "white",
3356
+ $$cardText: "$text"
3357
+ }
3358
+ },
3359
+ elevation: {
3360
+ none: {
3361
+ boxShadow: "none"
3362
+ },
3363
+ raised: {
3364
+ boxShadow: "$md"
3365
+ }
3366
+ }
3367
+ },
3368
+ defaultVariants: {
3369
+ variant: "primary",
3370
+ elevation: "raised"
3371
+ }
3372
+ }), ci = H(tn, {
3348
3373
  minWidth: "max(var(--radix-popper-anchor-width), 12rem)",
3349
3374
  padding: "$1"
3350
3375
  }), $t = mt({
@@ -3370,7 +3395,7 @@ const ai = V("div"), wt = kn(
3370
3395
  backgroundColor: "transparent"
3371
3396
  }
3372
3397
  }
3373
- }), Ti = ({
3398
+ }), Ii = ({
3374
3399
  side: e = "bottom",
3375
3400
  align: t = "center",
3376
3401
  trigger: n,
@@ -3390,7 +3415,7 @@ const ai = V("div"), wt = kn(
3390
3415
  children: /* @__PURE__ */ z(ci, { children: r })
3391
3416
  }
3392
3417
  ) })
3393
- ] }), ui = V(ee.ItemIndicator, {
3418
+ ] }), ui = H(ee.ItemIndicator, {
3394
3419
  position: "absolute",
3395
3420
  left: 0,
3396
3421
  top: 0,
@@ -3399,16 +3424,16 @@ const ai = V("div"), wt = kn(
3399
3424
  display: "flex",
3400
3425
  justifyContent: "center",
3401
3426
  alignItems: "center"
3402
- }), Ii = V(ee.Separator, {
3427
+ }), Pi = H(ee.Separator, {
3403
3428
  height: 1,
3404
3429
  backgroundColor: "$gray200",
3405
3430
  margin: 1
3406
- }), Pi = V(ee.Item, $t), Ai = V(ee.Item, $t, {
3431
+ }), Ai = H(ee.Item, $t), Bi = H(ee.Item, $t, {
3407
3432
  padding: "$2",
3408
3433
  display: "flex",
3409
3434
  alignItems: "center",
3410
3435
  gap: "$2"
3411
- }), di = V(ee.CheckboxItem, $t), Bi = ({
3436
+ }), di = H(ee.CheckboxItem, $t), Oi = ({
3412
3437
  value: e,
3413
3438
  onChange: t,
3414
3439
  children: n
@@ -3426,14 +3451,15 @@ const ai = V("div"), wt = kn(
3426
3451
  export {
3427
3452
  bi as A,
3428
3453
  ai as B,
3429
- Ti as D,
3454
+ Ti as C,
3455
+ Ii as D,
3430
3456
  Xo as F,
3431
3457
  ci as M,
3432
3458
  tn as O,
3433
3459
  vi as P,
3434
3460
  gr as S,
3435
3461
  Ci as T,
3436
- Ai as a,
3462
+ Bi as a,
3437
3463
  Ri as b,
3438
3464
  mt as c,
3439
3465
  ki as d,
@@ -3451,12 +3477,12 @@ export {
3451
3477
  Be as p,
3452
3478
  hi as q,
3453
3479
  hr as r,
3454
- V as s,
3480
+ H as s,
3455
3481
  $i as t,
3456
3482
  Qo as u,
3457
3483
  Rn as v,
3458
3484
  $t as w,
3459
- Ii as x,
3460
- Pi as y,
3461
- Bi as z
3485
+ Pi as x,
3486
+ Ai as y,
3487
+ Oi as z
3462
3488
  };
@@ -8,7 +8,7 @@ import { HeadingNode as xt, QuoteNode as Et, $isHeadingNode as St, $createHeadin
8
8
  import { TableNode as Ot, TableRowNode as _t, TableCellNode as Rt } from "@lexical/table";
9
9
  import { jsx as o, jsxs as C, Fragment as j } from "react/jsx-runtime";
10
10
  import { createContext as zt, useState as v, useRef as Z, useCallback as M, useContext as Bt, useEffect as z, useMemo as tt, useLayoutEffect as Dt } from "react";
11
- import { c as w, s as et, D as Ht, T as Ft, a as m, B as O, b as Pt, d as S, u as $t, e as At, f as Wt, g as jt, o as Kt, h as Ut, i as Yt, j as qt, F as Gt, O as Qt, k as Xt, l as Vt, S as Jt } from "./DropdownMenu-1eb444b3.js";
11
+ import { c as w, s as et, D as Ht, T as Ft, a as m, B as O, b as Pt, d as S, u as $t, e as At, f as Wt, g as jt, o as Kt, h as Ut, i as Yt, j as qt, F as Gt, O as Qt, k as Xt, l as Vt, S as Jt } from "./DropdownMenu-7a3b57bd.js";
12
12
  import { LexicalComposer as Zt } from "@lexical/react/LexicalComposer.js";
13
13
  import { RichTextPlugin as te } from "@lexical/react/LexicalRichTextPlugin.js";
14
14
  import ee from "@lexical/react/LexicalErrorBoundary.js";
@@ -0,0 +1,118 @@
1
+ export declare const Card: import("@stitches/react/types/styled-component").StyledComponent<"div", {
2
+ variant?: "primary" | undefined;
3
+ elevation?: "none" | "raised" | undefined;
4
+ }, {
5
+ lg: "(min-width: 1200px)";
6
+ print: "print";
7
+ }, import("@stitches/react/types/css-util").CSS<{
8
+ lg: "(min-width: 1200px)";
9
+ print: "print";
10
+ }, {
11
+ colors: {
12
+ gray50: string;
13
+ gray100: string;
14
+ gray200: string;
15
+ gray300: string;
16
+ gray400: string;
17
+ gray500: string;
18
+ gray600: string;
19
+ gray700: string;
20
+ gray800: string;
21
+ gray900: string;
22
+ blue50: string;
23
+ blue100: string;
24
+ blue200: string;
25
+ blue300: string;
26
+ blue400: string;
27
+ blue500: string;
28
+ blue600: string;
29
+ blue700: string;
30
+ blue800: string;
31
+ blue900: string;
32
+ yellow50: string;
33
+ yellow100: string;
34
+ yellow200: string;
35
+ yellow300: string;
36
+ yellow400: string;
37
+ yellow500: string;
38
+ yellow600: string;
39
+ yellow700: string;
40
+ yellow800: string;
41
+ yellow900: string;
42
+ orange500: string;
43
+ red50: string;
44
+ red100: string;
45
+ red200: string;
46
+ red300: string;
47
+ red400: string;
48
+ red500: string;
49
+ red600: string;
50
+ red700: string;
51
+ red800: string;
52
+ red900: string;
53
+ green50: string;
54
+ green100: string;
55
+ green200: string;
56
+ green300: string;
57
+ green400: string;
58
+ green500: string;
59
+ green600: string;
60
+ green700: string;
61
+ green800: string;
62
+ green900: string;
63
+ primaryTextOnLightBg: string;
64
+ primaryBg: string;
65
+ primaryBgHover: string;
66
+ primaryTextOnWhite: string;
67
+ bodyGray: string;
68
+ hoverDarker: string;
69
+ borderDarker: string;
70
+ selectedDarker: string;
71
+ selectedOnBodyGray: string;
72
+ darkGrayBg: string;
73
+ border: string;
74
+ text: string;
75
+ secondaryText: string;
76
+ focusRing: string;
77
+ };
78
+ fontSizes: {
79
+ xs: string;
80
+ sm: string;
81
+ md: string;
82
+ lg: string;
83
+ xl: string;
84
+ "2xl": string;
85
+ "3xl": string;
86
+ };
87
+ fontWeights: {
88
+ normal: string;
89
+ medium: string;
90
+ bold: string;
91
+ };
92
+ space: {
93
+ 1: string;
94
+ 2: string;
95
+ 3: string;
96
+ 4: string;
97
+ 6: string;
98
+ 8: string;
99
+ };
100
+ shadows: {
101
+ xs: string;
102
+ sm: string;
103
+ md: string;
104
+ lg: string;
105
+ overlayCard: string;
106
+ };
107
+ radii: {
108
+ xs: string;
109
+ sm: string;
110
+ md: string;
111
+ mdmd: string;
112
+ full: string;
113
+ };
114
+ zIndices: {
115
+ toast: number;
116
+ overlayCard: number;
117
+ };
118
+ }, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
package/dist/ui/ui.d.ts CHANGED
@@ -8,5 +8,6 @@ export * from './components/Box';
8
8
  export * from './components/Tooltip';
9
9
  export * from './components/Badge';
10
10
  export * from './components/Toolbar';
11
+ export * from './components/Card';
11
12
  export * from './components/Menu/Menu';
12
13
  export * from './components/Menu/DropdownMenu';
package/dist/ui.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { P as t, m as n, n as p } from "./DropdownMenu-1eb444b3.js";
2
- import { A as y, t as C, B as I, r as M, v as S, D as w, z as B, a as D, y as h, x as O, M as P, O as k, S as A, k as $, T as j, l as z, b as q, d as G, c as E, q as F, p as H, w as J, s as K } from "./DropdownMenu-1eb444b3.js";
1
+ import { P as t, m as n, n as p } from "./DropdownMenu-7a3b57bd.js";
2
+ import { A as x, t as y, B as I, r as M, v as S, C as w, D as B, z as D, a as h, y as O, x as P, M as k, O as A, S as $, k as j, T as z, l as q, b as G, d as E, c as F, q as H, p as J, w as K, s as L } from "./DropdownMenu-7a3b57bd.js";
3
3
  import { jsxs as l, jsx as o } from "react/jsx-runtime";
4
4
  import { useState as m } from "react";
5
5
  import "react-dom";
@@ -32,31 +32,32 @@ const T = ({ children: r, content: a }) => {
32
32
  );
33
33
  };
34
34
  export {
35
- y as Alert,
36
- C as Badge,
35
+ x as Alert,
36
+ y as Badge,
37
37
  I as Box,
38
38
  M as Button,
39
39
  S as ButtonInToolbar,
40
- w as DropdownMenu,
41
- B as DropdownMenuCheckboxItem,
42
- D as DropdownMenuIconItem,
43
- h as DropdownMenuItem,
44
- O as DropdownMenuSeparator,
45
- P as MenuOverlayCard,
46
- k as OverlayCard,
40
+ w as Card,
41
+ B as DropdownMenu,
42
+ D as DropdownMenuCheckboxItem,
43
+ h as DropdownMenuIconItem,
44
+ O as DropdownMenuItem,
45
+ P as DropdownMenuSeparator,
46
+ k as MenuOverlayCard,
47
+ A as OverlayCard,
47
48
  t as Popover,
48
49
  p as PopoverContent,
49
50
  n as PopoverTrigger,
50
- A as Spinner,
51
- $ as Toolbar,
52
- j as ToolbarButton,
53
- z as ToolbarSeparator,
54
- q as ToolbarToggleGroup,
55
- G as ToolbarToggleItem,
51
+ $ as Spinner,
52
+ j as Toolbar,
53
+ z as ToolbarButton,
54
+ q as ToolbarSeparator,
55
+ G as ToolbarToggleGroup,
56
+ E as ToolbarToggleItem,
56
57
  T as Tooltip,
57
- E as css,
58
- F as globalCss,
59
- H as keyframes,
60
- J as menuItemStyles,
61
- K as styled
58
+ F as css,
59
+ H as globalCss,
60
+ J as keyframes,
61
+ K as menuItemStyles,
62
+ L as styled
62
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkitektbedriftene/fe-lib",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {