generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4954c6
commit 70f163e
Showing
8 changed files
with
345 additions
and
2 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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import type { Decorator } from '@storybook/react'; | ||
import { Document } from '@utrecht/component-library-react'; | ||
|
||
export const ParametersArgsDecorator: Decorator = (Story, context) => { | ||
context.parameters['args'] = context.args; | ||
|
||
return ( | ||
<div className="tilburg-theme"> | ||
<Story /> | ||
<Document> | ||
<Story /> | ||
</Document> | ||
</div> | ||
); | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* @license CC0-1.0 */ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { | ||
Table, | ||
TableBody, | ||
TableCell, | ||
TableFooter, | ||
TableHeader, | ||
TableHeaderCell, | ||
TableRow, | ||
} from '@utrecht/component-library-react'; | ||
import readme from './documentation/table.md?raw'; | ||
|
||
const meta = { | ||
title: 'CSS Component/Table', | ||
id: 'css-table', | ||
component: Table, | ||
argTypes: {}, | ||
args: {}, | ||
tags: ['autodocs'], | ||
parameters: { | ||
design: { | ||
type: 'figma', | ||
url: 'https://www.figma.com/design/ck81CE8SNzePi30jCEu7MK/NLDS---Gemeente-Tilburg---Bibliotheek?node-id=1561-6448&t=31Z0WojGdXpyWRau-0', | ||
}, | ||
docs: { | ||
description: { | ||
component: readme, | ||
}, | ||
}, | ||
}, | ||
} satisfies Meta<typeof Table>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
children: [ | ||
<TableHeader> | ||
<TableRow> | ||
<TableHeaderCell scope="col">Column A</TableHeaderCell> | ||
<TableHeaderCell scope="col">Column B</TableHeaderCell> | ||
<TableHeaderCell scope="col">Column C</TableHeaderCell> | ||
<TableHeaderCell scope="col">Column d</TableHeaderCell> | ||
</TableRow> | ||
</TableHeader>, | ||
<TableBody> | ||
<TableRow> | ||
<TableCell>Data</TableCell> | ||
<TableCell>Data</TableCell> | ||
<TableCell>Data</TableCell> | ||
<TableCell>Data</TableCell> | ||
</TableRow> | ||
</TableBody>, | ||
<TableFooter> | ||
<TableRow> | ||
<TableCell>Footer data</TableCell> | ||
<TableCell>Footer data</TableCell> | ||
<TableCell>Footer data</TableCell> | ||
<TableCell>Footer data</TableCell> | ||
</TableRow> | ||
</TableFooter>, | ||
], | ||
}, | ||
parameters: { | ||
design: { | ||
type: 'figma', | ||
url: 'https://www.figma.com/design/ck81CE8SNzePi30jCEu7MK/NLDS---Gemeente-Tilburg---Bibliotheek?node-id=1561-6448&t=31Z0WojGdXpyWRau-0', | ||
}, | ||
}, | ||
}; |
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,3 @@ | ||
# Table | ||
|
||
The table component. |
39 changes: 39 additions & 0 deletions
39
proprietary/design-tokens/src/common/tilburg/box-shadow.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,39 @@ | ||
{ | ||
"tilburg": { | ||
"box-shadow": { | ||
"sm": { | ||
"value": { | ||
"x": "0", | ||
"y": "2", | ||
"blur": "6", | ||
"spread": "0", | ||
"color": "#0000000d", | ||
"type": "dropShadow" | ||
}, | ||
"type": "boxShadow" | ||
}, | ||
"md": { | ||
"value": { | ||
"x": "0", | ||
"y": "8", | ||
"blur": "16", | ||
"spread": "0", | ||
"color": "#0000000d", | ||
"type": "dropShadow" | ||
}, | ||
"type": "boxShadow" | ||
}, | ||
"lg": { | ||
"value": { | ||
"x": "0", | ||
"y": "16", | ||
"blur": "48", | ||
"spread": "0", | ||
"color": "#0000000d", | ||
"type": "dropShadow" | ||
}, | ||
"type": "boxShadow" | ||
} | ||
} | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
proprietary/design-tokens/src/common/tilburg/feedback.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,62 @@ | ||
{ | ||
"tilburg": { | ||
"feedback": { | ||
"informative": { | ||
"background-color": { | ||
"value": "{tilburg.color.blue.100}", | ||
"type": "color" | ||
}, | ||
"border-color": { | ||
"value": "{tilburg.color.blue.400}", | ||
"type": "color" | ||
}, | ||
"color": { | ||
"value": "{tilburg.color.blue.400}", | ||
"type": "color" | ||
} | ||
}, | ||
"negative": { | ||
"background-color": { | ||
"value": "{tilburg.color.red.100}", | ||
"type": "color" | ||
}, | ||
"border-color": { | ||
"value": "{tilburg.color.red.300}", | ||
"type": "color" | ||
}, | ||
"color": { | ||
"value": "{tilburg.color.red.300}", | ||
"type": "color" | ||
} | ||
}, | ||
"positive": { | ||
"background-color": { | ||
"value": "{tilburg.color.green.100}", | ||
"type": "color" | ||
}, | ||
"border-color": { | ||
"value": "{tilburg.color.green.300}", | ||
"type": "color" | ||
}, | ||
"color": { | ||
"value": "{tilburg.color.green.300}", | ||
"type": "color" | ||
} | ||
}, | ||
"warning": { | ||
"background-color": { | ||
"value": "{tilburg.color.orange.100}", | ||
"type": "color" | ||
}, | ||
"border-color": { | ||
"value": "{tilburg.color.orange.300}", | ||
"type": "color" | ||
}, | ||
"color": { | ||
"value": "{tilburg.color.orange.300}", | ||
"type": "color" | ||
} | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
proprietary/design-tokens/src/common/tilburg/line.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,14 @@ | ||
{ | ||
"tilburg": { | ||
"line": { | ||
"border-color": { | ||
"value": "{tilburg.color.gray.200}", | ||
"type": "color" | ||
}, | ||
"border-width": { | ||
"value": "{tilburg.border-width.sm}", | ||
"type": "borderWidth" | ||
} | ||
} | ||
} | ||
} |
148 changes: 148 additions & 0 deletions
148
proprietary/design-tokens/src/components/utrecht/table.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,148 @@ | ||
{ | ||
"utrecht": { | ||
"table": { | ||
"header-cell": { | ||
"color": { | ||
"value": "{tilburg.document.color}", | ||
"type": "color" | ||
}, | ||
"font-family": { | ||
"value": "{tilburg.document.font-family}", | ||
"type": "fontFamilies" | ||
}, | ||
"font-weight": { | ||
"value": "{tilburg.document.strong.font-weight}", | ||
"type": "fontWeights" | ||
}, | ||
"font-size": { | ||
"value": "{tilburg.document.font-size}", | ||
"type": "fontSizes" | ||
} | ||
}, | ||
"caption": { | ||
"margin-block-end": { | ||
"value": "{tilburg.space.block.rabbit}", | ||
"type": "spacing" | ||
}, | ||
"color": { | ||
"value": "{tilburg.heading.color}", | ||
"type": "color" | ||
}, | ||
"font-family": { | ||
"value": "{tilburg.heading.font-family}", | ||
"type": "fontFamilies" | ||
}, | ||
"font-weight": { | ||
"value": "{tilburg.heading.font-weight}", | ||
"type": "fontWeights" | ||
}, | ||
"font-size": { | ||
"value": "{tilburg.typography.font-size.xl}", | ||
"type": "fontSizes" | ||
} | ||
}, | ||
"cell": { | ||
"padding-block-start": { | ||
"value": "{tilburg.space.block.snail}", | ||
"type": "spacing" | ||
}, | ||
"padding-inline-end": { | ||
"value": "{tilburg.space.block.snail}", | ||
"type": "spacing" | ||
}, | ||
"padding-inline-start": { | ||
"value": "{tilburg.space.block.snail}", | ||
"type": "spacing" | ||
} | ||
}, | ||
"data-cell": { | ||
"color": { | ||
"value": "{tilburg.document.color}", | ||
"type": "color" | ||
}, | ||
"font-family": { | ||
"value": "{tilburg.document.font-family}", | ||
"type": "fontFamilies" | ||
}, | ||
"font-weight": { | ||
"value": "{tilburg.document.font-weight}", | ||
"type": "fontWeights" | ||
}, | ||
"font-size": { | ||
"value": "{tilburg.document.font-size}", | ||
"type": "fontSizes" | ||
} | ||
}, | ||
"header": { | ||
"border-block-end-width": { | ||
"value": "{tilburg.border-width.md}", | ||
"type": "borderWidth" | ||
}, | ||
"border-block-end-color": { | ||
"value": "{tilburg.line.border-color}", | ||
"type": "color" | ||
}, | ||
"background-color": { | ||
"value": "transparent", | ||
"type": "color" | ||
} | ||
}, | ||
"footer": { | ||
"border-block-end-width": { | ||
"value": "{tilburg.border-width.sm}", | ||
"type": "borderWidth" | ||
}, | ||
"border-block-end-color": { | ||
"value": "{tilburg.line.border-color}", | ||
"type": "color" | ||
}, | ||
"background-color": { | ||
"value": "transparent", | ||
"type": "color" | ||
} | ||
}, | ||
"row": { | ||
"border-block-end-width": { | ||
"value": "{tilburg.border-width.sm}", | ||
"type": "borderWidth" | ||
}, | ||
"border-block-end-color": { | ||
"value": "{tilburg.line.border-color}", | ||
"type": "color" | ||
}, | ||
"background-color": { | ||
"value": "transparent", | ||
"type": "color" | ||
} | ||
}, | ||
"footer-cell": { | ||
"font-weight": { | ||
"value": "{tilburg.document.strong.font-weight}", | ||
"type": "fontWeights" | ||
}, | ||
"font-size": { | ||
"value": "{tilburg.document.font-size}", | ||
"type": "fontSizes" | ||
}, | ||
"color": { | ||
"value": "{tilburg.document.color}", | ||
"type": "color" | ||
}, | ||
"font-family": { | ||
"value": "{tilburg.document.font-family}", | ||
"type": "fontFamilies" | ||
} | ||
}, | ||
"container": { | ||
"box-inline-end-shadow": { | ||
"value": "{tilburg.box-shadow.lg}", | ||
"type": "boxShadow" | ||
}, | ||
"box-inline-start-shadow": { | ||
"value": "{tilburg.box-shadow.lg}", | ||
"type": "boxShadow" | ||
} | ||
} | ||
} | ||
} | ||
} |