sit-onyx 1.0.0-beta.2 → 1.0.0-beta.21
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/dist/components/OnyxCheckbox/OnyxCheckbox.vue.d.ts +2 -2
- package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/OnyxCheckboxGroup/types.d.ts +3 -2
- package/dist/components/OnyxEmpty/OnyxEmpty.vue.d.ts +11 -1
- package/dist/components/OnyxFormElement/OnyxFormElement.vue.d.ts +9 -2
- package/dist/components/OnyxFormElement/types.d.ts +6 -0
- package/dist/components/OnyxMobileNavButton/OnyxMobileNavButton.vue.d.ts +2 -2
- package/dist/components/OnyxMobileNavButton/types.d.ts +4 -0
- package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/OnyxFlyoutMenu.vue.d.ts +9 -3
- package/dist/components/OnyxNavBar/modules/OnyxMenuItem/types.d.ts +1 -1
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/OnyxUserMenu.vue.d.ts +9 -1
- package/dist/components/OnyxNavBar/modules/OnyxUserMenu/UserMenuLayout.vue.d.ts +10 -4
- package/dist/components/OnyxRadioButton/OnyxRadioButton.vue.d.ts +2 -2
- package/dist/components/OnyxRadioGroup/OnyxRadioGroup.vue.d.ts +2 -2
- package/dist/components/OnyxRadioGroup/types.d.ts +1 -1
- package/dist/components/OnyxSelect/OnyxSelect.vue.d.ts +5 -5
- package/dist/components/OnyxSelect/types.d.ts +21 -5
- package/dist/components/OnyxSelectInput/OnyxSelectInput.vue.d.ts +2 -2
- package/dist/components/OnyxSelectInput/types.d.ts +5 -12
- package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +1 -1
- package/dist/components/OnyxStepper/OnyxStepper.vue.d.ts +50 -0
- package/dist/components/OnyxStepper/types.d.ts +56 -0
- package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +1 -1
- package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +1 -1
- package/dist/components/OnyxTooltip/types.d.ts +2 -1
- package/dist/composables/useCustomValidity.d.ts +13 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1682 -1417
- package/dist/style.css +1 -1
- package/dist/utils/attrs.d.ts +3 -3
- package/package.json +5 -8
- package/src/i18n/locales/de-DE.json +6 -1
- package/src/i18n/locales/en-US.json +6 -1
- package/src/styles/global.css +1 -1
- package/src/styles/index.scss +7 -4
- package/src/styles/mixins/checkbox.scss +1 -13
- package/src/styles/mixins/input.scss +49 -5
- package/src/styles/mixins/list.scss +2 -11
- package/src/styles/required.scss +1 -1
- package/src/styles/{dark.css → variables/dark.css} +1 -13
- package/src/styles/variables/density-compact.css +17 -0
- package/src/styles/variables/density-cozy.css +17 -0
- package/src/styles/variables/density-default.css +18 -0
- package/src/styles/{light.css → variables/light.css} +1 -13
- package/src/styles/variables/spacing.css +20 -0
- package/src/styles/{themes → variables/themes}/kaufland.css +2 -2
- package/src/styles/{themes → variables/themes}/lidl.css +2 -2
- package/src/styles/{themes → variables/themes}/onyx.css +2 -2
- package/src/styles/{themes → variables/themes}/onyx.json +1 -1
- package/src/styles/{themes → variables/themes}/twogo.css +2 -2
- package/src/styles/density.scss +0 -41
- package/src/types/breakpoints.ts +0 -14
- package/src/types/colors.ts +0 -10
- package/src/types/components.ts +0 -59
- package/src/types/fonts.ts +0 -7
- package/src/types/i18n.ts +0 -68
- package/src/types/index.ts +0 -10
- package/src/types/themes.ts +0 -1
- package/src/types/utils.ts +0 -4
package/dist/utils/attrs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type HTMLAttributes } from "vue";
|
|
2
2
|
/**
|
|
3
3
|
* Extension of `useAttrs` which splits root attributes from other properties.
|
|
4
4
|
* As root properties are considered: `style` and `class`.
|
|
@@ -9,9 +9,9 @@ export declare const useRootAttrs: () => {
|
|
|
9
9
|
/**
|
|
10
10
|
* Contains the `class` and `style` fall-through attributes, if set.
|
|
11
11
|
*/
|
|
12
|
-
rootAttrs: import("vue").ComputedRef<Pick<
|
|
12
|
+
rootAttrs: import("vue").ComputedRef<Pick<HTMLAttributes, "class" | "style">>;
|
|
13
13
|
/**
|
|
14
14
|
* Contains all fall-through attributes except `class` and `style`.
|
|
15
15
|
*/
|
|
16
|
-
restAttrs: import("vue").ComputedRef<Omit<
|
|
16
|
+
restAttrs: import("vue").ComputedRef<Omit<HTMLAttributes, "class" | "style">>;
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sit-onyx",
|
|
3
3
|
"description": "A design system and Vue.js component library created by Schwarz IT",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.21",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Schwarz IT KG",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
10
|
"src/i18n/locales",
|
|
11
|
-
"src/styles"
|
|
12
|
-
"src/types"
|
|
11
|
+
"src/styles"
|
|
13
12
|
],
|
|
14
13
|
"types": "./dist/index.d.ts",
|
|
15
14
|
"exports": {
|
|
@@ -23,8 +22,7 @@
|
|
|
23
22
|
"./locales/*": "./src/i18n/locales/*",
|
|
24
23
|
"./src/styles/*": "./src/styles/*",
|
|
25
24
|
"./breakpoints.scss": "./src/styles/breakpoints.scss",
|
|
26
|
-
"./
|
|
27
|
-
"./themes/*": "./src/styles/themes/*"
|
|
25
|
+
"./themes/*": "./src/styles/variables/themes/*"
|
|
28
26
|
},
|
|
29
27
|
"homepage": "https://onyx.schwarz",
|
|
30
28
|
"repository": {
|
|
@@ -45,11 +43,10 @@
|
|
|
45
43
|
"devDependencies": {
|
|
46
44
|
"@axe-core/playwright": "^4.9.1",
|
|
47
45
|
"eslint-plugin-vue-scoped-css": "^2.8.1",
|
|
48
|
-
"vue-component-type-helpers": "^2.0.
|
|
49
|
-
"@sit-onyx/headless": "^1.0.0-beta.
|
|
46
|
+
"vue-component-type-helpers": "^2.0.29",
|
|
47
|
+
"@sit-onyx/headless": "^1.0.0-beta.4"
|
|
50
48
|
},
|
|
51
49
|
"scripts": {
|
|
52
|
-
"start": "pnpm run dev",
|
|
53
50
|
"dev": "storybook dev -p 6006 --no-open",
|
|
54
51
|
"build": "vite build && vue-tsc -p tsconfig.app.json --composite false",
|
|
55
52
|
"build:storybook": "storybook build",
|
|
@@ -65,12 +65,17 @@
|
|
|
65
65
|
"empty": "Keine Daten verfügbar",
|
|
66
66
|
"noMatch": "Kein Element passt zum Suchtext",
|
|
67
67
|
"searchInputLabel": "Liste durchsuchen",
|
|
68
|
-
"clearSearch": "Suchtext löschen"
|
|
68
|
+
"clearSearch": "Suchtext löschen",
|
|
69
|
+
"searchPlaceholder": "Suchen"
|
|
69
70
|
},
|
|
70
71
|
"selections": {
|
|
71
72
|
"selectAll": "Alle auswählen",
|
|
72
73
|
"currentSelection": "{n} ausgewählt"
|
|
73
74
|
},
|
|
75
|
+
"stepper": {
|
|
76
|
+
"decrement": "Verringern um {stepSize}",
|
|
77
|
+
"increment": "Erhöhen um {stepSize}"
|
|
78
|
+
},
|
|
74
79
|
"table": {
|
|
75
80
|
"empty": "Diese Tabelle ist leer."
|
|
76
81
|
},
|
|
@@ -65,12 +65,17 @@
|
|
|
65
65
|
"empty": "No data available",
|
|
66
66
|
"noMatch": "No item matches your search",
|
|
67
67
|
"searchInputLabel": "Filter the list items",
|
|
68
|
-
"clearSearch": "Clear search filter"
|
|
68
|
+
"clearSearch": "Clear search filter",
|
|
69
|
+
"searchPlaceholder": "Search"
|
|
69
70
|
},
|
|
70
71
|
"selections": {
|
|
71
72
|
"selectAll": "Select all",
|
|
72
73
|
"currentSelection": "{n} selected"
|
|
73
74
|
},
|
|
75
|
+
"stepper": {
|
|
76
|
+
"decrement": "Decrement by {stepSize}",
|
|
77
|
+
"increment": "Increment by {stepSize}"
|
|
78
|
+
},
|
|
74
79
|
"table": {
|
|
75
80
|
"empty": "This table is empty."
|
|
76
81
|
},
|
package/src/styles/global.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Define the layer cascade layer priorities: Will apply from left-to-right.
|
|
3
3
|
* We have to keep the layers in sync with layers.scss. We can't reference it in here,
|
|
4
|
-
* as the projects can import this file separately from the other stylesheets.
|
|
4
|
+
* as the projects can import this file separately from the other stylesheets.
|
|
5
5
|
*/
|
|
6
6
|
@layer onyx.reset, onyx.utility, onyx.component, onyx.density;
|
|
7
7
|
|
package/src/styles/index.scss
CHANGED
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
@use "layers"; // Must be imported first!
|
|
6
6
|
@use "root.scss";
|
|
7
7
|
@use "grid.scss";
|
|
8
|
-
@use "density.scss";
|
|
9
8
|
@use "z-indices.scss";
|
|
10
9
|
@use "required.scss";
|
|
11
10
|
@use "fonts.scss";
|
|
12
11
|
@use "breakpoints.scss";
|
|
13
12
|
|
|
14
|
-
@use "themes/onyx.css";
|
|
15
|
-
@use "light.css";
|
|
16
|
-
@use "dark.css";
|
|
13
|
+
@use "variables/themes/onyx.css";
|
|
14
|
+
@use "variables/light.css";
|
|
15
|
+
@use "variables/dark.css";
|
|
16
|
+
@use "variables/density-compact.css";
|
|
17
|
+
@use "variables/density-default.css";
|
|
18
|
+
@use "variables/density-cozy.css";
|
|
19
|
+
@use "variables/spacing.css";
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
// this style sheet contains styles for the checkbox-box
|
|
2
2
|
// that needs to be shared between OnyxCheckbox and OnyxSelect
|
|
3
3
|
@use "layers";
|
|
4
|
-
@use "density.scss";
|
|
5
4
|
|
|
6
5
|
@mixin variables() {
|
|
7
6
|
--onyx-checkbox-input-size: 1rem;
|
|
8
|
-
|
|
9
|
-
@include density.compact {
|
|
10
|
-
--onyx-checkbox-input-padding: var(--onyx-spacing-xs);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@include density.default {
|
|
14
|
-
--onyx-checkbox-input-padding: var(--onyx-spacing-sm);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@include density.cozy {
|
|
18
|
-
--onyx-checkbox-input-padding: var(--onyx-spacing-md);
|
|
19
|
-
}
|
|
7
|
+
--onyx-checkbox-input-padding: var(--onyx-density-sm);
|
|
20
8
|
}
|
|
21
9
|
|
|
22
10
|
@mixin define-checked-background($state, $color) {
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: center;
|
|
19
|
-
gap: var(--onyx-
|
|
19
|
+
gap: var(--onyx-density-xs);
|
|
20
20
|
|
|
21
21
|
font-size: 1rem;
|
|
22
22
|
line-height: 1.5rem;
|
|
23
|
-
padding: $vertical-padding var(--onyx-
|
|
23
|
+
padding: $vertical-padding var(--onyx-density-sm);
|
|
24
24
|
height: calc(1lh + 2 * #{$vertical-padding});
|
|
25
25
|
|
|
26
26
|
&:has(#{$base-selector}__native:read-write:hover) {
|
|
@@ -64,6 +64,12 @@
|
|
|
64
64
|
outline-color: var(--onyx-color-base-neutral-200);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
&:has(#{$base-selector}__native:read-write) {
|
|
69
|
+
&:has(#{get-autofill-selectors("#{$base-selector}__native")}) {
|
|
70
|
+
background-color: var(--onyx-color-base-warning-100);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
&__loading {
|
|
@@ -105,6 +111,15 @@
|
|
|
105
111
|
&::selection {
|
|
106
112
|
background: var(--selection-color);
|
|
107
113
|
}
|
|
114
|
+
|
|
115
|
+
#{get-autofill-selectors("&")} {
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
-webkit-text-fill-color: var(--onyx-color-text-icons-neutral-intense);
|
|
118
|
+
|
|
119
|
+
// many browsers use "!important" to set the autofill background so we need this
|
|
120
|
+
// transition workaround to make the background transparent
|
|
121
|
+
transition: background-color calc(infinity * 1s);
|
|
122
|
+
}
|
|
108
123
|
}
|
|
109
124
|
|
|
110
125
|
&:has(&__native:disabled) {
|
|
@@ -121,18 +136,47 @@
|
|
|
121
136
|
}
|
|
122
137
|
|
|
123
138
|
@mixin define-skeleton-styles($height) {
|
|
139
|
+
$adjustment: var(--skeleton-label-density-adjustment, 0rem);
|
|
140
|
+
|
|
124
141
|
display: flex;
|
|
125
142
|
flex-direction: column;
|
|
126
|
-
gap: var(--onyx-
|
|
143
|
+
gap: calc(var(--onyx-density-3xs) + $adjustment);
|
|
127
144
|
line-height: 1.5rem;
|
|
128
145
|
|
|
129
146
|
&__label {
|
|
130
|
-
width: var(--onyx-
|
|
131
|
-
height: 1.25rem;
|
|
147
|
+
width: var(--onyx-density-3xl);
|
|
148
|
+
height: calc(1.25rem - $adjustment);
|
|
132
149
|
}
|
|
133
150
|
|
|
134
151
|
&__input {
|
|
135
152
|
width: 17rem;
|
|
153
|
+
max-width: 100%;
|
|
136
154
|
height: $height;
|
|
137
155
|
}
|
|
156
|
+
|
|
157
|
+
@include density.compact {
|
|
158
|
+
// the skeleton gap would be 0 in compact density so we shrink the label size a bit and increase the gap so it does not look off
|
|
159
|
+
--skeleton-label-density-adjustment: var(--onyx-spacing-5xs);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Gets a comma separated CSS selector for the input autofill.
|
|
165
|
+
* Includes default browser selectors as well as some specific selectors e.g. for certain password managers.
|
|
166
|
+
*/
|
|
167
|
+
@function get-autofill-selectors($prefix: "") {
|
|
168
|
+
$output: "";
|
|
169
|
+
$selectors: (":autofill", "[data-test-autofill]", "[data-com-onepassword-filled]");
|
|
170
|
+
|
|
171
|
+
@each $selector in $selectors {
|
|
172
|
+
$prefixed-selector: $prefix + $selector;
|
|
173
|
+
|
|
174
|
+
@if $output == "" {
|
|
175
|
+
$output: $prefixed-selector;
|
|
176
|
+
} @else {
|
|
177
|
+
$output: $output + ", " + $prefixed-selector;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@return $output;
|
|
138
182
|
}
|
|
@@ -23,26 +23,17 @@
|
|
|
23
23
|
|
|
24
24
|
&:not(:last-of-type) {
|
|
25
25
|
border-bottom: var(--onyx-1px-in-rem) solid var(--onyx-color-base-neutral-300);
|
|
26
|
-
margin-bottom: var(--onyx-
|
|
26
|
+
margin-bottom: var(--onyx-density-xs);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&__group-name {
|
|
31
31
|
display: block;
|
|
32
|
-
padding: 0 var(--onyx-
|
|
32
|
+
padding: 0 var(--onyx-density-sm);
|
|
33
33
|
color: var(--onyx-color-text-icons-neutral-medium);
|
|
34
34
|
font-weight: 600;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
&__message {
|
|
38
|
-
color: var(--onyx-color-text-icons-neutral-soft);
|
|
39
|
-
display: inline-block;
|
|
40
|
-
width: 100%;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
text-align: right;
|
|
43
|
-
padding: $wrapper-padding var(--onyx-spacing-sm) 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
37
|
&:has(&__wrapper:focus-visible) {
|
|
47
38
|
outline: 0.25rem solid var(--onyx-color-base-primary-200);
|
|
48
39
|
}
|
package/src/styles/required.scss
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
content: var(--onyx-use-optional, var(--onyx-global-optional-text, "(optional)"));
|
|
37
37
|
color: var(--onyx-use-optional, var(--onyx-color-text-icons-neutral-soft));
|
|
38
|
-
padding-left: var(--onyx-use-optional, var(--onyx-
|
|
38
|
+
padding-left: var(--onyx-use-optional, var(--onyx-density-xs));
|
|
39
39
|
hyphens: var(--onyx-use-optional, none);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly.
|
|
3
3
|
* This file contains the specific variables for the "dark" theme.
|
|
4
|
-
* Imported from Figma API on
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:36 GMT
|
|
5
5
|
*/
|
|
6
6
|
:where(.dark) {
|
|
7
7
|
--onyx-color-base-background-blank: var(--onyx-color-themed-neutral-1100);
|
|
@@ -117,16 +117,4 @@
|
|
|
117
117
|
--onyx-radius-sm: var(--onyx-number-radius-200);
|
|
118
118
|
--onyx-radius-xl: var(--onyx-number-radius-500);
|
|
119
119
|
--onyx-radius-xs: var(--onyx-number-radius-100);
|
|
120
|
-
--onyx-spacing-2xl: var(--onyx-number-spacing-700);
|
|
121
|
-
--onyx-spacing-2xs: var(--onyx-number-spacing-300);
|
|
122
|
-
--onyx-spacing-3xl: var(--onyx-number-spacing-800);
|
|
123
|
-
--onyx-spacing-3xs: var(--onyx-number-spacing-250);
|
|
124
|
-
--onyx-spacing-4xl: var(--onyx-number-spacing-900);
|
|
125
|
-
--onyx-spacing-4xs: var(--onyx-number-spacing-200);
|
|
126
|
-
--onyx-spacing-5xs: var(--onyx-number-spacing-100);
|
|
127
|
-
--onyx-spacing-lg: var(--onyx-number-spacing-500);
|
|
128
|
-
--onyx-spacing-md: var(--onyx-number-spacing-400);
|
|
129
|
-
--onyx-spacing-sm: var(--onyx-number-spacing-350);
|
|
130
|
-
--onyx-spacing-xl: var(--onyx-number-spacing-600);
|
|
131
|
-
--onyx-spacing-xs: var(--onyx-number-spacing-325);
|
|
132
120
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly.
|
|
3
|
+
* This file contains the specific variables for the "compact" theme.
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:53 GMT
|
|
5
|
+
*/
|
|
6
|
+
:where(.onyx-density-compact) {
|
|
7
|
+
--onyx-density-2xl: var(--onyx-number-spacing-600);
|
|
8
|
+
--onyx-density-2xs: var(--onyx-number-spacing-100);
|
|
9
|
+
--onyx-density-3xl: var(--onyx-number-spacing-700);
|
|
10
|
+
--onyx-density-3xs: var(--onyx-number-spacing-0);
|
|
11
|
+
--onyx-density-4xl: var(--onyx-number-spacing-800);
|
|
12
|
+
--onyx-density-lg: var(--onyx-number-spacing-400);
|
|
13
|
+
--onyx-density-md: var(--onyx-number-spacing-325);
|
|
14
|
+
--onyx-density-sm: var(--onyx-number-spacing-300);
|
|
15
|
+
--onyx-density-xl: var(--onyx-number-spacing-500);
|
|
16
|
+
--onyx-density-xs: var(--onyx-number-spacing-200);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly.
|
|
3
|
+
* This file contains the specific variables for the "cozy" theme.
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:53 GMT
|
|
5
|
+
*/
|
|
6
|
+
:where(.onyx-density-cozy) {
|
|
7
|
+
--onyx-density-2xl: var(--onyx-number-spacing-800);
|
|
8
|
+
--onyx-density-2xs: var(--onyx-number-spacing-300);
|
|
9
|
+
--onyx-density-3xl: var(--onyx-number-spacing-900);
|
|
10
|
+
--onyx-density-3xs: var(--onyx-number-spacing-200);
|
|
11
|
+
--onyx-density-4xl: var(--onyx-number-spacing-950);
|
|
12
|
+
--onyx-density-lg: var(--onyx-number-spacing-600);
|
|
13
|
+
--onyx-density-md: var(--onyx-number-spacing-500);
|
|
14
|
+
--onyx-density-sm: var(--onyx-number-spacing-400);
|
|
15
|
+
--onyx-density-xl: var(--onyx-number-spacing-700);
|
|
16
|
+
--onyx-density-xs: var(--onyx-number-spacing-350);
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly.
|
|
3
|
+
* This file contains the specific variables for the "default" theme.
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:48 GMT
|
|
5
|
+
*/
|
|
6
|
+
:where(:root),
|
|
7
|
+
:where(.onyx-density-default) {
|
|
8
|
+
--onyx-density-2xl: var(--onyx-number-spacing-700);
|
|
9
|
+
--onyx-density-2xs: var(--onyx-number-spacing-200);
|
|
10
|
+
--onyx-density-3xl: var(--onyx-number-spacing-800);
|
|
11
|
+
--onyx-density-3xs: var(--onyx-number-spacing-100);
|
|
12
|
+
--onyx-density-4xl: var(--onyx-number-spacing-900);
|
|
13
|
+
--onyx-density-lg: var(--onyx-number-spacing-500);
|
|
14
|
+
--onyx-density-md: var(--onyx-number-spacing-400);
|
|
15
|
+
--onyx-density-sm: var(--onyx-number-spacing-350);
|
|
16
|
+
--onyx-density-xl: var(--onyx-number-spacing-600);
|
|
17
|
+
--onyx-density-xs: var(--onyx-number-spacing-300);
|
|
18
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly.
|
|
3
3
|
* This file contains the specific variables for the "light" theme.
|
|
4
|
-
* Imported from Figma API on
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:30 GMT
|
|
5
5
|
*/
|
|
6
6
|
:where(:root) {
|
|
7
7
|
--onyx-color-base-background-blank: var(--onyx-color-universal-grayscale-white);
|
|
@@ -117,16 +117,4 @@
|
|
|
117
117
|
--onyx-radius-sm: var(--onyx-number-radius-200);
|
|
118
118
|
--onyx-radius-xl: var(--onyx-number-radius-500);
|
|
119
119
|
--onyx-radius-xs: var(--onyx-number-radius-100);
|
|
120
|
-
--onyx-spacing-2xl: var(--onyx-number-spacing-700);
|
|
121
|
-
--onyx-spacing-2xs: var(--onyx-number-spacing-300);
|
|
122
|
-
--onyx-spacing-3xl: var(--onyx-number-spacing-800);
|
|
123
|
-
--onyx-spacing-3xs: var(--onyx-number-spacing-250);
|
|
124
|
-
--onyx-spacing-4xl: var(--onyx-number-spacing-900);
|
|
125
|
-
--onyx-spacing-4xs: var(--onyx-number-spacing-200);
|
|
126
|
-
--onyx-spacing-5xs: var(--onyx-number-spacing-100);
|
|
127
|
-
--onyx-spacing-lg: var(--onyx-number-spacing-500);
|
|
128
|
-
--onyx-spacing-md: var(--onyx-number-spacing-400);
|
|
129
|
-
--onyx-spacing-sm: var(--onyx-number-spacing-350);
|
|
130
|
-
--onyx-spacing-xl: var(--onyx-number-spacing-600);
|
|
131
|
-
--onyx-spacing-xs: var(--onyx-number-spacing-325);
|
|
132
120
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not edit directly.
|
|
3
|
+
* This file contains the specific variables for the "spacing" theme.
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:42 GMT
|
|
5
|
+
*/
|
|
6
|
+
:where(:root) {
|
|
7
|
+
--onyx-spacing-2xl: var(--onyx-number-spacing-700);
|
|
8
|
+
--onyx-spacing-2xs: var(--onyx-number-spacing-300);
|
|
9
|
+
--onyx-spacing-3xl: var(--onyx-number-spacing-800);
|
|
10
|
+
--onyx-spacing-3xs: var(--onyx-number-spacing-250);
|
|
11
|
+
--onyx-spacing-4xl: var(--onyx-number-spacing-900);
|
|
12
|
+
--onyx-spacing-4xs: var(--onyx-number-spacing-200);
|
|
13
|
+
--onyx-spacing-5xl: var(--onyx-number-spacing-950);
|
|
14
|
+
--onyx-spacing-5xs: var(--onyx-number-spacing-100);
|
|
15
|
+
--onyx-spacing-lg: var(--onyx-number-spacing-500);
|
|
16
|
+
--onyx-spacing-md: var(--onyx-number-spacing-400);
|
|
17
|
+
--onyx-spacing-sm: var(--onyx-number-spacing-350);
|
|
18
|
+
--onyx-spacing-xl: var(--onyx-number-spacing-600);
|
|
19
|
+
--onyx-spacing-xs: var(--onyx-number-spacing-325);
|
|
20
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly.
|
|
3
3
|
* This file contains the specific variables for the "kaufland" theme.
|
|
4
|
-
* Imported from Figma API on
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:24 GMT
|
|
5
5
|
*/
|
|
6
6
|
:where(:root),
|
|
7
7
|
.onyx-theme-kaufland {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
--onyx-number-radius-400: 1rem;
|
|
110
110
|
--onyx-number-radius-500: 2rem;
|
|
111
111
|
--onyx-number-radius-600: 62.5rem;
|
|
112
|
-
--onyx-number-spacing-0:
|
|
112
|
+
--onyx-number-spacing-0: 0rem;
|
|
113
113
|
--onyx-number-spacing-100: 0.125rem;
|
|
114
114
|
--onyx-number-spacing-200: 0.25rem;
|
|
115
115
|
--onyx-number-spacing-250: 0.375rem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly.
|
|
3
3
|
* This file contains the specific variables for the "lidl" theme.
|
|
4
|
-
* Imported from Figma API on
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:24 GMT
|
|
5
5
|
*/
|
|
6
6
|
:where(:root),
|
|
7
7
|
.onyx-theme-lidl {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
--onyx-number-radius-400: 1rem;
|
|
110
110
|
--onyx-number-radius-500: 2rem;
|
|
111
111
|
--onyx-number-radius-600: 62.5rem;
|
|
112
|
-
--onyx-number-spacing-0:
|
|
112
|
+
--onyx-number-spacing-0: 0rem;
|
|
113
113
|
--onyx-number-spacing-100: 0.125rem;
|
|
114
114
|
--onyx-number-spacing-200: 0.25rem;
|
|
115
115
|
--onyx-number-spacing-250: 0.375rem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly.
|
|
3
3
|
* This file contains the specific variables for the "onyx" theme.
|
|
4
|
-
* Imported from Figma API on
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:19 GMT
|
|
5
5
|
*/
|
|
6
6
|
:where(:root),
|
|
7
7
|
.onyx-theme-default {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
--onyx-number-radius-400: 1rem;
|
|
110
110
|
--onyx-number-radius-500: 2rem;
|
|
111
111
|
--onyx-number-radius-600: 62.5rem;
|
|
112
|
-
--onyx-number-spacing-0:
|
|
112
|
+
--onyx-number-spacing-0: 0rem;
|
|
113
113
|
--onyx-number-spacing-100: 0.125rem;
|
|
114
114
|
--onyx-number-spacing-200: 0.25rem;
|
|
115
115
|
--onyx-number-spacing-250: 0.375rem;
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"onyx-number-radius-400": "1rem",
|
|
104
104
|
"onyx-number-radius-500": "2rem",
|
|
105
105
|
"onyx-number-radius-600": "62.5rem",
|
|
106
|
-
"onyx-number-spacing-0": "
|
|
106
|
+
"onyx-number-spacing-0": "0rem",
|
|
107
107
|
"onyx-number-spacing-100": "0.125rem",
|
|
108
108
|
"onyx-number-spacing-200": "0.25rem",
|
|
109
109
|
"onyx-number-spacing-250": "0.375rem",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly.
|
|
3
3
|
* This file contains the specific variables for the "twogo" theme.
|
|
4
|
-
* Imported from Figma API on
|
|
4
|
+
* Imported from Figma API on Fri, 26 Jul 2024 09:04:24 GMT
|
|
5
5
|
*/
|
|
6
6
|
:where(:root),
|
|
7
7
|
.onyx-theme-twogo {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
--onyx-number-radius-400: 1rem;
|
|
110
110
|
--onyx-number-radius-500: 2rem;
|
|
111
111
|
--onyx-number-radius-600: 62.5rem;
|
|
112
|
-
--onyx-number-spacing-0:
|
|
112
|
+
--onyx-number-spacing-0: 0rem;
|
|
113
113
|
--onyx-number-spacing-100: 0.125rem;
|
|
114
114
|
--onyx-number-spacing-200: 0.25rem;
|
|
115
115
|
--onyx-number-spacing-250: 0.375rem;
|
package/src/styles/density.scss
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
$density-compact: 2rem;
|
|
2
|
-
$density-default: 2.5rem;
|
|
3
|
-
$density-cozy: 3rem;
|
|
4
|
-
|
|
5
|
-
@layer onyx.utility {
|
|
6
|
-
.onyx-density-compact {
|
|
7
|
-
--onyx-density: #{$density-compact};
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
:root,
|
|
11
|
-
.onyx-density-default {
|
|
12
|
-
--onyx-density: #{$density-default};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.onyx-density-cozy {
|
|
16
|
-
--onyx-density: #{$density-cozy};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@media (pointer: fine) {
|
|
20
|
-
.onyx-density-fine-compact {
|
|
21
|
-
--onyx-density: #{$density-compact};
|
|
22
|
-
}
|
|
23
|
-
.onyx-density-fine-default {
|
|
24
|
-
--onyx-density: #{$density-default};
|
|
25
|
-
}
|
|
26
|
-
.onyx-density-fine-cozy {
|
|
27
|
-
--onyx-density: #{$density-cozy};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
@media (pointer: coarse) {
|
|
31
|
-
.onyx-density-coarse-compact {
|
|
32
|
-
--onyx-density: #{$density-compact};
|
|
33
|
-
}
|
|
34
|
-
.onyx-density-coarse-default {
|
|
35
|
-
--onyx-density: #{$density-default};
|
|
36
|
-
}
|
|
37
|
-
.onyx-density-coarse-cozy {
|
|
38
|
-
--onyx-density: #{$density-cozy};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
package/src/types/breakpoints.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* All available onyx breakpoints / viewports.
|
|
3
|
-
* Key = breakpoint name, value = width in pixels.
|
|
4
|
-
*/
|
|
5
|
-
export const ONYX_BREAKPOINTS = {
|
|
6
|
-
"2xs": 320,
|
|
7
|
-
xs: 576,
|
|
8
|
-
sm: 768,
|
|
9
|
-
md: 992,
|
|
10
|
-
lg: 1440,
|
|
11
|
-
xl: 1920,
|
|
12
|
-
} as const;
|
|
13
|
-
|
|
14
|
-
export type OnyxBreakpoint = keyof typeof ONYX_BREAKPOINTS;
|
package/src/types/colors.ts
DELETED
package/src/types/components.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { DensityProp } from "../composables/density";
|
|
2
|
-
import type { TruncationType } from "./fonts";
|
|
3
|
-
|
|
4
|
-
// IMPORTANT: When changing this type, make sure to implement the feature
|
|
5
|
-
// for the following components:
|
|
6
|
-
// - Checkbox / Checkbox group
|
|
7
|
-
// - Radio button / Radio group
|
|
8
|
-
// - Select
|
|
9
|
-
// - ...
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Base select option that is e.g. used inside the select, radio / checkbox group.
|
|
13
|
-
*/
|
|
14
|
-
export type BaseSelectOption<TValue extends SelectOptionValue = SelectOptionValue> = DensityProp & {
|
|
15
|
-
/**
|
|
16
|
-
* Value of the option when it is selected.
|
|
17
|
-
* Must be unique in the current list of options.
|
|
18
|
-
*/
|
|
19
|
-
value: TValue;
|
|
20
|
-
/**
|
|
21
|
-
* Label to show. Required due to accessibility / screen readers.
|
|
22
|
-
* If you want to visually hide the label, use the `hideLabel` property.
|
|
23
|
-
*/
|
|
24
|
-
label: string;
|
|
25
|
-
/**
|
|
26
|
-
* If `true`, the label will be visually hidden and the `title` attribute will be set.
|
|
27
|
-
* For accessibility / screen readers, the aria-label will still be set.
|
|
28
|
-
*/
|
|
29
|
-
hideLabel?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Whether to disable the component and prevent user interaction.
|
|
32
|
-
*/
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Shows a loading indicator.
|
|
36
|
-
*/
|
|
37
|
-
loading?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Whether to show a skeleton.
|
|
40
|
-
*/
|
|
41
|
-
skeleton?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* How to truncate the label if it exceeds the max width.
|
|
44
|
-
*/
|
|
45
|
-
truncation?: TruncationType;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type SelectOptionValue = string | number | boolean;
|
|
49
|
-
|
|
50
|
-
export type AutofocusProp = {
|
|
51
|
-
/**
|
|
52
|
-
* Whether to focus the component on page load or inside a dialog/popover once it opens.
|
|
53
|
-
* Can only be enabled for one element inside a page/dialog/popover.
|
|
54
|
-
* Note: Has no effect when set after the component has been mounted.
|
|
55
|
-
*
|
|
56
|
-
* **UX / Accessibility**: autofocus should be used carefully since it can reduce usability and accessibility for users.
|
|
57
|
-
*/
|
|
58
|
-
autofocus?: boolean;
|
|
59
|
-
};
|
package/src/types/fonts.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const TEXT_SIZES = ["small", "default", "large"] as const;
|
|
2
|
-
export type TextSize = (typeof TEXT_SIZES)[number];
|
|
3
|
-
|
|
4
|
-
// when adding a new truncation type, make sure to also add CSS for it
|
|
5
|
-
// inside styles/fonts.scss
|
|
6
|
-
export const TRUNCATION_TYPES = ["ellipsis", "multiline"] as const;
|
|
7
|
-
export type TruncationType = (typeof TRUNCATION_TYPES)[number];
|