@fremtind/jokul 0.55.0 → 0.56.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/breadcrumb/stories/Breadcrumb.stories.cjs +1 -1
- package/build/cjs/components/breadcrumb/stories/BreadcrumbItem.stories.cjs +1 -1
- package/build/cjs/components/input-group/stories/InputGroup.stories.cjs +1 -1
- package/build/cjs/components/input-group/stories/InputGroup.stories.cjs.map +1 -1
- package/build/cjs/components/modal/stories/CompleteModal.stories.cjs +2 -0
- package/build/cjs/components/modal/stories/CompleteModal.stories.cjs.map +1 -0
- package/build/cjs/components/modal/stories/CompleteModal.stories.d.cts +20 -0
- package/build/cjs/components/text-input/stories/BaseTextInput.stories.cjs +2 -0
- package/build/cjs/components/text-input/stories/BaseTextInput.stories.cjs.map +1 -0
- package/build/cjs/components/text-input/stories/BaseTextInput.stories.d.cts +55 -0
- package/build/cjs/components/text-input/stories/TextInput.stories.cjs +2 -0
- package/build/cjs/components/text-input/stories/TextInput.stories.cjs.map +1 -0
- package/build/cjs/components/text-input/stories/TextInput.stories.d.cts +27 -0
- package/build/es/components/breadcrumb/stories/Breadcrumb.stories.js +1 -1
- package/build/es/components/input-group/stories/InputGroup.stories.js +1 -1
- package/build/es/components/input-group/stories/InputGroup.stories.js.map +1 -1
- package/build/es/components/modal/stories/CompleteModal.stories.d.ts +20 -0
- package/build/es/components/modal/stories/CompleteModal.stories.js +2 -0
- package/build/es/components/modal/stories/CompleteModal.stories.js.map +1 -0
- package/build/es/components/text-input/stories/BaseTextInput.stories.d.ts +55 -0
- package/build/es/components/text-input/stories/BaseTextInput.stories.js +2 -0
- package/build/es/components/text-input/stories/BaseTextInput.stories.js.map +1 -0
- package/build/es/components/text-input/stories/TextInput.stories.d.ts +27 -0
- package/build/es/components/text-input/stories/TextInput.stories.js +2 -0
- package/build/es/components/text-input/stories/TextInput.stories.js.map +1 -0
- package/build/style.css +1 -1
- package/package.json +2 -2
- package/styles/components/button/button.css +2 -2
- 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 +38 -38
- package/styles/styles.min.css +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("../Breadcrumb.cjs"),c=require("../BreadcrumbItem.cjs");;/* empty css */const t={title:"Komponenter/Breadcrumb/Breadcrumb",component:r.Breadcrumb,parameters:{layout:"centered"},tags:["autodocs"]},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("../Breadcrumb.cjs"),c=require("../BreadcrumbItem.cjs");;/* empty css */const t={title:"Komponenter/Breadcrumb/Breadcrumb",component:r.Breadcrumb,parameters:{layout:"centered"},tags:["autodocs"]},d={args:{children:[e.jsx(c.BreadcrumbItem,{children:e.jsx("a",{href:"/",children:"Hjem"})},0),e.jsx(c.BreadcrumbItem,{children:e.jsx("a",{href:"/komponenter/accordion",children:"Komponenter"})},1),e.jsx(c.BreadcrumbItem,{children:e.jsx("a",{href:"/komponenter/breadcrumb",children:"Breadcrumb"})},2)]}};exports.Breadcrumb=d,exports.default=t;
|
|
2
2
|
//# sourceMappingURL=Breadcrumb.stories.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("../BreadcrumbItem.cjs");;/* empty css */const t=require("../Breadcrumb.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("../BreadcrumbItem.cjs");;/* empty css */const t=require("../Breadcrumb.cjs"),o={title:"Komponenter/Breadcrumb/BreadcrumbItem",component:r.BreadcrumbItem,parameters:{layout:"centered"},tags:["autodocs"]},c={args:{children:e.jsx("a",{href:"/komponenter/accordion",children:"Komponenter"})},decorators:r=>e.jsx(t.Breadcrumb,{children:e.jsx(r,{})})};exports.BreadcrumbItem=c,exports.default=o;
|
|
2
2
|
//# sourceMappingURL=BreadcrumbItem.stories.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("../../text-input/BaseTextInput.cjs"),r=require("../InputGroup.cjs")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("../../text-input/BaseTextInput.cjs"),r=require("../InputGroup.cjs");,/* empty css */;/* empty css */const u={title:"Komponenter/InputGroup",component:r.InputGroup,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{label:{control:"text"}}},n={name:"InputGroup",args:{label:"Fødeselsnummer"},render:u=>e.jsx(r.InputGroup,{...u,children:e.jsx(t.BaseTextInput,{})})};exports.InputGroupStory=n,exports.default=u;
|
|
2
2
|
//# sourceMappingURL=InputGroup.stories.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.stories.cjs","sources":["../../../../../src/components/input-group/stories/InputGroup.stories.tsx"],"sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { BaseTextInput } from \"../../text-input/BaseTextInput.js\";\nimport { InputGroup } from \"../InputGroup.js\";\nimport \"../styles/_index.scss\";\nimport \"../../text-input/styles/_index.scss\";\n\nconst meta: Meta = {\n title: \"Komponenter/InputGroup\",\n component: InputGroup,\n parameters: {\n layout: \"centered\",\n },\n tags: [\"autodocs\"],\n argTypes: {\n label: {\n control: \"text\",\n },\n },\n} satisfies Meta<typeof InputGroup>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof InputGroup>;\n\nexport const InputGroupStory: Story = {\n name: \"InputGroup\",\n args: {\n label: \"Fødeselsnummer\",\n },\n render: (props) => (\n <InputGroup {...props}>\n <BaseTextInput />\n </InputGroup>\n ),\n};\n"],"names":["meta","title","component","InputGroup","parameters","layout","tags","argTypes","label","control","InputGroupStory","name","args","render","props","jsx","children","BaseTextInput"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputGroup.stories.cjs","sources":["../../../../../src/components/input-group/stories/InputGroup.stories.tsx"],"sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { BaseTextInput } from \"../../text-input/BaseTextInput.js\";\nimport { InputGroup } from \"../InputGroup.js\";\nimport \"../styles/_index.scss\";\nimport \"../../text-input/styles/_index.scss\";\n\nconst meta: Meta = {\n title: \"Komponenter/InputGroup\",\n component: InputGroup,\n parameters: {\n layout: \"centered\",\n },\n tags: [\"autodocs\"],\n argTypes: {\n label: {\n control: \"text\",\n },\n },\n} satisfies Meta<typeof InputGroup>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof InputGroup>;\n\nexport const InputGroupStory: Story = {\n name: \"InputGroup\",\n args: {\n label: \"Fødeselsnummer\",\n },\n render: (props) => (\n <InputGroup {...props}>\n <BaseTextInput />\n </InputGroup>\n ),\n};\n"],"names":["meta","title","component","InputGroup","parameters","layout","tags","argTypes","label","control","InputGroupStory","name","args","render","props","jsx","children","BaseTextInput"],"mappings":"sTAOA,MAAMA,EAAa,CACfC,MAAO,yBACPC,UAAWC,EAAAA,WACXC,WAAY,CACRC,OAAQ,YAEZC,KAAM,CAAC,YACPC,SAAU,CACNC,MAAO,CACHC,QAAS,UASRC,EAAyB,CAClCC,KAAM,aACNC,KAAM,CACFJ,MAAO,kBAEXK,OAASC,GACLC,EAAAA,IAACZ,iBAAeW,EACZE,SAACD,EAAAA,IAAAE,gBAAA,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("../../button/Button.cjs"),o=require("../Modal.cjs");,/* empty css */;/* empty css */const r={title:"Komponenter/Modal/CompleteModal",component:o.ModalContainer,parameters:{layout:"centered"},tags:["autodocs"]},a={args:{id:"modal-container",role:"document","aria-hidden":!1,"aria-modal":!0,"aria-labelledby":"modal-title"},render:r=>e.jsxs(o.ModalContainer,{...r,children:[e.jsx(o.ModalOverlay,{}),e.jsxs(o.Modal,{role:"document",children:[e.jsxs(o.ModalHeader,{children:[e.jsx(o.ModalTitle,{"aria-level":1,role:"heading",id:"",children:"Tittel"}),e.jsx(o.ModalCloseButton,{type:"button","aria-label":"close"})]}),e.jsx(o.ModalBody,{children:"Er du sikker på at du vil slette Foo Bar Baz?"}),e.jsxs(o.ModalActions,{children:[e.jsx(t.Button,{variant:"primary","data-testid":"confirm-modal",children:"Slett"}),e.jsx(t.Button,{children:"Avbryt"})]})]})]})};exports.CompleteModal=a,exports.default=r;
|
|
2
|
+
//# sourceMappingURL=CompleteModal.stories.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteModal.stories.cjs","sources":["../../../../../src/components/modal/stories/CompleteModal.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { Button } from \"../../button/Button.js\";\nimport {\n Modal,\n ModalActions,\n ModalBody,\n ModalCloseButton,\n ModalContainer,\n ModalHeader,\n ModalOverlay,\n ModalTitle,\n} from \"../Modal.js\";\nimport \"../../button/styles/_index.scss\";\nimport \"../styles/_index.scss\";\n\nconst meta = {\n title: \"Komponenter/Modal/CompleteModal\",\n component: ModalContainer,\n parameters: {\n layout: \"centered\",\n },\n tags: [\"autodocs\"],\n} satisfies Meta<typeof ModalContainer>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const CompleteModal: Story = {\n args: {\n id: \"modal-container\",\n role: \"document\",\n \"aria-hidden\": false,\n \"aria-modal\": true,\n \"aria-labelledby\": \"modal-title\",\n },\n render: (args) => (\n <ModalContainer {...args}>\n <ModalOverlay />\n <Modal role=\"document\">\n <ModalHeader>\n <ModalTitle aria-level={1} role=\"heading\" id={\"\"}>\n Tittel\n </ModalTitle>\n <ModalCloseButton type=\"button\" aria-label=\"close\" />\n </ModalHeader>\n <ModalBody>\n Er du sikker på at du vil slette Foo Bar Baz?\n </ModalBody>\n <ModalActions>\n <Button variant=\"primary\" data-testid=\"confirm-modal\">\n Slett\n </Button>\n <Button>Avbryt</Button>\n </ModalActions>\n </Modal>\n </ModalContainer>\n ),\n};\n"],"names":["meta","title","component","ModalContainer","parameters","layout","tags","CompleteModal","args","id","role","render","jsxs","children","jsx","ModalOverlay","Modal","ModalHeader","ModalTitle","ModalCloseButton","type","ModalBody","ModalActions","Button","variant"],"mappings":"sSAgBA,MAAMA,EAAO,CACTC,MAAO,kCACPC,UAAWC,EAAAA,eACXC,WAAY,CACRC,OAAQ,YAEZC,KAAM,CAAC,aAOEC,EAAuB,CAChCC,KAAM,CACFC,GAAI,kBACJC,KAAM,WACN,eAAe,EACf,cAAc,EACd,kBAAmB,eAEvBC,OAASH,GACJI,EAAAA,KAAAT,EAAAA,eAAA,IAAmBK,EAChBK,SAAA,CAAAC,EAAAA,IAACC,EAAaA,aAAA,IACdH,EAAAA,KAACI,EAAAA,MAAM,CAAAN,KAAK,WACRG,SAAA,CAAAD,OAACK,EAAAA,YACG,CAAAJ,SAAA,CAAAC,EAAAA,IAACI,cAAW,aAAY,EAAGR,KAAK,UAAUD,GAAI,GAAII,SAElD,WACCC,EAAAA,IAAAK,EAAAA,iBAAA,CAAiBC,KAAK,SAAS,aAAW,aAE/CN,EAAAA,IAACO,aAAUR,SAEX,yDACCS,EAAAA,aACG,CAAAT,SAAA,CAAAC,MAACS,EAAAA,OAAO,CAAAC,QAAQ,UAAU,cAAY,gBAAgBX,SAEtD,UACAC,EAAAA,IAACS,UAAOV,SAAM"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
+
id: string;
|
|
7
|
+
ref: (node: React.ReactNode | HTMLElement) => void;
|
|
8
|
+
role: string;
|
|
9
|
+
'aria-modal': boolean;
|
|
10
|
+
'aria-hidden': boolean;
|
|
11
|
+
'aria-labelledby': string;
|
|
12
|
+
} & import('../types.js').BaseModalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const CompleteModal: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../BaseTextInput.cjs");;/* empty css */const t={title:"Skjemaelementer/TextInput/BaseTextInput",component:e.BaseTextInput,parameters:{controls:{expanded:!0,sort:"alpha"}},tags:["autodocs"],argTypes:{value:{control:"text",description:"Verdien i feltet"},unit:{control:"text"},width:{control:"text",description:"Absolutt verdi for bredden til input-feltet"},maxLength:{control:"number"},action:{type:"function"},actionButton:{type:"function"},name:{control:"text",table:{disable:!0}},density:{table:{disable:!0}},align:{table:{defaultValue:{summary:"left"}}}}};exports.BaseTextInput={args:{name:"base-text-input",align:"left",placeholder:"Ditt innhold",maxLength:500,disabled:!1,readOnly:!1,defaultValue:"Ditt innhold"}},exports.default=t;
|
|
2
|
+
//# sourceMappingURL=BaseTextInput.stories.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTextInput.stories.cjs","sources":["../../../../../src/components/text-input/stories/BaseTextInput.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { BaseTextInput as TextInputComponent } from \"../BaseTextInput.js\";\nimport \"../styles/_index.scss\";\n\nconst meta = {\n title: \"Skjemaelementer/TextInput/BaseTextInput\",\n component: TextInputComponent,\n parameters: {\n controls: { expanded: true, sort: \"alpha\" },\n },\n tags: [\"autodocs\"],\n argTypes: {\n value: {\n control: \"text\",\n description: \"Verdien i feltet\",\n },\n unit: {\n control: \"text\",\n },\n width: {\n control: \"text\",\n description: \"Absolutt verdi for bredden til input-feltet\",\n },\n maxLength: {\n control: \"number\",\n },\n action: {\n type: \"function\",\n },\n actionButton: {\n type: \"function\",\n },\n name: {\n control: \"text\",\n table: {\n disable: true,\n },\n },\n density: { table: { disable: true } },\n align: {\n table: { defaultValue: { summary: \"left\" } },\n },\n },\n} satisfies Meta<typeof TextInputComponent>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const BaseTextInput: Story = {\n args: {\n name: \"base-text-input\",\n align: \"left\",\n placeholder: \"Ditt innhold\",\n maxLength: 500,\n disabled: false,\n readOnly: false,\n defaultValue: \"Ditt innhold\",\n },\n};\n"],"names":["meta","title","component","TextInputComponent","BaseTextInput","parameters","controls","expanded","sort","tags","argTypes","value","control","description","unit","width","maxLength","action","type","actionButton","name","table","disable","density","align","defaultValue","summary","args","placeholder","disabled","readOnly"],"mappings":"+LAIA,MAAMA,EAAO,CACTC,MAAO,0CACPC,UAAWC,EAAAC,cACXC,WAAY,CACRC,SAAU,CAAEC,UAAU,EAAMC,KAAM,UAEtCC,KAAM,CAAC,YACPC,SAAU,CACNC,MAAO,CACHC,QAAS,OACTC,YAAa,oBAEjBC,KAAM,CACFF,QAAS,QAEbG,MAAO,CACHH,QAAS,OACTC,YAAa,+CAEjBG,UAAW,CACPJ,QAAS,UAEbK,OAAQ,CACJC,KAAM,YAEVC,aAAc,CACVD,KAAM,YAEVE,KAAM,CACFR,QAAS,OACTS,MAAO,CACHC,SAAS,IAGjBC,QAAS,CAAEF,MAAO,CAAEC,SAAS,IAC7BE,MAAO,CACHH,MAAO,CAAEI,aAAc,CAAEC,QAAS,kCAQV,CAChCC,KAAM,CACFP,KAAM,kBACNI,MAAO,OACPI,YAAa,eACbZ,UAAW,IACXa,UAAU,EACVC,UAAU,EACVL,aAAc"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<import('../types.js').BaseTextInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
sort: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
tags: string[];
|
|
12
|
+
argTypes: {
|
|
13
|
+
value: {
|
|
14
|
+
control: "text";
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
unit: {
|
|
18
|
+
control: "text";
|
|
19
|
+
};
|
|
20
|
+
width: {
|
|
21
|
+
control: "text";
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
maxLength: {
|
|
25
|
+
control: "number";
|
|
26
|
+
};
|
|
27
|
+
action: {
|
|
28
|
+
type: "function";
|
|
29
|
+
};
|
|
30
|
+
actionButton: {
|
|
31
|
+
type: "function";
|
|
32
|
+
};
|
|
33
|
+
name: {
|
|
34
|
+
control: "text";
|
|
35
|
+
table: {
|
|
36
|
+
disable: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
density: {
|
|
40
|
+
table: {
|
|
41
|
+
disable: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
align: {
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
export declare const BaseTextInput: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../TextInput.cjs");;/* empty css */const t={title:"Skjemaelementer/TextInput/TextInput",component:e.TextInput,parameters:{controls:{expanded:!0,sort:"alpha"}},tags:["autodocs"],argTypes:{density:{table:{disable:!0}}}};exports.TextInput={argTypes:{label:{type:{name:"string",required:!0},table:{defaultValue:{summary:void 0}}},value:{control:"text",description:"Verdien i feltet",table:{defaultValue:{summary:void 0}}},unit:{control:"text",table:{defaultValue:{summary:void 0}}},width:{control:"text",description:"Absolutt verdi for bredden til input-feltet",table:{defaultValue:{summary:void 0}}},maxLength:{control:"number",table:{defaultValue:{summary:void 0}}},action:{type:"function",table:{defaultValue:{summary:void 0}}},actionButton:{type:"function",table:{defaultValue:{summary:void 0}}},inline:{control:"boolean",description:"Lar feltet stå som en del av tekstlig innhold",table:{defaultValue:{summary:void 0}}},name:{table:{disable:!0}},inputClassName:{description:"Klasse for input-feltet",table:{defaultValue:{summary:void 0}}},density:{table:{disable:!0}},align:{table:{defaultValue:{summary:"left"}}},placeholder:{table:{defaultValue:{summary:void 0}}},defaultValue:{table:{defaultValue:{summary:void 0}}},"data-testautoid":{table:{defaultValue:{summary:void 0}}}},args:{name:"text-input",label:"Label",align:"left",inline:!1,placeholder:"Ditt innhold",maxLength:35,disabled:!1,readOnly:!1,defaultValue:"Ditt innhold",inputClassName:"input-klasse","data-testautoid":"test-id"}},exports.UnitAlign={name:"Unit + Align",args:{label:"Boareal",align:"right",maxLength:20,placeholder:"50",unit:"kvadratmeter"}},exports.default=t;
|
|
2
|
+
//# sourceMappingURL=TextInput.stories.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.stories.cjs","sources":["../../../../../src/components/text-input/stories/TextInput.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { TextInput as TextInputComponent } from \"../TextInput.js\";\nimport \"../styles/_index.scss\";\n\nconst meta = {\n title: \"Skjemaelementer/TextInput/TextInput\",\n component: TextInputComponent,\n parameters: {\n controls: {\n expanded: true,\n sort: \"alpha\",\n },\n },\n tags: [\"autodocs\"],\n argTypes: {\n density: {\n table: {\n disable: true,\n },\n },\n },\n} satisfies Meta<typeof TextInputComponent>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const TextInput: Story = {\n argTypes: {\n label: {\n type: {\n name: \"string\",\n required: true,\n },\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n value: {\n control: \"text\",\n description: \"Verdien i feltet\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n unit: {\n control: \"text\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n width: {\n control: \"text\",\n description: \"Absolutt verdi for bredden til input-feltet\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n maxLength: {\n control: \"number\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n action: {\n type: \"function\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n actionButton: {\n type: \"function\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n inline: {\n control: \"boolean\",\n description: \"Lar feltet stå som en del av tekstlig innhold\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n name: {\n table: {\n disable: true,\n },\n },\n inputClassName: {\n description: \"Klasse for input-feltet\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n density: {\n table: {\n disable: true,\n },\n },\n align: {\n table: {\n defaultValue: {\n summary: \"left\",\n },\n },\n },\n placeholder: {\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n defaultValue: {\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n \"data-testautoid\": {\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n },\n args: {\n name: \"text-input\",\n label: \"Label\",\n align: \"left\",\n inline: false,\n placeholder: \"Ditt innhold\",\n maxLength: 35,\n disabled: false,\n readOnly: false,\n defaultValue: \"Ditt innhold\",\n inputClassName: \"input-klasse\",\n \"data-testautoid\": \"test-id\",\n },\n};\n\n/**\n * Ved å bruke unit og align sammen vil du få et godt utgangspunkt for\n * nummer-baserte svar.\n */\nexport const UnitAlign: Story = {\n name: \"Unit + Align\",\n args: {\n label: \"Boareal\",\n align: \"right\",\n maxLength: 20,\n placeholder: \"50\",\n unit: \"kvadratmeter\",\n },\n};\n"],"names":["meta","title","component","TextInputComponent","TextInput","parameters","controls","expanded","sort","tags","argTypes","density","table","disable","label","type","name","required","defaultValue","summary","value","control","description","unit","width","maxLength","action","actionButton","inline","inputClassName","align","placeholder","args","disabled","readOnly"],"mappings":"2LAIA,MAAMA,EAAO,CACTC,MAAO,sCACPC,UAAWC,EAAAC,UACXC,WAAY,CACRC,SAAU,CACNC,UAAU,EACVC,KAAM,UAGdC,KAAM,CAAC,YACPC,SAAU,CACNC,QAAS,CACLC,MAAO,CACHC,SAAS,wBASO,CAC5BH,SAAU,CACNI,MAAO,CACHC,KAAM,CACFC,KAAM,SACNC,UAAU,GAEdL,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBC,MAAO,CACHC,QAAS,OACTC,YAAa,mBACbV,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBI,KAAM,CACFF,QAAS,OACTT,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBK,MAAO,CACHH,QAAS,OACTC,YAAa,8CACbV,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBM,UAAW,CACPJ,QAAS,SACTT,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBO,OAAQ,CACJX,KAAM,WACNH,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBQ,aAAc,CACVZ,KAAM,WACNH,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBS,OAAQ,CACJP,QAAS,UACTC,YAAa,gDACbV,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBH,KAAM,CACFJ,MAAO,CACHC,SAAS,IAGjBgB,eAAgB,CACZP,YAAa,0BACbV,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBR,QAAS,CACLC,MAAO,CACHC,SAAS,IAGjBiB,MAAO,CACHlB,MAAO,CACHM,aAAc,CACVC,QAAS,UAIrBY,YAAa,CACTnB,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrBD,aAAc,CACVN,MAAO,CACHM,aAAc,CACVC,aAAS,KAIrB,kBAAmB,CACfP,MAAO,CACHM,aAAc,CACVC,aAAS,MAKzBa,KAAM,CACFhB,KAAM,aACNF,MAAO,QACPgB,MAAO,OACPF,QAAQ,EACRG,YAAa,eACbN,UAAW,GACXQ,UAAU,EACVC,UAAU,EACVhB,aAAc,eACdW,eAAgB,eAChB,kBAAmB,8BAQK,CAC5Bb,KAAM,eACNgB,KAAM,CACFlB,MAAO,UACPgB,MAAO,QACPL,UAAW,GACXM,YAAa,KACbR,KAAM"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<import('../types.js').TextInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
sort: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
tags: string[];
|
|
12
|
+
argTypes: {
|
|
13
|
+
density: {
|
|
14
|
+
table: {
|
|
15
|
+
disable: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const TextInput: Story;
|
|
23
|
+
/**
|
|
24
|
+
* Ved å bruke unit og align sammen vil du få et godt utgangspunkt for
|
|
25
|
+
* nummer-baserte svar.
|
|
26
|
+
*/
|
|
27
|
+
export declare const UnitAlign: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{Breadcrumb as e}from"../Breadcrumb.js";import{BreadcrumbItem as a}from"../BreadcrumbItem.js";/* empty css */const m={title:"Komponenter/Breadcrumb/Breadcrumb",component:e,parameters:{layout:"centered"},tags:["autodocs"]},
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Breadcrumb as e}from"../Breadcrumb.js";import{BreadcrumbItem as a}from"../BreadcrumbItem.js";/* empty css */const m={title:"Komponenter/Breadcrumb/Breadcrumb",component:e,parameters:{layout:"centered"},tags:["autodocs"]},o={args:{children:[r(a,{children:r("a",{href:"/",children:"Hjem"})},0),r(a,{children:r("a",{href:"/komponenter/accordion",children:"Komponenter"})},1),r(a,{children:r("a",{href:"/komponenter/breadcrumb",children:"Breadcrumb"})},2)]}};export{o as Breadcrumb,m as default};
|
|
2
2
|
//# sourceMappingURL=Breadcrumb.stories.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{BaseTextInput as e}from"../../text-input/BaseTextInput.js";import{InputGroup as r}from"../InputGroup.js";/* empty css */const o={title:"Komponenter/InputGroup",component:r,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{label:{control:"text"}}},p={name:"InputGroup",args:{label:"Fødeselsnummer"},render:o=>t(r,{...o,children:t(e,{})})};export{p as InputGroupStory,o as default};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{BaseTextInput as e}from"../../text-input/BaseTextInput.js";import{InputGroup as r}from"../InputGroup.js";/* empty css *//* empty css */const o={title:"Komponenter/InputGroup",component:r,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{label:{control:"text"}}},p={name:"InputGroup",args:{label:"Fødeselsnummer"},render:o=>t(r,{...o,children:t(e,{})})};export{p as InputGroupStory,o as default};
|
|
2
2
|
//# sourceMappingURL=InputGroup.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.stories.js","sources":["../../../../../src/components/input-group/stories/InputGroup.stories.tsx"],"sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { BaseTextInput } from \"../../text-input/BaseTextInput.js\";\nimport { InputGroup } from \"../InputGroup.js\";\nimport \"../styles/_index.scss\";\nimport \"../../text-input/styles/_index.scss\";\n\nconst meta: Meta = {\n title: \"Komponenter/InputGroup\",\n component: InputGroup,\n parameters: {\n layout: \"centered\",\n },\n tags: [\"autodocs\"],\n argTypes: {\n label: {\n control: \"text\",\n },\n },\n} satisfies Meta<typeof InputGroup>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof InputGroup>;\n\nexport const InputGroupStory: Story = {\n name: \"InputGroup\",\n args: {\n label: \"Fødeselsnummer\",\n },\n render: (props) => (\n <InputGroup {...props}>\n <BaseTextInput />\n </InputGroup>\n ),\n};\n"],"names":["meta","title","component","InputGroup","parameters","layout","tags","argTypes","label","control","InputGroupStory","name","args","render","props","jsx","children","BaseTextInput"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputGroup.stories.js","sources":["../../../../../src/components/input-group/stories/InputGroup.stories.tsx"],"sourcesContent":["import { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { BaseTextInput } from \"../../text-input/BaseTextInput.js\";\nimport { InputGroup } from \"../InputGroup.js\";\nimport \"../styles/_index.scss\";\nimport \"../../text-input/styles/_index.scss\";\n\nconst meta: Meta = {\n title: \"Komponenter/InputGroup\",\n component: InputGroup,\n parameters: {\n layout: \"centered\",\n },\n tags: [\"autodocs\"],\n argTypes: {\n label: {\n control: \"text\",\n },\n },\n} satisfies Meta<typeof InputGroup>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof InputGroup>;\n\nexport const InputGroupStory: Story = {\n name: \"InputGroup\",\n args: {\n label: \"Fødeselsnummer\",\n },\n render: (props) => (\n <InputGroup {...props}>\n <BaseTextInput />\n </InputGroup>\n ),\n};\n"],"names":["meta","title","component","InputGroup","parameters","layout","tags","argTypes","label","control","InputGroupStory","name","args","render","props","jsx","children","BaseTextInput"],"mappings":"sOAOA,MAAMA,EAAa,CACfC,MAAO,yBACPC,UAAWC,EACXC,WAAY,CACRC,OAAQ,YAEZC,KAAM,CAAC,YACPC,SAAU,CACNC,MAAO,CACHC,QAAS,UASRC,EAAyB,CAClCC,KAAM,aACNC,KAAM,CACFJ,MAAO,kBAEXK,OAASC,GACLC,EAACZ,MAAeW,EACZE,SAACD,EAAAE,EAAA,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
+
id: string;
|
|
7
|
+
ref: (node: React.ReactNode | HTMLElement) => void;
|
|
8
|
+
role: string;
|
|
9
|
+
'aria-modal': boolean;
|
|
10
|
+
'aria-hidden': boolean;
|
|
11
|
+
'aria-labelledby': string;
|
|
12
|
+
} & import('../types.js').BaseModalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
};
|
|
16
|
+
tags: string[];
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const CompleteModal: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as a,jsx as e}from"react/jsx-runtime";import{Button as o}from"../../button/Button.js";import{ModalContainer as t,ModalOverlay as l,Modal as r,ModalHeader as d,ModalTitle as i,ModalCloseButton as n,ModalBody as s,ModalActions as m}from"../Modal.js";/* empty css *//* empty css */const c={title:"Komponenter/Modal/CompleteModal",component:t,parameters:{layout:"centered"},tags:["autodocs"]},p={args:{id:"modal-container",role:"document","aria-hidden":!1,"aria-modal":!0,"aria-labelledby":"modal-title"},render:c=>a(t,{...c,children:[e(l,{}),a(r,{role:"document",children:[a(d,{children:[e(i,{"aria-level":1,role:"heading",id:"",children:"Tittel"}),e(n,{type:"button","aria-label":"close"})]}),e(s,{children:"Er du sikker på at du vil slette Foo Bar Baz?"}),a(m,{children:[e(o,{variant:"primary","data-testid":"confirm-modal",children:"Slett"}),e(o,{children:"Avbryt"})]})]})]})};export{p as CompleteModal,c as default};
|
|
2
|
+
//# sourceMappingURL=CompleteModal.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompleteModal.stories.js","sources":["../../../../../src/components/modal/stories/CompleteModal.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport React from \"react\";\nimport { Button } from \"../../button/Button.js\";\nimport {\n Modal,\n ModalActions,\n ModalBody,\n ModalCloseButton,\n ModalContainer,\n ModalHeader,\n ModalOverlay,\n ModalTitle,\n} from \"../Modal.js\";\nimport \"../../button/styles/_index.scss\";\nimport \"../styles/_index.scss\";\n\nconst meta = {\n title: \"Komponenter/Modal/CompleteModal\",\n component: ModalContainer,\n parameters: {\n layout: \"centered\",\n },\n tags: [\"autodocs\"],\n} satisfies Meta<typeof ModalContainer>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const CompleteModal: Story = {\n args: {\n id: \"modal-container\",\n role: \"document\",\n \"aria-hidden\": false,\n \"aria-modal\": true,\n \"aria-labelledby\": \"modal-title\",\n },\n render: (args) => (\n <ModalContainer {...args}>\n <ModalOverlay />\n <Modal role=\"document\">\n <ModalHeader>\n <ModalTitle aria-level={1} role=\"heading\" id={\"\"}>\n Tittel\n </ModalTitle>\n <ModalCloseButton type=\"button\" aria-label=\"close\" />\n </ModalHeader>\n <ModalBody>\n Er du sikker på at du vil slette Foo Bar Baz?\n </ModalBody>\n <ModalActions>\n <Button variant=\"primary\" data-testid=\"confirm-modal\">\n Slett\n </Button>\n <Button>Avbryt</Button>\n </ModalActions>\n </Modal>\n </ModalContainer>\n ),\n};\n"],"names":["meta","title","component","ModalContainer","parameters","layout","tags","CompleteModal","args","id","role","render","jsxs","children","jsx","ModalOverlay","Modal","ModalHeader","ModalTitle","ModalCloseButton","type","ModalBody","ModalActions","Button","variant"],"mappings":"kVAgBA,MAAMA,EAAO,CACTC,MAAO,kCACPC,UAAWC,EACXC,WAAY,CACRC,OAAQ,YAEZC,KAAM,CAAC,aAOEC,EAAuB,CAChCC,KAAM,CACFC,GAAI,kBACJC,KAAM,WACN,eAAe,EACf,cAAc,EACd,kBAAmB,eAEvBC,OAASH,GACJI,EAAAT,EAAA,IAAmBK,EAChBK,SAAA,CAAAC,EAACC,EAAa,IACdH,EAACI,EAAM,CAAAN,KAAK,WACRG,SAAA,CAAAD,EAACK,EACG,CAAAJ,SAAA,CAAAC,EAACI,GAAW,aAAY,EAAGR,KAAK,UAAUD,GAAI,GAAII,SAElD,WACCC,EAAAK,EAAA,CAAiBC,KAAK,SAAS,aAAW,aAE/CN,EAACO,GAAUR,SAEX,oDACCS,EACG,CAAAT,SAAA,CAAAC,EAACS,EAAO,CAAAC,QAAQ,UAAU,cAAY,gBAAgBX,SAEtD,UACAC,EAACS,GAAOV,SAAM"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<import('../types.js').BaseTextInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
sort: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
tags: string[];
|
|
12
|
+
argTypes: {
|
|
13
|
+
value: {
|
|
14
|
+
control: "text";
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
unit: {
|
|
18
|
+
control: "text";
|
|
19
|
+
};
|
|
20
|
+
width: {
|
|
21
|
+
control: "text";
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
maxLength: {
|
|
25
|
+
control: "number";
|
|
26
|
+
};
|
|
27
|
+
action: {
|
|
28
|
+
type: "function";
|
|
29
|
+
};
|
|
30
|
+
actionButton: {
|
|
31
|
+
type: "function";
|
|
32
|
+
};
|
|
33
|
+
name: {
|
|
34
|
+
control: "text";
|
|
35
|
+
table: {
|
|
36
|
+
disable: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
density: {
|
|
40
|
+
table: {
|
|
41
|
+
disable: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
align: {
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
export declare const BaseTextInput: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseTextInput as t}from"../BaseTextInput.js";/* empty css */const e={title:"Skjemaelementer/TextInput/BaseTextInput",component:t,parameters:{controls:{expanded:!0,sort:"alpha"}},tags:["autodocs"],argTypes:{value:{control:"text",description:"Verdien i feltet"},unit:{control:"text"},width:{control:"text",description:"Absolutt verdi for bredden til input-feltet"},maxLength:{control:"number"},action:{type:"function"},actionButton:{type:"function"},name:{control:"text",table:{disable:!0}},density:{table:{disable:!0}},align:{table:{defaultValue:{summary:"left"}}}}},n={args:{name:"base-text-input",align:"left",placeholder:"Ditt innhold",maxLength:500,disabled:!1,readOnly:!1,defaultValue:"Ditt innhold"}};export{n as BaseTextInput,e as default};
|
|
2
|
+
//# sourceMappingURL=BaseTextInput.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTextInput.stories.js","sources":["../../../../../src/components/text-input/stories/BaseTextInput.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { BaseTextInput as TextInputComponent } from \"../BaseTextInput.js\";\nimport \"../styles/_index.scss\";\n\nconst meta = {\n title: \"Skjemaelementer/TextInput/BaseTextInput\",\n component: TextInputComponent,\n parameters: {\n controls: { expanded: true, sort: \"alpha\" },\n },\n tags: [\"autodocs\"],\n argTypes: {\n value: {\n control: \"text\",\n description: \"Verdien i feltet\",\n },\n unit: {\n control: \"text\",\n },\n width: {\n control: \"text\",\n description: \"Absolutt verdi for bredden til input-feltet\",\n },\n maxLength: {\n control: \"number\",\n },\n action: {\n type: \"function\",\n },\n actionButton: {\n type: \"function\",\n },\n name: {\n control: \"text\",\n table: {\n disable: true,\n },\n },\n density: { table: { disable: true } },\n align: {\n table: { defaultValue: { summary: \"left\" } },\n },\n },\n} satisfies Meta<typeof TextInputComponent>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const BaseTextInput: Story = {\n args: {\n name: \"base-text-input\",\n align: \"left\",\n placeholder: \"Ditt innhold\",\n maxLength: 500,\n disabled: false,\n readOnly: false,\n defaultValue: \"Ditt innhold\",\n },\n};\n"],"names":["meta","title","component","TextInputComponent","parameters","controls","expanded","sort","tags","argTypes","value","control","description","unit","width","maxLength","action","type","actionButton","name","table","disable","density","align","defaultValue","summary","BaseTextInput","args","placeholder","disabled","readOnly"],"mappings":"2FAIA,MAAMA,EAAO,CACTC,MAAO,0CACPC,UAAWC,EACXC,WAAY,CACRC,SAAU,CAAEC,UAAU,EAAMC,KAAM,UAEtCC,KAAM,CAAC,YACPC,SAAU,CACNC,MAAO,CACHC,QAAS,OACTC,YAAa,oBAEjBC,KAAM,CACFF,QAAS,QAEbG,MAAO,CACHH,QAAS,OACTC,YAAa,+CAEjBG,UAAW,CACPJ,QAAS,UAEbK,OAAQ,CACJC,KAAM,YAEVC,aAAc,CACVD,KAAM,YAEVE,KAAM,CACFR,QAAS,OACTS,MAAO,CACHC,SAAS,IAGjBC,QAAS,CAAEF,MAAO,CAAEC,SAAS,IAC7BE,MAAO,CACHH,MAAO,CAAEI,aAAc,CAAEC,QAAS,YAQjCC,EAAuB,CAChCC,KAAM,CACFR,KAAM,kBACNI,MAAO,OACPK,YAAa,eACbb,UAAW,IACXc,UAAU,EACVC,UAAU,EACVN,aAAc"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<import('../types.js').TextInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
expanded: boolean;
|
|
8
|
+
sort: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
tags: string[];
|
|
12
|
+
argTypes: {
|
|
13
|
+
density: {
|
|
14
|
+
table: {
|
|
15
|
+
disable: true;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const TextInput: Story;
|
|
23
|
+
/**
|
|
24
|
+
* Ved å bruke unit og align sammen vil du få et godt utgangspunkt for
|
|
25
|
+
* nummer-baserte svar.
|
|
26
|
+
*/
|
|
27
|
+
export declare const UnitAlign: Story;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TextInput as e}from"../TextInput.js";/* empty css */const t={title:"Skjemaelementer/TextInput/TextInput",component:e,parameters:{controls:{expanded:!0,sort:"alpha"}},tags:["autodocs"],argTypes:{density:{table:{disable:!0}}}},a={argTypes:{label:{type:{name:"string",required:!0},table:{defaultValue:{summary:void 0}}},value:{control:"text",description:"Verdien i feltet",table:{defaultValue:{summary:void 0}}},unit:{control:"text",table:{defaultValue:{summary:void 0}}},width:{control:"text",description:"Absolutt verdi for bredden til input-feltet",table:{defaultValue:{summary:void 0}}},maxLength:{control:"number",table:{defaultValue:{summary:void 0}}},action:{type:"function",table:{defaultValue:{summary:void 0}}},actionButton:{type:"function",table:{defaultValue:{summary:void 0}}},inline:{control:"boolean",description:"Lar feltet stå som en del av tekstlig innhold",table:{defaultValue:{summary:void 0}}},name:{table:{disable:!0}},inputClassName:{description:"Klasse for input-feltet",table:{defaultValue:{summary:void 0}}},density:{table:{disable:!0}},align:{table:{defaultValue:{summary:"left"}}},placeholder:{table:{defaultValue:{summary:void 0}}},defaultValue:{table:{defaultValue:{summary:void 0}}},"data-testautoid":{table:{defaultValue:{summary:void 0}}}},args:{name:"text-input",label:"Label",align:"left",inline:!1,placeholder:"Ditt innhold",maxLength:35,disabled:!1,readOnly:!1,defaultValue:"Ditt innhold",inputClassName:"input-klasse","data-testautoid":"test-id"}},l={name:"Unit + Align",args:{label:"Boareal",align:"right",maxLength:20,placeholder:"50",unit:"kvadratmeter"}};export{a as TextInput,l as UnitAlign,t as default};
|
|
2
|
+
//# sourceMappingURL=TextInput.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.stories.js","sources":["../../../../../src/components/text-input/stories/TextInput.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { TextInput as TextInputComponent } from \"../TextInput.js\";\nimport \"../styles/_index.scss\";\n\nconst meta = {\n title: \"Skjemaelementer/TextInput/TextInput\",\n component: TextInputComponent,\n parameters: {\n controls: {\n expanded: true,\n sort: \"alpha\",\n },\n },\n tags: [\"autodocs\"],\n argTypes: {\n density: {\n table: {\n disable: true,\n },\n },\n },\n} satisfies Meta<typeof TextInputComponent>;\n\nexport default meta;\ntype Story = StoryObj<typeof meta>;\n\nexport const TextInput: Story = {\n argTypes: {\n label: {\n type: {\n name: \"string\",\n required: true,\n },\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n value: {\n control: \"text\",\n description: \"Verdien i feltet\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n unit: {\n control: \"text\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n width: {\n control: \"text\",\n description: \"Absolutt verdi for bredden til input-feltet\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n maxLength: {\n control: \"number\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n action: {\n type: \"function\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n actionButton: {\n type: \"function\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n inline: {\n control: \"boolean\",\n description: \"Lar feltet stå som en del av tekstlig innhold\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n name: {\n table: {\n disable: true,\n },\n },\n inputClassName: {\n description: \"Klasse for input-feltet\",\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n density: {\n table: {\n disable: true,\n },\n },\n align: {\n table: {\n defaultValue: {\n summary: \"left\",\n },\n },\n },\n placeholder: {\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n defaultValue: {\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n \"data-testautoid\": {\n table: {\n defaultValue: {\n summary: undefined,\n },\n },\n },\n },\n args: {\n name: \"text-input\",\n label: \"Label\",\n align: \"left\",\n inline: false,\n placeholder: \"Ditt innhold\",\n maxLength: 35,\n disabled: false,\n readOnly: false,\n defaultValue: \"Ditt innhold\",\n inputClassName: \"input-klasse\",\n \"data-testautoid\": \"test-id\",\n },\n};\n\n/**\n * Ved å bruke unit og align sammen vil du få et godt utgangspunkt for\n * nummer-baserte svar.\n */\nexport const UnitAlign: Story = {\n name: \"Unit + Align\",\n args: {\n label: \"Boareal\",\n align: \"right\",\n maxLength: 20,\n placeholder: \"50\",\n unit: \"kvadratmeter\",\n },\n};\n"],"names":["meta","title","component","TextInputComponent","parameters","controls","expanded","sort","tags","argTypes","density","table","disable","TextInput","label","type","name","required","defaultValue","summary","value","control","description","unit","width","maxLength","action","actionButton","inline","inputClassName","align","placeholder","args","disabled","readOnly","UnitAlign"],"mappings":"mFAIA,MAAMA,EAAO,CACTC,MAAO,sCACPC,UAAWC,EACXC,WAAY,CACRC,SAAU,CACNC,UAAU,EACVC,KAAM,UAGdC,KAAM,CAAC,YACPC,SAAU,CACNC,QAAS,CACLC,MAAO,CACHC,SAAS,MASZC,EAAmB,CAC5BJ,SAAU,CACNK,MAAO,CACHC,KAAM,CACFC,KAAM,SACNC,UAAU,GAEdN,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBC,MAAO,CACHC,QAAS,OACTC,YAAa,mBACbX,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBI,KAAM,CACFF,QAAS,OACTV,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBK,MAAO,CACHH,QAAS,OACTC,YAAa,8CACbX,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBM,UAAW,CACPJ,QAAS,SACTV,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBO,OAAQ,CACJX,KAAM,WACNJ,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBQ,aAAc,CACVZ,KAAM,WACNJ,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBS,OAAQ,CACJP,QAAS,UACTC,YAAa,gDACbX,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBH,KAAM,CACFL,MAAO,CACHC,SAAS,IAGjBiB,eAAgB,CACZP,YAAa,0BACbX,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBT,QAAS,CACLC,MAAO,CACHC,SAAS,IAGjBkB,MAAO,CACHnB,MAAO,CACHO,aAAc,CACVC,QAAS,UAIrBY,YAAa,CACTpB,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrBD,aAAc,CACVP,MAAO,CACHO,aAAc,CACVC,aAAS,KAIrB,kBAAmB,CACfR,MAAO,CACHO,aAAc,CACVC,aAAS,MAKzBa,KAAM,CACFhB,KAAM,aACNF,MAAO,QACPgB,MAAO,OACPF,QAAQ,EACRG,YAAa,eACbN,UAAW,GACXQ,UAAU,EACVC,UAAU,EACVhB,aAAc,eACdW,eAAgB,eAChB,kBAAmB,YAQdM,EAAmB,CAC5BnB,KAAM,eACNgB,KAAM,CACFlB,MAAO,UACPgB,MAAO,QACPL,UAAW,GACXM,YAAa,KACbR,KAAM"}
|