Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e6d91efd4 | ||
|
|
54495a4460 | ||
|
|
8b5bfb4b09 | ||
|
|
627d6d9a61 | ||
|
|
f9c2c77559 | ||
|
|
a0ca882ee2 | ||
|
|
fd6e2b41cb | ||
|
|
dd642d77e1 | ||
|
|
ad73a523a9 | ||
|
|
e92eb90d33 | ||
|
|
eec41d6cb8 | ||
|
|
8da0af090f | ||
|
|
99465ddbeb | ||
|
|
25305ebba0 | ||
|
|
ef3464c96c | ||
|
|
0480d785c4 | ||
|
|
ef5e671cfe | ||
|
|
fa156773e0 | ||
|
|
137b4c49c1 | ||
|
|
1fb72241fe | ||
|
|
42470baaaf | ||
|
|
8cd6512181 | ||
|
|
7e976f9e20 | ||
|
|
db828bddd3 | ||
|
|
443b129fe1 | ||
|
|
561fecbcac | ||
|
|
00177898f5 | ||
|
|
38f5e63008 | ||
|
|
c3d65a681e | ||
|
|
3025e4eb5c | ||
|
|
043277f79b | ||
|
|
a2b3936878 | ||
|
|
c90abe7c23 | ||
|
|
ea19081b71 | ||
|
|
b9da4fd716 | ||
|
|
858849d743 | ||
|
|
ae9e6235db | ||
|
|
f895555ab2 | ||
|
|
372a14b225 | ||
|
|
a82126b893 | ||
|
|
06193ae300 | ||
|
|
b6db2c4ce5 | ||
|
|
d4ee3afb12 | ||
|
|
6d6900c08b | ||
|
|
3b43ad51f9 | ||
|
|
fe4ad00462 | ||
|
|
2ea0876e50 | ||
|
|
460c9c3dbd | ||
|
|
88dc43bd50 | ||
|
|
2e476ef559 | ||
|
|
f3542d50d4 | ||
|
|
1f9a343afc | ||
|
|
f026817dd3 | ||
|
|
36190f7657 | ||
|
|
f12070842a | ||
|
|
601e1569f8 | ||
|
|
f7452d5d0d | ||
|
|
04e65c701c | ||
|
|
878ee68e5c | ||
|
|
ade48469dd | ||
|
|
cbea73abda | ||
|
|
fd2e65e790 | ||
|
|
f720562908 | ||
|
|
5dedfa104a | ||
|
|
0189bd7b4a | ||
|
|
119d699ff2 | ||
|
|
fbc580e6bc | ||
|
|
13a9a2159f | ||
|
|
89e069d1d6 | ||
|
|
4896bb1569 | ||
|
|
713ccafed1 | ||
|
|
4632a3ae2b | ||
|
|
f6666302f5 | ||
|
|
bae136f847 | ||
|
|
53d1fe517e | ||
|
|
ea0d7c1386 | ||
|
|
8ea6c220dc | ||
|
|
9a190d371b | ||
|
|
685066e791 | ||
|
|
41a21d280a | ||
|
|
1895f4f763 | ||
|
|
8bc9a80bd4 | ||
|
|
d5a6285110 | ||
|
|
856e54aa2d | ||
|
|
8951c5c09c | ||
|
|
fa2904d54b | ||
|
|
8c9b2e268a | ||
|
|
dce149fca4 | ||
|
|
39db249546 | ||
|
|
9c5b32f9ba | ||
|
|
efc1446fb9 | ||
|
|
6d74cb72ad | ||
|
|
d6f08ffaaf | ||
|
|
1f4ac7bfde | ||
|
|
34538a1cbe | ||
|
|
9f088a9373 | ||
|
|
547219923f | ||
|
|
05709ca43e | ||
|
|
8fdb888270 | ||
|
|
87b2e54465 | ||
|
|
1270c88d19 | ||
|
|
a368cd35b6 | ||
|
|
b752d848e1 | ||
|
|
ac4b6f1713 | ||
|
|
e15c62ddfd | ||
|
|
641276bb44 | ||
|
|
0f983440ee | ||
|
|
fc62ae6870 | ||
|
|
293fadeaeb | ||
|
|
eb3f830995 | ||
|
|
e257bf4945 | ||
|
|
c8fd958e7a | ||
|
|
0da07be3b7 | ||
|
|
c054a607b8 | ||
|
|
15b000e162 | ||
|
|
11133d1a8d | ||
|
|
39d83bfc50 | ||
|
|
8ed0872b05 | ||
|
|
7cc33d880a | ||
|
|
2c8dd2bc8a | ||
|
|
3ac02e3d87 | ||
|
|
e15edd61ea | ||
|
|
f38ab0bb45 | ||
|
|
c7409c073b | ||
|
|
33b4e373b6 | ||
|
|
7d53efeeb7 | ||
|
|
452e8d8f27 | ||
|
|
57356ea067 | ||
|
|
41ae4a4b9f | ||
|
|
576b2e93a3 | ||
|
|
f7db3b7740 | ||
|
|
5f6996a64c | ||
|
|
7e7e97c430 | ||
|
|
1ca5328d0e | ||
|
|
20fde22390 | ||
|
|
f400485fdd | ||
|
|
9c93342892 | ||
|
|
6707674d88 | ||
|
|
0be3a081df | ||
|
|
6483d6ba68 | ||
|
|
c5f46e60ad | ||
|
|
204017eb96 | ||
|
|
37289b110c | ||
|
|
539108a1f7 | ||
|
|
5da987f26a | ||
|
|
a85517e9e0 | ||
|
|
bfc3061a70 | ||
|
|
85131a54c2 | ||
|
|
339ba372ac | ||
|
|
20d5ad597a | ||
|
|
aa7c2d9598 | ||
|
|
4921dcfe7b | ||
|
|
23f4d4b4a6 | ||
|
|
47a4dd6c4c | ||
|
|
702aecf34b | ||
|
|
c449c380fa | ||
|
|
5f81e617c8 | ||
|
|
7cefa52b81 | ||
|
|
97fbd9de64 | ||
|
|
1fdb7c84c3 | ||
|
|
ca0d5b4246 | ||
|
|
9622b61a3d | ||
|
|
0fe767652d | ||
|
|
256ab2a166 | ||
|
|
4118a27c18 | ||
|
|
2d669a7513 | ||
|
|
923fce1961 | ||
|
|
16739a2cf6 | ||
|
|
3227e0db91 | ||
|
|
ccb090448d | ||
|
|
36b0d8a8fd | ||
|
|
056e29af52 | ||
|
|
4a2e47fe6a | ||
|
|
1eace15576 | ||
|
|
ef44f2a25b | ||
|
|
916b383e7b | ||
|
|
bc8761295b | ||
|
|
6d9f9001fe | ||
|
|
039332b4f8 | ||
|
|
8cadfd0979 | ||
|
|
c200f580c1 | ||
|
|
5ce8ec620c |
No files matched your search
@@ -1,31 +1,35 @@
|
||||
# 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",
|
||||
|
||||
@@ -143,7 +143,11 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["**/examples/__parts*/*.tsx"],
|
||||
files: [
|
||||
"**/examples/__parts*/*.tsx",
|
||||
"**/pages/templates/**/*.tsx",
|
||||
"**/pages/eksempler/**/*.tsx",
|
||||
],
|
||||
plugins: ["aksel-local"],
|
||||
rules: {
|
||||
"aksel-local/import-check": ["error"], // Only allow imports from @navikt and react
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
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
|
||||
|
||||
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: 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 }}
|
||||
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 }}
|
||||
@@ -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@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
cache-dependency-path: "**/yarn.lock"
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
shell: bash
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{ inputs.npm_auth_token }}
|
||||
|
||||
- name: Boot (build packages)
|
||||
run: yarn boot
|
||||
shell: bash
|
||||
@@ -14,45 +14,20 @@ jobs:
|
||||
contents: "read"
|
||||
id-token: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
fetch-depth: 1
|
||||
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
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: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
|
||||
run: echo "" > ./aksel.nav.no/website/.env
|
||||
|
||||
- name: Build application
|
||||
env:
|
||||
SANITY_READ: ${{ secrets.SANITY_READ }}
|
||||
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
|
||||
run: |
|
||||
yarn boot
|
||||
yarn workspace aksel.nav.no build:next
|
||||
|
||||
- name: Upload static files to NAV CDN
|
||||
uses: nais/deploy/actions/cdn-upload/v2@master
|
||||
- name: Setup and build Next.js application
|
||||
uses: ./.github/actions/build-website
|
||||
with:
|
||||
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 }}
|
||||
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: Get complete tag
|
||||
run: echo "TAG=DEV-$( date +%s )" >> $GITHUB_ENV
|
||||
|
||||
@@ -16,24 +16,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Setup project
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
npm_auth_token: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Run docgen
|
||||
run: |
|
||||
yarn boot
|
||||
yarn docgen
|
||||
|
||||
- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
|
||||
run: echo "" > ./aksel.nav.no/website/.env
|
||||
- name: Run ts-docgen
|
||||
run: yarn docgen
|
||||
|
||||
- name: Update sanity sync
|
||||
env:
|
||||
@@ -48,46 +37,20 @@ jobs:
|
||||
contents: "read"
|
||||
id-token: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
fetch-depth: 1
|
||||
|
||||
- name: add tokens to .env
|
||||
run: |
|
||||
echo "USE_CDN_ASSETS=true" >> aksel.nav.no/website/.env
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Build packages
|
||||
run: yarn boot
|
||||
|
||||
- name: Tests
|
||||
run: yarn workspace website test
|
||||
|
||||
- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
|
||||
run: echo "" > ./aksel.nav.no/website/.env
|
||||
|
||||
- name: Build application
|
||||
env:
|
||||
SANITY_READ: ${{ secrets.SANITY_READ }}
|
||||
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
|
||||
run: yarn workspace aksel.nav.no build:next
|
||||
|
||||
- name: Upload static files to NAV CDN
|
||||
uses: nais/deploy/actions/cdn-upload/v2@master
|
||||
- name: Setup and build Next.js application
|
||||
uses: ./.github/actions/build-website
|
||||
with:
|
||||
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 }}
|
||||
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: Get complete tag
|
||||
run: echo "TAG=PROD-$( date +%s )" >> $GITHUB_ENV
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
name: Redeploy image 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@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- uses: actions/checkout@v4
|
||||
- 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 }}
|
||||
@@ -16,20 +16,18 @@ jobs:
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
cache-dependency-path: "**/yarn.lock"
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd aksel.nav.no/website && yarn
|
||||
|
||||
- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
|
||||
run: echo "" > ./aksel.nav.no/website/.env
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- name: Export dataset
|
||||
run: cd aksel.nav.no/website && yarn backup
|
||||
env:
|
||||
SANITY_READ: ${{ secrets.SANITY_READ }}
|
||||
run: cd aksel.nav.no/website && yarn backup
|
||||
|
||||
- name: Upload GCP bucket
|
||||
uses: "google-github-actions/auth@v2"
|
||||
with:
|
||||
|
||||
@@ -18,67 +18,48 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
chromatic:
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ignore-chromatic') }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Setup project
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
|
||||
- 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
|
||||
|
||||
- name: Build packages
|
||||
run: yarn boot
|
||||
npm_auth_token: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- name: Chromatic
|
||||
uses: chromaui/action@latest
|
||||
id: chromatic_tests
|
||||
continue-on-error: true
|
||||
continue-on-error: false
|
||||
with:
|
||||
autoAcceptChanges: "main"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
||||
exitZeroOnChanges: false
|
||||
exitZeroOnChanges: true
|
||||
buildScriptName: "build:storybook-chromatic"
|
||||
onlyChanged: true
|
||||
untraced: "**/package.json|yarn.lock|**/*.md"
|
||||
externals: \@navikt/core/css/**/*.css
|
||||
externals: "**/core/css/*.css|**/core/css/baseline/*.css|**/core/css/form/*.css|**/core/css/primitives/*.css"
|
||||
traceChanged: true
|
||||
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
|
||||
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'"
|
||||
if: github.event_name != 'push' && !contains(github.event.head_commit.message, '[ci skip]')
|
||||
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'"
|
||||
if: github.event_name != 'push' && !contains(github.event.head_commit.message, '[ci skip]')
|
||||
uses: peter-evans/find-comment@v2
|
||||
id: fc
|
||||
with:
|
||||
@@ -87,27 +68,17 @@ jobs:
|
||||
body-includes: Storybook demo
|
||||
|
||||
- name: Create or update comment
|
||||
if: steps.chromatic_tests.outcome == 'success' && !contains(github.event.head_commit.message, '[ci skip]') && github.event_name != 'push'
|
||||
if: github.event_name != 'push' && !contains(github.event.head_commit.message, '[ci skip]')
|
||||
uses: peter-evans/create-or-update-comment@v3
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
## [Storybook demo](${{steps.storybook_url.outputs.replaced}})
|
||||
## [Storybook demo](${{steps.chromatic_tests.outputs.storybookUrl}}) / [Chromatic](${{steps.chromatic_tests.outputs.url}})
|
||||
|
||||
[${{ 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
|
||||
${{ 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) || '' }}
|
||||
|
||||
- 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@v3
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
body: |
|
||||
## [Storybook demo](${{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
|
||||
[${{ 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
|
||||
@@ -9,36 +9,53 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Validate build"
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
lint:
|
||||
name: "Linter: eslint, stylelint"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Setup project
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- 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
|
||||
|
||||
- name: Boot (build packages)
|
||||
run: yarn boot
|
||||
npm_auth_token: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
|
||||
validate-examples:
|
||||
name: "Validate Aksel.nav.no component examples"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
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 tests"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup project
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
npm_auth_token: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- name: Test
|
||||
run: yarn test
|
||||
@@ -0,0 +1,39 @@
|
||||
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.48.1-jammy
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
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: Run Playwright tests
|
||||
env:
|
||||
SANITY_READ: ${{ secrets.SANITY_READ }}
|
||||
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
|
||||
|
||||
run: yarn workspace website e2e:ci-full
|
||||
@@ -1,53 +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.48.1-jammy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- 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
|
||||
|
||||
- name: Build packages
|
||||
run: |
|
||||
yarn boot
|
||||
|
||||
- name: Create empty .env file (Can be removed when env-file-if-exists is implemented in node v22)
|
||||
run: echo "" > ./aksel.nav.no/website/.env
|
||||
|
||||
- name: Build application
|
||||
env:
|
||||
SANITY_READ: ${{ secrets.SANITY_READ }}
|
||||
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
|
||||
run: yarn workspace aksel.nav.no build:next
|
||||
|
||||
- name: Run Playwright tests
|
||||
env:
|
||||
SANITY_READ: ${{ secrets.SANITY_READ }}
|
||||
SANITY_READ_NO_DRAFTS: ${{ secrets.SANITY_READ_NO_DRAFTS }}
|
||||
run: yarn workspace website e2e:ci-full
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: aksel.nav.no/website/playwright-report/
|
||||
retention-days: 10
|
||||
@@ -25,12 +25,12 @@ jobs:
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
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
|
||||
|
||||
@@ -15,16 +15,16 @@ jobs:
|
||||
id-token: "write"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup project
|
||||
uses: ./.github/actions/setup
|
||||
with:
|
||||
npm_auth_token: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- run: yarn install
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
|
||||
- run: yarn boot
|
||||
- run: cd ./examples/referansesider && yarn && yarn build
|
||||
- uses: nais/deploy/actions/spa-deploy/v2@master
|
||||
with:
|
||||
|
||||
@@ -30,9 +30,7 @@ jobs:
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: yarn
|
||||
- name: set-env for yarn install to @navikt scope
|
||||
shell: bash
|
||||
run: echo "NPM_AUTH_TOKEN=${{ secrets.READER_TOKEN }}" >> $GITHUB_ENV
|
||||
cache-dependency-path: "**/yarn.lock"
|
||||
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
@@ -40,6 +38,8 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
|
||||
|
||||
- name: Create release Pull Request or publish to NPM
|
||||
id: changesets
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
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: nais/deploy/actions/cdn-upload/v2@master
|
||||
with:
|
||||
@@ -94,7 +94,7 @@ 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: nais/deploy/actions/cdn-upload/v2@master
|
||||
with:
|
||||
|
||||
@@ -18,6 +18,7 @@ jobs:
|
||||
dockerfile: scripts/article-views/Dockerfile.update-article-views
|
||||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
|
||||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
|
||||
|
||||
- name: start naisjob prod-gcp
|
||||
uses: nais/deploy/actions/deploy@master
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
CHANGED=`git diff $1 $2 --stat -- yarn.lock | wc -l`
|
||||
if [ $CHANGED -gt 0 ];
|
||||
then
|
||||
echo
|
||||
echo "*** 🟡 yarn.lock has changed 🟡 ***"
|
||||
fi
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
CHANGED=`git diff HEAD@{1} --stat -- yarn.lock | wc -l`
|
||||
if [ $CHANGED -gt 0 ];
|
||||
then
|
||||
echo
|
||||
echo "*** 🟡 yarn.lock has changed 🟡 ***"
|
||||
fi
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname $0)/_/husky.sh"
|
||||
|
||||
yarn lint-staged
|
||||
yarn lint-staged && yarn tsx ./scripts/in-sync-versions.ts
|
||||
@@ -11,7 +11,7 @@ import Setup from "./assets/setup.png";
|
||||
|
||||
# Getting started
|
||||
|
||||
Aksel is the toolbox for product development <a href="https://aksel.nav.no"target="_blank">@NAV</a> (Norwegian Labour and Welfare Administration)
|
||||
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>
|
||||
@@ -30,7 +30,7 @@ import Setup from "./assets/setup.png";
|
||||
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>
|
||||
<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">
|
||||
|
||||
@@ -51,7 +51,6 @@ export default {
|
||||
],
|
||||
addons: [
|
||||
"@storybook/addon-a11y",
|
||||
"@whitespace/storybook-addon-html",
|
||||
"@storybook/addon-interactions",
|
||||
"@storybook/addon-themes",
|
||||
{
|
||||
@@ -71,7 +70,11 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
"storybook-addon-pseudo-states",
|
||||
/**
|
||||
* https://github.com/chromaui/storybook-addon-pseudo-states/issues/101
|
||||
* Currently disabled to avoid interference with darkmode update
|
||||
*/
|
||||
/* "storybook-addon-pseudo-states", */
|
||||
],
|
||||
framework: {
|
||||
name: "@storybook/react-vite",
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
import { withThemeByClassName } from "@storybook/addon-themes";
|
||||
import React, { useLayoutEffect } from "react";
|
||||
import darksideCss from "@navikt/ds-css/darkside/index.css?inline";
|
||||
import defaultCss from "@navikt/ds-css/index.css?inline";
|
||||
import "./layout.css";
|
||||
|
||||
export const parameters = {
|
||||
options: {
|
||||
storySort: {
|
||||
method: "alphabetical",
|
||||
order: [
|
||||
"Getting started",
|
||||
"ds-react",
|
||||
["Primitives"],
|
||||
["Default", "Controls"],
|
||||
"Aksel-icons",
|
||||
],
|
||||
},
|
||||
},
|
||||
layout: "centered",
|
||||
backgrounds: { disable: true },
|
||||
};
|
||||
|
||||
export const globalTypes = {
|
||||
mode: {
|
||||
name: "Darkside",
|
||||
toolbar: {
|
||||
items: [
|
||||
{
|
||||
value: "default",
|
||||
icon: "hourglass",
|
||||
title: "Default (old)",
|
||||
},
|
||||
{ value: "darkside", icon: "beaker", title: "Darkside (new)" },
|
||||
],
|
||||
showName: true,
|
||||
dynamicTitle: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const initialGlobals = {
|
||||
mode: "default",
|
||||
};
|
||||
|
||||
const ModeDecorator = ({ children, mode }) => {
|
||||
useLayoutEffect(() => {
|
||||
const style = document.createElement("style");
|
||||
style.innerHTML = mode === "darkside" ? darksideCss : defaultCss;
|
||||
document.head.appendChild(style);
|
||||
|
||||
if (mode === "darkside") {
|
||||
document.body.style.setProperty("background", "var(--ax-bg-default)");
|
||||
}
|
||||
|
||||
return () => {
|
||||
document.head.removeChild(style);
|
||||
document.body.style.removeProperty("background");
|
||||
};
|
||||
}, [mode]);
|
||||
|
||||
return children;
|
||||
};
|
||||
|
||||
export const decorators = [
|
||||
(StoryFn, context) => (
|
||||
<ModeDecorator mode={context.globals.mode}>
|
||||
<StoryFn />
|
||||
</ModeDecorator>
|
||||
),
|
||||
withThemeByClassName({
|
||||
themes: {
|
||||
light: "light",
|
||||
dark: "dark",
|
||||
},
|
||||
defaultTheme: "light",
|
||||
}),
|
||||
];
|
||||
@@ -0,0 +1,126 @@
|
||||
import { withThemeByClassName } from "@storybook/addon-themes";
|
||||
import { Preview } from "@storybook/react";
|
||||
import React, { useLayoutEffect } from "react";
|
||||
// @ts-expect-error - Temporary
|
||||
import darksideCss from "../@navikt/core/css/darkside/index.css?inline";
|
||||
// @ts-expect-error - Temporary
|
||||
import defaultCss from "../@navikt/core/css/index.css?inline";
|
||||
import { Provider } from "../@navikt/core/react/src/provider";
|
||||
import { Theme } from "../@navikt/core/react/src/theme";
|
||||
import en from "../@navikt/core/react/src/util/i18n/locales/en";
|
||||
import nb from "../@navikt/core/react/src/util/i18n/locales/nb";
|
||||
import nn from "../@navikt/core/react/src/util/i18n/locales/nn";
|
||||
import "./layout.css";
|
||||
|
||||
const ModeDecorator = ({ children, mode, theme }) => {
|
||||
useLayoutEffect(() => {
|
||||
const style = document.createElement("style");
|
||||
style.innerHTML = mode === "darkside" ? darksideCss : defaultCss;
|
||||
document.head.appendChild(style);
|
||||
|
||||
if (mode === "darkside") {
|
||||
document.body.style.setProperty("background", "var(--ax-bg-default)");
|
||||
}
|
||||
|
||||
return () => {
|
||||
document.head.removeChild(style);
|
||||
document.body.style.removeProperty("background");
|
||||
};
|
||||
}, [mode]);
|
||||
|
||||
return mode === "darkside" ? (
|
||||
<Theme theme={theme || undefined} hasBackground={false}>
|
||||
{children}
|
||||
</Theme>
|
||||
) : (
|
||||
children
|
||||
);
|
||||
};
|
||||
|
||||
const translations = {
|
||||
nb,
|
||||
nn,
|
||||
en,
|
||||
};
|
||||
|
||||
const LanguageDecorator = ({ children, language }) => {
|
||||
if (language) {
|
||||
return (
|
||||
<Provider translations={translations[language]}>{children}</Provider>
|
||||
);
|
||||
}
|
||||
return children;
|
||||
};
|
||||
|
||||
export default {
|
||||
parameters: {
|
||||
options: {
|
||||
storySort: {
|
||||
method: "alphabetical",
|
||||
order: [
|
||||
"Getting started",
|
||||
"ds-react",
|
||||
["Primitives"],
|
||||
["Default", "Controls"],
|
||||
"Aksel-icons",
|
||||
],
|
||||
},
|
||||
},
|
||||
layout: "centered",
|
||||
backgrounds: { disable: true },
|
||||
},
|
||||
|
||||
globalTypes: {
|
||||
mode: {
|
||||
name: "Darkside",
|
||||
toolbar: {
|
||||
items: [
|
||||
{
|
||||
value: "default",
|
||||
icon: "hourglass",
|
||||
title: "Default (old)",
|
||||
},
|
||||
{ value: "darkside", icon: "beaker", title: "Darkside (new)" },
|
||||
],
|
||||
showName: true,
|
||||
dynamicTitle: true,
|
||||
},
|
||||
},
|
||||
language: {
|
||||
toolbar: {
|
||||
icon: "globe",
|
||||
items: [
|
||||
{ value: undefined, title: "Unset" },
|
||||
{ value: "nb", right: "🇳🇴", title: "Norsk bokmål" },
|
||||
{ value: "nn", right: "🇳🇴", title: "Norsk nynorsk" },
|
||||
{ value: "en", right: "🇬🇧", title: "English" },
|
||||
],
|
||||
dynamicTitle: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
initialGlobals: {
|
||||
mode: "default",
|
||||
},
|
||||
|
||||
decorators: [
|
||||
(StoryFn, context) => (
|
||||
<ModeDecorator mode={context.globals.mode} theme={context.globals.theme}>
|
||||
<StoryFn />
|
||||
</ModeDecorator>
|
||||
),
|
||||
(StoryFn, context) => (
|
||||
<LanguageDecorator language={context.globals.language}>
|
||||
<StoryFn />
|
||||
</LanguageDecorator>
|
||||
),
|
||||
withThemeByClassName({
|
||||
themes: {
|
||||
light: "light",
|
||||
dark: "dark",
|
||||
},
|
||||
defaultTheme: "light",
|
||||
}),
|
||||
],
|
||||
} satisfies Preview;
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"cssVariables.lookupFiles": ["@navikt/core/css/dist/index.css"],
|
||||
"cssVariables.lookupFiles": [
|
||||
"@navikt/core/tokens/dist/tokens.css",
|
||||
"@navikt/core/tokens/dist/darkside/tokens.css"
|
||||
],
|
||||
"eslint.problems.shortenToSingleLine": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"files.watcherExclude": {
|
||||
|
||||
@@ -1,5 +1,37 @@
|
||||
# @navikt/aksel-icons
|
||||
|
||||
## 7.9.2
|
||||
|
||||
## 7.9.1
|
||||
|
||||
## 7.9.0
|
||||
|
||||
## 7.8.1
|
||||
|
||||
## 7.8.0
|
||||
|
||||
## 7.7.0
|
||||
|
||||
## 7.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Icons: Added new icons 'TruckPercent' and 'ShieldCheckmark' 🎉. ([#3416](https://github.com/navikt/aksel/pull/3416))
|
||||
|
||||
## 7.5.3
|
||||
|
||||
## 7.5.2
|
||||
|
||||
## 7.5.1
|
||||
|
||||
## 7.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Icons: 🎉 Added FileJpeg, FilePng and MedicalThermometer. ([#3332](https://github.com/navikt/aksel/pull/3332))
|
||||
|
||||
## 7.4.3
|
||||
|
||||
## 7.4.2
|
||||
|
||||
## 7.4.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Aksel icons
|
||||
|
||||
800+ open source icons made by Aksel, NAVs designsystem-team
|
||||
800+ open source icons made by Aksel, Nav's design system team.
|
||||
|
||||
- Designed for 24x24px
|
||||
- Available in React and SVG
|
||||
@@ -30,7 +30,7 @@ Tip: Use the `title` prop for accessible icons.
|
||||
|
||||
### Sizing
|
||||
|
||||
Each icons `width` and `height` is default `1em`. This allows you to use the native `fontSize`-prop to adjust sizing. We recommend using at least 1.5rem/24px for best possible visual representation.
|
||||
Each icon's `width` and `height` is default `1em`. This allows you to use the native `fontSize`-prop to adjust sizing. We recommend using at least 1.5rem/24px for the best possible visual representation.
|
||||
|
||||
```jsx
|
||||
<StarIcon fontSize="1.5rem" />
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
# Aksel Icons plugin
|
||||
|
||||
Pluginen gir deg mulighet til å se gjennom og hente ut alle ikonene i fra ikonpakken `@navikt/aksel-icons`. Du slipper da å hente nye oppdateringer fra Figma Community.
|
||||
Pluginen gir deg mulighet til å se gjennom og hente ut alle ikonene fra ikonpakken `@navikt/aksel-icons`. Du slipper da å hente nye oppdateringer fra Figma Community.
|
||||
|
||||
Referer til [ikon-dokumentasjonen](https://aksel.nav.no/ikoner) for å se alle ikonene.
|
||||
Gå til [ikon-dokumentasjonen](https://aksel.nav.no/ikoner) for å se alle ikonene.
|
||||
Har du ønsker om nye ikoner, eller ønsker å bidra med å lage nye, lag et issue på [GitHub-repoet for designsystemet](https://github.com/navikt/aksel).
|
||||
|
||||
## Quickstart
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"@svgr/core": "^8.1.0",
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/postcss-url": "^10.0.4",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"postcss": "^8.4.31",
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.20973 16.193H9.90274C10.1267 16.193 10.3041 16.1323 10.4347 16.011C10.5701 15.885 10.6377 15.7193 10.6377 15.514C10.6377 15.3087 10.5701 15.1453 10.4347 15.024C10.3041 14.898 10.1267 14.835 9.90274 14.835H9.20973V16.193Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.25 4.5C5.25 3.80964 5.80964 3.25 6.5 3.25H14C14.1989 3.25 14.3897 3.32902 14.5303 3.46967L18.5303 7.46967C18.671 7.61032 18.75 7.80109 18.75 8V12.25H21C21.4142 12.25 21.75 12.5858 21.75 13V20C21.75 20.4142 21.4142 20.75 21 20.75H3C2.58579 20.75 2.25 20.4142 2.25 20V13C2.25 12.5858 2.58579 12.25 3 12.25H5.25V4.5ZM6.75 12.25H17.25V8.75H14.5C13.8096 8.75 13.25 8.19036 13.25 7.5V4.75H6.75V12.25ZM14.75 5.81066L16.1893 7.25H14.75V5.81066ZM5.18047 19.077C4.6438 19.077 4.2168 18.9323 3.89947 18.643C3.5868 18.349 3.43047 17.9547 3.43047 17.46H4.48047C4.48047 17.6747 4.54347 17.8473 4.66947 17.978C4.79547 18.104 4.9658 18.167 5.18047 18.167C5.39514 18.167 5.56547 18.1063 5.69147 17.985C5.81747 17.859 5.88047 17.6887 5.88047 17.474V14.87H4.72547V13.89H6.93047V17.474C6.93047 17.9687 6.77414 18.3607 6.46147 18.65C6.1488 18.9347 5.7218 19.077 5.18047 19.077ZM8.15973 19V13.89H9.90274C10.2621 13.89 10.5747 13.9577 10.8407 14.093C11.1114 14.2283 11.3191 14.4173 11.4637 14.66C11.6131 14.9027 11.6877 15.1873 11.6877 15.514C11.6877 15.836 11.6131 16.1207 11.4637 16.368C11.3144 16.6107 11.1067 16.7997 10.8407 16.935C10.5747 17.0703 10.2621 17.138 9.90274 17.138H9.20973V19H8.15973ZM12.665 19V13.89H15.815V14.786H13.694V15.934H15.57V16.83H13.694V18.104H15.815V19H12.665ZM18.6403 19.07C18.2996 19.07 18.0009 19.007 17.7443 18.881C17.4876 18.7503 17.2869 18.5707 17.1423 18.342C17.0023 18.1087 16.9323 17.838 16.9323 17.53V15.36C16.9323 15.0473 17.0023 14.7767 17.1423 14.548C17.2869 14.3193 17.4876 14.142 17.7443 14.016C18.0009 13.8853 18.2996 13.82 18.6403 13.82C18.9856 13.82 19.2843 13.8853 19.5363 14.016C19.7929 14.142 19.9913 14.3193 20.1313 14.548C20.2759 14.7767 20.3483 15.0473 20.3483 15.36H19.2983C19.2983 15.1547 19.2399 14.9983 19.1233 14.891C19.0113 14.7837 18.8503 14.73 18.6403 14.73C18.4303 14.73 18.2669 14.7837 18.1503 14.891C18.0383 14.9983 17.9823 15.1547 17.9823 15.36V17.53C17.9823 17.7307 18.0383 17.887 18.1503 17.999C18.2669 18.1063 18.4303 18.16 18.6403 18.16C18.8503 18.16 19.0113 18.1063 19.1233 17.999C19.2399 17.887 19.2983 17.7307 19.2983 17.53V17.089H18.5423V16.2H20.3483V17.53C20.3483 17.838 20.2759 18.1087 20.1313 18.342C19.9913 18.5707 19.7929 18.7503 19.5363 18.881C19.2843 19.007 18.9856 19.07 18.6403 19.07Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,13 @@
|
||||
name: FileJpeg
|
||||
category: Files and application
|
||||
sub_category: Files
|
||||
keywords:
|
||||
- document
|
||||
- dokument
|
||||
- fil
|
||||
- file
|
||||
- jpg
|
||||
- jpeg
|
||||
variant: Stroke
|
||||
updated_at: 06.11.2024
|
||||
created_at: 06.11.2024
|
||||
@@ -0,0 +1,5 @@
|
||||
<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 3.25C13.1381 3.25 13.25 3.36193 13.25 3.5V7.5C13.25 8.19036 13.8096 8.75 14.5 8.75H18.5C18.6381 8.75 18.75 8.86193 18.75 9V10.5C18.75 10.6381 18.6381 10.75 18.5 10.75H5.5C5.36193 10.75 5.25 10.6381 5.25 10.5V4.5C5.25 3.80964 5.80964 3.25 6.5 3.25H13ZM15.1768 4.11612C15.0193 3.95863 14.75 4.07017 14.75 4.29289V7C14.75 7.13807 14.8619 7.25 15 7.25H17.7071C17.9298 7.25 18.0414 6.98072 17.8839 6.82322L15.1768 4.11612Z" fill="#23262A"/>
|
||||
<path d="M9.90274 16.193H9.20973V14.835H9.90274C10.1267 14.835 10.3041 14.898 10.4347 15.024C10.5701 15.1453 10.6377 15.3087 10.6377 15.514C10.6377 15.7193 10.5701 15.885 10.4347 16.011C10.3041 16.1323 10.1267 16.193 9.90274 16.193Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 12.25C2.58579 12.25 2.25 12.5858 2.25 13V20C2.25 20.4142 2.58579 20.75 3 20.75H21C21.4142 20.75 21.75 20.4142 21.75 20V13C21.75 12.5858 21.4142 12.25 21 12.25H3ZM3.89947 18.643C4.2168 18.9323 4.6438 19.077 5.18047 19.077C5.7218 19.077 6.1488 18.9347 6.46147 18.65C6.77414 18.3607 6.93047 17.9687 6.93047 17.474V13.89H4.72547V14.87H5.88047V17.474C5.88047 17.6887 5.81747 17.859 5.69147 17.985C5.56547 18.1063 5.39514 18.167 5.18047 18.167C4.9658 18.167 4.79547 18.104 4.66947 17.978C4.54347 17.8473 4.48047 17.6747 4.48047 17.46H3.43047C3.43047 17.9547 3.5868 18.349 3.89947 18.643ZM8.15973 13.89V19H9.20973V17.138H9.90274C10.2621 17.138 10.5747 17.0703 10.8407 16.935C11.1067 16.7997 11.3144 16.6107 11.4637 16.368C11.6131 16.1207 11.6877 15.836 11.6877 15.514C11.6877 15.1873 11.6131 14.9027 11.4637 14.66C11.3191 14.4173 11.1114 14.2283 10.8407 14.093C10.5747 13.9577 10.2621 13.89 9.90274 13.89H8.15973ZM12.665 13.89V19H15.815V18.104H13.694V16.83H15.57V15.934H13.694V14.786H15.815V13.89H12.665ZM17.7443 18.881C18.0009 19.007 18.2996 19.07 18.6403 19.07C18.9856 19.07 19.2843 19.007 19.5363 18.881C19.7929 18.7503 19.9913 18.5707 20.1313 18.342C20.2759 18.1087 20.3483 17.838 20.3483 17.53V16.2H18.5423V17.089H19.2983V17.53C19.2983 17.7307 19.2399 17.887 19.1233 17.999C19.0113 18.1063 18.8503 18.16 18.6403 18.16C18.4303 18.16 18.2669 18.1063 18.1503 17.999C18.0383 17.887 17.9823 17.7307 17.9823 17.53V15.36C17.9823 15.1547 18.0383 14.9983 18.1503 14.891C18.2669 14.7837 18.4303 14.73 18.6403 14.73C18.8503 14.73 19.0113 14.7837 19.1233 14.891C19.2399 14.9983 19.2983 15.1547 19.2983 15.36H20.3483C20.3483 15.0473 20.2759 14.7767 20.1313 14.548C19.9913 14.3193 19.7929 14.142 19.5363 14.016C19.2843 13.8853 18.9856 13.82 18.6403 13.82C18.2996 13.82 18.0009 13.8853 17.7443 14.016C17.4876 14.142 17.2869 14.3193 17.1423 14.548C17.0023 14.7767 16.9323 15.0473 16.9323 15.36V17.53C16.9323 17.838 17.0023 18.1087 17.1423 18.342C17.2869 18.5707 17.4876 18.7503 17.7443 18.881Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,13 @@
|
||||
name: FileJpegFill
|
||||
category: Files and application
|
||||
sub_category: Files
|
||||
keywords:
|
||||
- document
|
||||
- dokument
|
||||
- fil
|
||||
- file
|
||||
- jpg
|
||||
- jpeg
|
||||
variant: Fill
|
||||
updated_at: 06.11.2024
|
||||
created_at: 06.11.2024
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.0061 16.193H7.6991C7.9231 16.193 8.10043 16.1323 8.2311 16.011C8.36644 15.885 8.4341 15.7193 8.4341 15.514C8.4341 15.3087 8.36644 15.1453 8.2311 15.024C8.10043 14.898 7.9231 14.835 7.6991 14.835H7.0061V16.193Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.25 4.5C5.25 3.80964 5.80964 3.25 6.5 3.25H14C14.1989 3.25 14.3897 3.32902 14.5303 3.46967L18.5303 7.46967C18.671 7.61032 18.75 7.80109 18.75 8V12.25H21C21.4142 12.25 21.75 12.5858 21.75 13V20C21.75 20.4142 21.4142 20.75 21 20.75H3C2.58579 20.75 2.25 20.4142 2.25 20V13C2.25 12.5858 2.58579 12.25 3 12.25H5.25V4.5ZM6.75 12.25H17.25V8.75H14.5C13.8096 8.75 13.25 8.19036 13.25 7.5V4.75H6.75V12.25ZM14.75 5.81066L16.1893 7.25H14.75V5.81066ZM5.9561 19V13.89H7.6991C8.05843 13.89 8.3711 13.9577 8.6371 14.093C8.90777 14.2283 9.11544 14.4173 9.2601 14.66C9.40944 14.9027 9.4841 15.1873 9.4841 15.514C9.4841 15.836 9.40944 16.1207 9.2601 16.368C9.11077 16.6107 8.9031 16.7997 8.6371 16.935C8.3711 17.0703 8.05843 17.138 7.6991 17.138H7.0061V19H5.9561ZM10.3214 19V13.89H11.5464L12.8694 17.845C12.8554 17.6723 12.839 17.474 12.8204 17.25C12.8017 17.0213 12.7854 16.795 12.7714 16.571C12.762 16.3423 12.7574 16.1487 12.7574 15.99V13.89H13.6814V19H12.4564L11.1474 15.045C11.1614 15.1943 11.1754 15.3717 11.1894 15.577C11.2034 15.7823 11.215 15.99 11.2244 16.2C11.2384 16.41 11.2454 16.5967 11.2454 16.76V19H10.3214ZM16.4366 19.07C16.096 19.07 15.7973 19.007 15.5406 18.881C15.284 18.7503 15.0833 18.5707 14.9386 18.342C14.7986 18.1087 14.7286 17.838 14.7286 17.53V15.36C14.7286 15.0473 14.7986 14.7767 14.9386 14.548C15.0833 14.3193 15.284 14.142 15.5406 14.016C15.7973 13.8853 16.096 13.82 16.4366 13.82C16.782 13.82 17.0806 13.8853 17.3326 14.016C17.5893 14.142 17.7876 14.3193 17.9276 14.548C18.0723 14.7767 18.1446 15.0473 18.1446 15.36H17.0946C17.0946 15.1547 17.0363 14.9983 16.9196 14.891C16.8076 14.7837 16.6466 14.73 16.4366 14.73C16.2266 14.73 16.0633 14.7837 15.9466 14.891C15.8346 14.9983 15.7786 15.1547 15.7786 15.36V17.53C15.7786 17.7307 15.8346 17.887 15.9466 17.999C16.0633 18.1063 16.2266 18.16 16.4366 18.16C16.6466 18.16 16.8076 18.1063 16.9196 17.999C17.0363 17.887 17.0946 17.7307 17.0946 17.53V17.089H16.3386V16.2H18.1446V17.53C18.1446 17.838 18.0723 18.1087 17.9276 18.342C17.7876 18.5707 17.5893 18.7503 17.3326 18.881C17.0806 19.007 16.782 19.07 16.4366 19.07Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,12 @@
|
||||
name: FilePng
|
||||
category: Files and application
|
||||
sub_category: Files
|
||||
keywords:
|
||||
- document
|
||||
- dokument
|
||||
- fil
|
||||
- file
|
||||
- png
|
||||
variant: Stroke
|
||||
updated_at: 06.11.2024
|
||||
created_at: 06.11.2024
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.25 3.5C13.25 3.36193 13.1381 3.25 13 3.25H6.5C5.80964 3.25 5.25 3.80964 5.25 4.5V10.5C5.25 10.6381 5.36193 10.75 5.5 10.75H18.5C18.6381 10.75 18.75 10.6381 18.75 10.5V9C18.75 8.86193 18.6381 8.75 18.5 8.75H14.5C13.8096 8.75 13.25 8.19036 13.25 7.5V3.5Z" fill="#23262A"/>
|
||||
<path d="M14.75 4.29289C14.75 4.07017 15.0193 3.95863 15.1768 4.11612L17.8839 6.82322C18.0414 6.98072 17.9298 7.25 17.7071 7.25H15C14.8619 7.25 14.75 7.13807 14.75 7V4.29289Z" fill="#23262A"/>
|
||||
<path d="M7.0061 16.193H7.6991C7.9231 16.193 8.10043 16.1323 8.2311 16.011C8.36644 15.885 8.4341 15.7193 8.4341 15.514C8.4341 15.3087 8.36644 15.1453 8.2311 15.024C8.10043 14.898 7.9231 14.835 7.6991 14.835H7.0061V16.193Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 13C2.25 12.5858 2.58579 12.25 3 12.25H21C21.4142 12.25 21.75 12.5858 21.75 13V20C21.75 20.4142 21.4142 20.75 21 20.75H3C2.58579 20.75 2.25 20.4142 2.25 20V13ZM5.9561 19V13.89H7.6991C8.05843 13.89 8.3711 13.9577 8.6371 14.093C8.90777 14.2283 9.11544 14.4173 9.2601 14.66C9.40944 14.9027 9.4841 15.1873 9.4841 15.514C9.4841 15.836 9.40944 16.1207 9.2601 16.368C9.11077 16.6107 8.9031 16.7997 8.6371 16.935C8.3711 17.0703 8.05843 17.138 7.6991 17.138H7.0061V19H5.9561ZM10.3214 19V13.89H11.5464L12.8694 17.845C12.8554 17.6723 12.839 17.474 12.8204 17.25C12.8017 17.0213 12.7854 16.795 12.7714 16.571C12.762 16.3423 12.7574 16.1487 12.7574 15.99V13.89H13.6814V19H12.4564L11.1474 15.045C11.1614 15.1943 11.1754 15.3717 11.1894 15.577C11.2034 15.7823 11.215 15.99 11.2244 16.2C11.2384 16.41 11.2454 16.5967 11.2454 16.76V19H10.3214ZM16.4366 19.07C16.096 19.07 15.7973 19.007 15.5406 18.881C15.284 18.7503 15.0833 18.5707 14.9386 18.342C14.7986 18.1087 14.7286 17.838 14.7286 17.53V15.36C14.7286 15.0473 14.7986 14.7767 14.9386 14.548C15.0833 14.3193 15.284 14.142 15.5406 14.016C15.7973 13.8853 16.096 13.82 16.4366 13.82C16.782 13.82 17.0806 13.8853 17.3326 14.016C17.5893 14.142 17.7876 14.3193 17.9276 14.548C18.0723 14.7767 18.1446 15.0473 18.1446 15.36H17.0946C17.0946 15.1547 17.0363 14.9983 16.9196 14.891C16.8076 14.7837 16.6466 14.73 16.4366 14.73C16.2266 14.73 16.0633 14.7837 15.9466 14.891C15.8346 14.9983 15.7786 15.1547 15.7786 15.36V17.53C15.7786 17.7307 15.8346 17.887 15.9466 17.999C16.0633 18.1063 16.2266 18.16 16.4366 18.16C16.6466 18.16 16.8076 18.1063 16.9196 17.999C17.0363 17.887 17.0946 17.7307 17.0946 17.53V17.089H16.3386V16.2H18.1446V17.53C18.1446 17.838 18.0723 18.1087 17.9276 18.342C17.7876 18.5707 17.5893 18.7503 17.3326 18.881C17.0806 19.007 16.782 19.07 16.4366 19.07Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,12 @@
|
||||
name: FilePngFill
|
||||
category: Files and application
|
||||
sub_category: Files
|
||||
keywords:
|
||||
- document
|
||||
- dokument
|
||||
- fil
|
||||
- file
|
||||
- png
|
||||
variant: Fill
|
||||
updated_at: 06.11.2024
|
||||
created_at: 06.11.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="M15.7626 3.17678C16.446 2.49336 17.554 2.49336 18.2374 3.17678L20.8232 5.76257C21.5066 6.44598 21.5066 7.55402 20.8232 8.23744L13.409 15.6517C12.7057 16.3549 11.7519 16.75 10.7574 16.75H8.31066L7.03033 18.0303C6.73744 18.3232 6.26256 18.3232 5.96967 18.0303C5.67678 17.7374 5.67678 17.2626 5.96967 16.9697L7.25 15.6893V13.2426C7.25 12.2481 7.64509 11.2943 8.34835 10.591L15.7626 3.17678ZM17.1768 4.23744C17.0791 4.13981 16.9209 4.13981 16.8232 4.23744L9.40901 11.6517C8.98705 12.0736 8.75 12.6459 8.75 13.2426V15.25H10.7574C11.3541 15.25 11.9264 15.0129 12.3483 14.591L19.7626 7.17678C19.8602 7.07915 19.8602 6.92086 19.7626 6.82323L17.1768 4.23744ZM17.0303 6.96967C17.3232 7.26256 17.3232 7.73744 17.0303 8.03033L14.0303 11.0303C13.7374 11.3232 13.2626 11.3232 12.9697 11.0303C12.6768 10.7374 12.6768 10.2626 12.9697 9.96967L15.9697 6.96967C16.2626 6.67678 16.7374 6.67678 17.0303 6.96967ZM5.03033 18.9697C5.32322 19.2626 5.32322 19.7374 5.03033 20.0303L4.03033 21.0303C3.73744 21.3232 3.26256 21.3232 2.96967 21.0303C2.67678 20.7374 2.67678 20.2626 2.96967 19.9697L3.96967 18.9697C4.26256 18.6768 4.73744 18.6768 5.03033 18.9697Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,15 @@
|
||||
name: MedicalThermometer
|
||||
category: Wellness
|
||||
sub_category: Equipment
|
||||
keywords:
|
||||
- termometer
|
||||
- lege
|
||||
- umiddelbar hjelp
|
||||
- helse
|
||||
- health
|
||||
- help
|
||||
- doctor
|
||||
- patient
|
||||
variant: Stroke
|
||||
updated_at: 14.10.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="M18.2374 3.17687C17.554 2.49345 16.446 2.49345 15.7626 3.17687L8.34835 10.5911C7.64509 11.2943 7.25 12.2482 7.25 13.2427V15.6893L5.96967 16.9697C5.67678 17.2626 5.67678 17.7374 5.96967 18.0303C6.26256 18.3232 6.73744 18.3232 7.03033 18.0303L8.31057 16.7501H10.7574C11.7519 16.7501 12.7057 16.355 13.409 15.6517L20.8232 8.23753C21.5066 7.55411 21.5066 6.44608 20.8232 5.76266L18.2374 3.17687ZM17.0303 8.03033C17.3232 7.73744 17.3232 7.26256 17.0303 6.96967C16.7374 6.67678 16.2626 6.67678 15.9697 6.96967L12.9697 9.96967C12.6768 10.2626 12.6768 10.7374 12.9697 11.0303C13.2626 11.3232 13.7374 11.3232 14.0303 11.0303L17.0303 8.03033ZM5.03033 20.0303C5.32322 19.7374 5.32322 19.2626 5.03033 18.9697C4.73744 18.6768 4.26256 18.6768 3.96967 18.9697L2.96967 19.9697C2.67678 20.2626 2.67678 20.7374 2.96967 21.0303C3.26256 21.3232 3.73744 21.3232 4.03033 21.0303L5.03033 20.0303Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,15 @@
|
||||
name: MedicalThermometerFill
|
||||
category: Wellness
|
||||
sub_category: Equipment
|
||||
keywords:
|
||||
- termometer
|
||||
- lege
|
||||
- umiddelbar hjelp
|
||||
- helse
|
||||
- health
|
||||
- help
|
||||
- doctor
|
||||
- patient
|
||||
variant: Fill
|
||||
updated_at: 14.10.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="M14.0091 3.05126C12.9222 1.88827 11.0778 1.88827 9.99089 3.05126L9.20244 3.89486C8.95602 4.15852 8.60767 4.30281 8.24698 4.29063L7.09295 4.25162C5.502 4.19786 4.19787 5.50199 4.25164 7.09294L4.29064 8.24697C4.30283 8.60766 4.15853 8.95601 3.89487 9.20243L3.05127 9.99087C1.88828 11.0778 1.88828 12.9221 3.05127 14.0091L3.89487 14.7975C4.15853 15.044 4.30283 15.3923 4.29064 15.753L4.25164 16.907C4.19787 18.498 5.502 19.8021 7.09295 19.7483L8.24698 19.7093C8.60767 19.6972 8.95602 19.8414 9.20244 20.1051L9.99089 20.9487C11.0778 22.1117 12.9222 22.1117 14.0091 20.9487L14.7976 20.1051C15.044 19.8414 15.3923 19.6972 15.753 19.7093L16.907 19.7483C18.498 19.8021 19.8021 18.498 19.7484 16.907L19.7094 15.753C19.6972 15.3923 19.8415 15.044 20.1051 14.7975L20.9487 14.0091C22.1117 12.9221 22.1117 11.0778 20.9487 9.99087L20.1051 9.20243C19.8415 8.95601 19.6972 8.60766 19.7094 8.24697L19.7484 7.09294C19.8021 5.50199 18.498 4.19786 16.907 4.25162L15.753 4.29063C15.3923 4.30281 15.044 4.15852 14.7976 3.89486L14.0091 3.05126ZM11.0868 4.07549C11.5808 3.54686 12.4192 3.54686 12.9132 4.07549L13.7017 4.91909C14.2438 5.49914 15.0102 5.81659 15.8037 5.78977L16.9577 5.75077C17.6809 5.72633 18.2737 6.31912 18.2492 7.04228L18.2102 8.19631C18.1834 8.98981 18.5008 9.75618 19.0809 10.2983L19.9245 11.0868C20.4531 11.5808 20.4531 12.4192 19.9245 12.9132L19.0809 13.7017C18.5008 14.2438 18.1834 15.0102 18.2102 15.8037L18.2492 16.9577C18.2737 17.6809 17.6809 18.2736 16.9577 18.2492L15.8037 18.2102C15.0102 18.1834 14.2438 18.5008 13.7017 19.0809L12.9132 19.9245C12.4192 20.4531 11.5808 20.4531 11.0868 19.9245L10.2983 19.0809C9.75619 18.5008 8.98982 18.1834 8.19632 18.2102L7.04229 18.2492C6.31913 18.2736 5.72634 17.6809 5.75078 16.9577L5.78978 15.8037C5.8166 15.0102 5.49916 14.2438 4.91911 13.7017L4.0755 12.9132C3.54687 12.4192 3.54687 11.5808 4.0755 11.0868L4.91911 10.2983C5.49916 9.75618 5.8166 8.98981 5.78978 8.19631L5.75078 7.04228C5.72634 6.31912 6.31913 5.72633 7.04229 5.75077L8.19632 5.78977C8.98982 5.81659 9.75619 5.49915 10.2983 4.91909L11.0868 4.07549ZM8.7195 8.71973C9.01239 8.42684 9.48727 8.42684 9.78016 8.71973L11.9998 10.9394L14.2195 8.71973C14.5124 8.42684 14.9873 8.42684 15.2802 8.71973C15.5731 9.01262 15.5731 9.4875 15.2802 9.78039L13.0605 12.0001L15.2802 14.2197C15.5731 14.5126 15.5731 14.9875 15.2802 15.2804C14.9873 15.5733 14.5124 15.5733 14.2195 15.2804L11.9998 13.0607L9.78016 15.2804C9.48727 15.5733 9.01239 15.5733 8.7195 15.2804C8.42661 14.9875 8.42661 14.5126 8.7195 14.2197L10.9392 12.0001L8.7195 9.78039C8.42661 9.4875 8.42661 9.01262 8.7195 8.71973Z" fill="#23262A"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.0091 3.05126C12.9222 1.88827 11.0778 1.88827 9.99089 3.05126L9.20244 3.89486C8.95602 4.15852 8.60767 4.30281 8.24699 4.29063L7.09295 4.25162C5.502 4.19786 4.19787 5.50199 4.25164 7.09294L4.29064 8.24697C4.30283 8.60766 4.15854 8.95601 3.89488 9.20243L3.05128 9.99087C1.88828 11.0778 1.88828 12.9221 3.05128 14.0091L3.89488 14.7975C4.15854 15.044 4.30283 15.3923 4.29064 15.753L4.25164 16.907C4.19787 18.498 5.502 19.8021 7.09296 19.7483L8.24699 19.7093C8.60767 19.6972 8.95602 19.8414 9.20244 20.1051L9.99089 20.9487C11.0778 22.1117 12.9222 22.1117 14.0091 20.9487L14.7976 20.1051C15.044 19.8414 15.3923 19.6972 15.753 19.7093L16.9071 19.7483C18.498 19.8021 19.8021 18.498 19.7484 16.907L19.7094 15.753C19.6972 15.3923 19.8415 15.044 20.1051 14.7975L20.9487 14.0091C22.1117 12.9221 22.1117 11.0778 20.9487 9.99087L20.1051 9.20243C19.8415 8.95601 19.6972 8.60766 19.7094 8.24697L19.7484 7.09294C19.8021 5.50199 18.498 4.19786 16.9071 4.25162L15.753 4.29063C15.3923 4.30281 15.044 4.15852 14.7976 3.89486L14.0091 3.05126ZM11.0868 4.07549C11.5808 3.54686 12.4192 3.54686 12.9132 4.07549L13.7017 4.91909C14.2438 5.49914 15.0102 5.81659 15.8037 5.78977L16.9577 5.75077C17.6809 5.72633 18.2737 6.31912 18.2492 7.04228L18.2102 8.19631C18.1834 8.98981 18.5008 9.75618 19.0809 10.2983L19.9245 11.0868C20.4531 11.5808 20.4531 12.4192 19.9245 12.9132L19.0809 13.7017C18.5008 14.2438 18.1834 15.0102 18.2102 15.8037L18.2492 16.9577C18.2737 17.6809 17.6809 18.2736 16.9577 18.2492L15.8037 18.2102C15.0102 18.1834 14.2438 18.5008 13.7017 19.0809L12.9132 19.9245C12.4192 20.4531 11.5808 20.4531 11.0868 19.9245L10.2983 19.0809C9.7562 18.5008 8.98983 18.1834 8.19632 18.2102L7.04229 18.2492C6.31913 18.2736 5.72634 17.6809 5.75078 16.9577L5.78978 15.8037C5.8166 15.0102 5.49916 14.2438 4.91911 13.7017L4.07551 12.9132C3.54687 12.4192 3.54687 11.5808 4.07551 11.0868L4.91911 10.2983C5.49916 9.75618 5.8166 8.98981 5.78978 8.19631L5.75078 7.04228C5.72634 6.31912 6.31913 5.72633 7.04229 5.75077L8.19632 5.78977C8.98982 5.81659 9.75619 5.49915 10.2983 4.91909L11.0868 4.07549ZM8.7195 8.71973C9.0124 8.42684 9.48727 8.42684 9.78016 8.71973L11.9998 10.9394L14.2195 8.71973C14.5124 8.42684 14.9873 8.42684 15.2802 8.71973C15.5731 9.01262 15.5731 9.4875 15.2802 9.78039L13.0605 12.0001L15.2802 14.2197C15.5731 14.5126 15.5731 14.9875 15.2802 15.2804C14.9873 15.5733 14.5124 15.5733 14.2195 15.2804L11.9998 13.0607L9.78016 15.2804C9.48727 15.5733 9.0124 15.5733 8.7195 15.2804C8.42661 14.9875 8.42661 14.5126 8.7195 14.2197L10.9392 12.0001L8.7195 9.78039C8.42661 9.4875 8.42661 9.01262 8.7195 8.71973Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -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="M19.75 4.01992C19.75 3.53224 19.3003 3.16875 18.8235 3.27093L18.4572 3.34943C14.2007 4.26153 9.79929 4.26153 5.54282 3.34943L5.17649 3.27093C4.69967 3.16875 4.25 3.53223 4.25 4.01992V13.0001C4.25 17.2803 7.71979 20.7501 12 20.7501C16.2802 20.7501 19.75 17.2803 19.75 13.0001V4.01992ZM5.75 4.92339C9.87693 5.73687 14.1231 5.73687 18.25 4.92339V13.0001C18.25 16.4519 15.4518 19.2501 12 19.2501C8.54822 19.2501 5.75 16.4519 5.75 13.0001V4.92339ZM15.7803 10.2803C16.0732 9.98744 16.0732 9.51256 15.7803 9.21967C15.4874 8.92678 15.0126 8.92678 14.7197 9.21967L11 12.9393L9.28033 11.2197C8.98744 10.9268 8.51256 10.9268 8.21967 11.2197C7.92678 11.5126 7.92678 11.9874 8.21967 12.2803L10.4697 14.5303C10.7626 14.8232 11.2374 14.8232 11.5303 14.5303L15.7803 10.2803Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 929 B |
@@ -0,0 +1,14 @@
|
||||
name: ShieldCheckmark
|
||||
category: Law and security
|
||||
sub_category: Security
|
||||
keywords:
|
||||
- sikkerhet
|
||||
- security
|
||||
- beskyttelse
|
||||
- sikkert
|
||||
- kryptert
|
||||
- encrypted
|
||||
- secured
|
||||
variant: Stroke
|
||||
updated_at: 29.11.2024
|
||||
created_at: 18.11.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="M19.75 4.01971C19.75 3.53202 19.3003 3.16854 18.8235 3.27071L18.4572 3.34921C14.2007 4.26131 9.79929 4.26131 5.54282 3.34921L5.17649 3.27071C4.69967 3.16854 4.25 3.53202 4.25 4.01971V12.9999C4.25 17.2801 7.71979 20.7499 12 20.7499C16.2802 20.7499 19.75 17.2801 19.75 12.9999V4.01971ZM15.7803 10.2803C16.0732 9.98744 16.0732 9.51256 15.7803 9.21967C15.4874 8.92678 15.0126 8.92678 14.7197 9.21967L11 12.9393L9.28033 11.2197C8.98744 10.9268 8.51256 10.9268 8.21967 11.2197C7.92678 11.5126 7.92678 11.9874 8.21967 12.2803L10.4697 14.5303C10.7626 14.8232 11.2374 14.8232 11.5303 14.5303L15.7803 10.2803Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 770 B |
@@ -0,0 +1,14 @@
|
||||
name: ShieldCheckmarkFill
|
||||
category: Law and security
|
||||
sub_category: Security
|
||||
keywords:
|
||||
- sikkerhet
|
||||
- security
|
||||
- beskyttelse
|
||||
- sikkert
|
||||
- kryptert
|
||||
- encrypted
|
||||
- secured
|
||||
variant: Fill
|
||||
updated_at: 29.11.2024
|
||||
created_at: 18.11.2024
|
||||
@@ -9,6 +9,7 @@ keywords:
|
||||
- låst
|
||||
- kryptert
|
||||
- encrypted
|
||||
- locked
|
||||
variant: Stroke
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 29.11.2024
|
||||
created_at: 07.03.2023
|
||||
@@ -9,6 +9,7 @@ keywords:
|
||||
- låst
|
||||
- kryptert
|
||||
- encrypted
|
||||
- locked
|
||||
variant: Fill
|
||||
updated_at: 04.12.2023
|
||||
updated_at: 29.11.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="M2.25 5.5C2.25 4.80964 2.80964 4.25 3.5 4.25H14.5C15.1904 4.25 15.75 4.80964 15.75 5.5V7.25H18.6615C19.1726 7.25 19.6322 7.56119 19.8221 8.03576L21.75 12.8556V16.5C21.75 17.1904 21.1904 17.75 20.5 17.75H19.75C19.75 19.1307 18.6307 20.25 17.25 20.25C15.8693 20.25 14.75 19.1307 14.75 17.75H9.75C9.75 19.1307 8.63071 20.25 7.25 20.25C5.86929 20.25 4.75 19.1307 4.75 17.75H3.5C2.80964 17.75 2.25 17.1904 2.25 16.5V5.5ZM9.25018 16.25C8.79408 15.6428 8.06791 15.25 7.25 15.25C6.43209 15.25 5.70592 15.6428 5.24982 16.25H3.75V5.75H14.25V16.25H9.25018ZM15.75 15.7498C16.1678 15.436 16.6872 15.25 17.25 15.25C18.0679 15.25 18.7941 15.6428 19.2502 16.25H20.25V13.1444L18.4922 8.75H15.75V15.7498ZM16.25 17.75C16.25 17.1977 16.6977 16.75 17.25 16.75C17.8023 16.75 18.25 17.1977 18.25 17.75C18.25 18.3023 17.8023 18.75 17.25 18.75C16.6977 18.75 16.25 18.3023 16.25 17.75ZM7.25 16.75C6.69772 16.75 6.25 17.1977 6.25 17.75C6.25 18.3023 6.69772 18.75 7.25 18.75C7.80228 18.75 8.25 18.3023 8.25 17.75C8.25 17.1977 7.80228 16.75 7.25 16.75ZM5.96968 12.9697C5.67678 13.2626 5.67678 13.7374 5.96968 14.0303C6.26257 14.3232 6.73744 14.3232 7.03034 14.0303L12.0303 9.03033C12.3232 8.73744 12.3232 8.26256 12.0303 7.96967C11.7374 7.67678 11.2626 7.67678 10.9697 7.96967L5.96968 12.9697ZM7 7.875C6.37868 7.875 5.875 8.37868 5.875 9C5.875 9.62132 6.37868 10.125 7 10.125C7.62132 10.125 8.125 9.62132 8.125 9C8.125 8.37868 7.62132 7.875 7 7.875ZM9.875 13C9.875 12.3787 10.3787 11.875 11 11.875C11.6213 11.875 12.125 12.3787 12.125 13C12.125 13.6213 11.6213 14.125 11 14.125C10.3787 14.125 9.875 13.6213 9.875 13Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,16 @@
|
||||
name: TruckPercent
|
||||
category: Transportation
|
||||
sub_category: Vehicles
|
||||
keywords:
|
||||
- pant
|
||||
- lån
|
||||
- gjeld
|
||||
- lastebil
|
||||
- prosent
|
||||
- mortgage
|
||||
- loan
|
||||
- debt
|
||||
- percentage
|
||||
variant: Stroke
|
||||
updated_at: 27.11.2024
|
||||
created_at: 27.11.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="M2.25 5.5C2.25 4.80964 2.74746 4.25 3.36111 4.25H13.1389C13.7525 4.25 14.25 4.80964 14.25 5.5V15.8767C14.25 15.9222 14.2374 15.9667 14.2147 16.0061C13.9582 16.4516 13.7969 16.9589 13.7588 17.5002C13.7491 17.6379 13.6381 17.75 13.5 17.75H11C10.8619 17.75 10.7509 17.6377 10.7412 17.5C10.613 15.6837 9.09893 14.25 7.25 14.25C5.40107 14.25 3.887 15.6837 3.75879 17.5C3.74907 17.6377 3.63807 17.75 3.5 17.75H3.36111C2.74746 17.75 2.25 17.1904 2.25 16.5V5.5ZM21.0372 17.629C21.4587 17.4281 21.75 16.998 21.75 16.5V12.9037C21.75 12.8719 21.7439 12.8404 21.7321 12.8109L19.8221 8.03576C19.6322 7.56119 19.1726 7.25 18.6615 7.25H16C15.8619 7.25 15.75 7.36193 15.75 7.5V8.75V14.1913C15.75 14.3749 15.9424 14.4972 16.1161 14.4377C16.4717 14.316 16.8532 14.25 17.25 14.25C19.0723 14.25 20.5693 15.6426 20.7348 17.4216C20.7494 17.5783 20.8952 17.6967 21.0372 17.629ZM17.25 15.25C15.8693 15.25 14.75 16.3693 14.75 17.75C14.75 19.1307 15.8693 20.25 17.25 20.25C18.6307 20.25 19.75 19.1307 19.75 17.75C19.75 16.3693 18.6307 15.25 17.25 15.25ZM4.75 17.75C4.75 16.3693 5.86929 15.25 7.25 15.25C8.63071 15.25 9.75 16.3693 9.75 17.75C9.75 19.1307 8.63071 20.25 7.25 20.25C5.86929 20.25 4.75 19.1307 4.75 17.75ZM5.21968 11.9697C4.92678 12.2626 4.92678 12.7374 5.21968 13.0303C5.51257 13.3232 5.98744 13.3232 6.28034 13.0303L11.2803 8.03033C11.5732 7.73744 11.5732 7.26256 11.2803 6.96967C10.9874 6.67678 10.5126 6.67678 10.2197 6.96967L5.21968 11.9697ZM6.25 6.875C5.62868 6.875 5.125 7.37868 5.125 8C5.125 8.62132 5.62868 9.125 6.25 9.125C6.87132 9.125 7.375 8.62132 7.375 8C7.375 7.37868 6.87132 6.875 6.25 6.875ZM9.125 12C9.125 11.3787 9.62868 10.875 10.25 10.875C10.8713 10.875 11.375 11.3787 11.375 12C11.375 12.6213 10.8713 13.125 10.25 13.125C9.62868 13.125 9.125 12.6213 9.125 12Z" fill="#23262A"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,16 @@
|
||||
name: TruckPercentFill
|
||||
category: Transportation
|
||||
sub_category: Vehicles
|
||||
keywords:
|
||||
- pant
|
||||
- lån
|
||||
- gjeld
|
||||
- lastebil
|
||||
- prosent
|
||||
- mortgage
|
||||
- loan
|
||||
- debt
|
||||
- percentage
|
||||
variant: Fill
|
||||
updated_at: 27.11.2024
|
||||
created_at: 27.11.2024
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@navikt/aksel-icons",
|
||||
"version": "7.4.2",
|
||||
"author": "Aksel | NAV",
|
||||
"version": "7.9.2",
|
||||
"author": "Aksel | Nav",
|
||||
"homepage": "https://aksel.nav.no/ikoner",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"keywords": [
|
||||
"Icons",
|
||||
"NAV",
|
||||
"Nav",
|
||||
"Aksel",
|
||||
"designsystem",
|
||||
"react",
|
||||
@@ -84,9 +84,9 @@
|
||||
"react": "^18.0.0",
|
||||
"rehype-parse": "8.0.4",
|
||||
"tsc-alias": "1.8.8",
|
||||
"tsx": "^4.7.1",
|
||||
"tsx": "^4.19.1",
|
||||
"typescript": "5.5.4",
|
||||
"unified": "10.1.2",
|
||||
"vitest": "^1.2.2"
|
||||
"vitest": "^2.1.8"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,33 @@
|
||||
# @navikt/aksel-stylelint
|
||||
|
||||
## 7.9.2
|
||||
|
||||
## 7.9.1
|
||||
|
||||
## 7.9.0
|
||||
|
||||
## 7.8.1
|
||||
|
||||
## 7.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Combobox: Removed clear button, removed tokens staring with `--ac-combobox-clear`, deprecated props `clearButton`/`clearButtonLabel`. ([#3433](https://github.com/navikt/aksel/pull/3433))
|
||||
|
||||
## 7.7.0
|
||||
|
||||
## 7.6.0
|
||||
|
||||
## 7.5.3
|
||||
|
||||
## 7.5.2
|
||||
|
||||
## 7.5.1
|
||||
|
||||
## 7.5.0
|
||||
|
||||
## 7.4.3
|
||||
|
||||
## 7.4.2
|
||||
|
||||
## 7.4.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@navikt/aksel-stylelint",
|
||||
"version": "7.4.2",
|
||||
"author": "Aksel | NAV",
|
||||
"version": "7.9.2",
|
||||
"author": "Aksel | Nav",
|
||||
"homepage": "https://aksel.nav.no/grunnleggende/kode/stylelint",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -35,14 +35,14 @@
|
||||
"dev": "yarn watch:lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-css": "^7.4.2",
|
||||
"@navikt/ds-tokens": "^7.4.2",
|
||||
"@navikt/ds-css": "^7.9.2",
|
||||
"@navikt/ds-tokens": "^7.9.2",
|
||||
"concurrently": "9.0.1",
|
||||
"postcss-selector-parser": "^6.0.13",
|
||||
"postcss-value-parser": "^4.2.0",
|
||||
"stylelint": "^14.8.5",
|
||||
"stylelint": "^16.10.0",
|
||||
"stylelint-test-rule-node": "^0.2.1",
|
||||
"tsx": "^4.7.1",
|
||||
"tsx": "^4.19.1",
|
||||
"typescript": "5.5.4"
|
||||
}
|
||||
}
|
||||
@@ -72,4 +72,8 @@ export const deprecations: DeprecatedList = [
|
||||
classes: ["navds-list--nested", "navds-list__item-content"],
|
||||
message: "Removed in v7.1.1",
|
||||
},
|
||||
{
|
||||
classes: ["navds-combobox__button-clear"],
|
||||
message: "Removed in v7.8.0",
|
||||
},
|
||||
];
|
||||
@@ -1,5 +1,91 @@
|
||||
# @navikt/aksel
|
||||
|
||||
## 7.9.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`54495a4`](https://github.com/navikt/aksel/commit/54495a446065c73a06865885e65b3b07dedaa5ea)]:
|
||||
- @navikt/ds-css@7.9.2
|
||||
|
||||
## 7.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`25305eb`](https://github.com/navikt/aksel/commit/25305ebba04a37e6315bc37bfabb39f04f83f146)]:
|
||||
- @navikt/ds-css@7.9.1
|
||||
|
||||
## 7.9.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`db828bd`](https://github.com/navikt/aksel/commit/db828bddd393ba1d03d8e68fe80c9211da43e54a), [`0017789`](https://github.com/navikt/aksel/commit/00177898f55573a682a43819b08304c1f60a732a), [`c90abe7`](https://github.com/navikt/aksel/commit/c90abe7c23e2520e5131d138f3193a4de0e28b9d), [`0017789`](https://github.com/navikt/aksel/commit/00177898f55573a682a43819b08304c1f60a732a)]:
|
||||
- @navikt/ds-css@7.9.0
|
||||
|
||||
## 7.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`06193ae`](https://github.com/navikt/aksel/commit/06193ae3001cee4b1f411a75d51ab54391483dd7), [`a82126b`](https://github.com/navikt/aksel/commit/a82126b893490b9786d31cb74ba31695b90f8c60)]:
|
||||
- @navikt/ds-css@7.8.1
|
||||
|
||||
## 7.8.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`f720562`](https://github.com/navikt/aksel/commit/f720562908ccb0c7c62cabd386920d0c1fdcdaf9), [`5dedfa1`](https://github.com/navikt/aksel/commit/5dedfa104a187d23e3028ffa2b4a85e44e206b31)]:
|
||||
- @navikt/ds-css@7.8.0
|
||||
|
||||
## 7.7.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@7.7.0
|
||||
|
||||
## 7.6.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`dce149f`](https://github.com/navikt/aksel/commit/dce149fca40147440148371db846fb452ab7b5f2), [`34538a1`](https://github.com/navikt/aksel/commit/34538a1cbe30e0c951477cb4a379d648c93733fd), [`641276b`](https://github.com/navikt/aksel/commit/641276bb44919302d19bbc76d30452a5c15536af), [`9f088a9`](https://github.com/navikt/aksel/commit/9f088a93733a038bd0c4f4cd70f7fd3894ee9997), [`6d74cb7`](https://github.com/navikt/aksel/commit/6d74cb72ad522a73a926bbfbd2eaf526388c4826), [`fa2904d`](https://github.com/navikt/aksel/commit/fa2904d54b282da06fc04cfc99be5dd0b3e8d352)]:
|
||||
- @navikt/ds-css@7.6.0
|
||||
|
||||
## 7.5.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@7.5.3
|
||||
|
||||
## 7.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`9c93342`](https://github.com/navikt/aksel/commit/9c9334289246103856c149f5ddcf93dc42087342)]:
|
||||
- @navikt/ds-css@7.5.2
|
||||
|
||||
## 7.5.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Chore: Manually bump version to sync npm and github-releases ([`aa7c2d9`](https://github.com/navikt/aksel/commit/aa7c2d9598434d6304432daa20e0a1eeedd03b1b))
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@7.5.1
|
||||
|
||||
## 7.5.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-css@7.5.0
|
||||
|
||||
## 7.4.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [[`6d9f900`](https://github.com/navikt/aksel/commit/6d9f9001fed4ccfa4245ab97399b24012ceb9edf)]:
|
||||
- @navikt/ds-css@7.4.3
|
||||
|
||||
## 7.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@navikt/aksel",
|
||||
"version": "7.4.2",
|
||||
"version": "7.9.2",
|
||||
"description": "Aksel command line interface. Handles css-imports, codemods and more",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"author": "Aksel | Nav designsystem team",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"Commandline",
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
|
||||
"dependencies": {
|
||||
"@navikt/ds-css": "7.4.2",
|
||||
"@navikt/ds-css": "^7.9.2",
|
||||
"axios": "1.7.4",
|
||||
"chalk": "4.1.0",
|
||||
"clipboardy": "^2.3.0",
|
||||
@@ -40,13 +40,13 @@
|
||||
"is-git-clean": "1.1.0",
|
||||
"jscodeshift": "^0.15.1",
|
||||
"jscodeshift-add-imports": "1.0.11",
|
||||
"lodash": "4.17.21",
|
||||
"lodash": "^4.17.21",
|
||||
"react-scanner": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": "6.0.1",
|
||||
"typescript": "5.5.4",
|
||||
"vitest": "^1.2.2"
|
||||
"vitest": "^2.1.8"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"engines": {
|
||||
|
||||
@@ -1,5 +1,88 @@
|
||||
# @navikt/ds-css
|
||||
|
||||
## 7.9.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Table: Removed border-bottom for HeaderCell used in ExpandableRow. ([#3503](https://github.com/navikt/aksel/pull/3503))
|
||||
|
||||
## 7.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Link: :bug: Use inside Alert got wrong text-color while focused or active. ([#3489](https://github.com/navikt/aksel/pull/3489))
|
||||
|
||||
## 7.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ErrorSummary: :sparkles: new prop to prefix error with a warning icon. ([#3445](https://github.com/navikt/aksel/pull/3445))
|
||||
All form components: replace dot with warning icon in error message.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Switch: Update switch to better reflect unchecked state. ([#3468](https://github.com/navikt/aksel/pull/3468))
|
||||
|
||||
- Select: :bug: Focus-border no longer cancels out error-border. ([#3465](https://github.com/navikt/aksel/pull/3465))
|
||||
|
||||
- Textarea: :bug: Focus-border no longer cancels out error-border. ([#3465](https://github.com/navikt/aksel/pull/3465))
|
||||
|
||||
## 7.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Alert: Link-components used within Alert variant='inline' now preserves default coloring ([#3461](https://github.com/navikt/aksel/pull/3461))
|
||||
|
||||
- Table: :fire: Removed cursor 'pointer' when 'ExpandableRow' is disabled. ([#3462](https://github.com/navikt/aksel/pull/3462))
|
||||
|
||||
## 7.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- Combobox: Removed clear button, removed tokens staring with `--ac-combobox-clear`, deprecated props `clearButton`/`clearButtonLabel`. ([#3433](https://github.com/navikt/aksel/pull/3433))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- CSS: Resolved regression where the complete stylesheet was included in scoped 'components.css' file. ([#3427](https://github.com/navikt/aksel/pull/3427))
|
||||
|
||||
## 7.7.0
|
||||
|
||||
## 7.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ReadMore: Added size 'large'. ([#3372](https://github.com/navikt/aksel/pull/3372))
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Select: Now shows focus-outline when ':focus' is set trough pointer or label in all browsers. Chrome and Firefox handles `:focus-visible` differently for 'select', previously causing outline-border not to show in Firefox. ([#3415](https://github.com/navikt/aksel/pull/3415))
|
||||
|
||||
- Modal: Don't add scroll shadow when polyfilled ([#3408](https://github.com/navikt/aksel/pull/3408))
|
||||
|
||||
- Modal: Now shows up while screensharing with Vergic ([#3407](https://github.com/navikt/aksel/pull/3407))
|
||||
|
||||
- FileUpload: Remove browser styling from FileUpload.Item when used in list. ([#3413](https://github.com/navikt/aksel/pull/3413))
|
||||
|
||||
- Combobox: Single-select now shows cursor closer to selected item. ([#3384](https://github.com/navikt/aksel/pull/3384))
|
||||
|
||||
## 7.5.3
|
||||
|
||||
## 7.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Combobox: Fix issue where using arrow keys in list would make the entire page scroll ([#3364](https://github.com/navikt/aksel/pull/3364))
|
||||
|
||||
## 7.5.1
|
||||
|
||||
## 7.5.0
|
||||
|
||||
## 7.4.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Table.ColumnHeader: Inherit text alignment in button ([#3319](https://github.com/navikt/aksel/pull/3319))
|
||||
|
||||
## 7.4.2
|
||||
|
||||
## 7.4.1
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Aksel styling
|
||||
|
||||
CSS for NAVs designsystem.
|
||||
CSS for Nav's design system.
|
||||
|
||||
- Css tokens (Colors, border, shadows etc)
|
||||
- Component-styling for `@navikt/ds-react` packages
|
||||
- Css tokens (Colors, border, shadows etc.)
|
||||
- Component styling for `@navikt/ds-react` packages
|
||||
- Normalize.css v8
|
||||
- Font-loading
|
||||
- Font loading
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -16,7 +16,7 @@ CSS for NAVs designsystem.
|
||||
|
||||
## Usage
|
||||
|
||||
Import styles once to make it accessible for your entire project. Typically you will add the following line to your root .tsx file.
|
||||
Import styles once to make it accessible for your entire project. Typically you will add the following line to your root .tsx file:
|
||||
|
||||
```javascript
|
||||
import "@navikt/ds-css";
|
||||
@@ -26,7 +26,7 @@ function App() {
|
||||
}
|
||||
```
|
||||
|
||||
But you can import it in a .css-file
|
||||
But you can import it in a .css-file as well:
|
||||
|
||||
```css
|
||||
@import "@navikt/ds-css";
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
margin-right: var(--ac-button-icon-margin);
|
||||
}
|
||||
|
||||
.navds-button__icon:only-child {
|
||||
.navds-button--icon-only .navds-button__icon {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -497,6 +497,10 @@
|
||||
}
|
||||
|
||||
/* Loader overrides */
|
||||
.navds-button .navds-loader {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.navds-button .navds-loader .navds-loader__foreground {
|
||||
stroke: var(--ac-button-loader-stroke, currentColor);
|
||||
}
|
||||
@@ -506,6 +510,10 @@
|
||||
stroke: var(--ac-button-primary-loader-stroke-bg, rgb(255 255 255 / 0.3));
|
||||
}
|
||||
|
||||
.navds-button--loading > :not(.navds-loader) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-button:not(.navds-button--loading):where(:disabled, .navds-button--disabled) {
|
||||
opacity: 1;
|
||||
|
||||
@@ -0,0 +1,270 @@
|
||||
import browserslist from "browserslist";
|
||||
import CleanCss from "clean-css";
|
||||
import fastglob from "fast-glob";
|
||||
import fs from "fs";
|
||||
import { Features, browserslistToTargets, bundleAsync } from "lightningcss";
|
||||
import path from "path";
|
||||
import {
|
||||
StyleMappings,
|
||||
componentsCss,
|
||||
formCss,
|
||||
primitivesCss,
|
||||
} from "../config/_mappings";
|
||||
import packageJSON from "../package.json";
|
||||
|
||||
bundleDarkside();
|
||||
|
||||
async function bundleDarkside() {
|
||||
const buildDir = path.join(__dirname, "..", "dist/darkside");
|
||||
const darksideDir = path.join(__dirname, "..", "darkside");
|
||||
|
||||
/* Make sure every dir is created to make node happy */
|
||||
[buildDir, `${buildDir}/global`, `${buildDir}/component`].forEach((dir) => {
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir, { recursive: true });
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Bundles the ./index.css file with LightningCSS.
|
||||
* @param rootParser: Custom parsers that allows for editing the index.css file before bundling it. This allows removing unwanted CSS from being bundled.
|
||||
* @returns Parsed CSS file output. Must be valid CSS.
|
||||
*/
|
||||
async function bundleCSS(rootParser?: (rootFile: string) => string) {
|
||||
const { code } = await bundleAsync({
|
||||
filename: `${darksideDir}/index.css`,
|
||||
minify: false,
|
||||
include:
|
||||
Features.Nesting | Features.MediaRangeSyntax | Features.HexAlphaColors,
|
||||
|
||||
drafts: {
|
||||
customMedia: false,
|
||||
},
|
||||
targets: browserslistToTargets(
|
||||
browserslist(">= 0.5% in NO, safari >= 15.4, iOS >= 15.4, not dead"),
|
||||
),
|
||||
resolver: {
|
||||
read(filePath) {
|
||||
const file = fs.readFileSync(filePath, "utf8");
|
||||
if (filePath === `${darksideDir}/index.css` && rootParser) {
|
||||
return rootParser(file);
|
||||
}
|
||||
|
||||
return file;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
let codeString = code.toString();
|
||||
|
||||
/**
|
||||
* LightningCSS adds these tokens to the bundle that we want removed:
|
||||
* --lightningcss-light: initial;
|
||||
* --lightningcss-dark: ;
|
||||
*/
|
||||
codeString = codeString
|
||||
.split("\n")
|
||||
.filter((line) => !line.includes("--lightningcss-"))
|
||||
.join("\n");
|
||||
|
||||
return codeString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the CSS file to the build directory. Includes a minified version with the .min.css suffix.
|
||||
* @param file: CSS file content
|
||||
* @param filePath: Path to the file in the build directory
|
||||
*/
|
||||
function writeFile({ file, filePath }: { file: string; filePath: string }) {
|
||||
fs.writeFileSync(`${buildDir}/${filePath}`, file);
|
||||
|
||||
/**
|
||||
* We use CleanCss package here since we only want it to optimize filesize, not transform any CSS like LightningCSS minifier does.
|
||||
* This is because we want to keep the CSS as close to the original as possible.
|
||||
* Since CleanCSS is not part of the PostCSS ecosystem, we use it in replacement for cssnano.
|
||||
*/
|
||||
const minifiedCss = new CleanCss({}).minify(file);
|
||||
|
||||
if (minifiedCss.errors.length > 0) {
|
||||
throw new Error(
|
||||
`Errors found when minifying for ${filePath} CSS. Stopped bundling\n${minifiedCss.errors}`,
|
||||
);
|
||||
}
|
||||
|
||||
fs.writeFileSync(
|
||||
`${buildDir}/${filePath.replace(".css", ".min.css")}`,
|
||||
minifiedCss.styles,
|
||||
);
|
||||
}
|
||||
|
||||
/* ----------------------------- index.css build ---------------------------- */
|
||||
await bundleCSS().then((file) => {
|
||||
writeFile({
|
||||
file,
|
||||
filePath: "index.css",
|
||||
});
|
||||
});
|
||||
|
||||
/* --------------------------- component.css build -------------------------- */
|
||||
function rootComponentsParser(rootString: string) {
|
||||
let parsed = rootString
|
||||
.split("\n")
|
||||
.filter((line) => {
|
||||
/* We assume that all components is added under the layer components or layout */
|
||||
return (
|
||||
line.endsWith("layer(aksel.components);") ||
|
||||
line.endsWith("layer(aksel.layout);")
|
||||
);
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
/* If one imports this file standalone, we would like to make sure the layering order is included. */
|
||||
const layerDefinition = rootString
|
||||
.split("\n")
|
||||
.find((line) => line.startsWith("@layer"));
|
||||
|
||||
if (!layerDefinition) {
|
||||
throw new Error(
|
||||
"No layer definition found in index.css. Stopped bundling",
|
||||
);
|
||||
}
|
||||
|
||||
parsed = layerDefinition + "\n" + parsed;
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
await bundleCSS(rootComponentsParser).then((file) => {
|
||||
writeFile({
|
||||
file,
|
||||
filePath: componentsCss,
|
||||
});
|
||||
});
|
||||
|
||||
/* ------------------------------ /global build ----------------------------- */
|
||||
for (const style of StyleMappings.baseline) {
|
||||
// eslint-disable-next-line no-inner-declarations
|
||||
function parser(input: string) {
|
||||
return input
|
||||
.split("\n")
|
||||
.filter((line) => line.startsWith("@import"))
|
||||
.filter((line) =>
|
||||
line.replace(".darkside.css", ".css").includes(style.main),
|
||||
)
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
await bundleCSS(parser).then((file) => {
|
||||
writeFile({
|
||||
file,
|
||||
filePath: `global/${style.main}`,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* ------------------------------ form build ----------------------------- */
|
||||
function rootFormParser(input: string) {
|
||||
return input
|
||||
.split("\n")
|
||||
.filter((line) => line.startsWith("@import"))
|
||||
.filter((line) => line.includes("form/index.css"))
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
await bundleCSS(rootFormParser).then((file) => {
|
||||
writeFile({
|
||||
file,
|
||||
filePath: `component/${formCss}`,
|
||||
});
|
||||
});
|
||||
|
||||
/* ------------------------------ Primitives build ----------------------------- */
|
||||
function rootPrimitivesParser(input: string) {
|
||||
return input
|
||||
.split("\n")
|
||||
.filter((line) => line.startsWith("@import"))
|
||||
.filter((line) => line.includes("primitives/index.css"))
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
await bundleCSS(rootPrimitivesParser).then((file) => {
|
||||
writeFile({
|
||||
file,
|
||||
filePath: `component/${primitivesCss}`,
|
||||
});
|
||||
});
|
||||
|
||||
/* ---------------------------- /component build ---------------------------- */
|
||||
|
||||
function componentFiles(): string[] {
|
||||
const indexFile = fs.readFileSync(`${darksideDir}/index.css`, "utf8");
|
||||
|
||||
/* Since forms and primitives is under the same layers, but diffferent files we filter them out to avoid duplicates */
|
||||
const formLine = rootFormParser(indexFile);
|
||||
const primitivesLine = rootPrimitivesParser(indexFile);
|
||||
|
||||
return indexFile
|
||||
.split("\n")
|
||||
.filter((line) => line.startsWith("@import"))
|
||||
.filter((line) => !formLine.includes(line))
|
||||
.filter((line) => !primitivesLine.includes(line))
|
||||
.filter((line) => line.endsWith("layer(aksel.components);"));
|
||||
}
|
||||
|
||||
for (const componentLine of componentFiles()) {
|
||||
// eslint-disable-next-line no-inner-declarations
|
||||
function parser(input: string) {
|
||||
return input
|
||||
.split("\n")
|
||||
.filter((line) => line === componentLine)
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
await bundleCSS(parser).then((file) => {
|
||||
const componentName = componentLine
|
||||
/* Matches everything between " */
|
||||
.match(/".*"/gm)?.[0]
|
||||
/* Replaces every " with nothing */
|
||||
.replace(/"/gm, "")
|
||||
/* Removes start of import-string */
|
||||
.replace("./", "")
|
||||
.replace(".darkside.css", ".css");
|
||||
|
||||
if (!componentName) {
|
||||
throw new Error(
|
||||
`Could not find component name for line: ${componentLine}`,
|
||||
);
|
||||
}
|
||||
|
||||
const sanitizedName = componentName
|
||||
/*
|
||||
* https://regex101.com/r/MAj58n/1
|
||||
* Removes every - and space
|
||||
*/
|
||||
.replace(/[\s-]/g, "")
|
||||
.replace(".css", "")
|
||||
.toLowerCase();
|
||||
|
||||
writeFile({
|
||||
file,
|
||||
filePath: `component/${sanitizedName}.css`,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const version = packageJSON.version;
|
||||
|
||||
const files = fastglob.sync("**/*.css", {
|
||||
cwd: buildDir,
|
||||
ignore: ["**/version/**"],
|
||||
});
|
||||
|
||||
for (const file of files) {
|
||||
const css = fs.readFileSync(`${buildDir}/${file}`, "utf-8");
|
||||
|
||||
const filename = `${buildDir}/version/${version}/${file}`;
|
||||
fs.mkdirSync(path.dirname(filename), { recursive: true });
|
||||
|
||||
fs.writeFileSync(filename, css);
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,13 @@ async function bundleComponents() {
|
||||
const css = fs.readFileSync(indexSrc);
|
||||
|
||||
/* Remove @charset, baseline */
|
||||
const cssString = css.toString().split("\n").slice(2).join("\n");
|
||||
const cssString = css
|
||||
.toString()
|
||||
.split("\n")
|
||||
.filter((line) => {
|
||||
return line.startsWith("@import") && !line.includes("baseline");
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
const result = await postcss([cssImports, combineSelectors]).process(
|
||||
cssString,
|
||||
@@ -102,6 +108,7 @@ function buildFragmentFiles() {
|
||||
const files = fastglob
|
||||
.sync("*.css", { cwd: ".", ignore: "**/*.min.css" })
|
||||
.map((fileN) => path.basename(fileN))
|
||||
.filter((fileName) => !fileName.includes("index.css"))
|
||||
.map((x) => ({
|
||||
input: path.resolve(__dirname, `../${x}`),
|
||||
output: path.resolve(
|
||||
@@ -154,7 +161,7 @@ async function bundleMinified() {
|
||||
function copyToVersionFolder() {
|
||||
const files = fastglob.sync("**/*.css", {
|
||||
cwd: `./${rootDir}`,
|
||||
ignore: "**/version/**",
|
||||
ignore: ["**/version/**", "**/darkside/**"],
|
||||
});
|
||||
|
||||
for (let file of files) {
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import fastglob from "fast-glob";
|
||||
import path from "path";
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
/**
|
||||
* Darkside config might have some new files added. We can skip these when checking for equality.
|
||||
*/
|
||||
const newFiles = ["theme"];
|
||||
|
||||
describe("Check that old and new (darkside) bundle matches", () => {
|
||||
test("Darkside includes the same files as old bundle", () => {
|
||||
const oldBundleDir = path.join(__dirname, "../../dist");
|
||||
const darksideDir = path.join(__dirname, "../../dist/darkside");
|
||||
|
||||
const oldFiles = fastglob.sync("**/*.css", {
|
||||
cwd: oldBundleDir,
|
||||
ignore: ["**/version/**", "**/darkside/**"],
|
||||
});
|
||||
|
||||
const darksideFiles = fastglob.sync("**/*.css", {
|
||||
cwd: darksideDir,
|
||||
ignore: ["**/version/**"],
|
||||
});
|
||||
|
||||
expect(oldFiles.length).toBeGreaterThan(0);
|
||||
expect(darksideFiles.length).toBeGreaterThan(0);
|
||||
|
||||
// Compare file names
|
||||
oldFiles.forEach((file) => {
|
||||
expect(darksideFiles).toContain(file);
|
||||
});
|
||||
|
||||
darksideFiles.forEach((file) => {
|
||||
if (newFiles.find((newFile) => file.includes(newFile))) {
|
||||
return;
|
||||
}
|
||||
expect(oldFiles).toContain(file);
|
||||
});
|
||||
|
||||
/**
|
||||
* Check that darkside has the same amount of files as old bundle
|
||||
* (minus the new files * 2 since .min.css is also included)
|
||||
*/
|
||||
expect(darksideFiles.length - newFiles.length * 2).toBe(oldFiles.length);
|
||||
});
|
||||
});
|
||||
@@ -1,198 +1,181 @@
|
||||
.navds-accordion {
|
||||
--__ac-accordion-header-shadow-color: var(--ac-accordion-header-border, var(--a-border-divider));
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Header *
|
||||
*************************/
|
||||
/* ---------------------------- Accordion header ---------------------------- */
|
||||
.navds-accordion__header {
|
||||
--__ac-accordion-header-shadow: inset 2px 0 0 0 var(--a-transparent), inset -2px 0 0 0 var(--a-transparent),
|
||||
inset 0 2px 0 0 var(--__ac-accordion-header-shadow-color);
|
||||
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
gap: var(--a-spacing-2);
|
||||
padding: var(--a-spacing-3);
|
||||
margin: 0;
|
||||
gap: var(--ax-space-12);
|
||||
padding: var(--ax-space-12);
|
||||
text-align: left;
|
||||
background: var(--ac-accordion-header-bg, var(--a-surface-transparent));
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
position: relative;
|
||||
box-shadow: var(--__ac-accordion-header-shadow);
|
||||
z-index: 1;
|
||||
}
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
background: transparent;
|
||||
color: var(--ax-text-accent);
|
||||
|
||||
.navds-accordion__header:hover {
|
||||
background-color: var(--ac-accordion-header-bg-hover, var(--a-surface-hover));
|
||||
text-decoration: underline;
|
||||
color: var(--ac-accordion-header-text-hover, inherit);
|
||||
}
|
||||
|
||||
.navds-accordion--small .navds-accordion__header {
|
||||
padding: var(--a-spacing-2) var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-accordion--medium .navds-accordion__header {
|
||||
padding: var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-accordion--large .navds-accordion__header {
|
||||
padding: var(--a-spacing-4) var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-accordion__item:last-child > :where(.navds-accordion__header) {
|
||||
box-shadow:
|
||||
var(--__ac-accordion-header-shadow),
|
||||
inset 0 -2px 0 0 var(--__ac-accordion-header-shadow-color);
|
||||
}
|
||||
|
||||
.navds-accordion__item:last-child:where(.navds-accordion__item--open) :where(.navds-accordion__header) {
|
||||
box-shadow:
|
||||
inset 2px 0 0 0 var(--a-transparent),
|
||||
inset -2px 0 0 0 var(--a-transparent),
|
||||
inset 0 2px 0 0 var(--a-transparent),
|
||||
inset 0 2px 0 0 var(--__ac-accordion-header-shadow-color);
|
||||
}
|
||||
|
||||
.navds-accordion__item:last-child:where(.navds-accordion__item--open) {
|
||||
box-shadow:
|
||||
inset 2px 0 0 0 var(--a-transparent),
|
||||
inset -2px 0 0 0 var(--a-transparent),
|
||||
inset 0 2px 0 0 var(--a-transparent),
|
||||
inset 0 -2px 0 0 var(--__ac-accordion-header-shadow-color);
|
||||
}
|
||||
|
||||
.navds-accordion__item--open > :where(.navds-accordion__header) {
|
||||
box-shadow: var(--__ac-accordion-header-shadow);
|
||||
}
|
||||
|
||||
.navds-accordion__header:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 3px;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-accordion__header:focus {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-accordion__header-content {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Icon *
|
||||
*************************/
|
||||
.navds-accordion__icon-wrapper {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
height: var(--a-spacing-6);
|
||||
width: var(--a-spacing-6);
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.navds-accordion__header:hover > .navds-accordion__icon-wrapper {
|
||||
background-color: var(--ac-accordion-header-icon-bg-hover, var(--a-surface-neutral-subtle-hover));
|
||||
}
|
||||
|
||||
.navds-accordion__header-chevron {
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
font-size: 1.5rem;
|
||||
height: 1.75rem;
|
||||
flex-shrink: 0;
|
||||
transition: transform 150ms ease-in-out;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
:where(.navds-accordion__header):hover > :where(.navds-accordion__icon-wrapper) > :where(.navds-accordion__header-chevron) {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.navds-accordion__item--open
|
||||
> :where(.navds-accordion__header)
|
||||
> :where(.navds-accordion__icon-wrapper)
|
||||
> :where(.navds-accordion__header-chevron) {
|
||||
transform: translateY(0) rotate(-180deg);
|
||||
}
|
||||
|
||||
.navds-accordion__item--open
|
||||
> :where(.navds-accordion__header):hover
|
||||
> :where(.navds-accordion__icon-wrapper)
|
||||
> :where(.navds-accordion__header-chevron) {
|
||||
transform: translateY(-1px) rotate(-180deg);
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Variant/Default *
|
||||
*************************/
|
||||
.navds-accordion__item--open {
|
||||
background-color: var(--ac-accordion-item-bg-open, var(--a-transparent));
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Variant/Neutral *
|
||||
*************************/
|
||||
.navds-accordion__item--open.navds-accordion__item--neutral {
|
||||
background-color: var(--ac-accordion-neutral-item-bg-open, var(--a-surface-neutral-subtle));
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Content *
|
||||
*************************/
|
||||
|
||||
.navds-accordion__content {
|
||||
padding: var(--a-spacing-1) var(--a-spacing-3) var(--a-spacing-5);
|
||||
animation: fadeAccordionContent 250ms ease;
|
||||
}
|
||||
|
||||
.navds-accordion--indent > :where(.navds-accordion__item) > :where(.navds-accordion__content) {
|
||||
padding: var(--a-spacing-1) var(--a-spacing-3) var(--a-spacing-5) var(--a-spacing-11);
|
||||
}
|
||||
|
||||
.navds-accordion__content--closed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-accordion__item--no-animation :where(.navds-accordion__content) {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
@keyframes fadeAccordionContent {
|
||||
0% {
|
||||
opacity: 0.25;
|
||||
transform: translateY(-8px);
|
||||
> * {
|
||||
font-weight: var(--ax-font-weight-regular);
|
||||
}
|
||||
|
||||
40% {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-accordion__header {
|
||||
@media (forced-colors: active) {
|
||||
border: 1px solid buttonborder;
|
||||
background-color: canvas;
|
||||
color: canvastext;
|
||||
}
|
||||
|
||||
.navds-accordion__header:hover {
|
||||
background-color: canvas;
|
||||
border: 1px solid highlight;
|
||||
color: highlight;
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-accent-hoverA);
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
> .navds-accordion__icon-wrapper {
|
||||
background-color: var(--ax-bg-accent-strong-hover);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
background-color: canvas;
|
||||
border: 1px solid highlight;
|
||||
color: highlight;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
z-index: 1;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-accordion--small .navds-accordion__header {
|
||||
padding-block: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-accordion__header::before,
|
||||
.navds-accordion__header::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
.navds-accordion__item:last-child > .navds-accordion__content {
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
.navds-accordion__header::after {
|
||||
top: initial;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.navds-accordion__item[data-expanded="true"] > .navds-accordion__header::after,
|
||||
.navds-accordion__item:not(:last-child) > .navds-accordion__header::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-accordion__item[data-expanded="false"]:has(.navds-accordion__header:where(:hover, :focus-visible))
|
||||
+ .navds-accordion__item
|
||||
> .navds-accordion__header::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ------------------------- Accordion chevron icon ------------------------- */
|
||||
.navds-accordion__icon-wrapper {
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
align-self: center;
|
||||
background-color: var(--ax-bg-accent-moderateA);
|
||||
color: var(--ax-text-accent-strong);
|
||||
}
|
||||
|
||||
.navds-accordion__header-chevron {
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
flex-shrink: 0;
|
||||
transition: transform 250ms cubic-bezier(0.2, 0, 0, 1);
|
||||
}
|
||||
|
||||
.navds-accordion__item[data-expanded="true"] > .navds-accordion__header .navds-accordion__header-chevron {
|
||||
transform: rotateX(-180deg);
|
||||
}
|
||||
|
||||
/* ---------------------------- Accordion content --------------------------- */
|
||||
.navds-accordion__content {
|
||||
--__acx-accordion-content-line-width: 2px;
|
||||
|
||||
padding-inline: var(--ax-space-24) var(--ax-space-12);
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
padding-block: 0;
|
||||
max-height: 0;
|
||||
border-color: transparent;
|
||||
transition: all 250ms cubic-bezier(0.2, 0, 0, 1) allow-discrete;
|
||||
animation: navds-accordion-content-animation 250ms cubic-bezier(0.2, 0, 0, 1);
|
||||
}
|
||||
|
||||
.navds-accordion__item--no-animation {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
@keyframes navds-accordion-content-animation {
|
||||
0% {
|
||||
opacity: 0.01;
|
||||
}
|
||||
|
||||
20% {
|
||||
opacity: 0.01;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-accordion--indent > .navds-accordion__item > .navds-accordion__content {
|
||||
padding-inline: var(--ax-space-24) var(--ax-space-12);
|
||||
}
|
||||
|
||||
.navds-accordion--indent > .navds-accordion__item .navds-accordion__content-inner {
|
||||
box-shadow: -2px 0 0 0 var(--ax-border-subtleA);
|
||||
padding-block: var(--ax-space-8);
|
||||
|
||||
/* Aligns content with heading-section */
|
||||
padding-inline: calc(var(--ax-space-20) + 2px) var(--ax-space-20);
|
||||
|
||||
@media (forced-colors: active) {
|
||||
border-left: 1px solid canvastext;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-accordion__item[data-expanded="true"] > .navds-accordion__content {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
overflow: visible;
|
||||
max-height: fit-content;
|
||||
padding-block: var(--ax-space-8);
|
||||
padding-block-end: var(--ax-space-24);
|
||||
border-color: var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
@starting-style {
|
||||
.navds-accordion__item[data-expanded="true"]:not(.navds-accordion__item--no-animation) > .navds-accordion__content {
|
||||
padding-block: 0;
|
||||
max-height: 0;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
@@ -1,152 +1,132 @@
|
||||
/* --------------------------- ActionMenu content --------------------------- */
|
||||
.navds-action-menu__content {
|
||||
overflow: hidden;
|
||||
box-shadow: var(--a-shadow-medium);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
box-shadow: var(--ax-shadow-dialog);
|
||||
transition: transform 250ms cubic-bezier(0, 0, 0, 1) allow-discrete;
|
||||
|
||||
&[data-state="open"] {
|
||||
&[data-side="bottom"] {
|
||||
@starting-style {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
&[data-side="top"] {
|
||||
@starting-style {
|
||||
transform: translateY(4px);
|
||||
}
|
||||
}
|
||||
|
||||
&[data-side="right"] {
|
||||
@starting-style {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
&[data-side="left"] {
|
||||
@starting-style {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
.navds-action-menu__content > .navds-action-menu__content-inner {
|
||||
--__ac-action-menu-content-p: var(--a-spacing-2);
|
||||
--__ac-action-menu-item-pr: var(--a-spacing-3);
|
||||
--__ac-action-menu-item-pl: var(--a-spacing-2);
|
||||
--__ac-action-menu-item-height: 2rem;
|
||||
--__axc-action-menu-content-p: var(--ax-space-8);
|
||||
--__axc-action-menu-item-pr: var(--ax-space-8);
|
||||
--__axc-action-menu-item-pl: var(--ax-space-8);
|
||||
--__axc-action-menu-item-height: 2rem;
|
||||
|
||||
border-radius: var(--a-border-radius-large);
|
||||
background-color: var(--a-surface-default);
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
background-color: var(--ax-bg-raised);
|
||||
min-width: 128px;
|
||||
max-width: min(95vw, 640px);
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
transform-origin: var(--__ac-action-menu-content-transform-origin);
|
||||
animation-duration: 160ms;
|
||||
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
padding: var(--__ac-action-menu-content-p);
|
||||
padding: var(--__axc-action-menu-content-p);
|
||||
overflow: auto;
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
max-height: var(--__ac-action-menu-content-available-height);
|
||||
}
|
||||
|
||||
.navds-action-menu__content:where([data-state="open"]):where([data-side="bottom"]) {
|
||||
animation-name: aksel-action-from-bottom, aksel-action-fade-in;
|
||||
}
|
||||
|
||||
.navds-action-menu__content:where([data-state="open"]):where([data-side="top"]) {
|
||||
animation-name: aksel-action-from-top, aksel-action-fade-in;
|
||||
}
|
||||
|
||||
.navds-action-menu__content:where([data-state="open"]):where([data-side="left"]) {
|
||||
animation-name: aksel-action-from-left, aksel-action-fade-in;
|
||||
}
|
||||
|
||||
.navds-action-menu__content:where([data-state="open"]):where([data-side="right"]) {
|
||||
animation-name: aksel-action-from-right, aksel-action-fade-in;
|
||||
}
|
||||
|
||||
@keyframes aksel-action-from-bottom {
|
||||
from {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes aksel-action-from-top {
|
||||
from {
|
||||
transform: translateY(4px);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes aksel-action-from-left {
|
||||
from {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes aksel-action-from-right {
|
||||
from {
|
||||
transform: translateX(-4px);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes aksel-action-fade-in {
|
||||
from {
|
||||
opacity: 0.01;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------- ActionMenu Item ---------------------------- */
|
||||
.navds-action-menu__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-2);
|
||||
min-height: var(--__ac-action-menu-item-height);
|
||||
gap: var(--ax-space-8);
|
||||
min-height: var(--__axc-action-menu-item-height);
|
||||
cursor: default;
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
position: relative;
|
||||
padding-left: var(--__ac-action-menu-item-pl);
|
||||
padding-right: var(--__ac-action-menu-item-pr);
|
||||
font-size: var(--a-font-size-medium);
|
||||
scroll-margin-block: var(--__ac-action-menu-content-p);
|
||||
padding-left: var(--__axc-action-menu-item-pl);
|
||||
padding-right: var(--__axc-action-menu-item-pr);
|
||||
font-size: var(--ax-font-size-medium);
|
||||
scroll-margin-block: var(--__axc-action-menu-content-p);
|
||||
line-height: 1.5;
|
||||
color: var(--a-text-default);
|
||||
color: var(--ax-text-default);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navds-action-menu__item svg {
|
||||
flex-shrink: 0;
|
||||
& svg {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
background-color: var(--ax-bg-accent-moderate-hoverA);
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
&[aria-disabled="true"] {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-action-menu__item--has-icon {
|
||||
--__ac-action-menu-item-pl: var(--a-spacing-6);
|
||||
--__axc-action-menu-item-pl: var(--ax-space-24);
|
||||
}
|
||||
|
||||
.navds-action-menu__sub-trigger {
|
||||
--__ac-action-menu-item-pr: var(--a-spacing-05);
|
||||
}
|
||||
--__axc-action-menu-item-pr: var(--ax-space-2);
|
||||
|
||||
.navds-action-menu__item:focus {
|
||||
outline: none;
|
||||
background-color: var(--a-surface-action-subtle-hover);
|
||||
color: var(--a-text-default);
|
||||
&[data-state="open"] {
|
||||
background-color: var(--ax-bg-moderate-pressed);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: var(--ax-bg-accent-moderate-hoverA);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-action-menu__item--danger {
|
||||
color: var(--a-text-danger);
|
||||
}
|
||||
color: var(--ax-text-danger);
|
||||
|
||||
.navds-action-menu__item--danger:focus {
|
||||
background-color: var(--a-surface-danger-subtle);
|
||||
&:focus {
|
||||
background-color: var(--ax-bg-danger-moderate-hoverA);
|
||||
color: var(--ax-text-danger-strong);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------- ActionMenu marker --------------------------- */
|
||||
.navds-action-menu__marker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-1);
|
||||
gap: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-action-menu__marker--right {
|
||||
margin-left: auto;
|
||||
padding-left: var(--a-spacing-4);
|
||||
padding-left: var(--ax-space-16);
|
||||
}
|
||||
|
||||
.navds-action-menu__marker--left {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: var(--__ac-action-menu-item-pl);
|
||||
width: var(--__axc-action-menu-item-pl);
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
}
|
||||
@@ -156,47 +136,42 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* --------------------------- ActionMenu shortcut -------------------------- */
|
||||
.navds-action-menu__shortcut {
|
||||
background-color: var(--a-surface-neutral-subtle);
|
||||
color: var(--a-text-default);
|
||||
border-radius: var(--a-border-radius-small);
|
||||
padding: 0 var(--a-spacing-1);
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
color: var(--ax-text-default);
|
||||
border-radius: var(--ax-border-radius-small);
|
||||
padding: 0 var(--ax-space-4);
|
||||
min-width: 1.125rem;
|
||||
height: 1.125rem;
|
||||
line-height: 1;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--a-font-size-small);
|
||||
font-size: var(--ax-font-size-small);
|
||||
}
|
||||
|
||||
/* ---------------------------- ActionMenu Grouping ---------------------------- */
|
||||
.navds-action-menu__label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: calc(var(--__ac-action-menu-item-height) - 6px);
|
||||
padding-right: var(--__ac-action-menu-item-pr);
|
||||
padding-left: var(--__ac-action-menu-item-pl);
|
||||
color: var(--a-text-subtle);
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
min-height: calc(var(--__axc-action-menu-item-height) - 6px);
|
||||
padding-right: var(--__axc-action-menu-item-pr);
|
||||
padding-left: var(--__axc-action-menu-item-pl);
|
||||
color: var(--ax-text-subtle);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
font-size: var(--a-font-size-small);
|
||||
font-size: var(--ax-font-size-small);
|
||||
}
|
||||
|
||||
.navds-action-menu__divider {
|
||||
height: 1px;
|
||||
margin-block: var(--a-spacing-2);
|
||||
background-color: var(--a-border-divider);
|
||||
margin-block: var(--ax-space-8);
|
||||
background-color: var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
.navds-action-menu__indicator {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
.navds-action-menu__indicator-icon {
|
||||
font-size: 14px;
|
||||
}
|
||||
/* -------------------------- ActionMenu indicator -------------------------- */
|
||||
|
||||
.navds-action-menu__indicator-icon--unchecked,
|
||||
.navds-action-menu__indicator-icon--checked,
|
||||
@@ -204,24 +179,23 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-action-menu__indicator[data-state="unchecked"] .navds-action-menu__indicator-icon--unchecked {
|
||||
display: block;
|
||||
.navds-action-menu__indicator {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
|
||||
&[data-state="unchecked"] .navds-action-menu__indicator-icon--unchecked {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&[data-state="checked"] .navds-action-menu__indicator-icon--checked {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&[data-state="indeterminate"] .navds-action-menu__indicator-icon--indeterminate {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-action-menu__indicator:where([data-state="checked"]) .navds-action-menu__indicator-icon--checked {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navds-action-menu__indicator:where([data-state="indeterminate"]) .navds-action-menu__indicator-icon--indeterminate {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.navds-action-menu__item:where([aria-disabled="true"]) {
|
||||
color: var(--a-text-subtle);
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navds-action-menu__sub-trigger:where([data-state="open"]) {
|
||||
background-color: var(--a-surface-neutral-subtle);
|
||||
.navds-action-menu__indicator-icon {
|
||||
font-size: 14px;
|
||||
}
|
||||
@@ -1,101 +1,89 @@
|
||||
.navds-alert {
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
border: 1px solid;
|
||||
padding: var(--a-spacing-4);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
display: flex;
|
||||
gap: var(--a-spacing-3);
|
||||
gap: var(--ax-space-12);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navds-alert--small.navds-alert--close-button {
|
||||
align-items: flex-start;
|
||||
@media (forced-colors: active) {
|
||||
border: 1px solid canvastext;
|
||||
background-color: canvas;
|
||||
color: canvastext;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-alert__wrapper--maxwidth {
|
||||
max-width: 43.5rem;
|
||||
}
|
||||
|
||||
.navds-alert--close-button > .navds-alert__wrapper {
|
||||
margin-block-start: var(--a-spacing-05);
|
||||
}
|
||||
|
||||
.navds-alert--small.navds-alert--close-button > .navds-alert__wrapper {
|
||||
margin-block-start: var(--a-spacing-1);
|
||||
.navds-alert__icon {
|
||||
flex-shrink: 0;
|
||||
font-size: 1.5rem;
|
||||
align-self: flex-start;
|
||||
height: var(--ax-font-line-height-xlarge);
|
||||
}
|
||||
|
||||
.navds-alert--small {
|
||||
padding: var(--a-spacing-2) var(--a-spacing-4);
|
||||
gap: var(--a-spacing-2);
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
gap: var(--ax-space-8);
|
||||
|
||||
> .navds-alert__icon {
|
||||
margin-block-start: 0;
|
||||
height: var(--ax-font-line-height-large);
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------- Alert variants ----------------------------- */
|
||||
.navds-alert--info {
|
||||
border-color: var(--ax-border-info);
|
||||
background-color: var(--ax-bg-info-moderate);
|
||||
|
||||
> .navds-alert__icon {
|
||||
color: var(--ax-text-info-icon);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-alert--success {
|
||||
border-color: var(--ax-border-success);
|
||||
background-color: var(--ax-bg-success-moderate);
|
||||
|
||||
> .navds-alert__icon {
|
||||
color: var(--ax-text-success-icon);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-alert--warning {
|
||||
border-color: var(--ax-border-warning);
|
||||
background-color: var(--ax-bg-warning-moderate);
|
||||
|
||||
> .navds-alert__icon {
|
||||
color: var(--ax-text-warning-icon);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-alert--error {
|
||||
border-color: var(--ax-border-danger);
|
||||
background-color: var(--ax-bg-danger-moderate);
|
||||
|
||||
> .navds-alert__icon {
|
||||
color: var(--ax-text-danger-icon);
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------- Alert fullwidth ---------------------------- */
|
||||
.navds-alert--full-width {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.navds-alert > .navds-alert__icon {
|
||||
flex-shrink: 0;
|
||||
font-size: 1.5rem;
|
||||
align-self: flex-start;
|
||||
height: var(--a-font-line-height-xlarge);
|
||||
background: radial-gradient(circle, var(--a-surface-default) 47%, 0, transparent);
|
||||
}
|
||||
|
||||
.navds-alert--small > .navds-alert__icon {
|
||||
margin-block-start: 0;
|
||||
height: var(--a-font-line-height-large);
|
||||
}
|
||||
|
||||
.navds-alert--close-button > .navds-alert__icon {
|
||||
margin-block-start: var(--a-spacing-05);
|
||||
}
|
||||
|
||||
.navds-alert--small.navds-alert--close-button > .navds-alert__icon {
|
||||
margin-block-start: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-alert--error {
|
||||
border-color: var(--ac-alert-error-border, var(--a-border-danger));
|
||||
background-color: var(--ac-alert-error-bg, var(--a-surface-danger-subtle));
|
||||
}
|
||||
|
||||
.navds-alert--error > .navds-alert__icon {
|
||||
color: var(--ac-alert-icon-error-color, var(--a-icon-danger));
|
||||
}
|
||||
|
||||
.navds-alert--warning {
|
||||
border-color: var(--ac-alert-warning-border, var(--a-border-warning));
|
||||
background-color: var(--ac-alert-warning-bg, var(--a-surface-warning-subtle));
|
||||
}
|
||||
|
||||
.navds-alert--warning > .navds-alert__icon {
|
||||
background: radial-gradient(circle at 50% 57%, var(--a-surface-default) 30%, 0, transparent);
|
||||
color: var(--ac-alert-icon-warning-color, var(--a-icon-warning));
|
||||
}
|
||||
|
||||
.navds-alert--info {
|
||||
border-color: var(--ac-alert-info-border, var(--a-border-info));
|
||||
background-color: var(--ac-alert-info-bg, var(--a-surface-info-subtle));
|
||||
}
|
||||
|
||||
.navds-alert--info > .navds-alert__icon {
|
||||
color: var(--ac-alert-icon-info-color, var(--a-icon-info));
|
||||
}
|
||||
|
||||
.navds-alert--success {
|
||||
border-color: var(--ac-alert-success-border, var(--a-border-success));
|
||||
background-color: var(--ac-alert-success-bg, var(--a-surface-success-subtle));
|
||||
}
|
||||
|
||||
.navds-alert--success > .navds-alert__icon {
|
||||
color: var(--ac-alert-icon-success-color, var(--a-icon-success));
|
||||
}
|
||||
|
||||
/* ------------------------------ Alert inline ------------------------------ */
|
||||
.navds-alert--inline {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* ------------------------- Alert with close button ------------------------ */
|
||||
.navds-alert__button-wrapper {
|
||||
align-self: flex-start;
|
||||
flex: 1;
|
||||
@@ -104,10 +92,24 @@
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-alert {
|
||||
border: 1px solid canvastext;
|
||||
background-color: canvas;
|
||||
color: canvastext;
|
||||
.navds-alert--close-button {
|
||||
> .navds-alert__wrapper {
|
||||
margin-block-start: var(--ax-space-2);
|
||||
}
|
||||
|
||||
> .navds-alert__icon {
|
||||
margin-block-start: var(--ax-space-2);
|
||||
}
|
||||
|
||||
&.navds-alert--small {
|
||||
align-items: flex-start;
|
||||
|
||||
> .navds-alert__wrapper {
|
||||
margin-block-start: var(--ax-space-4);
|
||||
}
|
||||
|
||||
> .navds-alert__icon {
|
||||
margin-block-start: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,12 @@
|
||||
/* ------------------------- Global typo-definitions ------------------------ */
|
||||
body,
|
||||
:host {
|
||||
font-family: var(--ax-font-family, "Source Sans 3", "Source Sans Pro", Arial, sans-serif);
|
||||
line-height: 1.333;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
/* ---------------------------- Inline utilities ---------------------------- */
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
||||
|
||||
/* To support nested theming, we want to declare color on each scoped elements */
|
||||
:root,
|
||||
:host,
|
||||
.light {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.dark {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@import "../../../tokens/dist/darkside/tokens.css";
|
||||
@@ -1,5 +1,10 @@
|
||||
.navds-button {
|
||||
padding: var(--ax-spacing-3) var(--ax-spacing-5);
|
||||
--__axc-button-icon-size: 1.5rem;
|
||||
--__axc-button-icon-margin: -4px;
|
||||
--__axc-button-border-color: transparent;
|
||||
--__axc-button-border-width: 2px;
|
||||
|
||||
padding: var(--ax-space-12) var(--ax-space-20);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
@@ -8,260 +13,240 @@
|
||||
background: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--ax-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
box-shadow: inset 0 0 0 var(--__axc-button-border-width) var(--__axc-button-border-color);
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-button--small,
|
||||
.navds-button--xsmall {
|
||||
--__axc-button-icon-margin: -2px;
|
||||
--__axc-button-icon-size: 1.25rem;
|
||||
}
|
||||
|
||||
.navds-button--small {
|
||||
padding: var(--ax-spacing-1) var(--ax-spacing-3);
|
||||
padding: var(--ax-space-4) var(--ax-space-12);
|
||||
min-height: 2rem;
|
||||
min-width: 2rem;
|
||||
}
|
||||
|
||||
.navds-button--xsmall {
|
||||
padding: var(--ax-spacing-05) var(--ax-spacing-2);
|
||||
gap: var(--ax-spacing-1);
|
||||
padding: var(--ax-space-2) var(--ax-space-8);
|
||||
gap: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-button--icon-only {
|
||||
padding: var(--ax-spacing-3);
|
||||
}
|
||||
padding: var(--ax-space-12);
|
||||
|
||||
.navds-button--small.navds-button--icon-only {
|
||||
padding: var(--ax-spacing-1);
|
||||
}
|
||||
&.navds-button--small {
|
||||
padding: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-button--xsmall.navds-button--icon-only {
|
||||
padding: var(--ax-spacing-05);
|
||||
}
|
||||
|
||||
.navds-button:focus-visible {
|
||||
outline: 4px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
&.navds-button--xsmall {
|
||||
padding: var(--ax-space-2);
|
||||
}
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-button:focus {
|
||||
outline: 4px solid var(--ax-border-focus);
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-button__icon {
|
||||
font-size: 1.5rem;
|
||||
font-size: var(--__axc-button-icon-size);
|
||||
display: flex;
|
||||
|
||||
--__axc-button-icon-margin: -4px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: var(--__axc-button-icon-margin);
|
||||
}
|
||||
|
||||
.navds-button__icon:first-child {
|
||||
margin-left: var(--__axc-button-icon-margin);
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: var(--__axc-button-icon-margin);
|
||||
}
|
||||
|
||||
.navds-button__icon:last-child {
|
||||
margin-right: var(--__axc-button-icon-margin);
|
||||
}
|
||||
|
||||
:where(.navds-button--xsmall, .navds-button--small) .navds-button__icon {
|
||||
--__axc-button-icon-margin: -2px;
|
||||
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.navds-button__icon:only-child {
|
||||
margin: 0;
|
||||
.navds-button--icon-only & {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************
|
||||
* .navds-button--primary *
|
||||
*************************/
|
||||
|
||||
.navds-button--primary {
|
||||
background-color: var(--ax-bg-accent-strong);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-button.navds-button--primary {
|
||||
background-color: highlight;
|
||||
color: highlighttext;
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
|
||||
.navds-button.navds-button--primary span {
|
||||
forced-color-adjust: none;
|
||||
&:active {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-button--primary:hover {
|
||||
background-color: var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
background-color: var(--ax-bg-accent-strong);
|
||||
}
|
||||
|
||||
.navds-button--primary:active {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
&:not(:disabled) {
|
||||
background-color: highlight;
|
||||
color: highlighttext;
|
||||
}
|
||||
|
||||
.navds-button--primary:hover:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--primary:active:where(:disabled, .navds-button--disabled) {
|
||||
background-color: var(--ax-bg-accent-strong);
|
||||
& span {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************
|
||||
* .navds-button--primary-neutral *
|
||||
*************************/
|
||||
|
||||
.navds-button--primary-neutral {
|
||||
background-color: var(--ax-bg-neutral-strong);
|
||||
color: var(--ax-text-neutral-contrast);
|
||||
}
|
||||
background-color: var(--ax-bg-strong);
|
||||
color: var(--ax-text-contrast);
|
||||
|
||||
.navds-button--primary-neutral:hover {
|
||||
background-color: var(--ax-bg-neutral-strong-hover);
|
||||
}
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-strong-hover);
|
||||
}
|
||||
|
||||
.navds-button--primary-neutral:active {
|
||||
background-color: var(--ax-bg-neutral-strong-pressed);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--ax-bg-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-button--primary-neutral:hover:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--primary-neutral:active:where(:disabled, .navds-button--disabled) {
|
||||
background-color: var(--ax-bg-neutral-strong);
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
background-color: var(--ax-bg-strong);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************
|
||||
* .navds-button--secondary *
|
||||
**************************/
|
||||
|
||||
.navds-button--secondary {
|
||||
--__axc-button-border-color: var(--ax-border-accent);
|
||||
|
||||
background-color: transparent;
|
||||
color: var(--ax-text-accent);
|
||||
box-shadow: inset 0 0 0 2px var(--ax-border-accent);
|
||||
}
|
||||
|
||||
.navds-button--secondary:hover {
|
||||
background-color: var(--ax-bg-accent-moderate-hoverA);
|
||||
color: var(--ax-bg-accent-strong-hover);
|
||||
box-shadow: inset 0 0 0 2px var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
&:hover {
|
||||
--__axc-button-border-color: var(--ax-border-accent-strong);
|
||||
|
||||
.navds-button--secondary:active {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
box-shadow: none;
|
||||
}
|
||||
background-color: var(--ax-bg-accent-moderate-hoverA);
|
||||
}
|
||||
|
||||
.navds-button--secondary:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--secondary:hover:where(:disabled, .navds-button--disabled) {
|
||||
background-color: transparent;
|
||||
color: var(--ax-text-accent);
|
||||
&:active {
|
||||
--__axc-button-border-color: transparent;
|
||||
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
}
|
||||
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
--__axc-button-border-color: var(--ax-border-accent);
|
||||
|
||||
background-color: transparent;
|
||||
color: var(--ax-text-accent);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************
|
||||
* .navds-button--secondary-neutral *
|
||||
**************************/
|
||||
|
||||
.navds-button--secondary-neutral {
|
||||
--__axc-button-border-color: var(--ax-border-default);
|
||||
|
||||
background-color: transparent;
|
||||
color: var(--ax-text-default);
|
||||
box-shadow: inset 0 0 0 2px var(--ax-border-neutral);
|
||||
}
|
||||
|
||||
.navds-button--secondary-neutral:hover {
|
||||
background-color: var(--ax-bg-neutral-moderate-hoverA);
|
||||
}
|
||||
&:hover {
|
||||
--__axc-button-border-color: var(--ax-border-strong);
|
||||
|
||||
.navds-button--secondary-neutral:active {
|
||||
color: var(--ax-text-neutral-contrast);
|
||||
background-color: var(--ax-bg-neutral-strong-pressed);
|
||||
box-shadow: none;
|
||||
}
|
||||
background-color: var(--ax-bg-moderate-hoverA);
|
||||
}
|
||||
|
||||
.navds-button--secondary-neutral:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--secondary-neutral:hover:where(:disabled, .navds-button--disabled) {
|
||||
color: var(--ax-text-default);
|
||||
background-color: transparent;
|
||||
box-shadow: inset 0 0 0 2px var(--ax-border-strong);
|
||||
&:active {
|
||||
--__axc-button-border-color: transparent;
|
||||
|
||||
color: var(--ax-text-contrast);
|
||||
background-color: var(--ax-bg-strong-pressed);
|
||||
}
|
||||
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
--__axc-button-border-color: var(--ax-border-default);
|
||||
|
||||
color: var(--ax-text-default);
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************
|
||||
* .navds-button--tertiary *
|
||||
****************************/
|
||||
|
||||
.navds-button--tertiary {
|
||||
background-color: transparent;
|
||||
color: var(--ax-text-accent);
|
||||
}
|
||||
|
||||
.navds-button--tertiary:hover {
|
||||
background-color: var(--ax-bg-accent-hoverA);
|
||||
color: var(--ax-text-accent);
|
||||
}
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-accent-moderate-hoverA);
|
||||
}
|
||||
|
||||
.navds-button--tertiary:active {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
}
|
||||
|
||||
.navds-button--tertiary:active:hover {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-button--tertiary:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--tertiary:hover:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--tertiary:active:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--tertiary:active:hover:where(:disabled, .navds-button--disabled) {
|
||||
color: var(--ax-text-accent);
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
color: var(--ax-text-accent);
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************
|
||||
* .navds-button--tertiary-neutral *
|
||||
****************************/
|
||||
|
||||
.navds-button--tertiary-neutral {
|
||||
background-color: transparent;
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.navds-button--tertiary-neutral:hover {
|
||||
background-color: var(--ax-bg-neutral-hoverA);
|
||||
}
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-moderate-hoverA);
|
||||
}
|
||||
|
||||
.navds-button--tertiary-neutral:active {
|
||||
background-color: var(--ax-bg-neutral-strong-pressed);
|
||||
color: var(--ax-text-neutral-contrast);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--ax-bg-strong-pressed);
|
||||
color: var(--ax-text-contrast);
|
||||
}
|
||||
|
||||
.navds-button--tertiary-neutral:active:hover {
|
||||
background-color: var(--ax-bg-neutral-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-button--tertiary-neutral:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--tertiary-neutral:hover:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--tertiary-neutral:active:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--tertiary-neutral:active:hover:where(:disabled, .navds-button--disabled) {
|
||||
color: var(--ax-text-default);
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
color: var(--ax-text-default);
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************
|
||||
* .navds-button--danger *
|
||||
*************************/
|
||||
|
||||
.navds-button--danger {
|
||||
background-color: var(--ax-bg-danger-strong);
|
||||
color: var(--ax-text-danger-contrast);
|
||||
}
|
||||
|
||||
.navds-button--danger:hover {
|
||||
background-color: var(--ax-bg-danger-strong-hover);
|
||||
}
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-danger-strong-hover);
|
||||
}
|
||||
|
||||
.navds-button--danger:active {
|
||||
background-color: var(--ax-bg-danger-strong-pressed);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--ax-bg-danger-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-button--danger:active:where(:disabled, .navds-button--disabled),
|
||||
.navds-button--danger:hover:where(:disabled, .navds-button--disabled) {
|
||||
background-color: var(--ax-bg-danger-strong);
|
||||
&:is(:disabled, .navds-button--disabled) {
|
||||
background-color: var(--ax-bg-danger-strong);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************
|
||||
@@ -273,10 +258,14 @@
|
||||
}
|
||||
|
||||
.navds-button:not(.navds-button--loading):where(:disabled, .navds-button--disabled) {
|
||||
opacity: 0.3;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
}
|
||||
|
||||
/* Loader overrides */
|
||||
.navds-button .navds-loader {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.navds-button .navds-loader .navds-loader__foreground {
|
||||
stroke: currentColor;
|
||||
}
|
||||
@@ -286,6 +275,10 @@
|
||||
stroke: rgb(255 255 255 / 0.3);
|
||||
}
|
||||
|
||||
.navds-button--loading > :not(.navds-loader) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-button:not(.navds-button--loading):where(:disabled, .navds-button--disabled) {
|
||||
opacity: 1;
|
||||
@@ -298,14 +291,14 @@
|
||||
background-color: ButtonFace;
|
||||
}
|
||||
|
||||
.navds-button:hover {
|
||||
.navds-button:not(:disabled):hover {
|
||||
background-color: highlighttext;
|
||||
border-color: highlight;
|
||||
color: highlight;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navds-button:hover span {
|
||||
.navds-button:not(:disabled):hover span {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
.navds-chat {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: var(--a-spacing-3);
|
||||
gap: var(--ax-space-12);
|
||||
max-width: 40.75rem;
|
||||
}
|
||||
|
||||
.navds-chat--right {
|
||||
flex-direction: row-reverse;
|
||||
|
||||
& .navds-chat__bubble-wrapper {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
& .navds-chat__bubble {
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
border-bottom-right-radius: var(--ax-border-radius-small);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chat__bubble-wrapper {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-chat--right .navds-chat__bubble-wrapper {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
/* ------------------------------- Chat avatar ------------------------------ */
|
||||
.navds-chat__avatar {
|
||||
align-items: center;
|
||||
box-shadow: var(--a-shadow-xsmall);
|
||||
background-color: var(--ac-chat-avatar-bg, var(--a-surface-neutral-subtle));
|
||||
border-radius: var(--a-border-radius-full);
|
||||
color: var(--ac-chat-avatar-color, var(--a-text-default));
|
||||
background-color: var(--ax-bg-raised);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
color: var(--ax-text-default);
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
@@ -37,50 +34,61 @@
|
||||
line-height: 2.5rem; /* Makes text properly vertically centered in Chrome */
|
||||
font-size: 1.06rem;
|
||||
letter-spacing: 0.024rem;
|
||||
|
||||
& svg {
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
max-width: 1.5rem;
|
||||
max-height: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chat__avatar svg {
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
max-width: 1.5rem;
|
||||
max-height: 1.5rem;
|
||||
/* ------------------------------- Chat bubble ------------------------------ */
|
||||
.navds-chat__bubble-wrapper {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ax-space-12);
|
||||
}
|
||||
|
||||
.navds-chat__bubble {
|
||||
padding: var(--a-spacing-4);
|
||||
box-shadow: var(--a-shadow-xsmall);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
width: fit-content;
|
||||
background-color: var(--ac-chat-bubble-bg, var(--a-surface-neutral-subtle));
|
||||
border-radius: var(--a-border-radius-xlarge);
|
||||
border-bottom-left-radius: 2px;
|
||||
background-color: var(--ax-bg-raised);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-chat--right .navds-chat__bubble {
|
||||
border-radius: var(--a-border-radius-xlarge);
|
||||
border-bottom-right-radius: 2px;
|
||||
gap: var(--ax-space-8);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
border-bottom-left-radius: var(--ax-border-radius-small);
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
.navds-chat--small .navds-chat__bubble {
|
||||
padding: var(--a-spacing-3);
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
}
|
||||
|
||||
.navds-chat--info .navds-chat__bubble,
|
||||
.navds-chat--info .navds-chat__avatar {
|
||||
background-color: var(--a-surface-info-subtle);
|
||||
/* -------------------------- Chat bubble variants -------------------------- */
|
||||
.navds-chat--info {
|
||||
& .navds-chat__bubble,
|
||||
& .navds-chat__avatar {
|
||||
background-color: var(--ax-bg-info-raised);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chat--subtle .navds-chat__bubble,
|
||||
.navds-chat--subtle .navds-chat__avatar {
|
||||
background-color: var(--a-surface-default);
|
||||
.navds-chat--neutral {
|
||||
& .navds-chat__bubble,
|
||||
& .navds-chat__avatar {
|
||||
background-color: var(--ax-bg-raised);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------ Chat top text ----------------------------- */
|
||||
.navds-chat__top-text {
|
||||
color: var(--ac-chat-top-text, var(--a-text-default));
|
||||
color: var(--ax-text-default);
|
||||
display: flex;
|
||||
gap: var(--a-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
align-items: baseline;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
@@ -105,16 +113,3 @@
|
||||
.navds-chat--right .navds-chat__top-text--left {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-chat__bubble,
|
||||
.navds-chat__avatar {
|
||||
border: 1px solid canvastext;
|
||||
background-color: canvas;
|
||||
color: canvastext;
|
||||
}
|
||||
|
||||
.navds-chat__avatar svg {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
.navds-chips {
|
||||
display: flex;
|
||||
gap: var(--a-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.navds-chips :where(li) {
|
||||
.navds-chips li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
@@ -20,113 +20,122 @@
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--a-spacing-05);
|
||||
gap: var(--ax-space-2);
|
||||
margin: 0;
|
||||
padding: 0 var(--a-spacing-3);
|
||||
padding: 0 var(--ax-space-12);
|
||||
text-decoration: none;
|
||||
border-radius: var(--a-border-radius-full);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
min-height: 2rem;
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips--small .navds-chips__chip {
|
||||
min-height: 1.5rem;
|
||||
padding: 0 var(--a-spacing-2);
|
||||
.navds-chips--readonly {
|
||||
.navds-chips__chip {
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips__toggle {
|
||||
box-shadow: inset 0 0 0 1px var(--ac-chip-toggle-border, var(--a-border-subtle));
|
||||
background-color: var(--ac-chip-toggle-bg, var(--a-surface-action-subtle));
|
||||
color: var(--ac-chip-toggle-text, var(--a-text-default));
|
||||
}
|
||||
|
||||
.navds-chips__toggle:hover {
|
||||
box-shadow: inset 0 0 0 1px var(--ac-chip-toggle-hover-border, var(--a-border-subtle-hover));
|
||||
background-color: var(--ac-chip-toggle-hover-bg, var(--a-surface-action-subtle-hover));
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"] {
|
||||
box-shadow: none;
|
||||
background-color: var(--ac-chip-toggle-pressed-bg, var(--a-surface-action-selected));
|
||||
color: var(--ac-chip-toggle-pressed-text, var(--a-text-on-action));
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"]:hover {
|
||||
background-color: var(--ac-chip-toggle-pressed-hover-bg, var(--a-surface-action-selected-hover));
|
||||
}
|
||||
|
||||
/* Toggle variant neutral */
|
||||
.navds-chips__toggle--neutral {
|
||||
box-shadow: inset 0 0 0 1px var(--ac-chip-toggle-neutral-border, var(--a-border-subtle));
|
||||
background-color: var(--ac-chip-toggle-neutral-bg, var(--a-surface-neutral-subtle));
|
||||
color: var(--ac-chip-toggle-neutral-text, var(--a-text-default));
|
||||
}
|
||||
|
||||
.navds-chips__toggle--neutral:hover {
|
||||
box-shadow: inset 0 0 0 1px var(--ac-chip-toggle-neutral-hover-border, var(--a-border-subtle-hover));
|
||||
background-color: var(--ac-chip-toggle-neutral-hover-bg, var(--a-surface-neutral-subtle-hover));
|
||||
}
|
||||
|
||||
.navds-chips__toggle--neutral[aria-pressed="true"] {
|
||||
box-shadow: none;
|
||||
background-color: var(--ac-chip-toggle-neutral-pressed-bg, var(--a-surface-neutral-selected));
|
||||
color: var(--ac-chip-toggle-neutral-pressed-text, var(--a-text-on-neutral));
|
||||
}
|
||||
|
||||
.navds-chips__toggle--neutral[aria-pressed="true"]:hover {
|
||||
background-color: var(--ac-chip-toggle-neutral-pressed-hover-bg, var(--a-surface-neutral-selected));
|
||||
}
|
||||
|
||||
.navds-chips__toggle:focus-visible {
|
||||
box-shadow: 0 0 0 2px var(--ac-chip-toggle-focus, var(--a-border-focus));
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"]:focus-visible,
|
||||
.navds-chips__toggle:active:focus-visible {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
0 0 0 2px var(--ac-chip-toggle-focus, var(--a-border-focus));
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-chips__toggle:focus {
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 2px var(--ac-chip-toggle-focus, var(--a-border-focus));
|
||||
.navds-chips--small {
|
||||
.navds-chips__chip {
|
||||
min-height: 1.5rem;
|
||||
padding: 0 var(--ax-space-8);
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"]:focus,
|
||||
.navds-chips__toggle:active:focus {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
0 0 0 2px var(--ac-chip-toggle-focus, var(--a-border-focus));
|
||||
.navds-chips__toggle-icon {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.navds-chips__toggle--with-checkmark {
|
||||
padding-left: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-chips__removable-icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.navds-chips__removable-icon > svg {
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.navds-chips--icon-right {
|
||||
padding-right: var(--ax-space-2);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------ Chips Toggle ------------------------------ */
|
||||
.navds-chips__toggle--action {
|
||||
box-shadow: inset 0 0 0 1px var(--ax-border-accent-subtleA);
|
||||
background-color: var(--ax-bg-accent-moderate);
|
||||
color: var(--ax-text-default);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-accent-moderate-hover);
|
||||
}
|
||||
|
||||
&[data-pressed="true"] {
|
||||
box-shadow: none;
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips__toggle--neutral {
|
||||
box-shadow: inset 0 0 0 1px var(--ax-border-subtleA);
|
||||
background-color: var(--ax-bg-moderate);
|
||||
color: var(--ax-text-default);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-moderate-hover);
|
||||
}
|
||||
|
||||
&[data-pressed="true"] {
|
||||
box-shadow: none;
|
||||
background-color: var(--ax-bg-strong-pressed);
|
||||
color: var(--ax-text-contrast);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-strong-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips--medium .navds-chips__toggle--with-checkmark {
|
||||
padding-left: var(--a-spacing-1-alt);
|
||||
padding-left: var(--ax-space-6);
|
||||
}
|
||||
|
||||
.navds-chips--small .navds-chips__toggle--with-checkmark {
|
||||
padding-left: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-chips--small .navds-chips__toggle-icon {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
}
|
||||
/* -------------------------- start old CSS -------------------------- */
|
||||
|
||||
/* ----------------------------- Chips removable ---------------------------- */
|
||||
.navds-chips__removable {
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.navds-chips__removable--action {
|
||||
background-color: var(--ac-chip-removable-action-bg, var(--a-surface-action-selected));
|
||||
color: var(--ac-chip-removable-action-text, var(--a-text-on-action));
|
||||
background: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
|
||||
&:hover {
|
||||
background: var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips__removable--neutral {
|
||||
background-color: var(--ac-chip-removable-neutral-bg, var(--a-surface-neutral-subtle));
|
||||
color: var(--ac-chip-removable-neutral-text, var(--a-text-default));
|
||||
box-shadow: inset 0 0 0 1px var(--ac-chip-removable-neutral-border, var(--a-border-default));
|
||||
background: var(--ax-bg-strong-pressed);
|
||||
color: var(--ax-text-contrast);
|
||||
|
||||
&:hover {
|
||||
background: var(--ax-bg-strong-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips__removable-icon {
|
||||
@@ -135,100 +144,39 @@
|
||||
font-size: 1.25rem;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: var(--a-border-radius-full);
|
||||
}
|
||||
|
||||
.navds-chips--small .navds-chips__removable-icon {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.navds-chips--small .navds-chips__removable-icon > svg {
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.navds-chips__removable--action:focus-visible {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
0 0 0 2px var(--a-border-focus);
|
||||
}
|
||||
|
||||
.navds-chips__removable--neutral:focus-visible {
|
||||
box-shadow: 0 0 0 2px var(--a-border-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-chips__removable--action:focus {
|
||||
outline: none;
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
0 0 0 2px var(--a-border-focus);
|
||||
}
|
||||
|
||||
.navds-chips__removable--neutral:focus {
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 2px var(--a-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips__removable--action:hover {
|
||||
background-color: var(--ac-chip-removable-action-hover-bg, var(--a-surface-action-selected-hover));
|
||||
}
|
||||
|
||||
.navds-chips__removable--neutral:hover {
|
||||
background-color: var(--ac-chip-removable-neutral-hover-bg, var(--a-surface-neutral-subtle-hover));
|
||||
box-shadow: inset 0 0 0 1px var(--ac-chip-removable-neutral-hover-border, var(--a-border-strong));
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
}
|
||||
|
||||
.navds-chips--icon-left {
|
||||
padding-left: var(--a-spacing-1-alt);
|
||||
padding-left: var(--ax-space-6);
|
||||
}
|
||||
|
||||
.navds-chips--icon-right {
|
||||
padding-right: var(--a-spacing-1-alt);
|
||||
}
|
||||
|
||||
.navds-chips--small .navds-chips--icon-right {
|
||||
padding-right: var(--a-spacing-05);
|
||||
padding-right: var(--ax-space-6);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-chips__chip {
|
||||
border: 1px solid transparent;
|
||||
|
||||
&:hover {
|
||||
background-color: highlighttext;
|
||||
color: highlight;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-chips__chip:hover {
|
||||
background-color: highlighttext;
|
||||
color: highlight;
|
||||
}
|
||||
|
||||
.navds-chips__chip:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.navds-chips__chip:where([aria-pressed="true"], :active, :hover) > span {
|
||||
.navds-chips__chip:where([data-pressed="true"], :active, :hover) > span {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
|
||||
.navds-chips__toggle:active {
|
||||
background-color: highlight;
|
||||
color: highlighttext;
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"] {
|
||||
.navds-chips__toggle[data-pressed="true"] {
|
||||
background-color: selecteditem;
|
||||
color: selecteditemtext;
|
||||
border: 1px solid selecteditem;
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"]:hover {
|
||||
background-color: selecteditemtext;
|
||||
color: selecteditem;
|
||||
}
|
||||
|
||||
.navds-chips__toggle[aria-pressed="true"]:active {
|
||||
background-color: highlight;
|
||||
color: highlighttext;
|
||||
&:hover {
|
||||
background-color: selecteditemtext;
|
||||
color: selecteditem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,42 @@
|
||||
[data-theme="dark"] {
|
||||
--__ac-copybutton-action-text: var(--a-blue-300);
|
||||
--__ac-copybutton-bg-hover: rgb(214 231 255 /0.13);
|
||||
--__ac-copybutton-icon-success: rgb(51 170 95 /1);
|
||||
--__ac-copybutton-neutral-text: rgb(231 240 254 /0.69);
|
||||
--__ac-copybutton-text: rgb(251 252 254 /0.96);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--__ac-copybutton-action-text: initial;
|
||||
--__ac-copybutton-bg-hover: initial;
|
||||
--__ac-copybutton-icon-success: initial;
|
||||
--__ac-copybutton-neutral-text: initial;
|
||||
--__ac-copybutton-text: initial;
|
||||
}
|
||||
|
||||
.navds-copybutton {
|
||||
--__ac-copybutton-padding: var(--a-spacing-3) var(--a-spacing-5) var(--a-spacing-3) var(--a-spacing-4);
|
||||
--__axc-copybutton-padding: var(--ax-space-12) var(--ax-space-20) var(--ax-space-12) var(--ax-space-16);
|
||||
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
background: none;
|
||||
border-radius: var(--ac-copybutton-border-radius, var(--a-border-radius-medium));
|
||||
padding: var(--__ac-copybutton-padding);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
padding: var(--__axc-copybutton-padding);
|
||||
display: grid;
|
||||
place-content: center;
|
||||
background-color: transparent;
|
||||
transition: color 0.2s cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||
|
||||
&.navds-copybutton--icon-only {
|
||||
--__axc-copybutton-padding: var(--ax-space-12);
|
||||
}
|
||||
|
||||
&.navds-copybutton--icon-right {
|
||||
--__axc-copybutton-padding: var(--ax-space-12) var(--ax-space-16) var(--ax-space-12) var(--ax-space-20);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-moderate-hoverA);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
}
|
||||
|
||||
&:disabled:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
@@ -33,76 +44,82 @@
|
||||
background-color: ButtonFace;
|
||||
border: solid 1px ButtonText;
|
||||
color: ButtonText;
|
||||
}
|
||||
|
||||
.navds-copybutton.navds-copybutton:focus-visible {
|
||||
box-shadow: none;
|
||||
outline: 2px solid highlight;
|
||||
outline-offset: 2px;
|
||||
&:disabled {
|
||||
opacity: 1;
|
||||
border-color: GrayText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-copybutton--icon-right {
|
||||
--__ac-copybutton-padding: var(--a-spacing-3) var(--a-spacing-4) var(--a-spacing-3) var(--a-spacing-5);
|
||||
}
|
||||
|
||||
/* -------------------------- CopyButton small size ------------------------- */
|
||||
.navds-copybutton--small {
|
||||
--__ac-copybutton-padding: var(--a-spacing-1) var(--a-spacing-3) var(--a-spacing-1) var(--a-spacing-2);
|
||||
|
||||
min-height: 2rem;
|
||||
min-width: 2rem;
|
||||
|
||||
--__axc-copybutton-padding: var(--ax-space-4) var(--ax-space-12) var(--ax-space-4) var(--ax-space-8);
|
||||
|
||||
&.navds-copybutton--icon-right {
|
||||
--__axc-copybutton-padding: var(--ax-space-4) var(--ax-space-8) var(--ax-space-4) var(--ax-space-12);
|
||||
}
|
||||
|
||||
&.navds-copybutton--icon-only {
|
||||
--__axc-copybutton-padding: var(--ax-space-4);
|
||||
}
|
||||
|
||||
& .navds-copybutton__icon {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
& > .navds-copybutton__content {
|
||||
gap: var(--ax-space-6);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-copybutton--small.navds-copybutton--icon-right {
|
||||
--__ac-copybutton-padding: var(--a-spacing-1) var(--a-spacing-2) var(--a-spacing-1) var(--a-spacing-3);
|
||||
}
|
||||
|
||||
/* ------------------------- CopyButton xsmall size ------------------------- */
|
||||
.navds-copybutton--xsmall {
|
||||
--__ac-copybutton-padding: var(--a-spacing-05) var(--a-spacing-2) var(--a-spacing-05) var(--a-spacing-1);
|
||||
|
||||
min-height: 1.5rem;
|
||||
min-width: 1.5rem;
|
||||
|
||||
--__axc-copybutton-padding: var(--ax-space-2) var(--ax-space-8) var(--ax-space-2) var(--ax-space-4);
|
||||
|
||||
&.navds-copybutton--icon-right {
|
||||
--__axc-copybutton-padding: var(--ax-space-2) var(--ax-space-4) var(--ax-space-2) var(--ax-space-8);
|
||||
}
|
||||
|
||||
&.navds-copybutton--icon-only {
|
||||
--__axc-copybutton-padding: var(--ax-space-2);
|
||||
}
|
||||
|
||||
& .navds-copybutton__icon {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
& > .navds-copybutton__content {
|
||||
gap: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-copybutton--xsmall.navds-copybutton--icon-right {
|
||||
--__ac-copybutton-padding: var(--a-spacing-05) var(--a-spacing-1) var(--a-spacing-05) var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-copybutton--icon-only {
|
||||
--__ac-copybutton-padding: var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-copybutton--small.navds-copybutton--icon-only {
|
||||
--__ac-copybutton-padding: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-copybutton--xsmall.navds-copybutton--icon-only {
|
||||
--__ac-copybutton-padding: var(--a-spacing-05);
|
||||
}
|
||||
|
||||
/* ----------------------------- CopyButton Icon ---------------------------- */
|
||||
.navds-copybutton__icon {
|
||||
font-size: 1.5rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
:where(.navds-copybutton--xsmall, .navds-copybutton--small) .navds-copybutton__icon {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
&:first-of-type {
|
||||
margin-left: -0.25rem;
|
||||
}
|
||||
|
||||
.navds-copybutton__icon:first-of-type {
|
||||
margin-left: -0.25rem;
|
||||
}
|
||||
&:last-of-type {
|
||||
margin-right: -0.25rem;
|
||||
}
|
||||
|
||||
.navds-copybutton__icon:last-of-type {
|
||||
margin-right: -0.25rem;
|
||||
}
|
||||
|
||||
.navds-copybutton__icon:only-child {
|
||||
margin: 0;
|
||||
&:only-child {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-copybutton--active .navds-copybutton__icon {
|
||||
animation: akselCopyButtonIconAnimation 2s cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
animation: akselCopyButtonIconAnimation 2s cubic-bezier(0.05, 0.7, 0.1, 1);
|
||||
}
|
||||
|
||||
@keyframes akselCopyButtonIconAnimation {
|
||||
@@ -123,104 +140,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
:where(.navds-copybutton--small, .navds-copybutton--xsmall):where(:not(:only-child)) {
|
||||
margin: -0.125rem;
|
||||
}
|
||||
/* ---------------------------- CopyButton Action --------------------------- */
|
||||
.navds-copybutton--action {
|
||||
color: var(--ax-text-accent);
|
||||
|
||||
.navds-copybutton:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
&.navds-copybutton--active {
|
||||
color: var(--ax-text-success);
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-copybutton:focus {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
&:hover {
|
||||
color: var(--ax-text-success-strong);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--ax-text-accent-strong);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
color: var(--ax-text-accent);
|
||||
}
|
||||
}
|
||||
|
||||
/* Variant/action */
|
||||
.navds-copybutton--action {
|
||||
color: var(--ac-copybutton-action-text, var(--__ac-copybutton-action-text, var(--a-text-action)));
|
||||
background-color: var(--ac-copybutton-action-bg, var(--a-surface-transparent));
|
||||
}
|
||||
|
||||
.navds-copybutton--action:hover {
|
||||
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)));
|
||||
}
|
||||
|
||||
.navds-copybutton--action:where(:disabled),
|
||||
.navds-copybutton--action:hover:where(:disabled) {
|
||||
color: var(--ac-copybutton-action-text, var(--__ac-copybutton-action-text, var(--a-text-action)));
|
||||
background-color: var(--ac-copybutton-action-bg, var(--a-surface-transparent));
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navds-copybutton--active.navds-copybutton--action {
|
||||
color: var(--ac-copybutton-action-active-text, var(--__ac-copybutton-icon-success, var(--a-icon-success)));
|
||||
}
|
||||
|
||||
/* Variant/neutral */
|
||||
/* --------------------------- CopyButton Neutral --------------------------- */
|
||||
.navds-copybutton--neutral {
|
||||
color: var(--ac-copybutton-neutral-text, var(--__ac-copybutton-neutral-text, var(--a-text-subtle)));
|
||||
background-color: var(--ac-copybutton-neutral-bg, var(--a-surface-transparent));
|
||||
}
|
||||
color: var(--ax-text-subtle);
|
||||
|
||||
.navds-copybutton--neutral:hover {
|
||||
color: var(--ac-copybutton-neutral-hover-text, var(--__ac-copybutton-text, var(--a-text-default)));
|
||||
background-color: var(--ac-copybutton-neutral-hover-bg, var(--__ac-copybutton-bg-hover, var(--a-surface-hover)));
|
||||
}
|
||||
&:hover,
|
||||
&.navds-copybutton--active {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.navds-copybutton--neutral:where(:disabled, .navds-copybutton--disabled),
|
||||
.navds-copybutton--neutral:hover:where(:disabled, .navds-copybutton--disabled) {
|
||||
color: var(--ac-copybutton-neutral-text, var(--__ac-copybutton-text, var(--a-text-default)));
|
||||
background-color: var(--ac-copybutton-neutral-bg, var(--a-surface-transparent));
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navds-copybutton--active.navds-copybutton--neutral {
|
||||
color: var(--ac-copybutton-neutral-active-text, var(--__ac-copybutton-text, var(--a-text-default)));
|
||||
&:disabled {
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-copybutton__content {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-copybutton--small > .navds-copybutton__content {
|
||||
gap: var(--a-spacing-1-alt);
|
||||
}
|
||||
|
||||
.navds-copybutton--xsmall > .navds-copybutton__content {
|
||||
gap: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-copybutton--active > .navds-copybutton__content {
|
||||
animation: var(--ac-copybutton-animation, akselCopyButtonAnimation 0.4s linear);
|
||||
}
|
||||
|
||||
@keyframes akselCopyButtonAnimation {
|
||||
0% {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disabled */
|
||||
.navds-copybutton:where(:disabled) {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-copybutton:where(:disabled) {
|
||||
opacity: 1;
|
||||
border-color: GrayText;
|
||||
}
|
||||
gap: var(--ax-space-8);
|
||||
}
|
||||
@@ -1,108 +1,140 @@
|
||||
.navds-date {
|
||||
padding: var(--a-spacing-4) var(--a-spacing-3);
|
||||
padding: var(--ax-space-16) var(--ax-space-12);
|
||||
|
||||
.rdp-day_range_middle {
|
||||
&.rdp-day_disabled {
|
||||
color: var(--ax-text-default);
|
||||
background: var(--ax-bg-moderateA);
|
||||
}
|
||||
|
||||
&.rdp-day_selected {
|
||||
background-color: var(--ax-bg-accent-moderateA);
|
||||
box-shadow: inset 0 0 0 1px var(--ax-border-accent-subtleA);
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
}
|
||||
|
||||
.rdp-month,
|
||||
&.rdp-month {
|
||||
display: grid;
|
||||
gap: var(--ax-space-20);
|
||||
}
|
||||
|
||||
.navds-date__caption-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.rdp-head_cell {
|
||||
text-transform: capitalize;
|
||||
font-size: var(--ax-font-size-small);
|
||||
}
|
||||
|
||||
.rdp-button {
|
||||
all: unset;
|
||||
display: block;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
text-align: center;
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
}
|
||||
|
||||
.rdp-day_range_start {
|
||||
border-radius: var(--ax-border-radius-xlarge) var(--ax-border-radius-medium) var(--ax-border-radius-medium)
|
||||
var(--ax-border-radius-xlarge);
|
||||
}
|
||||
|
||||
.rdp-day_range_end:not(.rdp-day_range_start) {
|
||||
border-radius: var(--ax-border-radius-medium) var(--ax-border-radius-xlarge) var(--ax-border-radius-xlarge)
|
||||
var(--ax-border-radius-medium);
|
||||
}
|
||||
|
||||
.rdp-day_range_start.rdp-day_range_end {
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
}
|
||||
|
||||
.navds-date__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rdp-day_selected,
|
||||
.navds-monthpicker__month--selected {
|
||||
color: var(--ax-text-accent-contrast);
|
||||
background: var(--ax-bg-accent-strong-pressed);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rdp-day_disabled {
|
||||
cursor: not-allowed;
|
||||
text-decoration: line-through;
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.rdp-button:where(:not(.rdp-day_selected, [disabled])):hover,
|
||||
.navds-date__month-button:where(:not(.rdp-day_selected, [disabled])):hover {
|
||||
background: var(--ax-bg-accent-moderate-hoverA);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.rdp-day_today {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
background-color: var(--ax-text-accent);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&.rdp-day_selected:not(.rdp-day_range_middle),
|
||||
&:active {
|
||||
&::before {
|
||||
background-color: var(--ax-text-accent-contrast);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rdp-day_outside {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navds-date__modal & {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-date__modal-body > & {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_range_middle.rdp-day_disabled {
|
||||
color: var(--ac-date-middle-text, var(--a-text-on-action));
|
||||
background: var(--ac-date-middle-bg, var(--a-surface-action-selected));
|
||||
}
|
||||
|
||||
.navds-date .rdp-month,
|
||||
.navds-date.rdp-month {
|
||||
display: grid;
|
||||
gap: var(--a-spacing-5);
|
||||
}
|
||||
|
||||
.navds-date__caption-label {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.navds-date .rdp-head_cell {
|
||||
text-transform: capitalize;
|
||||
font-size: var(--a-font-size-small);
|
||||
}
|
||||
|
||||
.navds-date .rdp-weeknumber {
|
||||
font-size: var(--a-font-size-small);
|
||||
.navds-date__caption {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
margin: var(--a-spacing-2);
|
||||
color: var(--a-text-subtle);
|
||||
gap: var(--ax-space-4);
|
||||
padding-inline: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-date .rdp-weeknumber.rdp-button {
|
||||
.navds-date__caption-button {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
box-shadow: 0 0 0 1px var(--a-border-default);
|
||||
color: var(--a-text-subtle);
|
||||
font-size: var(--a-font-size-small);
|
||||
}
|
||||
|
||||
.navds-date .rdp-weeknumber.rdp-button:active {
|
||||
background-color: var(--a-surface-action-active);
|
||||
color: var(--a-text-on-action);
|
||||
box-shadow: none;
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.navds-date__caption__month .navds-select__container select {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.navds-date .rdp-button {
|
||||
all: unset;
|
||||
display: block;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
text-align: center;
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_range_start {
|
||||
border-radius: var(--a-border-radius-xlarge) var(--a-border-radius-medium) var(--a-border-radius-medium)
|
||||
var(--a-border-radius-xlarge);
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_range_end:not(.rdp-day_range_start) {
|
||||
border-radius: var(--a-border-radius-medium) var(--a-border-radius-xlarge) var(--a-border-radius-xlarge)
|
||||
var(--a-border-radius-medium);
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_range_start.rdp-day_range_end {
|
||||
border-radius: var(--a-border-radius-xlarge);
|
||||
}
|
||||
|
||||
.navds-date .rdp-button:not(.rdp-day_selected, [disabled]):focus-visible,
|
||||
.navds-date .navds-date__month-button:not(.rdp-day_selected, [disabled]):focus-visible {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-date .rdp-button:not(.rdp-day_selected, [disabled]):focus,
|
||||
.navds-date .navds-date__month-button:not(.rdp-day_selected, [disabled]):focus {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date .rdp-button.rdp-day_selected:not([disabled]):focus-visible,
|
||||
.navds-date .navds-date__month-button.rdp-day_selected:not([disabled]):focus-visible {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-date .rdp-button.rdp-day_selected:not([disabled]):focus,
|
||||
.navds-date .navds-date__month-button.rdp-day_selected:not([disabled]):focus {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
/* Monthpicker */
|
||||
.navds-date__month-button {
|
||||
all: unset;
|
||||
@@ -110,24 +142,10 @@
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
text-transform: capitalize;
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navds-date__month-button:focus-visible,
|
||||
.navds-monthpicker__caption-button:focus-visible {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-date__month-button:focus,
|
||||
.navds-monthpicker__caption-button:focus {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date__year-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -137,13 +155,69 @@
|
||||
.navds-date__standalone-wrapper {
|
||||
height: fit-content;
|
||||
width: fit-content;
|
||||
|
||||
.rdp-cell > button.rdp-day,
|
||||
button.navds-date__month-button {
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
&:active:not(:disabled) {
|
||||
color: var(--ax-text-accent-contrast);
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date .navds-date__field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
.navds-date__field-input {
|
||||
&.navds-text-field__input {
|
||||
padding-right: var(--ax-space-48);
|
||||
}
|
||||
|
||||
.navds-form-field--small & {
|
||||
padding-right: var(--ax-space-32);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date__field-button {
|
||||
position: absolute;
|
||||
right: 0.0625rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--ax-text-default);
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
background: none;
|
||||
border-radius: calc(var(--ax-border-radius-medium) - 1px);
|
||||
padding: var(--ax-space-12);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.5rem;
|
||||
height: calc(100% - 0.125rem);
|
||||
border-start-start-radius: 0;
|
||||
border-end-start-radius: 0;
|
||||
|
||||
.navds-form-field--small & {
|
||||
padding: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-form-field--disabled & {
|
||||
opacity: 1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Readonly */
|
||||
.navds-date__field--readonly & {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline-color: var(--ax-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date__field-wrapper {
|
||||
@@ -153,146 +227,23 @@
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_selected,
|
||||
.navds-monthpicker__month--selected {
|
||||
color: var(--ac-date-selected-text, var(--a-text-on-action));
|
||||
background: var(--ac-date-selected-bg, var(--a-surface-action-selected));
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_disabled {
|
||||
cursor: not-allowed;
|
||||
text-decoration: line-through;
|
||||
background-color: var(--ac-date-disabled-bg, var(--a-surface-neutral-subtle));
|
||||
color: var(--ac-date-disabled-text, var(--a-text-subtle));
|
||||
}
|
||||
|
||||
.navds-date .rdp-button:where(:not(.rdp-day_selected, [disabled])):hover,
|
||||
.navds-date__month-button:where(:not(.rdp-day_selected, [disabled])):hover {
|
||||
background: var(--ac-date-hover-bg, var(--a-surface-action-subtle-hover));
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_today {
|
||||
box-shadow: 0 0 0 1px var(--ac-date-today-border, var(--a-border-action-selected));
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.navds-date__caption {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-1);
|
||||
padding-inline: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-date__caption-button,
|
||||
.navds-date__caption-button:disabled,
|
||||
.navds-date__caption-button:disabled:hover {
|
||||
color: var(--ac-date-caption-text, var(--a-text-default));
|
||||
}
|
||||
|
||||
.navds-date__field-input {
|
||||
padding-right: var(--a-spacing-12);
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-date__field-input {
|
||||
padding-right: var(--a-spacing-8);
|
||||
}
|
||||
|
||||
/* Error-handling */
|
||||
.navds-date__field--error .navds-date__field-input:not(:hover, :disabled) {
|
||||
border-color: var(--ac-date-input-error-border, var(--a-border-danger));
|
||||
box-shadow: inset 0 0 0 1px var(--ac-date-input-error-border, var(--a-border-danger));
|
||||
}
|
||||
|
||||
.navds-date__field--error .navds-date__field-input:focus-visible:not(:hover, :disabled) {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--ac-date-input-error-border, var(--a-border-danger)),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-date__field--error .navds-date__field-input:focus:not(:hover, :disabled) {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--ac-date-input-error-border, var(--a-border-danger)),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date__field-button {
|
||||
position: absolute;
|
||||
right: 0.0625rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: var(--ac-date-input-button-text, var(--a-text-default));
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
background: none;
|
||||
border-radius: calc(var(--a-border-radius-medium) - 1px);
|
||||
padding: var(--a-spacing-3);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.5rem;
|
||||
height: calc(100% - 0.125rem);
|
||||
border-start-start-radius: 0;
|
||||
border-end-start-radius: 0;
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-date__field-button {
|
||||
padding: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-date__field-button:hover:where(:not([disabled])) {
|
||||
color: var(--ac-date-input-button-hover-text, var(--a-text-action-on-action-subtle));
|
||||
background-color: var(--ac-date-input-button-hover-bg, var(--a-surface-action-subtle-hover));
|
||||
}
|
||||
|
||||
.navds-form-field--disabled .navds-date__field-button {
|
||||
opacity: 1;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.navds-date__field-button:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-date__field-button:focus {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date__caption__year {
|
||||
width: 5rem;
|
||||
}
|
||||
|
||||
.navds-date .rdp-day_outside {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Readonly */
|
||||
.navds-date__field--readonly .navds-date__field-button {
|
||||
cursor: default;
|
||||
color: var(--a-gray-500);
|
||||
}
|
||||
|
||||
.navds-date__caption-button {
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
.navds-date__week-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-05);
|
||||
gap: var(--ax-space-2);
|
||||
}
|
||||
|
||||
.navds-date__weeknumber {
|
||||
--__axc-button-border-width: 1px;
|
||||
}
|
||||
|
||||
.navds-date__weeknumber-number {
|
||||
font-size: 0.875rem;
|
||||
color: var(--ax-text-subtle);
|
||||
|
||||
.navds-date__weeknumber:active & {
|
||||
color: var(--ax-text-contrast);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-date__week-wrapper {
|
||||
@@ -303,37 +254,25 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.navds-date__modal.navds-date {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-date__modal-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
padding: var(--a-spacing-4);
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-date__modal-body > .navds-date {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-date__popover:where(.navds-popover) {
|
||||
border: none;
|
||||
padding: var(--ax-space-16);
|
||||
gap: var(--ax-space-8);
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.navds-date {
|
||||
padding: var(--a-spacing-5) var(--a-spacing-4);
|
||||
padding: var(--ax-space-20) var(--ax-space-16);
|
||||
}
|
||||
|
||||
.navds-date__modal-body {
|
||||
padding: var(--a-spacing-6);
|
||||
padding: var(--ax-space-24);
|
||||
}
|
||||
|
||||
.navds-date__caption {
|
||||
gap: var(--a-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
}
|
||||
|
||||
.navds-date .rdp-button,
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
.navds-dropdown__item:disabled {
|
||||
color: var(--ac-dropdown-item-text, var(--a-text-action));
|
||||
opacity: 0.3;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
background: transparent;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@@ -1,114 +1,89 @@
|
||||
.navds-expansioncard {
|
||||
--__ac-expansioncard-border-color: var(--ac-expansioncard-border-color, var(--a-border-default));
|
||||
--__ac-expansioncard-border-radius: var(--ac-expansioncard-border-radius, var(--a-border-radius-large));
|
||||
--__ac-expansioncard-border-width: 1px;
|
||||
--__ac-expansioncard-padding-block: var(--a-spacing-4);
|
||||
--__ac-expansioncard-padding-inline: var(--a-spacing-6);
|
||||
--__axc-expansioncard-border-radius: calc(var(--ax-border-radius-xlarge) - 1px);
|
||||
--__axc-expansioncard-padding-block: var(--ax-space-16);
|
||||
--__axc-expansioncard-padding-inline: var(--ax-space-20);
|
||||
|
||||
border-radius: var(--__ac-expansioncard-border-radius);
|
||||
background-color: var(--ac-expansioncard-bg, var(--a-surface-default));
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
background-color: var(--ax-bg-raised);
|
||||
height: fit-content;
|
||||
border: 1px solid var(--ax-border-default);
|
||||
|
||||
&:has(.navds-expansioncard__header:hover) {
|
||||
box-shadow: 0 0 0 1px var(--ax-border-strong);
|
||||
border-color: var(--ax-border-strong);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-expansioncard--open {
|
||||
--__ac-expansioncard-border-color: var(
|
||||
--ac-expansioncard-border-open-color,
|
||||
var(--ac-expansioncard-border-color, var(--a-border-default))
|
||||
);
|
||||
/* ------------------------ ExpansionCard Small-size ------------------------ */
|
||||
.navds-expansioncard--small {
|
||||
--__axc-expansioncard-padding-inline: var(--ax-space-16);
|
||||
--__axc-expansioncard-padding-block: var(--ax-space-12);
|
||||
|
||||
& > .navds-expansioncard__header .navds-expansioncard__title--small {
|
||||
margin-top: var(--ax-space-2);
|
||||
}
|
||||
|
||||
& :is(.navds-expansioncard__title--medium, .navds-expansioncard__title--large) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
& > .navds-expansioncard__header > .navds-expansioncard__header-button {
|
||||
min-height: 2rem;
|
||||
min-width: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-expansioncard:hover {
|
||||
--__ac-expansioncard-border-color: var(--ac-expansioncard-border-hover-color, var(--a-border-strong));
|
||||
}
|
||||
|
||||
:where(.navds-expansioncard.navds-expansioncard--open):hover {
|
||||
--__ac-expansioncard-border-color: var(--ac-expansioncard-border-hover-color, var(--a-border-strong));
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Header *
|
||||
*************************/
|
||||
/* -------------------------- ExpansionCard Header -------------------------- */
|
||||
.navds-expansioncard__header {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
gap: var(--a-spacing-4);
|
||||
padding: var(--__ac-expansioncard-padding-block) var(--__ac-expansioncard-padding-inline);
|
||||
border-radius: var(--__ac-expansioncard-border-radius);
|
||||
background-color: var(--ac-expansioncard-header-bg, var(--a-surface-transparent));
|
||||
gap: var(--ax-space-16);
|
||||
padding: var(--__axc-expansioncard-padding-block) var(--__axc-expansioncard-padding-inline);
|
||||
border-radius: var(--__axc-expansioncard-border-radius);
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
border: var(--__ac-expansioncard-border-width) solid var(--__ac-expansioncard-border-color);
|
||||
justify-content: space-between;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--ax-bg-hover);
|
||||
}
|
||||
|
||||
&[data-open="true"] {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
|
||||
/* Divider between header and content */
|
||||
&::after {
|
||||
content: "";
|
||||
background-color: var(--ax-border-subtle);
|
||||
bottom: 0;
|
||||
left: var(--__axc-expansioncard-padding-inline);
|
||||
height: 1px;
|
||||
width: calc(100% - 2 * var(--__axc-expansioncard-padding-inline));
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover::after {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-expansioncard--small {
|
||||
--__ac-expansioncard-padding-block: var(--a-spacing-3);
|
||||
--__ac-expansioncard-padding-inline: var(--a-spacing-4);
|
||||
}
|
||||
|
||||
.navds-expansioncard__header:hover {
|
||||
background-color: var(--ac-expansioncard-header-bg-hover, var(--a-surface-hover));
|
||||
box-shadow: 0 0 0 1px var(--__ac-expansioncard-border-color);
|
||||
}
|
||||
|
||||
.navds-expansioncard--open > :where(.navds-expansioncard__header) {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border: var(--__ac-expansioncard-border-width) solid var(--__ac-expansioncard-border-color);
|
||||
border-bottom: none;
|
||||
background-color: var(--ac-expansioncard-header-open-bg, var(--a-surface-transparent));
|
||||
}
|
||||
|
||||
.navds-expansioncard--open > :where(.navds-expansioncard__header):hover {
|
||||
background-color: var(--ac-expansioncard-header-bg-hover, var(--a-surface-hover));
|
||||
box-shadow:
|
||||
1px 0 0 0 var(--__ac-expansioncard-border-color),
|
||||
-1px 0 0 0 var(--__ac-expansioncard-border-color),
|
||||
0 -1px 0 0 var(--__ac-expansioncard-border-color);
|
||||
}
|
||||
|
||||
.navds-expansioncard--open > :where(.navds-expansioncard__header)::after {
|
||||
content: "";
|
||||
background-color: var(--a-border-divider);
|
||||
bottom: 0;
|
||||
left: var(--__ac-expansioncard-padding-inline);
|
||||
height: 1px;
|
||||
width: calc(100% - 2 * var(--__ac-expansioncard-padding-inline));
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
transition: opacity 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.navds-expansioncard--open > :where(.navds-expansioncard__header:hover)::after {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Header/Typography *
|
||||
*************************/
|
||||
|
||||
/* --------------------- ExpansionCard Header typography -------------------- */
|
||||
.navds-expansioncard__title--small {
|
||||
margin-top: 0.625rem;
|
||||
}
|
||||
|
||||
.navds-expansioncard__title--medium {
|
||||
margin-top: var(--a-spacing-2);
|
||||
margin-top: var(--ax-space-8);
|
||||
}
|
||||
|
||||
.navds-expansioncard__title--large {
|
||||
margin-top: var(--a-spacing-1);
|
||||
margin-top: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-expansioncard--small > :where(.navds-expansioncard__header) :where(.navds-expansioncard__title--small) {
|
||||
margin-top: var(--a-spacing-05);
|
||||
}
|
||||
|
||||
.navds-expansioncard--small :where(.navds-expansioncard__title--medium, .navds-expansioncard__title--large) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Header/Button *
|
||||
*************************/
|
||||
/* ----------------------- ExpansionCard Header Button ---------------------- */
|
||||
.navds-expansioncard__header-button {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
@@ -116,120 +91,87 @@
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: var(--ac-expansioncard-button-border-radius, var(--a-border-radius-medium));
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
min-height: 3rem;
|
||||
min-width: 3rem;
|
||||
font-size: 1.5rem;
|
||||
align-self: flex-start;
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
&:focus {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Makes the whole header clickable */
|
||||
&::after {
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-expansioncard--small > :where(.navds-expansioncard__header) > :where(.navds-expansioncard__header-button) {
|
||||
min-height: 2rem;
|
||||
min-width: 2rem;
|
||||
}
|
||||
|
||||
:where(.navds-expansioncard__header):hover > :where(.navds-expansioncard__header-button) {
|
||||
background-color: var(--a-surface-hover);
|
||||
.navds-expansioncard__header:hover > .navds-expansioncard__header-button {
|
||||
background-color: var(--ax-bg-moderate-hoverA);
|
||||
}
|
||||
|
||||
.navds-expansioncard__header-chevron {
|
||||
transition: transform 150ms ease-in-out;
|
||||
transition: transform 250ms cubic-bezier(0.2, 0, 0, 1);
|
||||
}
|
||||
|
||||
.navds-expansioncard--open > :where(.navds-expansioncard__header) :where(.navds-expansioncard__header-chevron) {
|
||||
transform: translateY(0) rotate(180deg);
|
||||
.navds-expansioncard__header[data-open="true"] .navds-expansioncard__header-chevron {
|
||||
transform: rotateX(-180deg);
|
||||
}
|
||||
|
||||
.navds-expansioncard__header-button:hover > :where(.navds-expansioncard__header-chevron) {
|
||||
transform: translateY(1px);
|
||||
/* Even if animation always takes 250ms, the perceived effect of current timing function makes the 'closing'-animation take longer */
|
||||
.navds-expansioncard__header[data-open="false"] .navds-expansioncard__header-chevron {
|
||||
transition-duration: 400ms;
|
||||
}
|
||||
|
||||
.navds-expansioncard__header-button:focus-visible {
|
||||
outline: 3px solid transparent;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-expansioncard__header-button:focus {
|
||||
outline: 3px solid transparent;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-expansioncard--open
|
||||
> :where(.navds-expansioncard__header)
|
||||
> :where(.navds-expansioncard__header-button):hover
|
||||
:where(.navds-expansioncard__header-chevron) {
|
||||
transform: translateY(-1px) rotate(180deg);
|
||||
}
|
||||
|
||||
.navds-expansioncard__header-button::after {
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Content *
|
||||
*************************/
|
||||
/* -------------------------- ExpansionCard Content ------------------------- */
|
||||
.navds-expansioncard__content {
|
||||
--__ac-expansioncard-padding-block: var(--a-spacing-5);
|
||||
border-end-end-radius: var(--__axc-expansioncard-border-radius);
|
||||
border-end-start-radius: var(--__axc-expansioncard-border-radius);
|
||||
padding-inline: var(--__axc-expansioncard-padding-inline);
|
||||
padding-block: 0;
|
||||
display: grid;
|
||||
grid-template-rows: 0fr;
|
||||
visibility: hidden;
|
||||
transition-duration: 250ms;
|
||||
transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
|
||||
transition-property: visibility, padding-block, grid-template-rows;
|
||||
overflow: hidden;
|
||||
|
||||
border-end-end-radius: var(--__ac-expansioncard-border-radius);
|
||||
border-end-start-radius: var(--__ac-expansioncard-border-radius);
|
||||
padding: var(--__ac-expansioncard-padding-block) var(--__ac-expansioncard-padding-inline)
|
||||
var(--__ac-expansioncard-padding-inline);
|
||||
border: var(--__ac-expansioncard-border-width) solid var(--__ac-expansioncard-border-color);
|
||||
border-top: none;
|
||||
}
|
||||
&[data-open="true"] {
|
||||
grid-template-rows: 1fr;
|
||||
visibility: visible;
|
||||
padding-block: var(--__axc-expansioncard-padding-block);
|
||||
|
||||
.navds-expansioncard--small .navds-expansioncard__content {
|
||||
--__ac-expansioncard-padding-block: var(--a-spacing-4);
|
||||
}
|
||||
|
||||
.navds-expansioncard__content--closed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:where(.navds-expansioncard__header):hover + .navds-expansioncard__content {
|
||||
box-shadow:
|
||||
1px 0 0 0 var(--__ac-expansioncard-border-color),
|
||||
-1px 0 0 0 var(--__ac-expansioncard-border-color),
|
||||
0 1px 0 0 var(--__ac-expansioncard-border-color);
|
||||
& .navds-expansioncard__content-inner {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-expansioncard__content-inner {
|
||||
animation: fadeExpansionCard 250ms ease;
|
||||
min-height: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 250ms cubic-bezier(0.2, 0, 0, 1);
|
||||
}
|
||||
|
||||
.navds-expansioncard--no-animation :where(.navds-expansioncard__content-inner) {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
@keyframes fadeExpansionCard {
|
||||
0% {
|
||||
opacity: 0.25;
|
||||
transform: translateY(-8px);
|
||||
}
|
||||
|
||||
40% {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-expansioncard:hover {
|
||||
--__ac-expansioncard-border-color: highlight;
|
||||
|
||||
outline: 1px solid highlight;
|
||||
/* ---------------- ExpansionCard No Animation (defaultOpen) ---------------- */
|
||||
.navds-expansioncard--no-animation {
|
||||
& :is(.navds-expansioncard__content, .navds-expansioncard__content-inner) {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
@@ -1,121 +1,156 @@
|
||||
.navds-combobox__wrapper {
|
||||
--__ac-combobox-icon-size: 1.5rem;
|
||||
--__ac-combobox-wrapper-inner-padding: var(--a-spacing-2);
|
||||
--__ac-combobox-list-item-padding-block: var(--a-spacing-3);
|
||||
--__ac-combobox-list-item-padding-inline: var(--a-spacing-3);
|
||||
--__ac-combobox-border-width: 1px;
|
||||
--__ac-combobox-input-height: 2rem;
|
||||
--__axc-combobox-icon-size: 1.5rem;
|
||||
--__axc-combobox-wrapper-inner-padding: var(--ax-space-8);
|
||||
--__axc-combobox-list-item-padding-block: var(--ax-space-12);
|
||||
--__axc-combobox-list-item-padding-inline: var(--ax-space-12);
|
||||
--__axc-combobox-border-width: 1px;
|
||||
--__axc-combobox-input-height: 2rem;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
}
|
||||
|
||||
.navds-form-field:not(:is(.navds-combobox--disabled, .navds-combobox--readonly)) {
|
||||
& .navds-combobox__wrapper:hover {
|
||||
border-color: var(--ax-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-combobox__wrapper {
|
||||
--__ac-combobox-icon-size: 1.25rem;
|
||||
--__ac-combobox-wrapper-inner-padding: var(--a-spacing-1);
|
||||
--__ac-combobox-list-item-padding-block: var(--a-spacing-1-alt);
|
||||
--__ac-combobox-list-item-padding-inline: var(--a-spacing-2);
|
||||
--__ac-combobox-input-height: 1.5rem;
|
||||
--__axc-combobox-icon-size: 1.25rem;
|
||||
--__axc-combobox-wrapper-inner-padding: var(--ax-space-4);
|
||||
--__axc-combobox-list-item-padding-block: var(--ax-space-6);
|
||||
--__axc-combobox-list-item-padding-inline: var(--ax-space-8);
|
||||
--__axc-combobox-input-height: 1.5rem;
|
||||
}
|
||||
|
||||
.navds-combobox--disabled {
|
||||
opacity: 0.3;
|
||||
}
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
|
||||
.navds-combobox--disabled .navds-combobox__wrapper *:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
& .navds-combobox__wrapper {
|
||||
& *:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox--disabled .navds-text-field__input {
|
||||
border: 1px solid var(--a-border-default);
|
||||
}
|
||||
& .navds-combobox__selected-options {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.navds-combobox--disabled .navds-combobox__selected-options {
|
||||
pointer-events: none;
|
||||
& .navds-combobox--readonly {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox--readonly {
|
||||
pointer-events: none;
|
||||
|
||||
& .navds-combobox__selected-options {
|
||||
& .navds-chips__chip {
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
}
|
||||
}
|
||||
|
||||
& .navds-combobox__button-toggle-list {
|
||||
color: var(--ax-bg-moderate);
|
||||
}
|
||||
|
||||
& .navds-combobox__wrapper {
|
||||
border-color: var(--ax-border-subtle);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
& .navds-text-field__input,
|
||||
& .navds-combobox__input {
|
||||
background-color: var(--ax-bg-moderate);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox--readonly .navds-combobox__button-toggle-list {
|
||||
color: var(--a-gray-500);
|
||||
}
|
||||
|
||||
.navds-combobox--readonly .navds-text-field__input,
|
||||
.navds-combobox--readonly .navds-combobox__input {
|
||||
background-color: var(--a-surface-subtle);
|
||||
border-color: var(--a-border-subtle);
|
||||
}
|
||||
|
||||
.navds-combobox__button-clear svg,
|
||||
.navds-combobox__button-toggle-list svg,
|
||||
.navds-combobox__list svg {
|
||||
width: var(--__ac-combobox-icon-size);
|
||||
height: var(--__ac-combobox-icon-size);
|
||||
width: var(--__axc-combobox-icon-size);
|
||||
height: var(--__axc-combobox-icon-size);
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner.navds-text-field__input {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
padding-block: calc(var(--__ac-combobox-wrapper-inner-padding) - var(--__ac-combobox-border-width));
|
||||
padding-inline: var(--__ac-combobox-wrapper-inner-padding);
|
||||
.navds-combobox__wrapper-inner {
|
||||
border: 1px solid var(--ax-border-default);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
|
||||
&:has(.navds-combobox__input:focus-visible) {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
border-color: var(--ax-border-focus);
|
||||
}
|
||||
|
||||
&:has(.navds-combobox__input:focus-visible).navds-combobox__wrapper-inner--virtually-unfocused {
|
||||
outline: none;
|
||||
border-color: var(--ax-border-default);
|
||||
}
|
||||
|
||||
&.navds-text-field__input {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
padding-block: calc(var(--__axc-combobox-wrapper-inner-padding) - var(--__axc-combobox-border-width));
|
||||
padding-inline: var(--__axc-combobox-wrapper-inner-padding);
|
||||
}
|
||||
|
||||
& > :first-child {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
& > :last-child {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner > :first-child {
|
||||
flex: 2;
|
||||
}
|
||||
.navds-combobox--error {
|
||||
& .navds-combobox__wrapper-inner {
|
||||
border-color: var(--ax-border-danger);
|
||||
box-shadow: 0 0 0 1px var(--ax-border-danger);
|
||||
|
||||
.navds-combobox__wrapper-inner > :last-child {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:hover {
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.navds-combobox--error .navds-text-field__input:not(:hover, :disabled) {
|
||||
border-color: var(--ac-combobox-error-border, var(--a-border-danger));
|
||||
box-shadow: 0 0 0 1px var(--ac-combobox-error-border, var(--a-border-danger));
|
||||
}
|
||||
|
||||
.navds-combobox--error
|
||||
.navds-text-field__input:not(:hover, :disabled, .navds-combobox__wrapper-inner--virtually-unfocused):focus-within {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-combobox-error-border, var(--a-border-danger)),
|
||||
var(--a-shadow-focus);
|
||||
&:has(.navds-combobox__input:focus-visible) {
|
||||
border-color: var(--ax-border-danger);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__selected-options {
|
||||
gap: var(--__ac-combobox-wrapper-inner-padding);
|
||||
gap: 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navds-combobox__selected-options > li {
|
||||
margin: auto 0;
|
||||
border-radius: var(--a-border-radius-full);
|
||||
}
|
||||
& > li {
|
||||
margin: auto 0;
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
}
|
||||
|
||||
.navds-combobox__selected-options > li:last-of-type {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
& > li:last-of-type {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&[data-type="multiple"] {
|
||||
gap: var(--__axc-combobox-wrapper-inner-padding);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__selected-options--no-bg {
|
||||
font-family: inherit;
|
||||
font-size: var(--a-font-size-large);
|
||||
font-weight: var(--a-font-weight-regular);
|
||||
font-size: var(--ax-font-size-large);
|
||||
font-weight: var(--ax-font-weight-regular);
|
||||
letter-spacing: 0;
|
||||
line-height: var(--a-font-line-height-large);
|
||||
line-height: var(--ax-font-line-height-large);
|
||||
margin: 0;
|
||||
padding-left: 0.25rem;
|
||||
}
|
||||
@@ -129,85 +164,51 @@
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: var(--a-spacing-1);
|
||||
min-width: 10ch;
|
||||
width: 100%;
|
||||
height: var(--__ac-combobox-input-height);
|
||||
height: var(--__axc-combobox-input-height);
|
||||
background: var(--ax-bg-input);
|
||||
|
||||
&:focus-visible {
|
||||
outline: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.navds-combobox__selected-options > li:only-child > & {
|
||||
margin-left: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__input--hide-caret {
|
||||
caret-color: transparent;
|
||||
}
|
||||
|
||||
.navds-combobox__input:focus-visible {
|
||||
outline: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible) {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 3px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible).navds-combobox__wrapper-inner--virtually-unfocused {
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-combobox__input:focus {
|
||||
outline: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
.navds-combobox__input {
|
||||
&:focus {
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus) {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 3px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
.navds-combobox__wrapper-inner {
|
||||
&:has(.navds-combobox__input:focus) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus).navds-combobox__wrapper-inner--virtually-unfocused {
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
&:has(.navds-combobox__input:focus).navds-combobox__wrapper-inner--virtually-unfocused {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@supports not selector(:has) {
|
||||
.navds-combobox--focused .navds-combobox__wrapper-inner {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 3px solid transparent;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.navds-combobox--focused .navds-combobox__wrapper-inner.navds-combobox__wrapper-inner--virtually-unfocused {
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__button-clear {
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
color: var(--ac-combobox-clear-icon, var(--a-text-subtle));
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-combobox__input::-webkit-search-cancel-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-combobox__button-toggle-list {
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
color: var(--a-text-default);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
color: var(--ax-text-default);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@@ -216,33 +217,13 @@
|
||||
border: none;
|
||||
font-size: 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-combobox__button-clear:active:hover,
|
||||
.navds-combobox__button-toggle-list:active:hover {
|
||||
color: var(--ac-combobox-clear-icon-active, var(--a-text-action));
|
||||
}
|
||||
&:hover {
|
||||
color: var(--ax-text-accent);
|
||||
|
||||
.navds-combobox__button-clear:hover,
|
||||
.navds-combobox__button-toggle-list:hover {
|
||||
color: var(--ac-combobox-clear-icon-hover, var(--a-text-action-selected));
|
||||
}
|
||||
|
||||
.navds-combobox__button-toggle-list:focus-visible {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default) inset,
|
||||
var(--a-shadow-focus);
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-combobox__button-toggle-list:focus {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default) inset,
|
||||
var(--a-shadow-focus);
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: none;
|
||||
&:active {
|
||||
color: var(--ax-text-accent-strong);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,34 +231,30 @@
|
||||
|
||||
.navds-combobox__list {
|
||||
max-height: 290px;
|
||||
overflow-y: auto;
|
||||
overflow: clip;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: var(--a-z-index-popover);
|
||||
top: calc(100% + var(--a-spacing-2));
|
||||
border: 1px solid var(--ac-combobox-list-border-color, var(--a-border-divider));
|
||||
z-index: 10;
|
||||
top: calc(100% + var(--ax-space-8));
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: var(--a-shadow-small);
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
background-color: var(--ac-combobox-list-bg, var(--a-surface-default));
|
||||
color: var(--ac-combobox-list-text, var(--a-text-default));
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
background-color: var(--ax-bg-raised);
|
||||
color: var(--ax-text-default);
|
||||
overscroll-behavior: contain;
|
||||
box-shadow: var(--ax-shadow-dialog);
|
||||
|
||||
& .navds-combobox__list-options {
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__list--closed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-combobox__list_non-selectables {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.navds-combobox__list-item,
|
||||
.navds-combobox__list-item--loading,
|
||||
.navds-combobox__list-item--no-options,
|
||||
@@ -285,28 +262,32 @@
|
||||
.navds-combobox__list-item--max-selected {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
padding-block: var(--__ac-combobox-list-item-padding-block);
|
||||
padding-inline: var(--__ac-combobox-list-item-padding-inline);
|
||||
width: 100%;
|
||||
background-color: var(--ac-combobox-list-item-bg, var(--a-surface-default));
|
||||
padding-block: var(--__axc-combobox-list-item-padding-block);
|
||||
padding-inline: var(--__axc-combobox-list-item-padding-inline);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
border: 0;
|
||||
margin-inline: var(--ax-space-8);
|
||||
margin-block: var(--ax-space-4);
|
||||
scroll-margin-block: 8px; /* outline + outline-offset + margin-block */
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--no-options {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--loading {
|
||||
justify-content: center;
|
||||
background-color: var(--ac-combobox-list-item-loading-bg, var(--a-surface-default));
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--max-selected {
|
||||
background: var(--ac-combobox-list-item-max-selected-bg, var(--a-surface-info-subtle));
|
||||
border-start-start-radius: calc(var(--a-border-radius-medium) - 1px);
|
||||
border-start-end-radius: calc(var(--a-border-radius-medium) - 1px);
|
||||
border: 1px solid var(--ac-combobox-list-item-max-selected-border, var(--a-border-info));
|
||||
}
|
||||
|
||||
.navds-combobox__list_non-selectables:hover {
|
||||
cursor: default;
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px solid var(--ax-border-subtle);
|
||||
padding-block: var(--ax-space-8);
|
||||
line-height: var(--ax-font-line-height-large);
|
||||
}
|
||||
|
||||
/* ul-list and selectable li-items */
|
||||
@@ -314,70 +295,82 @@
|
||||
.navds-combobox__list-options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
display: inherit;
|
||||
flex-direction: inherit;
|
||||
gap: inherit;
|
||||
background-color: inherit;
|
||||
align-items: flex-start;
|
||||
align-items: stretch;
|
||||
padding: 0;
|
||||
padding-block: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--focus,
|
||||
.navds-combobox__list--with-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));
|
||||
.navds-combobox__list-item--focus {
|
||||
cursor: pointer;
|
||||
border-left: 4px solid var(--ac-combobox-list-item-hover-border-left, var(--a-border-strong));
|
||||
padding-inline-start: calc(var(--__ac-combobox-list-item-padding-inline) - 4px);
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.navds-combobox__list-item[data-no-focus="true"] {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.4;
|
||||
.navds-combobox__list-item {
|
||||
user-select: none;
|
||||
|
||||
&[data-no-focus="true"] {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
& mark {
|
||||
background-color: transparent;
|
||||
font-weight: var(--ax-font-weight-bold);
|
||||
}
|
||||
|
||||
& svg {
|
||||
color: var(--ax-text-accent);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--selected {
|
||||
background-color: var(--ac-combobox-list-item-selected-bg, var(--a-surface-selected));
|
||||
}
|
||||
background-color: var(--ax-bg-accent-moderate-pressedA);
|
||||
|
||||
.navds-combobox__list-item--selected p {
|
||||
font-weight: var(--a-font-weight-bold);
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--selected.navds-combobox__list-item--focus,
|
||||
.navds-combobox__list--with-hover .navds-combobox__list-item--selected:hover {
|
||||
background-color: var(--ac-combobox-list-item-selected-hover-bg, var(--a-surface-action-subtle-hover));
|
||||
border-left: 4px solid var(--ac-combobox-list-item-selected-hover-border-left, var(--a-border-focus));
|
||||
& p {
|
||||
font-weight: var(--ax-font-weight-bold);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--new-option {
|
||||
border-bottom: 1px solid var(--a-border-divider);
|
||||
background: var(--a-surface-neutral-subtle);
|
||||
border-bottom: 1px solid var(--ax-border-accent-subtleA);
|
||||
border-radius: 0;
|
||||
background: var(--ax-bg-accent-moderateA);
|
||||
cursor: pointer;
|
||||
justify-content: flex-start;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
margin: 0;
|
||||
margin-block: calc(var(--ax-space-4) * -1);
|
||||
padding-block: var(--ax-space-16);
|
||||
|
||||
.navds-combobox__list--with-hover .navds-combobox__list-item--new-option:hover {
|
||||
border-bottom: 1px solid var(--a-border-divider);
|
||||
background: var(--a-surface-neutral-subtle-hover);
|
||||
& svg {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
&:only-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--new-option--focus {
|
||||
box-shadow:
|
||||
var(--a-shadow-focus) inset,
|
||||
var(--a-border-action) 0 0 0 5px inset;
|
||||
border-radius: calc(var(--a-border-radius-medium) - 1px);
|
||||
}
|
||||
border-radius: calc(var(--ax-border-radius-large) - 1px) calc(var(--ax-border-radius-large) - 1px) 0 0;
|
||||
|
||||
.navds-combobox__list-item mark {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
/* TODO: new option should get a wrapper div later to
|
||||
* style it properly with a nice rounded border radius
|
||||
* */
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: -2px;
|
||||
|
||||
&:only-child {
|
||||
border-radius: calc(var(--ax-border-radius-large) - 1px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
|
||||
@media (max-width: 479px) {
|
||||
.navds-combobox__button-toggle-list {
|
||||
right: 0.5rem;
|
||||
@@ -390,15 +383,11 @@
|
||||
}
|
||||
|
||||
.navds-combobox__selected-options {
|
||||
gap: var(--a-spacing-1);
|
||||
gap: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-combobox__button-clear:hover {
|
||||
color: highlight;
|
||||
}
|
||||
|
||||
.navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible) {
|
||||
outline-color: highlight;
|
||||
}
|
||||
@@ -416,12 +405,16 @@
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--selected {
|
||||
background-color: selecteditem;
|
||||
background-color: highlight;
|
||||
color: selecteditemtext;
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--selected > * {
|
||||
forced-color-adjust: none;
|
||||
& * {
|
||||
color: black;
|
||||
}
|
||||
|
||||
& > * {
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--selected.navds-combobox__list-item--focus,
|
||||
@@ -436,6 +429,30 @@
|
||||
|
||||
.navds-combobox__list-item--new-option--focus {
|
||||
outline: 2px solid highlight;
|
||||
outline-offset: -3px;
|
||||
outline-offset: 0;
|
||||
}
|
||||
|
||||
.navds-combobox--disabled {
|
||||
opacity: 1;
|
||||
|
||||
& * {
|
||||
border-color: graytext;
|
||||
color: graytext;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-combobox__list-item--new-option {
|
||||
svg {
|
||||
color: canvastext;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: highlight;
|
||||
|
||||
svg {
|
||||
color: highlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +1,49 @@
|
||||
.navds-error-summary {
|
||||
background-color: var(--ac-error-summary-bg, var(--a-surface-default));
|
||||
padding: var(--a-spacing-5);
|
||||
border: 4px solid var(--ac-error-summary-border, var(--a-border-danger));
|
||||
border-radius: var(--a-border-radius-large);
|
||||
}
|
||||
background-color: var(--ax-bg-default);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
border: 4px solid var(--ax-border-danger);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
outline-offset: 2px;
|
||||
|
||||
.navds-error-summary--small {
|
||||
padding: var(--a-spacing-3);
|
||||
}
|
||||
|
||||
.navds-error-summary__heading {
|
||||
scroll-margin-top: var(--a-spacing-6);
|
||||
}
|
||||
|
||||
.navds-error-summary--small .navds-error-summary__heading {
|
||||
scroll-margin-top: var(--a-spacing-4);
|
||||
}
|
||||
|
||||
.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);
|
||||
&:focus-visible,
|
||||
&:has(.navds-error-summary__heading:focus-visible) {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-error-summary:focus {
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-error-summary--small {
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
|
||||
& .navds-error-summary__heading {
|
||||
scroll-margin-top: var(--ax-space-16);
|
||||
}
|
||||
|
||||
& > .navds-error-summary__list {
|
||||
margin: var(--ax-space-8) 0;
|
||||
gap: var(--ax-space-8);
|
||||
padding-left: var(--ax-space-20);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-error-summary__heading {
|
||||
scroll-margin-top: var(--ax-space-24);
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-error-summary__list {
|
||||
margin: var(--a-spacing-3) 0;
|
||||
margin: var(--ax-space-12) 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-3);
|
||||
padding-left: var(--a-spacing-6);
|
||||
gap: var(--ax-space-12);
|
||||
padding-left: var(--ax-space-24);
|
||||
list-style: inherit;
|
||||
}
|
||||
|
||||
.navds-error-summary__list > * {
|
||||
color: var(--ac-error-summary-list-dot, var(--a-text-action));
|
||||
}
|
||||
|
||||
.navds-error-summary--small > .navds-error-summary__list {
|
||||
margin: var(--a-spacing-2) 0;
|
||||
gap: var(--a-spacing-2);
|
||||
padding-left: var(--a-spacing-5);
|
||||
}
|
||||
@@ -1,11 +1,3 @@
|
||||
[data-theme="dark"] {
|
||||
--__ac-form-description: var(--a-text-on-inverted);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--__ac-form-description: initial;
|
||||
}
|
||||
|
||||
.navds-fieldset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -14,11 +6,11 @@
|
||||
}
|
||||
|
||||
.navds-fieldset > :not(:first-child, :empty) {
|
||||
margin-top: var(--a-spacing-2);
|
||||
margin-top: var(--ax-space-8);
|
||||
}
|
||||
|
||||
.navds-fieldset__description {
|
||||
color: var(--ac-form-description, var(--__ac-form-description, var(--a-text-subtle)));
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-fieldset > .navds-fieldset__description:not(:empty) {
|
||||
@@ -40,7 +32,7 @@
|
||||
|
||||
.navds-fieldset:disabled > .navds-fieldset__legend,
|
||||
.navds-fieldset:disabled > .navds-fieldset__description {
|
||||
opacity: 0.3;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
|
||||
@@ -1,78 +1,74 @@
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* --------------------------- 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);
|
||||
--__axc-dropzone-background: var(--ax-bg-input);
|
||||
--__axc-dropzone-icon-padding: var(--ax-space-8);
|
||||
--__axc-dropzone-animation-length-long: 400ms;
|
||||
--__axc-dropzone-animation-length-short: 250ms;
|
||||
--__axc-dropzone-animation-ease-out: cubic-bezier(0.3, 1, 0.3, 1);
|
||||
--__axc-dropzone-animation-over-under: cubic-bezier(0.3, 1, 0.3, 1);
|
||||
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-4);
|
||||
gap: var(--ax-space-16);
|
||||
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);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
border: 1px dashed var(--ax-border-default);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
background-color: var(--__axc-dropzone-background);
|
||||
color: var(--ax-text-default);
|
||||
transition: background-color var(--__axc-dropzone-animation-length-short) var(--__axc-dropzone-animation-ease-out);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover:not([data-disabled="true"]) {
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
|
||||
& > .navds-dropzone__area-button {
|
||||
color: var(--ax-text-accent-strong);
|
||||
background-color: var(--ax-bg-accent-moderate-hover);
|
||||
box-shadow: inset 0 0 0 2px var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
}
|
||||
|
||||
&:active .navds-dropzone__area-button {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
color: var(--ax-text-accent-contrast);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&[data-disabled="true"] {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.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--dragging {
|
||||
& > .navds-dropzone__area {
|
||||
--__axc-dropzone-background: var(--ax-bg-input);
|
||||
}
|
||||
|
||||
.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);
|
||||
& > .navds-dropzone__area::after {
|
||||
color: var(--ax-text-accent-strong);
|
||||
background-color: var(--ax-bg-accent-moderateA);
|
||||
content: "";
|
||||
inset: 0;
|
||||
margin: -1px;
|
||||
border: 1px dashed var(--ax-border-accent-strong);
|
||||
position: absolute;
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
backdrop-filter: blur(8px);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
animation: akselDropzoneDragoverAnimation var(--__axc-dropzone-animation-length-short)
|
||||
var(--__axc-dropzone-animation-ease-out);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes akselDropzoneDragoverAnimation {
|
||||
0% {
|
||||
-webkit-backdrop-filter: blur(0);
|
||||
backdrop-filter: blur(0);
|
||||
background-color: var(--a-surface-transparent);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
70% {
|
||||
@@ -81,54 +77,41 @@
|
||||
}
|
||||
|
||||
100% {
|
||||
background-color: var(--a-surface-hover);
|
||||
background-color: var(--ax-bg-accent-moderateA);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-dropzone__area-icon {
|
||||
display: grid;
|
||||
padding: var(--__ac-dropzone-icon-padding);
|
||||
padding: var(--__axc-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--error > .navds-dropzone__area {
|
||||
border-color: transparent;
|
||||
outline: 2px solid var(--ax-border-danger);
|
||||
outline-offset: -1px;
|
||||
}
|
||||
|
||||
.navds-dropzone__area-release {
|
||||
top: var(--__ac-dropzone-padding);
|
||||
top: var(--ax-space-16);
|
||||
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);
|
||||
top var(--__axc-dropzone-animation-length-long) var(--__axc-dropzone-animation-over-under),
|
||||
transform var(--__axc-dropzone-animation-length-long) var(--__axc-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);
|
||||
padding: var(--__axc-dropzone-icon-padding);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
transition:
|
||||
background-color 300ms var(--__ac-dropzone-animation-ease-out),
|
||||
font-size 300ms var(--__ac-dropzone-animation-ease-out);
|
||||
background-color 300ms var(--__axc-dropzone-animation-ease-out),
|
||||
font-size 300ms var(--__axc-dropzone-animation-ease-out);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
@@ -142,52 +125,64 @@
|
||||
}
|
||||
|
||||
.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);
|
||||
transition: visibility var(--__axc-dropzone-animation-length-long) var(--__axc-dropzone-animation-over-under);
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.navds-dropzone--dragging .navds-dropzone__area-release {
|
||||
color: var(--a-text-action-selected);
|
||||
color: var(--ax-text-accent-strong);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.navds-dropzone__area-disabled {
|
||||
color: var(--a-text-subtle);
|
||||
color: var(--ax-text-subtle);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
gap: var(--a-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
}
|
||||
|
||||
/**
|
||||
* FileUpload.Item
|
||||
*/
|
||||
/* ----------------------------- FileUpload Item ---------------------------- */
|
||||
.navds-file-upload :is(ul, li),
|
||||
ul:has(> li.navds-file-item),
|
||||
li.navds-file-item {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-file-item__inner {
|
||||
outline: 1px solid var(--a-border-subtle);
|
||||
background-color: var(--ax-bg-raised);
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
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);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
display: flex;
|
||||
gap: var(--a-spacing-3);
|
||||
gap: var(--ax-space-12);
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.navds-file-item--error > .navds-file-item__inner {
|
||||
outline: 2px solid var(--a-surface-danger);
|
||||
outline: 2px solid var(--ax-border-danger);
|
||||
}
|
||||
|
||||
.navds-file-item__icon {
|
||||
background-color: var(--a-surface-neutral-subtle);
|
||||
color: var(--a-icon-default);
|
||||
border-radius: var(--a-border-radius-full);
|
||||
min-height: 3rem;
|
||||
min-width: 3rem;
|
||||
background-color: var(--ax-bg-moderateA);
|
||||
color: var(--ax-text-default);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
min-height: 2.5rem;
|
||||
min-width: 2.5rem;
|
||||
margin-top: var(--ax-space-2);
|
||||
display: grid;
|
||||
place-content: center;
|
||||
transition: background-color 250ms cubic-bezier(0, 0.3, 0.15, 1);
|
||||
|
||||
& > svg {
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-file-item__icon--loading {
|
||||
@@ -203,28 +198,28 @@
|
||||
}
|
||||
|
||||
.navds-file-item__error {
|
||||
color: var(--a-text-danger);
|
||||
color: var(--ax-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 {
|
||||
grid-template-rows: 1fr;
|
||||
padding-top: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-file-item__error-content {
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
gap: var(--a-spacing-1);
|
||||
gap: var(--ax-space-4);
|
||||
|
||||
& > svg {
|
||||
flex-shrink: 0;
|
||||
height: 1rem;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,17 @@
|
||||
.navds-form-progress__bar {
|
||||
margin-bottom: var(--a-spacing-2);
|
||||
margin-bottom: var(--ax-space-8);
|
||||
}
|
||||
|
||||
.navds-form-progress__button {
|
||||
&:focus-visible {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&[data-state="open"] {
|
||||
& svg {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-progress__button[data-state="closed"] .navds-form-progress__btn-txt-hide,
|
||||
@@ -7,46 +19,39 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-form-progress__button:hover svg {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
.navds-form-progress__button[data-state="open"] svg {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
|
||||
.navds-form-progress__button[data-state="open"]:hover svg {
|
||||
transform: translateY(-1px) rotate(-180deg);
|
||||
}
|
||||
|
||||
.navds-form-progress__collapsible {
|
||||
display: grid;
|
||||
grid-template-rows: 0fr;
|
||||
overflow: hidden;
|
||||
transition: grid-template-rows 0.3s cubic-bezier(0.3, 0, 0.15, 1);
|
||||
}
|
||||
transition: grid-template-rows 250ms cubic-bezier(0.2, 0, 0, 1);
|
||||
|
||||
.navds-form-progress__collapsible[hidden] {
|
||||
display: grid;
|
||||
}
|
||||
&[hidden] {
|
||||
display: grid !important;
|
||||
}
|
||||
|
||||
.navds-form-progress__collapsible[data-state="open"] {
|
||||
grid-template-rows: 1fr;
|
||||
&[data-state="open"] {
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-progress__collapsible-content {
|
||||
min-height: 0;
|
||||
transition: visibility 0.3s;
|
||||
opacity: 0.01;
|
||||
visibility: hidden;
|
||||
transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
|
||||
transition-duration: 250ms;
|
||||
transition-property: opacity, visibility;
|
||||
}
|
||||
|
||||
.navds-form-progress__collapsible[data-state="open"] .navds-form-progress__collapsible-content {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.navds-form-progress__stepper {
|
||||
border: 2px solid var(--a-border-subtle);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
padding: var(--a-spacing-2) var(--a-spacing-4);
|
||||
margin-top: var(--a-spacing-1);
|
||||
border: 1px solid var(--ax-border-subtle);
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
margin-top: var(--ax-space-4);
|
||||
background: var(--ax-bg-raised);
|
||||
}
|
||||
@@ -1,54 +1,54 @@
|
||||
.navds-form-summary {
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--a-border-subtle);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
background: var(--a-surface-default);
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
background: var(--ax-bg-raised);
|
||||
}
|
||||
|
||||
.navds-form-summary__header {
|
||||
background-color: var(--a-surface-subtle);
|
||||
padding: var(--a-spacing-4) var(--a-spacing-6);
|
||||
background: var(--ax-bg-moderateA);
|
||||
padding: var(--ax-space-16) var(--ax-space-24);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 0 var(--a-spacing-2);
|
||||
gap: 0 var(--ax-space-12);
|
||||
}
|
||||
|
||||
@media (max-width: 479px) {
|
||||
.navds-form-summary__header {
|
||||
padding: var(--a-spacing-3) var(--a-spacing-4);
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-summary__edit {
|
||||
flex-shrink: 0;
|
||||
margin-top: var(--a-spacing-1);
|
||||
margin-top: var(--ax-space-4);
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.navds-form-summary > .navds-form-summary__answers {
|
||||
border-top: 1px solid var(--a-border-subtle);
|
||||
border-top: 1px solid var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
.navds-form-summary__answers {
|
||||
padding: var(--a-spacing-5) var(--a-spacing-6) var(--a-spacing-6);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 479px) {
|
||||
.navds-form-summary__answers {
|
||||
padding: var(--a-spacing-4);
|
||||
padding: var(--ax-space-16);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-summary__answer:not(:last-child) {
|
||||
margin-bottom: var(--a-spacing-4);
|
||||
padding-bottom: var(--a-spacing-4);
|
||||
border-bottom: 1px solid var(--a-border-divider);
|
||||
margin-bottom: var(--ax-space-16);
|
||||
padding-bottom: var(--ax-space-16);
|
||||
border-bottom: 1px solid var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
.navds-form-summary__answer:has(.navds-form-summary__answer) {
|
||||
padding-bottom: var(--a-spacing-6);
|
||||
padding-bottom: var(--ax-space-24);
|
||||
}
|
||||
|
||||
.navds-form-summary__answer:has(.navds-form-summary__answer):last-child {
|
||||
@@ -57,22 +57,27 @@
|
||||
|
||||
@media (max-width: 479px) {
|
||||
.navds-form-summary__answer:not(:last-child) {
|
||||
margin-bottom: var(--a-spacing-3);
|
||||
padding-bottom: var(--a-spacing-3);
|
||||
margin-bottom: var(--ax-space-12);
|
||||
padding-bottom: var(--ax-space-12);
|
||||
}
|
||||
|
||||
.navds-form-summary__answer:has(.navds-form-summary__answer) {
|
||||
padding-bottom: var(--a-spacing-5);
|
||||
padding-bottom: var(--ax-space-20);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-summary__value:first-of-type {
|
||||
margin-top: var(--a-spacing-1);
|
||||
margin-top: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-form-summary__value :where(.navds-form-summary__answers) {
|
||||
margin-top: var(--a-spacing-2);
|
||||
padding: var(--a-spacing-4);
|
||||
background: var(--a-surface-selected);
|
||||
border-radius: var(--a-border-radius-large);
|
||||
.navds-form-summary__value .navds-form-summary__answers {
|
||||
margin-top: var(--ax-space-8);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
background: var(--ax-bg-info-moderateA);
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
border: 1px solid var(--ax-border-info-subtleA);
|
||||
|
||||
& .navds-form-summary__answer {
|
||||
border-color: var(--ax-border-info-subtleA);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,16 @@
|
||||
[data-theme="dark"] {
|
||||
--__ac-form-description: var(--a-text-on-inverted);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--__ac-form-description: initial;
|
||||
}
|
||||
|
||||
.navds-form-field {
|
||||
display: grid;
|
||||
justify-items: start;
|
||||
gap: var(--a-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
}
|
||||
|
||||
.navds-form-field__description {
|
||||
margin-top: -0.375rem;
|
||||
color: var(--ac-form-description, var(--__ac-form-description, var(--a-text-subtle)));
|
||||
}
|
||||
|
||||
.navds-form-field .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-file-item .navds-error-message::before {
|
||||
content: "•";
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-form-field--disabled {
|
||||
opacity: 0.3;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@@ -40,7 +19,7 @@
|
||||
}
|
||||
|
||||
.navds-form-field__subdescription {
|
||||
color: var(--ac-form-subdescription, var(--a-text-subtle));
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-form-field--readonly > :where(.navds-form-field__label) {
|
||||
@@ -48,8 +27,8 @@
|
||||
}
|
||||
|
||||
.navds-form-field__readonly-icon {
|
||||
margin-top: var(--a-spacing-05);
|
||||
margin-right: var(--a-spacing-2);
|
||||
margin-top: var(--ax-space-2);
|
||||
margin-right: var(--ax-space-4);
|
||||
flex-shrink: 0;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
@layer aksel.forms.base, aksel.forms.component;
|
||||
|
||||
@import "./fieldset.darkside.css" layer(aksel.forms.base);
|
||||
@import "./file-upload.darkside.css" layer(aksel.forms.component);
|
||||
@import "./form.darkside.css" layer(aksel.forms.component);
|
||||
@import "./error-summary.darkside.css" layer(aksel.forms.component);
|
||||
@import "./confirmation-panel.darkside.css" layer(aksel.forms.component);
|
||||
@import "./radio-checkbox.darkside.css" layer(aksel.forms.component);
|
||||
@import "./select.darkside.css" layer(aksel.forms.component);
|
||||
@import "./switch.darkside.css" layer(aksel.forms.component);
|
||||
@import "./text-field.darkside.css" layer(aksel.forms.component);
|
||||
@import "./textarea.darkside.css" layer(aksel.forms.component);
|
||||
@import "./search.darkside.css" layer(aksel.forms.component);
|
||||
@import "./combobox.darkside.css" layer(aksel.forms.component);
|
||||
@import "./form-summary.darkside.css" layer(aksel.forms.component);
|
||||
@import "./form-progress.darkside.css" layer(aksel.forms.component);
|
||||
@import "./fieldset.darkside.css";
|
||||
@import "./file-upload.darkside.css";
|
||||
@import "./form.darkside.css";
|
||||
@import "./error-summary.darkside.css";
|
||||
@import "./confirmation-panel.darkside.css";
|
||||
@import "./radio-checkbox.darkside.css";
|
||||
@import "./select.darkside.css";
|
||||
@import "./switch.darkside.css";
|
||||
@import "./text-field.darkside.css";
|
||||
@import "./textarea.darkside.css";
|
||||
@import "./search.darkside.css";
|
||||
@import "./combobox.darkside.css";
|
||||
@import "./form-summary.darkside.css";
|
||||
@import "./form-progress.darkside.css";
|
||||
@@ -18,30 +18,28 @@
|
||||
|
||||
.navds-checkbox__label,
|
||||
.navds-radio__label {
|
||||
padding: var(--a-spacing-3) 0;
|
||||
padding: var(--ax-space-12) 0;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
gap: var(--a-spacing-2);
|
||||
gap: var(--ax-space-8);
|
||||
|
||||
--__ac-radio-checkbox-readonly-bg: var(--a-surface-subtle);
|
||||
--__ac-radio-checkbox-readonly-border: var(--a-border-subtle);
|
||||
--__axc-radio-checkbox-readonly-bg: var(--ax-bg-moderate);
|
||||
--__axc-radio-checkbox-readonly-border: var(--ax-border-subtle);
|
||||
}
|
||||
|
||||
.navds-checkbox__label::before,
|
||||
.navds-radio__label::before {
|
||||
content: "";
|
||||
background-color: var(--ac-radio-checkbox-bg, var(--a-surface-default));
|
||||
border-radius: var(--a-border-radius-small);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
background-color: var(--ax-bg-input);
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-border, var(--a-border-default));
|
||||
width: calc(1.5rem - 0.25rem);
|
||||
height: calc(1.5rem - 0.25rem);
|
||||
margin-block: 2px;
|
||||
margin-inline: 2px;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
border: 2px solid var(--ax-border-default);
|
||||
}
|
||||
|
||||
.navds-radio__label::before {
|
||||
border-radius: var(--a-border-radius-full);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
}
|
||||
|
||||
.navds-checkbox__content,
|
||||
@@ -61,38 +59,27 @@
|
||||
|
||||
.navds-checkbox--small > .navds-checkbox__label,
|
||||
.navds-radio--small > .navds-radio__label {
|
||||
padding: var(--a-spacing-1-alt) 0;
|
||||
padding: var(--ax-space-6) 0;
|
||||
}
|
||||
|
||||
.navds-checkbox--small > .navds-checkbox__label::before,
|
||||
.navds-radio--small > .navds-radio__label::before {
|
||||
width: calc(1.25rem - 0.25rem);
|
||||
height: calc(1.25rem - 0.25rem);
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.navds-checkbox__input:focus + .navds-checkbox__label::before,
|
||||
.navds-radio__input:focus + .navds-radio__label::before {
|
||||
outline: 2px solid transparent;
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-border, var(--a-border-default)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
|
||||
.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-hover)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
|
||||
.navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(var(--a-spacing-1-alt), -50%);
|
||||
background-color: var(--ac-radio-checkbox-bg, var(--a-surface-default));
|
||||
transform: translate(var(--ax-space-6), -50%);
|
||||
background-color: var(--ax-bg-default);
|
||||
width: 0.75rem;
|
||||
height: 0.25rem;
|
||||
border-radius: 1px;
|
||||
@@ -104,13 +91,13 @@
|
||||
}
|
||||
|
||||
.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));
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
border-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
|
||||
.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(:checked, :indeterminate):not(:disabled):hover + .navds-checkbox__label::before {
|
||||
border-color: var(--ax-bg-accent-strong-hover);
|
||||
background-color: var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
|
||||
.navds-checkbox__input:where(:not(:checked)) + .navds-checkbox__label > .navds-checkbox__icon {
|
||||
@@ -118,10 +105,10 @@
|
||||
}
|
||||
|
||||
.navds-checkbox__input:checked + .navds-checkbox__label > .navds-checkbox__icon {
|
||||
color: var(--ac-radio-checkbox-bg, var(--a-surface-default));
|
||||
color: var(--ax-bg-default);
|
||||
position: absolute;
|
||||
height: 1.5rem;
|
||||
transform: translate(var(--a-spacing-1-alt));
|
||||
transform: translate(var(--ax-space-6));
|
||||
pointer-events: none;
|
||||
|
||||
/* Fixed edcase where when using in shadow-dom, svg will not center */
|
||||
@@ -143,78 +130,49 @@
|
||||
background-position: 0.25rem center;
|
||||
}
|
||||
|
||||
.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-selected)),
|
||||
0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
}
|
||||
|
||||
.navds-radio__input:checked + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
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-selected));
|
||||
background-color: var(--ax-bg-input);
|
||||
border: 8px solid var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-radio__input:checked:focus + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
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);
|
||||
.navds-radio--small > .navds-radio__input:checked + .navds-radio__label::before {
|
||||
border-width: 6px;
|
||||
}
|
||||
|
||||
.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-hover));
|
||||
}
|
||||
|
||||
.navds-checkbox__input:hover:not(:disabled, :checked, :indeterminate, :focus) + .navds-checkbox__label::before,
|
||||
.navds-radio__input:hover:not(:disabled, :checked, :focus) + .navds-radio__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
|
||||
color: var(--ax-text-accent-strong);
|
||||
}
|
||||
|
||||
.navds-checkbox__input:hover:not(:disabled, :checked, :indeterminate) + .navds-checkbox__label::before,
|
||||
.navds-radio__input:hover:not(:disabled, :checked) + .navds-radio__label::before {
|
||||
background-color: var(--ac-radio-checkbox-action-hover-bg, var(--a-surface-action-subtle));
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
background-color: var(--ax-bg-accent-moderate-hoverA);
|
||||
}
|
||||
|
||||
.navds-checkbox--error > .navds-checkbox__input:not(:hover, :disabled, :checked, :indeterminate) + .navds-checkbox__label::before,
|
||||
.navds-radio--error > .navds-radio__input:not(:hover, :disabled, :checked) + .navds-radio__label::before {
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger));
|
||||
.navds-checkbox--error > .navds-checkbox__input:not(:disabled, :checked, :indeterminate) + .navds-checkbox__label::before,
|
||||
.navds-radio--error > .navds-radio__input:not(:disabled, :checked) + .navds-radio__label::before {
|
||||
border-color: var(--ax-border-danger);
|
||||
}
|
||||
|
||||
.navds-checkbox--error
|
||||
> .navds-checkbox__input:focus:not(:hover, :disabled, :checked, :indeterminate)
|
||||
+ .navds-checkbox__label::before,
|
||||
.navds-radio--error > .navds-radio__input:focus:not(:hover, :disabled, :checked) + .navds-radio__label::before {
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
.navds-checkbox--error > .navds-checkbox__input:not(:disabled, :checked, :indeterminate):hover + .navds-checkbox__label::before,
|
||||
.navds-radio--error > .navds-radio__input:not(:disabled, :checked):hover + .navds-radio__label::before {
|
||||
background-color: var(--ax-bg-danger-moderate-hoverA);
|
||||
border-color: var(--ax-border-danger-strong);
|
||||
}
|
||||
|
||||
.navds-checkbox--error
|
||||
> .navds-checkbox__input:hover:not(:disabled, :checked, :indeterminate, :focus)
|
||||
+ .navds-checkbox__label::before,
|
||||
.navds-radio--error > .navds-radio__input:hover:not(:disabled, :checked, :focus) + .navds-radio__label::before {
|
||||
background-color: var(--ac-radio-checkbox-error-hover-bg, var(--a-surface-danger-subtle));
|
||||
box-shadow: 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger));
|
||||
.navds-checkbox--error > .navds-checkbox__input:is(:checked, :indeterminate):not(:disabled) + .navds-checkbox__label::before {
|
||||
background-color: var(--ax-bg-danger-strong-pressed);
|
||||
border-color: var(--ax-bg-danger-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-checkbox--error
|
||||
> .navds-checkbox__input:focus:hover:not(:disabled, :checked, :indeterminate)
|
||||
+ .navds-checkbox__label::before,
|
||||
.navds-radio--error > .navds-radio__input:focus:hover:not(:disabled, :checked) + .navds-radio__label::before {
|
||||
background-color: var(--ac-radio-checkbox-error-hover-bg, var(--a-surface-danger-subtle));
|
||||
box-shadow:
|
||||
0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger)),
|
||||
0 0 0 4px var(--a-border-focus);
|
||||
.navds-radio--error > .navds-radio__input:checked + .navds-radio__label::before {
|
||||
border-color: var(--ax-bg-danger-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-checkbox--disabled,
|
||||
.navds-radio--disabled {
|
||||
opacity: 0.3;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
}
|
||||
|
||||
.navds-checkbox--disabled > .navds-checkbox__input,
|
||||
@@ -236,85 +194,65 @@
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:hover + .navds-checkbox__label,
|
||||
.navds-radio--readonly > .navds-radio__input:hover + .navds-radio__label {
|
||||
color: var(--a-text-default);
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:not(:disabled, :checked, :indeterminate) + .navds-checkbox__label::before,
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:hover:not(:checked, :indeterminate, :focus) + .navds-checkbox__label::before,
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:not(:disabled) + .navds-checkbox__label::before,
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:hover .navds-checkbox__label::before,
|
||||
.navds-radio--readonly > .navds-radio__input:not(:disabled, :checked) + .navds-radio__label::before,
|
||||
.navds-radio--readonly > .navds-radio__input:hover:not(:checked, :focus) + .navds-radio__label::before {
|
||||
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
||||
box-shadow: 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
||||
background-color: var(--__axc-radio-checkbox-readonly-bg);
|
||||
border-color: var(--__axc-radio-checkbox-readonly-border);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:focus + .navds-checkbox__label::before,
|
||||
.navds-radio--readonly > .navds-radio__input:focus + .navds-radio__label::before {
|
||||
--__ac-radio-checkbox-readonly-border: var(--a-border-subtle), var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label::before {
|
||||
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
||||
box-shadow: 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:where(:checked, :indeterminate) + .navds-checkbox__label::before {
|
||||
border-color: var(--__axc-radio-checkbox-readonly-border);
|
||||
background-color: var(--__axc-radio-checkbox-readonly-bg);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label > .navds-checkbox__icon {
|
||||
color: var(--a-icon-subtle);
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-radio--readonly > .navds-radio__input:checked + .navds-radio__label::before {
|
||||
background-color: var(--a-icon-subtle);
|
||||
background-color: var(--ax-bg-strong);
|
||||
border-width: 0;
|
||||
box-shadow:
|
||||
0 0 0 2px var(--__ac-radio-checkbox-readonly-border),
|
||||
inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-bg);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
|
||||
box-shadow: 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
|
||||
background-color: var(--__ac-radio-checkbox-readonly-bg);
|
||||
inset 0 0 0 2px var(--ax-border-subtle),
|
||||
inset 0 0 0 8px var(--ax-bg-moderate);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
||||
background-color: var(--a-icon-subtle);
|
||||
background-color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-checkbox__input:focus + .navds-checkbox__label::before,
|
||||
.navds-radio__input:focus + .navds-radio__label::before {
|
||||
outline-color: highlight;
|
||||
}
|
||||
|
||||
.navds-checkbox,
|
||||
.navds-radio {
|
||||
--__ac-radio-checkbox-high-contrast-bg: field;
|
||||
--__ac-radio-checkbox-high-contrast-text: fieldtext;
|
||||
--__ac-radio-checkbox-high-contrast-highlight: highlight;
|
||||
--__axc-radio-checkbox-high-contrast-bg: field;
|
||||
--__axc-radio-checkbox-high-contrast-text: fieldtext;
|
||||
--__axc-radio-checkbox-high-contrast-highlight: highlight;
|
||||
|
||||
/* TODO: Consider adding this to global scope */
|
||||
--ax-border-focus: Highlight;
|
||||
}
|
||||
|
||||
.navds-checkbox__label::before,
|
||||
.navds-radio__label::before {
|
||||
border: 1px solid var(--__ac-radio-checkbox-high-contrast-text);
|
||||
background-color: var(--__ac-radio-checkbox-high-contrast-bg);
|
||||
border: 1px solid var(--__axc-radio-checkbox-high-contrast-text);
|
||||
background-color: var(--__axc-radio-checkbox-high-contrast-bg);
|
||||
}
|
||||
|
||||
.navds-checkbox__input:checked + .navds-checkbox__label > .navds-checkbox__icon {
|
||||
color: var(--__ac-radio-checkbox-high-contrast-text);
|
||||
color: var(--__axc-radio-checkbox-high-contrast-text);
|
||||
}
|
||||
|
||||
.navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
||||
background-color: var(--__ac-radio-checkbox-high-contrast-text);
|
||||
background-color: var(--__axc-radio-checkbox-high-contrast-text);
|
||||
}
|
||||
|
||||
.navds-radio__input:checked + .navds-radio__label::before {
|
||||
border: 1px solid var(--__ac-radio-checkbox-high-contrast-text);
|
||||
outline: 3px solid var(--__ac-radio-checkbox-high-contrast-bg);
|
||||
outline-offset: -4px;
|
||||
background-color: var(--__ac-radio-checkbox-high-contrast-text);
|
||||
}
|
||||
|
||||
.navds-radio__input:checked:focus + .navds-radio__label::before {
|
||||
border: 1px solid var(--__ac-radio-checkbox-high-contrast-bg);
|
||||
outline: 2px solid highlight;
|
||||
outline-offset: 2px;
|
||||
border: 6px solid var(--__axc-radio-checkbox-high-contrast-text);
|
||||
}
|
||||
|
||||
:not(.navds-checkbox--readonly) > .navds-checkbox__input:hover:not(:disabled) + .navds-checkbox__label,
|
||||
@@ -322,32 +260,25 @@
|
||||
color: highlight;
|
||||
}
|
||||
|
||||
.navds-checkbox__input:focus + .navds-checkbox__label::before {
|
||||
outline: 2px solid var(--__ac-radio-checkbox-high-contrast-highlight);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label::before {
|
||||
border: 1px solid var(--__ac-radio-checkbox-high-contrast-text);
|
||||
background-color: var(--__ac-radio-checkbox-high-contrast-bg);
|
||||
border: 1px solid var(--__axc-radio-checkbox-high-contrast-text);
|
||||
background-color: var(--__axc-radio-checkbox-high-contrast-bg);
|
||||
}
|
||||
|
||||
.navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
|
||||
background-color: var(--__ac-radio-checkbox-high-contrast-text);
|
||||
background-color: var(--__axc-radio-checkbox-high-contrast-text);
|
||||
}
|
||||
|
||||
.navds-radio--readonly > .navds-radio__input:checked + .navds-radio__label::before {
|
||||
border: 1px solid var(--__ac-radio-checkbox-high-contrast-text);
|
||||
outline: 3px solid var(--__ac-radio-checkbox-high-contrast-bg);
|
||||
outline-offset: -4px;
|
||||
background-color: var(--__ac-radio-checkbox-high-contrast-text);
|
||||
border-width: 6px;
|
||||
}
|
||||
|
||||
.navds-checkbox--disabled,
|
||||
.navds-radio--disabled {
|
||||
opacity: 1;
|
||||
|
||||
--__ac-radio-checkbox-high-contrast-bg: field;
|
||||
--__ac-radio-checkbox-high-contrast-text: graytext;
|
||||
--__axc-radio-checkbox-high-contrast-bg: field;
|
||||
--__axc-radio-checkbox-high-contrast-text: graytext;
|
||||
}
|
||||
|
||||
:is(.navds-checkbox--disabled, .navds-radio--disabled) :is(.navds-checkbox__label, .navds-radio__label) {
|
||||
|
||||
@@ -1,19 +1,3 @@
|
||||
[data-theme="dark"] {
|
||||
--__ac-search-button-border: var(--a-border-on-inverted);
|
||||
--__ac-search-button-border-hover: var(--a-blue-200);
|
||||
--__ac-search-clear-icon: var(--a-white);
|
||||
--__ac-search-clear-icon-hover: var(--a-blue-200);
|
||||
--__ac-search-error-border: var(--a-red-300);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--__ac-search-button-border: initial;
|
||||
--__ac-search-button-border-hover: initial;
|
||||
--__ac-search-clear-icon: initial;
|
||||
--__ac-search-clear-icon-hover: initial;
|
||||
--__ac-search-error-border: initial;
|
||||
}
|
||||
|
||||
.navds-search {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -25,204 +9,146 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.navds-search--with-size :where(.navds-search__wrapper-inner) {
|
||||
width: inherit;
|
||||
.navds-search--with-size {
|
||||
& .navds-search__wrapper-inner {
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
& .navds-search__wrapper {
|
||||
width: fit-content;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-search__wrapper {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
|
||||
/* We have to outline the whole container to include the Search-buttons */
|
||||
&:has(.navds-search__input:focus-visible) {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------ Search input ------------------------------ */
|
||||
.navds-search__input {
|
||||
padding-right: var(--a-spacing-10);
|
||||
}
|
||||
padding-right: var(--ax-space-40);
|
||||
|
||||
.navds-form-field--small .navds-search__input {
|
||||
padding-right: var(--a-spacing-8);
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&.navds-search__input--primary,
|
||||
&.navds-search__input--secondary {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-right: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-search__input--simple {
|
||||
padding-left: var(--a-spacing-11);
|
||||
padding-left: var(--ax-space-40);
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-search__input--simple {
|
||||
padding-left: var(--a-spacing-7);
|
||||
}
|
||||
/* ------------------------------ Search sizing ----------------------------- */
|
||||
.navds-form-field--small {
|
||||
& .navds-search__input {
|
||||
padding-right: var(--ax-space-28);
|
||||
}
|
||||
|
||||
.navds-search__input:not(.navds-search__input--simple) {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
& .navds-search__input--simple {
|
||||
padding-left: var(--ax-space-28);
|
||||
}
|
||||
|
||||
& .navds-search__search-icon {
|
||||
left: var(--ax-space-4);
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
& .navds-search__button-clear {
|
||||
right: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------- Search icon ------------------------------ */
|
||||
.navds-search__search-icon {
|
||||
position: absolute;
|
||||
left: var(--a-spacing-3);
|
||||
left: var(--ax-space-8);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
pointer-events: none;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-search__search-icon {
|
||||
left: var(--a-spacing-2);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.navds-search__button-clear {
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
color: var(--ac-search-clear-icon, var(--__ac-search-clear-icon, var(--a-text-default)));
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 1.25rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-search__button-clear {
|
||||
right: 0.5rem;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.navds-search__button-clear:hover {
|
||||
color: var(--ac-search-clear-icon-hover, var(--__ac-search-clear-icon-hover, var(--a-text-action-hover)));
|
||||
}
|
||||
|
||||
.navds-search__button-clear:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-search__button-clear:focus {
|
||||
outline: 2px solid transparent;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
.navds-search--disabled & {
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------- Search Clear-button -------------------------- */
|
||||
.navds-search__button-clear {
|
||||
position: absolute;
|
||||
right: var(--ax-space-8);
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
/* ------------------------------ Search Button ----------------------------- */
|
||||
.navds-search__button-search {
|
||||
flex-shrink: 0;
|
||||
min-width: 4rem;
|
||||
min-height: 2rem;
|
||||
border-radius: 0;
|
||||
border-top-right-radius: var(--a-border-radius-medium);
|
||||
border-bottom-right-radius: var(--a-border-radius-medium);
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-search__button-search svg {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-search__button-search {
|
||||
min-width: 2.5rem;
|
||||
border-top-right-radius: var(--ax-border-radius-medium);
|
||||
border-bottom-right-radius: var(--ax-border-radius-medium);
|
||||
}
|
||||
|
||||
.navds-search__button-search.navds-button--secondary {
|
||||
box-shadow:
|
||||
-1px 0 0 0 var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset,
|
||||
0 1px 0 0 var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset,
|
||||
0 -1px 0 0 var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset;
|
||||
}
|
||||
--__axc-button-border-width: 1px;
|
||||
--__axc-button-border-color: var(--ax-border-default);
|
||||
|
||||
.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-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;
|
||||
}
|
||||
|
||||
.navds-search__wrapper-inner:focus-within + .navds-search__button-search.navds-button--secondary:hover {
|
||||
z-index: auto;
|
||||
}
|
||||
|
||||
.navds-search__button-search.navds-button--secondary:focus-visible {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset,
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
.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-hover))) inset,
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
.navds-search__button-search.navds-button--secondary:focus-visible:active {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-search-button-focus-active-border, var(--a-surface-default)) inset,
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-search__button-search.navds-button--secondary:focus {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-search-button-border, var(--__ac-search-button-border, var(--a-border-default))) inset,
|
||||
var(--a-shadow-focus);
|
||||
&:not(:hover, :active) {
|
||||
background-color: var(--ax-bg-input);
|
||||
}
|
||||
|
||||
.navds-search__button-search.navds-button--secondary:focus:hover {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-search-button-border-hover, var(--__ac-search-button-border-hover, var(--a-border-action))) inset,
|
||||
var(--a-shadow-focus);
|
||||
&:hover:not(:disabled) {
|
||||
--__axc-button-border-color: var(--ax-border-accent-strong);
|
||||
}
|
||||
|
||||
.navds-search__button-search.navds-button--secondary:focus:active {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--ac-search-button-focus-active-border, var(--a-surface-default)) inset,
|
||||
var(--a-shadow-focus);
|
||||
&:active:not(:disabled) {
|
||||
--__axc-button-border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
/* Error-handling */
|
||||
.navds-search--error .navds-search__input:not(:hover, :disabled) {
|
||||
border-color: var(--ac-search-error-border, var(--__ac-search-error-border, var(--a-border-danger)));
|
||||
box-shadow: inset 0 0 0 1px var(--ac-search-error-border, var(--__ac-search-error-border, var(--a-border-danger)));
|
||||
/* Special-case where we hover/focus input, and want the secondary-button to match input-border */
|
||||
.navds-search:not(.navds-search--error, .navds-search--disabled)
|
||||
.navds-search__wrapper:has(.navds-search__input:is(:hover, :focus-visible))
|
||||
.navds-search__button-search.navds-button--secondary:not(:hover, :active) {
|
||||
--__axc-button-border-color: var(--ax-border-accent-strong);
|
||||
}
|
||||
|
||||
.navds-search--error .navds-search__input:focus-visible:not(:hover, :disabled) {
|
||||
/* --------------------------- Search Error-state --------------------------- */
|
||||
.navds-search--error .navds-search__input:not(:disabled) {
|
||||
border-color: var(--ax-border-danger);
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--ac-search-error-border, var(--__ac-search-error-border, var(--a-border-danger))),
|
||||
var(--a-shadow-focus);
|
||||
inset -2px 0 0 0 var(--ax-border-danger),
|
||||
inset 0 0 0 1px var(--ax-border-danger);
|
||||
|
||||
&.navds-search__input--simple {
|
||||
box-shadow: inset 0 0 0 1px var(--ax-border-danger);
|
||||
}
|
||||
}
|
||||
|
||||
/* Focus layering */
|
||||
/* -------------------------- Search Focus layering ------------------------- */
|
||||
.navds-search__input:focus-visible,
|
||||
.navds-search__button-clear,
|
||||
.navds-search__button-search:focus-visible {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-search--error .navds-search__input:focus:not(:hover, :disabled) {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--ac-search-error-border, var(--__ac-search-error-border, var(--a-border-danger))),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
/* -------------------------- Search disabled state ------------------------- */
|
||||
|
||||
.navds-search__input:focus,
|
||||
.navds-search__button-search:focus {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-modal {
|
||||
outline: 2px solid transparent;
|
||||
}
|
||||
|
||||
.navds-search__button-clear:hover {
|
||||
color: highlight;
|
||||
/* We can't re-use disabled-state for form-fields since opacity multiplies on search-button */
|
||||
.navds-search--disabled {
|
||||
.navds-search__input {
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
@@ -1,48 +1,34 @@
|
||||
.navds-select__input {
|
||||
appearance: none;
|
||||
background-color: var(--ac-select-bg, var(--a-surface-default));
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
border: 1px solid var(--ac-select-border, var(--a-border-default));
|
||||
color: var(--ac-select-text, var(--a-text-default));
|
||||
background-color: var(--ax-bg-input);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
border: 1px solid var(--ax-border-default);
|
||||
color: var(--ax-text-default);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 3rem;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding: 0.5rem;
|
||||
padding-right: 2rem;
|
||||
}
|
||||
padding: var(--ax-space-8);
|
||||
padding-right: var(--ax-space-40);
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-select__input.navds-select__input.navds-select__input {
|
||||
background-color: ButtonFace;
|
||||
border-color: ButtonText;
|
||||
color: ButtonText;
|
||||
forced-color-adjust: none;
|
||||
box-shadow: none;
|
||||
&:hover {
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.navds-select__input.navds-select__input.navds-select__input:focus-visible {
|
||||
outline: 2px solid highlight;
|
||||
&:focus {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-select__input:hover {
|
||||
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);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-select__input:focus {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
@media (forced-colors: active) {
|
||||
& {
|
||||
background-color: ButtonFace;
|
||||
border-color: ButtonText;
|
||||
color: ButtonText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,66 +36,86 @@
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
color: var(--a-text-default);
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
/* ------------------------------- Select Icon ------------------------------ */
|
||||
.navds-select__chevron {
|
||||
position: absolute;
|
||||
font-size: 1.5rem;
|
||||
right: var(--a-spacing-2);
|
||||
right: var(--ax-space-8);
|
||||
pointer-events: none;
|
||||
align-self: center;
|
||||
color: var(--ac-select-text, var(--a-text-default));
|
||||
}
|
||||
color: var(--ax-text-default);
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.navds-select__chevron {
|
||||
color: ButtonText;
|
||||
@media (forced-colors: active) {
|
||||
& {
|
||||
color: ButtonText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-select__input {
|
||||
min-height: 2rem;
|
||||
padding: 0 var(--a-spacing-8) 0 var(--a-spacing-2);
|
||||
/* ------------------------------ Select Sizing ----------------------------- */
|
||||
.navds-form-field--small {
|
||||
& .navds-select__input {
|
||||
min-height: 2rem;
|
||||
padding-block: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-select__chevron {
|
||||
right: var(--a-spacing-1-alt);
|
||||
/* --------------------------- Select Error-state --------------------------- */
|
||||
.navds-select--error {
|
||||
> * select {
|
||||
box-shadow: 0 0 0 1px var(--ax-border-danger);
|
||||
border-color: var(--ax-border-danger);
|
||||
}
|
||||
|
||||
> * select:hover,
|
||||
> * select:focus {
|
||||
box-shadow: 0 0 0 1px var(--ax-border-danger-strong);
|
||||
border-color: var(--ax-border-danger-strong);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Error handling
|
||||
*/
|
||||
.navds-select--error > * select:not(:hover, :focus, :disabled) {
|
||||
box-shadow: 0 0 0 1px var(--ac-select-error-border, var(--a-surface-danger));
|
||||
border-color: var(--ac-select-error-border, var(--a-surface-danger));
|
||||
}
|
||||
|
||||
/**
|
||||
Disabled
|
||||
*/
|
||||
/* ----------------------------- Select disabled ---------------------------- */
|
||||
.navds-select__input:disabled {
|
||||
background-color: var(--ac-select-bg, var(--a-surface-default));
|
||||
border: 1px solid var(--ac-select-border, var(--a-border-default));
|
||||
background-color: var(--ax-bg-input);
|
||||
border: 1px solid var(--ax-border-default);
|
||||
box-shadow: none;
|
||||
cursor: not-allowed;
|
||||
|
||||
/* Chrome-fix */
|
||||
opacity: 1;
|
||||
color: var(--a-text-default);
|
||||
color: var(--ax-text-default);
|
||||
|
||||
& > option {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
& + .navds-select__chevron {
|
||||
color: GrayText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Chrome-fix */
|
||||
.navds-select__input:disabled > option {
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
/* ----------------------------- Select Readonly ---------------------------- */
|
||||
.navds-select--readonly {
|
||||
& .navds-select__input {
|
||||
background-color: var(--ax-bg-moderate);
|
||||
border-color: var(--ax-border-subtleA);
|
||||
cursor: default;
|
||||
|
||||
.navds-select--readonly .navds-select__input {
|
||||
background-color: var(--a-surface-subtle);
|
||||
border-color: var(--a-border-subtle);
|
||||
cursor: default;
|
||||
}
|
||||
@media (forced-colors: active) {
|
||||
&:is(:hover, :focus) {
|
||||
background-color: ButtonFace;
|
||||
border-color: ButtonText;
|
||||
color: ButtonText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-select--readonly .navds-select__chevron {
|
||||
color: var(--a-gray-500);
|
||||
& .navds-select__chevron {
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
}
|
||||
@@ -4,16 +4,11 @@
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.navds-switch--right {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.navds-switch--small {
|
||||
position: relative;
|
||||
min-height: 2rem;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
/* ------------------------------ Switch Input ------------------------------ */
|
||||
.navds-switch__input {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
@@ -22,17 +17,17 @@
|
||||
height: 3rem;
|
||||
opacity: 0;
|
||||
top: 0;
|
||||
|
||||
.navds-switch--small > & {
|
||||
height: 2rem;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-switch--small > .navds-switch__input {
|
||||
height: 2rem;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
/* -------------------------- Switch content/label -------------------------- */
|
||||
.navds-switch__label-wrapper {
|
||||
cursor: pointer;
|
||||
color: var(--a-text-default);
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.navds-switch__content {
|
||||
@@ -40,140 +35,141 @@
|
||||
flex-direction: column;
|
||||
gap: 0.125rem;
|
||||
padding: 0.75rem 0 0.75rem 3.25rem;
|
||||
|
||||
.navds-switch--right & {
|
||||
padding: 0.75rem 3.25rem 0.75rem 0;
|
||||
}
|
||||
|
||||
.navds-switch--small & {
|
||||
padding: calc(var(--ax-space-8) - var(--ax-space-2)) 0 calc(var(--ax-space-8) - var(--ax-space-2)) 3.25rem;
|
||||
}
|
||||
|
||||
.navds-switch--right.navds-switch--small & {
|
||||
padding: calc(var(--ax-space-8) - var(--ax-space-2)) 3.25rem calc(var(--ax-space-8) - var(--ax-space-2)) 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-switch--right > .navds-switch__label-wrapper > .navds-switch__content {
|
||||
padding: 0.75rem 3.25rem 0.75rem 0;
|
||||
}
|
||||
|
||||
.navds-switch--small > .navds-switch__label-wrapper > .navds-switch__content {
|
||||
padding: calc(var(--a-spacing-2) - var(--a-spacing-05)) 0 calc(var(--a-spacing-2) - var(--a-spacing-05)) 3.25rem;
|
||||
}
|
||||
|
||||
.navds-switch--right.navds-switch--small > .navds-switch__label-wrapper > .navds-switch__content {
|
||||
padding: calc(var(--a-spacing-2) - var(--a-spacing-05)) 3.25rem calc(var(--a-spacing-2) - var(--a-spacing-05)) 0;
|
||||
}
|
||||
|
||||
.navds-switch--with-description,
|
||||
.navds-switch--small > .navds-switch__label-wrapper > .navds-switch--with-description {
|
||||
.navds-switch--with-description {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.navds-switch__input:hover ~ .navds-switch__label-wrapper,
|
||||
.navds-switch__label-wrapper:hover {
|
||||
color: var(--ac-switch-action, var(--a-surface-action-selected));
|
||||
color: var(--ax-text-accent-strong);
|
||||
}
|
||||
|
||||
.navds-switch__input:disabled:hover ~ .navds-switch__label-wrapper {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
/* ------------------------------ Switch Track ------------------------------ */
|
||||
.navds-switch__track {
|
||||
width: 2.75rem;
|
||||
height: 1.5rem;
|
||||
background-color: var(--ac-switch-bg, var(--a-surface-neutral));
|
||||
background-color: var(--ax-bg-input);
|
||||
position: absolute;
|
||||
top: var(--a-spacing-3);
|
||||
top: var(--ax-space-12);
|
||||
left: 0;
|
||||
border-radius: var(--a-border-radius-full);
|
||||
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
border: 2px solid var(--ax-border-default);
|
||||
transition-property: background-color, border-color;
|
||||
transition-duration: 100ms;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
.navds-switch--small > .navds-switch__track {
|
||||
top: var(--a-spacing-1);
|
||||
}
|
||||
.navds-switch--small > & {
|
||||
top: var(--ax-space-4);
|
||||
}
|
||||
|
||||
.navds-switch--right > .navds-switch__input,
|
||||
.navds-switch--right > .navds-switch__track {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
.navds-switch__input:checked ~ & {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
border-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-switch__input:checked ~ .navds-switch__track {
|
||||
background-color: var(--ac-switch-checked-bg, var(--a-surface-action-selected));
|
||||
}
|
||||
.navds-switch__input:hover:checked ~ & {
|
||||
background-color: var(--ax-bg-accent-strong-hover);
|
||||
border-color: var(--ax-bg-accent-strong-hover);
|
||||
}
|
||||
|
||||
.navds-switch__input:hover ~ .navds-switch__track {
|
||||
background-color: var(--ac-switch-hover-bg, var(--a-surface-neutral-hover));
|
||||
}
|
||||
.navds-switch__input:disabled ~ & {
|
||||
background-color: var(--ax-bg-input);
|
||||
border-color: var(--ax-border-default);
|
||||
}
|
||||
|
||||
.navds-switch__input:hover:checked ~ .navds-switch__track {
|
||||
background-color: var(--ac-switch-checked-hover-bg, var(--a-surface-action-selected-hover));
|
||||
}
|
||||
.navds-switch__input:checked:disabled ~ & {
|
||||
background-color: var(--ax-bg-accent-strong-pressed);
|
||||
border-color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
|
||||
.navds-switch__input:disabled ~ .navds-switch__track {
|
||||
background-color: var(--ac-switch-bg, var(--a-surface-neutral));
|
||||
}
|
||||
|
||||
.navds-switch__input:checked:disabled ~ .navds-switch__track {
|
||||
background-color: var(--ac-switch-checked-bg, var(--a-border-action-selected));
|
||||
}
|
||||
|
||||
.navds-switch__input:focus-visible ~ .navds-switch__track {
|
||||
outline: 2px solid transparent;
|
||||
outline-offset: 2px;
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-switch__input:focus ~ .navds-switch__track {
|
||||
outline: 2px solid transparent;
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-surface-default),
|
||||
var(--a-shadow-focus);
|
||||
.navds-switch__input:focus-visible ~ & {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Thumb */
|
||||
/* ------------------------------ Switch Thumb ------------------------------ */
|
||||
.navds-switch__thumb {
|
||||
background-color: var(--ac-switch-thumb-bg, var(--a-surface-default));
|
||||
color: var(--ac-switch-thumb-icon, var(--a-icon-subtle));
|
||||
border-radius: var(--a-border-radius-full);
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
background-color: var(--ax-bg-strong);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
width: 1.125rem;
|
||||
height: 1.125rem;
|
||||
position: absolute;
|
||||
transform: translateX(0);
|
||||
left: var(--a-spacing-05);
|
||||
top: var(--a-spacing-05);
|
||||
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
left: 0.0625rem;
|
||||
top: 0.0625rem;
|
||||
|
||||
.navds-switch__input:checked ~ .navds-switch__track > & {
|
||||
background-color: var(--ax-bg-raised);
|
||||
transform: translateX(1.25rem);
|
||||
color: var(--ax-text-accent-strong);
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.navds-switch__input:checked ~ .navds-switch__track > & > .navds-switch__checkmark {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(1.25rem);
|
||||
color: var(--ac-switch-thumb-icon-checked, var(--a-icon-action-selected));
|
||||
.navds-switch__checkmark {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.navds-switch__input:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(0.125rem);
|
||||
.navds-switch__input:hover:not(:disabled) ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(0.0625rem);
|
||||
}
|
||||
|
||||
.navds-switch__input:checked:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(1.125rem);
|
||||
.navds-switch__input:checked:hover:not(:disabled) ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(1.19rem);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-switch__input:disabled:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(0);
|
||||
.navds-switch--right {
|
||||
width: auto;
|
||||
|
||||
& .navds-switch__input,
|
||||
& .navds-switch__track {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-switch__input:checked:disabled:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(1.25rem);
|
||||
}
|
||||
|
||||
/* Disabled */
|
||||
/* -------------------------- Switch Disabled-state ------------------------- */
|
||||
.navds-switch__input:disabled {
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.navds-switch--disabled:not(.navds-switch--loading) {
|
||||
opacity: 0.3;
|
||||
opacity: var(--ax-opacity-disabled);
|
||||
}
|
||||
|
||||
.navds-switch__input:disabled,
|
||||
@@ -181,47 +177,51 @@
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Readonly */
|
||||
.navds-switch--readonly > .navds-switch__track,
|
||||
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track,
|
||||
.navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track,
|
||||
.navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track {
|
||||
background-color: var(--a-surface-neutral-moderate);
|
||||
}
|
||||
|
||||
.navds-switch--readonly > .navds-switch__label-wrapper,
|
||||
.navds-switch--readonly > .navds-switch__input {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__label-wrapper,
|
||||
.navds-switch--readonly .navds-switch__label-wrapper:hover {
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
|
||||
.navds-switch--readonly .navds-switch__label {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.navds-switch--readonly .navds-switch__thumb {
|
||||
background-color: var(--a-surface-subtle);
|
||||
box-shadow: 0 0 0 2px var(--a-border-default);
|
||||
}
|
||||
|
||||
.navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb {
|
||||
color: var(--a-icon-subtle);
|
||||
}
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(0);
|
||||
/* -------------------------- Switch Readonly state ------------------------- */
|
||||
.navds-switch--readonly {
|
||||
& > .navds-switch__track,
|
||||
& > .navds-switch__input:hover ~ .navds-switch__track,
|
||||
& > .navds-switch__input:checked ~ .navds-switch__track,
|
||||
& > .navds-switch__input:checked:hover ~ .navds-switch__track {
|
||||
background-color: var(--ax-bg-moderate);
|
||||
border-color: var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
.navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(1.25rem);
|
||||
& > .navds-switch__label-wrapper,
|
||||
& > .navds-switch__input {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
& > .navds-switch__input:hover ~ .navds-switch__label-wrapper,
|
||||
& .navds-switch__label-wrapper:hover {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
& .navds-switch__label {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
& .navds-switch__thumb {
|
||||
background-color: var(--ax-bg-strong);
|
||||
}
|
||||
|
||||
& > .navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb {
|
||||
background-color: var(--ax-bg-strong);
|
||||
color: var(--ax-text-contrast);
|
||||
}
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
& > .navds-switch__input:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
& > .navds-switch__input:checked:hover ~ .navds-switch__track > .navds-switch__thumb {
|
||||
transform: translateX(1.25rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------ Switch Forced colors mode ----------------------- */
|
||||
@media (forced-colors: active) {
|
||||
.navds-switch__input:hover ~ .navds-switch__label-wrapper,
|
||||
.navds-switch__label-wrapper:hover {
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
.navds-switch__thumb,
|
||||
.navds-switch--readonly .navds-switch__thumb {
|
||||
background-color: fieldtext;
|
||||
background-color: fieldtext !important;
|
||||
}
|
||||
|
||||
.navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb,
|
||||
@@ -238,13 +238,6 @@
|
||||
color: field;
|
||||
}
|
||||
|
||||
.navds-switch__track {
|
||||
width: calc(2.75rem + 4px);
|
||||
height: calc(1.5rem + 4px);
|
||||
top: var(--a-spacing-3);
|
||||
border: 2px solid fieldtext;
|
||||
}
|
||||
|
||||
.navds-switch__input:focus-visible ~ .navds-switch__track {
|
||||
outline: 2px solid highlight;
|
||||
outline-offset: 2px;
|
||||
@@ -259,7 +252,7 @@
|
||||
}
|
||||
|
||||
.navds-switch--disabled:not(.navds-switch--loading) .navds-switch__track {
|
||||
border-color: graytext;
|
||||
border-color: graytext !important;
|
||||
}
|
||||
|
||||
.navds-switch--disabled:not(.navds-switch--loading) .navds-switch__label-wrapper,
|
||||
|
||||
@@ -1,107 +1,64 @@
|
||||
[data-theme="dark"] {
|
||||
--__ac-textfield-text: var(--a-text-on-inverted);
|
||||
--__ac-textfield-bg: var(--a-surface-inverted);
|
||||
--__ac-textfield-border: var(--a-border-on-inverted);
|
||||
--__ac-textfield-hover-border: var(--a-blue-200);
|
||||
--__ac-textfield-placeholder: var(--a-gray-500);
|
||||
--__ac-textfield-error-border: var(--a-red-300);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--__ac-textfield-text: initial;
|
||||
--__ac-textfield-bg: initial;
|
||||
--__ac-textfield-border: initial;
|
||||
--__ac-textfield-hover-border: initial;
|
||||
--__ac-textfield-placeholder: initial;
|
||||
--__ac-textfield-error-border: initial;
|
||||
}
|
||||
|
||||
.navds-text-field__input {
|
||||
appearance: none;
|
||||
padding: var(--a-spacing-2);
|
||||
background-color: var(--ac-textfield-bg, var(--__ac-textfield-bg, var(--a-surface-default)));
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
border: 1px solid var(--ac-textfield-border, var(--__ac-textfield-border, var(--a-border-default)));
|
||||
padding: var(--ax-space-8);
|
||||
background: var(--ax-bg-input);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
border: 1px solid var(--ax-border-default);
|
||||
min-height: 3rem;
|
||||
width: 100%;
|
||||
color: var(--ac-textfield-text, var(--__ac-textfield-text, var(--a-text-default)));
|
||||
}
|
||||
color: var(--ax-text-default);
|
||||
|
||||
.navds-text-field__input[size] {
|
||||
width: auto;
|
||||
}
|
||||
&:hover {
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
}
|
||||
|
||||
.navds-text-field__input::placeholder {
|
||||
color: var(--ac-textfield-placeholder, var(--__ac-textfield-placeholder, var(--a-text-subtle)));
|
||||
&:focus-visible {
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
background-color: var(--ax-bg-input);
|
||||
border-color: var(--ax-border-default);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
&[size] {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-text-field__input {
|
||||
padding: 0 var(--a-spacing-2);
|
||||
padding: 0 var(--ax-space-8);
|
||||
min-height: 2rem;
|
||||
}
|
||||
|
||||
.navds-text-field__input:hover {
|
||||
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) {
|
||||
.navds-text-field__input:focus {
|
||||
outline: none;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Error handling
|
||||
*/
|
||||
.navds-text-field--error > .navds-text-field__input:not(:hover, :disabled) {
|
||||
border-color: var(--ac-textfield-error-border, var(--__ac-textfield-error-border, var(--a-border-danger)));
|
||||
box-shadow: 0 0 0 1px var(--ac-textfield-error-border, var(--__ac-textfield-error-border, var(--a-border-danger)));
|
||||
}
|
||||
|
||||
.navds-text-field--error > .navds-text-field__input:focus-visible:not(:hover, :disabled) {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-border-danger),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-text-field--error > .navds-text-field__input:focus:not(:hover, :disabled) {
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-border-danger),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
/* Disabled handling */
|
||||
.navds-text-field__input:disabled {
|
||||
background-color: var(--ac-textfield-bg, var(--__ac-textfield-bg, var(--a-surface-default)));
|
||||
border-color: var(--ac-textfield-border, var(--__ac-textfield-border, var(--a-border-default)));
|
||||
box-shadow: none;
|
||||
cursor: not-allowed;
|
||||
.navds-text-field--error .navds-text-field__input:not(:disabled) {
|
||||
border-color: var(--ax-border-danger);
|
||||
box-shadow: 0 0 0 1px var(--ax-border-danger);
|
||||
}
|
||||
|
||||
.navds-text-field--readonly .navds-text-field__input {
|
||||
background-color: var(--a-surface-subtle);
|
||||
border-color: var(--a-border-subtle);
|
||||
background-color: var(--ax-bg-moderate);
|
||||
border-color: var(--ax-border-subtleA);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes default search icon
|
||||
*/
|
||||
.navds-text-field__input[type="search"]::-webkit-search-decoration,
|
||||
.navds-text-field__input[type="search"]::-webkit-search-cancel-button,
|
||||
.navds-text-field__input[type="search"]::-webkit-search-results-button,
|
||||
.navds-text-field__input[type="search"]::-webkit-search-results-decoration {
|
||||
-webkit-appearance: none;
|
||||
.navds-text-field__input[type="search"] {
|
||||
&::-webkit-search-decoration,
|
||||
&::-webkit-search-cancel-button,
|
||||
&::-webkit-search-results-button,
|
||||
&::-webkit-search-results-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
|
||||
@@ -1,73 +1,54 @@
|
||||
[data-theme="dark"] {
|
||||
--__ac-textarea-text: var(--a-text-on-inverted);
|
||||
--__ac-textarea-bg: var(--a-transparent);
|
||||
--__ac-textarea-border: var(--a-border-on-inverted);
|
||||
--__ac-textarea-hover-border: var(--a-blue-200);
|
||||
--__ac-textarea-placeholder: var(--a-gray-500);
|
||||
--__ac-textarea-error-border: var(--a-red-300);
|
||||
--__ac-textarea-counter-text: var(--a-gray-300);
|
||||
--__ac-textarea-counter-error-text: var(--a-red-300);
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--__ac-textarea-text: initial;
|
||||
--__ac-textarea-bg: initial;
|
||||
--__ac-textarea-border: initial;
|
||||
--__ac-textarea-hover-border: initial;
|
||||
--__ac-textarea-placeholder: initial;
|
||||
--__ac-textarea-error-border: initial;
|
||||
--__ac-textarea-counter-text: initial;
|
||||
--__ac-textarea-counter-error-text: initial;
|
||||
}
|
||||
|
||||
.navds-textarea__input {
|
||||
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
||||
height: var(--__ac-textarea-height);
|
||||
height: var(--__axc-textarea-height);
|
||||
appearance: none;
|
||||
padding: var(--a-spacing-2);
|
||||
background-color: var(--ac-textarea-bg, var(--__ac-textarea-bg, var(--a-surface-default)));
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
border: 1px solid var(--ac-textarea-border, var(--__ac-textarea-border, var(--a-border-default)));
|
||||
padding: var(--ax-space-8);
|
||||
background-color: var(--ax-bg-input);
|
||||
border-radius: var(--ax-border-radius-medium);
|
||||
border: 1px solid var(--ax-border-default);
|
||||
resize: none;
|
||||
width: 100%;
|
||||
display: block;
|
||||
color: var(--ac-textarea-text, var(--__ac-textarea-text, var(--a-text-default)));
|
||||
}
|
||||
color: var(--ax-text-default);
|
||||
|
||||
.navds-textarea__input::placeholder {
|
||||
color: var(--ac-textarea-placeholder, var(--__ac-textarea-placeholder, var(--a-text-subtle)));
|
||||
}
|
||||
&::placeholder {
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-textarea__input:hover {
|
||||
border-color: var(--ac-textarea-hover-border, var(--__ac-textarea-hover-border, var(--a-border-action-hover)));
|
||||
}
|
||||
&:hover {
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
}
|
||||
|
||||
.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) {
|
||||
.navds-textarea__input:focus {
|
||||
outline: 2px solid transparent;
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
box-shadow: var(--a-shadow-focus);
|
||||
border-color: var(--ax-border-accent-strong);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
background-color: var(--ax-bg-input);
|
||||
border-color: var(--ax-border-default);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.navds-form-field--small & {
|
||||
padding: var(--ax-space-6);
|
||||
}
|
||||
|
||||
.navds-textarea--readonly & {
|
||||
background-color: var(--ax-bg-moderate);
|
||||
border-color: var(--ax-border-subtleA);
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-form-field--small .navds-textarea__input {
|
||||
padding: var(--a-spacing-1-alt);
|
||||
}
|
||||
|
||||
.navds-textarea__counter {
|
||||
margin-top: -0.375rem;
|
||||
color: var(--ac-textarea-counter-text, var(--__ac-textarea-counter-text, var(--a-text-subtle)));
|
||||
margin-top: -0.25rem;
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-textarea__counter--error {
|
||||
color: var(--ac-textarea-counter-error-text, var(--__ac-textarea-counter-error-text, var(--a-text-danger)));
|
||||
color: var(--ax-text-danger);
|
||||
}
|
||||
|
||||
.navds-textarea__sr-counter {
|
||||
@@ -108,32 +89,9 @@
|
||||
scrollbar-gutter: stable; /* Needed to prevent scrollbar from appearing too early */
|
||||
}
|
||||
|
||||
/**
|
||||
Error handling
|
||||
*/
|
||||
.navds-textarea--error .navds-textarea__input:not(:hover, :focus-visible, :disabled) {
|
||||
box-shadow: 0 0 0 1px var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
|
||||
border-color: var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-textarea--error .navds-textarea__input:not(:hover, :focus, :disabled) {
|
||||
box-shadow: 0 0 0 1px var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
|
||||
border-color: var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
|
||||
}
|
||||
}
|
||||
|
||||
.navds-textarea__input:disabled {
|
||||
background-color: var(--ac-textarea-bg, var(--__ac-textarea-bg, var(--a-surface-default)));
|
||||
border-color: var(--ac-textarea-border, var(--__ac-textarea-border, var(--a-border-default)));
|
||||
box-shadow: none;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.navds-textarea--readonly .navds-textarea__input {
|
||||
background-color: var(--a-surface-subtle);
|
||||
border-color: var(--a-border-subtle);
|
||||
cursor: default;
|
||||
.navds-textarea--error .navds-textarea__input:not(:disabled) {
|
||||
box-shadow: 0 0 0 1px var(--ax-border-danger);
|
||||
border-color: var(--ax-border-danger);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
|
||||
@@ -1,20 +1,41 @@
|
||||
.navds-guide-panel {
|
||||
--__ac-guide-panel-guide-size: 4rem;
|
||||
--__axc-guide-panel-guide-size: 3.75rem;
|
||||
|
||||
position: relative;
|
||||
padding-top: calc(var(--__ac-guide-panel-guide-size) / 2);
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
|
||||
&[data-poster="true"],
|
||||
&[data-responsive="true"] {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&[data-poster="false"] {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
& {
|
||||
--__axc-guide-panel-guide-size: 5rem;
|
||||
}
|
||||
|
||||
&[data-responsive="true"] {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navds-guide {
|
||||
background: var(--ac-guide-panel-illustration-bg, var(--a-surface-alt-3-subtle));
|
||||
border: 2px solid var(--ac-guide-panel-border, var(--a-border-alt-3));
|
||||
border-radius: var(--a-border-radius-full);
|
||||
box-sizing: border-box;
|
||||
border: 2px solid var(--ax-border-info);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
width: var(--__ac-guide-panel-guide-size);
|
||||
height: var(--__ac-guide-panel-guide-size);
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: var(--__axc-guide-panel-guide-size);
|
||||
height: var(--__axc-guide-panel-guide-size);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.navds-guide svg,
|
||||
@@ -24,73 +45,70 @@
|
||||
}
|
||||
|
||||
.navds-guide-panel__content {
|
||||
background-color: var(--ac-guide-panel-bg, var(--a-surface-default));
|
||||
border: 2px solid var(--ac-guide-panel-border, var(--a-border-alt-3));
|
||||
border-radius: var(--a-border-radius-large);
|
||||
padding: var(--a-spacing-4);
|
||||
padding-top: var(--a-spacing-12);
|
||||
}
|
||||
background-color: var(--ax-bg-raised);
|
||||
border: 2px solid var(--ax-border-info);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
position: relative;
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.navds-guide-panel {
|
||||
--__ac-guide-panel-guide-size: 6.25rem;
|
||||
.navds-guide-panel:is([data-poster="true"], [data-responsive="true"]) > & {
|
||||
margin-top: var(--ax-space-20);
|
||||
}
|
||||
|
||||
.navds-guide-panel__content {
|
||||
padding: var(--a-spacing-8);
|
||||
padding-top: 4.25rem;
|
||||
.navds-guide-panel[data-poster="false"] > & {
|
||||
margin-left: var(--ax-space-20);
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.navds-guide-panel[data-responsive="true"] > & {
|
||||
margin-top: 0;
|
||||
margin-left: var(--ax-space-20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* not-poster */
|
||||
.navds-guide-panel__content-inner {
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
background-color: var(--ax-bg-raised);
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.navds-guide-panel--not-poster {
|
||||
padding-top: 0;
|
||||
padding-left: calc(var(--__ac-guide-panel-guide-size) / 2);
|
||||
}
|
||||
|
||||
.navds-guide-panel--not-poster .navds-guide {
|
||||
left: 0;
|
||||
top: var(--a-spacing-5);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.navds-guide-panel--not-poster .navds-guide-panel__content {
|
||||
padding: var(--a-spacing-4);
|
||||
padding-left: var(--a-spacing-10);
|
||||
min-height: calc(var(--__ac-guide-panel-guide-size) + var(--a-spacing-5) + var(--a-spacing-5));
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.navds-guide-panel--not-poster {
|
||||
--__ac-guide-panel-guide-size: 5rem;
|
||||
.navds-guide-panel[data-poster="false"] & {
|
||||
min-height: var(--__axc-guide-panel-guide-size);
|
||||
}
|
||||
|
||||
.navds-guide-panel--not-poster .navds-guide-panel__content {
|
||||
padding: var(--a-spacing-6);
|
||||
padding-left: var(--a-spacing-14);
|
||||
@media (min-width: 480px) {
|
||||
& {
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
}
|
||||
|
||||
.navds-guide-panel[data-responsive="true"] & {
|
||||
min-height: var(--__axc-guide-panel-guide-size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* responsive-poster (on desktop) */
|
||||
.navds-guide-panel__tail {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
|
||||
@media (min-width: 480px) {
|
||||
.navds-guide-panel--responsive-poster {
|
||||
--__ac-guide-panel-guide-size: 5rem;
|
||||
|
||||
padding-top: 0;
|
||||
padding-left: calc(var(--__ac-guide-panel-guide-size) / 2);
|
||||
.navds-guide-panel:is([data-poster="true"], [data-responsive="true"]) & {
|
||||
left: 50%;
|
||||
top: calc(var(--ax-space-16) * -1 - 2px);
|
||||
transform: translateX(-48%);
|
||||
}
|
||||
|
||||
.navds-guide-panel--responsive-poster .navds-guide {
|
||||
left: 0;
|
||||
top: var(--a-spacing-5);
|
||||
transform: none;
|
||||
.navds-guide-panel[data-poster="false"] & {
|
||||
top: calc(var(--__axc-guide-panel-guide-size) / 2);
|
||||
left: calc(var(--ax-space-20) * -1 - 2px);
|
||||
transform: translateY(-48%) rotateZ(-90deg) scaleX(-1);
|
||||
}
|
||||
|
||||
.navds-guide-panel--responsive-poster .navds-guide-panel__content {
|
||||
padding: var(--a-spacing-6);
|
||||
padding-left: var(--a-spacing-14);
|
||||
min-height: calc(var(--__ac-guide-panel-guide-size) + var(--a-spacing-5) + var(--a-spacing-5));
|
||||
@media (min-width: 480px) {
|
||||
.navds-guide-panel[data-responsive="true"] & {
|
||||
top: calc(var(--__axc-guide-panel-guide-size) / 2);
|
||||
left: calc(var(--ax-space-20) * -1 - 2px);
|
||||
transform: translateY(-48%) rotateZ(-90deg) scaleX(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,44 +3,24 @@
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
border-radius: var(--a-border-radius-full);
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: var(--ac-help-text-button-color, var(--a-surface-action));
|
||||
color: var(--ax-bg-accent-strong);
|
||||
font-size: 1.25rem;
|
||||
padding: calc(var(--a-spacing-1) / 2);
|
||||
}
|
||||
|
||||
.navds-help-text__button:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-border-focus),
|
||||
inset 0 0 0 1px var(--a-border-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-help-text__button:focus {
|
||||
outline: 2px solid transparent;
|
||||
box-shadow:
|
||||
0 0 0 1px var(--a-border-focus),
|
||||
inset 0 0 0 1px var(--a-border-focus);
|
||||
}
|
||||
padding: calc(var(--ax-space-4) / 2);
|
||||
}
|
||||
|
||||
.navds-help-text__icon {
|
||||
border-radius: var(--a-border-radius-full);
|
||||
}
|
||||
|
||||
.navds-help-text__popover > .navds-popover__arrow {
|
||||
background-color: var(--ac-help-text-popover-bg, var(--a-surface-info-subtle));
|
||||
border-radius: var(--ax-border-radius-full);
|
||||
}
|
||||
|
||||
.navds-help-text__popover.navds-popover {
|
||||
background-color: var(--ac-help-text-popover-bg, var(--a-surface-info-subtle));
|
||||
max-width: min(65ch, calc(100vw - 1.5rem));
|
||||
|
||||
--ac-popover-border: var(--a-border-info);
|
||||
background-color: var(--ax-bg-info-moderate);
|
||||
max-width: min(65ch, calc(100vw - var(--ax-space-24)));
|
||||
border-radius: var(--ax-border-radius-large);
|
||||
border: 1px solid var(--ax-border-info);
|
||||
}
|
||||
|
||||
.navds-help-text__icon--filled {
|
||||
@@ -53,21 +33,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));
|
||||
color: var(--ax-bg-accent-strong-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) {
|
||||
.navds-help-text__button:where(:focus) > .navds-help-text__icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navds-help-text__button:where(:focus) > .navds-help-text__icon--filled {
|
||||
display: inherit;
|
||||
}
|
||||
color: var(--ax-bg-accent-strong-pressed);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@import "baseline/index.css";
|
||||
@import "typography.css";
|
||||
@import "accordion.css";
|
||||
@import "alert.css";
|
||||
@import "button.css";
|
||||
@import "chat.css";
|
||||
@import "chips.css";
|
||||
@import "copybutton.css";
|
||||
@import "dropdown.css";
|
||||
@import "action-menu.css";
|
||||
@import "expansioncard.css";
|
||||
@import "guide-panel.css";
|
||||
@import "form/index.css";
|
||||
@import "help-text.css";
|
||||
@import "internalheader.css";
|
||||
@import "link.css";
|
||||
@import "loader.css";
|
||||
@import "modal.css";
|
||||
@import "pagination.css";
|
||||
@import "popover.css";
|
||||
@import "date.css";
|
||||
@import "tag.css";
|
||||
@import "timeline.css";
|
||||
@import "tooltip.css";
|
||||
@import "toggle-group.css";
|
||||
@import "panel.css";
|
||||
@import "link-panel.css";
|
||||
@import "read-more.css";
|
||||
@import "progress-bar.css";
|
||||
@import "skeleton.css";
|
||||
@import "stepper.css";
|
||||
@import "table.css";
|
||||
@import "tabs.css";
|
||||
@import "list.css";
|
||||
@import "primitives/index.css";
|
||||
@@ -1,30 +1,34 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
@layer aksel.reset, aksel.typography, aksel.theme, aksel.forms, aksel.components, aksel.layout, aksel.utilities;
|
||||
/* CSS is ordered by specificity, so that browsers without layers fall backs to good defaults */
|
||||
@layer aksel.reset, aksel.theming, aksel.baseline, aksel.print, aksel.typography, aksel.components, aksel.layout;
|
||||
|
||||
/* CSS foundations */
|
||||
@import "./baseline/reset.darkside.css" layer(aksel.reset);
|
||||
@import "./baseline/print.darkside.css" layer(aksel.reset);
|
||||
/* ----------------------------- CSS foundations ---------------------------- */
|
||||
@import "./baseline/fonts.darkside.css" layer(aksel.typography);
|
||||
@import "./baseline/theme.darkside.css" layer(aksel.theme);
|
||||
@import "./typography.darkside.css" layer(aksel.typography);
|
||||
@import "./baseline/utilities.darkside.css" layer(aksel.utilities);
|
||||
@import "./baseline/reset.darkside.css" layer(aksel.reset);
|
||||
@import "./baseline/tokens.darkside.css" layer(aksel.theming);
|
||||
@import "./baseline/baseline.darkside.css" layer(aksel.baseline);
|
||||
@import "./baseline/print.darkside.css" layer(aksel.print);
|
||||
|
||||
/* Test: Handles layers itself */
|
||||
@import "./form/index.css";
|
||||
@import "./primitives/index.css";
|
||||
|
||||
/* Theming */
|
||||
@import "@navikt/ds-tokens/dist/darkside/tokens.css" layer(aksel.theme);
|
||||
|
||||
/* Components */
|
||||
@import "../primitives/stack.css" layer(aksel.components);
|
||||
@import "./accordion.darkside.css" layer(aksel.components);
|
||||
/* ------------------------------- Components ------------------------------- */
|
||||
@import "./typography.darkside.css" layer(aksel.components);
|
||||
@import "./button.darkside.css" layer(aksel.components);
|
||||
@import "./chips.darkside.css" layer(aksel.components);
|
||||
|
||||
/**
|
||||
* Most components depend on typo-styles, so we import them first.
|
||||
*
|
||||
* `./form/index.css` edits the following components:
|
||||
* - Button
|
||||
* - Chips
|
||||
* To avoid specificity conflicts, we import those components before form.
|
||||
*/
|
||||
@import "./form/index.css" layer(aksel.components);
|
||||
@import "./accordion.darkside.css" layer(aksel.components);
|
||||
@import "./alert.darkside.css" layer(aksel.components);
|
||||
@import "./chat.darkside.css" layer(aksel.components);
|
||||
@import "./chips.darkside.css" layer(aksel.components);
|
||||
@import "./copybutton.darkside.css" layer(aksel.components);
|
||||
@import "./date.darkside.css" layer(aksel.components);
|
||||
@import "./dropdown.darkside.css" layer(aksel.components);
|
||||
@import "./action-menu.darkside.css" layer(aksel.components);
|
||||
@import "./expansioncard.darkside.css" layer(aksel.components);
|
||||
@@ -36,7 +40,6 @@
|
||||
@import "./modal.darkside.css" layer(aksel.components);
|
||||
@import "./pagination.darkside.css" layer(aksel.components);
|
||||
@import "./popover.darkside.css" layer(aksel.components);
|
||||
@import "./date.darkside.css" layer(aksel.components);
|
||||
@import "./tag.darkside.css" layer(aksel.components);
|
||||
@import "./timeline.darkside.css" layer(aksel.components);
|
||||
@import "./tooltip.darkside.css" layer(aksel.components);
|
||||
@@ -50,3 +53,7 @@
|
||||
@import "./table.darkside.css" layer(aksel.components);
|
||||
@import "./tabs.darkside.css" layer(aksel.components);
|
||||
@import "./list.darkside.css" layer(aksel.components);
|
||||
@import "./theme.darkside.css" layer(aksel.components);
|
||||
|
||||
/* --------------------------------- Layout --------------------------------- */
|
||||
@import "./primitives/index.css" layer(aksel.layout);
|
||||
@@ -1,10 +1,9 @@
|
||||
.navds-internalheader {
|
||||
display: flex;
|
||||
align-self: stretch;
|
||||
background: var(--ac-internalheader-bg, var(--a-surface-inverted));
|
||||
background: var(--ax-bg-raised);
|
||||
min-height: 3rem;
|
||||
|
||||
--navds-internalheader-focus: inset 0 0 0 2px var(--a-border-focus-on-inverted);
|
||||
border-bottom: 1px solid var(--ax-border-subtleA);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
@@ -13,18 +12,6 @@
|
||||
border: solid 1px ButtonText;
|
||||
color: ButtonText;
|
||||
}
|
||||
|
||||
.navds-internalheader a:focus-visible {
|
||||
box-shadow: none;
|
||||
outline: 2px solid highlight;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.navds-internalheader .navds-internalheader__button:focus-visible {
|
||||
box-shadow: none;
|
||||
outline: 2px solid highlight;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-internalheader__title {
|
||||
@@ -32,25 +19,34 @@
|
||||
overflow: visible;
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
font-weight: var(--a-font-weight-bold);
|
||||
font-weight: var(--ax-font-weight-bold);
|
||||
line-height: normal;
|
||||
text-align: left;
|
||||
padding: 0 var(--a-spacing-5) 0 var(--a-spacing-6);
|
||||
border-right: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
|
||||
padding-block: 0;
|
||||
padding-inline: var(--ax-space-24) var(--ax-space-20);
|
||||
border-right: 1px solid var(--ax-border-subtleA);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
margin: 0;
|
||||
color: var(--ac-internalheader-text, var(--a-text-on-inverted));
|
||||
}
|
||||
color: var(--ax-text-default);
|
||||
|
||||
button.navds-internalheader__title {
|
||||
cursor: pointer;
|
||||
&:is(button) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--ax-bg-moderate-hover);
|
||||
}
|
||||
|
||||
&:is(:hover, :active):not(button, a) {
|
||||
background: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-internalheader__user {
|
||||
padding: 0 var(--a-spacing-5);
|
||||
border-left: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
|
||||
padding: 0 var(--ax-space-20);
|
||||
border-left: 1px solid var(--ax-border-subtleA);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -58,7 +54,7 @@ button.navds-internalheader__title {
|
||||
.navds-internalheader__button {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0 var(--a-spacing-3);
|
||||
padding: 0 var(--ax-space-12);
|
||||
overflow: visible;
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
@@ -68,38 +64,38 @@ button.navds-internalheader__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-self: center;
|
||||
gap: var(--a-spacing-2);
|
||||
border-left: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
|
||||
color: var(--ac-internalheader-text, var(--a-text-on-inverted));
|
||||
}
|
||||
gap: var(--ax-space-8);
|
||||
border-left: 1px solid var(--ax-border-subtleA);
|
||||
color: var(--ax-text-default);
|
||||
|
||||
a.navds-internalheader__title:hover,
|
||||
button.navds-internalheader__title:hover,
|
||||
.navds-internalheader__button:hover {
|
||||
background-color: var(--ac-internalheader-hover-bg, var(--a-surface-inverted-hover));
|
||||
}
|
||||
|
||||
.navds-internalheader__title:focus-visible,
|
||||
.navds-internalheader__button:focus-visible {
|
||||
box-shadow: var(--navds-internalheader-focus);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-internalheader__title:focus,
|
||||
.navds-internalheader__button:focus {
|
||||
box-shadow: var(--navds-internalheader-focus);
|
||||
outline: none;
|
||||
&:hover {
|
||||
background: var(--ax-bg-moderate-hover);
|
||||
}
|
||||
}
|
||||
|
||||
a.navds-internalheader__title:active,
|
||||
button.navds-internalheader__title:active,
|
||||
.navds-internalheader__button:active {
|
||||
background-color: var(--ac-internalheader-active-bg, var(--a-surface-inverted-active));
|
||||
@media (forced-colors: active) {
|
||||
.navds-internalheader__button:hover {
|
||||
background-color: highlighttext;
|
||||
border-color: highlight;
|
||||
color: highlight;
|
||||
outline: 1px solid highlight;
|
||||
isolation: isolate;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-internalheader__title,
|
||||
.navds-internalheader__button {
|
||||
&:focus-visible {
|
||||
outline: 3px solid var(--ax-border-focus);
|
||||
outline-offset: -3px;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: var(--ax-bg-moderate-pressed);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-internalheader__user-button {
|
||||
padding-left: var(--a-spacing-5);
|
||||
gap: var(--a-spacing-4);
|
||||
padding-left: var(--ax-space-20);
|
||||
gap: var(--ax-space-16);
|
||||
}
|
||||
@@ -1,79 +1,63 @@
|
||||
.navds-link {
|
||||
color: var(--ac-link-text, var(--a-text-action));
|
||||
text-decoration: underline;
|
||||
color: var(--ax-text-accent);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-link.navds-link--inline-text {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.navds-link.navds-link--inline-text > svg {
|
||||
/* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties */
|
||||
margin: 0.1em 0.1em -0.1em;
|
||||
transform: translateY(0.05em);
|
||||
display: inline;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.navds-link:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navds-link.navds-link--remove-underline {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navds-link.navds-link--remove-underline:hover {
|
||||
gap: var(--ax-space-2);
|
||||
text-decoration: underline;
|
||||
}
|
||||
text-underline-offset: 0.1em;
|
||||
text-decoration-thickness: 0.05em;
|
||||
|
||||
.navds-alert .navds-link,
|
||||
.navds-confirmation-panel .navds-link {
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
&:hover,
|
||||
&:active {
|
||||
text-decoration-thickness: 0.111em;
|
||||
}
|
||||
|
||||
.navds-link:focus-visible {
|
||||
outline: 2px solid transparent;
|
||||
color: var(--ac-link-focus-text, var(--a-text-on-action));
|
||||
text-decoration: none;
|
||||
background-color: var(--ac-link-focus-bg, var(--a-border-focus));
|
||||
box-shadow: 0 0 0 2px var(--ac-link-focus-border, var(--a-border-focus));
|
||||
}
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--ax-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-link:focus {
|
||||
outline: 2px solid transparent;
|
||||
color: var(--ac-link-focus-text, var(--a-text-on-action));
|
||||
&.navds-link--inline-text {
|
||||
display: inline;
|
||||
|
||||
& > svg {
|
||||
/* stylelint-disable-next-line plugin/declaration-block-no-ignored-properties */
|
||||
margin: 0.1em 0.1em -0.1em;
|
||||
transform: translateY(0.05em);
|
||||
display: inline;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
}
|
||||
|
||||
&.navds-link--remove-underline {
|
||||
text-decoration: none;
|
||||
background-color: var(--ac-link-focus-bg, var(--a-border-focus));
|
||||
box-shadow: 0 0 0 2px var(--ac-link-focus-border, var(--a-border-focus));
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
& svg {
|
||||
color: inherit;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-link:active {
|
||||
outline: 2px solid transparent;
|
||||
color: var(--ac-link-active-text, var(--a-text-on-action));
|
||||
text-decoration: none;
|
||||
background-color: var(--ac-link-active-bg, var(--a-border-focus));
|
||||
box-shadow: 0 0 0 2px var(--ac-link-active-border, var(--a-border-focus));
|
||||
}
|
||||
|
||||
.navds-link svg {
|
||||
color: inherit;
|
||||
flex-shrink: 0;
|
||||
.navds-alert:not(.navds-alert--inline),
|
||||
.navds-confirmation-panel {
|
||||
& .navds-link {
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-link--action {
|
||||
color: var(--ac-link-action-text, var(--a-text-action));
|
||||
color: var(--ax-text-accent);
|
||||
}
|
||||
|
||||
.navds-link--neutral {
|
||||
color: var(--ac-link-neutral-text, var(--a-text-default));
|
||||
color: var(--ax-text-default);
|
||||
}
|
||||
|
||||
.navds-link--subtle {
|
||||
color: var(--ac-link-subtle-text, var(--a-text-subtle));
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
@@ -1,25 +1,45 @@
|
||||
.navds-list ul,
|
||||
.navds-list ol {
|
||||
padding: 0;
|
||||
margin-block: var(--a-spacing-4);
|
||||
margin-block: var(--ax-space-16);
|
||||
}
|
||||
|
||||
.navds-list--small ul,
|
||||
.navds-list--small ol {
|
||||
margin-block: var(--a-spacing-3);
|
||||
margin-block: var(--ax-space-12);
|
||||
}
|
||||
|
||||
.navds-list .navds-list :where(ul, ol) {
|
||||
margin-block: var(--a-spacing-2) 0;
|
||||
}
|
||||
.navds-list {
|
||||
& .navds-list :where(ul, ol) {
|
||||
margin-block: var(--ax-space-8) 0;
|
||||
}
|
||||
|
||||
.navds-list ol {
|
||||
list-style: decimal; /* This is the default value, but some frameworks have `ol,ul { list-style:none }` */
|
||||
padding-left: 1.7rem;
|
||||
}
|
||||
& ol {
|
||||
list-style: decimal; /* This is the default value, but some frameworks have `ol,ul { list-style:none }` */
|
||||
padding-left: 1.7rem;
|
||||
|
||||
.navds-list ol > .navds-list__item {
|
||||
padding-left: 0.3rem;
|
||||
& > .navds-list__item {
|
||||
padding-left: 0.3rem;
|
||||
}
|
||||
|
||||
& li::marker {
|
||||
font-weight: var(--ax-font-weight-bold);
|
||||
}
|
||||
}
|
||||
|
||||
& ul {
|
||||
& > .navds-list__item {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: var(--ax-space-8);
|
||||
}
|
||||
|
||||
& > li > .navds-list__item-marker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: var(--ax-font-line-height-xlarge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* SAFARI HACK START */
|
||||
@@ -41,45 +61,26 @@ _:future,
|
||||
/* stylelint-enable selector-type-no-unknown */
|
||||
|
||||
.navds-list__item {
|
||||
margin-block-end: var(--a-spacing-2);
|
||||
}
|
||||
margin-block-end: var(--ax-space-8);
|
||||
|
||||
.navds-list__item:last-child {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
.navds-list ul > .navds-list__item {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navds-list ol li::marker {
|
||||
font-weight: var(--a-font-weight-bold);
|
||||
color: var(--ac-list-marker-ol-color, var(--ac-list-marker-color, var(--a-icon-default)));
|
||||
&:last-child {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-list__item-marker {
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.navds-list ul > li > .navds-list__item-marker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: var(--a-font-line-height-xlarge);
|
||||
}
|
||||
|
||||
.navds-list--small ul > li > .navds-list__item-marker {
|
||||
height: var(--a-font-line-height-large);
|
||||
height: var(--ax-font-line-height-large);
|
||||
}
|
||||
|
||||
.navds-list__item-marker--bullet {
|
||||
padding-left: 0.8rem;
|
||||
color: var(--ac-list-marker-ul-color, var(--ac-list-marker-color, var(--a-icon-default)));
|
||||
}
|
||||
|
||||
.navds-list__item-marker--icon {
|
||||
font-size: 1.5rem;
|
||||
justify-content: center;
|
||||
color: var(--ac-list-marker-icon-color, var(--ac-list-marker-color, var(--a-icon-default)));
|
||||
}
|
||||
@@ -5,88 +5,102 @@
|
||||
animation: loader-rotate 1.8s linear infinite;
|
||||
stroke-width: 6;
|
||||
|
||||
--ac-loader-background-stroke-width: 5.9;
|
||||
--__axc-loader-stroke-width: 5.9;
|
||||
|
||||
&.navds-loader--3xlarge {
|
||||
width: 5.5rem;
|
||||
stroke-width: 5;
|
||||
|
||||
--__axc-loader-stroke-width: 4.8;
|
||||
}
|
||||
|
||||
&.navds-loader--2xlarge {
|
||||
width: 4rem;
|
||||
stroke-width: 6;
|
||||
|
||||
--__axc-loader-stroke-width: 5.8;
|
||||
}
|
||||
|
||||
&.navds-loader--xlarge {
|
||||
width: 2.5rem;
|
||||
stroke-width: 6;
|
||||
|
||||
--__axc-loader-stroke-width: 5.8;
|
||||
}
|
||||
|
||||
&.navds-loader--large {
|
||||
width: 2rem;
|
||||
stroke-width: 7;
|
||||
|
||||
--__axc-loader-stroke-width: 6.8;
|
||||
}
|
||||
|
||||
&.navds-loader--medium {
|
||||
width: 1.5rem;
|
||||
stroke-width: 7;
|
||||
|
||||
--__axc-loader-stroke-width: 6.8;
|
||||
}
|
||||
|
||||
&.navds-loader--small {
|
||||
width: 1.25rem;
|
||||
stroke-width: 8;
|
||||
|
||||
--__axc-loader-stroke-width: 7.8;
|
||||
}
|
||||
|
||||
&.navds-loader--xsmall {
|
||||
width: 1rem;
|
||||
stroke-width: 8;
|
||||
|
||||
--__axc-loader-stroke-width: 7.8;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-loader__foreground {
|
||||
animation: loader-dasharray 1.8s ease-in-out infinite;
|
||||
animation: loader-dasharray 1.5s ease-in-out infinite;
|
||||
stroke-dasharray: 80px, 200px;
|
||||
stroke-dashoffset: 0;
|
||||
stroke: var(--ac-loader-stroke, var(--a-border-default));
|
||||
stroke: var(--ax-border-strong);
|
||||
stroke-linecap: round;
|
||||
stroke-width: var(--__axc-loader-stroke-width);
|
||||
}
|
||||
|
||||
.navds-loader__background {
|
||||
stroke: var(--ac-loader-stroke-bg, var(--a-surface-active));
|
||||
stroke-width: var(--ac-loader-background-stroke-width);
|
||||
stroke: var(--ax-border-subtleA);
|
||||
stroke-width: var(--__axc-loader-stroke-width);
|
||||
}
|
||||
|
||||
.navds-loader--neutral .navds-loader__foreground {
|
||||
stroke: var(--ac-loader-neutral-stroke, var(--a-border-default));
|
||||
.navds-loader--neutral {
|
||||
& .navds-loader__foreground {
|
||||
stroke: var(--ax-border-strong);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-loader--interaction .navds-loader__foreground {
|
||||
stroke: var(--ac-loader-interaction-stroke, var(--a-border-action));
|
||||
.navds-loader--interaction {
|
||||
& .navds-loader__foreground {
|
||||
stroke: var(--ax-border-accent-strong);
|
||||
}
|
||||
|
||||
& .navds-loader__background {
|
||||
stroke: var(--ax-border-accent-subtleA);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-loader--inverted .navds-loader__foreground {
|
||||
stroke: var(--ac-loader-inverted-stroke, var(--a-border-on-inverted));
|
||||
.navds-loader--inverted {
|
||||
& .navds-loader__foreground {
|
||||
stroke: var(--ax-border-subtle);
|
||||
}
|
||||
|
||||
& .navds-loader__background {
|
||||
stroke: var(--ax-border-strong);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-loader--inverted .navds-loader__background {
|
||||
stroke: var(--ac-loader-inverted-stroke-bg, var(--a-border-on-inverted-subtle));
|
||||
}
|
||||
|
||||
.navds-loader--transparent .navds-loader__background {
|
||||
stroke: var(--a-surface-transparent);
|
||||
}
|
||||
|
||||
.navds-loader--3xlarge {
|
||||
width: 5.5rem;
|
||||
stroke-width: 5;
|
||||
|
||||
--ac-loader-background-stroke-width: 4.8;
|
||||
}
|
||||
|
||||
.navds-loader--2xlarge {
|
||||
width: 4rem;
|
||||
stroke-width: 6;
|
||||
|
||||
--ac-loader-background-stroke-width: 5.8;
|
||||
}
|
||||
|
||||
.navds-loader--xlarge {
|
||||
width: 2.5rem;
|
||||
stroke-width: 6;
|
||||
|
||||
--ac-loader-background-stroke-width: 5.8;
|
||||
}
|
||||
|
||||
.navds-loader--large {
|
||||
width: 2rem;
|
||||
stroke-width: 7;
|
||||
|
||||
--ac-loader-background-stroke-width: 6.8;
|
||||
}
|
||||
|
||||
.navds-loader--medium {
|
||||
width: 1.5rem;
|
||||
stroke-width: 7;
|
||||
|
||||
--ac-loader-background-stroke-width: 6.8;
|
||||
}
|
||||
|
||||
.navds-loader--small {
|
||||
width: 1.25rem;
|
||||
stroke-width: 8;
|
||||
|
||||
--ac-loader-background-stroke-width: 7.8;
|
||||
}
|
||||
|
||||
.navds-loader--xsmall {
|
||||
width: 1rem;
|
||||
stroke-width: 8;
|
||||
|
||||
--ac-loader-background-stroke-width: 7.8;
|
||||
.navds-loader--transparent {
|
||||
& .navds-loader__background {
|
||||
stroke: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loader-rotate {
|
||||
|
||||
@@ -3,23 +3,23 @@
|
||||
}
|
||||
|
||||
.navds-modal {
|
||||
--__ac-modal-bg: var(--ac-modal-bg, var(--a-surface-default));
|
||||
--__axc-modal-bg: var(--ax-bg-raised);
|
||||
|
||||
background-color: var(--__ac-modal-bg);
|
||||
border: none;
|
||||
border-radius: var(--a-border-radius-large);
|
||||
box-shadow: var(--a-shadow-xlarge);
|
||||
background-color: var(--__axc-modal-bg);
|
||||
border: 1px solid var(--ax-border-subtleA);
|
||||
border-radius: var(--ax-border-radius-xlarge);
|
||||
box-shadow: var(--ax-shadow-dialog);
|
||||
padding: 0;
|
||||
position: fixed;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
color: var(--ax-text-default);
|
||||
|
||||
.navds-modal[open] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
animation: akselModalFadeIn 0.35s cubic-bezier(0.15, 1, 0.3, 1);
|
||||
&[open] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
animation: akselModalFadeIn 0.35s cubic-bezier(0.15, 1, 0.3, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-modal--polyfilled {
|
||||
@@ -32,14 +32,14 @@
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.navds-modal--polyfilled .navds-modal--polyfilled {
|
||||
overflow: auto;
|
||||
}
|
||||
&:not([open]) {
|
||||
display: none; /* from polyfill */
|
||||
}
|
||||
|
||||
.navds-modal--polyfilled:not([open]) {
|
||||
display: none; /* from polyfill */
|
||||
& .navds-modal--polyfilled {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
._dialog_overlay {
|
||||
@@ -52,12 +52,24 @@
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.navds-modal--small {
|
||||
width: var(--ac-modal-width-small, 450px);
|
||||
.navds-modal--medium {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
.navds-modal--medium {
|
||||
width: var(--ac-modal-width-medium, 700px);
|
||||
.navds-modal--small {
|
||||
width: 450px;
|
||||
|
||||
& .navds-modal__header {
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
}
|
||||
|
||||
& .navds-modal__body {
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
}
|
||||
|
||||
& .navds-modal__footer {
|
||||
padding: var(--ax-space-12) var(--ax-space-16);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 480px) {
|
||||
@@ -83,16 +95,16 @@
|
||||
|
||||
.navds-modal::backdrop {
|
||||
/*
|
||||
* Cannot use --a-surface-backdrop because ::backdrop does not inherit from anything but itself.
|
||||
* But consumers can do `::backdrop { --ac-modal-backdrop: white; }`
|
||||
* We can add ::backdrop to tokens.css when we remove the polyfill.
|
||||
* Cannot use --ax-bg-overlay because ::backdrop does not inherit from anything but itself.
|
||||
* TODO: Consider adding `::backdrop` to global token definitions.
|
||||
* TODO: Check that overlay-color is correct after the new colors is set in stone.
|
||||
*/
|
||||
background: var(--ac-modal-backdrop, rgb(2 20 49 / 0.49));
|
||||
background: #0214317d;
|
||||
animation: akselModalBackdropFadeIn 0.35s cubic-bezier(0.15, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.navds-modal--polyfilled + .backdrop /* Cannot be combined with ::backdrop selector */ {
|
||||
background: var(--ac-modal-backdrop, rgb(2 20 49 / 0.49));
|
||||
background: #0214317d;
|
||||
|
||||
/* From polyfill: */
|
||||
position: fixed;
|
||||
@@ -104,37 +116,35 @@
|
||||
}
|
||||
|
||||
.navds-modal__button {
|
||||
margin-left: var(--a-spacing-4);
|
||||
margin-left: var(--ax-space-16);
|
||||
float: right;
|
||||
}
|
||||
|
||||
.navds-modal__header {
|
||||
padding: var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-4) var(--a-spacing-6);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
}
|
||||
|
||||
.navds-modal--small .navds-modal__header {
|
||||
padding: var(--a-spacing-4) var(--a-spacing-4) var(--a-spacing-3) var(--a-spacing-4);
|
||||
}
|
||||
|
||||
.navds-modal__header-icon svg {
|
||||
display: inline;
|
||||
vertical-align: -0.25rem;
|
||||
margin-right: var(--a-spacing-1);
|
||||
.navds-modal__header-icon {
|
||||
& svg {
|
||||
display: inline;
|
||||
vertical-align: -0.25rem;
|
||||
margin-right: var(--ax-space-4);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-modal__label {
|
||||
font-weight: 600;
|
||||
color: var(--a-text-subtle);
|
||||
font-weight: var(--ax-font-weight-bold);
|
||||
color: var(--ax-text-subtle);
|
||||
}
|
||||
|
||||
.navds-modal__body {
|
||||
padding: var(--a-spacing-6);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
overflow: auto;
|
||||
overscroll-behavior: contain;
|
||||
position: relative; /* Needed to make sr-only elements position correctly - see Storybook */
|
||||
background:
|
||||
linear-gradient(var(--__ac-modal-bg) 30%, transparent) top,
|
||||
linear-gradient(transparent, var(--__ac-modal-bg) 60%) bottom,
|
||||
linear-gradient(var(--__axc-modal-bg) 30%, transparent) top,
|
||||
linear-gradient(transparent, var(--__axc-modal-bg) 60%) bottom,
|
||||
radial-gradient(farthest-side at 50% 0, rgba(0 0 0 / 0.3), transparent) top,
|
||||
radial-gradient(farthest-side at 50% 100%, rgba(0 0 0 / 0.3), transparent) bottom;
|
||||
background-size:
|
||||
@@ -146,23 +156,15 @@
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.navds-modal--small .navds-modal__body {
|
||||
padding: var(--a-spacing-2) var(--a-spacing-4) var(--a-spacing-4);
|
||||
}
|
||||
|
||||
.navds-modal__header + .navds-modal__body {
|
||||
padding-top: var(--a-spacing-0);
|
||||
padding-top: var(--ax-space-0);
|
||||
}
|
||||
|
||||
.navds-modal__footer {
|
||||
display: flex;
|
||||
flex-flow: row-reverse wrap;
|
||||
gap: var(--a-spacing-4);
|
||||
padding: var(--a-spacing-4) var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-6);
|
||||
}
|
||||
|
||||
.navds-modal--small .navds-modal__footer {
|
||||
padding: var(--a-spacing-4);
|
||||
gap: var(--ax-space-16);
|
||||
padding: var(--ax-space-16) var(--ax-space-20);
|
||||
}
|
||||
|
||||
.navds-modal__footer :nth-of-type(2) {
|
||||
@@ -180,7 +182,7 @@
|
||||
@keyframes akselModalFadeIn {
|
||||
0% {
|
||||
opacity: 0.0001; /* Safari will not set focus inside the modal when it opens if we set this to 0 */
|
||||
transform: translate3d(0, calc(5% + 4px), 0);
|
||||
transform: translate3d(0, calc(2% + 4px), 0);
|
||||
}
|
||||
|
||||
50% {
|
||||
|
||||
@@ -7,65 +7,33 @@
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
gap: var(--a-spacing-3);
|
||||
gap: var(--ax-space-12);
|
||||
|
||||
& li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.navds-pagination__ellipsis {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: var(--a-spacing-12);
|
||||
width: 3rem;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.navds-pagination--small .navds-pagination__ellipsis {
|
||||
width: var(--a-spacing-8);
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
.navds-pagination--xsmall .navds-pagination__ellipsis {
|
||||
width: var(--a-spacing-6);
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.navds-pagination__item {
|
||||
color: var(--ac-pagination-text, var(--a-text-default));
|
||||
}
|
||||
|
||||
.navds-pagination--medium .navds-pagination__item {
|
||||
border-radius: var(--a-border-radius-medium);
|
||||
}
|
||||
|
||||
.navds-pagination__item[aria-current="true"] {
|
||||
background-color: var(--ac-pagination-selected-bg, var(--a-surface-action-selected));
|
||||
color: var(--ac-pagination-selected-text, var(--a-text-on-action));
|
||||
}
|
||||
|
||||
.navds-pagination__item[aria-current="true"]:focus-visible {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
|
||||
@supports not selector(:focus-visible) {
|
||||
.navds-pagination__item[aria-current="true"]:focus {
|
||||
box-shadow:
|
||||
inset 0 0 0 1px var(--a-surface-default),
|
||||
var(--a-shadow-focus);
|
||||
}
|
||||
}
|
||||
|
||||
.navds-pagination__prev-next {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-1);
|
||||
}
|
||||
|
||||
.navds-pagination--small .navds-pagination__prev-next:where(.navds-pagination--prev-next--with-text) {
|
||||
padding-inline: var(--a-spacing-1-alt);
|
||||
}
|
||||
|
||||
.navds-pagination--xsmall .navds-pagination__prev-next:where(.navds-pagination--prev-next--with-text) {
|
||||
padding-left: var(--a-spacing-05);
|
||||
padding-right: var(--a-spacing-05);
|
||||
.navds-pagination__item[data-selected="true"] {
|
||||
background-color: var(--ax-bg-strong-pressed);
|
||||
color: var(--ax-text-contrast);
|
||||
}
|
||||
|
||||
.navds-pagination--invisible {
|
||||
|
||||