@lumx/core 3.20.1-alpha.45 → 3.20.1-alpha.46

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 (40) hide show
  1. package/js/constants/className/index.d.ts +4 -0
  2. package/js/constants/className/index.js +6 -0
  3. package/js/constants/components/index.d.ts +24 -0
  4. package/js/constants/components/index.js +26 -0
  5. package/js/constants/enums/index.d.ts +200 -0
  6. package/js/constants/enums/index.js +155 -0
  7. package/js/constants/index.d.ts +3 -231
  8. package/js/constants/index.js +4 -188
  9. package/js/utils/{color → _internal/color}/resolveColorWithVariants.d.ts +1 -1
  10. package/js/utils/className/color/index.js +2 -2
  11. package/js/utils/className/visually-hidden/index.js +2 -1
  12. package/js/utils/index.d.ts +0 -1
  13. package/js/utils/index.js +0 -1
  14. package/package.json +1 -1
  15. package/js/constants/design-tokens.d.ts +0 -5421
  16. package/js/constants/design-tokens.js +0 -2325
  17. package/js/custom-colors.d.ts +0 -25
  18. package/js/custom-colors.js +0 -43
  19. package/js/types/Callback.js +0 -1
  20. package/js/types/Direction.js +0 -1
  21. package/js/types/Falsy.js +0 -1
  22. package/js/types/GenericProps.js +0 -1
  23. package/js/types/HasAriaLabelOrLabelledBy.js +0 -1
  24. package/js/types/HasClassName.js +0 -1
  25. package/js/types/HasCloseMode.js +0 -1
  26. package/js/types/HasTheme.js +0 -1
  27. package/js/types/HeadingElement.js +0 -1
  28. package/js/types/KebabCase.js +0 -1
  29. package/js/types/LumxClassName.js +0 -1
  30. package/js/types/Point.js +0 -1
  31. package/js/types/Predicate.js +0 -1
  32. package/js/types/RectSize.js +0 -1
  33. package/js/types/Spacing.js +0 -1
  34. package/js/types/TextElement.js +0 -1
  35. package/js/types/ValueOf.js +0 -1
  36. package/js/utils/color/index.js +0 -1
  37. package/js/utils/color/resolveColorWithVariants.js +0 -9
  38. /package/js/constants/{keycodes.d.ts → keycodes/index.d.ts} +0 -0
  39. /package/js/constants/{keycodes.js → keycodes/index.js} +0 -0
  40. /package/js/utils/{color → _internal/color}/index.d.ts +0 -0
