Compare commits

...
Author SHA1 Message Date
Ken 3b9e755976 refactor(mcp): use getOrInsert for map 2026-09-02 12:19:01 +02:00
Ken 7c3e54a141 refactor(core): rename and move baseprimitve to hook (#5237) 2026-09-02 11:54:34 +02:00
Ken f25cfa621a chore(core): lookup comment on why we use span 2026-09-02 11:38:03 +02:00
Ken 9e634308a8 fix(core): removed bench-files from react-build 2026-09-02 11:32:52 +02:00
Ken c63f485d38 chore(core): Slot comment 2026-09-02 11:26:27 +02:00
dependabot[bot] c89e35f865 ⬆️ Bump js-yaml from 5.4.0 to 5.4.1 (#5239)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 11:20:34 +02:00
Halvor Haugan 516fb5ccb1 chore(deps): upgrade yarn and fix playroom (#5235) 2026-09-02 10:39:45 +02:00
Halvor Haugan f846950f1f fix(website): remove data-color="accent" on WebsiteList 2026-09-02 10:25:24 +02:00
dependabot[bot] d4b8ce15dc ⬆️ Bump @github-ui/storybook-addon-performance-panel from 1.1.4 to 1.2.0 in the storybook group (#5227)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 10:16:20 +02:00
dependabot[bot] 3135b495b3 ⬆️ Bump js-yaml from 5.3.0 to 5.4.0 (#5230)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 10:16:01 +02:00
dependabot[bot] dfb1ab35ac ⬆️ Bump postcss-selector-parser from 7.1.4 to 7.1.5 (#5231)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 10:15:27 +02:00
dependabot[bot] 14bb00a27e ⬆️ Bump sharp from 0.35.3 to 0.35.4 (#5234)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 10:14:15 +02:00
dependabot[bot] 4196a473f5 ⬆️ Bump body-parser from 2.2.2 to 2.3.0 (#5233)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 10:12:55 +02:00
Halvor Haugan 0260104863 perf(core): optimize writeComponentNames() (#5191) 2026-09-02 09:23:03 +02:00
github-actions[bot] e69c3f7ce5 Version Packages (#5224)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-01 13:53:47 +02:00
dependabot[bot] ceeb26b0ac ⬆️ Bump esbuild from 0.28.0 to 0.28.2 (#5216)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-01 13:32:32 +02:00
Ken 09946680dd refactor(apps): Handle links better for bug-reports from website 2026-09-01 12:45:28 +02:00
Ken aeedec4214 fix(apps): Forvalter text now a heading 2026-09-01 12:14:48 +02:00
Ken cb6f48dff5 feat(apps): added endringslogg to TOC 2026-09-01 12:12:21 +02:00
Ken 16125841b2 fix(apps): Reduce gap to endringslogg-table 2026-09-01 10:34:00 +02:00
Ken a48ed55493 fix(apps): reduced gap between title and content for maler and grunnleggende 2026-09-01 10:23:42 +02:00
Ken 2be7137532 chore(apps): removed styled-components from website deps 2026-09-01 10:18:41 +02:00
Halvor Haugan 89c29cf211 chore(deps): remove unused dep babel-plugin-preval (#5222) 2026-09-01 09:51:59 +02:00
Dave HonnefferandKen 72f162e1ab fix(css): browserslist was bringing in old browsers (#5213)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-09-01 09:37:02 +02:00
dependabot[bot] 6e5b10a626 ⬆️ Bump colorjs.io from 0.7.0 to 0.7.1 (#5218)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-01 09:23:09 +02:00
Halvor Haugan 7830ccea7e feat(Sanity): limit length of external link tooltip (#5223) 2026-09-01 09:21:26 +02:00
Ken 28dcec668e refactor(website): Renamed react.d.ts file to something more fitting (#5221) 2026-09-01 09:20:26 +02:00
Halvor Haugan 1bd55ba587 fix typo in @navikt/aksel/README.md 2026-08-31 16:11:07 +02:00
dependabot[bot] 4a248c8a84 ⬆️ Bump @modelcontextprotocol/sdk from 1.29.0 to 1.30.0 (#5217)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-31 15:21:32 +02:00
Halvor Haugan 35940055a8 fix(LinkCard): add default value to JSDoc desc of data-color prop (#5220) 2026-08-31 15:05:42 +02:00
dependabot[bot] ec8d50c55b ⬆️ Bump the storybook group with 8 updates (#5214)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-31 15:01:56 +02:00
Halvor Haugan 99b23c087e refactor(i18n): simplify get function (#5181) 2026-08-31 13:01:42 +02:00
dependabot[bot]andHalvor Haugan 06e38b9015 ⬆️ Bump react-rx from 4.2.3 to 5.1.1 (#5200)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-08-28 15:17:47 +02:00
Halvor Haugan ae0ccea41f feat(Combobox2): small sizing for trigger, margin for desc, hideLabel, readOnly, stories cleanup 2026-08-28 10:33:30 +02:00
Halvor Haugan 6b11dfae6a chore(deps): bump storybook to 10.4.9 2026-08-27 11:51:54 +02:00
dependabot[bot] 487db1594b ⬆️ Bump dompurify from 3.4.12 to 3.4.13 (#5209)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-26 09:17:47 +02:00
dependabot[bot] 2df8aa4d3d ⬆️ Bump js-yaml from 5.2.3 to 5.3.0 (#5208)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-26 09:17:15 +02:00
Halvor Haugan 958e8ab9df chore(deps): bump @slack/web-api to 8.0.0 (#5210) 2026-08-25 21:15:27 +02:00
Halvor Haugan fd4993126d chore(deps): bump @google-cloud/bigquery to 9.0.2 2026-08-25 20:29:23 +02:00
Halvor Haugan b13ac9f1ea refactor(Combobox2): Item -> Option 2026-08-25 15:07:29 +02:00
Anniken GranbergandHalvor Haugan 046226a155 [Website] Add Lookup in table example (#5207)
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-08-25 13:54:18 +02:00
Halvor Haugan 6c356c9708 feat(website): adjust examples desc Tag + Pagination 2026-08-25 13:42:01 +02:00
Halvor Haugan db3d267fc1 feat(core): Combobox 2.0 WIP 2026-08-25 13:37:21 +02:00
c7848d39fb Add lookup to sanity (#5203)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-08-25 09:34:55 +02:00
dependabot[bot]andHalvor Haugan a801fb0c45 ⬆️ Bump @axe-core/playwright from 4.11.0 to 4.13.0 (#5206)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-08-24 10:46:06 +02:00
Halvor Haugan 2dc8306762 feat(Listbox): new design + small variant 2026-08-21 17:03:00 +02:00
Halvor Haugan b9b63c9dbd feat(website): update descriptions of ExpansionCard examples 2026-08-21 14:13:14 +02:00
Halvor Haugan 2e39afd6d1 chore(deps): bump biome to 2.5.9 2026-08-21 10:48:26 +02:00
Halvor Haugan 53111a7a76 chore(deps): bump undici 7.28.0 -> 7.29.0 2026-08-21 10:39:23 +02:00
Halvor Haugan 20c59e3eef chore(deps): bump js-yaml 4.1.1->4.3.1 and 3.14.2->3.15.1 2026-08-21 10:37:37 +02:00
Halvor Haugan b0fea1ebdf chore(deps): bump brace-expansion to 2.1.4/5.0.9 2026-08-21 10:34:23 +02:00
Halvor Haugan babe31426a chore(deps): bump postcss to 8.5.26 (mostly) 2026-08-21 09:58:56 +02:00
Halvor Haugan 0c9fbe3991 chore(deps): bump shell-quote to 1.9.0 2026-08-21 09:54:15 +02:00
Halvor Haugan 2b22fdbfcf chore(deps): bump @modelcontextprotocol/inspector to 2.2.0 2026-08-20 15:28:51 +02:00
dependabot[bot]andHalvor Haugan 0ee0bafed9 ⬆️ Bump prettier from 3.8.3 to 3.9.6 (#5199)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-08-20 15:09:09 +02:00
Halvor Haugan 694bf00fcf build(aksel-icons): fix prettier script (#5201) 2026-08-20 11:38:51 +02:00
Halvor Haugan b12bb29992 feat(core): export useDeferredValue from /hooks 2026-08-18 15:05:29 +02:00
Halvor Haugan b8f2a7d0ef feat(Listbox): HTML attributes, forwardRef, preventDefault (#5202) 2026-08-18 15:02:48 +02:00
Halvor Haugan 54bcfcfccc types.d.ts: CRLF -> LF 2026-08-17 12:04:16 +02:00
dependabot[bot] 2bcd7a22f3 ⬆️ Bump @vitest/eslint-plugin from 1.6.23 to 1.6.27 in the vitest group (#5197)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-17 09:12:22 +02:00
8a1885f599 Add toggle show more in preview box in sanity and website (#5188)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-08-14 12:24:10 +02:00
Anniken Granberg b256af537b Remove APIKEY (#5193) 2026-08-13 15:48:05 +02:00
Halvor Haugan 185bbab0d7 fix(website): adjust descriptions of 5XX template 2026-08-13 11:33:02 +02:00
Halvor Haugan 68f0c6426e build(nais): add quotes around "{{ image }}" so that prettier doesn't change it (#5192) 2026-08-13 09:37:03 +02:00
Halvor Haugan bb8aa1b2ed chore(deps): bump nanoid 2026-08-12 14:12:33 +02:00
Halvor Haugan 542745540d chore(deps): bump concurrently to 10.0.4 and mcp-inspector to 2.1.0 (#5189) 2026-08-12 14:10:06 +02:00
Halvor Haugan 106eaea853 chore(deps): bump @modelcontextprotocol/inspector to v1 2026-08-12 12:42:44 +02:00
Halvor Haugan 522032bba0 fix(eslint): fix error in local eslint rule "args-check" (#5170) 2026-08-10 15:49:31 +02:00
Halvor Haugan 99c6407436 fix(website): adjust validation error messages for feedback form (#5187) 2026-08-10 14:14:14 +02:00
Halvor Haugan 1198d59048 fix(mcp): fix formatting error in app.yaml 2026-08-10 13:34:56 +02:00
dependabot[bot]andHalvor Haugan 548c449741 ⬆️ Bump the react group across 1 directory with 2 updates (#5158)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-08-10 13:02:45 +02:00
dependabot[bot] 5b08975f23 ⬆️ Bump hono from 4.12.33 to 4.12.34 (#5185)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 09:30:23 +02:00
Halvor Haugan 0779430ae2 fix(skill): fix formatting errors in ds-component-restructure skill (#5180) 2026-08-10 09:28:04 +02:00
dependabot[bot] 8d3e99e3bb ⬆️ Bump nanoid from 3.3.11 to 3.3.16 (#5182)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 08:58:31 +02:00
dependabot[bot] f8951a9978 ⬆️ Bump @vitejs/plugin-react from 6.0.3 to 6.0.5 (#5183)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-10 08:57:53 +02:00
Halvor Haugan 387856cb92 fix(website): update descs of 404 template examples 2026-08-07 18:44:17 +02:00
Halvor Haugan e1f2ca0610 fix(website): Github -> GitHub 2026-08-07 18:41:38 +02:00
Halvor Haugan 547b1b71b6 refactor(metadata): adjust naming in parse-meta.ts 2026-08-07 18:29:06 +02:00
dependabot[bot] 02ccaf7080 ⬆️ Bump fast-uri from 3.1.4 to 3.1.5 (#5179)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-07 16:00:20 +02:00
dependabot[bot] 34c87357ee ⬆️ Bump hono from 4.12.32 to 4.12.33 (#5178)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-07 16:00:04 +02:00
dependabot[bot] 6f099025a4 ⬆️ Bump brace-expansion from 1.1.16 to 1.1.18 (#5177)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-07 15:59:16 +02:00
Halvor Haugan daf9d1241f Bump tar to 7.5.22 2026-08-07 15:44:07 +02:00
Anniken Granberg 853fcac461 fix link (#5176) 2026-08-05 09:53:06 +02:00
Halvor Haugan 6aa6c2fa3f ⬆️ Bump styled-components from 6.4.1 to 6.4.4 (#5174) 2026-08-04 11:59:35 +02:00
dependabot[bot] 09bacb3fae ⬆️ Bump undici from 6.27.0 to 6.28.0 (#5172)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 09:55:06 +02:00
dependabot[bot] 4c01c76cd4 ⬆️ Bump hono from 4.12.30 to 4.12.32 (#5171)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 09:53:59 +02:00
dependabot[bot]andHalvor Haugan 82419f32d9 ⬆️ Bump typescript-eslint from 8.59.0 to 8.65.0 (#5159)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-08-04 09:28:03 +02:00
Halvor Haugan 45f33f5da0 fix(git-release): fix incorrect relative path after moving file 2026-08-04 09:23:16 +02:00
dependabot[bot] bf298a9335 ⬆️ Bump @hono/node-server from 1.19.14 to 1.19.17 (#5167)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 09:15:04 +02:00
dependabot[bot] fa9e4762f0 ⬆️ Bump ip-address from 10.2.0 to 10.3.1 (#5168)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 09:14:01 +02:00
dependabot[bot] caa85ce68c ⬆️ Bump js-yaml from 5.2.2 to 5.2.3 (#5169)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-04 09:11:22 +02:00
KenandCopilot Autofix powered by AI e192281e00 refactor(workspace): rename scripts-dir tooling, moved scripts to scripts dir inside tooling (#5164)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-30 14:20:04 +02:00
dependabot[bot] 26d6dd7bd4 ⬆️ Bump browserslist from 4.28.4 to 4.28.7 (#5161)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-30 11:37:22 +02:00
dependabot[bot] 7d4fb6a908 ⬆️ Bump @portabletext/block-tools from 5.1.1 to 5.1.12 in the sanity group (#5157)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-30 11:37:09 +02:00
Ken d8fa45c316 refactor: re-written changelog script from deno -> node (#5163) 2026-07-30 10:10:19 +02:00
Ken af0b1037cd Moved playroom to apps-dir (#5162) 2026-07-29 15:15:55 +02:00
Ken fa64defe3a MCP-server moved into /apps (#5156) 2026-07-29 14:41:33 +02:00
KenandCopilot Autofix powered by AI e333343c4c refactor: moved figma icon plugin into dedicated apps-dir (#5155)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-29 14:25:37 +02:00
Ken 2a8e403b39 [Datepicker, Monthpicker] Directory refactor (#5154) 2026-07-29 13:51:15 +02:00
github-actions[bot] 6b819a8fa8 Version Packages (#5153)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-29 11:06:55 +02:00
Ken a322476d33 chore: forced update to sync GPR release 2026-07-29 10:11:22 +02:00
Ken a19ae363bf fix: make sure playroom is ignored by changeset 2026-07-29 10:04:10 +02:00
github-actions[bot] 1aa690d35f Version Packages (#5053)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-29 09:42:22 +02:00
Ken 1cadfc6828 feat(website): added tags for endringslogg article links 2026-07-28 17:10:20 +02:00
Ken 6051e1346c refactor(website): link-card usage examples update 2026-07-28 16:48:27 +02:00
Ken 047a671794 fix(website): sync playwright versions 2026-07-28 16:40:18 +02:00
Ken e38a932812 fix(website): invalid resource request value 2026-07-28 13:14:24 +02:00
Ken 122291dec1 fix(website): fixed args extraction from examples 2026-07-28 13:08:21 +02:00
Ken 525aa0770f perf(website): re-add cachehandler, up max memory 2026-07-28 12:56:11 +02:00
dependabot[bot] 968446721f ⬆️ Bump stylelint from 17.14.0 to 17.14.1 (#5151)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-28 12:35:45 +02:00
dependabot[bot]andKen 5f28b8f1e7 ⬆️ Bump husky from 8.0.3 to 9.1.7 (#5149)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-28 11:54:08 +02:00
dependabot[bot]andKen 74cfcef435 ⬆️ Bump @biomejs/biome from 2.4.15 to 2.5.5 (#5148)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-28 11:48:14 +02:00
Copilot 97c8e4a7d9 fix: add explicit permissions to sync_data_with_sanity job in deploy-prod-gcp workflow (#5147)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-07-28 11:34:19 +02:00
Ken c6d33e5dcb fix(website): fix dependency issue 2026-07-28 11:29:56 +02:00
Ken 2f3d5c919f perf(website): optimize memory and cache for website 2026-07-28 11:27:53 +02:00
dependabot[bot]andKen c54d285d33 ⬆️ Bump react-day-picker from 9.14.0 to 10.0.1 (#5143)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-28 10:20:29 +02:00
Ken 85057d7703 chore: date-fns update 2026-07-28 10:02:17 +02:00
dependabot[bot] a2f219f70b ⬆️ Bump @navikt/oasis from 3.2.1 to 4.1.4 (#5141)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-28 09:59:01 +02:00
dependabot[bot]andKen 1ebe0297eb ⬆️ Bump @figma/rest-api-spec from 0.35.0 to 0.41.0 (#5144)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-28 09:58:04 +02:00
dependabot[bot] 8fea6758f6 ⬆️ Bump tsc-alias from 1.8.16 to 1.9.1 (#5146)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 15:28:26 +02:00
Ken 3799489367 fix: fix zod v4 error types 2026-07-27 15:27:41 +02:00
dependabot[bot] 0944a9b3b7 ⬆️ Bump zod from 3.25.76 to 4.4.3 (#5145)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 15:21:29 +02:00
dependabot[bot] 0bb9b6b399 ⬆️ Bump sharp from 0.35.2 to 0.35.3 (#5140)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 15:01:41 +02:00
dependabot[bot] dc25944245 ⬆️ Bump lightningcss from 1.32.0 to 1.33.0 (#5135)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 14:53:57 +02:00
dependabot[bot] 614b5e310c ⬆️ Bump swr from 2.4.1 to 2.4.2 (#5137)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 14:53:01 +02:00
dependabot[bot] c6d527fd7c ⬆️ Bump pino from 8.21.0 to 10.3.1 (#5138)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 14:52:45 +02:00
Ken 145fbbadb0 feat(core): update tokenfilter css 2026-07-27 14:50:07 +02:00
Ken 97fe3a452e feat(core): add support for tags and multiselect 2026-07-27 14:50:07 +02:00
Ken e7608d25bf feat(core): tokenfilter freetext-input 2026-07-27 14:50:06 +02:00
Ken 98284c65ed refactor(core): update propnames tokenfilter 2026-07-27 14:50:06 +02:00
Ken d0e126f4f9 refactor(core): fix tokenfilter bugs 2026-07-27 14:50:06 +02:00
dependabot[bot] f986968c48 ⬆️ Bump vite from 8.0.16 to 8.1.5 (#5139)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 12:42:40 +02:00
dependabot[bot] 6e9adf7614 ⬆️ Bump sharp from 0.35.1 to 0.35.2 (#5134)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 11:20:51 +02:00
Ken a4338b178b chore(website): update react-rx 2026-07-27 11:14:28 +02:00
dependabot[bot] b740ac8601 ⬆️ Bump react-docgen-typescript from 2.2.2 to 2.4.0 (#5125)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 10:57:19 +02:00
dependabot[bot]andKen 8e62aeca68 ⬆️ Bump react-router from 7.18.0 to 8.3.0 (#5133)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-27 10:16:31 +02:00
dependabot[bot] f42730b230 ⬆️ Bump react-responsive-masonry from 2.2.0 to 2.7.2 (#5128)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:54:31 +02:00
dependabot[bot] e6f81f2e1f ⬆️ Bump fast-uri from 3.1.3 to 3.1.4 (#5130)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:53:56 +02:00
dependabot[bot] 5f647cf93f ⬆️ Bump sharp from 0.35.0 to 0.35.1 (#5131)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:53:45 +02:00
dependabot[bot] cbce3048d2 ⬆️ Bump tar from 7.5.21 to 7.5.22 (#5132)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:53:30 +02:00
dependabot[bot] 15f92a748b ⬆️ Bump pino-pretty from 10.3.1 to 13.1.3 (#5126)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:38:04 +02:00
dependabot[bot] b03287d3a7 ⬆️ Bump sharp from 0.33.5 to 0.35.0 (#5124)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:37:58 +02:00
dependabot[bot] ee50d0c558 ⬆️ Bump body-parser from 1.20.4 to 1.20.6 (#5122)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:36:19 +02:00
dependabot[bot] 762f537d3a ⬆️ Bump webpack-dev-server from 5.2.5 to 5.2.6 (#5121)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:36:09 +02:00
dependabot[bot] 7eea822e9c ⬆️ Bump next from 16.2.6 to 16.2.11 (#5120)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:34:27 +02:00
dependabot[bot] 928ca6be51 ⬆️ Bump axios from 1.16.1 to 1.18.1 (#5119)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:34:16 +02:00
dependabot[bot] bfdac6890f ⬆️ Bump commander from 14.0.3 to 15.0.0 (#5114)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:23:27 +02:00
dependabot[bot] d774c15fc9 ⬆️ Bump @navikt/analytics-types from 0.0.7 to 0.0.9 (#5115)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:21:32 +02:00
dependabot[bot] 9cc7ab2ae7 ⬆️ Bump colorjs.io from 0.6.1 to 0.7.0 (#5117)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:20:53 +02:00
dependabot[bot] fd6bc791de ⬆️ Bump postcss-selector-parser from 7.1.1 to 7.1.4 (#5118)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 17:20:22 +02:00
dependabot[bot] 5a6a5225a4 ⬆️ Bump the sanity group with 3 updates (#5113)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 16:48:50 +02:00
Ken 43d5c8fcb4 fix: dependabot workspace resolve fix 2026-07-24 16:41:36 +02:00
dependabot[bot]andKen a45cdd6390 ⬆️ Bump tsx from 4.21.0 to 4.23.1 (#5106)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-24 16:34:10 +02:00
dependabot[bot]andKen 48a38c6ef0 ⬆️ Bump playwright from 1.60.0 to 1.61.1 (#5105)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-24 16:33:18 +02:00
Ken 29feacba0a fix: make dependabot update all workspaces at once 2026-07-24 16:30:48 +02:00
dependabot[bot] 31860d1ca7 ⬆️ Bump stylelint-test-rule-node from 1.1.0 to 1.2.0 (#5104)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 13:54:00 +02:00
dependabot[bot] a8916c14a5 ⬆️ Bump @figma/plugin-typings from 1.130.0 to 1.131.0 (#5107)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 13:53:49 +02:00
dependabot[bot]andKen f7cd660199 ⬆️ Bump concurrently from 9.2.1 to 10.0.3 (#5102)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-24 13:31:17 +02:00
dependabot[bot] 9abb0d51fe ⬆️ Bump @changesets/cli from 2.31.0 to 2.31.1 (#5103)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 13:30:02 +02:00
dependabot[bot] ed02cc40ba ⬆️ Bump rolldown from 1.0.2 to 1.2.0 (#5101)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 13:29:33 +02:00
dependabot[bot]andKen f476d89c42 ⬆️ Bump jscodeshift from 17.3.0 to 17.4.0 (#5100)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-24 13:29:03 +02:00
Ken 4f31888662 fix: fix dependabot docker config 2026-07-24 12:23:32 +02:00
dependabot[bot] a35ae0881d ⬆️ Bump react-router from 7.15.1 to 7.18.0 (#5098)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:16:09 +02:00
dependabot[bot] b494fd686f ⬆️ Bump js-yaml from 5.2.1 to 5.2.2 (#5097)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:15:38 +02:00
dependabot[bot] d903b6401e ⬆️ Bump fast-uri from 3.1.2 to 3.1.3 (#5088)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:08:14 +02:00
dependabot[bot] 7acab5259e ⬆️ Bump fast-xml-parser from 5.10.0 to 5.10.1 (#5089)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:08:05 +02:00
dependabot[bot] 9e5c3fa279 ⬆️ Bump hono from 4.12.25 to 4.12.30 (#5090)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:07:56 +02:00
dependabot[bot] 90e3f8d53f ⬆️ Bump tar from 7.5.20 to 7.5.21 (#5091)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:07:48 +02:00
dependabot[bot] 1f0077a210 ⬆️ Bump ws from 7.5.11 to 7.5.12 (#5092)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:07:32 +02:00
dependabot[bot] 884dea8c19 ⬆️ Bump svgo from 3.3.3 to 3.3.4 (#5093)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:07:23 +02:00
dependabot[bot] 008f8e8655 ⬆️ Bump dompurify from 3.4.11 to 3.4.12 (#5094)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:07:15 +02:00
dependabot[bot] 035571ec5e ⬆️ Bump linkify-it from 5.0.1 to 5.0.2 (#5095)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-24 12:06:59 +02:00
Ken 095d6fb4f5 Nextjs cache-components (#5087) 2026-07-23 12:30:05 +02:00
Ken c908466b52 feat: skill next-cache-component-adoption 2026-07-22 10:22:15 +02:00
dependabot[bot] d82d5036c4 ⬆️ Bump brace-expansion from 1.1.14 to 1.1.16 (#5081)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-21 15:24:20 +02:00
dependabot[bot] 5b7b528080 ⬆️ Bump adm-zip from 0.5.17 to 0.6.0 (#5080)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-21 15:23:54 +02:00
dependabot[bot]andKen d93adb00d6 ⬆️ Bump actions/setup-node from 6 to 7 in the actions group (#5079)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-21 15:22:47 +02:00
dependabot[bot] 5f6894116a ⬆️ Bump chromatic from 15.1.0 to 18.0.1 (#5078)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-21 15:21:23 +02:00
Ken 8cc7a185ee chore(core): update floating-ui deps 2026-07-21 15:19:49 +02:00
Ken dfe8ed9fe2 chore: update tar 2026-07-21 15:16:30 +02:00
73a211a22a ⬆️ Bump the vitest group across 1 directory with 5 updates (#5075)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-21 15:15:05 +02:00
KenandCopilot Autofix powered by AI 700239f080 refactor(website): Cleanup of legacy components/types no longer used (#5084)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-21 14:23:04 +02:00
Ken b81d2a8427 chore(website): update playroom to 1.3.0 2026-07-21 14:11:18 +02:00
KenandCopilot Autofix powered by AI cf93e2452c Extracted studio to separate dir (#5083)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-21 13:40:23 +02:00
Ken 280a722f45 fix(website): removed duplicate sitemap entry 2026-07-21 12:39:55 +02:00
Ken 1cda5fc3f1 refactor(website): improved typegen and auth for sanity (#5073) 2026-07-17 10:02:27 +02:00
Ken 941810966c refactor(website): sanity structure display (#5072) 2026-07-17 10:02:16 +02:00
Ken c31f5da9c2 feat: added sanity skills 2026-07-17 08:38:43 +02:00
Ken 0c48dc3f75 chore: removed unused dep tanstack table 2026-07-17 08:29:00 +02:00
Ken 86969e7270 chore(core): removed unused dependency @tanstack/react-table 2026-07-17 08:29:00 +02:00
dependabot[bot] 1ed1bce97b ⬆️ Bump websocket-driver from 0.7.4 to 0.7.5 (#5070)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-17 08:17:38 +02:00
Ken 4c01a2fd9a chore(core): moved panel to legacy dir 2026-07-16 19:42:16 +02:00
KenandCopilot Autofix powered by AI 05c5fe71c2 Linting cleanup (#5071)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-16 19:40:02 +02:00
Ken c961c2dcc1 perf(core): memorization in provider 2026-07-15 16:09:00 +02:00
Ken 4100aad964 refactor(core): all stories are now pascalcase (#5069) 2026-07-15 16:02:26 +02:00
Ken 0212302041 refactor(core): simplified react tsc build (#5068) 2026-07-15 12:33:39 +02:00
Ken 227e5d313e perf(core): optimized baseprimitive render by 1.5-2x (#5066) 2026-07-15 10:18:09 +02:00
Ken efa4f05c56 perf(core): optimized Slot 2026-07-14 12:49:50 +02:00
Ken 5f8acb0115 refactor(core): re-structure Box primitive 2026-07-14 11:39:48 +02:00
Ken b9a8552b9c refactor(core): alert-setup re-structure (#5065) 2026-07-14 11:14:01 +02:00
Ken fe329758b8 feat(core): auto-scale column-width based on document font-size (#5054) 2026-07-14 10:38:07 +02:00
KenandCopilot Autofix powered by AI ef3cefef48 refactor(core): Multiple component re-structures (#5064)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-13 16:30:48 +02:00
KenandCopilot Autofix powered by AI d704993906 refactor(ActionMenu): Re-structure component (#5063)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-13 16:12:59 +02:00
6be6328ef1 ⬆️ Bump fuse.js from 7.4.1 to 7.4.2 (#5062)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-13 11:38:58 +02:00
5edae5d4f3 ⬆️ Bump js-yaml from 4.1.1 to 5.2.1 (#5061)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-07-13 11:37:15 +02:00
dependabot[bot]andKen ad095960cc ⬆️ Bump @figma/plugin-typings from 1.128.0 to 1.130.0 (#5060)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-07-13 11:33:24 +02:00
dependabot[bot]andKen d1720010a9 ⬆️ Bump lint-staged from 16.4.0 to 17.0.8 (#5059)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-07-13 11:31:40 +02:00
dependabot[bot]andKen 9d96e4db0e ⬆️ Bump stylelint from 17.9.0 to 17.14.0 (#5058)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-07-13 11:29:44 +02:00
Ken 875c5fcc84 refactor(Accordion): Update structure and import/exports (#5057) 2026-07-13 11:27:11 +02:00
Ken 1fb3064f30 chore: sync refactor skill 2026-07-10 18:55:44 +02:00
Ken 9506e93017 refactor(core): removed legacy docgen implementation 2026-07-10 13:10:22 +02:00
KenandCopilot Autofix powered by AI bdaeac40e7 refactor(website): Clean up legacy props (#5056)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-10 12:21:00 +02:00
Ken 5fcbe84cb9 feat(website): theme-component examples 2026-07-10 11:29:46 +02:00
Ken 52536bea07 feat(website): added utilities as a category for komponenter 2026-07-10 09:43:52 +02:00
KenandCopilot Autofix powered by AI f23a389861 feat(website): Use new metadata link to render prop (#5055)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-09 19:04:09 +02:00
github-actions[bot] dcc69da50b Version Packages (#5038)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-09 09:27:24 +02:00
KenandCopilot Autofix powered by AI c61bd21b84 feat: New props/metadata link between react -> website (#5052)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-09 09:26:51 +02:00
Ken f08b1d7efe feat(website): add umami tracking to new contact cards 2026-07-08 15:22:03 +02:00
Ken a78e161a99 chore(core): small text-updates to ds-docs update skill 2026-07-07 09:17:10 +02:00
Ken 34ecb612dd fix(website): sanity cleanup 2026-07-07 08:57:34 +02:00
KenandCopilot Autofix powered by AI eaa280b995 [Website] Updated header and footer section for ds-pages (#5051)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-06 16:36:32 +02:00
Ken 2cf8586fc4 fix(core): fix broken type import 2026-07-06 14:16:05 +02:00
Ken 9a660af27c fix(core): fix broken react-build after tsconfig update 2026-07-06 14:14:20 +02:00
Ken f7361957b6 feat(website): added dates to articles on produktbloggen frontpage after feedback 2026-07-06 14:10:42 +02:00
dependabot[bot] cc0572d9ff ⬆️ Bump @vitejs/plugin-react from 6.0.1 to 6.0.3 (#5046)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 11:41:19 +02:00
dependabot[bot] d92b812604 ⬆️ Bump browserslist from 4.28.2 to 4.28.4 (#5045)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 11:40:55 +02:00
dependabot[bot] bb768c7c40 ⬆️ Bump globals from 17.6.0 to 17.7.0 (#5043)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-06 11:40:36 +02:00
KenandCopilot Autofix powered by AI cce5ac1631 feat(website): added args linter for examples (#5042)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-06 11:40:01 +02:00
Ken c53714148f perf(i18n): optimize useI18n hook (#5037) 2026-07-06 11:17:00 +02:00
Ken 26c1a5635f Summer cleanup (#5049) 2026-07-06 11:13:07 +02:00
Ken 662e4fef66 feat(core): new icons timeline (#5050) 2026-07-06 11:10:53 +02:00
82f086423a [Datagrid] Preferences component (#5030)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-07-03 10:27:24 +02:00
dependabot[bot] f2180d4265 ⬆️ Bump json-2-csv from 5.5.10 to 5.5.11 (#5040)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-03 10:02:07 +02:00
Ken e3c6ebb0d7 feat(workspace): Removed example-dir, added web-component decorator to SB (#5041) 2026-07-03 09:59:39 +02:00
Halvor Haugan 5156c07140 chore(biome): activate rule useImportType (#5039) 2026-07-02 12:00:29 +02:00
KenandHalvor Haugan e6dd922d8c feat(tailwind): Tw v4 config (#5036)
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-07-01 13:43:13 +02:00
Ken 69f137e01e chore(core): clean up legacy _mappings implementation (#5035) 2026-07-01 12:33:10 +02:00
016cfd8e2b personvernerklaering: bytt Umami med Innblikk (#4965)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-06-30 14:19:16 +02:00
dependabot[bot]andKen bf22d22271 ⬆️ Bump the vitest group across 1 directory with 4 updates (#5027)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-06-30 14:10:55 +02:00
dependabot[bot] 2be954d706 ⬆️ Bump the storybook group with 9 updates (#5026)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 14:08:47 +02:00
dependabot[bot] e657befeba ⬆️ Bump http-proxy-middleware from 2.0.9 to 2.0.10 (#5034)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 14:07:01 +02:00
dependabot[bot]andKen 73bb87ce03 ⬆️ Bump @sanity/client from 7.22.1 to 7.23.0 in the sanity group (#5025)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-06-30 13:57:07 +02:00
Ken 7f1111d110 [Lookup] Focus border, text-decoration and example update (#5032) 2026-06-30 13:14:37 +02:00
Ken 8e00ffab9d fix: 4px gap for small inlinemessage (#5031) 2026-06-30 13:11:46 +02:00
dependabot[bot] de4b01bd80 ⬆️ Bump tsdown from 0.22.0 to 0.22.3 (#5028)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-30 12:46:59 +02:00
Halvor Haugan 88ca846ebd feat(Listbox): put id and setter in context + remove id prop (#5033) 2026-06-30 12:44:58 +02:00
Halvor Haugan fb4b5b5dde feat(Listbox): unique aria-activedescendant + remove memoization + require aria-selected (#5019) 2026-06-30 09:19:58 +02:00
Halvor Haugan c7e9d9e3b8 fix(website): fix typo in Lookup examples 2026-06-26 16:57:40 +02:00
Anniken Granberg e8198281a5 fix(website) Add minHeight and static to Lookup examples (#5024) 2026-06-26 14:53:24 +02:00
dependabot[bot] a60c9537de ⬆️ Bump dompurify from 3.4.10 to 3.4.11 (#5022)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-26 14:13:17 +02:00
Anniken Granberg eb3c8c92c0 fix(Website): Description not showing for examples (#5023) 2026-06-26 13:39:15 +02:00
github-actions[bot] a9a5d63fa3 Version Packages (#5020)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-26 12:03:29 +02:00
3997c043a4 New component: Lookup (#4998)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-26 11:51:00 +02:00
Halvor Haugan 0bee88138e feat(Intro template): remove list item, adjust description, adjust example (#4988) 2026-06-25 16:02:16 +02:00
Ken 7f5b4da4c9 fix: sanity dataset export is now less strict when verifying assets 2026-06-25 10:44:22 +02:00
KenandCopilot Autofix powered by AI 0f7292b02c fix(Table): Content now shows when using ExpandableRows with React.Activity + React.Strictmode (#5018)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-25 10:41:13 +02:00
dependabot[bot]andKen d216f0264f ⬆️ Bump react-dom from 19.2.6 to 19.2.7 in the react group across 1 directory (#5002)
* ⬆️ Bump react-dom in the react group across 1 directory

Bumps the react group with 1 update in the / directory: [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom).


Updates `react-dom` from 19.2.6 to 19.2.7
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.7/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-version: 19.2.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: react
...

Signed-off-by: dependabot[bot] <support@github.com>

* update(deps): react and react-dom 19.2.7

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-06-23 13:09:50 +02:00
Halvor Haugan d39fa801f8 [website] Migrate to useVisualEditingEnvironment() (#5009) 2026-06-23 12:11:28 +02:00
dependabot[bot] 6fc03c2b28 ⬆️ Bump launch-editor from 2.13.2 to 2.14.1 (#5015)
Bumps [launch-editor](https://github.com/vitejs/launch-editor) from 2.13.2 to 2.14.1.
- [Commits](https://github.com/vitejs/launch-editor/compare/v2.13.2...v2.14.1)

---
updated-dependencies:
- dependency-name: launch-editor
  dependency-version: 2.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 11:44:48 +02:00
Halvor Haugan 00a4ade5f3 ds-css: refactor how unwated lightningcss-variables are removed (#5012) 2026-06-23 10:32:34 +02:00
Halvor Haugan b40a1e11c4 Storybook: Use resolve.tsconfigPaths built into Vite instead of plugin (#5013) 2026-06-23 10:16:28 +02:00
Ken fda3acb0bc fix(website): No longer scroll to examples when they are allready in view 2026-06-22 15:02:24 +02:00
Halvor Haugan cbcea0a102 Upgrade to Sanity 6 (#5000) 2026-06-22 14:50:19 +02:00
Halvor Haugan d808fb23d2 ⬆️ Bump tar to 7.5.16 2026-06-22 12:59:19 +02:00
dependabot[bot]andHalvor Haugan 43ed97f15d ⬆️ Bump form-data from 4.0.5 to 4.0.6 (#5008)
* ⬆️ Bump form-data from 4.0.5 to 4.0.6

Bumps [form-data](https://github.com/form-data/form-data) from 4.0.5 to 4.0.6.
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.5...v4.0.6)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* sync versions of hasown

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-06-22 12:56:24 +02:00
Halvor Haugan 9e2f4c5477 ⬆️ Bump undici to 6.27.0/7.28.0 2026-06-22 12:51:40 +02:00
dependabot[bot] 4cf9343a39 ⬆️ Bump actions/checkout from 6 to 7 in the actions group (#5005)
Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 12:16:23 +02:00
github-actions[bot] b475b34aa1 Version Packages (#5010)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-22 12:15:33 +02:00
Ken 619ed83c8c 🔥 removed legacy pkg types package 2026-06-22 11:53:01 +02:00
KenandHalvor Haugan 97b3ee0399 [Combobox] 🎉 Selected options are now persistent in dropdown for single-select (#4970)
* 🎉 Selected options are now persistent in dropdown for single-select combobox

* 🎉 Persistent rendering of selected single item when possible

* Update @navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-22 11:50:45 +02:00
dependabot[bot] 3a99edbf7c ⬆️ Bump dompurify from 3.4.9 to 3.4.10 (#5007)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.9 to 3.4.10.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.9...3.4.10)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 10:02:20 +02:00
dependabot[bot] 18c1ad1b5f ⬆️ Bump webpack-dev-server from 5.2.4 to 5.2.5 (#5006)
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.2.4 to 5.2.5.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.2.4...v5.2.5)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-version: 5.2.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 10:02:02 +02:00
dependabot[bot] e8dc35385a ⬆️ Bump @vitest/eslint-plugin in the vitest group (#5003)
Bumps the vitest group with 1 update: [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest).


Updates `@vitest/eslint-plugin` from 1.6.19 to 1.6.20
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.6.19...v1.6.20)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.20
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 09:30:02 +02:00
dependabot[bot] 8640bc23cb ⬆️ Bump dompurify from 3.4.1 to 3.4.9 (#4993)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.1 to 3.4.9.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.1...3.4.9)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 13:22:44 +02:00
dependabot[bot]andHalvor Haugan 2dfbf56f41 ⬆️ Bump @babel/core from 7.29.0 to 7.29.7 (#4990)
* ⬆️ Bump @babel/core from 7.29.0 to 7.29.7

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.29.0 to 7.29.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* sync versions

* sync more versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-06-19 13:21:28 +02:00
dependabot[bot] 7b641c78f5 ⬆️ Bump ws from 7.5.10 to 7.5.11 (#4992)
Bumps [ws](https://github.com/websockets/ws) from 7.5.10 to 7.5.11.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.10...7.5.11)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 7.5.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 13:20:41 +02:00
dependabot[bot] 0a15f2f548 ⬆️ Bump undici from 6.25.0 to 6.26.0 (#4999)
Bumps [undici](https://github.com/nodejs/undici) from 6.25.0 to 6.26.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.25.0...v6.26.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.26.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 13:17:21 +02:00
dependabot[bot] 2ad432017c ⬆️ Bump hono from 4.12.23 to 4.12.25 (#4991)
Bumps [hono](https://github.com/honojs/hono) from 4.12.23 to 4.12.25.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.23...v4.12.25)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.25
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 13:15:37 +02:00
dependabot[bot] 931c15b674 ⬆️ Bump markdown-it from 14.1.1 to 14.2.0 (#4989)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.1 to 14.2.0.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.1...14.2.0)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-19 13:03:42 +02:00
Ken cd1c63c5da 🎉 Added dekoratøren to sanity komponent grouping (#4994) 2026-06-19 12:39:57 +02:00
Ken d04e2d1674 [MCP] Search improvements (#4996)
* 🎉 Use fuzzy search for migrations and tokens

* ⚡ Use fuzzy token-search

* 📝 Docs improvements

* 📝 Update comments

* ⚡ Fuzzy icon-seach

* ⚡ Stricter icon-filter

* 🐛 Add limit to migrations
2026-06-19 09:01:06 +02:00
0694c147c4 [MCP] Implement fuse search functionality for aksel_find_docs (#4967)
* 📝 Add review

* 📝 update review

* 📝 Add deps

* 🎉 Set up fuse search

* 🎉 working fuse-search

* 📝 Update description

* 📝 Update zod params

* 📝 Update review

* Add secret

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 🐛 Fix caching, revert contract

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 🐛 Add outbound for sanity api

* 🐛 Handle no text case

* Update mcp-server/.nais/app.yaml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update mcp-server/src/helpers/fetch-ds-docs.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Update docs based on review

* 📝 Add different answer based on if search fails or returns empty

* 🐛 Sync fusejs versions

* 📝 Norwegian categories

* ⚡ Use minMatchCharLength for schema, rely on treshold

* Update mcp-server/src/helpers/fuse-search.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-17 12:52:37 +02:00
dependabot[bot]andKen f73f93e9fb ⬆️ Bump @babel/core from 7.29.0 to 7.29.7 (#4980)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.29.0 to 7.29.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-16 15:12:40 +02:00
dependabot[bot]andKen e9ed1a37a6 ⬆️ Bump tar from 7.5.13 to 7.5.16 (#4981)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.13 to 7.5.16.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.13...v7.5.16)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.16
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-16 15:11:31 +02:00
dependabot[bot]andKen b453907cb7 ⬆️ Bump vite from 7.3.3 to 7.3.5 (#4982)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.3.3 to 7.3.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v7.3.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.3.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-16 15:11:08 +02:00
dependabot[bot]andKen 9e2180f91e ⬆️ Bump markdown-it from 14.1.1 to 14.2.0 (#4983)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.1 to 14.2.0.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.1...14.2.0)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-16 15:10:18 +02:00
dependabot[bot] cbfb17aae8 ⬆️ Bump dompurify from 3.4.1 to 3.4.8 (#4984)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.4.1 to 3.4.8.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.4.1...3.4.8)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-16 15:09:44 +02:00
dependabot[bot]andKen 1f676f87c9 ⬆️ Bump react-router from 7.15.0 to 7.15.1 (#4985)
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.15.0 to 7.15.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.15.1/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.15.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-16 15:09:14 +02:00
dependabot[bot]andKen 3e17ef1fd5 ⬆️ Bump ws from 7.5.10 to 7.5.11 (#4986)
Bumps [ws](https://github.com/websockets/ws) from 7.5.10 to 7.5.11.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.5.10...7.5.11)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 7.5.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-16 15:08:39 +02:00
Ken d6e1150cbf 🐛 Hide storybook performance panel in chromatic 2026-06-16 15:02:20 +02:00
Ken 7ff390722f 🐛 Default checkboxes in publishingflow to checked for gp-articles 2026-06-16 14:50:41 +02:00
Ken 40e6652d08 ⚰️ Removed legacy meta.json implementation for changelogs 2026-06-16 14:49:13 +02:00
Ken 6f7f8148cb [website] 🐛 Add margin between exampletext-block 2026-06-16 10:33:14 +02:00
Ken afbf6c8367 🧪 Skip regression-tests for dependabot to avoid error 2026-06-16 09:43:20 +02:00
KenandHalvor Haugan 487ec580af [Endringslogg] Render on DS-pages (#4964)
* 🎉 Initial changelog-render

* 🎉 Render changelogs inline for ds-pages

* 🐛 Remove drafts from ids

* 🐛 Change back to prod

* 🐛 Use umami-links, correct prefix

* 🎉 Review and UmamiLink update

* Update aksel.nav.no/website/sanity/config.ts

* 🐛 Fixed type-error

* ⚡ Remove redundant optimization

* 💄 Adjustments to table layout

* 💄 10 -> 7rem th width for date

* Render endringslogg gp (#4966)

* 📝 gp-changelogs

* 📝 Text adjustments

* 🐛 Use correct type

* 🎉 Changelog article

* 🎉 Added intercepting routes

* 🎉 Update layout

* 🎉 Extract changelog utils

* todos

* 🚚 Move intercepted route

* 🚚 Moved intercepting routes

* 🐛 Fix intercepting routes

* 🎉 Added link when changelog exists

* 🐛 Change back to prod

* Update aksel.nav.no/website/app/(routes)/(designsystemet)/@endringslogg/(.)grunnleggende/endringslogg/[slug]/page.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 removed old query-fields

* Update aksel.nav.no/website/app/(routes)/(designsystemet)/grunnleggende/endringslogg/[slug]/page.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Handle back/routing better

* 🏷️ Type update

* 🐛 Fix syntax bug

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-16 09:35:09 +02:00
github-actions[bot] 26ea51253d Version Packages (#4969)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-16 09:31:51 +02:00
a153926a2e [AnimateHeight] 🐛 Table and AnimateHeight now works with React.Activity (#4972)
* 🐛 Table and AnimateHeight now works with React.Activity

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Update .changeset/empty-doodles-hunt.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🚚 Moved activity test story

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-16 09:29:33 +02:00
Halvor Haugan 5493a3155a [website] Fix error messages on missing tokens 2026-06-15 15:27:52 +02:00
Halvor Haugan 687bc8f5b8 Sanity: Add description for "Preview" status (#4973) 2026-06-15 15:04:42 +02:00
Ken f3b7857df4 [Icons] 🎉 Added new icons for eiendom (#4979)
* 🎉 Added new icons for eiendom

* 🐛 Fix width
2026-06-15 14:52:02 +02:00
dependabot[bot]andKen 7c0724ecaf ⬆️ Bump the vitest group with 4 updates (#4976)
* ⬆️ Bump the vitest group with 4 updates

Bumps the vitest group with 4 updates: [@vitest/browser](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser), [@vitest/browser-playwright](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/browser` from 4.1.7 to 4.1.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/browser)

Updates `@vitest/browser-playwright` from 4.1.7 to 4.1.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/browser-playwright)

Updates `@vitest/coverage-v8` from 4.1.7 to 4.1.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/coverage-v8)

Updates `vitest` from 4.1.7 to 4.1.8
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.8/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/browser"
  dependency-version: 4.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/browser-playwright"
  dependency-version: 4.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 4.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Sync vitest versions across workspace

* 📝 Sync yarn

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-06-15 14:50:35 +02:00
dependabot[bot] c6d0557ff4 ⬆️ Bump @figma/plugin-typings from 1.125.0 to 1.128.0 (#4978)
Bumps [@figma/plugin-typings](https://github.com/figma/plugin-typings) from 1.125.0 to 1.128.0.
- [Commits](https://github.com/figma/plugin-typings/compare/v1.125.0...v1.128.0)

---
updated-dependencies:
- dependency-name: "@figma/plugin-typings"
  dependency-version: 1.128.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 14:50:11 +02:00
dependabot[bot] bf142f2c25 ⬆️ Bump clipboardy from 5.0.1 to 5.3.1 (#4977)
Bumps [clipboardy](https://github.com/sindresorhus/clipboardy) from 5.0.1 to 5.3.1.
- [Release notes](https://github.com/sindresorhus/clipboardy/releases)
- [Commits](https://github.com/sindresorhus/clipboardy/compare/v5.0.1...v5.3.1)

---
updated-dependencies:
- dependency-name: clipboardy
  dependency-version: 5.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 12:32:55 +02:00
Ken 59a6e9eb32 🐛 Add waitFor allowing flaky dismissablelayer tests to pass 2026-06-15 10:39:46 +02:00
Ken 7acd2a4416 [Timeline] Fix Axislabel calculation (#4968)
* 🐛 Handle overflow more gracefully

* ⚡ Optimize re-renders

* ⚡ Optimize timeline axis calculation

* 🐛 Fix overflow and sorting

* 🐛 Handle numer infinity issues

* 🐛 Fix case where left:0 returned null for period
2026-06-12 12:51:33 +02:00
Ken 386cbcbd1d [Datagrid] Column divider settings (#4963)
* 💄 Added columnDividers prop

* 📝 Changeset

* 📝 Update example

* 🎉 Added columnDividers to kitchensink demo
2026-06-12 09:12:31 +02:00
Ken d30f4c8077 🐛 Fix flaky storybook story by disabling performance panel in chromatic 2026-06-12 08:19:47 +02:00
KenandHalvor Haugan e6fdbdfcd9 [Endringslogg] Clean up legacy code, fix draft + published view (#4961)
* 🐛 Only render changelogs that are published

* 🎉 Clean up fremhevet code

* Update aksel.nav.no/website/app/(routes)/(designsystemet)/grunnleggende/endringslogg/_ui/LogEntry.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 removed legacy spacing

* 🐛 Fix spacing

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-11 08:36:31 +02:00
github-actions[bot] e1654c08da Version Packages (#4962)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-09 20:21:05 +02:00
KenandCopilot Autofix powered by AI 7ede1a7a32 [Timeline] Axislabel overflow (#4959)
* 🐛 Axis-labels no longer render if width + left > 100%

* Clip overflow label

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 🐛 Add more affordance

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-09 18:39:01 +02:00
Ken a1b573a6f2 [Timeline] Axislabel story 2026-06-09 18:38:05 +02:00
Ken 1a1b7cf59e 🐛 Fix Chips docgen 2026-06-09 15:03:28 +02:00
Ken 0e9547ecab [Datagrid] Fixed shadow bug (#4960)
* 💄 Fix shadow/zebra issues

* 📝 changeset
2026-06-09 14:01:42 +02:00
Ken 5778d83765 📝 Update ds-component-restructure skill based on review 2026-06-09 13:08:38 +02:00
KenandHalvor Haugan 62a3be3a49 [LLM] Skill for re-structuring and refactoring components (#4934)
* 🎉 Chips refactor and skill

* 🔥 removed lowercase story

* Update .github/skills/ds-component-restructure/SKILL.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🎉 Review updates

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-09 13:04:07 +02:00
ba3ee03d58 [Endringslogg] Sanity-structure for new changelog on God praksis (#4945)
* 🎉 New document for gp endringslogg

* 🎉 Edit document

* 🎉 Add document resolver

* 📝 Updated schema

* 🎉 Added render of all changelogs for article

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 🎉 Review fixes

* 📝 Added changelog view to ds articles

* Update aksel.nav.no/website/sanity/schema/custom-components/gp/EndringsloggReferanser.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 removed skrivehjelp

* 🐛 Update gp view filter based on use-context

* [Endringslogg] Publiseringsflyt og templates (#4949)

* 🎉 New flow for updating date and creating changelogs

* 🎉 Publication-flow with new document creation for changelog

* 🎉 Branched changelog based on doctype

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 📝 Updated blueprint

* Update aksel.nav.no/website/sanity/plugins/publication-flow/actions/lastVerified.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/sanity/plugins/publication-flow/actions/lastVerified.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 💄 default to not updating verifiedDate for ds-articles

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update mcp-server/.nais/app.yaml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-09 13:03:20 +02:00
github-actions[bot] 59ebc666cf Version Packages (#4928)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-09 10:09:34 +02:00
Ken 992a955aa6 [Datepicker] Ranged logic refactor (#4896)
* 🎉 Set up needed data for from/to choices

* 🎉 Added reset-logic

* 📝 Changeset

* 🐛 Fix correct test-scenario

* 🚚 inputType -> callerName

* 🎉 Review changes

* 📝 Update changeset

* 🔥 Removed legacy comment

* 🔥 Reverted resetOnSelect prop
2026-06-09 09:54:05 +02:00
f79f054c9d [Website] Update stats cards on /designsystemet. Now fetches data from BQ on deploy (#4957)
* 🎉 Better statistics for major-version

* 🎉 Added upload to sanity

* 🎉 Stats-cards

* 🎉 Stats card

* 🎉 Added templates

* 🐛 Narrow time-check

* 🎉 Better validation of data

* 🎉 Add GCP creds to action

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 💄 Update number formatting

* Update aksel.nav.no/website/app/(routes)/(designsystemet)/designsystemet/_ui/stats/DesignsystemStats.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ Use smaller table as timestamp reference

* 🚚 Query -> queries

* 📝 Move comments

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-09 09:53:53 +02:00
Halvor Haugan 6a6aab1104 [website] Fix issue with DS sidebar active marking (#4958) 2026-06-09 09:29:00 +02:00
Ken f6d965dfd0 [MCP] Update origins 2026-06-08 13:21:33 +02:00
Ken d967139925 [MCP] Fix nais-cinfig formatting 2026-06-08 12:56:12 +02:00
Ken c7b031cc65 [MCP] Update ingress to prod-gcp without ansatt 2026-06-08 12:45:18 +02:00
Ken 868901fc43 [MCP] Update readme 2026-06-08 11:22:40 +02:00
Ken 70cd115530 🐛 Sync updated package workspace 2026-06-08 11:20:15 +02:00
Ken 9057e5db03 [MCP] Rename from aksel-mcp-server -> aksel-mcp 2026-06-08 11:19:12 +02:00
Ken aac0bd903e [MCP-server] Bump version-number to 1.0 2026-06-08 11:17:03 +02:00
58b87ef6d2 [MCP] Rewrite from npm-package -> server (#4938)
* MCP buider skill

* 📝 Added plan and prompts

* 📝 Update plan

* 📝 MCP http server

* ⚡ Caching

* 🐛 Update config

* 🎉 Add metrics

* 🎉 Added logs

* 🔥 Removed time taken metric

* 🎉 Simplify setup

* ⚡ Re-add time taken metric

* 📝 Add more logging

* Dockerfile

* 🎉 Fix build

* unfo formatting

* 📝 Update yamls

* 🚚 Move config inline

* unfo formatting

* 🎉 Added mcp deploy action

* 🔥 Removed old server

* 🔥 removed skills and prompts

* 🐛 Re-added tests

* 📝 Added readme

* 🐛 Move server creating into request

* 📝 yarn sync

* 📝 Sync zod

* ⚡ Update origin check

* 🔒 Sec changes

* 🐛 Mcp intern ingress -> ansatt

* [MCP] Updates to remote MCP-server (#4946)

* 📝 Review One

* ⚡ Avoid schema bloat

* 🐛 Add timeout to fetch

* 🐛 Use zod-limit

* 🚚 Full renaming of APIs

* 🎉 Add future possibility for examples

* ⚡ Avoid pretty-printing

* ⚡ Reduce noise in doc return

* 🐛 Fix review findings

* 🔥 removed review files

* 📝 Update readme

* 📝 Comments

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* ⚡ Simplify stringify

* 🎉 Added inspect script

* Apply suggestions from code review

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🚚 Rename category lookup

* 📝 Update example description

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-08 10:23:16 +02:00
dependabot[bot] 8bbf44bd87 ⬆️ Bump hono from 4.12.18 to 4.12.23 (#4947)
Bumps [hono](https://github.com/honojs/hono) from 4.12.18 to 4.12.23.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.18...v4.12.23)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-08 09:45:27 +02:00
dependabot[bot] 173baf612f ⬆️ Bump @vitest/eslint-plugin in the vitest group (#4954)
Bumps the vitest group with 1 update: [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest).


Updates `@vitest/eslint-plugin` from 1.6.17 to 1.6.19
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.6.17...v1.6.19)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-08 09:44:27 +02:00
dependabot[bot] 4b2098e89a ⬆️ Bump vite-plugin-svgr from 4.5.0 to 5.2.0 (#4956)
Bumps [vite-plugin-svgr](https://github.com/pd4d10/vite-plugin-svgr) from 4.5.0 to 5.2.0.
- [Release notes](https://github.com/pd4d10/vite-plugin-svgr/releases)
- [Commits](https://github.com/pd4d10/vite-plugin-svgr/compare/v4.5.0...v5.2.0)

---
updated-dependencies:
- dependency-name: vite-plugin-svgr
  dependency-version: 5.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-08 09:43:27 +02:00
Ken 3d5758b90e 🐛 Fix type-guarding causing sentry to give warnings (#4950) 2026-06-08 09:40:46 +02:00
dependabot[bot] f1e8f8c9a0 ⬆️ Bump prettier from 3.8.1 to 3.8.3 (#4955)
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.1 to 3.8.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.1...3.8.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-08 09:39:49 +02:00
Halvor HauganandCopilot Autofix powered by AI 86f7b9e716 [website] Adjust descs on LinkCard examples (#4951)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-08 09:05:49 +02:00
Halvor Haugan 6bade9bf7d [website] Fix alignment of CopyButton in ExampleText (#4952) 2026-06-08 09:05:10 +02:00
Ken 8be81860b2 [DataGrid] Update detail-panel demo 2026-06-05 11:54:21 +02:00
Ken 9803cc2163 🎉 Print if article is published or updated 2026-06-05 08:49:44 +02:00
dependabot[bot] 3ecdce8a0c Bump tmp from 0.2.5 to 0.2.7 (#4942)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.5...v0.2.7)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-04 17:22:02 +02:00
Halvor Haugan 2eaf46c1bf [Storybook] Add performance addon (#4944) 2026-06-04 13:47:01 +02:00
Halvor Haugan 53da26defd Fix DataGrid resize story for real 2026-06-04 13:44:03 +02:00
Ken 5274ade01d 🐛 Fix flaky data-grid resize story 2026-06-04 12:52:03 +02:00
Ken dcd7b4053c 📝 Update review skill 2026-06-04 12:01:01 +02:00
dependabot[bot] df15b18766 Bump react-router from 7.14.2 to 7.15.0 (#4941)
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.14.2 to 7.15.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.15.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.15.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-04 10:10:29 +02:00
Ken 31b44db871 🔥 Removed virtualfocus-code (#4940) 2026-06-04 08:08:08 +02:00
bae5fa9793 [Tabs] Refactored to not use descendants API (#4931)
* 🎉 Rewrite tabs to not use descendants

* 📝 changeset

* 🎉 Added tests

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 📝 Rename to rovingFocus

* 🔥 Removed fallback to activeElement, handle no current

* [ToggleGroup] Refactored to not use descendants API (#4932)

* 🎉 Updated ToggleGroup to not use descendants API

* ♻️ Update rovingFocus and fallback

* [ActionMenu] Refactored to not use descendants API  (#4933)

* 🎉 Updated ActionMenu to not use descendants API

* ♻️ Cleanup after roving rename

* 🐛 Update event-handler for close-submenu listener

* Update @navikt/core/react/src/utils/components/floating-menu/Menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-03 15:12:38 +02:00
Halvor Haugan 8573dcb594 [website] Update FileUpload example "too-many-files" according to Figma (#4939) 2026-06-03 14:08:30 +02:00
Anniken Granberg d3fedc54ff ActionMenu: Fix reference to wrong component in size example description (#4937)
* ActionMenu: Fix reference to wrong component in size example description

* ops wrong component
2026-06-03 11:15:31 +02:00
Halvor Haugan e2715ae976 Update console.log() in ActionMenu.stories.tsx 2026-06-02 12:03:11 +02:00
Ken 3dd63ddc8b 🔥 Removed readme skill 2026-06-02 11:45:33 +02:00
Ken 34ab9ab3cf 📝 Added README for mcp-server, fixed changeset config 2026-06-02 11:28:42 +02:00
KenandHalvor Haugan bcef7eae23 [MCP] Aksel mcp package (#4900)
* ✨ Boilerplate

* ✨ Initial test-script

* 📝 Add inspector

* 🎉 Working MCP-script

* 🎉 Refactor tool creation, added tests

* 🐛 Fix tsconfig include, update test script

* 🎉 Add genetic shutdown callback for telemetry

* 🎉 Added prompts handling

* 🎉 Added resouced

* 🎉 Added docs resource

* 🎉 Added working resource and tool to fetch aksel-docs

* 🏷️ Rename index files  -> dir names

* ♻️ Simplify return-type

* 📝 Rename mcp.json -> .mcp.json

* Sync packages

* 📝 Added spec

* 📝 Update spec

* 🎉 Added token-docs mcp resource

* 🎉 Added token resource and list

* 🎉 Added tool lookup for icons

* 📝 Update spec

* [CLI] Export parsed docs for migrations

* [LLM] Added migration guide tool

* 🔥 Remove prev migration implementation

* 🎉 Added migrations tool

* 🎉 Added props tool

* 📝 Lock sync

* 🔒 Improve tool input validation

* 🔒 Added enum validation for icon-search tool

* 🔒 Improved component-docs validation

* 📝 Yarn lock sync

* 📝 Update llm docs index

* 🐛 Resolve misc bugs

* 🐛 Better typing, comments

* 🎉 Ready MCP for npm deploy

* 🐛 Clean up unused config and files

* 🔥 Removed readme

* 🔥 Removed readme

* 📝 Sync vitest and ts version

* 🐛 Fix MIME-type

* 🐛 Match lovercase filtering

* 🐛 Fix tests, avoid adding test-files to build

* PR updates

* 🚚 Moved migrations to resources

* PR cleanup

* 📝 Mark package as private to allow manuall publishing

* 🐛 Sync versions

* ⚡ Use tsdown for package build

* Update @navikt/aksel-mcp/.mcp.json

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Sync rolldown-versions

* 🔥 Removed comment

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-02 11:20:57 +02:00
366d72feeb 🎨 ActionMenu: New medium content size, styling changes to group label and automatic indent in groups if one item has marker (#4911)
* Added small prop

* Added disableItemIndent prop

* Changes in group label styling, medium size styling and itenm indent

* Examples

* Changeset

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* make indent positive again

* remove hstack

* Move size to root so it can be added to context and applied to submenus too

* Add indent to SubMenu trigger too

* moved size prop

* Changed logic to indent being opt-in

* Correct story to new indent logic

* fix website examples based on changes

* Rename and fixed some spelling

* changeset

* add cromatic

* Update .changeset/great-kings-poke.md

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-06-02 09:51:32 +02:00
Halvor Haugan 34eb6fe660 [website] Adjust schema for props (#4936) 2026-06-02 09:11:06 +02:00
Ken 9976c5cbc8 ⬆️ Upgrade website docker-image (#4935) 2026-06-01 14:56:23 +02:00
Halvor Haugan 1ac816a1ae FileUpload: Warning about texts with aria-hidden (#4929) 2026-06-01 13:57:10 +02:00
dependabot[bot]andKen 226cca718d Bump jsdom from 27.1.0 to 29.1.1 (#4926)
* Bump jsdom from 27.1.0 to 29.1.1

Bumps [jsdom](https://github.com/jsdom/jsdom) from 27.1.0 to 29.1.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Commits](https://github.com/jsdom/jsdom/compare/v27.1.0...v29.1.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 29.1.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync jsdom-versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-06-01 13:18:14 +02:00
KenandCopilot Autofix powered by AI f455d01a58 [Instructions] Code review instructions (#4915)
* 🎉 Initial review checklist

* 📝 Changes to review checklist

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-01 13:08:49 +02:00
dependabot[bot] 1b4c489dc2 Bump the storybook group across 1 directory with 9 updates (#4924)
Bumps the storybook group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `10.3.6` | `10.4.1` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.3.6` | `10.4.1` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `10.3.6` | `10.4.1` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `10.3.6` | `10.4.1` |
| [@storybook/nextjs-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `10.3.6` | `10.4.1` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.3.6` | `10.4.1` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.3.6` | `10.4.1` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.3.6` | `10.4.1` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `10.3.6` | `10.4.1` |



Updates `@storybook/addon-a11y` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/addons/a11y)

Updates `@storybook/addon-docs` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/addons/docs)

Updates `@storybook/addon-themes` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/addons/themes)

Updates `@storybook/addon-vitest` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/addons/vitest)

Updates `@storybook/nextjs-vite` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/lib/eslint-plugin)

Updates `storybook` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/core)

Updates `storybook-addon-pseudo-states` from 10.3.6 to 10.4.1
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.4.1/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/nextjs-vite"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-01 13:00:15 +02:00
dac40ad267 Bump the vitest group with 4 updates (#4925)
* Bump the vitest group with 4 updates

Bumps the vitest group with 4 updates: [@vitest/browser](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser), [@vitest/browser-playwright](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/browser` from 4.1.5 to 4.1.7
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.7/packages/browser)

Updates `@vitest/browser-playwright` from 4.1.5 to 4.1.7
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.7/packages/browser-playwright)

Updates `@vitest/coverage-v8` from 4.1.5 to 4.1.7
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.7/packages/coverage-v8)

Updates `vitest` from 4.1.5 to 4.1.7
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.7/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/browser"
  dependency-version: 4.1.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/browser-playwright"
  dependency-version: 4.1.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 4.1.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>

* sync versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-06-01 12:57:21 +02:00
KenandCopilot Autofix powered by AI fdda91fe1e [logging] Use consoleWarning-utility across package (#4922)
* 📝 Improve error-logging

* 📝 Removed double prefix

* 📝 Changeset

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 📝 PR-review

* 🔥 Removed backticks

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-01 12:55:43 +02:00
Halvor Haugan fca2948494 ds-tokens: Fix token_docs types (#4930) 2026-06-01 12:46:30 +02:00
Ken 612a3250e9 🐛 Fix unstable inline event-handlers in useEventListener (#4923) 2026-06-01 11:29:29 +02:00
dependabot[bot] b81e697ff1 Bump globals from 17.5.0 to 17.6.0 (#4927)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.5.0 to 17.6.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.5.0...v17.6.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-01 11:28:39 +02:00
dependabot[bot] 5ca4091b16 Bump axios from 1.15.2 to 1.16.1 (#4918)
Bumps [axios](https://github.com/axios/axios) from 1.15.2 to 1.16.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.2...v1.16.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-01 11:27:35 +02:00
Ken 0afa2574eb [Typos] Fix various typos (#4921)
* 📝 fix internal typo

* 📝 Fix comment typos

* 📝 reference correct props
2026-06-01 10:33:56 +02:00
Ken c1a274f347 [Stylelint] Misc fixes and cleanup (#4920)
* 🐛 Fix deprecated classes loop

* 🎉 Add word-highlighting

* ⚰️ Removed test-files from npm-bundle

* 📝 Changeset
2026-06-01 09:50:32 +02:00
Ken 64592729b8 [Clean] 🐛 Clean up buildinfo-files (#4919)
* 🐛 Clean up buildinfo-files

* 📝 Folder -> name
2026-06-01 09:50:14 +02:00
Ken 36a81bff7f [Icons] Update test-description 2026-05-30 15:16:26 +02:00
Ken 50a833f6c8 [Icons] 🐛 Fix metadata type definition 2026-05-30 15:10:05 +02:00
github-actions[bot] 9f0b850579 Version Packages (#4910)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-29 15:38:35 +02:00
Halvor Haugan cd4443e7cb [website] Adjust examples of Box and Bleed (#4914) 2026-05-29 14:09:07 +02:00
Halvor Haugan 23157ec0b5 [website] Add label and desc to FileUpload.Trigger example (#4913) 2026-05-29 14:06:54 +02:00
Ken 15d54f3f59 [Sanity] Use named exportDataset import for backup 2026-05-29 11:14:50 +02:00
Ken da9bab40b0 [Dismissablelayer] Focus edgecase (#4909)
* 🐛 Make sure Dismissablelayer handles focus-events when clicking inside container

* 📝 Changeset

* 🧪 Added tests
2026-05-29 10:31:43 +02:00
Ken c5e3f42c4f [LLM] Optimize instructions
[LLM] More optimizations
2026-05-29 09:48:38 +02:00
Halvor Haugan 54634ffed9 Tokens: Add types for token_docs (#4912) 2026-05-28 15:21:16 +02:00
df95714326 [DataGrid] Column display-prop (#4908)
* 🎉 Added columnDisplay setting

* 📝 Changeset

* 🐛 Handle silent error

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* 🐛 Re add closing tag

* Update @navikt/core/react/src/data/stories/Data.data-prop.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/data/stories/Data.data-prop.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-05-28 14:15:25 +02:00
Halvor Haugan 79444a7485 DataGrid.Table: Fix auto-width for col with "show nested rows" button (#4906) 2026-05-28 10:03:13 +02:00
Ken a375059cdb [DataGrid] 🐛 Loadingbar now follows sticky header properly (#4897)
* 🐛 Loadingbar now follows sticky header properly

* 💄 Fix loading-bar in safari, removed opacity transition

* ♻️ Removed unused data-sticky attrb on rows
2026-05-28 09:33:44 +02:00
Halvor Haugan 819c68e3a7 useControllableState: More precise type for setter (#4907) 2026-05-27 21:10:03 +02:00
dependabot[bot]andHalvor Haugan 354cc81223 Bump playwright from 1.59.1 to 1.60.0 (#4904)
* Bump playwright from 1.59.1 to 1.60.0

Bumps [playwright](https://github.com/microsoft/playwright) from 1.59.1 to 1.60.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.59.1...v1.60.0)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.60.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* sync versions

* sync versions 2

* version sync 3

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-05-26 21:41:12 +02:00
dependabot[bot]andHalvor Haugan 9f5c345386 Bump @biomejs/biome from 2.4.10 to 2.4.15 (#4905)
* Bump @biomejs/biome from 2.4.10 to 2.4.15

Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.4.10 to 2.4.15.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.4.15/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.4.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* migrate

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-05-26 21:00:05 +02:00
dependabot[bot] adad5b4214 Bump @changesets/cli from 2.29.7 to 2.31.0 (#4903)
Bumps [@changesets/cli](https://github.com/changesets/changesets) from 2.29.7 to 2.31.0.
- [Release notes](https://github.com/changesets/changesets/releases)
- [Commits](https://github.com/changesets/changesets/compare/@changesets/cli@2.29.7...@changesets/cli@2.31.0)

---
updated-dependencies:
- dependency-name: "@changesets/cli"
  dependency-version: 2.31.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-26 20:36:18 +02:00
Halvor Haugan 7ed5890dae [website] Make Stepper "wizard" example interactive 2026-05-26 15:48:28 +02:00
Halvor Haugan 0b31d893f6 [website] Adjust Select error example 2026-05-26 15:47:26 +02:00
c273939376 Bump react/react-dom from 19.2.5 to 19.2.6 (#4876)
* Bump react-dom in the react group across 1 directory

Bumps the react group with 1 update in the / directory: [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom).


Updates `react-dom` from 19.2.5 to 19.2.6
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.6/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-version: 19.2.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: react
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync react-versions

* sync versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-05-26 12:17:05 +02:00
Anniken Granberg 92fa6410b7 DataTable: Small cleanup to drag and drop (#4899)
* DataTable: Small improvements to drag and drop

* changeset

* pr comments
2026-05-26 09:33:33 +02:00
Halvor Haugan c2f8cc28cd [website] Update descs for some primitives examples (#4898) 2026-05-22 18:29:57 +02:00
Ken d3620d4d15 [Website] DataGrid demo-update (#4895)
* [Website] Removed redundant column from DataGrid demo

* [Website] Demo-data refactor

* 🎉 Nested demo-data

* 🐛 Dynamic rng number

* 🔥 removed withNesting type

* 📝 Inline data-generation

* 📝 rename RNG -> randomnumbergenerator
2026-05-22 14:09:13 +02:00
Ken fd06b8caf6 [Analyzer] Bundle analyzer treeshake (#4894)
* 🐛 Better treeshaking of icon-package

* 📝 Lock rolldown to v1

* 📝 sync rolldown versions
2026-05-22 13:44:45 +02:00
Halvor Haugan f323321cb4 DataGridTable: remove todo 2026-05-22 09:16:50 +02:00
Ken 5a29f39e16 [Website] Re-order data-grid examples 2026-05-21 15:28:14 +02:00
github-actions[bot] 27e221d1be Version Packages (#4888)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-21 14:47:20 +02:00
Halvor Haugan b89dbce45b [DataGrid] Fix docgen (#4892) 2026-05-21 14:43:42 +02:00
Anniken Granberg 3d4f94d0fe DataTable: Change padding values and changed rowDensity variant naming 2026-05-21 14:01:22 +02:00
Halvor Haugan 0a1b110efc DataGridTable: Add todos 2026-05-21 13:45:18 +02:00
Halvor Haugan 6576b43734 [website] Use ShowMore in Preview note (#4891) 2026-05-21 13:43:30 +02:00
KenandHalvor Haugan a84c86e9a0 [DataGrid] Examples for website (#4889)
* 🎉 Added initial example for data-grid

* 🎉 Extract data-generation to separate util

* 🔥 removed old comment

* 🎉 Demo layout

* ♻️ Reduce height

* 📝 Re-order columns

* 🎉 Added more demos

* 🎉 Added loading and empty-state stories

* 🔥 Removed isloading from sorting

* 🎉 Fixed performance issues

* 🐛 Make sortable columnheader static when table is loading

* 🐛 Removed isLoading-prop from sorting-demo

* 🐛 Make onRowAction return rowData

* 📝 Updated examples with best practices

* 📝 Reduce line-count

* 📝 Use vstack

* 📝 Rename row-action

* Update aksel.nav.no/website/pages/eksempler/data-grid/row-click.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/data-grid/sorting.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Improve layout for nested example

* ♿ A11y improvements

* Update aksel.nav.no/website/components/website-modules/examples/__parts/DataGridDemoData.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-05-21 13:27:39 +02:00
KenandHalvor Haugan dc5299b1f9 [DataGrid] Release Preview 🎉 (#4885)
* 🎉 Ready component for release

* 🐛 Removed old import of table-css

* 📝 Rename to PREVIEW

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-05-20 13:13:11 +02:00
Ken 80c2458c66 [DataGrid] Added todo for columnheader sortable-area 2026-05-20 13:12:11 +02:00
Ken 96b6aed396 [DataGrid] Sync namespace types 2026-05-20 12:47:55 +02:00
Halvor Haugan baaf495ee6 [DataGrid] Fix typos 2026-05-20 12:46:15 +02:00
KenandCopilot Autofix powered by AI 76e04106f7 [Icons] New icon Newsletter (#4887)
* 🎉 Added new icon NewsLetter

* 📝 changeset

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-20 12:43:53 +02:00
Ken 67574283ca [DataGrid] Make keyboard-nav default enabled 2026-05-20 12:38:06 +02:00
Ken a74d2a75bb [DataGrid] Update namespace columns def 2026-05-20 12:23:27 +02:00
Ken ed0e6dbfd7 [DataGrid] Update Namespaces 2026-05-20 12:01:45 +02:00
Ken 4bb83d5e6f [DataGrid] Rename onRowClick -> onRowAction 2026-05-20 11:47:57 +02:00
Ken 5e43726f08 [DataGrid] Update selection API 2026-05-20 11:47:57 +02:00
Ken bde3d18341 [DataGrid] Rename sorting API 2026-05-20 11:47:57 +02:00
KenandHalvor Haugan 6700e5789a [Website] 🎉 Added custom preview-card block (#4886)
* 🎉 Added custom preview-card block

* 🐛 Fix unpacking of link-references

* fix type error

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-05-20 11:29:58 +02:00
Halvor Haugan dbeaddd186 [DataGrid] JSDoc adjustments and misc 2026-05-20 09:55:44 +02:00
Halvor Haugan c6d98539d9 DataGridTable: Fix sticky header 2026-05-19 20:01:49 +02:00
Halvor Haugan ebbff6520c [DataGrid] Rename DataTableProps -> DataGridTableProps 2026-05-19 19:59:24 +02:00
Ken ca7f40e1e5 [LLM] 🎉 Added docs-route for structured content (#4846)
* 🎉 Added docs-route for structured content

* ♻️ Extracted and re-used helpers

* ♻️ Refactor route handler
2026-05-19 15:40:27 +02:00
dependabot[bot] dbe6b4ba43 Bump postcss from 8.4.31 to 8.5.14 (#4880)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.31 to 8.5.14.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.31...8.5.14)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 15:34:26 +02:00
dependabot[bot] ae4f8c372b Bump webpack-dev-server from 5.2.3 to 5.2.4 (#4884)
Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 5.2.3 to 5.2.4.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v5.2.3...v5.2.4)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-version: 5.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 15:33:26 +02:00
Ken 05a60ded83 [DataGrid] Bug: Make sure header cells have unique ids in case of multiple tables 2026-05-19 14:46:29 +02:00
Ken f8dc76d751 [DataGrid] Added namespace exports for props 2026-05-19 14:43:32 +02:00
Halvor Haugan a942e2585a [DataGrid] DataTableColumnHeader: SR improvements 2026-05-19 14:38:30 +02:00
Ken f98b44a037 [DataGrid] Fix props not giving error in stories 2026-05-19 13:54:05 +02:00
Ken 72b75c8edf [DataGrid] Optimize sort callback and resize-observing 2026-05-19 13:32:41 +02:00
Ken 831111bbd0 [DataGrid] Better types for stickyColumns 2026-05-19 13:32:41 +02:00
Ken bb5c02e07e [DataGrid] Optimized rendering 2026-05-19 13:32:41 +02:00
Ken fce759d17f [DataGrid] Refactor Settings name 2026-05-19 13:32:41 +02:00
Ken a005f4528b [DataGrid] Refactor Settings API 2026-05-19 13:32:40 +02:00
Ken 67d07f24a5 [DataGrid] Move settings 2026-05-19 13:32:40 +02:00
Ken cc38262dda [DataGrid] Move isLoading to root, rename loading -> loadingContent 2026-05-19 13:32:40 +02:00
Ken caf68104ee [DataGrid] Moved selectionTrigger prop to table itself 2026-05-19 13:32:40 +02:00
Ken 39c075be69 [DataGrid] Moved selection-prop to grid root 2026-05-19 13:32:40 +02:00
Halvor Haugan a6b434d46a DataGrid: Fix resize test 2026-05-19 12:21:14 +02:00
Halvor Haugan 2d77db8053 [DataGrid] Column width: Rename default -> defaultValue 2026-05-19 12:16:07 +02:00
Halvor Haugan 32a7038a10 DataGrid.Table: make sure all console warnings are prefixed 2026-05-19 11:57:45 +02:00
Halvor Haugan c0285b8950 DataTable: improved auto-width logic 2026-05-19 11:40:12 +02:00
Halvor Haugan 39106714d1 DataTable: ActionMenu in kitchen sink story 2026-05-19 11:29:27 +02:00
Halvor Haugan 3e789ce63d DataTable: overflow:hidden on cells 2026-05-19 11:25:44 +02:00
Halvor Haugan 1fe4d23504 Remove vitest.setup.ts (#4883) 2026-05-19 09:47:21 +02:00
Halvor Haugan 4fb8c14891 ⬆️ Upgrade next from 16.2.3 to 16.2.6 (#4882) 2026-05-19 09:47:16 +02:00
Halvor Haugan 61e1d1b012 Remove unused package cross-zip-cli 2026-05-19 09:32:38 +02:00
Halvor Haugan 15a96bb39b ⬆️ Bump uuid to latest patch versions 2026-05-18 19:42:30 +02:00
dependabot[bot] 566e1dcf3c Bump @babel/plugin-transform-modules-systemjs from 7.29.0 to 7.29.4 (#4872)
Bumps [@babel/plugin-transform-modules-systemjs](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-modules-systemjs) from 7.29.0 to 7.29.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.4/packages/babel-plugin-transform-modules-systemjs)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-modules-systemjs"
  dependency-version: 7.29.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 19:37:46 +02:00
Halvor Haugan 84441246ac DataTable: remove TODOs out of JSDoc 2026-05-18 19:17:25 +02:00
Halvor Haugan 2986f265d8 DataTable: fix bug 2026-05-18 19:13:49 +02:00
Halvor Haugan e400caef2f [DataTable] Rename textAlign -> align 2026-05-18 19:03:49 +02:00
Halvor Haugan 73d4ed3104 DataTable: Rename header -> headerCell, label -> header 2026-05-18 18:57:18 +02:00
Halvor Haugan 2591ae4385 DataGridRoot.context.ts: RowDef -> RowT 2026-05-18 18:41:32 +02:00
Halvor Haugan 692340b9b2 Adjust workflow names 2026-05-18 16:51:45 +02:00
Halvor Haugan a37f514eac DataTable: Remove magic tag/button CSS 2026-05-18 16:23:44 +02:00
Halvor Haugan 815ff7c55f [website] Adjust desc on primitives examples (#4874) 2026-05-18 16:06:25 +02:00
dependabot[bot] 5dbf9d3f16 Bump fast-uri from 3.1.0 to 3.1.2 (#4873)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 16:01:12 +02:00
dependabot[bot] ffe22d2bf6 Bump @vitest/eslint-plugin from 1.6.16 to 1.6.17 in the vitest group (#4877)
Bumps the vitest group with 1 update: [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest).


Updates `@vitest/eslint-plugin` from 1.6.16 to 1.6.17
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.6.16...v1.6.17)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.17
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 15:59:48 +02:00
dependabot[bot] a2912b928b Bump figlet from 1.10.0 to 1.11.0 (#4878)
Bumps [figlet](https://github.com/patorjk/figlet.js) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/patorjk/figlet.js/releases)
- [Commits](https://github.com/patorjk/figlet.js/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: figlet
  dependency-version: 1.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 15:59:01 +02:00
Ken 2a62921f7c [DataGrid] Rename Types and root context 2026-05-18 15:57:51 +02:00
Ken 0387e38e20 [DataGrid] Moved DataTable tests 2026-05-18 15:57:51 +02:00
Ken fc0fab5b60 [DataGrid] removed old legacy-implementation 2026-05-18 15:57:51 +02:00
Ken 329c59f4cd [DataGrid] Avoid extending div-element 2026-05-18 15:57:50 +02:00
Ken a9b7c16b89 [DataGrid] Rename table root -> DataGridTable 2026-05-18 15:57:50 +02:00
Ken 06178182e2 [DataGrid] Move data-grid dir 2026-05-18 15:57:50 +02:00
Ken f2bce6c3db [DataGrid] Add table as sub-component 2026-05-18 15:57:50 +02:00
github-actions[bot] ee976548c7 Version Packages (#4868)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-18 15:09:49 +02:00
KenandHalvor Haugan 34b28ca9cd [Website] 💄 Added preview-tag (#4869)
* 💄 Added preview-tag

* 🐛 Fix sidebar type error, change color to meta-purple

* Update aksel.nav.no/website/components/website-modules/StatusTag.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-05-18 15:09:36 +02:00
KenandHalvor Haugan 4fb29fa9a9 [DataTable] Table -> DataGrid wrapper (#4879)
* 🎉 Set up DataGrid root

* 🎉 Moved data props to grid-component

* Update @navikt/core/react/src/data/data-grid/root/DataGridRoot.context.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/data/data-grid/root/DataGridRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Doc changes

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-05-18 14:45:53 +02:00
Halvor Haugan 30f687ba6c DataTable: Fix auto-resize issue 2026-05-18 13:24:09 +02:00
Ken 6ce7ce7d4b [DataTable] Fixed ref-issue for keyboard-nav 2026-05-18 12:11:41 +02:00
Halvor Haugan 154f12f84e DataTable: Type/jsdoc adjustments for detailsPanel and subRows 2026-05-18 11:20:42 +02:00
Anniken Granberg aea6430c9f DataTable: Fix row density for firefox 2026-05-18 11:06:35 +02:00
Halvor Haugan 2b9f450028 [DataTable] Root: Adjust JSDoc 2026-05-18 10:34:08 +02:00
Halvor Haugan b46949eb56 [DataTable] Root: fix docgen, adjust jsdoc 2026-05-18 09:03:05 +02:00
Halvor Haugan 137ddc1841 DataTable: Fix auto resize story test (#4875) 2026-05-15 16:41:15 +02:00
Halvor Haugan 19dc8cadb6 DataTable: fix auto resize test 2026-05-15 14:03:58 +02:00
Halvor Haugan 336503c5c1 DataTable: group width-props 2026-05-15 13:05:31 +02:00
Ken 4cdb7feb02 [DataTable] Moved fullWidthColSpan calculation to hook, renmaed const 2026-05-13 18:00:40 +02:00
Ken 7330c74c7b [DataTable] Moved TableElementWrapper out one level to avoid re-renders 2026-05-13 17:55:52 +02:00
Ken 604cd7b5f7 [DataTable] Moved sorting hook result into context 2026-05-13 17:51:56 +02:00
Halvor Haugan be7d524851 DataTable: fix test 2026-05-13 16:07:31 +02:00
Halvor Haugan b42b259a4f DataTable: some comments 2026-05-13 16:01:47 +02:00
Anniken Granberg def2ff5939 DataTable / dnd: Cleanup todos 2026-05-13 15:00:15 +02:00
Anniken Granberg bb8a9f96df DataTable: Remove large text size and change text size values 2026-05-13 15:00:15 +02:00
Ken e9d723a1ba [KI] Optimized instructions, added caveman 2026-05-13 11:57:54 +02:00
Ken 5fdca37439 [DataTable] Optimize context by moving item-context to root 2026-05-13 11:57:54 +02:00
Anniken GranbergandCopilot Autofix powered by AI d50aef6ced [Website] Added support for tabs in code block (#4870)
* [Website] Added support for tabs in code block

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-13 11:38:50 +02:00
Ken 8b0d4a5517 [DataTable] Update sorting state 2026-05-13 10:37:36 +02:00
Ken 79fd31c117 [DataTable] rename disableRowSelectionOnClick to selectionTrigger and disableRowSelection to enableRowSelection 2026-05-13 10:16:01 +02:00
Ken 92d599fa97 🔥 Removed old documentation 2026-05-13 10:16:01 +02:00
Halvor Haugan c34d9fc966 DataTable: contentMaxWidth can now be any string (or number) 2026-05-13 10:10:18 +02:00
Halvor Haugan f497787566 DataTable: truncateContent default false when layout=auto 2026-05-13 09:59:51 +02:00
Ken 2a6ec64316 [DataTable] removed DetailsT from columnDefinitions 2026-05-12 20:01:37 +02:00
Ken cdbda9c231 [DataTable] Added todos 2026-05-12 19:43:01 +02:00
Ken 6b0b2f9376 [DataTable] Remove legacy comment 2026-05-12 19:39:37 +02:00
Ken ead1139a09 [DataTable] Sticky-state now accounts for selection and expansion-state 2026-05-12 19:38:58 +02:00
Ken de438d487e [DataTable] update stickyColumns props 2026-05-12 19:13:26 +02:00
Ken 8028ff69e8 [DataTable] Refactor getRowId to only accept string, reference TableRowEntryId where possible 2026-05-12 16:20:16 +02:00
Ken 459ee4a66f [DataTable] Rename emptyState -> emptyContent 2026-05-12 15:53:48 +02:00
Ken 45c6635ec8 [DataTable] Refactor loading-api 2026-05-12 15:53:48 +02:00
Anniken Granberg ab3bfc8074 DataTable: remove dnd-kit package 2026-05-12 15:35:27 +02:00
Ken 4329775c9f [DataTable] Removed shouldBlockNavigation prop 2026-05-12 15:23:15 +02:00
Ken 6d3271d946 [DataTable] Require selectionMode to be set when selection-prop is defined 2026-05-12 15:12:43 +02:00
Ken dd02a7d4a9 [DataTable] Replace UNSAFE_isSelection with 'cellType=action' prop 2026-05-12 15:10:22 +02:00
Ken b8738227b2 📝 Add todos with priorities 2026-05-12 14:46:47 +02:00
Ken c717b5a2d1 Add review 2026-05-12 14:46:47 +02:00
Ken e9dd76d7e0 📝 Add review 2026-05-12 14:46:47 +02:00
19ac81dbb4 [website] DescriptionList component (#4862)
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-05-12 11:45:18 +02:00
Halvor Haugan 20e6935a31 DataTable: CSS adjustment I forgot to commit after editing DataTableColumnHeader 2026-05-12 11:41:17 +02:00
Halvor Haugan 807b2feef2 [website] Fix riktekst toolbar alignment issue 2026-05-12 11:38:48 +02:00
Ken a9a8bad7a4 🔥 Removed deprecated description-fields in sanity-workspace config 2026-05-11 18:47:51 +02:00
Ken 412a00cdd2 🎉 Developer workspace in sanity is now hidden for non admins/devs 2026-05-11 18:23:20 +02:00
7727c3249a [DataTable] Selection api refactor (#4860)
* :WIP: Refactor selection with rowdata

* ♻️ Implement multiple-select handler

* ♻️ Fix bugs and performance

* 🔥 Removed unused code

* 🔥 removed old comments

* 🔥 removed old comments

* ♻️ Resolve function or boolean

* 🐛 Use console util for printing to dev

* 🔥 removed legacy-tests

* 🐛 Preserve previous pages selection

* ⚡ Use set directly

* avoid any

* comment

* rename useTableItemsReturn -> UseTableItemsReturn

* fix type of disableRowSelection

* 🐛 Handle selection of child-rows when parent-row is selected

* 🏷️ Types refactor

* 🐛 Update stories to reflect updated state

* Update @navikt/core/react/src/data/table/hooks/useTableSort.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Updated comments

* 🔥 Comment out non-working kitchen-sink demo

* forward T in canSelectTableRow types

* single select stories

* 🏷️ Removed unused type

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-05-11 18:05:41 +02:00
Halvor Haugan c40ecab7dd DataTable: Adjustments & comments in DataTableColumnHeader 2026-05-11 17:46:09 +02:00
Halvor Haugan ed2eb5885f DataTable: Storybook test for autoWidth 2026-05-11 17:28:31 +02:00
dependabot[bot] d9ed2ab6eb Bump esbuild from 0.27.7 to 0.28.0 (#4866)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.27.7 to 0.28.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.27.7...v0.28.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 15:50:33 +02:00
dependabot[bot] 1338d97853 Bump ts-morph from 27.0.2 to 28.0.0 (#4865)
Bumps [ts-morph](https://github.com/dsherret/ts-morph) from 27.0.2 to 28.0.0.
- [Release notes](https://github.com/dsherret/ts-morph/releases)
- [Commits](https://github.com/dsherret/ts-morph/compare/27.0.2...28.0.0)

---
updated-dependencies:
- dependency-name: ts-morph
  dependency-version: 28.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 15:49:35 +02:00
Anniken Granberg fa6c935530 DataTable: remove old drag and drop 2026-05-11 14:17:25 +02:00
Anniken GranbergandKen 1f39de488f 🎨 InfoCard: Added bigger padding for medium sized InfoCard.Message (#4861)
* 🎨 InfoCard: Change padding for small and medium for InfoCard.Message

* changeset

* Update @navikt/core/css/src/alert.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-05-11 12:35:20 +02:00
Ken e29b94e4d2 [Website] Codeblock adjustments (#4859)
* 💄 Adjusted styles

* 📝 Adjust default language render

* 🐛 Sync codeblock-render with new tabs
2026-05-11 12:15:47 +02:00
dependabot[bot] cb2d048ed8 Bump the storybook group with 9 updates (#4864)
Bumps the storybook group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `10.3.5` | `10.3.6` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.3.5` | `10.3.6` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `10.3.5` | `10.3.6` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `10.3.5` | `10.3.6` |
| [@storybook/nextjs-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `10.3.5` | `10.3.6` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.3.5` | `10.3.6` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.3.5` | `10.3.6` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.3.5` | `10.3.6` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `10.3.5` | `10.3.6` |


Updates `@storybook/addon-a11y` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/addons/a11y)

Updates `@storybook/addon-docs` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/addons/docs)

Updates `@storybook/addon-themes` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/addons/themes)

Updates `@storybook/addon-vitest` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/addons/vitest)

Updates `@storybook/nextjs-vite` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/lib/eslint-plugin)

Updates `storybook` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/core)

Updates `storybook-addon-pseudo-states` from 10.3.5 to 10.3.6
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.6/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/nextjs-vite"
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 10.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-11 08:54:38 +02:00
Anniken Granberg 11d8874fba DataTable: Add textSize and connect row density to selected text size 2026-05-08 19:19:25 +02:00
Halvor Haugan 7d85a0c69e DataTable: BaseCell type improvements + comments 2026-05-08 16:32:39 +02:00
Halvor Haugan e537e040fe DataTable: Built-in spacing for for tags and buttons 2026-05-08 11:48:32 +02:00
github-actions[bot] ed6c7e999d Version Packages (#4853)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-07 13:23:04 +02:00
Anniken Granberg cf9992ca3e DataTable / dnd: fix types 2026-05-07 12:57:24 +02:00
Anniken Granberg 4db5cbfe54 DataTable: failed if i didnt remove comment??? 2026-05-07 12:20:39 +02:00
Anniken Granberg 54a077fbb7 DataTable / dnd: Fix type and other small stuff 2026-05-07 12:16:04 +02:00
Anniken Granberg a6e2a2f4d4 DataTable / dnd: Background color only on overlay, removed default padding and margin on ul 2026-05-07 12:16:04 +02:00
Anniken GranbergandCopilot 7e31ee6822 DataTable / dnd: Rename old to legacy
Co-authored-by: Copilot <copilot@github.com>
2026-05-07 12:16:04 +02:00
Halvor Haugan 35295e7c01 Pagination: Fix selected-styling in forced-colors mode (#4858) 2026-05-07 11:31:22 +02:00
Halvor Haugan 0522dfae59 Button: Fix issue where secondary and tertiary variants did not have correct text color is certain cases (#4857) 2026-05-07 08:31:50 +02:00
Halvor Haugan 53d40657bb [Sanity] Add component titles to preview of Props section (#4856) 2026-05-06 12:32:32 +02:00
Halvor Haugan 334770de25 Fix running tests in react package on Windows (#4855) 2026-05-06 09:57:10 +02:00
Anniken Granberg faec264163 DataTable / DND : Improved announcer 2026-05-05 22:31:32 +02:00
Anniken Granberg fbfdeba70b DataTable / DND: Better label, handle reset on esc 2026-05-05 21:14:17 +02:00
Halvor Haugan 76c3143d68 ⬆️ Bump typescript to 6.0.3 to fix build issue 2026-05-05 14:55:47 +02:00
Ken bec61c3743 [DataTable] Update feature gap md 2026-05-05 14:45:24 +02:00
Ken 3fbba87f06 [DataTable] Update kitchensink demo 2026-05-05 14:45:24 +02:00
Ken 62197a107b [DataTable] Refactor scroll-calculation 2026-05-05 14:45:24 +02:00
Ken 4f55967cf8 [DataTable] Dynamically add scroll-margin to focused cell 2026-05-05 14:45:23 +02:00
Halvor Haugan 335b7b7af2 [website] Add field for heading-level in PropsSeksjon (#4854) 2026-05-05 13:57:26 +02:00
Ken 1073f5d502 [DataTable] Keyboard-nav now acts like rowing tabindex pattern 2026-05-05 10:28:25 +02:00
Ken ffab045fcb [DataTable] Fixed issue with keyboard-nav not updating cache when expanding/collapsing rows 2026-05-05 10:08:47 +02:00
Ken 8bb8083be3 [DataTable] Remove index from getRowId callbacks 2026-05-05 10:00:10 +02:00
Ken ba7d2be630 [DataTable] Refactor object reference to unique ID 2026-05-05 09:41:24 +02:00
Ken 4d3839e9b5 [DataTable] TODO 2026-05-04 16:35:17 +02:00
Ken 3ff4d17fa0 [DataTable] Remove legacy todo 2026-05-04 16:32:37 +02:00
Ken 53497224fa [DataTable] Type button for buttons in columnHeader 2026-05-04 16:31:07 +02:00
Ken 1284fefa7b [DataTable] Named useEffect 2026-05-04 16:13:07 +02:00
Ken 2f264b7cb7 [DataTable] getRowId is now optional, falling back to unique ids, even for nested items 2026-05-04 15:23:42 +02:00
dependabot[bot]andKen 4359fb3aba Bump @floating-ui/react from 0.27.8 to 0.27.19 (#4851)
* Bump @floating-ui/react from 0.27.8 to 0.27.19

Bumps [@floating-ui/react](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/react) from 0.27.8 to 0.27.19.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/react/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/react@0.27.19/packages/react)

---
updated-dependencies:
- dependency-name: "@floating-ui/react"
  dependency-version: 0.27.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Remove floating ui from website

* 📝 Changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-05-04 14:41:18 +02:00
dependabot[bot]andKen 632fcff376 Bump the vitest group with 4 updates (#4847)
* Bump the vitest group with 4 updates

Bumps the vitest group with 4 updates: [@vitest/browser](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser), [@vitest/browser-playwright](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/browser` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.5/packages/browser)

Updates `@vitest/browser-playwright` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.5/packages/browser-playwright)

Updates `@vitest/coverage-v8` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.5/packages/coverage-v8)

Updates `vitest` from 4.1.4 to 4.1.5
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.5/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/browser"
  dependency-version: 4.1.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/browser-playwright"
  dependency-version: 4.1.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 4.1.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-05-04 14:29:34 +02:00
dependabot[bot]andKen 08b1ef6d72 Bump fuse.js from 7.1.0 to 7.3.0 (#4849)
* Bump fuse.js from 7.1.0 to 7.3.0

Bumps [fuse.js](https://github.com/krisk/Fuse) from 7.1.0 to 7.3.0.
- [Release notes](https://github.com/krisk/Fuse/releases)
- [Changelog](https://github.com/krisk/Fuse/blob/main/CHANGELOG.md)
- [Commits](https://github.com/krisk/Fuse/compare/v7.1.0...v7.3.0)

---
updated-dependencies:
- dependency-name: fuse.js
  dependency-version: 7.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🎉 Improve fuse-search

* 📝 yarn lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-05-04 14:29:14 +02:00
github-actions[bot] f7c9bde6d2 Version Packages (#4852)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-04 14:06:08 +02:00
Halvor Haugan 66d7a204cd ⬆️ Upgrade some dependencies (#4845) 2026-05-04 12:48:20 +02:00
Ken 6d56ec8f51 [ActionMenu] Now biases towards top/bottom placement on all screens (#4843)
* 🐛 Bias menus using floating util to stay locked to top/bottom side

* 📝 Changeset

* 📝 Changeset update

* ♻️ Improved collisionpadding syntax

* 📝 Updated changeset
2026-05-04 12:40:15 +02:00
dependabot[bot] 2ecf0ee03c Bump @dnd-kit/react from 0.3.2 to 0.4.0 (#4848)
Bumps [@dnd-kit/react](https://github.com/clauderic/dnd-kit) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/clauderic/dnd-kit/releases)
- [Commits](https://github.com/clauderic/dnd-kit/compare/@dnd-kit/react@0.3.2...@dnd-kit/react@0.4.0)

---
updated-dependencies:
- dependency-name: "@dnd-kit/react"
  dependency-version: 0.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-04 12:19:54 +02:00
Halvor Haugan ee8a3be487 DataTable: Story: KitchenSinkAdv: label as label on column switches 2026-05-04 09:41:59 +02:00
Halvor Haugan 4a4100d0b2 Exclude some more files from css package (#4844) 2026-05-04 08:45:12 +02:00
Halvor Haugan 1da8a06783 DataTable: useTableColumnResize: Rearrange props 2026-04-30 15:18:05 +02:00
Halvor HauganandCopilot 88f96906c7 DataTable: label prop in DataTableColumnHeader
Co-authored-by: Copilot <copilot@github.com>
2026-04-30 14:52:42 +02:00
Ken a8ae8d2c54 [DataTable] Fixed bugged story 2026-04-30 14:18:54 +02:00
Ken 045dbda89a [DataTable] Added scroll shadows with scroll-timeline 2026-04-30 13:10:59 +02:00
Ken 193b23151e [DataTable] Add resize-observer to sticky shadow 2026-04-30 13:10:58 +02:00
Halvor Haugan b54380304d DataTable: Test data: Remove redundant date formattting 2026-04-30 12:44:42 +02:00
Ken 5706c959b2 [DataTable] Update kitchen-sink demo 2026-04-30 11:50:13 +02:00
Ken 9442ac558b [DataTable] Dynamically show/hide shadow for sticky columns 2026-04-30 11:06:57 +02:00
Ken e8080c269b [DataTable] Added more auto-sizing to kitchen-sink demo 2026-04-30 10:01:43 +02:00
Ken c35a9cd6a2 [DataTable] Added shadow to sticky columns 2026-04-30 10:00:10 +02:00
Halvor Haugan 0d0beae02d DataTable: fix issue with autoResize 2026-04-30 09:40:32 +02:00
Ken 2eacd71805 [DataTable] Added demo-stories for presentation, stickyheader now default 2026-04-30 09:35:49 +02:00
Halvor Haugan be22673419 DataTable: CSS fixes 2026-04-29 19:23:51 +02:00
Ken b2f7dd4e52 [DataTable] Temp optimization for auto-version 2026-04-29 15:13:40 +02:00
Ken 3284cee8a9 [DataTable] Memorize columnoptions 2026-04-29 15:07:46 +02:00
Ken 34fbdc9cd3 [DataTable] Fixed selection state for sticky columns 2026-04-29 14:46:30 +02:00
Ken 2f1aa0988c [DataTable] Details panel now has border 2026-04-29 14:43:50 +02:00
Ken 7bfacc698d [DataTable] Updated advanced kitchen-sink demo 2026-04-29 14:41:11 +02:00
Ken d02df8313c [DataTable] Create updated test-data for kitchen sink setup 2026-04-29 12:29:44 +02:00
Ken 5c94d6ec7f [DataTable] Fix type import/export 2026-04-29 11:20:22 +02:00
KenandHalvor Haugan 3c9d24ba87 [Website] 🎉 Added API-route for fetching component props based on route (#4833)
* 🎉 Added API-route for fetching component props based on route

* 📝 Added docs

* ⚡ Update caching strategy

* ⚡ Update caching strategy

* 🎉 Added example, params and return fields to props

* 🔒 Better slug parsing

* Update aksel.nav.no/website/app/api/component-props/route.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ Remove redundant string check

* 🔒 Guard against long paths

* ⚡ Validate segments before parsing

* ⚡ better regex for exaxt path segments

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-29 10:22:21 +02:00
Ken 5e426e9d64 [DataTable] Added non-working tests for cache 2026-04-28 18:06:27 +02:00
Ken 7a85f0d27f [DataTable] Refactor keyboard-nav stories to use new API 2026-04-28 17:58:25 +02:00
Ken 8f75f4426a [DataTable] Replace root component with auto version, stories not synced 2026-04-28 15:56:12 +02:00
Ken 71c16eb6d8 [DataTable] Exctact util components from auto render 2026-04-28 15:46:00 +02:00
Ken 776aa84fa8 [DataTable] Default to keyboard nav true 2026-04-28 15:31:26 +02:00
Ken f985e1e83f [DataTable] Refactor prop-names for subRow and detailsPanel props 2026-04-28 14:50:43 +02:00
Halvor Haugan 48c7794cac useControllableState: The setter can have narrower type than the state (#4842) 2026-04-28 14:45:43 +02:00
dependabot[bot] 10b1892f54 Bump @vitejs/plugin-react from 5.1.4 to 6.0.1 (#4757)
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 5.1.4 to 6.0.1.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@6.0.1/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 6.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-28 14:16:47 +02:00
Halvor HauganandCopilot 193200ec9c DataTable: resize adjustments
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:56:13 +02:00
Ken 01fc444219 [DataTable] Updated play-tests for auto 2026-04-28 11:41:07 +02:00
Ken cb5b73c1d5 📝 Re-order hooks 2026-04-28 11:23:51 +02:00
Ken 077eae7365 [DataTable]🏷️ Rename expansioncontext -> detailspanelcontext 2026-04-28 11:23:51 +02:00
Ken aa3f58c00d [DataTable] Simplify prop-drilling into hooks and providers 2026-04-28 11:23:51 +02:00
Ken 4368a14896 [DataTable] 🏷️ Grouped related props 2026-04-28 11:23:51 +02:00
dependabot[bot] 45b0939c52 Bump dompurify from 3.3.2 to 3.4.0 (#4829)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.3.2...3.4.0)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-version: 3.4.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-28 11:20:13 +02:00
dependabot[bot] d2fb1d8bc1 Bump follow-redirects from 1.15.11 to 1.16.0 (#4830)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-28 11:19:08 +02:00
dependabot[bot]andKen 363ee8e483 Bump @vitest/eslint-plugin from 1.6.14 to 1.6.16 in the vitest group (#4835)
Bumps the vitest group with 1 update: [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest).


Updates `@vitest/eslint-plugin` from 1.6.14 to 1.6.16
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.6.14...v1.6.16)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-04-28 11:18:37 +02:00
github-actions[bot] ff454dbc06 Version Packages (#4840)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-28 11:07:06 +02:00
Halvor Haugan 92f6d9e93b Add module decleration for ds-css (#4838) 2026-04-27 18:42:22 +02:00
Halvor HauganandCopilot 516634b852 [website] Improvements in props-section (#4839)
Co-authored-by: Copilot <copilot@github.com>
2026-04-27 18:12:34 +02:00
Halvor Haugan 48939bcee0 Merge branch 'main' of github.com:navikt/aksel 2026-04-27 18:11:27 +02:00
KenandCopilot 5ea6069010 🐛 Stop className from being fowarded to input-element in radio/checkbox (#4837)
* 🐛 Stop className from being fowarded to input-element in radio/checkbox

* Update .changeset/cuddly-queens-roll.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-27 18:10:05 +02:00
Halvor Haugan 5eee3136a0 Adjust JSDoc in ModalProps 2026-04-27 18:10:04 +02:00
Ken 21521b892e [DataTable] Default to sticky header always 2026-04-27 14:05:06 +02:00
Ken f563c18a59 [DataTable] Move selection-props to single prop 2026-04-27 13:32:26 +02:00
Ken ca1bd3f5c0 [DataTable] Added 'align'-prop to columnDef 2026-04-27 13:20:54 +02:00
Ken a71f326426 [DataTable] Removed untrue comment 2026-04-27 13:01:23 +02:00
Ken fb79fd775c [DataTable] Fix scroll when defining detailsPanel height 2026-04-27 13:01:23 +02:00
Ken 8a0afad10c [DataTable] Only render loading-label once 2026-04-27 13:01:22 +02:00
Halvor HauganandCopilot 92e6128cc9 DataTable: Add resizable prop + fix resizing issue
Co-authored-by: Copilot <copilot@github.com>
2026-04-27 10:04:30 +02:00
Ken ff0221736c Squashed commit of the following:
commit 82656da435
Author: Ken <ken.aleksander@gmail.com>
Date:   Mon Apr 27 09:57:48 2026 +0200

    📝 Added comments

commit ab9932ed8f
Author: Ken <ken.aleksander@gmail.com>
Date:   Mon Apr 27 09:55:47 2026 +0200

    📝 Added comments

commit 180ca25861
Author: Ken <ken.aleksander@gmail.com>
Date:   Fri Apr 24 13:38:51 2026 +0200

    ⚡ Add cached parser for optimization

commit cbac535fcb
Author: Ken <ken.aleksander@gmail.com>
Date:   Fri Apr 24 13:10:18 2026 +0200

    📝 Add docs

commit 296049b8c7
Author: Ken <ken.aleksander@gmail.com>
Date:   Fri Apr 24 13:00:21 2026 +0200

    [DataTable] Optimize recursive parsing

commit 073d811b3f
Author: Ken <ken.aleksander@gmail.com>
Date:   Fri Apr 24 12:45:15 2026 +0200

    [DataTable] Now supports branch selection

commit da1374e833
Author: Ken <ken.aleksander@gmail.com>
Date:   Fri Apr 24 12:22:41 2026 +0200

    [DataTable] Updated selection
2026-04-27 09:58:45 +02:00
Ken abe4a768e1 🐛 Revert nb locale update 2026-04-24 15:06:30 +02:00
Ken c94d801b45 [DataTable] removed unused tests 2026-04-24 13:42:08 +02:00
Ken c0080e6729 [DataTable] Added play-test story 2026-04-24 12:20:59 +02:00
Ken dd1bc5241b [DataTable] Move prop-drilled value to context 2026-04-24 11:43:01 +02:00
Halvor Haugan 816f0fcaab DataTable: autoWidth prop 2026-04-24 10:14:20 +02:00
github-actions[bot] 9d9a5b9afe Version Packages (#4832)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-24 09:49:13 +02:00
Ken 90194d7d95 💄 Dialog now bottom-aligns on smaller breakpoint (#4831) 2026-04-24 09:44:13 +02:00
Ken 26b0bd2595 [LLM] Added llm route for codemod configs, optimized json strings in markdown 2026-04-23 22:46:41 +02:00
Ken 58f74b9a8f [DataTable] Expanded, loading and empty-state rows now have correct colSpan 2026-04-23 16:47:01 +02:00
Ken cf3b550e80 [LLM] Reduce thinking verbosity with instructions 2026-04-23 16:32:15 +02:00
Ken c8deba5677 [DataTable] Refactor expansionContext 2026-04-23 16:29:58 +02:00
Ken 16ffbc0209 [DataTable] Removed unused context-data 2026-04-23 16:15:05 +02:00
Ken 90caff2e7f [DataTable] Inline row-parsing in expandable row hook 2026-04-23 16:11:15 +02:00
Ken cd3afbfcaa [DataTable] Fix pagination demo 2026-04-23 16:07:44 +02:00
Ken 4d91935a3a [DataTable] Re-use parsed rowIds 2026-04-23 16:05:49 +02:00
Ken d92ffe5cc7 [LLM] Re add lines about thinking process and verbosity 2026-04-23 16:01:47 +02:00
Ken 2970c20d00 [LLM] Specify test instructions 2026-04-23 15:53:30 +02:00
Ken f48a6b9cc2 [LLM] Updated coped instructions 2026-04-23 15:37:24 +02:00
Ken 95dba94df4 [LLM] Added scoped instructions 2026-04-23 15:33:11 +02:00
Ken c5413d65c9 [LLM] Update root instruction 2026-04-23 15:09:10 +02:00
Ken 5884628710 [DataTable] Optimize item parsing with map 2026-04-23 14:30:42 +02:00
Ken c33cdad6e5 [DataTable] Refactor contract between rendring rows and sub-rows 2026-04-23 14:06:29 +02:00
Ken f7fdd35ff0 [DataTable] Still render rows without nesting 2026-04-23 12:51:09 +02:00
Ken 9a0f5dbf45 [DataTable] Remove old use of expansioncontext for nested rows 2026-04-23 12:20:30 +02:00
Ken fd0de677ad [DataTable] Refactor nested use of context 2026-04-23 12:15:02 +02:00
Ken bb709aeb35 [DataTable] Use new items context to render nested rows 2026-04-23 12:09:09 +02:00
Ken cac3c38cff [DataTable] ⚡ Optimize item parsing 2026-04-23 11:27:45 +02:00
Ken d4063849a8 [DataTable] ⚡ Memorize parsing 2026-04-23 10:15:44 +02:00
Ken fccf5bafdb [DataTable] Add global index counter when traversing rows 2026-04-23 10:04:49 +02:00
Ken df075c7ec8 🐛 Sync yarn.lock 2026-04-22 21:36:51 +02:00
Ken 0672fc6cee [LLM] Updated categories in LLM.md 2026-04-22 21:13:41 +02:00
Ken 088d65a63b [LLM] Added tailwind config route 2026-04-22 21:01:56 +02:00
Ken 11dc6bf0c6 [DataTable] WIP nested item hook 2026-04-22 20:45:46 +02:00
Ken 7f127ad5b0 [DataTable] 🎉 Added nested row handling --no-verify 2026-04-22 20:26:13 +02:00
Halvor Haugan 5885a70c41 DataTable: Remove code that was not supposed to be pushed 2026-04-22 15:12:47 +02:00
Halvor Haugan 7e23ed71e7 DataTable: Add support for col resize with Home and End 2026-04-22 15:01:21 +02:00
Ken 9205952283 [DataTable] Added check for exandable data in nested rows 2026-04-22 13:08:42 +02:00
Ken f70bb419e8 [DataTable] Added separate toggles for nested and master-detail pattern 2026-04-22 12:49:48 +02:00
Ken b22c98d215 [DataTable] Added more nested rows stories 2026-04-22 12:32:03 +02:00
Halvor Haugan 1efadf3df3 DataTable: Fix SR issue related to col resizing 2026-04-22 11:49:55 +02:00
Halvor Haugan bc69e8cfbd DataTable: Avoid setting onClick on <tr> if not needed 2026-04-22 11:47:55 +02:00
Halvor Haugan 8198d53ecc DataTable: Adjust when column header gets hover/active background 2026-04-22 09:59:27 +02:00
Ken cb03a70eb2 [DataTable] Added styling for ensted rows 2026-04-21 15:34:54 +02:00
Ken cdad58bdbb [DataTable] Added subrows 2026-04-21 15:34:54 +02:00
Ken e3830c70c2 [DataTable] Added getSubRows prop 2026-04-21 15:34:54 +02:00
Ken 607259ee75 🏷️ Typo 2026-04-21 15:34:53 +02:00
Halvor Haugan 55e41f44ad DataTable: Auto-size column to fit content on double click 2026-04-21 15:28:05 +02:00
Halvor Haugan 443754ebc3 DataTable: Fix type error 2026-04-21 13:05:11 +02:00
Halvor Haugan a49b9925a6 DataTable: role=slider on resize handle for improved (?) a11y 2026-04-21 12:43:20 +02:00
Halvor Haugan dbf498264a Storybook: improved types in main and preview config (#4828) 2026-04-21 11:55:06 +02:00
Halvor Haugan 081f6b14b4 Sync react versions 2026-04-21 09:40:48 +02:00
Halvor Haugan e28d875d46 createMainChangelog: Order changelogs deterministically (#4827) 2026-04-21 09:36:11 +02:00
dependabot[bot]andKen 99393696ee Bump next from 16.2.0 to 16.2.3 in /aksel.nav.no/website in the npm_and_yarn group across 1 directory (#4796)
* ⬆️ Bump next

Bumps the npm_and_yarn group with 1 update in the /aksel.nav.no/website directory: [next](https://github.com/vercel/next.js).


Updates `next` from 16.2.0 to 16.2.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v16.2.0...v16.2.3)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.2.3
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Update nextjs

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-21 09:34:19 +02:00
Halvor Haugan 255131b4bd Modal: Separate story for small size (#4826) 2026-04-21 09:33:52 +02:00
ec7beb2b37 Bump react-dom from 19.2.4 to 19.2.5 in the react group across 1 directory (#4819)
* Bump react-dom from 19.2.4 to 19.2.5 in the react group

Bumps the react group with 1 update: [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom).


Updates `react-dom` from 19.2.4 to 19.2.5
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.5/packages/react-dom)

---
updated-dependencies:
- dependency-name: react-dom
  dependency-version: 19.2.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: react
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Update react and react-dom

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-21 09:29:02 +02:00
dependabot[bot]andKen 396f2641d7 Bump swr from 2.4.0 to 2.4.1 (#4822)
* Bump swr from 2.4.0 to 2.4.1

Bumps [swr](https://github.com/vercel/swr) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](https://github.com/vercel/swr/compare/v2.4.0...v2.4.1)

---
updated-dependencies:
- dependency-name: swr
  dependency-version: 2.4.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🎉 Sync SWR versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-20 19:11:57 +02:00
c94f87e6dc [Markdown] Added Markdown routes for each page, ikon-page and design-tokens (#4814)
* 🎉 Added unpacked enums

* 🎉 Updated queries

* ⬆️ yarn update

* 🎉 Added markdown-docs for each page

* 🎉 Added regular link interception

* 🎉 Added design-token route

* 🎉 Added icon-documentation

* 🎉 Add static paths to root llm.md

* Update aksel.nav.no/website/scripts/update-props.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/sanity/interface/queries.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Fix naming

* Update aksel.nav.no/website/sanity/interface/queries.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ♻️ Small refactors to config and comments

* 🐛 Update types after enum addition

* 🏷️ Update query-types

* Update aksel.nav.no/website/app/api/markdown/routes/design-tokens.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Use -

* 🐛 Resolve em-dash

* 📝 Updated token formatting

* 📝 Updated docs

* 🏷️ Rename enum -> unpackedTypes

* 🏷️ Rename enum -> unpackedTypes

* 📝 Update schema

* Update aksel.nav.no/website/app/api/markdown/llm.config.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/api/markdown/routes/grunnleggende.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/api/markdown/routes/design-tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/api/markdown/routes/design-tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Fix typo

* 🔒 Security updates

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-20 19:11:37 +02:00
dependabot[bot]andKen 1c2a43dba8 Bump the vitest group across 1 directory with 4 updates (#4821)
* Bump the vitest group with 4 updates

Bumps the vitest group with 4 updates: [@vitest/browser](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser), [@vitest/browser-playwright](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/browser` from 4.1.0 to 4.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.4/packages/browser)

Updates `@vitest/browser-playwright` from 4.1.0 to 4.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.4/packages/browser-playwright)

Updates `@vitest/coverage-v8` from 4.1.0 to 4.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.4/packages/coverage-v8)

Updates `vitest` from 4.1.0 to 4.1.4
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.4/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/browser"
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/browser-playwright"
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 4.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Update vitest

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-20 14:16:59 +02:00
dependabot[bot] 697d1a2793 Bump the storybook group with 9 updates (#4820)
Bumps the storybook group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `10.2.10` | `10.3.5` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.2.10` | `10.3.5` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `10.2.10` | `10.3.5` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `10.2.10` | `10.3.5` |
| [@storybook/nextjs-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `10.2.10` | `10.3.5` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.2.10` | `10.3.5` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.2.10` | `10.3.5` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.2.10` | `10.3.5` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `10.3.0` | `10.3.5` |


Updates `@storybook/addon-a11y` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/addons/a11y)

Updates `@storybook/addon-docs` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/addons/docs)

Updates `@storybook/addon-themes` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/addons/themes)

Updates `@storybook/addon-vitest` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/addons/vitest)

Updates `@storybook/nextjs-vite` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/lib/eslint-plugin)

Updates `storybook` from 10.2.10 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/core)

Updates `storybook-addon-pseudo-states` from 10.3.0 to 10.3.5
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.3.5/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/nextjs-vite"
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 10.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-20 14:14:43 +02:00
KenandCopilot d36ee0fcd7 [Sanity/Ai] Unpack enum-props so that markdown-docs can have better docs for AI (#4812)
* 🎉 Added unpacked enums

* 🎉 Updated queries

* ⬆️ yarn update

* Update aksel.nav.no/website/scripts/update-props.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/sanity/interface/queries.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Fix naming

* Update aksel.nav.no/website/sanity/interface/queries.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Update types after enum addition

* 📝 Updated docs

* 🏷️ Rename enum -> unpackedTypes

* 🏷️ Rename enum -> unpackedTypes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-20 14:06:58 +02:00
github-actions[bot] 13cb816166 Version Packages (#4824)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-20 13:28:26 +02:00
KenandHalvor Haugan f66236c371 [Modal] 🐛 Changing Modal-size had no effect before (#4823)
* 🐛 Changing Modal-size had no effect before

* 📝 Add default jsdoc

* Update .changeset/chilly-llamas-show.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-20 13:18:54 +02:00
Halvor Haugan 11463cebc3 DataTable: Disable keyboard nav when trying to resize col with arrow keys 2026-04-20 12:50:53 +02:00
Halvor Haugan 5f3c6541fd DataTable: Remove default padding on sort-button and cells 2026-04-20 12:48:22 +02:00
github-actions[bot] 756c9578eb Version Packages (#4789)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-20 11:14:15 +02:00
Halvor Haugan 2eab5b9564 DatePicker: Highlight days between start and hovered day (#4801) 2026-04-20 09:53:52 +02:00
Ken c037bc4733 📝 Add todos 2026-04-19 12:48:29 +02:00
Halvor HauganandCopilot 794bf825a5 [Docs] Adjust CONTRIBUTING.md in aksel-icons (#4817)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-17 16:42:56 +02:00
Ken 33b8b279a6 Revert -> Website: Test LLM llm uA 2026-04-17 16:36:56 +02:00
Ken 5c8c77503c Website: Test LLM llm uA 2026-04-17 16:16:03 +02:00
Ken 55b48252a9 [Timeline] When row has focus, focus first or last period based on arrow-keys (#4816)
* 🎉 Added fallbacks when row is active

* 🐛 Fix typo
2026-04-17 15:57:11 +02:00
Ken df8fb7e3e9 [DataTable] Avoid selecting rows that are disabled 2026-04-17 14:54:18 +02:00
Ken c096f46beb 🐛 Fix typo-sizing, header-padding for infocard and alerts (#4815)
* 🐛 Fix typo-sizing, header-padding for infocard and alerts

* 🔥 Removed comments

* 📝 Update changeset

* 💄 Optical align infocard header

* ♻️ Use size directly

* 📝 Updated comments
2026-04-17 13:43:59 +02:00
KenandHalvor Haugan f491aaec70 [Timeline] Enhance keyboard navigation, optimize pin interactions, period-scaling (#4809)
* 🐛 Add onClick handler for Pin

* ⚡ Added keyboard-nav between rows

* ⚡ Refactor keyboard-handler

* 🎉 Added pins to keyboard-nav

* ⚡ Added early returns

* ⚡ Optimize re-renders

* 💄 Hide icons on smallest periods

* 💄 Update icon sizing based on width

* 🧪 Timeline nav tests

* 📝 Changeset

* ⚰️ Clean up unused state, avoid navigating when inside popovers

* 🐛 Avoid preventDefault on event if no focus is done

* 🐛 Return focus to element that opened popover

* Update @navikt/core/react/src/timeline/hooks/TimelineKeyboardNavProvider.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Refactor ref-handling

* Update @navikt/core/react/src/timeline/hooks/TimelineKeyboardNavProvider.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ Updated memorization

* ⚡ Move util outside of component

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-17 13:43:31 +02:00
Anniken GranbergandCopilot Autofix powered by AI 139805d5b4 ExpandableRow: Top border disappeared on selected rows when row above was collapsed (#4810)
* ExpandableRow: Fix selected row top border not showing when row above was collapsed

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* more spesific css selector

* Wrote wrong classname 🤦‍♀️

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-17 10:13:35 +02:00
Halvor HauganandKen eceeb3855a ⬆️ Upgrade Sanity to 5.20 (and related packages) (#4813)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-17 08:58:50 +02:00
Halvor Haugan 67ee836fb6 Sync vite versions 2026-04-16 17:29:13 +02:00
391018ed29 Typescript 6.0.2 update: Fix type and build issues (#4786)
* Bump typescript from 5.9.3 to 6.0.2

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync typescript version across repo

* 🐛 Fix build-errors

* 🐛 Fix type-errors in daypicker, ignore tsbuildinfo

* 🐛 Resolve CLI type-errors

* 🐛 Fix TS 6.0 issues

* 🐛 Fix codemod issues

* ⚡ Utility for extracting strings and literals

* 🔥 Removed comments

* Apply suggestions from code review

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Review updates

* ⬆️ Update ts for playroom

* ⬆️ yarn update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-16 16:17:28 +02:00
Ken 12a584f9ab [DataTable] Resolve context issue 2 2026-04-16 13:37:08 +02:00
Halvor Haugan f57ef4323d [website] Update examples of InternalHeader and Timeline (#4805) 2026-04-16 12:47:46 +02:00
Ken f73546039b [DataTable] Resolve context issue 2026-04-16 11:40:35 +02:00
Ken 563aa6530a [DataTable] Resolve context issue 2026-04-16 11:38:58 +02:00
Ken 9726f26c53 [DataTable] Add missing prop to context 2026-04-16 10:37:58 +02:00
Ken 25cc71c6e0 [DataTable] Allow rendring data with loading state enabled, instead making body inert 2026-04-16 10:18:07 +02:00
Ken 2f70ea3101 [DataTable] Avoid triggering onRowClick on cells with actions 2026-04-16 09:53:08 +02:00
Ken 476804b90c [DataTable] Move onRowClick to Row itself trough context 2026-04-16 09:38:03 +02:00
Ken c7d2a8a3aa [DataTable] Auto refactors 2 bogaloo 2026-04-16 09:23:01 +02:00
Ken e0b2bee5f0 [DataTable] Auto refactors 2026-04-16 09:18:31 +02:00
Ken 36fa158dc8 [DataTable] Added Expandable Rows and onRowClick 2026-04-15 16:09:42 +02:00
d23551b7da sporing-dev.js script + potentially useful tracking events (#4800)
* use the sporing-dev tracking script in dev, no longer use data-host-url

* ➕ add taxonomy package + use it

* fix: expose PRODUCTION env var to client via nextConfig.env

Agent-Logs-Url: https://github.com/navikt/aksel/sessions/08c505b1-b087-431b-bd30-41b9956c320d

Co-authored-by: JulianNymark <819074+JulianNymark@users.noreply.github.com>

* Update aksel.nav.no/website/app/_ui/code-block/CodeBlock.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add missing \"use client\" to components using umamiTrack

* fix: keep WebsiteExpansionCard as server component, extract onToggle tracking to thin client wrapper

* do not track actual search strings

* fix: send placement as lenkegruppe and actual link text as lenketekst in UmamiLink

* 🐛 Resolve render-issues

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JulianNymark <819074+JulianNymark@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-15 13:56:32 +02:00
Anniken Granberg 3f0efd7dc4 DataTable/dnd: add label 2026-04-15 13:16:38 +02:00
Ken 63f5aaf2f4 🐛 Make sure text-variant for Skeleton has properly rounded edges (#4808) 2026-04-15 12:49:34 +02:00
Anniken Granberg ee95122ec1 DataTable: fix types 2026-04-15 10:29:07 +02:00
Anniken Granberg e8f90be978 DataTable: Add label to columnDefinition and changed item type for dnd 2026-04-15 10:26:51 +02:00
Ken 2c0ee8d2ca [DataTable] Added onRowClick 2026-04-14 15:57:11 +02:00
Ken 8d708b1ef8 [DataTable] Auto version feature addons
[DataTable] Refactor loading state and body rendring.

[DataTable] Added emptyState prop

[DataTable] Removed render-prop for custom filterMenu

[DataTable] Updated stickyColumns jsdoc

[DataTable] Added loading states

[DataTable] Added loading label, better handling of colspan in loading/empty-state
2026-04-14 14:36:33 +02:00
Ken 3e4c2deced [DataTable] Added shift click sort support 2026-04-14 13:33:31 +02:00
Ken 0101acd2e0 [DataTable] Added sorting API to table auto 2026-04-14 12:55:28 +02:00
Halvor Haugan 14dc7b3775 Update vscode settings (#4804) 2026-04-14 11:16:06 +02:00
Ken 64d07ad527 🧪 Improve test-suite for storybook 2026-04-14 10:25:48 +02:00
Ken 99f04a8129 [DataTable] Refactor DataTableContextProvider 2026-04-14 10:25:48 +02:00
Ken 75c62c4e92 [DataTable] Refactor getRowIds use 2026-04-14 10:25:48 +02:00
Ken 0055a744c1 [DataTable] Move table ref-state to hook 2026-04-14 10:25:48 +02:00
Halvor Haugan e6c5b9b868 ⬆️ Upgrade Vite to 7.3.2 / 8.0.5 2026-04-14 09:35:20 +02:00
dependabot[bot] a245d0dbfb ⬆️ Bump vite from 7.3.1 to 7.3.2 (#4802)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.3.1 to 7.3.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v7.3.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.3.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.3.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 09:27:22 +02:00
Anniken Granberg e09bbdc0fe DataTable / dnd: Added announcer, changed some props, better (?) labels 2026-04-14 09:19:26 +02:00
Ken 873724d1f4 [DataTable] Fix filler-cell taking space when not needed, added fixed layout stories 2026-04-13 16:13:33 +02:00
Halvor HauganandKen 004d0fc547 DatePicker: Reset range when selecting a new day, upgrade react-day-picker (#4799)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-04-13 16:07:40 +02:00
Ken cc37a94093 [DataTable] Fix resizable handle overflow and clipping 2026-04-13 15:00:59 +02:00
Ken 46bc3c92b3 [DataTable] Fix border overflow when sticky 2026-04-13 14:40:37 +02:00
Ken 7782b83105 Patch Axios to v1.15 (#4798)
* Path CVE 10 axios error. Axios 1.15 patch

* 🔥 Removed preApproved for axios
2026-04-13 11:32:26 +02:00
Ken 5f79eeade6 [DataTable] Added header sticking with column sticking 2026-04-13 09:51:17 +02:00
Ken 471635d518 [DataTable] Added column sticking 2026-04-11 17:21:09 +02:00
Anniken Granberg b4a1dd72db DataTable/dnd: Accessibility, renaming, cancel event, rewrite 2026-04-10 14:50:28 +02:00
Halvor Haugan a714e05c56 [website] Fix typo in LegacyTokenTable (#4795) 2026-04-10 14:41:28 +02:00
Ken 9daea7aa21 [DataTable] Forward row and col-span 2026-04-10 14:27:05 +02:00
Ken 0303d825fa [DataTable] Split column header and generic TH-cell 2026-04-10 14:06:29 +02:00
Ken c6ac943c88 [DataTable] added sticky column prop 2026-04-10 14:06:29 +02:00
Ken 0551a90951 [DataTable] Fix CSS for genetic cell 2026-04-10 14:06:29 +02:00
fbfd1656e2 ⬆️ Bump eslint-plugin-react-hooks from 5.2.0 to 7.0.1 (#4447)
* ⬆️ Bump eslint-plugin-react-hooks from 5.2.0 to 7.0.1

Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 5.2.0 to 7.0.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-hooks
  dependency-version: 7.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 update config

* 🏷️ Lint-updates

* eslint-disable combobox.stories, ErrorSummary, Dropzone

* Add disable comments in modal.stories.tsx

* Add eslint-disable comment in LinkAnchor

* eslint-disable in generic-error-page.tsx

* disable ref rule and ignore remaining lint errors

* inline

* fix yarn.lock

* CRLF -> LF

* New attempt at fixing lockfile

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-10 13:07:28 +02:00
Ken 4b674930c5 🐛 Resolve test-errors after data-table update 2026-04-10 13:02:50 +02:00
Ken 2128e94a1b 🎉 Added formatting to pre-push command 2026-04-10 13:00:55 +02:00
Ken f381a3b9c7 🎉 Added pre-push command to run tests before pushing to main 2026-04-10 12:59:00 +02:00
Ken dec64b021f [DataTable] TdCell uses genetic cell 2026-04-10 12:51:54 +02:00
Ken af95682d22 [DataTable] Generic cell boilerplate 2026-04-10 12:45:33 +02:00
Ken cf0f7c3b79 [DataTable] JSDoc update 2026-04-10 12:30:26 +02:00
Ken 1d19f27008 [DataTable] JSDoc update 2026-04-10 12:21:02 +02:00
Ken 52b4dcd7b6 [DataTable] Rename selection disabled props 2026-04-10 12:18:49 +02:00
Ken 3822bf50fa [DataTable] Removed unused labels for checkbox and radio 2026-04-10 12:01:06 +02:00
Ken 99ce4399fa [DataTable] optimize selection hook 2026-04-10 11:55:09 +02:00
Ken 3d693351fe [Actions] Matrix resolver for container cleanup 2026-04-10 11:40:22 +02:00
Ken 93872c5573 Revert: [Actions] allow chaning number of deleted images from ghp 2026-04-10 10:33:21 +02:00
Ken 2f0a99e744 [Actions] allow chaning number of deleted images from ghp 2026-04-10 10:29:32 +02:00
Ken af5e83d613 [DataTable] Improved selecting + pagination logic, added todos 2026-04-10 10:25:40 +02:00
Ken 6b64f271cf [Timeline] ♿ Improved JAWS support with click-handler for period-popups (#4793)
* ♿ Improved JAWS support with click-handler for period-popups

* 🐛 Allow mouse-events to toggle clickable-period popup
2026-04-10 09:31:09 +02:00
Halvor Haugan 1ea580482e [website] Show clear button on sidebar filter input 2026-04-09 14:38:13 +02:00
Halvor Haugan cf9c5ef2c4 InlineMessage: Improve screen reader experience (#4792) 2026-04-09 12:21:31 +02:00
Ken 9f15a817a0 🐛 Revert locale update from backup 2026-04-09 11:45:51 +02:00
dependabot[bot] e9067600fc Bump lodash-es from 4.17.23 to 4.18.1 (#4791)
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.23...4.18.1)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.18.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 11:34:37 +02:00
Halvor Haugan 363a6061bd CheckboxGroup: Set aria-invalid on error (#4790) 2026-04-09 09:39:42 +02:00
dependabot[bot] 37bad55c75 Bump mlly from 1.8.0 to 1.8.2 (#4787)
Bumps [mlly](https://github.com/unjs/mlly) from 1.8.0 to 1.8.2.
- [Release notes](https://github.com/unjs/mlly/releases)
- [Changelog](https://github.com/unjs/mlly/blob/main/CHANGELOG.md)
- [Commits](https://github.com/unjs/mlly/compare/v1.8.0...v1.8.2)

---
updated-dependencies:
- dependency-name: mlly
  dependency-version: 1.8.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 09:21:59 +02:00
Anniken Granberg acdcd29f70 DataTable/Dnd: Add buttons for rearranging items, deactivate active handler on outside click, disble dragging on active handle 2026-04-08 16:42:35 +02:00
Ken 45d87ce21d [DataTable] 🐛 Add data-type to column-definition 2026-04-08 15:31:19 +02:00
Ken bfe01c316a [DataTable] 🐛 Selection-state css 2026-04-08 15:05:01 +02:00
Ken 8f6286d081 [DataTable] 🐛 handle type-errors 2026-04-08 14:56:43 +02:00
Ken a5240353b8 [DataTable] Added datatable stories 2026-04-08 14:53:10 +02:00
Ken b9612e348e [DataTable] Extracted selected cell width as a constant 2026-04-08 14:53:09 +02:00
Ken 60624d4a8a [DataTable] Optimize checked and disabled lookup 2026-04-08 14:53:09 +02:00
Ken 072b24d46e [DataTable] Handle single-select and disabled keys better 2026-04-08 14:53:09 +02:00
Ken 28b5dea3d3 [DataTable] Update CSS to show disabled state in standalone mode 2026-04-08 14:53:08 +02:00
Halvor Haugan 741a270eed ⬆️ Upgrade Biome to 2.4.10 (#4788) 2026-04-08 14:05:28 +02:00
Halvor Haugan 3c128e12a5 RadioGroup: Set role=radiogroup, and set aria-invalid on error (#4773) 2026-04-08 13:38:47 +02:00
Ken 658b44fa46 [DataTable] Add accessible labels to selection inputs 2026-04-08 13:31:44 +02:00
Ken 4c4cd1ef02 [DataTable] Remove 'all' from selection type API 2026-04-08 13:31:44 +02:00
Ken 9ee70a881a [DataTable] Unique names for radio 2026-04-08 13:31:43 +02:00
Ken e20f669c79 [DataTable] Derive selected state from context 2026-04-08 13:31:43 +02:00
Halvor Haugan 4d5639a31b Box: Fix typo in JSDoc 2026-04-08 13:06:17 +02:00
Halvor Haugan 6e3421189f [website] Remove the word "statisk" from InfoCard examples 2026-04-08 12:56:04 +02:00
Ken 77fc4fdefc [DataTable] Fix type-error 2026-04-08 11:49:10 +02:00
Halvor Haugan 50688d5b07 ⬆️ Upgrade lodash 2026-04-08 11:42:37 +02:00
Ken 4e49f74470 [DataTable] Update Selectionstate to be rendered within tablerows 2026-04-08 11:38:41 +02:00
dependabot[bot] 8d9e46a528 Bump @vitest/eslint-plugin from 1.6.9 to 1.6.14 in the vitest group (#4785)
Bumps the vitest group with 1 update: [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest).


Updates `@vitest/eslint-plugin` from 1.6.9 to 1.6.14
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.6.9...v1.6.14)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 11:34:00 +02:00
Halvor Haugan db94a7eb4c Upgrade deps in examples/astro 2026-04-08 11:30:28 +02:00
Halvor Haugan c4dcc61dfb Merge branch 'main' of github.com:navikt/aksel 2026-04-08 11:18:41 +02:00
Halvor Haugan 12a4b6af33 Delete lock files in examples, and exclude package.jsons in Dependabot 2026-04-08 11:18:08 +02:00
Ken 167c474668 🐛 Update CSP header for umami (#4784) 2026-04-08 11:18:04 +02:00
Halvor Haugan 522285238b Empty lock files in examples to prevent Dependabot touching them 2026-04-08 10:02:25 +02:00
Ken ac8cba2cf4 [DataTable] Fixed checkbox alignment 2026-04-08 09:10:17 +02:00
Halvor HauganandKen d1c7d72a0d 🚨 Linting: Use Biome to find import cycles instead of eslint (#4768)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-04-07 16:16:28 +02:00
Ken bb6726b1ee ⬅️ Revert release-packages workflow name update to avoid NPM packages release issues 2026-04-07 16:15:38 +02:00
github-actions[bot] c0a7be2008 Version Packages (#4782)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-07 15:59:40 +02:00
KenandHalvor Haugan a3743a6b37 [Workflows] 🧹 Better naming, grouping and texts (#4767)
* 📝 Update workflows with better naming, texts and permissions

* 📝 Name updates

* 🎉 Clean up images used for testing

* 🔥 Removed unused deploy tag

* Update .github/workflows/build-validation.yml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update .github/workflows/build-validation.yml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Clean up permissions

* Update .github/workflows/deploy-prod-gcp.yml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Sync sanity texts

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-07 14:57:03 +02:00
Ken 47d74be1a0 🐛 Sync datepicker input button with input itself (#4781)
* 🐛 Sync datepicker input button with input itself

* 🔥 removed non needed width and height definition
2026-04-07 14:56:19 +02:00
Ken bff180ad42 [DataTable] 🐛 Remove row-selection from not-yet-implemented simple kitchen-sink demo 2026-04-07 13:39:58 +02:00
Ken 14bcb500d0 [DataTable] Add selection mode to kitchen-sink demo 2026-04-07 13:33:51 +02:00
Ken 9014bf0073 [DataTable] Added selection css for testign 2026-04-07 13:19:06 +02:00
93465781c1 [Checkbox, Radio] Inline inputs for use internally in DataTable (#4760)
* 🎉 Added checkbox-item component

* 🔥 Removed hardcoded sr-only classname

* 🎉 unpack props for better destructuring

* 🎉 Working standalone radio and checkbox inputs

* 🎉 Use standalone inputs in table

* 📝 Changeset

* Update @navikt/core/react/src/form/radio/radio-input/RadioInput.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/react/src/form/checkbox/checkbox-input/CheckboxInput.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Forward className

* 🐛 Story value fix

* Update @navikt/core/css/src/form/radio-checkbox.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 JSDOC update

* 🐛 Hide margin when empty SR-text

* 📝 added hidelegend story

* 🔥 removed css-var declarations on root css

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-04-07 12:48:47 +02:00
Halvor Haugan f7393f7515 Button: Use correct text color when inherited data-color is "neutral" (#4772) 2026-04-07 11:52:52 +02:00
dependabot[bot]andKen 890db16c2a Bump yaml from 1.10.2 to 1.10.3 (#4777)
Bumps [yaml](https://github.com/eemeli/yaml) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: yaml
  dependency-version: 1.10.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-04-07 10:09:16 +02:00
dependabot[bot] 08e3457314 Bump path-to-regexp from 0.1.12 to 0.1.13 (#4779)
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 0.1.12 to 0.1.13.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/v.0.1.13/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.12...v.0.1.13)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-version: 0.1.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 09:46:30 +02:00
dependabot[bot] 8cd871403c Bump picomatch from 2.3.1 to 2.3.2 (#4776)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 09:30:56 +02:00
Anniken Granberg b6e3c7dc2e DataTable: fix errors 2026-03-27 17:18:22 +01:00
Anniken Granberg 956e1c10c7 DataTable: Allow onClick on drag handlerr 2026-03-27 17:14:49 +01:00
Anniken Granberg 08020c7aff DataTable: fix error 2026-03-27 16:08:19 +01:00
Anniken Granberg ba547bbad7 DataTable: Make item overlay same width as item 2026-03-27 15:24:52 +01:00
Halvor Haugan fd2bbd3de0 Update ActionMenu shortcuts example (#4774) 2026-03-27 14:20:47 +01:00
Ken f23f6855ad [DataTable] TokenFilter chips WIP 2026-03-27 14:00:09 +01:00
Ken a06dcabfc7 [DataTable] TokenFilter input layout 2026-03-27 14:00:09 +01:00
Ken e804a857af [DataTable] KitchenSink with tokenfilter 2026-03-27 14:00:09 +01:00
Ken 70c255aebc [DataTable] Story cleanup 2026-03-27 14:00:08 +01:00
Halvor Haugan fe21575a8d Update changeset format in PR template 2026-03-27 13:29:37 +01:00
github-actions[bot] f5d0a158d1 Version Packages (#4759)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 13:20:27 +01:00
Ken b359130706 [DataTable] layout-story updates 2026-03-27 11:34:02 +01:00
Ken d76d3cc30b [DataTable] Update pagination and toolbar view 2026-03-27 09:52:48 +01:00
Ken 112f5f97db 📝 Disable autocomplete in tokenfilter 2026-03-27 09:52:48 +01:00
Ken 4811920686 🔒 Disable scripts when running yarn install for sercurity (#4766) 2026-03-27 09:45:18 +01:00
Halvor Haugan c894748316 Run in-sync-versions.ts in CI instead of pre-commit (#4769) 2026-03-27 08:56:23 +01:00
Halvor Haugan 6d5ef574cd Sync vitest versions (#4770) 2026-03-27 08:56:09 +01:00
Ken 5a911b469e [DataTable] Removed actionbar, updated toolbar 2026-03-26 20:59:14 +01:00
Ken 192db60c20 [DataTable] TokenFilter + listbox updates 2026-03-26 20:32:58 +01:00
Ken c041bcd8ca ⬆️ nextjs (#4771) 2026-03-26 16:55:21 +01:00
Ken 86f86d3760 [InternalHeader] 🎉 Added 'isActive'-prop to InternalHeaderButton. (#4761)
* 🎉 Added 'isActive'-prop to InternalHeaderButton.

* 🐛 Use actual links in story view

* review updates: aria-current, forced-colors and taller line

* 🐛 Allow user to override aria-current
2026-03-26 15:36:21 +01:00
Ken c2e123d403 🔊 Clean up boot command output 2026-03-26 15:22:50 +01:00
Ken 58a413d98d 🐛 revert story test enabling for flaky tests 2026-03-26 14:49:57 +01:00
Ken 4bb0edddad 🧹 Misc test and comment cleanup 2026-03-26 13:39:54 +01:00
Anniken Granberg df8979ff50 DataTable: try to fix dependecy cicle linting fail 2026-03-26 13:18:09 +01:00
Ken 7771731b0f 🔊 Add deployment permissions to show deployments when publishing 2026-03-26 12:29:30 +01:00
Halvor Haugan 6fdf8f1782 Change clean script to use glob from node (#4763) 2026-03-26 12:21:29 +01:00
Anniken Granberg 5d61d5269a DataTable: comment 2026-03-23 18:26:17 +01:00
Anniken Granberg 33a5d8a85c DataTable: comments 2026-03-23 18:22:41 +01:00
Anniken Granberg 42a8c75184 DataTable: new native dnd component 2026-03-23 18:22:41 +01:00
Anniken Granberg 9cefd6e73d DataTable: rename files 2026-03-23 18:22:41 +01:00
Anniken Granberg 097a506a19 DataTable: Rename, removed data in front 2026-03-23 18:22:41 +01:00
dependabot[bot] 46dcee3636 Bump the vitest group with 4 updates (#4753)
Bumps the vitest group with 4 updates: [@vitest/browser](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser), [@vitest/browser-playwright](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@vitest/browser` from 4.0.18 to 4.1.0
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.0/packages/browser)

Updates `@vitest/browser-playwright` from 4.0.18 to 4.1.0
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.0/packages/browser-playwright)

Updates `@vitest/coverage-v8` from 4.0.18 to 4.1.0
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.0/packages/coverage-v8)

Updates `vitest` from 4.0.18 to 4.1.0
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.0/packages/vitest)

---
updated-dependencies:
- dependency-name: "@vitest/browser"
  dependency-version: 4.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
- dependency-name: "@vitest/browser-playwright"
  dependency-version: 4.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
- dependency-name: vitest
  dependency-version: 4.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 14:20:26 +01:00
Halvor Haugan 72a9131aee DatePicker, MonthPicker: Make open button more prominent (#4751) 2026-03-23 14:05:17 +01:00
dependabot[bot] 4a9d358d0a Bump vite-tsconfig-paths from 6.1.0 to 6.1.1 (#4758)
Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases)
- [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v6.1.0...v6.1.1)

---
updated-dependencies:
- dependency-name: vite-tsconfig-paths
  dependency-version: 6.1.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 13:59:54 +01:00
Halvor Haugan 14f1491cce Dependabot: Try excluding lockfiles in examples dir (#4756) 2026-03-23 13:27:53 +01:00
Halvor Haugan ad9978fb93 lint-staged: make biome ignore attempts to lint ignored files 2026-03-23 10:44:49 +01:00
dependabot[bot] 04c4414de5 Bump lint-staged from 16.2.7 to 16.4.0 (#4754)
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 16.2.7 to 16.4.0.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.2.7...v16.4.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 10:24:40 +01:00
dependabot[bot] fa7ae4ec6f Bump esbuild from 0.27.3 to 0.27.4 (#4755)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.27.3 to 0.27.4.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.27.3...v0.27.4)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.27.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 09:48:33 +01:00
Anniken Granberg 94c6e5cf79 [Website] Add aria-current attribute to navigation links for improved… (#4750)
* [Website] Add aria-current attribute to navigation links for improved accessibility

* Use const value and use true instead of page
2026-03-23 09:48:24 +01:00
Halvor Haugan 0e8e4fc4a2 ⬆️ Bump flatted to 3.4.2 2026-03-23 09:47:21 +01:00
dependabot[bot]andHalvor Haugan ecef57a167 Bump next from 16.1.6 to 16.1.7 in /aksel.nav.no/website in the npm_and_yarn group across 1 directory (#4752)
* Bump next

Bumps the npm_and_yarn group with 1 update in the /aksel.nav.no/website directory: [next](https://github.com/vercel/next.js).


Updates `next` from 16.1.6 to 16.1.7
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v16.1.6...v16.1.7)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.1.7
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* lockfile

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-03-23 09:44:51 +01:00
Ken 666616232d [LLM] Added grunnleggende and templates LLM-docs 2026-03-21 20:54:04 +01:00
Ken b607e20964 [LLM] Set up templates and grunnleggende 2026-03-21 20:32:00 +01:00
Ken a093c9385a [DataTable] Selection API refactor 2026-03-21 19:41:04 +01:00
Ken 9889b16500 [DataTable] Added more flexibility to row id creation 2026-03-21 19:41:03 +01:00
Halvor Haugan 1273dcd586 ⬆️ Upgrade deps in /examples 2026-03-20 19:33:18 +01:00
Halvor Haugan 2342b687ce Biome/eslint adjustments (#4749) 2026-03-20 15:35:29 +01:00
github-actions[bot] cf5d3e98c5 Version Packages (#4718)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-20 15:01:04 +01:00
Halvor Haugan b990be4ee8 Chromatic: update externals value (#4748) 2026-03-20 13:12:11 +01:00
KenandHalvor Haugan c3b06bdc80 [Dialog] Links are now a valid focusable target when tabbing (#4747)
* 🧪 set up failing story test

* Dialog: Fixed issue where tabbing would not work when focusable element was a link

* Update .changeset/rare-seas-trade.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-03-20 12:48:46 +01:00
dependabot[bot] 82c00e2591 Bump flatted from 3.3.3 to 3.4.1 (#4746)
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.3 to 3.4.1.
- [Commits](https://github.com/WebReflection/flatted/compare/v3.3.3...v3.4.1)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 12:09:46 +01:00
Ken 5756986070 GlobalAlert, LocalAlert: Content outline changed from 4px to 2px. (#4745) 2026-03-20 11:34:32 +01:00
Ken 738813046f [InfoCard] InfoCardMessage sub-component (#4717)
* 🎉 Added new sub-component for InfoCard: InfoCard.Message

* 📝 Jsdocs

* Apply suggestion from @KenAJoh

* 📝 Update jsdoc

* 💄 Refactor composition

* ♻️ Review updates

* 📝 Jsdocs

* ♻️ Remove data-size attrb from message-component

* 📝 examples
2026-03-20 11:29:42 +01:00
dependabot[bot] e942e77281 Bump undici from 6.23.0 to 6.24.0 (#4743)
Bumps [undici](https://github.com/nodejs/undici) from 6.23.0 to 6.24.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.23.0...v6.24.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.24.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 09:58:42 +01:00
Ken e422ab4292 [LLM] Formatting cleanup 2026-03-20 09:30:56 +01:00
Ken b7f826a2a7 [LLM] Formatting cleanup for better token usage 2026-03-19 13:54:11 +01:00
Ken 71dc4693a1 [LLM] Now prints all react-component documentation 2026-03-19 13:32:21 +01:00
Ken 4bb3ef19fc [LLM] Added llm.md route on root for testing (currently disabled) 2026-03-19 13:05:37 +01:00
Halvor Haugan c44f921b4c Fieldset: Adjust examples (#4742) 2026-03-19 12:23:58 +01:00
Ken d585c16164 [DataTable] Selection select all reset 2026-03-19 12:19:11 +01:00
Ken 91a5243c2c [DataTable] Selection hook initial setup 2026-03-19 09:50:19 +01:00
Ken 3322acde59 [DataTable] Working table with items 2026-03-18 16:11:59 +01:00
Ken 71dba0d15c [DataTable] Table with item-prop WIP 2026-03-18 15:37:50 +01:00
KenandHalvor Haugan 232ed45694 💄 Disabled token adjusted to 0.45 (#4734)
* 💄 Disabled token adjusted to 0.45

* Update .changeset/tidy-coats-hope.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-03-18 14:52:48 +01:00
Ken 84261202ce 🐛 Fixed mailto validation in sanity link schema 2026-03-18 14:24:59 +01:00
Ken 44c39ee6b8 [DataTable]: Selected demo cleanup 2026-03-18 14:03:59 +01:00
Ken 856afc3f78 [DataTable]: Selected state registry 2026-03-18 13:13:23 +01:00
Ken b7a6b3131e [DataTable]: Working selection states 2026-03-18 10:28:39 +01:00
Ken 8b5980b794 [DataTable]: Initial selected row config 2026-03-18 10:28:39 +01:00
Anniken Granberg 7b4a47d31b DataTable: dnd native skeleton 2026-03-18 08:52:29 +01:00
Anniken Granberg dc88ccbece DataTable: Move old dnd kit 2026-03-18 08:36:41 +01:00
Halvor Haugan aa4d610a50 Fieldset: variant:static on address examples 2026-03-17 15:54:14 +01:00
Halvor Haugan 3e6678fc8c Fieldset: Add example on hideLegend (#4739) 2026-03-17 15:36:21 +01:00
Ken edff0148ad [DataTable]: Resize event cleanup 2026-03-17 15:22:39 +01:00
Ken 5bc7adeff4 [DataTable]: Resize refactor 2026-03-17 15:22:39 +01:00
Ken 4d9e66d276 [DataTable]: Resize touch-events 2026-03-17 15:22:38 +01:00
Halvor Haugan 252aed6e07 Fieldset: Update JSDoc and add examples (#4738) 2026-03-17 15:08:35 +01:00
Halvor Haugan 2d70b8df7e ⬆️ Bump tar to 7.5.11 2026-03-17 15:06:01 +01:00
Ken 8f3e5072ae [DataTable]: DND anchor demo 2026-03-17 14:58:29 +01:00
Ken ab7f08850f [DataTable]: Added selectionMode prop (not implemented) 2026-03-16 16:31:01 +01:00
Ken f3f7fb797e [DataTable]: Added loading-component 2026-03-16 16:11:31 +01:00
Ken c20d5d7211 [DataTable]: Added emptystate-component 2026-03-16 15:51:56 +01:00
dependabot[bot] 182fbf9819 ⬆️ Bump the npm_and_yarn group across 2 directories with 1 update (#4736)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [tar](https://github.com/isaacs/node-tar).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.5.10 to 7.5.11
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.10...v7.5.11)

Updates `tar` from 7.5.10 to 7.5.11
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.10...v7.5.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.11
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.11
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 15:15:40 +01:00
dependabot[bot]andKen 95c58bacc6 ⬆️ Bump @floating-ui/react-dom from 2.1.7 to 2.1.8 (#4733)
Bumps [@floating-ui/react-dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/react-dom) from 2.1.7 to 2.1.8.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/react-dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/react-dom@2.1.8/packages/react-dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/react-dom"
  dependency-version: 2.1.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-03-16 15:14:49 +01:00
dependabot[bot] 942d98945d ⬆️ Bump eslint-plugin-testing-library from 7.15.4 to 7.16.0 (#4732)
Bumps [eslint-plugin-testing-library](https://github.com/testing-library/eslint-plugin-testing-library) from 7.15.4 to 7.16.0.
- [Release notes](https://github.com/testing-library/eslint-plugin-testing-library/releases)
- [Changelog](https://github.com/testing-library/eslint-plugin-testing-library/blob/main/release.config.js)
- [Commits](https://github.com/testing-library/eslint-plugin-testing-library/compare/v7.15.4...v7.16.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-testing-library
  dependency-version: 7.16.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 15:09:50 +01:00
KenandHalvor Haugan befae1e0a2 [Readmore] Added variants ghost and moderate (#4723)
* 🎉 WIP readmore

* ♻️ Readmore CSS refactor

* 🎉 Finishing up Readmore refactor and variant addition

* 🎉 Finishing up Readmore refactor and variant addition

* 📝 Update Readmore examples

* Update .changeset/fine-seals-rule.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Story and example updated

* Update @navikt/core/react/src/read-more/ReadMore.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Miscalculated border-radius fixed

* 📝 Desc-texts

* 📝 Short and long readmore demo

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-03-16 15:08:10 +01:00
Ken 763ed480ca [DataTabke] Only add tabIndex when keyboardsupport is enabled 2026-03-16 15:00:17 +01:00
Halvor Haugan 03a0ec0d69 Playroom: allow-forms 2026-03-16 14:51:06 +01:00
Anniken Granberg 66cb8e7c14 DataTable: ops wrong type 2026-03-16 14:20:01 +01:00
Anniken Granberg e527923580 DataTabel: bad example of our own drag and drop 2026-03-16 14:15:21 +01:00
Ken 7009d899f1 [DataTable] Support starting with auto size when maxWidth is smaller than auto 2026-03-16 12:47:01 +01:00
Ken 8976136b3e [DataTable] style-forwarding 2026-03-16 10:45:02 +01:00
Ken 59dff16be0 [DataTable] Handle focus in header-row and col-span better 2026-03-16 10:37:27 +01:00
KenandHalvor Haugan 7074d96fba README update (#4726)
* 📝 README update

* 📝 Update contributing.md

* Update CONTRIBUTING.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-03-16 09:40:30 +01:00
Halvor Haugan b4df1bd349 DataTable: Sort button css adjustments 2026-03-13 23:01:22 +01:00
Ken 93f31e23c9 [DataTable] Fixed dom-validation warning 2026-03-13 21:51:05 +01:00
Ken 521c5a1ac0 [DataTable] Added todo 2026-03-13 15:01:01 +01:00
Ken 5a356677b2 [DataTable] Added auto-sizing on double-click 2026-03-13 14:47:33 +01:00
Ken 28077c6edd [DataTable] Build-in resizing in TH cells 2026-03-13 14:28:50 +01:00
Anniken Granberg b43de6188e DataTable: Add alternative for rendering arrow icons that doesn't move 2026-03-13 13:02:11 +01:00
dependabot[bot] ae762f5c3e ⬆️ Bump the npm_and_yarn group across 2 directories with 2 updates (#4724)
Bumps the npm_and_yarn group with 2 updates in the /examples/astro directory: [svgo](https://github.com/svg/svgo) and [tar](https://github.com/isaacs/node-tar).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [tar](https://github.com/isaacs/node-tar).


Updates `svgo` from 4.0.0 to 4.0.1
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v4.0.0...v4.0.1)

Updates `tar` from 7.5.9 to 7.5.10
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.9...v7.5.10)

Updates `tar` from 7.5.9 to 7.5.10
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.9...v7.5.10)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 4.0.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.10
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.10
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-12 14:40:24 +01:00
Ken 293e9b3159 [DataTable] Updated sort-icon display 2026-03-12 13:16:35 +01:00
Ken 81ed901143 [DataTable] Added textAlign to table-cells 2026-03-12 12:54:10 +01:00
Halvor Haugan fd2d80c3e2 DataTable: No-framework story: Add support for resizing with touch 2026-03-12 12:35:32 +01:00
Halvor Haugan 31d9d44d93 ⬆️ Bump dompurify to 3.3.2 2026-03-12 11:48:05 +01:00
Halvor Haugan 553b2e48f3 Merge branch 'main' of github.com:navikt/aksel 2026-03-12 11:42:09 +01:00
Halvor Haugan 0acb173966 ⬆️ Bump tar to 7.5.10 2026-03-12 11:41:39 +01:00
Ken e20ef739bb 🐛 Sanity presentation-mode now resolves correct document. Fixed syntax error 2026-03-12 10:56:10 +01:00
Halvor Haugan eef03050b6 Add comment in LinkAnchor about auxClick 2026-03-12 10:51:15 +01:00
Ken f51ca8e1bd [DataTable] Misc CSS-adjustments to header, cells and resize-handle 2026-03-11 11:17:49 +01:00
Halvor Haugan 96a730c798 useDatepicker, useMonthpicker: Add descriptions to validation type (#4722) 2026-03-11 10:38:14 +01:00
Halvor Haugan 6716217e8e Adjust validation examples on Date/MonthPicker (#4721) 2026-03-11 10:26:50 +01:00
Halvor Haugan d7034a7c93 ⬆️ Bump svgo to 3.3.3 2026-03-11 09:40:28 +01:00
dependabot[bot] 7b2692a3fe ⬆️ Bump simple-git from 3.30.0 to 3.32.3 (#4720)
Bumps [simple-git](https://github.com/steveukx/git-js/tree/HEAD/simple-git) from 3.30.0 to 3.32.3.
- [Release notes](https://github.com/steveukx/git-js/releases)
- [Changelog](https://github.com/steveukx/git-js/blob/main/simple-git/CHANGELOG.md)
- [Commits](https://github.com/steveukx/git-js/commits/simple-git@3.32.3/simple-git)

---
updated-dependencies:
- dependency-name: simple-git
  dependency-version: 3.32.3
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 09:34:56 +01:00
Anniken Granberg fad46c010b DataTable: Styling fix and keyboard bug fix 2026-03-10 15:58:03 +01:00
Ken 938324cb8f 🐛 Resolve import type issue 2026-03-10 15:47:42 +01:00
Ken 789d7f8312 🐛 GodPraksis tema-page now works in preview-mode 2026-03-10 15:44:43 +01:00
Ken 15cd549d44 🐛 Test having direct-imports for better bundle-analyzer 2026-03-10 15:37:52 +01:00
Ken 0ec9e25603 🐛 useScrollLock now handles scrollbar-gutter better (#4703)
* 🐛 useScrollLock now handles scrollbar-gutter better

* 🔥 Removed aditional story

* 📝 COmment

* 📝 OS -> MacOs
2026-03-10 15:25:13 +01:00
Ken b96ecff836 🎉 Removed tabindex-change based on open-state in date-input (#4714) 2026-03-10 13:06:04 +01:00
Anniken Granberg 37c952adad DataTable: create DataDragAndDropDragHandler and update styles 2026-03-10 12:55:17 +01:00
Halvor Haugan a4854226c6 Upgrade Playroom (#4716) 2026-03-10 12:47:20 +01:00
dependabot[bot]andKen 3a9318406e ⬆️ Bump @eslint/js from 9.39.2 to 10.0.1 in the eslint group across 1 directory (#4706)
* ⬆️ Bump @eslint/js in the eslint group across 1 directory

Bumps the eslint group with 1 update in the / directory: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js).


Updates `@eslint/js` from 9.39.2 to 10.0.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🏷️ Fix new lint rules

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-03-10 11:36:25 +01:00
Halvor Haugan 55a5ad4671 [website] Fix bug when clicking on active example chip (#4713) 2026-03-10 09:09:59 +01:00
Halvor Haugan 7fbf9c3c4f [website] Fix "Oppdater godkjenningsdato" button (#4705) 2026-03-10 09:09:42 +01:00
dependabot[bot] 9c322bfd7e ⬆️ Bump the actions group with 2 updates (#4709)
Bumps the actions group with 2 updates: [docker/login-action](https://github.com/docker/login-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/login-action` from 3 to 4
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

Updates `docker/build-push-action` from 6 to 7
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-10 08:57:52 +01:00
Halvor Haugan 5be17b9bea Merge branch 'main' of github.com:navikt/aksel 2026-03-09 21:21:14 +01:00
Halvor Haugan 180ab068c2 ⬆️ Bump figlet 2026-03-09 21:20:49 +01:00
dependabot[bot] 250824bff5 ⬆️ Bump globals from 17.3.0 to 17.4.0 (#4708)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.3.0 to 17.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.3.0...v17.4.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 21:14:26 +01:00
dependabot[bot] 50fc325fbd ⬆️ Bump react-router from 7.13.0 to 7.13.1 (#4707)
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.13.0 to 7.13.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.13.1/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.13.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 21:13:24 +01:00
Halvor Haugan 4316ca4782 Listbox: Rename sub-components 2026-03-09 15:11:55 +01:00
github-actions[bot] c5ff537870 Version Packages (#4692)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-09 12:03:01 +01:00
Halvor Haugan ede1f6024e Fix typo in changeset text 2026-03-09 10:33:08 +01:00
Halvor Haugan b5c5e69bcf DataTable: Refactor Listbox 2026-03-06 19:36:28 +01:00
Ken f1a21b314f [Datepicker] 🐛 Fixed issue where using fixedWeeks still caused layout shifts i… (#4701)
* 🐛 Fixed issue where using fixedWeeks still caused layout shifts in cases of last/first month

* 📝 storybook demo

* 💄 Now supoorts breakpoints better

* ♻️ Use css-variables

* 🐛 Even more placeholder space for chromatic demo

* 🐛 Accound for missing padding

* 📝 Moved story order
2026-03-06 15:05:29 +01:00
Halvor Haugan 955b8930e6 [website] Adjust Switch examples + OG-description field desc + metadata query (#4704) 2026-03-06 14:26:30 +01:00
Halvor Haugan 5086556f27 ⬆️ Upgrade deps in examples/shadow-dom 2026-03-06 12:09:49 +01:00
Halvor Haugan 8cdd2d5b15 ⬆️ Upgrade deps in examples/astro 2026-03-06 12:01:17 +01:00
Halvor Haugan bbd68a9ff8 DataTable: Small adjustments in AutoSuggest 2026-03-05 18:54:54 +01:00
Halvor Haugan 3a4780fd79 Remove unused file Cube.tsx 2026-03-05 16:35:49 +01:00
Halvor Haugan a70256ce16 [website] Hover styling on God praksis hero button (#4697) 2026-03-05 13:03:35 +01:00
Ken 1b4924b6e3 God praksis sanity: remove legacy-view for tema-contacts 2026-03-05 11:59:25 +01:00
Ken 61319a2a34 🏷️ RootElement prop now accepts null as value. (#4700) 2026-03-05 11:30:50 +01:00
538c59a2ef [Sanity] Publishing wizard (#4691)
* ⬆️ Sanity update

* 🎉 Working custom update view

* 🎉 Better publishing workflow

* 🎉 Update logic and texts

* 📝 Update blueprint config

* 🐛 Handle unpublished documents

* 📝 Remove unused description

* add function that unsets lastVerified on unpublish

* small InfoCard

* ⚡ Optimize

* Update aksel.nav.no/website/sanity/schema/custom-components/updateInfo.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/sanity/schema/custom-components/updateInfo.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Added readme

* Update aksel.nav.no/website/sanity/plugins/publication-flow/actions/lastVerified.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/sanity/functions/README.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-03-05 11:18:35 +01:00
Ken d3f87c5c80 🐛 Calculate margin on open in God-praksis hero 2026-03-05 11:16:59 +01:00
Halvor Haugan 665729641f Refactor some less-than-ideal usage of the ref prop (#4699) 2026-03-05 10:10:06 +01:00
Ken 41f14751fd 🐛 Resolve failing tests in data-table autocomplete generation 2026-03-05 10:05:48 +01:00
Ken c8dca96c14 [DataTable] Implemented datatable + tokenfilter demo 2026-03-04 16:40:01 +01:00
Ken e7f3761fab [DataTable] Implemented working tokenfilter demo 2026-03-04 16:34:14 +01:00
Ken 18dbb9a200 [DataTable] 🎉 Updated sort-button handler 2026-03-04 15:21:06 +01:00
Ken 6a45d097c8 [DataTable] Build in columns and items support demo 2026-03-04 13:50:21 +01:00
Anniken Granberg 0cbf7f5341 DataTable: integrate drag-and-drop functionality for column ordering example 2026-03-04 13:39:58 +01:00
Anniken Granberg 8abc0c0285 DataTable: create drag-and-drop component 2026-03-04 12:04:25 +01:00
KenandHalvor Haugan 8285d80751 Datepicker popover autofocus on open (#4676)
* 🧪 Test focus on datepicker popover

* 🎉 Handle state-updates better

* 🎉 Further delay datepicker button re-focus

* 📝 Changelog

* 🐛 Handle label ids dynamically

* 🐛 Use correct id

* 🐛 Avoid using contexts where not needed

* 🐛 Remove requirement for label

* 🐛 Resolve use of non assigned context

* 📝 Rename removal

* Update .changeset/forty-ads-tell.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ Optimize autofocus

* ⚡ Remove need for useCallback

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-03-04 10:42:49 +01:00
Halvor Haugan e03e73d7e8 Storybook: Set lang attribute according to selected language (#4693) 2026-03-04 09:26:20 +01:00
Ken b343c2f7a0 [DataTable] 🐛 Resolve missing update after sorting update 2026-03-03 16:21:11 +01:00
Ken 6d1d57d114 [DataTable] TableHeader is now a button when sorting 2026-03-03 15:36:11 +01:00
Halvor Haugan 9911a68ca7 DataTable: TokenFilter: Use Listbox subcomponents 2026-03-03 13:17:03 +01:00
Halvor Haugan 1653b7e2d4 Listbox: role=combobox 2026-03-03 12:43:02 +01:00
Halvor Haugan cb2d2b25c3 DataTable: Use Listbox in TokenFilter 2026-03-03 11:40:36 +01:00
Ken ab2e6062fb [DataTable] Css cleanup 2026-03-03 10:32:17 +01:00
Ken 9d8b9ffca8 [DataTable] Implement auto-grow cell in fixed tables 2026-03-03 10:31:13 +01:00
Ken 0b4bccdeb2 [DataTable] 🧪 Testing placeholder cells 2026-03-02 18:06:46 +01:00
Halvor Haugan 723eb0c82a ⬆️ Bump minimatch and glob 2026-03-02 16:50:50 +01:00
Anniken Granberg edc4781c82 DataTable: block keyboard navigation for specific elements 2026-03-02 16:37:13 +01:00
Halvor Haugan 4a55f901b0 DataTable: Listbox utility component 2026-03-02 16:07:22 +01:00
Halvor Haugan 28d4a07576 Add internal hook useDeferredValue (#4690) 2026-03-02 15:06:27 +01:00
Ken 112cea77bb [InlineMessage] 🎉 Updated InlineMessage to use BodyLong based on review (#4683)
* 🎉 Updated InlineMessage to use BodyLong based on review

* 🐛 Avoid duplicating typo-import
2026-03-02 14:59:43 +01:00
dependabot[bot] bfa1aef07e Bump commander from 14.0.2 to 14.0.3 (#4687)
Bumps [commander](https://github.com/tj/commander.js) from 14.0.2 to 14.0.3.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tj/commander.js/compare/v14.0.2...v14.0.3)

---
updated-dependencies:
- dependency-name: commander
  dependency-version: 14.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 14:58:11 +01:00
dependabot[bot] 8be4c55b2b Bump the actions group with 2 updates (#4688)
Bumps the actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/upload-artifact` from 6 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

Updates `actions/download-artifact` from 7 to 8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 14:57:17 +01:00
Anniken Granberg 63ee00ad08 DataTable: keyboard resizing support 2026-03-02 14:34:24 +01:00
dependabot[bot] a19df981d0 Bump the npm_and_yarn group across 2 directories with 1 update (#4689)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [rollup](https://github.com/rollup/rollup).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [rollup](https://github.com/rollup/rollup).


Updates `rollup` from 4.57.1 to 4.59.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.57.1...v4.59.0)

Updates `rollup` from 4.57.1 to 4.59.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.57.1...v4.59.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:10:07 +01:00
dependabot[bot] 98ccb5c3ed Bump rimraf from 6.1.2 to 6.1.3 (#4685)
Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.1.2 to 6.1.3.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v6.1.2...v6.1.3)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:03:56 +01:00
Halvor Haugan 27633dbd03 ⬆️ Upgrade React (#4684) 2026-02-27 14:59:56 +01:00
Ken 88c5e8d589 🧪 Added slider to test disabled-opacity token 2026-02-27 12:53:44 +01:00
Ken f1beb98e2c 🧪 Added disabled button to form story 2026-02-27 12:31:45 +01:00
Ken a7253d2287 🧪 Added disabled form story 2026-02-27 12:29:11 +01:00
Halvor Haugan 5e3b0ffa5b ➖ Remove postcss from figma-plugin (#4682) 2026-02-27 11:51:52 +01:00
Halvor Haugan f71c96f552 ⬆️ Upgrade Storybook (#4681) 2026-02-27 10:52:58 +01:00
Halvor Haugan 739e349ff3 ⬆️ Bump rollup (#4680) 2026-02-27 10:42:23 +01:00
dependabot[bot] 34e4dadf5e Bump the npm_and_yarn group across 2 directories with 1 update (#4678)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [minimatch](https://github.com/isaacs/minimatch).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [minimatch](https://github.com/isaacs/minimatch).


Updates `minimatch` from 10.2.1 to 10.2.2
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v10.2.1...v10.2.2)

Updates `minimatch` from 10.2.1 to 10.2.2
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v10.2.1...v10.2.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 10.2.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimatch
  dependency-version: 10.2.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 10:22:30 +01:00
Halvor Haugan 418dd5b254 ⬆️ Bump minimatch 2026-02-27 09:59:21 +01:00
Halvor Haugan 294c2e6241 ⬆️ Bump basic-ftp 2026-02-27 09:50:39 +01:00
Ken df5416eb8d [DataTable] 🐛 Flip naming convention in token-filter 2026-02-24 14:40:55 +01:00
Halvor Haugan 0217af895e Delete referansesider-spa-deploy.yml (#4671) 2026-02-24 11:18:21 +01:00
KenandCopilot Autofix powered by AI 0e3eed8854 [Website] Markdown routes and portable blocks (#4672)
* 🎉 Initial markdown setup

* 🚚 Move helpers

* 🎉 Markdown-types

* 🎉 Added marks

* 📝 Updated token fallback comment

* 🎉 Added metadata-header

* 🎉 Updated kode-title header

* 🔥 Remove working test, only show when testing

* 📝 Comments

* ⬅️ Use supported version

* Potential fix for code scanning alert no. 58: Incomplete string escaping or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-24 09:27:48 +01:00
Ken 47d60322cf [DataTable] 🐛 Resolve incorrect type-conversion 2026-02-23 16:39:07 +01:00
Ken ef13e6c7bd [DataTable] Filter types refactor 2026-02-23 16:34:30 +01:00
Ken 2d5afa57c3 [DataTable] Set up change handler for token-filter 2026-02-23 15:22:46 +01:00
github-actions[bot] 8ad0dd4288 Version Packages (#4666)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-23 14:24:36 +01:00
dependabot[bot] 66f11b6678 Bump @vitest/eslint-plugin from 1.6.7 to 1.6.9 in the vitest group (#4673)
Bumps the vitest group with 1 update: [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest).


Updates `@vitest/eslint-plugin` from 1.6.7 to 1.6.9
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.6.7...v1.6.9)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 09:40:55 +01:00
dependabot[bot] 3dcd3a4874 Bump globals from 16.5.0 to 17.3.0 (#4675)
Bumps [globals](https://github.com/sindresorhus/globals) from 16.5.0 to 17.3.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.5.0...v17.3.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.3.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-23 09:38:26 +01:00
Halvor Haugan 547a565afa yarnrc: Add navikt to npmPreapprovedPackages (#4670) 2026-02-19 13:31:25 +01:00
Halvor Haugan ea83c18937 Remove referansesider from eslint ignore 2026-02-19 13:19:11 +01:00
Halvor Haugan 2af57f66c1 ⬆️ Remove examples "next-appdir" and "referansesider", upgrade deps in the rest (#4669) 2026-02-19 13:08:48 +01:00
Ken 47411e209f Merge branch 'main' of https://github.com/navikt/aksel 2026-02-19 12:39:28 +01:00
Ken 69bea7f51d 🐛 Revert focus-state handle update in ToggleGroup (#4668) 2026-02-19 12:38:19 +01:00
Ken 2472765f78 [DataTable] Added story for multiple tokens 2026-02-19 12:35:10 +01:00
Halvor Haugan 9012ea4760 Stylelint plugin: Remove redundant code (#4667) 2026-02-19 12:26:51 +01:00
Ken ecb05c4184 [DataTable] comment cleanup 2026-02-19 11:23:17 +01:00
Ken 925d3a3be7 [DataTable] Removed unused filteringTag 2026-02-19 11:16:32 +01:00
Ken d7cda7e623 [DataTable] Show properties when starting to type instead of just values 2026-02-19 10:32:09 +01:00
Ken 914d38db12 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-19 10:18:50 +01:00
Ken dcf4c54e6e [DataTable] Unify datastructure for autocomplete options 2026-02-19 09:51:31 +01:00
Halvor HauganandKen f4e980eeed ⬆️ Upgrade stylelint (#4662)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-02-19 09:27:34 +01:00
Ken fe00807e6b 🐛 Update yarn lock 2026-02-19 09:25:24 +01:00
dependabot[bot] 23589bd40d ⬆️ Bump lint-staged from 16.1.5 to 16.2.7 (#4649)
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 16.1.5 to 16.2.7.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v16.1.5...v16.2.7)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.2.7
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 09:22:40 +01:00
github-actions[bot] fd6b9a43bd Version Packages (#4665)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 16:53:34 +01:00
Halvor Haugan 2caeacc21b Timeline: Adjust pin position (#4664) 2026-02-18 16:45:37 +01:00
Halvor Haugan 26264a7677 DataTable: New prop called "layout", and more 2026-02-18 16:42:12 +01:00
Ken 9eecccdc2d Merge branch 'main' of https://github.com/navikt/aksel 2026-02-18 16:36:25 +01:00
Ken 7c4a079019 [DataTable] Added tests for new operator customization 2026-02-18 16:35:50 +01:00
Ken baaea9770a [DataTable] Added option to customize operators for each filter 2026-02-18 16:27:08 +01:00
Halvor Haugan 028f456388 ⬆️ Upgrade Chromatic and @trivago/prettier-plugin-sort-imports (#4661) 2026-02-18 16:06:38 +01:00
Ken 0f16b01e63 [DataTable] Autosuggest options generation refactor (#4663)
* WIP

* [DataTable] Add tests and fix free-text logic

* ♻️ Cleanup

* ♻️ Refactor text-matcher

* 🚚 Extracted query-build API

* 🚚 Extracted grouping api

* 🚚 Update value option creation

* 📝 Jsdoc

* 🏷️ Update types

* 🚚 Extract operator utils

* 🧪 Extracted operator-tests

* ⚡ Make sure performance is consistent

* 🎉 Implemented autosuggest demo
2026-02-18 16:06:13 +01:00
Halvor Haugan 3b13616c95 ⬆️ Upgrade dependencies (#4660) 2026-02-18 14:24:06 +01:00
dependabot[bot] 79aa63746e ⬆️ Bump markdown-it from 14.1.0 to 14.1.1 (#4658)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.1.0 to 14.1.1.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.1.0...14.1.1)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-18 13:03:23 +01:00
github-actions[bot] 855925cf38 Version Packages (#4657)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 09:55:03 +01:00
Christian Skrøvseth e28bd67ed9 Add missing key prop to nested Tooltip shortcuts (#4656) 2026-02-18 09:40:27 +01:00
Ken 9c86ff3b5f ⬅️ Revert last changes to allow PR to go trough 2026-02-18 09:39:53 +01:00
Ken e5702e719b [Tooltip] Added missing key-prop when mapping shortcut in fragment 2026-02-18 09:37:45 +01:00
Ken 449cf3e661 🐛 Avoid crashing page when navigating trough god-praksis in preview-mode 2026-02-17 16:29:33 +01:00
Ken 866b93b6e2 [DataTable] Document expected behaviour for autosuggest option generation 2026-02-17 15:57:28 +01:00
Ken 4806fd4f9a [DataTable] Resolve failing tests 2026-02-17 15:26:54 +01:00
Ken a8534aa229 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-17 15:22:14 +01:00
Ken 3f27574a1c [DataTable] Autocomplete: Generate list of options 2026-02-17 15:21:55 +01:00
Ken 8461510d9a [DataTable] Autocomplete option generation update 2026-02-17 14:34:30 +01:00
Ken d8fa95b8e2 [DataTable] Autocomplete option refactor 2026-02-17 14:28:59 +01:00
Ken 1deb97dad2 [DataTable] Mock autocomplete component 2026-02-17 14:23:55 +01:00
Ken a2fdbf7e40 [DataTable] AutoComplete suggestion option generation 2026-02-17 13:53:46 +01:00
Halvor Haugan f89271cdd7 [website] Endringslogg: Don't clear input when toggling semver (#4654) 2026-02-17 13:37:54 +01:00
Halvor Haugan 9f501c5b08 DataTable: Improved (?) border styling that works with colspan/rowspan 2026-02-17 12:46:29 +01:00
Halvor Haugan 518135a741 DataTable: Fix issue with resize handle on last column 2026-02-17 12:41:50 +01:00
Halvor HauganandKen 84747373f0 [website] Fix issues with global search (#4653)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-02-17 11:58:40 +01:00
Ken 4db531bad8 [DataTable] Resolve file-name switchup 2026-02-17 10:51:27 +01:00
Ken d678db2542 [DataTable] Query parsing in text-filter 2026-02-17 10:29:57 +01:00
Ken 5e848cfde2 [DataTable] Filtering parsing --no-verify 2026-02-17 09:48:18 +01:00
Karl-Magnus Thorsnes fe3611025c - Vis hurtigtast ut fra enhetens OS i globalSearch.dialog (#4652) 2026-02-17 09:31:00 +01:00
Anniken Granberg f95ff765d2 DataTable: Forgot padding 2026-02-16 19:44:49 +01:00
Anniken Granberg beebf35833 [DataTable]: Replace ActionMenu with Dialog for settings adjustments 2026-02-16 19:34:12 +01:00
Anniken Granberg 739aa80525 [DataTable] Change zebra stripes and truncate content styles to use data prop 2026-02-16 19:30:04 +01:00
Halvor Haugan fb3238d30c DataTable: Improved (?) border styling that works with colspan/rowspan 2026-02-16 15:40:44 +01:00
Halvor Haugan 418a2f7a23 DataTable: Fix issue with resize handle on last column 2026-02-16 15:36:47 +01:00
Ken 37f1581b95 Merge remote-tracking branch 'refs/remotes/origin/main' 2026-02-16 13:03:43 +01:00
github-actions[bot] 765032d4e2 Version Packages (#4644)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-16 12:37:55 +01:00
Ken 51ae3163cc [DataTable] Resolve rowspan/colspan focus check bug 2026-02-16 12:01:15 +01:00
Ken 758969848f [DataTable] Grid-navigation tests 2026-02-16 11:55:24 +01:00
Ken 6beef2453b [DataTable] More tests, separate focus-cell concerns 2026-02-16 10:52:40 +01:00
Ken 5500280a3f [DataTable] table-grid tests 2026-02-16 10:25:54 +01:00
Ken 1a3dd1c80e [DataTable] Doc updates 2026-02-16 10:20:40 +01:00
Ken b83114dc80 Merge remote-tracking branch 'refs/remotes/origin/main' 2026-02-13 17:26:57 +01:00
Ken 363dd78e49 [DataTable] Added more key-supports, better tabIndex handling 2026-02-13 15:31:51 +01:00
Halvor Haugan 2987059974 [website] Adjust examples for Tooltip and List (#4645) 2026-02-13 15:22:58 +01:00
Ken 8af2ddb3b9 [DataTable] Update focus-utilities 2026-02-13 14:39:24 +01:00
Ken 318d736438 🎉 extract grid utility 2026-02-13 14:29:29 +01:00
Ken bb9da09260 [DataTable] 🏷️ Rename functions for keyboard-nav 2026-02-13 13:58:30 +01:00
Ken 34b227f966 [DataTable] Make some utilities more pure, avoid side-effects 2026-02-13 13:30:00 +01:00
Ken aa977f0c11 [DataTable] Extract maxCols from table grid on the fly 2026-02-13 12:49:35 +01:00
Ken 214e971963 [DataTable] Remove focus-handler for table element 2026-02-13 12:39:42 +01:00
Halvor Haugan 4337b00e33 Process: Allow mix of single items and array as children (#4643) 2026-02-13 11:09:28 +01:00
KenandHalvor Haugan 49e01f13dc 🎉 Support as-prop in Accordion and LinkCard (#4641)
* 🎉 Support as-prop in Accordion and LinkCard

* Update @navikt/core/react/src/link-card/LinkCard.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-02-13 10:44:47 +01:00
github-actions[bot] 1504c21978 Version Packages (#4640)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-13 09:42:32 +01:00
Halvor Haugan 2f6f97fc5a [website] Fix issue where example iframe doesn't load on initial render (SSR) (#4642) 2026-02-13 09:18:27 +01:00
Halvor Haugan 1ab26af8ba DataTable: Resize handle adjustments 2026-02-12 15:02:39 +01:00
fcdb044098 use dev url for umami tracking on dev (#4637)
* Initial plan

* Update dev tracking URL to new dev environment

Co-authored-by: JulianNymark <819074+JulianNymark@users.noreply.github.com>

* Fix: Use PRODUCTION env var instead of NODE_ENV for environment check

Co-authored-by: JulianNymark <819074+JulianNymark@users.noreply.github.com>

* chore: smart data > smart code

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JulianNymark <819074+JulianNymark@users.noreply.github.com>
Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2026-02-12 14:08:01 +01:00
Anniken Granberg f160e29d37 [DataTable] Add select functionality 2026-02-12 11:30:14 +01:00
Ken b7a865aa4f 🐛 Single-select text in combobox did not respect size-prop (#4638) 2026-02-12 11:29:21 +01:00
github-actions[bot] 2326f12a33 Version Packages (#4622)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-11 15:42:42 +01:00
Ken 4ea67c17b3 [Storybook] ⚡ optimize path resolving, decorator rendering 2026-02-11 15:30:30 +01:00
Ken 300eb00208 [DataTable] Resolve issue where focusing resize-handle auto-focused first cell in table 2026-02-11 14:59:45 +01:00
Ken 9324e3fe77 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-11 13:49:09 +01:00
Ken bfd4c2ed54 [DataTable] Keyboard-nav optimization, re-structure and documentation
📝 Added doucmentation
⚡ Cache table grid generation
♻️ Refactors op setup
♻️ Extract utils
📝 Added some comments
♻️ Extract utils
♻️ Extracted helpers
⚡ Re-building optimizations
2026-02-11 13:49:03 +01:00
Halvor Haugan 9eff5c101c DataTable: Rename Data.wofw.stories.tsx -> Data.no-framework.stories.tsx 2026-02-11 13:04:20 +01:00
Halvor Haugan 4a8d66aa9e ⬆️ Upgrade dependencies (#4636) 2026-02-11 12:57:47 +01:00
dependabot[bot] 5ba2c5ba42 ⬆️ Bump tar (#4634)
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.5.6 to 7.5.7
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.6...v7.5.7)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 12:41:44 +01:00
Halvor Haugan 72fcfb05a0 ⬆️ Upgrade @portabletext/block-tools (#4633) 2026-02-11 12:10:05 +01:00
Halvor Haugan 0b81ae2dbd [website] Add cursor:pointer to iconButton 2026-02-11 12:00:44 +01:00
Ken 66d84915b5 [Timeline] Row-label now supports React.ReactNode (#4626)
* 🎉 Added timeline label flexibility

* 📝 Rename timeline stories

* 📝 changeset

* 📝 Update label jsdoc
2026-02-11 11:59:50 +01:00
Ken eb60ac97cf 🐛 Combobox now supports only using filteredOptions with no options (#4627)
* 🐛 Combobox now supports only using filteredOptions with no options

* 📝 rename var
2026-02-11 11:55:28 +01:00
Ken 103786e8fc Merge branch 'main' of https://github.com/navikt/aksel 2026-02-11 11:54:07 +01:00
Ken c6d663b38c [DataTable] Update Keyboard-nav tests/stories. Prepare for cache refactor.
♻️ make test-utils more readable
🎉 Add story for testing cache
🎉 Input tests
2026-02-11 11:54:02 +01:00
Halvor Haugan 54189c9c91 useEventListener: Add return type to interface (#4632) 2026-02-11 10:09:08 +01:00
Halvor Haugan ffa2539eaa Prettier (#4623) 2026-02-11 10:04:54 +01:00
Halvor Haugan 4de7bfff92 [website] Fix bug where copy button contents was not updated when changing icon (#4631) 2026-02-11 09:59:57 +01:00
Ken 313628298f ♿ Changed avatar type + name from span to div for SR-separation 2026-02-10 16:03:38 +01:00
Ken 491a273b04 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-10 15:57:49 +01:00
Ken 2499145f48 [DataTable] More robust keyboard-navigation
🎉 Add row/col span checks
🎉 Set up test
🚚 Extract utils to helpers
🎉 Observe active cell changes
🎉 Check for disabled elements when focusing
🐛 Handle selects
🎉 Handle inputs in table with keyboard nav
🎉 Inputs in table demo
⚡ Optimize lookup
2026-02-10 15:57:43 +01:00
Anniken Granberg 262e8d2306 DatePicker: Adjust gap in VStack for improved layout (#4630) 2026-02-10 15:45:27 +01:00
Anniken Granberg a6bf684750 [DatePicker] Added example for input range with one common error message (#4628)
* added example

* added story

* pr fixes
2026-02-10 14:29:32 +01:00
Ken 7a1c02238b Merge branch 'main' of https://github.com/navikt/aksel 2026-02-10 13:58:37 +01:00
Ken a093bedbbe 🎉 Set up col/row-span demo
🎉 Handle header focus better
2026-02-10 13:58:18 +01:00
Halvor Haugan d7e0a7dac7 DataTable: Fix bottom border in header 2026-02-10 13:56:08 +01:00
Ken ba8ff07bd2 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-10 13:38:27 +01:00
Ken 8c99573e98 [DataTable] Add keyboard nav with focus and scroll-handler
🎉 Handle focus inside cell
2026-02-10 13:38:09 +01:00
Anniken Granberg 271f27dc63 [DataTable] add zebra stripes and content truncation features 2026-02-10 13:31:26 +01:00
Halvor Haugan f401246f71 ToggleGroup: Remove unnecessary useEffect (#4625) 2026-02-10 10:01:12 +01:00
Halvor Haugan 97852d8a9b DataTable: Sticky header, more borders, no-page-scroll example 2026-02-10 10:00:35 +01:00
Ken 2d52f6ab32 Revert "⚡ Avoid prefetching all routes with NextLink". Some links stopped working
This reverts commit d49151a91e.
2026-02-09 20:07:18 +01:00
Ken d49151a91e ⚡ Avoid prefetching all routes with NextLink 2026-02-09 19:12:04 +01:00
Ken fe9f84e783 [DataTable] 🎉 Added boilerplate for keyboard-navigation 2026-02-09 16:25:42 +01:00
Ken 49c220b2bc 📝 Link to correct admin URL when logging deleted prop-data sync 2026-02-09 15:45:17 +01:00
Ken f8d6054a85 🐛 Docgen no longer found FileUploadItem 2026-02-09 14:48:29 +01:00
Ken 483bb8f4f1 [🧹 ] Moved actionmenu to root, primitives moved from /layout -> /primitives (#4613)
* 🚚 Moved primitives

* 🚚 Moved overlays and actionmenu

* 🐛 Fix import update
2026-02-09 14:40:59 +01:00
Ken b62435d579 [Parts rewrite] ♻️ Re-structure fileupload project (#4615)
* ♻️ Re-structure fileupload project

* 📝 Rename itemroot -> item
2026-02-09 14:29:22 +01:00
KenandHalvor Haugan b286ac28f1 [Parts rewirte] ♻️ Collapsible structure update (#4614)
* ♻️ Collapsible parts update

* 🐛 use correct names exports

* Update @navikt/core/react/src/collapsible/root/CollapsibleRoot.context.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-02-09 14:29:07 +01:00
Ken 64a671b334 [ActionMenu] 🎉 Updated animation and fixed subtrigger icon bug (#4612)
* 🎉 Updated animation and fixed subtrigger icon bug in ActionMenu

* 🐛 Fix actionmenu transform origin bug

* ♻️ Remove duplicate css
2026-02-09 14:28:26 +01:00
dependabot[bot] 2730853d68 ⬆️ Bump esbuild from 0.25.12 to 0.27.2 (#4596)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.12 to 0.27.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.12...v0.27.2)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.27.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 14:05:55 +01:00
87cbc0253f ⬆️ Bump next from 16.1.2 to 16.1.5 in /aksel.nav.no/website in the npm_and_yarn group across 1 directory (#4579)
* ⬆️ Bump next

Bumps the npm_and_yarn group with 1 update in the /aksel.nav.no/website directory: [next](https://github.com/vercel/next.js).


Updates `next` from 16.1.2 to 16.1.5
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v16.1.2...v16.1.5)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.1.5
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* yarn.lock update

* ⬆️ Update next

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-02-09 14:03:15 +01:00
Ken 045342ca70 ⚡ Add concurrency cancel for e2e action 2026-02-09 14:01:05 +01:00
Ken bd1eb8532e ⚡ Add concurrency cancel for bundle-actions 2026-02-09 13:59:41 +01:00
Anniken Granberg a2f08f7768 [DataTable] Add row density options to DataTable component and stories 2026-02-09 10:27:39 +01:00
dependabot[bot] 28e6352e26 ⬆️ Bump react-router from 7.12.0 to 7.13.0 (#4595)
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.13.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 09:54:31 +01:00
Halvor Haugan e9f935a25c DataTableProfiler: Move helper function getOpacity out of component 2026-02-09 09:50:16 +01:00
dependabot[bot] 7ce98d3ac0 ⬆️ Bump the vitest group with 3 updates (#4593)
Bumps the vitest group with 3 updates: [@vitest/browser](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser), [@vitest/browser-playwright](https://github.com/vitest-dev/vitest/tree/HEAD/packages/browser-playwright) and [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8).


Updates `@vitest/browser` from 4.0.17 to 4.0.18
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.18/packages/browser)

Updates `@vitest/browser-playwright` from 4.0.17 to 4.0.18
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.18/packages/browser-playwright)

Updates `@vitest/coverage-v8` from 4.0.17 to 4.0.18
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.18/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: "@vitest/browser"
  dependency-version: 4.0.18
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/browser-playwright"
  dependency-version: 4.0.18
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.0.18
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 09:43:40 +01:00
Halvor Haugan 1ec50ba5d9 Switch: Remove unnecessary useEffect (#4620) 2026-02-09 09:42:27 +01:00
Halvor Haugan ed9b920386 Box.stories.tsx: Refactor ThemingDemo story (#4621) 2026-02-09 09:12:37 +01:00
dependabot[bot] 3e1ec4d5e1 ⬆️ Bump tar from 7.5.6 to 7.5.7 (#4617)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.6 to 7.5.7.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.6...v7.5.7)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.7
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 09:08:00 +01:00
KenandHalvor Haugan 1a5aab396a [Website] 🎉 Detect user agent from header() for search-button icon (#4616)
* 🎉 Detect user agent from header for search-button icon

* Update aksel.nav.no/website/app/_ui/global-search/GlobalSearch.button.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Remove no longer needed css

* 💄 KBD css updates

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-02-09 09:05:58 +01:00
Halvor Haugan 00fa8964ad [DataTable] Style adjustments, story adjustments, comments 2026-02-06 17:33:18 +01:00
github-actions[bot] 36d710cba8 Version Packages (#4610)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-06 13:38:52 +01:00
KenandHalvor Haugan b4664dc96e [Templates] 🐛 Add forced theme option (#4609)
* 🐛 Add forced theme option to template demos

* Update aksel.nav.no/website/components/website-modules/examples/withDsExample.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Inline theme-class

* Update aksel.nav.no/website/components/website-modules/examples/withDsExample.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-02-06 13:01:10 +01:00
KenandHalvor Haugan da17a01b29 [Tooltip] 🎉 keys now accept multiple shortcuts (#4604)
* 🎉 Tooltip keys now accept multiple shortcuts

* ♻️ Add translations for tooltip divider

* Update @navikt/core/react/src/tooltip/Tooltip.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 💄 2->4px gap

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-02-06 12:45:04 +01:00
Karl-Magnus Thorsnes da8565b5f4 Button: ✨: Vis hurtigtast ut fra enhets OS (#4606)
* feat: Enhance GlobalSearchButton with platform-specific keyboard shortcuts

* feat: Update GlobalSearchButton to display platform-specific keyboard shortcuts

* Legg til "⌘" som default, legg til en liten animasjon som easer inn hurtigtasten ved førstegangs render
2026-02-06 11:52:37 +01:00
Ken 659e2748f4 [DataTable] Tanstack filtering testing 2026-02-06 11:47:32 +01:00
Ken 8d52cbde0c [Website] 🎉 Set up initial config for markdown pages 2026-02-05 15:02:26 +01:00
Halvor Haugan a0588a3dae [website] Fix FormProgress example "links" (#4611) 2026-02-05 12:59:03 +01:00
Halvor Haugan 6e71002e32 Chat: Fix avatar size when using icon from aksel-icons (#4608) 2026-02-05 11:58:19 +01:00
Ken 285d45c575 [DataTable] Experiment with Filter-view in column-header 2026-02-04 19:25:15 +01:00
Ken 36e45a8a39 [DataTable] Added todo 2026-02-04 12:22:25 +01:00
Ken 24ec3513c2 [DataTable] Dynamic view of th actions 2026-02-04 12:21:10 +01:00
Ken 547b99f6e5 [DataTable] Added Table footer component 2026-02-04 11:43:06 +01:00
Ken 463c70a20c [DataTable] Default to paginated demo for faster render 2026-02-04 10:20:12 +01:00
Ken 08ca5296af Merge branch 'main' of https://github.com/navikt/aksel 2026-02-04 10:13:05 +01:00
Ken 93a51d4f0b [DataTable] Profiler display
🎉 Added optional toggle
2026-02-04 10:11:05 +01:00
Halvor Haugan 207fada45e Fix eslint error 2026-02-04 09:26:50 +01:00
Ken 1b08ff37d9 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-03 17:29:20 +01:00
Ken a30c150112 [DataTable] Updated actions, resize-handle and borders 2026-02-03 17:29:15 +01:00
Halvor Haugan dfa3afc595 eslint: exclude story-files from React-import restrictions 2026-02-03 17:08:23 +01:00
Halvor Haugan 5329255c08 DataTable: Story without framework 2026-02-03 16:58:19 +01:00
Halvor Haugan 6b4b924746 DataTable: Somewhat better perf when resizing in story 2026-02-03 16:43:09 +01:00
Ken da560f1124 [DataTable] Added sorting, optimized state 2026-02-03 16:17:40 +01:00
Ken 1d1ca54cd1 🐛 Move bundle-analyzer percentage to correct table-heading 2026-02-03 14:35:14 +01:00
Ken 5ef15bf1b1 🔥 Removed redundant if-checks in bundle-analyzer actions 2026-02-03 14:32:56 +01:00
Ken 10a258e7dd 🐛 Make sure bundle-analyzer uses correct script 2026-02-03 14:27:21 +01:00
Ken a4fc69bca5 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-03 14:18:53 +01:00
Ken f592c2d757 🧪 Optimized bundle-analyzer to run in paralell 2026-02-03 14:18:38 +01:00
Ken 3ead8cf0ea 🎉 Better bundle-analyzer formatting, show percentage change 2026-02-03 14:04:51 +01:00
github-actions[bot] e5148d670c Version Packages (#4603)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-03 13:58:11 +01:00
Halvor Haugan c26d7a1a43 ExpansionCard/AccordionItem: Remove redundant class --no-animation (#4602) 2026-02-03 13:49:33 +01:00
Ken b38a38a117 [Website] ⚡ Test disabling sanity document-updating for redirects and cookies 2026-02-03 11:56:19 +01:00
Ken 3176806d29 📝 Avoid 'skipped checks' for bundle-action 2026-02-03 10:29:02 +01:00
Ken 5672990ce8 📝 Update bundle-analyzer markdown 2026-02-03 10:17:34 +01:00
Ken 51ac2602e3 🐛 Set analyzer workspace to private 2026-02-03 09:45:02 +01:00
github-actions[bot] 62a9cfb12d Version Packages (#4601)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-03 09:05:17 +01:00
Halvor Haugan e46a0fd394 Sync package versions (#4600) 2026-02-02 20:04:44 +01:00
Ken 74a268d40f [Sanity] 🐛 Fix backup-script (#4597)
* 🐛 Fix backup-script

* ➡️ Synk yarn
2026-02-02 15:20:44 +01:00
Ken 4b5f409d72 Merge branch 'main' of https://github.com/navikt/aksel 2026-02-02 15:17:36 +01:00
Ken 16e98acdef 🎉 Better bundle-analyzer formatting 2026-02-02 15:17:31 +01:00
Halvor Haugan 629884662c CLI: Remove redundant v8 codemods and fix issue running v8-tokens with other codemods (#4599) 2026-02-02 14:53:38 +01:00
Ken 5355b427be 🐛 Pull from correct package-dir in bundle analyzer 2026-02-02 14:22:21 +01:00
Ken 7f130fa460 📝 Update markdown format in Bundle-analyzer 2026-02-02 14:16:20 +01:00
Ken e75141e82a 🎉 Use artifact storage for bundle-analyzer 2026-02-02 13:53:59 +01:00
Ken 6cecd0a693 🐛 Handle non-existing temp-dir in Bundle analyzer 2026-02-02 12:38:09 +01:00
Ken 29bf6ef2bc 🐛 Correctly set up initial project structure for Bundle analyzer 2026-02-02 12:32:29 +01:00
4434ac5c08 [Bundle check] Bundle-size and config analyzer (#4580)
* 🎉 Set up bundle-analyzer workspace

* 📝 Cleaned up reporting code

* 🔥 Removed print of compare

* 🔥 Removed unused code

* rimnode=rimraf ./**/node_modules

* duplicate bundle for testing

* 🏷️ Sync tsconfig

* Classes

* 🎉 Add css compare function

* ⚡ Simplify css class

* 🔥 Remove regacy-files

* 🎉 Successfully extract exports

* 🎉 Extract types and components

* ♻️ Refactor looping

* 🐛 analyze correct file

* 🎉 Bundle size analyzer

* ♻️ Refactor use of classes

* ⚡ Streamline local analyzation

* 🎉 Add args

* 🎉 Interact with git actions

* 🎉 Compare function --no-verify

* 🎉 Add tests

* 🧪 More tests

* 🎉 Set up correct scripts

* 🎉 Added markdown-messaging

* 🎉 Set up action

* 🔥 removed temp analyzer code

* 🐛 Use correct ignore-script

* 🐛 Skip bundle-check for version-packages

* 🎉 Added version packages action

* Potential fix for code scanning alert no. 50: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 55: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* ➡️ Synk permissions

* Update .github/workflows/bundle-check-npm.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update .github/workflows/bundle-check-trunk.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update scripts/analyzer/src/helpers/git-actions.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ♻️ Function updates

* Update scripts/analyzer/src/analyze-css.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Cleanup

* 📝 Added comment on flatten

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-02-02 12:17:14 +01:00
Anniken GranbergandKen 60981fc091 Testing DataTable with column pinning and resizing features (#4589)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-02-02 10:27:14 +01:00
Halvor Haugan 97b6342a91 Better types in find-unequal-documents.ts, update-props.tsx and docgen.ts (#4590) 2026-02-02 09:02:40 +01:00
Ken c9d6b3155b 🎉 Basic DataTable styling. Moved CSS-import to storybook 2026-01-30 22:44:59 +01:00
Halvor Haugan bad7ef7da7 [website] Disable sandbox on examples using useTheme (#4592) 2026-01-30 19:46:23 +01:00
Ken b6cb159efd [Website] 🐛 Avoid updating EVERY props/example document when deploying (#4581)
* 🐛 Avoid updating EVERY props/example document when deploying

* 🎉 Fix deep comparison and serialization

* Apply suggestion from @KenAJoh
2026-01-30 15:59:15 +01:00
Ken d9a06b244f 🎉 Added references tab (#4588) 2026-01-30 14:39:56 +01:00
Halvor Haugan 51dd32cd85 [website] Add support for anchor in internalLink (#4586) 2026-01-30 13:50:02 +01:00
Ken 80e12039b6 Merge branch 'main' of https://github.com/navikt/aksel 2026-01-30 13:11:48 +01:00
Ken df555e18fb 🐛 Explicitly limit replicas to max 2 2026-01-30 13:11:40 +01:00
Ken 9900b218ce [Website] Use static encryption key for server-actions (#4583)
* ⚡ use static encryption for static server-actions

* 🐛 Avoid adding encryption key to included .env
2026-01-30 13:06:34 +01:00
Petter Walbø Johnsgård 6c95bc7c5e Update JSDoc examples to use spacing tokens (#4585)
Replace deprecated numeric spacing values with space token format in documentation comments.
2026-01-30 12:30:15 +01:00
Ken 54f7a2063e [website]: Experiment with static 2 replicas, disabled autoscaling 2026-01-29 20:31:04 +01:00
Halvor Haugan 739b806810 Fix type error in Data.stories.tsx 2026-01-29 15:41:51 +01:00
Halvor Haugan 833f90377b DataToolbar: Add sub-comp. Button, and other adjustments 2026-01-29 15:18:59 +01:00
Halvor Haugan 8565961882 Search: Extract types for native props into separate type 2026-01-29 15:16:41 +01:00
Halvor Haugan 7b902b253c ActionMenu: Fix indentation in JSDoc examples 2026-01-29 13:58:49 +01:00
KenandHalvor Haugan 6c5f32a0df ⚡ Resolve website revalidating every query (#4578)
* ⚡ Resolve whole website revalidating every fetch

* Update aksel.nav.no/website/app/_sanity/live.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/app/_sanity/live.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-01-29 13:55:46 +01:00
Halvor Haugan 90871fef4b Refactor exports and JSDoc prop type links in components with sub-components (#4575) 2026-01-29 13:02:37 +01:00
github-actions[bot] 324e6f2b4b Version Packages (#4568)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-29 12:46:03 +01:00
Halvor Haugan f7a65471fd DataToolbar: Rename DataToggleButton.tsx -> DataToolbarToggleButton.tsx 2026-01-29 12:17:46 +01:00
Ken 9880d3a2cf 🧪 Added webook to log revalidating tags causing performance issue on website 2026-01-28 22:00:07 +01:00
Ken 002fdab355 [DataTable] Added column visibility story 2026-01-28 15:12:28 +01:00
Anniken Granberg b758987ad6 Dummy data and filtering 2026-01-28 14:56:30 +01:00
Halvor Haugan d8aa9ab581 DataActionBar 2026-01-28 13:11:37 +01:00
Ken 8bb5eb78d4 [DataTable] Update project-structure, added toggle-button, css 2026-01-28 10:39:30 +01:00
Ken e97b427dd3 ♻️ Refactor DataTable and related components to under 'data'-dir 2026-01-28 09:49:23 +01:00
Halvor Haugan 3a6832e009 [website] Example error page (#4571) 2026-01-28 09:36:26 +01:00
Ken 1d5401ad2a [Website] Test custom cache-handler (#4567)
* 🧪 Use 24-alpine

* 🧪 Test auto-instrumentation

* 🎉 Fix produktbloggen cache

* 🎉 Test cache-handler in memory

* 🎉 Test custom cache handler with ttl

* 📝 Add cache handler and observability
2026-01-28 09:23:56 +01:00
Ken 3070d28af6 [Website] 🎉 Auto-link to relevant changelogs (#4572)
* 🎉 Auto-link to relevant changelogs

* Apply suggestions from code review
2026-01-28 09:21:57 +01:00
Halvor Haugan 96a5d81248 [website] Non-sticky header on small screens (#4560) 2026-01-27 16:43:11 +01:00
Ken b3251bdbdf 🧪 Test less agressive live refresh of content (#4570) 2026-01-27 16:37:14 +01:00
Ken 8bd6b7e77d Merge branch 'main' of https://github.com/navikt/aksel 2026-01-27 16:35:06 +01:00
Ken f0d1b1f25a 🐛 Clean directories bottom up to avoid trying to delete already deleted directory 2026-01-27 16:34:50 +01:00
dependabot[bot]andKen 9676fbdcd8 ⬆️ Bump jscodeshift from 0.15.2 to 17.3.0 (#4552)
* ⬆️ Bump jscodeshift from 0.15.2 to 17.3.0

Bumps [jscodeshift](https://github.com/facebook/jscodeshift) from 0.15.2 to 17.3.0.
- [Release notes](https://github.com/facebook/jscodeshift/releases)
- [Changelog](https://github.com/facebook/jscodeshift/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jscodeshift/compare/v0.15.2...v17.3.0)

---
updated-dependencies:
- dependency-name: jscodeshift
  dependency-version: 17.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Update jscodeshift

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-01-27 16:29:48 +01:00
dependabot[bot]andKen c207c954e1 ⬆️ Bump rimraf from 6.0.1 to 6.1.2 (#4564)
* ⬆️ Bump rimraf from 6.0.1 to 6.1.2

Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.0.1 to 6.1.2.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v6.0.1...v6.1.2)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync rimraf update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-01-27 16:26:06 +01:00
dependabot[bot] 5239686aec ⬆️ Bump prettier from 3.6.2 to 3.8.1 (#4565)
Bumps [prettier](https://github.com/prettier/prettier) from 3.6.2 to 3.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.6.2...3.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 16:24:30 +01:00
dependabot[bot] 1d05b69c98 ⬆️ Bump stylelint-test-rule-node from 0.4.0 to 1.0.0 (#4566)
Bumps [stylelint-test-rule-node](https://github.com/stylelint/stylelint-test-rule-node) from 0.4.0 to 1.0.0.
- [Release notes](https://github.com/stylelint/stylelint-test-rule-node/releases)
- [Changelog](https://github.com/stylelint/stylelint-test-rule-node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint-test-rule-node/compare/0.4.0...1.0.0)

---
updated-dependencies:
- dependency-name: stylelint-test-rule-node
  dependency-version: 1.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 16:17:25 +01:00
Halvor Haugan 967c9092d2 [website] Adjust how example iframe height is calculated (#4569) 2026-01-27 15:37:53 +01:00
Anniken Granberg 6b9b2b4ebf [InternalHeader] Change examples to use ActionMenu (#4550)
* examples

* get global theme for website examples on actionmenu
2026-01-27 15:32:38 +01:00
Halvor Haugan 08e532b153 [website] Migrate BoxNew to Box (#4555) 2026-01-27 15:02:08 +01:00
Halvor Haugan b800248715 [website] Adjust theme-switch template and ProgressBar example (#4561) 2026-01-27 14:54:21 +01:00
Anniken Granberg 4da0f54173 [ActionMenu] Add support for right aligned icons on ActionMenu items (#4545)
* Add functionality for right placed icon

* add aksel website example

* remomve left padding for right icon

* add support for right icon on sub menu item

* changeset

* remove @property

* remove examples

* remove example

* remove example

* remove class and use data attr

* only add data attr if icon

* add story for icon position

* seperate the examples
2026-01-27 14:51:15 +01:00
Ken ff7a792049 📌 Dependabot adjustments (#4557) 2026-01-27 14:09:24 +01:00
Halvor Haugan 3976b2c710 Delete Darkside-migration.md 2026-01-26 16:44:48 +01:00
Ken 341aab24a2 [DataTable] Boilerplate setup (#4558)
* 🎉 Initial boilerplate

* 🎉 Boilerplate for all sub-components

* 🎉 Set up tooltip boilerplate

* 🎉 TableToolbar stories

* 🎉 TableFilter boilerplate

* 📝 Readme
2026-01-26 15:42:14 +01:00
Halvor Haugan 82c5bec4d7 Add npmMinimalAgeGate and defaultSemverRangePrefix to .yarnrc.yml (#4556) 2026-01-26 11:48:34 +01:00
dependabot[bot]andKen 0157be15ee ⬆️ Bump vitest from 3.2.4 to 4.0.16 in the vitest group (#4551)
* ⬆️ Bump vitest from 3.2.4 to 4.0.16 in the vitest group

Bumps the vitest group with 1 update: [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `vitest` from 3.2.4 to 4.0.16
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.0.16/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-version: 4.0.16
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: vitest
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Update vitest

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-01-26 10:42:01 +01:00
dependabot[bot]andKen b1dba62690 ⬆️ Bump fast-glob from 3.2.11 to 3.3.3 (#4553)
* ⬆️ Bump fast-glob from 3.2.11 to 3.3.3

Bumps [fast-glob](https://github.com/mrmlnc/fast-glob) from 3.2.11 to 3.3.3.
- [Release notes](https://github.com/mrmlnc/fast-glob/releases)
- [Commits](https://github.com/mrmlnc/fast-glob/compare/3.2.11...3.3.3)

---
updated-dependencies:
- dependency-name: fast-glob
  dependency-version: 3.3.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync fast-glob

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-01-26 09:07:57 +01:00
dependabot[bot] 09b58c8245 ⬆️ Bump chromatic from 13.3.3 to 13.3.5 (#4554)
Bumps [chromatic](https://github.com/chromaui/chromatic-cli) from 13.3.3 to 13.3.5.
- [Release notes](https://github.com/chromaui/chromatic-cli/releases)
- [Changelog](https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chromaui/chromatic-cli/compare/v13.3.3...v13.3.5)

---
updated-dependencies:
- dependency-name: chromatic
  dependency-version: 13.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 09:03:28 +01:00
Ken 6062678926 [Sanity] 🎉 Added sanity dashboard support (#4541)
* 🎉 Added sanity dashboard support

* Update deploy command
2026-01-23 17:24:00 +01:00
Ken 9de76e73d5 ⚡ Sort articles by published date, fix Formstate error 2026-01-23 17:13:45 +01:00
Ken e9c78c642d 🐛 Correct link-styling for show-all god-praksis links 2026-01-23 17:07:34 +01:00
Ken 982c4aa719 💄 Updates to frontpage beta-tag and highlights 2026-01-22 22:56:01 +01:00
Ken 3f7bdf20bc [Website] 🔥 Removed tailwind (#4548)
* 🔥 removed tailwind dependency

* yarn.lock update

* 🐛 Add pointer to buttons
2026-01-22 21:20:48 +01:00
github-actions[bot] 1c3194b1ba Version Packages (#4519)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-22 15:46:23 +01:00
dependabot[bot]andKen f787e4e9c5 ⬆️ Bump the npm_and_yarn group across 4 directories with 1 update (#4543)
* ⬆️ Bump the npm_and_yarn group across 4 directories with 1 update

Bumps the npm_and_yarn group with 1 update in the /@navikt/aksel directory: [lodash](https://github.com/lodash/lodash).
Bumps the npm_and_yarn group with 1 update in the /@navikt/aksel-icons directory: [lodash](https://github.com/lodash/lodash).
Bumps the npm_and_yarn group with 1 update in the /@navikt/core/tokens directory: [lodash](https://github.com/lodash/lodash).
Bumps the npm_and_yarn group with 1 update in the /aksel.nav.no/website directory: [lodash](https://github.com/lodash/lodash).


Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* yarn.lock update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-01-22 13:24:35 +01:00
Ken 1a76b7e88f 📝 Require node 22 for CLI caused by use of ESM in CJS file (#4546) 2026-01-22 13:24:13 +01:00
KenandHalvor Haugan 745863f53d [Next/Sanity] Next 16 and Sanity v5 upgrade (#4437)
* ⬆️ Upgrade nextjs

* 📝 rename proxy

* 🐛 Fix eslint config

* 📝 Fix next-config

* 🐛 Fix next link import

* 🏷️ Resolve type-errors

* ⚡ Use Activity

* ⬅️ Revert mobilemenu optimization

* ⬆️ Update image util

* ⬆️ Upgrade sanityjs

* 🏷️ Type updates

* 🏷️ Update type packages

* ⬆️ Update sanity

* ⬆️ Update next

* ⬆️ Use React 19 for repo

* ⬆️ Use React 19

* undo react version changes in icon-package

* 🐛 Fix link rendering

* 🐛 Fix cssProperties types

* Update aksel.nav.no/website/app/(routes)/(designsystemet)/grunnleggende/endringslogg/_ui/ShowMoreButton.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⬆️ Update yarn

* ⬆️ Update yarn

* yarn.lock update

* yarn.lock update

* 🐛 Sync react types version

* 🐛 Removed unused React import after setting jsx to react-jsx

* 🏷️ Resolve type-issue

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-01-22 13:13:56 +01:00
Ken cb7ac11a6a 🐛 Ingore location based search (#4542) 2026-01-22 12:44:33 +01:00
Halvor Haugan f5c739065c [Sanity] Allow anchor links and URLs without domain (#4547) 2026-01-22 12:34:52 +01:00
dependabot[bot] 0475a81b67 ⬆️ Bump lodash-es from 4.17.21 to 4.17.23 (#4544)
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash-es
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 10:27:15 +01:00
Anniken Granberg ae8961b23e [GlobalAlert] Add centered as examples (#4536) 2026-01-21 15:06:02 +01:00
Halvor Haugan b4d56bc38a Upgrade stylelint-config-standard (#4540) 2026-01-21 12:50:28 +01:00
dependabot[bot] a1e14b4592 ⬆️ Bump vite-plugin-singlefile from 2.2.0 to 2.3.0 (#4538)
Bumps [vite-plugin-singlefile](https://github.com/richardtallent/vite-plugin-singlefile) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/richardtallent/vite-plugin-singlefile/releases)
- [Changelog](https://github.com/richardtallent/vite-plugin-singlefile/blob/main/CHANGELOG.md)
- [Commits](https://github.com/richardtallent/vite-plugin-singlefile/commits/v2.3.0)

---
updated-dependencies:
- dependency-name: vite-plugin-singlefile
  dependency-version: 2.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:47:51 +01:00
Halvor Haugan 163b4fd418 Accordion: Warn when only one item, or multiple instances after each other (#4525) 2026-01-21 12:32:44 +01:00
Anniken Granberg 15bc539a13 [ActionMenu] Allow focus for non-actionable content (#4522)
* testing action menu header

* revert to old example

* let focus on container

* added example for actionMenu

* remove testing stuff

* changeset

* remove comments

* changeset
2026-01-21 12:18:26 +01:00
Halvor Haugan 790d0efea5 Upgrade Yarn (#4534) 2026-01-21 12:18:03 +01:00
Halvor Haugan 32a2bcb8cb Dependabot: Add group for vitest (#4535) 2026-01-21 12:17:50 +01:00
dependabot[bot] 1684373897 ⬆️ Bump axios from 1.9.0 to 1.13.2 (#4529)
Bumps [axios](https://github.com/axios/axios) from 1.9.0 to 1.13.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.9.0...v1.13.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:05:18 +01:00
dependabot[bot] ac1078989b ⬆️ Bump valibot from 1.1.0 to 1.2.0 (#4531)
Bumps [valibot](https://github.com/open-circle/valibot) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/open-circle/valibot/releases)
- [Commits](https://github.com/open-circle/valibot/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: valibot
  dependency-version: 1.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:00:57 +01:00
dependabot[bot] e1bcc77617 ⬆️ Bump mdast-util-to-hast from 13.2.0 to 13.2.1 (#4532)
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 11:59:20 +01:00
dependabot[bot] 0a5029b610 ⬆️ Bump node-forge from 1.3.1 to 1.3.3 (#4530)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.3.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.3)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 11:58:00 +01:00
dependabot[bot] 523868f414 ⬆️ Bump min-document from 2.19.0 to 2.19.2 (#4528)
Bumps [min-document](https://github.com/Raynos/min-document) from 2.19.0 to 2.19.2.
- [Commits](https://github.com/Raynos/min-document/compare/v2.19.0...v2.19.2)

---
updated-dependencies:
- dependency-name: min-document
  dependency-version: 2.19.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 11:57:23 +01:00
dependabot[bot] be2d7119b1 ⬆️ Bump the npm_and_yarn group across 3 directories with 1 update (#4527)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [tar](https://github.com/isaacs/node-tar).
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [tar](https://github.com/isaacs/node-tar).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.5.2 to 7.5.6
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.2...v7.5.6)

Updates `tar` from 7.5.3 to 7.5.6
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.2...v7.5.6)

Updates `tar` from 7.5.3 to 7.5.6
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.2...v7.5.6)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 11:56:40 +01:00
465bfb16b1 Upgrade to React 19 (#4123)
* Upgrade to React 19

* fix refs

* Lock versions

* 🐛 Port over showmorebutton typing-fix

* fix Avatar

* Fix type issue in EditorPanel.tsx

* Update browserslist

* Fix type error in CustomPortableText.components.tsx

* temp debugging

* debugging 2

* debug 3

* debug 4 next link

* Debug 5 refactor

* debug 6 vanlig lenke

* debug 7 hard coded text

* debug 8 wo LinkCardAnchor

* slot error

* just console error

* log children

* revert debugging

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-01-21 11:35:33 +01:00
Halvor Haugan 4bc5450809 Adjust changesets 2026-01-21 09:55:28 +01:00
Ken 776bd81f19 🐛 Discrete events did not handle react-19 well with event-batching (#4524) 2026-01-21 09:49:56 +01:00
dependabot[bot] ded4e4712e ⬆️ Bump the npm_and_yarn group across 2 directories with 1 update (#4509)
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [tar](https://github.com/isaacs/node-tar).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [tar](https://github.com/isaacs/node-tar).


Updates `tar` from 7.4.3 to 7.5.3
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.3...v7.5.3)

Updates `tar` from 7.4.3 to 7.5.3
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.3...v7.5.3)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-version: 7.5.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-20 19:42:25 +01:00
Halvor Haugan d4f27e144c Slot: Fix RSC related issue (#4523) 2026-01-20 16:23:50 +01:00
Ken b12f2c8ffa [Vitest] ⬆️ Update package versions (#4520)
* ⬆️ Update vitest

* 🐛 Fix ui-tests runner with playwright-browser
2026-01-20 15:43:49 +01:00
Halvor Haugan b504aed88e Adjust desc in FormSummary grouped example 2026-01-20 11:39:55 +01:00
Ken 8ac99ca0a8 🐛 Fix import-errors after merge 2026-01-20 10:02:06 +01:00
Ken 9546d61ecf 📝 Update remaining stories to work with React 19 (#4518)
* 📝 Update remaining stories to work with React 19

* 🐛 Re-add chromatic to combobox

* 🐛 Fix formprogress story
2026-01-20 09:53:54 +01:00
KenandHalvor Haugan 7a524986d3 🚚 Updated utility structure (#4505)
* 🔥 Remove RenameCSS

* more cleanup

* 📝 Test path aliasing

* 🔥 Removed duplicate import

* 🚚 Moved external utils

* 📝 Update tests

* 🚚 Update utility structure

* Apply suggestion from @KenAJoh

* 🐛 Undo import removal

* 🚚 Inlined tests

* [Utility structure] Updated imports (#4516)

* 🏷️ Checkpint import update

* 🏷️ Checkpoint import update 2

* 🏷️ Checkpoint import update 3

* 🏷️ Resolve outside direct imports

* 🐛 Resolve no-cycle lint error

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-01-20 09:41:45 +01:00
Ken 98e971fb61 ⚡ Add lint-error when importing from cjs/esm dirs 2026-01-19 16:18:58 +01:00
github-actions[bot] 7383d66aeb Version Packages (#4497)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-19 15:03:59 +01:00
Halvor Haugan 03e8c2e847 Fix React 19 type errors in useMergeRefs and Modal.context (#4515) 2026-01-19 13:14:26 +01:00
Ken 9421b3da4e 🐛 AccordionContent-text had blue tint inherited from app color. (#4514) 2026-01-19 12:55:55 +01:00
Ken 30933e2233 🐛 Update endringslogg link 2026-01-19 11:30:12 +01:00
Halvor Haugan 269f79df23 DatePicker: Add prop fixedWeeks to DatePickerProps (#4507) 2026-01-16 12:38:04 +01:00
Halvor Haugan c1d634e95e [website] Remove clsx dependency (#4506) 2026-01-16 12:37:13 +01:00
Ken 88ab5b2ba0 [Stylelint] 🐛 Let stylelint resolve tokens from any CWD (#4504)
* 🐛 Let stylelint resolve tokens from any cwd

* 🔥 Removed added rule

* 🐛 Resolve lint errors
2026-01-16 12:23:40 +01:00
Ken 4ce76f654d 🐛 Fix sanity-data that returns null-values (#4508) 2026-01-16 12:22:16 +01:00
Halvor Haugan 39d56148d1 🔥 Remove RenameCSS (#4500) 2026-01-16 10:48:32 +01:00
Halvor Haugan fd73b70922 Upgrade packages in examples/astro 2026-01-16 09:32:01 +01:00
Halvor Haugan 48edb1e8aa Fix some React 19 type errors in stories (#4502) 2026-01-16 09:18:05 +01:00
dependabot[bot] c5763ea105 ⬆️ Bump devalue (#4501)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [devalue](https://github.com/sveltejs/devalue).


Updates `devalue` from 5.5.0 to 5.6.2
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/devalue/compare/v5.5.0...v5.6.2)

---
updated-dependencies:
- dependency-name: devalue
  dependency-version: 5.6.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-15 19:56:47 +01:00
dependabot[bot] f072a32b12 ⬆️ Bump diff (#4492)
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [diff](https://github.com/kpdecker/jsdiff).


Updates `diff` from 8.0.2 to 8.0.3
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](https://github.com/kpdecker/jsdiff/compare/v8.0.2...v8.0.3)

---
updated-dependencies:
- dependency-name: diff
  dependency-version: 8.0.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-15 19:29:54 +01:00
Ken 737f9e47f9 🐛 Fix link-color in FileUpload after css-layer update 2026-01-15 16:20:38 +01:00
Ken e11dc404db 🐛 Fix css var use on website 2026-01-15 14:46:23 +01:00
github-actions[bot] 18093afc94 Version Packages (#4494)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-15 14:31:11 +01:00
b88b8ba781 Fix upload pr (#4496)
* New component for buttons and loader within Item

* New component from file name with icon

* Removed loader and error icon for file icon

* Use new components for new design

* Css styling for new design to Item

* Delete unused filed, replaced by ItemHeader

* changeset

* try to fix cycle dependency

* Fill width

* Remove min width and height

* 🔥 Removed changeset

---------

Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
Co-authored-by: Anniken Granberg <43889032+nixenixe@users.noreply.github.com>
2026-01-15 14:22:45 +01:00
5572548bb5 Version 8 major release (#4283)
* Always use aksel-prefix for classNames

* 🔥 Removed body override from Modal

* 🔥 Removed legacy classNames in GuidePanel

* 🔥 Removed legacy classNames in Stepper

* 🔥 Removed Arrow from popover

* 🔥 Removed deprecated prop from Accordion

* 🚚 Migrate Tag variant

* 🚚 Update all use of Tag

* 🚚 Migrate Chips variant

* ⬅️ Undo Accordion variant removal, fall back to data-color

* 🚚 Migrate Chips variant

* 🚚 Migrate CopyButton variant

* 🚚 Removed deprecated List props

* 🚚 More isDarkside cleanup

* 🚚 Togglegroup variant update

* ⚡ Remove darkside decorator in storybook

* 📝 Migration doc

* 🚚 Migrate Link

* 🔥 Removed variant subtle link from website

* 🚚 Migrate Pimitives check for darkside

* 🚚 Use new implementation as default for Radio and Checkbox

* 🚚 Finished removing isDarkside check

* 🚚 Migrated BoxNew -> Box

* 📝 TODOs

* 🚚 Migrated use of Box in stories

* 🔥 removed temp file

* 🚚 Migrate away from legacy-tokens

* 🚚 Migrate to new token-import

* ⚰️ Clean up depreactions-file in stylelint. We start anew again

* 🚚 Move data-color for variant from wrapper -> header Accordion

* 📝 Changes based on PR-review

* 🎉 Add link codemod

* 📝 Docs

* Update @navikt/core/react/src/chips/chips.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Docs

* Update @navikt/core/react/src/accordion/Accordion.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/box/Box.darkside.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/tokens/tsconfig.json

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [Darkside] Button changes for darkside update (#4322)

* 🎉 Update button variant and colors

* 📝 Update examples

* 📝 Button codemod

* 📝 Add back size story

* Update aksel.nav.no/website/pages/eksempler/button/neutral.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Darkside tailwindcss config -> main config (#4328)

* [Darkside] CSS-package update (#4330)

* ⚰️ Delete legacy CSS

* 🎉 Migrate away from legacy-css

* 🧪 rename test script

* 🚚 rename darkside css files

* 🔥 removed some legacy use of old css/tokens

* 🐛 Fix css imports

* 🎉 Optimize layer-handling

* 🎉 CSS is not import order agnostic

* ⬆️ yarn lock sync

* 🎉 Legacy-tokens reference new tokens (#4345)

* [Darkside] Fix type errors (#4354)

* [Darkside] Migrate examples (#4364)

* [Darkside] Migrate templates (#4358)

* 🔥 Removed cssnano from next-build

* 🐛 Only warn if using title in List to avoid type-errors

* ⬅️ Revert listtype change

* 📝 Update stylelint TODOs

* [Darkside] Migrate stylelint rules (#4388)

* [Darkside] Change remaining `--__ac-` prefixed CSS-variables to `--__axc-` (#4389)

* ⚰️ Deprecated variant prop in Chat

* Remove test script in ds-css

* [Darkside] Remove references to old tokens in components/stories (#4390)

* [Darkside] Added "data-color" prop to components (#4387)

* 🏷️ Add data-color type

* 🏷️ Add more data-color type

* Update @navikt/core/react/src/pagination/Pagination.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/local-alert/root/LocalAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Better docs

* 📝 Doc-updates

* typo

* 🏷️ Resolve type-error

* Update @navikt/core/react/src/copybutton/CopyButton.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/loader/Loader.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/timeline/period/index.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>

* Rename Button-example "demo" to "accent" and add desc

* [Darkside] Remove legacy option from theme switch (#4405)

* 🎉 Allow more data-color options on Button

* 🎉 Added contrast to typo textColor-prop

* [Darkside] Examples update. Progress: Start -> Bodylong (#4421)

* 📝 Button variant update

* 📝 InternalHeader theme + actionMenu

* ⚰️ Delete Alert with buttons example

* Update aksel.nav.no/website/pages/eksempler/actionmenu/header.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🚚 Moved token-view replacing old tokens

* 🔥 Cleanup of legacy-tokens

* [Darkside] Theme provider adjustments (#4422)

* 🐛 Handle Loader-css layering bug, add background to website trough Theme-component.

* 📝 Show release as live docs

* 🎉 Updated playroom (#4436)

* 🎉 Updated playroom

* 📝 Update imports

* 📝 Ignore auto-generated file

* 🐛 Fix gitignore

* 🐛 Fix gitignore

* 🐛 Use typescript

* 🐛 Use min height to allow background to flow correctly

* ⬅️ Revert temp changes with no effect

* [Darkside] Update references to darkside in storybook and code (#4451)

* 📝 Remove more references to darkside.

* Update @navikt/core/tailwind/src/build.test.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [Darkside] Update references to darkside in docs and code (#4449)

* 📝 Rename all references to darkside -> v8

* 📝 Update darkside references

* 🚚 Moved v8-tokens dir into codemod dir

* 🐛 resolve import issue

* ✨ Added ability to run CLI-tool without npx

* Update ColorRole-stories on typo-components

* [Darkside] Remove some unused classNames (#4454)

* [Darkside] Update links to token-docs (#4462)

* [Darkside] Fix chat and timeline examples (#4467)

* [Darkside] Removed legacy spacing and border-radius tokens (#4458)

* 🔥 Removed legacy spacing and border-radius tokens

* 📝 Migrate some space and radius token use

* 🎉 Update tokens

* 📝 Updated stories

* use propValue directly instead of reassigning it first

* 📝 Updated primitives spacing in stories

* 📝 Update remaining use of legacy spacing and borderRadius on stories

* 🔥 Removed 0 spacing

* 📝 Update use of hgrid

* 🐛 Undo change of bin-command

* 🔥 Removed px and 0 from bleed spacing

* 🐛 Revert tokenException removal

* Update @navikt/core/react/src/layout/utilities/css.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Removed string | object notation from AkselColor type.

* [Darkside] Examples update darkside Start -> Modal (#4469)

* 📝 Body coloring

* 📝 More example updates for darkside colors

* 📝 Update primitive examples

* 🐛 Undo bin revert

* Change background on h-stack wrap example

* Update aksel.nav.no/website/pages/eksempler/heading/colors.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 💄 Better contrast for examples

* Update aksel.nav.no/website/pages/eksempler/chat/colors.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Adjust stories for icons, Bleed, Box and Stack (#4472)

* 🐛 Use correct colors

* [Darkside] 📝 Remaining example-updates (#4477)

* 📝 More updated examples

* 📝 Example id

* [Darkside] JSDoc adjustments for data-color on some components (#4485)

* [Darkside] TODO cleanup (#4481)

* 🏷️ Add dynamic theming to Box

* 🔥 Removed old comment

* 💄 Sync Modal backdrop-colors

* 🔥 Removed old comments for tokens

* Update @navikt/core/react/src/layout/box/Box.darkside.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/box/Box.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [Darkside] Handle theming better in FormSummary, Guidepanel. Fix forced-colors in Button (#4479)

* 💄 Primary-button forced colors

* 💄 Handle theming better in formsummary

* 📝 Handle nested colors better in GuidePanel

* 📝 Better forced-color handling for buttons

* [Darkside] Removed legacy-tokens, added migration to codemod (#4486)

* 🎉 Added 16px border-radius

* 🐛 Handle redefinition of radius-tokens

* 🐛 Handle space-update in token-migration codemod

* 📝 Print use of ax-tokens

* 🐛 Remove use of legacy border-radius

* 🔥 Removed comment

* Adjust description of v8-list migration

* 📝 Replacements update

* Token migration comments update

* Remove redundant Chromatic story for GlobalAlert

* Token migration comments update 2

* 📝 Updated ignore and tests

* legacy.tokens.ts: had comment in replacement by mistake

* 🐛 Update tests

* 🧪 Add failing test

* 🔥 removed unused code

* 🐛 Handle tailwind-tokens with matching css-var names

* 🔥 Removed perspective stack from sanity

* 📝 Update meta.json change-date for 400 and 500 templates

* 📝 Better v8-tokens migration status-texts

* 🔥 Removed darkside from sidebar config

* 🐛 Handle string inside object-literal

* changeset

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2026-01-15 13:55:41 +01:00
Anniken GranbergandAnniken Granberg 62e9650f38 Change website DatePicker and MonthPicker description examples to use date format in Norwegian (#4493)
* change format description to norwegian

* Update date format descriptions to Norwegian standard

---------

Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
2026-01-15 13:30:45 +01:00
github-actions[bot] 10fedc5aac Version Packages (#4491)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-15 13:00:47 +01:00
Halvor Haugan 23a8e717f3 Date/MonthPicker: Remove role=dialog (#4463) 2026-01-15 10:47:32 +01:00
dependabot[bot]andKen 34cc031960 ⬆️ Bump colorjs.io from 0.5.2 to 0.6.0 (#4475)
* ⬆️ Bump colorjs.io from 0.5.2 to 0.6.0

Bumps [colorjs.io](https://github.com/color-js/color.js) from 0.5.2 to 0.6.0.
- [Release notes](https://github.com/color-js/color.js/releases)
- [Commits](https://github.com/color-js/color.js/compare/v0.5.2...v0.6.0)

---
updated-dependencies:
- dependency-name: colorjs.io
  dependency-version: 0.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Handle updated coords resolve after update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2026-01-14 15:50:45 +01:00
Anniken GranbergandAnniken Granberg 2a43bcc6d1 [Icons] Add icons MagnifyGlassCheckmark (#4489)
* add icons

* changeset

---------

Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
2026-01-14 15:32:08 +01:00
github-actions[bot] 19954045ba Version Packages (#4484)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-14 15:16:28 +01:00
Ken 7efacb88d1 [Dialog] [Modal] Handle overflow for extreme zoom-ranges (#4488)
* 🐛 Handle extreme zoom in Modal and Dialog better

* 📝 Changeset update
2026-01-14 11:22:00 +01:00
Ken f58df4e1bc 🐛 Test defining Ui test root 2026-01-13 15:45:21 +01:00
Ken 6e84d90e79 🐛 Try running CI-tests on firefox instead of chromium to avoid hangups 2026-01-13 12:22:24 +01:00
Ken 2883032861 [Dialog] Removed 'aria-expanded' from Dialog.Trigger (#4478)
* 📝 Changeset

* 🔥 Removed aria-expanded from dialog-examples
2026-01-13 09:38:00 +01:00
Anniken GranbergandAnniken Granberg b4622094ff added format description for MonthPicker (#4483)
Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
2026-01-12 16:47:49 +01:00
Ken 6c3bff09cf 🐛 Avoid coloring paragraph-content in highlighted changelogs. Toned down highlighted heading. 2026-01-12 16:42:18 +01:00
Anniken GranbergandAnniken Granberg 796dd929c1 add chromatic (#4482)
Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
2026-01-12 16:32:51 +01:00
Anniken GranbergandAnniken Granberg 1710577b70 Added format description to aksel website examples (#4480)
Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
2026-01-12 16:30:57 +01:00
github-actions[bot] 20c6395fa9 Version Packages (#4473)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-12 16:14:45 +01:00
Ken 91f3f8acb8 📝 Changeset update 2026-01-12 16:00:03 +01:00
0e1685dd7d Update alert (#4476)
* Added alignContent prop to GlobalAlertRoot

* test

* test

* test

* changeset

* Change to use data-attributes. Change prop name to "centered" and made it boolean.

* Added styling to darkside

* Changed with prop change to boolean

* Change css to use data-attributes

* correct changeset

* Update .changeset/warm-meteors-go.md

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

---------

Co-authored-by: Anniken Granberg <anniken.granberg@na.no>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-01-12 13:21:37 +01:00
Ken e938cc0c7a [Dialog] Handle SR-only elements better, add scroll shadows (#4457)
* 🐛 Handle sr-only better for Dialog

* Apply suggestion from @KenAJoh

* 📝 Added scroll-story
2026-01-12 13:10:17 +01:00
Ken 7b487edb03 [Playroom] Resolve issues with preview (#4470)
* 🎉 Script to fix playroom issue

* 🐛 Resolve playroom preview issue

* 🐛 Resolve playroom e2e sandbox test
2026-01-12 12:52:49 +01:00
dependabot[bot] cc1c35d59a ⬆️ Bump the storybook group with 9 updates (#4474)
Bumps the storybook group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `10.1.10` | `10.1.11` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.1.10` | `10.1.11` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `10.1.10` | `10.1.11` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `10.1.10` | `10.1.11` |
| [@storybook/nextjs-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `10.1.10` | `10.1.11` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.1.10` | `10.1.11` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.1.10` | `10.1.11` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.1.10` | `10.1.11` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `10.1.10` | `10.1.11` |


Updates `@storybook/addon-a11y` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/addons/a11y)

Updates `@storybook/addon-docs` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/addons/docs)

Updates `@storybook/addon-themes` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/addons/themes)

Updates `@storybook/addon-vitest` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/addons/vitest)

Updates `@storybook/nextjs-vite` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/lib/eslint-plugin)

Updates `storybook` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/core)

Updates `storybook-addon-pseudo-states` from 10.1.10 to 10.1.11
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/nextjs-vite"
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 10.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 09:54:09 +01:00
KenandHalvor Haugan fb384fa3e2 [Darkside] ExpansionCard.Content typography is no longer affected by 'app-color' (#4460)
* 🐛 Stop setting colors on typo-element from affecting nested typo

* 🐛 Inline fix expansioncard content

* Update .changeset/smart-canyons-cut.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Handle ExpansionCard data-color prop

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-01-12 09:32:06 +01:00
Ken ae95c5c9db ♿ Removed tabIndex 0 from content (#4464)
* ♿ Removed tabIndex 0 from content

* 💄 Removed focus styling from readmore content
2026-01-09 17:06:01 +01:00
Halvor Haugan 2c25ceee09 Adjust some stories (#4471) 2026-01-09 16:48:07 +01:00
dependabot[bot] e0a1add87e ⬆️ Bump react-router from 7.10.0 to 7.12.0 (#4461)
Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.10.0 to 7.12.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router@7.12.0/packages/react-router)

---
updated-dependencies:
- dependency-name: react-router
  dependency-version: 7.12.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-09 16:42:37 +01:00
Halvor Haugan 1b04724211 [website] Adjust some DatePicker examples, and fix some Loader examples not working in SB (#4468) 2026-01-09 15:37:54 +01:00
Halvor Haugan fee738602d Primitives: Fix type issue with className (#4466) 2026-01-09 15:16:13 +01:00
Halvor Haugan 873c1b3f9a Sync package versions (#4459) 2026-01-08 19:19:17 +01:00
github-actions[bot] abed964174 Version Packages (#4443)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-08 14:36:20 +01:00
Ken d631eefe59 🐛 Update v8-primitive-spacing codemod 2026-01-08 14:32:55 +01:00
Halvor Haugan 9255fd61b6 [website] Adjust examples of FileUpload (#4456) 2026-01-08 13:51:23 +01:00
Halvor Haugan b2e6f534c6 [docgen] Fix issues with JSDoc example parsing and rendering (#4423) 2026-01-08 13:24:44 +01:00
KenandHalvor Haugan d7285c94ec [Actionmenu] Safezone handling while inside custom-components (#4428)
* 🎉 Handle web-components and outsideclick better

* ✨ Use callback instead of static ref

* 🔥 Removed unreachable code

* Update .changeset/empty-balloons-roll.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 better docs and tests

* 🎉 Now auto-handles anchor and pointer-events

* Update @navikt/core/react/src/overlays/dismissablelayer/DismissableLayer.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Doc updates

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-01-08 13:16:55 +01:00
KenandHalvor Haugan 155b395187 [Dialog] Bugfix: Use inside/outside Modal, Escape-bubbling and z-index (#4455)
* 🐛 Handle Dialog inside Modal, and the opposite better

* 🐛 Handle use inside or outside Modal better, fix escape-bubbling in Modal and z-index for dialog backdrop

* 📝 Changeset

* Update .changeset/early-rockets-attend.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed styles from stories

* Update @navikt/core/react/src/date/Date.Dialog.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/dialog/popup/DialogPopup.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Correct prop-naming

* 📝 story-cleanup

* 📝 Comments

* 📝 Two separate changesets

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-01-08 13:16:31 +01:00
Ken 5810913fa7 🐛 Use legacy-token for legacy dialog-css 2026-01-08 13:11:30 +01:00
Ken 6219718eba [Dialog] Now has border in light-mode (#4452)
* 💄 Dialog now has border in light-mode based on figma-adjustments

* 💄 Update legacy-css
2026-01-08 12:40:47 +01:00
Halvor Haugan a3b919fc31 Dialog: Fix typo in JSDoc 2026-01-07 11:59:26 +01:00
b30d92fed3 ⬆️ Bump commander from 10.0.1 to 14.0.2 (#4445)
* ⬆️ Bump commander from 10.0.1 to 14.0.2

Bumps [commander](https://github.com/tj/commander.js) from 10.0.1 to 14.0.2.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tj/commander.js/compare/v10.0.1...v14.0.2)

---
updated-dependencies:
- dependency-name: commander
  dependency-version: 14.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Handle unknown arguments

* 🐛 Allow unknown args

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2026-01-06 12:21:07 +01:00
Ken 5bd333af80 [Util] ⚡ Update mergedRef utility hook (#4434)
* ⚡ Update mergedRef utility

* 🐛 Rever locale update

* 📝 Tests
2026-01-06 12:16:34 +01:00
Ken cc8dc08010 🔥 Remove unused eslint directive 2026-01-05 16:42:23 +01:00
dependabot[bot] e4d29610f7 ⬆️ Bump @figma/rest-api-spec from 0.34.0 to 0.35.0 (#4446)
Bumps [@figma/rest-api-spec](https://github.com/figma/rest-api-spec) from 0.34.0 to 0.35.0.
- [Commits](https://github.com/figma/rest-api-spec/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: "@figma/rest-api-spec"
  dependency-version: 0.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 16:41:30 +01:00
Ken 2a9c5775a8 📌 Revert grouping of dependabot updates 2026-01-05 16:22:51 +01:00
Ken 51f61b63b0 ✨ Backport playroom update from darkside PR 2026-01-05 16:16:05 +01:00
KenandHalvor Haugan 43108e80d0 [CLI] Interactive major-version codemod selection (#4427)
* ✨ Version migrations

* 🎉 Interactive version migration

* 📝 Text updates

* 🎉 Dynamic interactive migrations

* 📝 Changeset

* 📝 Comments

* Update @navikt/aksel/src/codemod/index.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/migrations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ More forgiving version migration check.

* 📝 remove linebreaks

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2026-01-05 16:01:52 +01:00
Ken 44e4c7d63e 🐛 defaultExclude when running vitest for website (avoids running tests found in node_modules). 2026-01-05 12:33:36 +01:00
dependabot[bot] 786189a901 ⬆️ Bump the eslint group with 2 updates (#4429)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.39.1 to 9.39.2
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.2/packages/js)

Updates `eslint` from 9.39.1 to 9.39.2
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.1...v9.39.2)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.39.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 12:24:03 +01:00
dependabot[bot] de69d7a4c4 ⬆️ Bump mdast-util-to-hast (#4439)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast).


Updates `mdast-util-to-hast` from 13.2.0 to 13.2.1
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 12:21:50 +01:00
dependabot[bot] 53aeb88ba1 ⬆️ Bump qs from 6.14.0 to 6.14.1 (#4440)
Bumps [qs](https://github.com/ljharb/qs) from 6.14.0 to 6.14.1.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 12:21:29 +01:00
Ken 3d8365a4d3 🐛 Corretly display code block title when avaliable, not just language 2026-01-05 11:44:29 +01:00
Ken 8d1039b813 Website: Static height for all Dialog examples 2026-01-05 10:06:28 +01:00
Ken 53ca1965d6 🐛 Resolve 'docgen' not resolving DialogRoot props. 2026-01-05 09:38:19 +01:00
github-actions[bot] 52a35d0903 Version Packages (#4426)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-05 09:25:40 +01:00
Ken 48132544e2 🐛 Avoid flash of christmas-tree 2026-01-04 17:34:47 +01:00
Ken 0c31af0ff4 [Util] Rename createContext -> createStrictContext (#4433)
* 📝 Update createContext -> createStrictContext

* 📝 Changeset

* ♻️ Update create-strict-context call signature
2025-12-23 14:35:39 +01:00
Ken d57b1a86b2 [Util] Utility hook updates (#4432)
* 🔥 remove useCallbackRef

* 📝 Rename useLatestRef

* 📝 Utility function updates

* 🐛 Resolve build-errors

* 📝 Changeset

* ⬅️ Revert mergeRef update

* 🐛 Rever useTab mergeRef
2025-12-23 14:13:51 +01:00
Ken 78870c02ad [Linter] Biome v2 update (#4431)
* 🎉 Upgrade biome to v2

* 🚨 Biome v2 lint update

* 📝 Make sure to filter out biome ignore comments from examples
2025-12-23 14:12:00 +01:00
Ken daa823dd2f 📝 Fix typo 2025-12-22 16:48:35 +01:00
Ken d1e8db180c 🐛 Bump dialog z-index 2025-12-22 14:38:44 +01:00
Ken 942255cb5b 🎉 Better location-resolver for sanity-articles 2025-12-19 16:12:09 +01:00
Ken 020fd7803a 📝 Rename migreringsguider category 2025-12-19 15:31:14 +01:00
452d12826f [Dialog] New component Dialog 🎉 (#4262)
* ✨ Added scrolllock utility

* 🎉 UseScrollLock story

* ♻️ Use scrolllock utility in Modal

* 📝 Changeset

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Update changeset

* 📝 Added className to list of styellint className deprecations

* 🔥 removed double negative negation

* 📝 Story-docs

* Update @navikt/core/react/src/util/hooks/useScrollLock.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Document body style overrides

* 📝 Docs

* ♻️ Cleanup redundant fn

* ♻️ better naming

* 📝 Docs

* 🔥 removed test-case in story that cant work

* 📝 Update docs

* 📝 Update docs

* 🔥 removed comment

* 🎉 Re-added bodylockscroll support for backwards compat

* 🎉 Re-added class to css, removed updated aksel prefix css

* ✨ Move Overlay from separate branch to dialog branch

* 🚚 Rename to dialog

* 🚚 Rename all overlay functions

* 🏷️ Move props

* 📝 Handle corrent pointerdown outside

* 🔥 Remove old code

* 💄 Dialog popoup and backdrop css

* 💄 Add default text-color

* 🐛 Resolve failed tests after updating autofocus interaction

* 🎉 Added header, footer, title and description components

* 🐛 Fix imports

* 💄 Dialog sizing

* 🧪 Added complex demo

* 🧪 Nested demo

* 🧪 Nested demo

* 🧪 Args demo

* 🐛 Fix center animation

* 🎉 Fix centering for position center

* 🎉 Now handles nested modal

* 💄 Centered dialog transition

* 💄 Adjust fullscreen size

* 💄 Fixed centered transition

* 💄 Dialog after element transition

* 🐛 Render multiple defaultOpen elements in correct order

* 🐛 Avoid auto-closing

* 📝 TODOs

* 🎉 Improved portal element

* 🧪 Set ut tests for dismissablelayer

* 📝 todos

* 📝 Copy file

* ✨ Registering and un-registering of elements

* ✨ Added escapeEventHandler

* 🐛 Added enabled support

* ✨ Added pointerDownOutside handler

* 📝 Added enabled check

* 🐛 Removed dismissablelayer enabled toggle

* 🐛 Removed dismissablelayer enabled toggle

* 🧪 Fix edgecase for checking safezone tests

* 🐛 Fix outside events

* 🎉 Render dismissable-layer handlers only when enabled

* 📝 story update

* 🎉 Layer ordering

* 🚚 Rename file

* 🧪 Tests for sorting

* 🐛 removed legacy safezone attrb

* 📝 Test name update

* 🚚 Update docs for DismissableLayer

* 🐛 re-add test-stories

* 📝 story-prettier

* 📝 Docs

* 🔥 Removed re-export

* 🔥 Revert portal changes

* 🎉 Fix escape event prevention

* 🎉 Added rightclick support

* 🎉 Handle pointer up events

* 🎉 Handle nested backdrops better

* ♻️ Simplify portal

* 🎉 Now 'hides' all other elements on screen when dialog is open

* 📝 removed todos

* 🔥 removed redundant re-assignment

* 📝 Added size support

* 💄 css size support

* ♿ Title and desc no updated labels on popup

* 📝 animationframe for focus-call

* ⚡ Properly queue focus

* 📝 todo-bug

* 📝 Docs

* 🎉 Add id-connections between popup and control

* 🐛 Move focus-update to microtask

* 🧪 Aria-attrb tests

* ♻️ Co-locate hide-attrb

* ♻️ Integrate Portal and backdrop

* 💄 Add rootElement prop, update nested styling

* 📝 Doc changes

* 💄 Update dialog backdrop and overlay color

* 💄 Avoid rendering backdrop in fullscreen mode

* ♻️ re-implement pointerup in dismissablelayer

* 🐛 Resolve returnfocus handling

* 🐛 waitfor mount

* 🐛 Resolve outside click handling

* ♻️ Forward outsideprop

* 📝 Docs

* 💄 Add will-change for animations

* 📝 Comments

* 🚚 Inlined Portal-element

* 🏷️ Rename backdrop -> backdropinternal

* ♻️ Extract transitionAttrb utility

* ♻️ Inline extracted consts

* 🎉 Slotted components

* 💄 Dialog now grid-based

* 🐛 Fix dialog-stories

* 🐛 Fix Dismissablelayer stories

* 📝 TODOs

* 🔥 Removed unmount check in backdrop

* 🚚 Moved user-select style to CSS

* ⚰️ Removed aria-describedby on popup

* 🔥 Removed safari trigger check since we allready ignore trigger

* 🔥 Removed todo

* 🚚 Rename backdrop and closebutton names

* 🏷️ Rename intiial and return-focus props

* 🎉 Call onOpenChangeComplete on open

* 💄 Adjust min/max height and widths

* ♻️ Update animationFinished

* 📝 CSS comments

* 🔥 removed will-change property

* 🔥 Removed outline on center-position popup

* 🐛 Fix story-tests issues

* adjust comment in usePointerUpOutside

* Some changes after review

* ⚡ Removed ref-connection for backdrop

* ♻️ Move internal classNames first in stack

* ⚡ Remove redundant optimization

* 📝 Doc update

* 🔥 Remove redundant test

* 🏷️ use same pointer-event for up and down

* Remove redundant expect()s in Dialog.test.stories.tsx

* 📝 todo

* 🏷️ Fixed autocomplete for width/height in dialog

* 🔥 Remove redundant ref

* 🚚 Move onAnimationComplete to popup itself

* 🔥 Removed unused ref

* ♻️ Ref-reset cleanup

* ✨ Only allow closing dialog on pointer up events

* ♻️ Avoid renaming props unnecessarily

* 🚚 Move size change in CSS to data-attrb

* 📝 Jsdoc

* 📝 Jsdoc

* 🏷️ Open state handler name

* ⚡ removed unnecessary optimization

* ⚡ UseCallback instead of eventCallback

* 📝 Jsdoc

* 🔥 Remove redundant test

* 💄 Remove top padding in body if header exists

* 💄 Render outline when no backdrop exists or in dark-mode

* 🔥 Removed height definition for left/right drawer

* 📝 Implementation-demo

* 🏷️ Rename exit-animation disable

* 🏷️ Rename DialogClose -> DialogCloseTrigger

* [FocusBoundary] Track previous active elements (#4282)

* 🎉 Track list of prev active elements

* 🧪 track previous focused elements

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tests.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tests.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Rename button

* ⚡ fall back to focusing trigger

* 🎉 Now properly cleans up prev-focused items no longer possible to focus

* 🐛 Update canvas-getby to use Role instead if id after component change

* 🐛 Allow trap-focus without backdrop to close onPointerDown

* 🔥 removed types

* 🐛 Fall back to trigger focus on outside click in trap-focus mode

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ PR-review cleanup

* ⚡ Optimize nested statehandler calls

* 💄 Dialog legacy CSS

* 📝 Update exports and jsdoc

* 📝 Update storybook and chromatic stories for dialog

* 🐛 Make trigger Slottable only

* 🔥 removed temp test story

* ♻️ Allow overriding roleb

* 🐛 Update dialog tests

* Update @navikt/core/react/src/dialog/popup/DialogPopupInternal.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/dialog/backdrop/DialogBackdropInternal.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/dialog/root/DialogRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Changeset

* 💄 Use float and display block instead of grid in Dialog

* 🐛 Sync darkside css with legacy

* [Dialog] Remove asChild-API from child-components (#4356)

* 🔥 Removed asChild from Dialog-API

* 🔥 Remove unused fragment

* 💄 Sync leagcy-css with darkside

* [Dialog] Implement use of Dialog on Website (#4355)

* 🎉 Use dialog for website mobile-menu

* 🎉 use Dialog for global search

* 🎉 Optimize rendering

* 🎉 Use dialog for icon-page

* 🔥 Use closetrigger, removed old css

* 🎉 Better overflow handling

* ⚡ Avoid scrolling after closing icon-panel

* 🐛 Sync css

* ♻️ removed redundant max check in CSS

* 💄 MobileMenu changed to 400px

* 💄 Adjust max-width

* ♻️ Better handling of Dialog in on website

* 📝 Update JSDoc

* 🐛 Better browser-support for 'checkVisibility'

* ♿ Explicitly set aria-modal on Dialog

* 🎉 Backdrop defaults to off when modal !== true

* 💄 Force outline in force-colors mode

* 📝 Inline dialogPosition

* 🏷️ Update initial and return focus callbacks

* 🏷️ Update initial and return focus callbacks

* [Dialog] Website examples  (#4395)

* 📝 Examples dialog

* 📝 Lazy/conditional render examples

* 📝 Return-focus example

* 🎉 Reorder demos

* 📝 Actionmenu example

* ♿ Better a11y for menu

* 🐛 Typos

* 🐛 Typos and missing ids

* 🐛 Fix desc formatting error

* 📝 Position example updated, removed redundant stories

* Update aksel.nav.no/website/pages/eksempler/dialog/controlled.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Use dialogPopupProps

* 💄 More subtle destructive action

* 📝 Alertdialog description

* 📝 Sync prop-names

* 📝 Implementation-demo

* 📝 Update example

* 📝 Interactive implementation-demo

* 💄 Update height media-query for bottom-placement, removed ResponsiveProp from width/height.

* 🐛 Fix form overflow

* 📝 Form example

* 💄 Re-order buttons

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/dialog/position.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Trap-focus doc update, changeset

* Update .changeset/cuddly-camels-melt.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Wrap global-search in Suspense

* 🐛 Optional trigger for fallback in global search suspense

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2025-12-19 12:15:00 +01:00
Ken 0d8cf4bcc5 🎉 Auto enable/disable holiday decorations based on month 2025-12-19 11:26:04 +01:00
Ken 579c5f162a 📝 Adjust datepicker-example for chromatic 2025-12-19 10:36:48 +01:00
github-actions[bot] a90c01ad50 Version Packages (#4418)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-19 10:26:55 +01:00
Ken d2870f7cb6 [CLI] Added option to run scripts locally (#4419)
* 🎉 Static export of version

* 🔥 Removed script-file

* 🔥 Removed axios dependency

* 📝 Changeset
2025-12-19 10:20:33 +01:00
KenandHalvor Haugan 06dab3b8a1 ✨ Popover now flips in Datepicker/MonthPicker (#4420)
* ✨ Popover now flips above input if more space is avaliable in Datepicker

* Update .changeset/short-weeks-sip.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ✨ Popover now respects placement alignment when flipping

* 📝 changeset

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-12-19 10:18:32 +01:00
Ken 2ed1c565e2 [Datepicker] Ranged same date click bug (#4417)
* 🧪 Set up failing tests

* 🐛 Fix ranged datepicker same date bug
2025-12-18 16:15:17 +01:00
KenandHalvor Haugan d11985bf03 [CLI] Show status and print legacy/component tokens (#4398)
* 🏷️ Better legacy-override naming

* 🎉 Now prints and lists legacy and component-tokens

* 🎉 Avoid re-writing old tokens

* 📝 Changeset

* Update @navikt/aksel/src/darkside/config/TokenStatus.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Updated changeset

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-12-18 09:32:38 +01:00
Ken 3e85294b44 🔒 Resolve storybook CVE-2025-68429 2025-12-17 19:12:39 +01:00
Halvor Haugan da6e970b29 Convert some Chromatic stories to renderStoriesForChromatic (#4397) 2025-12-17 16:31:57 +01:00
Ken 092853dd18 [Icons] Removed updated_at field (#4399)
* 🔥 Removed updated_at field from icon template

* 🔥 Removed updated_at field from icon yml

* 📝 Changeset
2025-12-17 16:30:55 +01:00
Ken 32056657dc ✨ InternalHeaderUser now supports ReactNode in props. (#4415) 2025-12-17 15:51:42 +01:00
github-actions[bot] a2ded80e69 Version Packages (#4413)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-17 12:36:10 +01:00
Halvor Haugan dacf10a809 [website] Fix minHeight option in withDsExample (#4411) 2025-12-17 11:53:57 +01:00
Halvor Haugan 28cbc81602 Migrate to nextjs-vite framework on storybook:aksel (#4412) 2025-12-17 11:53:24 +01:00
Ken 25233783a7 🎉 Support print in Checkbox and Radio CSS (#4404)
* 🎉 Support print in Checkbox and Radio CSS

* 🔥 removed unused css

* 🧪 Chromatic print stories

* 🧪 Use outline for radio outline

* 🐛 Add print-color exact

* 🔥 Revert print-exact change

* 🐛 Show selected radio in readonly-mode + print
2025-12-17 11:52:12 +01:00
dependabot[bot] 547a804eba ⬆️ Bump the actions group with 2 updates (#4407)
Bumps the actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/upload-artifact` from 5 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

Updates `actions/download-artifact` from 6 to 7
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 19:40:50 +01:00
Halvor Haugan 1f5f205e2b [website] More adjustments of desc in Button examples 2025-12-15 15:46:42 +01:00
Halvor Haugan 066eaa5175 [website] Adjust descriptions on Button examples 2025-12-15 15:29:14 +01:00
Ken 5e44d1d10b 💄 Glow-effect on Ascii-tree, animated eyes
💄 Make Ascii-tree glow
💄 Animate eyes
2025-12-12 14:54:07 +01:00
Ken 10a304e84b [Website] Holiday decorations (#4400)
* 🎉 Snow and ascii christmas tree

* 🎉 Asci-tree used

* 🚚 Moved Ascii tree
2025-12-12 12:59:09 +01:00
Ken 1d0f9c6ca4 🔒 Resolve Nextjs CVE-2025-55184 and CVE-2025-55183 2025-12-12 09:43:35 +01:00
d9e0327b2c [Website] Added diff and highlighting support (#4394)
* 🎉 Added diff language

* 🎉 Added diff highlighting

* 🐛 Better validation

* 🎉 Added highlighting border

* Update aksel.nav.no/website/app/_ui/code-block/CodeBlock.module.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/_ui/code-block/CodeBlock.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Center marks

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-12-11 20:03:13 +01:00
github-actions[bot] c1e2116eec Version Packages (#4383)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-11 17:17:19 +01:00
Ken 25c8024a3e 🐛 Removed unused aria-labelledby from InfoCard.Title (#4393) 2025-12-11 13:15:04 +01:00
Ken 7b3dc3d282 📝 Update sanity (#4391)
* 📝 Update sanity

* 🐛 resolve import issue
2025-12-10 10:11:01 +01:00
Halvor Haugan b59c9c1d08 Update Modal.test.tsx to avoid "not wrapped in act" warning 2025-12-09 13:09:46 +01:00
KenandCopilot 0fda5a596c [CLI] 📝 Lock dependencies (#4386)
* 📝 Lock dependencies

* Update .changeset/smooth-books-bake.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🔥 removed react-scanner

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 12:59:42 +01:00
Halvor Haugan 8a51477467 [Deps] Update browserslist 2025-12-09 12:54:59 +01:00
Halvor Haugan 33a7132c54 [website] Add type=button on sidebar subnav expand button 2025-12-09 12:36:06 +01:00
Ken 683107ea9a 📝 Re-order CLI codemods for v8 2025-12-09 10:29:08 +01:00
Ken 69514dcf22 📝 Add migrations as a category level for grunnleggende 2025-12-08 13:52:45 +01:00
Halvor HauganandKen b9a3de281d Accordion: Remove aria-hidden to prevent SiteImprove reporting an issue (#4382)
* Accordion: Remove aria-hidden to prevent SiteImprove reporting an issue

* Update sparkly-monkeys-glow.md

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-12-07 21:26:45 +01:00
Ken eb66a7395c 💄 [CLI] Add chalk colorization to status printout 2025-12-05 19:34:52 +01:00
Ken 926737350d [Tests] Rewrite old testing-library tests for Tooltip and Popover with Storybook (#4373)
* ♻️ Extract leagcy-tests for popover

* 📝 rename main popover story

* ♻️ Extract leagcy-tests for tooltip

* 📝 Rename tooltip story

* ♻️ Remove extra async-assertions from waitfor
2025-12-04 14:36:05 +01:00
github-actions[bot] 92091f979e Version Packages (#4348)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-04 13:58:31 +01:00
Ken b539ff183f 🎉 Trusted publishing of NPM-packages (#4379)
* 🎉 Trusted publishing of NPM-packages

* 🔥 Removed npm-automation token from git-release
2025-12-04 12:39:58 +01:00
Halvor Haugan 1e39b18962 [Tests] Fix some eslint errors in tests (#4380) 2025-12-04 12:25:04 +01:00
Halvor Haugan 7e9240c404 [Tests] Upgrade playwright image (#4381) 2025-12-04 12:23:40 +01:00
Ken f4592b517b [Templates] Update intro template (#4327)
* 🎉 Use tag for intro id

* ♻️ Use InfoCard instead of Alert

* 🐛 Re-add react import
2025-12-04 12:02:24 +01:00
Ken 5be02cdedc Resolve CVE-2025-66478 (#4376)
* ⬆️ Update react, react-dom

* 🐛 Reset yarn.lock

* 🐛 Temp resolve lint-errors
2025-12-04 09:57:28 +01:00
dependabot[bot] 505462b9ec ⬆️ Bump chalk from 4.1.0 to 5.6.2 (#4371)
Bumps [chalk](https://github.com/chalk/chalk) from 4.1.0 to 5.6.2.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v4.1.0...v5.6.2)

---
updated-dependencies:
- dependency-name: chalk
  dependency-version: 5.6.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 12:04:03 +01:00
dependabot[bot]andKen b9d5fe8ba2 ⬆️ Bump clipboardy from 2.3.0 to 5.0.0 (#4372)
* ⬆️ Bump clipboardy from 2.3.0 to 5.0.0

Bumps [clipboardy](https://github.com/sindresorhus/clipboardy) from 2.3.0 to 5.0.0.
- [Release notes](https://github.com/sindresorhus/clipboardy/releases)
- [Commits](https://github.com/sindresorhus/clipboardy/compare/v2.3.0...v5.0.0)

---
updated-dependencies:
- dependency-name: clipboardy
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Min-engine set to node 20 for CLI

* 📝 Changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-12-03 12:01:21 +01:00
Ken 0cd3dde88e [v8] 🎉 Action to deploy v7-app (#4367)
* 🎉 Action to deploy v7-app

* 📝 Update deploy v7 action
2025-12-03 11:49:49 +01:00
KenandHalvor Haugan 7cf0714490 [Dependabot] Update dependabot with cooldown and more grouping (#4365)
* 📝 Update dependabot with cooldown

* 🔥 Removed some setting dependabot

* Update .github/dependabot.yml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-12-03 10:48:02 +01:00
Ken acbd3bda18 [V8 codemods] Box migration nesting/idempotent bug and prefixing update (#4363)
* 🎉 Fix prefixing of bg and border-tokens

* 🐛 Check that tokens is not already migrated to a valid value

* 📝 Changeset

* 🐛 Now correctly only checks opening/root element instead of all nested elements

* 📝 rename existingRepalcements
2025-12-02 16:50:17 +01:00
KenandHalvor Haugan 94764fea85 [CLI] v8-tokens codemod update (#4341)
* 🎉 Support ext

* ⚡ Optimize file indexing

* ⚡ Optimize file-indexing

* ⚡ Optimize regex creation

* 🐛 Optimize indexing, add js and some tailwind-support

* ⚡ Optimize tailwind codemod

* 🧪 More tests

* ⚡ Optimize css codemod

* 📝 Better status reports

* 📝 Better printouts

* 📝 Improve printouts

* ⚡ Avoid re-running status-update

* 📝 Update summary

* 🔥 Removed waitfor keypress

* 📝 Changeset

* ♻️ Avoid inline assignment

* 📝 Added comments

* ♻️ Small refactor, extracting complexity into functions

* 🔥 Removed commented code

* Update @navikt/aksel/src/codemod/run-codeshift.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/run-codeshift.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ No array for glob-list

* ♻️ getWordPositionInFile -> getCharacterPositionInFile

* ♻️ Only comment once for grouped tokens

* ⚡ Always update status on print

* Revert "⚡ Always update status on print"

This reverts commit 65b1d9cd36.

* ⚡ Always update status on print

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-12-02 14:21:24 +01:00
Halvor Haugan 97e4e69643 [website] Add URL to GitHub issue link on 404 page (#4344) 2025-12-02 14:00:01 +01:00
dependabot[bot] b0e25c2ef4 ⬆️ Bump mdast-util-to-hast from 13.2.0 to 13.2.1 (#4361)
Bumps [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) from 13.2.0 to 13.2.1.
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

---
updated-dependencies:
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 12:00:32 +01:00
Ken 5a09f88ea2 🐛 Properly parse v8-tokens arg with options 2025-12-02 11:46:55 +01:00
Halvor Haugan 488d0f5ef2 [website] Adjust examples of Search 2025-12-01 16:03:01 +01:00
dependabot[bot] 89fe0e1183 ⬆️ Bump the storybook group with 9 updates (#4350)
Bumps the storybook group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `10.0.8` | `10.1.2` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.0.8` | `10.1.2` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `10.0.8` | `10.1.2` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `10.0.8` | `10.1.2` |
| [@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `10.0.8` | `10.1.2` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.0.8` | `10.1.2` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.0.8` | `10.1.2` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.0.8` | `10.1.2` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `10.0.8` | `10.1.2` |


Updates `@storybook/addon-a11y` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/a11y)

Updates `@storybook/addon-docs` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/docs)

Updates `@storybook/addon-themes` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/themes)

Updates `@storybook/addon-vitest` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/vitest)

Updates `@storybook/nextjs` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/lib/eslint-plugin)

Updates `storybook` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/core)

Updates `storybook-addon-pseudo-states` from 10.0.8 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/nextjs"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 09:32:19 +01:00
Halvor Haugan 2f42b240e8 Select: Remove the htmlSize prop (#4347) 2025-11-28 14:13:40 +01:00
Halvor Haugan e413ffe06b [website] Adjust examples of Select (and Checkbox and Switch) (#4346) 2025-11-28 14:01:07 +01:00
Halvor Haugan f744df8966 [website] Fix examples navigation in preview mode 2025-11-28 13:30:29 +01:00
Halvor Haugan 3c888e8721 Adjusted example of links in ActionMenu (#4343) 2025-11-28 11:24:41 +01:00
Halvor Haugan 2acc2e2971 Refactor Chromatic story on alert, switch, progressbar and guidepanel stories (#4342) 2025-11-28 10:00:34 +01:00
Halvor Haugan fd9ba8927d Rewrite some Chromatic stories to using helper function (#4340) 2025-11-27 19:25:18 +01:00
github-actions[bot] 9e0d9046bc Version Packages (#4333)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-27 16:09:18 +01:00
Ken 7a5852d6b6 🎨 Disable biome Import sorting 2025-11-27 16:06:50 +01:00
Ken 7ee5092c58 [Darkside] Merge darkside token migration into codemod-script (#4334)
* ♻️ Merge darkside token migration into codemod

* 📝 Better docs and testing
2025-11-27 11:42:47 +01:00
dependabot[bot] dd3be45a36 ⬆️ Bump the npm_and_yarn group across 4 directories with 2 updates (#4336)
Bumps the npm_and_yarn group with 2 updates in the /examples/astro directory: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) and [glob](https://github.com/isaacs/node-glob).
Bumps the npm_and_yarn group with 1 update in the /examples/next-appdir directory: [glob](https://github.com/isaacs/node-glob).
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [glob](https://github.com/isaacs/node-glob).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [glob](https://github.com/isaacs/node-glob).


Updates `astro` from 5.15.6 to 5.15.9
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.15.9/packages/astro)

Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v10.5.0)

Updates `glob` from 11.0.3 to 11.1.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v10.5.0)

Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v10.5.0)

Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v10.5.0)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 5.15.9
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 11:27:57 +01:00
KenandHalvor Haugan 40e186c906 [CLI] Removed css-import command (#4331)
* 🔥 Removed css-import CLI

* 📝 Changeset

* ⬆️ yarn lock sync

* Update @navikt/aksel/README.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-27 11:26:58 +01:00
dependabot[bot] 7da5a1243e ⬆️ Bump node-forge from 1.3.1 to 1.3.2 (#4338)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.2.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 10:09:34 +01:00
dependabot[bot] 656ada6764 ⬆️ Bump valibot from 1.1.0 to 1.2.0 (#4337)
Bumps [valibot](https://github.com/open-circle/valibot) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/open-circle/valibot/releases)
- [Commits](https://github.com/open-circle/valibot/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: valibot
  dependency-version: 1.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-27 10:08:18 +01:00
Ken 4ef660acb4 [Website] Remove @navikt/ds-tailwind dependency from website (#4326)
* ♻️ Remove dependency on ds-tailwind package on website

* 📝 Docs

* 🔥 Removed tw from depdendency array
2025-11-26 15:59:39 +01:00
Ken 42b860fedc 📝 Changeset cleanup 2025-11-26 15:45:33 +01:00
Ken 7a68589058 🐛 Add color to search icon (#4323)
* 🐛 Add color to search icon

* Apply suggestion from @KenAJoh
2025-11-26 15:39:20 +01:00
Ken 7fe90910e6 [Combobox] Locale update (#4324)
* 🎉 Add locale-support for no hits text combobox

* 📝 Changeset

* 📝 Rename translation-key
2025-11-26 15:38:45 +01:00
Ken e4172990f8 🐛 Added releases to Santiy 2025-11-26 14:14:11 +01:00
Ken 094cbf8bbe 🎉 Enable scheduled releases sanity 2025-11-26 13:32:50 +01:00
Ken bc37eb8ab0 🚚 Move Spacing codemod to v8-dir 2025-11-26 13:31:51 +01:00
Halvor Haugan ebf96f2172 [website] Fix overflow issue on Endringslogg page on mobile 2025-11-26 10:38:15 +01:00
Halvor Haugan 0dc95b5c01 [website] Fix search input size on darkside tokens page on mobile 2025-11-26 10:29:17 +01:00
Halvor Haugan e8036b9fe6 [website] Add min-height on Combobox examples (#4329) 2025-11-26 09:21:37 +01:00
Ken 29c616f93c 💄 Update code-block for website 2025-11-25 15:56:09 +01:00
Ken 78c6d53bdf 🐛 Darkside-css for LinkCard referenced legacy token 2025-11-25 14:15:50 +01:00
Halvor Haugan ee8fb859f0 [website] Fix warnings about NextImage (#4320) 2025-11-25 11:59:51 +01:00
Ken f3b0eda0fa 🐛 Try disabling: Datepicker/Monthpicker tests for CI-action 2025-11-25 10:20:06 +01:00
Ken 46eedbafe4 🐛 Try disabling: Combobox tests for CI-action 2025-11-25 10:03:40 +01:00
Ken ba3548bcf9 🐛 Prevent hydration mismatch with client-side only render of Examples 2025-11-25 09:21:06 +01:00
dependabot[bot] 584d5ff250 ⬆️ Bump astro (#4285)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).


Updates `astro` from 5.14.4 to 5.15.6
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.15.6/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 5.15.6
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 15:50:12 +01:00
KenandHalvor Haugan 7618d0f91a [Codemods] Updated darkside/v8 codemods (#4305)
* 🚚 Moved and cleaned up box codemod

* Create file

* Set up box migraiton

* 🚚 Move box-new migration to standalone mod

* 🧪 Initial test files

* 🧪 Initial test files

* 🐛 Fix test names

* 🎉 Fix box codemod

* ✨ Added more test-cases

* ⚡ Create composite codemod for box

* 🎉 Add List component to prop deprecation codemod

* 📝 Set up color-update codemod

* 🎉 Add config for migration

* 🎉 Set up template cases

* 🎉 Added variant -> color migration for Tag

* 🎉 tag-variant migration setup

* 🎉 ToggleGroup variant migration

* 🚚 Extracted variant change to utility

* 🎉 Added Accordion migration

* 📝 Extract utility

* 🎉 Now supports sub-components

* 🎉 support nested imports

* 🎉 Added Chips variant migration

* Update @navikt/aksel/src/codemod/utils/check.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/migrations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/migrations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/migrations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/migrations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel/src/codemod/migrations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Update any-type

* 📝 Update commen

* 📝 Added alias for old box

* 🔥 Removed List from prop-deprecation codemod

* Update @navikt/aksel/src/codemod/transforms/v8.0.0/box-new/tests/index.test.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Comment update

* 📝 Update test

* 🐛 Handle custom local import-name

* [Codemods] List codemod (#4319)

* 📝 list codemod

* 📝 List config maps

* 📝 Set up tests

* 📝 Add list test

* 🎉 List codemod

* 📝 Add import alias demo

* 📝 Handle allready existing imports

* 🐛 Handle attrbute spread

* 🏷️ Avoid any

* 📝 add List migration

* 📝 Update tests

* 🐛 Handle as/level prop

* 🐛 Handle more import-cases

* 🐛 Handle 'idempotent'

* 🐛 Allow standalone Lists to be migrated without Title and Description

* 📝 Readme

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-24 15:39:45 +01:00
eb4bc99861 [Linting] eslint-plugin-react-hooks v7 update for aksel website (#4258)
* ⬆️ Update react-hooks lint rule to v7

* ⬆️ Update react-hooks lint rule to v7

* 🚨 Fix ref in popover examples

* ♻️ Avoid unline-rendering of component

* ♻️ Update useMedia hook for website

* ♻️ Avoid use of state in umami-loading

* 📝 TOC-comment

* 🐛 Manually supress hydration-error

* ⚡ Derive active example from state

* ⚡ Move state-update to effect

* ⚡ Avoid syncronous state-update

* ⚡ Remove dom-node updates with ref in compareImages

* ⚡ Improve CompareImages state handling

* 🔥 Removed hovercard code

* 🐛 Avoid re-creating components

* 📝 Hide false positive

* ⚡ Make scroll-state reset use transition

* ⚡ Move state-update to transition

* ⚡ startTransition for role-reset in token-view

* ⚡ Ignore auto-generated sanity types with linter

* 🐛 Ignore auto-geneerated nextjs-types

* ⚡ StartTransition for iconpage

* ⬅️ Undo startTransition change

* Avoid scrolling to last example when page includes multiple examples

* Update aksel.nav.no/website/app/_ui/compare-images/CompareImages.handle.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Temp disable new eslint-rules that does not exist in v5

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-24 15:29:52 +01:00
Ken c3e8154c21 ⚡ Speed up CI-tests 2025-11-24 13:52:42 +01:00
Ken a6fc511785 🐛 Debug CI-workflow timing out 2025-11-24 13:33:50 +01:00
dependabot[bot] eabbe2394a ⬆️ Bump the storybook group with 9 updates (#4313)
Bumps the storybook group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `10.0.7` | `10.0.8` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `10.0.7` | `10.0.8` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `10.0.7` | `10.0.8` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `10.0.7` | `10.0.8` |
| [@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `10.0.7` | `10.0.8` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `10.0.7` | `10.0.8` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.0.7` | `10.0.8` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `10.0.7` | `10.0.8` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `10.0.7` | `10.0.8` |


Updates `@storybook/addon-a11y` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/addons/a11y)

Updates `@storybook/addon-docs` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/addons/docs)

Updates `@storybook/addon-themes` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/addons/themes)

Updates `@storybook/addon-vitest` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/addons/vitest)

Updates `@storybook/nextjs` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/lib/eslint-plugin)

Updates `storybook` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/core)

Updates `storybook-addon-pseudo-states` from 10.0.7 to 10.0.8
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.0.8/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/nextjs"
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 10.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 11:49:05 +01:00
dependabot[bot] 7798dab309 ⬆️ Bump vite from 7.2.2 to 7.2.4 (#4315)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.2.2 to 7.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.2.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 11:45:28 +01:00
dependabot[bot] de6b3d94ab ⬆️ Bump actions/checkout from 5 to 6 (#4317)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 11:44:52 +01:00
Ken 0857815691 🐛 Fix 'as'-type in prop-section for InfoCard 2025-11-24 11:40:10 +01:00
Ken 0e969499d9 [website]: Update prop-table to unpack AkselColor-type 2025-11-24 11:35:37 +01:00
github-actions[bot] c5f8d13121 Version Packages (#4307)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-24 10:34:19 +01:00
Halvor Haugan 32de1be6d0 Fix typo in BaseAlertRoot/InfoCardRoot JSDoc 2025-11-21 15:25:50 +01:00
dependabot[bot] f265c2c648 ⬆️ Bump js-yaml from 4.1.0 to 4.1.1 (#4291)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-21 15:22:38 +01:00
dependabot[bot] 95b962a065 ⬆️ Bump playwright from 1.56.0 to 1.56.1 (#4293)
Bumps [playwright](https://github.com/microsoft/playwright) from 1.56.0 to 1.56.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.56.0...v1.56.1)

---
updated-dependencies:
- dependency-name: playwright
  dependency-version: 1.56.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-21 15:21:55 +01:00
Ken a4058247d0 🎉 New icons PhoneSlash and BelleSlash (#4310) 2025-11-21 14:59:55 +01:00
Ken efebc5fbbb 🐛 Tooltip now has z-index max int (#4309)
* 🐛 Tooltip now has z-index max int

* 🐛 Update token-docs
2025-11-21 14:45:56 +01:00
Ken 5df9ebe102 🐛 Re-export Alert-components for better react-docgen props 2025-11-21 14:43:43 +01:00
Ken fae2ef763e [Alert] Close -> CloseButton (#4308)
* 📝 Close -> Closebutton

* 📝 Jsdoc update

* 🐛 Fix storybook import

* 📝 Update doc desc
2025-11-21 14:22:33 +01:00
Ken 8c230c799e [V8] Stylelint rule for removed navds-prefix (#4304)
* 🏷️ Liniting rule for legacy navds-classnames

* 📝 Readmore

* 📝 Doc changes

* 🔥 Avoid adding new rule-plugin to recommended
2025-11-21 13:31:21 +01:00
39cf344eeb [Alert] LocalAlert, GlobalAlert, InfoCard and InlineMessage components (#4186)
* ✨ InfoCard boilerplate

* ✨ Add context provider and size handling in InfoCard component

* 🎉 Added expand-button

* 🎉 Added animation utils

* 📝 More todos

* 🎉 Can now transition between height auto

* ♻️ Clean up css

* 🎉 New hooks and utilities

* ♻️ Added controlled state handler

* ⚡ Move root-function into callback

* 🎉 Handle initial mount transition

* 🧪 Added hiddenUntilFound experiment

* 🔥 Removed discarded API

* 📝 Added mdn docs

* 📝 Aria tests

* ♻️ Use variables in info-card css

* 📝 Updated stories

* ♻️ Extracted icon into a separate component, refactored stories

* 🐛 Reset color inside content

* ♻️ Re-add icon-prop instead of component

* ✨ InfoCard build output setup

* 📝 jsdoc cleanup

* 📝 Dynamic stories for all colors

* 💄 Added legacy-support

* 📝 Added CSS mappings

* 🔥 Removed todo

* Apply suggestion from @KenAJoh

* Apply suggestion from @KenAJoh

* ♻️ Implement base-alert

* ✨ Added Closebutton component to BaseAlert

* ✨ Implement LocalAlert react-code

* ✨ Added closebutton to LocalAlert

* 💄 Adjusted paddings

* ♿ Added aria-role to LocalAlert

* ✨ GlobalAlert boilerplate

* 💄 Centered global alert

* 💄 Fix centering and padding

* 🎉 Added success back

* 🐛 Properly omit icon from alert header

* 💄 Handle z-index fighting in InfoCard

* 💄 Revert to subtle infocard text

* ✨ InlineAlert component

* 📝 remove padding layout from inlineAlert stories

* 💄 Sync design-adjustments with figma discussions

* 🏷️ Update build config

* 📝 Update translations for Alert

* 📝 Move Alert-stories into a nested structure

* 💄 Add legacy-css support for new Alert-components

* 💄 Sync legacy colors inlineAlert

* 🔥 Removed old info-card css

* ♻️ Refactor BaseAlert structure to reflect modern project structure

* ♻️ Move utils to root

* 🐛 Fix imports

* 🚚 Migrated InlineAlert -> InlineMessage

* ♻️ Add overridablecomponent support

* 💄 Sync design with figma

* 🐛 Fix imports

* 🐛 Remove box-sizing override

* 🚚 Extracted BaseAlert component from #4085

* 🔥 Removed inlinemessage leftovers

* 🔥 Removed inlinemessage

* ⬅️ revert effect change

* Update @navikt/core/react/src/alert/base-alert/BaseAlert.stories.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/react/src/alert/base-alert/root/BaseAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed position relative

* 🔥 Removed z-index

* Update @navikt/core/react/src/alert/base-alert/close/BaseAlertClose.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/base-alert/root/BaseAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Allow overriding button type

* ♻️ Temp remove aria-hidden from header icon

* 🐛 Fix nullish icon

* Update @navikt/core/react/src/alert/base-alert/root/BaseAlertRoot.context.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/base-alert/root/BaseAlertRoot.utils.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/base-alert/BaseAlert.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🧪 Predefined story-selections for type and statusType

* 🧪 Replace default story for chromatic

* [New component] LocalAlert (#4187)

* 🚚 Extracted LocalAlert from #4085

* 🏷️ Rename root

* 📝 Doc changes

* 🐛 Add button do depdendency mapping

* Update @navikt/core/react/src/alert/local-alert/close/LocalAlertClose.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/local-alert/root/LocalAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/local-alert/root/LocalAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/local-alert/root/LocalAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔊 LocalAlert now always an alert

* 🐛 revert closebutton change

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [New component] InfoCard (#4189)

* 🚚 Extracted InfoCard from #4085

* Update .changeset/quiet-lions-serve.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/css/config/_mappings.js

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [New component] GlobalAlert (#4188)

* 🚚 Extracted GlobalAlert from #4085

* 📝 Changeset

* 🏷️ Rename root

* 🔊 GlobalAlert now always an alert

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Add button css to global alert mappings

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Docs

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Remove prop-destructuring

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [New component] InlineMessage (#4185)

* 🚚 Move InlineMessage PR out of #4085

* 📝 Changeset

* Update @navikt/core/react/src/inline-message/root/InlineMessage.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Jsdoc update

* Update @navikt/core/react/src/inline-message/root/InlineMessage.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🔥 Removed flex-start alignment

* Update @navikt/core/react/src/inline-message/root/InlineMessage.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/inline-message/root/InlineMessage.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/inline-message/root/InlineMessage.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/inline-message/root/InlineMessage.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Inline color-definitions

* ♻️ Clean up css use

* Update @navikt/core/react/src/inline-message/icon/InlineMessageIcon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Remove redundant display-flex

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Rename variant -> status

* 🏷️ Rename data-type -> data-variant

* 🐛 Fix jsdoc example

* 🔥 removed basealert chroamtic stories

* Apply suggestions from code review

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Doc-changes

* 📝 Doc-changes localalert

* ♻️ Inlinemessage variant -> status

* 🔥 removed wrappingtitle story

* 📝 Add aslink story to chromatic

* Apply suggestions from code review

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 JsDoc updates

* 🔥 Removed commented aria-hidden

* ♿ Add id-connection between icon and title

* 🌐 Move alert locale to global scope

* ♿ Moved section-element to root

* ♿ Aria-label set on alert-div

* 🐛 Avoid close-button being read twice

* 🧪 add title attrb to alert

* 🔥 Removed title on root alert

* Update @navikt/core/react/src/alert/global-alert/close/GlobalAlertClose.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/global-alert/root/GlobalAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/local-alert/close/LocalAlertClose.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/alert/local-alert/root/LocalAlertRoot.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Remove not-needed status attrb

* 📝 Aria-hidden on icon jsdoc

* 🔥 Removed z-index from header

* ✨ Allow alert-title to be div

* Update @navikt/core/react/src/alert/base-alert/close/BaseAlertClose.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Added a11y test

* 🏷️ Re-added aria-labelledby connection

* 🔥 Removed built-in icon title

* 📝 Reduce title

* [BaseAlert] Update InlineMessage, BaseAlert with more a11y updates (#4299)

* ♿ Better aria connections for InlineMessage

* ♿ Alerts now use section

* 🎉 Update Alert-usage

* 🎉 Website alert update

* 🔥 Removed unused CSS

* 🔥 Hide new alerts from Axe

* 🔥 removed role alert from inlineMessage

* ♿ Use aria-label instead of aria-labelledby

* ♻️ Always use InfoCard in WebsiteAlert

* 🔥 removed statusType from type omits

* 📝 use bold text for jsdoc

* 📝 JSdoc

* [Example] New Alert-component examples (#4290)

* 📝 Initial variant-setup

* 📝 More examples

* 📝 GlobalAlert examples

* 📝 InfoCard examples

* 📝 Inline examples

* Update aksel.nav.no/website/pages/eksempler/info-card/colors.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/info-card/sizes.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🔥 Removed desc

* Update aksel.nav.no/website/pages/eksempler/info-card/title-only.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🔥 Removed desc

* 📝 Updated InfoCard Example

* 📝 Update examples

* 📝 text adjustments

* 📝 Update announcement and error examples

* 📝 Edit warning localalert example

* 📝 Remove unused vstack from examples

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-21 13:09:53 +01:00
Ken 66b377c314 🐛 Disable new dialog-view for sanity 2025-11-21 13:06:43 +01:00
Ken ef60170000 Storybook v10 update (#4288)
* 🎉 Upgrade to sb-10

* 🔥 Exclude sb util

* 🐛 Revert bg config change

* 🐛 Remove yarn from storybook command

* 🐛 Update moduleResolution

* 🎉 Removed now unused eslint disable rule comment

* 🐛 Fix imports
2025-11-21 09:55:38 +01:00
Halvor Haugan c25f30ea21 [website] Add desc to description example of Checkbox 2025-11-20 13:01:08 +01:00
Ken 1a8acf1f02 [Darkside] Use darkside configurations where possible without affecting current release
♻️ Use darkside-config where possible

🚚 Update website with darkside -> legacy migration

🚚 Update examples use of leagcy components

🔥 Remove legacy css support from website storybook
2025-11-20 11:29:15 +01:00
Ken fd85b8f85a 📝 Darkside migration changelist 2025-11-20 09:47:06 +01:00
github-actions[bot] ca1b0a715a Version Packages (#4302)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-20 09:10:34 +01:00
Halvor Haugan 5cfff15c1c Darkside: Remove [hidden] style (#4301) 2025-11-19 15:15:50 +01:00
Ken 7570678818 ⚡ Avoid rendering datepicker-dialog when not open (#4300) 2025-11-19 14:40:59 +01:00
github-actions[bot] 021f2a888f Version Packages (#4296)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-18 13:37:59 +01:00
Ken 43c5dd7285 🐛 Fix list-colors on website 2025-11-18 12:57:00 +01:00
Halvor Haugan 717545def7 Textarea: Set height on first render to auto instead of 0px to reduce layout shift when SSR (#4295) 2025-11-17 14:18:37 +01:00
Halvor Haugan 4f161c993a [website] Adjust examples of Radio 2025-11-14 12:41:01 +01:00
github-actions[bot] 5b00481cca Version Packages (#4286)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-14 09:12:57 +01:00
KenandHalvor Haugan ef8a6ceb49 [DismissableLayer] Avoid re-mounting react sub-tree when toggling enabled-state (#4281)
* 🐛 Set upt bug test env

* 🐛 Fix dismissablelayer-remounmt bug

* 📝 changeset

* ⚡ Disable event-handlers from mounting when not enabled

* Update .changeset/rotten-windows-fetch.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ Optimize cleanup

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-14 09:09:31 +01:00
Ken 9a9ce1f746 📝 Simple actionmenu jsdoc 2025-11-13 13:29:24 +01:00
Ken 485a456897 🎉 Moved admin-route above sanitylive to avoid page-reloads (#4279) 2025-11-13 10:32:06 +01:00
Halvor Haugan 4eb4760b2c Tokens: Translate shadow token comment to Norwegian (#4280) 2025-11-12 19:54:16 +01:00
Halvor Haugan 24146b6bb8 [Sanity] Minor field title typo fixes 2025-11-12 16:55:17 +01:00
Halvor Haugan ed06030152 stylelint ignore cleanup (#4278) 2025-11-11 15:07:23 +01:00
dependabot[bot]andKen ceac33cd92 ⬆️ Bump jsdom from 27.0.1 to 27.1.0 (#4274)
* ⬆️ Bump jsdom from 27.0.1 to 27.1.0

Bumps [jsdom](https://github.com/jsdom/jsdom) from 27.0.1 to 27.1.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/27.0.1...27.1.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 27.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync jsdom

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-11-11 13:58:51 +01:00
Ken 68dc355486 🧪 Try to run CI with pool threads to avoid hangups (#4277) 2025-11-11 10:18:35 +01:00
Halvor Haugan 8bd0071241 [website] Refactor artikkel-preview.tsx (#4276) 2025-11-11 09:36:10 +01:00
dependabot[bot] 5f211d60c7 ⬆️ Bump the eslint group with 2 updates (#4270)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.39.0 to 9.39.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.1/packages/js)

Updates `eslint` from 9.39.0 to 9.39.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.0...v9.39.1)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-11 09:13:44 +01:00
Halvor Haugan 51bf912948 Upgrade some dependencies (#4268) 2025-11-10 13:49:48 +01:00
github-actions[bot] 988bc4c891 Version Packages (#4275)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-10 12:35:38 +01:00
Ken 4d39b71b32 🐛 Resolve Modal-bug where both HTML and Body were 'locked' with overflow hidden (#4269) 2025-11-10 11:35:54 +01:00
KenandCopilot 6df811455d [Timeline] Hides out of bound pins (#4266)
* 🐛 No longer render pins that are out of bounds

* 📝 Changeset

* Update .changeset/brown-steaks-try.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ♻️ migration cleanup

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-10 11:34:34 +01:00
Halvor Haugan 32dd365baa useRangeDatepicker: defaultSelected no longer overrides defaultMonth when defaultSelected.from is undefined (#4267) 2025-11-10 09:30:36 +01:00
dependabot[bot] 6c8cbddd6a ⬆️ Bump min-document from 2.19.0 to 2.19.1 (#4263)
Bumps [min-document](https://github.com/Raynos/min-document) from 2.19.0 to 2.19.1.
- [Commits](https://github.com/Raynos/min-document/compare/v2.19.0...v2.19.1)

---
updated-dependencies:
- dependency-name: min-document
  dependency-version: 2.19.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-07 18:07:53 +01:00
dependabot[bot] bfc704507c ⬆️ Bump axios from 1.12.2 to 1.13.0 (#4265)
Bumps [axios](https://github.com/axios/axios) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.2...v1.13.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-07 18:05:25 +01:00
dependabot[bot] db5dfb202f ⬆️ Bump vite from 7.1.11 to 7.1.12 (#4264)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.1.11 to 7.1.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.12
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-07 18:03:29 +01:00
Ken 2795b7620b 📝 Adjust Datepicker validation example (#4261)
* 📝 Adjust example

* 📝 val -> validation name
2025-11-07 14:56:16 +01:00
github-actions[bot] 70e662dd3b Version Packages (#4260)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-07 14:05:14 +01:00
c7d6458b36 [Portal] Now respects render and mount order. (#4239)
* 🎉 Set ut new Portal-update

* 📝 Update Portal

* 🎉 Add prop-support to Portal

* 🧪 Portal stories

* 🔥 Removed asChild support from portal

* 📝 Changeset

* 🐛 Removed unused type-redeclaration

* Test this (needs cleanup)

* Update @navikt/core/react/src/portal/Portal.tests.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Resolve rootElement order corretly

* 🔥 Removed ID

* 🧪 Test naming

* Apply suggestion from @KenAJoh

* ♻️ Remove no longer needed portalNode return

* 🐛 Add React import

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-06 13:44:25 +01:00
Ken aaf266637d 🐛 Stegaclean feedback-link 2025-11-06 12:46:41 +01:00
KenandHalvor Haugan 1ec451ee2c [FocusBoundary] Refactor initial/return-focus handling, added modal-prop (#4256)
* ♻️ Re-write of focus-handling in focusboundary

* ♻️ Added hideNonTargetElements to focusboundary

* 🐛 Make focus use animationFrame

* ⚡ Microtask focus-setting

* 🐛 add missing dep-array

* 🐛 return false instead of undefined

* 🐛 Update FocusBoundary story

* 🐛 Update Menu-stories

* 🐛 Default to true for initial focus and return-focus

* 🐛 Fix tests to avoid flaky results in CLI

* Apply suggestions from code review

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Code cleanup

* ♻️ extracted fallback elements

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-06 11:48:22 +01:00
KenandHalvor Haugan 11af3e9a72 [DismissableLayer] Refactor layer handling (#4232)
* 🧪 Set ut tests for dismissablelayer

* 📝 todos

* 📝 Copy file

* ✨ Registering and un-registering of elements

* ✨ Added escapeEventHandler

* 🐛 Added enabled support

* ✨ Added pointerDownOutside handler

* 📝 Added enabled check

* 🐛 Removed dismissablelayer enabled toggle

* 🐛 Removed dismissablelayer enabled toggle

* 🧪 Fix edgecase for checking safezone tests

* 🐛 Fix outside events

* 🎉 Render dismissable-layer handlers only when enabled

* 📝 story update

* 🎉 Layer ordering

* 🚚 Rename file

* 🧪 Tests for sorting

* 🐛 removed legacy safezone attrb

* 📝 Test name update

* 🚚 Update docs for DismissableLayer

* 🐛 re-add test-stories

* 📝 story-prettier

* 📝 Docs

* 🔥 Removed re-export

* Update @navikt/core/react/src/overlays/dismissablelayer/DismissableLayer.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Rename fored rerender call

* 🏷️ Rename pointer event check

* 🏷️ Enforce consistent naming

* 📝 re add comments

* 📝 re add comments

* 📝 Improved comment accuracy

* ♻️ Update function naming

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🧪 Update test-util to create unique divs

* 📝 Comment update

* 📝 Comment update

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-11-04 14:53:33 +01:00
dependabot[bot]andKen 8c05c4efdd ⬆️ Bump @vitejs/plugin-react from 4.4.1 to 5.1.0 (#4253)
* ⬆️ Bump @vitejs/plugin-react from 4.4.1 to 5.1.0

Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 4.4.1 to 5.1.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@5.1.0/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 5.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync vitejs-react plugin

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-11-04 09:17:01 +01:00
github-actions[bot] dbb63dc0e9 Version Packages (#4238)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-03 12:28:20 +01:00
Halvor Haugan 7eb327d0d5 [website] Hide chips when only one example (#4255) 2025-11-03 11:55:24 +01:00
Halvor Haugan bd48881ece Adjust examples of Textarea (#4254) 2025-11-03 10:14:18 +01:00
Ken 26f9358bed ⬆️ React-dom now a peerDependency of @navikt/ds-react package (#4237)
* ⬆️ React-dom now a peerDependency of ds-react package

* 📝 Yarn lock sync

* 📝 Removed React 19 RC support

* 📝 Scoped homepages in package.json
2025-11-03 10:12:37 +01:00
dependabot[bot] 8ba6ae6f71 ⬆️ Bump the eslint group with 2 updates (#4249)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.38.0 to 9.39.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.0/packages/js)

Updates `eslint` from 9.38.0 to 9.39.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.38.0...v9.39.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.39.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 09:41:35 +01:00
Halvor Haugan a8c44ad199 Disable actions-tab on Aksel Storybook (#4247) 2025-10-31 17:06:08 +01:00
Halvor Haugan 19fc768431 Add some missing types in "main" Storybook preview-file (#4246) 2025-10-31 17:04:33 +01:00
Halvor Haugan 420e3ab927 [website] Adjust examples of TextField (#4244) 2025-10-31 15:07:49 +01:00
KenandHalvor Haugan e51ae59d84 🐛 Timeline period dialogs now has accessible names (#4242)
* 🐛 Timeline period dialogs now has accessible names

* Update .changeset/full-terms-lie.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-31 14:11:26 +01:00
Ken 18baff33ad 📝 Actionmenu wity modal example (#4243) 2025-10-31 14:11:09 +01:00
KenandHalvor Haugan 61a52aa5dd [Process] New prop isTruncated (#4196)
* 🧪 set up views for Process line

* 🐛 Handle connectorplacement for dot-version

* 📝 Docs for use of connectorPlacement

* ♻️ Implement new connector prop for legacy

* 📝 Changeset

* 📝 Changeset edit

* 🐛 Use border-image unset instead of none to help with lightningcss minification

* Update .changeset/mean-insects-lick.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/process/connector.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Add connector-stories to chromatic

* 🎉 Update Process-prop from connectorPlacement -> isTruncated

* 📝 Update website docs for new isTruncated prop in Process

* Update aksel.nav.no/website/pages/eksempler/process/truncated.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-30 12:03:48 +01:00
github-actions[bot] 9625722ca7 Version Packages (#4236)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 09:57:40 +01:00
Julian Nymark c676565ab8 remove the ability for a fnr to become real. (#4230)
These FNR might not be valid in the first place (correct checksum), but they look like
they could be valid, rather than check each one, it's faster to
simply overwrite each one with an invalid day or month.

Why could a currently unused FNR suddenly become real? eg a valid FNR
(working checksum) set in the future _could_ end up being assigned to
a real future unborn person, and even a senior citizen could become
a norwegian citizen and even use a valid FNR from the past. Best to
avoid them entirely.

It's not a big probability, but better safe than sorry.
setting the month to 99 makes them so they would never be issued (similar to what Dolly
does).
2025-10-30 09:57:19 +01:00
Halvor Haugan 6e2e744f8e [website] Use Node 24 docker image (#4235) 2025-10-29 16:58:25 +01:00
dependabot[bot] f89b296903 ⬆️ Bump the storybook group with 9 updates (#4220)
Bumps the storybook group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `9.1.8` | `9.1.15` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `9.1.8` | `9.1.15` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `9.1.8` | `9.1.15` |
| [@storybook/addon-vitest](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/vitest) | `9.1.10` | `9.1.15` |
| [@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `9.1.8` | `9.1.15` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `9.1.8` | `9.1.15` |
| [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `9.1.8` | `9.1.15` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `9.1.8` | `9.1.15` |
| [storybook-addon-pseudo-states](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/pseudo-states) | `9.1.8` | `9.1.15` |


Updates `@storybook/addon-a11y` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/addons/a11y)

Updates `@storybook/addon-docs` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/addons/docs)

Updates `@storybook/addon-themes` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/addons/themes)

Updates `@storybook/addon-vitest` from 9.1.10 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/addons/vitest)

Updates `@storybook/nextjs` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/frameworks/nextjs)

Updates `@storybook/react-vite` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/frameworks/react-vite)

Updates `eslint-plugin-storybook` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/lib/eslint-plugin)

Updates `storybook` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/core)

Updates `storybook-addon-pseudo-states` from 9.1.8 to 9.1.15
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v9.1.15/code/addons/pseudo-states)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-vitest"
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/nextjs"
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 9.1.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 16:35:31 +01:00
dependabot[bot]andKen f0b37d6cef ⬆️ Bump jsdom from 26.1.0 to 27.0.1 (#4221)
* ⬆️ Bump jsdom from 26.1.0 to 27.0.1

Bumps [jsdom](https://github.com/jsdom/jsdom) from 26.1.0 to 27.0.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/26.1.0...27.0.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 27.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync jsdom-versions across repo

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-10-29 16:30:30 +01:00
8ea60dc24f Scroll lock utility (#4234)
* ✨ Added scrolllock utility

* 🎉 UseScrollLock story

* ♻️ Use scrolllock utility in Modal

* 📝 Changeset

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Update changeset

* 📝 Added className to list of styellint className deprecations

* 🔥 removed double negative negation

* 📝 Story-docs

* Update @navikt/core/react/src/util/hooks/useScrollLock.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Document body style overrides

* 📝 Docs

* ♻️ Cleanup redundant fn

* ♻️ better naming

* 📝 Docs

* 🔥 removed test-case in story that cant work

* 📝 Update docs

* 📝 Update docs

* 🔥 removed comment

* 🎉 Re-added bodylockscroll support for backwards compat

* 🎉 Re-added class to css, removed updated aksel prefix css

* Update @navikt/core/react/src/util/hooks/useScrollLock.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/util/hooks/useScrollLock.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🧪 Demo story

* 🧪 Demo story

* iOS comment adjustments

* Apply suggestion from @KenAJoh

* Apply suggestion from @KenAJoh

* 📝 Changeset

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2025-10-29 16:28:11 +01:00
Halvor Haugan 107cf1cb2a Import fs and path explicitly from node (#4233) 2025-10-29 15:36:11 +01:00
github-actions[bot] 21a8de2326 Version Packages (#4214)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-29 11:54:38 +01:00
Halvor Haugan 4365a6c764 Combobox: Fix issue with toggle list button (#4228) 2025-10-28 11:41:46 +01:00
Halvor Haugan 87b085df2d Storybook: Fix story naming in Chromatic for templates (#4226) 2025-10-27 13:17:23 +01:00
Halvor Haugan c962a16b19 Adjust Slack feedback text (#4217) 2025-10-27 09:53:22 +01:00
dependabot[bot] 92793afd7f ⬆️ Bump esbuild from 0.25.10 to 0.25.11 (#4222)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.10 to 0.25.11.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.10...v0.25.11)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 09:46:43 +01:00
dependabot[bot] ca75754607 ⬆️ Bump actions/upload-artifact from 4 to 5 (#4224)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 09:46:15 +01:00
dependabot[bot] ef8e32b499 ⬆️ Bump actions/download-artifact from 5 to 6 (#4225)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 09:46:00 +01:00
Halvor Haugan 6e522b9d3a Tests: Fix warnings about act (#4218) 2025-10-27 09:30:18 +01:00
Halvor Haugan 26595dba73 Fix Chromatic bug in FormNavigationSimple.tsx 2025-10-24 15:56:05 +02:00
Ken aab22428e8 🎉 Update Accordion-header size (#4209)
* 🎉 Update Accordion-header size

* Apply suggestion from @KenAJoh
2025-10-24 15:05:40 +02:00
Ken 19ab7b7471 🐛 Add templates to chromatic build 2025-10-24 11:48:47 +02:00
KenandHalvor Haugan f6cefbe422 🎉 Update templates for form navigation (#4194)
* 🎉 Update templates for form navigation

* 🐛 Revert to correct icon

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/components/website-modules/examples/__parts-inline/FormNavigationSimple.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-24 11:17:53 +02:00
Ken d2964d3d3f ✨ Sync BodyShort size large line-height with figma (#4213)
* ✨ Sync BodyShort size large line-height with figma

* 🐛 Add line-height change to legacy css
2025-10-23 12:16:06 +02:00
Ken ee44d33d52 [Draft mode] Disable draft-mode in all tabs when stopping draft-mode (#4193)
* 🎉 Use Broadcast-channels to update draft-mode

* 🔥 removed console.log
2025-10-21 19:41:42 +02:00
dependabot[bot] 8552229bbf ⬆️ Bump vite in the npm_and_yarn group across 1 directory (#4211)
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 7.1.7 to 7.1.11
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.11/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.11
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 14:07:06 +02:00
dependabot[bot] 3243a0d35e ⬆️ Bump the npm_and_yarn group across 3 directories with 1 update (#4212)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.3.6 to 6.4.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.4.1/packages/vite)

Updates `vite` from 6.3.6 to 6.4.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.4.1/packages/vite)

Updates `vite` from 6.3.6 to 6.4.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.4.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.4.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 6.4.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 6.4.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 14:04:35 +02:00
KenandCopilot 86f353bbd9 [Overlay] Mark other elements as aria-hidden while overlay is open (#4181)
* ✨ Added aria-hidden utility

* 🧪 Generated tests

* 🧪 Generated test for shadow-root

* Update @navikt/core/react/src/util/markOtherElements.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🏷️ Rename undoFn

* 🧪 Check target attributes

* ⚡ Simplified node children looping

* 🏷️ Rename variables

* ♻️ Removed non-modal implementation

* ♻️ Simplify flexibilty for attributes to hardcoded values

* ♻️ inert -> hidden

* 🧪 Added nested test

* 🏷️ Inline use of ariaHiddenCounter

* 🏷️ Rename markermap -> markerCounter

* ⚡ Rename function, optimize cleanup loop and add comments

* 📝 Comment update

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 13:31:13 +02:00
Ken ba44c5b9d2 🧪 Fix running of named tests with silent flag 2025-10-20 11:02:49 +02:00
Ken 460fc2fb54 📝 Update card example for skeleton (#4199)
* 📝 update card example for skeleton

* ♻️ Remove color override since opacity handles it
2025-10-20 09:42:39 +02:00
dependabot[bot]andKen 24846a7013 ⬆️ Bump postcss-import from 14.1.0 to 16.1.1 (#4204)
* ⬆️ Bump postcss-import from 14.1.0 to 16.1.1

Bumps [postcss-import](https://github.com/postcss/postcss-import) from 14.1.0 to 16.1.1.
- [Release notes](https://github.com/postcss/postcss-import/releases)
- [Changelog](https://github.com/postcss/postcss-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-import/compare/14.1.0...16.1.1)

---
updated-dependencies:
- dependency-name: postcss-import
  dependency-version: 16.1.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Update postcss-import across workspace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-10-20 09:42:22 +02:00
dependabot[bot] 3668f01a06 ⬆️ Bump @eslint/plugin-kit (#4208)
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [@eslint/plugin-kit](https://github.com/eslint/rewrite/tree/HEAD/packages/plugin-kit).


Updates `@eslint/plugin-kit` from 0.3.2 to 0.4.0
- [Release notes](https://github.com/eslint/rewrite/releases)
- [Changelog](https://github.com/eslint/rewrite/blob/main/packages/plugin-kit/CHANGELOG.md)
- [Commits](https://github.com/eslint/rewrite/commits/core-v0.4.0/packages/plugin-kit)

---
updated-dependencies:
- dependency-name: "@eslint/plugin-kit"
  dependency-version: 0.4.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 09:41:36 +02:00
dependabot[bot]andKen fcb818cf3b ⬆️ Bump actions/setup-node from 5 to 6 (#4207)
* ⬆️ Bump actions/setup-node from 5 to 6

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 sync setup-node to v6

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-10-20 09:40:53 +02:00
dependabot[bot] ece13689ae ⬆️ Bump actions/download-artifact from 4 to 5 (#4206)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 09:26:26 +02:00
dependabot[bot] 4f13f4af03 ⬆️ Bump docker/build-push-action from 5 to 6 (#4205)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 09:25:13 +02:00
dependabot[bot] d3cf7b1562 ⬆️ Bump @figma/rest-api-spec from 0.30.0 to 0.34.0 (#4203)
Bumps [@figma/rest-api-spec](https://github.com/figma/rest-api-spec) from 0.30.0 to 0.34.0.
- [Commits](https://github.com/figma/rest-api-spec/commits/v0.34.0)

---
updated-dependencies:
- dependency-name: "@figma/rest-api-spec"
  dependency-version: 0.34.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-20 09:12:57 +02:00
dependabot[bot]andKen 012280a71b ⬆️ Bump the eslint group with 2 updates (#4201)
* ⬆️ Bump the eslint group with 2 updates

Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.37.0 to 9.38.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.38.0/packages/js)

Updates `eslint` from 9.37.0 to 9.38.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.37.0...v9.38.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.38.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.38.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Update eslint across workspace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-10-20 09:09:36 +02:00
github-actions[bot] d25848494e Version Packages (#4198)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-20 09:06:48 +02:00
Ken 71580f3d11 ⬆️ Update sanity version (#4192) 2025-10-17 18:17:11 +02:00
Ken db055ae693 🎉 Update Robot icon (#4200) 2025-10-17 18:16:27 +02:00
Ken fd7a75be06 🐛 Replace div inside label with span (#4184) 2025-10-17 18:03:01 +02:00
Ken c81858437d [Linting] Treat useClientLayoutEffect as a regular React-effect (#4191)
* 🎉 Check for deps in 'useClientLayoutEffect'

* ♻️ Update dependency arrays

* 📝 changeset

* 🏷️ Remove on mount effect from depending on react Dispatch functioN
2025-10-17 14:55:27 +02:00
Halvor Haugan 81d162c4d0 [website] Adjust examples of Skeleton (#4197) 2025-10-17 14:31:09 +02:00
Halvor Haugan 5ec5d4e32e Combobox: Fix bug in highlighting when using custom filtering logic (#4195) 2025-10-17 13:29:07 +02:00
Ken 8520ffdfa1 [e2e] Sharded playwright workflow (#4168)
* 🔥 No need to log that users without loging creds are missing token

* ⚡ Sharded playwright workflow

* 🐛 Add permissions

* 🐛 Run yarn install before playwright shards

* 🐛 Install yarn before running playwright

* 🐛 Sync playwright versions

* 🐛 Add webserver config to playwright run

* 🐛 Test changing service-container name

* 🐛 Try running service-container with env-variables

* 🧪 Try removing upgrade request

* 🧪 Try using image-name in url

* 🔥 Removed temp tests

* 🐛 Try hardcoding testapp path

* 🐛 Page goto relative path

* 🔥 Removed node-setup in merge

* 🎉 Fixed blog-upload, added mobile e2e

* 🐛 Test different base-path

* 🐛 Use service-container name

* 🐛 remove name prefix

* 🐛 Try removing http

* 🐛 Try using https

* 🐛 try re-adding tokens

* 🐛 Try hardcoding path

* 🐛 Rename to testapp

* 🎉 Remove e2e test shortening

* ⚡ Test increasing workers to 2 in CI

* ♻️ Clean up old e2e scripts

* 🐛 Use dev-server when testing locally

* ♿ Correct headlig-levels for component intros

* 🔥 Removed legacy exclusion

* 🔥 No need to checkout repo on run

* 🧪 Test for mobile webkit instead of mobile chrome
2025-10-17 09:29:08 +02:00
github-actions[bot] 230b0944e8 Version Packages (#4164)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-15 16:35:20 +02:00
KenandHalvor Haugan 4e87e3caca [Sanity] Preview mode updates (#4165)
* 🐛 Allow for disabling visualediting component in preview

* 🚚 Remove perspective query from edit-links in VisualEditing-mode

* 🐛 Fix CSP issues, avatar resolve

* 🔥 removed redundant externalStorage hook

* Update aksel.nav.no/website/app/_ui/draft-overlay/DraftOverlay.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/app/_ui/draft-overlay/DraftOverlay.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-15 16:26:56 +02:00
44f5d07929 [Overlay] FocusBoundary utility extracted from Drawer PR (#4160)
* 🚚 Moved FocusScope and connected hooks

* 🎉 setup tests for focusscope

* ♻️ Story tests utilities

* ♻️ More test-code

* ♻️ Early returns

* ♻️ Refactor trapped handler

* ♻️ Update key event handler

* 📝 Better docs for FocusScope

* ♻️ Replace old FocusScope with new implementation

* 🚚 Rename FocusScope to FocusBoundary

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Update import

* 📝 TODOs

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/util/focus-boundary/FocusBoundary.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Avoid early return

* 🐛 Test correct close button

* 📝 comments

* 📝 comments

* ♻️ Add autoComplete off to demo

* 📝 comments

* 📝 comments

* 🧪 Added playground demo

* 🐛 Check for valid intialRef before focusing it

* 📝 Comments

* 📝 Comments

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-15 16:26:49 +02:00
Halvor Haugan dcb2641add Textarea: Break spaces (#4182) 2025-10-14 16:47:37 +02:00
dependabot[bot] 86fc3cfb29 ⬆️ Bump prettier from 3.1.1 to 3.6.2 (#4178)
Bumps [prettier](https://github.com/prettier/prettier) from 3.1.1 to 3.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.6.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-14 12:25:09 +02:00
dependabot[bot] 059f591fc2 ⬆️ Bump @testing-library/dom from 10.4.0 to 10.4.1 (#4177)
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 10.4.0 to 10.4.1.
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v10.4.0...v10.4.1)

---
updated-dependencies:
- dependency-name: "@testing-library/dom"
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-14 12:24:39 +02:00
KenandHalvor Haugan e7775c8b0c 🎉 Added FocusGuard utility (#4170)
* 🎉 Added FocusGuard utility

* 📝 Added story explaining the use of useFocusGuard

* ♻️ Remove redundant isSafari-handling of focusguard

* Update @navikt/core/react/src/util/hooks/Hooks.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Re-write focusGuard to use React

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-14 09:07:29 +02:00
Halvor Haugan adc4f07a26 Remove link styles from examples.module.css (#4180) 2025-10-13 12:09:26 +02:00
dependabot[bot] 58200023dc ⬆️ Bump astro (#4174)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).


Updates `astro` from 5.13.2 to 5.14.3
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.14.3/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 5.14.3
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 09:51:18 +02:00
dependabot[bot] 7d52d78a38 ⬆️ Bump prettier-plugin-tailwindcss from 0.6.11 to 0.6.14 (#4179)
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.6.11 to 0.6.14.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.11...v0.6.14)

---
updated-dependencies:
- dependency-name: prettier-plugin-tailwindcss
  dependency-version: 0.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 09:50:06 +02:00
Ken 51b3c714a3 [Utils] Extracted utils from Overlay PR (#4143)
* 🎉 Added browser API utils

* ♻️ Updated owner

* ♻️ Use ownerdocument util

* ♻️ Added timeout hook

* 🐛 Update imports

* ♻️ Update use of window

* ♻️ Progressbar timeout

* 🎉 Animate height timeout

* ♻️ Use new timeout-func in debounce

* ♻️ Use new timeout-func in useToggleItem

* ⬅️ Revert animationFrame use

* ♻️ Clean up use in debounce

* 🔥 removed unused utility

* 🏷️ Removed extra ts type

* 🔥 removed reduntant clear in debounce

* ♻️ Inline clear

* 📝 Document use of owner.ts

* 📝 Timeout clear cleanup
2025-10-09 12:31:33 +02:00
Ken b615d21a27 🐛 Avoid screen-readers announcing helptext title twice (#4169) 2025-10-09 12:06:48 +02:00
Halvor Haugan 5adde847be Adjust exampels of MonthPicker (#4167) 2025-10-08 15:44:07 +02:00
dependabot[bot]andKen a29320821a ⬆️ Bump typescript from 5.8.3 to 5.9.3 (#4153)
* ⬆️ Bump typescript from 5.8.3 to 5.9.3

Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.3 to 5.9.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.8.3...v5.9.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync ts versions across monorepo

* 🏷️ Fix type-errors after update to ts 5.9.3

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-10-08 15:17:41 +02:00
Ken 2d42a5025d [Website] Speed up build (#4166)
* ⬆️ Update playroom

* 🔥 Removed old searchIndex code, run next build concurrently

* ⚡ Add sanity to optimized packages

* 🔥 Removed searchindex entry
2025-10-08 15:11:20 +02:00
Ken 910ddea67f 🐛 Update doc-formating for PageBlock 2025-10-08 15:08:10 +02:00
dependabot[bot]andKen c95b9d3c89 ⬆️ Bump @floating-ui/react-dom from 2.1.2 to 2.1.6 (#4154)
* ⬆️ Bump @floating-ui/react-dom from 2.1.2 to 2.1.6

Bumps [@floating-ui/react-dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/react-dom) from 2.1.2 to 2.1.6.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/react-dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/react-dom@2.1.6/packages/react-dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/react-dom"
  dependency-version: 2.1.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-10-08 14:45:35 +02:00
dependabot[bot] 006934dd9b ⬆️ Bump peter-evans/find-comment from 3 to 4 (#4155)
Bumps [peter-evans/find-comment](https://github.com/peter-evans/find-comment) from 3 to 4.
- [Release notes](https://github.com/peter-evans/find-comment/releases)
- [Commits](https://github.com/peter-evans/find-comment/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/find-comment
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 14:39:45 +02:00
dependabot[bot] 3e5ebce789 ⬆️ Bump peter-evans/create-or-update-comment from 4 to 5 (#4156)
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](https://github.com/peter-evans/create-or-update-comment/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 14:38:40 +02:00
Ken 7ad588a573 [Aksel.nav.no] Uses searchparams for global search (#4146)
* 🎉 Sync global search based on query

* ♻️ Handle open/close state better

* 🎉 Properly update input state

* ♻️ Extract param logic to utility-hook

* ⚡ simplify form select

* 🔥 removed redundant comment

* ⚡ Removed redundant memo

* ⚡ Moved search to suspense

* 🎉 Suspense is now limited to within search, allowing button to render on mount

* ♻️ clean up global search views

* 🐛 Reset search on closebutton click

* ⚡ Make sure to clean up debounce call on unMount

* 🔥 Removed unnecesarry ternary
2025-10-08 14:37:47 +02:00
KenandHalvor Haugan 182753c8d2 [Vitest] Run storybook tests in CI (#4163)
* 🎉 Run only local stories, not node_modules

* 🚚 Move test-config to separate dir

* 🎉 Added UI-tests to CI action

* 🐛 Fix test-command used in action

* 📝 rename action

* 🐛 Add storybook command with CI-flag

* 🧪 Add forced file paralellism

* ⚡ only test play-fn tests

* 🔥 Remove a11y annotation

* 🔥 Cleanup after fixing performance

* 🐛 Allow test-runner widget to run without crash

* Update .storybook/main.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Name update

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-08 14:33:31 +02:00
Halvor Haugan da5229a011 [website] Fix warning about multiple elements in <title> 2025-10-08 09:10:44 +02:00
Ken 21b30d20ef [Combobox] Now remains open when navigating with voiceover in "quick-nav"-mode (#4158)
* 🎉 Use Dismissiblelayer for closing combobox

* 🐛 Avoid closing on escape

* ⬅️ Revert test story

* 📝 Changeset
2025-10-07 16:55:10 +02:00
dependabot[bot] aff72dc86e ⬆️ Bump the eslint group with 2 updates (#4150)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.36.0 to 9.37.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.37.0/packages/js)

Updates `eslint` from 9.36.0 to 9.37.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.36.0...v9.37.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.37.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.37.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-07 16:20:08 +02:00
Ken 40958cd6e5 Revert "🔥 Removed NPM-token needed for publish to npm (#4159)" (#4162)
This reverts commit ba4707a277.
2025-10-07 14:51:54 +02:00
github-actions[bot] 8335327ab4 Version Packages (#4161)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-07 14:39:17 +02:00
Halvor Haugan 61bb22580b Darkside: Adjustments for DatePicker on very small devices (#4142) 2025-10-07 14:35:07 +02:00
Ken ba4707a277 🔥 Removed NPM-token needed for publish to npm (#4159) 2025-10-07 13:45:53 +02:00
Ken a57f05810e 🐛 Format example-texts for PageBlock component JsDoc 2025-10-06 15:46:18 +02:00
github-actions[bot] 8affd0804b Version Packages (#4119)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-06 15:43:36 +02:00
Halvor Haugan 73d4d6520e [website] Remove null values from writers array (#4144) 2025-10-06 09:39:55 +02:00
Halvor Haugan 3325ca0ea6 Make mergeRefs ready for React 19 (#4149) 2025-10-06 09:39:05 +02:00
Ken 822c5a30ed 🐛 Avoid client error on disconnect (#4141) 2025-10-02 11:41:15 +02:00
Ken ac36bba170 🔍 Added logging (#4140) 2025-10-02 11:37:41 +02:00
Ken ca4880ee16 [Icons] New icons (#4115)
* 🎉 Added new icons

* 📝 Synced icon-descriptions with Figma

* 📝 changeset updates

* 📝 Sync icon descriptions

* 🐛 Date updates
2025-10-02 09:22:18 +02:00
KenandHalvor Haugan f32e5c36c3 🎉 Updated storybook to v9 (#4134)
* 🎉 Updated storybook to v9

* 🐛 Resolve story-types

* Update aksel.nav.no/website/.storybook/preview.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed old controls

* ♻️ Use built in theme classname switch

* 🐛 Fix theme-switch toolbar

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-10-02 09:22:11 +02:00
dependabot[bot] 014c951346 ⬆️ Bump axios in the npm_and_yarn group across 1 directory (#4137)
Bumps the npm_and_yarn group with 1 update in the / directory: [axios](https://github.com/axios/axios).


Updates `axios` from 1.12.1 to 1.12.2
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-30 14:35:41 +02:00
dependabot[bot] dd6d225f80 ⬆️ Bump axios in the npm_and_yarn group across 1 directory (#4133)
Bumps the npm_and_yarn group with 1 update in the / directory: [axios](https://github.com/axios/axios).


Updates `axios` from 1.12.0 to 1.12.1
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.1
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-30 14:28:09 +02:00
Halvor Haugan d311ba90ea [website] Adjust Slack feedback text 2025-09-30 13:22:59 +02:00
Halvor Haugan f6f778b971 Prepare timeline.stories.tsx for React 19 (#4135) 2025-09-30 09:46:26 +02:00
Halvor Haugan a683001372 [website] Update link about tokens (#4136) 2025-09-30 09:43:15 +02:00
Ken d8a2c8f41f 🐛 Added React import to theme templates 2025-09-30 09:30:12 +02:00
Halvor HauganandKen 2e07bc2d97 [Sanity] Validate heading levels (#4131)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-09-29 14:07:30 +02:00
d9a1363f5e [Templates] Added examples for theme-button (#4046)
* ✨ Set up first-draft for theme-switch pattern

* ✨ Added templates without system-setting

* ♻️ Remove redundant code

* Update aksel.nav.no/website/pages/templates/theme-switch/uten-system-bare-ikon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/uten-system-bare-ikon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Theme middleware to handle theme-templates and communication to root app theme

* remove provider

* Update aksel.nav.no/website/pages/templates/theme-switch/tekst.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/tekst.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/bare-ikon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/bare-ikon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/tekst.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/bare-ikon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/components/website-modules/examples/withDsExample.theme.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/theme-switch/bare-ikon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 yarn lock sync

* 🐛 Avoid server/client CSS out of sync

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2025-09-29 12:53:05 +02:00
Halvor Haugan eade1aa7b6 yarn.lock sync 2025-09-29 12:41:41 +02:00
dependabot[bot] 16cd3e5c82 ⬆️ Bump stylelint from 16.19.1 to 16.24.0 (#4130)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.19.1 to 16.24.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.19.1...16.24.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.24.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-29 11:55:26 +02:00
dependabot[bot] 45d666ce78 ⬆️ Bump the npm_and_yarn group across 1 directory with 4 updates (#4125)
Bumps the npm_and_yarn group with 4 updates in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite), [esbuild](https://github.com/evanw/esbuild), [axios](https://github.com/axios/axios) and [tar-fs](https://github.com/mafintosh/tar-fs).


Updates `vite` from 6.3.6 to 7.0.7
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v7.0.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.0.7/packages/vite)

Updates `esbuild` from 0.25.9 to 0.25.10
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.9...v0.25.10)

Updates `axios` from 1.9.0 to 1.12.0
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.9.0...v1.12.0)

Updates `tar-fs` from 2.1.3 to 2.1.4
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.3...v2.1.4)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.0.7
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: esbuild
  dependency-version: 0.25.10
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: tar-fs
  dependency-version: 2.1.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-29 11:54:13 +02:00
dependabot[bot]andKen 89af04974e ⬆️ Bump the npm_and_yarn group across 2 directories with 3 updates (#4124)
* ⬆️ Bump the npm_and_yarn group across 2 directories with 3 updates

Bumps the npm_and_yarn group with 1 update in the /@navikt/aksel directory: [axios](https://github.com/axios/axios).
Bumps the npm_and_yarn group with 2 updates in the /examples/astro directory: [devalue](https://github.com/sveltejs/devalue) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `axios` from 1.9.0 to 1.12.0
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.9.0...v1.12.0)

Updates `devalue` from 5.1.1 to 5.3.2
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/devalue/compare/v5.1.1...v5.3.2)

Updates `vite` from 6.3.5 to 6.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.12.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: devalue
  dependency-version: 5.3.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 yarn lock sync

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-09-29 11:51:19 +02:00
Halvor Haugan e9f703eb9a [website] Adjust DatePicker examples (#4121) 2025-09-29 11:50:41 +02:00
Halvor Haugan c994ee793f Darkside: Adjust GuidePanel arrow position (#4120) 2025-09-29 11:48:50 +02:00
dependabot[bot]andKen 331eca903d ⬆️ Bump tsx from 4.19.4 to 4.20.6 (#4128)
* ⬆️ Bump tsx from 4.19.4 to 4.20.6

Bumps [tsx](https://github.com/privatenumber/tsx) from 4.19.4 to 4.20.6.
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.19.4...v4.20.6)

---
updated-dependencies:
- dependency-name: tsx
  dependency-version: 4.20.6
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync 'tsx' dep update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-09-29 11:46:35 +02:00
Halvor Haugan 541b3a190d Fix some React 19 type errors (#4122) 2025-09-29 11:31:46 +02:00
dependabot[bot] d9fb9c66c2 ⬆️ Bump the eslint group with 2 updates (#4126)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.35.0 to 9.36.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.36.0/packages/js)

Updates `eslint` from 9.35.0 to 9.36.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.35.0...v9.36.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.36.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.36.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-29 09:43:47 +02:00
Halvor Haugan b094c23705 ReadMore: Added tabIndex on content + some other adjustments (#4116) 2025-09-29 09:20:08 +02:00
Karl OandKen fb16483a24 Legg til "kebab" som synonym for ellipsis-ikoner (#4117)
* Add 'kebab' synonym to ellipsis icons

* Delete .changeset/long-cameras-sing.md

No need for changeset for internal doc changes

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-09-26 11:44:36 +02:00
Halvor Haugan 08caddf18a Process: Adjusted active-marking (#4118) 2025-09-26 11:42:46 +02:00
KenandHalvor Haugan 74fd46fef7 [Hooks] Overlay hooks for new Overlay/Drawer implementation (#4108)
* ✨ Setup Overlay-component

* ✨ New dir setup

* 🐛 Update storybook imports

* 🎉 Working open close state handling

* ✨ Copy over utilities

* 📝 Document and explain new hooks

* 📝 Update link to hook source

* 📝 Updated docs

* ✨ Added eventCallback hook

* 📝 UseAnimationFinished hook

* ✨ Added openChangeComplete hook

* 🔥 Removed redundant code for PR

* 📝 Update comments

* 🎉 Allow for undefined references

* 🎉 Sync changes with #4106

* 📝 Rename hook

* Update @navikt/core/react/src/overlays/overlay/hooks/useTransitionStatus.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ starting -> entering, ending -> exiting

* 📝 More comments

* 🐛 Update import of hooks in Floating.tsx

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-09-23 13:26:30 +02:00
github-actions[bot] 960ff7b0c8 Version Packages (#4102)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-22 11:22:13 +02:00
Halvor Haugan 489fcbb53a Darkside: Avoid empty aria-describedby in Radio and Checkbox (#4111) 2025-09-22 11:10:06 +02:00
d22edd2773 [Combobox] Uses Floating utility for popover placement (#4106)
* ✨ Setup Overlay-component

* ✨ New dir setup

* 🐛 Update storybook imports

* 🎉 Working open close state handling

* ✨ Copy over utilities

* 📝 Document and explain new hooks

* 📝 Update link to hook source

* 🎉 Replace custom floating element in Combobox with Floating utility

* ✨ Update positioning logic

* 📝 Changeset

* 📝 Updated docs

* ✨ Added eventCallback hook

* 📝 UseAnimationFinished hook

* ✨ Added openChangeComplete hook

* 🔥 Removed redundant code for PR

* 📝 Update comments

* stories

* 🎉 Better positioning update by listening trough animation hooks

* ✨ Moved overscroll-behaviour to only smaller devices

* Update @navikt/core/react/src/overlays/overlay/hooks/useAnimationFinished.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Removed misleading comment

* Update @navikt/core/react/src/overlays/overlay/hooks/useAnimationFinished.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/overlay/hooks/useAnimationFrame.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/overlay/hooks/useEventCallback.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Updated comment

* 📝 Rename file

* Update @navikt/core/react/src/overlays/overlay/hooks/useEventCallback.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/overlay/hooks/useEventCallback.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed unused hook

* ⚰️ Delted animations scheduler API

* 📝 changeset text

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-09-22 11:08:23 +02:00
KenandCopilot 64a82baa94 ✨ Add 'onRowClick' callback-prop to allow for selecting rows on row-click (#4107)
* :spakles: Add 'onRowSelect' callback-prop to allow for selecting rows by clicking the row itself.

* 📝 Docs

* ⚡ Improve interactive check performance

* Update @navikt/core/react/src/table/Row.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 onRowSelect -> onRowClick

* 📝 Update changeset

* 🔥 Removed interactive story from chromatic

* 🎉 Added cursor pointer to table

* 📝 updated docs

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-22 11:07:00 +02:00
Ken b6c108115d 🔥 Removed noto and roboto flex from storybook options 2025-09-22 11:06:38 +02:00
Ken 67a148ce27 🔥 Removed unused postcss-cli devDependency in ds-css 2025-09-22 10:29:02 +02:00
5c25c43e67 Redaksjon: cleanup (#4074)
* WIP cleanup

* update schema

* 🔥 Update feedback-solution to remove editor-links

* 🏷️ Sync sanity types

* ♻️ Clean up author-references

* Version Packages (#4078)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* ⬆️ Bump vite in the npm_and_yarn group across 1 directory (#4080)

Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.3.5 to 6.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ⬆️ Bump actions/setup-node from 4 to 5 (#4071)

* ⬆️ Bump actions/setup-node from 4 to 5

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync node-version in actions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>

* ⬆️ Bump google-github-actions/auth from 2 to 3 (#4070)

Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2 to 3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2...v3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Templates] Synced our templates with new nav.no changes in header (#4045)

* 💄 Sync templates with updated nav.no template-design

* 📝 Added changelog-entry for templates

* 🔥 Removed unused justify-content prop

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Radio/Checkbox: Improve screen reader experience by moving description out of label (#4066)

* [CI] Change deprecated command and upgrade Chromatic (#4082)

* working filtering in structure, folder for "via redaksjoner"

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-09-19 09:47:02 +02:00
Halvor Haugan 2a78e6e7f5 [website] Avoid importing darkside reset css in examples since it overrides some of the legacy css (#4105) 2025-09-18 09:19:44 +02:00
Halvor Haugan 38d1376331 Darkside: Adjust visually-hidden typography css (#4103) 2025-09-16 15:17:46 +02:00
Halvor Haugan 3b68c61651 Darkside: Adjusted arrow on GuidePanel poster variant (#4101) 2025-09-16 10:34:01 +02:00
Halvor Haugan 0454d5bc68 Add deno.enablePaths to vscode settings (#4098) 2025-09-15 14:29:20 +02:00
Halvor Haugan b30e461e9f Dependabot: Ignore examples directory (#4091) 2025-09-12 14:23:04 +02:00
Halvor Haugan 5eef0563a4 [CI] Set cache-dependency-path to "yarn.lock" (#4093) 2025-09-12 14:05:55 +02:00
github-actions[bot] a6ff199035 Version Packages (#4084)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-12 13:53:06 +02:00
Halvor Haugan 6ca479e133 Checkbox/Radio: Correctly check if in darkside (#4094) 2025-09-12 13:23:51 +02:00
Ken 67aace079a Vite, Sanity and Nextjs depdendency-update (#4083)
* ⬆️ Vite and nextjs upgrade

* 📝 Update imports from next-sanity

* ⬆️ Use next-sanity v11
2025-09-12 09:04:28 +02:00
Halvor Haugan a2b8d9bd32 [website] Fix blog heading on mobile (#4088) 2025-09-11 15:08:08 +02:00
KenandHalvor Haugan a04ac98342 [ExpansionCard] Content defaults to app-color from Theme. (#4075)
* ♻️ Use isDarkside-flag for detecting darkside-use of Aksel

* 📝 changeset

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Checked checkbox for better color preview

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-09-11 15:06:53 +02:00
Halvor Haugan 88c6b9dee6 Adjust examples of CopyButton (#4087) 2025-09-11 14:50:43 +02:00
Halvor Haugan 493b604fe5 [CI] Change deprecated command and upgrade Chromatic (#4082) 2025-09-10 19:46:50 +02:00
Halvor Haugan a70ebb5b00 Radio/Checkbox: Improve screen reader experience by moving description out of label (#4066) 2025-09-10 19:40:46 +02:00
KenandCopilot 4935ad99e2 [Templates] Synced our templates with new nav.no changes in header (#4045)
* 💄 Sync templates with updated nav.no template-design

* 📝 Added changelog-entry for templates

* 🔥 Removed unused justify-content prop

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-10 19:39:02 +02:00
dependabot[bot] 5f4e5d95e8 ⬆️ Bump google-github-actions/auth from 2 to 3 (#4070)
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2 to 3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2...v3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-10 19:15:54 +02:00
dependabot[bot]andKen 49209259c3 ⬆️ Bump actions/setup-node from 4 to 5 (#4071)
* ⬆️ Bump actions/setup-node from 4 to 5

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Sync node-version in actions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-09-10 19:15:03 +02:00
dependabot[bot] 83c2f6fe0a ⬆️ Bump vite in the npm_and_yarn group across 1 directory (#4080)
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.3.5 to 6.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-10 18:54:31 +02:00
github-actions[bot] 137819ad6b Version Packages (#4078)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-10 15:08:40 +02:00
Ken cdc7a0dbc1 🐛 Fixed regressions where Weeknumber were missing styling in darkside (#4081) 2025-09-10 14:27:45 +02:00
Halvor Haugan 9647d7e078 Timeline: Refactor parseRows() to make it React 19 ready (#4076) 2025-09-10 11:14:16 +02:00
b9d88373f6 Feature/form summary footer (#4032)
* ✨ Adds FormSummary footer component

Adds a `FormSummaryFooter` component to the `FormSummary`.

Moves the `EditLink` from the header to the new footer for improved structure and consistency.

* 🚨 Adds usage warning for incorrect component placement

Adds a warning to prevent incorrect placement of a component within another.

This improves DX by guiding developers to use the intended structure for form summary components.

* ✨ Adds edit link to FormSummaryHeader

Adds an edit link to the FormSummaryHeader component during testing.

This allows users to easily navigate to the corresponding form section for editing.

Removes requirement for FormSummaryHeader to include EditLink - now optional

* ✨ Moves EditLink to FormSummary.Footer

Moves `EditLink` from `FormSummary.Header` to `FormSummary.Footer` for better component structure and to resolve design issues.

Adds `FormSummaryFooter` component and styles to support the `EditLink`.

Implements `useWarnIfContainsAny` hook to provide development-only warnings for incorrect usage of `FormSummary` subcomponents.

* 🏗️  Refactors FormSummary structure and adds slot warnings

Refactors the FormSummary component to improve structure and provide better guidance for developers.

- Introduces `FormSummary.Header` and `FormSummary.Footer` components as dedicated slots, enhancing the component's API.
- Implements `useForbidSlot` and `useRequireSlot` hooks to provide development-only warnings when components are misused within the wrong FormSummary slots, improving component usability and preventing common integration issues.
- Removes the previous complex logic for warnings within `FormSummaryHeader` in favor of the new slot-based approach.

✅ Renames usageWarnings to slotWarningProvider

🚚 Moves and renames `usageWarnings.tsx` to `slotWarningProvider.tsx` for clarity.

This change improves the naming and location of the slot warning utilities,
making their purpose more explicit and easier to discover.
It also enhances the documentation and debug tooling.

* ♻️ Updated API for slotwarning

* 📝 Added sb-story for testing

* 💄 Remove extra border-radius in footer

* 📝 Updated examples

* 📝 Added changeset

* ♻️ PR adjustments

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🎉 Added pencil-icon

* 📝 Updated jsdoc

* 📝 New changeset

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed forced-debug option

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Apply suggestion from @HalvorHaugan

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 show hidden warning-messages

* 📝 Scope edit-link css

* 🧪 Fixed tests

* 📝 Sync EditLink updates in templates

* 🐛 Update last missing doc-change

* ♿ Responsive padding

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-09-09 16:16:35 +02:00
Halvor Haugan 880c1c8ac3 [aksel.nav.no] Add main- and title-tag to examples (#4077) 2025-09-09 15:57:28 +02:00
Ken b92fb584a8 [Repo] Updated root repo script, added biome to lint-script (#4047)
* ♻️ Update root package.json with updated scripts for utility

* ♻️ Add biome to lint-script

* ♻️ Fix biome lint-errors
2025-09-09 14:57:54 +02:00
dependabot[bot] 55bb44cc6d ⬆️ Bump google-github-actions/upload-cloud-storage from 2 to 3 (#4072)
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2 to 3.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2...v3)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 14:55:46 +02:00
dependabot[bot] e35ce2ad29 ⬆️ Bump actions/stale from 9 to 10 (#4073)
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 14:55:09 +02:00
Halvor Haugan 6c6b445b26 Update packageManager field in package.json 2025-09-09 14:17:30 +02:00
dependabot[bot] 6fbc0420da ⬆️ Bump cssnano from 7.0.6 to 7.1.1 (#4069)
Bumps [cssnano](https://github.com/cssnano/cssnano) from 7.0.6 to 7.1.1.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@7.0.6...cssnano@7.1.1)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-version: 7.1.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-09 14:04:53 +02:00
Halvor Haugan 495f8e48b4 [website] Add "Endringer" to ToC on template-articles (#4065)
* [website] Add "Endringer" to ToC on template-articles

* Endringer -> Endringslogg
2025-09-08 09:51:55 +02:00
Ken 85a54572ee 📝 IsoString -> DateString for datepicker examples 2025-09-08 09:46:34 +02:00
Halvor Haugan 97594424c6 [website] Activate sandbox on more examples (#4064) 2025-09-08 09:43:26 +02:00
dependabot[bot] 7b7cb89665 ⬆️ Bump the eslint group with 2 updates (#4067)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.34.0 to 9.35.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.35.0/packages/js)

Updates `eslint` from 9.34.0 to 9.35.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.34.0...v9.35.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.35.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 09:33:14 +02:00
Julian Nymark 3ff3e0b816 remove bidragsytere, unhide redaksjoner from non-devs (#4063)
* remove bidragsytere, unhide redaksjoner from non-devs

* require redaksjon
2025-09-05 15:00:43 +02:00
Ken 51b2eb5182 ⚡ Update requested k8 CPU to recommended values in Nais-console 2025-09-05 10:15:41 +02:00
Julian Nymark b4ed0a85be one small gap tweak 2025-09-04 16:01:46 +02:00
Julian NymarkandKen f017741d8d [3/3] Redaksjon som forfatter: Feature (#3909)
* AvatarStack component

* storybook: preview with light/dark toggle

* avoid import cycle

* cards story++

* Avatar support empty data

* blogg: use AvatarStack and editorialStaff

* utils fn for blogg avatar

* 🚚 queryToAvatars

* 🔥 queryToAvatars

* snappier loading of Image

* refactor Component API (composeable)

* typing++

* update to new Avatar components

* 🚚 Avatar

* HoverCard (as styled Popover + button)

* SR redundant output

* remove stale comment

* Update Avatar.tsx

* HoverCard: use floating-ui instead of Popover

* HoverCard: use floating-ui instead of Popover

* update path for Avatar

* HoverCard css

* HoverCard: border-color

* missing old token for popover z index on website

* typing for utils

* HoverCardGroup

* use HoverCardGroup

* focus-visible

* p inside button is invalid html

* sync clientConfigs

* re-add the local datasett override

* [sanity-schema] team/miljø for Redaksjon

* redaksjon-som-redaktor] 🎨 render for new schema

* 🐛 broken storybook for aksel (tailwinds related)

* new required type param to stories

* remove HoverCard for now (enable when teams have descriptions)

* change schema for aksel_artikkel to use editorial_staff

* use new schema changes

* [website] use Avatar with editorial_staff for cards on frontpage

* ♻️ HighlightedArticle

* 💄 move date to top for blog entries

* typing++

* match design++

* typing++

* Update aksel.nav.no/website/app/(routes)/(produktbloggen)/produktbloggen/_ui/BloggList.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/(routes)/(produktbloggen)/produktbloggen/_ui/BloggList.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/(routes)/(produktbloggen)/produktbloggen/_ui/HighlightedBlogg.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* ♻️ move mapping utility fn to the resultant map location

* 🚚 from /dev/ -> not dev

* ♻️ avoid using fallback || ""

* stop using humanizeText + remove it, warn instead

* remove CSS that will be handled later, technically not used

* better a11y for reading out Avatar faster

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-09-04 14:57:16 +02:00
Halvor Haugan 3fb02497b9 Reorganize stories for Radio and Checkbox (#4060) 2025-09-04 08:58:39 +02:00
Halvor Haugan 0b754f13cd Run Chromatic on changes in .storybook directory (#4058) 2025-09-03 16:45:58 +02:00
Julian Nymark 27bed26fff add writers to gp-artikkel (#4059) 2025-09-03 14:54:42 +02:00
KenandCopilot bb230771c9 [Aksel.nav.no] Design-token toc moved between filter and content (#4037)
* ♻️ Design-token toc moved between filter and content resolving team-aksel#843

* Update aksel.nav.no/website/app/(routes)/(designsystemet)/grunnleggende/darkside/design-tokens/page.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-03 13:40:02 +02:00
Halvor Haugan c6b6bee287 Remove unused class in button.stories.tsx 2025-09-03 11:35:53 +02:00
Halvor Haugan a572008496 [website] GP: Fix link to related articles (#4057) 2025-09-03 10:14:25 +02:00
Halvor Haugan 317dbab4d0 [Storybook] Add Noto Sans and Open Sans for testing (#4056) 2025-09-03 09:58:52 +02:00
github-actions[bot] f7e9e5768d Version Packages (#4054)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-09-02 13:03:11 +02:00
Halvor Haugan c1560e6ff2 [aksel.nav.no] Adjust EditorPanel width, fix example scrolling, adjust examples (#4055) 2025-09-02 11:51:31 +02:00
Ken 3f58f7efa9 🐛 Removed rem-values on SVG causing errors in Safari (#4048)
* 🐛 Removed rem-values on SVG causing errors in Safari

* 📝 Added docs for future reference
2025-09-01 16:57:49 +02:00
Halvor Haugan 871ea24d16 Styling fixes on Radio and Checkbox (#4051) 2025-09-01 16:32:35 +02:00
Halvor Haugan 4a8eb905d1 [aksel.nav.no] Set sandbox URL length limit to 8000 (#4000) 2025-09-01 13:56:29 +02:00
dependabot[bot] f99fa01b6d ⬆️ Bump the eslint group with 2 updates (#4034)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.33.0 to 9.34.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.34.0/packages/js)

Updates `eslint` from 9.33.0 to 9.34.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.33.0...v9.34.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.34.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.34.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-01 12:34:31 +02:00
Ken c15f982a77 [Eslint] Added check for use of React 18 and 19 features in packages (#4040)
* 🏷️ Better linting config to avoid using modern React syntax

* 🐛 Update React imports fixing eslint-config changes

* 🔥 Removed comments in nb-locale
2025-08-29 17:38:07 +02:00
Ken 7915307d06 📝 Updated hide-content example for process (#4043)
* 📝 Updated hide-content example for process

* 📝 Sync process-examples based on feedback
2025-08-29 13:58:35 +02:00
dependabot[bot] 7150c3a5b3 ⬆️ Bump astro (#4026)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).


Updates `astro` from 5.12.8 to 5.13.1
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.13.1/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 5.13.1
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-29 13:39:25 +02:00
Ken 43e2d37e6a 🐛 Process-stories now based on static date to avoid chromatic snapshot false positives 2025-08-29 13:38:55 +02:00
b6b61c8f2b Add comprehensive GitHub Copilot instructions for Aksel design system (#4041)
* Initial plan

* Add comprehensive .github/copilot-instructions.md file

Co-authored-by: KenAJoh <26967723+KenAJoh@users.noreply.github.com>

* 📝 Added general instructions

* 📝 Auto-generated instructions

* 📝 Incremental improvements to config

* 📝 Incremental improvements to chat in config

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: KenAJoh <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-08-28 19:30:17 +02:00
dependabot[bot] 4f810da6dd ⬆️ Bump sha.js from 2.4.11 to 2.4.12 in the npm_and_yarn group (#4025)
Bumps the npm_and_yarn group with 1 update: [sha.js](https://github.com/crypto-browserify/sha.js).


Updates `sha.js` from 2.4.11 to 2.4.12
- [Changelog](https://github.com/browserify/sha.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/sha.js/compare/v2.4.11...v2.4.12)

---
updated-dependencies:
- dependency-name: sha.js
  dependency-version: 2.4.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-28 11:30:40 +02:00
Halvor Haugan 1438506211 Validate CSS in bundle.js instead of using CLI (#4042) 2025-08-27 12:34:00 +02:00
github-actions[bot] d278e5e50c Version Packages (#4015)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-26 15:32:39 +02:00
Halvor Haugan b13541bff4 Process: Remove Checkmark subcomponent, inactive -> uncompleted, adjust gradient (#4039) 2025-08-26 15:22:04 +02:00
Ken 887b47431b Icons: 🎉 New icons 'CheckmarkHeavy' and 'PageBreak'. (#4038) 2025-08-26 10:37:54 +02:00
5391dc9bcc 📝 Marked interactive prop on stepper-wrapper as deprecated (#4007)
* 📝 Marked interactive prop on stepper-wrapper as deprecated

* Update .changeset/eight-friends-yell.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Update changeset

* Update @navikt/core/react/src/stepper/Stepper.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed display only stepper example

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-26 10:31:25 +02:00
d189278fae [Components] Process (new component) (#3950)
* [Process] Init Process with clone of Stepper

* [Process] Add variants, state handling and custom overrides

* Clean up css and improve storybook

* [Process] Add component-level icon-overrides

* [Process] Make title optional and remove hideLine

* [Process] Align styles with design

* [Process] Fix high-contrast/forced-colors:active styling

* [Process] Clean up todos

* [Process] Clean up todos

* [Process] Fix lint errors

* [Process] Remove unused prop in Process-example

* [Process] Remove completedIcon and uncompletedIcon

* [Process] Simplify API by removing number and variant props on Step

* [Process] Fix storybook color role

* [Process] Fix styling of date and description

* [Process] Fix legacy css build by removing nesting

* [Process] Clean up jsdoc

* [Process] Update example

* [Process] Make dates in storybook dynamic

* [Process] Remove storybook example with Process-level icon-overrides

* [Process] Re-order storybook icon mix examples

* [Process] Adjust circle size to match design and switch from rem to px

* [Process] Fix according to comments

* [Process] Update Process example to not use 'description'-prop

* [Process] Support hiding of completed steps, with stepwise overrides

* [Process] Fix number size and content alignment

* [Process] Make default icon font-size responsive

* [Process] Remove support for deprecated tokens

* [Process] Adjust title alignment, make activeStep optional, update story

* [Process] Adjust title alignment

* [Process] Make circle numbers semibold and icon size dep on circle size

* [Process] Suggest examples

* ♻️ Collect process component into single file

* 📝 Revert story-name to avoid git naming conflict

* ♻️ Extract Checkbox icon

* ♻️ Make 'activeStep' optional

* ♻️ Update active API

* ♻️ Add line variant prop

* ♻️ Add 'endless' prop to Process

* ♻️ Make active item have colored line

* 💄 Remove 'current' step styling

* ♻️ Remove gap between process steps

* 💄 Connected lines to bullet

* ♻️ Icon -> bullet

* 🎉 Story for interactive content

* ♻️ remove completed prop, remove hideContent prop

* ♻️ Update naming and css syntax

* 🏷️ Make item -> step and step -> item

* 📝 Added demo with lineVariants

* 💄 Small transition on bullet-color

* 💄 Gradient border for current active step

* 💄 Update gradient stops

* 🔥 Removed lineVariant and reverActiveDirection props

* 🎉 Added a two-way aria-controls connection

* 🎉 Added checkmark sub-component

* 🏷️ Export Checkmark sub-component

* 🎉 Added nesting-support to legacy bundle build

* 🎉 Added back legacy css support + forced-colors support

* 🧪 Added CSS-validation for built CSS

* 📝 Changeset

* 📝 Eksempler

* 📝 Example adjustments

* 📝 Added checkmark and number-story

* ♿ Added role=list to ol-element

* Update @navikt/core/react/src/process/Process.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/process/Process.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/process/Process.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/process/Process.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ⚡ Default to undefined childId

* 🔥 remove unused prop

* 🔥 Removed redundant CSS and props

* 🔥 removed forwardRef from utility components

* 🚚 Rename step -> event

* 💄 Testing active-state for process

* ♻️ Update gradient

* 💄 Sync process API with Figma

* ♻️ Removed context and mapping, moved control to event

* 💄 Added active-label styling

* 💄 Make sure active-label has correct spacing

* 📝 Added translations to Process label

* 🚚 Moved hideStatusLabel to Process, renamed translation

* 📝 Updated storybook with translations demo

* 📝 WIP examples update

* 📝 Synced examples with updated API

* 🎉 Added aria-controls sync across Process and Process.Event

* 🏷️ Add number type to function for ts

* 📝 Edit texts in example

* ⚡ Removed redundant memoization

* 📝 Removed date from future 'state' in process

* 📝 Update stories to match new format

* 📝 Renamed active translation, hideStatusLabel -> hideStatusText

* 📝 Removed heading labeling in examples

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-26 10:09:51 +02:00
Julian NymarkandHalvor Haugan 467885bb75 [endringslogg] 🎨 hoist state up to searchForm, useEffect on handleSearch (#4030)
* 🎨 hoist state up to searchForm, useEffect on handleSearch

* 🎨 clear textInput on semver checkbox

* perhaps feature complete endringslogg form

* Refactor

* use useOptimistic and use less useEffect

* dynamic default year

* clear other filters when toggling semver search

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-26 09:57:58 +02:00
Ken ce619b8444 📝 Removed background on LinkCard 'icon'-demo resolving team-aksel#857 2025-08-26 09:48:20 +02:00
Halvor Haugan f738db1919 ToggleGroup: Improved SR experience by using aria-labelledby instead of aria-describedby for label (#4028) 2025-08-25 20:00:33 +02:00
Halvor Haugan 48c21aae2a Fieldset: Improved SR experience by using aria-labelledby for both legend and description (#4029) 2025-08-25 19:55:38 +02:00
Ken 752989ddd7 [CLI] Makes sure that transforms only run on relevant files (#4016)
* ⚡ Added testcase for css fileextension

* 🐛 Avoids running unsafe transforms on unsupported files

* 🔥 Removed demo tests

* 📝 Changeset

* 🏷️ Rename mislabeled function-name

* 📝 Improved input-args, added comments
2025-08-25 12:21:36 +02:00
KenandHalvor Haugan e049a9ffdd 🐛 Add correct className for border-radius when using Box (#4009)
* 🐛 Add correct className for border-radius when using Box

* Update .changeset/shaggy-wings-study.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-25 12:11:57 +02:00
Ken 22b1006e1d 🎉 Added roboto-flex support in storybook for testing (#4011) 2025-08-25 12:11:43 +02:00
KenandHalvor Haugan 08f70efa66 [Linkcard] Added iconPosition-prop for centering arrow (#4021)
* 💄 Move arrow out to component root, add alignment props

* 🎉 Added arrowPlacement prop for centering arrow in LinkCard

* 💄 Added centered arrow-support to legacy-css

* 📝 Resolve typo

* Update .changeset/proud-islands-poke.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Fix CSS based on data-attrb

* 🔥 Removed unused context value

* 📝 Added centered arrow-stories to chromatic

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-25 12:00:54 +02:00
Julian Nymark 0fe52eaa76 Add backlinks to redaksjon (similar to the one for editor) (#4024)
* update schema type for redaksjon

* schema changes++

* sync schema types

* add backlinks to redaksjon
2025-08-22 12:06:29 +02:00
Julian Nymark 9eba4ff284 use subtle color for navSidebarLabels as they are non-clickable (#4027) 2025-08-22 12:03:46 +02:00
Julian Nymark d786e87606 update schema type for redaksjon (#4022)
* update schema type for redaksjon

* schema changes++
2025-08-21 16:25:48 +02:00
Ken 3cf5e1bea6 🎉 Observe editor-document locations in sanity 2025-08-21 15:56:03 +02:00
dependabot[bot] b4c6b5a818 ⬆️ Bump @astrojs/node (#4001)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [@astrojs/node](https://github.com/withastro/astro/tree/HEAD/packages/integrations/node).


Updates `@astrojs/node` from 9.2.2 to 9.4.1
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/integrations/node/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/@astrojs/node@9.4.1/packages/integrations/node)

---
updated-dependencies:
- dependency-name: "@astrojs/node"
  dependency-version: 9.4.1
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 12:35:05 +02:00
dependabot[bot] 833ab44a35 ⬆️ Bump esbuild from 0.25.8 to 0.25.9 in the npm_and_yarn group (#4002)
Bumps the npm_and_yarn group with 1 update: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.25.8 to 0.25.9
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.8...v0.25.9)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.9
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 12:34:31 +02:00
dependabot[bot]andKen 4e644fec9f ⬆️ Bump swr from 2.3.3 to 2.3.6 (#4004)
* ⬆️ Bump swr from 2.3.3 to 2.3.6

Bumps [swr](https://github.com/vercel/swr) from 2.3.3 to 2.3.6.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](https://github.com/vercel/swr/compare/v2.3.3...v2.3.6)

---
updated-dependencies:
- dependency-name: swr
  dependency-version: 2.3.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Sync swr-package versions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-08-21 12:33:55 +02:00
dependabot[bot] 7dd0ad778a ⬆️ Bump lint-staged from 13.0.3 to 16.1.5 (#4006)
Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 13.0.3 to 16.1.5.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lint-staged/lint-staged/compare/v13.0.3...v16.1.5)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.1.5
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 12:32:07 +02:00
dependabot[bot] 7b145878c9 ⬆️ Bump actions/checkout from 4 to 5 (#4008)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 12:14:34 +02:00
Halvor Haugan e8c299301e [website] Small adjustments in Endringslogg (#4020) 2025-08-21 12:13:40 +02:00
KenandHalvor Haugan ee09c60f24 [Examples] Removed tailwind classes, migrated to new primtive spacing (#4014)
* 🐛 Support legacy and darkside switch in Aksel storybook setup

* ♻️ Adjust min-height examples

* ♻️ Removed all use of custom className in examples

* 🚚 Migrated to new primitive spacing scale

* Update aksel.nav.no/website/pages/eksempler/h-stack/align.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/v-stack/align.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Update theme-css for aksel-storybook to handle layers

* 📝 Tag -> tab

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-20 18:09:21 +02:00
Halvor Haugan 4eb83bad69 [darkside] Fix issue with focus outline on checkbox in expandable table row content (#3998) 2025-08-20 15:00:08 +02:00
Halvor Haugan aa4aed512f Darkside: Fix arrow in Tooltip (#4018) 2025-08-20 09:46:16 +02:00
Halvor Haugan 316b78eefd Adjust examples of ToggleGroup + remove text about small on other examples (#4017) 2025-08-19 16:13:24 +02:00
Halvor Haugan ae7e517e67 Adjust examples of ToggleGroup (#4013) 2025-08-19 13:36:27 +02:00
Ken 639b837d74 🔥 Deprecate headingSize-prop in Accordion (#3993) 2025-08-19 13:28:07 +02:00
KenandJulian Nymark 3de2906e9e semver search in changelog entries (#3989)
* 📝 WIP setup for semver search in changelog entries

* settings display & opt-out

* maxWidth to not break mobile

* make feature opt-in

* now support semver range searches

* join filter back to valid semver range syntax

* tweaks to search syntaks Popover and button

* use Helptext instead of custom Helptext

* checkbox for search preference

* default checked for snappy prefilled value from search params

* group all form into SearchForm for use client shennanigans and state management

* typing++

* ♻️ refactor state management for FilterChips

Why? Since the form is a bit more "complex" in hiding fields based on
other fields, it felt apropriate to "somewhat centralize" the state,
not going full context here, but sending down the useState() is fine
for now in terms of complexity imo.

Unfortunately the smarter / optimized behaviour has been disabled for
now, so no prefetching of the resulting query when hovering over a
FilterChip. It also requires you to hit enter or click the search icon
in order to trigger a search. It's more manual, but simpler to
understand (and to develop). Consider re-adding smarts. The smarts was
also not "fully smart" in its previous incarnation, since we couldn't
have the search be "instant and automatic" (not requiring any
enter/clicks beyond typing).

* typing

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2025-08-19 11:20:40 +02:00
Halvor Haugan 39240c5e48 [website] Hide sandbox button when base64 is falsy, and stegaClean it (#3999) 2025-08-15 14:52:12 +02:00
github-actions[bot] 8934728f89 Version Packages (#3987)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-15 14:06:26 +02:00
Julian Nymark 0b89a2f09c sync clientConfigs (#3986)
* sync clientConfigs

* re-add the local dataset override
2025-08-14 12:03:51 +02:00
Halvor Haugan 95f9b6ae46 Form components: Improved a11y when using JSX in description (#3990) 2025-08-13 12:06:59 +02:00
Halvor Haugan c2360cf595 Helper function for creating Chromatic stories (#3923) 2025-08-13 12:05:36 +02:00
Julian Nymark cf12f9e4d7 increase padding under certain width to avoid overlapping theme selection (#3992) 2025-08-13 09:48:51 +02:00
Halvor Haugan 2001a0c9de Fieldset: Connect description to fieldset with aria-describedby (#3974) 2025-08-12 12:31:08 +02:00
github-actions[bot] 9c793b4b90 Version Packages (#3985)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-12 11:53:23 +02:00
Ken cb03eb15f9 🎉 Use kbd in global-search button 2025-08-12 11:49:39 +02:00
Ken dc769d5c61 Updated Sanity API-version (#3984)
* ⬆️ Bumped Sanity API-version to current time

* 🔧 Use `SANITY_API_VERSION` in `editorialStaff.tsx` for API versioning
2025-08-12 10:40:44 +02:00
Ken b24ebb3499 🎉 New icons ArrowCirclepathReverse and ArrowsAllDirections. (#3979)
* 🎉 New icons ArrowCirclepathReset and ArrowsAllDirections.

* 🏷️ Rename ArrowCirclepathReset -> Reverse
2025-08-12 09:42:14 +02:00
Ken 2c24f85e98 🏷️ Export Datepicker hook argument types (#3983)
* 🏷️ Export Datepicker hook argument types

* Apply suggestion from @KenAJoh
2025-08-12 09:29:14 +02:00
f726c2c977 ⬆️ Bump cross-env from 7.0.3 to 10.0.0 (#3981)
* ⬆️ Bump cross-env from 7.0.3 to 10.0.0

Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 7.0.3 to 10.0.0.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kentcdodds/cross-env/compare/v7.0.3...v10.0.0)

---
updated-dependencies:
- dependency-name: cross-env
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* upgrade cross-env in website workspace too

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-11 16:09:40 +02:00
Halvor Haugan d6b4ef6ec5 [website] Show dataset in footer when it's not production (#3947) 2025-08-11 15:30:00 +02:00
Julian Nymark ff5c013455 schema changes for working with redaksjon som forfatter 2025-08-11 14:47:12 +02:00
Halvor Haugan ea3dcb7d6c [website] stegaClean in ToC (#3982) 2025-08-11 14:00:43 +02:00
dependabot[bot] d9e88e3a04 ⬆️ Bump astro (#3969)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).


Updates `astro` from 5.9.3 to 5.12.8
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.12.8/packages/astro)

---
updated-dependencies:
- dependency-name: astro
  dependency-version: 5.12.8
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 11:57:59 +02:00
github-actions[bot] 404d5bd024 Version Packages (#3980)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-11 11:44:32 +02:00
dependabot[bot] 2b37dd08f9 ⬆️ Bump postcss-selector-parser from 6.1.2 to 7.1.0 (#3978)
Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 6.1.2 to 7.1.0.
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/v6.1.2...v7.1.0)

---
updated-dependencies:
- dependency-name: postcss-selector-parser
  dependency-version: 7.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 11:37:55 +02:00
dependabot[bot] 5e3a411cc5 ⬆️ Bump the eslint group with 2 updates (#3976)
Bumps the eslint group with 2 updates: [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) and [eslint](https://github.com/eslint/eslint).


Updates `@eslint/js` from 9.32.0 to 9.33.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.33.0/packages/js)

Updates `eslint` from 9.32.0 to 9.33.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.32.0...v9.33.0)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 9.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-11 10:44:46 +02:00
Halvor Haugan 8908235bf5 Radio/Checkbox: 🐛 Fix issue where label was not announced by screen readers in Firefox (#3973) 2025-08-11 10:41:06 +02:00
Steinar e694aba9dd [Stepper] Increase circle size to match Process component (#3968)
* [Stepper] Increase circle size to match Process component

* [Stepper] Fix circle size issue in legacy css

* [Stepper] Make completed checkmark font-size responsive

* [Stepper] Adjust completed-icon to 24x24 while still dynamic

* [Stepper] Add changeset

* [Stepper] Adjust title alignment
2025-08-11 10:38:26 +02:00
Ken 962e2d4ee4 🎉 Left-align images for left-aligned page-layouts (#3970)
* 🎉 Left-align images for left-aligned page-layouts

* 🔥 Removed max-width limit
2025-08-08 12:50:36 +02:00
Halvor Haugan b9b8dbefcf [website] Fix image overflow issue in DoDont (#3971) 2025-08-08 12:03:25 +02:00
github-actions[bot] 21676b50a7 Version Packages (#3966)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-08 10:11:26 +02:00
KenandHalvor Haugan 703a0713fd 🐛 Use correct supports syntax in CSS when checking for has selector (#3965)
* 🐛 Use correct supports syntax in CSS when checking for has selector

* Update .changeset/tender-tools-tie.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-07 14:28:07 +02:00
41e1a5c98a 🎉 Auto-generate github-releases based on changeset release (#3964)
* 🎉 Auto-generate github-releases based on changeset release

* Update scripts/git-release.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update scripts/git-release.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update scripts/git-release.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed redundant prefixing of tag

* ♻️ Replace execSync with spawnSync

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-08-07 12:57:21 +02:00
Ken 1db53bb312 🐛 Remove immutable installs to allow changeset to perform automatic PRs 2025-08-07 09:29:18 +02:00
Ken 92985b8814 🐛 Using Theme component to set color to dark did not work when root node did not set light/dark (#3961) 2025-08-07 08:28:16 +02:00
Ken 3d9c55ed7d [Icons]: Did not tests for incorrect fill-color, causing ChatAdd to be released with issues (#3963)
* 🧪 we only checked for correct stroke-value, not fill in icons. Now tests for both

* 🐛 ChatAdd icon had wrong fill-color for + sign

* 📝 Changeset
2025-08-07 08:23:27 +02:00
Halvor Haugan d24ca8f3f0 Migrate to eslint 9 (flat config) (#3949) 2025-08-06 15:20:38 +02:00
Halvor Haugan 39191e5415 CI: Immutable yarn install (#3926) 2025-08-06 15:16:05 +02:00
Halvor Haugan ceacae6022 Improved clean script (#3962) 2025-08-06 14:50:38 +02:00
7f7f6bb6e1 Fix theme switcher accessible name (#3944)
* Theme switcher exposed both icon's accessible name, even if only one icon was shown. This change properly removes the icon.

* fix hydration error and use resolvedTheme instead of theme

* ♻️ Use tooltip for theme-switcher button

* 🎉 Replace sun/moon icon with theme-icon

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-08-06 11:26:52 +02:00
github-actions[bot] 0597d79537 Version Packages (#3959)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-06 08:35:11 +02:00
Steinar a2d4bb4e23 [website] Fix changelog link in component links to ref new changelog (#3957) 2025-08-05 14:58:33 +02:00
Ken ab84fea358 🎉 New icons ChatAdd and Theme (#3958) 2025-08-05 14:57:57 +02:00
dependabot[bot] ae1ecf5693 ⬆️ Bump next (#3934)
Bumps the npm_and_yarn group with 1 update in the /aksel.nav.no/website directory: [next](https://github.com/vercel/next.js).


Updates `next` from 15.3.1 to 15.3.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.3.1...v15.3.3)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.3.3
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-05 10:43:52 +02:00
github-actions[bot] ef3cc858c0 Version Packages (#3956)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-05 10:40:51 +02:00
Ken 9df7d51e06 🐛 JsCodeshift ignored given filepaths when extensions were given (#3955) 2025-08-05 10:38:41 +02:00
dependabot[bot] 051262c367 ⬆️ Bump form-data from 4.0.2 to 4.0.4 in the npm_and_yarn group (#3952)
Bumps the npm_and_yarn group with 1 update: [form-data](https://github.com/form-data/form-data).


Updates `form-data` from 4.0.2 to 4.0.4
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.4)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-05 10:27:28 +02:00
Ken 4c8c647f67 🐛 Redirect from legacy ingress desgin.nav.no -> aksel.nav.no@ 2025-08-05 09:39:20 +02:00
dependabot[bot] 05b8fbc523 ⬆️ Bump esbuild from 0.25.5 to 0.25.8 (#3940)
---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 14:49:29 +02:00
Halvor Haugan 9e8bde1fa4 [website] Simplify update:sanity-schema script (#3948) 2025-08-04 10:10:28 +02:00
Halvor Haugan fdcc61b1ef [website] Adjust type for image url utils to avoid type assertion (#3946) 2025-08-04 10:09:45 +02:00
Ken 4976907fb6 [Website] Utility-function cleanup (#3937)
* 🔥 Remove old preview-api

* 🚚 Migrate format-text util

* 🔥 Removed unused util-code

* ♻️ Updated removeEmojies to handle compound-emojies

* 🐛 Update imports

* 🚚 Update and rename 'getImage' to 'fallbackImageUrl'

* 🧪 Added tests for fallback image util

* ♻️ Inline author deconstruction since it will be removed soon

* ⚰️ Delete old unused utility code
2025-07-04 16:07:14 +02:00
github-actions[bot] d737046e9a Version Packages (#3936)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-04 15:44:41 +02:00
Ken 6ed48b9a9b [Website] Darkside cleanup utils (#3935)
* ⚰️ Deleted legacy-files

* 🚚 Migrated date-str formatter
2025-07-04 13:36:07 +02:00
github-actions[bot] e73e26f9e2 Version Packages (#3924)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-04 13:18:47 +02:00
Ken e5b7d26587 [Website] Force-static render /admin (#3933)
* 🐛 Force static render Admin routes, refactor consent-banner

* 🐛 Update consent clientside

* ⚡ AAvoid extract render-step by inlining enablr check

* ⚡ Avoid suspense-boundary by using force-dynamic
2025-07-04 13:18:11 +02:00
Ken 8bc9247241 🐛 Render codeblocks without language set 2025-07-03 14:05:30 +02:00
Ken 882d4af9b8 ⚰️ Deleted legacy-files (#3929) 2025-07-03 13:47:35 +02:00
Ken de9ec5ebb6 ⚰️ Delete legacy search tests 2025-07-03 13:09:55 +02:00
Ken f5c481e487 🐛 Filter out empty headings from CMS in TOC-render 2025-07-03 12:27:23 +02:00
Ken c032d0cfe9 🐛 Make sure LinkCards are wrapped in li while inside ul 2025-07-03 11:45:00 +02:00
Ken 8e2e8a0e22 🐛 Ignore codeblock sections in e2e Axe tests 2025-07-03 11:38:00 +02:00
Ken 3dc3b4bcf7 🐛 Avoid duplicate aria-labels in code-blocks 2025-07-03 11:16:00 +02:00
Ken daaf3d145b 🐛 Make sure search is inside landmark 2025-07-03 10:34:53 +02:00
Ken e509285153 🔍 Added SEO-fields to changelog-articles 2025-07-03 10:31:51 +02:00
Ken f89cee0125 🐛 Clear interval before overriding it 2025-07-03 09:59:35 +02:00
Ken 9f1848bb78 📝 Yarn lock sync 2025-07-03 09:58:25 +02:00
Ken 435f528d65 💄 Updated Meta-lime scale for 300 and 400 (#3928) 2025-07-03 09:52:22 +02:00
Ken f4a4987200 🐛 Fallback to correct heading-color when animation is stopped 2025-07-02 15:46:14 +02:00
Ken b1ae7b36d5 🐛 Make sure to only update already published changelog documents 2025-07-02 14:54:14 +02:00
Ken e93e6d9a23 ⚰️ Delete legacy-changelog script 2025-07-02 14:40:52 +02:00
Halvor Haugan a7380c8582 Fix some minor issues in stepper.stories.tsx (#3925)
* Fix some minor issues in stepper.stories.tsx

* this should be a separate PR
2025-07-02 14:39:39 +02:00
Ken b8d36f2df6 💄 Start at brand-blue when animating colors 2025-07-02 14:35:51 +02:00
Ken 310f67996a 💄 Update changelog-cards, darkside highlight 2025-07-02 13:58:28 +02:00
Ken 19f6f82bce Aksel darkside release (#3922)
* 📝 Update redirects

* 🚚 Moved dev UI -> root UI

* 🚚 dev -> (routes)

* 🚚 Updated imports to reflect dev -> (routes) change

* 🔥 Deleted legacyroutes

* ♻️ Clean up _app

* 🔥 Clean up legacy global css

* 🔥 Removed stylesheet loading for examples

* 🔥 Removed legacy API

* 🚚 Move config-files

* 🚚 Use root routes, replacing /dev

* 🐛 Avoid importing darkside-css in global.css

* 🐛 Updated header-link directing to designsystemet

* 🐛 Add bg to examples

* 🚚 Development -> Production dataset

* 🐛 make sure darkside css overrides legacy

* ✨ Enable draftPreview

* ✨ Updated exit draftMode banner, resolve frontpage document

* 🚚 Migrate API-routes

* 💄 Height-align cards in li-grid

* 📝 Avoid redirecting monster-maler overview-page

* 🐛 Fix OG-image used in Endringslogg

* 🚚 Inline sidebargroup

* 💄 Update sidebar

* 💄 Fix indentation

* 🐛 Root overview-page now handles active-state correctly

* 🔊 Fixed next-logger config

* 🐛 Avoid reduntant revalidation

* 📝 ⚡ Rename route-labels, prefetch sidebar links

* 📝 Preview -> presentation redirect

* ♻️ Avoid using legacyBehaviour for Next links

* 💄 Better code-theme for html

* 💄 Reduce sidebar-width to 18rem

* 🐛 Remove theme-togglegroup

* 🐛 Avoid prefetching presentation-mode link

* 🐛 Resolve komponenter link to correct path

* 🎉 Link directly to God-praksis from frontpage

* 🐛 Update sidebar-tests to reflect renaming

* 🐛 Avoid force dynamic on icon-page

* 🐛 Avoid refreshing on focus

* ♿ Aria-expanded on mobile-menu dropdown

* 🐛 Add github user content to nais externals

* 💄 Better gp-frontpage lin kwidth

* 💄 Dedicated ds-section

* 🎉 New hero-cards

* 🎉 Updated hero-cards

* 🎉 Updated mobile-menu for ds-navigation

* 🐛 Fix Modal-bug where darkside className were not set on body after open

* 🎉 Update focus after changing view

* 📝 Global search texts

* 💄 auto-resize thumbnails

* 🚚 Move PromoTag to a standalone server-component

* 🎉 Added promo-tag to frontpage

* 💄 Updated animation for promotag

* 💄 Synced Aksel-logo in Card

* 🐛 Search did not forward data-color to button

* 📝 Update search and sidebar texts

* 💄 Animated icon-card

* 💄 More noticable promo-tag border when animating

* 📝 Update 'siste fra Aksel'-texts

* 🐛 Avoid always hiding table-rows on SM-breakpoint
2025-07-02 13:23:46 +02:00
Julian Nymark bf69efc005 correcter subdomain (#3900) 2025-06-30 15:43:23 +02:00
Julian Nymark cab4085906 [1/3] Redaksjon som forfatter: AvatarStack (#3905)
* AvatarStack component

* storybook: preview with light/dark toggle

* avoid import cycle

* cards story++

* Avatar support empty data

* 🔥 queryToAvatars

* snappier loading of Image

* refactor Component API (composeable)

* typing++

* 🚚 Avatar

* HoverCard (as styled Popover + button)

* SR redundant output

* remove stale comment

* Update Avatar.tsx

* HoverCard: use floating-ui instead of Popover

* HoverCard: use floating-ui instead of Popover

* HoverCard css

* HoverCard: border-color

* HoverCardGroup

* focus-visible

* p inside button is invalid html
2025-06-30 15:35:44 +02:00
Ken 91fced9951 [Website] Smart/compact examples (#3907)
* 🎉 Extract JSX for examples

* ✨ Added new jsx-data to examples-code

* 🏷️ Synced sanity-types

* 🐛 Make sure to remove trailing semicolon

* 🎉 Show compact code for examples and templates

* 📝 Adjust texts for expanding collapsed code-views

* 🎉 Add support for implicit return examples

* 🐛 Make sure to ignore nested return-statements

* 📝 Updates to expand/collapse texts in code-examples

* 🔥 Removed redundant boolean flag
2025-06-30 15:13:52 +02:00
KenandCopilot 6f11f31fe4 🎉 Scroll examples into view after being closed from expand-state (#3915)
* 🎉 Scroll examples into view after being closed from expand-state

* Update aksel.nav.no/website/app/_ui/code-block/CodeBlock.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/_ui/code-block/CodeBlock.tsx

* ⚡ Instant-scroll to collapsed code-examples

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-30 15:13:36 +02:00
Ken 94726fc606 ♿ Replace ol-tag with div in <Chat /> (#3904)
* ♿ Chat ol-tag now has role presentation

* 🔥 Removed now redundant ol>li syntax for chat list

* 🔥 Removed now redundant list-reset css in chat

* 🔥 Removed now redundant list-reset css in chat in darkside

* 📝 Changeset

* 📝 Update changeset

* Delete .changeset/new-gifts-add.md
2025-06-30 15:06:56 +02:00
Ken f3de77539f [Table] Selected row highlight (#3898)
* 💄 Added outlined highlight styling to selected table-rows

* 📝 Changeset

* 📝 Add selection-demo for expanded table
2025-06-30 15:06:47 +02:00
Ken 8b62b2b1e4 ✨ Allow for custom buttons in fileupload item. (#3906)
* ✨ Allow for custom buttons in fileupload item.

* 📝 Add primtitives to FileUpload mappings
2025-06-30 14:43:59 +02:00
Ken 7237daa0e0 💄 Update code-example theme (#3919)
* 💄 Update code-example theme

* 💄 Adjust import styling for react-components
2025-06-30 12:21:55 +02:00
5d2b52ba51 [website] Endringslogg (#3885)
---------

Co-authored-by: stainawarjar <210375207+stainawarjar@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-06-30 11:33:47 +02:00
bf4b3fd459 Feature/designsystem front page (#3911)
* Add designsystem front page skeleton

* Add heading and ingress

* Add getting started with design/development link cards

* Implement first working version of "layers" component

* Add an initial attempt at hover styling for ds layers component

* Refactor DS Landing page into separate components

* Add a change log section to ds landing page

* Add AkselByNumbers module

* Get real change log entries from Sanity

* Multiple changes made by pair-design-gramming with Sjur

* Updated sanity schemes

* Add missing contrast colors/variants for link and the typography components

* Use data-color for AkselByNumbers

* Use data-color and slightly tweak padding for PromoTag

* Re-add arrow to ChangeLogNews LinkCard

* Tweaks to LinkCard, using more square icon backgrounds (compared to round backgrounds before) with large border radius, and changing the icon color to subtle

* Per discussion with Ken, removing new contrast variant/textColor option, so as not to break old version of components. Replacing it with CSS for now, but may re-add it later by giving sensible fallbacks in old ds-versions

* Move layers overview styling to a separate CSS-file

* Adjustments for mobile view

* Make all content on the designsystem front page editable in Sanity

* Further adaption to smaller screen sizes

* Handle promoTag being null

* Remove old patches to link and typography to support contrast variants. Will do this manually through CSS variables for now.

* Remove overrides from link-card css, and using local overrides instead

* Remove commented-out code

* Actually use Sanity data

* Update url

* Move getting started files to a sub-folder

* Move change log files to a sub-folder

* Move aksel-by-numbers files to a sub-folder

* Move ds layers overview files to a sub-folder

* Move support section files to a sub-folder

* Migrate to use new LinkCard component instead of the local one. Had to use Box to add background to the icon, as that has been removed from the component.

* Reverse changes made to this out-dated component, as this code no longer uses it.

* 🚚 Moved data-fetch for changelog to sub-component

* 💄 More spacing between promo and title

* 💄 Removed max-width for layers-panel

* ♻️ Inline gettingstarted-components

* ♻️ Use PageBlock for maxWidth handling

* ♻️ Use LinkCards for mobile layers view

* ♻️ Respect content-type for changelog

* ✨ Use new animated arrow for promo-link

* ♻️ Return notfound if data-loading fails

* 💄 Soft support card bg

* 🐛 Sync teal colors

* 💄 Use last changelog-card as a static link to changelog

* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/page.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Make layers links larger (20px)

* Change support cards to LinkCards

* Aksel by numbers: Change css to css modules

* ChangeLogNews: Change css to css modules

* DS Layers Overview: Change css to css modules

* PromoTag: Change css to css modules

* DSLandingPageHeading: Change css to css modules

* Attempt to add OG image and description

* Suggested typing change from Julian

* Update aksel.nav.no/website/sanity/schema/documents/designsystem-forside.tsx

* Handle null value as well

* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/change-log/ChangeLogNews.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/change-log/ChangeLogNews.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/promo-tag/PromoTag.module.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/page-heading/DSLandingPageHeading.module.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Can remove css by adding the color token, now that we use BoxNew to add the icon background

* Remove code that was copied from Figma, but does nothing

* Add correct focus styling to PromoTag

* Overriding LinkCard is no longer necessary.

* Filtrer vekk aksel_ds_forside dokumenttypen fra toppnivå i Sanity

* Use semantic colors in PromoTag. Needed to disable eslint-rule because the linter does not find aksel-tokens

* Update aksel.nav.no/website/app/dev/(designsystemet)/designsystemet/_ui/ds-layers-overview/DSLayersOverview.tsx

* Add position: relative to layers link to fix positioning bug in Safari for the rhombus. Also removed redundant/duplicate :last-of-type selector.

* Only show focus-outline for layers links, not the rhombus and the dotted line

* Use same :hover and :focus-visible highlighting for the dotted line and rhombus for all layers links

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-30 10:32:18 +02:00
Halvor Haugan d21403c3f9 [website] Fix ToC not scrolling correctly (#3920) 2025-06-30 09:50:22 +02:00
Halvor Haugan 15201b32a6 [website] Fix fill color on list bullet (#3918) 2025-06-27 13:56:46 +02:00
Halvor Haugan 777727a68e [website] Remove href from noninteractive example (#3916) 2025-06-26 13:47:06 +02:00
Ken f8e1c8fd16 🔥 Removed no-arrow demo for LinkCard 2025-06-26 09:34:19 +02:00
Ken 8d739d45f4 📝 Update examples theme-select texts 2025-06-26 09:28:10 +02:00
Julian Nymark 0a902a695e [2/3] Redaksjon som forfatter: Sanity (#3908)
* schema for editorialStaff

* 🚚 editorial_staff_teams -> writers

also make it soft-enabled during transition period (hidden + allow incomplete)

* missing rename
2025-06-25 16:54:23 +02:00
Halvor Haugan 95a6c06939 [website] Activate changelog script (#3913) 2025-06-25 15:11:28 +02:00
github-actions[bot] d319e3377c Version Packages (#3895)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-25 14:13:14 +02:00
KenandHalvor Haugan b4f7ffd78b [Komponenter] Scroll margin forms (#3897)
* 💄 Added scroll-margin to select, textfield and textarea

* 📝 Changeset

* Update .changeset/bumpy-singers-ask.md

* Update .changeset/bumpy-singers-ask.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-25 13:27:03 +02:00
Ken 5db38058c3 [LinkCard] Flex-start align arrow. (#3912)
* 💄 Flex-start align arrow in LinkCard

* 🐛 Center-align title when no description and footer is set

* 🔥 Removed redundant changesets since component is not yet released

* 📝 Modify story to show flex-start alignment of arrow
2025-06-25 13:26:35 +02:00
KenandHalvor Haugan 915317cb06 🎉 Added sticky-header for Table (#3893)
* 🎉 Added sticky-header for Table

* 🐛 Sync z-index

* Update .changeset/plain-ghosts-create.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/table/Table.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-25 13:26:23 +02:00
KenandHalvor Haugan b7d0120251 [Komponenter] Switch size small synced with radio and checkbox. (#3892)
* 🎉 Small switch now 20px high for darkside

* 💄 Dynamic loader-size based on checked and switch-size

* 💄 Small size switch for legacy css

* 📝 Changeset

* ⚰️ Add depcation-warning in stylelint-config

* 📝 Changeset

* 🐛 Loader-icon was not centered

* Update @navikt/aksel-stylelint/src/deprecations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update .changeset/hip-walls-itch.md

* Update .changeset/flat-numbers-kiss.md

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-25 12:49:21 +02:00
Ken 621c189a24 [Darkside website] Use new LinkCard-component in website (#3903)
* 🐛 LinkCard did not spread remaining props and classNames

* ✨ Use new LinkCard on frontpage

* ✨ LinkCard overview update

* ✨ Hero LinkCard

* ✨ Hero LinkCard

* ✨ GP page LinkCard

* ✨ Frontpage link-card

* 🔥 Deleted legacy card, use new LinkCard from ds-react

* ♻️ Re-added line-clamp feature
2025-06-25 12:27:12 +02:00
Ken d77cc40144 ✨ Allow disabling new themeswitch and Theme in examples (#3891)
* ✨ Allow disabling new theme switch and darkside for spesific stories

* 🐛 Change default-value to false

* 🐛 Make sure to force light-mode when showing legacy-stories
2025-06-25 10:19:09 +02:00
Halvor Haugan 6a74f79605 LinkCard.stories.tsx: Static image in Chromatic story (#3910) 2025-06-24 16:09:52 +02:00
Halvor Haugan fb93a1c342 [website] Rename "innhold" to "content" in ds_endringslogg_artikkel schema 2025-06-24 15:05:18 +02:00
Ken fe05898d5b 🔥 Removed global gitignore for d.ts-files (#3890) 2025-06-24 11:49:17 +02:00
dependabot[bot] 9d1771368a ⬆️ Bump pbkdf2 from 3.1.2 to 3.1.3 in the npm_and_yarn group (#3901)
Bumps the npm_and_yarn group with 1 update: [pbkdf2](https://github.com/crypto-browserify/pbkdf2).


Updates `pbkdf2` from 3.1.2 to 3.1.3
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/pbkdf2/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-24 11:47:19 +02:00
Ken a7a70ea5fd 🐛 LinkCard did not spread remaining props and classNames (#3902) 2025-06-24 11:42:37 +02:00
Ken 05fc8c1b2b [Website darkside] A11y review fixes (#3899)
* 💄 Update skiplink border-radius

* 📝 Shorten theme-switch text

* 📝 Labeled code-blocks

* 🐛 h2 -> span for overview card titles
2025-06-23 15:22:52 +02:00
Halvor Haugan b94db15f64 [website] 🔥 Remove unused prop showChangelogLink in TableOfContents.tsx 2025-06-23 12:40:05 +02:00
Ken 29716eba25 📝 Added descriptions to LinkCard examples 2025-06-23 12:14:54 +02:00
Halvor Haugan ca274bebb5 [website] Adjust examples of Table (#3896) 2025-06-23 10:38:37 +02:00
Ken 9ff6970432 💄 Add spacing around replications example 2025-06-23 10:23:14 +02:00
KenandHalvor Haugan 4916604973 [Components] LinkCard (#3883)
* ✨ LinkCard boilerplate

* ✨ Initial setup copying code over from website

* :WIP: Story update

* ⚡ Working mouseevent solution

* 🎉 Standalone card utilities

* 🚚 Moved LinkAnchor utility to separate file

* 💄 Add card css

* 💄 Grid-layout

* 🐛 visited text had wrong color

* 💄 Adjust animations

* 📝 Image sub-component docs

* 📝 LinkCard Stories

* 💄 Add support for data.colors

* 📝 Support chromatic-view

* 📝 Ajust story-example

* 🏷️ Export LinkCard component trough package.json

* 🏷️ Setup sub-component exports

* 🚚 Extract utils into util-dir

* 🚚 Extract LinkAnchor CSS

* ✨ Added LinkCard and LinkAnchor support for legacy

* 📝 Added LinkCard to CSS mappings

* ✨ Add size-prop to title and description

* 📝 Added stories for sizing-prop added to title and description

* ✨ Added size-support in Description

* 📝 Changeset

* ♻️ Update general sizing for type based on LinkCard size

* 📝 Adde uu-demo for testing

* 🐛 Resolve Modal-story bug

* ♻️ Re-write nested CSS in legacy to support postcss

* 📝 JSDoc

* 🐛 Add use-client

* 🎉 Implemented LinkCard Primitive

* ⚰️ Remove LinkCardPrimitive experiment

* 🎉 Compose onClick-events in Anchor util

* 🐛 Remove old stories

* 🏷️ Require href when not using asChild

* Update @navikt/core/react/src/link-card/LinkCard.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Code review cleanup

* 🚚 Move isTextSelected util

* [Examples] Linkcard examples (#3886)

* 📝 LinkCard example code

* ♻️ Avoid rendering arrow when hasArrow is false

* ♻️ Make user add their own img-tag in LinkCard

* 🐛 Allow image to define its own with do avoid CLS when loading

* 🐛 Legacy CSS for linkcard was not synced with darkside

* 📝 More examples

* 📝 Update examples

* 📝 Add example for umami-logging

* ♻️ hasArrow -> arrow

* ♻️ Clean up unused word wrapping css

* 🐛 Center icon when only title is used

* 📝 Added jsdoc directly on sub-components

* 🚚 Moved LinkPanel to deprecated status

* 📝 Added new stories to chromatic

* Update @navikt/core/css/link-card.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/css/link-card.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/css/darkside/link-card.darkside.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 En -> nb

* 🐛 Use static images to avoid false hits from chromatic

* ⏪ Undo current Link-card css changes

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-23 09:53:07 +02:00
github-actions[bot] 13b03b1b30 Version Packages (#3884)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-23 09:40:17 +02:00
Ken 15655f0664 [Darkside] Padding update round ? (#3864)
* 💄 Padding adjustments

* 💄 Padding adjustments v2

* 📝 Changeset

* 💄 Update formsummary-header padding
2025-06-20 10:57:40 +02:00
Ken 35cf26b934 🐛 Outline-tag had light on light text-color in forced-color mode (#3889) 2025-06-19 10:22:18 +02:00
Julian NymarkandKen 941f67f5da add ghep (#3887)
* add ghep

* silence dependabot

* Update .nais/teams.yaml

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-06-19 09:30:06 +02:00
Halvor Haugan 7ebc9e6240 LICENSE: NAV -> Nav 2025-06-18 12:14:58 +02:00
Halvor Haugan 1ab496960d [website] NAV -> Nav (#3888) 2025-06-18 12:02:12 +02:00
Julian Nymark 43f34b2b33 🎨 deno cleanup (#3875) 2025-06-18 09:09:31 +02:00
Halvor Haugan ad9328a577 Form components: Fix edge case where description container would take up space when empty (#3866) 2025-06-17 15:54:33 +02:00
github-actions[bot] 8a415ef153 Version Packages (#3874)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-17 15:37:50 +02:00
Julian Nymark f29eac85b4 add script to use turbo (#3876) 2025-06-16 15:41:37 +02:00
Halvor Haugan 872fe00444 [website] Fix layout issues in Timeline examples (#3880) 2025-06-16 15:07:15 +02:00
Halvor Haugan cd9078da6c Upgrade packages in /examples (#3877) 2025-06-16 15:04:28 +02:00
Halvor Haugan 32c1423715 Bump react-router til v7 (#3878) 2025-06-16 15:04:04 +02:00
Ken 5662b35ea2 🐛 Close Search and mobile-sidebar when navigating to new link. (#3863) 2025-06-16 12:28:06 +02:00
KenandHalvor Haugan 9345f4d88f [Aksel.nav.no] Sidebar design sync (#3855)
* 💄 Update sidebar design to match figma

* 💄 Add sparkles-icon to highlighted sidebar sections

* 💄 Add gap between sidebar-items

* 💄 Animated highlighted border

* 🐛 Data-color-role -> data-color

* 🐛 Avoid double shadow for highligted items

* 💄 Add hover-color effect

* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/sidebar/Sidebar.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Mobile-nav item was transparent, showing element behind when sticky

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-16 12:26:45 +02:00
Ken f0b05992b9 🐛 Use updated data-color concept for clearButton 2025-06-16 12:17:59 +02:00
KenandHalvor Haugan 64d980ef1c [Aksel.nav.no] Sidebar searchfield (#3854)
* 🎉 Added input filtering to sidebar

* 🐛 Clearbutton set to false now correctly avoids rendering button in Search for darkside

* 🎉 Respect section name in search

* 🐛 Remove autocomplete from sidebar-search

* Update .changeset/cyan-hoops-hope.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/sidebar/Sidebar.nav.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Optimize sidebar-update on slow devices

* ♻️ Extract ClearButton component

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-16 11:52:23 +02:00
github-actions[bot] 79af062908 Version Packages (#3810)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-16 11:39:33 +02:00
Ken 8b80437c85 📝 Removed non-working links for changeset 2025-06-16 11:06:06 +02:00
Ken a0fdfcad85 💄 Use static bg-color for outline-variant in Tag (#3865) 2025-06-16 10:24:00 +02:00
Halvor Haugan 5de464f6c5 [website] Adjust examples of Link and InternalHeader (#3868) 2025-06-16 10:18:32 +02:00
Ken eb251b8d92 [Aksel.nav.no] Overview sidebar icon (#3853)
* ✨ Added new icons SquareGrid

* 💄 Add overview-icon to menu-items
2025-06-16 09:35:36 +02:00
89717dbb96 [Aksel.nav.no] Root overview-page in sidebar (#3848)
* 🎉 Added root overivew-page for monster-maler

* 🎉 Added root-overview page to sidebar

* Update aksel.nav.no/website/app/dev/(designsystemet)/monster-maler/page.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/monster-maler/page.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🏷️ Updated types

* Update aksel.nav.no/website/app/dev/(designsystemet)/monster-maler/page.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-11 14:16:16 +02:00
Ken 5549cf6f7c 💄 More noticable link-styling for frontpage-hero 2025-06-10 20:47:57 +02:00
Ken 3f506754a2 ♻️ Removed reduntant wrapper 2025-06-10 20:35:48 +02:00
Ken 8730d7a7db 🐛 Avoid scrolling to last example when page includes multiple examples (#3852) 2025-06-10 12:17:32 +02:00
KenandHalvor Haugan 14c2490224 [Examples] Sliding window example for Timeline (#3847)
* :ai: Vibe-code periode status generation

* 📝 Document timeline example

* 📝 Add aria-controls to example

* 🎉 Example periods are more static now

* Update aksel.nav.no/website/pages/eksempler/timeline-intern/dynamic.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-10 12:17:05 +02:00
Halvor Haugan c8a96e7816 Fix issues caused by CSS transpilation, and use LightningCSS to build Storybook (#3850) 2025-06-10 11:19:13 +02:00
Ken 0932335a9e ✨ Added new icons SquareGrid (#3851) 2025-06-10 10:05:51 +02:00
Ken 3c01e1cada ✨ Change page-font when searching for spesific font (#3856) 2025-06-10 10:03:20 +02:00
Ken 3215cac4ad 🐛 Remove extra spacing caused by empty div for Card 2025-06-06 13:55:26 +02:00
Ken 6f98e50669 💄 Update frontpage-banner to sync with figma 2025-06-06 13:46:01 +02:00
Ken bb6b22f2f2 💄 Truncate linkcard-descriptions 2025-06-06 13:41:14 +02:00
fcf11110bb [Aksel darkside] forsiden (#3761)
* 🚧 initial conversion++

* Hero + color animation

* 🚧 infinitely loading?

* 🚧 loading 2/?

* ✨ GpFrontpageCard

* typing++

* regen query types

* disable turbopack

* animations work in dark & light, but if you toggle they get out of sync

* sync animations

* tone down the lines

* page + gpfrontpagecard

* move + use godPraksisPictogram

* 🚧 frontpageLatest

* convert the masonry stuff (wip)

* wip cards (masonry)

* wip cards (masonry)

* wip cards (masonry)

* mostly complete masonry

* cleanup

* tweak widths, better hierarchy with pageblock

* fix broken cube animation

* do not add stylelint rules in this PR

* bit of css insanity to block out the cube animation further down

* use LinkCard for latest news

* hero heading spacing and line height

* colors (gradient and cube) + heroText responsive size

* cube strokes respect pauseAnimation & mobile & responsive icons in gp

* working context state for pausing animations

* LinkCard usage++

* card transition animation fix

* use SEO image (opengraph)

* link fixes (use our Link with as={NextLink})

* design review fixes (#3816)

* minor gradient CSS tweak

* missing border-radius clip on gp og image

* Update Hero.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update Highlight.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update GpFrontpageCard.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update GpFrontpageCard.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update landingpage.module.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* PR comment fixes

* sync jsdom dep across workspaces

* ♻️ move and rename components to make more sense

* ♻️

* use non legacy Image + alt texts

* semantic html++ (li inside ul)

* LinkCard can be non-heading

* redundant screenreader info

* simplify shouldStopAnimation a fair bit

* useMemo

* copy cube to /dev/_ui/

* cleanup css

* remove unused CSS use globals.css data- attrib

* use hgrid

* add metadata/OG + minor css cleanup

* use existing LinkCardAnchor + tweak margin for it

* use Layout Component + rename variable

* update:sanity-schema

* improved typing

* type GpFrontpageCard

* redundant className

* LinkCard tweaks

* ♻️ broken file import + 🔥 comment

* better comment to explain hardcoded color values

* add missing type from query

* comments + og title

* fix highlighted cards alignment

* typing++

* 🚧 typing...

* good typing

* update query

* sort might fail if publishedAt is missing, but it should be

* typing++

* typing++

* 🐛 Div -> section for highlighted articles

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-06-06 13:33:09 +02:00
Ken 5917ab1a7e 🔍 Added RSS-link to root metadata (#3844) 2025-06-06 13:31:20 +02:00
77129e8b6f [Darkside] Dynamic color theming (#3849)
* 🎉 Allow data-color-role to override Button variant prop (#3805)

* :WIP: base-role theming for button

* 💄 Reorganize button styles in 'button.darkside.css' for clarity

* 📝 Changeset

* 📝 Pilot changeset

* 🔥 Removed duplicate CSS class

* Update .changeset/tricky-cobras-hide.md

* Update .changeset/tricky-cobras-hide.md

* 💄 Accent is now set as default base color theme (#3809)

* 💄 Accent is now set as default base color theme

* Update .changeset/plenty-areas-lick.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Better documentation

* Update .changeset/plenty-areas-lick.md

* Update @navikt/core/tokens/darkside/index.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [Darkside] Base theming components part 1 (#3812)

* 💄 Accent is now set as default base color theme

* 💄 Accordion base-theming

* Update .changeset/plenty-areas-lick.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Better documentation

* 🎉 Base theming for ActionMenu

* ♻️ Base-theming Alert

* ♻️ Base-theming Chat

* ♻️ Base-theming Chips

* ♻️ Base-theming Datepicker

* ♻️ Base-theming Dropdown

* ♻️ Base-theming ExpansionCard

* ♻️ Base-theming GuidePanel

* ♻️ Add color role stories to chromatic

* ♻️ Base-theming HelpText

* ♻️ Base-theming Link

* ♻️ Base-theming Loader

* ♻️ Base-theming Pagination

* ♻️ Base-theming ProgressBar

* ♻️ Base-theming ReadMore

* ♻️ Base-theming Stepper

* ♻️ Base-theming Table

* ♻️ Base-theming Table

* ♻️ Base-theming Tabs

* ♻️ Base-theming Timeline

* ♻️ Base-theming ToggleGroup

* ♻️ Base-theming Typo

* ♻️ Base-theming Checkbox

* ♻️ Base-theming Radio

* ♻️ Base-theming Chips and Combobox

* ♻️ Base-theming Button and FileUpload

* ♻️ Base-theming FormProgress and ProgressBar

* ♻️ Base-theming FormSummary

* ♻️ Base-theming Search and TextField

* ♻️ Base-theming Select

* ♻️ Base-theming Switch and Loader

* ♻️ Base-theming TextArea

* 📝 Text change to trigger visual regression tests

* 🐛 Hide internal fileuoload story

* ♻️ re-use internal chromatic story in fileupload

* 🐛 ToggleChips did not respect global color roles

* 🧪 Better stories for color-role in accordion

* 🧪 Better stories for color-role in Link

* ♻️ Remove color-role prop extraction in button to simplify logic

* ♻️ Re-use same logic for ignoring default variant if not needed across components

* ♻️ Improve logic so that local undefined data-color-role avoids resetting internal data-color-role

* [Darkside] Base theming components Part 2 (#3832)

* 🚚 Changed 'data-color-role' to 'data-color'

* 🐛 Manually declare color-attrb in loader to avoid missing type

* 🐛 Update all stories to use new data-color name

* [Darkside] Base theming components Part 3 (#3835)

* 🏷️ Use locally declared color-type for components

* 🏷️ Exposed theme type trough package exports

* :WIP: theme setup

* 🏷️ Simplified type overrides

* 📝 Use local color-theme overrides

* 🐛 Use bg-raised for neutral expansioncard

* 💄 More noticable hover-effect for switch

* 🐛 Avoid adding undefined CSS class to link

* Update @navikt/core/react/src/accordion/accordion.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Added color-roles story to togglegroup chromatic

* 📝 Rename colorRole to color in Theme context

* 📝 Adjust stories

* [Darkside] Base theming components part 4 (#3836)

* 🏷️ Rename darkside token type exports

* 🚚 rename from public types to just types

* 🚚 Move space px list to internal types

* ♻️ Rename and clean up external type-definitions

* 🏷️ Use new type-definitions and names in components

* ♻️ Resolve circular dependency when importing internal types

* 🏷️ Better naming for token-types

* Update @navikt/core/tokens/types.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Story cleanup after review

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Update changeset

* 📝 Update changeset

* 📝 Storybook changelog

* Update .storybook/docs/PilotsChangelog.mdx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Doc-updates

* Update .changeset/darkside-3.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-06 13:16:47 +02:00
KenandCopilot fad1e962e8 [Aksel.nav.no] Added "Rediger side" button to footer (#3845)
* 📝 Rename draftmode hook destructure

* 🎉 Added edit-page button in footer for easier edit-access

* Update aksel.nav.no/website/app/_ui/footer/Footer.edit.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-04 16:14:48 +02:00
Halvor Haugan fcb5858388 [website darkside] Fix example chips in preview mode by adding stegaClean 2025-06-04 11:55:44 +02:00
KenandHalvor Haugan d70d4c9840 ✨ Now auto-scrolls to examples when navigated to. (#3837)
* ✨ Now auto-scrolls to examples when navigated to

* ♻️ Always scroll, even when example was already selected

* Update aksel.nav.no/website/app/_ui/kode-eksempler/KodeEksempler.provider.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Avoid re-focusing example from side-effects

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-06-04 09:52:36 +02:00
Ken 4c00ffcf04 💄 Default to system-scheme for initial page-load (#3843) 2025-06-04 09:52:12 +02:00
Julian Nymark 81c246d33e 🐛 focus on many texts fail on contrast (#3846)
* 🐛 focus on many texts fail on contrast

* use focus-visible
2025-06-04 09:51:06 +02:00
Ken ee5598bdb4 🐛 Avoid resize-handle going out of bounds in code-examples 2025-06-03 13:54:23 +02:00
dependabot[bot] 7e822303ac ⬆️ Bump the npm_and_yarn group with 2 updates (#3842)
Bumps the npm_and_yarn group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [tar-fs](https://github.com/mafintosh/tar-fs).


Updates `esbuild` from 0.25.4 to 0.25.5
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.4...v0.25.5)

Updates `tar-fs` from 2.1.2 to 2.1.3
- [Commits](https://github.com/mafintosh/tar-fs/commits)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.5
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: tar-fs
  dependency-version: 2.1.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 11:49:16 +02:00
dependabot[bot] efe467dced ⬆️ Bump browserslist from 4.24.5 to 4.25.0 (#3839)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.24.5 to 4.25.0.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.24.5...4.25.0)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.25.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 11:41:49 +02:00
dependabot[bot]andKen 8d7e8d0182 ⬆️ Bump react-day-picker from 9.6.1 to 9.7.0 (#3820)
* ⬆️ Bump react-day-picker from 9.6.1 to 9.7.0

Bumps [react-day-picker](https://github.com/gpbl/react-day-picker) from 9.6.1 to 9.7.0.
- [Release notes](https://github.com/gpbl/react-day-picker/releases)
- [Changelog](https://github.com/gpbl/react-day-picker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gpbl/react-day-picker/compare/v9.6.1...v9.7.0)

---
updated-dependencies:
- dependency-name: react-day-picker
  dependency-version: 9.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 📝 Changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-06-03 11:31:57 +02:00
Halvor Haugan b242700ec1 [Aksel darkside] Designsystemet: Adjust inline padding on mobile (#3841) 2025-06-03 10:12:20 +02:00
Ken 0e99e7bb5f 💄 More spacing between Heading and Ingress for god-praksis articles 2025-05-28 14:22:12 +02:00
Halvor Haugan 9bec9a45c1 [website] Adjustments in various examples (#3833) 2025-05-28 11:50:58 +02:00
Ken cd7f03ef40 [Tokens] Hide temp radius tokens from docs, add strong to markdown-parser (#3815)
* ♻️ Added feature to hide induvidual tokens from token-documentations by config

* 🎉 Added strong/bold-text support in custom markdown parser
2025-05-28 11:48:21 +02:00
Ken de9afbd6c6 ♿ Removed aria-haspopup from Timeline for improved SR experience (#3834) 2025-05-27 15:20:31 +02:00
Ken 6666e8cd25 🐛 Use default focus-shadow in hero-banner 2025-05-27 12:33:48 +02:00
Ken 13353f032c 💄 Update hero-banner with transparent bg 2025-05-27 12:32:34 +02:00
Halvor Haugan ddef199700 Skip Endringslogg when running Axe (#3830) 2025-05-27 11:34:35 +02:00
dependabot[bot]andKen bba2a486c4 ⬆️ Bump @figma/rest-api-spec from 0.19.0 to 0.30.0 (#3822)
* ⬆️ Bump @figma/rest-api-spec from 0.19.0 to 0.30.0

Bumps [@figma/rest-api-spec](https://github.com/figma/rest-api-spec) from 0.19.0 to 0.30.0.
- [Commits](https://github.com/figma/rest-api-spec/commits)

---
updated-dependencies:
- dependency-name: "@figma/rest-api-spec"
  dependency-version: 0.30.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Use non-deprecated types

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-05-27 10:32:11 +02:00
Halvor Haugan 5c8af30209 Adjust form validation pattern examples (#3829) 2025-05-27 10:22:15 +02:00
Ken 03395ae8a1 🐛 Reverted regression that lead to 'aria-controls' being ignored (#3828)
* 🐛 Reverted regression that lead to 'aria-controls' being ignored when passed to Pin or Period.

* 🐛 Add role='dialog' to timeline popover
2025-05-27 10:01:07 +02:00
Ken 6b4813fb74 🏷️ Fix type-errors in PropSeksjon 2025-05-27 10:00:11 +02:00
Ken 14978c1bf9 🐛 Avoid double quotes in prop-table default value 2025-05-26 16:24:13 +02:00
Ken 859d4c309d 📝 Prepare redirects for designsystemet routing update 2025-05-26 16:20:52 +02:00
Halvor Haugan 885f1eb75b Sync jsdom versions (#3825) 2025-05-26 14:27:51 +02:00
Sjur ec814f3387 Update global.tokens.ts (#3826)
-  Justerte kontrast på fargen 600 (4.51:1 i Leonardo), noen farger er endret.
-  La inne MetaPurple i DS Leonardo-fil. Det førte til små justeringer av fargene.
2025-05-26 13:10:52 +02:00
Halvor Haugan fd6176c3bf [website] Script for creating a doc per version in changelog (#3811) 2025-05-26 11:56:50 +02:00
KenandCopilot 10aa9710d9 💄 ErrorSummary heading is now size 'xsmall' on smaller sizes (#3806)
* 💄 ErrorSummary heading is now size 'xsmall' on smaller sizes

* Update .changeset/grumpy-melons-grab.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-21 14:43:31 +02:00
Halvor Haugan fc332df41e [website] Add field for alt text on ds_endringslogg_artikkel (#3814) 2025-05-21 11:59:18 +02:00
Halvor Haugan bc00c89801 Upgrade transitive dependencies (#3813) 2025-05-20 14:32:27 +02:00
Ken 9f5beaa042 🐛 Avoid sharp-corner borders overlapping outside border 2025-05-19 15:25:21 +02:00
Ken 07314ee30f [Appdir] 🎉 Allow for unique hardcoded pages to appear in global search (#3791)
* 🎉 Allow for unique hardcoded pages to appear in global search

* 🐛 Code cleanup

* 📝 Use page metadata for search metadata in routing config

* 🐛 Resolve null-check type error
2025-05-19 15:14:17 +02:00
Ken 14d606f5b6 💄 Removed uppdercase from GP-article eyebrow 2025-05-19 14:51:16 +02:00
Ken d6a1ae66f3 🐛 Limit headings to data-text-prose from CMS.
🐛 Limit headings to data-text-prose from DS-pages

🐛 Use BodyLong for GP intro text

🐛 Code-typo now scales with font-size
2025-05-19 14:46:16 +02:00
Ken 988e4472cd 🎉 Allow data-color-role to override Tag variant prop. (#3795)
* 🎉 Allow data-color-role to override Tag variant prop.

* 🚚 Move color-definition to Tag props internals, requiring explisit use of data-color-role for re-coloring

* ♻️ Simplified Tag.darkside.css to reflect future coloring syntax

* 🐛 Fix forced-color 'color'-hierarcy

* 📝 Update changeset
2025-05-19 14:29:14 +02:00
github-actions[bot] bbc44541d7 Version Packages (#3794)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-19 14:20:54 +02:00
Halvor Haugan a252f879e1 Fix Storybook warning about addon order (#3808) 2025-05-19 14:16:05 +02:00
dependabot[bot]andKen ccf0c20d33 ⬆️ Bump vite from 5.4.19 to 6.1.6 in the npm_and_yarn group (#3807)
* ⬆️ Bump vite from 5.4.19 to 6.1.6 in the npm_and_yarn group

Bumps the npm_and_yarn group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.19 to 6.1.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.1.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.1.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.1.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* ♻️ Sync vite v6 across repository

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-05-19 12:53:26 +02:00
dependabot[bot]andKen e1370102bb ⬆️ Bump the npm_and_yarn group with 5 updates (#3793)
Bumps the npm_and_yarn group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.18` | `5.4.19` |
| [axios](https://github.com/axios/axios) | `1.8.4` | `1.9.0` |
| [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) | `2.0.7` | `2.0.9` |
| [tar-fs](https://github.com/mafintosh/tar-fs) | `2.1.1` | `2.1.2` |
| [undici](https://github.com/nodejs/undici) | `5.28.5` | `5.29.0` |


Updates `vite` from 5.4.18 to 5.4.19
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.19/packages/vite)

Updates `axios` from 1.8.4 to 1.9.0
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.8.4...v1.9.0)

Updates `http-proxy-middleware` from 2.0.7 to 2.0.9
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)

Updates `tar-fs` from 2.1.1 to 2.1.2
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.2)

Updates `undici` from 5.28.5 to 5.29.0
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.19
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: axios
  dependency-version: 1.9.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: http-proxy-middleware
  dependency-version: 2.0.9
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar-fs
  dependency-version: 2.1.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-05-19 12:44:48 +02:00
dependabot[bot]andKen 50bd475f25 ⬆️ Bump the npm_and_yarn group across 4 directories with 2 updates (#3792)
* ⬆️ Bump the npm_and_yarn group across 4 directories with 2 updates

Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /examples/next-appdir directory: [next](https://github.com/vercel/next.js).
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.15 to 5.4.19
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.19/packages/vite)

Updates `next` from 15.2.3 to 15.2.4
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.2.3...v15.2.4)

Updates `vite` from 5.4.15 to 5.4.19
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.19/packages/vite)

Updates `vite` from 5.4.15 to 5.4.19
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.19/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 5.4.19
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: next
  dependency-version: 15.2.4
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 5.4.19
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 5.4.19
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* ♻️ Sync yarn lock and package versions across workspace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-05-19 12:43:01 +02:00
Halvor Haugan 6578f5d2dd [website] Add schema for changelog entries (#3796) 2025-05-19 12:35:34 +02:00
dependabot[bot] 349f184368 ⬆️ Bump the storybook group with 16 updates (#3802)
Bumps the storybook group with 16 updates:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `8.6.12` | `8.6.14` |
| [@storybook/addon-essentials](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/essentials) | `8.6.12` | `8.6.14` |
| [@storybook/addon-interactions](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/interactions) | `8.6.12` | `8.6.14` |
| [@storybook/addon-storysource](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/storysource) | `8.6.12` | `8.6.14` |
| [@storybook/addon-themes](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/themes) | `8.6.12` | `8.6.14` |
| [@storybook/blocks](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/blocks) | `8.6.12` | `8.6.14` |
| [@storybook/csf-tools](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/csf-tools) | `8.6.12` | `8.6.14` |
| [@storybook/manager-api](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/manager-api) | `8.6.12` | `8.6.14` |
| [@storybook/nextjs](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/nextjs) | `8.6.12` | `8.6.14` |
| [@storybook/react](https://github.com/storybookjs/storybook/tree/HEAD/code/renderers/react) | `8.6.12` | `8.6.14` |
| [@storybook/react-vite](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-vite) | `8.6.12` | `8.6.14` |
| [@storybook/test](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/test) | `8.6.12` | `8.6.14` |
| [@storybook/theming](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/theming) | `8.6.12` | `8.6.14` |
| [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) | `0.9.0` | `0.12.0` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/cli) | `8.6.12` | `8.6.14` |
| [storybook-addon-pseudo-states](https://github.com/chromaui/storybook-addon-pseudo-states) | `4.0.3` | `4.0.4` |


Updates `@storybook/addon-a11y` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/addons/a11y)

Updates `@storybook/addon-essentials` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v8.6.14/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/addons/essentials)

Updates `@storybook/addon-interactions` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v8.6.14/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/addons/interactions)

Updates `@storybook/addon-storysource` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v8.6.14/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/addons/storysource)

Updates `@storybook/addon-themes` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/addons/themes)

Updates `@storybook/blocks` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v8.6.14/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/lib/blocks)

Updates `@storybook/csf-tools` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/lib/csf-tools)

Updates `@storybook/manager-api` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/lib/manager-api)

Updates `@storybook/nextjs` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/frameworks/nextjs)

Updates `@storybook/react` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/renderers/react)

Updates `@storybook/react-vite` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/frameworks/react-vite)

Updates `@storybook/test` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v8.6.14/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/lib/test)

Updates `@storybook/theming` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/lib/theming)

Updates `eslint-plugin-storybook` from 0.9.0 to 0.12.0
- [Release notes](https://github.com/storybookjs/eslint-plugin-storybook/releases)
- [Changelog](https://github.com/storybookjs/eslint-plugin-storybook/blob/main/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/eslint-plugin-storybook/compare/v0.9.0...v0.12.0)

Updates `storybook` from 8.6.12 to 8.6.14
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/v8.6.14/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v8.6.14/code/lib/cli)

Updates `storybook-addon-pseudo-states` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/chromaui/storybook-addon-pseudo-states/releases)
- [Changelog](https://github.com/storybookjs/storybook-addon-pseudo-states/blob/v4.0.4/CHANGELOG.md)
- [Commits](https://github.com/chromaui/storybook-addon-pseudo-states/compare/v4.0.3...v4.0.4)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-essentials"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-interactions"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-storysource"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/addon-themes"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/blocks"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/csf-tools"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/manager-api"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/nextjs"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/react"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/react-vite"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/test"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: "@storybook/theming"
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: eslint-plugin-storybook
  dependency-version: 0.12.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 8.6.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
- dependency-name: storybook-addon-pseudo-states
  dependency-version: 4.0.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 11:53:03 +02:00
dependabot[bot] 846df9e93e ⬆️ Bump browserslist from 4.24.4 to 4.24.5 (#3797)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.24.4 to 4.24.5.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.24.4...4.24.5)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.24.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 11:51:00 +02:00
dependabot[bot] b794101d4f ⬆️ Bump vite-plugin-singlefile from 1.0.0 to 2.2.0 (#3803)
Bumps [vite-plugin-singlefile](https://github.com/richardtallent/vite-plugin-singlefile) from 1.0.0 to 2.2.0.
- [Release notes](https://github.com/richardtallent/vite-plugin-singlefile/releases)
- [Changelog](https://github.com/richardtallent/vite-plugin-singlefile/blob/main/CHANGELOG.md)
- [Commits](https://github.com/richardtallent/vite-plugin-singlefile/commits)

---
updated-dependencies:
- dependency-name: vite-plugin-singlefile
  dependency-version: 2.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 11:50:12 +02:00
dependabot[bot]andKen 3f71ade9ad ⬆️ Bump color from 4.2.3 to 5.0.0 (#3798)
* ⬆️ Bump color from 4.2.3 to 5.0.0

Bumps [color](https://github.com/Qix-/color) from 4.2.3 to 5.0.0.
- [Release notes](https://github.com/Qix-/color/releases)
- [Commits](https://github.com/Qix-/color/compare/4.2.3...5.0.0)

---
updated-dependencies:
- dependency-name: color
  dependency-version: 5.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🔥 Removed unused color depdendency

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-05-19 11:48:01 +02:00
Ken 67c6d88372 🐛 Updated and published Icon-plugin for Figma 2025-05-19 11:44:28 +02:00
Halvor Haugan 17437d4007 Add some groups to dependabot config (#3801) 2025-05-19 09:35:29 +02:00
Ken 84b8d1612a 🐛 Avoid overriding button-styles on website 2025-05-19 09:20:21 +02:00
Ken fe2feb9888 🐛 Avoid overriding link-styles for pages-router 2025-05-16 14:10:30 +02:00
Halvor Haugan 635277b657 Typos in changesets 2025-05-16 09:27:02 +02:00
Ken 1619b52008 [Darkside] Radius and text-icon token update (#3784)
* 🎉 Rename border-radius tokens to radius with number-naming

* 🔥 Remove border-radius token from darkside tailwind config

* 🚚 Rename border-radius tokens

* 🏷️ Text-icon renamed to text-decoration

* ♻️ Update auto-migration to new decoration token

* ♻️ Migrate text-icon -> text-decoration in components

* ♻️ Allow migrating to default tailwind rounded-tag from legacy aksel-token

* 🔥 Removed throw error for using legacy border-radius token i box

* 📝 Update types to allow for legacy and updated border-radius

* ♻️ Allow for use of both legacy and updated radius token in box

* ♻️ Updated Box-migration to support space-delimited prop-values

* 📝 Changeset

* 📝 Darkside changelog

* 🐛 Add missing manual token-docs

* 🐛 Resolve not updated import after radius filename change

* Delete .changeset/big-goats-report-5.md

* ✨ Support space-separated radius tokens in primitives migration

* ♻️ Temp support legacy radius toke for darkside system
2025-05-15 19:47:20 +02:00
Ken 9018f85dbc 🚚 Update icons to handle updated fill-color from Figma. (#3790)
* ♻️ Rename new icon-color to currentColor

* 🚚 Update icons to handle updated fill-color from Figma.
2025-05-15 19:45:26 +02:00
KenandCopilot 3de59ff1d4 📝 Deprecate ConfirmationPanel (#3789)
* 📝 Deprecate ConfirmationPanel

* Update .changeset/chatty-things-yawn.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-15 19:40:44 +02:00
Ken baebfcea56 [Appdir] Adds theme-switcher with Select in code-examples (#3787)
* ✨ Add theming-switch for legacy and darkside themes

* 🎉 Adds theme-switch to code-examples

* Update aksel.nav.no/website/components/website-modules/examples/withDsExample.theme.tsx

* Update aksel.nav.no/website/components/website-modules/examples/withDsExample.theme.tsx

* 📝 Adde new cookie to docs

* 📝 Oppdatert select-tekster for theme-switch

* 🔥 Removed testcode

* 📝 Update personvernnserklæring with theming info
2025-05-15 19:22:21 +02:00
Ken 4bed5a8a59 [Appdir] Sitemap for new setup (#3779)
* :WIP: Sitemap

* Move manual page mapping

* 🎉 use global routing config for sidebar generation

* 🔥 Remove darkside styling from `Sidebar.group.tsx` and `Sidebar.module.css`

* ✨ Add unique/hardcoded pages to sitmap

* 🔥 Removed commented code

* 🐛 Stricter typing with 'as const' broke typechecking
2025-05-15 15:05:36 +02:00
Ken 76e325aa6c [Appdir] Thumbnail recoloring (#3776)
* ✨ Introduce ImageAsThemedSvg for SVG handling in ImageAsSvg.tsx

* 💄 Update background color for dark mode in DesignsystemetOverview.module.css

* 🎉 Use 'themed' thumbnails for ds-pages

* 💄 Change background color to var(--ax-bg-neutral-soft) in DesignsystemetOverview.module.css

* 💄 Move tag to top of overview-card

* 📝 yarn lock sync

* 💄 Tone down overview thumbnail preview

* 🔥 Remove arrow from overview cards

* ♻️ Show arrow on LinkCard
2025-05-15 14:47:40 +02:00
Ken ff3ee5e087 [Sanity] Sanity presentation mode (dev only) (#3772)
* ✨ Introduce `Studio` component in `Studio.tsx` and `page.tsx` for admin interface

* ♻️ Move Admin and tooling to app-router.

* 🔥 Remove `[[...index]].js` from `legacy-admin` directory

* ♻️ Update sanity to v3.86.1

* 🐛 Setup non-working presentation-mode for sanity

* ✨ Update resolver

* 🎉 Added iframe support for preview in tandem with presentation-mode

* ✨ Integrate `stegaClean` in multiple components for consistent data handling

* 🎉 Render exit draft button

* ✨ Allow for better admin controls and preview

* 🔒 Upgrade insecure requests in production-builds

* 🐛 Update next-sanity to resolve SanityClient type mismatch

* 🐛 Update sanity to 3.87 to fix mismatching sanityclient types

* 🐛 Clean iframe URL to avoid using encoded data, causing errors since url is to long

* ♻️ Use server actions to disable preview mode to stay on page after reload

* 🔥 Remove unused lint-command
2025-05-15 14:40:37 +02:00
Halvor Haugan 8235e8424d Add repository.directory in package.json for ds-react and ds-css (#3786) 2025-05-13 13:30:05 +02:00
Ken 201e96cf06 Biome cleanup (#3770)
* ♻️ Refactor `syncPosition` to use `useCallback` in `CompareImagesProvider`

* ♻️ Refactor dependencies in `GlobalSearchProvider` effect and debounce function

* ♻️ Refactor exports to use type syntax in multiple components

* ♻️ Refactor `articlesMap` access in `page.tsx` to use dot notation

* 🐛 Ignore autogenerated sanity types

* ♻️ Refactor selectedRange rendering in `input-range.tsx`, `input-single.tsx`, and `two-digit-year.tsx`

* ♻️ Refactor `updateConsent` to use `useCallback` in `CookieProvider.tsx`

* 🩹 Ignore lint warning for assignment in expressions

* ♻️ Avoid variable re-assignent in while-loops
2025-05-12 13:25:33 +02:00
dependabot[bot] 4a6ccbed90 ⬆️ Bump stylelint from 16.15.0 to 16.19.1 (#3781)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.15.0 to 16.19.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.15.0...16.19.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.19.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-12 13:25:12 +02:00
dependabot[bot] f041ec859c ⬆️ Bump tsc-alias from 1.8.8 to 1.8.16 (#3783)
Bumps [tsc-alias](https://github.com/justkey007/tsc-alias) from 1.8.8 to 1.8.16.
- [Release notes](https://github.com/justkey007/tsc-alias/releases)
- [Commits](https://github.com/justkey007/tsc-alias/compare/v1.8.8...v1.8.16)

---
updated-dependencies:
- dependency-name: tsc-alias
  dependency-version: 1.8.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-12 13:22:58 +02:00
dependabot[bot] 152c99c1c2 ⬆️ Bump esbuild from 0.25.2 to 0.25.4 (#3782)
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.2 to 0.25.4.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.2...v0.25.4)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-12 13:21:29 +02:00
Ken 193aaf54f5 Typescript 5.8.3 update (#3771)
* ⬆️ Upgrade typescript minor

* ⬆️ Upgrade typescript minor

* ⬆️ Update Tyepscript to 5.8.3

* 🐛 Resolve ts-update lint issues
2025-05-08 13:13:56 +02:00
Ken d7d7665416 🔒 Remove admin dev from robots.txt 2025-05-07 15:18:45 +02:00
a6db68aa86 Tokens page (#3747)
* Init new tokens page

* Add token display for (most of) color tokens. Still need a real display example for opaque++.

* Add TableOfContents

* Improve category handling of tokens and add space, radius and shadow

Less reduce and format category on backend

* Fix shadow token example

* Re-introduce role filtering

* Custom sorting for different token types

* Added placeholder comments with text "TODO: Sjur fyller ut" for all (hopefully?) tokens

* Sort token categories

* Add breakpoint tokens

* Make comments a bit smaller in line with the design

* Add font tokens

* Simplify token example code (DRY-principle)

* Remove fallback-comment and add a small gap between token name + rawValue and the comment

* Do not show rawValue for color tokens, as we do not want to encourage using them directly

* Fix issue where we could potentially return undefined from sorting function

* Add breakpoint groups for easily selecting mobile or desktop first media queries

* Simplify how we generate the display value for breakpoint tokens

* Ignore global-color and opacity tokens when generating token config. These will not be displayed on the webpage.

* Fix ToC import after change from main

* Move Tokens toolbar/filter/search to /components

* Add naive token search

* Extract Color token example

* Extract Shadow token example

* Extract Breakpoint token example

* Extract Radius token example

* Extract Space token example

* Extract Font token example

* Refactor TokenExample wrappers

* Extract TokenPreview

* Extract token categories config

* Extract TokenEntry - the presentation of an individual token

* Extract TokenCategory - a collection of of tokens, like background color, radius og font tokens

* Move function for sorting tokens to a util-file

* Don't add Chips wrapper if the category has no roles

* Extract chips for selecting roles

* [Token-docs] Static semantic colors with comments (#3661)

* ✨ Config to create files

* ✨ Config to create files

* ✨ Add semantic role token configurations for info, accent, and danger colors

* 🔧 Refactor semantic role token configuration for consistency

* Add config for token roles and categories. This eliminates the need for some sorting and prettifying of text for titles

* Beskrivelse av tokens på config.ts (#3692)

* Show role descriptions and accept markdown in descriptions for categories, roles and tokens

* This link shouldn't have been pushed

* Tokenbeskrivelse til tokens i mappa /semantic-roles (#3700)

* Update meta-lime.tokens.ts

* Tokenbeskrivelse for accent, brand-beige, brand-blue, brand-magenta og danger.

* Tokenbeskrivelse til info, meta-purple, neutral, success og warning.

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/warning.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/accent.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-beige.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/neutral.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-magenta.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-magenta.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/brand-blue.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/danger.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/success.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/meta-purple.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/meta-lime.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/accent.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/tokens/colors/semantic-roles/info.tokens.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Migrate new tokens page to app router. Changed border and background colors without checking much, so may need to go through those later. Layout is also a bit messed up.

* Add ToC on tokens page

* Layout fixes

* Show "Send feedback" button

* Rename tokens-page.tsx -> TokensPage.tsx

* Use proper type for tokens on TokenPage

* Move search query to url params to allow for use on server side rendered page

* Improve token search by using Fuse

* Filter TableOfContents based on search results

* Add background for opaque tokens. Kinda weak determination that the token is opaque, so that may have to be improved.

* Update tokens to use new darkside tokens as appdir uses this CSS

* Remove default color presentation. Rather log the unknown category for debugging purposes.

* Add functionality for switching between JS and CSS tokens

* Align CopyButton better with text

* Fix search onSubmit, so it does not clear the input

* Use simple Search variant

* Hard-code page header for non-Sanity token-page

* Move darkside tokens page to correct slug (grunnleggende/styling/tokens-darkside) and include it in the left-hand menu

* Filter token roles chips based on search results, so we don't show chips for the roles that has no results

* Token search should ignore where in the results the hits are located, as there are no long texts. A hit is a hit!

* Change multiple instances of Record to just add an "id" property to the objects and place them in an array for easier interaction in the code

* Filter out placeholder token comments and remove placeholder category descriptions

* Move filtering out of the render function

* Add subheadings for roles, and move descriptions to under the subheadings. Also remove chips if there are only one.

* Adjust spacing for tokens list (distance between heading + description vs those and the following list)

* Update aksel.nav.no/website/components/token-docs/token/example/TokenEntry.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/components/token-docs/token/example/TokenEntry.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Added comments to semantic-root.tokens.ts

* We omit comments for radius, breakpoint, font and space tokens, so comment needs to be optional

* Clarify shadow token use in comment

* Add EmptyStateCard when no tokens are shown

* Vertically center TokenPreview

* Fine-tune search thresholds to provide better results for typos

* Properly define a "root" role for unique tokens and show heading and description. The actual name may be changed later.

* Add support for LESS and SASS tokens as well

* Formatting (line-length)

* Stop setting selected role automatically if filtering causes only one role to be shown. We now remove the chips in this case and always show a heading and description instead.

* Remove "mobile first"/"desktop first" from displayed breakpoint token value, because it hinders copying the text. The same need is covered by the new role heading instead.

* Fix copy-pasted label for TokenFormatSelector

* Refine spacing in line with new Figma sketches to better group content

* Remove "Stabil" tag and "Last updated" text because they do not make sense here. They always apply to the latest version, and then we might have to document outdated tokens somewhere.

* Clean up tokens-darkside page.tsx: remove unnecessary generateStaticParams() and remove awaiting unused params

* Move type into token-docs folder as it is only used there

* Proper typography for token comment

* Reset selected role when searching

* Use static metadata for tokens page, as we don't have any sanity data/parent to receive data from

* Move new tokens page to the "darkside" category

* Remove TODO in description of Meta Purple

* Make Token role Chips neutral to not steal too much attention

* Fix issue where selecting a chip was reverted after half a second, so changed the useEffect to only react to the actual changed search query instead

* Fixed missing gap in mobile view

* Fix bug where changing to another format and back to CSS caused the token name to disappear

* Proper "eyebrow" above page heading (Changed styling -> grunnleggende and color)

* Co-locate tokens page components in app dir

* Use correct heading color for H1

* Update to new darkside tokens

* No longer used

* Add the vk-error class to fallback examples for tokens (where category, group, etc. is unknown) and log a warning in the console

* Add a name to the tokens role chips list, so we inform the user about what they filter

* Disable autocomplete, like for other search fields on the website (main- and icon search)

* Add the correct gap between categories

* Do not use heading tags for token examples to avoid messing with accessibility

* Translate category titles

* Fine-tune search weighting. Still needs more adjustments - likely sorting results, as a "similar result" can now appear before a direct result.

E.g. "avstand" -> Background colors with "standard" in a comment appears before the "Avstand" category tokens.

* Adjust scroll margin so search field is not shown for top category

* Hide token preview from assistive technology

* Add links to Slack and GitHub to "no tokens" block

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Sjur <82579704+sjur-gr@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-07 14:37:11 +02:00
Ken d5ca617a3b [Appdir] Support "top-level"-pages (#3757)
* 🎉 Support top level articles for designsystem-pages

* ♻️ Update slug handling, staticParams and metadata for overview-pages
2025-05-06 19:48:37 +02:00
Ken a623486b1f 🐛 Umami event racking added onClick handlers to server-components. Now has use client added where needed 2025-05-06 14:03:43 +02:00
KenandCopilot a1fb6f51e0 [Umami] Migrate from data-attrb based tracking to onClick (#3764)
* 🎉 Added umamiTrack function

* 🚚 Use new umamiTrack function to do manual tracking

* 🚚 Use manual umami tracking onClick for links and logging

* 🏷️ Stronger typing

* 🚚 Manually track URL for navigation events

* 🐛 Use empty object in non-descriptive umamiTrack events

* ⚡ Re-enable Umami

* Update aksel.nav.no/website/app/_ui/umami/Umami.log.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📈 Track navigation events in `GpChip` and simplify URL handling in `page`

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-06 12:53:18 +02:00
github-actions[bot] 411ecd37c6 Version Packages (#3769)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-06 10:29:44 +02:00
Ken 2da8707a21 🐛 Omit onToggle from ExpansionCard types to avoid overlapping with new Popover API. (#3773) 2025-05-06 10:20:53 +02:00
dependabot[bot]andKen 39caf0bd12 ⬆️ Bump @floating-ui/react from 0.25.4 to 0.27.8 (#3768)
* ⬆️ Bump @floating-ui/react from 0.25.4 to 0.27.8

Bumps [@floating-ui/react](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/react) from 0.25.4 to 0.27.8.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/react/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/react@0.27.8/packages/react)

---
updated-dependencies:
- dependency-name: "@floating-ui/react"
  dependency-version: 0.27.8
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Add focus markings to popover dialogs

* 🐛 Remove placeholder tabindex

* 📝 Changeset

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-05-05 10:07:17 +02:00
dependabot[bot] 0710dda8a6 ⬆️ Bump @biomejs/biome from 1.9.3 to 1.9.4 (#3765)
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG_v1.md)
- [Commits](https://github.com/biomejs/biome/commits/cli/v1.9.4/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 1.9.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-05 09:34:04 +02:00
dependabot[bot] b99286c71b ⬆️ Bump eslint-plugin-react from 7.37.1 to 7.37.5 (#3766)
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.37.1 to 7.37.5.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.37.1...v7.37.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-version: 7.37.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-05 09:32:50 +02:00
Ken f619c16362 💄 Adjust Do-dont panel 2025-05-05 09:23:46 +02:00
Ken 578a5729db 🔥 Disable Umami tracking in Umami.tsx 2025-04-30 12:15:21 +02:00
Ken b4775ba2d7 [App router] Admin route (sanity) migrated (#3754)
* ✨ Introduce `Studio` component in `Studio.tsx` and `page.tsx` for admin interface

* ♻️ Move Admin and tooling to app-router.

* 🔥 Remove `[[...index]].js` from `legacy-admin` directory

* Update aksel.nav.no/website/app/(admin)/admin/[[...index]]/Studio.tsx

* Update aksel.nav.no/website/app/(admin)/admin/[[...index]]/page.tsx
2025-04-30 11:51:17 +02:00
Ken 5c1c4188b3 ✨ Update Standalone, prinsipper and error/404 pages (#3753) 2025-04-30 11:43:41 +02:00
Ken 6e48d8cc60 ⬆️ Upgrade next from 15.2.3 to 15.3.1 in (#3759)
* ⬆️ Upgrade `next` from 15.2.3 to 15.3.1 in `package.json` and `yarn.lock`

* 📝 yarn lock sync
2025-04-30 11:42:11 +02:00
Ken 387c6a5004 Migrate to '@storybook/nextjs' and storybook 8.6 (#3758)
* Migrate to '@storybook/nextjs' and storybook 8.6

* 🔧 Add lodash types
2025-04-30 11:40:50 +02:00
github-actions[bot] 4ac8d81f63 Version Packages (#3741)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-30 09:20:50 +02:00
0404c4f156 [Aksel nettsiden] Produktbloggen landingsside (#3745)
* 🚧 scaffold for produktbloggen

* 🚧 query quirks

* 🚧 now renders sanity content

* 🚧 wip++

* css tw -> modules

* convert tw classes to modules

* better naming + use more tokens

* gitignore++

* purer css selectors (for modules)

* 🐛 Use correct body-component

* fixes for sanityContentBlock

* 🐛 Add spacing to list-block

* remove final unnecessary css override for produktbloggen

* Update aksel.nav.no/website/app/dev/produktbloggen/[...slug]/page.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/slug.ts

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/produktbloggen/[...slug]/page.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/produktbloggen/_ui/Produktbloggen.module.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/produktbloggen/layout.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* pr fixes + merge main in

* add import for Page + remove box-shadow

* remove unneeded margin (due to margin collapse) + 🔥 relatives

* uppercase prop redundancy

* diamond CSS tweaks

* 🔥 superflous CSS

* header variant > className

* adjust z-index

* initial conversion

* generateMetadata()

* Update aksel.nav.no/website/app/dev/(designsystemet)/slug.ts

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* use less custom CSS, update NextImage props

* 🔥 remove unused CSS

* generateStaticParams()

* move <main> to layout

* use <PageBlock> over custom CSS

* 🎨 small design tweaks

* box-shadow on top of image

* 🚧 from tw2cssmodules

* convert HighlightedBlogg

* use show & hide

* 🐛 add missing article render on md

* image radius & box-shadow

* simplify CSS

* generateMetadata()

* simplify CSS

* urlForImage > urlFor

* inline LatestBloggPosts

* Update aksel.nav.no/website/app/dev/produktbloggen/_ui/Produktbloggen.module.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Link fixes

* desanity simple things

* split/optimize queries

* update schema

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-04-30 09:18:01 +02:00
Julian Nymark 3a6da2564d make "hopp til innhold" disappear when not focused (#3760) 2025-04-29 14:37:24 +02:00
dependabot[bot]andKen 91955f5049 ⬆️ Bump the npm_and_yarn group with 3 updates (#3705)
* ⬆️ Bump the npm_and_yarn group with 3 updates

Bumps the npm_and_yarn group with 3 updates: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite), [esbuild](https://github.com/evanw/esbuild) and [axios](https://github.com/axios/axios).


Updates `vite` from 5.4.15 to 6.0.12
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.12/packages/vite)

Updates `esbuild` from 0.25.0 to 0.25.1
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.0...v0.25.1)

Updates `axios` from 1.8.3 to 1.8.4
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: esbuild
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: axios
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ Upgrade `vite` to version `5.4.18` in `package.json`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-04-29 11:48:45 +02:00
dependabot[bot] 34ce9cb72b ⬆️ Bump lightningcss from 1.29.2 to 1.29.3 (#3751)
Bumps [lightningcss](https://github.com/parcel-bundler/lightningcss) from 1.29.2 to 1.29.3.
- [Release notes](https://github.com/parcel-bundler/lightningcss/releases)
- [Commits](https://github.com/parcel-bundler/lightningcss/compare/v1.29.2...v1.29.3)

---
updated-dependencies:
- dependency-name: lightningcss
  dependency-version: 1.29.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 10:06:56 +02:00
dependabot[bot] 6b8d81e380 ⬆️ Bump @vitest/eslint-plugin from 1.1.7 to 1.1.43 (#3752)
Bumps [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) from 1.1.7 to 1.1.43.
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](https://github.com/vitest-dev/eslint-plugin-vitest/compare/v1.1.7...v1.1.43)

---
updated-dependencies:
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.1.43
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-29 10:05:48 +02:00
Ken e8f59ee29f 🔥 Remove actions.ts and unused .pageAuthor styling in CSS 2025-04-26 17:08:17 +02:00
Ken 5f3e0d619d Revert "🔥 Refactor queries and remove unused actions; update styling and layout for produktbloggen pages"
This reverts commit 9141a6f863.
2025-04-26 17:06:36 +02:00
Ken ab41aef076 🎨 Update max-width for data-text-prose and adjust list component styling 2025-04-26 13:51:52 +02:00
Ken 2decc636c8 🎨 Update theme button styling and enhance editor panel content structure 2025-04-26 13:51:52 +02:00
Ken 171410e7d4 🎨 Refactor Designsystemet components; introduce DesignsystemetEyebrow for consistent styling and layout 2025-04-26 13:51:52 +02:00
Ken 9141a6f863 🔥 Refactor queries and remove unused actions; update styling and layout for produktbloggen pages 2025-04-26 13:51:52 +02:00
Ken cc8742c179 🔊 Added umami-script
🔥 Refactor Attachment component, remove unused styles, and enhance EditorPanel integration
2025-04-26 13:51:51 +02:00
Ken e1b73178e1 [Website] Fix moduleresolution (#3750)
* ♻️ Use bundler as moduleresolution for website

* 📝 removed old ts-ignore
2025-04-25 15:02:41 +02:00
8eca3ceeac [Aksel nettsiden] Produktbloggen (#3716)
* 🚧 scaffold for produktbloggen

* 🚧 query quirks

* 🚧 now renders sanity content

* 🚧 wip++

* css tw -> modules

* convert tw classes to modules

* better naming + use more tokens

* gitignore++

* purer css selectors (for modules)

* 🐛 Use correct body-component

* fixes for sanityContentBlock

* 🐛 Add spacing to list-block

* remove final unnecessary css override for produktbloggen

* Update aksel.nav.no/website/app/dev/produktbloggen/[...slug]/page.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/slug.ts

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/produktbloggen/[...slug]/page.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/produktbloggen/_ui/Produktbloggen.module.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/produktbloggen/layout.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* pr fixes + merge main in

* add import for Page + remove box-shadow

* remove unneeded margin (due to margin collapse) + 🔥 relatives

* uppercase prop redundancy

* diamond CSS tweaks

* 🔥 superflous CSS

* header variant > className

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-04-25 11:18:50 +02:00
Ken 3313720bc3 🐛 makes sure to filter out 'root'-pages for designsystem-docs in generateStaticParams 2025-04-24 16:31:48 +02:00
Ken 64705d06bc 🔥 Remove ConsentForm and associated styles, refactor page structure
🐛 Avoid redundant gap between non-existent grid-areas in linkcard

🐛 Tema-page slug missing forward-slash

🔥 removed underline thickness animation

📝 Ensure consistent query-naming
2025-04-24 16:15:33 +02:00
Ken 88fb8977ea 🐛 Dont use zod 'undefined', breaking server-components 2025-04-24 14:33:44 +02:00
KenandCopilot 8d805eae2f [Appdir] God praksis tema-page (#3742)
* ✨ feat: Add GOD_PRAKSIS_ALL_TEMA_QUERY and related types for improved data fetching
🎨 style: Update globals.css to enhance accessibility for skip links
📝 docs: Enhance theme.d.ts with new data-text-prose attribute for prose text styling
🎉 feat: Implement HeroCube component for visual representation in the hero section
🎨 style: Create Hero.module.css for styling the hero components
🎉 feat: Develop GodPraksisIntroHero component for the hero section
🎉 feat: Create TemaHero component for displaying theme navigation
🎉 feat: Implement HeroCardList for rendering theme cards
🎉 feat: Add HeroIntro component for displaying theme title and description
🎉 feat: Create HeroSelectButton for toggling theme selection
🎉 feat: Build page.tsx to fetch and display themes with the new components

* 🚚 Port over linkcard

* 💄 Replicate gp figma card

* 🎉 Synced hero

* ✨ Implemented GP frontpage

* 🔍 Add god-praksis metadata

* 🎉 Fetch and parse svg from sanity

* 🎉 Update use of linkcard on gp-pages

* 🎉 Use LinkCard on overview-pages

* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx

* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx

* 🐛 Clean up linkcard types

* ✨ Added data-fetching for tema-pages

* ✨ Gp-hero is now a self-fetching component

* ✨ Migrated state-handling for hero-banner

* ✨ Migrated CSS and interactions for HeroModule

* 🎉 Implemented chip-navigation logic

* 🐛 margin-animation did not work

* 🐛 Used undefined 'open' value

* ⚡ Optimize article mapping

* 📝 Add better metadata to categories

* ✨ Render articles as LinkCard

* ⚡ Fix URL parameter handling in GodPrakisChipsNavigationButton and add prefetch on hover

* 🐛 Chips nav had duplicate data

* 💄 Synced layout with Figma

* 🔍 Added metadata

* 🎨 Refactor padding in search form and improve header logo visibility based on screen size
💄 Add icon styling for GodPraksisHeroButton and create GodPraksisTaxonomyTag component

* 🐛 Add spacing below hero description

* 🐛 Remove spacing from description when no element below

* 🐛 Use data-attrb since last-child selector cant work

* 💄 Use new linear gradient for darkmode hero banner

* 🐛 Add missing focus-markings, word break for title

* 🐛 Use updated colors for fallback image

* [Appdir] God praksis article page Part 1 (#3743)

* 🎉 Scaffolding for gp article pages

* 🐛 Add spacing top to non-first child headings

* ✨ Implemented SystemPanel component

* ✨ Added sanity login check to outdated panel

* [Appdir] God praksis article page Part 2 (#3746)

* ✨ Added authors

* 📝 Formatting

* ✨ Added related articles content

* ♻️ Refactor UnderTemaLink to inline implementation with NextLink

* ✨ Integrate EditorPanel into multiple components and remove unused styles

* 🔍 Add metadata to page

* 🔥 Remove TOC from GP pages

* 🐛 Remove duplicate outdated panel render

* ✨ Add GodPraksisFeedback component with context and states for user feedback

* ✨ Added form-state and validation clientside

* ✨ Added RCS auth

* ♻️ Optimize slack-user lookup, inline inside action

* ✨ Refactor GodPraksisFeedback components and enhance page layout with relevant articles

* 💄 Remove bg from bilde-caption

* 💄 Fix list layout

* 🐛 Editorpanel dir had extra space

* Update aksel.nav.no/website/app/_ui/toc/TableOfContents.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Avoid getting updated types for legacy-implementation

* 💄 Move related links

* Update aksel.nav.no/website/app/_ui/toc/TableOfContents.tsx

* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/artikler/[slug]/page.tsx

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-24 14:29:55 +02:00
Julian Nymark 9dc60ba560 prevent focus trap (#3748) 2025-04-24 13:08:32 +02:00
Ken 088d5e6b59 🎨 Refactor feedback link in TableOfContents, adjust padding and margins in Designsystemet styles, and enhance slug parsing logic 2025-04-24 11:35:00 +02:00
Ken b0f1151fd6 [Aksel.nav.no] Appdir God praksis landing-page (#3732)
* ✨ feat: Add GOD_PRAKSIS_ALL_TEMA_QUERY and related types for improved data fetching
🎨 style: Update globals.css to enhance accessibility for skip links
📝 docs: Enhance theme.d.ts with new data-text-prose attribute for prose text styling
🎉 feat: Implement HeroCube component for visual representation in the hero section
🎨 style: Create Hero.module.css for styling the hero components
🎉 feat: Develop GodPraksisIntroHero component for the hero section
🎉 feat: Create TemaHero component for displaying theme navigation
🎉 feat: Implement HeroCardList for rendering theme cards
🎉 feat: Add HeroIntro component for displaying theme title and description
🎉 feat: Create HeroSelectButton for toggling theme selection
🎉 feat: Build page.tsx to fetch and display themes with the new components

* 🚚 Port over linkcard

* 💄 Replicate gp figma card

* 🎉 Synced hero

* ✨ Implemented GP frontpage

* 🔍 Add god-praksis metadata

* 🎉 Fetch and parse svg from sanity

* 🎉 Update use of linkcard on gp-pages

* 🎉 Use LinkCard on overview-pages

* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx

* Update aksel.nav.no/website/app/dev/(god-praksis)/god-praksis/page.tsx
2025-04-24 10:07:43 +02:00
Ken c9ede88246 💄 Update hover-effect for Chips based on figma-review (#3738) 2025-04-24 10:05:09 +02:00
dependabot[bot] 7cfae6cd1d ⬆️ Bump vite-tsconfig-paths from 4.3.2 to 5.1.4 (#3712)
Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 4.3.2 to 5.1.4.
- [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases)
- [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v4.3.2...v5.1.4)

---
updated-dependencies:
- dependency-name: vite-tsconfig-paths
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 12:41:06 +02:00
Ken 0a98a75514 ⚡ Use recommended memory values for application requests 2025-04-22 12:20:18 +02:00
Ken dbff5f79f8 🐛 Allow fetching from github on server-side 2025-04-22 11:21:12 +02:00
KenandCopilot 84f1cfec49 [Aksel.nav.no] Appdir iconpage (#3730)
* ✨ Added theming-support to appdir

* 📝 Added changelog docs for theme class change

* ♻️ Use inline head to set local styles instead of css-modules

* ✨ Setup overview-page

* 🐛 Use inline styles instead of Head element from nextjs

* WIP: V1 list view

* 💄 Align overview heading with regular page heading

* 🐛 Moved margin-bottom to top for overview grid

* 🎉 Add overview toggle for component pages

* 🎉 Added overview-pages to sidebar

* 🎉 Added routing support for overview pages

* 🎉 Setup staticparams and metadata for overview-pages

* 🚚 Moved overview components out to now dir

* ✨ Added overview support for komponenter, templates and grunnleggende

* 🔥 Removed unused sanity-field

* 🐛 Hide fallback-svg

* 🐛 Fix misspelling

* 🎉 Added Iconpage filtering and navigation

* 🎉 Added modal view

* 🐛 Fixed searchParams type

* 🎉 Added empty-state

* 🔥 Removed forced use-client for emptystate

* 🎉 Support svg fetch

* 🔥 Refactor IconPage components and remove unused sidepanel

* 🎉 Added links

* 📝 Added metadata

* 🐛 Resolve impure css module class

* 🐛 Fix iconName validation logic in IconPage component

* 🎨 Improve layout and styling in IconPage components

* 🎨 Update HStack component to use 'as="ul"' for semantic HTML

* ✨ Added icon-page to sidebar

* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/sidebar/Sidebar.util.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/icon-page/IconPage.button.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ⚡ Added zod-validation and debounce to search

* 🏷️ Resolved updated types

* ⚡ Use clientside updates for icon-page

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-22 10:43:56 +02:00
dependabot[bot] 39817f924c ⬆️ Bump @testing-library/react from 16.1.0 to 16.3.0 (#3724)
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 16.1.0 to 16.3.0.
- [Release notes](https://github.com/testing-library/react-testing-library/releases)
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/react-testing-library/compare/v16.1.0...v16.3.0)

---
updated-dependencies:
- dependency-name: "@testing-library/react"
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 10:26:15 +02:00
Ken 8ea18b07a3 ✨ New icon 'Cpu'. (#3740) 2025-04-22 10:11:24 +02:00
820a68f0a8 Chat: Add prop to control toptext heading level (#3739)
* Chat: Add prop to control toptext heading level

* Update @navikt/core/react/src/chat/Bubble.tsx

* Update @navikt/core/react/src/chat/Bubble.tsx

* Update @navikt/core/react/src/chat/chat.stories.tsx

* 📝 Typo

* 📝 Chat: Add 'toptextHeadingLevel'-prop to allow changing h-level based on semantics.

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-04-22 10:05:31 +02:00
github-actions[bot] f787e91a2f Version Packages (#3737)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-11 14:47:22 +02:00
KenandCopilot e7ec9c191a Timeline: Add placement-prop for periods for more fine-grained control (#3736)
* Timeline: Add placement-prop for periods for more fine-grained controll over Popover-placement

* Update .changeset/lazy-coats-beam.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-11 12:35:22 +02:00
Ken c57fe7c396 🐛 Use option-value as id instead of label in Combobox (#3735)
* 🐛 Use option-value as id instead of label

* 🐛 Use unique option-value as react-key
2025-04-11 12:32:16 +02:00
github-actions[bot] 4178ec2647 Version Packages (#3733)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-10 17:23:19 +02:00
Ken 8c9cf92c8b 🐛 Single-select combobox assumed that input needed min-width (#3734) 2025-04-10 14:55:37 +02:00
Ken 208adb8b3f 🐛 Using Page-component would always give errors when using new Theme-component 2025-04-10 14:15:13 +02:00
Ken 1966c3aed5 🐛 Pages without TOC broke page-layouts with assumed grid-placements 2025-04-10 12:00:45 +02:00
Ken 3a523392c7 [Aksel.nav.no] Support cookies in Appdir (#3726)
* ✨ Added theming-support to appdir

* 📝 Added changelog docs for theme class change

* ♻️ Use inline head to set local styles instead of css-modules

* ✨ Setup overview-page

* 🐛 Use inline styles instead of Head element from nextjs

* WIP: V1 list view

* 💄 Align overview heading with regular page heading

* 🐛 Moved margin-bottom to top for overview grid

* 🎉 Add overview toggle for component pages

* 🎉 Added overview-pages to sidebar

* 🎉 Added routing support for overview pages

* 🎉 Setup staticparams and metadata for overview-pages

* 🚚 Moved overview components out to now dir

* ✨ Added overview support for komponenter, templates and grunnleggende

* 🔥 Removed unused sanity-field

* 🐛 Hide fallback-svg

* 🐛 Fix misspelling

* ✨ Setup appdir cookie-banner view

* 🎉 Moved cookie-handling to server-actions

* 🐛 Remove impure css module use

* 🐛 Use forced dynamic to allow consent-banner

* 📝 Add docs

* 🎉 Moved consent doc-page

* ♻️ Rename cookie-actions to use 'action'-suffix
2025-04-10 11:51:33 +02:00
Ken 65c791c1eb [Aksel.nav.no] Add support for "overview" pages (#3722)
* ✨ Added theming-support to appdir

* 📝 Added changelog docs for theme class change

* ♻️ Use inline head to set local styles instead of css-modules

* ✨ Setup overview-page

* 🐛 Use inline styles instead of Head element from nextjs

* WIP: V1 list view

* 💄 Align overview heading with regular page heading

* 🐛 Moved margin-bottom to top for overview grid

* 🎉 Add overview toggle for component pages

* 🎉 Added overview-pages to sidebar

* 🎉 Added routing support for overview pages

* 🎉 Setup staticparams and metadata for overview-pages

* 🚚 Moved overview components out to now dir

* ✨ Added overview support for komponenter, templates and grunnleggende

* 🔥 Removed unused sanity-field

* 🐛 Hide fallback-svg

* 🐛 Fix misspelling

* Update aksel.nav.no/website/app/dev/(designsystemet)/_ui/sidebar/Sidebar.tsx

* 🐛 Could not create overview-pages for grunnleggende or templates
2025-04-10 11:18:32 +02:00
github-actions[bot] f1e058b67b Version Packages (#3706)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-08 14:11:10 +02:00
Vegard Haugstvedt 977ecec1df Forgot darkside-fix in #3727, so I am just pushing it individually 2025-04-08 14:06:38 +02:00
Vegard Haugstvedt 8b31c3bc58 Bugfix/combobox chips not wrapping when togglelist button is hidden (#3727)
* Remove unused CSS that causes issues when Combobox' ToggleListButton is skipped

This code removed wrapping of chips if ToggleListButton is hidden, and will only ever apply to the button otherwise. That does not need a flex layout.

* Add changeset
2025-04-08 13:58:49 +02:00
Ken 0d71a48458 [aksel.nav.no] 🎉 Themable empty-state for app-dir search 2025-04-07 13:44:52 +02:00
Julian Nymark c413f427a5 increase deprecation visibility (#3719) 2025-04-07 11:53:20 +02:00
Ken 023c06d66f [Aksel.nav.no] Theme-support (#3720)
* ✨ Added theming-support to appdir

* 📝 Added changelog docs for theme class change

* ♻️ Use inline head to set local styles instead of css-modules

* 🐛 Use inline styles instead of Head element from nextjs
2025-04-03 11:01:52 +02:00
Julian Nymark 68a3cfc340 remove outdated design examples (also somewhat erroneous hide example) (#3718) 2025-04-03 10:58:19 +02:00
Ken 277c74a657 🎨 Update background color for togglegroup in darkside theme (#3715) 2025-04-02 09:54:46 +02:00
Ken f0d569ab5f 🏷️ Refine type definitions for PortableContentTypes and update customPortableTextComponents type constraints 2025-04-02 09:54:16 +02:00
Julian NymarkandKen 58bb2e69c8 [Migration]: box -> boxNew (#3669)
* 🚧 box migration scaffolding

* 🚚 boxnew -> darkside/boxnew

* 🚧 wip

* 🚧 working single substitution (pending lookup in replacements)

* ✅ working test

* import rename in output test

* ✅ import rename + tests

* use config comments, better import example

* commentblock function (append to string output) + update tests (failing)

* 🚧 almost good... needs to respect renamed imports

* ✅ passing tests

* ♻️ organize some utils

* 🧪 Added more tests

* cast JSXIdentifier type

* pass idempotency tests

* also refactor the usage when renaming a function

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-04-02 09:20:13 +02:00
Ken 01a395bdf7 💄 Update text-sizing for app-router heading 2025-04-01 14:56:40 +02:00
Ken b4b316c639 [Aksel.nav.no] More updates to app-router DS-pages, added SEO (#3717)
* ♻️ Update TOC feedback, add layout padding bottom

* 🐛 Added missing type

* 🐛 Fix missing spacing in intro-section

* 🎉 Added metadata for changelog view support in mønster pages

* 🎨 Refactor layout styles and enhance sidebar button animations

* 🎉 Added SEO support

* 🐛 Add page SEO image to start of image list

* 🔥 Remove reduntant early exit code

* 🐛 Open feedback in new tab

* 🐛 Update footer to use responsive layout

* 🐛 Moved theme-colors to viewmport config

* 🐛 Show mobile-menu earlier

* 🐛 Use local schema in sanity-typegen

* 📝 Typo
2025-04-01 14:46:19 +02:00
Ken d859497f07 📝 Removed title from list example 2025-04-01 11:29:18 +02:00
KenandCopilot eb257db444 [Aksel.nav.no] Resolved remaining sanityblocks to the darkside and appdir (#3708)
* 🔥 Removed legacy block for riktekst_blokk

* 🚚 Migrated AkselTable component

* 🚚 Migrated TokenTable component

* 💄 More visible warning

* 💄 Use 1920 as max-width for ds layout

* 🚚 Moved sidebar to ds scope

* 🚚 Moved AkselTable to WebsiteTable

* ✨ Added grunnleggende route

* 🚚 Moved List to WebsiteList

* 🐛 Fix spacing between ds header and content

* 🚚 Migrated token-view

* 🚚 Migrated ExampleText block

* 🚚 Migrated Attachment block

* 🚚 Moved compare-images module

* 🎉 Migrated compareimages module

* 🎉 Added language migration

* 🎉 Stronger typing to make sure we resolve every sanity type

* 🏷️ stricter types

* Update aksel.nav.no/website/app/_ui/legacy-token-module/token-view/parts/categories/Breakpoints.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/_ui/compare-images/CompareImages.handle.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Use static initial aria value labels

* 🐛 Sync updated sanity schema

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-31 13:24:52 +02:00
Karl-Magnus Thorsnes 619547cd0e SearchButton💄 Vis forskjellig hurtigtast ut fra brukers OS (#3710)
* Feat differensier hurtigtast-beskrivelse ut fra OS

* Bruk simplere metode for å detectere OS
2025-03-31 12:29:06 +02:00
Julian Nymark dfd88e19dc update playroom (#3709) 2025-03-31 10:35:15 +02:00
dependabot[bot] fa17760f64 ⬆️ Bump figlet from 1.6.0 to 1.8.0 (#3711)
Bumps [figlet](https://github.com/patorjk/figlet.js) from 1.6.0 to 1.8.0.
- [Release notes](https://github.com/patorjk/figlet.js/releases)
- [Commits](https://github.com/patorjk/figlet.js/compare/1.6.0...1.8.0)

---
updated-dependencies:
- dependency-name: figlet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 10:33:47 +02:00
Ken d77e7e203e 💄 Updated global meta-purple color for darkside (#3703) 2025-03-28 12:10:47 +01:00
github-actions[bot] d5893bf3b7 Version Packages (#3704)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-28 11:59:45 +01:00
Ken 38189a0440 🐛 Disabled expansion-rows now has same hover-effect as other rows (#3702) 2025-03-27 13:49:53 +01:00
Ken 726dc124e8 🎨 Update styles for CodeBlock and TableOfContents components 2025-03-27 11:31:51 +01:00
Ken 9d9ff637d9 📝 Sync icon metadata 2025-03-27 11:22:06 +01:00
Ken efd0739abb ✨ Throw error of legacy-props are used with new Theme in Box. (#3697)
* ✨ Throw error of legacy-props are used with new Theme in Box.

* Update @navikt/core/react/src/layout/box/Box.stories.tsx
2025-03-27 11:19:14 +01:00
dependabot[bot] aa7b7132bb ⬆️ Bump the npm_and_yarn group across 3 directories with 1 update (#3701)
Bumps the npm_and_yarn group with 1 update in the /examples/astro directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 5.4.14 to 5.4.15
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.15/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.15/packages/vite)

Updates `vite` from 5.4.14 to 5.4.15
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.15/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.15/packages/vite)

Updates `vite` from 5.4.14 to 5.4.15
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.15/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.15/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 11:09:16 +01:00
Ken 76318343a0 🐛 Search now works on mobile for IOS-devices, resolves #3693 2025-03-27 11:03:33 +01:00
dependabot[bot]andKen 6c58063a0d ⬆️ Bump the npm_and_yarn group with 5 updates (#3679)
* ⬆️ Bump the npm_and_yarn group with 5 updates

Bumps the npm_and_yarn group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `5.4.14` | `6.0.9` |
| [esbuild](https://github.com/evanw/esbuild) | `0.24.0` | `0.25.0` |
| [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `2.1.8` | `2.1.9` |
| [axios](https://github.com/axios/axios) | `1.8.2` | `1.8.3` |
| [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.25.7` | `7.26.10` |


Updates `vite` from 5.4.14 to 6.0.9
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.9/packages/vite)

Updates `esbuild` from 0.24.0 to 0.25.0
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.0...v0.25.0)

Updates `vitest` from 2.1.8 to 2.1.9
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v2.1.9/packages/vitest)

Updates `axios` from 1.8.2 to 1.8.3
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.8.2...v1.8.3)

Updates `@babel/helpers` from 7.25.7 to 7.26.10
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: esbuild
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: vitest
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: axios
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@babel/helpers"
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Sync depdendencies repo-wide

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-03-27 10:08:02 +01:00
dependabot[bot] 195749dec6 ⬆️ Bump the npm_and_yarn group across 3 directories with 3 updates (#3685)
Bumps the npm_and_yarn group with 2 updates in the /examples/astro directory: [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) and [prismjs](https://github.com/PrismJS/prism).
Bumps the npm_and_yarn group with 1 update in the /examples/next-appdir directory: [next](https://github.com/vercel/next.js).
Bumps the npm_and_yarn group with 1 update in the /examples/shadow-dom directory: [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers).


Updates `@babel/helpers` from 7.25.6 to 7.26.10
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)

Updates `prismjs` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.29.0...v1.30.0)

Updates `next` from 15.1.2 to 15.2.3
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.1.2...v15.2.3)

Updates `@babel/helpers` from 7.23.9 to 7.26.10
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: prismjs
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: next
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@babel/helpers"
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-27 10:00:34 +01:00
Ken a185ab4d48 ⬆️ Upgrade rehype suite used for validating icon-SVG 2025-03-27 09:58:59 +01:00
Ken 88159c2cac [Aksel.nav.no] KodeEksempel blokk Appdir (#3699)
* ✨ Implemented codeblock header and codeblock

* ✨ Can now toggle betweem different code-views

* 🐛 Use Theme component to get color-scheme in CSS

* 💄 Updated padding, use custom theme

* ✨ Implemented custom prism-theme

* ✨ Use new prism-theme for propsseksjon

* 🎉 Use new codeblock for single code view

* 🐛 Add hover-effect for expander button

* ✨ Added provider and navigation support

* WIP: Add codeview block

* ✨ Enhance KodeEksempler with Suspense, toolbar, and improved props handling

* 🎨 Refactor CodeBlock component by removing unnecessary Theme wrapper and improving className handling

* ✨ Use local styles for kodeexample module

* 🐛 Add useclient

* 🐛 Use local css variable since css counter breaks at random
2025-03-27 09:12:18 +01:00
Ken c453dac6f0 🐛 scalingStrategy were put under wrong keyword in nais-config 2025-03-25 17:11:21 +01:00
Ken 676973621b ⚡ Optimize Nais config for less replication 2025-03-24 19:38:34 +01:00
Ken be5578ab28 [Aksel.nav.no] Migrated more components over to new PortableText component (#3689)
* 🚚 Migrated related links and added types for portable type-blocks

* ⚰️ Removed unused sanity-types for prinsipper

* 🔥 Removed old tastatur module

* 🎉 Migrated to new DoDont-component

* 🚚 Migrated Bilde module

* 🚚 Migrated Alert module

* 🚚 Migrated ExpansionCard module

* 🚚 Migrated ExpansionCard module

* 🚚 Migrated Tablev2 module

* 🚚 Migrated Accordion module

* 🐛 Avoid using client-component for Accordion module

* ♻️ Extracted components from PropsSeksjon

* ♻️ Re-use codeblock for proptable

* ♻️ Rename

* ♻️ Added Video support for new portable text

* 🚚 Migrate Tips module

* 💄 Use new CSS for darkside

* 🐛 Use new status-tag handling for sidebar

* 🐛 Alias portableText to avoid circular dependency-warnings

* 📝 Document getStatusTag
2025-03-24 19:32:55 +01:00
Ken f495c2c392 🐛 Nais-config deleted all routes from aksel.nav.no build. Removed 'emptyDir' config. 2025-03-24 13:28:59 +01:00
Ken 73d0a2c9c9 [Aksel.nav.no] Fix cve-2025-29927 (#3691)
* 🔒 Fix CVE-2025-29927

* 📝 Yarn lock sync
2025-03-24 12:54:48 +01:00
Ken 8be06ae014 ⚡ Update nais-config (#3690)
* ⚡ Update nais config limits for memory and cache

* ⚡ Avoid prefetching komponent landing page links

* 🔥 Removed cpu treshhold

* 🐛 Avoid prefetching external route
2025-03-24 12:33:14 +01:00
Ken 7c35584d90 [Aksel.nav.no] Grid-layouts and Porting of more components (#3683)
* ✨ Setup new layout grid

* ♻️ PortableText config setup

* ✨ Migrated over Blocks support to appdir

* 🚚 Moved typo components to appdir

* ✨ Add Komponent spesific modules to page template

* ✨ Added thumbnail (hardcoded)

* ✨ Introduced DesignsystemetKomponentIntro and DesignsystemetThumbnail components for enhanced component documentation

* 🐛 TOC is now sticky

* ✨ Added marks-support (#3684)
2025-03-21 17:49:17 +01:00
Ken 5d917e188f 🐛 Admin broke since schema.json were used as reference 2025-03-21 14:26:19 +01:00
Ken 7249aa1f43 🐛 Allow form-actions for codesandbox-examples 2025-03-20 14:56:35 +01:00
Ken 322167da20 [Aksel.nav.no] Ported over TOC to app-router, added sanity types (#3681)
* ✨ Set up page-slug query logic

* ♻️ Inline TableOfContents in smaller modules

* 🎨 Refactor TableOfContents styles and update component structure

* 🎨 Enhance TableOfContents styles and structure for improved responsiveness and clarity

* ✨ Enhance TableOfContents component with feedback and changelog links; refactor queries for improved data handling

* 🚚 Co-localized layout in grouped ui dir

* ✨ Extract schema types from sanity

* 🐛 Update sidebar types to use new sanity schema-types
2025-03-20 14:53:24 +01:00
Ken 46c0f434cf 🐛 Handle cases where sanity assets are undefined (#3682) 2025-03-20 11:45:12 +01:00
Ken f994d3868b 🔥 Critical frontpage crash fix 2025-03-20 09:28:47 +01:00
dependabot[bot] 53dab8e1a0 ⬆️ Bump @babel/helpers (#3678)
Bumps the npm_and_yarn group with 1 update in the /examples/referansesider directory: [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers).


Updates `@babel/helpers` from 7.25.6 to 7.26.10
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.10/packages/babel-helpers)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-20 09:18:52 +01:00
Ken 23400df9f0 ✨ Page layouts for new Ds-pages (#3675) 2025-03-19 13:52:58 +01:00
github-actions[bot] 6e9b0e9b1c Version Packages (#3677)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-19 13:43:46 +01:00
Ken ad0375e918 📝 Icon metadata sync (#3676) 2025-03-19 13:39:38 +01:00
Ken 0cb04db261 ✨ Update modal animations for reduced movement (#3671) 2025-03-19 13:36:58 +01:00
Roy Halvor Frimanslund 50113b4501 Update ExternalLinkFill.yml (#3673)
Bug: icon was marked as "new tab" but the icon for new tab is an box with the arrow stopping at the border. Having the new tab synonym here will cause missunderstandings.
2025-03-19 13:31:48 +01:00
Roy Halvor Frimanslund b745daa35c Update ExternalLink.yml (#3674)
Bug: icon was marked as "new tab" but the icon for new tab is an box with the arrow stopping at the border. Having the new tab synonym here will cause missunderstandings.
2025-03-19 13:31:37 +01:00
Ken 1d41f0d8f5 🐛 Editors without name broke preview and admin-tool 2025-03-19 11:41:50 +01:00
KenandCopilot 85eeb68f20 [Aksel.nav.no] Initial App-router setup (#3662)
* root layout

* ✨ Added draftmode

* ✨ Setup boilerplate

* ✨ Setup grouping-dir

* ✨ Implemented header

* 💄 Made header sticky

* 🔒 Content security policy updated

* 🚚 Moved favicon to appdir

* 🔥 restore old frontpage

* 🚚 Moved sidebar to appdir

* ✨ Implemented sidebar loading

* ✨ Doc lyout

* 🐛 Add id for skiplink

* ✨ Added new footer

* 💄 Move skiplink further away

* 💄 Add more padding bottom sidebar

* ✨ Refactor header and sidebar components for improved layout and structure

* 📝 Uncomment some code

* 🔥 Removed user server directive from component and layouts

* 🐛 Center footer

* 🐛 Re-added support for chromatic connect

* 🔥 removed browser-token

* Update aksel.nav.no/website/app/_ui/footer/Footer.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [Aksel.nav.no] Ported over global search to app-router (#3663)

* 🚚 Moved search-code closer to app router

* ✨ Added button and modal

* ⚡ Initial loading for recent articles

* ⚡ Query data from the server

* ✨ Generates parsed search-results

* ⚡ Added debounce

* ✨ Render hits

* ♻️ Limit articles for each field to 20

* 🐛 Revert form-layout to initial view

* 🐛 Build searchindex before website

* ✨ Pre-select text when re-opening search

* ✨ Enhance global search UI with improved layout and styling

* ✨ Refactor global search components to improve search functionality and UI

* ✨ Improve global search functionality and UI responsiveness

* ✨ Update global search UI and functionality with improved input handling and styling

* ✨ Refactor global search dialog and add Kbd component for keyboard shortcuts

* ⚡ removed reduntant suspense

* ✨ Refactor global search components for improved styling and functionality

* ✨ Refactor global search results rendering for improved performance and readability

* ✨ Update global search dialog and form for improved styling and accessibility

* ✨ Refactor global search components for improved layout and styling

* ✨ Refactor GlobalSearchHitCollection for improved styling and accessibility

* 🎨 Update global search configuration and styles for improved clarity and aesthetics

* 🎨 Update layout and styles for global search components for improved aesthetics and readability

* ✨ Refactor global search utilities and update styles for improved clarity and maintainability

* 🔧 Refactor global search queries and implement caching for improved performance and data retrieval

* ⚡ Preload cache for search

* 🔧 Refactor fetchArticles function to improve caching logic and remove unnecessary logging

* 🔥 Removed user server directive from component

* 🔥 Removed comments

* ⚡ Explicitly declare server-only component

* Update aksel.nav.no/website/app/_ui/global-search/GlobalSearch.fetch.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update aksel.nav.no/website/app/_ui/global-search/GlobalSearch.fetch.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 📝 Rename sanitiezedata

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [Aksel.nav.no] Move Aksel-brand theme into app-router for use (#3668)

* 💄 Added global aksel-theme tokens

* ✨ Implement new Aksel-brand for theming

* [Aksel.nav.no] Updated MobileMenu for new ds-pages (#3670)

* 💄 Added global aksel-theme tokens

* ✨ Implement new Aksel-brand for theming

* ✨ Initial setup mobile-menu

* ✨ V1 mobile-menu component

* 💄 Update mobile navigation and global search responsiveness; adjust overlay color opacity

* 💄 Refine modal backdrop animation timing and opacity for smoother transitions

* 💄 Adjust pressed-sidebar state

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-18 21:15:54 +01:00
Julian Nymark 9f958c1242 [Migration] deprecate darkside props (#3656)
* working impl

* new migrations key for darkside

* new import path

* 🚚 spacing -> utils/ast
2025-03-18 13:36:59 +01:00
dependabot[bot] 489ac3a426 ⬆️ Bump prettier-plugin-tailwindcss from 0.6.8 to 0.6.11 (#3664)
Bumps [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) from 0.6.8 to 0.6.11.
- [Release notes](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/prettier-plugin-tailwindcss/compare/v0.6.8...v0.6.11)

---
updated-dependencies:
- dependency-name: prettier-plugin-tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-18 09:33:23 +01:00
dependabot[bot] 68b61de895 ⬆️ Bump @changesets/cli from 2.27.11 to 2.28.1 (#3666)
Bumps [@changesets/cli](https://github.com/changesets/changesets) from 2.27.11 to 2.28.1.
- [Release notes](https://github.com/changesets/changesets/releases)
- [Changelog](https://github.com/changesets/changesets/blob/main/docs/modifying-changelog-format.md)
- [Commits](https://github.com/changesets/changesets/compare/@changesets/cli@2.27.11...@changesets/cli@2.28.1)

---
updated-dependencies:
- dependency-name: "@changesets/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-18 09:33:06 +01:00
Ken 528d4afa98 [Aksel.nav.no] Add support for "standalone" articles (#3657)
* 📝 Reposition sanity fields

* ✨ Added new standalone-category to sanity docs

* ✨ Added validation to make sure standalone articles dont overlap with sections

* 🐛 Always error out if using standalone articles until implemented

* 🔥 Removed temp removal of feature

* 🐛 Check for undefined slug

* [Aksel.nav.no] Implemented support for new lvl 1 articles  (#3658)

* ✨ Added support for new lvl 1 articles

* 🧪 Added tests for new sidebar

* 🔥 Removed breadcrumb from WithSidebar layout

* 🐛 Revert to prod dataset
2025-03-14 15:53:16 +01:00
dependabot[bot]andJulian Nymark 3d3e26a555 ⬆️ Bump denoland/setup-deno from 1 to 2 (#3541)
* ⬆️ Bump denoland/setup-deno from 1 to 2

Bumps [denoland/setup-deno](https://github.com/denoland/setup-deno) from 1 to 2.
- [Release notes](https://github.com/denoland/setup-deno/releases)
- [Commits](https://github.com/denoland/setup-deno/compare/v1...v2)

---
updated-dependencies:
- dependency-name: denoland/setup-deno
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update article-views to deno 2

* scripts: chagelog (add deno.json)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2025-03-14 12:56:51 +01:00
KenandCopilot adaee5e002 [Darkside] Interaktiv migrering (#3642)
* ✨ Setup darkside migration

* ✨ Can now convert primitives spacing

* 🧪 Added more tests

* 📝 Docs for utils

* 📝 Changeset

* 📝 Typos

* [Darkside] ✨ Added migration for css, less and scss (#3598)

* ✨ Added migration for css, less and scsss

* Update @navikt/aksel/src/codemod/migrations.ts

* ✨ Make old px spacing space-1

* ✨ Use esbuild to inline local references

* ✨ Added js migration to space-tokens (#3600)

* ✨ Setup first iteration of token translation object

* ✨ Started mapping old to new tokens

* ♻️ Simplified repalcement logic

* ✨ Added tests for token-migration

* ✨ Replaces old token with new reference

* ✨ Handle overrides of tokens

* 🧪 Global messages storage

* 📝 Added migration

* 🐛 Initialize message list

* ✨ Customizable results messaging

* ✨ Customizable results messaging

* 🐛 Use replacement, not ref

* 📝 Only document found legacy-tokens, dont rename them

* 📝 Better comments

* ✨ Added context to remaining token updates

* ✨ Added comments to unsupported token

* ✨ Format comments better, remove duplicates

* 📝 Success message if no legacy-tokens found

* 🐛 Return updated source files

* 🐛 Reference valid replacement

* 🔥 Removed comments

* ✨ Added better messaging

* ✨ Better messaging structure

* 🧪 Added more tests

* 🧪 Tests for less, scss, css and js tokens

* 🐛 CSS hits were shown as scss and less hits

* 📝 Format messages better

* 📝 Format messages better

* ✨ Added js-migrations template

* Update test runner

* 🐛 Revert mistakes

* 🐛 Resolve testing rig

* ✨ Js token migration

* 📝 Better docs for JS migration

* 📝 Added missing lineshift

* ✨ Tooling setup

* ✨ Tooling setup with enquirer

* ✨ Tooling setup with enquirer

* ✨ Set up inquirier and enquirer to promt user for tasks

* ✨ Get legacy-data

* ✨ Now formats and prints progress

* ✨ Now formats and prints progress

* ⚡ Smarter scanning of updated tokens

* ⚡ Refactored status-code

* ✨ Now prints remaining files

* ✨ Smarter tailwind-regex

* 📝 Tell user we are scanning the files

* ✨ Moved transforms to new darkside location

* 🚚 Moved tests for js transforms

* 📝 Updated prettier config to ignore new test-files

* 📝 Moved css, less, scss tests

* 🐛 Resolved tests not running properly on less,scss setup

* WIP: tailwind config migration

* 📝 Added tailwind config for border-radius

* ✨ Strictly match tailwind-classes

* ♻️ Convert status obj to class

* ♻️ Compact regex parsing

* ♻️ Simplified regex-handling for new token lookup

* ✨ Added support for component tokens

* ⚡ Optimize lineNumber task

* 🐛 Inline regex-probe

* 🐛 Remove old merged code

* 🐛 Fix regex escape-characters

* Update @navikt/aksel/src/darkside/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* 🐛 Fix token-tests

* ✨ Now prints with token-name

* ♻️ Move files

* ♻️ Move printing to TokenStatus class

* ✨ Add comments to printout

* 🐛 Handle word boundaries

* ⚡ Pre-generate the regexes

* 🧪 More regex-tests

* 🧪 More regex-tests

* ⚡ Use built-in regexes

* ⚡ Only run codeshift on relevant files

* 🐛 No print for codemod status update

* ⚡ Only run codeshift on relevant files

* 📝 Added extra space

* 📝 Exit after codemod

* 📝 Removed temp logging

* 🐛 Await codeshift execution

* 🧪 Added tests for not imported JS-tokens

* ✨ Implemented tailwind migration code

* 🧪 @apply tests for tailwind transform

* 🐛 Handle spaces better for tailwind config

* 🐛 Handle prefixing of tailwind config correctly

* 🐛 Handles cases where empty collection was passed

* 🐛 makes sure to clean up match before parsing

* 🧪 More tailwind-codemod tests

* ⚰️ Removed moved code, renamed darkside -> spacing for migrations

* ♻️ Config cleanup part 1

* ♻️ Config cleanup part 2

* ♻️ Refactored runner

* ✨ Added run all migraitons task

* 🐛 Use destrucutred taskname

* 📝 Better naming

* 📝 More spesific import docs

* 🐛 Print filename correctly when token contains special characters

* 🐛 Update spacing migrations paths

* 🐛 Added new spacing-tokens to legacy config

* ✨ Initialize status directly in constructor

* ⬆️ yarn lock sync

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-14 12:52:20 +01:00
Ken e826eb7bc6 ✨ Use ctrl + k for search-shortcut (#3660) 2025-03-14 12:41:35 +01:00
github-actions[bot] edd64c4bcd Version Packages (#3653)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-13 15:22:54 +01:00
Ken 4eba5a929c [Datepicker] Allow selecting dates when from is undefined (#3655)
* 🐛 Handle cases where to is defined and from is undefined

* 🐛 Fix missing state-option when selecting ranged datepicker values

* Update @navikt/core/react/src/date/datepicker/DatePicker.stories.tsx

* Update @navikt/core/react/src/date/datepicker/DatePicker.stories.tsx

* 🧪 Added tests for new ranged-datepicker logic

* 🐛 Typo
2025-03-13 14:48:23 +01:00
Ken a560bce1d2 [Aksel.nav.no] New Sidebar implementation (#3654)
* 🚚 Inline menu in TOC

* ♻️ Update import/exports

* ✨ Setup new sidebar

* WIP: Sidebar

* 💄 Styled dropdown button

* 💄 styled child-element

* WIP: sidebar designchanges

* 💄 Move notch to left of nested element

* ✨ Modulelerize sidebar

* 💄 Add hover-effects

* ✨ Added tag-support

* ♻️ Converted to css modules from tailwind

* 💄 Updated darkside styling

* 🐛 Re-add focus to item

* 🔊 Added logging to new sidebar

* ♻️ Inline isActive check

* ✨ Added mobile layout support

* 🐛 Layout prop now optional

* ♻️ Revert to legacy sidebar for prod

* 🔥 Removed new tailwind config import

* 🔥 Removed temp focus global css

* 🎉 Use new sidebar in prod

* 📝 Better CSS-naming

* 📝 Adde auto-open feature for future updates
2025-03-13 12:14:43 +01:00
Ken 1d3abd7a68 🚚 Inline menu in TOC (#3646)
* 🚚 Inline menu in TOC

* ♻️ Update import/exports

* 🐛 resolve toc import
2025-03-13 11:21:10 +01:00
Ken 8f3913c437 [Darkside] Fixed minifier for darkside CSS (#3648)
* ✨ Fix minifier

* ⚰️ Deleted clean-css package

* ⬆️ yarn lock sync

* ⬆️ yarn lock sync
2025-03-12 10:32:51 +01:00
Ken 56971a105d [Darkside] Padding sync (#3651)
* 🎨 Adjust padding in alert styles for consistency

* 🎨 Update chat bubble padding for improved consistency

* 🎨 Standardize padding in date and modal styles for consistency

* 🎨 Refactor padding in error summary styles for improved consistency

* 🎨 Adjust padding in file upload styles for improved consistency

* 🎨 Update padding in file upload styles for improved consistency

* 🎨 Adjust transition duration and padding for form progress and summary styles

* 🎨 Update padding in guide panel styles for improved consistency

* 📝 Changeset
2025-03-12 10:29:22 +01:00
github-actions[bot] 31ec44dd62 Version Packages (#3650)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-11 15:24:04 +01:00
Ken e769eed269 🐛 Darkside: Removed stacking backgrounds with transparency in Combobox. 2025-03-11 15:00:56 +01:00
dependabot[bot] b374aaa03e ⬆️ Bump browserslist from 4.24.2 to 4.24.4 (#3639)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.24.2 to 4.24.4.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.24.2...4.24.4)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 11:23:51 +01:00
dependabot[bot] a6ab5335e0 ⬆️ Bump axios (#3643)
Bumps the npm_and_yarn group with 1 update in the /@navikt/aksel directory: [axios](https://github.com/axios/axios).


Updates `axios` from 1.7.4 to 1.8.2
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.4...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 11:21:58 +01:00
Ken 9f37b3805e ✨ Added TOC-logging 2025-03-10 14:08:23 +01:00
dependabot[bot] c6ccfe53bc ⬆️ Bump lightningcss from 1.29.1 to 1.29.2 (#3641)
Bumps [lightningcss](https://github.com/parcel-bundler/lightningcss) from 1.29.1 to 1.29.2.
- [Release notes](https://github.com/parcel-bundler/lightningcss/releases)
- [Commits](https://github.com/parcel-bundler/lightningcss/commits/v1.29.2)

---
updated-dependencies:
- dependency-name: lightningcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 09:30:22 +01:00
Ken 0279b19579 [Aksel.nav.no] Track cookie clicks (#3638)
* ✨ Added sanity-config for tracking cookie-banner clicks

* ✨ Added logging for new cookie banner button

* 🐛 Don't return value from api
2025-03-07 16:30:38 +01:00
Ken 80f12069e1 ✨ Added URL-tracking to gp-chip navigation 2025-03-07 13:07:56 +01:00
Ken 7915b7e47b 🐛 Brakk god-praksis sider 2025-03-07 13:05:00 +01:00
Ken 3c646465b4 🔊 Added logging to gp-chips 2025-03-07 12:28:45 +01:00
github-actions[bot]andgithub-actions[bot] d37d03f05c Version Packages (#3636)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-07 10:54:27 +01:00
Ken c1b2944321 🐛 Fixed bug where '@media print' would hide header content. (#3634) 2025-03-07 10:37:19 +01:00
Ken c0078f1199 ✨ Add shortcut to header button (#3631) 2025-03-07 10:36:49 +01:00
Ken e7f42ab02e [Website] Replace amplitude with umami logging (#3625)
* ✨ Use umami instead of amplitude track

* 🐛 Check for umami before manually logging event

* 🐛 Re-added missing navigational logging

* 🐛 Removed kbd styling causing styles
2025-03-07 09:56:34 +01:00
Sjur abd5de2304 Update global.tokens.ts (#3633)
Endret i darkmode
Brand Blue og Success, 100 - 400, endret saturation til 100.
Accent, 100 - 400, endret saturation til 60.
Alle farger 600, endret til kontraststop til 4.52:1. Bug, noen farger havnet under 4.5:1.
Alle farger 1000, endret saturation til 100.
2025-03-06 16:33:21 +01:00
Ken 7f895df4a9 [Website] Nextjs v15 and sanity update (#3623)
* ✨ Added next 15 support

* ✨ Updated Sanity and nextjs

* ⬆️ yarn lock sync

* 🐛 Use newest ubuntu action runner

* 🐛 Removed redundant kbd-styling

* ⬆️ Updated to sanity 3.78

* ⬆️ yarn lock sync

* ⬆️ yarn lock sync
2025-03-06 10:34:47 +01:00
Ken ffd7e818e3 📝 Updated px-values shown for Heading examples 2025-03-06 10:22:27 +01:00
github-actions[bot]andgithub-actions[bot] 7894bbb510 Version Packages (#3630)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-06 10:01:50 +01:00
Ken 9f4535e6bb ✨ Aria-tags forwarded to list-element in list (#3626) 2025-03-06 09:59:47 +01:00
github-actions[bot]andgithub-actions[bot] 93dacbd854 Version Packages (#3628)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-05 10:43:20 +01:00
Ken 231c0b89a4 🐛 Resolved issue with react 19 types where children.props were unknown in Slot (#3627) 2025-03-05 10:40:42 +01:00
Julian Nymark f7f9436110 🔥 remove examples using deprecated title and description props (#3622) 2025-03-05 09:11:11 +01:00
0840a9211e ⬆️ Bump swr from 1.3.0 to 2.3.2 (#3574)
* ⬆️ Bump swr from 1.3.0 to 2.3.2

Bumps [swr](https://github.com/vercel/swr) from 1.3.0 to 2.3.2.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](https://github.com/vercel/swr/compare/1.3.0...v2.3.2)

---
updated-dependencies:
- dependency-name: swr
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 Sync swr instances

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-03-04 18:19:58 +01:00
Ken 9f0aed817f 🐛 Use ubuntu-latest for workflow actions, resolving brownout 2025-03-04 16:14:36 +01:00
fa1862da0d ⬆️ Bump stylelint-config-standard from 36.0.1 to 37.0.0 (#3570)
* ⬆️ Bump stylelint-config-standard from 36.0.1 to 37.0.0

Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 36.0.1 to 37.0.0.
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint-config-standard/compare/36.0.1...37.0.0)

---
updated-dependencies:
- dependency-name: stylelint-config-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🎉 Resolved stylelint versions mismatch

* 🎉 Resolved stylelint versions mismatch

* 🐛 Resolve dependency-mismatch for postcss node type

* 🐛 Revert inline-changes, use stylelint param type instead

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-03-04 15:06:15 +01:00
Ken 470518442f 🔥 Removed unused watch-script for ds-css, removed nodemon dependency 2025-03-04 13:14:08 +01:00
dependabot[bot] 46a5d20ce0 ⬆️ Bump lightningcss from 1.28.2 to 1.29.1 (#3571)
Bumps [lightningcss](https://github.com/parcel-bundler/lightningcss) from 1.28.2 to 1.29.1.
- [Release notes](https://github.com/parcel-bundler/lightningcss/releases)
- [Commits](https://github.com/parcel-bundler/lightningcss/commits)

---
updated-dependencies:
- dependency-name: lightningcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 13:12:10 +01:00
Ken 97130db7a5 💄 Use secondary-buttons for consent-banner 2025-03-04 13:11:59 +01:00
Ken a5e64c9f74 [Darkside] P3: Migrating all tokens to new prefix and colors (#3612)
* ✨ Setup darkside migration

* ✨ Can now convert primitives spacing

* 🧪 Added more tests

* 📝 Docs for utils

* 📝 Changeset

* 📝 Typos

* [Darkside] ✨ Added migration for css, less and scss (#3598)

* ✨ Added migration for css, less and scsss

* Update @navikt/aksel/src/codemod/migrations.ts

* ✨ Make old px spacing space-1

* ✨ Use esbuild to inline local references

* ✨ Added js migration to space-tokens (#3600)

* ✨ Setup first iteration of token translation object

* ✨ Started mapping old to new tokens

* ♻️ Simplified repalcement logic

* ✨ Added tests for token-migration

* ✨ Replaces old token with new reference

* ✨ Handle overrides of tokens

* 🧪 Global messages storage

* 📝 Added migration

* 🐛 Initialize message list

* ✨ Customizable results messaging

* ✨ Customizable results messaging

* 🐛 Use replacement, not ref

* 📝 Only document found legacy-tokens, dont rename them

* 📝 Better comments

* ✨ Added context to remaining token updates

* ✨ Added comments to unsupported token

* ✨ Format comments better, remove duplicates

* 📝 Success message if no legacy-tokens found

* 🐛 Return updated source files

* 🐛 Reference valid replacement

* 🔥 Removed comments

* ✨ Added better messaging

* ✨ Better messaging structure

* 🧪 Added more tests

* 🧪 Tests for less, scss, css and js tokens

* 🐛 CSS hits were shown as scss and less hits

* 📝 Format messages better

* 📝 Format messages better

* ✨ Added js-migrations template

* Update test runner

* 🐛 Revert mistakes

* 🐛 Resolve testing rig

* ✨ Js token migration

* 📝 Better docs for JS migration

* 📝 Added missing lineshift

* 🐛 Revert migration conflicts

* 📝 Better status docs
2025-03-04 13:06:33 +01:00
Ken 6e2e7a6d46 🐛 Resolve cookie-popup for /admin pages 2025-03-04 12:45:13 +01:00
Ken b9c1984078 ♻️ Cookie-tracking bug (#3620)
* ♻️ Cookie-tracking refactor

* 🐛 Memorize consent

* 🐛 Test always rendering script-tag

* 🐛 Test adding domains

* 📝 Test logging when tracking is enabled

* 🐛 Log umami-state

* 🔥 Revert test-config

* 🔥 remove manual umami track
2025-03-04 12:12:58 +01:00
github-actions[bot]andgithub-actions[bot] 2473bf4a96 Version Packages (#3619)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-04 11:21:50 +01:00
Ken 9add24abae 🐛 Added umami.nav.no to accespolicy 2025-03-03 16:29:56 +01:00
d4cfd094f4 Cookiebanner + Umami tracking (#3596)
* 🚧 umami test script

* 🚧 CSP for umami

* 🚧 test data-tag, set no auto tracking

* ♻️ make consentBanner more self contained

* 🚧 working implementation for consent modal

* ♻️ move ConsentBanner to website-modules + small changes

* use typescript-cookies over localStorage API

* Copy Nav.no consent text

* better name for cookie

* 🚧 crude complex consent object

* Update aksel.nav.no/website/components/website-modules/ConsentBanner.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* classify traffic better (umami)

* Update aksel.nav.no/website/components/website-modules/ConsentBanner.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* link to our own personvernerklering + disable modal on that specific page

* use same conditions for all showModal() triggers

* update comment

* limit cookie to specific subdomain (prevent it getting sent by clients to other *.nav.no pages

* remove the MutationObserver, but keep query param to disable banner (for tests)

* bypass banner in e2e tests

* store "no action" consent data in sessionStorage

* 🚧 change to in document flow style banner (no more modal)

* 📱 responsive consent banner++

* website: set cookie domain dynamically (from serving site)

* hardcode /side/personvernerklaering

* 🚧 placeholder cookie preferences box

* cookie preferences box++

* dokmøte plenumsendringer

* move page personvernserklaering

* make the cookie preference form functional

* ♿ add missing aria-labelledby target

* re-enable banner on e2e search tests

* Add explanation to organic and polluted traffic

* extract consent state into custom hook

* PR review changes

* ✨ Serverside-check for cookie consent

* banner set tracking id from env var

* remove unused url param check

* env var toggle for PRODUCTION

use this to inject code scripts clientside, do stuff during build or anything else really! (better to use this than NODE_ENV)

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-03-03 12:50:07 +01:00
Ken 5dbf34492a 📝 Better jsdoc for Theme-component 2025-03-03 12:21:45 +01:00
KenandJulian Nymark 96b9b8e5bc [Darkside] Implement className-switch (#3586)
* 📝 Update Accordion root

* 📝 Added comment to cn-function

* 📝 Updated Accordion, Alert and Button

* ♻️ Chat and Chips

* ♻️ CopyButton

* ♻️ Datepicker

* ♻️ Dropdown

* ♻️ ExpansionCard

* ♻️ Combobox

* ♻️ ConfirmationPanel

* ♻️ Tag

* ♻️ Timeline

* ♻️ Timeline++

* 📝 Theme

* ♻️ Panel

* ♻️ Stepper

* ♻️ Tabs

* ♻️ Skeleton

* ♻️ Popover

* ♻️ Loader

* ♻️ Link

* ♻️ Tooltip

* ♻️ Table

* ♻️ ErrorSummary -> FormSummary update

* ♻️ Radio, Search

* ♻️ Switch, Textarea

* ♻️ Textfield, guidepanel, Helptext

* ♻️ InternalHeader

* ♻️ Primitives -> List

* ♻️ Modal

* ♻️ ActionMenu

* ♻️ Pagination -> Typo

* ♻️ Update missing renames

* ♻️ Update migrated datepicker-components to use new className prefix

* [Darkside] ClassName prefix update CSS (#3591)

* 🚚 Rename all .navds prefixes to .aksel

* 📝 Changeset

* 📝 MD-docs

* ♻️ Update aksel prefixing for theme

* Update .storybook/docs/PilotsChangelog.mdx

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2025-03-03 11:30:48 +01:00
github-actions[bot]andgithub-actions[bot] a98bfb7a90 Version Packages (#3618)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-03 10:43:25 +01:00
Ken 6728754503 P1: [Darkside] Primitives spacing -> space migrations (#3597)
* ✨ Setup darkside migration

* ✨ Can now convert primitives spacing

* 🧪 Added more tests

* 📝 Docs for utils

* 📝 Changeset

* 📝 Typos

* [Darkside] ✨ Added migration for css, less and scss (#3598)

* ✨ Added migration for css, less and scsss

* Update @navikt/aksel/src/codemod/migrations.ts

* ✨ Make old px spacing space-1

* ✨ Use esbuild to inline local references

* ✨ Added js migration to space-tokens (#3600)

* ♻️ Use eslint-bundle as main build for CLI

* ♻️ Add mappings exports in ds-css, avoid using esbuild
2025-03-03 10:37:32 +01:00
github-actions[bot]andgithub-actions[bot] bf76336dc7 Version Packages (#3613)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-27 15:00:34 +01:00
Ken 06fecf2af1 🐛 Changed outline-offset to -3px in tabpanel 2025-02-27 14:58:51 +01:00
Ken 6ffebc72c7 🐛 Now hides global tokens from publishing in Figma 2025-02-25 11:36:08 +01:00
github-actions[bot]andgithub-actions[bot] c633deb3e7 Version Packages (#3604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-24 11:01:35 +01:00
Ken 441d8b732c 💄 Bumped bg-raised token to neutral-200 in darkmode. 2025-02-24 09:54:15 +01:00
github-actions[bot]andgithub-actions[bot] 2a4465a051 Version Packages (#3603)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-20 16:24:29 +01:00
Ken b77dbe0cad 🐛 Datepicker now checks that from/to dates are actually another day (#3602)
* 🐛 Datepicker now checks that from/to dates are actually another day

* 🐛 Wraps fromY/to dates in startOfDay to handle timezone differences
2025-02-20 16:17:08 +01:00
github-actions[bot]andgithub-actions[bot] 78fc16c1a9 Version Packages (#3593)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-19 12:01:40 +01:00
Ken 5937d085c0 ✨ Spacer-tokens (#3587) 2025-02-19 09:51:09 +01:00
Ken 2f248a65f7 ✨ Added docs-config for tokens 2025-02-17 11:20:03 +01:00
KenandVegard Haugstvedt 08e134ef3c [Darkside] ✨ Re-added arrow to Tooltip (#3589)
* ✨ Re-added arrow to Tooltip

* Update .storybook/docs/PilotMigration.mdx

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>

---------

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
2025-02-17 10:32:02 +01:00
Ken 821343b67d [Datepicker] Bumped react-day-picker to v9. (#3525)
* 📝 Bumped date-fns to v4

* TEMP UPDATES

* TEMP CSS UPDATES

* ✨ New Caption component for datepicker

* ♻️ Extract util

* ♻️ Refactor standalone datepicker

* ♻️ Refactor dialog datepicker

* ♻️ Migrated weekday-click

* ♻️ Migrated mobile-view week-click

* ⚰️ Removed old code

* 🚚 Re-strucutre project

* 🐛 Fix imports

* ♻️ New MonthPicker context

* ♻️ Replace use to MonthPickerContext

* ♻️ Migrated standalone monthpicker

* ♻️ Remove react-day-picker connection for utils

* 🚚 Re-structure MonthPicker

* 📝 rename context

* 🚚 Re-structure DatePicker

* 🐛 Fix imports and nb

* ♻️ Parts restructure

* 🚚 Move inputcontext

* 🚚 Co-locate date-spesific context

* 🚚 Co-locate date-hooks

* 🐛 Update missing import-updates

* 🐛 Use new input-context in modal, popover

* 🚚 Moved new utils into date-utils

* ♻️ simplified calendar-range logic

* 🐛 Fix test-runs

* 🧪 Storybook tests for monthpicker

* 🧪 Storybook tests for monthpicker

* 💄 Lock datepicker dialog to top of screen

* 🐛 Don't re-open modal

* 🐛 Avoid double open-toggle

* 🧪 Storybook tests for DatePicker

* ♻️ Use local dateRange-handler

* 🐛 month-update caused custom-components to re-render

* 🐛 casings

* 🐛 casings 2

* 🐛 casings 3

* 🐛 casings 4

* 🧪 Added tests for legacy dom-structure

* 🐛 Resolved re-render causing tests to fail

* 🧪 More datepicker tests, daypicker now requires us to handle focus

* 📝 Changeset

* Update @navikt/core/react/src/date/datepicker/parts/DatePicker.RDP.tsx

* 🐛 Added weekend-className for backwards compat support

* 📝 yarn lock sync

* 🐛 Allow defaultMonth-prop in Datepicker
2025-02-17 09:46:40 +01:00
Ken 19b42daa69 🐛 New 'god-praksis' artikles were hidden from frontpage unless referenced to 2025-02-14 14:59:22 +01:00
github-actions[bot]andgithub-actions[bot] 09c44edccb Version Packages (#3584)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-14 14:38:59 +01:00
Ken 2fab45f757 ✨ Added contrast-token to themable-roles 2025-02-14 14:16:51 +01:00
Ken 1ba5d9b5a2 [Darkside] Added support for ConfirmationPanel, Linkpanel, Panel and Dropdown. (#3581)
* ✨ Added ConfirmationPanel to darkside

* ✨ Added Panel support

* ✨ Added linkpanel support

* ✨ Added dropdown support

* 📝 changeset

* 🐛 Removed exception for now re-added CSS
2025-02-13 19:29:13 +01:00
Ken 5a749690c6 [Darkside] Updated darkside token-build (#3578)
* ✨ Added themed roles config to darkside

* ♻️ Rename breakpint config

* 🚚 Move files

* 🐛 Update renamed import

* 🐛 Build theme-files before readig them

* ♻️ Refactored color-tokens setup

* ♻️ Updated setup and imports

* ♻️ Hide unwanted tokenfiles

* 🐛 Update imports for refactored colors

* ♻️ Simplified token-build

* ♻️ Removed custom root build

* ♻️ Add cleanup-step

* 📢 Hide verbose warnings

* 🐛 Added --ax- prefix to global tokens

* 📝 Removed dark-theme tag
2025-02-13 19:28:34 +01:00
KenandJulian Nymark 2f7873d3e7 [Aksel.nav.no] ✨ Highlights 'darkside' sections in sidebar (#3582)
* ✨ Highlights 'darkside' sections in sidebar

* 🔥 removed test-code

* Update aksel.nav.no/website/components/website-modules/menu/Menu.tsx

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2025-02-13 15:35:46 +01:00
Ken e5dc975c44 ⬅️ Revert use of class update 2025-02-13 14:03:01 +01:00
Ken 1cc24c2998 [Darkside] Added hook for renaming className-prefix from navds-> aksel- (#3585)
* ✨ MVP replacement function

* ✨ Updated className replace function
2025-02-13 13:48:19 +01:00
Ken 636eb05bf5 ✨ Icon-update (#3583) 2025-02-13 13:24:27 +01:00
Ken c6424eda70 [Darkside] Tailwind support (#3580)
* 📝 Test config

* ✨ Added prefix-support, export for npm

* 📝 Added changeset, removed test-config

* 🐛 Removed conveluted tests

* 📝 Added temp-docs

* 📝 Added tailwind version suffix to export
2025-02-13 09:22:20 +01:00
Ken 90f76498d6 🐛 Handle icons where variant is 'filled' instead of 'fill'. 2025-02-13 09:14:42 +01:00
Julian Nymark 6201d87a1a Add more info on how to update an article (#3579) 2025-02-12 14:53:51 +01:00
Ken 4dcb4efeea 🐛 Fix flaky e2e-tests that timed out because of network-updates 2025-02-12 14:52:55 +01:00
Ken 5586d42096 Darkside role theming refactor (#3575)
* ✨ Added themed roles config to darkside

* ♻️ Rename breakpint config

* 🚚 Move files

* 🐛 Update renamed import

* 🐛 Build theme-files before readig them

* ♻️ Refactored color-tokens setup

* ♻️ Updated setup and imports

* ♻️ Hide unwanted tokenfiles

* 🐛 Update imports for refactored colors

* 📝 Clarify tests

* 📝 config -> configs
2025-02-12 09:24:43 +01:00
Ken 94e3bd7191 [Darkside] Added role-theming (#3569)
* ✨ Added themed roles config to darkside

* ♻️ Rename breakpint config

* 🐛 Update renamed import

* 🐛 Build theme-files before readig them

* 🐛 Updated breakpoint-import in test-files
2025-02-11 13:57:31 +01:00
Ken 0d886b12bf 📝 Added demo-page to pilot doc 2025-02-10 10:04:40 +01:00
Vegard Haugstvedt dfbec997fc Add language selector in decorator for templates (#3568) 2025-02-07 14:27:02 +01:00
Julian Nymark 1ec34524e7 Pilot docs edits (#3567)
* pilot text edits

* pilots edits

* pilot doc edits

* pilot doc edits

* update pilot docs
2025-02-07 12:53:16 +01:00
Ken 36f84458a5 🐛 Add type-annotations to exported ThemeProps 2025-02-07 12:08:52 +01:00
Julian Nymark 2271072d1c Website: remove snow (#3566) 2025-02-07 10:54:51 +01:00
Ken 0c22de8c61 [Aksel.nav.no] Added Hello bar under header (#3561)
* ✨ Added hello-bar

* 📝 Updated texts

* 🔥 Removed demo-versions

* 💄 Added x-axis padding
2025-02-06 13:50:00 +01:00
github-actions[bot]andgithub-actions[bot] 1b20ad54de Version Packages (#3563)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-06 13:17:51 +01:00
Ken 8576400263 🐛 Added BoxNew to index-export 2025-02-06 12:59:01 +01:00
github-actions[bot]andgithub-actions[bot] c1e6bcc6bd Version Packages (#3562)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-06 12:56:51 +01:00
Ken f269311dbb 🐛 Updated Theme component exports 2025-02-06 12:55:02 +01:00
Ken 11b1e98019 📝 Added link to design-docs for pilot-teams 2025-02-06 12:46:44 +01:00
github-actions[bot]andgithub-actions[bot] af39cbd79f Version Packages (#3557)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-06 12:41:35 +01:00
Ken a10e2a5c2d Merge branch 'main' of https://github.com/navikt/aksel 2025-02-06 12:16:51 +01:00
Ken bb02aa9c94 🐛 Updated List spacing in referansesider 2025-02-06 12:16:38 +01:00
Ken 2a26dc5130 ✨ Updated theme-switch toggle for demo pages 2025-02-06 12:14:37 +01:00
Julian Nymark cea27a85d9 pilot text edits (#3560)
* pilot text edits

* pilots edits
2025-02-06 12:11:18 +01:00
Ken 29798d83ac 🐛 Migrate referansesider to updated soft-hover tokens 2025-02-06 11:55:02 +01:00
Ken aefbf3e0de 🔥 Removed soft-hover and soft-pressed tokens 2025-02-06 11:53:39 +01:00
Ken ae02a87a9e [Darkside] Named brand-color tokens (#3559)
* 💄 Update background Header

* 💄 Update popover padding for smaller screens

* 💄 Adjusted borders

* 💄 Uses Alpha-tokens for zebra-stripes in Table

* 💄 Stronger border for hovered timeline items, transparent track bg

* 💄 Transparent lines for Tabs to contrast colored bg

* 💄 New icons for Table-sorting

* 💄 Selected exoanded item now has accent colors

* 💄 Keeps border-color for active state in search-button

* 💄 Removed hover-color change on checked radio

* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below

* 📝 Changeset

* 🚚 -hover tokens are now soft-hover

* ✨ Added soft-pressed token

* 💄 Use new soft-pressed token where applicable

* 💄 Default colored text is now 1000, strong replaced by subtle

* 🏷️ Updated primitive types for new text-tokens

* 🚚 Migrated old text-role-strong color to text-role-default

* 🚚 Migrated referansesider to new text-colors

* 🚚 Referansesider uses new soft-hover token

* 🐛 Fallback to updated accent-color

* [Darkside] Removed 'base' as neutral role replacement (#3556)

* ♻️ Remove default-scale as replacement for neutral in config

* 🧪 Setup chromatic-run for complete build

* 🚚 Text migrated

* 🚚 Text icon migrated

* 🚚 Text contrast migrated

* 🚚 bg soft migrated to neutral

* 🚚 bg moderate migrated to neutral

* 🚚 bg strong migrated to neutral

* 🚚 border default migrated to neutral

* 🚚 border subtle migrated to neutral

* 🚚 border strong migrated to neutral

* ⬅️ Revert chromatic preview

* 🚚 Migrated referansesider to new neutral scale

* 🚚 Use named brand and meta-colors

* 🚚 Referansesider uses new brand-names token
2025-02-06 11:36:07 +01:00
Ken 2558874480 [Darkside] Default role-text is now 1000, strong replaced by subtle (#3555)
* 💄 Update background Header

* 💄 Update popover padding for smaller screens

* 💄 Adjusted borders

* 💄 Uses Alpha-tokens for zebra-stripes in Table

* 💄 Stronger border for hovered timeline items, transparent track bg

* 💄 Transparent lines for Tabs to contrast colored bg

* 💄 New icons for Table-sorting

* 💄 Selected exoanded item now has accent colors

* 💄 Keeps border-color for active state in search-button

* 💄 Removed hover-color change on checked radio

* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below

* 📝 Changeset

* 🚚 -hover tokens are now soft-hover

* ✨ Added soft-pressed token

* 💄 Use new soft-pressed token where applicable

* 💄 Default colored text is now 1000, strong replaced by subtle

* 🏷️ Updated primitive types for new text-tokens

* 🚚 Migrated old text-role-strong color to text-role-default

* 🚚 Migrated referansesider to new text-colors

* 🚚 Referansesider uses new soft-hover token

* 🐛 Fallback to updated accent-color

* [Darkside] Removed 'base' as neutral role replacement (#3556)

* ♻️ Remove default-scale as replacement for neutral in config

* 🧪 Setup chromatic-run for complete build

* 🚚 Text migrated

* 🚚 Text icon migrated

* 🚚 Text contrast migrated

* 🚚 bg soft migrated to neutral

* 🚚 bg moderate migrated to neutral

* 🚚 bg strong migrated to neutral

* 🚚 border default migrated to neutral

* 🚚 border subtle migrated to neutral

* 🚚 border strong migrated to neutral

* ⬅️ Revert chromatic preview

* 🚚 Migrated referansesider to new neutral scale
2025-02-06 11:30:32 +01:00
Ken 83490d4711 [Darkside] Soft-pressed token (#3554)
* 💄 Update background Header

* 💄 Update popover padding for smaller screens

* 💄 Adjusted borders

* 💄 Uses Alpha-tokens for zebra-stripes in Table

* 💄 Stronger border for hovered timeline items, transparent track bg

* 💄 Transparent lines for Tabs to contrast colored bg

* 💄 New icons for Table-sorting

* 💄 Selected exoanded item now has accent colors

* 💄 Keeps border-color for active state in search-button

* 💄 Removed hover-color change on checked radio

* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below

* 📝 Changeset

* 🚚 -hover tokens are now soft-hover

* ✨ Added soft-pressed token

* 💄 Use new soft-pressed token where applicable

* 🚚 Referansesider uses new soft-hover token
2025-02-06 11:19:04 +01:00
Ken 281ac2d940 [Darkside] 🚚 -hover tokens are now soft-hover (#3553)
* 💄 Update background Header

* 💄 Update popover padding for smaller screens

* 💄 Adjusted borders

* 💄 Uses Alpha-tokens for zebra-stripes in Table

* 💄 Stronger border for hovered timeline items, transparent track bg

* 💄 Transparent lines for Tabs to contrast colored bg

* 💄 New icons for Table-sorting

* 💄 Selected exoanded item now has accent colors

* 💄 Keeps border-color for active state in search-button

* 💄 Removed hover-color change on checked radio

* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below

* 📝 Changeset

* 🚚 -hover tokens are now soft-hover

* 🚚 Referansesider uses new soft-hover token
2025-02-06 10:41:44 +01:00
Ken 70dd5b5926 ✨ Added descriptive naming for storybook controls 2025-02-06 10:41:27 +01:00
Ken fb5af09427 ✨ Added temp redirect to docs from /darkside 2025-02-06 10:38:29 +01:00
KenandVegard Haugstvedt e06f0c6f9e [Darkside] MVP documentation for testing (#3551)
* 📝 Setup docpage

* 📝 Setup page for docs

* 📝 Setup page for docs

* 📝 React-docs

* 📝 Clarify docs

* 📝 Token-docs

* 📝 Added changelog page

* 🔥 Removed references to static tokens

* 📝 Updated docs

* 📝 Updated migration

* 📝 Removed placeholder docs

* 📝 Use built-in color docs

* 📝 Second draft temp-docs

* 📝 Add feedback links, remove old css

* 📝 Updated docs

* Update .storybook/docs/PilotMigration.mdx

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>

---------

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
2025-02-06 10:21:11 +01:00
Julian Nymark 5492741688 ⏪ remove our custom spa-deploy action
the feature for cache_invalidation has been merged upstream, so we can use that now.
2025-02-05 16:26:53 +01:00
Ken 2bba7af7c2 [List] Deprecate listprops title, headingTag and description (#3537)
* 🔥 Deprecated title, headingTag and description for List

* 📝 changeset
2025-02-05 11:24:50 +01:00
Ken 8f9f313a85 [Darkside] Quality assurance P8 (#3536)
* 💄 Update background Header

* 💄 Update popover padding for smaller screens

* 💄 Adjusted borders

* 💄 Uses Alpha-tokens for zebra-stripes in Table

* 💄 Stronger border for hovered timeline items, transparent track bg

* 💄 Transparent lines for Tabs to contrast colored bg

* 💄 New icons for Table-sorting

* 💄 Selected exoanded item now has accent colors

* 💄 Keeps border-color for active state in search-button

* 💄 Removed hover-color change on checked radio

* 💄 Only non-responsive or left-static guidepanels shrink on tablet or below

* 📝 Changeset
2025-02-05 11:24:27 +01:00
Ken 1c31997be9 🔥 Avoid exporting 'static' tokens until needed. 2025-02-05 09:10:30 +01:00
Ken 75d2f7a595 [Darkside] Quality assurance P7 (#3530)
* 💄 Stepper text-colors

* 💄 Adjusted paddings form-summary

* 💄 Alpha-border formsummary

* 🐛 Re-added animation to formprogress

* 💄 moderate active state for button

* ♻️ Copybutton re-uses button-component

* 💄 Updated shadow for lightmode

* 🔥 Removed comments CopyButton

* 📝 Added bw-compatibility for CopyButton

* 🐛 Added default-size for legacy CopyButton

* 🐛 Boolean flipped so that legacy wrapper were used on wrong state

* 🐛 Boolean flipped so that legacy wrapper were used on wrong state

* 🐛 Now accounts for custom icons in legacy CopyButton
2025-02-04 19:01:46 +01:00
62aa43bab2 demoside aktivitetsplan (#3552)
* Getting started converting ActivityPlan to Aksel components

* Refactor ActivityColumn

* attempt to add Theme (from local path)

* 🚧

* 🐛 minify strips navds-r-p?

* use correct react package (local) and use padding prop

* correctly use the Theme wrapper in ThemeProvider

* Refactored MainCard

* Make ActivityCard more similar to "the real deal".

* Reduce column padding

* use Link component

* add missing href to links in sykepenger

* remove generic seletors on root

* dark mode for sykepengericon (also use tokens)

* Fixes console warnings

* Added activity view for activity plan reference page

* Design review changes

* Add HelpText to columns

* Add focus indicator for activity cards

* Minor css tuning

* 🐛 Blogg did not sort latest articles by publishDate

* [Actions] ⚡ Optimize workflows (#3480)

* 🚚 Moved auth-token, fetch less history

* ♻️ Use composite actions for workflow

* 🐛 Checkout before running composite workflow

* 🚚 Move composite actions to separate dir

* ♻️ Pass token to composite action

* 📝 Better test names

* ⚡ Optimize chromatic workflow

* ⚰️ Removed old and broken redeploy action

* ⚡ Optimized website-build

* ♻️ Use composite actions for prod and dev build

* ⚡ Reduced e2e tests by 40%

* ⚡ Improved sandbox testing

* ⚡ Update search-tests

* 🐛 Disable invalid example-demos

* 🐛 Wait for search completion

* 📝 removed old env input

* 🐛 Moved vars out to input

* 🐛 Don't ignore inputs for if-tests

* 🐛 Check input for truuthynes

* test: Run sharded playwright

* 🐛 Removed sharded workflow

* ⚡ Update re-use of actions

* 🐛 Keep full git-history for chroamtic

* Update .github/workflows/chromatic.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/referansesider-spa-deploy.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* 📝 Typo

* 📝 Typoo

* ⚡ Use built-in report for playwright

* 🐛 Use html-reporter, not list

---------

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* [Darkside] P 1/3 ♻️  Updated `default` scale to replace `neutral`-scale (#3487)

* ✨ Added new space tokens

* 🚚 Updated spacing-definitions

* ✨ Added new space-tokens to old system

* ✨ Added support for new space tokens i primitives

* 🔥 Removed space-tokens from tailwindcss

* 📝 Removed old comments

* [Darkside] Spacing -> Space update for CSS (#3478)

* 🚚 Migrated to new space-token

* 📝 Add docs for temp spacing

* 🐛 Add missing token-prefix to docs

* 🐛 Remove old tests

* 🐛 Added legacy-spacing support for primitives when using new theme-stystem

* ♻️ Move neutral-scale -> default scale

* ♻️ New box now supports updated default tokens

* ♻️ Default -> Soft token

* 📝 Update js-doc

* [Darkside] P 2/3 ♻️ Global/Meta-token naming, bumped role-scale (#3499)

* 💄 Text and border-tokens for roles bumped up

* 📝 Update global and meta-colors to numbers, removed hover color on accordion/button

* [Darkside] P 3/3 ♻️ Old neutral-scale now uses default-scale (#3488)

* ♻️ Use default-tokens for old neutral-scale

* 🐛 Fixed missing token migrations

* ♻️ role default  -> role-soft

* ♻️ Re-structure order and texts for GP section (#3492)

* ♻️ Re-structure order and texts for GP section

* 📝 Avoids extra capitalization for names

* Added script to check version-sync between workspace (#3486)

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* 📝 Better texts

* 📝 Better texts

* 📝 Added comments

* 📝 Updated minoer package-differences

* 📝 Upgraded stylelint

* 📝 Upgraded babel-loader

* 📝 Add ^ to ds-css versionsing across repo

* ♻️ Small refactor to reduce use of forEach

* Table: Removed border-bottom for HeaderCell used in ExpandableRow (#3503)

* Use HeaderCell for name in expandable table example

* 🐛 Removed border-bottom for HeaderCell used inside ExpandableRow

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>

* Version Packages (#3505)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ♻️ Removed raised-tokens from darkside roles

* 💄 Incremental layout and list-view update on Produktbloggen

* 🐛 Added missing 'li'-tag for list-item in blogglist

* [Table] ExpandableRow `contentGutter`-prop (#3507)

* ✨ New prop contentGutter for ExpandableRow component

* ✨ Added new prop-support in darkside CSS

* 📝 changeset

* Update @navikt/core/react/src/table/ExpandableRow.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Third bloggpost was sliced from view on frontpage

* ⬆️ Bump vite from 5.4.8 to 5.4.12 in /examples/referansesider (#3516)

* ⬆️ Bump vite from 5.4.8 to 5.4.12 in /examples/referansesider

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.8 to 5.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Repo-bump vite

* 🔀 Yarn lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>

* 📝 Added new sidebar category for /komponenter

* always render the maxSelected message when isMultiSelect (#3506)

* always render the maxSelected message when isMultiSelect

* also check if maxSelected is set

* Changeset

* Update .changeset/swift-readers-check.md

---------

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* 💄 Error borders uses danger-strong consistently (#3512)

* ♻️ Fix #3451 scaling for 400% zoom (#3514)

* 🐛 Using 'loader' inside 'icon'-prop broke layout caused by position absolute (#3515)

* [Darkside] Quality assurance P1 (#3510)

* 💄 Adjustments 1

* 💄 Bumped default strong scale

* 💄 Bumped secondary neutral border

* 💄 Reduced text-color change on hover

* 🐛 Resolved border and focus logic for combobox

* 🐛 Fix icon sizing for buttons

* 💄 Use tertiary-buttons for datepicker caption

* Update @navikt/core/react/src/chips/Toggle.tsx

* 💄 QA updates combobox darkside (#3511)

* Update swift-readers-check.md

* Version Packages (#3509)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update LICENSE

* [Darkside] Updated Focus design for Checkbox, Radio and Switch  (#3513)

* 💄 Focus-outline now around item checkbox,radio

* 🐛 Resolved small and indeterminate-state

* 💄 updated focus-markings for switch

* Update @navikt/core/css/darkside/form/radio-checkbox.darkside.css

* 🐛 Hide new indeterminate node from old checkbox

* [Darkside] Quality assurance P4  (#3518)

* 💄 Adjust bg transparency

* 💄 Default border now same scale as roles

* [Darkside] Quality assurance P5 (border-radius and font-weight)  (#3519)

* 💄 Update border-radius based on Figma

* 💄 More border-radius adjustments

* 💄 Bolder medium+ headings

* [Darkside] Updated focus-outline (#3520)

* 💄 Updated focus-outline

* 🧪 Added legacy-support for deprecated files

* 🐛 Account for legacy files in count

* [Darkside] Quality assurance P6 (Fileupload) (#3524)

* 📝 Update FileUpload CSS-artifacts

* 🐛 Synced release-text with updated role-colors

* ✨ New icons for sorting (#3528)

* Theming for sykepenge icon

* 🐛 Use correct global token for darkside JS

* Updated SykepengerIcon to be one shape

* Changed text color to subtle

* Layout fixes

* Refactor activity modal and improve rendering of activity details

* Remove the decorator from the activity plan reference page to reduce complexity

It is not necessary to show off dark mode, and it introduces some problems we need to solve.
Will keep the code, so we can re-introduce it later if we want.

* remove route listing, redirect index.tsx to aktivitetsplan

* re-add the switcher

* resulotions for ds-react, and tweak spacing for header

* Fill out more activity details

* remove unused files + fix up some old tokens

* Darker modal backdrop

* Make JobInterestBox stand out more in dark mode

* Adjust heading size to better preserve hierarchy, although the modal header should have been larger instead (not supported)

* Add gap for better responsiveness on mobile

* Revert to secondary button to not conflict with other primaries. May revisit this later

* Increased Page.Block gutter tokens

* Background softA is now working, so we don't need to check for which is the active theme

* Better responsiveness

* Add "Add new activity" modal

* Reduce texts for responsiveness

* Make "save" button narrower

* 🚧 test deploy cache-invalidation

* 👷 test again

* 💄 remove border under ThemeSwitch

* Delete .changeset/late-hotels-try.md

* Delete @navikt/core/css/darkside/primitives/page.darkside.css

* Revert "Delete @navikt/core/css/darkside/primitives/page.darkside.css"

This reverts commit e1d683898a.

* undo the change that will be done on main

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-04 16:57:53 +01:00
Ken 2434037250 🐛 Use new spacing-tokens in darkside theme 2025-02-04 16:44:11 +01:00
Julian Nymark a667f53dba 👷 testing++ 2025-02-04 14:50:57 +01:00
Julian Nymark 7bf6a81bd5 👷 testing 2025-02-04 14:40:49 +01:00
Julian Nymark 9bda05c3ce 👷 test using local action in workflow 2025-02-04 14:36:40 +01:00
Julian Nymark 6a7fbf7cc2 🚧 test adding a copy (with desired flag) of spa-deploy
action
2025-02-04 14:36:01 +01:00
Julian Nymark 51cc4de4df 👷 trying cache_invalidation for SPA deploy 2025-02-04 13:59:06 +01:00
Ken 132e2080a7 🐛 Revert vite v6 update, storybook fails on startup 2025-02-04 12:16:53 +01:00
Ken a516955681 ✨ Re-added neutral-roles scale 2025-02-03 15:02:25 +01:00
Andreas Nordahl 81449a3e67 Selecting an indeterminate checkbox checks all child items (#3549)
Ref. https://m3.material.io/components/checkbox/guidelines#26cbff1c-7a56-4237-b563-5593573e6cf4

| If some, but not all, child checkboxes are checked, the parent checkbox becomes an indeterminate checkbox. Selecting an indeterminate checkbox checks all child items.
2025-02-03 14:07:55 +01:00
github-actions[bot]andgithub-actions[bot] bb00b750e6 Version Packages (#3529)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-03 12:19:10 +01:00
dependabot[bot] 803eb21ab1 ⬆️ Bump cssnano from 6.0.0 to 7.0.6 (#3545)
Bumps [cssnano](https://github.com/cssnano/cssnano) from 6.0.0 to 7.0.6.
- [Release notes](https://github.com/cssnano/cssnano/releases)
- [Commits](https://github.com/cssnano/cssnano/compare/cssnano@6.0.0...cssnano@7.0.6)

---
updated-dependencies:
- dependency-name: cssnano
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 12:18:12 +01:00
dependabot[bot] dc548667ff ⬆️ Bump peter-evans/create-or-update-comment from 3 to 4 (#3539)
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](https://github.com/peter-evans/create-or-update-comment/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 12:14:16 +01:00
dependabot[bot] aa537e4d4a ⬆️ Bump peter-evans/find-comment from 2 to 3 (#3540)
Bumps [peter-evans/find-comment](https://github.com/peter-evans/find-comment) from 2 to 3.
- [Release notes](https://github.com/peter-evans/find-comment/releases)
- [Commits](https://github.com/peter-evans/find-comment/compare/v2...v3)

---
updated-dependencies:
- dependency-name: peter-evans/find-comment
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 12:13:40 +01:00
Ken 71408487e0 🐛 Refreshed yarn.lock to stop chromatic from breaking on build 2025-02-03 10:03:23 +01:00
Ken ddd04367af [Darkside]: SoftA-token added for use in Table zebra-stripes 2025-02-01 14:03:32 +01:00
dependabot[bot] 2303d6ce8c ⬆️ Bump the npm_and_yarn group across 4 directories with 11 updates (#3535)
Bumps the npm_and_yarn group with 8 updates in the /examples/astro directory:

| Package | From | To |
| --- | --- | --- |
| [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) | `4.15.8` | `4.16.18` |
| [braces](https://github.com/micromatch/braces) | `3.0.2` | `3.0.3` |
| [cross-spawn](https://github.com/moxystudio/node-cross-spawn) | `7.0.3` | `7.0.6` |
| [dset](https://github.com/lukeed/dset) | `3.1.3` | `3.1.4` |
| [micromatch](https://github.com/micromatch/micromatch) | `4.0.5` | `4.0.8` |
| [nanoid](https://github.com/ai/nanoid) | `3.3.7` | `3.3.8` |
| [rollup](https://github.com/rollup/rollup) | `4.22.2` | `4.32.1` |
| [tar](https://github.com/isaacs/node-tar) | `6.2.0` | `6.2.1` |

Bumps the npm_and_yarn group with 3 updates in the /examples/next-appdir directory: [cross-spawn](https://github.com/moxystudio/node-cross-spawn), [nanoid](https://github.com/ai/nanoid) and [next](https://github.com/vercel/next.js).
Bumps the npm_and_yarn group with 3 updates in the /examples/referansesider directory: [nanoid](https://github.com/ai/nanoid), [rollup](https://github.com/rollup/rollup) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 4 updates in the /examples/shadow-dom directory: [cross-spawn](https://github.com/moxystudio/node-cross-spawn), [nanoid](https://github.com/ai/nanoid), [rollup](https://github.com/rollup/rollup) and [tar](https://github.com/isaacs/node-tar).


Updates `astro` from 4.15.8 to 4.16.18
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/astro@4.16.18/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@4.16.18/packages/astro)

Updates `braces` from 3.0.2 to 3.0.3
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

Updates `cookie` from 0.6.0 to 0.7.2
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.2)

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `dset` from 3.1.3 to 3.1.4
- [Release notes](https://github.com/lukeed/dset/releases)
- [Commits](https://github.com/lukeed/dset/compare/v3.1.3...v3.1.4)

Updates `micromatch` from 4.0.5 to 4.0.8
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

Updates `nanoid` from 3.3.7 to 3.3.8
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

Updates `rollup` from 4.22.2 to 4.32.1
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.2...v4.32.1)

Updates `tar` from 6.2.0 to 6.2.1
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

Updates `vite` from 5.4.6 to 5.4.14
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.11/packages/vite)

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `nanoid` from 3.3.7 to 3.3.8
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

Updates `next` from 15.0.0 to 15.1.2
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.0.0...v15.1.2)

Updates `nanoid` from 3.3.7 to 3.3.8
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

Updates `rollup` from 4.22.4 to 4.32.1
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.2...v4.32.1)

Updates `vite` from 5.4.14 to 6.0.11
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.11/packages/vite)

Updates `cross-spawn` from 7.0.3 to 7.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

Updates `nanoid` from 3.3.7 to 3.3.8
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

Updates `rollup` from 4.22.0 to 4.32.1
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.2...v4.32.1)

Updates `tar` from 6.2.0 to 6.2.1
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.2.0...v6.2.1)

Updates `vite` from 5.4.6 to 5.4.14
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.11/packages/vite)

---
updated-dependencies:
- dependency-name: astro
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: braces
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cookie
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: dset
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: micromatch
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: rollup
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: next
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: rollup
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: rollup
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tar
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 14:54:23 +01:00
dependabot[bot] 216eae6f1d ⬆️ Bump the npm_and_yarn group with 4 updates (#3534)
Bumps the npm_and_yarn group with 4 updates: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite), [cross-spawn](https://github.com/moxystudio/node-cross-spawn), [nanoid](https://github.com/ai/nanoid) and [next](https://github.com/vercel/next.js).


Updates `vite` from 5.4.14 to 6.0.9
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.0.9/packages/vite)

Updates `cross-spawn` from 6.0.5 to 6.0.6
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/v6.0.6/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v6.0.6)

Updates `nanoid` from 3.3.7 to 3.3.8
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

Updates `next` from 14.2.15 to 14.2.23
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.15...v14.2.23)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: cross-spawn
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: nanoid
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: next
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-31 14:53:42 +01:00
Ken 0e5c58b28f 🩺 Add dependabot support (#3533) 2025-01-31 14:35:52 +01:00
Julian NymarkandKen 163c1bce04 Accordion: change: do animation similar to ExpansionCard (#3491)
* Accordion: change: do animation similar to ExpansionCard

* changeset

* change: comment expansioncard -> accordion

* don't need changeset for unreleased code

* 🚧 attempt to smooth out expansion of accordion

* working animation

* Update @navikt/core/css/darkside/accordion.darkside.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* accordion: remove border-bottom on content, add on item

* Update @navikt/core/css/darkside/accordion.darkside.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Accordion: only set box-shadow line for indented items

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-01-31 14:03:11 +01:00
Ken 8ee604e6a7 🐛 Remove update to inline-reset 2025-01-31 13:16:25 +01:00
Ken c73db43c96 Fixed Tailwind 4 migration bugs, broken build (#3532)
* 🧪 Added tw-reset to compare chromatic

* 🐛 ExpansionCard button had dynamic padding

* 📝 Added changeset, removed old stories from Tag
2025-01-31 12:58:45 +01:00
Ken 83960d7390 🐛 Use correct global token for darkside JS 2025-01-29 16:23:30 +01:00
Ken 6c81fc0b23 ✨ New icons for sorting (#3528) 2025-01-29 12:45:59 +01:00
Ken a8cbd92e1c [Darkside] Quality assurance P6 (Fileupload) (#3524)
* 📝 Update FileUpload CSS-artifacts

* 🐛 Synced release-text with updated role-colors
2025-01-28 20:38:29 +01:00
Ken 2700f7ac41 [Darkside] Updated focus-outline (#3520)
* 💄 Updated focus-outline

* 🧪 Added legacy-support for deprecated files

* 🐛 Account for legacy files in count
2025-01-28 20:37:23 +01:00
Ken c3ce2c50f8 [Darkside] Quality assurance P5 (border-radius and font-weight) (#3519)
* 💄 Update border-radius based on Figma

* 💄 More border-radius adjustments

* 💄 Bolder medium+ headings
2025-01-28 18:55:16 +01:00
Ken a7db426e04 [Darkside] Quality assurance P4 (#3518)
* 💄 Adjust bg transparency

* 💄 Default border now same scale as roles
2025-01-28 18:54:24 +01:00
Ken 68a2f0249b [Darkside] Updated Focus design for Checkbox, Radio and Switch (#3513)
* 💄 Focus-outline now around item checkbox,radio

* 🐛 Resolved small and indeterminate-state

* 💄 updated focus-markings for switch

* Update @navikt/core/css/darkside/form/radio-checkbox.darkside.css

* 🐛 Hide new indeterminate node from old checkbox
2025-01-28 18:53:48 +01:00
Ken 5f9fdb617b Update LICENSE 2025-01-24 14:37:44 +01:00
github-actions[bot]andgithub-actions[bot] b4f37e80d0 Version Packages (#3509)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-23 09:07:21 +01:00
Ken f70bebc03e Update swift-readers-check.md 2025-01-22 14:03:11 +01:00
Ken 7aa85beb01 [Darkside] Quality assurance P1 (#3510)
* 💄 Adjustments 1

* 💄 Bumped default strong scale

* 💄 Bumped secondary neutral border

* 💄 Reduced text-color change on hover

* 🐛 Resolved border and focus logic for combobox

* 🐛 Fix icon sizing for buttons

* 💄 Use tertiary-buttons for datepicker caption

* Update @navikt/core/react/src/chips/Toggle.tsx

* 💄 QA updates combobox darkside (#3511)
2025-01-22 13:58:27 +01:00
Ken d29509dc0a 🐛 Using 'loader' inside 'icon'-prop broke layout caused by position absolute (#3515) 2025-01-22 11:19:29 +01:00
Ken 90f6178c3a ♻️ Fix #3451 scaling for 400% zoom (#3514) 2025-01-22 11:19:21 +01:00
Ken 6678742543 💄 Error borders uses danger-strong consistently (#3512) 2025-01-22 11:19:13 +01:00
715a34ac7d always render the maxSelected message when isMultiSelect (#3506)
* always render the maxSelected message when isMultiSelect

* also check if maxSelected is set

* Changeset

* Update .changeset/swift-readers-check.md

---------

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-01-22 09:02:58 +01:00
Ken 85feb0ed8a 📝 Added new sidebar category for /komponenter 2025-01-22 08:53:44 +01:00
dependabot[bot]andKen d2a7c868d5 ⬆️ Bump vite from 5.4.8 to 5.4.12 in /examples/referansesider (#3516)
* ⬆️ Bump vite from 5.4.8 to 5.4.12 in /examples/referansesider

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.8 to 5.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Repo-bump vite

* 🔀 Yarn lock

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-01-22 08:48:18 +01:00
Ken edab37a5da 🐛 Third bloggpost was sliced from view on frontpage 2025-01-21 13:13:20 +01:00
KenandHalvor Haugan fad913ce6b [Table] ExpandableRow contentGutter-prop (#3507)
* ✨ New prop contentGutter for ExpandableRow component

* ✨ Added new prop-support in darkside CSS

* 📝 changeset

* Update @navikt/core/react/src/table/ExpandableRow.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2025-01-21 06:00:20 +01:00
Ken 54e03db491 🐛 Added missing 'li'-tag for list-item in blogglist 2025-01-20 10:00:48 +01:00
Ken b52806535d 💄 Incremental layout and list-view update on Produktbloggen 2025-01-20 08:26:19 +01:00
Ken bbca69af9c ♻️ Removed raised-tokens from darkside roles 2025-01-20 07:48:09 +01:00
github-actions[bot]andgithub-actions[bot] 7e6d91efd4 Version Packages (#3505)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-17 13:17:19 +01:00
Halvor HauganandKen 54495a4460 Table: Removed border-bottom for HeaderCell used in ExpandableRow (#3503)
* Use HeaderCell for name in expandable table example

* 🐛 Removed border-bottom for HeaderCell used inside ExpandableRow

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2025-01-17 12:58:10 +01:00
Ken 8b5bfb4b09 Added script to check version-sync between workspace (#3486)
* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* ✨ Added script for verifying dep-versions across workspace

* 📝 Better texts

* 📝 Better texts

* 📝 Added comments

* 📝 Updated minoer package-differences

* 📝 Upgraded stylelint

* 📝 Upgraded babel-loader

* 📝 Add ^ to ds-css versionsing across repo

* ♻️ Small refactor to reduce use of forEach
2025-01-17 12:11:54 +01:00
Ken 627d6d9a61 ♻️ Re-structure order and texts for GP section (#3492)
* ♻️ Re-structure order and texts for GP section

* 📝 Avoids extra capitalization for names
2025-01-16 10:14:42 +01:00
Ken f9c2c77559 [Darkside] P 1/3 ♻️ Updated default scale to replace neutral-scale (#3487)
* ✨ Added new space tokens

* 🚚 Updated spacing-definitions

* ✨ Added new space-tokens to old system

* ✨ Added support for new space tokens i primitives

* 🔥 Removed space-tokens from tailwindcss

* 📝 Removed old comments

* [Darkside] Spacing -> Space update for CSS (#3478)

* 🚚 Migrated to new space-token

* 📝 Add docs for temp spacing

* 🐛 Add missing token-prefix to docs

* 🐛 Remove old tests

* 🐛 Added legacy-spacing support for primitives when using new theme-stystem

* ♻️ Move neutral-scale -> default scale

* ♻️ New box now supports updated default tokens

* ♻️ Default -> Soft token

* 📝 Update js-doc

* [Darkside] P 2/3 ♻️ Global/Meta-token naming, bumped role-scale (#3499)

* 💄 Text and border-tokens for roles bumped up

* 📝 Update global and meta-colors to numbers, removed hover color on accordion/button

* [Darkside] P 3/3 ♻️ Old neutral-scale now uses default-scale (#3488)

* ♻️ Use default-tokens for old neutral-scale

* 🐛 Fixed missing token migrations

* ♻️ role default  -> role-soft
2025-01-16 10:14:23 +01:00
KenandLars Eirik Korsgaard Hansen a0ca882ee2 [Actions] ⚡ Optimize workflows (#3480)
* 🚚 Moved auth-token, fetch less history

* ♻️ Use composite actions for workflow

* 🐛 Checkout before running composite workflow

* 🚚 Move composite actions to separate dir

* ♻️ Pass token to composite action

* 📝 Better test names

* ⚡ Optimize chromatic workflow

* ⚰️ Removed old and broken redeploy action

* ⚡ Optimized website-build

* ♻️ Use composite actions for prod and dev build

* ⚡ Reduced e2e tests by 40%

* ⚡ Improved sandbox testing

* ⚡ Update search-tests

* 🐛 Disable invalid example-demos

* 🐛 Wait for search completion

* 📝 removed old env input

* 🐛 Moved vars out to input

* 🐛 Don't ignore inputs for if-tests

* 🐛 Check input for truuthynes

* test: Run sharded playwright

* 🐛 Removed sharded workflow

* ⚡ Update re-use of actions

* 🐛 Keep full git-history for chroamtic

* Update .github/workflows/chromatic.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/referansesider-spa-deploy.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* Update .github/workflows/ci.yml

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

* 📝 Typo

* 📝 Typoo

* ⚡ Use built-in report for playwright

* 🐛 Use html-reporter, not list

---------

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
2025-01-15 15:57:02 +01:00
Ken fd6e2b41cb 🐛 Blogg did not sort latest articles by publishDate 2025-01-14 14:08:03 +01:00
Halvor Haugan dd642d77e1 [aksel.nav.no] Make inert-prop in ShowMore work in React 19 (#3497) 2025-01-10 14:55:21 +01:00
Ken ad73a523a9 [Sanity] Updated actions and badges (#3484)
* 📝 Better naming for heading in richtext editor

* ♻️ Better syntax for publish-action

* ♻️ Refactored publication-flow plugin

* 🚚 Moved quality-assurance texts

* ♻️ Better handling of verification flow

* 🐛 Fixed verification without publish action

* 🐛 Check for permissions before assuming publish will work
2025-01-09 15:12:47 +01:00
Lars Eirik Korsgaard Hansen e92eb90d33 🎨 Small refactor of translateTokenStringToCSS function for readability (#3495)
* Small refactor of translateTokenStringToCSS function for readability

* Add missing curly braces
2025-01-09 14:33:10 +01:00
KenandLars Eirik Korsgaard Hansen eec41d6cb8 [Sanity] ✨ Can now add border to image-module in sanity (#3493)
* ✨ Can now add border to image-module in sanity

* Update aksel.nav.no/website/sanity/schema/objects/shared/bilde.tsx

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>

---------

Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
2025-01-09 14:30:01 +01:00
Ken 8da0af090f [Darkside] Spacing token is now "Space" (#3477)
* ✨ Added new space tokens

* 🚚 Updated spacing-definitions

* ✨ Added new space-tokens to old system

* ✨ Added support for new space tokens i primitives

* 🔥 Removed space-tokens from tailwindcss

* 📝 Removed old comments

* [Darkside] Spacing -> Space update for CSS (#3478)

* 🚚 Migrated to new space-token

* 📝 Add docs for temp spacing

* 🐛 Add missing token-prefix to docs

* 🐛 Remove old tests

* 🐛 Added legacy-spacing support for primitives when using new theme-stystem

* 📝 Updated JSDOC
2025-01-08 09:22:45 +01:00
github-actions[bot]andgithub-actions[bot] 99465ddbeb Version Packages (#3490)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-07 12:02:45 +01:00
Ken 25305ebba0 🐛 Use inside Alert got wrong text-color while focused or active (#3489) 2025-01-07 11:50:28 +01:00
Halvor HauganandKen ef3464c96c Support contributions from outside Nav + update some README files (#3483)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2025-01-06 11:36:42 +01:00
Ken 0480d785c4 🔇 Removed amplitude logging (#3485) 2025-01-01 12:56:36 +01:00
Halvor Haugan ef5e671cfe i18n: rename some files, add tests for useDateLocale (#3481) 2024-12-28 17:05:15 +01:00
Halvor HauganandKen fa156773e0 Upgrade vitest and some related packages (#3482)
* vitest

* Upgrade @testing-library

* Fix error building ds-react

* Upgrade "jsdom" in react-workspace (fixes "The `punycode` module is deprecated")

* ♻️ Matched JSDOM-versions across workspace (v25)

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-12-28 17:03:37 +01:00
Halvor HauganandKen 137b4c49c1 Automatically add JSDoc with default values to nb.ts (#3479)
* Automatically add JSDoc with default values to nb.ts

* Added jscodeshift to devDeps

* 🐛 Use same jscodeshift versions

* 🐛 Use same types for jscodeshift

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-12-23 12:03:07 +01:00
Ken 1fb72241fe [Aksel.nav.no] Image comparison module (#3473)
* WIP

* WIP CompareImages

* ✨ Handle more keys

* ♻️ Re-use positioning code

* 💄 Adjust for width

* ✨ Added sanity schema

* 💄 Moved focus to box, allow handle to overflow leftside by 1 px

* ✨ Added bg and alt-text support

* 🐛 Change env back to production
2024-12-23 11:55:52 +01:00
Julian Nymark 42470baaaf ❄️ ⛄ 🎶 🎄 Website: add snowfall (again!) (#3475)
* Website: add snowfall

* website: add egregious christmas ambience

* Revert "website: add egregious christmas ambience"

This reverts commit 3fb858b6ad.

* move dep

* yarn.lock
2024-12-20 15:23:19 +01:00
github-actions[bot]andgithub-actions[bot] 8cd6512181 Version Packages (#3474)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-20 14:48:03 +01:00
Halvor Haugan 7e976f9e20 [aksel.nav.no] Add example of ErrorMessage with icon (#3476) 2024-12-20 12:13:30 +01:00
Ken db828bddd3 [Switch] Updated default design to better reflect unchecked state (#3468)
* WIP Switch update

* 💄 Updated Switch to reflect unchecked state better

* 📝 Synced token for switch
2024-12-20 11:27:33 +01:00
443b129fe1 Bugfix/button loading issue in modal (#3252)
* Check loading prop for showing spinner, not widthOverride.

Making this change because widthOverride sometimes gets set to 0 (should also be fixed), meaning this check fails as "falsy".

* Prevent setting width to 0 while showing spinner, to avoid issue in Modals

Checking that width is truthy (not zero) will avoid issue where widthOverride gets set to 0 because the button is not yet rendered.

* Add changeset

* Replace width calculation with just visually hiding label + icon and absolutely positioning the loading icon.

* Update @navikt/core/react/src/button/Button.tsx

* add story for bug case

* We no longer use buttonRef/mergedRef internally, so removed them and set ref directly

* Update @navikt/core/css/button.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Hiding everything except loading spinner is more robust than hiding every specific item.

* In loading-state, the button icon will no longer be able to be the only child (hidden), because of the loader icon. Instead checks for no label.

Could consider :not(:has(:is(.navds-button__icon, .navds-loader))) as well, to be more robust, but it might be overkill.

* Much simpler/easier to read

* Don't need to destructure style, only to add it along with rest.

* Should destructure onKeyUp from props, instead of having it added through filteredProps and then overridden afterwards.

* Quick and easy conversion for darkside

* Unnecessary :is after refactoring

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-12-20 10:44:04 +01:00
Ken 561fecbcac [Darkside] Updated <Theme /> component (#3467)
* 🚚 Rename and move theme-component

* 🐛 Portal now preserves theme when out of cascade

* 🐛 useThemeInternal missing strict-mode false

* 🐛 Removed unused storybook story

* Update @navikt/core/react/src/theme/Theme.tsx

* 📝 remove commented out code
2024-12-20 09:29:22 +01:00
Ken 00177898f5 [Select] 🐛 Focus-border no longer cancels out error-border. (#3465)
* 🐛 Focus-border no longer cancels out error-border.

* ♻️ Optimize CSS selectors, fix textarea

* 📝 Changeset
2024-12-19 17:20:10 +01:00
Ken 38f5e63008 🐛 Removed default tokens added to tailwind, added opacity-token (#3472) 2024-12-19 16:33:42 +01:00
Halvor Haugan c3d65a681e Make Chromatic workflow fail on errors but not on changes (#3471) 2024-12-19 16:05:07 +01:00
Ken 3025e4eb5c [Darkside] ✨ Now adds version-tokens to tokens css (#3466)
* ✨ Now adds version-tokens to tokens css

* ♻️ Remove redundant exist-check
2024-12-19 15:30:49 +01:00
Ken 043277f79b [Darkside] 💄 New ToggleGroup design (#3460)
* 💄 New ToggleGroup design

* 🐛 Removed hover-state from selected togglegroup in forced-colors mode

* 💄 Add px-gap to elements

* 🐛 Hide divider on both sides when selected
2024-12-19 15:16:03 +01:00
Julian NymarkandHalvor Haugan a2b3936878 Textarea: resize immediately upon receiving resize event (#3463)
* change: add story to demonstrate buggy textarea behaviour inside modal

* use lodash debounce with our own default value for wait

* Revert "use lodash debounce with our own default value for wait"

This reverts commit 7638297765.

* change: add leading to debounce + use it in TextareaAutoSize

* changeset

* changeset + co-author

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-12-19 14:23:39 +01:00
Julian Nymark c90abe7c23 [Darkside] Warning triangle icon in error messages (#3445)
* change: support icon in ErrorMessage + warning icon for textarea error

* change: ignore icon on old CSS + tweaks

* change: do not nest in old css

* wip commit (works nicely)

* clean up css for errormessage, remove it from form.css

* 🐛 tweaks + use icon in Search

* use icon for the rest of our form components

* backport new css to old form.css

* 🔥 remove unnecessary specification bump

* cleaner example story

* changeset

* ♻️ icon -> showIcon

* make flex & gap opt-in with 'icon'

* change: inline ErrorMessageIcon

* change: nest css more

* revert test changes (utility in multiple variants on one for DOM diffing, but probably no longer useful)

* debloat changeset

* mention form components in changeset

* change: typo in changeset

* change: typo in changeset
2024-12-19 14:17:50 +01:00
github-actions[bot]andgithub-actions[bot] ea19081b71 Version Packages (#3454)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-19 11:03:46 +01:00
Ken b9da4fd716 📝 Rename NAV -> Nav (#3470) 2024-12-19 10:08:52 +01:00
Kyrre Havik 858849d743 upkeep: NAVs -> Navs 2024-12-18 15:56:26 +01:00
Ken ae9e6235db [Combobox] Only open dropdown onClick, not onFocus. (#3440)
* ✨ Solves issue where programatic focus to fix error would show dropdown list and hide error

* 🚚 Moved onclick listener for open-state to input, not wrapper

* Update .changeset/forty-rules-ring.md
2024-12-18 15:29:08 +01:00
Julian NymarkandKen f895555ab2 [Darkside] timeline update CSS (#3438)
* change: timeline periods

* update stories for timeline

* change: Timeline pin update

* change: crude variable renaming (--a- -> --ax-)

also likely done with zoom buttons,
a bit of popover styling fix

* change: popover z-index bump

* change: remove unnecessary CSS state :active

* change: z-index fix, correct token usage

* change: remove @supports not selector(:focus-visible)

* change: use proper tokens

* change: can't get focus on popover

* change: remove arrow from popover consumers

* change: only render arrow div when !themeContext

* 💄 Use smaller offset without arrow, use subtleA border for popover

* 💄 Adjusted popover tokens for timeline

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-12-17 15:37:31 +01:00
Ken 372a14b225 [Referansesider]: Updated CSS import breaking workflow 2024-12-17 14:49:29 +01:00
Ken a82126b893 🐛 Fixed Expandable row cursor (#3462) 2024-12-17 14:35:41 +01:00
KenandHalvor Haugan 06193ae300 Inline Alert: <Link>-components used within avoids re-colororing (#3461)
* 💄 Avoid coloring links whe used in Inline Alert

* 📝 Alert changeset

* Update .changeset/eleven-gorillas-scream.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Added link-demo to inline-story

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-17 14:35:31 +01:00
Ken b6db2c4ce5 [Darkside] Tag CSS update (#3459)
* ✨ Added darkmode-support to Tag

* 🐛 Update spacing-tokens to new format

* ✨ Added darkmode-support to Tag

* 💄 use canvas-color for text on filled forced color text

* ♻️ Use classNames for tag colors, not data-attrb

* 🐛 Old Tag-css supports new names
2024-12-17 13:18:43 +01:00
Ken d4ee3afb12 [Aksel.nav.no] ✨ Added alpha-category to component-pages 2024-12-17 10:21:31 +01:00
KenandHalvor Haugan 6d6900c08b [Timeline]: Earliest date defaulted to current date when found date was later than current day (#3458)
* 🐛 Timeline startDate defaulted to current Date when later than current day

* 🧪 Added tests

* Update @navikt/core/react/src/timeline/hooks/useTimelineRows.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Removed old exceptions

* 📝 Changeset

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-16 20:40:26 +01:00
Ken 3b43ad51f9 💄 Added outline to OG-image in blog-articles 2024-12-16 16:41:49 +01:00
Ken fe4ad00462 🐛 Incorrect import broke chromatic-build 2024-12-13 18:21:13 +01:00
Ken 2ea0876e50 🐛 CSS-export for /dist did not support /**/-glob 2024-12-13 14:55:34 +01:00
Ken 460c9c3dbd 🐛 Updated ds-css exports to include tokens.json 2024-12-13 14:50:06 +01:00
Ken 88dc43bd50 ♿ CopyButton now tells SR what you are copying (#3455)
* ♿ CopyButton now tells SR what you are copying

* ♻️ Re-use sanitized name for semantic copybutton
2024-12-13 14:37:53 +01:00
KenandHalvor Haugan 2e476ef559 [Darkside] Updated CSS-bundle (#3430)
* V1 of CSS bundler

* V1 of CSS bundler

* ♻️ Added target checking for browser

* ♻️ Remove built in variables added by lightningcss

* Setup bundling of darkside

* 🐛 Fix path resolving in bundle script

* Setup bundling for index

* 🚚 Re-order layering

* ✨ Filter for only components in bundle

* 🚚 Moved token-definition

* 🔥 Removed index.css copy

* ✨ Global build

* ✨ form and primitives build

* ✨ Component build

* ✨ Build versions dir for new setup

* :test_tupe: Added tests for bundle

* 🚚 Move bundle file to config

* 📝 Comments

* ✨ Allow import of darkside directly under ds-css

* 🐛 Use relative import for CSS in storybook

* [Darkside] Updated input-bg in darkmode, added token for opacity (#3441)

* [Darkside]: Update bg-input to be darker in darkmode

* Added opacity-token

* Use token for disabled opacity

* Update @navikt/core/css/darkside/button.darkside.css

* ♻️ De-dupe reading of index.css

* ♻️ Use regex to remove - and space instead of lodash

* 🥅 Throw when bundler fails

* Update @navikt/core/css/config/bundle.darkside.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/css/config/bundle.darkside.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Updated opacity-tokens types, resolved import conflict

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-13 13:53:37 +01:00
KenandHalvor Haugan f3542d50d4 [Darkside] Tokens package finishing touches (#3435)
* ✨ Updated exports to allow better darkside support

* ✨ Setup less and scss support for darkside

* ✨ Added static build for tokens

* ✨ Token-config exports

* 🐛 Resolved import conflicts between tailwind and css

* 🐛 Resolved import conflicts between tailwind and css

* ♻️ Refactor Token-setup for better typing

* ♻️ WIP resolve import conflicts2

* ♻️ Avoid importing JSON in react from tokens

* 🐛 Resolve updated imports in referansesider after refactor

* Update @navikt/core/tokens/.gitignore

* Update @navikt/core/tokens/types.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Removed prefix 'ax' when generating static tokens for js

* 🐛 Resolved export syntax to support less, scss and JS

* 📝 Updated JSDoc to link directly to types

* Update @navikt/core/tokens/darkside/figma/figma-config.types.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Use colorRole-array as bases for Role array

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-13 13:37:42 +01:00
Halvor Haugan 1f9a343afc Combobox: Fix issue where you could select more options than defined in maxSelected (#3434) 2024-12-12 12:59:39 +01:00
Ken f026817dd3 [Darkside] Tailwind darkside file export (#3431)
* ✨ Added darkside export to tailwind package

* 🚚 Move darkside build-script to separate script

* 🐛 Avoid using darkside for website yet
2024-12-12 12:24:04 +01:00
Ken 36190f7657 📝 Update Textfield example for readonly after feedback (#3448) 2024-12-11 16:30:22 +01:00
Ken f12070842a [Darkside]: 🐛 Remove 'state'-tokens from new Box-component 2024-12-11 11:42:48 +01:00
Ken 601e1569f8 [Darkside]: Updated gap between text and icon in Link 2024-12-11 09:25:56 +01:00
Ken f7452d5d0d [Darkside]: Added darkmode-support to Tooltip (#3442) 2024-12-11 09:21:54 +01:00
github-actions[bot]andgithub-actions[bot] 04e65c701c Version Packages (#3439)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-09 15:42:28 +01:00
Halvor Haugan 878ee68e5c ✨ Release i18n support (#3429)
- Merged LanguageProvider into Provider, while also changing the API a bit to make it easier to use (with the help of TS).
- Updated tests for `useI18n()` according to changes in API.
- Chips.Removable: Removed prop `removeLabel`.
- DatePicker/MonthPicker: Added new `translations` prop and deprecated `locale` prop.
- Search: Deprecated prop `clearButtonLabel`.
- Textarea: Deprecated prop `i18n`.
- Timeline: Deprecated prop `axisLabelTemplates`.
- nb/nn/en.ts:
  - Arranged the top level keys alphabetically.
  - Merged `close` in Modal and DatePicker and put it under the `global` key.
  - Changed Search.clear from "Clear" to "Clear field" to make it more... clear 😅
  - Removed Combobox.clear since the clear button has been removed.
  - Made them importable from `@navikt/ds-react`
2024-12-09 15:38:49 +01:00
Ken ade48469dd [Darkside]: Secondary-button defaults to bg-input 2024-12-09 13:43:12 +01:00
Julian NymarkandKen cbea73abda [Darkside] GuidePanel CSS update (#3403)
* GuidePanel initial CSS rewrite

* ✨ new illustration

* change: layout

* change: add speechbubble arrow

* change: dark mode raised for speechbubble arrow

* change: correct stroke path color (actually fill) of path in svg

* change: fine tuned SVG with padding and overlapping paths

* change: exception CSS for FF rendering of speech bubble tail

* change: hardcode calculation as whole pixel value remove FF custom CSS

* change: convert BEM modifiers to simpler CSS data-attributes

* change: display:none for speech bubble tail on old token system

* change: refactor old css to use the attribute selectors

* change: noSVG example (see default story for side-by-side)

* change: rewrite to using only SVG for speechbubble

* change: only looks good in lightmode, no token support / hardcoded

* :refactor: Updated Guidepanel CSS to use SVG

* 🔥 Remove old commented CSS

* 🐛 Fixed cases where mediaqueries would target nesten element instead of itself

* 🗑️ Cleanup of unused code

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-12-09 12:23:54 +01:00
Ken fd2e65e790 ✨ Stop page-scroll when previewing compoment-examples to reduce noise 2024-12-06 20:44:56 +01:00
Halvor HauganandKen f720562908 Combobox: Removed clear button, deprecated props clearButton/clearButtonLabel, changed maxSelected to number. (#3433)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-12-06 16:33:45 +01:00
KenandHalvor Haugan 5dedfa104a 🐛 Complete CSS-build was included in components.css bundle (#3427)
* 🐛 Complete CSS-build was included in components bundle

* Update .changeset/thick-tools-behave.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-06 16:18:04 +01:00
Ken 0189bd7b4a [Darkside] Table CSS update (#3396)
* ✨ Added darkmode support to table

* 📝 Added comments

* 📝 Added todo

* :refactor: Avoid use of custom animate height function

* :refactor: Use Alpha-token on hover-selected

* :refactor: Remove redundant token-use

* Update @navikt/core/css/table.css

* ♻️ Reverted to animate-component for table animation
2024-12-06 15:49:50 +01:00
Halvor Haugan 119d699ff2 Fix Combobox example 'react-hook-form' (#3436) 2024-12-06 15:01:43 +01:00
github-actions[bot]andgithub-actions[bot] fbc580e6bc Version Packages (#3420)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-06 14:30:55 +01:00
Halvor Haugan 13a9a2159f Refactor accordion stories (#3432) 2024-12-05 22:01:54 +01:00
Vegard HaugstvedtandHalvor Haugan 89e069d1d6 CopyButton: i18n & remove prop activeTitle (#3426)
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-12-05 13:36:33 +01:00
Halvor Haugan 4896bb1569 FormSummary: add translation (#3428) 2024-12-05 13:17:13 +01:00
Ken 713ccafed1 🐛 Accordion now deconstructs sanity-references (#3422) 2024-12-05 10:23:13 +01:00
Ken 4632a3ae2b [Darkside] Updated components based on Figma-comments (#3417)
* 💄 Alert now synced with standardized panel padding

* 💄 Expansioncard synced with standardized panel padding

* 💄 Chat synced with standardized panel padding

* 💄 ErrorSummary synced with standardized panel padding

* 💄 FileUpload synced with standardized panel padding

* 💄 FormSummary synced with standardized panel padding

* 💄 FormSummary synced with standardized panel padding

* 💄 Modal synced with standardized panel padding

* 💄 Popover/Helptext synced with standardized panel padding

* 💄 Text-neutral did not work in darkmode for Button. Now uses text-default
2024-12-04 16:26:21 +01:00
KenandHalvor Haugan f6666302f5 [Darkside] Updated Primitives CSS to use new token-prefix (#3405)
* 📝 Overlap comments

* WIP: update primitives prefixing

* ♻️ Use updated prefix in primitives ts-code

* ♻️ Use updated token-prefix in css

* ♻️ Use updated tokens in primitives css utilities

* 🔥 Removed backwards-compat with old stack CSS

* [Darkside] Primtives prop-support (#3423)

* :refactor: Support primitives with new theme

* :refactor: Use sub-component for new Box update

* ♻️ Update support for new and old theme in Page and Box

* ♻️ Resolve instances where tokens were not correctly named for theme-support

* ♻️ Avoid exposing component before necesarry

* ♻️ Avoid having to import figma-types in ds-react

* ♻️ Using camelCase on tokens breaks primtives. Now uses kebab-case

* 🔥 Removed comment used as notes

* Update @navikt/core/react/src/layout/page/Page.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/box/Box.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Remove redundant prefix const

* ♻️ remove redundant T-suffix on types

* ♻️ Better previews on hover when checking token-props

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ More fine-grained exception-testing for use of old props in Box

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-04 10:35:32 +01:00
Halvor HauganandKen bae136f847 Translate GuidePanel and HelpText, remove text from InternalHeader. (#3424)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-12-04 10:29:26 +01:00
Ken 53d1fe517e [Darkside] Tailwind: Added tests for new config setup 2024-12-03 12:48:59 +01:00
Ken ea0d7c1386 [Darkside] Tailwind: Added shadow-token support 2024-12-03 12:41:35 +01:00
8ea6c220dc [Darkside] datemonthpicker (#3357)
* 🚧 wip

* [Darkside] ErrorSummary updated CSS (#3331)

* First run for errorsummary css update

* Added nesting

* [Darkside] Fileupload CSS update (#3343)

* ✨ Updated Dropzone with darkmode

* ♻️ Added nesting for root

* ♻️ ac -> acx prefix for interla tokens

* ♻️ Removed reduntant token

* ♻️ More nesting

* 💄 Align overlay on drag better

* ⚰️ Removed test-code

* 💄 Update hover-border for dropzone

* 🐛 Removed border-color update on hover in disabled state

* ♻️ Use bg input on area, use border default

* [Darkside] Link CSS update (#3353)

* ✨ Darkmode-support for existing link-component

* :refactor: Adjusted line offsets and thickness

* [Darkside] ExpansionCard CSS update (#3338)

* 💄 Initial css-update expansioncard

* 📝 Added sub-headers

* 💫 Button animation

* ✨ Added data attrb for open-state

* 💫 Updated content animation

* ♻️ Added nesting

* ♻️ Better nesting of rules

* ♻️ Use outline for hover border

* ♻️ Use border as default outline

* 🔥 Remove redundant border css

* 🔥 Removed divider transition, unused state attributes in react

* [aksel.nav.no] Update examples of Page (#3349)

* Changesets: Run yarn as part of create-version

* Combobox: Fix issue where using arrow keys in list would make the entire page scroll (#3364)

* [Darkside] FormSummary updated CSS (#3345)

* :refactor: Use updated CSS for darkside

* 💄 Replace accent bg with info bg

* [Docs] Use NAV-dekorator for Page examples (#3362)

* [aksel.nav.no] Update examples of Page

* comment

* comment + rename + style->class

* fix

* 📝 Use NAV-dekorator for Page-examples

* 🚚 Moved content to separate __parts location

* :refactor: Updated examples

* Update aksel.nav.no/website/components/website-modules/examples/__parts/PageDemoContent.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Use correct import syntax for parts

* 📝 Add description to page-block default story

* 💄 Removed spacing from all typo-headings in demo

* 🐛 Removed react import from content part

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Git hooks that notify when yarn.lock have changed (#3361)

* 💄 first pass css updates

* 🎨 nest CSS

* Datepicker: 💄 css layer changes & remove extra border

* 🔥 remove resolved todo

* 💄 border radius for caption buttons

* 🎨 drastically simplify focus outline

* change: make button selector less wildcardy

* change: outline smaller for rdp-cell buttons

* change: width large enough to show 4 characters in year caption

* change: match design for range middle selected

* change: remove redundant error CSS

* change: remove unused CSS

* change: un-shuffle css import ordering for date.css

* change: remove unused CSS

* change: week buttons & day button active

* change: use secondary-neutral button for weeknumber buttons

* change: same selector for month and day buttons, active state

* 🐛 Fixed weeknumber as the button broke old datepicker

* change: remove double border on captions, active state on disabled

* ♻️ Updated weeknumber to be barkw-compat with old system

* 🚚 Moved date-import further up

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-12-03 12:09:53 +01:00
Ken 9a190d371b [Darkside]: Removed hover-effect from disabled button in forced-color mode 2024-12-03 11:38:45 +01:00
KenandHalvor Haugan 685066e791 [Darkside] Search CSS update (#3385)
* ♻️ Use variables for Button-adjustment

* :refactor: Removed redundant selector nesting for disabled buttons

* :refactor: Use aksel-button for clearbutton

* ✨ Added darkmode support to Search

* :refactor: Updated paddings

* :refactor: Added disabled-support

* :refactor: Updated border of button when input is hovered

* Update @navikt/core/react/src/form/search/Search.tsx

* 🐛 Add correct button CSS from main

* 💄 Placeholder set to text-neutral

* ♻️ Undo nesting

* ♻️ Better error-css structure

* 📝 Added disabled-stories

* 💄 Set opacity on searchicon when disabled

* Update @navikt/core/react/src/form/search/Search.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-12-03 11:24:56 +01:00
Lars Eirik Korsgaard Hansen 41a21d280a fix forced colors toggle group (#3421) 2024-12-02 13:26:34 +01:00
Halvor Haugan 1895f4f763 Combobox: add translations and adjust buttons (#3409)
Hid buttons from screen readers since you can't tab to them anyways. Moved sr-only text on clear button to title attr. Removed sr-only text on toggle list button. Removed prop toggleListButtonLabel.
2024-12-02 12:55:02 +01:00
Halvor Haugan 8bc9a80bd4 Adjust examples of Combobox (#3419) 2024-12-02 10:42:59 +01:00
Lars Eirik Korsgaard Hansen d5a6285110 [Darkside] Togglegroup CSS update (#3400) 2024-12-02 10:38:28 +01:00
Vegard Haugstvedt 856e54aa2d Bugfix/CopyButton: Reduce over announcing active state (#3374)
* Prevent active text being announced waaay too many times.

* Add changeset

* New attempt at consistently reduced status messages on "copy" click

* Remove aria-relevant and aria-atomic to make announcement consistent between Safari and other browsers
2024-11-29 15:43:49 +01:00
github-actions[bot]andgithub-actions[bot] 8951c5c09c Version Packages (#3404)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-29 15:11:37 +01:00
fa2904d54b Remove space from combobox single select (#3384)
* When single select on combobox, remove the gap between the input and the selected value.

* ♻️ Updated spacing between options and input in Combobox

* 📝 Changeset

* Revert darkside update

* ♻️ Update darkside combobox

* :refactor: Make gap something we add, not remove for chips based on type

* Update .changeset/yellow-days-rhyme.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* :refactor: Only add margin-left when only-child

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-29 15:03:31 +01:00
Halvor Haugan 8c9b2e268a Adjust examples of Loader (#3418) 2024-11-29 13:10:54 +01:00
Ken dce149fca4 🐛 Select get focus-outline when clicked in firefox, as focus-visible were ignored previously (#3415) 2024-11-29 12:49:24 +01:00
Ken 39db249546 [Darkside] Tabs CSS update (#3398)
* 💫 Animate tab-border

* :refactor: Shorthand box-shadow

* 💄 Use 4px border-width for hover and selected state in tabs
2024-11-29 12:47:57 +01:00
KenandHalvor Haugan 9c5b32f9ba [Icons]: Added some new icons (synced from Figma) (#3416)
* ✨ New icons

* Update .changeset/swift-bags-design.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-29 11:58:15 +01:00
Ken efc1446fb9 📝 Changeset (#3414) 2024-11-29 11:56:34 +01:00
KenandHalvor Haugan 6d74cb72ad Fileupload: Remove list-styling when used in ul (#3413)
* 📝 Changeset

* Update .changeset/warm-adults-allow.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-29 11:36:35 +01:00
Ken d6f08ffaaf [Darkside]: Misc updates to darkside CSS, added shadow-token
- [Darkside]: Use shadow-dialog token in components, use subtle-border in combobox list
- [Darkside]: FileSummary nesten items border
- [Darkside]: Adjusted ExpansionCard padding
- [Darkside]: ActionMenu uses new Radio-design
- [Darkside]: Added shadow-token to system
2024-11-27 20:00:53 +01:00
Halvor Haugan 1f4ac7bfde DatePicker/MonthPicker: add support for translations provider (#3390) 2024-11-27 12:29:56 +01:00
Halvor Haugan 34538a1cbe Modal: Don't add scroll shadow when polyfilled (#3408) 2024-11-26 16:51:32 +01:00
KenandHalvor Haugan 9f088a9373 🐛 Modal now handles cases where it was opened with show() (#3407)
* 🐛 Modal now handles cases where it was opened with `show()`

* Update .changeset/sweet-birds-care.md

* 🐛 Add bottom unset to polyfilled modal

* Update @navikt/core/css/modal.css

* Update .changeset/sweet-birds-care.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-26 16:19:58 +01:00
Ken 547219923f [Darkside] Fileitem icon centering 2024-11-26 13:03:52 +01:00
Ken 05709ca43e [Darkside] Switch CSS update (#3389)
* :refactor: Initial darkmode-update to switch

* :refactor: Darkmode-support switch

* 📝 Added comments

* :refactor: Added nesting to readonly

* :refactor: Updated design to match figma
2024-11-26 11:47:25 +01:00
Ken 8fdb888270 [Darkside] Select CSS update (#3378)
* ✨ Added darkmode support to Select

* 🐛 Removed highlighted border-color on hover/focus state
2024-11-26 11:25:00 +01:00
Ken 87b2e54465 [Darkside] Textarea CSS update (#3399)
* :refactor: Added darkmode-support to textarea

* 💄 add some spacing between textarea and counter
2024-11-25 20:42:08 +01:00
Ken 1270c88d19 [Darkside] Stepper: Adjusted border and text-colors to sync with figma 2024-11-25 13:33:00 +01:00
Ken a368cd35b6 [Darkside] Stepper CSS update (#3388)
* :refactor: Added darkmode-support to Stepper

* :refactor: Restructure Stepper to support darkmode and nesting

* 🐛 text-decoration now changes on hover

* :refactor: Line before non-interactive step now has border-neutral
2024-11-25 13:27:20 +01:00
Ken b752d848e1 [Darkside] Skeleton CSS update (#3381)
* ✨ Added darkmode support to skeleton

* 🐛 use correct border-radius
2024-11-25 12:54:41 +01:00
Ken ac4b6f1713 [Darkside]: Update Textfield to show error-border on hover 2024-11-25 12:50:01 +01:00
Ken e15c62ddfd [Darkside] Use variables for Button (#3377)
* ♻️ Use variables for Button-adjustment

* :refactor: Removed redundant selector nesting for disabled buttons
2024-11-25 12:45:41 +01:00
KenandHalvor Haugan 641276bb44 [Darkside] ReadMore CSS update (#3372)
* ✨ Added brandvolume support in theme-component

* 📝 Added brandvolume story to readmore

* ✨ Added large size to readmore

* ✨ Added darkmode support for Readmore

* :refactor: Updated CSS syntax

* 🐛 Fixed brandvolume stories

* ✨ Implemented brandvolume in ReadMore

* ✨ Added large-variant of readmore to OG readmore

* :refactor: Use tokens and calc to handle volume

* 🐛 Added text-accent-strong on hover to high brandvolume

* 🐛 Avoid adjusting readmore body when size is large

* 📝 CHangeset

* Update @navikt/core/react/src/provider/theme/AkselTheme.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/provider/theme/AkselTheme.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-25 12:27:22 +01:00
Ken 0f983440ee ✨ Added logo-token (#3373) 2024-11-25 11:06:31 +01:00
Halvor Haugan fc62ae6870 Remove Storybook HTML addon (#3401) 2024-11-22 14:23:19 +01:00
Halvor Haugan 293fadeaeb Add test for placeholders in translations (#3387) 2024-11-22 12:34:24 +01:00
Ken eb3f830995 [Darkside] Refactor layering concept (#3395)
* :refactor: Update layer handling

* 📝 Improved comments
2024-11-22 12:32:41 +01:00
Halvor Haugan e257bf4945 [Darkside] Combobox: add scroll-margin (#3397) 2024-11-22 09:36:39 +01:00
Ken c8fd958e7a [Darkside] Internalheader CSS update (#3352)
* ✨ Added darkmode support in react for internalheader

* :refactor: Support darkmode theming for internalheader

* 💄 Added bottom border to header, divider now subtleA

* 🐛 Remove hover,active effect in static title

* :refactor: Remove redundant :is for button

* :refactor: use padding shorthand

* 💄 Improved hover-effect on forced-color buttons, added story

* 🐛 Revert back to is button syntax
2024-11-21 17:34:31 +01:00
Julian Nymark 0da07be3b7 Darkside combobox fixes (#3393)
* 💄 remove unused CSS

* 💄 remove sticky (and more) causing weird behaviour
2024-11-21 15:58:11 +01:00
github-actions[bot]andgithub-actions[bot] c054a607b8 Version Packages (#3392)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-21 13:34:46 +01:00
Halvor HauganandKen 15b000e162 Adjust examples of Popover (#3394)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-11-21 13:23:27 +01:00
Halvor Haugan 11133d1a8d Allow RC versions of React 19 through peerDependencies (#3391) 2024-11-21 11:29:59 +01:00
Julian Nymark 39d83bfc50 Combobox: update CSS to use new tokens (#3328)
* 🚧 wip

* 🚧 wip

* Combobox: darkside (keep old border radius for now)

* Combobox: 💄 replace error border with outline (on wrapper is probably fine), use tokens

* Combobox: 💄 replace transparents (almost never wanted), use tokens

* Combobox: 💄 only outline on --focus

* Combobox: 💄 outline adjustment, remove scroll guttering

* Combobox: 💄 prettify (nesting group) CSS

* Combobox: 💄 tweak "legg til" margin/padding

* Combobox: 💄 several small review changes

* Combobox: 💄 move border to wrapper-inner, use correct token for focus color

* Combobox: fix error & some outline on virtually-unfocused

* Combobox: 💄 smaller box-shadow on error

* Combobox: 💄 forced-colors

* Combobox: 💄 forced-colors++

* Combobox: 💄 several PR review fixes (border)

* Combobox: 💄 group review fixes

* Combobox: 💄 remove !important

* 💄 PR review changes

* 💄 PR review changes

* 💄 PR review changes

* 💄 color > stroke

* 💄 PR review changes

* 💄 new design for error outline

* 💄 PR group review batch fixes
2024-11-21 10:32:17 +01:00
dependabot[bot] 8ed0872b05 Bump cross-spawn from 7.0.3 to 7.0.6 in /examples/referansesider (#3386)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-20 16:07:54 +01:00
github-actions[bot]andgithub-actions[bot] 7cc33d880a Version Packages (#3366)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-20 09:51:46 +01:00
KenandJulian Nymark 2c8dd2bc8a [Darkside] List CSS update (#3354)
* :refactor: Updated List css to support darkmode

* ♻️ nest some CSS

* 🐛 Updated stories

* 🐛 Removed removed story from chromatic view

* :refactor: Removed color-override on list-markers

* :refactor: Set icon-color to currentColor

* :refactor: Removed currentColor from icon

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2024-11-19 16:30:28 +01:00
Ken 3ac02e3d87 [Darkside] Popover CSS update (#3369)
* ⚰️ Remove popover arrow in new design

* 🎉 Added darkmode support to popover

* 🎉 Progressbar darkmode support

* Revert "🎉 Progressbar darkmode support"

This reverts commit 77330a6fbd.

* 🔥 Remove focus-outline on Popover
2024-11-19 15:26:03 +01:00
Ken e15edd61ea [Darkside] Loader CSS update (#3355)
* :refactor: Initial loader update

* :refactor: Re-added support for inverted

* :refactor: Added nesting to loader

* 🐛 Foreground now scales the same as background track
2024-11-19 15:14:44 +01:00
Ken f38ab0bb45 [Darkside] TextField CSS update (#3376)
* ✨ Added darkmode support for Textfield

* 💄 Focus visible causes border-color to update

* :refactor: Added nesting
2024-11-19 15:08:06 +01:00
Ken c7409c073b 🎉 Progressbar darkmode support (#3370) 2024-11-19 15:07:58 +01:00
Ken 33b4e373b6 🎉 Updated modal css (#3368) 2024-11-19 15:07:41 +01:00
Ken 7d53efeeb7 🐛 Removed psuedo-state plugin (#3379) 2024-11-19 11:11:55 +01:00
Ken 452e8d8f27 [Darkside]: Errorsummary now has default bg and list-markers are text default 2024-11-18 18:14:07 +01:00
Ken 57356ea067 [Darkside] Pagination CSS update (#3367)
* :refactor: Added darkmode support for modal

* 💫 Reduced animation travel-distance

* 💄 Add border subtleA to modal

* 💄 Adjusted button to figma design

* 🎉 Added darkmode support to pagination

* 💥 reverted modal css changes

* 🐛 Flex-inline broke baseline when using icon inside button
2024-11-15 15:40:55 +01:00
Ken 41ae4a4b9f ✨ Added darkmode support for Helptext (#3375) 2024-11-15 13:13:04 +01:00
Ken 576b2e93a3 💫 Updated expansioncard animation (#3363) 2024-11-15 12:22:02 +01:00
Ken f7db3b7740 [Darkside] FormProgress CSS update (#3344)
* :refactor: Re-implemented animation

* :refactor: Re-add transition for old FormProgress

* 💄 Focused button now overlays panel

* 🔥 Removed redundant hover-state for icon rotation
2024-11-15 11:36:50 +01:00
Halvor Haugan 5f6996a64c Update codeowners file (#3365)
merging now, cuz I get a lot of spam and it's overwhelming 😅
2024-11-14 16:15:28 +01:00
Sjur 7e7e97c430 Update global-dark.ts (#3371)
Tester litt bedre kontrast på tekst i darkmode
2024-11-14 16:05:18 +01:00
Halvor Haugan 1ca5328d0e Git hooks that notify when yarn.lock have changed (#3361) 2024-11-14 11:42:08 +01:00
20fde22390 [Docs] Use NAV-dekorator for Page examples (#3362)
* [aksel.nav.no] Update examples of Page

* comment

* comment + rename + style->class

* fix

* 📝 Use NAV-dekorator for Page-examples

* 🚚 Moved content to separate __parts location

* :refactor: Updated examples

* Update aksel.nav.no/website/components/website-modules/examples/__parts/PageDemoContent.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Use correct import syntax for parts

* 📝 Add description to page-block default story

* 💄 Removed spacing from all typo-headings in demo

* 🐛 Removed react import from content part

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-14 11:32:05 +01:00
Ken f400485fdd [Darkside] FormSummary updated CSS (#3345)
* :refactor: Use updated CSS for darkside

* 💄 Replace accent bg with info bg
2024-11-14 11:30:20 +01:00
Halvor Haugan 9c93342892 Combobox: Fix issue where using arrow keys in list would make the entire page scroll (#3364) 2024-11-14 11:28:29 +01:00
Halvor Haugan 6707674d88 Changesets: Run yarn as part of create-version 2024-11-13 13:18:15 +01:00
Halvor Haugan 0be3a081df [aksel.nav.no] Update examples of Page (#3349) 2024-11-13 12:50:26 +01:00
Ken 6483d6ba68 [Darkside] ExpansionCard CSS update (#3338)
* 💄 Initial css-update expansioncard

* 📝 Added sub-headers

* 💫 Button animation

* ✨ Added data attrb for open-state

* 💫 Updated content animation

* ♻️ Added nesting

* ♻️ Better nesting of rules

* ♻️ Use outline for hover border

* ♻️ Use border as default outline

* 🔥 Remove redundant border css

* 🔥 Removed divider transition, unused state attributes in react
2024-11-13 12:40:16 +01:00
Ken c5f46e60ad [Darkside] Link CSS update (#3353)
* ✨ Darkmode-support for existing link-component

* :refactor: Adjusted line offsets and thickness
2024-11-13 08:50:37 +01:00
Ken 204017eb96 [Darkside] Fileupload CSS update (#3343)
* ✨ Updated Dropzone with darkmode

* ♻️ Added nesting for root

* ♻️ ac -> acx prefix for interla tokens

* ♻️ Removed reduntant token

* ♻️ More nesting

* 💄 Align overlay on drag better

* ⚰️ Removed test-code

* 💄 Update hover-border for dropzone

* 🐛 Removed border-color update on hover in disabled state

* ♻️ Use bg input on area, use border default
2024-11-12 14:37:05 +01:00
Ken 37289b110c [Darkside] ErrorSummary updated CSS (#3331)
* First run for errorsummary css update

* Added nesting
2024-11-12 14:27:40 +01:00
Ken 539108a1f7 [Darkside] Checkbox and Radio updated CSS (#3329)
* Updated checkbox css

* bug: Added correct icon-color for readonly checkbox

* Form-css: Updated form.css and fieldset.css with new tokens

* Added radio dot support

* use 4px border-radius, use border-strong for error

* Error-state updated for checked checkbox

* Updated 'dot'-color for readonly radio

* Updated radio-design

* Added disabled-stories for checkbox and radio

* Radio story with checked and error

* Updated foced-colors support for radio

* Use border-syntax instead of box-shadow

* Removed old code

* Updated checked color to accent-strong-pressed for radio

* Adjusted Error-colors for radio/checkbox

* 💄 Radio can now be checked and have Error

* ♻️ Use hoverA bg for hover

* ♻️ Readio readonly now matches figma
2024-11-12 13:58:37 +01:00
Halvor Haugan 5da987f26a [aksel.nav.no] Fix example iframe resize in Firefox (#3351) 2024-11-12 12:24:42 +01:00
Halvor Haugan a85517e9e0 Timeline: add translations (#3341) 2024-11-12 12:13:01 +01:00
Ken bfc3061a70 [Darkside] Use moderate-hoverA bg for copybutton on hover 2024-11-11 15:51:01 +01:00
Halvor Haugan 85131a54c2 Storybook: Add language to toolbar (#3342) 2024-11-11 10:00:32 +01:00
Ken 339ba372ac [Chromatic] More fine-graines externals-filter to filter out darkside-updates 2024-11-08 14:19:39 +01:00
github-actions[bot]andgithub-actions[bot] 20d5ad597a Version Packages (#3340)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-08 12:14:52 +01:00
Ken aa7c2d9598 Chore: Fix npm/github version mismatch 2024-11-08 12:12:35 +01:00
github-actions[bot]andgithub-actions[bot] 4921dcfe7b Version Packages (#3336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-08 11:54:36 +01:00
Niklas Backman 23f4d4b4a6 Update SuggestionBlock.tsx (#3339)
Typo. Fjernet et ekstra "ta"
2024-11-08 11:28:25 +01:00
Ken 47a4dd6c4c [Icons] Added FileJpeg and FilePng. (#3332)
* Updated icons

* ⚰️ Removed medicalthermometer icon

* Revert "⚰️ Removed medicalthermometer icon"

This reverts commit fcf7f1e124.
2024-11-08 10:52:51 +01:00
Ken 702aecf34b [Datepicker] DateWrapper now uses state instead of ref (#3333)
* bug: DateWrapper now uses state instead of ref to update after first render

* changeset update

* Added comments based on change
2024-11-08 09:38:26 +01:00
Ken c449c380fa Update README.md (#3337) 2024-11-07 12:43:36 +01:00
Ken 5f81e617c8 Use NB translation for e-mail (#3335) 2024-11-07 10:56:34 +01:00
Ken 7cefa52b81 Bumped allowed react-versions (#3334) 2024-11-07 10:12:59 +01:00
Halvor Haugan 97fbd9de64 Remove creation of empty .env files in workflows (#3294) 2024-11-07 09:40:22 +01:00
Ken 1fdb7c84c3 [Darkside] Accordion CSS-rewrite (#3296)
* [Darkside] Migrated typo to new CSS

* memo: Added comments

* change: Implemented accordion header and content

* change: Added lines

* feat: added todo

* change: Fixed layering issues with lines

* change: Avoid animation on initial render

* change: Removed comments

* change: moved icon state into nesting

* change: Added alpha-background for icon, updated fontweight

* change: Added forced-colors support

* Removed use op --open class

* Removed old grid centering

* Top, bottom line is now alpha

* Fixed animation

* bug: Revert to transparent bg

* deprecation: Added tags to accordion props that are to be removed

* removed deprecation for accordion headingSize prop

* Updated implementation of line in accordion

* Remove position relative in accordion content

* Implemented size-update for accordion

* bug: removed old comment

* Clarify comments

* Removed redundant header class

* Re-added className in accordionHeader
2024-11-06 18:52:49 +01:00
Ken ca0d5b4246 [Darkside] Copybutton CSS update (#3330)
* Use new tokens in copybutton

* Updated animation

* updated to nested syntax

* Updated text-color on hover

* Added subheading for sectioning

* removed background none
2024-11-06 18:52:01 +01:00
Halvor Haugan 9622b61a3d 🔧 Set cssVariables extension to only include tokens (#3327) 2024-11-06 16:18:01 +01:00
Ken 0fe767652d [CI] Testing chromatic ignore for darkside changes 2024-11-06 13:41:39 +01:00
Ken 256ab2a166 [Sanity] Updated custom publish actions (#3315)
* sanity config cleanup

* removed extra const for type

* re-organized admin tools and fixed types

* Removed no longer needed custom actions for translations

* Simplified publication plugin

* Removed extra logic in publish action

* synced SEO-updates

* lock sync

* bug: Removed old index export
2024-11-06 13:13:13 +01:00
Ken 4118a27c18 [Sanity] Collapsed multiple Util-locations, updated API-version, added types (#3313)
* sanity config cleanup

* removed extra const for type

* re-organized admin tools and fixed types

* synced SEO-updates

* lock sync
2024-11-06 13:10:53 +01:00
KenandHalvor Haugan 2d669a7513 [Sanity] Config cleanup (#3312)
* sanity config cleanup

* removed extra const for type

* Update aksel.nav.no/website/sanity/schema/documents/presets/seo.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-06 10:42:13 +01:00
Julian Nymark 923fce1961 🐛 fix wrong syntax for codeowners 2024-11-05 14:56:42 +01:00
Julian Nymark 16739a2cf6 ✨ CODEOWNERS (#3323)
* :sparkels: CODEOWNERS

* 📝 update codeowners
2024-11-05 14:39:05 +01:00
Ken 3227e0db91 [Darkside] Chat CSS update (#3305)
* Chat css-rewrite

* changed initials for chat story

* Update nested syntax
2024-11-05 14:35:49 +01:00
Ken ccb090448d [Bug]: Storybook preview used wrong prop for Theme context 2024-11-05 11:10:54 +01:00
KenandHalvor Haugan 36b0d8a8fd [Darkside] Actionmenu CSS update (#3304)
* change: Actionmenu css rewrite

* change: Synced with figma-design

* Added focus-state to subtrigger

* Updated animations

* acx -> axc

* Let items keep their original color when disabled

* Update @navikt/core/react/src/overlays/action-menu/ActionMenu.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-05 10:30:39 +01:00
Ken 056e29af52 [Chromatic] Ignores darkside css updates (#3325)
* Ignores darkside css updates

* better glob
2024-11-05 10:26:36 +01:00
Ken 4a2e47fe6a Chips CSS-reset (#3316) 2024-11-05 10:08:18 +01:00
KenandHalvor Haugan 1eace15576 [Darkside] Theme component as feature-flagging (#3318)
* Setup theme-component

* Added styling for global theming

* Update @navikt/core/react/src/provider/theme/AkselTheme.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* appearance -> theme

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-11-05 10:04:38 +01:00
Halvor HauganandKen ef44f2a25b [aksel.nav.no] Adjust exaples of Box and Bleed (#3321)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-11-05 09:08:13 +01:00
Sjur 916b383e7b Update global-dark.ts (#3320)
Endret fargene 100 - 400 for Info og BrandThree
2024-11-04 15:29:52 +01:00
github-actions[bot]andgithub-actions[bot] bc8761295b Version Packages (#3314)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-04 10:22:20 +01:00
Halvor Haugan 6d9f9001fe Table.ColumnHeader: Inherit text alignment in button (#3319) 2024-11-01 16:07:39 +01:00
KenandJulian Nymark 039332b4f8 [Darkside] Updated Alert CSS (#3301)
* change: Alert variants

* feat: Updated alert css

* change: use correct spacing

* Update @navikt/core/css/darkside/alert.darkside.css

Co-authored-by: Julian Nymark <julian.nymark@nav.no>

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2024-11-01 16:05:32 +01:00
Halvor Haugan 8cadfd0979 Pagination: More precise type for renderItem (#3275) 2024-11-01 08:49:08 +01:00
Halvor Haugan c200f580c1 Translations for ReadOnlyIcon (#3311) 2024-10-31 16:28:48 +01:00
Halvor Haugan 5ce8ec620c Include number of failed stories in Chromatic comment (#3308) 2024-10-31 15:21:23 +01:00
github-actions[bot]andgithub-actions[bot] f7789522c6 Version Packages (#3307)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-31 12:27:02 +01:00
Julian Nymark a9a1182eff Website: 🐛 code example chip to same on first page (#3310)
* 🐛 fix bug still appearing on first page load

* Website: ♻️
2024-10-31 11:50:32 +01:00
Ken 35f7355233 bug: Checks if autocomplete should actually be used when pressing enter (#3306) 2024-10-31 09:56:16 +01:00
Julian NymarkandHalvor Haugan bbc06a3eab ErrorSummary: add translation support (#3245)
* ErrorSummary: add translation support

* Update @navikt/core/react/src/form/error-summary/ErrorSummary.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/util/i18n/locales/nn.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ErrorSummary: fix broken object notation (thanks github conflict webGUI! 😂)

* ErrorSummary: use proper casing for translations object

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-30 16:07:47 +01:00
Halvor Haugan 6e49de805f Textarea: translations (#3302) 2024-10-30 15:31:37 +01:00
github-actions[bot]andgithub-actions[bot] 9757d7d829 Version Packages (#3283)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-30 15:28:46 +01:00
Halvor Haugan d7fb6b5718 [aksel.nav.no] Fix bug when clicking on active code example chip (#3303) 2024-10-30 15:26:28 +01:00
Ken 3c53127e5e bug: Combobox now handles autocomplete correctly with new values (#3287) 2024-10-30 14:50:58 +01:00
Julian Nymark 561dd2e3c0 Introside: 📝 update confirmation text (#3300)
* Introside: 📝 update confirmation text

* Introside: 📝 update confirmation text (+ meta.json)
2024-10-30 13:47:41 +01:00
Julian Nymark 1e9983c65b Button: ✨ new tokens (darkside.css) (#3237)
* Button: ✨ new tokens (darkside.css)

* Button: 🚚 copy over the primitives CSS

* Button: temporary missing placeholder tokens (shadow)

* Button: use new tokens

* Button: remove temporary duplicate code, remove box-shadow focus

* Button: 🎨 use new token prefix

* Button: 🐛 erroneous token conversion from old

* Button: 🐛 erroneous precedence of some CSS rules

* Button: 🎨 do not use CSS nesting (...yet!)

* Button: 🎨 use alpha tokens for hover on secondary and tertiary

* Button: 🎨

* Button: 🚨 ignore outdated stylelint rule

* Button: 🎨 use bg token for storybook preview darkmode

* Button: 🔥 🎨 remove unused CSS, better scope for var def

* Button: 💄 use correct tokens, prettier css rules

* Button: 💄 remove unused CSS
2024-10-30 12:56:04 +01:00
Halvor Haugan 76937a0a2b Combobox: 🐛 Fix scroll issue when using arrow keys in list (#3299) 2024-10-30 12:20:56 +01:00
Halvor Haugan 1ac9ec2f56 Remove some excludes in axe.e2e.ts (#3291) 2024-10-30 10:06:31 +01:00
Halvor Haugan e88d328e8b Add darkside tokens to stylelint rule value-no-unknown-custom-properties (#3297) 2024-10-30 10:05:16 +01:00
Ken 1e2b1d885f [Darkside] Updated Typo CSS (#3295)
* [Darkside] Migrated typo to new CSS

* memo: Added comments
2024-10-30 10:03:09 +01:00
Halvor Haugan 4cdeeacaef Add "Decision Records" to PR template (#3289) 2024-10-29 15:39:07 +01:00
Halvor Haugan c2365712ca [Translations] Table: i18n support (#3281) 2024-10-29 13:28:36 +01:00
Ken 0afbef50a9 [Darkside] Allow old spacing tokens in darkside to avoid editing react-code in production 2024-10-29 13:17:39 +01:00
Halvor Haugan 7799416096 Search: i18n + remove role (#3280) 2024-10-29 12:48:28 +01:00
Halvor HauganandKen 92b39de213 [Translations] ProgressBar: i18n support (#3277)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-10-29 12:35:10 +01:00
Halvor Haugan 9dade96849 [Translations] Modal: i18n support (#3273) 2024-10-29 12:25:08 +01:00
Halvor Haugan 5c23ca62b6 [Translations] Pagination: i18n support (#3276) 2024-10-29 12:16:53 +01:00
Halvor Haugan d562ef0d87 [aksel.nav.no] Adjust examples of HGrid, Show and Hide (#3288) 2024-10-29 12:06:56 +01:00
Ken 13c9fef93a [Darkside] Moved old CSS over to new Darkside dir (#3284)
* change: Copy over old CSS into darkside dir

* change: Update imports for darkside css

* bug: Updated togglegroup css naming
2024-10-29 11:36:14 +01:00
Magnus TønnessenandKen b5c7defffb Add month input format MMyyyy (#3285)
* change: Add allowed month input format MMyyyy

* Update .changeset/strong-apes-hope.md

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-10-29 10:33:59 +01:00
Halvor Haugan e4eccd7616 [aksel.nav.no] Add language block (#3267) 2024-10-28 19:34:48 +01:00
Halvor Haugan 5295abb1bf [Translations] Loader: i18n support (#3272) 2024-10-28 11:42:13 +01:00
Halvor Haugan 3bfd5d2299 Tabs.List: Remove redundant icon titles (#3282) 2024-10-28 10:24:58 +01:00
Halvor Haugan a63ba59636 [Translations] ExpansionCard: i18n support (#3271) 2024-10-25 15:18:47 +02:00
Julian Nymark 81c79d8355 Combo filteredoptions offset fix (#3269)
* Combobox: 🐛 only apply the offset when it's needed

* Combobox: changeset
2024-10-25 14:52:16 +02:00
github-actions[bot]andgithub-actions[bot] f27698a2bf Version Packages (#3270)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-24 09:15:01 +02:00
Halvor Haugan fdc3244cde Better support for React 19 (#3268)
* Date/MonthPicker: Upgrade react-day-picker to fix issue with Nextjs 15
* Slot: Use ref from props to avoid warning in React 19
2024-10-24 09:07:26 +02:00
Vegard Haugstvedt 59dc3e999b Feature/combobox show add new value while autocompleting (#3225)
* Show AddNewValue button in Combobox based on searchTerm instead of value, so it is displayed when autocompleting words

* Highlight matching text in FilteredOptions

* Add changeset

* Move styling to combobox.css instead of inline JS

* Ensure label options are read as one text, even when highlighting search matches.

This only seemed to be a problem in testing library, so we should be able to remove this if they fix this in their calculation of accessible name.

* Update changeset to a minor version

* Re-introduce controlled value in storybook examples to not change Chromatic snapshots
2024-10-23 15:42:26 +02:00
Halvor Haugan 9711de90da Checkbox: Remove redundant attribute aria-checked (#3274) 2024-10-23 13:48:46 +02:00
Halvor Haugan ddf9f9bc5a Combobox: Don't scroll when moving virtual focus with mouse (#3265) 2024-10-23 09:44:11 +02:00
Ken d83a6feb36 [Darkside] Tailwind CSS config for new tokens (#3251)
* change: Updated actionmenu examples

* change: Removed flipAlignment prop for better alignment

* change: Removed defaultOpen-prop from ActionMenu

* change: Moved rootElement prop to component root

* change: Added support for use inside Modal

* change: Use MenuPortalProps instead of Pick

* feat: Added build for darkside

* feat: Implemented darkside-tokens in tailwind-build

* change: Code cleanup and syntax simplification

* change: Moved color-token extraction to start of file

* memo: Moved comment
2024-10-21 17:04:06 +02:00
Ken f505386104 [Aksel.nav.no] Add support for markdown-links in intro-texts (#3262)
* change: added markdown-support for intro-texts

* change: Added description for sanity-fields
2024-10-21 16:56:03 +02:00
github-actions[bot]andgithub-actions[bot] 9f56b84a96 Version Packages (#3259)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-21 15:28:43 +02:00
Halvor Haugan b91ce5794d Combobox: 🐛 Remove virtual focus on input blur instead of moving it (#3261) 2024-10-21 15:10:31 +02:00
Ken 99eaf41e47 change: Hide private props better (#3260) 2024-10-21 14:37:55 +02:00
Halvor HauganandKen 536b0fcc5e Combobox: Clearify in JSDoc what clearButton does (#3258)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-10-21 09:58:10 +02:00
KenandHalvor Haugan 64aab7361a Stylelint v16 update (#3250)
* update: Stylelint v15

* update: Stylelint v16

* updated: Use complex list syntax for not-selector

* lint updates

* More lint fixes

* memo: Changeset

* bug: Missing shorthand for spacer

* Update .changeset/slimy-yaks-smash.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* change: re-added directional placement for modal polyfill

* change: Inset -> direction

* update: lock sync

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-21 09:54:09 +02:00
Ken 8c15433b95 change: Update token-prefix to 'ax' (#3257) 2024-10-21 09:53:49 +02:00
Halvor Haugan 8137a1e500 Fix useState in Storybook (#3256) 2024-10-21 09:06:29 +02:00
Ken 7138b52c2d [Linting] Eslint v9 dependency upgrades (#3248)
* update: eslint-plugin-react-hooks v5 update

* update: Valid React-component names used for useDescendants

* update: Bumped eslint packages to support v9

* change: Rename hooknames

* update: lock sync
2024-10-18 15:54:12 +02:00
Ken 1730b2ebc1 [Scripts] Updated clean-script (#3249)
* change: Updated clean-script

* change: Removed logging and extra filtration
2024-10-18 15:53:01 +02:00
github-actions[bot]andgithub-actions[bot] 6324d63745 Version Packages (#3226)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-18 14:20:08 +02:00
Halvor Haugan debfb3fd15 [Translations] Chips.Removable: Remove translations-prop (partly reverts #3232) (#3255) 2024-10-18 14:15:23 +02:00
Ken a3e8457baf change: Reduced height for actionemu examples (#3246) 2024-10-18 12:45:36 +02:00
Halvor Haugan 0560f84acd ➖ Remove faker (#3254) 2024-10-18 12:20:35 +02:00
Halvor Haugan 663dfbe8a4 🆙 Upgrade some dependencies (#3247) 2024-10-18 12:02:05 +02:00
Halvor Haugan 536f088b97 List.Item: Center icon horizontally inside it's container (#3253) 2024-10-18 11:55:46 +02:00
Ken f659599787 [ActionMenu] Removed defaultOpen-prop, moved rootElement, added Modal-support (#3240)
* change: Updated actionmenu examples

* change: Removed flipAlignment prop for better alignment

* change: Removed defaultOpen-prop from ActionMenu

* change: Moved rootElement prop to component root

* change: Added support for use inside Modal

* change: Use MenuPortalProps instead of Pick

* change: Revert to using Pick for prop inheritance

* change: Menucontext uses required definition of rootElement
2024-10-17 16:19:27 +02:00
Ken ed34bc034a [Darkside]: Move text-contrast tokens into semantic groups 2024-10-17 14:26:20 +02:00
Ken 2a2028fd95 [BasePrimitive] Hide className from basePrimitive type (#3241)
* change: Hide className from basePrimitive type

* change: Re-order baseprimitive types (#3242)
2024-10-17 13:04:50 +02:00
Ken 386145d63a [Darkside] Made breakpoints and font-tokens avaliable in css output
[Darkside] Added breakpoints to token-config
[Darkside] Added font to token-config
2024-10-17 11:51:54 +02:00
Ken 1ed809c872 [Actionmenu] Updated examples for docs, removed flipAlignment-prop (#3236)
* change: Updated actionmenu examples

* change: Removed flipAlignment prop for better alignment
2024-10-17 09:49:56 +02:00
Ken e2359ddf33 [Darkside] Bumped role-raised tokens on darkmode one tick on the scale, updated darkmode input token 2024-10-16 19:45:15 +02:00
Ken 069e3346ec [darkside] Added spacing and border-radius token support for JS/TS file-format 2024-10-16 14:34:06 +02:00
Halvor Haugan c941af9de5 Refactor examples of Vstack and HStack (#3244) 2024-10-16 14:15:08 +02:00
Halvor Haugan a273a22172 Adjust examples of VStack and HStack (#3243) 2024-10-16 13:31:09 +02:00
Ken 0e94031f1e [Darkside] Added alpha-variant to border-subtle 2024-10-16 13:01:10 +02:00
Ken 64a9762286 change: Updated exports to make docgen work (#3235) 2024-10-16 09:29:39 +02:00
Ken a05dbadfa4 [darkside]: Added support for darkside views in chromatic (#3239) 2024-10-15 16:55:05 +02:00
Halvor Haugan 7c468b18d1 Adjust dates in Date/MonthPicker examples (#3238) 2024-10-15 16:35:45 +02:00
Ken cfcd78a450 [sanity] Grunnleggende now has access to props block 2024-10-15 15:40:45 +02:00
Halvor Haugan 9e677697a7 [aksel.nav.no] Fix copy-pasting snippets in Firefox 2024-10-15 12:15:24 +02:00
Halvor Haugan 8a8bf0a274 [aksel.nav.no] Adjust list of outdated articles (#3234) 2024-10-15 10:28:03 +02:00
Halvor Haugan 1e40d96510 Chips.Removable: Added new i18n API (#3232) 2024-10-15 09:55:30 +02:00
Ken db56141b2e [Darkside] Updated CSS-readme with syntax hints 2024-10-15 09:43:14 +02:00
Ken ec351ba27f [Darkside] Added CSS-resets, utilities, fonts ++ to darkside css
[Darkside] Removed unused 'baseline' css
[Referansesider] Updated css-import to layer 'framework'
2024-10-14 22:32:39 +02:00
Ken 2e98a09540 [Linting] Update @typescript-eslint/eslint-plugin to v8 (#3222)
* linting: update ts eslint package to v8

* linting: Update ts eslint package to v8

* change: removed redundant off-toggle of native eslint rules

* change: update interface declaration
2024-10-14 16:43:46 +02:00
Halvor Haugan 2d438e1d37 [Translations] Alert: i18n support (#3231) 2024-10-14 16:42:41 +02:00
Ken 8b373e8b80 bug: Use relative units instead of tokens for storybook markdown 2024-10-14 16:21:32 +02:00
KenandHalvor Haugan 179eb51221 [Darkside] Added development environment for new CSS (#3233)
* change: Added stoybook decorators for darkside toggle

* feat: Added dynamic CSS-loading based on mode

* memo: Added readme for new CSS

* change: Added basic body styles for darkside, including fonts

* change: Added loading of new CSS to referansesider

* bug: Removed old preview file in storybook

* change: Added utf-8 to darkside css

* change: Updated darkside css readme with new instructions

* change: Removed old bg style on wrapper

* Update .storybook/preview.jsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* change: Refactored theme decorator

* Update .storybook/preview.jsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Re-added return

* change: themedecorator -> modedecorator

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-14 16:12:03 +02:00
Halvor Haugan d98624618c [Translations] Accordion: Remove redundant icon title (#3230) 2024-10-14 15:36:20 +02:00
Julian Nymark ecc501a0a8 Referansesider: dagoversikten tweaks to table, remove Timeline 2024-10-14 11:49:51 +02:00
Ken fec3b12d5f [Darkside] Added alpha-scale for global and moderate
[darkside] Updated naming transform to support alpha-tokens
[darkside] Updated input-token to use opacity
[darkside] Added alpha-tokens to global config
[darkside] Now auto-generates the alpha-values
[darkside] Added semantic role tokens using alpha-values
bug: removed tempfile added by vitest
2024-10-14 11:36:23 +02:00
KenandHalvor Haugan 8f99d3a102 [Icons] Some icons that should be ignored were fetched and caused exceptions (#3228)
* bug: Some icons that should be ignored were fetched and caused exceptions

* change: Added some comments

* change: Better math for icon-check

* change: Better messaging

* Update @navikt/aksel-icons/config/figma/index.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-14 10:19:21 +02:00
Julian Nymark 7fa7719c24 Referansesider: dagoversikten tweaks to MiniTag 2024-10-11 16:41:22 +02:00
Julian Nymark bc1b9fdad9 Referansesider: dagoversikten table placeholder 2024-10-11 16:34:15 +02:00
Julian Nymark 755d75903a Referansesider: dagoversikten correct tokens for borders 2024-10-11 16:13:57 +02:00
Julian Nymark 5ebc71470a Referansesider: dagoversikten completed rightside 2024-10-11 16:03:17 +02:00
Halvor Haugan 17daddab86 Add description to GuidePanel examples (#3224) 2024-10-11 14:14:34 +02:00
20ced9b084 ActionMenu component (#3081)
* 🎨 Setup content

* 🎨 Fungerende popover med story

* 🎨 useDescendant-API kan bruke uten context-error på nesting

* 🐛 Fikset tilfeller der oppdatering av descendant-options ikke ble reflektert i descendants-map

* 🐛 Satte enabled til optional

* bug: import av Portal brakk stories for Popover og Floating

* bug: DescenadantContext er nå riktig typet som undefined

* label: scopet navn for bruk av descendant-provider i dismissablelayer

* memo: Bedre kommentarer

* feat: Sender ikke callbacks hvis layer er disabled

* memo: Formatering og kommentarer

* memo: Kommentarer

* copy: Kopiert over basekomponent

* refactor: Oppdatert imports

* refactor: Oppdatert Primitive bruk

* feat: Støtter forwardRef

* fire: Fjernet Radix import

* feat: Bruker Floating og ikke PopperPrimitive

* type: Bedre typet composeEventHandler

* refactor: Fjernet scopedProps

* feat: Custom RowingFocus

* wip feat: Replaced rowingfocus

* wip feat: Implemented initial focus for rowingfocus

* wip feat: Removed old collection api

* refactor: Use internal Slot component

* refactor: Fixed all scoped context-use

* feat: Fullført migrering til internt API

* test: Setup stories

* bug: Content is added to descendants

* bug: Found issue for nesten descendants

* copy: Kopiert over refactor for useDescendant

* bug: Fikset descendants nesting

* feat: Fikset keyboard nav med nested descendants

* bug: Removed early return

* memo: Kommentarer

* label: Typer

* refactor: Fjernet Root export

* refactor: Fjernet typeahead

* test: Setup story for entryfocus

* refactor: Forenklet FocusScope

* refactor: bedre dokumentert utils

* refactor: Moved utils to separate file

* refactor: Moved slotted-div to separate file

* refactor: Moved MenuContext out to context-file

* 🚚 Moved focus-files

* refactor: Update syntax

* refactor: Moved MenuAnchor to file

* refactor: Moved MenuGroup to file

* refactor: Moved Separator to file

* refactor: Moved Label to file

* refactor: Moved utility-components

* refactor: Flyttet item til mappe

* refactor: Flyttet checkbox

* refactor: Content in separate file

* refactor: Radio i separate filer

* refactor: SubComponents in files

* refactor: Bedre typer

* refactor: Re-written back to single file

* refactor: Fjernet gamle commits

* bug: Fikset import feil og feil extension av type

* refactor: data-attrb fra radix -> aksel

* refactor: Fjernet console.logs

* bug: Fixed import and test-type error

* refactor: Remove unwanted exports

* feat: Re-added ItemIndicator wrapper

* refactor: Updated exports

* refactor: removed focusguards

* refactor: FocusScope now assumes Slot

* refactor: Removed extra tabIndex

* feat: Implemented ItemIndicator and styling for testing

* refactor: Rowing -> Roving

* refactor: Moved Menu-component into overlays-dir

* bug: Fixed import of Slot

* bug: Re-add tabIndex to MenuItem for correct focus-handling

* memo: Rename Tab -> menu

* refactor: removed unwanted exports in story

* Update @navikt/core/react/src/overlays/floating-menu/Menu.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Added missing meta import

* bug: Aligned dash with checkmark

* bug: Circle icon now shows for radio-demo

* bug: keyframes has extra ':', breaking animations

* bug: Re-added ItemIndicator for all TickIcon

* bug: WithLabel story now shows complete dropdown

* feat: Added disabled-styling to submenu

* refactor: Now uses ownerdocument where needed instead of document

* adjustments after review 1

* adjustments after review 2

* refactor: Updated to correct function type syntax

* refactor: renamed floating content propname

* refactor: Consistent destructuring of props

* refactor: rename FocusScope props

* memo: Added explanation for why we use flushEvent

* refactor: added consistent use of composeEventHandlers

* refactor: Force userSelect none style

* demo: Allow canceling opening if pointerdown is released outside of menu

* memo: Better line-dividers

* refactor: removed data-highlighted logic

* Update @navikt/core/react/src/overlays/floating-menu/Menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/floating-menu/Menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: DropdowmMenu boilerplate

* feat: MenuTrigger & MenuPortal

* feat: MenuContent

* feat: MenuGroup

* feat: lvl-1 components added

* feat: Implement each component

* feat: Implement export

* refactor: Fixeed proptypes for sub

* feat: Implemented trigger

* testing: Updated stories

* feat: Added experimental API 'requireReactelement'

* feat: Implemented content

* feat: Implemented label

* feat: Implemented Item

* feat: Implemented Item

* feat: Implemented group

* feat: Implemented radoigroup

* feat: Implemented radio

* feat: Implemented checkbox

* feat: Implemented sub-trigger

* feat: Implemented sub-content

* feat: Implemented separator classname

* feat: Added cancelable event for pointerdown

* feat: Added dropdown-menu css

* WIP: CSS

* WIP: Added label styling

* feat: Remove checkmarks whe unchecked

* feat: Allow use of 'il' in floating-element

* feat: Implemented semantic tags for items and content

* feat: Added test-markup

* Revert "feat: Implemented semantic tags for items and content"

This reverts commit 6bf473328d.

* Revert "feat: Allow use of 'il' in floating-element"

This reverts commit 5307facbca.

* css: Item active styling

* testing: Setup storybook test framework

* testing: setup basic feature stories

* testing: Un-nested variants

* testing: advanced demos

* feat: Disabled and submenu css

* feat: Added bg on open submenu-trigger

* feat: Added destructive item

* feat: Stop selecting checkbox from closing dropdown

* feat: Use actual radio and checkbox svg for components

* feat: Animate checkbox/radio checked

* feat: Added indeterminate checkbox

* feat: Added indeterminate demo

* feat: added story for shortcuts

* TODOS

* feat: added possibility to close submenus with arrowright when opened to the left of content

* refactor: Better implementation of Shortcuts and aria-keyboardshortcut

* feat: added thin scrollbar

* feat: Added animationsupport for all directions when opening dropdown

* refactor: Cleaned up CSS

* testing: Added chromatic stories for dropdown

* refactor: Dropdowm CSS -> Actionmenu CSS

* refactor: Rename files

* refactor: Move file to utils

* refactor: Inline Slot button

* refactor: rename react dropdown -> action

* refactor: Solved alignment issue with checkbox/radio and text

* feat: use div instead of removed Menu.Label

* refactor: Better useRef reference

* memo: Updated comments

* memo: removed old comments

* memo: Prop-comments

* memo: JSDOC

* bug: remove shortcut from exports

* refactor: Avoid exposing extra props for content

* refactor: Avoid exposing extra props for subcontent

* refactor: Updated CSS animation name

* feat: Updated exports making ActionMenu avaliable from the library

* memo: Added actionmenu to CSS-mappings

* feat: Added option to use links in actionmenu

* feat: Icon-prop for Item and Subtrigger

* refactor: Separator -> Divider

* feat: Updated danger variant item text color

* feat: Stronger label typings for group

* bug: Fixed edgecase where focus on trigger would close menu

* bug: removed storybook addon omit

* refactor: Used relative units and tokens for spacing/width

* feat: Added max-width, removed nowrap

* bug: removed demo story

* refactor: Removed old scale(1) property from animation

* Update @navikt/core/css/action-menu.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Added direct import of actionmenu

* Update @navikt/core/react/src/overlays/action-menu/ActionMenu.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/action-menu/ActionMenu.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Minor adjustments

* Remove unused CSS

* feat: De-select all checkboxes when every box is allready checked in indeterminate

* memo: Removed extra stories

* memo: Removed demo used for testing

* feat: More dynamic max-width with 'min'

* memo: Removed cryptic comments

* feat: Avoid spread in reduce

* refactor: Removed middle-step function to handle radio state update

* refactor: Better css-naming for marker css

* refactor: removed extra unused variables, added double underscore prefix

* refactor: Removed extra onSelect on disabled story

* feat: Actionmenu now proplery handles overflow

* feat: Avoid auto-closing modal

* feat: Menu is now Modal

* feat: Now always focuses trigger when closed

* Update @navikt/core/css/action-menu.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Fix space auto closing modal

* feat: Fallback to bottom of anchor when no avaliable space

* memo: Added todo

* ,memo: added todos

* memo: changeset

* refactor: Simplified SVG with groups

* [ActionMenu] Remove extra CSS-classes, fixed centering bug in safari (#3194)

* refactor: Remove extra CSS-classes, fixed center bug in safari

* refactor: Removed unused CSS

* [ActionMenu] Sub-menu now uses onClick for opening and closing instead of pointermove (#3193)

* feat: ActionMenu now only opens submeny onClick

* memo: removed TODO

* feat: Closes all adjacent submenues when opening a new one

* refactor: Undo unwrapping of onDismiss

* refactor: Remove unused code in Menu.tsx

* feat: Handle submenu keys correctly

* feat: use native onClick for Trigger

* refactor: Remove un-needed disabled check on trigger

* bug: Reuse already used context

* Update @navikt/core/react/src/overlays/floating-menu/Menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Rename open prop

* Memo: update comment

* feat: Use looser types for RovingFocus

* bug: Aboid auto-closing menu when opening with pointer

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/modal/ModalHeader.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/css/action-menu.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update .changeset/dry-flowers-dance.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 💄 Manually set zIndex value

* ActionMenu documentation (#3085)

* memo: ActionMenu documentation

* refactor: Update to use Icons

* bug: Fixed use of Item with nextjs link-component

* memo: Updated examples

* memo: Updated examples, removed div-wrapper

* TODOS

* memo: Oppdatert submenu med table-vising

* feat: Oppdatert eksempler

* memo: Default open first submenu in demo

* memo: Use norwegian in link docs

* Update aksel.nav.no/website/pages/eksempler/actionmenu/shortcuts.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: Shortcut easter egg

* ⚡ Simplify indeterminate toggle for actionmenu

* refactor: remove redundant aria-label

* Update aksel.nav.no/website/pages/eksempler/actionmenu/sub-menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/actionmenu/links.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: removed reference to nextjs app-router

* bug: Removed empty aria-label

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* [ActionMenu] Fixes overlapping elements for SubMenus (#3212)

* bug: Fixed scroll + wrapping issue

* bug: undo scrollbar gutter change

* change: Updated chromatic to not overlap

* change: Updated yarn.lock

* change: submenu changes floating position more flexibly than main content now

* change: Chromatic clips unused margins, so moved submenu higher in view

* change: Updated chromatic-story to better show submenu

* memo: changeset for modal head update

* Update .changeset/proud-rings-float.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-10-11 14:13:55 +02:00
Julian Nymark 6d2115cdc9 Referansesider: dagoversikten structure + completed leftside 2024-10-11 13:57:20 +02:00
Halvor Haugan 17ae19c5fe Add translations for NN and EN (#3209) 2024-10-11 12:01:11 +02:00
KenandHalvor Haugan a60298f232 [Icons] Refactored Figma fetch to TS (#3218)
* ♻️ Refactored Icon fetching from figma

* bug: Fixed types for YML-handling

* update: Lock update

* Update @navikt/aksel-icons/config/figma/index.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel-icons/config/figma/index.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/aksel-icons/config/figma/make-configs.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: pages -> parts

* refactor: Better naming

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-11 09:10:31 +02:00
github-actions[bot]andgithub-actions[bot] 5866992e7d Version Packages (#3208)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-10 15:56:34 +02:00
KenandHalvor Haugan 8ab241a980 [Linting] Comment-cleanup in eslint (#3220)
* memo: Cleanup comments

* memo: Updated eslintRc

* bug: Removed ts from global eslint

* Update .eslintrc.js

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: Updated temp comment

* Update .eslintrc.js

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-10 15:48:47 +02:00
KenandHalvor Haugan 363d76b9b2 [Linting] Fixed noUselessTernary and useOptionalChain-rules (#3215)
* memo: Added figma-plugin as ignore

* memo: Removed unused noSelfAssigned

* refactor: Fixed useJsxKeyInIterable

* memo: Removed unused noInnerDeclarations

* memo: Removed unused noUselessTernary

* refactor: Fixed useOptionalChan rule biome

* Update @navikt/aksel-icons/__tests__/validate-svg.test.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Better null-check

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-10 15:06:49 +02:00
Ken 5da970fd62 [Linting] Fixed useLiteralKeys rule from biome (#3219)
* memo: Added figma-plugin as ignore

* memo: Removed unused noSelfAssigned

* refactor: Fixed useJsxKeyInIterable

* memo: Removed unused noInnerDeclarations

* refactor: Fixed useLiteralKeys rule

* bug: Fixed typings for sanity publication action

* bug: Fixed typings for sanity publication action

* bug: Fixed typings for sanity publication action

* bug: added null-check
2024-10-10 14:47:11 +02:00
Ken 296e43cab2 [Linting] Fixed useJsxKeyInIterable ,noSelfAssign and noInnerDeclarations rules from biome (#3214)
* memo: Added figma-plugin as ignore

* memo: Removed unused noSelfAssigned

* refactor: Fixed useJsxKeyInIterable

* memo: Removed unused noInnerDeclarations
2024-10-10 14:33:26 +02:00
Ken 85fec974dc Added autoprefixer to @navikt/ds-css devDependencies (#3213)
* bug: added autoprefixer to ds-css devDeps

* ⬆️ Yarn lock
2024-10-10 13:29:56 +02:00
Vegard HaugstvedtandKen 6ddea4eaf2 Feature/combobox pageup and pagedown (#3158)
* Add support for PageUp and PageDown in Combobox.FilteredOptions

* Remove console.log statements

* Add test for PageDown/PageUp

* Open FilteredOptions when pressing PageDown

* Prevent scrolling from moving the whole page

* Consistently scroll to the active element in useVirtualFocus by using useLayoutEffect

It seems like doing it with the state update sometimes encounters a race condition preventing the scrolling.
This removes the need for a private function handling index update and scrolling, simplifying the code.

* Updated test to fit new options order

* Prevent "Home" and "End" in Combobox from scrolling as well

* Add changeset

* Update @navikt/core/react/src/form/combobox/FilteredOptions/useVirtualFocus.ts

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* useEffect seems to work the same way, and works better for SSR

* Removed code that did nothing

* Added the same check we have for PageDown, etc. Unsure if it is neccessary.

* Change behaviour for "Home" to move focus to the first element instead of Input

* Once we changed virtualFocus.moveFocusToTop to move focus to first element instead of the Input, we now need another function to move it to the Input where applicable.

* Update .changeset/tasty-cats-hear.md

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-10-10 12:05:13 +02:00
Halvor Haugan acea9ebb78 Change "personnummer" to "fødselsnummer" (#3211) 2024-10-10 11:59:28 +02:00
Julian Nymark fdbd634012 Referansesider: dagoversikten BreadCrumbs 2024-10-09 12:37:13 +02:00
Julian Nymark dcf5452d28 Referansesider: dagoversikten content 2024-10-08 16:34:15 +02:00
Sjur 0a8c33bbbe Justerte Danger-farger i LightMode (#3210)
Noen av HEX-verdiene i Danger LightMode er endret.
2024-10-08 15:26:07 +02:00
Vegard Haugstvedt 18b0cf5fa5 Bugfix/combobox disable autocomplete in firefox on android (#3201)
* Disable autocomplete in Combobox to "fix" issue where autocomplete is broken in Firefox on Android

The bug is that after three "correct" characters are entered in a row, the autocomplete inserts the third character incorrectly, messing up the text in the input.
This also happens in other implementations of autocomple, like W3C's ARIA Authoring Practices Guide combobox with inline autocomple.

* Add changeset

* Use type checking instead of useEffect to prevent client code from running server side
2024-10-08 12:37:07 +02:00
Julian Nymark 374a679bc3 Referansesider: ✨ dagoversikten.tsx 2024-10-08 11:53:09 +02:00
github-actions[bot]andgithub-actions[bot] a2e020d4f3 Version Packages (#3206)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-08 11:50:48 +02:00
Halvor Haugan 074c8da536 List: ✨ New size 'large' (#3207) 2024-10-08 11:30:47 +02:00
KenandHalvor Haugan bdbd6c24cc [Dependencies] Replaced ts-node with tsx, removed dotenv (#3198)
* refactor: ds-react uses tsx instead of ts-node

* refactor: ds-tailwind uses tsx

* refactor: Website backup and search uses tsx

* refactor: Test urls and rss-feed uses tsx

* refactor: Prop-updates uses tsx

* refactor: All website scripts uses tsx

* refactor: removed dotenv dependency from website

* feat: removed all dependencies to dotenv

* bug: Remove need for env in validate build script

* test: Create empty env file

* test: Scope env-file to build-dir

* bug: Fallback to empty env when no env exsists

* feat: Better error-messaging when fetching new icons

* Update @navikt/aksel-icons/package.json

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-08 10:18:51 +02:00
Ken f0e6c944d8 [Referansesider] Updated contrast tokens to new naming 2024-10-08 10:16:17 +02:00
Ken 22be148832 [Darkside] Moved contrast-tokens to text group
feat: Moved contrast tokens to 'text' collection
feat: Added support for adding custom scopes for each token
2024-10-08 10:06:43 +02:00
KenandHalvor Haugan aac12fe44f [Linting] Fixed useExhaustiveDependencies in biome (#3197)
* feat: Update biome

* feat: migrate biome config

* misc: Ignore semantic-tag rule biome

* refactor: resolved breaking changes after biome update

* feat: remove old excluded biome rule

* feat: Removed a11y/useFocusableInteractive ignore

* refactor: Fix useExhaustiveDependencies  biome

* memo: changeset

* memo: changeset gitmoji

* bug: Re-add selectedOptions to dependency array

* Update @navikt/core/react/src/overlays/dismissablelayer/DismissableLayer.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Fix initial focus for sidebar icon

* ⚡ remove reduntant memoization of isLimitReached

* bug: re-add sanity-plugin-iframe-pane

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-08 09:05:59 +02:00
Halvor Haugan 324358d086 FileUpload: 💥 Remove UNSAFE-prefix (#3205) 2024-10-07 15:16:25 +02:00
Ken 946cbeb016 [Liniting] Updated to biome v1.9 (#3196)
* feat: Update biome

* feat: migrate biome config

* misc: Ignore semantic-tag rule biome

* refactor: resolved breaking changes after biome update

* feat: remove old excluded biome rule

* feat: Removed a11y/useFocusableInteractive ignore

* refactor: Remove ariaRole rule

* bug: Remove extra fragments in dartepicker stories

* bug: Remove custom image rendering exception for safari on website
2024-10-05 15:41:23 +02:00
Sjur f4d22dae68 Endret Neutral-farger Darth Mode (#3204)
Neutral-fargene ble hentet fra fargene med lavere saturation, som gjorde at de mistet hintet av blått. Endret til den originale skalaen.
2024-10-04 22:09:27 +02:00
Ken ce2f5a9b90 [Darkside] Fixed missing test updates 2024-10-04 16:01:58 +02:00
github-actions[bot]andgithub-actions[bot] cf167064eb Version Packages (#3203)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-04 15:25:08 +02:00
Ken 73a6ae1bf1 [Darkside] Fixed no_cache_paths for figma config CDN 2024-10-04 15:24:06 +02:00
Halvor Haugan 95c84e1d01 List: Explicitly set list-style on ol to override reset-CSS (#3202) 2024-10-04 15:14:16 +02:00
Ken 4675857e8f [Darkside] Updated global colors config
feat: Avoid caching config for color-tokens
feat: Remove use of leonardo, hardcode global config
feat: Update 100-400 scale for darkmode
feat: Update 500-1000 scale for global colors
2024-10-04 15:06:32 +02:00
Julian Nymark 2a6e416b5c Referansesider: 🐛 use master branch for GA 2024-10-04 12:50:43 +02:00
Julian Nymark d3c3cafc97 Referansesider: 👷 point to maintained spa-deploy yml (#3199)
* Referansesider: 👷 point to maintained spa-deploy yml

new location: https://github.com/nais/deploy/tree/master/actions/spa-deploy

* Referansesider: 🐛 probably correct yml url (GH action)
2024-10-04 11:47:33 +02:00
KenandHalvor Haugan 678fa6692b [Darkside] Figma plugin for updating variables (#3191)
* feat: Implemented figma plugin

* feat: Can now detect production/development build

* feat: Now supports remote fetch for config

* misc: Stop reset from running by default

* feat:Semantic value handling

* feat: Pre-semantic implementation

* feat: Finished plugin API for semantic variables

* feat: Use this for Figma plugin extension

* bug: Fixed semantic collection naming

* bug: Handle reset correctly

* misc: avoid resetting when updating

* memo: Added comments

* bug: Ignore plugin buildfile from lint

* bug: Fix support for dynamic-page load in figma

* 📝 Better naming, simplified code-def syntax

* feat: Scoped ignorePattern for plugin.js

* memo: better logs for completing update

* Update @navikt/core/tokens/darkside/figma/plugin/AkselVariablesInterface.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/figma/plugin/AkselVariablesInterface.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: Removed extra space for info logging

* refactor: Simplify for-loop for semantic color modes

* refactor: Inline creation of mode, collection and variable

* refactor: readable mapping variables

* feat: Better error-handling if variable is null

* refactor: Remove redundant getModes function

* refactor: Remove redundant getModes function

* refactor: Remove plugin watch function

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-10-04 11:19:43 +02:00
Ken 87aeb94c64 [Dependencies] Sanity 3.59 update (#3195)
* feat: Updated to sanity 3.59

* bug: Sanity updated icon and media types, so everything broke

* bug: Fallback to default media in article previews if everything is normal
2024-10-03 16:35:00 +02:00
github-actions[bot]andgithub-actions[bot] 4714a5ff32 Version Packages (#3181)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-03 16:01:01 +02:00
Halvor HauganandKen ca1d9be88f List: Add indentation and remove aria attributes (#3184)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-10-03 15:06:06 +02:00
Halvor Haugan 2654da8b64 update-article-views: Use latest docker image + remove reduntant stuff in workflow (#3189) 2024-10-03 08:52:48 +02:00
Julian Nymark 8d6418a594 Referansesider: 💄 use correct tokens 2024-10-02 14:24:10 +02:00
Julian Nymark 8269091fb8 Referansesider: 💄 outline offset for focus 2024-10-02 14:15:06 +02:00
Julian Nymark fd82184057 Referansesider: 🎨 aktivitetsplan buttons & select 2024-10-02 14:11:31 +02:00
Julian Nymark 39f2cb8614 Referansesider: 🎨 aktivitetsplan main card 2024-10-02 13:57:07 +02:00
Julian Nymark 4bf298f363 Referansesider: 🎨 Tag to own component, flesh out cards for aktivitetsplan 2024-10-02 12:55:54 +02:00
Halvor HauganandKen 3a239e4e17 [aksel.nav.no] Show breakpoints in GuidePanel examples (#3192)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-10-02 12:23:10 +02:00
Halvor Haugan 4fcfaf3deb [aksel.nav.no] Storybook: Change to Vite framework (#3185) 2024-10-02 10:14:17 +02:00
Julian Nymark 5dbc66daaa Referansesider: 🚧 Aktivitetsplan 2024-10-02 09:53:17 +02:00
Halvor Haugan 555a46b5da Adjust examples of Switch (#3188) 2024-10-01 13:55:03 +02:00
Julian Nymark 73b2bca156 Combobox: 💄 tweak the visibility of chevron (#3187)
* Combobox: 💄 tweak the visibility of chevron

* Combobox: 💄 dim visibility of icons for readonly datepicker, select, and combobox

* Combobox: 💄 dim visibility of icons for readonly datepicker, select, and combobox

* changeset
2024-10-01 13:47:53 +02:00
Julian Nymark 01411dc11f referansesider: 💄 sykepenger++ 2024-10-01 12:02:38 +02:00
Julian Nymark b1b0d23863 Referansesider: 💄 use more tokens 2024-09-30 14:56:17 +02:00
Julian Nymark cf59ce81bf Combobox disabled fixes (#3183)
* Combobox: 💄 remove hover border color when disabled

* Combobox: 💄 remove hover effect on chips when disabled
2024-09-30 13:53:48 +02:00
Julian Nymark 00c0ff31e1 Combobox: 💄 remove hover border color when disabled (#3182) 2024-09-30 13:38:22 +02:00
Julian Nymark d278060e59 Combobox: 🐛 implement Readonly + disabled (#3180)
* 🐛 [Combobox] implement disabled

* 💄 [Combobox] disabled

* ✨ [Combobox] implement readOnly

* 📝 [Combobox] add examples

* 📝 [Combobox] changeset

* 📝 [Combobox] changeset++

* 📝 [Combobox] stories (review fixes)

* 📝 [Combobox] stories (review fixes++)

* Combobox: 🎨 remove ToggleListButton when readonly or disabled

* Combobox: ♿ combobox input does not support native readonly, use nativeReadOnly={false}

* Revert "Combobox: 🎨 remove ToggleListButton when readonly or disabled"

This reverts commit e54a2eca32.

* Combobox: remove unused code
2024-09-30 11:24:47 +02:00
Ken e5d5b67262 [Referansesider] Migrated to new tokens 2024-09-27 14:13:54 +02:00
Ken 246f25cbaa misc: Update darkmode config for tokens 2024-09-27 14:01:51 +02:00
Ken b2a22438ad bug: Fixed CDN-location for figma config 2024-09-27 12:58:30 +02:00
KenandHalvor Haugan 8b8b724e40 [Darkside] Generate Token config to be consumed by Figma plugin (#3172)
* feat: Build figma config

* bug: Fix ignored gitignore config

* refactor: Rename collection -> name key

* feat: pre-update value to figma config

* feat: Re-resolve name with grouping

* feat: Better handling of relative units

* feat: Added better typings, workflow file

* feat: Updated name-parsing for pregen of config

* feat: Removed Unused eslint-disable directive

* feat: Extract figma scope when creating variables

* refactor: Simplified code by extracting logic

* feat: Updated workflow naming

* bug: re-add missing group for semantic color

* feat: Add metadata to figma config

* bug: Added missing 'contrast declaration

* bug: Calculate correct radius values

* refactor: Simplified config structure by unwrapping scopes

* refactor: Extracted logic for group check

* refactor: Only allow string or number as figma value in config

* feat: Added tests for value conversions

* refactor: Renamed figma config file

* update: Lock update

* refactor: Avoid using format as a workaround to extract token list

* Update @navikt/core/tokens/darkside/figma/index.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/figma/create-tokens.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/tokens/darkside/util.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: inline filter calls

* refactor: Better typing for as group declaration

* refactor: Avoid using objects as type definintions

* refactor: Inline semantic token check for roles

* refactor: date -> timestamp and NO locale

* refactor: token -> tokens

* refactor: removed redundant redaclaration of token name in test

* refactor: Avoid extra tests for same check

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-09-27 12:35:42 +02:00
Ken 9f9bdcc645 bug: Fixed old test for global tokens 2024-09-26 19:13:38 +02:00
Ken 82bdf8075a [Tokens]: Update darkmode tokens and separate config support
feat: Updated darkmode tokens
feat: Split global color config into separate files
2024-09-26 19:09:01 +02:00
Julian Nymark 410e543825 🎨 [referansesider] minside eslint 2024-09-26 15:47:29 +02:00
Julian Nymark 40308e0e77 🎨 [referansesider] minside dokumentarkiv 2024-09-26 15:39:02 +02:00
Julian Nymark fff309b573 💄 [referansesider] minside NotificationsPanel lightmode match figma 2024-09-26 14:44:44 +02:00
Julian Nymark fe7c2de8fa 💄 [referansesider] minside PassiveCards++ 2024-09-26 14:37:42 +02:00
Julian Nymark 6fedea0ba4 💄 [referansesider] minside PassiveCards 2024-09-25 15:02:05 +02:00
Halvor HauganandKen 9811327509 [aksel.nav.no] Adjust examples of Switch (#3175)
---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-09-25 14:21:19 +02:00
Ken cf2034f914 [Aksel.nav.no] Open all Accordions when searched (#3179)
* feat: Open all Accordions when searched

* refactor: Type node as possibly undefined
2024-09-25 14:19:15 +02:00
dependabot[bot] 9e5e7f8fdc build(deps): Bump rollup from 3.29.4 to 3.29.5 (#3178)
Bumps [rollup](https://github.com/rollup/rollup) from 3.29.4 to 3.29.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.29.4...v3.29.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 13:49:55 +02:00
Ken e9dc171d74 Referansesider: Dynamic route-list generation for header and homepage 2024-09-25 13:25:43 +02:00
Julian Nymark 544b80eeae 💄 [referansesider] Minside Cards 2024-09-25 13:17:10 +02:00
Julian Nymark 4358b53095 🎨 [referansesider] move Styled components to top layer++ 2024-09-25 12:07:57 +02:00
Julian Nymark de57099b09 🎨 [referansesider] move Styled components to top layer 2024-09-25 11:59:57 +02:00
Ken 5a97cb422d feat: Add cache-control to index.html metadata referansesider 2024-09-25 11:16:03 +02:00
Ken 67fb3bb3a1 feat: Added theme switcher for referansesider 2024-09-25 10:52:03 +02:00
Ken 7bdd5cb748 bug: Fixes darkmode cascading for darkside tokens 2024-09-25 10:10:24 +02:00
github-actions[bot]andgithub-actions[bot] 62bcab1ab0 Version Packages (#3170)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-25 09:36:07 +02:00
Halvor Haugan 61e60d9556 Modify changeset text for Accordion change 2024-09-24 17:17:18 +02:00
Halvor Haugan 9c1eba4450 Accordion: Remove position:relative to fix popover clipping 2024-09-24 16:53:46 +02:00
Julian Nymark 63986d9872 💄 [referansesider] remove overflow 2024-09-24 16:43:04 +02:00
Ken 761c8ef64f refactor: Update tokens use in Piktogram for sykepenger page 2024-09-24 16:31:30 +02:00
Ken 4b86b555d8 feat: Referansesider now properly handles nested routing 2024-09-24 16:10:58 +02:00
Julian Nymark 8e1e294fda 💄 [referansesider] minside add icons 2024-09-24 15:51:55 +02:00
Halvor Haugan f71594e477 ErrorSummary: Remove aria-attributes. (#3171) 2024-09-24 15:41:49 +02:00
Julian Nymark d2a89851cd 💄 [referansesider] responsive design fix 2024-09-24 15:31:25 +02:00
Ken d27da71304 feat: Refactored to use more tokens in referansesider 2024-09-24 15:26:19 +02:00
Julian Nymark fcf17fc750 💄 [referansesider] minside card CSS 2024-09-24 15:24:41 +02:00
Julian Nymark e1b091358b 🎨 [referansesider] add content to minside 2024-09-24 15:15:15 +02:00
dependabot[bot] 988ad39ad1 build(deps): Bump rollup in /examples/referansesider (#3173)
Bumps [rollup](https://github.com/rollup/rollup) from 4.21.3 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.21.3...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-24 14:00:52 +02:00
Ken 524c87e3bd feat: Update referansesider header fontsize 2024-09-24 13:54:48 +02:00
Ken 8cf6123656 feat: Created /komponenter route for component-testing, refactored button-component
feat: Use func for sykepenger function
2024-09-24 13:32:24 +02:00
Julian Nymark 866e6a168c 💄 [referansesider] make sykepenger more responsive 2024-09-24 13:16:47 +02:00
Ken bc2be15c55 Update referansesider
- feat: Refactor to use aksel-icons package
- refactor: use google import for font instead of inline files
2024-09-24 13:06:55 +02:00
Julian Nymark 4e6fc073fe 🐛 [referansesider] only have tanstack router devtools in dev mode 2024-09-24 12:59:56 +02:00
Ken e895c691ce [Referansesider] SPA deploy to aksel-referansesider.ansatt.dev.nav.no (#3174)
* bug: Fix build-script

* feat: Workflow for SPA deploy of referansesider

* feat: Add workflow dispatch to SPA deploy
2024-09-24 12:40:08 +02:00
Halvor Haugan 186c0fec07 🆙 Upgrade some packages (#3165) 2024-09-23 17:24:04 +02:00
Ken 746a58b663 feat: Updated darkside tokens with figma 2024-09-23 16:30:13 +02:00
Julian Nymark d767aadde3 🎨 [referansesider] add crude dekoratør 2024-09-23 14:02:30 +02:00
KenandHalvor Haugan 4359428b40 [Pagination] Deprecated page-prop, synced design with Figma (#3164)
* feat: Mark page-prop as deprecated in pagination

* feat: Mark page-prop as deprecated in pagination with better comment

* feat: Synced pagination with Figma

* memo: Changeset

* memo: Add classes to deprecationlist in stylelint config

* memo: changeset for stylelint

* memo: changeset for stylelint

* Update @navikt/aksel-stylelint/src/deprecations.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update .changeset/thirty-snakes-doubt.md

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-09-23 12:28:52 +02:00
Halvor Haugan d583276428 Combobox: 🏷️ Better typing for maxSelected prop (#3169) 2024-09-23 10:07:06 +02:00
github-actions[bot]andgithub-actions[bot] 0d29a0708a Version Packages (#3151)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-20 10:33:33 +02:00
Vegard Haugstvedt d6b685c4c5 Bugfix/combobox list items with multiple spaces get invalid (#3162)
* Fix issue with whitespace in the id attribute for options with multiple spaces

* Add changeset
2024-09-20 09:32:34 +02:00
Julian Nymark 17eaf6139b 🎨 [referansesider] sykepenger++ 2024-09-20 00:38:18 +02:00
Julian Nymark f0820f4f89 🎨 [referansesider] sykepenger++ 2024-09-20 00:38:18 +02:00
Halvor Haugan cd9dc047ed Upgrade dockerimage (#3160) 2024-09-19 15:06:56 +02:00
Julian Nymark bc711c9653 💄 [referansesider] css tweaks for Accordion 2024-09-19 13:00:01 +02:00
Julian Nymark 5fd1d385cf 🎨 [referansesider] add PillLink 2024-09-19 12:22:13 +02:00
dependabot[bot]andHalvor Haugan f44acf4216 build(deps-dev): Bump vite in /examples/referansesider (#3154)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.5 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-09-19 10:47:21 +02:00
Julian Nymark 302eed3908 💄 [referansesider] use new tokens 👏 2024-09-18 17:08:39 +02:00
Julian Nymark 24bec11799 💄 [referansesider] Accordion 2024-09-18 16:56:39 +02:00
KenandHalvor Haugan 72b2b3875b [Tokens] Updated to new config (#3157)
* feat: Update style-dictionary to v4

* feat: Rewritten tokens to typescript

* feat: Update to new token config

* refactor: removed unused types

* feat: Remove 'A'-prefix in js token

* update: Lock update

* testing: Updated tests to correctly mirror wanted behaviour

* refactor: Removed output fallbacks

* Update @navikt/core/tokens/darkside/tokens/contrast.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Update white definition in contrast

* refactor: Remove duplicate global color definition

* refactor: Avoid accumulator spread in reduce

* refactor: rename 'mode' -> 'theme'

* Update @navikt/core/tokens/darkside/sd-format.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Added comment support to JS-tokens

* Update @navikt/core/tokens/darkside/tests/validate-config.test.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Use correct config in tests

* Update @navikt/core/tokens/darkside/util.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Added returnType for semanticTokensForAllRolesConfig

* feat: Types token configurations

* feat: Updated color-scale to latest figma-update

* feat: Types mergeConfig function

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-09-18 16:43:42 +02:00
Halvor Haugan e023ace28d Adjust examples of Accordion (#3159) 2024-09-18 16:06:33 +02:00
Julian Nymark 0129159812 🚚 [referansesider] consistent file naming 2024-09-18 15:48:42 +02:00
Julian Nymark 72fd005990 🎨 [referansesider] clsx dep + more content 2024-09-18 15:41:32 +02:00
Julian Nymark 104427d7ef 🎨 [referansesider] more work on Sykepenger 2024-09-18 13:57:10 +02:00
Julian Nymark 996118532b ➕ [referansesider] tw-merge 2024-09-18 13:56:31 +02:00
Julian Nymark 1cdf2c93a8 ✨ [referansesider] add icon 2024-09-18 13:55:51 +02:00
Julian Nymark 82e66e2a4b ✨ [referansesider] add icon 2024-09-18 13:55:41 +02:00
Julian Nymark 03495f8343 💄 [referansesider] adjust sykepenger header 2024-09-18 10:40:51 +02:00
KenandHalvor Haugan 17031eafbe [Tokens] Updated config to Style-dictionary v4, rewritten to typescript (#3156)
* feat: Update style-dictionary to v4

* feat: Rewritten tokens to typescript

* Update @navikt/core/tokens/config/build.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/tokens/package.json

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* update: Lock update

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-09-18 10:17:41 +02:00
Julian Nymark fe3c42282a 🎨 [referansesider] add sykepenger header 2024-09-18 09:58:31 +02:00
Julian Nymark 7defbd9163 💄 [referansesider] remove broken negative margin calc css 2024-09-17 16:13:45 +02:00
Julian Nymark 4a402557f6 🎨 [referansesider] more scaffolding, remove unused CSS 2024-09-17 16:12:24 +02:00
Halvor Haugan f7ff964162 LanguageProvider: Remove spreading of empty object (#3153) 2024-09-17 15:28:41 +02:00
Julian Nymark 6bad72e891 🔥 [referansesider] remove generated file from git 2024-09-17 14:18:49 +02:00
Julian Nymark b0b493bc08 ➕ [referansesider] add tailwindcss 2024-09-17 14:13:36 +02:00
Julian Nymark 0720f22467 ➕ [referansesider] add tailwindcss 2024-09-17 14:11:00 +02:00
Halvor Haugan f4137e4df8 Adjust default story on ExpansionCard 2024-09-17 14:01:32 +02:00
Julian Nymark 730538cfb4 🎨 [referansesider] add router 2024-09-17 13:35:19 +02:00
Halvor Haugan a63c3792cc Simplify PR template and add guideline about changeset message (#3138) 2024-09-16 15:55:04 +02:00
Julian Nymark dd03bd8705 🚧 [referansesider] add example for variant in styled-components 2024-09-16 15:34:16 +02:00
Julian Nymark 97eec24ae0 🚧 [referansesider] do not use existing components & CSS 2024-09-16 15:26:06 +02:00
Julian Nymark 09e4f70365 🚧 [referansesider] use local dependencies for react as well 2024-09-16 13:56:02 +02:00
Julian Nymark ce694fa37c 🚧 [referansesider] use local dependencies for css & tokens 2024-09-16 13:50:53 +02:00
Julian Nymark 7f27e19032 🚧 [referansesider] correctly import design token 2024-09-16 13:21:35 +02:00
Julian Nymark 12f6ae9134 🚧 [referansesider] use styled-components, try to import our tokens 2024-09-16 13:13:42 +02:00
Julian Nymark 3c6459305e 🚧 [referansesider] add aksel dependencies 2024-09-16 12:47:26 +02:00
Julian Nymark 60cf2b863b ✨ (referansesider) init vite project 2024-09-16 12:19:26 +02:00
Halvor Haugan 78779fbb56 🆙 Upgrade to Storybook 8.3 (#3150) 2024-09-16 09:53:28 +02:00
SebastianJarsve 59156e603c Fix link in CONTRIBUTING.md (#3152) 2024-09-16 09:42:36 +02:00
Julian Nymark 057bfe85be 💄 tweak CSS for list icons (#3148) 2024-09-13 16:17:51 +02:00
github-actions[bot]andgithub-actions[bot] d2424ec22a Version Packages (#3149)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-13 14:03:22 +02:00
1c11a6a3b9 Aksel v7 (#3139)
* Tooltip labeling (#3094)

* feat: Better labeling of Tooltip

* feat: Better keyshortcuts for screenreaders in Tooltip

* memo: Updated story

* bug: Better error logging for example-parsing

* refactor: describeChild -> describesChild

* fire: Removed extra story

* bug: removed extra tabIndex

* memo: Update Tooltip demo description

* Update aksel.nav.no/website/pages/eksempler/tooltip/labeling.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Updated defaultValue for describesChild

* bug: removed Tooltip prop from ToggleGroup

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Tailwind: Fixed 'screen' -> 'screens' bug to properly adopt breakpoints. (#3119)

* 💥 Screen -> Screens in tailwind-config

* refactor: Adopt updated screens-config in Aksel.nav.no project

* Icons: Removed old and renamed icons (#3120)

* 💥 Removed renamed icons

* ErrorSummary: Add fallback for heading + better focus handling (#3140)

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Added composeEventHandlers to onFocus in ErrorSummary

* memo: Removed inaccurate description for tooltip demo

* feat: Omitted tabIndex from ErrorSummary

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-09-13 13:48:56 +02:00
Julian NymarkandKen 46a14b19dd translations in Provider (#3136)
* 🚧 translations in Provider

* ♻️ consume providerContext translations in useI18n + example usage (FormProgress)

* changeset

* 🎨 keep component level translations

* ♻️ extract language provider into own provider

* 📝 update changeset doc

* 🎨 undo all changes to original Provider

* 📝 changeset text

* ✅ update test for i18n changes

* refactor: Moved location of LanguageProvider, removed changeset

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-09-12 15:36:04 +02:00
45a50a531e Version Packages (#3137)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-09-12 14:48:31 +02:00
Halvor Haugan c506c1787f [aksel.nav.no] SuggestionBlock for beta patterns (#3144) 2024-09-12 11:41:02 +02:00
dependabot[bot] 36ada01453 build(deps): Bump express from 4.19.2 to 4.20.0 (#3146)
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.20.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.20.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-11 15:01:20 +02:00
Ken 88201e34d8 🔒 Moved chromatic env token to .env and github secrets (#3145) 2024-09-11 11:56:52 +02:00
Halvor Haugan 14fed5aa95 Adjust examples of Stepper (#3143) 2024-09-10 12:52:40 +02:00
Ken 672fdb9d0c [Aksel.nav.no, Button docs] Renamed 'frameworks' example to 'button as link'. (#3135)
* memo: Updated storyname for button framework

* memo: Updated example with link i description and link -> nextlink

* testing: Added test to check link/markdown-parsing in description-field

* test for playwright

* bug: Playroom does not support Nextjs link

* bug: Turn off sandbox for bytton-demo missing import in playroom
2024-09-10 12:42:12 +02:00
Halvor Haugan 1d585e6667 Form validation demo improvements (#3132) 2024-09-09 12:51:45 +02:00
Ken 1b2dc88968 [Icons] Added new icons for face category (#3134)
* feat: Added new icons for face category

* Update .changeset/lazy-dryers-do.md
2024-09-09 09:48:08 +02:00
Halvor Haugan c8b79090d2 Combobox: Add support for onBlur, and omit props that have no effect (#3125) 2024-09-09 09:31:18 +02:00
github-actions[bot]andgithub-actions[bot] 914b0dbcb0 Version Packages (#3117)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-04 14:27:45 +02:00
Lars Eirik Korsgaard Hansen e271bc0aaa 🐛 Combobox: trailing spaces are no longer accepted autocomplete-letters (#3105)
* 🐛 spaces no longer act as an accepted autocomplete-letter

* changeset

* simplified previous code, added edge case to story
2024-09-04 11:01:29 +02:00
Halvor Haugan 052750b4b9 Form validation examples (#3100) 2024-09-03 22:03:58 +02:00
KenandHalvor Haugan 531e720a35 Update sanity (#3096)
* feat: Update sanity

* feat: Update sanity minor

* feat: Bumped sanity to 3.55

* Update aksel.nav.no/website/sanity/schema/objects/templates/ExampletextBlock.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-09-02 12:50:13 +02:00
Julian NymarkandHalvor Haugan c98ab95750 Combobox: 🚸 hide caret on select (until options list opened) (#3071)
* 🚸 hide caret on select (until list opened)

* 🔥 remove console.log()

* 🎨 invert varname for simpler CSS

* 🚸 also enable caret on "re-click" (while still focused)

* 🚸 DX improvement, placeholders++

* 🚸 (combobox) always show caret for multiple select

* 🚸 hide caret on multiselect + isLimitReached

* 🔥 remove console.log

* 🐛 hide caret when single has a selection (combobox)

* 🐛 hide caret if isLimitReached

* 🎨 remove unnecessary useState()

* 🐛 correct deps for useEffect

* 🐛 add maxSelected as dep

* Update @navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* changeset

* 🐛 avoid setting placeholder twice

* Update .changeset/fresh-boxes-enjoy.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 remove redundant placeholder

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-09-02 12:14:25 +02:00
Ken 1cea314de0 bug: Avoid RelatertInnhold from erroring when empty 2024-09-02 10:33:47 +02:00
Ken 7c5538fe5e Security token update (#3128)
* feat: Token re-roll

* demo: Placeholder frontpage

* Revert "demo: Placeholder frontpage"

This reverts commit b7dbc3a65b.

* feat: Token re-roll for slackbot

* bug: Added env to playwright url-generation
2024-09-01 23:18:35 +02:00
Halvor Haugan 2c346a81dd Adjust example heading text for ErrorSummary (#3126) 2024-08-30 16:35:07 +02:00
Julian Nymark 32c13c0363 combobox 🚸 tweaks for single select (#3124)
* combobox 🚸 tweaks for single select

- hide the selected value when inputing text
- delete input value on blur (you must actually select something with
  intent to select it, this prevents the field from "looking like it's
  filled in when it's actually not")

* changeset

* 🐛 use clearInput() instead of setValue("")

* 💄 match x-position of input to the selected option
2024-08-30 09:35:48 +02:00
Vegard Haugstvedt aca5143454 Bugfix/combobox selecting autocompleted word is broken (#3110)
* Add test case for selecting autocompleted word after first character typed, which is currently broken (selects first in list, not the autocompleted word)

* Select the correct option when pressing enter after autocompleting a word in Combobox

Fixes #3106

* Added changeset
2024-08-28 13:45:13 +02:00
Halvor Haugan 6220b9ce69 Icons: Adjust keywords for ClipboardXMark (#3121) 2024-08-28 12:07:35 +02:00
Julian Nymark 8540bd756b 🚨 no-console (#3078)
* 🚨 no-console

* 🚨 also fail on warnings

* 🔥 undo whitespace change

* 🔥 remove whitespace again?

* 🐛 don't lint js with ts rules

* 🚨 convert some log -> info

* 🐛 avoid the max-warnings bug failing on ignored files

* Revert "🐛 avoid the max-warnings bug failing on ignored files"

This reverts commit 0f7c169daf.

* 🐛 exclude some generated files

* 🔥 remove debug log

* 🔥 remove debug log

* 🔥 remove debug log
2024-08-26 12:01:19 +02:00
dependabot[bot] 3d2a9da528 build(deps): Bump micromatch from 4.0.7 to 4.0.8 (#3116)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 10:09:42 +02:00
Ken 9907ef08a6 feat: Updated Clipboard-icons (#3113) 2024-08-26 09:55:02 +02:00
github-actions[bot]andgithub-actions[bot] 33b3ac795a Version Packages (#3115)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-26 09:48:48 +02:00
Ken 122477cf98 Font naming and location preload fix (#3114)
* feat: Update font-reference to old naming to preserve preloads

* memo: Changeset

* memo: Changeset update
2024-08-26 09:16:53 +02:00
Ken 64240eb84a feat: Added template category for 'brev' 2024-08-21 13:03:35 +02:00
KenandHalvor Haugan b5d76f7360 Updated contribution texts for templates (#3104)
* memo: Updated contribution texts on templates

* Update aksel.nav.no/website/components/website-modules/suggestionblock/SuggestionBlock.GhPages.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-21 13:00:51 +02:00
Ken 7244e7b148 feat: Update ExpansionCard heading options for sanity (#3111) 2024-08-21 12:38:02 +02:00
Ken deb4ef16fd 📝 Correct heading-size (xlarge) for templates 2024-08-21 08:21:02 +02:00
github-actions[bot]andgithub-actions[bot] 8c5c6dde96 Version Packages (#3107)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-21 07:55:59 +02:00
Julian Nymark f5ff01c830 🎨 add category to aksel website (monster og maler) 2024-08-19 13:57:06 +02:00
Ken 8ce364ec39 Table: Fixed background clipping when using ExpandableRow (#3095)
* bug: Fixed backgroud clipping when using ExpandableRow in Table

* Update .changeset/modern-items-leave.md

* refactor: Use onClick on expandable tablecell

* fire: Removed duplicate eventhandler

* fire: removed testing-story
2024-08-16 14:12:15 +02:00
Ken 293b15f6bb Markdown support in Code example descriptions (#3098)
* feat: Added markdown link support to code example descriptions

* memo: Markdown implementation tested in story

* refactor: Use child pattern
2024-08-16 13:40:58 +02:00
dependabot[bot] 289ce637f6 build(deps): Bump elliptic from 6.5.6 to 6.5.7 (#3109)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.6 to 6.5.7.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.6...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-16 12:50:49 +02:00
Vebjørn RekkeboandKen 09ea18a54e Bump jscodeshift-add-imports (#3099)
* bump jscodeshift-add-imports to 1.0.11

* version-entry

* improve patch description

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-08-16 09:29:59 +02:00
Ken 936d4176f8 Feature: Block for download-links in Sanity (#3108)
* feat: Downloads block

* feat: Block for adding file-downloads to articles

* Update aksel.nav.no/website/components/sanity-modules/download-block/DownloadBlock.stories.tsx

* Update aksel.nav.no/website/components/sanity-modules/download-block/DownloadBlock.tsx

* feat: Added max width

* bug: Used nb locale for file size format

* refactor: DownloadLink -> attachment

* bug: attachment rename in query

* feat: Body-text not required

* memo: Updated story for no body variant of attachment

* bug: Fixed reference to old naming
2024-08-15 15:35:04 +02:00
Halvor Haugan 19e8fcaff1 Table: Corrected the type of onSortChange (#3103) 2024-08-15 14:45:29 +02:00
Lars Eirik Korsgaard HansenandHalvor Haugan 4e76298a9a 🩹 Combobox: placeholder fix (#3101)
* remove placeholder when value added; add placeholder to story

* add max selected to default story

* patch changeset

* Update .changeset/friendly-pens-sin.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update friendly-pens-sin.md

* move fix to Input from InputController

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-15 14:42:00 +02:00
Halvor Haugan 2f23278d53 Adjust examples of Tabs 2024-08-15 14:13:18 +02:00
Halvor Haugan 75da983588 Adjusted examples of Select (#3102) 2024-08-15 13:39:36 +02:00
dependabot[bot] 27c43ef5e5 build(deps): Bump axios from 1.6.0 to 1.7.4 (#3097)
Bumps [axios](https://github.com/axios/axios) from 1.6.0 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.0...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 14:34:56 +02:00
github-actions[bot]andgithub-actions[bot] b9ad316745 Version Packages (#3089)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-13 13:45:41 +02:00
Halvor Haugan 0de87ce911 FormSummary: Add background color (#3093) 2024-08-13 13:07:32 +02:00
KenandHalvor Haugan d4ce6aeb7d Updated Table sorting demo (#3090)
* memo: Updated Table sorting demo

* refactor: use nullish check for sortable

* Update aksel.nav.no/website/pages/eksempler/table/sortable.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-13 13:03:38 +02:00
Ken d319dae22f feat: History i now kept when navigating filters on god-praksis pages (#3092) 2024-08-13 13:03:30 +02:00
Halvor HauganandKen 9e6808d31f Adjusted color token Green 400 (#3091)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-08-13 10:29:03 +02:00
Halvor Haugan 1cba662ad3 Fix release job (#3087) 2024-08-12 14:08:26 +02:00
Ken 813d5020cc Primitives: Added gridColumn-prop for more grid alignment control (#3082)
* feat: Added gridColumn prop to Baseprimitives

* memo: Changeset
2024-08-12 12:56:35 +02:00
Halvor Haugan c53543ccd8 Modal: Added scroll shadows (#3083) 2024-08-12 12:38:08 +02:00
Halvor Haugan 0a9d3b3c59 🆙 Upgrade rimraf and yarn, remove glob (#3084) 2024-08-12 12:36:49 +02:00
Ken 5b1aeea15f feat: Changed design category to brand (#3086) 2024-08-12 12:28:33 +02:00
Ken 8e15d43e50 feat: Order GP-articles based on last verified, not publish date (#3068)
* feat: Order GP-articles based on last verified, not publish date

* refactor: Updated naming and removed publishedAt value from query
2024-08-09 14:23:37 +02:00
github-actions[bot]andgithub-actions[bot] 3c95772b1a Version Packages (#3077)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-09 09:53:16 +02:00
Ken a312faac6b Updated chromatic-project (#3079)
* feat: Updated chromatic-project

* bug: remove extra forwardslash
2024-08-08 14:34:48 +02:00
02fa92468b FloatingMenu component (#2906)
* ✨ Initial Popper wrapper

* ✨ Floating popper element

* 🏷️ Rename popper -> floating

* 🐛 Fikset imports

* ♻️ FLoating-fil splittet opp i moduler

* 🎨 Satt opp exports og story

* 🎨 Arrow er nå del av content

* 🐛 display block på arrow

* 🎉 Egen Portal-komponent

* 🎨 Portal og Overlay exportert i root

* ♻️ Tooltip bruker egen Portal

* 📝 Changeset

* 🔀 Merge Portal

* 📝 Story with portal

* 📝 Props story

* 🚚 Temp rename

* 🚚 Temp rename

* 🎨 La til Slot på Floating.Anchor

* ✨ Fungerende nesting av dismissable items

* ✨ Fungerende outsidepointerclick handler

* 🚚 Ryddet opp i struktur

* ✨ bedre event-handling

* 🎉 Popover bruker dismissableLayer

* 🔥 Fjernet console.logs

* ♻️ Extender nå ikke htmldivelement

* 📝 Commented on dimsissablelayer

* 📝 Kommentarer

* 🎨 Disable pointer-events on body

* 🎨 Setup content

* 🎨 Fungerende popover med story

* 🎨 useDescendant-API kan bruke uten context-error på nesting

* 🐛 Fikset tilfeller der oppdatering av descendant-options ikke ble reflektert i descendants-map

* 🐛 Satte enabled til optional

* bug: import av Portal brakk stories for Popover og Floating

* bug: DescenadantContext er nå riktig typet som undefined

* label: scopet navn for bruk av descendant-provider i dismissablelayer

* memo: Bedre kommentarer

* feat: Sender ikke callbacks hvis layer er disabled

* memo: Formatering og kommentarer

* memo: Kommentarer

* copy: Kopiert over basekomponent

* refactor: Oppdatert imports

* refactor: Oppdatert Primitive bruk

* feat: Støtter forwardRef

* fire: Fjernet Radix import

* feat: Bruker Floating og ikke PopperPrimitive

* type: Bedre typet composeEventHandler

* refactor: Fjernet scopedProps

* feat: Custom RowingFocus

* wip feat: Replaced rowingfocus

* wip feat: Implemented initial focus for rowingfocus

* wip feat: Removed old collection api

* refactor: Use internal Slot component

* refactor: Fixed all scoped context-use

* feat: Fullført migrering til internt API

* test: Setup stories

* bug: Content is added to descendants

* bug: Found issue for nesten descendants

* copy: Kopiert over refactor for useDescendant

* bug: Fikset descendants nesting

* feat: Fikset keyboard nav med nested descendants

* bug: Removed early return

* memo: Kommentarer

* label: Typer

* refactor: Fjernet Root export

* refactor: Fjernet typeahead

* test: Setup story for entryfocus

* refactor: Forenklet FocusScope

* refactor: bedre dokumentert utils

* refactor: Moved utils to separate file

* refactor: Moved slotted-div to separate file

* refactor: Moved MenuContext out to context-file

* 🚚 Moved focus-files

* refactor: Update syntax

* refactor: Moved MenuAnchor to file

* refactor: Moved MenuGroup to file

* refactor: Moved Separator to file

* refactor: Moved Label to file

* refactor: Moved utility-components

* refactor: Flyttet item til mappe

* refactor: Flyttet checkbox

* refactor: Content in separate file

* refactor: Radio i separate filer

* refactor: SubComponents in files

* refactor: Bedre typer

* refactor: Re-written back to single file

* refactor: Fjernet gamle commits

* bug: Fikset import feil og feil extension av type

* refactor: data-attrb fra radix -> aksel

* refactor: Fjernet console.logs

* bug: Fixed import and test-type error

* refactor: Remove unwanted exports

* feat: Re-added ItemIndicator wrapper

* refactor: Updated exports

* refactor: removed focusguards

* refactor: FocusScope now assumes Slot

* refactor: Removed extra tabIndex

* feat: Implemented ItemIndicator and styling for testing

* refactor: Rowing -> Roving

* refactor: Moved Menu-component into overlays-dir

* bug: Fixed import of Slot

* bug: Re-add tabIndex to MenuItem for correct focus-handling

* memo: Rename Tab -> menu

* refactor: removed unwanted exports in story

* Update @navikt/core/react/src/overlays/floating-menu/Menu.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Added missing meta import

* bug: Aligned dash with checkmark

* bug: Circle icon now shows for radio-demo

* bug: keyframes has extra ':', breaking animations

* bug: Re-added ItemIndicator for all TickIcon

* bug: WithLabel story now shows complete dropdown

* feat: Added disabled-styling to submenu

* refactor: Now uses ownerdocument where needed instead of document

* adjustments after review 1

* adjustments after review 2

* refactor: Updated to correct function type syntax

* refactor: renamed floating content propname

* refactor: Consistent destructuring of props

* refactor: rename FocusScope props

* memo: Added explanation for why we use flushEvent

* refactor: added consistent use of composeEventHandlers

* refactor: Force userSelect none style

* demo: Allow canceling opening if pointerdown is released outside of menu

* memo: Better line-dividers

* refactor: removed data-highlighted logic

* Update @navikt/core/react/src/overlays/floating-menu/Menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/floating-menu/Menu.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* feat: Allow use of 'il' in floating-element

* feat: Implemented semantic tags for items and content

* Revert "feat: Implemented semantic tags for items and content"

This reverts commit 6bf473328d.

* Revert "feat: Allow use of 'il' in floating-element"

This reverts commit 5307facbca.

* minor adjustments

* feat: Added optional close keybind for submenus

* refactor: Removed unneeded label component

* memo: Comments

* memo: Comments

* refactor: Update hookname

* refactor: removed duplicate callback

* refactor: Less nesting in FocusScope

* refactor: Remove extra edgecase check not needed for dropdown

* refactor: Impl -> internal

* Update @navikt/core/react/src/overlays/floating-menu/parts/FocusScope.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/overlays/floating-menu/parts/FocusScope.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: FocusScope jsdoc

* Update @navikt/core/react/src/overlays/floating-menu/parts/FocusScope.tsx

* Update @navikt/core/react/src/overlays/floating-menu/parts/FocusScope.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* testing: Added onCloseAutoFocus demo

* refator: renamed onTriggerLeave

* refator: better handleing of edgecase where we close sidemenu with arrowright

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-08-08 12:07:03 +02:00
Ken ea3e881467 feat: New icons Split (#3072) 2024-08-08 11:03:22 +02:00
Halvor Haugan 779e30d1df Combobox: Can no longer remove options with backspace when shouldShowSelectedOptions is false (#3076) 2024-08-07 12:48:22 +02:00
Halvor Haugan 0bd7812cdd [aksel.nav.no] Correct icon on hard coded list item (#3075) 2024-08-07 12:39:06 +02:00
Vegard Haugstvedt 58283c0e95 Refactor/split up filtered options (#3073)
* refactor: Move AddNewOption to a separate file to make FilteredOptions cleaner and prepare for future features.

* refactor: Move FilteredOptionsItem to a separate file to make FilteredOptions cleaner and prepare for future features.

* refactor: Move MaxSelectedMessage to a separate file

* refactor: Move LoadingMessage to a separate file

* refactor: Move NoHitsMessage to a separate file

* Added changeset and a type to FilteredOptionsItem props
2024-08-07 12:38:54 +02:00
Ken 7cfb69c239 Update README.md (#3074) 2024-08-07 12:28:34 +02:00
github-actions[bot]andgithub-actions[bot] 09828a4223 Version Packages (#3043)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-07 11:52:24 +02:00
Halvor Haugan e776c7c560 Endre changeset 2024-08-07 11:45:17 +02:00
Halvor Haugan 2dd266f0c4 ⬆️ Upgrade dependencies (minor) (#3070) 2024-08-07 09:13:14 +02:00
Ken daee394a71 feat: Hide sandbox-pages from robots (#3069) 2024-08-06 07:31:39 +02:00
KenandHalvor Haugan 8fd183cc90 feat: Updated font support and definition (#3044)
* feat: Updated font definitions

* memo: Changeset

* stories adjustments

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-08-05 09:34:07 +02:00
Halvor Haugan 0b1ac4f82c [aksel.nav.no] Support relative markdown links (#3059) 2024-08-05 09:32:46 +02:00
KenandHalvor Haugan ec79e25060 feat: Added stale-issue handling (#3029)
* feat: Added stale-issue handling

* Update .github/workflows/stale.yml

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-05 08:57:44 +02:00
Vegard HaugstvedtandHalvor Haugan 18d20aaa8e Combobox: Pressing Escape in while focusing a Combobox inside a Modal will close the Modal (#3053)
* If pressing Escape while FilteredOptions is open, Combobox should swallow the keydown event, so it does not close a Modal

* Added changeset

* Update @navikt/core/react/src/form/combobox/Input/Input.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Prevent default Escape from bubbling out of Combobox also when we have a value (which will be cleared).
Also co-located all the Escape-handling in keyDown. This also better mimics Select's native behaviour.

* Add clearInput to dependency array

* Legg til et Storybook-eksempel på Combobox i Modal, for manuell testing. La inn en tekst for å forklare caset.

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-02 13:30:22 +02:00
Halvor Haugan 72c8f3112a Combobox: Fixed aria-describedby and some types (#3065) 2024-08-02 12:51:25 +02:00
Vegard HaugstvedtandHalvor Haugan 6e63069d6b Combobox: Fix NullPointer error in single-select with allowNewValues (#3054)
* Prevent NullPointer when selecting a new/custom value in Combobox single-select with Enter (without selecting it in FilteredOptions)

* Update .changeset/cyan-carrots-return.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Expect AddNewButton to be visible

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-02 12:47:37 +02:00
Halvor Haugan 825d87af43 Combobox: Entering an already selected option and pressing enter no longer removes it (#3061) 2024-08-02 12:43:34 +02:00
9181d2ce75 Combobox: Implement free text search (#2974)
* Implement fuzzy search in combobox

* bug: ArrowUp now works as intended, stopped onChange from running each arrow-press

* memo: Added comment

* refactor: Removed extra state-update for searchterm

* Update @navikt/core/react/src/form/combobox/FilteredOptions/filtered-options-util.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Missed function export after refactor

* Add test for filtering in search

* Fix comments to better reflect the new code

* Change type for onChange to take in only value, not the entire event. This simplifies calling onChange programatically.

* Added changesets to reflect the changes in this branch

* KeyboardEvent.currentTarget does not have selectionStart property

* Update example

* Update storybook examples

* bug: Fixed undefined value sent to toggleOption callback

* revert: Removed test for what was corret interaction

* Add generic to enhance the event type for handleKeyDown

* Updated JSDoc

* Changed method signatures for onChange earlier, but forgot these two tests

* Add test for triggering onChange on every typed character in Combobox with autocomplete.

Currently fails on the last character, as it does not actually change the word in the input field.

* Move onChangeHandler from triggering onChange to onInput, as the former does not trigger when typing the last character of an autocompleted word.
onInput seems to work more consistently, but will test multiple use cases.

* Update aksel.nav.no/website/pages/eksempler/combobox/multi-select-controlled.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/Input/Input.tsx

* Update .changeset/wild-owls-tan.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/Input/Input.tsx

* updateInputValue is no longer neccessary

* Update @navikt/core/react/src/form/combobox/Input/Input.tsx

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-08-02 11:04:50 +02:00
Ken 22016ec90f prettier-plugin-tailwindcss update (#3046)
* feat: Updated tailwind prettier plugin

* refactor: Used prettier-plugin to remove extra whitespace in className
2024-07-10 10:44:58 +02:00
Ken f7d4c43f98 Added support for markdown links in intro lists (#3045)
* feat: Added support for markdown-links in intro-list

* memo: Added comments
2024-07-10 10:40:22 +02:00
Ken c67fd8bcda feat: Increased amount of articles shown in masonary 2024-07-09 14:27:42 +02:00
Julian Nymark 5efa09d00e 🐛 bump playroom version + set white bg (#3042) 2024-07-08 15:35:46 +02:00
Ken 3afc568a04 refactor: Better naming for modifiers check in Tabs and Togglegroup 2024-07-08 08:44:36 +02:00
Ken 2fe2586ac6 Respect meta-keys when navigating in Tabs, ToggleGroup (#3041)
* bug: RovingFocus now respects alt-keys

* memo: changeset
2024-07-08 08:41:11 +02:00
Ken 420c5c30d8 Primitives CSS update (#3028)
* refactor: Updated stack to only add CSS when used as prop

* refactor: Updated hgrid to only add CSS when used as prop
2024-07-04 14:55:25 +02:00
Ken 6cf141a8c6 Font sync (#3032)
* refactor: Created namespaced location for SourceSans3 fonts

* testing: Added story/chromatic for fonts

* refactor: Rename to use - instead of underline

* refactor: Remove SourceSans3 prefix
2024-07-01 11:04:54 +02:00
dcba0fffad Chromatic stories consolidation (#2996)
* Guidepanel

* Bleed

* Move 'options' object out of 'control' object

* Hide & Show

* Page

* h2 instead of Heading in Chromatic FN

* 🎨 update stories

* 🐛 disable the forcedColors parameter, seems buggy?

- it seems to be a chromatic error, or at least I'm not sure what's
  happening when this parameter is enabled. Some stories seem to
  sporadically get the forcedColors applied.

* Stack

* Combobox: put 'Test' before every test-story for clarity

* Combobox & move combobox tests to tests-file

* made combobox stories testable with Chromatic snapshots

* Update @navikt/core/react/src/button/button.stories.tsx

* Alert rewrite

* Bleed add chromatic disable false

* FileUpload

* FormSummary

* HelpText

* Tooltip

* yarn update chromatic to 11.5.4

* Show: move parameters into Chromatic object

* memo: Removed duplicate heading

* bug: Removed extra argTypes

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-07-01 10:58:33 +02:00
Halvor Haugan da0a66fb62 Fix type for default export in stories (#3038) 2024-07-01 09:47:02 +02:00
Halvor Haugan 3a52359169 Improved example of top aligned Modal (#3039) 2024-07-01 09:40:01 +02:00
1b8d553c05 <VirtualFocus /> component (#2894)
* 🚧 WIP on some dropdown prop API

* ♻️ rename dropdown -> autocomplete

* 🚧 WIP towards Autocomplete (inspiration from Menu)

* 🚧 WIP Autocomplete

* 🚧 wip Autocomplete

* 🚧 wip Autocomplete

* 🚧 working idea for context (get & set autocomplete)

const thinger = () => {

* 🚧 pick property on Item

* 🚧 enrich story/example of Autocomplete

show how easy it is to add icons / do something more complicated inside
the autocomplete suggestions list alongside a <Search>

* 🚧 wip

- fairly nicely working list of virtually focusable items
- API interface kept simple (moved pick to Anchor though, single "exit
  point")
- item has focus function now, which triggers when it gets virtual
  focus, the API should not distinguish between virtual and real focus
  was the thinking here, it's more an implementation detail.

* 🚧 WIP new story for Autocomplete

- showcase dropdown search autocomplete

* Update @navikt/core/react/src/form/autocomplete/Autocomplete.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form/autocomplete/Autocomplete.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* 🔥 refactor class -> attr, remove css, use user provided <style> in story

* 🔥 remove originial ideas for a prop on <Search>

* ♻️ refactor + use mouseMove over mouseOver

* 🐛 reset virtualfocus on input change (within Anchor)

* ✨ add prop 'loop' for Autocomplete

* 🚚 Autocomplete -> VirtualFocus

* 🚧 WIP on some dropdown prop API

* ♻️ rename dropdown -> autocomplete

* 🚧 WIP towards Autocomplete (inspiration from Menu)

* 🚧 WIP Autocomplete

* 🚧 wip Autocomplete

* 🚧 wip Autocomplete

* 🚧 working idea for context (get & set autocomplete)

const thinger = () => {

* 🚧 pick property on Item

* 🚧 enrich story/example of Autocomplete

show how easy it is to add icons / do something more complicated inside
the autocomplete suggestions list alongside a <Search>

* 🚧 wip

- fairly nicely working list of virtually focusable items
- API interface kept simple (moved pick to Anchor though, single "exit
  point")
- item has focus function now, which triggers when it gets virtual
  focus, the API should not distinguish between virtual and real focus
  was the thinking here, it's more an implementation detail.

* 🚧 WIP new story for Autocomplete

- showcase dropdown search autocomplete

* 🔥 refactor class -> attr, remove css, use user provided <style> in story

* Update @navikt/core/react/src/form/autocomplete/Autocomplete.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form/autocomplete/Autocomplete.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* 🔥 remove originial ideas for a prop on <Search>

* ♻️ refactor + use mouseMove over mouseOver

* 🐛 reset virtualfocus on input change (within Anchor)

* ✨ add prop 'loop' for Autocomplete

* 🚚 Autocomplete -> VirtualFocus

* 🚚 Autocomplete -> VirtualFocus

* 🔥 remove unused CSS

* 🚧 add onActive, delete unused code

* 🚧 rename CSS classes

* ♻️ simplify <VirtualFocus> impl

- use the descendants API > grabbing the DOM nodes...

* 🔥 remove the aria-activedescendant responsibility from VirtualFocus

* Update aksel.nav.no/website/sanity/config.ts

* 🔥 remove comments that no longer apply

* 🔥 remove biome.json changes from PR

* ♻️ various PR changes

- homogenize the API (so both anchor and item have the sameish props,
  onActive, pick...)
- use useId() so multiple <VirtualFocus> on the same page get unique ids

* 🚧 + ♻️ testing changes in VO

- it's not great, weird behaviour on readouts of Items... (FF completely
  broken, sometimes reads "rgla" from "hourglass", other times nothing,
  Chrome is a little better)
- is this a decent API at all? is it overcomplicated?

* 🏷️ type itemRole

* 🔥 remove empty file

* ♻️ pr comments

- renaming to better match the rest of DS
- remove itemRole (just use role)
- eslint ignore

* ⚡ do not go via descendant API if self

* 🎨 add forwardRef & ...rest to Content

* 🐛 fix lying prop doc comment, remove unused CSS class

* ♻️ use <Slot /> (hoistmerge child)

* 💄 fix broken CSS (class was removed)

* 📝 update jsdoc

* 🚚 move role to Anchor (from VirtualFocus wrapper)

* 🎨 remove filtering from broken example

* 🐛 Anchor should trigger virtualfocused.onSelect()

* 🐛 use react v17 shimmed useId()

* Update @navikt/core/react/src/form/virtualfocus/VirtualFocus.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* 🚧 import

* 🎨 improve story

* 🐛 do not let consumer overwrite certain VirtualBox implementation

* 🎨 update story

* 🚚 move virtualfocus to utils

* 🎨 update to latest RovingFocus.tsx, tweaks to stories

* Update @navikt/core/react/src/util/virtualfocus/VirtualFocus.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🎨 improve docs (jsdoc), add Simple story

* 🚚 split up monster component into /parts

* 🐛 pull out dependency to remove cyclic dependency

* 🔥 RovingFocus.tsx

* 🐛 do not ignore external prop

* 🎨 simplify function calls + reorder for consistency

* 🔥 remove unused code

* 🎨 disable chromatic for internal tool stories

* 🏷️ Omit<> props that will get ignored/overridden

* 🏷️ Omit<> props that will get ignored/overridden

* 🏷️ use satisfies

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-28 15:56:54 +02:00
github-actions[bot]andgithub-actions[bot] 1aea10573c Version Packages (#3037)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-28 12:42:02 +02:00
Halvor Haugan 7c644cd9b1 Modal: New prop for aligning modal to top (#3033) 2024-06-27 13:58:45 +02:00
Halvor Haugan fe93f6450b Adjust examples and JSDOC for Alert (#3035) 2024-06-27 13:54:46 +02:00
github-actions[bot]andgithub-actions[bot] 86e52df680 Version Packages (#3013)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-25 15:39:57 +02:00
Halvor Haugan ff8072e352 Icons: FigureCombination icon adjusted (#3031) 2024-06-25 12:32:37 +02:00
Julian Nymark 5b033ab218 ✨ start formatting with biome too (#2991) 2024-06-25 12:27:35 +02:00
Halvor Haugan 6276b676d6 [aksel.nav.no] Validate unique title in exampletext_block (#3024) 2024-06-25 09:52:07 +02:00
Halvor Haugan c2ffd466af Update link in form templates (#3022) 2024-06-24 15:03:36 +02:00
Andreas Nordahl d6d6fb06b1 start align link items (#3026) 2024-06-24 13:05:47 +02:00
Halvor Haugan e829753847 Example of Alert with buttons (#3019) 2024-06-24 13:01:27 +02:00
Ken f1d8e9c4d3 feat: New icon ChildHairEyes (#3020) 2024-06-24 11:56:18 +02:00
Halvor Haugan 4d0f8067b7 Adjust examples of Chips 2024-06-24 10:00:34 +02:00
Halvor Haugan 4afe90122b Add Chromatic modes on some templates (#3023) 2024-06-24 09:23:49 +02:00
Halvor HauganandKen 350dfd3477 Adjust buttons in form summary page template (#2999)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-06-20 14:00:18 +02:00
Ken 9a74fecbfb fire: Removed old testing-templates (#3011) 2024-06-20 13:57:33 +02:00
Ken 7ec73f2008 [ToggleGroup] Selecting already selected value avoids sending extra onChange (#3012)
* feat: Selecting already selected value avoids sending extra onChange-event

* Update @navikt/core/react/src/toggle-group/ToggleGroup.stories.tsx
2024-06-20 13:55:34 +02:00
Halvor Haugan 952655ed63 Refactor templates (#3017) 2024-06-20 13:51:15 +02:00
Halvor Haugan 6af8cc526f Adjust examples of Chips (#3016) 2024-06-20 13:49:18 +02:00
Halvor Haugan 23ea3232fa Alert: Misc. adjustments (#3007) 2024-06-20 13:43:09 +02:00
b38789b98d Implement BasePrimitive for Box, Stack and HGrid (#3003)
* feat: Implemented baseprimitive in box

* refactor: segmented box-features into classes

* feat: Implemented baseprimitive margin css

* refactor: Correctly allow box with no children when no asChild is used

* refactor: Implement BasePrimitive on Stack/HGrid, addef as-prop for hgrid

* typo: Rename constant to a more 'content' nameing convention

* bug: Fix slot-import

* 🚧 --__ac-r-m.*

* bug: Fixed nesting of className

* feat: BasePrimitive now supports auto

* memo: Changeset

* bug: Added margin auto support for marginBlock

* refactor: Redo naming of base props

* bug: Typo

* bug: Wrong css-token reference for pi and pb

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* bug: Removed static padding representation

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Renamed AsChildProps used in Primitives

* bug: Re-added fallback to padding/margin when using a subset of breakpoints for inline/block

* Update @navikt/core/react/src/layout/base/BasePrimitive.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: JSDoc

* refactor: Removed undefined as-props from docgen

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-19 11:17:08 +02:00
Halvor Haugan cb304d0bb6 Add example of horizontal radios (#3009) 2024-06-19 09:33:14 +02:00
github-actions[bot]andgithub-actions[bot] 1dc3e43c6f Version Packages (#2981)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-19 09:16:54 +02:00
Halvor Haugan 50afa6f535 Adjust exampels of Tag (#3006) 2024-06-14 14:08:55 +02:00
Ken 5753acd5c1 refactor: Fixed no-double-equals biome (#3002) 2024-06-14 11:02:52 +02:00
KenandHalvor Haugan ff1e8b1140 refactor: Fixed no misleading character class biome (#3001)
* refactor: Fixed no misleading character class biome

* bug: Add lint ignore rule to support nextjs

* Update aksel.nav.no/website/sanity/schema/util.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-14 10:49:05 +02:00
Ken 60ad18804a feat: Added version-tag to tokens (#2998)
* feat: Added version-tag to built tokens-lib

* feat: Avoid duplicate version-tags

* refactor: Changed --aksel -> -a when adding version-tag
2024-06-13 11:27:57 +02:00
Ken dda89c8a0d bug: BasePrimitive imported 'Slot' from wrong dir 2024-06-13 10:04:43 +02:00
Ken 623fbba362 🚚 Moved Slot into separate directory (#2959)
* refactor: Moved slot to single folder

* refactor: Updated use of Slot in system

* refactor: Rename SlotElement -> SlottedElement

* refactor: Removed slottedElement

Because of typing issues when using anything other than 'div', this added more complexity than needed at this stage
2024-06-13 09:54:33 +02:00
KenandHalvor Haugan 221f7c5d61 [Primitives] BasePrimitive (#2842)
* 🎉 Boilerplate for BasePrimitive

* feat: Lagt til height og width attrb

* test: Chromatic snapshot av height & width api

* feat: Position API

* feat: Overflow

* feat: Flex

* memo: Prop-comments

* refactor: children now React.ReactElement in BasePrimtive

* bug: removed comment strangler

* Update @navikt/core/react/src/layout/base/BasePrimitive.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* memo: Updated stories

* refactor: remove use of backtick

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/layout/base/BasePrimitive.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-12 13:57:03 +02:00
Ken 82f9c30936 [Aksel.nav.no] Fixed clipping of focus-border in toc (#3000)
* bug: Fixed clipping of focus-border

* refactor: removed addition of padding-block in sidebar
2024-06-12 13:51:11 +02:00
Halvor HauganandKen e35ddd5282 [aksel.nav.no] Add possibility to import code in examples (#2970)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-06-11 12:47:00 +02:00
KenandHalvor Haugan 5b70a84674 feature: ToggleGroup icon and label-props replacing children. (#2929)
* refactor: ToggleGroup now supports label and icon-prop

* memo: changeset

* bug: Fixed render of default story

* Update @navikt/core/react/src/toggle-group/parts/ToggleItem.tsx

* Update @navikt/core/react/src/toggle-group/parts/ToggleItem.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update .changeset/tiny-lions-stare.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* doc: Added separate stories for group and item-labels in togglegroup

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-11 11:42:13 +02:00
KenandHalvor Haugan ce9da16147 update: Migrated to v9 of next-sanity (#2923)
* feat: API-routes for entering draftmode in nextjs

* feat: Grunlleggende now uses the new livequery-API

* feat: New preview for frontpage

* feat: New preview for standalone-pages

* feat: New preview for blogg

* feat: New preview for prinsipper

* feat: New preview for monster-maler

* feat: New preview for komponenter

* feat: New preview for god-praksis

* fire: Removed code from different PR

* refactor: default export syntax cleanup

* bug: Fixed colorScheme handling for studio

* bug: Added back global styling changes

* types: Better typed query-params for PagePreview

* refactor: typo with KomponentFrontpage in god-praksis

* refactor: Moved client definition out from livequeryprovider -> sanity client config

* Update aksel.nav.no/website/pages/komponenter/[...slug].tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Removed select + valid from groq in prinsipp

* refactor: __props -> previewProps for more declarative naming

* refactor: Remove use of memo

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-11 11:41:12 +02:00
Halvor Haugan bed7db15c4 Fix error message when starting Storybook (#2994) 2024-06-11 09:36:29 +02:00
Halvor Haugan feff5ff5e4 [aksel.nav.no] Convert client.server.js to ts (#2993) 2024-06-11 09:15:48 +02:00
Halvor Haugan 8a338851b4 [aksel.nav.no] Fix React warning in Snippet (#2992) 2024-06-10 09:32:33 +02:00
Halvor Haugan a7bd3894ca Split BackgroundToken into BackgroundColorToken and SurfaceColorToken (#2990) 2024-06-07 15:11:14 +02:00
Ken 1b927d6396 feat: Synced button icon size with CopyButton (#2984)
* feat: Synced button icon size with copybutton

* bug: Added min-width to button small
2024-06-07 12:23:13 +02:00
Ken 96ed611e15 List spacing (#2979)
* WIP: List spacing

* test: Added spacing-story test for list

* feat: Updated List with new spacing and Typo-elemenet

* refactor: Changed to spacing-2

* refactor: Updated nest list spacing

* bug: Reverted change in gap between icon and text

* bug: Fixed marker height

* Update .changeset/strong-bulldogs-jam.md
2024-06-07 12:00:19 +02:00
KenandHalvor Haugan a23621d0b0 refactor: Fixed noShadowRestrictedNames lint-errors (#2982)
* refactor: Fixed noShadowRestrictedNames lint-errors

* bug: Fieldset error-story broke

* Update @navikt/core/react/src/form/confirmation-panel/confirmation-panel.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/fieldset/fieldset.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/fieldset/fieldset.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/textfield/text-field.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/select/select.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: synced new story-names

* refactor: Fixed noAssignInExpressions lint-errors (#2983)

* refactor: Fixed noAssignInExpressions lint-errors

* Update @navikt/core/react/src/util/i18n/get.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: added dialog-polyfill to biome ignorelist

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-07 11:58:52 +02:00
Halvor HauganandKen 395eea108f Improved JSDOC for background and borderColor in Box and Page (#2988)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-06-07 11:32:18 +02:00
Ken 2e4351cced refactor: Removed surface-subtle from background-prop (#2987) 2024-06-07 11:27:53 +02:00
Ken f1707fe057 feat: Added prop for hidden heading to allow screen-readers to navigate to pagination (#2976)
* bug: Omit page-prop from PaginationItem and add data-attrb

* feat: Added prop for hidden heading to allow screen-readers to navigate to pagination

* refactor: Revert change of page-attrb removal since it could be breaking

* refactor: Fixed GH PR-comments

* refactor: Changed heading -> srHeading

* refactor: Modernized pagination-story

* refactor: Change to aria-labelledby, update stories
2024-06-07 11:26:21 +02:00
Ken ba76356178 Workflow update to node 20 (#2980)
* refactor: use github checkout v4

* refactor: use setup-node v4, default node 20

* workflow: Updated workflows to use node 20

* bug: removal of node-version in setup-node broke tests

* refactor: Revert removal of node-version in setup node for all workflows

* memo: Fixed typo in workflow-name
2024-06-06 09:37:21 +02:00
Ken 4c7de30732 memo: Edit broken docs-link in changelog 2024-06-05 14:39:18 +02:00
Ken 99ea2fa022 memo: Edit broken docs-link 2024-06-05 14:38:10 +02:00
Ken d5818a5e60 design: Copybutton-icon is now 20px for small og xsmall sizes (#2977)
* design: Copybutton-icon is now 20px for small og xsmall sizes

* bug: Replace aspect-ratio for min height/width with regular min-width and min-height attrb
2024-06-05 13:50:41 +02:00
KenandHalvor Haugan d0debc10ab feat: Added description-prop for fileupload item (#2975)
* feat: Added description-prop for fileupload item

* Update @navikt/core/react/src/form/file-upload/parts/item/Item.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-05 12:09:26 +02:00
KenandHalvor Haugan 5b011192f7 feat: Added option to use quotes in sanity editor (#2962)
* feat: Added option to use quotes i sanity editor

* Update aksel.nav.no/website/sanity/schema/objects/shared/riktekst.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-06-05 12:07:21 +02:00
github-actions[bot]andgithub-actions[bot] 754d151a7f Version Packages (#2972)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-05 11:32:10 +02:00
Ken 677170a767 update: Updated svgr cli to v8 (#2930) 2024-06-05 11:19:22 +02:00
Ken 2cd6b1a391 bug: Icon-package missed src-dir referenced in sourcemap (#2978) 2024-06-05 10:09:53 +02:00
Ken 5bcb870b16 bug: Etterlevelse-link in footer had wrong ingress 2024-06-04 11:29:49 +02:00
Halvor Haugan 704e4f6c77 Adjust examples of Pagination (#2973) 2024-06-04 09:57:27 +02:00
Halvor Haugan 334627061a 💄 Remove bottom margin on last item in Stepper and adjust FormProgress accordingly (#2971) 2024-06-03 14:32:05 +02:00
github-actions[bot]andgithub-actions[bot] c171a73d2f Version Packages (#2969)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-31 14:14:07 +02:00
Lars Eirik Korsgaard Hansen 1cab3698b1 Modal small (#2909) 2024-05-31 14:06:27 +02:00
Halvor Haugan b9fb86cc27 Real examples of form summary pages (#2967) 2024-05-31 12:20:46 +02:00
github-actions[bot]andgithub-actions[bot] ceaedc4505 Version Packages (#2933)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-31 08:43:12 +02:00
Vegard HaugstvedtandHalvor Haugan 394cc94db7 Fixed Combobox small sizing (#2801)
* Remove extra vertical padding and fixed height for combobox input, to make the small variant the same size as TextField and so on.

* no message

* More robust combobox styling - using tokens and proper padding instead of min-height for sizing

* More robust combobox styling using tokens

* Remove gap between options in FilteredOptions

* Update @navikt/core/css/form/combobox.css

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Combine selectors for svg sizes in combobox

Removed pointer-events: none, because I couldn't find a use-case for it. The reason vanished when we squashed commits.

* Fix visual regression, where the first option was partially overlapped by the "max selected" message

* Revert yarn lock to match main

* A general selector for combobox SVGs had an effect on chips as well, so we need a selector for each SVG we want to set size for.

* Properly align items in FilteredOptions. Fixes issue with out-of-alignment checkmarks.

* Fix incorrect class selector

* This doesn't seem to do anything

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-29 11:32:24 +02:00
Halvor Haugan af171a3ffc New template: form summary page (#2958) 2024-05-29 09:23:13 +02:00
Halvor Haugan 868170ef38 List: Adjusted examples and JSDOC (#2961) 2024-05-28 14:32:24 +02:00
Ken 01d2ee85d0 move: Moved dismissablelayer into overlays dir from overlay dir (#2960) 2024-05-28 14:14:53 +02:00
KenandHalvor Haugan 50d594787c Disallow use of implicit any type on variable declarations. (#2943)
* feat: Added biome again

* bug: Fixes Disallow use of implicit any type on variable declarations.

* refactor: Import as type

* refactor: Reverted change to typed for-loops in dialog-polyfill

* refactor: Reverted change to typed for-loops in dialog-polyfill

* Update @navikt/core/react/src/modal/dialog-polyfill.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: biome-ignored inline-typing for-loop

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-27 14:05:07 +02:00
Ken 8d0f7ae4b5 Use Array.isArray() instead of instanceof Array. (#2942)
* feat: Added biome again

* bug: Fixes Use Array.isArray() instead of instanceof Array.
2024-05-27 13:58:52 +02:00
Ken f23fd9aa83 Removed useless if/else (#2939)
* feat: Added biome again

* feat: Fixed noUselessElse

* feat: Added original eslint-rule
2024-05-27 13:54:39 +02:00
Ken 1a18bbedbb [Sanity] Fixed view for "Mine utkast" and creation of new undertema (#2957)
* bug: Mine utkast did not correctly handle letter casing for email

* bug: Declaring schemaType after initialTemplates removes initialTemplates
2024-05-27 13:29:28 +02:00
Halvor Haugan b7ddb9e557 [aksel.nav.no] Add ShowMore to ExampletextBlock (#2950) 2024-05-27 11:32:54 +02:00
Ken 1f3df8ad93 feat: New icons for geometric shapes (#2927) 2024-05-27 11:16:49 +02:00
Halvor Haugan 7c339c6dc6 🐛 Modal: Fix issue where polyfill-classname was not applied when using SSR (Next.js) (#2954) 2024-05-27 11:15:11 +02:00
Ken 61de6853e3 ⚡ Performance improvements when using spread in reduce (#2937)
* refactor: Fixed type-errors

* refactor: Optimized omit

* refactor: Optimize search-grouping on website

* refactor: Optimize option grouping in combobox

* refactor: Optimize reduce-functions in systems
2024-05-27 11:14:29 +02:00
Ken f05615d373 Use Number.isNaN instead of global isNaN. (#2941)
* feat: Added biome again

* bug: Fixes isNaN is unsafe. It attempts a type coercion. Use Number.isNaN instead.
2024-05-27 09:52:02 +02:00
Ken 34cdf015ff [Website] List-component in place of custom ul>li (#2928)
* feat: Uses List-component internally in website

* fire: Removed old CSS for list-styling

* fire: Undid change to example made under testing
2024-05-27 08:56:20 +02:00
Halvor Haugan f48178de22 Adjust docs for Chat and some primitives (#2948) 2024-05-24 11:12:51 +02:00
Halvor Haugan fcfbad9b90 Use <Link> instead of <a> in Accordion examples (#2952) 2024-05-24 11:07:45 +02:00
Ken dfef7f5c76 Use Number.isFinite instead of global isFinite. (#2940)
* feat: Added biome again

* bug: Fixed isFinite is unsafe. It attempts a type coercion. Use Number.isFinite instead
2024-05-23 09:43:19 +02:00
Vegard Haugstvedt 5a60ac9ae1 Form intropage adjustments (#2949)
* Remove sandbox from intropage templates. It doesn't work, because of the URI length.

* Remove form id from the concrete examples

* Rename default template from "Introside" to "Standard"

* VStack is no longer necessary when we remove the form id

* Merged the real examples into one folder, so they can be added as one block (using chips) instead of after each other
2024-05-22 16:09:43 +02:00
Halvor Haugan 2e233e6a3f ♻️ Refactor form intro template (#2946) 2024-05-22 15:48:43 +02:00
Halvor Haugan c2d010e81d Include templates in ds storybook (#2947) 2024-05-22 15:34:13 +02:00
Ken 70dc5f18d1 refactor: Optimized omit (#2936) 2024-05-22 14:57:32 +02:00
Ken 0b79be7db1 refactor: Updated 30% of examples to primitives (#2932) 2024-05-22 14:35:23 +02:00
62dd6a321c Feature/template intropage (#2876)
* Init intropage. Just with header and guidepanel in first commit. The rest will follow.

Needs to move icon in header outside main column.

* Add "what can i apply to here" content, as well as prepare the page for more of these sections.

* Add "this is how you apply"-section

* Add confirmation checkbox and "start application" button

* Add "extra information" accordion

* Add language selector and switch to simple decorator

* Correct icon and placement for "start application" button

* Proper pictogram in FormHeader and bleed outside of the main column.

* Make Intropage header responsive, moving pictogram to the right on mobile/on the left on desktop

* Add IntroPage story to regular Storybook, so it is exposed through Chromatic

* Temporarily add ApplicationPictogram in same folder as template to make it available for demo tomorrow. Needs to find another place.

* Simplify/extract code for decorator

* updated texts according to Figma

* Center align title and form id with pictogram, to better support not showing the ID

* Update intro page standard template

* Update Stack direction type to support reverse order

* Add examples for alert and alternative applications. Need to clean up some TS-error later.

* Update Aksel examples for intropage

* Rename folder for intropage examples

* Use BodyLong instead of BodyShort

* Add specific examples for intropage

* Style fixes: add gutters to content (like header) and make sure a longer title does not take space from pictogram

* Update aksel.nav.no/website/pages/templates/soknad-introside/intro-med-alternativ-soknad.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Hide pictogram on the smallest screens, and keep it on the right side up until "lg"  screens (compared to "md" before)

* Correct heading level

* All the content should be inside main

* Replace <Box> without any props with regular div's

* Replace "flex: 1" from heading-stack in every layout with flexShrink: 0 on only the pictogram

* Hide SVG's from screen readers

* Missing <Show>-element

* Keep pictogram on the right until the screen is at least of size "lg"

* Change the data-aksel-template attribute to allow proper tracking of intropage template use

* Changed texts after feedback from Sjur

* Legg til meta.json for changelog i form-introside-mappen

* Use standard padding between content and footer, but increase it to spacing-16 (4 rem) to reflect Figma and the documentation

* Remove template from Chromatic. May add templates to Chromatic-build later, but that should be done by watching templates on Aksel-webpage.

* Remove unused util for decorator

* Inline decorator-kode in all form intropage templates. Otherwise, they won't be included in the example code.

* Inline application pictogram in form intropage templates, so it can be copied. Maybe we should extract the form header as a component in Aksel?

* Remove spacing from BodyLong inside of Accordion

* Update aksel.nav.no/website/pages/templates/soknad-introside/intro-med-alternativ-soknad.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Removed duplicate word

* Added changeset for ds-react and ds-css changes

* Update aksel.nav.no/website/pages/templates/soknad-introside-alderspensjon/soknad-introside-alderspensjon.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Fix alignment and placement in form header

* Move template tracking id further into the code, so it is not excluded by accident

* Title and other props are unnecessary on ApplicationPictogram, since it has aria-hidden set

* Remove title from single examples (only in folder), since it is not used, and use 0-index on all form intropage examples

* Align pictogram to the top of the title

* Reduce gap between sections from 3rem to 2rem

* Align pictogram to the top of the title for the rest of the templates

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-21 16:02:13 +02:00
Ken 88c26d2c70 bug: Fixed All exports are only types and should thus use export type 2024-05-16 18:29:50 +02:00
Ken 201fd75c0c bug: Fixed void is not valid as a constituent in a union type 2024-05-16 18:28:09 +02:00
Ken cbc512832c bug: ExampletextBlock used wrong bg-color 2024-05-16 12:54:13 +02:00
Ken 9d815adab2 bug: ExampletextBlock had no background on God-praksis pages 2024-05-16 12:40:41 +02:00
Ken 1800b2b34d feat: GodPraksis can now use ExampletextBlock on all articles 2024-05-16 09:37:47 +02:00
Ken 93623ce355 bug: DismissableLayer broke when disabling disableOutsidePointerEvents (#2925)
* bug: DismissableLayer broke when disabling outsidePointerEvents

* refactor: removed old code

* bug: New useEffect implementation ignored enabled-flag

* feat: Removed unsafe_index prop used in stepper and replaced it with context

* memo: Added changeset

* Revert "memo: Added changeset"

This reverts commit 03d7dc6bb8.

* Revert "feat: Removed unsafe_index prop used in stepper and replaced it with context"

This reverts commit 14c316f4a3.

* bug: Pointer-state were not corretly updated

* test: Demo setup in storybook

* bug: Fixed body-styles handling and pointerEvents on element

* refactor: Simplified expression for pointerEvents

* refactor: Removed extra state for pointer-state
2024-05-15 17:35:44 +02:00
Ken aed321728f feat: Removed unsafe_index prop used in stepper.step (#2926)
* feat: Removed unsafe_index prop used in stepper and replaced it with context

* memo: Better errormessaging

* refactor: Resolves PR-comments
2024-05-15 16:31:13 +02:00
Ken 8003fd2222 bug: templatesKategorier used wrong value for soknadsdialog 2024-05-15 15:40:31 +02:00
Ken 32c8bab6f9 update: Updated categories for new template-structure (#2931) 2024-05-15 15:30:18 +02:00
KenandHalvor Haugan 7527cbe07f sanity: removed scheduling (#2924)
* feat: Removed scheduled publishing from sanity, fixed type-errors

* bug: Wrong type for devOnly callback

* bug: removed sideeffect added when developing

* Update aksel.nav.no/website/sanity/schema/custom-components/InputWithCounter.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-15 11:33:32 +02:00
Ken 57a6a18dbe feat: API-routes for entering draftmode in nextjs (#2922) 2024-05-15 09:37:13 +02:00
github-actions[bot]andgithub-actions[bot] 7b691b6cd0 Version Packages (#2916)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-14 15:29:55 +02:00
Ken 1b048ba5c3 refactor: removed unsplash plugin from sanity media input (#2921) 2024-05-14 11:31:45 +02:00
Ken e92c897c01 update: New sanity versions (#2918)
* update: New sanity versions

* update: Bump canary-release of devDeps for nextjs

* sync: yarn lock
2024-05-14 10:15:52 +02:00
Halvor Haugan a1041d13cd Stepper.Step: Set aria-current to "step" instead of true (#2920) 2024-05-14 10:14:35 +02:00
Ken 241dd79ecb Block to show template/standard-texts on template-pages (#2913)
* feat: Standard highlighting komponent

* feat: Immplementert StandardHighlight i CMS

* refactor: Rename StandardHighlight -> ExampletextBlock

* memo: Riktigere initialValue
2024-05-14 09:40:59 +02:00
Halvor Haugan 6aaf56bc10 Adjust examples FormProgress 2024-05-13 15:54:23 +02:00
Ken 7becf3e4cf Simplified HGrid CSS-nesting (#2917)
* test: Setup testing env for HGrid bug

* refactor: Forenklet HGrid-css

* memo: Changeset
2024-05-13 14:39:41 +02:00
Ken a358d222b5 refactor: Removed extra w-fit left after refactor 2024-05-13 13:53:13 +02:00
Ken 24d4d48c87 Link to GH-discussions from template-pages (#2914)
* feat: New gh-discussions field for template-articles

* feat: Link to gh-discussions on template-pages

* refactor: removed extra display grid in wrapper

* feat: Added story for GHPages suggeestionBlock
2024-05-13 12:27:49 +02:00
Ken 2d0c2c6567 deps: Updated Nextjs and logging depdendencies (#2915) 2024-05-13 11:36:32 +02:00
Halvor Haugan bd482c5d3e Ny komponent FormProgress (#2855) 2024-05-13 10:30:28 +02:00
github-actions[bot]andgithub-actions[bot] c8c3fc4ec5 Version Packages (#2896)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-10 14:37:43 +02:00
Andreas Nordahl 834ba0cbae Decouple read-more icon hover offset and rotation style (#2912) 2024-05-10 13:53:03 +02:00
KenandHalvor Haugan be653cc67a [Aksel.nav.no] Mindre justeringer på Søk (#2899)
* refactor: Fjernet tags fra søk

* design: Oppdatert padding for søk og la tilbake border på focus

* refactor: Fjernet lenketags fra komponent-artikler

* design: Oppdatert fokusmarkering og hover for search-hit

* bug: Mobiltilpasset søk-headings

* bug: e2e-tester fant ikke søkefelt

* bug: Seksjoner i søk har nå riktig heading-level h2

* Update aksel.nav.no/website/components/website-modules/search/parts/Hit.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Quotes i søk får samme farge

* Update aksel.nav.no/website/components/website-modules/search/parts/Results.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* refactor: Unødvendig filtrering basert på dokumenttype er fjernet

* bug: Bruker section-element for gruppering av søkeresultater

* refactor: Unødvendig filtrering basert på dokumenttype er fjernet

* bug: Border forsvant ved pointerdown

* refactor: Hides image-frame from serch-hit

* Revert "refactor: Hides image-frame from serch-hit"

This reverts commit 764c82ebdb.

* refactor: Truncate title

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-08 10:08:57 +02:00
Halvor Haugan 054835d1dd 🆙 Oppgradert deps (#2908) 2024-05-08 09:53:14 +02:00
Ken 7f99d407c0 Combobox refactor: Flyttet Input controls ut i egen komponent (#2900)
* refactor: Flyttet Input controls ut i egen komponent

* refactor: Inlinet clearbutton implementasjon, fikset typer

* 🚚 Flyttet ToggleListButton til input-mappe

* Combobox refactor: Bruker intern `createContext` for context-creation i Combobox (#2902)

* refactor: Bruker egen creactContext for selectedOptionsContext

* refactor: Bruker egen creactContext for filteredOptionsContext

* refactor: Bruker egen creactContext for InputContext

* refactor: Bruker egen creactContext for selectedOptionsContext

* refactor: Rename InputContext hook

* 🚚 Flyttet testfiler inn i egen mappe (#2905)
2024-05-08 09:05:02 +02:00
Ken 1202e0a6f7 bug: InitialValues for god-praksis struktur i admin ga ikke riktige tilganger 2024-05-07 18:22:56 +02:00
0c06fa12d0 Progressbar tweaks (etter docs-møtet) (#2892)
Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-07 14:36:11 +02:00
Lars Eirik Korsgaard Hansen 4797ccae9d Combobox: Remove 'Ingen søketreff' when custom options allowed (#2895) 2024-05-07 11:41:01 +02:00
Ken ac06d882a7 refactor: Forenklet mergeRefs i floating-util 2024-05-07 09:57:20 +02:00
Ken 8f5c956bad Floating utility (#2872)
* ✨ Initial Popper wrapper

* ✨ Floating popper element

* 🏷️ Rename popper -> floating

* 🐛 Fikset imports

* ♻️ FLoating-fil splittet opp i moduler

* 🎨 Satt opp exports og story

* 🎨 Arrow er nå del av content

* 🐛 display block på arrow

* 🎉 Egen Portal-komponent

* 🎨 Portal og Overlay exportert i root

* ♻️ Tooltip bruker egen Portal

* 📝 Changeset

* 🔀 Merge Portal

* 📝 Story with portal

* 📝 Props story

* 🚚 Temp rename

* 🚚 Temp rename

* 🎨 La til Slot på Floating.Anchor

* ✨ Fungerende nesting av dismissable items

* ✨ Fungerende outsidepointerclick handler

* 🚚 Ryddet opp i struktur

* ✨ bedre event-handling

* 🎉 Popover bruker dismissableLayer

* 🔥 Fjernet console.logs

* ♻️ Extender nå ikke htmldivelement

* 📝 Commented on dimsissablelayer

* 📝 Kommentarer

* 🎨 Disable pointer-events on body

* 🎨 Setup content

* 🎨 Fungerende popover med story

* 🎨 useDescendant-API kan bruke uten context-error på nesting

* 🐛 Fikset tilfeller der oppdatering av descendant-options ikke ble reflektert i descendants-map

* 🐛 Satte enabled til optional

* bug: import av Portal brakk stories for Popover og Floating

* bug: DescenadantContext er nå riktig typet som undefined

* label: scopet navn for bruk av descendant-provider i dismissablelayer

* memo: Bedre kommentarer

* feat: Sender ikke callbacks hvis layer er disabled

* memo: Formatering og kommentarer

* memo: Kommentarer

* feat: Støtter forwardRef

* merge: Merge branch with main

* 🔥 Fjernet ny popover implementasjon

* 🔥 Fjernet mergeconflict fra main i tabs

* 🔥 Fjernet mergeconflict fra main i tabs

* refactor: Cleaniup codestructure

* refactor: Fjernet unødvendige props

* refactor: Synket dependencies og changeset
2024-05-07 09:56:06 +02:00
Ken 6b40a0ddd8 refactor: Oppdatert stories til chromatic format
refactor: Oppdatert HGrid stories til chromatic format

refactor: Oppdatert InternalHeader stories til chromatic format

refactor: Oppdatert skeleton stories til chromatic format

refactor: Oppdatert box stories til chromatic format

refactor: Oppdatert loader stories til chromatic format

refactor: Oppdatert list stories til chromatic format

refactor: Oppdatert tag stories til chromatic format
2024-05-06 16:28:12 +02:00
Halvor Haugan 60a6cba329 Justering av stories på Chat (#2903) 2024-05-06 14:24:23 +02:00
Ken 7fd62f3b79 logging: Fjernet logging av query i søk (#2897) 2024-05-06 11:50:02 +02:00
Ken 0944bbc256 DismissableLayer-API (#2814)
* ✨ Fungerende nesting av dismissable items

* ✨ Fungerende outsidepointerclick handler

* 🚚 Ryddet opp i struktur

* ✨ bedre event-handling

* 🎉 Popover bruker dismissableLayer

* 🔥 Fjernet console.logs

* ♻️ Extender nå ikke htmldivelement

* 📝 Commented on dimsissablelayer

* 📝 Kommentarer

* 🎨 Disable pointer-events on body

* 🎨 useDescendant-API kan bruke uten context-error på nesting

* 🐛 Fikset tilfeller der oppdatering av descendant-options ikke ble reflektert i descendants-map

* 🐛 Satte enabled til optional

* bug: DescenadantContext er nå riktig typet som undefined

* label: scopet navn for bruk av descendant-provider i dismissablelayer

* memo: Bedre kommentarer

* feat: Sender ikke callbacks hvis layer er disabled

* memo: Formatering og kommentarer

* memo: Kommentarer

* feat: Støtter forwardRef

* ♻️ Ryddet i DismissableLayer filer

* ♻️ Fikset edgecase der 'disabled'-noder kunne stoppe pointer-events

* refactor: Cleanup PR før release

* bug: useDismissableDescendantsContext ikke required
2024-05-04 15:15:15 +02:00
Ken 16087a458a refactor: DescendantContext er nå scopet (#2890)
* refactor: DescendantContext er nå scopet

* ♻️ Fjernet unødvendig wrapping
2024-05-04 13:34:34 +02:00
KenandHalvor Haugan c47c372d0f [Datepicker|MonthPicker] Flippet visning av år. (#2882)
* feat: DropdownCaption viser år i motsatt rekkefølge for select

* feat: Year-select for MonthPicker er viser nyeste år først

* memo: Changeset

* Update .changeset/thick-poems-design.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-05-04 13:33:59 +02:00
Ken 0c479831df bug: Nettsidebygg feilet ved bruk av fjernet prop 2024-05-02 13:27:50 +02:00
github-actions[bot]andgithub-actions[bot] 41e9fbd2a5 Version Packages (#2878)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-02 12:35:49 +02:00
Ken 7b25f30e60 🏷️ Fjernet referanse til duration i Progressbar for pre-release 2024-05-02 12:32:31 +02:00
Ken db9c858153 refactor: Radio og Checkbox bruker :focus for bedre synlighet når de blir lenket til fra ErrorSummary (#2893) 2024-05-02 12:18:49 +02:00
Julian Nymark b21015bf54 💄 fix for broken pin style (#2889)
* 💄 fix for broken pin style

As content (Rows) grows, the pin would get pushed down (and under) the content.

* changeset

* 💄 make css for timeline pin even more compact
2024-04-29 19:13:57 +02:00
Lars Eirik Korsgaard Hansen bac48d9057 Progressbar aria hidden (#2888) 2024-04-29 14:47:29 +02:00
Lars Eirik Korsgaard Hansen e1a85dfbeb Progressbar demo-fixes (#2887) 2024-04-29 12:40:09 +02:00
Lars Eirik Korsgaard Hansen 3f65eee9e9 Progressbar demos (#2885) 2024-04-29 10:53:02 +02:00
Halvor Haugan cd77198f1c [aksel.nav.no] Fiks anker i søketreff-lenker (#2884) 2024-04-29 09:02:58 +02:00
Halvor Haugan 82827ec712 Justering av eksempler på Label, Detail og ErrorMessage (#2883) 2024-04-29 09:02:34 +02:00
Ken 710ed83661 [Aksel.nav.no] Ny Meny for sidebar og TOC (#2873)
* 🎉 WIP for ny sidebar og TOC meny

* 💫 Animert farger

* 🎨 Støtte for nested menuitems

* 🎨 Støtter nå sidebar og toc-variant for farger

* ♻️ Migrert TOC til å bruke ny meny

* ♻️ Migrert Sidebar til å bruke ny meny

* 🐛 Fikset story

* ♿ Klikkhøyde nå minst 32px

* 💄 Justert bakgrunnsanimasjon fra 200ms -> 100ms

* Types: variant bruker semantiske navn

* bug: MenuLink ble brukt utenfor MenuLi
2024-04-26 07:58:47 +02:00
Ken 3b44a97725 design: Fallback/Alle tema piktogram er nå Aksel-logo (#2877) 2024-04-25 11:55:46 +02:00
Ken edcbd6e198 bug: Error-handling for oppretting av nye brukerprofiler i sanity (#2881) 2024-04-25 11:54:08 +02:00
Halvor Haugan bd3f9355eb storybook:aksel viser og sorterer nå på index på kodeeksempler (#2880) 2024-04-25 10:49:04 +02:00
Halvor Haugan f11bce1f8c Oppdater JSDOC og eksempler på Heading, BodyLong og BodyShort (#2879) 2024-04-25 10:16:00 +02:00
Lars Eirik Korsgaard HansenandHalvor Haugan 277525f39f ✨ Ny komponent: ProgressBar (#2845)
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-24 14:18:55 +02:00
Ken 210496c2cc bug: Validering av SEO-felt i sanity brakk ved undefined asset 2024-04-24 08:03:27 +02:00
github-actions[bot]andgithub-actions[bot] 8f317878fc Version Packages (#2875)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-22 15:48:59 +02:00
KenandHalvor Haugan c3064a01f7 🎨 Spacer er nå span (tidligere div) (#2874)
* 🎨 Spacer er nå span (tidligere div)

* 📝 Changeset

* Update .changeset/thick-humans-smile.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-22 15:32:57 +02:00
Ken 02f0a911b0 🔥 Fjernet gammel kode for god praksis og sanity (#2866)
* 🔥 Fjernet filtrering av aksel_tema

* 🔥 Fjernet gamle migreringer

* ⚰️ Fjernet aksel_tema og gammelt feedback-dokument

* ⚰️ Fjernet gammelt god praksis card

* ♻️ Gjenbruker nytt gp-card for relaterte artikler

* ♻️ Fjernet gamle typer

* 🔥 Fjernet referanser til gammelt feedback-dokument
2024-04-22 15:12:56 +02:00
Ken ee8524229f 🎨 Temakontakter får slack-melding gjennom tilbakemeldinger (#2869) 2024-04-19 13:36:16 +02:00
Ken d9932e203a [Sanity] Temakontakter visning (#2868)
* 🎨 Lagt til Temakontakter-felt i for gp.tema

* 🔥 Fjernet requirement for temakontakter

* 🎨 Visning for temakontakter
2024-04-19 12:58:14 +02:00
KenandHalvor Haugan b14fc23ecb [react] Collapsible component utility (#2859)
* ✨ Boilerplate for collapsible-component

* 🎨 Collapsible wrapper interface

* 🎨 Collapsible trigger interface

* 🎨 Collapsible content interface

* 🧪 Stories

* ♻️ Satt opp storybook for chromatic

* 📝 Satt opp exports

* 🧪 Open/defaultOpen tester for chromatic

* 📝 Kommentert props

* ♻️ Definerer data-state verdi på root

* 📝 JSDOC

* 📝 Disabled-demo

* ♻️ aria-controls blir bare satt når open

* ♿ Content controls button

* Update @navikt/core/react/src/collapsible/Collapsible.types.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ props -> rest

* ♻️ props -> rest

* ♻️ Omit unreachable props

* 📝 _id rename

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-19 12:27:55 +02:00
Ken c16f75d6f8 [Sanity] Temakontakter (#2867)
* 🎨 Lagt til Temakontakter-felt i for gp.tema

* 🔥 Fjernet requirement for temakontakter
2024-04-19 08:42:22 +02:00
Halvor Haugan a01be91608 Rekkefølge på eksempler på FormSummary 2024-04-18 13:05:21 +02:00
github-actions[bot]andgithub-actions[bot] 8826a79021 Version Packages (#2850)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-18 11:59:36 +02:00
Vegard HaugstvedtandKen c2f3da84cc Bugfix/prevent submit on enter in combobox (#2861)
* Prevent "Enter" key in Combobox to...

* Added test for Enter not submitting form

* Added changeset

* Add test for un-selecting a selected option using "enter" on a Chip not submitting the form

* Do not prevent enter from submitting form if it should not perform another action (like selecting an option)

* Do not submit when the input field has a value

* Replace lots of sleep-calls with awaiting userEvents

* Create util function for looking up an option

* Fix bug where we couldn't un-select a custom option using "enter"

* Update test to account for the dropdown list closing when focus moves to the chips in the previous step

* Add possibility to slow down tests for debugging

* Fix issue with onFocus -> onToggleSelected(false), where clicking the open/close button didn't work

* Fix test

* Closing the FilteredOptionsList when focusing a Chip caused too many side effects, but we need to remove virtual focus at least. That way we won't double-click on enter.

* When no longer closing FilteredOptions on focusing a chip, we don't need to click the toggleIsOpen button to check that the option is un-selected

* Update .changeset/rotten-windows-cover.md

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-04-18 10:00:16 +02:00
Ken 2c1476022d 🐛 Descendant-provider feilet ved bruk av cloneElement (#2832)
* 🐛 Når Descendant-provider ble brukt med react cloneElement feilet child-re-render

* ⚡ Synker options for allerede registrert node

* ⚡ Unngår flere map-lookups for samme funksjon
2024-04-18 09:55:34 +02:00
Halvor Haugan dacf648c47 FormSummary: Link til dokumentasjonen i JSDOC (#2865) 2024-04-18 09:06:29 +02:00
Ken 5ec986771b [God praksis] Nye sider erstatter gamle (#2858)
* 🚚 Byttet ut gamle god-praksis sider med nye

* ♻️ Sitemap bruker ny gp-struktur

* ♻️ Lister med tema tittler bruker nå nye tema

* ♻️ Flyttet gammel godpraksiscardsimple

* ⚰️ Markert gamle tema-felt i sanity som deprecated

* ♻️ Bedre håndtering av editor/profil visning

* ♻️ Velger nå ikke en default tab for sanity visning

* 🔒 ErrorBoundary på alle gp-cards

* 🧪 Storybook for frontpage-cards

* 🐛 Dialog var ikke riktig lablet

* 🐛 Chips-liste wrappet ikke button i li, cube-illustrasjon var ikke gjemt for skjermleser

* 🎉 Viser publiserings og oppdateringsdatoer i toppen av artikkel

* 📝 Bidragsytere -> Medvirkende

* 🐛 Playwright testet gamle god praksis sider

* 🐛 Preview brakk på forside og god-praksis

* 💄 HeroCards har større illustrasjon

* ♻️ Forenklet size på herocard

* ♻️ Innhold i herocard er alltid sentrert

* 🔍 Artikler har nå riktig fallback OG-image

* Update aksel.nav.no/website/e2e/test-urls.json

* 🏷️ bruker SanityImageSource for piktogram

* 🏷️ Tagget title i staticprops som deprecated

* 🔥 Fjernet testkode

* Update aksel.nav.no/website/sanity/plugins/structure/god-praksis.ts

* 📝 Skrivefeil i structure

* 💄 Oppdatert gap mellom tagger i cards
2024-04-18 07:28:08 +02:00
ca6af8a5f7 index & process templates -> stories (#2856)
* index & process templates -> stories

* ✨ add duplication of templates to component storybook

* 🎨 fix story

* ♻️ refactor indexers for storybook

* ♻️ layout fullscreen for templates

* 🔥 Fjernet meta.json filer

* ♻️ Trukket dekorator-kode ut av alle templates

* 🐛 Fjerner storybook stories fra npm output

* 🔥 Fjernet templates fra core/react

* 🔥 Fjernet console.log

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-04-17 13:46:58 +02:00
Ken 9410840f74 🐛 Fikset lenke i sanity (#2863) 2024-04-17 13:22:42 +02:00
Ken d88884f785 🔥 Fjernet content-container.css og grid.css fra _mappings (#2860)
* 🔥 Fjernet content-container og grid css fra _mappings

* Update .changeset/wet-books-end.md
2024-04-17 09:46:27 +02:00
Ken 0c8239ee00 🐛 EditorPreview knapp Sanity admin 2024-04-16 12:48:06 +02:00
Halvor Haugan 987118fd47 FormSummary.Heading: Fjern overridable, level oblig. og css-justeringer på <sm (#2857) 2024-04-16 10:34:27 +02:00
8d13f11689 Summary component (docs tweaks) (#2853)
* 🚧 wip on Summary

* ✨ new HR component

* 👔 fancy utility function to inject components into children

This is to be used in 2 places where we iterate over children and add <hr /> components between them all.

It also wraps the children in a <Box>, which is used here and not really reflected in the name of the function 🤔

* 🎨 improved version of Summary component

* Remove (some) magic

* Fix children type in injectHRBetween

* css

* header gap and bg

* responsive story + example with long texts

* 🚚 Summary -> FormSummary

* 🎨 update stories

* 🎨 update story + tweak CSS for EditButton

* 📝 add JSDoc

* export FormSummary in core/react/src/index.ts

* FormSummaryValue bruker BodyLong

* 📝 update JSDoc

* 📝 add demo

* 📝 update README.md for eksempler

* forwardRef på Answers

* forwardRef på Header

* forwardRef på Label og Value

* forwardRef på Heading og Edit

* Answer export

* spread props

* 🔥 remove HR component

* 📝 update JSDoc

* 🎨 export more FormSummary

* 🔥 duplicate dependency of _mapping (same as main)

* 📝 update JSDoc for FormSummary

* changeset

* 🔖 changeset

* 🔥 duplicate changeset

* Rename EditButton -> Edit

* oops

* Link er vel valgfritt

* 🐛 add correct CSS dependency for FormSummary

* 💄 FormSummary

* 💄 FormSummary

* className navds-form-summary

* className navds-form-summary__answers

* className navds-form-summary__header

* Update @navikt/core/css/form/form-summary.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form-summary/FormSummaryLabel.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form-summary/FormSummaryValue.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Header wrapper på små skjermer

* Rekkefølgen på selectors samme som DOM

* 🎨 structure consistency (ref, then ...rest, then className, then other things)

- also convert a props -> {not_the_rest, ...rest}

* update mappings

* Flytt border slik at du kan ha flere dd etter hverandre

* 🎨 update stories

* 🎨 update stories (more empty values)

* 🚚 story ComplexData -> RealisticUsage

* Mindre padding på små skjermer

* 🎨 update stories

* Answer forwardRef

* 🎨 update stories

* Eksempel på linjeskift i value i story

* 🎨 update story

* 🎨 update story

* 🚚 FormSummary -> Form/FormSummary

* 🎨 update Demo and story

* 🏷️ make href required for FormSummaryEdit

* 🏷️ + 🚧 typing woes

* 💄 tweak CSS to make it look just right

* 🏷️ correct typing using Exclude > Omit

* 🎨 use div over section without label

* 💄 FormSummary, last-child padding removal

* Fjernet kommentar

* typo i readme

* 🚚 FormSummary.Edit -> FormSummary.EditLink

* 🏷️ make href for EditLink optional

* 🚚 rename FormSummaryEdit -> FormSummaryEditLink

* FormSummaryEdit -> FormSummaryEditLink

* ✨ add example to FormSummary

* 🎨 update examples

* 🎨 update examples

* 💄 FormSummary

* 🎨 types + jsdoc tweaks (FormSummary)

* 🔥 remove aria-label example

* 🎨 separate example for grouped data

* 🎨 update desc for example

* 🔥 unused example code

* 🚚 rename examples

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-04-15 13:54:08 +02:00
Ken 158e18454e 🚚 gp-sider lenker nå til god-praksis (#2852) 2024-04-15 13:53:40 +02:00
Ken be26bf22c9 🔥 Fjernet redirect (#2851) 2024-04-15 13:35:36 +02:00
Ken c2968a0e6d 🎨 Artikler med contributors får automatisk editor (#2849)
* 🎨 Artikler med contributors får automatisk editor lagt til ved creation

* 🔒 Lager bare profil automatisk for SSO-inlogging
2024-04-15 11:16:27 +02:00
KenandHalvor Haugan 3f92773273 [Sanity] Oppdatert deskStructure (#2844)
* 🚚 Flyttet bloggvisning til egen fil

* 🚚 Flyttet grunnleggende visning

* 🎨 Sorterer 'trenger oppdatering' etter eldst først

* 🎨 Sorterer 'trenger oppdatering' etter eldst først i god-praksis

* 🚚 Flyttet komponenter visning

* 🚚 Flyttet admin visning

* 💄 Endret ikon for utdaterte artikler. Dynamisk treshold for utdatert

* 📝 Skrivefeil

* 🐛 Skrivehjelp-tittel hadde for lav kontrast på darkmode i sanity

* 🔥 Fjernet unødvendig currenUser check

* ♻️ Fikset PR-kommentarer

* Update aksel.nav.no/website/sanity/plugins/structure/structure.util.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Sjekker mail for lowercase

* 🐛 email kan være undefined

* Update aksel.nav.no/website/sanity/plugins/structure/structure.util.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Bruker innebygd showIcon-funksjon

* 📝 Bedre gruppenavn for seksjoner i sanity

* 💄 Ikoner på landigssider

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-15 11:15:17 +02:00
Ken 0c3ab1d0e7 [Sanity] Oppdatert utdatertvarsel (#2846)
* 🎨 innholdstype og undertema er nå required

* ♻️ Bruker eget panel for utdatert-warning i sanity

* ⚡ Bruker sanity useCurrentUser for å vise tilganger til bruker på profilside

* Update aksel.nav.no/website/sanity/schema/custom-components/EditorPage.tsx

* 🔥 Fjernet rest-spread
2024-04-15 11:12:32 +02:00
3a73a029f6 ✨ new FormSummary component (#2802)
* 🚧 wip on Summary

* ✨ new HR component

* 👔 fancy utility function to inject components into children

This is to be used in 2 places where we iterate over children and add <hr /> components between them all.

It also wraps the children in a <Box>, which is used here and not really reflected in the name of the function 🤔

* 🎨 improved version of Summary component

* Remove (some) magic

* Fix children type in injectHRBetween

* css

* header gap and bg

* responsive story + example with long texts

* 🚚 Summary -> FormSummary

* 🎨 update stories

* 🎨 update story + tweak CSS for EditButton

* 📝 add JSDoc

* export FormSummary in core/react/src/index.ts

* FormSummaryValue bruker BodyLong

* 📝 update JSDoc

* 📝 add demo

* 📝 update README.md for eksempler

* forwardRef på Answers

* forwardRef på Header

* forwardRef på Label og Value

* forwardRef på Heading og Edit

* Answer export

* spread props

* 🔥 remove HR component

* 📝 update JSDoc

* 🎨 export more FormSummary

* 🔥 duplicate dependency of _mapping (same as main)

* 📝 update JSDoc for FormSummary

* changeset

* 🔖 changeset

* 🔥 duplicate changeset

* Rename EditButton -> Edit

* oops

* Link er vel valgfritt

* 🐛 add correct CSS dependency for FormSummary

* 💄 FormSummary

* 💄 FormSummary

* className navds-form-summary

* className navds-form-summary__answers

* className navds-form-summary__header

* Update @navikt/core/css/form/form-summary.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form-summary/FormSummaryLabel.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form-summary/FormSummaryValue.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Header wrapper på små skjermer

* Rekkefølgen på selectors samme som DOM

* 🎨 structure consistency (ref, then ...rest, then className, then other things)

- also convert a props -> {not_the_rest, ...rest}

* update mappings

* Flytt border slik at du kan ha flere dd etter hverandre

* 🎨 update stories

* 🎨 update stories (more empty values)

* 🚚 story ComplexData -> RealisticUsage

* Mindre padding på små skjermer

* 🎨 update stories

* Answer forwardRef

* 🎨 update stories

* Eksempel på linjeskift i value i story

* 🎨 update story

* 🎨 update story

* 🚚 FormSummary -> Form/FormSummary

* 🎨 update Demo and story

* 🏷️ make href required for FormSummaryEdit

* 🏷️ + 🚧 typing woes

* 💄 tweak CSS to make it look just right

* 🏷️ correct typing using Exclude > Omit

* 🎨 use div over section without label

* 💄 FormSummary, last-child padding removal

* Fjernet kommentar

* typo i readme

* 🚚 FormSummary.Edit -> FormSummary.EditLink

* 🏷️ make href for EditLink optional

* 🚚 rename FormSummaryEdit -> FormSummaryEditLink

* FormSummaryEdit -> FormSummaryEditLink

* ✨ add example to FormSummary

* 🎨 update examples

* 🎨 update examples

* 💄 FormSummary

* 🎨 types + jsdoc tweaks (FormSummary)

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-04-15 09:53:42 +02:00
Halvor Haugan 6fd0f501f5 Story med forced-colors på Button (#2847) 2024-04-15 09:24:07 +02:00
Ken a11b8ddf4e 🐛 Dokumentert bruk av full og overflow-x av bleed 2024-04-12 14:51:45 +02:00
Ken 171db6a813 [Sanity] Flyttet dev-område for ny god-praksis inn i "prod" (#2843)
* 🚚 Flyttet gp-taxonomy over til prod

* 🎉 Satt opp ny sanity-struktur for god-praksis

* 🔥 Fjernet gammel editor-visning

* 🎉 Oppdatert templates for ny sanity-visning av gp

* 🔥 Fjernet god-praksis-taxonomy struktur

Struktur er nå flyttet inn i main
2024-04-12 08:25:00 +02:00
github-actions[bot]andgithub-actions[bot] 085cc532ee Version Packages (#2839)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-11 12:21:05 +02:00
KenandHalvor Haugan deae4ecba5 Datepicker/MonthPicker required bugs (#2838)
* 🐛 Required-prop på monthpicker stoppet ikke de-select av valg

* 🧪 Tester required for datepicker

* 🔥 Fjernet console.logs

* 📝 Changeset

* Update .changeset/fifty-hairs-fix.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/date/datepicker/datepicker.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Disabled-attrb er ikke nødvendig i required demo

* 🐛 Satt defaultSelected-dato til statisk dato

* ♻️ Fjernet unødvendig required-sjekk

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-11 11:55:27 +02:00
KenandHalvor Haugan cd2adcb655 Erstattet Radix togglegroup med intern implementasjon (#2620)
* 🎉 Ny hook og API 'descendants'

* 📝 Bedre storiers

* 🎨 implementert togglegroup med descendants

* 🎨 Implemented togglegroup.item

* 🎨 Fjernet gammel togglegroup

* 🐛 Fikset keydown

* 🔥 Fjernet comment

* 🎉 RowingFocus resetter nå ved focus-exit

* 🔥 Fjernet radix toggleroup fra dependencies

* 📝 Changeset

* [V6] Deprecated Grid og ContentContainer (#2622)

* 🔥 Fjernet grid css

* 🔥 Fjernet grid tsx

* 🔥 Fjernet content-container fra systemet

* 🐛 la til deprecatePrefix-tag for stylelint

* 📝 Changeset

* Textarea: Fjern wrapper (#2635)

* [V6] Chat-props deprecation (#2631)

* 🎨 Satt opp codemod boilerplate for chat deprecation

* 🐛 v5 -> v6 i codemod

* 🧪 Tester for alias-import av chat

* 🧪 idempotent codemod-test

* 🔥 Fjernet deprecated props fra Chat

* 📝 Changeset

* 📝 Bedre advarsel i chat-codemod

* 📝 v6-migration update

* 🧪 Tester vanlig import av Chat

* 📝 Oppdatert tekster i codemod

* 🔥 Fjernet return fra removeProps

* Update @navikt/aksel/src/codemod/migrations.ts

* [V6] 1440px breakpoint (#2632)

* ✨ La til nytt brekkpunkt 1440px

* 🎉 Bleed støtter 2xl breakpoint

* 🎉 Bleed box 2xl breakpoint

* 🎉 hgrid 2xl breakpoint

* 🎉 resterende primitives støtter 1440px

* 📝 tailwind migreringsdocs

* 🔥 Fjernet navno-mal fra chromatic snapshot

* 📝 Changeset

* 🐛 2xl hgrid css brakk

* 📝 Oppdatert changset med tailwind-ref

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* 📝 Mer konsekvent story for breakpoints i box

* 🐛 JSDOC for Bleed matcher nå syntax

* [V6] Fjernet z-index-modal token  (#2637)

* 🔥 Fjernet zindex-modal token

* 📝 Oppdatert docs

* 📝 Changeset

* [V6] ErrorSummary magic (#2642)

* ♻️ Flyttet li-tag fra ErrorSummary-parent til child

* 🏷️ Bedre typer

* 🔒 Heading er nå required i ErrorSummary

* 🎨 Egen prop for ErrorSummary fokus

* 📝 Changeset

* 🎨 Bedre fokushåndtering i ErrorSummary

* ♻️ focusTarget -> focusTargetRef

* 📝 Fikset jsdoc

* 📝 Migreringstekst

* 📝 changeset

* 📝 Migration-text

* 📝 JSDoc-staving

* 📝 Oppdatert migreringsguide for z-index + tailwind

* 🐛 Fikset bruk av z-modal i tailwind

* 🔥 Fjernet descendants-filer

* 📝 Rename context og types til namespace

* 🔥 Fjernet openOnFocus-prop fra date

* [V6] Modal: strengere prop-typer (#2718)

* 🎨 SortState i Table har nå none tilgjengelig (#2726)

* [V6] Oppdatert bruk av action-farger (#2717)

* 💄 Button secondary hover

* 💄 Radio/Checkbox action-farger

* :WIP: combobox action-farger

* 🐛 Tilpasset hover-farge på checkbox i confirmationpanel

* 💄 copybutton hover-text action

* 💄 dropdown, helptext hover-text

* 💄 link og linkpanel actionsfarger

* 💄 Search action-farger

* 💄 select action-farger

* 💄 Stepper action

* 💄 Textarea action

* 💄 Textarea og textfield colors

* 🐛 Riktig hover-bakgrunn på combobox selected option

* 📝 Changeset

* 📝 changeset tokens

* 📝 Dokumentert nye tokens

* [V6] Native ESM-støtte 🎉  (#2677)

* 🎨 Fungerende cjs/esm bundle med use-client

* 🎨 Oppdatert dir-output i for esm

* ⬆️ Bump date-fns og react-day-picker

* 🎨 oppdatert date-fns imports

* 🐛 Endret bruk av reat-day-picker i monthpicker

* 🐛 Fikset rendring av button i Datepicker-row

* ♻️ Bruker date-fns imports ssom støtter v2 og v3

* ⬆️ Synced date-fns versions

* ✨ Astro testmiljø

* 📝 Changeset

* 🎨 Skriver packagejson med type for esm

* 🔥 Fjernet .yarn/* fra astro

* 🎨 La til .yarn i gitignore for astro

* ⏪ Bruker riktig ds-react versjon

* ⬆️ Lik tsconfig som ds-react i aksel-icons

* 🐛 La tilbake provernance

* 🐛 Undo Day/Row fix fra main

* 🔥 Fjernet mulighet til å laste date-fns v2

* 🔥 Fjernet fs-extra dependency

* 🐛 Fikset feil versjon på core/react

* [V6] React-pakker støtter nå native SSR ved å bruke `use-client` 🎉  (#2707)

* 🎉 use-client blir lagt til på export av ds-react og aksel-icons

* 🎉 La til nextjs med appdir for testing

* ⚡ Tom yarn.lock med i git

* 📝 changeset

* 📝 Oppdatert migration-guide

* Update @navikt/aksel-icons/config/index-template.js

* 🎉 ToggleGroup-prop fill

* 🐛 Async-lasting av date-fns er nå v3 esm compliant

v3 av date-fns støtter ikke default export/import, noe som brakk async-lasting da vi brukte .default

* 🧪 Forbedret ToggleGroup-tester

* ⬆️ yarn sync

* 🐛 Fikset import av parts

* 🔥 Fjernet duplikate changesets

* ⬇️ Reversert duplikate endringer som kom fra v6

* 📝 rowing -> roving

* 📝 Bedre test-navn

* 📝 Bedre navngivning for tester

* ⚡ Fjernet useEffect for state update

* 📝 Oppdatert changeset og jsdoc

* ♻️ Inlinet aria-desribedby

* 📝 Demo for fill-prop på aksel.nav.no

* 🐛 Togglegroup krever onChange-prop

* 📝 ToggleGroup story for chromatic

* ⬆️ yarn lock

* 🎉 Bedre visning av eksempel på aksel.nav.no

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-11 11:29:33 +02:00
Ken 0d4385a545 🐛 Fill-eksempel på Tabs viste ikke funksjon riktig 2024-04-11 11:25:54 +02:00
Ken 6f1b9751f3 🛂 La til feedback på nye gp-sider (#2840) 2024-04-11 07:21:44 +02:00
Ken 7fb97808f0 🚚 Flyttet data-aksel-template attr dypere i dom-treet (#2841) 2024-04-11 07:21:29 +02:00
KenandHalvor Haugan d8ac958de2 Erstattet Radix tabs med intern implementasjon (#2621)
* 🎉 Ny hook og API 'descendants'

* 📝 Bedre storiers

* 🎉 Setup for ny tabs

* 🎨 Setup context

* 🎨 useTabs-hook

* 🎨 Tablist hook

* 🚚 Flyttet tablist i egen mappe

* 🎨 TabList

* 🐛 Fikset import av tabList

* 🎨 Tabs.Tab implementert

* 🎨 Tabs.TabPanel implementert

* 🐛 Fikset import av tabpanel

* 🐛 onOnClick -> onClick

* 🐛 Fikset keydown-håndtering i tablist

* 🐛 Fikset plassering av scrollbuttons i overflow

* ♿ Scrollbutton er nå

* ✨ Fitted variant

* 🐛 Fikset imports

* 🔥 Fjernet radix-tabs import

* 🎨 Panel-children rendres bare hvis selected

* 🎨 lazy-prop for å bare rendre children i panel hvis selected

* 🎨 Tabs.Tab håndterer nå tab-key og tabindex riktig

* 📝 Changeset

* 📝 Changeset

* [V6] Deprecated Grid og ContentContainer (#2622)

* 🔥 Fjernet grid css

* 🔥 Fjernet grid tsx

* 🔥 Fjernet content-container fra systemet

* 🐛 la til deprecatePrefix-tag for stylelint

* 📝 Changeset

* Textarea: Fjern wrapper (#2635)

* [V6] Chat-props deprecation (#2631)

* 🎨 Satt opp codemod boilerplate for chat deprecation

* 🐛 v5 -> v6 i codemod

* 🧪 Tester for alias-import av chat

* 🧪 idempotent codemod-test

* 🔥 Fjernet deprecated props fra Chat

* 📝 Changeset

* 📝 Bedre advarsel i chat-codemod

* 📝 v6-migration update

* 🧪 Tester vanlig import av Chat

* 📝 Oppdatert tekster i codemod

* 🔥 Fjernet return fra removeProps

* Update @navikt/aksel/src/codemod/migrations.ts

* [V6] 1440px breakpoint (#2632)

* ✨ La til nytt brekkpunkt 1440px

* 🎉 Bleed støtter 2xl breakpoint

* 🎉 Bleed box 2xl breakpoint

* 🎉 hgrid 2xl breakpoint

* 🎉 resterende primitives støtter 1440px

* 📝 tailwind migreringsdocs

* 🔥 Fjernet navno-mal fra chromatic snapshot

* 📝 Changeset

* 🐛 2xl hgrid css brakk

* 📝 Oppdatert changset med tailwind-ref

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* 📝 Mer konsekvent story for breakpoints i box

* 🐛 JSDOC for Bleed matcher nå syntax

* [V6] Fjernet z-index-modal token  (#2637)

* 🔥 Fjernet zindex-modal token

* 📝 Oppdatert docs

* 📝 Changeset

* [V6] ErrorSummary magic (#2642)

* ♻️ Flyttet li-tag fra ErrorSummary-parent til child

* 🏷️ Bedre typer

* 🔒 Heading er nå required i ErrorSummary

* 🎨 Egen prop for ErrorSummary fokus

* 📝 Changeset

* 🎨 Bedre fokushåndtering i ErrorSummary

* ♻️ focusTarget -> focusTargetRef

* 📝 Fikset jsdoc

* 📝 Migreringstekst

* 📝 changeset

* 📝 Migration-text

* 📝 JSDoc-staving

* 📝 Oppdatert migreringsguide for z-index + tailwind

* 🐛 Fikset bruk av z-modal i tailwind

* 🔥 Fjernet descendants-filer

* 📝 Rename context og types til namespace

* 🔥 Fjernet openOnFocus-prop fra date

* [V6] Modal: strengere prop-typer (#2718)

* 🎨 SortState i Table har nå none tilgjengelig (#2726)

* [V6] Oppdatert bruk av action-farger (#2717)

* 💄 Button secondary hover

* 💄 Radio/Checkbox action-farger

* :WIP: combobox action-farger

* 🐛 Tilpasset hover-farge på checkbox i confirmationpanel

* 💄 copybutton hover-text action

* 💄 dropdown, helptext hover-text

* 💄 link og linkpanel actionsfarger

* 💄 Search action-farger

* 💄 select action-farger

* 💄 Stepper action

* 💄 Textarea action

* 💄 Textarea og textfield colors

* 🐛 Riktig hover-bakgrunn på combobox selected option

* 📝 Changeset

* 📝 changeset tokens

* 📝 Dokumentert nye tokens

* [V6] Native ESM-støtte 🎉  (#2677)

* 🎨 Fungerende cjs/esm bundle med use-client

* 🎨 Oppdatert dir-output i for esm

* ⬆️ Bump date-fns og react-day-picker

* 🎨 oppdatert date-fns imports

* 🐛 Endret bruk av reat-day-picker i monthpicker

* 🐛 Fikset rendring av button i Datepicker-row

* ♻️ Bruker date-fns imports ssom støtter v2 og v3

* ⬆️ Synced date-fns versions

* ✨ Astro testmiljø

* 📝 Changeset

* 🎨 Skriver packagejson med type for esm

* 🔥 Fjernet .yarn/* fra astro

* 🎨 La til .yarn i gitignore for astro

* ⏪ Bruker riktig ds-react versjon

* ⬆️ Lik tsconfig som ds-react i aksel-icons

* 🐛 La tilbake provernance

* 🐛 Undo Day/Row fix fra main

* 🔥 Fjernet mulighet til å laste date-fns v2

* 🔥 Fjernet fs-extra dependency

* 🐛 Fikset feil versjon på core/react

* [V6] React-pakker støtter nå native SSR ved å bruke `use-client` 🎉  (#2707)

* 🎉 use-client blir lagt til på export av ds-react og aksel-icons

* 🎉 La til nextjs med appdir for testing

* ⚡ Tom yarn.lock med i git

* 📝 changeset

* 📝 Oppdatert migration-guide

* Update @navikt/aksel-icons/config/index-template.js

* 🚚 rename fitted -> fill in tabs

* 🐛 Async-lasting av date-fns er nå v3 esm compliant

v3 av date-fns støtter ikke default export/import, noe som brakk async-lasting da vi brukte .default

* 🧪 Forbedret Tabs-tester

Lagt til flere test-caser, men implementert testing av keyboard-nav og tabbing

* ⬆️ yarn sync

* ⬆️ Yarn lock

* ⬇️ Reversert duplikate endringer som kom fra v6

* 🎨 Aria-hidden blir nå satt på ikon hvis label allerede er satt på tab

* Update @navikt/core/react/src/tabs/Tabs.types.ts

* 📝 Testnavn for tabs

* ⚡ Skipper unødvendig memo for tab-context, punktum etter all jsdoc

* 🔥 Fjernet TabsContextProps

* 📝 Fjernet comma på changeset

* 📝 Fill-demo for aksel.nav.no

* 📝 Changeset for lazy-prop

* Update @navikt/core/react/src/tabs/parts/tabpanel/TabPanel.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Beholder  attr fra radix med i ny implementasjon

* ⚡ Flyttet fokus-state update ut av useeffect, fjernet unødvendig klasse for hidden

* ⚡ Unngår unødvendig sjekk for disabled i onFocus for useTab2

* ♻️ tab og tabpanel støtter nå egne id-er

* Update @navikt/core/react/src/tabs/useTabs.ts

* 🐛 I none tilfeller førte setFocusedValue utenfor useEffect til infinite re-renders

* Update @navikt/core/react/src/tabs/parts/tab/Tab.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 bruker-id var satt på feil attrb

* 📝 Dokumentert custom-ids for tabs

* ⚡ Chroamtic-format for tabs-stories

* ♻️ Omskrevet tabs-stories for ny syntax

* 📝 Bruker bold markdown istedenfor note syntax

* 📝 Flyttet warning til newline

* 📝 Bruker bare ett linjeskift for jsdoc

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-10 13:36:11 +02:00
dependabot[bot]andKen b417c74374 ⬆️ Bump vite from 5.1.6 to 5.1.7 (#2836)
* ⬆️ Bump vite from 5.1.6 to 5.1.7

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.1.6 to 5.1.7.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.1.7/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.7/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* ⬆️ bumpet vite til 5.1.7 i shadow-dom demo

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-04-10 12:24:54 +02:00
Halvor Haugan ff1d3534a6 🆙 Oppgrader Chromatic (#2837) 2024-04-10 12:13:48 +02:00
KenandHalvor Haugan 57d015209d [aksel.nav.no] Oppdatert ny GP-struktur og frontend (#2778)
* 🎉 Animert hero-select for nye gp-sider

* 🎨 Implementert keyboard-handler for tema-hero

* ♿ Gjemmer elementer ikke synlige ved hero-select

* 🎉 Ny hero for gp-side

* 🎨 Oppdatet gp-forside

* 🧪 Stories for nye komponenter

* 🐛 tabindex -> tabIndex

* ♻️ Oppdatert queriy definition

* 💄 Justert for mobilvisning

* 🎨 Bruker prictogram-data fra sanity i cards

* 🎉 Bruker faktiske innholdstyper og undertema nå

* 🔥 Fjernet TODO

* 🎨 Oppdatert go-forside til å støtte riktekst description

* 🐛 stories var ikke oppdatert

* 🎉 Bruker hero-cards i tema-hero

* 🐛 stories var ikke oppdatert

* 🐛 Manglet image i response-type

* ♻️ Omstrukturert modalvariant av dialog

* 🎉 Dynamisk hero for gp-sider

* 💫 Dynamisk skalering er nå animert

* 💫 Justert exit-animasjon

* 🔥 Fjernet gammel inline style

* ♻️ Forenklet Static hero callbacks

* 🔥 Fjernet hasRefs sjekk etter query for gp-artikler

* 🎉 Oppdatert serverside interface for gp-tema

* 🎉 Visninger for filtervalg på gp-tema

* 🐛 Valgt element ble ikke fokusert ved hero-åpning

* 🎉 Oppdatert artikkelkort for nye gp-sider

* 💄 Justert spacing for heading/desc seksjoner

* 🎉 Fikset lasting av data og chips

* 🎉 Fungerende chip-navigering

* ⚰️ Fjernet gammel kode

* 🚚 rename tema-hero filer

* 📝 Dokumentert count articles funksjoner

* 🧪 tester for count-articles

* 🚚 Flyttet cardgrid ut til egen fil

* 🔍 lagt til seo for tema

* ⬇️ reversert til prod-dataset

* 🎉 Artikler på gp-forside er sortert etter mest populære

* 🎨 satt description på undertema til required

* 🎉 Panel for forhåndsvisning av undertema/innholdstype på artikkelside

* 🎉 Lagt til forklarings-felt i ny god-praksis struktur

* 🐛 Fjernet chiplist for lister uten noe data

* 🎉 Tilpasset temaheader for kontrast

* 💄 normal -> semibold for statichero title

* ♿ Wrappet lister i ul > li

* 🎉 Oppdatert til ul > li på artikkel-lister

* 🐛 Cards strakk seg ikke til høyde etter wrapping i li

* 🐛 Manglet main-element og skip-link støtte

* 🔍 Bedre meta-description

* 🔥 Fjernet kommentar

* 🎨 Gjort klar sitemap for ny god-praksis

* ♿ Bedre semantikk for temasider

* 🎨 Justert tema header

* 🎨 Oppdatert akselchevron

* 💫 Justert page-animasjon

* 🎨 La til artikkel-chips

* ♻️ Link chip -> temalink

* 🎨 Tema-tagging på gp-artikler

* 💄 Gradient og illustrasjon på tema-hero

* 💄 La til bildestøtte i hero-tittel

* 🐛 stories brakk

* 💄 Satt god praksis heading til text- default for bedre kontrast

* 💄 z-index problem på intro hero

* 💄 Småjusteringer design

* 🐛 z-index stacking av cube-illustrasjon nå bak tekst

* 📝 Lagt til kommentar

* 🚚 Flyttet over støtte for wc definering i react

* 🐛 Brukte feil temahenter i sitemap som brakk playwright

* ♿ uu-oppdateringer etter review

* ♻️ Explanation -> description for undertema og tema

* 💄 Oppdatert Hero for teamsider

* 💄 Blur-bg på tekst i hero, no underline på hover for komponentsforside

* ♻️ Fokus beholdet på select-knapp ved åpning av tema-dialog

* 📝 Commentarer på escapeKeyDown hook

* 💄 Gjennbruker gradient for alle hero-headers

* 📝 Skrivefeil

* 📝 Kommentert useGpViews

* 📝 Kommentert endringer

* ⬆️ Bumpet sanity til v3.36

* ♻️ Fjernet Modal variant av tema hero.

Bruker samme dialog på mobil og desktop

* 🎨 aria headings -> h3 for gp-forside lenke

* 📝 Lowercase i html for artikkelcards

* Update aksel.nav.no/website/pages/gp/index.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/components/website-modules/AnimatedChevron.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/components/layout/god-praksis-page/cards/GpArticleCard.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/components/layout/god-praksis-page/hero/tema-hero/parts/HeroCardList.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🚚 ArticleView -> ArticleSections

* 🚚 bosheight -> dialogheight

* 🐛 Import feilet av GpCardGrid etter navneendring

* 🐛 hero navigasjon var ikke sortert etter temanavn

* 🔥 Fjernet explanation-felt for innholdstyper

* ♻️ Ryddet opp i kommentarer fra github

* ♻️ Bruker SanityImageSource for Image-type

* 💄 Selected-variant av herocard. Inverted-pictogram i sanity

* 📝 view -> queryView

* ♻️ Skrevet om ArticleSections for å unngå repetert kode

* ⬆️ yarn lock

* ♻️ Fjernet unødvendig react-fragment

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-04-10 10:15:56 +02:00
Ken 5969859024 🐛 Unngå at global Escape-event lukker ikon-sidebar
Dette gjelder ved escape i Søk(modal) og søkefelt på ikonside
2024-04-10 09:05:51 +02:00
github-actions[bot]andgithub-actions[bot] 9bbc3e6813 Version Packages (#2835)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-09 15:25:38 +02:00
Ken 5250b47ca4 💄 Border-radius på FileUpload.Item er nå rund (#2834) 2024-04-09 15:20:40 +02:00
Ken fc7709ae2a 🐛 Søk filtrerte ut beste treff fra 'nyeste artikler' 2024-04-09 09:40:20 +02:00
github-actions[bot]andgithub-actions[bot] 2364e689ed Version Packages (#2831)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-09 09:12:06 +02:00
Halvor Haugan d57c0b2c2c Justering av eksempler på Checkbox (#2833) 2024-04-09 09:06:58 +02:00
Ken 868bb543a5 🐛 Preview brakk for god-praksis
Siden 'userState' ikke hentes fra Sanity, blir den undefined ved lasting av previewdata
2024-04-09 07:33:16 +02:00
Torkjel SkjetneandHalvor Haugan 8f9ed7a404 FileUpload.Item: 💥 Endret API og støtte for å sette ID på knappen (#2824)
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-04-08 09:16:53 +02:00
Halvor HauganandKen 5ea6255f6d Justeringer av eksempler på Radio og Checkbox med mer (#2830)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-04-04 20:54:12 +02:00
github-actions[bot]andgithub-actions[bot] 491fccbe80 Version Packages (#2828)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-03 11:56:35 +02:00
Ken cca2a8263f 💄 Fjernet Illustrasjon fra bloggsider (#2827) 2024-04-03 11:50:12 +02:00
Ken 3140ec2765 🔥 Fjernet role=gridcell fra datoknapper (#2826)
Siden knappene allerede er i en table og da også td er det unødvendig med gricell
2024-04-03 11:37:05 +02:00
Halvor Haugan d8fce83ae3 Oppgrader til Storybook 8 (#2825) 2024-04-03 10:03:44 +02:00
github-actions[bot]andgithub-actions[bot] f88b00daf6 Version Packages (#2821)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-03 09:45:19 +02:00
Ken 6d0baea5c1 👽 Oppdatert om Aksel lenke i footer
Side er flyttet fra god-praksis til standalone-side url
Er opprettet automatisk redirect slik at eldre lenker ikke brekker
2024-04-03 09:25:54 +02:00
Ken 880e77b9c2 ♻️ Fjernet max-krav for antall tegn i Relaterte lenker-module
Siden lenketeksten ofte refererer til en sidetittel skaper det utfordringer da de ofte er litt lengre
2024-04-03 09:03:57 +02:00
Ken 6d16373f85 👽 Oppdatert skriv for aksel lenke i footer
Side er flyttet fra god-praksis til standalone-side url
Er opprettet automatisk redirect slik at eldre lenker ikke brekker
2024-04-03 08:42:08 +02:00
Halvor Haugan ae078254dc Modal: Fjern tomt element (#2819) 2024-04-02 10:20:00 +02:00
github-actions[bot]andgithub-actions[bot] 638e8260b4 Version Packages (#2811)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-02 08:45:10 +02:00
Halvor Haugan d991011690 FileUpload.Dropzone: id prop settes på button (#2817) 2024-03-22 11:03:05 +01:00
KenandHalvor Haugan b6086f7b1f 📝 Oppdatert radio-error dokumentasjon (#2800)
* 📝 Oppdatert radio-error dokumentasjon

* Update aksel.nav.no/website/pages/eksempler/radio/error.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/radio/error.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/radio/error.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-03-22 10:42:38 +01:00
Ken 05462081aa useControllableState i Expansioncard og Switch state-bug (#2810)
* ♻️ Bruker controllableState i ExpansionCard

* 🐛 Fikset tilfelle der checked switch var visuelt unchecked

* 📝 Changeset

* 🔥 Fjernet utkommentert kode
2024-03-22 10:24:35 +01:00
Ken 63e42de3ee 🆙 Oppdatert Playroom (#2815) 2024-03-22 09:31:00 +01:00
Halvor Haugan 2e85178166 yarn.lock sync 2024-03-21 16:36:11 +01:00
Ken 456d4e2e07 🐛 Slack var ikke i outbound accessPolicy for feedback 2024-03-21 11:52:48 +01:00
Ken b5a0cb8cdf Oppdatert logging for Aksel.nav.no + bumpet feedback pagination page-size (#2812)
* 🆙 Oppgradert logging

* 🎨 Bedre loggeoutput

* 🎨 Bruker childlogger

* 🧪 Custome error-logg

* ⚡ Større paginering-page for slackusers

* 📝 error -> info
2024-03-21 11:36:43 +01:00
Ken a2af9bcc37 Lagt til mer padding-right på ReadMore (#2806)
* 💄 Oppdatert padding-right på readmore

* 📝 Changeset

* 🐛 Manglet chromatic-disable på readmore story
2024-03-21 10:16:14 +01:00
bd45754adb [aksel.nav.no] Slackbot for feedback (#2785)
* 🎉 Satt opp boilerplate for auth på Aksel

* 🎉 Auth boilerplate

* 🎨 Demo-setup for å teste auth i dev

* 🚚 Flyttet auth til getserversideprops

* 🔥 Fjernet authprovider fra _app

* 🐛 revalidate er ikke valid key for getserversideprops i nextjs

* 🚚 rename auth-dir

* 🔥 Fjernet auth types

* 🎉 Auth for api

* 🎨 Oppdatert workflows med token

* 🔥 Fjernet testing av auth på god-praksis sider

* 🎨 La til sidecar på prod-deploy

* 🐛 only return boolean in Promise<boolean>

* ✨ feedback form

* 🎨 showcase all states of new FeedBackForm

* 🔥 remove prop name (will use auth api)

* 🎨 use getAuthUser()

* 🎨 use useAuth() for login/logout

* 🎉 Slack feedback-api

* 🐛 handle case where token is null

* 🎨 scroll to anchor on login redirect

* ⚡ Utility-funksjoner for slack-api

* 🧪 Tests for slack-utilities

* 🎨 Ryddet opp i henting av slack memebers

* 🚚 Flyttet caching inn i funkson

* 📱 make FeedbackForm responsive

* 🎉 Strengere typet slack-utilities

* 🎨 Fikset typefeil i feedback-api

* ⬆️ Migrert til @navikt/oasis

* 🏷️ Satt typer til strict for å kjøre tester

* 🎨 Slackbot-API with protected auth and actual user

* 🏷️ strengere typer

* ⚡ Implementert paginering av slacbot

* 🎨 Lagt til slackbot-token i workflows

* 🏷️ strict tsconfig

* 🏷️ Typer for slackbot input

* 🔥 Fjernet demo-body

* 🎨 oppdatert medvirkende tekst

* ⬆️ Yarn lock

* 🎨 move state handling down to Feedback

* 🏷️ typing fixes

* 🚧 API usage

* 🏷️ fix type error

* 👷 update AccessPolicy

* 🦺 add validation to feedback form

* 💄 justify-items-stretch on TextArea needed 🤔

* ♻️ avoid prop drilling, use sanity data hook for document id

* 🔧 add auth to webpack config for storybook

* ♻️ Feedback form  (also add error state handling)

* 👷 add stories for Feedback form

* 🔊 log feedback results metadata

* ♻️ remove refs, use formData and event.currentTarget

* 🧪 retry flaky test

* ⚗️ test promises for dynamic import in test

* 🧪 flaky test config

* ⬆️ yarn lock sync

* ⬆️ yarn lock sync

* ♻️ Bruker nå egen userState-type for fortelle komponenter om bruker er logget inn eller ikke

* 🔥 remove unused CSS

* 📝 lagt til todods

* 🔥 remove anonymous feedback submission

* 🔥 remove CSS

* :goals_net: catch fetch clientside, feedback

* ✨ send feedback to private slack channel as well

notify everyone if there are 0 editors

* 💄 + ♿ aria-hiddens and better styling, Feedback

* ♻️ refactor + add more feedback (loading state + alert)

* ⚗️ test encoding uri for anchor (redirect)

* ⚗️ more testing URL redirect

* ⚗️ more testing

* ⚗️ testing

* ✅ stories for Feedback

* 🔒 sanitize user objects (then cache)

* 🏷️ type SanitizeUser in find-user

* 🐛 optionally render the message about zero editors

* ⚗️ more testing for URL redirect / fragment issue

* ⚗️ log the redirect URL

* ⚗️ more testing

* ♻️ Gjennbruker error-return for feedback-api

* 🧪 Tester alternativ løsning for scroll etter login

* 🐛 Query update slapte loop i useEffect

* 🧪 Tester alternativ løsning for scroll etter login

* 🚚 Flyttet autofocus inn i headingseksjon

* 🐛 Wonderwall fjerner & fra query

* 🐛 encodeUrl as defined in wonderwall docs

* 🧪 Reversert til anchor-løsning

* 🧪 Reversert til anchor-løsning med encoding

* 🐛 Fikset edgecase der asPath med allerede eksisterende hash brakk login-redirect

* 🔥 Cleanup etter anchor-testing

* ⬆️ yarn lock sync

* 🎨 Oppdatert til navikt channelid

* 📝 Endret på error-tekst i feedback

* Fjernet ts-expect-error

* ⬆️ yarn lock sync

* 🔥 Fjernet filterering på godkjent mail

* 📝 Oppdatert slackbot-block

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-03-20 15:48:49 +01:00
github-actions[bot]andgithub-actions[bot] a882a8a389 Version Packages (#2807)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 13:26:51 +01:00
Ken d1606d358a 🐛 useDatepicker håndterer isInvalid validation riktig (#2809)
* 🐛 useDatepicker håndterer isInvalid validation riktig nå

* Update @navikt/core/react/src/date/hooks/useDatepicker.tsx

* Update @navikt/core/react/src/date/hooks/useDatepicker.tsx
2024-03-20 13:21:05 +01:00
Ken bb87837632 🧪 Bump timeout and retry of dateStr testing 2024-03-20 12:33:56 +01:00
Halvor Haugan 9c8b2301ed FileUpload.Dropzone: Fiks feil med duplisert id (#2805) 2024-03-20 12:31:08 +01:00
Ken 54ba483d2d ✅ Oppdatert Chromatic-tester
✅ Oppdatert dropdown-tester

🐛 satt dropdown-story til open

✅ Oppdatert errorsummary-tester

✅ Oppdatert fieldset-tester
2024-03-20 11:51:46 +01:00
github-actions[bot]andgithub-actions[bot] 85f5458c06 Version Packages (#2804)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-20 09:51:54 +01:00
Halvor Haugan 19abec80f7 FileUpload: Fiks feil ved import av json (#2803) 2024-03-20 09:46:45 +01:00
Julian NymarkandHalvor Haugan b2ddce5279 📝 Search docs review (#2797)
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-03-19 15:39:12 +01:00
github-actions[bot]andgithub-actions[bot] bd7c945158 Version Packages (#2799)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-19 15:07:37 +01:00
Ken ca24684a25 🐛 Dropzone med disabled stoppet ikke filopplasting (#2798)
inputfelt settes nå til disabled ved bruk av prop for å unngå dette
2024-03-19 15:02:06 +01:00
Julian Nymark 1564363985 💄 break-normal on body text, but break-all on types, as they… (#2790)
* 💄 break-normal on body text, but break-all on types, as they get long and complicated without spaces

* 🔥 remove break-normal, as it's the default
2024-03-19 14:58:58 +01:00
Ken ca8d36e885 🔥 Fjernet UX-tweaks card på forside
Kode er kommentert ut fra forside, men vil være lett tilgjengelig hvis vi ønsker å legge til fremtidige undersøkelser
2024-03-19 14:43:00 +01:00
github-actions[bot]andgithub-actions[bot] 8efc6c58be Version Packages (#2794)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-19 14:00:30 +01:00
2ea2a91a37 Combobox complex options (#2716)
* Remove unused function

* Support for complex options, using objects with label and value instead of strings

* Better typing for isTextInSelectedOptions value (boolean instead of truthy/falsy)

* Stricter value type: Only accept string values. This will work better with the allowNewValues prop, and simplify returning a value from onToggleSelected.

* More JSDoc

* Add test for complex options with label and value

* Add example for complex options on the aksel-website

* yarn.lock

* Remove other properties than label and value from Combobox options in Storybook-examples, as we have limited the format for now

* Array.includes does not work with objects, so should use isInList utility function. Fixes missing checkmark for selected items in FilteredOptions.

* Add changeset

* Remove navds-dependencies in playroom that break playwright tests. These are outdated/unsynced, and will be inherited from parent package.json instead.

* Do not try to remove an undefined option

* "it" is from jest. Use "test" instead.

* Update @navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/Input/Input.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/types.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Raise change level to minor, to signal the new feature

* Spread props instead of adding them separately

* JSDoc @returns doesn't do anything without a value specified, and neither of these return a value

* Options are used for multiple features, so will just skip specifying them

* Doesn't need a guaranteed unique ID for storybook examples. Use hard-coded instead.

* selectedOptions is a list of strings anyhow, so should just use the value

* More realistic example for complex options, where the option label is larger, and the SelectedOptions label uses a short code (the value)

Also made the isInList function better, by checking both label and value when checking ComboboxOptions. Pass just the value or just the label if you only want to check either of them.

* Add tests for mapToComboboxOptionArray (renamed from mapFromStringArrayToComboboxOptionArray)

* Add test for toComboboxOption and use this function in mapToComboboxOptionArray

* Update combobox unit test for complex options to use a more realistic example

* Don't say anything about what might be added in the future. That doesn't belong in the documentation

* Oppdater beskrivelsen for complex options-eksempelet (var kopiert fra annet eksempel)

* Fix Storybook example bug where de-selecting a value selected it an extra time

* Fix example

* Remove listing options because it breaks with allowNewValues

* Revert earlier change that always showed selected values in FilteredOptions, even if it didn't match the search text. This broke autocomplete.

* Remove unneccessary optional check

* yarn.lock

* Don't need to use toLocaleLowerCase

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-03-19 13:47:13 +01:00
Halvor HauganandKen aebba20fd4 🆙 Minor-oppgradering av deps (#2795)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-03-18 18:51:11 +01:00
Ken 5ce4b4ea79 📱 Tilpasset aksel-header for 320px (#2793) 2024-03-17 15:27:43 +01:00
Ken 548d9bb169 💄 Bedre eksempel for logg-ut i dropdown (#2792) 2024-03-17 15:27:33 +01:00
25e0d15d67 Ny komponent FileUpload (#2504)
---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-03-15 12:54:35 +01:00
Halvor Haugan 98f6d7dde4 Forbedret beskrivelse for ref i prop-tabell (#2791) 2024-03-15 10:04:09 +01:00
6ac605dd48 Version Packages (#2775)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-03-14 16:15:40 +01:00
Ken d293d44b30 Fikset CDN deploy av Aksel og designsystem assets (#2789)
* 🐛 Oppdatert assetprefix

* 🐛 Fikset cdn asset upload
2024-03-14 16:05:09 +01:00
Julian Nymark 5754a08f6c 👷 update workflow for prod (new NAV CDN) 2024-03-14 14:20:08 +01:00
Julian Nymark 924c63324c 👷 swap team aksel for team designsystem (used elsewhere within NAIS) 2024-03-14 14:11:20 +01:00
Julian Nymark b78b818fea 👷 update workflow (new NAV CDN) 2024-03-14 14:00:44 +01:00
Ken dc5ea3b842 [Ikoner] Nytt ikon OpenSource (#2787)
* 🎉 Oppdatert ikonpakke

* 📝 changeset
2024-03-13 18:59:41 +01:00
Halvor Haugan bd315a239b [aksel.nav.no] Fiks link til token-guide (#2786) 2024-03-13 15:53:59 +01:00
Julian NymarkandKen <ken.aleksander@gmail.com>, Halvor 4469c641ed 💄 pretty up the props box on aksel.nav.no + typos (#2729)
* 💄 pretty up the props box on aksel.nav.no + typos

- also update some props docs here & there

* ♻️ pull out component, lazy() it

* 🔥 remove testing css

* 🎨 add fallback with <Suspense>

* 💬 correct @default strings

* 💄 spacing in Props table

* 🔥 @note is not a real JSDoc tag

* ✨ docgen extracts example, render fancy example box

* ✨ pretty @return and @params

* 💄 improve table layout / CSS

* 💄 + update CopyButton & Combobox jsdoc.

* 📝 update jsdoc

* 🎨 Oppdatert layout og visning av prop-table

* 🎨 use more semantic html, better nested <dl>

* ♿ add h4 to prop items

* 👷 use production sanity data

* ♿ revert nested <dl> so Axe tests pass

* 🏷️ correct some types for tsc to pass

* ♿ change from div -> ul

* 👷 commit lockfile

* 💄 make ul bottom rounded and align type with it\'s code block

* ♿ set language tag for props written in english

* 🏷️ type improvements for props section

* 🙈 update .gitignore

* 📝 jsdoc update

* 💄 props section

* ♻️ rename and less indentation (continues > ifs)

* 💄 style changes for Prop section

- breakpoint fail fix
- breakpoint col / row flex for prop fields
- padding tweaks

* 📝 update example jsdoc

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>, Halvor <halvor.haugan@nav.no>
2024-03-12 13:59:35 +01:00
Halvor Haugan b15218e1cb Oppdatering av eksempler på Textarea (#2784) 2024-03-12 09:11:18 +01:00
Ken 73a69f7048 🎉 Fikset search-bug der for god score fjernet resultat (#2783) 2024-03-11 12:48:02 +01:00
Halvor Haugan 7dcd58ff76 Select: Justert eksempler, JSDOC og stories (#2782) 2024-03-11 11:04:49 +01:00
Halvor Haugan 2f3c99f5f6 Justering av eksempel på Table med TextField (#2780) 2024-03-08 09:35:00 +01:00
KenandJulian Nymark 8835291a78 [Aksel.nav.no] Auth på Aksel (#2757)
* 🎉 Satt opp boilerplate for auth på Aksel

* 🎉 Auth boilerplate

* 🎨 Demo-setup for å teste auth i dev

* 🚚 Flyttet auth til getserversideprops

* 🔥 Fjernet authprovider fra _app

* 🐛 revalidate er ikke valid key for getserversideprops i nextjs

* 🚚 rename auth-dir

* 🔥 Fjernet auth types

* 🎉 Auth for api

* 🎨 Oppdatert workflows med token

* 🔥 Fjernet testing av auth på god-praksis sider

* 🎨 La til sidecar på prod-deploy

* 🐛 only return boolean in Promise<boolean>

* ⬆️ Migrert til @navikt/oasis

* 🏷️ Satt typer til strict for å kjøre tester

* ⬆️ Yarn lock

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2024-03-06 11:53:30 +01:00
Halvor Haugan 2971129d1f Oppgrader eslint-plugin-storybook (#2777) 2024-03-05 16:34:36 +01:00
Ken 9915cf8232 🔥 Fjernet muligheten til å sette seg som anonym i sanity
Nye forfattere blir anbefalt å bruke et alias eller bare fornavn hvis man ønsker.

Ingen er satt som anonym i dag, slik at dette ikke vil påvirke noen forfattere
2024-03-05 14:34:20 +01:00
Halvor Haugan fa00774b0d Forberedelse for Storybook 8 (#2776) 2024-03-05 14:33:58 +01:00
Ken 966de79621 [aksel.nav.no] Migrert editor-felt til variant med email (#2760)
* 🎨 Satt opp migrering for editorsider

* 🎨 Oppdatert initialvalues for mail og oppretting av nye artikler

* 📝 Description på email-field

* Update aksel.nav.no/website/sanity/schema/documents/editors.tsx

* Update aksel.nav.no/website/sanity/schema/documents/editors.tsx

* Update aksel.nav.no/website/sanity/schema/documents/editors.tsx

* 🎨 Bedre validering av nav-mail i sanity

* 🐛 Feilet etter ts oppdatering
2024-03-05 13:35:48 +01:00
KenandHalvor Haugan 0ce2300f92 [aksel.nav.no] Satt strict -> true i tsconfig (#2766)
* 🏷️ sanity-video typer

* 🏷️ Typer storybook

* 🏷️ Typer usecheckauth

* 🏷️ Typer formateddate

* 🏷️ Typer useSanityDate

* 🏷️ Typer footerlink

* 🏷️ Typer ny gp

* 🏷️ Typer layout

* 🏷️ Typer logging

* 🏷️ Typer logging av href

* 🏷️ Typer codeexamples

* 🏷️ Typer sanity-modules

* 🏷️ Typer for alle sanity-modules

* 🏷️ Typer resolvers

* 🏷️ Typer serach

* 🏷️ Typer search

* 🏷️ Typer useToc

* 🏷️ Typer _app

* 🏷️ Typer pages

* 🔥 Fjernet buildlogs fra tsc

* ⬇️ Reversert til gammel logging av lenker

* Update aksel.nav.no/website/pages/eksempler/timeline-intern/aria-controls.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🏷️ Bruker satisifies for array-type sjekk

* 🏷️ Forenklet typer

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-03-05 11:46:10 +01:00
Halvor Haugan 08e9876176 Sandbox: Alltid bruk siste versjon av DS-pakkene (#2774) 2024-03-04 14:10:36 +01:00
Ken 331b4c4c00 🎉 Nytt ikon archive@ (#2772) 2024-03-04 14:10:04 +01:00
Halvor Haugan 2b6e9c8798 Oppdater stories for Link (#2770) 2024-03-01 20:00:18 +01:00
Ken 4065ee3987 💄 UXTweaks-hero på forside bruker Amber-farger
Designer ønsket å gjøre hero mer tydelig da dagens 'violet' forsvant mellom elementene
2024-02-29 19:33:30 +01:00
github-actions[bot]andgithub-actions[bot] 59756f32f7 Version Packages (#2764)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-29 12:21:22 +01:00
Halvor Haugan 9510327abe Link: Fjern hover-farge (#2767) 2024-02-28 15:18:25 +01:00
Christian Skrøvseth 356119e074 Modal: Fiks lukking ved slipp av museknapp på backdrop (#2752) 2024-02-27 15:02:02 +01:00
Halvor Haugan 3d2eab4fda Modal: fiks fokus bug i Safari + endre title på lukkeknappen (#2688) 2024-02-27 09:48:26 +01:00
Halvor Haugan 299c5f1db4 [aksel.nav.no] 🔨 Bytt ut cp med copyfiles (#2753) 2024-02-26 13:28:46 +01:00
Halvor Haugan 6267d0c7fb [aksel.nav.no] 🆙 Oppgradert start-server-and-test (#2759) 2024-02-26 13:26:59 +01:00
Halvor Haugan 44ba2ef7e8 [aksel.nav.no] 🚨 Ikke tillat @ts-ignore (#2758) 2024-02-26 13:07:30 +01:00
Ken 002f6a1b9e [Sanity] Oppdatert sanity minor (#2733)
* 🎉 Oppdatert sanity

* 🐛 Oppdatert import av deprecated desktool i sanity

* ⬆️ yarn sync

* 🐛 IntentButton var oppdatert i ny sanity-versjon
2024-02-26 10:43:00 +01:00
Halvor Haugan 124c28eb0e Oppdatering av eksempler på TextField (#2754) 2024-02-26 10:05:46 +01:00
Halvor Haugan ae7d4d5f07 Oppgradering av deps (#2756) 2024-02-26 09:07:11 +01:00
github-actions[bot]andgithub-actions[bot] bb5dd32357 Version Packages (#2746)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-21 15:27:30 +01:00
Ken 9581fb33f2 📝 Oppdatert changeset for ny v6.1 release 2024-02-21 15:24:26 +01:00
KenandHalvor Haugan 884bf0c997 [V6 minor] Oppdatert exports av komponenter for å støtte nextjs app router (#2745)
* 🚚 Oppdatert names-exports for expansioncard

* 🚚 Accordion

* 🚚 Alert

* 🚚 Button

* 🚚 Chat

* 🚚 Chips

* 🚚 CopyButton

* 🚚 Date components

* 🚚 Dropdown

* 🚚 Guidepanel

* 🚚 Helptext

* 🚚 InternalHeader

* 🚚 Primitives

* 🚚 Link

* 🚚 LinkPanel

* 🚚 List

* 🚚 Loader

* 🚚 Modal

* 🚚 Portal

* 🚚 Pagination

* 🚚 Popover

* 🚚 Provider

* 🚚 ReadMore

* 🚚 Skeleton

* 🚚 Stepper

* 🚚 Table

* 🚚 Tag

* 🚚 Timeline

* 🚚 ToggleGroup

* 🚚 Tooltip

* 🚚 Typography

* 🚚 Utils

* 🚚 Flyttet forms-komponenter inn i egne mapper

* 🚚 Oppdatert exports for alle skjemakomponenter

* 📝 Oppdatert exports av forms i package.json

* 🐛 Fikset regresjoner etter flytting av filer og exports

* 🐛 Manglet export av errorsummaryitem

* 🐛 Manglet export av search.button

* 🐛 Stories manglet riktig import

* 📝 changeset

* 🐛 Tester var ikke oppdatert med imports

* Update .storybook/main.ts

* 📝 Oppdatert package.json description

* 🎨 Oppdatert export til default-export

* 🐛 Exports av komponenter brakk for utils, combobox

* 🎨 Oppdatert eksempler for next appdir

* 🎨 Oppdatert astro-eksempel

* 📝 Client component test i use client scope

* 📝 Changelogs skrev use client feil

* 🐛 rename fieldset

* 🐛 rename Fieldset -> fieldset

* 🐛 Merge fra main brakk combobox tester og stories med feil import

* Update .changeset/silent-meals-watch-copy.md

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-02-21 15:20:26 +01:00
c0c812b77b 🏷️ fix types for modal issue (#2744)
* 🏷️ fix types for modal issue

* liten style justering

* Tester!

* changeset

* tester test

* tester test 2

* tester test 3

* Revert experiments, add proper tests

* fix Portal.stories.tsx

* 🏷️ Endret rekkefølge på modal conditional-typer for bedre feilmelding

* revert rekkefølge

* testkode

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-02-21 13:37:28 +01:00
Julian Nymark fd4358df31 ♻️ update several stories (#2740)
* ♻️ update several stories

* ♻️ textarea

* ♻️ remove unused props + radio, search, select, monthpicker

* ♻️ text-field
2024-02-20 16:35:29 +01:00
Halvor Haugan bf77c03cd8 Modal: Ikke opphev scroll lock ved lukking av nesta modal (#2743) 2024-02-20 15:55:19 +01:00
Ken 91e34e8ad8 [aksel.nav.no] Oppdatert til nextjs v14 (#2737)
* 🚚 Nextjs v14 støtter ikke route-names med default. renamet til demo

* 🎉 Nextjs canary-release for fungrende v14 + middleware

* 🐛 canary-version hadde feil syntax

* 🔥 Fjernet github-pattern fra image-config i next.config.js

* ⬆️ yarn sync
2024-02-19 19:58:11 +01:00
Ken 15f88a104f 🐛 Tester på nettside ble prøvd kjørt i feil workspace 2024-02-19 16:12:50 +01:00
Ken 5100662ea7 ⚡ Skrevet om Jest til Vitest (#2723)
* ⚡ Bruker vitest for Aksel cli

* ⚡ Tokens bruker vitest

* 🔥 Fjernet ubrukte dependencies fra aksel cli

* ♻️ Aksel icons vitest

* ♻️ React bruker vitest

* 🔥 Fjernet ubrukte dependencies

* ⚡ Ser nå hvilken workspace som kjører tester

* ⚡ Vitest på aksel.nav.no

* 🎉 Vitest for aksel

* 🐛 Fikset eslint-feil for vitetest

* 🔥 Fjernet happy-dom

* 🎉 Stylelint bruker native node test-runner og ikke jest lengre

* 🎨 Migrert nye Tabs/ToggleGroup-tester til vitest
2024-02-19 16:03:48 +01:00
github-actions[bot]andgithub-actions[bot] bea55aa8bc Version Packages (#2742)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-19 15:05:24 +01:00
Ken 7585351483 🐛 Manglende export av _docs.json brakk oppdaterting av sanity-data 2024-02-19 14:51:27 +01:00
KenandHalvor Haugan 636c1ad49b [V6] Major-release (#2623)
* [V6] Deprecated Grid og ContentContainer (#2622)

* 🔥 Fjernet grid css

* 🔥 Fjernet grid tsx

* 🔥 Fjernet content-container fra systemet

* 🐛 la til deprecatePrefix-tag for stylelint

* 📝 Changeset

* Textarea: Fjern wrapper (#2635)

* [V6] Chat-props deprecation (#2631)

* 🎨 Satt opp codemod boilerplate for chat deprecation

* 🐛 v5 -> v6 i codemod

* 🧪 Tester for alias-import av chat

* 🧪 idempotent codemod-test

* 🔥 Fjernet deprecated props fra Chat

* 📝 Changeset

* 📝 Bedre advarsel i chat-codemod

* 📝 v6-migration update

* 🧪 Tester vanlig import av Chat

* 📝 Oppdatert tekster i codemod

* 🔥 Fjernet return fra removeProps

* Update @navikt/aksel/src/codemod/migrations.ts

* [V6] 1440px breakpoint (#2632)

* ✨ La til nytt brekkpunkt 1440px

* 🎉 Bleed støtter 2xl breakpoint

* 🎉 Bleed box 2xl breakpoint

* 🎉 hgrid 2xl breakpoint

* 🎉 resterende primitives støtter 1440px

* 📝 tailwind migreringsdocs

* 🔥 Fjernet navno-mal fra chromatic snapshot

* 📝 Changeset

* 🐛 2xl hgrid css brakk

* 📝 Oppdatert changset med tailwind-ref

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* Update @navikt/core/react/src/layout/bleed/Bleed.tsx

* 📝 Mer konsekvent story for breakpoints i box

* 🐛 JSDOC for Bleed matcher nå syntax

* [V6] Fjernet z-index-modal token  (#2637)

* 🔥 Fjernet zindex-modal token

* 📝 Oppdatert docs

* 📝 Changeset

* [V6] ErrorSummary magic (#2642)

* ♻️ Flyttet li-tag fra ErrorSummary-parent til child

* 🏷️ Bedre typer

* 🔒 Heading er nå required i ErrorSummary

* 🎨 Egen prop for ErrorSummary fokus

* 📝 Changeset

* 🎨 Bedre fokushåndtering i ErrorSummary

* ♻️ focusTarget -> focusTargetRef

* 📝 Fikset jsdoc

* 📝 Migreringstekst

* 📝 changeset

* 📝 Migration-text

* 📝 JSDoc-staving

* 📝 Oppdatert migreringsguide for z-index + tailwind

* 🐛 Fikset bruk av z-modal i tailwind

* 🔥 Fjernet openOnFocus-prop fra date

* [V6] Modal: strengere prop-typer (#2718)

* 🎨 SortState i Table har nå none tilgjengelig (#2726)

* [V6] Oppdatert bruk av action-farger (#2717)

* 💄 Button secondary hover

* 💄 Radio/Checkbox action-farger

* :WIP: combobox action-farger

* 🐛 Tilpasset hover-farge på checkbox i confirmationpanel

* 💄 copybutton hover-text action

* 💄 dropdown, helptext hover-text

* 💄 link og linkpanel actionsfarger

* 💄 Search action-farger

* 💄 select action-farger

* 💄 Stepper action

* 💄 Textarea action

* 💄 Textarea og textfield colors

* 🐛 Riktig hover-bakgrunn på combobox selected option

* 📝 Changeset

* 📝 changeset tokens

* 📝 Dokumentert nye tokens

* [V6] Native ESM-støtte 🎉  (#2677)

* 🎨 Fungerende cjs/esm bundle med use-client

* 🎨 Oppdatert dir-output i for esm

* ⬆️ Bump date-fns og react-day-picker

* 🎨 oppdatert date-fns imports

* 🐛 Endret bruk av reat-day-picker i monthpicker

* 🐛 Fikset rendring av button i Datepicker-row

* ♻️ Bruker date-fns imports ssom støtter v2 og v3

* ⬆️ Synced date-fns versions

* ✨ Astro testmiljø

* 📝 Changeset

* 🎨 Skriver packagejson med type for esm

* 🔥 Fjernet .yarn/* fra astro

* 🎨 La til .yarn i gitignore for astro

* ⏪ Bruker riktig ds-react versjon

* ⬆️ Lik tsconfig som ds-react i aksel-icons

* 🐛 La tilbake provernance

* 🐛 Undo Day/Row fix fra main

* 🔥 Fjernet mulighet til å laste date-fns v2

* 🔥 Fjernet fs-extra dependency

* 🐛 Fikset feil versjon på core/react

* [V6] React-pakker støtter nå native SSR ved å bruke `use-client` 🎉  (#2707)

* 🎉 use-client blir lagt til på export av ds-react og aksel-icons

* 🎉 La til nextjs med appdir for testing

* ⚡ Tom yarn.lock med i git

* 📝 changeset

* 📝 Oppdatert migration-guide

* Update @navikt/aksel-icons/config/index-template.js

* 🐛 Async-lasting av date-fns er nå v3 esm compliant

v3 av date-fns støtter ikke default export/import, noe som brakk async-lasting da vi brukte .default

* Search: Ekskluder 'type' fra SearchProps (#2736)

* 🎉 Ny token icon-action-hover

* 🔥 Fjernet v6-endringer for ErrorSummary. Endringer vil bli gjort i en senere major-versjon

* OverridableComponent: Fikset feil som tillot vilkårlige props (#2739)

* 🔥 Fjernet migration.md

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-02-19 14:03:17 +01:00
github-actions[bot]andgithub-actions[bot] aa438a998f Version Packages (#2741)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-19 11:34:15 +01:00
Ken 74216b6bc9 🎉 Fikset regresjon ved bruk av portal i tooltip (#2738) 2024-02-19 11:31:26 +01:00
github-actions[bot]andgithub-actions[bot] e5ecd66a57 Version Packages (#2732)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-19 10:11:11 +01:00
Ken 78817fef45 [Aksel.nav.no] Uxtweaks-card på forside (#2735)
* 🎉 Uxtweaks-panel på forsiden til Aksel

* 🎨 Flyttet uxtweaks-box til under god-praksis panel

* 🎨 Panel har nå aside med role presentation

Dette gjør at skjermlesere hopper over 'complementary' og kommer rett til heading

* 💄 Oppdatert heading-tekst
2024-02-16 16:38:46 +01:00
Halvor Haugan 38357b1a2e Oppdatering av eksemplene på Skeleton (#2734) 2024-02-16 13:14:43 +01:00
KenandHalvor Haugan 65c17db2e5 Oppdatert Modal Context til nytt createContext-api (#2714)
* ♻️ Oppdatert hvordan ModalContext leveres

* 🏷️ onBeforeClose krever nå boolean

* ♻️ Undo rename av Modal.types for å unngå conflict

* 📝 Changeset

* 🔥 Fjernet unødvendig story-oppdatering

* 🐛 Fikset forwardRef i createContext

I tilfellene der ref blir sendt inn som en context-value, ble den tidligere slettet av React (native oppførsel)
ForwardRef lar oss beholde ref og sende den inn som context-value

* Endring av strict

* null -> undefined

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-02-15 19:40:46 +01:00
Halvor Haugan 59e88773d1 🎨 prettier 2024-02-15 09:37:23 +01:00
Ken f175d0f781 🧪 ToggleGroup test (#2728) 2024-02-14 16:50:09 +01:00
Ken 18419f7d98 Stories refactor (delvis) for chromatic (#2721)
* ♻️ Oppdatert Accordion-story

* ♻️ Oppdatert Chat-story

* 🐛 Chromatic story var slått av

* 🎉 ♻️ Typo-stories oppdatert for chromatic

* ♻️ Tokens-stories

* ♻️ Oppdatert Table-stories
2024-02-14 09:43:10 +01:00
Ken f63a7ec36d 📄 Oppdatert License timestamp fra 2023 -> 2024 2024-02-09 09:44:55 +01:00
Halvor Haugan 107489bd3f [aksel.nav.no] 🔥 Fjern noAmps fra InlineCode (#2719) 2024-02-08 15:11:43 +01:00
github-actions[bot]andgithub-actions[bot] 792962592f Version Packages (#2720)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-08 13:08:21 +01:00
Ken 4a02a1987c Deprecate Panel (#2712)
* ⚰️ Markert Panel som deprecated

* 📝 Changeset

* 📝 JSDOC var feil for border på Box

* 🐛 📝 JSDoc manglet border-radius
2024-02-08 11:46:20 +01:00
Ken 700943b4a5 [ci skip] ♻️ Refaktorert Button-story 2024-02-07 20:31:25 +01:00
Ken 521c982457 🚚 Oppdatert imports til direkteimports og ikke fra root-index (#2715) 2024-02-07 16:17:17 +01:00
Ken 8c17099087 🔥 Fjernet hyphen på blogg-headings (#2711)
* 🔥 Fjernet hyphen på blogg-headings

* 🎨 Bare hyphens på mobil
2024-02-07 13:42:58 +01:00
Ken 29241a7153 ⚡ Refaktorert alert-stories for mindre chromatic-tester (#2709)
* ⚡ refaktorert alert-stories for mindre chromatic-tester

* 🐛 Fikset imports
2024-02-07 13:42:26 +01:00
github-actions[bot]andgithub-actions[bot] 7e4ee40a7f Version Packages (#2708)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-07 12:26:07 +01:00
Halvor Haugan 2be97970d6 Date/MonthPicker: Justeringer JSDOC og eksempel-desc (#2704) 2024-02-07 09:42:37 +01:00
Halvor Haugan 5b3c1f33c4 Eksterne typer kommer nå med i docgen (#2705) 2024-02-07 09:30:27 +01:00
KenandHalvor Haugan f44ff44410 Bytter ut FloatingPortal med egen implementasjon (#2697)
* 🎉 Egen Portal-komponent

* 🎨 Portal og Overlay exportert i root

* ♻️ Tooltip bruker egen Portal

* 📝 Changeset

* 🔥 Fjernet ID på Portal-element

* 🎉 Ny type WithAsChild

* ♻️ Mer robust sjekk for conditional elements i WithAsChild

* 📝 WithAsChild JSDOC

* 📝 WithAsChild JSDOC 2

* Update .changeset/lovely-points-heal.md

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* ♻️ Fikset kommentarer fra git-pr

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-02-06 18:02:00 +01:00
Ken 855669538e ⚡ Kjører bare release-workflow når nødvendige filer er endret (#2701) 2024-02-06 18:01:43 +01:00
github-actions[bot]andgithub-actions[bot] 3d830dc123 Version Packages (#2703)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-06 13:56:46 +01:00
Ken dcca2a9560 Expansioncard padding top (#2699)
* 🎉 Justert padding for expansioncard small

* 🎉 Justert padding for expansioncard small
2024-02-06 13:10:08 +01:00
Ken 26fb028f07 ⚡ Filterer ut chromatic-snapshots for build-files (#2700) 2024-02-06 11:59:51 +01:00
Halvor Haugan d928769d6f [aksel.nav.no] Fiks for teksting i video 2024-02-05 14:55:22 +01:00
Julian Nymark e96d33d13e 👷 update permissions (removed too much) 2024-02-05 14:35:38 +01:00
Julian Nymark 00ebe1c18b 👷 update workflow (post merge) 2024-02-05 14:31:51 +01:00
Julian NymarkandKen 53be894ad0 Gp popular articles (#2647)
* ❇️ new schema for view tracking

* 🚧 wip for article views schema

* 🚧 wip on schema

* 🚧 schema changes for ArticleViews

* 🚧 run prettier with new config

* 🚧 deno script to update article views

* 🚧 working sanity document updates with bogus view data

* 🚧 helper to delete all article_views

* 🚧 add views_day

* ✨ working update for views on all gp articles

* 💄 eye icon for page views in sanity studio

* ♻️ cleanup from PR review / huddle

* 🚧 improvements to updateViews script

* 🚧 seemingly healthy queries (sometimes proxy gives stale data?)

* 👷 add .github/workflow for update views

* 👷 update .github/workflow for update views

* 👷 add env var in workflow

* ♻️ refactor from PR comments

* ♻️ refactor from PR comments

* ♻️ refactor from PR comments

* ♻️ refactor from PR comments

* ♻️ refactor from PR comments

* ♻️ refactor from PR comments

* ♻️ refactor from PR comments

* 👷 update workflow

* 🐛 correct paths to changelog script

* 🐛 remove unused ?? -1

* 👷 dockerfile and naisjob.yml

* 👷 yml variable formatting

* 👷 yml update

* 👷 yml variable formatting

* 🔨 .prettierignore for all yml/yaml starting with nais

* 👷 unique name for naisjob

* 👷 new nais yaml

* 👷 yml variable formatting

* 👷 remove workflow, the workflow is developed in main

* 👷 update yml

* 🚧 update naisjob yml

* 🚧 update naisjob yml

* 🚧 update Dockerfile

* 🚧 update Dockerfile (permissions)

* 🚧 update Dockerfile

* 🚧 update Dockerfile

* 🚧 update Dockerfile

* 👷 decouple config code from rest of repo (more duplication, more robustness), build with correct docker context

* 👷 cache deps in dockerfile on build-time (no need to fetch at runtime and add to pod AccessPolicy)

* 👷 relative path might work, test Dockerfile live as it works fine locally... buildx?!

* 👷 test github action docker context tweak

* 👷 test script command entrypoint (workdir is not project root)

* 👷 add AccessPolicy for reops-proxy

* 👷 better github workflow naming

* 👷 refactor _and_ optimize the dockerfile

* 👷 new docker command path for nais yml

* Update scripts/article-views/queries.ts

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* 👷 do not add rows if no data

* 🐛 fix sanity query) + now delete + update in single transaction

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-02-05 14:29:14 +01:00
Julian Nymark 614946097e [aksel.nav.no] ♿ forbedret Video-modul (#2693) 2024-02-05 14:09:43 +01:00
github-actions[bot]andgithub-actions[bot] 74ac20ea7c Version Packages (#2696)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-02 17:54:34 +01:00
Ken d299137774 🐛 Bleed håndtere reflectivePadding og marginInline Full riktig (#2695) 2024-02-02 17:52:45 +01:00
Julian Nymark 304f6d6a12 👷 test workflow changes (update-article-views) 2024-02-02 15:44:15 +01:00
Halvor Haugan bf6952c2b2 Oppdatering av eksempler på ReadMore (#2691) 2024-02-02 09:59:04 +01:00
github-actions[bot]andgithub-actions[bot] 7705dd4ae5 Version Packages (#2692)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-01 14:37:43 +01:00
Halvor Haugan d9ce1299d9 🐛 Textarea: maxLength virker nå med onChange uten value (#2690) 2024-02-01 14:29:56 +01:00
Julian Nymark 0890eed59e 👷 better github workflow naming 2024-02-01 14:24:10 +01:00
Ken dbd7150762 🐛 Sletting av innholdstyper i CMS brakk deploy av Aksel, nye /gp-sider gir nå 404 uten riktig data 2024-02-01 10:14:24 +01:00
Ken 58933e2584 🎨 Bedre kopi visning av designtokens + refererer ikke til nav-red lengre (#2689) 2024-02-01 09:17:21 +01:00
Julian Nymark 86279919c8 👷 test github action docker context tweak 2024-01-31 17:46:37 +01:00
github-actions[bot]andgithub-actions[bot] 8866572e69 Version Packages (#2686)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-31 11:33:47 +01:00
a1accdbd95 ✨ suggest some .vscode workspace settings.json / extensions.json (#2664)
* ✨ suggest some workspace settigs / extensions.json

* 🚚 css-custom-properties -> css-variable-autocomplete

* Update .vscode/settings.json

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 remove some extensions

* ✨ add some settings

* 🔥 remove wrongly added files to branch

* Update .vscode/settings.json

* Update .vscode/settings.json

* Update .vscode/settings.json

* 🎨 Fjernet noen uødvendige extensions

* 🎨 La til lokal TS-bruk

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-01-31 10:47:11 +01:00
Ken fdfdebfa99 🐛 Sentrering av checkmark i Checkbox (#2682)
* 🐛 Checkmark er nå alltid sentrert i checkbox

* 📝 Changeset

* Update @navikt/core/css/form/radio-checkbox.css
2024-01-31 10:47:02 +01:00
Halvor Haugan 56abe568e2 Textarea: debounce ResizeObserver for å unngå feilmelding (#2685) 2024-01-31 10:46:29 +01:00
Halvor Haugan 34acbb87a5 🐛 Textarea: Sett riktig høyde når brukt i Modal + StrictMode (#2679) 2024-01-31 10:35:43 +01:00
Ken fd479e3160 🐞 Datepicker Day Button (#2678)
* 🐛 Fikset Datepicker Day-button

* 📝 Changeset

* 🔥 Fjernet ubrukt referanse til DayButton i Datepicker
2024-01-31 10:30:37 +01:00
github-actions[bot]andgithub-actions[bot] 03ca21b4f6 Version Packages (#2683)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 22:09:38 +01:00
Vilde Roksand Fauchald e7804297bf Eksponer variabelen "role" i Search-komponenten (#2667)
* expose role variable so its possible to change it

* changeset
2024-01-30 22:07:49 +01:00
github-actions[bot]andgithub-actions[bot] a246c9d707 Version Packages (#2681)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 16:49:36 +01:00
d3fb3d4d96 🔴 Støtte for høykontrast i komponenter (#2680)
* 💄 Accordion tilpasset høykontrast

* 💄 Alert tilpasset høykontrast

* Legg til tokens for high contrast border og -border width. Tanken er å kunne gjenbruke på tvers av komponenter.

* 💄 Tooltip tilpasset høykontrast

* 💄 ToggleGroup tilpasset høykontrast

* 💄 bedre fargebruk på Accordion

* 🐛 Fjernet deprecated systemfarger

* 💄 alert-farger

* 💄 chat tilpasset høykontrast

* ♿ button css for high contrast

* ♿ Radio og checkbox høykontrast

* ♿ Chips høykontrast

* ♿ ConfirmationPanel høykontrast

* ♿ Tab høykontrast

* ♿ Tabs høykontrast

* ♿ Textfield høykontrast

* ♿ Textarea høykontrast

* ♿ Skeleton høykontrast

* ♿ Link høykontrast

* ♿ LinkPanel høykontrast

* ♿ ExpansionCard høykontrast

* ♿ high contrast CSS for select & datepicker / monthpicker

* ♿ Loader høykontrast

* ♿ dropdown høykontrast

* ♿ HelpText høykontrast

* ♿ Popover høykontrast

* ♿ Switch høykontrast

* ♿ high contrast CSS for ReadMore

* ♿ high contrast CSS for CopyButton

* ♿ high contrast CSS for InternalHeader

* ♿ Modal highcontrast

* ♿ Search høykontrast

* 💄 Timeline tilpasset høykontrast

* ♿ high contrast CSS for Stepper

* ♿ Combobox høykontrast

* Fix "diamond"-shape that should be an "arrow" in Timeline popover

* ♿ high contrast CSS for Switch (small tweaks)

* ♿ high contrast CSS for Switch (remove unused css)

* 🐛 Riktige fokusmarkeringer på radio/checkbox

* chips

* 🐛 Fikset ToggleGroup høykontrast

* 📝 Changeset2

* 🔥 Fjernet high-contrast token fra ds-tokens

* ♿ high contrast CSS for checkbox (tweaks)

* 🔥 Fjernet disabled-prop på radio-story

* Timeline focus in high contrast mode

* 🐛 Fikset fokusmarkering på radio/checkbox

* 🐛 Highlighting av outline var feil satt på ToggleGroup

* 📝 Highlight -> highlight

---------

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-01-30 16:47:26 +01:00
Julian Nymark d734d3071b 👷 update workflow for chromatic (stop old running action when new is created) 2024-01-30 16:22:04 +01:00
github-actions[bot]andgithub-actions[bot] 8d97bba1fe Version Packages (#2673)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 15:07:56 +01:00
Ken eff9b5ecce LocationPin-ikon (#2672)
* ✨ LocationPin ikoner

* 📝 Changeset

* Update .changeset/afraid-oranges-grow.md
2024-01-30 14:39:37 +01:00
Halvor Haugan 71fc90b301 Endring av kodeeksempler for CopyButton (#2674) 2024-01-29 19:30:35 +01:00
Ken e1d5e1b505 [tailwind] MaxWidth-token brukt for text i tailwind (#2652)
* ✨ Ny tailwind-token

* ♻️ maxWidth er nå lettere å forstå
2024-01-29 15:51:22 +01:00
Julian Nymark 45d4f6c478 Merge branch 'main' of github.com:navikt/aksel 2024-01-29 13:05:46 +01:00
Julian Nymark 2564e84b9c 👷 update workflow 2024-01-29 13:05:16 +01:00
Halvor Haugan e5637c64a8 Rename main.mts -> .ts (#2670) 2024-01-29 09:00:34 +01:00
Julian Nymark 82a1f32542 👷 update workflow 2024-01-26 15:21:38 +01:00
Julian Nymark a8d4b1e23e 👷 update workflow 2024-01-26 15:19:08 +01:00
Julian Nymark d50ebebad6 Merge branch 'main' of github.com:navikt/aksel 2024-01-26 14:51:17 +01:00
Julian Nymark e292e83128 👷 update workflow 2024-01-26 14:51:07 +01:00
23c472e60b ✨ Combobox: Mulighet for å begrense hvor mange valg bruker kan ta (#2260)
* yarn lock

* setting up maxSelectedOptions

* added correct margin

* Update tsconfig.build.json

* Make border of "max selected"-item in FilteredOptions overlap the list border

* Hide "add new value"-button if "max selected"-limit is reached

* Make MaxSelected example a bit more interactive

* wip styling max-selected option

* Disable filteredOptions that are not selected when maxSelectedOptions is reached

* Fix scrolling/clipping content in FilteredOptions

* Remove hover-effects from non-selectable options

* add prop so user can customize message shown when max num of choices reached

* Operate directly on the DOM nodes when moving virtual focus, instead of relying on index state.

The index state became stale/non-synced when replacing elements in the list.

* make maxSelectedMessage static

* Remove max-selected:hover

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>

* yarn lock update

* 'cursor: not allowed' only hits disabled options

* remove li-margins, add ul-gap with negative margin on max-selected-option

* remove 'a' from initialstate maxSelectedOptions Story

* Update @navikt/core/css/form/combobox.css

* Update @navikt/core/css/form/combobox.css

* Update @navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx

* Update @navikt/core/react/src/form/combobox/FilteredOptions/useVirtualFocus.ts

* Update @navikt/core/react/src/form/combobox/FilteredOptions/useVirtualFocus.ts

* Update @navikt/core/react/src/form/combobox/combobox.stories.tsx

* type assertion

* remove tab-index on wrapper div

* prototype for sticky non-selectable options

* "yarn lock"

* Fix feil med at focus-indikator for input-feltet ikke ble vist

* Forenkle og fikse "scroll til element" i FilteredOptions

* Sørg for at disabled FilteredOptions ikke vises under "max antall"-meldingen

* Focused option should not be covered by "max selected" message

* yarn lock

* Fix "scrollIntoView is not a function" error. Possibly needs to be checked for when it occurs, but I haven't figured it out yet

* Loading indicator is no longer exposed as an option, so we have to just search for it by the accessible name.

Should have been able to use findByRole("graphics-document", { name: "Søker..." }), but that is currently broken:
https://github.com/testing-library/dom-testing-library/issues/1131

* Aria-selected should not be placed on elements that are no longer role="option"

* Combine all "max selected options"-related props in one object

* Proper BEM syntax should use -- instead of __ for state-like classes, like --loading, --max-selected and --new-option

* Always show selected options in FilteredOptions, even if they don't match the search text

* Only to the getElementsAbleToReceiveFocus() call once per function, to reduce DOM lookups. Also changed isFocusOnThe[Top | Bottom] to functions, because it was needed for isFocusOnTheBottom to follow the same rule (and not store the value on the top level in the hook.

* Pressing "End" should not only move focus to the end of the list, but also open the list if it is closed. To mirror this, we close the list if moving focus back to the Input with "Home".

* Legg til Aksel-eksempel

* yarn changeset

* Update @navikt/core/css/form/combobox.css

* change 'maxSelectedOptions' prop to 'maxSelected'

* Mark disabled options with aria-disabled

* Add max selected text to aria-describedby, so it is announced when the user enters the input field

* Add role="status" to the wrapper for "no hits", "loading" and "max selected" info messages, so they are announced when they appear

* Remove aria-selected (again)

* fix: form error not showing correctly

* fix: rm left hover-border on add-new-option item

* Bare åpne listen som default, men la intern logikk styre etter første render

* Sticky trenger ikke ligger på hver enkelt av disse, da parent wrapperen også er sticky

* Combobox eksempler var ikke tilgjengelig i `yarn storybook:aksel` på grunn av manglende Demo-eksport

* Fjern ubrukt klasse som er i konflikt med navds-combobox__wrapper

* Trengs ikke etter at max selected ble flyttet ut av listen

* Denne koden gjør ingenting

* Trenger ikke bruke :not, fordi vi tok vekk data-no-focus i en commit tidligere i dag

* Bruk dynamiske selectedOptions for å kunne endre de

* Update @navikt/core/css/form/combobox.css

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update @navikt/core/react/src/form/combobox/FilteredOptions/FilteredOptions.tsx

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/combobox/with-max-selected-limit.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/css/form/combobox.css

* Do not render an empty ul for FilteredOptions, as it add a gap at the bottom of the container

* Do not render an empty non-selectables container, as it adds a gap at the top of the container

* Non-selectables should not have navds-combobox__list-item class, as it introduces a few issues with hovering, etc.

* Copy-pasted in an extra class that broke styling for max selected

---------

Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-01-26 14:24:35 +01:00
Halvor Haugan 058e012c26 [aksel.nav.no] Endret ord i OutdatedAlert 2024-01-26 14:11:39 +01:00
Julian Nymark ffce1f75ae 👷 update workflow test 2024-01-26 11:23:35 +01:00
Julian Nymark 46e5ffb6e4 👷 test new workflow 2024-01-26 11:11:46 +01:00
Ken d9696b3617 ⬆️ Sync yarn lock (#2669) 2024-01-25 20:52:12 +01:00
Halvor Haugan df1efb2748 Oppgradering av pakker i figma-plugin (#2661) 2024-01-25 11:32:13 +01:00
Julian Nymark 2b23f6ab91 👷 force push github workflow 2024-01-24 15:18:55 +01:00
Ken 01d422b01f 🐛 Fikset default-visning av bloggposter (#2657) 2024-01-24 09:49:20 +01:00
Halvor Haugan 8936db096f [aksel.nav.no] prettier-plugin-sort-imports (#2662) 2024-01-24 09:47:12 +01:00
Andreas NordahlandKen b66ad3673b Ny styling av inline code (#2660)
* forslag til ny styling av code

* Update aksel.nav.no/website/components/website-modules/InlineCode.tsx

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2024-01-23 21:21:53 +01:00
Andreas Nordahl 16eff2ce93 use noAmps for InlineCode in SanityBlockContent (#2659)
I en brukertest av Golden Path for frontend skapte fnuttene forvirring i inline code. Jeg tror det beste er å bare fjerne de.
2024-01-23 21:21:00 +01:00
Ken bdc0815dd7 Nytt eksperimentelt API descendants (#2586)
* 🎉 Ny hook og API 'descendants'

* 📝 Bedre storiers

* 🐛 Fikset type-mismatch mellom create-context og useDescendant

* 🐛 Fikset value setting i provider

* 🏷️ Fikset kommentert ut ts-feil

* 🎨 tester bruk av disabled

* 🔥 Fjernet unødvendig id-kobling i descendants typer
2024-01-23 15:28:12 +01:00
Halvor Haugan 4c5cdb22e9 [aksel.nav.no] Vis advarsel på gamle gp-artikler (#2650) 2024-01-23 13:24:59 +01:00
Halvor Haugan a1e74fa9bd Oppdater dependencies shadow-dom eksempel (#2656) 2024-01-23 11:16:19 +01:00
Halvor Haugan d5e5a6c64f Justering av eksempler på ExpansionCard (#2653) 2024-01-19 14:19:57 +01:00
Halvor Haugan 11e3a18526 Fiks clean (#2651) 2024-01-19 09:22:09 +01:00
Halvor Haugan 930c772bd6 [aksel.nav.no] Separat artikkelside for nye God praksis (#2648) 2024-01-18 13:50:40 +01:00
Halvor Haugan ade5d59392 [aksel.nav.no] Fjern forwardRef i ShowMore (#2649) 2024-01-18 13:49:04 +01:00
Julian Nymark d90fe26e26 popular articles (#2628)
* ❇️ new schema for view tracking

* 🚧 wip for article views schema

* 🚧 wip on schema

* 🚧 schema changes for ArticleViews

* 🚧 run prettier with new config
2024-01-17 15:26:48 +01:00
Andreas Nordahl 13b148aab6 Add dockerfile and yaml to syntax highlighting (#2638)
* Add dockerfile and yaml to syntax highlighting

* Remove dockerfile as it is not supported ootb
2024-01-17 12:31:13 +01:00
github-actions[bot]andgithub-actions[bot] 6abc1c0f3b Version Packages (#2644)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-17 11:14:41 +01:00
Ken 1177b36f48 🐛 HelpText-state ble ikke riktig oppdatert ved klikk (#2643) 2024-01-17 11:13:00 +01:00
Ken 1580290da0 🐛 Artikler uten riktig tema ble vist på forside 2024-01-16 16:19:21 +01:00
Ken b0b3b5e477 ⚡ Er nå mulig å opt-out fra chromatic (#2630) 2024-01-16 14:16:07 +01:00
Ken ef07a8ec0f 🐛 Fikset deploy av Aksel.nav.no (#2636) 2024-01-16 14:14:53 +01:00
Ken 52147b377c ✨ createContext-utility (#2619)
* ✨ createContext-utility

* ♻️ Oppdatert createcontext med bedre API

* 📝 Oppdatert kommentarer
2024-01-16 14:05:46 +01:00
github-actions[bot]andgithub-actions[bot] 515eabb2a5 Version Packages (#2633)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-16 13:08:35 +01:00
Ken 074f94184a 🔥 Fjernet hotjar fra nettside-bundle (#2626) 2024-01-16 13:05:44 +01:00
Ken 9c5288c405 [Ikoner] Synket ikoner med Figma (#2629)
* ✨ Synket ikoner

* :coffing: Fjernet ikoner med [ignore-docs] i descrption

* ✨ Nytt ikon FigureChild

* 📝 changeset

* 🐛 La tilbake ikoner som ble slettet
2024-01-16 13:05:21 +01:00
Halvor Haugan 4cad349f63 AnimateHeight: Refaktorerte sjekk av prefers-reduced-motion (#2624) 2024-01-16 12:17:41 +01:00
Halvor Haugan fa8b63706b ESLint: Legg til regel array-type (#2615) 2024-01-16 10:03:59 +01:00
github-actions[bot]andgithub-actions[bot] 2e36d59533 Version Packages (#2616)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-16 08:25:51 +01:00
Ken 4c6cecb94f 🚚 Ryddet util-mappe (#2618)
* 🚚 Flyttet useClientLayoutEffect

* 🚚 Flyttet useEventListener

* 🚚 Flyttet resterende hooks

* 🎨 Oppdatert imports av hooks

* 🚚 Flyttet Randomicon util til link-ikon

* 🚚 Flyttet overridablecomponent inn i egen types mappe

* 📝 Changeset
2024-01-15 13:36:27 +01:00
Ken 99adb77c31 🐛 Togglegroup på ikonside overlapper ikke lengre (#2614) 2024-01-15 12:34:01 +01:00
Ken 2d6cab7878 [Table] DataCell og HeaderCell støtter nå size-prop for font-size (#2613)
* ✨ Size-prop på HeaderCell og DataCell

* 🎨 Stories for size-test i table-cells

* 📝 Changeset

* ♻️ size -> textSize for datecell og headercell

* 🐛 Fikset changeset?

* Update @navikt/core/react/src/table/DataCell.tsx

* Update @navikt/core/react/src/table/HeaderCell.tsx
2024-01-15 09:09:39 +01:00
Halvor Haugan cf94da5ab6 Migrere til @storybook/test (#2617) 2024-01-15 09:07:46 +01:00
KenandHalvor Haugan f707b2211b ♻️ Ny utility composeEventHandlers (#2610)
* 💄 Synket prettier

* ✨ ComposeEventHandlers

* ♻️ Button composeEvent

* ♻️ chips composeEvent

* ♻️ copybutton composeEvent

* ♻️ composeEventhandlers dropdown

* ♻️ composeEventhandlers react-more, stepper

* ♻️ composeEventhandlers expandablerow

* ⚰️ Fjernet deprecated prop fra tooltip

* ♻️ composeEventhandlers searchbutton

* 📝 Changeset

* Update @navikt/core/react/src/util/composeEventHandlers.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Fjernet as unknown as event i composeEventhandler

* ♻️ Forenklet if-tester, la tilbake kommentarer 📝

* 📝 Oppdatert jsdoc

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-01-12 20:32:51 +01:00
Ken 2fedeab605 🐛 Checkbox nested i CheckboxGroup mister nå ikke padding (#2612)
* 🐛 Checkbox nested i CheckboxGroup mister nå ikke padding

* 🐛 Økt spesifisitet for checkbox i table
2024-01-12 20:30:54 +01:00
KenandHalvor Haugan b251e3f52d Ny hook useMergeRefs som erstatter mergeRefs (#2609)
* 🎨 Fjernet mergeRefs fra exponert API

* ♻️ Oppdatert bruk av mergeRefs -> useMergeRefs-hook

* Update @navikt/core/react/src/util/hooks/useMergeRefs.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2024-01-12 15:39:02 +01:00
Ken 793998faa2 📝 Eksempler for controlled switch (#2595)
* 📝 Eksempler for controlled switch

* 🔥 Fjernet console.logs

* ♻️ Mer beskrivende eksempel for controlled-value eksempel

* ♻️ Bedre praksis for switch-eksempler
2024-01-12 14:59:16 +01:00
Ken 642f188fa7 [Tag][Feature] Tags med ikon (#2611)
* 🎉 Tag har nå egen icon-prop

* 🎨 Tag.css tilpasset ikoner

* 📝 Storybook-demo for tags + ikoner

* 📝 Aksel-demo for tag

* 📝 Changeset

* 🔥 Fjernet iconPosition-prop fra tag.tsx

* 🧪 Oppdatert stories med nye props

* 🔥 Fjernet iconPosition-demo i Tag fra nettside

* 🔥 Fjernet gammel css for iconPosition right tag.tsx
2024-01-12 13:19:19 +01:00
Halvor Haugan 9297d90e91 Fikset story for HelpText (#2608) 2024-01-12 09:10:51 +01:00
KenandHalvor Haugan ef9b1201b3 🐛 Storybook html-addon brakk på grunn av prettier v3 (#2606)
* 🐛 Storybook html-addon brakk på brunn av prettier v3

* yarn lock

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2024-01-11 15:33:10 +01:00
Halvor Haugan 7bc697b515 HelpText: Justert eksempel og refaktorert type (#2607) 2024-01-11 15:16:39 +01:00
github-actions[bot]andgithub-actions[bot] a6baa67360 Version Packages (#2604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-11 12:20:57 +01:00
Ken 145ce2e5f7 Page maxWidth-token (#2572)
* 🎨 La til ny token

* 🐛 maksbredde var kalkulert feil

* 💄 CSS for max-width text

* 📝 Changeset og bedre dokumentasjon

* 🐛 Docs for max-width token

* 🎨 tailwind-støtte for ny maxWidth-token

* 🎨 rem -> px

* 📝 Dynamic padding-inline -> gutters

* ♻️ Fjernet duplikat padding-inline

* ♻️ Oppdatert token-navn fra max-width-text -> text-width-max

* 🐛 Fikset key i token-docs

* 📝 Changeset for ny token
2024-01-11 12:10:37 +01:00
Ken 557786bd51 Prettify repo (#2599)
* 🧪 Oppdatert prettierignore

* 🧪 Oppdatert prettierignore og prettier plugins

* 🎨 Workaround for prettier error i svgr https://github.com/gregberge/svgr/issues/893\#issuecomment-1806701981

* 📝 Fjernet exclude av aksel-icons/src folder for prettier

* 🐛 Tester ble ikke ekskludert av prettier

* 💄 Prettify repo
2024-01-11 12:10:28 +01:00
Ken 76eefdf8b1 UseControllableState-API (#2585)
* 🎨 Added useControllableState

* 🎨 Forbedret Accordion-api for controlled

* 🎨 Forbedret readmore-api for controlled

* 🎨 Forbedret internt expandablerow-api for controlled open

* 🎨 Forbedret tooltip-api for controlled open

* 🎨 Forbedret dropdown-api for controlled open

* 📝 La til dokumentasjon

* 📝 changeset

* 📝 Bedre kommentarer

* 🎨 Forenklet hooks

* 🎨 DefaultValue er required i useControllabeState
2024-01-11 10:05:21 +01:00
github-actions[bot]andgithub-actions[bot] 3ee714e903 Version Packages (#2602)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-10 13:38:28 +01:00
Ken ffbe5b9d31 🚑 Monthpicker Caption-hotfix (#2601)
* 🐛 MonthCaption disabled prev/next-knapper når de skulle være enabled

* 📝 changeset
2024-01-10 13:36:10 +01:00
Ken 2a999286ca ⚡ Erstattet pretty-quick med lint-staged (#2597)
* ⚡ Erstattet pretty-quick med lint-staged

* ⬇️ Bruker eldre versjon av prettier (cjs) for codemod-tester

* 🐛 Bruker nå root prettie-versjon for codemods, bruker-experimental-vm-modules for codemod-jest
2024-01-09 17:48:29 +01:00
Halvor Haugan d29672d450 Fiks lint-kommandoer i Windows (#2596) 2024-01-09 11:20:58 +01:00
KenandJulian Nymark c7817b7cde [aksel.nav.no] Merge prototype for ny god praksis inn i main (#2570)
* 🎉 Boilerplate setup god-praksis

* 🚚 Moved to parts-folder

* 🎨 Hero-layout

* ✨ Hero story

* ✨ ChipNav stories

* 🐛 Fikset overalapping svg

* 🎉 Flere hero-stories

* 🐛 Fikset cutoff i hero-svg

* 🚧 bento article cards

* 🚧 bento & grid placeholders

* 🚧 correctly make all the card grids use HGrid

* 🚧 remove css

* 🚚 Restructure gp-parts

* 🏷️ rename chipsnav

* 💄 CSS for chips-scrollbar

* 🎨 Fade-scroll chips

* 💄 v1 chips

* 🐛 chips overflow-button width

* 🐛 Fikset gp-template

* 🎉 query navigation in chips

* 🚧 groq and cards

* 🐛 Padding for chips to avoid clipping on focus

* 🎉 Oppdatert visning i sanity for undertema/innholdstype

* ⚡ Serversideprops

* 🔥 Fjernet labels fra template

* 🔥 Fjernet slug-bug

* 🚧 add slugs to cards so their links work

* ⚡ forsidequery for tema

* 🐛 Fixed missing }

* 🎨 Tema-selector

* 🏷️ rename tema-data

* 🏷️ Query and ts cleanup

* 🚧 new sticker

* 🎨 Temavisning i hero

* 🎨 dynamiske chips

* 🎨 Dynamiske innholdstyper

* 🎨 Lagt til egen gp-page context

* 🎨 Hero bruker context

* 🔥 fjernet ubrukte props

* 🎨 Context in chips

* 🐛 fixed slug-resolve

* ⚡ Cleanup in article-view

* 🎨 Dynamic view of articles

* 🐛 Fikset data-entry

* 🐛 Resolvers for preview (still buggy)

* 🐛 Fixed resolvers

* 🐛 Fixed uncaught promise error

* 🎨 Fixed resolvers

* 🎨 Story update

* 🎨 Better hasRefs

* ⚡ StaticProps for index

* ⚡ Slug bruker staticprops

* ⚡ Slug bruker staticprops, oppdatert views

* 🎉 Modal i hero-nav

* 💄 cards use breakpoints

* ⚡ Limit initial article view-count

* 🚧 wip getting chipData into chips

* 🎨 WIP pagination

* ⚡ pagination

* 🔥 Fjernet comment

* 🐛 Fikset build

* 🎨 clean queries + minor styling update to cards

* ✨ now fetches & pre-renders correct chip data for innholdstype

* 🏷️ improve types

* ✨ undertema chip data & render

* 💄 more disabled looking 0 count chips (innholdstype)

* 📝 Comments

* WIP initial load data

* 🎉 Group-articles function with tests

* 🎉 Utility to get articles based on filter

* 🎨 Initial data now sent to page

* 🎨 Now uses preloaded data when navigating

* 🎨 Hook for å lytte til queries

* 🎨 Better initial load

* 🎨 Api-fetch based on filter

* 🐛 Still getting flash of wrong cards on initial load

* 🔥 unused styles

* ⚡ Simplified lazy-loading

* 🎨 animated cards

* 🎨 Better state-updates

* 🏷️ simplified article type

* 🏷️ Simpltified tema-types

* 🏷️ simplified innholdstype

* 🏷️ Cleanup for type-use in query

* 🔥 Removed unused sanity-data

* 🔥 Removed initial articles-fetch

* 🎨 Extracted setting of initial data

* 🎨 Tags on cards

* 🎨 Dynamic grid

* 🎨 Chips now shows for page-load

* 💄 dynamic grid for articles

* 🎨 dynamisk hero

* 📝 TODO for chips

* 📝 TODOS

* ✨ add (re-add?) parentheses to chipNav

* 🎨 Updated default-grid

* 🎨 Updated cards

* 🎨 Only current undertema is shown

* 🎨 Violet tags

* 🎨 Better hover on cards

* 🎨 Hide title on no data

* 🐛 load correct data into chipNav on [slug].tsx pages

* 🐛 "alle tema" page now also has working chip data

* ♻️ restructure before "alle tema" code

* ✨ working chipNav toggle counts

* 🎨 color label & chipNav

* 🎨 ChipsGroup

* 🚚 Moved chips to chipsgroup

* 🐛 Fikset hydration mismatch mellom server/client

* 🐛 List of articles were set in wrong chipnav

* 🎨 hero styling

* 🎨 Chip-label now breaks to column at md, not sm

* 🏷️ Fixed types

* 🎨 Hide paths in production

* 🎨 Mindre refactor av hero

* 📝 added todo

* 💄 Chips-styling

* 🎨 Chips-disabled

* 🎨 Chips-styling

* 🐛 Found edgecase bug when fetching initial articles

* 🎉 Bruker line-clamp for truncate

* ♻️ Bedre CSS-navn

* ♻️ article lengths som konstanter

* ♻️ Bedre scroll ved overflow av tabs

* 🐛 hero-cube ligger nå bak tekst

* 📝 Comments

* 📝 Skrivefeil

* 🐛 imports brakk tester

* 🚚 Flyttet queries og typer

* ♻️ god-praksis api er nå versjonert

* 📝 Organsiert typer

* :tuck: Flyttet API-queries ut til felles interface

* 🎨 Preview for gp/slug

* 🎨 Preview for gp/index

* 🎨 Synket hero med figma

* 🚚 Flyttet gp-schema inn i object

* 📝 Kommentert ut temp taxonomy widget

* 🎨 Gjemmer nye sanity-felt for prod-visning

* 🔥 Fjernet gammel hero-kode

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2024-01-09 10:36:23 +01:00
Ken 5152ffa955 Update README.md 2024-01-05 14:11:17 +01:00
github-actions[bot]andgithub-actions[bot] 6c89a942d2 Version Packages (#2592)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-05 12:34:59 +01:00
Vegard HaugstvedtandKen 7a743b582f Radio component a11y fixes (#2562)
* Remove aria-invalid from individual Radio components because it is placed on the FieldSet

* Radio label and description should only be announced once with a screen reader

* Legg til mer realistiske tekster i eksempelet

* Checkbox label and description should only be announced once with a screen reader

When using multiple elements (span, etc) inside of a label, each one will be added as a screen reader "stop" and announced both as part of the label and as a separate text element.
Using this technique overrides this, to create the same experience as if the was only text inside of the label (native-like).

* Legg til mer realistiske tekster i eksempelet

* Remove aria-invalid from Checkbox and Radio, as it is redundant when we include an error message.

* Remove error message from example when we select an option

* Add error message to single description example to make it easier to test both

* Remove aria-describedby from Fieldset, because the error is connected to the input field

* 🐛 Fikset duplikat label-text funnet i tester

* Use local useId hook because of supporting React 17 and less

* Add changeset

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2024-01-05 12:31:54 +01:00
Ken 42b31a0fe9 Stylelint v16 bug (#2591)
* 🐛 esm default export -> cjs module.export

* 📝 Changeset
2024-01-05 11:56:55 +01:00
Ken a4401b8535 🏷️ Bedre typet lokal useId (#2589) 2024-01-05 11:56:38 +01:00
github-actions[bot]andgithub-actions[bot] c67d3e3d1e Version Packages (#2590)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-04 20:17:12 +01:00
Ken 1b71fe01cb ExpansionCard divider (#2566)
* ♻️ Bruker tokens internt for padding, lagt til divider

* 🎨 transition on opacity

* 📝 Changeset
2024-01-04 20:10:35 +01:00
Ken 80c48cff0b Darkreader-støtte (#2588)
* 🐛 Darkreader støtte

* 🔥 Fjernet hardkodet bg
2024-01-04 15:15:23 +01:00
Ken 9c642c4e4d 🔥 Fjernet unødvendig workflow (#2578)
* 🔥 Fjernet unødvendig workflow

* 🔥 Fjernet ubrukt e2e-script
2024-01-04 10:11:55 +01:00
Halvor Haugan 6f53780c76 Justering av fokus-eksempel på ErrorSummary (#2577) 2023-12-21 12:48:27 +01:00
github-actions[bot]andgithub-actions[bot] a4eca33cfb Version Packages (#2571)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-20 13:45:33 +01:00
Halvor Haugan 65f6074fa8 📝 Modal: Oppdatert JSDoc (#2567) 2023-12-20 09:11:36 +01:00
Halvor Haugan 9b9ddd3d70 Sandbox: allow-modals (#2569) 2023-12-18 15:35:02 +01:00
github-actions[bot]andgithub-actions[bot] 35d49df393 Version Packages (#2565)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-18 14:09:41 +01:00
Ken ef947090f3 🐛 Fikset form-submition ved lukk av datepicker-modal (#2568) 2023-12-18 13:39:03 +01:00
Ken 58682f074e :ruler: Checkbox-scaling (#2563)
* :ruler: Checkbox-scaling

* ⚡ Forenklet checkbox checkmark-scaling
2023-12-17 17:47:30 +01:00
Halvor Haugan f278588f72 Justering av eksempler på Button (#2559) 2023-12-14 14:05:39 +01:00
github-actions[bot]andgithub-actions[bot] f9276ba3ca Version Packages (#2561)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 12:18:48 +01:00
Halvor Haugan 32c90444e6 Justering av eksempler på ToggleGroup (#2552) 2023-12-13 11:50:14 +01:00
Ken 7ff93e389f 🎉 Updated icons (#2538)
* ✨ Updated icons

* 📝 changeset

* 📝 yml update

* 🐛 Fixed paperplaneIcon

* 🎨 Tag-icon
2023-12-13 10:28:42 +01:00
Ken 3de1aac4c4 🐛 Fjernet location fra fuse-config (#2547) 2023-12-13 10:20:44 +01:00
Ken 7f066a27ee 🎨 Blogg-kategori under innhold-tab i sanity (#2557) 2023-12-13 10:20:21 +01:00
github-actions[bot]andgithub-actions[bot] 180b6f7af8 Version Packages (#2560)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-13 09:42:44 +01:00
Ken e77206da1a 🎨 Token for checkmark-circle (#2558) 2023-12-13 09:28:58 +01:00
Julian Nymark d66d90b326 🔥 fjerne illustration fra 404 (#2528)
* 🐛 optimize SVG for illustration on 404 page (nginx 414)

* 🔥 remove illustration from 404 templates

* 🚀 new version of 404 template

* 🎨 remove unnecessary HGrid on 404 template post illustration removal

* 🔥 also remove the HGrid for the examples
2023-12-08 11:26:06 +01:00
Halvor Haugan 39f9bc34a9 5XX-mal: Lenker for reload og tilbake, fjern global styles (#2544) 2023-12-08 09:57:48 +01:00
Ken ba54a28f50 Text-wrap: balance på blog og god-praksis heading (#2548)
* 🎉 Text-wrap: balance on headings

* 💄 Formating
2023-12-08 09:53:43 +01:00
Ken 7b56ae3013 ⬆️ Bump vite (#2549)
* ⬆️ Bump vite

* yarn lock-sync
2023-12-07 15:19:16 +01:00
github-actions[bot]andgithub-actions[bot] 874961ff7e Version Packages (#2543)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-05 11:57:14 +01:00
Vegard Haugstvedt df48236fc8 Fix issue where clicking Combobox.FilteredOptions after scrolling caused the wrong element to be selected (#2536)
* This onBlur triggered when clicking items in FilteredOptions, causing virtual focus to be moved and the list to scroll to the top.
Then, onPointerUp, we select the new element that has scrolled into position under the cursor.

* Added changeset
2023-12-05 09:58:17 +01:00
Halvor Haugan 65cc6f425d 🐛 Modal: Hindre at elementer med sr-only posisjoneres feil (#2541) 2023-12-05 09:06:58 +01:00
Ken 2d34691450 [Chromatic] Oppdatert chromatic + bruker turbosnap (#2533)
* 🎨 Update chromatic

* Testing turbosnap

* La til config for chroamtic i workflow

* Update .storybook/main.ts

* 📝 Update readme for chromatic test
2023-12-05 08:38:38 +01:00
Halvor Haugan 094f2b1c2b [aksel.nav.no] Justeringer i CodeExamples (#2530)
Blant annet ny parameter "compact" som gjør at koden skjules som standard og forhåndsvisningen får mindre vertikal padding.
2023-12-04 12:44:02 +01:00
Halvor Haugan fb1606d771 Fiks kodeeksempel "søk" på InternalHeader 2023-12-04 10:49:29 +01:00
Halvor Haugan ab62211743 Desc på header-eksempel "brukermeny" 2023-12-04 10:32:59 +01:00
Ken c3d9735ea7 [aksel.nav.no] ✨ MVP-Struktur for ny god-praksis (#2526)
* ✨ Nytt gp oppsett

* 🎨 Better structure

* 🔥 Fjernet referenceinput

* 🎨 bedre filterering av tags

* 🚚 Flyttet gp documents

* 🏷️ rename tags -> undertema

* 🔥 fjernet comments

* 🎨 låst til dev

* 🎨 Bedre filtrering ved valg av undertema i tema

* 🎨 Oppdatert artikkelmal

* 🚚 Rename tags -> undetema

* 🎨 Staging only for admins and devs

* 🎨 opt-in visning av god-praksis felter

* 🔥 Fjernet artikkelmal

* 🚚 tsx -> ts

* Rename label -> alias, fjernet undertema fra tema

* 🚚 Endret fra dev->prod datasett for staging

* ✅ Fikset sanitizeSlug normalize

* 🎨 riktige sanity-field for artikkel

* 🐛 Fikset publicationflow for staging

* 🐛 Fikset console-warnings for API-versjon
2023-12-04 10:13:30 +01:00
Halvor Haugan 1f16bfc866 [aksel.nav.no] Justering av eksempler på InternalHeader (#2531) 2023-12-01 09:50:27 +01:00
dependabot[bot] b218be2908 ⬆️ Bump @adobe/css-tools from 4.3.1 to 4.3.2 (#2532)
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 09:12:41 +01:00
Halvor Haugan 190b9b7dba Fiks Storybook (#2529) 2023-11-30 11:36:57 +01:00
Halvor Haugan cfd0b37906 📝 Korrigering av jsdoc på ReadMore (#2527) 2023-11-29 15:23:22 +01:00
Halvor Haugan 9ed49b8a20 månede -> måned 2023-11-29 14:46:03 +01:00
Julian Nymark 39ff2c1809 🔨 new plugin for prettier (#2523)
* 🔨 new plugin for prettier

* 🔨 remove default configs
2023-11-29 14:21:05 +01:00
Halvor Haugan 4fcc83381d Oppdater eksempler på InternalHeader (#2525) 2023-11-29 14:19:27 +01:00
github-actions[bot]andgithub-actions[bot] 8c855ee0da Version Packages (#2519)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-29 11:43:20 +01:00
Ken ade35e9fba 🐛 Fikset accumulator-bug i preview (#2520) 2023-11-28 16:43:20 +01:00
Ken b9d2a65c3f [aksel.nav.no] Lokal eslint-plugin for eksempler/templates (#2522)
* 🎉 Custom eslint-regel for eksempler

* 🔥 Fjernet eslint-plugin fra changeset

* 📝 comment

* ⚡ Bruker some for boolean-check
2023-11-28 16:43:11 +01:00
Halvor Haugan 5cd1a6d86a 🐛 Popover: Ikke lukk ved klikk inni når parent er fokuserbar (#2521) 2023-11-28 16:18:40 +01:00
Halvor Haugan 1bdebfd134 Justering av kodeeksempler for Table (#2517) 2023-11-28 16:05:12 +01:00
138c4523ee Templates for 500 error pages (#2500)
* ✨ add "enkel" template for 500

* ✨ add more templates for 500 error pages

* 🎨 shuffle some templates related to 500 errors

* 📝 Oppdatert lenke

* Update aksel.nav.no/website/pages/templates/500/med-lang-en.tsx

* Update aksel.nav.no/website/pages/templates/500/uten-dekorator.tsx

* PR review comments

* Update aksel.nav.no/website/pages/templates/500/med-feil-id.tsx

* Update aksel.nav.no/website/pages/templates/500/med-cta.tsx

* Update aksel.nav.no/website/pages/templates/500/komplett.tsx

* Update aksel.nav.no/website/pages/templates/500/enkel.tsx

* 📝 Oppdatert formulering på engelsk contact-us

* 📝 la til punktum

* 🔥 Fjernet HGRID fra template

* 📝 Oppdatert lenketekster

* 📝 Oppdatert tekster for enkel-variant

* 📝 Oppdatert desc-tekster

* 🎨 Oppdatert layout for 500-sider

* 🎨 La til data-attr

* 🎨 Oppdatert lokal bruk av 500-mal

* 🐛 Fikset 500-maler

* 🧪 Tester ikke templates med playwright

* 🐛 synket engelsk-tekst på 500-maler

* Update aksel.nav.no/website/pages/500.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/_error.js

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🔥 Fjernet duplikat comment

* 🎨 oppdatert indeksering

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-11-28 15:53:05 +01:00
Ken 363d51e2c4 Page width md (#2510)
* 📝 Page width-md

* 🐛 La til med i liste over widths

* 🐛 Fikset lasting av CSS i aksel-stories
2023-11-28 15:52:42 +01:00
1079e8465a 🐛 fix templates examples (#2507)
* 🐛 fix templates examples, filter-code now throws on dubious input & output + add tests

* 🎨 convert filter-code to use string instead of code match

* 🎨 Kan nå se 404 sider i sandbox

* 🔥 Fjernet testing av templates

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-11-28 12:40:59 +01:00
Halvor Haugan 8dda59082d 🐛 Textarea: Skru av autosize ved manuell resize (#2518)
* 🐛 Textarea: Skru av autosize ved manuell resize

* typer stories

* ikke debounce resize
2023-11-28 12:30:33 +01:00
github-actions[bot]andgithub-actions[bot] 21d5ddd433 Version Packages (#2515)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-24 19:40:44 +01:00
Ken 1b7bc53294 🐛 Synket date-fns versioner i Repo 2023-11-24 18:56:08 +01:00
Lars Eirik Korsgaard Hansen 4dc5a90c72 ⬆️ upgrade date-fns version & make it minor-version agnostic (#2514)
* yarn lock

* ⬆️ upgrade date-fns version & make it minor-version agnostic
2023-11-24 11:04:24 +01:00
github-actions[bot]andgithub-actions[bot] c7694f8ddd Version Packages (#2513)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-23 14:16:48 +01:00
Ken 10bbdb730b Switch color (#2511)
* 💄 Switch er nå action

* 📝 changeset

* 🐛 Byttet fra action til action-selected
2023-11-23 13:57:06 +01:00
github-actions[bot]andgithub-actions[bot] f4458f3bb8 Version Packages (#2505)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-23 12:58:08 +01:00
Halvor Haugan 9dafbeb4eb ♿ Textarea: Forsinkelse ved live-opplesning av gjenstående tegn (#2502) 2023-11-23 12:51:57 +01:00
Halvor Haugan 4b4e190c20 Endre navn på ikon DrawingPin -> PushPin 2023-11-23 11:25:54 +01:00
Halvor Haugan b7d03bfc89 Textarea: Mulighet for å sette resize-retning (#2494) 2023-11-22 15:26:34 +01:00
Halvor Haugan bc259f5b30 Nytt ikon DrawingPin (#2503) 2023-11-22 15:21:18 +01:00
Halvor Haugan 16cad26378 ✨ Textarea: Støtte for automatisk scrollbar (#2457) 2023-11-22 15:15:32 +01:00
Ken 6ee4aa3e82 [Sanity/Aksel.nav.no] Sanity cleanup (#2499)
* ♻️ Sanity-id ut i const

* ⚡ Flyttet sanity apiVersion ut i const

* ⚡ Flyttet sanity dataset ut i const

* 🏷️ Bedre typer structure

* ⚡ La til blur på highlight-bilder

* 💄 Cube ligger nå bak innhold på bloggen

* 🔥 Fjernet gammel SEO fra sanity

* ♻️ SEO og groups import sanity

* ♻️ Ryddet opp i metadata

* 🎉 Annotering av lenker i sanity

* 🎨 Preview av kodemodul

* 🎨 Preview for dodont

* 🎨 Tips-preview

* 🎨 Relatert innhold preview

* 🔥 Fjernet console.log

* 🐛 Fikset småfeil

* 💄 Fikset darkmode-visning for preview
2023-11-22 11:47:31 +01:00
Ken bb5466178a 📝 Oppdatert typo-eksempler (#2493) 2023-11-22 10:14:05 +01:00
Ken efb92be344 🐛 Headings med space førte til wrapping av tekst (#2490) 2023-11-22 09:46:32 +01:00
KenandHalvor Haugan e3f75f542f 📝 Alert eksempler (#2492)
* 📝 Inline description i eksempler

* Update aksel.nav.no/website/pages/eksempler/alert/error.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/eksempler/alert/info.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-11-22 09:39:53 +01:00
Halvor Haugan 96610bb543 Fiks storybook:aksel 2023-11-21 13:51:43 +01:00
Ken eee7143cf6 [Aksel.nav.no] Fjernet Scrollbar gutters på eksempler (#2491)
* 🐛 Fjerner scroll-gutters fra eksempler

* 🎨 Bedre visning av breakpoints i eksempler

* ⬆️ Yarn.lock
2023-11-20 11:58:24 +01:00
Ken a1b8cc0364 📝 Oppdatert page gutters eksempel (#2496) 2023-11-20 09:15:07 +01:00
github-actions[bot]andgithub-actions[bot] e5d2f7eb8c Version Packages (#2498)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-20 09:11:39 +01:00
Håvard Stigen Andersen 67b8b6626e Gjør lukknapp i alert til type button (#2497) 2023-11-20 09:08:04 +01:00
Ken 8783f1821d [Sanity] Oppdatert til v3.20, slått på kommentarer (#2487)
* 🎨 Updated sanity and enabled comments

* ♻️ Oppdatert structure

* 🎨 Bruker native input for bedre perspective og comment støtte

* 🎨 Added presentation-mode

* ⚡ Raskere load av sider

* 🔥 Fjernet experimental features
2023-11-17 21:44:46 +01:00
Julian Nymark d52085f256 ✨ add 1440px width to playroom default widths (#2476)
* ✨ add 1440px width to playroom default widths

* 🐛 fix for routing wrt /sandbox + future fix for default widths

* 🚚 shuffle redirect check to earlier in middleware
2023-11-17 17:18:18 +01:00
Halvor Haugan 67e8565da3 Link: Oppdatert eksempler (#2479) 2023-11-17 14:51:21 +01:00
Halvor Haugan bb4ff1afc3 Justering av eksempler på ConfirmationPanel (#2489) 2023-11-17 13:37:53 +01:00
dependabot[bot] 16c0c15c67 ⬆️ Bump sharp from 0.32.5 to 0.32.6 in /aksel.nav.no/website (#2488)
Bumps [sharp](https://github.com/lovell/sharp) from 0.32.5 to 0.32.6.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.32.5...v0.32.6)

---
updated-dependencies:
- dependency-name: sharp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-17 12:54:27 +01:00
github-actions[bot]andgithub-actions[bot] f506dca7e1 Version Packages (#2485)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-17 12:53:01 +01:00
Torkjel Skjetne a44b2e2e7c Ikke rendre child som ikke er valid element i ErrorSummary (#2484)
Dette gjør det mulig å conditionally rendre barn i ErrorSummary. For eksempel kan man nå gjøre:

```
const shouldShow = false

return (
  <ErrorSummary>
    {shouldShow && <ErrorSummary.Item href="#id1">Jeg er en feilmelding, men vises ikke</ErrorSummary.Item>}
    <ErrorSummary.Item href="#id2">Jeg er en feilmelding som vises!</ErrorSummary.Item>
  </ErrorSummary>
)
```
2023-11-17 12:47:08 +01:00
Karl O d96d368e7b ♻ types for @navikt/ds-tailwind (#2486) 2023-11-17 12:46:32 +01:00
Halvor Haugan d3c0052c33 Textarea: Teller flyttet ut (#2483) 2023-11-17 11:46:07 +01:00
Ken f848bea71a [aksel.nav.no] Forside, Header og Footer bruker primitives (#2478)
* ♻️ Forside logikk cleanup

* 🎨 Page-wrapper

* ♻️ Bruker primitives på forside

* 🎨 Mer bruk av bleed

* 🎨 Footer bruker primitives

* 🎨 restrukturert header

* 🎨 Restrukturert Footer

* ♻️ Imports i footer

* ♻️ Header struktur

* ♻️ footer-struktur
2023-11-17 09:49:43 +01:00
Ken 1585106c55 [Aksel.nav.no] Fikser preview for Aksel-sider (#2481)
* WIP preview resolving

* 🐛 Fikset preview på maler med sidebar

* 🎨 Restrukturert preview-provider

* 🚚 Flyttet inn i parts

* 🎨 Bedre resolving av nested types

* 🎨 Better documentation

* 🎨 Bruker nye resolvers for preview

* 🐛 Henter nå nested data

* ✅ La til tester
2023-11-17 09:49:15 +01:00
Ken 5ed06e19fe 📝 Eksempler for Page-komponent (#2471)
* 📝 Eksempler for Page-komponent

* 🐛 Fikset import aliasing

* 📝 Refactor tekster

* 🐛 OverridableComponent fungerer nå med typeof

* 📝 changeset

* 🔥 Undo commit

* Rename belowfold.tsx to below-fold.tsx
2023-11-17 09:48:32 +01:00
github-actions[bot]andgithub-actions[bot] c0f334061b Version Packages (#2482)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-16 14:01:11 +01:00
Ken 79bddd9caa Primitives er nå mer spesifikk (#2469)
* 🐛 Mer spesifikke primitives

* 🔥 Fjernet story

* 📝 changeset

* 🎨 Oppdatert mappings
2023-11-16 11:41:31 +01:00
Ken 4a68409898 🎨 Oppdatert overridablecomponent (#2474)
* 🎨 Oppdatert overridablecomponent

* 📝 Kommentarer
2023-11-16 11:30:15 +01:00
Ken 786bff67ab 🔥 Fjernet assignees fra issue-templates 2023-11-15 13:14:59 +01:00
Ken 8a17caea6c 🐛 Fjernet TableOfContents fra bloggsider 2023-11-14 21:06:33 +01:00
Ken 3f43d0bf3b 🐛 Kjører nå ikke playroom build ved boot 2023-11-14 20:29:29 +01:00
Ken 26541984ac [aksel.nav.no] Sidebar & TableOfContents refactor (#2470)
* 🎨 toc setup

* 🎉 Implementert TOC-generering

* 💄 Nytt design på Toc

* 🎨 forenklet toc-styling

* 🎨 Scroll ved overflow

* 🎨 Bruker ny TOC på aksel

* 🐛 Bedre word-wrap

* 💄 Shadow on toc

* 🐛 Fikset fokusmarkering

* :trukket ut generateSidebar funksjon

* 🧪 tester for sidebar-generering

* 💄 Bedre design på toc

* 🎨 Mindre refactor av TOC

* 🎉 Ny sidebar

* 🎨 Oppdatert bruk av sidebar

* 🐛 Oppdatert sidebar-story

* 💄 Justert sidebar

* 💄 Indent på toc

* 💄 Hide scrollbar on toc

* 🎨 scrollfade toc

* ♻️ Flyttet scrollfade ut i egen komponent

* 💄 Smoother scroll-fade

* ⚡ Færre state-updates i toc

* 🎨 data atrrb for css

* 🎨 data-attrb i sidebar

* ⚡ Mindre css dom updates

* 🎨 Fjerner emojies fra toc

* 🎨 automatisk scroll-top

* 🎨 Next-link for sidebar

* 🎨 Toggle toc-button onClick

* 🐛 Fikset scroll-padding

* 🐛 Fikset fokushåndering av toc

* 🎨 Mindre tydelig fade for firefox

* 🔥 Fjernet console.log

* 🐛 Fikset recalculation ved page-change

* 🐛 Reversert til next 13.2.1
2023-11-14 20:10:42 +01:00
Julian NymarkandKen 10303602aa playroom (#2413)
* 🚧 playroom

testing it out, needs yarn run playroom:build before yarn dev (in aksel.nav.no)

* 🚧 width and height for iframe

* 🚚 move playroom into its own module

* 🚧

* 🐛 Fikset lasting av ts-filer

* build playroom & copy dist to public/

* 🚧 yarn maintenance

* 🚧 build the playroom before copy

* ✨ now examples might work in the sandbox? maybe 90% of them?!

* ✨ + 🔥 + ♻️

- remove route for /sandbox, in public/ means it gets served regardless?
- for each code example:
   - use jscodeshift to remove imports
   - also transpile to ESNext
- bump jscodeshift to 0.15.1 (for all uses)
- the sandbox button now sends you to /sandbox/index.html

* :refactor: j -> parse

* add non-ideal string replacer to make Examples work in Playroom

* ♻️ bring back CodeSandox link as fallback

* 🚚 Sandbox -> parts/Sandbox

* 🚚🚚 Sandbox -> parts/Sandbox

* seemingly working smoke tests for all sandbox examples

* ♻️ shuffle example code to work well with playroom

* ♻️ shuffle example code to work in sandbox (again)

* update sanity eksempler, do base64 url code work there

* PR comment fixes

* 📝 Sanity-schema for sandbox-snippets

* 🚚 generic cubeIcon -> codesandboxLogo

* 🔥 unused prop

* ♻️ do not run all tests in smoketest

* 🐛 pr comment fixes

* PR comment fixes, remove unneeded domcontentloaded await in tests

* ♻️ restructure so <Example> comes first

* 🐛 sandbox tests now for templates and examples

* 🐛 Fikset imports

* 🐛 disable some sandbox tests (for templates)

* 🐛 forgot to disable one template test

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-11-13 15:12:52 +01:00
Ken 42254543d8 [aksel.nav.no] ♻️ Ryddet opp i imports, kodestruktur og ubrukte configs/moduler (#2465)
* 🚚 Oppdatert layout exports

* ⚡ Nextjs-config kan nå bruke webpack-builder

* 🐛 reverserte til gammel image-config i next.config

* 🚚 Oppdaterte assets exports

* 🚚 Fjernet barrel-exports av komponenter

* 🚚 Flyttet types

* 🚚 Flyttet sanityblock og withpreview

* 🚚 Flyttet styles inn i components

* ♻️ Forenklet jest-config

* 🚚 Flyttet logger

* ⚡ Kjører nå ikke middleware på alle side

* ♻️ next config analyze setup

* 🔥 fjernet getdocumentstmp

* 🔥 Fjernet getAkselDocuments

* 🎨 Forenklet imagebuilder

* ♻️ Fjernet ubrukte tailwind configs

* 🎨 Grupperer changelog med minor

* 🔥 Fjernet duplicate changelog

* 🎨 Ny ts alias

* ♻️ Refactor av utils dir

* ♻️ Header er nå default export

* ♻️ Byttet ut deprecated ingress med bodylong

* ♻️ Oppdatert assets export/imports

* ♻️ Oppdatert website/sanity imports

* 🐛 henter ut logger i dockerfile

* ⚡ Enda mer filtrering i middleware

* 🐛 Riktig generering av sider for e2e-sider

* 🐛 Fikset import i codeexamples update

* 🐛 la til mønster og maler i hamburgermeny
2023-11-10 18:44:42 +01:00
Ken 81c84e4817 📝 Liten M i Maler 2023-11-10 14:51:10 +01:00
Ken b441175028 📝 Oppdatert readme 2023-11-10 14:00:21 +01:00
dependabot[bot] 75362a0dc1 ⬆️ Bump axios from 1.3.6 to 1.6.0 in /@navikt/aksel (#2467)
Bumps [axios](https://github.com/axios/axios) from 1.3.6 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.3.6...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-10 11:12:38 +01:00
Ken d8732ffa0e 🎉 Lagt til Mønster og Maler i header 2023-11-10 10:58:16 +01:00
github-actions[bot]andgithub-actions[bot] 0ea9155085 Version Packages (#2466)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-10 10:40:12 +01:00
Ken 92b9687ed1 Håndterer target-detection bedre i ExpandableRow (#2461)
* 🎨 Håndterer nå target-detection bedre

* 🎨 Forenklet if-tester, tester 2x nested elementer
2023-11-10 10:36:34 +01:00
Ken 1c022b14c9 🎨 Lagt til closeOnBackdropClick for mobilmeny på Aksel 2023-11-08 21:16:17 +01:00
Ken abdeb616d2 🎨 Fikste søk + codeexamples for templates (#2462) 2023-11-08 20:41:47 +01:00
github-actions[bot]andgithub-actions[bot] 37165e9f38 Version Packages (#2459)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-08 16:24:10 +01:00
KenandHalvor Haugan d19920ca78 [aksel.nav.no] 404 template (#2455)
* ✨ Initial template

* 💄 Automatisk skalert svg

* 🎉 Maler v1

* 📝 Bedre endringslogg

* Update aksel.nav.no/website/pages/templates/404/complete.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update aksel.nav.no/website/pages/templates/404/complete.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 📝 Bedre kommentarer

* 📝 rename stories

* ♻️ Bruker nå page

* 🎨 Oppdatert mal med endringer

* 🎨 Bruker 404-mal på Aksel

* :trucK: Flyttet data-atributt

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-11-08 15:23:15 +01:00
Ken 60d3481300 [Primitives] Page-primitive (#2456)
* ✨ Frame-component

* 🏷️ rename to page

* 🎨 Belowfold

* 🎨 Gutters

* 🎨 Fjernet content width

* 🎨 Page-stories

* 📝 Config

* 📝 changeset

* 📝 Bedre props

* ♻️ Ryddet opp i CSS og prop-navn

* ♻️ Tokens for padding-verdier

* ♻️ Bedre background example

* ♻️ Bedre contentblockpadding example

* ♻️ Bedre gutters example

* 🔥 Fjernet dekoratør-story fra chromatic

* 🐛 Riktig page-padding

* 💄 Justert maksbredder

* 📝 kommentarer

* 📝 JSDoc

* 📝 jsdoc update

* 📝 Kommentarer
2023-11-08 12:14:35 +01:00
Halvor Haugan f486937439 ⬆️ Storybook 7.5.3 (#2458) 2023-11-08 09:12:00 +01:00
Halvor Haugan c62058abc1 🚨 eslint: sjekk avhengighetssykluser når i CI (#2430) 2023-11-07 14:29:51 +01:00
Halvor Haugan 84d9b8260f Fiks typo i timeline eksempel desc 2023-11-07 13:56:58 +01:00
Halvor Haugan c108063dcb Justering av eksempler på Timeline (#2454) 2023-11-06 08:55:31 +01:00
Ken 2a8533ad56 [aksel.nav.no] Templates vises nå riktig på mønster/mal-sider (#2450)
* 🐛 Fikset visning av templates

* 🐛 autoGenerateArrayKeys fungerte ikke for nested arrays

* 🐛 Fikset tester
2023-11-03 12:18:38 +01:00
KenandAnders Olsen Sandvik 9b990a2178 [aksel.nav.no] Legg til RSS feed på produktbloggen (#2439) (#2453)
* [aksel.nav.no] Legg til RSS feed på produktbloggen

* Adjust generateRssFeed to accept a path parameter

* 🎉 Oppdatert generering av rss

---------

Co-authored-by: Anders Olsen Sandvik <github@mlsv.no>
2023-11-03 10:26:35 +01:00
github-actions[bot]andgithub-actions[bot] 5fec1f24f4 Version Packages (#2452)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-02 22:03:10 +01:00
Halvor Haugan c27c1cfe26 🐛 Datepicker lukker ikke lenger modalen den er i (#2451) 2023-11-02 21:59:06 +01:00
Ken 5a649d2282 🐛 Kunne ikke se preview av mønster forside (#2449) 2023-11-02 15:11:34 +01:00
Ken baac9cc251 [aksel.nav.no] Sidemaler for Mønster og maler (#2438)
* 🎉 Sanity-schema for mønster og maler

* 🎨 La til mønster og maler i sanity structure

* 🎨 Støtte for templates i søk

* 🎨 Sidemaler for Mønster og Maler

* 🎨 Riktig håndtering av breadcrumbs

* 🐛 Fikset story

* 🐛 Fikset search-indeksering

* 🐛 Fikset search-test

* 🐛 Fikset typo

* [aksel.nav.no] Refaktorert synking av eksempler/templates mellom kode og sanity (#2442)

* 🎨 Template pages

* 🔥 Fjernet templates fra logging

* ♻️ Refaktorert example-generering

* ✅ extractArgs tests

* ✅ filter-code tester

* ✅ Ny code-parsing tester

* 🚚 Flyttet filer

* 🎨 Oppdaterer sanity remote

* 🎨 sanity schema for templates

* 🎨 Schema for metadata in templates

* 🎨 henter nå ut metadata fra templates

* 🎨 Flyttet createId funksjon

* 🚚 rename folder

* 🎨 schema for templates i sanity

* 🐛 Fjernet dryrun fra oppdatering

* 🎨 Make sure to delete old documents after updating

* 🐛 Riktige typer for version-schema

* [aksel.nav.no] Integrert mønster og maler templates inn på aksel (#2447)

* 🎨 Template pages

* 🔥 Fjernet templates fra logging

* ♻️ Refaktorert example-generering

* ✅ extractArgs tests

* ✅ filter-code tester

* ✅ Ny code-parsing tester

* 🚚 Flyttet filer

* 🎨 Oppdaterer sanity remote

* 🎨 sanity schema for templates

* 🎨 Schema for metadata in templates

* 🎨 henter nå ut metadata fra templates

* 🎨 Flyttet createId funksjon

* 🚚 rename folder

* 🎨 schema for templates i sanity

* 🐛 Fjernet dryrun fra oppdatering

* 🎨 Make sure to delete old documents after updating

* 🐛 Riktige typer for version-schema

* 🎨 Kan nå vise eksempler på side

* 🎨 Automatisk visning av changelog

* 📝 typo

* 📝 Rename fra changelog til Endringer

* 🐛 Fikset story-typer

* 🎨 Forsideblokk for templates

* 🐛 feil riktekst ble brukt
2023-11-02 11:47:57 +01:00
Sjur d924d523e4 Update in-the-wild.yml (#2448)
Tok bort "assignees"
2023-11-02 10:38:51 +01:00
Sjur fc5a77081d Create in-the-wild.yml (#2445)
Issue template for å ta imot eksempler fra folk
2023-11-02 10:01:49 +01:00
github-actions[bot]andgithub-actions[bot] 1f3477a3e9 Version Packages (#2446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-02 09:55:38 +01:00
Halvor Haugan 925450cb73 💄 Modal: Bedre håndtering av mobiler i landskapsmodus (#2444) 2023-11-02 09:30:19 +01:00
github-actions[bot]andgithub-actions[bot] 534a6a3b40 Version Packages (#2443)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-01 15:46:41 +01:00
51eee7f011 [Datepicker/Modal] Datepicker bruker nå Modal på mobil og for nested Modal (#2419)
* 🎨 Initial Modal-update

* 🐛 close(open handling for Modal

* 🔥 Fjernet openOnFocus

* 🔥 Fjernet outsideclick og useEscape

* 🐛 monthpicker onClose forwarding

* 🎨 Flyttet DateInput til egen parts-mappe

* 🏷️ DateInput imports

* 🚚 Flyttet DateWrapper ut til egen komponent

* 🎨 Monthpicker bruker dateWrapper

* 💄 Oppdatert styling for datepicker

* 📝 Oppdatert eksempler

* 📝 changeset

* 🐛 Fikset imports i date-hooks

* ♻️ Bedre context-bruk i Modal.tsx

* 📝 Bedre tekster for deprecation

* 🐛 Støtter nå jsdom

* 🐛 Fikset polyfill av datepicker

* 🎨 closeOnBackdropClick i datepicker

* 🏷️ 🐛 Fikset outsideClick boundary + fjernet bubbleEscape-prop

* 🔥 Fjernet console.log

* 🔥 Fjernet bubbleEscape-prop

* Update @navikt/core/react/src/date/hooks/useMonthPicker.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/date/datepicker/datepicker.stories.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🎨 Bedre className for nested modal

* 🐛 Bedre check om popover er i datepicker

* 🔥 Fjernet unødvendig if rundt window-check

* 🎨 Bedre fallback for useMedia-hook

* 🎨 bedre navn i useMedia

* 📝 Datepicker-stories for size har preset-values

* Update @navikt/core/react/src/date/hooks/useDatepicker.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🎨 DateContext er nå default null hvis ikke satt

* Update @navikt/core/react/src/date/parts/DateWrapper.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/date/parts/DateWrapper.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/date/parts/DateWrapper.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* Update @navikt/core/react/src/date/utils/labels.ts

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

* 🐛 Fikset small-size padding

* 🔥 Fjernet error-demo

* fokusgreier

* 🎨 bedre onClose-handling av modal

* 🐛 Håndterer focus ved cancel og select nå

* 🐛 Feil i typer for dateinput

* 🐛 setAnchorRef var optional

* 🐛 null-test

* 🎨 Fjernet jsdom sjekk tester for useMedia

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2023-11-01 15:38:57 +01:00
Vegard Haugstvedt 909ae6aed1 Add new useVirtualFocus hook, for use in Combobox (#2394)
* Add new useVirtualFocus hook, for use in Combobox. Might be useful for other components later, but will scope it for Combobox at first.

* Create filteredOptionsUtils, which has utiltity functions for creating IDs and for text lookups in lists.

* Get rid of data-value, and use filteredOptionsMap to look up the value of the currently (virtually) focused element instead

This allows use of e.g. numbers as options, which data-value didn't.

* Using useState instead of useRef to handle filteredOptionsRef

* Added changeset

* Force option id to be lower case, to avoid different casing from being interpreted as being different from the existing options

* Fix bug where it was not possible to select multiple custom (new) options in a multiselect

selectedOptionsContext is not available inside customOptionsContext, so need to take isMultiSelect from props instead

* Switch to use toLocalLowerCase and remove uneccessary use of string literal

* type mismatch

* Clean up types - reuse from ComboboxProps type definition, and fix resulting type mismatches

* Rename filteredOptionsRef variable returned from filteredOptionsContext to reflect that it is now actually a setState-function

* Expose virtualFocus as an object through filteredOptionsContext, instead of each separate method.

Done to remove need to wrap moveFocusUp and moveFocusDown in order to toggle isListOpen
2023-11-01 12:02:57 +01:00
Lars Eirik Korsgaard Hansen cd3859a91e 📝 add aria roles example to Alert (#2440) 2023-11-01 09:16:42 +01:00
Ken 338f14e7ac [aksel.nav.no] Refaktorert ErrorBoundary-bruk for fast-refresh (#2433)
* ♻️ errorboundary refactor

* ♻️ Converted to non-anonymous function errorboundary

* ♻️ Fikset ErrorBoundary Full-refresh

* [aksel.nav.no] ♻️ Component-structure (#2435)

* 🔥 Fjernet UUFeedback-modul

* 🚚 Flyttet filer i egne mapper

* 🚚 Oppdatert struktur for sanity-moduler

* 🚚 Oppdatert akselcube exports

* 🔥 Fjernet Feedback-modul

* 🚚 Rename SuggestionBlock

* 🚚 Flyttet relatert innhold

* 🐛 Fikset suggestionblock imports

* 🎨 Oppdatert bruk av ShowMore
2023-10-30 15:42:35 +01:00
Halvor Haugan aed1d082c3 🐛 Legg på onClose på Popover-eksempler (#2436) 2023-10-30 12:36:47 +01:00
Ken 31e9226b55 [Aksel.nav.no] Bruker alpha ShowMore lokalt på nettsiden (#2409)
* 📝 Story for TokenTable

* ✨ Tester lokal alpha-showmore på Aksel

* 🎨 Showmore brukes nå bare når det er over 10 tokens i listen

* 📝 yarn lock
2023-10-30 12:10:16 +01:00
github-actions[bot]andgithub-actions[bot] fe15b4d275 Version Packages (#2414)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-30 10:57:37 +01:00
Halvor Haugan 28e095d5a2 Oppdater eksemplene på Popover (#2425) 2023-10-30 10:21:17 +01:00
dependabot[bot] 43377841ba ⬆️ Bump browserify-sign from 4.2.1 to 4.2.2 (#2434)
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-30 09:16:59 +01:00
Ken 2976ee9626 🐛 Bugfix routing i sidebar/eksempler (#2432) 2023-10-27 18:49:32 +02:00
Ken 23c135b437 🐛 Fikset lasting av toc (#2421) 2023-10-27 15:59:13 +02:00
Halvor Haugan 7f0498f250 🐛 Oppdater eksemplene på Loader (#2431) 2023-10-27 12:52:17 +02:00
Halvor Haugan 5075c8d0a6 ✨ Modal: Støtte for å lukke ved klikk utenfor (#2386) 2023-10-27 12:47:47 +02:00
Ken 792eeaba42 🐛 Fikset dom-validering av Accordion (#2426) 2023-10-27 12:36:45 +02:00
Halvor Haugan 0c7fc04935 🐛 Modal: Bedre støtte for Tooltip i Modal (#2429) 2023-10-27 10:47:24 +02:00
Halvor Haugan 0bb339e54a [aksel.nav.no] Legg til tittel på RelatertInnhold-modulen (#2423) 2023-10-25 16:51:40 +02:00
Halvor Haugan f5eb3adaea [aksel.nav.no] Få CodeSandbox til å fungere med TS (#2424) 2023-10-25 16:33:07 +02:00
Ken 77cf71f814 🐛 Tester fix for internlenker til anchors (#2420) 2023-10-25 15:07:07 +02:00
Vegard Haugstvedt f8c12b0757 Autocomplete should keep upper-/lowercase from the word being autocompleted (#2207)
* AutoComplete should keep upper-/lowercase from the word being autocompleted

* Fix issue where autocomplete doesn't format the casing of the last character in the word

* Added changeset

* Append the autocompleted text in the same casing used in the list, but preserve casing for the typed characters

* Preserve casing used while typing, then use the casing from the options when selecting a value

* Added custom options to test of casing when typing

* Correct changeset

* When allowNewValues is enabled, we should use the new value as is when pressing Enter, instead of using the first FilteredOption

* Change test case to use a partial match for a word in options. This tests both that we will use "add new" option if available and that we preserve casing for new options
2023-10-24 07:50:50 +02:00
Ken be8265e13e 🐛 Fikset versjon av nextjs (#2410) 2023-10-23 13:12:40 +02:00
Halvor Haugan 0c7d6fb461 Fiks shadowdom-eksempel (#2392) 2023-10-23 11:42:00 +02:00
Julian Nymark b97ac03c5a 🚧 test if this branch builds (#2368)
* 🚧 test if this branch builds

* ♻️ css -> types

* ♻️ remove double module imports
2023-10-23 10:07:54 +02:00
github-actions[bot]andgithub-actions[bot] 0ddb589138 Version Packages (#2408)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-20 17:18:00 +02:00
Ken 1440c99b96 [aksel.nav.no] 📝 Story for Table i aksel (#2406)
* 📝 Story for Table i aksel

* ♻️ Trukket args ut
2023-10-20 17:02:34 +02:00
Ken f8cf39c906 [aksel.nav.no] Lagt til muligheten til å ikke ha "Send innspill" modul på komponent-artikler (#2407)
* 🎨 Oversikt blir nå sortert basert på index

* 🎨 Kan nå skjule send innspill modul
2023-10-20 16:30:50 +02:00
Ken 158c032436 [aksel.nav.no] Refactor av amplitude-logging (#2396)
* ♻️ Refaktorert logging

* ♻️ Refaktorert logging

* 🔥 No need to lazyload hotjar

* 🐛 Sjekker nå produrl riktig

* ♻️ Bedre import/export av logging

* ✨ Batching evets logged pre-init

* ♻️ Cleanup av amplitude bruk
2023-10-20 16:05:38 +02:00
Halvor Haugan 6d6e6443dd 💄 Chips.Toggle: Ikon i uvalgt tilstand (#2395) 2023-10-20 15:54:05 +02:00
Ken e12ea8694e ✨ Monthpicker eksempel og bug (#2404) 2023-10-20 12:44:28 +02:00
github-actions[bot]andgithub-actions[bot] 2d4cb67643 Version Packages (#2403)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-20 10:52:13 +02:00
Ken f5533766c8 📝 Oppdatert link og linkpanel med nextjs eksempler 2023-10-20 10:28:24 +02:00
Ken 3d1b0ac204 🎨 Forms-border har nå outside shadow for background-bleed (#2388) 2023-10-20 09:21:42 +02:00
Ken a1678d3b19 🐛 Loader hadde legacyRef som ref-prop (#2391)
* 🐛 Loader hadde legacyRef som ref-prop

* Update .changeset/heavy-shoes-pay.md
2023-10-20 09:17:39 +02:00
github-actions[bot]andgithub-actions[bot] 7007d3c58e Version Packages (#2401)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-19 19:56:13 +02:00
Ken 8524346044 🐛 Modal + Popover fix (#2400)
* 🧪 SB-demo

* 🐛 Datepicker-popover vises ikke ritkig i Modal

* 📝 Modal + datepicker demo
2023-10-19 19:52:06 +02:00
Ken d5d8898659 🐛 Riktig CSP for hotjar 2023-10-19 18:28:24 +02:00
Ken 1d635e1dbd ⬇️ reverted til gammel nextjs-versjon (#2393) 2023-10-18 15:57:07 +02:00
Ken 6b3932b172 [aksel.nav.no] 📝 Oppdatert eksempler for Bleed og show/hide (#2385)
* 📝 Oppdatert eksempler for Bleed og show/hide

* ♻️ Refactor wrapper rundt bleed-eksempler
2023-10-18 12:50:12 +02:00
Ken 4d6ae1ae42 [aksel.nav.no] 🐛 Fikset next error ved redeploy av app (#2387)
* 🐛 Fikset next error ved redeploy av app

* 🎨 synket next-versjoner
2023-10-18 11:11:52 +02:00
github-actions[bot]andgithub-actions[bot] 6c29fa83dd Version Packages (#2381)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-17 16:30:38 +02:00
Ken a6b6733861 🎨 Mindre Helptext variant (#2376)
* 🎨 Mindre Helptext variant

* 🎨 small-variant er nå default helptext

* 💄 Larger helptext circle stroke-width

* Update .changeset/wild-rice-arrive.md
2023-10-17 16:23:14 +02:00
Halvor Haugan 3e54bd4f43 Ny eslint-regel no-shadow (#2377) 2023-10-17 16:05:22 +02:00
Mathias S. MüllerandKen ec205fbc5f 🐛 Fiks skrivefeil på size-klasse på form-komponenter (#2372)
* Fiks skrivefeil på size-klasse på select-komponent

* Fiks skrivefeil på size-klasse på form-komponenter

* 📝 changeset

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-10-17 15:11:41 +02:00
Ken d8a4097c82 💄 Endring av tekstfarge endrer også chevron nå (#2383) 2023-10-17 14:55:53 +02:00
KenandHalvor Haugan 3a3a53f823 [Aksel.nav.no] Nextjs logging av getStaticProps (#2384)
* 🎨 Caching in dev

* 🎨 Logging getstaticprops

* 🐛 Endret tilbake til gammel caching

* Update aksel.nav.no/website/pages/komponenter/index.tsx

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-10-17 13:09:02 +02:00
Halvor Haugan 3d3e907608 Ny spacing token på 0.375rem (#2370) 2023-10-17 09:13:39 +02:00
Ken 986d0e9740 [aksel.nav.no] ⬆️ Oppdatert sanity (#2379)
* ⬆️ Oppdatert sanity

* ⬆️ yarnlock
2023-10-16 18:58:28 +02:00
dependabot[bot] 50bb7d4ff8 ⬆️ Bump @babel/traverse from 7.23.0 to 7.23.2 (#2380)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.23.0 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 18:51:53 +02:00
github-actions[bot]andgithub-actions[bot] c2151e0514 Version Packages (#2378)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-16 16:19:27 +02:00
Ken 4bc4dea85f 🐛 Fikset tastaturnavigasjon i monthpicker (#2374) 2023-10-16 14:33:23 +02:00
github-actions[bot]andgithub-actions[bot] 6b2547cec5 Version Packages (#2375)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-16 11:20:56 +02:00
Ken 5d4a46d1a8 [aksel.nav.no] Added hotjar (#2362)
* 🔊 Added hotjar

* ⬆️ Bump yarn lock
2023-10-16 10:29:40 +02:00
Ken cb8c7cabee 🐛 Fikset hover på radio ved bruk av readonly (#2363) 2023-10-16 09:36:11 +02:00
github-actions[bot]andgithub-actions[bot] 7d675373bf Version Packages (#2364)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-13 10:10:20 +02:00
Ken e49b7ec875 Ryddet opp i sirkulære dependencies (#2366)
* ✨ Boilerplate

* 🎨 Testbuild

* ♻️ Bedre exports av utils

* ♻️ Update imports

* ♻️ Fikset root imports

* 🎨 Hide examples from workspace

* 🔥 Fjernet next appdir

* 🔥 Fjernet npm exports

* 🎨 Fikset default export av Select

* 🎨 Datepicker dependencies

* 🎨 Monthpicker deps

* 🎨 Monthpicker deps

* 🎨 Dropdown deps

* 🎨 Expansioncard context

* 🎨 Checkbox types

* 🎨 Radio types

* 🎨 Form props

* 🎨 List deps

* 🎨 Modal deps

* 🎨 Stepper deps

* 🎨 Table types

* 🎨 Tabs deps

* 🎨 ToggleGroup context

* 🐛 Fikset useMonthpicker import

* 🔥 Fjernet shadow-dom example fra changeset config

* 📝 Changeset

* 🎨 Ryddet opp i sirkulære depdendencies

* 🔥 Fjernet composeEventHandlers

* 🎨 Oppdatert yarn lockfile
2023-10-13 10:06:34 +02:00
Ken c8cac2eafb 🔥 Fjernet changeset for annen PR 2023-10-12 09:20:36 +02:00
Halvor Haugan 99fca2a566 Nye ikoner ChevronLeftFirstCircle og ChevronRightLastCircle (#2365) 2023-10-12 09:13:55 +02:00
Ken aa7f8ba1f8 📝 changeset 2023-10-11 21:55:54 +02:00
Halvor Haugan 70c5affbd3 💄 CopyButton: Justert padding, gap og animasjon (#2355) 2023-10-11 15:36:29 +02:00
KenandHalvor Haugan d88a0c8aef [Aksel.nav.no] Fikser bug i _id-generering for props-tabeller (#2361)
* 🎨 Oppdatert prop-dokumentasjon

* 🎨 Oppdatert prop-dokumentering

* 📝 Bedre tekster

* support .env.local and fix typo

* 🔥 Fjernet dryrun

* fix type in List

* 🎨 Bedre håndtering av error

* 🎨 Bedre preview av props når de blir referert til

* 📝 La til throw error

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
2023-10-11 13:46:26 +02:00
github-actions[bot]andgithub-actions[bot] dfd04f3ed7 Version Packages (#2360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-10 14:17:55 +02:00
Ken a2d915cab9 🐛 Fikset yarn.lock dependency mismatch 2023-10-10 13:58:30 +02:00
Ken e77568f58f 🎨 Popover legger seg nå ikke over Input i Datepicker (#2349)
* 🎨 Popover legger seg nå ikke over Input i Datepicker

* Update .changeset/eighty-pants-switch.md

* 📝 Yarn sync

* 📝 Yarn sync
2023-10-10 13:30:54 +02:00
Ken fcbf6eada5 🎨 Fikset h2 bruk på nettsiden (#2350) 2023-10-10 10:47:34 +02:00
dependabot[bot]andKen 732a0491ea ⬆️ Bump postcss from 8.4.27 to 8.4.31 (#2348)
* ⬆️ Bump postcss from 8.4.27 to 8.4.31

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🔧 Yarn lock synk

* ⬆️ Bump website postcss

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-10-09 14:52:44 +02:00
github-actions[bot]andgithub-actions[bot] 47984db6b1 Version Packages (#2357)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-09 10:30:54 +02:00
Halvor Haugan 4550973536 💄 DatePicker: Litt smalere inputfelt (#2354) 2023-10-09 08:47:02 +02:00
Ken 044aa09bc5 🐛 Fjernet breadcrumbs når artikkel ble referert fra god-praksis/artikler 2023-10-07 14:18:34 +02:00
github-actions[bot]andgithub-actions[bot] 362c6d4116 Version Packages (#2347)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 10:11:28 +02:00
github-actions[bot]andgithub-actions[bot] 1e77da3039 Version Packages (#2346)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 10:04:42 +02:00
Halvor Haugan 66ec09581c 🐛 Modal: Sett riktig tekstfarge (#2340) 2023-10-05 10:02:58 +02:00
Andreas Nordahl 0f3066d87a Use literal ds-token types (#2342)
* change quotes to allow literal ds-token types

* revert unneeded css changes

* remove prettier script

* move outputStringLiterals config
2023-10-05 10:00:55 +02:00
Halvor Haugan ffd5470332 🧑‍💻 Ny eslint-regel "array-callback-return" (#2335) 2023-10-02 14:45:29 +02:00
Ken e9b98bb43c 🐛 Fikset validering av valideringsmelding for sanitybrukere 2023-09-28 16:22:11 +02:00
github-actions[bot]andgithub-actions[bot] cf8572074c Version Packages (#2339)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-28 15:47:30 +02:00
Vegard Haugstvedt 05e63c13af Added aria-hidden to AccordionContent when closed (#2338)
* Added aria-hidden to AccordionContent when closed

Fixes bug where label text for Radio components is sometimes left out of the accessibility tree when being hidden/displayed by an Accordion
Ref: https://nav-it.slack.com/archives/C7NE7A8UF/p1695723000232659

* Added changeset

* Add a Storybook-example to be able to test this bug
2023-09-28 15:34:38 +02:00
Halvor Haugan 1178e96497 🧑‍💻 Ny eslint-regel "object-shorthand" (#2336) 2023-09-28 15:26:40 +02:00
github-actions[bot]andgithub-actions[bot] 18ab01f457 Version Packages (#2283)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-27 16:08:14 +02:00
Julian Nymark 98f87294f2 Primitives bleed (#2331)
* ✨ add Bleed

* 🚧 WIP on Bleed

* 🚧 fix the weirdness of margin-block-end by adding padding

* 🚧 wip for bleed calculation of "full"

* Bleed working "full" horizontal margin

* 🚧 wip on reflectivePadding

* 🚧 wip breakpoints for bleed reflectivePadding

* working reflectivePadding

* 📝 add jsdoc

* ♻️ refactor css.ts

* ♻️ refactor style for Bleed

* improve jsdoc, remove unused CSS

* 📝 fix docs for px story

* ✨ add asChild prop

* 📝 add changeset

* 📝 add jsdoc

* ♻️ refactor stories

* 📝 fix erroneous story text

* export bleed from barrel file

* 📝 add eksempler docs
2023-09-27 15:55:37 +02:00
Ken 0295c9cbfc 🐛 Fikset issue-url 2023-09-27 15:05:41 +02:00
Ken 3efbdf578e 🔥 Fjernet bruker fra automatisk issue-assign (#2333) 2023-09-27 14:38:37 +02:00
Halvor Haugan d1801a77c0 🐛 Box: sett border-radius riktig (#2329) 2023-09-27 09:19:57 +02:00
Halvor Haugan bb09ce2af0 "Getting started" som startside i Storybook (#2330) 2023-09-27 09:18:33 +02:00
KenandHalvor Haugan d426a9471b [Ikoner] Bedre SVG-export (#2300)
* 🎨 script for svg-parsing

* 🐛 Fikset buffer av readFileScript

* 🧪 Parse-svg test

* 📝 changeset

* 🔥 forenklet svg i tester

* 🔥 Fjernet svg-parser fra yarn.lock

* 🐛 Tryggere svg-parsing

* 🎨 Kjører nå ikke main-script i tester

* Update @navikt/aksel-icons/config/parse-svg.js

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>

---------

Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-09-26 16:52:30 +02:00
KenandJulian Nymark 2aa3cd56ff Datepicker figma-synk + week oppdatering (#2311)
* 🎨 Standalone-demo

* 💄 Caption order

* 🎨 Datepicker-button default sizes

* 💄 Button-sizes

* 🎨 Weeknumber

* ✨ add AsChild to show/hide

* 🎨 clickable week

* 🎨 Table-code for header

* 💄 Stylet weekPicker

* 🚚 Flyttet parts

* 🚚 Flyttet parts og dokumentert src

* 🎨 fixedWeeks er nå default false på standalone

* 🏷️ Types for onWeekDayClick

* 🎨 WeekDayClick demo

* 🎨 Bedre skjermleserstøtte for ukerad

* 🎨 Weekdayclick only on multiple mode

* 🎨 Monthpicker button size

* 📝 changeset

* Update @navikt/core/react/src/date/datepicker/parts/Row.tsx

* Update @navikt/core/react/src/date/utils/labels.ts

* 🐛 Riktig warning ved bruk av feil mode

* 🎨 Riktige parts i standalone og vanlig versjon

* 🎨 fjernet onWeekNumberClick for riktig mode

* ♿ Bedre labels for next/preview knapper

* 🏷️ Oppdatert types

* 📝 Minor-update for datepicker + weekNumberClick

* ♻️ EventHandling for datepicker

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
2023-09-26 15:49:47 +02:00
Julian Nymark 6535c227c5 ✨ add Bleed (#2278)
* ✨ add Bleed

* 🚧 WIP on Bleed

* 🚧 fix the weirdness of margin-block-end by adding padding

* 🚧 wip for bleed calculation of "full"

* Bleed working "full" horizontal margin

* 🚧 wip on reflectivePadding

* 🚧 wip breakpoints for bleed reflectivePadding

* working reflectivePadding

* 📝 add jsdoc

* ♻️ refactor css.ts

* ♻️ refactor style for Bleed

* improve jsdoc, remove unused CSS

* 📝 fix docs for px story

* ✨ add asChild prop

* 📝 add changeset

* 📝 add jsdoc

* ♻️ refactor stories

* 📝 fix erroneous story text
2023-09-26 15:41:16 +02:00
Ken 7744c15798 🐛 Timeline open/close handling (#2309)
* 🐛 Initial fix for inside-click

* 🎨 Migrate to new floating-ui

* 🎨 Timeline.Pin refactor

* 🎨 Timeline.Period popover refactor

* 💄 Timeline-popover border-radius

* 🐛 Fikset unødvendig tabstop
2023-09-26 15:40:05 +02:00
ce837ed3b3 ✨ add AsChild to show/hide (#2312)
* ✨ add AsChild to show/hide

* 📝 changeset

* 📝 asChild jsdoc

* 📝 show demo

* 📝 hide-demo

* Update aksel.nav.no/website/pages/eksempler/primitive-hide/as-child.tsx

* Update aksel.nav.no/website/pages/eksempler/primitive-show/as-child.tsx

* Update aksel.nav.no/website/pages/eksempler/primitive-hide/as-child.tsx

* 📝 Oppdatert docs

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-09-26 14:13:05 +02:00
Ken 522d136a84 ✨ Book ikon (#2313) 2023-09-26 13:20:07 +02:00
Ken 014fedb051 Accordion padding og warnings (#2310)
* 💄 Padding-top for AccordionContent

* 🚨 Warnings for accordion misuse

* 📝 Changeset

* 💄 Justert padding-top
2023-09-26 10:21:09 +02:00
Ken 540b8c711d ✨ Nye ikoner (#2307) 2023-09-22 15:41:52 +02:00
Vegard Haugstvedt 73eb6b1f42 Bugfix/dropdown voice over bug (#2303)
* Remove tabIndex="-1" for Popover component, to fix VoiceOver bug where navigation inside the Popover doesn't work.

This affects Datepicker, Dropdown, Timeline and the Popover components, but appears to cause no bugs.

Ref: https://nav-it.slack.com/archives/C7NE7A8UF/p1694158816166729

* Add changeset

* Might not be the best way, but it works. getFloatingProps added it's own tabIndex="-1", which we need to get rid of.

* Seems like getFloatingProps can take "tabIndex: undefined" as an option, reducing the amount of code we need to change.
2023-09-22 13:31:53 +02:00
Julian Nymark 5a20e34beb hvilken -> hvilke (#2296) 2023-09-20 13:29:04 +02:00
2ed69248c2 Kitchen sink-demo for sidemaler (#2282)
* initial box (heavily inspired by shopify Box)

* 🎨 Theming-demo

* rm printHidden prop

* sr-only: clip is deprecated, adding clip-path

* setting up padding story box primitive

* 95% complete padding example for Box (dynamic css code unfolding with types)

* WIP on padding/margin for box

* working box padding/block/inline/margin?

* remove console.log

* story for Box, copy implementation from padding to apply to margin as well

* remove unwanted props on Box

* refactor semantic-colors.json, use json import for types in Box.tsx

* squashme

* Box: working border & background

* 🔥 remove props on Box we will not implement in v1

* refactoring / less things needed (no margin) and things that are broken show up in stories

* 🐛 fix erroneous padding assignment (a flipped index)

* fully recreated LinkPanel

* box: add all borderRadius props

* box: complete example for chat bubbles

* 📝 refactor box hover props to be an object instead

* checkout main yarn.lock

* yarn changeset

* 📝 add jsdoc for Box

* 📝 add token documentation

* 🚧 Box: add barrel file

* 🔥 remove overriding tokens for Box

* ♻️ refactor the borderRadius API

* 🔥 remove console.logs

* bump ts version (make them all equal)

* fix new type error that surfaced when upgrading TS

* add yarn.lock

* 🚧 testing with older TS version again

* Revert "🚧 testing with older TS version again"

This reverts commit ca09f3c419.

* add minimum permissions check utility (official github action)

* Revert "add minimum permissions check utility (official github action)"

This reverts commit f9dd5ea436.

* test with "read-all|write-all" for a chromatic.yml action

* remove unused comments

* 🚧 try skip a test suite

* Revert "🚧 try skip a test suite"

This reverts commit ccf4711c25.

* 🚧 update all node-version to 19

* 💥 Force-tester GHA

* 💥 bump node-version to 20

* 💥 test with jsonModules again, but this time with node v20

* 🚧 revert type erasure (for tests)

* 🔥 remove hover from Box

* 🚧 test with module identifier import

* 🚧 squashme

* a working token type solution

* 📝 group Primitives in storybook

* no longer assert type, hint instead

* 📝 improve jsdoc for Box

* 📝 improve jsdoc for Box

* 🚧 test relative import for github action

* 🚧 test ordering of yarn builds

* 🚧 test ordering of yarn workspaces

* 🚧 test dependency for yarn workspaces

* 🐛 fix human error in token refactoring

* 📝 reword jsdoc

* ♻️ refactor

* 🚧 test again with module identifier import

* squashme

* 🚧 fully revert to importing .json

* 🚧 remove duplicate types

* 🔥 remove style-dicitonary format (now unused), fix shadow.json refs

* remove devDependency on tokens (for react)

* 📝♻️ update comments & naming

* 🚚 Oppdatert CSS-config etter ny primitives gruppering

* make border-color also control border-style

* add examples for Box to aksel.nav.no

* ⬆️ Yarn sort av dependencies

* 🎨 BorderWidth tokens

* 🎨 Css for borderRadius

* 🎨 Setup responsiveRadius utility

* ♻️ Forenklet borderRadius

* 🎨 refactor padding in box

* 🔥 Fjernet unødvendig kode

* 🎨 Oppdatert token for borderWidth

* 🐛 Default 0px border

* 🏷️ Refactor types

* 🐛 Fikset stories

* ♻️ refactor away one of the getResponsiveProps(), renaming

* ♻️ refactor + add token exceptions

* 🐛 new props based on BoxProps

* 📝 Oppdatert box-eksempler

* 📝 border-eksempler

* 📝 shadow-eksempel

* 📝 header demo

* 🔥 Fjernet theming demo, la til panel-demo

* 🚚 Flyttet show/hide inn i primitives

* 🚚 extract stateful colors to separate files

* 🚚 move shadow stateful tokens as well

* ♻️ rename some Box types

* 🚚 re-add missing token

* 🚚 move types file to utils, (bonus: fix some jsdoc)

* ➕ add @navikt/ds-tokens to react

* Update .changeset/happy-pianos-cheat.md

* ✨ Setup new primitives

* 🎨 Basic bleed and contentbox styling

* 🎨 Demo-story

* 🎨 Oppdatert demo

* 🎨 Oppdatert avatarpanel

* 💄 Finjustert page-layout

* 💄 Mobiltilpasset innhold

* 🔥 Fjernet bleed

* 🚚 Flyttet contenbox inline

* ⬆️ yarn synk

* 🔥 fjernet changeset

---------

Co-authored-by: Julian Nymark <julian.nymark@nav.no>
Co-authored-by: Lars Hansen <lars.eirik.korsgaard.hansen@nav.no>
2023-09-19 12:03:48 +02:00
Ken ce6e3f5d7a [Aksel.nav.no] SEO-refactor (#2290)
* 🎨 withsidebar story

* 🔥 Fjernet withToc-prop

* 🚚 Flyttet header/footer til sidedefinisjoner

* 🚚 Flyttet headercube nederst i fil

* 🔥 Fjernet unødvendig minheight

* 🐛 Fikset sideideksering av ikoner

* ♻️ SEO trukket ut til egen komponent

* ♻️ Refactor SEO

* 🔥 Fjernet ubrukt HEAD i prinsipper

* 🔍 Canonical på god-praksis sider med tema-query

* 🔥 Fjernet console.logs

* 🎨 Forbedtret page-types i nextjs (#2291)
2023-09-19 09:33:51 +02:00
Ken 90e5053a67 Stack-direction ved brekkpunkt (#2286)
* 🎨 Dynamisk stack by breakpoint

* 🐛 tokens inherited feil tken

* 🎨 responsive demo

* 📝 Stack-docs

* 📝 Changeset

* Update .changeset/rich-squids-shout.md
2023-09-18 15:15:27 +02:00
Ken 32efac7965 [Aksel.nav.no] Sanitert bort tomme children i blockcontent (#2295)
* 🎨 Sanitert bort tomme children i blockcontent

* 🎨 Unngår å bruke any
2023-09-18 14:53:39 +02:00
Vegard Haugstvedt 82e9827275 Bugfix/select cursor pointer (#2293)
* Add cursor: pointer to Select to make it more explicit that it can be clicked

* Add changeset
2023-09-18 13:18:05 +02:00
Ken 2206823038 [aksel.nav.no] 🔊 Logger redirects i middleware (#2292)
* 🔊 Logger nå redirects fra middleware

* 🎨 Satt redirect-felt til readonly
2023-09-18 11:07:45 +02:00
Ken 770c5927c5 ⬆️ Storybook update (#2287)
* ⬆️ storybook update

* ⬆️ yarn synk
2023-09-17 12:10:33 +02:00
Ken 2f916d9239 Migrert til portableText pakke, fikset sitemap ++ (#2270)
* 🎨 Migrert til portableText

* 🎨 Bruker default portableblock i sanity

* ♻️ Refactor blockcontent

* 🔥 Fjernet all bruk av sanity-icons

* 🎨 Skrever seg bort fra sanity-ui

* 🐛 Fikset feil etter migrering

* 🔥 Fjernet bruk av svgr i next-config

* 🐛 Fikset brukket sitemap-generering

* 💄 Fikset overflow-bug i toc

* 🎨 Flyttet toc-logikk ut i hook

* 🐛 Fikset story-kategori for toc

* :bug; Fikset hidden på toc, lenker på komponentsider

* 🎨 Fikset toc min-bredde, oppdatert sidebar-ikoner

* 🎨 Fikset wrapping av search på ikonside

* 🐛 Fikset import-error

* 🐛 Tester fjerning av console log for playwright test

* ⬆️ yarn synk

* 🐛 Fikset hostname for Aksel.nav.no

* 🐛 Bedre fallback-handling av portabletext

* 🐛 Fikset darkmode-visning av Alert i sanity

* ⬆️ yarn synk
2023-09-15 20:53:39 +02:00
Ken be2b035814 🐛 Kodemodul i sanity setter nå defaultlanguage til tsx 2023-09-15 20:17:31 +02:00
Ken 2d80468dca 📝 Oppdatert box-header demo 2023-09-15 17:48:13 +02:00
Ken b062558aa4 ✨ Slot-komponent (#2274)
* ✨ Slot-komponent

* 🔥 Fjernet comment

* ♻️ Refactor slots

* ⬆️ yarn synk

* ♻️ Fikset kommentarer nevnt i PR
2023-09-14 15:11:22 +02:00
Halvor HauganandKen 95ce972e43 🚨 Forbedret ESLint-oppsett (#2265)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-09-14 14:39:26 +02:00
Halvor Haugan ddf13d783b ♻️ Box: Forenkling av CSS-variabler (#2279) 2023-09-14 12:42:13 +02:00
github-actions[bot]andgithub-actions[bot] 4742f2f580 Version Packages (#2275)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-13 14:58:02 +02:00
Ken 9f2052e1c2 🐛 Width fungerte ikke med inline-variant av skeleton (#2273) 2023-09-13 14:42:05 +02:00
Julian Nymark f6fcf0c4fd :arrow-up: add missing typescript version bump in main (#2272) 2023-09-13 11:46:38 +02:00
83c9194a48 initial box (heavily inspired by shopify Box) (#2195)
* initial box (heavily inspired by shopify Box)

* 🎨 Theming-demo

* rm printHidden prop

* sr-only: clip is deprecated, adding clip-path

* setting up padding story box primitive

* 95% complete padding example for Box (dynamic css code unfolding with types)

* WIP on padding/margin for box

* working box padding/block/inline/margin?

* remove console.log

* story for Box, copy implementation from padding to apply to margin as well

* remove unwanted props on Box

* refactor semantic-colors.json, use json import for types in Box.tsx

* squashme

* Box: working border & background

* 🔥 remove props on Box we will not implement in v1

* refactoring / less things needed (no margin) and things that are broken show up in stories

* 🐛 fix erroneous padding assignment (a flipped index)

* fully recreated LinkPanel

* box: add all borderRadius props

* box: complete example for chat bubbles

* 📝 refactor box hover props to be an object instead

* checkout main yarn.lock

* yarn changeset

* 📝 add jsdoc for Box

* 📝 add token documentation

* 🚧 Box: add barrel file

* 🔥 remove overriding tokens for Box

* ♻️ refactor the borderRadius API

* 🔥 remove console.logs

* bump ts version (make them all equal)

* fix new type error that surfaced when upgrading TS

* add yarn.lock

* 🚧 testing with older TS version again

* Revert "🚧 testing with older TS version again"

This reverts commit ca09f3c419.

* add minimum permissions check utility (official github action)

* Revert "add minimum permissions check utility (official github action)"

This reverts commit f9dd5ea436.

* test with "read-all|write-all" for a chromatic.yml action

* remove unused comments

* 🚧 try skip a test suite

* Revert "🚧 try skip a test suite"

This reverts commit ccf4711c25.

* 🚧 update all node-version to 19

* 💥 Force-tester GHA

* 💥 bump node-version to 20

* 💥 test with jsonModules again, but this time with node v20

* 🚧 revert type erasure (for tests)

* 🔥 remove hover from Box

* 🚧 test with module identifier import

* 🚧 squashme

* a working token type solution

* 📝 group Primitives in storybook

* no longer assert type, hint instead

* 📝 improve jsdoc for Box

* 📝 improve jsdoc for Box

* 🚧 test relative import for github action

* 🚧 test ordering of yarn builds

* 🚧 test ordering of yarn workspaces

* 🚧 test dependency for yarn workspaces

* 🐛 fix human error in token refactoring

* 📝 reword jsdoc

* ♻️ refactor

* 🚧 test again with module identifier import

* squashme

* 🚧 fully revert to importing .json

* 🚧 remove duplicate types

* 🔥 remove style-dicitonary format (now unused), fix shadow.json refs

* remove devDependency on tokens (for react)

* 📝♻️ update comments & naming

* 🚚 Oppdatert CSS-config etter ny primitives gruppering

* make border-color also control border-style

* add examples for Box to aksel.nav.no

* ⬆️ Yarn sort av dependencies

* 🎨 BorderWidth tokens

* 🎨 Css for borderRadius

* 🎨 Setup responsiveRadius utility

* ♻️ Forenklet borderRadius

* 🎨 refactor padding in box

* 🔥 Fjernet unødvendig kode

* 🎨 Oppdatert token for borderWidth

* 🐛 Default 0px border

* 🏷️ Refactor types

* 🐛 Fikset stories

* ♻️ refactor away one of the getResponsiveProps(), renaming

* ♻️ refactor + add token exceptions

* 🐛 new props based on BoxProps

* 📝 Oppdatert box-eksempler

* 📝 border-eksempler

* 📝 shadow-eksempel

* 📝 header demo

* 🔥 Fjernet theming demo, la til panel-demo

* 🚚 Flyttet show/hide inn i primitives

* 🚚 extract stateful colors to separate files

* 🚚 move shadow stateful tokens as well

* ♻️ rename some Box types

* 🚚 re-add missing token

* 🚚 move types file to utils, (bonus: fix some jsdoc)

* ➕ add @navikt/ds-tokens to react

* Update .changeset/happy-pianos-cheat.md

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Lars Hansen <lars.eirik.korsgaard.hansen@nav.no>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-09-13 11:25:35 +02:00
github-actions[bot]andgithub-actions[bot] f5f859f845 Version Packages (#2271)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-11 21:41:26 +02:00
Ken 2eaf531cfe 🐛 Fikset kalkulering av fromDate/toDate (#2269) 2023-09-11 21:38:36 +02:00
Halvor Haugan a9a17ce050 📝 Fjern desc på default eksempel på GuidePanel (#2267) 2023-09-11 13:06:59 +02:00
Trong Huu Nguyen c5644da130 chore: update fakedings url (#2268) 2023-09-11 12:58:32 +02:00
Julian NymarkandKen 3af95c4c1f Bump node and TS versions (#2249)
* 🚧 update all node-version to 19

* 💥 bump node-version to 20

* bump ts version (make them all equal)

* fix new type error that surfaced when upgrading TS

* ⬆️ bump ts-node

* 🚧 add ts-jest to aksel-stylelint (just a test)

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-09-11 09:58:13 +02:00
Ken d1bd13f4d1 🐛 stories for aksel.nav.no indekserte ikke riktig 2023-09-08 14:49:55 +02:00
Ken 9f048877e4 🐛 Fikset sanity min title-felt 2023-09-07 18:47:03 +02:00
Ken 39b2ef49b2 📝 Bedre visning for typo-eksempler 2023-09-07 15:02:16 +02:00
Ken ccf3f30ab4 🐛 Fikset eksempler for show/hide 2023-09-07 14:54:43 +02:00
Ken 3592f04eab 🐛 Fikset parsing av kodesnippet 2023-09-07 14:42:02 +02:00
github-actions[bot]andgithub-actions[bot] fbc598529c Version Packages (#2262)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-07 14:24:26 +02:00
Ken 1df8dcd857 🎨 Oppdatert prismjs og codeview (#2251) 2023-09-07 14:02:10 +02:00
Ken 7be9dd88ca Responsive Show/Hide-komponenter (#2222) 2023-09-07 12:47:49 +02:00
Ken 4d9691413a 🐛 Fikset lightmode-theming (#2238) 2023-09-07 12:45:31 +02:00
Ken 2989853f39 ♻️ Oppdatert Search escape håndtering (#2245) 2023-09-07 12:41:45 +02:00
Ken bff7c836f8 🎨 ErrorSummary border-radius (#2256) 2023-09-07 12:41:21 +02:00
github-actions[bot]andgithub-actions[bot] b906ca469d Version Packages (#2259)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-07 10:42:56 +02:00
Halvor Haugan ed9286f75b 🐛 Popover: sjekk at det er et HTML-element som får fokus (#2258) 2023-09-07 10:39:03 +02:00
github-actions[bot]andgithub-actions[bot] 445f6b8309 Version Packages (#2252)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-07 09:10:15 +02:00
Ken 27dacfdbe9 🐛 Fikset SVG import path (#2250) 2023-09-06 20:12:49 +02:00
Ken b8b7ad142d 🎨 Synket alert med figma (#2240) 2023-09-06 15:59:31 +02:00
github-actions[bot]andgithub-actions[bot] 29b244e69b Version Packages (#2248)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-06 15:07:20 +02:00
KenandLars Eirik Korsgaard Hansen 6f2325bbb3 🎨 HGrid align-prop (#2242)
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
2023-09-06 15:04:26 +02:00
github-actions[bot]andgithub-actions[bot] 9f575b76b8 Version Packages (#2246)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-06 11:11:51 +02:00
Ken 4e05993427 🎨 Skeleton as-prop (#2239) 2023-09-06 11:03:28 +02:00
Halvor Haugan 85a7521197 🐛 fiks createPackageJsonsWithESMPointers i Windows (#2237) 2023-09-05 12:35:31 +02:00
Halvor HauganandKen f635be70d0 🏷️ Forbedret typesjekking i stories (#2234)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-09-04 17:06:34 +02:00
Ken b675a5b9ba 🛂 Permissions for chromatic-workflow (#2235) 2023-09-04 17:04:11 +02:00
Ken cc842113c3 ✨ Primitives-kategori 2023-09-04 12:09:35 +02:00
Ken f36d4c46d7 🐛 Fikset Typo-eksempler, dupliserte prop-entries 2023-09-03 14:22:40 +02:00
Ken d7bd84f6ee ⬆️ Oppdatert sanity (#2228) 2023-09-03 13:18:38 +02:00
github-actions[bot]andgithub-actions[bot] c33702bf08 Version Packages (#2230)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-03 12:39:10 +02:00
Ken 57efe4b8ae 🛂 CI-action har nå write-access på PR 2023-09-03 12:28:37 +02:00
Halvor Haugan b0da33c366 🐛 DatePicker: Riktig skriftstørrelse på small input (#2232) 2023-09-01 14:36:32 +02:00
Sebastian Oliver Søberg c67e051bdc Fix month comparison, dont respect day of month when comparing months (#2231) 2023-09-01 14:21:23 +02:00
Halvor Haugan 960a08247c 💄 GuidePanel: justert design (#2227) 2023-09-01 12:43:07 +02:00
dependabot[bot] b1a1a896d5 ⬆️ Bump @adobe/css-tools from 4.2.0 to 4.3.1 (#2226)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 12:22:57 +02:00
Julian Nymark 596b94ffae 🐛 move internal token definition to a larger scope (#2229)
* 🐛 move internal token definition to a larger scope

when the scope only covered the __header, the __item could
not use the same token, and it was undefined. Setting this on
a shared parent (the topmost accordion) fixes this.

* changeset
2023-08-31 16:14:53 +02:00
github-actions[bot]andgithub-actions[bot] 273a0cd78f Version Packages (#2225)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-31 13:38:42 +02:00
Halvor Haugan 9ab920a288 ♿ Textarea: Skjermleser-spesifikk tekst leses opp sammenhengende (#2216) 2023-08-29 10:20:20 +02:00
Ken 03cdeff3a0 🎨 Oppdatert Typo-komponenter (#2211) 2023-08-28 18:38:11 +02:00
github-actions[bot]andgithub-actions[bot] a8160ada1c Version Packages (#2221)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-28 09:25:07 +02:00
Martin BerglundandKen efad85b383 Fikser manglende suffix (#2220)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-08-28 09:19:35 +02:00
github-actions[bot]andgithub-actions[bot] 51a71b6efc Version Packages (#2214)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-25 21:26:27 +02:00
Ken 5cd03cb969 Komponentsynk med figma + combobox hotfix (#2219) 2023-08-25 21:16:14 +02:00
Ken cfb692d62a Aksel.nav.no + sanity-updated (#2218) 2023-08-25 21:15:25 +02:00
Ken 7e789158ce Oppdatert ikoner (#2197) 2023-08-25 20:41:39 +02:00
Vegard HaugstvedtandKen a8ad03de7d Mouse movements should "take over" from keyboard focus in Combobox dropdown list, and vice versa, acting like a native select. (#2193)
* Move movements should "take over" from keyboard focus in Combobox dropdown list, and vice versa, acting like a native select.

Fixes #2165

* Add tests for handling mixed keyboard-navigation and mouse movements in Combobox

* Added changeset

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-08-25 13:34:18 +02:00
Ken 627f9f7f01 Button setter role=button ved bruk av annen html-tag (#2154) 2023-08-25 12:50:07 +02:00
Ken 3b1c8c7666 Storybook for Aksel-moduler, getting-started artikkel, ikoner (#2196) 2023-08-24 15:32:43 +02:00
github-actions[bot]andgithub-actions[bot] 84506691af Version Packages (#2206)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-24 14:12:50 +02:00
Halvor Haugan be647e2ada ✨ Modal: mulighet for å rendre i portal (#2209) 2023-08-24 14:07:03 +02:00
Ken 1698137b96 🐛 Input setter nå ikke aria-controls før popover åpnes (#2213) 2023-08-24 14:06:43 +02:00
Halvor Haugan 02d7f91eff ✅ Modal: use polyfill in JSDOM (#2208) 2023-08-23 16:24:40 +02:00
Halvor Haugan 5b78f71884 💄 Modal: fjern kantlinje (#2210) 2023-08-23 16:15:20 +02:00
Ken 54a43cf924 🐛 Fikset token-naming for table-token (#2204) 2023-08-23 12:26:02 +02:00
Lars Eirik Korsgaard Hansen 6fcbb72a6f 📄 Move font-license to /fonts & change 'licence' to 'license' (#2201) 2023-08-23 08:57:10 +02:00
Ken b69f30f69b 🎨 Fikset mindre sanity-bugs (#2200) 2023-08-22 19:12:39 +02:00
github-actions[bot]andgithub-actions[bot] 265e105fd0 Version Packages (#2202)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-22 15:10:46 +02:00
Ken 8d934e0931 🐛 Checkmark, Confirmationpanel og Tokens patch (#2199) 2023-08-22 15:05:15 +02:00
Ken 6981fbccff 🐛 Fikset kalkulering av ikon-navn på ikonside 2023-08-18 18:27:11 +02:00
github-actions[bot]andgithub-actions[bot] bfee5a822e Version Packages (#2192)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-18 13:09:28 +02:00
Halvor Haugan 58ed3b5367 🏷️ Modal: Bedre type for width (#2191) 2023-08-18 12:51:56 +02:00
github-actions[bot]andgithub-actions[bot] 00b3dd7d59 Version Packages (#2190)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-18 12:20:30 +02:00
Ken 90db7dd0c1 📝 changeset 2023-08-18 12:16:01 +02:00
Ken b6d0304d5a Merge branch 'main' of https://github.com/navikt/aksel 2023-08-18 12:00:15 +02:00
Ken de0a797e09 ⚰️ Fjernet duplikat OG-bilde 2023-08-18 11:59:54 +02:00
github-actions[bot]andgithub-actions[bot] c4eaf0f350 Version Packages (#2186)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-18 11:41:26 +02:00
Ken fb9897e6a0 🐛 Fikset fokusrekkefølge på søk 2023-08-18 09:25:49 +02:00
Halvor HauganandKen 3438b5d7e7 ✨ Modal: støtte for header og footer (#2135)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-08-17 16:40:52 +02:00
Ken 3583062824 🎨 Oppdatert Action og Gray (#2092) 2023-08-17 16:14:42 +02:00
Ken 2993f809ad La til large-size for Table, oppdatert expand-knapp (#2178) 2023-08-17 16:14:24 +02:00
github-actions[bot]andgithub-actions[bot] fe25e1fdf2 Version Packages (#2185)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-17 16:03:48 +02:00
Vegard HaugstvedtandKen 5cda39ce19 Bugfix/missing red border on combobox with error (#2184)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-08-17 16:00:25 +02:00
github-actions[bot]andgithub-actions[bot] 6cb25e44de Version Packages (#2172)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-17 14:24:27 +02:00
Ken 5812d6ee87 📝 Oppdatert changesets 2023-08-17 14:14:01 +02:00
Ken a402777c70 🐛 Alignet alert-ikon med tekst (#2179) 2023-08-17 14:02:56 +02:00
Vegard Haugstvedt d4064bd461 Call Combobox.onClear when clearin input field programatically (#2183) 2023-08-17 14:00:05 +02:00
KenandHalvor Haugan 1c482e03b8 Oppdatert list: Small-variant, bugfixes (#2168)
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-08-17 13:56:59 +02:00
Vegard HaugstvedtandKen 608e1f3944 Feature/combobox error message (#2182)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-08-17 13:26:10 +02:00
Ken 107d6f3d93 CopyButton prop for iconPosition (#2173) 2023-08-17 13:21:54 +02:00
Ken 09d41e9b6d 🎨 Checkbox checkmark er nå SVG, ikke base64 (#2171) 2023-08-17 12:49:33 +02:00
Ken ebacbddd44 🐛 Reverserte major-update av stylelint 2023-08-17 12:47:34 +02:00
Ken e58b072c84 🎨 Oppdatert storybook, fikset chromatic-PR kommentar 2023-08-17 12:02:03 +02:00
Lars Eirik Korsgaard HansenandKen e7cb3753a0 🐛 fix: Combobox , SingleSelect: allow custom options (#2180)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-08-17 11:38:31 +02:00
Lars Eirik Korsgaard Hansen 7486ba11f9 🐛 Combobox, SingleSelect: close dropdown menu upon selecting option (#2177)
* isAddedByUser changed to isCustomOption to match language used elsewhere

* list closes when choosing option on SingleSelect

* changeset
2023-08-16 15:43:59 +02:00
Vegard Haugstvedt cf01a6e162 Bugfix/combobox.on clear is fired more times than expected (#2170) 2023-08-16 10:45:02 +02:00
Ken a67f95433f 🐛 Fikset dodont tekst og ikon for god-praksis 2023-08-16 10:44:41 +02:00
github-actions[bot]andgithub-actions[bot] dd03078e33 Version Packages (#2169)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-15 14:12:40 +02:00
Halvor Haugan 72321e3846 💄 ToggleGroup: fjern semibold fra selected button (#2167) 2023-08-15 13:42:20 +02:00
Ken 1cd8ac93ed 🎨 Oppdatert ikonside med forslag fra Slack (#2164) 2023-08-15 10:50:54 +02:00
Ken 48d6f14103 🐛 Fikset for restriktiv validering av sidetittel i sanity 2023-08-15 10:15:11 +02:00
github-actions[bot]andgithub-actions[bot] 44da7fcdc6 Version Packages (#2160)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-14 14:43:22 +02:00
Ken e68ab5cb2c 🎨 Fikset hardkodet border-radius i diverse komponenter (#2159) 2023-08-14 14:40:47 +02:00
Ken c721b392f9 ♻️ Chores Sanity, Storybook
- Oppdatert Storybook, Sanity
- Fikset validering for InputWithCounter i Sanity
- Fikset Accordion-stories rekkefølge
- La til egne knapper for Desktop/mobil-view for eksempler
- Bruker DS-knapper i kode-eksempler på Aksel
2023-08-14 13:40:10 +02:00
Ken 1d0d0ce665 Merge branch 'main' of https://github.com/navikt/aksel 2023-08-13 20:56:42 +02:00
Ken 9d02940543 🔥 Fjernet console.log 2023-08-13 20:50:54 +02:00
Ken 7ff63a2c63 🐛 Fikset validering for sidetittel i sanity 2023-08-13 20:50:13 +02:00
github-actions[bot]andgithub-actions[bot] 49f33a78d8 Version Packages (#2151)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-11 15:59:23 +02:00
Ken 06aaec70f0 📝 Oppdatert changeset for HGrid 2023-08-11 15:43:40 +02:00
Ken 5fbf230e47 🎨 Justert antall viste artikkler i masonary 2023-08-11 13:24:26 +02:00
Vegard Haugstvedt 53265c247e It is not possible to close combobox dropdown after clicking a chip (#2155)
* Fixes bug where it is not possible to close dropdown by pressing escape or clicking outside the combobox after clicking the chips to de-select an option

In short, the focus were lost/reset when the chip disappears, but now is reset to the input instead.
Also fixed issue where clicking the chip while virtual focus is in the dropdown caused a click on both the option and the chip, causing it to be de-selected and instantly re-selected.

* Updated "remove selected"-test to also check that closing the dropdown after clicking a chip is possible.

* Added changeset
2023-08-11 12:38:22 +02:00
Ken d78f33df79 🚚 Markert gammelt grid som deprecated (#2153) 2023-08-11 12:37:02 +02:00
Ken 4375c55ab6 📝 Oppdatert storybook template i workflow 2023-08-11 09:45:02 +02:00
Christian SkrøvsethandKen 0de8238ecf Add semibold (600) fonts (#2150)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-08-11 09:01:59 +02:00
KenandHalvor Haugan 647b14a238 [Primitives] HGrid (#1838)
Co-authored-by: Halvor Haugan <83693529+HalvorHaugan@users.noreply.github.com>
2023-08-10 15:38:58 +02:00
Ken 64901adccb 🎨 Oppdatert List-dokumentasjon, fikset bruk av ikoner med text (#2149) 2023-08-10 13:06:48 +02:00
Ken 49ddb2094c Hotfix: Fikset visited state for Link og vertical-align for SVG i tailwind 2023-08-09 17:06:15 +02:00
github-actions[bot]andgithub-actions[bot] 8a5f209735 Version Packages (#2148)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-09 16:30:12 +02:00
Ken d3bd1202ed Hotfix: Fikset visited state for Link og SVG-reset ved bruk av tailwind 2023-08-09 16:19:49 +02:00
github-actions[bot]andgithub-actions[bot] 4bf6027518 Version Packages (#2147)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-09 15:34:18 +02:00
Halvor Haugan c8e203c523 ✏️ Fiks skrivefeil i suggestionblock (#2146) 2023-08-09 15:15:41 +02:00
267799ca0e update links (#2093)
* style links with inline

* tweak css spacing for inline links with SVG

* add break-all prop to link

* wrap link in span to allow for spacing

* more obvious spacing example

* remove spacing prop from link

* implement pr review comments

* add random icon visual fuzz testing in stories

* remove console.log

* changeset

* add examples to aksel.nav.no

* 🎨 make inline-flex version opt-in, improve prop naming

* 🐛 Fixed comments

* 🎨 Oppdatert props

* 🎨 refactor links, add examples (remove underline & inline)

* change is no longer major (pr review comment)

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* cleaner changeset (pr review comment)

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* norwegian changeset (pr review comment)

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* update changeset (pr review comment)

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* use neutral token for neutral link variant

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* use neutral token for neutral link variant

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>

* Update .changeset/proud-tigers-share.md

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-08-09 15:00:44 +02:00
github-actions[bot]andgithub-actions[bot] 42934af3a1 Version Packages (#2145)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-09 14:38:31 +02:00
Vegard Haugstvedt eff8a902c5 Bugfix/combobox bugfixes and tweaks (#2144)
* Clear input field when clicking option in multiselect combobox

Makes the behaviour consistent when clicking with a mouse and when selecting an option with keyboard.

* MultiSelect with "add new" example should actually have the addnewValues prop set...

* Expose through onToggleSelected whether selected values in combobox are added by the user or not.

* Add the additional affordance of bold font-weight for selected options in combobox.

Done to account for screen magnifiers on screens that don't show the background color, where the checkmark is out-of-sight.

* Avoid "jumping" when selecting option in multiselect, stemming from the chips being slightly larger than the padding allowed for (equal to the width of the border)

* Added changeset and updated yarn.lock

* Do not use focus-visible inside fallback for when focus-visible is not supported

* Add fallback focus-styling using JS and a helper class for browsers not supporting :has (Firefox)

* Fix for onBlur in ComboboxWrapper. Without tabindex="-1" event.relatedTarget in onBlur will be null, and we can't check that focus has entirely moved outside the Combobox.
2023-08-09 14:15:26 +02:00
Ken d34a8f45ef 🐛 aria-live fix for button (#2143) 2023-08-09 11:01:45 +02:00
github-actions[bot]andgithub-actions[bot] d1ceb40439 Version Packages (#2141)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-07 13:58:17 +02:00
e033b34c3b Table component: adding click event on expandable table rows (#2127)
Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-08-07 13:42:07 +02:00
Halvor Haugan de3991d0f0 📝 Fiks skrivefeil i Select-eksempler (#2140) 2023-08-04 18:30:41 +02:00
github-actions[bot]andgithub-actions[bot] 9641215506 Version Packages (#2139)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-04 13:43:34 +02:00
Ken 8a82e1c1f6 [Ny komponent] Stack, Spacer (#2040) 2023-08-04 13:13:46 +02:00
github-actions[bot]andgithub-actions[bot] a2dfc8699b Version Packages (#2138)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-04 12:33:33 +02:00
Ken 492cfc1801 💄 Oppdatert bruk av REM for font-scaling fix (#2126) 2023-08-04 11:33:05 +02:00
Ken 9ca5932fed ⬆️ Oppdatert dependencies for dependabot warnings (#2134) 2023-08-04 11:18:24 +02:00
Vebjørn NordbyandKen 5950673fbf Legger til htmlInputType time på TextField-type (#2137)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-08-04 09:15:17 +02:00
Ken 5b42ff07ee 🐛 Fikset oppdateringer av prop-docs på Aksel.nav.no 2023-08-03 13:41:20 +02:00
github-actions[bot]andgithub-actions[bot] 09ba52ea76 Version Packages (#2132)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-03 13:30:24 +02:00
a82bccf707 Removable chips type now defaults to button (#2124)
* Removable chips type now defaults to button

* 📝 Changeset

* 📝 Changeset update

* Remove OverridableComponent from Chips.Removable. This component should always be a button, and it is not currently used in any other way.

The reason for making this change now, is that we put type="button" on the Chip.Removable to prevent a submit event when the chip is clicked inside a form.

---------

Co-authored-by: Ken <ken.aleksander@gmail.com>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Vegard Haugstvedt <it.vegard@gmail.com>
2023-08-03 11:41:31 +02:00
Ken 89ae778c24 🐛 Fikset lasting av aksel-eksempler i storybook 2023-08-03 10:53:25 +02:00
Ken 5b2669d35d ⬆️ Oppdatert storybook til 7.2 (#2128) 2023-08-02 15:35:28 +02:00
Ken 8a82bb4a96 🐛 Fikset layout-bug på komponentsider for enkelte nettlesere 2023-08-02 12:43:19 +02:00
Ken 7871e0f95c 📝 Oppdatert datepicker-eksempler med formatering (#2125) 2023-08-02 12:37:14 +02:00
dependabot[bot] 3182888a07 ⬆️ Bump word-wrap from 1.2.3 to 1.2.4 (#2115)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 10:39:55 +02:00
Mathias S. Müller f2742da085 Legg til manglende størrelsesbeskrivelse (#2121) 2023-07-27 14:59:08 +02:00
github-actions[bot]andgithub-actions[bot] 92721aefa0 Version Packages (#2119)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-21 11:47:05 +02:00
Ken e6fdfdc9b4 🐛 Fikset stepper-bug (#2116) 2023-07-20 19:50:56 +02:00
github-actions[bot]andgithub-actions[bot] 93975bc935 Version Packages (#2118)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-19 20:14:53 +02:00
Ken 3a0dac3997 🐛 Fikset datepicker-bug for dynamsik oppdatering av 'month' (#2117) 2023-07-19 20:12:14 +02:00
Andreas Nordahl 1d43710af0 Remove preconnect link to fonts.googleapis.com(#2114) 2023-07-19 17:45:55 +02:00
github-actions[bot]andgithub-actions[bot] 6df7c78e3c Version Packages (#2111)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-17 22:35:24 +02:00
Andreas NordahlandKen 476d79e487 Expose timeline axis label templates as a prop (#2109)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-07-17 22:32:16 +02:00
dependabot[bot]andLars Eirik Korsgaard Hansen 238a715c92 ⬆️ Bump semver from 5.7.1 to 5.7.2 (#2107)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lars Eirik Korsgaard Hansen <71271458+larseirikhansen@users.noreply.github.com>
2023-07-14 15:06:55 +02:00
Lars Eirik Korsgaard Hansen 0fadd33e3e Combobox fixes (#2112)
Combobox post-release tweaks

* Add dynamic height to examples because of the dropdown

* Examples were not working: remove controlled prop for uncontrolled Comboboxes

* Add an example with controlled Combobox
2023-07-14 11:08:47 +02:00
Ken eadc0bce13 📝 Oppdatert changeset for bedre endringslogg 2023-07-13 15:50:29 +02:00
Lars Eirik Korsgaard Hansen 678db9b11b Update spotty-onions-cough.md 2023-07-13 15:39:40 +02:00
Lars Eirik Korsgaard Hansen e3027cc196 ✨ Ny komponent: Combobox (#1868)
✨Ny komponent: Combobox 🎉 

Combobox er en ny komponent som kombinerer tekstfelt og nedtrekksliste. 
- Velg mellom predefinerte alternativer i nedtrekkslisten
- Bruk input-feltet som filter for alternativene i nedtrekkslisten.
- Legg inn nye svar, hvis svaret du ikke finnes i listen
- Velg mellom SingleSelect eller MultiSelect-versjon for henholdsvis ett og flere valg. 
- Autocomplete svar i inputfeltet når man velger SingleSelect

Dokumentasjonen finner du på https://aksel.nav.no/komponenter/core/combobox
2023-07-13 15:17:05 +02:00
Ken ac0fd790e3 ⚰️ Fjernet ubrukt metrics-løsning (#2098) 2023-07-06 17:42:38 +02:00
SjurandKen c344c9beb4 Update removable.tsx (#2101)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-07-06 17:22:24 +02:00
SjurandKen 5cb5dea4ff Update toggle-neutral.tsx (#2100)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-07-06 14:42:51 +02:00
Sjur 054c63b161 Update toggle.tsx (#2099) 2023-07-06 14:42:12 +02:00
Julian Nymark f60ba32f97 split default example into separate examples (#2097)
* split default example into separate examples

* also keep the default

* remove unnecessary div wrapper for single elements
2023-07-06 13:28:26 +02:00
Ken 54811b394d ✨ Eksterne sider åpnes nå i ny fane 2023-07-06 13:14:33 +02:00
Ken c6b0570c4c 🔇 Fjernet API-access for tilbakemeldinger 2023-07-06 11:21:05 +02:00
Ken 8baa1ab0b4 🔒 Fjernet kommentarfelt på aksel 2023-07-05 09:24:10 +02:00
Ken 06ceeb3e6f 🐛 Fikset rouge ';' i preview 2023-07-04 21:55:21 +02:00
Ken 02f19858c7 🐛 Fikset sanity-auth for preview og edit-knapp 2023-07-04 21:51:21 +02:00
Ken 799e26a628 🐛 Fikset lenker på komponentside 2023-07-04 17:11:53 +02:00
Ken f5e5843916 Oppdatert sanity, Lister opp alle utdaterte artikler for forfatter (#2091) 2023-07-04 13:59:33 +02:00
github-actions[bot]andgithub-actions[bot] 4b8ed30554 Version Packages (#2090)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-03 14:38:52 +02:00
Ken 28430f1345 🐛 Fikset layout-bug i skjemakomponenter (#2089) 2023-07-03 14:34:50 +02:00
github-actions[bot]andgithub-actions[bot] d242325863 Version Packages (#2087)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-03 13:22:31 +02:00
Ken ae70bfa719 ReadOnly for skjemakomponenter (#2080) 2023-07-03 12:37:48 +02:00
Ken 0aef861622 📝 Readme-oppdatering 2023-06-30 14:33:58 +02:00
Ken 525b021e0f 📝 Oppdatert Switch-eksempler 2023-06-30 11:23:22 +02:00
Ken 761344c34e 🎨 Oppdatert sidebar-config for sanity 2023-06-30 10:34:39 +02:00
github-actions[bot]andgithub-actions[bot] a67f61c33f Version Packages (#2084)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-29 15:23:12 +02:00
Julian NymarkandKen b05958863b add close button to alert (#2079)
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-06-29 13:43:10 +02:00
Ken 883ae00dfa 💄 Fikset sidebar :before-element 2023-06-29 13:25:17 +02:00
github-actions[bot]andgithub-actions[bot] 6eb8a79092 Version Packages (#2082)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-28 11:35:27 +02:00
Ken 718b3204d8 🐛 Fikset i18n for textarea 2023-06-28 11:25:32 +02:00
Ken 45970ac0fb 🐛 UU dukket ikke opp i søk 2023-06-28 10:39:54 +02:00
Ken fe5e8ada74 🐛 Fikset capitalize på god-praksis tagger 2023-06-28 10:39:07 +02:00
Ken 3e625a5cb5 🐛 Underline brakk på windows for forside-kort 2023-06-28 10:06:23 +02:00
Ken edc3495ce6 🐛 Fikset text-decoration for windows på aksel.nav.no 2023-06-27 20:26:59 +02:00
Ken 2520bc7ff5 🎨 Fikset lenker brukt på Aksel.nav.no
🎨 Intro-cards shadows

💄 Komponentoversikt-cards

💄 Oppdatert lenkevisning for cards på aksel.nav.no
2023-06-27 15:25:06 +02:00
github-actions[bot]andgithub-actions[bot] 44446e753a Version Packages (#2078)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-26 13:38:24 +02:00
Halvor Haugan 4156326752 Chat: fjern border, gjør svg mindre, bytt om "subtle" og "neutral" (#2077) 2023-06-26 13:27:25 +02:00
Ken 23970486ed 🐛 fikset date-handling for preview av god-praksis 2023-06-26 12:31:36 +02:00
Ken a8f1069650 🎉 Automatisk changelog på aksel.nav.no
🔥 Fjernet unified fra dependencies

🐛 Fikset changelog-format, la inn støtte for emojies
2023-06-23 18:30:03 +02:00
Julian Nymark f9c8320b74 sort + reverse the semver entries (#2074) 2023-06-23 11:01:33 +02:00
Ken c4839a12ed 📝 Oppdatert PR-template, Changelog-cleanup (#2073) 2023-06-23 10:43:53 +02:00
Halvor Haugan 60f64d7f70 📝 Dropdown: Better Item examples (#2072) 2023-06-22 17:21:12 +02:00
github-actions[bot]andgithub-actions[bot] e32dbe5c5d Version Packages (#2071)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-22 15:23:42 +02:00
Ken de36269582 ✨ Oppdaterte shadow-tokens (#2041) 2023-06-22 15:12:42 +02:00
Julian Nymark 6cb6c52770 Changelog generator script (#2046) 2023-06-22 15:10:03 +02:00
Ken a877d24ed0 🐛 Fikset corder-bleed på komponentside-header 2023-06-21 17:10:43 +02:00
github-actions[bot]andgithub-actions[bot] a1b6332fa1 Version Packages (#2070)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-21 13:48:45 +02:00
Ken 99c08b8e4a Fikset bug i Popover/Helptext der popover gikk helt ut i kantene (#2069) 2023-06-21 13:44:59 +02:00
Ken d39ed906c6 🐛 Fikset ExpansionCard bug ved nesting (#2067) 2023-06-21 13:40:48 +02:00
github-actions[bot]andgithub-actions[bot] 3b31bd3d75 Version Packages (#2066)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-21 11:59:33 +02:00
Halvor HauganandKen b1625ba388 ✨ Chat: ny small-variant, justert design, forbedret UU (#2048)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-06-21 09:40:50 +02:00
Ken 269d06c277 📝 ErrorSummary prop-dokumentasjon 2023-06-20 15:47:52 +02:00
Ken 0c56273f3b 🐛 Fikset rekkefølge på button-stories 2023-06-20 15:41:13 +02:00
Ken ab6a96aed7 ♻️ Oppdatert komponent demoer (#2063) 2023-06-20 11:46:45 +02:00
Ken 9ee8a72082 🔥 Fjernet død kode, lazy-loader sanity-moduler bare brukt for preview 2023-06-19 19:53:50 +02:00
Ken c2e5a92d8e 🎉 Oppdatert søk (#2062) 2023-06-19 18:28:24 +02:00
Ken 6059aa59aa 🐛 Oppdatert playwright-config for mindre flaky tester 2023-06-19 16:21:13 +02:00
Ken b877ada408 🐛 Fikset playwright-tester 2023-06-19 15:11:59 +02:00
Ken 4e339f183e 🔊 Oppdatert amplitude (#2061) 2023-06-19 14:09:08 +02:00
Ken 1d62bf26ff 🛠️ Diverse småjustering for Aksel (#2060) 2023-06-19 13:19:57 +02:00
github-actions[bot]andgithub-actions[bot] da0fbc3299 Version Packages (#2057)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-19 13:02:23 +02:00
Ken 9f59e67e2a ⚡ Lazy-loading date-fns: sparer ~10kB first-load (#2058) 2023-06-19 12:53:28 +02:00
Ken ed7aafcac8 🎨 Oppdatert deploy image (#2059) 2023-06-19 12:53:08 +02:00
Ken dfbbe92a63 🎨 Helptext har nå en prop for wrapperClassName (#2056) 2023-06-19 11:48:53 +02:00
Ken 42b5af64ab 🐛 Timeline Period brakk ved bruk av JSODOM 2023-06-17 10:25:45 +02:00
Ken 329119fa04 💄 DoDont-ikon er nå høyrestilt 2023-06-16 16:21:19 +02:00
Ken 0fc80f45cb ♿ Fikset regression der sanity ikke lengre støttet skjermlesere 2023-06-16 16:07:37 +02:00
Ken 337b9fda13 🐛 Fikset inlinecode bruk i heading 2023-06-16 12:58:26 +02:00
github-actions[bot]andgithub-actions[bot] 659e835da9 Version Packages (#2055)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-15 16:38:08 +02:00
Ken e10f4375b1 Merge branch 'main' of https://github.com/navikt/aksel 2023-06-15 16:34:25 +02:00
Ken 9a8bb26c36 🐛 Timeline brakk ved bruk av JSDOM-tester 2023-06-15 16:33:40 +02:00
github-actions[bot]andgithub-actions[bot] 69aea38784 Version Packages (#2053)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-15 15:55:48 +02:00
Ken 8f16d1571e 🎨 Oppdatert ikoner (#2054) 2023-06-15 15:51:47 +02:00
Marianne Røsvik e2265c9a78 Added two new icons (#2047) 2023-06-15 15:06:48 +02:00
Ken 925aa7a140 🐛 OverridableComponent omitter nå 'as' (#2051) 2023-06-15 14:46:34 +02:00
Ken 7c17e40cac 🐛 Datepicker og Monthpicker lukker nå popover ved escape (#2052) 2023-06-15 14:46:07 +02:00
github-actions[bot]andgithub-actions[bot] 3c8889ea88 Version Packages (#2050)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-13 16:49:54 +02:00
Ken e060961050 🐛 Fikset bruk av text-subtle på skjemaelementer (#2049) 2023-06-13 16:45:35 +02:00
Ken 18aa4ee7fb Merge branch 'main' of https://github.com/navikt/aksel 2023-06-09 14:36:38 +02:00
Ken f44edd76a2 Merge branch 'next' 2023-06-09 14:31:11 +02:00
github-actions[bot]andgithub-actions[bot] 1fa636bdd5 Version Packages (#2044)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-09 14:16:43 +02:00
Ken 44a75acb6b 🐛 className ble ikke riktig forwardet til period 2023-06-09 14:14:15 +02:00
Ken 550faee900 💄 Checkboard-pattern for transparent visning av tokens 2023-06-09 13:53:29 +02:00
Karl O 88b6174b0b 📝 La til next-logger så backend logging får rett log-level (#2042) 2023-06-09 13:34:31 +02:00
Ken fbf016b3bd ✨ Forbedringer for Aksel.nav.no UI (#2043) 2023-06-09 13:05:59 +02:00
09fa503b98 initial template for PR (#2019)
* initial template for PR

* update template

* update template

* 📝 Oppdatert template

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-06-09 09:55:28 +02:00
Ken f5688485f5 ⬆️ Oppdatert Sanity 2023-06-08 18:43:14 +02:00
github-actions[bot]andgithub-actions[bot] 6385c4686e Version Packages (#2039)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-08 16:07:32 +02:00
Ken 30068dca3f 📝 La til jsdoc for skeleton-komponent 2023-06-08 16:03:27 +02:00
github-actions[bot]andgithub-actions[bot] 3aa04d2375 Version Packages (#2038)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-08 15:25:09 +02:00
Ken 91343563c9 🐛 Fikset markering av tekst internt i Skeleton-komponent 2023-06-08 15:21:52 +02:00
Ken d5c8112339 📝 Fikset typo i skeleton-docs 2023-06-08 15:02:24 +02:00
github-actions[bot]andgithub-actions[bot] e6cc9d1b4f Version Packages (#2031)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-08 14:49:16 +02:00
Ken db8c38a094 [Ny komponent] Skeleton (#1821) 2023-06-08 14:44:08 +02:00
Ken 35041e64eb Update README.md 2023-06-08 08:17:20 +02:00
Ken 690422d824 🐛 Fikset darkmode for skjemakomponenter 2023-06-07 20:10:28 +02:00
Ken b54bebd308 ⚡ Forbedret søk 2023-06-07 16:11:40 +02:00
Ken 8db194170c 🐛 Fikset chips.css bug etter merge 2023-06-07 15:45:00 +02:00
Ken 7b42f536aa 🎨 Oppdatert Chips-komponent (#2035) 2023-06-07 15:39:11 +02:00
Ken b2f796d681 💄 Text-subtle, icon-subtle til 700 nivå, form-description farger(#2036) 2023-06-07 15:22:02 +02:00
17d92c9ed5 add jsdoc (it's mostly copilot + some tweaks) (#2034)
* 📝 add jsdoc (it's mostly copilot + some tweaks)

* 😂 emojis

* 🏷️ add jsdoc for overridableComponents

* 🏷️ Oppdatert docgen for nestede komponenter

* 🎨 Oppdatert chat

* 🏷️ Dokumentert date-hooks

* 🏷️ Expansioncard-props

* 🏷️ Stepper.step jsdoc

* 🏷️ Tabs jsdoc

* 🏷️ Linkpaneltypes

* 🏷️ List jsdoc

* 🏷️ list jsdoc

* 🏷️ InternalHeader-docs

* 🏷️ jsdoc for dropdown

* 🏷️ Timeline jsdoc

---------

Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-06-07 14:19:34 +02:00
Ken 7bae5dce88 🎨 Fikset søketreff for CSS + overflow av ikonsøk-form 2023-06-06 15:43:38 +02:00
Ken 6aca0a4b6a 🎨 Data-tokens (#2032) 2023-06-06 13:49:31 +02:00
Ken 4f7fde22a3 🐛 Regex-fix for sanity-url er 2023-06-06 13:45:34 +02:00
Ken 0dad69a8df 💄 Fadein frontpage-cards 2023-06-05 22:34:37 +02:00
Julian Nymark c028f36e2b Indent prop added to accordion (#2027) 2023-06-05 19:38:44 +02:00
Ken 988fb36619 📝 Nettside-readme 2023-06-05 17:25:09 +02:00
Ken f61cd88627 📝 Oppdatert readme 2023-06-05 17:10:26 +02:00
github-actions[bot]andgithub-actions[bot] 7d62019a13 Version Packages (#2028)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-05 16:05:27 +02:00
Ken 83e3a1131a ⚰️ Fjernet kode for gamle pakker (#2029) 2023-06-05 15:58:53 +02:00
Ken 895bdc08e5 v4: Internal til Core, Datepicker ut av beta (#2026) 2023-06-05 15:05:31 +02:00
Ken 3c991e13d1 🐛 Fikset duplisert-id for komponent-eksempler 2023-06-05 14:50:42 +02:00
MaxandMaximilian Lloyd 0c24d57c6c 📝 Noen JSDoc eksempler (#2025)
Co-authored-by: Maximilian Lloyd <maximilian.oysta.lloyd@nav.no>
2023-06-05 09:14:48 +02:00
Ken 0f0041b71e 🎨 Forbedret ikonside og eksempel-navigering
🎨 Fungerende anchor-tag navigering for eksempler

🚚 Flyttet sections-kode i sidebar ut i egen hook

💄 Oppdatert tag
2023-06-05 08:52:21 +02:00
Ken da40cc405c ⬆️ Oppdatert sanity (#2021) 2023-06-02 20:31:14 +02:00
Ken c135cbe642 ⬆️ Oppdatert playwright-image til 1.33.0 versjon 2023-06-01 08:25:22 +02:00
Ken 2a2e9edbd7 ⬇️ Negradert playwright for å matche docker img-tag 2023-05-31 23:39:39 +02:00
Ken d22d6049e8 ⬆️ Oppdatert playwright-image til nyeste versjon 2023-05-31 23:26:17 +02:00
Ken f9bea26a29 🔥 Fjernet lenke til identitet da siden ikke lengre finnes 2023-05-31 23:17:17 +02:00
github-actions[bot]andgithub-actions[bot] 239017b07a Version Packages (#2018)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-31 15:39:05 +02:00
Julian Nymark 7615dbbb54 add dependency on postcss-value-parser (#2017) 2023-05-31 15:34:25 +02:00
Ken 4034eea298 🐛 Fikset release av stylelint 2023-05-31 15:03:16 +02:00
github-actions[bot]andgithub-actions[bot] 68501b4c8a Version Packages (#2015)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-31 14:29:19 +02:00
61c4114214 [WIP] aksel stylelint (#1973)
* working stylelint config + test rule

this commit is a good "base" for developing future stylelint rules

* merge ideas (sortof)

* delete test-rule + add URL to readme section

* flatten json object

* bundle token files at build time

* update lock file deps

* package distribution & version in error message

* rule for internal tokens

* rule for class name override

* remove config props

* fix: emit multiple errors for nodes in postcss-value-parser

* adjust error messages

* some tests

* final tests

* refactor

* no more regex

* update README.md

* update README.md (again)

* readme

* readme and usage example for aksel-design-token-exists

* move README of rule into top-level README

* update README

* update README

* move sources into /src, bookkeeping

* add aksel-stylelint to changeset.fixed

* set exports correctly (exposes ./recommended)

* bookkeeping, cleanup, refactor, remove test files

* Update README.md

* changeset

* fix urls

* update test for aksel-design-token-exists to cover all token files

* add more granular error catching

* cleanup, improve error message

* update tests + fix code that broke tests

* add rule: deprecate classes

* adjust aksel-design-token-exists

* adjust test for no-deprecated-classes

* refactor design-token-exists

* update README

* 📝 update README

* update readme

* refactor: split rules into smaller rules

* fix tests (deduplicate from refactor), fix plugin too

* fix meta name / ruleName -> ruleNamePackage refactor

* set internal dependencies (build time)

* set internal dependencies (build time)

* when building stylelint, always pull latest css & token files

* new lock

* test cache-busting

* ignore some lint rules

* deduplicate rulename

* bring back caching in ci.yml

* 📝 Oppdatert Package.json docs

* more helpful error messages

* 📝 Updated readme

* 📝 Updated prefixes for rules in readme

* 📝 Formateringsfeil i readme

* refactor ruleNames (shorter and better!)

* update one more rule name (I forgor)

* refactor names again (must have namespace)

* 🐛 Fikset intern bruk av lint-regler

* ⬆️ yarn lock sync

---------

Co-authored-by: Halvor Haugan <halvor.haugan@nav.no>
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
Co-authored-by: Ken <ken.aleksander@gmail.com>
2023-05-31 14:22:41 +02:00
Halvor HauganandKen b958d41a20 ✨ Tag: ny variant "moderate" (#2010)
Co-authored-by: Ken <26967723+KenAJoh@users.noreply.github.com>
2023-05-31 13:53:30 +02:00
Ken c3905aa2f8 🎨 linetermination fix for windows (#2014) 2023-05-31 13:53:00 +02:00
Ken 812a2347a0 ♿ Mindre uu-fiks for ikonside 2023-05-31 10:18:15 +02:00
Ken deb1c151bb Update README.md 2023-05-30 15:18:26 +02:00
Ken 784d17165d ♻️ Ikonside bruker nå CopyButton 2023-05-30 15:07:18 +02:00
Ken 1a894829f0 🎨 Search: Custom-button eksempel for aksel 2023-05-26 14:04:59 +02:00
Halvor Haugan e06a76b5c5 🐛 aksel-icons copyfiles-kommandoen fungerer nå på Win/Unix (#2007) 2023-05-25 22:35:49 +02:00
github-actions[bot]andgithub-actions[bot] 18d6f63e3e Version Packages (#2006)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-25 15:12:17 +02:00
Ken 4953e6725e 🐛 Ignore figma-plugin 2023-05-25 14:53:43 +02:00
Christian Skrøvseth 5533fbd5a3 Migrate CopyButton from deprecated to modern clipboard (#2005) 2023-05-25 14:40:22 +02:00
Ken 2c54cd077b 🎨 Icon-plugin (#1997) 2023-05-25 13:38:37 +02:00
Ken c84efa5ee9 🐛 Disable chromatic-snapshot av flaky button-story 2023-05-25 13:08:13 +02:00
Ken 9f3bcb8974 🐛 Endret rekkefølge på timeline-eksempler 2023-05-25 13:03:55 +02:00
github-actions[bot]andgithub-actions[bot] c8375ba46f Version Packages (#2002)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-25 12:36:22 +02:00
Ken 288cef591a Timeline viser popover på hover (#1995) 2023-05-25 12:25:26 +02:00
Ken aa3b4c22d6 🎨 Mulighet for manuell sortering av elementer i grunnleggende-sidebar 2023-05-24 18:26:38 +02:00
5605 changed files with 290988 additions and 87805 deletions

No files matched your search

+14 -13
View File
@@ -1,40 +1,41 @@
# Changesets
For versjonering bruker vi løsningen [Changesets](https://github.com/changesets/changesets) for [versjonering](https://semver.org/) og publisering av pakker.
Vi bruker [Changesets](https://github.com/changesets/changesets) for [versjonering](https://semver.org/) og publisering av pakker.
## Howto
## Lage ny versjon
- For å lage en ny versjons-entry: `yarn changeset`
- Velg pakkene som skal versjoneres med `arrowkeys` + `Space`
1. `yarn changeset`
2. Svar på spørsmålene som kommer opp:
`🦋 Which packages would you like to include?`
Trykk `Space` for å velge pakkene som skal versjoneres, for så trykke `Enter` for å gå videre.
Trykk `Space` for å velge pakkene som skal versjoneres, trykk så `Enter` for å gå videre.
`🦋 Which packages should have a major bump?`
Trykk `Enter` for å gå videre _*eller*_ velg pakkene som skal marjor-bumpes med `arrowkeys` + `Space`
Trykk `Enter` for å gå videre _eller_ velg pakkene som skal marjor-bumpes med `arrowkeys` + `Space`.
`🦋 Which packages should have a minor bump?`
Trykk `Enter` for å gå videre _*eller*_ velg pakkene som skal marjor-bumpes med `arrowkeys` + `Space`
Trykk `Enter` for å gå videre _eller_ velg pakkene som skal minor-bumpes med `arrowkeys` + `Space`.
Hvis du ikke velger major eller minor, så blir pakkene få en patch-bump
Hvis du ikke velger major eller minor, så vil pakkene få en patch-bump.
- Commit og push.
`Please enter a summary for this change`
Skriv inn en kort beskrivelse av endringen på formatet `<Komponent>: <gitmoji?> <Beskrivelse>`, f.eks. "Button: ✨ Add feature xyz".
3. Commit og push.
## Fixed versjonering
Alle base-pakkene våre har `fixed versjonering`. Dette tilsier at en bump på en av disse vil bumpe alle til samme versjon
Alle base-pakkene våre har `fixed versjonering`. Dette betyr at en bump på en av disse vil bumpe alle til samme versjon
```sh
"@navikt/ds-react",
"@navikt/ds-css",
"@navikt/aksel-icons",
"@navikt/ds-icons",
"@navikt/ds-tokens",
"@navikt/ds-tailwind",
"@navikt/ds-css-internal",
"@navikt/ds-react-internal",
"@navikt/ds-codemod"
```
+17 -6
View File
@@ -1,6 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "navikt/aksel" }],
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "navikt/aksel" }
],
"commit": false,
"fixed": [
[
@@ -8,19 +11,27 @@
"@navikt/ds-css",
"@navikt/ds-tokens",
"@navikt/ds-tailwind",
"@navikt/ds-css-internal",
"@navikt/ds-react-internal",
"@navikt/ds-codemod",
"@navikt/aksel-icons",
"@navikt/aksel",
"@navikt/ds-icons"
"@navikt/aksel-stylelint"
]
],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["shadow-dom", "aksel.nav.no", "@navikt/ds-navno"],
"ignore": [
"eslint-plugin-aksel-local",
"aksel-changelog",
"aksel-analyzer",
"aksel-workspace-scripts",
"aksel.nav.no",
"website",
"aksel-sanity-studio",
"aksel-icons-figma-plugin",
"aksel-mcp",
"playroom"
],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
+22
View File
@@ -0,0 +1,22 @@
name: Eksempel på bruk
description: Send et eksempel på ting fra Aksel som er brukt i det fri (tokens, komponenter, maler, etc)
title: "[Eksempel på bruk]: "
labels: ["dokumentasjon 📖"]
body:
- type: markdown
attributes:
value: |
Takk for at du bidrar til Aksel!
- type: input
id: title
attributes:
label: Lenke til side
description: Lenke til siden hvor eksemplet er
placeholder:
validations:
required: true
- type: textarea
id: examples
attributes:
label: Forklaring
description: Forklar om det er noe man må gjøre for å se eksemplet, eller hvor på siden det ligger
-2
View File
@@ -2,8 +2,6 @@ name: Ny komponent
description: Send et ønske om en eller flere nye komponenter
title: "[Ny komponent]: "
labels: ["nytt ✨", "forespørsel 🥰", "komponenter 🧩"]
assignees:
- KenAJoh
body:
- type: markdown
attributes:
-2
View File
@@ -2,8 +2,6 @@ name: Nytt ikon
description: Send et ønske om et eller flere nye ikoner
title: "[Nytt ikon]: "
labels: ["nytt ✨", "ikoner 🖼", "forespørsel 🥰"]
assignees:
- KenAJoh
body:
- type: markdown
attributes:
+9
View File
@@ -0,0 +1,9 @@
---
name: Bug Report
about: Meld inn bugs eller feil
title: "[BUG]"
labels: "bug \U0001F41B"
assignees: ""
---
## Hva forventet du å finne for dette søket?
@@ -2,8 +2,6 @@ name: Innspill til komponent
description: Send inn innspill til komponent
title: "[Innspill til komponent]: "
labels: ["forespørsel 🥰", "komponenter 🧩", "nytt ✨", "beta 🧪"]
assignees:
- KenAJoh
body:
- type: markdown
attributes:
-2
View File
@@ -2,8 +2,6 @@ name: Innspill til ikon
description: Send inn innspill til ikon
title: "[Tilbakemelding på ikon]: "
labels: ["forespørsel 🥰", "ikoner 🖼️"]
assignees:
- KenAJoh
body:
- type: markdown
attributes:
+15
View File
@@ -0,0 +1,15 @@
### Description
<!-- PR description/motivation, summary of changes, links to issue/slack discussion etc. -->
### Component Checklist 📝
- [ ] JSDoc
- [ ] Examples
- [ ] Documentation / Decision Records
- [ ] Storybook
- [ ] CSS class deprecations (`@navikt/aksel-stylelint/src/deprecations.ts`)
- [ ] Exports (`@navikt/core/react/src/index.ts` and `@navikt/core/react/package.json`)
- [ ] New component? CSS import (`@navikt/core/css/index.css`)
- [ ] Breaking change? Update migration guide. Consider codemod.
- [ ] Changeset (Format: `<Component>: <gitmoji?> <Text>` E.g. "Button: :sparkles: Add feature xyz")
+80
View File
@@ -0,0 +1,80 @@
name: "Build website"
description: "Builds Nextjs-website and published CDN-asssets to GCP if needed"
inputs:
use_cdn_assets:
description: "Use CDN assets, and upload build to GCP"
required: true
npm_auth_token:
description: "NPM Auth Token"
required: true
nais_id_provider:
description: "NAIS_WORKLOAD_IDENTITY_PROVIDER token"
required: true
nais_project_id:
description: "NAIS_MANAGEMENT_PROJECT_ID token"
required: true
sanity_read_token:
description: "Sanity read-only token allowing published and un-published documents"
required: true
sanity_read_no_drafts_token:
description: "Sanity read-only token allowing only published documents"
required: true
sanity_deploy_studio:
description: "Sanity studio deployment token"
required: false
next_encryption_key:
description: "Overrides default NEXT_SERVER_ACTIONS_ENCRYPTION_KEY for production builds"
required: false
production:
description: "Toggle to differentiate production build (inject stuff based on this)"
default: false
required: false
runs:
using: "composite"
steps:
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ inputs.npm_auth_token }}
- name: Run website tests
run: yarn workspace website test
shell: bash
- name: Make Next.js app use CDN assets
if: ${{ inputs.use_cdn_assets == 'true' }}
run: |
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
shell: bash
- name: Set production env var
if: ${{ inputs.production == 'true' }}
run: |
echo "PRODUCTION=true" >> aksel.nav.no/website/.env
shell: bash
- name: Update sanity manifest
if: ${{ inputs.production == 'true' && inputs.sanity_deploy_studio != '' }}
run: yarn update:sanity-manifest
env:
SANITY_AUTH_TOKEN: ${{ inputs.sanity_deploy_studio }}
shell: bash
- name: Build Next.js website
run: yarn build:next
env:
SANITY_READ: ${{ inputs.sanity_read_token }}
SANITY_READ_NO_DRAFTS: ${{ inputs.sanity_read_no_drafts_token }}
NEXT_SERVER_ACTIONS_ENCRYPTION_KEY: ${{ inputs.next_encryption_key }}
shell: bash
- name: Upload static files to Nav CDN
if: ${{ inputs.use_cdn_assets == 'true' }}
uses: nais/deploy/actions/cdn-upload/v2@master
with:
team: designsystem
source: ./aksel.nav.no/website/.next/static
destination: "/website/_next"
project_id: ${{ inputs.nais_project_id }}
identity_provider: ${{ inputs.nais_id_provider }}
+26
View File
@@ -0,0 +1,26 @@
name: "Setup Project"
description: "Checks out repo, sets up Node, installs dependencies and runs boot command."
inputs:
npm_auth_token:
description: "NPM Auth Token"
required: true
runs:
using: "composite"
steps:
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
cache: yarn
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn --immutable
shell: bash
env:
NPM_AUTH_TOKEN: ${{ inputs.npm_auth_token }}
- name: Boot (build packages)
run: yarn boot
shell: bash
+84
View File
@@ -0,0 +1,84 @@
# Aksel - Copilot Instructions
## Approach
- Narrow search space; don't replace reading code.
- Before editing: read target file + nearest related files (`index.ts`, story, test, exports).
- Prefer known paths/scripts over broad searches.
- Ignore release/deploy/changelog/ops scripts unless asked.
## Behavior
- No apologies, no "I think", no change summaries.
- Answer-first. 0-2 sentences max.
- No thinking aloud; do next edit. Explain only when asked or non-obvious.
- Show only what changes. Minimal diffs; don't paste whole files.
- Edits scoped to one file unless asked. Ask only when truly blocked.
- Favor perf/security; avoid re-renders, top-level side effects, unsafe HTML, env var leaks.
## Repo summary
- Yarn 4 workspaces monorepo: public React/CSS/tokens/icons/stylelint/CLI packages + docs site + playroom.
- Stack: TypeScript 6, React 19, Next.js 16, Storybook 10, Vitest 4, ESLint 9, Stylelint 17, Biome 2, Prettier 3.
- Node 22+, Yarn 4.12.0.
- `@navikt/*` must stay React 17 compatible.
## Start and validate
1. `corepack enable`
2. `yarn install`
3. `yarn boot`
- `yarn boot` after first install + after `yarn clean`.
- Full install needs `NPM_AUTH_TOKEN` for GitHub Packages.
Public-package-only: `yarn workspaces focus @navikt/aksel-icons @navikt/ds-tokens @navikt/ds-css @navikt/ds-react @navikt/ds-tailwind @navikt/aksel @navikt/aksel-stylelint`
## Definition of done
- Behavior/visual change: update impl + closest story + test.
- New public export: sync component `index.ts`, `src/index.ts`, `package.json` exports.
- User-facing change: add changeset unless told otherwise.
- Validate with narrowest workspace command first.
### Commands
- `yarn boot` - build all
- `yarn test` / `yarn lint` - all tests / all linting
- `yarn lint:eslint` / `yarn lint:css` / `yarn lint:biome`
- `yarn storybook` - root `:6006`
- `yarn storybook:aksel` - website examples `:6007`
- `yarn storybook:test` - browser tests (Playwright/Firefox)
- `yarn dev` - website `:3000`
- `yarn clean` - remove build artifacts
- `yarn workspace @navikt/ds-react build|test`
- `yarn workspace website test`
- `yarn workspace playroom sync-imports`
`yarn lint` fails if playroom imports stale → `yarn workspace playroom sync-imports`.
## Where to edit
- `@navikt/core/react/src/<component>/` - component source, index, stories
- `@navikt/core/react/src/index.ts` + `package.json` exports - public API surface
- `@navikt/core/css/src/` - component CSS
- `@navikt/core/tokens/src/` - design tokens
- `@navikt/core/tailwind/` - Tailwind preset
- `@navikt/aksel-icons/icons/` - source SVGs (`src/` generated)
- `@navikt/aksel-stylelint/src/` - Stylelint rules
- `@navikt/aksel/src/` - CLI and codemods
- `aksel.nav.no/website/` - Next.js docs site
- `apps/playroom/` - playroom
- `apps/mcp-server/` - MCP server
- `apps/figma-icon-plugin/` - Figma plugin
- Root: `eslint.config.js`, `stylelint.config.mjs`, `biome.json`, `tsconfig.json`, `.storybook/`
## Coding defaults
- Small diffs. No drive-by refactors or new deps unless asked.
- Copy nearest existing pattern before writing new code.
- Stable public APIs. Prefer additive props/exports.
- `node:` imports for Node builtins. Never import from `esm/`/`cjs/` output.
- Import order: `@navikt/*`, `@/*`, relative. (Prettier sorts)
- Preserve JSDoc on public props/components when changing public APIs.
- Reuse helpers: `cl`, `composeEventHandlers`, `useId`, `omit`, `useClientLayoutEffect`, `useEventListener`.
+61
View File
@@ -0,0 +1,61 @@
version: 2
registries:
npm-github:
type: npm-registry
url: https://npm.pkg.github.com
scope: "@navikt"
token: ${{ secrets.READER_TOKEN }}
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: monday
time: "04:00"
registries:
- npm-github
groups:
sanity:
patterns:
- "sanity"
- "sanity-*"
- "@sanity/*"
- "next-sanity"
- "@portabletext/*"
eslint:
patterns:
- "eslint"
- "@eslint/*"
react:
patterns:
- "react"
- "react-dom"
storybook:
patterns:
- "*storybook*"
vitest:
patterns:
- "vitest"
- "@vitest/*"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: monday
time: "04:00"
registries:
- npm-github
groups:
actions:
patterns:
- "*"
- package-ecosystem: docker
directories:
- "/aksel.nav.no"
- "/apps/*"
schedule:
interval: weekly
day: monday
time: "04:00"
@@ -0,0 +1,78 @@
---
description: >
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman
while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra.
Always use caveman for code-related questions unless spesificed otherwise. For non-code topics, use caveman if user seems to want quick, concise answers.
applyTo: "**"
---
# caveman
ACTIVE EVERY RESPONSE.
default: full
switch mode:
- "/caveman lite" → lite
- "/caveman full" → full
- "/caveman ultra" → ultra
- "stop caveman" | "normal mode" → off
persist: keep last state
## intensity
| Level | What change |
| --------- | ------------------------------------------------------------------------------------------------------------- |
| **lite** | short sentences, no filler, keep grammar |
| **full** | fragments ok, drop articles, short words. Classic caveman |
| **ultra** | Abbreviate (DB/auth/config/req/res/fn/impl), fragments, abbrev (db/api/req/res/fn), arrows (→), minimal words |
Example - "Why React component re-render?"
- lite: "Your component re-renders because you create a new object reference each render. Wrap it in `useMemo`."
- full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."
- ultra: "Inline obj prop → new ref → re-render. `useMemo`."
## global rules
- no filler (just/really/basically/etc)
- no pleasantries
- no hedging
- keep tech exact
- no long sentences
- prefer symbols (→, =)
## patterns
Patterns: `[thing] [action] [reason]. [next step].`
## examples
lite:
"Component re-renders because you create a new object each render. Use useMemo."
full:
"New object each render → new ref → re-render. useMemo."
ultra:
"inline obj → new ref → re-render. fix: useMemo."
## auto-Clarity
Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done.
Example - destructive op:
> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
>
> ```sql
> DROP TABLE users;
> ```
>
> Caveman resume. Verify backup exist first.
## boundaries
Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert. Level persist until changed or session end
@@ -0,0 +1,42 @@
---
description: "Code review instructions used when reviewing pull requests."
applyTo: "**"
excludeAgent: ["coding-agent"]
---
# Code review focus
Review for issues that could block release, surprise users, or create maintenance risk. Prefer high-signal findings over style-only comments.
## What to check
### 1. Public API and behavior
- New or changed APIs should match existing naming, params, defaults, and behavior patterns.
- Watch for breaking changes, regressions, and accidental behavior changes in public components, hooks, CSS, tokens, and CLI output.
- Avoid introducing new patterns unless the change clearly justifies them.
### 2. Documentation and examples
- Public components and exported APIs should have accurate JSDoc, including `@default` where it adds clarity.
- Check whether Storybook stories, website examples, and decision records need updates to match the new behavior.
### 3. Tests
- Flag missing or insufficient tests for changed behavior, edge cases, and regressions.
- Prefer tests that prove the contract users rely on, not just implementation details.
### 4. CSS and styling
- If CSS class names are removed, verify deprecation handling in `@navikt/aksel-stylelint/src/deprecations.ts`.
- If new CSS files or selectors are added, confirm they follow the repo's import and naming conventions.
### 5. Exports and packaging
- New public exports must be wired through the correct `index.ts` files and `package.json` exports when relevant.
- Check that release-facing entry points stay consistent across packages.
### 6. Changesets and migrations
- User-facing changes should include a changeset with a clear summary and impact.
- Breaking changes should also include a codemod when needed.
@@ -0,0 +1,11 @@
---
description: "JS/TS code conventions."
applyTo: "**/*.tsx", "**/*.jsx", "**/*.ts", "**/*.js"
---
# JS/TS instructions
- Prefer `for...of` over `Array.forEach`.
- Named exports; type exports separate from value exports.
- Group exports at bottom: values first, then types.
- In `*.stories.*`, keep default export at top.
@@ -0,0 +1,17 @@
---
description: "ds-react components and component CSS."
applyTo: "@navikt/core/react/src/**", "@navikt/core/css/src/**"
---
# ds-react component instructions
- Read full component folder before editing.
- Preserve `forwardRef`, `className`, `...rest`, `as`/`OverridableComponent` patterns.
- `@navikt/*` must stay React 17 compatible. No React 18/19-only APIs; use internal `useId` etc.
- `@navikt/*` TSX: import React explicitly (classic JSX).
- Component `index.ts` starts with `"use client"`.
- Use tokens, not hardcoded values. Token names: `--ax-*` (public), `--__axc-*` (internal).
- Follow CSS nesting, `data-*` selectors, `focus-visible`, `forced-colors`, reduced-motion.
- Prettier formats CSS; Biome lint-only.
- Behavior/visual change: update nearest story + test.
- Public component change: sync component `index.ts`, `src/index.ts`, `package.json` exports.
@@ -0,0 +1,14 @@
---
description: "Tests and stories."
applyTo: "**/*.test.*", "**/*.stories.tsx"
---
# Testing and Storybook instructions
- Prefer story `play` functions + `yarn storybook:test` for user flows; Vitest for logic/non-browser.
- Prefer focused assertions over snapshots unless nearby tests use them.
- Cover main path + 1-2 meaningful edge cases.
- UI behavior change: update nearest story + test in same change.
- Testing Library: query by role and name.
- Stories use `@storybook/react-vite`, live next to components.
- Prefer `yarn storybook` for component work over `yarn dev`.
@@ -0,0 +1,12 @@
---
description: "Website and playroom."
applyTo: "aksel.nav.no/website/**, aksel.nav.no/playroom/**"
---
# Website and playroom instructions
- Stay in router already used nearby; don't mix `app/`/`pages/`.
- `pages/eksempler/**` and `pages/templates/**`: only import from `@navikt/*` and `react`.
- Reuse nearby utils/patterns before adding abstractions.
- Prefer `yarn storybook:aksel` for examples/templates; `yarn dev` only for app-specific behavior.
- `yarn storybook:aksel` needs no secrets. `yarn dev` needs `SANITY_READ_NO_DRAFTS`.
@@ -0,0 +1,34 @@
---
name: content-modeling-best-practices
description: Structured content modeling guidance for schema design, content architecture, content reuse, references versus embedded objects, separation of concerns, and taxonomies across Sanity and other headless CMSes. Use this skill when designing or refactoring content types, deciding field shapes, debating reusable versus nested content, planning omnichannel content models, or reviewing whether a schema is too page-shaped or presentation-driven.
---
# Content Modeling Best Practices
Principles for designing structured content that's flexible, reusable, and maintainable. These concepts apply to any headless CMS but include Sanity-specific implementation notes.
## When to Apply
Reference these guidelines when:
- Starting a new project and designing the content model
- Evaluating whether content should be structured or free-form
- Deciding between references and embedded content
- Planning for multi-channel content delivery
- Refactoring existing content structures
## Core Principles
1. **Content is data, not pages** — Structure content for meaning, not presentation
2. **Single source of truth** — Avoid content duplication
3. **Future-proof** — Design for channels that don't exist yet
4. **Editor-centric** — Optimize for the people creating content
## References
Start with the reference that matches the modeling decision in front of you, instead of loading every topic at once. See `references/` for detailed guidance on specific topics:
- `references/separation-of-concerns.md` — Separating content from presentation
- `references/reference-vs-embedding.md` — When to use references vs embedded objects
- `references/content-reuse.md` — Content reuse patterns and the reuse spectrum
- `references/taxonomy-classification.md` — Flat, hierarchical, and faceted classification
@@ -0,0 +1,127 @@
# Content Reuse Patterns
Effective content models maximize reuse while minimizing duplication. Here are patterns for achieving both.
## The Content Reuse Spectrum
```
Full Duplication ←————————————————→ Full Reference
(Copy everything) (Link to one source)
```
Most real-world content sits somewhere in between.
## Pattern 1: Shared Components
Create reusable content blocks that can be embedded anywhere.
**Use case:** Testimonials, FAQs, CTAs that appear on multiple pages.
```typescript
// Standalone testimonial documents
defineType({
name: "testimonial",
type: "document",
fields: [
defineField({ name: "quote", type: "text" }),
defineField({ name: "author", type: "string" }),
defineField({ name: "company", type: "string" }),
],
});
// Reference in page builders
defineField({
name: "pageBuilder",
type: "array",
of: [{ type: "reference", to: [{ type: "testimonial" }] }],
});
```
## Pattern 2: Shared Field Sets
Extract common fields into reusable definitions.
**Use case:** SEO fields, social metadata, common dates.
```typescript
// Shared field definition
export const seoFields = [
defineField({ name: "seoTitle", type: "string" }),
defineField({ name: "seoDescription", type: "text" }),
defineField({ name: "ogImage", type: "image" }),
];
// Spread into multiple types
defineType({
name: "page",
fields: [defineField({ name: "title", type: "string" }), ...seoFields],
});
defineType({
name: "post",
fields: [defineField({ name: "title", type: "string" }), ...seoFields],
});
```
## Pattern 3: Taxonomy References
Centralize classification for consistent tagging.
**Use case:** Categories, tags, topics that span content types.
```typescript
// Central taxonomy
defineType({
name: "category",
type: "document",
fields: [
defineField({ name: "title", type: "string" }),
defineField({ name: "slug", type: "slug" }),
],
});
// Used across content types
defineField({
name: "categories",
type: "array",
of: [{ type: "reference", to: [{ type: "category" }] }],
});
```
## Pattern 4: Content Fragments
Small, reusable pieces that combine into larger content.
**Use case:** Bios, addresses, contact info.
```typescript
// Fragment type
defineType({
name: "contactInfo",
type: "object",
fields: [
defineField({ name: "email", type: "email" }),
defineField({ name: "phone", type: "string" }),
defineField({ name: "address", type: "text" }),
],
});
// Reused across types
defineType({
name: "office",
fields: [
defineField({ name: "name", type: "string" }),
defineField({ name: "contact", type: "contactInfo" }),
],
});
```
## Anti-Pattern: Over-Abstraction
Not everything needs to be reusable. If content is only used in one place, embedding is simpler.
**Signs of over-abstraction:**
- References that are only used once
- Editors navigating multiple documents for one page
- Complex queries joining rarely-shared content
@@ -0,0 +1,93 @@
# Reference vs Embedding Content
When should content be linked (referenced) vs copied (embedded)? This decision affects reusability, query complexity, and editing workflows.
## The Trade-offs
| Aspect | Reference | Embedded Object |
| ---------------- | ----------------------------------- | ------------------------- |
| Reusability | ✅ Shared across documents | ❌ Copied per document |
| Single source | ✅ Update once, reflects everywhere | ❌ Must update each copy |
| Query complexity | Requires joins/expansion | Inline, simpler queries |
| Editing UX | Separate editing interface | All fields in one place |
| Independence | Can exist on its own | Only exists within parent |
## When to Reference
Use references when content:
- **Is reusable** — Same author across many articles
- **Needs central management** — Update product info once
- **Has its own lifecycle** — Published/draft independent of parent
- **Should stay in sync** — Price changes reflect everywhere
**Examples:**
- Author profiles
- Product catalog items
- Shared testimonials
- Category taxonomy
- Reusable CTAs
## When to Embed
Use embedded objects when content:
- **Is unique to this document** — Page-specific hero
- **Doesn't make sense alone** — SEO metadata
- **Should be copied, not linked** — Historical snapshot
- **Simplifies editing** — All fields in one form
**Examples:**
- SEO metadata
- Page-specific sections
- Address information
- Social links
- Configuration options
## Sanity Implementation
```typescript
// Reference: Author is reusable
defineField({
name: "author",
type: "reference",
to: [{ type: "author" }],
});
// Embedded: SEO is page-specific
defineField({
name: "seo",
type: "object",
fields: [
defineField({ name: "title", type: "string" }),
defineField({ name: "description", type: "text" }),
],
});
```
## The Hybrid Approach
Sometimes you want both: a reference for the canonical data, plus embedded overrides.
```typescript
defineField({
name: "featuredProduct",
type: "object",
fields: [
defineField({
name: "product",
type: "reference",
to: [{ type: "product" }],
}),
defineField({
name: "overrideTitle",
type: "string",
description: "Optional: Override the product title for this context",
}),
],
});
```
Query uses `coalesce(overrideTitle, product->title)`.
@@ -0,0 +1,69 @@
# Separation of Content and Presentation
The most important principle in structured content: **separate what content IS from how it LOOKS**.
## The Problem
When content is tied to presentation:
- Redesigns require content migration
- Content can't be reused across channels (web, mobile, voice)
- Editors make design decisions instead of content decisions
- A/B testing requires duplicate content
## The Principle
Model content based on **meaning and purpose**, not visual appearance.
### Bad: Presentation-Focused
```
BigHeroText → What if we want small heroes?
RedButton → What if brand colors change?
ThreeColumnLayout → What if mobile needs one column?
LeftSidebar → Position is a frontend concern
MobileImage → Device-specific content is fragile
```
### Good: Meaning-Focused
```
Headline → The main message (render however)
CallToAction → An action we want users to take
Features → A list of things (columns decided by frontend)
RelatedContent → Content relationships (position by context)
Image → One image with responsive crops
```
## Testing Your Model
Ask: "If we completely redesigned the site, would these field names still make sense?"
- `threeColumnFeatures` → ❌ Fails (what if 2 columns?)
- `features` → ✅ Works (describes the content's purpose: a list of product features)
- `blueHighlightBox` → ❌ Fails (what if we go purple?)
- `callout` → ✅ Works (describes the content's role: an attention-grabbing aside)
## Sanity Implementation
```typescript
// ❌ Avoid presentation-focused names
defineField({ name: "bigHeroText", type: "string" });
defineField({ name: "fontSize", type: "number" });
defineField({ name: "backgroundColor", type: "color" });
// ✅ Use meaning-focused names
defineField({ name: "headline", type: "string" });
defineField({
name: "emphasis",
type: "string",
options: { list: ["standard", "prominent"] },
});
defineField({
name: "tone",
type: "string",
options: { list: ["neutral", "warning", "success"] },
});
```
The frontend translates `tone: 'warning'` to visual styles. Content stays semantic.
@@ -0,0 +1,150 @@
# Taxonomy and Classification
Organizing content with taxonomies enables filtering, navigation, and content relationships. Well-designed taxonomies scale; poorly designed ones become maintenance nightmares.
## Types of Classification
### Flat Taxonomy
Simple list of terms with no hierarchy.
**Use for:** Tags, simple categories
**Example:** Blog tags: "javascript", "react", "tutorial"
```typescript
defineType({
name: "tag",
type: "document",
fields: [
defineField({ name: "title", type: "string" }),
defineField({ name: "slug", type: "slug" }),
],
});
```
### Hierarchical Taxonomy
Terms with parent-child relationships.
**Use for:** Product categories, content sections
**Example:** Electronics > Phones > Smartphones
```typescript
defineType({
name: "category",
type: "document",
fields: [
defineField({ name: "title", type: "string" }),
defineField({ name: "slug", type: "slug" }),
defineField({
name: "parent",
type: "reference",
to: [{ type: "category" }],
description: "Parent category (leave empty for top-level)",
}),
],
});
```
### Faceted Classification
Multiple independent dimensions.
**Use for:** Complex filtering (e-commerce)
**Example:** Filter by color AND size AND price range
```typescript
// Multiple taxonomy types
defineField({ name: "color", type: "reference", to: [{ type: "color" }] });
defineField({ name: "size", type: "reference", to: [{ type: "size" }] });
defineField({
name: "material",
type: "reference",
to: [{ type: "material" }],
});
```
## Design Principles
### 1. Mutual Exclusivity (When Appropriate)
Categories should be distinct. If items frequently belong to multiple categories, consider tags instead.
**Categories:** One primary classification
**Tags:** Many optional classifications
### 2. User-Centric Naming
Use terms your audience uses, not internal jargon.
**Bad:** "Content Assets" (internal term)
**Good:** "Resources" or "Downloads" (user term)
### 3. Balanced Depth
Too shallow: Everything lumped together
Too deep: Users can't find anything
**Rule of thumb:** 3-4 levels max for hierarchies
### 4. Scalable Structure
Design for 10x growth. Will your structure work with 10,000 items?
## Querying Taxonomies
### Get all items in a category
```groq
*[_type == "product" && category._ref == $categoryId]
```
### Get items in category OR children
```groq
// First get all descendant category IDs
*[_type == "product" && category._ref in
*[_type == "category" && (
_id == $categoryId ||
parent._ref == $categoryId ||
parent->parent._ref == $categoryId
)]._id
]
```
### Get category tree
```groq
*[_type == "category" && !defined(parent)]{
title,
slug,
"children": *[_type == "category" && parent._ref == ^._id]{
title,
slug,
"children": *[_type == "category" && parent._ref == ^._id]{
title,
slug
}
}
}
```
## Common Mistakes
### Over-categorization
Creating a category for everything results in mostly-empty categories.
**Fix:** Start minimal, add categories as content grows.
### Inconsistent Granularity
Some categories broad ("Technology"), others narrow ("React 18 Server Components").
**Fix:** Define clear criteria for category creation.
### No Governance
Anyone can create taxonomy terms, leading to duplicates and inconsistency.
**Fix:** Limit who can create/edit taxonomy documents. Use validation.
@@ -0,0 +1,297 @@
---
name: ds-component-restructure
description: "Restructure a ds-react component's files into canonical folder/naming conventions. Use when reorganizing a component's file layout, splitting a monolithic component file, or renaming files to match domain conventions."
argument-hint: "Path to component folder, e.g. @navikt/core/react/src/accordion"
---
# ds-component-restructure
Restructure a `ds-react` component folder to follow canonical conventions — without breaking the public API.
## Canonical Structure
```
<component>/
├── index.ts # "use client" + re-exports from root
├── <Component>.stories.tsx # Storybook stories
├── <Component>.tests.stories.tsx # Storybook play-tests (only if play tests exist)
├── <Component>.meta.ts # Meta info for component. Used for documentation generation.
├── root/
│ ├── <Component>Root.tsx # Main compound component + sub-component namespace
│ ├── <Component>Root.context.ts # Context (if shared across sub-components)
│ ├── <Component>Root.test.ts # Unit tests for root (if needed)
│ └── use<Hook>.ts # Files for root-level hooks (if needed)
├── <subcomponent>/ # One dir per sub-component
│ ├── <Component><Subcomponent>.tsx
│ ├── <Component><Subcomponent>.test.ts # Unit tests for sub-component (if needed)
│ └── use<Hook>.ts # Files for sub-component-level hooks (if needed)
├── helpers/
│ ├── <helper-name>.ts
│ └── <helper-name>.test.ts # Unit tests co-located with helper
└── <Component>.types.ts # Shared types (if needed across multiple files)
```
### Naming Rules
| What | Pattern | Example |
| ---------------------- | --------------------------------------- | ----------------------------- |
| Root component file | `<Component>Root.tsx` | `AccordionRoot.tsx` |
| Sub-component file | `<Component><Subcomponent>.tsx` | `AccordionItem.tsx` |
| Internal sub-component | `<Component><Subcomponent>Internal.tsx` | `DialogBackdropInternal.tsx` |
| Sub-component dir | kebab-case sub-component name | `item/` |
| Context file | `<Component>Root.context.ts` | `AccordionRoot.context.ts` |
| Shared types file | `<Component>.types.ts` | `Accordion.types.ts` |
| Stories | `<Component>.stories.tsx` | `Accordion.stories.tsx` |
| Play-test stories | `<Component>.tests.stories.tsx` | `Accordion.tests.stories.tsx` |
| Unit test file | `<filename>.test.ts(x)` | `useAccordion.test.ts` |
| Meta file | `<Component>.meta.ts` | `Accordion.meta.ts` |
| `index.ts` | always `index.ts` | `index.ts` |
## Procedure
### 1. Read the Component
Read every file in the component folder — `index.ts`, all `.tsx`/`.ts` source files, meta file, stories, and test stories. Ignore inconsistencies in file naming and structure; the goal is to fix those, not preserve them. Use the `component`-field in the meta file to determine the proper naming if unsure.
**Done when:** every file's role (component, hook, type, context, test, metadata) is known, and every symbol currently exported from `index.ts` is recorded.
### 2. Map Files to Target Structure
Build this table before touching any files:
| Old path | New path | Renamed? | Publicly exported? | Importers to update |
| ------------------- | --------------------------- | -------- | ------------------ | --------------------- |
| `DialogTrigger.tsx` | `trigger/DialogTrigger.tsx` | No | Yes | `root/DialogRoot.tsx` |
| ... | | | | |
For each file:
- Determine new path and whether it moves/renames
- Check whether content needs splitting (e.g. types → `<Component>.types.ts`)
- List every file that imports it (grep for the filename or exported symbol)
- Flag circular dep risks: context importing sub-components, helpers importing component files, types importing non-types
Resolve circular deps before proceeding: move shared pieces to a lower-level file (types → `.types.ts`, utilities → `helpers/`).
**Done when:** every file in the component folder has a row in the table, and every circular-dependency risk is resolved or explicitly noted.
### 3. Create New Files
For each row in the mapping table where the path changes:
1. Create the file at the new path with all import paths updated to reflect new locations
2. Update every file in the "Importers to update" column — use the mapping table, don't rely on memory
3. Do NOT delete old files yet
> **Case-only renames** (path differs only in letter casing, e.g. `heading.stories.tsx` → `Heading.stories.tsx`) must NOT use the create-new + delete-old flow. On case-insensitive filesystems (macOS and Windows default) the two paths resolve to the **same file**, so creating the new file overwrites the old and the later "delete old" step destroys your content — and git records no rename. Handle these with the two-step `git mv` in the [Case-only renames](#case-only-renames) edge case instead.
### 4. Update Stories
Move stories to component root dir. If stories import from internal paths, update those paths.
**Exception:** A `stories/` subdirectory is acceptable if it already exists — do not flatten it.
**Casing:** Story filenames follow `<Component>.stories.tsx` (PascalCase). When the existing file is lowercase (e.g. `heading.stories.tsx`), this is a **case-only rename** — follow the [Case-only renames](#case-only-renames) procedure, do not create + delete.
### 5. Update `index.ts`
All exports are **named** — no `default` exports anywhere. The component `index.ts` re-exports the compound component, its sub-components, and their types from the root file:
```ts
"use client";
export {
<Component>, // compound root (named)
<Component>Trigger, // sub-components (named)
// ...
} from "./root/<Component>Root";
export type {
<Component>Props,
<Component>TriggerProps,
// ...
} from "./root/<Component>Root";
```
Group values first, then types. If types live in `<Component>.types.ts`, re-export them from there.
#### Compound root file export pattern
In `<Component>Root.tsx`, assemble the compound component with `Object.assign` — **do not** use an `as <Component>Component` cast or a dedicated `<Component>Component` interface:
```tsx
const <Component>Root = forwardRef<HTMLDivElement, <Component>Props>((props, ref) => {
// ...
});
/**
* Component-level JSDoc (description, `@see`, `@example`) goes directly
* above the `Object.assign` — this is the exported `<Component>` value.
*/
const <Component> = Object.assign(<Component>Root, {
/**
* @see 🏷️ {@link <Component>TriggerProps}
*/
Trigger: <Component>Trigger,
// ...
});
export { <Component>, <Component>Trigger };
export type { <Component>Props, <Component>TriggerProps };
```
Why `Object.assign` instead of `as`: the cast types the const as an interface that has no runtime `valueDeclaration`, so `react-docgen-typescript` (used by `yarn docgen:meta`) fails to extract props and can't document the component when it is exported via a grouped `export { }` statement. `Object.assign` lets TypeScript infer the intersection type from the value, so metadata generation works with named, bottom-of-file exports.
Sub-component files follow the same rule — named value export plus named type export at the bottom, no inline `export interface` and no default:
```tsx
interface <Component>TriggerProps extends React.HTMLAttributes<HTMLDivElement> {
// ...
}
const <Component>Trigger = forwardRef<HTMLDivElement, <Component>TriggerProps>(/* ... */);
export { <Component>Trigger };
export type { <Component>TriggerProps };
```
### 6. Update Meta File
Update imports in `<Component>.meta.ts` to reflect new paths. If the meta file imports from the component's `index.ts`, no changes are needed.
If component has no meta file, create one in the component root with the following content based on existing patterns.
Note that each standalone component should have a meta file. But a "sub-component" (like `AccordionItem`) does not need a meta file.
### 7. Validate No Breaking Changes
**Export diff.** Before deleting old files, compare the exported names recorded during Step 1 against the new `index.ts`. Every name must be present:
- Exports in new index.ts that are missing from original → regression
- Exports in original that are missing from new index.ts → missing export (breaking change)
Concretely: grep for `export` lines in both versions and diff them. All component names and type names must match exactly.
**Build.** Run `yarn workspace @navikt/ds-react build` — must succeed with no TypeScript errors.
**Package root.** Verify `@navikt/core/react/src/index.ts` still re-exports the component. No changes needed there unless the component's `index.ts` path changed (it shouldn't).
**No case-duplicate tracked paths.** This is the most common restructure bug. On case-insensitive filesystems (macOS, Windows) git can end up tracking **two** entries that differ only in casing (e.g. `accordion.stories.tsx` **and** `Accordion.stories.tsx`) while the working tree shows only one file. The stale entry then breaks tests and checkout on other machines. `ls` / file search will NOT reveal it — you must ask git. Run:
```sh
git ls-files | awk '{l=tolower($0); if(seen[l]++) print "CASE-DUP:", $0}'
```
Any output is a leftover. Remove the stale entry from the index by its **exact old path** (this does not touch the correctly-cased file on disk):
```sh
git rm --cached '<exact old lowercase path>'
```
Then confirm only the intended casing remains, e.g. `git ls-files '*<component>*stories*'`.
**Done when:** the export diff is empty, the build succeeds, the package-root re-export is verified, and `git ls-files` reports no case-duplicate paths.
### 8. Remove Old Files
Only after verifying new files are correct and `index.ts` exports match the original, delete the old files.
Skip any rows already moved with `git mv` (case-only renames and other `git mv` moves) — there is no separate old file to delete for those.
### 9. Unit Tests
Unit tests live next to the file they test — same directory, same base name with `.test.ts` / `.test.tsx` suffix.
| What to test | File location |
| ---------------------- | --------------------------------------------------- |
| Helper utility | `helpers/<helper-name>.test.ts` |
| Sub-component logic | `<subcomponent>/<Component><Subcomponent>.test.tsx` |
| Root component / hooks | `root/<Component>Root.test.tsx` |
| Context helpers | `root/<Component>Root.context.test.ts` |
Do NOT move existing test files unless their source file moves. When moving a source file, move its test file with it and update import paths.
## Edge Cases
### Case-only renames
A rename that changes **only letter casing** (e.g. `heading.stories.tsx` → `Heading.stories.tsx`, or `accordion.tsx` → `Accordion.tsx`) is a trap on case-insensitive filesystems (macOS and Windows defaults):
- Both paths point to the **same** file, so `create_file` at the new path overwrites the old content, and the Step 8 "delete old" then removes it entirely.
- git does not see a rename (`core.ignorecase=true`), so history is lost and other machines get checkout/case-collision conflicts.
Do the rename in **two `git mv` steps through a temporary distinct name** so git records it and it works on every filesystem:
```sh
git mv heading.stories.tsx heading.stories.tmp.tsx
git mv heading.stories.tmp.tsx Heading.stories.tsx
```
Then edit the file's contents/imports in place. Skip the create-new + delete-old flow for these rows entirely.
Guidelines:
- Prefer `git mv` for **all** moves/renames (not just case-only) so history is preserved; only fall back to create + delete when the file content is being split or substantially rewritten.
- Detect case-only renames while building the Step 2 mapping table: compare old vs new path lowercased — if they're equal but the raw paths differ, mark the row as case-only.
- The temporary name must differ by more than case (add `.tmp`), otherwise the same collision reoccurs.
### Flat components without sub-components
Leave flat components flat - do NOT introduce subdirs unless the component contains internal utility-components (files that render JSX but are not public sub-components). If such a utility-component exists, move it to its own subdir following the canonical naming.
Example: `button/Button.tsx` has no other sub-components, so should stay in root.
### `parts/` directory
If the component uses a `parts/` dir, break it up into separate sub-component dirs.
### Internal sub-components
Sub-components that are implementation details (not exported publicly) use the same dir/file naming as public ones (see Naming Rules) with an `Internal` suffix, but must NOT be exported from `index.ts`:
```
backdrop/
└── DialogBackdropInternal.tsx ← internal, NOT exported from index.ts
```
### Nested subcomponents
Do NOT nest subcomponent dirs inside other subcomponent dirs. All sub-component dirs must be direct children of the component root:
```
# Wrong
dialog/
└── header/
├── DialogHeader.tsx
└── title/
└── DialogTitle.tsx
# Correct
dialog/
├── header/
│ └── DialogHeader.tsx
└── title/
└── DialogTitle.tsx
```
## Constraints
- **No breaking changes.** Public export names and prop shapes must be identical after restructuring.
- **Named exports only.** No `default` exports; group named exports at the bottom of each file (values first, then types).
- **Compound roots use `Object.assign`.** No `as <Component>Component` cast or `<Component>Component` interface — it breaks `yarn docgen:meta` prop extraction.
- **React 17 compatible.** No React 18/19-only APIs. Import React explicitly in `.tsx` files.
- `index.ts` must start with `"use client"`.
- Use tokens, not hardcoded values.
- Preserve `forwardRef`, `className`, `...rest`, `as`/`OverridableComponent` patterns.
- Keep JSDoc on public props and components. The component-level JSDoc block sits directly above the `Object.assign` call; sub-component `@see` tags go on the keys inside the `Object.assign` object literal.
## Reference Files
- Canonical example: `@navikt/core/react/src/dialog/`
- Package public API: `@navikt/core/react/src/index.ts`
- Component `index.ts` pattern: `@navikt/core/react/src/dialog/index.ts`
- Context pattern: `@navikt/core/react/src/dialog/root/DialogRoot.context.ts`
- Meta: `@navikt/core/react/src/accordion/Accordion.meta.ts`
@@ -0,0 +1,234 @@
---
name: next-cache-components-adoption
description: >
Turn on Cache Components in a Next.js app and resolve the blocking routes it
surfaces. Use when the user wants to enable, adopt, or migrate to Cache
Components, flip the `cacheComponents` flag, work through a flood of
blocking-prerender / instant validation errors, run the
`cache-components-instant-false` codemod, or decide between opting routes out
with `export const instant = false` and fixing them in place.
---
# next-cache-components-adoption
Enable Cache Components on an app and walk it to a passing build. This skill sequences the work; per-error recipes live in the dev overlay fix cards and the build's terminal output. The [migrating to Cache Components guide](https://nextjs.org/docs/app/guides/migrating-to-cache-components) is the canonical reference for the concepts and per-API recipes this skill applies — consult it whenever the skill steps reference a pattern (`"use cache"`, `cacheLife`, `<Suspense>` placement, etc.) and you want the full explanation.
## requires
- **App Router project.** Cache Components is an App Router feature; `cacheComponents: true` does nothing for `pages/` routes. If the project has a `pages/` or `src/pages/` tree but no `app/` or `src/app/` tree, stop and tell the user — Pages → App migration is its own project, not part of this skill. A hybrid app (both `pages/` and `app/`) is fine: the flag affects the `app/` routes; `pages/` routes are unaffected and don't need opt-outs.
- **Next.js 16.3 or later.** That release is where the pieces this skill relies on land: top-level `cacheComponents`, `export const instant`, the dev-overlay instant-navigation validation warnings, and the `cache-components-instant-false` codemod. If `next --version` reports below 16.3, upgrade first:
- `npx @next/codemod@latest upgrade latest` to apply the version-to-version codemods.
- Read the relevant [version upgrade guide](https://nextjs.org/docs/app/guides/upgrading) (e.g. [Version 16](https://nextjs.org/docs/app/guides/upgrading/version-16)) for what the codemod doesn't cover.
- **No incompatible config keys.** `cacheComponents: true` errors on any file that still exports `dynamic`, `revalidate`, or `fetchCache`. **Translate, don't delete.** Each export encodes behavior the route needs to keep doing; migrate each one to its Cache Components equivalent via the [migration guide's per-key sections](https://nextjs.org/docs/app/guides/migrating-to-cache-components#enable-cache-components). If a value can't be cleanly translated yet, leave a `// TODO: Cache Components adoption — restore revalidate = 3600` comment so the loop picks it up. The `cache-components-instant-false` codemod does not touch these.
- **`experimental.dynamicIO` is fatal.** It was renamed to top-level `cacheComponents` and the old key now aborts before any build can run — remove it (or replace with `cacheComponents: true`) first. `experimental.useCache` is still accepted as a deprecated alias; redundant once `cacheComponents: true` is set, so remove it for clarity.
### notes
- **No passing baseline before the flag.** If the app already uses `"use cache"`, the pre-flag build errors with `please enable the feature flag cacheComponents`. Enabling the flag is the first thing you do (in Incremental, before the codemod; in Direct, before fixing routes) — not a thing to do _after_ getting a passing build. Note this in your starting summary so it doesn't read as a regression.
- **Offline docs.** Guide links have offline copies under `node_modules/next/dist/docs/` (bundled since Next.js 16.2), with the directory layout numbered for ordering (e.g. `node_modules/next/dist/docs/01-app/02-guides/migrating-to-cache-components.md`). If you can't predict the numbered prefix, `find node_modules/next/dist/docs -name '<slug>.md'` resolves it. The `/docs/messages/*` error pages are not bundled.
- **Older versions without bundled docs.** Suggest `npx @next/codemod@latest agents-md` to the user before starting: it downloads a version-matched copy to `.next-docs/` and writes an index into `AGENTS.md` / `CLAUDE.md`. It touches files in their repo, so ask first and run it only if they want it.
## the shape of the work
There's one loop: walk the route tree top-down, one feature at a time, adopting each route against `next dev` + a browser. The build is a final check for each feature, not the working surface.
The choice in step 1 is whether to opt every route out of validation first or fix routes as you go. Either way the loop is the same:
- **With a quiet pre-step (Incremental).** Run the codemod to opt every page and layout out of validation. Once you've also fixed what the codemod can't (sync-IO calls, leftover `revalidate`/`dynamic`/`fetchCache` exports), the build passes; you ship that as its own PR and then start the loop — removing one opt-out at a time and adopting that route. This splits the work into small, reviewable PRs.
- **Without (Direct).** Enable `cacheComponents` and start the loop on whatever the build flags first. Same loop, but every fix sits on one branch until adoption is complete.
In both, the per-route success bar is the same: **dev loop reports no errors AND `next build` passes**. Check in with the user after every feature. Expect to spend most of the time in the loop, not in the pre-step.
## background
`cacheComponents: true` requires every route to be prerenderable. A route that reads request-time data outside `<Suspense>` is "blocking" and fails the build. `export const instant = false` marks a route as allowed to block, which clears it in both dev and build; on a layout it covers the whole subtree during the build, but client navigations still validate each descendant segment on its own. Reads wrapped in a [`"use cache"`](https://nextjs.org/docs/app/api-reference/directives/use-cache) function count as cache boundaries, not blocking reads.
Three classes of blocker come up, usually in this order:
1. **Request-time reads** (`cookies()`, `headers()`, `await params`, `await searchParams`). All four block when awaited at the top of a page or layout. `params` and `searchParams` often get missed because they're not framed as "request data" the way cookies and headers are. The fix is to push the read into a `<Suspense>`-wrapped child — and for `params`/`searchParams`, forward the promise into the child and await it there; don't `await` at the page top.
2. **Sync-IO at module/render time** (`new Date()`, `Date.now()`, `Math.random()`, `crypto.randomUUID()`). These fail the build even with `instant = false` — the opt-out doesn't suppress them. If they're in a shared layout, they block every route under it. The codemod can't fix them; you have to translate each one by hand before the build can pass (see the [incremental pre-step](#incremental)). Grep the whole repo for these calls before running anything else.
3. **`"use cache"` files that read request data.** A file with a top-level `"use cache"` directive can't export `instant`; combining the two errors with `Only async functions are allowed to be exported in a "use cache" file.`, which means the directive was wrong for that route. Remove it before running the codemod.
## working surfaces
### finding blocking routes
Prefer `next dev` over `next build` while you work.
- **`next dev`** — the working surface. Visit a route; its blocking errors surface in the dev overlay with full stack traces and fix cards linking the per-error docs. Work one route at a time — errors don't accumulate in one place. The route itself still returns HTTP 200, so read the overlay (or `.next-dev.log`), not status codes. A cleared overlay is one half of calling a route clean — the other half is browser verification (see [step 2](#step-2-the-inner-loop-remove-opt-outs-one-feature-at-a-time)) and a passing build for that route.
- **`next build`** — detection only. The build is `next dev`'s authoritative check, not its replacement. Use it as the last gate on each feature in the loop (a passing build is part of the per-route success bar) and as the final verification across the whole app. In Incremental, the build also confirms the pre-step (codemod opted every route out, no shared layout still has a sync-IO blocker) before you ship that PR. Don't reach for the build instead of the dev loop while you're working a route — a passing compile doesn't tell you what ended up in the static shell and what streamed. By default the build stops at the first blocking route, so it's also poor for sizing the work. Two flags help when iterating: `--debug-build-paths` builds only the routes you name (comma-separated glob patterns of file paths relative to the project root, e.g. `--debug-build-paths="app/admin/**/page.tsx"` — not URL paths; `--debug-build-paths="app/(marketing)/about/page.tsx"` — not `/about`; `--debug-build-paths="app/admin"` matches nothing and silently builds zero routes), and `--debug-prerender` disables the early exit so the build continues past the first prerender failure, reports every blocking route, and prints a fuller stack trace that names the originating file and line.
Every blocking error has a docs page — open it. Both the dev overlay and the build terminal print a `https://nextjs.org/docs/messages/<slug>` link with each error. That page is the canonical recipe for the fix; the inline message is a summary. Fetch the link for every distinct error you encounter, even if you think you know the pattern — the recipes evolve, and the same error class can have different correct fixes depending on what the route reads. Don't improvise from the inline message alone. (`/docs/messages/*` pages aren't bundled offline; if you have no network, fall back to the per-API guides under `node_modules/next/dist/docs/` and note the limitation when you report back.)
### verifying each fix at runtime
A passing build or a cleared overlay isn't proof the route actually behaves — Cache Components is a runtime concern (a static shell with streamed data). Verify after every fix, not only at the end.
In preference order:
1. **[`next-dev-loop`](https://github.com/vercel/next.js/tree/canary/skills/next-dev-loop) — strongly preferred.** Cross-checks `/_next/mcp` against the live browser via `agent-browser` and surfaces both compile and runtime issues in one pass. The diagnostics (React tree, suspense boundaries, console + network) are richer than poking at `next dev` by hand.
Install it before starting the loop. Don't wait until you hit something `next dev` alone can't explain. Run:
```bash
npx skills add https://github.com/vercel/next.js/tree/canary/skills/next-dev-loop
```
The skill requires `agent-browser >= 0.27.0` and walks you through it.
**Requires Turbopack.** If `package.json`'s `dev` script passes `--webpack`, flag it to the user and ask whether there's a reason to stay on webpack. If not, switch to Turbopack (the Next.js 16.3+ default). If they want to keep webpack, skip this install and use the [build-only loop](#the-loop-build-only-fallback) instead.
You don't need permission to install `next-dev-loop` itself. It's a tool, like installing a dev dependency. If a user is present, briefly tell them you're installing it for verification. In a non-interactive run (CI, dashboard, sandbox), install it without asking — "can't prompt the user" is not a reason to skip. The only legitimate skip is a real technical blocker: no network, no npm, read-only filesystem, a stated no-new-deps policy, or a webpack-only dev script. If you skip, name the specific blocker in your final report.
2. **A browser you can drive yourself.** Playwright, `agent-browser` directly, any browser-automation tool. Use only when `next-dev-loop` is genuinely blocked. You'll miss the framework-side checks (`/_next/mcp`), so DOM assertions alone don't catch every regression — be more cautious about what you call "verified."
3. **Build-only.** If you can't run a dev server at all, the build is your only signal. `○ (Static)` routes with no `<Suspense>` are fully verified by the build (nothing streamed to test). `◐ (Partial Prerender)` routes are only shell-verified — flag them when you report back.
4. **No tooling at all.** Ask the user to run the dev server (or build) and report what they see, or commit the milestone you've reached and hand off.
## step 1: choose a strategy
Ask the user, in terms of the PRs they want, not the size of the job. Never use the internal labels (Incremental, Direct) when talking to the user — those are your own scaffolding. Ask in terms of PRs and features, e.g.: _"Do you want me to first open a PR that turns on Cache Components and opts every route out of validation, then handle the actual route adoptions feature-by-feature in follow-up PRs? Or do everything on one branch?"_ Even on a tiny app, the incremental path still has value (review-sized PR, revertible, the `// TODO: Cache Components adoption` markers double as your work queue for next session). Don't pick on their behalf.
If there's no user to ask, default to **Incremental** and document the choice.
- **Incremental** — quiet pre-step + the loop. Run the codemod to opt every page and layout out of validation, get the build passing, stop and check in with the user (see [end of the pre-step](#end-of-the-pre-step-check-in)), then enter [step 2's loop](#step-2-the-inner-loop-remove-opt-outs-one-feature-at-a-time) and ship each feature as a follow-up PR.
- **Direct** — skip the pre-step. Enable `cacheComponents` and go straight to [step 2's loop](#step-2-the-inner-loop-remove-opt-outs-one-feature-at-a-time); the build's blocking routes are the work queue.
### incremental
Before invoking the codemod, fix the two classes of blocker it can't.
1. **Sync-IO at module/render time.** Grep the whole repo for `new Date()`, `Date.now()`, `Math.random()`, and `crypto.randomUUID()` (not only `app/**/layout.{js,jsx,ts,tsx}` — the read might live in any component imported by a layout). Unblock each match with the `await connection()` + `<Suspense>` fix from its `blocking-prerender-*` error card: it defers the value to request time, exactly as it behaved before the migration, so it needs no product decision. Add this exact comment on the line above the `await connection()`:
```tsx
// TODO: Cache Components adoption. Added to unblock the build: remove this connection() to re-trigger the error and review the fix options.
```
It shares the `TODO: Cache Components adoption` prefix with the comments the codemod writes, so the check-in grep finds both. Removing the `await connection()` makes the error fire again with its fix cards — the same motion as removing an opt-out in the loop.
2. **Incompatible segment configs.** Grep for `^export const (revalidate|dynamic|fetchCache)` across `app/` and translate per the `requires` note above. The codemod does not touch them; leaving them in place fails the build after the codemod.
The codemod refuses to run on a dirty working tree. Commit or stash unrelated work first, or pass `--force` to let its edits land alongside your WIP. Common false positive: if you recently upgraded Next.js, `package.json` and the lockfile will already be dirty — commit those first.
Use the `@canary` channel, not `@latest`. The `cache-components-instant-false` transform isn't in the stable `@next/codemod` release; `@next/codemod@latest` errors with `Invalid transform choice`.
```bash
npx @next/codemod@canary cache-components-instant-false ./app
```
Inserts `export const instant = false` (with a `// TODO: Cache Components adoption` comment) into every `app/**/{page,layout,default}` file, skipping files that already declare `instant` and any module marked `"use client"` or `"use server"`. Then set `cacheComponents: true`. The TODO comments are the work queue for the loop.
If the codemod isn't available (older `@next/codemod`, sandboxed environment, offline run), reproduce it by hand: for every `app/**/{page,layout,default}.{js,jsx,ts,tsx}` that isn't `"use client"` or `"use server"` and doesn't already declare `instant`, insert this after the imports:
```ts
// TODO: Cache Components adoption. Refactor this route so this opt-out can be removed.
// See: https://nextjs.org/docs/app/guides/migrating-to-cache-components
export const instant = false;
```
The codemod opts every segment out, not only the root, on purpose. Resolution is top-down, first-explicit-config-wins: the highest `instant = false` decides the whole subtree. With an opt-out on every segment, removing one segment's opt-out validates only that segment; descendants keep their own opt-outs and stay passing. If only the root were opted out, removing it would re-arm validation for the entire app at once.
Because the highest opt-out wins, remove them top-down (root layout first, then descend). Removing a leaf's opt-out does nothing while an ancestor still holds one.
Confirm the pre-step with `next build`. The build is the proof, not the codemod run — a shared layout that calls `new Date()` / `Math.random()` directly still fails regardless of the opt-out (see [background](#background)).
After the build passes, confirm the root layout got an opt-out (`grep -n "export const instant" app/layout.*`). The root layout renders every route, including framework routes like `/_not-found`, so if it was missed, add `export const instant = false` to it by hand.
Synthetic routes like `/_not-found` have no user file — when they block, fix the root layout's opt-out, not the synthetic route. Client Components (`"use client"`) get no opt-out (it's a build error — `E1344` — to export `instant` from them) and rarely block on their own; when a client route blocks, fix the server-side data in its ancestor layout.
### end of the pre-step: check in
Incremental only. Stop here before starting step 2 — the pre-step is the shippable PR. Talk to the user in their language; don't say "Incremental" or other internal labels; talk about adoption, PRs, and what the app does now. Tell them:
- What you did: turned on Cache Components, ran the codemod that opts every page and layout out of the new validation (or did it by hand), fixed any blockers the codemod can't (list them), confirmed the build passes.
- What changed: every page and layout in `app/` now exports `instant = false` with a `// TODO: Cache Components adoption` comment, except client components and any that already had an `instant` export.
- What to sanity-check: the diff is mostly mechanical (new exports + comments). The build passes. Routes still behave exactly as they did before — the opt-outs preserve current behavior; no rendering changes yet.
- The question: "Want to open this as its own PR before we start adopting Cache Components route by route? Or keep going on this branch?" Wait for the answer.
Moving to step 2 without checking in defeats the point of taking the incremental path.
### direct
Set `cacheComponents: true` and move to [step 2](#step-2-the-inner-loop-remove-opt-outs-one-feature-at-a-time). The build's blocking routes are the work queue.
## step 2: the inner loop, remove opt-outs one feature at a time
A "feature" is a single product surface — `app/settings/profile/**`, `app/posts/[slug]/**` — not a whole top-level app like `app/dashboard/**`. Finish one end-to-end before starting the next.
Within a feature, walk top-down (layouts before pages, root layout first). Removing a layout's opt-out before its descendants exposes the layout's own blocking reads. (Direct: there are no opt-outs to remove — fix each failing route; if a hand-written opt-out on an ancestor shadows it, remove that first.)
A passing build mid-walk doesn't mean the layout is clean. Removing a layout's opt-out while its descendant pages still have theirs keeps the build passing — each page shadows the inherited validation. The layout's actual blocking reads only surface once nothing below it shadows them. Don't call a feature done at the layout boundary.
Use the **with-a-browser** loop unless a browser is genuinely unreachable. The [`next-dev-loop`](#verifying-each-fix-at-runtime) skill is the source of truth for what counts as "browser available" and how to install it.
### the loop, with a browser (preferred)
Per route:
- Remove the opt-out (Incremental) or target the failing route (Direct).
- Reload in dev. Overlay clean? Skip to verify. Overlay still red? Fix.
- Fix — fetch the docs page linked from the error (`https://nextjs.org/docs/messages/<slug>`), apply the recipe from there. The inline overlay text is a summary; the docs page is the source of truth.
- Verify in the browser. Confirm the visible content on first paint is what you intended in the shell — not stuck on a fallback, not silently streaming everything out of an empty shell.
- Re-check siblings if the fix touched shared code (a layout, a sidebar component). A shared-shell change can fix the route you're on and break a sibling.
### the loop, build-only (fallback)
Used when there's no way to drive a browser — CI, sandbox, the user has no `next dev` running and you can't start one. Weaker signal: confirms the build passes and the route prerenders, but not what ended up in the static shell vs streamed.
Per route:
- Remove the opt-out (Incremental) or target the failing route (Direct).
- Rebuild with `--debug-build-paths app/<route>/**` (only that route) or `--debug-prerender` (full build, but past the first failure). Route passing? Move on. Still blocking? Fix.
- Fix — fetch the docs page linked from the error (`https://nextjs.org/docs/messages/<slug>`), apply the recipe from there.
- Re-check siblings if the fix touched shared code.
- Flag the route as build-only-verified when you hand the feature off. Each `◐` route still needs a browser pass before the feature is done.
### loop notes
- The [three blocker classes from background](#background) often get missed when fixing in place. Caching a downstream fetch (`getThing(id)`) doesn't clear an `await params` at the top of the page body — push the param promise into the `<Suspense>`-wrapped child.
- Ambiguous calls are user check-ins, not agent judgment. When you're not sure which fix fits, the blocking code looks security-sensitive, or the user might want to keep the route blocking on purpose — read [references/per-page-decisions.md](./references/per-page-decisions.md) before editing. Show the route while you ask: the `next-dev-loop` session runs the browser headed, so drive to the page and leave it on screen so the user is looking at the thing they're deciding about, with a screenshot as the fallback when a headed browser isn't possible. "Should this stay blocking?" is much easier to answer while looking at the page than at a file path.
- Don't narrate the refactor with comments. The only comment the codemod (or you) should leave is `// TODO: Cache Components adoption` on opt-outs, and the user's existing comments. Don't annotate every `<Suspense>` boundary or `"use cache"` call with what it does — the code says that. Drop a comment only when the _why_ isn't clear from the code (e.g. a deliberate Block with a reason).
Keep a todo list of the feature's routes. When every route in the feature is clean, move to step 3.
## step 3: verify the feature
Checklist before checking in with the user:
- `next build` completes without blocking-route errors.
- No bare TODOs in the feature: `grep -rn "TODO: Cache Components adoption"` finds both the codemod's opt-out comments and the sync-IO unblocks from the pre-step. Any `instant = false` left behind is a deliberate, documented Block — comment rewritten to a reason (see [references/per-page-decisions.md](./references/per-page-decisions.md) → "when to leave a Block in place"). Any `await connection()` left behind has been reviewed and kept on purpose, not left over from the pre-step.
- Each route visited in the browser: confirm the static shell renders first and every `<Suspense>` fallback resolves to its real content. Capture both states if you can — the fallback (mid-stream) and the final paint — so you have a streaming-experience demo to show the user. Throttle the network in the browser if streaming is too fast to observe.
Then check in with the user. Same rule as the pre-step: speak their language. Don't say "feature-by-feature loop" or other internal labels; talk about the feature you adopted and what the user will see.
- What you did: which routes you touched, and the user-visible result per route (e.g. "the post page now streams the article body behind a skeleton while the layout stays static").
- What changed: opt-outs removed, fallbacks added, caching boundaries introduced.
- Show, don't tell. The `next-dev-loop` session runs the browser headed, so drive the route live for the user so they see the static shell → fallback → final content sequence in real time. If you can't drive a live browser, attach the before/after screenshots you captured instead.
- Give them the click-through: a short table of the feature's routes — the URL to open and what to look for (what renders instantly, which fallbacks appear, what streams in) — so they can verify each one themselves.
- The question: "Want to open this feature as a PR and move on to the next, or stop here?" Wait for the answer.
**Trivial features can skip the check-in.** If adopting a feature only meant removing its `// TODO: Cache Components adoption` opt-out (no `<Suspense>` added, no `'use cache'` introduced, no render order change), the user sees nothing different. Move on to the next feature without stopping; mention it in passing the next time you do check in.
When the loop has run on every feature — every remaining `instant = false` sits under a reason comment, `grep -rln "TODO: Cache Components adoption" app` returns nothing — point the user at [further reading](#further-reading) if they want to push the experience further, or stop and ship.
### route table glyphs
`ƒ` → `◐` is where adoption usually lands. `◐ (Partial Prerender)` means a static shell prerenders and the request-time content streams in — the goal state for any route that reads `cookies()`, `headers()`, `params`, or `searchParams`. Some routes legitimately stay `ƒ` when they do request-time work through a documented escape hatch (e.g. a layout that uses `await connection()`); the page is no longer _opted out_, it's genuinely dynamic. Don't remove the escape hatch only to chase a `◐`. The inverse holds: `instant = false` does not force a route to be `ƒ`. The glyph reflects what the route does at prerender time, not which validation knobs it exports.
`◐` tells you a shell exists, not what's in it. A `<Suspense>` boundary placed too high (e.g. wrapping the entire page body, or `<Suspense fallback={null}>` around the article content) pushes the visible content out of the static shell into the streamed payload; the build still reports `◐` because _some_ shell prerendered (often only `<html><body>` with framework markup). The route table can't tell you what's in the shell; a browser can. If the shell is empty and everything streams, pull the `<Suspense>` boundary down closer to the actual dynamic read.
## further reading
The work below is optional and lives in the docs — link the user to them and let them decide which to take on next. Don't walk these through inside this skill.
- [Instant navigation](https://nextjs.org/docs/app/guides/instant-navigation) — dev-only validation warnings the overlay raises on client navigation. Same shape as the blocking-prerender errors you cleared in step 2; the guide covers the per-warning details. Recommend it next if the user wants navigations to actually be instant (a passing build doesn't guarantee that — a `<Suspense>` above the shared layout caught the page-load case but doesn't cover client navigation).
- [`next-partial-prefetching-adoption`](https://github.com/vercel/next.js/tree/canary/skills/next-partial-prefetching-adoption) — the follow-up skill that adopts Partial Prefetching: it audits `<Link prefetch={true}>` calls (driven by the dev overlay's `link-prefetch-partial` warning) with the flag off first, then flips the `partialPrefetching` config. It sequences this the same way this skill sequences Cache Components, but the insights are dev-only, so it's a browser click-through, not a build loop. Recommended after instant navigation, since those fixes feed directly into how much of each route the shell can prefetch. Concepts live in the [Adopting Partial Prefetching guide](https://nextjs.org/docs/app/guides/adopting-partial-prefetching).
- [Prefetching](https://nextjs.org/docs/app/guides/prefetching) and [Runtime prefetching](https://nextjs.org/docs/app/guides/runtime-prefetching) — broader prefetching reference. Runtime prefetching extends the static shell with per-session content; reach for it when a route's shell is too thin to be useful and Partial Prefetching alone doesn't cover the gap.
- [Prevent regressions with e2e tests](https://nextjs.org/docs/app/guides/instant-navigation#prevent-regressions-with-e2e-tests) — the `@next/playwright` [`instant()`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/instant#testing-instant-navigation) helper asserts on the UI that's available immediately on navigation, so regressions surface in CI. Recommend it once a route is instant: `next-dev-loop` confirms it _now_; an `instant()` test keeps it that way.
- [`next-cache-components-optimizer`](https://github.com/vercel/next.js/tree/canary/skills/next-cache-components-optimizer) — a separate skill that grows each route's static shell so more of the page prerenders and less streams in. Pure optimization, not part of adoption.
@@ -0,0 +1,25 @@
# per-page decisions: removing `instant = false`
Read this when a route still blocks after you remove its `instant = false` and the dev overlay's fix card isn't enough on its own. Each section here covers a judgment call the agent shouldn't make alone.
## deciding what to do with a blocking read
Read the full linked page behind the fix card — not only the inline snippet — before editing. The card unblocks the build, but the page covers the details that make the route's navigation actually instant (e.g. where to place a `<Suspense>` boundary). Don't improvise.
If you're unsure which fix fits, the right call usually depends on what this part of the page is _for_, which the code doesn't capture. Ask the user about their goal for it rather than guessing. Frame it as a product/UX question: should this content be there instantly on load, or is it fine for it to stream in a moment later? Should everyone see the same thing (cacheable) or is it per-user / per-request? Tie the technical fix to that answer (cache it, wrap it in `<Suspense>`, or keep it request-time), so they're deciding the experience, not the API.
## security gates and other code you can't infer
If the blocking code looks like it's there for a _reason you can't infer_ — a security gate at the page top (`await verifyAccess()`, an auth redirect, a feature-flag check) where moving it inside `<Suspense>` would change what the code guarantees — stop and ask the user before refactoring. The build error wants `<Suspense>`, but wrapping a gate in `<Suspense>` defeats the gate. Only the person who wrote it knows whether to keep the route blocking (`instant = false` as a documented Block), restructure the page so the gate runs differently, or move the check to [Proxy](https://nextjs.org/docs/app/api-reference/file-conventions/proxy).
If _every_ route under a layout is gated this way, a documented Block on the layout is the correct end state. Moving the gate to [Proxy](https://nextjs.org/docs/app/api-reference/file-conventions/proxy) is the architectural fix, not a Cache Components one, and that's a follow-up rather than something to hold the migration on.
For the broader picture, read the [Authentication guide](https://nextjs.org/docs/app/guides/authentication) (where auth checks belong: Proxy for routing, Data Access Layer for data) and the [Data Access Layer section of Data Security](https://nextjs.org/docs/app/guides/data-security#data-access-layer) (centralized auth checks that compose with `'use cache'`).
If you don't know how to make a piece of code Cache Components–correct without changing what it does, ask.
## when to leave a Block in place
If a route is genuinely meant to block — it's inherently per-request with no useful static shell — or the refactor would be large and the user would rather not take it on now, that's a legitimate outcome. Keep `instant = false`, but confirm it with the user first and turn its `// TODO: Cache Components adoption` comment into a reason, e.g. `// instant = false: kept on purpose — fully request-time dashboard` or `// instant = false: deferred, refactor too large for now`.
A documented, deliberate Block is fine to leave after the migration; an undocumented leftover opt-out is not.
@@ -0,0 +1,453 @@
---
name: next-cache-components-optimizer
description: >
Drive a Next.js route to instant navigation by setting up an agentic loop,
under Cache Components / PPR, on initial load (hard navigation) and
client-side navigation (soft navigation). Encode the goal as a failing
@next/playwright instant() e2e and work it to green, one verified route at a
time; the shipped test then guards against regression. Use when asked to make
a route's navigation instant (its static shell commits immediately), fix a
route whose static shell isn't prerendered/served/prefetched, grow a route's
static shell or fix its slow first paint, diagnose which Suspense boundary
keeps a route out of its static shell, or write the instant() e2e guard for
one. Requires Next.js 16.3+ with cacheComponents; directs an upgrade if older.
---
# next-cache-components-optimizer
Set up an agentic optimization loop that drives a Next.js route from "not
instant" to "instant" and keeps it there. The loop is test-driven: encode the
goal as a failing `@next/playwright` `instant()` test, work it to green, and
ship the test as the regression guard. Run it once per target route. Work the
phases P → G in order; each ends in a gate. Fix recipes live in two lazily-read
references — `reference/patterns.md` (before→after for each blocker type) and
`reference/real-app-patterns.md` (parallel routes, auth gates, the empty-shell
and responsive-skeleton failure modes). Read one only when its phase points
there.
## What is invariant, and what is yours
One thing here is fixed. The rest is yours. Read this before treating any
command, platform, or env var below as a requirement.
- **Invariant: the verification loop.** Maximizing the shell is worthless
unless you can prove it. The proof is an automated check: under a lock that
gates dynamic data, the static shell still commits. RED shows the gap, GREEN
shows it closed, the test ships as the regression guard. It must run on a
production-like build and must not be able to pass vacuously. Stand the loop
up once; every later optimization is then verifiable by construction. The
loop is the deliverable, not any one route.
- **The mechanism: `@next/playwright` `instant()`.** This skill locks with
[`instant()`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/instant#testing-instant-navigation):
a ruler, not a stopwatch (phase A). It comes from
`@next/playwright` (installed alongside `@playwright/test`, on the same
release line as `next`), so it isn't tied to any host. Keep it. Timing a
navigation by hand is too flaky to trust, and is the failure mode this skill
exists to prevent.
- **Yours: the rig.** How you build, deploy, authenticate, configure
Playwright, and loop belongs to your stack, not to this skill. A local
`next build && next start`, a CI/staging container, and a per-push preview
deploy are equally valid rigs; the verdict comes from the build, never the
platform. Phase 0 maps the invariant onto your repo. Read every platform
name, env-var spelling, and command below as an example to translate, not a
requirement.
## Two navigations, two loading states
A route reaches the user two ways, and both must be instant:
- **Initial load (hard navigation)** commits the route's prerendered static
shell; deferred parts stream in behind their loading skeletons (Suspense
fallbacks, `loading.tsx`).
- **Client-side navigation (soft navigation)** commits the destination's
prefetched App Shell — the `<Link>` default under Partial Prefetching —
re-rendering only the segments that change.
The fix patterns are identical for both; the test differs only in how the
navigation is driven ("Driving the navigation in tests" below). The two shells
can differ; guard the one you ship, both when both matter
(`reference/real-app-patterns.md`).
## Goal
Maximizing the static shell is the optimization objective: the most meaningful
prerendered content commits immediately, and only genuinely per-request data
streams in afterward. The shipped test deterministically encodes **present ∧
instant**; **non-blank** is the additional bar the workflow enforces by
judgment (D1/D2/E), because an `instant()` pass alone is satisfied by a blank
`fallback={null}` shell (the empty-shell failure mode,
`reference/real-app-patterns.md`).
`instant()` is a ruler, not a stopwatch: assert that the shell appears under
the lock; do not time it. A trustworthy verdict requires a production build
(phase A).
The GREEN under the lock is the deterministic verdict; each gate keeps it
trustworthy.
## Reporting to the user
This loop is meant to run unattended — ideally across many navigations in one
pass — so it doesn't stop to ask after each route. What matters is how you word
and present the results, not how often you interrupt. The mechanics below — the
rig, RED, GREEN, the gates — are your scaffolding; the user never needs to hear
those words.
- **Speak their language.** Describe the gap and the result in terms of what the
user sees: "navigating to the dashboard waited on the charts query before
anything painted; now the layout and skeletons paint instantly and the charts
stream in" — not RED/GREEN, the lock, or the phase letters.
- **Show, don't tell.** When you report a route, drive the browser (or attach
before/after screenshots) so the user watches the shell commit immediately and
the data stream in, rather than reading a claim. Identical before and after
means the fix did nothing — roll it back.
- **Present a run as a list of results,** one line per navigation — which route,
what's now instant, what streams — not a transcript of the loop.
- **Only surface a question for a genuine fork:** a fix that would change
behavior, a security-sensitive read, or a route that's dynamic by design (a
runtime-prefetch candidate, not a shell to grow). A clean instant fix is not a
fork — keep going. With no one to ask (an unattended run), don't block: take
the safe default and note the assumption — for a cache-freshness choice,
defer the read behind `<Suspense>` (always fresh, still instant) rather than
guess a `cacheLife`.
## The workflow
```
- [ ] P PREREQS Next.js 16.3+ with cacheComponents: true; upgrade first → below
- [ ] 0 SETUP once per repo: discover + write instant-nav.rig.md → rig-template.md
- [ ] A RIG production build with the testing API exposed → below
- [ ] B BASELINE unlocked: the marker renders for the test user → test-template.md
- [ ] C RED locked instant(): the shell does not commit → test-template.md
- [ ] C-gate VERIFY-RED: stop until the RED is trustworthy → reference/red-test-robustness.md
- [ ] D FIX push each Suspense boundary down to the data it guards → reference/patterns.md
- [ ] D1 reuse the route's existing loading UI; do not hand-build skeletons
- [ ] D2 the shell matches the real render at every breakpoint → reference/real-app-patterns.md
- [ ] E PARITY the refactor changed only whether the route is instant
- [ ] F DIFFERENTIAL revert only the fix → RED; re-apply → GREEN → reference/red-test-robustness.md
- [ ] G REVIEW PR checklist (below)
```
Phases B and C build the test; only the locked test from C ships.
---
## P. PREREQUISITES: current Next.js with Cache Components
The workflow depends on framework capabilities that ship with current Next.js:
- **Next.js 16.3+ with `cacheComponents: true`** in `next.config.ts`. Without
Cache Components there is no static shell to optimize.
- **`@next/playwright`** on the same release line as the project's `next`; it
provides `instant()`. Verify with `npm ls next @next/playwright` (or the
project's package manager) and align them if they differ. The matching
testing API is in the `next` runtime, gated by the
`experimental.exposeTestingApiInProductionBuild` config flag (phase A).
If the project does not meet these, upgrade first (`npx @next/codemod upgrade`
automates most of it), then enable Cache Components in `next.config.ts`:
```ts
export default { cacheComponents: true };
```
Enabling the flag surfaces the blocking routes to resolve first; the
[`next-cache-components-adoption`](https://github.com/vercel/next.js/tree/canary/skills/next-cache-components-adoption)
skill drives that adoption. Reach for this optimizer once the app builds under
Cache Components.
This gate is deliberate: the skill targets current Next.js, and none of the
verdicts below are meaningful on older versions.
## 0. SETUP: discover this project's rig, once per repo
The principles in this skill are fixed; the infrastructure they run on is
yours. On first use in a repository, discover how the project builds, deploys,
authenticates, and tests (inspect the repository first, and ask the user only
what it cannot answer), then write the answers to a committed
`instant-nav.rig.md`. Every later run reads that file instead of
rediscovering. The six questions (BUILD / EXPOSE / RUN / TEST USER / DRIFT /
LOOP), the file template, and filled examples (local-only, generic CI +
container, preview deploy) are in **`rig-template.md`**.
If the repo has no Playwright e2e harness yet, standing up a minimal one
(`@next/playwright`, a config with `baseURL`, one authenticated path) is part
of this step; the loop does not assume a pre-existing suite.
## A. RIG: a production build with the testing API exposed
Stand up the rig described by `instant-nav.rig.md`. Two invariants hold on
every platform:
1. **Never measure on `next dev`.** It does not prefetch, and its lock is
unreliable for blocking routes, so a dev `instant()` result is not a valid
RED or GREEN.
2. **The measured build must expose the testing API.** Otherwise `instant()`
silently no-ops and the test passes vacuously (see
`reference/red-test-robustness.md`). The lock-engagement proof is the phase-C
RED itself: the unfixed target route is the known-blocking route, and its
RED under the lock shows the lock engages on this build (C-gate); the
self-validating variant in `test-template.md` is the in-band guarantee. Wire
`experimental.exposeTestingApiInProductionBuild` to a condition that is
true for every build you measure and never true in production:
```ts
experimental: {
// Use the condition your platform provides, and record it in the rig file:
// local: an explicit opt-in, as below
// generic CI: process.env.DEPLOY_ENV === 'staging'
// Vercel: process.env.VERCEL_ENV === 'preview'
exposeTestingApiInProductionBuild:
process.env.EXPOSE_TESTING_API === '1',
}
```
The rig is any production-like build that exposes the testing API: a local
`next build && next start`, a CI/staging container, and a preview deploy are
all equally valid; the verdict comes from the build, not the platform. See
`rig-template.md` for filled examples.
For any deployed or remote build, poll the rig's LIVENESS probe to confirm the
artifact contains `HEAD` before trusting a verdict (a stale deploy reads as a
false RED or GREEN); a local `next build && next start` needs none. The probe
mechanism is in `rig-template.md` (question 6).
## B. BASELINE (unlocked): development scaffold, do not ship
Drive the real navigation with no `instant()` lock and assert that the
destination's `SHELL_MARKER` renders **as the test user**: the account the
e2e suite authenticates as (in CI, the CI account; locally, your e2e login
fixture), with its flags, plan, role, and data. This establishes that the
marker is real and reachable: not flag-gated, not redirected away, not a
guessed selector. The suite runs as the test account, not the author's session;
that environment drift (the rig DRIFT list) is a common source of
untrustworthy REDs. Scaffold and run command: **`test-template.md`**.
**Delete this baseline before the PR.**
## C. RED (locked) + the VERIFY-RED gate
Wrap the same navigation in `instant()`; assert the shell commits under the
lock. A RED here is the gap. **This is the test that ships**
(`test-template.md`).
> **C-gate: do not start optimizing until the RED is verified trustworthy.** A
> RED that is red for the wrong reason sends you optimizing a route that was
> never broken.
The question that settles it: **does `SHELL_MARKER` render without the lock,
as the test user?** Answer it by re-running phase B as the test user, not by
adding assertions to the shipped test. The two-branch resolution (No → marker
or environment bug; Yes → genuine gap, proceed to D), the full taxonomy of
untrustworthy REDs, the checklist, and worked cases are in
**`reference/red-test-robustness.md`**. Read it now.
---
## D. FIX: push each boundary down to the data it guards
**The anti-pattern: one coarse boundary.** A single `<Suspense>` high in the
tree with a page-level fallback has three costs:
- The layout UI stays out of the static shell: only a throwaway copy of it is
prerendered.
- The entire subtree is replaced when the boundary resolves, which discards
client state and shifts layout.
- The hand-built fallback drifts out of sync as the UI changes, because it
duplicates structure that also exists in the resolved tree.
**The fix: hoist the static, push the Suspense down.** Render the layout UI
once, synchronously, in the shell, and wrap each await in a boundary scoped to
the single read it guards. Only that leaf streams; the stable ancestors are
reused as-is.
**Rule:** if an element renders in both the fallback and the resolved tree,
hoist it above the boundary.
### The most common blocker: a top-level `await` in a layout on a fallback route
```
app/[locale]/(app)/[tenant]/dashboard/...
│ generateStaticParams ✅ │ no generateStaticParams → fallback route
```
When any dynamic segment in the route lacks `generateStaticParams`, the route
is a fallback route, and **all** params defer to request time, including the
enumerated ones. A top-level `await` in a layout (`await params`, a
request-time session read, an auth gate) then blocks the whole subtree out of
the static shell, even when it reads a statically known param. Minimal shape: a
dynamic-segment route with one segment lacking `generateStaticParams`, plus a
top-level `await` in the layout above it.
### The fix: defer the gate, render children
Render `children` unconditionally; move the top-level `await` into a
`<Suspense fallback={null}>`-wrapped child. Mechanism and before→after:
`reference/real-app-patterns.md`, "Deferring an auth gate".
**Fix the page below the shell too, not only the layout.** A page-level
top-level `await` (commonly `await params`) blocks the same way the layout's
does, so make the page sync and push its dynamic reads into a
`<Suspense>`-wrapped leaf as well. `fallback={null}` is correct only when a gate renders nothing on
success; for data, the fallback must be a real loading skeleton (see D1).
Every other blocker shape — `cookies()`/`headers()`, uncached fetch or database
reads, `searchParams`, metadata, viewport, non-deterministic values (`Date.now()`,
`Math.random()`, `crypto.randomUUID()`) — surfaces its own insight when you hit
it: the build prints a `https://nextjs.org/docs/messages/<slug>` link. The
default build output is often abbreviated and may carry no usable stack trace;
add `--debug-prerender` for the full failing frame and to report every blocker
past the first. Scope the build to the route you're on with
`next build --debug-build-paths "app/<route>/**"` rather than rebuilding the app.
Open that page and apply its recipe; don't improvise from the inline message.
The before→after recipe for each shape is in `reference/patterns.md`, which maps it to the insight
that explains it.
A few things those per-error pages don't stress for the instant-navigation goal:
- **A boundary in the root layout isn't enough for client navigations.** It
passes a page-load check but leaves sibling client navigations blocking; put
the boundary below the lowest layout the source and destination routes share.
- **Keep the LCP element** (usually the main heading) out of any boundary, so it
paints in the shell instead of waiting on a stream.
- **A green check isn't always instant.** `export const instant = false` opts
the segment out of validation while the navigation still blocks, and a
`<Suspense>` above the document `<body>` prerenders an empty shell — neither
makes the route instant.
### D1: reuse the route's existing loading UI; do not hand-build skeletons
Before writing any skeleton, search the repository for the loading UI that
already exists for this route, in order:
1. the route's `loading.tsx`;
2. an exported `*Skeleton` colocated with the component;
3. the fallback already inside the component's own `<Suspense>`.
The **divergence point** is the lowest layout shared by the source and
destination routes: a soft navigation re-renders only the segments below it,
while an initial load re-runs every layout from the root. (Also called the
shared boundary.) A `loading.tsx` above the divergence point fills only
the initial-load shell; it sits above the soft-nav re-render scope. A
`loading.tsx` at the destination segment is itself the in-tree boundary for a
soft navigation into that segment and serves both. Reuse whichever boundary
actually covers the navigation you are shipping; below the divergence point,
`loading.tsx` and colocated skeletons are interchangeable for that purpose.
If a component has no skeleton, extract its loading markup into a colocated
skeleton beside it. Do not author a fresh skeleton that mirrors the page
layout: it duplicates structure, drifts as the page changes, and pulls the
design back toward a single coarse boundary. Reusing the component's own
skeleton also keeps the prefetched shell consistent with the loaded UI.
Exception: if the deferred component renders `null` for some users (for
example, a flag-gated control), `fallback={null}` is correct, since a skeleton
would flash and then collapse.
### D2: the shell must match the real render at every breakpoint
A skeleton frozen to one breakpoint misaligns on the others. Fix it the same
way: one responsive component renders both the live UI and the shell (D1
skeleton in its data slots), so the breakpoint switch happens once. Verify by
re-asserting the shell marker at two widths
(`await page.setViewportSize({ width: 1280, height: 800 })`, then
`{ width: 390, height: 844 }`), or by adding a mobile Playwright project, so
this gate is as machine-checkable as the others. Detail:
`reference/real-app-patterns.md`.
> **D-gate: phase D is complete when the locked test from phase C passes GREEN
> under the lock on the production-build rig**, not when the code compiles. That
> GREEN is the deterministic stop for the fix loop; proceed to E.
**When the read can't be pushed down** (an ID minted per request, an
all-dynamic page, a per-request auth/scope read the whole subtree needs), there
is no shell to grow. Don't force one: opt the route into **runtime prefetching**
so the prefetch runs the dynamic render ahead of the click and the soft nav
commits the real content. See [Runtime Prefetching](https://nextjs.org/docs/app/guides/runtime-prefetching)
for the mechanism (`prefetch = 'allow-runtime'` on the route plus a full
`<Link prefetch={true}>`) and the [dynamic-data-during-prefetching insight](https://nextjs.org/docs/messages/instant-link-prefetch-partial)
for adoption. The `instant()`-specific gotchas the docs don't cover:
- **The full prefetch is mandatory.** An auto/PPR prefetch bails before the
runtime spawn (`subtreeHasSpeculativePrefetch`); only `prefetch={true}` /
`kind: 'full'` reaches it. If you set `prefetch = 'allow-runtime'` and it's
still RED, the link is doing an auto prefetch.
- **All leaf slots must agree.** `allow-runtime` on the content segment but
nothing on a sibling `@header`/`@sidebar` leaf leaves the route's runtime entry
incomplete, so the lock falls back to the shell. Flip every leaf together.
- **Prefetch the canonical URL.** A link whose href 307-redirects can't be
prefetched — the prefetch receives the redirect, not the tree. Point the link
and the prefetch at the final URL.
- **Don't blanket the full prefetch.** It fetches _all_ the target's dynamic
data; issuing it on hover for every link is wasteful. Scope `kind: 'full'` to
the runtime-prefetch targets only.
- **Marker must be a committed node, not RSC bytes.** The content is often a
client component, so its text isn't in the prefetch response. Assert a
`data-testid` that renders when the client subtree commits.
## E. PARITY: the refactor changed only whether the route is instant
The push-down is a mechanical transform, not a redesign. Afterward the route
must render the same tree, data, ordering, empty and error states, redirects,
and interactions as before; the only observable difference is that the shell
now commits instantly. Verify:
- **Same render output.** The moved `await`s compute and return the same
values; after the stream, the route shows the same content as the base
branch for the test user.
- **Side effects still fire.** A deferred `redirect()` or `notFound()` still
happens, at request time rather than during prerender. Confirm an
unauthorized user is still redirected and a missing record still returns 404.
- **Both viewports reach the real UI** after the stream (D2).
- **Client state survives.** Because the layout UI is hoisted into the stable
shell rather than swapped on resolve, open menus, scroll position, focus,
and input state persist across the stream.
If anything other than whether the route is instant changed, reduce the refactor.
## F. DIFFERENTIAL
Revert only the fix → RED; re-apply → GREEN; link both runs
(`reference/red-test-robustness.md`). On a deployed rig, confirm each run is live
(LIVENESS, phase A) before trusting its color.
## G. REVIEW (PR checklist)
A green final state means nothing if the RED was never trustworthy. The
test-trustworthiness items are the robustness checklist
(`reference/red-test-robustness.md`); confirm them, then require these
PR-specific items:
- [ ] **Differential shown**: RED without the fix, GREEN with it, runs linked.
- [ ] **Parity confirmed (E)**: same content, redirects, and state.
- [ ] **Existing loading UI reused (D1)**: no new page-mirroring skeleton.
- [ ] **Shell matches the real render at desktop and mobile widths (D2)**.
**Stop condition for the whole workflow:** the locked test from C is GREEN on
the rig, the differential (F) holds, and every item above is checked. Until all
three hold, you are not done.
## Driving the navigation in tests
- **Soft navigation** → drive a real `<Link>` click. **Initial load** → use
`page.goto()` inside `instant()` with the `baseURL` option. Do not substitute
`goto` for a soft-nav verdict; the two shells can differ
(`test-template.md`, `reference/real-app-patterns.md`).
- With parallel routes, only the slots that change re-render on a soft
navigation; client-rendered navigation UI does not re-render at all. Do not
chase a slot the navigation never touches
(`reference/real-app-patterns.md`).
## Files
- `rig-template.md`: phase 0, the six-question rig discovery, the
`instant-nav.rig.md` template, and filled examples (local-only, generic CI,
preview deploy).
- `test-template.md`: the shipped `instant()` specs for both navigation
types (phase C), and the delete-before-PR baseline scaffold (phase B).
- `reference/red-test-robustness.md`: the C-gate and phase F. The taxonomy of
untrustworthy REDs, the checklist, the differential recipe, the vacuous-pass
failure mode, and worked cases.
- `reference/real-app-patterns.md`: parallel routes, deferring an auth gate,
initial-load vs soft-navigation shells, the empty-shell failure mode, the
responsive-skeleton mismatch, edge cases.
@@ -0,0 +1,355 @@
# Refactor patterns — push dynamic down into the shell
Each pattern is **before → after**: keep as much as possible in the prerendered shell, and wrap only genuinely per-request work in a tight `<Suspense>` (or hoist it into `use cache`). Production shapes — parallel-route slots, deferring an auth gate, client slot-routers — are in `real-app-patterns.md`.
---
## 1. Awaiting at the top → move the await into a Suspense child
The most common blocking shape. Awaiting request-time data at the top of a page/layout makes **everything below it** dynamic.
```tsx
// ❌ before — top-level await of a non-static param + uncached data
export default async function Page(props: PageProps<"/store/[slug]">) {
const { slug } = await props.params;
const product = await db.products.findBySlug(slug);
return (
<article>
<h1>{product.name}</h1>
</article>
);
}
```
```tsx
// ✅ after — pass the params promise down; await inside a Suspense-wrapped child
import { Suspense } from "react";
export default function Page(props: PageProps<"/store/[slug]">) {
return (
<Suspense fallback={<p>Loading product…</p>}>
<Product params={props.params} />
</Suspense>
);
}
async function Product({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params;
const product = await db.products.findBySlug(slug);
return (
<article>
<h1>{product.name}</h1>
</article>
);
}
```
Inline variant when you don't want a separate component — unwrap the promise without awaiting at the top:
```tsx
export default function Page(props: PageProps<"/store/[category]">) {
return (
<Suspense fallback={<Grid.Skeleton />}>
{props.params.then(({ category }) => (
<ProductGrid category={category} />
))}
</Suspense>
);
}
```
**Insight:** [runtime data during prerendering](https://nextjs.org/docs/messages/blocking-prerender-runtime).
---
## 2. `cookies()` / `headers()` in a layout → start, don't await; pass down
A layout that awaits request data blocks the layout **and every page under it**.
```tsx
// ❌ before — whole layout (and all children) becomes dynamic
export default async function Layout({ children }) {
const cookieStore = await cookies();
const theme = cookieStore.get("theme")?.value;
return <body data-theme={theme}>{children}</body>;
}
```
```tsx
// ✅ after — start the read without awaiting, pass the promise to a Suspense child
import { cookies } from "next/headers";
import { Suspense } from "react";
export default function Layout({ children }: { children: React.ReactNode }) {
const cookieStore = cookies(); // not awaited → does not block the shell
return (
<body>
<nav>
<Suspense fallback={<UserMenu.Skeleton />}>
<UserMenu cookiePromise={cookieStore} />
</Suspense>
</nav>
{children}
</body>
);
}
async function UserMenu({
cookiePromise,
}: {
cookiePromise: ReturnType<typeof cookies>;
}) {
const theme = (await cookiePromise).get("theme")?.value;
return <div data-theme={theme}>…</div>;
}
```
`{children}` and `<nav>` stay in the shell; only `<UserMenu>` streams.
**Insight:** [runtime data during prerendering](https://nextjs.org/docs/messages/blocking-prerender-runtime).
---
## 3. Uncached fetch / DB read → choose `use cache` _or_ `<Suspense>`
Decide per data source. Same-for-everyone & rarely-changing → cache it (it joins the shell). Per-request & must-be-fresh → leave it uncached behind a boundary.
```tsx
// ❌ before — both block the shell
const product = await db.products.findBySlug(slug); // rarely changes
const inventory = await db.inventory.findBySlug(slug); // must be fresh
```
```tsx
// ✅ after — cache the stable one (shell), defer the fresh one (streams)
async function getProduct(slug: string) {
"use cache"; // → resolved at prerender, lands in the shell
return db.products.findBySlug(slug);
}
<Suspense fallback={<p>Checking availability…</p>}>
<Inventory params={params} /> {/* uncached read stays here, streams in */}
</Suspense>;
```
> A bare `'use cache'` applies the `default` `cacheLife` profile. Choose freshness explicitly with `cacheLife('<profile>')` (`default` / `seconds` / `minutes` / `hours` / `days` / `weeks` / `max`) rather than shipping the default lifetime by omission.
>
> Serverless note: `use cache` is in-memory and does not persist across instances — use [`use cache: remote`](https://nextjs.org/docs/app/api-reference/directives/use-cache-remote) for a durable shell.
**Insight:** [uncached data during prerendering](https://nextjs.org/docs/messages/blocking-prerender-dynamic).
---
## 4. Dynamic params → `generateStaticParams` (shell) or `<Suspense>` (stream)
If the set of params is enumerable, prerender them so `await params` resolves into the shell. Otherwise treat params as request-time and wrap consumers in `<Suspense>`.
```tsx
// ✅ option A — enumerate → params resolve into the shell, no Suspense needed for params
export function generateStaticParams() {
return [{ slug: "shoes" }, { slug: "hats" }];
}
export default async function Page({ params }: PageProps<"/store/[slug]">) {
const { slug } = await params; // known at build → shell-safe
// ...
}
```
```tsx
// ✅ option B — not enumerable → params is request-time; await it inside a boundary (pattern #1)
```
Root params (the dynamic segments the root layout sits inside, e.g. `app/[lang]/layout.tsx`) are readable from any Server Component via `next/root-params` without prop-drilling — but under Cache Components they must still be enumerated by `generateStaticParams` (at least one value per root param) to land in the shell, the same as any other dynamic param.
**Insight:** [runtime data during prerendering](https://nextjs.org/docs/messages/blocking-prerender-runtime).
---
## 5. `searchParams` → always behind `<Suspense>` (on page load)
Search params are never known at build, so awaiting them (or `useSearchParams()`) suspends on a page load. Keep the rest of the page in the shell by isolating the consumer.
```tsx
// ✅ static content stays in the shell; the search-dependent part streams
export default function Page(props: PageProps<"/search">) {
return (
<>
<h1>Search</h1> {/* shell */}
<Suspense fallback={<Results.Skeleton />}>
<Results searchParams={props.searchParams} />
</Suspense>
</>
);
}
async function Results({
searchParams,
}: {
searchParams: Promise<{ q?: string }>;
}) {
const { q } = await searchParams;
return <ResultList query={q} />;
}
```
On a **client navigation** the router already has the URL, so a `useSearchParams()` consumer resolves synchronously and can appear in the prefetched shell — but you still need the boundary for the page-load path.
**Insight:** [runtime data during prerendering](https://nextjs.org/docs/messages/blocking-prerender-runtime) (or, via `useSearchParams` in a Client Component, [URL data in a Client Component](https://nextjs.org/docs/messages/blocking-prerender-client-hook)).
---
## 6. Non-deterministic values → `connection()` + `<Suspense>`, or cache
`Math.random()`, `Date.now()`, `crypto.randomUUID()` produce different output each run, so Cache Components makes you choose: per-request (defer) or fixed (cache).
```tsx
// ✅ per-request value: gate on connection() and wrap in Suspense
import { connection } from "next/server";
async function RequestId() {
await connection();
return <span>{crypto.randomUUID()}</span>;
}
// <Suspense fallback={null}><RequestId /></Suspense>
```
```tsx
// ✅ same value for everyone: cache it so it joins the shell
async function buildId() {
"use cache";
return Date.now();
}
```
**Insight:** [`Date.now()`](https://nextjs.org/docs/messages/blocking-prerender-current-time), [`Math.random()`](https://nextjs.org/docs/messages/blocking-prerender-random), or [`crypto`](https://nextjs.org/docs/messages/blocking-prerender-crypto) while prerendering.
---
## 7. Dynamic `generateMetadata` → static export, `use cache`, or a dynamic-marker for runtime data
```tsx
// ❌ before — reading request data blocks the route's metadata
export async function generateMetadata() {
const c = await cookies();
return { title: c.get("title")?.value };
}
```
```tsx
// ✅ option A — static
export const metadata = { title: "Store" };
// ✅ option B — cache the metadata (depends on external data, not runtime data)
export async function generateMetadata() {
"use cache";
return { title: await getTitle() };
}
```
```tsx
// ✅ option C — metadata genuinely needs runtime data (cookies/headers):
// keep generateMetadata dynamic, and add a dynamic-marker component to the
// page so the rest of the page still prerenders into the shell.
import { cookies } from "next/headers";
import { connection } from "next/server";
import { Suspense } from "react";
export async function generateMetadata() {
const token = (await cookies()).get("token")?.value;
return { title: token ? "Personalized" : "Store" };
}
async function DynamicMarker() {
await connection(); // signals intentional dynamic content
return null;
}
export default function Page() {
return (
<>
<article>{/* static content — stays in the shell */}</article>
<Suspense>
<DynamicMarker />
</Suspense>
</>
);
}
```
`generateViewport` is the same, except dynamic viewport blocks the **whole page**. Genuine instant fixes: a static `viewport` export, or `use cache`. The other two are dynamic-acceptance opt-outs, not instant fixes — do not treat them as a way to reach GREEN: `export const instant = false` opts the segment out of validation while the navigation still blocks, and a `<Suspense>` above the document `<body>` makes the whole route dynamic.
**Insight:** [runtime data in `generateMetadata()`](https://nextjs.org/docs/messages/blocking-prerender-metadata-runtime).
---
## 8. Keep the LCP element in the shell
Don't bury the main heading (the LCP element) inside a boundary — it can't paint until the boundary resolves.
```tsx
// ✅ LCP outside the boundary → paints in the shell
<h1>{product.name}</h1> {/* shell (cache the name if needed) */}
<Suspense fallback={<Reviews.Skeleton />}>
<Reviews productId={id} /> {/* streams */}
</Suspense>
```
---
## 9. Granularity below shared layouts (client-nav correctness)
A single boundary in the **root** layout passes a page-load check but leaves sibling client navigations blocking. Put a boundary **below the shared layout**.
```tsx
// app/store/layout.tsx — boundary below the /store shared layout covers
// client navs like /store/shoes → /store/hats (the root boundary does not)
export default function StoreLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<section>
<StoreNav /> {/* shell */}
<Suspense fallback={<Page.Skeleton />}>{children}</Suspense>
</section>
);
}
```
Prefer per-component boundaries inside the page (patterns #1–#5) over one big layout boundary — they keep more real content in the shell and stream independently.
**Insight:** the read's own insight surfaces on the client navigation when the boundary is too high — see [where to place the boundary](https://nextjs.org/docs/messages/blocking-prerender-dynamic#choosing-where-to-place-the-boundary).
## 10. Can't push the read down? Runtime-prefetch the whole route
Patterns 1–9 grow a **static shell** by moving dynamic reads behind boundaries. Some routes resist that: an ID minted per request (`createId()`), an auth/scope resolution the whole subtree needs, a page that is _all_ dynamic by nature. The read can't move, so there is no meaningful shell to commit and the soft nav stays RED. The escape hatch is **runtime prefetching** — don't prerender a shell, run the dynamic render _in the prefetch_ so the whole route is warm before the click and the soft nav commits the real content instantly.
It has **two halves — both required**, and route config alone is RED:
```tsx
// 1. The route opts in — on EVERY leaf (page/default) segment, parallel @slots
// included, or instant validation re-triggers on the segments that lack it
// (the same all-or-nothing coupling as an `instant = false` opt-out).
export const prefetch = 'allow-runtime'
// 2. The <Link> asks for a FULL prefetch — that is what spawns the runtime
// request. A default/auto prefetch only warms the static shell.
<Link href={href} prefetch={true}>…</Link>
// <Link prefetch> already issues the full prefetch on hover and on viewport
// entry, so prefer it. An imperative full prefetch via router.prefetch needs
// the non-exported PrefetchKind enum, so it has no clean public form.
```
Under `instant()` the runtime entry is what commits, so the real content (not a skeleton) shows under the lock — that is the GREEN.
Gotchas (each cost real debugging time):
- **The full prefetch is mandatory.** With App Shells enabled an auto/PPR prefetch bails before the runtime spawn (`subtreeHasSpeculativePrefetch`); only `prefetch={true}` / `kind: 'full'` reaches it. If you set `prefetch = 'allow-runtime'` and it's still RED, the link is doing an auto prefetch.
- **All leaf slots must agree.** `allow-runtime` on the content segment but `instant = false` (or nothing) on a sibling `@header`/`@sidebar` leaf leaves the route's runtime entry incomplete, so the lock falls back to the shell. Flip every leaf together.
- **Prefetch the canonical URL.** A link whose href 307-redirects (a `/foo` that canonicalizes to `/`) can't be prefetched — the prefetch receives the redirect, not the tree. Point the link and the prefetch at the final URL.
- **Don't blanket the full prefetch.** It fetches _all_ the target's dynamic data; issuing it on hover for every link (recents that point at whole chats) is wasteful. Scope `kind: 'full'` to the runtime-prefetch targets only.
- **Marker must be a committed node, not RSC bytes.** The content is often a client component, so its text isn't in the prefetch response — assert a `data-testid` that renders when the client subtree commits, not a substring of the stream.
Prefer a static shell (patterns 1–9) whenever the read can move: it's cheaper than a runtime prefetch and also covers hard load. Reach for runtime prefetching when the read genuinely can't move, or for a route that's all-dynamic by design.
**Insight:** [dynamic data during prefetching](https://nextjs.org/docs/messages/instant-link-prefetch-partial).
@@ -0,0 +1,88 @@
# Real-app patterns
The rest of this skill models a single linear `layout → page` tree. Production App Router routes add **parallel routes, shared layout UI, and auth gates**, which is where most of the real static-shell work happens. These patterns bridge that gap. Read the skill's `SKILL.md` first.
## Parallel routes: each slot is its own boundary
Instant validation treats every parallel-route slot below the shared layout as an **independent** navigation boundary. Consequences:
- **Each `@slot` needs its own `<Suspense>`** around its dynamic reads; a boundary in one slot does not cover another.
- **An uncovered dynamic read in any slot blocks the whole navigation.** A perfect `@content` does not help if `@sidebar` awaits a session at the top.
- **A slot that renders `null` (e.g. `default.tsx`) is shell-safe**: it is static and performs no reads. Slots that do not re-render for this navigation cost nothing.
```
[tenant]/layout.tsx (shared: already mounted on a soft navigation; not re-rendered)
├ @content → settings/layout → billing/page ← guard each slot's dynamic reads…
├ @sidebar → side nav ← …here too (independent boundary)
└ @header → default.tsx → null ← free
```
## Client-rendered slot routing is not part of the soft-navigation re-render
A common pattern: a stable shared layout renders `@header`/`@sidebar` through a **client** component that swaps slot content based on `usePathname()`. On a soft navigation, Next.js only re-renders the **server** segments that changed below the shared layout; a client-component subtree is not part of that re-render. So that navigation UI neither blocks the navigation nor needs a server `<Suspense>` for it; only the server segments that actually change (e.g. `@content`) matter. It does participate in an initial load (see the caveat below).
## "Instant" is not "useful shell": the empty-shell failure mode
Validation checks that a dynamic read is **guarded by a boundary**, not that the fallback is non-empty. A `<Suspense>` with no `fallback` (or `fallback={null}`) passes validation and commits instantly, but renders a **blank** shell. If a layout and its page both `await getSession()` (your auth library's request-time read) at the top under one empty-fallback boundary, the whole frame collapses to nothing while the user waits. "Validates as instant" and "good loading experience" are different goals.
> Give every boundary a real loading skeleton, and place it low so the most real content stays in the shell. A `fallback={null}` directly above `<body>` is a deliberate empty-shell opt-out; an empty fallback lower in the tree is almost always a bug.
## The responsive-skeleton mismatch: the shell must match every breakpoint
A loading skeleton that misaligns with the loaded UI is its own bug, and it usually appears on mobile. A hand-built skeleton encodes one layout; the real component is responsive and changes shape at breakpoints, so a desktop-shaped skeleton no longer lines up once the viewport is small.
A concrete shape: a list-detail view renders a list or tree in a side panel on desktop, but collapses that panel into a single dropdown or drawer on mobile (with its own loading state). A row skeleton built for the desktop panel has nothing to align with on mobile.
The fix is the same push-down as everywhere else: **share the real responsive layout between the live render and the shell render.** One responsive component renders both (its data slots show the reused `*Skeleton` in the shell and real data after the stream), so the breakpoint switch happens once, for both renders, and there is no second desktop-only skeleton to drift.
(Same hoist rule, responsive layout included.) Verify the shell at both desktop and mobile widths against the real render at the same width.
## Deferring an auth gate / top-level `await` in a layout
A top-level `await` in a layout blocks everything below it (the most common blocker; see [Runtime data during prerendering](https://nextjs.org/docs/messages/blocking-prerender-runtime)). Auth gates are the most common real instance:
```tsx
// ❌ Before: the await + redirect at the top blocks the whole settings frame
export default async function SettingsLayout({ children }) {
const session = await getSession(); // your auth library's request-time read; suspends during prerender → frame can't build
if (!session?.user) redirect(getLoginUrl());
return <Shell>{children}</Shell>;
}
```
```tsx
// ✅ After: render children unconditionally; move the gate into a Suspense child
import { Suspense } from "react";
export default function SettingsLayout({ children }) {
return (
<Shell>
<Suspense fallback={null}>
<AuthGate />
</Suspense>
{children}
</Shell>
);
}
async function AuthGate() {
const session = await getSession(); // the session read suspends during prerender…
if (!session?.user) redirect(getLoginUrl()); // …so redirect() never runs at build time
return null;
}
```
The shell prerenders as if authorized (the session read suspends before `redirect()` is reached, so the redirect only happens at request time), and `{children}` is now in the shell instead of behind the gate. (`fallback={null}` is correct here: `AuthGate` renders nothing on success.)
## Initial-load shell vs soft-navigation shell
The `test-template.md` specs drive a `<Link>` click for soft navigations and `page.goto()` for initial loads. The two shells can differ for the same route:
> **The initial-load shell can show less than the soft-navigation shell when a layout above the shared boundary awaits un-enumerated `params`/`searchParams`.** An initial load re-runs every layout from the root; if a parent layout does `await props.params` and that segment has no `generateStaticParams`, the param suspends on the initial load and its whole subtree drops out of the shell. A soft navigation does not re-render that parent and already has the params. Symptom: an element present after a `<Link>` click is missing after `goto`.
To assert the soft-navigation shell, drive a real `<Link>` click (through menus if necessary). Use `page.goto()` inside `instant()` to assert the initial-load shell, or when no parent above the shared boundary awaits un-enumerated params, in which case the two coincide.
## Edge cases
- **A `React.cache` (or custom memoization) wrapper around `cookies()`/`headers()` still suspends.** Memoizing the call does not make it shell-safe: the underlying request read still returns a pending promise during prerender. Only the **`use cache`** directive, keyed on static or param inputs, puts data in the shell.
- **Playwright cannot see a `display: contents` or fragment fallback.** Such a fallback reads as hidden, so `instant()` assertions cannot `toBeVisible()` it. Give fallbacks a real wrapper element with a `data-testid`.
@@ -0,0 +1,139 @@
# RED-test robustness: verify the RED before optimizing
The C-gate of the workflow. A RED that is red for the wrong reason sends you optimizing a route that
was never broken: the route becomes instant, the test stays red (or the code is contorted to
satisfy a broken assertion), and the effort lands on the wrong problem. The prevention is cheap:
spend a few minutes verifying the RED is trustworthy first.
## The deciding question
> **Does the marker render WITHOUT the lock, as the test user?**
- **No**: the test is red because the marker or page is not there for that user or environment. A
marker bug, not an instant-navigation bug. Fix the marker. (This is the most common case.)
- **Yes**: the marker exists and is reachable; a red under the lock is a genuine "not instant".
Optimize the route.
Everything below serves answering that question honestly.
## The robustness checklist (all must hold)
1. **Red on baseline**: fails on the unfixed route.
2. **Right reason**: without the lock, the marker is visible on the production-build rig (never
`next dev`), running as the test user, not only in the author's own logged-in session.
3. **Differential**: reverting only the fix → RED; re-applying → GREEN; nothing else moves it.
4. **Non-gameable marker**: a sync element of the static shell, never streamed data.
5. **Deterministic on a production build**: stable across N runs; never `next dev`.
6. **Discriminating both ways**: present under the lock on an instant route, absent under the
lock on a blocking one.
7. **Renders for the test user**: under that user's flags, plan, role, and data.
8. **Conditional redirects accounted for**: assert at the route's real destination for that user.
9. **Real selector**: a `data-testid` on a known static-shell node, not a guessed `role`/`name`.
10. **Visible marker**: not `display:none`, off-screen, or inside a hover overlay; for lists,
target `.filter({ visible: true }).first()`.
11. **Fresh build under test**: the deployment being measured contains the latest commit, not a
build URL still serving the previous deploy.
## Taxonomy: red for the wrong reason
Any of these makes a RED untrustworthy. None of them is "the navigation isn't instant."
| Wrong reason | How it occurs | How to rule it out |
| ---------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| **Selector matches nothing** | a guessed `getByRole('button', { name: 'Folder' })` | grep the component for the real accessible name; add a `data-testid` |
| **Conditional redirect** | the route `redirect()`s for the test user (flag/role), so the marker page is never reached | check the page's top-level branches; assert at the real destination, or pin the flag |
| **Flag / plan / role gate** | the author has the flag or plan; the test user does not | run the unlocked baseline as the test user; pin flags via the project's override mechanism |
| **Empty state** | the marker only exists when data does; the CI account is empty | pick a marker present in the empty state (a layout element such as the page header), or seed data |
| **Timeout / flake** | a slow API or transient infrastructure error | re-run; separate infrastructure flake from a real signal |
| **Streamed marker** | the marker is behind `<Suspense>`, so it is never in the shell | choose a sync shell element; verify it sits outside every `<Suspense>` |
| **Auth redirect** | unauthenticated → `/login` | confirm login succeeded before the navigation |
| **Stale deployment** | the test ran against the previous build (the URL under test still serves the prior deploy) | poll the deployment for a marker from the latest commit before trusting any verdict |
| **Hidden / off-screen** | the testid is on a hover-overlay or off-screen list item | put the marker on an always-visible node; `.filter({ visible: true }).first()` for lists |
## Worked cases
These are illustrative failures from real optimization runs; each was red for a wrong reason, and
none was an instant-navigation problem. One app's drift surface might be dominated by feature flags and
plans; another's by auth state, an empty database, or locale. The taxonomy lists every wrong
reason; the rig file's DRIFT list says which rows apply to your app.
- **Guessed selector + empty state**: the marker was a button picked by a guessed accessible name
that no element actually had, on a list page whose CI account had no rows. → checks 7, 9. Fix: a
`data-testid` on a real static-shell node.
- **Hidden marker**: the testid sat first on a `hidden sm:block` hover-overlay link, then on an
off-screen carousel card; Playwright resolved the element but reported it hidden. → check 10.
Fix: an always-visible node; for lists, `.filter({ visible: true }).first()`.
## Differential check (capture in the PR)
The strongest evidence that the RED measured the property:
```
1. on the fixed branch → GREEN
2. revert ONLY the fix (the <Suspense> push-down) → RED
3. re-apply → GREEN
4. confirm no other change moves it
```
Link the two runs (or include the toggle diff and results) in the PR description. A reviewer who
sees the differential knows the test measures the property.
## `instant()` is not a stopwatch
The test does not measure how fast a navigation is. `instant()` gates dynamic data so the content
of the static shell can be asserted; the signal is presence, not speed. Under the lock, an instant
route's shell is present, and a blocking route's content never commits, regardless of wait time.
Therefore:
- The shipped assertion is `await expect(SHELL_MARKER).toBeVisible()` under the lock. Do not add a
custom timeout or a `painted` boolean.
- A custom short timeout (e.g. `3000`) implies a race against a clock that does not exist. It adds
nothing to the verdict and invites false REDs on an instant route whose commit lands a microtask
late.
- Do not use `locator.isVisible({ timeout })` as a soft wait: Playwright deprecated and ignores
that timeout; the call returns immediately.
- "Renders for the test user" (checks 7-9) is established at authoring time with the unlocked
baseline scaffold, not by a timed assertion in the shipped test.
## `instant()` guards need no retries and no prefetch warming
An `instant()` guard is deterministic. Do not configure retries on one, and do not hover-warm to
help a prefetch land in time. Under the lock, the router initiates the route prefetch and awaits it
before committing (even for a `prefetch={false}` link, even for a route already in the prefetch
cache), so the committed shell does not depend on any prior render, hover, or menu-open prefetch.
A flaky guard has a real cause: a marker that is not a sync node of the destination's shell, a
flag/role/empty-state gap for the test user, or a genuinely blocking route. The fix is in the page or
the marker; a retry masks the regression the guard exists to catch. The only legitimate
`.hover()`/menu-open is when the trigger element itself is not in the DOM until hovered or opened.
## Silent no-op: the testing API must be exposed in the measured build
`instant()` works by setting a cookie (`next-instant-navigation-testing`) that lock code inside the
build reads. It does not throw when that lock code is absent; it only throws on nested calls or an
unknown base URL. If the build was produced without the testing API
(`experimental.exposeTestingApiInProductionBuild`), the cookie is ignored, the navigation runs
normally, and the `instant()` test passes vacuously. A green `instant()` test is only meaningful if
the lock engaged.
Two defenses; use both:
1. **Confirm the API is exposed on the target.** Wire the flag to the platform's preview/staging
condition or an explicit environment variable; the rig file records the project's spelling
(SKILL.md phases 0 and A). Do not trust a pass from a build where it is not set.
2. **Make the test self-validating**: for any route with deferred content, also assert that the
deferred content is gated under the lock, not only that the shell is present
(`test-template.md`, self-validating variant). If the lock did not engage, the content is
already present and `toHaveCount(0)` fails.
The gated half holds under the lock for both navigation types regardless of warm state: the
soft-nav client lock gates dynamic-data writes, and on an initial load the server honors the
cookie on the document request and suspends dynamic data. A vacuous pass is only possible with
a build produced WITHOUT the testing API, which defense #1 above covers.
## Determinism and the rig
- Always measure on a production build, never `next dev`; SKILL.md phase A owns this invariant and
its rationale.
- Run the RED several times; an intermittently red gate is not a gate. If it flakes, determine
whether the cause is infrastructure (transient errors) or a real race before trusting either
color.
@@ -0,0 +1,103 @@
# Rig discovery: generate this project's `instant-nav.rig.md`
The skill's principles are environment-independent. Your build, deploy, auth,
and test infrastructure are not. This phase converts the principles into THIS
project's concrete workflow: run discovery once per repo, write the answers to
a committed `instant-nav.rig.md` (repo root, or next to your e2e config), and
every later run reads that file instead of rediscovering.
The skill is deliberately opinionated about **what** the rig must provide, and
deliberately unopinionated about **how** your stack provides it.
## How to discover
Inspect before asking. Most answers are already in the repo:
- `package.json` scripts (`build`, `start`, `test:e2e`)
- the e2e config (`playwright.config.*`: `baseURL`, `webServer`, projects)
- CI config (`.github/workflows/`, `vercel.json`, GitLab/Circle files,
Dockerfiles)
- `next.config.*` (existing `experimental` flags)
- existing e2e auth helpers (grep for `login`, `storageState`, `session`)
Ask the user only what the repo can't answer. Typically that means: which
deploy target counts as "preview", which account the suite runs as in CI, and
whether an agent is allowed to push and wait on CI unattended.
## The six questions (all must have answers), plus two derived fields
The six questions below must all have answers. The rig file template adds two
more fields the discovery feeds rather than asks directly: **LIVENESS** (the
SHA-echoing probe, derived from the LOOP answer) and **WALLS** (project-specific
build/run obstacles, accumulated as you first hit them).
1. **BUILD**: how is a production build of this app produced and served?
A per-push preview deploy, a staging container, or bare
`next build && next start`. Anything but `next dev`.
2. **EXPOSE**: what condition turns on
`experimental.exposeTestingApiInProductionBuild` for every measured build,
and never for real production? Spellings: an explicit
`EXPOSE_TESTING_API=1` for local production builds; `process.env.DEPLOY_ENV
=== 'staging'` for a generic CI/staging env var; `process.env.VERCEL_ENV ===
'preview'` on Vercel.
3. **RUN**: how is the Playwright suite invoked, and against which
`BASE_URL`?
4. **TEST USER**: which account does the suite run as, and how does login
happen (helper, `storageState`, API token)? What flags / plan / role / data
does that account have?
5. **DRIFT**: enumerate everything that can differ between the author's own
session and the test user's environment (feature flags, plans and
entitlements, roles, seeded vs empty data, locale, A/B buckets). Every item
is a way a RED can become untrustworthy; this list feeds the C-gate
(`reference/red-test-robustness.md`).
6. **LOOP**: the unattended iteration for your rig. Push → build → e2e
against the artifact → read the failure → fix → push (CI), or build → start
→ e2e (local). Note anything an agent cannot do alone (deploy approvals,
secrets, protected branches). Include the **liveness probe**: the endpoint
or response header that echoes the deployed commit SHA (e.g. a `/healthz`
route or an `x-deployed-sha` header), so a CI run can confirm the build
under test matches `HEAD` before trusting a verdict (SKILL.md phase A). If
the platform exposes no SHA-echoing endpoint or header, add one: surface a
build-time commit var (`VERCEL_GIT_COMMIT_SHA`, a CI commit variable) on a
`/healthz` route or a response header, or fall back to polling the deploy
platform's API for the deployment whose `commitSha === HEAD`. Record the
chosen mechanism. For a local `build && start` rig the artifact is the one
freshly built, so no probe is needed.
## The file: copy, fill, commit as `instant-nav.rig.md`
```md
# instant-nav rig: <project>
- BUILD: <command / platform that produces the measured production build>
- EXPOSE: <the condition wired to exposeTestingApiInProductionBuild>
- RUN: <e2e command> against <how BASE_URL is obtained>
- TEST USER: <account> via <login mechanism>; flags/plan/role/data: <...>
- DRIFT: <the enumerated drift surface>
- LOOP: <push → CI → e2e, or local build → start → test>; agent limits: <...>
- LIVENESS: <endpoint/header echoing the deployed SHA; n/a for local build && start>
- WALLS: <project-specific build/run obstacles + their workarounds>
```
Real apps rarely build for production cleanly on the first attempt: missing
secrets, server-only imports that fail prerender, ports held by respawning
servers. Record each wall and its workaround the first time you hit it. `WALLS`
accumulates the project-specific build/run obstacles that the other fields
cannot capture.
## Filled examples
**No CI / local-only.** BUILD: `EXPOSE_TESTING_API=1 next build && next
start`. EXPOSE: that env var. RUN: `BASE_URL=http://localhost:3000 playwright
test`. LOOP: build → start → test on one machine; fully agent-drivable, with
nothing to push, no secrets, and no deploy wait.
**Generic CI + container.** BUILD: the pipeline builds an image and deploys it
to a staging namespace. EXPOSE: `process.env.DEPLOY_ENV === 'staging'`. RUN: a
CI job runs Playwright against the staging URL. LOOP: push → pipeline → e2e;
fully agent-drivable once the pipeline is wired.
**Vercel preview deploys.** BUILD: every push builds a preview. EXPOSE:
`process.env.VERCEL_ENV === 'preview'`. RUN: `playwright test` with
`BASE_URL=<preview URL>`. LOOP: push → preview → e2e; fully agent-drivable
once the preview deploy and `VERCEL_ENV` gating are in place.
@@ -0,0 +1,165 @@
# Test template: the instant() guard
Ship one test per navigation type you are guarding: under `instant()`, assert that the
destination's static shell appears. `instant()` gates dynamic data, so a correctly instant route
commits its shell under the lock and a blocking route does not. `instant()` is a ruler, not a
stopwatch: do not add custom timeouts or timing races (see `reference/red-test-robustness.md`).
Whether the marker is the right one (rendering for the test user, not flag-gated, not redirected
away, not guessed) is established at authoring time with the unlocked baseline scaffold below
(phase B, the C-gate), not by additional assertions in the shipped test.
All identifiers in angle brackets (`<b>`, `<Trigger>`) and the `../helpers` import are placeholders;
substitute your project's e2e auth helper, URL helper, and real testids/trigger before running.
## Soft navigation (client-side navigation)
Drive a real `<Link>` click. The committed shell is the destination's prefetched App Shell.
Under the lock the router initiates and awaits the route prefetch itself, so no manual warming is
needed; if the shell is intermittently absent, treat it as a real blocker or marker bug (C-gate),
never as a warming race. Do not add waits or hovers.
```ts
import { instant } from "@next/playwright";
import { expect, test } from "@playwright/test";
// Use the auth/setup helpers your e2e suite already has. Run as the test user
// (defined in SKILL.md phase B).
import { logIntoTestAccount, testUrl } from "../helpers";
// A SYNC element of the destination's static shell (header, action button,
// column header), not data that streams in, and one that renders for the
// test user (not gated by a flag, plan, role, or empty state). Prefer a
// data-testid on a known static node over a guessed role/name.
const SHELL_MARKER = '[data-testid="<b>-shell-marker"]';
test.describe("instant nav: A -> B", () => {
test.beforeEach(async ({ page, browser }) => {
await logIntoTestAccount(page, browser);
});
test("B shell commits under instant()", async ({ page }) => {
await page.goto(testUrl("/"));
const trigger = page.getByRole("link", { name: "<Trigger>", exact: true });
await expect(trigger).toBeVisible({ timeout: 20000 });
await instant(page, async () => {
await trigger.click();
// static shell asserted under the lock; no timeout
await expect(page.locator(SHELL_MARKER)).toBeVisible();
});
});
});
```
The trigger selector follows the same rule as `SHELL_MARKER`: prefer a `data-testid` on the real
`<Link>` (`page.getByTestId('<trigger>-link')`) over a guessed accessible name. `getByRole({ name })`
is shown only for brevity; like the marker, the trigger must reliably resolve for the test user.
## Initial load (hard navigation)
Drive `page.goto()` inside `instant()` with the `baseURL` option. The served document is the
route's prerendered static shell. `baseURL` is required because `page` is still `about:blank` when
`instant()` runs (`resolveURL` falls back to `page.url()` only when no `baseURL` is passed).
Establish the session WITHOUT navigating `page` (inject `storageState`, or log in on a separate
context/page). A login helper that navigates `page` itself defeats the measurement for a different
reason: that navigation completes before `instant()` acquires the lock, so it runs unmeasured. The
session must be pre-established either way; otherwise an authenticated route redirects to login
and the RED is false.
If the project's only login helper navigates `page`, the agent must use a
storageState/separate-context path here instead, a session-injection call that
does NOT call `page.goto`:
```ts
test.describe("instant initial load: B", () => {
test.beforeEach(async ({ page }) => {
await injectTestUserSession(page); // storageState only; must NOT call page.goto
});
test("B shell is served", async ({ page }) => {
const url = testUrl("/<b>");
await instant(
page,
async () => {
await page.goto(url);
await expect(page.locator(SHELL_MARKER)).toBeVisible();
},
{ baseURL: new URL(url).origin },
);
});
});
```
## Self-validating variant (recommended for routes with deferred content)
Also assert that the deferred content is gated under the lock and streams after release. This
makes a vacuous pass impossible: if the lock did not engage (testing API missing from the build),
the content is already present and `toHaveCount(0)` fails (see `reference/red-test-robustness.md`).
`SHELL_MARKER` is the shell node; `[data-testid="<b>-content"]` is the deferred data it guards.
```ts
// soft navigation
await instant(page, async () => {
await trigger.click();
await expect(page.locator(SHELL_MARKER)).toBeVisible(); // shell present
await expect(page.getByTestId("<b>-content")).toHaveCount(0); // deferred data gated
});
await expect(page.getByTestId("<b>-content")).toBeVisible(); // streams after release
```
The two **gated-half** assertions (shell visible, deferred content `toHaveCount(0)`) apply to the
initial-load `page.goto()` form too. The cookie gates the deferred content identically for both:
on a soft navigation the client lock gates dynamic-data writes; on an initial load the server
honors the cookie on the document request (set via `addCookies()` before navigation, scoped by
`baseURL`) and suspends dynamic data, independent of whether the route was previously rendered or
cached. So the initial-load `toHaveCount(0)` gated half is as valid as the soft-nav one; it needs
no fresh browser context and no cache-busting query param.
The **post-release** assertion (`getByTestId('<b>-content').toBeVisible()` after the `instant()`
block) is soft-nav only. On an initial load the document was already emitted under the lock, so
nothing streams in after release; drop that assertion from the initial-load test, or
`page.reload()` first to fetch an unlocked document. The mechanism is in
`reference/red-test-robustness.md`.
## Baseline scaffold: do not ship
Before optimizing, confirm the target exists with an unlocked check (no `instant()`). It
disambiguates "not instant" from "marker absent for this user or environment". Run it as the test
user; mismatch against the rig DRIFT list is what the C-gate catches
(`reference/red-test-robustness.md`). Confirm the marker is real and reachable, then delete the
scaffold before the PR.
**The baseline must mirror the navigation type of the test you are shipping.** Drive a `<Link>`
click when guarding the soft-nav shell; drive `page.goto()` when guarding the initial-load shell.
The two shells can differ (`reference/real-app-patterns.md`): a click-driven baseline run against a
shipped `goto` test would confirm a marker that the `goto` path never shows, which produces exactly
the false RED the C-gate exists to prevent.
```ts
// soft-nav baseline: mirror the soft-nav instant() test
test("dev-only: navigating to <b> renders its shell (no lock)", async ({
page,
}) => {
await page.goto(testUrl("/"));
const trigger = page.getByRole("link", { name: "<Trigger>", exact: true });
await expect(trigger).toBeVisible({ timeout: 20000 });
await trigger.click();
await expect(page).toHaveURL(/\/<b>(\?|$)/); // confirm the real destination (no redirect away)
await expect(page.locator(SHELL_MARKER)).toBeVisible({ timeout: 15000 });
});
```
```ts
// initial-load baseline: mirror the initial-load instant() test (session pre-established)
test("dev-only: <b> shell is served (no lock)", async ({ page }) => {
await page.goto(testUrl("/<b>"));
await expect(page.locator(SHELL_MARKER)).toBeVisible({ timeout: 15000 });
});
```
Notes:
- Pick `SHELL_MARKER` as a sync element of the destination's static shell, never streamed data.
Use a `data-testid` on a known static node rather than a guessed role/name.
- Do not put a custom timeout, a `painted` boolean, or `isVisible({ timeout })` in the shipped
assertion, and do not add retries or hover-warming; see `reference/red-test-robustness.md`.
@@ -0,0 +1,81 @@
---
name: sanity-best-practices
description: Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, and the App SDK. Use this skill whenever working with Sanity schemas, defineType or defineField, GROQ or defineQuery, content modeling, Presentation or preview setups, Sanity-powered frontend integrations, Sanity Functions, documentEventHandler, defineDocumentFunction, defineMediaLibraryAssetFunction, @sanity/functions, @sanity/blueprints, sanity.blueprint.ts, event-driven content automation, or when reviewing and fixing a Sanity codebase.
---
# Sanity Best Practices
Comprehensive best practices and integration guides for Sanity development, maintained by Sanity. Use the quick reference below to load only the one or two topic files that match the task.
## When to Apply
Reference these guidelines when:
- Setting up a new Sanity project or onboarding
- Integrating Sanity with a frontend framework (Next.js, Nuxt, Astro, Remix, SvelteKit, Hydrogen)
- Writing GROQ queries or optimizing performance
- Designing content schemas
- Implementing Visual Editing and live preview
- Working with images, Portable Text, or page builders
- Configuring Sanity Studio structure
- Setting up TypeGen for type safety
- Implementing localization
- Migrating content from other systems
- Building custom apps with the Sanity App SDK
- Managing infrastructure with Blueprints
- Automating content workflows with Sanity Functions
## Global Rules
- Let Sanity generate `_id` values for ordinary documents. Do not create deterministic UUIDs, slug-derived IDs, or legacy-system IDs when creating documents.
- Model relationships with `reference` fields, then resolve related documents with GROQ lookups, source-key fields, or returned `_id` values from created documents.
- Use explicit document IDs mainly for singleton documents controlled by Studio Structure, including localized singletons such as `homePage-en`.
## Quick Reference
### Integration Guides
- `get-started` - Interactive onboarding for new Sanity projects
- `nextjs` - Next.js App Router, Live Content API, standalone Studio
- `nuxt` - Nuxt integration with @nuxtjs/sanity
- `angular` - Angular integration with @sanity/client, signals, resource API
- `astro` - Astro integration with @sanity/astro
- `remix` - React Router / Remix integration
- `svelte` - SvelteKit integration with @sanity/svelte-loader
- `hydrogen` - Shopify Hydrogen with Sanity
- `project-structure` - Standalone Studio and monorepo patterns
- `app-sdk` - Custom applications with Sanity App SDK
- `blueprints` - Infrastructure as Code: blueprint files, stacks, plan/deploy workflow, error recovery, CI deploys
- `functions` - Automating content workflows with Sanity Functions
### Topic Guides
- `groq` - GROQ query patterns, type safety, performance optimization
- `schema` - Schema design, field definitions, validation, deprecation patterns
- `visual-editing` - Presentation Tool, Stega, overlays, live preview
- `page-builder` - Page Builder arrays, block components, live editing
- `portable-text` - Rich text rendering and custom components
- `image` - Image schema, URL builder, hotspots, LQIP, Next.js Image
- `studio-structure` - Desk structure, singletons, navigation
- `typegen` - TypeGen configuration, workflow, type utilities
- `seo` - Metadata, sitemaps, Open Graph, JSON-LD
- `localization` - i18n patterns, document vs field-level, locale management
- `migration` - Content import overview (see also `migration-html-import`)
- `migration-html-import` - HTML to Portable Text with @portabletext/block-tools
## How to Use
Start with the single framework or topic guide that best matches the request, then read additional references only when the task crosses concerns. Use these reference files for detailed explanations and code examples:
```
references/groq.md
references/schema.md
references/nextjs.md
```
Each reference file contains:
- Comprehensive topic or integration coverage
- Incorrect and correct code examples
- Decision matrices and workflow guidance
- Framework-specific patterns where applicable
@@ -0,0 +1,576 @@
---
title: Angular & Sanity Integration Rules
description: Integration guide for Angular, including @sanity/client setup, data fetching with signals and resource API, Portable Text rendering, and image optimization.
---
# Angular & Sanity Integration Rules
Jump to the section that matches your Angular version or integration task instead of reading this guide straight through.
## Table of Contents
- Setup and configuration
- Client setup (service pattern)
- Data fetching patterns
- Routing
- Portable Text rendering
- Image optimization
- Modern Angular features
- SSR and prerendering
- Visual Editing
- Error handling
## 1. Setup & Configuration
Use the official template `sanity-template-angular-clean` as a starting point. It provides a monorepo structure:
```
project/
├── angular-app/ # Angular 19+ frontend
└── studio/ # Sanity Studio
```
Install dependencies in the Angular app:
```bash
npm install @sanity/client @sanity/image-url @portabletext/to-html
```
Configure environment files for Sanity credentials:
```typescript
// environments/environment.ts
export const environment = {
production: false,
sanity: {
projectId: "your-project-id",
dataset: "production",
apiVersion: "2025-05-01",
},
};
```
```typescript
// environments/environment.production.ts
export const environment = {
production: true,
sanity: {
projectId: "your-project-id",
dataset: "production",
apiVersion: "2025-05-01",
},
};
```
> There is no Angular-specific Sanity SDK. Use `@sanity/client` directly, wrapped in an Angular service.
### TypeGen in a Monorepo
Sanity TypeGen generates TypeScript types from your schema and GROQ queries. In the Angular monorepo template, TypeGen runs from the Studio side but scans your Angular app's source files. Ensure `studio/sanity.cli.ts` points at the Angular app:
```typescript
// studio/sanity.cli.ts
import { defineCliConfig } from "sanity/cli";
export default defineCliConfig({
typegen: {
enabled: true,
path: "../angular-app/src/**/*.ts",
generates: "../angular-app/sanity.types.ts",
},
});
```
The remaining defaults (`overloadClientMethods: true`, `schema: "schema.json"`) work as-is. Include the generated types file in `angular-app/tsconfig.json` (usually covered by `"include": ["src/**/*.ts", "sanity.types.ts"]`). See `typegen.md` for the full TypeGen workflow, git strategy, and configuration options.
## 2. Client Setup (Service Pattern)
Create an injectable service wrapping `@sanity/client` and `@sanity/image-url`:
```typescript
import { Injectable } from '@angular/core'
import { createClient, type ClientReturn, type QueryParams, type SanityClient } from '@sanity/client'
import imageUrlBuilder, { type ImageUrlBuilder } from '@sanity/image-url'
import type { SanityImageSource } from '@sanity/image-url/lib/types/types'
import { environment } from '../environments/environment'
@Injectable({ providedIn: 'root' })
export class SanityService {
private client: SanityClient
private builder: ImageUrlBuilder
constructor() {
this.client = createClient({
projectId: environment.sanity.projectId,
dataset: environment.sanity.dataset,
apiVersion: environment.sanity.apiVersion,
useCdn: true,
})
this.builder = imageUrlBuilder(this.client)
}
// ClientReturn resolves TypeGen's declaration-merged overloads for defineQuery strings
fetch<Query extends string>(query: Query, params?: QueryParams): Promise<ClientReturn<Query>> {
return this.client.fetch(query, params)
}
getImageUrlBuilder(source: SanityImageSource) {
return this.builder.image(source)
}
}
```
For preview/draft content, create a second client instance with a token and `useCdn: false`. Never expose tokens in client-side bundles — use server-side rendering or a proxy endpoint for authenticated requests.
## 3. Data Fetching Patterns
### A. `resource` API (Angular 19+, Recommended)
The `resource` API works natively with promises and integrates with Angular signals:
```typescript
import { Component, input, resource, inject } from '@angular/core'
import { defineQuery } from 'groq'
import { SanityService } from '../sanity.service'
const POST_QUERY = defineQuery(`*[_type == "post" && slug.current == $slug][0]{
title, body, mainImage, publishedAt
}`)
@Component({
selector: 'app-post',
standalone: true,
template: `
@if (post.value(); as p) {
<h1>{{ p.title }}</h1>
<time>{{ p.publishedAt | date }}</time>
} @else if (post.isLoading()) {
<p>Loading…</p>
} @else if (post.error()) {
<p>Error loading post</p>
}
`,
})
export default class PostComponent {
slug = input.required<string>()
private sanity = inject(SanityService)
post = resource({
params: () => ({ slug: this.slug() }),
loader: ({ params }) => this.sanity.fetch(POST_QUERY, params),
})
}
```
The `resource` automatically re-fetches when `slug` changes and exposes `value()`, `isLoading()`, and `error()` signals.
> **TypeGen:** Wrapping queries in `defineQuery` enables Sanity TypeGen to infer return types automatically — no manual type imports needed. See `typegen.md` for the full workflow.
### B. `rxResource` (Observable-based)
For teams using RxJS patterns or needing operators like `retry` and `debounceTime`:
```typescript
import { Component, input, inject } from '@angular/core'
import { rxResource } from '@angular/core/rxjs-interop'
import { defineQuery } from 'groq'
import { from } from 'rxjs'
import { SanityService } from '../sanity.service'
const POST_QUERY = defineQuery(`*[_type == "post" && slug.current == $slug][0]`)
@Component({ /* ... */ })
export default class PostComponent {
slug = input.required<string>()
private sanity = inject(SanityService)
post = rxResource({
params: () => ({ slug: this.slug() }),
loader: ({ params }) => from(this.sanity.fetch(POST_QUERY, params)),
})
}
```
### C. `toSignal` (Angular 17–18)
For apps not yet on Angular 19, convert observables to signals:
```typescript
import { Component, inject } from '@angular/core'
import { toSignal } from '@angular/core/rxjs-interop'
import { defineQuery } from 'groq'
import { from } from 'rxjs'
import { SanityService } from '../sanity.service'
const POSTS_QUERY = defineQuery(`*[_type == "post"] | order(publishedAt desc)`)
@Component({ /* ... */ })
export class HomeComponent {
private sanity = inject(SanityService)
posts = toSignal(from(this.sanity.fetch(POSTS_QUERY)), { initialValue: [] })
}
```
> **Note:** `toSignal` does not re-fetch on parameter changes. For dynamic queries, use `resource` or `rxResource`.
### Choosing a pattern
| Pattern | Angular Version | Reactivity | Best For |
| ------------ | --------------- | --------------------------- | ----------------------------- |
| `resource` | 19+ | Signal-based, auto re-fetch | New projects, dynamic queries |
| `rxResource` | 19+ | RxJS + signals | Teams using RxJS operators |
| `toSignal` | 17+ | One-shot conversion | Static queries, legacy apps |
## 4. Routing
Use lazy-loaded routes with `withComponentInputBinding()` so route params bind directly to component inputs:
```typescript
// app.config.ts
import { provideRouter, withComponentInputBinding } from "@angular/router";
import { routes } from "./app.routes";
export const appConfig = {
providers: [provideRouter(routes, withComponentInputBinding())],
};
```
```typescript
// app.routes.ts
import { Routes } from "@angular/router";
export const routes: Routes = [
{
path: "",
loadComponent: () => import("./home/home.component"),
pathMatch: "full",
},
{
path: "post/:slug",
loadComponent: () => import("./post/post.component"),
},
];
```
With `withComponentInputBinding()`, the `:slug` route param is automatically bound to `slug = input.required<string>()` on the component — no need to inject `ActivatedRoute`.
## 5. Portable Text Rendering
### A. `@portabletext/to-html` with Angular Pipe (Recommended)
```typescript
import { Pipe, PipeTransform, inject } from '@angular/core'
import { toHTML, type PortableTextComponents } from '@portabletext/to-html'
import type { PortableTextBlock } from '@portabletext/types'
import { SanityService } from '../sanity.service'
@Pipe({ name: 'portableTextToHTML', standalone: true })
export class PortableTextToHTMLPipe implements PipeTransform {
private sanity = inject(SanityService)
private components: PortableTextComponents = {
types: {
image: ({ value }) => {
const url = this.sanity.getImageUrlBuilder(value).width(800).auto('format').url()
return `<img src="${url}" alt="${value.alt || ''}" loading="lazy" />`
},
},
marks: {
link: ({ children, value }) =>
`<a href="${value.href}" rel="noopener noreferrer">${children}</a>`,
},
}
transform(value: PortableTextBlock[] | undefined): string {
if (!value) return ''
return toHTML(value, { components: this.components })
}
}
```
Usage in templates:
```html
<div [innerHTML]="post.body | portableTextToHTML"></div>
```
### B. `@limitless-angular/sanity` (Community, Component-based)
For full Angular component control over each block type, the community library `@limitless-angular/sanity` provides a component-based Portable Text renderer. This is useful when you need Angular-specific interactivity within rich text blocks.
See `portable-text.md` for Portable Text schema design and serialization rules.
## 6. Image Optimization
Create a pipe wrapping `@sanity/image-url`:
```typescript
import { Pipe, PipeTransform, inject } from '@angular/core'
import type { SanityImageSource } from '@sanity/image-url/lib/types/types'
import { SanityService } from '../sanity.service'
@Pipe({ name: 'sanityImage', standalone: true })
export class SanityImagePipe implements PipeTransform {
private sanity = inject(SanityService)
transform(value: SanityImageSource | undefined, width?: number): string | null {
if (!value) return null
const builder = this.sanity.getImageUrlBuilder(value)
if (width) return builder.width(width).auto('format').url()
return builder.auto('format').url()
}
}
```
Combine with Angular's `NgOptimizedImage` for LCP images:
```html
<!-- Priority image with NgOptimizedImage -->
<img
[ngSrc]="post.mainImage | sanityImage: 1200"
width="1200"
height="630"
priority
/>
<!-- Lazy-loaded image -->
<img
[src]="post.mainImage | sanityImage: 600"
[alt]="post.mainImage.alt"
loading="lazy"
/>
```
❌ **Bad:** Fetching full-size images without width constraints.
```html
<img [src]="post.mainImage | sanityImage" />
```
✅ **Good:** Specifying width and using `auto('format')` for WebP/AVIF delivery.
```html
<img [src]="post.mainImage | sanityImage: 800" loading="lazy" />
```
### LQIP with `NgOptimizedImage`
Sanity provides a base64 LQIP (Low Quality Image Placeholder) per image asset — but you must query it explicitly:
```groq
mainImage {
// @sanity/image-url needs these to build URLs with hotspot/crop support
asset,
hotspot,
crop,
alt,
// NgOptimizedImage needs these for placeholder and layout
"lqip": asset->metadata.lqip,
"width": asset->metadata.dimensions.width,
"height": asset->metadata.dimensions.height
}
```
Feed the LQIP directly into `NgOptimizedImage`'s `placeholder` attribute:
```html
<img
[ngSrc]="post.mainImage | sanityImage: 1200"
[width]="post.mainImage.width"
[height]="post.mainImage.height"
[placeholder]="post.mainImage.lqip"
[alt]="post.mainImage.alt"
priority
/>
```
Angular applies a CSS blur to the LQIP and crossfades to the full image on load. No extra libraries needed.
> **Note:** LQIP strings are small (~200 bytes) so they're safe to inline in SSR HTML and `TransferState`. See `image.md` for the full image query patterns.
See `image.md` for image field schema patterns and hotspot/crop configuration.
## 7. Modern Angular Features
When building with Sanity, leverage these Angular 19+ features:
- **Standalone components** — Default in Angular 19. No `NgModule` boilerplate needed.
- **Signals and `resource`** — Preferred over RxJS for data fetching. Simpler, less boilerplate.
- **New control flow** — Use `@if`, `@for`, `@switch` with `@empty` for cleaner templates:
```html
@for (post of posts.value(); track post._id) {
<app-post-card [post]="post" />
} @empty {
<p>No posts found.</p>
}
```
- **`@defer` blocks** — Lazy-load below-fold content:
```html
@defer (on viewport) {
<app-comments [postId]="post._id" />
} @placeholder {
<p>Scroll to see comments…</p>
}
```
- **`inject()` function** — Preferred over constructor injection for cleaner code.
- **Zoneless change detection** — Experimental in Angular 19. Works well with signals-based data fetching since signals automatically notify the framework of changes.
## 8. SSR & Prerendering
Angular 17+ includes built-in SSR support (replacing Angular Universal):
```typescript
// app.config.server.ts
import { provideClientHydration } from "@angular/platform-browser";
import { provideServerRendering } from "@angular/platform-server";
export const serverConfig = {
providers: [provideServerRendering(), provideClientHydration()],
};
```
Key considerations for Sanity + Angular SSR:
| Feature | Details |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **Hydration** | `provideClientHydration()` preserves server-rendered DOM. The client reuses it instead of re-rendering. |
| **HTTP Transfer Cache** | Only works with Angular's `HttpClient`. Since `@sanity/client` uses its own HTTP transport, use `TransferState` manually (see below). |
| **Prerendering** | Use `getPrerenderParams` in route config to generate static pages at build time. |
### Transfer State for `@sanity/client`
Angular's built-in HTTP Transfer Cache does not cover `@sanity/client` requests. Without manual transfer, the client re-fetches every query during hydration. Add `TransferState` to the service from Section 2:
```typescript
+ async function hashQuery(query: string, params?: QueryParams): Promise<string> {
+ const input = query + JSON.stringify(params ?? {})
+ const buffer = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(input))
+ return Array.from(new Uint8Array(buffer), b => b.toString(16).padStart(2, '0')).join('')
+ }
import { Injectable, inject } from '@angular/core'
+ import { isPlatformBrowser, isPlatformServer } from '@angular/common'
+ import { PLATFORM_ID, makeStateKey, TransferState } from '@angular/core'
import { createClient, type ClientReturn, type QueryParams, type SanityClient } from '@sanity/client'
export class SanityService {
private client: SanityClient
+ private transferState = inject(TransferState)
+ private platformId = inject(PLATFORM_ID)
async fetch<Query extends string>(query: Query, params?: QueryParams): Promise<ClientReturn<Query>> {
+ const key = makeStateKey<ClientReturn<Query>>(await hashQuery(query, params))
+
+ if (isPlatformBrowser(this.platformId)) {
+ const cached = this.transferState.get(key, null)
+ if (cached !== null) {
+ this.transferState.remove(key)
+ return cached
+ }
+ }
+
const result = await this.client.fetch(query, params)
+
+ if (isPlatformServer(this.platformId)) {
+ this.transferState.set(key, result)
+ }
+
return result
}
}
```
The `hashQuery` helper keeps `TransferState` keys short (SHA-256 hex) instead of embedding raw GROQ strings in the serialized HTML.
Prerendering dynamic routes:
```typescript
// app.routes.server.ts
import { RenderMode, ServerRoute } from "@angular/ssr";
export const serverRoutes: ServerRoute[] = [
{
path: "post/:slug",
renderMode: RenderMode.Prerender,
async getPrerenderParams() {
// Fetch all slugs from Sanity at build time
const client = createClient({
projectId: "...",
dataset: "...",
apiVersion: "...",
useCdn: true,
});
const slugs = await client.fetch<string[]>(
`*[_type == "post"].slug.current`,
);
return slugs.map((slug) => ({ slug }));
},
},
{ path: "**", renderMode: RenderMode.Server },
];
```
❌ **Bad:** Using `isPlatformBrowser()` in templates to conditionally render content — causes hydration mismatch.
✅ **Good:** Using `@defer` or `afterNextRender()` for browser-only code.
## 9. Visual Editing
> **Important:** Angular does not have official Sanity Visual Editing support. There is no `@sanity/visual-editing` integration, no Stega encoding, and no click-to-edit overlay for Angular applications. This is unlike Next.js, Nuxt, and SvelteKit which have first-party support.
### Preview Mode (Basic)
For draft content preview, create a separate preview client with an API token:
```typescript
@Injectable({ providedIn: 'root' })
export class SanityService {
private client: SanityClient
private previewClient: SanityClient
constructor() {
this.client = createClient({
projectId: environment.sanity.projectId,
dataset: environment.sanity.dataset,
apiVersion: environment.sanity.apiVersion,
useCdn: true,
})
this.previewClient = this.client.withConfig({
useCdn: false,
token: environment.sanity.previewToken, // Server-side only!
perspective: 'drafts',
})
}
fetch<Query extends string>(query: Query, params?: QueryParams, preview = false): Promise<ClientReturn<Query>> {
const client = preview ? this.previewClient : this.client
return client.fetch(query, params)
}
}
```
> **Security:** Never expose the preview token in client-side bundles. Use this pattern only with SSR where the token stays on the server, or proxy preview requests through a backend API.
### Community Visual Editing
The community library `@limitless-angular/sanity` provides experimental Visual Editing support for Angular, including overlay click-to-edit functionality. Check its documentation for current status and limitations.
## 10. Error Handling
Common errors when integrating Angular with Sanity:
| Error | Cause | Solution |
| ------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `401 Unauthorized` | Invalid or missing API token | Verify token in [Sanity Manage](https://www.sanity.io/manage). Ensure it has correct permissions. |
| `403 Forbidden` | CORS origin not allowed | Add your Angular dev/production URL to CORS origins in [Sanity Manage](https://www.sanity.io/manage). |
| `422 Invalid query` | GROQ syntax error | Test queries in Vision plugin or Sanity's GROQ playground. See `groq.md`. |
| Hydration mismatch | Conditional rendering based on platform | Use `@defer` or `afterNextRender()` instead of `isPlatformBrowser()` checks. |
| Empty response | Missing dataset or wrong `apiVersion` | Verify environment config. Use a date-based `apiVersion` (e.g., `'2025-05-01'`). |
| Images not loading | Missing `@sanity/image-url` setup | Ensure `getImageUrlBuilder` is called with a valid image reference. See `image.md`. |
For GROQ query patterns and best practices, see `groq.md`. For schema design, see `schema.md`.
@@ -0,0 +1,462 @@
---
title: Sanity App SDK
description: Rules for building custom applications with the Sanity App SDK, including React hooks, document handles, real-time patterns, and Suspense best practices.
---
# Sanity App SDK
Build custom React applications that interact with Sanity content in real-time.
## Tech Stack
- **Framework:** React 19+, TypeScript
- **Packages:** `@sanity/sdk`, `@sanity/sdk-react`
- **Optional UI:** `@sanity/ui`, `styled-components`
- **Runtime:** Node.js 20+
## Commands
```bash
# Basic quickstart
npx sanity@latest init --template app-quickstart --organization <your-org-id> --output-path . --typescript --skip-mcp
# With Sanity UI components
npx sanity@latest init --template app-sanity-ui --organization <your-org-id> --output-path . --typescript --skip-mcp
# Start development server
npm run dev
# Deploy to Sanity
npx sanity@latest deploy
# Install Sanity UI
npm install @sanity/ui styled-components
```
## Project Structure
```
my-app/
├── sanity.cli.ts # CLI config (org ID, entry point)
├── src/
│ ├── App.tsx # Root component with SanityApp provider
│ ├── App.css # Global styles
│ └── components/ # Your components
├── package.json
└── tsconfig.json
```
## Boundaries
- **Always:** Wrap data-fetching components in `<Suspense>`, use `documentId` as React `key`, read/write directly to Content Lake (not local state)
- **Always:** Use `useDocuments` for lists, `useDocumentProjection` for display, `useDocument` + `useEditDocument` for editing
- **Ask first:** Before using `useQuery` with raw GROQ (prefer `useDocuments` + `useDocumentProjection`)
- **Ask first:** Before adding multiple data-fetching hooks in a single component
- **Never:** Use `useState` for form values that should sync with Content Lake
- **Never:** Use array index as React `key` for document lists (breaks real-time updates)
- **Never:** Forget the `fallback` prop on `<SanityApp>` and `<Suspense>` boundaries
---
## Configuration
### CLI Config (`sanity.cli.ts`)
```typescript
import { defineCliConfig } from "sanity/cli";
export default defineCliConfig({
app: {
organizationId: "your-org-id",
entry: "./src/App.tsx",
},
});
```
### App Root (`src/App.tsx`)
```typescript
import { SanityApp, type SanityConfig } from '@sanity/sdk-react'
export default function App() {
const config: SanityConfig[] = [
{
projectId: 'your-project-id',
dataset: 'production',
},
]
return (
<SanityApp config={config} fallback={<div>Loading...</div>}>
<YourComponents />
</SanityApp>
)
}
```
### With Sanity UI
```typescript
import { SanityApp, type SanityConfig } from '@sanity/sdk-react'
import { ThemeProvider } from '@sanity/ui'
import { buildTheme } from '@sanity/ui/theme'
const theme = buildTheme()
export default function App() {
const config: SanityConfig[] = [
{ projectId: 'your-project-id', dataset: 'production' },
]
return (
<ThemeProvider theme={theme}>
<SanityApp config={config} fallback={<div>Loading...</div>}>
<YourComponents />
</SanityApp>
</ThemeProvider>
)
}
```
### Environment Variables
Prefix with `SANITY_APP_` for automatic bundling:
```bash
SANITY_APP_PROJECT_ID=abc123
SANITY_APP_DATASET=production
```
Access: `process.env.SANITY_APP_PROJECT_ID`
---
## Document Handles
Lightweight references to documents. Fetch handles first, then load content as needed.
```typescript
interface DocumentHandle {
documentId: string;
documentType: string;
projectId?: string;
dataset?: string;
}
```
### Creating Handles
```typescript
// Best: From useDocuments hook
const { data: handles } = useDocuments({ documentType: 'article' })
// Good: With helper (preserves literal types for TypeGen)
import { createDocumentHandle } from '@sanity/sdk'
const handle = createDocumentHandle({
documentId: 'my-doc-id',
documentType: 'article',
})
// Good: With as const (preserves literal types)
const handle = {
documentId: 'my-doc-id',
documentType: 'article',
} as const
```
---
## Hook Selection
| Hook | Use Case | Returns |
| ----------------------- | ------------------------------------ | ---------------------- |
| `useDocuments` | List of documents (infinite scroll) | Document handles |
| `usePaginatedDocuments` | Paginated lists with page controls | Document handles |
| `useDocument` | Single document, real-time editing | Full document or field |
| `useDocumentProjection` | Specific fields, display only | Projected data |
| `useQuery` | Complex GROQ queries (use sparingly) | Raw query results |
---
## Code Patterns
### Fetching a Document List
```typescript
// Good: Fetch handles, render items with Suspense
import { Suspense } from 'react'
import { useDocuments } from '@sanity/sdk-react'
function ArticleList() {
const { data, hasMore, loadMore, isPending } = useDocuments({
documentType: 'article',
batchSize: 10,
orderings: [{ field: '_updatedAt', direction: 'desc' }],
})
return (
<>
<ul>
{data.map((handle) => (
<Suspense key={handle.documentId} fallback={<li>Loading...</li>}>
<ArticleItem {...handle} />
</Suspense>
))}
</ul>
{hasMore && (
<button onClick={loadMore} disabled={isPending}>
Load More
</button>
)}
</>
)
}
```
```typescript
// Bad: Over-fetching with raw GROQ, no pagination
function BadArticleList() {
const { data } = useQuery(`*[_type == "article"]`)
return data?.map((doc, i) => <li key={i}>{doc.title}</li>)
}
```
### Projecting Content from a Handle
```typescript
// Good: Project only needed fields
import { useDocumentProjection, type DocumentHandle } from '@sanity/sdk-react'
function ArticleItem(handle: DocumentHandle) {
const { data } = useDocumentProjection({
...handle,
projection: `{
title,
"authorName": author->name,
"imageUrl": image.asset->url
}`,
})
if (!data) return null
return (
<li>
<h2>{data.title}</h2>
<p>By {data.authorName}</p>
</li>
)
}
```
### Real-time Editing
```typescript
// Good: Read and write directly to Content Lake
import { useDocument, useEditDocument, type DocumentHandle } from '@sanity/sdk-react'
function TitleInput(handle: DocumentHandle) {
const { data: title } = useDocument({ ...handle, path: 'title' })
const editTitle = useEditDocument({ ...handle, path: 'title' })
return (
<input
type="text"
value={title ?? ''}
onChange={(e) => editTitle(e.currentTarget.value)}
/>
)
}
```
```typescript
// Bad: Local state with submit button - causes stale data
function BadTitleForm(handle: DocumentHandle) {
const [value, setValue] = useState('')
const editTitle = useEditDocument({ ...handle, path: 'title' })
function handleSubmit(e: FormEvent) {
e.preventDefault()
editTitle(value) // Only writes on submit!
}
return (
<form onSubmit={handleSubmit}>
<input value={value} onChange={(e) => setValue(e.target.value)} />
<button type="submit">Save</button>
</form>
)
}
```
### Document Actions
```typescript
import {
useApplyDocumentActions,
publishDocument,
unpublishDocument,
deleteDocument,
} from '@sanity/sdk-react'
function DocumentActions({ handle }: { handle: DocumentHandle }) {
const apply = useApplyDocumentActions()
return (
<div>
<button onClick={() => apply(publishDocument(handle))}>Publish</button>
<button onClick={() => apply(unpublishDocument(handle))}>Unpublish</button>
<button onClick={() => apply(deleteDocument(handle))}>Delete</button>
</div>
)
}
```
---
## Suspense Patterns
The App SDK uses React Suspense. Every data-fetching component must be wrapped.
### One Hook Per Component
```typescript
// Good: Separate fetchers into separate components
function EventsAndVenues() {
return (
<>
<Suspense fallback="Loading events...">
<EventsList />
</Suspense>
<Suspense fallback="Loading venues...">
<VenuesList />
</Suspense>
</>
)
}
function EventsList() {
const { data } = useDocuments({ documentType: 'event' })
return <List items={data} />
}
function VenuesList() {
const { data } = useDocuments({ documentType: 'venue' })
return <List items={data} />
}
```
```typescript
// Bad: Multiple fetchers in one component
function BadComponent() {
const { data: events } = useDocuments({ documentType: "event" });
const { data: venues } = useDocuments({ documentType: "venue" });
// Both trigger Suspense together, causing unnecessary re-renders
}
```
### Prevent Layout Shift
```typescript
// Good: Fallback matches final component dimensions
const BUTTON_TEXT = 'Open in Studio'
export function OpenInStudio({ handle }: { handle: DocumentHandle }) {
return (
<Suspense fallback={<Button text={BUTTON_TEXT} disabled />}>
<OpenInStudioButton handle={handle} />
</Suspense>
)
}
function OpenInStudioButton({ handle }: { handle: DocumentHandle }) {
const { navigateToStudioDocument } = useNavigateToStudioDocument(handle)
return <Button onClick={navigateToStudioDocument} text={BUTTON_TEXT} />
}
```
---
## Event Handling
```typescript
import { DocumentEvent, useDocumentEvent } from "@sanity/sdk-react";
function DocumentWatcher(handle: DocumentHandle) {
useDocumentEvent({
...handle,
onEvent: (event) => {
switch (event.type) {
case "edited":
console.log("Edited:", event.documentId);
break;
case "published":
console.log("Published:", event.documentId);
break;
case "deleted":
console.log("Deleted:", event.documentId);
break;
}
},
});
return null;
}
```
---
## Multi-Project Apps
```typescript
const config: SanityConfig[] = [
{ projectId: "project-1", dataset: "production" },
{ projectId: "project-2", dataset: "staging" },
];
// Handles include project/dataset info
const handle: DocumentHandle = {
documentId: "doc-123",
documentType: "article",
projectId: "project-1",
dataset: "production",
};
```
---
## Lazy Loading with Refs
```typescript
function LazyContent(handle: DocumentHandle) {
const ref = useRef(null)
const { data } = useDocumentProjection({
...handle,
ref, // Only loads when element enters viewport
projection: '{ title, body }',
})
return <div ref={ref}>{data?.title}</div>
}
```
---
## What's NOT Included
The App SDK provides hooks and data stores. You bring:
- UI components (use Sanity UI or your own)
- Router
- Form validation
- Schema validation
---
## Troubleshooting
| Issue | Solution |
| ----------------- | ----------------------------------------------------- |
| Safari dev issues | Use Chrome or Firefox during development |
| Port 3333 in use | `npm run dev -- --port 3334` |
| Auth errors | `npx sanity@latest logout && npx sanity@latest login` |
@@ -0,0 +1,174 @@
---
title: Astro & Sanity Integration Rules
description: Integration guide for Astro, including @sanity/astro, visual editing, and data fetching.
---
# Astro & Sanity Integration Rules
## 1. Setup & Configuration
### Scaffold a new Astro app
```bash
npm create astro@latest my-app -- --template with-tailwindcss --install --git --yes
cd my-app
```
`--yes` accepts defaults non-interactively. `--install` runs `npm install` for you, `--git` initializes a repo.
### Installation
Add the `@sanity/astro` integration and the renderer/helper packages used by the examples below.
```bash
npx astro add @sanity/astro
npm install astro-portabletext @sanity/image-url groq
```
`@sanity/astro` provides the `sanity:client` virtual module. `astro-portabletext` renders Portable Text. `@sanity/image-url` builds image URLs. `groq` exports `defineQuery` for typed queries.
### Configuration (`astro.config.mjs`)
Use the official `@sanity/astro` integration. `astro.config.mjs` runs at config time before Astro's env loading, so `import.meta.env.PUBLIC_*` is not available there — use Vite's `loadEnv` to read the same `PUBLIC_` variables your pages will use.
```javascript
import sanity from "@sanity/astro";
import { defineConfig } from "astro/config";
import { loadEnv } from "vite";
const { PUBLIC_SANITY_PROJECT_ID, PUBLIC_SANITY_DATASET } = loadEnv(
process.env.NODE_ENV ?? "development",
process.cwd(),
"",
);
export default defineConfig({
integrations: [
sanity({
projectId: PUBLIC_SANITY_PROJECT_ID,
dataset: PUBLIC_SANITY_DATASET,
useCdn: false, // False for static builds
studioBasePath: "/admin", // Optional — only if embedding the Studio
}),
],
});
```
Inside `.astro` files and components you can keep using `import.meta.env.PUBLIC_SANITY_*` directly; the `loadEnv` shim above is config-only.
### Client Type Safety
Enable types in `tsconfig.json`.
```json
{
"compilerOptions": {
"types": ["@sanity/astro/module"]
}
}
```
## 2. Data Fetching
### Basic Fetching
Use `sanityClient` from `sanity:client` in the frontmatter of your `.astro` files.
```astro
---
import { sanityClient } from "sanity:client";
import { defineQuery } from "groq";
const POSTS_QUERY = defineQuery(`*[_type == "post"]{title, slug}`);
const posts = await sanityClient.fetch(POSTS_QUERY);
---
<ul>
{posts.map(post => <li>{post.title}</li>)}
</ul>
```
### Helper Functions
It's best practice to abstract queries into a utility file (e.g., `src/utils/sanity.ts`).
```typescript
import { defineQuery } from "groq";
import { sanityClient } from "sanity:client";
const POSTS_QUERY = defineQuery(`*[_type == "post" && defined(slug.current)]`);
export async function getPosts() {
return await sanityClient.fetch(POSTS_QUERY);
}
```
### Dynamic Routes (`[slug].astro`)
Astro hoists `getStaticPaths()` into a separate module context. Module-scope `const` declarations in the frontmatter are NOT accessible inside it — referencing them throws `ReferenceError: <NAME> is not defined` at request time. Define queries used by `getStaticPaths` inside the function, or import them from a utility module.
```astro
---
import { sanityClient } from "sanity:client";
import { defineQuery } from "groq";
import { PortableText } from "astro-portabletext";
// Module-scope queries are fine for module-scope code…
const POST_QUERY = defineQuery(`*[_type == "post" && slug.current == $slug][0]{ title, body }`);
// …but anything used inside getStaticPaths must live inside it.
export async function getStaticPaths() {
const SLUGS_QUERY = defineQuery(
`*[_type == "post" && defined(slug.current)]{ "params": { "slug": slug.current } }`
);
return await sanityClient.fetch(SLUGS_QUERY);
}
const { slug } = Astro.params;
const post = await sanityClient.fetch(POST_QUERY, { slug });
---
<article>
<h1>{post?.title}</h1>
{post?.body && <PortableText value={post.body} />}
</article>
```
## 3. Portable Text
Use `astro-portabletext` for rendering rich text.
```astro
---
import { PortableText } from "astro-portabletext";
const { body } = Astro.props;
---
<div class="prose">
<PortableText value={body} />
</div>
```
## 4. Image Handling
Use `@sanity/image-url` to generate optimized image URLs.
```typescript
import imageUrlBuilder from "@sanity/image-url";
import { sanityClient } from "sanity:client";
const builder = imageUrlBuilder(sanityClient);
export function urlFor(source) {
return builder.image(source);
}
```
## 5. Visual Editing (Live Preview)
Astro handles visual editing slightly differently depending on if you are using Hybrid or Static mode.
### Setup
Ensure `stega` is enabled in your client configuration if you want clickable overlays.
For real-time updates in the presentation tool, you typically need a React component wrapper (since Astro components don't re-render on the client) or use the View Transitions API with a loader.
_Note: The `@sanity/astro` integration is evolving. Check the latest docs for "Visual Editing" support._
@@ -0,0 +1,280 @@
---
title: Sanity Blueprints
description: Rules for Sanity Blueprints, the Infrastructure as Code solution for managing Sanity resources declaratively. Covers blueprint files, stacks and scope, the plan/deploy workflow, deletion policies, error recovery, and CI deployment.
---
# Sanity Blueprints
Sanity's Infrastructure as Code (IaC) solution. Define resources declaratively in `sanity.blueprint.ts`, track the file in version control, preview changes with `plan`, apply them with `deploy`. Blueprints is the only way to deploy Sanity Functions.
The CLI is built for unattended use: every command accepts `--json`, all IDs can be supplied via flags or environment variables, and `--help` on any command is the authoritative reference. Always run via `npx sanity@latest blueprints <command>`.
## Mental Model
```
Blueprint file (code, intent) → Stack (deployed state) → Resources (real infrastructure)
```
| Concept | What it is |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **Blueprint file** | `sanity.blueprint.ts`, the declarative manifest of desired resources. The source of truth: if it's not in the file, it's not deployed |
| **Resource** | One managed thing (function, CORS origin, webhook, role, robot token, dataset). Identified by a unique `name` |
| **Definer** | Typed helper from `@sanity/blueprints` (e.g. `defineCorsOrigin`) that declares a resource and validates input as you write |
| **Stack** | The deployed counterpart of the file: the live resources on Sanity's side. One file can deploy to many Stacks (e.g. `staging`, `production`) |
| **Config file** | `.sanity/blueprint.config.json`, links the local file to a Stack and records scope. Gitignored by `init` automatically; not secret |
| **Scope** | `project` or `organization`. Determines which resource types a Stack can manage |
### Key behaviors
- Resources are matched **by `name`** between file and Stack. `plan` buckets every resource as create, update, no-op, or destroy.
- **There is no rename.** Changing a resource's `name` destroys the old resource and creates a new one under the new name.
- **Removal is destruction.** Deleting a resource from the file destroys it on the next deploy (subject to its deletion policy). `blueprints destroy` is equivalent to deploying an empty file.
- Deploys apply in dependency order. On partial failure, completed changes are rolled back best-effort in reverse order. Rollback is **not atomic**; some actions may be irreversible.
## Three different "deploy" commands
Do not confuse these:
| Command | What it deploys |
| -------------------------- | --------------------------------------------------------- |
| `sanity blueprints deploy` | Infrastructure resources defined in `sanity.blueprint.ts` |
| `sanity schema deploy` | Studio schema to Content Lake (for MCP and editor access) |
| `sanity deploy` | The Studio application to Sanity hosting |
## The Blueprint File
`sanity.blueprint.ts` default-exports a `defineBlueprint` call. TypeScript is idiomatic (definers validate inline and provide editor help); `.js` and hand-written `.json` also work but new files should use TypeScript.
```typescript
import {
defineBlueprint,
defineCorsOrigin,
defineDocumentFunction,
} from "@sanity/blueprints";
export default defineBlueprint({
values: {
corsOrigin: "https://studio.example.com",
},
resources: [
defineCorsOrigin({
name: "studio-cors",
origin: "$.values.corsOrigin",
}),
defineDocumentFunction({
name: "first-published",
event: {
on: ["create", "update"],
filter: "_type == 'post' && !defined(firstPublished)",
},
}),
],
});
```
- `resources` is an array of definer outputs. Every resource requires a unique `name`.
- `values` holds reusable file-level constants (always strings), referenced as `$.values.<key>`.
- Resource-type-specific fields are documented in the typed reference: https://reference.sanity.io/_sanity/blueprints/
### Discovering available resources
The definers exported by `@sanity/blueprints` are the canonical list of what Blueprints can manage. Discover them by inspecting the package's exports (every `define*` function is a resource definer) and reading their TSDoc for fields, defaults, and examples, or browse the typed reference at https://reference.sanity.io/_sanity/blueprints/. Do not rely on a memorized list; new definers ship additively.
When the Stack is organization-scoped, project-contained resources (CORS origins, webhooks, datasets, functions) must set their `project` field explicitly.
For the semantics of an individual resource type (what a CORS origin, webhook, or role does and which values make sense), consult that feature's own Sanity documentation. This reference covers how Blueprints manages resources, not the resources themselves.
## References and the Resource Graph
Resources reference values and each other with `$` string paths:
| Syntax | Resolves | When |
| ----------------------- | ---------------------------------------------- | ----------------------------------------- |
| `$.values.<key>` | A constant from the `values` block | At file evaluation |
| `$.resources.<name>` | Another resource in the file | At deploy time; creates a dependency edge |
| `$.resources.<name>.id` | The generated ID of that resource, as a string | At deploy time |
Blueprints builds the dependency graph from these references and orders work so dependencies are created first. Unresolved references and cycles fail validation before anything is deployed. To force ordering without a data reference, use `lifecycle: {dependsOn: '$.resources.<name>'}`.
### Referencing an existing project
The recommended pattern is an environment variable surfaced through `values`:
```typescript
import "dotenv/config";
// the CLI does not read .env files itself
export default defineBlueprint({
values: {
projectId: process.env.SANITY_PROJECT_ID ?? "",
},
resources: [
defineCorsOrigin({
name: "app-cors",
project: "$.values.projectId",
origin: "https://www.example.com",
}),
],
});
```
## Deletion Policies
Set `lifecycle.deletionPolicy` on a resource to control what removal means:
| Policy | Removed from file | Stack destroyed | Notes |
| --------- | -------------------- | ----------------------------- | -------------------------------------------- |
| `allow` | Resource destroyed | Resource destroyed | Default for stateless resources |
| `retain` | **Deployment fails** | Resource detached, kept alive | Default for stateful resources like datasets |
| `replace` | Resource destroyed | Resource destroyed | Updates become destroy + recreate |
| `protect` | **Deployment fails** | **Deployment fails** | Resource is never updated or destroyed |
Use `protect` for production-critical stateful resources:
```typescript
defineDataset({
name: "production",
lifecycle: { deletionPolicy: "protect" },
});
```
A deletion-policy violation is a pre-deploy validation failure, not a partial deploy: fix the file (or consciously change the policy) and re-run `plan`.
## Stacks, Environments, and Scope
One blueprint file deploys to many Stacks. The `--stack <name-or-id>` flag (on `deploy`, `plan`, `info`, `logs`) selects the target; without it, the Stack recorded in `.sanity/blueprint.config.json` is used.
- **Only `init` creates Stacks.** `--stack` never creates a Stack on a miss, so CI cannot accidentally provision infrastructure. Re-run `blueprints init .` to add another Stack for the same file.
- Accounts are currently limited to **three Stacks per project scope**.
- For per-environment differences, read an environment variable inside the file (e.g. `process.env.SANITY_ENV`) and deploy with the env var and `--stack` together. `SANITY_ENV` is a convention your file reads, not a CLI feature.
### Project vs organization scope
| | Project scope | Organization scope |
| ------------------------- | ------------- | ---------------------------------------------------------------- |
| Stored in config as | `projectId` | `organizationId` |
| Resources default to | The project | Nothing; each project-contained resource must name its `project` |
| Org-scoped resource types | Not available | Available |
Organization scope is recommended for anything beyond a single-project experiment. Convert an existing Stack with `blueprints promote` (safe, idempotent, additive, but **one-way**; requires `organization-update` admin permission).
## CLI Commands
```bash
npx sanity@latest blueprints <command>
```
| Command | Purpose |
| ------------------- | -------------------------------------------------------------------------------------------- |
| `init [dir]` | Create a blueprint file and provision a remote Stack. The only command that creates Stacks |
| `plan` | Preview the diff against the Stack. Read-only, always safe |
| `deploy` | Apply the file to the Stack (`-m` message, `--no-wait` to queue and return) |
| `info` | Show Stack status and deployed resources. Remote read; works without local files |
| `stacks` | List Stacks (`--include-projects` with `--organization-id` for org-wide audit) |
| `config` | View or edit `.sanity/blueprint.config.json` (`--edit` with ID flags for scripting) |
| `logs` | Deployment logs (`--watch`, `--limit 1-500`, `--since`/`--before` ISO timestamps) |
| `promote` | Convert a Stack from project to organization scope. One-way (`--force` to skip confirmation) |
| `destroy` | Destroy the Stack and its resources (`--force` to skip confirmation). Local files remain |
| `doctor` | Diagnose local/remote configuration issues (`--fix` to resolve interactively) |
| `mint-deploy-token` | Mint a long-lived robot token for CI deploys (`--print` for shell pipelines) |
Running `npx sanity@latest blueprints --help` will show the latest available commands.
Use `npx sanity@latest blueprints <command> --help` to see options and examples for a specific command.
Function scaffolding, local testing, secrets, and function logs live under `npx sanity@latest functions <command>` (`add`, `dev`, `test`, `env add|list|remove`, `logs`). See the `functions` reference.
### Standard workflow
```bash
npx sanity@latest blueprints init . # once: create file + Stack
# edit sanity.blueprint.ts
npx sanity@latest blueprints plan # preview the diff, catch validation errors safely
npx sanity@latest blueprints deploy # apply
npx sanity@latest blueprints info # verify deployed state
```
Always run `plan` before `deploy`. It is read-only and surfaces validation errors, reference problems, scope mismatches, and deletion-policy violations without touching anything.
### Exit codes
`deploy` and `destroy` return: **`0`** succeeded, **`2`** failed, **`75`** accepted but completion could not be confirmed.
**✅ Correct — treat exit 75 as unknown, then verify:**
```bash
npx sanity@latest blueprints deploy || status=$?
if [ "${status:-0}" -eq 75 ]; then
npx sanity@latest blueprints info --json # confirm actual Stack state
fi
```
**❌ Incorrect — treating any nonzero exit as failure and retrying.** Exit 75 means the deployment was accepted; blindly redeploying can queue duplicate operations (deploy also refuses to start while another operation is in progress).
### Scope resolution and environment variables
For `organizationId`, `projectId`, and `stackId`, the first source that resolves wins: CLI flags → environment variables → the blueprint file module → the local config file.
| Variable | Purpose |
| ---------------------------------------------- | ---------------------------------------------------------- |
| `SANITY_AUTH_TOKEN` | Auth token (in CI, the minted deploy token) |
| `SANITY_ORGANIZATION_ID` / `SANITY_PROJECT_ID` | Scope |
| `SANITY_BLUEPRINT_STACK_ID` | Target Stack |
| `SANITY_BLUEPRINT_PATH` | Path to the blueprint file or its directory |
| `SANITY_ASSET_TIMEOUT` | Seconds to wait for resource asset processing (default 60) |
The CLI does not load `.env` files. Export variables in the shell or import `dotenv/config` inside the blueprint file.
## Errors and Recovery
Errors include a name, a human-readable message, and the **resource path**, which maps to a specific resource in your file. Five failure kinds:
| Failure | Caught | What to do |
| --------------------------------------------------------------------------------- | ------------- | ---------------------------------------------------------- |
| Validation error (missing/invalid field, malformed file) | Before deploy | Fix the file at the reported resource path |
| Unresolved reference or dependency cycle | Before deploy | Fix the `$.resources.<name>` reference or break the cycle |
| Scope mismatch (org-scoped resource on project Stack, or no resolvable `project`) | Before deploy | Set the resource's `project` field, or `promote` the Stack |
| Deletion-policy violation (change would remove a `retain`/`protect` resource) | Before deploy | Restore the resource, or deliberately relax its policy |
| Execution failure (underlying service rejected the change) | During deploy | Read `blueprints logs`, fix the cause, redeploy |
Recovery procedure after any failure:
1. Read the error message and resource path (`blueprints logs` re-reads failure output).
2. Fix the blueprint file (or the external condition).
3. Run `blueprints plan` to confirm the corrected diff.
4. Run `blueprints deploy` again.
Retrying without changing anything only makes sense for transient execution failures; the first four failure kinds are deterministic and will fail identically until the file changes. If local and remote state seem inconsistent, run `blueprints doctor` (and `doctor --fix`) before attempting anything destructive. After a partial-deploy rollback, `blueprints info` shows what is actually live; resources owned by other Stacks are never touched by rollback.
## CI/CD
Recommended workflow: `plan` on pull requests, `deploy` on merge to main. Official GitHub Actions: https://github.com/sanity-io/blueprints-actions
```bash
# one-time, by a human with access:
npx sanity@latest blueprints mint-deploy-token --label "ci-deploy" --print
```
The minted robot token has exactly the role needed to plan, deploy, and destroy (`blueprints-deployer` for project scope, `blueprints-deployer-robot` for organization scope) and is revocable under Robots in Sanity Manage. Store it as a CI secret, then in the pipeline:
```bash
export SANITY_AUTH_TOKEN=<the minted token>
export SANITY_ORGANIZATION_ID=<orgId> # or SANITY_PROJECT_ID
export SANITY_BLUEPRINT_STACK_ID=<stackId>
npx sanity@latest blueprints deploy --json --message "CI deploy"
```
**✅ Correct — secrets via server-side function env vars:**
```bash
npx sanity@latest functions env add my-function API_KEY sk-...
```
**❌ Incorrect — secrets in the blueprint file's `env` block, which is committed to git:**
```typescript
defineDocumentFunction({
name: "my-function",
env: { API_KEY: "sk-..." }, // committed to version control!
});
```
@@ -0,0 +1,663 @@
---
title: Sanity Functions
description: Rules for Sanity Functions — serverless event handlers that react to content changes in Sanity's Content Lake. Covers blueprint configuration, handler patterns, testing, deployment, and recursion control.
---
# Sanity Functions
Serverless event handlers hosted on Sanity's infrastructure, configured via **Blueprints** and triggered by document lifecycle events.
> Always use `npx sanity@latest` so CLI and runtime versions stay current.
## When to use
- Set computed/derived fields (timestamps, slugs, summaries)
- Enrich or validate content on publish
- Trigger external services (CDN purge, deploy hooks, notifications)
- Automate workflows (translation, tagging, cross-posting)
- Sync content to external systems
- Invoke Agent Actions in response to content events
## When NOT to use
- Logic needs >900s execution or >200MB bundle — use an external worker
- High-throughput bulk operations that exceed rate limits (200/fn/30s, 4000/project/30s)
- A simple POST to an external URL on publish with no document data shaping — use a webhook
- Client-side or UI-driven logic (validation, conditional fields) — belongs in Studio schema config
## Requirements
| Dependency | Version |
| :------------------- | :--------------------------------------- |
| Node.js | v24.x (matches deployed runtime) |
| Sanity CLI | v4.12.0+ |
| `@sanity/blueprints` | Latest |
| `@sanity/functions` | Latest |
| `@sanity/client` | v7.12.0+ (includes recursion protection) |
## Project Structure
Organize functions alongside your Sanity project, one level above the Studio directory:
```
my-project/
├── studio/
├── next-app/
├── functions/
│ ├── my-function/
│ │ ├── index.ts # Handler code (entry point)
│ │ └── package.json # (optional) function-level dependencies
│ └── another-function/
│ └── index.ts
├── sanity.blueprint.ts # Blueprint configuration
├── package.json # Project-level dependencies
└── node_modules/
```
The function directory name must match the `name` in the blueprint config. Each function exports a `handler` from its `index.ts` (or `index.js`).
---
## Step-by-step: Creating a Function
### 1. Initialize a Blueprint
```bash
npx sanity@latest blueprints init . \
--type ts \
--stack-name production \
--project-id <your-project-id>
```
This creates `sanity.blueprint.ts` and `.sanity/blueprint.config.json` (gitignored automatically; it links your Blueprint to a Stack and is not secret).
### 2. Scaffold a Function
```bash
npx sanity@latest functions add \
--name my-function \
--type document-create --type document-update \
--installer npm
```
`--type` options: `document-create`, `document-update`, `document-delete`, `media-library-asset-create`, `media-library-asset-update`, `media-library-asset-delete`, `scheduled-function`, `sync-tag-invalidate`.
### 3. Configure the Blueprint
```typescript
// sanity.blueprint.ts
import { defineBlueprint, defineDocumentFunction } from "@sanity/blueprints";
export default defineBlueprint({
resources: [
defineDocumentFunction({
name: "my-function",
event: {
on: ["create", "update"],
filter: '_type == "post"',
},
}),
],
});
```
### 4. Write the Handler
```typescript
// functions/my-function/index.ts
import { createClient } from "@sanity/client";
import { documentEventHandler } from "@sanity/functions";
interface PostData {
_id: string;
_type: string;
title: string;
}
export const handler = documentEventHandler<PostData>(
async ({ context, event }) => {
const { data } = event;
const client = createClient({
...context.clientOptions,
apiVersion: "2025-05-08",
});
try {
await client.patch(data._id, {
setIfMissing: { firstPublished: new Date().toISOString() },
});
console.log(`Set firstPublished on ${data._id}`);
} catch (error) {
console.error("Failed to patch document:", error);
}
},
);
```
### 5. Test Locally
```bash
# Visual dev playground
npx sanity@latest functions dev
# CLI testing
npx sanity@latest functions test my-function \
--dataset production \
--with-user-token
# With a specific document
npx sanity@latest functions test my-function \
--document-id abc123 \
--dataset production \
--with-user-token
```
### 6. Deploy
```bash
npx sanity@latest blueprints deploy
```
### 7. View Logs
```bash
npx sanity@latest functions logs my-function
npx sanity@latest functions logs my-function --watch
```
---
## Handler Reference
Every handler receives `{ context, event }`:
### `context`
| Property | Type | Description |
| :------------------------ | :--------------------- | :------------------------------- |
| `clientOptions.apiHost` | `string` | API host URL |
| `clientOptions.projectId` | `string` | Sanity project ID |
| `clientOptions.dataset` | `string` | Dataset name |
| `clientOptions.token` | `string` | Robot token (deployed only) |
| `local` | `boolean \| undefined` | `true` during local testing |
| `eventResourceType` | `string` | `'dataset'` or `'media-library'` |
| `eventResourceId` | `string` | e.g., `'projectId.datasetName'` |
### `event`
```typescript
{
data: {
_id: string;
_type: string;
// ... rest of document (shaped by projection if set)
}
}
```
When testing locally, `context.clientOptions` only has `projectId` and `apiHost`. Use `--dataset` and `--with-user-token` flags to supply the rest.
---
## Blueprint Configuration
### `defineDocumentFunction` Options
| Option | Type | Default | Description |
| :------------ | :----------------------- | :----------------- | :----------------------------------------------- |
| `name` | `string` | required | Must match the directory name under `functions/` |
| `displayName` | `string` | — | Human-readable display name |
| `src` | `string` | `functions/<name>` | Path to function source directory |
| `memory` | `number` | `1` | Memory in GB (max 10) |
| `timeout` | `number` | `10` | Timeout in seconds (max 900) |
| `runtime` | `string` | `'nodejs24.x'` | `'node'`, `'nodejs22.x'`, or `'nodejs24.x'` |
| `project` | `string` | — | Project ID. Required if blueprint is org-scoped. |
| `robotToken` | `string` | — | Custom robot token name for the function |
| `event` | `object` | required | Event configuration (see below) |
| `env` | `Record<string, string>` | — | Environment variables via `process.env` |
### `event` Options
| Option | Type | Default | Description |
| :------------------- | :--------- | :------- | :------------------------------------------------------------------- |
| `on` | `string[]` | required | `'create'`, `'update'`, `'delete'` |
| `filter` | `string` | — | GROQ filter body (no `*[...]` wrapper) |
| `projection` | `string` | — | GROQ projection to shape `event.data`. Wrap in `{}`. |
| `includeDrafts` | `boolean` | `false` | Trigger on draft changes |
| `includeAllVersions` | `boolean` | `false` | Trigger on all document versions |
| `resource` | `object` | — | Scope to dataset: `{ type: 'dataset', id: 'projectId.datasetName' }` |
### `defineMediaLibraryAssetFunction`
For Media Library asset events. Requires `@sanity/blueprints` v0.4.0+ and `@sanity/functions` v1.1.0+.
```typescript
import {
defineBlueprint,
defineMediaLibraryAssetFunction,
} from "@sanity/blueprints";
export default defineBlueprint({
resources: [
defineMediaLibraryAssetFunction({
name: "asset-handler",
event: {
on: ["delete"],
filter: "documents::incomingGlobalDocumentReferenceCount() > 0",
projection: "{_id, versions, title}",
resource: {
type: "media-library",
id: "mlYourLibraryId",
},
},
}),
],
});
```
---
## Event Types
| Event | Description |
| :------- | :--------------------------------------------------------------------------------------- |
| `create` | New document created |
| `update` | Existing document modified (for published docs, fires when a draft/version is published) |
| `delete` | Document deleted |
Often best to use `['create', 'update']` together for published document triggers.
---
## GROQ Filter Tips
- Only the filter body — `_type == 'post'`, not `*[_type == 'post']`
- `delta::changedAny(fieldName)` — trigger only when specific fields change
- `sanity::dataset() == 'production'` — scope to a dataset without `resource` config
- `_id in path('drafts.**')` with `includeDrafts: true` — draft-only triggers
- Combine conditions to prevent recursion: `_type == 'post' && !defined(processedAt)`
---
## Projections
- Shape the data passed to `event.data`
- Limited to the invoking document's scope (plus `→` for references)
- Nested filters in projections (like `*[references(^._id)]`) will fail silently — query inside the function instead
- Wrap in `{}`: `projection: '{title, _id, slug}'`
---
## Environment Variables
Three ways to set them:
1. Blueprint config: `env: { MY_VAR: 'value' }`
2. CLI: `npx sanity@latest functions env add my-function MY_VAR my-value`
3. Local testing: `MY_VAR=value npx sanity functions test my-function`
Access in handler code via `process.env.MY_VAR`.
---
## Critical Rules
### Preventing Recursion
If your function mutates the same document type it listens to, you **will** create an infinite loop.
**✅ Correct — use GROQ filters to exclude processed documents:**
```typescript
defineDocumentFunction({
name: "first-published",
event: {
on: ["create", "update"],
filter: "_type == 'post' && !defined(firstPublished)",
},
});
```
**✅ Correct — use `@sanity/client` v7.12.0+ for automatic lineage headers:**
```typescript
import { createClient } from "@sanity/client";
// Client automatically sets X-Sanity-Lineage header
// Recursive chains are limited to 16 invocations
const client = createClient({
...context.clientOptions,
apiVersion: "2025-05-08",
});
```
**❌ Incorrect — no recursion guard:**
```typescript
defineDocumentFunction({
name: "update-post",
event: {
on: ["create", "update"],
filter: "_type == 'post'", // Will re-trigger on its own writes!
},
});
```
### Local Testing Safety
Use `context.local` to prevent accidental mutations during testing:
```typescript
// Skip mutations entirely in test
if (!context.local) {
await client.createOrReplace(someDoc);
}
// Or use dryRun
await client
.patch(event.data._id, {
set: { processed: true },
})
.commit({ dryRun: context.local });
// Or use noWrite for Agent Actions
await client.agent.action.generate({
schemaId: "your-schema-id",
documentId: event.data._id,
instruction: "Summarize this document",
target: { path: ["summary"] },
noWrite: context.local,
});
```
### Limits
- Max bundle size: 200MB (including dependencies). Prefer slim, platform-agnostic packages.
- Rate limits: 200 invocations/fn/30s, 4000/project/30s
- Max timeout: 900s. Larger functions = slower cold starts.
### Cost
Cost = invocations × (memory GB × duration seconds). Default is 1GB memory. A function averaging 1GB and 40ms duration can run ~500k invocations within 20K GB-seconds. [Monitor usage at the organization level](https://www.sanity.io/manage).
---
## Common Patterns
### Deploy hook / CDN invalidation
**Blueprint:**
```typescript
defineDocumentFunction({
name: "deploy-hook",
event: {
on: ["create", "update"],
filter: '_type == "page"',
},
});
```
**Handler:**
```typescript
export const handler = documentEventHandler(async ({ context, event }) => {
const URL = process.env.DEPLOY_HOOK_URL;
if (!URL) throw new Error("DEPLOY_HOOK_URL is not set");
await fetch(URL);
console.log("Deploy hook triggered");
});
```
Set the env var: `npx sanity@latest functions env add deploy-hook DEPLOY_HOOK_URL https://...`
### Set a timestamp on first publish
Uses the same pattern as the step-by-step example above. The key insight: the `!defined(firstPublished)` GROQ filter prevents re-triggering after the field is set. The `setIfMissing` patch is a redundant safety net.
```typescript
defineDocumentFunction({
name: "first-published",
event: {
on: ["create", "update"],
filter: '_type == "post" && !defined(firstPublished)',
},
});
```
### Auto-translate with Agent Actions
**Blueprint:**
```typescript
defineDocumentFunction({
name: "translate",
event: {
on: ["create", "update"],
filter: "_type == 'post' && language == 'en-US'",
projection: "{_id}",
},
});
```
**Handler:**
```typescript
export const handler = documentEventHandler(async ({ context, event }) => {
const client = createClient({ ...context.clientOptions, apiVersion: "vX" });
await client.agent.action.translate({
schemaId: "your-schema-id",
async: true,
documentId: event.data._id,
languageFieldPath: "language",
targetDocument: {
operation: "create",
},
fromLanguage: { id: "en-US", title: "English" },
toLanguage: { id: "el-GR", title: "Greek" },
});
});
```
The GROQ filter ensures only English documents trigger the function. The translated document gets a different `language` value, preventing recursive triggers.
Let Sanity assign the translated document's `_id` for ordinary localized content. To find or update translations later, query by language, slug, or translation metadata instead of deriving IDs from the source document. Reserve explicit `targetDocument._id` values for singleton-style targets.
### Auto-tag with Agent Actions
**Blueprint:**
```typescript
defineDocumentFunction({
name: "auto-tag",
event: {
on: ["create", "update"],
filter: "_type == 'post'",
projection: "{_id, title, body}",
},
});
```
**Handler:**
```typescript
export const handler = documentEventHandler(async ({ context, event }) => {
const client = createClient({ ...context.clientOptions, apiVersion: "vX" });
await client.agent.action.generate({
schemaId: "your-schema-id",
documentId: event.data._id,
instruction:
"Analyze the content and generate 3 relevant tags. Reuse existing tags when possible.",
target: { path: ["tags"] },
async: true,
});
});
```
### Slack notification on publish
```typescript
export const handler = documentEventHandler(async ({ context, event }) => {
const WEBHOOK_URL = process.env.SLACK_WEBHOOK_URL;
if (!WEBHOOK_URL) throw new Error("SLACK_WEBHOOK_URL not set");
await fetch(WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
text: `📝 New content published: *${event.data.title || event.data._id}* (${event.data._type})`,
}),
});
});
```
### Scope to a specific dataset
**Option A — `resource` config:**
```typescript
defineDocumentFunction({
name: "production-only",
event: {
on: ["update"],
filter: "_type == 'post'",
resource: { type: "dataset", id: "myProjectId.production" },
},
});
```
**Option B — GROQ filter:**
```typescript
defineDocumentFunction({
name: "production-only",
event: {
on: ["update"],
filter: "_type == 'post' && sanity::dataset() == 'production'",
},
});
```
### React to Media Library asset changes
Requires `@sanity/blueprints` v0.4.0+ and `@sanity/functions` v1.1.0+.
**Blueprint:**
```typescript
import {
defineBlueprint,
defineMediaLibraryAssetFunction,
} from "@sanity/blueprints";
export default defineBlueprint({
resources: [
defineMediaLibraryAssetFunction({
name: "asset-deleted",
event: {
on: ["delete"],
filter: "documents::incomingGlobalDocumentReferenceCount() > 0",
projection: "{_id, versions, title}",
resource: { type: "media-library", id: "mlYourLibraryId" },
},
}),
],
});
```
**Handler:**
```typescript
export const handler = documentEventHandler(async ({ context, event }) => {
const { eventResourceId } = context; // Media Library ID
const client = createClient({
...context.clientOptions,
apiVersion: "2025-05-08",
});
const response = await client.request({
uri: `/media-libraries/${eventResourceId}/query`,
method: "POST",
body: { query: `*[_type == 'sanity.imageAsset']` },
});
console.log("Assets:", response);
});
```
### Recursion control with custom HTTP clients
If not using `@sanity/client`, implement lineage tracking manually:
```typescript
export const handler = documentEventHandler(async ({ context, event }) => {
const lineage = process.env.X_SANITY_LINEAGE;
await fetch(
`https://${context.clientOptions.projectId}.api.sanity.io/v2025-05-08/data/mutate/production`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${context.clientOptions.token}`,
...(lineage ? { "X-Sanity-Lineage": lineage } : {}),
},
body: JSON.stringify({
mutations: [
{ patch: { id: event.data._id, set: { processed: true } } },
],
}),
},
);
});
```
### Multiple functions in one blueprint
```typescript
export default defineBlueprint({
resources: [
defineDocumentFunction({
name: "first-published",
event: {
on: ["create", "update"],
filter: "_type == 'post' && !defined(firstPublished)",
},
}),
defineDocumentFunction({
name: "notify-slack",
event: {
on: ["create", "update"],
filter: "_type == 'post'",
projection: "{title, _id}",
},
}),
defineDocumentFunction({
name: "sync-algolia",
timeout: 30,
event: {
on: ["create", "update", "delete"],
filter: "_type == 'product'",
},
}),
],
});
```
---
## CI/CD Deployment
Use the [Blueprints GitHub Action](https://github.com/sanity-io/blueprints-actions)
```yaml
- uses: sanity-io/blueprints-actions/deploy@deploy-v3
with:
sanity-token: ${{ secrets.SANITY_DEPLOY_TOKEN }}
```
Mint a long-lived deploy token with `npx sanity@latest blueprints mint-deploy-token` (creates a robot token with the role required to plan, deploy, and destroy) and store it as a CI secret. Recommended workflow: `blueprints plan` on pull requests, `blueprints deploy` on merge to main. See the `blueprints` reference for CI environment variables and exit codes.
@@ -0,0 +1,425 @@
---
title: Sanity Getting Started Guide
description: Use these rules when users ask to 'Get started with Sanity' or need help setting up a new Sanity project.
---
# Sanity Getting Started Guide
## Overview
Getting started with Sanity follows three phases:
1. **Studio & Schema** — Set up Sanity Studio and define your content model
2. **Content** — Import existing content or generate placeholder content via MCP
3. **Frontend** — Integrate with your application (framework-specific)
## Communication Style
**Keep responses succinct:**
- Tell the user what you did: "Created post schema with title, body, and slug"
- Ask direct questions: "What kind of content are you building?"
- Avoid verbose explanations of what you're about to do
- Don't explain every step unless the user asks
**Examples:**
- **Good**: "Schema deployed. Ready to add some content?"
- **Bad**: "I'm going to deploy your schema to the Content Lake so that the MCP server can recognize your new document types. This will allow..."
---
## Get Started with Sanity (Interactive Guide)
**TRIGGER PHRASE:** When the user says "Get started with Sanity" or similar, follow these steps.
**Before starting:** Let the user know they can pause and resume anytime by saying "Continue Sanity setup".
**RESUME TRIGGER:** If the user says "Continue Sanity setup", check what's already configured:
- Does `sanity.config.ts` exist (typically in a `studio/` folder)? → Studio is set up
- Are there files in `schemaTypes/`? → Schema exists
- Is there a frontend framework in `package.json`? → May need integration
Resume from where they left off.
---
## Phase 1: Studio & Schema
### Step 1: Check for Existing Studio
**Look for `sanity.config.ts` or `sanity.cli.ts` across the workspace** — in the recommended side-by-side layout the Studio lives in its own folder (`studio/`, or `studio-*` when created by the Sanity onboarding flow) next to the app folder:
**If NO Studio found:**
- Ask: "Want to create a new Sanity Studio?"
- If yes, run from the repo root — **not inside a Next.js app folder**, where the CLI would switch to its embedded flow (not recommended):
```bash
npm create sanity@latest -- --template clean --typescript --output-path studio
```
- This creates a standalone Studio in `studio/`, alongside your app folder (see `project-structure.md`)
**If Studio exists:**
- Read the config to get `projectId` and `dataset`
- Proceed to Step 2
### Step 2: Check for Existing Schema
**Look in `schemaTypes/`, `schemas/`, or `src/sanity/schemaTypes/`:**
**If NO schema found:**
- Ask: "What kind of content are you building? (e.g., Blog, E-commerce, Portfolio)"
- Create appropriate schema types based on their answer
- See `schema.md` for patterns
**If schema exists:**
- Show them what you found
- Ask: "Want to add more content types or modify existing ones?"
**If they want a quick example:**
Create a basic blog schema:
```typescript
// schemaTypes/post.ts
import { defineField, defineType } from "sanity";
export const post = defineType({
name: "post",
title: "Post",
type: "document",
fields: [
defineField({ name: "title", type: "string" }),
defineField({ name: "slug", type: "slug", options: { source: "title" } }),
defineField({ name: "body", type: "array", of: [{ type: "block" }] }),
],
});
```
### Step 3: Deploy Schema
**Required before Phase 2:**
```bash
npx sanity schema deploy
```
This uploads your schema to the Content Lake so MCP tools can work with it.
---
## Phase 2: Content
### Step 1: Check for Existing Content
**Use MCP `query_documents` to check:**
```
*[_type == "post"][0...5]
```
**If content exists:**
- Show them a summary
- Ask: "Want to add more content or move to frontend integration?"
**If NO content:**
- Ask: "Do you want to:
1. Import existing content (from another CMS, markdown, etc.)
2. Generate sample content with AI
3. Skip this and add content manually in the Studio"
### Step 2a: Import Existing Content
If migrating from another CMS or files:
- See `migration.md` and the `sanity-migration` skill for guidance
- Use MCP content tools such as `create_documents` and `patch_documents` after converting content to structured Sanity documents
### Step 2b: Generate Sample Content (MCP)
Ask the agent to draft structured sample content, then create it with the Sanity MCP Server:
```
Tool: create_documents
Documents: [{ type: "post", content: { title: "Getting started with Sanity", body: [] } }]
```
**If MCP content tools cannot see new types or fields:** Remind them to run `npx sanity schema deploy` first.
### MCP Setup (If Not Configured)
**Quick start via Sanity CLI:**
```bash
npx sanity@latest mcp configure
```
**Cursor:** [One-click install →](cursor://anysphere.cursor-deeplink/mcp/install?name=Sanity&config=eyJ1cmwiOiJodHRwczovL21jcC5zYW5pdHkuaW8iLCJ0eXBlIjoiaHR0cCJ9Cg==)
Or add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"Sanity": {
"type": "http",
"url": "https://mcp.sanity.io"
}
}
}
```
**Claude Code:**
```bash
claude mcp add Sanity -t http https://mcp.sanity.io --scope user
```
**VS Code:** Command Palette → `MCP: Open User Configuration` → add:
```json
{
"servers": {
"Sanity": {
"type": "http",
"url": "https://mcp.sanity.io"
}
}
}
```
---
## Phase 3: Frontend Integration
### Client Bundle Warning (Vite-based frameworks)
React Router, SvelteKit, Astro, and Nuxt all run on Vite. **Any module imported by a client component will be bundled to the browser.** `process.env` doesn't exist there.
For publishable values (`projectId`, `dataset`, `apiVersion`, public studio URL), use the framework's client-safe env mechanism:
- React Router / Remix: `import.meta.env.VITE_*`
- SvelteKit: `$env/static/public`
- Astro: `import.meta.env.PUBLIC_*`
- Nuxt: `useRuntimeConfig().public`
For secrets (read tokens, webhook secrets), read `process.env.*` (or the server equivalent) **only from server-only modules** — `.server.ts`, route handlers, API endpoints. Don't centralize them in a shared `env.ts` that anything else imports.
This trap is invisible at SSR — the page renders fine on first load. It surfaces on client-side route transitions, when a lazy-loaded route chunk pulls a shared client/image module into the browser.
### Step 1: Find the App and Detect Framework
The working directory is often a parent folder with the Studio and the app side by side. Identify the app folder first: a sibling of the Studio folder with its own `package.json` (commonly `web/`). If several candidates exist, ask the user which app to integrate — never assume.
**Check the app's `package.json` dependencies:**
| Dependency | Framework | Rule File |
| ------------------------------------ | -------------------- | ----------- |
| `next` | Next.js | `nextjs.md` |
| `@remix-run/react` or `react-router` | React Router / Remix | `remix.md` |
| `svelte` or `@sveltejs/kit` | SvelteKit | `svelte.md` |
| `nuxt` | Nuxt | `nuxt.md` |
| `astro` | Astro | `astro.md` |
**If NO framework found:**
- Ask: "Which framework are you using, or would you like to create a new app?"
- Guide them to create one or specify their choice
### Step 2: Next.js Integration (Inline)
If Next.js is detected, follow these essential steps:
**Scaffold a new app (if you don't have one yet):**
Run from the repo root so the app sits alongside your `studio/` folder:
```bash
npx create-next-app@latest web --tailwind --ts --app --src-dir --eslint --import-alias "@/*" --turbopack
cd web
```
**Install dependencies:**
```bash
npm install next-sanity @sanity/image-url
```
`next-sanity` is the official Sanity toolkit for Next.js. It bundles `@sanity/client`, `groq` (with `defineQuery`), and `@portabletext/react`, plus dedicated subpath exports for Next.js-specific features:
- `next-sanity` — `createClient`, `defineQuery`, `PortableText`, `SanityDocument`, `stegaClean`
- `next-sanity/live` — `defineLive` for live content with Next.js cache integration
- `next-sanity/draft-mode` — Draft Mode endpoint helpers
- `next-sanity/visual-editing` — `<VisualEditing />` component for click-to-edit overlays
- `next-sanity/image` — Sanity-aware `<Image />` wrapping `next/image`
- `next-sanity/studio` — embed the Sanity Studio at a route (legacy setups only — keep the Studio standalone, see `nextjs.md`)
- `next-sanity/webhook` — webhook signature verification
Don't also install `@sanity/client`, `@portabletext/react`, or `groq` directly — import them from `next-sanity`. `@sanity/image-url` is not bundled (yet), so add it separately.
**Create the client (`src/sanity/client.ts`):**
```typescript
import { createClient } from "next-sanity";
export const client = createClient({
projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID!,
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET!,
apiVersion: "2026-05-15", // Use current date for new projects
useCdn: false, // Use API directly for server-side rendering; set true for client-side reads
});
```
**Fetch content in a Server Component:**
```typescript
// src/app/page.tsx
import { client } from "@/sanity/client";
import { defineQuery, type SanityDocument } from "next-sanity";
const POSTS_QUERY = defineQuery(
`*[_type == "post" && defined(slug.current)] | order(_createdAt desc){ _id, title, slug }`
);
const options = { next: { revalidate: 30 } };
export default async function PostsPage() {
const posts = await client.fetch<SanityDocument[]>(POSTS_QUERY, {}, options);
return (
<ul>
{posts.map((post) => (
<li key={post._id}>
<a href={`/${(post.slug as { current?: string })?.current}`}>{post.title as string}</a>
</li>
))}
</ul>
);
}
```
`{ next: { revalidate: 30 } }` opts the fetch into Next.js' ISR cache with a 30-second revalidation window. Tune to taste; omit `options` to use defaults.
**Render an individual post (`src/app/[slug]/page.tsx`):**
```typescript
import { PortableText, defineQuery, type SanityDocument } from "next-sanity";
import { notFound } from "next/navigation";
import { client } from "@/sanity/client";
const POST_QUERY = defineQuery(
`*[_type == "post" && slug.current == $slug][0]{ _id, title, body }`
);
const options = { next: { revalidate: 30 } };
export default async function PostPage({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const post = await client.fetch<SanityDocument | null>(POST_QUERY, { slug }, options);
if (!post) return notFound();
return (
<article>
<h1>{post.title as string}</h1>
{Array.isArray(post.body) && <PortableText value={post.body} />}
</article>
);
}
```
**Add environment variables (`.env.local`):**
```
NEXT_PUBLIC_SANITY_PROJECT_ID=your-project-id
NEXT_PUBLIC_SANITY_DATASET=production
```
For advanced patterns (TypeGen, Visual Editing with `next-sanity/visual-editing`, live content with `defineLive` from `next-sanity/live`, standalone Studio architecture), see `nextjs.md`.
### Step 3: Other Frameworks
For non-Next.js frameworks, read the corresponding rule file and follow its integration guide:
- **React Router / Remix:** `remix.md`
- **SvelteKit:** `svelte.md`
- **Nuxt:** `nuxt.md`
- **Astro:** `astro.md`
Each rule file contains framework-specific patterns for data fetching, Portable Text rendering, and Visual Editing.
### Step 4: Smoke Test
Before declaring integration done, exercise both render paths:
1. `npm run dev` (in the app folder)
2. Load the home page (lists posts).
3. **Click through to a detail page** via an in-app `<Link>` / `<a>` — do not paste the URL.
4. Open the browser console. It should be clean. No `ReferenceError: process is not defined`, no hard reload to `/`.
5. For good measure, reload the detail page directly (URL bar) — that exercises SSR.
Server-side rendering passing isn't enough. Client-side route transitions pull lazy chunks that exercise different code paths, and that's where env/bundling traps surface.
---
## What's Next
Once setup is complete, let the user know:
"You're all set! Here are some things I can help with:
- **Visual Editing** — Click-to-edit in the Presentation tool (`visual-editing.md`)
- **TypeGen** — Type-safe queries with generated types (`typegen.md`)
- **Studio Structure** — Customize the Studio sidebar (`studio-structure.md`)
- **SEO** — Metadata, sitemaps, and Open Graph (`seo.md`)
- **i18n** — Multi-language content (`localization.md`)
Just ask about any of these!"
---
## Environment Variables
### Framework-Specific Prefixes
| Framework | Client-Side Prefix | Example |
| -------------------- | ------------------ | ------------------------------- |
| Next.js | `NEXT_PUBLIC_` | `NEXT_PUBLIC_SANITY_PROJECT_ID` |
| React Router / Remix | `VITE_` | `VITE_SANITY_PROJECT_ID` |
| SvelteKit | `PUBLIC_` | `PUBLIC_SANITY_PROJECT_ID` |
| Nuxt | `NUXT_PUBLIC_` | `NUXT_PUBLIC_SANITY_PROJECT_ID` |
| Astro | `PUBLIC_` | `PUBLIC_SANITY_PROJECT_ID` |
**Secrets** (read tokens, webhook secrets) stay **unprefixed** and are read via `process.env` (or the framework's server-only equivalent) from server-only modules — `*.server.ts`, route handlers, API routes. Never re-export a secret from a module that a route component can import.
---
## Common Commands
```bash
npx sanity@latest mcp configure # Configure MCP for your editor
npx sanity dev # Start Studio locally
npx sanity schema deploy # Deploy schema for MCP/editor access
npx sanity deploy # Deploy Studio to Sanity hosting
npx sanity manage # Open project settings
npm run typegen # Generate TypeScript types
```
---
## Important Notes
- **Be succinct** — Guide step-by-step without over-explaining
- **Check context first** — Read existing files before suggesting changes
- **Don't give up** — If something fails, give the user a way to complete manually
- **Deploy schema early** — MCP content tools need deployed schemas to see new types and fields
- **One phase at a time** — Complete each phase before moving to the next
@@ -0,0 +1,373 @@
---
title: GROQ Query Maintenance & Best Practices
description: Guidelines for GROQ queries, type safety, performance optimization, and syntax highlighting.
---
# GROQ Query Maintenance & Best Practices
Use this contents list to jump to the query concern you need to solve.
## Table of Contents
- Query definition and imports
- Query fragments
- Expansion patterns
- Maintenance workflow
- Common patterns
- Performance rules
- API version best practices
## 1. Query Definition & Imports
### The `defineQuery` Function
**ALWAYS** wrap GROQ queries in `defineQuery` for TypeGen support. The import location depends on your framework:
```typescript
// Framework-agnostic (Angular, Remix, SvelteKit, Astro, vanilla)
import { defineQuery } from "groq";
// Next.js (re-exported for convenience)
import { defineQuery } from "next-sanity";
```
### Syntax Highlighting
For VS Code syntax highlighting, either:
1. Use the `groq` tagged template (recommended): `groq\`...\``
2. Or prefix with `/* groq */` comment when using `defineQuery`
```typescript
import { defineQuery } from "groq";
// ✅ Option A: groq tag (provides highlighting automatically)
import groq from "groq";
const QUERY = defineQuery(groq`*[_type == "post"]`);
// ✅ Option B: Comment prefix (for plain template literals)
const QUERY = defineQuery(/* groq */ `*[_type == "post"]`);
// ✅ Also valid: Just defineQuery (TypeGen works, but no editor highlighting)
const QUERY = defineQuery(`*[_type == "post"]`);
```
## 2. Query Fragments
Use string interpolation to reuse query logic and keep queries maintainable.
```typescript
// src/sanity/fragments/image.ts
export const imageFragment = /* groq */ `
asset->{
_id,
url,
metadata { lqip, dimensions }
},
alt
`;
// src/sanity/queries/post.ts
import { defineQuery } from "groq";
import { imageFragment } from "../fragments/image";
export const POST_QUERY = defineQuery(/* groq */ `
*[_type == "post"][0] {
title,
mainImage {
${imageFragment}
}
}
`);
```
## 3. Expansion Patterns (Page Builder)
When building a Page Builder query, expand all potential component types.
**Best Practice:** Use a `pageFields` fragment or similar strategy to keep the main query clean.
```typescript
const pageBuilderExpansion = /* groq */ `
pageBuilder[] {
...,
_type == "hero" => {
...,
cta[] { link, label }
},
_type == "gallery" => {
images[] { ${imageFragment} }
}
}
`;
```
## 4. Maintenance Workflow
When you add a new field or component to the Schema:
1. **Update the Query:** Add the new field/expansion to the relevant GROQ query immediately.
2. **Run TypeGen:** If you have `typegen.enabled: true` in `sanity.cli.ts`, types regenerate automatically during `sanity dev`/`sanity build`. Otherwise, run `npm run typegen` manually.
3. **Verify:** Ensure the new field is available in the generated types.
## 5. Common Patterns
### Ordering
```groq
// Single field
*[_type == "post"] | order(publishedAt desc)
// Multiple fields (tiebreaker)
*[_type == "post"] | order(featured desc, publishedAt desc)
// ⚠️ Order BEFORE slice, not after!
*[_type == "post"] | order(publishedAt desc)[0...10] // ✅ Correct
*[_type == "post"][0...10] | order(publishedAt desc) // ❌ Wrong order
```
### Slice Notation
```groq
*[_type == "post"][0] // Single document (object, not array)
*[_type == "post"][0...5] // First 5 (exclusive) ← Most common
*[_type == "post"][$start...$end] // Pagination with params
```
### Default Values with `coalesce()`
```groq
*[_type == "page"]{
"title": coalesce(seoTitle, title, "Untitled"),
"image": coalesce(ogImage, mainImage, defaultImage)
}
```
### Conditionals with `select()`
```groq
*[_type == "product"]{
title,
"badge": select(
stock == 0 => "Out of Stock",
stock < 5 => "Low Stock",
"In Stock"
)
}
```
### Aggregation with `count()`
```groq
// Total count
count(*[_type == "post" && defined(slug.current)])
// Count per document
*[_type == "category"]{
title,
"postCount": count(*[_type == "post" && references(^._id)])
}
```
### Reverse References
```groq
*[_type == "author"]{
name,
"posts": *[_type == "post" && references(^._id)]{ title, slug }
}
```
### Array Filtering
```groq
*[_type == "movie"]{
title,
"mainCast": castMembers[role == "lead"]->{name}
}
// Check if value exists in array
*[_type == "post" && "tech" in categories[]->slug.current]
```
### Special Variables
```groq
// ^ = parent document (in nested queries)
*[_type == "author"]{
name,
"posts": *[_type == "post" && author._ref == ^._id]
}
// @ = current item (in array operations)
*[_type == "post"]{
"tagCount": count(tags[@ != null])
}
```
## 6. Performance Rules
### Optimizable vs Non-Optimizable Filters
GROQ uses indexes for **optimizable** filters. Non-optimizable filters scan ALL documents.
| Pattern | Optimizable | Example |
| ----------------------- | ----------- | -------------------------------- |
| `_type == "x"` | ✅ Yes | `*[_type == "post"]` |
| `_id == "x"` | ✅ Yes | `*[_id == "abc123"]` |
| `slug.current == $slug` | ✅ Yes | `*[slug.current == "hello"]` |
| `defined(field)` | ✅ Yes | `*[defined(publishedAt)]` |
| `references($id)` | ✅ Yes | `*[references("author-123")]` |
| `field->attr == x` | ❌ No | Resolves reference for every doc |
| `fieldA < fieldB` | ❌ No | Compares two attributes |
**Fix non-optimizable filters by stacking:**
```groq
// Stack optimizable filters FIRST to reduce search space
*[_type == "product" && defined(salePrice) && salePrice < displayPrice]
```
### Avoid Joins in Filters
Reference resolution (`->`) in filters is expensive. Use `_ref` instead:
```groq
// ❌ Slow: Resolves reference for every document
*[_type == "post" && author->name == "Bob Woodward"]
// ✅ Fast: Direct _ref comparison
*[_type == "post" && author._ref == "author-bob-woodward-id"]
```
**When you need dynamic lookups** (don't know the ID upfront):
```groq
// Two-step approach:
// 1. Get the reference ID first
*[_type == "author" && name == "Bob Woodward"][0]._id
// 2. Use that ID in your main query
*[_type == "post" && author._ref == $authorId]
// Or use a subquery (still better than -> in filter):
*[_type == "post" && author._ref in *[_type == "author" && name == "Bob Woodward"]._id]
```
### Merge Repeated Reference Resolutions
Each `->` is a subquery. Don't repeat it:
```groq
// ❌ Slow: Two separate subqueries
*[_type == "category"]{
"parentTitle": parent->title,
"parentSlug": parent->slug.current
}
// ✅ Fast: Single subquery, merged
*[_type == "category"]{
...(parent->{ "parentTitle": title, "parentSlug": slug.current })
}
```
### Cursor-Based Pagination (Not Deep Slicing)
Deep slices are slow because all skipped docs must be sorted first.
```groq
// ❌ Slow: Must sort and skip 10,000 docs
*[_type == "article"] | order(_id)[10000...10020]
// ✅ Fast: Cursor-based, only fetches 20
*[_type == "article" && _id > $lastId] | order(_id)[0...20]
```
**For custom sort orders**, include the sort field in the cursor:
```groq
// Compound cursor: publishedAt + _id for deterministic pagination
*[_type == "article" && (
publishedAt < $lastDate ||
(publishedAt == $lastDate && _id > $lastId)
)] | order(publishedAt desc, _id)[0...20]
```
### Always Project Fields
Always use projections to return only the fields your application needs. Fetching entire documents wastes bandwidth and processing time.
```groq
// ❌ Returns ALL fields including unused ones, metadata, revisions
*[_type == "post"]
// ✅ Only fetch what the component needs
*[_type == "post"]{
_id,
title,
"slug": slug.current,
publishedAt,
excerpt
}
```
Apply projections at every level, including nested references:
```groq
*[_type == "post"]{
title,
author->{ name, "avatar": image.asset->url },
categories[]->{ title, "slug": slug.current }
}
```
Use conditional projections for different contexts:
```groq
*[_type == "post"]{
title,
slug,
// Only include body for single post view
$includeBody == true => { body }
}
```
### Don't Filter/Sort on Projected Values
Computed attributes can't use indexes:
```groq
// ❌ Not optimizable (computed attribute)
*[_type == "person"]{
"fullName": firstName + " " + lastName
} | order(fullName)
// ✅ Optimizable (original attribute)
*[_type == "person"] | order(firstName, lastName)
```
### Quick Checklist
| Rule | Why |
| ----------------------------------- | --------------------------------------------- |
| Always project `{ fields }` | Reduces data returned |
| Use `defined()` checks | Filters use indexes |
| Use `$params` not interpolation | Prevents query manipulation + enables caching |
| Order BEFORE slice | `order()[0...N]` not `[0...N] order()` |
| Use `_ref` not `->field` in filters | Avoids expensive joins |
| Merge repeated `->` calls | Single subquery vs many |
| Cursor pagination for deep pages | Avoids sorting entire dataset |
## 7. API Version Best Practices
Always use dated versions (`YYYY-MM-DD`) for consistent behavior:
```typescript
const client = createClient({
apiVersion: "2026-02-01", // Use current date for new projects
});
```
- **New projects:** Use current date (e.g., `2026-02-01`)
- **Existing projects:** Keep current version unless you need new features
- Dated versions lock behavior; `v1` or `vX` may change unexpectedly
@@ -0,0 +1,275 @@
---
title: "Sanity + Shopify + Hydrogen Rules"
description: Integration guide for Sanity with Shopify using the Hydrogen framework (React Router 7).
---
# Sanity + Shopify + Hydrogen Rules
**Package:** [`hydrogen-sanity`](https://github.com/sanity-io/hydrogen-sanity) — requires `@shopify/hydrogen >= 2025.5.0`
## 1. Architecture Overview
| Component | Purpose |
| ------------------ | ------------------------------------------------------------------- |
| **Shopify** | Product catalog, inventory, checkout (source of truth for commerce) |
| **Sanity Connect** | Syncs Shopify data to Sanity in real-time |
| **Sanity Studio** | Editorial content, rich descriptions, media (enhances Shopify data) |
| **Hydrogen** | React Router 7 front-end optimized for Shopify |
**Project Structure:**
```
./
├── /studio # Sanity Studio
└── /web # Hydrogen front-end
```
## 2. Environment Variables
```bash
# web/.env
PUBLIC_STOREFRONT_API_TOKEN="your-public-storefront-token"
PRIVATE_STOREFRONT_API_TOKEN="your-private-storefront-token"
PUBLIC_STORE_DOMAIN="your-store.myshopify.com"
SESSION_SECRET="your-random-session-secret"
# Sanity
SANITY_PROJECT_ID="your-project-id"
SANITY_DATASET="production"
SANITY_API_VERSION="2026-02-01"
SANITY_PREVIEW_TOKEN="your-sanity-viewer-token" # Viewer token for previews
```
## 3. Sanity Client Setup
### Vite Config
```typescript
// web/vite.config.ts
import { hydrogen } from "@shopify/hydrogen/vite";
import { sanity } from "hydrogen-sanity/vite";
export default defineConfig({
plugins: [hydrogen(), sanity()],
});
```
### Context Setup
```typescript
// web/app/lib/context.ts
import { type SanityContext, createSanityContext } from "hydrogen-sanity";
import { isPreviewEnabled } from "hydrogen-sanity/preview";
import { PreviewSession } from "hydrogen-sanity/preview/session";
const sanity = await createSanityContext({
request,
cache,
waitUntil,
client: {
projectId: env.SANITY_PROJECT_ID,
dataset: env.SANITY_DATASET,
apiVersion: env.SANITY_API_VERSION || "2026-02-01",
useCdn: true,
stega: {
enabled: isPreviewEnabled(env.SANITY_PROJECT_ID, previewSession),
studioUrl: "http://localhost:3333",
},
},
preview: {
token: env.SANITY_PREVIEW_TOKEN,
session: previewSession,
},
});
```
### Provider Setup (entry.server.tsx)
```typescript
const {SanityProvider} = context.sanity
const body = await renderToReadableStream(
<NonceProvider>
<SanityProvider>
<ServerRouter context={reactRouterContext} url={request.url} nonce={nonce} />
</SanityProvider>
</NonceProvider>,
)
```
### Root Layout (root.tsx)
```typescript
import {Sanity} from 'hydrogen-sanity'
export function Layout({children}) {
const nonce = useNonce()
return (
<html>
<body>
{children}
<Sanity nonce={nonce} /> {/* Required for client-side */}
<Scripts nonce={nonce} />
</body>
</html>
)
}
```
## 4. Data Fetching
Fetch from **both** Shopify (GraphQL) and Sanity (GROQ). Use `defineQuery` for TypeGen support.
### Recommended: `query` + `Query` component
```typescript
import {defineQuery} from 'groq'
import {Query} from 'hydrogen-sanity'
const PRODUCT_QUERY = defineQuery(`*[_type == "product" && store.slug.current == $handle][0]{ body }`)
// Loader
export async function loader({params, context: {sanity}}: LoaderFunctionArgs) {
const initial = await context.sanity.query(PRODUCT_QUERY, params)
return {initial}
}
// Component - auto-enables live preview when active
export default function ProductPage({loaderData}) {
return (
<Query query={PRODUCT_QUERY} options={{initial: loaderData.initial}}>
{(data) => <div>{data?.body}</div>}
</Query>
)
}
```
### Alternative methods
| Method | Use Case |
| -------------------------- | ------------------------------- |
| `sanity.query()` + `Query` | Recommended - auto preview mode |
| `sanity.loadQuery()` | Manual loader integration |
| `sanity.fetch()` | No preview needed, lightweight |
| `sanity.client` | Mutations in actions |
### Images
```typescript
import {useImageUrl} from 'hydrogen-sanity'
function Hero({image}) {
const imageUrl = useImageUrl(image)
return <img src={imageUrl.width(1200).height(600).url()} />
}
```
**Key Insight:** Shopify fields synced via Sanity Connect are `readOnly`. Use Sanity for editorial enhancements only.
## 5. Visual Editing Setup
### Root Layout
```typescript
// web/app/root.tsx
import {usePreviewMode} from 'hydrogen-sanity/preview'
import {VisualEditing} from 'hydrogen-sanity/visual-editing'
export function Layout({children}: {children?: React.ReactNode}) {
const previewMode = usePreviewMode()
return (
<html>
<body>
{children}
{previewMode ? <VisualEditing action="/api/preview" /> : null}
</body>
</html>
)
}
```
### Preview Route
```typescript
// web/app/routes/api.preview.ts
export { action, loader } from "hydrogen-sanity/preview/route";
```
### Content Security Policy
```typescript
// web/entry.server.tsx
const { nonce, header, NonceProvider } = createContentSecurityPolicy({
frameAncestors: isPreviewEnabled ? [studioHostname] : [],
connectSrc: [
`https://${projectId}.api.sanity.io`,
`wss://${projectId}.api.sanity.io`,
],
});
```
## 6. Studio: Presentation Tool
```typescript
// studio/sanity.config.ts
import { presentationTool } from "sanity/presentation";
export default defineConfig({
plugins: [
presentationTool({
resolve: {
locations: {
product: defineLocations({
select: { title: "store.title", slug: "store.slug.current" },
resolve: (doc) => ({
locations: [
{
title: doc?.title || "Untitled",
href: `/products/${doc?.slug}`,
},
{ title: "Products", href: `/collections/all` },
],
}),
}),
},
},
previewUrl: {
origin: "http://localhost:3000",
previewMode: { enable: "/api/preview" },
},
}),
],
});
```
## 7. Commands
```bash
# Install dependencies
pnpm add hydrogen-sanity @sanity/client @portabletext/react
# Development (run in separate terminals)
cd studio && pnpm dev # Studio at localhost:3333
cd web && pnpm dev # Hydrogen at localhost:3000
# Sanity Manage (CORS, tokens): https://www.sanity.io/manage
pnpm dlx sanity manage
```
## 8. Boundaries
- Always:
- Query Shopify for commerce data (price, inventory, variants)
- Query Sanity for editorial content (rich text, custom fields)
- Use `hydrogen-sanity` package for Visual Editing
- Add Hydrogen URL to CORS origins in [Sanity Manage](https://www.sanity.io/manage)
- Ask First:
- Before modifying Sanity Connect sync settings
- Before changing CSP configuration
- Never:
- Edit Shopify-synced fields in Sanity (they're `readOnly`)
- Expose `SANITY_API_TOKEN` to client-side code
- Query Sanity for commerce data that should come from Shopify
@@ -0,0 +1,133 @@
---
title: "Sanity Image Rules"
description: "Best practices for handling images in Sanity: Schema, URL generation, and Next.js Image integration."
---
# Sanity Image Rules
## 1. Schema Definition
**Always** enable `hotspot: true`. This allows editors to control cropping and the focal point.
```typescript
defineField({
name: "mainImage",
title: "Main Image",
type: "image",
options: {
hotspot: true, // CRITICAL
},
fields: [
defineField({
name: "alt",
type: "string",
title: "Alternative Text",
validation: (rule) =>
rule.required().warning("Alt text is important for SEO"),
}),
],
});
```
## 2. URL Builder (`urlFor`)
Use the Sanity Image URL Builder to generate optimized URLs (resize, crop, format).
**Setup (`sanity/lib/image.ts`):**
```typescript
import createImageUrlBuilder from "@sanity/image-url";
import { dataset, projectId } from "../env";
const builder = createImageUrlBuilder({ projectId, dataset });
export const urlFor = (source: any) => {
return builder.image(source);
};
```
**Usage:** The URL builder automatically uses hotspot/crop data when available:
```typescript
const imageUrl = urlFor(mainImage)
.width(800)
.height(600)
.fit("crop") // Respects hotspot when cropping
.url();
```
## 3. Next.js Image Component Pattern
Create a reusable `SanityImage` component that handles the `urlFor` logic and `next/image` props.
```typescript
import Image from 'next/image'
import { urlFor } from '@/sanity/lib/image'
interface SanityImageProps {
value: any // SanityImageSource
width?: number
height?: number
className?: string
priority?: boolean
}
export function SanityImage({ value, width = 800, height, className, priority }: SanityImageProps) {
if (!value?.asset) return null
return (
<Image
className={className}
src={urlFor(value)
.width(width)
.height(height || Math.round(width / 1.5)) // Default aspect ratio if no height
.url()}
alt={value.alt || ''}
width={width}
height={height || Math.round(width / 1.5)}
priority={priority}
// Optional: Use LQIP (Low Quality Image Placeholder)
placeholder={value.asset.metadata?.lqip ? 'blur' : 'empty'}
blurDataURL={value.asset.metadata?.lqip}
/>
)
}
```
## 4. Querying Images
**Critical:** LQIP (Low Quality Image Placeholder) is **not automatic**. You must explicitly query it via `asset->{ metadata { lqip } }`.
### Minimal Query (No LQIP)
```groq
mainImage {
asset->{ _id, url },
alt
}
```
### Full Query (With LQIP & Dimensions)
```groq
mainImage {
asset->{
_id,
url,
metadata {
lqip, // Base64 blur placeholder
dimensions { width, height } // For aspect ratio
}
},
alt,
hotspot, // Include if using hotspot cropping
crop // Include if using cropping
}
```
**Why this matters:** Without querying `metadata.lqip`, the `blurDataURL` in your component will be `undefined` and the blur effect won't work.
## 5. Performance Tips
- **Auto Format:** Sanity CDN automatically serves WebP/AVIF if the browser supports it (no need to specify `.format('webp')` manually in most cases, but `next/image` handles this too).
- **Sizing:** Always request the exact size you need using `.width()` and `.height()` in `urlFor`. Don't download a 4000px image for a thumbnail.
@@ -0,0 +1,458 @@
---
title: Sanity Localization Rules
description: Localization patterns for Sanity using official plugins and best practices.
---
# Sanity Localization Rules
Use the contents list to jump directly to the localization pattern you need.
## Table of Contents
- Guiding principles
- Terminology
- Locale content type
- Choosing document-level vs field-level localization
- Document-level localization
- Localized singletons
- Field-level localization
- AI-powered translation
- UI enhancement
- Frontend URL best practices
## 1. Guiding Principles
### Priority: Easy Authoring Experience
The structured nature of Sanity schemas and GROQ make it easy to parse localized content for your frontend. **Never** let frontend architecture dictate your localization approach — prioritize the editor experience.
### Avoid Content Duplication
Don't create nearly identical copies with slight differences (e.g., US vs British English). Use Portable Text marks and custom blocks to swap out words or sections as needed.
## 2. Terminology
| Term | Definition |
| ------------------------------- | --------------------------------------------------------- |
| **Internationalization (i18n)** | Designing your frontend to support multiple languages |
| **Localization** | Adapting content for a specific language/region |
| **Language Tag** | Code like `en`, `en-US`, `zh-Hant-TW` (per IETF RFC 5646) |
| **Locale** | A language tag with region info (e.g., `en-US`) |
## 3. Create a Locale Content Type
**Best Practice:** Store locales in Sanity, not just in code. This allows sharing between Studio and frontend.
```typescript
// schemaTypes/locale.ts
import { TranslateIcon } from "@sanity/icons";
import { defineField, defineType } from "sanity";
export const localeType = defineType({
name: "locale",
icon: TranslateIcon,
type: "document",
fields: [
defineField({
name: "name",
type: "string",
validation: (r) => r.required(),
}),
defineField({
name: "tag",
type: "string",
description: "IANA tag (en, en-US)",
validation: (r) => r.required(),
}),
defineField({
name: "fallback",
type: "reference",
to: [{ type: "locale" }],
}),
defineField({ name: "default", type: "boolean" }),
],
preview: { select: { title: "name", subtitle: "tag" } },
});
```
**Tip:** Restrict locale editing to admins via Structure by filtering `locale` from non-admin users.
## 4. Choose Your Localization Method
| Content Type | Examples | Recommended Method |
| ----------------------- | --------------------------------------- | ------------------ |
| **Structured** (things) | Products, People, Locations, Categories | Field-level |
| **Presentation** (UI) | Pages, Posts, Components | Document-level |
### Decision Questions
1. **Are fields shared across languages?** → Field-level
2. **Should changes be "global" for all locales?** (e.g., reordering components) → Field-level
3. **Is content mostly the same except regional differences?** → Field-level with PT marks
4. **Need to publish language versions independently?** → Document-level
## 5. Document-Level Localization
Use the **@sanity/document-internationalization** plugin.
```bash
npm install @sanity/document-internationalization
```
### Configuration
```typescript
// sanity.config.ts
import { documentInternationalization } from "@sanity/document-internationalization";
export default defineConfig({
plugins: [
documentInternationalization({
// Fetch from Content Lake
supportedLanguages: (client) =>
client.fetch(`*[_type == "locale"]{ "id": tag, "title": name }`),
// Document types to localize
schemaTypes: ["post", "page"],
}),
],
});
```
### Add Language Field to Schema
```typescript
// In each schema type listed in schemaTypes
defineField({
name: "language",
type: "string",
readOnly: true,
hidden: true,
});
```
### Initial Value Templates
Pre-set language when creating documents outside the translation UI:
```typescript
// sanity.config.ts
import { template } from "sanity";
export default defineConfig({
// ...
document: {
newDocumentOptions: (prev, { creationContext }) => {
// Filter to only show base language in "New document" menu
// The plugin handles creating translations from there
return prev.filter(
(item) =>
!["post", "page"].includes(item.templateId) ||
item.parameters?.language === "en",
);
},
},
// Initial value templates for each language
templates: (prev) => [
...prev,
template.initial({
id: "post-en",
title: "Post (English)",
schemaType: "post",
parameters: [{ name: "language", type: "string" }],
value: ({ language }) => ({ language }),
}),
],
});
```
### Querying Translated Documents
```groq
// Get document in specific language
*[_type == "post" && language == $locale && slug.current == $slug][0]
// Get all translations via metadata document
*[_type == "translation.metadata" && references($docId)][0] {
translations[] {
_key,
value-> { title, slug, language }
}
}
```
## 6. Localized Singletons (Homepage per Locale)
For singletons like homepages that need a separate document per locale, combine document-level localization with the singleton pattern.
### Schema Definition
```typescript
// schemaTypes/homePage.ts
import { HomeIcon } from "@sanity/icons";
import { defineField, defineType } from "sanity";
export const homePageType = defineType({
name: "homePage",
title: "Home Page",
type: "document",
icon: HomeIcon,
fields: [
defineField({
name: "language",
type: "string",
readOnly: true,
hidden: true,
}),
defineField({ name: "title", type: "string" }),
defineField({ name: "pageBuilder", type: "pageBuilder" }),
// ... other fields
],
preview: {
select: { language: "language" },
prepare({ language }) {
return {
title: "Home Page",
subtitle: language?.toUpperCase() || "No language",
};
},
},
});
```
### Initial Value Templates
Create templates that pre-set the language for each locale:
```typescript
// sanity.config.ts
import { Template, defineConfig } from "sanity";
// Define your supported locales
const LOCALES = [
{ id: "en", title: "English" },
{ id: "fr", title: "French" },
{ id: "de", title: "German" },
];
export default defineConfig({
// ...
templates: (prev) => {
// Create a template for each locale
const homePageTemplates: Template[] = LOCALES.map((locale) => ({
id: `homePage-${locale.id}`,
title: `Home Page (${locale.title})`,
schemaType: "homePage",
parameters: [{ name: "language", type: "string" }],
value: { language: locale.id },
}));
return [...prev, ...homePageTemplates];
},
});
```
### Structure: Localized Singleton Helper
Create a helper to show one singleton per locale in the Structure:
```typescript
// src/structure/index.ts
import { HomeIcon } from "@sanity/icons";
import { StructureBuilder, StructureResolver } from "sanity/structure";
const LOCALES = ["en", "fr", "de"];
function createLocalizedSingleton(
S: StructureBuilder,
typeName: string,
title: string,
icon?: React.ComponentType,
) {
return S.listItem()
.title(title)
.icon(icon)
.child(
S.list()
.title(title)
.items(
LOCALES.map((locale) =>
S.listItem()
.title(`${title} (${locale.toUpperCase()})`)
.icon(icon)
.child(
S.document()
.schemaType(typeName)
.documentId(`${typeName}-${locale}`) // Fixed ID per locale
.title(`${title} (${locale.toUpperCase()})`),
),
),
),
);
}
export const structure: StructureResolver = (S) =>
S.list()
.title("Content")
.items([
// Localized singletons
createLocalizedSingleton(S, "homePage", "Home Page", HomeIcon),
S.divider(),
// Filter localized singletons from default list
...S.documentTypeListItems().filter(
(item) => !["homePage"].includes(item.getId() as string),
),
]);
```
### Querying Localized Singletons
```groq
// Get homepage for specific locale
*[_type == "homePage" && language == $locale][0]{
title,
pageBuilder[]{...}
}
// Or by fixed document ID
*[_id == "homePage-" + $locale][0]{...}
```
### Key Points
- **Fixed IDs:** Use `${typeName}-${locale}` only for localized singletons; let Sanity generate IDs for ordinary localized content
- **Initial Value Templates:** Essential for the "New document" menu to work correctly
- **Structure:** Group all locale versions under one list item for cleaner navigation
- **See also:** `studio-structure.md` for more singleton patterns
## 7. Field-Level Localization
Use **sanity-plugin-internationalized-array** (NOT localized objects — they hit attribute limits).
```bash
npm install sanity-plugin-internationalized-array
```
### Configuration
```typescript
// sanity.config.ts
import { internationalizedArray } from "sanity-plugin-internationalized-array";
export default defineConfig({
plugins: [
internationalizedArray({
languages: (client) =>
client.fetch(`*[_type == "locale"]{ "id": tag, "title": name }`),
fieldTypes: ["string", "text", "simpleBlockContent"],
}),
],
});
```
### Usage in Schema
```typescript
// The plugin creates types like `internationalizedArrayString`
defineField({
name: "jobTitle",
type: "internationalizedArrayString", // Localized string field
});
```
### Portable Text Localization
Create a reusable block content type, then add it to `fieldTypes`:
```typescript
// schemaTypes/simpleBlockContent.ts
export default defineType({
name: "simpleBlockContent",
type: "array",
of: [
{
type: "block",
styles: [{ title: "Normal", value: "normal" }],
lists: [],
},
],
});
// sanity.config.ts
fieldTypes: ["string", "simpleBlockContent"];
// In your schema
defineField({
name: "bio",
type: "internationalizedArraySimpleBlockContent",
});
```
### Querying Internationalized Arrays
```groq
// Get specific locale value
*[_type == "author"][0] {
"jobTitle": jobTitle[_key == $locale][0].value
}
// With fallback
*[_type == "author"][0] {
"jobTitle": coalesce(
jobTitle[_key == $locale][0].value,
jobTitle[_key == "en"][0].value
)
}
```
## 8. AI-Powered Translation
Use **@sanity/assist** for automated translations.
```bash
npm install @sanity/assist
```
```typescript
// sanity.config.ts
import { assist } from "@sanity/assist";
export default defineConfig({
plugins: [
assist({
translate: {
// For document-level localization
document: {
languageField: "language",
},
// For field-level localization
field: {
languages: (client) =>
client.fetch(`*[_type == "locale"]{ "id": tag, "title": name }`),
documentTypes: ["author", "category"],
},
},
}),
],
});
```
## 9. UI Enhancement
Use **@sanity/language-filter** to let editors show/hide locales:
```bash
npm install @sanity/language-filter
```
## 10. Frontend URL Best Practices
**Always include locale in the URL** for SEO:
- `yoursite.com/en/my-page` → `yoursite.com/fr/my-page`
- `yoursite.com/my-page` → redirects to default locale
**Avoid:** Having the default locale at root without prefix — causes SEO edge cases.
Use Next.js middleware (or framework equivalent) to redirect paths missing a locale prefix to the default locale.
@@ -0,0 +1,143 @@
---
title: Import HTML to Portable Text
description: Use @portabletext/block-tools with JSDOM to convert HTML content
---
## Import HTML to Portable Text
Use `@portabletext/block-tools` with `JSDOM` to convert HTML from legacy CMSs to Portable Text.
### Setup
```bash
npm install @portabletext/block-tools jsdom
```
### Basic Conversion
```typescript
import { htmlToBlocks } from "@portabletext/block-tools";
import { JSDOM } from "jsdom";
// Get block content type from your schema
const blockContentType = schema.get("blockContent");
const blocks = htmlToBlocks(htmlString, blockContentType, {
parseHtml: (html) => new JSDOM(html).window.document,
});
```
### Custom Deserializers
Handle specific HTML patterns:
```javascript
const blocks = htmlToBlocks(htmlString, blockContentType, {
parseHtml: (html) => new JSDOM(html).window.document,
rules: [
{
deserialize(el, next, block) {
// Custom link handling
if (el.tagName.toLowerCase() === "a") {
return {
_type: "link",
href: el.getAttribute("href"),
blank: el.getAttribute("target") === "_blank",
};
}
// Custom image handling
if (el.tagName.toLowerCase() === "img") {
return {
_type: "image",
// Upload image separately, store reference
_sanityAsset: `image@${el.getAttribute("src")}`,
};
}
return undefined; // Fall through to default handling
},
},
],
});
```
### Pre-Processing HTML
Clean HTML before conversion:
```javascript
function cleanHtml(html) {
const dom = new JSDOM(html);
const doc = dom.window.document;
// Remove layout elements
doc
.querySelectorAll("header, footer, nav, .sidebar")
.forEach((el) => el.remove());
// Extract metadata before processing body
const title = doc.querySelector("title")?.textContent;
const description = doc.querySelector('meta[name="description"]')?.content;
return {
body: doc.body.innerHTML,
metadata: { title, description },
};
}
```
### Image Upload
Don't just link external images—upload them:
```javascript
async function uploadImage(client, imageUrl) {
const response = await fetch(imageUrl);
const buffer = await response.arrayBuffer();
const asset = await client.assets.upload("image", Buffer.from(buffer), {
filename: imageUrl.split("/").pop(),
});
return {
_type: "image",
asset: { _type: "reference", _ref: asset._id },
};
}
```
### Using in a Migration
Wrap this in `defineMigration` for controlled imports:
```typescript
// migrations/import-wordpress-posts/index.ts
import { htmlToBlocks } from "@portabletext/block-tools";
import { create, defineMigration } from "sanity/migrate";
export default defineMigration({
title: "Import WordPress posts",
async *migrate(documents, context) {
const posts = await fetchWordPressPosts(); // Your import source
for (const post of posts) {
const blocks = htmlToBlocks(post.content, blockContentType, {
parseHtml: (html) => new JSDOM(html).window.document,
});
yield create({
_type: "post",
title: post.title,
slug: { _type: "slug", current: post.slug },
legacyId: String(post.id),
body: blocks,
});
}
},
});
```
Let Sanity generate document IDs for ordinary imported content. Add schema fields for legacy identifiers or slugs, then use GROQ lookups against those fields when you need to rerun an import, patch existing documents, or create references between imported records. Set `_id` directly only for singleton documents.
Run with: `sanity migration run import-wordpress-posts --no-dry-run`
Reference: [Schema and Content Migrations](https://www.sanity.io/docs/content-lake/schema-and-content-migrations)
@@ -0,0 +1,59 @@
---
title: Sanity Content Migration Rules
description: Best practices for migrating content (HTML, Markdown) into Sanity Portable Text.
---
# Sanity Content Migration Rules
## Document Identity During Import (Critical)
Let Sanity generate `_id` values for imported documents unless you are intentionally creating a singleton. Do not derive deterministic UUIDs or document IDs from slugs, file paths, legacy IDs, or related document IDs.
- Store legacy identifiers in fields such as `legacyId`, `externalId`, or `slug`.
- Make imports idempotent by looking up existing documents with GROQ before creating or patching them.
- Create relationships by querying the target document and using its real `_id` in a `reference`; do not predict `_ref` values from naming conventions.
- Reserve explicit `_id` values for singleton documents such as `settings`, `homePage`, or localized singleton IDs like `homePage-en`.
## 1. HTML Import (Legacy CMS)
Use `@portabletext/block-tools` with `JSDOM` to convert HTML to Portable Text. This covers setup, custom deserializers, pre-processing, image uploads, and wrapping in `defineMigration`.
**See `migration-html-import.md` for the full guide with working examples.**
## 2. Markdown Import (Static Sites)
Use `@portabletext/markdown` for direct, schema-aware Markdown ↔ Portable Text conversion.
**Recommended: Direct Conversion with `@portabletext/markdown`**
```typescript
import { markdownToPortableText } from "@portabletext/markdown";
const blocks = markdownToPortableText(markdownString);
```
This handles headings, lists, bold, italic, code, links, images, and tables. Use `@portabletext/sanity-bridge` to pass your Sanity schema so only valid types are produced.
**Alternative: Markdown → HTML → Portable Text**
For complex Markdown with non-standard extensions, convert to HTML first, then use `htmlToBlocks` (see above).
1. **Parse:** `marked` or `remark` to convert MD to HTML.
2. **Convert:** Use `htmlToBlocks` from `@portabletext/block-tools`.
> **Note:** `@sanity/block-content-to-markdown` and `@sanity/block-tools` are deprecated. Use `@portabletext/markdown` and `@portabletext/block-tools` instead.
## 3. Image Handling (Universal)
Don't just link to external images. Download them and upload to Sanity Asset Pipeline.
1. **Extract:** Find `<img>` tags or Markdown image syntax.
2. **Download:** Fetch the image buffer.
3. **Upload:** `client.assets.upload('image', buffer)`
4. **Replace:** Return a Sanity Image block with the new asset reference.
## 4. Schema Validation
Ensure your destination schema allows the structures you are importing.
- **Tables:** Need a `table` type (HTML `<table>` or GFM tables).
- **Code:** Need a `code` type (HTML `<pre><code>` or MD code fences).
@@ -0,0 +1,563 @@
---
title: Next.js & Sanity Integration Rules
description: Integration guide for Next.js App Router, Live Content API, and a standalone Sanity Studio.
---
# Next.js & Sanity Integration Rules
Jump to the section that matches the task instead of reading this guide end-to-end.
## Table of Contents
- Architecture patterns
- Data fetching (Live Content API)
- Caching and revalidation
- Visual Editing and clean data
- Studio setup (standalone)
- Draft Mode setup
- Error handling
- Presentation queries
- Pagination pattern
## 1. Architecture Patterns
### Option A: Standalone Studio (Recommended)
**Best for:** All new Next.js projects.
The Studio is its own app, living alongside the Next.js app in the same repo:
```
your-project/
├── studio/ # Sanity Studio (standalone)
└── web/ # Next.js frontend
```
Why standalone instead of embedding the Studio in the Next.js app:
- **Faster dev and builds:** `sanity dev` and `sanity build` run on Vite and are dramatically faster (10-30x) than compiling the Studio through `next dev` / `next build`.
- **Auto-updates:** Standalone Studios receive bugfixes and new features automatically, with no dependency bump or redeploy. Embedded Studios can't auto-update (Next.js does not support ESM with import maps), so every update means bump + deploy.
- **TypeGen watch mode:** With `sanity dev`, TypeGen regenerates types as queries change. Embedded Studios can't hook into `next dev`, so you must re-run `sanity typegen generate` manually after every query edit.
- **Content model independence:** A separate Studio keeps the content model from becoming website-centric and makes collaboration easier.
**Setup:**
- Run both apps side by side in separate terminals: `next dev` (localhost:3000) and `sanity dev` (localhost:3333).
- Add your Next.js app URL to **CORS Origins**: `npx sanity cors add http://localhost:3000 --credentials` (repeat for your production URL), or via [Sanity Manage](https://www.sanity.io/manage).
- See `project-structure.md` rule for detailed structure.
### Option B: Embedded Studio (Not Recommended)
The Studio can be mounted inside the Next.js app at `/app/studio/[[...tool]]/page.tsx` via `next-sanity/studio`. Avoid this for new projects: it slows builds, ties every Studio update to an app deploy, and rules out auto-updates and TypeGen watch mode. For maintaining or migrating an existing embedded Studio, see section 5.
## 2. Data Fetching (Live Content API)
We use `defineLive` (next-sanity v11+) to enable real-time content updates and Visual Editing automatically.
### Setup (`src/sanity/lib/live.ts`)
```typescript
import { defineLive } from "next-sanity";
import { client } from "./client";
export const { sanityFetch, SanityLive } = defineLive({
client: client.withConfig({
apiVersion: "2026-02-01",
}),
serverToken: process.env.SANITY_API_READ_TOKEN,
browserToken: process.env.SANITY_API_READ_TOKEN,
});
```
### Rendering (`src/app/layout.tsx`)
You **must** render `<SanityLive />` in the root layout to enable real-time updates.
```typescript
import { SanityLive } from '@/sanity/lib/live'
import { VisualEditing } from 'next-sanity/visual-editing'
import { draftMode } from 'next/headers'
export default async function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<SanityLive />
{(await draftMode()).isEnabled && <VisualEditing />}
</body>
</html>
)
}
```
## 3. Caching & Revalidation
### Prefer Live Content API (Default)
**Use `defineLive` by default.** It handles fetching, caching, and invalidation automatically. Only implement manual caching when you need fine-grained control.
### When to Use Manual Caching
| Scenario | Approach |
| ---------------------------------------- | ------------------------------- |
| Real-time updates, Visual Editing | `defineLive` (default) |
| Static marketing pages, rarely updated | Time-based revalidation |
| Blog posts, products with frequent edits | Tag-based revalidation |
| Critical accuracy (stock levels, prices) | Path-based + short revalidation |
### Debugging: Enable Fetch Logging
See every fetch with cache HIT/MISS status:
```typescript
// next.config.ts
const nextConfig: NextConfig = {
logging: {
fetches: {
fullUrl: true,
},
},
};
```
Console output shows cache status:
```text
GET /posts 200 in 39ms
│ GET https://...apicdn.sanity.io/... 200 in 5ms (cache hit)
```
### Sanity CDN vs API
| Setting | Speed | Freshness | Use When |
| --------------- | ------ | -------------------- | -------------------------------- |
| `useCdn: true` | Fast | May have brief delay | Default for all runtime fetches |
| `useCdn: false` | Slower | Guaranteed fresh | `generateStaticParams`, webhooks |
Override per-request:
```typescript
// For static generation, use API directly
export async function generateStaticParams() {
const slugs = await client.withConfig({ useCdn: false }).fetch(SLUGS_QUERY);
return slugs;
}
```
### Manual `sanityFetch` Helper (Advanced)
For manual caching control, create a wrapper:
```typescript
// src/sanity/lib/client.ts
export async function sanityFetch<const QueryString extends string>({
query,
params = {},
revalidate = 60,
tags = [],
}: {
query: QueryString;
params?: QueryParams;
revalidate?: number | false;
tags?: string[];
}) {
return client.fetch(query, params, {
next: {
revalidate: tags.length ? false : revalidate,
tags,
},
});
}
```
### Time-Based Revalidation
Simple and predictable. Good for content that changes infrequently.
```typescript
const posts = await sanityFetch({
query: POSTS_QUERY,
revalidate: 3600, // Revalidate every hour
});
```
**The "Typo Problem":** With time-based only, content authors may wait up to an hour to see changes. Use webhooks for instant updates.
### Path-Based Revalidation
Surgically revalidate specific routes when documents change.
**1. Create API Route:**
```typescript
// src/app/api/revalidate/path/route.ts
import { parseBody } from "next-sanity/webhook";
import { revalidatePath } from "next/cache";
import { type NextRequest, NextResponse } from "next/server";
type WebhookPayload = { path?: string };
export async function POST(req: NextRequest) {
try {
const { isValidSignature, body } = await parseBody<WebhookPayload>(
req,
process.env.SANITY_REVALIDATE_SECRET,
true, // Add delay to allow CDN to update
);
if (!isValidSignature) {
return new Response("Invalid signature", { status: 401 });
}
if (!body?.path) {
return new Response("Missing path", { status: 400 });
}
revalidatePath(body.path);
return NextResponse.json({ revalidated: body.path });
} catch (err) {
return new Response((err as Error).message, { status: 500 });
}
}
```
**2. Create GROQ-Powered Webhook:**
- URL: `https://yoursite.com/api/revalidate/path`
- Filter: `_type in ["post"]`
- Projection: `{ "path": "/posts/" + slug.current }`
- Add `SANITY_REVALIDATE_SECRET` to webhook and `.env.local`
### Tag-Based Revalidation
"Update once, revalidate everywhere" — best for referenced content.
**1. Tag Your Queries:**
```typescript
// Posts index - revalidate when ANY post, author, or category changes
const posts = await sanityFetch({
query: POSTS_QUERY,
tags: ["post", "author", "category"],
});
// Individual post - more granular, includes slug-specific tag
const post = await sanityFetch({
query: POST_QUERY,
params,
tags: [`post:${params.slug}`, "author", "category"],
});
```
**2. Create API Route:**
```typescript
// src/app/api/revalidate/tag/route.ts
import { parseBody } from "next-sanity/webhook";
import { revalidateTag } from "next/cache";
import { type NextRequest, NextResponse } from "next/server";
type WebhookPayload = { tags: string[] };
export async function POST(req: NextRequest) {
try {
const { isValidSignature, body } = await parseBody<WebhookPayload>(
req,
process.env.SANITY_REVALIDATE_SECRET,
true,
);
if (!isValidSignature) {
return new Response("Invalid signature", { status: 401 });
}
if (!Array.isArray(body?.tags) || !body.tags.length) {
return new Response("Missing tags", { status: 400 });
}
body.tags.forEach((tag) => revalidateTag(tag));
return NextResponse.json({ revalidated: body.tags });
} catch (err) {
return new Response((err as Error).message, { status: 500 });
}
}
```
**3. Create GROQ-Powered Webhook:**
- URL: `https://yoursite.com/api/revalidate/tag`
- Filter: `_type in ["post", "author", "category"]`
- Projection: `{ "tags": [_type, _type + ":" + slug.current] }`
### Stale Data After Webhook?
Webhooks fire _before_ Sanity CDN updates. If you see stale data:
1. **Add delay** — Pass `true` as third arg to `parseBody`
2. **Or bypass CDN** — Set `useCdn: false` in client config (use sparingly)
## 4. Visual Editing (Stega) & Clean Data
Visual Editing injects invisible characters into strings to enable click-to-edit.
### A. The Golden Rule of Stega
If a string field controls logic (alignment, colors, IDs), you **must** clean it before comparing.
```typescript
import { stegaClean } from "@sanity/client/stega";
export function Layout({ align }: { align: string }) {
// ❌ Bad: Will fail in Edit Mode due to invisible chars
// if (align === 'center') ...
// ✅ Good: Clean the value first
const cleanAlign = stegaClean(align);
return <div className={cleanAlign === 'center' ? 'mx-auto' : ''} />
}
```
### B. Metadata & SEO (Critical)
**Never** let Stega characters leak into `<head>` tags. Always set `stega: false` for metadata fetching.
```typescript
export async function generateMetadata({ params }) {
const { data } = await sanityFetch({
query: SEO_QUERY,
params: await params,
stega: false, // 👈 Critical for SEO
});
return { title: data?.title };
}
```
### C. Static Params
When generating static params, fetch only published content and disable stega.
```typescript
export async function generateStaticParams() {
const { data } = await sanityFetch({
query: SLUGS_QUERY,
perspective: "published", // 👈 No drafts
stega: false,
});
return data;
}
```
## 5. Setup: Studio (Standalone)
Create the Studio as its own app from the repo root — **not inside the Next.js app folder**, where the CLI would switch to its embedded flow:
```bash
npm create sanity@latest -- --project <projectId> --dataset production --template clean --typescript --output-path studio
```
Run it with `npm run dev` inside `studio/` (defaults to http://localhost:3333). For Visual Editing, point the Presentation Tool's `previewUrl.origin` at the Next.js app (see `visual-editing.md`).
### Migrating an Existing Embedded Studio
Embedded Studios (`<NextStudio />` mounted at a route like `/app/studio/[[...tool]]/page.tsx`) keep working, but migrating to a standalone Studio is recommended:
1. Create a standalone Studio folder as above, reusing your existing `projectId` and dataset.
2. Move `sanity.config.ts`, `sanity.cli.ts`, and your schema types into it.
3. Delete the `/app/studio/[[...tool]]/` route from the Next.js app. Keep `next-sanity` — the app still needs it for fetching, Live Content, and Visual Editing.
4. Add the app's URLs to CORS origins and set the Presentation Tool's `previewUrl.origin` to the app's URL.
## 6. Setup: Draft Mode
Enable Presentation Tool and Visual Editing by setting up a draft mode route.
**`src/app/api/draft-mode/enable/route.ts`:**
```typescript
import { defineEnableDraftMode } from "next-sanity/draft-mode";
import { client } from "@/sanity/lib/client";
import { token } from "@/sanity/lib/token";
// Helper to get token
export const { GET } = defineEnableDraftMode({
client: client.withConfig({ token }),
});
```
## 7. Error Handling
Use `notFound()` for missing documents. Common errors:
| Error | Cause | Solution |
| ------------------ | --------------------- | ---------------------------------- |
| 401 Unauthorized | Invalid/missing token | Check `SANITY_API_READ_TOKEN` |
| 403 Forbidden | CORS not configured | Add URL to CORS origins |
| Query syntax error | Invalid GROQ | Test in Vision plugin first |
| Empty result | Wrong filter/params | Log params, check `_type` spelling |
```typescript
import { notFound } from 'next/navigation'
export default async function PostPage({ params }: Props) {
const { data } = await sanityFetch({ query: POST_QUERY, params: await params })
if (!data) notFound()
return <Post data={data} />
}
```
## 8. Presentation Queries (`usePresentationQuery`)
For faster live editing in the Presentation Tool, use `usePresentationQuery` to fetch only the specific block being edited, rather than re-rendering the entire page.
### Why Use This
- **Without:** Editing a hero title re-fetches the whole page, re-renders all blocks
- **With:** Only the hero block re-fetches and re-renders
This is especially valuable for pages with many Page Builder blocks or complex Portable Text.
### Basic Pattern
```typescript
'use client'
import { usePresentationQuery } from 'next-sanity/hooks'
import { HERO_PRESENTATION_QUERY } from '@/sanity/lib/queries'
type HeroProps = {
_key: string
documentId: string
title: string
subtitle?: string
// ... other initial props from page query
}
export function Hero({ _key, documentId, title, subtitle, ...rest }: HeroProps) {
// Fetch block-specific data for faster updates in Presentation Tool
const { data } = usePresentationQuery({
query: HERO_PRESENTATION_QUERY,
params: { documentId, blockKey: _key },
})
// Use presentation data if available, fallback to initial server props
const blockData = data?.heroBlock || { title, subtitle, ...rest }
return (
<section>
<h1>{blockData.title}</h1>
{blockData.subtitle && <p>{blockData.subtitle}</p>}
</section>
)
}
```
### The Presentation Query
Create a query that targets the specific block by `_key`:
```typescript
// queries.ts
export const HERO_PRESENTATION_QUERY = defineQuery(`
*[_id == $documentId][0]{
_id,
_type,
"heroBlock": pageBuilder[_key == $blockKey && _type == "hero"][0]{
title,
subtitle,
image,
theme,
// Include all fields the component needs
}
}
`);
```
### Passing Document Context
Your PageBuilder component needs to pass `documentId` to each block:
```typescript
export function PageBuilder({ content, documentId }: { content: Block[]; documentId: string }) {
return (
<main>
{content.map((block) => {
switch (block._type) {
case "hero":
return <Hero key={block._key} documentId={documentId} {...block} />
// ... other blocks
}
})}
</main>
)
}
```
### For Portable Text Blocks
The same pattern works for custom blocks inside Portable Text:
```typescript
export const PTE_IMAGE_PRESENTATION_QUERY = defineQuery(`
*[_id == $documentId][0]{
"pteImageBlock": body[_key == $blockKey && _type == "pteImage"][0]{
image,
caption,
alt
}
}
`);
```
**See also:** `visual-editing.md` for the conceptual overview and `page-builder.md` for full Page Builder patterns.
## 9. Pagination Pattern
For listing pages with many entries, use offset-based pagination with a count query.
### Queries
```typescript
// Paginated listing
export const ARTICLES_QUERY = defineQuery(`
*[_type == "article" && defined(slug.current)]
| order(date desc) [$start...$end] {
_id, title, "slug": slug.current, date
}
`);
// Total count for pagination UI
export const ARTICLES_COUNT_QUERY = defineQuery(`
count(*[_type == "article" && defined(slug.current)])
`);
```
### Listing Page
```typescript
const ENTRIES_PER_PAGE = 10;
export default async function BlogPage({
searchParams
}: {
searchParams: Promise<{ page?: string }>
}) {
const { page: pageParam } = await searchParams;
const page = parseInt(pageParam || "1");
const start = (page - 1) * ENTRIES_PER_PAGE;
const end = start + ENTRIES_PER_PAGE;
const [{ data: articles }, { data: total }] = await Promise.all([
sanityFetch({ query: ARTICLES_QUERY, params: { start, end } }),
sanityFetch({ query: ARTICLES_COUNT_QUERY })
]);
const totalPages = Math.ceil(total / ENTRIES_PER_PAGE);
return (
<main>
{articles.map(article => (
<ArticleCard key={article._id} article={article} />
))}
<Pagination current={page} total={totalPages} />
</main>
);
}
```
@@ -0,0 +1,171 @@
---
title: Nuxt & Sanity Integration Rules
description: Integration guide for Nuxt, including @nuxtjs/sanity, visual editing, and data fetching.
---
# Nuxt & Sanity Integration Rules
## 1. Setup & Configuration
### Scaffold a new Nuxt app
```bash
npm create nuxt@latest my-app -- -t ui -M "" --packageManager npm --no-gitInit
cd my-app
```
`-t ui` selects the Nuxt UI starter. `-M ""` skips the interactive module-selection prompt (empty string = no extra modules). `--packageManager npm` and `--no-gitInit` suppress the other two prompts so the scaffold runs end-to-end without input.
### Installation
```bash
npx nuxi@latest module add sanity
```
`nuxi module add sanity` resolves to the official `@nuxtjs/sanity` module and registers it in `nuxt.config.ts` automatically. The module bundles `@sanity/client`, `@sanity/visual-editing`, `@portabletext/vue`, and `groq` as direct dependencies — no separate installs needed.
`groq` and `defineQuery` are also **auto-imported** by the module, so you can use them in `.vue` files without an `import` statement.
For manual image-URL building (an alternative to the auto-registered `<SanityImage>` component), add `@sanity/image-url`:
```bash
npm install @sanity/image-url
```
### What the module auto-imports
**Composables** (use directly in `<script setup>`, no imports needed):
- `useSanity()` — get the client and its config
- `useSanityQuery()` / `useLazySanityQuery()` — reactive query helpers
- `useSanityConfig()` — read the resolved module config
- `useSanityPerspective()`, `useSanityPreviewPerspective()`, `useSanityPreviewEnvironment()` — perspective helpers for drafts/preview
- `useSanityVisualEditingState()`, `useIsSanityLivePreview()`, `useIsSanityPresentationTool()` — visual-editing state helpers
**GROQ helpers** (template tags): `groq`, `defineQuery`
**Components** (use directly in `<template>`):
- `<SanityContent>` — Portable Text renderer (uses `@portabletext/vue` internally; prop is `:value`)
- `<SanityImage>` — image renderer; takes an `assetId` (the image asset's `_ref`); upgrades to `<NuxtImg>` automatically when `@nuxt/image` is installed
- `<SanityFile>` — file renderer
### Configuration (`nuxt.config.ts`)
```typescript
export default defineNuxtConfig({
modules: ["@nuxtjs/sanity"],
sanity: {
projectId: process.env.NUXT_SANITY_PROJECT_ID,
dataset: process.env.NUXT_SANITY_DATASET,
apiVersion: "2026-05-15",
// Live Visual Editing Configuration
visualEditing: {
studioUrl: process.env.NUXT_SANITY_STUDIO_URL,
token: process.env.NUXT_SANITY_API_READ_TOKEN, // Required for fetching drafts
stega: true, // Enable stega for visual editing
mode: "live-visual-editing", // Default: enables live updates
},
},
});
```
**Important:** Don't enable the `minimal` client if you want the full feature set (composables, components, visual editing).
## 2. Data Fetching
### `useSanityQuery`
Use the composable for reactive fetching. It handles preview state automatically when `visualEditing` is configured. `groq` and `defineQuery` are auto-imported — use either.
```vue
<!-- app/pages/posts.vue -->
<script setup lang="ts">
const query = groq`*[_type == "post" && defined(slug.current)]{ _id, title, slug }`
const { data: posts } = await useSanityQuery<Array<{ _id: string; title?: string; slug?: { current?: string } }>>(query)
</script>
<template>
<ul>
<li v-for="post in posts || []" :key="post._id">
<NuxtLink :to="`/${post.slug?.current}`">{{ post.title }}</NuxtLink>
</li>
</ul>
</template>
```
### Dynamic Routes (`[slug].vue`)
Pull the slug off `useRoute()` and pass it as a query parameter. The `<SanityContent>` component renders Portable Text — note the prop is `value`, not `blocks` (renamed in v2).
```vue
<!-- app/pages/[slug].vue -->
<script setup lang="ts">
const route = useRoute()
const query = groq`*[_type == "post" && slug.current == $slug][0]{ _id, title, body }`
const { data: post } = await useSanityQuery<{ _id: string; title?: string; body?: unknown[] }>(
query,
{ slug: route.params.slug }
)
</script>
<template>
<article v-if="post">
<h1>{{ post.title }}</h1>
<SanityContent v-if="post.body" :value="post.body" />
</article>
</template>
```
## 3. Visual Editing (Live Preview)
### Automatic Setup
When `visualEditing` is configured in `nuxt.config.ts`, the module handles:
1. Injecting the Visual Editing overlays.
2. Refreshing data when content changes in the Studio.
3. Enabling Stega encoding.
### Handling Stega in Logic
If you use stega-encoded strings in logic (e.g. `v-if="post.layout === 'full'"`), you must clean them. `stegaClean` is exported from `@sanity/client/stega` (a transitive of `@nuxtjs/sanity`, so no separate install).
```typescript
import { stegaClean } from "@sanity/client/stega";
const layout = computed(() => stegaClean(props.layout));
```
## 4. Components
### Portable Text — `<SanityContent>`
The module auto-registers `<SanityContent>`. Don't install `@portabletext/vue` separately; it's a direct dep of the module.
```vue
<SanityContent :value="post.body" />
```
For custom blocks/marks, pass `:components`:
```vue
<SanityContent :value="post.body" :components="{ block: { h2: MyH2 } }" />
```
### Images — two options
**Option A — `<SanityImage>` (recommended).** Auto-registered. Takes the asset's `_ref` (the `assetId`) and builds the URL via the module's resolved projectId/dataset. If `@nuxt/image` is installed, it transparently upgrades to `<NuxtImg>` for responsive sizing.
```vue
<SanityImage :asset-id="post.mainImage.asset._ref" width="800" />
```
**Option B — `@sanity/image-url` builder.** Install `@sanity/image-url` separately and build URLs manually. Useful when you need fine-grained control (hotspot/crop, format negotiation, srcset).
```typescript
import imageUrlBuilder from "@sanity/image-url";
const builder = imageUrlBuilder(useSanity().client);
// builder.image(source).width(800).url()
```
@@ -0,0 +1,329 @@
---
title: "Sanity Page Builder Patterns"
description: Patterns for Sanity Page Builder arrays, block components, and live editing.
---
# Sanity Page Builder Patterns
This guide covers **Page Builder** patterns—arrays of block objects that allow content teams to compose flexible page layouts. For Portable Text (rich text within documents), see `portable-text.md`.
## 1. What is a Page Builder?
A page builder is an **array of objects** (`pageBuilder[]`) that allows content teams to compose pages from reusable blocks without developer intervention.
**When to use:**
- Flexible layouts needed (marketing pages, landing pages)
- Content can be reordered
- Different components on different pages
**When NOT to use:**
- Rigid, formulaic content (blog posts, product pages)
- Highly structured data that doesn't change layout
- Rich text within a document body—use Portable Text instead
## 2. Schema Organization
### Directory Structure
```
schemaTypes/
├── blocks/ # Page builder blocks (objects)
│ ├── heroType.ts
│ ├── featuresType.ts
│ └── faqsType.ts
├── pageBuilderType.ts # The array definition
└── pageType.ts # Document using the page builder
```
### Objects vs References
| Use **Objects** | Use **References** |
| ------------------------------ | -------------------------------- |
| Content is unique to this page | Content reused across many pages |
| Simpler queries | Needs central management |
| Default choice | FAQs, CTAs, testimonials |
**Rule:** Use references sparingly. Most blocks should be objects.
### Page Builder Array
```typescript
// pageBuilderType.ts
import { defineArrayMember, defineType } from "sanity";
export const pageBuilderType = defineType({
name: "pageBuilder",
type: "array",
of: [
defineArrayMember({ type: "hero" }),
defineArrayMember({ type: "splitImage" }),
defineArrayMember({ type: "features" }),
defineArrayMember({ type: "faqs" }),
],
options: {
insertMenu: {
views: [
// Optional: Show visual thumbnails in the insert menu grid
{
name: "grid",
previewImageUrl: (type) => `/block-previews/${type}.png`,
},
],
},
},
});
```
### Block Preview Pattern
Every block should have consistent previews:
```typescript
import { BlockContentIcon } from "@sanity/icons";
import { defineType } from "sanity";
export const splitImageType = defineType({
name: "splitImage",
type: "object",
icon: BlockContentIcon,
fields: [
/* ... */
],
preview: {
select: { title: "title", media: "image" },
prepare({ title, media }) {
return {
title: title || "Untitled",
subtitle: "Split Image", // Block type name
media: media ?? BlockContentIcon, // Fallback to icon
};
},
},
});
```
## 3. Querying Page Builders
Expand references only for blocks that need them:
```groq
*[_type == "page" && slug.current == $slug][0]{
...,
content[]{
...,
_type == "faqs" => {
...,
faqs[]-> // Expand only FAQ references
}
}
}
```
## 4. Rendering Page Builders
### TypeScript Typing
Use `Extract` to type individual blocks from the query result:
```typescript
import { PAGE_QUERYResult } from "@/sanity/types";
type HeroProps = Extract<
NonNullable<NonNullable<PAGE_QUERYResult>["content"]>[number],
{ _type: "hero" }
>;
export function Hero({ title, image }: HeroProps) {
// Fully typed!
}
```
### Switch-Based Rendering
```typescript
export function PageBuilder({ content }: { content: Block[] }) {
if (!Array.isArray(content)) return null;
return (
<main>
{content.map((block) => {
switch (block._type) {
case "hero":
return <Hero key={block._key} {...block} />;
case "features":
return <Features key={block._key} {...block} />;
case "splitImage":
return <SplitImage key={block._key} {...block} />;
default:
return <div key={block._key}>Unknown: {block._type}</div>;
}
})}
</main>
);
}
```
**Always use `_key` for React keys:**
```typescript
// Breaks Visual Editing and causes hydration issues
{items.map((item, i) => <Component key={i} {...item} />)}
// Always use Sanity's _key
{items.map((item) => <Component key={item._key} {...item} />)}
```
### Cleaning Values for Logic
Use `stegaClean` when block fields control rendering logic:
```typescript
import { stegaClean } from "next-sanity";
function SplitImage({ orientation, title, image }) {
return (
<section data-orientation={stegaClean(orientation) || "imageLeft"}>
{/* ... */}
</section>
);
}
```
## 5. Presentation Queries for Live Editing (Next.js)
For faster live updates in the Presentation Tool, use **presentation queries** that fetch only the specific block being edited, rather than re-fetching the entire page.
> **Note:** This pattern uses `usePresentationQuery` from `next-sanity/hooks`. For other frameworks, check your loader package for equivalent functionality.
### The Pattern
1. **Create a block-specific presentation query:**
```typescript
// queries.ts
export const HERO_PRESENTATION_QUERY = defineQuery(`
*[_id == $documentId][0]{
_id,
_type,
"heroBlock": pageBuilder[_key == $blockKey && _type == "hero"][0]{
title,
subtitle,
image,
// ... all fields the component needs
}
}
`);
```
2. **Use `usePresentationQuery` in your component:**
```typescript
'use client'
import { usePresentationQuery } from 'next-sanity/hooks'
import { HERO_PRESENTATION_QUERY } from '@/sanity/lib/queries'
type HeroProps = {
_key: string
documentId: string
// ... initial props from page query
}
export function Hero({ _key, documentId, ...initialProps }: HeroProps) {
// Fetch block-specific data for faster updates
const { data } = usePresentationQuery({
query: HERO_PRESENTATION_QUERY,
params: { documentId, blockKey: _key },
})
// Use presentation data if available, fallback to initial props
const blockData = data?.heroBlock || initialProps
return (
<section>
<h1>{blockData.title}</h1>
{/* ... */}
</section>
)
}
```
### Why This Is Faster
- **Without:** Editing a field triggers a full page re-render with all blocks
- **With:** Only the specific block re-renders with its targeted query
This pattern is especially valuable for pages with many blocks or complex nested data.
**Note:** See `nextjs.md` for more details on `usePresentationQuery` and `visual-editing.md` for the conceptual overview.
## 6. Page Builder Pitfalls
| Pitfall | Solution |
| ------------------------- | ------------------------------------------------------------ |
| Too many block variations | Split into separate blocks if >2 variants |
| Paradox of choice | Limit blocks per document type |
| Overusing references | Default to objects; references only for truly shared content |
| Unused blocks accumulate | Prune regularly; see deprecation patterns |
| Inconsistent previews | Always set title, subtitle (block name), and media/icon |
## 7. Component Alignment Pattern
Map Sanity "alignment" fields (usually string/select) to CSS classes using utility functions.
**Schema:**
```typescript
defineField({
name: "align",
type: "string",
options: { list: ["left", "center", "right"], layout: "radio" },
});
```
**Implementation (Utility):**
```typescript
import { stegaClean } from "@sanity/client/stega";
export function getTextAlign(align?: string) {
// CLEAN the value before switching!
switch (stegaClean(align)) {
case "left":
return "text-left";
case "right":
return "text-right";
default:
return "text-center";
}
}
```
## 8. Semantic Heading Levels
**Rule:** Do NOT store heading levels (h1, h2) in Sanity schema options. Determine them dynamically in the frontend to ensure accessibility.
**Bad Schema:**
```typescript
// Don't do this
{ name: 'level', type: 'string', options: { list: ['h1', 'h2'] } }
```
**Good Component:**
Pass a `semanticLevel` prop based on the component's context/nesting.
```typescript
type Props = {
block: HeroBlock;
level?: 'h1' | 'h2' | 'h3'; // Default to h2 if undefined
}
export default function Section({ block, level = 'h2' }: Props) {
const Tag = level;
return <Tag>{block.title}</Tag>;
}
```
_Note: For Image patterns, see `image.md`. For Portable Text patterns, see `portable-text.md`._
@@ -0,0 +1,384 @@
---
title: "Sanity Portable Text Rules"
description: Portable Text (Rich Text) rendering and custom component creation for React/Next.js.
---
# Sanity Portable Text Rules
Portable Text is Sanity's rich text format, used for content like article bodies (`body[]`). This guide covers rendering and creating custom PTE components.
**Note:** For page-level layout blocks (`pageBuilder[]`), see `page-builder.md`.
## 1. The Component
Use the `PortableText` component from `next-sanity` (or `@portabletext/react`).
```typescript
import { PortableText } from "next-sanity";
// or import { PortableText } from "@portabletext/react";
export function Content({ value }: { value: any }) {
return <PortableText value={value} components={components} />;
}
```
## 2. Custom Components (`components` prop)
**Always** define a typed components object to handle custom blocks, marks, and list styles.
```typescript
import { PortableTextComponents } from "next-sanity";
const components: PortableTextComponents = {
// 1. Block styles (paragraphs, headings)
block: {
h1: ({ children }) => <h1 className="text-4xl font-bold">{children}</h1>,
h2: ({ children }) => <h2 className="text-3xl font-bold">{children}</h2>,
blockquote: ({ children }) => <blockquote className="border-l-4 pl-4">{children}</blockquote>,
},
// 2. Custom types (non-text blocks like images, videos)
types: {
image: ({ value }) => <SanityImage value={value} />,
callToAction: ({ value }) => <Button href={value.url}>{value.text}</Button>,
},
// 3. Marks (inline decorators and annotations)
marks: {
strong: ({ children }) => <strong className="font-bold">{children}</strong>,
em: ({ children }) => <em className="italic">{children}</em>,
link: ({ children, value }) => {
const rel = !value.href.startsWith("/") ? "noreferrer noopener" : undefined;
return <a href={value.href} rel={rel} className="underline text-blue-600">{children}</a>;
},
},
// 4. Lists
list: {
bullet: ({ children }) => <ul className="list-disc ml-4">{children}</ul>,
number: ({ children }) => <ol className="list-decimal ml-4">{children}</ol>,
},
};
```
## 3. Component Categories
Portable Text has three types of custom components, each with different patterns:
| Type | Examples | Pattern |
| ---------------- | -------------------------- | --------------------------------- |
| **Block styles** | h1, h2, blockquote, normal | Text blocks with `children` prop |
| **Custom types** | image, video, callToAction | Non-text blocks with `value` prop |
| **Marks** | link, strong, productRef | Inline annotations wrapping text |
## 4. Creating Block Style Components
Block styles are text blocks like headings and paragraphs. For simple styling, inline components work fine:
```typescript
block: {
h2: ({ children }) => <h2 className="mt-8 mb-4 text-3xl font-bold">{children}</h2>,
normal: ({ children }) => <p className="mb-4 leading-relaxed">{children}</p>,
}
```
### With Visual Editing Support
For live editing in the Presentation Tool, block style components may need **both** a client and server version:
```typescript
// Heading2.tsx (Server - simple SSR for production)
export function Heading2({ children }: { children: React.ReactNode }) {
return <h2 className="mt-8 mb-4 text-3xl font-bold">{children}</h2>;
}
// Heading2Client.tsx (Client - for visual editing context)
'use client'
export function Heading2Client({ children, value }: { children: React.ReactNode; value: any }) {
// Can access block data via `value` for advanced patterns
return <h2 className="mt-8 mb-4 text-3xl font-bold">{children}</h2>;
}
```
Use `useIsPresentationTool` to conditionally render the client version:
```typescript
import { useIsPresentationTool } from 'next-sanity/hooks'
function Heading2Wrapper(props) {
const isPresentationTool = useIsPresentationTool()
if (isPresentationTool) {
return <Heading2Client {...props} />
}
return <Heading2 {...props} />
}
```
## 5. Creating Custom Type Components
Custom types are non-text blocks like images, videos, or CTAs embedded in rich text.
### Schema Definition
```typescript
// schemaTypes/blocks/pteImageBlock.ts
import { defineField, defineType } from "sanity";
export const pteImageBlock = defineType({
name: "pteImage",
title: "Image",
type: "object",
fields: [
defineField({ name: "image", type: "image", options: { hotspot: true } }),
defineField({ name: "caption", type: "string" }),
defineField({
name: "alt",
type: "string",
validation: (r) => r.required(),
}),
],
preview: {
select: { title: "caption", media: "image" },
},
});
```
### Register in Body Schema
```typescript
defineField({
name: "body",
type: "array",
of: [
{ type: "block" }, // Standard text
{ type: "pteImage" }, // Custom image block
{ type: "pteVideo" }, // Custom video block
],
});
```
### Frontend Component
```typescript
// PteImageComponent.tsx
'use client'
type PteImageProps = {
value: {
_key: string
image: any
caption?: string
alt: string
}
}
export function PteImageComponent({ value }: PteImageProps) {
if (!value.image) return null
return (
<figure className="my-8">
<SanityImage value={value.image} alt={value.alt} />
{value.caption && (
<figcaption className="text-sm text-gray-600 mt-2">{value.caption}</figcaption>
)}
</figure>
)
}
// Register in components
const components: PortableTextComponents = {
types: {
pteImage: PteImageComponent,
},
}
```
## 6. Creating Mark Components
Marks are inline annotations that wrap text—links, highlights, or custom references.
### Schema Definition (Annotation)
```typescript
// In your block configuration
defineField({
name: "body",
type: "array",
of: [
{
type: "block",
marks: {
decorators: [
{ title: "Strong", value: "strong" },
{ title: "Emphasis", value: "em" },
{ title: "Highlight", value: "highlight" },
],
annotations: [
{
name: "link",
type: "object",
title: "Link",
fields: [
{ name: "href", type: "url", title: "URL" },
{
name: "openInNewTab",
type: "boolean",
title: "Open in new tab",
},
],
},
{
name: "productRef",
type: "object",
title: "Product Reference",
fields: [
{ name: "product", type: "reference", to: [{ type: "product" }] },
],
},
],
},
},
],
});
```
### Frontend Component
```typescript
// LinkMark.tsx
type LinkMarkProps = {
children: React.ReactNode
value: {
href: string
openInNewTab?: boolean
}
}
export function LinkMark({ children, value }: LinkMarkProps) {
const { href, openInNewTab } = value
const target = openInNewTab ? '_blank' : undefined
const rel = openInNewTab ? 'noopener noreferrer' : undefined
return (
<a href={href} target={target} rel={rel} className="text-blue-600 underline">
{children}
</a>
)
}
// Register in components
const components: PortableTextComponents = {
marks: {
link: LinkMark,
highlight: ({ children }) => <mark className="bg-yellow-200">{children}</mark>,
},
}
```
## 7. Presentation Queries for PTE Blocks
For faster live editing of custom PTE blocks, use presentation queries that fetch only the specific block:
```typescript
// queries.ts
export const PTE_IMAGE_PRESENTATION_QUERY = defineQuery(`
*[_id == $documentId][0]{
_id,
_type,
"pteImageBlock": body[_key == $blockKey && _type == "pteImage"][0]{
_key,
image,
caption,
alt
}
}
`);
```
Then in your component:
```typescript
"use client";
import { usePresentationQuery } from "next-sanity/hooks";
export function PteImageComponent({
value,
documentId,
}: {
value: any;
documentId?: string;
}) {
const { data } = usePresentationQuery({
query: PTE_IMAGE_PRESENTATION_QUERY,
params: { documentId, blockKey: value._key },
});
const blockData = data?.pteImageBlock || value;
// ... render with blockData
}
```
**Note:** You'll need to pass `documentId` through to your PTE components. See `visual-editing.md` for context patterns.
## 8. GROQ Fragment for PTE
When querying documents with Portable Text, expand custom blocks:
```groq
*[_type == "article" && slug.current == $slug][0]{
...,
body[]{
...,
_type == "pteImage" => {
...,
"imageUrl": image.asset->url
},
_type == "pteVideo" => {
...,
video->{ title, url }
}
}
}
```
## 9. Stega and Visual Editing
When Visual Editing is enabled, text content contains invisible stega characters for click-to-edit functionality.
**For text rendering:** Let stega characters pass through—they enable overlays:
```typescript
// Good - stega preserved for click-to-edit
<h2>{children}</h2>
```
**For logic/comparisons:** Clean the values first:
```typescript
import { stegaClean } from '@sanity/client/stega'
// Clean before using in logic
const cleanedStyle = stegaClean(block.style)
if (cleanedStyle === 'h2') { ... }
```
## 10. Type Safety
When using TypeGen, the Portable Text value usually has a complex generated type. You can often use `any` or `PortableTextBlock[]` for the _prop_, but cast specific blocks if needed.
```typescript
import { PortableTextBlock } from "next-sanity";
type Props = {
value: PortableTextBlock[];
};
```
## 11. Best Practices
- **Tailwind Typography:** For simple blogs, wrap `<PortableText />` in a `<div className="prose">` (from `@tailwindcss/typography`) instead of manually styling every block.
- **Handling Nulls:** Always check if `value` exists and is an array before rendering.
- **Keys:** The `PortableText` component handles React keys automatically using the `_key` from Sanity. Do not add keys manually.
- **Separate from Page Builder:** PTE blocks live in `body[]` (rich text fields), not `pageBuilder[]` (page layout). Keep these patterns separate.
@@ -0,0 +1,98 @@
---
title: Sanity Project Structure
description: Project structure patterns for Sanity projects including standalone Studio and monorepo setups.
---
# Sanity Project Structure
## Standalone Studio
Best for content-only projects, API-first architectures, or when frontend is managed separately.
```
your-project/
├── schemaTypes/
│ ├── index.ts
│ ├── documents/
│ ├── objects/
│ └── blocks/
├── sanity.config.ts
├── sanity.cli.ts
└── package.json
```
**Use cases:**
- Content modeling with MCP/AI tools (no frontend needed)
- Headless CMS with external consumers
- Prototyping and content design
## Monorepo (Recommended with a frontend)
Best for most projects pairing Sanity with a Next.js (or other framework) app. The Studio stays standalone — Vite-based dev/builds, auto-updates, TypeGen watch mode — while living in the same repo as the frontend.
```
your-project/
├── studio/ # Sanity Studio (standalone)
│ ├── schemaTypes/
│ │ ├── index.ts
│ │ ├── documents/
│ │ ├── objects/
│ │ └── blocks/
│ ├── sanity.config.ts
│ ├── sanity.cli.ts # CLI + TypeGen configuration
│ └── package.json
└── web/ # Next.js (or other framework)
├── src/
│ ├── app/
│ └── sanity/
│ ├── client.ts
│ ├── live.ts # defineLive setup
│ └── queries.ts
├── sanity.types.ts # Generated types (from TypeGen)
└── package.json
```
No workspace tooling is required — each app manages its own dependencies. For larger repos, the same shape works under `apps/` with npm or pnpm workspaces.
**Setup:**
1. Add the web app URL to CORS origins: `npx sanity cors add http://localhost:3000 --credentials` (or via [Sanity Manage](https://www.sanity.io/manage))
2. Configure `typegen` in `studio/sanity.cli.ts` to read queries from `../web` and output types to `../web/sanity.types.ts` (see `typegen.md`)
3. Optionally add a root `package.json` with scripts that run both dev servers
## Embedded Studio (Legacy — Not Recommended)
Older Next.js projects may mount the Studio inside the app at `src/app/studio/[[...tool]]/page.tsx`, with `sanity.config.ts` in the app root. This still works but is no longer recommended: it slows builds, ties Studio updates to app deploys, and rules out auto-updates and TypeGen watch mode. See `nextjs.md` for the rationale and migration steps.
## File Naming Conventions
- **kebab-case** for all files: `user-profile.ts`, `hero-block.ts`
- `.ts` for schemas/utilities, `.tsx` for React components
- Each schema exports a named const matching filename
## Schema Directory Structure
```
schemaTypes/
├── index.ts # Exports all types
├── documents/ # Standalone content types
│ ├── post.ts
│ └── author.ts
├── objects/ # Embeddable/reusable types
│ ├── seo.ts
│ └── link.ts
├── blocks/ # Portable Text blocks
│ ├── hero.ts
│ └── callout.ts
└── shared/ # Shared field definitions
└── seoFields.ts
```
## Key Files
| File | Purpose |
| ------------------ | ------------------------------------------------------- |
| `sanity.config.ts` | Studio configuration (plugins, schema, structure) |
| `sanity.cli.ts` | CLI configuration (project ID, dataset, TypeGen config) |
| `structure.ts` | Custom desk structure |
@@ -0,0 +1,276 @@
---
title: React Router (Remix) & Sanity Integration Rules
description: Integration guide for React Router v7 (and Remix v2) with Sanity, including loaders and visual editing.
---
# React Router (Remix) & Sanity Integration Rules
## Version Note
The primary examples below use **React Router v7** (the current shape — Remix v2 was renamed to React Router v7 starting with the v7 release). Import paths and the route-types file (`./+types/<route>`) come from the `react-router` package and the framework's typegen.
If you are on the older **Remix v2** stack, the integration shape is identical; only the import paths differ:
| React Router v7 | Remix v2 |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `react-router` | `@remix-run/node` / `@remix-run/react` |
| `import type { Route } from "./+types/<route>"` | `import type { LoaderFunctionArgs } from "@remix-run/node"` + `useLoaderData<typeof loader>()` |
| `react-router.config.ts` | `remix.config.js` |
## 1. Setup & Client Pattern
### Scaffold a new React Router v7 app
```bash
npx create-react-router@latest my-app -y
cd my-app
npm install @sanity/client @sanity/react-loader @sanity/visual-editing @portabletext/react groq
```
`-y` accepts defaults. The Sanity packages cover server loaders (`@sanity/react-loader`, `@sanity/client`), live preview (`@sanity/visual-editing`), Portable Text rendering (`@portabletext/react`), and typed queries (`groq`).
To support both server-side fetching and client-side live previews, use the **Split Loader Pattern**.
### A. Environment Variables
React Router runs on Vite. **Any module reachable from a route component gets bundled into the client** — `process.env` doesn't exist there and will throw `ReferenceError: process is not defined` on client-side route transitions (SSR will still work, which makes this trap easy to miss).
Split publishable values from secrets:
- **Publishable** (`projectId`, `dataset`, `apiVersion`, `studioUrl`): prefix with `VITE_` and read via `import.meta.env`. Safe to import from anywhere.
- **Secrets** (read tokens, webhook secrets): keep unprefixed and read via `process.env` **only inside `*.server.ts` files**. Never re-export them from a shared module.
`.env`:
```
VITE_SANITY_PROJECT_ID=your-project-id
VITE_SANITY_DATASET=production
VITE_SANITY_API_VERSION=2026-02-01
VITE_SANITY_STUDIO_URL=http://localhost:3333
SANITY_API_READ_TOKEN=your-read-token
```
`app/sanity/env.ts` — browser-safe, publishable values only:
```typescript
export const projectId = import.meta.env.VITE_SANITY_PROJECT_ID!;
export const dataset = import.meta.env.VITE_SANITY_DATASET!;
export const apiVersion =
import.meta.env.VITE_SANITY_API_VERSION ?? "2026-02-01";
export const studioUrl = import.meta.env.VITE_SANITY_STUDIO_URL;
```
### B. Shared Loader (`app/sanity/loader.ts`)
Defines the store config (SSR enabled, client deferred).
```typescript
import { createQueryStore } from "@sanity/react-loader";
export const { loadQuery, setServerClient, useQuery, useLiveMode } =
createQueryStore({ client: false, ssr: true });
```
### C. Server Loader (`app/sanity/loader.server.ts`)
Initializes the server client. Read the token directly from `process.env` here — do **not** import it from `env.ts`, or it will leak into the client bundle the moment any client-reachable module touches `env.ts`.
```typescript
import { createClient } from "@sanity/client";
import { apiVersion, dataset, projectId, studioUrl } from "./env";
import { loadQuery, setServerClient } from "./loader";
const client = createClient({
projectId,
dataset,
apiVersion,
useCdn: true,
token: process.env.SANITY_API_READ_TOKEN,
stega: {
// Stega encodes invisible markers into string fields for click-to-edit
// overlays in the Presentation tool. Those markers can leak into copy/paste,
// screen readers, and some downstream renderers, so only enable when actually
// previewing — gate on an env var that's only set in preview environments.
enabled: Boolean(studioUrl),
studioUrl,
},
});
setServerClient(client);
export { loadQuery };
```
### D. Browser-safe Client + Image URL Builder (`app/sanity/client.ts`, `app/sanity/image.ts`)
Anything used by a route component runs in the browser too. Build a separate publishable-only client for things like the image URL builder:
```typescript
// app/sanity/client.ts
import { createClient } from "@sanity/client";
import { apiVersion, dataset, projectId } from "./env";
export const client = createClient({
projectId,
dataset,
apiVersion,
useCdn: true,
});
```
```typescript
// app/sanity/image.ts
import imageUrlBuilder from "@sanity/image-url";
import { client } from "./client";
const builder = imageUrlBuilder(client);
export const urlFor = (source: Parameters<typeof builder.image>[0]) =>
builder.image(source);
```
Install `@sanity/image-url` if you'll render images:
```bash
npm install @sanity/image-url
```
### E. Queries (`app/sanity/queries.ts`)
Keep query definitions in one place so route loaders, components, and TypeGen all read the same source.
```typescript
import { defineQuery } from "groq";
export const POSTS_QUERY = defineQuery(
`*[_type == "post" && defined(slug.current)] | order(_createdAt desc){
_id, title, slug
}`,
);
export const POST_QUERY = defineQuery(
`*[_type == "post" && slug.current == $slug][0]{
_id, title, body, image
}`,
);
```
## 2. Data Fetching (Loaders)
Use `loadQuery` from your **server** file in route loaders. Import the generated `Route` type from `./+types/<route>` — React Router writes one type module per route file.
```typescript
// app/routes/home.tsx
import { loadQuery } from "~/sanity/loader.server";
import { POSTS_QUERY } from "~/sanity/queries";
import type { Route } from "./+types/home";
export async function loader() {
const initial = await loadQuery(POSTS_QUERY, {});
return { initial, query: POSTS_QUERY, params: {} };
}
export default function Home({ loaderData }: Route.ComponentProps) {
const { initial } = loaderData;
// …pass to component
}
```
For Remix v2: replace `Route.ComponentProps` / `Route.LoaderArgs` with `useLoaderData<typeof loader>()` and `LoaderFunctionArgs` from `@remix-run/node`.
## 3. Dynamic Routes (`:slug`)
Register the dynamic route in `app/routes.ts`:
```typescript
import { type RouteConfig, index, route } from "@react-router/dev/routes";
export default [
index("routes/home.tsx"),
route(":slug", "routes/post.tsx"),
] satisfies RouteConfig;
```
Then in `app/routes/post.tsx`:
```typescript
import type { Route } from "./+types/post";
import { PortableText } from "@portabletext/react";
import { loadQuery } from "~/sanity/loader.server";
import { useQuery } from "~/sanity/loader";
import { urlFor } from "~/sanity/image";
import { POST_QUERY } from "~/sanity/queries";
export async function loader({ params }: Route.LoaderArgs) {
const initial = await loadQuery(POST_QUERY, { slug: params.slug });
return { initial, query: POST_QUERY, params: { slug: params.slug } };
}
export default function Post({ loaderData }: Route.ComponentProps) {
const { initial, query, params } = loaderData;
const { data: post } = useQuery(query, params, { initial });
return (
<article>
<h1>{post?.title}</h1>
{post?.image && (
<img src={urlFor(post.image).width(1200).url()} alt={post.title ?? ""} />
)}
{post?.body && <PortableText value={post.body} />}
</article>
);
}
```
This route is the canonical shape that exposes the env trap: `urlFor` → `client.ts` → `env.ts`. If `env.ts` reads `process.env`, the route works under SSR (curl returns HTML) but the client-side `<Link>` navigation will throw `ReferenceError: process is not defined` in the browser console and React Router will hard-reload back to `/`.
## 4. Real-time Preview & Visual Editing
### A. Use `useQuery` in Components
Import `useQuery` from your **shared** loader file.
```typescript
import { useQuery } from "~/sanity/loader";
export default function Page({ loaderData }: Route.ComponentProps) {
const { initial, query, params } = loaderData;
const { data, encodeDataAttribute } = useQuery(query, params, { initial });
return (
<h1 data-sanity={encodeDataAttribute("title")}>
{data?.title}
</h1>
);
}
```
### B. Enable Live Mode (`VisualEditing.tsx`)
Create a component to handle the connection.
```typescript
import { enableVisualEditing } from "@sanity/visual-editing";
// Your browser-safe client
import { useEffect } from "react";
import { client } from "~/sanity/client";
import { useLiveMode } from "~/sanity/loader";
export default function VisualEditing() {
useEffect(() => enableVisualEditing(), []);
useLiveMode({ client });
return null;
}
```
Render this component in `root.tsx` only when valid (e.g., check env vars or user session).
## 5. Stega Cleaning
When using data for logic (routing, classNames), use `stegaClean`.
```typescript
import { stegaClean } from "@sanity/client/stega"
// ...
if (stegaClean(slug) === 'home') { ... }
```
@@ -0,0 +1,445 @@
---
title: Sanity Schema Best Practices
description: Rules for defining Sanity Content Models (Schemas), including field definitions, strict typing, and validation patterns.
---
# Sanity Schema Best Practices
Use this contents list to jump to the schema design decision you are making.
## Table of Contents
- Core philosophy: data over presentation
- Strict definition syntax
- Shared fields pattern
- Field patterns
- References vs nested objects
- Document creation and IDs
- Safe schema updates
- Validation patterns
## 1. Core Philosophy: Data > Presentation
Model **what things are**, not **what they look like**.
- ❌ **Bad:** `bigHeroText`, `redButton`, `threeColumnRow`, `color`, `fontSize`
- ✅ **Good:** `heroStatement`, `callToAction`, `featuresSection`, `status`, `role`
**The test:** "If we redesigned the site, would this field name still make sense?"
- `threeColumnLayout` → ❌ Fails (what if we go to 2 columns?)
- `features` → ✅ Passes (features are features regardless of layout)
## 2. Strict Definition Syntax
Always use the helper functions from `sanity` for type safety and autocompletion.
- **ALWAYS** use `defineType` for the root export.
- **ALWAYS** use `defineField` for fields.
- **ALWAYS** use `defineArrayMember` for items inside arrays.
```typescript
import { TagIcon } from "@sanity/icons";
import { defineArrayMember, defineField, defineType } from "sanity";
export const article = defineType({
name: "article",
title: "Article",
type: "document",
icon: TagIcon,
fields: [
defineField({
name: "title",
type: "string",
validation: (rule) => rule.required(),
}),
defineField({
name: "tags",
type: "array",
of: [
// ALWAYS use defineArrayMember for array items
defineArrayMember({ type: "reference", to: [{ type: "tag" }] }),
],
}),
],
});
```
## 3. Shared Fields Pattern
Export arrays of fields to reuse common patterns (e.g., SEO, standard page headers).
```typescript
// src/schemaTypes/shared/seoFields.ts
export const seoFields = [
defineField({ name: "seoTitle", type: "string", title: "SEO Title" }),
defineField({ name: "seoDesc", type: "text", title: "SEO Description" }),
];
// Usage
defineType({
name: "page",
fields: [
defineField({ name: "title", type: "string" }),
...seoFields, // Spread shared fields
],
});
```
## 4. Field Patterns
### A. Array Keys (`_key`)
Every item in a Sanity array automatically gets a `_key` property. This is **critical** for:
- React reconciliation (use as `key` prop)
- Visual Editing overlays (click-to-edit)
- Portable Text rendering
**Schema:** Sanity auto-generates `_key` for array items. You don't define it.
**Frontend:** Always use `_key` as React's `key`:
```typescript
// ✅ Correct
{items.map((item) => <Component key={item._key} {...item} />)}
// ❌ Wrong - index keys break Visual Editing
{items.map((item, i) => <Component key={i} {...item} />)}
```
**Querying:** Always include `_key` in array projections:
```groq
*[_type == "page"][0]{
pageBuilder[]{
_key, // Always include _key in queries
_type,
...
}
}
```
### B. Icons
Always assign an icon from `@sanity/icons` to documents and objects. This improves the Studio UX significantly. Browse all icons at [icons.sanity.build](https://icons.sanity.build/all).
| Content Type | Icon |
| -------------- | ------------------ |
| Article, Post | `DocumentTextIcon` |
| Author, Person | `UserIcon` |
| Category, Tag | `TagIcon` |
| Settings | `CogIcon` |
| Page | `DocumentIcon` |
| Image block | `ImageIcon` |
| Video block | `PlayIcon` |
| FAQ | `HelpCircleIcon` |
| Link | `LinkIcon` |
### C. Boolean vs. List
Avoid boolean fields for binary states that might expand later.
- **Prefer:** `options.list` with "radio" layout.
```typescript
defineField({
name: "status",
type: "string",
options: {
list: [
{ title: "Draft", value: "draft" },
{ title: "Published", value: "published" },
],
layout: "radio",
},
});
```
### D. The "Toggle" Pattern (Conditional Fields)
Use a radio/boolean field to toggle visibility of other fields (often grouped in fieldsets).
```typescript
(defineField({
name: "linkType",
type: "string",
options: { list: ["internal", "external"], layout: "radio" },
}),
defineField({
name: "internalLink",
type: "reference",
hidden: ({ parent }) => parent?.linkType !== "internal",
}),
defineField({
name: "externalUrl",
type: "url",
hidden: ({ parent }) => parent?.linkType !== "external",
}));
```
## 5. References vs Nested Objects
A **critical modeling decision**: when to use `reference` vs embedding an `object`.
### Use References When:
- Content is **reusable** across documents (authors, categories, products)
- Content needs its **own editing interface** in Studio
- You need to query/filter by the related content independently
- Multiple documents should share the **same instance** (update once, reflect everywhere)
```typescript
// ✅ Author is reusable and independently editable
defineField({
name: "author",
type: "reference",
to: [{ type: "author" }],
});
```
### Use Nested Objects When:
- Content is **specific to this document** (not shared)
- Content doesn't make sense on its own (address, SEO metadata)
- You want **simpler editing** (all fields in one place)
- You need the data to be **copied** not linked
```typescript
// ✅ SEO is document-specific, not shared
defineField({
name: "seo",
type: "object",
fields: [
defineField({ name: "title", type: "string" }),
defineField({ name: "description", type: "text" }),
],
});
```
### Quick Decision Matrix
| Scenario | Use |
| ------------------------- | ------------------------------------- |
| Blog post author | `reference` (reusable) |
| Product category | `reference` (shared taxonomy) |
| Page SEO fields | `object` (page-specific) |
| Hero section content | `object` (page-specific) |
| Team member on About page | `reference` (might be used elsewhere) |
| Call-to-action button | `object` (usually page-specific) |
### Querying Differences
```groq
// Reference requires expansion
*[_type == "post"]{ author->{ name, bio } }
// Object is already inline
*[_type == "post"]{ seo { title, description } }
```
## 6. Document Creation and IDs
Sanity document `_id` values are implementation identifiers, not a content modeling tool.
- **Prefer generated IDs:** Let Sanity assign `_id` values for ordinary content documents. Avoid deterministic UUIDs, slug-derived IDs, and IDs copied from legacy systems.
- **Use relationships, not ID conventions:** Connect documents with `reference` fields and set `_ref` from an actual lookup or from the `_id` returned after creating the related document.
- **Store source identity as content:** For imports, put legacy IDs, external IDs, or stable slugs in explicit fields such as `legacyId`, `externalId`, or `slug`, then query by those fields when you need to find or upsert content.
- **Keep explicit IDs rare:** Directly setting `_id` is mainly useful for singleton documents managed through Studio Structure, such as `settings` or localized singletons like `homePage-en`.
```typescript
// ✅ Correct - relationship comes from a lookup
import { defineQuery } from "groq";
const AUTHOR_BY_EXTERNAL_ID_QUERY = defineQuery(`
*[_type == "author" && externalId == $externalId][0]{_id}
`);
const author = await client.fetch(AUTHOR_BY_EXTERNAL_ID_QUERY, {
externalId: post.authorId,
});
if (!author?._id) throw new Error(`Missing author for ${post.authorId}`);
await client.create({
_type: "post",
title: post.title,
slug: { _type: "slug", current: post.slug },
legacyId: post.id,
author: { _type: "reference", _ref: author._id },
});
// ❌ Wrong - IDs encode relationships and source data
await client.createOrReplace({
_id: `post-${post.id}`,
_type: "post",
author: { _type: "reference", _ref: `author-${post.authorId}` },
});
```
## 7. Safe Schema Updates (The Deprecation Pattern)
**NEVER** delete a field that contains production data. It will cause data loss or Studio crashes. Instead, follow the **ReadOnly -> Hidden -> Deprecated** lifecycle.
### The Pattern
1. **`deprecated`**: Adds a visual warning and reason.
2. **`readOnly: true`**: Prevents new edits but keeps data visible.
3. **`hidden`**: Hides it from _new_ documents (where value is undefined).
4. **`initialValue: undefined`**: Ensures new documents don't get this field.
```typescript
defineField({
name: "oldTitle", // The field you want to remove
title: "Article Title (Deprecated)",
type: "string",
deprecated: {
reason: 'Use the new "seoTitle" field instead. This will be removed in v2.',
},
readOnly: true,
hidden: ({ value }) => value === undefined,
initialValue: undefined,
});
```
### Migration Workflow
**Phase 1: Deprecate** — Apply the deprecation pattern above. Deploy.
**Phase 2: Migrate** — Update frontend to use new fields (with `coalesce()` fallbacks). Create a migration:
```typescript
// migrations/rename-oldTitle-to-newTitle/index.ts
import { at, defineMigration, setIfMissing, unset } from "sanity/migrate";
export default defineMigration({
title: "Rename oldTitle to newTitle",
documentTypes: ["article"],
filter: "defined(oldTitle) && !defined(newTitle)",
migrate: {
document(doc) {
if (!doc.oldTitle || doc.newTitle) return;
return [
at("newTitle", setIfMissing(doc.oldTitle)),
at("oldTitle", unset()),
];
},
},
});
```
```bash
# Dry run first (default)
sanity migration run rename-oldTitle-to-newTitle
# Execute when ready
sanity migration run rename-oldTitle-to-newTitle --no-dry-run
```
**Phase 3: Remove** — Once `oldTitle` is undefined for all documents, delete the field definition.
## 8. Validation Patterns
Beyond `rule.required()`, Sanity offers powerful validation options.
### Common Patterns
```typescript
// Email validation
defineField({
name: "email",
type: "string",
validation: (rule) => rule.email().required(),
});
// URL validation (with custom message)
defineField({
name: "website",
type: "url",
validation: (rule) =>
rule
.uri({
scheme: ["http", "https"],
})
.error("Must be a valid URL starting with http:// or https://"),
});
// Length constraints
defineField({
name: "excerpt",
type: "text",
validation: (rule) =>
rule.max(200).warning("Keep it under 200 characters for best SEO"),
});
// Regex pattern
defineField({
name: "slug",
type: "slug",
validation: (rule) =>
rule.required().custom((slug) => {
if (!slug?.current) return "Required";
if (!/^[a-z0-9-]+$/.test(slug.current)) {
return "Slug must be lowercase with hyphens only";
}
return true;
}),
});
```
### Cross-Field Validation
```typescript
defineField({
name: "endDate",
type: "datetime",
validation: (rule) =>
rule.custom((endDate, context) => {
const startDate = context.document?.startDate;
if (startDate && endDate && new Date(endDate) < new Date(startDate)) {
return "End date must be after start date";
}
return true;
}),
});
```
### Array Validation
```typescript
defineField({
name: "tags",
type: "array",
of: [{ type: "string" }],
validation: (rule) =>
rule
.min(1)
.error("Add at least one tag")
.max(10)
.warning("Too many tags may hurt SEO")
.unique(),
});
```
### Async Validation (Uniqueness Check)
```typescript
defineField({
name: "slug",
type: "slug",
validation: (rule) =>
rule.required().custom(async (slug, context) => {
if (!slug?.current) return true;
const client = context.getClient({ apiVersion: "2026-02-01" });
const id = context.document?._id?.replace(/^drafts\./, "");
const existing = await client.fetch(
`count(*[_type == "post" && slug.current == $slug && _id != $id])`,
{ slug: slug.current, id },
);
return existing === 0 || "Slug already exists";
}),
});
```
@@ -0,0 +1,340 @@
---
title: Sanity SEO Best Practices
description: SEO best practices for Sanity with Next.js, including metadata, Open Graph, sitemaps, redirects, and JSON-LD structured data.
---
# Sanity SEO Best Practices
## 1. Core Philosophy
SEO doesn't require complex configurations. A few core principles, applied consistently:
- **Smart defaults with optional overrides** — Don't require SEO fields; use existing content as fallback
- **Use GROQ for fallback logic** — Move conditional logic into queries, not components
- **Leverage Next.js APIs** — Use `generateMetadata`, `sitemap.ts`, not manual `<meta>` tags
- **Structured content = structured data** — Your content model is already SEO-ready
## 2. SEO Schema Type (Reusable)
Create a reusable SEO object type for consistent metadata across document types.
```typescript
// schemaTypes/seoType.ts
import { defineField, defineType } from "sanity";
export const seoType = defineType({
name: "seo",
title: "SEO",
type: "object",
fields: [
defineField({
name: "title",
description: "Overrides the page title if provided",
type: "string",
}),
defineField({
name: "description",
type: "text",
rows: 3,
}),
defineField({
name: "image",
description: "Image for social sharing (1200x630 recommended)",
type: "image",
options: { hotspot: true },
}),
defineField({
name: "noIndex",
description: "Hide this page from search engines",
type: "boolean",
initialValue: false,
}),
],
});
```
**Usage in document types:**
```typescript
defineField({
name: "seo",
type: "seo",
});
```
## 3. GROQ Queries with Fallbacks
Use `coalesce()` to provide fallback values. This keeps frontend logic clean.
```groq
*[_type == "page" && slug.current == $slug][0]{
...,
"seo": {
// Use SEO field if provided, otherwise fall back to main title
"title": coalesce(seo.title, title, ""),
"description": coalesce(seo.description, ""),
"image": seo.image,
"noIndex": seo.noIndex == true
}
}
```
**Key principle:** `seo.title` will never be `null` — it contains either the SEO override, the page title, or empty string.
## 4. Next.js Metadata (The Right Way)
Use `generateMetadata` — never render `<title>` or `<meta>` tags directly in components.
```typescript
// app/(frontend)/[slug]/page.tsx
import type { Metadata } from "next";
import { urlFor } from "@/sanity/lib/image";
type RouteProps = {
params: Promise<{ slug: string }>;
};
// Extract fetch to reuse in both functions
const getPage = async (params: RouteProps["params"]) =>
sanityFetch({
query: PAGE_QUERY,
params: await params,
stega: false, // Critical for SEO!
});
export async function generateMetadata({
params,
}: RouteProps): Promise<Metadata> {
const { data: page } = await getPage(params);
if (!page) return {};
const metadata: Metadata = {
title: page.seo.title,
description: page.seo.description,
};
// Open Graph image
if (page.seo.image) {
metadata.openGraph = {
images: {
url: urlFor(page.seo.image).width(1200).height(630).url(),
width: 1200,
height: 630,
},
};
}
// noIndex robots directive
if (page.seo.noIndex) {
metadata.robots = "noindex";
}
return metadata;
}
export default async function Page({ params }: RouteProps) {
const { data: page } = await getPage(params);
// ... render page
}
```
**Critical:** Always set `stega: false` when fetching for metadata. Stega characters in `<title>` destroy SEO.
## 5. Dynamic Sitemap
Use Next.js `sitemap.ts` convention to auto-generate from Sanity content.
### GROQ Query
```groq
*[_type in ["page", "post"] && defined(slug.current) && seo.noIndex != true] {
"href": select(
_type == "page" => "/" + slug.current,
_type == "post" => "/posts/" + slug.current,
slug.current
),
_updatedAt
}
```
### Route Implementation
```typescript
// app/sitemap.ts
import { MetadataRoute } from "next";
import { client } from "@/sanity/lib/client";
import { SITEMAP_QUERY } from "@/sanity/lib/queries";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: "http://localhost:3000";
try {
const paths = await client.fetch(SITEMAP_QUERY);
if (!paths) return [];
return paths.map((path) => ({
url: new URL(path.href!, baseUrl).toString(),
lastModified: new Date(path._updatedAt),
changeFrequency: "weekly",
priority: 1,
}));
} catch (error) {
console.error("Sitemap generation failed:", error);
return [];
}
}
```
**Note:** Sitemap limit is 50,000 URLs per file. For larger sites, use sitemap index.
## 6. Redirects (Managed in Sanity)
Create a redirect document type for content team management.
### Schema
```typescript
// schemaTypes/redirectType.ts
import { LinkIcon } from "@sanity/icons";
import { SanityDocumentLike, defineField, defineType } from "sanity";
function isValidPath(value: string | undefined) {
if (!value) return "Required";
if (!value.startsWith("/")) return "Must start with /";
if (/[^a-zA-Z0-9\-_/:]/.test(value)) return "Invalid characters";
return true;
}
export const redirectType = defineType({
name: "redirect",
title: "Redirect",
type: "document",
icon: LinkIcon,
validation: (Rule) =>
Rule.custom((doc: SanityDocumentLike | undefined) => {
if (doc?.source === doc?.destination) {
return "Source and destination cannot be the same";
}
return true;
}),
fields: [
defineField({
name: "source",
type: "string",
validation: (Rule) => Rule.required().custom(isValidPath),
}),
defineField({
name: "destination",
type: "string",
validation: (Rule) => Rule.required(),
}),
defineField({
name: "permanent",
description: "301 (permanent) or 302 (temporary)",
type: "boolean",
initialValue: true,
}),
defineField({
name: "isEnabled",
type: "boolean",
initialValue: true,
}),
],
});
```
### Next.js Config
```typescript
// next.config.ts
import { fetchRedirects } from "@/sanity/lib/fetchRedirects";
const nextConfig: NextConfig = {
async redirects() {
return await fetchRedirects();
},
};
```
**Limits:** Vercel allows max 1,024 redirects in `next.config`. For more, use middleware.
## 7. Dynamic Open Graph Images
Generate OG images on-the-fly using Next.js Edge Runtime at `/api/og`.
```typescript
// app/api/og/route.tsx
import { ImageResponse } from "next/og";
export const runtime = "edge";
export async function GET(request: Request) {
const id = new URL(request.url).searchParams.get("id");
if (!id) return new Response("Missing id", { status: 400 });
const data = await client.fetch(`*[_id == $id][0]{ title }`, { id });
return new ImageResponse(
<div tw="flex w-full h-full bg-blue-500 text-white p-10">
<h1 tw="text-6xl font-bold">{data?.title || "Untitled"}</h1>
</div>,
{ width: 1200, height: 630 }
);
}
```
Use as fallback in metadata: `url: page.seo.image ? urlFor(page.seo.image).url() : \`/api/og?id=\${page.\_id}\``
## 8. JSON-LD Structured Data
Use `schema-dts` for type-safe structured data.
```bash
npm install schema-dts
```
### FAQ Example
```typescript
import { FAQPage, WithContext } from "schema-dts";
const generateFaqData = (faqs: FAQ[]): WithContext<FAQPage> => ({
"@context": "https://schema.org",
"@type": "FAQPage",
mainEntity: faqs.map((faq) => ({
"@type": "Question",
name: faq.title,
acceptedAnswer: {
"@type": "Answer",
text: faq.text, // Use pt::text() in GROQ to get plain text
},
})),
});
// In component
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(generateFaqData(faqs)) }}
/>
```
### GROQ for Plain Text
```groq
faqs[]->{
_id,
title,
body,
"text": pt::text(body) // Convert Portable Text to plain string
}
```
## 9. Testing Tools
- **Open Graph:** [opengraph.ing](https://opengraph.ing/)
- **Facebook:** [Sharing Debugger](https://developers.facebook.com/tools/debug/)
- **Twitter:** [Card Validator](https://cards-dev.twitter.com/validator)
- **LinkedIn:** [Post Inspector](https://www.linkedin.com/post-inspector/)
- **Sitemap:** [XML Sitemaps Validator](https://www.xml-sitemaps.com/validate-xml-sitemap.html)
@@ -0,0 +1,146 @@
---
title: "Sanity Studio Structure Rules"
description: Rules for customizing the Sanity Studio Structure (S.structure).
---
# Sanity Studio Structure Rules
## 1. Setup
Custom structure is defined in `sanity.config.ts` using the `structureTool`.
```typescript
import { structureTool } from "sanity/structure";
import { structure } from "./src/structure";
export default defineConfig({
// ...
plugins: [structureTool({ structure })],
});
```
## 2. Structure Definition
**Location:** `src/structure/index.ts`
Use a function that receives `S` (StructureBuilder).
```typescript
import type { StructureResolver } from "sanity/structure";
export const structure: StructureResolver = (S) =>
S.list().title("Content").items([
// ... items
]);
```
## 3. Organization Principles
1. **Singletons First:** Place critical site-wide settings (Global Settings, Homepage) at the top.
2. **Dividers:** Use `S.divider()` to visually separate logical groups.
3. **Filtered Lists:** Always exclude Singleton documents from generic `documentTypeList` items to avoid duplication.
## 4. Singleton Pattern (Critical)
**Singletons are enforced via Structure, NOT schema options.** There is no `singleton: true` schema option.
This is the main case where explicit document IDs are appropriate. For ordinary content documents, let Sanity generate `_id` values and use references or GROQ lookups to connect records.
### How Singletons Work
1. Use `S.document().documentId('fixed-id')` to lock the document to a specific ID.
2. Filter the type from generic lists to prevent duplicate entries.
### Singleton Helper Function
```typescript
// Helper to create singleton list items
function createSingleton(
S: StructureBuilder,
typeName: string,
title: string,
icon?: ComponentType,
) {
return S.listItem().title(title).icon(icon).child(
S.document()
.schemaType(typeName)
.documentId(typeName) // Fixed ID = singleton
.title(title),
);
}
// Usage
createSingleton(S, "settings", "Site Settings", CogIcon);
```
### Querying Singletons
```groq
// By fixed ID (most efficient)
*[_id == "settings"][0]
// By type (works but slower)
*[_type == "settings"][0]
```
**For localized singletons** (e.g., homepage per language), see `localization.md` Section 6.
## 5. Implementation Pattern
```typescript
// Define singleton types to exclude from generic lists
const SINGLETONS = ["settings", "homePage"];
export const structure: StructureResolver = (S) =>
S.list()
.title("Website Content")
.items([
// 1. Singletons
S.listItem()
.title("Site Settings")
.icon(CogIcon)
.child(S.document().schemaType("settings").documentId("settings")),
S.divider(),
// 2. Content Verticals
S.listItem()
.title("Blog")
.child(
S.list()
.title("Blog Content")
.items([
S.documentTypeListItem("post").title("Posts"),
S.documentTypeListItem("author").title("Authors"),
]),
),
S.divider(),
// 3. Remaining Documents (Filtered)
...S.documentTypeListItems().filter(
(listItem) => !SINGLETONS.includes(listItem.getId() as string),
),
]);
```
## 6. Views (Split Pane)
Add "Web Preview" or other views to documents.
```typescript
export const defaultDocumentNode: DefaultDocumentNodeResolver = (
S,
{ schemaType },
) => {
switch (schemaType) {
case `post`:
return S.document().views([
S.view.form(), // Default form
S.view.component(PreviewComponent).title("Preview"), // Custom view
]);
default:
return S.document().views([S.view.form()]);
}
};
```
@@ -0,0 +1,340 @@
---
title: "SvelteKit & Sanity Integration Rules"
description: Integration guide for SvelteKit with Sanity using @sanity/sveltekit, including Visual Editing and Preview Mode.
---
# SvelteKit & Sanity Integration Rules
This guide uses the official **`@sanity/sveltekit`** package (Svelte 5 + SvelteKit 2). The older `@sanity/svelte-loader` does not work with Svelte 5 — its `useQuery` store returns empty on the client. Use `@sanity/sveltekit` instead.
## 1. Setup & Configuration
### Scaffold a new SvelteKit app
```bash
npx sv@latest create my-app --template minimal --types ts --no-add-ons --install npm
cd my-app
```
`--template minimal` is the bare app. `--types ts` enables TypeScript. `--no-add-ons` skips the add-on picker. `--install <pm>` chooses the package manager (`npm`, `pnpm`, `yarn`, or `bun`).
### Installation
```bash
npm install @sanity/sveltekit @sanity/image-url @portabletext/svelte
```
`@sanity/sveltekit` is the one-stop integration: it bundles `@sanity/client`, `@sanity/visual-editing`, `@sanity/core-loader`, `groq`, and friends, and re-exports `createClient`, `defineQuery`, `groq`, and `stegaClean`. **Do not** also install `@sanity/client`, `@sanity/visual-editing`, or `groq` directly — import them from `@sanity/sveltekit`. `@sanity/image-url` and `@portabletext/svelte` are not bundled, so add them separately.
### Environment variables (`.env.local`)
```bash
PUBLIC_SANITY_PROJECT_ID=your-project-id
PUBLIC_SANITY_DATASET=production
PUBLIC_SANITY_API_VERSION=2026-05-15
PUBLIC_SANITY_STUDIO_URL=http://localhost:3333
SANITY_API_READ_TOKEN=
```
SvelteKit's `$env/static/public` requires the `PUBLIC_` prefix for any var read on the client. `SANITY_API_READ_TOKEN` must be declared (even empty) if any file imports it from `$env/static/private`, otherwise Vite throws at build time.
## 2. Files
### `src/lib/sanity/api.ts` — env var resolution
```ts
import {
PUBLIC_SANITY_API_VERSION,
PUBLIC_SANITY_DATASET,
PUBLIC_SANITY_PROJECT_ID,
PUBLIC_SANITY_STUDIO_URL,
} from "$env/static/public";
function assertEnvVar<T>(value: T | undefined, name: string): T {
if (value === undefined || value === "") {
throw new Error(`Missing environment variable: ${name}`);
}
return value;
}
export const dataset = assertEnvVar(
PUBLIC_SANITY_DATASET,
"PUBLIC_SANITY_DATASET",
);
export const projectId = assertEnvVar(
PUBLIC_SANITY_PROJECT_ID,
"PUBLIC_SANITY_PROJECT_ID",
);
export const apiVersion = PUBLIC_SANITY_API_VERSION || "2026-05-15";
export const studioUrl = PUBLIC_SANITY_STUDIO_URL || "http://localhost:3333";
```
### `src/lib/sanity/client.ts` — public client
```ts
import { apiVersion, dataset, projectId, studioUrl } from "$lib/sanity/api";
import { createClient } from "@sanity/sveltekit";
export const client = createClient({
projectId,
dataset,
apiVersion,
useCdn: true,
stega: { studioUrl },
});
```
Import `createClient` from `@sanity/sveltekit`, not `@sanity/client`. `useCdn: true` is for production reads; the server (preview) client below overrides to `false`.
### `src/lib/sanity/client.server.ts` — server (preview) client
```ts
import { SANITY_API_READ_TOKEN } from "$env/static/private";
import { client } from "$lib/sanity/client";
export const serverClient = client.withConfig({
token: SANITY_API_READ_TOKEN,
useCdn: false,
stega: true,
});
```
### `src/lib/sanity/queries.ts` — queries + types
```ts
import { groq } from "@sanity/sveltekit";
export const postsQuery = groq`*[_type == "post" && defined(slug.current)] | order(_createdAt desc){
_id, _createdAt, title, slug, excerpt, mainImage, body
}`;
export const postQuery = groq`*[_type == "post" && slug.current == $slug][0]{
_id, _createdAt, title, slug, excerpt, mainImage, body
}`;
export interface Post {
_id: string;
_createdAt: string;
title?: string;
slug: { current: string };
excerpt?: string;
mainImage?: unknown;
body?: unknown[];
}
```
Use `defineQuery` instead of `groq` if you want TypeGen-friendly query definitions; both are re-exported from `@sanity/sveltekit`.
### `src/lib/sanity/image.ts` — image URL builder
```ts
import { createImageUrlBuilder } from "@sanity/image-url";
import { client } from "./client";
const builder = createImageUrlBuilder(client);
export function urlFor(source: unknown) {
return builder.image(source as never);
}
```
Use the named `createImageUrlBuilder` export; the default export logs a deprecation warning at runtime.
## 3. Hooks & Locals
### `src/hooks.server.ts` — wire preview + query loader
```ts
import { serverClient } from "$lib/sanity/client.server";
import {
handlePreviewMode,
handleQueryLoader,
setServerClient,
} from "@sanity/sveltekit";
import { redirect } from "@sveltejs/kit";
import { sequence } from "@sveltejs/kit/hooks";
setServerClient(serverClient);
export const handle = sequence(
handlePreviewMode({
client: serverClient,
preview: { redirect },
}),
handleQueryLoader(),
);
```
`handlePreviewMode` installs `/preview/enable` and `/preview/disable` endpoints, reads the preview cookie, and populates `locals.sanity` with `{client, fetch, loadQuery, previewEnabled, previewPerspective, browserToken}`. `handleQueryLoader` attaches `loadQuery` to `locals.sanity` for use in `+page.server.ts` / `+layout.server.ts`.
### `src/app.d.ts` — typed locals
```ts
import type { SanityLocals } from "@sanity/sveltekit";
declare global {
namespace App {
interface Locals extends SanityLocals {}
}
}
export {};
```
## 4. Layout: Preview + Visual Editing Providers
### `src/routes/+layout.server.ts` — propagate previewEnabled
```ts
import type { LayoutServerLoad } from "./$types";
export const load: LayoutServerLoad = (event) => {
const { previewEnabled } = event.locals.sanity;
return { previewEnabled };
};
```
### `src/routes/+layout.svelte` — wrap children in providers (Svelte 5)
```svelte
<script lang="ts">
import {PreviewMode, QueryLoader, VisualEditing} from '@sanity/sveltekit'
import type {LayoutProps} from './$types'
import {client} from '$lib/sanity/client'
const {children, data}: LayoutProps = $props()
// svelte-ignore state_referenced_locally
const {previewEnabled} = data
</script>
<PreviewMode enabled={previewEnabled}>
<VisualEditing enabled={previewEnabled}>
<QueryLoader enabled={previewEnabled} {client}>
{@render children()}
</QueryLoader>
</VisualEditing>
</PreviewMode>
```
Svelte 5 idioms here are mandatory:
- `const {children, data} = $props()` — not `export let data`.
- `{@render children()}` — not `<slot />`.
- The `svelte-ignore state_referenced_locally` comment silences a warning about destructuring reactive props at module scope.
`<VisualEditing>` dynamically imports its component only when `enabled === true`, so a preview-off app never loads the React-Compiler-runtime chunk.
## 5. Data Fetching (Loaders + `useQuery`)
### Posts list
`src/routes/+page.server.ts`:
```ts
import { type Post, postsQuery as query } from "$lib/sanity/queries";
import type { PageServerLoad } from "./$types";
export const load: PageServerLoad = async ({ locals }) => {
const { loadQuery } = locals.sanity;
const initial = await loadQuery<Post[]>(query);
return { query, options: { initial } };
};
```
The return shape `{query, params?, options: {initial}}` is what `useQuery(data)` on the client expects — don't change the field names.
`src/routes/+page.svelte`:
```svelte
<script lang="ts">
import {useQuery} from '@sanity/sveltekit'
import type {Post} from '$lib/sanity/queries'
import type {PageProps} from './$types'
const {data}: PageProps = $props()
const query = $derived(useQuery<Post[]>(data))
const posts = $derived($query.data)
</script>
<h1>Posts</h1>
{#if posts?.length}
<ul>
{#each posts as post (post._id)}
<li><a href={`/post/${post.slug.current}`}>{post.title}</a></li>
{/each}
</ul>
{:else}
<p>No posts yet.</p>
{/if}
```
Critical Svelte 5 pattern:
- `useQuery` returns a Svelte Readable store. Wrap in `$derived(useQuery(data))` so the store reference stays current across reactive updates.
- Subscribe via `$query` (Svelte's auto-subscription) and read `.data`.
- Works on both SSR and client.
### Post detail (`[slug]`)
`src/routes/post/[slug]/+page.server.ts`:
```ts
import { type Post, postQuery as query } from "$lib/sanity/queries";
import type { PageServerLoad } from "./$types";
export const load: PageServerLoad = async ({ locals, params }) => {
const { loadQuery } = locals.sanity;
const { slug } = params;
const initial = await loadQuery<Post>(query, { slug });
return { query, params: { slug }, options: { initial } };
};
```
`src/routes/post/[slug]/+page.svelte`:
```svelte
<script lang="ts">
import {useQuery} from '@sanity/sveltekit'
import {PortableText} from '@portabletext/svelte'
import {urlFor} from '$lib/sanity/image'
import type {Post} from '$lib/sanity/queries'
import type {PageProps} from './$types'
const {data}: PageProps = $props()
const query = $derived(useQuery<Post>(data))
const post = $derived($query.data)
</script>
{#if post}
<article>
<h1>{post.title}</h1>
{#if post.mainImage}
<img src={urlFor(post.mainImage).width(800).url()} alt={post.title ?? ''} />
{/if}
{#if post.body}
<PortableText value={post.body} />
{/if}
</article>
{:else}
<p>Post not found.</p>
{/if}
```
## 6. Stega Cleaning
When using fetched strings for logic (routing, classNames), strip the stega markers first.
```ts
import { stegaClean } from "@sanity/sveltekit";
// …
if (stegaClean(slug) === "home") {
/* … */
}
```
## 7. Caveats
- **Yarn classic + Visual Editing.** `@sanity/visual-editing` lazy-loads a chunk that imports `react/compiler-runtime`. Yarn classic doesn't auto-install peer deps, so users who flip preview mode on with yarn classic also need `yarn add react react-dom`. (Other package managers handle this automatically.) `<VisualEditing>` only loads this chunk when `enabled === true`, so a default preview-off app is unaffected.
- **No `<slot />`.** Svelte 5 layouts use `{@render children()}`.
- **No `export let`.** Pages and components use `const {data} = $props()`.
- **`@sanity/image-url` default export.** Use the named `createImageUrlBuilder`; the default export still works but logs a runtime deprecation warning.
@@ -0,0 +1,234 @@
---
title: Sanity TypeGen Rules
description: Workflow for generating TypeScript types from Sanity Schema and GROQ queries.
---
# Sanity TypeGen Rules
## 1. The Workflow
Sanity TypeGen generates TypeScript types from your schema and GROQ queries. Types can be generated automatically or manually.
### Automatic (Recommended)
Enable in `sanity.cli.ts` — types regenerate during `sanity dev` and `sanity build`:
```typescript
// sanity.cli.ts
import { defineCliConfig } from "sanity/cli";
export default defineCliConfig({
typegen: {
enabled: true,
},
});
```
### Manual
Run the extract + generate cycle whenever schema or queries change:
1. **Extract:** Converts your Schema (TS/JS) into a static JSON representation.
2. **Generate:** Scans your codebase for GROQ queries and generates TypeScript types.
```bash
npx sanity schema extract && npx sanity typegen generate
```
### Watch Mode (for separate frontends)
If your frontend is in a separate repo from the Studio, use watch mode:
```bash
npx sanity typegen generate --watch
```
## 2. The "Update Types" Pattern
For manual workflows, implement a single script:
**package.json:**
```json
"scripts": {
"typegen": "sanity schema extract && sanity typegen generate"
}
```
### Git Strategy for Generated Files
**Option A: Commit generated types (Recommended for most teams)**
- Types available immediately after `git pull`
- CI/CD doesn't need to run typegen
- Can cause merge conflicts
**Option B: Generate in CI (Recommended for larger teams)**
Add to `.gitignore`:
```gitignore
# Sanity TypeGen (generated)
sanity.types.ts
schema.json
```
Then ensure CI runs typegen before build:
```yaml
# Example GitHub Actions
- run: npm run typegen
- run: npm run build
```
## 3. Configuration (`sanity.cli.ts`)
> **Note:** `sanity-typegen.json` is deprecated. Move your configuration to `sanity.cli.ts`.
```typescript
// sanity.cli.ts
import { defineCliConfig } from "sanity/cli";
export default defineCliConfig({
typegen: {
enabled: true, // Auto-generate during sanity dev/build
path: "./src/**/*.{ts,tsx,js,jsx,astro,svelte,vue}", // Glob to find queries
schema: "schema.json", // Schema file from extract
generates: "./sanity.types.ts", // Output file
overloadClientMethods: true, // Auto-type client.fetch() calls
},
});
```
### Project Structure Examples
**Monorepo (recommended)** (Studio in `studio/`, Frontend in `web/` — same config works under `apps/`):
```typescript
export default defineCliConfig({
typegen: {
path: "../web/src/**/*.{ts,tsx,js,jsx}",
schema: "schema.json",
generates: "../web/sanity.types.ts",
},
});
```
**Single Repo / Embedded Studio (legacy):**
Use defaults — no extra config needed.
**Separate Repos:**
Use `--watch` mode in your frontend: `sanity typegen generate --watch`
## 4. Usage in Code
### Automatic Type Inference (Recommended)
With `overloadClientMethods: true` (default), `client.fetch()` automatically returns typed results when you use `defineQuery`:
```typescript
import { defineQuery } from "groq";
import { createClient } from "@sanity/client";
const client = createClient({...});
const POSTS_QUERY = defineQuery(`*[_type == "post"]{ title, slug }`);
// Return type is automatically inferred — no manual type import needed!
const posts = await client.fetch(POSTS_QUERY);
```
### Manual Type Import (Alternative)
You can also import generated types directly:
```typescript
import { defineQuery } from "groq";
// Next.js re-exports defineQuery for convenience:
// import { defineQuery } from "next-sanity";
const AUTHOR_QUERY = defineQuery(`*[_type == "author" && slug.current == $slug][0]{ name, bio }`);
import type { AUTHOR_QUERYResult } from "@/sanity.types";
export default function Author({ data }: { data: AUTHOR_QUERYResult }) {
return <h1>{data.name}</h1>
}
```
### Required Fields
Use `--enforce-required-fields` during extraction to translate `validation: rule => rule.required()` into non-optional types:
```bash
npx sanity schema extract --enforce-required-fields
npx sanity typegen generate
```
> **Warning:** If you use draft previews, fields may still be `undefined` even with required validation, since drafts can be in an invalid state.
### Type Utilities
TypeGen provides utilities for working with complex types:
```typescript
import type { FilterByType, Get } from "sanity";
import type { Page, PageBuilder } from "./sanity.types";
// Extract deeply nested type (up to 20 levels)
type HeroSection = Get<Page, "sections", number, "hero">;
// Filter specific types from unions using _type discriminator
type HeroBlock = FilterByType<PageBuilder, "hero">;
```
### Unique Query Names
All queries must have unique variable names. Duplicate names across files will cause TypeGen to silently overwrite types. Use descriptive, scoped names:
```typescript
// Unique names
const POSTS_INDEX_QUERY = defineQuery(`*[_type == "post"]{ title }`)
const POST_DETAIL_QUERY = defineQuery(`*[_type == "post" && slug.current == $slug][0]`)
// Duplicate names will conflict
const QUERY = defineQuery(`*[_type == "post"]`) // file-a.ts
const QUERY = defineQuery(`*[_type == "author"]`) // file-b.ts — overwrites!
```
### Supported Query Formats
Queries must be assigned to a variable using `groq` or `defineQuery`:
```typescript
// Works — groq template tag
const query = groq`*[_type == "post"]`
// Works — defineQuery
const query = defineQuery(`*[_type == "post"]`)
// Won't work — inline query
await client.fetch(groq`*[_type == "post"]`)
```
### Supported File Types
TypeGen parses queries from: `.ts`, `.tsx`, `.js`, `.jsx`, `.astro`, `.svelte`, `.vue`
### tsconfig Requirements
Ensure `sanity.types.ts` is included in your `tsconfig.json`'s `include` array. If your config restricts includes (e.g., `["src/**/*"]`) and the types file is at the project root, TypeScript won't pick up the generated types:
```json
{
"include": ["src/**/*", "sanity.types.ts"]
}
```
### Skipping Individual Queries
Add `@sanity-typegen-ignore` in a comment before a query to skip type generation:
```typescript
// @sanity-typegen-ignore
const debugQuery = groq`*[_type == "debug"]`;
```
@@ -0,0 +1,279 @@
---
title: "Sanity Visual Editing Rules"
description: Comprehensive guide for Sanity Visual Editing, including Presentation Tool, Stega (Content Source Maps), and Overlays.
---
# Sanity Visual Editing Rules
## 1. Concepts
### Presentation Tool
The Studio plugin (`sanity/presentation`) that renders your front-end application inside an iframe in the Studio. It enables the "Edit" overlay and bidirectional navigation.
### Content Source Maps (Stega)
Invisible characters embedded in strings that tell the Presentation Tool which field in which document the content comes from.
- **Mechanism:** Sanity encodes document ID, field path, and dataset info into string values.
- **Result:** Click-to-edit functionality in the preview.
### Loaders
Framework-agnostic or specific libraries that handle:
1. Fetching data (production vs. preview).
2. Subscribing to real-time updates (Live Content API).
3. Encoding Stega strings (if not handled by the Content Lake automatically).
## 2. The Golden Rule of Stega (Clean Data)
When Visual Editing is enabled, string fields will contain invisible characters. You **MUST** clean them before using the value for logic.
| Scenario | Clean? | Why |
| ------------------------------------ | ------ | --------------------- |
| Comparing strings (`if (x === 'y')`) | ✅ Yes | Stega breaks equality |
| Using as object keys | ✅ Yes | Keys won't match |
| Using as HTML IDs | ✅ Yes | Invalid characters |
| Passing to third-party libraries | ✅ Yes | May validate input |
| Rendering text (`<h1>{title}</h1>`) | ❌ No | Breaks click-to-edit |
| Passing to `<PortableText />` | ❌ No | Handles internally |
| Passing to image helpers | ❌ No | Handles internally |
```typescript
import { stegaClean } from "@sanity/client/stega";
export function Layout({ align }: { align: string }) {
// Good: Clean before comparison
const cleanAlign = stegaClean(align);
return <div className={cleanAlign === 'center' ? 'mx-auto' : ''} />
}
```
## 3. Token Handling (Security)
Store your read token in a dedicated file that throws if missing:
```typescript
// src/sanity/lib/token.ts
export const token = process.env.SANITY_API_READ_TOKEN;
if (!token) {
throw new Error("Missing SANITY_API_READ_TOKEN");
}
```
**Never** expose tokens in client bundles. Pass to `defineLive` for server/browser use only when Draft Mode is enabled.
## 4. Setup: Presentation Tool
**File:** `sanity.config.ts`
```typescript
import { defineConfig } from "sanity";
import { presentationTool } from "sanity/presentation";
import { resolve } from "@/sanity/presentation/resolve";
export default defineConfig({
// ...
plugins: [
presentationTool({
resolve, // Document locations (see below)
previewUrl: {
// The front-end origin — required when the Studio runs standalone
origin:
process.env.SANITY_STUDIO_PREVIEW_ORIGIN || "http://localhost:3000",
previewMode: {
enable: "/api/draft-mode/enable",
},
},
}),
],
});
```
### Document Locations
Show where documents appear in the front-end — enables quick navigation between Structure and Presentation tools.
```typescript
// src/sanity/presentation/resolve.ts
import {
PresentationPluginOptions,
defineLocations,
} from "sanity/presentation";
export const resolve: PresentationPluginOptions["resolve"] = {
locations: {
post: defineLocations({
select: { title: "title", slug: "slug.current" },
resolve: (doc) => ({
locations: [
{ title: doc?.title || "Untitled", href: `/posts/${doc?.slug}` },
{ title: "Posts index", href: `/posts` },
],
}),
}),
// Add more document types as needed
},
};
```
## 5. Visual Editing Overlays
Render `<VisualEditing />` in Draft Mode for click-to-edit overlays.
**Next.js (App Router):**
```typescript
// layout.tsx
import { VisualEditing } from 'next-sanity/visual-editing'
import { draftMode } from 'next/headers'
import { DisableDraftMode } from '@/components/disable-draft-mode'
export default async function RootLayout({ children }) {
return (
<html>
<body>
{children}
{(await draftMode()).isEnabled && (
<>
<DisableDraftMode />
<VisualEditing />
</>
)}
</body>
</html>
)
}
```
### Disable Draft Mode Button
Useful for content authors to exit preview and see published content:
```typescript
// src/components/disable-draft-mode.tsx
'use client'
import { useDraftModeEnvironment } from 'next-sanity/hooks'
export function DisableDraftMode() {
const environment = useDraftModeEnvironment()
// Only show outside of Presentation Tool
if (environment !== 'live' && environment !== 'unknown') return null
return (
<a href="/api/draft-mode/disable" className="fixed bottom-4 right-4 bg-gray-50 px-4 py-2">
Disable Draft Mode
</a>
)
}
```
**Remix/Svelte:** See framework-specific rules for `useLiveMode` and `enableVisualEditing` patterns.
## 6. SEO & Metadata (Critical)
**NEVER** allow Stega strings in `<head>` tags (Title, Description, Canonical URLs). It destroys SEO rankings and looks broken in search results.
- **Next.js:** Set `stega: false` in `generateMetadata`.
- **General:** Explicitly clean fields used in `<title>` or `<meta>`.
```typescript
// Next.js Example — disable stega at fetch level
export async function generateMetadata({ params }) {
const { data } = await sanityFetch({
query: SEO_QUERY,
stega: false, // Critical
});
return { title: data.title };
}
```
**Alternative:** If you can't disable stega at the fetch level, clean explicitly:
```typescript
import { stegaClean } from "@sanity/client/stega";
export async function generateMetadata({ params }) {
const { data } = await sanityFetch({ query: PAGE_QUERY });
return {
title: stegaClean(data.title),
description: stegaClean(data.description),
openGraph: { url: stegaClean(data.canonicalUrl) },
};
}
```
## 7. Drag-and-Drop Reordering (Advanced)
For arrays (e.g., "Related Posts"), enable drag-and-drop in the preview using `data-sanity` attributes and `useOptimistic`:
```typescript
import { createDataAttribute } from 'next-sanity'
import { useOptimistic } from 'next-sanity/hooks'
// Add data-sanity to array container
<ul data-sanity={createDataAttribute({ id: documentId, type: 'post', path: 'relatedPosts' }).toString()}>
{items.map((item) => (
<li key={item._key} data-sanity={createDataAttribute({
id: documentId, type: 'post', path: `relatedPosts[_key=="${item._key}"]`
}).toString()}>
{item.title}
</li>
))}
</ul>
```
**Key requirements:**
- Query must include `_key` for array items
- Use `useOptimistic` hook for instant UI updates during mutations
## 8. Optimistic Updates for Faster Editing
By default, editing a field in the Presentation Tool triggers a full page re-render. For pages with many components, this can feel sluggish. **Presentation queries** solve this by fetching only the specific block being edited.
### The Concept
Instead of:
1. User edits a field -> Full page query re-runs -> All components re-render
You get:
1. User edits a field -> Block-specific query runs -> Only that component re-renders
### How It Works
1. **Create a targeted query** that fetches just the block data using `_key`:
```groq
*[_id == $documentId][0]{
"heroBlock": pageBuilder[_key == $blockKey && _type == "hero"][0]{
title, subtitle, image
}
}
```
2. **Use a presentation query hook** in your component (e.g., `usePresentationQuery` in Next.js)
3. **Fall back to initial props** when not in presentation mode
This pattern works for both Page Builder blocks (`pageBuilder[]`) and Portable Text blocks (`body[]`).
**See framework-specific rules for implementation:**
- Next.js: `nextjs.md` (Section 9)
- Page Builder: `page-builder.md` (Section 5)
- Portable Text: `portable-text.md` (Section 7)
## 9. Framework Specifics
| Framework | Loader Package | Key Components |
| :---------- | :---------------------- | :----------------------------------------------------------- |
| **Next.js** | `next-sanity` | `<VisualEditing />`, `defineLive`, `usePresentationQuery` |
| **Remix** | `@sanity/react-loader` | `createQueryStore`, `useLiveMode`, `enableVisualEditing` |
| **Svelte** | `@sanity/svelte-loader` | `createRequestHandler`, `useLiveMode`, `enableVisualEditing` |
| **Nuxt** | `@nuxtjs/sanity` | Automatic via module config (`visualEditing: {}`) |
| **Astro** | `@sanity/astro` | `sanity({ useCdn: false, stega: true })` |
-73
View File
@@ -1,73 +0,0 @@
name: Deploy aksel.dev.nav.no
on:
workflow_dispatch:
push:
branches:
- next
jobs:
build_and_deploy:
name: Build and deploy to dev-gcp
runs-on: ubuntu-20.04
permissions:
packages: "write"
contents: "read"
id-token: "write"
steps:
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/checkout@v3
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
- name: Hide page from search engines
run: |
echo "User-agent: *\nDisallow: /" > aksel.nav.no/website/public/robots.txt
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-dev-${{ github.sha }}
restore-keys: |
${{ runner.os }}-dev-
- name: Install dependencies
run: yarn
- name: Build application
run: |
yarn boot
yarn workspace aksel.nav.no build:next
- name: Upload static files to NAV CDN
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
cdn-team-name: aksel
source: ./aksel.nav.no/website/.next/static
destination: "/website/_next"
- name: Get complete tag
run: echo "TAG=DEV-$( date +%s )" >> $GITHUB_ENV
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
push_image: true
dockerfile: aksel.nav.no/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy to dev-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: aksel.nav.no/nais-dev.yaml
CLUSTER: dev-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
-116
View File
@@ -1,116 +0,0 @@
name: Deploy aksel.nav.no
on:
push:
branches:
- main
paths:
- "aksel.nav.no/**"
env:
IMAGE: ghcr.io/navikt/aksel
jobs:
sync_data_with_sanity:
name: Update component data
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/checkout@v3
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod-
- name: Install dependencies
run: yarn
- name: Run docgen
run: |
yarn boot
yarn docgen
- name: Update sanity sync
run: yarn workspace aksel.nav.no sanity:update
build_and_deploy:
name: Build and deploy to prod-gcp
runs-on: ubuntu-latest
permissions:
packages: "write"
contents: "read"
id-token: "write"
steps:
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/checkout@v3
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod-
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn boot
- name: Tests
run: yarn workspace aksel.nav.no test
- name: Build application
run: yarn workspace aksel.nav.no build:next
- name: Upload static files to NAV CDN
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
cdn-team-name: aksel
source: ./aksel.nav.no/website/.next/static
destination: "/website/_next"
- name: Get complete tag
run: echo "TAG=PROD-$( date +%s )" >> $GITHUB_ENV
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
push_image: true
dockerfile: aksel.nav.no/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Wait for e2e-tests to succeed
uses: lewagon/wait-on-check-action@v1.2.0
with:
ref: ${{ github.ref }}
check-name: "Smoketest Aksel"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: aksel.nav.no/nais-prod.yaml
CLUSTER: prod-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
-41
View File
@@ -1,41 +0,0 @@
name: Redeploy image to for aksel.nav.no
on:
workflow_dispatch:
inputs:
tag:
description: "Docker image tag"
required: true
default: ""
dry:
description: "Dry-run"
required: true
default: "false"
env:
IMAGE: ghcr.io/navikt/aksel
jobs:
redeploy:
name: Redeploy image
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # Use commit-sha1 instead of tag for security concerns
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create docker image tag
run: echo "DOCKER_TAG=${{ env.IMAGE }}:${{ github.event.inputs.tag }}" >> $GITHUB_ENV
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@master
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: aksel.nav.no/nais-prod.yaml
CLUSTER: prod-gcp
IMAGE: ${{ env.DOCKER_TAG }}
DRY_RUN: ${{ github.event.inputs.dry }}
+48
View File
@@ -0,0 +1,48 @@
name: Backup Sanity dataset
on:
workflow_dispatch:
schedule:
- cron: "0 0 */3 * *"
permissions:
contents: read
jobs:
execute:
name: Export and upload Sanity backup
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
cache: yarn
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: cd aksel.nav.no/sanity-studio && yarn
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Export dataset
run: cd aksel.nav.no/sanity-studio && yarn sanity:backup
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
- name: Authenticate with GCP
uses: "google-github-actions/auth@v3"
with:
credentials_json: "${{ secrets.gcp_credentials_prod }}"
- name: Upload backup to GCS bucket
uses: "google-github-actions/upload-cloud-storage@v3"
with:
path: ./aksel.nav.no/sanity-studio
destination: "aksel-website-prod/backups"
glob: "backup-*.tar.gz"
-38
View File
@@ -1,38 +0,0 @@
name: Backup sanity dateset to gcp
on:
workflow_dispatch:
schedule:
# 12.00 every 3 days
- cron: "0 0 */3 * *"
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to retrieve git history
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- name: Install dependencies
run: cd aksel.nav.no/website && yarn
- name: Export dataset
run: cd aksel.nav.no/website && SANITY_PREVIEW_TOKEN=${{secrets.SANITY_DATASET_EDITOR_TOKEN}} yarn backup
- name: Upload GCP bucket
uses: "google-github-actions/auth@v0"
with:
credentials_json: "${{ secrets.gcp_credentials_prod }}"
- uses: "google-github-actions/upload-cloud-storage@v0"
with:
path: ./aksel.nav.no/website
destination: "aksel-website-prod/backups"
glob: "backup-*.tar.gz"
+134
View File
@@ -0,0 +1,134 @@
name: E2E tests
on:
push:
branches: [main, next]
paths:
- "aksel.nav.no/**"
pull_request:
branches: [main, next]
paths:
- "aksel.nav.no/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
packages: write
id-token: write
jobs:
prebuild-app-for-playwright:
name: Build app for Playwright
runs-on: ubuntu-latest
env:
IMAGE_NAME: ${{ github.repository }}-e2e
REGISTRY: ghcr.io
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup and build Next.js application
uses: ./.github/actions/build-website
with:
use_cdn_assets: false
npm_auth_token: ${{ secrets.READER_TOKEN }}
nais_id_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
nais_project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
sanity_read_token: ${{ secrets.SANITY_READ }}
sanity_read_no_drafts_token: ${{ secrets.SANITY_READ_NO_DRAFTS }}
- name: Log in to the Container registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: aksel.nav.no/Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
outputs:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
run-playwright:
needs: [prebuild-app-for-playwright]
name: Playwright shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.61.1-noble
services:
testapp:
image: ${{ needs.prebuild-app-for-playwright.outputs.image }}
ports: ["3000:3000"]
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4, 5]
shardTotal: [5]
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
cache: yarn
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn --immutable
shell: bash
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Run Playwright
shell: bash
run: yarn e2e:docker --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
SANITY_READ: ${{ secrets.SANITY_READ }}
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
- name: Upload blob report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: blob-report-${{ matrix.shardIndex }}
path: aksel.nav.no/website/blob-report
retention-days: 1
merge-reports:
name: Merge Playwright reports
if: ${{ !cancelled() }}
needs: [run-playwright]
runs-on: ubuntu-latest
steps:
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v8
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v7
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14
+90
View File
@@ -0,0 +1,90 @@
name: Validation
on:
push:
branches:
- main
- next
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint (ESLint, Stylelint etc.)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Lint
run: yarn lint
validate-examples:
name: Validate component examples
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Validate example code
run: yarn validate:eksempler
test:
name: Unit and integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Test
run: yarn test
ui:
name: UI tests (Storybook)
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: mcr.microsoft.com/playwright:v1.61.1-noble
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Test UI
run: yarn storybook:test --max-workers=2
env:
HOME: /root
@@ -0,0 +1,87 @@
name: Visual regression
on:
push:
branches:
- "main"
paths:
- "@navikt/**"
pull_request:
branches: [main, next]
paths:
- "@navikt/**"
- "aksel.nav.no/website/pages/templates/**"
- ".storybook/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
chromatic:
name: Run Chromatic
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Chromatic
if: github.actor != 'dependabot[bot]'
uses: chromaui/action@latest
id: chromatic_tests
continue-on-error: false
with:
autoAcceptChanges: "main"
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true
buildScriptName: "build:storybook-chromatic"
onlyChanged: true
untraced: "**/package.json|yarn.lock|**/*.md"
externals: "**/core/css/src/**/*.css"
traceChanged: true
env:
STORYBOOK_GITHUB_SHA: ${{ github.sha }}
- name: Get commit sha
if: github.event_name != 'push' && !contains(github.event.head_commit.message, '[ci skip]') && github.actor != 'dependabot[bot]'
id: vars
shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Find Comment
if: github.event_name != 'push' && !contains(github.event.head_commit.message, '[ci skip]') && github.actor != 'dependabot[bot]'
uses: peter-evans/find-comment@v4
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: Storybook demo
- name: Create or update comment
if: github.event_name != 'push' && !contains(github.event.head_commit.message, '[ci skip]') && github.actor != 'dependabot[bot]'
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## [Storybook demo](${{steps.chromatic_tests.outputs.storybookUrl}}) / [Chromatic](${{steps.chromatic_tests.outputs.url}})
${{ steps.chromatic_tests.outputs.changeCount > 0 && format('### 📝 Changes to review: {0}', steps.chromatic_tests.outputs.changeCount) || '' }}
${{ steps.chromatic_tests.outputs.errorCount > 0 && format('### ❌ Stories with errors: {0}', steps.chromatic_tests.outputs.errorCount) || '' }}
${{ steps.chromatic_tests.outputs.interactionTestFailuresCount > 0 && format('### ❌ Failed interaction tests: {0}', steps.chromatic_tests.outputs.interactionTestFailuresCount) || '' }}
[${{ steps.vars.outputs.sha_short }}](https://github.com/navikt/aksel/commit/${{ steps.vars.outputs.sha_short }}) | ${{steps.chromatic_tests.outputs.componentCount}} components | ${{steps.chromatic_tests.outputs.specCount}} stories
edit-mode: replace
+147
View File
@@ -0,0 +1,147 @@
name: Bundle check (main branch)
on:
pull_request:
branches: [main]
paths:
- "@navikt/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check-title:
name: Check PR title
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.check.outputs.should-run }}
steps:
- id: check
run: echo "should-run=${{ !contains(github.event.pull_request.title, 'Version Packages') }}" >> $GITHUB_OUTPUT
analyze-trunk:
name: Analyze main branch
runs-on: ubuntu-latest
needs: check-title
if: ${{ needs.check-title.outputs.should-run == 'true' }}
steps:
- name: Checkout main branch
uses: actions/checkout@v7
with:
fetch-depth: 1
ref: main
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Analyze main branch
run: yarn run:analyze-local-action
- name: Upload json report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: trunk-results.json
path: tooling/analyzer
retention-days: 1
analyze-local:
name: Analyze PR branch
runs-on: ubuntu-latest
needs: check-title
if: ${{ needs.check-title.outputs.should-run == 'true' }}
steps:
- name: Checkout PR branch
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Analyze PR branch
run: yarn run:analyze-branch-action
- name: Upload json report to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: branch-results.json
path: tooling/analyzer
retention-days: 1
compare-against-trunk:
name: Compare bundles (PR vs main)
runs-on: ubuntu-latest
needs: [analyze-trunk, analyze-local]
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Download trunk json from GitHub Actions Artifacts
uses: actions/download-artifact@v8
with:
path: tooling/analyzer
name: trunk-results.json
- name: Download branch json from GitHub Actions Artifacts
uses: actions/download-artifact@v8
with:
path: tooling/analyzer
name: branch-results.json
- name: Analyze compare branches
run: yarn run:compare-bundles
- name: Upload comparison markdown to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: compare-markdown.md
path: tooling/analyzer
retention-days: 1
update-comment:
name: Post PR comment with results
runs-on: ubuntu-latest
needs: [compare-against-trunk]
permissions:
contents: read
pull-requests: write
steps:
- name: Download comparison markdown to GitHub Actions Artifacts
uses: actions/download-artifact@v8
with:
path: tooling/analyzer
name: compare-markdown.md
- name: Find Comment
uses: peter-evans/find-comment@v4
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: Bundle Analysis Result
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: tooling/analyzer/compare-markdown.md
edit-mode: replace
+84
View File
@@ -0,0 +1,84 @@
name: Bundle check (npm)
on:
pull_request:
branches: [main]
paths:
- "@navikt/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check-title:
name: Check PR title
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.check.outputs.should-run }}
steps:
- id: check
run: echo "should-run=${{ contains(github.event.pull_request.title, 'Version Packages') }}" >> $GITHUB_OUTPUT
analyze:
name: Analyze npm packages
runs-on: ubuntu-latest
needs: check-title
if: ${{ needs.check-title.outputs.should-run == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Analyze Npm and local packages
run: yarn run:analyze-npm-action
- name: Run comparison analysis
run: yarn run:compare-bundles
- name: Upload comparison markdown to GitHub Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: compare-markdown.md
path: tooling/analyzer
retention-days: 1
update-comment:
name: Post PR comment with results
runs-on: ubuntu-latest
needs: [analyze]
permissions:
contents: read
pull-requests: write
steps:
- name: Download comparison markdown to GitHub Actions Artifacts
uses: actions/download-artifact@v8
with:
path: tooling/analyzer
name: compare-markdown.md
- name: Find Comment
uses: peter-evans/find-comment@v4
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: Bundle Analysis Result
- name: Create or update comment
uses: peter-evans/create-or-update-comment@v5
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: tooling/analyzer/compare-markdown.md
edit-mode: replace
+55
View File
@@ -0,0 +1,55 @@
name: Upload Figma token config to CDN
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "@navikt/core/tokens/**"
jobs:
upload:
name: Build and upload token config
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
cache: yarn
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Build tokens
run: yarn workspace @navikt/ds-tokens build
- name: Upload config to CDN
id: upload
uses: nais/deploy/actions/cdn-upload/v2@master
with:
team: designsystem
source: "./@navikt/core/tokens/figma-config.json"
destination: "./@navikt/tokens"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
source_keep_parent_name: false
no_cache_paths: "@navikt/tokens/figma-config.json"
- name: Log uploaded file
run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
+36
View File
@@ -0,0 +1,36 @@
name: Upload fonts to CDN
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "fonts/**"
jobs:
upload:
name: Upload fonts to CDN
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: "actions/checkout@v7"
- name: Upload fonts to CDN
id: upload
uses: nais/deploy/actions/cdn-upload/v2@master
with:
team: aksel
source: ./fonts
destination: "" # uploads folder to team root
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Log uploaded file
run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
-104
View File
@@ -1,104 +0,0 @@
name: Visual Regression Tests
on:
push:
branches:
- "main"
paths:
- "@navikt/**"
pull_request:
branches: [main, next]
paths:
- "@navikt/**"
jobs:
visual_regression_test:
name: "visual regression test (chromatic)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
cache: yarn
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-visual-regression-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-visual-regression-test-
- name: Install dependencies
run: yarn
- name: Build packages
run: yarn boot
- name: Chromatic
uses: chromaui/action@v1
id: chromatic_tests
continue-on-error: true
with:
autoAcceptChanges: "main"
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: x3xqdfgkujg
exitZeroOnChanges: false
buildScriptName: "build:storybook"
env:
STORYBOOK_GITHUB_SHA: ${{ github.sha }}
- name: replace storybook url
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
uses: frabert/replace-string-action@v2.0
id: storybook_url
with:
pattern: "(iframe.html)"
string: ${{ steps.chromatic_tests.outputs.storybookUrl }}
replace-with: ""
- name: Get commit sha
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
id: vars
shell: bash
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Find Comment
if: "!contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'"
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: github-comment-finder
- name: Create or update comment
if: steps.chromatic_tests.outcome == 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### [<img id="github-comment-finder" src="https://raw.githubusercontent.com/storybookjs/brand/main/logo/logo-storybook-inverse.svg" height="32"/>](${{steps.storybook_url.outputs.replaced}})
[${{ steps.vars.outputs.sha_short }}](https://github.com/navikt/aksel/commit/${{ steps.vars.outputs.sha_short }}) | ${{steps.chromatic_tests.outputs.componentCount}} komponenter | ${{steps.chromatic_tests.outputs.specCount}} stories
edit-mode: replace
- name: Create or update failed comment
if: steps.chromatic_tests.outcome != 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### [<img id="github-comment-finder" src="https://raw.githubusercontent.com/storybookjs/brand/main/logo/logo-storybook-inverse.svg" height="32"/>](${{steps.storybook_url.outputs.replaced}})
### [Endringer til review](${{steps.chromatic_tests.outputs.url}}): ${{steps.chromatic_tests.outputs.changeCount}}
[${{ steps.vars.outputs.sha_short }}](https://github.com/navikt/aksel/commit/${{ steps.vars.outputs.sha_short }}) | ${{steps.chromatic_tests.outputs.componentCount}} komponenter | ${{steps.chromatic_tests.outputs.specCount}} stories
edit-mode: replace
-44
View File
@@ -1,44 +0,0 @@
name: CI
on:
push:
branches:
- main
- next
pull_request:
workflow_dispatch:
jobs:
build:
name: "Validate build"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
cache: yarn
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-test
- name: Install dependencies
run: yarn
- name: Boot (build packages)
run: yarn boot
- name: Lint
run: yarn lint
- name: Test
run: yarn test
+26
View File
@@ -0,0 +1,26 @@
name: Cleanup E2E Docker images
on:
schedule:
- cron: "0 4 * * 1"
workflow_dispatch:
permissions:
packages: write
jobs:
cleanup:
runs-on: ubuntu-latest
strategy:
matrix:
package-name:
- aksel-e2e
steps:
- name: Delete old container images
uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # actions/delete-package-versions@v5
with:
package-name: ${{ matrix.package-name }}
package-type: container
delete-only-untagged-versions: false
min-versions-to-keep: 1
token: ${{ secrets.GITHUB_TOKEN }}
+53
View File
@@ -0,0 +1,53 @@
name: Deploy dev (aksel.ansatt.dev.nav.no)
on:
workflow_dispatch:
push:
branches:
- next
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build_and_deploy:
name: Build and deploy to dev-gcp
runs-on: ubuntu-latest
permissions:
packages: "write"
contents: "read"
id-token: "write"
deployments: "write"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup and build Next.js application
uses: ./.github/actions/build-website
with:
use_cdn_assets: true
npm_auth_token: ${{ secrets.READER_TOKEN }}
nais_id_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
nais_project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
sanity_read_token: ${{ secrets.SANITY_READ }}
sanity_read_no_drafts_token: ${{ secrets.SANITY_READ_NO_DRAFTS }}
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
push_image: true
dockerfile: aksel.nav.no/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy to dev-gcp
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: aksel.nav.no/nais-dev.yaml
CLUSTER: dev-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
+55
View File
@@ -0,0 +1,55 @@
name: Deploy Aksel MCP server
on:
push:
branches:
- main
paths:
- "apps/mcp-server/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
IMAGE: ghcr.io/navikt/aksel
jobs:
build_and_deploy:
name: Build and deploy to prod-gcp
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Test mcp-server
run: cd apps/mcp-server && yarn test
- name: Build mcp-server
run: cd apps/mcp-server && yarn build
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
dockerfile: apps/mcp-server/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: apps/mcp-server/.nais/app.yaml
CLUSTER: prod-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
+83
View File
@@ -0,0 +1,83 @@
name: Deploy prod (aksel.nav.no)
on:
push:
branches:
- main
paths:
- "aksel.nav.no/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
IMAGE: ghcr.io/navikt/aksel
jobs:
sync_data_with_sanity:
name: Sync data to Sanity
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup project
uses: ./.github/actions/setup
with:
npm_auth_token: ${{ secrets.READER_TOKEN }}
- name: Run metadata generation
run: yarn docgen:meta
- name: Update Sanity
env:
SANITY_WRITE: ${{ secrets.SANITY_WRITE }}
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS_BQ_READ }}
run: yarn workspace aksel.nav.no sanity:update
build_and_deploy:
name: Build and deploy to prod-gcp
runs-on: ubuntu-latest
permissions:
packages: "write"
contents: "read"
id-token: "write"
deployments: "write"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup and build Next.js application
uses: ./.github/actions/build-website
with:
use_cdn_assets: true
production: true
npm_auth_token: ${{ secrets.READER_TOKEN }}
nais_id_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
nais_project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
sanity_read_token: ${{ secrets.SANITY_READ }}
sanity_read_no_drafts_token: ${{ secrets.SANITY_READ_NO_DRAFTS }}
sanity_deploy_studio: ${{ secrets.SANITY_DEPLOY_STUDIO }}
next_encryption_key: ${{ secrets.NEXT_ENCRYPTION_KEY }}
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
push_image: true
dockerfile: aksel.nav.no/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: aksel.nav.no/nais-prod.yaml
CLUSTER: prod-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
+61
View File
@@ -0,0 +1,61 @@
name: Deploy prod (aksel-v7.nav.no)
on:
workflow_dispatch:
push:
branches:
- v7-aksel.nav.no
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build_and_deploy:
name: Build and deploy to prod-gcp
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/v7-aksel.nav.no'
permissions:
packages: "write"
contents: "read"
id-token: "write"
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: lts/*
- name: Install dependencies
run: cd v7-aksel.nav.no && yarn --immutable
shell: bash
- name: Set production env var
run: |
echo "PRODUCTION=true" >> v7-aksel.nav.no/website/.env
shell: bash
- name: Build Next.js website
run: cd v7-aksel.nav.no && yarn build
shell: bash
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-push
with:
team: designsystem
push_image: true
dockerfile: v7-aksel.nav.no/Dockerfile
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy to prod-gcp
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: v7-aksel.nav.no/nais-prod.yaml
CLUSTER: prod-gcp
IMAGE: ${{ steps.docker-push.outputs.image }}
-54
View File
@@ -1,54 +0,0 @@
name: E2E / Playwright Tests
on:
push:
branches: [main, next]
paths:
- "aksel.nav.no/**"
pull_request:
branches: [main, next]
paths:
- "aksel.nav.no/**"
jobs:
playwright:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.30.0-focal
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-e2e-${{ github.sha }}
restore-keys: |
${{ runner.os }}-e2e-
- name: Install dependencies
run: yarn
- name: Build packages
run: |
yarn boot
- name: Build application
run: yarn workspace aksel.nav.no build:next
- name: Run Playwright tests
run: yarn workspace website e2e:ci-full
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: aksel.nav.no/website/playwright-report/
retention-days: 10
-30
View File
@@ -1,30 +0,0 @@
name: "push-to-cdn"
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "fonts/**"
jobs:
upload:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: "actions/checkout@v3"
- id: upload
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
cdn-team-name: aksel
source: ./fonts
destination: "" # uploads folder to team root
- run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
+32 -26
View File
@@ -1,7 +1,10 @@
name: Release
name: Release packages
on:
push:
paths:
- ".changeset/**"
- "@navikt/**"
branches:
- main
workflow_dispatch:
@@ -10,8 +13,8 @@ concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
name: "Release packages"
if: ${{!contains(github.event.head_commit.message, '[ci skip]')}}
name: Release packages
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }}
runs-on: ubuntu-latest
permissions:
id-token: "write"
@@ -19,39 +22,38 @@ jobs:
packages: "write"
pull-requests: "write"
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 16.13.0
node-version: lts/*
cache: yarn
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod
cache-dependency-path: "yarn.lock"
- name: Install dependencies
run: yarn
env:
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
- name: Create release Pull Request or publish to NPM
id: changesets
uses: changesets/action@v1
with:
version: yarn version
version: yarn create-version
publish: yarn release
createGithubReleases: false
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
# Use OIDC for npm authentication instead of NPM_TOKEN
# https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
NPM_TOKEN: ""
# Needed for push to main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
- name: Creating .npmrc
- name: Create .npmrc for GPR
run: |
cat << EOF > "$HOME/.npmrc"
@navikt:registry=https://npm.pkg.github.com
@@ -68,21 +70,23 @@ jobs:
publish: yarn changeset publish
createGithubReleases: false
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION }}
NPM_TOKEN: ""
# Needed for push to main
GITHUB_TOKEN: ${{ secrets.GIT_REPO }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION }}
- name: Generate icon.zip
if: steps.changesets.outputs.published == 'true'
run: yarn zip:icons
- name: Upload updated icon.zip to NAV CDN
- name: Upload updated icon.zip to Nav CDN
if: steps.changesets.outputs.published == 'true'
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: aksel
source: ./@navikt/aksel-icons/aksel-icons.zip
destination: "/icons/zip"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Get @navikt/ds-css version
run: |
@@ -90,10 +94,12 @@ jobs:
echo "version=$VERSION" >> $GITHUB_ENV
echo "Version of @navikt/ds-css: ${{ env.version }}"
- name: Upload CSS to NAV CDN
- name: Upload CSS to Nav CDN
if: steps.changesets.outputs.published == 'true'
uses: navikt/frontend/actions/cdn-upload/v1@main
uses: nais/deploy/actions/cdn-upload/v2@master
with:
cdn-team-name: aksel
team: aksel
source: ./@navikt/core/css/dist/version/${{env.version}}
destination: "@navikt/ds-css"
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
-48
View File
@@ -1,48 +0,0 @@
name: Smoketest aksel.nav.no
on:
push:
branches:
- main
paths:
- "aksel.nav.no/**"
env:
IMAGE: ghcr.io/navikt/aksel
jobs:
smoketest:
name: Smoketest Aksel
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.30.0-focal
steps:
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/checkout@v3
- name: add tokens to .env
run: |
echo "SANITY_WRITE_KEY=${{ secrets.SANITY_FEEDBACK_WRITE_KEY }}" >> aksel.nav.no/website/.env
echo "SANITY_PREVIEW_TOKEN=${{ secrets.SANITY_PREVIEW_TOKEN }}" >> aksel.nav.no/website/.env
echo "SANITY_PRIVATE_NO_DRAFTS=${{ secrets.SANITY_PRIVATE_NO_DRAFTS }}" >> aksel.nav.no/website/.env
- name: Restore cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-prod-${{ github.sha }}
restore-keys: |
${{ runner.os }}-prod-
- name: Install dependencies
run: yarn
- name: build packages
run: |
yarn boot
- name: Build application
run: yarn workspace aksel.nav.no build:next
- name: E2E smoketest
run: yarn workspace website e2e:ci
-42
View File
@@ -1,42 +0,0 @@
name: Update Icons
on:
# schedule:
# - cron: 0 0 * * *
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v3
id: node-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: install
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install
- name: postinstall
if: steps.node-cache.outputs.cache-hit == 'true'
run: yarn postinstall
- name: Update Icons
run: yarn workspace @navikt/ds-icons update
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_IKONER_API }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GIT_REPO }}
commit-message: "Ikoner synket fra figma"
branch: figma-icons-sync
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
delete-branch: true
title: "Ikonsynk Figma"
-39
View File
@@ -1,39 +0,0 @@
name: Update tokens
on:
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Node-modules cache
uses: actions/cache@v3
id: node-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: install
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install
- name: postinstall
if: steps.node-cache.outputs.cache-hit == 'true'
run: yarn postinstall
- name: Update tokens
run: yarn workspace @navikt/ds-tokens update
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_IKONER_API }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: figma-tokens-sync
delete-branch: true
title: "Tokens sync Figma"
commit-message: "Tokens synket fra figma"
committer: GitHub <noreply@github.com>
signoff: false
+5 -11
View File
@@ -76,9 +76,9 @@ yarn-error.log
# Transpiled package files
packages/**/lib
*.d.ts
.vscode
.nvim.lua
# File created on build in nav-frontend-core
*-exports.less
@@ -90,15 +90,10 @@ dist/
assets.json
lib/
lerna-debug.log
examples/legacy/node_modules
examples/legacy/out
examples/webpack/node_modules
examples/webpack/out
.gitattributes
.iml
.DS_Store
*.d.ts
*-exports.less
*/figma-api/icons
*/ds-icons/png
@@ -112,13 +107,12 @@ utilities/**/css
*/**/NAV-ikonpakke-png.zip
*/**/NAV-ikonpakke-svg.zip
react-docgen.json
react-docgen-docs.json
cjs
esm
@navikt/community/navno/css
.vercel
_docs.json
_metadata.json
**/component-names.generated.ts
.yarn/*
.yarn/cache
@@ -136,7 +130,6 @@ _docs.json
.next
!*/website/lib/
!*/website/public/
!aksel.nav.no/**/*.d.ts
!*/sanity/lib/
!*/sanity/static/
out
@@ -150,4 +143,5 @@ playwright-report/
/test-results/
backup-*.tar.gz
sitemap-urls.json
*.tar.gz
*.tar.gz
aksel.nav.no/website/public/rss
+7 -34
View File
@@ -1,36 +1,9 @@
echo "husky - DEPRECATED
Please remove the following two lines from $0:
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}
. \"\$(dirname -- \"\$0\")/_/husky.sh\"
readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."
if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi
if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi
readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"
if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi
if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi
exit $exitCode
fi
They WILL FAIL in v10.0.0
"
+6
View File
@@ -0,0 +1,6 @@
CHANGED=`git diff $1 $2 --stat -- yarn.lock | wc -l`
if [ $CHANGED -gt 0 ];
then
echo
echo "*** 🟡 yarn.lock has changed 🟡 ***"
fi
+6
View File
@@ -0,0 +1,6 @@
CHANGED=`git diff HEAD@{1} --stat -- yarn.lock | wc -l`
if [ $CHANGED -gt 0 ];
then
echo
echo "*** 🟡 yarn.lock has changed 🟡 ***"
fi
+1 -4
View File
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname $0)/_/husky.sh"
yarn pretty-quick --staged && yarn lint-staged
yarn lint-staged
+10
View File
@@ -0,0 +1,10 @@
# Only run tests when pushing to main branch
while read local_ref local_sha remote_ref remote_sha; do
if [ "$remote_ref" = "refs/heads/main" ]; then
echo "Pushing to main branch - running tests...\n"
yarn test
exit $?
fi
done
exit 0
+8
View File
@@ -0,0 +1,8 @@
designsystemet:
# commits: ""
# issues: ""
pulls: "#aksel-issues-pr"
workflows: "#aksel-issues-pr"
releases: "#aksel-github-releases"
config:
silenceDependabot: "always"
+13 -2
View File
@@ -1,2 +1,13 @@
**/nais-dev.yaml
**/nais-prod.yaml
**/codemod/**/tests/**/*.js
**/@navikt/aksel/**/*.input.*
**/@navikt/aksel/**/*.output.*
node_modules
.next
dist
public
static
cjs
esm
aksel-icons/template
aksel-icons/icons/*.svg
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

+175
View File
@@ -0,0 +1,175 @@
import { Meta } from "@storybook/addon-docs/blocks";
import AkselThumbnail from "./assets/aksel-thumbnail.png";
import Components from "./assets/components.png";
import Setup from "./assets/setup.png";
<Meta title="Docs/Getting started" />
<div className="sb-container">
<div className='sb-section-title'>
# Getting started
Aksel is the toolbox for product development <a href="https://aksel.nav.no"target="_blank">@Nav</a> (Norwegian Labour and Welfare Administration)
This includes a designsystem, best practices for product-development, principles for user-experience and a blog. <a href="https://aksel.nav.no/god-praksis/artikler/om-aksel" target="_blank">
Read more about Aksel.</a>
</div>
<div className="sb-section">
<div className="sb-section-item">
<img
src={AkselThumbnail}
alt="Aksel-thumbnail"
aria-hidden
/>
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no"
target="_blank"
className="sb-link"
>Website</a></h3>
<p className="sb-section-item-paragraph">Includes everything you need to get started building and developing digital products for Nav today.</p>
</div>
<div className="sb-section-item">
<img
src={Setup}
alt="Setup-thumbnail"
aria-hidden
/>
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/grunnleggende/introduksjon/kom-i-gang-med-kodepakkene"
target="_blank"
className="sb-link"
>Setup</a></h3>
<p className="sb-section-item-paragraph">Get started developing using our solutions. How to install, setup and use our React, CSS and Icons.</p>
</div>
<div className="sb-section-item">
<img
src={Components}
alt="Components-thumbnail"
aria-hidden
/>
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/komponenter"
target="_blank"
className="sb-link"
>Components</a></h3>
<p className="sb-section-item-paragraph">Browse trough 40+ components with examples, do and don't, props and accessibility information.</p>
</div>
</div>
</div>
<div className="sb-container">
<div className='sb-section-title'>
## More than just a component library
Aksel offers tools that makes developing frontend-applications easier.
</div>
<div className="sb-section">
<div className="sb-section-item">
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/ikoner"
target="_blank"
className="sb-link"
>Icons</a></h3>
<p className="sb-section-item-paragraph">We provide an icon library with 800+ open-source icons.</p>
</div>
<div className="sb-section-item">
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/grunnleggende/styling/design-tokens"
target="_blank"
className="sb-link"
>Tokens</a></h3>
<p className="sb-section-item-paragraph">Colors, spacing, shadows and more. All available for CSS, SASS, Less and JS.</p>
</div>
<div className="sb-section-item">
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/grunnleggende/kode/stylelint"
target="_blank"
className="sb-link"
>Stylelint</a></h3>
<p className="sb-section-item-paragraph">Using our Stylelint-plugin helps keep your code free from bugs and makes adopting updates safer.</p>
</div>
<div className="sb-section-item">
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/grunnleggende/kode/tailwind"
target="_blank"
className="sb-link"
>Tailwind</a></h3>
<p className="sb-section-item-paragraph">Our tokens made available as a simple tailwind-config.</p>
</div>
<div className="sb-section-item">
<h3 className="sb-section-item-heading"><a
href="https://aksel.nav.no/grunnleggende/kode/kommandolinje"
target="_blank"
className="sb-link"
>CLI</a></h3>
<p className="sb-section-item-paragraph">CLI for codemods</p>
</div>
</div>
</div>
<style>
{`
.sb-container {
margin-bottom: 48px;
}
.sb-section {
width: 100%;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 1.5rem;
}
.sb-link{
text-decoration: underline;
color: #111;
}
img {
object-fit: cover;
padding-bottom: 1.25rem;
border-radius: 8px;
}
.sb-section-title {
margin-bottom: 2rem;
}
.sb-section-item-heading {
padding-bottom: 0.25rem
margin: 0 !important;
}
.sb-section-item-paragraph {
margin: 0;
padding-bottom: 0.75rem;
}
@media screen and (max-width: 768px) {
.sb-section {
grid-template-columns: repeat(1, 1fr);
}
}
`}
</style>
-33
View File
@@ -1,33 +0,0 @@
import { loadCsf } from "@storybook/csf-tools";
import { readFileSync } from "fs";
module.exports = (indexers) => {
const csfIndexer = async (fileName: string, opts) => {
const code = readFileSync(fileName, "utf-8").toString();
return loadCsf(code, { ...opts, fileName }).parse();
};
const exampleIndexer = async (fileName: string, opts) => {
let code = readFileSync(fileName, "utf-8").toString();
code = code.replace("export const args =", "const args =");
code += `\nexport default { title: "Eksempler/${fileName
.split("pages/eksempler/")[1]
.replace(".tsx", "")}" };\n`;
return loadCsf(code, { ...opts, fileName }).parse();
};
return [
...(indexers || []),
{
test: /(stories|story)\.[tj]sx?$/,
indexer: csfIndexer,
},
{
test: /pages\/eksempler\/|(".+")|(.+.tsx)$/,
indexer: exampleIndexer,
},
];
};
-38
View File
@@ -1,38 +0,0 @@
import { Meta, Canvas } from "@storybook/addon-docs";
<Meta title="Intro" />
# Aksel, NAVs designsystem
[Dokumentasjon](https://aksel.nav.no/komponenter)
### Core
```bash
yarn add @navikt/ds-react @navikt/ds-css
```
### Interne-flater
```bash
yarn add @navikt/ds-react-internal @navikt/ds-css-internal
```
### Ikoner
[Dokumentasjon](https://aksel.nav.no/ikoner)
```bash
yarn add @navikt/aksel-icons
```
### Bruk
```jsx
import { Heading } from "@navikt/ds-react";
import "@navikt/ds-css";
<Heading level="1" size="xlarge">
Sidetitel
</Heading>;
```
+21 -13
View File
@@ -1,3 +1,7 @@
body {
background-color: var(--ax-bg-default);
}
.rowgap {
display: flex;
gap: 1rem;
@@ -11,21 +15,25 @@
padding: 1rem;
}
.colgap[data-theme="dark"],
.rowgap[data-theme="dark"] {
background-color: #262626;
}
.rowgap-wrap {
flex-wrap: wrap;
}
.css-warning {
position: absolute;
top: 1rem;
right: 1rem;
border-radius: 6px;
padding: 1.5rem;
background-color: var(--a-surface-warning-subtle);
border: 1px solid var(--a-border-warning);
.storyheading {
font-size: 18px;
background: lightblue;
color: #23262a;
padding: 2px 4px;
}
.sbdocs-content:not(.sb-unstyled) :is(p, li) {
font-size: 1.125rem;
}
.sbdocs-content:not(.sb-unstyled) li > p {
margin-bottom: 0;
}
.sbdocs-content:not(.sb-unstyled) li > ul {
margin-top: 0.25rem;
}
-89
View File
@@ -1,89 +0,0 @@
const storyIndexers = require("./indexer");
const path = require("path");
const { mergeConfig } = require("vite");
module.exports = {
storyIndexers,
devServer: {
stats: "errors-only",
},
staticDirs: ["./public"],
stories: () => [
"../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)",
"./*.stories.mdx",
...(process.env.STORYBOOK_STORIES === "all"
? [
"../aksel.nav.no/website/components/**/*.stories.tsx",
"../aksel.nav.no/website/pages/eksempler/**/*.tsx",
]
: []),
],
addons: [
"@storybook/addon-a11y",
"@whitespace/storybook-addon-html",
"@storybook/addon-interactions",
{
name: "@storybook/addon-storysource",
options: {
loaderOptions: {
injectStoryParameters: false,
},
},
},
{
name: "@storybook/addon-essentials",
options: {
actions: false,
controls: {
hideNoControlsWarning: true,
},
},
},
],
framework: {
name: "@storybook/react-vite",
options: {},
},
features: {
storyStoreV7: true,
},
docs: {
autodocs: "tag",
},
typescript: {
check: false,
checkOptions: {},
reactDocgen: false,
},
async viteFinal(config) {
return mergeConfig(config, {
define: { "process.env": {} },
resolve: {
alias: [
/*
// Example
{
find: "@components",
replacement: path.resolve(__dirname, "./src/components"),
}, */
{
find: "components",
replacement: path.resolve(
__dirname,
"../aksel.nav.no/website/components"
),
},
{
find: "@utils",
replacement: path.resolve(
__dirname,
"../aksel.nav.no/website/components/website-modules/utils/index.ts"
),
},
],
},
});
},
};
+160
View File
@@ -0,0 +1,160 @@
import { defineMain } from "@storybook/react-vite/node";
import FG from "fast-glob";
import { readFileSync } from "node:fs";
import { createRequire } from "node:module";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
import { loadCsf } from "storybook/internal/csf-tools";
import turbosnap from "vite-plugin-turbosnap";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(import.meta.url);
const includeWebsiteStories = process.env.WITH_WEBSITE === "true";
const indexRegex = /export const args = {\s+index: (\d+),/;
const addons = [
getAbsolutePath("@storybook/addon-a11y"),
getAbsolutePath("@storybook/addon-themes"),
getAbsolutePath("@storybook/addon-docs"),
getAbsolutePath("@storybook/addon-vitest"),
];
if (process.env.NODE_ENV === "development") {
addons.push(getAbsolutePath("@github-ui/storybook-addon-performance-panel"));
}
export default defineMain({
experimental_indexers: (indexers) => {
// Changes here might need to be reflected in aksel.nav.no/website/.storybook/main.ts
const customIndexer = async (fileName: string, opts: any) => {
try {
let code = readFileSync(fileName, "utf-8").toString();
const index = indexRegex.exec(code)?.[1];
code = code.split(
/\/\/ EXAMPLES DO NOT INCLUDE CONTENT BELOW THIS LINE/,
)[0];
const templatePath = fileName.split(`pages/templates/`)[1];
if (!templatePath) {
console.warn(`[Storybook] Invalid template path: ${fileName}`);
return [];
}
const [templateName, name] = templatePath
.replace(".tsx", "")
.split("/");
if (!templateName || !name) {
console.warn(
`[Storybook] Could not parse template name from: ${fileName}`,
);
return [];
}
const storyName = process.env.CHROMATIC
? `${templateName} [${index ?? "0"}] ${name}` // Chromatic does not support folders, and doesn't like |
: `${index ?? "0"} | ${name}`;
code += `
export default { title: "Templates/${templateName}/${storyName}" };
export const Demo = { render: Example };
Demo.storyName = "${storyName}";`;
return loadCsf(code, {
...opts,
fileName,
}).parse().indexInputs;
} catch (error) {
console.error(`[Storybook] Failed to index ${fileName}:`, error);
return [];
}
};
return [
...(indexers || []),
{
test: /pages\/templates\/.+?.tsx$/,
createIndex: customIndexer,
},
];
},
staticDirs: ["./public"],
stories: resolveStoriesPaths(),
addons,
framework: {
name: getAbsolutePath("@storybook/react-vite"),
options: {},
},
typescript: {
check: false,
reactDocgen: false,
},
async viteFinal(config, { configType }) {
const { mergeConfig } = await import("vite");
return mergeConfig(config, {
build: { cssMinify: "lightningcss" },
resolve: {
tsconfigPaths: true,
},
plugins:
configType === "PRODUCTION"
? [
turbosnap({
rootDir: config.root ?? process.cwd(),
}),
]
: [],
} satisfies typeof config);
},
/* Lets us preview Roboto-flex font in storybook. */
previewHead: (head) => `
${head}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">`,
features: {
actions: false,
},
});
function getAbsolutePath(value: string) {
return dirname(require.resolve(join(value, "package.json")));
}
function resolveStoriesPaths() {
const paths = [
"../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)",
"./docs/*.mdx",
"./docs/*.stories.tsx",
];
if (includeWebsiteStories) {
paths.push("../aksel.nav.no/website/pages/templates/**/*.tsx");
}
return FG.sync(paths, {
cwd: __dirname,
ignore: [
"../**/node_modules/**",
"**/dist",
"**/build",
"**/.next",
"**/esm",
"**/cjs",
],
});
}
Loaded 100 of 5605 files, more files were not shown because too many files have changed in this diff. Show more