@dep-dio/dio-designsystem 0.2.0 → 0.4.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.
Files changed (62) hide show
  1. package/README.md +138 -1
  2. package/designsystemet.config.json +56 -0
  3. package/dist/assets/icons/floppydisk.svg +3 -0
  4. package/dist/assets/icons/menu-hamburger.svg +3 -0
  5. package/dist/assets/icons/pencil.svg +3 -0
  6. package/dist/assets/icons/social-facebook.svg +3 -0
  7. package/dist/assets/icons/social-flickr.svg +3 -0
  8. package/dist/assets/icons/social-instagram.svg +3 -0
  9. package/dist/assets/icons/social-linkedin.svg +3 -0
  10. package/dist/assets/icons/social-x.svg +3 -0
  11. package/dist/assets/icons/upload.svg +3 -0
  12. package/dist/components/Alert/Alert.d.ts +8 -0
  13. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  14. package/dist/components/Button/Button.d.ts +12 -0
  15. package/dist/components/Button/ButtonClose.d.ts +8 -0
  16. package/dist/components/Button/ButtonLink.d.ts +10 -0
  17. package/dist/components/Card/Card.d.ts +20 -0
  18. package/dist/components/Checkbox/Checkbox.d.ts +17 -0
  19. package/dist/components/Checkbox/CheckboxFieldset.d.ts +10 -0
  20. package/dist/components/ControlGroup/ControlGroup.d.ts +7 -0
  21. package/dist/components/Details/Details.d.ts +18 -0
  22. package/dist/components/Dialog/Dialog.d.ts +30 -0
  23. package/dist/components/Dropdown/Dropdown.d.ts +19 -0
  24. package/dist/components/ErrorSummary/ErrorSummary.d.ts +27 -0
  25. package/dist/components/FeedbackBanner/FeedbackBanner.d.ts +9 -0
  26. package/dist/components/Form/Form.d.ts +6 -0
  27. package/dist/components/Label/Label.d.ts +9 -0
  28. package/dist/components/LinkList/LinkList.d.ts +11 -0
  29. package/dist/components/NavigationalLink/NavigationalLink.d.ts +8 -0
  30. package/dist/components/Pagination/Pagination.d.ts +15 -0
  31. package/dist/components/Radio/Radio.d.ts +9 -0
  32. package/dist/components/Radio/RadioFieldset.d.ts +10 -0
  33. package/dist/components/Select/Select.d.ts +25 -0
  34. package/dist/components/Spinner/Spinner.d.ts +8 -0
  35. package/dist/components/SvgIcon/SvgIcon.d.ts +10 -0
  36. package/dist/components/Switch/Switch.d.ts +9 -0
  37. package/dist/components/Tabs/Tabs.d.ts +13 -0
  38. package/dist/components/Tag/Tag.d.ts +7 -0
  39. package/dist/components/Textarea/Textarea.d.ts +16 -0
  40. package/dist/components/Textfield/Textfield.d.ts +15 -0
  41. package/dist/components/ValidationMessage/ValidationMessage.d.ts +3 -0
  42. package/dist/react.d.ts +31 -0
  43. package/dist/react.js +9115 -0
  44. package/dist/react.js.map +7 -0
  45. package/dist/styles/main.css +663 -4370
  46. package/dist/styles/scss-utils.scss +153 -0
  47. package/dist/styles.d.ts +1 -0
  48. package/dist/theme-colors.d.ts +6 -0
  49. package/dist/types.d.ts +18 -0
  50. package/dist/vite-icons-plugin.d.ts +1 -1
  51. package/dist/vite-icons-plugin.js.map +2 -2
  52. package/dist/{newsletter-subscribe/NewsletterSubscribe.d.ts → web-components/NewsAlertSubscribe/DioNewsAlertSubscribe.d.ts} +1 -1
  53. package/dist/web.d.ts +7 -7
  54. package/dist/web.js +19 -19
  55. package/dist/web.js.map +3 -3
  56. package/package.json +101 -70
  57. package/dist/styles/_mixins.scss +0 -48
  58. /package/dist/{carousel/Carousel.d.ts → web-components/Carousel/DioCarousel.d.ts} +0 -0
  59. /package/dist/{feedback-banner/FeedbackBanner.d.ts → web-components/FeedbackBanner/DioFeedbackBanner.d.ts} +0 -0
  60. /package/dist/{search-autocomplete/SearchAutocomplete.d.ts → web-components/SearchAutocomplete/DioSearchAutocomplete.d.ts} +0 -0
  61. /package/dist/{timeline/Timeline.d.ts → web-components/Timeline/DioTimeline.d.ts} +0 -0
  62. /package/dist/{to-top-of-page/ToTopOfPage.d.ts → web-components/ToTopOfPage/DioToTopOfPage.d.ts} +0 -0
package/README.md CHANGED
@@ -1,3 +1,140 @@
1
1
  # @dep-dio/dio-designsystem
2
2
 
