@helsenorge/designsystem-react 13.0.0-workspaces-beta.1 → 13.0.0-workspaces-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CHANGELOG.md +4 -0
- package/lib/FormFieldTag.js.map +1 -1
- package/lib/Table.js +3 -3
- package/lib/Table.js.map +1 -1
- package/lib/TableBody.js +2 -2
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +2 -2
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +4 -4
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +2 -2
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +6 -6
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +5 -5
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +5 -5
- package/lib/TableRow.js.map +1 -1
- package/lib/components/FormFieldTag/FormFieldTag.d.ts +1 -1
- package/lib/components/Toast/styles.module.scss.d.ts +15 -0
- package/package.json +27 -9
- package/scss/_body.scss +11 -0
- package/scss/_breakpoints.scss +29 -0
- package/scss/_figma-tokens.scss +68 -0
- package/scss/_font-mixins.scss +262 -0
- package/scss/_font-settings.scss +8 -0
- package/scss/_fonts.scss +155 -0
- package/scss/_grid.scss +6 -0
- package/scss/_icon.scss +8 -0
- package/scss/_input.scss +139 -0
- package/scss/_palette.scss +146 -0
- package/scss/_print.scss +219 -0
- package/scss/_reset.scss +13 -0
- package/scss/_screen-reader.scss +63 -0
- package/scss/_spacers.scss +42 -0
- package/scss/bootstrap/LICENSE +22 -0
- package/scss/bootstrap/scss/_functions.scss +210 -0
- package/scss/bootstrap/scss/_grid.scss +73 -0
- package/scss/bootstrap/scss/_variables.scss +990 -0
- package/scss/bootstrap/scss/bootstrap-grid.scss +30 -0
- package/scss/bootstrap/scss/mixins/_breakpoints.scss +131 -0
- package/scss/bootstrap/scss/mixins/_deprecate.scss +11 -0
- package/scss/bootstrap/scss/mixins/_grid-framework.scss +89 -0
- package/scss/bootstrap/scss/mixins/_grid.scss +76 -0
- package/scss/bootstrap/scss/utilities/_display.scss +30 -0
- package/scss/bootstrap/scss/utilities/_flex.scss +120 -0
- package/scss/bootstrap/scss/utilities/_spacing.scss +80 -0
- package/scss/bootstrap/scss/vendor/_rfs.scss +233 -0
- package/scss/helsenorge.scss +10 -0
- package/scss/layout.module.scss +14 -0
- package/scss/layout.module.scss.d.ts +9 -0
- package/scss/supernova/index.css +4 -0
- package/scss/supernova/styles/colors.css +258 -0
- package/scss/supernova/styles/spacers.css +24 -0
- package/scss/supernova/styles/typography.css +110 -0
- package/scss/typography.module.scss +182 -0
- package/scss/typography.module.scss.d.ts +38 -0
- package/scss/typography.stories.tsx +203 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use './spacers' as spacers;
|
|
3
|
+
@use './palette' as palette;
|
|
4
|
+
@use './font-mixins' as fonts;
|
|
5
|
+
@use './font-settings' as font-settings;
|
|
6
|
+
@use './breakpoints' as breakpoints;
|
|
7
|
+
@use './fonts' as *;
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
Denne filen er ment til å importeres som en css module:
|
|
11
|
+
import designsystemtypography from './scss/typography.scss'
|
|
12
|
+
<div className={designsystemtypography.title1}></div>
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
.title-feature {
|
|
16
|
+
@include fonts.title-feature;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.focused-content {
|
|
20
|
+
font-size: font-settings.$font-size-sm;
|
|
21
|
+
line-height: font-settings.$lineheight-size-sm;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.title1 {
|
|
25
|
+
@include fonts.title1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.title2 {
|
|
29
|
+
@include fonts.title2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.title3 {
|
|
33
|
+
@include fonts.title3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.title4 {
|
|
37
|
+
@include fonts.title4;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.title5 {
|
|
41
|
+
@include fonts.title5;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.title6 {
|
|
45
|
+
@include fonts.title6;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.body {
|
|
49
|
+
@include fonts.body;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.preamble {
|
|
53
|
+
@include fonts.preamble;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.legend {
|
|
57
|
+
@include fonts.legend;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.label {
|
|
61
|
+
@include fonts.label;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.label-subdued {
|
|
65
|
+
@include fonts.label-subdued;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sublabel {
|
|
69
|
+
@include fonts.sublabel;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.sublabel-subdued {
|
|
73
|
+
@include fonts.sublabel-subdued;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.compact-data {
|
|
77
|
+
@include fonts.compact-data;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.table-cell {
|
|
81
|
+
@include fonts.table-cell;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.strong {
|
|
85
|
+
font-size: font-settings.$font-size-sm;
|
|
86
|
+
line-height: font-settings.$lineheight-size-sm;
|
|
87
|
+
|
|
88
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
89
|
+
font-size: font-settings.$font-size-md;
|
|
90
|
+
line-height: font-settings.$lineheight-size-md;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.form {
|
|
95
|
+
font-size: font-settings.$font-size-sm;
|
|
96
|
+
line-height: font-settings.$lineheight-size-sm;
|
|
97
|
+
|
|
98
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
99
|
+
font-size: font-settings.$font-size-md;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.status-timestamp {
|
|
104
|
+
@include fonts.status-timestamp;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.image-caption {
|
|
108
|
+
@include fonts.image-caption;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.image-credit {
|
|
112
|
+
@include fonts.image-credit;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.input-text {
|
|
116
|
+
@include fonts.input-text;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.input-text-large {
|
|
120
|
+
@include fonts.input-text-large;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.text-list {
|
|
124
|
+
@include fonts.text-list;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.definition-list-type {
|
|
128
|
+
@include fonts.definition-list-type;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.definition-list-data {
|
|
132
|
+
@include fonts.definition-list-data;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.help-text {
|
|
136
|
+
@include fonts.help-text;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.help-trigger-text {
|
|
140
|
+
@include fonts.help-trigger-text;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.anchorlink-wrapper {
|
|
144
|
+
a {
|
|
145
|
+
display: inline;
|
|
146
|
+
box-decoration-break: clone;
|
|
147
|
+
overflow-wrap: break-word;
|
|
148
|
+
word-break: normal;
|
|
149
|
+
text-align: left;
|
|
150
|
+
color: palette.$blueberry600;
|
|
151
|
+
border: 0.15rem solid transparent;
|
|
152
|
+
text-decoration: underline;
|
|
153
|
+
text-underline-offset: 0.16rem;
|
|
154
|
+
text-decoration-color: palette.$blueberry400;
|
|
155
|
+
text-decoration-thickness: 0.0625rem;
|
|
156
|
+
padding: 0.1rem;
|
|
157
|
+
|
|
158
|
+
&:hover {
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
color: palette.$blueberry700;
|
|
161
|
+
background-color: palette.$blueberry50;
|
|
162
|
+
text-decoration-color: palette.$blueberry600;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&:focus {
|
|
166
|
+
outline: none;
|
|
167
|
+
border: 0.15rem solid palette.$black;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&[target='_blank'] {
|
|
171
|
+
/* external styling legge til icon */
|
|
172
|
+
&::after {
|
|
173
|
+
content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='38px' height='38px' viewBox='0 0 48 48' fill='%2308667c'><polygon points='33.305,14.659,33.305,29.205,32.005,29.205,32.005,16.948,15.804,33.149,14.885,32.229,31.155,15.959,18.761,15.96,18.761,14.659' /></svg>");
|
|
174
|
+
display: inline-block;
|
|
175
|
+
vertical-align: bottom;
|
|
176
|
+
margin-right: -0.4rem;
|
|
177
|
+
margin-top: -2rem;
|
|
178
|
+
margin-bottom: -0.8rem;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
'anchorlink-wrapper': string;
|
|
3
|
+
body: string;
|
|
4
|
+
'compact-data': string;
|
|
5
|
+
'definition-list-data': string;
|
|
6
|
+
'definition-list-type': string;
|
|
7
|
+
'focused-content': string;
|
|
8
|
+
form: string;
|
|
9
|
+
'help-text': string;
|
|
10
|
+
'help-trigger-text': string;
|
|
11
|
+
'image-caption': string;
|
|
12
|
+
'image-credit': string;
|
|
13
|
+
'input-text': string;
|
|
14
|
+
'input-text-large': string;
|
|
15
|
+
label: string;
|
|
16
|
+
'label-subdued': string;
|
|
17
|
+
legend: string;
|
|
18
|
+
preamble: string;
|
|
19
|
+
'status-timestamp': string;
|
|
20
|
+
strong: string;
|
|
21
|
+
sublabel: string;
|
|
22
|
+
'sublabel-subdued': string;
|
|
23
|
+
'table-cell': string;
|
|
24
|
+
'text-list': string;
|
|
25
|
+
'title-feature': string;
|
|
26
|
+
title1: string;
|
|
27
|
+
title2: string;
|
|
28
|
+
title3: string;
|
|
29
|
+
title4: string;
|
|
30
|
+
title5: string;
|
|
31
|
+
title6: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type ClassNames = keyof Styles;
|
|
35
|
+
|
|
36
|
+
declare const styles: Styles;
|
|
37
|
+
|
|
38
|
+
export default styles;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { StoryObj, Meta } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import LabelComponent from '../components/Label';
|
|
4
|
+
import Title from '../components/Title';
|
|
5
|
+
|
|
6
|
+
import designsystemtypography from './typography.module.scss';
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: '@helsenorge/designsystem-react/scss/Typography',
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: 'Typografi-klasser tilgjengeliggjort til bruk utenfor React-komponentene.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
args: {
|
|
18
|
+
tekst: 'Tekst',
|
|
19
|
+
},
|
|
20
|
+
} as Meta;
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
|
|
26
|
+
export const TitleFeature: Story = {
|
|
27
|
+
render: args => <div className={designsystemtypography['title-feature']}>{args.tekst}</div>,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Title1: Story = {
|
|
31
|
+
render: args => <div className={designsystemtypography.title1}>{args.tekst}</div>,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Title2: Story = {
|
|
35
|
+
render: args => <div className={designsystemtypography.title2}>{args.tekst}</div>,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Title3: Story = {
|
|
39
|
+
render: args => <div className={designsystemtypography.title3}>{args.tekst}</div>,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const Title4: Story = {
|
|
43
|
+
render: args => <div className={designsystemtypography.title4}>{args.tekst}</div>,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const Title5: Story = {
|
|
47
|
+
render: args => <div className={designsystemtypography.title5}>{args.tekst}</div>,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Title6: Story = {
|
|
51
|
+
render: args => <div className={designsystemtypography.title6}>{args.tekst}</div>,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const Preamble: Story = {
|
|
55
|
+
render: args => <div className={designsystemtypography.preamble}>{args.tekst}</div>,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const Legend: Story = {
|
|
59
|
+
render: args => <div className={designsystemtypography.legend}>{args.tekst}</div>,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const Label: Story = {
|
|
63
|
+
render: args => <div className={designsystemtypography.label}>{args.tekst}</div>,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const LabelSubdued: Story = {
|
|
67
|
+
render: args => <div className={designsystemtypography['label-subdued']}>{args.tekst}</div>,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Sublabel: Story = {
|
|
71
|
+
render: args => <div className={designsystemtypography.sublabel}>{args.tekst}</div>,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const SublabelSubdued: Story = {
|
|
75
|
+
render: args => <div className={designsystemtypography['sublabel-subdued']}>{args.tekst}</div>,
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const CompactData: Story = {
|
|
79
|
+
render: args => <div className={designsystemtypography['compact-data']}>{args.tekst}</div>,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const TableCell: Story = {
|
|
83
|
+
render: args => <div className={designsystemtypography['table-cell']}>{args.tekst}</div>,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const Strong: Story = {
|
|
87
|
+
render: args => <div className={designsystemtypography.strong}>{args.tekst}</div>,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const ImageCaption: Story = {
|
|
91
|
+
render: args => <div className={designsystemtypography['image-caption']}>{args.tekst}</div>,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const ImageCredit: Story = {
|
|
95
|
+
render: args => <div className={designsystemtypography['image-credit']}>{args.tekst}</div>,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const StatusTimestamp: Story = {
|
|
99
|
+
render: args => <div className={designsystemtypography['status-timestamp']}>{args.tekst}</div>,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const InputText: Story = {
|
|
103
|
+
render: args => <div className={designsystemtypography['input-text']}>{args.tekst}</div>,
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const InputTextLarge: Story = {
|
|
107
|
+
render: args => <div className={designsystemtypography['input-text-large']}>{args.tekst}</div>,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const TextList: Story = {
|
|
111
|
+
render: args => <div className={designsystemtypography['text-list']}>{args.tekst}</div>,
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const DefinitionListType: Story = {
|
|
115
|
+
render: args => <div className={designsystemtypography['definition-list-type']}>{args.tekst}</div>,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const DefinitionListData: Story = {
|
|
119
|
+
render: args => <div className={designsystemtypography['definition-list-data']}>{args.tekst}</div>,
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const HelpText: Story = {
|
|
123
|
+
render: args => <div className={designsystemtypography['help-text']}>{args.tekst}</div>,
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export const HelpTriggerText: Story = {
|
|
127
|
+
render: args => <div className={designsystemtypography['help-trigger-text']}>{args.tekst}</div>,
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const AnchorlinkWrapper: Story = {
|
|
131
|
+
render: args => (
|
|
132
|
+
<div className={designsystemtypography['anchorlink-wrapper']}>
|
|
133
|
+
<a href="www.helsenorge.no">{args.tekst}</a>
|
|
134
|
+
<a href="www.helsenorge.no" target="_blank">
|
|
135
|
+
{args.tekst}
|
|
136
|
+
</a>
|
|
137
|
+
</div>
|
|
138
|
+
),
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const ClassExamplesWithComponents: Story = {
|
|
142
|
+
render: () => {
|
|
143
|
+
const padding = '10px';
|
|
144
|
+
return (
|
|
145
|
+
<>
|
|
146
|
+
<table style={{}}>
|
|
147
|
+
<tr>
|
|
148
|
+
<th style={{ padding }}>{'Class Example'}</th>
|
|
149
|
+
<th style={{ padding }}>{'Component Example'}</th>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td style={{ padding }}>
|
|
153
|
+
<div className={designsystemtypography.title2}>{'Title2'}</div>
|
|
154
|
+
</td>
|
|
155
|
+
<td style={{ padding }}>
|
|
156
|
+
<Title appearance="title2">{'Title2'}</Title>
|
|
157
|
+
</td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr>
|
|
160
|
+
<td style={{ padding }}>
|
|
161
|
+
<div className={designsystemtypography.title3}>{'Title3'}</div>
|
|
162
|
+
</td>
|
|
163
|
+
<td style={{ padding }}>
|
|
164
|
+
<Title appearance="title3">{'Title3'}</Title>
|
|
165
|
+
</td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr>
|
|
168
|
+
<td style={{ padding }}>
|
|
169
|
+
<div className={designsystemtypography.title4}>{'Title4'}</div>
|
|
170
|
+
</td>
|
|
171
|
+
<td style={{ padding }}>
|
|
172
|
+
<Title appearance="title4">{'Title4'}</Title>
|
|
173
|
+
</td>
|
|
174
|
+
</tr>
|
|
175
|
+
<tr>
|
|
176
|
+
<td style={{ padding }}>
|
|
177
|
+
<div className={designsystemtypography.title5}>{'Title5'}</div>
|
|
178
|
+
</td>
|
|
179
|
+
<td style={{ padding }}>
|
|
180
|
+
<Title appearance="title5">{'Title5'}</Title>
|
|
181
|
+
</td>
|
|
182
|
+
</tr>
|
|
183
|
+
<tr>
|
|
184
|
+
<td style={{ padding }}>
|
|
185
|
+
<div className={designsystemtypography['title-feature']}>{'Title Feature'}</div>
|
|
186
|
+
</td>
|
|
187
|
+
<td style={{ padding }}>
|
|
188
|
+
<Title appearance="titleFeature">{'Title Feature'}</Title>
|
|
189
|
+
</td>
|
|
190
|
+
</tr>
|
|
191
|
+
<tr>
|
|
192
|
+
<td style={{ padding }}>
|
|
193
|
+
<div className={designsystemtypography.label}>{'Label'}</div>
|
|
194
|
+
</td>
|
|
195
|
+
<td style={{ padding }}>
|
|
196
|
+
<LabelComponent labelTexts={[{ text: 'Label' }]} />
|
|
197
|
+
</td>
|
|
198
|
+
</tr>
|
|
199
|
+
</table>
|
|
200
|
+
</>
|
|
201
|
+
);
|
|
202
|
+
},
|
|
203
|
+
};
|