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.
Files changed (60) hide show
  1. package/dist/components/OnyxCheckbox/OnyxCheckbox.vue.d.ts +2 -2
  2. package/dist/components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue.d.ts +2 -2
  3. package/dist/components/OnyxCheckboxGroup/types.d.ts +3 -2
  4. package/dist/components/OnyxEmpty/OnyxEmpty.vue.d.ts +11 -1
  5. package/dist/components/OnyxFormElement/OnyxFormElement.vue.d.ts +9 -2
  6. package/dist/components/OnyxFormElement/types.d.ts +6 -0
  7. package/dist/components/OnyxMobileNavButton/OnyxMobileNavButton.vue.d.ts +2 -2
  8. package/dist/components/OnyxMobileNavButton/types.d.ts +4 -0
  9. package/dist/components/OnyxNavBar/modules/OnyxFlyoutMenu/OnyxFlyoutMenu.vue.d.ts +9 -3
  10. package/dist/components/OnyxNavBar/modules/OnyxMenuItem/types.d.ts +1 -1
  11. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/OnyxUserMenu.vue.d.ts +9 -1
  12. package/dist/components/OnyxNavBar/modules/OnyxUserMenu/UserMenuLayout.vue.d.ts +10 -4
  13. package/dist/components/OnyxRadioButton/OnyxRadioButton.vue.d.ts +2 -2
  14. package/dist/components/OnyxRadioGroup/OnyxRadioGroup.vue.d.ts +2 -2
  15. package/dist/components/OnyxRadioGroup/types.d.ts +1 -1
  16. package/dist/components/OnyxSelect/OnyxSelect.vue.d.ts +5 -5
  17. package/dist/components/OnyxSelect/types.d.ts +21 -5
  18. package/dist/components/OnyxSelectInput/OnyxSelectInput.vue.d.ts +2 -2
  19. package/dist/components/OnyxSelectInput/types.d.ts +5 -12
  20. package/dist/components/OnyxSelectOption/OnyxSelectOption.vue.d.ts +1 -1
  21. package/dist/components/OnyxStepper/OnyxStepper.vue.d.ts +50 -0
  22. package/dist/components/OnyxStepper/types.d.ts +56 -0
  23. package/dist/components/OnyxSwitch/OnyxSwitch.vue.d.ts +1 -1
  24. package/dist/components/OnyxTooltip/OnyxTooltip.vue.d.ts +1 -1
  25. package/dist/components/OnyxTooltip/types.d.ts +2 -1
  26. package/dist/composables/useCustomValidity.d.ts +13 -1
  27. package/dist/index.cjs +5 -4
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.js +1682 -1417
  30. package/dist/style.css +1 -1
  31. package/dist/utils/attrs.d.ts +3 -3
  32. package/package.json +5 -8
  33. package/src/i18n/locales/de-DE.json +6 -1
  34. package/src/i18n/locales/en-US.json +6 -1
  35. package/src/styles/global.css +1 -1
  36. package/src/styles/index.scss +7 -4
  37. package/src/styles/mixins/checkbox.scss +1 -13
  38. package/src/styles/mixins/input.scss +49 -5
  39. package/src/styles/mixins/list.scss +2 -11
  40. package/src/styles/required.scss +1 -1
  41. package/src/styles/{dark.css → variables/dark.css} +1 -13
  42. package/src/styles/variables/density-compact.css +17 -0
  43. package/src/styles/variables/density-cozy.css +17 -0
  44. package/src/styles/variables/density-default.css +18 -0
  45. package/src/styles/{light.css → variables/light.css} +1 -13
  46. package/src/styles/variables/spacing.css +20 -0
  47. package/src/styles/{themes → variables/themes}/kaufland.css +2 -2
  48. package/src/styles/{themes → variables/themes}/lidl.css +2 -2
  49. package/src/styles/{themes → variables/themes}/onyx.css +2 -2
  50. package/src/styles/{themes → variables/themes}/onyx.json +1 -1
  51. package/src/styles/{themes → variables/themes}/twogo.css +2 -2
  52. package/src/styles/density.scss +0 -41
  53. package/src/types/breakpoints.ts +0 -14
  54. package/src/types/colors.ts +0 -10
  55. package/src/types/components.ts +0 -59
  56. package/src/types/fonts.ts +0 -7
  57. package/src/types/i18n.ts +0 -68
  58. package/src/types/index.ts +0 -10
  59. package/src/types/themes.ts +0 -1
  60. package/src/types/utils.ts +0 -4
package/src/types/i18n.ts DELETED
@@ -1,68 +0,0 @@
1
- /**
2
- * Gets a union type from an object that contains all combinations of nested keys as arrays.
3
- *
4
- * @see https://stackoverflow.com/a/47058976
5
- * @example
6
- * ```ts
7
- * type Test = ObjectToKeyPaths<{ a: "foo"; b: { c: "bar"; d: "baz" } }>;
8
- * // type Test = ["a"] | ["b", "c"] | ["b", "d"]
9
- * ```
10
- */
11
- type ObjectToKeyPaths<T> = T extends string
12
- ? []
13
- : { [K in Extract<keyof T, string>]: [K, ...ObjectToKeyPaths<T[K]>] }[Extract<keyof T, string>];
14
-
15
- /**
16
- * Joins the elements in the given type `T` with the separator `D`.
17
- *
18
- * @see https://stackoverflow.com/a/47058976
19
- * @example
20
- * ```ts
21
- * type Test = Join<["foo", "bar"], ".">
22
- * // type Test = "foo.bar"
23
- * ```
24
- */
25
- type Join<T extends unknown[], D extends string> = T extends []
26
- ? never
27
- : T extends [infer F]
28
- ? F
29
- : T extends [infer F, ...infer R]
30
- ? F extends string
31
- ? `${F}${D}${Join<Extract<R, string[]>, D>}`
32
- : never
33
- : string;
34
-
35
- type NestedMessage = { [key: string]: string | NestedMessage };
36
-
37
- /**
38
- * Translation value. Can either by a string or nested object with more translation values.
39
- *
40
- * @example
41
- * ```ts
42
- * // simple value
43
- * { someKey: "Hello World" }
44
- *
45
- * // nested value
46
- * {
47
- * someKey: {
48
- * someOtherKey: "Hello World"
49
- * }
50
- * }
51
- * ```
52
- */
53
- export type TranslationValue = string | NestedMessage;
54
-
55
- /**
56
- * Gets a union type of deeply joined keys from an object.
57
- *
58
- * @example
59
- * ```ts
60
- * FlattenedKeysOf<{
61
- * a: "test",
62
- * b: { c: "test" }
63
- * }>
64
- * // results in: "a" | "b.c"
65
- * ```
66
- * @see https://stackoverflow.com/a/47058976
67
- */
68
- export type FlattenedKeysOf<T extends TranslationValue> = Join<ObjectToKeyPaths<T>, ".">;
@@ -1,10 +0,0 @@
1
- export * from "./breakpoints";
2
- export * from "./colors";
3
- export * from "./components";
4
- export * from "./fonts";
5
- export * from "./i18n";
6
- export * from "./themes";
7
- export * from "./utils";
8
-
9
- export const DIRECTIONS = ["horizontal", "vertical"] as const;
10
- export type Direction = (typeof DIRECTIONS)[number];
@@ -1 +0,0 @@
1
- export type OnyxTheme = "kaufland" | "lidl" | "onyx" | "twogo";
@@ -1,4 +0,0 @@
1
- /**
2
- * Recursive / deep implementation of TypeScript's built-in `Partial<T>` type.
3
- */
4
- export type DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T;