@lumx/core 3.20.1-alpha.44 → 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.
- package/js/constants/className/index.d.ts +4 -0
- package/js/constants/className/index.js +6 -0
- package/js/constants/components/index.d.ts +24 -0
- package/js/constants/components/index.js +26 -0
- package/js/constants/enums/index.d.ts +200 -0
- package/js/constants/enums/index.js +155 -0
- package/js/constants/index.d.ts +3 -231
- package/js/constants/index.js +4 -188
- package/js/utils/{color → _internal/color}/resolveColorWithVariants.d.ts +1 -1
- package/js/utils/className/color/index.js +2 -2
- package/js/utils/className/visually-hidden/index.js +2 -1
- package/js/utils/index.d.ts +0 -1
- package/js/utils/index.js +0 -1
- package/lumx.css +11 -11
- package/package.json +1 -1
- package/scss/components/text-field/_index.scss +4 -6
- package/js/constants/design-tokens.d.ts +0 -5421
- package/js/constants/design-tokens.js +0 -2325
- package/js/custom-colors.d.ts +0 -25
- package/js/custom-colors.js +0 -43
- package/js/types/Callback.js +0 -1
- package/js/types/Direction.js +0 -1
- package/js/types/Falsy.js +0 -1
- package/js/types/GenericProps.js +0 -1
- package/js/types/HasAriaLabelOrLabelledBy.js +0 -1
- package/js/types/HasClassName.js +0 -1
- package/js/types/HasCloseMode.js +0 -1
- package/js/types/HasTheme.js +0 -1
- package/js/types/HeadingElement.js +0 -1
- package/js/types/KebabCase.js +0 -1
- package/js/types/LumxClassName.js +0 -1
- package/js/types/Point.js +0 -1
- package/js/types/Predicate.js +0 -1
- package/js/types/RectSize.js +0 -1
- package/js/types/Spacing.js +0 -1
- package/js/types/TextElement.js +0 -1
- package/js/types/ValueOf.js +0 -1
- package/js/utils/color/index.js +0 -1
- package/js/utils/color/resolveColorWithVariants.js +0 -9
- /package/js/constants/{keycodes.d.ts → keycodes/index.d.ts} +0 -0
- /package/js/constants/{keycodes.js → keycodes/index.js} +0 -0
- /package/js/utils/{color → _internal/color}/index.d.ts +0 -0
package/js/constants/index.js
CHANGED
|
@@ -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
|
-
|
|
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 '
|
|
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 '
|
|
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.
|
package/js/utils/index.d.ts
CHANGED
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/lumx.css
CHANGED
|
@@ -12056,7 +12056,10 @@ table {
|
|
|
12056
12056
|
flex: 1 1 auto;
|
|
12057
12057
|
padding: var(--lumx-text-field-wrapper-padding-vertical) 0;
|
|
12058
12058
|
}
|
|
12059
|
-
.lumx-text-
|
|
12059
|
+
.lumx-text-field__input-native {
|
|
12060
|
+
resize: none;
|
|
12061
|
+
}
|
|
12062
|
+
.lumx-text-field--theme-light .lumx-text-field__input-native, .lumx-text-field__input-native--theme-light {
|
|
12060
12063
|
display: block;
|
|
12061
12064
|
width: 100%;
|
|
12062
12065
|
padding: 0;
|
|
@@ -12069,16 +12072,16 @@ table {
|
|
|
12069
12072
|
color: var(--lumx-color-dark-N);
|
|
12070
12073
|
color: var(--lumx-text-field-state-default-theme-light-input-content-color);
|
|
12071
12074
|
}
|
|
12072
|
-
.lumx-text-field--theme-light .lumx-text-field__input-native[type=number]::-webkit-inner-spin-button, .lumx-text-field--theme-light .lumx-text-field__input-native[type=number]::-webkit-outer-spin-button {
|
|
12075
|
+
.lumx-text-field--theme-light .lumx-text-field__input-native[type=number]::-webkit-inner-spin-button, .lumx-text-field--theme-light .lumx-text-field__input-native[type=number]::-webkit-outer-spin-button, .lumx-text-field__input-native--theme-light[type=number]::-webkit-inner-spin-button, .lumx-text-field__input-native--theme-light[type=number]::-webkit-outer-spin-button {
|
|
12073
12076
|
opacity: 1;
|
|
12074
12077
|
}
|
|
12075
|
-
.lumx-text-field--theme-light .lumx-text-field__input-native::-moz-placeholder {
|
|
12078
|
+
.lumx-text-field--theme-light .lumx-text-field__input-native::-moz-placeholder, .lumx-text-field__input-native--theme-light::-moz-placeholder {
|
|
12076
12079
|
color: var(--lumx-text-field-state-default-theme-light-input-placeholder-color);
|
|
12077
12080
|
}
|
|
12078
|
-
.lumx-text-field--theme-light .lumx-text-field__input-native::placeholder {
|
|
12081
|
+
.lumx-text-field--theme-light .lumx-text-field__input-native::placeholder, .lumx-text-field__input-native--theme-light::placeholder {
|
|
12079
12082
|
color: var(--lumx-text-field-state-default-theme-light-input-placeholder-color);
|
|
12080
12083
|
}
|
|
12081
|
-
.lumx-text-field--theme-dark .lumx-text-field__input-native {
|
|
12084
|
+
.lumx-text-field--theme-dark .lumx-text-field__input-native, .lumx-text-field__input-native--theme-dark {
|
|
12082
12085
|
display: block;
|
|
12083
12086
|
width: 100%;
|
|
12084
12087
|
padding: 0;
|
|
@@ -12091,13 +12094,13 @@ table {
|
|
|
12091
12094
|
color: var(--lumx-color-light-N);
|
|
12092
12095
|
color: var(--lumx-text-field-state-default-theme-dark-input-content-color);
|
|
12093
12096
|
}
|
|
12094
|
-
.lumx-text-field--theme-dark .lumx-text-field__input-native[type=number]::-webkit-inner-spin-button, .lumx-text-field--theme-dark .lumx-text-field__input-native[type=number]::-webkit-outer-spin-button {
|
|
12097
|
+
.lumx-text-field--theme-dark .lumx-text-field__input-native[type=number]::-webkit-inner-spin-button, .lumx-text-field--theme-dark .lumx-text-field__input-native[type=number]::-webkit-outer-spin-button, .lumx-text-field__input-native--theme-dark[type=number]::-webkit-inner-spin-button, .lumx-text-field__input-native--theme-dark[type=number]::-webkit-outer-spin-button {
|
|
12095
12098
|
opacity: 1;
|
|
12096
12099
|
}
|
|
12097
|
-
.lumx-text-field--theme-dark .lumx-text-field__input-native::-moz-placeholder {
|
|
12100
|
+
.lumx-text-field--theme-dark .lumx-text-field__input-native::-moz-placeholder, .lumx-text-field__input-native--theme-dark::-moz-placeholder {
|
|
12098
12101
|
color: var(--lumx-text-field-state-default-theme-dark-input-placeholder-color);
|
|
12099
12102
|
}
|
|
12100
|
-
.lumx-text-field--theme-dark .lumx-text-field__input-native::placeholder {
|
|
12103
|
+
.lumx-text-field--theme-dark .lumx-text-field__input-native::placeholder, .lumx-text-field__input-native--theme-dark::placeholder {
|
|
12101
12104
|
color: var(--lumx-text-field-state-default-theme-dark-input-placeholder-color);
|
|
12102
12105
|
}
|
|
12103
12106
|
.lumx-text-field--has-chips .lumx-text-field__input-native {
|
|
@@ -12106,9 +12109,6 @@ table {
|
|
|
12106
12109
|
min-width: 100px;
|
|
12107
12110
|
line-height: var(--lumx-material-chip-size-s-height);
|
|
12108
12111
|
}
|
|
12109
|
-
.lumx-text-field__input-native--textarea {
|
|
12110
|
-
resize: none;
|
|
12111
|
-
}
|
|
12112
12112
|
.lumx-text-field__input-clear, .lumx-text-field__after-element {
|
|
12113
12113
|
flex-shrink: 0;
|
|
12114
12114
|
margin: calc(var(--lumx-text-field-wrapper-padding-vertical) + (var(--lumx-material-text-field-input-content-line-height) - var(--lumx-button-height) / 1.5) / 2) 4px;
|
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.
|
|
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",
|
|
@@ -104,7 +104,9 @@
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
&__input-native {
|
|
107
|
-
|
|
107
|
+
resize: none;
|
|
108
|
+
|
|
109
|
+
#{$self}--theme-light &, &--theme-light {
|
|
108
110
|
@include lumx-text-field-input-native(lumx-base-const("theme", "LIGHT"));
|
|
109
111
|
@include lumx-text-field-input-content-color(
|
|
110
112
|
lumx-base-const("state", "DEFAULT"),
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
|
|
122
|
-
#{$self}--theme-dark
|
|
124
|
+
#{$self}--theme-dark &, &--theme-dark {
|
|
123
125
|
@include lumx-text-field-input-native(lumx-base-const("theme", "DARK"));
|
|
124
126
|
@include lumx-text-field-input-content-color(
|
|
125
127
|
lumx-base-const("state", "DEFAULT"),
|
|
@@ -140,10 +142,6 @@
|
|
|
140
142
|
min-width: $lumx-text-field-min-width;
|
|
141
143
|
line-height: var(--lumx-material-chip-size-s-height);
|
|
142
144
|
}
|
|
143
|
-
|
|
144
|
-
&--textarea {
|
|
145
|
-
resize: none;
|
|
146
|
-
}
|
|
147
145
|
}
|
|
148
146
|
|
|
149
147
|
&__input-clear,
|