@@ -1,188 +1,4 @@
1
- export { BACKSPACE_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESCAPE_KEY_CODE, LEFT_KEY_CODE, RIGHT_KEY_CODE, SPACE_KEY_CODE, TAB_KEY_CODE, UP_KEY_CODE } from './keycodes.js';
2
-
3
- /**
4
- * Key codes.
5
- */
6
- /**
7
- * Animation duration constants. Take into consideration that if you change one of these variables,
8
- * you need to update their scss counterpart as well
9
- */
10
- const DIALOG_TRANSITION_DURATION = 400;
11
- const EXPANSION_PANEL_TRANSITION_DURATION = 400;
12
- const NOTIFICATION_TRANSITION_DURATION = 200;
13
- const SLIDESHOW_TRANSITION_DURATION = 5000;
14
- /**
15
- * Delay on hover after which we open or close the tooltip.
16
- * Only applies to devices supporting pointer hover.
17
- */
18
- const TOOLTIP_HOVER_DELAY = {
19
- open: 500,
20
- close: 500,
21
- };
22
- /**
23
- * Delay on long press after which we open or close the tooltip.
24
- * Only applies to devices not supporting pointer hover.
25
- */
26
- const TOOLTIP_LONG_PRESS_DELAY = {
27
- open: 250,
28
- close: 3000,
29
- };
30
- /**
31
- * Alignments.
32
- */
33
- const Alignment = {
34
- bottom: 'bottom',
35
- center: 'center',
36
- end: 'end',
37
- left: 'left',
38
- right: 'right',
39
- spaceAround: 'space-around',
40
- spaceBetween: 'space-between',
41
- spaceEvenly: 'space-evenly',
42
- start: 'start',
43
- top: 'top',
44
- };
45
- const Theme = {
46
- light: 'light',
47
- dark: 'dark',
48
- };
49
- const Size = {
50
- xxs: 'xxs',
51
- xs: 'xs',
52
- s: 's',
53
- m: 'm',
54
- l: 'l',
55
- xl: 'xl',
56
- xxl: 'xxl',
57
- tiny: 'tiny',
58
- regular: 'regular',
59
- medium: 'medium',
60
- big: 'big',
61
- huge: 'huge',
62
- };
63
- const Orientation = {
64
- horizontal: 'horizontal',
65
- vertical: 'vertical',
66
- };
67
- const Emphasis = {
68
- low: 'low',
69
- medium: 'medium',
70
- high: 'high',
71
- };
72
- /**
73
- * List of typographies that can't be customized.
74
- */
75
- const TypographyInterface = {
76
- overline: 'overline',
77
- caption: 'caption',
78
- body1: 'body1',
79
- body2: 'body2',
80
- subtitle1: 'subtitle1',
81
- subtitle2: 'subtitle2',
82
- title: 'title',
83
- headline: 'headline',
84
- display1: 'display1',
85
- };
86
- /**
87
- * List of title typographies that can be customized (via CSS variables).
88
- */
89
- const TypographyTitleCustom = {
90
- title1: 'custom-title1',
91
- title2: 'custom-title2',
92
- title3: 'custom-title3',
93
- title4: 'custom-title4',
94
- title5: 'custom-title5',
95
- title6: 'custom-title6',
96
- };
97
- /**
98
- * List of typographies that can be customized (via CSS variables).
99
- */
100
- const TypographyCustom = {
101
- ...TypographyTitleCustom,
102
- intro: 'custom-intro',
103
- 'body-large': 'custom-body-large',
104
- body: 'custom-body',
105
- quote: 'custom-quote',
106
- 'publish-info': 'custom-publish-info',
107
- button: 'custom-button',
108
- };
109
- /**
110
- * List of all typographies.
111
- */
112
- const Typography = {
113
- ...TypographyInterface,
114
- custom: TypographyCustom,
115
- };
116
- /**
117
- * All available aspect ratios.
118
- */
119
- const AspectRatio = {
120
- /** Intrinsic content ratio. */
121
- original: 'original',
122
- /** Ratio 3:1 */
123
- panoramic: 'panoramic',
124
- /** Ratio 16:9 */
125
- wide: 'wide',
126
- /** Ratio 3:2 */
127
- horizontal: 'horizontal',
128
- /** Ratio 3:2 */
129
- vertical: 'vertical',
130
- /** Ratio 1:1 */
131
- square: 'square',
132
- /** Ratio constrained by the parent. */
133
- free: 'free',
134
- };
135
- /**
136
- * Semantic info about the purpose of the component
137
- */
138
- const Kind = {
139
- info: 'info',
140
- success: 'success',
141
- warning: 'warning',
142
- error: 'error',
143
- };
144
- /**
145
- * All available white-space values
146
- * */
147
- const WhiteSpace = {
148
- normal: 'normal',
149
- nowrap: 'nowrap',
150
- pre: 'pre',
151
- 'pre-wrap': 'pre-wrap',
152
- 'pre-line': 'pre-line',
153
- 'break-spaces': 'break-spaces',
154
- };
155
- /**
156
- * See SCSS variable $lumx-color-palette
157
- */
158
- const ColorPalette = {
159
- primary: 'primary',
160
- secondary: 'secondary',
161
- blue: 'blue',
162
- dark: 'dark',
163
- green: 'green',
164
- yellow: 'yellow',
165
- red: 'red',
166
- light: 'light',
167
- grey: 'grey',
168
- };
169
- /**
170
- * See SCSS variable $lumx-color-variants
171
- */
172
- const ColorVariant = {
173
- D1: 'D1',
174
- D2: 'D2',
175
- L1: 'L1',
176
- L2: 'L2',
177
- L3: 'L3',
178
- L4: 'L4',
179
- L5: 'L5',
180
- L6: 'L6',
181
- N: 'N',
182
- };
183
- /**
184
- * Visually hidden a11y utility class name
185
- */
186
- const VISUALLY_HIDDEN = 'visually-hidden';
187
-
188
- export { Alignment, AspectRatio, ColorPalette, ColorVariant, DIALOG_TRANSITION_DURATION, EXPANSION_PANEL_TRANSITION_DURATION, Emphasis, Kind, NOTIFICATION_TRANSITION_DURATION, Orientation, SLIDESHOW_TRANSITION_DURATION, Size, TOOLTIP_HOVER_DELAY, TOOLTIP_LONG_PRESS_DELAY, Theme, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, VISUALLY_HIDDEN, WhiteSpace };
1
+ export { BACKSPACE_KEY_CODE, DOWN_KEY_CODE, ENTER_KEY_CODE, ESCAPE_KEY_CODE, LEFT_KEY_CODE, RIGHT_KEY_CODE, SPACE_KEY_CODE, TAB_KEY_CODE, UP_KEY_CODE } from './keycodes/index.js';
2
+ export { DIALOG_TRANSITION_DURATION, EXPANSION_PANEL_TRANSITION_DURATION, NOTIFICATION_TRANSITION_DURATION, SLIDESHOW_TRANSITION_DURATION, TOOLTIP_HOVER_DELAY, TOOLTIP_LONG_PRESS_DELAY } from './components/index.js';
3
+ export { Alignment, AspectRatio, ColorPalette, ColorVariant, Emphasis, Kind, Orientation, Size, Theme, Typography, TypographyCustom, TypographyInterface, TypographyTitleCustom, WhiteSpace } from './enums/index.js';
4
+ export { VISUALLY_HIDDEN } from './className/index.js';
@@ -1,3 +1,3 @@
1
- import type { ColorPalette, ColorVariant, ColorWithVariants } from '../../constants';
1
+ import type { ColorPalette, ColorVariant, ColorWithVariants } from '../../../constants';
2
2
  /** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
3
3
  export declare function resolveColorWithVariants(colorWithVariants?: ColorWithVariants, colorVariant?: ColorVariant): [color?: ColorPalette, colorVariant?: ColorVariant];
@@ -1,5 +1,5 @@
1
- import { ColorVariant } from '../../../constants/index.js';
2
- import { resolveColorWithVariants } from '../../color/resolveColorWithVariants.js';
1
+ import { ColorVariant } from '../../../constants/enums/index.js';
2
+ import { resolveColorWithVariants } from '@lumx/core/js/utils/_internal/color';
3
3
 
4
4
  /**
5
5
  * Generates a Lumx color class name for the given type, color and variant.
@@ -1,4 +1,5 @@
1
- import { VISUALLY_HIDDEN } from '../../../constants/index.js';
1
+ import '../../../constants/enums/index.js';
2
+ import { VISUALLY_HIDDEN } from '../../../constants/className/index.js';
2
3
 
3
4
  /**
4
5
  * Visually hidden class name.
@@ -1,3 +1,2 @@
1
1
  export * as cls from './className';
2
- export * from './color';
3
2
  export * from './events';
package/js/utils/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as index from './className/index.js';
2
2
  export { index as cls };
3
- export { resolveColorWithVariants } from './color/resolveColorWithVariants.js';
4
3
  export { onButtonPressed, onEnterPressed, onEscapePressed } from './events/keyboard.js';
5
4
  export { detectHorizontalSwipe } from './events/swipe.js';
package/package.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
36
36
  },
37
37
  "sideEffects": false,
38
- "version": "3.20.1-alpha.45",
38
+ "version": "3.20.1-alpha.46",
39
39
  "devDependencies": {
40
40
  "@rollup/plugin-typescript": "^12.3.0",
41
41
  "@types/react": "^17.0.2",