3
- Documentation: [repository README](../../README.md#using-dep-diodio-designsystem)
3
+ DIO design system built on [Designsystemet](https://designsystemet.no).
4
+
5
+ Storybook and repository docs: [dio-designsystemet README](../../README.md).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @dep-dio/dio-designsystem
11
+ ```
12
+
13
+ Peer dependencies for Vite sprite icons (optional):
14
+
15
+ ```bash
16
+ npm install -D vite vite-plugin-svg-icons
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ### Styles
22
+
23
+ Same stylesheet, two entry points (same idea as `@digdir/designsystemet-css`):
24
+
25
+ ```ts
26
+ import "@dep-dio/dio-designsystem/styles"
27
+ ```
28
+
29
+ ```css
30
+ @import "@dep-dio/dio-designsystem/styles.css";
31
+ ```
32
+
33
+ ### Web components
34
+
35
+ ```ts
36
+ import "@dep-dio/dio-designsystem/web"
37
+ ```
38
+
39
+ Registers Designsystemet web components and DIO custom elements.
40
+
41
+ ### React components
42
+
43
+ ```ts
44
+ import { Button } from "@dep-dio/dio-designsystem/react"
45
+ ```
46
+
47
+ Use React components when the consuming application is built with React. For server-rendered HTML, CMS templates (for example Optimizely) and other stacks, use plain HTML markup with styles and web components instead.
48
+
49
+ ### Nav icons (Aksel)
50
+
51
+ ```ts
52
+ import { StarIcon } from "@dep-dio/dio-designsystem/icons"
53
+ ```
54
+
55
+ ### Vite SVG sprite
56
+
57
+ ```ts
58
+ // vite.config.ts
59
+ import { createDioSvgIconsPlugin } from "@dep-dio/dio-designsystem/vite-icons-plugin"
60
+
61
+ export default defineConfig({
62
+ plugins: [createDioSvgIconsPlugin()],
63
+ })
64
+ ```
65
+
66
+ ```ts
67
+ import "@dep-dio/dio-designsystem/svg-icons-register"
68
+ ```
69
+
70
+ ```html
71
+ <svg width="24" height="24" aria-hidden="true">
72
+ <use href="#dio-chevron-right" />
73
+ </svg>
74
+ ```
75
+
76
+ ### SCSS utils
77
+
78
+ ```scss
79
+ @use "@dep-dio/dio-designsystem/scss-utils" as *;
80
+
81
+ .my-link {
82
+ @include dio-text-small;
83
+ }
84
+ ```
85
+
86
+ ## Publishing
87
+
88
+ `@dep-dio/dio-designsystem` is published to [npm](https://www.npmjs.com/package/@dep-dio/dio-designsystem) as a public scoped package. Storybook (`@design/storybook`) is private and ignored by Changesets.
89
+
90
+ Versions follow [Semantic Versioning](https://semver.org/):
91
+
92
+ - **patch** — bug fixes, internal refactors, non-breaking style tweaks
93
+ - **minor** — new components, new exports, backward-compatible features
94
+ - **major** — breaking API, class name, or markup changes for consumers
95
+
96
+ Changelog entries land in [`CHANGELOG.md`](./CHANGELOG.md) when the version is bumped.
97
+
98
+ ### 1. Add a changeset (every PR that should release)
99
+
100
+ Releases use [Changesets](https://github.com/changesets/changesets). On the feature branch:
101
+
102
+ ```bash
103
+ npx changeset
104
+ ```
105
+
106
+ 1. Choose **@dep-dio/dio-designsystem**
107
+ 2. Pick **patch**, **minor**, or **major**
108
+ 3. Write the release note: a plain **summary** line first, then optional bullet **details**
109
+
110
+ The changelog prefixes the summary with the commit hash (`- abc1234: …`). Do not start the summary with `-`, or the first line looks mangled. Prefer:
111
+
112
+ ```markdown
113
+ Typography, theme colors, SCSS utils, and new icons
114
+
115
+ - Explicit DIO font-size overrides (small `1–4`, medium `1–5`)
116
+ - `./mixins` export replaced by `./scss-utils`
117
+ ```
118
+
119
+ Edit the generated `.changeset/*.md` if the interactive prompt only captured a single line. Commit it with the code change, then merge the PR to `main`.
120
+
121
+ ### 2. Release via GitHub Actions
122
+
123
+ Publishing is done only through the [Release workflow](https://github.com/dss-web/dio-designsystemet/actions/workflows/release.yml) ([changesets/action](https://github.com/changesets/action)). It is **manual**: open that page → **Run workflow**.
124
+
125
+ Each run does **one** of these (never both):
126
+
127
+ | State on `main` | What the workflow does |
128
+ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
129
+ | Pending `.changeset/*.md` files | Opens or updates a **“chore: version packages”** PR (bumps version + changelog, removes consumed changesets) |
130
+ | No pending changesets, but a new version is unpublished | Builds and publishes that version to npm |
131
+
132
+ **Release steps:**
133
+
134
+ 1. Merge feature PRs that include changeset files
135
+ 2. Run **Release** → review and merge the version PR
136
+ 3. Run **Release** again → publishes to npm
137
+
138
+ You always need both workflow runs: version first, publish second.
139
+
140
+ **Repo setup (once):** add an `NPM_TOKEN` secret (npm automation token with publish rights for `@dep-dio/dio-designsystem`). The action uses the default `GITHUB_TOKEN` for the version PR.
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "node_modules/@digdir/designsystemet/dist/config.schema.json",
3
+ "clean": true,
4
+ "outDir": "./design-tokens",
5
+ "themes": {
6
+ "theme": {
7
+ "colors": {
8
+ "primary": "#3867C8",
9
+ "accent1": "#11846b",
10
+ "regjeringsbla": "#002E5E",
11
+ "neutral": "#333333"
12
+ },
13
+ "overrides": {
14
+ "colors": {
15
+ "primary": {
16
+ "base-hover": {
17
+ "light": "#CD4658"
18
+ },
19
+ "base-active": {
20
+ "light": "#BC3345"
21
+ },
22
+ "text-subtle": {
23
+ "light": "#3867C8"
24
+ }
25
+ },
26
+ "accent1": {
27
+ "base-active": {
28
+ "light": "#BC3345"
29
+ },
30
+ "base-hover": {
31
+ "light": "#CD4658"
32
+ }
33
+ },
34
+ "neutral": {
35
+ "surface-default": {
36
+ "light": "#EDEDED"
37
+ },
38
+ "base-active": {
39
+ "light": "#BC3345"
40
+ },
41
+ "base-hover": {
42
+ "light": "#CD4658"
43
+ },
44
+ "text-default": {
45
+ "light": "#333333"
46
+ },
47
+ "text-subtle": {
48
+ "light": "#333333"
49
+ }
50
+ }
51
+ }
52
+ },
53
+ "borderRadius": 0
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4 3.25C3.58579 3.25 3.25 3.58579 3.25 4V20C3.25 20.4142 3.58579 20.75 4 20.75H20C20.4142 20.75 20.75 20.4142 20.75 20V6C20.75 5.80109 20.671 5.61032 20.5303 5.46967L18.5303 3.46967C18.3897 3.32902 18.1989 3.25 18 3.25H4ZM19.25 6.31066L17.6893 4.75H16.75V7C16.75 7.41421 16.4142 7.75 16 7.75H8C7.58579 7.75 7.25 7.41421 7.25 7V4.75H4.75V19.25H6.25V11C6.25 10.5858 6.58579 10.25 7 10.25H17C17.4142 10.25 17.75 10.5858 17.75 11V19.25H19.25V6.31066ZM16.25 19.25H7.75V11.75H16.25V19.25ZM15.25 4.75V6.25H8.75V4.75H15.25ZM9.25 14C9.25 13.5858 9.58579 13.25 10 13.25H14C14.4142 13.25 14.75 13.5858 14.75 14C14.75 14.4142 14.4142 14.75 14 14.75H10C9.58579 14.75 9.25 14.4142 9.25 14ZM9.25 17C9.25 16.5858 9.58579 16.25 10 16.25H13C13.4142 16.25 13.75 16.5858 13.75 17C13.75 17.4142 13.4142 17.75 13 17.75H10C9.58579 17.75 9.25 17.4142 9.25 17Z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.75 6C2.75 5.58579 3.08579 5.25 3.5 5.25H20.5C20.9142 5.25 21.25 5.58579 21.25 6C21.25 6.41421 20.9142 6.75 20.5 6.75H3.5C3.08579 6.75 2.75 6.41421 2.75 6ZM2.75 12C2.75 11.5858 3.08579 11.25 3.5 11.25H20.5C20.9142 11.25 21.25 11.5858 21.25 12C21.25 12.4142 20.9142 12.75 20.5 12.75H3.5C3.08579 12.75 2.75 12.4142 2.75 12ZM3.5 17.25C3.08579 17.25 2.75 17.5858 2.75 18C2.75 18.4142 3.08579 18.75 3.5 18.75H20.5C20.9142 18.75 21.25 18.4142 21.25 18C21.25 17.5858 20.9142 17.25 20.5 17.25H3.5Z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.6381 4.41742C18.3693 3.13949 16.3036 3.13578 15.0302 4.40915L5.65182 13.7876C5.56169 13.8777 5.49602 13.9893 5.461 14.1118L4.04679 19.0616C3.97205 19.3232 4.04482 19.6047 4.23693 19.7973C4.42905 19.9899 4.7104 20.0634 4.97215 19.9893L9.91261 18.5912C10.0359 18.5563 10.1481 18.4904 10.2387 18.3999L19.6298 9.00875C20.8967 7.74183 20.9004 5.68889 19.6381 4.41742ZM16.0909 5.46981C16.777 4.78372 17.89 4.78571 18.5736 5.47427C19.2538 6.15934 19.2518 7.26547 18.5692 7.94809L18.3397 8.17752L15.8615 5.69924L16.0909 5.46981ZM14.8008 6.7599L6.8499 14.7108L5.85885 18.1795L9.31619 17.2011L17.2791 9.23818L14.8008 6.7599Z" />
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2
+ <path transform="matrix(1 0 0 -1 0 960)" d="M591.744-64h-213.248c-17.707 0-32 14.293-32 32v458.453h-95.915c-17.707 0-32 14.293-32 32v170.581c0 17.707 14.293 32 32 32h95.957v59.691c-0.043 56.107 16.64 239.275 231.125 239.275h184.661c17.707 0 32-14.293 32-32v-170.581c0-17.707-14.293-32-32-32h-127.957c-6.272-0.555-11.307-6.699-10.795-11.733l0.085-52.651h149.76c9.045 0 17.707-3.84 23.765-10.581 6.059-6.699 9.003-15.701 8.107-24.704l-17.493-170.624c-1.707-16.299-15.445-28.715-31.829-28.715h-132.181v-458.411c-0.043-17.707-14.379-32-32.043-32zM410.496 0h149.205v458.453c0 17.707 14.293 32 32 32h135.296l10.923 106.581h-146.261c-17.707 0-32 14.293-32 32v81.451c-3.925 37.76 26.069 74.453 66.987 78.549 1.067 0.085 6.613 0.384 7.637 0.384h95.957v106.581h-152.661c-145.451 0-167.168-109.824-167.168-175.275v-91.691c0-17.707-14.293-32-32-32h-95.829v-106.581h95.957c17.707 0 32-14.293 32-32v-458.453z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2
+ <path transform="matrix(1 0 0 -1 0 960)" d="M783.36 207.36c-132.693 0-240.64 107.947-240.64 240.64s107.947 240.64 240.64 240.64 240.64-107.947 240.64-240.64-107.947-240.64-240.64-240.64zM783.36 624.64c-97.365 0-176.64-79.232-176.64-176.64s79.232-176.64 176.64-176.64 176.64 79.232 176.64 176.64-79.232 176.64-176.64 176.64zM240.64 207.36c-132.693 0-240.64 107.947-240.64 240.64s107.947 240.64 240.64 240.64 240.64-107.947 240.64-240.64-107.947-240.64-240.64-240.64zM240.64 624.64c-97.408 0-176.64-79.232-176.64-176.64s79.232-176.64 176.64-176.64 176.64 79.232 176.64 176.64-79.275 176.64-176.64 176.64z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2
+ <path transform="matrix(1 0 0 -1 0 960)" d="M783.36-64h-542.72c-132.693 0-240.64 107.989-240.64 240.64v542.72c0 132.693 107.947 240.64 240.64 240.64h542.72c132.693 0 240.64-107.947 240.64-240.64v-542.72c0-132.651-107.947-240.64-240.64-240.64zM240.64 896c-97.408 0-176.64-79.232-176.64-176.64v-542.72c0-97.408 79.232-176.64 176.64-176.64h542.72c97.365 0 176.64 79.232 176.64 176.64v542.72c0 97.408-79.232 176.64-176.64 176.64h-542.72zM512 266.667c-100.011 0-181.333 81.323-181.333 181.333s81.323 181.333 181.333 181.333c100.011 0 181.333-81.323 181.333-181.333 0-99.968-81.323-181.333-181.333-181.333zM512 565.333c-64.683 0-117.333-52.608-117.333-117.333 0-64.683 52.608-117.333 117.333-117.333s117.333 52.608 117.333 117.333c0 64.725-52.651 117.333-117.333 117.333zM682.667 74.667h-341.333c-111.787 0-202.667 90.923-202.667 202.667v341.333c0 111.787 90.88 202.667 202.667 202.667h341.333c111.787 0 202.667-90.88 202.667-202.667v-341.333c0-111.744-90.88-202.667-202.667-202.667zM341.333 757.333c-76.459 0-138.667-62.165-138.667-138.667v-341.333c0-76.459 62.208-138.667 138.624-138.667h341.376c76.459 0 138.624 62.208 138.624 138.667v341.333c0 76.459-62.208 138.667-138.624 138.667h-341.333zM709.76 688c-23.552 0-42.667-19.115-42.667-42.667s19.115-42.667 42.667-42.667c23.552 0 42.667 19.115 42.667 42.667s-19.115 42.667-42.667 42.667z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2
+ <path transform="matrix(1 0 0 -1 0 960)" d="M992-37.12h-229.035c-17.707 0-32 14.293-32 32v309.205c0.085 16-6.016 30.891-17.152 42.155-10.24 10.325-23.595 16.427-37.973 17.408-1.323-0.171-2.731-0.299-4.139-0.299-32.683 0-59.264-26.581-59.264-59.264v-309.205c0-17.707-14.293-32-32-32h-217.899c-17.707 0-32 14.293-32 32v594.048c0 17.707 14.293 32 32 32h217.899c17.707 0 32-14.293 32-32v-7.168c45.781 25.131 97.408 38.955 150.144 39.637 161.408 0 261.419-123.563 261.419-322.432v-304.043c0-17.749-14.293-32.043-32-32.043zM794.965 26.88h165.035v272.043c0 164.267-71.808 258.432-197.035 258.432-58.923-0.768-116.565-22.315-161.835-60.672-9.515-7.979-22.869-9.813-34.176-4.608-11.307 5.248-18.517 16.555-18.517 29.013v35.84h-153.899v-530.048h153.899v277.205c0 66.005 52.139 120.021 117.376 123.136 1.92 0.341 3.883 0.512 5.888 0.512 33.493-0.171 64.427-13.099 87.552-36.48 23.168-23.424 35.84-54.4 35.669-87.339v-277.035zM671.701 395.733v0zM241.408-37.12h-207.275c-17.707 0-32 14.293-32 32v594.048c0 17.707 14.293 32 32 32h207.275c17.707 0 32-14.293 32-32v-594.048c0-17.707-14.293-32-32-32zM66.133 26.88h143.275v530.048h-143.275v-530.048zM138.624 655.872c-76.416 0-138.624 62.208-138.624 138.624s62.208 138.624 138.624 138.624c73.301-0.597 133.291-58.368 137.515-130.432 0.768-2.645 1.109-5.376 1.109-8.192 0-76.416-62.165-138.624-138.624-138.624zM138.368 869.12c-40.917 0-74.368-33.451-74.368-74.624s33.451-74.624 74.624-74.624c39.040 0 71.168 30.123 74.368 68.352-0.427 2.048-0.64 4.139-0.64 6.272 0.043 40.832-33.152 74.325-73.984 74.624z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
2
+ <path d="M12.6 0.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867 -5.07 -4.425 5.07H0.316l5.733 -6.57L0 0.75h5.063l3.495 4.633L12.601 0.75Zm-0.86 13.028h1.36L4.323 2.145H2.865z" stroke-width="1"></path>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M6.96967 9.03033C7.26256 9.32322 7.73744 9.32322 8.03033 9.03033L11.25 5.81066V14.5C11.25 14.9142 11.5858 15.25 12 15.25C12.4142 15.25 12.75 14.9142 12.75 14.5V5.81066L15.9697 9.03033C16.2626 9.32322 16.7374 9.32322 17.0303 9.03033C17.3232 8.73744 17.3232 8.26256 17.0303 7.96967L12.5303 3.46967C12.2374 3.17678 11.7626 3.17678 11.4697 3.46967L6.96967 7.96967C6.67678 8.26256 6.67678 8.73744 6.96967 9.03033ZM4.75 15.5C4.75 15.0858 4.41421 14.75 4 14.75C3.58579 14.75 3.25 15.0858 3.25 15.5V19C3.25 19.9665 4.0335 20.75 5 20.75H19C19.9665 20.75 20.75 19.9665 20.75 19V15.5C20.75 15.0858 20.4142 14.75 20 14.75C19.5858 14.75 19.25 15.0858 19.25 15.5V19C19.25 19.1381 19.1381 19.25 19 19.25H5C4.86193 19.25 4.75 19.1381 4.75 19V15.5Z" />
3
+ </svg>
@@ -0,0 +1,8 @@
1
+ import { type AlertProps as DsAlertProps } from "@digdir/designsystemet-react";
2
+ import type { SeverityColors } from "../../theme-colors";
3
+ export interface AlertProps extends DsAlertProps {
4
+ color?: SeverityColors;
5
+ title?: string;
6
+ description?: string;
7
+ }
8
+ export declare function Alert({ className, color, title, description, children, ...props }: AlertProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type BreadcrumbsProps as DsBreadcrumbsProps } from "@digdir/designsystemet-react";
2
+ export interface BreadcrumbItem {
3
+ href?: string;
4
+ label: string;
5
+ isCurrent?: boolean;
6
+ }
7
+ export interface BreadcrumbsProps extends DsBreadcrumbsProps {
8
+ items?: BreadcrumbItem[];
9
+ }
10
+ export declare function Breadcrumbs({ items, className, children, "aria-label": ariaLabel, ...props }: BreadcrumbsProps): import("react").JSX.Element;
11
+ export declare namespace Breadcrumbs {
12
+ var Item: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").BreadcrumbsItemProps & import("react").RefAttributes<HTMLLIElement>>;
13
+ var Link: import("react").ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "asChild" | "children"> & {
14
+ children: import("react").ReactNode;
15
+ asChild?: boolean;
16
+ } & import("react").RefAttributes<HTMLAnchorElement>>;
17
+ var List: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").BreadcrumbsListProps & import("react").RefAttributes<HTMLOListElement>>;
18
+ }
@@ -0,0 +1,12 @@
1
+ import { type ButtonProps as DsButtonProps } from "@digdir/designsystemet-react";
2
+ import type { ThemeColor } from "../../theme-colors";
3
+ export interface ButtonProps extends Omit<DsButtonProps, "data-color" | "loading" | "disabled" | "aria-label"> {
4
+ color?: ThemeColor;
5
+ iconLeft?: string;
6
+ iconRight?: string;
7
+ ariaLabel?: string;
8
+ isLoading?: DsButtonProps["loading"];
9
+ isDisabled?: boolean;
10
+ size?: "sm" | "md" | "lg";
11
+ }
12
+ export declare function Button({ className, color, iconLeft, iconRight, children, ariaLabel, isLoading, isDisabled, size, ...props }: ButtonProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type ButtonProps as DsButtonProps } from "@digdir/designsystemet-react";
2
+ import type { MouseEventHandler } from "react";
3
+ export type ButtonCloseProps = Omit<DsButtonProps, "icon" | "children" | "aria-label"> & {
4
+ onClick?: MouseEventHandler<HTMLButtonElement>;
5
+ ariaLabel?: string;
6
+ commandFor?: string;
7
+ };
8
+ export declare function ButtonClose({ className, onClick, ariaLabel, title, id, commandFor, variant, ...props }: ButtonCloseProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type LinkProps as DsLinkProps } from "@digdir/designsystemet-react";
2
+ import type { ButtonHTMLAttributes, ReactNode } from "react";
3
+ export type ButtonLinkProps = Omit<DsLinkProps, "href" | "children" | "onClick" | "aria-label" | "asChild"> & {
4
+ children?: ReactNode;
5
+ iconLeft?: string;
6
+ iconRight?: string;
7
+ onClick?: ButtonHTMLAttributes<HTMLButtonElement>["onClick"];
8
+ isDisabled?: boolean;
9
+ };
10
+ export declare function ButtonLink({ className, children, iconLeft, iconRight, onClick, isDisabled, ...props }: ButtonLinkProps): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { type CardProps as DsCardProps } from "@digdir/designsystemet-react";
2
+ import type { ReactNode } from "react";
3
+ import type { Color } from "../../theme-colors";
4
+ export type CardVariant = "default" | "tinted";
5
+ export type CardProps = Omit<DsCardProps, "children"> & {
6
+ title?: string;
7
+ href?: string;
8
+ description?: string;
9
+ children?: ReactNode;
10
+ color?: Color;
11
+ variant?: CardVariant;
12
+ headingLevel?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
13
+ hasBlocks?: boolean;
14
+ };
15
+ export declare function Card({ title, href, description, color, variant, children, className, headingLevel, hasBlocks, ...props }: CardProps): import("react").JSX.Element;
16
+ export declare namespace Card {
17
+ var Block: import("react").ForwardRefExoticComponent<{
18
+ asChild?: boolean;
19
+ } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
20
+ }
@@ -0,0 +1,17 @@
1
+ import { type CheckboxProps as DsCheckboxProps } from "@digdir/designsystemet-react";
2
+ import { type ChangeEventHandler, type ReactNode } from "react";
3
+ export type CheckboxProps = Omit<DsCheckboxProps, "label" | "disabled" | "checked" | "required" | "defaultChecked" | "error" | "onChange"> & {
4
+ label?: ReactNode;
5
+ description?: ReactNode;
6
+ controlClassName?: string;
7
+ isValid?: boolean;
8
+ errorMessage?: string;
9
+ isValidationVisible?: boolean;
10
+ isDisabled?: boolean;
11
+ isChecked?: boolean;
12
+ isRequired?: boolean;
13
+ isDefaultChecked?: boolean;
14
+ requiredMessage?: string;
15
+ onChange?: ChangeEventHandler<HTMLInputElement>;
16
+ };
17
+ export declare function Checkbox({ className, controlClassName, label, description, isValid, errorMessage, isValidationVisible, isDisabled, isChecked, isRequired, isDefaultChecked, requiredMessage, onChange, ...props }: CheckboxProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type FieldsetProps as DsFieldsetProps } from "@digdir/designsystemet-react";
2
+ import type { CSSProperties, ReactNode } from "react";
3
+ export interface CheckboxFieldsetProps extends DsFieldsetProps {
4
+ legend: string;
5
+ description?: ReactNode;
6
+ children: ReactNode;
7
+ direction?: "horizontal" | "vertical";
8
+ style?: CSSProperties;
9
+ }
10
+ export declare function CheckboxFieldset({ legend, description, children, direction, style, className, ...props }: CheckboxFieldsetProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ export interface ControlGroupProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ orientation?: "horizontal" | "vertical";
6
+ }
7
+ export declare function ControlGroup({ children, className, orientation, }: ControlGroupProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { type DetailsProps as DsDetailsProps } from "@digdir/designsystemet-react";
2
+ import type { ReactNode } from "react";
3
+ export type DetailsProps = Omit<DsDetailsProps, "children" | "open" | "onToggle" | "defaultOpen"> & {
4
+ children: ReactNode;
5
+ trigger: string;
6
+ triggerExtraLabel?: ReactNode;
7
+ contentClassName?: string;
8
+ isOpen?: boolean;
9
+ onToggle?: (event: Event) => void;
10
+ isDefaultOpen?: boolean;
11
+ };
12
+ export declare function Details({ children, trigger, triggerExtraLabel, contentClassName, className, isOpen, onToggle, isDefaultOpen, ...props }: DetailsProps): import("react").JSX.Element;
13
+ export declare namespace Details {
14
+ var Summary: import("react").ForwardRefExoticComponent<{
15
+ children?: ReactNode;
16
+ } & import("react").HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
17
+ var Content: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").DetailsContentProps & import("react").RefAttributes<HTMLDivElement>>;
18
+ }
@@ -0,0 +1,30 @@
1
+ import { type DialogProps as DsDialogProps } from "@digdir/designsystemet-react";
2
+ import { type ReactNode } from "react";
3
+ export interface DialogProps extends Omit<DsDialogProps, "closeButton" | "open" | "modal"> {
4
+ children?: ReactNode;
5
+ title?: string;
6
+ id: string;
7
+ isInitialOpen?: boolean;
8
+ isModal?: boolean;
9
+ closeButtonText?: string;
10
+ }
11
+ export declare function Dialog({ children, className, placement, isModal, title, id, isInitialOpen, closeButtonText, onClose, ...props }: DialogProps): import("react").JSX.Element;
12
+ export declare namespace Dialog {
13
+ var Block: import("react").ForwardRefExoticComponent<{
14
+ asChild?: boolean;
15
+ } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
16
+ var Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digdir/designsystemet-react").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandFor" | "commandfor">, "asChild" | "command" | "commandFor" | "commandfor" | "icon" | "loading" | "type" | "variant"> & {
17
+ variant?: "primary" | "secondary" | "tertiary";
18
+ icon?: boolean;
19
+ loading?: boolean | import("react").ReactNode;
20
+ asChild?: boolean;
21
+ type?: import("react").ButtonHTMLAttributes<HTMLButtonElement>["type"];
22
+ command?: string;
23
+ commandfor?: string;
24
+ commandFor?: string;
25
+ } & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
26
+ var TriggerContext: {
27
+ (rest: import("@digdir/designsystemet-react").DialogTriggerContextProps): import("react").JSX.Element;
28
+ displayName: string;
29
+ };
30
+ }
@@ -0,0 +1,19 @@
1
+ import { type DropdownProps as DsDropdownProps } from "@digdir/designsystemet-react";
2
+ export type DropdownProps = DsDropdownProps;
3
+ declare function DropdownRoot({ className, children, ...props }: DropdownProps): import("react").JSX.Element;
4
+ export declare const Dropdown: typeof DropdownRoot & {
5
+ TriggerContext: {
6
+ ({ children, }: import("@digdir/designsystemet-react").DropdownTriggerContextProps): import("react").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ Trigger: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ Heading: import("react").ForwardRefExoticComponent<{
11
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
12
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
13
+ asChild?: boolean;
14
+ } & import("react").HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
15
+ List: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").DropdownListProps & import("react").RefAttributes<HTMLUListElement>>;
16
+ Item: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").DropdownItemProps & import("react").RefAttributes<HTMLLIElement>>;
17
+ Button: import("react").ForwardRefExoticComponent<import("@digdir/designsystemet-react").DropdownButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
18
+ };
19
+ export {};
@@ -0,0 +1,27 @@
1
+ import { type ErrorSummaryProps as DsErrorSummaryProps } from "@digdir/designsystemet-react";
2
+ export interface ErrorSummaryItem {
3
+ label: string;
4
+ href: string;
5
+ }
6
+ export interface ErrorSummaryProps extends DsErrorSummaryProps {
7
+ title?: string;
8
+ errors?: ErrorSummaryItem[];
9
+ }
10
+ export declare function ErrorSummary({ title, errors, className, children, ...props }: ErrorSummaryProps): import("react").JSX.Element;
11
+ export declare namespace ErrorSummary {
12
+ var Heading: import("react").ForwardRefExoticComponent<{
13
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
14
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
15
+ asChild?: boolean;
16
+ } & import("react").HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
17
+ var List: import("react").ForwardRefExoticComponent<{
18
+ asChild?: boolean;
19
+ } & import("@digdir/designsystemet-react").DefaultProps & Omit<import("react").HTMLAttributes<HTMLUListElement>, "size"> & import("react").RefAttributes<HTMLOListElement>>;
20
+ var Item: import("react").ForwardRefExoticComponent<{
21
+ asChild?: boolean;
22
+ } & import("react").LiHTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
23
+ var Link: import("react").ForwardRefExoticComponent<Omit<import("@digdir/designsystemet-react").DefaultProps & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "asChild" | "children"> & {
24
+ children: import("react").ReactNode;
25
+ asChild?: boolean;
26
+ } & import("react").RefAttributes<HTMLAnchorElement>>;
27
+ }
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import type { SeverityColors } from "../../theme-colors";
3
+ export interface FeedbackBannerProps {
4
+ color?: SeverityColors;
5
+ className?: string;
6
+ children?: ReactNode;
7
+ closeLabel?: string;
8
+ }
9
+ export declare function FeedbackBanner({ color, className, children, closeLabel, }: FeedbackBannerProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from "react";
2
+ export interface FormProps {
3
+ className?: string;
4
+ children: ReactNode;
5
+ }
6
+ export declare function Form({ className, children }: FormProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export declare const DEFAULT_REQUIRED_MESSAGE = "M\u00E5 fylles ut";
3
+ export interface LabelProps extends HTMLAttributes<HTMLSpanElement> {
4
+ isRequired?: boolean;
5
+ isInvalid?: boolean;
6
+ requiredMessage?: string;
7
+ children: ReactNode;
8
+ }
9
+ export declare function Label({ className, children, isRequired, isInvalid, requiredMessage, ...props }: LabelProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ export interface LinkListItem {
2
+ href: string;
3
+ label: string;
4
+ target?: string;
5
+ rel?: string;
6
+ }
7
+ export interface LinkListProps {
8
+ links?: LinkListItem[];
9
+ className?: string;
10
+ }
11
+ export declare function LinkList({ links, className }: LinkListProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type LinkProps as DsLinkProps } from "@digdir/designsystemet-react";
2
+ import type { ReactNode } from "react";
3
+ export type NavigationalLinkProps = Omit<DsLinkProps, "children"> & {
4
+ children?: ReactNode;
5
+ iconLeft?: string;
6
+ iconRight?: string;
7
+ };
8
+ export declare function NavigationalLink({ children, className, iconLeft, iconRight, ...props }: NavigationalLinkProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type PaginationProps as DsPaginationProps } from "@digdir/designsystemet-react";
2
+ export type PaginationProps = DsPaginationProps;
3
+ declare function PaginationRoot({ className, children, ...props }: PaginationProps): import("react").JSX.Element;
4
+ export declare const Pagination: typeof PaginationRoot & {
5
+ List: import("react").ForwardRefExoticComponent<{
6
+ asChild?: boolean;
7
+ } & Omit<import("react").HTMLAttributes<HTMLUListElement>, "size"> & import("react").RefAttributes<HTMLUListElement>>;
8
+ Item: import("react").ForwardRefExoticComponent<{
9
+ asChild?: boolean;
10
+ } & Omit<import("react").HTMLAttributes<HTMLLIElement>, "size"> & import("react").RefAttributes<HTMLLIElement>>;
11
+ Button: import("react").ForwardRefExoticComponent<{
12
+ 'aria-current'?: import("react").AriaAttributes["aria-current"];
13
+ } & Omit<import("@digdir/designsystemet-react").ButtonProps, "icon" | "loading"> & import("react").RefAttributes<HTMLButtonElement>>;
14
+ };
15
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type RadioProps as DsRadioProps } from "@digdir/designsystemet-react";
2
+ import type { ChangeEventHandler } from "react";
3
+ export type RadioProps = Omit<DsRadioProps, "disabled" | "checked" | "required" | "defaultChecked" | "error" | "onChange"> & {
4
+ isDisabled?: boolean;
5
+ isChecked?: boolean;
6
+ isDefaultChecked?: boolean;
7
+ onChange?: ChangeEventHandler<HTMLInputElement>;
8
+ };
9
+ export declare function Radio({ className, isDisabled, isChecked, isDefaultChecked, onChange, ...props }: RadioProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type FieldsetProps as DsFieldsetProps } from "@digdir/designsystemet-react";
2
+ import type { CSSProperties, ReactNode } from "react";
3
+ export interface RadioFieldsetProps extends DsFieldsetProps {
4
+ legend: string;
5
+ description?: ReactNode;
6
+ children: ReactNode;
7
+ direction?: "horizontal" | "vertical";
8
+ style?: CSSProperties;
9
+ }
10
+ export declare function RadioFieldset({ legend, description, children, direction, style, className, ...props }: RadioFieldsetProps): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { type SelectProps as DsSelectProps } from "@digdir/designsystemet-react";
2
+ import type { ChangeEventHandler, ReactNode } from "react";
3
+ export interface SelectProps extends Omit<DsSelectProps, "required" | "disabled" | "onChange"> {
4
+ controlClassName?: string;
5
+ label?: ReactNode;
6
+ description?: ReactNode;
7
+ selectedValue?: string;
8
+ isValid?: boolean;
9
+ errorMessage?: string;
10
+ isValidationVisible?: boolean;
11
+ isRequired?: boolean;
12
+ isDisabled?: boolean;
13
+ requiredMessage?: string;
14
+ onChange?: ChangeEventHandler<HTMLSelectElement>;
15
+ }
16
+ declare function SelectRoot({ className, controlClassName, label, description, id, isRequired, isDisabled, selectedValue, value, onChange, isValid, errorMessage, isValidationVisible, requiredMessage, children, ...props }: SelectProps): import("react").JSX.Element;
17
+ export declare const Select: typeof SelectRoot & {
18
+ Option: import("react").ForwardRefExoticComponent<{
19
+ asChild?: boolean;
20
+ } & import("react").OptionHTMLAttributes<HTMLOptionElement> & import("react").RefAttributes<HTMLOptionElement>>;
21
+ Optgroup: import("react").ForwardRefExoticComponent<{
22
+ asChild?: boolean;
23
+ } & import("react").OptgroupHTMLAttributes<HTMLOptGroupElement> & import("react").RefAttributes<HTMLOptGroupElement>>;
24
+ };
25
+ export {};
@@ -0,0 +1,8 @@
1
+ import { type SpinnerProps as DsSpinnerProps } from "@digdir/designsystemet-react";
2
+ export interface SpinnerProps extends Omit<DsSpinnerProps, "data-size" | "aria-label"> {
3
+ size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
4
+ textBefore?: string;
5
+ textAfter?: string;
6
+ ariaLabel?: string;
7
+ }
8
+ export declare function Spinner({ size, textBefore, textAfter, ariaLabel, className, ...props }: SpinnerProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { CSSProperties } from "react";
2
+ export interface SvgIconProps {
3
+ name: string;
4
+ width?: number;
5
+ height?: number;
6
+ className?: string;
7
+ label?: string;
8
+ style?: CSSProperties;
9
+ }
10
+ export declare function SvgIcon({ name, width, height, className, label, style }: SvgIconProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type SwitchProps as DsSwitchProps } from "@digdir/designsystemet-react";
2
+ import type { ChangeEventHandler } from "react";
3
+ export type SwitchProps = Omit<DsSwitchProps, "disabled" | "checked" | "required" | "defaultChecked" | "onChange"> & {
4
+ isDisabled?: boolean;
5
+ isChecked?: boolean;
6
+ isDefaultChecked?: boolean;
7
+ onChange?: ChangeEventHandler<HTMLInputElement>;
8
+ };
9
+ export declare function Switch({ className, isDisabled, isChecked, isDefaultChecked, onChange, ...props }: SwitchProps): import("react").JSX.Element;