@uppsala-designsystem/theme 1.5.0
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/LICENSE +7 -0
- package/README.md +39 -0
- package/brand/colors.d.ts +22 -0
- package/brand/types.d.ts +21 -0
- package/brand/uppsala-kommun-old.css +1516 -0
- package/brand/uppsala-kommun-old.tailwind.css +266 -0
- package/brand/uppsala-kommun.css +1516 -0
- package/brand/uppsala-kommun.tailwind.css +266 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2024 Digitaliseringsdirektoratet (Digdir)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @uppsala-designsystem/theme
|
|
2
|
+
|
|
3
|
+
This package contains the following predefined themes for use in Uppsala kommun.
|
|
4
|
+
|
|
5
|
+
- `uppsala-kommun`
|
|
6
|
+
- `uppsala-kommun-old`
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
When importing the package make sure to specify which theme.
|
|
11
|
+
By default `uppsala-kommun` is used.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import '@uppsala-designsystem/theme/<theme>.css';
|
|
15
|
+
|
|
16
|
+
// uppala-kommun theme
|
|
17
|
+
import '@uppsala-designsystem/theme/uppala-kommun.css';
|
|
18
|
+
|
|
19
|
+
// uppala-kommun-old theme
|
|
20
|
+
import '@uppsala-designsystem/theme/uppala-kommun-old.css';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### CSS
|
|
24
|
+
|
|
25
|
+
This package adds Designsystemet [css variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) to your `:root {}`.
|
|
26
|
+
You only need to import this once in your application, preferably somewhere in your "root" html.
|
|
27
|
+
|
|
28
|
+
All variables are prefixed with `ds`.
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import '@uppsala-designsystem/theme/uppala-kommun-old.css';
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```css
|
|
35
|
+
div {
|
|
36
|
+
padding: var(--ds-size-1);
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* This file is deprecated and will be removed in a future release. Use types.d.ts instead */
|
|
2
|
+
/* build: v1.1.0 */
|
|
3
|
+
import type {} from "@uppsala-designsystem/ui/types";
|
|
4
|
+
|
|
5
|
+
// Augment types based on theme
|
|
6
|
+
declare module "@uppsala-designsystem/ui/types" {
|
|
7
|
+
export interface ColorDefinitions {
|
|
8
|
+
primary: never;
|
|
9
|
+
accent: never;
|
|
10
|
+
brand1: never;
|
|
11
|
+
brand2: never;
|
|
12
|
+
brand3: never;
|
|
13
|
+
brand4: never;
|
|
14
|
+
neutral: never;
|
|
15
|
+
}
|
|
16
|
+
export interface SeverityColorDefinitions {
|
|
17
|
+
info: never;
|
|
18
|
+
success: never;
|
|
19
|
+
warning: never;
|
|
20
|
+
danger: never;
|
|
21
|
+
}
|
|
22
|
+
}
|
package/brand/types.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* build: v1.1.0 */
|
|
2
|
+
import type {} from "@uppsala-designsystem/ui/types";
|
|
3
|
+
|
|
4
|
+
// Augment types based on theme
|
|
5
|
+
declare module "@uppsala-designsystem/ui/types" {
|
|
6
|
+
export interface ColorDefinitions {
|
|
7
|
+
primary: never;
|
|
8
|
+
accent: never;
|
|
9
|
+
brand1: never;
|
|
10
|
+
brand2: never;
|
|
11
|
+
brand3: never;
|
|
12
|
+
brand4: never;
|
|
13
|
+
neutral: never;
|
|
14
|
+
}
|
|
15
|
+
export interface SeverityColorDefinitions {
|
|
16
|
+
info: never;
|
|
17
|
+
success: never;
|
|
18
|
+
warning: never;
|
|
19
|
+
danger: never;
|
|
20
|
+
}
|
|
21
|
+
}
|