generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat(components): new link component
Wrapped Utrecht Link als LUX Link LUX Document met `utrecht-document` class toegevoegd. Known bugs / missing features: - Active underline does not change - Border radius is not implemented --------- Co-authored-by: Jaap-Hein Wester <j.h.wester@setonix.nl> Co-authored-by: Jaap-Hein Wester <MrSkippy@users.noreply.github.com>
- Loading branch information
1 parent
afdb226
commit 4a41faf
Showing
20 changed files
with
750 additions
and
7 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,14 @@ | ||
--- | ||
"@lux-design-system/web-components-stencil": minor | ||
"@lux-design-system/design-tokens": minor | ||
"@lux-design-system/web-components-react": minor | ||
--- | ||
|
||
Wrapped Utrecht Link als LUX Link | ||
|
||
LUX Document met utrecht-document class toegevoegd. | ||
|
||
Known bugs / missing features: | ||
|
||
- Active underline does not change | ||
- Border radius is not implemented |
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
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
39 changes: 39 additions & 0 deletions
39
packages/storybook/src/web-components/document/document.stories.tsx
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,39 @@ | ||
import tokens from '@lux-design-system/design-tokens/dist/index.json'; | ||
import { LuxDocument as Document } from '@lux-design-system/web-components-react'; | ||
import type { JSX } from '@lux-design-system/web-components-stencil'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { type PropsWithChildren } from 'react'; | ||
import tokensDefinition from './tokens.json'; | ||
import { createDesignTokensStory } from '../../utils'; | ||
|
||
const LuxDocument = (props: PropsWithChildren<JSX.LuxDocument>) => <Document {...props} />; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
const meta = { | ||
title: 'Web Components/Document', | ||
id: 'web-components-document', | ||
component: LuxDocument, | ||
parameters: { | ||
tokens, | ||
tokensPrefix: 'lux-link', | ||
tokensDefinition, | ||
}, | ||
tags: ['!autodocs'], | ||
} satisfies Meta<typeof LuxDocument>; | ||
|
||
export default meta; | ||
|
||
export const Playground: Story = { | ||
name: 'Playground', | ||
args: { | ||
children: 'Lorem', | ||
}, | ||
parameters: { | ||
docs: { | ||
sourceState: 'shown', | ||
}, | ||
}, | ||
}; | ||
|
||
export const DesignTokens = createDesignTokensStory(meta); |
66 changes: 66 additions & 0 deletions
66
packages/storybook/src/web-components/document/tokens.json
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,66 @@ | ||
{ | ||
"lux": { | ||
"document": { | ||
"background-color": { | ||
"$extensions": { | ||
"nl.nldesignsystem.css.property": { | ||
"syntax": "<color>", | ||
"inherits": true | ||
}, | ||
"nl.nldesignsystem.figma.supports-token": true | ||
}, | ||
"type": "color" | ||
}, | ||
"color": { | ||
"$extensions": { | ||
"nl.nldesignsystem.css.property": { | ||
"syntax": "<color>", | ||
"inherits": true | ||
}, | ||
"nl.nldesignsystem.figma.supports-token": true | ||
}, | ||
"type": "color" | ||
}, | ||
"font-family": { | ||
"$extensions": { | ||
"nl.nldesignsystem.css.property": { | ||
"syntax": "*", | ||
"inherits": true | ||
}, | ||
"nl.nldesignsystem.figma.supports-token": true | ||
}, | ||
"type": "fontFamilies" | ||
}, | ||
"font-size": { | ||
"$extensions": { | ||
"nl.nldesignsystem.css.property": { | ||
"syntax": "<length>", | ||
"inherits": true | ||
}, | ||
"nl.nldesignsystem.figma.supports-token": true | ||
}, | ||
"type": "fontSizes" | ||
}, | ||
"font-weight": { | ||
"$extensions": { | ||
"nl.nldesignsystem.css.property": { | ||
"syntax": "<number>", | ||
"inherits": true | ||
}, | ||
"nl.nldesignsystem.figma.supports-token": true | ||
}, | ||
"type": "fontWeights" | ||
}, | ||
"line-height": { | ||
"$extensions": { | ||
"nl.nldesignsystem.css.property": { | ||
"syntax": ["<length>", "<number>"], | ||
"inherits": true | ||
}, | ||
"nl.nldesignsystem.figma.supports-token": true | ||
}, | ||
"type": "lineHeights" | ||
} | ||
} | ||
} | ||
} |
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,64 @@ | ||
import { Canvas, Controls, Description, Markdown, Meta } from "@storybook/blocks"; | ||
import markdown from "@utrecht/link-css/README.md?raw"; | ||
import * as LinkStories from "./link.stories"; | ||
|
||
<Meta of={LinkStories} /> | ||
|
||
<p className="lsb-citation"> | ||
{`Documentatie afkomstig van `} | ||
<cite> | ||
{/* prettier-ignore */} | ||
<a href="https://nl-design-system.github.io/utrecht/storybook-css/index.html?path=/docs/css-link--docs">Utrecht Link</a> | ||
</cite> | ||
{`.`} | ||
</p> | ||
|
||
<Markdown>{markdown}</Markdown> | ||
|
||
## Playground | ||
|
||
<Canvas of={LinkStories.Playground} /> | ||
<Controls of={LinkStories.Playground} /> | ||
|
||
{/* Utrecht documentation took id #states... */} | ||
|
||
<h2 id="states_examples">States</h2> | ||
|
||
### Active | ||
|
||
<Description of={LinkStories.Active} /> | ||
<Canvas of={LinkStories.Active} sourceState="none" /> | ||
|
||
### Hover | ||
|
||
<Description of={LinkStories.Hover} /> | ||
<Canvas of={LinkStories.Hover} sourceState="none" /> | ||
|
||
### Focus | ||
|
||
<Description of={LinkStories.Focus} /> | ||
<Canvas of={LinkStories.Focus} sourceState="none" /> | ||
|
||
## Attributes | ||
|
||
### Download | ||
|
||
<Description of={LinkStories.Download} /> | ||
<Canvas of={LinkStories.Download} sourceState="hidden" /> | ||
|
||
### Target | ||
|
||
<Description of={LinkStories.Target} /> | ||
<Canvas of={LinkStories.Target} sourceState="hidden" /> | ||
|
||
## Gebruik | ||
|
||
### Icon | ||
|
||
<Description of={LinkStories.Icon} /> | ||
<Canvas of={LinkStories.Icon} sourceState="hidden" /> | ||
|
||
### In Tekst | ||
|
||
<Description of={LinkStories.InText} /> | ||
<Canvas of={LinkStories.InText} sourceState="none" /> |
Oops, something went wrong.