@navikt/ds-react 0.19.13 → 0.19.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/_docs.json +50 -10
  2. package/cjs/form/Select.js +2 -2
  3. package/cjs/form/Textarea.js +1 -4
  4. package/cjs/stepper/Step.js +8 -8
  5. package/cjs/stepper/Stepper.js +10 -5
  6. package/cjs/tooltip/Tooltip.js +1 -4
  7. package/esm/accordion/AccordionItem.js.map +1 -1
  8. package/esm/button/Button.js.map +1 -1
  9. package/esm/form/Select.d.ts +4 -0
  10. package/esm/form/Select.js +2 -2
  11. package/esm/form/Select.js.map +1 -1
  12. package/esm/form/Textarea.js +1 -4
  13. package/esm/form/Textarea.js.map +1 -1
  14. package/esm/form/radio/RadioGroup.js.map +1 -1
  15. package/esm/link/Link.js.map +1 -1
  16. package/esm/stepper/Step.d.ts +2 -2
  17. package/esm/stepper/Step.js +8 -8
  18. package/esm/stepper/Step.js.map +1 -1
  19. package/esm/stepper/Stepper.d.ts +8 -4
  20. package/esm/stepper/Stepper.js +10 -5
  21. package/esm/stepper/Stepper.js.map +1 -1
  22. package/esm/tooltip/Tooltip.js +1 -4
  23. package/esm/tooltip/Tooltip.js.map +1 -1
  24. package/esm/typography/Heading.js.map +1 -1
  25. package/esm/typography/Ingress.js.map +1 -1
  26. package/esm/typography/Label.js.map +1 -1
  27. package/package.json +2 -2
  28. package/src/accordion/AccordionItem.tsx +2 -3
  29. package/src/button/Button.tsx +62 -62
  30. package/src/form/Select.tsx +6 -1
  31. package/src/form/Textarea.tsx +1 -2
  32. package/src/form/radio/RadioGroup.tsx +2 -3
  33. package/src/link/Link.tsx +4 -6
  34. package/src/stepper/Step.tsx +16 -13
  35. package/src/stepper/Stepper.tsx +34 -8
  36. package/src/stepper/stepper.stories.tsx +133 -0
  37. package/src/tooltip/Tooltip.tsx +4 -4
  38. package/src/typography/Heading.tsx +15 -17
  39. package/src/typography/Ingress.tsx +10 -12
  40. package/src/typography/Label.tsx +16 -18
  41. package/src/stepper/stories/Example.tsx +0 -28
  42. package/src/stepper/stories/stepper.stories.mdx +0 -61
  43. package/src/stepper/stories/stepper.stories.tsx +0 -54
@@ -1,61 +0,0 @@
1
- import { Meta, Canvas } from "@storybook/addon-docs";
2
- import { Stepper } from "..";
3
- import { Example } from "./Example";
4
-
5
- <Meta title="ds-react/stepper/intro" />
6
-
7
- # Hvordan ta i bruk Stepper
8
-
9
- Stepper er det vertikale søskenet til step-indicator/stegindikator.
10
- Du må nå selv styre state med `activeStep` og `onStepChange`.
11
-
12
- ## Eksempel
13
-
14
- ```jsx
15
- <Stepper activeStep={activeStep} onStepChange={(x) => setActiveStep(x)}>
16
- <Stepper.Step href="" onClick={(e) => e.preventDefault()}>
17
- Start
18
- </Stepper.Step>
19
- <Stepper.Step href="" onClick={(e) => e.preventDefault()}>
20
- Sunt deserunt qui sit sunt culpa nisi
21
- </Stepper.Step>
22
- <Stepper.Step href="" onClick={(e) => e.preventDefault()}>
23
- Nulla nisi pariatur nulla cupidatat elit.
24
- </Stepper.Step>
25
- <Stepper.Step href="" onClick={(e) => e.preventDefault()}>
26
- Nulla laborum proident consequat laborum elit et dolore ut sunt.
27
- </Stepper.Step>
28
- </Stepper>
29
- ```
30
-
31
- <Canvas>
32
- <Example />
33
- </Canvas>
34
-
35
- ## Override tags
36
-
37
- `Stepper.Step` er implementert med Overridable-component noe som gjør at du kan endre taggen til
38
- det du vil med `as`-prop. Merk at Step åakkes inn i en `<li>`-wrapper for tilgjengelighet.
39
-
40
- ```jsx
41
- <Stepper activeStep={activeStep} onStepChange={(x) => setActiveStep(x)}>
42
- {/* <button> er default */}
43
- <Stepper.Step
44
- href=""
45
- onClick={(e) => e.preventDefault()}
46
- >{`Dette er default, et <a>-element`}</Stepper.Step>
47
- <Stepper.Step as="button">{`Dette er et <button>-element`}</Stepper.Step>
48
- <Stepper.Step as="span">{`Dette er et <span>-element`}</Stepper.Step>
49
- </Stepper>
50
- ```
51
-
52
- <Canvas>
53
- <Stepper activeStep={1} onStepChange={console.log}>
54
- <Stepper.Step
55
- href=""
56
- onClick={(e) => e.preventDefault()}
57
- >{`Dette er default, et <a>-element`}</Stepper.Step>
58
- <Stepper.Step as="button">{`Dette er et <button>-element`}</Stepper.Step>
59
- <Stepper.Step as="span">{`Dette er et <span>-element`}</Stepper.Step>
60
- </Stepper>
61
- </Canvas>
@@ -1,54 +0,0 @@
1
- import { Meta } from "@storybook/react/types-6-0";
2
- import React, { useState } from "react";
3
- import Stepper from "../Stepper";
4
- import { BodyLong } from "../../typography";
5
-
6
- export default {
7
- title: "ds-react/stepper",
8
- component: Stepper,
9
- } as Meta;
10
-
11
- export const All = () => {
12
- const storyTexts = [
13
- "Minimize backwards overflow agile. Horsehead offer commitment to the cause nor copy and paste from stack overflow problem territories, innovation is hot right now for can you slack it to me?. High touch client table the discussion , and get buy-in so manage expectations loop back, please advise soonest. We need a paradigm shift dogpile that, and i need to pee and then go to another meeting for let's prioritize the low-hanging fruit.",
14
- "Customer centric sorry i didn't get your email proceduralize, and first-order optimal strategies. I dont care if you got some copy, why you dont use officeipsumcom or something like that ? wheelhouse. Viral engagement new economy, this proposal is a win-win situation which will cause a stellar paradigm shift, and produce a multi-fold increase in deliverables Bob called an all-hands this afternoon. Fire up your browser touch base innovation is hot right now so this medium needs to be more dynamic.",
15
- "Touch base define the underlying principles that drive decisions and strategy for your design language. I have zero cycles for this. Cadence social currency, for low engagement execute . Deliverables rehydrate the team or let's circle back to that those options are already baked in with this model teams were able to drive adoption and awareness we need to start advertising on social media circle back. Through the lens of face time.",
16
- "Take five, punch the tree, and come back in here with a clear head those options are already baked in with this model ultimate measure of success and we need to crystallize a plan yet open door policy who's responsible for the ask for this request? what do you feel you would bring to the table if you were hired for this position. Wiggle room guerrilla marketing shelfware. Code feature creep can we parallel path lose client to 10:00 meeting hire the best manage expectations root-and-branch review.",
17
- "Curate downselect tread it daily cc me on that due diligence, or close the loop. All hands on deck my supervisor didn't like the latest revision you gave me can you switch back to the first revision? ping me or game-plan, yet make it a priority, on this journey win-win. Our competitors are jumping the shark we need to build it so that it scales post launch future-proof can we align on lunch orders. Deliverables message the initiative.",
18
- "Out of scope poop, so pre launch. I just wanted to give you a heads-up wiggle room cc me on that I have been doing some research this morning and we need to better, nor dog and pony show prioritize these line items so UX. Big data upstream selling circle back, in an ideal world. Get all your ducks in a row land it in region so code so one-sheet. Action item we need to think big start small and scale fast to energize our clients. Cta due diligence, for this vendor is incompetent nor forcing function and circle back and low engagement.",
19
- "Move the needle a loss a day will keep you focus yet can you put it into a banner that is not alarming, but eye catching and not too giant or strategic fit, nor it is all exactly as i said, but i don't like it or streamline. We've bootstrapped the model. This proposal is a win-win situation which will cause a stellar paradigm shift, and produce a multi-fold increase in deliverables the horse is out of the barn usabiltiy, for going forward but going forward.",
20
- ];
21
- const [activeStep, setActiveStep] = useState(1);
22
-
23
- const anchorProps = {
24
- href: "",
25
- onClick: (e) => e.preventDefault(),
26
- };
27
-
28
- return (
29
- <div style={{ display: "flex", gap: "10rem" }}>
30
- <div>
31
- <h2 id="stepper-heading">Stepper</h2>
32
- <Stepper
33
- aria-labelledby="stepper-heading"
34
- activeStep={activeStep}
35
- onStepChange={setActiveStep}
36
- >
37
- <Stepper.Step {...anchorProps}>Start søknad</Stepper.Step>
38
- <Stepper.Step {...anchorProps}>Personopplysninger</Stepper.Step>
39
- <Stepper.Step {...anchorProps}>Saksopplysninger</Stepper.Step>
40
- <Stepper.Step {...anchorProps}>
41
- Søknadstekst for en veldig spesifikk prosess i NAV som jeg må skrive
42
- om her i denne labelen
43
- </Stepper.Step>
44
- <Stepper.Step {...anchorProps}>Vedlegg</Stepper.Step>
45
- <Stepper.Step {...anchorProps}>Oppsummering</Stepper.Step>
46
- <Stepper.Step {...anchorProps}>Innsending</Stepper.Step>
47
- </Stepper>
48
- </div>
49
- <BodyLong style={{ marginTop: "5rem" }}>
50
- {storyTexts[activeStep]}
51
- </BodyLong>
52
- </div>
53
- );
54
- };