Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
638e8260b4 | ||
|
|
d991011690 | ||
|
|
b6086f7b1f | ||
|
|
05462081aa | ||
|
|
63e42de3ee | ||
|
|
2e85178166 | ||
|
|
456d4e2e07 | ||
|
|
b5a0cb8cdf | ||
|
|
a2af9bcc37 | ||
|
|
bd45754adb | ||
|
|
a882a8a389 | ||
|
|
d1606d358a | ||
|
|
bb87837632 | ||
|
|
9c8b2301ed | ||
|
|
54ba483d2d | ||
|
|
85f5458c06 | ||
|
|
19abec80f7 | ||
|
|
b2ddce5279 | ||
|
|
bd7c945158 | ||
|
|
ca24684a25 | ||
|
|
1564363985 | ||
|
|
ca8d36e885 | ||
|
|
8efc6c58be | ||
|
|
2ea2a91a37 | ||
|
|
aebba20fd4 | ||
|
|
5ce4b4ea79 | ||
|
|
548d9bb169 | ||
|
|
25e0d15d67 | ||
|
|
98f6d7dde4 | ||
|
|
6ac605dd48 | ||
|
|
d293d44b30 | ||
|
|
5754a08f6c | ||
|
|
924c63324c | ||
|
|
b78b818fea | ||
|
|
dc5ea3b842 | ||
|
|
bd315a239b | ||
|
|
4469c641ed | ||
|
|
b15218e1cb | ||
|
|
73a69f7048 | ||
|
|
7dcd58ff76 | ||
|
|
2f3c99f5f6 | ||
|
|
8835291a78 | ||
|
|
2971129d1f | ||
|
|
9915cf8232 | ||
|
|
fa00774b0d | ||
|
|
966de79621 | ||
|
|
0ce2300f92 | ||
|
|
08e9876176 | ||
|
|
331b4c4c00 | ||
|
|
2b6e9c8798 | ||
|
|
4065ee3987 | ||
|
|
59756f32f7 | ||
|
|
9510327abe | ||
|
|
356119e074 | ||
|
|
3d2eab4fda | ||
|
|
299c5f1db4 | ||
|
|
6267d0c7fb | ||
|
|
44ba2ef7e8 | ||
|
|
002f6a1b9e | ||
|
|
124c28eb0e | ||
|
|
ae7d4d5f07 | ||
|
|
bb5dd32357 | ||
|
|
9581fb33f2 | ||
|
|
884bf0c997 | ||
|
|
c0c812b77b | ||
|
|
fd4358df31 | ||
|
|
bf77c03cd8 | ||
|
|
91e34e8ad8 | ||
|
|
15f88a104f | ||
|
|
5100662ea7 | ||
|
|
bea55aa8bc | ||
|
|
7585351483 | ||
|
|
636c1ad49b |
No files matched your search
@@ -46,7 +46,8 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
files: ["**/*.test.*", "**/__tests__/*"],
|
||||
extends: ["plugin:jest/recommended", "plugin:testing-library/react"],
|
||||
plugins: ["vitest"],
|
||||
extends: ["plugin:vitest/recommended", "plugin:testing-library/react"],
|
||||
},
|
||||
|
||||
{
|
||||
@@ -71,7 +72,6 @@ module.exports = {
|
||||
"error",
|
||||
"aksel.nav.no/website/pages/",
|
||||
],
|
||||
"@typescript-eslint/ban-ts-comment": "off", // Temporary
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ add links to project-tasks, slack discussions etc here
|
||||
- Check that only needed components and types are exported from `@navikt/core/react/src/index.ts`
|
||||
- Add JSDoc to component (see other components for reference)
|
||||
- Create storybook-stories for relevant component variations and compositions. Stories are used for [visual regression testing](https://www.chromatic.com/docs/), so make sure they are complete.
|
||||
- Is the component sufficiently complex to warrant tests? Add some unit-tests for jest.
|
||||
- Is the component sufficiently complex to warrant tests? Add some unit-tests for vitest.
|
||||
|
||||
#### Component-updates 🎉
|
||||
|
||||
|
||||
@@ -14,12 +14,18 @@ jobs:
|
||||
contents: "read"
|
||||
id-token: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
- uses: actions/checkout@v3
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
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
|
||||
@@ -29,14 +35,6 @@ jobs:
|
||||
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
|
||||
|
||||
@@ -46,11 +44,13 @@ jobs:
|
||||
yarn workspace aksel.nav.no build:next
|
||||
|
||||
- name: Upload static files to NAV CDN
|
||||
uses: navikt/frontend/actions/cdn-upload/v1@main
|
||||
uses: nais/deploy/actions/cdn-upload/v2@master
|
||||
with:
|
||||
cdn-team-name: aksel
|
||||
team: designsystem
|
||||
source: ./aksel.nav.no/website/.next/static
|
||||
destination: "/website/_next"
|
||||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
|
||||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
|
||||
|
||||
- name: Get complete tag
|
||||
run: echo "TAG=DEV-$( date +%s )" >> $GITHUB_ENV
|
||||
|
||||
@@ -14,22 +14,20 @@ jobs:
|
||||
name: Update component data
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
- uses: actions/checkout@v3
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- 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
|
||||
|
||||
@@ -49,25 +47,24 @@ jobs:
|
||||
contents: "read"
|
||||
id-token: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
- uses: actions/checkout@v3
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "SLACK_BOT_TOKEN=${{ secrets.SLACK_BOT_TOKEN }}" >> aksel.nav.no/website/.env
|
||||
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
|
||||
|
||||
@@ -75,17 +72,19 @@ jobs:
|
||||
run: yarn boot
|
||||
|
||||
- name: Tests
|
||||
run: yarn workspace aksel.nav.no test
|
||||
run: yarn workspace website 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
|
||||
uses: nais/deploy/actions/cdn-upload/v2@master
|
||||
with:
|
||||
cdn-team-name: aksel
|
||||
team: designsystem
|
||||
source: ./aksel.nav.no/website/.next/static
|
||||
destination: "/website/_next"
|
||||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
|
||||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
|
||||
|
||||
- name: Get complete tag
|
||||
run: echo "TAG=PROD-$( date +%s )" >> $GITHUB_ENV
|
||||
|
||||
@@ -11,17 +11,15 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Required to retrieve git history
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
@@ -24,14 +24,9 @@ jobs:
|
||||
with:
|
||||
node-version: "20"
|
||||
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: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
@@ -19,6 +19,10 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
@@ -26,14 +30,6 @@ jobs:
|
||||
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
|
||||
|
||||
|
||||
@@ -20,11 +20,13 @@ jobs:
|
||||
- uses: "actions/checkout@v3"
|
||||
|
||||
- id: upload
|
||||
uses: navikt/frontend/actions/cdn-upload/v1@main
|
||||
uses: nais/deploy/actions/cdn-upload/v2@master
|
||||
with:
|
||||
cdn-team-name: aksel
|
||||
team: aksel
|
||||
source: ./fonts
|
||||
destination: "" # uploads folder to team root
|
||||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
|
||||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
|
||||
|
||||
- run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
|
||||
shell: bash
|
||||
@@ -30,19 +30,14 @@ jobs:
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.x
|
||||
|
||||
- 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
|
||||
|
||||
@@ -85,11 +80,13 @@ jobs:
|
||||
|
||||
- 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: |
|
||||
@@ -99,8 +96,10 @@ jobs:
|
||||
|
||||
- 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 }}
|
||||
@@ -4,10 +4,7 @@ import turbosnap from "vite-plugin-turbosnap";
|
||||
export default {
|
||||
staticDirs: ["./public"],
|
||||
|
||||
stories: () => [
|
||||
"../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
||||
"./*.stories.mdx",
|
||||
],
|
||||
stories: () => ["../@navikt/**/*.stories.@(js|jsx|ts|tsx|mdx)", "./*.mdx"],
|
||||
addons: [
|
||||
"@storybook/addon-a11y",
|
||||
"@xfinx/storybook-addon-html",
|
||||
@@ -29,14 +26,12 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
"storybook-addon-pseudo-states",
|
||||
],
|
||||
framework: {
|
||||
name: "@storybook/react-vite",
|
||||
options: {},
|
||||
},
|
||||
features: {
|
||||
storyStoreV7: true,
|
||||
},
|
||||
docs: {
|
||||
autodocs: "tag",
|
||||
},
|
||||
|
||||
@@ -2,6 +2,12 @@ enableImmutableInstalls: false
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
npmScopes:
|
||||
navikt:
|
||||
npmAlwaysAuth: true
|
||||
npmAuthToken: "${NPM_AUTH_TOKEN:-}"
|
||||
npmRegistryServer: "https://npm.pkg.github.com"
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||
spec: "@yarnpkg/plugin-workspace-tools"
|
||||
|
||||
@@ -1,5 +1,37 @@
|
||||
# @navikt/aksel-icons
|
||||
|
||||
## 6.3.4
|
||||
|
||||
## 6.3.3
|
||||
|
||||
## 6.3.2
|
||||
|
||||
## 6.3.1
|
||||
|
||||
## 6.3.0
|
||||
|
||||
## 6.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Ikoner: Nytt ikon `archive` ([#2772](https://github.com/navikt/aksel/pull/2772))
|
||||
|
||||
- Ikoner: Nytt ikon `opensource` ([#2787](https://github.com/navikt/aksel/pull/2787))
|
||||
|
||||
## 6.1.1
|
||||
|
||||
## 6.1.0
|
||||
|
||||
## 6.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- ESM: ds-react og aksel-icons støtter nå native ESM 🎉 ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- SSR: ds-react og aksel-icons støtter nå `use client` og kan brukes i nextjs app-router uten lokal re-eksportering. ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
## 5.18.3
|
||||
|
||||
## 5.18.2
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
const fastglob = require("fast-glob");
|
||||
const path = require("path");
|
||||
const jsYaml = require("js-yaml");
|
||||
const fs = require("fs");
|
||||
import fastglob from "fast-glob";
|
||||
import fs from "fs";
|
||||
import jsYaml from "js-yaml";
|
||||
import path from "path";
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
const basePath = path.resolve(__dirname, "../icons");
|
||||
|
||||
@@ -11,7 +12,7 @@ const ymlList = fastglob
|
||||
|
||||
describe(`Each icons YML-config is valid`, () => {
|
||||
ymlList.forEach((file) => {
|
||||
it(`${file} has valid YML-config`, () => {
|
||||
test(`${file} has valid YML-config`, () => {
|
||||
const ymlData = jsYaml.load(fs.readFileSync(`${basePath}/${file}`), {
|
||||
schema: jsYaml.JSON_SCHEMA,
|
||||
});
|
||||
@@ -1,5 +1,6 @@
|
||||
const fastglob = require("fast-glob");
|
||||
const path = require("path");
|
||||
import fastglob from "fast-glob";
|
||||
import path from "path";
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
const basePath = path.resolve(__dirname, "../icons");
|
||||
|
||||
@@ -12,7 +13,7 @@ const ymlList = fastglob
|
||||
.map((fileN) => path.basename(fileN));
|
||||
|
||||
describe(`Each SVG-file has a matching YML file`, () => {
|
||||
it(`must have a corresponding YML file`, () => {
|
||||
test(`must have a corresponding YML file`, () => {
|
||||
expect(
|
||||
ymlList
|
||||
.map((yml) => yml.replace(".yml", ".svg"))
|
||||
@@ -22,7 +23,7 @@ describe(`Each SVG-file has a matching YML file`, () => {
|
||||
});
|
||||
|
||||
describe(`Each YML-file has a matching SVG file`, () => {
|
||||
it(`must have a corresponding SVG file`, () => {
|
||||
test(`must have a corresponding SVG file`, () => {
|
||||
expect(
|
||||
svgList
|
||||
.map((svg) => svg.replace(".svg", ".yml"))
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { parseIcon } from "../config/parse-svg";
|
||||
|
||||
describe(`SVG should be correctly parsed`, () => {
|
||||
@@ -27,7 +28,7 @@ describe(`SVG should be correctly parsed`, () => {
|
||||
</svg>
|
||||
`;
|
||||
|
||||
it("a", () => {
|
||||
test("a", () => {
|
||||
expect(parseIcon(simpleSvg)).toEqual(simpleSvgResult);
|
||||
expect(parseIcon(advancedSvg)).toEqual(advancedSvgResult);
|
||||
});
|
||||
@@ -4,6 +4,7 @@ import { select, selectAll } from "hast-util-select";
|
||||
import { basename } from "path";
|
||||
import parse from "rehype-parse";
|
||||
import { unified } from "unified";
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
const basePath = "./icons";
|
||||
|
||||
@@ -18,39 +19,44 @@ describe(`Each icons has a valid code`, () => {
|
||||
.use(parse, { fragment: true, space: "svg" })
|
||||
.parse(readFileSync(`${basePath}/${file}`));
|
||||
|
||||
it(`has valid attributes on root-node`, () => {
|
||||
const properties = Object.keys(
|
||||
select(":root", iconAst).properties,
|
||||
).sort();
|
||||
test(`has valid attributes on root-node`, () => {
|
||||
const root = select(":root", iconAst);
|
||||
const properties =
|
||||
root && root.properties ? Object.keys(root.properties).sort() : [];
|
||||
|
||||
expect(properties).toStrictEqual(
|
||||
["viewBox", "xmlns", "height", "width", "fill"].sort(),
|
||||
);
|
||||
});
|
||||
|
||||
it(`has valid xml-attr`, () => {
|
||||
const xmlns = select(":root", iconAst).properties.xmlns;
|
||||
test(`has valid xml-attr`, () => {
|
||||
const root = select(":root", iconAst);
|
||||
const xmlns = root && root.properties ? root.properties.xmlns : null;
|
||||
expect(xmlns).toBe("http://www.w3.org/2000/svg");
|
||||
});
|
||||
|
||||
it(`has valid viewbox`, () => {
|
||||
const viewbox = select(":root", iconAst).properties.viewBox;
|
||||
test(`has valid viewbox`, () => {
|
||||
const root = select(":root", iconAst);
|
||||
const viewbox =
|
||||
root && root.properties ? root.properties.viewBox : null;
|
||||
expect(viewbox).toBe("0 0 24 24");
|
||||
});
|
||||
|
||||
it(`root fill is none`, () => {
|
||||
const fill = select(":root", iconAst).properties.fill;
|
||||
test(`root fill is none`, () => {
|
||||
const root = select(":root", iconAst);
|
||||
const fill = root && root.properties ? root.properties.fill : null;
|
||||
expect(fill).toBe("none");
|
||||
});
|
||||
|
||||
it(`has valid width and height`, () => {
|
||||
const width = select(":root", iconAst).properties.width;
|
||||
const height = select(":root", iconAst).properties.height;
|
||||
test(`has valid width and height`, () => {
|
||||
const root = select(":root", iconAst);
|
||||
const width = root && root.properties ? root.properties.width : null;
|
||||
const height = root && root.properties ? root.properties.height : null;
|
||||
expect(width).toBe("24");
|
||||
expect(height).toBe("24");
|
||||
});
|
||||
|
||||
it(`has valid stroke`, () => {
|
||||
test(`has valid stroke`, () => {
|
||||
const nodes = selectAll("*", iconAst);
|
||||
|
||||
nodes.forEach((n) => {
|
||||
@@ -59,7 +65,7 @@ describe(`Each icons has a valid code`, () => {
|
||||
});
|
||||
});
|
||||
|
||||
it(`has valid stroke-width`, () => {
|
||||
test(`has valid stroke-width`, () => {
|
||||
const nodes = selectAll("*", iconAst);
|
||||
nodes.forEach((n) => {
|
||||
n.properties?.strokeWidth &&
|
||||
@@ -25,6 +25,7 @@ const template = (variables, { tpl }) => {
|
||||
};
|
||||
|
||||
return tpl`
|
||||
"use client";
|
||||
${imports};
|
||||
|
||||
${variables.interfaces};
|
||||
|
||||
@@ -6,5 +6,8 @@
|
||||
"ui": "dist/index.html",
|
||||
"capabilities": [],
|
||||
"enableProposedApi": false,
|
||||
"editorType": ["figma", "figjam"]
|
||||
"editorType": ["figma", "figjam"],
|
||||
"networkAccess": {
|
||||
"allowedDomains": ["none"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.25 4C3.25 3.58579 3.58579 3.25 4 3.25H20C20.4142 3.25 20.75 3.58579 20.75 4V8C20.75 8.41421 20.4142 8.75 20 8.75H19.75V19C19.75 19.9665 18.9665 20.75 18 20.75H6C5.0335 20.75 4.25 19.9665 4.25 19V8.75H4C3.58579 8.75 3.25 8.41421 3.25 8V4ZM5.75 8.75H18.25V19C18.25 19.1381 18.1381 19.25 18 19.25H6C5.86193 19.25 5.75 19.1381 5.75 19V8.75ZM4.75 4.75V7.25H19.25V4.75H4.75ZM14 13.25C14.4142 13.25 14.75 12.9142 14.75 12.5C14.75 12.0858 14.4142 11.75 14 11.75H10C9.58579 11.75 9.25 12.0858 9.25 12.5C9.25 12.9142 9.58579 13.25 10 13.25H14Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 707 B |
@@ -0,0 +1,10 @@
|
||||
name: Archive
|
||||
category: Interface
|
||||
sub_category: Communication
|
||||
keywords:
|
||||
- arkiv
|
||||
- box
|
||||
- boks
|
||||
variant: Stroke
|
||||
updated_at: 22.02.2024
|
||||
created_at: 22.02.2024
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3.25C3.58579 3.25 3.25 3.58579 3.25 4V7.5C3.25 7.91421 3.58579 8.25 4 8.25H20C20.4142 8.25 20.75 7.91421 20.75 7.5V4C20.75 3.58579 20.4142 3.25 20 3.25H4ZM19.5 9.25C19.6381 9.25 19.75 9.36193 19.75 9.5V19C19.75 19.9665 18.9665 20.75 18 20.75H6C5.0335 20.75 4.25 19.9665 4.25 19V9.5C4.25 9.36193 4.36193 9.25 4.5 9.25H19.5ZM14.75 12.5C14.75 12.9142 14.4142 13.25 14 13.25H10C9.58579 13.25 9.25 12.9142 9.25 12.5C9.25 12.0858 9.58579 11.75 10 11.75H14C14.4142 11.75 14.75 12.0858 14.75 12.5Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 663 B |
@@ -0,0 +1,10 @@
|
||||
name: ArchiveFill
|
||||
category: Interface
|
||||
sub_category: Communication
|
||||
keywords:
|
||||
- arkiv
|
||||
- box
|
||||
- boks
|
||||
variant: Fill
|
||||
updated_at: 22.02.2024
|
||||
created_at: 22.02.2024
|
||||
@@ -13,5 +13,5 @@ keywords:
|
||||
- reload
|
||||
- oppdater
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 14.02.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- nivå
|
||||
- innrykk
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 16.01.2024
|
||||
created_at: 04.12.2023
|
||||
@@ -13,5 +13,5 @@ keywords:
|
||||
- forward
|
||||
- videresend
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 23.02.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -13,5 +13,5 @@ keywords:
|
||||
- oppfrisking
|
||||
- oppdatering
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 29.02.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- sortering
|
||||
- sorting
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 22.02.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -15,5 +15,5 @@ keywords:
|
||||
- Sammenføye
|
||||
- Kildekontroll
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 18.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -5,5 +5,5 @@ keywords:
|
||||
- ned
|
||||
- down
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 25.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -5,5 +5,5 @@ keywords:
|
||||
- left
|
||||
- venstre
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 11.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -5,5 +5,5 @@ keywords:
|
||||
- opp
|
||||
- up
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 25.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -8,5 +8,5 @@ keywords:
|
||||
- Utvide/skjule
|
||||
- vise/skjule
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 04.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -15,5 +15,5 @@ keywords:
|
||||
- markup-språk
|
||||
- kildekode
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 01.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -7,5 +7,5 @@ keywords:
|
||||
- downloading
|
||||
- last ned
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 08.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -5,5 +5,5 @@ keywords:
|
||||
- trapp
|
||||
- rulletrapp
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 12.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- open
|
||||
- åpne
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 24.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -13,5 +13,5 @@ keywords:
|
||||
- fremdrift
|
||||
- nedtelling
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 21.02.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -13,5 +13,5 @@ keywords:
|
||||
- fremdrift
|
||||
- nedtelling
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 22.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -13,5 +13,5 @@ keywords:
|
||||
- fremdrift
|
||||
- nedtelling
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 16.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -8,5 +8,5 @@ keywords:
|
||||
- replace
|
||||
- new version
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 18.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.06458 4.26481C7.76736 2.95822 9.85369 2.25 12 2.25C14.1463 2.25 16.2326 2.95821 17.9354 4.2648C19.6382 5.57139 20.8623 7.40334 21.4178 9.47651C21.9733 11.5497 21.8292 13.7482 21.0078 15.7312C20.1865 17.7141 18.7338 19.3706 16.875 20.4437C16.7027 20.5432 16.498 20.5702 16.3059 20.5187C16.1138 20.4672 15.9499 20.3415 15.8505 20.1692L12.7005 14.7133C12.601 14.541 12.5741 14.3363 12.6256 14.1442C12.677 13.952 12.8027 13.7882 12.975 13.6887C13.3468 13.4741 13.6373 13.1428 13.8016 12.7462C13.9658 12.3496 13.9947 11.9099 13.8836 11.4953C13.7725 11.0807 13.5276 10.7143 13.1871 10.453C12.8465 10.1916 12.4293 10.05 12 10.05C11.5707 10.05 11.1535 10.1916 10.8129 10.453C10.4724 10.7143 10.2275 11.0807 10.1164 11.4953C10.0053 11.9099 10.0342 12.3496 10.1984 12.7462C10.3627 13.1428 10.6533 13.4741 11.025 13.6887C11.1973 13.7882 11.323 13.952 11.3744 14.1442C11.4259 14.3363 11.399 14.541 11.2995 14.7133L8.14952 20.1692C8.05007 20.3415 7.88625 20.4672 7.69412 20.5187C7.50198 20.5702 7.29727 20.5432 7.125 20.4437C5.26625 19.3706 3.81354 17.7141 2.99218 15.7312C2.17082 13.7482 2.02672 11.5497 2.58223 9.47652C3.13773 7.40334 4.3618 5.5714 6.06458 4.26481ZM12 3.75C10.1839 3.75 8.41854 4.34926 6.97772 5.45484C5.53691 6.56041 4.50116 8.11052 4.03112 9.86474C3.56107 11.619 3.683 13.4793 4.378 15.1571C4.97686 16.6029 5.97237 17.8436 7.24256 18.7401L9.66674 14.5413C9.29868 14.2034 9.00613 13.7874 8.81262 13.3203C8.52199 12.6186 8.471 11.8407 8.66756 11.1071C8.86412 10.3735 9.29725 9.72526 9.89978 9.26293C10.5023 8.8006 11.2405 8.55 12 8.55C12.7595 8.55 13.4977 8.8006 14.1002 9.26293C14.7028 9.72526 15.1359 10.3735 15.3324 11.1071C15.529 11.8407 15.478 12.6186 15.1874 13.3203C14.9939 13.7874 14.7013 14.2034 14.3333 14.5413L16.7574 18.7401C18.0276 17.8436 19.0231 16.6029 19.622 15.1571C20.317 13.4793 20.4389 11.619 19.9689 9.86474C19.4988 8.11052 18.4631 6.56041 17.0223 5.45483C15.5815 4.34926 13.8161 3.75 12 3.75Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,19 @@
|
||||
name: OpenSource
|
||||
category: Development
|
||||
sub_category: Development
|
||||
keywords:
|
||||
- location
|
||||
- tracking
|
||||
- identification
|
||||
- signaling
|
||||
- broadcasting
|
||||
- detection
|
||||
- lokalisering
|
||||
- sporing
|
||||
- identifikasjon
|
||||
- signalisering
|
||||
- kringkasting
|
||||
- deteksjon
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.06458 4.26481C7.76736 2.95822 9.85369 2.25 12 2.25C14.1463 2.25 16.2326 2.95821 17.9354 4.2648C19.6382 5.57139 20.8623 7.40334 21.4178 9.47651C21.9733 11.5497 21.8292 13.7482 21.0078 15.7312C20.1865 17.7141 18.7338 19.3706 16.875 20.4437C16.7027 20.5432 16.498 20.5702 16.3059 20.5187C16.1138 20.4672 15.9499 20.3415 15.8505 20.1692L12.7005 14.7133C12.601 14.541 12.5741 14.3363 12.6256 14.1442C12.677 13.952 12.8027 13.7882 12.975 13.6887C13.3468 13.4741 13.6373 13.1428 13.8016 12.7462C13.9658 12.3496 13.9947 11.9099 13.8836 11.4953C13.7725 11.0807 13.5276 10.7143 13.1871 10.453C12.8465 10.1916 12.4293 10.05 12 10.05C11.5707 10.05 11.1535 10.1916 10.8129 10.453C10.4724 10.7143 10.2275 11.0807 10.1164 11.4953C10.0053 11.9099 10.0342 12.3496 10.1984 12.7462C10.3627 13.1428 10.6533 13.4741 11.025 13.6887C11.1973 13.7882 11.323 13.952 11.3744 14.1442C11.4259 14.3363 11.399 14.541 11.2995 14.7133L8.14952 20.1692C8.05007 20.3415 7.88625 20.4672 7.69412 20.5187C7.50198 20.5702 7.29727 20.5432 7.125 20.4437C5.26625 19.3706 3.81354 17.7141 2.99218 15.7312C2.17082 13.7482 2.02672 11.5497 2.58223 9.47652C3.13773 7.40334 4.3618 5.5714 6.06458 4.26481Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,19 @@
|
||||
name: OpenSourceFill
|
||||
category: Development
|
||||
sub_category: Development
|
||||
keywords:
|
||||
- location
|
||||
- tracking
|
||||
- identification
|
||||
- signaling
|
||||
- broadcasting
|
||||
- detection
|
||||
- lokalisering
|
||||
- sporing
|
||||
- identifikasjon
|
||||
- signalisering
|
||||
- kringkasting
|
||||
- deteksjon
|
||||
variant: Fill
|
||||
updated_at: 08.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- hidden
|
||||
- show/hide
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 18.01.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.4445 6.61612C12.679 6.3817 12.9969 6.25 13.3284 6.25H17.5C17.6381 6.25 17.75 6.36193 17.75 6.5V10.6716C17.75 11.0031 17.6183 11.321 17.3839 11.5555L9.17678 19.7626C9.07915 19.8602 8.92086 19.8602 8.82322 19.7626L4.23744 15.1768C4.13981 15.0791 4.13981 14.9209 4.23744 14.8232L12.4445 6.61612ZM13.3284 4.75C12.5991 4.75 11.8996 5.03973 11.3839 5.55546L3.17678 13.7626C2.49336 14.446 2.49336 15.554 3.17678 16.2374L7.76256 20.8232C8.44598 21.5066 9.55402 21.5066 10.2374 20.8232L18.4445 12.6161C18.9603 12.1004 19.25 11.4009 19.25 10.6716V6.5C19.25 5.5335 18.4665 4.75 17.5 4.75H13.3284ZM14.5 11C15.3284 11 16 10.3284 16 9.5C16 8.67157 15.3284 8 14.5 8C13.6716 8 13 8.67157 13 9.5C13 10.3284 13.6716 11 14.5 11Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4403 5.61612C13.6748 5.3817 13.9927 5.25 14.3242 5.25H18.4958C18.6339 5.25 18.7458 5.36193 18.7458 5.5V9.67157C18.7458 10.0031 18.6141 10.321 18.3797 10.5555L10.1726 18.7626C10.0749 18.8602 9.91664 18.8602 9.81901 18.7626L5.23323 14.1768C5.1356 14.0791 5.1356 13.9209 5.23323 13.8232L13.4403 5.61612ZM14.3242 3.75C13.5949 3.75 12.8954 4.03973 12.3797 4.55546L4.17257 12.7626C3.48915 13.446 3.48915 14.554 4.17257 15.2374L8.75835 19.8232C9.44177 20.5066 10.5498 20.5066 11.2332 19.8232L19.4403 11.6161C19.9561 11.1004 20.2458 10.4009 20.2458 9.67157V5.5C20.2458 4.5335 19.4623 3.75 18.4958 3.75H14.3242ZM15.4958 10C16.3242 10 16.9958 9.32843 16.9958 8.5C16.9958 7.67157 16.3242 7 15.4958 7C14.6674 7 13.9958 7.67157 13.9958 8.5C13.9958 9.32843 14.6674 10 15.4958 10Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 940 B |
@@ -12,5 +12,5 @@ keywords:
|
||||
- organisering
|
||||
- identifisering
|
||||
variant: Stroke
|
||||
updated_at: 12.12.2023
|
||||
updated_at: 13.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3284 4.75C12.5991 4.75 11.8996 5.03973 11.3839 5.55546L3.17678 13.7626C2.49336 14.446 2.49336 15.554 3.17678 16.2374L7.76256 20.8232C8.44598 21.5066 9.55402 21.5066 10.2374 20.8232L18.4445 12.6161C18.9603 12.1004 19.25 11.4009 19.25 10.6716V6.5C19.25 5.5335 18.4665 4.75 17.5 4.75H13.3284ZM14.5 11C15.3284 11 16 10.3284 16 9.5C16 8.67157 15.3284 8 14.5 8C13.6716 8 13 8.67157 13 9.5C13 10.3284 13.6716 11 14.5 11Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3242 3.75C13.5949 3.75 12.8954 4.03973 12.3797 4.55546L4.17257 12.7626C3.48915 13.446 3.48915 14.554 4.17257 15.2374L8.75835 19.8232C9.44177 20.5066 10.5498 20.5066 11.2332 19.8232L19.4403 11.6161C19.9561 11.1004 20.2458 10.4009 20.2458 9.67157V5.5C20.2458 4.5335 19.4623 3.75 18.4958 3.75H14.3242ZM15.4958 10C16.3242 10 16.9958 9.32843 16.9958 8.5C16.9958 7.67157 16.3242 7 15.4958 7C14.6674 7 13.9958 7.67157 13.9958 8.5C13.9958 9.32843 14.6674 10 15.4958 10Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 636 B |
@@ -12,5 +12,5 @@ keywords:
|
||||
- organisering
|
||||
- identifisering
|
||||
variant: Fill
|
||||
updated_at: 12.12.2023
|
||||
updated_at: 13.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -6,5 +6,5 @@ keywords:
|
||||
- vektløfting
|
||||
- tungt
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 11.03.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel-icons",
|
||||
"version": "5.18.3",
|
||||
"version": "6.3.4",
|
||||
"author": "Aksel | NAV",
|
||||
"homepage": "https://aksel.nav.no/ikoner",
|
||||
"repository": {
|
||||
@@ -20,24 +20,28 @@
|
||||
"access": "public",
|
||||
"provenance": true
|
||||
},
|
||||
"sideEffects": [
|
||||
"*.svg"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"main": "./dist/react/cjs/index.js",
|
||||
"module": "./dist/react/esm/index.js",
|
||||
"typings": "./dist/react/esm/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/react/esm/index.d.ts",
|
||||
"import": "./dist/react/esm/index.js",
|
||||
"require": "./dist/react/cjs/index.js"
|
||||
"import": {
|
||||
"types": "./dist/react/esm/index.d.ts",
|
||||
"default": "./dist/react/esm/index.js"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/react/cjs/index.d.ts",
|
||||
"default": "./dist/react/cjs/index.js"
|
||||
}
|
||||
},
|
||||
"./svg/*.svg": "./dist/svg/*.svg",
|
||||
"./metadata": {
|
||||
"types": "./dist/metadata.d.ts",
|
||||
"default": "./dist/metadata.js"
|
||||
}
|
||||
},
|
||||
"./svg/*.svg": "./dist/svg/*.svg",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
@@ -55,10 +59,12 @@
|
||||
"parse-svg": "node -e 'require(\"./config/parse-svg.js\").main()'",
|
||||
"copy": "copyfiles util/* src",
|
||||
"update-metadata": "node config/metadata.js",
|
||||
"build": "yarn copy && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json\" && node config/cleanTypes.js && yarn update-metadata && yarn parse-svg",
|
||||
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"write-packagejson": "echo '{\"type\": \"module\"}' > dist/react/esm/package.json",
|
||||
"build": "yarn copy && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json && yarn write-packagejson\" && node config/cleanTypes.js && yarn update-metadata && yarn parse-svg",
|
||||
"fetch-new:icons": "node config/figma/index.mjs",
|
||||
"zip:icons": "node config/zip.js"
|
||||
"zip:icons": "node config/zip.js",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@svgr/cli": "6.5.1",
|
||||
@@ -69,22 +75,14 @@
|
||||
"dotenv": "^10.0.0",
|
||||
"fast-glob": "3.2.11",
|
||||
"hast-util-select": "5.0.5",
|
||||
"jest": "^29.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lodash.camelcase": "4.3.0",
|
||||
"lodash.startcase": "4.4.0",
|
||||
"react": "^18.0.0",
|
||||
"rehype-parse": "8.0.4",
|
||||
"tsc-alias": "1.8.8",
|
||||
"typescript": "^5.1.6",
|
||||
"unified": "10.1.2"
|
||||
},
|
||||
"jest": {
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/unified/*"
|
||||
],
|
||||
"testMatch": [
|
||||
"**/__tests__/*.js",
|
||||
"**/__tests__/*.mjs"
|
||||
]
|
||||
"unified": "10.1.2",
|
||||
"vitest": "^1.2.2"
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,11 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/react/esm",
|
||||
"module": "esnext",
|
||||
"sourceMap": false,
|
||||
"sourceMap": true,
|
||||
"declaration": true
|
||||
},
|
||||
"tsc-alias": {
|
||||
"resolveFullPaths": true,
|
||||
"verbose": false
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,9 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/react/cjs",
|
||||
"module": "commonjs",
|
||||
"skipLibCheck": true
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"exclude": ["./util", "./__tests__", "**/*.stories.*"],
|
||||
"include": ["./src"]
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# @navikt/aksel-stylelint
|
||||
|
||||
## 6.3.4
|
||||
|
||||
## 6.3.3
|
||||
|
||||
## 6.3.2
|
||||
|
||||
## 6.3.1
|
||||
|
||||
## 6.3.0
|
||||
|
||||
## 6.2.0
|
||||
|
||||
## 6.1.1
|
||||
|
||||
## 6.1.0
|
||||
|
||||
## 6.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
## 5.18.3
|
||||
|
||||
## 5.18.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel-stylelint",
|
||||
"version": "5.18.3",
|
||||
"version": "6.3.4",
|
||||
"author": "Aksel | NAV",
|
||||
"homepage": "https://aksel.nav.no/grunnleggende/kode/stylelint",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"/dist"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"test": "yarn build && node --import tsx --test ./dist/**/*.test.js",
|
||||
"copy-css": "node -e \"require('fs').copyFileSync('../core/css/dist/index.css','dist/index.css')\"",
|
||||
"copy-tokens": "node -e \"require('fs').copyFileSync('../core/css/tokens.json','dist/tokens.json')\"",
|
||||
"copy": "yarn copy-css && yarn copy-tokens",
|
||||
@@ -35,26 +35,14 @@
|
||||
"dev": "yarn watch:lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-css": "^5.18.3",
|
||||
"@navikt/ds-tokens": "^5.18.3",
|
||||
"@types/jest": "^29.0.0",
|
||||
"@navikt/ds-css": "^6.3.4",
|
||||
"@navikt/ds-tokens": "^6.3.4",
|
||||
"concurrently": "7.2.1",
|
||||
"copyfiles": "2.4.1",
|
||||
"jest": "^29.0.0",
|
||||
"jest-preset-stylelint": "^6.1.0",
|
||||
"postcss-selector-parser": "^6.0.13",
|
||||
"postcss-value-parser": "^4.2.0",
|
||||
"stylelint": "^14.8.5",
|
||||
"ts-jest": "^29.0.0",
|
||||
"stylelint-test-rule-node": "^0.2.1",
|
||||
"tsx": "^4.7.1",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "jest-preset-stylelint",
|
||||
"testMatch": [
|
||||
"**/*.test.ts"
|
||||
],
|
||||
"transform": {
|
||||
"^.+\\.ts?$": "ts-jest"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,4 +50,14 @@ export const deprecations: DeprecatedList = [
|
||||
message:
|
||||
"There is no 1:1 replacement for this, the size will depend on the 'poster' prop and the viewport width",
|
||||
},
|
||||
{
|
||||
classes: ["navds-grid", "navds-content-container"],
|
||||
deprecatePrefix: true,
|
||||
message:
|
||||
"Components were replaced by `HGrid` and `Page.Block` in version 6",
|
||||
},
|
||||
{
|
||||
classes: ["navds-textarea__wrapper"],
|
||||
message: "Removed in v6.0.0",
|
||||
},
|
||||
];
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTestRule } from "jest-preset-stylelint";
|
||||
import { testRule } from "stylelint-test-rule-node";
|
||||
import rule, { messages } from ".";
|
||||
|
||||
getTestRule()({
|
||||
testRule({
|
||||
plugins: ["./dist/index.js"],
|
||||
ruleName: rule.ruleName,
|
||||
config: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTestRule } from "jest-preset-stylelint";
|
||||
import { testRule } from "stylelint-test-rule-node";
|
||||
import rule, { messages } from ".";
|
||||
|
||||
getTestRule()({
|
||||
testRule({
|
||||
plugins: ["./dist/index.js"],
|
||||
ruleName: rule.ruleName,
|
||||
config: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTestRule } from "jest-preset-stylelint";
|
||||
import { testRule } from "stylelint-test-rule-node";
|
||||
import rule, { messages } from ".";
|
||||
|
||||
getTestRule()({
|
||||
testRule({
|
||||
plugins: ["./dist/index.js"],
|
||||
ruleName: rule.ruleName,
|
||||
config: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTestRule } from "jest-preset-stylelint";
|
||||
import { testRule } from "stylelint-test-rule-node";
|
||||
import rule, { messages } from ".";
|
||||
|
||||
getTestRule()({
|
||||
testRule({
|
||||
plugins: ["./dist/index.js"],
|
||||
ruleName: rule.ruleName,
|
||||
config: true,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { getTestRule } from "jest-preset-stylelint";
|
||||
import { testRule } from "stylelint-test-rule-node";
|
||||
import rule, { messages } from ".";
|
||||
import { deprecations } from "../../deprecations";
|
||||
|
||||
getTestRule()({
|
||||
testRule({
|
||||
plugins: ["./dist/index.js"],
|
||||
ruleName: rule.ruleName,
|
||||
config: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTestRule } from "jest-preset-stylelint";
|
||||
import { testRule } from "stylelint-test-rule-node";
|
||||
import rule, { messages } from ".";
|
||||
|
||||
getTestRule()({
|
||||
testRule({
|
||||
plugins: ["./dist/index.js"],
|
||||
ruleName: rule.ruleName,
|
||||
config: true,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"target": "es2020",
|
||||
"preserveWatchOutput": true,
|
||||
"declaration": false,
|
||||
"types": ["node", "jest", "@types/jest"],
|
||||
"types": ["node"],
|
||||
"outDir": "dist",
|
||||
"rootDir": "./src",
|
||||
"resolveJsonModule": true,
|
||||
|
||||
@@ -1,5 +1,72 @@
|
||||
# @navikt/aksel
|
||||
|
||||
## 6.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`a2af9bcc3`](https://github.com/navikt/aksel/commit/a2af9bcc37eb12cc7cf3a1596d57dc0421898657)]:
|
||||
- @navikt/ds-css@6.3.4
|
||||
|
||||
## 6.3.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@6.3.3
|
||||
|
||||
## 6.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@6.3.2
|
||||
|
||||
## 6.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@6.3.1
|
||||
|
||||
## 6.3.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`25e0d15d6`](https://github.com/navikt/aksel/commit/25e0d15d67cebd36ee58aa3b7d9f1c7104d92de6)]:
|
||||
- @navikt/ds-css@6.3.0
|
||||
|
||||
## 6.2.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@6.2.0
|
||||
|
||||
## 6.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9510327ab`](https://github.com/navikt/aksel/commit/9510327abe96142943c6e92bd7c7da93a9721fd5), [`3d2eab4fd`](https://github.com/navikt/aksel/commit/3d2eab4fda07cac8071822e1f8e8fc5f69e7d234)]:
|
||||
- @navikt/ds-css@6.1.1
|
||||
|
||||
## 6.1.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@6.1.0
|
||||
|
||||
## 6.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- Chat: Fjernet deprecated props `backgroundColor` og `avatarBgColor`. Bruk prop `variant` som erstatning. ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522), [`636c1ad49`](https://github.com/navikt/aksel/commit/636c1ad49b8afde54b0a1105fecdc6d47f333522)]:
|
||||
- @navikt/ds-css@6.0.0
|
||||
|
||||
## 5.18.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
const config = {
|
||||
transform: { "^.+\\.js?$": "ts-jest", "^.+\\.ts?$": "ts-jest" },
|
||||
testMatch: ["**/tests/*.test.ts"],
|
||||
verbose: true,
|
||||
rootDir: ".",
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel",
|
||||
"version": "5.18.3",
|
||||
"version": "6.3.4",
|
||||
"description": "Aksel command line interface. Handles css-imports, codemods and more",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"license": "MIT",
|
||||
@@ -18,8 +18,8 @@
|
||||
"clean": "rimraf dist",
|
||||
"build": "yarn clean && tsc -p tsconfig.json",
|
||||
"dev": "tsc --watch -p tsconfig.json",
|
||||
"test": "yarn build && NODE_OPTIONS=--experimental-vm-modules yarn jest",
|
||||
"test:watch": "NODE_OPTIONS=--experimental-vm-modules yarn jest --watch"
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch"
|
||||
},
|
||||
"bin": "./dist/index.js",
|
||||
"repository": {
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
|
||||
"dependencies": {
|
||||
"@navikt/ds-css": "5.18.3",
|
||||
"@navikt/ds-css": "6.3.4",
|
||||
"axios": "1.6.0",
|
||||
"chalk": "4.1.0",
|
||||
"clipboardy": "^2.3.0",
|
||||
@@ -44,12 +44,9 @@
|
||||
"react-scanner": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/inquirer": "^9.0.3",
|
||||
"@types/jest": "^29.0.0",
|
||||
"jest": "^29.0.0",
|
||||
"rimraf": "3.0.2",
|
||||
"ts-jest": "^29.0.0",
|
||||
"typescript": "^5.1.6"
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^1.2.2"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"engines": {
|
||||
|
||||
@@ -87,6 +87,16 @@ export const migrations: {
|
||||
path: "v4.0.0/date/date",
|
||||
},
|
||||
],
|
||||
"v6.0.0": [
|
||||
{
|
||||
description:
|
||||
"Removes `backgroundColor` and `avatarBgColor` properties from `Chat` and `Chat.Bubble`",
|
||||
value: "v6-chat",
|
||||
path: "v6.0.0/chat/chat",
|
||||
warning:
|
||||
"Remember to update use of `variant`-prop to match previous use of colors. If needed the component exposes css-variables for custom overrides",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export function getMigrationPath(str: string) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { getMigrationNames, getMigrationPath } from "../migrations";
|
||||
|
||||
describe("migrations", () => {
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
import { getLineTerminator } from "../../../utils/lineterminator";
|
||||
|
||||
/**
|
||||
* @param {import('jscodeshift').FileInfo} file
|
||||
* @param {import('jscodeshift').API} api
|
||||
*/
|
||||
export default function transformer(file, api) {
|
||||
const j = api.jscodeshift;
|
||||
let localName = "Chat";
|
||||
|
||||
const root = j(file.source);
|
||||
|
||||
/* Finds used name for Chat component */
|
||||
root
|
||||
.find(j.ImportDeclaration)
|
||||
.filter((path) => path.node.source.value === "@navikt/ds-react")
|
||||
.forEach((imp) => {
|
||||
imp.value.specifiers.forEach((x) => {
|
||||
if (x.imported.name === "Chat" && x.local.name !== x.imported.name) {
|
||||
localName = x.local.name;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
root
|
||||
.find(j.JSXElement, {
|
||||
openingElement: {
|
||||
name: {
|
||||
name: localName,
|
||||
},
|
||||
},
|
||||
})
|
||||
.forEach((path) => {
|
||||
j(path)
|
||||
.find(j.JSXAttribute, {
|
||||
name: {
|
||||
name: "backgroundColor",
|
||||
},
|
||||
})
|
||||
.remove();
|
||||
j(path)
|
||||
.find(j.JSXAttribute, {
|
||||
name: {
|
||||
name: "avatarBgColor",
|
||||
},
|
||||
})
|
||||
.remove();
|
||||
});
|
||||
|
||||
root
|
||||
.find(j.JSXElement, {
|
||||
openingElement: {
|
||||
name: {
|
||||
type: "JSXMemberExpression",
|
||||
object: {
|
||||
name: localName,
|
||||
},
|
||||
property: {
|
||||
name: "Bubble",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
.forEach((path) => {
|
||||
j(path)
|
||||
.find(j.JSXAttribute, {
|
||||
name: {
|
||||
name: "backgroundColor",
|
||||
},
|
||||
})
|
||||
.remove();
|
||||
});
|
||||
|
||||
return root.toSource(getLineTerminator(file.source));
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { check } from "../../../../utils/check";
|
||||
|
||||
const migration = "chat";
|
||||
const fixtures = ["import-alias", "idempotent"];
|
||||
|
||||
for (const fixture of fixtures) {
|
||||
check(__dirname, {
|
||||
fixture,
|
||||
migration,
|
||||
extension: "js",
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
Chat,
|
||||
Button,
|
||||
} from "@navikt/ds-react";
|
||||
|
||||
export const Demo = () => (
|
||||
<Chat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
|
||||
<Chat.Bubble>
|
||||
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
||||
</Chat.Bubble>
|
||||
<Chat.Bubble>Tempor fugiat amet eu sint in in ullamco.</Chat.Bubble>
|
||||
<Chat.Bubble>
|
||||
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
|
||||
labore nisi ut.
|
||||
</Chat.Bubble>
|
||||
</Chat>
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
Chat,
|
||||
Button,
|
||||
} from "@navikt/ds-react";
|
||||
|
||||
export const Demo = () => (
|
||||
<Chat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
|
||||
<Chat.Bubble>
|
||||
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
||||
</Chat.Bubble>
|
||||
<Chat.Bubble>Tempor fugiat amet eu sint in in ullamco.</Chat.Bubble>
|
||||
<Chat.Bubble>
|
||||
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
|
||||
labore nisi ut.
|
||||
</Chat.Bubble>
|
||||
</Chat>
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
Chat as DsChat,
|
||||
Button,
|
||||
} from "@navikt/ds-react";
|
||||
|
||||
export const Demo = () => (
|
||||
<DsChat avatar="ON" name="Ola Normann" backgroundColor="#321" timestamp="01.01.21 14:00" avatarBgColor="#123" >
|
||||
<DsChat.Bubble>
|
||||
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
||||
</DsChat.Bubble>
|
||||
<DsChat.Bubble backgroundColor="#fff">Tempor fugiat amet eu sint in in ullamco.</DsChat.Bubble>
|
||||
<DsChat.Bubble backgroundColor="#111">
|
||||
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
|
||||
labore nisi ut.
|
||||
</DsChat.Bubble>
|
||||
</DsChat>
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
Chat as DsChat,
|
||||
Button,
|
||||
} from "@navikt/ds-react";
|
||||
|
||||
export const Demo = () => (
|
||||
<DsChat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
|
||||
<DsChat.Bubble>
|
||||
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
||||
</DsChat.Bubble>
|
||||
<DsChat.Bubble>Tempor fugiat amet eu sint in in ullamco.</DsChat.Bubble>
|
||||
<DsChat.Bubble>
|
||||
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
|
||||
labore nisi ut.
|
||||
</DsChat.Bubble>
|
||||
</DsChat>
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
Chat,
|
||||
Button,
|
||||
} from "@navikt/ds-react";
|
||||
|
||||
export const Demo = () => (
|
||||
<Chat avatar="ON" name="Ola Normann" backgroundColor="#321" timestamp="01.01.21 14:00" avatarBgColor="#123" >
|
||||
<Chat.Bubble>
|
||||
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
||||
</Chat.Bubble>
|
||||
<Chat.Bubble backgroundColor="#fff">Tempor fugiat amet eu sint in in ullamco.</Chat.Bubble>
|
||||
<Chat.Bubble backgroundColor="#111">
|
||||
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
|
||||
labore nisi ut.
|
||||
</Chat.Bubble>
|
||||
</Chat>
|
||||
);
|
||||
@@ -0,0 +1,17 @@
|
||||
import {
|
||||
Chat,
|
||||
Button,
|
||||
} from "@navikt/ds-react";
|
||||
|
||||
export const Demo = () => (
|
||||
<Chat avatar="ON" name="Ola Normann" timestamp="01.01.21 14:00">
|
||||
<Chat.Bubble>
|
||||
Aute minim nisi sunt mollit duis sunt nulla minim non proident.
|
||||
</Chat.Bubble>
|
||||
<Chat.Bubble>Tempor fugiat amet eu sint in in ullamco.</Chat.Bubble>
|
||||
<Chat.Bubble>
|
||||
Adipisicing laborum est eu laborum est sit in commodo enim sint laboris
|
||||
labore nisi ut.
|
||||
</Chat.Bubble>
|
||||
</Chat>
|
||||
);
|
||||
@@ -2,6 +2,7 @@ import { applyTransform } from "jscodeshift/dist/testUtils";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import prettier from "prettier";
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
interface TestT {
|
||||
fixture: string;
|
||||
@@ -15,7 +16,7 @@ export function check(
|
||||
{ fixture, migration, extension = "js", options = {} }: TestT,
|
||||
) {
|
||||
describe(migration, () => {
|
||||
it(fixture, async () => {
|
||||
test(fixture, async () => {
|
||||
const fixtureDir = path.join(dirName);
|
||||
const inputPath = path.join(fixtureDir, `${fixture}.input.${extension}`);
|
||||
const parser = extension;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { translateToken } from "../translate-token";
|
||||
|
||||
jest.autoMockOff();
|
||||
|
||||
const tokens = [
|
||||
{
|
||||
name: "--navds-global-color-red-100",
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
"target": "es2015",
|
||||
"preserveWatchOutput": true,
|
||||
"declaration": false,
|
||||
"types": ["node", "jest"],
|
||||
"types": ["node"],
|
||||
"outDir": "dist",
|
||||
"rootDir": "./src",
|
||||
"resolveJsonModule": true,
|
||||
"allowJs": true
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "dist", "jest.config.js", "**/tests/**"]
|
||||
"exclude": ["node_modules", "dist", "**/tests/**"]
|
||||
}
|
||||
@@ -1,5 +1,49 @@
|
||||
# @navikt/ds-css
|
||||
|
||||
## 6.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ReadMore: Padding-right på button er bumpet noen px ([#2806](https://github.com/navikt/aksel/pull/2806))
|
||||
|
||||
## 6.3.3
|
||||
|
||||
## 6.3.2
|
||||
|
||||
## 6.3.1
|
||||
|
||||
## 6.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- FileUpload: Ny komponent `FileUpload` for å håndtere opplasting av filer, Dropzone og fil-visning ([#2504](https://github.com/navikt/aksel/pull/2504))
|
||||
|
||||
## 6.2.0
|
||||
|
||||
## 6.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Link: Fjern hover-farge ([#2767](https://github.com/navikt/aksel/pull/2767))
|
||||
|
||||
- Modal: Får nå fokus når åpnes i Safari ([#2688](https://github.com/navikt/aksel/pull/2688))
|
||||
|
||||
## 6.1.0
|
||||
|
||||
## 6.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- Tokens: La til nytt brekkpunkt `2xl` for `1440px`. Alle primitives er oppdatert for å reflektere oppdateringen. Brukere av Tailwind vil måtte sjekke at overskriving av `screen: "2xl"` ikke brekker app. ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
- Grid, ContentContainer: Komponenter er fjernet fra systemet. [Se migreringsguide](https://aksel.nav.no/grunnleggende/kode/migrering#dd2cfa9fb1d1). ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
- CSS: Oppdatert bruk av action-farger i systemet. Dette påvirker komponentene: Button, CopyButton, Dropdown, Combobox, ConfirmationPanel, Radio, Checkbox, Search, Select, TextField, Textarea, Helptext, LinkPanel, Link, ReadMore, Stepper og Tabs. Endringen skal ikke brekke noe så lenge man ikke har overskrevet farger manuelt. ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
- Tokens: Nye tokens `--a-text-action-hover`,`--a-icon-action-hover` og `--a-border-action-hover` ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
- Textarea: Fjernet div med klassen navds-textarea\_\_wrapper ([#2623](https://github.com/navikt/aksel/pull/2623))
|
||||
|
||||
## 5.18.3
|
||||
|
||||
## 5.18.2
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
background-color: var(--ac-button-primary-bg, var(--__ac-button-primary-bg, var(--a-surface-action)));
|
||||
color: var(--ac-button-primary-text, var(--__ac-button-primary-text, var(--a-text-on-action)));
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-button.navds-button--primary {
|
||||
background-color: highlight;
|
||||
@@ -227,6 +228,7 @@
|
||||
--ac-button-secondary-hover-bg,
|
||||
var(--__ac-button-secondary-hover-bg, var(--a-surface-action-subtle-hover))
|
||||
);
|
||||
box-shadow: inset 0 0 0 2px var(--ac-button-secondary-hover-border, var(--a-border-action-hover));
|
||||
}
|
||||
|
||||
.navds-button--secondary:focus-visible {
|
||||
|
||||
@@ -120,6 +120,11 @@ const StyleMappings = {
|
||||
dependencies: [typoCss],
|
||||
},
|
||||
{ component: "Fieldset", main: formCss, dependencies: [typoCss] },
|
||||
{
|
||||
component: "FileUpload",
|
||||
main: formCss,
|
||||
dependencies: [typoCss, "button.css", "loader.css", "link.css"],
|
||||
},
|
||||
{ component: "Grid", main: "grid.css", dependencies: [typoCss] },
|
||||
{
|
||||
component: "GuidePanel",
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
:root,
|
||||
:host {
|
||||
--navds-content-container-max-width: 79.5rem;
|
||||
}
|
||||
|
||||
.navds-content-container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: var(--navds-content-container-max-width);
|
||||
padding: var(--a-spacing-4);
|
||||
}
|
||||
|
||||
@media (min-width: 448px) {
|
||||
.navds-content-container {
|
||||
padding: var(--a-spacing-6);
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@
|
||||
}
|
||||
|
||||
.navds-copybutton--action:hover {
|
||||
color: var(--ac-copybutton-action-hover-text, var(--__ac-copybutton-action-text, var(--a-text-action)));
|
||||
color: var(--ac-copybutton-action-hover-text, var(--__ac-copybutton-action-text, var(--a-text-action-hover)));
|
||||
background-color: var(--ac-copybutton-action-hover-bg, var(--__ac-copybutton-bg-hover, var(--a-surface-hover)));
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
.navds-dropdown__item:hover {
|
||||
background-color: var(--ac-dropdown-item-hover-bg, var(--a-surface-action-subtle-hover));
|
||||
color: var(--ac-dropdown-item-hover-text, var(--a-text-action-hover));
|
||||
}
|
||||
|
||||
.navds-dropdown__item:active {
|
||||
|
||||
@@ -92,9 +92,6 @@
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible) {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default) inset,
|
||||
var(--a-shadow-focus);
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 3px solid transparent;
|
||||
outline-offset: 2px;
|
||||
@@ -113,9 +110,6 @@
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus) {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default) inset,
|
||||
var(--a-shadow-focus);
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 3px solid transparent;
|
||||
outline-offset: 2px;
|
||||
@@ -129,9 +123,6 @@
|
||||
|
||||
@supports not selector(:has) {
|
||||
.navds-combobox--focused .navds-combobox__wrapper-inner {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default) inset,
|
||||
var(--a-shadow-focus);
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 3px solid transparent;
|
||||
outline-offset: 2px;
|
||||
@@ -310,7 +301,7 @@
|
||||
|
||||
.navds-combobox__list-item--focus,
|
||||
.navds-combobox__list--with-hover
|
||||
.navds-combobox__list-item:not([data-no-focus="true"], .navds-combobox__list-item--new-option):hover {
|
||||
.navds-combobox__list-item:where(:not([data-no-focus="true"], .navds-combobox__list-item--new-option)):hover {
|
||||
background-color: var(--ac-combobox-list-item-hover-bg, var(--a-surface-hover));
|
||||
cursor: pointer;
|
||||
border-left: 4px solid var(--ac-combobox-list-item-hover-border-left, var(--a-border-strong));
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
background-color: var(--ac-confirmation-panel-error-bg, var(--a-surface-danger-subtle));
|
||||
}
|
||||
|
||||
.navds-confirmation-panel--error .navds-checkbox__input:hover:not(:disabled) + .navds-checkbox__label {
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-confirmation-panel__inner::before {
|
||||
content: "";
|
||||
|
||||
@@ -9,11 +9,17 @@
|
||||
padding: var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-error-summary:focus-visible {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
.navds-error-summary__heading:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.navds-error-summary:focus-visible,
|
||||
.navds-error-summary:has(.navds-error-summary__heading:focus-visible) {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-border-on-inverted),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-error-summary:focus {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
/**
|
||||
* Makes it easier for user to use FileItem in semantic lists
|
||||
*/
|
||||
.navds-file-upload :is(ul, li) {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* FileUpload.Dropzone
|
||||
*/
|
||||
|
||||
.navds-dropzone__area {
|
||||
--__ac-dropzone-background: var(--a-surface-subtle);
|
||||
--__ac-dropzone-text-color: var(--a-text-default);
|
||||
--__ac-dropzone-padding: var(--a-spacing-6);
|
||||
--__ac-dropzone-icon-padding: var(--a-spacing-2);
|
||||
--__ac-dropzone-animation-length-long: 0.6s;
|
||||
--__ac-dropzone-animation-length-short: 250ms;
|
||||
--__ac-dropzone-animation-ease-out: cubic-bezier(0.3, 1, 0.3, 1);
|
||||
--__ac-dropzone-animation-over-under: cubic-bezier(0.3, 1.4, 0.3, 1);
|
||||
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-4);
|
||||
text-align: center;
|
||||
padding: var(--__ac-dropzone-padding);
|
||||
outline: 1px dashed var(--a-border-subtle);
|
||||
outline-offset: -1px;
|
||||
border-radius: var(--a-border-radius-large);
|
||||
background-color: var(--__ac-dropzone-background);
|
||||
color: var(--__ac-dropzone-text-color);
|
||||
transition: background-color var(--__ac-dropzone-animation-length-short) var(--__ac-dropzone-animation-ease-out);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navds-dropzone__area:hover {
|
||||
box-shadow: inset 0 2px 4px 1px rgb(11 11 11/ 0.05);
|
||||
outline-color: var(--a-border-default);
|
||||
}
|
||||
|
||||
.navds-dropzone--disabled > .navds-dropzone__area:hover {
|
||||
outline-color: var(--a-border-subtle);
|
||||
box-shadow: initial;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.navds-dropzone--dragging > .navds-dropzone__area {
|
||||
--__ac-dropzone-background: var(--a-surface-action-subtle-hover);
|
||||
}
|
||||
|
||||
.navds-dropzone--dragging > .navds-dropzone__area::after {
|
||||
outline: 1px dashed var(--a-border-subtle);
|
||||
outline-offset: -1px;
|
||||
color: var(--a-text-action-selected);
|
||||
background-color: var(--a-surface-hover);
|
||||
content: "";
|
||||
inset: 0;
|
||||
position: absolute;
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
backdrop-filter: blur(8px);
|
||||
box-shadow: inset 0 2px 7px 3px rgb(11 11 11/ 0.1);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
animation: akselDropzoneDragoverAnimation var(--__ac-dropzone-animation-length-short) var(--__ac-dropzone-animation-ease-out);
|
||||
}
|
||||
|
||||
@keyframes akselDropzoneDragoverAnimation {
|
||||
0% {
|
||||
-webkit-backdrop-filter: blur(0);
|
||||
backdrop-filter: blur(0);
|
||||
background-color: var(--a-surface-transparent);
|
||||
}
|
||||
|
||||
70% {
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
100% {
|
||||
background-color: var(--a-surface-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-dropzone__area-icon {
|
||||
display: grid;
|
||||
padding: var(--__ac-dropzone-icon-padding);
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.navds-dropzone--error:where(:not(.navds-dropzone--dragging)) > .navds-dropzone__area {
|
||||
outline-color: var(--a-surface-danger);
|
||||
outline-width: 2px;
|
||||
}
|
||||
|
||||
.navds-dropzone__area:hover > .navds-dropzone__area-button {
|
||||
color: var(--ac-button-secondary-hover-text, var(--__ac-button-secondary-hover-text, var(--a-text-action-on-action-subtle)));
|
||||
background-color: var(
|
||||
--ac-button-secondary-hover-bg,
|
||||
var(--__ac-button-secondary-hover-bg, var(--a-surface-action-subtle-hover))
|
||||
);
|
||||
}
|
||||
|
||||
.navds-dropzone__area:active .navds-dropzone__area-button {
|
||||
color: var(--ac-button-secondary-active-text, var(--__ac-button-secondary-active-text, var(--a-text-on-action)));
|
||||
background-color: var(--ac-button-secondary-active-bg, var(--__ac-button-secondary-active-bg, var(--a-surface-action-active)));
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navds-dropzone__area-release {
|
||||
top: var(--__ac-dropzone-padding);
|
||||
display: grid;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
transition:
|
||||
top var(--__ac-dropzone-animation-length-long) var(--__ac-dropzone-animation-over-under),
|
||||
transform var(--__ac-dropzone-animation-length-long) var(--__ac-dropzone-animation-over-under);
|
||||
}
|
||||
|
||||
.navds-dropzone__area-release__icon {
|
||||
display: grid;
|
||||
padding: var(--__ac-dropzone-icon-padding);
|
||||
border-radius: var(--a-border-radius-full);
|
||||
background-color: var(--a-surface-neutral-subtle);
|
||||
transition:
|
||||
background-color 300ms var(--__ac-dropzone-animation-ease-out),
|
||||
font-size 300ms var(--__ac-dropzone-animation-ease-out);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.navds-dropzone--dragging .navds-dropzone__area-release > .navds-dropzone__area-release__icon {
|
||||
background-color: transparent;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.navds-dropzone__area-release__text {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.navds-dropzone--dragging .navds-dropzone__area-release > .navds-dropzone__area-release__text {
|
||||
transition: visibility var(--__ac-dropzone-animation-length-long) var(--__ac-dropzone-animation-over-under);
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.navds-dropzone--dragging .navds-dropzone__area-release {
|
||||
color: var(--a-text-action-selected);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.navds-dropzone__area-disabled {
|
||||
color: var(--a-text-subtle);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
/**
|
||||
* FileUpload.Item
|
||||
*/
|
||||
|
||||
.navds-file-item__inner {
|
||||
outline: 1px solid var(--a-border-subtle);
|
||||
outline-offset: -1px;
|
||||
transition: outline-color 250ms cubic-bezier(0, 0.3, 0.15, 1);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
padding: var(--a-spacing-3);
|
||||
display: flex;
|
||||
gap: var(--a-spacing-3);
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.navds-file-item--error > .navds-file-item__inner {
|
||||
outline: 2px solid var(--a-surface-danger);
|
||||
}
|
||||
|
||||
.navds-file-item__icon {
|
||||
background-color: var(--a-surface-neutral-subtle);
|
||||
color: var(--a-icon-default);
|
||||
border-radius: var(--a-border-radius-xlarge);
|
||||
min-height: 3rem;
|
||||
min-width: 3rem;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
transition: background-color 250ms cubic-bezier(0, 0.3, 0.15, 1);
|
||||
}
|
||||
|
||||
.navds-file-item__icon--loading {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navds-file-item__file-info {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.navds-file-item__button {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.navds-file-item__error {
|
||||
color: var(--a-text-danger);
|
||||
display: grid;
|
||||
transition-property: grid-template-rows, padding-top;
|
||||
transition-duration: 250ms;
|
||||
transition-timing-function: cubic-bezier(0, 0.3, 0.15, 1);
|
||||
overflow: hidden;
|
||||
grid-template-rows: 0fr;
|
||||
}
|
||||
|
||||
.navds-file-item--error .navds-file-item__error {
|
||||
grid-template-rows: 1fr;
|
||||
padding-top: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-file-item__error-content > svg {
|
||||
flex-shrink: 0;
|
||||
height: 1rem;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
|
||||
.navds-file-item__error-content {
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
gap: var(--a-spacing-1);
|
||||
}
|
||||
@@ -18,13 +18,15 @@
|
||||
}
|
||||
|
||||
.navds-form-field .navds-error-message,
|
||||
.navds-fieldset .navds-error-message {
|
||||
.navds-fieldset .navds-error-message,
|
||||
.navds-file-item .navds-error-message {
|
||||
display: flex;
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-form-field .navds-error-message::before,
|
||||
.navds-fieldset .navds-error-message::before {
|
||||
.navds-fieldset .navds-error-message::before,
|
||||
.navds-file-item .navds-error-message::before {
|
||||
content: "•";
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Order matters; rearrange with care
|
||||
*/
|
||||
@import "fieldset.css";
|
||||
@import "file-upload.css";
|
||||
@import "form.css";
|
||||
@import "error-summary.css";
|
||||
@import "confirmation-panel.css";
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
.navds-checkbox__input:hover:focus-visible + .navds-checkbox__label::before,
|
||||
.navds-radio__input:hover:focus-visible + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
|
||||
@@ -102,16 +102,11 @@
|
||||
.navds-checkbox__input:hover:focus + .navds-checkbox__label::before,
|
||||
.navds-radio__input:hover:focus + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
}
|
||||
|
||||
.navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
@@ -128,9 +123,14 @@
|
||||
transform: translate(0.25rem, -50%);
|
||||
}
|
||||
|
||||
.navds-checkbox__input:checked + .navds-checkbox__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
.navds-checkbox__input:where(:checked, :indeterminate) + .navds-checkbox__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
|
||||
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
|
||||
}
|
||||
|
||||
.navds-checkbox__input:where(:checked, :indeterminate):hover + .navds-checkbox__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected-hover));
|
||||
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected-hover));
|
||||
}
|
||||
|
||||
.navds-checkbox__input:where(:not(:checked)) + .navds-checkbox__label > .navds-checkbox__icon {
|
||||
@@ -166,7 +166,7 @@
|
||||
.navds-checkbox__input:indeterminate:focus-visible + .navds-checkbox__label::before,
|
||||
.navds-checkbox__input:checked:focus-visible + .navds-checkbox__label::before {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action)),
|
||||
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
@@ -175,7 +175,7 @@
|
||||
.navds-checkbox__input:indeterminate:focus + .navds-checkbox__label::before,
|
||||
.navds-checkbox__input:checked:focus + .navds-checkbox__label::before {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action)),
|
||||
0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
@@ -183,14 +183,14 @@
|
||||
|
||||
.navds-radio__input:checked + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
|
||||
inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default));
|
||||
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
|
||||
}
|
||||
|
||||
.navds-radio__input:checked:focus-visible + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
|
||||
inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
@@ -206,19 +206,19 @@
|
||||
|
||||
.navds-checkbox__input:hover:not(:disabled) + .navds-checkbox__label,
|
||||
.navds-radio__input:hover:not(:disabled) + .navds-radio__label {
|
||||
color: var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
color: var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
|
||||
}
|
||||
|
||||
.navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus-visible)
|
||||
+ .navds-checkbox__label::before,
|
||||
.navds-radio__input:hover:not(:disabled):not(:checked):not(:focus-visible) + .navds-radio__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus) + .navds-checkbox__label::before,
|
||||
.navds-radio__input:hover:not(:disabled):not(:checked):not(:focus) + .navds-radio__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action));
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
}
|
||||
|
||||
.navds-search__button-clear:hover {
|
||||
color: var(--ac-search-clear-icon-hover, var(--__ac-search-clear-icon-hover, var(--a-text-action)));
|
||||
color: var(--ac-search-clear-icon-hover, var(--__ac-search-clear-icon-hover, var(--a-text-action-hover)));
|
||||
}
|
||||
|
||||
.navds-search__button-clear:focus-visible {
|
||||
@@ -134,12 +134,12 @@
|
||||
0 -1px 0 0 var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset;
|
||||
}
|
||||
|
||||
.navds-search__button-search.navds-button--secondary:hover {
|
||||
.navds-search__button-search.navds-button--secondary:where(:hover, :active) {
|
||||
box-shadow:
|
||||
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
|
||||
0 1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
|
||||
0 -1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
|
||||
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action)));
|
||||
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
|
||||
0 1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
|
||||
0 -1px 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
|
||||
-1px 0 0 0 var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover)));
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
.navds-search__button-search.navds-button--secondary:focus-visible:hover {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
|
||||
0 0 0 1px var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action-hover))) inset,
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,12 +29,13 @@
|
||||
}
|
||||
|
||||
.navds-select__input:hover {
|
||||
border-color: var(--ac-select-hover-bg, var(--a-border-action));
|
||||
border-color: var(--ac-select-hover-border, var(--a-border-action-hover));
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navds-select__input:focus-visible {
|
||||
outline: none;
|
||||
border-color: var(--ac-select-active-border, var(--a-border-action-selected));
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,13 +41,14 @@
|
||||
}
|
||||
|
||||
.navds-text-field__input:hover {
|
||||
border-color: var(--ac-textfield-hover-border, var(--__ac-textfield-hover-border, var(--a-border-action)));
|
||||
border-color: var(--ac-textfield-hover-border, var(--__ac-textfield-hover-border, var(--a-border-action-hover)));
|
||||
}
|
||||
|
||||
.navds-text-field__input:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
border-color: var(--ac-textfield-active-border, var(--a-border-action-selected));
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
|
||||
@@ -20,18 +20,9 @@
|
||||
--__ac-textarea-counter-error-text: initial;
|
||||
}
|
||||
|
||||
.navds-textarea__wrapper {
|
||||
--__ac-textarea-height: initial;
|
||||
|
||||
position: relative;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.navds-textarea__input:first-child {
|
||||
height: var(--__ac-textarea-height);
|
||||
}
|
||||
|
||||
.navds-textarea__input {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
height: var(--__ac-textarea-height);
|
||||
appearance: none;
|
||||
padding: var(--a-spacing-2);
|
||||
background-color: var(--ac-textarea-bg, var(--__ac-textarea-bg, var(--a-surface-default)));
|
||||
@@ -48,13 +39,14 @@
|
||||
}
|
||||
|
||||
.navds-textarea__input:hover {
|
||||
border-color: var(--ac-textarea-hover-border, var(--__ac-textarea-hover-border, var(--a-border-action)));
|
||||
border-color: var(--ac-textarea-hover-border, var(--__ac-textarea-hover-border, var(--a-border-action-hover)));
|
||||
}
|
||||
|
||||
.navds-textarea__input:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
border-color: var(--ac-textarea-active-border, var(--a-border-action-selected));
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
@@ -70,7 +62,7 @@
|
||||
}
|
||||
|
||||
.navds-textarea__counter {
|
||||
margin-top: var(--a-spacing-05);
|
||||
margin-top: -0.375rem;
|
||||
color: var(--ac-textarea-counter-text, var(--__ac-textarea-counter-text, var(--a-text-subtle)));
|
||||
}
|
||||
|
||||
@@ -82,7 +74,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-textarea__wrapper:focus-within .navds-textarea__sr-counter {
|
||||
.navds-textarea__input:focus ~ .navds-textarea__sr-counter {
|
||||
display: initial;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
/**************************
|
||||
* .navds-grid *
|
||||
**************************/
|
||||
|
||||
.navds-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
grid-gap: var(--a-spacing-4);
|
||||
}
|
||||
|
||||
@media (min-width: 448px) {
|
||||
.navds-grid {
|
||||
grid-gap: var(--a-spacing-6);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************
|
||||
* .navds-grid__cell *
|
||||
**************************/
|
||||
|
||||
.navds-grid__cell--xs-1 {
|
||||
grid-column: span 1;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-3 {
|
||||
grid-column: span 3;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-4 {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-5 {
|
||||
grid-column: span 5;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-6 {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-7 {
|
||||
grid-column: span 7;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-8 {
|
||||
grid-column: span 8;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-9 {
|
||||
grid-column: span 9;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-10 {
|
||||
grid-column: span 10;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-11 {
|
||||
grid-column: span 11;
|
||||
}
|
||||
|
||||
.navds-grid__cell--xs-12 {
|
||||
grid-column: span 12;
|
||||
}
|
||||
|
||||
@media (min-width: 448px) {
|
||||
.navds-grid__cell--sm-1 {
|
||||
grid-column: span 1;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-3 {
|
||||
grid-column: span 3;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-4 {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-5 {
|
||||
grid-column: span 5;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-6 {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-7 {
|
||||
grid-column: span 7;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-8 {
|
||||
grid-column: span 8;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-9 {
|
||||
grid-column: span 9;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-10 {
|
||||
grid-column: span 10;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-11 {
|
||||
grid-column: span 11;
|
||||
}
|
||||
|
||||
.navds-grid__cell--sm-12 {
|
||||
grid-column: span 12;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 648px) {
|
||||
.navds-grid__cell--md-1 {
|
||||
grid-column: span 1;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-3 {
|
||||
grid-column: span 3;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-4 {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-5 {
|
||||
grid-column: span 5;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-6 {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-7 {
|
||||
grid-column: span 7;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-8 {
|
||||
grid-column: span 8;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-9 {
|
||||
grid-column: span 9;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-10 {
|
||||
grid-column: span 10;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-11 {
|
||||
grid-column: span 11;
|
||||
}
|
||||
|
||||
.navds-grid__cell--md-12 {
|
||||
grid-column: span 12;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
.navds-grid__cell--lg-1 {
|
||||
grid-column: span 1;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-2 {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-3 {
|
||||
grid-column: span 3;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-4 {
|
||||
grid-column: span 4;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-5 {
|
||||
grid-column: span 5;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-6 {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-7 {
|
||||
grid-column: span 7;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-8 {
|
||||
grid-column: span 8;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-9 {
|
||||
grid-column: span 9;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-10 {
|
||||
grid-column: span 10;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-11 {
|
||||
grid-column: span 11;
|
||||
}
|
||||
|
||||
.navds-grid__cell--lg-12 {
|
||||
grid-column: span 12;
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,11 @@
|
||||
|
||||
.navds-help-text__button:where(:hover, :focus-visible, [aria-expanded="true"]) > .navds-help-text__icon--filled {
|
||||
display: inherit;
|
||||
color: var(--ac-help-text-button-hover-color, var(--a-surface-action-hover));
|
||||
}
|
||||
|
||||
.navds-help-text__button[aria-expanded="true"] > .navds-help-text__icon--filled {
|
||||
color: var(--ac-help-text-button-active-color, var(--a-surface-action-active));
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
@charset "UTF-8";
|
||||
@import "baseline/index.css";
|
||||
@import "typography.css";
|
||||
@import "grid.css";
|
||||
@import "accordion.css";
|
||||
@import "alert.css";
|
||||
@import "button.css";
|
||||
@import "content-container.css";
|
||||
@import "chat.css";
|
||||
@import "chips.css";
|
||||
@import "copybutton.css";
|
||||
|
||||