-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into fix/css-native-accordion
- Loading branch information
Showing
7 changed files
with
146 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@digdir/designsystemet-react": patch | ||
--- | ||
|
||
Heading: default level is now 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@digdir/designsystemet-css": patch | ||
"@digdir/designsystemet-react": patch | ||
--- | ||
|
||
Tag: Make neutral default color in CSS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,62 @@ | ||
.ds-tag { | ||
--dsc-tag-background: var(--ds-color-neutral-background-subtle); | ||
--dsc-tag-background: var(--ds-color-neutral-surface-default); | ||
--dsc-tag-color: var(--ds-color-neutral-text-default); | ||
--dsc-tag-min-height: var(--ds-sizing-8); | ||
--dsc-tag-padding: 0 var(--ds-spacing-2); | ||
|
||
color: var(--dsc-tag-color); | ||
padding: 0 var(--ds-spacing-2); | ||
min-height: var(--ds-sizing-8); | ||
background-color: var(--dsc-tag-background); | ||
border-radius: min(1rem, var(--ds-border-radius-sm)); | ||
display: flex; | ||
align-items: center; | ||
background: var(--dsc-tag-background); | ||
border-radius: min(1rem, var(--ds-border-radius-sm)); | ||
box-sizing: border-box; | ||
word-break: break-word; | ||
color: var(--dsc-tag-color); | ||
display: flex; | ||
min-height: var(--dsc-tag-min-height); | ||
padding: var(--dsc-tag-padding); | ||
width: max-content; | ||
} | ||
|
||
.ds-tag--sm { | ||
padding: 0 var(--ds-spacing-2); | ||
min-height: var(--ds-sizing-7); | ||
} | ||
|
||
.ds-tag--md { | ||
padding: 0 var(--ds-spacing-2); | ||
min-height: var(--ds-sizing-8); | ||
} | ||
|
||
.ds-tag--lg { | ||
padding: 0 var(--ds-spacing-3); | ||
min-height: var(--ds-sizing-9); | ||
} | ||
|
||
.ds-tag--neutral { | ||
--dsc-tag-background: var(--ds-color-neutral-surface-default); | ||
--dsc-tag-color: var(--ds-color-neutral-text-default); | ||
} | ||
|
||
.ds-tag--info { | ||
--dsc-tag-background: var(--ds-color-info-surface-default); | ||
--dsc-tag-color: var(--ds-color-info-text-default); | ||
} | ||
|
||
.ds-tag--success { | ||
--dsc-tag-background: var(--ds-color-success-surface-default); | ||
--dsc-tag-color: var(--ds-color-success-text-default); | ||
} | ||
|
||
.ds-tag--warning { | ||
--dsc-tag-background: var(--ds-color-warning-surface-default); | ||
--dsc-tag-color: var(--ds-color-warning-text-default); | ||
} | ||
|
||
.ds-tag--danger { | ||
--dsc-tag-background: var(--ds-color-danger-surface-default); | ||
--dsc-tag-color: var(--ds-color-danger-text-default); | ||
} | ||
|
||
.ds-tag--brand1 { | ||
--dsc-tag-background: var(--ds-color-brand1-surface-default); | ||
--dsc-tag-color: var(--ds-color-brand1-text-default); | ||
} | ||
|
||
.ds-tag--brand2 { | ||
--dsc-tag-background: var(--ds-color-brand2-surface-default); | ||
--dsc-tag-color: var(--ds-color-brand2-text-default); | ||
} | ||
word-break: break-word; | ||
|
||
.ds-tag--brand3 { | ||
--dsc-tag-background: var(--ds-color-brand3-surface-default); | ||
--dsc-tag-color: var(--ds-color-brand3-text-default); | ||
&[data-size='sm'] { | ||
--dsc-tag-padding: 0 var(--ds-spacing-2); | ||
--dsc-tag-min-height: var(--ds-sizing-7); | ||
} | ||
|
||
&[data-size='lg'] { | ||
--dsc-tag-padding: 0 var(--ds-spacing-3); | ||
--dsc-tag-min-height: var(--ds-sizing-9); | ||
} | ||
|
||
&[data-color='info'] { | ||
--dsc-tag-background: var(--ds-color-info-surface-default); | ||
--dsc-tag-color: var(--ds-color-info-text-default); | ||
} | ||
|
||
&[data-color='success'] { | ||
--dsc-tag-background: var(--ds-color-success-surface-default); | ||
--dsc-tag-color: var(--ds-color-success-text-default); | ||
} | ||
|
||
&[data-color='warning'] { | ||
--dsc-tag-background: var(--ds-color-warning-surface-default); | ||
--dsc-tag-color: var(--ds-color-warning-text-default); | ||
} | ||
|
||
&[data-color='danger'] { | ||
--dsc-tag-background: var(--ds-color-danger-surface-default); | ||
--dsc-tag-color: var(--ds-color-danger-text-default); | ||
} | ||
|
||
&[data-color='brand1'] { | ||
--dsc-tag-background: var(--ds-color-brand1-surface-default); | ||
--dsc-tag-color: var(--ds-color-brand1-text-default); | ||
} | ||
|
||
&[data-color='brand2'] { | ||
--dsc-tag-background: var(--ds-color-brand2-surface-default); | ||
--dsc-tag-color: var(--ds-color-brand2-text-default); | ||
} | ||
|
||
&[data-color='brand3'] { | ||
--dsc-tag-background: var(--ds-color-brand3-surface-default); | ||
--dsc-tag-color: var(--ds-color-brand3-text-default); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,24 +29,28 @@ export const Normal: Story = { | |
}, | ||
}; | ||
|
||
export const InText: StoryFn<typeof Link> = () => ( | ||
export const InText: StoryFn = (args) => ( | ||
<> | ||
<Paragraph> | ||
Vi bruker komponenter fra{' '} | ||
<Link href={designsystemetLink}>et fantastisk designsystem</Link>. | ||
</Paragraph> | ||
<Paragraph> | ||
<Link href='mailto:[email protected]'> | ||
<EnvelopeClosedIcon aria-hidden /> | ||
Kontakt oss | ||
<Link href={designsystemetLink} {...args}> | ||
et fantastisk designsystem | ||
</Link> | ||
. | ||
</Paragraph> | ||
</> | ||
); | ||
|
||
export const LongLink: StoryFn<typeof Link> = () => ( | ||
export const WithIcon: StoryFn = (args) => ( | ||
<Link href='mailto:[email protected]' {...args}> | ||
<EnvelopeClosedIcon aria-hidden /> | ||
Kontakt oss | ||
</Link> | ||
); | ||
|
||
export const LongLink: StoryFn = (args) => ( | ||
<Paragraph> | ||
<Link href={designsystemetLink}> | ||
<Link href={designsystemetLink} {...args}> | ||
Dette er en lenke som brekker over flere linjer | ||
</Link> | ||
</Paragraph> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters