@kanso-labs/kanso-ui-core 0.4.1 → 0.6.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/README.md +34 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -423
- package/dist/product-theme-CfDDgv7F.js +1012 -0
- package/dist/product-theme-CfDDgv7F.js.map +1 -0
- package/dist/product-theme-D117EbtF.d.ts +803 -0
- package/dist/themes.d.ts +14 -2
- package/dist/themes.js +1066 -959
- package/dist/themes.js.map +1 -1
- package/dist/tokens.css +445 -128
- package/dist/tokens.json +905 -591
- package/package.json +2 -2
- package/dist/defaults-UY9g7wIs.d.ts +0 -429
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
[![License][license-shield]][license] [![Build][build-shield]][build-workflow]
|
|
4
4
|
[![Test][test-shield]][test-workflow] [![Coverage][coverage-shield]][codecov]
|
|
5
5
|
|
|
6
|
-
The design data Kanso UI's two component libraries share
|
|
7
|
-
[`@kanso-labs/kanso-ui`](https://github.com/kanso-labs/kanso-ui) draws
|
|
8
|
-
web and
|
|
6
|
+
The design data Kanso UI's two component libraries share, in the Kanso design
|
|
7
|
+
language. [`@kanso-labs/kanso-ui`](https://github.com/kanso-labs/kanso-ui) draws
|
|
8
|
+
it on the web and
|
|
9
9
|
[`@kanso-labs/react-native-kanso-ui`](https://github.com/kanso-labs/react-native-kanso-ui)
|
|
10
10
|
on iOS and Android.
|
|
11
11
|
|
|
@@ -14,13 +14,37 @@ they read, so an app installs one of them rather than this.
|
|
|
14
14
|
|
|
15
15
|
## What it publishes
|
|
16
16
|
|
|
17
|
-
| Import | What it is
|
|
18
|
-
| --------------------------------------- |
|
|
19
|
-
| `@kanso-labs/kanso-ui-core` | `light` and `dark`, every `--kui-*` property at its value in each scheme; `breakpoints`, the window size classes; the `KuiTheme` type
|
|
20
|
-
| `@kanso-labs/kanso-ui-core/glyphs` | The path data of the glyphs both libraries draw inside their controls, one `<name>Path` constant each, and the 24-unit `gridSize`
|
|
21
|
-
| `@kanso-labs/kanso-ui-core/themes` | `demoThemes`, the seven demo schemes both libraries' Storybooks render, each a `KuiTheme` with a label and a description
|
|
22
|
-
| `@kanso-labs/kanso-ui-core/tokens.css` | The `--kui-*` custom properties at their defaults, the dark colours under `prefers-color-scheme: dark`, as both libraries publish them
|
|
23
|
-
| `@kanso-labs/kanso-ui-core/tokens.json` | The design tokens themselves, in the W3C Design Tokens format
|
|
17
|
+
| Import | What it is |
|
|
18
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
19
|
+
| `@kanso-labs/kanso-ui-core` | `light` and `dark`, every `--kui-*` property at its value in each scheme; `defineProductTheme`, which builds a product's theme from its own colours and checks their contrast; `breakpoints`, the window size classes; the `KuiTheme` type |
|
|
20
|
+
| `@kanso-labs/kanso-ui-core/glyphs` | The path data of the glyphs both libraries draw inside their controls, one `<name>Path` constant each, and the 24-unit `gridSize` |
|
|
21
|
+
| `@kanso-labs/kanso-ui-core/themes` | `demoThemes`, the seven demo schemes both libraries' Storybooks render, each a `KuiTheme` with a label and a description; `demoProductThemes`, the sample product colour, violet |
|
|
22
|
+
| `@kanso-labs/kanso-ui-core/tokens.css` | The `--kui-*` custom properties at their defaults, the dark colours and shadows under `prefers-color-scheme: dark`, as both libraries publish them |
|
|
23
|
+
| `@kanso-labs/kanso-ui-core/tokens.json` | The design tokens themselves, in the W3C Design Tokens format |
|
|
24
|
+
|
|
25
|
+
## A product's own colour
|
|
26
|
+
|
|
27
|
+
Kanso's brand is ink and paper, with no colour of its own, so the base draws the
|
|
28
|
+
product roles in ink. A product brings one colour for them: it keeps its
|
|
29
|
+
palette, the twelve product roles in light and in dark, as data in its own
|
|
30
|
+
package, and builds its theme once.
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { defineProductTheme } from '@kanso-labs/kanso-ui-core'
|
|
34
|
+
|
|
35
|
+
const productTheme = defineProductTheme({
|
|
36
|
+
dark: { accent: '#cdb0f5', onAccent: '#2a0d4a' /* …the other ten roles */ },
|
|
37
|
+
light: { accent: '#6b3fa0', onAccent: '#ffffff' /* … */ },
|
|
38
|
+
})
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Every colour that reads a product role follows it, `primary` and `focus-ring`
|
|
42
|
+
among them. `defineProductTheme` holds the colours to Kanso's contrast targets,
|
|
43
|
+
WCAG 2's 4.5:1 for text and 3:1 for the rest, in both schemes, and throws a
|
|
44
|
+
`ProductThemeError` naming each pair that misses one. The theme it returns holds
|
|
45
|
+
`light` and `dark`, every property at its value in that scheme, and `changes`,
|
|
46
|
+
only the colours the product moves. Both libraries' `ThemeScope` is to take it
|
|
47
|
+
as `productTheme`.
|
|
24
48
|
|
|
25
49
|
## Development
|
|
26
50
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { type KuiTheme, breakpoints, dark, light };
|
|
1
|
+
import { a as ProductThemeError, c as ProductRole, d as light, f as productRoles, i as ProductTheme, l as breakpoints, n as ProductColors, o as defineProductTheme, r as ProductPalette, s as KuiTheme, t as ContrastFailure, u as dark } from "./product-theme-D117EbtF.js";
|
|
2
|
+
export { type ContrastFailure, type KuiTheme, type ProductColors, type ProductPalette, type ProductRole, type ProductTheme, ProductThemeError, breakpoints, dark, defineProductTheme, light, productRoles };
|
package/dist/index.js
CHANGED
|
@@ -1,423 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/** Every property at its value in the light scheme, as `tokens.css` declares it. */
|
|
3
|
-
const light = {
|
|
4
|
-
"--kui-color-background": "#fef7ff",
|
|
5
|
-
"--kui-color-error": "#b3261e",
|
|
6
|
-
"--kui-color-error-container": "#f9dedc",
|
|
7
|
-
"--kui-color-inverse-error": "#f2b8b5",
|
|
8
|
-
"--kui-color-inverse-on-surface": "#f5eff7",
|
|
9
|
-
"--kui-color-inverse-primary": "#d0bcff",
|
|
10
|
-
"--kui-color-inverse-surface": "#322f35",
|
|
11
|
-
"--kui-color-negative": "#a04022",
|
|
12
|
-
"--kui-color-negative-container": "#ffdbd1",
|
|
13
|
-
"--kui-color-on-background": "#1d1b20",
|
|
14
|
-
"--kui-color-on-error": "#ffffff",
|
|
15
|
-
"--kui-color-on-error-container": "#410e0b",
|
|
16
|
-
"--kui-color-on-negative": "#ffffff",
|
|
17
|
-
"--kui-color-on-negative-container": "#3a0a00",
|
|
18
|
-
"--kui-color-on-positive": "#ffffff",
|
|
19
|
-
"--kui-color-on-positive-container": "#002115",
|
|
20
|
-
"--kui-color-on-primary": "#ffffff",
|
|
21
|
-
"--kui-color-on-primary-container": "#21005d",
|
|
22
|
-
"--kui-color-on-primary-fixed": "#21005d",
|
|
23
|
-
"--kui-color-on-primary-fixed-variant": "#4f378b",
|
|
24
|
-
"--kui-color-on-secondary": "#ffffff",
|
|
25
|
-
"--kui-color-on-secondary-container": "#1d192b",
|
|
26
|
-
"--kui-color-on-secondary-fixed": "#1d192b",
|
|
27
|
-
"--kui-color-on-secondary-fixed-variant": "#4a4458",
|
|
28
|
-
"--kui-color-on-surface": "#1d1b20",
|
|
29
|
-
"--kui-color-on-surface-variant": "#49454f",
|
|
30
|
-
"--kui-color-on-tertiary": "#ffffff",
|
|
31
|
-
"--kui-color-on-tertiary-container": "#31111d",
|
|
32
|
-
"--kui-color-on-tertiary-fixed": "#31111d",
|
|
33
|
-
"--kui-color-on-tertiary-fixed-variant": "#633b48",
|
|
34
|
-
"--kui-color-outline": "#79747e",
|
|
35
|
-
"--kui-color-outline-variant": "#cac4d0",
|
|
36
|
-
"--kui-color-positive": "#006c4d",
|
|
37
|
-
"--kui-color-positive-container": "#90f6ca",
|
|
38
|
-
"--kui-color-primary": "#6750a4",
|
|
39
|
-
"--kui-color-primary-container": "#eaddff",
|
|
40
|
-
"--kui-color-primary-fixed": "#eaddff",
|
|
41
|
-
"--kui-color-primary-fixed-dim": "#d0bcff",
|
|
42
|
-
"--kui-color-scrim": "#000000",
|
|
43
|
-
"--kui-color-secondary": "#625b71",
|
|
44
|
-
"--kui-color-secondary-container": "#e8def8",
|
|
45
|
-
"--kui-color-secondary-fixed": "#e8def8",
|
|
46
|
-
"--kui-color-secondary-fixed-dim": "#ccc2dc",
|
|
47
|
-
"--kui-color-shadow": "#000000",
|
|
48
|
-
"--kui-color-surface": "#fef7ff",
|
|
49
|
-
"--kui-color-surface-bright": "#fef7ff",
|
|
50
|
-
"--kui-color-surface-container": "#f3edf7",
|
|
51
|
-
"--kui-color-surface-container-high": "#ece6f0",
|
|
52
|
-
"--kui-color-surface-container-highest": "#e6e0e9",
|
|
53
|
-
"--kui-color-surface-container-low": "#f7f2fa",
|
|
54
|
-
"--kui-color-surface-container-lowest": "#ffffff",
|
|
55
|
-
"--kui-color-surface-dim": "#ded8e1",
|
|
56
|
-
"--kui-color-surface-tint": "#6750a4",
|
|
57
|
-
"--kui-color-surface-variant": "#e7e0ec",
|
|
58
|
-
"--kui-color-tertiary": "#7d5260",
|
|
59
|
-
"--kui-color-tertiary-container": "#ffd8e4",
|
|
60
|
-
"--kui-color-tertiary-fixed": "#ffd8e4",
|
|
61
|
-
"--kui-color-tertiary-fixed-dim": "#efb8c8",
|
|
62
|
-
"--kui-motion-duration-long1": "450ms",
|
|
63
|
-
"--kui-motion-duration-long2": "500ms",
|
|
64
|
-
"--kui-motion-duration-long3": "600ms",
|
|
65
|
-
"--kui-motion-duration-medium1": "250ms",
|
|
66
|
-
"--kui-motion-duration-medium2": "300ms",
|
|
67
|
-
"--kui-motion-duration-medium3": "350ms",
|
|
68
|
-
"--kui-motion-duration-short1": "100ms",
|
|
69
|
-
"--kui-motion-duration-short2": "150ms",
|
|
70
|
-
"--kui-motion-duration-short3": "200ms",
|
|
71
|
-
"--kui-motion-easing-emphasized": "cubic-bezier(0.2, 0, 0, 1)",
|
|
72
|
-
"--kui-motion-easing-emphasized-accelerate": "cubic-bezier(0.3, 0, 0.8, 0.15)",
|
|
73
|
-
"--kui-motion-easing-emphasized-decelerate": "cubic-bezier(0.05, 0.7, 0.1, 1)",
|
|
74
|
-
"--kui-motion-easing-spring-fast": "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
75
|
-
"--kui-motion-easing-spring-slow": "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
76
|
-
"--kui-motion-easing-standard": "cubic-bezier(0.2, 0, 0, 1)",
|
|
77
|
-
"--kui-radius-circle": "9999px",
|
|
78
|
-
"--kui-radius-lg": "16px",
|
|
79
|
-
"--kui-radius-md": "12px",
|
|
80
|
-
"--kui-radius-none": "0px",
|
|
81
|
-
"--kui-radius-pill": "9999px",
|
|
82
|
-
"--kui-radius-sm": "8px",
|
|
83
|
-
"--kui-radius-xl": "28px",
|
|
84
|
-
"--kui-radius-xs": "4px",
|
|
85
|
-
"--kui-shadow-elevation1": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)",
|
|
86
|
-
"--kui-shadow-elevation2": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)",
|
|
87
|
-
"--kui-shadow-elevation3": "0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)",
|
|
88
|
-
"--kui-shadow-elevation4": "0px 2px 3px 0px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)",
|
|
89
|
-
"--kui-shadow-elevation5": "0px 4px 4px 0px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)",
|
|
90
|
-
"--kui-sizing-control-lg": "56px",
|
|
91
|
-
"--kui-sizing-control-md": "48px",
|
|
92
|
-
"--kui-sizing-control-sm": "40px",
|
|
93
|
-
"--kui-sizing-control-xl": "96px",
|
|
94
|
-
"--kui-sizing-control-xs": "32px",
|
|
95
|
-
"--kui-sizing-control-xxl": "136px",
|
|
96
|
-
"--kui-sizing-icon-lg": "24px",
|
|
97
|
-
"--kui-sizing-icon-md": "20px",
|
|
98
|
-
"--kui-sizing-icon-sm": "18px",
|
|
99
|
-
"--kui-sizing-icon-xl": "40px",
|
|
100
|
-
"--kui-sizing-icon-xs": "16px",
|
|
101
|
-
"--kui-sizing-row-lg": "88px",
|
|
102
|
-
"--kui-sizing-row-md": "72px",
|
|
103
|
-
"--kui-sizing-row-sm": "56px",
|
|
104
|
-
"--kui-sizing-row-xs": "48px",
|
|
105
|
-
"--kui-spacing-lg": "16px",
|
|
106
|
-
"--kui-spacing-lg-plus": "20px",
|
|
107
|
-
"--kui-spacing-md": "12px",
|
|
108
|
-
"--kui-spacing-sm": "8px",
|
|
109
|
-
"--kui-spacing-xl": "24px",
|
|
110
|
-
"--kui-spacing-xs": "4px",
|
|
111
|
-
"--kui-spacing-xs-plus": "6px",
|
|
112
|
-
"--kui-spacing-xxl": "32px",
|
|
113
|
-
"--kui-spacing-xxs": "2px",
|
|
114
|
-
"--kui-spacing-xxxl": "40px",
|
|
115
|
-
"--kui-state-layer-opacity-disabled-container": "0.12",
|
|
116
|
-
"--kui-state-layer-opacity-disabled-content": "0.38",
|
|
117
|
-
"--kui-state-layer-opacity-dragged": "0.16",
|
|
118
|
-
"--kui-state-layer-opacity-focus": "0.1",
|
|
119
|
-
"--kui-state-layer-opacity-hover": "0.08",
|
|
120
|
-
"--kui-state-layer-opacity-pressed": "0.1",
|
|
121
|
-
"--kui-typography-body-large-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
122
|
-
"--kui-typography-body-large-line-height": "24px",
|
|
123
|
-
"--kui-typography-body-large-size": "16px",
|
|
124
|
-
"--kui-typography-body-large-tracking": "0.5px",
|
|
125
|
-
"--kui-typography-body-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
126
|
-
"--kui-typography-body-medium-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
127
|
-
"--kui-typography-body-medium-line-height": "20px",
|
|
128
|
-
"--kui-typography-body-medium-size": "14px",
|
|
129
|
-
"--kui-typography-body-medium-tracking": "0.25px",
|
|
130
|
-
"--kui-typography-body-medium-weight": "var(--kui-typography-weight-regular, 400)",
|
|
131
|
-
"--kui-typography-body-small-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
132
|
-
"--kui-typography-body-small-line-height": "16px",
|
|
133
|
-
"--kui-typography-body-small-size": "12px",
|
|
134
|
-
"--kui-typography-body-small-tracking": "0.4px",
|
|
135
|
-
"--kui-typography-body-small-weight": "var(--kui-typography-weight-regular, 400)",
|
|
136
|
-
"--kui-typography-display-large-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
137
|
-
"--kui-typography-display-large-line-height": "64px",
|
|
138
|
-
"--kui-typography-display-large-size": "57px",
|
|
139
|
-
"--kui-typography-display-large-tracking": "-0.25px",
|
|
140
|
-
"--kui-typography-display-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
141
|
-
"--kui-typography-display-medium-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
142
|
-
"--kui-typography-display-medium-line-height": "52px",
|
|
143
|
-
"--kui-typography-display-medium-size": "45px",
|
|
144
|
-
"--kui-typography-display-medium-tracking": "0px",
|
|
145
|
-
"--kui-typography-display-medium-weight": "var(--kui-typography-weight-regular, 400)",
|
|
146
|
-
"--kui-typography-display-small-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
147
|
-
"--kui-typography-display-small-line-height": "44px",
|
|
148
|
-
"--kui-typography-display-small-size": "36px",
|
|
149
|
-
"--kui-typography-display-small-tracking": "0px",
|
|
150
|
-
"--kui-typography-display-small-weight": "var(--kui-typography-weight-regular, 400)",
|
|
151
|
-
"--kui-typography-font-family-brand": "'Roboto Serif', 'Iowan Old Style', Georgia, serif",
|
|
152
|
-
"--kui-typography-font-family-mono": "'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace",
|
|
153
|
-
"--kui-typography-font-family-plain": "'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
154
|
-
"--kui-typography-headline-large-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
155
|
-
"--kui-typography-headline-large-line-height": "40px",
|
|
156
|
-
"--kui-typography-headline-large-size": "32px",
|
|
157
|
-
"--kui-typography-headline-large-tracking": "0px",
|
|
158
|
-
"--kui-typography-headline-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
159
|
-
"--kui-typography-headline-medium-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
160
|
-
"--kui-typography-headline-medium-line-height": "36px",
|
|
161
|
-
"--kui-typography-headline-medium-size": "28px",
|
|
162
|
-
"--kui-typography-headline-medium-tracking": "0px",
|
|
163
|
-
"--kui-typography-headline-medium-weight": "var(--kui-typography-weight-regular, 400)",
|
|
164
|
-
"--kui-typography-headline-small-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
165
|
-
"--kui-typography-headline-small-line-height": "32px",
|
|
166
|
-
"--kui-typography-headline-small-size": "24px",
|
|
167
|
-
"--kui-typography-headline-small-tracking": "0px",
|
|
168
|
-
"--kui-typography-headline-small-weight": "var(--kui-typography-weight-regular, 400)",
|
|
169
|
-
"--kui-typography-label-large-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
170
|
-
"--kui-typography-label-large-line-height": "20px",
|
|
171
|
-
"--kui-typography-label-large-size": "14px",
|
|
172
|
-
"--kui-typography-label-large-tracking": "0.1px",
|
|
173
|
-
"--kui-typography-label-large-weight": "var(--kui-typography-weight-medium, 500)",
|
|
174
|
-
"--kui-typography-label-medium-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
175
|
-
"--kui-typography-label-medium-line-height": "16px",
|
|
176
|
-
"--kui-typography-label-medium-size": "12px",
|
|
177
|
-
"--kui-typography-label-medium-tracking": "0.5px",
|
|
178
|
-
"--kui-typography-label-medium-weight": "var(--kui-typography-weight-medium, 500)",
|
|
179
|
-
"--kui-typography-label-small-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
180
|
-
"--kui-typography-label-small-line-height": "16px",
|
|
181
|
-
"--kui-typography-label-small-size": "11px",
|
|
182
|
-
"--kui-typography-label-small-tracking": "0.5px",
|
|
183
|
-
"--kui-typography-label-small-weight": "var(--kui-typography-weight-medium, 500)",
|
|
184
|
-
"--kui-typography-title-large-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
185
|
-
"--kui-typography-title-large-line-height": "28px",
|
|
186
|
-
"--kui-typography-title-large-size": "22px",
|
|
187
|
-
"--kui-typography-title-large-tracking": "0px",
|
|
188
|
-
"--kui-typography-title-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
189
|
-
"--kui-typography-title-medium-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
190
|
-
"--kui-typography-title-medium-line-height": "24px",
|
|
191
|
-
"--kui-typography-title-medium-size": "16px",
|
|
192
|
-
"--kui-typography-title-medium-tracking": "0.15px",
|
|
193
|
-
"--kui-typography-title-medium-weight": "var(--kui-typography-weight-medium, 500)",
|
|
194
|
-
"--kui-typography-title-small-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
195
|
-
"--kui-typography-title-small-line-height": "20px",
|
|
196
|
-
"--kui-typography-title-small-size": "14px",
|
|
197
|
-
"--kui-typography-title-small-tracking": "0.1px",
|
|
198
|
-
"--kui-typography-title-small-weight": "var(--kui-typography-weight-medium, 500)",
|
|
199
|
-
"--kui-typography-weight-bold": "700",
|
|
200
|
-
"--kui-typography-weight-medium": "500",
|
|
201
|
-
"--kui-typography-weight-regular": "400"
|
|
202
|
-
};
|
|
203
|
-
/**
|
|
204
|
-
* Every property at its value in the dark scheme: the colours `tokens.css`
|
|
205
|
-
* declares under `prefers-color-scheme: dark`, over every other property at
|
|
206
|
-
* the one value it has in both.
|
|
207
|
-
*/
|
|
208
|
-
const dark = {
|
|
209
|
-
"--kui-color-background": "#141218",
|
|
210
|
-
"--kui-color-error": "#f2b8b5",
|
|
211
|
-
"--kui-color-error-container": "#8c1d18",
|
|
212
|
-
"--kui-color-inverse-error": "#b3261e",
|
|
213
|
-
"--kui-color-inverse-on-surface": "#322f35",
|
|
214
|
-
"--kui-color-inverse-primary": "#6750a4",
|
|
215
|
-
"--kui-color-inverse-surface": "#e6e0e9",
|
|
216
|
-
"--kui-color-negative": "#ffb59f",
|
|
217
|
-
"--kui-color-negative-container": "#81290c",
|
|
218
|
-
"--kui-color-on-background": "#e6e0e9",
|
|
219
|
-
"--kui-color-on-error": "#601410",
|
|
220
|
-
"--kui-color-on-error-container": "#f9dedc",
|
|
221
|
-
"--kui-color-on-negative": "#5f1600",
|
|
222
|
-
"--kui-color-on-negative-container": "#ffdbd1",
|
|
223
|
-
"--kui-color-on-positive": "#003827",
|
|
224
|
-
"--kui-color-on-positive-container": "#90f6ca",
|
|
225
|
-
"--kui-color-on-primary": "#381e72",
|
|
226
|
-
"--kui-color-on-primary-container": "#eaddff",
|
|
227
|
-
"--kui-color-on-primary-fixed": "#21005d",
|
|
228
|
-
"--kui-color-on-primary-fixed-variant": "#4f378b",
|
|
229
|
-
"--kui-color-on-secondary": "#332d41",
|
|
230
|
-
"--kui-color-on-secondary-container": "#e8def8",
|
|
231
|
-
"--kui-color-on-secondary-fixed": "#1d192b",
|
|
232
|
-
"--kui-color-on-secondary-fixed-variant": "#4a4458",
|
|
233
|
-
"--kui-color-on-surface": "#e6e0e9",
|
|
234
|
-
"--kui-color-on-surface-variant": "#cac4d0",
|
|
235
|
-
"--kui-color-on-tertiary": "#492532",
|
|
236
|
-
"--kui-color-on-tertiary-container": "#ffd8e4",
|
|
237
|
-
"--kui-color-on-tertiary-fixed": "#31111d",
|
|
238
|
-
"--kui-color-on-tertiary-fixed-variant": "#633b48",
|
|
239
|
-
"--kui-color-outline": "#938f99",
|
|
240
|
-
"--kui-color-outline-variant": "#49454f",
|
|
241
|
-
"--kui-color-positive": "#74d9af",
|
|
242
|
-
"--kui-color-positive-container": "#00513a",
|
|
243
|
-
"--kui-color-primary": "#d0bcff",
|
|
244
|
-
"--kui-color-primary-container": "#4f378b",
|
|
245
|
-
"--kui-color-primary-fixed": "#eaddff",
|
|
246
|
-
"--kui-color-primary-fixed-dim": "#d0bcff",
|
|
247
|
-
"--kui-color-scrim": "#000000",
|
|
248
|
-
"--kui-color-secondary": "#ccc2dc",
|
|
249
|
-
"--kui-color-secondary-container": "#4a4458",
|
|
250
|
-
"--kui-color-secondary-fixed": "#e8def8",
|
|
251
|
-
"--kui-color-secondary-fixed-dim": "#ccc2dc",
|
|
252
|
-
"--kui-color-shadow": "#000000",
|
|
253
|
-
"--kui-color-surface": "#141218",
|
|
254
|
-
"--kui-color-surface-bright": "#3b383e",
|
|
255
|
-
"--kui-color-surface-container": "#211f26",
|
|
256
|
-
"--kui-color-surface-container-high": "#2b2930",
|
|
257
|
-
"--kui-color-surface-container-highest": "#36343b",
|
|
258
|
-
"--kui-color-surface-container-low": "#1d1b20",
|
|
259
|
-
"--kui-color-surface-container-lowest": "#0f0d13",
|
|
260
|
-
"--kui-color-surface-dim": "#141218",
|
|
261
|
-
"--kui-color-surface-tint": "#d0bcff",
|
|
262
|
-
"--kui-color-surface-variant": "#49454f",
|
|
263
|
-
"--kui-color-tertiary": "#efb8c8",
|
|
264
|
-
"--kui-color-tertiary-container": "#633b48",
|
|
265
|
-
"--kui-color-tertiary-fixed": "#ffd8e4",
|
|
266
|
-
"--kui-color-tertiary-fixed-dim": "#efb8c8",
|
|
267
|
-
"--kui-motion-duration-long1": "450ms",
|
|
268
|
-
"--kui-motion-duration-long2": "500ms",
|
|
269
|
-
"--kui-motion-duration-long3": "600ms",
|
|
270
|
-
"--kui-motion-duration-medium1": "250ms",
|
|
271
|
-
"--kui-motion-duration-medium2": "300ms",
|
|
272
|
-
"--kui-motion-duration-medium3": "350ms",
|
|
273
|
-
"--kui-motion-duration-short1": "100ms",
|
|
274
|
-
"--kui-motion-duration-short2": "150ms",
|
|
275
|
-
"--kui-motion-duration-short3": "200ms",
|
|
276
|
-
"--kui-motion-easing-emphasized": "cubic-bezier(0.2, 0, 0, 1)",
|
|
277
|
-
"--kui-motion-easing-emphasized-accelerate": "cubic-bezier(0.3, 0, 0.8, 0.15)",
|
|
278
|
-
"--kui-motion-easing-emphasized-decelerate": "cubic-bezier(0.05, 0.7, 0.1, 1)",
|
|
279
|
-
"--kui-motion-easing-spring-fast": "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
280
|
-
"--kui-motion-easing-spring-slow": "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
281
|
-
"--kui-motion-easing-standard": "cubic-bezier(0.2, 0, 0, 1)",
|
|
282
|
-
"--kui-radius-circle": "9999px",
|
|
283
|
-
"--kui-radius-lg": "16px",
|
|
284
|
-
"--kui-radius-md": "12px",
|
|
285
|
-
"--kui-radius-none": "0px",
|
|
286
|
-
"--kui-radius-pill": "9999px",
|
|
287
|
-
"--kui-radius-sm": "8px",
|
|
288
|
-
"--kui-radius-xl": "28px",
|
|
289
|
-
"--kui-radius-xs": "4px",
|
|
290
|
-
"--kui-shadow-elevation1": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)",
|
|
291
|
-
"--kui-shadow-elevation2": "0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15)",
|
|
292
|
-
"--kui-shadow-elevation3": "0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)",
|
|
293
|
-
"--kui-shadow-elevation4": "0px 2px 3px 0px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)",
|
|
294
|
-
"--kui-shadow-elevation5": "0px 4px 4px 0px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)",
|
|
295
|
-
"--kui-sizing-control-lg": "56px",
|
|
296
|
-
"--kui-sizing-control-md": "48px",
|
|
297
|
-
"--kui-sizing-control-sm": "40px",
|
|
298
|
-
"--kui-sizing-control-xl": "96px",
|
|
299
|
-
"--kui-sizing-control-xs": "32px",
|
|
300
|
-
"--kui-sizing-control-xxl": "136px",
|
|
301
|
-
"--kui-sizing-icon-lg": "24px",
|
|
302
|
-
"--kui-sizing-icon-md": "20px",
|
|
303
|
-
"--kui-sizing-icon-sm": "18px",
|
|
304
|
-
"--kui-sizing-icon-xl": "40px",
|
|
305
|
-
"--kui-sizing-icon-xs": "16px",
|
|
306
|
-
"--kui-sizing-row-lg": "88px",
|
|
307
|
-
"--kui-sizing-row-md": "72px",
|
|
308
|
-
"--kui-sizing-row-sm": "56px",
|
|
309
|
-
"--kui-sizing-row-xs": "48px",
|
|
310
|
-
"--kui-spacing-lg": "16px",
|
|
311
|
-
"--kui-spacing-lg-plus": "20px",
|
|
312
|
-
"--kui-spacing-md": "12px",
|
|
313
|
-
"--kui-spacing-sm": "8px",
|
|
314
|
-
"--kui-spacing-xl": "24px",
|
|
315
|
-
"--kui-spacing-xs": "4px",
|
|
316
|
-
"--kui-spacing-xs-plus": "6px",
|
|
317
|
-
"--kui-spacing-xxl": "32px",
|
|
318
|
-
"--kui-spacing-xxs": "2px",
|
|
319
|
-
"--kui-spacing-xxxl": "40px",
|
|
320
|
-
"--kui-state-layer-opacity-disabled-container": "0.12",
|
|
321
|
-
"--kui-state-layer-opacity-disabled-content": "0.38",
|
|
322
|
-
"--kui-state-layer-opacity-dragged": "0.16",
|
|
323
|
-
"--kui-state-layer-opacity-focus": "0.1",
|
|
324
|
-
"--kui-state-layer-opacity-hover": "0.08",
|
|
325
|
-
"--kui-state-layer-opacity-pressed": "0.1",
|
|
326
|
-
"--kui-typography-body-large-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
327
|
-
"--kui-typography-body-large-line-height": "24px",
|
|
328
|
-
"--kui-typography-body-large-size": "16px",
|
|
329
|
-
"--kui-typography-body-large-tracking": "0.5px",
|
|
330
|
-
"--kui-typography-body-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
331
|
-
"--kui-typography-body-medium-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
332
|
-
"--kui-typography-body-medium-line-height": "20px",
|
|
333
|
-
"--kui-typography-body-medium-size": "14px",
|
|
334
|
-
"--kui-typography-body-medium-tracking": "0.25px",
|
|
335
|
-
"--kui-typography-body-medium-weight": "var(--kui-typography-weight-regular, 400)",
|
|
336
|
-
"--kui-typography-body-small-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
337
|
-
"--kui-typography-body-small-line-height": "16px",
|
|
338
|
-
"--kui-typography-body-small-size": "12px",
|
|
339
|
-
"--kui-typography-body-small-tracking": "0.4px",
|
|
340
|
-
"--kui-typography-body-small-weight": "var(--kui-typography-weight-regular, 400)",
|
|
341
|
-
"--kui-typography-display-large-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
342
|
-
"--kui-typography-display-large-line-height": "64px",
|
|
343
|
-
"--kui-typography-display-large-size": "57px",
|
|
344
|
-
"--kui-typography-display-large-tracking": "-0.25px",
|
|
345
|
-
"--kui-typography-display-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
346
|
-
"--kui-typography-display-medium-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
347
|
-
"--kui-typography-display-medium-line-height": "52px",
|
|
348
|
-
"--kui-typography-display-medium-size": "45px",
|
|
349
|
-
"--kui-typography-display-medium-tracking": "0px",
|
|
350
|
-
"--kui-typography-display-medium-weight": "var(--kui-typography-weight-regular, 400)",
|
|
351
|
-
"--kui-typography-display-small-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
352
|
-
"--kui-typography-display-small-line-height": "44px",
|
|
353
|
-
"--kui-typography-display-small-size": "36px",
|
|
354
|
-
"--kui-typography-display-small-tracking": "0px",
|
|
355
|
-
"--kui-typography-display-small-weight": "var(--kui-typography-weight-regular, 400)",
|
|
356
|
-
"--kui-typography-font-family-brand": "'Roboto Serif', 'Iowan Old Style', Georgia, serif",
|
|
357
|
-
"--kui-typography-font-family-mono": "'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace",
|
|
358
|
-
"--kui-typography-font-family-plain": "'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
359
|
-
"--kui-typography-headline-large-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
360
|
-
"--kui-typography-headline-large-line-height": "40px",
|
|
361
|
-
"--kui-typography-headline-large-size": "32px",
|
|
362
|
-
"--kui-typography-headline-large-tracking": "0px",
|
|
363
|
-
"--kui-typography-headline-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
364
|
-
"--kui-typography-headline-medium-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
365
|
-
"--kui-typography-headline-medium-line-height": "36px",
|
|
366
|
-
"--kui-typography-headline-medium-size": "28px",
|
|
367
|
-
"--kui-typography-headline-medium-tracking": "0px",
|
|
368
|
-
"--kui-typography-headline-medium-weight": "var(--kui-typography-weight-regular, 400)",
|
|
369
|
-
"--kui-typography-headline-small-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
370
|
-
"--kui-typography-headline-small-line-height": "32px",
|
|
371
|
-
"--kui-typography-headline-small-size": "24px",
|
|
372
|
-
"--kui-typography-headline-small-tracking": "0px",
|
|
373
|
-
"--kui-typography-headline-small-weight": "var(--kui-typography-weight-regular, 400)",
|
|
374
|
-
"--kui-typography-label-large-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
375
|
-
"--kui-typography-label-large-line-height": "20px",
|
|
376
|
-
"--kui-typography-label-large-size": "14px",
|
|
377
|
-
"--kui-typography-label-large-tracking": "0.1px",
|
|
378
|
-
"--kui-typography-label-large-weight": "var(--kui-typography-weight-medium, 500)",
|
|
379
|
-
"--kui-typography-label-medium-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
380
|
-
"--kui-typography-label-medium-line-height": "16px",
|
|
381
|
-
"--kui-typography-label-medium-size": "12px",
|
|
382
|
-
"--kui-typography-label-medium-tracking": "0.5px",
|
|
383
|
-
"--kui-typography-label-medium-weight": "var(--kui-typography-weight-medium, 500)",
|
|
384
|
-
"--kui-typography-label-small-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
385
|
-
"--kui-typography-label-small-line-height": "16px",
|
|
386
|
-
"--kui-typography-label-small-size": "11px",
|
|
387
|
-
"--kui-typography-label-small-tracking": "0.5px",
|
|
388
|
-
"--kui-typography-label-small-weight": "var(--kui-typography-weight-medium, 500)",
|
|
389
|
-
"--kui-typography-title-large-font": "var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)",
|
|
390
|
-
"--kui-typography-title-large-line-height": "28px",
|
|
391
|
-
"--kui-typography-title-large-size": "22px",
|
|
392
|
-
"--kui-typography-title-large-tracking": "0px",
|
|
393
|
-
"--kui-typography-title-large-weight": "var(--kui-typography-weight-regular, 400)",
|
|
394
|
-
"--kui-typography-title-medium-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
395
|
-
"--kui-typography-title-medium-line-height": "24px",
|
|
396
|
-
"--kui-typography-title-medium-size": "16px",
|
|
397
|
-
"--kui-typography-title-medium-tracking": "0.15px",
|
|
398
|
-
"--kui-typography-title-medium-weight": "var(--kui-typography-weight-medium, 500)",
|
|
399
|
-
"--kui-typography-title-small-font": "var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",
|
|
400
|
-
"--kui-typography-title-small-line-height": "20px",
|
|
401
|
-
"--kui-typography-title-small-size": "14px",
|
|
402
|
-
"--kui-typography-title-small-tracking": "0.1px",
|
|
403
|
-
"--kui-typography-title-small-weight": "var(--kui-typography-weight-medium, 500)",
|
|
404
|
-
"--kui-typography-weight-bold": "700",
|
|
405
|
-
"--kui-typography-weight-medium": "500",
|
|
406
|
-
"--kui-typography-weight-regular": "400"
|
|
407
|
-
};
|
|
408
|
-
/**
|
|
409
|
-
* The lower bound of each window size class, in px on the web and dp on
|
|
410
|
-
* native, smallest first. A media query cannot read a custom property, so
|
|
411
|
-
* neither library offers these as one to override, and `tokens.css` leaves
|
|
412
|
-
* them out.
|
|
413
|
-
*/
|
|
414
|
-
const breakpoints = {
|
|
415
|
-
compact: 0,
|
|
416
|
-
medium: 600,
|
|
417
|
-
expanded: 840,
|
|
418
|
-
large: 1200,
|
|
419
|
-
extraLarge: 1600
|
|
420
|
-
};
|
|
421
|
-
export { breakpoints, dark, light };
|
|
422
|
-
|
|
423
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { t as ProductThemeError, r as breakpoints, i as dark, n as defineProductTheme, a as light, o as productRoles } from "./product-theme-CfDDgv7F.js";
|