@arkitektbedriftene/fe-lib 5.11.0 → 5.11.2
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/fonts.css +1 -1
- package/dist/system.css +1 -1
- package/dist/ui/components/Form/Checkbox.d.ts +2 -2
- package/dist/ui.es.js +21 -16
- package/package.json +1 -1
package/dist/fonts.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:STKBureauSans;src:url(https://
|
|
1
|
+
@font-face{font-family:STKBureauSans;src:url(https://www.arkitektbedriftene.no/fonts/STKBureauSans-Regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:STKBureauSans;src:url(https://www.arkitektbedriftene.no/fonts/STKBureauSans-Italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:STKBureauSans;src:url(https://www.arkitektbedriftene.no/fonts/STKBureauSans-Bold.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:STKBureauSans;src:url(https://www.arkitektbedriftene.no/fonts/STKBureauSans-BoldItalic.woff2) format("woff2");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:STKBureauSerif;src:url(https://www.arkitektbedriftene.no/fonts/STKBureauSerif-Book.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}:root{--font-stk-bureau-sans: "STKBureauSans", sans-serif;--font-stk-bureau-serif: "STKBureauSerif", serif}body{@apply font-sans-serif;@apply antialiased;}
|
package/dist/system.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@theme{--*: initial; --default-transition-duration: .2s; --breakpoint-sm: 40rem; --breakpoint-md: 54rem; --breakpoint-lg: 64rem; --breakpoint-xl: 74rem; --spacing: 4px; --font-serif: var(--font-stk-bureau-serif); --font-sans-serif: var(--font-stk-bureau-sans); --font-weight-bold: 700; --color-black: #1d1d1d; --color-white: #ffffff; --color-blue: #4184cd; --color-flask: #122a0d; --color-flask-hover: #173611; --color-clay: #eee6d3; --color-clay-hover: #d6c9b6; --color-sand: #f3f1eb; --color-sand-hover: #e6dfce; --color-warning: #FFE1C3; --color-warning-light: #FFF8F2; --color-warning-dark: #9E5400; --color-danger: #FFC5C1; --color-danger-light: #FEF3F2; --color-danger-dark: #C72619; --color-success: #B8E0B0; --color-success-light: #ECFDF3; --color-success-dark: #2D6D20; --color-info: #C1D4FF; --color-info-light: #F2F6FE; --color-info-dark: #1946C7; --text-xs: clamp(.6944rem,.6856rem + .0444vw,.72rem); --text-sm: clamp(.8333rem,.8101rem + .1159vw,.9rem); --text-base: clamp(1rem,.9565rem + .2174vw,1.125rem); --text-md: clamp(1.2rem,1.1283rem + .3587vw,1.4063rem); --text-lg: clamp(1.44rem,1.3295rem + .5527vw,1.7578rem); --text-xl: clamp(1.728rem,1.5648rem + .8161vw,2.1973rem); --text-2xl: clamp(2.0736rem,1.8395rem + 1.1704vw,2.7466rem); --text-3xl: clamp(2.4883rem,2.1597rem + 1.6433vw,3.4332rem); --text-xs--line-height: 1.7; --text-sm--line-height: 1.6; --text-base--line-height: 1.5; --text-lg--line-height: 1.4; --text-xl--line-height: 1.3; --text-2xl--line-height: 1.2; --text-3xl--line-height: 1.1; --container-page: calc(var(--page-width) * 1px); --container-article: 800px; --container-event: 1300px; --radius-sm: .25rem; --radius-md: .5rem; --blur-md: .2rem; --blur-lg: .4rem; --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1),0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --aspect-video: 16 / 9; @keyframes spinner-logo {0% {transform: scale(.95) rotate(-15deg); opacity: 0;} 20% {transform: scale(1) rotate(0deg); opacity: 1;} 70% {transform: scale(1) rotate(0deg); opacity: 1;} 100% {transform: scale(.95) rotate(-15deg); opacity: 0;}} @keyframes spinner-logo-letter {0% {transform: translateY(-8px) rotate(-25deg) scale(.8); opacity: 0;} 6% {opacity: .3;} 20% {transform: translateY(0px) rotate(0deg) scale(1); opacity: 1;} 70% {transform: translateY(0px) rotate(0deg) scale(1); opacity: 1;} 100% {transform: translateY(-8px) rotate(-25deg) scale(.8); opacity: 0;}} --animate-spinner-logo: spinner-logo 3s cubic-bezier(.25,.46,.45,.94) infinite; --animate-spinner-logo-letter: spinner-logo-letter 3s cubic-bezier(.34,1.56,.64,1) infinite; @keyframes spinner {0% {transform: rotate(0deg);} 100% {transform: rotate(360deg);}} @keyframes spinner-circle {0% {stroke-dashoffset: 600;} 100% {stroke-dashoffset: 0;}} --animate-spinner: spinner 2s linear infinite; --animate-spinner-circle: spinner-circle 1.6s cubic-bezier(.4,.15,.6,.85) infinite;}@layer components{.btn{@apply bg-flask;@apply text-white;@apply px-4;@apply text-sm;@apply h-[2rem];@apply w-fit;@apply inline-flex;@apply items-center;@apply justify-center;@apply gap-x-2;@apply rounded-md;@apply transition-colors;@apply cursor-pointer;@variant focus{@apply ring ring-offset-2 ring-clay;}@variant hover{@apply bg-flask-hover;}@variant disabled{&:not([data-loading=true]) {@apply opacity-60; @apply cursor-not-allowed;}}}.btn>svg{@apply shrink-0;}.btn.btn-secondary{@apply bg-clay;@apply text-black;@variant hover{@apply bg-clay-hover;}}.btn.btn-tertiary{@apply bg-sand;@apply text-black;@variant hover{@apply bg-sand-hover;}}.btn.btn-danger{@apply bg-danger-dark;@apply text-danger-light;@variant hover{@apply bg-danger-dark/70;}}.btn.btn-warning{@apply bg-warning-dark;@apply text-warning-light;@variant hover{@apply bg-warning-dark/70;}}.btn.btn-success{@apply bg-success-dark;@apply text-success-light;@variant hover{@apply bg-success-dark/70;}}.btn.btn-outline{@apply bg-transparent;@apply text-black;@apply ring-2;@apply ring-inset;@apply ring-
|
|
1
|
+
@theme{--*: initial; --default-transition-duration: .2s; --breakpoint-sm: 40rem; --breakpoint-md: 54rem; --breakpoint-lg: 64rem; --breakpoint-xl: 74rem; --spacing: 4px; --font-serif: var(--font-stk-bureau-serif); --font-sans-serif: var(--font-stk-bureau-sans); --font-weight-bold: 700; --color-black: #1d1d1d; --color-white: #ffffff; --color-blue: #4184cd; --color-flask: #122a0d; --color-flask-hover: #173611; --color-flask-light: #1e4216; --color-flask-light-hover: #28571d; --color-clay: #eee6d3; --color-clay-hover: #d6c9b6; --color-sand: #f3f1eb; --color-sand-hover: #e6dfce; --color-warning: #FFE1C3; --color-warning-light: #FFF8F2; --color-warning-dark: #9E5400; --color-danger: #FFC5C1; --color-danger-light: #FEF3F2; --color-danger-dark: #C72619; --color-success: #B8E0B0; --color-success-light: #ECFDF3; --color-success-dark: #2D6D20; --color-info: #C1D4FF; --color-info-light: #F2F6FE; --color-info-dark: #1946C7; --text-xs: clamp(.6944rem,.6856rem + .0444vw,.72rem); --text-sm: clamp(.8333rem,.8101rem + .1159vw,.9rem); --text-base: clamp(1rem,.9565rem + .2174vw,1.125rem); --text-md: clamp(1.2rem,1.1283rem + .3587vw,1.4063rem); --text-lg: clamp(1.44rem,1.3295rem + .5527vw,1.7578rem); --text-xl: clamp(1.728rem,1.5648rem + .8161vw,2.1973rem); --text-2xl: clamp(2.0736rem,1.8395rem + 1.1704vw,2.7466rem); --text-3xl: clamp(2.4883rem,2.1597rem + 1.6433vw,3.4332rem); --text-xs--line-height: 1.7; --text-sm--line-height: 1.6; --text-base--line-height: 1.5; --text-lg--line-height: 1.4; --text-xl--line-height: 1.3; --text-2xl--line-height: 1.2; --text-3xl--line-height: 1.1; --container-page: calc(var(--page-width) * 1px); --container-article: 800px; --container-event: 1300px; --radius-sm: .25rem; --radius-md: .5rem; --blur-md: .2rem; --blur-lg: .4rem; --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1),0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --aspect-video: 16 / 9; @keyframes spinner-logo {0% {transform: scale(.95) rotate(-15deg); opacity: 0;} 20% {transform: scale(1) rotate(0deg); opacity: 1;} 70% {transform: scale(1) rotate(0deg); opacity: 1;} 100% {transform: scale(.95) rotate(-15deg); opacity: 0;}} @keyframes spinner-logo-letter {0% {transform: translateY(-8px) rotate(-25deg) scale(.8); opacity: 0;} 6% {opacity: .3;} 20% {transform: translateY(0px) rotate(0deg) scale(1); opacity: 1;} 70% {transform: translateY(0px) rotate(0deg) scale(1); opacity: 1;} 100% {transform: translateY(-8px) rotate(-25deg) scale(.8); opacity: 0;}} --animate-spinner-logo: spinner-logo 3s cubic-bezier(.25,.46,.45,.94) infinite; --animate-spinner-logo-letter: spinner-logo-letter 3s cubic-bezier(.34,1.56,.64,1) infinite; @keyframes spinner {0% {transform: rotate(0deg);} 100% {transform: rotate(360deg);}} @keyframes spinner-circle {0% {stroke-dashoffset: 600;} 100% {stroke-dashoffset: 0;}} --animate-spinner: spinner 2s linear infinite; --animate-spinner-circle: spinner-circle 1.6s cubic-bezier(.4,.15,.6,.85) infinite;}@layer components{.btn{@apply bg-flask-light;@apply text-white;@apply px-4;@apply text-sm;@apply h-[2rem];@apply w-fit;@apply inline-flex;@apply items-center;@apply justify-center;@apply gap-x-2;@apply rounded-md;@apply transition-colors;@apply cursor-pointer;@variant focus{@apply ring ring-offset-2 ring-clay;}@variant hover{@apply bg-flask-light-hover;}@variant disabled{&:not([data-loading=true]) {@apply opacity-60; @apply cursor-not-allowed;}}}.btn>svg{@apply shrink-0;}.btn.btn-secondary{@apply bg-clay;@apply text-black;@variant hover{@apply bg-clay-hover;}}.btn.btn-tertiary{@apply bg-sand;@apply text-black;@variant hover{@apply bg-sand-hover;}}.btn.btn-danger{@apply bg-danger-dark;@apply text-danger-light;@variant hover{@apply bg-danger-dark/70;}}.btn.btn-warning{@apply bg-warning-dark;@apply text-warning-light;@variant hover{@apply bg-warning-dark/70;}}.btn.btn-success{@apply bg-success-dark;@apply text-success-light;@variant hover{@apply bg-success-dark/70;}}.btn.btn-outline{@apply bg-transparent;@apply text-black;@apply ring-2;@apply ring-inset;@apply ring-flask-light;@variant hover{@apply bg-flask-light; @apply text-white;}}.btn.btn-outline.btn-secondary{@apply ring-clay;@variant hover{@apply bg-clay; @apply text-black;}}.btn.btn-outline.btn-danger{@apply ring-danger-dark;@apply text-danger-dark;@variant hover{@apply bg-danger-dark; @apply text-danger-light;}}.btn.btn-transparent{@apply bg-transparent;@apply text-black;@variant hover{@apply bg-flask-light; @apply text-white;}}.btn.btn-transparent.btn-secondary{@variant hover{@apply bg-clay; @apply text-black;}}.btn.btn-transparent.btn-tertiary{@variant hover{@apply bg-sand; @apply text-black;}}.dropdown{@apply rounded-md bg-white p-1 shadow-lg;}.dropdown-separator{height:1px;@apply bg-sand my-1;}.dropdown-item{@apply flex items-center w-full px-4 py-2 text-sm cursor-pointer transition-colors;@apply rounded-md;@apply text-left;@apply text-black;@variant hover{@apply bg-sand;}}.dropdown-item-icon-right{@apply pr-3;}.input{@apply bg-sand;@apply rounded-sm;@apply px-4;@apply py-2;@apply text-sm;@apply inline-flex;@apply transition-colors;@variant focus{@apply ring-2 ring-offset-2 ring-clay; @apply outline-none;}}.link{@apply text-black underline;}.alert{@apply px-3;@apply py-2;@apply rounded-md;@apply text-sm;@apply inline-flex;@apply items-center;@apply gap-x-2;}.alert.alert-warning{@apply bg-warning-light;@apply text-warning-dark;@apply border border-warning;}.alert.alert-danger{@apply bg-danger-light;@apply text-danger-dark;@apply border border-danger;}.alert.alert-info{@apply bg-info-light;@apply text-info-dark;@apply border border-info;}.alert.alert-success{@apply bg-success-light;@apply text-success-dark;@apply border border-success;}.tbl{@apply w-full;@apply border-collapse;@apply bg-white;@apply text-black;@apply text-sm;@apply border border-black;}.tbl th{@apply font-bold;@apply text-left;}.tbl td,.tbl th{@apply px-4;@apply py-3;@apply border-b border-black;@apply border-r border-black;}.tbl tbody tr{@apply transition-colors;@variant hover{@apply bg-sand;}}.tabs{@apply flex border-b-2 border-clay;@apply gap-x-2;@apply pb-1;}.tab{@apply px-4 py-2;@apply rounded-md;@apply font-bold;@apply text-sm;@apply transition;@apply cursor-pointer;@apply flex items-center;}.tab:hover{@apply bg-clay/70;}.tab.active{@apply bg-clay;}.input-radio{@apply accent-flask;}.form-label{@apply block;@apply text-base;@apply mb-1;}.spinner-logo{animation:var(--animate-spinner-logo)}.spinner-logo>svg>path{transform-origin:center center;opacity:0;animation:var(--animate-spinner-logo-letter)}.spinner-logo>svg>path:nth-child(1){animation-delay:.1s}.spinner-logo>svg>path:nth-child(2){animation-delay:.2s}.spinner-logo>svg>path:nth-child(3){animation-delay:.3s}.spinner-logo>svg>path:nth-child(4){animation-delay:.4s}.spinner-logo>svg>path:nth-child(5){animation-delay:.5s}.spinner-logo>svg>path:nth-child(6){animation-delay:.6s}}@utility btn-icon{@apply px-0; @apply w-[2rem];}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import * as RCheckbox from "@radix-ui/react-checkbox";
|
|
3
3
|
declare const Root: import('@stitches/react/types/styled-component').StyledComponent<import('react').ForwardRefExoticComponent<RCheckbox.CheckboxProps & import('react').RefAttributes<HTMLButtonElement>>, {
|
|
4
4
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -129,6 +129,6 @@ declare const Root: import('@stitches/react/types/styled-component').StyledCompo
|
|
|
129
129
|
};
|
|
130
130
|
}, import('@stitches/react/types/config').DefaultThemeMap, {}>>;
|
|
131
131
|
export declare const Checkbox: ({ id, size, label, ...props }: {
|
|
132
|
-
label?: string;
|
|
132
|
+
label?: string | ReactNode;
|
|
133
133
|
} & ComponentProps<typeof Root>) => import("react/jsx-runtime").JSX.Element;
|
|
134
134
|
export {};
|
package/dist/ui.es.js
CHANGED
|
@@ -409,13 +409,13 @@ const bo = h({
|
|
|
409
409
|
left: "translateX(-0.5rem)"
|
|
410
410
|
}[G]
|
|
411
411
|
})
|
|
412
|
-
}),
|
|
412
|
+
}), O = no(b, { enabled: i === "click" }), X = ao(b, {
|
|
413
413
|
enabled: i === "hover",
|
|
414
414
|
delay: s,
|
|
415
415
|
handleClose: io()
|
|
416
416
|
}), E = so(b), L = lo(b, { role: $ }), { getFloatingProps: R, getReferenceProps: T } = co([
|
|
417
|
+
O,
|
|
417
418
|
X,
|
|
418
|
-
j,
|
|
419
419
|
E,
|
|
420
420
|
L
|
|
421
421
|
]), Y = k(
|
|
@@ -756,7 +756,7 @@ const bo = h({
|
|
|
756
756
|
r = o.charCodeAt($) + ((r << 5) - r);
|
|
757
757
|
const l = `hsl(${r % 360}, 80%, 40%)`;
|
|
758
758
|
return H.set(o, l), l;
|
|
759
|
-
},
|
|
759
|
+
}, jo = n("div", {
|
|
760
760
|
flex: "0 0 auto",
|
|
761
761
|
display: "inline-flex",
|
|
762
762
|
alignItems: "center",
|
|
@@ -796,8 +796,8 @@ const bo = h({
|
|
|
796
796
|
() => e ? Vo(e) : "$gray200",
|
|
797
797
|
[e]
|
|
798
798
|
);
|
|
799
|
-
return /* @__PURE__ */ t(
|
|
800
|
-
},
|
|
799
|
+
return /* @__PURE__ */ t(jo, { css: { backgroundColor: a, ...o }, ...r });
|
|
800
|
+
}, No = n(P, {
|
|
801
801
|
minWidth: "max(var(--radix-popper-anchor-width), 12rem)",
|
|
802
802
|
padding: "$1"
|
|
803
803
|
}), S = f({
|
|
@@ -841,10 +841,10 @@ const bo = h({
|
|
|
841
841
|
align: e,
|
|
842
842
|
collisionPadding: 10,
|
|
843
843
|
sideOffset: i,
|
|
844
|
-
children: /* @__PURE__ */ t(
|
|
844
|
+
children: /* @__PURE__ */ t(No, { children: a })
|
|
845
845
|
}
|
|
846
846
|
) })
|
|
847
|
-
] }),
|
|
847
|
+
] }), Oo = n(m.ItemIndicator, {
|
|
848
848
|
position: "absolute",
|
|
849
849
|
left: 0,
|
|
850
850
|
top: 0,
|
|
@@ -862,17 +862,17 @@ const bo = h({
|
|
|
862
862
|
display: "flex",
|
|
863
863
|
alignItems: "center",
|
|
864
864
|
gap: "$2"
|
|
865
|
-
}),
|
|
865
|
+
}), Xo = n(m.CheckboxItem, S), Ie = ({
|
|
866
866
|
value: o,
|
|
867
867
|
onChange: e,
|
|
868
868
|
children: r
|
|
869
869
|
}) => /* @__PURE__ */ c(
|
|
870
|
-
|
|
870
|
+
Xo,
|
|
871
871
|
{
|
|
872
872
|
checked: o,
|
|
873
873
|
onCheckedChange: e,
|
|
874
874
|
children: [
|
|
875
|
-
/* @__PURE__ */ t(
|
|
875
|
+
/* @__PURE__ */ t(Oo, { children: /* @__PURE__ */ t(po, { size: "0.75rem" }) }),
|
|
876
876
|
r
|
|
877
877
|
]
|
|
878
878
|
}
|
|
@@ -987,7 +987,7 @@ const bo = h({
|
|
|
987
987
|
}
|
|
988
988
|
),
|
|
989
989
|
typeof r == "string" && /* @__PURE__ */ t(d, { css: { color: "$red600", fontSize: "$sm", marginTop: "$2" }, children: r })
|
|
990
|
-
] }),
|
|
990
|
+
] }), j = f({
|
|
991
991
|
display: "block",
|
|
992
992
|
width: "100%",
|
|
993
993
|
padding: "0.5rem 0.75rem",
|
|
@@ -999,7 +999,7 @@ const bo = h({
|
|
|
999
999
|
"-webkit-appearance": "none",
|
|
1000
1000
|
"-moz-appearance": "none",
|
|
1001
1001
|
appearance: "none"
|
|
1002
|
-
}),
|
|
1002
|
+
}), N = f({
|
|
1003
1003
|
display: "block",
|
|
1004
1004
|
width: "100%",
|
|
1005
1005
|
background: "#fff",
|
|
@@ -1023,7 +1023,7 @@ const bo = h({
|
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
|
-
}), Yo = n("input",
|
|
1026
|
+
}), Yo = n("input", j), Go = n("div", N, {
|
|
1027
1027
|
display: "flex",
|
|
1028
1028
|
alignItems: "center",
|
|
1029
1029
|
gap: "$2",
|
|
@@ -1079,7 +1079,7 @@ const bo = h({
|
|
|
1079
1079
|
typeof r == "string" && /* @__PURE__ */ t(d, { css: { color: "$red600", fontSize: "$sm", marginTop: "$2" }, children: r })
|
|
1080
1080
|
] });
|
|
1081
1081
|
}
|
|
1082
|
-
), Ko = n("textarea",
|
|
1082
|
+
), Ko = n("textarea", j), Uo = n("div", N, {
|
|
1083
1083
|
display: "flex",
|
|
1084
1084
|
alignItems: "center",
|
|
1085
1085
|
gap: "$2",
|
|
@@ -1183,8 +1183,13 @@ const bo = h({
|
|
|
1183
1183
|
color: "primary"
|
|
1184
1184
|
}
|
|
1185
1185
|
}), qo = n(F.Indicator, {
|
|
1186
|
+
display: "flex",
|
|
1187
|
+
alignItems: "center",
|
|
1188
|
+
justifyContent: "center",
|
|
1186
1189
|
"[data-icon]": {
|
|
1187
|
-
display: "none"
|
|
1190
|
+
display: "none",
|
|
1191
|
+
width: "85%",
|
|
1192
|
+
height: "auto"
|
|
1188
1193
|
},
|
|
1189
1194
|
"&[data-state=checked] [data-icon=checked], &[data-state=indeterminate] [data-icon=indeterminate]": {
|
|
1190
1195
|
display: "block"
|
|
@@ -1295,7 +1300,7 @@ export {
|
|
|
1295
1300
|
ze as DropdownMenuIconItem,
|
|
1296
1301
|
Se as DropdownMenuItem,
|
|
1297
1302
|
Ce as DropdownMenuSeparator,
|
|
1298
|
-
|
|
1303
|
+
No as MenuOverlayCard,
|
|
1299
1304
|
be as NavBar,
|
|
1300
1305
|
fe as NavBarItem,
|
|
1301
1306
|
P as OverlayCard,
|