@fremtind/jokul 0.62.5 → 0.64.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.
- package/build/build-stats.html +1 -1
- package/build/cjs/components/card/development/examples/FakturainfoExample.d.cts +1 -1
- package/build/cjs/components/card/development/examples/InfoCardExample.d.cts +1 -1
- package/build/cjs/components/card/development/examples/NavCardExample.d.cts +1 -1
- package/build/cjs/components/card/development/examples/StatuskortExample.d.cts +1 -1
- package/build/cjs/components/card/development/examples/TaskCardExample.d.cts +1 -1
- package/build/cjs/components/card/development/examples/TopExample.d.cts +1 -1
- package/build/cjs/components/card/development/examples/cardExampleProps.d.cts +1 -1
- package/build/cjs/components/toast/toastContext.cjs +1 -1
- package/build/cjs/components/toast/toastContext.cjs.map +1 -1
- package/build/cjs/components/toast/types.d.cts +1 -0
- package/build/es/components/card/development/examples/FakturainfoExample.d.ts +1 -1
- package/build/es/components/card/development/examples/InfoCardExample.d.ts +1 -1
- package/build/es/components/card/development/examples/NavCardExample.d.ts +1 -1
- package/build/es/components/card/development/examples/StatuskortExample.d.ts +1 -1
- package/build/es/components/card/development/examples/TaskCardExample.d.ts +1 -1
- package/build/es/components/card/development/examples/TopExample.d.ts +1 -1
- package/build/es/components/card/development/examples/cardExampleProps.d.ts +1 -1
- package/build/es/components/toast/toastContext.js +1 -1
- package/build/es/components/toast/toastContext.js.map +1 -1
- package/build/es/components/toast/types.d.ts +1 -0
- package/build/style.css +1 -1
- package/package.json +2 -2
- package/styles/components/button/button.css +3 -3
- package/styles/components/button/button.min.css +1 -1
- package/styles/components/checkbox/checkbox.css +4 -4
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/checkbox-panel/checkbox-panel.css +2 -2
- package/styles/components/checkbox-panel/checkbox-panel.min.css +1 -1
- package/styles/components/countdown/countdown.css +2 -2
- package/styles/components/countdown/countdown.min.css +1 -1
- package/styles/components/feedback/feedback.css +2 -2
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/input-group/input-group.css +2 -2
- package/styles/components/input-group/input-group.min.css +1 -1
- package/styles/components/loader/loader.css +6 -6
- package/styles/components/loader/loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.css +5 -5
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/message/message.css +2 -2
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.css +1 -1
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/radio-button/radio-button.css +2 -2
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.css +2 -2
- package/styles/components/radio-panel/radio-panel.min.css +1 -1
- package/styles/components/system-message/system-message.css +2 -2
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/toast/toast.css +4 -4
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/styles.css +39 -39
- package/styles/styles.min.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExampleComponentProps, ExampleKnobsProps } from '
|
|
1
|
+
import { ExampleComponentProps, ExampleKnobsProps } from 'utils/dev-example/index.cjs';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export declare const FakturainfoExample: ({ boolValues, choiceValues, }: ExampleComponentProps) => React.JSX.Element;
|
|
4
4
|
export declare const fakturainfoExampleProps: ExampleKnobsProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExampleComponentProps, ExampleKnobsProps } from '
|
|
1
|
+
import { ExampleComponentProps, ExampleKnobsProps } from 'utils/dev-example/index.cjs';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export declare const StatuskortExample: ({ boolValues, choiceValues, }: ExampleComponentProps) => React.JSX.Element;
|
|
4
4
|
export declare const statuskortExampleProps: ExampleKnobsProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@react-stately/toast"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@react-stately/toast"),o=require("react"),i=require("./ToastRegion.cjs"),r=o.createContext({add:()=>"missing-provider",close:()=>{}});exports.ToastProvider=({children:s,maxVisibleToasts:u=5,placement:a="center"})=>{const[n]=o.useState(new t.ToastQueue({maxVisibleToasts:u,hasExitAnimation:!0}));return e.jsxs(r.Provider,{value:{close:n.close.bind(n),add:(e,t)=>{let o=5e3;return"number"==typeof(null==t?void 0:t.timeout)?o=t.timeout:(null===(null==t?void 0:t.timeout)||"off"===(null==t?void 0:t.timeout))&&(o=void 0),n.add(e,{...t,timeout:o})}},children:[s,e.jsx(i.ToastRegion,{queue:n,placement:a})]})},exports.useToast=()=>o.useContext(r);
|
|
2
2
|
//# sourceMappingURL=toastContext.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toastContext.cjs","sources":["../../../../src/components/toast/toastContext.tsx"],"sourcesContent":["import { ToastQueue } from \"@react-stately/toast\";\nimport React, { createContext, useContext, useState, type FC } from \"react\";\nimport { ToastRegion } from \"./ToastRegion.js\";\nimport {\n ToastContent,\n ToastContext,\n ToastContextProviderProps,\n ToastOptions,\n} from \"./types.js\";\n\nconst context = createContext<ToastContext>({\n add: () => {\n return \"missing-provider\";\n },\n});\n\nexport const useToast = (): ToastContext => useContext(context);\n\nexport const ToastProvider: FC<ToastContextProviderProps> = ({\n children,\n maxVisibleToasts = 5,\n placement = \"center\",\n}) => {\n const [queue] = useState(\n new ToastQueue<ToastContent>({\n maxVisibleToasts,\n hasExitAnimation: true,\n }),\n );\n\n return (\n <context.Provider\n value={{\n add: (toast: ToastContent, options?: ToastOptions) => {\n let timeout: number | undefined = 5000;\n\n if (typeof options?.timeout === \"number\") {\n timeout = options.timeout as number;\n } else if (\n options?.timeout === null ||\n options?.timeout === \"off\"\n ) {\n timeout = undefined;\n }\n\n return queue.add(toast, {\n ...options,\n timeout,\n });\n },\n }}\n >\n {children}\n <ToastRegion queue={queue} placement={placement} />\n </context.Provider>\n );\n};\n"],"names":["context","createContext","add","children","maxVisibleToasts","placement","queue","useState","ToastQueue","hasExitAnimation","jsxs","Provider","value","toast","options","timeout","jsx","ToastRegion","useContext"],"mappings":"yMAUMA,EAAUC,EAAAA,cAA4B,CACxCC,IAAK,IACM,
|
|
1
|
+
{"version":3,"file":"toastContext.cjs","sources":["../../../../src/components/toast/toastContext.tsx"],"sourcesContent":["import { ToastQueue } from \"@react-stately/toast\";\nimport React, { createContext, useContext, useState, type FC } from \"react\";\nimport { ToastRegion } from \"./ToastRegion.js\";\nimport {\n ToastContent,\n ToastContext,\n ToastContextProviderProps,\n ToastOptions,\n} from \"./types.js\";\n\nconst context = createContext<ToastContext>({\n add: () => {\n return \"missing-provider\";\n },\n close: () => {},\n});\n\nexport const useToast = (): ToastContext => useContext(context);\n\nexport const ToastProvider: FC<ToastContextProviderProps> = ({\n children,\n maxVisibleToasts = 5,\n placement = \"center\",\n}) => {\n const [queue] = useState(\n new ToastQueue<ToastContent>({\n maxVisibleToasts,\n hasExitAnimation: true,\n }),\n );\n\n return (\n <context.Provider\n value={{\n close: queue.close.bind(queue),\n add: (toast: ToastContent, options?: ToastOptions) => {\n let timeout: number | undefined = 5000;\n\n if (typeof options?.timeout === \"number\") {\n timeout = options.timeout as number;\n } else if (\n options?.timeout === null ||\n options?.timeout === \"off\"\n ) {\n timeout = undefined;\n }\n\n return queue.add(toast, {\n ...options,\n timeout,\n });\n },\n }}\n >\n {children}\n <ToastRegion queue={queue} placement={placement} />\n </context.Provider>\n );\n};\n"],"names":["context","createContext","add","close","children","maxVisibleToasts","placement","queue","useState","ToastQueue","hasExitAnimation","jsxs","Provider","value","bind","toast","options","timeout","jsx","ToastRegion","useContext"],"mappings":"yMAUMA,EAAUC,EAAAA,cAA4B,CACxCC,IAAK,IACM,mBAEXC,MAAO,+BAKiD,EACxDC,SAAAA,EACAC,iBAAAA,EAAmB,EACnBC,UAAAA,EAAY,aAEN,MAACC,GAASC,EAAAA,SACZ,IAAIC,aAAyB,CACzBJ,iBAAAA,EACAK,kBAAkB,KAKtB,OAAAC,EAAAA,KAACX,EAAQY,SAAR,CACGC,MAAO,CACHV,MAAOI,EAAMJ,MAAMW,KAAKP,GACxBL,IAAK,CAACa,EAAqBC,KACvB,IAAIC,EAA8B,IAE9B,MAA4B,iBAArB,MAAAD,OAAAA,EAAAA,EAASC,SAChBA,EAAUD,EAAQC,SAEG,QAArB,MAAAD,OAAAA,EAAAA,EAASC,UACY,SAArB,MAAAD,OAAAA,EAAAA,EAASC,YAECA,OAAA,GAGPV,EAAML,IAAIa,EAAO,IACjBC,EACHC,QAAAA,GACH,GAIRb,SAAA,CAAAA,EACDc,EAAAA,IAACC,EAAYA,YAAA,CAAAZ,MAAAA,EAAcD,UAAAA,MAAsB,mBAtCrC,IAAoBc,EAAAA,WAAWpB"}
|
|
@@ -11,6 +11,7 @@ export type ToastOptions = Omit<StatelyToastOptions, "timeout"> & {
|
|
|
11
11
|
};
|
|
12
12
|
export type ToastContext = {
|
|
13
13
|
add: (toast: ToastContent, options?: ToastOptions) => string;
|
|
14
|
+
close: (key: string) => void;
|
|
14
15
|
};
|
|
15
16
|
export type ToastContextProviderProps = WithChildren & {
|
|
16
17
|
maxVisibleToasts?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExampleComponentProps, ExampleKnobsProps } from '
|
|
1
|
+
import { ExampleComponentProps, ExampleKnobsProps } from 'utils/dev-example/index.js';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export declare const FakturainfoExample: ({ boolValues, choiceValues, }: ExampleComponentProps) => React.JSX.Element;
|
|
4
4
|
export declare const fakturainfoExampleProps: ExampleKnobsProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExampleComponentProps, ExampleKnobsProps } from '
|
|
1
|
+
import { ExampleComponentProps, ExampleKnobsProps } from 'utils/dev-example/index.js';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
export declare const StatuskortExample: ({ boolValues, choiceValues, }: ExampleComponentProps) => React.JSX.Element;
|
|
4
4
|
export declare const statuskortExampleProps: ExampleKnobsProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{ToastQueue as o}from"@react-stately/toast";import{createContext as s,useContext as a,useState as i}from"react";import{ToastRegion as r}from"./ToastRegion.js";const n=s({add:()=>"missing-provider",close:()=>{}}),m=()=>a(n),u=({children:s,maxVisibleToasts:a=5,placement:m="center"})=>{const[u]=i(new o({maxVisibleToasts:a,hasExitAnimation:!0}));return e(n.Provider,{value:{close:u.close.bind(u),add:(e,t)=>{let o=5e3;return"number"==typeof(null==t?void 0:t.timeout)?o=t.timeout:(null===(null==t?void 0:t.timeout)||"off"===(null==t?void 0:t.timeout))&&(o=void 0),u.add(e,{...t,timeout:o})}},children:[s,t(r,{queue:u,placement:m})]})};export{u as ToastProvider,m as useToast};
|
|
2
2
|
//# sourceMappingURL=toastContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toastContext.js","sources":["../../../../src/components/toast/toastContext.tsx"],"sourcesContent":["import { ToastQueue } from \"@react-stately/toast\";\nimport React, { createContext, useContext, useState, type FC } from \"react\";\nimport { ToastRegion } from \"./ToastRegion.js\";\nimport {\n ToastContent,\n ToastContext,\n ToastContextProviderProps,\n ToastOptions,\n} from \"./types.js\";\n\nconst context = createContext<ToastContext>({\n add: () => {\n return \"missing-provider\";\n },\n});\n\nexport const useToast = (): ToastContext => useContext(context);\n\nexport const ToastProvider: FC<ToastContextProviderProps> = ({\n children,\n maxVisibleToasts = 5,\n placement = \"center\",\n}) => {\n const [queue] = useState(\n new ToastQueue<ToastContent>({\n maxVisibleToasts,\n hasExitAnimation: true,\n }),\n );\n\n return (\n <context.Provider\n value={{\n add: (toast: ToastContent, options?: ToastOptions) => {\n let timeout: number | undefined = 5000;\n\n if (typeof options?.timeout === \"number\") {\n timeout = options.timeout as number;\n } else if (\n options?.timeout === null ||\n options?.timeout === \"off\"\n ) {\n timeout = undefined;\n }\n\n return queue.add(toast, {\n ...options,\n timeout,\n });\n },\n }}\n >\n {children}\n <ToastRegion queue={queue} placement={placement} />\n </context.Provider>\n );\n};\n"],"names":["context","createContext","add","useToast","useContext","ToastProvider","children","maxVisibleToasts","placement","queue","useState","ToastQueue","hasExitAnimation","jsxs","Provider","value","toast","options","timeout","jsx","ToastRegion"],"mappings":"uNAUA,MAAMA,EAAUC,EAA4B,CACxCC,IAAK,IACM,
|
|
1
|
+
{"version":3,"file":"toastContext.js","sources":["../../../../src/components/toast/toastContext.tsx"],"sourcesContent":["import { ToastQueue } from \"@react-stately/toast\";\nimport React, { createContext, useContext, useState, type FC } from \"react\";\nimport { ToastRegion } from \"./ToastRegion.js\";\nimport {\n ToastContent,\n ToastContext,\n ToastContextProviderProps,\n ToastOptions,\n} from \"./types.js\";\n\nconst context = createContext<ToastContext>({\n add: () => {\n return \"missing-provider\";\n },\n close: () => {},\n});\n\nexport const useToast = (): ToastContext => useContext(context);\n\nexport const ToastProvider: FC<ToastContextProviderProps> = ({\n children,\n maxVisibleToasts = 5,\n placement = \"center\",\n}) => {\n const [queue] = useState(\n new ToastQueue<ToastContent>({\n maxVisibleToasts,\n hasExitAnimation: true,\n }),\n );\n\n return (\n <context.Provider\n value={{\n close: queue.close.bind(queue),\n add: (toast: ToastContent, options?: ToastOptions) => {\n let timeout: number | undefined = 5000;\n\n if (typeof options?.timeout === \"number\") {\n timeout = options.timeout as number;\n } else if (\n options?.timeout === null ||\n options?.timeout === \"off\"\n ) {\n timeout = undefined;\n }\n\n return queue.add(toast, {\n ...options,\n timeout,\n });\n },\n }}\n >\n {children}\n <ToastRegion queue={queue} placement={placement} />\n </context.Provider>\n );\n};\n"],"names":["context","createContext","add","close","useToast","useContext","ToastProvider","children","maxVisibleToasts","placement","queue","useState","ToastQueue","hasExitAnimation","jsxs","Provider","value","bind","toast","options","timeout","jsx","ToastRegion"],"mappings":"uNAUA,MAAMA,EAAUC,EAA4B,CACxCC,IAAK,IACM,mBAEXC,MAAO,SAGEC,EAAW,IAAoBC,EAAWL,GAE1CM,EAA+C,EACxDC,SAAAA,EACAC,iBAAAA,EAAmB,EACnBC,UAAAA,EAAY,aAEN,MAACC,GAASC,EACZ,IAAIC,EAAyB,CACzBJ,iBAAAA,EACAK,kBAAkB,KAKtB,OAAAC,EAACd,EAAQe,SAAR,CACGC,MAAO,CACHb,MAAOO,EAAMP,MAAMc,KAAKP,GACxBR,IAAK,CAACgB,EAAqBC,KACvB,IAAIC,EAA8B,IAE9B,MAA4B,iBAArB,MAAAD,OAAAA,EAAAA,EAASC,SAChBA,EAAUD,EAAQC,SAEG,QAArB,MAAAD,OAAA,EAAAA,EAASC,UACY,SAArB,MAAAD,OAAA,EAAAA,EAASC,YAECA,OAAA,GAGPV,EAAMR,IAAIgB,EAAO,IACjBC,EACHC,QAAAA,GACH,GAIRb,SAAA,CAAAA,EACDc,EAACC,EAAY,CAAAZ,MAAAA,EAAcD,UAAAA,MAAsB"}
|
|
@@ -11,6 +11,7 @@ export type ToastOptions = Omit<StatelyToastOptions, "timeout"> & {
|
|
|
11
11
|
};
|
|
12
12
|
export type ToastContext = {
|
|
13
13
|
add: (toast: ToastContent, options?: ToastOptions) => string;
|
|
14
|
+
close: (key: string) => void;
|
|
14
15
|
};
|
|
15
16
|
export type ToastContextProviderProps = WithChildren & {
|
|
16
17
|
maxVisibleToasts?: number;
|